@stacksjs/stx 0.2.93 → 0.2.94

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 (551) hide show
  1. package/dist/a11y.js +1 -1
  2. package/dist/analytics.js +1 -1
  3. package/dist/analyzer.js +1 -1
  4. package/dist/animation.js +1 -1
  5. package/dist/app-shell.js +1 -1
  6. package/dist/app.js +1 -1
  7. package/dist/assets.js +1 -1
  8. package/dist/ast.js +1 -1
  9. package/dist/async-components.js +1 -1
  10. package/dist/auth.js +1 -1
  11. package/dist/broadcasting.js +1 -1
  12. package/dist/browser-composables.js +1 -1
  13. package/dist/build-assets.js +1 -1
  14. package/dist/build-mode-detector.js +1 -1
  15. package/dist/build-optimizer.js +1 -1
  16. package/dist/build-views.js +1 -1
  17. package/dist/build.js +1 -1
  18. package/dist/builtins/drawer.js +1 -1
  19. package/dist/builtins/escape.js +1 -1
  20. package/dist/builtins/icon.js +1 -1
  21. package/dist/builtins/index.js +1 -1
  22. package/dist/builtins/modal.js +1 -1
  23. package/dist/builtins/safe-image.js +1 -1
  24. package/dist/builtins/stx-image.js +1 -1
  25. package/dist/builtins/stx-link.js +1 -1
  26. package/dist/builtins/stx-loading-indicator.js +1 -1
  27. package/dist/builtins/suspense.js +1 -1
  28. package/dist/builtins/toast.js +1 -1
  29. package/dist/builtins/tooltip.js +1 -1
  30. package/dist/builtins/transition-group.js +1 -1
  31. package/dist/bundle-analyzer/collector.js +1 -1
  32. package/dist/bundle-analyzer/index.js +1 -1
  33. package/dist/bundle-analyzer/report.js +1 -1
  34. package/dist/bundle-analyzer/treemap.js +1 -1
  35. package/dist/caching.js +1 -1
  36. package/dist/{chunk-7074g241.js → chunk-03c26pjz.js} +1 -1
  37. package/dist/{chunk-n9dhs1dw.js → chunk-04mvcmcr.js} +1 -1
  38. package/dist/{chunk-hc2mf5h6.js → chunk-05hgyyqc.js} +1 -1
  39. package/dist/{chunk-kx6eb6ma.js → chunk-0g4gece6.js} +1 -1
  40. package/dist/{chunk-1v49fwr5.js → chunk-0jkwrcwj.js} +1 -1
  41. package/dist/{chunk-47kpewks.js → chunk-0m9tdm7t.js} +1 -1
  42. package/dist/{chunk-4deg33rw.js → chunk-0tatqxj2.js} +2 -2
  43. package/dist/{chunk-akf1r75r.js → chunk-0wdar532.js} +1 -1
  44. package/dist/{chunk-9cf97f9p.js → chunk-13yz561y.js} +2 -2
  45. package/dist/{chunk-rpx5fa65.js → chunk-174z0cd0.js} +2 -2
  46. package/dist/{chunk-wkz2vwkr.js → chunk-1mmykse5.js} +1 -1
  47. package/dist/{chunk-3te20hqw.js → chunk-1z2yq9em.js} +2 -2
  48. package/dist/{chunk-rw26rpek.js → chunk-25s7bckb.js} +2 -2
  49. package/dist/{chunk-xgkv66q5.js → chunk-268adc7r.js} +1 -1
  50. package/dist/{chunk-a87qqft6.js → chunk-26r6zh3t.js} +2 -2
  51. package/dist/{chunk-t0c9wvpr.js → chunk-2w3302dh.js} +1 -1
  52. package/dist/{chunk-vjbefncc.js → chunk-2xen423s.js} +1 -1
  53. package/dist/{chunk-jjdq01dv.js → chunk-3bjtemm6.js} +1 -1
  54. package/dist/{chunk-xv34zbp4.js → chunk-3jm3snz8.js} +1 -1
  55. package/dist/{chunk-e98v1bc6.js → chunk-3ngm57nt.js} +2 -2
  56. package/dist/{chunk-gz5fmp3q.js → chunk-3rh7va1z.js} +1 -1
  57. package/dist/{chunk-kypas8vy.js → chunk-3yg9hbmb.js} +1 -1
  58. package/dist/{chunk-qygvvygy.js → chunk-46mkpbkk.js} +2 -2
  59. package/dist/chunk-48cw2nde.js +2 -0
  60. package/dist/chunk-48r3qe0k.js +3 -0
  61. package/dist/{chunk-azkegjd8.js → chunk-4bt81cg3.js} +1 -1
  62. package/dist/{chunk-07y6m5xx.js → chunk-4j188175.js} +1 -1
  63. package/dist/{chunk-h7aq56qj.js → chunk-4qq8ffke.js} +1 -1
  64. package/dist/{chunk-hrnnh4tq.js → chunk-50vqeesm.js} +2 -2
  65. package/dist/{chunk-7n8g0nfn.js → chunk-52agge4n.js} +1 -1
  66. package/dist/{chunk-9t14se2t.js → chunk-57p201gb.js} +1 -1
  67. package/dist/{chunk-jpndqst5.js → chunk-5ggw1dyv.js} +1 -1
  68. package/dist/{chunk-ah88wzbg.js → chunk-5kt3ay7x.js} +1 -1
  69. package/dist/{chunk-x24s4heg.js → chunk-5p568px4.js} +1 -1
  70. package/dist/{chunk-q6zhd9yf.js → chunk-5ppkfyn2.js} +1 -1
  71. package/dist/{chunk-khdn7jwe.js → chunk-5q87fgkk.js} +2 -2
  72. package/dist/{chunk-0p1h3p3w.js → chunk-5qb761h2.js} +1 -1
  73. package/dist/{chunk-rtr974rc.js → chunk-5xvbq2gs.js} +2 -2
  74. package/dist/{chunk-p3e0cqtt.js → chunk-647849kf.js} +2 -2
  75. package/dist/{chunk-gkzq8zw4.js → chunk-6cr3eeh4.js} +1 -1
  76. package/dist/{chunk-mhgk632d.js → chunk-6djgb0hr.js} +1 -1
  77. package/dist/{chunk-tffh3b1e.js → chunk-6dqzky7x.js} +1 -1
  78. package/dist/{chunk-drjq2zwg.js → chunk-6w03t7h6.js} +2 -2
  79. package/dist/{chunk-ek2w6zvy.js → chunk-6wn85hn6.js} +1 -1
  80. package/dist/{chunk-jz73j3qs.js → chunk-6y4gqs1q.js} +1 -1
  81. package/dist/{chunk-nd9rmddh.js → chunk-75rndzbd.js} +1 -1
  82. package/dist/{chunk-7dkz6z2s.js → chunk-77tga15w.js} +2 -2
  83. package/dist/{chunk-wvf31nzs.js → chunk-7a51hkpf.js} +1 -1
  84. package/dist/{chunk-a2g2qb2y.js → chunk-7b0xdy5h.js} +1 -1
  85. package/dist/{chunk-ewa88139.js → chunk-7dy588as.js} +1 -1
  86. package/dist/{chunk-8ahwt6a4.js → chunk-7rvh2wwv.js} +1 -1
  87. package/dist/{chunk-jt0ezawy.js → chunk-7sm05m0j.js} +1 -1
  88. package/dist/{chunk-m167kjhv.js → chunk-7xcfy2fn.js} +1 -1
  89. package/dist/{chunk-keawsbpn.js → chunk-82t27pvd.js} +1 -1
  90. package/dist/{chunk-psc3wfcf.js → chunk-87kx8byz.js} +1 -1
  91. package/dist/{chunk-31dr4bys.js → chunk-8fgwhhb8.js} +2 -2
  92. package/dist/{chunk-rz2ec6g7.js → chunk-8qbax8xn.js} +1 -1
  93. package/dist/{chunk-e2q9c5vq.js → chunk-91s2hres.js} +1 -1
  94. package/dist/{chunk-yb1t2h8h.js → chunk-94g3cahw.js} +2 -2
  95. package/dist/{chunk-n98x35xd.js → chunk-957amb71.js} +1 -1
  96. package/dist/{chunk-v8j49spx.js → chunk-95w08s8v.js} +1 -1
  97. package/dist/{chunk-zy3rp1ab.js → chunk-9agvhp1x.js} +1 -1
  98. package/dist/{chunk-vgv7jvyz.js → chunk-9tmbrwwx.js} +1 -1
  99. package/dist/{chunk-3a4qsygv.js → chunk-9yz5d003.js} +2 -2
  100. package/dist/{chunk-4qcy5tx6.js → chunk-a69tvya5.js} +2 -2
  101. package/dist/{chunk-p52yzjq6.js → chunk-adjcg6wa.js} +2 -2
  102. package/dist/{chunk-w3b6m427.js → chunk-adqh2m9z.js} +1 -1
  103. package/dist/{chunk-h0hjy0kn.js → chunk-asarebzq.js} +1 -1
  104. package/dist/{chunk-43t7faps.js → chunk-aw3rp9ac.js} +1 -1
  105. package/dist/{chunk-7gd339hd.js → chunk-b0cyc09a.js} +1 -1
  106. package/dist/{chunk-09k66d8a.js → chunk-b3kkjcdh.js} +1 -1
  107. package/dist/{chunk-jnmgm2xw.js → chunk-b3prs7y0.js} +1 -1
  108. package/dist/{chunk-xw36p73h.js → chunk-b5zc9y0y.js} +2 -2
  109. package/dist/{chunk-krqn0ddk.js → chunk-baa7h4yz.js} +2 -2
  110. package/dist/{chunk-15nesxgt.js → chunk-bgec9r1v.js} +2 -2
  111. package/dist/{chunk-kdfe4t91.js → chunk-bjnjpsgn.js} +2 -2
  112. package/dist/{chunk-0a61y94n.js → chunk-bk8ew8ze.js} +2 -2
  113. package/dist/{chunk-pcntd9h4.js → chunk-bn08k7yy.js} +2 -2
  114. package/dist/{chunk-8va64c9n.js → chunk-bwxda6n1.js} +2 -2
  115. package/dist/{chunk-pa9zb7ty.js → chunk-bykjk6vj.js} +1 -1
  116. package/dist/{chunk-p3fpb79v.js → chunk-c53hyw5c.js} +1 -1
  117. package/dist/{chunk-km25cwz6.js → chunk-ca6qd1dx.js} +1 -1
  118. package/dist/{chunk-x3r64r0c.js → chunk-cdbwprfv.js} +2 -2
  119. package/dist/{chunk-tg2f1mzq.js → chunk-ceg2c2q2.js} +2 -2
  120. package/dist/{chunk-80g54ncj.js → chunk-cn409b69.js} +1 -1
  121. package/dist/{chunk-8xj7c3mf.js → chunk-cp3kwv17.js} +1 -1
  122. package/dist/{chunk-nm15ccsg.js → chunk-cpcc11vp.js} +2 -2
  123. package/dist/{chunk-y6xsqe9a.js → chunk-cr3wbrcr.js} +2 -2
  124. package/dist/{chunk-4d2y57k7.js → chunk-cygfdk1n.js} +2 -2
  125. package/dist/{chunk-xys2sxh6.js → chunk-cyp4m0vh.js} +1 -1
  126. package/dist/{chunk-27zsyhrd.js → chunk-cz25azze.js} +1 -1
  127. package/dist/{chunk-4x7kae4j.js → chunk-d77yxcds.js} +2 -2
  128. package/dist/{chunk-x05nxhyv.js → chunk-dyjnn5k8.js} +2 -2
  129. package/dist/{chunk-9jtj77jx.js → chunk-dzw95th7.js} +2 -2
  130. package/dist/{chunk-7b6s3g65.js → chunk-e0zytzdh.js} +1 -1
  131. package/dist/{chunk-b77wjyn7.js → chunk-e53h9qhd.js} +1 -1
  132. package/dist/{chunk-wazkqv7n.js → chunk-eds0f8f1.js} +2 -2
  133. package/dist/{chunk-04n64bnt.js → chunk-eh8hact1.js} +1 -1
  134. package/dist/{chunk-scpkdrdb.js → chunk-epj957jf.js} +1 -1
  135. package/dist/{chunk-trfswy66.js → chunk-eqeyaq6g.js} +1 -1
  136. package/dist/{chunk-x5g9w4hh.js → chunk-fbxt2mrx.js} +2 -2
  137. package/dist/{chunk-5shey2e4.js → chunk-fch9tk1k.js} +1 -1
  138. package/dist/{chunk-988dw6q3.js → chunk-fe7r1mq1.js} +2 -2
  139. package/dist/{chunk-8b3z0zd5.js → chunk-fhawx87n.js} +1 -1
  140. package/dist/{chunk-ynhngsdh.js → chunk-fk51yyrw.js} +1 -1
  141. package/dist/{chunk-dqn9gyhb.js → chunk-fms20x0n.js} +1 -1
  142. package/dist/{chunk-bk3j0n82.js → chunk-fs0qezn5.js} +1 -1
  143. package/dist/{chunk-2j21d3ka.js → chunk-g2hekckm.js} +1 -1
  144. package/dist/{chunk-55nwdnsd.js → chunk-g8b81pzc.js} +1 -1
  145. package/dist/{chunk-avx8aydt.js → chunk-ganag9dm.js} +2 -2
  146. package/dist/{chunk-hbgxbgam.js → chunk-gc84b1d2.js} +2 -2
  147. package/dist/{chunk-djddhmcc.js → chunk-gcf5v18y.js} +1 -1
  148. package/dist/{chunk-v7f8jj15.js → chunk-ghrx0hn1.js} +1 -1
  149. package/dist/{chunk-ckxjqqn9.js → chunk-gqpkp459.js} +2 -2
  150. package/dist/chunk-h45py5w5.js +2 -0
  151. package/dist/{chunk-aywxfqev.js → chunk-haecq01c.js} +1 -1
  152. package/dist/{chunk-hbehnm18.js → chunk-hepg894w.js} +2 -2
  153. package/dist/{chunk-29y0hk5z.js → chunk-hjdc99kb.js} +2 -2
  154. package/dist/{chunk-8n9nnqr6.js → chunk-hje9v2zh.js} +1 -1
  155. package/dist/{chunk-bdk6g1vj.js → chunk-hke99a0v.js} +2 -2
  156. package/dist/{chunk-qvrbjpdc.js → chunk-hpqr9e3x.js} +2 -2
  157. package/dist/{chunk-ht43ds42.js → chunk-hq5cem49.js} +1 -1
  158. package/dist/{chunk-8vtm0m84.js → chunk-hrampcrj.js} +1 -1
  159. package/dist/{chunk-fjk3x41y.js → chunk-ht4j68cs.js} +2 -2
  160. package/dist/{chunk-xyg1r5w0.js → chunk-j4s5qwd7.js} +2 -2
  161. package/dist/{chunk-9eq3ht5f.js → chunk-jbejwejg.js} +1 -1
  162. package/dist/{chunk-baf1hfwh.js → chunk-jfm69keq.js} +2 -2
  163. package/dist/chunk-jfrn43vh.js +2 -0
  164. package/dist/{chunk-zen6ax1y.js → chunk-jjvp4t5w.js} +2 -2
  165. package/dist/{chunk-vmxjghsm.js → chunk-jt44av4j.js} +1 -1
  166. package/dist/{chunk-k21df0pg.js → chunk-jt98jhpt.js} +1 -1
  167. package/dist/{chunk-0p0nyq50.js → chunk-k8440jxh.js} +2 -2
  168. package/dist/{chunk-y1k17c8b.js → chunk-kdxa9epn.js} +2 -2
  169. package/dist/{chunk-p1h8065h.js → chunk-kfd2hf6f.js} +2 -2
  170. package/dist/{chunk-x0770gt9.js → chunk-kh6rfz2v.js} +1 -1
  171. package/dist/{chunk-bhqgmyqw.js → chunk-kkp6rs2n.js} +1 -1
  172. package/dist/{chunk-jjb05d21.js → chunk-m59y310j.js} +2 -2
  173. package/dist/{chunk-ay9qf4zj.js → chunk-mgmyr1b9.js} +1 -1
  174. package/dist/{chunk-vw7vqd76.js → chunk-mqwbpamc.js} +1 -1
  175. package/dist/{chunk-bs3gmfxz.js → chunk-mrehzhxv.js} +1 -1
  176. package/dist/{chunk-1sr54zp8.js → chunk-mv03qb75.js} +1 -1
  177. package/dist/chunk-mwbng54r.js +2 -0
  178. package/dist/{chunk-rwrv9wbf.js → chunk-n46a5g1g.js} +1 -1
  179. package/dist/{chunk-zf2pek72.js → chunk-n944baxp.js} +1 -1
  180. package/dist/{chunk-6djzdes9.js → chunk-nanw7yhz.js} +1 -1
  181. package/dist/{chunk-g1vt329s.js → chunk-nap11ntr.js} +2 -2
  182. package/dist/{chunk-d0zjtdw4.js → chunk-ncnfa8ae.js} +2 -2
  183. package/dist/{chunk-knm8a8yx.js → chunk-pc31m5x5.js} +1 -1
  184. package/dist/{chunk-7ed3tean.js → chunk-q60knhjf.js} +1 -1
  185. package/dist/{chunk-shv88d2d.js → chunk-q6h6yvzb.js} +2 -2
  186. package/dist/{chunk-9wmq2272.js → chunk-qd5461tt.js} +1 -1
  187. package/dist/{chunk-0dx4q6yq.js → chunk-qdc3aav1.js} +1 -1
  188. package/dist/{chunk-d1qh1x2g.js → chunk-qfwzdffx.js} +2 -2
  189. package/dist/{chunk-p73meypx.js → chunk-qgxwmagw.js} +1 -1
  190. package/dist/{chunk-rw7937v4.js → chunk-qhdtssn1.js} +2 -2
  191. package/dist/{chunk-pcm1vd8w.js → chunk-qk584whs.js} +1 -1
  192. package/dist/{chunk-9zbk5zx5.js → chunk-qm4yppj5.js} +2 -2
  193. package/dist/chunk-qwyd9a1d.js +2 -0
  194. package/dist/{chunk-xs03kc1h.js → chunk-qxs6et76.js} +1 -1
  195. package/dist/{chunk-8qc1bsym.js → chunk-rb1e4cnb.js} +1 -1
  196. package/dist/{chunk-9ecv8aqj.js → chunk-rv002yn0.js} +1 -1
  197. package/dist/chunk-sjagg9qz.js +66 -0
  198. package/dist/{chunk-bndmdahk.js → chunk-sn07azv3.js} +2 -2
  199. package/dist/{chunk-5f43yz6z.js → chunk-svahbw0w.js} +2 -2
  200. package/dist/{chunk-pznnww6k.js → chunk-svhtdb0s.js} +1 -1
  201. package/dist/{chunk-tzwtg722.js → chunk-t37dp99j.js} +1 -1
  202. package/dist/{chunk-mgj88zeq.js → chunk-tj6zfxeb.js} +2 -2
  203. package/dist/{chunk-rqxf5hns.js → chunk-tmgz5t2g.js} +1 -1
  204. package/dist/{chunk-hjm2xab3.js → chunk-tr0z0e1g.js} +1 -1
  205. package/dist/{chunk-2cdvw21b.js → chunk-tx6br9r4.js} +1 -1
  206. package/dist/{chunk-hy8820vc.js → chunk-vdfwv0fp.js} +1 -1
  207. package/dist/{chunk-yrsb6j3z.js → chunk-vp2395eb.js} +2 -2
  208. package/dist/{chunk-j447q024.js → chunk-vpe6napb.js} +2 -2
  209. package/dist/{chunk-wg9k6h8w.js → chunk-vv9wfz1c.js} +2 -2
  210. package/dist/{chunk-yj4x5ehw.js → chunk-vw6ejgmy.js} +1 -1
  211. package/dist/{chunk-1xz0w746.js → chunk-w01y57f5.js} +2 -2
  212. package/dist/{chunk-8a5bxece.js → chunk-w21mwxdd.js} +1 -1
  213. package/dist/{chunk-20swzkx3.js → chunk-w4n8fqp7.js} +1 -1
  214. package/dist/{chunk-m491r0rj.js → chunk-w959hm8j.js} +1 -1
  215. package/dist/{chunk-9b6cec0v.js → chunk-wk07pwtd.js} +1 -1
  216. package/dist/{chunk-amaa1bev.js → chunk-wxvyj65q.js} +1 -1
  217. package/dist/{chunk-m8448qby.js → chunk-x1hjv24z.js} +1 -1
  218. package/dist/{chunk-frg705zq.js → chunk-x39sfpvm.js} +1 -1
  219. package/dist/{chunk-j58vh0w6.js → chunk-x4fze3q2.js} +1 -1
  220. package/dist/{chunk-35faj94w.js → chunk-x64kb787.js} +1 -1
  221. package/dist/{chunk-vg5kt6az.js → chunk-xcb0pbr6.js} +1 -1
  222. package/dist/{chunk-p077sw22.js → chunk-xhkjhxsp.js} +1 -1
  223. package/dist/{chunk-zcxzdrn7.js → chunk-xhnpsngj.js} +2 -2
  224. package/dist/{chunk-7j5e8sdj.js → chunk-xsqbk4yk.js} +2 -2
  225. package/dist/{chunk-r0jcmpv6.js → chunk-xygc53vr.js} +1 -1
  226. package/dist/{chunk-nhv099jv.js → chunk-y25pr13j.js} +1 -1
  227. package/dist/{chunk-rvptcndz.js → chunk-y4c744dk.js} +2 -2
  228. package/dist/{chunk-wfg2gm11.js → chunk-y4md9hp0.js} +1 -1
  229. package/dist/{chunk-n5kg7fpx.js → chunk-y5wazw6j.js} +1 -1
  230. package/dist/{chunk-8dhdpa5h.js → chunk-y86m1wr4.js} +2 -2
  231. package/dist/{chunk-veeerpwa.js → chunk-yaan98dd.js} +1 -1
  232. package/dist/{chunk-bxc7kjsk.js → chunk-yach037f.js} +1 -1
  233. package/dist/{chunk-06w68hyg.js → chunk-yexjrg9d.js} +2 -2
  234. package/dist/{chunk-6eqbxcrd.js → chunk-yj560gp8.js} +1 -1
  235. package/dist/{chunk-ejh8fyak.js → chunk-yr1gdceh.js} +1 -1
  236. package/dist/{chunk-r5m9xtm7.js → chunk-yw2fzq86.js} +2 -2
  237. package/dist/{chunk-h5jxydqq.js → chunk-ywkrxp2h.js} +1 -1
  238. package/dist/{chunk-j8tn8enq.js → chunk-z37xq5rx.js} +2 -2
  239. package/dist/{chunk-npfmdb6y.js → chunk-z4djtgt0.js} +1 -1
  240. package/dist/{chunk-zk3d0jjf.js → chunk-z8cjr9n9.js} +1 -1
  241. package/dist/{chunk-10debkj5.js → chunk-znxp3zha.js} +1 -1
  242. package/dist/{chunk-k848dzsa.js → chunk-zt2yag10.js} +1 -1
  243. package/dist/cli.js +1 -1
  244. package/dist/client/directive.js +1 -1
  245. package/dist/client/index.js +1 -1
  246. package/dist/client-helpers.js +1 -1
  247. package/dist/client-script-bundler.js +1 -1
  248. package/dist/client-script.js +1 -1
  249. package/dist/component-hmr.js +1 -1
  250. package/dist/component-processing.js +1 -1
  251. package/dist/component-registry.js +1 -1
  252. package/dist/component-renderer.js +1 -1
  253. package/dist/components.js +1 -1
  254. package/dist/composables/index.js +1 -1
  255. package/dist/composables/use-battery.js +1 -1
  256. package/dist/composables/use-broadcast-channel.js +1 -1
  257. package/dist/composables/use-channel.js +1 -1
  258. package/dist/composables/use-clipboard.js +1 -1
  259. package/dist/composables/use-color-mode.js +1 -1
  260. package/dist/composables/use-cookie.js +1 -1
  261. package/dist/composables/use-device-orientation.js +1 -1
  262. package/dist/composables/use-event-listener.js +1 -1
  263. package/dist/composables/use-event-source.js +1 -1
  264. package/dist/composables/use-eye-dropper.js +1 -1
  265. package/dist/composables/use-fetch.js +1 -1
  266. package/dist/composables/use-fullscreen.js +1 -1
  267. package/dist/composables/use-geolocation.js +1 -1
  268. package/dist/composables/use-idle.js +1 -1
  269. package/dist/composables/use-intersection-observer.js +1 -1
  270. package/dist/composables/use-keyboard.js +1 -1
  271. package/dist/composables/use-media-query.js +1 -1
  272. package/dist/composables/use-meta.js +1 -1
  273. package/dist/composables/use-mouse.js +1 -1
  274. package/dist/composables/use-mutation-observer.js +1 -1
  275. package/dist/composables/use-network.js +1 -1
  276. package/dist/composables/use-notification.js +1 -1
  277. package/dist/composables/use-permissions.js +1 -1
  278. package/dist/composables/use-resize-observer.js +1 -1
  279. package/dist/composables/use-router.js +1 -1
  280. package/dist/composables/use-share.js +1 -1
  281. package/dist/composables/use-speech.js +1 -1
  282. package/dist/composables/use-storage.js +1 -1
  283. package/dist/composables/use-text-selection.js +1 -1
  284. package/dist/composables/use-timer.js +1 -1
  285. package/dist/composables/use-utilities.js +1 -1
  286. package/dist/composables/use-wake-lock.js +1 -1
  287. package/dist/composables/use-websocket.js +1 -1
  288. package/dist/composables/use-window.js +1 -1
  289. package/dist/composables.js +1 -1
  290. package/dist/composition-api.js +1 -1
  291. package/dist/computed.js +1 -1
  292. package/dist/conditionals.js +1 -1
  293. package/dist/config.js +1 -1
  294. package/dist/craft-bridge.js +1 -1
  295. package/dist/craft-compiler.js +1 -1
  296. package/dist/craft-components.js +1 -1
  297. package/dist/craft-entry.js +1 -1
  298. package/dist/craft-ssr.js +1 -1
  299. package/dist/csp.js +1 -1
  300. package/dist/csrf.js +1 -1
  301. package/dist/custom-directives.js +1 -1
  302. package/dist/defer.js +1 -1
  303. package/dist/deploy/config-generators.js +1 -1
  304. package/dist/deploy/index.js +1 -1
  305. package/dist/deploy/netlify.js +1 -1
  306. package/dist/dev-server/crosswind.js +1 -1
  307. package/dist/dev-server/index.js +1 -1
  308. package/dist/dev-server/keyboard-shortcuts.js +1 -1
  309. package/dist/dev-server/native-window.js +1 -1
  310. package/dist/dev-server/port-utils.js +1 -1
  311. package/dist/dev-server/serve-app.js +6 -1
  312. package/dist/dev-server/serve-file.js +6 -1
  313. package/dist/dev-server/serve-markdown.js +1 -1
  314. package/dist/dev-server/serve-multi.js +171 -1
  315. package/dist/dev-server/terminal-colors.js +1 -1
  316. package/dist/dev-server/theme-selector.js +1 -1
  317. package/dist/dev-server/types.js +1 -1
  318. package/dist/dev-server.js +1 -1
  319. package/dist/devtools.js +1 -1
  320. package/dist/directive-api.js +1 -1
  321. package/dist/docs.js +1 -1
  322. package/dist/doctor.js +1 -1
  323. package/dist/document-shell.js +1 -1
  324. package/dist/dynamic-components.js +1 -1
  325. package/dist/edge-runtime.js +1 -1
  326. package/dist/env.js +1 -1
  327. package/dist/error-boundaries.js +1 -1
  328. package/dist/error-handling.js +1 -1
  329. package/dist/errors/codes.js +1 -1
  330. package/dist/errors/formatter.js +1 -1
  331. package/dist/errors/index.js +1 -1
  332. package/dist/errors/logger.js +1 -1
  333. package/dist/errors/sanitizer.js +1 -1
  334. package/dist/errors/types.js +1 -1
  335. package/dist/events.js +1 -1
  336. package/dist/expressions.js +1 -1
  337. package/dist/formatter.js +1 -1
  338. package/dist/forms-validation.js +1 -1
  339. package/dist/forms.js +1 -1
  340. package/dist/head.js +1 -1
  341. package/dist/heatmap.js +1 -1
  342. package/dist/hot-reload.js +1 -1
  343. package/dist/html-masking.js +1 -1
  344. package/dist/hydration-runtime.js +1 -1
  345. package/dist/hydration.js +1 -1
  346. package/dist/i18n.js +1 -1
  347. package/dist/image-optimization/auto-sibling.js +1 -1
  348. package/dist/image-optimization/build-plugin.js +1 -1
  349. package/dist/image-optimization/component.js +1 -1
  350. package/dist/image-optimization/directive.js +1 -1
  351. package/dist/image-optimization/index.js +1 -1
  352. package/dist/image-optimization/processor.js +1 -1
  353. package/dist/image-optimization/serve.js +1 -1
  354. package/dist/includes.js +1 -1
  355. package/dist/index.js +1 -1
  356. package/dist/init.js +1 -1
  357. package/dist/inline-assets.js +1 -1
  358. package/dist/interactive.js +1 -1
  359. package/dist/internal-markdown.js +1 -1
  360. package/dist/island-chunking.js +1 -1
  361. package/dist/js-ts.js +1 -1
  362. package/dist/jsx-runtime.js +1 -1
  363. package/dist/keep-alive.js +1 -1
  364. package/dist/lazy-loader.js +1 -1
  365. package/dist/loading-indicator.js +1 -1
  366. package/dist/loops.js +1 -1
  367. package/dist/manifest.js +1 -1
  368. package/dist/markdown.js +1 -1
  369. package/dist/media/client/blur-up.js +1 -1
  370. package/dist/media/client/index.js +1 -1
  371. package/dist/media/client/lazy-load.js +1 -1
  372. package/dist/media/client/upload-handler.js +1 -1
  373. package/dist/media/image/component.js +1 -1
  374. package/dist/media/image/directive.js +1 -1
  375. package/dist/media/image/editing.js +1 -1
  376. package/dist/media/image/index.js +1 -1
  377. package/dist/media/image/placeholder.js +1 -1
  378. package/dist/media/image/processor/cache.js +1 -1
  379. package/dist/media/image/processor/index.js +1 -1
  380. package/dist/media/image/processor/optimizer.js +1 -1
  381. package/dist/media/image/processor/responsive.js +1 -1
  382. package/dist/media/image/srcset.js +1 -1
  383. package/dist/media/index.js +1 -1
  384. package/dist/media/manager/embed.js +1 -1
  385. package/dist/media/protected/component.js +1 -1
  386. package/dist/media/protected/index.js +1 -1
  387. package/dist/media/protected/signature.js +1 -1
  388. package/dist/media/shared/cache.js +1 -1
  389. package/dist/media/shared/hash.js +1 -1
  390. package/dist/media/shared/index.js +1 -1
  391. package/dist/media/upload/component.js +1 -1
  392. package/dist/media/upload/index.js +1 -1
  393. package/dist/media/video/directive.js +1 -1
  394. package/dist/media/video/index.js +1 -1
  395. package/dist/media/video/processor/cache.js +1 -1
  396. package/dist/media/video/processor/index.js +1 -1
  397. package/dist/media/video/processor/streaming.js +1 -1
  398. package/dist/media/video/processor/thumbnail.js +1 -1
  399. package/dist/media/video/processor/transcoder.js +1 -1
  400. package/dist/method-spoofing.js +1 -1
  401. package/dist/middleware.js +1 -1
  402. package/dist/misc-directives.js +1 -1
  403. package/dist/native-build.js +1 -1
  404. package/dist/parser/directive-parser.js +1 -1
  405. package/dist/parser/expression-parser.js +1 -1
  406. package/dist/parser/index.js +1 -1
  407. package/dist/parser/tokenizer.js +1 -1
  408. package/dist/partial-hydration.js +1 -1
  409. package/dist/performance-utils.js +1 -1
  410. package/dist/placeholder.js +1 -1
  411. package/dist/plugin-system.js +1 -1
  412. package/dist/plugin.js +1 -1
  413. package/dist/precompiler.js +1 -1
  414. package/dist/process.js +1 -1
  415. package/dist/production-build.js +1 -1
  416. package/dist/production-builder.js +1 -1
  417. package/dist/production-server.js +1 -1
  418. package/dist/props.js +1 -1
  419. package/dist/public-env.js +1 -1
  420. package/dist/pwa/audit.js +1 -1
  421. package/dist/pwa/directives.js +1 -1
  422. package/dist/pwa/icons.js +1 -1
  423. package/dist/pwa/index.js +1 -1
  424. package/dist/pwa/inject.js +1 -1
  425. package/dist/pwa/manifest.js +1 -1
  426. package/dist/pwa/offline.js +1 -1
  427. package/dist/pwa/precache.js +1 -1
  428. package/dist/pwa/service-worker.js +1 -1
  429. package/dist/pwa/workbox-strategies.js +1 -1
  430. package/dist/pwa/workbox.js +1 -1
  431. package/dist/reactive-bindings.js +1 -1
  432. package/dist/reactive.js +1 -1
  433. package/dist/reactivity.js +1 -1
  434. package/dist/release.js +1 -1
  435. package/dist/render.js +1 -1
  436. package/dist/route-middleware.js +1 -1
  437. package/dist/router.js +1 -1
  438. package/dist/routes.js +1 -1
  439. package/dist/runtime-injection.js +1 -1
  440. package/dist/runtime.js +1 -1
  441. package/dist/safe-evaluator.js +1 -1
  442. package/dist/scaffolding.js +1 -1
  443. package/dist/screenshot.js +1 -1
  444. package/dist/script-classifier.js +1 -1
  445. package/dist/script-validation.js +1 -1
  446. package/dist/seo.js +1 -1
  447. package/dist/serve.js +1 -1
  448. package/dist/server-bindings.js +1 -1
  449. package/dist/server-components.js +1 -1
  450. package/dist/signal-processing.js +1 -1
  451. package/dist/signals-api.js +1 -1
  452. package/dist/signals.js +1 -1
  453. package/dist/site-builder/build.js +1 -1
  454. package/dist/site-builder/i18n.js +1 -1
  455. package/dist/site-builder/index.js +1 -1
  456. package/dist/site-builder/robots.js +1 -1
  457. package/dist/site-builder/router.js +1 -1
  458. package/dist/site-builder/seo.js +1 -1
  459. package/dist/site-builder/sitemap.js +1 -1
  460. package/dist/site-builder/theme.js +1 -1
  461. package/dist/slots.js +1 -1
  462. package/dist/source-maps.js +1 -1
  463. package/dist/spa-shell.js +1 -1
  464. package/dist/ssr.js +1 -1
  465. package/dist/state-management.js +1 -1
  466. package/dist/store-imports.js +1 -1
  467. package/dist/store-loader.js +1 -1
  468. package/dist/stores-client.js +1 -1
  469. package/dist/story/addons.js +1 -1
  470. package/dist/story/analytics.js +1 -1
  471. package/dist/story/auto-stories.js +1 -1
  472. package/dist/story/bookmarks.js +1 -1
  473. package/dist/story/bun-test.js +1 -1
  474. package/dist/story/cli.js +1 -1
  475. package/dist/story/collect/analyzer.js +1 -1
  476. package/dist/story/collect/index.js +1 -1
  477. package/dist/story/collect/parser.js +1 -1
  478. package/dist/story/collect/scanner.js +1 -1
  479. package/dist/story/collect/tree.js +1 -1
  480. package/dist/story/commands/build.js +1 -1
  481. package/dist/story/commands/dev.js +1 -1
  482. package/dist/story/commands/index.js +1 -1
  483. package/dist/story/commands/preview.js +1 -1
  484. package/dist/story/compiled-output.js +1 -1
  485. package/dist/story/composition.js +1 -1
  486. package/dist/story/config-watcher.js +1 -1
  487. package/dist/story/config.js +1 -1
  488. package/dist/story/context.js +1 -1
  489. package/dist/story/controls/index.js +1 -1
  490. package/dist/story/crosswind.js +1 -1
  491. package/dist/story/desktop-preview.js +1 -1
  492. package/dist/story/docs-generator.js +1 -1
  493. package/dist/story/errors.js +1 -1
  494. package/dist/story/figma-export.js +1 -1
  495. package/dist/story/generator.js +1 -1
  496. package/dist/story/hmr.js +1 -1
  497. package/dist/story/hot-swap.js +1 -1
  498. package/dist/story/index.js +1 -1
  499. package/dist/story/interactions.js +1 -1
  500. package/dist/story/keyboard-shortcuts.js +1 -1
  501. package/dist/story/output.js +1 -1
  502. package/dist/story/performance.js +1 -1
  503. package/dist/story/presets.js +1 -1
  504. package/dist/story/props-validation.js +1 -1
  505. package/dist/story/renderer.js +1 -1
  506. package/dist/story/search-index.js +1 -1
  507. package/dist/story/search.js +1 -1
  508. package/dist/story/server.js +1 -1
  509. package/dist/story/setup.js +1 -1
  510. package/dist/story/snapshots.js +1 -1
  511. package/dist/story/testing.js +1 -1
  512. package/dist/story/theme.js +1 -1
  513. package/dist/story/ui/code-panel.js +1 -1
  514. package/dist/story/ui/controls-panel.js +1 -1
  515. package/dist/story/ui/index.js +1 -1
  516. package/dist/story/ui/navigation.js +1 -1
  517. package/dist/story/ui/preview.js +1 -1
  518. package/dist/story/visual-testing.js +1 -1
  519. package/dist/streaming.js +1 -1
  520. package/dist/strict-lint.js +1 -1
  521. package/dist/style-scoping.js +1 -1
  522. package/dist/suspense.js +1 -1
  523. package/dist/teleport.js +1 -1
  524. package/dist/template-compiler.js +1 -1
  525. package/dist/template-hydrator.js +1 -1
  526. package/dist/template-tag-balance.js +1 -1
  527. package/dist/testing.js +1 -1
  528. package/dist/transitions.js +1 -1
  529. package/dist/type-checker.js +1 -1
  530. package/dist/types/directive-types.js +1 -1
  531. package/dist/types/index.js +1 -1
  532. package/dist/types.js +1 -1
  533. package/dist/typescript-templates.js +1 -1
  534. package/dist/utils.js +1 -1
  535. package/dist/validator.js +1 -1
  536. package/dist/variable-extractor.js +1 -1
  537. package/dist/view-composers.js +1 -1
  538. package/dist/virtual-scrolling.js +1 -1
  539. package/dist/visual-editor.js +1 -1
  540. package/dist/vue-template.js +1 -1
  541. package/dist/web-components/css-scoping.js +1 -1
  542. package/dist/web-components/index.js +1 -1
  543. package/dist/web-components/reactive-generator.js +1 -1
  544. package/dist/web-components.js +1 -1
  545. package/dist/x-element.js +1 -1
  546. package/package.json +5 -5
  547. package/dist/chunk-2jxbwnkz.js +0 -2
  548. package/dist/chunk-ejayeex8.js +0 -2
  549. package/dist/chunk-qa59zejf.js +0 -246
  550. package/dist/chunk-xqq1vxb6.js +0 -1
  551. package/dist/chunk-yywfvfph.js +0 -2
