@stacksjs/stx 0.2.454 → 0.2.456

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 (222) hide show
  1. package/dist/app-service-worker.d.ts +4 -1
  2. package/dist/chunk-087t6m0p.js +2 -0
  3. package/dist/chunk-0bdgcm01.js +2 -0
  4. package/dist/{chunk-yx37nrgr.js → chunk-0trfbqa7.js} +4 -4
  5. package/dist/{chunk-8ah8npj3.js → chunk-0v5dpk7r.js} +1 -1
  6. package/dist/{chunk-47jq9j1w.js → chunk-0vgfe5bf.js} +2 -2
  7. package/dist/chunk-143gpdxy.js +2 -0
  8. package/dist/{chunk-w8ek4fe8.js → chunk-1sdtg9np.js} +2 -2
  9. package/dist/chunk-1vgmzmsw.js +2 -0
  10. package/dist/{chunk-4q366fhp.js → chunk-28qkwe2b.js} +5 -5
  11. package/dist/{chunk-7mbx7dzg.js → chunk-2bdthb37.js} +2 -2
  12. package/dist/{chunk-149r1q6c.js → chunk-2cy956js.js} +2 -2
  13. package/dist/{chunk-2428rqy1.js → chunk-2d1n2fsz.js} +14 -7
  14. package/dist/chunk-2hddf9pn.js +2 -0
  15. package/dist/chunk-2zh91zea.js +2 -0
  16. package/dist/chunk-3227dnct.js +2 -0
  17. package/dist/chunk-32t5agpk.js +2 -0
  18. package/dist/chunk-33kwpw1a.js +4 -0
  19. package/dist/chunk-3ar8gdyd.js +2 -0
  20. package/dist/chunk-3s2vnqcf.js +2 -0
  21. package/dist/{chunk-hhjff2r8.js → chunk-44msrx2e.js} +3 -3
  22. package/dist/{chunk-0tchj3ct.js → chunk-462jmw0a.js} +6 -6
  23. package/dist/chunk-491pm0a9.js +2 -0
  24. package/dist/{chunk-g8k5rsqq.js → chunk-4fa3jec9.js} +12 -12
  25. package/dist/chunk-4henqdjf.js +2 -0
  26. package/dist/chunk-4qv9me8f.js +2 -0
  27. package/dist/chunk-561yczfn.js +2 -0
  28. package/dist/chunk-58n62bxb.js +3 -0
  29. package/dist/chunk-5arm42dc.js +17 -0
  30. package/dist/chunk-5hhrbzam.js +2 -0
  31. package/dist/chunk-5m8q7c5r.js +2 -0
  32. package/dist/{chunk-pkpmyr0x.js → chunk-5p56w2ke.js} +3 -3
  33. package/dist/chunk-5pjsc9zv.js +3 -0
  34. package/dist/{chunk-n9jn3qzw.js → chunk-5qns2sdz.js} +2 -2
  35. package/dist/chunk-68txmj8d.js +2 -0
  36. package/dist/{chunk-45rfv3a5.js → chunk-6cp3afft.js} +2 -2
  37. package/dist/chunk-6qv189mb.js +2 -0
  38. package/dist/{chunk-dwp3knc4.js → chunk-6r2709dj.js} +3 -3
  39. package/dist/{chunk-81v9crqy.js → chunk-6wpm3r4h.js} +1 -1
  40. package/dist/chunk-7rv3nvfh.js +2 -0
  41. package/dist/chunk-7tt84v1y.js +3 -0
  42. package/dist/{chunk-33xh91s8.js → chunk-7xeb9szc.js} +2 -2
  43. package/dist/chunk-8efg91ak.js +4 -0
  44. package/dist/chunk-8j16292d.js +33 -0
  45. package/dist/{chunk-qbhbe9cw.js → chunk-8nrttk4f.js} +5 -5
  46. package/dist/{chunk-73h7qjgq.js → chunk-8xz8t9xp.js} +2 -2
  47. package/dist/chunk-9t50hw97.js +2 -0
  48. package/dist/chunk-9z22zs86.js +2 -0
  49. package/dist/chunk-a32kqsff.js +2 -0
  50. package/dist/{chunk-19h1j59a.js → chunk-ab56jdah.js} +1 -1
  51. package/dist/chunk-arvst4wq.js +2 -0
  52. package/dist/chunk-b70kzmyd.js +3 -0
  53. package/dist/{chunk-0xztxj98.js → chunk-bq2e9qf6.js} +3 -3
  54. package/dist/{chunk-aem9hs8n.js → chunk-br1gra4w.js} +2 -2
  55. package/dist/{chunk-hqywyyez.js → chunk-c491hsm1.js} +5 -5
  56. package/dist/{chunk-jn8tj4kn.js → chunk-d3mpxr3s.js} +4 -4
  57. package/dist/chunk-d3zpz5r0.js +2 -0
  58. package/dist/{chunk-rbkna5rw.js → chunk-d4f1bxtt.js} +11 -11
  59. package/dist/{chunk-849wf19d.js → chunk-dxxs52yw.js} +3 -3
  60. package/dist/chunk-ef0gstkd.js +2 -0
  61. package/dist/{chunk-zqzv5jy2.js → chunk-exgyf65a.js} +4 -4
  62. package/dist/chunk-f0nf5p60.js +2 -0
  63. package/dist/{chunk-538h1sfc.js → chunk-f4c39nfh.js} +2 -2
  64. package/dist/{chunk-s5drjm2j.js → chunk-gkqxnetc.js} +6 -6
  65. package/dist/chunk-gp5n35mt.js +2 -0
  66. package/dist/{chunk-axydabse.js → chunk-h9e032kq.js} +3 -3
  67. package/dist/chunk-ha5z623e.js +2 -0
  68. package/dist/chunk-hehtgsrt.js +2 -0
  69. package/dist/chunk-hqzq3a61.js +2 -0
  70. package/dist/chunk-hskrxdcc.js +2 -0
  71. package/dist/chunk-hsv23bw6.js +2 -0
  72. package/dist/chunk-hvx3pc13.js +2 -0
  73. package/dist/chunk-hz3r02zb.js +2 -0
  74. package/dist/chunk-jdhs9w6h.js +2 -0
  75. package/dist/{chunk-vraddzkf.js → chunk-jepq6316.js} +4 -4
  76. package/dist/{chunk-3pc22sve.js → chunk-jfra00dj.js} +6 -6
  77. package/dist/{chunk-b5wh10s9.js → chunk-jnmngqs9.js} +78 -78
  78. package/dist/chunk-jv9xhgvy.js +2 -0
  79. package/dist/{chunk-dqr5n49p.js → chunk-jz7pvh7b.js} +2 -2
  80. package/dist/chunk-kcs71ks8.js +2 -0
  81. package/dist/{chunk-26wmppja.js → chunk-kppgyqwb.js} +1 -1
  82. package/dist/{chunk-fmj4xvqm.js → chunk-mhpsz5m0.js} +5 -5
  83. package/dist/chunk-mrk31q6x.js +2 -0
  84. package/dist/{chunk-b1q5sh7x.js → chunk-n1dyjhte.js} +3 -3
  85. package/dist/chunk-n38wvr7z.js +2831 -0
  86. package/dist/{chunk-mnz6bdp3.js → chunk-n866vbgj.js} +5 -5
  87. package/dist/chunk-n8hd5qap.js +2 -0
  88. package/dist/{chunk-s59r34p5.js → chunk-nmf12mx3.js} +4 -4
  89. package/dist/chunk-nqvb9094.js +2 -0
  90. package/dist/{chunk-9zbjk8pg.js → chunk-nww25qj9.js} +8 -8
  91. package/dist/chunk-p1mvzdhy.js +2 -0
  92. package/dist/chunk-pdqt4me8.js +2 -0
  93. package/dist/chunk-pe214qcn.js +2 -0
  94. package/dist/chunk-pqxhn8nj.js +2 -0
  95. package/dist/{chunk-4yyzje7d.js → chunk-pw34r8r5.js} +1 -1
  96. package/dist/chunk-q6pet6hn.js +2 -0
  97. package/dist/chunk-q98v7bhs.js +2 -0
  98. package/dist/chunk-qk6nasfm.js +2 -0
  99. package/dist/{chunk-d1xbamr1.js → chunk-qn2mx2js.js} +2 -2
  100. package/dist/{chunk-5xj1df83.js → chunk-r6pax860.js} +7 -7
  101. package/dist/{chunk-rdq113p4.js → chunk-r80km6mn.js} +2 -2
  102. package/dist/{chunk-tehvry9a.js → chunk-rcr57c30.js} +10 -10
  103. package/dist/{chunk-8fj8sm1a.js → chunk-ree9weje.js} +2 -2
  104. package/dist/{chunk-x4ztj64h.js → chunk-rgwvqmhh.js} +2 -2
  105. package/dist/{chunk-tn85vr56.js → chunk-rvgvt161.js} +2 -2
  106. package/dist/{chunk-z68rb7qp.js → chunk-s07kcpc3.js} +5 -5
  107. package/dist/chunk-sb9nkthv.js +2 -0
  108. package/dist/chunk-sk1pm2d1.js +11 -0
  109. package/dist/{chunk-yfd0e7dr.js → chunk-tbjyp03h.js} +1 -1
  110. package/dist/{chunk-g2afpsw0.js → chunk-tpeyn7wr.js} +2 -2
  111. package/dist/{chunk-s6e8mmk1.js → chunk-tpvc8xnk.js} +6 -6
  112. package/dist/chunk-tr7dz5g5.js +2 -0
  113. package/dist/{chunk-5cyme1g0.js → chunk-v3yqeh15.js} +2 -2
  114. package/dist/chunk-vc1816wk.js +2 -0
  115. package/dist/{chunk-9ndzk9r4.js → chunk-vg7wfkt5.js} +3 -3
  116. package/dist/chunk-vrvnctex.js +2 -0
  117. package/dist/{chunk-afhkvj3k.js → chunk-w1zvh5y7.js} +2 -2
  118. package/dist/chunk-wpmzsmrj.js +2 -0
  119. package/dist/chunk-wywv3kj8.js +2 -0
  120. package/dist/chunk-xfr3acjk.js +2 -0
  121. package/dist/chunk-xjqq3jrx.js +2 -0
  122. package/dist/chunk-xq2v4jpx.js +2 -0
  123. package/dist/{chunk-3nydw825.js → chunk-y2v0hny6.js} +8 -8
  124. package/dist/{chunk-56rk985x.js → chunk-y3cqh2jv.js} +3 -3
  125. package/dist/{chunk-697zcjzg.js → chunk-y8zt1j3h.js} +12 -12
  126. package/dist/chunk-yyfv2snf.js +2 -0
  127. package/dist/{chunk-0vbpcef6.js → chunk-z2daw0th.js} +4 -4
  128. package/dist/{chunk-nw8p8eg9.js → chunk-z3etxty5.js} +5 -5
  129. package/dist/{chunk-g3h7j2n7.js → chunk-z80d9dd2.js} +2 -2
  130. package/dist/chunk-z990jtmx.js +2 -0
  131. package/dist/{chunk-jwpcck1b.js → chunk-zydg3wgt.js} +2 -2
  132. package/dist/cli.js +20 -20
  133. package/dist/client-script.d.ts +0 -21
  134. package/dist/client-script.js +21 -0
  135. package/dist/composable-loader.js +41 -17
  136. package/dist/compression.js +25 -6
  137. package/dist/craft-entry.js +2 -2
  138. package/dist/craft.js +2 -2
  139. package/dist/html-masking.js +36 -8
  140. package/dist/i18n.js +4 -3
  141. package/dist/includes.js +6 -2
  142. package/dist/misc-directives.d.ts +0 -10
  143. package/dist/misc-directives.js +12 -0
  144. package/dist/offline/app-service-worker.d.ts +4 -1
  145. package/dist/offline/app-service-worker.js +62 -27
  146. package/dist/process.js +4 -0
  147. package/dist/pwa.js +3 -3
  148. package/dist/signals.js +8 -1
  149. package/dist/source-signature.d.ts +5 -2
  150. package/dist/source-signature.js +7 -0
  151. package/dist/ssg.js +8 -8
  152. package/dist/store-loader.js +2 -1
  153. package/dist/utils.js +27 -15
  154. package/package.json +5 -5
  155. package/dist/chunk-14x69rt4.js +0 -2
  156. package/dist/chunk-1kmd0g1k.js +0 -3
  157. package/dist/chunk-3wezvz6m.js +0 -2
  158. package/dist/chunk-5402rpwg.js +0 -2
  159. package/dist/chunk-58ymq1h4.js +0 -2
  160. package/dist/chunk-5rtbs8zv.js +0 -2
  161. package/dist/chunk-5tx1wqns.js +0 -2
  162. package/dist/chunk-6fw3rfcj.js +0 -2
  163. package/dist/chunk-6nfecsbt.js +0 -2
  164. package/dist/chunk-6sw7sxh2.js +0 -17
  165. package/dist/chunk-7qbv0xh6.js +0 -2
  166. package/dist/chunk-7vdsd9rn.js +0 -2
  167. package/dist/chunk-8gk34047.js +0 -2
  168. package/dist/chunk-8nsfkr5n.js +0 -2
  169. package/dist/chunk-90562q79.js +0 -3
  170. package/dist/chunk-a1dggchm.js +0 -2
  171. package/dist/chunk-a1kv42kp.js +0 -2
  172. package/dist/chunk-a5695s8k.js +0 -2
  173. package/dist/chunk-avjgetkh.js +0 -2
  174. package/dist/chunk-bcgth8qf.js +0 -2
  175. package/dist/chunk-bemksdz5.js +0 -33
  176. package/dist/chunk-br3ktpyq.js +0 -2
  177. package/dist/chunk-by1s70jp.js +0 -2
  178. package/dist/chunk-cwc3p6p7.js +0 -2
  179. package/dist/chunk-e593pr1r.js +0 -2
  180. package/dist/chunk-e8y69gg0.js +0 -2
  181. package/dist/chunk-eam7eann.js +0 -2
  182. package/dist/chunk-ej7m406s.js +0 -2
  183. package/dist/chunk-es85mgdw.js +0 -2
  184. package/dist/chunk-fa5x9zbk.js +0 -2
  185. package/dist/chunk-fkrzsk74.js +0 -2
  186. package/dist/chunk-fm3k5v8s.js +0 -2
  187. package/dist/chunk-fmc9fj4a.js +0 -2
  188. package/dist/chunk-fn863yek.js +0 -2
  189. package/dist/chunk-fv30avp2.js +0 -2
  190. package/dist/chunk-gpmk4s4f.js +0 -2
  191. package/dist/chunk-hd64hz1n.js +0 -2
  192. package/dist/chunk-hd75916k.js +0 -4
  193. package/dist/chunk-hz6a476h.js +0 -2
  194. package/dist/chunk-j7zywbq0.js +0 -4
  195. package/dist/chunk-jjm3754f.js +0 -2
  196. package/dist/chunk-ktk30f6d.js +0 -2
  197. package/dist/chunk-m3f50p6c.js +0 -2
  198. package/dist/chunk-m90a5dpn.js +0 -2
  199. package/dist/chunk-mmp7x8f0.js +0 -2
  200. package/dist/chunk-nqcg2bf0.js +0 -2
  201. package/dist/chunk-nrp8qg9j.js +0 -2831
  202. package/dist/chunk-ns7e951g.js +0 -2
  203. package/dist/chunk-nycvwnty.js +0 -2
  204. package/dist/chunk-p9shre7t.js +0 -2
  205. package/dist/chunk-pe9hxhrb.js +0 -2
  206. package/dist/chunk-ph6xg67j.js +0 -11
  207. package/dist/chunk-qewxfhex.js +0 -2
  208. package/dist/chunk-qfrg8mnf.js +0 -2
  209. package/dist/chunk-rmnhy5az.js +0 -2
  210. package/dist/chunk-t6m5wmpy.js +0 -2
  211. package/dist/chunk-v404gvm0.js +0 -2
  212. package/dist/chunk-vgvsefz8.js +0 -2
  213. package/dist/chunk-w9k7pvre.js +0 -2
  214. package/dist/chunk-wf09xg7j.js +0 -2
  215. package/dist/chunk-wgqt5pnv.js +0 -2
  216. package/dist/chunk-wr3h8dmt.js +0 -2
  217. package/dist/chunk-wtqjfar3.js +0 -2
  218. package/dist/chunk-x1xncm97.js +0 -2
  219. package/dist/chunk-yd50awqp.js +0 -3
  220. package/dist/chunk-ykxd78b2.js +0 -2
  221. package/dist/chunk-yqsza22w.js +0 -3
  222. package/dist/chunk-zj80vrv6.js +0 -2
@@ -1,7 +1,7 @@
1
1
  // @bun
