@stacksjs/stx 0.2.634 → 0.2.636

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 (230) hide show
  1. package/dist/chunk-0bptz1km.js +2852 -0
  2. package/dist/{chunk-968jp303.js → chunk-0ergsswn.js} +3 -3
  3. package/dist/{chunk-xrkechs8.js → chunk-0j9f54wv.js} +5 -5
  4. package/dist/{chunk-p77g4mhy.js → chunk-104xw4ps.js} +2 -2
  5. package/dist/chunk-1071avjd.js +2 -0
  6. package/dist/{chunk-923vrf9c.js → chunk-17x6e5mm.js} +7 -7
  7. package/dist/chunk-1ejpz9gv.js +2 -0
  8. package/dist/{chunk-2bxsc7gf.js → chunk-1m5cjrpw.js} +4 -4
  9. package/dist/chunk-1p6yd17s.js +2 -0
  10. package/dist/{chunk-v4tmwamd.js → chunk-1s02ff6n.js} +2 -2
  11. package/dist/{chunk-27784ceh.js → chunk-215fsx0k.js} +4 -4
  12. package/dist/{chunk-8kc6byaz.js → chunk-26g3m2mg.js} +5 -5
  13. package/dist/{chunk-72p9brmx.js → chunk-26gr5d4w.js} +9 -9
  14. package/dist/chunk-2kppq4pg.js +18 -0
  15. package/dist/chunk-2yvdnffe.js +2 -0
  16. package/dist/chunk-3hkp5hym.js +2 -0
  17. package/dist/chunk-444pz8yk.js +2 -0
  18. package/dist/{chunk-pxpmx8vc.js → chunk-45xhjrha.js} +1 -1
  19. package/dist/{chunk-90pe63me.js → chunk-48yja477.js} +3 -3
  20. package/dist/chunk-4a4zc8yd.js +2 -0
  21. package/dist/chunk-4b5f28te.js +2 -0
  22. package/dist/chunk-4mm9ttc7.js +2 -0
  23. package/dist/{chunk-phbnrw2h.js → chunk-4n24jbfs.js} +2 -2
  24. package/dist/chunk-4p4qp5ka.js +2 -0
  25. package/dist/{chunk-y8h823cb.js → chunk-51ea655x.js} +41 -41
  26. package/dist/{chunk-pk757m0k.js → chunk-5e063mgs.js} +1 -1
  27. package/dist/{chunk-0hs8jgw5.js → chunk-5pyv9gjh.js} +2 -2
  28. package/dist/{chunk-gv15dd41.js → chunk-60azcvwr.js} +3 -3
  29. package/dist/{chunk-236twqn4.js → chunk-69n2ty1n.js} +3 -3
  30. package/dist/{chunk-7q55jxf5.js → chunk-6avpd901.js} +2 -2
  31. package/dist/chunk-6g4kd71m.js +2 -0
  32. package/dist/chunk-6pewcgfq.js +2 -0
  33. package/dist/chunk-6vjg5xf3.js +2 -0
  34. package/dist/chunk-6vqk6yfm.js +2 -0
  35. package/dist/{chunk-k5atee35.js → chunk-77pj0xem.js} +1 -1
  36. package/dist/{chunk-ygpa12ez.js → chunk-7ftn9ber.js} +3 -3
  37. package/dist/{chunk-g2rxbaah.js → chunk-7jp0w5j8.js} +3 -3
  38. package/dist/{chunk-jbmjcs83.js → chunk-7mkw98cr.js} +2 -2
  39. package/dist/{chunk-w9e17a74.js → chunk-7p8kyf4z.js} +4 -4
  40. package/dist/chunk-7z6ryf20.js +2 -0
  41. package/dist/chunk-87kza2ez.js +2 -0
  42. package/dist/{chunk-bd5na0h0.js → chunk-88p10v0w.js} +5 -5
  43. package/dist/chunk-8cqx63aw.js +3 -0
  44. package/dist/chunk-8scndwf6.js +2 -0
  45. package/dist/{chunk-jzmz66a3.js → chunk-95ygdn0n.js} +3 -3
  46. package/dist/{chunk-gxpgwpq7.js → chunk-9hqjezhx.js} +2 -2
  47. package/dist/chunk-9ny6xzw0.js +2 -0
  48. package/dist/chunk-9r538d93.js +2 -0
  49. package/dist/{chunk-j1rnhv0w.js → chunk-9yk5rasj.js} +3 -3
  50. package/dist/{chunk-xrrkf04f.js → chunk-a0ygyftk.js} +2 -2
  51. package/dist/{chunk-4fv3jq16.js → chunk-ahyq08mp.js} +2 -2
  52. package/dist/{chunk-6bhaa9g7.js → chunk-arrvcn7c.js} +13 -13
  53. package/dist/{chunk-zs7t42b5.js → chunk-aztp8r80.js} +5 -5
  54. package/dist/chunk-b2teprjf.js +2 -0
  55. package/dist/{chunk-xm911f1g.js → chunk-b2v6v7w8.js} +1 -1
  56. package/dist/{chunk-pbphq5pj.js → chunk-b4j5bpec.js} +2 -2
  57. package/dist/{chunk-gh34r6qb.js → chunk-bsts9pr5.js} +2 -2
  58. package/dist/{chunk-0qt1887j.js → chunk-bx3ar1wz.js} +2 -2
  59. package/dist/{chunk-ftkrsvqp.js → chunk-c06b0akz.js} +1 -1
  60. package/dist/{chunk-86zj56pf.js → chunk-c858mepd.js} +5 -5
  61. package/dist/chunk-cd76dwdn.js +2 -0
  62. package/dist/{chunk-vhktd16g.js → chunk-cwvd8dc3.js} +2 -2
  63. package/dist/{chunk-avt9cske.js → chunk-drrczm0b.js} +6 -6
  64. package/dist/{chunk-g35zftfn.js → chunk-dtg82vm2.js} +1 -1
  65. package/dist/chunk-e21q08vs.js +2 -0
  66. package/dist/chunk-e2p8ytdd.js +2 -0
  67. package/dist/chunk-e7bd4vxb.js +2 -0
  68. package/dist/chunk-eeqw8jkw.js +127 -0
  69. package/dist/{chunk-p4hmv654.js → chunk-eyy6zmdk.js} +2 -2
  70. package/dist/chunk-fdxyj3pk.js +2 -0
  71. package/dist/chunk-ffjvqjyh.js +2 -0
  72. package/dist/{chunk-y89m80pf.js → chunk-fk79x8ns.js} +4 -4
  73. package/dist/{chunk-az1y9jks.js → chunk-fqg0espy.js} +2 -2
  74. package/dist/chunk-ft6gfbr5.js +2 -0
  75. package/dist/{chunk-5x59qjzs.js → chunk-fwdptew6.js} +6 -6
  76. package/dist/{chunk-94yycjz8.js → chunk-fztvkacg.js} +2 -2
  77. package/dist/chunk-g14mwhqz.js +2 -0
  78. package/dist/chunk-g1ae3haw.js +3 -0
  79. package/dist/chunk-g1mp4e7h.js +2 -0
  80. package/dist/{chunk-k2nrx78c.js → chunk-gcj5jfbv.js} +2 -2
  81. package/dist/{chunk-3yh585yv.js → chunk-gqz26wza.js} +3 -3
  82. package/dist/chunk-h0d5vg33.js +2 -0
  83. package/dist/{chunk-8qrhz7n7.js → chunk-hjtym7d9.js} +6 -6
  84. package/dist/chunk-j0jz4mfm.js +2 -0
  85. package/dist/chunk-j37720vw.js +2 -0
  86. package/dist/{chunk-cy1j2zpr.js → chunk-jdx4za9p.js} +2 -2
  87. package/dist/chunk-jmdrhpy7.js +2 -0
  88. package/dist/chunk-jp3vgscy.js +2 -0
  89. package/dist/chunk-jshv1ye7.js +2 -0
  90. package/dist/chunk-jtvrfwd8.js +2 -0
  91. package/dist/{chunk-tn7hgtyn.js → chunk-k4xytaq3.js} +5 -5
  92. package/dist/chunk-k5pm9bex.js +2 -0
  93. package/dist/{chunk-6dzqjbsz.js → chunk-kjspmegt.js} +2 -2
  94. package/dist/{chunk-a887js9p.js → chunk-kmzc09w6.js} +5 -5
  95. package/dist/chunk-krchxt50.js +2 -0
  96. package/dist/chunk-kxbw0e2f.js +3 -0
  97. package/dist/chunk-kztnn301.js +2 -0
  98. package/dist/chunk-mbqqc20a.js +2 -0
  99. package/dist/{chunk-8hjrr8j3.js → chunk-mcs3wbs4.js} +39 -39
  100. package/dist/{chunk-fdy0hka5.js → chunk-mek121wh.js} +27 -27
  101. package/dist/{chunk-0whv8hnp.js → chunk-mn97jhaq.js} +2 -2
  102. package/dist/chunk-ms4121x1.js +2 -0
  103. package/dist/{chunk-w8bf4mbw.js → chunk-mwqas1qk.js} +3 -3
  104. package/dist/chunk-n708h31w.js +2 -0
  105. package/dist/{chunk-gqdh68vx.js → chunk-nxn7gnpq.js} +2 -2
  106. package/dist/{chunk-tc7gm68a.js → chunk-pf5s5gjp.js} +2 -2
  107. package/dist/{chunk-bng1ayzm.js → chunk-phqtp1b4.js} +10 -10
  108. package/dist/chunk-pn719qwa.js +2 -0
  109. package/dist/{chunk-v5500ews.js → chunk-pp6ycfay.js} +2 -2
  110. package/dist/{chunk-3kkf43fv.js → chunk-pvfx0dgz.js} +2 -2
  111. package/dist/chunk-pwn2keqq.js +2 -0
  112. package/dist/{chunk-7gq7w95h.js → chunk-qy11cp1v.js} +4 -4
  113. package/dist/chunk-r0s7vdha.js +2 -0
  114. package/dist/chunk-rwjr5bmd.js +2 -0
  115. package/dist/chunk-ryj2m6fk.js +2 -0
  116. package/dist/chunk-s15nte19.js +2 -0
  117. package/dist/chunk-spz80xnc.js +2 -0
  118. package/dist/{chunk-t7e9y46s.js → chunk-tvs9a3vk.js} +1 -1
  119. package/dist/{chunk-8b2452m1.js → chunk-tw10tgz8.js} +11 -11
  120. package/dist/chunk-vj5fghnv.js +2 -0
  121. package/dist/chunk-vvgs62za.js +2 -0
  122. package/dist/chunk-vvseb46a.js +2 -0
  123. package/dist/{chunk-y04hzz4w.js → chunk-w41kp60h.js} +4 -4
  124. package/dist/chunk-wj4rf7sb.js +2 -0
  125. package/dist/{chunk-q6evk3a4.js → chunk-wjq1wqn6.js} +2 -2
  126. package/dist/chunk-wywkr0rt.js +2 -0
  127. package/dist/{chunk-nh7bcc4h.js → chunk-xdqwq7a6.js} +2 -2
  128. package/dist/chunk-xekmvpha.js +2 -0
  129. package/dist/{chunk-rq1c46zb.js → chunk-xgd6xgvz.js} +34 -9
  130. package/dist/chunk-xj5rk4pj.js +2 -0
  131. package/dist/chunk-xqtzk9wr.js +2 -0
  132. package/dist/chunk-y1j13dha.js +2 -0
  133. package/dist/{chunk-kpxty3pe.js → chunk-y255yybn.js} +2 -2
  134. package/dist/chunk-y51ndrdb.js +2 -0
  135. package/dist/chunk-z5ewms99.js +2 -0
  136. package/dist/{chunk-jq7ymh7q.js → chunk-z8ftsz64.js} +6 -6
  137. package/dist/{chunk-tx4xxpgg.js → chunk-zsq0754x.js} +3 -3
  138. package/dist/cli.js +76 -76
  139. package/dist/client/signals-public-api-runtime.js +1 -0
  140. package/dist/client/signals-timer-runtime.js +24 -0
  141. package/dist/craft-bridge.js +2 -2
  142. package/dist/craft-entry.js +2 -2
  143. package/dist/craft.js +2 -2
  144. package/dist/lazy-module.js +2 -1
  145. package/dist/menubar.d.ts +2 -0
  146. package/dist/menubar.js +15 -2
  147. package/dist/native/compiler/headwind-to-style.d.ts +6 -3
  148. package/dist/native/compiler/headwind-to-style.js +25 -3
  149. package/dist/native/compiler/html-to-ir.js +4 -4
  150. package/dist/native/prop-names.d.ts +1 -1
  151. package/dist/native/prop-names.js +3 -1
  152. package/dist/native/runtime/native-host.js +66 -7
  153. package/dist/native-build.d.ts +1 -0
  154. package/dist/native-build.js +5 -3
  155. package/dist/process.d.ts +1 -0
  156. package/dist/process.js +1 -1
  157. package/dist/pwa.js +3 -3
  158. package/dist/render.js +3 -3
  159. package/dist/runtime-globals.js +1 -0
  160. package/dist/ssg.js +9 -9
  161. package/dist/stx-module.d.ts +1 -0
  162. package/package.json +5 -5
  163. package/stx-module.d.ts +1 -0
  164. package/stx.d.ts +7 -0
  165. package/dist/chunk-0mgtrbaa.js +0 -2
  166. package/dist/chunk-0xc6rncm.js +0 -2852
  167. package/dist/chunk-1tpr8d8n.js +0 -2
  168. package/dist/chunk-20kjbf3h.js +0 -2
  169. package/dist/chunk-3gcg3gvy.js +0 -2
  170. package/dist/chunk-3wsrhj0k.js +0 -2
  171. package/dist/chunk-575cqc6z.js +0 -2
  172. package/dist/chunk-5x836mv3.js +0 -2
  173. package/dist/chunk-5yceay9n.js +0 -2
  174. package/dist/chunk-6pg2kxsq.js +0 -2
  175. package/dist/chunk-7nthebqr.js +0 -2
  176. package/dist/chunk-7s5304ae.js +0 -2
  177. package/dist/chunk-8dybd0g5.js +0 -2
  178. package/dist/chunk-8em788gc.js +0 -2
  179. package/dist/chunk-9svygzeg.js +0 -2
  180. package/dist/chunk-9z4qr5w9.js +0 -2
  181. package/dist/chunk-af4ss0p5.js +0 -2
  182. package/dist/chunk-aj34t5h3.js +0 -2
  183. package/dist/chunk-atcy4zq6.js +0 -2
  184. package/dist/chunk-az28kd7f.js +0 -2
  185. package/dist/chunk-cncdgxk3.js +0 -2
  186. package/dist/chunk-d2t2pq1s.js +0 -3
  187. package/dist/chunk-dcx2t3sy.js +0 -2
  188. package/dist/chunk-dn28q0m3.js +0 -2
  189. package/dist/chunk-dn89zg1v.js +0 -2
  190. package/dist/chunk-dwddzp5f.js +0 -2
  191. package/dist/chunk-enchx79c.js +0 -2
  192. package/dist/chunk-ev8ma4ph.js +0 -2
  193. package/dist/chunk-ftrsaag8.js +0 -2
  194. package/dist/chunk-g6efz3ww.js +0 -2
  195. package/dist/chunk-gd59tkhr.js +0 -2
  196. package/dist/chunk-h1g9m148.js +0 -2
  197. package/dist/chunk-h8tew5mz.js +0 -2
  198. package/dist/chunk-hdrcgepx.js +0 -127
  199. package/dist/chunk-hn64343d.js +0 -2
  200. package/dist/chunk-htaed68z.js +0 -2
  201. package/dist/chunk-j5jkh05f.js +0 -2
  202. package/dist/chunk-j90yng9b.js +0 -2
  203. package/dist/chunk-jabb3v4c.js +0 -2
  204. package/dist/chunk-jczvjn7z.js +0 -2
  205. package/dist/chunk-kqkhcbrx.js +0 -2
  206. package/dist/chunk-mgzegkvk.js +0 -2
  207. package/dist/chunk-mk71833d.js +0 -2
  208. package/dist/chunk-n3s3w1f5.js +0 -2
  209. package/dist/chunk-nj0b4ryt.js +0 -2
  210. package/dist/chunk-ny6enm8b.js +0 -3
  211. package/dist/chunk-p8ndfekp.js +0 -2
  212. package/dist/chunk-qhjm9hvz.js +0 -2
  213. package/dist/chunk-qzy34xmt.js +0 -2
  214. package/dist/chunk-ra40trfh.js +0 -2
  215. package/dist/chunk-rjq597cn.js +0 -2
  216. package/dist/chunk-rrdwynz4.js +0 -2
  217. package/dist/chunk-sddytf9n.js +0 -2
  218. package/dist/chunk-sg5zgq5v.js +0 -18
  219. package/dist/chunk-shhtbdnj.js +0 -2
  220. package/dist/chunk-t4g97h08.js +0 -2
  221. package/dist/chunk-t7f9zmy8.js +0 -2
  222. package/dist/chunk-tme29zh9.js +0 -3
  223. package/dist/chunk-x1xx8qt0.js +0 -2
  224. package/dist/chunk-xmfhb2v0.js +0 -2
  225. package/dist/chunk-xsw183n7.js +0 -2
  226. package/dist/chunk-xtwe2rnp.js +0 -2
  227. package/dist/chunk-xxnh7gv8.js +0 -2
  228. package/dist/chunk-y84n0dvg.js +0 -2
  229. package/dist/chunk-zr0k9pz5.js +0 -2
  230. package/dist/chunk-zytcxy8p.js +0 -2
@@ -1,5 +1,5 @@
1
1
  // @bun
2
- import{Ue,X}from"./chunk-ygpa12ez.js";import{ei}from"./chunk-sg5zgq5v.js";import{d}from"./chunk-yn2d8x8m.js";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 ae}from"child_process";import{homedir as B,platform as re}from"os";var Vu=`
2
+ import{We,X}from"./chunk-7ftn9ber.js";import{ni}from"./chunk-2kppq4pg.js";import{d}from"./chunk-yn2d8x8m.js";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 ae}from"child_process";import{homedir as B,platform as re}from"os";var Wu=`
3
3
  <script>