@@ -1,4 +1,4 @@
1
1
  // @bun
2
2
  var H={1001:{message:"Unclosed directive: {{directive}}",help:"Make sure to close the directive with the appropriate end tag"},1002:{message:"Unclosed expression at position {{position}}",help:"Check for missing closing braces }}"},1003:{message:"Invalid directive syntax: {{directive}}",help:"Review the directive documentation for correct syntax"},1004:{message:"Malformed expression: {{expression}}",help:"Check for syntax errors in your expression"},1005:{message:"Unexpected token: {{token}}",help:"Remove or fix the unexpected token"},1101:{message:"Undefined variable: {{variable}}",help:"Make sure the variable is defined in the template context"},1102:{message:"Type error: {{details}}",help:"Check that you are using the correct types"},1103:{message:"Evaluation error: {{details}}",help:"Review the expression for errors"},1104:{message:"Infinite loop detected in {{location}}",help:"Check your loop conditions"},1105:{message:"Circular reference detected: {{path}}",help:"Remove the circular dependency"},1201:{message:"Unsafe expression blocked: {{expression}}",help:"This expression contains potentially dangerous code"},1202:{message:"Path traversal attempt blocked: {{path}}",help:"Use only relative paths within allowed directories"},1203:{message:"Potential XSS attempt blocked",help:"Sanitize user input before rendering"},1204:{message:"Code injection attempt blocked: {{code}}",help:"Avoid executing dynamic code"},1205:{message:"Prohibited DOM API usage: {{api}}",help:"Use STX.useRefs(), STX.useRef(), STX.el() and other STX helpers instead of direct DOM manipulation"},1301:{message:"File not found: {{path}}",help:"Check that the file exists and the path is correct"},1302:{message:"Error reading file: {{path}}",help:"Check file permissions and encoding"},1303:{message:"Invalid file path: {{path}}",help:"Use a valid file path"},1304:{message:"Permission denied: {{path}}",help:"Check file permissions"},1401:{message:"Invalid configuration: {{details}}",help:"Review your stx.config.ts file"},1402:{message:"Missing required configuration: {{key}}",help:"Add the required configuration option"},1403:{message:"Deprecated configuration: {{key}}",help:"Update to the new configuration format"},1501:{message:"Component not found: {{name}}",help:"Check that the component exists in your components directory"},1502:{message:"Invalid props for component {{name}}: {{details}}",help:"Check the component prop requirements"},1503:{message:"Error rendering component {{name}}: {{details}}",help:"Check the component template for errors"},1601:{message:"Filter not found: {{filter}}",help:"Register the filter or check the filter name"},1602:{message:"Invalid arguments for filter {{filter}}: {{details}}",help:"Check the filter documentation for correct arguments"},1603:{message:"Expression evaluation timed out",help:"Simplify the expression or increase the timeout"}},z={},D="en";function K(b){D=b}function N(){return D}function O(b){z={...z,...b}}function P(){z={}}function I(b,w={}){let j=z[b]||H[b]||{message:`Unknown error (code: ${b})`},q=j.message,x=j.help;for(let[F,A]of Object.entries(w)){let B=`{{${F}}}`;if(q=q.replace(new RegExp(B,"g"),A),x)x=x.replace(new RegExp(B,"g"),A)}return{message:q,help:x}}function Q(b,w={}){let{message:j,help:q}=I(b,w);return q?`${j}
3
3
  Help: ${q}`:j}var J={UNCLOSED_DIRECTIVE:1001,UNCLOSED_EXPRESSION:1002,INVALID_DIRECTIVE_SYNTAX:1003,MALFORMED_EXPRESSION:1004,UNEXPECTED_TOKEN:1005,UNDEFINED_VARIABLE:1101,TYPE_ERROR:1102,EVALUATION_ERROR:1103,INFINITE_LOOP:1104,CIRCULAR_REFERENCE:1105,UNSAFE_EXPRESSION:1201,PATH_TRAVERSAL:1202,XSS_ATTEMPT:1203,CODE_INJECTION:1204,DOM_API_VIOLATION:1205,FILE_NOT_FOUND:1301,FILE_READ_ERROR:1302,INVALID_FILE_PATH:1303,PERMISSION_DENIED:1304,INVALID_CONFIG:1401,MISSING_REQUIRED_CONFIG:1402,DEPRECATED_CONFIG:1403,COMPONENT_NOT_FOUND:1501,INVALID_PROPS:1502,COMPONENT_RENDER_ERROR:1503,FILTER_NOT_FOUND:1601,INVALID_FILTER_ARGS:1602,EXPRESSION_TIMEOUT:1603};function R(b){for(let[w,j]of Object.entries(J))if(j===b)return w;return}
4
- export{K as Ly,N as My,O as Ny,P as Oy,I as Py,Q as Qy,J as Ry,R as Sy};
4
+ export{K as Ny,N as Oy,O as Py,P as Qy,I as Ry,Q as Sy,J as Ty,R as Uy};
@@ -1,3 +1,3 @@
1
1
  // @bun
2
- import{Bj as B,Cj as M}from"./chunk-rtr974rc.js";import{Dj as w,Ej as x}from"./chunk-j8tn8enq.js";import{Hj as O,Ij as Q}from"./chunk-pcntd9h4.js";import{Vk as E,_k as L}from"./chunk-jpndqst5.js";import{pB as v}from"./chunk-xv34zbp4.js";import{resolve as F,basename as D,extname as C,join as b}from"path";import{mkdir as q}from"fs/promises";async function T(){try{return await import("ts-videos")}catch{return null}}function R(J){switch(J){case"very-low":return 500000;case"low":return 1e6;case"medium":return 2500000;case"high":return 5000000;case"very-high":return 1e7;case"lossless":return 0;default:return 2500000}}function y(J){switch(J){case"youtube":return{codec:"h264",maxWidth:1920,maxHeight:1080,frameRate:30,audioCodec:"aac",audioBitrate:128000};case"twitter":return{codec:"h264",maxWidth:1280,maxHeight:720,frameRate:30,bitrate:5000000,audioCodec:"aac",audioBitrate:128000};case"instagram-feed":return{codec:"h264",maxWidth:1080,maxHeight:1080,frameRate:30,bitrate:3500000,audioCodec:"aac",audioBitrate:128000};case"instagram-story":case"instagram-reels":return{codec:"h264",maxWidth:1080,maxHeight:1920,frameRate:30,bitrate:3500000,audioCodec:"aac",audioBitrate:128000};case"tiktok":return{codec:"h264",maxWidth:1080,maxHeight:1920,frameRate:30,bitrate:4000000,audioCodec:"aac",audioBitrate:128000};case"discord":return{codec:"h264",maxWidth:1920,maxHeight:1080,frameRate:60,bitrate:8000000,audioCodec:"aac",audioBitrate:192000};case"linkedin":return{codec:"h264",maxWidth:1920,maxHeight:1080,frameRate:30,bitrate:5000000,audioCodec:"aac",audioBitrate:128000};case"facebook":return{codec:"h264",maxWidth:1280,maxHeight:720,frameRate:30,bitrate:4000000,audioCodec:"aac",audioBitrate:128000};case"web-progressive":return{codec:"h264",maxWidth:1920,maxHeight:1080,frameRate:30,audioCodec:"aac",audioBitrate:128000,twoPass:!0};case"web-streaming":return{codec:"h264",maxWidth:1920,maxHeight:1080,frameRate:30,audioCodec:"aac",audioBitrate:128000};default:return{}}}async function V(J){let I=await T();if(!I)return null;try{let G=F(J),X=await new I.Input(G).getInfo();return{duration:X.duration||0,width:X.width||0,height:X.height||0,frameRate:X.frameRate||0,bitrate:X.bitrate||0,codec:X.videoCodec||"",audioCodec:X.audioCodec}}catch(G){return console.warn(`[stx-media] Failed to analyze video: ${G}`),null}}async function f(J,I,G,Y){let X=await T();if(!X)return console.warn("[stx-media] ts-videos not installed, skipping processing"),{src:J,processed:!1};let k=await O(J,I,G);if(k)return k;try{let K=F(J);if(!await L(K))return{src:J,processed:!1,errors:[`Source file not found: ${J}`]};let j=G.outputDir||"dist/videos",z=G.baseUrl||"/videos";await q(j,{recursive:!0});let A=await E(K),H=D(J,C(J)),N={src:J,processed:!0,hash:A};Y?.({percentage:5,stage:"analyzing"}),N.metadata=await V(K)||void 0;let _={};if(I.quality)_.bitrate=R(I.quality);if(I.platform)Object.assign(_,y(I.platform));if(I.transcode)Object.assign(_,I.transcode);if(Object.keys(_).length>0||I.process){Y?.({percentage:10,stage:"transcoding"});let W=`${H}-${A}.mp4`,Z=b(j,W);try{let $=await S(K,Z,_,X,(U)=>Y?.({percentage:10+U*0.5,stage:"transcoding"}));if($)N.transcoded={path:Z,url:`${z}/${W}`,duration:$.duration,size:$.size,video:{codec:_.codec||"h264",width:$.width,height:$.height,bitrate:$.bitrate,frameRate:$.frameRate},audio:$.audioCodec?{codec:_.audioCodec||"aac",bitrate:_.audioBitrate||128000,sampleRate:_.sampleRate||48000,channels:_.channels||2}:void 0}}catch($){N.errors=N.errors||[],N.errors.push(`Transcoding failed: ${$}`)}}if(I.generatePoster){Y?.({percentage:65,stage:"generating-poster"});let W=typeof I.generatePoster==="object"?I.generatePoster:{timestamp:0},Z=await w(K,W,j,z);if(Z)N.poster=Z}if(G.thumbnails?.enabled){Y?.({percentage:70,stage:"generating-thumbnails"});let W=await x(K,G.thumbnails,j,z);if(W.length>0)N.thumbnails=W}if(I.streaming){Y?.({percentage:80,stage:"generating-manifests"});let W=typeof I.streaming==="object"?I.streaming:G.streaming||{format:"hls"};if(W.format==="hls"||W.format===void 0){let Z=await B(K,W.qualities||G.streaming?.defaultQualities||[],j,z);if(Z)N.streaming={...N.streaming,hls:Z}}if(W.format==="dash"){let Z=await M(K,W.qualities||G.streaming?.defaultQualities||[],j,z);if(Z)N.streaming={...N.streaming,dash:Z}}}if(I.spriteSheet)Y?.({percentage:90,stage:"generating-sprite-sheet"});return Y?.({percentage:100,stage:"complete"}),await Q(J,I,N,G),N}catch(K){return{src:J,processed:!1,errors:[`Processing failed: ${K}`]}}}async function S(J,I,G,Y,X){try{let K=await new Y.Conversion(J,I,{videoCodec:G.codec,videoBitrate:G.bitrate,width:G.maxWidth,height:G.maxHeight,frameRate:G.frameRate,audioCodec:G.audioCodec,audioBitrate:G.audioBitrate,sampleRate:G.sampleRate,channels:G.channels}).run((j)=>{X?.(j.percentage/100)});return{duration:K.duration||0,size:K.size||0,width:K.width||G.maxWidth||0,height:K.height||G.maxHeight||0,bitrate:K.bitrate||G.bitrate||0,frameRate:K.frameRate||G.frameRate||30,audioCodec:K.audioCodec}}catch(k){return console.error(`[stx-media] Transcoding failed: ${k}`),null}}
3
- export{V as yj,f as zj};
2
+ import{yj as B,zj as M}from"./chunk-5xvbq2gs.js";import{Aj as w,Bj as x}from"./chunk-z37xq5rx.js";import{Ej as O,Fj as Q}from"./chunk-bn08k7yy.js";import{Sk as E,Xk as L}from"./chunk-5ggw1dyv.js";import{rB as v}from"./chunk-3jm3snz8.js";import{resolve as F,basename as D,extname as C,join as b}from"path";import{mkdir as q}from"fs/promises";async function T(){try{return await import("ts-videos")}catch{return null}}function R(J){switch(J){case"very-low":return 500000;case"low":return 1e6;case"medium":return 2500000;case"high":return 5000000;case"very-high":return 1e7;case"lossless":return 0;default:return 2500000}}function y(J){switch(J){case"youtube":return{codec:"h264",maxWidth:1920,maxHeight:1080,frameRate:30,audioCodec:"aac",audioBitrate:128000};case"twitter":return{codec:"h264",maxWidth:1280,maxHeight:720,frameRate:30,bitrate:5000000,audioCodec:"aac",audioBitrate:128000};case"instagram-feed":return{codec:"h264",maxWidth:1080,maxHeight:1080,frameRate:30,bitrate:3500000,audioCodec:"aac",audioBitrate:128000};case"instagram-story":case"instagram-reels":return{codec:"h264",maxWidth:1080,maxHeight:1920,frameRate:30,bitrate:3500000,audioCodec:"aac",audioBitrate:128000};case"tiktok":return{codec:"h264",maxWidth:1080,maxHeight:1920,frameRate:30,bitrate:4000000,audioCodec:"aac",audioBitrate:128000};case"discord":return{codec:"h264",maxWidth:1920,maxHeight:1080,frameRate:60,bitrate:8000000,audioCodec:"aac",audioBitrate:192000};case"linkedin":return{codec:"h264",maxWidth:1920,maxHeight:1080,frameRate:30,bitrate:5000000,audioCodec:"aac",audioBitrate:128000};case"facebook":return{codec:"h264",maxWidth:1280,maxHeight:720,frameRate:30,bitrate:4000000,audioCodec:"aac",audioBitrate:128000};case"web-progressive":return{codec:"h264",maxWidth:1920,maxHeight:1080,frameRate:30,audioCodec:"aac",audioBitrate:128000,twoPass:!0};case"web-streaming":return{codec:"h264",maxWidth:1920,maxHeight:1080,frameRate:30,audioCodec:"aac",audioBitrate:128000};default:return{}}}async function V(J){let I=await T();if(!I)return null;try{let G=F(J),X=await new I.Input(G).getInfo();return{duration:X.duration||0,width:X.width||0,height:X.height||0,frameRate:X.frameRate||0,bitrate:X.bitrate||0,codec:X.videoCodec||"",audioCodec:X.audioCodec}}catch(G){return console.warn(`[stx-media] Failed to analyze video: ${G}`),null}}async function f(J,I,G,Y){let X=await T();if(!X)return console.warn("[stx-media] ts-videos not installed, skipping processing"),{src:J,processed:!1};let k=await O(J,I,G);if(k)return k;try{let K=F(J);if(!await L(K))return{src:J,processed:!1,errors:[`Source file not found: ${J}`]};let j=G.outputDir||"dist/videos",z=G.baseUrl||"/videos";await q(j,{recursive:!0});let A=await E(K),H=D(J,C(J)),N={src:J,processed:!0,hash:A};Y?.({percentage:5,stage:"analyzing"}),N.metadata=await V(K)||void 0;let _={};if(I.quality)_.bitrate=R(I.quality);if(I.platform)Object.assign(_,y(I.platform));if(I.transcode)Object.assign(_,I.transcode);if(Object.keys(_).length>0||I.process){Y?.({percentage:10,stage:"transcoding"});let W=`${H}-${A}.mp4`,Z=b(j,W);try{let $=await S(K,Z,_,X,(U)=>Y?.({percentage:10+U*0.5,stage:"transcoding"}));if($)N.transcoded={path:Z,url:`${z}/${W}`,duration:$.duration,size:$.size,video:{codec:_.codec||"h264",width:$.width,height:$.height,bitrate:$.bitrate,frameRate:$.frameRate},audio:$.audioCodec?{codec:_.audioCodec||"aac",bitrate:_.audioBitrate||128000,sampleRate:_.sampleRate||48000,channels:_.channels||2}:void 0}}catch($){N.errors=N.errors||[],N.errors.push(`Transcoding failed: ${$}`)}}if(I.generatePoster){Y?.({percentage:65,stage:"generating-poster"});let W=typeof I.generatePoster==="object"?I.generatePoster:{timestamp:0},Z=await w(K,W,j,z);if(Z)N.poster=Z}if(G.thumbnails?.enabled){Y?.({percentage:70,stage:"generating-thumbnails"});let W=await x(K,G.thumbnails,j,z);if(W.length>0)N.thumbnails=W}if(I.streaming){Y?.({percentage:80,stage:"generating-manifests"});let W=typeof I.streaming==="object"?I.streaming:G.streaming||{format:"hls"};if(W.format==="hls"||W.format===void 0){let Z=await B(K,W.qualities||G.streaming?.defaultQualities||[],j,z);if(Z)N.streaming={...N.streaming,hls:Z}}if(W.format==="dash"){let Z=await M(K,W.qualities||G.streaming?.defaultQualities||[],j,z);if(Z)N.streaming={...N.streaming,dash:Z}}}if(I.spriteSheet)Y?.({percentage:90,stage:"generating-sprite-sheet"});return Y?.({percentage:100,stage:"complete"}),await Q(J,I,N,G),N}catch(K){return{src:J,processed:!1,errors:[`Processing failed: ${K}`]}}}async function S(J,I,G,Y,X){try{let K=await new Y.Conversion(J,I,{videoCodec:G.codec,videoBitrate:G.bitrate,width:G.maxWidth,height:G.maxHeight,frameRate:G.frameRate,audioCodec:G.audioCodec,audioBitrate:G.audioBitrate,sampleRate:G.sampleRate,channels:G.channels}).run((j)=>{X?.(j.percentage/100)});return{duration:K.duration||0,size:K.size||0,width:K.width||G.maxWidth||0,height:K.height||G.maxHeight||0,bitrate:K.bitrate||G.bitrate||0,frameRate:K.frameRate||G.frameRate||30,audioCodec:K.audioCodec}}catch(k){return console.error(`[stx-media] Transcoding failed: ${k}`),null}}
3
+ export{V as vj,f as wj};
@@ -1,5 +1,5 @@
1
1
  // @bun