2
- import{$t,S}from"./chunk-jwpcck1b.js";import m from"fs";import e from"path";async function an(r,o,i){if(r.__stx_runtime_config)return;let n=$t();if(n||i){r.__stx_runtime_config=n??S(i);return}let t=e.dirname(e.resolve(o));while(!0){if(["stx.config.ts","stx.config.js",".config/stx.config.ts",".config/stx.config.js"].some((f)=>m.existsSync(e.join(t,f)))){let{loadStxConfig:f}=await import("./chunk-x1xncm97.js"),c=await f(t);if(c.runtimeConfig)r.__stx_runtime_config=S(c.runtimeConfig);return}let s=e.dirname(t);if(s===t)return;t=s}}async function vs(r,o){function i(n){if(n===null)return"null";if(Array.isArray(n))return`Array<${n.length?[...new Set(n.map(i))].join(" | "):"unknown"}>`;if(typeof n==="object")return`{ ${Object.entries(n).map(([t,s])=>`readonly ${JSON.stringify(t)}: ${i(s)}`).join("; ")} }`;return typeof n}await Bun.write(e.join(r,".stx/runtime-config.d.ts"),`import '@stacksjs/stx/runtime-config'
2
+ import{Et,C}from"./chunk-zydg3wgt.js";import m from"fs";import e from"path";async function cn(r,o,i){if(r.__stx_runtime_config)return;let n=Et();if(n||i){r.__stx_runtime_config=n??C(i);return}let t=e.dirname(e.resolve(o));while(!0){if(["stx.config.ts","stx.config.js",".config/stx.config.ts",".config/stx.config.js"].some((f)=>m.existsSync(e.join(t,f)))){let{loadStxConfig:f}=await import("./chunk-3227dnct.js"),c=await f(t);if(c.runtimeConfig)r.__stx_runtime_config=C(c.runtimeConfig);return}let s=e.dirname(t);if(s===t)return;t=s}}async function xs(r,o){function i(n){if(n===null)return"null";if(Array.isArray(n))return`Array<${n.length?[...new Set(n.map(i))].join(" | "):"unknown"}>`;if(typeof n==="object")return`{ ${Object.entries(n).map(([t,s])=>`readonly ${JSON.stringify(t)}: ${i(s)}`).join("; ")} }`;return typeof n}await Bun.write(e.join(r,".stx/runtime-config.d.ts"),`import '@stacksjs/stx/runtime-config'
3
3
  declare module '@stacksjs/stx/runtime-config' { interface PublicRuntimeConfig ${i(o.public??{})} }
4
4
  `),await Bun.write(e.join(r,".stx/runtime-config-server.d.ts"),`import '@stacksjs/stx/runtime-config-server'
5
5
  declare module '@stacksjs/stx/runtime-config-server' { interface PrivateRuntimeConfig ${i(o.private??{})} }
6
6
  `)}
7
- export{an,vs};
7
+ export{cn,xs};
@@ -1,5 +1,5 @@
1
1
  // @bun
2
- function m(e,t={}){return{enterFrom:t.enterClass||`${e}-enter-from`,enterActive:t.enterActiveClass||`${e}-enter-active`,enterTo:t.enterToClass||`${e}-enter-to`,leaveFrom:t.leaveClass||`${e}-leave-from`,leaveActive:t.leaveActiveClass||`${e}-leave-active`,leaveTo:t.leaveToClass||`${e}-leave-to`}}function u(e){let t=getComputedStyle(e),o=t.transitionDuration||"0s",n=t.animationDuration||"0s",s=(a)=>{let i=a.match(/^([\d.]+)(s|ms)?$/);if(!i)return 0;let r=parseFloat(i[1]);return(i[2]||"s")==="ms"?r:r*1000};return Math.max(s(o),s(n))}function v(e,t){return new Promise((o)=>{let n=t??u(e);if(n===0){o();return}let s=!1,a=()=>{if(s)return;s=!0,e.removeEventListener("transitionend",i),e.removeEventListener("animationend",i),o()},i=(r)=>{if(r.target===e)a()};e.addEventListener("transitionend",i),e.addEventListener("animationend",i),setTimeout(a,n+50)})}function f(e){e.offsetHeight}async function xl(e,t={}){let o=t.name||"stx",n=m(o,t),s=typeof t.duration==="object"?t.duration.enter:t.duration;if(t.onBeforeEnter?.(e),e.classList.add(n.enterFrom),e.classList.add(n.enterActive),f(e),e.classList.remove(n.enterFrom),e.classList.add(n.enterTo),t.onEnter)await new Promise((a)=>{t.onEnter(e,a)});else await v(e,s);e.classList.remove(n.enterActive),e.classList.remove(n.enterTo),t.onAfterEnter?.(e)}async function Sl(e,t={}){let o=t.name||"stx",n=m(o,t),s=typeof t.duration==="object"?t.duration.leave:t.duration;if(t.onBeforeLeave?.(e),e.classList.add(n.leaveFrom),e.classList.add(n.leaveActive),f(e),e.classList.remove(n.leaveFrom),e.classList.add(n.leaveTo),t.onLeave)await new Promise((a)=>{t.onLeave(e,a)});else await v(e,s);e.classList.remove(n.leaveActive),e.classList.remove(n.leaveTo),t.onAfterLeave?.(e)}function kl(e,t={},o){let n=/@transition\s*\(([^)]*)\)([\s\S]*?)@endtransition/gi;return e.replace(n,(s,a,i)=>{let r=p(a),l=r.name||"stx",c=r.duration||300,d=`stx-transition-${Math.random().toString(36).slice(2,9)}`;return`
2
+ function m(e,t={}){return{enterFrom:t.enterClass||`${e}-enter-from`,enterActive:t.enterActiveClass||`${e}-enter-active`,enterTo:t.enterToClass||`${e}-enter-to`,leaveFrom:t.leaveClass||`${e}-leave-from`,leaveActive:t.leaveActiveClass||`${e}-leave-active`,leaveTo:t.leaveToClass||`${e}-leave-to`}}function u(e){let t=getComputedStyle(e),o=t.transitionDuration||"0s",n=t.animationDuration||"0s",s=(a)=>{let i=a.match(/^([\d.]+)(s|ms)?$/);if(!i)return 0;let r=parseFloat(i[1]);return(i[2]||"s")==="ms"?r:r*1000};return Math.max(s(o),s(n))}function v(e,t){return new Promise((o)=>{let n=t??u(e);if(n===0){o();return}let s=!1,a=()=>{if(s)return;s=!0,e.removeEventListener("transitionend",i),e.removeEventListener("animationend",i),o()},i=(r)=>{if(r.target===e)a()};e.addEventListener("transitionend",i),e.addEventListener("animationend",i),setTimeout(a,n+50)})}function f(e){e.offsetHeight}async function Sl(e,t={}){let o=t.name||"stx",n=m(o,t),s=typeof t.duration==="object"?t.duration.enter:t.duration;if(t.onBeforeEnter?.(e),e.classList.add(n.enterFrom),e.classList.add(n.enterActive),f(e),e.classList.remove(n.enterFrom),e.classList.add(n.enterTo),t.onEnter)await new Promise((a)=>{t.onEnter(e,a)});else await v(e,s);e.classList.remove(n.enterActive),e.classList.remove(n.enterTo),t.onAfterEnter?.(e)}async function kl(e,t={}){let o=t.name||"stx",n=m(o,t),s=typeof t.duration==="object"?t.duration.leave:t.duration;if(t.onBeforeLeave?.(e),e.classList.add(n.leaveFrom),e.classList.add(n.leaveActive),f(e),e.classList.remove(n.leaveFrom),e.classList.add(n.leaveTo),t.onLeave)await new Promise((a)=>{t.onLeave(e,a)});else await v(e,s);e.classList.remove(n.leaveActive),e.classList.remove(n.leaveTo),t.onAfterLeave?.(e)}function Cl(e,t={},o){let n=/@transition\s*\(([^)]*)\)([\s\S]*?)@endtransition/gi;return e.replace(n,(s,a,i)=>{let r=p(a),l=r.name||"stx",c=r.duration||300,d=`stx-transition-${Math.random().toString(36).slice(2,9)}`;return`
3
3
  <div
4
4
  class="stx-transition-wrapper"
5
5
  data-transition="${l}"
@@ -41,7 +41,7 @@ function m(e,t={}){return{enterFrom:t.enterClass||`${e}-enter-from`,enterActive:
41
41
  });
42
42
  })();
43
43
  </script>
44
- `})}function p(e){let t={},o=/(\w+)\s*:\s*(?:'([^']*)'|"([^"]*)"|(\d+)|(\w+))/g,n;while((n=o.exec(e))!==null){let s=n[1],a=n[2]||n[3]||n[4]||n[5];switch(s){case"name":t.name=a;break;case"duration":t.duration=parseInt(a,10);break;case"mode":t.mode=a;break;case"easing":t.easing=a;break}}return t}function Cl(){return`
44
+ `})}function p(e){let t={},o=/(\w+)\s*:\s*(?:'([^']*)'|"([^"]*)"|(\d+)|(\w+))/g,n;while((n=o.exec(e))!==null){let s=n[1],a=n[2]||n[3]||n[4]||n[5];switch(s){case"name":t.name=a;break;case"duration":t.duration=parseInt(a,10);break;case"mode":t.mode=a;break;case"easing":t.easing=a;break}}return t}function $l(){return`
45
45
  /* STX Transition Presets */
46
46
 
47
47
  /* Fade */
@@ -228,7 +228,7 @@ function m(e,t={}){return{enterFrom:t.enterClass||`${e}-enter-from`,enterActive:
228
228
  opacity: 1;
229
229
  max-height: 1000px;
230
230
  }
231
- `}function $l(){return`
231
+ `}function El(){return`
232
232
  // STX Transition Runtime
233
233
  (function() {
234
234
  if (typeof window === 'undefined') return;
@@ -317,5 +317,5 @@ else {
317
317
 
318
318
  console.log('[stx] Transition runtime initialized');
319
319
  })();
320
- `}function El(e){let t=/@transition\.([a-z-]+)(?:\.(\d+))?="([^"]+)"/gi;return e.replace(t,(o,n,s,a)=>{let i=s||"300",r=`stx-t-${Math.random().toString(36).slice(2,7)}`;return`data-stx-transition="${n}" data-stx-transition-duration="${i}" data-stx-transition-condition="${a}" data-stx-transition-id="${r}"`})}
321
- export{xl,Sl,kl,Cl,$l,El};
320
+ `}function Tl(e){let t=/@transition\.([a-z-]+)(?:\.(\d+))?="([^"]+)"/gi;return e.replace(t,(o,n,s,a)=>{let i=s||"300",r=`stx-t-${Math.random().toString(36).slice(2,7)}`;return`data-stx-transition="${n}" data-stx-transition-duration="${i}" data-stx-transition-condition="${a}" data-stx-transition-id="${r}"`})}
321
+ export{Sl,kl,Cl,$l,El,Tl};
@@ -1,5 +1,5 @@
1
1
  // @bun
2
- import{oe,pt,Fr}from"./chunk-9ndzk9r4.js";function An(e,a){let t=e.pwa;if(!t?.enabled)return"";let c=t.serviceWorker||{},d=t.routes||[],i=c.cacheVersion||"1.0.0",o=t.offline,l=o?.page?"/offline.html":"/offline.html",{push:r,backgroundSync:s,cacheStorage:n}=t,u=a?oe(a,e):null,h=u?pt(u):"[]",f=["/","/manifest.json",...o?.enabled?[l]:[],...o?.precacheAssets||[]];return`/**
2
+ import{oe,ft,zr}from"./chunk-vg7wfkt5.js";function Pn(e,a){let t=e.pwa;if(!t?.enabled)return"";let c=t.serviceWorker||{},d=t.routes||[],i=c.cacheVersion||"1.0.0",o=t.offline,l=o?.page?"/offline.html":"/offline.html",{push:r,backgroundSync:s,cacheStorage:n}=t,u=a?oe(a,e):null,h=u?ft(u):"[]",f=["/","/manifest.json",...o?.enabled?[l]:[],...o?.precacheAssets||[]];return`/**
3
3
  * Service Worker - Auto-generated by stx
4
4
  * Cache Version: ${i}
5
5
  *
@@ -13,7 +13,7 @@ import{oe,pt,Fr}from"./chunk-9ndzk9r4.js";function An(e,a){let t=e.pwa;if(!t?.en
13
13
  * Additional features:
14
14
  * - Push notifications: ${r?.enabled?"enabled":"disabled"}
15
15
  * - Background sync: ${s?.enabled?"enabled":"disabled"}
16
- * - Cache limits: ${n?.maxSize?`${Fr(n.maxSize*1024*1024)}`:"unlimited"}
16
+ * - Cache limits: ${n?.maxSize?`${zr(n.maxSize*1024*1024)}`:"unlimited"}
17
17
  */
18
18
 
19
19
  const CACHE_VERSION = '${i}';
@@ -825,5 +825,5 @@ self.addEventListener('message', (event) => {
825
825
  event.waitUntil(registerFormSync(event.data.payload));
826
826
  }
827
827
  });
828
- `}function Ie(e){return e.pwa?.serviceWorker?.fileName||"sw.js"}function Do(e){return e.pwa?.enabled===!0&&e.pwa?.serviceWorker?.useWorkbox===!0}function Oa(e,a){if(!e.pwa?.enabled)return"";if(Do(e)){let{generateWorkboxServiceWorker:t}=import.meta.require("./chunk-538h1sfc.js");return t(e,a)}return An(e,a)}
829
- export{An,Ie,Do,Oa};
828
+ `}function Ie(e){return e.pwa?.serviceWorker?.fileName||"sw.js"}function Oo(e){return e.pwa?.enabled===!0&&e.pwa?.serviceWorker?.useWorkbox===!0}function Ma(e,a){if(!e.pwa?.enabled)return"";if(Oo(e)){let{generateWorkboxServiceWorker:t}=import.meta.require("./chunk-f4c39nfh.js");return t(e,a)}return Pn(e,a)}
829
+ export{Pn,Ie,Oo,Ma};
@@ -0,0 +1,2 @@
1
+ // @bun
2
+ import{Me,Ga,Cu,$u,Eu,Tu,Ja,Ya,_u,Ru,Ho,Au,Qt,en,Mn}from"./chunk-n38wvr7z.js";import"./chunk-bq2e9qf6.js";import"./chunk-8xz8t9xp.js";import"./chunk-0trfbqa7.js";import"./chunk-br1gra4w.js";import"./chunk-zydg3wgt.js";import"./chunk-4fa3jec9.js";import"./chunk-exgyf65a.js";import"./chunk-r6pax860.js";import"./chunk-h9e032kq.js";import"./chunk-w1zvh5y7.js";import"./chunk-nmf12mx3.js";import"./chunk-jz7pvh7b.js";export{Tu as __setSignalsGeneratorsForTest,Me as cacheEngineFingerprint,en as cacheTemplate,Qt as checkCache,Au as clearDevCaches,Ya as getCachedRouterScript,Ja as getCachedSignalsRuntime,_u as getServeClientAsset,Ho as getServeModuleBundle,Mn as hashFilePath,$u as invalidateFileCache,Eu as invalidateFileCacheByDir,Cu as readFileCached,Ru as registerServeModuleBundle,Ga as templateCache};
@@ -1,5 +1,5 @@
1
1
  // @bun
2
- import{Eo}from"./chunk-vraddzkf.js";import{u}from"./chunk-cg8hg6cs.js";var au=`
2
+ import{To}from"./chunk-jepq6316.js";import{u}from"./chunk-cg8hg6cs.js";var cu=`
3
3
  <script>
4
4
  (function() {
5
5
  'use strict';
@@ -465,7 +465,7 @@ else if (data.type === 'event' && data.method) {
465
465
  }
466
466
  })();
467
467
  </script>
468
- `;function yo(e={}){let{debug:r=!1,timeout:a=30000}=e;return`
468
+ `;function bo(e={}){let{debug:r=!1,timeout:a=30000}=e;return`
469
469
  <script>
470
470
  (function() {
471
471
  'use strict';
@@ -931,9 +931,9 @@ else if (data.type === 'event' && data.method) {
931
931
  }
932
932
  })();
933
933
  </script>
934
- `.replace("debug: false,",`debug: ${r},`).replace("timeout: 30000",`timeout: ${a}`)}function cu(){return!1}function lu(e,r={}){let a=/@craft(?:\(([\s\S]*?)\))?/g;return e.replace(a,(i,s)=>{let t={};if(s)try{t=JSON.parse(s.replace(/'/g,'"'))}catch{try{t=Function(`return ${s}`)()}catch{console.warn(`[stx] Invalid @craft config: ${s}`)}}return yo(t)})}function bo(e,r={}){if(e.includes("__craftBridgeInitialized"))return e;let a=yo(r);if(e.includes("</head>"))return e.replace("</head>",`${a}
934
+ `.replace("debug: false,",`debug: ${r},`).replace("timeout: 30000",`timeout: ${a}`)}function lu(){return!1}function uu(e,r={}){let a=/@craft(?:\(([\s\S]*?)\))?/g;return e.replace(a,(i,s)=>{let t={};if(s)try{t=JSON.parse(s.replace(/'/g,'"'))}catch{try{t=Function(`return ${s}`)()}catch{console.warn(`[stx] Invalid @craft config: ${s}`)}}return bo(t)})}function wo(e,r={}){if(e.includes("__craftBridgeInitialized"))return e;let a=bo(r);if(e.includes("</head>"))return e.replace("</head>",`${a}
935
935
  </head>`);if(e.includes("<body"))return e.replace(/(<body[^>]*>)/,`$1
936
- ${a}`);return a+e}var Lr={button:{nativeType:"craft-button",fallbackTag:"button",fallbackClasses:"craft-button",nativeProps:["variant","size","disabled","loading"]},"text-input":{nativeType:"craft-text-input",fallbackTag:"input",fallbackClasses:"craft-text-input",nativeProps:["placeholder","value","type","disabled","readonly"]},textarea:{nativeType:"craft-textarea",fallbackTag:"textarea",fallbackClasses:"craft-textarea",nativeProps:["placeholder","value","rows","disabled","readonly"]},checkbox:{nativeType:"craft-checkbox",fallbackTag:"input",fallbackClasses:"craft-checkbox",nativeProps:["checked","disabled","label"],render:(e,r)=>{let a=e.checked?"checked":"",i=e.disabled?"disabled":"";return`<label class="craft-checkbox-wrapper">
936
+ ${a}`);return a+e}var jr={button:{nativeType:"craft-button",fallbackTag:"button",fallbackClasses:"craft-button",nativeProps:["variant","size","disabled","loading"]},"text-input":{nativeType:"craft-text-input",fallbackTag:"input",fallbackClasses:"craft-text-input",nativeProps:["placeholder","value","type","disabled","readonly"]},textarea:{nativeType:"craft-textarea",fallbackTag:"textarea",fallbackClasses:"craft-textarea",nativeProps:["placeholder","value","rows","disabled","readonly"]},checkbox:{nativeType:"craft-checkbox",fallbackTag:"input",fallbackClasses:"craft-checkbox",nativeProps:["checked","disabled","label"],render:(e,r)=>{let a=e.checked?"checked":"",i=e.disabled?"disabled":"";return`<label class="craft-checkbox-wrapper">
937
937
  <input type="checkbox" class="craft-checkbox" ${a} ${i}>
938
938
  <span class="craft-checkbox-label">${r||e.label||""}</span>
939
939
  </label>`}},radio:{nativeType:"craft-radio",fallbackTag:"input",fallbackClasses:"craft-radio",nativeProps:["checked","disabled","name","value","label"]},select:{nativeType:"craft-select",fallbackTag:"select",fallbackClasses:"craft-select",nativeProps:["value","disabled","options","placeholder"]},slider:{nativeType:"craft-slider",fallbackTag:"input",fallbackClasses:"craft-slider",nativeProps:["value","min","max","step","disabled"],render:(e,r)=>{let a=e.min??0,i=e.max??100,s=e.step??1,t=e.value??50,n=e.disabled?"disabled":"";return`<input type="range" class="craft-slider" min="${a}" max="${i}" step="${s}" value="${t}" ${n}>`}},label:{nativeType:"craft-label",fallbackTag:"span",fallbackClasses:"craft-label",nativeProps:["text","for"]},badge:{nativeType:"craft-badge",fallbackTag:"span",fallbackClasses:"craft-badge",nativeProps:["variant","size"]},avatar:{nativeType:"craft-avatar",fallbackTag:"div",fallbackClasses:"craft-avatar",nativeProps:["src","alt","size","fallback"],render:(e,r)=>{let a=e.size||40,i=e.src,s=String(e.alt||""),t=e.fallback||(s?s.charAt(0).toUpperCase():"?");if(i)return`<img class="craft-avatar" src="${i}" alt="${s}" style="width:${a}px;height:${a}px;border-radius:50%">`;return`<div class="craft-avatar craft-avatar-fallback" style="width:${a}px;height:${a}px;border-radius:50%;display:flex;align-items:center;justify-content:center">${t}</div>`}},progress:{nativeType:"craft-progress",fallbackTag:"div",fallbackClasses:"craft-progress",nativeProps:["value","max","variant"],render:(e,r)=>{let a=Number(e.value)||0,i=Number(e.max)||100;return`<div class="craft-progress"><div class="craft-progress-bar" style="width:${Math.min(100,Math.max(0,a/i*100))}%"></div></div>`}},spinner:{nativeType:"craft-spinner",fallbackTag:"div",fallbackClasses:"craft-spinner",nativeProps:["size"],render:(e,r)=>{let a=e.size||24;return`<div class="craft-spinner" style="width:${a}px;height:${a}px"></div>`}},card:{nativeType:"craft-card",fallbackTag:"div",fallbackClasses:"craft-card",nativeProps:["title","subtitle","variant"]},modal:{nativeType:"craft-modal",fallbackTag:"dialog",fallbackClasses:"craft-modal",nativeProps:["open","title","closable","size"],render:(e,r)=>{let a=e.open?"open":"",i=e.title||"";return`<dialog class="craft-modal" ${a}>