4
4
  (function() {
5
5
  'use strict';
@@ -323,7 +323,7 @@ else if (data.type === 'event' && data.method) {
323
323
  });
324
324
 
325
325
  // Build the craft API object
326
- window.craft = Object.assign({}, existingCraft, {
326
+ window.craft = Object.assign({}, {
327
327
  // Meta
328
328
  isCraft,
329
329
  on,
@@ -455,7 +455,7 @@ else if (data.type === 'event' && data.method) {
455
455
  // Native component helpers
456
456
  nativeUI,
457
457
  components: componentAPI
458
- });
458
+ }, existingCraft, { nativeUI, components: componentAPI });
459
459
 
460
460
  // Dispatch ready event
461
461
  window.dispatchEvent(new CustomEvent('craft:ready', { detail: { isCraft: isCraft() } }));
@@ -465,7 +465,7 @@ else if (data.type === 'event' && data.method) {
465
465
  }
466
466
  })();
467
467
  </script>
468
- `;function Wo(e={}){let{debug:a=!1,timeout:r=30000}=e;return`
468
+ `;function Go(e={}){let{debug:a=!1,timeout:r=30000}=e;return`
469
469
  <script>
470
470
  (function() {
471
471
  'use strict';
@@ -789,7 +789,7 @@ else if (data.type === 'event' && data.method) {
789
789
  });
790
790
 
791
791
  // Build the craft API object
792
- window.craft = Object.assign({}, existingCraft, {
792
+ window.craft = Object.assign({}, {
793
793
  // Meta
794
794
  isCraft,
795
795
  on,
@@ -921,7 +921,7 @@ else if (data.type === 'event' && data.method) {
921
921
  // Native component helpers
922
922
  nativeUI,
923
923
  components: componentAPI
924
- });
924
+ }, existingCraft, { nativeUI, components: componentAPI });
925
925
 
926
926
  // Dispatch ready event
927
927
  window.dispatchEvent(new CustomEvent('craft:ready', { detail: { isCraft: isCraft() } }));
@@ -931,9 +931,9 @@ else if (data.type === 'event' && data.method) {
931
931
  }
932
932
  })();
933
933
  </script>
934
- `.replace("debug: false,",`debug: ${a},`).replace("timeout: 30000",`timeout: ${r}`)}function Uu(){return!1}function Wu(e,a={}){let r=/@craft(?:\(([\s\S]*?)\))?/g;return e.replace(r,(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 Wo(t)})}function qo(e,a={}){if(e.includes("__craftBridgeInitialized"))return e;let r=Wo(a);if(e.includes("</head>"))return e.replace("</head>",`${r}
934
+ `.replace("debug: false,",`debug: ${a},`).replace("timeout: 30000",`timeout: ${r}`)}function qu(){return!1}function Gu(e,a={}){let r=/@craft(?:\(([\s\S]*?)\))?/g;return e.replace(r,(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 Go(t)})}function Ko(e,a={}){if(e.includes("__craftBridgeInitialized"))return e;let r=Go(a);if(e.includes("</head>"))return e.replace("</head>",`${r}
935
935
  </head>`);if(e.includes("<body"))return e.replace(/(<body[^>]*>)/,`$1
936
- ${r}`);return r+e}var as={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,a)=>{let r=e.checked?"checked":"",i=e.disabled?"disabled":"";return`<label class="craft-checkbox-wrapper">
936
+ ${r}`);return r+e}var ls={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,a)=>{let r=e.checked?"checked":"",i=e.disabled?"disabled":"";return`<label class="craft-checkbox-wrapper">
937
937
  <input type="checkbox" class="craft-checkbox" ${r} ${i}>
938
938
  <span class="craft-checkbox-label">${a||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,a)=>{let r=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="${r}" 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,a)=>{let r=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:${r}px;height:${r}px;border-radius:50%">`;return`<div class="craft-avatar craft-avatar-fallback" style="width:${r}px;height:${r}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,a)=>{let r=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,r/i*100))}%"></div></div>`}},spinner:{nativeType:"craft-spinner",fallbackTag:"div",fallbackClasses:"craft-spinner",nativeProps:["size"],render:(e,a)=>{let r=e.size||24;return`<div class="craft-spinner" style="width:${r}px;height:${r}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,a)=>{let r=e.open?"open":"",i=e.title||"";return`<dialog class="craft-modal" ${r}>
@@ -947,7 +947,7 @@ ${r}`);return r+e}var as={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,a)=>{let r=e.variant||"info",i=e.title||"";return`<div class="craft-alert craft-alert-${r}" role="alert">
948
948
  ${i?`<div class="craft-alert-title">${i}</div>`:""}
949
949
  <div class="craft-alert-content">${a}</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,a)=>{let r=e.content||"",i=e.position||"top";return`<span class="craft-tooltip" data-tooltip="${r}" data-position="${i}">${a}</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:U},"sidebar-space":{nativeType:"craft-sidebar-space",fallbackTag:"section",fallbackClasses:"craft-sidebar-space",nativeProps:["id","label","icon","tint"],render:j},"sidebar-section":{nativeType:"craft-sidebar-section",fallbackTag:"section",fallbackClasses:"craft-sidebar-section",nativeProps:["id","title","header"],render:H},"sidebar-item":{nativeType:"craft-sidebar-item",fallbackTag:"button",fallbackClasses:"craft-sidebar-item",nativeProps:["id","label","icon","badge","tintColor"],render:V},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,a)=>`<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,a)=>{let r=e.value||"",i=e.min||"",s=e.max||"";return`<input type="date" class="craft-date-picker" value="${r}" min="${i}" max="${s}">`}},"time-picker":{nativeType:"craft-time-picker",fallbackTag:"input",fallbackClasses:"craft-time-picker",nativeProps:["value","min","max","step"],render:(e,a)=>`<input type="time" class="craft-time-picker" value="${e.value||""}">`}},Go=`
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,a)=>{let r=e.content||"",i=e.position||"top";return`<span class="craft-tooltip" data-tooltip="${r}" data-position="${i}">${a}</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:U},"sidebar-space":{nativeType:"craft-sidebar-space",fallbackTag:"section",fallbackClasses:"craft-sidebar-space",nativeProps:["id","label","icon","tint"],render:j},"sidebar-section":{nativeType:"craft-sidebar-section",fallbackTag:"section",fallbackClasses:"craft-sidebar-section",nativeProps:["id","title","header"],render:H},"sidebar-item":{nativeType:"craft-sidebar-item",fallbackTag:"button",fallbackClasses:"craft-sidebar-item",nativeProps:["id","label","icon","badge","tintColor"],render:V},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,a)=>`<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,a)=>{let r=e.value||"",i=e.min||"",s=e.max||"";return`<input type="date" class="craft-date-picker" value="${r}" min="${i}" max="${s}">`}},"time-picker":{nativeType:"craft-time-picker",fallbackTag:"input",fallbackClasses:"craft-time-picker",nativeProps:["value","min","max","step"],render:(e,a)=>`<input type="time" class="craft-time-picker" value="${e.value||""}">`}},Xo=`
951
951
  <style id="craft-component-styles">
952
952
  /* Craft Component Base Styles */
953
953
  .craft-button {
@@ -1365,7 +1365,7 @@ ${r}`);return r+e}var as={button:{nativeType:"craft-button",fallbackTag:"button"
1365
1365
  }
1366
1366
  }
1367
1367
  </style>
1368
- `,qu=`
1368
+ `,Ku=`
1369
1369
  <script id="craft-component-runtime">