2
- import{xw as y}from"./chunk-h5jxydqq.js";import{pB as a}from"./chunk-xv34zbp4.js";function v(){return y({name:"video",hasEndTag:!1,description:"Render a video with optional ts-videos processing, streaming, and poster generation",transform:async(j,B,q,K)=>{let{src:Q,options:J}=d(j,B,q);if(!Q)return console.warn("@video directive: missing src argument"),"<!-- @video: missing src -->";let G={src:Q,poster:J.poster,controls:J.controls!==!1,autoplay:J.autoplay||!1,muted:J.muted||!1,loop:J.loop||!1,preload:J.preload||"metadata",playsinline:J.playsinline!==!1,lazy:J.lazy!==!1,player:J.player||"native",type:J.type,width:J.width,height:J.height,class:J.class,style:J.style,id:J.id,crossorigin:J.crossorigin,disablePictureInPicture:J.disablePictureInPicture,disableRemotePlayback:J.disableRemotePlayback,title:J.title,quality:J.quality,platform:J.platform,process:J.process,generatePoster:J.generatePoster,streaming:J.streaming,transcode:J.transcode,spriteSheet:J.spriteSheet,waveform:J.waveform},X={isDev:q.__isDev||!1,tsVideosConfig:q.__tsVideosConfig},Z=await b(G,X),k=Z.html;if(Z.css)k+=`
2
+ import{yw as y}from"./chunk-ywkrxp2h.js";import{rB as a}from"./chunk-3jm3snz8.js";function v(){return y({name:"video",hasEndTag:!1,description:"Render a video with optional ts-videos processing, streaming, and poster generation",transform:async(j,B,q,K)=>{let{src:Q,options:J}=d(j,B,q);if(!Q)return console.warn("@video directive: missing src argument"),"<!-- @video: missing src -->";let G={src:Q,poster:J.poster,controls:J.controls!==!1,autoplay:J.autoplay||!1,muted:J.muted||!1,loop:J.loop||!1,preload:J.preload||"metadata",playsinline:J.playsinline!==!1,lazy:J.lazy!==!1,player:J.player||"native",type:J.type,width:J.width,height:J.height,class:J.class,style:J.style,id:J.id,crossorigin:J.crossorigin,disablePictureInPicture:J.disablePictureInPicture,disableRemotePlayback:J.disableRemotePlayback,title:J.title,quality:J.quality,platform:J.platform,process:J.process,generatePoster:J.generatePoster,streaming:J.streaming,transcode:J.transcode,spriteSheet:J.spriteSheet,waveform:J.waveform},X={isDev:q.__isDev||!1,tsVideosConfig:q.__tsVideosConfig},Z=await b(G,X),k=Z.html;if(Z.css)k+=`
3
3
  <style>${Z.css}</style>`;if(Z.script)k+=`
4
4
  <script>${Z.script}</script>`;return k},defaults:{src:"",options:{controls:!0,lazy:!0,preload:"metadata"}}})}function d(j,B,q){if(B.src)return{src:String(B.src),options:B.options||{}};let K=j.trim();if(K.startsWith("@video(")||K.startsWith("("))K=K.replace(/^@video\(/,"").replace(/^\(/,"").replace(/\)$/,"");let Q=i(K),J=A(Q[0],q)||"",G={};if(Q[1]){let H=A(Q[1],q);if(typeof H==="object"&&H!==null)G=H;else if(typeof Q[1]==="string")try{G=JSON.parse(Q[1])}catch{}}return{src:J,options:G}}function i(j){let B=[],q="",K=!1,Q="",J=0,G=0;for(let H=0;H<j.length;H++){let X=j[H],Z=H>0?j[H-1]:"";if((X==='"'||X==="'"||X==="`")&&Z!=="\\"){if(!K)K=!0,Q=X;else if(X===Q)K=!1,Q="";else q+=X;continue}if(!K){if(X==="{")J++;if(X==="}")J--;if(X==="[")G++;if(X==="]")G--;if(X===","&&J===0&&G===0){B.push(q.trim()),q="";continue}}q+=X}if(q.trim())B.push(q.trim());return B}function A(j,B){if(typeof j!=="string")return j;let q=j.trim();if(q.startsWith('"')&&q.endsWith('"')||q.startsWith("'")&&q.endsWith("'"))return q.slice(1,-1);if(!q.startsWith("/")&&!q.startsWith(".")&&!q.startsWith("http")&&!q.startsWith("{")){let K=B[q];if(K!==void 0)return K}if(q.startsWith("{")||q.startsWith("["))try{return JSON.parse(q)}catch{}return q}var c=v();async function g(){try{return await import("./media/video/processor/index.js")}catch(j){if(!x)console.warn("[stx-media] Video processor not available, some features disabled:",j),x=!0;return null}}var x=!1,h=!0,u="metadata",p="https://cdn.jsdelivr.net/npm/ts-video-player@latest/dist/index.min.js";async function b(j,B={}){let q=B,K=j;if(K.process&&!K.skipProcessing){if(q.tsVideosConfig?.enabled&&!q.isDev)return e(K,q)}if(q.processedResult?.processed)return l(j,q.processedResult,B);let Q;if(K.generatePoster&&K.src&&!j.poster)Q=await jj(K,q);let{src:J,sources:G=[],poster:H,posterPlaceholder:X,controls:Z=h,autoplay:k=!1,muted:N=!1,loop:F=!1,preload:f=u,playsinline:O=!0,lazy:_=!0,player:R="native",type:w,width:W,height:z,crossorigin:U,disablePictureInPicture:E=!1,disableRemotePlayback:M=!1}=j,L=Q||H,D=j.class,P=j.style,C=j.id||`stx-video-${Math.random().toString(36).slice(2,8)}`;if(R==="ts-video")return t(j,B);if(w&&w!=="video")return o(J||"",w,j);let I=G.length>0?G:J?[{src:J,type:m(J)}]:[],$=[`id="${C}"`];if(Z)$.push("controls");if(k)$.push("autoplay");if(N)$.push("muted");if(F)$.push("loop");if(O)$.push("playsinline");if(E)$.push("disablepictureinpicture");if(M)$.push("disableremoteplayback");if(U)$.push(`crossorigin="${U}"`);if(_){if($.push(`data-preload="${f}"`),$.push('preload="none"'),L)$.push(`data-poster="${Y(L)}"`);$.push("data-stx-lazy")}else if($.push(`preload="${f}"`),L)$.push(`poster="${Y(L)}"`);if(W)$.push(`width="${W}"`);if(z)$.push(`height="${z}"`);if(D)$.push(`class="${Y(D)}"`);if(P)$.push(`style="${Y(P)}"`);let T=I.map((V)=>{return` <source ${_?`data-src="${Y(V.src)}"`:`src="${Y(V.src)}"`} type="${V.type}"${V.media?` media="${V.media}"`:""} />`}).join(`
5
5
  `),n=`<video ${$.join(" ")}>
@@ -259,4 +259,4 @@ ${I}
259
259
  height: auto;
260
260
  }
261
261
  `.trim();return{html:I,script:$,css:T}}
262
- export{b as ou,Qj as pu,v as qu,c as ru};
262
+ export{b as pu,Qj as qu,v as ru,c as su};
@@ -1,3 +1,3 @@
1
1
  // @bun
2
- import{gz as L}from"./chunk-gz5fmp3q.js";import{pB as $}from"./chunk-xv34zbp4.js";import{existsSync as j,readFileSync as u}from"fs";var I=new Map;function q(E){try{return $.resolve(`@iconify/json/json/${E}.json`)}catch{}let G=process.cwd();for(let H of[`${G}/node_modules/@iconify/json/json/${E}.json`,`${G}/pantry/@iconify/json/json/${E}.json`])if(j(H))return H;return null}function D(E){if(I.has(E))return I.get(E);let G=q(E);if(!G)return null;try{let H=JSON.parse(u(G,"utf8"));return I.set(E,H.icons),H.icons}catch{return null}}async function R(E){if(I.has(E))return I.get(E);let G=q(E);if(!G)return null;try{let H=await Bun.file(G).json();return I.set(E,H.icons),H.icons}catch{return null}}function J(E,G){if(E.serverDynamic[G]!==void 0)return String(E.serverDynamic[G]);if(E.static[G]!==void 0)return String(E.static[G]);if(E.clientReactive[G]!==void 0)return E.clientReactive[G];return}var b={name:"Icon",aliases:["icon","stx-icon"],render(E,G,H){let M=J(E,"name")??J(E,"icon");if(!M)return"<!-- Icon: missing name/icon prop -->";let K="lucide",Q=M;if(M.includes(":")){let Z=M.split(":");K=Z[0],Q=Z[1]}let U=L(J(E,"size")||"24"),V=L(J(E,"color")||"currentColor"),W=L(J(E,"class")||""),X=L(J(E,"style")||""),Y=I.get(K)??D(K);if(!Y)return`<!-- Icon: collection "${K}" not loaded -->`;let O=Y[Q];if(!O)return`<!-- Icon: "${Q}" not found in ${K} -->`;let B=O.width||24,F=O.height||24,z=`0 0 ${B} ${F}`,T=O.body;if(V!=="currentColor")T=T.replace(/currentColor/g,V);let S=W?` class="${W}"`:"",g=X?` style="${X}"`:"";return`<svg xmlns="http://www.w3.org/2000/svg" width="${U}" height="${U}" viewBox="${z}" fill="none"${S}${g}>${T}</svg>`}};async function A(E="lucide"){await R(E)}
3
- export{b as dz,A as ez};
2
+ import{iz as L}from"./chunk-3rh7va1z.js";import{rB as $}from"./chunk-3jm3snz8.js";import{existsSync as j,readFileSync as u}from"fs";var I=new Map;function q(E){try{return $.resolve(`@iconify/json/json/${E}.json`)}catch{}let G=process.cwd();for(let H of[`${G}/node_modules/@iconify/json/json/${E}.json`,`${G}/pantry/@iconify/json/json/${E}.json`])if(j(H))return H;return null}function D(E){if(I.has(E))return I.get(E);let G=q(E);if(!G)return null;try{let H=JSON.parse(u(G,"utf8"));return I.set(E,H.icons),H.icons}catch{return null}}async function R(E){if(I.has(E))return I.get(E);let G=q(E);if(!G)return null;try{let H=await Bun.file(G).json();return I.set(E,H.icons),H.icons}catch{return null}}function J(E,G){if(E.serverDynamic[G]!==void 0)return String(E.serverDynamic[G]);if(E.static[G]!==void 0)return String(E.static[G]);if(E.clientReactive[G]!==void 0)return E.clientReactive[G];return}var b={name:"Icon",aliases:["icon","stx-icon"],render(E,G,H){let M=J(E,"name")??J(E,"icon");if(!M)return"<!-- Icon: missing name/icon prop -->";let K="lucide",Q=M;if(M.includes(":")){let Z=M.split(":");K=Z[0],Q=Z[1]}let U=L(J(E,"size")||"24"),V=L(J(E,"color")||"currentColor"),W=L(J(E,"class")||""),X=L(J(E,"style")||""),Y=I.get(K)??D(K);if(!Y)return`<!-- Icon: collection "${K}" not loaded -->`;let O=Y[Q];if(!O)return`<!-- Icon: "${Q}" not found in ${K} -->`;let B=O.width||24,F=O.height||24,z=`0 0 ${B} ${F}`,T=O.body;if(V!=="currentColor")T=T.replace(/currentColor/g,V);let S=W?` class="${W}"`:"",g=X?` style="${X}"`:"";return`<svg xmlns="http://www.w3.org/2000/svg" width="${U}" height="${U}" viewBox="${z}" fill="none"${S}${g}>${T}</svg>`}};async function A(E="lucide"){await R(E)}
3
+ export{b as fz,A as gz};
@@ -176,4 +176,4 @@ var Q=null,R=null;function $(z,A,G=new WeakSet){if(Object.is(z,A))return!0;if(ty
176
176
  };
177
177
  window.provide = provide;
178
178
  })();
179
- </script>`}export{K as ci,q as di,x as ei,N as fi,S as gi,O as hi,H as ii,m as ji,j as ki,g as li,w as mi,h as ni,I as oi,y as pi,E as qi,v as ri,Z as si,V as ti,d as ui,k as vi,f as wi};
179
+ </script>`}export{K as $h,q as ai,x as bi,N as ci,S as di,O as ei,H as fi,m as gi,j as hi,g as ii,w as ji,h as ki,I as li,y as mi,E as ni,v as oi,Z as pi,V as qi,d as ri,k as si,f as ti};
@@ -81,4 +81,4 @@ else {
81
81
  </div>
82
82
  ${U}
83
83
  `})}
84
- export{_ as Mn};
84
+ export{_ as In};
@@ -1,3 +1,3 @@
1
1
  // @bun
2
- import{wy as T}from"./chunk-yb1t2h8h.js";import{qz as j,vz as O}from"./chunk-w3b6m427.js";function b(z,H){let X=z,F=/@json\s*\(/g,Y;while((Y=F.exec(X))!==null){let J=Y.index,v=J+Y[0].length-1,K=1,q=v+1,w=null,U=!1;while(q<X.length&&K>0){let G=X[q];if(U){U=!1,q++;continue}if(G==="\\"&&w){U=!0,q++;continue}if(w){if(G===w)w=null;q++;continue}if(G==='"'||G==="'"||G==="`"){w=G,q++;continue}if(G==="(")K++;else if(G===")"){if(K--,K===0)break}q++}if(K!==0)break;let V=X.substring(v+1,q).trim(),_=X.substring(J,q+1),W=-1,Z=0,$=null,R=!1;for(let G=0;G<V.length;G++){let B=V[G];if(R){R=!1;continue}if(B==="\\"&&$){R=!0;continue}if($){if(B===$)$=null;continue}if(B==='"'||B==="'"||B==="`"){$=B;continue}if(B==="("||B==="["||B==="{")Z++;else if(B===")"||B==="]"||B==="}")Z--;if(B===","&&Z===0){W=G;break}}let A=W>=0?V.substring(0,W).trim():V,L=W>=0?V.substring(W+1).trim():void 0;try{let G=A.trim(),B;if(j(G))B=O(G,Object.keys(H))(...Object.values(H));else B=void 0;let y;if(L==="true")y=JSON.stringify(B,null,2);else y=JSON.stringify(B);let N=y.replace(/</g,"\\u003c").replace(/>/g,"\\u003e").replace(/&/g,"\\u0026").replace(/\u2028/g,"\\u2028").replace(/\u2029/g,"\\u2029");X=X.substring(0,J)+N+X.substring(q+1),F.lastIndex=J+N.length}catch(G){T.log(G instanceof Error?G:Error(String(G)),{directive:"@json"},"error"),F.lastIndex=J+_.length}}return X}function S(z){return z.replace(/@once\s*([\s\S]*?)@endonce/g,"$1")}function x(z){let H=z,X=/@memo\s*\(/g,F,Y=[];while((F=X.exec(H))!==null){let J=F.index,v=J+F[0].length,K=1,q=v;while(q<H.length&&K>0){if(H[q]==="(")K++;else if(H[q]===")")K--;q++}if(K!==0)continue;let w=H.slice(v,q-1).trim(),U=q,V=H.slice(U),_=V.indexOf("@endmemo");if(_===-1)continue;let W=V.slice(0,_),Z=U+_+8,$=W.match(/^(\s*(?:(?:<!--[\s\S]*?-->|\x00STX_HTML_COMMENT_\d+\x00)\s*)*)/),R=$?$[0].length:0,A=W.slice(R),L=W.match(/(\s*)$/),G=L?L[0].length:0,B=A.slice(0,A.length-G),y=B.match(/^<([a-zA-Z][a-zA-Z0-9-]*)(\s[^>]*?)?(\/?)>/),N;if(y){let[P,D,E="",Q]=y,k=`<${D}${E} data-stx-memo="${w}"${Q}>`;N=W.slice(0,R)+k+B.slice(P.length)+W.slice(R+B.length)}else N=`${W.slice(0,R)}<div data-stx-memo="${w}">${B}</div>${W.slice(R+B.length)}`;Y.push({start:J,end:Z,replacement:N}),X.lastIndex=Z}for(let J=Y.length-1;J>=0;J--){let v=Y[J];H=H.slice(0,v.start)+v.replacement+H.slice(v.end)}return H.replace(/@memo="([^"]*)"/g,'data-stx-memo="$1"')}function I(z){let H=z.replace(/@ref="([^"]+)"/g,'data-stx-ref="$1"');return H=H.replace(/(<[a-zA-Z][a-zA-Z0-9-]*\b[^>]*?)\sref="([^"]+)"/g,'$1 data-stx-ref="$2"'),H}function u(z){let X=new RegExp("<(div|span|p|h[1-6]|td|th|li|a|button|label|section|article|header|footer|main|nav|aside|dd|dt|figcaption|summary|caption|blockquote|pre|code|em|strong|small|sub|sup|time|mark|abbr|cite|q|s|u|b|i)\\b","gi"),F="",Y=0,J;while((J=X.exec(z))!==null){let v=J.index,K=v+J[0].length,q=!1,w=!1,U=-1;while(K<z.length){let $=z[K];if(q){if($==="'")q=!1}else if(w){if($==='"')w=!1}else if($==="'")q=!0;else if($==='"')w=!0;else if($===">"){U=K;break}K++}if(U===-1)continue;if(z.slice(v,U+1).includes("x-cloak"))continue;let _=z.slice(U+1),W=_.indexOf("</"),Z=W>=0?_.slice(0,W):_.slice(0,200);if(/\{\{[\s\S]*?\}\}/.test(Z))F+=z.slice(Y,U)+" x-cloak>",Y=U+1}return F+=z.slice(Y),F}var M=/(?:^|\s)(?::else-if|:if|:else|:show|x-else-if|x-if|x-else|x-show|@if|@show)(?:=|\s|\/|>|$)/;function m(z){let H=/<[a-z][\w-]*/gi,X="",F=0,Y;while((Y=H.exec(z))!==null){let J=Y.index,v=Y[0].slice(1).toLowerCase();if(v==="script"||v==="style"){let Z=`</${v}>`,$=z.toLowerCase().indexOf(Z,J);if($!==-1)H.lastIndex=$+Z.length;continue}let K=J+Y[0].length,q=!1,w=!1,U=-1;while(K<z.length){let Z=z[K];if(q){if(Z==="'")q=!1}else if(w){if(Z==='"')w=!1}else if(Z==="'")q=!0;else if(Z==='"')w=!0;else if(Z===">"){U=K;break}K++}if(U===-1)continue;let V=z.slice(J+Y[0].length,U);if(/(?:^|\s)x-cloak(?:=|\s|\/|>|$)/.test(V))continue;if(!M.test(V))continue;let _=z[U-1]==="/",W=_?U-1:U;X+=`${z.slice(F,W)} x-cloak${_?" ":""}`,F=W}return X+=z.slice(F),X}
3
- export{b as iu,S as ju,x as ku,I as lu,u as mu,m as nu};
2
+ import{yy as T}from"./chunk-94g3cahw.js";import{sz as j,xz as O}from"./chunk-adqh2m9z.js";function b(z,H){let X=z,F=/@json\s*\(/g,Y;while((Y=F.exec(X))!==null){let J=Y.index,v=J+Y[0].length-1,K=1,q=v+1,w=null,U=!1;while(q<X.length&&K>0){let G=X[q];if(U){U=!1,q++;continue}if(G==="\\"&&w){U=!0,q++;continue}if(w){if(G===w)w=null;q++;continue}if(G==='"'||G==="'"||G==="`"){w=G,q++;continue}if(G==="(")K++;else if(G===")"){if(K--,K===0)break}q++}if(K!==0)break;let V=X.substring(v+1,q).trim(),_=X.substring(J,q+1),W=-1,Z=0,$=null,R=!1;for(let G=0;G<V.length;G++){let B=V[G];if(R){R=!1;continue}if(B==="\\"&&$){R=!0;continue}if($){if(B===$)$=null;continue}if(B==='"'||B==="'"||B==="`"){$=B;continue}if(B==="("||B==="["||B==="{")Z++;else if(B===")"||B==="]"||B==="}")Z--;if(B===","&&Z===0){W=G;break}}let A=W>=0?V.substring(0,W).trim():V,L=W>=0?V.substring(W+1).trim():void 0;try{let G=A.trim(),B;if(j(G))B=O(G,Object.keys(H))(...Object.values(H));else B=void 0;let y;if(L==="true")y=JSON.stringify(B,null,2);else y=JSON.stringify(B);let N=y.replace(/</g,"\\u003c").replace(/>/g,"\\u003e").replace(/&/g,"\\u0026").replace(/\u2028/g,"\\u2028").replace(/\u2029/g,"\\u2029");X=X.substring(0,J)+N+X.substring(q+1),F.lastIndex=J+N.length}catch(G){T.log(G instanceof Error?G:Error(String(G)),{directive:"@json"},"error"),F.lastIndex=J+_.length}}return X}function S(z){return z.replace(/@once\s*([\s\S]*?)@endonce/g,"$1")}function x(z){let H=z,X=/@memo\s*\(/g,F,Y=[];while((F=X.exec(H))!==null){let J=F.index,v=J+F[0].length,K=1,q=v;while(q<H.length&&K>0){if(H[q]==="(")K++;else if(H[q]===")")K--;q++}if(K!==0)continue;let w=H.slice(v,q-1).trim(),U=q,V=H.slice(U),_=V.indexOf("@endmemo");if(_===-1)continue;let W=V.slice(0,_),Z=U+_+8,$=W.match(/^(\s*(?:(?:<!--[\s\S]*?-->|\x00STX_HTML_COMMENT_\d+\x00)\s*)*)/),R=$?$[0].length:0,A=W.slice(R),L=W.match(/(\s*)$/),G=L?L[0].length:0,B=A.slice(0,A.length-G),y=B.match(/^<([a-zA-Z][a-zA-Z0-9-]*)(\s[^>]*?)?(\/?)>/),N;if(y){let[P,D,E="",Q]=y,k=`<${D}${E} data-stx-memo="${w}"${Q}>`;N=W.slice(0,R)+k+B.slice(P.length)+W.slice(R+B.length)}else N=`${W.slice(0,R)}<div data-stx-memo="${w}">${B}</div>${W.slice(R+B.length)}`;Y.push({start:J,end:Z,replacement:N}),X.lastIndex=Z}for(let J=Y.length-1;J>=0;J--){let v=Y[J];H=H.slice(0,v.start)+v.replacement+H.slice(v.end)}return H.replace(/@memo="([^"]*)"/g,'data-stx-memo="$1"')}function I(z){let H=z.replace(/@ref="([^"]+)"/g,'data-stx-ref="$1"');return H=H.replace(/(<[a-zA-Z][a-zA-Z0-9-]*\b[^>]*?)\sref="([^"]+)"/g,'$1 data-stx-ref="$2"'),H}function u(z){let X=new RegExp("<(div|span|p|h[1-6]|td|th|li|a|button|label|section|article|header|footer|main|nav|aside|dd|dt|figcaption|summary|caption|blockquote|pre|code|em|strong|small|sub|sup|time|mark|abbr|cite|q|s|u|b|i)\\b","gi"),F="",Y=0,J;while((J=X.exec(z))!==null){let v=J.index,K=v+J[0].length,q=!1,w=!1,U=-1;while(K<z.length){let $=z[K];if(q){if($==="'")q=!1}else if(w){if($==='"')w=!1}else if($==="'")q=!0;else if($==='"')w=!0;else if($===">"){U=K;break}K++}if(U===-1)continue;if(z.slice(v,U+1).includes("x-cloak"))continue;let _=z.slice(U+1),W=_.indexOf("</"),Z=W>=0?_.slice(0,W):_.slice(0,200);if(/\{\{[\s\S]*?\}\}/.test(Z))F+=z.slice(Y,U)+" x-cloak>",Y=U+1}return F+=z.slice(Y),F}var M=/(?:^|\s)(?::else-if|:if|:else|:show|x-else-if|x-if|x-else|x-show|@if|@show)(?:=|\s|\/|>|$)/;function m(z){let H=/<[a-z][\w-]*/gi,X="",F=0,Y;while((Y=H.exec(z))!==null){let J=Y.index,v=Y[0].slice(1).toLowerCase();if(v==="script"||v==="style"){let Z=`</${v}>`,$=z.toLowerCase().indexOf(Z,J);if($!==-1)H.lastIndex=$+Z.length;continue}let K=J+Y[0].length,q=!1,w=!1,U=-1;while(K<z.length){let Z=z[K];if(q){if(Z==="'")q=!1}else if(w){if(Z==='"')w=!1}else if(Z==="'")q=!0;else if(Z==='"')w=!0;else if(Z===">"){U=K;break}K++}if(U===-1)continue;let V=z.slice(J+Y[0].length,U);if(/(?:^|\s)x-cloak(?:=|\s|\/|>|$)/.test(V))continue;if(!M.test(V))continue;let _=z[U-1]==="/",W=_?U-1:U;X+=`${z.slice(F,W)} x-cloak${_?" ":""}`,F=W}return X+=z.slice(F),X}
3
+ export{b as ju,S as ku,x as lu,I as mu,u as nu,m as ou};
@@ -2,4 +2,4 @@
2
2
  import Q from"fs";import L from"path";function Z(w){let q=[];if(q.push("[build]"),q.push(` command = "${E(w.build.command)}"`),q.push(` publish = "${E(w.build.publish)}"`),w.build.functions)q.push(` functions = "${E(w.build.functions)}"`);if(w.build.edge_functions)q.push(` edge_functions = "${E(w.build.edge_functions)}"`);if(w.build.environment&&Object.keys(w.build.environment).length>0){q.push(""),q.push("[build.environment]");for(let[z,B]of Object.entries(w.build.environment))q.push(` ${z} = "${E(B)}"`)}if(w.functions){if(q.push(""),q.push("[functions]"),w.functions.directory)q.push(` directory = "${E(w.functions.directory)}"`);if(w.functions.node_bundler)q.push(` node_bundler = "${w.functions.node_bundler}"`);if(w.functions.external_node_modules&&w.functions.external_node_modules.length>0)q.push(` external_node_modules = [${w.functions.external_node_modules.map((z)=>`"${z}"`).join(", ")}]`)}if(w.edge_functions&&w.edge_functions.length>0){q.push("");for(let z of w.edge_functions)q.push("[[edge_functions]]"),q.push(` function = "${E(z.function)}"`),q.push(` path = "${E(z.path)}"`)}if(w.redirects&&w.redirects.length>0){q.push("");for(let z of w.redirects){if(q.push("[[redirects]]"),q.push(` from = "${E(z.from)}"`),q.push(` to = "${E(z.to)}"`),z.status!==void 0)q.push(` status = ${z.status}`);if(z.force!==void 0)q.push(` force = ${z.force}`);if(z.conditions&&Object.keys(z.conditions).length>0){q.push(" [redirects.conditions]");for(let[B,G]of Object.entries(z.conditions))q.push(` ${B} = "${E(G)}"`)}}}if(w.headers&&w.headers.length>0){q.push("");for(let z of w.headers){q.push("[[headers]]"),q.push(` for = "${E(z.for)}"`),q.push(" [headers.values]");for(let[B,G]of Object.entries(z.values))q.push(` ${B} = "${E(G)}"`)}}if(w.plugins&&w.plugins.length>0){q.push("");for(let z of w.plugins)if(q.push("[[plugins]]"),q.push(` package = "${E(z.package)}"`),z.inputs&&Object.keys(z.inputs).length>0){q.push(" [plugins.inputs]");for(let[B,G]of Object.entries(z.inputs))if(typeof G==="string")q.push(` ${B} = "${E(G)}"`);else if(typeof G==="boolean"||typeof G==="number")q.push(` ${B} = ${G}`)}}if(w.context&&Object.keys(w.context).length>0)for(let[z,B]of Object.entries(w.context)){if(q.push(""),q.push(`[context.${z}]`),B.command)q.push(` command = "${E(B.command)}"`);if(B.publish)q.push(` publish = "${E(B.publish)}"`);if(B.environment&&Object.keys(B.environment).length>0){q.push(` [context.${z}.environment]`);for(let[G,U]of Object.entries(B.environment))q.push(` ${G} = "${E(U)}"`)}}return q.join(`
3
3
  `)+`
4
4
  `}function E(w){return w.replace(/\\/g,"\\\\").replace(/"/g,"\\\"").replace(/\n/g,"\\n").replace(/\r/g,"\\r").replace(/\t/g,"\\t")}async function _(w){let q={framework:"stx",buildCommand:"bun run build",outputDir:"dist"},z=L.join(w,"package.json");if(await Bun.file(z).exists())try{let K=JSON.parse(await Bun.file(z).text());if(K.scripts?.build)q.buildCommand="bun run build";let M={...K.dependencies,...K.devDependencies};if(M["@stacksjs/stx"]||M.stx)q.framework="stx"}catch{}let B=L.join(w,"stx.config.ts"),G=L.join(w,".config","stx.config.ts");if(await Bun.file(B).exists()||await Bun.file(G).exists())q.framework="stx";let U=["dist","build","out","public",".output"];for(let K of U){let M=L.join(w,K);if(Q.existsSync(M)&&Q.statSync(M).isDirectory()){q.outputDir=K;break}}let W=["functions","netlify/functions","api"];for(let K of W){let M=L.join(w,K);if(Q.existsSync(M)&&Q.statSync(M).isDirectory()){q.functionsDir=K;break}}let X=L.join(w,"netlify","edge-functions");if(Q.existsSync(X))q.edgeFunctionsDir="netlify/edge-functions";let V=L.join(w,q.outputDir||"dist");if(Q.existsSync(V)){let K=Q.existsSync(L.join(V,"index.html")),M=Q.readdirSync(V).filter((Y)=>Y.endsWith(".html"));q.isSPA=K&&M.length===1}return q}function $(w={}){let q={build:{command:w.buildCommand||"bun run build",publish:w.outputDir||"dist"}};if(w.functionsDir)q.build.functions=w.functionsDir,q.functions={directory:w.functionsDir,node_bundler:"esbuild"};if(w.edgeFunctionsDir)q.build.edge_functions=w.edgeFunctionsDir;if(q.headers=[{for:"/*",values:{"X-Frame-Options":"DENY","X-Content-Type-Options":"nosniff","X-XSS-Protection":"1; mode=block","Referrer-Policy":"strict-origin-when-cross-origin"}},{for:"/assets/*",values:{"Cache-Control":"public, max-age=31536000, immutable"}}],w.isSPA!==!1)q.redirects=[{from:"/*",to:"/index.html",status:200}];return q.context={production:{environment:{NODE_ENV:"production"}},"deploy-preview":{environment:{NODE_ENV:"development"}}},q}async function I(w,q){let z=await _(w),B=q||$(z),G=Z(B),U=L.join(w,"netlify.toml");return await Bun.write(U,G),U}function O(w){return Q.existsSync(L.join(w,"netlify.toml"))}async function R(w){let q=L.join(w,"netlify.toml");if(!await Bun.file(q).exists())return null;return Bun.file(q).text()}
5
- export{Z as Qn,_ as Rn,$ as Sn,I as Tn,O as Un,R as Vn};
5
+ export{Z as Mn,_ as Nn,$ as On,I as Pn,O as Qn,R as Rn};
@@ -1,4 +1,4 @@
1
1
  // @bun
2
2
  var L=new Set(["if","else","elseif","else-if","for","foreach","show","model","html","text","bind","key","ref","once","memo","slot","teleport","cloak","pre","effect","init"]),O=new Set(["area","base","br","col","embed","hr","img","input","link","meta","param","source","track","wbr"]);function w(q){return q.replace(/[.*+?^${}()|[\]\\]/g,"\\$&")}function P(q){let Q=[],W=/<(script|style)\b[^>]*>[\s\S]*?<\/\1\s*>/gi,y;while((y=W.exec(q))!==null)Q.push([y.index,y.index+y[0].length]);return Q}function k(q,Q){for(let[W,y]of q)if(Q>=W&&Q<y)return!0;return!1}function B(q,Q){let W=1,y=0;for(let U=0;U<Q&&U<q.length;U++)if(q[U]===`
3
3
  `)W++,y=U+1;return{line:W,column:Q-y+1}}function M(q,Q,W){let y=Q.toLowerCase(),U=q.length,Y=1,J=W;while(J<U){let X=q.indexOf("<",J);if(X===-1)return-1;if(J=X,q.startsWith("<!--",J)){let G=q.indexOf("-->",J+4);if(G===-1)return-1;J=G+3;continue}if(q[J+1]==="/"){let G=/^<\/([a-z][\w-]*)\s*>/i.exec(q.slice(J,J+64));if(!G){J++;continue}if(G[1].toLowerCase()===y){if(Y--,J+=G[0].length,Y===0)return J;continue}J+=G[0].length;continue}let Z=/^<([a-z][\w-]*)\b/i.exec(q.slice(J,J+64));if(!Z){J++;continue}let $=q.indexOf(">",J);if($===-1)return-1;if(Z[1].toLowerCase()===y&&q[$-1]!=="/")Y++;J=$+1}return-1}function C(q,Q,W){let y=/@([a-z][\w:-]*)((?:\.[a-z][\w-]*)*)\s*=\s*"([^"]*)"/gi,U;while((U=y.exec(q))!==null){if(k(Q,U.index))continue;let Y=U[1].toLowerCase().split(":")[0];if(L.has(Y))continue;let J=U[3].trim();if(/^[A-Za-z_$][\w$]*(?:\.[A-Za-z_$][\w$]*)*$/.test(J)){let X=q.indexOf(U[3],U.index),{line:Z,column:$}=B(q,X<0?U.index:X);W.push({ruleId:"stx/no-bare-function-ref-in-event",message:`Event handler @${U[1]}="${J}" is a bare reference and will not fire. Call it: @${U[1]}="${J}()".`,line:Z,column:$,severity:"error"})}}}function I(q,Q,W){if(Q!=="view")return;let y=/<script\b([^>]*)>/gi,U;while((U=y.exec(q))!==null)if(/(?:^|\s)client(?=[\s/=]|$)/i.test(U[1])){let{line:Y,column:J}=B(q,U.index);W.push({ruleId:"stx/no-view-level-script-client",message:"<script client> at the top level of a view is silently dropped \u2014 only components get client scopes. Move it into a component, or use <script> (server).",line:Y,column:J,severity:"error"})}}function D(q){let Q=q.split("/"),W=[];for(let y of Q){if(y===""||y===".")continue;if(y==="..")W.pop();else W.push(y)}return W.join("/")}function V(q,Q,W){let y=Q.replace(/\\/g,"/"),U=y.indexOf("resources/stores/");if(U===-1)return;let Y=y.slice(0,U+16),J=y.slice(0,y.lastIndexOf("/")),X=/\b(import|export)\s+(type\s+)?([^'"]*?)\s*from\s*['"]([^'"]+)['"]/g,Z;while((Z=X.exec(q))!==null){if(Z[2])continue;let $=Z[1],G=Z[4],N;if(G.startsWith("."))N=!D(`${J}/${G}`).startsWith(D(Y));else N=!0;if(N){let{line:j,column:H}=B(q,Z.index),F=$==="export"?"Value re-export":"Value import";W.push({ruleId:"stx/store-value-imports-must-be-local",message:`${F} from "${G}" is outside resources/stores/ and will be stripped from the store bundle. Use \`${$} type\`, or move the value into the stores dir.`,line:j,column:H,severity:"error"})}}}function b(q){let Q=q.trim(),W=(J)=>{let X=J.match(/[A-Za-z_$][\w$]*/g);return X?X:[]},y=/\bas\s+(.+)$/.exec(Q);if(y){let J=y[1].trim(),X=/^([A-Za-z_$][\w$]*)\s*=>\s*([A-Za-z_$][\w$]*)/.exec(J);if(X)return[X[1],X[2]];let Z=/^\(([^)]*)\)/.exec(J);if(Z)return W(Z[1]);let $=/^([A-Za-z_$][\w$]*)/.exec(J);return $?[$[1]]:[]}let U=/^\(([^)]*)\)\s+(?:in|of)\s+/.exec(Q);if(U)return W(U[1]);let Y=/^([A-Za-z_$][\w$]*)\s+(?:in|of)\s+/.exec(Q);return Y?[Y[1]]:[]}function v(q,Q){let W=/(?::for|x-for|@for)\s*=\s*"([^"]*)"/gi,y;while((y=W.exec(q))!==null){let U=b(y[1]);if(U.length===0)continue;let Y=q.lastIndexOf("<",y.index);if(Y===-1)continue;let J=/^<([a-z][\w-]*)/i.exec(q.slice(Y,Y+64));if(!J)continue;let X=q.indexOf(">",y.index);if(X===-1)continue;let $=q[X-1]==="/"||O.has(J[1].toLowerCase())?X+1:M(q,J[1],X+1),G=$===-1?X+1:$,N=q.indexOf(y[1],y.index),j=q.slice(Y,G);if(N>=0&&N+y[1].length<=G){let H=N-Y;j=j.slice(0,H)+" ".repeat(y[1].length)+j.slice(H+y[1].length)}for(let H of U){let F=new RegExp(`(?<![.\\w$])${w(H)}\\s*\\(`,"g"),A;while((A=F.exec(j))!==null){let K=Y+A.index,{line:_,column:x}=B(q,K);Q.push({ruleId:"stx/no-signal-call-in-for-iteration-var",message:`"${H}" is a :for iteration variable, not a signal \u2014 calling it as "${H}()" leaves it as a function and silently breaks comparisons. Use "${H}" directly.`,line:_,column:x,severity:"error"})}}}}function R(q,Q){let W=/<!--([\s\S]*?)-->/g,y;while((y=W.exec(q))!==null){let Y=y[1].indexOf("`");if(Y!==-1){let J=y.index+4+Y,{line:X,column:Z}=B(q,J);Q.push({ruleId:"stx/no-backticks-in-html-comments",message:"Backtick inside an HTML comment leaks into the merged setup function and flips the JS parser into template-literal mode. Remove it or rephrase the comment.",line:X,column:Z,severity:"error"})}}}function z(q,Q){return q?.[Q]!==!1}function E(q,Q={}){let W=[],y=P(q),U=(Q.filePath??"").replace(/\\/g,"/"),Y=Q.fileKind??(/\/components?\//i.test(U)?"component":"view");if(z(Q.rules,"stx/no-bare-function-ref-in-event"))C(q,y,W);if(z(Q.rules,"stx/no-view-level-script-client"))I(q,Y,W);if(U&&z(Q.rules,"stx/store-value-imports-must-be-local"))V(q,U,W);if(z(Q.rules,"stx/no-signal-call-in-for-iteration-var"))v(q,W);if(z(Q.rules,"stx/no-backticks-in-html-comments"))R(q,W);W.sort((X,Z)=>X.line-Z.line||X.column-Z.column);let J=new Set;return W.filter((X)=>{let Z=`${X.ruleId}:${X.line}:${X.column}`;if(J.has(Z))return!1;return J.add(Z),!0})}
4
- export{E as ig};
4
+ export{E as fg};
@@ -74,4 +74,4 @@ catch (error) {
74
74
  };
75
75
  })();
76
76
  `.trim()}
