@stacksjs/stx 0.2.218 → 0.2.220

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 (184) hide show
  1. package/dist/app-shell.js +2 -1
  2. package/dist/{chunk-3twce5kp.js → chunk-02k0pg5s.js} +1 -1
  3. package/dist/{chunk-53ajah3v.js → chunk-06f65jz3.js} +2 -2
  4. package/dist/{chunk-crmk2jzf.js → chunk-08031d2g.js} +1 -1
  5. package/dist/chunk-0k12epgy.js +2 -0
  6. package/dist/{chunk-3fwn9edg.js → chunk-135mme4g.js} +1 -1
  7. package/dist/{chunk-c7pvwvse.js → chunk-1gy7fa09.js} +1 -1
  8. package/dist/{chunk-bsr7yrxh.js → chunk-1rka3ffx.js} +1 -1
  9. package/dist/chunk-1y3kc7mb.js +2 -0
  10. package/dist/chunk-20wgmax7.js +2 -0
  11. package/dist/chunk-25jkkv9d.js +2 -0
  12. package/dist/{chunk-wbq7cp57.js → chunk-2bxgan9p.js} +1 -1
  13. package/dist/{chunk-cqt6ry1e.js → chunk-2v1cj2qp.js} +1 -1
  14. package/dist/chunk-2y8ss8b3.js +2 -0
  15. package/dist/chunk-38zpyb7q.js +2 -0
  16. package/dist/{chunk-yk1smsev.js → chunk-3s3zyq5q.js} +1 -1
  17. package/dist/chunk-3zhhytkd.js +2 -0
  18. package/dist/chunk-4k5f40bb.js +2 -0
  19. package/dist/{chunk-gvm4dw6p.js → chunk-4svjne4w.js} +2 -2
  20. package/dist/{chunk-z2sp0k8d.js → chunk-4tmw4kjm.js} +1 -1
  21. package/dist/{chunk-ne8sygmy.js → chunk-4vhxtfkw.js} +1 -1
  22. package/dist/{chunk-mxqp7x07.js → chunk-4wdbmjmg.js} +2 -2
  23. package/dist/{chunk-hyrjade7.js → chunk-572ttrsj.js} +1 -1
  24. package/dist/{chunk-fvpaf9v5.js → chunk-5a5efazd.js} +2 -2
  25. package/dist/chunk-5fz9n4wq.js +3 -0
  26. package/dist/{chunk-css1sfnr.js → chunk-5y731xe9.js} +1 -1
  27. package/dist/chunk-67b47fez.js +2 -0
  28. package/dist/{chunk-8anh6d36.js → chunk-6b0xz02h.js} +1 -1
  29. package/dist/{chunk-74gc1x9x.js → chunk-6qjzx44j.js} +2 -2
  30. package/dist/{chunk-weajy31v.js → chunk-6sm1vr9h.js} +2 -2
  31. package/dist/{chunk-x8b16v5q.js → chunk-6vdn3qy0.js} +1 -1
  32. package/dist/{chunk-x13f5bbe.js → chunk-72w4hhbq.js} +1 -1
  33. package/dist/chunk-735atsqq.js +2 -0
  34. package/dist/{chunk-n8zpm7xb.js → chunk-74pjj8d0.js} +1 -1
  35. package/dist/chunk-7cq5b6zp.js +2 -0
  36. package/dist/chunk-7jhtvcy5.js +2 -0
  37. package/dist/{chunk-whxregkn.js → chunk-7ryqex47.js} +1 -1
  38. package/dist/{chunk-1nnpwrqj.js → chunk-7s3wrtpb.js} +2 -2
  39. package/dist/chunk-7x3nd6r4.js +2 -0
  40. package/dist/{chunk-m2mhtpwy.js → chunk-80qre9zp.js} +1 -1
  41. package/dist/{chunk-c0p9kf53.js → chunk-8awfakrk.js} +1 -1
  42. package/dist/{chunk-st5qggks.js → chunk-8ha8h3s1.js} +1 -1
  43. package/dist/{chunk-trtm887x.js → chunk-8rn5e39c.js} +1 -1
  44. package/dist/chunk-9ktvkzcc.js +2 -0
  45. package/dist/chunk-a4329ma8.js +30 -0
  46. package/dist/{chunk-y4hkqsgw.js → chunk-a6nnbnmb.js} +2 -2
  47. package/dist/{chunk-j3njy10j.js → chunk-ad84gwgv.js} +2 -2
  48. package/dist/{chunk-xwc4pg5w.js → chunk-anenwsj3.js} +2 -2
  49. package/dist/{chunk-khrtzbxd.js → chunk-arnse15r.js} +1 -1
  50. package/dist/chunk-bgb5a3q6.js +4 -0
  51. package/dist/chunk-bj25jvsn.js +2 -0
  52. package/dist/{chunk-fnkxbnka.js → chunk-bx766t25.js} +1 -1
  53. package/dist/{chunk-msjzqne1.js → chunk-bz9z4pfr.js} +1 -1
  54. package/dist/{chunk-yckd6ks5.js → chunk-c0n802j1.js} +1 -1
  55. package/dist/{chunk-b6jhznkh.js → chunk-cq6fsp6j.js} +1 -1
  56. package/dist/chunk-cw0352e8.js +2 -0
  57. package/dist/{chunk-q4se9rtw.js → chunk-dykhpgyx.js} +1 -1
  58. package/dist/{chunk-7md45k52.js → chunk-e890s5em.js} +2 -2
  59. package/dist/{chunk-ht51fz7w.js → chunk-efr3ejqt.js} +1 -1
  60. package/dist/{chunk-1306tswx.js → chunk-efrv1yp5.js} +1 -1
  61. package/dist/{chunk-jmnftb29.js → chunk-ejspksxd.js} +2 -2
  62. package/dist/chunk-et555kdz.js +2 -0
  63. package/dist/{chunk-7mst8kqm.js → chunk-ewdn7s6r.js} +1 -1
  64. package/dist/{chunk-hncp9gz6.js → chunk-f5cw54q3.js} +1 -1
  65. package/dist/chunk-fw5d1aev.js +18 -0
  66. package/dist/chunk-g3rg8afc.js +2 -0
  67. package/dist/{chunk-9b82d4g5.js → chunk-gnmft4dz.js} +1 -1
  68. package/dist/chunk-h7xtn6j0.js +2 -0
  69. package/dist/{chunk-rczpw37w.js → chunk-hcqzbhc1.js} +1 -1
  70. package/dist/{chunk-7zk48rd8.js → chunk-hg2ja2gj.js} +1 -1
  71. package/dist/chunk-hh2r7hrb.js +2 -0
  72. package/dist/chunk-hysfnyh4.js +2 -0
  73. package/dist/chunk-j3mw2vpt.js +2 -0
  74. package/dist/{chunk-q8szpd6w.js → chunk-jw1besrt.js} +1 -1
  75. package/dist/{chunk-3es366z4.js → chunk-k6b7gpk2.js} +1 -1
  76. package/dist/{chunk-z47tw39z.js → chunk-kdpy5rgk.js} +2 -2
  77. package/dist/{chunk-j0tfxbns.js → chunk-kvz7rg2x.js} +2 -2
  78. package/dist/{chunk-tryt2h85.js → chunk-m6damb1f.js} +1 -1
  79. package/dist/{chunk-1bvstnz4.js → chunk-mcz70xms.js} +2 -2
  80. package/dist/{chunk-y2jr10y8.js → chunk-mt4cdgz3.js} +2 -2
  81. package/dist/chunk-n1b7b20f.js +2 -0
  82. package/dist/{chunk-zgvga8rc.js → chunk-ncvd7673.js} +1 -1
  83. package/dist/{chunk-47pge5gz.js → chunk-nnw1ka45.js} +1 -1
  84. package/dist/{chunk-808qy9cq.js → chunk-pscdy0gn.js} +197 -197
  85. package/dist/{chunk-zat2ndst.js → chunk-pzcf36xm.js} +347 -347
  86. package/dist/{chunk-dmb6t0qj.js → chunk-q5w0fqd5.js} +2 -2
  87. package/dist/{chunk-pezxve4a.js → chunk-qfsktf7s.js} +3 -3
  88. package/dist/{chunk-a2rj5ce0.js → chunk-qr90ng3a.js} +2 -2
  89. package/dist/{chunk-rg6v68ya.js → chunk-rbnmbeda.js} +1 -1
  90. package/dist/chunk-rmrnnv87.js +2 -0
  91. package/dist/{chunk-j5vyt8wd.js → chunk-rpyck7kn.js} +1 -1
  92. package/dist/chunk-rq20qvkk.js +2 -0
  93. package/dist/{chunk-1nm2xrvq.js → chunk-ry86fd41.js} +1 -1
  94. package/dist/{chunk-9xh78snm.js → chunk-s6yn1mbm.js} +1 -1
  95. package/dist/{chunk-vgk5v31k.js → chunk-s88yt309.js} +1 -1
  96. package/dist/{chunk-ymccpdg6.js → chunk-snktca7b.js} +1 -1
  97. package/dist/{chunk-fvjh7rx0.js → chunk-swy03mg9.js} +1 -1
  98. package/dist/chunk-tc2d9en8.js +2 -0
  99. package/dist/{chunk-9064gyt5.js → chunk-tgaddq21.js} +2 -2
  100. package/dist/chunk-th7snpq2.js +2 -0
  101. package/dist/{chunk-f6jm4hy3.js → chunk-txre2e2m.js} +1 -1
  102. package/dist/chunk-v7ggp28p.js +2 -0
  103. package/dist/{chunk-zxb128xa.js → chunk-vaa8tk98.js} +2 -2
  104. package/dist/chunk-vg0kzfcy.js +2 -0
  105. package/dist/{chunk-p8pyqr7p.js → chunk-vgf945mj.js} +1 -1
  106. package/dist/{chunk-xkd164zg.js → chunk-w7ped5p5.js} +1 -1
  107. package/dist/{chunk-yf3bmmkk.js → chunk-wvc7t11n.js} +1 -1
  108. package/dist/{chunk-3wd9kfyz.js → chunk-x0bcc9sj.js} +1 -1
  109. package/dist/chunk-x0f34a44.js +2 -0
  110. package/dist/{chunk-aw9z3m10.js → chunk-xqnwy1t6.js} +1 -1
  111. package/dist/{chunk-pdh79z63.js → chunk-xrnqz76v.js} +1 -1
  112. package/dist/{chunk-p7qqbw2k.js → chunk-ydk1n77q.js} +2 -2
  113. package/dist/chunk-yk45219d.js +2 -0
  114. package/dist/{chunk-s7dqawk0.js → chunk-yppz6dgg.js} +2 -2
  115. package/dist/{chunk-w0ng9e1m.js → chunk-z6ev72qj.js} +1 -1
  116. package/dist/{chunk-6xg3j487.js → chunk-z794cdmn.js} +1 -1
  117. package/dist/{chunk-96kpqgh3.js → chunk-zg5mq1cj.js} +1 -1
  118. package/dist/chunk-zh75hc6a.js +2 -0
  119. package/dist/{chunk-zj44h5kk.js → chunk-zhfdf2h5.js} +1 -1
  120. package/dist/chunk-zpskp2xb.js +2 -0
  121. package/dist/cli.js +14 -14
  122. package/dist/craft-entry.js +1 -1
  123. package/dist/craft.js +1 -1
  124. package/dist/database.js +1 -1
  125. package/dist/dev-server/serve-app.js +33 -8
  126. package/dist/dev-server/serve-multi.js +5 -2
  127. package/dist/index.d.ts +1 -0
  128. package/dist/index.js +1 -0
  129. package/dist/page-response.d.ts +113 -0
  130. package/dist/page-response.js +106 -1
  131. package/dist/process.js +2 -0
  132. package/dist/production-server.js +13 -5
  133. package/dist/pwa.js +2 -2
  134. package/dist/render.d.ts +14 -0
  135. package/dist/render.js +3 -19
  136. package/dist/serve.js +19 -10
  137. package/dist/spa-nav.d.ts +49 -0
  138. package/dist/spa-nav.js +12 -0
  139. package/dist/ssg.js +2 -2
  140. package/dist/template-compiler.d.ts +1 -0
  141. package/dist/template-compiler.js +2 -0
  142. package/dist/template-hydrator.d.ts +1 -1
  143. package/dist/template-hydrator.js +4 -3
  144. package/dist/variable-extractor.d.ts +1 -1
  145. package/dist/variable-extractor.js +6 -2
  146. package/dist/visual-testing.js +1 -1
  147. package/package.json +5 -5
  148. package/dist/chunk-10yft4b7.js +0 -2
  149. package/dist/chunk-17atrbv2.js +0 -2
  150. package/dist/chunk-23vxz3hp.js +0 -2
  151. package/dist/chunk-2me28xee.js +0 -2
  152. package/dist/chunk-2w5d5tw1.js +0 -2
  153. package/dist/chunk-2xeq5xnf.js +0 -2
  154. package/dist/chunk-2z6k7gsa.js +0 -2
  155. package/dist/chunk-3fxcwk6a.js +0 -2
  156. package/dist/chunk-4vwxgmg0.js +0 -2
  157. package/dist/chunk-5gr4vv7m.js +0 -2
  158. package/dist/chunk-775fabj4.js +0 -2
  159. package/dist/chunk-8cyv5316.js +0 -2
  160. package/dist/chunk-8xtvmwpr.js +0 -2
  161. package/dist/chunk-9db2f09j.js +0 -2
  162. package/dist/chunk-9h908knr.js +0 -2
  163. package/dist/chunk-a1ydhf5t.js +0 -3
  164. package/dist/chunk-ba18hn7n.js +0 -2
  165. package/dist/chunk-bd0yv6a0.js +0 -2
  166. package/dist/chunk-cr7s8q08.js +0 -2
  167. package/dist/chunk-d48tzd8c.js +0 -2
  168. package/dist/chunk-dcy8hg45.js +0 -2
  169. package/dist/chunk-e6377wfq.js +0 -4
  170. package/dist/chunk-jnjxf5t2.js +0 -2
  171. package/dist/chunk-n4smz31k.js +0 -18
  172. package/dist/chunk-njkv35c3.js +0 -2
  173. package/dist/chunk-q3ea7q6t.js +0 -2
  174. package/dist/chunk-qd1nadff.js +0 -30
  175. package/dist/chunk-qwzfdq8q.js +0 -2
  176. package/dist/chunk-r153ybwd.js +0 -2
  177. package/dist/chunk-tg0w29j1.js +0 -2
  178. package/dist/chunk-tqhwzjj7.js +0 -2
  179. package/dist/chunk-vgr8kykv.js +0 -2
  180. package/dist/chunk-w670sde5.js +0 -2
  181. package/dist/chunk-x9bsft57.js +0 -2
  182. package/dist/chunk-y05vd24g.js +0 -2
  183. package/dist/chunk-yrqnsd3a.js +0 -2
  184. package/dist/chunk-z0hkt5sk.js +0 -2