1370
1370
  (function() {
1371
1371
  if (window.__stxCraftComponentRuntime) return;
@@ -1469,7 +1469,7 @@ ${r}`);return r+e}var as={button:{nativeType:"craft-button",fallbackTag:"button"
1469
1469
  document.addEventListener('craft:nativeui:ready', initializeCraftComponents);
1470
1470
  })();
1471
1471
  </script>
1472
- `;function Ko(e,a={}){let{classPrefix:r="craft"}=a;if(!e.includes("craft-component-styles"))if(e.includes("</head>"))e=e.replace("</head>",`${`
1472
+ `;function Jo(e,a={}){let{classPrefix:r="craft"}=a;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,36 +2934,36 @@ ${r}`);return r+e}var as={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(),a,r)),e=e.replace(/<@craft-sidebar(?![-\w])\s*([^>]*?)\/>/g,(i,s)=>R("sidebar",s,"",a,r)),e=e.replace(/<@craft-(\w+[-\w]*)\s*([^>]*?)\/>/g,(i,s,t)=>R(s,t,"",a,r)),e=e.replace(/<@craft-(\w+[-\w]*)\s*([^>]*)>([\s\S]*?)<\/@craft-\1>/g,(i,s,t,n)=>R(s,t,n.trim(),a,r)),e}function R(e,a,r,i,s){let t=i.components?.[e]||as[e];if(!t)return console.warn(`[stx] Unknown Craft component: @craft-${e}`),`<div class="${s}-unknown" data-component="${e}">${r}</div>`;let n=A(a),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,r);let l=ee(n,t,c);if(["input","hr","br","img"].includes(t.fallbackTag))return`<${t.fallbackTag} ${l}>`;return`<${t.fallbackTag} ${l}>${r}</${t.fallbackTag}>`}function A(e){let a={},r=/(?::|@)?(\w+[-\w]*)(?:=(?:"([^"]*)"|'([^']*)'))?/g,i;while((i=r.exec(e))!==null){let[s,t,n,c]=i,l=n??c;if(s.startsWith(":"))a[t]=l;else if(s.startsWith("@"))a[`on${t.charAt(0).toUpperCase()}${t.slice(1)}`]=l;else if(l===void 0)a[t]=!0;else a[t]=l}return a}function U(e,a){let r=I(String(e.id||`craft-sidebar-${K(a||JSON.stringify(e))}`)),i=Y(e.spaces)||J(a),s=i.length?[]:G(e.sections)||F(a),t=String(e.selectedSpace||i[0]?.id||""),n=i.find((m)=>m.id===t)||i[0],c=String(e.selectedItem||e.selected||(i.length?n?.sections[0]?.items[0]?.id:s[0]?.items[0]?.id)||""),l={id:r,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},f=String(e.__fallbackClasses||"craft-sidebar craft-sidebar-tahoe"),b=Number(e.width||e.sidebarWidth||286),p=e.native===!1||e.native==="false"?"false":"true",x=l.searchPlaceholder?`<div class="craft-sidebar-search"><input type="search" placeholder="${C(l.searchPlaceholder)}"></div>`:"",u;if(i.length)u=Q(i,t,c);else if(s.length)u=s.map((m)=>D(m,c)).join("");else u=a;return`<aside class="${h(f)}" data-craft="craft-sidebar" data-craft-native-sidebar data-craft-sidebar-id="${h(r)}" data-native="${p}" style="--craft-sidebar-width:${b}px">
2937
+ `;return e=e.replace(/<@craft-sidebar(?![-\w])\s*([^>]*)>([\s\S]*?)<\/@craft-sidebar>/g,(i,s,t)=>R("sidebar",s,t.trim(),a,r)),e=e.replace(/<@craft-sidebar(?![-\w])\s*([^>]*?)\/>/g,(i,s)=>R("sidebar",s,"",a,r)),e=e.replace(/<@craft-(\w+[-\w]*)\s*([^>]*?)\/>/g,(i,s,t)=>R(s,t,"",a,r)),e=e.replace(/<@craft-(\w+[-\w]*)\s*([^>]*)>([\s\S]*?)<\/@craft-\1>/g,(i,s,t,n)=>R(s,t,n.trim(),a,r)),e}function R(e,a,r,i,s){let t=i.components?.[e]||ls[e];if(!t)return console.warn(`[stx] Unknown Craft component: @craft-${e}`),`<div class="${s}-unknown" data-component="${e}">${r}</div>`;let n=A(a),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,r);let l=ee(n,t,c);if(["input","hr","br","img"].includes(t.fallbackTag))return`<${t.fallbackTag} ${l}>`;return`<${t.fallbackTag} ${l}>${r}</${t.fallbackTag}>`}function A(e){let a={},r=/(?::|@)?(\w+[-\w]*)(?:=(?:"([^"]*)"|'([^']*)'))?/g,i;while((i=r.exec(e))!==null){let[s,t,n,c]=i,l=n??c;if(s.startsWith(":"))a[t]=l;else if(s.startsWith("@"))a[`on${t.charAt(0).toUpperCase()}${t.slice(1)}`]=l;else if(l===void 0)a[t]=!0;else a[t]=l}return a}function U(e,a){let r=I(String(e.id||`craft-sidebar-${K(a||JSON.stringify(e))}`)),i=Y(e.spaces)||J(a),s=i.length?[]:G(e.sections)||F(a),t=String(e.selectedSpace||i[0]?.id||""),n=i.find((m)=>m.id===t)||i[0],c=String(e.selectedItem||e.selected||(i.length?n?.sections[0]?.items[0]?.id:s[0]?.items[0]?.id)||""),l={id:r,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},f=String(e.__fallbackClasses||"craft-sidebar craft-sidebar-tahoe"),b=Number(e.width||e.sidebarWidth||286),p=e.native===!1||e.native==="false"?"false":"true",x=l.searchPlaceholder?`<div class="craft-sidebar-search"><input type="search" placeholder="${C(l.searchPlaceholder)}"></div>`:"",u;if(i.length)u=Q(i,t,c);else if(s.length)u=s.map((m)=>D(m,c)).join("");else u=a;return`<aside class="${w(f)}" data-craft="craft-sidebar" data-craft-native-sidebar data-craft-sidebar-id="${w(r)}" data-native="${p}" style="--craft-sidebar-width:${b}px">
2938
2938
  ${x}
2939
2939
  ${u}
2940
2940
  </aside>
2941
- <script type="application/json" data-craft-sidebar-config="${h(r)}">${Z(l)}</script>`}function j(e,a){let r=I(String(e.id||e.label||"space"));return`<section class="craft-sidebar-space" data-craft="craft-sidebar-space" data-space-id="${h(r)}">
2941
+ <script type="application/json" data-craft-sidebar-config="${w(r)}">${Z(l)}</script>`}function j(e,a){let r=I(String(e.id||e.label||"space"));return`<section class="craft-sidebar-space" data-craft="craft-sidebar-space" data-space-id="${w(r)}">
2942
2942
  ${e.label?`<div class="craft-sidebar-space-title">${C(String(e.label))}</div>`:""}
2943
2943
  ${a}
2944
- </section>`}function H(e,a){let r=String(e.header||e.title||"");return`<section class="craft-sidebar-section" data-craft="craft-sidebar-section" data-section-id="${h(String(e.id||"section"))}">
2944
+ </section>`}function H(e,a){let r=String(e.header||e.title||"");return`<section class="craft-sidebar-section" data-craft="craft-sidebar-section" data-section-id="${w(String(e.id||"section"))}">
2945
2945
  ${r?`<div class="craft-sidebar-section-title">${C(r)}</div>`:""}
2946
2946
  ${a}
2947
- </section>`}function V(e,a){let r={id:String(e.id||I(String(e.label||a||"item"))),label:String(e.label||a||""),icon:e.icon?String(e.icon):void 0,badge:e.badge?String(e.badge):void 0,tintColor:e.tintColor?String(e.tintColor):void 0};return O(r,String(e.selected||"")==="true")}function F(e){let a=[],r=/<@craft-sidebar-section\s*([^>]*?)(?:\/>|>([\s\S]*?)<\/@craft-sidebar-section>)/g,i;while((i=r.exec(e))!==null){let s=A(i[1]||""),t=i[2]||"",n=String(s.id||I(String(s.header||s.title||`section-${a.length+1}`))),c=String(s.header||s.title||n),l=W(t);a.push({id:n,header:c,title:c,items:l})}return a}function W(e){let a=[],r=/<@craft-sidebar-item\s*([^>]*?)(?:\/>|>([\s\S]*?)<\/@craft-sidebar-item>)/g,i;while((i=r.exec(e))!==null){let s=A(i[1]||""),t=String(s.label||(i[2]||"").replace(/<[^>]*>/g,"").trim()),n=String(s.id||I(t||`item-${a.length+1}`));a.push({id:n,label:t,icon:s.icon?String(s.icon):void 0,badge:s.badge?String(s.badge):void 0,tintColor:s.tintColor?String(s.tintColor):void 0})}return a}function J(e){let a=[],r=/<@craft-sidebar-space\s*([^>]*?)(?:\/>|>([\s\S]*?)<\/@craft-sidebar-space>)/g,i;while((i=r.exec(e))!==null){let s=A(i[1]||""),t=i[2]||"",n=String(s.label||s.title||`Space ${a.length+1}`);a.push({id:String(s.id||I(n)),label:n,icon:s.icon?String(s.icon):void 0,tint:s.tint?String(s.tint):void 0,sections:F(t)})}return a}function Y(e){if(!e)return;if(Array.isArray(e))return e;if(typeof e!=="string")return;try{let a=JSON.parse(e);return Array.isArray(a)?a:void 0}catch{return}}function Q(e,a,r){let i=e.map((t)=>`<button class="craft-sidebar-space-tab" type="button" data-space-target="${h(t.id)}" data-selected="${t.id===a?"true":"false"}" title="${h(t.label||t.id)}">${t.icon?`<span class="craft-sidebar-item-icon" data-icon="${h(t.icon)}"></span>`:C((t.label||t.id).charAt(0))}</button>`).join("");return`<div class="craft-sidebar-spaces">${e.map((t)=>`<section class="craft-sidebar-space" data-space-id="${h(t.id)}" data-selected="${t.id===a?"true":"false"}">
2947
+ </section>`}function V(e,a){let r={id:String(e.id||I(String(e.label||a||"item"))),label:String(e.label||a||""),icon:e.icon?String(e.icon):void 0,badge:e.badge?String(e.badge):void 0,tintColor:e.tintColor?String(e.tintColor):void 0};return O(r,String(e.selected||"")==="true")}function F(e){let a=[],r=/<@craft-sidebar-section\s*([^>]*?)(?:\/>|>([\s\S]*?)<\/@craft-sidebar-section>)/g,i;while((i=r.exec(e))!==null){let s=A(i[1]||""),t=i[2]||"",n=String(s.id||I(String(s.header||s.title||`section-${a.length+1}`))),c=String(s.header||s.title||n),l=W(t);a.push({id:n,header:c,title:c,items:l})}return a}function W(e){let a=[],r=/<@craft-sidebar-item\s*([^>]*?)(?:\/>|>([\s\S]*?)<\/@craft-sidebar-item>)/g,i;while((i=r.exec(e))!==null){let s=A(i[1]||""),t=String(s.label||(i[2]||"").replace(/<[^>]*>/g,"").trim()),n=String(s.id||I(t||`item-${a.length+1}`));a.push({id:n,label:t,icon:s.icon?String(s.icon):void 0,badge:s.badge?String(s.badge):void 0,tintColor:s.tintColor?String(s.tintColor):void 0})}return a}function J(e){let a=[],r=/<@craft-sidebar-space\s*([^>]*?)(?:\/>|>([\s\S]*?)<\/@craft-sidebar-space>)/g,i;while((i=r.exec(e))!==null){let s=A(i[1]||""),t=i[2]||"",n=String(s.label||s.title||`Space ${a.length+1}`);a.push({id:String(s.id||I(n)),label:n,icon:s.icon?String(s.icon):void 0,tint:s.tint?String(s.tint):void 0,sections:F(t)})}return a}function Y(e){if(!e)return;if(Array.isArray(e))return e;if(typeof e!=="string")return;try{let a=JSON.parse(e);return Array.isArray(a)?a:void 0}catch{return}}function Q(e,a,r){let i=e.map((t)=>`<button class="craft-sidebar-space-tab" type="button" data-space-target="${w(t.id)}" data-selected="${t.id===a?"true":"false"}" title="${w(t.label||t.id)}">${t.icon?`<span class="craft-sidebar-item-icon" data-icon="${w(t.icon)}"></span>`:C((t.label||t.id).charAt(0))}</button>`).join("");return`<div class="craft-sidebar-spaces">${e.map((t)=>`<section class="craft-sidebar-space" data-space-id="${w(t.id)}" data-selected="${t.id===a?"true":"false"}">
2948
2948
  ${t.label?`<div class="craft-sidebar-space-title">${C(t.label)}</div>`:""}
2949
2949
  ${t.sections.map((n)=>D(n,r)).join("")}
2950
2950
  </section>`).join("")}</div>
2951
- <div class="craft-sidebar-space-switcher">${i}</div>`}function G(e){if(!e)return;if(Array.isArray(e))return e;if(typeof e!=="string")return;try{let a=JSON.parse(e);return Array.isArray(a)?a:void 0}catch{return}}function D(e,a){let r=e.header||e.title||e.id;return`<section class="craft-sidebar-section" data-section-id="${h(e.id)}">
2951
+ <div class="craft-sidebar-space-switcher">${i}</div>`}function G(e){if(!e)return;if(Array.isArray(e))return e;if(typeof e!=="string")return;try{let a=JSON.parse(e);return Array.isArray(a)?a:void 0}catch{return}}function D(e,a){let r=e.header||e.title||e.id;return`<section class="craft-sidebar-section" data-section-id="${w(e.id)}">
2952
2952
  <div class="craft-sidebar-section-title">${C(r)}</div>
2953
2953
  ${e.items.map((i)=>O(i,i.id===a)).join("")}
2954
- </section>`}function O(e,a){let r=e.tintColor?` style="--craft-sidebar-icon-color:${h(e.tintColor)}"`:"";return`<button class="craft-sidebar-item" type="button" data-item-id="${h(e.id)}" data-selected="${a?"true":"false"}">
2955
- ${e.icon?`<span class="craft-sidebar-item-icon" data-icon="${h(e.icon)}"${r}></span>`:""}
2954
+ </section>`}function O(e,a){let r=e.tintColor?` style="--craft-sidebar-icon-color:${w(e.tintColor)}"`:"";return`<button class="craft-sidebar-item" type="button" data-item-id="${w(e.id)}" data-selected="${a?"true":"false"}">
2955
+ ${e.icon?`<span class="craft-sidebar-item-icon" data-icon="${w(e.icon)}"${r}></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 a=5381;for(let r=0;r<e.length;r++)a=a*33^e.charCodeAt(r);return(a>>>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,a,r){let i=[];i.push(`class="${r.join(" ")}"`),i.push(`data-craft="${a.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 Gu(e,a){as[e]=a}function Ku(){return{...as}}async function Xo(e){let a=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 r=e.target||P(),i=e.format||pe(r),s=e.output||o(process.cwd(),"dist","native");if(!z(s))v(s,{recursive:!0});let t=await ei(e.input,{context:e.context,options:{isDev:!1}});if(t=qo(t,{debug:e.verbose}),t=Ko(t),!t.includes("craft-component-styles")){if(t.includes("</head>"))t=t.replace("</head>",`${Go}
2959
- </head>`)}let n=e.name||te(e.input,".stx"),c=e.version||"1.0.0",l=e.craftPath||await fe();if(!l)return{success:!1,target:r,format:i,error:"Craft binary not found. Please install Craft or specify craftPath."};if(e.verbose)console.log(`\uD83D\uDCE6 Building native app for ${r}...`),console.log(` Input: ${e.input}`),console.log(` Output: ${s}`),console.log(` Craft: ${l}`);let f;switch(r){case"macos":f=await ie(t,n,c,s,i,e,l);break;case"windows":f=await oe(t,n,c,s,i,e,l);break;case"linux":f=await ce(t,n,c,s,i,e,l);break;case"ios":f=await de(t,n,c,s,e,l);break;case"android":f=await le(t,n,c,s,e,l);break;default:f={success:!1,target:r,format:i,error:`Unsupported target: ${r}`}}return f.duration=Date.now()-a,f}catch(r){return{success:!1,target:e.target||P(),format:e.format||"app",error:r.message,duration:Date.now()-a}}}async function ie(e,a,r,i,s,t,n){let c=t.bundleId||`com.stx.${a.toLowerCase().replace(/[^a-z0-9]/g,"")}`,l=o(i,`${a}.app`),f=o(l,"Contents"),b=o(f,"MacOS"),p=o(f,"Resources");v(b,{recursive:!0}),v(p,{recursive:!0});let x=o(p,"index.html");await Bun.write(x,e);let u="";if(t.sidebar?.enabled&&t.sidebar?.config)u=o(p,"sidebar-config.json"),await Bun.write(u,JSON.stringify(t.sidebar.config));let m=t.sidebar?.enabled?`--native-sidebar --sidebar-width ${t.sidebar?.width||240} --sidebar-config "$(cat "$RESOURCES/sidebar-config.json")"`:"",y=t.menubarOnly??t.systemTray;if((t.bundleStyle||(await se(n)?"executable":"launcher"))==="executable"){let S=o(b,a);k(n,S),T(S,493);let w={html:"index.html",title:t.window?.title||a,width:t.window?.width||1200,height:t.window?.height||800,devTools:Boolean(t.devTools)};if(y)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(p,"craft.json"),`${JSON.stringify(w,null,2)}
2960
- `)}else{let S=o(b,"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")"`:"",L=`#!/bin/bash
2958
+ </button>`}function I(e){return e.trim().toLowerCase().replace(/[^a-z0-9_-]+/g,"-").replace(/^-|-$/g,"")||"craft-sidebar"}function K(e){let a=5381;for(let r=0;r<e.length;r++)a=a*33^e.charCodeAt(r);return(a>>>0).toString(36)}function C(e){return e.replace(/&/g,"&amp;").replace(/</g,"&lt;").replace(/>/g,"&gt;").replace(/"/g,"&quot;").replace(/'/g,"&#39;")}function w(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,a,r){let i=[];i.push(`class="${r.join(" ")}"`),i.push(`data-craft="${a.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 Xu(e,a){ls[e]=a}function Ju(){return{...ls}}async function Yo(e){let a=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 r=e.target||P(),i=e.format||pe(r),s=e.output||o(process.cwd(),"dist","native");if(!z(s))v(s,{recursive:!0});let t=await ni(e.input,{context:e.context,options:{isDev:!1}});if(t=Ko(t,{debug:e.verbose}),t=Jo(t),!t.includes("craft-component-styles")){if(t.includes("</head>"))t=t.replace("</head>",`${Xo}
2959
+ </head>`)}let n=e.name||te(e.input,".stx"),c=e.version||"1.0.0",l=e.craftPath||await fe();if(!l)return{success:!1,target:r,format:i,error:"Craft binary not found. Please install Craft or specify craftPath."};if(e.verbose)console.log(`\uD83D\uDCE6 Building native app for ${r}...`),console.log(` Input: ${e.input}`),console.log(` Output: ${s}`),console.log(` Craft: ${l}`);let f;switch(r){case"macos":f=await ie(t,n,c,s,i,e,l);break;case"windows":f=await oe(t,n,c,s,i,e,l);break;case"linux":f=await ce(t,n,c,s,i,e,l);break;case"ios":f=await de(t,n,c,s,e,l);break;case"android":f=await le(t,n,c,s,e,l);break;default:f={success:!1,target:r,format:i,error:`Unsupported target: ${r}`}}return f.duration=Date.now()-a,f}catch(r){return{success:!1,target:e.target||P(),format:e.format||"app",error:r.message,duration:Date.now()-a}}}async function ie(e,a,r,i,s,t,n){let c=t.bundleId||`com.stx.${a.toLowerCase().replace(/[^a-z0-9]/g,"")}`,l=o(i,`${a}.app`),f=o(l,"Contents"),b=o(f,"MacOS"),p=o(f,"Resources");v(b,{recursive:!0}),v(p,{recursive:!0});let x=o(p,"index.html");await Bun.write(x,e);let u="";if(t.sidebar?.enabled&&t.sidebar?.config)u=o(p,"sidebar-config.json"),await Bun.write(u,JSON.stringify(t.sidebar.config));let m=t.sidebar?.enabled?`--native-sidebar --sidebar-width ${t.sidebar?.width||240} --sidebar-config "$(cat "$RESOURCES/sidebar-config.json")"`:"",y=t.menubarOnly??t.systemTray;if((t.bundleStyle||(await se(n)?"executable":"launcher"))==="executable"){let S=o(b,a);k(n,S),T(S,493);let h={html:"index.html",title:t.window?.title||a,width:t.window?.width||1200,height:t.window?.height||800,devTools:Boolean(t.devTools)};if(t.trayPopover)h.trayPopover=!0;else if(y)h.menubarOnly=!0;else if(t.systemTray)h.systemTray=!0;if(t.window?.frameless)h.frameless=!0;if(t.window?.transparent)h.transparent=!0;if(t.window?.alwaysOnTop)h.alwaysOnTop=!0;if(t.window?.resizable===!1)h.resizable=!1;await Bun.write(o(p,"craft.json"),`${JSON.stringify(h,null,2)}
2960
+ `)}else{let S=o(b,"craft");k(n,S),T(S,493);let h=t.sidebar?.enabled?`--native-sidebar --sidebar-width ${t.sidebar?.width||240} --sidebar-config "$(cat "$RESOURCES/sidebar-config.json")"`:"",L=`#!/bin/bash
2961
2961
  set -euo pipefail
2962
2962
  DIR="$( cd "$( dirname "\${BASH_SOURCE[0]}" )" && pwd )"
2963
2963
  RESOURCES="$DIR/../Resources"
2964
2964
  exec "$DIR/craft" --html-file "$RESOURCES/index.html" \\
2965
- ${[`--title "${t.window?.title||a}"`,`--width ${t.window?.width||1200}`,`--height ${t.window?.height||800}`,y?"--menubar-only":t.systemTray?"--system-tray":"",t.devTools?"":"--no-devtools",t.window?.frameless?"--frameless":"",t.window?.transparent?"--transparent":"",t.window?.alwaysOnTop?"--always-on-top":"",t.window?.resizable===!1?"--no-resize":"",w].filter(Boolean).join(" \\\n ")}
2966
- `,q=o(b,a);await Bun.write(q,L),T(q,493)}let N=Boolean(t.icon&&await Bun.file(t.icon).exists());if(N)k(t.icon,o(p,"AppIcon.icns"));let M={CFBundleExecutable:a,CFBundleIdentifier:c,CFBundleName:a,CFBundleDisplayName:a,CFBundleShortVersionString:r,CFBundleVersion:r,CFBundlePackageType:"APPL",CFBundleSignature:"????",LSMinimumSystemVersion:t.minimumSystemVersion||"13.0",NSHighResolutionCapable:!0,NSSupportsAutomaticGraphicsSwitching:!0,LSUIElement:t.menubarOnly??Boolean(t.systemTray),...N?{CFBundleIconFile:"AppIcon"}:{},...t.category?{LSApplicationCategoryType:t.category}:{},...t.copyright?{NSHumanReadableCopyright:t.copyright}:{},...t.infoPlist||{}};if(await Bun.write(o(f,"Info.plist"),ne(M)),s==="dmg"){let S=o(i,`${a}-${r}.dmg`),w=await ue(l,S,a);if(!w.success)return{success:!1,target:"macos",format:"dmg",error:w.error};return{success:!0,target:"macos",format:"dmg",outputPath:S}}return{success:!0,target:"macos",format:"app",outputPath:l}}async function se(e){try{let a=Bun.spawn([e,"--version"],{stdout:"pipe",stderr:"pipe"}),[r,i]=await Promise.all([new Response(a.stdout).text(),new Response(a.stderr).text()]);await a.exited;let t=`${r}
2965
+ ${[`--title "${t.window?.title||a}"`,`--width ${t.window?.width||1200}`,`--height ${t.window?.height||800}`,t.trayPopover?"--tray-popover":y?"--menubar-only":t.systemTray?"--system-tray":"",t.devTools?"":"--no-devtools",t.window?.frameless?"--frameless":"",t.window?.transparent?"--transparent":"",t.window?.alwaysOnTop?"--always-on-top":"",t.window?.resizable===!1?"--no-resize":"",h].filter(Boolean).join(" \\\n ")}
2966
+ `,q=o(b,a);await Bun.write(q,L),T(q,493)}let N=Boolean(t.icon&&await Bun.file(t.icon).exists());if(N)k(t.icon,o(p,"AppIcon.icns"));let M={CFBundleExecutable:a,CFBundleIdentifier:c,CFBundleName:a,CFBundleDisplayName:a,CFBundleShortVersionString:r,CFBundleVersion:r,CFBundlePackageType:"APPL",CFBundleSignature:"????",LSMinimumSystemVersion:t.minimumSystemVersion||"13.0",NSHighResolutionCapable:!0,NSSupportsAutomaticGraphicsSwitching:!0,LSUIElement:t.trayPopover||(t.menubarOnly??Boolean(t.systemTray)),...N?{CFBundleIconFile:"AppIcon"}:{},...t.category?{LSApplicationCategoryType:t.category}:{},...t.copyright?{NSHumanReadableCopyright:t.copyright}:{},...t.infoPlist||{}};if(await Bun.write(o(f,"Info.plist"),ne(M)),s==="dmg"){let S=o(i,`${a}-${r}.dmg`),h=await ue(l,S,a);if(!h.success)return{success:!1,target:"macos",format:"dmg",error:h.error};return{success:!0,target:"macos",format:"dmg",outputPath:S}}return{success:!0,target:"macos",format:"app",outputPath:l}}async function se(e){try{let a=Bun.spawn([e,"--version"],{stdout:"pipe",stderr:"pipe"}),[r,i]=await Promise.all([new Response(a.stdout).text(),new Response(a.stderr).text()]);await a.exited;let t=`${r}
2967
2967
  ${i}`.match(/(\d+)\.(\d+)\.(\d+)/);if(!t)return!1;let[n,c,l]=t.slice(1).map(Number);if(n>0||c>0)return!0;return l>=57}catch{return!1}}function _(e){return e.replace(/&/g,"&amp;").replace(/</g,"&lt;").replace(/>/g,"&gt;")}function ne(e){return`<?xml version="1.0" encoding="UTF-8"?>
2968
2968
  <!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
2969
2969
  <plist version="1.0">
@@ -2997,7 +2997,7 @@ Exec=${p}
2997
2997
  Terminal=false
2998
2998
  Categories=Utility;
2999
2999
  `;if(await Bun.write(o(c,`${a.toLowerCase()}.desktop`),x),s==="deb"){let u=o(i,`${a.toLowerCase()}_${r}_amd64.deb`),m=await ge(c,u,a,r,t);if(!m.success)return{success:!1,target:"linux",format:"deb",error:m.error};return{success:!0,target:"linux",format:"deb",outputPath:u}}if(s==="appimage"){let u=o(i,`${a}-${r}-x86_64.AppImage`),m=await me(c,u,a,t);if(!m.success)return{success:!1,target:"linux",format:"appimage",error:m.error};return{success:!0,target:"linux",format:"appimage",outputPath:u}}return{success:!0,target:"linux",format:"app",outputPath:c}}async function de(e,a,r,i,s,t){return{success:!1,target:"ios",format:"ipa",error:`iOS build requires Xcode and additional setup. Use 'stx init:ios ${a}' to create an iOS project.`}}async function le(e,a,r,i,s,t){return{success:!1,target:"android",format:"apk",error:`Android build requires Android SDK and additional setup. Use 'stx init:android ${a}' to create an Android project.`}}async function fe(){if(process.env.CRAFT_BIN&&await Bun.file(process.env.CRAFT_BIN).exists())return process.env.CRAFT_BIN;let e=[o(process.cwd(),"../../craft/packages/zig/zig-out/bin/craft"),o(process.cwd(),"../craft/packages/zig/zig-out/bin/craft"),o(B(),"Code/Tools/craft/packages/zig/zig-out/bin/craft"),o(B(),"Code/craft/packages/zig/zig-out/bin/craft"),"/usr/local/bin/craft","/usr/bin/craft",o(B(),".local/bin/craft"),o(process.env.LOCALAPPDATA||"","craft","craft.exe"),o(process.env.PROGRAMFILES||"","craft","craft.exe")];for(let a of e)if(await Bun.file(a).exists())return a;try{let r=ae("which craft 2>/dev/null || where craft 2>nul",{encoding:"utf-8"}).trim().split(`
3000
- `)[0];if(r&&await Bun.file(r).exists())return r}catch{}return null}function P(){switch(re()){case"darwin":return"macos";case"win32":return"windows";default:return"linux"}}function pe(e){switch(e){case"macos":return"app";case"windows":return"zip";case"linux":return"appimage";case"ios":return"ipa";case"android":return"apk";default:return"app"}}async function ue(e,a,r){return new Promise((i)=>{let s=E("hdiutil",["create","-volname",r,"-srcfolder",e,"-ov","-format","UDZO",a]);s.on("close",(t)=>{if(t===0)i({success:!0});else i({success:!1,error:`hdiutil exited with code ${t}`})}),s.on("error",(t)=>{i({success:!1,error:t.message})})})}async function be(e,a){return new Promise((r)=>{let i=E("zip",["-r",a,"."],{cwd:e});i.on("close",(s)=>{if(s===0)r({success:!0});else r({success:!1,error:`zip exited with code ${s}`})}),i.on("error",(s)=>{r({success:!1,error:s.message})})})}async function ge(e,a,r,i,s){return new Promise((t)=>{let n=Ue("deb");try{let c=o(n,"pkg"),l=o(c,"DEBIAN"),f=o(c,"usr","bin"),b=o(c,"usr","share","applications"),p=o(c,"usr","share",r.toLowerCase());v(l,{recursive:!0}),v(f,{recursive:!0}),v(b,{recursive:!0}),v(p,{recursive:!0});let x=d("fs").readdirSync(e);for(let g of x)k(o(e,g),o(p,g));let u=`#!/bin/bash
3000
+ `)[0];if(r&&await Bun.file(r).exists())return r}catch{}return null}function P(){switch(re()){case"darwin":return"macos";case"win32":return"windows";default:return"linux"}}function pe(e){switch(e){case"macos":return"app";case"windows":return"zip";case"linux":return"appimage";case"ios":return"ipa";case"android":return"apk";default:return"app"}}async function ue(e,a,r){return new Promise((i)=>{let s=E("hdiutil",["create","-volname",r,"-srcfolder",e,"-ov","-format","UDZO",a]);s.on("close",(t)=>{if(t===0)i({success:!0});else i({success:!1,error:`hdiutil exited with code ${t}`})}),s.on("error",(t)=>{i({success:!1,error:t.message})})})}async function be(e,a){return new Promise((r)=>{let i=E("zip",["-r",a,"."],{cwd:e});i.on("close",(s)=>{if(s===0)r({success:!0});else r({success:!1,error:`zip exited with code ${s}`})}),i.on("error",(s)=>{r({success:!1,error:s.message})})})}async function ge(e,a,r,i,s){return new Promise((t)=>{let n=We("deb");try{let c=o(n,"pkg"),l=o(c,"DEBIAN"),f=o(c,"usr","bin"),b=o(c,"usr","share","applications"),p=o(c,"usr","share",r.toLowerCase());v(l,{recursive:!0}),v(f,{recursive:!0}),v(b,{recursive:!0}),v(p,{recursive:!0});let x=d("fs").readdirSync(e);for(let g of x)k(o(e,g),o(p,g));let u=`#!/bin/bash
3001
3001
  exec /usr/share/${r.toLowerCase()}/${r.toLowerCase()} "$@"`;d("fs").writeFileSync(o(f,r.toLowerCase()),u),T(o(f,r.toLowerCase()),493);let m=`Package: ${r.toLowerCase()}
3002
3002
  Version: ${i}
3003
3003
  Section: utils
@@ -3006,7 +3006,7 @@ Architecture: amd64
3006
3006
  Depends: libgtk-3-0, libwebkit2gtk-4.0-37
3007
3007
  Maintainer: ${s.author||"Unknown"}
3008
3008
  Description: ${s.description||r}
3009
- `;d("fs").writeFileSync(o(l,"control"),m);let y=E("dpkg-deb",["--build",c,a]);y.on("close",(g)=>{if(X(n),g===0)t({success:!0});else t({success:!1,error:`dpkg-deb exited with code ${g}`})}),y.on("error",(g)=>{X(n),t({success:!1,error:g.message})})}catch(c){X(n),t({success:!1,error:c.message})}})}async function me(e,a,r,i){return new Promise((s)=>{let t=Ue("appimage");try{let n=o(t,`${r}.AppDir`),c=o(n,"usr"),l=o(c,"bin"),f=o(c,"share");v(l,{recursive:!0}),v(f,{recursive:!0});let b=o(f,r.toLowerCase());v(b,{recursive:!0});let p=d("fs").readdirSync(e);for(let g of p)k(o(e,g),o(b,g));let x=`#!/bin/bash
3009
+ `;d("fs").writeFileSync(o(l,"control"),m);let y=E("dpkg-deb",["--build",c,a]);y.on("close",(g)=>{if(X(n),g===0)t({success:!0});else t({success:!1,error:`dpkg-deb exited with code ${g}`})}),y.on("error",(g)=>{X(n),t({success:!1,error:g.message})})}catch(c){X(n),t({success:!1,error:c.message})}})}async function me(e,a,r,i){return new Promise((s)=>{let t=We("appimage");try{let n=o(t,`${r}.AppDir`),c=o(n,"usr"),l=o(c,"bin"),f=o(c,"share");v(l,{recursive:!0}),v(f,{recursive:!0});let b=o(f,r.toLowerCase());v(b,{recursive:!0});let p=d("fs").readdirSync(e);for(let g of p)k(o(e,g),o(b,g));let x=`#!/bin/bash
3010
3010
  SELF=$(readlink -f "$0")
3011
3011
  HERE=\${SELF%/*}
3012
3012
  export PATH="\${HERE}/usr/bin:\${PATH}"
@@ -3018,5 +3018,5 @@ Exec=${r.toLowerCase()}
3018
3018
  Terminal=false
3019
3019
  Categories=Utility;
3020
3020
  Icon=${r.toLowerCase()}
3021
- `;d("fs").writeFileSync(o(n,`${r.toLowerCase()}.desktop`),u);let m=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(d("fs").writeFileSync(o(n,`${r.toLowerCase()}.png`),m),i.icon&&z(i.icon))k(i.icon,o(n,`${r.toLowerCase()}.png`));let y=E("appimagetool",[n,a],{env:{...process.env,ARCH:"x86_64"}});y.on("close",(g)=>{if(X(t),g===0)T(a,493),s({success:!0});else s({success:!1,error:`appimagetool exited with code ${g}. Install from https://appimage.github.io/appimagetool/`})}),y.on("error",(g)=>{X(t),s({success:!1,error:`appimagetool not found: ${g.message}`})})}catch(n){X(t),s({success:!1,error:n.message})}})}function Jo(){return[P()]}function Yo(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:Jo,getAvailableFormats:Yo,detectPlatform:P},Xu=he;
3022
- export{Vu,Wo,Uu,Wu,qo,as,Go,qu,Ko,Gu,Ku,Xo,Jo,Yo,Xu};
3021
+ `;d("fs").writeFileSync(o(n,`${r.toLowerCase()}.desktop`),u);let m=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(d("fs").writeFileSync(o(n,`${r.toLowerCase()}.png`),m),i.icon&&z(i.icon))k(i.icon,o(n,`${r.toLowerCase()}.png`));let y=E("appimagetool",[n,a],{env:{...process.env,ARCH:"x86_64"}});y.on("close",(g)=>{if(X(t),g===0)T(a,493),s({success:!0});else s({success:!1,error:`appimagetool exited with code ${g}. Install from https://appimage.github.io/appimagetool/`})}),y.on("error",(g)=>{X(t),s({success:!1,error:`appimagetool not found: ${g.message}`})})}catch(n){X(t),s({success:!1,error:n.message})}})}function Zo(){return[P()]}function Qo(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:Yo,getAvailableTargets:Zo,getAvailableFormats:Qo,detectPlatform:P},Yu=he;
3022
+ export{Wu,Go,qu,Gu,Ko,ls,Xo,Ku,Jo,Xu,Ju,Yo,Zo,Qo,Yu};
@@ -1,4 +1,4 @@
1
1
  // @bun
2
- import a from"fs";function He(r){return o(r)}var g=1000,i=new Map;function cn(){i.clear()}function o(r){return[...r].sort().map((n)=>{try{let t=a.statSync(n);return`${n}:${t.size}:${t.mtimeMs}`}catch{return`${n}:missing`}}).join(`
2
+ import a from"fs";function Ve(r){return o(r)}var g=1000,i=new Map;function ln(){i.clear()}function o(r){return[...r].sort().map((n)=>{try{let t=a.statSync(n);return`${n}:${t.size}:${t.mtimeMs}`}catch{return`${n}:missing`}}).join(`
3
3
  `)}function _t(r,n,t){let e=r.get(n);return e!==void 0&&e.signature===t?e.value:void 0}function G(r,n,t,e){return r.set(n,{signature:t,value:e}),e}
4
- export{He,cn,_t,G};
4
+ export{Ve,ln,_t,G};
@@ -0,0 +1,2 @@
1
+ // @bun
2
+ import{xd,Zc,Re,Mi,Sd,Ls,js,Bs}from"./chunk-0bptz1km.js";import"./chunk-95ygdn0n.js";import"./chunk-y255yybn.js";import"./chunk-1m5cjrpw.js";import"./chunk-jdx4za9p.js";import"./chunk-a0ygyftk.js";import"./chunk-arrvcn7c.js";import"./chunk-tw10tgz8.js";import"./chunk-hjtym7d9.js";import"./chunk-ahyq08mp.js";import"./chunk-g1ae3haw.js";import"./chunk-fk79x8ns.js";import"./chunk-pvfx0dgz.js";export{Sd as clearOnceStore,Mi as onceStore,Re as partialsCache,Ls as processIncludes,js as processStackPushDirectives,Bs as processStackReplacements,xd as resetUnscopedSignalWarnings,Zc as topLevelElements};
@@ -1,4 +1,4 @@
1
1
  // @bun
2
- import{K}from"./chunk-v4tmwamd.js";function g(e,t){let r={};for(let n of e)r[n]=K(t(n));return new Proxy({},{get:(n,a)=>r[a]?.(),set:(n,a,o)=>{if(r[a])r[a].set(o);else r[a]=K(o);return!0},has:(n,a)=>(a in r),deleteProperty:(n,a)=>(delete r[a],!0),ownKeys:()=>Reflect.ownKeys(r),getOwnPropertyDescriptor:(n,a)=>(a in r)?{enumerable:!0,configurable:!0,writable:!0,value:r[a]()}:void 0})}function v(e,t){let r={};for(let n of t)r[n]=e[n];return r}function Vo(e,t){let r=Object.keys(e),n=g(r,(i)=>t?.[i]??e[i].getDefaultValue()),a=g(r,()=>[]),o=g(r,()=>!1),c=g(r,()=>!1),f=g(r,()=>!1),s=K(!1);async function u(i){f[i]=!0;let d=await e[i].validate(n[i],n);return a[i]=d,f[i]=!1,d.length===0}async function l(){s.set(!0);let i=await Promise.all(r.map(u));return s.set(!1),i.every(Boolean)}function m(){for(let i of r)n[i]=t?.[i]??e[i].getDefaultValue(),a[i]=[],o[i]=!1,c[i]=!1}function h(i){for(let d of r)if(d in i)n[d]=i[d],c[d]=!0}function b(i,d){n[i]=d,c[i]=!0}function y(i,d=!0){if(o[i]=d,d)u(i)}function p(i){return{value:n[i],errors:a[i],touched:o[i],dirty:c[i],valid:a[i].length===0,validating:f[i]}}function V(i){return async(d)=>{d?.preventDefault?.();for(let w of r)o[w]=!0;if(await l())await i(v(n,r))}}return{values:n,errors:a,touched:o,dirty:c,get isValid(){return r.every((i)=>a[i].length===0)},get isValidating(){return s()||r.some((i)=>f[i])},get isDirty(){return r.some((i)=>c[i])},validate:l,validateField:u,reset:m,setValues:h,setFieldValue:b,setFieldTouched:y,getFieldState:p,handleSubmit:V}}var nc=Vo;class an{rules=[];defaultValue="";addRule(e){let t=new an;return t.rules=[...this.rules,e],t.defaultValue=this.defaultValue,t}required(e="This field is required"){return this.addRule({name:"required",message:e,validate:(t)=>{if(t===null||t===void 0)return e;if(typeof t==="string"&&t.trim()==="")return e;if(Array.isArray(t)&&t.length===0)return e;return!0}})}email(e="Please enter a valid email"){return this.addRule({name:"email",message:e,validate:(t)=>{if(!t)return!0;return/^[^\s@]+@[^\s@]+\.[^\s@]+$/.test(String(t))||e}})}url(e="Please enter a valid URL"){return this.addRule({name:"url",message:e,validate:(t)=>{if(!t)return!0;try{return new URL(String(t)),!0}catch{return e}}})}min(e,t){let r=t||`Must be at least ${e} characters`;return this.addRule({name:"min",message:r,validate:(n)=>{if(!n)return!0;return String(n).length>=e||r}})}max(e,t){let r=t||`Must be no more than ${e} characters`;return this.addRule({name:"max",message:r,validate:(n)=>{if(!n)return!0;return String(n).length<=e||r}})}length(e,t,r){let n=r||`Must be between ${e} and ${t} characters`;return this.addRule({name:"length",message:n,validate:(a)=>{if(!a)return!0;let o=String(a).length;return o>=e&&o<=t||n}})}pattern(e,t="Invalid format"){return this.addRule({name:"pattern",message:t,validate:(r)=>{if(!r)return!0;return e.test(String(r))||t}})}hasUppercase(e="Must contain an uppercase letter"){return this.pattern(/[A-Z]/,e)}hasLowercase(e="Must contain a lowercase letter"){return this.pattern(/[a-z]/,e)}hasNumber(e="Must contain a number"){return this.pattern(/\d/,e)}hasSpecial(e="Must contain a special character"){return this.pattern(/[!@#$%^&*(),.?":{}|<>]/,e)}alphanumeric(e="Only letters and numbers allowed"){return this.pattern(/^[a-zA-Z0-9]+$/,e)}startsWithLetter(e="Must start with a letter"){return this.pattern(/^[a-zA-Z]/,e)}noSpaces(e="Spaces are not allowed"){return this.addRule({name:"noSpaces",message:e,validate:(t)=>{if(!t)return!0;return!String(t).includes(" ")||e}})}number(e="Must be a number"){let t=this.addRule({name:"number",message:e,validate:(r)=>{if(!r&&r!==0)return!0;return!Number.isNaN(Number(r))||e}});return t.defaultValue=0,t}integer(e="Must be a whole number"){return this.addRule({name:"integer",message:e,validate:(t)=>{if(!t&&t!==0)return!0;return Number.isInteger(Number(t))||e}})}positive(e="Must be a positive number"){return this.addRule({name:"positive",message:e,validate:(t)=>{if(!t&&t!==0)return!0;return Number(t)>0||e}})}negative(e="Must be a negative number"){return this.addRule({name:"negative",message:e,validate:(t)=>{if(!t&&t!==0)return!0;return Number(t)<0||e}})}minValue(e,t){let r=t||`Must be at least ${e}`;return this.addRule({name:"minValue",message:r,validate:(n)=>{if(!n&&n!==0)return!0;return Number(n)>=e||r}})}maxValue(e,t){let r=t||`Must be no more than ${e}`;return this.addRule({name:"maxValue",message:r,validate:(n)=>{if(!n&&n!==0)return!0;return Number(n)<=e||r}})}between(e,t,r){let n=r||`Must be between ${e} and ${t}`;return this.addRule({name:"between",message:n,validate:(a)=>{if(!a&&a!==0)return!0;let o=Number(a);return o>=e&&o<=t||n}})}matches(e,t){let r=t||`Must match ${e}`;return this.addRule({name:"matches",message:r,validate:(n,a)=>{if(!a)return!0;return n===a[e]||r}})}oneOf(e,t){let r=t||`Must be one of: ${e.join(", ")}`;return this.addRule({name:"oneOf",message:r,validate:(n)=>{if(!n)return!0;return e.includes(n)||r}})}notOneOf(e,t){let r=t||`Cannot be one of: ${e.join(", ")}`;return this.addRule({name:"notOneOf",message:r,validate:(n)=>{if(!n)return!0;return!e.includes(n)||r}})}date(e="Must be a valid date"){return this.addRule({name:"date",message:e,validate:(t)=>{if(!t)return!0;let r=new Date(String(t));return!Number.isNaN(r.getTime())||e}})}before(e,t){let r=new Date(e),n=t||`Must be before ${r.toLocaleDateString()}`;return this.addRule({name:"before",message:n,validate:(a)=>{if(!a)return!0;return new Date(String(a))<r||n}})}after(e,t){let r=new Date(e),n=t||`Must be after ${r.toLocaleDateString()}`;return this.addRule({name:"after",message:n,validate:(a)=>{if(!a)return!0;return new Date(String(a))>r||n}})}custom(e,t="Invalid value"){return this.addRule({name:"custom",message:t,validate:e})}async(e,t="Invalid value"){return this.addRule({name:"async",message:t,async:!0,validate:e})}when(e,t){let r=new an;r.rules=[...this.rules],r.defaultValue=this.defaultValue;for(let n of t.getRules())r.rules.push({...n,validate:(a,o)=>{if(!e(a,o||{}))return!0;return n.validate(a,o)}});return r}getRules(){return this.rules}getDefaultValue(){return this.defaultValue}default(e){let t=new an;return t.rules=[...this.rules],t.defaultValue=e,t}async validate(e,t){let r=[];for(let n of this.rules){let a=await n.validate(e,t);if(a!==!0)r.push(a)}return r}validateSync(e,t){let r=[];for(let n of this.rules){if(n.async)continue;let a=n.validate(e,t);if(a!==!0)r.push(a)}return r}}var nu=new an;function rc(e,t,r){let n=/@error\s*\(\s*([^)]+)\s*\)([\s\S]*?)@enderror/g;return e.replace(n,(a,o,c)=>{try{let f=o.trim().split("."),s=t;for(let l of f)if(s&&typeof s==="object"&&l in s)s=s[l];else return"";let u=s;if(!u||!Array.isArray(u)||u.length===0)return"";return u.map((l)=>c.replace(/\{\{\s*message\s*\}\}/g,l)).join(`
3
- `)}catch{return""}})}function sc(e,t,r){let n=/@errors\s*\(\s*([^)]+)\s*\)([\s\S]*?)@enderrors/g;return e.replace(n,(a,o,c)=>{try{let f=o.trim().split("."),s=t;for(let l of f)if(s&&typeof s==="object"&&l in s)s=s[l];else return"";let u=s;if(!u||!Array.isArray(u)||u.length===0)return"";return u.map((l)=>c.replace(/\{\{\s*message\s*\}\}/g,l)).join(`
4
- `)}catch{return""}})}function oc(e,t,r){let n=/@hasErrors\s*\(\s*([^)]+)\s*\)([\s\S]*?)@endhasErrors/g;return e.replace(n,(a,o,c)=>{try{let f=o.trim().split("."),s=t;for(let l of f)if(s&&typeof s==="object"&&l in s)s=s[l];else return"";let u=s;if(!u||!Array.isArray(u)||u.length===0)return"";return c}catch{return""}})}function ru(e,t,r){let n=e;return n=rc(n,t,r),n=sc(n,t,r),n=oc(n,t,r),n}export{Vo,nc,an,nu,rc,sc,oc,ru};
2
+ import{K}from"./chunk-1s02ff6n.js";function g(e,t){let r={};for(let n of e)r[n]=K(t(n));return new Proxy({},{get:(n,a)=>r[a]?.(),set:(n,a,o)=>{if(r[a])r[a].set(o);else r[a]=K(o);return!0},has:(n,a)=>(a in r),deleteProperty:(n,a)=>(delete r[a],!0),ownKeys:()=>Reflect.ownKeys(r),getOwnPropertyDescriptor:(n,a)=>(a in r)?{enumerable:!0,configurable:!0,writable:!0,value:r[a]()}:void 0})}function v(e,t){let r={};for(let n of t)r[n]=e[n];return r}function Wo(e,t){let r=Object.keys(e),n=g(r,(i)=>t?.[i]??e[i].getDefaultValue()),a=g(r,()=>[]),o=g(r,()=>!1),c=g(r,()=>!1),f=g(r,()=>!1),s=K(!1);async function u(i){f[i]=!0;let d=await e[i].validate(n[i],n);return a[i]=d,f[i]=!1,d.length===0}async function l(){s.set(!0);let i=await Promise.all(r.map(u));return s.set(!1),i.every(Boolean)}function m(){for(let i of r)n[i]=t?.[i]??e[i].getDefaultValue(),a[i]=[],o[i]=!1,c[i]=!1}function h(i){for(let d of r)if(d in i)n[d]=i[d],c[d]=!0}function b(i,d){n[i]=d,c[i]=!0}function y(i,d=!0){if(o[i]=d,d)u(i)}function p(i){return{value:n[i],errors:a[i],touched:o[i],dirty:c[i],valid:a[i].length===0,validating:f[i]}}function V(i){return async(d)=>{d?.preventDefault?.();for(let w of r)o[w]=!0;if(await l())await i(v(n,r))}}return{values:n,errors:a,touched:o,dirty:c,get isValid(){return r.every((i)=>a[i].length===0)},get isValidating(){return s()||r.some((i)=>f[i])},get isDirty(){return r.some((i)=>c[i])},validate:l,validateField:u,reset:m,setValues:h,setFieldValue:b,setFieldTouched:y,getFieldState:p,handleSubmit:V}}var sc=Wo;class cn{rules=[];defaultValue="";addRule(e){let t=new cn;return t.rules=[...this.rules,e],t.defaultValue=this.defaultValue,t}required(e="This field is required"){return this.addRule({name:"required",message:e,validate:(t)=>{if(t===null||t===void 0)return e;if(typeof t==="string"&&t.trim()==="")return e;if(Array.isArray(t)&&t.length===0)return e;return!0}})}email(e="Please enter a valid email"){return this.addRule({name:"email",message:e,validate:(t)=>{if(!t)return!0;return/^[^\s@]+@[^\s@]+\.[^\s@]+$/.test(String(t))||e}})}url(e="Please enter a valid URL"){return this.addRule({name:"url",message:e,validate:(t)=>{if(!t)return!0;try{return new URL(String(t)),!0}catch{return e}}})}min(e,t){let r=t||`Must be at least ${e} characters`;return this.addRule({name:"min",message:r,validate:(n)=>{if(!n)return!0;return String(n).length>=e||r}})}max(e,t){let r=t||`Must be no more than ${e} characters`;return this.addRule({name:"max",message:r,validate:(n)=>{if(!n)return!0;return String(n).length<=e||r}})}length(e,t,r){let n=r||`Must be between ${e} and ${t} characters`;return this.addRule({name:"length",message:n,validate:(a)=>{if(!a)return!0;let o=String(a).length;return o>=e&&o<=t||n}})}pattern(e,t="Invalid format"){return this.addRule({name:"pattern",message:t,validate:(r)=>{if(!r)return!0;return e.test(String(r))||t}})}hasUppercase(e="Must contain an uppercase letter"){return this.pattern(/[A-Z]/,e)}hasLowercase(e="Must contain a lowercase letter"){return this.pattern(/[a-z]/,e)}hasNumber(e="Must contain a number"){return this.pattern(/\d/,e)}hasSpecial(e="Must contain a special character"){return this.pattern(/[!@#$%^&*(),.?":{}|<>]/,e)}alphanumeric(e="Only letters and numbers allowed"){return this.pattern(/^[a-zA-Z0-9]+$/,e)}startsWithLetter(e="Must start with a letter"){return this.pattern(/^[a-zA-Z]/,e)}noSpaces(e="Spaces are not allowed"){return this.addRule({name:"noSpaces",message:e,validate:(t)=>{if(!t)return!0;return!String(t).includes(" ")||e}})}number(e="Must be a number"){let t=this.addRule({name:"number",message:e,validate:(r)=>{if(!r&&r!==0)return!0;return!Number.isNaN(Number(r))||e}});return t.defaultValue=0,t}integer(e="Must be a whole number"){return this.addRule({name:"integer",message:e,validate:(t)=>{if(!t&&t!==0)return!0;return Number.isInteger(Number(t))||e}})}positive(e="Must be a positive number"){return this.addRule({name:"positive",message:e,validate:(t)=>{if(!t&&t!==0)return!0;return Number(t)>0||e}})}negative(e="Must be a negative number"){return this.addRule({name:"negative",message:e,validate:(t)=>{if(!t&&t!==0)return!0;return Number(t)<0||e}})}minValue(e,t){let r=t||`Must be at least ${e}`;return this.addRule({name:"minValue",message:r,validate:(n)=>{if(!n&&n!==0)return!0;return Number(n)>=e||r}})}maxValue(e,t){let r=t||`Must be no more than ${e}`;return this.addRule({name:"maxValue",message:r,validate:(n)=>{if(!n&&n!==0)return!0;return Number(n)<=e||r}})}between(e,t,r){let n=r||`Must be between ${e} and ${t}`;return this.addRule({name:"between",message:n,validate:(a)=>{if(!a&&a!==0)return!0;let o=Number(a);return o>=e&&o<=t||n}})}matches(e,t){let r=t||`Must match ${e}`;return this.addRule({name:"matches",message:r,validate:(n,a)=>{if(!a)return!0;return n===a[e]||r}})}oneOf(e,t){let r=t||`Must be one of: ${e.join(", ")}`;return this.addRule({name:"oneOf",message:r,validate:(n)=>{if(!n)return!0;return e.includes(n)||r}})}notOneOf(e,t){let r=t||`Cannot be one of: ${e.join(", ")}`;return this.addRule({name:"notOneOf",message:r,validate:(n)=>{if(!n)return!0;return!e.includes(n)||r}})}date(e="Must be a valid date"){return this.addRule({name:"date",message:e,validate:(t)=>{if(!t)return!0;let r=new Date(String(t));return!Number.isNaN(r.getTime())||e}})}before(e,t){let r=new Date(e),n=t||`Must be before ${r.toLocaleDateString()}`;return this.addRule({name:"before",message:n,validate:(a)=>{if(!a)return!0;return new Date(String(a))<r||n}})}after(e,t){let r=new Date(e),n=t||`Must be after ${r.toLocaleDateString()}`;return this.addRule({name:"after",message:n,validate:(a)=>{if(!a)return!0;return new Date(String(a))>r||n}})}custom(e,t="Invalid value"){return this.addRule({name:"custom",message:t,validate:e})}async(e,t="Invalid value"){return this.addRule({name:"async",message:t,async:!0,validate:e})}when(e,t){let r=new cn;r.rules=[...this.rules],r.defaultValue=this.defaultValue;for(let n of t.getRules())r.rules.push({...n,validate:(a,o)=>{if(!e(a,o||{}))return!0;return n.validate(a,o)}});return r}getRules(){return this.rules}getDefaultValue(){return this.defaultValue}default(e){let t=new cn;return t.rules=[...this.rules],t.defaultValue=e,t}async validate(e,t){let r=[];for(let n of this.rules){let a=await n.validate(e,t);if(a!==!0)r.push(a)}return r}validateSync(e,t){let r=[];for(let n of this.rules){if(n.async)continue;let a=n.validate(e,t);if(a!==!0)r.push(a)}return r}}var su=new cn;function oc(e,t,r){let n=/@error\s*\(\s*([^)]+)\s*\)([\s\S]*?)@enderror/g;return e.replace(n,(a,o,c)=>{try{let f=o.trim().split("."),s=t;for(let l of f)if(s&&typeof s==="object"&&l in s)s=s[l];else return"";let u=s;if(!u||!Array.isArray(u)||u.length===0)return"";return u.map((l)=>c.replace(/\{\{\s*message\s*\}\}/g,l)).join(`
3
+ `)}catch{return""}})}function ic(e,t,r){let n=/@errors\s*\(\s*([^)]+)\s*\)([\s\S]*?)@enderrors/g;return e.replace(n,(a,o,c)=>{try{let f=o.trim().split("."),s=t;for(let l of f)if(s&&typeof s==="object"&&l in s)s=s[l];else return"";let u=s;if(!u||!Array.isArray(u)||u.length===0)return"";return u.map((l)=>c.replace(/\{\{\s*message\s*\}\}/g,l)).join(`
4
+ `)}catch{return""}})}function ac(e,t,r){let n=/@hasErrors\s*\(\s*([^)]+)\s*\)([\s\S]*?)@endhasErrors/g;return e.replace(n,(a,o,c)=>{try{let f=o.trim().split("."),s=t;for(let l of f)if(s&&typeof s==="object"&&l in s)s=s[l];else return"";let u=s;if(!u||!Array.isArray(u)||u.length===0)return"";return c}catch{return""}})}function ou(e,t,r){let n=e;return n=oc(n,t,r),n=ic(n,t,r),n=ac(n,t,r),n}export{Wo,sc,cn,su,oc,ic,ac,ou};
@@ -0,0 +1,2 @@
1
+ // @bun
2
+ import{Ue,un,Ru}from"./chunk-xgd6xgvz.js";import{K,dn,Au,pn,as,tr,nr,Pu,Iu,Ou,fn,gn,cs,rr,Nu}from"./chunk-1s02ff6n.js";import"./chunk-g1ae3haw.js";export{as as batch,Ru as default,dn as derived,pn as effect,Ue as generateSignalsRuntime,un as generateSignalsRuntimeDev,gn as isDerived,fn as isSignal,Au as memo,nr as onDestroy,tr as onMount,rr as peek,Ou as pendingLifecycleCounts,Iu as runDestroyCallbacks,Pu as runMountCallbacks,K as state,cs as untrack,Nu as useOptimistic};
@@ -1,4 +1,4 @@
1
1
  // @bun
2
- import{Ne}from"./chunk-y89m80pf.js";import{Ve,ln}from"./chunk-rq1c46zb.js";import{fi,gi,f,Bt,me,j,n,A,o}from"./chunk-0xc6rncm.js";import{_}from"./chunk-xrrkf04f.js";import{qs}from"./chunk-cy1j2zpr.js";import{Pn,In,On,Dn,we}from"./chunk-8b2452m1.js";import{qi}from"./chunk-2bxsc7gf.js";import{Se,le,Oo,No,Xt}from"./chunk-tn7hgtyn.js";import{It,gs}from"./chunk-8kc6byaz.js";import{Jt}from"./chunk-az1y9jks.js";import{Ct,gn,mn}from"./chunk-tme29zh9.js";import m from"fs";import c from"path";import{createHash as Q}from"crypto";function J(i){return Q("sha256").update(i).digest("hex").slice(0,8)}function U(i=!1){let l=i?ln():Ve(),a=J(l);return{content:l,filename:`runtime.${a}.js`,hash:a}}function V(){let i=Ne(),l=J(i);return{content:i,filename:`router.${l}.js`,hash:l}}import q from"path";import{createHash as ee}from"crypto";function te(i={}){let l=new Set;return{context:new Proxy(i,{get(r,e){if(e in r)return r[e];if(typeof e==="string"&&!e.startsWith("__"))l.add(e);return},has(r,e){if(e in r)return!0;if(typeof e==="string"&&!e.startsWith("__"))l.add(e);return!1}}),accessedKeys:l}}async function X(i,l,a={}){let r=q.resolve(i),e=await Bun.file(r).text(),S=ee("sha256").update(e).digest("hex").slice(0,16);fi();let R={};try{R=await o(a.configDir)}catch{}let y=[],d=/<script\b([^>]*)>([\s\S]*?)<\/script>/gi,g;while((g=d.exec(e))!==null){let v=g[1];if(/\bserver\b/.test(v))y.push(g[2])}let u=new Set(y.flatMap((v)=>me(v))),{context:w}=te({__filename:r,__dirname:q.dirname(r),__stx_serverDeclared:u}),C=new Set,B={...A,...R,...a,buildMode:"compile",strict:!1},b=await n(e,w,r,B,C),T=Se(b),M=gi();return{route:l,sourceFile:i,html:b,fragment:T,placeholders:M,hasServerScripts:y.length>0,serverScriptContent:y,dependencies:Array.from(C),contentHash:S,status:Bt(e),streamTemplates:w.__streamTemplates}}var re=new Set([".DS_Store","Thumbs.db","desktop.ini",".gitkeep",".gitignore"]);function Z(i,l){let a=0,r=0;if(!m.existsSync(i))return{copied:a,bytes:r};m.mkdirSync(l,{recursive:!0});function e(S,R){let y=m.readdirSync(S,{withFileTypes:!0});for(let d of y){if(re.has(d.name))continue;let g=c.join(S,d.name),u=c.join(R,d.name);if(d.isDirectory())m.mkdirSync(u,{recursive:!0}),e(g,u);else if(d.isFile()){if(m.existsSync(u))continue;m.copyFileSync(g,u),a++,r+=m.statSync(u).size}}}return e(i,l),{copied:a,bytes:r}}async function Al(i={}){let l=Date.now(),a=c.resolve(i.root||process.cwd()),r=c.resolve(a,i.outputDir||".output");console.log("[stx build] Starting production build...");let e=await o(a),S=c.resolve(a,i.componentsDir??e.componentsDir??"components"),R=c.resolve(a,i.partialsDir??e.partialsDir??"partials"),y=c.resolve(a,i.layoutsDir??e.layoutsDir??"layouts"),d=i.publicDir??e.publicDir??"public",g=we(e.app?.head,{known:Dn,source:"app.head"}),u=e.app?.colorMode,w=e.router?.container||"main",C=i.routeRules??e.routeRules??{},B=Jt(C),b=i.serverApi??e.serverApi,T=typeof b==="object"?b:{};if(b)It(a,T);if(e.runtimeConfig)_(e.runtimeConfig,{});if(m.existsSync(r))m.rmSync(r,{recursive:!0});let M=[c.join(r,"public","__stx"),c.join(r,"public","assets"),c.join(r,"server","pages"),c.join(r,"server","fragments")];for(let s of M)m.mkdirSync(s,{recursive:!0});console.log("[stx build] Discovering routes...");let v=j(a,{pagesDirs:e._layerPageDirs}),Y=["components","layouts","partials"],O=v.filter((s)=>!Y.some((h)=>s.pattern.startsWith(`/${h}/`)||s.pattern===`/${h}`));console.log(`[stx build] Found ${O.length} page routes (${v.length-O.length} non-page files excluded)`),console.log("[stx build] Generating shared assets...");let D=U(i.debug),x=V();await Bun.write(c.join(r,"public","__stx",D.filename),D.content),await Bun.write(c.join(r,"public","__stx",x.filename),x.content),console.log(`[stx build] Runtime: ${D.filename} (${(D.content.length/1024).toFixed(1)}KB)`),console.log(`[stx build] Router: ${x.filename} (${(x.content.length/1024).toFixed(1)}KB)`),console.log("[stx build] Compiling templates...");let k=[],H=[];for(let s of O){let h=B(s.pattern),E=h.rendering==="prerender";if(E&&(s.pattern.includes(":")||s.pattern.includes("[")))throw Error(`Cannot prerender parameter route ${s.pattern}; use dynamic rendering (explicit path enumeration is not supported here)`);try{let t=await X(s.filePath,s.pattern,{configDir:a,componentsDir:S,partialsDir:R,layoutsDir:y,debug:i.debug});if(k.push(t),t.html=t.html.replace(/runtime\.__STX_HASH__\.js/g,D.filename).replace(/router\.__STX_HASH__\.js/g,x.filename),t.html=On(t.html,g,{bodyScripts:[`<script src="/__stx/${x.filename}"></script>`],...u&&{colorMode:u}}),u)t.html=Pn(t.html,u);if(g.htmlAttrs)t.html=In(t.html,g.htmlAttrs);if(!/<body[^>]*\bdata-stx=/.test(t.html)){let p=t.html.match(/<(?!body\b)[a-zA-Z][a-zA-Z0-9-]*\b[^>]*?\s(data-stx="[^"]+")[^>]*>/);if(p&&p[1]){let W=p[1];t.html=t.html.replace(" "+W,""),t.html=t.html.replace(/<body([^>]*)>/,`<body$1 ${W}>`)}}if(t.html=t.html.replace(/<style data-css="generated">[\s\S]*?<\/style>\s*/g,""),t.html=await f(t.html),E){let p=await Xt(t,{params:{},request:new Request(`http://stx.build${s.pattern}`),method:"GET",__stx_strict_hydration:!0});if(p.redirect||p.cookies?.length||p.boundaries?.length||p.headers&&Object.keys(p.headers).length)throw Error(`Prerendered route ${s.pattern} cannot set response headers/cookies, redirect or stream`);t.html=p.html,t.status=p.status??t.status,t.hasServerScripts=!1,t.serverScriptContent=[],t.placeholders={}}t.fragment=le(t.html,w);let z=s.pattern==="/"?"index":s.pattern.slice(1).replace(/\//g,"-").replace(/[[\]]/g,"_"),G=c.join("server","pages",`${z}.compiled.json`),I=c.join("server","fragments",`${z}.html`);await Bun.write(c.join(r,G),JSON.stringify(t,null,2)),await Bun.write(c.join(r,I),t.fragment),H.push({pattern:s.pattern,compiledPath:G,fragmentPath:I,isDynamic:t.hasServerScripts,hasParams:s.pattern.includes(":")||s.pattern.includes("["),prerendered:E}),console.log(`[stx build] \u2713 ${s.pattern}`)}catch(t){if(Object.keys(h).length)throw t;console.error(`[stx build] \u2717 ${s.pattern}:`,t instanceof Error?t.message:t)}}let F=c.resolve(a,d);if(m.existsSync(F)){let{copied:s,bytes:h}=Z(F,c.join(r,"public"));if(s>0)console.log(`[stx build] Copied ${s} public asset${s===1?"":"s"} (${(h/1024).toFixed(1)}KB) from ${d}/`)}let N=mn(a);if(N){let{copied:s,bytes:h}=Z(N,c.join(r,"public",gn));if(s>0)console.log(`[stx build] Copied ${s} asset${s===1?"":"s"} (${(h/1024).toFixed(1)}KB) from ${Ct}/`)}let K={runtime:D.filename,router:x.filename},P=Oo(H,K,r);if(P.routeRules=C,P.routerContainer=w,b)P.apiRoutes=await gs(a,r,T);if(e.runtimeConfig)await Bun.write(c.join(r,"server/runtime-config.json"),JSON.stringify(e.runtimeConfig)),await qs(a,e.runtimeConfig);if(e._layerGraph)await Bun.write(c.join(r,"server/layers.json"),JSON.stringify(qi(e._layerGraph),null,2));No(P,r);let L=Date.now()-l;return console.log(`
2
+ import{De}from"./chunk-fk79x8ns.js";import{Ue,un}from"./chunk-xgd6xgvz.js";import{mi,hi,f,Ft,he,j,n,A,o}from"./chunk-0bptz1km.js";import{C}from"./chunk-a0ygyftk.js";import{Ks}from"./chunk-jdx4za9p.js";import{On,Nn,Dn,Ln,xe}from"./chunk-tw10tgz8.js";import{Ki}from"./chunk-1m5cjrpw.js";import{ke,le,Do,Mo,Jt}from"./chunk-k4xytaq3.js";import{Ot,hs}from"./chunk-26g3m2mg.js";import{Yt}from"./chunk-fqg0espy.js";import{Et,mn,hn}from"./chunk-kxbw0e2f.js";import m from"fs";import c from"path";import{createHash as Q}from"crypto";function J(i){return Q("sha256").update(i).digest("hex").slice(0,8)}function U(i=!1){let l=i?un():Ue(),a=J(l);return{content:l,filename:`runtime.${a}.js`,hash:a}}function V(){let i=De(),l=J(i);return{content:i,filename:`router.${l}.js`,hash:l}}import q from"path";import{createHash as ee}from"crypto";function te(i={}){let l=new Set;return{context:new Proxy(i,{get(r,e){if(e in r)return r[e];if(typeof e==="string"&&!e.startsWith("__"))l.add(e);return},has(r,e){if(e in r)return!0;if(typeof e==="string"&&!e.startsWith("__"))l.add(e);return!1}}),accessedKeys:l}}async function X(i,l,a={}){let r=q.resolve(i),e=await Bun.file(r).text(),S=ee("sha256").update(e).digest("hex").slice(0,16);mi();let _={};try{_=await o(a.configDir)}catch{}let y=[],d=/<script\b([^>]*)>([\s\S]*?)<\/script>/gi,g;while((g=d.exec(e))!==null){let R=g[1];if(/\bserver\b/.test(R))y.push(g[2])}let u=new Set(y.flatMap((R)=>he(R))),{context:D}=te({__filename:r,__dirname:q.dirname(r),__stx_serverDeclared:u}),w=new Set,B={...A,..._,...a,buildMode:"compile",strict:!1},b=await n(e,D,r,B,w),T=ke(b),M=hi();return{route:l,sourceFile:i,html:b,fragment:T,placeholders:M,hasServerScripts:y.length>0,serverScriptContent:y,dependencies:Array.from(w),contentHash:S,status:Ft(e),streamTemplates:D.__streamTemplates}}var re=new Set([".DS_Store","Thumbs.db","desktop.ini",".gitkeep",".gitignore"]);function Z(i,l){let a=0,r=0;if(!m.existsSync(i))return{copied:a,bytes:r};m.mkdirSync(l,{recursive:!0});function e(S,_){let y=m.readdirSync(S,{withFileTypes:!0});for(let d of y){if(re.has(d.name))continue;let g=c.join(S,d.name),u=c.join(_,d.name);if(d.isDirectory())m.mkdirSync(u,{recursive:!0}),e(g,u);else if(d.isFile()){if(m.existsSync(u))continue;m.copyFileSync(g,u),a++,r+=m.statSync(u).size}}}return e(i,l),{copied:a,bytes:r}}async function Il(i={}){let l=Date.now(),a=c.resolve(i.root||process.cwd()),r=c.resolve(a,i.outputDir||".output");console.log("[stx build] Starting production build...");let e=await o(a),S=c.resolve(a,i.componentsDir??e.componentsDir??"components"),_=c.resolve(a,i.partialsDir??e.partialsDir??"partials"),y=c.resolve(a,i.layoutsDir??e.layoutsDir??"layouts"),d=i.publicDir??e.publicDir??"public",g=xe(e.app?.head,{known:Ln,source:"app.head"}),u=e.app?.colorMode,D=e.router?.container||"main",w=i.routeRules??e.routeRules??{},B=Yt(w),b=i.serverApi??e.serverApi,T=typeof b==="object"?b:{};if(b)Ot(a,T);if(e.runtimeConfig)C(e.runtimeConfig,{});if(m.existsSync(r))m.rmSync(r,{recursive:!0});let M=[c.join(r,"public","__stx"),c.join(r,"public","assets"),c.join(r,"server","pages"),c.join(r,"server","fragments")];for(let s of M)m.mkdirSync(s,{recursive:!0});console.log("[stx build] Discovering routes...");let R=j(a,{pagesDirs:e._layerPageDirs}),Y=["components","layouts","partials"],O=R.filter((s)=>!Y.some((h)=>s.pattern.startsWith(`/${h}/`)||s.pattern===`/${h}`));console.log(`[stx build] Found ${O.length} page routes (${R.length-O.length} non-page files excluded)`),console.log("[stx build] Generating shared assets...");let v=U(i.debug),x=V();await Bun.write(c.join(r,"public","__stx",v.filename),v.content),await Bun.write(c.join(r,"public","__stx",x.filename),x.content),console.log(`[stx build] Runtime: ${v.filename} (${(v.content.length/1024).toFixed(1)}KB)`),console.log(`[stx build] Router: ${x.filename} (${(x.content.length/1024).toFixed(1)}KB)`),console.log("[stx build] Compiling templates...");let k=[],H=[];for(let s of O){let h=B(s.pattern),E=h.rendering==="prerender";if(E&&(s.pattern.includes(":")||s.pattern.includes("[")))throw Error(`Cannot prerender parameter route ${s.pattern}; use dynamic rendering (explicit path enumeration is not supported here)`);try{let t=await X(s.filePath,s.pattern,{configDir:a,componentsDir:S,partialsDir:_,layoutsDir:y,debug:i.debug});if(k.push(t),t.html=t.html.replace(/runtime\.__STX_HASH__\.js/g,v.filename).replace(/router\.__STX_HASH__\.js/g,x.filename),t.html=Dn(t.html,g,{bodyScripts:[`<script src="/__stx/${x.filename}"></script>`],...u&&{colorMode:u}}),u)t.html=On(t.html,u);if(g.htmlAttrs)t.html=Nn(t.html,g.htmlAttrs);if(!/<body[^>]*\bdata-stx=/.test(t.html)){let p=t.html.match(/<(?!body\b)[a-zA-Z][a-zA-Z0-9-]*\b[^>]*?\s(data-stx="[^"]+")[^>]*>/);if(p&&p[1]){let W=p[1];t.html=t.html.replace(" "+W,""),t.html=t.html.replace(/<body([^>]*)>/,`<body$1 ${W}>`)}}if(t.html=t.html.replace(/<style data-css="generated">[\s\S]*?<\/style>\s*/g,""),t.html=await f(t.html),E){let p=await Jt(t,{params:{},request:new Request(`http://stx.build${s.pattern}`),method:"GET",__stx_strict_hydration:!0});if(p.redirect||p.cookies?.length||p.boundaries?.length||p.headers&&Object.keys(p.headers).length)throw Error(`Prerendered route ${s.pattern} cannot set response headers/cookies, redirect or stream`);t.html=p.html,t.status=p.status??t.status,t.hasServerScripts=!1,t.serverScriptContent=[],t.placeholders={}}t.fragment=le(t.html,D);let z=s.pattern==="/"?"index":s.pattern.slice(1).replace(/\//g,"-").replace(/[[\]]/g,"_"),G=c.join("server","pages",`${z}.compiled.json`),I=c.join("server","fragments",`${z}.html`);await Bun.write(c.join(r,G),JSON.stringify(t,null,2)),await Bun.write(c.join(r,I),t.fragment),H.push({pattern:s.pattern,compiledPath:G,fragmentPath:I,isDynamic:t.hasServerScripts,hasParams:s.pattern.includes(":")||s.pattern.includes("["),prerendered:E}),console.log(`[stx build] \u2713 ${s.pattern}`)}catch(t){if(Object.keys(h).length)throw t;console.error(`[stx build] \u2717 ${s.pattern}:`,t instanceof Error?t.message:t)}}let F=c.resolve(a,d);if(m.existsSync(F)){let{copied:s,bytes:h}=Z(F,c.join(r,"public"));if(s>0)console.log(`[stx build] Copied ${s} public asset${s===1?"":"s"} (${(h/1024).toFixed(1)}KB) from ${d}/`)}let N=hn(a);if(N){let{copied:s,bytes:h}=Z(N,c.join(r,"public",mn));if(s>0)console.log(`[stx build] Copied ${s} asset${s===1?"":"s"} (${(h/1024).toFixed(1)}KB) from ${Et}/`)}let K={runtime:v.filename,router:x.filename},P=Do(H,K,r);if(P.routeRules=w,P.routerContainer=D,b)P.apiRoutes=await hs(a,r,T);if(e.runtimeConfig)await Bun.write(c.join(r,"server/runtime-config.json"),JSON.stringify(e.runtimeConfig)),await Ks(a,e.runtimeConfig);if(e._layerGraph)await Bun.write(c.join(r,"server/layers.json"),JSON.stringify(Ki(e._layerGraph),null,2));Mo(P,r);let L=Date.now()-l;return console.log(`
3
3
  [stx build] Done in ${L}ms \u2014 ${k.length} pages compiled`),{pageCount:k.length,assets:K,outputDir:r,duration:L}}
4
- export{Al};
4
+ export{Il};
@@ -1,5 +1,5 @@
1
1
  // @bun
2
- import{de,Et}from"./chunk-j1rnhv0w.js";import{E}from"./chunk-jbmjcs83.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{de,Tt}from"./chunk-9yk5rasj.js";import{E}from"./chunk-7mkw98cr.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?de(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 R(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?de(t,e):null,l=s?Et(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?de(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 R(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?de(t,e):null,l=s?Tt(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
  *
@@ -1,20 +1,20 @@
1
1
  // @bun
2
- import{y}from"./chunk-d2t2pq1s.js";import{Y,et,Cs,Es,wi,xi,Si,ki,dr,Ts,_i,Ci,Ei,Ft,o}from"./chunk-0xc6rncm.js";import{ss}from"./chunk-tx4xxpgg.js";import{a}from"./chunk-ny6enm8b.js";import{existsSync as M,readFileSync as K}from"fs";import h from"path";var me=new Set(["module","exports","require","$bool","$num","window","document","console","confirm","alert","fetch"]),te=Ft.filter((e)=>!me.has(e)).sort(),ne=[...y].sort(),he=[...new Set([...te,...ne])].sort(),be=new Set(te),ye=new Set(ne),xe=new Set(he),ee=/\bimport\s+(?!type[\s{])\{([^}]*)\}\s*from\s*(['"])stx\2/g;function Se(e,t){if(t==="server")return`'${e}' is not provided by 'stx' in a <script server> block. The engine binds only its own names there (defineProps, state, useHead, ...); any other name becomes \`await import('stx')\`, which does not resolve, so the whole script fails when the page renders. Import it from '@stacksjs/stx' instead.`;return`'${e}' is not provided by 'stx' in a client <script> block. The import is replaced by the window.stx runtime, which has no '${e}', so it is undefined in the browser.`}function ie(e,t){let s=[];for(let u of t){if(u.offset===void 0)continue;let i=u.kind==="server"?be:ye;ee.lastIndex=0;for(let l of u.code.matchAll(ee)){let g=l.index+l[0].indexOf("{")+1;for(let m of l[1].matchAll(/[^,]+/g)){let S=m[0];if(/^\s*type\s/.test(S))continue;let x=/^\s*([A-Za-z_$][\w$]*)/.exec(S);if(!x)continue;let r=x[1];if(!xe.has(r)||i.has(r))continue;let f=u.offset+g+m.index+x[0].length-r.length,p=e.slice(0,f),w=p.split(`
2
+ import{y}from"./chunk-g1ae3haw.js";import{Y,tt,Ts,$s,Si,ki,Ci,_i,fr,Rs,Ei,Ti,$i,zt,o}from"./chunk-0bptz1km.js";import{is}from"./chunk-zsq0754x.js";import{a}from"./chunk-8cqx63aw.js";import{existsSync as M,readFileSync as K}from"fs";import h from"path";var me=new Set(["module","exports","require","$bool","$num","window","document","console","confirm","alert","fetch"]),te=zt.filter((e)=>!me.has(e)).sort(),ne=[...y].sort(),he=[...new Set([...te,...ne])].sort(),be=new Set(te),ye=new Set(ne),xe=new Set(he),ee=/\bimport\s+(?!type[\s{])\{([^}]*)\}\s*from\s*(['"])stx\2/g;function Se(e,t){if(t==="server")return`'${e}' is not provided by 'stx' in a <script server> block. The engine binds only its own names there (defineProps, state, useHead, ...); any other name becomes \`await import('stx')\`, which does not resolve, so the whole script fails when the page renders. Import it from '@stacksjs/stx' instead.`;return`'${e}' is not provided by 'stx' in a client <script> block. The import is replaced by the window.stx runtime, which has no '${e}', so it is undefined in the browser.`}function ie(e,t){let s=[];for(let u of t){if(u.offset===void 0)continue;let i=u.kind==="server"?be:ye;ee.lastIndex=0;for(let l of u.code.matchAll(ee)){let g=l.index+l[0].indexOf("{")+1;for(let m of l[1].matchAll(/[^,]+/g)){let S=m[0];if(/^\s*type\s/.test(S))continue;let x=/^\s*([A-Za-z_$][\w$]*)/.exec(S);if(!x)continue;let r=x[1];if(!xe.has(r)||i.has(r))continue;let f=u.offset+g+m.index+x[0].length-r.length,p=e.slice(0,f),w=p.split(`
3
3
  `).length;s.push({line:w,column:f-(p.lastIndexOf(`
4
- `)+1)+1,offset:f,length:r.length,name:r,kind:u.kind,message:Se(r,u.kind)})}}}return s}import T from"path";var ke="@stacksjs/stx-typescript-plugin";function we(e,t){let s=T.resolve(e);for(;;){let u=T.join(s,"tsconfig.json");if(t(u))return u;let i=T.dirname(s);if(i===s)return;s=i}}function se(e,t,s){let u=we(e,s);if(!u)return;let i=new Set,l=(g)=>{if(i.has(g))return;i.add(g);let m=t(g);if(!m)return;let S=m.compilerOptions?.plugins;if(Array.isArray(S)){let r=S.find((p)=>p?.name===ke),f=Array.isArray(r?.libs)?r.libs.filter((p)=>typeof p==="string"):[];return r?{configPath:g,libs:f.map((p)=>T.resolve(T.dirname(g),p))}:null}let x=typeof m.extends==="string"?[m.extends]:Array.isArray(m.extends)?m.extends:[];for(let r of[...x].reverse()){if(typeof r!=="string"||!r.startsWith("."))continue;let f=T.resolve(T.dirname(g),r.endsWith(".json")?r:`${r}.json`),p=l(f);if(p!==void 0)return p}return};return l(u)??void 0}function _a(e,t="",s=""){let u=e.startLine>1?`
5
- `.repeat(e.startLine-1):"",i=Ts(e)+Es(Cs(e.code)),l=e.kind==="client"||e.kind==="plain"?Si(t,e.code):"";return dr(`${u+i}
4
+ `)+1)+1,offset:f,length:r.length,name:r,kind:u.kind,message:Se(r,u.kind)})}}}return s}import T from"path";var ke="@stacksjs/stx-typescript-plugin";function we(e,t){let s=T.resolve(e);for(;;){let u=T.join(s,"tsconfig.json");if(t(u))return u;let i=T.dirname(s);if(i===s)return;s=i}}function se(e,t,s){let u=we(e,s);if(!u)return;let i=new Set,l=(g)=>{if(i.has(g))return;i.add(g);let m=t(g);if(!m)return;let S=m.compilerOptions?.plugins;if(Array.isArray(S)){let r=S.find((p)=>p?.name===ke),f=Array.isArray(r?.libs)?r.libs.filter((p)=>typeof p==="string"):[];return r?{configPath:g,libs:f.map((p)=>T.resolve(T.dirname(g),p))}:null}let x=typeof m.extends==="string"?[m.extends]:Array.isArray(m.extends)?m.extends:[];for(let r of[...x].reverse()){if(typeof r!=="string"||!r.startsWith("."))continue;let f=T.resolve(T.dirname(g),r.endsWith(".json")?r:`${r}.json`),p=l(f);if(p!==void 0)return p}return};return l(u)??void 0}function Ea(e,t="",s=""){let u=e.startLine>1?`
5
+ `.repeat(e.startLine-1):"",i=Rs(e)+$s(Ts(e.code)),l=e.kind==="client"||e.kind==="plain"?Ci(t,e.code):"";return fr(`${u+i}
6
6
  ${l}
7
7
  export {}
8
8
  `,s)}var $e=new Set(["name","status","length","location","history","origin","closed","close","open","focus","blur","print","scroll","scrollTo","scrollBy","stop","top","parent","self","frames","event","external","menubar","toolbar"]);function ve(e){if(e.length===0)return"";let t=["// Generated \u2014 the composables the runtime publishes as bare globals."],s=new Set(y),u=[];for(let{file:i,names:l}of e){let g=JSON.stringify(i.replace(/\\/g,"/").replace(/\.ts$/,""));u.push(` export * from ${g}`);for(let m of l){if(s.has(m)||$e.has(m))continue;s.add(m),t.push(`declare const ${m}: typeof import(${g})[${JSON.stringify(m)}]`)}}return t.push("declare module '@composables' {",...u,"}"),t.join(`
9
- `)}function $o(e,t,s){return`${e}.__stx_${t}${s}.ts`}function El(e){return e.replace(/\.__stx_(?:server|client|plain|template)\d+\.ts$/,"")}function Ca(){return re("stx.d.ts")}function Ea(){return re("stx-module.d.ts")}function re(e){for(let t of[h.resolve(import.meta.dir,"..",e),h.resolve(import.meta.dir,"..","..",e)])if(M(t))return t;return null}var Te=/^(.*?)\((\d+),(\d+)\):\s+(error|warning)\s+TS(\d+):\s+(.*)$/;function De(e){return e>=1000&&e<2000}function oe(e){let t="",s=!1,u=!1;for(let i=0;i<e.length;i++){let l=e[i];if(s){if(t+=l,u)u=!1;else if(l==="\\")u=!0;else if(l==='"')s=!1;continue}if(l==='"'){s=!0,t+=l;continue}if(l==="/"&&e[i+1]==="/"){while(i<e.length&&e[i]!==`
9
+ `)}function Ao(e,t,s){return`${e}.__stx_${t}${s}.ts`}function $l(e){return e.replace(/\.__stx_(?:server|client|plain|template)\d+\.ts$/,"")}function Ta(){return re("stx.d.ts")}function $a(){return re("stx-module.d.ts")}function re(e){for(let t of[h.resolve(import.meta.dir,"..",e),h.resolve(import.meta.dir,"..","..",e)])if(M(t))return t;return null}var Te=/^(.*?)\((\d+),(\d+)\):\s+(error|warning)\s+TS(\d+):\s+(.*)$/;function De(e){return e>=1000&&e<2000}function oe(e){let t="",s=!1,u=!1;for(let i=0;i<e.length;i++){let l=e[i];if(s){if(t+=l,u)u=!1;else if(l==="\\")u=!0;else if(l==='"')s=!1;continue}if(l==='"'){s=!0,t+=l;continue}if(l==="/"&&e[i+1]==="/"){while(i<e.length&&e[i]!==`
10
10
  `)i++;t+=`
11
- `;continue}if(l==="/"&&e[i+1]==="*"){i+=2;while(i<e.length&&!(e[i]==="*"&&e[i+1]==="/"))i++;i++;continue}t+=l}return t.replace(/,(\s*[}\]])/g,"$1")}function Ee(e){try{return JSON.parse(oe(K(e,"utf8")))}catch{return}}function Oe(e){let t=h.resolve(e),s;for(;;){let r=h.join(t,"tsconfig.json");if(M(r)){s=r;break}let f=h.dirname(t);if(f===t)break;t=f}if(!s)return{};let u=new Set,i=s,l,g,m=s;while(i&&!u.has(i)){u.add(i);let r;try{r=JSON.parse(oe(K(i,"utf8")))}catch{break}let f=r?.compilerOptions??{};if(!l&&f.paths&&typeof f.paths==="object")l=f.paths,m=i;if(!g&&typeof f.baseUrl==="string")g=h.resolve(h.dirname(i),f.baseUrl);if(l&&g)break;i=typeof r?.extends==="string"?h.resolve(h.dirname(i),r.extends.endsWith(".json")?r.extends:`${r.extends}.json`):void 0}if(!l)return{};let S=g??h.dirname(m),x={};for(let[r,f]of Object.entries(l)){if(!Array.isArray(f))continue;x[r]=f.map((p)=>typeof p==="string"&&!h.isAbsolute(p)?h.resolve(S,p):p)}return{paths:x}}async function Tl(e,t={}){let s=t.client!==!1,u=t.server!==!1,i=t.templates!==!1,l=t.componentsDir??(i?(await o()).componentsDir:void 0),g=new Map,m=new Map,S=[],x=[],r=0,f=0,p=Ca();for(let n of e){let c=await Bun.file(n).text(),b=et(c).filter((d)=>{if(d.kind==="server")return u;return s}),k=et(c).filter((d)=>d.kind==="server").map((d)=>d.code).join(`
12
- `);for(let d of ie(c,b))S.push({file:n,line:d.line,column:d.column,code:0,message:d.message,category:"error",blockKind:d.kind});if(s&&k){let d=b.filter((O)=>O.kind!=="server"),E=[...new Set(d.flatMap((O)=>ki(k,O.code)))];if(E.length>0)m.set(n,{names:E,line:d[0].startLine,kind:d[0].kind})}let D=h.dirname(h.resolve(n)),v=i?_i(c,{runtimeGlobals:!p,originDir:D,filePath:h.resolve(n),componentsDir:l}):null,R=v?[...v.lineMap.values()].filter((d)=>d.expression).length:0;if(b.length===0&&R===0)continue;if(x.push(n),r+=b.length,f+=R,b.forEach((d,E)=>{g.set($o(n,d.kind,E),{source:_a(d,k,D),origin:n,kind:d.kind})}),v&&R>0)g.set($o(n,"template",0),{source:v.text,origin:n,kind:"template",virtual:v})}if(g.size===0)return{diagnostics:S,checkedFiles:x,blockCount:0,expressionCount:0};let w=(t.extraLibs??[]).map((n)=>h.resolve(n)),ce=se(e.length>0?h.dirname(h.resolve(e[0])):process.cwd(),Ee,M);for(let n of ce?.libs??[])if(!w.includes(n)&&M(n))w.push(n);if(p)w.push(p);let G=p?Ea():null;if(G)w.push(G);let X=`${a()}/typecheck/__stx_globals.d.ts`,ae=["// Generated \u2014 the context serve.ts injects into <script server> blocks.",wi(p?xi(K(p,"utf8")):void 0),...p?[]:["declare const window: any",...y.map((n)=>`declare const ${n}: any`)],["// Generated \u2014 the names stx auto-imports from @stacksjs/browser.",...Y.map((n)=>`declare const ${n}: any`)].join(`
13
- `),ve(await ss())].filter(Boolean).join(`
11
+ `;continue}if(l==="/"&&e[i+1]==="*"){i+=2;while(i<e.length&&!(e[i]==="*"&&e[i+1]==="/"))i++;i++;continue}t+=l}return t.replace(/,(\s*[}\]])/g,"$1")}function Ee(e){try{return JSON.parse(oe(K(e,"utf8")))}catch{return}}function Oe(e){let t=h.resolve(e),s;for(;;){let r=h.join(t,"tsconfig.json");if(M(r)){s=r;break}let f=h.dirname(t);if(f===t)break;t=f}if(!s)return{};let u=new Set,i=s,l,g,m=s;while(i&&!u.has(i)){u.add(i);let r;try{r=JSON.parse(oe(K(i,"utf8")))}catch{break}let f=r?.compilerOptions??{};if(!l&&f.paths&&typeof f.paths==="object")l=f.paths,m=i;if(!g&&typeof f.baseUrl==="string")g=h.resolve(h.dirname(i),f.baseUrl);if(l&&g)break;i=typeof r?.extends==="string"?h.resolve(h.dirname(i),r.extends.endsWith(".json")?r.extends:`${r.extends}.json`):void 0}if(!l)return{};let S=g??h.dirname(m),x={};for(let[r,f]of Object.entries(l)){if(!Array.isArray(f))continue;x[r]=f.map((p)=>typeof p==="string"&&!h.isAbsolute(p)?h.resolve(S,p):p)}return{paths:x}}async function Rl(e,t={}){let s=t.client!==!1,u=t.server!==!1,i=t.templates!==!1,l=t.componentsDir??(i?(await o()).componentsDir:void 0),g=new Map,m=new Map,S=[],x=[],r=0,f=0,p=Ta();for(let n of e){let c=await Bun.file(n).text(),b=tt(c).filter((d)=>{if(d.kind==="server")return u;return s}),k=tt(c).filter((d)=>d.kind==="server").map((d)=>d.code).join(`
12
+ `);for(let d of ie(c,b))S.push({file:n,line:d.line,column:d.column,code:0,message:d.message,category:"error",blockKind:d.kind});if(s&&k){let d=b.filter((O)=>O.kind!=="server"),E=[...new Set(d.flatMap((O)=>_i(k,O.code)))];if(E.length>0)m.set(n,{names:E,line:d[0].startLine,kind:d[0].kind})}let D=h.dirname(h.resolve(n)),v=i?Ei(c,{runtimeGlobals:!p,originDir:D,filePath:h.resolve(n),componentsDir:l}):null,R=v?[...v.lineMap.values()].filter((d)=>d.expression).length:0;if(b.length===0&&R===0)continue;if(x.push(n),r+=b.length,f+=R,b.forEach((d,E)=>{g.set(Ao(n,d.kind,E),{source:Ea(d,k,D),origin:n,kind:d.kind})}),v&&R>0)g.set(Ao(n,"template",0),{source:v.text,origin:n,kind:"template",virtual:v})}if(g.size===0)return{diagnostics:S,checkedFiles:x,blockCount:0,expressionCount:0};let w=(t.extraLibs??[]).map((n)=>h.resolve(n)),ce=se(e.length>0?h.dirname(h.resolve(e[0])):process.cwd(),Ee,M);for(let n of ce?.libs??[])if(!w.includes(n)&&M(n))w.push(n);if(p)w.push(p);let G=p?$a():null;if(G)w.push(G);let X=`${a()}/typecheck/__stx_globals.d.ts`,ae=["// Generated \u2014 the context serve.ts injects into <script server> blocks.",Si(p?ki(K(p,"utf8")):void 0),...p?[]:["declare const window: any",...y.map((n)=>`declare const ${n}: any`)],["// Generated \u2014 the names stx auto-imports from @stacksjs/browser.",...Y.map((n)=>`declare const ${n}: any`)].join(`
13
+ `),ve(await is())].filter(Boolean).join(`
14
14
  `),_=`${a()}/typecheck`;await Bun.$`rm -rf ${_}`.quiet().nothrow(),await Bun.$`mkdir -p ${_}`.quiet().nothrow(),await Bun.write(X,ae);let N=new Map,le=0;for(let[n,c]of g){let b=`${le++}_${n.replace(/[^\w.-]+/g,"_")}`;await Bun.write(`${_}/${b}`,c.source),N.set(b,c)}let ue={target:"ESNext",module:"ESNext",moduleResolution:"bundler",strict:!0,noEmit:!0,skipLibCheck:!0,allowJs:!0,esModuleInterop:!0,resolveJsonModule:!0,lib:["ESNext","DOM","DOM.Iterable"],types:[],...Oe(e.length>0?h.dirname(h.resolve(e[0])):process.cwd()),...t.compilerOptions??{}},F=async(n,c)=>{let b=`${_}/tsconfig${c===1?"":`.${c}`}.json`;await Bun.write(b,JSON.stringify({compilerOptions:ue,files:n.map((D)=>`${_}/${D}`).concat(X,...w)},null,2));let k=Bun.spawnSync(["bun","x","tsc","-p",b,"--pretty","false"],{stdout:"pipe",stderr:"pipe"});return{output:new TextDecoder().decode(k.stdout)+new TextDecoder().decode(k.stderr),exitCode:k.exitCode??0}},V=await F([...N.keys()],1),J=V.output,I=[],U=V.exitCode,W=0,pe=new Set(w.map((n)=>n.split("/").pop())),z=0,B=new Set,q=(n)=>{for(let c of n.replace(/\n[\t ]+([^\n]*)/g," $1").split(`
15
- `)){let b=c.match(Te);if(!b)continue;if(W++,pe.has(b[1].split("/").pop()))z++;let[,k,D,v,R,d,E]=b,O=k.split("/").pop(),C=N.get(O);if(!C)continue;if(De(Number(d)))B.add(O);let A=Number(D),L=Number(v),Q;if(C.virtual){let P=Ei(C.virtual,A,L);if(!P?.expression)continue;if(Ci(P,Number(d)))continue;A=P.line,L=P.column,Q=P.expression.code.trim()}I.push({file:C.origin,line:A,column:L,code:Number(d),message:E,category:R==="error"?"error":"warning",blockKind:C.kind,expression:Q})}};q(J);let de=W,fe=z;if(B.size>0&&B.size<N.size){let n=[...N.keys()].filter((c)=>!B.has(c));q((await F(n,2)).output)}if(s)for(let[n,c]of m){if(c.names.length===0)continue;I.push({file:n,line:c.line,column:1,code:0,message:`${c.names.length===1?"1 value reaches":`${c.names.length} values reach`} this block on the implicit bridge and ${c.names.length===1?"is":"are"} untyped: ${c.names.join(", ")}. Declare them with defineClientPayload({ ${c.names.join(", ")} }) in the server block to have them checked.`,category:"warning",blockKind:c.kind})}I.push(...S);let H=new Set,j=I.filter((n)=>{let c=`${n.file}:${n.line}:${n.column}:${n.code}:${n.message}`;if(H.has(c))return!1;return H.add(c),!0});j.sort((n,c)=>n.file.localeCompare(c.file)||n.line-c.line||n.column-c.column);let Z=fe>0&&j.length===0,ge=Z||U!==0&&de===0?`${Z?"a file passed with --lib has errors of its own, so nothing in your code was checked":`tsc exited ${U} without reporting any diagnostic, so nothing was checked`}. `+"A syntax error in an ambient declaration file does this \u2014 skipLibCheck suppresses "+`SEMANTIC diagnostics only. tsc said:
15
+ `)){let b=c.match(Te);if(!b)continue;if(W++,pe.has(b[1].split("/").pop()))z++;let[,k,D,v,R,d,E]=b,O=k.split("/").pop(),C=N.get(O);if(!C)continue;if(De(Number(d)))B.add(O);let A=Number(D),L=Number(v),Q;if(C.virtual){let P=$i(C.virtual,A,L);if(!P?.expression)continue;if(Ti(P,Number(d)))continue;A=P.line,L=P.column,Q=P.expression.code.trim()}I.push({file:C.origin,line:A,column:L,code:Number(d),message:E,category:R==="error"?"error":"warning",blockKind:C.kind,expression:Q})}};q(J);let de=W,fe=z;if(B.size>0&&B.size<N.size){let n=[...N.keys()].filter((c)=>!B.has(c));q((await F(n,2)).output)}if(s)for(let[n,c]of m){if(c.names.length===0)continue;I.push({file:n,line:c.line,column:1,code:0,message:`${c.names.length===1?"1 value reaches":`${c.names.length} values reach`} this block on the implicit bridge and ${c.names.length===1?"is":"are"} untyped: ${c.names.join(", ")}. Declare them with defineClientPayload({ ${c.names.join(", ")} }) in the server block to have them checked.`,category:"warning",blockKind:c.kind})}I.push(...S);let H=new Set,j=I.filter((n)=>{let c=`${n.file}:${n.line}:${n.column}:${n.code}:${n.message}`;if(H.has(c))return!1;return H.add(c),!0});j.sort((n,c)=>n.file.localeCompare(c.file)||n.line-c.line||n.column-c.column);let Z=fe>0&&j.length===0,ge=Z||U!==0&&de===0?`${Z?"a file passed with --lib has errors of its own, so nothing in your code was checked":`tsc exited ${U} without reporting any diagnostic, so nothing was checked`}. `+"A syntax error in an ambient declaration file does this \u2014 skipLibCheck suppresses "+`SEMANTIC diagnostics only. tsc said:
16
16
  ${J.trim().split(`
17
17
  `).slice(0,12).join(`
18
- `)||"(no output)"}`:void 0;return{diagnostics:j,checkedFiles:x,blockCount:r,expressionCount:f,failure:ge}}function $l(e){return e.map((t)=>{let s=t.blockKind==="template"?`[template: ${t.expression??""}]`:`[${t.blockKind==="plain"?"<script>":`<script ${t.blockKind}>`}]`;return`${t.file}:${t.line}:${t.column} ${t.category} TS${t.code} ${t.message} ${s}`}).join(`
18
+ `)||"(no output)"}`:void 0;return{diagnostics:j,checkedFiles:x,blockCount:r,expressionCount:f,failure:ge}}function Al(e){return e.map((t)=>{let s=t.blockKind==="template"?`[template: ${t.expression??""}]`:`[${t.blockKind==="plain"?"<script>":`<script ${t.blockKind}>`}]`;return`${t.file}:${t.line}:${t.column} ${t.category} TS${t.code} ${t.message} ${s}`}).join(`
19
19
  `)}
20
- export{_a,$o,El,Ca,Ea,Tl,$l};
20
+ export{Ea,Ao,$l,Ta,$a,Rl,Al};
@@ -0,0 +1,2 @@
1
+ // @bun
2
+ import{Vo,Uo,Ua,Wa,qa,Ga,nu}from"./chunk-drrczm0b.js";export{Vo as createVirtualList,nu as default,Ua as generateVirtualListCSS,qa as processInfiniteListDirectives,Ga as processVirtualGridDirectives,Uo as processVirtualListDirectives,Wa as useVirtualList};
@@ -1,3 +1,3 @@
1
1
  // @bun
2
- var l=new Map,u=new Map;function m(t){if(l.set(t.name,t),t.client)u.set(t.name,t.client)}function ot(t){return m(t),{name:t.name,hasEndTag:t.hasEndTag??!0,description:t.description,handler:async(r,o,a,s)=>{let n=f(o,t.defaults);if(t.validate){let e=t.validate(n);if(e!==!0){let d=typeof e==="string"?e:`Invalid parameters for @${t.name}`;throw Error(d)}}let i=r;if(t.transform)i=await t.transform(r,n,a,s);if(t.clientScript){let e=t.clientScript(n);i+=`<script>${e}</script>`}if(t.css){let e=t.css(n);i+=`<style>${e}</style>`}return i}}}function f(t,c){let r={...c};for(let o of t){let a=o.indexOf(":"),s=o.indexOf("="),n=a>=0&&(s<0||a<s)?a:s;if(n>=0){let i=o.slice(0,n).trim(),e=o.slice(n+1).trim();if(e==="true")e=!0;else if(e==="false")e=!1;else if(e==="null")e=null;else if(!Number.isNaN(Number(e)))e=Number(e);else if(typeof e==="string"&&e.startsWith("{"))try{e=JSON.parse(e)}catch{}r[i]=e}else{let i=Object.keys(r).filter((e)=>!c||!(e in c)).length;r[i===0?"value":`arg${i}`]=o}}return r}
3
- export{ot};
2
+ var l=new Map,u=new Map;function m(t){if(l.set(t.name,t),t.client)u.set(t.name,t.client)}function it(t){return m(t),{name:t.name,hasEndTag:t.hasEndTag??!0,description:t.description,handler:async(r,o,a,s)=>{let n=f(o,t.defaults);if(t.validate){let e=t.validate(n);if(e!==!0){let d=typeof e==="string"?e:`Invalid parameters for @${t.name}`;throw Error(d)}}let i=r;if(t.transform)i=await t.transform(r,n,a,s);if(t.clientScript){let e=t.clientScript(n);i+=`<script>${e}</script>`}if(t.css){let e=t.css(n);i+=`<style>${e}</style>`}return i}}}function f(t,c){let r={...c};for(let o of t){let a=o.indexOf(":"),s=o.indexOf("="),n=a>=0&&(s<0||a<s)?a:s;if(n>=0){let i=o.slice(0,n).trim(),e=o.slice(n+1).trim();if(e==="true")e=!0;else if(e==="false")e=!1;else if(e==="null")e=null;else if(!Number.isNaN(Number(e)))e=Number(e);else if(typeof e==="string"&&e.startsWith("{"))try{e=JSON.parse(e)}catch{}r[i]=e}else{let i=Object.keys(r).filter((e)=>!c||!(e in c)).length;r[i===0?"value":`arg${i}`]=o}}return r}
3
+ export{it};
@@ -1,4 +1,4 @@
1
1
  // @bun
2
2
  var f=new Set(["area","base","br","col","embed","hr","img","input","link","meta","param","source","track","wbr"]),b=new Set(["html","head","body","p","li","dt","dd","rt","rp","option","optgroup","thead","tbody","tfoot","tr","td","th","colgroup","caption"]);function l(i){return i.replace(/[^\n]/g," ")}function w(i){let o=i.replace(/<script\b[^>]*>[\s\S]*?<\/script>/gi,l).replace(/<style\b[^>]*>[\s\S]*?<\/style>/gi,l).replace(/<!--[\s\S]*?-->/g,l).replace(/\{\{\{[\s\S]*?\}\}\}/g,l).replace(/\{\{[\s\S]*?\}\}/g,l).replace(/\{!![\s\S]*?!!\}/g,l),s=new Map,r=new Map,p=/<(\/?)([A-Za-z][\w-]*)\b(?:[^<>"']|"[^"]*"|'[^']*')*?(\/?)>/g,t;while((t=p.exec(o))!==null){let e=t[1]==="/",n=t[2],a=t[3]==="/";if(f.has(n.toLowerCase()))continue;if(a)continue;if(e)r.set(n,(r.get(n)??0)+1);else{let g=s.get(n);if(g)g.count++;else{let d=o.slice(0,t.index).split(`
3
- `).length;s.set(n,{count:1,firstLine:d})}}}let c=[];for(let e of new Set([...s.keys(),...r.keys()])){if(b.has(e.toLowerCase()))continue;let n=s.get(e)?.count??0,a=r.get(e)??0;if(n!==a)c.push({tag:e,opened:n,closed:a,firstOpenLine:s.get(e)?.firstLine??0})}return c}var u=new Set;function uo(i,o){let s;try{s=w(i)}catch{return}if(s.length===0)return;let r=`${o}:${i.length}`;if(u.has(r))return;u.add(r);let p=o?o.split(/[/\\]/).pop()||o:"template";for(let{tag:t,opened:c,closed:e,firstOpenLine:n}of s)if(c>e){let a=n?` (first opened at line ${n})`:"";console.warn(`[stx] ${p}: <${t}> ${c} opened, ${e} closed \u2014 an unclosed <${t}>${a} may swallow the content that follows it.`)}else console.warn(`[stx] ${p}: <${t}> ${c} opened, ${e} closed \u2014 ${e-c} stray </${t}>.`)}
4
- export{uo};
3
+ `).length;s.set(n,{count:1,firstLine:d})}}}let c=[];for(let e of new Set([...s.keys(),...r.keys()])){if(b.has(e.toLowerCase()))continue;let n=s.get(e)?.count??0,a=r.get(e)??0;if(n!==a)c.push({tag:e,opened:n,closed:a,firstOpenLine:s.get(e)?.firstLine??0})}return c}var u=new Set;function fo(i,o){let s;try{s=w(i)}catch{return}if(s.length===0)return;let r=`${o}:${i.length}`;if(u.has(r))return;u.add(r);let p=o?o.split(/[/\\]/).pop()||o:"template";for(let{tag:t,opened:c,closed:e,firstOpenLine:n}of s)if(c>e){let a=n?` (first opened at line ${n})`:"";console.warn(`[stx] ${p}: <${t}> ${c} opened, ${e} closed \u2014 an unclosed <${t}>${a} may swallow the content that follows it.`)}else console.warn(`[stx] ${p}: <${t}> ${c} opened, ${e} closed \u2014 ${e-c} stray </${t}>.`)}
4
+ export{fo};
@@ -0,0 +1,2 @@
1
+ // @bun
2
+ import{Cl}from"./chunk-5pyv9gjh.js";import"./chunk-k4xytaq3.js";import"./chunk-26g3m2mg.js";import"./chunk-0bptz1km.js";import"./chunk-95ygdn0n.js";import"./chunk-y255yybn.js";import"./chunk-1m5cjrpw.js";import"./chunk-jdx4za9p.js";import"./chunk-a0ygyftk.js";import"./chunk-arrvcn7c.js";import"./chunk-tw10tgz8.js";import"./chunk-hjtym7d9.js";import"./chunk-ahyq08mp.js";import"./chunk-g1ae3haw.js";import"./chunk-fk79x8ns.js";import"./chunk-pvfx0dgz.js";export{Cl as startProductionServer};
@@ -1,5 +1,5 @@
1
1
  // @bun