77
- export{Z as Qj,_ as Rj,R as Sj,$ as Tj,k as Uj,G as Vj,V as Wj,K as Xj,M as Yj,W as Zj,w as _j,E as $j};
77
+ export{Z as Nj,_ as Oj,R as Pj,$ as Qj,k as Rj,G as Sj,V as Tj,K as Uj,M as Vj,W as Wj,w as Xj,E as Yj};
@@ -1,5 +1,5 @@
1
1
  // @bun
2
- import{Dp as H,Fp as $}from"./chunk-55nwdnsd.js";function A(q,U){switch(U.format){case"json":return J(q,U);case"markdown":return O(q,U);case"text":default:return K(q,U)}}function J(q,U){let j=x(q,U);return JSON.stringify({timestamp:q.timestamp,buildDir:q.buildDir,summary:{totalSize:q.totalSize,totalSizeFormatted:H(q.totalSize),totalGzipSize:q.totalGzipSize,totalGzipSizeFormatted:H(q.totalGzipSize),moduleCount:q.moduleCount,chunkCount:q.chunks.length,duplicateCount:q.duplicates.length},byType:Object.fromEntries(Object.entries(q.byType).map(([Q,Y])=>[Q,{...Y,sizeFormatted:H(Y.size),gzipSizeFormatted:H(Y.gzipSize)}])),chunks:q.chunks.map((Q)=>({name:Q.name,size:Q.size,sizeFormatted:H(Q.size),gzipSize:Q.gzipSize,gzipSizeFormatted:H(Q.gzipSize),moduleCount:Q.modules.length,isEntry:Q.isEntry,isVendor:Q.isVendor})),largestModules:q.largestModules.slice(0,U.topModules||10).map((Q)=>({path:Q.path,size:Q.size,sizeFormatted:H(Q.size),gzipSize:Q.gzipSize,gzipSizeFormatted:H(Q.gzipSize),type:Q.type})),duplicates:q.duplicates,analysis:j,warnings:q.warnings},null,2)}function K(q,U){let j=[],Q=U.showGzip!==!1;if(j.push(""),j.push("Bundle Analysis Report"),j.push("\u2550".repeat(50)),j.push(""),j.push("Summary"),j.push("\u2500".repeat(50)),Q)j.push(`Total Size: ${H(q.totalSize)} (${H(q.totalGzipSize)} gzip)`);else j.push(`Total Size: ${H(q.totalSize)}`);if(j.push(`Modules: ${q.moduleCount}`),j.push(`Chunks: ${q.chunks.length}`),q.duplicates.length>0)j.push(`Duplicates: ${q.duplicates.length}`);if(j.push(""),U.threshold&&q.totalSize>U.threshold)j.push(`\u26A0\uFE0F Bundle exceeds threshold of ${H(U.threshold)}!`),j.push("");j.push("Size by Type"),j.push("\u2500".repeat(50));let Y=["js","css","html","image","font","other"];for(let D of Y){let F=q.byType[D];if(F.count>0){let X=$(F.size,q.totalSize),Z=Q?` (${H(F.gzipSize)} gzip)`:"";j.push(` ${D.padEnd(8)} ${H(F.size).padStart(12)}${Z} ${X.padStart(6)} (${F.count} files)`)}}j.push(""),j.push("Chunks"),j.push("\u2500".repeat(50));for(let D of q.chunks.slice(0,10)){let F=[];if(D.isEntry)F.push("entry");if(D.isVendor)F.push("vendor");let X=F.length>0?` [${F.join(", ")}]`:"",Z=Q?` (${H(D.gzipSize)} gzip)`:"";j.push(` ${D.name.padEnd(20)} ${H(D.size).padStart(12)}${Z}${X}`)}if(q.chunks.length>10)j.push(` ... and ${q.chunks.length-10} more chunks`);j.push("");let V=U.topModules||10;j.push(`Largest Modules (Top ${V})`),j.push("\u2500".repeat(50));for(let D=0;D<Math.min(V,q.largestModules.length);D++){let F=q.largestModules[D],X=Q?` (${H(F.gzipSize)} gzip)`:"";j.push(` ${(D+1).toString().padStart(2)}. ${F.path}`),j.push(` ${H(F.size)}${X}`)}if(j.push(""),q.duplicates.length>0){j.push("Duplicate Modules"),j.push("\u2500".repeat(50));for(let D of q.duplicates.slice(0,5))j.push(` ${D.path}`),j.push(` ${D.count} copies, wasting ${H(D.wastedBytes)}`);if(q.duplicates.length>5)j.push(` ... and ${q.duplicates.length-5} more duplicates`);j.push("")}if(U.recommendations!==!1){let D=x(q,U);if(D.recommendations.length>0){j.push("Recommendations"),j.push("\u2500".repeat(50));for(let F of D.recommendations.slice(0,5)){let X=F.impact==="high"?"\u26A1":F.impact==="medium"?"\uD83D\uDCCA":"\uD83D\uDCA1";j.push(` ${X} ${F.title}`),j.push(` ${F.description}`)}j.push("")}}if(q.warnings.length>0){j.push("Warnings"),j.push("\u2500".repeat(50));for(let D of q.warnings)j.push(` \u26A0\uFE0F ${D}`);j.push("")}return j.join(`
2
+ import{Ep as H,Gp as $}from"./chunk-g8b81pzc.js";function A(q,U){switch(U.format){case"json":return J(q,U);case"markdown":return O(q,U);case"text":default:return K(q,U)}}function J(q,U){let j=x(q,U);return JSON.stringify({timestamp:q.timestamp,buildDir:q.buildDir,summary:{totalSize:q.totalSize,totalSizeFormatted:H(q.totalSize),totalGzipSize:q.totalGzipSize,totalGzipSizeFormatted:H(q.totalGzipSize),moduleCount:q.moduleCount,chunkCount:q.chunks.length,duplicateCount:q.duplicates.length},byType:Object.fromEntries(Object.entries(q.byType).map(([Q,Y])=>[Q,{...Y,sizeFormatted:H(Y.size),gzipSizeFormatted:H(Y.gzipSize)}])),chunks:q.chunks.map((Q)=>({name:Q.name,size:Q.size,sizeFormatted:H(Q.size),gzipSize:Q.gzipSize,gzipSizeFormatted:H(Q.gzipSize),moduleCount:Q.modules.length,isEntry:Q.isEntry,isVendor:Q.isVendor})),largestModules:q.largestModules.slice(0,U.topModules||10).map((Q)=>({path:Q.path,size:Q.size,sizeFormatted:H(Q.size),gzipSize:Q.gzipSize,gzipSizeFormatted:H(Q.gzipSize),type:Q.type})),duplicates:q.duplicates,analysis:j,warnings:q.warnings},null,2)}function K(q,U){let j=[],Q=U.showGzip!==!1;if(j.push(""),j.push("Bundle Analysis Report"),j.push("\u2550".repeat(50)),j.push(""),j.push("Summary"),j.push("\u2500".repeat(50)),Q)j.push(`Total Size: ${H(q.totalSize)} (${H(q.totalGzipSize)} gzip)`);else j.push(`Total Size: ${H(q.totalSize)}`);if(j.push(`Modules: ${q.moduleCount}`),j.push(`Chunks: ${q.chunks.length}`),q.duplicates.length>0)j.push(`Duplicates: ${q.duplicates.length}`);if(j.push(""),U.threshold&&q.totalSize>U.threshold)j.push(`\u26A0\uFE0F Bundle exceeds threshold of ${H(U.threshold)}!`),j.push("");j.push("Size by Type"),j.push("\u2500".repeat(50));let Y=["js","css","html","image","font","other"];for(let D of Y){let F=q.byType[D];if(F.count>0){let X=$(F.size,q.totalSize),Z=Q?` (${H(F.gzipSize)} gzip)`:"";j.push(` ${D.padEnd(8)} ${H(F.size).padStart(12)}${Z} ${X.padStart(6)} (${F.count} files)`)}}j.push(""),j.push("Chunks"),j.push("\u2500".repeat(50));for(let D of q.chunks.slice(0,10)){let F=[];if(D.isEntry)F.push("entry");if(D.isVendor)F.push("vendor");let X=F.length>0?` [${F.join(", ")}]`:"",Z=Q?` (${H(D.gzipSize)} gzip)`:"";j.push(` ${D.name.padEnd(20)} ${H(D.size).padStart(12)}${Z}${X}`)}if(q.chunks.length>10)j.push(` ... and ${q.chunks.length-10} more chunks`);j.push("");let V=U.topModules||10;j.push(`Largest Modules (Top ${V})`),j.push("\u2500".repeat(50));for(let D=0;D<Math.min(V,q.largestModules.length);D++){let F=q.largestModules[D],X=Q?` (${H(F.gzipSize)} gzip)`:"";j.push(` ${(D+1).toString().padStart(2)}. ${F.path}`),j.push(` ${H(F.size)}${X}`)}if(j.push(""),q.duplicates.length>0){j.push("Duplicate Modules"),j.push("\u2500".repeat(50));for(let D of q.duplicates.slice(0,5))j.push(` ${D.path}`),j.push(` ${D.count} copies, wasting ${H(D.wastedBytes)}`);if(q.duplicates.length>5)j.push(` ... and ${q.duplicates.length-5} more duplicates`);j.push("")}if(U.recommendations!==!1){let D=x(q,U);if(D.recommendations.length>0){j.push("Recommendations"),j.push("\u2500".repeat(50));for(let F of D.recommendations.slice(0,5)){let X=F.impact==="high"?"\u26A1":F.impact==="medium"?"\uD83D\uDCCA":"\uD83D\uDCA1";j.push(` ${X} ${F.title}`),j.push(` ${F.description}`)}j.push("")}}if(q.warnings.length>0){j.push("Warnings"),j.push("\u2500".repeat(50));for(let D of q.warnings)j.push(` \u26A0\uFE0F ${D}`);j.push("")}return j.join(`
3
3
  `)}function O(q,U){let j=[],Q=U.showGzip!==!1;if(j.push("# Bundle Analysis Report"),j.push(""),j.push(`Generated: ${new Date(q.timestamp).toISOString()}`),j.push(""),j.push("## Summary"),j.push(""),j.push("| Metric | Value |"),j.push("|--------|-------|"),j.push(`| Total Size | ${H(q.totalSize)} |`),Q)j.push(`| Gzip Size | ${H(q.totalGzipSize)} |`);j.push(`| Modules | ${q.moduleCount} |`),j.push(`| Chunks | ${q.chunks.length} |`),j.push(`| Duplicates | ${q.duplicates.length} |`),j.push(""),j.push("## Size by Type"),j.push(""),j.push("| Type | Size | Gzip | % | Files |"),j.push("|------|------|------|---|-------|");let Y=["js","css","html","image","font","other"];for(let D of Y){let F=q.byType[D];if(F.count>0)j.push(`| ${D} | ${H(F.size)} | ${H(F.gzipSize)} | ${$(F.size,q.totalSize)} | ${F.count} |`)}j.push(""),j.push("## Chunks"),j.push(""),j.push("| Name | Size | Gzip | Modules | Type |"),j.push("|------|------|------|---------|------|");for(let D of q.chunks.slice(0,15)){let F=D.isEntry?"Entry":D.isVendor?"Vendor":"-";j.push(`| ${D.name} | ${H(D.size)} | ${H(D.gzipSize)} | ${D.modules.length} | ${F} |`)}j.push("");let V=U.topModules||10;j.push(`## Largest Modules (Top ${V})`),j.push(""),j.push("| # | Path | Size | Gzip |"),j.push("|---|------|------|------|");for(let D=0;D<Math.min(V,q.largestModules.length);D++){let F=q.largestModules[D];j.push(`| ${D+1} | \`${F.path}\` | ${H(F.size)} | ${H(F.gzipSize)} |`)}if(j.push(""),q.duplicates.length>0){j.push("## Duplicates"),j.push(""),j.push("| Path | Copies | Wasted |"),j.push("|------|--------|--------|");for(let D of q.duplicates.slice(0,10))j.push(`| \`${D.path}\` | ${D.count} | ${H(D.wastedBytes)} |`);j.push("")}if(U.recommendations!==!1){let D=x(q,U);if(D.recommendations.length>0){j.push("## Recommendations"),j.push("");for(let F of D.recommendations)j.push(`### ${F.title}`),j.push(""),j.push(F.description),j.push(""),j.push(`- **Impact:** ${F.impact}`),j.push(`- **Effort:** ${F.effort}`),j.push("")}}return j.join(`
4
4
  `)}function x(q,U){let j=[],Q=[];if(U.threshold&&q.totalSize>U.threshold)j.push({severity:"error",message:`Bundle size (${H(q.totalSize)}) exceeds threshold (${H(U.threshold)})`});if(q.totalSize>1048576)j.push({severity:"warning",message:`Bundle is over 1MB (${H(q.totalSize)})`,details:"Large bundles can significantly impact load time"});if(q.duplicates.length>0){let F=q.duplicates.reduce((X,Z)=>X+Z.wastedBytes,0);j.push({severity:"warning",message:`${q.duplicates.length} duplicate modules found, wasting ${H(F)}`}),Q.push({title:"Remove Duplicate Modules",description:"Consider using import aliases or ensuring consistent package versions to eliminate duplicates.",impact:"medium",effort:"low"})}if(q.byType.js.size/q.totalSize>0.8&&q.totalSize>512000)Q.push({title:"Code Splitting",description:"Over 80% of your bundle is JavaScript. Consider splitting code by route or feature.",impact:"high",effort:"medium"});let V=q.largestModules.filter((F)=>F.size>102400);if(V.length>0){j.push({severity:"info",message:`${V.length} modules are over 100KB`});for(let F of V){if(F.path.includes("lodash")&&!F.path.includes("lodash-es"))Q.push({title:"Use lodash-es instead of lodash",description:"lodash-es supports tree-shaking and can significantly reduce bundle size.",impact:"high",effort:"low"});if(F.path.includes("moment"))Q.push({title:"Replace moment.js",description:"Consider using date-fns or dayjs for smaller date handling libraries.",impact:"high",effort:"medium"})}}if(q.byType.image.size>512000)Q.push({title:"Optimize Images",description:`Images account for ${H(q.byType.image.size)}. Consider using WebP/AVIF formats and responsive images.`,impact:"high",effort:"low"});let D=100;if(q.totalSize>1048576)D-=20;else if(q.totalSize>512000)D-=10;if(D-=Math.min(20,q.duplicates.length*2),D-=Math.min(15,V.length*3),U.threshold&&q.totalSize>U.threshold)D-=25;return{score:Math.max(0,D),issues:j,recommendations:Q}}var W={lodash:{alternative:"lodash-es or individual imports",savings:"~70%"},moment:{alternative:"date-fns or dayjs",savings:"~90%"},"chart.js":{alternative:"chart.js with tree-shaking",savings:"~50%"},"highlight.js":{alternative:"Selective language imports",savings:"~80%"},fontawesome:{alternative:"Individual icon imports",savings:"~90%"},"material-ui":{alternative:"Named imports from @mui/*",savings:"~60%"}};function E(q){for(let[U,j]of Object.entries(W))if(q.includes(U))return{title:`Optimize ${U}`,description:`Consider using ${j.alternative}. Potential savings: ${j.savings}`,impact:"high",effort:"low"};return null}
5
- export{A as xp,x as yp,E as zp};
5
+ export{A as yp,x as zp,E as Ap};
@@ -1,3 +1,3 @@
1
1
  // @bun
2
2
  function e(){return!1}function o(){return!e()||process.env.STX_DEBUG==="true"}function n(){return!1}
3
- export{e as Iy,o as Jy,n as Ky};
3
+ export{e as Ky,o as Ly,n as My};
@@ -1,9 +1,9 @@
1
1
  // @bun
2
- import{Ty as $}from"./chunk-7ed3tean.js";import H from"path";function Z(j){return j.startsWith("http://")||j.startsWith("https://")||j.startsWith("//")}async function _(j,z,Q){try{let q;if(j.startsWith("/")){let B=z;for(let J=0;J<5;J++){let K=H.join(B,j);if(await Bun.file(K).exists())return K;B=H.dirname(B)}q=H.join(z,j)}else if(j.startsWith("./")||j.startsWith("../"))q=H.resolve(z,j);else q=H.resolve(z,j);if(await Bun.file(q).exists())return q;return null}catch{return null}}async function I(j,z,Q){let q=j,B=H.dirname(z),J=/<script\b([^>]*)src=["']([^"']+)["']([^>]*)><\/script>/gi,K;while((K=J.exec(q))!==null){let[T,X,w,Y]=K;if(Z(w))continue;let G=await _(w,B,z);if(G)try{let O=await Bun.file(G).text();if(Q.add(G),w.endsWith(".ts")||w.endsWith(".tsx")){let N=await Bun.build({entrypoints:[G],target:"browser",minify:!1,define:$()});if(N.outputs.length>0)O=await N.outputs[0].text()}let L=`<script>
2
+ import{Vy as $}from"./chunk-q60knhjf.js";import H from"path";function Z(j){return j.startsWith("http://")||j.startsWith("https://")||j.startsWith("//")}async function _(j,z,Q){try{let q;if(j.startsWith("/")){let B=z;for(let J=0;J<5;J++){let K=H.join(B,j);if(await Bun.file(K).exists())return K;B=H.dirname(B)}q=H.join(z,j)}else if(j.startsWith("./")||j.startsWith("../"))q=H.resolve(z,j);else q=H.resolve(z,j);if(await Bun.file(q).exists())return q;return null}catch{return null}}async function I(j,z,Q){let q=j,B=H.dirname(z),J=/<script\b([^>]*)src=["']([^"']+)["']([^>]*)><\/script>/gi,K;while((K=J.exec(q))!==null){let[T,X,w,Y]=K;if(Z(w))continue;let G=await _(w,B,z);if(G)try{let O=await Bun.file(G).text();if(Q.add(G),w.endsWith(".ts")||w.endsWith(".tsx")){let N=await Bun.build({entrypoints:[G],target:"browser",minify:!1,define:$()});if(N.outputs.length>0)O=await N.outputs[0].text()}let L=`<script>
3
3
  // Source: ${w}
4
4
  ${O}
5
5
  </script>`;q=q.replace(T,L),J.lastIndex=0}catch(O){}}let V=/<link\b([^>]*)href=["']([^"']+)["']([^>]*)(?:\/?>)/gi,W;while((W=V.exec(q))!==null){let[T,X,w,Y]=W,G=X+Y;if(Z(w))continue;if(/rel=["']stylesheet["']/.test(G)||w.endsWith(".css")){let L=await _(w,B,z);if(L)try{let N=await Bun.file(L).text();Q.add(L);let y=`<style>
6
6
  /* Source: ${w} */
7
7
  ${N}
8
8
  </style>`;q=q.replace(T,y),V.lastIndex=0}catch(N){}}}return q}
9
- export{Z as hv,_ as iv,I as jv};
9
+ export{Z as iv,_ as jv,I as kv};
@@ -5,4 +5,4 @@ var Y=[{pattern:/document\.getElementById\s*\(/g,message:"document.getElementByI
5
5
  ${G.join(`
6
6
  `)}
7
7
  Tip: prefer useRef(), navigate(), and composables for component code`;if(z.failOnViolation)throw Error(k);else console.warn(k)}}
8
- export{Y as ut,Z as vt};
8
+ export{Y as vt,Z as wt};
@@ -1,3 +1,3 @@
1
1
  // @bun
2
2
  import{abortNavigation as r,clearMiddleware as t,createClientCookieManager as o,createMiddlewareContext as i,createRouteLocation as d,createServerCookieManager as l,createStorageManager as n,defineMiddleware as M,getMiddleware as g,getMiddlewareNames as w,hasMiddleware as s,loadMiddlewareFromDirectory as u,navigateTo as c,registerMiddleware as R,runMiddleware as v}from"stx-router";
3
- export{r as oh,t as ph,o as qh,i as rh,d as sh,l as th,n as uh,M as vh,g as wh,w as xh,s as yh,u as zh,c as Ah,R as Bh,v as Ch};
3
+ export{r as lh,t as mh,o as nh,i as oh,d as ph,l as qh,n as rh,M as sh,g as th,w as uh,s as vh,u as wh,c as xh,R as yh,v as zh};
@@ -18,4 +18,4 @@ ${_}
18
18
  `)}</p>`);if(j=D.join(`
19
19
  `),Q)j=j.replace(/\n/g,`<br />
20
20
  `);for(let q=0;q<O.length;q++)j=j.replace(`\x00CODEBLOCK${q}\x00`,O[q]);return j=j.replace(/<p>\s*<\/p>/g,""),j.trim()}
21
- export{A as fv,S as gv};
21
+ export{A as gv,S as hv};
@@ -338,4 +338,4 @@ else {
338
338
  console.log('[stx] Suspense runtime initialized');
339
339
  })();
340
340
  `}
341
- export{N as Jf,Q as Kf,T as Lf,U as Mf,W as Nf};
341
+ export{N as Gf,Q as Hf,T as If,U as Jf,W as Kf};
@@ -158,4 +158,4 @@ else {
158
158
  })();
159
159
  </script>
160
160
  `,j}function E(C){let{html:D,bindings:w,stores:j}=y(C);if(w.length===0)return C;let k=B(w,j),q=D.lastIndexOf("</body>");if(q!==-1)return D.slice(0,q)+k+D.slice(q);return D+k}
