@stacksjs/stx 0.2.338 → 0.2.340

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 (93) hide show
  1. package/dist/builtins/stx-image.js +3 -2
  2. package/dist/builtins/stx-link.js +2 -1
  3. package/dist/caching.d.ts +1 -18
  4. package/dist/caching.js +2 -21
  5. package/dist/chunk-0pje0pjq.js +2 -0
  6. package/dist/{chunk-95t7pked.js → chunk-1w8bpytb.js} +1 -1
  7. package/dist/{chunk-wakb8z5q.js → chunk-284ag6fs.js} +9 -9
  8. package/dist/{chunk-9btdax2s.js → chunk-28q3vycz.js} +1 -1
  9. package/dist/{chunk-nhbc464j.js → chunk-3agx4hyd.js} +1 -1
  10. package/dist/{chunk-fjrkyhm7.js → chunk-3b9sxnty.js} +1 -1
  11. package/dist/{chunk-8cg15rr7.js → chunk-5ggt2ryn.js} +1 -1
  12. package/dist/{chunk-46tmg3k4.js → chunk-5t8ersrw.js} +1 -1
  13. package/dist/{chunk-x01sw9wy.js → chunk-605955nh.js} +1 -1
  14. package/dist/{chunk-3cjvqa0s.js → chunk-64qg8jes.js} +1 -1
  15. package/dist/{chunk-gz539gk6.js → chunk-6av24ywm.js} +1 -1
  16. package/dist/chunk-6es5r4az.js +3 -0
  17. package/dist/chunk-6j6ek3j1.js +2 -0
  18. package/dist/{chunk-zye9r15n.js → chunk-6nde3nmc.js} +1 -1
  19. package/dist/{chunk-vm5jbgb1.js → chunk-6zsc0z5a.js} +3 -3
  20. package/dist/{chunk-5r7gfwpj.js → chunk-756dqqn1.js} +1 -1
  21. package/dist/{chunk-m1p2n3nf.js → chunk-7xjm1zqa.js} +1 -1
  22. package/dist/{chunk-9m5sxaen.js → chunk-82h5rp34.js} +1 -1
  23. package/dist/{chunk-mnyehz4t.js → chunk-8de19dmw.js} +1 -1
  24. package/dist/{chunk-hfzv07az.js → chunk-95e1m9p8.js} +1 -1
  25. package/dist/{chunk-qhdp0ycf.js → chunk-9pv7gcey.js} +1 -1
  26. package/dist/{chunk-kawdj1j7.js → chunk-a2mj88c6.js} +1 -1
  27. package/dist/{chunk-39xtzfzf.js → chunk-apa2v787.js} +1 -1
  28. package/dist/{chunk-f6sejeg3.js → chunk-axqfm9b4.js} +1 -1
  29. package/dist/{chunk-4pcjt99d.js → chunk-cjcj2gsq.js} +1 -1
  30. package/dist/{chunk-w0hzaka3.js → chunk-d6yyzpsv.js} +98 -7
  31. package/dist/{chunk-e3rgky2r.js → chunk-d964bsxm.js} +283 -283
  32. package/dist/chunk-dy9xs2q0.js +2 -0
  33. package/dist/chunk-eb1v7f55.js +2 -0
  34. package/dist/{chunk-1yj4xd6n.js → chunk-f476c9fb.js} +3 -3
  35. package/dist/{chunk-4904n5v0.js → chunk-fa2mg49t.js} +2 -2
  36. package/dist/{chunk-4cw0s9f4.js → chunk-fx07kyz7.js} +1 -1
  37. package/dist/chunk-g0059g3p.js +2 -0
  38. package/dist/{chunk-meqz313r.js → chunk-gf6t4419.js} +1 -1
  39. package/dist/{chunk-yj1dxdfr.js → chunk-h7hnzwd0.js} +1 -1
  40. package/dist/chunk-hkgnpf6v.js +2 -0
  41. package/dist/{chunk-9jc2z17q.js → chunk-hq9fa4pe.js} +2 -2
  42. package/dist/chunk-hvw4mwee.js +2 -0
  43. package/dist/chunk-jwa2jhd8.js +2 -0
  44. package/dist/{chunk-kdwerx8e.js → chunk-kwxcertb.js} +1 -1
  45. package/dist/{chunk-gtfcw1gc.js → chunk-mb7rn0bf.js} +1 -1
  46. package/dist/chunk-mjf3xmxn.js +3 -0
  47. package/dist/{chunk-vgfnre7b.js → chunk-nwz43t6d.js} +1 -1
  48. package/dist/{chunk-823h67tv.js → chunk-p7ntrtaj.js} +1 -1
  49. package/dist/{chunk-fw56y3cb.js → chunk-ppp84wry.js} +2 -2
  50. package/dist/{chunk-qtc28zy1.js → chunk-pxw0cpxe.js} +1 -1
  51. package/dist/chunk-r5kr6jk4.js +17 -0
  52. package/dist/chunk-rceawm7w.js +2 -0
  53. package/dist/{chunk-kermxyfe.js → chunk-shtg7kah.js} +1 -1
  54. package/dist/{chunk-dvafkj8w.js → chunk-t3mh10z3.js} +1 -1
  55. package/dist/chunk-vz0ebk4j.js +2 -0
  56. package/dist/{chunk-fha0nyet.js → chunk-wjcrcbd1.js} +1 -1
  57. package/dist/{chunk-3sgdth20.js → chunk-x80ahcnw.js} +1 -1
  58. package/dist/{chunk-41dfsdy9.js → chunk-x81z8m6a.js} +1 -1
  59. package/dist/{chunk-jkyvk4x6.js → chunk-xy4jt4ek.js} +1 -1
  60. package/dist/{chunk-4np12rj1.js → chunk-y07fna67.js} +1 -1
  61. package/dist/{chunk-9bvgzqw1.js → chunk-yxpr7h26.js} +2 -2
  62. package/dist/{chunk-7d74am4w.js → chunk-yz0d60px.js} +1 -1
  63. package/dist/{chunk-7ngnyy5k.js → chunk-z19pk2pn.js} +1 -1
  64. package/dist/{chunk-4jj4kk18.js → chunk-z7vb3mgn.js} +1 -1
  65. package/dist/{chunk-tsmdmf5h.js → chunk-zg2hvb1j.js} +28 -1
  66. package/dist/cli.js +8 -8
  67. package/dist/client-script-bundler.js +10 -8
  68. package/dist/config.js +1 -0
  69. package/dist/craft-entry.js +1 -1
  70. package/dist/craft.js +1 -1
  71. package/dist/engine-fingerprint.d.ts +17 -0
  72. package/dist/engine-fingerprint.js +23 -0
  73. package/dist/expressions.js +9 -4
  74. package/dist/pwa.js +2 -2
  75. package/dist/runtime-injection.js +2 -0
  76. package/dist/signals.js +28 -1
  77. package/dist/ssg.js +2 -2
  78. package/dist/types/config-types.d.ts +8 -0
  79. package/dist/url-safety.d.ts +67 -0
  80. package/dist/url-safety.js +40 -0
  81. package/package.json +5 -5
  82. package/dist/chunk-1wsewc5h.js +0 -2
  83. package/dist/chunk-a3m7mgjc.js +0 -2
  84. package/dist/chunk-aftqqqcg.js +0 -3
  85. package/dist/chunk-e9y48d60.js +0 -2
  86. package/dist/chunk-f08ttkqr.js +0 -2
  87. package/dist/chunk-n0a55zv2.js +0 -2
  88. package/dist/chunk-q3g4yf5r.js +0 -2
  89. package/dist/chunk-szfk6pw6.js +0 -2
  90. package/dist/chunk-temapbqe.js +0 -2
  91. package/dist/chunk-ypzm47q3.js +0 -17
  92. package/dist/chunk-z07knk3p.js +0 -2
  93. package/dist/chunk-zt4pf776.js +0 -2
package/dist/pwa.js CHANGED
@@ -1,6 +1,6 @@
1
1
  // @bun