2
- var g=0;function p(){return`async-${++g}-${Date.now().toString(36)}`}function wu(e,t={},c){let o=/@async\s*\(([^)]*)\)\s*([\s\S]*?)@error\s*([\s\S]*?)@endasync/gi,i=/@async\s*\(([^)]*)\)\s*([\s\S]*?)@endasync/gi,n=e;return n=n.replace(o,(r,s,a,d)=>{let l=p(),y=u(s);return m(l,y,a.trim(),d.trim())}),n=n.replace(i,(r,s,a)=>{let d=p(),l=u(s);return m(d,l,a.trim(),'<div class="stx-async-error">Failed to load component</div>')}),n}function u(e){let t={component:"",timeout:30000,delay:200,suspensible:!0,retries:0},c=/(\w+)\s*:\s*(?:'([^']*)'|"([^"]*)"|(\d+)|(\w+))/g,o;while((o=c.exec(e))!==null){let i=o[1],n=o[2]||o[3],r=o[4],s=o[5];switch(i){case"component":t.component=n||s||"";break;case"timeout":t.timeout=r?parseInt(r,10):30000;break;case"delay":t.delay=r?parseInt(r,10):200;break;case"suspensible":t.suspensible=s==="true";break;case"retries":t.retries=r?parseInt(r,10):0;break;case"loadingComponent":t.loadingComponent=n||s;break;case"errorComponent":t.errorComponent=n||s;break}}return t}function m(e,t,c,o){let{component:i,timeout:n,delay:r,suspensible:s,retries:a}=t;return`
2
+ var g=0;function p(){return`async-${++g}-${Date.now().toString(36)}`}function Su(e,t={},c){let o=/@async\s*\(([^)]*)\)\s*([\s\S]*?)@error\s*([\s\S]*?)@endasync/gi,i=/@async\s*\(([^)]*)\)\s*([\s\S]*?)@endasync/gi,n=e;return n=n.replace(o,(r,s,a,d)=>{let l=p(),y=u(s);return m(l,y,a.trim(),d.trim())}),n=n.replace(i,(r,s,a)=>{let d=p(),l=u(s);return m(d,l,a.trim(),'<div class="stx-async-error">Failed to load component</div>')}),n}function u(e){let t={component:"",timeout:30000,delay:200,suspensible:!0,retries:0},c=/(\w+)\s*:\s*(?:'([^']*)'|"([^"]*)"|(\d+)|(\w+))/g,o;while((o=c.exec(e))!==null){let i=o[1],n=o[2]||o[3],r=o[4],s=o[5];switch(i){case"component":t.component=n||s||"";break;case"timeout":t.timeout=r?parseInt(r,10):30000;break;case"delay":t.delay=r?parseInt(r,10):200;break;case"suspensible":t.suspensible=s==="true";break;case"retries":t.retries=r?parseInt(r,10):0;break;case"loadingComponent":t.loadingComponent=n||s;break;case"errorComponent":t.errorComponent=n||s;break}}return t}function m(e,t,c,o){let{component:i,timeout:n,delay:r,suspensible:s,retries:a}=t;return`
3
3
  <div class="stx-async-component" data-async-id="${e}" data-component="${i}" data-status="pending">