161
- export{y as St,B as Tt,E as Ut};
161
+ export{y as Tt,B as Ut,E as Vt};
@@ -1,3 +1,3 @@
1
1
  // @bun
2
2
  import L from"fs";import C from"path";import{gzipSync as H}from"zlib";import{createHash as _}from"crypto";var Y={".js":"js",".mjs":"js",".cjs":"js",".ts":"js",".jsx":"js",".tsx":"js",".css":"css",".scss":"css",".sass":"css",".less":"css",".html":"html",".htm":"html",".png":"image",".jpg":"image",".jpeg":"image",".gif":"image",".svg":"image",".webp":"image",".avif":"image",".ico":"image",".woff":"font",".woff2":"font",".ttf":"font",".eot":"font",".otf":"font"},R=[/node_modules/,/vendor/,/bower_components/,/\.min\./],N=[/index\.(js|ts|html)$/,/main\.(js|ts)$/,/app\.(js|ts)$/,/entry\.(js|ts)$/];async function y(j,Q={}){let{includeSourceMaps:U=!1,parseImports:K=!0,detectDuplicates:W=!0,topModulesCount:X=20}=Q;if(!L.existsSync(j))throw Error(`Build directory not found: ${j}`);if(!L.statSync(j).isDirectory())throw Error(`Not a directory: ${j}`);let J=await E(j,U),q=[],V=[];for(let G of J)try{let O=await I(G,j,K);q.push(O)}catch(O){V.push(`Failed to process ${G}: ${O}`)}let $=g(q,j),B=q.reduce((G,O)=>G+O.size,0),w=q.reduce((G,O)=>G+O.gzipSize,0),A=k(q),F=W?z(q):[],v=[...q].sort((G,O)=>O.size-G.size).slice(0,X);return{timestamp:Date.now(),buildDir:C.resolve(j),chunks:$,totalSize:B,totalGzipSize:w,moduleCount:q.length,duplicates:F,byType:A,largestModules:v,warnings:V}}async function E(j,Q){let U=[];async function K(W){let X=await L.promises.readdir(W,{withFileTypes:!0});for(let Z of X){let J=C.join(W,Z.name);if(Z.isDirectory()){if(!Z.name.startsWith(".")&&Z.name!=="node_modules")await K(J)}else if(Z.isFile()){if(!Q&&Z.name.endsWith(".map"))continue;U.push(J)}}}return await K(j),U}async function I(j,Q,U){let K=await L.promises.readFile(j),W=C.relative(Q,j),X=C.extname(j).toLowerCase(),Z=K.length,J=S(K),q=T(K,X),V=_("md5").update(K).digest("hex").slice(0,8),$=Y[X]||"other",B=[];if(U&&$==="js")B.push(...x(K.toString("utf-8")));return{id:W,path:W,size:Z,gzipSize:J,parsedSize:q,extension:X,type:$,imports:B,importedBy:[],hash:V}}function S(j){try{let Q=H(j,{level:9}).length;return Math.min(Q,j.length)}catch{return j.length}}function T(j,Q){if(Q.includes(".min.")||j.length<1000)return j.length;let K=Y[Q];if(K==="js")return Math.round(j.length*0.6);if(K==="css")return Math.round(j.length*0.7);return j.length}function x(j){let Q=[],U=/import\s+(?:[\w*{}\s,]+\s+from\s+)?['"]([^'"]+)['"]/g,K;while((K=U.exec(j))!==null)Q.push(K[1]);let W=/import\s*\(\s*['"]([^'"]+)['"]\s*\)/g;while((K=W.exec(j))!==null)Q.push(K[1]);let X=/require\s*\(\s*['"]([^'"]+)['"]\s*\)/g;while((K=X.exec(j))!==null)Q.push(K[1]);return[...new Set(Q)]}function g(j,Q){let U=new Map;for(let W of j){let X=W.path.split(C.sep),Z;if(X.length===1)Z=C.basename(W.path,W.extension);else Z=X[0];let J=U.get(Z)||[];J.push(W),U.set(Z,J)}let K=[];for(let[W,X]of U){let Z=X.reduce(($,B)=>$+B.size,0),J=X.reduce(($,B)=>$+B.gzipSize,0),q=X.some(($)=>N.some((B)=>B.test($.path))),V=X.some(($)=>R.some((B)=>B.test($.path)));K.push({name:W,files:X.map(($)=>$.path),modules:X,size:Z,gzipSize:J,isEntry:q,isVendor:V})}return K.sort((W,X)=>X.size-W.size)}function k(j){let Q={js:{count:0,size:0,gzipSize:0},css:{count:0,size:0,gzipSize:0},html:{count:0,size:0,gzipSize:0},image:{count:0,size:0,gzipSize:0},font:{count:0,size:0,gzipSize:0},other:{count:0,size:0,gzipSize:0}};for(let U of j)Q[U.type].count++,Q[U.type].size+=U.size,Q[U.type].gzipSize+=U.gzipSize;return Q}function z(j){let Q=new Map;for(let K of j){let W=Q.get(K.hash)||[];W.push(K),Q.set(K.hash,W)}let U=[];for(let[,K]of Q)if(K.length>1){let W=K[0];U.push({path:W.path,count:K.length,wastedBytes:W.size*(K.length-1),locations:K.map((X)=>X.path)})}return U.sort((K,W)=>W.wastedBytes-K.wastedBytes)}function b(j){if(j<1024)return`${j} B`;if(j<1048576)return`${(j/1024).toFixed(2)} KB`;return`${(j/1048576).toFixed(2)} MB`}function h(j){let Q=j.match(/^([\d.]+)\s*(B|KB|MB|GB)?$/i);if(!Q)return 0;let U=Number.parseFloat(Q[1]);switch((Q[2]||"B").toUpperCase()){case"KB":return U*1024;case"MB":return U*1024*1024;case"GB":return U*1024*1024*1024;default:return U}}function p(j,Q){if(Q===0)return"0%";return`${(j/Q*100).toFixed(1)}%`}
3
- export{y as Cp,b as Dp,h as Ep,p as Fp};
3
+ export{y as Dp,b as Ep,h as Fp,p as Gp};
@@ -1,3 +1,3 @@
1
1
  // @bun
2
- import{_q as J}from"./chunk-r0jcmpv6.js";function Q(E,D){let A=new Set,B=new Map,C=new Map,F={globalProperties:{},performance:!1,compilerOptions:{}},z={config:F,_components:B,_directives:C,_installedPlugins:A,use(q,...x){if(A.has(q))return z;if(A.add(q),typeof q==="function")q(z,...x);else if(typeof q.install==="function")q.install(z,...x);return z},provide(q,x){return J(q,x),z},component(q,x){if(!x)return B.get(q);return B.set(q,x),z},directive(q,x){if(!x)return C.get(q);return C.set(q,x),z},mount(q){if(typeof document<"u"){let x=globalThis.__stx_globals||(globalThis.__stx_globals={});Object.assign(x,F.globalProperties),document.querySelectorAll("[v-cloak]").forEach((K)=>{K.removeAttribute("v-cloak")})}return z},unmount(){B.clear(),C.clear(),A.clear()}};return z}function R(E){return class extends HTMLElement{_component;_shadow;constructor(){super();this._shadow=this.attachShadow({mode:"open"}),this._component=E}connectedCallback(){if(this._component?.render){let D=this._component.render();if(typeof D==="string")this._shadow.innerHTML=D}else if(this._component?.template)this._shadow.innerHTML=this._component.template;else if(typeof this._component==="string")this._shadow.innerHTML=this._component}disconnectedCallback(){this._shadow.innerHTML=""}}}
3
- export{Q as Rq,R as Sq};
2
+ import{$q as J}from"./chunk-xygc53vr.js";function Q(E,D){let A=new Set,B=new Map,C=new Map,F={globalProperties:{},performance:!1,compilerOptions:{}},z={config:F,_components:B,_directives:C,_installedPlugins:A,use(q,...x){if(A.has(q))return z;if(A.add(q),typeof q==="function")q(z,...x);else if(typeof q.install==="function")q.install(z,...x);return z},provide(q,x){return J(q,x),z},component(q,x){if(!x)return B.get(q);return B.set(q,x),z},directive(q,x){if(!x)return C.get(q);return C.set(q,x),z},mount(q){if(typeof document<"u"){let x=globalThis.__stx_globals||(globalThis.__stx_globals={});Object.assign(x,F.globalProperties),document.querySelectorAll("[v-cloak]").forEach((K)=>{K.removeAttribute("v-cloak")})}return z},unmount(){B.clear(),C.clear(),A.clear()}};return z}function R(E){return class extends HTMLElement{_component;_shadow;constructor(){super();this._shadow=this.attachShadow({mode:"open"}),this._component=E}connectedCallback(){if(this._component?.render){let D=this._component.render();if(typeof D==="string")this._shadow.innerHTML=D}else if(this._component?.template)this._shadow.innerHTML=this._component.template;else if(typeof this._component==="string")this._shadow.innerHTML=this._component}disconnectedCallback(){this._shadow.innerHTML=""}}}
3
+ export{Q as Sq,R as Tq};
@@ -1,5 +1,5 @@
1
1
  // @bun