@@ -947,7 +947,7 @@ ${a}`);return a+e}var Lr={button:{nativeType:"craft-button",fallbackTag:"button"
947
947
  </details>`}},divider:{nativeType:"craft-divider",fallbackTag:"hr",fallbackClasses:"craft-divider",nativeProps:["orientation","variant"]},table:{nativeType:"craft-table",fallbackTag:"table",fallbackClasses:"craft-table",nativeProps:["columns","rows","sortable","selectable"]},list:{nativeType:"craft-list",fallbackTag:"ul",fallbackClasses:"craft-list",nativeProps:["items","selectable"]},tree:{nativeType:"craft-tree",fallbackTag:"div",fallbackClasses:"craft-tree",nativeProps:["nodes","expandable","selectable"]},alert:{nativeType:"craft-alert",fallbackTag:"div",fallbackClasses:"craft-alert",nativeProps:["variant","title","dismissible"],render:(e,r)=>{let a=e.variant||"info",i=e.title||"";return`<div class="craft-alert craft-alert-${a}" role="alert">
948
948
  ${i?`<div class="craft-alert-title">${i}</div>`:""}
949
949
  <div class="craft-alert-content">${r}</div>
950
- </div>`}},toast:{nativeType:"craft-toast",fallbackTag:"div",fallbackClasses:"craft-toast",nativeProps:["variant","duration","position"]},tooltip:{nativeType:"craft-tooltip",fallbackTag:"span",fallbackClasses:"craft-tooltip",nativeProps:["content","position"],render:(e,r)=>{let a=e.content||"",i=e.position||"top";return`<span class="craft-tooltip" data-tooltip="${a}" data-position="${i}">${r}</span>`}},menu:{nativeType:"craft-menu",fallbackTag:"nav",fallbackClasses:"craft-menu",nativeProps:["items","orientation"]},breadcrumb:{nativeType:"craft-breadcrumb",fallbackTag:"nav",fallbackClasses:"craft-breadcrumb",nativeProps:["items","separator"]},sidebar:{nativeType:"craft-sidebar",fallbackTag:"aside",fallbackClasses:"craft-sidebar craft-sidebar-tahoe",nativeProps:["id","variant","material","backgroundEffect","allowsVibrancy","materialOpacity","materialDarkOpacity","minWidth","maxWidth","canCollapse","searchPlaceholder","selectedItem","sections","spaces","selectedSpace"],render:j},"sidebar-space":{nativeType:"craft-sidebar-space",fallbackTag:"section",fallbackClasses:"craft-sidebar-space",nativeProps:["id","label","icon","tint"],render:H},"sidebar-section":{nativeType:"craft-sidebar-section",fallbackTag:"section",fallbackClasses:"craft-sidebar-section",nativeProps:["id","title","header"],render:V},"sidebar-item":{nativeType:"craft-sidebar-item",fallbackTag:"button",fallbackClasses:"craft-sidebar-item",nativeProps:["id","label","icon","badge","tintColor"],render:W},pagination:{nativeType:"craft-pagination",fallbackTag:"nav",fallbackClasses:"craft-pagination",nativeProps:["total","page","pageSize"]},"code-editor":{nativeType:"craft-code-editor",fallbackTag:"textarea",fallbackClasses:"craft-code-editor",nativeProps:["value","language","theme","readonly","lineNumbers"]},"file-browser":{nativeType:"craft-file-browser",fallbackTag:"div",fallbackClasses:"craft-file-browser",nativeProps:["path","showHidden","selectable"]},"color-picker":{nativeType:"craft-color-picker",fallbackTag:"input",fallbackClasses:"craft-color-picker",nativeProps:["value","format"],render:(e,r)=>`<input type="color" class="craft-color-picker" value="${e.value||"#000000"}">`},"date-picker":{nativeType:"craft-date-picker",fallbackTag:"input",fallbackClasses:"craft-date-picker",nativeProps:["value","min","max","format"],render:(e,r)=>{let a=e.value||"",i=e.min||"",s=e.max||"";return`<input type="date" class="craft-date-picker" value="${a}" min="${i}" max="${s}">`}},"time-picker":{nativeType:"craft-time-picker",fallbackTag:"input",fallbackClasses:"craft-time-picker",nativeProps:["value","min","max","step"],render:(e,r)=>`<input type="time" class="craft-time-picker" value="${e.value||""}">`}},wo=`
950
+ </div>`}},toast:{nativeType:"craft-toast",fallbackTag:"div",fallbackClasses:"craft-toast",nativeProps:["variant","duration","position"]},tooltip:{nativeType:"craft-tooltip",fallbackTag:"span",fallbackClasses:"craft-tooltip",nativeProps:["content","position"],render:(e,r)=>{let a=e.content||"",i=e.position||"top";return`<span class="craft-tooltip" data-tooltip="${a}" data-position="${i}">${r}</span>`}},menu:{nativeType:"craft-menu",fallbackTag:"nav",fallbackClasses:"craft-menu",nativeProps:["items","orientation"]},breadcrumb:{nativeType:"craft-breadcrumb",fallbackTag:"nav",fallbackClasses:"craft-breadcrumb",nativeProps:["items","separator"]},sidebar:{nativeType:"craft-sidebar",fallbackTag:"aside",fallbackClasses:"craft-sidebar craft-sidebar-tahoe",nativeProps:["id","variant","material","backgroundEffect","allowsVibrancy","materialOpacity","materialDarkOpacity","minWidth","maxWidth","canCollapse","searchPlaceholder","selectedItem","sections","spaces","selectedSpace"],render:j},"sidebar-space":{nativeType:"craft-sidebar-space",fallbackTag:"section",fallbackClasses:"craft-sidebar-space",nativeProps:["id","label","icon","tint"],render:H},"sidebar-section":{nativeType:"craft-sidebar-section",fallbackTag:"section",fallbackClasses:"craft-sidebar-section",nativeProps:["id","title","header"],render:V},"sidebar-item":{nativeType:"craft-sidebar-item",fallbackTag:"button",fallbackClasses:"craft-sidebar-item",nativeProps:["id","label","icon","badge","tintColor"],render:W},pagination:{nativeType:"craft-pagination",fallbackTag:"nav",fallbackClasses:"craft-pagination",nativeProps:["total","page","pageSize"]},"code-editor":{nativeType:"craft-code-editor",fallbackTag:"textarea",fallbackClasses:"craft-code-editor",nativeProps:["value","language","theme","readonly","lineNumbers"]},"file-browser":{nativeType:"craft-file-browser",fallbackTag:"div",fallbackClasses:"craft-file-browser",nativeProps:["path","showHidden","selectable"]},"color-picker":{nativeType:"craft-color-picker",fallbackTag:"input",fallbackClasses:"craft-color-picker",nativeProps:["value","format"],render:(e,r)=>`<input type="color" class="craft-color-picker" value="${e.value||"#000000"}">`},"date-picker":{nativeType:"craft-date-picker",fallbackTag:"input",fallbackClasses:"craft-date-picker",nativeProps:["value","min","max","format"],render:(e,r)=>{let a=e.value||"",i=e.min||"",s=e.max||"";return`<input type="date" class="craft-date-picker" value="${a}" min="${i}" max="${s}">`}},"time-picker":{nativeType:"craft-time-picker",fallbackTag:"input",fallbackClasses:"craft-time-picker",nativeProps:["value","min","max","step"],render:(e,r)=>`<input type="time" class="craft-time-picker" value="${e.value||""}">`}},vo=`
951
951
  <style id="craft-component-styles">
952
952
  /* Craft Component Base Styles */
953
953
  .craft-button {
@@ -1365,7 +1365,7 @@ ${a}`);return a+e}var Lr={button:{nativeType:"craft-button",fallbackTag:"button"
1365
1365
  }
1366
1366
  }
1367
1367
  </style>
1368
- `,uu=`
1368
+ `,du=`
1369
1369
  <script id="craft-component-runtime">