2
- import{Ek as wq,Fk as dq,Gk as Cq,Hk as mq,Ik as gq}from"./chunk-9btdax2s.js";import{Jk as S,Kk as Tq,Lk as _q,Mk as z,Nk as D,Ok as P,Pk as kq,Qk as vq,Rk as w,Sk as Iq,Tk as d,Uk as Hq,Vk as Oq,Wk as Mq}from"./chunk-3cjvqa0s.js";import{kw as Aq,lw as bq,mw as Sq,nw as zq,ow as Dq,pw as Pq}from"./chunk-wb90259a.js";import{tw as N}from"./chunk-5g6rprcy.js";import p from"fs";import E from"path";import C from"fs";import L from"path";var k=[72,96,128,144,152,192,384,512],v=[120,152,167,180],I=[16,32];async function H(G,B){let q={success:!0,generatedFiles:[],errors:[],warnings:[]},K=G.pwa?.icons;if(!K?.src)return q.errors.push("No source icon specified in pwa.icons.src"),q.success=!1,q;let Y=L.isAbsolute(K.src)?K.src:L.resolve(process.cwd(),K.src);if(!await Bun.file(Y).exists())return q.errors.push(`Source icon not found: ${Y}`),q.success=!1,q;let Q=L.resolve(B,K.outputDir||"pwa-icons");try{C.mkdirSync(Q,{recursive:!0})}catch{return q.errors.push(`Failed to create output directory: ${Q}`),q.success=!1,q}let X=K.sizes||k,j=K.generateWebP??!0,J=K.generateAppleIcons??!0;try{let y;try{y=await import("sharp")}catch{return q.errors.push(`sharp is not installed. Install it with: bun add sharp
3
- Icon generation requires the sharp package for image processing.`),q.success=!1,q}let R=await y.default(Y).metadata();if(R.width&&R.width<512)q.warnings.push(`Source icon is ${R.width}x${R.height}. Recommend using at least 512x512 for best quality.`);for(let $ of X){let x=L.join(Q,`icon-${$}x${$}.png`);if(await y.default(Y).resize($,$,{fit:"contain",background:{r:0,g:0,b:0,alpha:0}}).png().toFile(x),q.generatedFiles.push(x),j){let F=L.join(Q,`icon-${$}x${$}.webp`);await y.default(Y).resize($,$,{fit:"contain",background:{r:0,g:0,b:0,alpha:0}}).webp({quality:90}).toFile(F),q.generatedFiles.push(F)}}if(J){for(let x of v){let F=L.join(Q,`apple-touch-icon-${x}x${x}.png`);await y.default(Y).resize(x,x,{fit:"contain",background:{r:255,g:255,b:255,alpha:1}}).png().toFile(F),q.generatedFiles.push(F)}let $=L.join(Q,"apple-touch-icon.png");await y.default(Y).resize(180,180,{fit:"contain",background:{r:255,g:255,b:255,alpha:1}}).png().toFile($),q.generatedFiles.push($)}for(let $ of I){let x=L.join(Q,`favicon-${$}x${$}.png`);await y.default(Y).resize($,$,{fit:"contain",background:{r:0,g:0,b:0,alpha:0}}).png().toFile(x),q.generatedFiles.push(x)}let U=512,T=L.join(Q,`icon-maskable-${U}x${U}.png`),Z=Math.floor(U*0.1),_=U-Z*2;await y.default(Y).resize(_,_,{fit:"contain",background:{r:0,g:0,b:0,alpha:0}}).extend({top:Z,bottom:Z,left:Z,right:Z,background:{r:255,g:255,b:255,alpha:1}}).png().toFile(T),q.generatedFiles.push(T)}catch(y){let V=y instanceof Error?y.message:String(y);q.errors.push(`Icon generation failed: ${V}`),q.success=!1}return q}function n(G){let B=G.sizes||k,q=G.outputDir?`/${G.outputDir}`:"/pwa-icons",K=G.generateWebP??!0,Y=G.generateAppleIcons??!0,Q=[];for(let X of B)if(Q.push(`${q}/icon-${X}x${X}.png`),K)Q.push(`${q}/icon-${X}x${X}.webp`);if(Y){Q.push(`${q}/apple-touch-icon.png`);for(let X of v)Q.push(`${q}/apple-touch-icon-${X}x${X}.png`)}for(let X of I)Q.push(`${q}/favicon-${X}x${X}.png`);return Q.push(`${q}/icon-maskable-512x512.png`),Q}async function O(){try{return await import("sharp"),!0}catch{return!1}}function m(G,B,q,K){let Y=[],Q=K.join(" ");for(let X of G)if(Y.push({src:`${B}/icon-${X}x${X}.png`,sizes:`${X}x${X}`,type:"image/png",purpose:Q}),q)Y.push({src:`${B}/icon-${X}x${X}.webp`,sizes:`${X}x${X}`,type:"image/webp",purpose:Q});return Y}function g(G){return G.map((B)=>({name:B.name,short_name:B.shortName,description:B.description,url:B.url,icons:B.icons?.map((q)=>({src:q.src,sizes:q.sizes,type:q.type}))}))}function h(G){let B=G.pwa?.shareTarget;if(!B?.enabled)return;let q={action:B.action||"/share",method:B.method||"POST",enctype:B.enctype||"multipart/form-data",params:{title:B.params?.title||"title",text:B.params?.text||"text",url:B.params?.url||"url"}};if(B.acceptFiles&&B.acceptFiles.length>0)q.params.files=B.acceptFiles.map((K)=>({name:K.name,accept:K.accept}));return q}function c(G){let B=G.pwa?.fileHandlers;if(!B?.enabled||!B.accept)return;let q=[{action:B.action||"/",accept:B.accept,launch_type:B.launchType||"single-client"}];if(B.icons)q[0].icons=B.icons.map((K)=>({src:K.src,sizes:K.sizes,type:K.type}));return q}function l(G){let B=G.pwa?.protocolHandlers;if(!B||B.length===0)return;return B.map((q)=>({protocol:q.protocol,url:q.url}))}function u(G){let B=G.pwa;if(!B?.enabled||!B.manifest)return null;let{manifest:q,icons:K}=B,Y=K?.sizes||[72,96,128,144,152,192,384,512],Q=K?.outputDir?`/${K.outputDir}`:"/pwa-icons",X=K?.generateWebP??!0,j=K?.purpose||["any","maskable"],J={name:q.name,short_name:q.shortName||q.name,description:q.description,start_url:q.startUrl||"/",display:q.display||"standalone",display_override:q.displayOverride,orientation:q.orientation,theme_color:q.themeColor,background_color:q.backgroundColor,scope:q.scope||"/",lang:q.lang,dir:q.dir,id:q.id,categories:q.categories,icons:m(Y,Q,X,j)};if(q.shortcuts&&q.shortcuts.length>0)J.shortcuts=g(q.shortcuts);if(q.screenshots&&q.screenshots.length>0)J.screenshots=q.screenshots.map((U)=>({src:U.src,sizes:U.sizes,type:U.type,label:U.label,form_factor:U.platform}));let y=h(G);if(y)J.share_target=y;let V=c(G);if(V)J.file_handlers=V;let R=l(G);if(R)J.protocol_handlers=R;if(q.launchHandler)J.launch_handler={client_mode:q.launchHandler};if(q.handleLinks)J.handle_links=q.handleLinks;if(q.edgeSidePanel?.enabled)J.edge_side_panel={preferred_width:q.edgeSidePanel.preferredWidth};return J}function M(G){let B=u(G);if(!B)return"";let q=JSON.parse(JSON.stringify(B));return JSON.stringify(q,null,2)}function i(G,B){return{...B,...G,shortcuts:G.shortcuts||B.shortcuts,screenshots:G.screenshots||B.screenshots,categories:G.categories||B.categories}}function s(G){let B=[],q=G.pwa;if(!q?.enabled)return B;let K=q.manifest;if(!K)return B.push("PWA manifest configuration is missing"),B;if(!K.name)B.push("Manifest name is required");let Y=["fullscreen","standalone","minimal-ui","browser"];if(K.display&&!Y.includes(K.display))B.push(`Invalid display mode: ${K.display}. Must be one of: ${Y.join(", ")}`);let Q=["any","natural","landscape","landscape-primary","landscape-secondary","portrait","portrait-primary","portrait-secondary"];if(K.orientation&&!Q.includes(K.orientation))B.push(`Invalid orientation: ${K.orientation}`);let X=/^#([0-9A-Fa-f]{3}|[0-9A-Fa-f]{6})$/;if(K.themeColor&&!X.test(K.themeColor))B.push(`Invalid theme color: ${K.themeColor}. Must be a valid hex color.`);if(K.backgroundColor&&!X.test(K.backgroundColor))B.push(`Invalid background color: ${K.backgroundColor}. Must be a valid hex color.`);if(q.shareTarget?.enabled){if(!q.shareTarget.action)B.push("Share target action URL is required")}if(q.fileHandlers?.enabled){if(!q.fileHandlers.accept||Object.keys(q.fileHandlers.accept).length===0)B.push("File handlers must specify accepted MIME types")}if(q.protocolHandlers)for(let j of q.protocolHandlers){if(!j.protocol)B.push("Protocol handler missing protocol");if(!j.url||!j.url.includes("%s"))B.push(`Protocol handler URL must contain %s placeholder: ${j.protocol}`)}return B}import A from"path";async function b(G){let B=G.pwa?.offline;if(!B?.enabled)return"";if(B.page){let q=A.isAbsolute(B.page)?B.page:A.resolve(process.cwd(),B.page);if(await Bun.file(q).exists())try{let{processDirectives:K}=await import("./chunk-x01sw9wy.js"),Y=await Bun.file(q).text();return await K(Y,{},q,G,new Set)}catch(K){console.warn(`[PWA] Failed to process custom offline page: ${K}`)}else console.warn(`[PWA] Custom offline page not found: ${q}`)}return f(G)}function f(G){let B=G.pwa?.offline,q=G.pwa?.manifest,K=B?.fallbackTitle||"You are offline",Y=B?.fallbackMessage||"Please check your internet connection and try again.",Q=q?.themeColor||"#4f46e5",X=q?.shortName||q?.name||"App";return`<!DOCTYPE html>
2
+ import{Dk as wq,Ek as dq,Fk as Cq,Gk as mq,Hk as gq}from"./chunk-28q3vycz.js";import{Ik as S,Jk as Tq,Kk as _q,Lk as z,Mk as D,Nk as P,Ok as kq,Pk as vq,Qk as w,Rk as Iq,Sk as d,Tk as Hq,Uk as Oq,Vk as Mq}from"./chunk-64qg8jes.js";import{kw as Aq,lw as bq,mw as Sq,nw as zq,ow as Dq,pw as Pq}from"./chunk-wb90259a.js";import{tw as N}from"./chunk-5g6rprcy.js";import p from"fs";import E from"path";import C from"fs";import L from"path";var k=[72,96,128,144,152,192,384,512],v=[120,152,167,180],I=[16,32];async function H(G,B){let q={success:!0,generatedFiles:[],errors:[],warnings:[]},K=G.pwa?.icons;if(!K?.src)return q.errors.push("No source icon specified in pwa.icons.src"),q.success=!1,q;let Y=L.isAbsolute(K.src)?K.src:L.resolve(process.cwd(),K.src);if(!await Bun.file(Y).exists())return q.errors.push(`Source icon not found: ${Y}`),q.success=!1,q;let Q=L.resolve(B,K.outputDir||"pwa-icons");try{C.mkdirSync(Q,{recursive:!0})}catch{return q.errors.push(`Failed to create output directory: ${Q}`),q.success=!1,q}let X=K.sizes||k,j=K.generateWebP??!0,J=K.generateAppleIcons??!0;try{let y;try{y=await import("sharp")}catch{return q.errors.push(`sharp is not installed. Install it with: bun add sharp
3
+ Icon generation requires the sharp package for image processing.`),q.success=!1,q}let R=await y.default(Y).metadata();if(R.width&&R.width<512)q.warnings.push(`Source icon is ${R.width}x${R.height}. Recommend using at least 512x512 for best quality.`);for(let $ of X){let x=L.join(Q,`icon-${$}x${$}.png`);if(await y.default(Y).resize($,$,{fit:"contain",background:{r:0,g:0,b:0,alpha:0}}).png().toFile(x),q.generatedFiles.push(x),j){let F=L.join(Q,`icon-${$}x${$}.webp`);await y.default(Y).resize($,$,{fit:"contain",background:{r:0,g:0,b:0,alpha:0}}).webp({quality:90}).toFile(F),q.generatedFiles.push(F)}}if(J){for(let x of v){let F=L.join(Q,`apple-touch-icon-${x}x${x}.png`);await y.default(Y).resize(x,x,{fit:"contain",background:{r:255,g:255,b:255,alpha:1}}).png().toFile(F),q.generatedFiles.push(F)}let $=L.join(Q,"apple-touch-icon.png");await y.default(Y).resize(180,180,{fit:"contain",background:{r:255,g:255,b:255,alpha:1}}).png().toFile($),q.generatedFiles.push($)}for(let $ of I){let x=L.join(Q,`favicon-${$}x${$}.png`);await y.default(Y).resize($,$,{fit:"contain",background:{r:0,g:0,b:0,alpha:0}}).png().toFile(x),q.generatedFiles.push(x)}let U=512,T=L.join(Q,`icon-maskable-${U}x${U}.png`),Z=Math.floor(U*0.1),_=U-Z*2;await y.default(Y).resize(_,_,{fit:"contain",background:{r:0,g:0,b:0,alpha:0}}).extend({top:Z,bottom:Z,left:Z,right:Z,background:{r:255,g:255,b:255,alpha:1}}).png().toFile(T),q.generatedFiles.push(T)}catch(y){let V=y instanceof Error?y.message:String(y);q.errors.push(`Icon generation failed: ${V}`),q.success=!1}return q}function n(G){let B=G.sizes||k,q=G.outputDir?`/${G.outputDir}`:"/pwa-icons",K=G.generateWebP??!0,Y=G.generateAppleIcons??!0,Q=[];for(let X of B)if(Q.push(`${q}/icon-${X}x${X}.png`),K)Q.push(`${q}/icon-${X}x${X}.webp`);if(Y){Q.push(`${q}/apple-touch-icon.png`);for(let X of v)Q.push(`${q}/apple-touch-icon-${X}x${X}.png`)}for(let X of I)Q.push(`${q}/favicon-${X}x${X}.png`);return Q.push(`${q}/icon-maskable-512x512.png`),Q}async function O(){try{return await import("sharp"),!0}catch{return!1}}function m(G,B,q,K){let Y=[],Q=K.join(" ");for(let X of G)if(Y.push({src:`${B}/icon-${X}x${X}.png`,sizes:`${X}x${X}`,type:"image/png",purpose:Q}),q)Y.push({src:`${B}/icon-${X}x${X}.webp`,sizes:`${X}x${X}`,type:"image/webp",purpose:Q});return Y}function g(G){return G.map((B)=>({name:B.name,short_name:B.shortName,description:B.description,url:B.url,icons:B.icons?.map((q)=>({src:q.src,sizes:q.sizes,type:q.type}))}))}function h(G){let B=G.pwa?.shareTarget;if(!B?.enabled)return;let q={action:B.action||"/share",method:B.method||"POST",enctype:B.enctype||"multipart/form-data",params:{title:B.params?.title||"title",text:B.params?.text||"text",url:B.params?.url||"url"}};if(B.acceptFiles&&B.acceptFiles.length>0)q.params.files=B.acceptFiles.map((K)=>({name:K.name,accept:K.accept}));return q}function c(G){let B=G.pwa?.fileHandlers;if(!B?.enabled||!B.accept)return;let q=[{action:B.action||"/",accept:B.accept,launch_type:B.launchType||"single-client"}];if(B.icons)q[0].icons=B.icons.map((K)=>({src:K.src,sizes:K.sizes,type:K.type}));return q}function l(G){let B=G.pwa?.protocolHandlers;if(!B||B.length===0)return;return B.map((q)=>({protocol:q.protocol,url:q.url}))}function u(G){let B=G.pwa;if(!B?.enabled||!B.manifest)return null;let{manifest:q,icons:K}=B,Y=K?.sizes||[72,96,128,144,152,192,384,512],Q=K?.outputDir?`/${K.outputDir}`:"/pwa-icons",X=K?.generateWebP??!0,j=K?.purpose||["any","maskable"],J={name:q.name,short_name:q.shortName||q.name,description:q.description,start_url:q.startUrl||"/",display:q.display||"standalone",display_override:q.displayOverride,orientation:q.orientation,theme_color:q.themeColor,background_color:q.backgroundColor,scope:q.scope||"/",lang:q.lang,dir:q.dir,id:q.id,categories:q.categories,icons:m(Y,Q,X,j)};if(q.shortcuts&&q.shortcuts.length>0)J.shortcuts=g(q.shortcuts);if(q.screenshots&&q.screenshots.length>0)J.screenshots=q.screenshots.map((U)=>({src:U.src,sizes:U.sizes,type:U.type,label:U.label,form_factor:U.platform}));let y=h(G);if(y)J.share_target=y;let V=c(G);if(V)J.file_handlers=V;let R=l(G);if(R)J.protocol_handlers=R;if(q.launchHandler)J.launch_handler={client_mode:q.launchHandler};if(q.handleLinks)J.handle_links=q.handleLinks;if(q.edgeSidePanel?.enabled)J.edge_side_panel={preferred_width:q.edgeSidePanel.preferredWidth};return J}function M(G){let B=u(G);if(!B)return"";let q=JSON.parse(JSON.stringify(B));return JSON.stringify(q,null,2)}function i(G,B){return{...B,...G,shortcuts:G.shortcuts||B.shortcuts,screenshots:G.screenshots||B.screenshots,categories:G.categories||B.categories}}function s(G){let B=[],q=G.pwa;if(!q?.enabled)return B;let K=q.manifest;if(!K)return B.push("PWA manifest configuration is missing"),B;if(!K.name)B.push("Manifest name is required");let Y=["fullscreen","standalone","minimal-ui","browser"];if(K.display&&!Y.includes(K.display))B.push(`Invalid display mode: ${K.display}. Must be one of: ${Y.join(", ")}`);let Q=["any","natural","landscape","landscape-primary","landscape-secondary","portrait","portrait-primary","portrait-secondary"];if(K.orientation&&!Q.includes(K.orientation))B.push(`Invalid orientation: ${K.orientation}`);let X=/^#([0-9A-Fa-f]{3}|[0-9A-Fa-f]{6})$/;if(K.themeColor&&!X.test(K.themeColor))B.push(`Invalid theme color: ${K.themeColor}. Must be a valid hex color.`);if(K.backgroundColor&&!X.test(K.backgroundColor))B.push(`Invalid background color: ${K.backgroundColor}. Must be a valid hex color.`);if(q.shareTarget?.enabled){if(!q.shareTarget.action)B.push("Share target action URL is required")}if(q.fileHandlers?.enabled){if(!q.fileHandlers.accept||Object.keys(q.fileHandlers.accept).length===0)B.push("File handlers must specify accepted MIME types")}if(q.protocolHandlers)for(let j of q.protocolHandlers){if(!j.protocol)B.push("Protocol handler missing protocol");if(!j.url||!j.url.includes("%s"))B.push(`Protocol handler URL must contain %s placeholder: ${j.protocol}`)}return B}import A from"path";async function b(G){let B=G.pwa?.offline;if(!B?.enabled)return"";if(B.page){let q=A.isAbsolute(B.page)?B.page:A.resolve(process.cwd(),B.page);if(await Bun.file(q).exists())try{let{processDirectives:K}=await import("./chunk-605955nh.js"),Y=await Bun.file(q).text();return await K(Y,{},q,G,new Set)}catch(K){console.warn(`[PWA] Failed to process custom offline page: ${K}`)}else console.warn(`[PWA] Custom offline page not found: ${q}`)}return f(G)}function f(G){let B=G.pwa?.offline,q=G.pwa?.manifest,K=B?.fallbackTitle||"You are offline",Y=B?.fallbackMessage||"Please check your internet connection and try again.",Q=q?.themeColor||"#4f46e5",X=q?.shortName||q?.name||"App";return`<!DOCTYPE html>
4
4
  <html lang="en">
5
5
  <head>
6
6
  <meta charset="UTF-8">
@@ -135,6 +135,8 @@ export async function injectRouterScript(template, options) {
135
135
  configObj.viewTransitionEasing = routerConfig.viewTransitionEasing;
136
136
  if (routerConfig.scrollToTop !== void 0)
137
137
  configObj.scrollToTop = routerConfig.scrollToTop;
138
+ if (routerConfig.scrollRestoration !== void 0)
139
+ configObj.scrollRestoration = routerConfig.scrollRestoration;
138
140
  if (routerConfig.prefetch !== void 0)
139
141
  configObj.prefetch = routerConfig.prefetch;
140
142
  if (routerConfig.cache !== void 0)
package/dist/signals.js CHANGED
@@ -2819,6 +2819,33 @@ catch (e2) {
2819
2819
 
2820
2820
  // Known directive names to exclude from generic :attr binding
2821
2821
  var DIRECTIVE_NAMES = {class:1, style:1, text:1, html:1, show:1, model:1, 'if':1, ref:1};
2822
+
2823
+ // A bound value cannot introduce a URL scheme the page did not ask for.
2824
+ // This is the client half of url-safety.ts: the server refuses a scheme
2825
+ // substituted into an href, and x-href over a signal reaches the same
2826
+ // attribute by another road. Same policy, same unsafe: prefix, so a page
2827
+ // behaves the same whether the value arrived at render or at runtime.
2828
+ var URL_NAV_ATTR = {href:1, 'xlink:href':1, action:1, formaction:1, ping:1, cite:1, manifest:1, data:1, to:1};
2829
+ var URL_FETCH_ATTR = {src:1, srcset:1, poster:1, background:1};
2830
+ var urlRefusalWarned = false;
2831
+ function safeUrlAttr(attrName, value) {
2832
+ var navigable = URL_NAV_ATTR[attrName];
2833
+ if (!navigable && !URL_FETCH_ATTR[attrName]) return value;
2834
+ if (typeof value !== 'string' || !value) return value;
2835
+ // Browsers ignore ASCII whitespace and controls inside a scheme and match
2836
+ // it case-insensitively, so the spellings collapse before the test.
2837
+ var probe = value.replace(/[\\u0000-\\u0020\\u00a0\\u2000-\\u200f\\u2028\\u2029\\ufeff]+/g, '').toLowerCase();
2838
+ var refused = /^(?:javascript|vbscript|livescript|mocha|view-source):/.test(probe)
2839
+ || (navigable
2840
+ ? /^data:(?:text\\/html|text\\/xml|application\\/xhtml\\+xml|application\\/xml|image\\/svg\\+xml)/.test(probe)
2841
+ : /^data:(?:text\\/html|application\\/xhtml\\+xml)/.test(probe));
2842
+ if (!refused) return value;
2843
+ if (!urlRefusalWarned) {
2844
+ urlRefusalWarned = true;
2845
+ console.warn('[stx] refused a ' + attrName + ' value whose scheme can run script: ' + probe.slice(0, 24));
2846
+ }
2847
+ return 'unsafe:' + value;
2848
+ }
2822
2849
  // SVG attributes are case-sensitive, but the HTML parser lowercases
2823
2850
  // prefixed attribute names \u2014 ':viewBox' arrives as ':viewbox' because
2824
2851
  // the spec's "adjust SVG attributes" step only covers unprefixed names.
@@ -2926,7 +2953,7 @@ else {
2926
2953
  try { attrValue = JSON.stringify(v); }
2927
2954
  catch (e) { attrValue = String(v); }
2928
2955
  }
2929
- el.setAttribute(attrName, attrValue);
2956
+ el.setAttribute(attrName, safeUrlAttr(attrName, attrValue));
2930
2957
  }
2931
2958
  });
2932
2959
  el.removeAttribute(name);
package/dist/ssg.js CHANGED
@@ -1,5 +1,5 @@
1
1
  // @bun
2
- import{Ak as Fq,vk as Uq,wk as Iq}from"./chunk-4904n5v0.js";import{Bk as Eq,Ck as Tq,Dk as Dq}from"./chunk-f6sejeg3.js";import{$k as zq,Yk as _q,al as Aq}from"./chunk-ypzm47q3.js";import"./chunk-1yj4xd6n.js";import{Jp as P,Om as Oq,io as l,lo as Hq,rr as n}from"./chunk-e3rgky2r.js";import"./chunk-d7zxg9bp.js";import"./chunk-t00ga194.js";import"./chunk-hrdd26r4.js";import"./chunk-7r79j1hs.js";import"./chunk-ay336sqb.js";import{ht as Xq}from"./chunk-nhbc464j.js";import{mt as d}from"./chunk-vaggjvsm.js";import"./chunk-q9ckfwhh.js";import"./chunk-kermxyfe.js";import"./chunk-k3dtvay1.js";import{Tt as Bq}from"./chunk-aved735s.js";import"./chunk-799s9mwc.js";import"./chunk-7r80apc5.js";import"./chunk-2tjk867y.js";import"./chunk-t8ctvjqe.js";import"./chunk-deqnt1w5.js";import{$v as jq,Zv as Yq,_v as Vq,aw as Gq,bw as Lq,cw as Nq}from"./chunk-w0hzaka3.js";import"./chunk-wb90259a.js";import{tw as y}from"./chunk-5g6rprcy.js";import O from"fs";import j from"path";import{createHash as xq}from"crypto";function yq(q){try{return new Bun.Transpiler({loader:"js",minifyWhitespace:!0}).transformSync(q).replace(/\}(var |let |const |function )/g,"};$1").trim()}catch{return q}}var Pq=/<script\s+type="stx\/island"\s+data-stx-island="([^"]+)"([^>]*)>([\s\S]*?)<\/script>/g;function Cq(q){return Bun.hash(q).toString(16)}function Qq(q,Z={}){if(!q.includes('type="stx/island"'))return{html:q,chunks:[]};let $=new Map,Q=q.replace(Pq,(J,W,z,A)=>{let G=A.trim();if(!G)return J;if(/\bdata-stx-src=/.test(z))return J;if(Z.minify)G=yq(G);let X=Cq(G);if(!$.has(X))$.set(X,G);let B=Z.integrity?` data-stx-integrity="sha384-${xq("sha384").update(G).digest("base64")}"`:"";return`<script type="stx/island" data-stx-island="${W}" data-stx-src="/_stx/islands/${X}.js"${B}${z}></script>`}),K=Array.from($,([J,W])=>({hash:J,code:W}));return{html:Q,chunks:K}}var gq=new Set(["visible","idle"]);function Zq(q){if(!q.includes("data-stx-src="))return q;let Z=new Map,$=/data-stx-scope="([^"]+)"[^>]*?stx-hydrate="([^"]+)"/g,Q;while((Q=$.exec(q))!==null)Z.set(Q[1],Q[2]);let K=new Set,J=/data-stx-island="([^"]+)"[^>]*?data-stx-src="([^"]+)"/g,W;while((W=J.exec(q))!==null)if(gq.has(Z.get(W[1])||""))K.add(W[2]);let z=q.lastIndexOf("</head>");if(K.size===0||z===-1)return q;let A=Array.from(K).filter((G)=>!q.includes(`rel="prefetch" href="${G}"`)).map((G)=>`<link rel="prefetch" href="${G}" as="script">`).join("");if(!A)return q;return q.slice(0,z)+A+q.slice(z)}var fq=["STX_SITE_URL","SITE_URL","URL","VERCEL_URL","CF_PAGES_URL"];function h(q){let Z=q.trim();if(!Z)return null;let $=/^https?:\/\//i.test(Z)?Z:`https://${Z}`;try{return new URL($).origin+new URL($).pathname.replace(/\/$/,"")}catch{return null}}function mq(q){for(let Z of fq){let $=q[Z];if(!$)continue;let Q=h($);if(Q)return{url:Q,source:"env",via:Z}}return null}function $q(q){if(!q||typeof q!=="object")return null;let Z=q,$=Z.site?.url??Z.url??Z.app?.url;return typeof $==="string"?h($):null}async function dq(q){let{existsSync:Z}=await import("fs"),$=await import("path");for(let Q of["site.config.ts","site.config.js",".config/site.config.ts"]){let K=$.resolve(q,Q);if(!Z(K))continue;try{let J=await import(K),W=$q(J.default??J);if(W)return W}catch{}}return null}async function Kq(q={}){let Z=q.cwd??process.cwd(),$=q.env??process.env;if(q.explicit){let W=h(q.explicit);if(W)return{url:W,source:"option"}}let Q=$q(q.stxConfig);if(Q)return{url:Q,source:"stx.config",via:"site.url"};let K=await dq(Z);if(K)return{url:K,source:"site.config",via:"url"};let J=mq($);if(J)return J;return{url:"http://localhost",source:"fallback"}}function Wq(){return["No site URL configured \u2014 sitemap.xml and robots.txt will point at http://localhost."," Set one in stx.config.ts (site: { url: 'https://example.com' }), in site.config.ts,"," via --domain, or with SITE_URL in the build environment."].join(`
2
+ import{uk as Uq,vk as Iq,zk as Fq}from"./chunk-fa2mg49t.js";import{Ak as Eq,Bk as Tq,Ck as Dq}from"./chunk-axqfm9b4.js";import{$k as Aq,Xk as _q,_k as zq}from"./chunk-r5kr6jk4.js";import"./chunk-f476c9fb.js";import"./chunk-mjf3xmxn.js";import{Jp as P,Om as Oq,io as l,lo as Hq,rr as n}from"./chunk-d964bsxm.js";import"./chunk-d7zxg9bp.js";import"./chunk-t00ga194.js";import"./chunk-hrdd26r4.js";import"./chunk-7r79j1hs.js";import"./chunk-ay336sqb.js";import{ht as Xq}from"./chunk-3agx4hyd.js";import{mt as d}from"./chunk-vaggjvsm.js";import"./chunk-q9ckfwhh.js";import"./chunk-shtg7kah.js";import"./chunk-k3dtvay1.js";import{Tt as Bq}from"./chunk-aved735s.js";import"./chunk-799s9mwc.js";import"./chunk-7r80apc5.js";import"./chunk-2tjk867y.js";import"./chunk-t8ctvjqe.js";import"./chunk-deqnt1w5.js";import{$v as jq,Zv as Yq,_v as Vq,aw as Gq,bw as Lq,cw as Nq}from"./chunk-d6yyzpsv.js";import"./chunk-wb90259a.js";import{tw as y}from"./chunk-5g6rprcy.js";import O from"fs";import j from"path";import{createHash as xq}from"crypto";function yq(q){try{return new Bun.Transpiler({loader:"js",minifyWhitespace:!0}).transformSync(q).replace(/\}(var |let |const |function )/g,"};$1").trim()}catch{return q}}var Pq=/<script\s+type="stx\/island"\s+data-stx-island="([^"]+)"([^>]*)>([\s\S]*?)<\/script>/g;function Cq(q){return Bun.hash(q).toString(16)}function Qq(q,Z={}){if(!q.includes('type="stx/island"'))return{html:q,chunks:[]};let $=new Map,Q=q.replace(Pq,(J,W,z,A)=>{let G=A.trim();if(!G)return J;if(/\bdata-stx-src=/.test(z))return J;if(Z.minify)G=yq(G);let X=Cq(G);if(!$.has(X))$.set(X,G);let B=Z.integrity?` data-stx-integrity="sha384-${xq("sha384").update(G).digest("base64")}"`:"";return`<script type="stx/island" data-stx-island="${W}" data-stx-src="/_stx/islands/${X}.js"${B}${z}></script>`}),K=Array.from($,([J,W])=>({hash:J,code:W}));return{html:Q,chunks:K}}var gq=new Set(["visible","idle"]);function Zq(q){if(!q.includes("data-stx-src="))return q;let Z=new Map,$=/data-stx-scope="([^"]+)"[^>]*?stx-hydrate="([^"]+)"/g,Q;while((Q=$.exec(q))!==null)Z.set(Q[1],Q[2]);let K=new Set,J=/data-stx-island="([^"]+)"[^>]*?data-stx-src="([^"]+)"/g,W;while((W=J.exec(q))!==null)if(gq.has(Z.get(W[1])||""))K.add(W[2]);let z=q.lastIndexOf("</head>");if(K.size===0||z===-1)return q;let A=Array.from(K).filter((G)=>!q.includes(`rel="prefetch" href="${G}"`)).map((G)=>`<link rel="prefetch" href="${G}" as="script">`).join("");if(!A)return q;return q.slice(0,z)+A+q.slice(z)}var fq=["STX_SITE_URL","SITE_URL","URL","VERCEL_URL","CF_PAGES_URL"];function h(q){let Z=q.trim();if(!Z)return null;let $=/^https?:\/\//i.test(Z)?Z:`https://${Z}`;try{return new URL($).origin+new URL($).pathname.replace(/\/$/,"")}catch{return null}}function mq(q){for(let Z of fq){let $=q[Z];if(!$)continue;let Q=h($);if(Q)return{url:Q,source:"env",via:Z}}return null}function $q(q){if(!q||typeof q!=="object")return null;let Z=q,$=Z.site?.url??Z.url??Z.app?.url;return typeof $==="string"?h($):null}async function dq(q){let{existsSync:Z}=await import("fs"),$=await import("path");for(let Q of["site.config.ts","site.config.js",".config/site.config.ts"]){let K=$.resolve(q,Q);if(!Z(K))continue;try{let J=await import(K),W=$q(J.default??J);if(W)return W}catch{}}return null}async function Kq(q={}){let Z=q.cwd??process.cwd(),$=q.env??process.env;if(q.explicit){let W=h(q.explicit);if(W)return{url:W,source:"option"}}let Q=$q(q.stxConfig);if(Q)return{url:Q,source:"stx.config",via:"site.url"};let K=await dq(Z);if(K)return{url:K,source:"site.config",via:"url"};let J=mq($);if(J)return J;return{url:"http://localhost",source:"fallback"}}function Wq(){return["No site URL configured \u2014 sitemap.xml and robots.txt will point at http://localhost."," Set one in stx.config.ts (site: { url: 'https://example.com' }), in site.config.ts,"," via --domain, or with SITE_URL in the build environment."].join(`
3
3
  `)}class wq{cacheDir;cache=new Map;loaded=!1;salt;constructor(q,Z=""){this.cacheDir=q,this.salt=Z}async load(){if(this.loaded)return;let q=j.join(this.cacheDir,"build-cache.json");if(await Bun.file(q).exists())try{let Z=JSON.parse(await Bun.file(q).text());for(let[$,Q]of Object.entries(Z))this.cache.set($,Q)}catch{}this.loaded=!0}async save(){await O.promises.mkdir(this.cacheDir,{recursive:!0});let q=j.join(this.cacheDir,"build-cache.json"),Z={};for(let[$,Q]of this.cache)Z[$]=Q;await Bun.write(q,JSON.stringify(Z))}getHash(q,Z){let $=O.statSync(q),Q=`${this.salt}|${q}:${$.mtimeMs}`;for(let J of Z)if(O.existsSync(J)){let W=O.statSync(J);Q+=`:${J}:${W.mtimeMs}`}let K=0;for(let J=0;J<Q.length;J++){let W=Q.charCodeAt(J);K=(K<<5)-K+W,K=K&K}return Math.abs(K).toString(36)}get(q,Z){let $=this.cache.get(q);if(!$)return null;let Q=this.getHash(Z,$.dependencies??[]);if($.hash!==Q)return this.cache.delete(q),null;return $.html}set(q,Z,$,Q){let K=this.getHash(Z,$);this.cache.set(q,{hash:K,html:Q,generatedAt:Date.now(),dependencies:$})}}class Rq{cacheDir;constructor(q){this.cacheDir=q}getFilePath(q){let Z=q.replace(/[^a-zA-Z0-9]/g,"_")+".json";return j.join(this.cacheDir,"isr",Z)}async get(q){let Z=this.getFilePath(q);if(!await Bun.file(Z).exists())return null;try{return JSON.parse(await Bun.file(Z).text())}catch{return null}}async set(q,Z){let $=this.getFilePath(q);await O.promises.mkdir(j.dirname($),{recursive:!0}),await Bun.write($,JSON.stringify(Z))}async invalidate(q){let Z=this.getFilePath(q);if(await Bun.file(Z).exists())await O.promises.unlink(Z)}async invalidatePattern(q){let Z=j.join(this.cacheDir,"isr");if(!O.existsSync(Z))return;let $=await O.promises.readdir(Z);for(let Q of $){let K=Q.replace(/_/g,"/").replace(".json","");if(q.test(K))await O.promises.unlink(j.join(Z,Q))}}async needsRevalidation(q){let Z=await this.get(q);if(!Z)return!0;return Date.now()>Z.revalidateAfter}}async function pq(q){try{let $=(await Bun.file(q).text()).match(/<script\s+server\b[^>]*>([\s\S]*?)<\/script>/i);if(!$)return null;let Q=$[1];if(!Q.includes("getStaticPaths"))return null;let K=Q.match(/(?:export\s+)?(?:async\s+)?function\s+getStaticPaths\s*\([^)]*\)\s*\{([\s\S]*?)\n[\t ]*\}/);if(!K)return null;return await Function(`