@@ -1,3 +1,3 @@
1
1
  // @bun
2
2
  var L=null,R=[],N=0,U=new Set;function X(){return L}function Y(j){let G=L;return R.push(j),L=j,G}function Z(j){R.pop(),L=j}function _(){return N>0}function $(j){U.add(j)}function B(j){N++;try{j()}finally{if(N--,N===0){let G=[...U];U.clear();for(let F of G)F()}}}function A(j){let G=L;L=null;try{return j()}finally{L=G}}var O=[],P=[];function q(j){let G=j,F=new Set,H=new Set,I=()=>{let z=X();if(z)H.add(z);return G};return I.set=(z)=>{if(!Object.is(z,G)){let J=G;if(G=z,F.forEach((K)=>K(G,J)),_())H.forEach((K)=>$(K));else H.forEach((K)=>K())}},I.update=(z)=>{I.set(z(G))},I.subscribe=(z)=>{return F.add(z),()=>F.delete(z)},Object.defineProperty(I,"_isSignal",{value:!0,writable:!1}),Object.defineProperty(I,"value",{get:()=>I(),set:(z)=>I.set(z),configurable:!0}),I}function E(j){let G,F=!0,H=new Set,I=()=>{if(!F)if(F=!0,_())H.forEach((J)=>$(J));else H.forEach((J)=>J())},z=()=>{let J=X();if(J)H.add(J);if(F){let K=Y(I);try{G=j()}finally{Z(K)}F=!1}return G};return Object.defineProperty(z,"_isDerived",{value:!0,writable:!1}),Object.defineProperty(z,"value",{get:()=>z(),configurable:!0}),z}function V(j,G={}){let F,H=!1,I=()=>{if(H)return;if(F)F(),F=void 0;let z=Y(I);try{let J=j();F=typeof J==="function"?J:void 0}finally{Z(z)}};if(G.immediate!==!1)I();return()=>{if(H=!0,F)F()}}function h(j){B(j)}function k(j){O.push(j)}function o(j){P.push(j)}function g(){W(O,"onMount",P)}function d(){W(P,"onDestroy")}function W(j,G,F){let H=j.splice(0,j.length);for(let I of H)try{let z=I();if(F&&typeof z==="function")F.push(z)}catch(z){console.error(`[stx] ${G} callback threw:`,z)}}function p(){return{mount:O.length,destroy:P.length}}function m(j){return typeof j==="function"&&j._isSignal===!0}function D(j){return typeof j==="function"&&j._isDerived===!0}function v(j){if(m(j)||D(j))return j();return j}function w(j){return A(j)}function f(j,G){let F=typeof j==="function"?j:()=>j,H=q([]),I=E(()=>H().reduce((K,M)=>G(K,M.action),F())),z=!1;return V(()=>{if(F(),!z){z=!0;return}if(w(()=>H().length))H.set([])}),[I,(K,M)=>{let T={action:K};H.set([...H(),T]);let Q=()=>{let x=H().filter((C)=>C!==T);if(x.length!==H().length)H.set(x)};if(M&&typeof M.then==="function")Promise.resolve(M).then(Q,Q);return Q}]}
3
- export{X as Aj,Y as Bj,Z as Cj,_ as Dj,$ as Ej,q as Fj,E as Gj,V as Hj,h as Ij,k as Jj,o as Kj,g as Lj,d as Mj,p as Nj,m as Oj,D as Pj,v as Qj,w as Rj,f as Sj};
3
+ export{X as Ej,Y as Fj,Z as Gj,_ as Hj,$ as Ij,q as Jj,E as Kj,V as Lj,h as Mj,k as Nj,o as Oj,g as Pj,d as Qj,p as Rj,m as Sj,D as Tj,v as Uj,w as Vj,f as Wj};
@@ -1,5 +1,5 @@
1
1
  // @bun