1370
1370
  (function() {
1371
1371
  if (window.__stxCraftComponentRuntime) return;
@@ -1469,7 +1469,7 @@ ${a}`);return a+e}var Lr={button:{nativeType:"craft-button",fallbackTag:"button"
1469
1469
  document.addEventListener('craft:nativeui:ready', initializeCraftComponents);
1470
1470
  })();
1471
1471
  </script>
1472
- `;function vo(e,r={}){let{classPrefix:a="craft"}=r;if(!e.includes("craft-component-styles"))if(e.includes("</head>"))e=e.replace("</head>",`${`
1472
+ `;function xo(e,r={}){let{classPrefix:a="craft"}=r;if(!e.includes("craft-component-styles"))if(e.includes("</head>"))e=e.replace("</head>",`${`
1473
1473
  <style id="craft-component-styles">
1474
1474
  /* Craft Component Base Styles */
1475
1475
  .craft-button {
@@ -2934,7 +2934,7 @@ ${a}`);return a+e}var Lr={button:{nativeType:"craft-button",fallbackTag:"button"
2934
2934
  document.addEventListener('craft:nativeui:ready', initializeCraftComponents);
2935
2935
  })();
2936
2936
  </script>
2937
- `;return e=e.replace(/<@craft-sidebar(?![-\w])\s*([^>]*)>([\s\S]*?)<\/@craft-sidebar>/g,(i,s,t)=>R("sidebar",s,t.trim(),r,a)),e=e.replace(/<@craft-sidebar(?![-\w])\s*([^>]*?)\/>/g,(i,s)=>R("sidebar",s,"",r,a)),e=e.replace(/<@craft-(\w+[-\w]*)\s*([^>]*?)\/>/g,(i,s,t)=>R(s,t,"",r,a)),e=e.replace(/<@craft-(\w+[-\w]*)\s*([^>]*)>([\s\S]*?)<\/@craft-\1>/g,(i,s,t,n)=>R(s,t,n.trim(),r,a)),e}function R(e,r,a,i,s){let t=i.components?.[e]||Lr[e];if(!t)return console.warn(`[stx] Unknown Craft component: @craft-${e}`),`<div class="${s}-unknown" data-component="${e}">${a}</div>`;let n=A(r),c=[t.fallbackClasses||`${s}-${e}`];if(n.class)c.push(n.class),delete n.class;if(t.render)return n.__fallbackClasses=c.join(" "),t.render(n,a);let d=ee(n,t,c);if(["input","hr","br","img"].includes(t.fallbackTag))return`<${t.fallbackTag} ${d}>`;return`<${t.fallbackTag} ${d}>${a}</${t.fallbackTag}>`}function A(e){let r={},a=/(?::|@)?(\w+[-\w]*)(?:=(?:"([^"]*)"|'([^']*)'))?/g,i;while((i=a.exec(e))!==null){let[s,t,n,c]=i,d=n??c;if(s.startsWith(":"))r[t]=d;else if(s.startsWith("@"))r[`on${t.charAt(0).toUpperCase()}${t.slice(1)}`]=d;else if(d===void 0)r[t]=!0;else r[t]=d}return r}function j(e,r){let a=I(String(e.id||`craft-sidebar-${K(r||JSON.stringify(e))}`)),i=Q(e.spaces)||Y(r),s=i.length?[]:X(e.sections)||F(r),t=String(e.selectedSpace||i[0]?.id||""),n=i.find((g)=>g.id===t)||i[0],c=String(e.selectedItem||e.selected||(i.length?n?.sections[0]?.items[0]?.id:s[0]?.items[0]?.id)||""),d={id:a,variant:String(e.variant||"desktop"),material:String(e.material||"sidebar"),backgroundEffect:String(e.backgroundEffect||"shimmer"),allowsVibrancy:e.allowsVibrancy!==!1&&e.allowsVibrancy!=="false",materialOpacity:Number(e.materialOpacity??0.68),materialDarkOpacity:e.materialDarkOpacity===void 0?void 0:Number(e.materialDarkOpacity),minWidth:e.minWidth===void 0?240:Number(e.minWidth),maxWidth:e.maxWidth===void 0?340:Number(e.maxWidth),canCollapse:e.canCollapse!==!1&&e.canCollapse!=="false",searchPlaceholder:e.searchPlaceholder?String(e.searchPlaceholder):void 0,selectedItem:c,sections:s,spaces:i,selectedSpace:t||void 0},l=String(e.__fallbackClasses||"craft-sidebar craft-sidebar-tahoe"),p=Number(e.width||e.sidebarWidth||286),f=e.native===!1||e.native==="false"?"false":"true",x=d.searchPlaceholder?`<div class="craft-sidebar-search"><input type="search" placeholder="${C(d.searchPlaceholder)}"></div>`:"",b;if(i.length)b=G(i,t,c);else if(s.length)b=s.map((g)=>D(g,c)).join("");else b=r;return`<aside class="${h(l)}" data-craft="craft-sidebar" data-craft-native-sidebar data-craft-sidebar-id="${h(a)}" data-native="${f}" style="--craft-sidebar-width:${p}px">
2937
+ `;return e=e.replace(/<@craft-sidebar(?![-\w])\s*([^>]*)>([\s\S]*?)<\/@craft-sidebar>/g,(i,s,t)=>R("sidebar",s,t.trim(),r,a)),e=e.replace(/<@craft-sidebar(?![-\w])\s*([^>]*?)\/>/g,(i,s)=>R("sidebar",s,"",r,a)),e=e.replace(/<@craft-(\w+[-\w]*)\s*([^>]*?)\/>/g,(i,s,t)=>R(s,t,"",r,a)),e=e.replace(/<@craft-(\w+[-\w]*)\s*([^>]*)>([\s\S]*?)<\/@craft-\1>/g,(i,s,t,n)=>R(s,t,n.trim(),r,a)),e}function R(e,r,a,i,s){let t=i.components?.[e]||jr[e];if(!t)return console.warn(`[stx] Unknown Craft component: @craft-${e}`),`<div class="${s}-unknown" data-component="${e}">${a}</div>`;let n=A(r),c=[t.fallbackClasses||`${s}-${e}`];if(n.class)c.push(n.class),delete n.class;if(t.render)return n.__fallbackClasses=c.join(" "),t.render(n,a);let d=ee(n,t,c);if(["input","hr","br","img"].includes(t.fallbackTag))return`<${t.fallbackTag} ${d}>`;return`<${t.fallbackTag} ${d}>${a}</${t.fallbackTag}>`}function A(e){let r={},a=/(?::|@)?(\w+[-\w]*)(?:=(?:"([^"]*)"|'([^']*)'))?/g,i;while((i=a.exec(e))!==null){let[s,t,n,c]=i,d=n??c;if(s.startsWith(":"))r[t]=d;else if(s.startsWith("@"))r[`on${t.charAt(0).toUpperCase()}${t.slice(1)}`]=d;else if(d===void 0)r[t]=!0;else r[t]=d}return r}function j(e,r){let a=I(String(e.id||`craft-sidebar-${K(r||JSON.stringify(e))}`)),i=Q(e.spaces)||Y(r),s=i.length?[]:X(e.sections)||F(r),t=String(e.selectedSpace||i[0]?.id||""),n=i.find((g)=>g.id===t)||i[0],c=String(e.selectedItem||e.selected||(i.length?n?.sections[0]?.items[0]?.id:s[0]?.items[0]?.id)||""),d={id:a,variant:String(e.variant||"desktop"),material:String(e.material||"sidebar"),backgroundEffect:String(e.backgroundEffect||"shimmer"),allowsVibrancy:e.allowsVibrancy!==!1&&e.allowsVibrancy!=="false",materialOpacity:Number(e.materialOpacity??0.68),materialDarkOpacity:e.materialDarkOpacity===void 0?void 0:Number(e.materialDarkOpacity),minWidth:e.minWidth===void 0?240:Number(e.minWidth),maxWidth:e.maxWidth===void 0?340:Number(e.maxWidth),canCollapse:e.canCollapse!==!1&&e.canCollapse!=="false",searchPlaceholder:e.searchPlaceholder?String(e.searchPlaceholder):void 0,selectedItem:c,sections:s,spaces:i,selectedSpace:t||void 0},l=String(e.__fallbackClasses||"craft-sidebar craft-sidebar-tahoe"),p=Number(e.width||e.sidebarWidth||286),f=e.native===!1||e.native==="false"?"false":"true",x=d.searchPlaceholder?`<div class="craft-sidebar-search"><input type="search" placeholder="${C(d.searchPlaceholder)}"></div>`:"",b;if(i.length)b=G(i,t,c);else if(s.length)b=s.map((g)=>D(g,c)).join("");else b=r;return`<aside class="${h(l)}" data-craft="craft-sidebar" data-craft-native-sidebar data-craft-sidebar-id="${h(a)}" data-native="${f}" style="--craft-sidebar-width:${p}px">
2938
2938
  ${x}
2939
2939
  ${b}
2940
2940
  </aside>
@@ -2955,7 +2955,7 @@ ${a}`);return a+e}var Lr={button:{nativeType:"craft-button",fallbackTag:"button"
2955
2955
  ${e.icon?`<span class="craft-sidebar-item-icon" data-icon="${h(e.icon)}"${a}></span>`:""}
2956
2956
  <span class="craft-sidebar-item-label">${C(e.label)}</span>
2957
2957
  ${e.badge?`<span class="craft-sidebar-item-badge">${C(e.badge)}</span>`:""}
2958
- </button>`}function I(e){return e.trim().toLowerCase().replace(/[^a-z0-9_-]+/g,"-").replace(/^-|-$/g,"")||"craft-sidebar"}function K(e){let r=5381;for(let a=0;a<e.length;a++)r=r*33^e.charCodeAt(a);return(r>>>0).toString(36)}function C(e){return e.replace(/&/g,"&amp;").replace(/</g,"&lt;").replace(/>/g,"&gt;").replace(/"/g,"&quot;").replace(/'/g,"&#39;")}function h(e){return C(e).replace(/`/g,"&#96;")}function Z(e){return JSON.stringify(e).replace(/</g,"\\u003c").replace(/>/g,"\\u003e").replace(/&/g,"\\u0026")}function ee(e,r,a){let i=[];i.push(`class="${a.join(" ")}"`),i.push(`data-craft="${r.nativeType}"`);for(let[s,t]of Object.entries(e))if(t===!0)i.push(s);else if(t!==!1&&t!==void 0&&t!==null){let n=String(t).replace(/"/g,"&quot;");i.push(`${s}="${n}"`)}return i.join(" ")}function du(e,r){Lr[e]=r}function pu(){return{...Lr}}import{existsSync as z,mkdirSync as v,copyFileSync as k,chmodSync as T}from"fs";import{join as o,basename as te}from"path";import{spawn as E,execSync as re}from"child_process";import{tmpdir as M,homedir as q,platform as ae}from"os";async function xo(e){let r=Date.now();try{if(!await Bun.file(e.input).exists())return{success:!1,target:e.target||P(),format:e.format||"app",error:`Input file not found: ${e.input}`};let a=e.target||P(),i=e.format||ue(a),s=e.output||o(process.cwd(),"dist","native");if(!z(s))v(s,{recursive:!0});let t=await Eo(e.input,{context:e.context,options:{isDev:!1}});if(t=bo(t,{debug:e.verbose}),t=vo(t),!t.includes("craft-component-styles")){if(t.includes("</head>"))t=t.replace("</head>",`${wo}
2958
+ </button>`}function I(e){return e.trim().toLowerCase().replace(/[^a-z0-9_-]+/g,"-").replace(/^-|-$/g,"")||"craft-sidebar"}function K(e){let r=5381;for(let a=0;a<e.length;a++)r=r*33^e.charCodeAt(a);return(r>>>0).toString(36)}function C(e){return e.replace(/&/g,"&amp;").replace(/</g,"&lt;").replace(/>/g,"&gt;").replace(/"/g,"&quot;").replace(/'/g,"&#39;")}function h(e){return C(e).replace(/`/g,"&#96;")}function Z(e){return JSON.stringify(e).replace(/</g,"\\u003c").replace(/>/g,"\\u003e").replace(/&/g,"\\u0026")}function ee(e,r,a){let i=[];i.push(`class="${a.join(" ")}"`),i.push(`data-craft="${r.nativeType}"`);for(let[s,t]of Object.entries(e))if(t===!0)i.push(s);else if(t!==!1&&t!==void 0&&t!==null){let n=String(t).replace(/"/g,"&quot;");i.push(`${s}="${n}"`)}return i.join(" ")}function pu(e,r){jr[e]=r}function fu(){return{...jr}}import{existsSync as z,mkdirSync as v,copyFileSync as k,chmodSync as T}from"fs";import{join as o,basename as te}from"path";import{spawn as E,execSync as re}from"child_process";import{tmpdir as M,homedir as q,platform as ae}from"os";async function So(e){let r=Date.now();try{if(!await Bun.file(e.input).exists())return{success:!1,target:e.target||P(),format:e.format||"app",error:`Input file not found: ${e.input}`};let a=e.target||P(),i=e.format||ue(a),s=e.output||o(process.cwd(),"dist","native");if(!z(s))v(s,{recursive:!0});let t=await To(e.input,{context:e.context,options:{isDev:!1}});if(t=wo(t,{debug:e.verbose}),t=xo(t),!t.includes("craft-component-styles")){if(t.includes("</head>"))t=t.replace("</head>",`${vo}
2959
2959
  </head>`)}let n=e.name||te(e.input,".stx"),c=e.version||"1.0.0",d=e.craftPath||await fe();if(!d)return{success:!1,target:a,format:i,error:"Craft binary not found. Please install Craft or specify craftPath."};if(e.verbose)console.log(`\uD83D\uDCE6 Building native app for ${a}...`),console.log(` Input: ${e.input}`),console.log(` Output: ${s}`),console.log(` Craft: ${d}`);let l;switch(a){case"macos":l=await ie(t,n,c,s,i,e,d);break;case"windows":l=await oe(t,n,c,s,i,e,d);break;case"linux":l=await ce(t,n,c,s,i,e,d);break;case"ios":l=await de(t,n,c,s,e,d);break;case"android":l=await le(t,n,c,s,e,d);break;default:l={success:!1,target:a,format:i,error:`Unsupported target: ${a}`}}return l.duration=Date.now()-r,l}catch(a){return{success:!1,target:e.target||P(),format:e.format||"app",error:a.message,duration:Date.now()-r}}}async function ie(e,r,a,i,s,t,n){let c=t.bundleId||`com.stx.${r.toLowerCase().replace(/[^a-z0-9]/g,"")}`,d=o(i,`${r}.app`),l=o(d,"Contents"),p=o(l,"MacOS"),f=o(l,"Resources");v(p,{recursive:!0}),v(f,{recursive:!0});let x=o(f,"index.html");await Bun.write(x,e);let b="";if(t.sidebar?.enabled&&t.sidebar?.config)b=o(f,"sidebar-config.json"),await Bun.write(b,JSON.stringify(t.sidebar.config));let g=t.sidebar?.enabled?`--native-sidebar --sidebar-width ${t.sidebar?.width||240} --sidebar-config "$(cat "$RESOURCES/sidebar-config.json")"`:"",m=t.menubarOnly??t.systemTray;if((t.bundleStyle||(await se(n)?"executable":"launcher"))==="executable"){let S=o(p,r);k(n,S),T(S,493);let w={html:"index.html",title:t.window?.title||r,width:t.window?.width||1200,height:t.window?.height||800,devTools:Boolean(t.devTools)};if(m)w.menubarOnly=!0;else if(t.systemTray)w.systemTray=!0;if(t.window?.frameless)w.frameless=!0;if(t.window?.transparent)w.transparent=!0;if(t.window?.alwaysOnTop)w.alwaysOnTop=!0;if(t.window?.resizable===!1)w.resizable=!1;await Bun.write(o(f,"craft.json"),`${JSON.stringify(w,null,2)}
2960
2960
  `)}else{let S=o(p,"craft");k(n,S),T(S,493);let w=t.sidebar?.enabled?`--native-sidebar --sidebar-width ${t.sidebar?.width||240} --sidebar-config "$(cat "$RESOURCES/sidebar-config.json")"`:"",U=`#!/bin/bash
2961
2961
  set -euo pipefail
@@ -3018,5 +3018,5 @@ Exec=${a.toLowerCase()}
3018
3018
  Terminal=false
3019
3019
  Categories=Utility;
3020
3020
  Icon=${a.toLowerCase()}
3021
- `;u("fs").writeFileSync(o(n,`${a.toLowerCase()}.desktop`),b);let g=Buffer.from([137,80,78,71,13,10,26,10,0,0,0,13,73,72,68,82,0,0,0,1,0,0,0,1,8,2,0,0,0,144,119,83,222,0,0,0,12,73,68,65,84,8,215,99,248,255,255,63,0,5,254,2,254,220,204,89,231,0,0,0,0,73,69,78,68,174,66,96,130]);if(u("fs").writeFileSync(o(n,`${a.toLowerCase()}.png`),g),i.icon&&z(i.icon))k(i.icon,o(n,`${a.toLowerCase()}.png`));let m=E("appimagetool",[n,r],{env:{...process.env,ARCH:"x86_64"}});m.on("close",(y)=>{if(u("fs").rmSync(t,{recursive:!0,force:!0}),y===0)T(r,493),s({success:!0});else s({success:!1,error:`appimagetool exited with code ${y}. Install from https://appimage.github.io/appimagetool/`})}),m.on("error",(y)=>{u("fs").rmSync(t,{recursive:!0,force:!0}),s({success:!1,error:`appimagetool not found: ${y.message}`})})}catch(t){s({success:!1,error:t.message})}})}function So(){return[P()]}function ko(e){switch(e){case"macos":return["app","dmg","pkg"];case"windows":return["app","zip","msi"];case"linux":return["app","deb","rpm","appimage"];case"ios":return["ipa"];case"android":return["apk"];default:return["app"]}}var he={buildNative:xo,getAvailableTargets:So,getAvailableFormats:ko,detectPlatform:P},fu=he;
3022
- export{au,yo,cu,lu,bo,Lr,wo,uu,vo,du,pu,xo,So,ko,fu};
3021
+ `;u("fs").writeFileSync(o(n,`${a.toLowerCase()}.desktop`),b);let g=Buffer.from([137,80,78,71,13,10,26,10,0,0,0,13,73,72,68,82,0,0,0,1,0,0,0,1,8,2,0,0,0,144,119,83,222,0,0,0,12,73,68,65,84,8,215,99,248,255,255,63,0,5,254,2,254,220,204,89,231,0,0,0,0,73,69,78,68,174,66,96,130]);if(u("fs").writeFileSync(o(n,`${a.toLowerCase()}.png`),g),i.icon&&z(i.icon))k(i.icon,o(n,`${a.toLowerCase()}.png`));let m=E("appimagetool",[n,r],{env:{...process.env,ARCH:"x86_64"}});m.on("close",(y)=>{if(u("fs").rmSync(t,{recursive:!0,force:!0}),y===0)T(r,493),s({success:!0});else s({success:!1,error:`appimagetool exited with code ${y}. Install from https://appimage.github.io/appimagetool/`})}),m.on("error",(y)=>{u("fs").rmSync(t,{recursive:!0,force:!0}),s({success:!1,error:`appimagetool not found: ${y.message}`})})}catch(t){s({success:!1,error:t.message})}})}function ko(){return[P()]}function Co(e){switch(e){case"macos":return["app","dmg","pkg"];case"windows":return["app","zip","msi"];case"linux":return["app","deb","rpm","appimage"];case"ios":return["ipa"];case"android":return["apk"];default:return["app"]}}var he={buildNative:So,getAvailableTargets:ko,getAvailableFormats:Co,detectPlatform:P},gu=he;
3022
+ export{cu,bo,lu,uu,wo,jr,vo,du,xo,pu,fu,So,ko,Co,gu};
@@ -1,5 +1,5 @@
1
1
  // @bun
2
- import y from"fs";import R from"path";var S="_stx";function F(e){return Bun.hash(e).toString(16).slice(0,8)}function k(e){let t=[],n=(i)=>{for(let s of y.readdirSync(i,{withFileTypes:!0})){let r=R.join(i,s.name);if(s.isDirectory())n(r);else if(s.isFile()&&r.endsWith(".html"))t.push(r)}};if(y.existsSync(e))n(e);return t}var z=[{pattern:/<script\b([^>]*\bdata-stx-runtime\b[^>]*)>([\s\S]*?)<\/script>/gi,prefix:"runtime",extension:"js",contentType:"text/javascript; charset=utf-8",replace:(e)=>`<script data-stx-runtime src="${e}"></script>`},{pattern:/<script\b([^>]*\bdata-stx-router\b[^>]*)>([\s\S]*?)<\/script>/gi,prefix:"router",extension:"js",contentType:"text/javascript; charset=utf-8",replace:(e)=>`<script data-stx-router src="${e}"></script>`},{pattern:/<style\b([^>]*\bdata-css=(?:"generated"|'generated')[^>]*)>([\s\S]*?)<\/style>/gi,prefix:"css",extension:"css",contentType:"text/css; charset=utf-8",replace:(e)=>`<link data-css="generated" rel="stylesheet" href="${e}">`}];function I(e,t=`/${S}`){let n=[],i=new Set,s=0,r=e;for(let o of z)r=r.replace(o.pattern,(g,u,c)=>{if(/\b(?:src|href)\s*=/.test(u)||!c.trim())return g;let a=`${o.prefix}.${F(c)}.${o.extension}`;if(!i.has(a))i.add(a),n.push({filename:a,contents:c,contentType:o.contentType});return s+=c.length,o.replace(`${t}/${a}`)});return{html:r,assets:n,bytesInlined:s}}function To(e){let t={pages:0,assets:0,bytesInlined:0},n=R.join(e,S),i=new Set;for(let s of k(e)){let r=y.readFileSync(s,"utf8"),{html:o,assets:g,bytesInlined:u}=I(r);if(o===r)continue;for(let c of g){if(i.has(c.filename))continue;i.add(c.filename),y.mkdirSync(n,{recursive:!0}),y.writeFileSync(R.join(n,c.filename),c.contents),t.assets++}y.writeFileSync(s,o),t.bytesInlined+=u,t.pages++}return t}import h from"fs";import T from"path";var L=1024,N=/<(script|style)\b([^>]*)>([\s\S]*?)<\/\1>/gi,_=new Set(["","module","text/javascript","application/javascript","module/javascript"]);function B(e){return Bun.hash(e).toString(16).slice(0,8)}function C(e){let t=[],n=(i)=>{for(let s of h.readdirSync(i,{withFileTypes:!0})){let r=T.join(i,s.name);if(s.isDirectory())n(r);else if(s.isFile()&&r.endsWith(".html"))t.push(r)}};if(h.existsSync(e))n(e);return t}function O(e,t){let n=e.match(new RegExp(`\\b${t}\\s*=\\s*("([^"]*)"|'([^']*)'|([^\\s>]+))`,"i"));if(!n)return;return n[2]??n[3]??n[4]??""}function H(e,t,n){if(n.length<L)return!1;if(/\b(?:src|href)\s*=/i.test(t))return!1;if(e.toLowerCase()==="script"){if(!_.has((O(t,"type")??"").trim().toLowerCase()))return!1;return!0}return!0}function D(e){let t=[];for(let n of e.matchAll(/<template\b[^>]*>[\s\S]*?<\/template>/gi))t.push([n.index,n.index+n[0].length]);return t}function _o(e){let t={pages:0,assets:0,bytesInlined:0},n=C(e);if(n.length<2)return t;let i=new Map,s=new Map;for(let a of n){let f=h.readFileSync(a,"utf8");i.set(a,f);let M=D(f);for(let d of f.matchAll(N)){let[x,p,l,m]=d;if(!H(p,l,m))continue;if(M.some(([j,A])=>d.index>=j&&d.index<A))continue;let w=`${p.toLowerCase()}\x00${m}`,b=s.get(w);if(b)b.push({file:a,whole:x,tag:p,attrs:l,body:m});else s.set(w,[{file:a,whole:x,tag:p,attrs:l,body:m}])}}let r=[...s.values()].filter((a)=>new Set(a.map((f)=>f.file)).size>1);if(r.length===0)return t;let o=T.join(e,S),g=new Map(i),u=new Map,c=[];for(let a of r){let{tag:f,body:M}=a[0],d=f.toLowerCase()==="script",x=`${d?"chunk":"style"}.${B(M)}.${d?"js":"css"}`;c.push({filename:x,contents:M,contentType:d?"text/javascript; charset=utf-8":"text/css; charset=utf-8"});let p=`/${S}/${x}`;for(let l of a){let m=d?`<script${l.attrs} src="${p}"></script>`:`<link${l.attrs} rel="stylesheet" href="${p}">`,w=g.get(l.file),b=w.replace(l.whole,()=>m);if(b===w)continue;g.set(l.file,b),u.set(l.file,(u.get(l.file)??0)+l.body.length)}}h.mkdirSync(o,{recursive:!0});for(let a of c)h.writeFileSync(T.join(o,a.filename),a.contents),t.assets++;for(let[a,f]of g){if(f===i.get(a))continue;h.writeFileSync(a,f),t.pages++,t.bytesInlined+=u.get(a)??0}return t}import E from"fs";import v from"path";var K="layout-types.d.ts";function P(e){let t=[],n=(i,s)=>{let r;try{r=E.readdirSync(i,{withFileTypes:!0})}catch{return}for(let o of r){if(o.name.startsWith("."))continue;let g=v.join(i,o.name);if(o.isDirectory())n(g,s?`${s}/${o.name}`:o.name);else if(o.isFile()&&o.name.endsWith(".stx")&&o.name!=="_layout.stx"){let u=o.name.slice(0,-4);t.push(s?`${s}/${u}`:u)}}};return n(e,""),t.sort()}function W(e){let t=["// 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(e.length===0)return t.push("// No layouts found \u2014 `layout` stays typed as `string`.","export {}",""),t.join(`
2
+ import y from"fs";import R from"path";var S="_stx";function F(e){return Bun.hash(e).toString(16).slice(0,8)}function k(e){let t=[],n=(i)=>{for(let s of y.readdirSync(i,{withFileTypes:!0})){let r=R.join(i,s.name);if(s.isDirectory())n(r);else if(s.isFile()&&r.endsWith(".html"))t.push(r)}};if(y.existsSync(e))n(e);return t}var z=[{pattern:/<script\b([^>]*\bdata-stx-runtime\b[^>]*)>([\s\S]*?)<\/script>/gi,prefix:"runtime",extension:"js",contentType:"text/javascript; charset=utf-8",replace:(e)=>`<script data-stx-runtime src="${e}"></script>`},{pattern:/<script\b([^>]*\bdata-stx-router\b[^>]*)>([\s\S]*?)<\/script>/gi,prefix:"router",extension:"js",contentType:"text/javascript; charset=utf-8",replace:(e)=>`<script data-stx-router src="${e}"></script>`},{pattern:/<style\b([^>]*\bdata-css=(?:"generated"|'generated')[^>]*)>([\s\S]*?)<\/style>/gi,prefix:"css",extension:"css",contentType:"text/css; charset=utf-8",replace:(e)=>`<link data-css="generated" rel="stylesheet" href="${e}">`}];function I(e,t=`/${S}`){let n=[],i=new Set,s=0,r=e;for(let o of z)r=r.replace(o.pattern,(g,u,c)=>{if(/\b(?:src|href)\s*=/.test(u)||!c.trim())return g;let a=`${o.prefix}.${F(c)}.${o.extension}`;if(!i.has(a))i.add(a),n.push({filename:a,contents:c,contentType:o.contentType});return s+=c.length,o.replace(`${t}/${a}`)});return{html:r,assets:n,bytesInlined:s}}function _o(e){let t={pages:0,assets:0,bytesInlined:0},n=R.join(e,S),i=new Set;for(let s of k(e)){let r=y.readFileSync(s,"utf8"),{html:o,assets:g,bytesInlined:u}=I(r);if(o===r)continue;for(let c of g){if(i.has(c.filename))continue;i.add(c.filename),y.mkdirSync(n,{recursive:!0}),y.writeFileSync(R.join(n,c.filename),c.contents),t.assets++}y.writeFileSync(s,o),t.bytesInlined+=u,t.pages++}return t}import h from"fs";import T from"path";var L=1024,N=/<(script|style)\b([^>]*)>([\s\S]*?)<\/\1>/gi,_=new Set(["","module","text/javascript","application/javascript","module/javascript"]);function B(e){return Bun.hash(e).toString(16).slice(0,8)}function C(e){let t=[],n=(i)=>{for(let s of h.readdirSync(i,{withFileTypes:!0})){let r=T.join(i,s.name);if(s.isDirectory())n(r);else if(s.isFile()&&r.endsWith(".html"))t.push(r)}};if(h.existsSync(e))n(e);return t}function O(e,t){let n=e.match(new RegExp(`\\b${t}\\s*=\\s*("([^"]*)"|'([^']*)'|([^\\s>]+))`,"i"));if(!n)return;return n[2]??n[3]??n[4]??""}function H(e,t,n){if(n.length<L)return!1;if(/\b(?:src|href)\s*=/i.test(t))return!1;if(e.toLowerCase()==="script"){if(!_.has((O(t,"type")??"").trim().toLowerCase()))return!1;return!0}return!0}function D(e){let t=[];for(let n of e.matchAll(/<template\b[^>]*>[\s\S]*?<\/template>/gi))t.push([n.index,n.index+n[0].length]);return t}function Ro(e){let t={pages:0,assets:0,bytesInlined:0},n=C(e);if(n.length<2)return t;let i=new Map,s=new Map;for(let a of n){let f=h.readFileSync(a,"utf8");i.set(a,f);let M=D(f);for(let d of f.matchAll(N)){let[x,p,l,m]=d;if(!H(p,l,m))continue;if(M.some(([j,A])=>d.index>=j&&d.index<A))continue;let w=`${p.toLowerCase()}\x00${m}`,b=s.get(w);if(b)b.push({file:a,whole:x,tag:p,attrs:l,body:m});else s.set(w,[{file:a,whole:x,tag:p,attrs:l,body:m}])}}let r=[...s.values()].filter((a)=>new Set(a.map((f)=>f.file)).size>1);if(r.length===0)return t;let o=T.join(e,S),g=new Map(i),u=new Map,c=[];for(let a of r){let{tag:f,body:M}=a[0],d=f.toLowerCase()==="script",x=`${d?"chunk":"style"}.${B(M)}.${d?"js":"css"}`;c.push({filename:x,contents:M,contentType:d?"text/javascript; charset=utf-8":"text/css; charset=utf-8"});let p=`/${S}/${x}`;for(let l of a){let m=d?`<script${l.attrs} src="${p}"></script>`:`<link${l.attrs} rel="stylesheet" href="${p}">`,w=g.get(l.file),b=w.replace(l.whole,()=>m);if(b===w)continue;g.set(l.file,b),u.set(l.file,(u.get(l.file)??0)+l.body.length)}}h.mkdirSync(o,{recursive:!0});for(let a of c)h.writeFileSync(T.join(o,a.filename),a.contents),t.assets++;for(let[a,f]of g){if(f===i.get(a))continue;h.writeFileSync(a,f),t.pages++,t.bytesInlined+=u.get(a)??0}return t}import E from"fs";import v from"path";var K="layout-types.d.ts";function P(e){let t=[],n=(i,s)=>{let r;try{r=E.readdirSync(i,{withFileTypes:!0})}catch{return}for(let o of r){if(o.name.startsWith("."))continue;let g=v.join(i,o.name);if(o.isDirectory())n(g,s?`${s}/${o.name}`:o.name);else if(o.isFile()&&o.name.endsWith(".stx")&&o.name!=="_layout.stx"){let u=o.name.slice(0,-4);t.push(s?`${s}/${u}`:u)}}};return n(e,""),t.sort()}function W(e){let t=["// 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(e.length===0)return t.push("// No layouts found \u2014 `layout` stays typed as `string`.","export {}",""),t.join(`
3
3
  `);return t.push("declare module '@stacksjs/stx' {"," interface KnownLayouts {",...e.map((n)=>` '${n}': true`)," }","}","","export {}",""),t.join(`
4
- `)}function Ro(e,t){if(!e)return[];let n=v.isAbsolute(e)?e:v.resolve(process.cwd(),e),i=P(n),s=W(i),r=v.join(t,K);try{if(E.existsSync(r)&&E.readFileSync(r,"utf8")===s)return i;E.mkdirSync(t,{recursive:!0}),E.writeFileSync(r,s)}catch{}return i}
5
- export{To,_o,Ro};
4
+ `)}function Ao(e,t){if(!e)return[];let n=v.isAbsolute(e)?e:v.resolve(process.cwd(),e),i=P(n),s=W(i),r=v.join(t,K);try{if(E.existsSync(r)&&E.readFileSync(r,"utf8")===s)return i;E.mkdirSync(t,{recursive:!0}),E.writeFileSync(r,s)}catch{}return i}
5
+ export{_o,Ro,Ao};
@@ -0,0 +1,2 @@
1
+ // @bun
2
+ import{_s,Ku,Xu,vi,pe,Tc,nr,Gu,Ju,Yu,Zu,Qu,ed,td,nd,rd}from"./chunk-exgyf65a.js";import"./chunk-r6pax860.js";export{ed as applyHead,Gu as definePageMeta,_s as getHead,Ku as getPageMeta,pe as mergeHeadConfigs,td as processHeadDirective,rd as processMetaDirective,nd as processTitleDirective,Qu as renderBodyAttrs,Yu as renderHead,Zu as renderHtmlAttrs,Xu as resetHead,nr as seoMetaToHeadConfig,vi as useHead,Ju as usePageTitle,Tc as useSeoMeta,Ju as useTitle};
@@ -1,5 +1,5 @@
1
1
  // @bun
2
- import{t,i,dn,As,ve,l}from"./chunk-5xj1df83.js";function w(e,n,r,o=0){let a=0,s=o,u=null,c=0,p=!1;while(s<e.length){let h=e[s];if(u&&p){p=!1,s++;continue}if(u&&h==="\\"){p=!0,s++;continue}if(p=!1,(h==='"'||h==="'"||h==="`")&&!u){u=h,s++;continue}if(h===u&&u!=="`"){u=null,s++;continue}if(u==="`"&&h==="$"&&e[s+1]==="{"){c++,s+=2;continue}if(c>0&&h==="}"){c--,s++;continue}if(h==="`"&&u==="`"&&c===0){u=null,s++;continue}if(u){s++;continue}if(h===n)a++;else if(h===r){if(a--,a===0)return s}s++}return-1}import v from"path";function Es(e,n){let r=[];n.lastIndex=0;let o;while((o=n.exec(e))!==null){let a=o.index,s=a+o[0].length-1,u=w(e,"(",")",s);if(u===-1){r.push({start:a,end:-1,args:"",call:e.slice(a,Math.min(e.length,a+80))}),n.lastIndex=s+1;continue}r.push({start:a,end:u+1,args:e.slice(s+1,u),call:e.slice(a,u+1)}),n.lastIndex=u+1}return r}function Xe(e,n,r,o){let a="",s=0;for(let u of Es(e,n)){if(a+=e.slice(s,u.start),u.end===-1){a+=o(u.call),s=u.start;continue}a+=r(u.args,u.call),s=u.end}return a+e.slice(s)}function Ge(e){let n=[],r=0,o=null,a="";for(let s=0;s<e.length;s++){let u=e[s];if(o){if(a+=u,u==="\\"&&s+1<e.length){a+=e[++s];continue}if(u===o)o=null;continue}if(u==="'"||u==='"'||u==="`")o=u;else if(u==="("||u==="["||u==="{")r++;else if(u===")"||u==="]"||u==="}")r--;else if(u===","&&r===0){n.push(a.trim()),a="";continue}a+=u}if(a.trim())n.push(a.trim());return n}function y(e){let n=e.trim(),r=n[0];if(r!=="'"&&r!=='"'&&r!=="`"||n.length<2||n.at(-1)!==r)return null;let o="";for(let a=1;a<n.length-1;a++){let s=n[a];if(s==="\\"&&a+1<n.length-1){let u=n[++a];o+=u==="n"?`
3
- `:u==="t"?"\t":u;continue}if(s===r)return null;if(r==="`"&&s==="$"&&n[a+1]==="{")return null;o+=s}return o}var R=new Set(["true","false","null","undefined","typeof","void","new","in","of","instanceof","this","delete","await","async","function","return","NaN","Infinity"]);function Je(e,n){let r=e.trim();if(!r)return{ok:!1,message:"the argument is empty",code:t.INVALID_DIRECTIVE_SYNTAX};let o=dn(r);if(o)return{ok:!1,message:`the expression is not allowed (${o})`,code:t.UNSAFE_EXPRESSION};let a=As(n),s;try{s=l(r,Object.keys(a))(...Object.values(a))}catch(c){return{ok:!1,message:`the expression could not be evaluated: ${c instanceof Error?c.message:String(c)}`,code:t.EVALUATION_ERROR}}if(s!==void 0&&s!==null)return{ok:!0,value:s};let u=[...new Set(ve(r))].filter((c)=>!R.has(c)&&!(c in a)&&!(c in globalThis));if(u.length>0)return{ok:!1,message:`${u.map((p)=>`"${p}"`).join(", ")} ${u.length===1?"is":"are"} not defined here. Values a directive reads must come from <script server> or the render context; a plain <script> runs in the browser. To pass literal text, quote it.`,code:t.UNDEFINED_VARIABLE};if(s===void 0&&(r.startsWith("{")||r.startsWith("[")))return{ok:!1,message:"the expression threw while it was evaluated",code:t.EVALUATION_ERROR};return{ok:!0,value:s}}function ue(e){if(e===null)return"null";if(Array.isArray(e))return"an array";if(typeof e==="object")return"an object";if(typeof e==="string")return`a string ("${e.length>40?`${e.slice(0,40)}...`:e}")`;return`${/^[aeiou]/.test(typeof e)?"an":"a"} ${typeof e}`}function we(e){return typeof e==="object"&&e!==null&&!Array.isArray(e)}function b(e){if(!e)return"";return v.isAbsolute(e)?v.relative(process.cwd(),e)||e:e}function f(e){let n=e.replace(/\s+/g," ").trim();return n.length>80?`${n.slice(0,77)}...`:n}function k(e,n,r,o,a=t.EVALUATION_ERROR){let s=o?` in ${b(o)}`:"";return console.warn(`[stx] ${f(n)}${s}: ${r}`),i(e,`${f(n)}: ${r}`,a)}function Qn(e,n,r){let o=r?` in ${b(r)}`:"";console.warn(`[stx] ${f(e)}${o}: ${n}`)}var x=["og:","article:","book:","profile:","fb:","music:","video:"],I=/^[a-z][\w-]*(?::[\w:-]+)?$/i;function cn(e,n){if(e.length<1)return{kind:"error",message:"meta directive requires at least the meta name",code:t.INVALID_DIRECTIVE_SYNTAX};if(e.length>2)return{kind:"error",message:`@meta takes a name and a value, got ${e.length} arguments`,code:t.INVALID_DIRECTIVE_SYNTAX};let r=_(e[0],n);if(typeof r!=="string")return r;let o;if(e.length===2){let s=C(e[1],n);if(typeof s!=="string")return s;o=s}else{let s=r.includes(":")?r.slice(r.indexOf(":")+1):r,u=n.openGraph,c=n[s]??(we(u)?u[s]:void 0);o=c===void 0||c===null||typeof c==="object"?"":String(c)}if(!o)return{kind:"empty"};return{kind:"tag",tag:x.some((s)=>r.startsWith(s))?{property:r,content:o}:{name:r,content:o}}}function _(e,n){let r=y(e);if(r!==null)return r.trim()?r:{kind:"error",message:"the meta name is empty",code:t.INVALID_DIRECTIVE_SYNTAX};if(I.test(e.trim()))return e.trim();let o=Je(e,n);if(!o.ok)return{kind:"error",message:`meta name: ${o.message}`,code:o.code};if(typeof o.value!=="string"||!o.value.trim())return{kind:"error",message:`the meta name must be a non-empty string, got ${ue(o.value)}`,code:t.TYPE_ERROR};return o.value}function C(e,n){let r=y(e);if(r!==null)return r;let o=Je(e,n);if(!o.ok)return{kind:"error",message:o.message,code:o.code};let a=o.value;if(a===void 0||a===null||a===!1)return"";if(Array.isArray(a))return a.filter((s)=>s!==void 0&&s!==null&&s!=="").map(String).join(", ");if(typeof a==="object"&&!(a instanceof Date))return{kind:"error",message:`the content must be text, got ${ue(a)}`,code:t.TYPE_ERROR};return String(a)}var ln=["title","lang","meta","link","script","headRaw","htmlAttrs","bodyClass","bodyAttrs"],er=["title","titleTemplate","base","meta","link","script","style","htmlAttrs","bodyAttrs"],S={links:"link",metas:"meta",scripts:"script",styles:"style"},A=new Set,E=new WeakMap;function T(e){if(A.has(e))return;A.add(e),console.warn(e)}function N(e,n){let r=Array.from({length:n.length+1},(o,a)=>a);for(let o=1;o<=e.length;o++){let a=r[0];r[0]=o;for(let s=1;s<=n.length;s++){let u=r[s];r[s]=Math.min(r[s]+1,r[s-1]+1,a+(e[o-1]===n[s-1]?0:1)),a=u}}return r[n.length]}function M(e,n){let r=e.toLowerCase(),o=n.find((p)=>p.toLowerCase()===r);if(o)return o;let a=S[r];if(a&&n.includes(a))return a;let s,u=1/0;for(let p of n){let h=N(r,p.toLowerCase());if(h<u)s=p,u=h}let c=Math.min(e.length,s?.length??0)<=4?1:2;return u<=c?s:void 0}function de(e,n){if(!e||typeof e!=="object"||Array.isArray(e))return e||{};let r=E.get(e);if(r)return r;let{known:o,source:a}=n,s=e;for(let u of Object.keys(e)){if(o.includes(u))continue;let c=S[u];if(c&&o.includes(c)&&Array.isArray(e[u])){if(s===e)s={...e};let h=Array.isArray(s[c])?s[c]:[];s[c]=[...h,...e[u]],delete s[u],T(`[stx] ${a}.${u} is not a head key; reading it as ${a}.${c}. Rename it to \`${c}\`.`);continue}if(/^styles?$/.test(u)&&!o.includes("style")){T(`[stx] ${a}.${u} is not a head key and is ignored. Use \`link\` with rel: 'stylesheet', or \`headRaw\` for an inline <style>.`);continue}let p=M(u,o);T(p?`[stx] ${a}.${u} is not a head key and is ignored. Did you mean \`${p}\`?`:`[stx] ${a}.${u} is not a head key and is ignored. Known keys: ${o.join(", ")}.`)}return E.set(e,s),s}var d={},D=[],g={};function Ts(){return d}function qu(){return g}function Ku(){d={},D.length=0,g={}}function wi(e){d=pe(d,de(e,{known:er,source:"useHead()"}))}function pe(e,n){return{title:n.title??e.title,titleTemplate:n.titleTemplate??e.titleTemplate,base:n.base??e.base,meta:[...e.meta||[],...n.meta||[]],link:[...e.link||[],...n.link||[]],script:[...e.script||[],...n.script||[]],style:[...e.style||[],...n.style||[]],htmlAttrs:{...e.htmlAttrs,...n.htmlAttrs},bodyAttrs:{...e.bodyAttrs,...n.bodyAttrs}}}function Ec(e){wi(tr(e))}function tr(e){let n=[];if(e.description)n.push({name:"description",content:e.description});if(e.keywords){let p=Array.isArray(e.keywords)?e.keywords.join(", "):e.keywords;n.push({name:"keywords",content:p})}if(e.author)n.push({name:"author",content:e.author});if(e.robots)n.push({name:"robots",content:e.robots});let r=e.ogTitle??e.title,o=e.ogDescription??e.description;if(r)n.push({property:"og:title",content:r});if(o)n.push({property:"og:description",content:o});if(e.ogImage){if(n.push({property:"og:image",content:e.ogImage}),e.ogImageType)n.push({property:"og:image:type",content:e.ogImageType});if(e.ogImageWidth)n.push({property:"og:image:width",content:String(e.ogImageWidth)});if(e.ogImageHeight)n.push({property:"og:image:height",content:String(e.ogImageHeight)});if(e.ogImageAlt)n.push({property:"og:image:alt",content:e.ogImageAlt})}if(e.ogUrl)n.push({property:"og:url",content:e.ogUrl});if(e.ogType)n.push({property:"og:type",content:e.ogType});if(e.ogSiteName)n.push({property:"og:site_name",content:e.ogSiteName});if(e.ogLocale)n.push({property:"og:locale",content:e.ogLocale});if(e.profileFirstName)n.push({property:"profile:first_name",content:e.profileFirstName});if(e.profileLastName)n.push({property:"profile:last_name",content:e.profileLastName});if(e.profileUsername)n.push({property:"profile:username",content:e.profileUsername});let a=e.twitterTitle??e.title,s=e.twitterDescription??e.description,u=e.twitterImage??e.ogImage;if(e.twitterCard)n.push({name:"twitter:card",content:e.twitterCard});if(a)n.push({name:"twitter:title",content:a});if(s)n.push({name:"twitter:description",content:s});if(u){n.push({name:"twitter:image",content:u});let p=e.twitterImageAlt??(e.twitterImage?void 0:e.ogImageAlt);if(p)n.push({name:"twitter:image:alt",content:p})}if(e.twitterSite)n.push({name:"twitter:site",content:e.twitterSite});if(e.twitterCreator)n.push({name:"twitter:creator",content:e.twitterCreator});if(e.articleAuthor)n.push({property:"article:author",content:e.articleAuthor});if(e.articlePublishedTime)n.push({property:"article:published_time",content:e.articlePublishedTime});if(e.articleModifiedTime)n.push({property:"article:modified_time",content:e.articleModifiedTime});if(e.articleSection)n.push({property:"article:section",content:e.articleSection});if(e.articleTags)for(let p of e.articleTags)n.push({property:"article:tag",content:p});let c=[];if(e.canonical)c.push({rel:"canonical",href:e.canonical});return{title:e.title,titleTemplate:e.titleTemplate,meta:n,link:c}}function Xu(e){if(g={...g,...e},e.title||e.description)Ec({title:e.title,description:e.description})}function Gu(e){let n=typeof e==="function"?e():e;wi({title:n})}function Ju(e=d){let n=[];if(e.title){let r=e.title;if(e.titleTemplate)r=typeof e.titleTemplate==="function"?e.titleTemplate(r):e.titleTemplate.replace("%s",r);n.push(`<title>${m(r)}</title>`)}if(e.base){let r=Object.entries(e.base).map(([o,a])=>`${o}="${m(a)}"`).join(" ");n.push(`<base ${r}>`)}for(let r of e.meta||[]){let o=Object.entries(r).filter(([a,s])=>s!==void 0).map(([a,s])=>`${a==="httpEquiv"?"http-equiv":a}="${m(String(s))}"`).join(" ");n.push(`<meta ${o}>`)}for(let r of e.link||[]){let o=Object.entries(r).filter(([a,s])=>s!==void 0).map(([a,s])=>`${a}="${m(String(s))}"`).join(" ");n.push(`<link ${o}>`)}for(let r of e.script||[]){let{content:o,...a}=r,s=Object.entries(a).filter(([u,c])=>c!==void 0).map(([u,c])=>{if(typeof c==="boolean")return c?u:"";return`${u}="${m(String(c))}"`}).filter(Boolean).join(" ");if(o)n.push(`<script ${s}>${o}</script>`);else n.push(`<script ${s}></script>`)}for(let r of e.style||[]){let o=r.type?` type="${r.type}"`:"";n.push(`<style${o}>${r.content}</style>`)}return n.join(`
4
- `)}function Yu(e=d){if(!e.htmlAttrs)return"";return Object.entries(e.htmlAttrs).map(([n,r])=>`${n}="${m(r)}"`).join(" ")}function Zu(e=d){if(!e.bodyAttrs)return"";return Object.entries(e.bodyAttrs).map(([n,r])=>`${n}="${m(r)}"`).join(" ")}function m(e){return e.replace(/&/g,"&amp;").replace(/</g,"&lt;").replace(/>/g,"&gt;").replace(/"/g,"&quot;").replace(/'/g,"&#039;")}function Qu(e=d){if(typeof document>"u")return;if(e.title){let n=e.title;if(e.titleTemplate)n=typeof e.titleTemplate==="function"?e.titleTemplate(n):e.titleTemplate.replace("%s",n);document.title=n}for(let n of e.meta||[]){let r=n.name?`meta[name="${n.name}"]`:n.property?`meta[property="${n.property}"]`:null;if(r){let o=document.querySelector(r);if(!o){if(o=document.createElement("meta"),n.name)o.setAttribute("name",n.name);if(n.property)o.setAttribute("property",n.property);document.head.appendChild(o)}o.setAttribute("content",n.content)}}for(let n of e.link||[]){let r=`link[rel="${n.rel}"]${n.href?`[href="${n.href}"]`:""}`,o=document.querySelector(r);if(!o)o=document.createElement("link"),document.head.appendChild(o);for(let[a,s]of Object.entries(n))if(s!==void 0)o.setAttribute(a,String(s))}if(e.htmlAttrs)for(let[n,r]of Object.entries(e.htmlAttrs))if(n==="class")for(let o of String(r).split(/\s+/).filter(Boolean))document.documentElement.classList.add(o);else document.documentElement.setAttribute(n,r);if(e.bodyAttrs)for(let[n,r]of Object.entries(e.bodyAttrs))document.body.setAttribute(n,r)}function ed(e){let n="";return{content:e.replace(/@head\s*([\s\S]*?)@endhead/g,(o,a)=>(n+=a.trim()+`
5
- `,"")),headContent:n.trim()}}function td(e,n){return e.replace(/@title\s*\(\s*(?:(['"`])(.+?)\1|([^)]+))\s*\)/g,(r,o,a,s)=>{let u=o?a:n[(s||"").trim()]??s,c=n.__stx_runtime_head??{};return n.__stx_runtime_head=pe(c,{title:u}),""})}function nd(e,n,r=""){if(!e.includes("@meta"))return e;return Xe(e,/(?<![\w$@])@meta\s*\(/g,(o,a)=>{let s=cn(Ge(o),n);if(s.kind==="error")return k("Meta",a,s.message,r,s.code);if(s.kind==="tag"){let u=n.__stx_runtime_head??{};n.__stx_runtime_head=pe(u,{meta:[s.tag]})}return""},(o)=>k("Meta",o,"the call has no closing parenthesis",r,t.INVALID_DIRECTIVE_SYNTAX))}export{w,Es,Xe,Ge,Je,ue,we,k,Qn,cn,ln,er,de,Ts,qu,Ku,wi,pe,Ec,tr,Xu,Gu,Ju,Yu,Zu,Qu,ed,td,nd};
2
+ import{t,i,pn,Ps,ve,l}from"./chunk-r6pax860.js";function S(e,n,r,o=0){let a=0,s=o,u=null,c=0,p=!1;while(s<e.length){let h=e[s];if(u&&p){p=!1,s++;continue}if(u&&h==="\\"){p=!0,s++;continue}if(p=!1,(h==='"'||h==="'"||h==="`")&&!u){u=h,s++;continue}if(h===u&&u!=="`"){u=null,s++;continue}if(u==="`"&&h==="$"&&e[s+1]==="{"){c++,s+=2;continue}if(c>0&&h==="}"){c--,s++;continue}if(h==="`"&&u==="`"&&c===0){u=null,s++;continue}if(u){s++;continue}if(h===n)a++;else if(h===r){if(a--,a===0)return s}s++}return-1}import T from"path";function Ts(e,n){let r=[];n.lastIndex=0;let o;while((o=n.exec(e))!==null){let a=o.index,s=a+o[0].length-1,u=S(e,"(",")",s);if(u===-1){r.push({start:a,end:-1,args:"",call:e.slice(a,Math.min(e.length,a+80))}),n.lastIndex=s+1;continue}r.push({start:a,end:u+1,args:e.slice(s+1,u),call:e.slice(a,u+1)}),n.lastIndex=u+1}return r}function Xe(e,n,r,o){let a="",s=0;for(let u of Ts(e,n)){if(a+=e.slice(s,u.start),u.end===-1){a+=o(u.call),s=u.start;continue}a+=r(u.args,u.call),s=u.end}return a+e.slice(s)}function Ge(e){let n=[],r=0,o=null,a="";for(let s=0;s<e.length;s++){let u=e[s];if(o){if(a+=u,u==="\\"&&s+1<e.length){a+=e[++s];continue}if(u===o)o=null;continue}if(u==="'"||u==='"'||u==="`")o=u;else if(u==="("||u==="["||u==="{")r++;else if(u===")"||u==="]"||u==="}")r--;else if(u===","&&r===0){n.push(a.trim()),a="";continue}a+=u}if(a.trim())n.push(a.trim());return n}function y(e){let n=e.trim(),r=n[0];if(r!=="'"&&r!=='"'&&r!=="`"||n.length<2||n.at(-1)!==r)return null;let o="";for(let a=1;a<n.length-1;a++){let s=n[a];if(s==="\\"&&a+1<n.length-1){let u=n[++a];o+=u==="n"?`
3
+ `:u==="t"?"\t":u;continue}if(s===r)return null;if(r==="`"&&s==="$"&&n[a+1]==="{")return null;o+=s}return o}var R=new Set(["true","false","null","undefined","typeof","void","new","in","of","instanceof","this","delete","await","async","function","return","NaN","Infinity"]);function Je(e,n){let r=e.trim();if(!r)return{ok:!1,message:"the argument is empty",code:t.INVALID_DIRECTIVE_SYNTAX};let o=pn(r);if(o)return{ok:!1,message:`the expression is not allowed (${o})`,code:t.UNSAFE_EXPRESSION};let a=Ps(n),s;try{s=l(r,Object.keys(a))(...Object.values(a))}catch(c){return{ok:!1,message:`the expression could not be evaluated: ${c instanceof Error?c.message:String(c)}`,code:t.EVALUATION_ERROR}}if(s!==void 0&&s!==null)return{ok:!0,value:s};let u=[...new Set(ve(r))].filter((c)=>!R.has(c)&&!(c in a)&&!(c in globalThis));if(u.length>0)return{ok:!1,message:`${u.map((p)=>`"${p}"`).join(", ")} ${u.length===1?"is":"are"} not defined here. Values a directive reads must come from <script server> or the render context; a plain <script> runs in the browser. To pass literal text, quote it.`,code:t.UNDEFINED_VARIABLE};if(s===void 0&&(r.startsWith("{")||r.startsWith("[")))return{ok:!1,message:"the expression threw while it was evaluated",code:t.EVALUATION_ERROR};return{ok:!0,value:s}}function ue(e){if(e===null)return"null";if(Array.isArray(e))return"an array";if(typeof e==="object")return"an object";if(typeof e==="string")return`a string ("${e.length>40?`${e.slice(0,40)}...`:e}")`;return`${/^[aeiou]/.test(typeof e)?"an":"a"} ${typeof e}`}function we(e){return typeof e==="object"&&e!==null&&!Array.isArray(e)}function v(e){if(!e)return"";return T.isAbsolute(e)?T.relative(process.cwd(),e)||e:e}function f(e){let n=e.replace(/\s+/g," ").trim();return n.length>80?`${n.slice(0,77)}...`:n}function E(e,n,r,o,a=t.EVALUATION_ERROR){let s=o?` in ${v(o)}`:"";return console.warn(`[stx] ${f(n)}${s}: ${r}`),i(e,`${f(n)}: ${r}`,a)}function er(e,n,r){let o=r?` in ${v(r)}`:"";console.warn(`[stx] ${f(e)}${o}: ${n}`)}var x=["og:","article:","book:","profile:","fb:","music:","video:"],I=/^[a-z][\w-]*(?::[\w:-]+)?$/i;function ln(e,n){if(e.length<1)return{kind:"error",message:"meta directive requires at least the meta name",code:t.INVALID_DIRECTIVE_SYNTAX};if(e.length>2)return{kind:"error",message:`@meta takes a name and a value, got ${e.length} arguments`,code:t.INVALID_DIRECTIVE_SYNTAX};let r=_(e[0],n);if(typeof r!=="string")return r;let o;if(e.length===2){let s=C(e[1],n);if(typeof s!=="string")return s;o=s}else{let s=r.includes(":")?r.slice(r.indexOf(":")+1):r,u=n.openGraph,c=n[s]??(we(u)?u[s]:void 0);o=c===void 0||c===null||typeof c==="object"?"":String(c)}if(!o)return{kind:"empty"};return{kind:"tag",tag:x.some((s)=>r.startsWith(s))?{property:r,content:o}:{name:r,content:o}}}function _(e,n){let r=y(e);if(r!==null)return r.trim()?r:{kind:"error",message:"the meta name is empty",code:t.INVALID_DIRECTIVE_SYNTAX};if(I.test(e.trim()))return e.trim();let o=Je(e,n);if(!o.ok)return{kind:"error",message:`meta name: ${o.message}`,code:o.code};if(typeof o.value!=="string"||!o.value.trim())return{kind:"error",message:`the meta name must be a non-empty string, got ${ue(o.value)}`,code:t.TYPE_ERROR};return o.value}function C(e,n){let r=y(e);if(r!==null)return r;let o=Je(e,n);if(!o.ok)return{kind:"error",message:o.message,code:o.code};let a=o.value;if(a===void 0||a===null||a===!1)return"";if(Array.isArray(a))return a.filter((s)=>s!==void 0&&s!==null&&s!=="").map(String).join(", ");if(typeof a==="object"&&!(a instanceof Date))return{kind:"error",message:`the content must be text, got ${ue(a)}`,code:t.TYPE_ERROR};return String(a)}var un=["title","lang","meta","link","script","headRaw","htmlAttrs","bodyClass","bodyAttrs"],tr=["title","titleTemplate","base","meta","link","script","style","htmlAttrs","bodyAttrs"],w={links:"link",metas:"meta",scripts:"script",styles:"style"},b=new Set,A=new WeakMap;function k(e){if(b.has(e))return;b.add(e),console.warn(e)}function N(e,n){let r=Array.from({length:n.length+1},(o,a)=>a);for(let o=1;o<=e.length;o++){let a=r[0];r[0]=o;for(let s=1;s<=n.length;s++){let u=r[s];r[s]=Math.min(r[s]+1,r[s-1]+1,a+(e[o-1]===n[s-1]?0:1)),a=u}}return r[n.length]}function M(e,n){let r=e.toLowerCase(),o=n.find((p)=>p.toLowerCase()===r);if(o)return o;let a=w[r];if(a&&n.includes(a))return a;let s,u=1/0;for(let p of n){let h=N(r,p.toLowerCase());if(h<u)s=p,u=h}let c=Math.min(e.length,s?.length??0)<=4?1:2;return u<=c?s:void 0}function de(e,n){if(!e||typeof e!=="object"||Array.isArray(e))return e||{};let r=A.get(e);if(r)return r;let{known:o,source:a}=n,s=e;for(let u of Object.keys(e)){if(o.includes(u))continue;let c=w[u];if(c&&o.includes(c)&&Array.isArray(e[u])){if(s===e)s={...e};let h=Array.isArray(s[c])?s[c]:[];s[c]=[...h,...e[u]],delete s[u],k(`[stx] ${a}.${u} is not a head key; reading it as ${a}.${c}. Rename it to \`${c}\`.`);continue}if(/^styles?$/.test(u)&&!o.includes("style")){k(`[stx] ${a}.${u} is not a head key and is ignored. Use \`link\` with rel: 'stylesheet', or \`headRaw\` for an inline <style>.`);continue}let p=M(u,o);k(p?`[stx] ${a}.${u} is not a head key and is ignored. Did you mean \`${p}\`?`:`[stx] ${a}.${u} is not a head key and is ignored. Known keys: ${o.join(", ")}.`)}return A.set(e,s),s}var d={},D=[],g={};function _s(){return d}function Ku(){return g}function Xu(){d={},D.length=0,g={}}function vi(e){d=pe(d,de(e,{known:tr,source:"useHead()"}))}function pe(e,n){return{title:n.title??e.title,titleTemplate:n.titleTemplate??e.titleTemplate,base:n.base??e.base,meta:[...e.meta||[],...n.meta||[]],link:[...e.link||[],...n.link||[]],script:[...e.script||[],...n.script||[]],style:[...e.style||[],...n.style||[]],htmlAttrs:{...e.htmlAttrs,...n.htmlAttrs},bodyAttrs:{...e.bodyAttrs,...n.bodyAttrs}}}function Tc(e){vi(nr(e))}function nr(e){let n=[];if(e.description)n.push({name:"description",content:e.description});if(e.keywords){let p=Array.isArray(e.keywords)?e.keywords.join(", "):e.keywords;n.push({name:"keywords",content:p})}if(e.author)n.push({name:"author",content:e.author});if(e.robots)n.push({name:"robots",content:e.robots});let r=e.ogTitle??e.title,o=e.ogDescription??e.description;if(r)n.push({property:"og:title",content:r});if(o)n.push({property:"og:description",content:o});if(e.ogImage){if(n.push({property:"og:image",content:e.ogImage}),e.ogImageType)n.push({property:"og:image:type",content:e.ogImageType});if(e.ogImageWidth)n.push({property:"og:image:width",content:String(e.ogImageWidth)});if(e.ogImageHeight)n.push({property:"og:image:height",content:String(e.ogImageHeight)});if(e.ogImageAlt)n.push({property:"og:image:alt",content:e.ogImageAlt})}if(e.ogUrl)n.push({property:"og:url",content:e.ogUrl});if(e.ogType)n.push({property:"og:type",content:e.ogType});if(e.ogSiteName)n.push({property:"og:site_name",content:e.ogSiteName});if(e.ogLocale)n.push({property:"og:locale",content:e.ogLocale});if(e.profileFirstName)n.push({property:"profile:first_name",content:e.profileFirstName});if(e.profileLastName)n.push({property:"profile:last_name",content:e.profileLastName});if(e.profileUsername)n.push({property:"profile:username",content:e.profileUsername});let a=e.twitterTitle??e.title,s=e.twitterDescription??e.description,u=e.twitterImage??e.ogImage;if(e.twitterCard)n.push({name:"twitter:card",content:e.twitterCard});if(a)n.push({name:"twitter:title",content:a});if(s)n.push({name:"twitter:description",content:s});if(u){n.push({name:"twitter:image",content:u});let p=e.twitterImageAlt??(e.twitterImage?void 0:e.ogImageAlt);if(p)n.push({name:"twitter:image:alt",content:p})}if(e.twitterSite)n.push({name:"twitter:site",content:e.twitterSite});if(e.twitterCreator)n.push({name:"twitter:creator",content:e.twitterCreator});if(e.articleAuthor)n.push({property:"article:author",content:e.articleAuthor});if(e.articlePublishedTime)n.push({property:"article:published_time",content:e.articlePublishedTime});if(e.articleModifiedTime)n.push({property:"article:modified_time",content:e.articleModifiedTime});if(e.articleSection)n.push({property:"article:section",content:e.articleSection});if(e.articleTags)for(let p of e.articleTags)n.push({property:"article:tag",content:p});let c=[];if(e.canonical)c.push({rel:"canonical",href:e.canonical});return{title:e.title,titleTemplate:e.titleTemplate,meta:n,link:c}}function Gu(e){if(g={...g,...e},e.title||e.description)Tc({title:e.title,description:e.description})}function Ju(e){let n=typeof e==="function"?e():e;vi({title:n})}function Yu(e=d){let n=[];if(e.title){let r=e.title;if(e.titleTemplate)r=typeof e.titleTemplate==="function"?e.titleTemplate(r):e.titleTemplate.replace("%s",r);n.push(`<title>${m(r)}</title>`)}if(e.base){let r=Object.entries(e.base).map(([o,a])=>`${o}="${m(a)}"`).join(" ");n.push(`<base ${r}>`)}for(let r of e.meta||[]){let o=Object.entries(r).filter(([a,s])=>s!==void 0).map(([a,s])=>`${a==="httpEquiv"?"http-equiv":a}="${m(String(s))}"`).join(" ");n.push(`<meta ${o}>`)}for(let r of e.link||[]){let o=Object.entries(r).filter(([a,s])=>s!==void 0).map(([a,s])=>`${a}="${m(String(s))}"`).join(" ");n.push(`<link ${o}>`)}for(let r of e.script||[]){let{content:o,...a}=r,s=Object.entries(a).filter(([u,c])=>c!==void 0).map(([u,c])=>{if(typeof c==="boolean")return c?u:"";return`${u}="${m(String(c))}"`}).filter(Boolean).join(" ");if(o)n.push(`<script ${s}>${o}</script>`);else n.push(`<script ${s}></script>`)}for(let r of e.style||[]){let o=r.type?` type="${r.type}"`:"";n.push(`<style${o}>${r.content}</style>`)}return n.join(`
4
+ `)}function Zu(e=d){if(!e.htmlAttrs)return"";return Object.entries(e.htmlAttrs).map(([n,r])=>`${n}="${m(r)}"`).join(" ")}function Qu(e=d){if(!e.bodyAttrs)return"";return Object.entries(e.bodyAttrs).map(([n,r])=>`${n}="${m(r)}"`).join(" ")}function m(e){return e.replace(/&/g,"&amp;").replace(/</g,"&lt;").replace(/>/g,"&gt;").replace(/"/g,"&quot;").replace(/'/g,"&#039;")}function ed(e=d){if(typeof document>"u")return;if(e.title){let n=e.title;if(e.titleTemplate)n=typeof e.titleTemplate==="function"?e.titleTemplate(n):e.titleTemplate.replace("%s",n);document.title=n}for(let n of e.meta||[]){let r=n.name?`meta[name="${n.name}"]`:n.property?`meta[property="${n.property}"]`:null;if(r){let o=document.querySelector(r);if(!o){if(o=document.createElement("meta"),n.name)o.setAttribute("name",n.name);if(n.property)o.setAttribute("property",n.property);document.head.appendChild(o)}o.setAttribute("content",n.content)}}for(let n of e.link||[]){let r=`link[rel="${n.rel}"]${n.href?`[href="${n.href}"]`:""}`,o=document.querySelector(r);if(!o)o=document.createElement("link"),document.head.appendChild(o);for(let[a,s]of Object.entries(n))if(s!==void 0)o.setAttribute(a,String(s))}if(e.htmlAttrs)for(let[n,r]of Object.entries(e.htmlAttrs))if(n==="class")for(let o of String(r).split(/\s+/).filter(Boolean))document.documentElement.classList.add(o);else document.documentElement.setAttribute(n,r);if(e.bodyAttrs)for(let[n,r]of Object.entries(e.bodyAttrs))document.body.setAttribute(n,r)}function td(e){let n="";return{content:e.replace(/@head\s*([\s\S]*?)@endhead/g,(o,a)=>(n+=a.trim()+`
5
+ `,"")),headContent:n.trim()}}function nd(e,n){return e.replace(/@title\s*\(\s*(?:(['"`])(.+?)\1|([^)]+))\s*\)/g,(r,o,a,s)=>{let u=o?a:n[(s||"").trim()]??s,c=n.__stx_runtime_head??{};return n.__stx_runtime_head=pe(c,{title:u}),""})}function rd(e,n,r=""){if(!e.includes("@meta"))return e;return Xe(e,/(?<![\w$@])@meta\s*\(/g,(o,a)=>{let s=ln(Ge(o),n);if(s.kind==="error")return E("Meta",a,s.message,r,s.code);if(s.kind==="tag"){let u=n.__stx_runtime_head??{};n.__stx_runtime_head=pe(u,{meta:[s.tag]})}return""},(o)=>E("Meta",o,"the call has no closing parenthesis",r,t.INVALID_DIRECTIVE_SYNTAX))}export{S,Ts,Xe,Ge,Je,ue,we,E,er,ln,un,tr,de,_s,Ku,Xu,vi,pe,Tc,nr,Gu,Ju,Yu,Zu,Qu,ed,td,nd,rd};
@@ -0,0 +1,2 @@
1
+ // @bun
2
+ import{d,is,Jo,Yo,hc,yc,bc,wc,vc,xc,Ve,L,Ue,Sc,Wn,kc,ci,Cc,We,r,qn,li,g,ee,Bu}from"./chunk-n38wvr7z.js";import"./chunk-bq2e9qf6.js";import"./chunk-8xz8t9xp.js";import"./chunk-0trfbqa7.js";import"./chunk-br1gra4w.js";import"./chunk-zydg3wgt.js";import"./chunk-4fa3jec9.js";import"./chunk-exgyf65a.js";import"./chunk-r6pax860.js";import"./chunk-h9e032kq.js";import"./chunk-w1zvh5y7.js";import"./chunk-nmf12mx3.js";import"./chunk-jz7pvh7b.js";export{ee as clearComponentCache,Cc as componentClientSignalNames,is as convertToCommonJS,g as createDetailedErrorMessage,vc as extractDirectiveNames,Jo as extractScriptFromTemplate,d as extractVariables,r as fileExists,Bu as getComponentCacheStats,yc as getPositionInfo,L as getSharedTranspiler,li as getSourceLineInfo,wc as hasDirectives,Yo as hasVariables,kc as isHydrateTrigger,xc as isJavaScriptScript,We as renderComponentWithSlot,qn as resolveTemplatePath,Sc as scopeOnRootElement,Ve as shouldTranspileTypeScript,ci as slotContentHasExpressions,Ue as transpileTypeScript,Wn as userComponentFileExists,bc as validateDirective,hc as validateTemplate};
@@ -1,5 +1,5 @@
1
1
  // @bun
2
- import{oe,pt}from"./chunk-9ndzk9r4.js";import{fe}from"./chunk-yqsza22w.js";function m(e){let t={"cache-first":{className:"CacheFirst",importFrom:"workbox-strategies"},"network-first":{className:"NetworkFirst",importFrom:"workbox-strategies"},"stale-while-revalidate":{className:"StaleWhileRevalidate",importFrom:"workbox-strategies"},"network-only":{className:"NetworkOnly",importFrom:"workbox-strategies"},"cache-only":{className:"CacheOnly",importFrom:"workbox-strategies"}};return t[e]||t["network-first"]}function g(e){return m(e).className}function d(e){let t=e.pwa;if(!t?.enabled)return"";let r=t.routes||[],n=t.cacheStorage,c=[];for(let a of r){let i=g(a.strategy),s=[];if(a.maxAgeSeconds||a.maxEntries||n?.maxEntries){let o=a.maxEntries||n?.maxEntries||100,u=a.maxAgeSeconds||(n?.maxAge?n.maxAge*24*60*60:void 0);s.push(`new ExpirationPlugin({
2
+ import{oe,ft}from"./chunk-vg7wfkt5.js";import{fe}from"./chunk-58n62bxb.js";function m(e){let t={"cache-first":{className:"CacheFirst",importFrom:"workbox-strategies"},"network-first":{className:"NetworkFirst",importFrom:"workbox-strategies"},"stale-while-revalidate":{className:"StaleWhileRevalidate",importFrom:"workbox-strategies"},"network-only":{className:"NetworkOnly",importFrom:"workbox-strategies"},"cache-only":{className:"CacheOnly",importFrom:"workbox-strategies"}};return t[e]||t["network-first"]}function g(e){return m(e).className}function d(e){let t=e.pwa;if(!t?.enabled)return"";let r=t.routes||[],n=t.cacheStorage,c=[];for(let a of r){let i=g(a.strategy),s=[];if(a.maxAgeSeconds||a.maxEntries||n?.maxEntries){let o=a.maxEntries||n?.maxEntries||100,u=a.maxAgeSeconds||(n?.maxAge?n.maxAge*24*60*60:void 0);s.push(`new ExpirationPlugin({
3
3
  maxEntries: ${o},
4
4
  ${u?`maxAgeSeconds: ${u},`:""}
5
5
  purgeOnQuotaError: true,
@@ -17,7 +17,7 @@ registerRoute(
17
17
  ],`:""}
18
18
  })
19
19
  );`)}return c.join(`
20
- `)}function p(e){if(e.startsWith("*.")){let t=e.slice(2);return`({ request }) => request.destination === '${f(t)}'`}if(e.endsWith("/**"))return`({ url }) => url.pathname.startsWith('${e.slice(0,-3)}')`;if(e.endsWith("/*")){let t=e.slice(0,-2);return`({ url }) => url.pathname.startsWith('${t}') && !url.pathname.slice(${t.length+1}).includes('/')`}if(e.includes("*")&&!e.startsWith("*")){let[t,r]=e.split("*");return`({ url }) => url.pathname.startsWith('${t}') && url.pathname.endsWith('${r}')`}if(e==="/"||!e.includes("*"))return`({ url }) => url.pathname === '${e}'`;return`new RegExp('${x(e).replace(/\\\*/g,".*")}')`}function f(e){return{js:"script",mjs:"script",css:"style",html:"document",htm:"document",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"}[e.toLowerCase()]||"empty"}function h(e){return"stx-"+e.replace(/[^\w]/g,"-").replace(/-+/g,"-").replace(/^-|-$/g,"").toLowerCase().slice(0,30)+"-cache"}function x(e){return e.replace(/[.*+?^${}()|[\]\\]/g,"\\$&")}function b(e,t){let r=e.pwa;if(!r?.enabled)return{mode:"generate",modules:[],skipWaiting:!0,clientsClaim:!0};let n=r.serviceWorker||{},c=r.routes||[],a=[{name:"workbox-precaching",exports:["precacheAndRoute","cleanupOutdatedCaches"]},{name:"workbox-routing",exports:["registerRoute","NavigationRoute","setDefaultHandler"]}],i=new Set;for(let o of c)i.add(g(o.strategy));if(i.size>0)a.push({name:"workbox-strategies",exports:Array.from(i)});if(c.some((o)=>o.maxAgeSeconds||o.maxEntries)||r.cacheStorage)a.push({name:"workbox-expiration",exports:["ExpirationPlugin"]});if(c.some((o)=>o.strategy==="network-first"||o.strategy==="stale-while-revalidate"))a.push({name:"workbox-cacheable-response",exports:["CacheableResponsePlugin"]});if(r.backgroundSync?.enabled)a.push({name:"workbox-background-sync",exports:["BackgroundSyncPlugin","Queue"]});if(n.navigationPreload)a.push({name:"workbox-navigation-preload",exports:["enable"]});let l=t?oe(t,e):void 0;return{mode:"generate",modules:a,precacheManifest:l?.entries,skipWaiting:n.skipWaiting??!0,clientsClaim:n.clientsClaim??!0,offlineFallback:r.offline?.enabled?"/offline.html":void 0,navigationPreload:n.navigationPreload??!1,cacheVersion:n.cacheVersion||"1.0.0"}}function W(e,t){let r=e.pwa;if(!r?.enabled)return"";let n=b(e,t),c=r.serviceWorker||{},{push:a,backgroundSync:i}=r,s=t?oe(t,e):null,l=s?pt(s):"[]",o=k(n.modules),u=d(e);return`/**
20
+ `)}function p(e){if(e.startsWith("*.")){let t=e.slice(2);return`({ request }) => request.destination === '${f(t)}'`}if(e.endsWith("/**"))return`({ url }) => url.pathname.startsWith('${e.slice(0,-3)}')`;if(e.endsWith("/*")){let t=e.slice(0,-2);return`({ url }) => url.pathname.startsWith('${t}') && !url.pathname.slice(${t.length+1}).includes('/')`}if(e.includes("*")&&!e.startsWith("*")){let[t,r]=e.split("*");return`({ url }) => url.pathname.startsWith('${t}') && url.pathname.endsWith('${r}')`}if(e==="/"||!e.includes("*"))return`({ url }) => url.pathname === '${e}'`;return`new RegExp('${x(e).replace(/\\\*/g,".*")}')`}function f(e){return{js:"script",mjs:"script",css:"style",html:"document",htm:"document",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"}[e.toLowerCase()]||"empty"}function h(e){return"stx-"+e.replace(/[^\w]/g,"-").replace(/-+/g,"-").replace(/^-|-$/g,"").toLowerCase().slice(0,30)+"-cache"}function x(e){return e.replace(/[.*+?^${}()|[\]\\]/g,"\\$&")}function b(e,t){let r=e.pwa;if(!r?.enabled)return{mode:"generate",modules:[],skipWaiting:!0,clientsClaim:!0};let n=r.serviceWorker||{},c=r.routes||[],a=[{name:"workbox-precaching",exports:["precacheAndRoute","cleanupOutdatedCaches"]},{name:"workbox-routing",exports:["registerRoute","NavigationRoute","setDefaultHandler"]}],i=new Set;for(let o of c)i.add(g(o.strategy));if(i.size>0)a.push({name:"workbox-strategies",exports:Array.from(i)});if(c.some((o)=>o.maxAgeSeconds||o.maxEntries)||r.cacheStorage)a.push({name:"workbox-expiration",exports:["ExpirationPlugin"]});if(c.some((o)=>o.strategy==="network-first"||o.strategy==="stale-while-revalidate"))a.push({name:"workbox-cacheable-response",exports:["CacheableResponsePlugin"]});if(r.backgroundSync?.enabled)a.push({name:"workbox-background-sync",exports:["BackgroundSyncPlugin","Queue"]});if(n.navigationPreload)a.push({name:"workbox-navigation-preload",exports:["enable"]});let l=t?oe(t,e):void 0;return{mode:"generate",modules:a,precacheManifest:l?.entries,skipWaiting:n.skipWaiting??!0,clientsClaim:n.clientsClaim??!0,offlineFallback:r.offline?.enabled?"/offline.html":void 0,navigationPreload:n.navigationPreload??!1,cacheVersion:n.cacheVersion||"1.0.0"}}function W(e,t){let r=e.pwa;if(!r?.enabled)return"";let n=b(e,t),c=r.serviceWorker||{},{push:a,backgroundSync:i}=r,s=t?oe(t,e):null,l=s?ft(s):"[]",o=k(n.modules),u=d(e);return`/**
21
21
  * Service Worker - Generated by stx with Workbox
22
22
  * Cache Version: ${n.cacheVersion}
23
23
  *
@@ -159,7 +159,7 @@ else {
159
159
  stxIslands.initIslands();
160
160
  }
161
161
  })();
162
- </script>`}function b(e){let t=e.match(/<([A-Z][a-zA-Z0-9]+)[\s/>]/);if(t)return t[1];let n=e.match(/<([a-z][a-z0-9]*-[a-z0-9-]+)[\s/>]/);if(n)return n[1];return null}function w(e,t){let n={},r=/:([a-zA-Z_][\w-]*)\s*=\s*"([^"]+)"/g,i;while((i=r.exec(e))!==null){let d=i[1],o=i[2];if(o in t)n[d]=t[o];else n[d]=o}return n}function da(){let e=new Map;return{islands:e,register(t){e.set(t.id,t)},get(t){return e.get(t)},async hydrate(t){let n=e.get(t);if(!n||n.hydrated)return;if(n.hydrated=!0,typeof window<"u"&&typeof window.dispatchEvent==="function")window.dispatchEvent(new CustomEvent("stx:hydrate",{detail:{id:t,component:n.component}}))},async hydrateAll(){let t=Array.from(e.values()).filter((n)=>!n.hydrated).map((n)=>this.hydrate(n.id));await Promise.all(t)}}}function I(e){return`
162
+ </script>`}function b(e){let t=e.match(/<([A-Z][a-zA-Z0-9]+)[\s/>]/);if(t)return t[1];let n=e.match(/<([a-z][a-z0-9]*-[a-z0-9-]+)[\s/>]/);if(n)return n[1];return null}function w(e,t){let n={},r=/:([a-zA-Z_][\w-]*)\s*=\s*"([^"]+)"/g,i;while((i=r.exec(e))!==null){let d=i[1],o=i[2];if(o in t)n[d]=t[o];else n[d]=o}return n}function pa(){let e=new Map;return{islands:e,register(t){e.set(t.id,t)},get(t){return e.get(t)},async hydrate(t){let n=e.get(t);if(!n||n.hydrated)return;if(n.hydrated=!0,typeof window<"u"&&typeof window.dispatchEvent==="function")window.dispatchEvent(new CustomEvent("stx:hydrate",{detail:{id:t,component:n.component}}))},async hydrateAll(){let t=Array.from(e.values()).filter((n)=>!n.hydrated).map((n)=>this.hydrate(n.id));await Promise.all(t)}}}function I(e){return`
163
163
  <script data-hydrate="${e}">
164
164
  (function() {
165
165
  const island = document.querySelector('[data-island="${e}"]');
@@ -311,7 +311,7 @@ else {
311
311
  });
312
312
  })();
313
313
  </script>
314
- `}function pa(e,t={},n){let r=e,i=!1,d=/@client:(load|idle|visible|media|only|hover|event)/i.test(e);if(r=u(r,"load",t),r=u(r,"idle",t),r=u(r,"visible",t),r=u(r,"media",t),r=M(r),r=u(r,"hover",t),r=u(r,"event",t),i=d&&r!==e,i)r+=`
314
+ `}function fa(e,t={},n){let r=e,i=!1,d=/@client:(load|idle|visible|media|only|hover|event)/i.test(e);if(r=u(r,"load",t),r=u(r,"idle",t),r=u(r,"visible",t),r=u(r,"media",t),r=M(r),r=u(r,"hover",t),r=u(r,"event",t),i=d&&r!==e,i)r+=`
315
315
  `+v();return r}function u(e,t,n){let r=new RegExp(`@client:${t}(?:\\s*\\(([^)]*)\\))?\\s*([\\s\\S]*?)@endclient`,"gi");return e.replace(r,(i,d,o)=>{let a={strategy:t};if(d)try{let E=d.split(",").map((h)=>h.trim());for(let h of E){let[m,g]=h.split(":").map((p)=>p.trim());if(m&&g){let p=g.replace(/^['"]|['"]$/g,"");a[m]=p}}}catch{}let s=`island-${Math.random().toString(36).substring(2,9)}`,y=b(o.trim()),f=w(o.trim(),n),c=[];if(a.rootMargin)c.push(`data-root-margin="${a.rootMargin}"`);if(a.threshold!==void 0)c.push(`data-threshold="${a.threshold}"`);if(a.media)c.push(`data-media="${a.media}"`);if(a.event)c.push(`data-event="${a.event}"`);if(y)c.push(`data-component="${y}"`);let x=Object.keys(f).length>0?`
316
316
  <script type="application/json" data-island-props="${s}">${JSON.stringify(f)}</script>`:"",l="";switch(t){case"load":l=I(s);break;case"idle":l=L(s,a);break;case"visible":l=C(s,a);break;case"media":l=S(s,a);break;case"hover":l=k(s);break;case"event":l=H(s,a);break}return`
317
317
  <div data-island="${s}"
@@ -342,7 +342,7 @@ else {
342
342
  }
343
343
  })();
344
344
  </script>
345
- `})}function fa(){return`
345
+ `})}function ga(){return`
346
346
  /* Island base styles */
347
347
  .stx-island {
348
348
  display: contents;
@@ -383,9 +383,9 @@ else {
383
383
  .stx-island.hydrated {
384
384
  opacity: 1;
385
385
  }
386
- `}function ga(e){if(typeof window>"u")return;let t=document.querySelector(`[data-island="${e}"]`);if(!t||t.classList.contains("hydrated"))return;t.classList.add("hydrated"),t.dispatchEvent(new CustomEvent("stx:hydrated",{bubbles:!0}))}function ma(e){if(typeof window>"u")return;document.querySelectorAll(`[data-strategy="${e}"]:not(.hydrated)`).forEach((n)=>{n.classList.add("hydrated"),n.dispatchEvent(new CustomEvent("stx:hydrated",{bubbles:!0}))})}function ha(){if(typeof window>"u")return;document.querySelectorAll(".stx-island:not(.hydrated)").forEach((t)=>{t.classList.add("hydrated"),t.dispatchEvent(new CustomEvent("stx:hydrated",{bubbles:!0}))})}function ya(e){if(typeof window>"u")return!1;return document.querySelector(`[data-island="${e}"]`)?.classList.contains("hydrated")??!1}function ba(e){return new Promise((t)=>{if(typeof window>"u"){t();return}let n=document.querySelector(`[data-island="${e}"]`);if(!n){t();return}if(n.classList.contains("hydrated")){t();return}n.addEventListener("stx:hydrated",()=>t(),{once:!0})})}function wa(e){return e.replace(/@static\s*([\s\S]*?)@endstatic/gi,(t,n)=>`<div class="stx-static">${n.trim()}</div>`)}function va(e){let t=e.map((n)=>({id:n.id,component:n.component,strategy:n.options.strategy,props:n.props}));return`
386
+ `}function ma(e){if(typeof window>"u")return;let t=document.querySelector(`[data-island="${e}"]`);if(!t||t.classList.contains("hydrated"))return;t.classList.add("hydrated"),t.dispatchEvent(new CustomEvent("stx:hydrated",{bubbles:!0}))}function ha(e){if(typeof window>"u")return;document.querySelectorAll(`[data-strategy="${e}"]:not(.hydrated)`).forEach((n)=>{n.classList.add("hydrated"),n.dispatchEvent(new CustomEvent("stx:hydrated",{bubbles:!0}))})}function ya(){if(typeof window>"u")return;document.querySelectorAll(".stx-island:not(.hydrated)").forEach((t)=>{t.classList.add("hydrated"),t.dispatchEvent(new CustomEvent("stx:hydrated",{bubbles:!0}))})}function ba(e){if(typeof window>"u")return!1;return document.querySelector(`[data-island="${e}"]`)?.classList.contains("hydrated")??!1}function wa(e){return new Promise((t)=>{if(typeof window>"u"){t();return}let n=document.querySelector(`[data-island="${e}"]`);if(!n){t();return}if(n.classList.contains("hydrated")){t();return}n.addEventListener("stx:hydrated",()=>t(),{once:!0})})}function va(e){return e.replace(/@static\s*([\s\S]*?)@endstatic/gi,(t,n)=>`<div class="stx-static">${n.trim()}</div>`)}function xa(e){let t=e.map((n)=>({id:n.id,component:n.component,strategy:n.options.strategy,props:n.props}));return`
387
387
  <script type="application/json" id="stx-island-manifest">
388
388
  ${JSON.stringify(t)}
389
389
  </script>
390
- `}var fl={processPartialHydrationDirectives:pa,processStaticDirectives:wa,generatePartialHydrationCSS:fa,generateIslandManifest:va,createIslandRegistry:da,hydrateIsland:ga,hydrateByStrategy:ma,hydrateAll:ha,isHydrated:ya,onHydrated:ba};
391
- export{da,pa,fa,ga,ma,ha,ya,ba,wa,va,fl};
390
+ `}var gl={processPartialHydrationDirectives:fa,processStaticDirectives:va,generatePartialHydrationCSS:ga,generateIslandManifest:xa,createIslandRegistry:pa,hydrateIsland:ma,hydrateByStrategy:ha,hydrateAll:ya,isHydrated:ba,onHydrated:wa};
391
+ export{pa,fa,ga,ma,ha,ya,ba,wa,va,xa,gl};
@@ -0,0 +1,2 @@
1
+ // @bun
2
+ import{Ct,as,Zo,gc}from"./chunk-n38wvr7z.js";import"./chunk-bq2e9qf6.js";import"./chunk-8xz8t9xp.js";import"./chunk-0trfbqa7.js";import"./chunk-br1gra4w.js";import"./chunk-zydg3wgt.js";import"./chunk-4fa3jec9.js";import"./chunk-exgyf65a.js";import"./chunk-r6pax860.js";import"./chunk-h9e032kq.js";import"./chunk-w1zvh5y7.js";import"./chunk-nmf12mx3.js";import"./chunk-jz7pvh7b.js";export{gc as declareBareLoopHead,Ct as parseLoopBinding,Zo as processLoops,as as reportDeferredLoopWarnings};
@@ -1,5 +1,5 @@
1
1
  // @bun
2
- function R(s){let o=/import\s*\{([^}]+)\}\s*from\s*['"](@stores|stx\/stores)['"]\s*;?\n?/g;s=s.replace(o,(e,t)=>`const { ${t.split(",").map((r)=>r.trim()).filter(Boolean).join(", ")} } = window.__STX_STORES__
2
+ function P(s){let o=/import\s*\{([^}]+)\}\s*from\s*['"](@stores|stx\/stores)['"]\s*;?\n?/g;s=s.replace(o,(e,t)=>`const { ${t.split(",").map((r)=>r.trim()).filter(Boolean).join(", ")} } = window.__STX_STORES__
3
3
  `);let n=/import\s*\{([^}]+)\}\s*from\s*['"]@composables['"]\s*;?\n?/g;return s=s.replace(n,(e,t)=>`const { ${t.split(",").map((r)=>r.trim()).filter(Boolean).join(", ")} } = window.__composables
4
- `),s}function Tt(s){return s.replace(/^import\s+[^'"]*?from\s*['"][^'"]+['"]\s*;?[ \t]*$/gm,"").replace(/^import\s+['"][^'"]+['"]\s*;?[ \t]*$/gm,"")}
5
- export{R,Tt};
4
+ `),s}function _t(s){return s.replace(/^import\s+[^'"]*?from\s*['"][^'"]+['"]\s*;?[ \t]*$/gm,"").replace(/^import\s+['"][^'"]+['"]\s*;?[ \t]*$/gm,"")}
5
+ export{P,_t};
@@ -0,0 +1,2 @@
1
+ // @bun
2
+ import{Ls}from"./chunk-jz7pvh7b.js";export{Ls as warnUnbalancedTags};
@@ -0,0 +1,2 @@
1
+ // @bun
2
+ import{pa,fa,ga,ma,ha,ya,ba,wa,va,xa,gl}from"./chunk-gkqxnetc.js";export{pa as createIslandRegistry,gl as default,xa as generateIslandManifest,ga as generatePartialHydrationCSS,ya as hydrateAll,ha as hydrateByStrategy,ma as hydrateIsland,ba as isHydrated,wa as onHydrated,fa as processPartialHydrationDirectives,va as processStaticDirectives};
@@ -0,0 +1,2 @@
1
+ // @bun
2
+ import{An,Fr,Ia,Da,Oa}from"./chunk-tpvc8xnk.js";import"./chunk-d3mpxr3s.js";export{Da as generateManifestLink,An as generatePwaTags,Ia as generateSwRegistrationScript,Oa as generateThemeColorMeta,Fr as injectPwaTags};
@@ -0,0 +1,2 @@
1
+ // @bun
2
+ import{Tr,_r,Rr,oa,Ar,Pr,ia,Ir,Dr,fo,aa}from"./chunk-n1dyjhte.js";export{Tr as VideoProcessorCache,fo as analyzeVideo,oa as clearVideoCache,Dr as generateDASHManifest,Ir as generateHLSManifest,Ar as generatePoster,ia as generateSpriteSheet,Pr as generateThumbnails,_r as getCachedVideoResult,aa as processVideo,Rr as setCachedVideoResult};
@@ -0,0 +1,2 @@
1
+ // @bun
2
+ import{W,qr,Kr,Ha,wt,Lo,Xr,jo,bu,Ne,Gr,me}from"./chunk-n38wvr7z.js";import"./chunk-bq2e9qf6.js";import"./chunk-8xz8t9xp.js";import{mi,s}from"./chunk-y3cqh2jv.js";import"./chunk-0trfbqa7.js";import"./chunk-br1gra4w.js";import"./chunk-zydg3wgt.js";import"./chunk-4fa3jec9.js";import"./chunk-exgyf65a.js";import"./chunk-r6pax860.js";import"./chunk-h9e032kq.js";import"./chunk-w1zvh5y7.js";import"./chunk-nmf12mx3.js";import"./chunk-jz7pvh7b.js";export{W as BROWSER_CORE_IMPORTS,Ha as STX_AUTO_IMPORTS,qr as extractAndStripCssImports,Ne as extractBridgeData,mi as findInterpolationEnd,jo as generateAutoImportDestructuring,bu as generateBrowserAutoImportDestructuring,Gr as generateServerDataBridge,wt as injectBrowserCoreAutoImports,me as processClientScript,Xr as referencesName,Kr as renderVendorStyleTags,s as stripCommentsAndLiterals,Lo as transformAutoImports};
@@ -0,0 +1,2 @@
1
+ // @bun
2
+ import{Ea}from"./chunk-2bdthb37.js";export{Ea as rewriteImagesWithSiblings};
@@ -0,0 +1,2 @@
1
+ // @bun
2
+ import{Zl,yo,Ta,Ql,eu,tu,nu,ru,_a,Ra,su,ou,iu,au}from"./chunk-y2v0hny6.js";import"./chunk-n38wvr7z.js";import"./chunk-bq2e9qf6.js";import"./chunk-8xz8t9xp.js";import"./chunk-0trfbqa7.js";import"./chunk-br1gra4w.js";import"./chunk-zydg3wgt.js";import"./chunk-4fa3jec9.js";import"./chunk-exgyf65a.js";import"./chunk-r6pax860.js";import"./chunk-h9e032kq.js";import"./chunk-w1zvh5y7.js";import"./chunk-nmf12mx3.js";import"./chunk-jz7pvh7b.js";export{Ta as SUSPENSE_RESOLVER_RUNTIME,yo as buildSuspenseResolveScript,ru as createStreamRenderer,tu as extractStreamBoundaries,au as generateHydrationRuntime,Ra as islandDirective,ou as processSectionDirectives,eu as processStreamDirectives,su as registerStreamingDirectives,Ql as renderStreamingPage,Zl as streamTemplate,nu as streamTemplateSimple,iu as streamToResponse,_a as streamingSuspenseDirective};
@@ -0,0 +1,2 @@
1
+ // @bun
2
+ import{Cr,$r,Er,ea,ta,na,po,ra,sa}from"./chunk-ab56jdah.js";export{Cr as ImageProcessorCache,po as applyTransformations,ea as clearImageCache,ra as generateResponsiveVariants,sa as generateSrcset,$r as getCachedImageResult,na as optimizeImage,ta as processImage,Er as setCachedImageResult};
@@ -1,5 +1,5 @@
1
1
  // @bun
2
- import{Pn,Oe,Ne,me,Uo,Nn,Z,q,nn,d,n,A}from"./chunk-nrp8qg9j.js";import{dirname as C,resolve as R}from"path";function h(o){return o.endsWith(".md")||o.endsWith(".markdown")}function _(o){let e=[];m(/<pre\b[^>]*>[\s\S]*?<\/pre>/gi);let r=[...e];m(/<code\b[^>]*>[\s\S]*?<\/code>/gi,r);function m(s,p){let u;while((u=s.exec(o))!==null){let t=u.index,i=t+u[0].length;if(p?.some((l)=>t>=l.start&&i<=l.end))continue;e.push({start:t,end:i})}}if(e.length===0)return o;e.sort((s,p)=>s.start-p.start);let a="",c=0;for(let s of e){if(s.start<c)continue;a+=o.slice(c,s.start),a+=`@raw${o.slice(s.start,s.end)}@endraw`,c=s.end}return a+=o.slice(c),a}async function b(o,e={}){let{data:r,content:m}=Pn(o),c=await(e.renderer??((s)=>Oe(s)))(m);return{html:_(c),frontmatter:r??{}}}function k(o){let e=o,r=Z(o);if(r)e=r.content.trim();let m=/<script\b([^>]*)>([\s\S]*?)<\/script>/gi,a=[],c=[],s=[],p=(i)=>/\b(?:state|derived|effect|batch)\s*(?:<[^<>()]*>)?\s*\(/.test(i),u;while((u=m.exec(o))!==null){let i=u[1],l=u[2],f=u[0],g=i.includes("server");if(p(l))s.push(f);else if(g)c.push(l);else a.push(f)}let t=e;{let i=/<script\b(?![^>]*\b(?:client|type\s*=\s*["']module["']|src\s*=))[^>]*>/gi,l,f=[];while((l=i.exec(t))!==null){let g=l.index+l[0].length,x=t.indexOf("</script>",g);if(x===-1)continue;f.push({start:l.index,end:x+9}),i.lastIndex=x+9}for(let g=f.length-1;g>=0;g--)t=t.substring(0,f[g].start)+t.substring(f[g].end)}for(let i of a)t=t.replace(i,"");return{templateContent:t,serverScripts:c,clientScripts:a,signalsScripts:s}}function v(o,e){return`<!DOCTYPE html>
2
+ import{In,Oe,Ne,me,Wo,Ln,Z,K,rn,d,n,I}from"./chunk-n38wvr7z.js";import{dirname as C,resolve as R}from"path";function h(o){return o.endsWith(".md")||o.endsWith(".markdown")}function _(o){let e=[];m(/<pre\b[^>]*>[\s\S]*?<\/pre>/gi);let r=[...e];m(/<code\b[^>]*>[\s\S]*?<\/code>/gi,r);function m(s,p){let u;while((u=s.exec(o))!==null){let t=u.index,i=t+u[0].length;if(p?.some((l)=>t>=l.start&&i<=l.end))continue;e.push({start:t,end:i})}}if(e.length===0)return o;e.sort((s,p)=>s.start-p.start);let a="",c=0;for(let s of e){if(s.start<c)continue;a+=o.slice(c,s.start),a+=`@raw${o.slice(s.start,s.end)}@endraw`,c=s.end}return a+=o.slice(c),a}async function b(o,e={}){let{data:r,content:m}=In(o),c=await(e.renderer??((s)=>Oe(s)))(m);return{html:_(c),frontmatter:r??{}}}function k(o){let e=o,r=Z(o);if(r)e=r.content.trim();let m=/<script\b([^>]*)>([\s\S]*?)<\/script>/gi,a=[],c=[],s=[],p=(i)=>/\b(?:state|derived|effect|batch)\s*(?:<[^<>()]*>)?\s*\(/.test(i),u;while((u=m.exec(o))!==null){let i=u[1],l=u[2],f=u[0],g=i.includes("server");if(p(l))s.push(f);else if(g)c.push(l);else a.push(f)}let t=e;{let i=/<script\b(?![^>]*\b(?:client|type\s*=\s*["']module["']|src\s*=))[^>]*>/gi,l,f=[];while((l=i.exec(t))!==null){let g=l.index+l[0].length,x=t.indexOf("</script>",g);if(x===-1)continue;f.push({start:l.index,end:x+9}),i.lastIndex=x+9}for(let g=f.length-1;g>=0;g--)t=t.substring(0,f[g].start)+t.substring(f[g].end)}for(let i of a)t=t.replace(i,"");return{templateContent:t,serverScripts:c,clientScripts:a,signalsScripts:s}}function v(o,e){return`<!DOCTYPE html>
3
3
  <html lang="en">
4
4
  <head>
5
5
  <meta charset="UTF-8">
@@ -9,10 +9,10 @@ import{Pn,Oe,Ne,me,Uo,Nn,Z,q,nn,d,n,A}from"./chunk-nrp8qg9j.js";import{dirname a
9
9
  <body>
10
10
  ${o}
11
11
  </body>
12
- </html>`}async function Eo(o,e={}){let r=R(o),m=Bun.file(r);if(!await m.exists())throw Error(`Template file not found: ${r}`);let a=await m.text(),c=null;if(h(r)){let s=await b(a,{renderer:e.markdownRenderer});a=s.html,c=s.frontmatter}if(c)e={...e,context:{...c,...e.context||{}}};if(e.layout){let s=R(e.layout),p=Bun.file(s);if(!await p.exists())throw Error(`Layout template not found: ${s}`);let{layout:u,injectCSS:t,...i}=e,l={...e.context||{}};nn(l);let f=await S(a,r,{...i,context:{...l,__stx_defer_server_data:!0},injectCSS:!1}),g=await p.text(),x={...l,content:f},w={...i,context:x,injectCSS:t};return S(g,s,w)}return S(a,r,e)}async function S(o,e,r={}){let{templateContent:m,serverScripts:a,clientScripts:c}=k(o),s={...A,...r.options},p={__filename:e,__dirname:C(e),__stx:{},__stx_options:s,__stx_sfc_mode:!0,__stx_inject_css:r.injectCSS===!0,__stxServeContext:void 0,...Nn(r.context??{}),definePageMeta:()=>{},...r.context||{}};for(let i of a)await d(i,p,e);let u=new Set,t=m;if(t=await n(t,p,e,s,u),Uo(p,r.context),r.templateOnly){if(t=t.replace(/<script data-stx-scoped>[\s\S]*?<\/script>\s*/gi,""),t=t.replace(/<!-- stx SEO Tags -->[\s\S]*?(?=<)/i,""),c.length>0)t+=`
12
+ </html>`}async function To(o,e={}){let r=R(o),m=Bun.file(r);if(!await m.exists())throw Error(`Template file not found: ${r}`);let a=await m.text(),c=null;if(h(r)){let s=await b(a,{renderer:e.markdownRenderer});a=s.html,c=s.frontmatter}if(c)e={...e,context:{...c,...e.context||{}}};if(e.layout){let s=R(e.layout),p=Bun.file(s);if(!await p.exists())throw Error(`Layout template not found: ${s}`);let{layout:u,injectCSS:t,...i}=e,l={...e.context||{}};rn(l);let f=await S(a,r,{...i,context:{...l,__stx_defer_server_data:!0},injectCSS:!1}),g=await p.text(),x={...l,content:f},w={...i,context:x,injectCSS:t};return S(g,s,w)}return S(a,r,e)}async function S(o,e,r={}){let{templateContent:m,serverScripts:a,clientScripts:c}=k(o),s={...I,...r.options},p={__filename:e,__dirname:C(e),__stx:{},__stx_options:s,__stx_sfc_mode:!0,__stx_inject_css:r.injectCSS===!0,__stxServeContext:void 0,...Ln(r.context??{}),definePageMeta:()=>{},...r.context||{}};for(let i of a)await d(i,p,e);let u=new Set,t=m;if(t=await n(t,p,e,s,u),Wo(p,r.context),r.templateOnly){if(t=t.replace(/<script data-stx-scoped>[\s\S]*?<\/script>\s*/gi,""),t=t.replace(/<!-- stx SEO Tags -->[\s\S]*?(?=<)/i,""),c.length>0)t+=`
13
13
  ${c.join(`
14
14
  `)}`}else{if(r.processClientScripts!==!1&&c.length>0){let i=p.__stx_event_bindings||[],l=Ne(p),g=(await Promise.all(c.map(async(w)=>{let y=w.match(/<script\b[^>]*>([\s\S]*?)<\/script>/);if(!y)return w;return await me(y[1],{eventBindings:i,templateContent:t,serverData:l,filePath:e})}))).join(`
15
15
  `);if(t.match(/(<\/body>)/i))t=t.replace(/(<\/body>)/i,`${g}
16
16
  $1`);else t+=`
17
- ${g}`}t=await q(t)}if(r.wrapInDocument){if(!t.trim().toLowerCase().startsWith("<!doctype")&&!t.trim().toLowerCase().startsWith("<html"))t=v(t,r.title)}if(r.injectCSS)try{let{injectCss:i}=await import("./chunk-wr3h8dmt.js");t=await i(t)}catch{}return t}
18
- export{Eo};
17
+ ${g}`}t=await K(t)}if(r.wrapInDocument){if(!t.trim().toLowerCase().startsWith("<!doctype")&&!t.trim().toLowerCase().startsWith("<html"))t=v(t,r.title)}if(r.injectCSS)try{let{injectCss:i}=await import("./chunk-491pm0a9.js");t=await i(t)}catch{}return t}
18
+ export{To};