4
4
  return (async function getStaticPaths() {
5
5
  ${K[1]}
@@ -41,7 +41,7 @@ ${q.map((Q)=>{let K=new URL(Q.loc,Z).href,J=` <url>
41
41
  ${$.join(`
42
42
  `)}
43
43
  </channel>
44
- </rss>`}async function aq(q={}){let Z=Date.now();Aq();let $=await n(process.cwd()),Q=$.build||{},K=await Kq({explicit:q.domain||Q.domain,stxConfig:$});if(K.source==="fallback"&&(q.sitemap??Q.sitemap??!0))console.warn(Wq());let J={router:q.router??$?.router??{},pagesDir:q.pagesDir||Q.pagesDir||"pages",outputDir:q.outputDir||Q.outputDir||"dist",baseUrl:q.baseUrl||Q.baseUrl||"/",domain:K.url,revalidate:q.revalidate??Q.revalidate??!1,sitemap:q.sitemap??Q.sitemap??!0,sitemapExclude:q.sitemapExclude||Q.sitemapExclude||[],robots:q.robots??Q.robots??!0,rss:q.rss??Q.rss??!1,concurrency:q.concurrency||Q.concurrency||10,cache:q.cache??Q.cache??!0,cacheDir:q.cacheDir||Q.cacheDir||d(process.cwd(),"ssg-cache"),contentLoaders:q.contentLoaders||[],hooks:q.hooks||{},minify:q.minify??Q.minify??!0,generate404:q.generate404??Q.generate404??!0,publicDir:q.publicDir||Q.publicDir||"public",trailingSlash:q.trailingSlash??Q.trailingSlash??!1,cleanOutput:q.cleanOutput??Q.cleanOutput??!0,cacheSalt:q.cacheSalt??"",partialsDir:q.partialsDir||$?.partialsDir||"",componentsDir:q.componentsDir||$?.componentsDir||"",failOnIncludeError:q.failOnIncludeError??!0,chunkIslands:q.chunkIslands===!0,prefetchIslands:q.prefetchIslands===!0,integrityIslands:q.integrityIslands===!0},W={totalPages:0,successCount:0,failedCount:0,cachedCount:0,buildTime:0,pages:[],errors:[]},z=new Set,A=0,G={},X={};await J.hooks.onBuildStart?.();try{if(J.cleanOutput&&O.existsSync(J.outputDir))await O.promises.rm(J.outputDir,{recursive:!0});await O.promises.mkdir(J.outputDir,{recursive:!0});let L=J.cacheSalt;if(!L){let{resolveUserCssConfig:Y,fingerprintConfig:N}=await import("./chunk-m1p2n3nf.js");try{L=N(await Y(process.cwd()))}catch{}}let{prepareImageDelivery:_}=await import("./chunk-97ej3abh.js"),F=await _(J.publicDir,J.outputDir);if(F.count>0)console.log(`Optimized ${F.count} image(s) for responsive delivery`),L=[L,F.fingerprint].filter(Boolean).join(":");let C=new wq(J.cacheDir,L);if(J.cache)await C.load();try{let{generateCss:Y}=await import("./chunk-m1p2n3nf.js");await Y('<div class="bg-black"></div>')}catch{}Yq();let kq=$?.routeMiddleware?.dir||"middleware";await jq(process.cwd(),kq);let p=Vq();if(p.length>0)console.log(`Loaded ${p.length} middleware: ${p.join(", ")}`);let bq=$?.routeMiddleware?.global||[];Fq($?.layoutsDir,d(process.cwd()));let i=l(".",{pagesDir:J.pagesDir,pagesDirs:$?._layerPageDirs});console.log(`Found ${i.length} routes`);let g=[];for(let Y of i){let N=await uq(Y);for(let H of N)g.push({route:Y,url:H.url,params:H.params,props:H.props,revalidate:H.revalidate??J.revalidate})}W.totalPages=g.length,console.log(`Generating ${W.totalPages} pages...`);let b=[],s=[];for(let Y=0;Y<g.length;Y+=J.concurrency)s.push(g.slice(Y,Y+J.concurrency));for(let Y of s)await Promise.all(Y.map(async(N)=>{let{route:H,url:V,params:S,props:Sq,revalidate:a}=N;try{await J.hooks.onPageStart?.(V);let w=await Bun.file(H.filePath).text(),R=JJ(w),vq=R?.middleware?Array.isArray(R.middleware)?R.middleware:[R.middleware]:[],t=[...bq,...vq];if(t.length>0){let D=Gq(V,S,R||{}),M=Lq(D,null,void 0,{isServer:!0}),E=await Nq(t,M);if(E.redirect){let U=typeof E.redirect==="string"?E.redirect:E.redirect.path||E.redirect,x=QJ(String(U),V),k=ZJ(V,J);await O.promises.mkdir(j.dirname(k),{recursive:!0}),await Bun.write(k,x),W.successCount++,W.pages.push({route:V,outputPath:k,size:Buffer.byteLength(x),cached:!1}),b.push({loc:V,lastmod:new Date().toISOString()}),console.log(` \u21B3 ${V} \u2192 redirect to ${U}`);return}if(E.abort){let U=typeof E.abort==="string"?E.abort:E.abort?.error?.message||"aborted";console.warn(` \u21B3 ${V} \u2014 middleware aborted: ${U}`);return}}let e=w.match(/definePageMeta\s*\(\s*\{[\s\S]*?validate\s*:\s*((?:\([^)]*\)|[^,}])*(?:\{[\s\S]*?\})?)/m);if(e)try{if(!await Function("route",`
44
+ </rss>`}async function aq(q={}){let Z=Date.now();Aq();let $=await n(process.cwd()),Q=$.build||{},K=await Kq({explicit:q.domain||Q.domain,stxConfig:$});if(K.source==="fallback"&&(q.sitemap??Q.sitemap??!0))console.warn(Wq());let J={router:q.router??$?.router??{},pagesDir:q.pagesDir||Q.pagesDir||"pages",outputDir:q.outputDir||Q.outputDir||"dist",baseUrl:q.baseUrl||Q.baseUrl||"/",domain:K.url,revalidate:q.revalidate??Q.revalidate??!1,sitemap:q.sitemap??Q.sitemap??!0,sitemapExclude:q.sitemapExclude||Q.sitemapExclude||[],robots:q.robots??Q.robots??!0,rss:q.rss??Q.rss??!1,concurrency:q.concurrency||Q.concurrency||10,cache:q.cache??Q.cache??!0,cacheDir:q.cacheDir||Q.cacheDir||d(process.cwd(),"ssg-cache"),contentLoaders:q.contentLoaders||[],hooks:q.hooks||{},minify:q.minify??Q.minify??!0,generate404:q.generate404??Q.generate404??!0,publicDir:q.publicDir||Q.publicDir||"public",trailingSlash:q.trailingSlash??Q.trailingSlash??!1,cleanOutput:q.cleanOutput??Q.cleanOutput??!0,cacheSalt:q.cacheSalt??"",partialsDir:q.partialsDir||$?.partialsDir||"",componentsDir:q.componentsDir||$?.componentsDir||"",failOnIncludeError:q.failOnIncludeError??!0,chunkIslands:q.chunkIslands===!0,prefetchIslands:q.prefetchIslands===!0,integrityIslands:q.integrityIslands===!0},W={totalPages:0,successCount:0,failedCount:0,cachedCount:0,buildTime:0,pages:[],errors:[]},z=new Set,A=0,G={},X={};await J.hooks.onBuildStart?.();try{if(J.cleanOutput&&O.existsSync(J.outputDir))await O.promises.rm(J.outputDir,{recursive:!0});await O.promises.mkdir(J.outputDir,{recursive:!0});let L=J.cacheSalt;if(!L){let{resolveUserCssConfig:Y,fingerprintConfig:N}=await import("./chunk-7xjm1zqa.js");try{L=N(await Y(process.cwd()))}catch{}}let{prepareImageDelivery:_}=await import("./chunk-97ej3abh.js"),F=await _(J.publicDir,J.outputDir);if(F.count>0)console.log(`Optimized ${F.count} image(s) for responsive delivery`),L=[L,F.fingerprint].filter(Boolean).join(":");let C=new wq(J.cacheDir,L);if(J.cache)await C.load();try{let{generateCss:Y}=await import("./chunk-7xjm1zqa.js");await Y('<div class="bg-black"></div>')}catch{}Yq();let kq=$?.routeMiddleware?.dir||"middleware";await jq(process.cwd(),kq);let p=Vq();if(p.length>0)console.log(`Loaded ${p.length} middleware: ${p.join(", ")}`);let bq=$?.routeMiddleware?.global||[];Fq($?.layoutsDir,d(process.cwd()));let i=l(".",{pagesDir:J.pagesDir,pagesDirs:$?._layerPageDirs});console.log(`Found ${i.length} routes`);let g=[];for(let Y of i){let N=await uq(Y);for(let H of N)g.push({route:Y,url:H.url,params:H.params,props:H.props,revalidate:H.revalidate??J.revalidate})}W.totalPages=g.length,console.log(`Generating ${W.totalPages} pages...`);let b=[],s=[];for(let Y=0;Y<g.length;Y+=J.concurrency)s.push(g.slice(Y,Y+J.concurrency));for(let Y of s)await Promise.all(Y.map(async(N)=>{let{route:H,url:V,params:S,props:Sq,revalidate:a}=N;try{await J.hooks.onPageStart?.(V);let w=await Bun.file(H.filePath).text(),R=JJ(w),vq=R?.middleware?Array.isArray(R.middleware)?R.middleware:[R.middleware]:[],t=[...bq,...vq];if(t.length>0){let D=Gq(V,S,R||{}),M=Lq(D,null,void 0,{isServer:!0}),E=await Nq(t,M);if(E.redirect){let U=typeof E.redirect==="string"?E.redirect:E.redirect.path||E.redirect,x=QJ(String(U),V),k=ZJ(V,J);await O.promises.mkdir(j.dirname(k),{recursive:!0}),await Bun.write(k,x),W.successCount++,W.pages.push({route:V,outputPath:k,size:Buffer.byteLength(x),cached:!1}),b.push({loc:V,lastmod:new Date().toISOString()}),console.log(` \u21B3 ${V} \u2192 redirect to ${U}`);return}if(E.abort){let U=typeof E.abort==="string"?E.abort:E.abort?.error?.message||"aborted";console.warn(` \u21B3 ${V} \u2014 middleware aborted: ${U}`);return}}let e=w.match(/definePageMeta\s*\(\s*\{[\s\S]*?validate\s*:\s*((?:\([^)]*\)|[^,}])*(?:\{[\s\S]*?\})?)/m);if(e)try{if(!await Function("route",`
45
45
  const validate = ${e[1]};
46
46
  return validate(route);
47
47
  `)({params:S})){console.warn(`Validation failed for ${V}, skipping...`);return}}catch{}let I=null,qq=!1;if(J.cache){if(I=C.get(V,H.filePath),I)qq=!0,W.cachedCount++}if(!I){let D=await Mq(H,S,Sq,J,$);if(I=D.html,J.failOnIncludeError&&D.includeFailures.length>0)throw Error(`${D.includeFailures.length} include(s) failed to resolve, so this page would have shipped with an error banner where the markup should be:
@@ -904,6 +904,14 @@ export interface StxConfig {
904
904
  */
905
905
  viewTransitionEasing?: string;
906
906
  scrollToTop?: boolean;
907
+ /**
908
+ * Return to the position an entry was left at on back/forward, instead of
909
+ * the top of the page. Switches history.scrollRestoration to manual and
910
+ * keeps the positions in sessionStorage, keyed per history entry, which
911
+ * also covers the reload the browser would otherwise have handled itself.
912
+ * Default: true.
913
+ */
914
+ scrollRestoration?: boolean;
907
915
  prefetch?: boolean;
908
916
  cache?: boolean;
909
917
  cacheTTL?: number;
@@ -0,0 +1,67 @@
1
+ /**
2
+ * A substituted value cannot introduce a URL scheme the page did not ask for.
3
+ *
4
+ * `{{ }}` escapes HTML, which stops a value closing its attribute or opening a
5
+ * tag -- and says nothing about what the attribute means. `javascript:alert(1)`
6
+ * contains no character escaping touches, so
7
+ * `<a href="{{ url }}">` with a stored URL ran script on click, from a value a
8
+ * person typed. The same goes for `vbscript:` (old Edge, still shipped in
9
+ * Windows-embedded browsers) and for `data:text/html`, which navigates to a
10
+ * document the attacker wrote, on the page's own origin in some browsers.
11
+ *
12
+ * What is *not* here matters as much:
13
+ *
14
+ * - **Only the scheme position.** `href="/search?q={{ term }}"` is left alone:
15
+ * a scheme can only be at the start of a URL, so a value substituted after
16
+ * anything else cannot introduce one.
17
+ * - **Only URL attributes.** `title="{{ text }}"` keeps every byte. A value is
18
+ * rewritten only where the browser would resolve it as a URL.
19
+ * - **`{!! !!}` is untouched**, as it is for HTML: the raw form is how a
20
+ * template says it vouches for the value, and a sanitizer with no way out is
21
+ * one people work around.
22
+ * - **`data:image/...` still loads**, which `<StxImage>`'s own blur placeholder
23
+ * needs; only the data URLs that carry a document are refused.
24
+ *
25
+ * Refused values are prefixed rather than emptied, the way Angular does it: the
26
+ * value stays visible in the DOM and in view-source, so the person debugging it
27
+ * sees what was blocked instead of an attribute that mysteriously went away,
28
+ * and `unsafe:javascript:alert(1)` is an unknown scheme, so a click does
29
+ * nothing.
30
+ */
31
+ /** What a refused value is rewritten to, so it is inert but still readable. */
32
+ export declare const UNSAFE_URL_PREFIX = "unsafe:";
33
+ /** Which policy an attribute name gets, or null when it holds no URL. */
34
+ export declare function urlAttributeKind(name: string): 'navigable' | 'fetched' | null;
35
+ /** Whether this value would introduce a scheme the attribute must not follow. */
36
+ export declare function isDangerousUrl(value: string, kind?: 'navigable' | 'fetched'): boolean;
37
+ /** The value as it may be written, refused ones prefixed to make them inert. */
38
+ export declare function sanitizeUrlValue(value: string, kind?: 'navigable' | 'fetched'): string;
39
+ /**
40
+ * The attribute a substitution at the end of `before` is landing in the scheme
41
+ * position of, or null.
42
+ *
43
+ * `before` is everything already written, so its tail says where the next
44
+ * characters go: inside an open quoted attribute value, with nothing before
45
+ * them in that value. Anything already written into the value means the
46
+ * substitution cannot be the scheme, and an unquoted value is not matched --
47
+ * the interpolation passes write quoted attributes.
48
+ */
49
+ export declare function urlSchemePosition(before: string): 'navigable' | 'fetched' | null;
50
+ /**
51
+ * The tail of the already-written output that a scheme check needs.
52
+ *
53
+ * A page can hold hundreds of substitutions, and slicing the whole output at
54
+ * each one is quadratic -- one of the compile budgets in
55
+ * scripts/performance-budgets.ts is what would notice. Only the enclosing tag's
56
+ * last attribute matters, so a window is enough.
57
+ */
58
+ export declare function schemeWindow(output: string, offset: number, span?: number): string;
59
+ /**
60
+ * Decide the final text for a value that was just substituted: `escaped` as it
61
+ * is, or prefixed when it landed in the scheme position of a URL attribute and
62
+ * introduces a scheme that attribute must not follow.
63
+ *
64
+ * The decision reads the raw value, not the escaped one, so it is testing what
65
+ * the browser will resolve rather than what the HTML escape happened to leave.
66
+ */
67
+ export declare function sanitizeSubstitutedUrl(before: string, raw: string, escaped?: string): string;
@@ -0,0 +1,40 @@
1
+ export const UNSAFE_URL_PREFIX = "unsafe:";
2
+ const NAVIGABLE = "href|xlink:href|action|formaction|ping|cite|manifest|data|to", FETCHED = "src|srcset|poster|background", SCRIPT_SCHEME = /^(?:javascript|vbscript|livescript|mocha|view-source):/, DOCUMENT_DATA = /^data:(?:text\/html|text\/xml|application\/xhtml\+xml|application\/xml|image\/svg\+xml)/, FETCHED_DATA = /^data:(?:text\/html|application\/xhtml\+xml)/, STRIPPED = new RegExp("[\\u0000-\\u0020\\u00A0\\u1680\\u2000-\\u200F\\u2028\\u2029\\u202F\\u205F\\u3000\\uFEFF]+", "g");
3
+ function normalizeScheme(value) {
4
+ return value.replace(STRIPPED, "").toLowerCase();
5
+ }
6
+ export function urlAttributeKind(name) {
7
+ const lower = name.toLowerCase();
8
+ if (new RegExp(`^(?:${NAVIGABLE})$`).test(lower))
9
+ return "navigable";
10
+ if (new RegExp(`^(?:${FETCHED})$`).test(lower))
11
+ return "fetched";
12
+ return null;
13
+ }
14
+ export function isDangerousUrl(value, kind = "navigable") {
15
+ const normalized = normalizeScheme(value);
16
+ if (SCRIPT_SCHEME.test(normalized))
17
+ return !0;
18
+ return kind === "navigable" ? DOCUMENT_DATA.test(normalized) : FETCHED_DATA.test(normalized);
19
+ }
20
+ export function sanitizeUrlValue(value, kind = "navigable") {
21
+ return isDangerousUrl(value, kind) ? UNSAFE_URL_PREFIX + value : value;
22
+ }
23
+ export function urlSchemePosition(before) {
24
+ const open = before.match(/(?:^|[\s"'`/])([A-Za-z][\w:-]*)\s*=\s*(["'])([^"']*)$/);
25
+ if (!open)
26
+ return null;
27
+ if (open[3].trim() !== "")
28
+ return null;
29
+ return urlAttributeKind(open[1]);
30
+ }
31
+ export function schemeWindow(output, offset, span = 256) {
32
+ if (offset <= span)
33
+ return output.slice(0, offset);
34
+ const window = output.slice(offset - span, offset), boundary = window.search(/[\s"'`/]/);
35
+ return boundary === -1 ? "" : window.slice(boundary);
36
+ }
37
+ export function sanitizeSubstitutedUrl(before, raw, escaped = raw) {
38
+ const kind = urlSchemePosition(before);
39
+ return kind && isDangerousUrl(raw, kind) ? UNSAFE_URL_PREFIX + escaped : escaped;
40
+ }
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@stacksjs/stx",
3
3
  "type": "module",
4
- "version": "0.2.338",
4
+ "version": "0.2.340",
5
5
  "description": "A performant UI Framework. Powered by Bun.",
6
6
  "author": "Chris Breuer <chris@stacksjs.org>",
7
7
  "license": "MIT",
@@ -117,12 +117,12 @@
117
117
  "dependencies": {
118
118
  "@stacksjs/ts-css": "^0.3.2",
119
119
  "@stacksjs/clapp": "^0.2.16",
120
- "@stacksjs/desktop": "0.2.338",
121
- "@stacksjs/sanitizer": "0.2.338",
120
+ "@stacksjs/desktop": "0.2.340",
121
+ "@stacksjs/sanitizer": "0.2.340",
122
122
  "@stacksjs/ts-i18n": "^0.1.11",
123
- "bun-plugin-stx": "0.2.338",
123
+ "bun-plugin-stx": "0.2.340",
124
124
  "bunfig": "^0.15.19",
125
- "stx-router": "0.2.338",
125
+ "stx-router": "0.2.340",
126
126
  "ts-broadcasting": "^0.0.10",
127
127
  "ts-images": "^0.2.22",
128
128
  "ts-syntax-highlighter": "^0.2.1"
@@ -1,2 +0,0 @@
1
- // @bun
2
- import{Hi as a,Ii as b}from"./chunk-mnyehz4t.js";import"./chunk-7we3xfde.js";import"./chunk-ypzm47q3.js";import"./chunk-1yj4xd6n.js";import"./chunk-e3rgky2r.js";import"./chunk-d7zxg9bp.js";import"./chunk-t00ga194.js";import"./chunk-hrdd26r4.js";import"./chunk-7r79j1hs.js";import"./chunk-ay336sqb.js";import"./chunk-nhbc464j.js";import"./chunk-vaggjvsm.js";import"./chunk-q9ckfwhh.js";import"./chunk-kermxyfe.js";import"./chunk-k3dtvay1.js";import"./chunk-aved735s.js";import"./chunk-799s9mwc.js";import"./chunk-7r80apc5.js";import"./chunk-2tjk867y.js";import"./chunk-t8ctvjqe.js";import"./chunk-deqnt1w5.js";import"./chunk-w0hzaka3.js";import"./chunk-wb90259a.js";import"./chunk-5g6rprcy.js";export{a as getStoreScript,b as clearStoreCache};
@@ -1,2 +0,0 @@
1
- // @bun
2
- import{Sk as a,Tk as b,Uk as c,Vk as d,Wk as e}from"./chunk-3cjvqa0s.js";import"./chunk-5g6rprcy.js";export{b as injectPwaTags,e as generateThemeColorMeta,c as generateSwRegistrationScript,a as generatePwaTags,d as generateManifestLink};
@@ -1,3 +0,0 @@
1
- // @bun
2
- import{hq as M,lq as w}from"./chunk-e3rgky2r.js";import{Fs as O}from"./chunk-nhbc464j.js";import{tw as G}from"./chunk-5g6rprcy.js";import V from"fs";import W from"path";import{fileURLToPath as y}from"url";var A=new Map,X=new Map;async function u(j){let z;for(let I=0;I<3;I++)try{let Y=(await V.promises.stat(j)).mtime.getTime(),Q=X.get(j);if(Q&&Q.mtime===Y)return Q.content;let Z=await Bun.file(j).text(),N=(await V.promises.stat(j)).mtime.getTime();if(N!==Y)continue;return X.set(j,{content:Z,mtime:N}),Z}catch(J){z=J;break}throw X.delete(j),Error(`File not found: ${j}${z?` (${z.message})`:""}`)}function g(j){X.delete(j)}function P(j){for(let B of X.keys())if(B.startsWith(j))X.delete(B)}var q=null,v=null,T=null;function m(j){T=j}async function k(j=!1){let B=T??await import("./chunk-qtc28zy1.js");if(j)return B.generateSignalsRuntimeDev();if(q===null)q=B.generateSignalsRuntime();return q}var D=null;async function H(){if(D===null){let{getRouterScript:j}=await import("./chunk-gz539gk6.js");D=j()}return D}var L={};async function p(j,B=!1){let z=j==="runtime"?await k(B):await H(),I=j==="runtime"&&B?"runtime-debug":j,J=L[I];if(!J||J.content!==z)J={content:z,hash:Bun.hash(z).toString(16).padStart(16,"0").slice(0,16)},L[I]=J;return{content:z,hash:J.hash,url:`/_stx/${j}.${J.hash}.js`}}function d(){X.clear(),w(),O(),q=null,v=null,D=null}function x(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")}var U;function b(){if(U)return U;let j="unknown";try{j=String(JSON.parse(V.readFileSync(new URL("../package.json",import.meta.url),"utf8")).version)}catch{}if(import.meta.url.endsWith(".ts"))try{let B=W.dirname(y(import.meta.url)),z=0;for(let I of V.readdirSync(B,{recursive:!0,withFileTypes:!0}))if(I.isFile()&&I.name.endsWith(".ts"))z=Math.max(z,V.statSync(W.join(I.parentPath,I.name)).mtimeMs);j+=`+src.${Math.trunc(z)}`}catch{}return U=j,j}async function f(j,B){try{if(!B.cachePath)return null;let z=W.resolve(B.cachePath),I=W.join(z,`${K(j)}.html`),J=W.join(z,`${K(j)}.meta.json`);if(!await M(I)||!await M(J))return null;let Y=await Bun.file(J).text(),Q=JSON.parse(Y);if(Q.cacheVersion!==B.cacheVersion)return null;if(Q.engine!==b())return null;if(Q.optionsSignature!==x(B))return null;if((await V.promises.stat(j)).mtime.getTime()>Q.mtime)return null;for(let $ of Q.dependencies)if(await M($)){if((await V.promises.stat($)).mtime.getTime()>Q.mtime)return null}else return null;return await Bun.file(I).text()}catch(z){return console.warn(`Cache error for ${j}:`,z),null}}async function l(j,B,z,I){try{if(!I.cachePath)return;let J=W.resolve(I.cachePath);await V.promises.mkdir(J,{recursive:!0});let Y=W.join(J,`${K(j)}.html`),Q=W.join(J,`${K(j)}.meta.json`),Z=await V.promises.stat(j);await Bun.write(Y,B);let $={sourcePath:j,mtime:Z.mtime.getTime(),dependencies:Array.from(z),cacheVersion:I.cacheVersion,engine:b(),optionsSignature:x(I),generatedAt:Date.now()};await Bun.write(Q,JSON.stringify($,null,2)),A.set(j,{output:B,mtime:Z.mtime.getTime(),dependencies:z})}catch(J){console.warn(`Failed to cache template ${j}:`,J)}}var E=16;function K(j){return new Bun.CryptoHasher("sha1").update(j).digest("hex").substring(0,E)}
3
- export{A as Jj,u as Kj,g as Lj,P as Mj,m as Nj,k as Oj,H as Pj,p as Qj,d as Rj,b as Sj,f as Tj,l as Uj,K as Vj};
@@ -1,2 +0,0 @@
1
- // @bun
2
- import{Ue as a}from"./chunk-39xtzfzf.js";import"./chunk-57atgbyq.js";import"./chunk-e3rgky2r.js";import"./chunk-d7zxg9bp.js";import"./chunk-t00ga194.js";import"./chunk-hrdd26r4.js";import"./chunk-7r79j1hs.js";import"./chunk-ay336sqb.js";import"./chunk-nhbc464j.js";import"./chunk-vaggjvsm.js";import"./chunk-q9ckfwhh.js";import"./chunk-kermxyfe.js";import"./chunk-k3dtvay1.js";import"./chunk-aved735s.js";import"./chunk-799s9mwc.js";import"./chunk-7r80apc5.js";import"./chunk-2tjk867y.js";import"./chunk-t8ctvjqe.js";import"./chunk-deqnt1w5.js";import"./chunk-w0hzaka3.js";import"./chunk-wb90259a.js";import"./chunk-5g6rprcy.js";export{a as buildApp};
@@ -1,2 +0,0 @@
1
- // @bun
2
- import{$k as d,Yk as a,Zk as b,_k as c,al as e,bl as f,cl as g,dl as h,el as i,fl as j,gl as k,hl as l,il as m,jl as n,kl as o}from"./chunk-ypzm47q3.js";import"./chunk-1yj4xd6n.js";import"./chunk-e3rgky2r.js";import"./chunk-d7zxg9bp.js";import"./chunk-t00ga194.js";import"./chunk-hrdd26r4.js";import"./chunk-7r79j1hs.js";import"./chunk-ay336sqb.js";import"./chunk-nhbc464j.js";import"./chunk-vaggjvsm.js";import"./chunk-q9ckfwhh.js";import"./chunk-kermxyfe.js";import"./chunk-k3dtvay1.js";import"./chunk-aved735s.js";import"./chunk-799s9mwc.js";import"./chunk-7r80apc5.js";import"./chunk-2tjk867y.js";import"./chunk-t8ctvjqe.js";import"./chunk-deqnt1w5.js";import"./chunk-w0hzaka3.js";import"./chunk-wb90259a.js";import"./chunk-5g6rprcy.js";export{o as tempBuildName,b as shouldLogBundlerDiagnostics,f as setBundlerFallbackMode,l as rewriteRegistryImports,g as resolveBundlerFallback,j as registryIdForPath,c as recordBundleFailure,m as queueClientBundleBuild,k as normalizeRegistrySpecifiers,h as hasUserImports,d as getBundleFailures,a as clientBundleDependencies,e as clearBundleFailures,n as bundleClientScript,i as MODULE_SPECIFIER_PREFIX};
@@ -1,2 +0,0 @@
1
- // @bun
2
- import{ll as a,ml as b,nl as c,ol as d,pl as e,ql as f,rl as g}from"./chunk-1yj4xd6n.js";import"./chunk-7r79j1hs.js";import"./chunk-vaggjvsm.js";import"./chunk-k3dtvay1.js";import"./chunk-w0hzaka3.js";import"./chunk-5g6rprcy.js";export{e as productionApiDispatcher,g as isServerApiSource,b as generateApiTypes,a as discoverServerApi,f as createServerApi,d as createApiDispatcher,c as buildServerApi};
@@ -1,2 +0,0 @@
1
- // @bun
2
- import{$ as $l,$a as bo,$b as mp,$c as mq,$d as mr,A as Lk,Aa as nn,Ab as Ho,Ac as Np,Ad as Nq,Ae as Tr,B as Mk,Ba as on,Bb as Io,Bc as Op,Bd as Oq,Be as Ur,C as Nk,Ca as Bn,Cb as Jo,Cc as Pp,Cd as Pq,Ce as Vr,D as Ok,Da as Cn,Db as Ko,Dc as Qp,Dd as Qq,De as Wr,E as El,Ea as Dn,Eb as Lo,Ec as Rp,Ed as Rq,Ee as Xr,F as Fl,Fa as En,Fb as Mo,Fc as Sp,Fd as Sq,Fe as Yr,G as Gl,Ga as Fn,Gb as No,Gc as Tp,Gd as Tq,Ge as Zr,H as Hl,Ha as Gn,Hb as Oo,Hc as Up,Hd as Uq,He as _r,I as Il,Ia as Kn,Ib as Po,Ic as Vp,Id as Vq,Ie as $r,J as Jl,Ja as Ln,Jb as Qo,Jc as Wp,Jd as Wq,Je as as,K as Kl,Ka as Mn,Kb as Ro,Kc as Xp,Kd as Xq,Ke as bs,L as Ll,La as Nn,Lb as So,Lc as Yp,Ld as Yq,M as Ml,Ma as On,Mb as To,Mc as Zp,Md as Zq,N as Nl,Na as Pn,Nb as _o,Nc as _p,Nd as _q,O as Ol,Oa as Qn,Ob as $o,Oc as $p,Od as $q,P as Pl,Pa as Rn,Pb as ap,Pc as aq,Pd as ar,Q as Ql,Qa as Sn,Qb as bp,Qc as bq,Qd as br,R as Rl,Ra as Tn,Rb as cp,Rc as cq,Rd as cr,S as Sl,Sa as Un,Sb as dp,Sc as dq,Sd as dr,T as Tl,Ta as Vn,Tb as ep,Tc as eq,Td as er,U as Ul,Ua as Wn,Ub as fp,Uc as fq,Ud as fr,V as Vl,Va as Xn,Vb as gp,Vc as gq,Vd as gr,W as Wl,Wa as Yn,Wb as hp,Wc as hq,Wd as hr,X as Xl,Xa as Zn,Xb as ip,Xc as iq,Xd as ir,Y as Yl,Ya as _n,Yb as jp,Yc as jq,Yd as jr,Z as Zl,Za as $n,Zb as kp,Zc as kq,Zd as kr,_ as _l,_a as ao,_b as lp,_c as lq,_d as lr,aa as am,ab as co,ac as np,ad as nq,ae as nr,ba as bm,bb as eo,bc as op,bd as oq,be as ur,ca as cm,cb as fo,cc as pp,cd as pq,ce as vr,da as dm,db as go,dc as qp,dd as qq,de as wr,ea as em,eb as ho,ec as rp,ed as rq,ee as xr,fa as fm,fb as io,fc as sp,fd as sq,fe as yr,ga as gm,gb as jo,gc as tp,gd as tq,ge as zr,ha as hm,hb as ko,hc as up,hd as uq,he as Ar,ia as im,ib as lo,ic as vp,id as vq,ie as Br,ja as jm,jb as mo,jc as wp,jd as wq,je as Cr,ka as km,kb as no,kc as xp,kd as xq,ke as Dr,la as lm,lb as oo,lc as yp,ld as yq,le as Er,ma as mm,mb as po,mc as zp,md as zq,me as Fr,na as nm,nb as so,nc as Ap,nd as Aq,ne as Gr,o as a,oa as om,ob as to,oc as Bp,od as Bq,oe as Hr,p as wk,pa as bn,pb as uo,pc as Cp,pd as Cq,pe as Ir,q as xk,qa as cn,qb as vo,qc as Dp,qd as Dq,qe as Jr,r as yk,ra as dn,rb as xo,rc as Ep,rd as Eq,re as Kr,s as zk,sa as en,sb as yo,sc as Fp,sd as Fq,se as Lr,t as Ak,ta as fn,tb as zo,tc as Gp,td as Gq,te as Mr,u as Bk,ua as gn,ub as Ao,uc as Hp,ud as Hq,ue as Nr,v as Ck,va as hn,vb as Co,vc as Ip,vd as Iq,ve as Or,w as Dk,wa as jn,wb as Do,wc as Jp,wd as Jq,we as Pr,x as Ek,xa as kn,xb as Eo,xc as Kp,xd as Kq,xe as Qr,y as Jk,ya as ln,yb as Fo,yc as Lp,yd as Lq,ye as Rr,z as Kk,za as mn,zb as Go,zc as Mp,zd as Mq,ze as Sr}from"./chunk-wakb8z5q.js";import{Le as Uo,Me as Vo,Ne as Wo,Oe as Xo,Pe as Yo,Qe as Zo}from"./chunk-5r7gfwpj.js";import{Re as qo,Se as ro}from"./chunk-2ver2s2y.js";import{Te as wo}from"./chunk-fjrkyhm7.js";import{Ue as an}from"./chunk-39xtzfzf.js";import{Ve as Hn,We as In,Xe as Jn,Ye as Bo}from"./chunk-823h67tv.js";import{$e as Rk,Ze as Pk,_e as Qk,af as Sk,bf as Tk,cf as Uk,df as Vk,ef as Wk,ff as Xk,gf as Yk,hf as Zk,if as _k,jf as $k,kf as al,lf as bl}from"./chunk-ym3r8ktq.js";import{mf as sl,nf as tl,of as ul,pf as vl,qf as wl,rf as xl,sf as yl,tf as zl,uf as Al,vf as Bl,wf as Cl,xf as Dl}from"./chunk-tr9ynxdw.js";import{yf as ql,zf as rl}from"./chunk-m11pb9cx.js";import{Af as cl,Bf as dl,Cf as el,Df as fl,Ef as gl,Ff as hl,Gf as il,If as jl,Jf as kl,Kf as ll,Lf as ml,Mf as nl,Nf as ol,Qf as pl}from"./chunk-xe6zmdfq.js";import{Rf as Lm,Sf as Mm,Tf as Nm,Uf as Om,Vf as Pm,Wf as $m}from"./chunk-4cw0s9f4.js";import{$f as tm,Xf as pm,Yf as qm,Zf as rm,_f as sm,ag as um,bg as vm,cg as wm,dg as xm,eg as ym,fg as zm,gg as Am,hg as Bm,ig as Cm,jg as Dm,kg as Em,lg as Qm,mg as Rm,ng as Sm,og as Tm,pg as Um,qg as Vm,rg as Wm,sg as Xm,tg as Ym,ug as Zm,vg as _m}from"./chunk-fw56y3cb.js";import{wg as Fm,xg as Gm}from"./chunk-57atgbyq.js";import{Ag as rn,Bg as sn,Cg as tn,Dg as un,Eg as vn,Fg as wn,Gg as xn,Hg as yn,Ig as zn,Jg as An,yg as pn,zg as qn}from"./chunk-8bxtvsgm.js";import{Kg as gi,Lg as hi,Mg as ii,Ng as ji,Og as ki,Pg as li}from"./chunk-hfzv07az.js";import{Qg as Aj,Rg as Bj,Sg as Cj,Wg as Dj,Xg as Ej,Yg as Fj}from"./chunk-yne23w3c.js";import{$g as Nj,Zg as Lj,_g as Mj,ah as Oj,bh as Pj,ch as Qj,dh as Rj,eh as Sj,fh as Tj,gh as Uj,hh as Vj}from"./chunk-w72v0ab1.js";import{ih as qj,jh as rj,kh as sj,lh as tj,mh as uj,oh as vj,ph as wj,qh as xj,rh as yj,sh as zj}from"./chunk-18018jkn.js";import{th as lk,vh as mk}from"./chunk-sqvqwd0p.js";import{Bh,Ch,Dh,Eh,Fh,Gh}from"./chunk-7r9vgzg4.js";import{Ih as Hh,Jh as Ih,Kh as Jh,Lh as Kh,Mh as Lh,Nh as Mh,Oh as Nh,Ph as Oh,Qh as Ph,Rh as Qh,Sh as Rh,Th as Sh,Uh as Th,Vh as Uh}from"./chunk-a959m68j.js";import{Xh as Vh,Yh as Wh,Zh as Xh,_h as Yh}from"./chunk-1vb2rj09.js";import{di as Zh}from"./chunk-g6czgcg4.js";import{gi as ah}from"./chunk-zye9r15n.js";import{hi as bh}from"./chunk-1z1efvtw.js";import{ii as ch,ji as dh}from"./chunk-vgfd9582.js";import{ki as eh,li as fh,mi as gh,ni as hh,oi as ih,pi as jh}from"./chunk-qsbjtp60.js";import{qi as kh,ri as lh,si as mh,ti as nh,ui as oh}from"./chunk-nf7k53ap.js";import{vi as ph,wi as qh,xi as rh,yi as sh,zi as th}from"./chunk-zk6ghjnj.js";import{Ai as uh,Bi as vh,Ci as wh,Di as xh,Ei as yh,Fi as zh,Gi as Ah}from"./chunk-bgrkxzr7.js";import{Hi as _g,Ii as $g}from"./chunk-mnyehz4t.js";import"./chunk-7we3xfde.js";import{Mi as Ge,Ni as He,Oi as Ie,Pi as Je,Qi as Ke,Ri as Le,Si as Me,Ti as Ne,Ui as Oe,Vi as Pe,Wi as Qe,Xi as Re,Yi as Se,Zi as Te}from"./chunk-46tmg3k4.js";import{$i as kf,_i as jf,aj as lf,bj as mf,cj as nf,dj as of,ej as pf,fj as qf,gj as rf,hj as sf,ij as tf,jj as uf,kj as vf,lj as wf,mj as xf,nj as yf,oj as zf}from"./chunk-tsmdmf5h.js";import{Aj as $e,Bj as af,Cj as bf,Dj as cf,Ej as df,Fj as ef,Gj as ff,Hj as gf,Ij as hf,vj as We,wj as Xe,xj as Ye,yj as Ze,zj as _e}from"./chunk-e4g8wz6t.js";import{Jj as Af,Kj as Bf,Lj as Cf,Mj as Df,Nj as Ef,Oj as Ff,Pj as Gf,Qj as Hf,Rj as If,Sj as Jf,Tj as Kf,Uj as Lf,Vj as Mf}from"./chunk-aftqqqcg.js";import{nk as or,ok as pr,pk as qr,qk as rr,rk as sr,sk as tr}from"./chunk-vm5jbgb1.js";import{Ak as Km,tk as Fk,uk as Gk,vk as Hk,wk as Ik,xk as Hm,yk as Im,zk as Jm}from"./chunk-4904n5v0.js";import"./chunk-f6sejeg3.js";import"./chunk-ypzm47q3.js";import{ll as Yb,ml as Zb,ql as _b}from"./chunk-1yj4xd6n.js";import{$l as ac,$m as id,$n as Ae,$o as qg,$p as ni,$q as Xj,Al as Fa,Am as Bc,An as Jd,Ao as Of,Ap as Rg,Aq as Xi,Bl as Ga,Bm as Cc,Bn as Kd,Bp as Sg,Bq as Yi,Cl as Ha,Cm as Dc,Cn as Ld,Cp as Tg,Cq as Zi,Dl as Ia,Dm as Ec,Dn as Md,Dp as Ug,Dq as _i,El as Ja,Em as Fc,En as Nd,Ep as Vg,Eq as $i,Fl as Ka,Fm as Gc,Fn as Od,Fp as Wg,Fq as aj,Gl as La,Gm as Hc,Gn as Pd,Gp as Xg,Gq as bj,Hl as Ma,Hm as Rc,Hn as Qd,Ho as Pf,Hp as Yg,Hq as cj,Il as Na,Im as Sc,In as Rd,Ip as Zg,Iq as dj,Jl as Oa,Jm as Tc,Jn as Sd,Jo as Qf,Jp as _h,Jq as ej,Kl as ib,Km as Uc,Kn as Td,Kp as $h,Kq as fj,Ll as jb,Lm as Vc,Ln as ie,Lo as Rf,Lq as gj,Ml as kb,Mm as Wc,Mn as je,Mo as Sf,Mq as hj,Nl as lb,Nm as Xc,Nn as ke,No as Tf,Np as ai,Nq as ij,Ol as mb,On as le,Oo as Uf,Oq as jj,Pl as nb,Pm as Yc,Pn as me,Po as Vf,Pq as kj,Qm as Zc,Qn as ne,Qo as fg,Qq as lj,Rm as _c,Rn as oe,Ro as gg,Rq as mj,Sl as Fb,Sm as $c,Sn as pe,So as hg,Sq as nj,Tl as Gb,Tm as ad,Tn as qe,To as ig,Tq as oj,Ul as Hb,Um as bd,Un as re,Uo as jg,Uq as pj,Vl as Ib,Vm as cd,Vn as se,Vo as kg,Vp as bi,Vq as Gj,Wl as Jb,Wm as dd,Wn as te,Wo as lg,Wp as ci,Wq as Hj,Xl as Nb,Xm as ed,Xn as ue,Xo as mg,Xp as di,Xq as Ij,Yl as Ob,Ym as fd,Yn as ve,Yo as ng,Yp as ei,Yq as Jj,Zl as Pb,Zm as gd,Zo as og,Zp as fi,Zq as Kj,_l as $b,_m as hd,_n as ze,_o as pg,_p as mi,_q as Wj,am as bc,an as jd,ao as Be,ap as rg,aq as oi,ar as Yj,bm as cc,bn as kd,bo as Ce,bp as sg,bq as pi,br as Zj,cm as dc,cn as ld,co as De,cp as tg,cq as qi,cr as _j,dm as ec,dn as md,do as Ee,dp as ug,dq as ri,dr as $j,em as fc,en as nd,eo as Fe,ep as vg,eq as si,er as ak,fm as gc,fn as od,fp as wg,fq as ti,fr as bk,gm as hc,gn as pd,gp as xg,gq as ui,gr as ck,hm as ic,hn as qd,hp as yg,hq as vi,hr as dk,im as jc,in as rd,io as Ue,ip as zg,iq as wi,ir as ek,jm as kc,jn as sd,jo as Ve,jp as Ag,jq as xi,jr as fk,km as lc,kn as td,kp as Bg,kq as yi,kr as gk,lm as mc,ln as ud,lo as Nf,lp as Cg,lq as zi,lr as hk,mm as nc,mn as vd,mp as Dg,mq as Ai,mr as ik,nm as oc,nn as wd,np as Eg,nq as Bi,nr as jk,om as pc,on as xd,op as Fg,oq as Ci,or as kk,pm as qc,pn as yd,pp as Gg,pq as Mi,pr as nk,qm as rc,qn as zd,qp as Hg,qq as Ni,qr as ok,rm as sc,rn as Ad,rp as Ig,rq as Oi,rr as pk,sl as xa,sm as tc,sn as Bd,sp as Jg,sq as Pi,sr as qk,tl as ya,tm as uc,tn as Cd,tp as Kg,tq as Qi,tr as rk,ul as za,um as vc,un as Dd,up as Lg,uq as Ri,ur as sk,vl as Aa,vm as wc,vn as Ed,vp as Mg,vq as Si,vr as tk,wl as Ba,wm as xc,wn as Fd,wp as Ng,wq as Ti,wr as uk,xl as Ca,xm as yc,xn as Gd,xp as Og,xq as Ui,xr as vk,yl as Da,ym as zc,yn as Hd,yp as Pg,yq as Vi,zl as Ea,zm as Ac,zn as Id,zp as Qg,zq as Wi}from"./chunk-e3rgky2r.js";import{$r as pa,Ar as O,Br as P,Cr as Q,Dr as R,Er as S,Fr as T,Gr as U,Hr as V,Ir as W,Jr as X,Kr as Y,Lr as Z,Mr as _,Nr as $,Or as aa,Pr as ba,Qr as ca,Rr as da,Sr as ea,Tr as fa,Ur as ia,Vr as ja,Wr as ka,Xr as la,Yr as ma,Zr as na,_r as oa,as as qa,bs as ra,cs as sa,ds as ta,es as ua,fs as va,gs as wa,yr as M,zr as N}from"./chunk-d7zxg9bp.js";import{hs as ga,is as ha}from"./chunk-t00ga194.js";import{js as Kb,ks as Lb,ls as Mb}from"./chunk-hrdd26r4.js";import"./chunk-7r79j1hs.js";import{As as Li,ss as Di,ts as Ei,us as Fi,vs as Gi,ws as Hi,xs as Ii,ys as Ji,zs as Ki}from"./chunk-ay336sqb.js";import{Ss as Ic,Ts as Jc,Us as Kc,Vs as Lc,Ws as Mc,Ys as Nc,ft as Oc,gt as Pc,ht as Qc}from"./chunk-nhbc464j.js";import{it as Qb,jt as Rb,kt as Sb,lt as Tb,mt as Ub,nt as Vb}from"./chunk-vaggjvsm.js";import{ut as we,wt as xe,zt as ye}from"./chunk-q9ckfwhh.js";import"./chunk-kermxyfe.js";import{Et as Wb,Ft as Xb}from"./chunk-k3dtvay1.js";import{Jt as Wf,Kt as Xf,Lt as Yf,Mt as Zf,Nt as _f,Ot as $f,Pt as ag,Rt as bg,St as cg,Tt as dg,Ut as eg}from"./chunk-aved735s.js";import{$t as h,Au as I,Bu as J,Cu as K,Du as L,Vt as b,Wt as c,Xt as d,Yt as e,Zt as f,_t as g,au as i,bu as j,cu as k,du as l,eu as m,fu as n,gu as o,hu as p,iu as q,ju as r,ku as s,lu as t,mu as u,nu as v,ou as w,pu as x,qu as y,ru as z,su as A,tu as B,uu as C,vu as D,wu as E,xu as F,yu as G,zu as H}from"./chunk-799s9mwc.js";import{$u as ge,Nu as Ud,Ou as Vd,Pu as Wd,Qu as Xd,Ru as Yd,Su as Zd,Tu as _d,Uu as $d,Vu as ae,Wu as be,Xu as ce,Yu as de,Zu as ee,_u as fe,av as he}from"./chunk-7r80apc5.js";import"./chunk-2tjk867y.js";import"./chunk-t8ctvjqe.js";import{gv as ob,hv as pb,iv as qb,jv as rb,kv as sb,lv as tb,mv as ub,nv as vb,ov as wb,pv as xb,qv as yb,rv as zb,sv as Ab,tv as Bb,uv as Cb,vv as Db,wv as Eb}from"./chunk-deqnt1w5.js";import{$v as db,Av as Pa,Bv as Qa,Ev as Ra,Jv as Sa,Kv as Ta,Qv as Ua,Rv as Va,Sv as Wa,Tv as Xa,Uv as Ya,Vv as Za,Wv as _a,Xv as $a,Yv as ab,Zv as bb,_v as cb,aw as eb,bw as fb,cw as gb,ew as hb}from"./chunk-w0hzaka3.js";import"./chunk-wb90259a.js";import"./chunk-5g6rprcy.js";export{Zk as writeNetlifyConfig,Rm as writeManifest,Cl as writeImageManifest,hp as wrapComponentForHMR,Qr as withDefaults,kk as webComponentDirectiveHandler,Yp as watermark,_q as watchViews,Ml as watchMultiple,Nl as watchEffect,Ll as watch,De as warmImagePlaceholders,_l as waitForStore,X as waitForLocale,Vo as virtualPathFor,Zj as videoDirective,G as validators,Ur as validated,te as validateValueEnhanced,bi as validateTemplate,Fm as validateRouteRules,bq as validateParams,ue as validateFormEnhanced,Pq as validateFile,pe as validateFields,oe as validateField,di as validateDirective,Od as validateCspDirectives,sk as validateConfig,cn as validateComponentScripts,Bn as validateComponentProps,Zg as validateClientScript,Yh as v,zc as usesSignalsInScript,ub as usesReactiveRuntime,qi as userComponentFileExists,Eh as useVirtualList,ae as useTitle,Zl as useStoreOrThrow,zp as useStore,Jk as useStorage,rf as useSlots,Lk as useSessionStorage,Wb as useServerRuntimeConfig,Of as useServerData,Zd as useSeoMeta,Xb as useRuntimeConfig,$l as useRouteParams,bm as useRouteParamOrThrow,am as useRouteParam,ae as usePageTitle,hf as useOptimistic,wf as useModel,dm as useMiddlewareValue,cm as useMiddlewareState,Kk as useLocalStorage,ap as useLoadingIndicator,Xd as useHead,Vh as useForm,tf as useAttrs,Rq as uploadFiles,Qq as uploadFile,Wl as updateInstance,ff as untrack,Gi as unregisterDirective,Xl as unmountInstance,Hc as unescapeHtml,Yo as typecheckStxFiles,pi as transpileTypeScript,Dr as translate,Ba as transitionDirective,dc as transformAutoImports,vn as toUsers,un as toUser,Hp as thumbnail,Iq as thumbHashToRGBA,Jq as thumbHashToDataURL,wb as templateNeedsRuntime,vb as templateHasReactiveContext,Af as templateCache,ed as syncRecordedResponse,ep as stxClientHelpers,$f as structuredDataDirective,Gr as stripLocalePrefix,Cm as stripDocumentWrapper,Lb as stripCommentsAndLiterals,go as stringToStream,Cd as strictCspPreset,Oe as streamingSuspenseDirective,Se as streamToResponse,Me as streamTemplateSimple,Ge as streamTemplate,Ek as stopHmrServer,rn as stopBroadcasting,Tb as stateDirName,Ub as stateDir,We as state,Tg as startsDocument,Bo as startProductionServer,wo as startInteractive,qn as startBroadcasting,Ir as stampLocaleLayoutGroup,Ia as staggerDirective,$p as srcsetUrls,Ja as springDirective,ld as splitByPipe,ym as spaNavVaryHeaders,Wo as sourcePathFor,gq as smartBatchSign,si as slotContentHasExpressions,eq as signUrl,ni as shouldTranspileTypeScript,Bk as shouldReloadOnChange,jq as shouldRefreshSignature,Ck as shouldIgnoreFile,wh as shouldCacheComponent,Lp as sharpen,Xr as shape,Sb as setStateDir,hm as setRouteParams,im as setMiddlewareState,Ce as setImagePlaceholder,lf as setGlobalProvide,b as setErrorLocale,El as setCurrentInstance,Nj as setCachedVideoResult,Cj as setCachedImageResult,wj as setCached,_r as serveStxFile,as as serveMultipleStxFiles,wk as serveMarkdownFile,Mo as serveFile,bs as serveApp,Lo as serve,kp as serializeState,Tm as serializeSetCookie,Np as sepia,_d as seoMetaToHeadConfig,Ca as scrollAnimateDirective,va as screenReaderDirective,bk as scopeHTML,ak as scopeCSS,cg as scanForSitemapEntries,pa as scanA11yTargets,qa as scanA11yIssues,Rp as saturation,cq as sanitizeParams,I as sanitizeFilePath,J as sanitizeExpression,K as sanitizeDirectiveParams,H as sanitizeDirectiveParam,L as sanitizeComponentProps,B as safeExecuteAsync,A as safeExecute,Cb as runtimeHandledXAttrsLiteral,ng as runPreProcessingMiddleware,og as runPostProcessingMiddleware,Wm as runPageAction,af as runMountCallbacks,gb as runMiddleware,Ul as runHooks,wr as runDoctor,bf as runDestroyCallbacks,rg as runComposers,Sp as rotate,Zh as rewriteImagesWithSiblings,fd as responseBindings,wi as resolveTemplatePath,ha as resolveStxTargets,ok as resolveStxDirectories,Cr as resolveI18n,Fp as resize,fg as resetUnscopedSignalWarnings,Fc as resetRejectedExpressionWarnings,kc as resetPlaceholders,Wd as resetHead,jp as resetHMRHandler,o as resetErrorConfig,Sr as required,Uf as reportDeferredLoopWarnings,oc as replacePlaceholders,wc as replaceInterpolations,Yq as renderView,Wj as renderVideoComponent,ac as renderVendorStyleTags,fr as renderToString,gr as renderToStream,hr as renderToDOM,Hq as renderThumbhashToCanvas,tr as renderTemplateString,rr as renderTemplate,sr as renderString,Je as renderStreamingPage,ii as renderSlot,mh as renderSSRSuspense,rq as renderProtectedVideo,qq as renderProtectedImg,dq as renderMediaUpload,qr as renderMarkdownView,Jm as renderLayoutTypes,Gj as renderImgComponent,sl as renderImageComponent,ce as renderHtmlAttrs,be as renderHead,$q as renderEmail,ui as renderComponentWithSlot,de as renderBodyAttrs,up as render,Ed as relaxedCspPreset,ne as registerValidationRule,Qe as registerStreamingDirectives,Bp as registerStoresClient,fm as registerStore,ag as registerSeoDirectives,_a as registerMiddleware,sc as registerFilters,rc as registerFilter,d as registerErrorMessages,se as registerEnhancedValidationRule,Di as registerDirective,Nd as registerCspDirectives,En as registerComponentDirectives,Oa as registerAnimationDirectives,wa as registerA11yDirectives,ec as referencesName,Il as ref,oo as redirect,ad as recordResponseStatus,bd as recordResponseHeader,Vb as rebaseOntoStateDir,cd as readResponseStatus,dd as readResponseHeaders,uk as readMarkdownFile,Bf as readFileCached,Jl as reactive,Wp as quality,oq as pruneSignatureCache,zj as pruneCache,jf as provide,pr as protectCodeBlocks,Rr as prop,ug as processVueTemplate,Ch as processVirtualListDirectives,Gh as processVirtualGridDirectives,Vj as processVideo,qe as processValidateDirective,ea as processTranslateDirective,gh as processTransitionDirectives,jh as processTransitionAttributes,ge as processTitleDirective,Uc as processTemplateBindings,ch as processTeleportDirectives,kh as processSuspenseDirectives,Xf as processStructuredData,Ke as processStreamDirectives,gd as processStatusDirective,Th as processStaticDirectives,lg as processStackReplacements,kg as processStackPushDirectives,ji as processSlots,Am as processShell,Fe as processServerBindings,Yf as processSeoDirective,Re as processSectionDirectives,Mc as processScopedStyles,Sc as processReactiveBindings,sq as processProtectedMedia,Mh as processPartialHydrationDirectives,Yg as processOnceDirective,mg as processMiddleware,Wf as processMetaDirectives,he as processMetaDirective,vk as processMarkdownFileDirectives,Bi as processMarkdownDirectives,Vf as processLoops,uh as processKeepAliveDirectives,Xg as processJsonDirective,Fh as processInfiniteListDirectives,jg as processIncludes,Ij as processImgComponents,ul as processImageComponents,hl as processImage,fe as processHeadDirective,je as processForms,le as processFormInputDirectives,Dc as processExpressions,Ib as processEventDirectives,me as processErrorDirective,vg as processDynamicComponents,_h as processDirectives,Li as processDirectiveAttributes,bh as processDeferDirectives,Sd as processCustomDirectives,Kd as processCspDirectives,Yr as processComponentProps,jc as processClientScript,ke as processBasicFormDirectives,ph as processAsyncDirectives,Td as processAppearanceBootstrapDirective,Fa as processAnimationDirectives,ka as processA11yDirectives,ye as prepareImageDelivery,T as preloadTranslationsBackground,S as preloadTranslations,$o as preloadIslandHandlers,Ee as preloadIconCollection,mn as poolStrings,mk as pluginManager,Ae as placeholdersWarmed,fh as performLeave,eh as performEnter,cf as pendingLifecycleCounts,gf as peek,gg as partialsCache,Xj as parseVideoDirectiveOptions,Dp as parseUrl,Kq as parseThumbhashString,rd as parseSwitchBlock,gi as parseSlots,hi as parseSlotElement,wd as parseScriptDeclarations,ik as parseSFCComponent,tq as parseProtectedArgs,Tf as parseLoopBinding,Hj as parseImgComponent,Zi as parseImageUrl,tl as parseImageComponent,Um as parseFormBody,td as parseExpressionWithFilters,Fn as parseDefaults,lo as parseCookies,rm as parseContainerSelector,od as parseConditionalBlock,ud as parseArguments,Ma as parseAnimationShorthand,Tr as optional,nn as optimizeTemplate,zl as optimizeImage,Al as optimizeDirectory,Vr as oneOf,hg as onceStore,Rl as onUpdated,Rc as onUpdate,Tl as onUnmounted,mm as onServer,Pl as onMounted,_e as onMount,Sh as onHydrated,pf as onErrorCaptured,$e as onDestroy,Ah as onDeactivated,lm as onClient,Ql as onBeforeUpdate,Sl as onBeforeUnmount,Ol as onBeforeMount,zh as onActivated,Dq as observeElement,po as notFound,Ag as normalizeCriticalHeadOrder,of as nextTick,In as negotiateEncoding,Ua as navigateTo,Vl as mountInstance,Ea as motionDirective,Dd as moderateCspPreset,ln as minifyHtml,_f as metaDirective,Lg as metaDedupKey,Ep as mergeParams,Ng as mergeHtmlAttrs,Yd as mergeHeadConfigs,Jc as mergeCssConfig,Hd as mergeCspDirectives,Ra as matchRoute,Ci as markdownDirectiveHandler,tk as markdownCache,ga as looksLikeGlob,Fr as localizePath,U as loadTranslationLazy,_ as loadTranslation,pk as loadStxConfig,db as loadMiddlewareFromDirectory,Sm as loadManifest,zq as loadElement,sn as loadChannels,Mr as lintStxStrict,Bq as lazyLoadAll,Aq as lazyLoad,Ha as keyframeDirective,dr as jsxs,er as jsxDEV,cr as jsx,no as jsonResponse,Pe as islandDirective,l as isTest,Dm as isSpaNavigation,wm as isSpaNavRequest,hq as isSignatureValid,df as isSignal,fl as isSharpAvailable,_n as isServerEnvironment,jm as isServer,yb as isRuntimeOwnedColonAttr,da as isRtlLocale,j as isProduction,ia as isPresentationalRole,wq as isNativeLazySupported,or as isMarkdownPath,Q as isLoading,R as isLoaded,mi as isJavaScriptScript,xq as isIntersectionObserverSupported,nl as isImageFile,gl as isImageBackendAvailable,aa as isICUFormat,Rh as isHydrated,ri as isHydrateTrigger,_c as isHttpStatus,Zn as isEdgeEnvironment,Nr as isDirectiveKind,k as isDevelopment,ef as isDerived,Ak as isCssOnlyChange,Hn as isCompressible,km as isClient,rh as isAsyncComponent,Vm as isActionableMethod,Op as invert,Df as invalidateFileCacheByDir,Cf as invalidateFileCache,Cc as interpolateScriptsInTemplate,Ac as interpolateScriptExpressions,Bc as interpolateScriptAttributes,x as inlineError,Br as injectThemeBootstrap,Zf as injectSeoTags,yr as injectSeo,Nf as injectRouterScript,zk as injectHotReload,kb as injectHeatmap,Qc as injectCss,Id as injectCspMetaTag,Vg as injectConfigHeadTags,zg as injectColorModeBootScript,Pg as injectCloakStyle,Gg as injectBuildId,cc as injectBrowserCoreAutoImports,Wc as injectAnalytics,kf as inject,em as initStoreRegistry,al as initNetlify,bp as initLoadingIndicator,yq as initLazyLoading,vo as initFile,Gq as initBlurUp,Mq as initAllBlurUp,Kj as imgDirective,xl as imageDirective,Zm as hydrateTemplateStream,Ym as hydrateTemplate,_o as hydrateIslands,Oh as hydrateIsland,_m as hydrateFragment,Ph as hydrateByStrategy,Qh as hydrateAll,rp as hydrate,Ko as htmlResponse,Rg as hoistLeadingHeadTags,Bg as hoistColorModeBootScript,lb as heatmapDirective,sj as hashString,Mf as hashFilePath,qj as hashFile,rj as hashBuffer,tg as hasVueTemplateSyntax,Sf as hasVariables,wp as hasStore,pc as hasPlaceholders,_k as hasNetlifyConfig,ab as hasMiddleware,Jb as hasEventDirectives,Ug as hasDocumentShell,ei as hasDirectives,ma as hasDOMSupport,ql as handleImageRequest,qf as handleError,lr as h,ml as groupVariantsByFormat,Mp as grayscale,Do as gitHash,en as getUnusedDirectives,V as getTranslationSync,O as getTranslationCacheStats,W as getTranslationAsync,ba as getTranslation,Vk as getTotalSize,iq as getTimeUntilExpiry,_g as getStoreScript,xp as getStoreNames,vp as getStore,Ok as getStorageSize,Nk as getStorageKeys,xi as getSourceLineInfo,oi as getSharedTranspiler,Hf as getServeClientAsset,la as getScreenReaderOnlyStyle,ck as getScopeAttribute,Ve as getRouteParams,Ob as getPublicEnvDefine,Pb as getPublicEnv,ci as getPositionInfo,mc as getPlaceholderRegistry,pj as getPlaceholderCacheStats,Vd as getPageMeta,yd as getNonce,ol as getMimeType,cb as getMiddlewareNames,$a as getMiddleware,ca as getLocaleDirection,P as getLoadingState,Y as getLoadingLocales,ze as getImagePlaceholder,il as getImageMetadata,we as getImageDelivery,qp as getHydrationRuntime,gm as getHydratedStoreState,Dk as getHmrServer,Ud as getHead,ip as getHMRHandler,bj as getFormatExtension,uj as getFileMtime,ll as getFallbackVariant,f as getErrorMessage,c as getErrorLocale,n as getErrorConfig,i as getErrorCodeName,Fi as getDirectives,Ei as getDirective,Fl as getCurrentInstance,Nc as getCssServeAsset,Gd as getCspPreset,Pd as getCspHeaderName,Ai as getComponentCacheStats,Mj as getCachedVideoResult,mq as getCachedSignature,Ff as getCachedSignalsRuntime,Gf as getCachedRouterScript,nj as getCachedPlaceholder,Bj as getCachedImageResult,vj as getCached,yj as getCacheStats,Eg as getBuildId,pn as getBroadcastServer,aj as getBestVariant,tc as getAllFilters,Qi as generateWidthSrcset,Dh as generateVirtualListCSS,Tq as generateVideoPreview,ve as generateValidationScript,Uq as generateUploadRuntime,fn as generateTreeShakenBundle,ih as generateTransitionRuntime,hh as generateTransitionCSS,Qj as generateThumbnails,gj as generateThumbhashPlaceholder,Rn as generateTemplatesDocs,oh as generateSuspenseRuntime,nh as generateSuspenseCSS,lp as generateStateScript,_i as generateSrcsetData,Fj as generateSrcset,jl as generateSrcSet,Rj as generateSpriteSheet,ar as generateSpaShell,$i as generateSourceTags,Wi as generateSizesFromBreakpoints,Vi as generateSizesAttribute,kl as generateSizes,bg as generateSitemapIndex,zr as generateSitemap,vq as generateSimpleMediaPicker,pq as generateSignatureRuntime,zf as generateSignalsRuntimeDev,yf as generateSignalsRuntime,ic as generateServerDataBridge,$j as generateScopeId,jk as generateSFCWebComponent,Gb as generateRuntimeScript,Pa as generateRouteTypes,Qa as generateRouteManifest,dg as generateRobotsTxt,Ar as generateRobots,Ej as generateResponsiveVariants,fk as generateReactiveWebComponentTS,ek as generateReactiveWebComponent,hk as generateReactiveRuntime,gk as generateReactiveMixin,Pj as generatePoster,mj as generatePlaceholderStyle,lj as generatePlaceholderCSS,fj as generatePlaceholder,Nh as generatePartialHydrationCSS,xd as generateNonce,Wk as generateNetlifyToml,Wq as generateMinifiedMediaRuntime,Vq as generateMediaRuntime,uq as generateMediaManagerEmbed,Qm as generateManifest,dp as generateLoadingIndicatorHtml,Fq as generateLazyLoadRuntime,Km as generateLayoutTypes,ij as generateLQIP,yh as generateKeepAliveRuntime,xh as generateKeepAliveCSS,Uh as generateIslandManifest,Sq as generateImagePreview,Bl as generateImageManifest,pp as generateHydrationScript,Te as generateHydrationRuntime,sp as generateHydrationCSS,Hh as generateHydrationBootstrap,yk as generateHotReloadScript,jb as generateHeatmapScript,gp as generateHMRClientScript,Sj as generateHLSManifest,mp as generateEventBindings,Ui as generateDprSrcsetWithVariableQuality,Ti as generateDprSrcset,Sg as generateDocumentShell,Wn as generateDocs,Sn as generateDirectivesDocs,Ki as generateDirectiveRuntime,eg as generateDefaultRobotsTxt,Tj as generateDASHManifest,Pc as generateCss,Bd as generateCspMetaTag,Ad as generateCspHeader,vf as generateCompositionRuntime,Qn as generateComponentsDocs,Ih as generateComponentManifest,On as generateComponentDoc,kj as generateColorPlaceholder,yg as generateColorModeBootScript,Yl as generateClientRuntime,tj as generateCacheKey,gc as generateBrowserAutoImportDestructuring,Nq as generateBlurUpRuntime,Oq as generateBlurUpCSS,Tc as generateBindingsRuntime,Ri as generateAutoWidthSrcset,fc as generateAutoImportDestructuring,th as generateAsyncComponentRuntime,sh as generateAsyncComponentCSS,Zb as generateApiTypes,Na as generateAnimationRuntime,La as generateAnimationCSS,Vc as generateAnalyticsScript,Zo as formatTypecheckDiagnostics,To as formatTypeErrors,so as formatStxContent,Uk as formatSize,Ta as formatRoutes,to as formatMarkdownContent,g as formatLocalizedError,$ as formatICU,p as formatFilePath,w as formatError,xr as formatDoctorReport,Tn as formatDocsAsMarkdown,Vn as formatDocsAsJson,Un as formatDocsAsHtml,Vp as format,kn as foldConstants,Up as flipVertical,Tp as flipHorizontal,Lm as fingerprint,Xo as findRuntimeTypeDeclarations,vr as findPantryPackage,vc as findMustacheEnd,nd as findMatchingEndTag,jd as findMatchingDelimiter,Kb as findInterpolationEnd,pd as findIfBlocks,sd as findExpressions,Sa as findErrorPage,Kc as findDuplicateScopedStyleRanges,qd as findDirectiveBlocks,gn as findDeadCode,gn as findDeadBranches,sm as findContainerRegion,Pn as findComponentFiles,$r as findCommonDir,Tk as filterRequiredFiles,vi as fileExists,Pf as extractVariables,ai as extractTemplateExpressions,Le as extractStreamBoundaries,np as extractState,ki as extractSlotContent,Rf as extractScriptFromTemplate,$h as extractScriptBlocks,nc as extractPlaceholders,md as extractParenthesizedExpression,$c as extractPageResponseStatus,hb as extractLayoutMetadata,jj as extractDominantColor,vd as extractDirectiveParams,fi as extractDirectiveNames,Em as extractContainerContent,Mn as extractComponentProps,Jh as extractComponentName,Nn as extractComponentDescription,Oc as extractClassNames,hc as extractBridgeData,Kh as extractBoundProps,kd as extractBalancedExpression,$b as extractAndStripCssImports,dk as extractAndScopeStyles,Hb as extractAndProcessEvents,Hk as externalizeSharedAssets,Ik as externalizeRepeatedAssets,Gk as externalizeHtml,Gc as evaluateExpression,jn as evaluateConstant,hd as evaluateAuthExpression,yc as escapeHtmlValue,xc as escapeHtml,C as errorRecovery,E as errorLogger,dh as ensureTeleportTargets,Wg as ensureDocumentShell,re as enhancedValidationRules,Kn as enableDevTools,hn as eliminateDeadCode,Ye as effect,aq as dprUrls,Xn as docsCommand,Yb as discoverServerApi,Im as discoverLayoutNames,Eq as disconnectObserver,Ln as disableDevTools,F as devHelpers,zm as detectShell,Yn as detectRuntime,Xk as detectProjectConfig,cj as detectFormat,bn as detectBuildMode,Xe as derived,$k as deploy,rk as defineStxConfig,Ap as defineStore,sf as defineSlots,Lr as defineSiteConfig,Pr as definePropsWithValidation,Or as defineProps,lk as definePlugin,$d as definePageMeta,Wa as defineMiddleware,Wh as defineForm,nf as defineExpose,mf as defineEmits,Hi as defineDirective,nr as defineCustomElement,Ao as defineConfig,Ii as defineClientDirective,qh as defineAsyncComponent,Co as defineApiHandler,Xq as defaultMediaConfig,Dl as defaultImageConfig,M as defaultI18nConfig,ib as defaultHeatmapConfig,ie as defaultFormClasses,qc as defaultFilters,Rd as defaultCspConfig,nk as defaultConfig,Zr as default,Ic as deepMergeThemes,Lc as dedupeScopedStyles,vm as decodeTitleEntities,hj as decodeThumbhash,Md as cspNonceDirective,Ld as cspDirective,Lq as crossfadeTransition,Gp as crop,Bh as createVirtualList,Yj as createVideoDirective,jo as createVercelHandler,Qo as createTypeChecker,fa as createTranslateFilter,fo as createTextEncoderStream,mr as createStxApp,eo as createStreamingResponse,Ne as createStreamRenderer,yp as createStore,Za as createStorageManager,Xa as createServerCookieManager,_b as createServerApi,Hl as createScope,lh as createSSRSuspense,Ue as createRouter,Gm as createRouteRuleResolver,eb as createRouteLocation,Oo as createRoute,Il as createRef,Jl as createReactive,uf as createProvideContext,Fo as createProject,zo as createProductionBuild,lc as createPlaceholder,on as createOptimizedBuild,ko as createNetlifyHandler,Pk as createNetlifyClient,fb as createMiddlewareContext,No as createMiddleware,Cq as createLazyObserver,vh as createKeepAliveCache,ao as createKVNamespace,Lh as createIslandRegistry,Jj as createImgDirective,yl as createImagePlugin,rl as createImageHandler,wl as createImageDirective,nb as createHeatmapAggregator,Sk as createFileManifest,$n as createEnvAccessor,z as createEnhancedError,co as createEdgeHandler,bo as createEdgeCache,yi as createDetailedErrorMessage,io as createDenoHandler,Yk as createDefaultNetlifyConfig,Qd as createCspHeaders,mo as createCookie,Kl as createComputed,Gl as createComponentInstance,ho as createCloudflareHandler,Ya as createClientCookieManager,Ji as createBuiltinDirectives,mr as createApp,Ka as createAnimationTimeline,Jp as cover,Qf as convertToCommonJS,Qp as contrast,Ip as contain,y as consoleError,m as configureErrorHandling,qk as config,Kl as computed,Jn as compressResponse,qg as composerPattern,pg as composer,Bm as composeShellWithPage,Dn as componentDirective,ti as componentClientSignalNames,Pm as compileTemplate,a as collectRepeatedFlag,Rk as collectDeployFiles,Qg as cloakStyleFragment,Oj as clearVideoCache,N as clearTranslationCache,$g as clearStoreCache,Mk as clearStorage,nq as clearSignatureCache,xf as clearServerData,oj as clearPlaceholderCache,ig as clearOnceStore,zd as clearNonce,bb as clearMiddleware,Be as clearImagePlaceholders,xe as clearImageDeliveryCatalog,vl as clearImageCache,e as clearErrorMessages,If as clearDevCaches,uc as clearCustomFilters,sg as clearComposers,ah as clearComposableCache,zi as clearComponentCache,xj as clearCache,Db as clearBlankCache,cp as cleanupLoadingIndicator,pm as classifyScript,qm as classifyAllScripts,Ro as checkTemplateFile,So as checkTemplate,Kf as checkCache,kq as checkAuthAccess,na as checkA11yWithRegex,oa as checkA11y,yn as channel,ro as captureScreenshots,qo as captureScreenshot,Z as cancelPendingLoads,Qk as calculateSha1,Si as calculateOptimalWidths,Lf as cacheTemplate,Jf as cacheEngineFingerprint,_j as buildWebComponents,Uo as buildVirtualSource,Zq as buildViews,Cp as buildUrl,He as buildSuspenseResolveScript,Kr as buildStaticSite,qb as buildRuntimeGlobalsDestructure,Mm as buildRuntimeAsset,Nm as buildRouterAsset,Jr as buildLangPickerScript,Yi as buildImageUrl,Hg as buildIdFragment,Mg as buildHtmlAttrs,$m as buildForProduction,Gn as buildComponentLibrary,lq as buildAuthParams,an as buildApp,Hr as buildAlternateLinks,yo as build,wn as broadcastPrivate,xn as broadcastPresence,tn as broadcast,Pp as brightness,Mb as bracketDepths,Kp as blur,Eb as blankInertHtmlRegions,fq as batchSignUrls,Ze as batch,sa as autoFixA11yFile,ta as autoFixA11yDirectory,ra as autoFixA11y,Xp as auto,ja as attributeValue,Om as assetTags,Fb as asInvocableStatement,Wr as arrayOf,Er as applyTranslations,Dj as applyTransformations,li as applySlots,Cn as applyPropDefaults,_p as applyPreset,Og as applyHtmlAttrs,ee as applyHead,Ec as applyFilters,xm as appendVary,Fd as apiCspPreset,Da as animationGroupDirective,Uj as analyzeVideo,dn as analyzeUsage,nm as analyzeTemplate,om as analyzeProject,dn as analyzeDirectiveUsage,Xc as analyticsDirective,Io as addStore,Ho as addPage,Jd as addNonceToInlineContent,Jo as addLayout,Go as addComponent,Xm as actionRedirectResponse,Va as abortNavigation,ua as a11yDirective,Ef as __setSignalsGeneratorsForTest,Fg as __setBuildIdForTest,Lj as VideoProcessorCache,Xh as Validator,xa as TransitionType,za as TransitionEase,ya as TransitionDirection,id as Tokenizer,Po as TemplateTypeChecker,uo as TEMPLATE_PRESETS,v as StxValidationError,r as StxSyntaxError,t as StxSecurityError,s as StxRuntimeError,u as StxFileError,q as StxError,ir as Show,Ie as SUSPENSE_RESOLVER_RUNTIME,ob as STX_RUNTIME_GLOBALS,bc as STX_AUTO_IMPORTS,Rb as STATE_DIR_ENV_VAR,Ga as SPRING_PRESETS,tm as SPA_NAV_HEADER,xb as RUNTIME_OWNED_COLON_ATTRS,zb as RUNTIME_HANDLED_X_ATTRS,Yc as RESPONSE_STATUS_KEY,Zc as RESPONSE_HEADERS_KEY,tb as REACTIVE_RUNTIME_GLOBALS,xo as ProductionBuild,kr as Portal,Eo as PROJECT_TEMPLATES,Zp as PRESETS,sb as NON_CLIENT_PRIMITIVES,tp as MemorySessionStore,Pi as MIME_TYPES,Mi as MEDIA_DEFAULT_WIDTHS,Oi as MEDIA_DEFAULT_FORMATS,Hm as LAYOUT_TYPES_FILE,Aj as ImageProcessorCache,pl as ImageProcessingError,op as HydrationRuntime,xk as HotReloadServer,mb as HeatmapAggregator,Kg as HTML_CLASS_MARKER,Jg as HTML_ATTRS_MARKER,br as Fragment,jr as For,um as FRAGMENT_CACHE_CONTROL,D as ErrorLogger,h as ErrorCodes,Fk as EXTERNALIZED_ASSET_DIR,bl as DeployError,cl as DEFAULT_WIDTHS,Aa as DEFAULT_TRANSITION_OPTIONS,Qb as DEFAULT_STATE_DIR,el as DEFAULT_QUALITY,dj as DEFAULT_PLACEHOLDER_OPTIONS,dl as DEFAULT_FORMATS,Ni as DEFAULT_DPR_VALUES,fp as ComponentHMRHandler,pb as COMPONENT_SCOPE_LOCAL_GLOBALS,Bb as COMPONENT_PASSTHROUGH_X_ATTRS,rb as COMPILE_TIME_ONLY_GLOBALS,Xi as COMMON_SIZES,wg as COLOR_MODE_BOOT_MARKER,xg as COLOR_MODE_BOOT_GLOBAL,Ig as CLOAK_STYLE,An as BroadcastServer,zn as Broadcast,Cg as BUILD_ID_META,Dg as BUILD_ID_HEADER,Nb as BROWSER_CORE_IMPORTS,ej as BLUR_UP_CSS,Ab as ALPINE_BRIDGE_X_ATTRS,ur as $path};
@@ -1,2 +0,0 @@
1
- // @bun
2
- import{Jj as a,Kj as b,Lj as c,Mj as d,Nj as e,Oj as f,Pj as g,Qj as h,Rj as i,Sj as j,Tj as k,Uj as l,Vj as m}from"./chunk-aftqqqcg.js";import"./chunk-e3rgky2r.js";import"./chunk-d7zxg9bp.js";import"./chunk-t00ga194.js";import"./chunk-hrdd26r4.js";import"./chunk-7r79j1hs.js";import"./chunk-ay336sqb.js";import"./chunk-nhbc464j.js";import"./chunk-vaggjvsm.js";import"./chunk-q9ckfwhh.js";import"./chunk-kermxyfe.js";import"./chunk-k3dtvay1.js";import"./chunk-aved735s.js";import"./chunk-799s9mwc.js";import"./chunk-7r80apc5.js";import"./chunk-2tjk867y.js";import"./chunk-t8ctvjqe.js";import"./chunk-deqnt1w5.js";import"./chunk-w0hzaka3.js";import"./chunk-wb90259a.js";import"./chunk-5g6rprcy.js";export{a as templateCache,b as readFileCached,d as invalidateFileCacheByDir,c as invalidateFileCache,m as hashFilePath,h as getServeClientAsset,f as getCachedSignalsRuntime,g as getCachedRouterScript,i as clearDevCaches,k as checkCache,l as cacheTemplate,j as cacheEngineFingerprint,e as __setSignalsGeneratorsForTest};
@@ -1,2 +0,0 @@
1
- // @bun
2
- import{Ye as a}from"./chunk-823h67tv.js";import"./chunk-fw56y3cb.js";import"./chunk-57atgbyq.js";import"./chunk-1yj4xd6n.js";import"./chunk-e3rgky2r.js";import"./chunk-d7zxg9bp.js";import"./chunk-t00ga194.js";import"./chunk-hrdd26r4.js";import"./chunk-7r79j1hs.js";import"./chunk-ay336sqb.js";import"./chunk-nhbc464j.js";import"./chunk-vaggjvsm.js";import"./chunk-q9ckfwhh.js";import"./chunk-kermxyfe.js";import"./chunk-k3dtvay1.js";import"./chunk-aved735s.js";import"./chunk-799s9mwc.js";import"./chunk-7r80apc5.js";import"./chunk-2tjk867y.js";import"./chunk-t8ctvjqe.js";import"./chunk-deqnt1w5.js";import"./chunk-w0hzaka3.js";import"./chunk-wb90259a.js";import"./chunk-5g6rprcy.js";export{a as startProductionServer};
@@ -1,17 +0,0 @@
1
- // @bun
2
- import{rl as WJ}from"./chunk-1yj4xd6n.js";import{Yl as GJ,rr as zJ,sr as XJ}from"./chunk-e3rgky2r.js";import{ks as ZJ,ls as $J}from"./chunk-hrdd26r4.js";import{Es as QJ,Is as u}from"./chunk-nhbc464j.js";import{mt as c}from"./chunk-vaggjvsm.js";import X from"path";import O from"fs";function wJ(J){if(!J||typeof J!=="object")return!1;let K=J;return typeof K.message==="string"&&(K.name==="BuildMessage"||K.name==="ResolveMessage"||("position"in K))}function UJ(J){if(J&&typeof J==="object"&&Array.isArray(J.errors))return J.errors;return[J]}function b(J,K){let $=[];for(let W of UJ(J)){if(wJ(W)){let Y=W.position||void 0;$.push({file:K||Y?.file,line:Y?.line,column:Y?.column,message:W.message??"",lineText:Y?.lineText});continue}$.push({file:K,message:W instanceof Error?W.message:String(W)})}return $}function t(J,K){return b(J,K).map(($)=>{let W=$.file?`${$.file}${$.line?`:${$.line}${$.column?`:${$.column}`:""}`:""}`:"",Y=$.lineText?`
3
- ${$.lineText.trim()}`:"";return W?`${W}: ${$.message}${Y}`:`${$.message}${Y}`}).join(`
4
- `)}var LJ=9;function P(J,K,$){return/^(?:(?:stx|ui)\.config\.[cm]?[jt]s|runtime-config-(?:server|loader)\.[cm]?[jt]s)$/.test(X.basename(J))||WJ(J,K,$)}var YJ=1,HJ=new Map,f=600,TJ=100,g=new Map;async function AJ(J){let K=g.get(J)??0;if(K>0&&K<TJ){g.set(J,K+1);return}g.set(J,1);try{let $=(await O.promises.readdir(J)).filter((z)=>z.endsWith(".js"));if($.length<=f)return;let Y=(await Promise.all($.map(async(z)=>{try{return{name:z,at:(await O.promises.stat(X.join(J,z))).mtimeMs}}catch{return null}}))).filter((z)=>z!==null);Y.sort((z,H)=>H.at-z.at);for(let z of Y.slice(f)){let H=z.name.slice(0,-3);await O.promises.rm(X.join(J,`${H}.js`),{force:!0}),await O.promises.rm(X.join(J,`${H}.deps.json`),{force:!0})}x("pruned bundle cache to",f,"entries")}catch{}}function pJ(J){return HJ.get(J)??[]}function h(J,K){if(J)HJ.set(J,K)}function MJ(J=process.env){return J.STX_DEBUG==="true"||J.STX_DEBUG==="1"}function x(...J){if(MJ())console.log("[stx:bundler]",...J)}var n=[];function r(J,K,$){n.push({filePath:J||"<inline>",message:K,details:$})}function cJ(){return n.slice()}function nJ(){n.length=0}var p;function oJ(J){p=J}function a(){if(p)return p;try{let J=XJ.strict;return typeof J==="object"&&J!==null?J.bundlerFallback??"warn":"warn"}catch{return"warn"}}var e=[/^stx$/,/^@stacksjs\/stx$/,/^@stores$/,/^stx\/stores$/,/^@composables$/];function lJ(J){let K=/^[ \t]*import[ \t]+(?!type(?:[ \t]|{))[\s\S]*?\s+from\s+['"]([^'"]+)['"][ \t]*;?/gm,$;while(($=K.exec(J))!==null){let Y=$[1];if(!e.some((H)=>H.test(Y)))return x("detected user import:",Y),!0}let W=/^[ \t]*import[ \t]+['"]([^'"]+)['"]/gm;while(($=W.exec(J))!==null){let Y=$[1];if(/\.css(?:\?.*)?$/.test(Y))continue;if(!e.some((H)=>H.test(Y)))return x("detected side-effect import:",Y),!0}return!1}var v="stx-module:",CJ=/\.(?:[cm]?[jt]sx?|json)$/i;function xJ(J,K){return X.relative(J,K).split(X.sep).join("/")}function IJ(J,K){if(K.size===0)return J;return J.replace(/^([ \t]*import\s+(?:[^;"']*?\s+from\s+)?)(["'])([^"']+)\2/gm,($,W,Y,z)=>{let H=K.get(z);return H&&!z.startsWith(v)?`${W}${Y}${H}${Y}`:$})}function _J(J,K){let $=0,W=(z)=>{let H=`__stxMod${$++}`,j=JSON.stringify(z);return K.push(`var ${H} = globalThis.__stxModules && globalThis.__stxModules[${j}];`,`if (${H} === undefined) throw new Error("[stx] module " + ${JSON.stringify(j)} + " is not registered on this page (#1957)");`),H},Y=(z,H)=>{for(let j of z.split(",")){let T=j.trim();if(!T)continue;let Q=T.match(/^("(?:[^"\\]|\\.)*"|[\w$]+)(?:\s+as\s+([\w$]+))?$/);if(!Q)continue;let Z=Q[1].startsWith('"')?JSON.parse(Q[1]):Q[1],G=Q[2]??Z;K.push(`var ${G} = ${H}[${JSON.stringify(Z)}];`)}};return J=J.replace(/^[ \t]*import\s+([^;"']*?)\s+from\s+["'](stx-module:[^"']+)["'];?[ \t]*$/gm,(z,H,j)=>{let T=j.slice(v.length),Q=W(T),Z=H.trim(),G=Z.match(/^([\w$]+)\s*(?:,\s*|$)/);if(G&&!Z.startsWith("{")&&!Z.startsWith("*"))K.push(`var ${G[1]} = ${Q}.default;`),Z=Z.slice(G[0].length).trim();let q=Z.match(/^\*\s*as\s+([\w$]+)$/);if(q)K.push(`var ${q[1]} = ${Q};`);else if(Z.startsWith("{"))Y(Z.replace(/^\{|\}$/g,""),Q);return""}),J=J.replace(/^[ \t]*import\s+["'](stx-module:[^"']+)["'];?[ \t]*$/gm,(z,H)=>{return W(H.slice(v.length)),""}),J}function JJ(J){let K=[J,`${J}.ts`,`${J}.tsx`,`${J}.js`,`${J}.mjs`,`${J}.jsx`,X.join(J,"index.ts"),X.join(J,"index.tsx"),X.join(J,"index.js"),X.join(J,"index.mjs")];for(let $ of K)try{if(O.existsSync($)&&O.statSync($,{throwIfNoEntry:!1})?.isFile())return $}catch{}return}function NJ(J,K,$,W,Y,z=new Map,H){let j=(Q,Z,G)=>{if(P(Z,J,H))return null;if(!Y||Q!==$||!CJ.test(Z))return null;try{if(!O.statSync(Z,{throwIfNoEntry:!1})?.isFile())return null}catch{return null}W.add(Z);let q=`${v}${xJ(process.cwd(),Z)}`;return z.set(G,q),{path:q,external:!0}},T=(Q,Z)=>{let G=Q===$?K:X.dirname(Q),q=X.resolve(G,Z);return JJ(q)??q};return{name:"stx-client-bundle",setup(Q){Q.onResolve({filter:/^(stx|@stacksjs\/stx)$/},(Z)=>({path:Z.path,external:!0})),Q.onResolve({filter:/^(@stores|@composables|stx\/stores)$/},(Z)=>({path:Z.path,external:!0})),Q.onResolve({filter:/^\//},(Z)=>{let G=JJ(Z.path);if(G){let q=j(Z.importer,G,Z.path);if(q)return q;if(G!==$)W.add(G);return{path:G}}return{path:Z.path,external:!0}}),Q.onResolve({filter:/^\.\.?\//},(Z)=>{let G=T(Z.importer,Z.path),q=j(Z.importer,G,Z.path);if(q)return q;return W.add(G),{path:G}}),Q.onResolve({filter:/^[@~]\//},(Z)=>{let G=X.resolve(J,Z.path.slice(2)),q=[G,`${G}.ts`,`${G}.tsx`,`${G}.js`,`${G}.mjs`,`${G}.jsx`,X.join(G,"index.ts"),X.join(G,"index.tsx"),X.join(G,"index.js"),X.join(G,"index.mjs")];for(let w of q)if(O.existsSync(w)&&O.statSync(w,{throwIfNoEntry:!1})?.isFile()){let y=j(Z.importer,w,Z.path);if(y)return y;return x(`resolved ${Z.path[0]}/ import:`,Z.path,"\u2192",w),W.add(w),{path:w}}return console.warn(`[stx:bundler] could not resolve ${Z.path[0]}/ import:`,Z.path),{path:G}}),Q.onResolve({filter:/^(?!node:|bun:)(?:@[\w.-]+\/)?[\w.-]/},(Z)=>{if(!Y||Z.importer!==$)return;let G=`${v}npm:${Z.path}`;return z.set(Z.path,G),{path:G,external:!0}}),Q.onLoad({filter:/\.(?:[cm]?[jt]sx?|json)$/},(Z)=>{if(P(Z.path,J,H))throw Error(`Server-only API source cannot be imported by a client script: ${Z.path}`);let G=X.extname(Z.path).toLowerCase(),q=G===".json"?"json":G===".tsx"?"tsx":G===".jsx"?"jsx":G===".ts"||G===".mts"||G===".cts"?"ts":"js";if(Z.path!==$)W.add(Z.path);return{contents:O.readFileSync(Z.path,"utf8"),loader:q}})}}}var m=new Map,D=QJ(64),KJ=Symbol.for("stx.client-bundle-build-queue");function SJ(J){let K=globalThis,W=(K[KJ]??Promise.resolve()).then(J,J);return K[KJ]=W.then(()=>{return},()=>{return}),W}async function dJ(J,K,$={}){let W=$.projectRoot||process.cwd(),Y=(await zJ(W)).serverApi,z=$.minify??!1,H=$.externalizeUserModules??!0,j=$.cacheDir||c(W,"bundle-cache"),T=new Bun.CryptoHasher("md5");T.update(`${LJ}\x00${JSON.stringify(Y??!1)}\x00${H?"registry":"inline"}\x00${J}\x00${K}`);let Q=T.digest("hex").slice(0,12),Z=X.join(j,`${Q}.js`),G=D.get(Z);if(G){if(u(G.files)&&G.files.every((A)=>!P(A.path,W,Y))){x("memo hit:",Q);let A=G.files.map((M)=>M.path);return h(K,A),$.collectInputs?.push(...A),G.code}D.delete(Z),x("memo invalidated by dep change:",Q)}let q=X.join(j,`${Q}.deps.json`),w=Bun.file(Z);if(await w.exists()){let A=Bun.file(q),M=!1,U=null;if(await A.exists())try{let N=JSON.parse(await A.text());if(N.metadataVersion!==YJ||!Array.isArray(N.files))M=!1;else U=N.files,M=!0;if(U&&(!u(U)||U.some((B)=>P(B.path,W,Y))))M=!1}catch{M=!1}if(M){if(x("cache hit:",Q),U)h(K,U.map((B)=>B.path)),$.collectInputs?.push(...U.map((B)=>B.path));let N=await w.text();if(U)D.set(Z,{code:N,files:U});return N}x("cache invalidated by dep change:",Q)}let y=m.get(Q);if(y){let A=await y;if($.collectInputs)$.collectInputs.push(...(D.get(Z)?.files??[]).map((M)=>M.path));return A}let I=SJ(()=>RJ(J,K,{projectRoot:W,minify:z,cacheDir:j,hash:Q,cachePath:Z,depsPath:q,collectInputs:$.collectInputs,externalizeUserModules:H,serverApi:Y}));m.set(Q,I);try{return await I}finally{m.delete(Q)}}var yJ=0;function BJ(J){return`${J}-${process.pid}-${++yJ}`}async function RJ(J,K,$){let{projectRoot:W,minify:Y,cacheDir:z,hash:H,cachePath:j,depsPath:T,externalizeUserModules:Q}=$,Z=c(W,"bundle-tmp"),G=BJ(H),q=X.join(Z,`${G}.ts`),w=X.join(Z,"out",G);O.mkdirSync(Z,{recursive:!0}),O.mkdirSync(w,{recursive:!0});let y=X.dirname(K),I=new Set,A=/^[ \t]*(export\s+)?(?:const|let|var)\s+(?:\{([^}]+)\}|(\w+))/gm,M=/^[ \t]*(export\s+)?(?:async\s+)?function\s+(\w+)/gm,U=ZJ(J),{depths:N,balanced:B}=$J(U),o=(L)=>!B||N[L]===0,C;while((C=A.exec(U))!==null){if(C[1])continue;if(!o(C.index))continue;if(C[2])C[2].split(",").forEach((L)=>{let k=FJ(L);if(k)I.add(k)});else if(C[3])I.add(C[3])}while((C=M.exec(U))!==null){if(C[1])continue;if(!o(C.index))continue;I.add(C[2])}let qJ=I.size>0?`
5
- export { ${[...I].join(", ")} }`:"";await Bun.write(q,J+qJ),x("bundling:",H,"from:",X.basename(K));let l=new Set,d=new Map;try{let L=await Bun.build({entrypoints:[q],outdir:w,target:"browser",format:"esm",minify:Y,plugins:[NJ(W,y,q,l,Q,d,$.serverApi)],define:{"process.env.NODE_ENV":Y?'"production"':'"development"',...GJ()},root:W});if(!L.success){let S=L.logs.filter((R)=>R.level==="error").map((R)=>R.message).join(", ")||`Unable to bundle ${X.basename(K)}`,F=b(L.logs,K||void 0);if(console.warn("[stx:bundler] build failed:",S),r(K||"",S,F),a()==="error")throw Error(S);return J}let k="";for(let V of L.outputs){k=await V.text();break}let _=[];for(let V of k.matchAll(/^\s*export\s*\{([^}]*)\}\s*;?\s*$/gm))for(let S of V[1].split(",")){let F=S.trim().match(/^([A-Za-z_$][\w$]*)\s+as\s+([A-Za-z_$][\w$]*)$/);if(F){_.push([F[2],F[1]]);continue}let R=S.trim();if(/^[A-Za-z_$][\w$]*$/.test(R))_.push([R,R])}let i=[];k=_J(IJ(k,d),i);let VJ=k.match(/^\s*import\s+[^;]+;?\s*$/gm)||[];k=k.replace(/^\s*import\s+[^;]+;?\s*$/gm,"").replace(/^\s*export\s*\{[^}]*\}\s*;?\s*$/gm,"").replace(/^\s*export\s+default\s+.*$/gm,"").trim();let s=`__stxBundle_${H}`,kJ=_.map(([V,S])=>`${JSON.stringify(V)}: ${S}`).join(", "),jJ=_.map(([V])=>`var ${V} = undefined;`).join(`
6
- `),OJ=_.map(([V])=>`${V} = ${s}[${JSON.stringify(V)}];`).join(`
7
- `);if(k=`${VJ.join(`
8
- `)}
9
- ${jJ}
10
- var ${s} = (function() {
11
- ${i.join(`
12
- `)}
13
- ${k}
14
- return { ${kJ} };
15
- })();
16
- ${OJ}`.trim(),x("bundled:",H,"output:",k.length,"bytes"),I.size>0&&_.length===0)return console.warn(`[stx:bundler] dropped every binding for ${X.basename(K)} (${H}); serving the unbundled source and not caching this result`),J;O.mkdirSync(z,{recursive:!0}),await Bun.write(j,k);let E=Array.from(l).map((V)=>{try{return{path:V,mtimeMs:O.statSync(V).mtimeMs}}catch{return null}}).filter((V)=>V!==null);return await Bun.write(T,JSON.stringify({metadataVersion:YJ,files:E})),h(K,E.map((V)=>V.path)),$.collectInputs?.push(...E.map((V)=>V.path)),D.set(j,{code:k,files:E}),await AJ(z),k}catch(L){let k=b(L,K||void 0),_=t(L,K||void 0);if(console.warn(`[stx:bundler] error: ${_}`),r(K||"",_,k),a()==="error")throw L;return J}finally{try{O.rmSync(q,{force:!0}),O.rmSync(w,{recursive:!0,force:!0})}catch{}}}function FJ(J){let K=J.trim();if(!K)return null;let $=K.indexOf("=");if($!==-1)K=K.slice(0,$).trim();let W=K.indexOf(":");if(W!==-1)K=K.slice(W+1).trim();if(K.startsWith("..."))K=K.slice(3).trim();return/^[A-Za-z_$][\w$]*$/.test(K)?K:null}
17
- export{t as Xk,pJ as Yk,MJ as Zk,r as _k,cJ as $k,nJ as al,oJ as bl,a as cl,lJ as dl,v as el,xJ as fl,IJ as gl,_J as hl,SJ as il,dJ as jl,BJ as kl};
@@ -1,2 +0,0 @@
1
- // @bun
2
- import{Ek as a,Fk as b,Gk as c,Hk as d,Ik as e}from"./chunk-9btdax2s.js";import"./chunk-5g6rprcy.js";export{d as runPwaAudit,e as formatAuditResult,c as calculateAuditResult,a as auditConfig,b as auditBuildOutput};
@@ -1,2 +0,0 @@
1
- // @bun
2
- import{Wf as a}from"./chunk-4cw0s9f4.js";import"./chunk-fw56y3cb.js";import"./chunk-57atgbyq.js";import"./chunk-tsmdmf5h.js";import"./chunk-e4g8wz6t.js";import"./chunk-f6sejeg3.js";import"./chunk-1yj4xd6n.js";import"./chunk-e3rgky2r.js";import"./chunk-d7zxg9bp.js";import"./chunk-t00ga194.js";import"./chunk-hrdd26r4.js";import"./chunk-7r79j1hs.js";import"./chunk-ay336sqb.js";import"./chunk-nhbc464j.js";import"./chunk-vaggjvsm.js";import"./chunk-q9ckfwhh.js";import"./chunk-kermxyfe.js";import"./chunk-k3dtvay1.js";import"./chunk-aved735s.js";import"./chunk-799s9mwc.js";import"./chunk-7r80apc5.js";import"./chunk-2tjk867y.js";import"./chunk-t8ctvjqe.js";import"./chunk-deqnt1w5.js";import"./chunk-w0hzaka3.js";import"./chunk-wb90259a.js";import"./chunk-5g6rprcy.js";export{a as buildForProduction};