2
- import{gu as Ae,hu as u}from"./chunk-trtm887x.js";function _(e){return e.split(/[\\/]/).filter(Boolean).slice(0,-1).some((a)=>m.includes(a))}function g(e){return _(e.replace(/^\//,""))}var m;var b=u(()=>{m=["components","layouts","partials","emails"]});import d from"fs";import y from"path";function x(e,t){let a=e.filter((o)=>!g(o.pattern)),r=["// Auto-generated by STX - do not edit"];if(a.length===0)r.push("// No page routes found \u2014 route paths stay typed as string.","export {}","");else{r.push("declare module '@stacksjs/stx' {"," interface KnownRoutes {");for(let o of a){let i=[];for(let c of o.params){let f=o.pattern.includes(`:${c}?`)?"?":"";i.push(`${c}${f}: string`)}let l=i.join("; ");r.push(` '${o.pattern}': { ${l} }`)}r.push(" }","}","","export {}","")}let n=r.join(`
2
+ import{vu as Ae,wu as u}from"./chunk-8rn5e39c.js";function _(e){return e.split(/[\\/]/).filter(Boolean).slice(0,-1).some((a)=>m.includes(a))}function g(e){return _(e.replace(/^\//,""))}var m;var b=u(()=>{m=["components","layouts","partials","emails"]});import d from"fs";import y from"path";function x(e,t){let a=e.filter((o)=>!g(o.pattern)),r=["// Auto-generated by STX - do not edit"];if(a.length===0)r.push("// No page routes found \u2014 route paths stay typed as string.","export {}","");else{r.push("declare module '@stacksjs/stx' {"," interface KnownRoutes {");for(let o of a){let i=[];for(let c of o.params){let f=o.pattern.includes(`:${c}?`)?"?":"";i.push(`${c}${f}: string`)}let l=i.join("; ");r.push(` '${o.pattern}': { ${l} }`)}r.push(" }","}","","export {}","")}let n=r.join(`
3
3
  `),s=y.join(t,"route-types.d.ts");try{if(d.existsSync(s)&&d.readFileSync(s,"utf8")===n)return;d.mkdirSync(t,{recursive:!0}),d.writeFileSync(s,n)}catch{}}function S(e,t,a){let r=process.cwd(),n=y.relative(r,a),s=e.filter((i)=>!g(i.pattern)),o=["// Auto-generated by stx \u2014 do not edit",`// Source: ${n||"pages"}/`,"","export const routes = ["];for(let i of s){let l=y.relative(r,i.filePath).replace(/\\/g,"/"),c=JSON.stringify(i.params),f=i.layout?`, layout: '${y.relative(r,i.layout).replace(/\\/g,"/")}'`:"";o.push(` { pattern: '${i.pattern}', filePath: '${l}', isDynamic: ${i.isDynamic}, params: ${c}${f} },`)}o.push("] as const",""),o.push("export type RouteName = typeof routes[number]['pattern']",""),d.mkdirSync(t,{recursive:!0}),d.writeFileSync(y.join(t,"routes.ts"),o.join(`
4
4
  `))}var F=u(()=>{b()});import V from"path";function k(e,t){let r=V.relative(t,e).replace(/\.(stx|md)$/,"");if(r=r.split(V.sep).join("/"),r==="index")return"/";if(r.endsWith("/index"))r=r.slice(0,-6);return r=r.replace(/\[\[([^\]]+)\]\]/g,":$1?"),r=r.replace(/\[([^\]]+)\]/g,":$1"),r=r.replace(/:\.\.\.([^/]+)/g,":$1*"),`/${r}`}function v(e){let t=[],a="",r=0;while(r<e.length){let n=e.slice(r),s=/^\/:([^/?*]+)\?/.exec(n);if(s){t.push(s[1]),a+="(?:/([^/]+))?",r+=s[0].length;continue}let o=/^:([^/?*]+)\*/.exec(n);if(o){t.push(o[1]),a+="(.+)",r+=o[0].length;continue}let i=/^:([^/?*]+)/.exec(n);if(i){t.push(i[1]),a+="([^/]+)",r+=i[0].length;continue}a+=e[r].replace(/[.+^${}()|[\]\\*?]/g,"\\$&"),r+=1}return{regex:new RegExp(`^${a}$`),params:t}}function W(e,t){let a=e===""?"/":e;for(let r of t){let n=a.match(r.regex);if(n){let s={};return r.params.forEach((o,i)=>{s[o]=n[i+1]}),{route:r,params:s}}}return null}function D(e){let t=e.replace(/\[\[([^\]]+)\]\]/g,":$1?").replace(/\[([^\]]+)\]/g,":$1").replace(/:\.\.\.([^/]+)/g,":$1*");return v(t)}var I=()=>{};import xe from"fs";import M from"path";function A(e,t){let a=[],r=M.dirname(e);while(r.startsWith(t)||r===t){let n=M.join(r,"_layout.stx");if(xe.existsSync(n))a.unshift(n);if(r===t)break;r=M.dirname(r)}return a}var N=()=>{};import P from"fs";import h from"path";function K(e,t){let a=[];if(!P.existsSync(e))return a;let r=P.readdirSync(e,{withFileTypes:!0});for(let n of r){let s=h.join(e,n.name);if(n.isDirectory()){if(n.name.startsWith("."))continue;if(m.includes(n.name))continue;a.push(...K(s,t))}else if(n.isFile()){let o=h.extname(n.name);if(t.includes(o)){if(n.name.startsWith("_")&&n.name!=="_layout.stx")continue;if(n.name==="_layout.stx")continue;a.push(s)}}}return a}class C{routes;pagesDir;pagesDirs;config;constructor(e,t={}){this.config=t;let a=t.pagesDirs&&t.pagesDirs.length>0?t.pagesDirs:[t.pagesDir||"pages"];this.pagesDirs=a.map((o)=>h.resolve(e,o)),this.pagesDir=this.pagesDirs[0];let r=t.extensions||[".stx"],n=new Set;this.routes=[];for(let o of this.pagesDirs){let i=K(o,r);for(let l of i){let c=k(l,o);if(n.has(c))continue;n.add(c);let{regex:f,params:H}=v(c),O=t.layouts!==!1?A(l,o):[];this.routes.push({pattern:c,regex:f,params:H,filePath:l,isDynamic:H.length>0,layout:O.length>0?O[O.length-1]:void 0})}}this.routes.sort((o,i)=>{if(!o.isDynamic&&i.isDynamic)return-1;if(o.isDynamic&&!i.isDynamic)return 1;let l=o.pattern.split("/").length,c=i.pattern.split("/").length;if(l!==c)return c-l;return o.pattern.localeCompare(i.pattern)});let s=h.resolve(e,t.stateDir||process.env.STX_DIR?.trim()||".stx");x(this.routes,s),S(this.routes,s,this.pagesDir)}match(e){let t=e===""?"/":e;for(let a of this.routes){let r=t.match(a.regex);if(r){let n={};return a.params.forEach((s,o)=>{n[s]=r[o+1]}),{route:a,params:n}}}return null}resolve(e,t){let a=this.routes.find((n)=>n.pattern===e||n.filePath.includes(e));if(!a)return"#not-found";let r=a.pattern;if(t)for(let[n,s]of Object.entries(t))r=r.replace(`:${n}`,encodeURIComponent(s));return r}addRoute(e){this.routes.push(e),this.routes.sort((t,a)=>{if(!t.isDynamic&&a.isDynamic)return-1;if(t.isDynamic&&!a.isDynamic)return 1;return t.pattern.localeCompare(a.pattern)})}getLayout(e){return e.layout??null}}function $(e,t){return new C(e,t)}function z(e,t){let a=[`${t}.stx`,"error.stx"];for(let r of a){let n=h.join(e,r);if(P.existsSync(n))return n}return null}function Y(e,t){return e.map((a)=>{let r=h.relative(t,a.filePath),n=a.isDynamic?" (dynamic)":"";return`${a.pattern} \u2192 ${r}${n}`})}var J=u(()=>{F();I();N();b()});function Z(e){T=e.replace(/\/$/,"")}function Q(e,t,a={}){p[e]={path:t,name:e,params:a}}function ee(e){for(let[t,a]of Object.entries(e))if(typeof a==="string")p[t]={path:a,name:t};else p[t]={...a,name:t}}function te(e,t={},a=!1){let r=p[e];if(!r)return console.warn(`Route [${e}] not defined.`),"#undefined-route";let n={...r.params,...t},s=r.path;s=s.replace(/:(\w+)/g,(i,l)=>{let c=n[l];if(c===void 0)return console.warn(`Missing parameter [${l}] for route [${e}].`),`:${l}`;return delete n[l],encodeURIComponent(String(c))});let o=Object.entries(n);if(o.length>0){let i=o.map(([l,c])=>`${encodeURIComponent(l)}=${encodeURIComponent(String(c))}`).join("&");s+=(s.includes("?")?"&":"?")+i}return a&&T?`${T}${s}`:s}function re(){for(let e of Object.keys(p))delete p[e];T=""}var p,T="";var ae=u(()=>{p={}});import ne from"fs";import oe from"path";function se(e,t={}){return{type:"redirect",path:e,options:{replace:t.replace??!1,external:t.external??!1,redirectCode:t.redirectCode??302}}}function ie(e){return{type:"abort",error:typeof e==="string"?{statusCode:500,message:e}:e}}function le(e,t={}){return{handler:e,mode:t.mode??"universal"}}function G(e){let t={};if(!e)return t;let a=e.split(";");for(let r of a){let[n,...s]=r.split("=");if(n){let o=n.trim(),i=s.join("=").trim();if(o)t[o]=decodeURIComponent(i)}}return t}function E(e,t,a={}){let r=`${encodeURIComponent(e)}=${encodeURIComponent(t)}`;if(a.expires){let n=typeof a.expires==="number"?new Date(Date.now()+a.expires*1000):a.expires;r+=`; Expires=${n.toUTCString()}`}if(a.path)r+=`; Path=${a.path}`;if(a.domain)r+=`; Domain=${a.domain}`;if(a.secure)r+="; Secure";if(a.httpOnly)r+="; HttpOnly";if(a.sameSite)r+=`; SameSite=${a.sameSite}`;return r}function B(e,t){let a=e.headers.get("cookie")||"",r=G(a);return{get(n){return r[n]},set(n,s,o={}){r[n]=s,t.append("Set-Cookie",E(n,s,o))},delete(n){delete r[n],t.append("Set-Cookie",E(n,"",{expires:new Date(0),path:"/"}))},getAll(){return{...r}}}}function X(){return{get(e){if(typeof document>"u")return;return G(document.cookie)[e]},set(e,t,a={}){if(typeof document>"u")return;document.cookie=E(e,t,a)},delete(e){if(typeof document>"u")return;document.cookie=E(e,"",{expires:new Date(0),path:"/"})},getAll(){if(typeof document>"u")return{};return G(document.cookie)}}}function U(){let e=typeof window<"u"&&typeof window.localStorage<"u";return{get(t){if(!e)return null;try{return window.localStorage.getItem(t)}catch{return null}},set(t,a){if(!e)return;try{window.localStorage.setItem(t,a)}catch{}},remove(t){if(!e)return;try{window.localStorage.removeItem(t)}catch{}},isAvailable(){return e}}}function R(e,t){w.set(e,t)}function j(e){return w.get(e)}function ce(e){return w.has(e)}function ue(){w.clear()}function de(){return Array.from(w.keys())}async function he(e,t="middleware"){let a=oe.resolve(e,t);if(!ne.existsSync(a))return;let r=ne.readdirSync(a);for(let n of r){if(!n.endsWith(".ts")&&!n.endsWith(".js"))continue;if(n.includes(".test.")||n.includes(".spec."))continue;let s=n.replace(/\.(ts|js)$/,""),o=oe.join(a,n);try{let l=(await import(o)).default;if(l&&typeof l.handler==="function")R(s,l);else if(typeof l==="function")R(s,{handler:l,mode:"universal"})}catch(i){console.warn(`Failed to load middleware '${s}' from ${o}:`,i)}}}function Se(e){let t={};if(!e)return t;let a=new URLSearchParams(e);for(let[r,n]of a)t[r]=n;return t}function pe(e,t,a,r=""){return{path:e,params:t,query:Se(r),fullPath:r?`${e}?${r}`:e,meta:a}}function fe(e,t,a,r){let n=r?.isServer??typeof window>"u",s=!n,o=new Headers;return{to:e,from:t,isClient:s,isServer:n,cookies:n&&a?B(a,o):X(),storage:U(),state:{},request:a,responseHeaders:o}}async function me(e,t){let a=Array.isArray(e)?e:[e],r=t.isServer;for(let n of a){let s=j(n);if(!s)return console.error(`Route middleware '${n}' is not registered \u2014 failing the guard closed.`),{passed:!1,abort:{type:"abort",error:{statusCode:500,message:`Route middleware '${n}' is not registered`}},state:t.state,responseHeaders:t.responseHeaders};if(s.mode==="server"&&!r)continue;try{let o=await s.handler(t);if(o){if(o.type==="redirect")return{passed:!1,redirect:o,state:t.state,responseHeaders:t.responseHeaders};if(o.type==="abort")return{passed:!1,abort:o,state:t.state,responseHeaders:t.responseHeaders}}}catch(o){return console.error(`Error in middleware '${n}':`,o),{passed:!1,abort:{type:"abort",error:{statusCode:500,message:o instanceof Error?o.message:"Middleware error"}},state:t.state,responseHeaders:t.responseHeaders}}}return{passed:!0,state:t.state,responseHeaders:t.responseHeaders}}var w;var ge=u(()=>{w=new Map});function q(e){let a=e.replace(/\\/g,"/").split("/").filter(Boolean),r=a.lastIndexOf("layouts"),n=r>=0?a[r+1]:a.at(-1);if(!n)return"app";return n.replace(/\.stx$/i,"")||"app"}function ye(e){let t=e.match(/<meta\b[^>]*name=["']stx-layout["'][^>]*content=["']([^"']+)["'][^>]*>/i),a=e.match(/<meta\b[^>]*name=["']stx-layout-group["'][^>]*content=["']([^"']+)["'][^>]*>/i),r=e.match(/<!--\s*stx-layout:\s*([^ ]+)\s*-->/i),n=t?.[1]||r?.[1]||"";return{layout:n,group:a?.[1]||q(n)}}var ve=()=>{};function ke(e){try{return new Bun.Transpiler({loader:"js",minifyWhitespace:!0}).transformSync(e).replace(/\}(var |let |const |function )/g,"};$1").trim()}catch{return e}}function we(){if(L)return L;return L=ke(`
5
5
  ;(function(){
@@ -1652,4 +1652,4 @@ else {
1652
1652
  if(document.readyState==='loading')document.addEventListener('DOMContentLoaded',init);else init();
1653
1653
  })();
1654
1654
  `),L}var L;var be=()=>{};var Ce={};Ae(Ce,{setAppUrl:()=>Z,runMiddleware:()=>me,route:()=>te,resolveLayoutChain:()=>A,resetRoutes:()=>re,registerMiddleware:()=>R,patternToRegex:()=>v,navigateTo:()=>se,matchRoute:()=>W,loadMiddlewareFromDirectory:()=>he,isNonPageRoutePattern:()=>g,isNonPageRoutePath:()=>_,hasMiddleware:()=>ce,getRouterScript:()=>we,getMiddlewareNames:()=>de,getMiddleware:()=>j,generateRouteTypes:()=>x,generateRouteManifest:()=>S,formatRoutes:()=>Y,findErrorPage:()=>z,filePathToPattern:()=>k,extractLayoutMetadata:()=>ye,deriveLayoutGroup:()=>q,defineRoutes:()=>ee,defineRoute:()=>Q,defineMiddleware:()=>le,createStorageManager:()=>U,createServerCookieManager:()=>B,createRouter:()=>$,createRouteLocation:()=>pe,createMiddlewareContext:()=>fe,createClientCookieManager:()=>X,clearMiddleware:()=>ue,bracketPathToRegex:()=>D,abortNavigation:()=>ie,Router:()=>C,NON_PAGE_DIRS:()=>m});var Te=u(()=>{J();I();ae();ge();N();ve();F();b();be()});
1655
- export{m as nt,_ as ot,g as pt,x as qt,S as rt,k as st,v as tt,W as ut,D as vt,A as wt,C as xt,$ as yt,z as zt,Y as At,Z as Bt,Q as Ct,ee as Dt,te as Et,re as Ft,se as Gt,ie as Ht,le as It,B as Jt,X as Kt,U as Lt,R as Mt,j as Nt,ce as Ot,ue as Pt,de as Qt,he as Rt,pe as St,fe as Tt,me as Ut,q as Vt,ye as Wt,ve as Xt,we as Yt,Ce as Zt,Te as _t};
1655
+ export{m as Ct,_ as Dt,g as Et,x as Ft,S as Gt,k as Ht,v as It,W as Jt,D as Kt,A as Lt,C as Mt,$ as Nt,z as Ot,Y as Pt,Z as Qt,Q as Rt,ee as St,te as Tt,re as Ut,se as Vt,ie as Wt,le as Xt,B as Yt,X as Zt,U as _t,R as $t,j as au,ce as bu,ue as cu,de as du,he as eu,pe as fu,fe as gu,me as hu,q as iu,ye as ju,ve as ku,we as lu,Ce as mu,Te as nu};
@@ -1,5 +1,5 @@
1
1
  // @bun
2
- import{gs as B}from"./chunk-khrtzbxd.js";import I from"path";function M(z){if(!z)return!1;return z.trim().split(/\s+/)[0]?.toLowerCase()==="presentation"||z.trim().split(/\s+/)[0]?.toLowerCase()==="none"}function L(z,X){let J=new RegExp(`\\b${X}\\s*=\\s*("([^"]*)"|'([^']*)'|([^\\s>]+))`,"i").exec(z);if(!J)return null;return J[2]??J[3]??J[4]??null}function h(z,X,J,K){let j=z;j=j.replace(/@a11y\(\s*['"]([^'"]+)['"]\s*(?:,\s*['"]([^'"]+)['"]\s*)?\)/g,(Q,G,q)=>{let U={"aria-label":"Ensure interactive elements have accessible labels","alt-text":"Provide alternative text for images",focus:"Ensure the element can receive keyboard focus",landmark:"Use appropriate landmark roles","heading-order":"Maintain proper heading hierarchy","color-contrast":"Ensure sufficient color contrast","keyboard-nav":"Make sure element is keyboard navigable","screen-reader":"Optimize for screen reader users"}[G]||"Make this element accessible";return`<!-- a11y-hint: ${q||U} -->`});let _=/@screenReader\(([^@]*)\)@endScreenReader/g;return j=j.replace(_,(Q,G)=>{return`<span class="sr-only">${G.trim()}</span>`}),j=j.replace(/@ariaDescribe\(\s*['"]([^'"]+)['"]\s*,\s*['"]([^'"]+)['"]\s*\)/g,(Q,G,q)=>{return`<span id="${`desc-${G}`}" class="sr-only">${q}</span>`}),j}function s(){return`
2
+ import{vs as B}from"./chunk-arnse15r.js";import I from"path";function M(z){if(!z)return!1;return z.trim().split(/\s+/)[0]?.toLowerCase()==="presentation"||z.trim().split(/\s+/)[0]?.toLowerCase()==="none"}function L(z,X){let J=new RegExp(`\\b${X}\\s*=\\s*("([^"]*)"|'([^']*)'|([^\\s>]+))`,"i").exec(z);if(!J)return null;return J[2]??J[3]??J[4]??null}function h(z,X,J,K){let j=z;j=j.replace(/@a11y\(\s*['"]([^'"]+)['"]\s*(?:,\s*['"]([^'"]+)['"]\s*)?\)/g,(Q,G,q)=>{let U={"aria-label":"Ensure interactive elements have accessible labels","alt-text":"Provide alternative text for images",focus:"Ensure the element can receive keyboard focus",landmark:"Use appropriate landmark roles","heading-order":"Maintain proper heading hierarchy","color-contrast":"Ensure sufficient color contrast","keyboard-nav":"Make sure element is keyboard navigable","screen-reader":"Optimize for screen reader users"}[G]||"Make this element accessible";return`<!-- a11y-hint: ${q||U} -->`});let _=/@screenReader\(([^@]*)\)@endScreenReader/g;return j=j.replace(_,(Q,G)=>{return`<span class="sr-only">${G.trim()}</span>`}),j=j.replace(/@ariaDescribe\(\s*['"]([^'"]+)['"]\s*,\s*['"]([^'"]+)['"]\s*\)/g,(Q,G,q)=>{return`<span id="${`desc-${G}`}" class="sr-only">${q}</span>`}),j}function s(){return`
3
3
  .sr-only {
4
4
  position: absolute;
5
5
  width: 1px;
@@ -12,4 +12,4 @@ import{gs as B}from"./chunk-khrtzbxd.js";import I from"path";function M(z){if(!z
12
12
  border-width: 0;
13
13
  }
14
14
  `.trim()}function k(){return typeof globalThis.document<"u"&&typeof globalThis.document.createElement==="function"}function A(z){let X=new Map,J=z.replace(/<(\/?)([A-Z][\w:.-]*)(?=[\s/>])/g,(j,_,Q)=>{let G=X.get(Q);if(!G)G=`stx-a11y-component-${X.size}`,X.set(Q,G);return`<${_}${G}`}),K=new Map([...X.entries()].map(([j,_])=>[_,j]));return{protectedSource:J,restore:(j)=>j.replace(/<(\/?)(stx-a11y-component-\d+)(?=[\s/>])/g,(_,Q,G)=>{let q=K.get(G);return q?`<${Q}${q}`:_})}}function N(z,X){let J=[],K=/<img\s+([^>]*)>/gi,j;j=K.exec(z);while(j!==null){let Y=j[1];if(!/\balt\s*=/i.test(Y))J.push({type:"missing-alt",element:j[0].substring(0,100),message:"Image missing alt attribute",impact:"serious",help:"Add alt text to images for screen readers",helpUrl:"https://web.dev/learn/accessibility/images/"});j=K.exec(z)}let _=/<button([^>]*)>\s*<\/button>/gi;j=_.exec(z);while(j!==null){let Y=j[1];if(!/\baria-label\s*=/i.test(Y)&&!/\btitle\s*=/i.test(Y))J.push({type:"missing-accessible-name",element:j[0].substring(0,100),message:"Empty button missing accessible name",impact:"critical",help:"Add text content, aria-label, or title",helpUrl:"https://web.dev/learn/accessibility/aria-html/"});j=_.exec(z)}let Q=/<a\s+([^>]*)>\s*<\/a>/gi;j=Q.exec(z);while(j!==null){let Y=j[1];if(!/\baria-label\s*=/i.test(Y)&&!/\btitle\s*=/i.test(Y))J.push({type:"link-missing-text",element:j[0].substring(0,100),message:"Link has no accessible text",impact:"serious",help:"Add text content, aria-label, or title to links",helpUrl:"https://web.dev/learn/accessibility/more-html/#links"});j=Q.exec(z)}let G=/<(input|select|textarea)\s+([^>]*)>/gi;j=G.exec(z);while(j!==null){let Y=j[2];if(/\btype\s*=\s*["']hidden["']/i.test(Y)){j=G.exec(z);continue}let W=/\baria-label\s*=/i.test(Y)||/\baria-labelledby\s*=/i.test(Y),E=Y.match(/\bid\s*=\s*["']([^"']+)["']/i);if(!W){let T=E&&new RegExp(`<label[^>]*\\bfor\\s*=\\s*["']${E[1]}["']`,"i").test(z),w=j.index,F=z.substring(0,w),f=z.substring(w),S=(F.match(/<label\b/gi)||[]).length,C=(F.match(/<\/label>/gi)||[]).length,P=S>C;if(!T&&!P)J.push({type:"input-missing-label",element:j[0].substring(0,100),message:"Form input missing associated label",impact:"serious",help:"Associate a label with the input or use aria-label",helpUrl:"https://web.dev/learn/accessibility/forms/"})}j=G.exec(z)}let q=/<h([1-6])[^>]*>/gi,H=[];j=q.exec(z);while(j!==null)H.push(Number.parseInt(j[1],10)),j=q.exec(z);let U=0;for(let Y of H){if(U>0&&Y>U+1)J.push({type:"heading-skip",element:`<h${Y}>`,message:`Heading level skipped from h${U} to h${Y}`,impact:"moderate",help:"Maintain proper heading hierarchy without skipping levels",helpUrl:"https://web.dev/learn/accessibility/structure/"});U=Y}if(/<html\b/i.test(z)&&!/<html[^>]*\slang\s*=/i.test(z))J.push({type:"missing-lang",element:"<html>",message:"Document language not specified",impact:"serious",help:"Add lang attribute to the html element",helpUrl:"https://web.dev/learn/accessibility/more-html/#language"});let Z=/<table([^>]*)>([\s\S]*?)<\/table>/gi;j=Z.exec(z);while(j!==null){let Y=j[2];if(!M(L(j[1],"role"))&&!/<th\b/i.test(Y))J.push({type:"table-missing-headers",element:"<table>",message:"Table missing header cells (th)",impact:"serious",help:"Use th elements for table headers",helpUrl:"https://web.dev/learn/accessibility/more-html/#tables"});j=Z.exec(z)}let O=/<(video|audio)[^>]*\sautoplay\s[^>]*>/gi;j=O.exec(z);while(j!==null){if(!/\bmuted\b/i.test(j[0]))J.push({type:"autoplay-audio",element:`<${j[1]}>`,message:"Auto-playing media may disrupt users",impact:"moderate",help:"Add muted attribute or provide controls to stop playback",helpUrl:"https://web.dev/learn/accessibility/more-html/#multimedia"});j=O.exec(z)}let $=/\btabindex\s*=\s*["']([1-9]\d*)["']/gi;j=$.exec(z);while(j!==null)J.push({type:"positive-tabindex",element:`tabindex="${j[1]}"`,message:"Positive tabindex disrupts natural tab order",impact:"moderate",help:'Use tabindex="0" or "-1" instead of positive values',helpUrl:"https://web.dev/learn/accessibility/focus/#tab-index"}),j=$.exec(z);let V=/<iframe\s+([^>]*)>/gi;j=V.exec(z);while(j!==null){let Y=j[1];if(!/\btitle\s*=/i.test(Y)&&!/\baria-label\s*=/i.test(Y))J.push({type:"iframe-missing-title",element:"<iframe>",message:"Iframe missing title attribute",impact:"serious",help:"Add a title attribute to describe the iframe content",helpUrl:"https://web.dev/learn/accessibility/more-html/#frames"});j=V.exec(z)}let D=/<([a-z]+)\s+([^>]*role\s*=\s*["']button["'][^>]*)>/gi;j=D.exec(z);while(j!==null){let Y=j[1].toLowerCase(),W=j[2];if(Y!=="button"&&!/\btabindex\s*=/i.test(W))J.push({type:"button-not-focusable",element:j[0].substring(0,100),message:'Element with role="button" is not keyboard focusable',impact:"serious",help:'Add tabindex="0" to make custom buttons focusable',helpUrl:"https://web.dev/learn/accessibility/focus/"});j=D.exec(z)}return J}async function y(z,X){let{protectedSource:J}=A(z);if(!k())return N(J,X);let K=[];try{let j=globalThis.document.createElement("div");j.innerHTML=J,j.querySelectorAll("img").forEach((q)=>{if(!q.hasAttribute("alt"))K.push({type:"missing-alt",element:`<${q.outerHTML}>`,message:"Image missing alt attribute",impact:"serious",help:"Add alt text to images for screen readers",helpUrl:"https://web.dev/learn/accessibility/images/"})}),j.querySelectorAll('button, a, [role="button"]').forEach((q)=>{if(!(q.hasAttribute("aria-label")||q.hasAttribute("aria-labelledby")||q.textContent&&q.textContent.trim().length>0))K.push({type:"missing-accessible-name",element:`<${q.outerHTML}>`,message:"Interactive element missing accessible name",impact:"critical",help:"Add text content, aria-label, or aria-labelledby",helpUrl:"https://web.dev/learn/accessibility/aria-html/"})}),j.querySelectorAll("input, select, textarea").forEach((q)=>{let H=q.getAttribute("id"),U=H&&j.querySelector(`label[for="${H}"]`),Z=q.hasAttribute("aria-label")||q.hasAttribute("aria-labelledby"),O=q.closest("label")!==null;if(!U&&!Z&&!O)K.push({type:"input-missing-label",element:`<${q.outerHTML}>`,message:"Form input missing associated label",impact:"serious",help:"Associate a label with the input or use aria-label",helpUrl:"https://web.dev/learn/accessibility/forms/"})});let _=Array.from(j.querySelectorAll("h1, h2, h3, h4, h5, h6")),Q=0;for(let q of _){let H=Number.parseInt(q.tagName.charAt(1));if(Q>0&&H>Q+1)K.push({type:"heading-skip",element:`<${q.outerHTML}>`,message:`Heading level skipped from h${Q} to h${H}`,impact:"moderate",help:"Maintain proper heading hierarchy without skipping levels",helpUrl:"https://web.dev/learn/accessibility/structure/"});Q=H}let G=j.querySelector("html");if(J.includes("<html")&&G&&!G.hasAttribute("lang"))K.push({type:"missing-lang",element:"<html>",message:"Document language not specified",impact:"serious",help:"Add lang attribute to the html element",helpUrl:"https://web.dev/learn/accessibility/more-html/#language"});if(j.querySelectorAll("a").forEach((q)=>{let H=q.textContent&&q.textContent.trim().length>0,U=q.hasAttribute("aria-label")||q.hasAttribute("aria-labelledby"),Z=q.hasAttribute("title"),O=q.querySelector("img[alt]");if(!H&&!U&&!Z&&!O)K.push({type:"link-missing-text",element:`<${q.outerHTML}>`,message:"Link has no accessible text",impact:"serious",help:"Add text content, aria-label, or title to links",helpUrl:"https://web.dev/learn/accessibility/more-html/#links"})}),J.includes("<nav")||J.includes("<header")){if(!j.querySelector('a[href="#main"], a[href="#content"], .skip-link, [class*="skip"]')&&j.querySelectorAll("a").length>5)K.push({type:"missing-skip-link",element:"<nav>",message:"Consider adding a skip navigation link",impact:"minor",help:"Add a skip link to allow keyboard users to bypass navigation",helpUrl:"https://web.dev/learn/accessibility/focus/#skip-links"})}if(j.querySelectorAll("table").forEach((q)=>{if(M(q.getAttribute("role")))return;let H=q.querySelector("caption");if(!q.querySelector("th"))K.push({type:"table-missing-headers",element:"<table>",message:"Table missing header cells (th)",impact:"serious",help:"Use th elements for table headers",helpUrl:"https://web.dev/learn/accessibility/more-html/#tables"});if(!H&&!q.hasAttribute("aria-label")&&!q.hasAttribute("aria-labelledby"))K.push({type:"table-missing-caption",element:"<table>",message:"Table missing caption or accessible name",impact:"minor",help:"Add a caption element or aria-label to describe the table",helpUrl:"https://web.dev/learn/accessibility/more-html/#tables"})}),j.querySelectorAll('[style*="color"]').forEach((q)=>{let H=q.getAttribute("style")||"";if(H.includes("color:")&&!H.includes("background"))K.push({type:"potential-contrast-issue",element:`<${q.tagName.toLowerCase()}>`,message:"Element has inline color style - verify contrast ratio",impact:"minor",help:"Ensure text has sufficient contrast ratio (4.5:1 for normal text)",helpUrl:"https://web.dev/learn/accessibility/color-contrast/"})}),j.querySelectorAll("video[autoplay], audio[autoplay]").forEach((q)=>{if(!q.hasAttribute("muted"))K.push({type:"autoplay-audio",element:`<${q.tagName.toLowerCase()}>`,message:"Auto-playing media may disrupt users",impact:"moderate",help:"Add muted attribute or provide controls to stop playback",helpUrl:"https://web.dev/learn/accessibility/more-html/#multimedia"})}),j.querySelectorAll("[tabindex]").forEach((q)=>{if(Number.parseInt(q.getAttribute("tabindex")||"0")>0)K.push({type:"positive-tabindex",element:`<${q.tagName.toLowerCase()}>`,message:"Positive tabindex disrupts natural tab order",impact:"moderate",help:'Use tabindex="0" or "-1" instead of positive values',helpUrl:"https://web.dev/learn/accessibility/focus/#tab-index"})}),j.querySelectorAll('[role="button"]').forEach((q)=>{if(!q.hasAttribute("tabindex"))K.push({type:"button-not-focusable",element:`<${q.outerHTML}>`,message:'Element with role="button" is not keyboard focusable',impact:"serious",help:'Add tabindex="0" to make custom buttons focusable',helpUrl:"https://web.dev/learn/accessibility/focus/"})}),J.includes("<body")&&!j.querySelector('main, [role="main"]'))K.push({type:"missing-main-landmark",element:"<body>",message:"Document missing main landmark region",impact:"moderate",help:"Add a main element to identify the primary content",helpUrl:"https://web.dev/learn/accessibility/structure/#landmarks"});j.querySelectorAll("iframe").forEach((q)=>{if(!q.hasAttribute("title")&&!q.hasAttribute("aria-label"))K.push({type:"iframe-missing-title",element:"<iframe>",message:"Iframe missing title attribute",impact:"serious",help:"Add a title attribute to describe the iframe content",helpUrl:"https://web.dev/learn/accessibility/more-html/#frames"})})}catch(j){console.error(`Error checking accessibility in ${X}:`,j)}return K}async function R(z,X={}){let J={},{recursive:K=!0,ignorePaths:j=[]}=X,_=Array.isArray(z)?z:[z],Q=await B(_,{recursive:K,ignorePaths:j}),G=[];for(let q of Q)try{let H=await Bun.file(q).text();if(q.endsWith("good-a11y.stx"))continue;let U=await y(H,q);if(G.push(q),U.length>0)J[q]=U}catch(H){console.error(`Error scanning ${q}:`,H)}return{results:J,scannedFiles:G}}async function c(z,X={}){return(await R(z,X)).results}var b={fixMissingAlt:!0,fixMissingLabels:!0,fixMissingFormLabels:!0,fixTableHeaders:!0,fixMissingLang:!0,fixPositiveTabindex:!0,fixButtonFocusable:!0,defaultLang:"en"};function v(z,X={}){let J={...b,...X},K=[],{protectedSource:j,restore:_}=A(z),Q=j;if(J.fixMissingAlt)Q=Q.replace(/<img([^>]*?)(?<!\balt\s*=\s*["'][^"']*["'])(\s*\/?>)/gi,(G,q,H)=>{if(/\balt\s*=/i.test(q))return G;let U=G,Z=`<img${q} alt=""${H}`;return K.push({type:"missing-alt",description:"Added empty alt attribute to image",before:U,after:Z}),Z});if(J.fixMissingLabels)Q=Q.replace(/<button([^>]*)>\s*<\/button>/gi,(G,q)=>{if(/\baria-label\s*=/i.test(q)||/\btitle\s*=/i.test(q))return G;let H=G,U=`<button${q} aria-label="Button"></button>`;return K.push({type:"missing-accessible-name",description:"Added aria-label to empty button",before:H,after:U}),U}),Q=Q.replace(/<a([^>]*)>\s*(<(?:i|span|svg)[^>]*(?:class="[^"]*icon[^"]*")?[^>]*>.*?<\/(?:i|span|svg)>)?\s*<\/a>/gi,(G,q,H)=>{if(/\baria-label\s*=/i.test(q)||/\btitle\s*=/i.test(q))return G;if(!H&&G.replace(/<a[^>]*>|<\/a>/gi,"").trim())return G;let U=G,Z=`<a${q} aria-label="Link">${H||""}</a>`;return K.push({type:"missing-accessible-name",description:"Added aria-label to link without text",before:U,after:Z}),Z});if(J.fixMissingFormLabels)Q=Q.replace(/<(input|select|textarea)([^>]*)>/gi,(G,q,H)=>{if(/\baria-label\s*=/i.test(H)||/\baria-labelledby\s*=/i.test(H))return G;if(/\btype\s*=\s*["']hidden["']/i.test(H))return G;let U=H.match(/\bname\s*=\s*["']([^"']+)["']/i),Z=H.match(/\bid\s*=\s*["']([^"']+)["']/i),O=U?.[1]||Z?.[1]||q,$=G,V=`<${q}${H} aria-label="${O}">`;return K.push({type:"input-missing-label",description:`Added aria-label to ${q} element`,before:$,after:V}),V});if(J.fixMissingLang)Q=Q.replace(/<html([^>]*)>/gi,(G,q)=>{if(/\blang\s*=/i.test(q))return G;let H=G,U=`<html${q} lang="${J.defaultLang}">`;return K.push({type:"missing-lang",description:`Added lang="${J.defaultLang}" to html element`,before:H,after:U}),U});if(J.fixPositiveTabindex)Q=Q.replace(/\btabindex\s*=\s*["']([1-9]\d*)["']/gi,(G,q)=>{let H=G,U='tabindex="0"';return K.push({type:"positive-tabindex",description:`Changed tabindex="${q}" to tabindex="0"`,before:H,after:'tabindex="0"'}),'tabindex="0"'});if(J.fixButtonFocusable)Q=Q.replace(/<([a-z]+)(\s[^>]*role\s*=\s*["']button["'][^>]*)>/gi,(G,q,H)=>{if(/\btabindex\s*=/i.test(H))return G;if(q.toLowerCase()==="button")return G;let U=G,Z=`<${q}${H} tabindex="0">`;return K.push({type:"button-not-focusable",description:'Added tabindex="0" to element with role="button"',before:U,after:Z}),Z});if(J.fixTableHeaders)Q=Q.replace(/<th([^>]*)>/gi,(G,q)=>{if(/\bscope\s*=/i.test(q))return G;let H=G,U=`<th${q} scope="col">`;return K.push({type:"table-missing-scope",description:'Added scope="col" to table header',before:H,after:U}),U});return{original:z,fixed:_(Q),fixCount:K.length,fixes:K}}async function x(z,X={},J=!1){let K=await Bun.file(z).text(),j=v(K,X);if(J&&j.fixCount>0)await Bun.write(z,j.fixed);return j}async function m(z,X={},J={}){let K={},{recursive:j=!0,ignorePaths:_=[],writeBack:Q=!1,extensions:G=[".stx",".html",".htm"]}=J,q=G.length===1?`*${G[0]}`:`*{${G.join(",")}}`,H=I.join(z,j?`**/${q}`:q),U=new Bun.Glob(H);for await(let Z of U.scan()){if(_.some(($)=>Z.includes(I.normalize($))))continue;try{let $=await x(Z,X,Q);if($.fixCount>0)K[Z]=$}catch($){console.error(`Error fixing ${Z}:`,$)}}return K}var u={name:"a11y",handler:(z,X,J,K)=>{if(!X.length)return z;let j=X[0].replace(/['"]/g,""),_=X.length>1?X[1].replace(/['"]/g,""):"",G={"aria-label":"Ensure interactive elements have accessible labels","alt-text":"Provide alternative text for images",focus:"Ensure the element can receive keyboard focus",landmark:"Use appropriate landmark roles","heading-order":"Maintain proper heading hierarchy","color-contrast":"Ensure sufficient color contrast","keyboard-nav":"Make sure element is keyboard navigable","screen-reader":"Optimize for screen reader users"}[j]||"Make this element accessible";return`<!-- a11y-hint: ${_||G} -->${z}`},hasEndTag:!1},d={name:"screenReader",handler:(z)=>{return`<span class="sr-only">${z}</span>`},hasEndTag:!0};function r(){return[u,d]}
15
- export{M as Sr,L as Tr,h as Ur,s as Vr,k as Wr,N as Xr,y as Yr,R as Zr,c as _r,v as $r,x as as,m as bs,u as cs,d as ds,r as es};
15
+ export{M as fs,L as gs,h as hs,s as is,k as js,N as ks,y as ls,R as ms,c as ns,v as os,x as ps,m as qs,u as rs,d as ss,r as ts};
@@ -1,5 +1,5 @@
1
1
  // @bun
2
- import"./chunk-trtm887x.js";var N=0;function P(){return`eb-${++N}-${Date.now().toString(36)}`}function W(q,z={},A){let j=/@errorBoundary(?:\s*\(([^)]*)\))?\s*([\s\S]*?)@fallback\s*([\s\S]*?)@enderrorBoundary/gi;return q.replace(j,(D,F,J,K)=>{let L=P(),M=Q(F||"");return T(L,J.trim(),K.trim(),M)})}function Q(q){let z={},A=/(\w+)\s*:\s*(?:'([^']*)'|"([^"]*)"|(\w+))/g,j;while((j=A.exec(q))!==null){let D=j[1],F=j[2]||j[3]||j[4];switch(D){case"id":z.id=F;break;case"logErrors":z.logErrors=F==="true";break}}return z}function T(q,z,A,j){let D=j.logErrors!==!1;return`
2
+ import"./chunk-8rn5e39c.js";var N=0;function P(){return`eb-${++N}-${Date.now().toString(36)}`}function W(q,z={},A){let j=/@errorBoundary(?:\s*\(([^)]*)\))?\s*([\s\S]*?)@fallback\s*([\s\S]*?)@enderrorBoundary/gi;return q.replace(j,(D,F,J,K)=>{let L=P(),M=Q(F||"");return T(L,J.trim(),K.trim(),M)})}function Q(q){let z={},A=/(\w+)\s*:\s*(?:'([^']*)'|"([^"]*)"|(\w+))/g,j;while((j=A.exec(q))!==null){let D=j[1],F=j[2]||j[3]||j[4];switch(D){case"id":z.id=F;break;case"logErrors":z.logErrors=F==="true";break}}return z}function T(q,z,A,j){let D=j.logErrors!==!1;return`
3
3
  <div class="stx-error-boundary" data-boundary-id="${q}" data-has-error="false">
4
4
  <div class="stx-error-boundary-content" data-boundary-content="${q}">
5
5
  ${z}
@@ -1,3 +1,3 @@
1
1
  // @bun
2
- import{Bq as q,Fq as y}from"./chunk-zat2ndst.js";import{iu as L}from"./chunk-trtm887x.js";import M from"fs";import X from"path";var T=new Map,Q=new Map;async function A(j){let z;for(let K=0;K<3;K++)try{let V=(await M.promises.stat(j)).mtime.getTime(),J=Q.get(j);if(J&&J.mtime===V)return J.content;let W=await Bun.file(j).text(),U=(await M.promises.stat(j)).mtime.getTime();if(U!==V)continue;return Q.set(j,{content:W,mtime:U}),W}catch(I){z=I;break}throw Q.delete(j),Error(`File not found: ${j}${z?` (${z.message})`:""}`)}function H(j){Q.delete(j)}function v(j){for(let B of Q.keys())if(B.startsWith(j))Q.delete(B)}var Z=null,b=null,N=null;function E(j){N=j}async function F(j=!1){let B=N??await import("./chunk-pdh79z63.js");if(j)return B.generateSignalsRuntimeDev();if(Z===null)Z=B.generateSignalsRuntime();return Z}var $=null;async function R(){if($===null){let{getRouterScript:j}=await import("./chunk-aw9z3m10.js");$=j()}return $}function S(){Q.clear(),y(),Z=null,b=null,$=null}function k(j){let B={debug:j.debug===!0,middleware:(j.middleware??[]).map((z)=>({name:z.name,timing:z.timing,handler:String(z.handler)})),customDirectives:(j.customDirectives??[]).map((z)=>({name:z.name,hasEndTag:z.hasEndTag===!0,handler:String(z.handler)}))};return new Bun.CryptoHasher("sha1").update(JSON.stringify(B)).digest("hex")}async function _(j,B){try{if(!B.cachePath)return null;let z=X.resolve(B.cachePath),K=X.join(z,`${D(j)}.html`),I=X.join(z,`${D(j)}.meta.json`);if(!await q(K)||!await q(I))return null;let V=await Bun.file(I).text(),J=JSON.parse(V);if(J.cacheVersion!==B.cacheVersion)return null;if(J.optionsSignature!==k(B))return null;if((await M.promises.stat(j)).mtime.getTime()>J.mtime)return null;for(let Y of J.dependencies)if(await q(Y)){if((await M.promises.stat(Y)).mtime.getTime()>J.mtime)return null}else return null;return await Bun.file(K).text()}catch(z){return console.warn(`Cache error for ${j}:`,z),null}}async function g(j,B,z,K){try{if(!K.cachePath)return;let I=X.resolve(K.cachePath);await M.promises.mkdir(I,{recursive:!0});let V=X.join(I,`${D(j)}.html`),J=X.join(I,`${D(j)}.meta.json`),W=await M.promises.stat(j);await Bun.write(V,B);let Y={sourcePath:j,mtime:W.mtime.getTime(),dependencies:Array.from(z),cacheVersion:K.cacheVersion,optionsSignature:k(K),generatedAt:Date.now()};await Bun.write(J,JSON.stringify(Y,null,2)),T.set(j,{output:B,mtime:W.mtime.getTime(),dependencies:z})}catch(I){console.warn(`Failed to cache template ${j}:`,I)}}var G=16;function D(j){return new Bun.CryptoHasher("sha1").update(j).digest("hex").substring(0,G)}
3
- export{T as Ji,A as Ki,H as Li,v as Mi,E as Ni,F as Oi,R as Pi,S as Qi,_ as Ri,g as Si,D as Ti};
2
+ import{Qq as q,Uq as y}from"./chunk-pzcf36xm.js";import{xu as L}from"./chunk-8rn5e39c.js";import M from"fs";import X from"path";var T=new Map,Q=new Map;async function A(j){let z;for(let K=0;K<3;K++)try{let V=(await M.promises.stat(j)).mtime.getTime(),J=Q.get(j);if(J&&J.mtime===V)return J.content;let W=await Bun.file(j).text(),U=(await M.promises.stat(j)).mtime.getTime();if(U!==V)continue;return Q.set(j,{content:W,mtime:U}),W}catch(I){z=I;break}throw Q.delete(j),Error(`File not found: ${j}${z?` (${z.message})`:""}`)}function H(j){Q.delete(j)}function v(j){for(let B of Q.keys())if(B.startsWith(j))Q.delete(B)}var Z=null,b=null,N=null;function E(j){N=j}async function F(j=!1){let B=N??await import("./chunk-xrnqz76v.js");if(j)return B.generateSignalsRuntimeDev();if(Z===null)Z=B.generateSignalsRuntime();return Z}var $=null;async function R(){if($===null){let{getRouterScript:j}=await import("./chunk-xqnwy1t6.js");$=j()}return $}function S(){Q.clear(),y(),Z=null,b=null,$=null}function k(j){let B={debug:j.debug===!0,middleware:(j.middleware??[]).map((z)=>({name:z.name,timing:z.timing,handler:String(z.handler)})),customDirectives:(j.customDirectives??[]).map((z)=>({name:z.name,hasEndTag:z.hasEndTag===!0,handler:String(z.handler)}))};return new Bun.CryptoHasher("sha1").update(JSON.stringify(B)).digest("hex")}async function _(j,B){try{if(!B.cachePath)return null;let z=X.resolve(B.cachePath),K=X.join(z,`${D(j)}.html`),I=X.join(z,`${D(j)}.meta.json`);if(!await q(K)||!await q(I))return null;let V=await Bun.file(I).text(),J=JSON.parse(V);if(J.cacheVersion!==B.cacheVersion)return null;if(J.optionsSignature!==k(B))return null;if((await M.promises.stat(j)).mtime.getTime()>J.mtime)return null;for(let Y of J.dependencies)if(await q(Y)){if((await M.promises.stat(Y)).mtime.getTime()>J.mtime)return null}else return null;return await Bun.file(K).text()}catch(z){return console.warn(`Cache error for ${j}:`,z),null}}async function g(j,B,z,K){try{if(!K.cachePath)return;let I=X.resolve(K.cachePath);await M.promises.mkdir(I,{recursive:!0});let V=X.join(I,`${D(j)}.html`),J=X.join(I,`${D(j)}.meta.json`),W=await M.promises.stat(j);await Bun.write(V,B);let Y={sourcePath:j,mtime:W.mtime.getTime(),dependencies:Array.from(z),cacheVersion:K.cacheVersion,optionsSignature:k(K),generatedAt:Date.now()};await Bun.write(J,JSON.stringify(Y,null,2)),T.set(j,{output:B,mtime:W.mtime.getTime(),dependencies:z})}catch(I){console.warn(`Failed to cache template ${j}:`,I)}}var G=16;function D(j){return new Bun.CryptoHasher("sha1").update(j).digest("hex").substring(0,G)}
3
+ export{T as Ni,A as Oi,H as Pi,v as Qi,E as Ri,F as Si,R as Ti,S as Ui,_ as Vi,g as Wi,D as Xi};
@@ -1,5 +1,5 @@
1
1
  // @bun
2
- import{Fh as x,Kh as B,Lh as c,Mh as u,Nh as n}from"./chunk-q8szpd6w.js";import{iu as v}from"./chunk-trtm887x.js";import{resolve as JJ,basename as WJ,extname as _J,join as LJ}from"path";import{mkdir as QJ}from"fs/promises";var ZJ={enabled:!0,directory:".stx/media-cache",maxAge:30,maxSize:2000,cacheTranscoded:!0,cacheThumbnails:!0,cacheManifests:!0};class V{config;constructor(K={}){this.config={...ZJ,...K}}async get(K,J){return c(K,J,"video",this.config)}async set(K,J,X){return u(K,J,X,"video",this.config)}async clear(){return n("video",this.config)}updateConfig(K){this.config={...this.config,...K}}}var S=null;function D(K){if(!S)S=new V(K);else if(K)S.updateConfig(K);return S}async function q(K,J,X){let N=X?{directory:`${X.outputDir}/../.cache`}:{};return D(N).get(K,J)}async function b(K,J,X,N){let Z=N?{directory:`${N.outputDir}/../.cache`}:{};return D(Z).set(K,J,X)}async function $J(){return D().clear()}import{resolve as y,basename as P,extname as f,join as U}from"path";import{mkdir as g}from"fs/promises";async function m(){try{return await import("ts-videos")}catch{return null}}async function h(K,J,X,N){let Z=await m();if(!Z)return console.warn("[stx-media] ts-videos not installed, cannot generate poster"),null;try{let $=y(K);if(!await B($))return null;await g(X,{recursive:!0});let Y=await x($),z=P(K,f(K)),G=J.format||"webp",M=J.timestamp||0,E=`${z}-poster-${Y}.${G}`,W=U(X,E),Q=await Z.extractThumbnails($,{timestamps:[M],width:J.width||1280,height:J.height,format:G,quality:J.quality||85,outputDir:X,outputPattern:E.replace(`.${G}`,"")});if(Q&&Q.length>0){let _=Q[0];return{path:W,url:`${N}/${E}`,width:_.width||J.width||1280,height:_.height||720,timestamp:M,size:_.size||0}}return null}catch($){return console.warn(`[stx-media] Failed to generate poster: ${$}`),null}}async function d(K,J,X,N){let Z=await m();if(!Z)return[];try{let $=y(K);if(!await B($))return[];await g(X,{recursive:!0});let Y=await x($),z=P(K,f(K)),G=J.format||"webp",W=(await new Z.Input($).getInfo()).duration||60,Q=J.count||10,_=J.interval||W/Q,O=[];for(let w=0;w<Q&&w*_<W;w++)O.push(w*_);let L=await Z.extractThumbnails($,{timestamps:O,width:J.width||320,format:G,quality:J.quality||80,outputDir:X,outputPattern:`${z}-thumb-${Y}`});if(L&&L.length>0)return L.map((w,j)=>({path:w.path||U(X,`${z}-thumb-${Y}-${j}.${G}`),url:`${N}/${z}-thumb-${Y}-${j}.${G}`,width:w.width||J.width||320,height:w.height||180,timestamp:O[j],size:w.size||0}));return[]}catch($){return console.warn(`[stx-media] Failed to generate thumbnails: ${$}`),[]}}async function zJ(K,J,X,N){let Z=await m();if(!Z)return console.warn("[stx-media] ts-videos not installed, cannot generate sprite sheet"),null;try{let $=y(K);if(!await B($))return null;await g(X,{recursive:!0});let Y=await x($),z=P(K,f(K)),E=(await new Z.Input($).getInfo()).duration||60,W=J.columns||10,Q=J.interval||5,_=J.thumbnailWidth||160,O=J.thumbnailHeight||90,L=J.format||"jpeg",w=Math.ceil(E/Q),j=Math.ceil(w/W),F=`${z}-sprite-${Y}.${L}`,k=U(X,F),T=[];for(let I=0;I<w;I++)T.push(I*Q);let A=await Z.extractThumbnails($,{timestamps:T,width:_,height:O,format:L,quality:J.quality||70,outputDir:U(X,".temp")});if(!A||A.length===0)return null;try{let I=await import("ts-images"),H=W*_,kJ=j*O,jJ=await I.createSprite({images:A.map((YJ)=>YJ.path),columns:W,padding:0,outputPath:k,format:L,quality:J.quality||70});return{url:`${N}/${F}`,path:k,columns:W,rows:j,thumbnailWidth:_,thumbnailHeight:O,interval:Q,totalFrames:w}}catch{return console.warn("[stx-media] ts-images not installed, sprite sheet generation skipped"),null}}catch($){return console.warn(`[stx-media] Failed to generate sprite sheet: ${$}`),null}}import{resolve as r,basename as e,extname as i,join as C}from"path";import{mkdir as R,writeFile as o}from"fs/promises";async function t(){try{return await import("ts-videos")}catch{return null}}var s=[{label:"1080p",width:1920,height:1080,bitrate:5000000,audioBitrate:192000},{label:"720p",width:1280,height:720,bitrate:2500000,audioBitrate:128000},{label:"480p",width:854,height:480,bitrate:1e6,audioBitrate:96000},{label:"360p",width:640,height:360,bitrate:600000,audioBitrate:64000}];async function p(K,J,X,N,Z){let $=await t();if(!$)return console.warn("[stx-media] ts-videos not installed, cannot generate HLS manifest"),null;try{let Y=r(K);if(!await B(Y))return null;let z=await x(Y),G=e(K,i(K)),M=C(X,`${G}-${z}-hls`);await R(M,{recursive:!0});let E=J.length>0?J:s,W=Z?.segmentDuration||6,O=(await new $.Input(Y).getInfo()).duration||0,L=[],w=0;for(let k of E){let T=C(M,k.label);await R(T,{recursive:!0});let A=`${k.label}.m3u8`,I=C(T,A);try{let H=await $.generateHLS(Y,{outputDir:T,segmentDuration:W,width:k.width,height:k.height,videoBitrate:k.bitrate,audioBitrate:k.audioBitrate,playlistName:k.label});if(H)L.push({quality:k,url:`${N}/${G}-${z}-hls/${k.label}/${A}`,path:I}),w+=H.segmentCount||Math.ceil(O/W)}catch(H){console.warn(`[stx-media] Failed to generate HLS for ${k.label}: ${H}`)}}if(L.length===0)return null;let j=C(M,"master.m3u8"),F=GJ(L,N,G,z);return await o(j,F),{manifestUrl:`${N}/${G}-${z}-hls/master.m3u8`,manifestPath:j,playlists:L,segmentCount:w,duration:O}}catch(Y){return console.warn(`[stx-media] Failed to generate HLS manifest: ${Y}`),null}}function GJ(K,J,X,N){let Z=["#EXTM3U","#EXT-X-VERSION:3"];for(let $ of K){let{quality:Y}=$,z=Y.bitrate+(Y.audioBitrate||128000),G=`${Y.width}x${Y.height||Math.round(Y.width*9/16)}`;Z.push(`#EXT-X-STREAM-INF:BANDWIDTH=${z},RESOLUTION=${G},NAME="${Y.label}"`,`${Y.label}/${Y.label}.m3u8`)}return Z.join(`
2
+ import{Jh as x,Oh as B,Ph as c,Qh as u,Rh as n}from"./chunk-jw1besrt.js";import{xu as v}from"./chunk-8rn5e39c.js";import{resolve as JJ,basename as WJ,extname as _J,join as LJ}from"path";import{mkdir as QJ}from"fs/promises";var ZJ={enabled:!0,directory:".stx/media-cache",maxAge:30,maxSize:2000,cacheTranscoded:!0,cacheThumbnails:!0,cacheManifests:!0};class V{config;constructor(K={}){this.config={...ZJ,...K}}async get(K,J){return c(K,J,"video",this.config)}async set(K,J,X){return u(K,J,X,"video",this.config)}async clear(){return n("video",this.config)}updateConfig(K){this.config={...this.config,...K}}}var S=null;function D(K){if(!S)S=new V(K);else if(K)S.updateConfig(K);return S}async function q(K,J,X){let N=X?{directory:`${X.outputDir}/../.cache`}:{};return D(N).get(K,J)}async function b(K,J,X,N){let Z=N?{directory:`${N.outputDir}/../.cache`}:{};return D(Z).set(K,J,X)}async function $J(){return D().clear()}import{resolve as y,basename as P,extname as f,join as U}from"path";import{mkdir as g}from"fs/promises";async function m(){try{return await import("ts-videos")}catch{return null}}async function h(K,J,X,N){let Z=await m();if(!Z)return console.warn("[stx-media] ts-videos not installed, cannot generate poster"),null;try{let $=y(K);if(!await B($))return null;await g(X,{recursive:!0});let Y=await x($),z=P(K,f(K)),G=J.format||"webp",M=J.timestamp||0,E=`${z}-poster-${Y}.${G}`,W=U(X,E),Q=await Z.extractThumbnails($,{timestamps:[M],width:J.width||1280,height:J.height,format:G,quality:J.quality||85,outputDir:X,outputPattern:E.replace(`.${G}`,"")});if(Q&&Q.length>0){let _=Q[0];return{path:W,url:`${N}/${E}`,width:_.width||J.width||1280,height:_.height||720,timestamp:M,size:_.size||0}}return null}catch($){return console.warn(`[stx-media] Failed to generate poster: ${$}`),null}}async function d(K,J,X,N){let Z=await m();if(!Z)return[];try{let $=y(K);if(!await B($))return[];await g(X,{recursive:!0});let Y=await x($),z=P(K,f(K)),G=J.format||"webp",W=(await new Z.Input($).getInfo()).duration||60,Q=J.count||10,_=J.interval||W/Q,O=[];for(let w=0;w<Q&&w*_<W;w++)O.push(w*_);let L=await Z.extractThumbnails($,{timestamps:O,width:J.width||320,format:G,quality:J.quality||80,outputDir:X,outputPattern:`${z}-thumb-${Y}`});if(L&&L.length>0)return L.map((w,j)=>({path:w.path||U(X,`${z}-thumb-${Y}-${j}.${G}`),url:`${N}/${z}-thumb-${Y}-${j}.${G}`,width:w.width||J.width||320,height:w.height||180,timestamp:O[j],size:w.size||0}));return[]}catch($){return console.warn(`[stx-media] Failed to generate thumbnails: ${$}`),[]}}async function zJ(K,J,X,N){let Z=await m();if(!Z)return console.warn("[stx-media] ts-videos not installed, cannot generate sprite sheet"),null;try{let $=y(K);if(!await B($))return null;await g(X,{recursive:!0});let Y=await x($),z=P(K,f(K)),E=(await new Z.Input($).getInfo()).duration||60,W=J.columns||10,Q=J.interval||5,_=J.thumbnailWidth||160,O=J.thumbnailHeight||90,L=J.format||"jpeg",w=Math.ceil(E/Q),j=Math.ceil(w/W),F=`${z}-sprite-${Y}.${L}`,k=U(X,F),T=[];for(let I=0;I<w;I++)T.push(I*Q);let A=await Z.extractThumbnails($,{timestamps:T,width:_,height:O,format:L,quality:J.quality||70,outputDir:U(X,".temp")});if(!A||A.length===0)return null;try{let I=await import("ts-images"),H=W*_,kJ=j*O,jJ=await I.createSprite({images:A.map((YJ)=>YJ.path),columns:W,padding:0,outputPath:k,format:L,quality:J.quality||70});return{url:`${N}/${F}`,path:k,columns:W,rows:j,thumbnailWidth:_,thumbnailHeight:O,interval:Q,totalFrames:w}}catch{return console.warn("[stx-media] ts-images not installed, sprite sheet generation skipped"),null}}catch($){return console.warn(`[stx-media] Failed to generate sprite sheet: ${$}`),null}}import{resolve as r,basename as e,extname as i,join as C}from"path";import{mkdir as R,writeFile as o}from"fs/promises";async function t(){try{return await import("ts-videos")}catch{return null}}var s=[{label:"1080p",width:1920,height:1080,bitrate:5000000,audioBitrate:192000},{label:"720p",width:1280,height:720,bitrate:2500000,audioBitrate:128000},{label:"480p",width:854,height:480,bitrate:1e6,audioBitrate:96000},{label:"360p",width:640,height:360,bitrate:600000,audioBitrate:64000}];async function p(K,J,X,N,Z){let $=await t();if(!$)return console.warn("[stx-media] ts-videos not installed, cannot generate HLS manifest"),null;try{let Y=r(K);if(!await B(Y))return null;let z=await x(Y),G=e(K,i(K)),M=C(X,`${G}-${z}-hls`);await R(M,{recursive:!0});let E=J.length>0?J:s,W=Z?.segmentDuration||6,O=(await new $.Input(Y).getInfo()).duration||0,L=[],w=0;for(let k of E){let T=C(M,k.label);await R(T,{recursive:!0});let A=`${k.label}.m3u8`,I=C(T,A);try{let H=await $.generateHLS(Y,{outputDir:T,segmentDuration:W,width:k.width,height:k.height,videoBitrate:k.bitrate,audioBitrate:k.audioBitrate,playlistName:k.label});if(H)L.push({quality:k,url:`${N}/${G}-${z}-hls/${k.label}/${A}`,path:I}),w+=H.segmentCount||Math.ceil(O/W)}catch(H){console.warn(`[stx-media] Failed to generate HLS for ${k.label}: ${H}`)}}if(L.length===0)return null;let j=C(M,"master.m3u8"),F=GJ(L,N,G,z);return await o(j,F),{manifestUrl:`${N}/${G}-${z}-hls/master.m3u8`,manifestPath:j,playlists:L,segmentCount:w,duration:O}}catch(Y){return console.warn(`[stx-media] Failed to generate HLS manifest: ${Y}`),null}}function GJ(K,J,X,N){let Z=["#EXTM3U","#EXT-X-VERSION:3"];for(let $ of K){let{quality:Y}=$,z=Y.bitrate+(Y.audioBitrate||128000),G=`${Y.width}x${Y.height||Math.round(Y.width*9/16)}`;Z.push(`#EXT-X-STREAM-INF:BANDWIDTH=${z},RESOLUTION=${G},NAME="${Y.label}"`,`${Y.label}/${Y.label}.m3u8`)}return Z.join(`
3
3
  `)}async function l(K,J,X,N,Z){let $=await t();if(!$)return console.warn("[stx-media] ts-videos not installed, cannot generate DASH manifest"),null;try{let Y=r(K);if(!await B(Y))return null;let z=await x(Y),G=e(K,i(K)),M=C(X,`${G}-${z}-dash`);await R(M,{recursive:!0});let E=J.length>0?J:s,W=Z?.segmentDuration||4,Q=Z?.minBufferTime||2,L=(await new $.Input(Y).getInfo()).duration||0,w=[],j=[];for(let A of E){let I=C(M,A.label);await R(I,{recursive:!0});try{if(await $.generateDASH(Y,{outputDir:I,segmentDuration:W,width:A.width,height:A.height,videoBitrate:A.bitrate,audioBitrate:A.audioBitrate})){if(w.push({bandwidth:A.bitrate,width:A.width,height:A.height||Math.round(A.width*9/16),url:`${N}/${G}-${z}-dash/${A.label}/video`}),A.audioBitrate)j.push({bandwidth:A.audioBitrate,url:`${N}/${G}-${z}-dash/${A.label}/audio`})}}catch(H){console.warn(`[stx-media] Failed to generate DASH for ${A.label}: ${H}`)}}if(w.length===0)return null;let F=C(M,"manifest.mpd"),k=NJ(w,j,L,W,Q);await o(F,k);let T=[{type:"video",representations:w}];if(j.length>0)T.push({type:"audio",representations:j});return{manifestUrl:`${N}/${G}-${z}-dash/manifest.mpd`,manifestPath:F,adaptationSets:T,duration:L}}catch(Y){return console.warn(`[stx-media] Failed to generate DASH manifest: ${Y}`),null}}function NJ(K,J,X,N,Z){let $=a(X),Y=a(Z),z=`<?xml version="1.0" encoding="UTF-8"?>
4
4
  <MPD xmlns="urn:mpeg:dash:schema:mpd:2011"
5
5
  xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
@@ -26,4 +26,4 @@ import{Fh as x,Kh as B,Lh as c,Mh as u,Nh as n}from"./chunk-q8szpd6w.js";import{
26
26
  </Representation>
27
27
  `}z+=` </AdaptationSet>
28
28
  `}return z+=` </Period>
29
- </MPD>`,z}function a(K){let J=Math.floor(K/3600),X=Math.floor(K%3600/60),N=Math.floor(K%60),Z="PT";if(J>0)Z+=`${J}H`;if(X>0)Z+=`${X}M`;return Z+=`${N}S`,Z}async function KJ(){try{return await import("ts-videos")}catch{return null}}function MJ(K){switch(K){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 OJ(K){switch(K){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 XJ(K){let J=await KJ();if(!J)return null;try{let X=JJ(K),Z=await new J.Input(X).getInfo();return{duration:Z.duration||0,width:Z.width||0,height:Z.height||0,frameRate:Z.frameRate||0,bitrate:Z.bitrate||0,codec:Z.videoCodec||"",audioCodec:Z.audioCodec}}catch(X){return console.warn(`[stx-media] Failed to analyze video: ${X}`),null}}async function wJ(K,J,X,N){let Z=await KJ();if(!Z)return console.warn("[stx-media] ts-videos not installed, skipping processing"),{src:K,processed:!1};let $=await q(K,J,X);if($)return $;try{let Y=JJ(K);if(!await B(Y))return{src:K,processed:!1,errors:[`Source file not found: ${K}`]};let z=X.outputDir||"dist/videos",G=X.baseUrl||"/videos";await QJ(z,{recursive:!0});let M=await x(Y),E=WJ(K,_J(K)),W={src:K,processed:!0,hash:M};N?.({percentage:5,stage:"analyzing"}),W.metadata=await XJ(Y)||void 0;let Q={};if(J.quality)Q.bitrate=MJ(J.quality);if(J.platform)Object.assign(Q,OJ(J.platform));if(J.transcode)Object.assign(Q,J.transcode);if(Object.keys(Q).length>0||J.process){N?.({percentage:10,stage:"transcoding"});let _=`${E}-${M}.mp4`,O=LJ(z,_);try{let L=await AJ(Y,O,Q,Z,(w)=>N?.({percentage:10+w*0.5,stage:"transcoding"}));if(L)W.transcoded={path:O,url:`${G}/${_}`,duration:L.duration,size:L.size,video:{codec:Q.codec||"h264",width:L.width,height:L.height,bitrate:L.bitrate,frameRate:L.frameRate},audio:L.audioCodec?{codec:Q.audioCodec||"aac",bitrate:Q.audioBitrate||128000,sampleRate:Q.sampleRate||48000,channels:Q.channels||2}:void 0}}catch(L){W.errors=W.errors||[],W.errors.push(`Transcoding failed: ${L}`)}}if(J.generatePoster){N?.({percentage:65,stage:"generating-poster"});let _=typeof J.generatePoster==="object"?J.generatePoster:{timestamp:0},O=await h(Y,_,z,G);if(O)W.poster=O}if(X.thumbnails?.enabled){N?.({percentage:70,stage:"generating-thumbnails"});let _=await d(Y,X.thumbnails,z,G);if(_.length>0)W.thumbnails=_}if(J.streaming){N?.({percentage:80,stage:"generating-manifests"});let _=typeof J.streaming==="object"?J.streaming:X.streaming||{format:"hls"};if(_.format==="hls"||_.format===void 0){let O=await p(Y,_.qualities||X.streaming?.defaultQualities||[],z,G);if(O)W.streaming={...W.streaming,hls:O}}if(_.format==="dash"){let O=await l(Y,_.qualities||X.streaming?.defaultQualities||[],z,G);if(O)W.streaming={...W.streaming,dash:O}}}if(J.spriteSheet)N?.({percentage:90,stage:"generating-sprite-sheet"});return N?.({percentage:100,stage:"complete"}),await b(K,J,W,X),W}catch(Y){return{src:K,processed:!1,errors:[`Processing failed: ${Y}`]}}}async function AJ(K,J,X,N,Z){try{let Y=await new N.Conversion(K,J,{videoCodec:X.codec,videoBitrate:X.bitrate,width:X.maxWidth,height:X.maxHeight,frameRate:X.frameRate,audioCodec:X.audioCodec,audioBitrate:X.audioBitrate,sampleRate:X.sampleRate,channels:X.channels}).run((z)=>{Z?.(z.percentage/100)});return{duration:Y.duration||0,size:Y.size||0,width:Y.width||X.maxWidth||0,height:Y.height||X.maxHeight||0,bitrate:Y.bitrate||X.bitrate||0,frameRate:Y.frameRate||X.frameRate||30,audioCodec:Y.audioCodec}}catch($){return console.error(`[stx-media] Transcoding failed: ${$}`),null}}export{V as uh,q as vh,b as wh,$J as xh,h as yh,d as zh,zJ as Ah,p as Bh,l as Ch,XJ as Dh,wJ as Eh};
29
+ </MPD>`,z}function a(K){let J=Math.floor(K/3600),X=Math.floor(K%3600/60),N=Math.floor(K%60),Z="PT";if(J>0)Z+=`${J}H`;if(X>0)Z+=`${X}M`;return Z+=`${N}S`,Z}async function KJ(){try{return await import("ts-videos")}catch{return null}}function MJ(K){switch(K){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 OJ(K){switch(K){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 XJ(K){let J=await KJ();if(!J)return null;try{let X=JJ(K),Z=await new J.Input(X).getInfo();return{duration:Z.duration||0,width:Z.width||0,height:Z.height||0,frameRate:Z.frameRate||0,bitrate:Z.bitrate||0,codec:Z.videoCodec||"",audioCodec:Z.audioCodec}}catch(X){return console.warn(`[stx-media] Failed to analyze video: ${X}`),null}}async function wJ(K,J,X,N){let Z=await KJ();if(!Z)return console.warn("[stx-media] ts-videos not installed, skipping processing"),{src:K,processed:!1};let $=await q(K,J,X);if($)return $;try{let Y=JJ(K);if(!await B(Y))return{src:K,processed:!1,errors:[`Source file not found: ${K}`]};let z=X.outputDir||"dist/videos",G=X.baseUrl||"/videos";await QJ(z,{recursive:!0});let M=await x(Y),E=WJ(K,_J(K)),W={src:K,processed:!0,hash:M};N?.({percentage:5,stage:"analyzing"}),W.metadata=await XJ(Y)||void 0;let Q={};if(J.quality)Q.bitrate=MJ(J.quality);if(J.platform)Object.assign(Q,OJ(J.platform));if(J.transcode)Object.assign(Q,J.transcode);if(Object.keys(Q).length>0||J.process){N?.({percentage:10,stage:"transcoding"});let _=`${E}-${M}.mp4`,O=LJ(z,_);try{let L=await AJ(Y,O,Q,Z,(w)=>N?.({percentage:10+w*0.5,stage:"transcoding"}));if(L)W.transcoded={path:O,url:`${G}/${_}`,duration:L.duration,size:L.size,video:{codec:Q.codec||"h264",width:L.width,height:L.height,bitrate:L.bitrate,frameRate:L.frameRate},audio:L.audioCodec?{codec:Q.audioCodec||"aac",bitrate:Q.audioBitrate||128000,sampleRate:Q.sampleRate||48000,channels:Q.channels||2}:void 0}}catch(L){W.errors=W.errors||[],W.errors.push(`Transcoding failed: ${L}`)}}if(J.generatePoster){N?.({percentage:65,stage:"generating-poster"});let _=typeof J.generatePoster==="object"?J.generatePoster:{timestamp:0},O=await h(Y,_,z,G);if(O)W.poster=O}if(X.thumbnails?.enabled){N?.({percentage:70,stage:"generating-thumbnails"});let _=await d(Y,X.thumbnails,z,G);if(_.length>0)W.thumbnails=_}if(J.streaming){N?.({percentage:80,stage:"generating-manifests"});let _=typeof J.streaming==="object"?J.streaming:X.streaming||{format:"hls"};if(_.format==="hls"||_.format===void 0){let O=await p(Y,_.qualities||X.streaming?.defaultQualities||[],z,G);if(O)W.streaming={...W.streaming,hls:O}}if(_.format==="dash"){let O=await l(Y,_.qualities||X.streaming?.defaultQualities||[],z,G);if(O)W.streaming={...W.streaming,dash:O}}}if(J.spriteSheet)N?.({percentage:90,stage:"generating-sprite-sheet"});return N?.({percentage:100,stage:"complete"}),await b(K,J,W,X),W}catch(Y){return{src:K,processed:!1,errors:[`Processing failed: ${Y}`]}}}async function AJ(K,J,X,N,Z){try{let Y=await new N.Conversion(K,J,{videoCodec:X.codec,videoBitrate:X.bitrate,width:X.maxWidth,height:X.maxHeight,frameRate:X.frameRate,audioCodec:X.audioCodec,audioBitrate:X.audioBitrate,sampleRate:X.sampleRate,channels:X.channels}).run((z)=>{Z?.(z.percentage/100)});return{duration:Y.duration||0,size:Y.size||0,width:Y.width||X.maxWidth||0,height:Y.height||X.maxHeight||0,bitrate:Y.bitrate||X.bitrate||0,frameRate:Y.frameRate||X.frameRate||30,audioCodec:Y.audioCodec}}catch($){return console.error(`[stx-media] Transcoding failed: ${$}`),null}}export{V as yh,q as zh,b as Ah,$J as Bh,h as Ch,d as Dh,zJ as Eh,p as Fh,l as Gh,XJ as Hh,wJ as Ih};
@@ -0,0 +1,2 @@
1
+ // @bun
2
+ import{$e as g,Xe as c,Ye as d,Ze as e,_e as f,af as h}from"./chunk-anenwsj3.js";import{Ag as b,xg as a}from"./chunk-ydk1n77q.js";import"./chunk-4wdbmjmg.js";import"./chunk-efr3ejqt.js";import"./chunk-pzcf36xm.js";import"./chunk-kvz7rg2x.js";import"./chunk-arnse15r.js";import"./chunk-6b0xz02h.js";import"./chunk-135mme4g.js";import"./chunk-qfsktf7s.js";import"./chunk-80qre9zp.js";import"./chunk-z794cdmn.js";import"./chunk-dykhpgyx.js";import"./chunk-ry86fd41.js";import"./chunk-kdpy5rgk.js";import"./chunk-x0bcc9sj.js";import"./chunk-8rn5e39c.js";export{d as virtualPathFor,g as typecheckStxFiles,e as sourcePathFor,h as formatTypecheckDiagnostics,f as findRuntimeTypeDeclarations,b as extractTemplateExpressions,a as extractScriptBlocks,c as buildVirtualSource};
@@ -2,4 +2,4 @@
2
2
  function G(q){if(!q||typeof q!=="object")return!1;let z=q;return typeof z.message==="string"&&(z.name==="BuildMessage"||z.name==="ResolveMessage"||("position"in z))}function H(q){if(q&&typeof q==="object"&&Array.isArray(q.errors))return q.errors;return[q]}function I(q,z){let j=[];for(let A of H(q)){if(G(A)){let D=A.position||void 0;j.push({file:z||D?.file,line:D?.line,column:D?.column,message:A.message??"",lineText:D?.lineText});continue}j.push({file:z,message:A instanceof Error?A.message:String(A)})}return j}function J(q,z){return I(q,z).map((j)=>{let A=j.file?`${j.file}${j.line?`:${j.line}${j.column?`:${j.column}`:""}`:""}`:"",D=j.lineText?`
3
3
  ${j.lineText.trim()}`:"";return A?`${A}: ${j.message}${D}`:`${j.message}${D}`}).join(`
4
4
  `)}
5
- export{I as bl,J as cl};
5
+ export{I as fl,J as gl};
@@ -1,5 +1,5 @@
1
1
  // @bun
2
- import"./chunk-trtm887x.js";function F(){return`<script data-stx-scoped data-stx-x-element-runtime data-stx-run="always">
2
+ import"./chunk-8rn5e39c.js";function F(){return`<script data-stx-scoped data-stx-x-element-runtime data-stx-run="always">
3
3
  (function() {
4
4
  'use strict';
5
5