4
4
  <div class="stx-async-loading" data-async-loading="${e}">
5
5
  ${c}
@@ -226,7 +226,7 @@ catch (error) {
226
226
  loadComponent();
227
227
  })();
228
228
  </script>
229
- `}function xu(e){return{__asyncComponent:!0,...typeof e==="function"?{loader:e}:e}}function Su(e){return typeof e==="object"&&e!==null&&"__asyncComponent"in e&&e.__asyncComponent===!0}function ku(){return`
229
+ `}function ku(e){return{__asyncComponent:!0,...typeof e==="function"?{loader:e}:e}}function Cu(e){return typeof e==="object"&&e!==null&&"__asyncComponent"in e&&e.__asyncComponent===!0}function _u(){return`
230
230
  /* STX Async Component Styles */
231
231
  .stx-async-component {
232
232
  position: relative;
@@ -300,7 +300,7 @@ catch (error) {
300
300
  background-size: 200% 100%;
301
301
  }
302
302
  }
303
- `}function _u(){return`
303
+ `}function Eu(){return`
304
304
  // STX Async Component Runtime
305
305
  (function() {
306
306
  if (typeof window === 'undefined') return;
@@ -355,4 +355,4 @@ catch (error) {
355
355
  console.log('[stx] Async component runtime initialized');
356
356
  })();
357
357
  `}
358
- export{wu,xu,Su,ku,_u};
358
+ export{Su,ku,Cu,_u,Eu};
@@ -0,0 +1,2 @@
1
+ // @bun
2
+ import{Il}from"./chunk-nxn7gnpq.js";import"./chunk-k4xytaq3.js";import"./chunk-xgd6xgvz.js";import"./chunk-26g3m2mg.js";import"./chunk-0bptz1km.js";import"./chunk-95ygdn0n.js";import"./chunk-y255yybn.js";import"./chunk-1m5cjrpw.js";import"./chunk-jdx4za9p.js";import"./chunk-a0ygyftk.js";import"./chunk-arrvcn7c.js";import"./chunk-tw10tgz8.js";import"./chunk-hjtym7d9.js";import"./chunk-ahyq08mp.js";import"./chunk-g1ae3haw.js";import"./chunk-fk79x8ns.js";import"./chunk-pvfx0dgz.js";export{Il as buildForProduction};
@@ -0,0 +1,2 @@
1
+ // @bun
2
+ import{Ul}from"./chunk-xdqwq7a6.js";import"./chunk-0bptz1km.js";import"./chunk-95ygdn0n.js";import"./chunk-y255yybn.js";import"./chunk-1m5cjrpw.js";import"./chunk-jdx4za9p.js";import"./chunk-a0ygyftk.js";import"./chunk-arrvcn7c.js";import"./chunk-tw10tgz8.js";import"./chunk-hjtym7d9.js";import"./chunk-ahyq08mp.js";import"./chunk-g1ae3haw.js";import"./chunk-fk79x8ns.js";import"./chunk-pvfx0dgz.js";export{Ul as buildApp};
@@ -0,0 +1,2 @@
1
+ // @bun
2
+ import{u,Ds,Oi,Ni,Qc,el,tl,nl,rl,Vs,sl,rt,B,st,ol,hr,il,ji,Us,ot,r,yr,Bi,g,ie,kd}from"./chunk-0bptz1km.js";import"./chunk-95ygdn0n.js";import"./chunk-y255yybn.js";import"./chunk-1m5cjrpw.js";import"./chunk-jdx4za9p.js";import"./chunk-a0ygyftk.js";import"./chunk-arrvcn7c.js";import"./chunk-tw10tgz8.js";import"./chunk-hjtym7d9.js";import"./chunk-ahyq08mp.js";import"./chunk-g1ae3haw.js";import"./chunk-fk79x8ns.js";import"./chunk-pvfx0dgz.js";export{ie as clearComponentCache,Us as componentClientSignalNames,Ds as convertToCommonJS,g as createDetailedErrorMessage,rl as extractDirectiveNames,Oi as extractScriptFromTemplate,u as extractVariables,r as fileExists,kd as getComponentCacheStats,el as getPositionInfo,B as getSharedTranspiler,Bi as getSourceLineInfo,nl as hasDirectives,Ni as hasVariables,il as isHydrateTrigger,sl as isJavaScriptScript,ot as renderComponentWithSlot,yr as resolveTemplatePath,ol as scopeOnRootElement,Vs as scopeSequenceKey,rt as shouldTranspileTypeScript,ji as slotContentHasExpressions,st as transpileTypeScript,hr as userComponentFileExists,tl as validateDirective,Qc as validateTemplate};
@@ -0,0 +1,2 @@
1
+ // @bun
2
+ import{M,wd,Hc,Ps,Is,Ri,Ai,Os,Ns,gr,Pi,Ii,Vc,nt}from"./chunk-0bptz1km.js";import"./chunk-95ygdn0n.js";import"./chunk-y255yybn.js";import"./chunk-1m5cjrpw.js";import"./chunk-jdx4za9p.js";import"./chunk-a0ygyftk.js";import"./chunk-arrvcn7c.js";import"./chunk-tw10tgz8.js";import"./chunk-hjtym7d9.js";import"./chunk-ahyq08mp.js";import"./chunk-g1ae3haw.js";import"./chunk-fk79x8ns.js";import"./chunk-pvfx0dgz.js";export{wd as clearScriptScanCache,Os as convertServerLoopAttributesToDirectives,Ri as convertSignalDirectivesToAttributes,Ns as convertSignalLoopsToAttributes,M as extractExports,Ii as findMarkupIndexOutsideScripts,Is as hasSignalsSyntax,Ps as parseLoopExpression,Ai as preEvalLiteralReactiveIfs,gr as processScriptSetup,Pi as processSignals,Vc as rewriteStxImportSpecifiers,Hc as scanScriptTags,nt as stripStxRuntimeImports};
@@ -0,0 +1,2 @@
1
+ // @bun
2
+ import{kl}from"./chunk-7jp0w5j8.js";import"./chunk-0bptz1km.js";import"./chunk-95ygdn0n.js";import"./chunk-y255yybn.js";import"./chunk-1m5cjrpw.js";import"./chunk-jdx4za9p.js";import"./chunk-a0ygyftk.js";import"./chunk-arrvcn7c.js";import"./chunk-tw10tgz8.js";import"./chunk-hjtym7d9.js";import"./chunk-ahyq08mp.js";import"./chunk-g1ae3haw.js";import"./chunk-fk79x8ns.js";import"./chunk-pvfx0dgz.js";export{kl as startInteractive};