2
- import{py as U}from"./chunk-zen6ax1y.js";import{Ry as v}from"./chunk-27zsyhrd.js";import{uz as D}from"./chunk-w3b6m427.js";function P(F,z,V,Y){let G=F;G=G.replace(/@meta\(\s*['"]([^'"]+)['"](?:,\s*['"]([^'"]+)['"]\s*)?\)/g,($,N,A)=>{if(!A&&N.includes(":")){let Z=N.split(":"),q=N,B=Z.length>1?Z[1]:"";if(B&&z[B])A=z[B];else if(q.startsWith("og:")&&z.openGraph&&z.openGraph[Z[1]])A=z.openGraph[Z[1]];else A="";return A?`<meta property="${J(q)}" content="${J(A)}">`:""}return A?`<meta name="${J(N)}" content="${J(A)}">`:""});let I=/@metaTag\s*\(/g,_;while((_=I.exec(G))!==null){let $=_.index,N=$+_[0].length-1,A=1,Z=N+1;while(Z<G.length&&A>0){if(G[Z]==="(")A++;else if(G[Z]===")"){if(A--,A===0)break}Z++}if(A!==0)break;let q=G.substring(N+1,Z).trim(),B=Z+1,L=(()=>{try{let R=D(q,z);if(!R)return"";let j="<meta";if(R.name)j+=` name="${J(String(R.name))}"`;if(R.property)j+=` property="${J(String(R.property))}"`;if(R.httpEquiv)j+=` http-equiv="${J(String(R.httpEquiv))}"`;if(R.content)j+=` content="${J(String(R.content))}"`;return j+=">",j}catch(R){let j=R instanceof Error?R.message:String(R);return U("MetaTag",j,v.EVALUATION_ERROR)}})();G=G.substring(0,$)+L+G.substring(B),I.lastIndex=0}return G}function y(F,z,V){let Y=F,G=/@structuredData\s*\(/g,I;while((I=G.exec(Y))!==null){let _=I.index,$=_+I[0].length-1,N=1,A=$+1;while(A<Y.length&&N>0){if(Y[A]==="(")N++;else if(Y[A]===")"){if(N--,N===0)break}A++}if(N!==0)break;let Z=Y.substring($+1,A).trim(),q=A+1,B=(()=>{try{let L=D(Z,z);if(!L)return"";if(!L["@context"])L["@context"]="https://schema.org";return`<script type="application/ld+json">${JSON.stringify(L).replace(/<\//g,"<\\/")}</script>`}catch(L){let R=L instanceof Error?L.message:String(L);return U("StructuredData",R,v.EVALUATION_ERROR)}})();Y=Y.substring(0,_)+B+Y.substring(q),G.lastIndex=0}return Y}function T(F,z,V,Y){let G=F,I=/@seo\s*\(\s*\{/g,_;while((_=I.exec(G))!==null){let $=G.indexOf("{",_.index+4),N=1,A=$+1,Z=null,q=!1;while(A<G.length&&N>0){let O=G[A];if(q){q=!1,A++;continue}if(O==="\\"&&Z){q=!0,A++;continue}if(Z){if(O===Z)Z=null;A++;continue}if(O==='"'||O==="'"||O==="`"){Z=O,A++;continue}if(O==="{")N++;else if(O==="}")N--;A++}if(N!==0)break;let B=G.substring(A).match(/^\s*\)/);if(!B)break;let L=A+B[0].length,R=G.substring($,A),j=G.substring(_.index,L),X=((O)=>{try{let Q=D(O,z);if(!Q)return"";let k="";if(Q.title)k+=`<title>${J(Q.title)}</title>
2
+ import{ry as U}from"./chunk-jjvp4t5w.js";import{Ty as v}from"./chunk-cz25azze.js";import{wz as D}from"./chunk-adqh2m9z.js";function P(F,z,V,Y){let G=F;G=G.replace(/@meta\(\s*['"]([^'"]+)['"](?:,\s*['"]([^'"]+)['"]\s*)?\)/g,($,N,A)=>{if(!A&&N.includes(":")){let Z=N.split(":"),q=N,B=Z.length>1?Z[1]:"";if(B&&z[B])A=z[B];else if(q.startsWith("og:")&&z.openGraph&&z.openGraph[Z[1]])A=z.openGraph[Z[1]];else A="";return A?`<meta property="${J(q)}" content="${J(A)}">`:""}return A?`<meta name="${J(N)}" content="${J(A)}">`:""});let I=/@metaTag\s*\(/g,_;while((_=I.exec(G))!==null){let $=_.index,N=$+_[0].length-1,A=1,Z=N+1;while(Z<G.length&&A>0){if(G[Z]==="(")A++;else if(G[Z]===")"){if(A--,A===0)break}Z++}if(A!==0)break;let q=G.substring(N+1,Z).trim(),B=Z+1,L=(()=>{try{let R=D(q,z);if(!R)return"";let j="<meta";if(R.name)j+=` name="${J(String(R.name))}"`;if(R.property)j+=` property="${J(String(R.property))}"`;if(R.httpEquiv)j+=` http-equiv="${J(String(R.httpEquiv))}"`;if(R.content)j+=` content="${J(String(R.content))}"`;return j+=">",j}catch(R){let j=R instanceof Error?R.message:String(R);return U("MetaTag",j,v.EVALUATION_ERROR)}})();G=G.substring(0,$)+L+G.substring(B),I.lastIndex=0}return G}function y(F,z,V){let Y=F,G=/@structuredData\s*\(/g,I;while((I=G.exec(Y))!==null){let _=I.index,$=_+I[0].length-1,N=1,A=$+1;while(A<Y.length&&N>0){if(Y[A]==="(")N++;else if(Y[A]===")"){if(N--,N===0)break}A++}if(N!==0)break;let Z=Y.substring($+1,A).trim(),q=A+1,B=(()=>{try{let L=D(Z,z);if(!L)return"";if(!L["@context"])L["@context"]="https://schema.org";return`<script type="application/ld+json">${JSON.stringify(L).replace(/<\//g,"<\\/")}</script>`}catch(L){let R=L instanceof Error?L.message:String(L);return U("StructuredData",R,v.EVALUATION_ERROR)}})();Y=Y.substring(0,_)+B+Y.substring(q),G.lastIndex=0}return Y}function T(F,z,V,Y){let G=F,I=/@seo\s*\(\s*\{/g,_;while((_=I.exec(G))!==null){let $=G.indexOf("{",_.index+4),N=1,A=$+1,Z=null,q=!1;while(A<G.length&&N>0){let O=G[A];if(q){q=!1,A++;continue}if(O==="\\"&&Z){q=!0,A++;continue}if(Z){if(O===Z)Z=null;A++;continue}if(O==='"'||O==="'"||O==="`"){Z=O,A++;continue}if(O==="{")N++;else if(O==="}")N--;A++}if(N!==0)break;let B=G.substring(A).match(/^\s*\)/);if(!B)break;let L=A+B[0].length,R=G.substring($,A),j=G.substring(_.index,L),X=((O)=>{try{let Q=D(O,z);if(!Q)return"";let k="";if(Q.title)k+=`<title>${J(Q.title)}</title>
3
3
  `,k+=`<meta name="title" content="${J(Q.title)}">
4
4
  `;if(Q.description)k+=`<meta name="description" content="${J(Q.description)}">
5
5
  `;if(Q.keywords){let W=Array.isArray(Q.keywords)?Q.keywords.join(", "):Q.keywords;k+=`<meta name="keywords" content="${J(W)}">
@@ -55,4 +55,4 @@ ${F.map((I)=>{let _=I.startsWith("http")?I:`${V}${I.startsWith("/")?"":"/"}${I}`
55
55
  `)}
56
56
  </sitemapindex>`}async function d(F,z){let{extensions:V=[".stx",".html",".htm"],ignore:Y=["_*",".*","node_modules","components","partials","layouts"]}=z,G=[],I=V.length===1?`*${V[0]}`:`*{${V.join(",")}}`,_=new Bun.Glob(`**/${I}`);for await(let $ of _.scan(F)){if(Y.some((B)=>{if(B.startsWith("*"))return $.includes(B.slice(1));return $.startsWith(B)||$.includes(`/${B}`)}))continue;let A=$.replace(/\\/g,"/").replace(/index\.(stx|html|htm)$/,"").replace(/\.(stx|html|htm)$/,"");if(!A.startsWith("/"))A=`/${A}`;if(A!=="/"&&A.endsWith("/"))A=A.slice(0,-1);let Z=`${F}/${$}`,q;try{let B=await Bun.file(Z).stat();if(B)q=new Date(B.mtime).toISOString().split("T")[0]}catch{}G.push({loc:A||"/",lastmod:q,priority:A==="/"?1:0.5})}return G.sort(($,N)=>$.loc.localeCompare(N.loc)),G}function b(F){let z=[];for(let V of F.rules){if(z.push(`User-agent: ${V.userAgent}`),V.allow)for(let Y of V.allow)z.push(`Allow: ${Y}`);if(V.disallow)for(let Y of V.disallow)z.push(`Disallow: ${Y}`);if(V.crawlDelay!==void 0)z.push(`Crawl-delay: ${V.crawlDelay}`);z.push("")}if(F.sitemap){let V=Array.isArray(F.sitemap)?F.sitemap:[F.sitemap];for(let Y of V)z.push(`Sitemap: ${Y}`)}if(F.host)z.push(`Host: ${F.host}`);return z.join(`
57
57
  `).trim()}function u(F){return b({rules:[{userAgent:"*",allow:["/"]}],sitemap:F})}function C(F){return F.replace(/&/g,"&amp;").replace(/</g,"&lt;").replace(/>/g,"&gt;").replace(/"/g,"&quot;").replace(/'/g,"&apos;")}
58
- export{P as wt,y as xt,T as yt,H as zt,S as At,w as Bt,f as Ct,x as Dt,h as Et,d as Ft,b as Gt,u as Ht};
58
+ export{P as xt,y as yt,T as zt,H as At,S as Bt,w as Ct,f as Dt,x as Et,h as Ft,d as Gt,b as Ht,u as It};
@@ -57,4 +57,4 @@ ${j.inlineScript}
57
57
  <!-- Custom Analytics -->
58
58
  <script${w.length>0?` ${w.join(" ")}`:""} src="${J(j.scriptUrl)}" defer></script>
59
59
  `}function Y(q,j){let w=N(j);if(!w)return q;if(!q.includes("</head>")){let K=q.lastIndexOf("</body>");if(K!==-1)return q.slice(0,K)+w+q.slice(K);return q+w}return q.replace("</head>",`${w}</head>`)}function J(q){return q.replace(/&/g,"&amp;").replace(/"/g,"&quot;").replace(/'/g,"&#39;").replace(/</g,"&lt;").replace(/>/g,"&gt;")}var Z={name:"analytics",hasEndTag:!1,handler:async(q,j,w,K)=>{let z=w.__stx_config||{};return N(z)}};
60
- export{N as kA,Y as lA,Z as mA};
60
+ export{N as mA,Y as nA,Z as oA};
@@ -1,4 +1,4 @@
1
1
  // @bun
2
2
  var E=new Set(["area","base","br","col","embed","hr","img","input","link","meta","param","source","track","wbr"]),N=new Set(["html","head","body","p","li","dt","dd","rt","rp","option","optgroup","thead","tbody","tfoot","tr","td","th","colgroup","caption"]);function H(W){return W.replace(/[^\n]/g," ")}function R(W){let J=W.replace(/<script\b[^>]*>[\s\S]*?<\/script>/gi,H).replace(/<style\b[^>]*>[\s\S]*?<\/style>/gi,H).replace(/<!--[\s\S]*?-->/g,H).replace(/\{\{\{[\s\S]*?\}\}\}/g,H).replace(/\{\{[\s\S]*?\}\}/g,H).replace(/\{!![\s\S]*?!!\}/g,H).replace(/"[^"]*"/g,H).replace(/'[^']*'/g,H),F=new Map,M=new Map,Y=/<(\/?)([A-Za-z][\w-]*)\b[^>]*?(\/?)>/g,z;while((z=Y.exec(J))!==null){let j=z[1]==="/",q=z[2],X=z[3]==="/";if(E.has(q.toLowerCase()))continue;if(X)continue;if(j)M.set(q,(M.get(q)??0)+1);else{let Z=F.get(q);if(Z)Z.count++;else{let B=J.slice(0,z.index).split(`
3
3
  `).length;F.set(q,{count:1,firstLine:B})}}}let Q=[];for(let j of new Set([...F.keys(),...M.keys()])){if(N.has(j.toLowerCase()))continue;let q=F.get(j)?.count??0,X=M.get(j)??0;if(q!==X)Q.push({tag:j,opened:q,closed:X,firstOpenLine:F.get(j)?.firstLine??0})}return Q}var $=new Set;function U(W,J){let F;try{F=R(W)}catch{return}if(F.length===0)return;let M=`${J}:${W.length}`;if($.has(M))return;$.add(M);let Y=J?J.split(/[/\\]/).pop()||J:"template";for(let{tag:z,opened:Q,closed:j,firstOpenLine:q}of F)if(Q>j){let X=q?` (first opened at line ${q})`:"";console.warn(`[stx] ${Y}: <${z}> ${Q} opened, ${j} closed \u2014 an unclosed <${z}>${X} may swallow the content that follows it.`)}else console.warn(`[stx] ${Y}: <${z}> ${Q} opened, ${j} closed \u2014 ${j-Q} stray </${z}>.`)}
4
- export{R as rt,U as st};
4
+ export{R as st,U as tt};
@@ -1,3 +1,3 @@
1
1
  // @bun
2
- import{Vk as Z,Yk as U,Zk as X,_k as _}from"./chunk-jpndqst5.js";import{mkdir as S,readFile as $,writeFile as V,readdir as v,rm as W,stat as A}from"fs/promises";import{join as R,dirname as K}from"path";var L=new Map,T={enabled:!0,directory:".stx/media-cache",maxAge:30,maxSize:500};async function M(b){try{await S(b,{recursive:!0})}catch{}}function w(b,q,G){return R(b,G,`${q}.json`)}async function Y(b,q,G){if((Date.now()-b.createdAt)/86400000>G)return!1;if(await X(q)!==b.srcMtime)return!1;return!0}async function F(b,q,G,B=T){if(!B.enabled)return null;let z=U(b,q),I=L.get(z);if(I){if(await Y(I,b,B.maxAge))return I.lastAccessedAt=Date.now(),I.data;L.delete(z)}let O=w(B.directory,z,G);if(await _(O))try{let J=await $(O,"utf-8"),N=JSON.parse(J);if(await Y(N,b,B.maxAge))return N.lastAccessedAt=Date.now(),L.set(z,N),N.data}catch{}return null}async function k(b,q,G,B,z=T){if(!z.enabled)return;let I=U(b,q),O=await Z(b),J=await X(b),N={key:I,src:b,srcHash:O,srcMtime:J,optionsHash:U("",q),data:G,createdAt:Date.now(),lastAccessedAt:Date.now()};L.set(I,N);let Q=w(z.directory,I,B);try{await M(K(Q)),await V(Q,JSON.stringify(N,null,2))}catch(H){console.warn(`[stx-media] Failed to write cache: ${H}`)}}async function D(b,q,G=T){for(let[B,z]of L.entries())if(z.src===b)L.delete(B)}async function P(b,q=T){if(b==="all")L.clear();else L.clear();let G=b==="all"?["image","video"]:[b];for(let B of G){let z=R(q.directory,B);try{await W(z,{recursive:!0,force:!0})}catch{}}}async function u(b=T){let q={memoryEntries:L.size,diskEntries:{image:0,video:0},totalSizeMB:0};for(let G of["image","video"]){let B=R(b.directory,G);try{let z=await v(B);q.diskEntries[G]=z.length;for(let I of z){let O=R(B,I),J=await A(O);q.totalSizeMB+=J.size/1048576}}catch{}}return q}async function d(b=T){let q=0,G=b.maxAge*24*60*60*1000;for(let B of["image","video"]){let z=R(b.directory,B);try{let I=await v(z);for(let O of I){let J=R(z,O);try{let N=await $(J,"utf-8"),Q=JSON.parse(N);if(Date.now()-Q.createdAt>G)await W(J),L.delete(Q.key),q++}catch{await W(J).catch(()=>{}),q++}}}catch{}}return q}
3
- export{T as Kk,F as Lk,k as Mk,D as Nk,P as Ok,u as Pk,d as Qk};
2
+ import{Sk as Z,Vk as U,Wk as X,Xk as _}from"./chunk-5ggw1dyv.js";import{mkdir as S,readFile as $,writeFile as V,readdir as v,rm as W,stat as A}from"fs/promises";import{join as R,dirname as K}from"path";var L=new Map,T={enabled:!0,directory:".stx/media-cache",maxAge:30,maxSize:500};async function M(b){try{await S(b,{recursive:!0})}catch{}}function w(b,q,G){return R(b,G,`${q}.json`)}async function Y(b,q,G){if((Date.now()-b.createdAt)/86400000>G)return!1;if(await X(q)!==b.srcMtime)return!1;return!0}async function F(b,q,G,B=T){if(!B.enabled)return null;let z=U(b,q),I=L.get(z);if(I){if(await Y(I,b,B.maxAge))return I.lastAccessedAt=Date.now(),I.data;L.delete(z)}let O=w(B.directory,z,G);if(await _(O))try{let J=await $(O,"utf-8"),N=JSON.parse(J);if(await Y(N,b,B.maxAge))return N.lastAccessedAt=Date.now(),L.set(z,N),N.data}catch{}return null}async function k(b,q,G,B,z=T){if(!z.enabled)return;let I=U(b,q),O=await Z(b),J=await X(b),N={key:I,src:b,srcHash:O,srcMtime:J,optionsHash:U("",q),data:G,createdAt:Date.now(),lastAccessedAt:Date.now()};L.set(I,N);let Q=w(z.directory,I,B);try{await M(K(Q)),await V(Q,JSON.stringify(N,null,2))}catch(H){console.warn(`[stx-media] Failed to write cache: ${H}`)}}async function D(b,q,G=T){for(let[B,z]of L.entries())if(z.src===b)L.delete(B)}async function P(b,q=T){if(b==="all")L.clear();else L.clear();let G=b==="all"?["image","video"]:[b];for(let B of G){let z=R(q.directory,B);try{await W(z,{recursive:!0,force:!0})}catch{}}}async function u(b=T){let q={memoryEntries:L.size,diskEntries:{image:0,video:0},totalSizeMB:0};for(let G of["image","video"]){let B=R(b.directory,G);try{let z=await v(B);q.diskEntries[G]=z.length;for(let I of z){let O=R(B,I),J=await A(O);q.totalSizeMB+=J.size/1048576}}catch{}}return q}async function d(b=T){let q=0,G=b.maxAge*24*60*60*1000;for(let B of["image","video"]){let z=R(b.directory,B);try{let I=await v(z);for(let O of I){let J=R(z,O);try{let N=await $(J,"utf-8"),Q=JSON.parse(N);if(Date.now()-Q.createdAt>G)await W(J),L.delete(Q.key),q++}catch{await W(J).catch(()=>{}),q++}}}catch{}}return q}
3
+ export{T as Hk,F as Ik,k as Jk,D as Kk,P as Lk,u as Mk,d as Nk};
@@ -0,0 +1,2 @@
1
+ // @bun
2
+ export{O as Tg};
@@ -1,3 +1,3 @@
1
1
  // @bun
2
2
  import{Broadcast as D,BroadcastServer as U}from"ts-broadcasting";import{channel as b}from"ts-broadcasting";import{Broadcast as N,BroadcastServer as p}from"ts-broadcasting";var z=null,H=[];function X(){return z}async function Y(j){if(z)return z;let k=j.driver??"bun",q=j.host??"0.0.0.0",G=j.port??6001,J=j.scheme??"ws",E={verbose:j.verbose??!1,driver:k,default:k,connections:{[k]:{driver:k,host:q,port:G,scheme:J}}};return z=new U(E),D.setServer(z),await z.start(),z}async function Z(){for(let j of H)clearInterval(j);if(H.length=0,!z)return;await z.stop(),z=null}async function $(j){let k=await import(j),q=k.default??k;if(typeof q!=="function")throw Error(`routes/channels.ts must export a default function, got ${typeof q}`);let G=0;return q({channel(E,A){if(G++,A.authorize&&z)z.channels.channel(E,A.authorize);if(A.interval&&A.data){let L=A.event??`${E}.updated`,M=A.data,Q=setInterval(async()=>{try{let T=await M();V(E,L,T)}catch{}},A.interval);H.push(Q)}}}),G}var K=!1;function F(){if(z)return!0;if(!K)K=!0,console.warn("[stx] broadcast() called before server started \u2014 messages will be sent once broadcasting is ready");return!1}function V(j,k,q){if(!F())return;D.send(j,k,q)}function x(j,k,q){if(!F())return;D.toUser(j,k,q)}function C(j,k,q){if(!F())return;D.toUsers(j,k,q)}function S(j,k,q){if(!F())return;D.send(`private-${j}`,k,q)}function w(j,k,q){if(!F())return;D.presence(j,k,q)}
3
- export{X as Mp,Y as Np,Z as Op,$ as Pp,V as Qp,x as Rp,C as Sp,S as Tp,w as Up,b as Vp,N as Wp,p as Xp};
3
+ export{X as Np,Y as Op,Z as Pp,$ as Qp,V as Rp,x as Sp,C as Tp,S as Up,w as Vp,b as Wp,N as Xp,p as Yp};
@@ -1,3 +1,3 @@
1
1
  // @bun
2
- import{Qs as $}from"./chunk-1xz0w746.js";import{py as Z}from"./chunk-zen6ax1y.js";import{Ry as Y}from"./chunk-27zsyhrd.js";import{uz as _}from"./chunk-w3b6m427.js";function A(L,K){let H={},B=L.trim();if(B.startsWith("{"))B=B.slice(1);if(B.endsWith("}"))B=B.slice(0,-1);if(B=B.trim(),!B)return H;let z=0;while(z<B.length){while(z<B.length&&/\s/.test(B[z]))z++;if(z>=B.length)break;let I="";if(B[z]==='"'||B[z]==="'"){let F=B[z];z++;while(z<B.length&&B[z]!==F)if(B[z]==="\\"&&z+1<B.length)I+=B[z+1],z+=2;else I+=B[z],z++;z++}else while(z<B.length&&/[\w$]/.test(B[z]))I+=B[z],z++;while(z<B.length&&/\s/.test(B[z]))z++;if(B[z]===":")z++;while(z<B.length&&/\s/.test(B[z]))z++;let G,Q=z;if(B[z]==='"'||B[z]==="'"){let F=B[z];z++;let M="";while(z<B.length&&B[z]!==F)if(B[z]==="\\"&&z+1<B.length)M+=B[z+1],z+=2;else M+=B[z],z++;z++,G=M}else if(B[z]==="{"){let F=1;z++;while(z<B.length&&F>0){if(B[z]==="{")F++;else if(B[z]==="}")F--;else if(B[z]==='"'||B[z]==="'"){let J=B[z];z++;while(z<B.length&&B[z]!==J){if(B[z]==="\\")z++;z++}}z++}let M=B.slice(Q,z);G=A(M,K)}else if(B[z]==="["){let F=1;z++;while(z<B.length&&F>0){if(B[z]==="[")F++;else if(B[z]==="]")F--;else if(B[z]==='"'||B[z]==="'"){let J=B[z];z++;while(z<B.length&&B[z]!==J){if(B[z]==="\\")z++;z++}}z++}let M=B.slice(Q,z);try{G=JSON.parse(M.replace(/'/g,'"'))}catch{G=M}}else{let F="";while(z<B.length&&B[z]!==","&&!/\s/.test(B[z]))F+=B[z],z++;if(F=F.trim(),F==="true")G=!0;else if(F==="false")G=!1;else if(F==="null")G=null;else if(F==="undefined")G=void 0;else if(/^-?\d+(\.\d+)?$/.test(F))G=Number(F);else if(F in K)G=K[F];else G=F}if(I)H[I]=G;while(z<B.length&&/\s/.test(B[z]))z++;if(B[z]===",")z++}return H}function D(L,K,H){let B=[];for(let[z,I]of Object.entries(K)){let G=L[z];if(I.required&&(G===void 0||G===null)){B.push(`Component "${H}": Missing required prop "${z}"`);continue}if(G===void 0||G===null)continue;let Q=Array.isArray(I.type)?I.type:[I.type];if(!Q.includes("any")){let F=O(G);if(!Q.includes(F))B.push(`Component "${H}": Prop "${z}" expected ${Q.join(" | ")}, got ${F}`)}if(I.validator&&!I.validator(G))B.push(`Component "${H}": Prop "${z}" failed custom validation`)}return B}function T(L,K){let H={...L};for(let[B,z]of Object.entries(K))if(H[B]===void 0&&z.default!==void 0)H[B]=typeof z.default==="function"?z.default():z.default;return H}function O(L){if(Array.isArray(L))return"array";if(L===null)return"null";return typeof L}var R={name:"component",handler:async(L,K,H,B)=>{if(K.length<1)return Z("Component","component directive requires at least the component name",Y.INVALID_DIRECTIVE_SYNTAX);let z=K[0].replace(/['"]/g,""),I={};if(K.length>1)try{let J=K.slice(1).join(",").trim();if(J.startsWith("{")){if(I=_(J,H),Object.keys(I).length===0)I=A(J,H)}else{let U=J.trim(),X=H[U];if(X&&typeof X==="object"&&!Array.isArray(X))I=X}}catch(J){let U=J instanceof Error?J.message:String(J);return console.error("Component props parsing error:",U),Z("Component",`Error parsing component props: ${U}`,Y.EVALUATION_ERROR)}let G=H.__stx_options||{},Q=G.componentsDir||"components",F=new Set;if(!H.__processedComponents)H.__processedComponents=new Set;let M=H.__processedComponents;try{return await $(z,I,"",Q,H,B,G,M,F)}catch(J){console.error("Component rendering error:",J);let U=J instanceof Error?J.message:String(J);return Z("Component",`Error rendering component: ${U}`,Y.COMPONENT_RENDER_ERROR)}},hasEndTag:!1};function q(){return[R]}
3
- export{D as fp,T as gp,R as hp,q as ip};
2
+ import{Rs as $}from"./chunk-w01y57f5.js";import{ry as Z}from"./chunk-jjvp4t5w.js";import{Ty as Y}from"./chunk-cz25azze.js";import{wz as _}from"./chunk-adqh2m9z.js";function A(L,K){let H={},B=L.trim();if(B.startsWith("{"))B=B.slice(1);if(B.endsWith("}"))B=B.slice(0,-1);if(B=B.trim(),!B)return H;let z=0;while(z<B.length){while(z<B.length&&/\s/.test(B[z]))z++;if(z>=B.length)break;let I="";if(B[z]==='"'||B[z]==="'"){let F=B[z];z++;while(z<B.length&&B[z]!==F)if(B[z]==="\\"&&z+1<B.length)I+=B[z+1],z+=2;else I+=B[z],z++;z++}else while(z<B.length&&/[\w$]/.test(B[z]))I+=B[z],z++;while(z<B.length&&/\s/.test(B[z]))z++;if(B[z]===":")z++;while(z<B.length&&/\s/.test(B[z]))z++;let G,Q=z;if(B[z]==='"'||B[z]==="'"){let F=B[z];z++;let M="";while(z<B.length&&B[z]!==F)if(B[z]==="\\"&&z+1<B.length)M+=B[z+1],z+=2;else M+=B[z],z++;z++,G=M}else if(B[z]==="{"){let F=1;z++;while(z<B.length&&F>0){if(B[z]==="{")F++;else if(B[z]==="}")F--;else if(B[z]==='"'||B[z]==="'"){let J=B[z];z++;while(z<B.length&&B[z]!==J){if(B[z]==="\\")z++;z++}}z++}let M=B.slice(Q,z);G=A(M,K)}else if(B[z]==="["){let F=1;z++;while(z<B.length&&F>0){if(B[z]==="[")F++;else if(B[z]==="]")F--;else if(B[z]==='"'||B[z]==="'"){let J=B[z];z++;while(z<B.length&&B[z]!==J){if(B[z]==="\\")z++;z++}}z++}let M=B.slice(Q,z);try{G=JSON.parse(M.replace(/'/g,'"'))}catch{G=M}}else{let F="";while(z<B.length&&B[z]!==","&&!/\s/.test(B[z]))F+=B[z],z++;if(F=F.trim(),F==="true")G=!0;else if(F==="false")G=!1;else if(F==="null")G=null;else if(F==="undefined")G=void 0;else if(/^-?\d+(\.\d+)?$/.test(F))G=Number(F);else if(F in K)G=K[F];else G=F}if(I)H[I]=G;while(z<B.length&&/\s/.test(B[z]))z++;if(B[z]===",")z++}return H}function D(L,K,H){let B=[];for(let[z,I]of Object.entries(K)){let G=L[z];if(I.required&&(G===void 0||G===null)){B.push(`Component "${H}": Missing required prop "${z}"`);continue}if(G===void 0||G===null)continue;let Q=Array.isArray(I.type)?I.type:[I.type];if(!Q.includes("any")){let F=O(G);if(!Q.includes(F))B.push(`Component "${H}": Prop "${z}" expected ${Q.join(" | ")}, got ${F}`)}if(I.validator&&!I.validator(G))B.push(`Component "${H}": Prop "${z}" failed custom validation`)}return B}function T(L,K){let H={...L};for(let[B,z]of Object.entries(K))if(H[B]===void 0&&z.default!==void 0)H[B]=typeof z.default==="function"?z.default():z.default;return H}function O(L){if(Array.isArray(L))return"array";if(L===null)return"null";return typeof L}var R={name:"component",handler:async(L,K,H,B)=>{if(K.length<1)return Z("Component","component directive requires at least the component name",Y.INVALID_DIRECTIVE_SYNTAX);let z=K[0].replace(/['"]/g,""),I={};if(K.length>1)try{let J=K.slice(1).join(",").trim();if(J.startsWith("{")){if(I=_(J,H),Object.keys(I).length===0)I=A(J,H)}else{let U=J.trim(),X=H[U];if(X&&typeof X==="object"&&!Array.isArray(X))I=X}}catch(J){let U=J instanceof Error?J.message:String(J);return console.error("Component props parsing error:",U),Z("Component",`Error parsing component props: ${U}`,Y.EVALUATION_ERROR)}let G=H.__stx_options||{},Q=G.componentsDir||"components",F=new Set;if(!H.__processedComponents)H.__processedComponents=new Set;let M=H.__processedComponents;try{return await $(z,I,"",Q,H,B,G,M,F)}catch(J){console.error("Component rendering error:",J);let U=J instanceof Error?J.message:String(J);return Z("Component",`Error rendering component: ${U}`,Y.COMPONENT_RENDER_ERROR)}},hasEndTag:!1};function q(){return[R]}
3
+ export{D as gp,T as hp,R as ip,q as jp};
@@ -1,3 +1,3 @@
1
1
  // @bun
2
- import{tr as y}from"./chunk-1xz0w746.js";import{qz as F,vz as V}from"./chunk-w3b6m427.js";function R(j,z){let J=1,q=z,G="<template",U="</template";while(q<j.length&&J>0){let Q=j.indexOf("<",q);if(Q===-1)break;if(q=Q,j.startsWith(G,q)&&(q+G.length>=j.length||/[\s>\/]/.test(j[q+G.length]))){J++,q+=G.length;continue}if(j.startsWith(U,q)){let W=j.indexOf(">",q+U.length);if(W!==-1){if(J--,J===0)return W+1;q=W+1;continue}}q++}return J===0?q:-1}function w(j){let z={default:"",named:new Map},J=j,q=/<template\s+(?:#([a-zA-Z][\w-]*)|v-slot:([a-zA-Z][\w-]*)|slot="([a-zA-Z][\w-]*)")(?:\s*=\s*"([^"]*)")?[^>]*>/gi,G=[],U;while((U=q.exec(j))!==null){let[X,Z,K,I,L]=U,$=Z||K||I,O=U.index+X.length,H=R(j,O);if(H!==-1){let B=j.slice(O,H-11).trim();G.push({start:U.index,end:H,slotName:$,content:B,propsBinding:L||void 0}),z.named.set($,{name:$,content:B,propsBinding:L||void 0})}}G.sort((X,Z)=>Z.start-X.start);for(let X of G)J=J.slice(0,X.start)+J.slice(X.end);let Q=[],W=/<([a-zA-Z][a-zA-Z0-9-]*)\b([^>]*?)\bslot="([^"]+)"([^>]*)>([\s\S]*?)<\/\1>/gi,Y;while((Y=W.exec(J))!==null){let[X,Z,K,I,L,$]=Y,O=K.replace(/\s*slot="[^"]*"\s*/," ").trimEnd(),H=L.replace(/\s*slot="[^"]*"\s*/," ").trimEnd(),B=(O+H).trim(),D=`<${Z}${B?" "+B:""}>${$}</${Z}>`;Q.push({start:Y.index,end:Y.index+X.length,slotName:I,element:D})}let _=/<([a-zA-Z][a-zA-Z0-9-]*)\b([^>]*?)\bslot="([^"]+)"([^>]*?)\/>/gi;while((Y=_.exec(J))!==null){let[X,Z,K,I,L]=Y,$=K.replace(/\s*slot="[^"]*"\s*/," ").trimEnd(),O=L.replace(/\s*slot="[^"]*"\s*/," ").trimEnd(),H=($+O).trim(),B=`<${Z}${H?" "+H:""} />`;Q.push({start:Y.index,end:Y.index+X.length,slotName:I,element:B})}Q.sort((X,Z)=>Z.start-X.start);for(let X of Q){let Z=z.named.get(X.slotName);if(Z)Z.content+=X.element;else z.named.set(X.slotName,{name:X.slotName,content:X.element});J=J.slice(0,X.start)+J.slice(X.end)}return z.default=J.trim(),z}function S(j){let z=j.match(/name\s*=\s*["']([^"']+)["']/),J=z?z[1]:"",q={},G=/:([a-zA-Z][\w-]*)\s*=\s*["']([^"']+)["']/g,U;while((U=G.exec(j))!==null)q[U[1]]=U[2];let Q=j.match(/<slot[^>]*>([\s\S]*?)<\/slot>/i),W=Q?Q[1].trim():"";return{name:J,props:q,defaultContent:W}}async function b(j,z,J,q){if(!j)return J;let G=j.content;if(j.propsBinding&&Object.keys(z).length>0){let U=j.propsBinding.trim(),Q={...q};if(U.startsWith("{")&&U.endsWith("}")){let W=U.slice(1,-1).split(",").map((Y)=>Y.trim()).filter(Boolean);for(let Y of W){let[_,X]=Y.split(":").map((K)=>K.trim()),Z=X||_;if(z[_]!==void 0)Q[Z]=z[_]}}else Q[U]=z;G=N(G,Q)}return G}function N(j,z){return j.replace(/\{\{\s*([^}]+)\s*\}\}/g,(J,q)=>{try{let G=q.trim(),U=P(G,z);return y(String(U??""))}catch{return`{{ ${q} }}`}})}function P(j,z){if(/^[a-zA-Z_$][\w$]*(\.[a-zA-Z_$][\w$]*)*$/.test(j)){let q=j.split("."),G=z;for(let U of q)if(G&&typeof G==="object"&&U in G)G=G[U];else return;return G}let J=j.match(/^([a-zA-Z_$][\w$]*)\s*([+\-*/])\s*(\d+)$/);if(J){let[,q,G,U]=J,Q=z[q],W=parseInt(U,10);if(typeof Q==="number")switch(G){case"+":return Q+W;case"-":return Q-W;case"*":return Q*W;case"/":return Q/W}}try{if(!F(j))return;return V(j,Object.keys(z))(...Object.values(z))}catch{return}}async function k(j,z,J){let q=j;q=await E(q,/<slot\s+name\s*=\s*["']([^"']+)["']([^>]*?)(?:\/>|>([\s\S]*?)<\/slot>)/gi,async(Q,W,Y,_)=>{let X=z.named.get(W),Z=_?.trim()||"",K=Y||"",I={},L=/:([a-zA-Z_$][\w$-]*)\s*=\s*["']([^"']+)["']/g,$;while(($=L.exec(K))!==null){let O=$[1],H=$[2];I[O]=P(H,J)}return await b(X,I,Z,J)});let U=/<slot\s*(?:\/>|>([\s\S]*?)<\/slot>)/gi;return q=q.replace(U,(Q,W)=>{if(Q.includes("name="))return Q;let Y=W?.trim()||"";return z.default||Y}),q}async function E(j,z,J){let q=[],G=[];j.replace(z,(W,...Y)=>{let _=Y[Y.length-2];return G.push({match:W,index:_}),q.push(J(W,...Y.slice(0,-2))),W});let U=await Promise.all(q),Q=j;for(let W=G.length-1;W>=0;W--){let{match:Y,index:_}=G[W];Q=Q.slice(0,_)+U[W]+Q.slice(_+Y.length)}return Q}function T(j){let z=w(j);return{defaultSlot:z.default,namedSlots:z.named}}async function M(j,z,J,q){return await k(j,{default:z,named:J},q)}
3
- export{w as jg,S as kg,b as lg,k as mg,T as ng,M as og};
2
+ import{ur as y}from"./chunk-w01y57f5.js";import{sz as F,xz as V}from"./chunk-adqh2m9z.js";function R(j,z){let J=1,q=z,G="<template",U="</template";while(q<j.length&&J>0){let Q=j.indexOf("<",q);if(Q===-1)break;if(q=Q,j.startsWith(G,q)&&(q+G.length>=j.length||/[\s>\/]/.test(j[q+G.length]))){J++,q+=G.length;continue}if(j.startsWith(U,q)){let W=j.indexOf(">",q+U.length);if(W!==-1){if(J--,J===0)return W+1;q=W+1;continue}}q++}return J===0?q:-1}function w(j){let z={default:"",named:new Map},J=j,q=/<template\s+(?:#([a-zA-Z][\w-]*)|v-slot:([a-zA-Z][\w-]*)|slot="([a-zA-Z][\w-]*)")(?:\s*=\s*"([^"]*)")?[^>]*>/gi,G=[],U;while((U=q.exec(j))!==null){let[X,Z,K,I,L]=U,$=Z||K||I,O=U.index+X.length,H=R(j,O);if(H!==-1){let B=j.slice(O,H-11).trim();G.push({start:U.index,end:H,slotName:$,content:B,propsBinding:L||void 0}),z.named.set($,{name:$,content:B,propsBinding:L||void 0})}}G.sort((X,Z)=>Z.start-X.start);for(let X of G)J=J.slice(0,X.start)+J.slice(X.end);let Q=[],W=/<([a-zA-Z][a-zA-Z0-9-]*)\b([^>]*?)\bslot="([^"]+)"([^>]*)>([\s\S]*?)<\/\1>/gi,Y;while((Y=W.exec(J))!==null){let[X,Z,K,I,L,$]=Y,O=K.replace(/\s*slot="[^"]*"\s*/," ").trimEnd(),H=L.replace(/\s*slot="[^"]*"\s*/," ").trimEnd(),B=(O+H).trim(),D=`<${Z}${B?" "+B:""}>${$}</${Z}>`;Q.push({start:Y.index,end:Y.index+X.length,slotName:I,element:D})}let _=/<([a-zA-Z][a-zA-Z0-9-]*)\b([^>]*?)\bslot="([^"]+)"([^>]*?)\/>/gi;while((Y=_.exec(J))!==null){let[X,Z,K,I,L]=Y,$=K.replace(/\s*slot="[^"]*"\s*/," ").trimEnd(),O=L.replace(/\s*slot="[^"]*"\s*/," ").trimEnd(),H=($+O).trim(),B=`<${Z}${H?" "+H:""} />`;Q.push({start:Y.index,end:Y.index+X.length,slotName:I,element:B})}Q.sort((X,Z)=>Z.start-X.start);for(let X of Q){let Z=z.named.get(X.slotName);if(Z)Z.content+=X.element;else z.named.set(X.slotName,{name:X.slotName,content:X.element});J=J.slice(0,X.start)+J.slice(X.end)}return z.default=J.trim(),z}function S(j){let z=j.match(/name\s*=\s*["']([^"']+)["']/),J=z?z[1]:"",q={},G=/:([a-zA-Z][\w-]*)\s*=\s*["']([^"']+)["']/g,U;while((U=G.exec(j))!==null)q[U[1]]=U[2];let Q=j.match(/<slot[^>]*>([\s\S]*?)<\/slot>/i),W=Q?Q[1].trim():"";return{name:J,props:q,defaultContent:W}}async function b(j,z,J,q){if(!j)return J;let G=j.content;if(j.propsBinding&&Object.keys(z).length>0){let U=j.propsBinding.trim(),Q={...q};if(U.startsWith("{")&&U.endsWith("}")){let W=U.slice(1,-1).split(",").map((Y)=>Y.trim()).filter(Boolean);for(let Y of W){let[_,X]=Y.split(":").map((K)=>K.trim()),Z=X||_;if(z[_]!==void 0)Q[Z]=z[_]}}else Q[U]=z;G=N(G,Q)}return G}function N(j,z){return j.replace(/\{\{\s*([^}]+)\s*\}\}/g,(J,q)=>{try{let G=q.trim(),U=P(G,z);return y(String(U??""))}catch{return`{{ ${q} }}`}})}function P(j,z){if(/^[a-zA-Z_$][\w$]*(\.[a-zA-Z_$][\w$]*)*$/.test(j)){let q=j.split("."),G=z;for(let U of q)if(G&&typeof G==="object"&&U in G)G=G[U];else return;return G}let J=j.match(/^([a-zA-Z_$][\w$]*)\s*([+\-*/])\s*(\d+)$/);if(J){let[,q,G,U]=J,Q=z[q],W=parseInt(U,10);if(typeof Q==="number")switch(G){case"+":return Q+W;case"-":return Q-W;case"*":return Q*W;case"/":return Q/W}}try{if(!F(j))return;return V(j,Object.keys(z))(...Object.values(z))}catch{return}}async function k(j,z,J){let q=j;q=await E(q,/<slot\s+name\s*=\s*["']([^"']+)["']([^>]*?)(?:\/>|>([\s\S]*?)<\/slot>)/gi,async(Q,W,Y,_)=>{let X=z.named.get(W),Z=_?.trim()||"",K=Y||"",I={},L=/:([a-zA-Z_$][\w$-]*)\s*=\s*["']([^"']+)["']/g,$;while(($=L.exec(K))!==null){let O=$[1],H=$[2];I[O]=P(H,J)}return await b(X,I,Z,J)});let U=/<slot\s*(?:\/>|>([\s\S]*?)<\/slot>)/gi;return q=q.replace(U,(Q,W)=>{if(Q.includes("name="))return Q;let Y=W?.trim()||"";return z.default||Y}),q}async function E(j,z,J){let q=[],G=[];j.replace(z,(W,...Y)=>{let _=Y[Y.length-2];return G.push({match:W,index:_}),q.push(J(W,...Y.slice(0,-2))),W});let U=await Promise.all(q),Q=j;for(let W=G.length-1;W>=0;W--){let{match:Y,index:_}=G[W];Q=Q.slice(0,_)+U[W]+Q.slice(_+Y.length)}return Q}function T(j){let z=w(j);return{defaultSlot:z.default,namedSlots:z.named}}async function M(j,z,J,q){return await k(j,{default:z,named:J},q)}
3
+ export{w as gg,S as hg,b as ig,k as jg,T as kg,M as lg};
@@ -1,3 +1,3 @@
1
1
  // @bun
2
2
  var nk={enabled:!0,image:{enabled:!0,defaultWidths:[320,480,640,768,1024,1280,1536,1920],defaultFormats:["avif","webp","jpeg"],defaultQuality:80,placeholderStrategy:"thumbhash",lazyByDefault:!0,enableDpr:!0,defaultDpr:[1,2,3]},video:{enabled:!0,lazyByDefault:!0,defaultControls:!0},upload:{enabled:!0,maxSize:10485760,allowedTypes:["image/*","video/*","audio/*","application/pdf"],maxConcurrent:3},protected:{enabled:!0,expirationSeconds:3600,batchSize:10},cache:{enabled:!0,directory:".stx/media-cache",maxAge:30,maxSize:500}};
3
- export{nk as wj};
3
+ export{nk as tj};
@@ -1,3 +1,3 @@
1
1
  // @bun
2
- import{$x as p,Zx as l,by as c,dy as a}from"./chunk-r5m9xtm7.js";import{py as x}from"./chunk-zen6ax1y.js";import{Ry as P}from"./chunk-27zsyhrd.js";import{jz as f}from"./chunk-qvrbjpdc.js";import{pz as v,qz as m,vz as h}from"./chunk-w3b6m427.js";function o(G,K,q){let H=G,T=!0;while(T){T=!1;let $=H.match(/@switch\s*\(/);if(!$||$.index===void 0)break;let j=$.index,J=a(H,j);if(!J)break;try{let U;if(m(J.expression))U=h(J.expression,Object.keys(K))(...Object.values(K));else U=v(J.expression,K);let Y="",W=!1;for(let X of J.cases)if(X.type==="default"){if(!W)Y=X.content.trim()}else try{let F;if(X.value&&m(X.value))F=h(X.value,Object.keys(K))(...Object.values(K));else if(X.value)F=v(X.value,K);if(U===F){Y=X.content.trim(),W=!0;break}}catch{continue}H=H.substring(0,j)+Y+H.substring(J.end),T=!0}catch(U){let Y=U instanceof Error?U.message:String(U),W=x("Switch",`Error evaluating @switch expression: ${Y}`,P.EVALUATION_ERROR);H=H.substring(0,j)+W+H.substring(J.end);break}}return H}function KH(G,K,q){let H=G;H=o(H,K,q);{let $=!0;while($){$=!1;let j=H.match(/@unless\s*\(/);if(!j||j.index===void 0)break;let J=j.index,U=l(H,J+7);if(!U)break;let Y=U.endPos,W=p(H,"unless","endunless",Y);if(W===-1){console.warn(`[stx] @unless directive at position ${J} has no matching @endunless \u2014 the block was skipped. Check for typos or missing closers.`);break}let X=H.slice(Y,W),F=U.expression,O=-1;{let z=0,Q=/@(?:if|unless)\s*\(/g,_=/@(?:endif|endunless)(?![a-z])/g,V=/@else(?![a-z])/g,w=[],B;while((B=Q.exec(X))!==null)w.push({pos:B.index,type:"open"});while((B=_.exec(X))!==null)w.push({pos:B.index,type:"close"});while((B=V.exec(X))!==null)w.push({pos:B.index,type:"else"});w.sort((N,L)=>N.pos-L.pos);for(let N of w)if(N.type==="open")z++;else if(N.type==="close")z--;else if(N.type==="else"&&z===0){O=N.pos;break}}let Z;if(O!==-1){let z=X.slice(0,O),Q=X.slice(O+5);Z=`@if (${F})${Q}@else ${z}@endif`}else Z=`@if (!(${F}))${X}@endif`;H=H.substring(0,J)+Z+H.substring(W+10),$=!0}}H=s(H,K,q),H=n(H,K,q),H=r(H,K);let T=()=>{let $=c(H);if($.length===0)return!1;for(let j=$.length-1;j>=0;j--){let J=$[j];try{let U="",Y=!1;for(let W of J.branches){if(Y)break;if(W.type==="else")U=W.content,Y=!0;else try{let X;if(W.condition&&m(W.condition))X=h(W.condition,Object.keys(K))(...Object.values(K));else if(W.condition)X=v(W.condition,K);if(X)U=W.content,Y=!0}catch(X){U=x(W.type==="if"?"If":"Elseif",`Error in @${W.type}(${W.condition}): ${X instanceof Error?X.message:String(X)}`,P.EVALUATION_ERROR),Y=!0}}H=H.substring(0,J.start)+U+H.substring(J.end)}catch(U){let Y=U instanceof Error?U.message:String(U),W=x("If",`Error processing @if block: ${Y}`,P.EVALUATION_ERROR);H=H.substring(0,J.start)+W+H.substring(J.end)}}return!0};while(!0){let $=H;if(!T())break;if(H===$)break}return H}function u(G){let K=0;while(K<G.length&&/\s/.test(G[K]))K++;if(G[K]!=="(")return null;K++;while(K<G.length&&/\s/.test(G[K]))K++;let q=G[K];if(q!=="'"&&q!=='"')return null;K++;let H=[];while(K<G.length){let T=G[K];if(T==="\\"&&K+1<G.length){H.push(G[K+1]),K+=2;continue}if(T===q){K++;break}H.push(T),K++}while(K<G.length&&/\s/.test(G[K]))K++;if(G[K]!==")")return null;return K++,{value:H.join(""),consumed:K}}function r(G,K){let q=G;function H(J,U,Y,W){let X=1,F=W,O=new RegExp(`@${U}(?:\\s*\\(|\\s|$)`,"g"),Z=new RegExp(`@${Y}(?![a-z])`,"g");while(F<J.length&&X>0){O.lastIndex=F,Z.lastIndex=F;let z=O.exec(J),Q=Z.exec(J),_=z?z.index:1/0,V=Q?Q.index:1/0;if(_<V)X++,F=_+z[0].length;else if(V<1/0){if(X--,X===0)return V;F=V+Q[0].length}else break}return-1}function T(J,U,Y){let W=0,X=new RegExp(`@${U}(?:\\s*\\(|\\s|$)`,"g"),F=new RegExp(`@${Y}(?![a-z])`,"g"),O=/@else(?![a-z])/g,Z=[],z;while((z=X.exec(J))!==null)Z.push({pos:z.index,type:"open"});while((z=F.exec(J))!==null)Z.push({pos:z.index,type:"close"});while((z=O.exec(J))!==null)Z.push({pos:z.index,type:"else"});Z.sort((Q,_)=>Q.pos-_.pos);for(let Q of Z)if(Q.type==="open")W++;else if(Q.type==="close")W--;else if(Q.type==="else"&&W===0)return Q.pos;return-1}{let J=!0;while(J){J=!1;let U=q.match(/@auth(?:\s*\(|\s|(?=\n))/);if(!U||U.index===void 0)break;let Y=U.index,W,X,F=q.slice(Y+5),O=u(F);if(O)W=O.value,X=Y+5+O.consumed;else X=Y+5;let Z=H(q,"auth","endauth",X);if(Z===-1){console.warn(`[stx] @auth directive at position ${Y} has no matching @endauth \u2014 the block was skipped.`);break}let z=q.slice(X,Z),Q=T(z,"auth","endauth"),_;if(!K.auth)_=!1;else _=W?f(`auth?.check && auth?.user?.[${W}]`,K):f("auth?.check",K);let V;if(Q!==-1){let w=z.slice(0,Q),B=z.slice(Q+5);V=_?w:B}else V=_?z:"";q=q.substring(0,Y)+V+q.substring(Z+8),J=!0}}{let J=!0;while(J){J=!1;let U=q.match(/@guest(?:\s*\(|\s|(?=\n))/);if(!U||U.index===void 0)break;let Y=U.index,W,X,F=q.slice(Y+6),O=u(F);if(O)W=O.value,X=Y+6+O.consumed;else X=Y+6;let Z=H(q,"guest","endguest",X);if(Z===-1){console.warn(`[stx] @guest directive at position ${Y} has no matching @endguest \u2014 the block was skipped.`);break}let z=q.slice(X,Z),Q=T(z,"guest","endguest"),_;if(!K.auth)_=!0;else _=W?f(`!auth?.check || !auth?.user?.[${W}]`,K):f("!auth?.check",K);let V;if(Q!==-1){let w=z.slice(0,Q),B=z.slice(Q+5);V=_?w:B}else V=_?z:"";q=q.substring(0,Y)+V+q.substring(Z+9),J=!0}}function $(J,U,Y){if(K.userCan&&typeof K.userCan[J]==="boolean")return K.userCan[J];if(K.permissions?.check&&typeof K.permissions.check==="function")try{let W=[J];if(U)W.push(U);if(Y){let X=f(Y,K);W.push(X)}return K.permissions.check(...W)}catch{return!1}return!1}function j(J){let U=J.match(/^\s*\(\s*'([^']*)'(?:,\s*'([^']*)')?(?:,\s*([^)]*))?\)/);if(!U)return null;return{ability:U[1],type:U[2],id:U[3]?.trim(),paramsEnd:U[0].length}}for(let J of["can","cannot"]){let U=`end${J}`,Y=J==="can"?"elsecan":"elsecannot",W=!0;while(W){W=!1;let X=q.match(new RegExp(`@${J}\\s*\\(`));if(!X||X.index===void 0)break;let F=X.index,O=q.slice(F+`@${J}`.length),Z=j(O);if(!Z)break;let z=F+`@${J}`.length+Z.paramsEnd,Q=H(q,J,U,z);if(Q===-1){console.warn(`[stx] @${J} directive at position ${F} has no matching @${U} \u2014 the block was skipped.`);break}let _=q.slice(z,Q),V=[],w=0,B=new RegExp(`@${J}\\s*\\(`,"g"),N=new RegExp(`@${U}(?![a-z])`,"g"),L=new RegExp(`@${Y}\\s*\\(`,"g"),D=/@else(?![a-z])/g,M=[],k;while((k=B.exec(_))!==null)M.push({pos:k.index,type:"open"});while((k=N.exec(_))!==null)M.push({pos:k.index,type:"close"});while((k=L.exec(_))!==null)M.push({pos:k.index,type:"elseDirective"});while((k=D.exec(_))!==null)M.push({pos:k.index,type:"else"});M.sort((A,I)=>A.pos-I.pos);for(let A of M){if(A.type==="open"){w++;continue}if(A.type==="close"){w--;continue}if(w===0)V.push(A)}let R=[],b=0;for(let A=0;A<V.length;A++){let I=V[A];if(R.push({content:_.slice(b,I.pos),ability:void 0}),I.type==="elseDirective"){let C=_.slice(I.pos+`@${Y}`.length),E=j(C);if(E){R[R.length-1]={content:_.slice(b,I.pos)},b=I.pos+`@${Y}`.length+E.paramsEnd,R.push({content:"",ability:E.ability,type:E.type,id:E.id}),R.pop();let d=V[A+1],i=d?d.pos:_.length;R.push({content:_.slice(b,i),ability:E.ability,type:E.type,id:E.id}),b=i}}else b=I.pos+5}if(b<_.length){let A=R[R.length-1];if(V.length>0&&V[V.length-1].type==="else")R.push({content:_.slice(b),isFinalElse:!0});else if(R.length===0)R.push({content:_.slice(b)})}let y=$(Z.ability,Z.type,Z.id),S=J==="can"?y:!y,g="";if(S)g=R[0]?.content||"";else{let A=!1;for(let I=1;I<R.length;I++){let C=R[I];if(C.isFinalElse){g=C.content,A=!0;break}if(C.ability){let E=$(C.ability,C.type,C.id);if(J==="can"?E:!E){g=C.content,A=!0;break}}}if(!A&&R.length>0){let I=R[R.length-1];if(I.isFinalElse)g=I.content}}q=q.substring(0,F)+g+q.substring(Q+`@${U}`.length),W=!0}}return q}function s(G,K,q){let H=G;function T($,j,J,U,Y){let W=!0;while(W){W=!1;let X=new RegExp(`@${j}\\s*\\(`),F=$.match(X);if(!F||F.index===void 0)break;let O=F.index,Z=l($,O+`@${j}`.length);if(!Z)break;let z=Z.endPos,Q=p($,j,J,z);if(Q===-1){console.warn(`[stx] @${j} directive at position ${O} has no matching @${J} \u2014 the block was skipped.`);break}let _=$.slice(z,Q),V=Z.expression,w=-1,B=0,N=0;while(N<_.length){let L=_.indexOf("@",N);if(L===-1)break;let D=_.substring(L);if(/^@(?:if|unless|isset|empty)\s*\(/.test(D)){B++,N=L+1;continue}if(/^@(?:endif|endunless|endisset|endempty)(?![a-z])/.test(D)){B--,N=L+1;continue}if(B===0&&/^@else(?![a-z])/.test(D)){w=L;break}N=L+1}try{let L=U(V.trim()),D;if(w!==-1){let M=_.slice(0,w),k=_.slice(w+5);D=L?M:k}else D=L?_:"";$=$.substring(0,O)+D+$.substring(Q+`@${J}`.length),W=!0}catch(L){let D=L instanceof Error?L.message:String(L),M=x(Y,`Error processing @${j} directive: ${D}`,P.EVALUATION_ERROR);$=$.substring(0,O)+M+$.substring(Q+`@${J}`.length);break}}return $}return H=T(H,"isset","endisset",($)=>{let j=f($,K);return j!==void 0&&j!==null},"Isset"),H=T(H,"empty","endempty",($)=>{let j=f($,K);return j===void 0||j===null||j===""||j===0||j===!1||Array.isArray(j)&&j.length===0||typeof j==="object"&&j!==null&&Object.keys(j).length===0},"Empty"),H}function n(G,K,q){let H=G,T="development";function $(j,J,U,Y){let W=new RegExp(`@${J}(?![a-z])`,"g"),X=new RegExp(`@${U}(?![a-z])`,"g"),F=new RegExp(`^@${J}(?![a-z])`),O=new RegExp(`^@${U}(?![a-z])`),Z=j,z=!0;while(z){z=!1,W.lastIndex=0;let Q=W.exec(Z);if(!Q)break;let _=Q.index,V=_+Q[0].length;if(J==="env"){let y=Z.substring(V).match(/^\s*\(\s*(['"])([^'"]+)\1\s*\)/);if(!y)break;V+=y[0].length,Y=T===y[2]}let w=1,B=V,N=-1;while(w>0&&B<Z.length){W.lastIndex=B,X.lastIndex=B;let y=W.exec(Z),S=X.exec(Z),g=y?y.index:1/0,A=S?S.index:1/0;if(g<A)w++,B=g+y[0].length;else if(A<1/0){if(w--,w===0){N=A;break}B=A+S[0].length}else break}if(N===-1){console.warn(`[stx] @${J} directive at position ${_} has no matching @${U} \u2014 the block was skipped.`);break}let L=Z.substring(V,N),D=-1,M=0,k=0;while(k<L.length){let y=L.indexOf("@",k);if(y===-1)break;let S=L.substring(y);if(F.test(S)){M++,k=y+1;continue}if(O.test(S)){M--,k=y+1;continue}if(M===0&&/^@else(?![a-z])/.test(S)){D=y;break}k=y+1}let R;if(D!==-1){let y=L.slice(0,D),S=L.slice(D+5);R=Y?y:S}else R=Y?L:"";let b=`@${U}`.length;Z=Z.substring(0,_)+R+Z.substring(N+b),z=!0}return Z}return H=$(H,"env","endenv",!1),H=$(H,"production","endproduction",T==="production"),H=$(H,"development","enddevelopment",T==="development"),H=$(H,"staging","endstaging",T==="staging"),H=$(H,"testing","endtesting",T==="testing"),H}
3
- export{o as Px,KH as Qx,r as Rx,s as Sx,n as Tx};
2
+ import{$x as l,by as p,dy as c,fy as a}from"./chunk-yw2fzq86.js";import{ry as x}from"./chunk-jjvp4t5w.js";import{Ty as P}from"./chunk-cz25azze.js";import{lz as f}from"./chunk-hpqr9e3x.js";import{rz as v,sz as m,xz as h}from"./chunk-adqh2m9z.js";function o(G,K,q){let H=G,T=!0;while(T){T=!1;let $=H.match(/@switch\s*\(/);if(!$||$.index===void 0)break;let j=$.index,J=a(H,j);if(!J)break;try{let U;if(m(J.expression))U=h(J.expression,Object.keys(K))(...Object.values(K));else U=v(J.expression,K);let Y="",W=!1;for(let X of J.cases)if(X.type==="default"){if(!W)Y=X.content.trim()}else try{let F;if(X.value&&m(X.value))F=h(X.value,Object.keys(K))(...Object.values(K));else if(X.value)F=v(X.value,K);if(U===F){Y=X.content.trim(),W=!0;break}}catch{continue}H=H.substring(0,j)+Y+H.substring(J.end),T=!0}catch(U){let Y=U instanceof Error?U.message:String(U),W=x("Switch",`Error evaluating @switch expression: ${Y}`,P.EVALUATION_ERROR);H=H.substring(0,j)+W+H.substring(J.end);break}}return H}function KH(G,K,q){let H=G;H=o(H,K,q);{let $=!0;while($){$=!1;let j=H.match(/@unless\s*\(/);if(!j||j.index===void 0)break;let J=j.index,U=l(H,J+7);if(!U)break;let Y=U.endPos,W=p(H,"unless","endunless",Y);if(W===-1){console.warn(`[stx] @unless directive at position ${J} has no matching @endunless \u2014 the block was skipped. Check for typos or missing closers.`);break}let X=H.slice(Y,W),F=U.expression,O=-1;{let z=0,Q=/@(?:if|unless)\s*\(/g,_=/@(?:endif|endunless)(?![a-z])/g,V=/@else(?![a-z])/g,w=[],B;while((B=Q.exec(X))!==null)w.push({pos:B.index,type:"open"});while((B=_.exec(X))!==null)w.push({pos:B.index,type:"close"});while((B=V.exec(X))!==null)w.push({pos:B.index,type:"else"});w.sort((N,L)=>N.pos-L.pos);for(let N of w)if(N.type==="open")z++;else if(N.type==="close")z--;else if(N.type==="else"&&z===0){O=N.pos;break}}let Z;if(O!==-1){let z=X.slice(0,O),Q=X.slice(O+5);Z=`@if (${F})${Q}@else ${z}@endif`}else Z=`@if (!(${F}))${X}@endif`;H=H.substring(0,J)+Z+H.substring(W+10),$=!0}}H=s(H,K,q),H=n(H,K,q),H=r(H,K);let T=()=>{let $=c(H);if($.length===0)return!1;for(let j=$.length-1;j>=0;j--){let J=$[j];try{let U="",Y=!1;for(let W of J.branches){if(Y)break;if(W.type==="else")U=W.content,Y=!0;else try{let X;if(W.condition&&m(W.condition))X=h(W.condition,Object.keys(K))(...Object.values(K));else if(W.condition)X=v(W.condition,K);if(X)U=W.content,Y=!0}catch(X){U=x(W.type==="if"?"If":"Elseif",`Error in @${W.type}(${W.condition}): ${X instanceof Error?X.message:String(X)}`,P.EVALUATION_ERROR),Y=!0}}H=H.substring(0,J.start)+U+H.substring(J.end)}catch(U){let Y=U instanceof Error?U.message:String(U),W=x("If",`Error processing @if block: ${Y}`,P.EVALUATION_ERROR);H=H.substring(0,J.start)+W+H.substring(J.end)}}return!0};while(!0){let $=H;if(!T())break;if(H===$)break}return H}function u(G){let K=0;while(K<G.length&&/\s/.test(G[K]))K++;if(G[K]!=="(")return null;K++;while(K<G.length&&/\s/.test(G[K]))K++;let q=G[K];if(q!=="'"&&q!=='"')return null;K++;let H=[];while(K<G.length){let T=G[K];if(T==="\\"&&K+1<G.length){H.push(G[K+1]),K+=2;continue}if(T===q){K++;break}H.push(T),K++}while(K<G.length&&/\s/.test(G[K]))K++;if(G[K]!==")")return null;return K++,{value:H.join(""),consumed:K}}function r(G,K){let q=G;function H(J,U,Y,W){let X=1,F=W,O=new RegExp(`@${U}(?:\\s*\\(|\\s|$)`,"g"),Z=new RegExp(`@${Y}(?![a-z])`,"g");while(F<J.length&&X>0){O.lastIndex=F,Z.lastIndex=F;let z=O.exec(J),Q=Z.exec(J),_=z?z.index:1/0,V=Q?Q.index:1/0;if(_<V)X++,F=_+z[0].length;else if(V<1/0){if(X--,X===0)return V;F=V+Q[0].length}else break}return-1}function T(J,U,Y){let W=0,X=new RegExp(`@${U}(?:\\s*\\(|\\s|$)`,"g"),F=new RegExp(`@${Y}(?![a-z])`,"g"),O=/@else(?![a-z])/g,Z=[],z;while((z=X.exec(J))!==null)Z.push({pos:z.index,type:"open"});while((z=F.exec(J))!==null)Z.push({pos:z.index,type:"close"});while((z=O.exec(J))!==null)Z.push({pos:z.index,type:"else"});Z.sort((Q,_)=>Q.pos-_.pos);for(let Q of Z)if(Q.type==="open")W++;else if(Q.type==="close")W--;else if(Q.type==="else"&&W===0)return Q.pos;return-1}{let J=!0;while(J){J=!1;let U=q.match(/@auth(?:\s*\(|\s|(?=\n))/);if(!U||U.index===void 0)break;let Y=U.index,W,X,F=q.slice(Y+5),O=u(F);if(O)W=O.value,X=Y+5+O.consumed;else X=Y+5;let Z=H(q,"auth","endauth",X);if(Z===-1){console.warn(`[stx] @auth directive at position ${Y} has no matching @endauth \u2014 the block was skipped.`);break}let z=q.slice(X,Z),Q=T(z,"auth","endauth"),_;if(!K.auth)_=!1;else _=W?f(`auth?.check && auth?.user?.[${W}]`,K):f("auth?.check",K);let V;if(Q!==-1){let w=z.slice(0,Q),B=z.slice(Q+5);V=_?w:B}else V=_?z:"";q=q.substring(0,Y)+V+q.substring(Z+8),J=!0}}{let J=!0;while(J){J=!1;let U=q.match(/@guest(?:\s*\(|\s|(?=\n))/);if(!U||U.index===void 0)break;let Y=U.index,W,X,F=q.slice(Y+6),O=u(F);if(O)W=O.value,X=Y+6+O.consumed;else X=Y+6;let Z=H(q,"guest","endguest",X);if(Z===-1){console.warn(`[stx] @guest directive at position ${Y} has no matching @endguest \u2014 the block was skipped.`);break}let z=q.slice(X,Z),Q=T(z,"guest","endguest"),_;if(!K.auth)_=!0;else _=W?f(`!auth?.check || !auth?.user?.[${W}]`,K):f("!auth?.check",K);let V;if(Q!==-1){let w=z.slice(0,Q),B=z.slice(Q+5);V=_?w:B}else V=_?z:"";q=q.substring(0,Y)+V+q.substring(Z+9),J=!0}}function $(J,U,Y){if(K.userCan&&typeof K.userCan[J]==="boolean")return K.userCan[J];if(K.permissions?.check&&typeof K.permissions.check==="function")try{let W=[J];if(U)W.push(U);if(Y){let X=f(Y,K);W.push(X)}return K.permissions.check(...W)}catch{return!1}return!1}function j(J){let U=J.match(/^\s*\(\s*'([^']*)'(?:,\s*'([^']*)')?(?:,\s*([^)]*))?\)/);if(!U)return null;return{ability:U[1],type:U[2],id:U[3]?.trim(),paramsEnd:U[0].length}}for(let J of["can","cannot"]){let U=`end${J}`,Y=J==="can"?"elsecan":"elsecannot",W=!0;while(W){W=!1;let X=q.match(new RegExp(`@${J}\\s*\\(`));if(!X||X.index===void 0)break;let F=X.index,O=q.slice(F+`@${J}`.length),Z=j(O);if(!Z)break;let z=F+`@${J}`.length+Z.paramsEnd,Q=H(q,J,U,z);if(Q===-1){console.warn(`[stx] @${J} directive at position ${F} has no matching @${U} \u2014 the block was skipped.`);break}let _=q.slice(z,Q),V=[],w=0,B=new RegExp(`@${J}\\s*\\(`,"g"),N=new RegExp(`@${U}(?![a-z])`,"g"),L=new RegExp(`@${Y}\\s*\\(`,"g"),D=/@else(?![a-z])/g,M=[],k;while((k=B.exec(_))!==null)M.push({pos:k.index,type:"open"});while((k=N.exec(_))!==null)M.push({pos:k.index,type:"close"});while((k=L.exec(_))!==null)M.push({pos:k.index,type:"elseDirective"});while((k=D.exec(_))!==null)M.push({pos:k.index,type:"else"});M.sort((A,I)=>A.pos-I.pos);for(let A of M){if(A.type==="open"){w++;continue}if(A.type==="close"){w--;continue}if(w===0)V.push(A)}let R=[],b=0;for(let A=0;A<V.length;A++){let I=V[A];if(R.push({content:_.slice(b,I.pos),ability:void 0}),I.type==="elseDirective"){let C=_.slice(I.pos+`@${Y}`.length),E=j(C);if(E){R[R.length-1]={content:_.slice(b,I.pos)},b=I.pos+`@${Y}`.length+E.paramsEnd,R.push({content:"",ability:E.ability,type:E.type,id:E.id}),R.pop();let d=V[A+1],i=d?d.pos:_.length;R.push({content:_.slice(b,i),ability:E.ability,type:E.type,id:E.id}),b=i}}else b=I.pos+5}if(b<_.length){let A=R[R.length-1];if(V.length>0&&V[V.length-1].type==="else")R.push({content:_.slice(b),isFinalElse:!0});else if(R.length===0)R.push({content:_.slice(b)})}let y=$(Z.ability,Z.type,Z.id),S=J==="can"?y:!y,g="";if(S)g=R[0]?.content||"";else{let A=!1;for(let I=1;I<R.length;I++){let C=R[I];if(C.isFinalElse){g=C.content,A=!0;break}if(C.ability){let E=$(C.ability,C.type,C.id);if(J==="can"?E:!E){g=C.content,A=!0;break}}}if(!A&&R.length>0){let I=R[R.length-1];if(I.isFinalElse)g=I.content}}q=q.substring(0,F)+g+q.substring(Q+`@${U}`.length),W=!0}}return q}function s(G,K,q){let H=G;function T($,j,J,U,Y){let W=!0;while(W){W=!1;let X=new RegExp(`@${j}\\s*\\(`),F=$.match(X);if(!F||F.index===void 0)break;let O=F.index,Z=l($,O+`@${j}`.length);if(!Z)break;let z=Z.endPos,Q=p($,j,J,z);if(Q===-1){console.warn(`[stx] @${j} directive at position ${O} has no matching @${J} \u2014 the block was skipped.`);break}let _=$.slice(z,Q),V=Z.expression,w=-1,B=0,N=0;while(N<_.length){let L=_.indexOf("@",N);if(L===-1)break;let D=_.substring(L);if(/^@(?:if|unless|isset|empty)\s*\(/.test(D)){B++,N=L+1;continue}if(/^@(?:endif|endunless|endisset|endempty)(?![a-z])/.test(D)){B--,N=L+1;continue}if(B===0&&/^@else(?![a-z])/.test(D)){w=L;break}N=L+1}try{let L=U(V.trim()),D;if(w!==-1){let M=_.slice(0,w),k=_.slice(w+5);D=L?M:k}else D=L?_:"";$=$.substring(0,O)+D+$.substring(Q+`@${J}`.length),W=!0}catch(L){let D=L instanceof Error?L.message:String(L),M=x(Y,`Error processing @${j} directive: ${D}`,P.EVALUATION_ERROR);$=$.substring(0,O)+M+$.substring(Q+`@${J}`.length);break}}return $}return H=T(H,"isset","endisset",($)=>{let j=f($,K);return j!==void 0&&j!==null},"Isset"),H=T(H,"empty","endempty",($)=>{let j=f($,K);return j===void 0||j===null||j===""||j===0||j===!1||Array.isArray(j)&&j.length===0||typeof j==="object"&&j!==null&&Object.keys(j).length===0},"Empty"),H}function n(G,K,q){let H=G,T="development";function $(j,J,U,Y){let W=new RegExp(`@${J}(?![a-z])`,"g"),X=new RegExp(`@${U}(?![a-z])`,"g"),F=new RegExp(`^@${J}(?![a-z])`),O=new RegExp(`^@${U}(?![a-z])`),Z=j,z=!0;while(z){z=!1,W.lastIndex=0;let Q=W.exec(Z);if(!Q)break;let _=Q.index,V=_+Q[0].length;if(J==="env"){let y=Z.substring(V).match(/^\s*\(\s*(['"])([^'"]+)\1\s*\)/);if(!y)break;V+=y[0].length,Y=T===y[2]}let w=1,B=V,N=-1;while(w>0&&B<Z.length){W.lastIndex=B,X.lastIndex=B;let y=W.exec(Z),S=X.exec(Z),g=y?y.index:1/0,A=S?S.index:1/0;if(g<A)w++,B=g+y[0].length;else if(A<1/0){if(w--,w===0){N=A;break}B=A+S[0].length}else break}if(N===-1){console.warn(`[stx] @${J} directive at position ${_} has no matching @${U} \u2014 the block was skipped.`);break}let L=Z.substring(V,N),D=-1,M=0,k=0;while(k<L.length){let y=L.indexOf("@",k);if(y===-1)break;let S=L.substring(y);if(F.test(S)){M++,k=y+1;continue}if(O.test(S)){M--,k=y+1;continue}if(M===0&&/^@else(?![a-z])/.test(S)){D=y;break}k=y+1}let R;if(D!==-1){let y=L.slice(0,D),S=L.slice(D+5);R=Y?y:S}else R=Y?L:"";let b=`@${U}`.length;Z=Z.substring(0,_)+R+Z.substring(N+b),z=!0}return Z}return H=$(H,"env","endenv",!1),H=$(H,"production","endproduction",T==="production"),H=$(H,"development","enddevelopment",T==="development"),H=$(H,"staging","endstaging",T==="staging"),H=$(H,"testing","endtesting",T==="testing"),H}
3
+ export{o as Qx,KH as Rx,r as Sx,s as Tx,n as Ux};
@@ -1,3 +1,3 @@
1
1
  // @bun
2
- import{pz as k,qz as q,vz as y}from"./chunk-w3b6m427.js";function C(z,b){try{let j=z.trim();if(q(j))return y(j,Object.keys(b))(...Object.values(b));else return k(j,b)}catch{return!1}}
3
- export{C as jz};
2
+ import{rz as k,sz as q,xz as y}from"./chunk-adqh2m9z.js";function C(z,b){try{let j=z.trim();if(q(j))return y(j,Object.keys(b))(...Object.values(b));else return k(j,b)}catch{return!1}}
3
+ export{C as lz};
@@ -1,5 +1,5 @@
1
1
  // @bun
2
- import{pB as B}from"./chunk-xv34zbp4.js";import z from"path";async function I(b){let j=b.pwa?.offline;if(!j?.enabled)return"";if(j.page){let k=z.isAbsolute(j.page)?j.page:z.resolve(process.cwd(),j.page);if(await Bun.file(k).exists())try{let{processDirectives:q}=await import("././process.js"),x=await Bun.file(k).text();return await q(x,{},k,b,new Set)}catch(q){console.warn(`[PWA] Failed to process custom offline page: ${q}`)}else console.warn(`[PWA] Custom offline page not found: ${k}`)}return F(b)}function F(b){let j=b.pwa?.offline,k=b.pwa?.manifest,q=j?.fallbackTitle||"You are offline",x=j?.fallbackMessage||"Please check your internet connection and try again.",y=k?.themeColor||"#4f46e5",A=k?.shortName||k?.name||"App";return`<!DOCTYPE html>
2
+ import{rB as B}from"./chunk-3jm3snz8.js";import z from"path";async function I(b){let j=b.pwa?.offline;if(!j?.enabled)return"";if(j.page){let k=z.isAbsolute(j.page)?j.page:z.resolve(process.cwd(),j.page);if(await Bun.file(k).exists())try{let{processDirectives:q}=await import("././process.js"),x=await Bun.file(k).text();return await q(x,{},k,b,new Set)}catch(q){console.warn(`[PWA] Failed to process custom offline page: ${q}`)}else console.warn(`[PWA] Custom offline page not found: ${k}`)}return F(b)}function F(b){let j=b.pwa?.offline,k=b.pwa?.manifest,q=j?.fallbackTitle||"You are offline",x=j?.fallbackMessage||"Please check your internet connection and try again.",y=k?.themeColor||"#4f46e5",A=k?.shortName||k?.name||"App";return`<!DOCTYPE html>
3
3
  <html lang="en">
4
4
  <head>
5
5
  <meta charset="UTF-8">
@@ -1,3 +1,3 @@
1
1
  // @bun
2
2
  async function y(z,w,A,B){let j=w[0]?.replace(/['"]/g,"")||"main",b=q();if(j!=="main")b=b.replace("container:'main'",`container:'${j}'`);return`<script data-stx-router>${b}</script>`}var E={name:"stxRouter",handler:y,hasEndTag:!1,description:"Inject the STX SPA router script for client-side navigation"};import{getRouterScript as q}from"stx-router";
3
- export{q as Vy,y as Wy,E as Xy};
3
+ export{q as Xy,y as Yy,E as Zy};
@@ -1,3 +1,3 @@
1
1
  // @bun
2
- import{Jy as H}from"./chunk-5shey2e4.js";import{Ry as A}from"./chunk-27zsyhrd.js";import K from"path";var I={showRelativePaths:!1,enableAutoRecovery:H(),logRecoveryWarnings:!0},B={...I};function W(j){B={...B,...j}}function X(){return{...B}}function Y(){B={...I}}function L(j){if(!B.showRelativePaths||!j)return j;let q=B.baseDir||process.cwd();try{let k=K.relative(q,j);return k.startsWith("..")?j:k}catch{return j}}class G extends Error{code;filePath;line;column;context;numericCode;constructor(j,q,k,w,y,z,J){super(j);this.code=q;this.filePath=k;this.line=w;this.column=y;this.context=z;if(this.name="StxError",this.numericCode=J||A.EVALUATION_ERROR,this.filePath)this.filePath=L(this.filePath)}}class M extends G{constructor(j,q,k,w,y,z){super(j,"stx_SYNTAX_ERROR",q,k,w,y,z||A.INVALID_DIRECTIVE_SYNTAX);this.name="StxSyntaxError"}}class N extends G{constructor(j,q,k,w,y,z){super(j,"stx_RUNTIME_ERROR",q,k,w,y,z||A.EVALUATION_ERROR);this.name="StxRuntimeError"}}class O extends G{constructor(j,q,k,w,y,z){super(j,"stx_SECURITY_ERROR",q,k,w,y,z||A.UNSAFE_EXPRESSION);this.name="StxSecurityError"}}class Q extends G{constructor(j,q,k,w,y,z){super(j,"stx_FILE_ERROR",q,k,w,y,z||A.FILE_NOT_FOUND);this.name="StxFileError"}}class R extends G{isFatal=!0;constructor(j,q,k,w,y,z){super(j,"stx_VALIDATION_ERROR",q,k,w,y,z||A.DOM_API_VIOLATION);this.name="StxValidationError"}}
3
- export{W as yy,X as zy,Y as Ay,L as By,G as Cy,M as Dy,N as Ey,O as Fy,Q as Gy,R as Hy};
2
+ import{Ly as H}from"./chunk-fch9tk1k.js";import{Ty as A}from"./chunk-cz25azze.js";import K from"path";var I={showRelativePaths:!1,enableAutoRecovery:H(),logRecoveryWarnings:!0},B={...I};function W(j){B={...B,...j}}function X(){return{...B}}function Y(){B={...I}}function L(j){if(!B.showRelativePaths||!j)return j;let q=B.baseDir||process.cwd();try{let k=K.relative(q,j);return k.startsWith("..")?j:k}catch{return j}}class G extends Error{code;filePath;line;column;context;numericCode;constructor(j,q,k,w,y,z,J){super(j);this.code=q;this.filePath=k;this.line=w;this.column=y;this.context=z;if(this.name="StxError",this.numericCode=J||A.EVALUATION_ERROR,this.filePath)this.filePath=L(this.filePath)}}class M extends G{constructor(j,q,k,w,y,z){super(j,"stx_SYNTAX_ERROR",q,k,w,y,z||A.INVALID_DIRECTIVE_SYNTAX);this.name="StxSyntaxError"}}class N extends G{constructor(j,q,k,w,y,z){super(j,"stx_RUNTIME_ERROR",q,k,w,y,z||A.EVALUATION_ERROR);this.name="StxRuntimeError"}}class O extends G{constructor(j,q,k,w,y,z){super(j,"stx_SECURITY_ERROR",q,k,w,y,z||A.UNSAFE_EXPRESSION);this.name="StxSecurityError"}}class Q extends G{constructor(j,q,k,w,y,z){super(j,"stx_FILE_ERROR",q,k,w,y,z||A.FILE_NOT_FOUND);this.name="StxFileError"}}class R extends G{isFatal=!0;constructor(j,q,k,w,y,z){super(j,"stx_VALIDATION_ERROR",q,k,w,y,z||A.DOM_API_VIOLATION);this.name="StxValidationError"}}
3
+ export{W as Ay,X as By,Y as Cy,L as Dy,G as Ey,M as Fy,N as Gy,O as Hy,Q as Iy,R as Jy};