@stacksjs/stx 0.2.380 → 0.2.381

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 (153) hide show
  1. package/dist/{chunk-m7zebyq5.js → chunk-01mh30km.js} +1 -1
  2. package/dist/chunk-0t944mfd.js +2 -0
  3. package/dist/chunk-1b2e4vhn.js +2 -0
  4. package/dist/{chunk-sf4e6cnx.js → chunk-1c4vex8k.js} +1 -1
  5. package/dist/{chunk-n7m0zs73.js → chunk-1k0bcce4.js} +1 -1
  6. package/dist/{chunk-myyj9qp3.js → chunk-1rdm5y91.js} +1 -1
  7. package/dist/{chunk-nvksp2ws.js → chunk-2pbx4h33.js} +1 -1
  8. package/dist/chunk-2q1w57n3.js +2 -0
  9. package/dist/chunk-2y0xpsm9.js +2 -0
  10. package/dist/{chunk-1n3syq26.js → chunk-347ry9a1.js} +1 -1
  11. package/dist/chunk-3q9rpjx0.js +2 -0
  12. package/dist/{chunk-w6mt6tt1.js → chunk-3t2xac1c.js} +1 -1
  13. package/dist/chunk-4djwtq0y.js +47 -0
  14. package/dist/{chunk-dhh2r9vj.js → chunk-4fc6gjr5.js} +1 -1
  15. package/dist/{chunk-wqa77pdn.js → chunk-4vscfb5b.js} +1 -1
  16. package/dist/{chunk-qsrmt975.js → chunk-4xjxkcp9.js} +1 -1
  17. package/dist/chunk-57nk505p.js +30 -0
  18. package/dist/{chunk-f486k78c.js → chunk-5jvagdgn.js} +1 -1
  19. package/dist/chunk-5yrc8emq.js +2 -0
  20. package/dist/{chunk-an1vn2mr.js → chunk-61tpvbag.js} +1 -1
  21. package/dist/chunk-63vmf8y1.js +2 -0
  22. package/dist/{chunk-8qs79pym.js → chunk-6bvdtf6k.js} +1 -1
  23. package/dist/chunk-6w3j9g4h.js +2 -0
  24. package/dist/{chunk-wcn0v9az.js → chunk-7m7xy16d.js} +1 -1
  25. package/dist/chunk-7qjqwrhq.js +2 -0
  26. package/dist/chunk-7s3vjr7c.js +2 -0
  27. package/dist/{chunk-s3tpyage.js → chunk-7wkxs25k.js} +1 -1
  28. package/dist/{chunk-xcf8q763.js → chunk-8569hftj.js} +1 -1
  29. package/dist/chunk-8k85q2zt.js +2 -0
  30. package/dist/{chunk-2sa8rk32.js → chunk-8kwtg74v.js} +1 -1
  31. package/dist/chunk-9mvz85xs.js +2 -0
  32. package/dist/chunk-9z016nwp.js +2 -0
  33. package/dist/{chunk-yk277pd8.js → chunk-a97fpbsa.js} +1 -1
  34. package/dist/chunk-ac8cy837.js +3 -0
  35. package/dist/{chunk-6pywgdcs.js → chunk-af6gmyj3.js} +1 -1
  36. package/dist/{chunk-m1axasq6.js → chunk-b3gmkqzg.js} +1 -1
  37. package/dist/{chunk-ttfx0b5m.js → chunk-b5d9pmy1.js} +1 -1
  38. package/dist/{chunk-123vn4r5.js → chunk-bhaave87.js} +1 -1
  39. package/dist/{chunk-tatyh40f.js → chunk-bpyq447k.js} +1 -1
  40. package/dist/{chunk-585vt0xw.js → chunk-bsfkdb4p.js} +1 -1
  41. package/dist/{chunk-h2dpcnhr.js → chunk-cc97w3eq.js} +1 -1
  42. package/dist/{chunk-rqshksja.js → chunk-dfeq9d99.js} +1 -1
  43. package/dist/{chunk-vd9ss2dm.js → chunk-dvqwp792.js} +1 -1
  44. package/dist/{chunk-v8q5jr1g.js → chunk-e06p66kh.js} +2 -2
  45. package/dist/{chunk-yv4d9nzf.js → chunk-e0n9r2b8.js} +1 -1
  46. package/dist/{chunk-dv2x6xxs.js → chunk-e4k05e63.js} +1 -1
  47. package/dist/{chunk-a96rnwf0.js → chunk-e6d229x4.js} +1 -1
  48. package/dist/{chunk-v6ebzqkd.js → chunk-e6jjec9v.js} +1 -1
  49. package/dist/{chunk-x8t29tnr.js → chunk-eap7w3a8.js} +1 -1
  50. package/dist/chunk-egpdk2dj.js +2 -0
  51. package/dist/{chunk-tpqyvmqd.js → chunk-ekaghc8q.js} +1 -1
  52. package/dist/chunk-etyqf0vg.js +2 -0
  53. package/dist/chunk-ez4jw7cw.js +2 -0
  54. package/dist/{chunk-a3fsqjag.js → chunk-fx32tvka.js} +2 -2
  55. package/dist/chunk-fxhszz9j.js +2 -0
  56. package/dist/chunk-g191xwrt.js +2 -0
  57. package/dist/{chunk-pecjvzrk.js → chunk-g1qfrafq.js} +1 -1
  58. package/dist/chunk-gj7b89m1.js +2 -0
  59. package/dist/chunk-h1q5w95d.js +2 -0
  60. package/dist/{chunk-0xh7vqce.js → chunk-h5pdcxre.js} +2 -2
  61. package/dist/{chunk-2e0fg0jk.js → chunk-hmwhjmma.js} +1 -1
  62. package/dist/{chunk-ha15g06r.js → chunk-hwevsa8j.js} +1 -1
  63. package/dist/{chunk-y2s9c0f0.js → chunk-j4af4f7v.js} +1 -1
  64. package/dist/{chunk-9jh1etzh.js → chunk-jcyv8qs0.js} +2 -2
  65. package/dist/{chunk-hfqycvep.js → chunk-jmdd817r.js} +1 -1
  66. package/dist/chunk-jnt6dbky.js +2 -0
  67. package/dist/{chunk-cypwvwpa.js → chunk-kagjfzk0.js} +29 -24
  68. package/dist/chunk-kse5r2my.js +2 -0
  69. package/dist/chunk-kt6wm51e.js +3 -0
  70. package/dist/{chunk-60s7hgym.js → chunk-kynnyass.js} +2 -2
  71. package/dist/{chunk-nh6p0k17.js → chunk-ma41bbjn.js} +1 -1
  72. package/dist/chunk-mjm2x2px.js +2 -0
  73. package/dist/chunk-mrnekpgh.js +2 -0
  74. package/dist/{chunk-m2c9847h.js → chunk-mtr8g311.js} +1 -1
  75. package/dist/{chunk-660e7tfb.js → chunk-mza7h890.js} +1 -1
  76. package/dist/{chunk-43ammxkh.js → chunk-ne27x5e6.js} +1 -1
  77. package/dist/{chunk-ht2496q5.js → chunk-pxfztwya.js} +1 -1
  78. package/dist/{chunk-qg9rm36c.js → chunk-q3vkf153.js} +1 -1
  79. package/dist/{chunk-km3e88cy.js → chunk-q4vhc2hd.js} +1 -1
  80. package/dist/{chunk-eewneg7t.js → chunk-qg4e12et.js} +1 -1
  81. package/dist/{chunk-3jm88rme.js → chunk-qppqwhhy.js} +1 -1
  82. package/dist/{chunk-j8vff5b1.js → chunk-qrm0k16b.js} +1 -1
  83. package/dist/chunk-qt0kz3t5.js +12 -0
  84. package/dist/{chunk-ms3xppjb.js → chunk-r75c4h16.js} +1 -1
  85. package/dist/{chunk-xpw4r8qb.js → chunk-r9vpgmbd.js} +2 -2
  86. package/dist/{chunk-e4jsntps.js → chunk-s7j42ma7.js} +1 -1
  87. package/dist/chunk-sbskfp38.js +2 -0
  88. package/dist/chunk-sdych4rv.js +2 -0
  89. package/dist/{chunk-zhzcahz5.js → chunk-sh77d4tv.js} +1 -1
  90. package/dist/chunk-t6118t47.js +2 -0
  91. package/dist/chunk-tkskx23v.js +2 -0
  92. package/dist/{chunk-w3xwpe5f.js → chunk-tznfbxj3.js} +1 -1
  93. package/dist/{chunk-m859sqt4.js → chunk-vjb3v63z.js} +144 -144
  94. package/dist/chunk-vk6v8kzj.js +2 -0
  95. package/dist/{chunk-cjqqh2cn.js → chunk-wb2rvvkh.js} +1 -1
  96. package/dist/{chunk-508xtkyq.js → chunk-wgsmawhw.js} +188 -188
  97. package/dist/chunk-wnc0fadc.js +2 -0
  98. package/dist/{chunk-ytksxjme.js → chunk-wnpyb1f4.js} +1 -1
  99. package/dist/chunk-wrmj0cn4.js +2 -0
  100. package/dist/{chunk-bt3nnbkm.js → chunk-wwvasdjy.js} +1 -1
  101. package/dist/{chunk-n0qssshb.js → chunk-xaddzx9d.js} +1 -1
  102. package/dist/{chunk-xpc8ygpz.js → chunk-xbfc6cw2.js} +1 -1
  103. package/dist/chunk-xyangbca.js +2 -0
  104. package/dist/{chunk-8kwmj99g.js → chunk-ystnxqsq.js} +1 -1
  105. package/dist/{chunk-a6a1b4yj.js → chunk-zf7daamg.js} +1 -1
  106. package/dist/{chunk-cdnytss4.js → chunk-zkzp83x3.js} +1 -1
  107. package/dist/{chunk-y2drxh2s.js → chunk-zt3tkx1m.js} +1 -1
  108. package/dist/{chunk-jtnhq04d.js → chunk-zyqa38rq.js} +1 -1
  109. package/dist/cli.js +14 -14
  110. package/dist/craft-entry.js +1 -1
  111. package/dist/craft.js +1 -1
  112. package/dist/database.js +1 -1
  113. package/dist/pwa/workbox.js +9 -3
  114. package/dist/pwa.js +2 -2
  115. package/dist/ssg.js +2 -2
  116. package/dist/visual-testing.js +1 -1
  117. package/package.json +5 -5
  118. package/dist/chunk-0jts0tmp.js +0 -2
  119. package/dist/chunk-0nknfsxa.js +0 -2
  120. package/dist/chunk-14bq0xmx.js +0 -2
  121. package/dist/chunk-2g6k94hw.js +0 -2
  122. package/dist/chunk-3ef52k5e.js +0 -2
  123. package/dist/chunk-3eq3h4cm.js +0 -2
  124. package/dist/chunk-4vg0zgas.js +0 -2
  125. package/dist/chunk-5d8ppxbm.js +0 -2
  126. package/dist/chunk-6esv7x92.js +0 -2
  127. package/dist/chunk-6vqzyvn2.js +0 -2
  128. package/dist/chunk-73kw81xx.js +0 -2
  129. package/dist/chunk-7ngmxv4z.js +0 -47
  130. package/dist/chunk-8nqkzq6v.js +0 -2
  131. package/dist/chunk-98cret6x.js +0 -2
  132. package/dist/chunk-c9fg7wte.js +0 -2
  133. package/dist/chunk-chejthpz.js +0 -2
  134. package/dist/chunk-cvfyjqbp.js +0 -2
  135. package/dist/chunk-fa68t20e.js +0 -2
  136. package/dist/chunk-nqa2rqjs.js +0 -2
  137. package/dist/chunk-pvptmxgd.js +0 -2
  138. package/dist/chunk-pvxh9ms3.js +0 -2
  139. package/dist/chunk-qsygwwkt.js +0 -2
  140. package/dist/chunk-sgraj16m.js +0 -2
  141. package/dist/chunk-sqj228wh.js +0 -2
  142. package/dist/chunk-tfk1w25g.js +0 -3
  143. package/dist/chunk-tmcnptq6.js +0 -2
  144. package/dist/chunk-vafmd261.js +0 -2
  145. package/dist/chunk-vwh3j3fh.js +0 -30
  146. package/dist/chunk-wea6j8hh.js +0 -2
  147. package/dist/chunk-wfeshaa9.js +0 -2
  148. package/dist/chunk-wkgywcpz.js +0 -2
  149. package/dist/chunk-wpe1ns0w.js +0 -2
  150. package/dist/chunk-ws7dy2jt.js +0 -2
  151. package/dist/chunk-wxfbfa9w.js +0 -2
  152. package/dist/chunk-yht9jjry.js +0 -2
  153. package/dist/chunk-zzvkcf01.js +0 -12
@@ -1,5 +1,5 @@
1
1
  // @bun
2
- import{Bf as L,Cf as w,Df as x,Ef as p,Ff as F,Gf as T,Jf as I,Kf as f,Lf as l,Mf as n,Nf as i,Of as P,Pf as o,Qf as a}from"./chunk-km3e88cy.js";import{Ds as ZG}from"./chunk-cbj5a2tk.js";function HG(X,Z={}){let{src:G,alt:J,width:q,height:$,sizes:K="100vw",loading:Q="lazy",priority:Y=!1,quality:M=x,placeholder:N="none",formats:j=w,widths:C=L,decoding:B="async",fetchpriority:V,objectFit:O,objectPosition:W}=X,H=X.class,z=X.style,{processedImage:R,variants:_,optimize:E=!0,isDev:S=!1}=Z;if(_&&_.length>0)return OG(X,_,R);if(S||!E)return MG(X);return VG(X)}function OG(X,Z,G){let{src:J,alt:q,width:$,height:K,sizes:Q="100vw",loading:Y="lazy",priority:M=!1,decoding:N="async",fetchpriority:j,objectFit:C,objectPosition:B,placeholder:V="none"}=X,O=X.class,W=X.style,H=n(Z),z=l(Z),R=typeof Q==="object"?f(Q):Q,_=G?G.aspectRatio:$&&K?Number($)/Number(K):void 0,E=[];if(_)E.push(`aspect-ratio: ${_}`);if(C)E.push(`object-fit: ${C}`);if(B)E.push(`object-position: ${B}`);if(W)E.push(W);let S=E.length>0?` style="${E.join("; ")}"`:"",b=O?` class="${O}"`:"",u=M?"":` loading="${Y}"`,d=` decoding="${N}"`,h=j?` fetchpriority="${j}"`:M?' fetchpriority="high"':"",r=["avif","webp","jpeg","png"],s=[];for(let U of r){let D=H.get(U);if(D&&D.length>0){let m=I(D),QG=P(U);s.push(` <source type="${QG}" srcset="${m}" sizes="${R}" />`)}}let e="",t="",g;if(V!=="none"&&G?.placeholder){let U=`img-${Math.random().toString(36).slice(2,8)}`;if(e=`<div class="stx-image-wrapper" id="${U}">`,t="</div>",V==="blur")g=`
2
+ import{Bf as L,Cf as w,Df as x,Ef as p,Ff as F,Gf as T,Jf as I,Kf as f,Lf as l,Mf as n,Nf as i,Of as P,Pf as o,Qf as a}from"./chunk-q4vhc2hd.js";import{Ds as ZG}from"./chunk-cbj5a2tk.js";function HG(X,Z={}){let{src:G,alt:J,width:q,height:$,sizes:K="100vw",loading:Q="lazy",priority:Y=!1,quality:M=x,placeholder:N="none",formats:j=w,widths:C=L,decoding:B="async",fetchpriority:V,objectFit:O,objectPosition:W}=X,H=X.class,z=X.style,{processedImage:R,variants:_,optimize:E=!0,isDev:S=!1}=Z;if(_&&_.length>0)return OG(X,_,R);if(S||!E)return MG(X);return VG(X)}function OG(X,Z,G){let{src:J,alt:q,width:$,height:K,sizes:Q="100vw",loading:Y="lazy",priority:M=!1,decoding:N="async",fetchpriority:j,objectFit:C,objectPosition:B,placeholder:V="none"}=X,O=X.class,W=X.style,H=n(Z),z=l(Z),R=typeof Q==="object"?f(Q):Q,_=G?G.aspectRatio:$&&K?Number($)/Number(K):void 0,E=[];if(_)E.push(`aspect-ratio: ${_}`);if(C)E.push(`object-fit: ${C}`);if(B)E.push(`object-position: ${B}`);if(W)E.push(W);let S=E.length>0?` style="${E.join("; ")}"`:"",b=O?` class="${O}"`:"",u=M?"":` loading="${Y}"`,d=` decoding="${N}"`,h=j?` fetchpriority="${j}"`:M?' fetchpriority="high"':"",r=["avif","webp","jpeg","png"],s=[];for(let U of r){let D=H.get(U);if(D&&D.length>0){let m=I(D),QG=P(U);s.push(` <source type="${QG}" srcset="${m}" sizes="${R}" />`)}}let e="",t="",g;if(V!=="none"&&G?.placeholder){let U=`img-${Math.random().toString(36).slice(2,8)}`;if(e=`<div class="stx-image-wrapper" id="${U}">`,t="</div>",V==="blur")g=`
3
3
  #${U} {
4
4
  position: relative;
5
5
  background-image: url('${G.placeholder}');
@@ -0,0 +1,2 @@
1
+ // @bun
2
+ import{ei as a}from"./chunk-g1vxsvqv.js";import"./chunk-1rdm5y91.js";export{a as rewriteImagesWithSiblings};
@@ -0,0 +1,2 @@
1
+ // @bun
2
+ import{Lg as a,Mg as b,Ng as c,Og as d,Pg as e,Qg as f}from"./chunk-ne27x5e6.js";import"./chunk-wgsmawhw.js";import"./chunk-ma41bbjn.js";import"./chunk-49trnqad.js";import"./chunk-c0vjhzjf.js";import"./chunk-vjn3r3sq.js";import"./chunk-cbj5a2tk.js";import"./chunk-fx32tvka.js";import"./chunk-2zbmyvqc.js";import"./chunk-sjpjge04.js";import"./chunk-dfeq9d99.js";import"./chunk-k6bagvmz.js";import"./chunk-sh77d4tv.js";import"./chunk-ystnxqsq.js";import"./chunk-4djwtq0y.js";import"./chunk-7wkxs25k.js";import"./chunk-8kwtg74v.js";import"./chunk-eap7w3a8.js";import"./chunk-h5pdcxre.js";import"./chunk-4vscfb5b.js";import"./chunk-kt6wm51e.js";import"./chunk-1rdm5y91.js";export{c as renderSlot,d as processSlots,a as parseSlots,b as parseSlotElement,e as extractSlotContent,f as applySlots};
@@ -1,2 +1,2 @@
1
1
  // @bun
2
- import{oj as o,pj as p,qj as q}from"./chunk-585vt0xw.js";import{Aj as e,Bj as f,Cj as g,Dj as h,Ej as i,Fj as j,Gj as k,Hj as l,Ij as m,Jj as n,wj as a,xj as b,yj as c,zj as d}from"./chunk-y32dbdta.js";import"./chunk-x8t29tnr.js";import"./chunk-myyj9qp3.js";export{n as useOptimistic,l as untrack,a as state,g as runMountCallbacks,h as runDestroyCallbacks,i as pendingLifecycleCounts,m as peek,e as onMount,f as onDestroy,j as isSignal,k as isDerived,p as generateSignalsRuntimeDev,o as generateSignalsRuntime,c as effect,b as derived,q as default,d as batch};
2
+ import{oj as o,pj as p,qj as q}from"./chunk-bsfkdb4p.js";import{Aj as e,Bj as f,Cj as g,Dj as h,Ej as i,Fj as j,Gj as k,Hj as l,Ij as m,Jj as n,wj as a,xj as b,yj as c,zj as d}from"./chunk-y32dbdta.js";import"./chunk-eap7w3a8.js";import"./chunk-1rdm5y91.js";export{n as useOptimistic,l as untrack,a as state,g as runMountCallbacks,h as runDestroyCallbacks,i as pendingLifecycleCounts,m as peek,e as onMount,f as onDestroy,j as isSignal,k as isDerived,p as generateSignalsRuntimeDev,o as generateSignalsRuntime,c as effect,b as derived,q as default,d as batch};
@@ -1,2 +1,2 @@
1
1
  // @bun
2
- import{Ah as g,Bh as h,uh as a,vh as b,wh as c,xh as d,yh as e,zh as f}from"./chunk-y4zddt5r.js";import"./chunk-myyj9qp3.js";export{g as timingPlugin,c as pluginManager,a as definePlugin,f as debugPlugin,h as createVariablesPlugin,e as createFilterPlugin,d as createDirectivePlugin,b as PluginManager};
2
+ import{Ah as g,Bh as h,uh as a,vh as b,wh as c,xh as d,yh as e,zh as f}from"./chunk-y4zddt5r.js";import"./chunk-1rdm5y91.js";export{g as timingPlugin,c as pluginManager,a as definePlugin,f as debugPlugin,h as createVariablesPlugin,e as createFilterPlugin,d as createDirectivePlugin,b as PluginManager};
@@ -1,3 +1,3 @@
1
1
  // @bun
2
2
  var{defineProperty:e,getOwnPropertyNames:g,getOwnPropertyDescriptor:h}=Object,i=Object.prototype.hasOwnProperty;function j(a){return this[a]}var m=(a)=>{var b=(f??=new WeakMap).get(a),c;if(b)return b;if(b=e({},"__esModule",{value:!0}),a&&typeof a==="object"||typeof a==="function"){for(var d of g(a))if(!i.call(b,d))e(b,d,{get:j.bind(a,d),enumerable:!(c=h(a,d))||c.enumerable})}return f.set(a,b),b},f;var k=(a)=>a;function l(a,b){this[a]=k.bind(null,b)}var n=(a,b)=>{for(var c in b)e(a,c,{get:b[c],enumerable:!0,configurable:!0,set:l.bind(b,c)})};var o=(a,b)=>()=>(a&&(b=a(a=0)),b);var p=import.meta.require;
3
- export{m as Qw,n as Rw,o as Sw,p as Tw};
3
+ export{m as Rw,n as Sw,o as Tw,p as Uw};
@@ -1,5 +1,5 @@
1
1
  // @bun
2
- import{a as N,c as R,e as W,g as j,i as H,k as J}from"./chunk-0y46fbkx.js";import{l as k,m as w,n as B}from"./chunk-q9n5swx7.js";import"./chunk-myyj9qp3.js";import E from"fs";import K from"path";var V=[];function _(U){V=[];for(let A of U.storyFiles)if(V.push({text:A.fileName.toLowerCase(),original:A.fileName,type:"story",storyId:A.id}),V.push({text:A.relativePath.toLowerCase(),original:A.relativePath,type:"story",storyId:A.id}),A.story)for(let z of A.story.variants)V.push({text:z.title.toLowerCase(),original:z.title,type:"story",storyId:A.id,variantId:z.id})}function $(){return JSON.stringify(V)}async function O(U={}){let A=Date.now();N();let z=await k({mode:"build"});if(!z.config.enabled){W("Story feature is disabled in config.");return}let P=await H(z);w(z,P);let Y=J(z.config,P);B(z,Y),R(P.length);let X=U.outDir??z.config.outDir,Q=K.resolve(z.root,X);await E.promises.mkdir(Q,{recursive:!0}),console.log(` Building to ${X}...`);let M=F(z);await E.promises.writeFile(K.join(Q,"index.html"),M);let v={files:P.map((G)=>({id:G.id,fileName:G.fileName,relativePath:G.relativePath,treePath:G.treePath})),tree:Y};await E.promises.writeFile(K.join(Q,"stories.json"),JSON.stringify(v,null,2));let L={theme:z.config.theme,responsivePresets:z.config.responsivePresets,backgroundPresets:z.config.backgroundPresets};await E.promises.writeFile(K.join(Q,"config.json"),JSON.stringify(L,null,2));let Z=K.join(Q,"stories");await E.promises.mkdir(Z,{recursive:!0});for(let G of P){let g=await E.promises.readFile(G.path,"utf-8");await E.promises.writeFile(K.join(Z,`${G.id}.stx`),g)}_(z);let T=$();await E.promises.writeFile(K.join(Q,"search-index.json"),T);let C=Date.now()-A;j(P.length,X,C)}function F(U){let{theme:A}=U.config,z=A.title||"STX Story";return`<!DOCTYPE html>
2
+ import{a as N,c as R,e as W,g as j,i as H,k as J}from"./chunk-0y46fbkx.js";import{l as k,m as w,n as B}from"./chunk-q9n5swx7.js";import"./chunk-1rdm5y91.js";import E from"fs";import K from"path";var V=[];function _(U){V=[];for(let A of U.storyFiles)if(V.push({text:A.fileName.toLowerCase(),original:A.fileName,type:"story",storyId:A.id}),V.push({text:A.relativePath.toLowerCase(),original:A.relativePath,type:"story",storyId:A.id}),A.story)for(let z of A.story.variants)V.push({text:z.title.toLowerCase(),original:z.title,type:"story",storyId:A.id,variantId:z.id})}function $(){return JSON.stringify(V)}async function O(U={}){let A=Date.now();N();let z=await k({mode:"build"});if(!z.config.enabled){W("Story feature is disabled in config.");return}let P=await H(z);w(z,P);let Y=J(z.config,P);B(z,Y),R(P.length);let X=U.outDir??z.config.outDir,Q=K.resolve(z.root,X);await E.promises.mkdir(Q,{recursive:!0}),console.log(` Building to ${X}...`);let M=F(z);await E.promises.writeFile(K.join(Q,"index.html"),M);let v={files:P.map((G)=>({id:G.id,fileName:G.fileName,relativePath:G.relativePath,treePath:G.treePath})),tree:Y};await E.promises.writeFile(K.join(Q,"stories.json"),JSON.stringify(v,null,2));let L={theme:z.config.theme,responsivePresets:z.config.responsivePresets,backgroundPresets:z.config.backgroundPresets};await E.promises.writeFile(K.join(Q,"config.json"),JSON.stringify(L,null,2));let Z=K.join(Q,"stories");await E.promises.mkdir(Z,{recursive:!0});for(let G of P){let g=await E.promises.readFile(G.path,"utf-8");await E.promises.writeFile(K.join(Z,`${G.id}.stx`),g)}_(z);let T=$();await E.promises.writeFile(K.join(Q,"search-index.json"),T);let C=Date.now()-A;j(P.length,X,C)}function F(U){let{theme:A}=U.config,z=A.title||"STX Story";return`<!DOCTYPE html>
3
3
  <html lang="en">
4
4
  <head>
5
5
  <meta charset="UTF-8">
@@ -0,0 +1,2 @@
1
+ // @bun
2
+ import{Ni as a,Oi as b,Pi as c,Qi as d,Ri as e,Si as f,Ti as g,Ui as h,Vi as i,Wi as j,Xi as k,Yi as l,Zi as m,_i as n}from"./chunk-a97fpbsa.js";import"./chunk-wgsmawhw.js";import"./chunk-ma41bbjn.js";import"./chunk-49trnqad.js";import"./chunk-c0vjhzjf.js";import"./chunk-vjn3r3sq.js";import"./chunk-cbj5a2tk.js";import"./chunk-fx32tvka.js";import"./chunk-2zbmyvqc.js";import"./chunk-sjpjge04.js";import"./chunk-dfeq9d99.js";import"./chunk-k6bagvmz.js";import"./chunk-sh77d4tv.js";import"./chunk-ystnxqsq.js";import"./chunk-4djwtq0y.js";import"./chunk-7wkxs25k.js";import"./chunk-8kwtg74v.js";import"./chunk-eap7w3a8.js";import"./chunk-h5pdcxre.js";import"./chunk-4vscfb5b.js";import"./chunk-kt6wm51e.js";import"./chunk-1rdm5y91.js";export{i as streamingSuspenseDirective,m as streamToResponse,g as streamTemplateSimple,a as streamTemplate,d as renderStreamingPage,k as registerStreamingDirectives,e as processStreamDirectives,l as processSectionDirectives,j as islandDirective,n as generateHydrationRuntime,f as extractStreamBoundaries,h as createStreamRenderer,b as buildSuspenseResolveScript,c as SUSPENSE_RESOLVER_RUNTIME};
@@ -0,0 +1,2 @@
1
+ // @bun
2
+ import{Ve as a}from"./chunk-4fc6gjr5.js";import"./chunk-0knxnyq6.js";import"./chunk-wgsmawhw.js";import"./chunk-ma41bbjn.js";import"./chunk-49trnqad.js";import"./chunk-c0vjhzjf.js";import"./chunk-vjn3r3sq.js";import"./chunk-cbj5a2tk.js";import"./chunk-fx32tvka.js";import"./chunk-2zbmyvqc.js";import"./chunk-sjpjge04.js";import"./chunk-dfeq9d99.js";import"./chunk-k6bagvmz.js";import"./chunk-sh77d4tv.js";import"./chunk-ystnxqsq.js";import"./chunk-4djwtq0y.js";import"./chunk-7wkxs25k.js";import"./chunk-8kwtg74v.js";import"./chunk-eap7w3a8.js";import"./chunk-h5pdcxre.js";import"./chunk-4vscfb5b.js";import"./chunk-kt6wm51e.js";import"./chunk-1rdm5y91.js";export{a as buildApp};
@@ -1,5 +1,5 @@
1
1
  // @bun
2
- import"./chunk-myyj9qp3.js";var Y=null,S=[],F=new WeakMap;function I(z){let K=z,B=new Set,G={get value(){if(Y){let H=F.get(G);if(!H)H=new Set,F.set(G,H);H.add(Y)}return K},set value(H){if(!Object.is(K,H)){K=H,B.forEach((J)=>J(H));let L=F.get(G);if(L)L.forEach((J)=>J())}},subscribe(H){return B.add(H),()=>B.delete(H)},peek(){return K}};return G}function W(z){return z!==null&&typeof z==="object"&&"value"in z&&"subscribe"in z&&"peek"in z}function P(z){return W(z)?z.value:z}function j(z){let K={};for(let B in z)if(Object.prototype.hasOwnProperty.call(z,B))K[B]=I(z[B]);return K}function D(z){return I(z)}function U(z){let K=typeof z==="function",B=K?z:z.get,G=K?void 0:z.set,H=K?Object.is:z.equals||Object.is,L,J=!0,Q=new Set,X=new Set,_=()=>{if(J=!0,X.size>0){let N=T.value;X.forEach(($)=>$(N))}};function Z(){Q.clear();let N=Y;Y=_,S.push(_);try{return B()}finally{S.pop(),Y=N}}let T={get value(){if(Y){let N=F.get(T);if(!N)N=new Set,F.set(T,N);N.add(Y)}if(J){let N=Z();if(!H(L,N))L=N;J=!1}return L},set value(N){if(G)G(N);else console.warn("Computed property is readonly")},subscribe(N){return X.add(N),()=>X.delete(N)},peek(){if(J)L=B(),J=!1;return L},invalidate(){J=!0},get dirty(){return J},get deps(){return Q}};return T}function x(z,K,B={}){let{immediate:G=!1,deep:H=!1,flush:L="pre",once:J=!1}=B,Q,X=!0,_=!1,Z=()=>{if(W(z))return H?q(z.value):z.value;return z()},T=()=>{if(!X||_)return;let M=Z();if(Q!==void 0&&Object.is(Q,M)&&!H)return;let A=()=>{if(K(M,Q),Q=H?q(M):M,J)$()};if(L==="sync")A();else if(L==="post")queueMicrotask(A);else Promise.resolve().then(A)},N=null;if(W(z))N=z.subscribe(()=>T());else N=U(z).subscribe(()=>T());if(G)Q=void 0,T();else Q=Z();let $=()=>{if(X=!1,N)N(),N=null};return $.pause=()=>{_=!0},$.resume=()=>{_=!1},$}function E(z,K,B={}){let{immediate:G=!1,once:H=!1}=B,L=z.map((T)=>W(T)?T.value:void 0),J=!0,Q=!1,X=()=>{if(!J||Q)return;let T=z.map((N)=>W(N)?N.value:void 0);if(K(T,L),L=[...T],H)Z()},_=z.map((T)=>{if(W(T))return T.subscribe(()=>X());return()=>{}});if(G)X();let Z=()=>{J=!1,_.forEach((T)=>T())};return Z.pause=()=>{Q=!0},Z.resume=()=>{Q=!1},Z}function y(z,K={}){let{flush:B="pre"}=K,G,H=!0,L=!1,J=()=>{if(!H||L)return;if(G)G();let X=Y;Y=J,S.push(J);try{G=z()}finally{S.pop(),Y=X}};if(B==="sync")J();else if(B==="post")queueMicrotask(J);else Promise.resolve().then(J);let Q=()=>{if(H=!1,G)G()};return Q.pause=()=>{L=!0},Q.resume=()=>{L=!1},Q}function C(z,K={},B){let G=/@computed\s*\(\s*(\w+)\s*,\s*(.+?)\s*\)/gi;return z.replace(G,(H,L,J)=>{try{let X=Function(...Object.keys(K),`return ${J}`)(...Object.values(K));return K[L]=X,`<!-- computed: ${L} = ${X} -->`}catch(Q){return`<!-- computed error: ${L} - ${Q} -->`}})}function R(z,K={},B){let G=/@watch\s*\(\s*(\w+)\s*\)\s*([\s\S]*?)@endwatch/gi;return z.replace(G,(H,L,J)=>{return`
2
+ import"./chunk-1rdm5y91.js";var Y=null,S=[],F=new WeakMap;function I(z){let K=z,B=new Set,G={get value(){if(Y){let H=F.get(G);if(!H)H=new Set,F.set(G,H);H.add(Y)}return K},set value(H){if(!Object.is(K,H)){K=H,B.forEach((J)=>J(H));let L=F.get(G);if(L)L.forEach((J)=>J())}},subscribe(H){return B.add(H),()=>B.delete(H)},peek(){return K}};return G}function W(z){return z!==null&&typeof z==="object"&&"value"in z&&"subscribe"in z&&"peek"in z}function P(z){return W(z)?z.value:z}function j(z){let K={};for(let B in z)if(Object.prototype.hasOwnProperty.call(z,B))K[B]=I(z[B]);return K}function D(z){return I(z)}function U(z){let K=typeof z==="function",B=K?z:z.get,G=K?void 0:z.set,H=K?Object.is:z.equals||Object.is,L,J=!0,Q=new Set,X=new Set,_=()=>{if(J=!0,X.size>0){let N=T.value;X.forEach(($)=>$(N))}};function Z(){Q.clear();let N=Y;Y=_,S.push(_);try{return B()}finally{S.pop(),Y=N}}let T={get value(){if(Y){let N=F.get(T);if(!N)N=new Set,F.set(T,N);N.add(Y)}if(J){let N=Z();if(!H(L,N))L=N;J=!1}return L},set value(N){if(G)G(N);else console.warn("Computed property is readonly")},subscribe(N){return X.add(N),()=>X.delete(N)},peek(){if(J)L=B(),J=!1;return L},invalidate(){J=!0},get dirty(){return J},get deps(){return Q}};return T}function x(z,K,B={}){let{immediate:G=!1,deep:H=!1,flush:L="pre",once:J=!1}=B,Q,X=!0,_=!1,Z=()=>{if(W(z))return H?q(z.value):z.value;return z()},T=()=>{if(!X||_)return;let M=Z();if(Q!==void 0&&Object.is(Q,M)&&!H)return;let A=()=>{if(K(M,Q),Q=H?q(M):M,J)$()};if(L==="sync")A();else if(L==="post")queueMicrotask(A);else Promise.resolve().then(A)},N=null;if(W(z))N=z.subscribe(()=>T());else N=U(z).subscribe(()=>T());if(G)Q=void 0,T();else Q=Z();let $=()=>{if(X=!1,N)N(),N=null};return $.pause=()=>{_=!0},$.resume=()=>{_=!1},$}function E(z,K,B={}){let{immediate:G=!1,once:H=!1}=B,L=z.map((T)=>W(T)?T.value:void 0),J=!0,Q=!1,X=()=>{if(!J||Q)return;let T=z.map((N)=>W(N)?N.value:void 0);if(K(T,L),L=[...T],H)Z()},_=z.map((T)=>{if(W(T))return T.subscribe(()=>X());return()=>{}});if(G)X();let Z=()=>{J=!1,_.forEach((T)=>T())};return Z.pause=()=>{Q=!0},Z.resume=()=>{Q=!1},Z}function y(z,K={}){let{flush:B="pre"}=K,G,H=!0,L=!1,J=()=>{if(!H||L)return;if(G)G();let X=Y;Y=J,S.push(J);try{G=z()}finally{S.pop(),Y=X}};if(B==="sync")J();else if(B==="post")queueMicrotask(J);else Promise.resolve().then(J);let Q=()=>{if(H=!1,G)G()};return Q.pause=()=>{L=!0},Q.resume=()=>{L=!1},Q}function C(z,K={},B){let G=/@computed\s*\(\s*(\w+)\s*,\s*(.+?)\s*\)/gi;return z.replace(G,(H,L,J)=>{try{let X=Function(...Object.keys(K),`return ${J}`)(...Object.values(K));return K[L]=X,`<!-- computed: ${L} = ${X} -->`}catch(Q){return`<!-- computed error: ${L} - ${Q} -->`}})}function R(z,K={},B){let G=/@watch\s*\(\s*(\w+)\s*\)\s*([\s\S]*?)@endwatch/gi;return z.replace(G,(H,L,J)=>{return`
3
3
  <script data-watch="${`watch-${Math.random().toString(36).substring(2,9)}`}">
4
4
  (function() {
5
5
  // Watch implementation for ${L}
@@ -0,0 +1,2 @@
1
+ // @bun
2
+ import{Au as n,Bu as o,Cu as p,nu as a,ou as b,pu as c,qu as d,ru as e,su as f,tu as g,uu as h,vu as i,wu as j,xu as k,yu as l,zu as m}from"./chunk-ystnxqsq.js";import"./chunk-4djwtq0y.js";import"./chunk-kt6wm51e.js";import"./chunk-1rdm5y91.js";export{i as useTitle,f as useSeoMeta,i as usePageTitle,d as useHead,g as seoMetaToHeadConfig,c as resetHead,k as renderHtmlAttrs,j as renderHead,l as renderBodyAttrs,o as processTitleDirective,p as processMetaDirective,n as processHeadDirective,e as mergeHeadConfigs,b as getPageMeta,a as getHead,h as definePageMeta,m as applyHead};
@@ -1,5 +1,5 @@
1
1
  // @bun
2
- import{Im as W,Mp as X}from"./chunk-508xtkyq.js";import V from"fs";import M from"path";import*as Y from"readline";var j={reset:"\x1B[0m",bold:"\x1B[1m",dim:"\x1B[2m",red:"\x1B[31m",green:"\x1B[32m",yellow:"\x1B[33m",blue:"\x1B[34m",magenta:"\x1B[35m",cyan:"\x1B[36m"},Q={help:{description:"Show available commands",usage:"help [command]",handler:async(q,z)=>{if(q[0]&&Q[q[0]]){let A=Q[q[0]];console.log(`
2
+ import{Im as W,Mp as X}from"./chunk-wgsmawhw.js";import V from"fs";import M from"path";import*as Y from"readline";var j={reset:"\x1B[0m",bold:"\x1B[1m",dim:"\x1B[2m",red:"\x1B[31m",green:"\x1B[32m",yellow:"\x1B[33m",blue:"\x1B[34m",magenta:"\x1B[35m",cyan:"\x1B[36m"},Q={help:{description:"Show available commands",usage:"help [command]",handler:async(q,z)=>{if(q[0]&&Q[q[0]]){let A=Q[q[0]];console.log(`
3
3
  ${j.bold}${q[0]}${j.reset} - ${A.description}`),console.log(` Usage: ${j.cyan}${A.usage}${j.reset}
4
4
  `)}else{console.log(`
5
5
  ${j.bold}Available Commands:${j.reset}
@@ -0,0 +1,47 @@
1
+ // @bun
2
+ import{Ow as O,Qw as x}from"./chunk-kt6wm51e.js";import{Uw as z}from"./chunk-1rdm5y91.js";var Gq={1001:{message:"Unclosed directive: {{directive}}",help:"Make sure to close the directive with the appropriate end tag"},1002:{message:"Unclosed expression at position {{position}}",help:"Check for missing closing braces }}"},1003:{message:"Invalid directive syntax: {{directive}}",help:"Review the directive documentation for correct syntax"},1004:{message:"Malformed expression: {{expression}}",help:"Check for syntax errors in your expression"},1005:{message:"Unexpected token: {{token}}",help:"Remove or fix the unexpected token"},1101:{message:"Undefined variable: {{variable}}",help:"Make sure the variable is defined in the template context"},1102:{message:"Type error: {{details}}",help:"Check that you are using the correct types"},1103:{message:"Evaluation error: {{details}}",help:"Review the expression for errors"},1104:{message:"Infinite loop detected in {{location}}",help:"Check your loop conditions"},1105:{message:"Circular reference detected: {{path}}",help:"Remove the circular dependency"},1201:{message:"Unsafe expression blocked: {{expression}}",help:"This expression contains potentially dangerous code"},1202:{message:"Path traversal attempt blocked: {{path}}",help:"Use only relative paths within allowed directories"},1203:{message:"Potential XSS attempt blocked",help:"Sanitize user input before rendering"},1204:{message:"Code injection attempt blocked: {{code}}",help:"Avoid executing dynamic code"},1205:{message:"Prohibited DOM API usage: {{api}}",help:"Use STX.useRefs(), STX.useRef(), STX.el() and other STX helpers instead of direct DOM manipulation"},1301:{message:"File not found: {{path}}",help:"Check that the file exists and the path is correct"},1302:{message:"Error reading file: {{path}}",help:"Check file permissions and encoding"},1303:{message:"Invalid file path: {{path}}",help:"Use a valid file path"},1304:{message:"Permission denied: {{path}}",help:"Check file permissions"},1401:{message:"Invalid configuration: {{details}}",help:"Review your stx.config.ts file"},1402:{message:"Missing required configuration: {{key}}",help:"Add the required configuration option"},1403:{message:"Deprecated configuration: {{key}}",help:"Update to the new configuration format"},1501:{message:"Component not found: {{name}}",help:"Check that the component exists in your components directory"},1502:{message:"Invalid props for component {{name}}: {{details}}",help:"Check the component prop requirements"},1503:{message:"Error rendering component {{name}}: {{details}}",help:"Check the component template for errors"},1601:{message:"Filter not found: {{filter}}",help:"Register the filter or check the filter name"},1602:{message:"Invalid arguments for filter {{filter}}: {{details}}",help:"Check the filter documentation for correct arguments"},1603:{message:"Expression evaluation timed out",help:"Simplify the expression or increase the timeout"}},L={},u="en";function Hq(q){u=q}function Bq(){return u}function Wq(q){L={...L,...q}}function Mq(){L={}}function f(q,J={}){let Q=L[q]||Gq[q]||{message:`Unknown error (code: ${q})`},Z=Q.message,$=Q.help;for(let[Y,V]of Object.entries(J)){let X=`{{${Y}}}`;if(Z=Z.replace(new RegExp(X,"g"),V),$)$=$.replace(new RegExp(X,"g"),V)}return{message:Z,help:$}}function Iq(q,J={}){let{message:Q,help:Z}=f(q,J);return Z?`${Q}
3
+ Help: ${Z}`:Q}var w={UNCLOSED_DIRECTIVE:1001,UNCLOSED_EXPRESSION:1002,INVALID_DIRECTIVE_SYNTAX:1003,MALFORMED_EXPRESSION:1004,UNEXPECTED_TOKEN:1005,UNDEFINED_VARIABLE:1101,TYPE_ERROR:1102,EVALUATION_ERROR:1103,INFINITE_LOOP:1104,CIRCULAR_REFERENCE:1105,UNSAFE_EXPRESSION:1201,PATH_TRAVERSAL:1202,XSS_ATTEMPT:1203,CODE_INJECTION:1204,DOM_API_VIOLATION:1205,FILE_NOT_FOUND:1301,FILE_READ_ERROR:1302,INVALID_FILE_PATH:1303,PERMISSION_DENIED:1304,INVALID_CONFIG:1401,MISSING_REQUIRED_CONFIG:1402,DEPRECATED_CONFIG:1403,COMPONENT_NOT_FOUND:1501,INVALID_PROPS:1502,COMPONENT_RENDER_ERROR:1503,FILTER_NOT_FOUND:1601,INVALID_FILTER_ARGS:1602,EXPRESSION_TIMEOUT:1603};function S(q){for(let[J,Q]of Object.entries(w))if(Q===q)return J;return}x();import wq from"path";var m={showRelativePaths:!1,enableAutoRecovery:O(),logRecoveryWarnings:!0},D={...m};function Fq(q){D={...D,...q}}function _(){return{...D}}function jq(){D={...m}}function T(q){if(!D.showRelativePaths||!q)return q;let J=D.baseDir||process.cwd();try{let Q=wq.relative(J,q);return Q.startsWith("..")?q:Q}catch{return q}}class U extends Error{code;filePath;line;column;context;numericCode;constructor(q,J,Q,Z,$,Y,V){super(q);this.code=J;this.filePath=Q;this.line=Z;this.column=$;this.context=Y;if(this.name="StxError",this.numericCode=V||w.EVALUATION_ERROR,this.filePath)this.filePath=T(this.filePath)}}class c extends U{constructor(q,J,Q,Z,$,Y){super(q,"stx_SYNTAX_ERROR",J,Q,Z,$,Y||w.INVALID_DIRECTIVE_SYNTAX);this.name="StxSyntaxError"}}class d extends U{constructor(q,J,Q,Z,$,Y){super(q,"stx_RUNTIME_ERROR",J,Q,Z,$,Y||w.EVALUATION_ERROR);this.name="StxRuntimeError"}}class p extends U{constructor(q,J,Q,Z,$,Y){super(q,"stx_SECURITY_ERROR",J,Q,Z,$,Y||w.UNSAFE_EXPRESSION);this.name="StxSecurityError"}}class l extends U{constructor(q,J,Q,Z,$,Y){super(q,"stx_FILE_ERROR",J,Q,Z,$,Y||w.FILE_NOT_FOUND);this.name="StxFileError"}}class o extends U{isFatal=!0;constructor(q,J,Q,Z,$,Y){super(q,"stx_VALIDATION_ERROR",J,Q,Z,$,Y||w.DOM_API_VIOLATION);this.name="StxValidationError"}}function C(q){let{type:J,message:Q,code:Z,filePath:$,line:Y,column:V,template:X,offset:H,snippet:G,suggestion:B,format:W="text"}=q,M=Y,I=V;if(!M&&X&&H!==void 0){let E=r(X,H);M=E.line,I=E.column}let j=$?T($):void 0,Vq=Z?S(Z):void 0,K={type:J,code:Z,codeName:Vq,message:Q,filePath:j,line:M,column:I,snippet:G,suggestion:B,timestamp:new Date().toISOString()},k;switch(W){case"html":k=Dq(K);break;case"json":k=JSON.stringify(K,null,2);break;case"console":k=Kq(K,X,H);break;case"text":default:k=Uq(K,X,H);break}return{formatted:k,data:K}}function Uq(q,J,Q){let Z=[],$=q.code?` [${q.codeName||q.code}]`:"";if(Z.push(`[${q.type} Error${$}]`),q.filePath){let Y=q.filePath;if(q.line){if(Y+=`:${q.line}`,q.column)Y+=`:${q.column}`}Z.push(`at ${Y}`)}if(Z.push(`
4
+ ${q.message}`),J&&q.line){let Y=kq(J,q.line,2);if(Y)Z.push(`
5
+ ${Y}`)}if(q.snippet)Z.push(`
6
+ Snippet: ${q.snippet}`);if(q.suggestion)Z.push(`
7
+ Suggestion: ${q.suggestion}`);return Z.join(" ")}function Dq(q){let J=q.code?` [${q.code}]`:"",Q=q.filePath?` in ${q.filePath}${q.line?`:${q.line}`:""}`:"",Z=`<!-- [${q.type} Error${J}]${Q}: ${s(q.message)}`;if(q.suggestion)Z+=` | Suggestion: ${s(q.suggestion)}`;return Z+=" -->",Z}function Kq(q,J,Q){let G=[],B=q.code?` [${q.codeName||q.code}]`:"";if(G.push(`\x1B[1m${"\x1B[31m"}\u2501\u2501\u2501 ${q.type} Error${B} \u2501\u2501\u2501${"\x1B[0m"}`),q.filePath){let W=`\x1B[36m${q.filePath}\x1B[0m`;if(q.line){if(W+=`\x1B[90m:${q.line}\x1B[0m`,q.column)W+=`\x1B[90m:${q.column}\x1B[0m`}G.push(`
8
+ \x1B[90mat\x1B[0m ${W}`)}if(G.push(`
9
+
10
+ ${q.message}`),J&&q.line){let W=Oq(J,q.line,2);if(W)G.push(`
11
+
12
+ \x1B[90mContext:\x1B[0m
13
+ ${W}`)}if(q.suggestion)G.push(`
14
+
15
+ \x1B[33mSuggestion:\x1B[0m ${q.suggestion}`);return G.push(`
16
+ ${"\x1B[31m"}\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501${"\x1B[0m"}`),G.join("")}function kq(q,J,Q){let Z=q.split(`
17
+ `),$=Math.max(0,J-Q-1),Y=Math.min(Z.length-1,J+Q-1),V=[];for(let X=$;X<=Y;X++){let H=(X+1).toString().padStart(4),G=X===J-1?">":" ";V.push(`${G}${H} | ${Z[X]}`)}return V.join(`
18
+ `)}function Oq(q,J,Q){let Z=q.split(`
19
+ `),$=Math.max(0,J-Q-1),Y=Math.min(Z.length-1,J+Q-1),V="\x1B[90m",X="\x1B[31m",H="\x1B[0m",G=[];for(let B=$;B<=Y;B++){let W=(B+1).toString().padStart(4),M=B===J-1,I=M?"\x1B[31m>\x1B[0m":" ",j=M?`\x1B[31m${Z[B]}\x1B[0m`:`\x1B[90m${Z[B]}\x1B[0m`;G.push(`${I}\x1B[90m${W}\x1B[0m | ${j}`)}return G.join(`
20
+ `)}function s(q){return q.replace(/--/g,"- -").replace(/>/g,"&gt;")}function r(q,J){let Z=q.substring(0,J).split(`
21
+ `);return{line:Z.length,column:Z[Z.length-1].length}}function zq(q,J,Q){return C({type:q,message:J,code:Q,format:"html"}).formatted}function Lq(q,J,Q,Z,$){return C({type:q,message:J,code:$,filePath:Q,line:Z,format:"console"}).formatted}function _q(q,J,Q){let Z=Q.template.split(`
22
+ `),$=r(Q.template,Q.offset),Y=`[${q} Error at line ${$.line} in ${Q.filePath}]: ${J}
23
+
24
+ `,V=Math.max(0,$.line-3),X=Math.min(Z.length-1,$.line+2);Y+=`Context:
25
+ `;for(let H=V;H<=X;H++){let G=H+1,B=Z[H]||"",W=H===$.line-1?">":" ";Y+=`${W} ${G.toString().padStart(3)}: ${B}
26
+ `}if($.line-1<Z.length){let H=" ".repeat($.column+5);Y+=`${H}^
27
+ `}return Y}function Tq(q,J,Q){try{return q()}catch(Z){if(Q&&Z instanceof Error)Q(Z);return J}}async function Nq(q,J,Q){try{return await q()}catch(Z){if(Q&&Z instanceof Error)Q(Z);return J}}x();var Aq={isEnabled(){return _().enableAutoRecovery},fixCommonSyntaxErrors(q){let J=_();if(!J.enableAutoRecovery)return{fixed:q,fixes:[]};let Q=q,Z=[],$=(Q.match(/\{\{/g)||[]).length,Y=(Q.match(/\}\}/g)||[]).length;if($>Y){let X=$-Y;Q+="}}".repeat(X),Z.push(`Added ${X} missing closing braces '}}'`)}let V=["if","foreach","for","switch","section"];for(let X of V){let H=(Q.match(new RegExp(`@${X}\\b`,"g"))||[]).length,G=(Q.match(new RegExp(`@end${X}\\b`,"g"))||[]).length;if(H>G){let B=H-G;for(let W=0;W<B;W++)Q+=`
28
+ @end${X}`;Z.push(`Added ${B} missing @end${X}`)}}if(Z.length>0&&J.logRecoveryWarnings)console.warn("[stx] Auto-recovery applied fixes:"),Z.forEach((X)=>console.warn(` - ${X}`)),console.warn(" Consider fixing these issues in your template.");return{fixed:Q,fixes:Z}},createFallbackContent(q,J){if(O())return`<!-- ${q} failed: ${J.message} -->`;return"<!-- stx rendering error -->"}};class P{errors=[];maxErrors;enableFileLogging;logFilePath;logFormat;maxFileSize;maxLogFiles;minLevel;writeQueue=Promise.resolve();constructor(q={}){this.maxErrors=q.maxErrors??1000,this.enableFileLogging=q.enableFileLogging??!1,this.logFilePath=q.logFilePath??".stx/errors.log",this.logFormat=q.logFormat??"json",this.maxFileSize=q.maxFileSize??10485760,this.maxLogFiles=q.maxLogFiles??5,this.minLevel=q.minLevel??"all"}configure(q){if(q.maxErrors!==void 0)this.maxErrors=q.maxErrors;if(q.enableFileLogging!==void 0)this.enableFileLogging=q.enableFileLogging;if(q.logFilePath!==void 0)this.logFilePath=q.logFilePath;if(q.logFormat!==void 0)this.logFormat=q.logFormat;if(q.maxFileSize!==void 0)this.maxFileSize=q.maxFileSize;if(q.maxLogFiles!==void 0)this.maxLogFiles=q.maxLogFiles;if(q.minLevel!==void 0)this.minLevel=q.minLevel}log(q,J,Q="error"){let Z={timestamp:new Date,error:q,context:J,level:Q};if(this.errors.push(Z),this.errors.length>this.maxErrors)this.errors=this.errors.slice(-this.maxErrors);if(this.enableFileLogging&&this.shouldLog(Q))this.writeToFile(Z)}shouldLog(q){if(this.minLevel==="all")return!0;if(this.minLevel==="warning")return q==="error"||q==="warning";if(this.minLevel==="error")return q==="error";return!0}formatEntry(q){if(this.logFormat==="json")return JSON.stringify({timestamp:q.timestamp.toISOString(),level:q.level||"error",type:q.error.constructor.name,message:q.error.message,stack:q.error.stack,context:q.context});let J=[`[${q.timestamp.toISOString()}] [${(q.level||"error").toUpperCase()}] ${q.error.constructor.name}: ${q.error.message}`];if(q.error.stack)J.push(` Stack: ${q.error.stack.split(`
29
+ `).slice(1).join(`
30
+ `)}`);if(q.context)J.push(` Context: ${JSON.stringify(q.context)}`);return J.join(`
31
+ `)}writeToFile(q){this.writeQueue=this.writeQueue.then(async()=>{try{let J=await import("fs"),Z=(await import("path")).dirname(this.logFilePath);if(!J.existsSync(Z))J.mkdirSync(Z,{recursive:!0});await this.rotateIfNeeded(J);let $=`${this.formatEntry(q)}
32
+ `;J.appendFileSync(this.logFilePath,$,"utf-8")}catch(J){if(process.env.STX_DEBUG==="true")console.error("Failed to write to error log:",J)}})}async rotateIfNeeded(q){try{if(!q.existsSync(this.logFilePath))return;if(q.statSync(this.logFilePath).size<this.maxFileSize)return;for(let Q=this.maxLogFiles-1;Q>=1;Q--){let Z=`${this.logFilePath}.${Q}`,$=`${this.logFilePath}.${Q+1}`;if(q.existsSync(Z))if(Q>=this.maxLogFiles-1)q.unlinkSync(Z);else q.renameSync(Z,$)}if(this.maxLogFiles<=1)q.writeFileSync(this.logFilePath,"");else q.renameSync(this.logFilePath,`${this.logFilePath}.1`)}catch(J){if(process.env.STX_DEBUG==="true")console.error("Failed to rotate error logs:",J)}}getRecentErrors(q=10){return this.errors.slice(-q)}getErrorsByType(q){return this.errors.filter((J)=>J.error.constructor.name===q)}getErrorsByLevel(q){return this.errors.filter((J)=>J.level===q)}clear(){this.errors.length=0}async clearLogFile(){try{let q=await import("fs");if(q.existsSync(this.logFilePath))q.writeFileSync(this.logFilePath,"","utf-8")}catch(q){if(process.env.STX_DEBUG==="true")console.error("Failed to clear error log:",q)}}getStats(){let q={},J={error:0,warning:0,info:0};for(let Q of this.errors){let Z=Q.error.constructor.name;q[Z]=(q[Z]||0)+1;let $=Q.level||"error";J[$]=(J[$]||0)+1}return{total:this.errors.length,byType:q,byLevel:J}}async exportToFile(q,J="json"){let Q=await import("fs"),$=(await import("path")).dirname(q);if(!Q.existsSync($))Q.mkdirSync($,{recursive:!0});if(J==="json"){let Y=this.errors.map((V)=>({timestamp:V.timestamp.toISOString(),level:V.level||"error",type:V.error.constructor.name,message:V.error.message,stack:V.error.stack,context:V.context}));Q.writeFileSync(q,JSON.stringify(Y,null,2),"utf-8")}else{let Y=this.errors.map((V)=>this.formatEntry(V));Q.writeFileSync(q,Y.join(`
33
+
34
+ `),"utf-8")}}async flush(){await this.writeQueue}}var Rq=new P,bq={isDevelopment(){return O()},logDetailedError(q,J){if(!this.isDevelopment())return;if(console.error("=== stx Detailed Error ==="),console.error("Error:",q.message),console.error("Stack:",q.stack),J)console.error("Context:",J);console.error("========================")},createErrorReport(q,J){let Q=["=== stx Error Report ===",`Time: ${new Date().toISOString()}`,`Error: ${q.message}`,`Type: ${q.constructor.name}`,`Stack: ${q.stack}`];if(J)Q.push(`Context: ${JSON.stringify(J,null,2)}`);return Q.push("========================"),Q.join(`
35
+ `)}};import g from"path";var v={isValidFilePath(q,J){let Q=q.replace(/\\/g,"/");if(Q.includes("\x00"))return!1;if(Q.includes("../")||Q.includes("..\\")||Q===".."||Q.startsWith("../")||Q.endsWith("/..")||Q.includes("/..\\")||Q.includes("\\../"))return!1;if(/^[a-z][a-z0-9+.-]*:/i.test(Q))return!1;if(Q.startsWith("/")){if(["/etc/","/root/","/var/","/usr/","/bin/","/sbin/","/proc/","/sys/","/dev/","/boot/","/home/","/private/","/Library/","/System/"].some((Y)=>Q===Y.slice(0,-1)||Q.startsWith(Y)))return!1}if(/^[a-z]:/i.test(Q)){if(["Windows/","Windows\\","System32/","System32\\","Program Files/","Program Files\\"].some((Y)=>Q.includes(Y)))return!1}if(J){let $=g.resolve(J,q),Y=g.resolve(J);if(!$.startsWith(Y+g.sep)&&$!==Y)return!1}return!0},isValidVariableName(q){return/^[a-z_$]\w*$/i.test(q)},isValidDirectiveName(q){return/^[a-z][\w-]*$/i.test(q)},isSafeContent(q){return![/<script[^>]*>[\s\S]*?<\/script>/i,/javascript:/i,/data:text\/html/i,/vbscript:/i,/on\w+\s*=/i].some((Q)=>Q.test(q))}};function Sq(q){let J={"&":"&amp;","<":"&lt;",">":"&gt;",'"':"&quot;","'":"&#39;"};return q.replace(/[&<>"']/g,(Q)=>J[Q]||Q)}function N(q,J={}){let{allowHtml:Q=!1,maxLength:Z=1e4,allowSpecialChars:$=!0,customSanitizer:Y}=J,V=[],X=q,H=!1;if(Y){let B=Y(X);if(B!==X)X=B,H=!0}if(X.includes("\x00"))X=X.replace(/\0/g,""),H=!0,V.push("Null bytes removed from parameter");if(X.length>Z)X=X.substring(0,Z),H=!0,V.push(`Parameter truncated to ${Z} characters`);if(!Q&&/<[^>]+>/.test(X))X=Sq(X),H=!0,V.push("HTML content was escaped");let G=[{pattern:/javascript:/gi,replacement:"",name:"javascript: URI"},{pattern:/vbscript:/gi,replacement:"",name:"vbscript: URI"},{pattern:/data:text\/html/gi,replacement:"",name:"data:text/html URI"}];for(let{pattern:B,replacement:W,name:M}of G)if(B.test(X))X=X.replace(B,W),H=!0,V.push(`Removed ${M} from parameter`);if(!$){let B=X;if(X=X.split("").filter((W)=>{let M=W.charCodeAt(0);return M>=32&&M!==127}).join(""),X!==B)H=!0,V.push("Control characters removed")}return{value:X,modified:H,warnings:V}}function Cq(q,J){let Q=q.replace(/\0/g,"");Q=Q.replace(/\\/g,"/"),Q=Q.replace(/^[a-z][a-z0-9+.-]*:/i,"");while(Q.includes("../")||Q.includes("./"))Q=Q.replace(/\.\.\//g,"").replace(/\.\//g,"");if(!v.isValidFilePath(Q,J))return null;return Q}function Pq(q){let J=[],Q=q.trim(),Z=Q!==q,$=[{pattern:/\beval\s*\(/gi,name:"eval()"},{pattern:/\bFunction\s*\(/gi,name:"Function()"},{pattern:/\bsetTimeout\s*\(/gi,name:"setTimeout()"},{pattern:/\bsetInterval\s*\(/gi,name:"setInterval()"},{pattern:/\bimport\s*\(/gi,name:"dynamic import()"},{pattern:/\brequire\s*\(/gi,name:"require()"},{pattern:/\b__proto__\b/gi,name:"__proto__"},{pattern:/\bconstructor\b/gi,name:"constructor"},{pattern:/\bprototype\b/gi,name:"prototype"}];for(let{pattern:Y,name:V}of $)if(Y.test(Q))J.push(`Potentially dangerous pattern detected: ${V}`);if(Q.includes("\x00"))Q=Q.replace(/\0/g,""),Z=!0,J.push("Null bytes removed from expression");return{value:Q,modified:Z,warnings:J}}function gq(q,J={}){return q.map((Q)=>N(Q,J))}function n(q){let J={};for(let[Q,Z]of Object.entries(q)){if(!v.isValidVariableName(Q))continue;if(typeof Z==="string"){let $=N(Z);J[Q]=$.value}else if(Array.isArray(Z))J[Q]=Z.map(($)=>typeof $==="string"?N($).value:$);else if(typeof Z==="object"&&Z!==null)J[Q]=n(Z);else J[Q]=Z}return J}var vq={maxSanitizeDepth:10,allowBracketNotation:!1},qq={...vq};var R=/\bnew\s+/,b="__stx_safe_ctors",Jq=[/\b(eval|Function|setTimeout|setInterval|setImmediate)\b/,/\b(process|require|import|exports|module)\b/,/\b(window|document|global|globalThis)\b/,/\b(constructor|prototype|__proto__)\b/,/\b(Reflect|Proxy)\b/,/\bSymbol\b/,/\b(WeakMap|WeakSet|WeakRef|FinalizationRegistry)\b/,/\b(Generator|AsyncGenerator)\b/,/__\w+__/,/\.(bind|call|apply)\s*\(/,R,/\bdelete\s+/,/\bthis\b/],hq=new Set(["eval","Function","setTimeout","setInterval","setImmediate","process","require","import","exports","module","window","document","global","globalThis","constructor","prototype","Reflect","Proxy","Symbol","WeakMap","WeakSet","WeakRef","FinalizationRegistry","Generator","AsyncGenerator","delete","this",b]),Qq=new Set(["__proto__","constructor","prototype"]),yq=/[\w)\]]\s*\[\s*['"]/;function Zq(q){let J="",Q=[],Z=null,$=!1;for(let Y=0;Y<q.length;Y++){let V=q[Y];if($){$=!1;continue}if(V==="\\"&&Z){$=!0;continue}if(Z){if(Z==="`"&&V==="$"&&Y+1<q.length&&q[Y+1]==="{"){let X=1;Y+=2;while(Y<q.length&&X>0){if(q[Y]==="{")X++;else if(q[Y]==="}")X--;if(X>0)J+=q[Y],Q.push(Y),Y++}continue}if(V===Z)Z=null;continue}if(V==='"'||V==="'"||V==="`"){Z=V;continue}J+=V,Q.push(Y)}return{text:J,map:Q}}function Eq(q){return Zq(q).text}var $q=["Collator","DateTimeFormat","DisplayNames","ListFormat","Locale","NumberFormat","PluralRules","RelativeTimeFormat","Segmenter"],Yq=(()=>{let q={Date,URL,URLSearchParams},J=Intl;for(let Q of $q)if(typeof J[Q]==="function")q[`Intl_${Q}`]=J[Q];return Object.freeze(Object.assign(Object.create(null),q))})(),uq=/^new(\s+)(Date|URLSearchParams|URL|Intl\s*\.\s*([A-Z_a-z]\w*))\s*\(/,i=/(?<![\w$])new(?![\w$])/g,a=`only new Date(), new URL(), new URLSearchParams() and new Intl.{${$q.join(",")}}() are allowed`;function fq(q){let{text:J,map:Q}=Zq(q),Z=[];i.lastIndex=0;let $;while(($=i.exec(J))!==null){let V=$.index;if(/(?<!\.)\.\s*$/.test(J.slice(0,V)))continue;let X=uq.exec(J.slice(V)),H=X?.[3],G=!X?null:H?`Intl_${H}`:X[2];if(!X||!G||!(G in Yq))throw new F(`matched /${R.source}/; ${a}`,q);let B=V+X[0].length,W=Q[V],M=Q[B-1]+1;if(q.slice(W,M)!==J.slice(V,B))throw new F(`matched /${R.source}/; ${a}`,q);let I=W+3+X[1].length;Z.push({start:I,end:I+X[2].length,key:G})}let Y=q;for(let V=Z.length-1;V>=0;V--){let X=Z[V];Y=`${Y.slice(0,X.start)}${b}.${X.key}${Y.slice(X.end)}`}return{source:Y,usesSafeConstructors:Z.length>0}}class F extends Error{rule;expression;constructor(q,J,Q){super(Q??`Potentially unsafe expression (${q}): ${J}`);this.name="UnsafeExpressionError",this.rule=q,this.expression=J}}function UJ(q){try{return y(q),null}catch(J){return J instanceof F?J.rule:J instanceof Error?J.message:String(J)}}function xq(q,J){let Q=/[$A-Z_a-z][$\w]*/g,Z;while((Z=Q.exec(q))!==null){let $=Z[0],Y=q[Z.index-1];if(hq.has($))throw new F(`matched /\\b${$}\\b/; identifier ${$}`,J);if(Y==="."&&Qq.has($))throw new F(`matched /.${$}/; property ${$}`,J)}}function mq(q){let J=/\[\s*(['"])(.*?)\1\s*\]/g,Q;while((Q=J.exec(q))!==null){let Z=Q[2];if(!Qq.has(Z))continue;let $=q.slice(0,Q.index).match(/\S(?=\s*$)/)?.[0],Y=q.slice(Q.index+Q[0].length).match(/^\s*(\S)/)?.[1];if(!(($==="{"||$===",")&&Y===":"))throw new F(`bracket key ${Q[2]}`,q)}}function y(q){let J=q.trim(),Q=Eq(J);xq(Q,J),mq(J);for(let Z of Jq){if(Z===R)continue;if(Z.test(Q))throw new F(`matched /${Z.source}/`,J)}if(!qq.allowBracketNotation&&yq.test(J))throw new F("bracket notation with a string key; enable with configureSafeEvaluator({ allowBracketNotation: true })",J,`Bracket notation with strings not allowed: ${J}. Enable with configureSafeEvaluator({ allowBracketNotation: true })`);return fq(J)}function cq(q){return y(q),q.trim()}function dq(q){let J={};J.Math=Math,J.JSON=JSON,J.Date=Date,J.String=String,J.Number=Number,J.Boolean=Boolean,J.Array=Array,J.parseInt=Number.parseInt,J.parseFloat=Number.parseFloat,J.isNaN=Number.isNaN,J.isFinite=Number.isFinite,J.encodeURIComponent=encodeURIComponent,J.decodeURIComponent=decodeURIComponent;for(let[Q,Z]of Object.entries(q)){if(Q.startsWith("__")||Jq.some(($)=>$.test(Q)))continue;if(Z&&typeof Z==="object"&&!Array.isArray(Z))J[Q]=h(Z);else J[Q]=Z}return J}function h(q,J=0){if(J>=qq.maxSanitizeDepth)return"[Object too deep]";if(q===null||typeof q!=="object")return q;if(Array.isArray(q))return q.map((Z)=>h(Z,J+1));if(q instanceof Date||q instanceof RegExp||q instanceof Map||q instanceof Set||q instanceof Error)return q;let Q={};for(let[Z,$]of Object.entries(q)){if(Z.startsWith("__")||Z==="constructor"||Z==="prototype")continue;if($&&typeof $==="object")Q[Z]=h($,J+1);else Q[Z]=$}return Q}function pq(q,J){try{let Q=dq(J),Z=Object.keys(Q),$=Object.values(Q);return rq(q,Z)(...$)}catch{return}}function DJ(q){try{return cq(q),!0}catch{return!1}}function KJ(q,J){try{let Q=pq(q,J);if(Q&&typeof Q==="object"&&!Array.isArray(Q))return Q;return{}}catch{return{}}}var Xq=new Set(["break","case","catch","class","const","continue","debugger","default","delete","do","else","enum","export","extends","false","finally","for","function","if","import","in","instanceof","new","null","return","super","switch","this","throw","true","try","typeof","var","void","while","with","yield","let","static","implements","interface","package","private","protected","public","arguments","eval","await"]),lq=2000,A=new Map;function t(q,J){let Q=`${q.join(",")}\x00${J}`,Z=A.get(Q);if(Z)return Z;let $=Function(...q,J);if(A.size>=lq)A.clear();return A.set(Q,$),$}function kJ(q){return q.replace(/'(?:[^'\\]|\\.)*'|"(?:[^"\\]|\\.)*"|`(?:[^`\\]|\\.)*`/g," ").replace(/\??\.\s*[a-zA-Z_$][\w$]*/g," ").replace(/([{,]\s*)[a-zA-Z_$][\w$]*(\s*:)/g,"$1$2").match(/\b[a-zA-Z_$][\w$]*\b/g)||[]}var oq=/^[A-Za-z_$][\w$]*$/;function sq(q){return oq.test(q)&&!Xq.has(q)}function rq(q,J){let{source:Q,usesSafeConstructors:Z}=y(q),$=[];for(let G=0;G<J.length;G++){if(!sq(J[G]))continue;if(J[G]===b)continue;$.push({key:J[G],index:G})}$.sort((G,B)=>G.key.localeCompare(B.key));let Y=$.map((G)=>G.key),V=$.map((G)=>G.index),X=`
36
+ 'use strict';
37
+ try {
38
+ return ${Q};
39
+ }
40
+ catch (e) {
41
+ if (e instanceof TypeError) {
42
+ return undefined;
43
+ }
44
+ throw e;
45
+ }
46
+ `;return nq(Z?(G)=>{let B=t([b,...Y,...G],X);return(...W)=>B(Yq,...W)}:(G)=>t([...Y,...G],X),Y,J,$,V)}function nq(q,J,Q,Z,$){let Y=q([]),V=Z.every((H,G)=>H.index===G);if(J.length===Q.length&&V)return e(Y,J,q);return e((...H)=>{let G=Array($.length);for(let B=0;B<$.length;B++)G[B]=H[$[B]];return Y(...G)},J,q,(H)=>{Y=q(H)})}function e(q,J,Q,Z){let Y=/^(\w+) is not defined$/,V=q,X=[],H=new Set(J);return(...G)=>{for(let B=0;B<=8;B++)try{return V(...G)}catch(W){let M=W instanceof Error?W.message:"",I=Y.exec(M);if(!(W instanceof ReferenceError)||!I)return;let j=I[1];if(H.has(j)||Xq.has(j))return;if(H.add(j),X.push(j),Z)Z(X);else V=Q(X)}return}}function OJ(q){let J=q.trim(),Q=[/\beval\s*\(/i,/\bFunction\s*\(/i,/\bimport\s*\(/i,/\brequire\s*\(/i,/\bprocess\b/i,/\b__proto__\b/i,/\bconstructor\s*[.(]/i,/\bglobalThis\b/i,/\bwindow\b/i,/\bdocument\b/i,/\bfetch\s*\(/i,/\bBun\b/i,/\bDeno\b/i,/\bconsole\b/i,/\bthis\b/i,/\bReflect\b/i,/\bProxy\b/i,/\bprototype\b/i,/\.(bind|call|apply)\s*\(/i];for(let Z of Q)if(Z.test(J))return!1;return!0}
47
+ export{Hq as Du,Bq as Eu,Wq as Fu,Mq as Gu,f as Hu,Iq as Iu,w as Ju,S as Ku,Fq as Lu,_ as Mu,jq as Nu,T as Ou,U as Pu,c as Qu,d as Ru,p as Su,l as Tu,o as Uu,C as Vu,zq as Wu,Lq as Xu,_q as Yu,Tq as Zu,Nq as _u,Aq as $u,P as av,Rq as bv,bq as cv,v as dv,N as ev,Cq as fv,Pq as gv,gq as hv,n as iv,UJ as jv,cq as kv,dq as lv,pq as mv,DJ as nv,KJ as ov,kJ as pv,sq as qv,rq as rv,OJ as sv};
@@ -1,3 +1,3 @@
1
1
  // @bun
2
- import{xg as I}from"./chunk-0knxnyq6.js";import{yr as H}from"./chunk-508xtkyq.js";import{Tw as G}from"./chunk-myyj9qp3.js";import L from"path";async function Q(k={}){let J=performance.now(),A=k.root||process.cwd(),j=await H(A),B=k.ssr?.routeRules??j.routeRules??{};if(I(B),!j.ssr&&Object.keys(B).length)throw Error("routeRules require ssr: true and the production server; flat SSG output cannot apply request/cache policies");if(!j.ssr&&(k.ssr?.serverApi??j.serverApi))throw Error("serverApi requires ssr: true; flat SSG output cannot execute API endpoints");let q=j.ssr?"ssr":"ssg";console.log(`[stx build] Mode: ${q.toUpperCase()}${j.ssr?" (ssr: true in stx.config.ts)":" (default \u2014 ssr is false)"}`);let D,E;if(q==="ssg"){let{generateStaticSite:z}=await import("./ssg.js");D=await z({pagesDir:L.join(j.root||".",j.pagesDir||j.build?.pagesDir||"pages"),publicDir:j.publicDir||j.build?.publicDir||"public",outputDir:j.build?.outputDir||"dist",generate404:j.build?.generate404??!0,minify:j.build?.minify??!0,cleanOutput:j.build?.cleanOutput??!0,router:j.router,...k.ssg})}else{let{buildForProduction:z}=await import("./chunk-8nqkzq6v.js");E=await z({root:A,outputDir:".output",debug:k.debug,...k.ssr})}let K=Math.round(performance.now()-J);return{mode:q,ssg:D,ssr:E,duration:K}}
2
+ import{xg as I}from"./chunk-0knxnyq6.js";import{yr as H}from"./chunk-wgsmawhw.js";import{Uw as G}from"./chunk-1rdm5y91.js";import L from"path";async function Q(k={}){let J=performance.now(),A=k.root||process.cwd(),j=await H(A),B=k.ssr?.routeRules??j.routeRules??{};if(I(B),!j.ssr&&Object.keys(B).length)throw Error("routeRules require ssr: true and the production server; flat SSG output cannot apply request/cache policies");if(!j.ssr&&(k.ssr?.serverApi??j.serverApi))throw Error("serverApi requires ssr: true; flat SSG output cannot execute API endpoints");let q=j.ssr?"ssr":"ssg";console.log(`[stx build] Mode: ${q.toUpperCase()}${j.ssr?" (ssr: true in stx.config.ts)":" (default \u2014 ssr is false)"}`);let D,E;if(q==="ssg"){let{generateStaticSite:z}=await import("./ssg.js");D=await z({pagesDir:L.join(j.root||".",j.pagesDir||j.build?.pagesDir||"pages"),publicDir:j.publicDir||j.build?.publicDir||"public",outputDir:j.build?.outputDir||"dist",generate404:j.build?.generate404??!0,minify:j.build?.minify??!0,cleanOutput:j.build?.cleanOutput??!0,router:j.router,...k.ssg})}else{let{buildForProduction:z}=await import("./chunk-etyqf0vg.js");E=await z({root:A,outputDir:".output",debug:k.debug,...k.ssr})}let K=Math.round(performance.now()-J);return{mode:q,ssg:D,ssr:E,duration:K}}
3
3
  export{Q as Ve};
@@ -299,4 +299,4 @@ catch (error) {
299
299
  }
300
300
  })();
301
301
  </script>`}var N={name:"pwa.installButton",handler:(j,z,k,E)=>{let q=k.__stx_options||{};return H(j,q)},hasEndTag:!0,description:"Renders a PWA install prompt button that appears when the app can be installed"},Q={name:"pwa.updatePrompt",handler:(j,z,k,E)=>{let q=k.__stx_options||{};return J(j,q)},hasEndTag:!0,description:"Renders a PWA update notification UI when a new version is available"},T={name:"pwa.offlineIndicator",handler:(j,z,k,E)=>{let q=k.__stx_options||{};return L(j,q)},hasEndTag:!0,description:"Renders an offline status indicator that shows when the user loses connection"},V={name:"pwa.pushSubscribe",handler:(j,z,k,E)=>{let q=k.__stx_options||{};return M(j,q)},hasEndTag:!0,description:"Renders a push notification subscription button"},X=[N,Q,T,V];function Z(j){return[...j,...X]}
302
- export{N as Kw,Q as Lw,T as Mw,V as Nw,X as Ow,Z as Pw};
302
+ export{N as Hw,Q as Iw,T as Jw,V as Kw,X as Lw,Z as Mw};
@@ -1,2 +1,2 @@
1
1
  // @bun
2
- import{$j as d,Yj as a,Zj as b,_j as c}from"./chunk-x21hdhjw.js";import"./chunk-myyj9qp3.js";export{d as default,c as createHotReloadServer,b as compileToNative,a as NATIVE_COMPONENTS};
2
+ import{$j as d,Yj as a,Zj as b,_j as c}from"./chunk-x21hdhjw.js";import"./chunk-1rdm5y91.js";export{d as default,c as createHotReloadServer,b as compileToNative,a as NATIVE_COMPONENTS};
@@ -0,0 +1,30 @@
1
+ // @bun
2
+ import{$m as c,Cm as P,Do as i,Fp as h,Jo as T,Lm as k,an as l,sm as R,tm as O}from"./chunk-wgsmawhw.js";import{Qs as S,Ss as y}from"./chunk-fx32tvka.js";import{Cw as ZJ,Fw as $J,Gw as UJ}from"./chunk-h5pdcxre.js";import{Ow as m,Qw as YJ}from"./chunk-kt6wm51e.js";import{Rw as XJ,Uw as q}from"./chunk-1rdm5y91.js";var r=/\b(?:state|derived|effect|batch|ref|reactive|computed|watch|watchEffect)\s*(?:<[^>]*>)?\s*\(/;function s(J,Y,Q){let X={fullTag:Q,content:Y,attrs:J};if(/\bserver\b/.test(J))return{...X,type:"server"};if(/\bdata-stx-scoped\b/.test(J))return{...X,type:"client"};if(r.test(Y))return{...X,type:"signals"};if(/\bclient\b/.test(J)||/\btype\s*=\s*["']module["']/.test(J)||/\bsrc\s*=/.test(J))return{...X,type:"client"};return{...X,type:"server"}}var o=/^<script\b([^>]*)>([\s\S]*)<\/script\s*>$/i;function C(J){let Y=[],Q=[],X=[],$=0;while($<J.length){let Z=J.indexOf("<",$);if(Z===-1)break;let U=y(J,Z);if(U>Z){$=U;continue}let W=S(J,Z);if(W>Z){let j=J.slice(Z,W),F=o.exec(j);if(F){let K=s(F[1],F[2],j);switch(K.type){case"signals":Y.push(K);break;case"client":Q.push(K);break;case"server":X.push(K);break}}$=W;continue}$=Z+(J.startsWith("<!--",Z)?4:1)}return{signals:Y,client:Q,server:X}}var a=new Set(["area","base","br","col","embed","hr","img","input","link","meta","param","source","track","wbr"]);function t(J){let Y=[],Q=/<!--[\s\S]*?(?:-->|$)|<(script|style|textarea|title|template)\b[^>]*>[\s\S]*?<\/\1\s*>/gi,X;while((X=Q.exec(J))!==null)Y.push({start:X.index,end:X.index+X[0].length});return Y}function v(J,Y){return Y.some((Q)=>J>=Q.start&&J<Q.end)}function e(J){let Y=(J||"").trim();if(!Y)return null;if(/[\s>+~,:]/.test(Y))return null;let Q={},X=Y,$=X.match(/^[a-z][\w-]*/i);if($)Q.tag=$[0].toLowerCase(),X=X.slice($[0].length);while(X.length>0){let Z=X.match(/^\[([\w-]+)(?:=(["']?)([^\]"']*)\2)?\]/);if(Z){if(Q.attr=Z[1],Z[3]!==void 0&&Z[3]!=="")Q.attrValue=Z[3];X=X.slice(Z[0].length);continue}let U=X.match(/^#([\w-]+)/);if(U){Q.id=U[1],X=X.slice(U[0].length);continue}let W=X.match(/^\.([\w-]+)/);if(W){Q.className=W[1],X=X.slice(W[0].length);continue}return null}if(!Q.tag&&!Q.attr&&!Q.id&&!Q.className)return null;return Q}function JJ(J,Y){if(Y.attr){if(!(Y.attrValue===void 0?new RegExp(`\\b${Y.attr}(?=[\\s=>/]|$)`,"i"):new RegExp(`\\b${Y.attr}\\s*=\\s*(["'])\\s*${Y.attrValue}\\s*\\1`,"i")).test(J))return!1}if(Y.id){if(!new RegExp(`\\bid\\s*=\\s*(["'])\\s*${Y.id}\\s*\\1`,"i").test(J))return!1}if(Y.className){let Q=J.match(/\bclass\s*=\s*(["'])([\s\S]*?)\1/i);if(!Q)return!1;if(!Q[2].split(/\s+/).includes(Y.className))return!1}return!0}function x(J,Y="main"){let Q=e(Y);if(!Q)return null;let X=/<([a-z][\w-]*)\b([^>]*)>/gi,$=t(J),Z;while((Z=X.exec(J))!==null){if(v(Z.index,$))continue;let U=Z[1].toLowerCase(),W=Z[2]||"";if(W.trimEnd().endsWith("/")||a.has(U))continue;if(Q.tag&&Q.tag!==U)continue;if(!JJ(W,Q))continue;let j=Z[0],F=Z.index+j.length,K=new RegExp(`<(/?)${U}\\b([^>]*)>`,"gi");K.lastIndex=F;let G=1,B;while((B=K.exec(J))!==null){if(v(B.index,$))continue;let w=B[1]==="/";if(!w&&(B[2]||"").trimEnd().endsWith("/"))continue;if(G+=w?-1:1,G===0)return{openTag:j,openIndex:Z.index,start:F,end:B.index,tagName:U}}return null}return null}var _J="X-STX-Router",AJ="private, no-store";function IJ(J){return J.replace(/&#(\d+);/g,(Y,Q)=>f(Number(Q),Y)).replace(/&#x([0-9a-f]+);/gi,(Y,Q)=>f(Number.parseInt(Q,16),Y)).replace(/&lt;/g,"<").replace(/&gt;/g,">").replace(/&quot;/g,'"').replace(/&apos;/g,"'").replace(/&amp;/g,"&")}function f(J,Y){if(!Number.isInteger(J)||J<0||J>1114111)return Y;try{return String.fromCodePoint(J)}catch{return Y}}function g(J){return J.headers.get("X-STX-Router")==="true"}function QJ(J,Y){if(!J)return Y;return J.split(",").some((X)=>X.trim().toLowerCase()===Y.toLowerCase())?J:`${J}, ${Y}`}function HJ(J){return{Vary:QJ(J,"X-STX-Router")}}import E from"path";YJ();ZJ();var WJ="stx-page-head:",jJ=/<!--stx-page-head:([A-Za-z0-9+/=]+)-->\n?/,D={dev:null,prod:null};function KJ(){let J=m()?"dev":"prod",Y=D[J];if(Y!==null)return Y;try{let Q=(UJ(),XJ($J)),X=J==="dev"&&typeof Q.getRouterScriptDev==="function"?Q.getRouterScriptDev:Q.getRouterScript;D[J]=`<script>${X()}</script>`}catch{D[J]=""}return D[J]}async function PJ(J,Y){if(Y===!1)return null;if(Y&&typeof Y==="string"){let X=E.resolve(J,Y);if(await Bun.file(X).exists())return X;return null}let Q=E.join(J,"app.stx");if(await Bun.file(Q).exists())return Q;return null}async function kJ(J,Y){try{let Q=await Bun.file(J).text(),X=Q,$=Q.match(/<template\b[^>]*>([\s\S]*?)<\/template>/i);if($)X=$[1].trim();let Z=C(Q),U=[...Z.client.map((V)=>V.fullTag),...Z.signals.map((V)=>V.fullTag)],W=[],j=/<style\b[^>]*>([\s\S]*?)<\/style>/gi,F;while((F=j.exec(Q))!==null)W.push(F[0]);let K=X;for(let V of Z.server)K=K.replace(V.fullTag,"");for(let V of Z.client)K=K.replace(V.fullTag,"");K=K.replace(/<style\b[^>]*>[\s\S]*?<\/style>/gi,"");let G="<!--__STX_PAGE_SLOT__-->";if(K=K.replace(/<slot\s*\/>/gi,G).replace(/<slot\s*>\s*<\/slot>/gi,G),!K.includes(G))return console.warn(`[stx] Shell ${J} has no <slot /> \u2014 pages won't be injected`),null;let{processDirectives:B,extractVariables:w,defaultConfig:N,loadStxConfig:A}=await import("./chunk-5yrc8emq.js"),I=await A(),z={__filename:J,__dirname:E.dirname(J)};for(let V of U){let L=V.match(/<script\b[^>]*>([\s\S]*?)<\/script>/i);if(L&&!V.includes("client")&&!V.includes('type="module"'))await w(L[1],z,J)}let _=await B(K,z,J,{...N,...I,...Y},new Set),H=_.indexOf(G);if(H===-1)return console.warn("[stx] Shell slot placeholder lost during processing"),null;return{beforeSlot:_.substring(0,H),afterSlot:_.substring(H+G.length),filePath:J,shellScripts:U,shellStyles:W}}catch(Q){return console.error(`[stx] Error processing shell ${J}:`,Q),null}}function TJ(J,Y,Q){let X,$="",Z=Y.match(jJ);if(Z){Y=Y.replace(Z[0],"");try{let K=Buffer.from(Z[1],"base64").toString("utf8"),G=K.match(/<title[^>]*>([\s\S]*?)<\/title>/i);if(G)X=G[1].trim();$=K.replace(/<title[^>]*>[\s\S]*?<\/title>/i,"").trim()}catch{}}let U=Q||X||"stx App",W=KJ(),j="<script>window.__stxRouterConfig={container:'[data-stx-content]'};</script>";return`<!DOCTYPE html>
3
+ <html lang="en">
4
+ <head>
5
+ <meta charset="UTF-8">
6
+ <meta name="viewport" content="width=device-width, initial-scale=1.0">
7
+ <title>${U}</title>
8
+ ${$?` ${$}
9
+ `:""} ${J.shellStyles.join(`
10
+ `)}
11
+ </head>
12
+ <body>
13
+ ${J.beforeSlot}
14
+ <div data-stx-content>${Y}</div>
15
+ ${J.afterSlot}
16
+ ${J.shellScripts.filter((K)=>!K.includes("server")).join(`
17
+ `)}
18
+ ${j}
19
+ ${W}
20
+ </body>
21
+ </html>`}function FJ(J,Y={}){let Q=J.trim();if(!h(Q))return J;let X=[],$=Q.match(/<head\b[^>]*>([\s\S]*?)<\/head>/i);if($){let j=$[1],F=/<style\b[^>]*>[\s\S]*?<\/style>/gi,K;while((K=F.exec(j))!==null)X.push(K[0]);let G=j.match(/<script\b[^>]*data-stx-server-data[^>]*>[\s\S]*?<\/script>/i);if(G)X.push(G[0]);let B=j.match(/<script\b[^>]*data-stx-runtime-config[^>]*>[\s\S]*?<\/script>/i);if(B)X.push(B[0])}if(Y.preserveHead&&$){let j=[],F=/<title\b[^>]*>[\s\S]*?<\/title>|<meta\b[^>]*>|<link\b[^>]*>/gi,K;while((K=F.exec($[1]))!==null){if(/<meta\b[^>]*(?:\bcharset|name="viewport")/i.test(K[0]))continue;j.push(K[0])}if(j.length>0)X.unshift(`<!--${WJ}${Buffer.from(j.join(`
22
+ `),"utf8").toString("base64")}-->`)}let Z=Q.match(/<body\b[^>]*>/i),U=Q.lastIndexOf("</body>");if(Z&&U!==-1){let j=Z.index+Z[0].length,F=Q.slice(j,U).trim();if(X.length>0)return X.join(`
23
+ `)+`
24
+ `+F;return F}let W=Q;if(W=W.replace(/<!DOCTYPE\b[^>]*>/i,""),W=W.replace(/<html\b[^>]*>/i,""),W=W.replace(/<\/html\s*>/i,""),$)W=W.replace(/<head\b[^>]*>[\s\S]*?<\/head>/i,X.join(`
25
+ `));return W=W.replace(/<body\b[^>]*>/i,""),W=W.replace(/<\/body\s*>/i,""),W.trim()}var u=/^<script\b[^>]*\sdata-stx-(?:owner|instance)(?=[\s=/>])/i;function SJ(J){return g(J)}function yJ(J,Y="main"){let Q=J.trim(),X=[],$=[],Z=Q.match(/<head\b[^>]*>([\s\S]*?)<\/head>/i);if(Z){let A=Z[1],I=/<style\b[^>]*>[\s\S]*?<\/style>/gi,z;while((z=I.exec(A))!==null)X.push(z[0]);let _=/<script\b[^>]*data-stx-(?:route-params|server-data|scoped|component-factories)[^>]*>[\s\S]*?<\/script>/gi;while((z=_.exec(A))!==null){if(u.test(z[0])||z[0].includes("__stx_early_mounts")||/^<script\b[^>]*\bdata-stx-runtime(?=[\s=>])/i.test(z[0]))continue;$.push(z[0])}}let U=x(Q,Y);if(!U)return FJ(J);let{tagName:W,start:j,end:F}=U,K=Q.slice(j,F).trim(),G=[],B=Q.match(/<body\b[^>]*>/i),w=Q.lastIndexOf("</body>");if(B&&B.index!==void 0&&w!==-1){let I=[[B.index+B[0].length,U.openIndex],[F+`</${W}>`.length,w]],z=/<script\b[^>]*>[\s\S]*?<\/script>/gi;for(let[_,H]of I){if(_>=H)continue;let V=Q.slice(_,H),L;z.lastIndex=0;while((L=z.exec(V))!==null){if(u.test(L[0]))continue;G.push(L[0])}}}let N=[];if(X.length>0)N.push(X.join(`
26
+ `));if($.length>0)N.push($.join(`
27
+ `));if(G.length>0)N.push(G.join(`
28
+ `));return N.push(K),N.join(`
29
+ `)}import M from"fs";import p from"path";function gJ(J,Y,Q){return{version:1,buildTime:new Date().toISOString(),routes:J,assets:Y,outputDir:Q}}function uJ(J,Y){let Q=p.join(Y,"manifest.json");M.writeFileSync(Q,JSON.stringify(J,null,2))}function mJ(J){let Y=p.join(J,"manifest.json");if(!M.existsSync(Y))return null;try{let Q=M.readFileSync(Y,"utf-8"),X=JSON.parse(Q);if(X.version!==1)return console.warn(`[stx] Manifest version mismatch: expected 1, got ${X.version}`),null;return X}catch(Q){return console.warn("[stx] Failed to load manifest:",Q),null}}function b(J,Y,Q={}){let X=`${encodeURIComponent(J)}=${encodeURIComponent(Y)}`;if(Q.maxAge!==void 0)X+=`; Max-Age=${Q.maxAge}`;if(Q.expires)X+=`; Expires=${Q.expires.toUTCString()}`;if(Q.path)X+=`; Path=${Q.path}`;if(Q.domain)X+=`; Domain=${Q.domain}`;if(Q.secure)X+="; Secure";if(Q.httpOnly)X+="; HttpOnly";if(Q.sameSite)X+=`; SameSite=${Q.sameSite}`;return X}async function GJ(J){let Y=J.headers.get("content-type")||"",Q={},X=($,Z)=>{let U=Q[$];if(U===void 0)Q[$]=Z;else if(Array.isArray(U))U.push(Z);else Q[$]=[U,Z]};if(Y.includes("multipart/form-data")){let $=await J.formData();for(let[Z,U]of $.entries())if(typeof U==="string")X(Z,U);return Q}if(Y.includes("application/x-www-form-urlencoded")){for(let[$,Z]of new URLSearchParams(await J.text()).entries())X($,Z);return Q}return Q}function zJ(J){if(!J)return!1;let Y=J.toUpperCase();return Y!=="GET"&&Y!=="HEAD"}async function d(J,Y={}){let Q=Y.request,X=Y.method??Q?.method;if(!Q||!zJ(X))return{ran:!1};if(typeof J.action!=="function")return{ran:!1};let $={};try{$=await GJ(Q)}catch{}let Z=await J.action({request:Q,form:$,params:Y.params??{},query:J.query??{},cookies:Y.cookies??{}});if(Z&&typeof Z==="object"){let U=Z,W=BJ(U.cookies),j=U.redirect;if(typeof j==="string"&&j)return{redirect:j,ran:!0,...W.length>0?{cookies:W}:{}};let{cookies:F,redirect:K,...G}=U;if(Object.assign(J,G),W.length>0)return{ran:!0,cookies:W}}return{ran:!0}}function BJ(J){if(!J||typeof J!=="object"||Array.isArray(J))return[];let Y=[];for(let[Q,X]of Object.entries(J)){if(!Q)continue;if(typeof X==="string"){Y.push(b(Q,X));continue}if(X&&typeof X==="object"){let $=X;if(typeof $.value!=="string")continue;Y.push(b(Q,$.value,$))}}return Y}function cJ(J,Y=[],Q){let X=new Headers({Location:J,"Cache-Control":"no-store"});for(let $ of Y)X.append("Set-Cookie",$);for(let[$,Z]of Object.entries(Q??{}))if($.toLowerCase()!=="location")X.set($,Z);return new Response(null,{status:303,headers:X})}async function tJ(J,Y={}){return(await n(J,Y)).html}async function eJ(J,Y={}){let{html:Q,context:X,redirect:$,cookies:Z}=await n(J,Y),U=c(X),W=l(X);if($)return{html:Q,redirect:$,cookies:Z,status:U,headers:W};let{extractStreamBoundaries:j}=await import("./chunk-2q1w57n3.js"),F=j(X),K=J.streamTemplates;if(K&&Object.keys(K).length>0){let{processDirectives:G}=await import("./chunk-9mvz85xs.js"),{defaultConfig:B}=await import("./chunk-wnc0fadc.js"),w=X.streamBoundaries||{},N={...B,autoShell:!1},A=Object.keys(K).map((z)=>({id:z,render:async()=>{let _=typeof w[z]==="function"?await w[z]():void 0;return G(K[z],{...X,$boundary:_},J.sourceFile,N,new Set)}})),I=new Set(A.map((z)=>z.id));F=[...(F||[]).filter((z)=>!I.has(z.id)),...A]}return{html:Q,boundaries:F&&F.length>0?F:void 0,cookies:Z,status:U,headers:W}}async function n(J,Y){let Q={__filename:J.sourceFile,__dirname:J.sourceFile.replace(/[/\\][^/\\]+$/,""),...Y};if(!J.hasServerScripts&&!O(J.html))return{html:J.html,context:Q};for(let U of J.serverScriptContent)try{await T(U,Q,J.sourceFile)}catch(W){if(Y.__stx_strict_hydration)throw W;console.warn(`[stx] Server script error in ${J.sourceFile}:`,W)}let X=await d(Q,{request:Y.request,method:Y.method,params:Y.params??{},cookies:Y.cookies??{}}),$=(U)=>{let W=U.replace(/<script\b[^>]*\bdata-stx-server-data\b[^>]*>[\s\S]*?<\/script>/gi,""),j=i(Q);if(!j)return W;let F=W.indexOf("</head>");return F<0?j+W:W.slice(0,F)+j+W.slice(F)};if(X.redirect)return{html:J.html,context:Q,redirect:X.redirect,cookies:X.cookies};if(!O(J.html))return{html:$(J.html),context:Q,cookies:X.cookies};let Z=new Map;for(let[U,W]of Object.entries(J.placeholders))if(W.expression)try{let j=k(W.expression,Q);if(W.type==="raw")Z.set(U,j!==void 0&&j!==null?String(j):"");else Z.set(U,j!==void 0&&j!==null?P(String(j)):"")}catch(j){if(Y.__stx_strict_hydration)throw j;Z.set(U,"")}return{html:$(R(J.html,Z)),context:Q,cookies:X.cookies}}async function JQ(J,Y={}){if(!J.hasServerScripts&&!O(J.fragment))return J.fragment;let Q={__filename:J.sourceFile,__dirname:J.sourceFile.replace(/[/\\][^/\\]+$/,""),...Y};for(let $ of J.serverScriptContent)try{await T($,Q,J.sourceFile)}catch(Z){console.warn(`[stx] Server script error in ${J.sourceFile}:`,Z)}if(!O(J.fragment))return J.fragment;let X=new Map;for(let[$,Z]of Object.entries(J.placeholders))if(Z.expression)try{let U=k(Z.expression,Q);if(Z.type==="raw")X.set($,U!==void 0&&U!==null?String(U):"");else X.set($,U!==void 0&&U!==null?P(String(U)):"")}catch{X.set($,"")}return R(J.fragment,X)}
30
+ export{s as Yf,C as Zf,e as _f,x as $f,_J as ag,AJ as bg,IJ as cg,g as dg,QJ as eg,HJ as fg,PJ as gg,kJ as hg,TJ as ig,FJ as jg,SJ as kg,yJ as lg,gJ as mg,uJ as ng,mJ as og,b as pg,GJ as qg,zJ as rg,d as sg,cJ as tg,tJ as ug,eJ as vg,JQ as wg};
@@ -1,5 +1,5 @@
1
1
  // @bun
2
- import{tl as QJ}from"./chunk-xpw4r8qb.js";import{ul as WJ}from"./chunk-qjvny3wf.js";import{bm as GJ,yr as XJ,zr as qJ}from"./chunk-508xtkyq.js";import{rs as ZJ,ss as $J}from"./chunk-c0vjhzjf.js";import{Ls as YJ,Ps as u}from"./chunk-a3fsqjag.js";import{tt as c}from"./chunk-2zbmyvqc.js";import X from"path";import O from"fs";function UJ(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 LJ(J){if(J&&typeof J==="object"&&Array.isArray(J.errors))return J.errors;return[J]}function b(J,K){let $=[];for(let W of LJ(J)){if(UJ(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?`
2
+ import{tl as QJ}from"./chunk-r9vpgmbd.js";import{ul as WJ}from"./chunk-qjvny3wf.js";import{bm as GJ,yr as XJ,zr as qJ}from"./chunk-wgsmawhw.js";import{rs as ZJ,ss as $J}from"./chunk-c0vjhzjf.js";import{Ls as YJ,Ps as u}from"./chunk-fx32tvka.js";import{tt as c}from"./chunk-2zbmyvqc.js";import X from"path";import O from"fs";function UJ(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 LJ(J){if(J&&typeof J==="object"&&Array.isArray(J.errors))return J.errors;return[J]}function b(J,K){let $=[];for(let W of LJ(J)){if(UJ(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
3
  ${$.lineText.trim()}`:"";return W?`${W}: ${$.message}${Y}`:`${$.message}${Y}`}).join(`
4
4
  `)}var TJ=9;function P(J,K,$){return/^(?:(?:stx|ui)\.config\.[cm]?[jt]s|runtime-config-(?:server|loader)\.[cm]?[jt]s)$/.test(X.basename(J))||QJ(J,K,$)}var HJ=1,zJ=new Map,f=600,AJ=100,g=new Map;async function MJ(J){let K=g.get(J)??0;if(K>0&&K<AJ){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 nJ(J){return zJ.get(J)??[]}function h(J,K){if(J)zJ.set(J,K)}function CJ(J=process.env){return J.STX_DEBUG==="true"||J.STX_DEBUG==="1"}function x(...J){if(CJ())console.log("[stx:bundler]",...J)}var n=[];function r(J,K,$){n.push({filePath:J||"<inline>",message:K,details:$})}function oJ(){return n.slice()}function lJ(){n.length=0}var p;function dJ(J){p=J}function a(){if(p)return p;try{let J=qJ.strict;return typeof J==="object"&&J!==null?J.bundlerFallback??"warn":"warn"}catch{return"warn"}}var e=[/^stx$/,/^@stacksjs\/stx$/,/^@stores$/,/^stx\/stores$/,/^@composables$/];function sJ(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:",xJ=/\.(?:[cm]?[jt]sx?|json)$/i;function IJ(J,K){return X.relative(J,K).split(X.sep).join("/")}function _J(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 NJ(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 SJ(J,K,$,W,Y,z=new Map,H){let j=(Q,Z,G)=>{if(P(Z,J,H))return null;if(!Y||Q!==$||!xJ.test(Z))return null;try{if(!O.statSync(Z,{throwIfNoEntry:!1})?.isFile())return null}catch{return null}W.add(Z);let q=`${v}${IJ(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){if(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}}),Y)Q.onResolve({filter:/^(?!node:|bun:)(?:@[\w.-]+\/)?[\w.-]/},(Z)=>{if(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=YJ(64),KJ=Symbol.for("stx.client-bundle-build-queue");function yJ(J){let K=globalThis,W=(K[KJ]??Promise.resolve()).then(J,J);return K[KJ]=W.then(()=>{return},()=>{return}),W}async function iJ(J,K,$={}){let W=$.projectRoot||process.cwd(),Y=(await XJ(W)).serverApi,z=$.minify??!1,H=$.externalizeUserModules??!0,j=$.cacheDir||c(W,"bundle-cache"),T=new Bun.CryptoHasher("md5");T.update(`${TJ}\x00${WJ()}\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!==HJ||!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=yJ(()=>FJ(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 BJ=0;function RJ(J){return`${J}-${process.pid}-${++BJ}`}async function FJ(J,K,$){let{projectRoot:W,minify:Y,cacheDir:z,hash:H,cachePath:j,depsPath:T,externalizeUserModules:Q}=$,Z=c(W,"bundle-tmp"),G=RJ(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=DJ(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 VJ=I.size>0?`
5
5
  export { ${[...I].join(", ")} }`:"";await Bun.write(q,J+VJ),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:[SJ(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 s=[];k=NJ(_J(k,d),s);let kJ=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 i=`__stxBundle_${H}`,jJ=_.map(([V,S])=>`${JSON.stringify(V)}: ${S}`).join(", "),OJ=_.map(([V])=>`var ${V} = undefined;`).join(`
@@ -0,0 +1,2 @@
1
+ // @bun
2
+ import{$ as lm,$a as oo,$b as zp,$c as zq,$d as zr,A as Xk,Aa as zn,Ab as To,Ac as _p,Ad as _q,Ae as es,B as Yk,Ba as An,Bb as Uo,Bc as $p,Bd as $q,Be as fs,C as Zk,Ca as Nn,Cb as Vo,Cc as aq,Cd as ar,Ce as gs,D as _k,Da as On,Db as Wo,Dc as bq,Dd as br,De as hs,E as Ql,Ea as Pn,Eb as Xo,Ec as cq,Ed as cr,Ee as is,F as Rl,Fa as Qn,Fb as Yo,Fc as dq,Fd as dr,Fe as js,G as Sl,Ga as Rn,Gb as Zo,Gc as eq,Gd as er,Ge as ks,H as Tl,Ha as Sn,Hb as _o,Hc as fq,Hd as fr,He as ls,I as Ul,Ia as Wn,Ib as $o,Ic as gq,Id as gr,Ie as ms,J as Vl,Ja as Xn,Jb as ap,Jc as hq,Jd as hr,Je as ns,K as Wl,Ka as Yn,Kb as bp,Kc as iq,Kd as ir,Ke as os,L as Xl,La as Zn,Lb as cp,Lc as jq,Ld as jr,M as Yl,Ma as _n,Mb as dp,Mc as kq,Md as kr,N as Zl,Na as $n,Nb as lp,Nc as lq,Nd as lr,O as _l,Oa as ao,Ob as mp,Oc as mq,Od as mr,P as $l,Pa as bo,Pb as np,Pc as nq,Pd as nr,Q as am,Qa as co,Qb as op,Qc as oq,Qd as or,R as bm,Ra as eo,Rb as pp,Rc as pq,Rd as pr,S as cm,Sa as fo,Sb as qp,Sc as qq,Sd as qr,T as dm,Ta as go,Tb as rp,Tc as rq,Td as rr,U as em,Ua as ho,Ub as sp,Uc as sq,Ud as sr,V as fm,Va as io,Vb as tp,Vc as tq,Vd as tr,W as gm,Wa as jo,Wb as up,Wc as uq,Wd as ur,X as hm,Xa as ko,Xb as vp,Xc as vq,Xd as vr,Y as im,Ya as lo,Yb as wp,Yc as wq,Yd as wr,Z as jm,Za as mo,Zb as xp,Zc as xq,Zd as xr,_ as km,_a as no,_b as yp,_c as yq,_d as yr,aa as mm,ab as po,ac as Ap,ad as Aq,ae as Ar,ba as nm,bb as qo,bc as Bp,bd as Bq,be as Hr,ca as om,cb as ro,cc as Cp,cd as Cq,ce as Ir,da as pm,db as so,dc as Dp,dd as Dq,de as Jr,ea as qm,eb as to,ec as Ep,ed as Eq,ee as Kr,fa as rm,fb as uo,fc as Fp,fd as Fq,fe as Lr,ga as sm,gb as vo,gc as Gp,gd as Gq,ge as Mr,ha as tm,hb as wo,hc as Hp,hd as Hq,he as Nr,ia as um,ib as xo,ic as Ip,id as Iq,ie as Or,ja as vm,jb as yo,jc as Jp,jd as Jq,je as Pr,ka as wm,kb as zo,kc as Kp,kd as Kq,ke as Qr,la as xm,lb as Ao,lc as Lp,ld as Lq,le as Rr,ma as ym,mb as Bo,mc as Mp,md as Mq,me as Sr,na as zm,nb as Eo,nc as Np,nd as Nq,ne as Tr,o as a,oa as Am,ob as Fo,oc as Op,od as Oq,oe as Ur,p as Ik,pa as on,pb as Go,pc as Pp,pd as Pq,pe as Vr,q as Jk,qa as pn,qb as Ho,qc as Qp,qd as Qq,qe as Wr,r as Kk,ra as qn,rb as Jo,rc as Rp,rd as Rq,re as Xr,s as Lk,sa as rn,sb as Ko,sc as Sp,sd as Sq,se as Yr,t as Mk,ta as sn,tb as Lo,tc as Tp,td as Tq,te as Zr,u as Nk,ua as tn,ub as Mo,uc as Up,ud as Uq,ue as _r,v as Ok,va as un,vb as Oo,vc as Vp,vd as Vq,ve as $r,w as Pk,wa as vn,wb as Po,wc as Wp,wd as Wq,we as as,x as Qk,xa as wn,xb as Qo,xc as Xp,xd as Xq,xe as bs,y as Vk,ya as xn,yb as Ro,yc as Yp,yd as Yq,ye as cs,z as Wk,za as yn,zb as So,zc as Zp,zd as Zq,ze as ds}from"./chunk-vjb3v63z.js";import{Le as ep,Me as fp,Ne as gp,Oe as hp,Pe as ip,Qe as jp,Re as kp}from"./chunk-6bvdtf6k.js";import{Se as Co,Te as Do}from"./chunk-7hb89n3z.js";import{Ue as Io}from"./chunk-3t2xac1c.js";import{Ve as nn}from"./chunk-4fc6gjr5.js";import{We as Tn,Xe as Un,Ye as Vn,Ze as No}from"./chunk-zkzp83x3.js";import{$e as al,_e as $k,af as bl,bf as cl,cf as dl,df as el,ef as fl,ff as gl,gf as hl,hf as il,if as jl,jf as kl,kf as ll,lf as ml,mf as nl}from"./chunk-n0d7nwhd.js";import{nf as El,of as Fl,pf as Gl,qf as Hl,rf as Il,sf as Jl,tf as Kl,uf as Ll,vf as Ml,wf as Nl,xf as Ol,yf as Pl}from"./chunk-01mh30km.js";import{Af as Dl,zf as Cl}from"./chunk-qg4e12et.js";import{Bf as ol,Cf as pl,Df as ql,Ef as rl,Ff as sl,Gf as tl,Hf as ul,Jf as vl,Kf as wl,Lf as xl,Mf as yl,Nf as zl,Of as Al,Rf as Bl}from"./chunk-q4vhc2hd.js";import{Sf as Xm,Tf as Ym,Uf as Zm,Vf as _m,Wf as $m,Xf as mn}from"./chunk-b3gmkqzg.js";import{$f as Em,Yf as Bm,Zf as Cm,_f as Dm,ag as Fm,bg as Gm,cg as Hm,dg as Im,eg as Jm,fg as Km,gg as Lm,hg as Mm,ig as Nm,jg as Om,kg as Pm,lg as Qm,mg as an,ng as bn,og as cn,pg as dn,qg as en,rg as fn,sg as gn,tg as hn,ug as jn,vg as kn,wg as ln}from"./chunk-57nk505p.js";import{xg as Rm,yg as Sm}from"./chunk-0knxnyq6.js";import{Ag as Cn,Bg as Dn,Cg as En,Dg as Fn,Eg as Gn,Fg as Hn,Gg as In,Hg as Jn,Ig as Kn,Jg as Ln,Kg as Mn,zg as Bn}from"./chunk-634gaa9d.js";import{Lg as ri,Mg as si,Ng as ti,Og as ui,Pg as vi,Qg as wi}from"./chunk-ne27x5e6.js";import{Rg as Mj,Sg as Nj,Tg as Oj,Xg as Pj,Yg as Qj,Zg as Rj}from"./chunk-61tpvbag.js";import{$g as Yj,_g as Xj,ah as Zj,bh as _j,ch as $j,dh as ak,eh as bk,fh as ck,gh as dk,hh as ek,ih as fk}from"./chunk-mtr8g311.js";import{jh as Cj,kh as Dj,lh as Ej,mh as Fj,nh as Gj,ph as Hj,qh as Ij,rh as Jj,sh as Kj,th as Lj}from"./chunk-bcpjhcpn.js";import{uh as xk,wh as yk}from"./chunk-y4zddt5r.js";import{Ch as Mh,Dh as Nh,Eh as Oh,Fh as Ph,Gh as Qh,Hh as Rh}from"./chunk-g7bpkpd4.js";import{Jh as Sh,Kh as Th,Lh as Uh,Mh as Vh,Nh as Wh,Oh as Xh,Ph as Yh,Qh as Zh,Rh as _h,Sh as $h,Th as ai,Uh as bi,Vh as ci,Wh as di}from"./chunk-k33778kc.js";import{$h as hi,Yh as ei,Zh as fi,_h as gi}from"./chunk-ys4hpkrp.js";import{ei as ii}from"./chunk-g1vxsvqv.js";import{hi as lh}from"./chunk-mza7h890.js";import{ii as mh}from"./chunk-fqq5k9ve.js";import{ji as nh,ki as oh}from"./chunk-ya5m5vbn.js";import{li as ph,mi as qh,ni as rh,oi as sh,pi as th,qi as uh}from"./chunk-y4nzmkea.js";import{ri as vh,si as wh,ti as xh,ui as yh,vi as zh}from"./chunk-7kw3grq5.js";import{Ai as Eh,wi as Ah,xi as Bh,yi as Ch,zi as Dh}from"./chunk-c79nfdyj.js";import{Bi as Fh,Ci as Gh,Di as Hh,Ei as Ih,Fi as Jh,Gi as Kh,Hi as Lh}from"./chunk-ej8mv2k6.js";import{Ii as jh,Ji as kh}from"./chunk-zyqa38rq.js";import"./chunk-ra1s4s6b.js";import{Ni as Pe,Oi as Qe,Pi as Re,Qi as Se,Ri as Te,Si as Ue,Ti as Ve,Ui as We,Vi as Xe,Wi as Ye,Xi as Ze,Yi as _e,Zi as $e,_i as af}from"./chunk-a97fpbsa.js";import{$i as sf,aj as tf,bj as uf,cj as vf,dj as wf,ej as xf,fj as yf,gj as zf,hj as Af,ij as Bf,jj as Cf,kj as Df,lj as Ef,mj as Ff,nj as Gf,oj as Hf,pj as If}from"./chunk-bsfkdb4p.js";import{Aj as hf,Bj as jf,Cj as kf,Dj as lf,Ej as mf,Fj as nf,Gj as of,Hj as pf,Ij as qf,Jj as rf,wj as df,xj as ef,yj as ff,zj as gf}from"./chunk-y32dbdta.js";import{Kj as Jf,Lj as Kf,Mj as Lf,Nj as Mf,Oj as Nf,Pj as Of,Qj as Pf,Rj as Qf,Sj as Rf,Tj as Sf,Uj as Tf,Vj as Uf,Wj as Vf,Xj as Wf}from"./chunk-qrm0k16b.js";import{pk as Br,qk as Cr,rk as Dr,sk as Er,tk as Fr,uk as Gr}from"./chunk-kynnyass.js";import{Ak as Um,Bk as Vm,Ck as Wm,vk as Rk,wk as Sk,xk as Tk,yk as Uk,zk as Tm}from"./chunk-s7j42ma7.js";import"./chunk-frp9fc7j.js";import"./chunk-5jvagdgn.js";import{nl as ec,ol as fc,sl as gc}from"./chunk-r9vpgmbd.js";import{ul as bc}from"./chunk-qjvny3wf.js";import{$l as Qb,$m as ld,$o as yg,$p as mi,$q as Bj,Al as Ca,Am as Ec,An as Qd,Ap as Zg,Aq as aj,Ar as Dk,Bl as Da,Bm as Fc,Bn as Rd,Bp as _g,Bq as bj,Br as Ek,Cl as Ea,Cm as Gc,Cn as Sd,Co as Yf,Cp as $g,Cq as cj,Cr as Fk,Dl as Fa,Dm as Hc,Dn as Td,Dp as ah,Dq as dj,Dr as Gk,El as Ga,Em as Ic,En as Ud,Ep as bh,Eq as ej,Er as Hk,Fl as Ha,Fm as Jc,Fn as Vd,Fp as ch,Fq as fj,Gl as Ia,Gm as Kc,Gn as Wd,Gp as dh,Gq as gj,Hl as Ja,Hm as Lc,Hn as Xd,Hp as eh,Hq as hj,Il as Ka,Im as Mc,In as Yd,Ip as fh,Iq as ij,Jl as La,Jm as Nc,Jn as Zd,Jo as Zf,Jp as gh,Jq as jj,Kl as Ma,Km as Oc,Kn as _d,Kp as hh,Kq as kj,Ll as Na,Lm as Pc,Ln as $d,Lo as _f,Lp as ih,Lq as lj,Ml as Oa,Mm as Qc,Mn as ae,Mp as ji,Mq as mj,Nl as ib,Nm as _c,Nn as re,No as $f,Np as ki,Nq as nj,Ol as jb,Om as $c,On as se,Oo as ag,Oq as oj,Pl as kb,Pm as ad,Pn as te,Po as bg,Pq as pj,Ql as lb,Qm as bd,Qn as ue,Qo as cg,Qp as li,Qq as qj,Rl as mb,Rm as cd,Rn as ve,Ro as dg,Rq as rj,Sl as nb,Sm as dd,Sn as we,So as eg,Sq as sj,Tm as ed,Tn as xe,To as qg,Tq as tj,Un as ye,Uo as rg,Uq as uj,Vl as Kb,Vm as fd,Vn as ze,Vo as sg,Vq as vj,Wl as Lb,Wm as gd,Wn as Ae,Wo as tg,Wq as wj,Xl as Mb,Xm as hd,Xn as Be,Xo as ug,Xq as xj,Yl as Nb,Ym as id,Yn as Ce,Yo as vg,Yq as yj,Zl as Ob,Zm as jd,Zn as De,Zo as wg,Zq as zj,_l as Pb,_m as kd,_n as Ee,_o as xg,_q as Aj,am as Ub,an as md,ao as Ie,ap as zg,aq as ni,ar as Sj,bm as Vb,bn as nd,bo as Je,bp as Ag,bq as oi,br as Tj,cm as Wb,cn as od,co as Ke,cp as Bg,cq as pi,cr as Uj,dm as hc,dn as pd,do as Le,dp as Cg,dq as qi,dr as Vj,em as ic,en as qd,eo as Me,ep as Dg,eq as xi,er as Wj,fm as jc,fn as vd,fo as Ne,fp as Eg,fq as yi,fr as gk,gm as kc,gn as wd,go as Oe,gp as Fg,gq as zi,gr as hk,hm as lc,hn as xd,hp as Gg,hq as Ai,hr as ik,im as mc,in as yd,ip as Hg,iq as Bi,ir as jk,jm as nc,jn as zd,jp as Ig,jq as Ci,jr as kk,km as oc,kn as Ad,ko as bf,kp as Jg,kq as Di,kr as lk,lm as pc,ln as Bd,lo as cf,lp as Kg,lq as Ei,lr as mk,mm as qc,mn as Cd,mp as Lg,mq as Fi,mr as nk,nm as rc,nn as Dd,no as Xf,np as Mg,nq as Gi,nr as ok,om as sc,on as Ed,op as Ng,oq as Hi,or as pk,pm as tc,pn as Fd,pp as Og,pq as Ii,pr as qk,qm as uc,qn as Gd,qp as Pg,qq as Ji,qr as rk,rm as vc,rn as Hd,rp as Qg,rq as Ki,rr as sk,sm as wc,sn as Id,sp as Rg,sq as Li,sr as tk,tm as xc,tn as Jd,tp as Sg,tq as Mi,tr as uk,um as yc,un as Kd,up as Tg,uq as Ni,ur as vk,vl as xa,vm as zc,vn as Ld,vp as Ug,vq as Oi,vr as wk,wl as ya,wm as Ac,wn as Md,wp as Vg,wq as Yi,wr as zk,xl as za,xm as Bc,xn as Nd,xp as Wg,xq as Zi,xr as Ak,yl as Aa,ym as Cc,yn as Od,yp as Xg,yq as _i,yr as Bk,zl as Ba,zm as Dc,zn as Pd,zp as Yg,zq as $i,zr as Ck}from"./chunk-wgsmawhw.js";import{$r as ia,Fr as M,Gr as N,Hr as O,Ir as P,Jr as Q,Kr as R,Lr as S,Mr as T,Nr as U,Or as V,Pr as W,Qr as X,Rr as Y,Sr as Z,Tr as _,Ur as $,Vr as aa,Wr as ba,Xr as ca,Yr as da,Zr as ea,_r as fa,as as ja,bs as ka,cs as la,ds as ma,es as na,fs as oa,gs as pa,hs as qa,is as ra,js as sa,ks as ta,ls as ua,ms as va,ns as wa}from"./chunk-ma41bbjn.js";import{os as ga,ps as ha}from"./chunk-49trnqad.js";import{qs as Rb,rs as Sb,ss as Tb}from"./chunk-c0vjhzjf.js";import"./chunk-vjn3r3sq.js";import{As as Qi,Bs as Ri,Cs as Si,Ds as Ti,Es as Ui,Fs as Vi,Gs as Wi,Hs as Xi,zs as Pi}from"./chunk-cbj5a2tk.js";import{$s as Tc,Zs as Rc,_s as Sc,at as Uc,bt as Vc,dt as Wc,mt as Xc,nt as Yc,ot as Zc}from"./chunk-fx32tvka.js";import{pt as Xb,qt as Yb,rt as Zb,st as _b,tt as $b,ut as ac}from"./chunk-2zbmyvqc.js";import{Bt as Fe,Dt as Ge,Gt as He}from"./chunk-sjpjge04.js";import"./chunk-dfeq9d99.js";import{Lt as cc,Mt as dc}from"./chunk-k6bagvmz.js";import{$t as pg,Qt as fg,Rt as gg,St as hg,Tt as ig,Ut as jg,Vt as kg,Wt as lg,Yt as mg,Zt as ng,_t as og}from"./chunk-sh77d4tv.js";import{Au as oe,Bu as pe,Cu as qe,au as rd,bu as sd,cu as td,du as ud,nu as be,ou as ce,pu as de,qu as ee,ru as fe,su as ge,tu as he,uu as ie,vu as je,wu as ke,xu as le,yu as me,zu as ne}from"./chunk-ystnxqsq.js";import{$u as C,Du as b,Eu as c,Fu as d,Gu as e,Hu as f,Iu as g,Ju as h,Ku as i,Lu as m,Mu as n,Nu as o,Ou as p,Pu as q,Qu as r,Ru as s,Su as t,Tu as u,Uu as v,Vu as w,Wu as x,Xu as y,Yu as z,Zu as A,_u as B,av as D,bv as E,cv as F,dv as G,ev as H,fv as I,gv as J,hv as K,iv as L}from"./chunk-4djwtq0y.js";import"./chunk-7wkxs25k.js";import"./chunk-8kwtg74v.js";import{Av as qb,Bv as rb,Cv as sb,Dv as tb,Ev as ub,Fv as vb,Gv as wb,Hv as xb,Iv as yb,Jv as zb,Kv as Ab,Lv as Bb,Mv as Cb,Nv as Db,Ov as Eb,Pv as Fb,Qv as Gb,Rv as Hb,Sv as Ib,Tv as Jb,yv as ob,zv as pb}from"./chunk-eap7w3a8.js";import{$v as Ra,Bw as hb,Xv as Pa,Yv as Qa,ew as Sa,fw as Ta,lw as Ua,mw as Va,nw as Wa,ow as Xa,pw as Ya,qw as Za,rw as _a,sw as $a,tw as ab,uw as bb,vw as cb,ww as db,xw as eb,yw as fb,zw as gb}from"./chunk-h5pdcxre.js";import"./chunk-4vscfb5b.js";import{Nw as j,Ow as k,Pw as l}from"./chunk-kt6wm51e.js";import"./chunk-1rdm5y91.js";export{jl as writeNetlifyConfig,bn as writeManifest,Ol as writeImageManifest,up as wrapComponentForHMR,bs as withDefaults,wk as webComponentDirectiveHandler,jq as watermark,lr as watchViews,Yl as watchMultiple,Zl as watchEffect,Xl as watch,Me as warmImagePlaceholders,km as waitForStore,X as waitForLocale,fp as virtualPathFor,jk as videoDirective,G as validators,fs as validated,Ce as validateValueEnhanced,mi as validateTemplate,Rm as validateRouteRules,oq as validateParams,De as validateFormEnhanced,ar as validateFile,ye as validateFields,xe as validateField,oi as validateDirective,Xd as validateCspDirectives,Ek as validateConfig,pn as validateComponentScripts,Nn as validateComponentProps,ih as validateClientScript,hi as v,Hc as usesSignalsInScript,ub as usesReactiveRuntime,Ci as userComponentFileExists,Ph as useVirtualList,je as useTitle,jm as useStoreOrThrow,Mp as useStore,Vk as useStorage,Af as useSlots,Xk as useSessionStorage,cc as useServerRuntimeConfig,Yf as useServerData,ge as useSeoMeta,dc as useRuntimeConfig,lm as useRouteParams,nm as useRouteParamOrThrow,mm as useRouteParam,je as usePageTitle,rf as useOptimistic,Ff as useModel,pm as useMiddlewareValue,om as useMiddlewareState,Wk as useLocalStorage,np as useLoadingIndicator,ee as useHead,ei as useForm,Cf as useAttrs,cr as uploadFiles,br as uploadFile,gm as updateInstance,pf as untrack,Si as unregisterDirective,hm as unmountInstance,Qc as unescapeHtml,jp as typecheckStxFiles,Ai as transpileTypeScript,Qr as translate,Ba as transitionDirective,lc as transformAutoImports,Hn as toUsers,Gn as toUser,Up as thumbnail,Vq as thumbHashToRGBA,Wq as thumbHashToDataURL,wb as templateNeedsRuntime,vb as templateHasReactiveContext,Jf as templateCache,nd as syncRecordedResponse,rp as stxClientHelpers,kg as structuredDataDirective,Tr as stripLocalePrefix,Om as stripDocumentWrapper,Sb as stripCommentsAndLiterals,so as stringToStream,Ld as strictCspPreset,Xe as streamingSuspenseDirective,$e as streamToResponse,Ve as streamTemplateSimple,Pe as streamTemplate,Qk as stopHmrServer,Dn as stopBroadcasting,_b as stateDirName,$b as stateDir,df as state,ch as startsDocument,No as startProductionServer,Io as startInteractive,Cn as startBroadcasting,Vr as stampLocaleLayoutGroup,Ia as staggerDirective,mq as srcsetUrls,Ja as springDirective,ud as splitByPipe,Km as spaNavVaryHeaders,gp as sourcePathFor,tq as smartBatchSign,Ei as slotContentHasExpressions,rq as signUrl,yi as shouldTranspileTypeScript,Nk as shouldReloadOnChange,wq as shouldRefreshSignature,Ok as shouldIgnoreFile,Hh as shouldCacheComponent,Yp as sharpen,is as shape,Zb as setStateDir,tm as setRouteParams,um as setMiddlewareState,Le as setImagePlaceholder,uf as setGlobalProvide,b as setErrorLocale,Ql as setCurrentInstance,Zj as setCachedVideoResult,Oj as setCachedImageResult,Ij as setCached,ls as serveStxFile,ns as serveMultipleStxFiles,Ik as serveMarkdownFile,Yo as serveFile,os as serveApp,Xo as serve,xp as serializeState,dn as serializeSetCookie,_p as sepia,he as seoMetaToHeadConfig,Ca as scrollAnimateDirective,va as screenReaderDirective,Bi as scopeOnRootElement,nk as scopeHTML,mk as scopeCSS,ng as scanForSitemapEntries,pa as scanA11yTargets,qa as scanA11yIssues,cq as saturation,pq 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,Gb as runtimeEventRegexLiteral,Eb as runtimeDirectiveNamesLiteral,yg as runPreProcessingMiddleware,zg as runPostProcessingMiddleware,gn as runPageAction,kf as runMountCallbacks,gb as runMiddleware,em as runHooks,Jr as runDoctor,lf as runDestroyCallbacks,Cg as runComposers,dq as rotate,ii as rewriteImagesWithSiblings,od as responseBindings,Ii as resolveTemplatePath,ha as resolveStxTargets,Ak as resolveStxDirectories,Pr as resolveI18n,Sp as resize,qg as resetUnscopedSignalWarnings,Oc as resetRejectedExpressionWarnings,sc as resetPlaceholders,de as resetHead,wp as resetHMRHandler,o as resetErrorConfig,ds as required,cg as reportDeferredLoopWarnings,wc as replacePlaceholders,Ec as replaceInterpolations,jr as renderView,gk as renderVideoComponent,ic as renderVendorStyleTags,sr as renderToString,tr as renderToStream,ur as renderToDOM,Uq as renderThumbhashToCanvas,Gr as renderTemplateString,Er as renderTemplate,Fr as renderString,Se as renderStreamingPage,ti as renderSlot,xh as renderSSRSuspense,Eq as renderProtectedVideo,Dq as renderProtectedImg,qq as renderMediaUpload,Dr as renderMarkdownView,Vm as renderLayoutTypes,Sj as renderImgComponent,El as renderImageComponent,le as renderHtmlAttrs,ke as renderHead,mr as renderEmail,Gi as renderComponentWithSlot,me as renderBodyAttrs,Hp as render,Nd as relaxedCspPreset,we as registerValidationRule,Ze as registerStreamingDirectives,Op as registerStoresClient,rm as registerStore,Rf as registerServeModuleBundle,lg as registerSeoDirectives,_a as registerMiddleware,Ac as registerFilters,zc as registerFilter,d as registerErrorMessages,Be as registerEnhancedValidationRule,Pi as registerDirective,Wd as registerCspDirectives,Qn as registerComponentDirectives,Oa as registerAnimationDirectives,wa as registerA11yDirectives,mc as referencesName,Ul as ref,Ao as redirect,jd as recordResponseStatus,kd as recordResponseHeader,ac as rebaseOntoStateDir,ld as readResponseStatus,md as readResponseHeaders,Gk as readMarkdownFile,Kf as readFileCached,Vl as reactive,hq as quality,Bq as pruneSignatureCache,Lj as pruneCache,sf as provide,Cr as protectCodeBlocks,cs as prop,Fg as processVueTemplate,Nh as processVirtualListDirectives,Rh as processVirtualGridDirectives,fk as processVideo,ze as processValidateDirective,ea as processTranslateDirective,rh as processTransitionDirectives,uh as processTransitionAttributes,pe as processTitleDirective,bd as processTemplateBindings,nh as processTeleportDirectives,vh as processSuspenseDirectives,gg as processStructuredData,Te as processStreamDirectives,pd as processStatusDirective,ci as processStaticDirectives,wg as processStackReplacements,vg as processStackPushDirectives,ui as processSlots,Mm as processShell,Oe as processServerBindings,hg as processSeoDirective,_e as processSectionDirectives,Vc as processScopedStyles,$c as processReactiveBindings,Fq as processProtectedMedia,Xh as processPartialHydrationDirectives,hh as processOnceDirective,xg as processMiddleware,fg as processMetaDirectives,qe as processMetaDirective,Hk as processMarkdownFileDirectives,Ni as processMarkdownDirectives,dg as processLoops,Fh as processKeepAliveDirectives,gh as processJsonDirective,Qh as processInfiniteListDirectives,ug as processIncludes,Uj as processImgComponents,Gl as processImageComponents,tl as processImage,oe as processHeadDirective,se as processForms,ue as processFormInputDirectives,Mc as processExpressions,Pb as processEventDirectives,ve as processErrorDirective,Gg as processDynamicComponents,ji as processDirectives,Xi as processDirectiveAttributes,mh as processDeferDirectives,$d as processCustomDirectives,Td as processCspDirectives,js as processComponentProps,rc as processClientScript,te as processBasicFormDirectives,Ah as processAsyncDirectives,ae as processAppearanceBootstrapDirective,Fa as processAnimationDirectives,ka as processA11yDirectives,He as prepareImageDelivery,T as preloadTranslationsBackground,S as preloadTranslations,mp as preloadIslandHandlers,Ne as preloadIconCollection,yn as poolStrings,yk as pluginManager,Je as placeholdersWarmed,qh as performLeave,ph as performEnter,mf as pendingLifecycleCounts,qf as peek,rg as partialsCache,hk as parseVideoDirectiveOptions,Qp as parseUrl,Xq as parseThumbhashString,Ad as parseSwitchBlock,ri as parseSlots,si as parseSlotElement,Fd as parseScriptDeclarations,uk as parseSFCComponent,Gq as parseProtectedArgs,bg as parseLoopBinding,Tj as parseImgComponent,jj as parseImageUrl,Fl as parseImageComponent,en as parseFormBody,Cd as parseExpressionWithFilters,Rn as parseDefaults,xo as parseCookies,Dm as parseContainerSelector,xd as parseConditionalBlock,Dd as parseArguments,Ma as parseAnimationShorthand,es as optional,zn as optimizeTemplate,Ll as optimizeImage,Ml as optimizeDirectory,gs as oneOf,sg as onceStore,bm as onUpdated,_c as onUpdate,dm as onUnmounted,ym as onServer,$l as onMounted,hf as onMount,bi as onHydrated,yf as onErrorCaptured,jf as onDestroy,Lh as onDeactivated,xm as onClient,am as onBeforeUpdate,cm as onBeforeUnmount,_l as onBeforeMount,Kh as onActivated,Qq as observeElement,Bo as notFound,Lg as normalizeCriticalHeadOrder,xf as nextTick,Un as negotiateEncoding,Ua as navigateTo,fm as mountInstance,Ea as motionDirective,Md as moderateCspPreset,xn as minifyHtml,jg as metaDirective,Wg as metaDedupKey,Rp as mergeParams,Yg as mergeHtmlAttrs,fe as mergeHeadConfigs,Sc as mergeCssConfig,Qd as mergeCspDirectives,Ra as matchRoute,Oi as markdownDirectiveHandler,Fk as markdownCache,ga as looksLikeGlob,Sr as localizePath,U as loadTranslationLazy,_ as loadTranslation,Bk as loadStxConfig,db as loadMiddlewareFromDirectory,cn as loadManifest,Mq as loadElement,En as loadChannels,Lb as listensPassively,Zr as lintStxStrict,Oq as lazyLoadAll,Nq as lazyLoad,Ha as keyframeDirective,qr as jsxs,rr as jsxDEV,pr as jsx,zo as jsonResponse,Ye as islandDirective,l as isTest,Pm as isSpaNavigation,Im as isSpaNavRequest,uq as isSignatureValid,nf as isSignal,rl as isSharpAvailable,lo as isServerEnvironment,vm as isServer,yb as isRuntimeOwnedColonAttr,Hb as isRuntimeEventName,da as isRtlLocale,j as isProduction,ia as isPresentationalRole,Jq as isNativeLazySupported,Br as isMarkdownPath,Q as isLoading,R as isLoaded,xi as isJavaScriptScript,Kq as isIntersectionObserverSupported,zl as isImageFile,sl as isImageBackendAvailable,aa as isICUFormat,ai as isHydrated,Di as isHydrateTrigger,hd as isHttpStatus,ko as isEdgeEnvironment,_r as isDirectiveKind,k as isDevelopment,of as isDerived,Mk as isCssOnlyChange,Tn as isCompressible,wm as isClient,Ch as isAsyncComponent,fn as isActionableMethod,$p as invert,Mf as invalidateFileCacheByDir,Lf as invalidateFileCache,Lc as interpolateScriptsInTemplate,Jc as interpolateScriptExpressions,Kc as interpolateScriptAttributes,x as inlineError,Or as injectThemeBootstrap,ig as injectSeoTags,Lr as injectSeo,Xf as injectRouterScript,Lk as injectHotReload,kb as injectHeatmap,Zc as injectCss,Rd as injectCspMetaTag,eh as injectConfigHeadTags,Kg as injectColorModeBootScript,_g as injectCloakStyle,Rg as injectBuildId,kc as injectBrowserCoreAutoImports,dd as injectAnalytics,tf as inject,qm as initStoreRegistry,ml as initNetlify,op as initLoadingIndicator,Lq as initLazyLoading,Ho as initFile,Tq as initBlurUp,Zq as initAllBlurUp,Wj as imgDirective,Jl as imageDirective,kn as hydrateTemplateStream,jn as hydrateTemplate,lp as hydrateIslands,Zh as hydrateIsland,ln as hydrateFragment,_h as hydrateByStrategy,$h as hydrateAll,Ep as hydrate,Wo as htmlResponse,ah as hoistLeadingHeadTags,Mg as hoistColorModeBootScript,lb as heatmapDirective,Ej as hashString,Wf as hashFilePath,Cj as hashFile,Dj as hashBuffer,Eg as hasVueTemplateSyntax,ag as hasVariables,Jp as hasStore,xc as hasPlaceholders,kl as hasNetlifyConfig,ab as hasMiddleware,Qb as hasEventDirectives,dh as hasDocumentShell,pi as hasDirectives,ma as hasDOMSupport,Cl as handleImageRequest,zf as handleError,yr as h,yl as groupVariantsByFormat,Zp as grayscale,Po as gitHash,rn as getUnusedDirectives,V as getTranslationSync,O as getTranslationCacheStats,W as getTranslationAsync,ba as getTranslation,fl as getTotalSize,vq as getTimeUntilExpiry,jh as getStoreScript,Kp as getStoreNames,Ip as getStore,_k as getStorageSize,Zk as getStorageKeys,Ji as getSourceLineInfo,zi as getSharedTranspiler,Sf as getServeModuleBundle,Qf as getServeClientAsset,la as getScreenReaderOnlyStyle,ok as getScopeAttribute,cf as getRouteParams,Vb as getPublicEnvDefine,Wb as getPublicEnv,ni as getPositionInfo,uc as getPlaceholderRegistry,Bj as getPlaceholderCacheStats,ce as getPageMeta,Hd as getNonce,Al as getMimeType,cb as getMiddlewareNames,$a as getMiddleware,ca as getLocaleDirection,P as getLoadingState,Y as getLoadingLocales,Ie as getImagePlaceholder,ul as getImageMetadata,Fe as getImageDelivery,Dp as getHydrationRuntime,sm as getHydratedStoreState,Pk as getHmrServer,be as getHead,vp as getHMRHandler,nj as getFormatExtension,Gj as getFileMtime,xl as getFallbackVariant,f as getErrorMessage,c as getErrorLocale,n as getErrorConfig,i as getErrorCodeName,Ri as getDirectives,Qi as getDirective,Rl as getCurrentInstance,Wc as getCssServeAsset,Pd as getCspPreset,Yd as getCspHeaderName,Mi as getComponentCacheStats,Yj as getCachedVideoResult,zq as getCachedSignature,Of as getCachedSignalsRuntime,Pf as getCachedRouterScript,zj as getCachedPlaceholder,Nj as getCachedImageResult,Hj as getCached,Kj as getCacheStats,Pg as getBuildId,Bn as getBroadcastServer,mj as getBestVariant,Bc as getAllFilters,aj as generateWidthSrcset,Oh as generateVirtualListCSS,er as generateVideoPreview,Ee as generateValidationScript,fr as generateUploadRuntime,sn as generateTreeShakenBundle,th as generateTransitionRuntime,sh as generateTransitionCSS,ak as generateThumbnails,sj as generateThumbhashPlaceholder,bo as generateTemplatesDocs,zh as generateSuspenseRuntime,yh as generateSuspenseCSS,yp as generateStateScript,kj as generateSrcsetData,Rj as generateSrcset,vl as generateSrcSet,bk as generateSpriteSheet,nr as generateSpaShell,lj as generateSourceTags,gj as generateSizesFromBreakpoints,fj as generateSizesAttribute,wl as generateSizes,mg as generateSitemapIndex,Mr as generateSitemap,Iq as generateSimpleMediaPicker,Cq as generateSignatureRuntime,If as generateSignalsRuntimeDev,Hf as generateSignalsRuntime,qc as generateServerDataBridge,lk as generateScopeId,vk as generateSFCWebComponent,Nb as generateRuntimeScript,Pa as generateRouteTypes,Qa as generateRouteManifest,og as generateRobotsTxt,Nr as generateRobots,Qj as generateResponsiveVariants,rk as generateReactiveWebComponentTS,qk as generateReactiveWebComponent,tk as generateReactiveRuntime,sk as generateReactiveMixin,$j as generatePoster,yj as generatePlaceholderStyle,xj as generatePlaceholderCSS,rj as generatePlaceholder,Yh as generatePartialHydrationCSS,Gd as generateNonce,gl as generateNetlifyToml,hr as generateMinifiedMediaRuntime,gr as generateMediaRuntime,Hq as generateMediaManagerEmbed,an as generateManifest,qp as generateLoadingIndicatorHtml,Sq as generateLazyLoadRuntime,Wm as generateLayoutTypes,uj as generateLQIP,Jh as generateKeepAliveRuntime,Ih as generateKeepAliveCSS,di as generateIslandManifest,dr as generateImagePreview,Nl as generateImageManifest,Cp as generateHydrationScript,af as generateHydrationRuntime,Fp as generateHydrationCSS,Sh as generateHydrationBootstrap,Kk as generateHotReloadScript,jb as generateHeatmapScript,tp as generateHMRClientScript,ck as generateHLSManifest,zp as generateEventBindings,ej as generateDprSrcsetWithVariableQuality,dj as generateDprSrcset,bh as generateDocumentShell,ho as generateDocs,co as generateDirectivesDocs,Wi as generateDirectiveRuntime,pg as generateDefaultRobotsTxt,dk as generateDASHManifest,Yc as generateCss,Kd as generateCspMetaTag,Jd as generateCspHeader,Ef as generateCompositionRuntime,ao as generateComponentsDocs,Th as generateComponentManifest,_n as generateComponentDoc,wj as generateColorPlaceholder,Jg as generateColorModeBootScript,im as generateClientRuntime,Fj as generateCacheKey,oc as generateBrowserAutoImportDestructuring,_q as generateBlurUpRuntime,$q as generateBlurUpCSS,ad as generateBindingsRuntime,bj as generateAutoWidthSrcset,nc as generateAutoImportDestructuring,Eh as generateAsyncComponentRuntime,Dh as generateAsyncComponentCSS,fc as generateApiTypes,Na as generateAnimationRuntime,La as generateAnimationCSS,cd as generateAnalyticsScript,kp as formatTypecheckDiagnostics,dp as formatTypeErrors,Eo as formatStxContent,el as formatSize,Ta as formatRoutes,Fo as formatMarkdownContent,g as formatLocalizedError,$ as formatICU,p as formatFilePath,w as formatError,Kr as formatDoctorReport,eo as formatDocsAsMarkdown,go as formatDocsAsJson,fo as formatDocsAsHtml,gq as format,wn as foldConstants,fq as flipVertical,eq as flipHorizontal,Xm as fingerprint,ip as findStxModuleDeclarations,hp as findRuntimeTypeDeclarations,Ir as findPantryPackage,Dc as findMustacheEnd,wd as findMatchingEndTag,sd as findMatchingDelimiter,Rb as findInterpolationEnd,yd as findIfBlocks,Bd as findExpressions,Sa as findErrorPage,Tc as findDuplicateScopedStyleRanges,zd as findDirectiveBlocks,tn as findDeadCode,tn as findDeadBranches,Em as findContainerRegion,$n as findComponentFiles,ms as findCommonDir,dl as filterRequiredFiles,Hi as fileExists,Zf as extractVariables,li as extractTemplateExpressions,Ue as extractStreamBoundaries,Ap as extractState,vi as extractSlotContent,$f as extractScriptFromTemplate,ki as extractScriptBlocks,vc as extractPlaceholders,vd as extractParenthesizedExpression,id as extractPageResponseStatus,hb as extractLayoutMetadata,vj as extractDominantColor,Ed as extractDirectiveParams,qi as extractDirectiveNames,Qm as extractContainerContent,Yn as extractComponentProps,Uh as extractComponentName,Zn as extractComponentDescription,Xc as extractClassNames,pc as extractBridgeData,Vh as extractBoundProps,td as extractBalancedExpression,hc as extractAndStripCssImports,pk as extractAndScopeStyles,Ob as extractAndProcessEvents,Tk as externalizeSharedAssets,Uk as externalizeRepeatedAssets,Sk as externalizeHtml,Pc as evaluateExpression,vn as evaluateConstant,qd as evaluateAuthExpression,Gc as escapeHtmlValue,Fc as escapeHtml,C as errorRecovery,E as errorLogger,oh as ensureTeleportTargets,fh as ensureDocumentShell,Ae as enhancedValidationRules,Wn as enableDevTools,un as eliminateDeadCode,ff as effect,nq as dprUrls,io as docsCommand,ec as discoverServerApi,Um as discoverLayoutNames,Rq as disconnectObserver,Xn as disableDevTools,F as devHelpers,Lm as detectShell,jo as detectRuntime,hl as detectProjectConfig,oj as detectFormat,on as detectBuildMode,ef as derived,ll as deploy,Dk as defineStxConfig,Np as defineStore,Bf as defineSlots,Yr as defineSiteConfig,as as definePropsWithValidation,$r as defineProps,xk as definePlugin,ie as definePageMeta,Wa as defineMiddleware,fi as defineForm,wf as defineExpose,vf as defineEmits,Ti as defineDirective,Ar as defineCustomElement,Mo as defineConfig,Ui as defineClientDirective,Bh as defineAsyncComponent,Oo as defineApiHandler,ir as defaultMediaConfig,Pl as defaultImageConfig,M as defaultI18nConfig,ib as defaultHeatmapConfig,re as defaultFormClasses,yc as defaultFilters,_d as defaultCspConfig,zk as defaultConfig,ks as default,Rc as deepMergeThemes,Uc as dedupeScopedStyles,Hm as decodeTitleEntities,tj as decodeThumbhash,eg as declareBareLoopHead,Vd as cspNonceDirective,Ud as cspDirective,Yq as crossfadeTransition,Tp as crop,Mh as createVirtualList,ik as createVideoDirective,vo as createVercelHandler,ap as createTypeChecker,fa as createTranslateFilter,ro as createTextEncoderStream,zr as createStxApp,qo as createStreamingResponse,We as createStreamRenderer,Lp as createStore,Za as createStorageManager,Xa as createServerCookieManager,gc as createServerApi,Tl as createScope,wh as createSSRSuspense,bf as createRouter,Sm as createRouteRuleResolver,eb as createRouteLocation,_o as createRoute,Ul as createRef,Vl as createReactive,Df as createProvideContext,Ro as createProject,Lo as createProductionBuild,tc as createPlaceholder,An as createOptimizedBuild,wo as createNetlifyHandler,$k as createNetlifyClient,fb as createMiddlewareContext,Zo as createMiddleware,Pq as createLazyObserver,Gh as createKeepAliveCache,no as createKVNamespace,Wh as createIslandRegistry,Vj as createImgDirective,Kl as createImagePlugin,Dl as createImageHandler,Il as createImageDirective,nb as createHeatmapAggregator,cl as createFileManifest,mo as createEnvAccessor,z as createEnhancedError,po as createEdgeHandler,oo as createEdgeCache,Ki as createDetailedErrorMessage,uo as createDenoHandler,il as createDefaultNetlifyConfig,Zd as createCspHeaders,yo as createCookie,Wl as createComputed,Sl as createComponentInstance,to as createCloudflareHandler,Ya as createClientCookieManager,Vi as createBuiltinDirectives,zr as createApp,Ka as createAnimationTimeline,Wp as cover,_f as convertToCommonJS,bq as contrast,Vp as contain,y as consoleError,m as configureErrorHandling,Ck as config,Wl as computed,Vn as compressResponse,Bg as composerPattern,Ag as composer,Nm as composeShellWithPage,Pn as componentDirective,Fi as componentClientSignalNames,$m as compileTemplate,a as collectRepeatedFlag,bl as collectDeployFiles,$g as cloakStyleFragment,Ic as clientLoopScopes,_j as clearVideoCache,N as clearTranslationCache,kh as clearStoreCache,Yk as clearStorage,Aq as clearSignatureCache,Gf as clearServerData,Aj as clearPlaceholderCache,tg as clearOnceStore,Id as clearNonce,bb as clearMiddleware,Ke as clearImagePlaceholders,Ge as clearImageDeliveryCatalog,Hl as clearImageCache,e as clearErrorMessages,Tf as clearDevCaches,Cc as clearCustomFilters,Dg as clearComposers,lh as clearComposableCache,Li as clearComponentCache,Jj as clearCache,Ib as clearBlankCache,pp as cleanupLoadingIndicator,Bm as classifyScript,Cm as classifyAllScripts,bp as checkTemplateFile,cp as checkTemplate,Uf as checkCache,xq as checkAuthAccess,na as checkA11yWithRegex,oa as checkA11y,Kn as channel,Do as captureScreenshots,Co as captureScreenshot,Z as cancelPendingLoads,al as calculateSha1,cj as calculateOptimalWidths,Vf as cacheTemplate,bc as cacheEngineFingerprint,kk as buildWebComponents,ep as buildVirtualSource,kr as buildViews,Pp as buildUrl,Qe as buildSuspenseResolveScript,Xr as buildStaticSite,qb as buildRuntimeGlobalsDestructure,Ym as buildRuntimeAsset,Zm as buildRouterAsset,Wr as buildLangPickerScript,ij as buildImageUrl,Sg as buildIdFragment,Xg as buildHtmlAttrs,mn as buildForProduction,Sn as buildComponentLibrary,yq as buildAuthParams,nn as buildApp,Ur as buildAlternateLinks,Ko as build,In as broadcastPrivate,Jn as broadcastPresence,Fn as broadcast,aq as brightness,Tb as bracketDepths,Xp as blur,Jb as blankInertHtmlRegions,sq as batchSignUrls,gf as batch,sa as autoFixA11yFile,ta as autoFixA11yDirectory,ra as autoFixA11y,iq as auto,ja as attributeValue,_m as assetTags,Mb as asInvocableStatement,hs as arrayOf,Rr as applyTranslations,Pj as applyTransformations,wi as applySlots,On as applyPropDefaults,lq as applyPreset,Zg as applyHtmlAttrs,ne as applyHead,Nc as applyFilters,Jm as appendVary,Od as apiCspPreset,Da as animationGroupDirective,ek as analyzeVideo,qn as analyzeUsage,zm as analyzeTemplate,Am as analyzeProject,qn as analyzeDirectiveUsage,ed as analyticsDirective,Uo as addStore,To as addPage,Sd as addNonceToInlineContent,Vo as addLayout,So as addComponent,hn as actionRedirectResponse,Va as abortNavigation,ua as a11yDirective,Nf as __setSignalsGeneratorsForTest,Qg as __setBuildIdForTest,Xj as VideoProcessorCache,gi as Validator,xa as TransitionType,za as TransitionEase,ya as TransitionDirection,rd as Tokenizer,$o as TemplateTypeChecker,Go as TEMPLATE_PRESETS,v as StxValidationError,r as StxSyntaxError,t as StxSecurityError,s as StxRuntimeError,u as StxFileError,q as StxError,vr as Show,Re as SUSPENSE_RESOLVER_RUNTIME,ob as STX_RUNTIME_GLOBALS,jc as STX_AUTO_IMPORTS,Yb as STATE_DIR_ENV_VAR,Ga as SPRING_PRESETS,Fm as SPA_NAV_HEADER,Kb as SCROLL_BLOCKING_EVENTS,xb as RUNTIME_OWNED_COLON_ATTRS,zb as RUNTIME_HANDLED_X_ATTRS,Fb as RUNTIME_EVENT_NAMES,Db as RUNTIME_DIRECTIVE_NAMES,fd as RESPONSE_STATUS_KEY,gd as RESPONSE_HEADERS_KEY,tb as REACTIVE_RUNTIME_GLOBALS,Jo as ProductionBuild,xr as Portal,Qo as PROJECT_TEMPLATES,kq as PRESETS,sb as NON_CLIENT_PRIMITIVES,Gp as MemorySessionStore,$i as MIME_TYPES,Yi as MEDIA_DEFAULT_WIDTHS,_i as MEDIA_DEFAULT_FORMATS,Tm as LAYOUT_TYPES_FILE,Mj as ImageProcessorCache,Bl as ImageProcessingError,Bp as HydrationRuntime,Jk as HotReloadServer,mb as HeatmapAggregator,Vg as HTML_CLASS_MARKER,Ug as HTML_ATTRS_MARKER,or as Fragment,wr as For,Gm as FRAGMENT_CACHE_CONTROL,D as ErrorLogger,h as ErrorCodes,Rk as EXTERNALIZED_ASSET_DIR,nl as DeployError,ol as DEFAULT_WIDTHS,Aa as DEFAULT_TRANSITION_OPTIONS,Xb as DEFAULT_STATE_DIR,ql as DEFAULT_QUALITY,pj as DEFAULT_PLACEHOLDER_OPTIONS,pl as DEFAULT_FORMATS,Zi as DEFAULT_DPR_VALUES,sp as ComponentHMRHandler,pb as COMPONENT_SCOPE_LOCAL_GLOBALS,Bb as COMPONENT_PASSTHROUGH_X_ATTRS,rb as COMPILE_TIME_ONLY_GLOBALS,hj as COMMON_SIZES,Hg as COLOR_MODE_BOOT_MARKER,Ig as COLOR_MODE_BOOT_GLOBAL,Tg as CLOAK_STYLE,Mn as BroadcastServer,Ln as Broadcast,Ng as BUILD_ID_META,Og as BUILD_ID_HEADER,Ub as BROWSER_CORE_IMPORTS,qj as BLUR_UP_CSS,Ab as ALPINE_BRIDGE_X_ATTRS,Hr as $path};
@@ -1,2 +1,2 @@
1
1
  // @bun
2
- import{jh as x,oh as M,ph as C,qh as v,rh as P}from"./chunk-bcpjhcpn.js";import{Tw as y}from"./chunk-myyj9qp3.js";import{resolve as h,basename as f,extname as u,join as m}from"path";import{mkdir as l}from"fs/promises";var I={enabled:!0,directory:".stx/media-cache",maxAge:30,maxSize:500,cacheVariants:!0,cachePlaceholders:!0};class z{config;constructor(J={}){this.config={...I,...J}}async get(J,Z){return C(J,Z,"image",this.config)}async set(J,Z,Y){return v(J,Z,Y,"image",this.config)}async clear(){return P("image",this.config)}updateConfig(J){this.config={...this.config,...J}}}var H=null;function S(J){if(!H)H=new z(J);else if(J)H.updateConfig(J);return H}async function w(J,Z,Y){let K=Y?{directory:`${Y.outputDir}/../.cache`}:{};return S(K).get(J,Z)}async function Q(J,Z,Y,K){let X=K?{directory:`${K.outputDir}/../.cache`}:{};return S(X).set(J,Z,Y)}async function d(){return S().clear()}async function R(){try{return await import("ts-images")}catch{return null}}function b(J){switch(J){case"quality":return{jpeg:{quality:90,mozjpeg:!0,progressive:!0},png:{compressionLevel:6,palette:!1},webp:{quality:90,effort:6,smartSubsample:!0},avif:{quality:85,effort:6}};case"performance":return{jpeg:{quality:70,mozjpeg:!0,progressive:!0},png:{compressionLevel:9,palette:!0},webp:{quality:70,effort:4,smartSubsample:!0},avif:{quality:60,effort:2}};case"web":default:return{jpeg:{quality:82,mozjpeg:!0,progressive:!0},png:{compressionLevel:8,palette:!1},webp:{quality:82,effort:5,smartSubsample:!0},avif:{quality:75,effort:4}}}}function p(J,Z){let Y=Z?b(Z):b("web"),K=J.formatQuality||{};return{jpeg:{...Y.jpeg,...K.jpeg},png:{...Y.png,...K.png},webp:{...Y.webp,...K.webp},avif:{...Y.avif,...K.avif}}}async function g(J,Z,Y){let K=await R();if(!K)return console.warn("[stx-media] ts-images not installed, skipping optimization"),{src:J,processed:!1};let X=await w(J,Z,Y);if(X)return X;try{let N=h(J);if(!await M(N))return{src:J,processed:!1,errors:[`Source file not found: ${J}`]};let L=p(Y,Z.preset),V=Y.outputDir||"dist/images",F=Y.baseUrl||"/images";await l(V,{recursive:!0});let q=await x(N),U=f(J,u(J)),E=Z.outputFormat?[Z.outputFormat]:Y.defaultFormats||["avif","webp","jpeg"],G={src:J,processed:!0,variants:[],hash:q},j=null;if(Z.transformations&&Z.transformations.length>0)j=await D(N,Z.transformations,K);for(let $ of E){let A=L[$]||{},W=`${U}-${q}.${$}`,_=m(V,W);try{let O=await K.optimizeImage({input:j||N,output:_,format:$,quality:A.quality,progressive:A.progressive});if(O){if(G.variants.push({path:_,url:`${F}/${W}`,width:O.width||0,height:O.height||0,format:$,size:O.outputSize||0}),!G.originalWidth&&O.width)G.originalWidth=O.width,G.originalHeight=O.height}}catch(O){G.errors=G.errors||[],G.errors.push(`Failed to optimize ${$}: ${O}`)}}if(Z.embedThumbhash||Z.placeholder==="thumbhash")try{let $=await K.generateThumbHash(N);G.placeholder=$.dataUrl}catch($){G.errors=G.errors||[],G.errors.push(`Failed to generate thumbhash: ${$}`)}if(Z.useDominantColor)try{let $=await K.generatePlaceholder(N,{strategy:"dominant-color"});G.dominantColor=$.dominantColor}catch($){G.errors=G.errors||[],G.errors.push(`Failed to extract dominant color: ${$}`)}return await Q(J,Z,G,Y),G}catch(N){return{src:J,processed:!1,errors:[`Processing failed: ${N}`]}}}async function n(J,Z,Y,K){let X=await R();if(!X)return{success:!1,error:"ts-images not installed"};try{return{success:!0,size:(await X.optimizeImage({input:J,output:K,format:Z,quality:Y}))?.outputSize}}catch(N){return{success:!1,error:String(N)}}}async function D(J,Z,Y){let K=Y||await R();if(!K)return console.warn("[stx-media] ts-images not installed, skipping transformations"),null;try{let X=await K.decode(J);for(let N of Z){let L=N.options||{};switch(N.type){case"resize":if(L.width||L.height)X=await K.resize(X,{width:L.width,height:L.height,fit:L.fit});break;case"blur":if(L.sigma!==void 0)X=await K.blur(X,L.sigma);break;case"sharpen":if(L.amount!==void 0)X=await K.sharpen(X,L.amount);break;case"grayscale":X=await K.grayscale(X);break;case"rotate":if(L.angle!==void 0)X=await K.rotate(X,L.angle);break;case"flip":X=await K.flip(X);break;case"flop":X=await K.flop(X);break;case"brightness":if(L.value!==void 0)X=await K.brightness(X,L.value);break;case"contrast":if(L.value!==void 0)X=await K.contrast(X,L.value);break;case"saturation":if(L.value!==void 0)X=await K.saturation(X,L.value);break}}return await K.encode(X,"png")}catch(X){return console.error(`[stx-media] Transformation failed: ${X}`),null}}import{resolve as c,basename as i,extname as r,join as o}from"path";import{mkdir as a}from"fs/promises";async function e(){try{return await import("ts-images")}catch{return null}}var s=[320,480,640,768,1024,1280,1536,1920];async function t(J,Z,Y){let K=await e();if(!K)return console.warn("[stx-media] ts-images not installed, skipping responsive generation"),null;let X=c(J);if(!await M(X))return console.warn(`[stx-media] Source file not found: ${J}`),null;try{let N=Z.responsiveWidths||Y.breakpoints||s,L=Z.formats||Y.defaultFormats||["avif","webp","jpeg"],V=Y.outputDir||"dist/images",F=Y.baseUrl||"/images";await a(V,{recursive:!0});let q=await x(X),U=i(J,r(J)),E=Y.formatQuality||{jpeg:{quality:82},png:{quality:80},webp:{quality:82},avif:{quality:75}},G={src:J,byFormat:{},srcsets:{}};for(let $ of L){G.byFormat[$]=[];let A=[];for(let W of N){let _=`${U}-${W}w-${q}.${$}`,O=o(V,_),B=`${F}/${_}`;try{let T=E[$]?.quality||80;if(await M(O)){G.byFormat[$].push({path:O,url:B,width:W,height:0,format:$,size:0}),A.push(`${B} ${W}w`);continue}let k=await K.processImage({input:X,output:O,format:$,quality:T,resize:{width:W}});if(k)G.byFormat[$].push({path:O,url:B,width:W,height:k.height||Math.round(W*(k.height||1)/(k.width||1)),format:$,size:k.outputSize||0}),A.push(`${B} ${W}w`)}catch(T){console.warn(`[stx-media] Failed to generate ${$} at ${W}w: ${T}`)}}G.srcsets[$]=A.join(", ")}let j=Z.placeholder||Y.placeholderStrategy||"thumbhash";if(j!=="none")try{if(j==="thumbhash"){let $=await K.generateThumbHash(X);G.placeholder={dataURL:$.dataUrl,width:$.width||32,height:$.height||32,strategy:"thumbhash"}}else{let $=await K.generatePlaceholder(X,{strategy:j,width:20});G.placeholder={dataURL:$.dataURL,width:$.width,height:$.height,strategy:j}}}catch($){console.warn(`[stx-media] Failed to generate placeholder: ${$}`)}return G.sizes=Z.sizes||JJ(N),G}catch(N){return console.error(`[stx-media] Responsive generation failed: ${N}`),null}}function JJ(J){let Z=[...J].sort((K,X)=>K-X),Y=[];for(let K=0;K<Z.length-1;K++){let X=Z[K];Y.push(`(max-width: ${X}px) ${X}px`)}return Y.push(`${Z[Z.length-1]}px`),Y.join(", ")}function KJ(J,Z="width"){if(!J||J.length===0)return"";if(Z==="dpr")return J.filter((Y)=>Y.dpr).map((Y)=>`${Y.url} ${Y.dpr}x`).join(", ");return J.map((Y)=>`${Y.url} ${Y.width}w`).join(", ")}export{z as Rg,w as Sg,Q as Tg,d as Ug,g as Vg,n as Wg,D as Xg,t as Yg,KJ as Zg};
2
+ import{jh as x,oh as M,ph as C,qh as v,rh as P}from"./chunk-bcpjhcpn.js";import{Uw as y}from"./chunk-1rdm5y91.js";import{resolve as h,basename as f,extname as u,join as m}from"path";import{mkdir as l}from"fs/promises";var I={enabled:!0,directory:".stx/media-cache",maxAge:30,maxSize:500,cacheVariants:!0,cachePlaceholders:!0};class z{config;constructor(J={}){this.config={...I,...J}}async get(J,Z){return C(J,Z,"image",this.config)}async set(J,Z,Y){return v(J,Z,Y,"image",this.config)}async clear(){return P("image",this.config)}updateConfig(J){this.config={...this.config,...J}}}var H=null;function S(J){if(!H)H=new z(J);else if(J)H.updateConfig(J);return H}async function w(J,Z,Y){let K=Y?{directory:`${Y.outputDir}/../.cache`}:{};return S(K).get(J,Z)}async function Q(J,Z,Y,K){let X=K?{directory:`${K.outputDir}/../.cache`}:{};return S(X).set(J,Z,Y)}async function d(){return S().clear()}async function R(){try{return await import("ts-images")}catch{return null}}function b(J){switch(J){case"quality":return{jpeg:{quality:90,mozjpeg:!0,progressive:!0},png:{compressionLevel:6,palette:!1},webp:{quality:90,effort:6,smartSubsample:!0},avif:{quality:85,effort:6}};case"performance":return{jpeg:{quality:70,mozjpeg:!0,progressive:!0},png:{compressionLevel:9,palette:!0},webp:{quality:70,effort:4,smartSubsample:!0},avif:{quality:60,effort:2}};case"web":default:return{jpeg:{quality:82,mozjpeg:!0,progressive:!0},png:{compressionLevel:8,palette:!1},webp:{quality:82,effort:5,smartSubsample:!0},avif:{quality:75,effort:4}}}}function p(J,Z){let Y=Z?b(Z):b("web"),K=J.formatQuality||{};return{jpeg:{...Y.jpeg,...K.jpeg},png:{...Y.png,...K.png},webp:{...Y.webp,...K.webp},avif:{...Y.avif,...K.avif}}}async function g(J,Z,Y){let K=await R();if(!K)return console.warn("[stx-media] ts-images not installed, skipping optimization"),{src:J,processed:!1};let X=await w(J,Z,Y);if(X)return X;try{let N=h(J);if(!await M(N))return{src:J,processed:!1,errors:[`Source file not found: ${J}`]};let L=p(Y,Z.preset),V=Y.outputDir||"dist/images",F=Y.baseUrl||"/images";await l(V,{recursive:!0});let q=await x(N),U=f(J,u(J)),E=Z.outputFormat?[Z.outputFormat]:Y.defaultFormats||["avif","webp","jpeg"],G={src:J,processed:!0,variants:[],hash:q},j=null;if(Z.transformations&&Z.transformations.length>0)j=await D(N,Z.transformations,K);for(let $ of E){let A=L[$]||{},W=`${U}-${q}.${$}`,_=m(V,W);try{let O=await K.optimizeImage({input:j||N,output:_,format:$,quality:A.quality,progressive:A.progressive});if(O){if(G.variants.push({path:_,url:`${F}/${W}`,width:O.width||0,height:O.height||0,format:$,size:O.outputSize||0}),!G.originalWidth&&O.width)G.originalWidth=O.width,G.originalHeight=O.height}}catch(O){G.errors=G.errors||[],G.errors.push(`Failed to optimize ${$}: ${O}`)}}if(Z.embedThumbhash||Z.placeholder==="thumbhash")try{let $=await K.generateThumbHash(N);G.placeholder=$.dataUrl}catch($){G.errors=G.errors||[],G.errors.push(`Failed to generate thumbhash: ${$}`)}if(Z.useDominantColor)try{let $=await K.generatePlaceholder(N,{strategy:"dominant-color"});G.dominantColor=$.dominantColor}catch($){G.errors=G.errors||[],G.errors.push(`Failed to extract dominant color: ${$}`)}return await Q(J,Z,G,Y),G}catch(N){return{src:J,processed:!1,errors:[`Processing failed: ${N}`]}}}async function n(J,Z,Y,K){let X=await R();if(!X)return{success:!1,error:"ts-images not installed"};try{return{success:!0,size:(await X.optimizeImage({input:J,output:K,format:Z,quality:Y}))?.outputSize}}catch(N){return{success:!1,error:String(N)}}}async function D(J,Z,Y){let K=Y||await R();if(!K)return console.warn("[stx-media] ts-images not installed, skipping transformations"),null;try{let X=await K.decode(J);for(let N of Z){let L=N.options||{};switch(N.type){case"resize":if(L.width||L.height)X=await K.resize(X,{width:L.width,height:L.height,fit:L.fit});break;case"blur":if(L.sigma!==void 0)X=await K.blur(X,L.sigma);break;case"sharpen":if(L.amount!==void 0)X=await K.sharpen(X,L.amount);break;case"grayscale":X=await K.grayscale(X);break;case"rotate":if(L.angle!==void 0)X=await K.rotate(X,L.angle);break;case"flip":X=await K.flip(X);break;case"flop":X=await K.flop(X);break;case"brightness":if(L.value!==void 0)X=await K.brightness(X,L.value);break;case"contrast":if(L.value!==void 0)X=await K.contrast(X,L.value);break;case"saturation":if(L.value!==void 0)X=await K.saturation(X,L.value);break}}return await K.encode(X,"png")}catch(X){return console.error(`[stx-media] Transformation failed: ${X}`),null}}import{resolve as c,basename as i,extname as r,join as o}from"path";import{mkdir as a}from"fs/promises";async function e(){try{return await import("ts-images")}catch{return null}}var s=[320,480,640,768,1024,1280,1536,1920];async function t(J,Z,Y){let K=await e();if(!K)return console.warn("[stx-media] ts-images not installed, skipping responsive generation"),null;let X=c(J);if(!await M(X))return console.warn(`[stx-media] Source file not found: ${J}`),null;try{let N=Z.responsiveWidths||Y.breakpoints||s,L=Z.formats||Y.defaultFormats||["avif","webp","jpeg"],V=Y.outputDir||"dist/images",F=Y.baseUrl||"/images";await a(V,{recursive:!0});let q=await x(X),U=i(J,r(J)),E=Y.formatQuality||{jpeg:{quality:82},png:{quality:80},webp:{quality:82},avif:{quality:75}},G={src:J,byFormat:{},srcsets:{}};for(let $ of L){G.byFormat[$]=[];let A=[];for(let W of N){let _=`${U}-${W}w-${q}.${$}`,O=o(V,_),B=`${F}/${_}`;try{let T=E[$]?.quality||80;if(await M(O)){G.byFormat[$].push({path:O,url:B,width:W,height:0,format:$,size:0}),A.push(`${B} ${W}w`);continue}let k=await K.processImage({input:X,output:O,format:$,quality:T,resize:{width:W}});if(k)G.byFormat[$].push({path:O,url:B,width:W,height:k.height||Math.round(W*(k.height||1)/(k.width||1)),format:$,size:k.outputSize||0}),A.push(`${B} ${W}w`)}catch(T){console.warn(`[stx-media] Failed to generate ${$} at ${W}w: ${T}`)}}G.srcsets[$]=A.join(", ")}let j=Z.placeholder||Y.placeholderStrategy||"thumbhash";if(j!=="none")try{if(j==="thumbhash"){let $=await K.generateThumbHash(X);G.placeholder={dataURL:$.dataUrl,width:$.width||32,height:$.height||32,strategy:"thumbhash"}}else{let $=await K.generatePlaceholder(X,{strategy:j,width:20});G.placeholder={dataURL:$.dataURL,width:$.width,height:$.height,strategy:j}}}catch($){console.warn(`[stx-media] Failed to generate placeholder: ${$}`)}return G.sizes=Z.sizes||JJ(N),G}catch(N){return console.error(`[stx-media] Responsive generation failed: ${N}`),null}}function JJ(J){let Z=[...J].sort((K,X)=>K-X),Y=[];for(let K=0;K<Z.length-1;K++){let X=Z[K];Y.push(`(max-width: ${X}px) ${X}px`)}return Y.push(`${Z[Z.length-1]}px`),Y.join(", ")}function KJ(J,Z="width"){if(!J||J.length===0)return"";if(Z==="dpr")return J.filter((Y)=>Y.dpr).map((Y)=>`${Y.url} ${Y.dpr}x`).join(", ");return J.map((Y)=>`${Y.url} ${Y.width}w`).join(", ")}export{z as Rg,w as Sg,Q as Tg,d as Ug,g as Vg,n as Wg,D as Xg,t as Yg,KJ as Zg};
@@ -0,0 +1,2 @@
1
+ // @bun
2
+ import{Eo as a,Fo as b,Go as c,Ho as d,Io as e,Jo as f,Ko as g,Lo as h,Mo as i,No as j,Oo as k}from"./chunk-wgsmawhw.js";import"./chunk-ma41bbjn.js";import"./chunk-49trnqad.js";import"./chunk-c0vjhzjf.js";import"./chunk-vjn3r3sq.js";import"./chunk-cbj5a2tk.js";import"./chunk-fx32tvka.js";import"./chunk-2zbmyvqc.js";import"./chunk-sjpjge04.js";import"./chunk-dfeq9d99.js";import"./chunk-k6bagvmz.js";import"./chunk-sh77d4tv.js";import"./chunk-ystnxqsq.js";import"./chunk-4djwtq0y.js";import"./chunk-7wkxs25k.js";import"./chunk-8kwtg74v.js";import"./chunk-eap7w3a8.js";import"./chunk-h5pdcxre.js";import"./chunk-4vscfb5b.js";import"./chunk-kt6wm51e.js";import"./chunk-1rdm5y91.js";export{b as stripTypeScript,i as splitDeclaration,d as isSyntaxFailure,c as isModuleResolutionFailure,e as isMissingBindingFailure,g as isCompleteImport,k as hasVariables,f as extractVariables,j as extractScriptFromTemplate,h as convertToCommonJS,a as STX_ENGINE_BINDING_NAMES};
@@ -1,5 +1,5 @@
1
1
  // @bun
2
- import{fi as jH}from"./chunk-660e7tfb.js";import{Eo as e,Np as S,Op as zH,Pp as qH,Sp as JH,Tp as WH,Up as VH,Vp as AH,Wp as GH,Xp as UH,Yp as FH,Zp as MH,_p as XH,am as $H,yr as BH}from"./chunk-508xtkyq.js";import{tt as f}from"./chunk-2zbmyvqc.js";import{Bv as D}from"./chunk-x8t29tnr.js";import{existsSync as x,readFileSync as m}from"fs";import U from"path";var EH=new Set(["module","exports","require","$bool","window","document","console","confirm","alert","fetch"]),HH=e.filter((H)=>!EH.has(H)).sort(),KH=[...D].sort(),DH=[...new Set([...HH,...KH])].sort(),PH=new Set(HH),TH=new Set(KH),SH=new Set(DH),t=/\bimport\s+(?!type[\s{])\{([^}]*)\}\s*from\s*(['"])stx\2/g;function xH(H,K){if(K==="server")return`'${H}' is not provided by 'stx' in a <script server> block. The engine binds only its own names there (defineProps, state, useHead, ...); any other name becomes \`await import('stx')\`, which does not resolve, so the whole script fails when the page renders. Import it from '@stacksjs/stx' instead.`;return`'${H}' is not provided by 'stx' in a client <script> block. The import is replaced by the window.stx runtime, which has no '${H}', so it is undefined in the browser.`}function QH(H,K){let Z=[];for(let q of K){if(q.offset===void 0)continue;let Y=q.kind==="server"?PH:TH;t.lastIndex=0;for(let z of q.code.matchAll(t)){let A=z.index+z[0].indexOf("{")+1;for(let G of z[1].matchAll(/[^,]+/g)){let X=G[0];if(/^\s*type\s/.test(X))continue;let M=/^\s*([A-Za-z_$][\w$]*)/.exec(X);if(!M)continue;let $=M[1];if(!SH.has($)||Y.has($))continue;let V=q.offset+A+G.index+M[0].length-$.length,J=H.slice(0,V),I=J.split(`
2
+ import{fi as jH}from"./chunk-mza7h890.js";import{Eo as e,Np as S,Op as zH,Pp as qH,Sp as JH,Tp as WH,Up as VH,Vp as AH,Wp as GH,Xp as UH,Yp as FH,Zp as MH,_p as XH,am as $H,yr as BH}from"./chunk-wgsmawhw.js";import{tt as f}from"./chunk-2zbmyvqc.js";import{yv as D}from"./chunk-eap7w3a8.js";import{existsSync as x,readFileSync as m}from"fs";import U from"path";var EH=new Set(["module","exports","require","$bool","window","document","console","confirm","alert","fetch"]),HH=e.filter((H)=>!EH.has(H)).sort(),KH=[...D].sort(),DH=[...new Set([...HH,...KH])].sort(),PH=new Set(HH),TH=new Set(KH),SH=new Set(DH),t=/\bimport\s+(?!type[\s{])\{([^}]*)\}\s*from\s*(['"])stx\2/g;function xH(H,K){if(K==="server")return`'${H}' is not provided by 'stx' in a <script server> block. The engine binds only its own names there (defineProps, state, useHead, ...); any other name becomes \`await import('stx')\`, which does not resolve, so the whole script fails when the page renders. Import it from '@stacksjs/stx' instead.`;return`'${H}' is not provided by 'stx' in a client <script> block. The import is replaced by the window.stx runtime, which has no '${H}', so it is undefined in the browser.`}function QH(H,K){let Z=[];for(let q of K){if(q.offset===void 0)continue;let Y=q.kind==="server"?PH:TH;t.lastIndex=0;for(let z of q.code.matchAll(t)){let A=z.index+z[0].indexOf("{")+1;for(let G of z[1].matchAll(/[^,]+/g)){let X=G[0];if(/^\s*type\s/.test(X))continue;let M=/^\s*([A-Za-z_$][\w$]*)/.exec(X);if(!M)continue;let $=M[1];if(!SH.has($)||Y.has($))continue;let V=q.offset+A+G.index+M[0].length-$.length,J=H.slice(0,V),I=J.split(`
3
3
  `).length;Z.push({line:I,column:V-(J.lastIndexOf(`
4
4
  `)+1)+1,offset:V,length:$.length,name:$,kind:q.kind,message:xH($,q.kind)})}}}return Z}import w from"path";var hH="@stacksjs/stx-typescript-plugin";function kH(H,K){let Z=w.resolve(H);for(;;){let q=w.join(Z,"tsconfig.json");if(K(q))return q;let Y=w.dirname(Z);if(Y===Z)return;Z=Y}}function YH(H,K,Z){let q=kH(H,Z);if(!q)return;let Y=new Set,z=(A)=>{if(Y.has(A))return;Y.add(A);let G=K(A);if(!G)return;let X=G.compilerOptions?.plugins;if(Array.isArray(X)){let $=X.find((J)=>J?.name===hH),V=Array.isArray($?.libs)?$.libs.filter((J)=>typeof J==="string"):[];return $?{configPath:A,libs:V.map((J)=>w.resolve(w.dirname(A),J))}:null}let M=typeof G.extends==="string"?[G.extends]:Array.isArray(G.extends)?G.extends:[];for(let $ of[...M].reverse()){if(typeof $!=="string"||!$.startsWith("."))continue;let V=w.resolve(w.dirname(A),$.endsWith(".json")?$:`${$}.json`),J=z(V);if(J!==void 0)return J}return};return z(q)??void 0}function gH(H,K="",Z=""){let q=H.startLine>1?`
5
5
  `.repeat(H.startLine-1):"",Y=UH(H)+qH(zH(H.code)),z=H.kind==="client"||H.kind==="plain"?VH(K,H.code):"";return GH(`${q+Y}
@@ -0,0 +1,2 @@
1
+ // @bun
2
+ import{ho as b,io as c,jo as d}from"./chunk-wgsmawhw.js";import"./chunk-ma41bbjn.js";import"./chunk-49trnqad.js";import"./chunk-c0vjhzjf.js";import"./chunk-vjn3r3sq.js";import"./chunk-cbj5a2tk.js";import"./chunk-fx32tvka.js";import"./chunk-2zbmyvqc.js";import"./chunk-sjpjge04.js";import"./chunk-dfeq9d99.js";import"./chunk-k6bagvmz.js";import"./chunk-sh77d4tv.js";import"./chunk-ystnxqsq.js";import{pv as a}from"./chunk-4djwtq0y.js";import"./chunk-7wkxs25k.js";import"./chunk-8kwtg74v.js";import"./chunk-eap7w3a8.js";import"./chunk-h5pdcxre.js";import"./chunk-4vscfb5b.js";import"./chunk-kt6wm51e.js";import"./chunk-1rdm5y91.js";export{b as rendersAsElement,c as processESImports,d as processComponents,a as freeIdentifiers};
@@ -1,2 +1,2 @@
1
1
  // @bun
2
- import{nf as t,of as u,pf as v,qf as w,rf as x,sf as y,tf as z,uf as A,vf as B,wf as C,xf as D,yf as E}from"./chunk-m7zebyq5.js";import{Af as s,zf as r}from"./chunk-eewneg7t.js";import{Bf as b,Cf as c,Df as d,Ef as e,Ff as f,Gf as g,Hf as h,Jf as i,Kf as j,Lf as k,Mf as l,Nf as m,Of as n,Pf as o,Qf as p,Rf as q}from"./chunk-km3e88cy.js";import{ei as a}from"./chunk-g1vxsvqv.js";import"./chunk-cbj5a2tk.js";import"./chunk-myyj9qp3.js";export{D as writeImageManifest,a as rewriteImagesWithSiblings,t as renderImageComponent,v as processImageComponents,g as processImage,u as parseImageComponent,A as optimizeImage,B as optimizeDirectory,e as isSharpAvailable,m as isImageFile,f as isImageBackendAvailable,y as imageDirective,r as handleImageRequest,l as groupVariantsByFormat,o as getTotalSize,n as getMimeType,h as getImageMetadata,k as getFallbackVariant,i as generateSrcSet,j as generateSizes,C as generateImageManifest,p as formatSize,E as defaultImageConfig,z as createImagePlugin,s as createImageHandler,x as createImageDirective,w as clearImageCache,q as ImageProcessingError,b as DEFAULT_WIDTHS,d as DEFAULT_QUALITY,c as DEFAULT_FORMATS};
2
+ import{nf as t,of as u,pf as v,qf as w,rf as x,sf as y,tf as z,uf as A,vf as B,wf as C,xf as D,yf as E}from"./chunk-01mh30km.js";import{Af as s,zf as r}from"./chunk-qg4e12et.js";import{Bf as b,Cf as c,Df as d,Ef as e,Ff as f,Gf as g,Hf as h,Jf as i,Kf as j,Lf as k,Mf as l,Nf as m,Of as n,Pf as o,Qf as p,Rf as q}from"./chunk-q4vhc2hd.js";import{ei as a}from"./chunk-g1vxsvqv.js";import"./chunk-cbj5a2tk.js";import"./chunk-1rdm5y91.js";export{D as writeImageManifest,a as rewriteImagesWithSiblings,t as renderImageComponent,v as processImageComponents,g as processImage,u as parseImageComponent,A as optimizeImage,B as optimizeDirectory,e as isSharpAvailable,m as isImageFile,f as isImageBackendAvailable,y as imageDirective,r as handleImageRequest,l as groupVariantsByFormat,o as getTotalSize,n as getMimeType,h as getImageMetadata,k as getFallbackVariant,i as generateSrcSet,j as generateSizes,C as generateImageManifest,p as formatSize,E as defaultImageConfig,z as createImagePlugin,s as createImageHandler,x as createImageDirective,w as clearImageCache,q as ImageProcessingError,b as DEFAULT_WIDTHS,d as DEFAULT_QUALITY,c as DEFAULT_FORMATS};
@@ -0,0 +1,2 @@
1
+ // @bun
2
+ import{Ue as a}from"./chunk-3t2xac1c.js";import"./chunk-wgsmawhw.js";import"./chunk-ma41bbjn.js";import"./chunk-49trnqad.js";import"./chunk-c0vjhzjf.js";import"./chunk-vjn3r3sq.js";import"./chunk-cbj5a2tk.js";import"./chunk-fx32tvka.js";import"./chunk-2zbmyvqc.js";import"./chunk-sjpjge04.js";import"./chunk-dfeq9d99.js";import"./chunk-k6bagvmz.js";import"./chunk-sh77d4tv.js";import"./chunk-ystnxqsq.js";import"./chunk-4djwtq0y.js";import"./chunk-7wkxs25k.js";import"./chunk-8kwtg74v.js";import"./chunk-eap7w3a8.js";import"./chunk-h5pdcxre.js";import"./chunk-4vscfb5b.js";import"./chunk-kt6wm51e.js";import"./chunk-1rdm5y91.js";export{a as startInteractive};
@@ -0,0 +1,2 @@
1
+ // @bun
2
+ import{$p as e,Jo as a,Lo as b,No as c,Oo as d,aq as f,bq as g,cq as h,dq as i,eq as j,fq as k,gq as l,hq as m,iq as n,jq as o,kq as p,lq as q,mq as r,nq as s,oq as t,pq as u,qq as v,rq as w,sq as x,tq as y}from"./chunk-wgsmawhw.js";import"./chunk-ma41bbjn.js";import"./chunk-49trnqad.js";import"./chunk-c0vjhzjf.js";import"./chunk-vjn3r3sq.js";import"./chunk-cbj5a2tk.js";import"./chunk-fx32tvka.js";import"./chunk-2zbmyvqc.js";import"./chunk-sjpjge04.js";import"./chunk-dfeq9d99.js";import"./chunk-k6bagvmz.js";import"./chunk-sh77d4tv.js";import"./chunk-ystnxqsq.js";import"./chunk-4djwtq0y.js";import"./chunk-7wkxs25k.js";import"./chunk-8kwtg74v.js";import"./chunk-eap7w3a8.js";import"./chunk-h5pdcxre.js";import"./chunk-4vscfb5b.js";import"./chunk-kt6wm51e.js";import"./chunk-1rdm5y91.js";export{e as validateTemplate,g as validateDirective,o as userComponentFileExists,m as transpileTypeScript,q as slotContentHasExpressions,k as shouldTranspileTypeScript,n as scopeOnRootElement,u as resolveTemplatePath,s as renderComponentWithSlot,j as isJavaScriptScript,p as isHydrateTrigger,d as hasVariables,h as hasDirectives,v as getSourceLineInfo,l as getSharedTranspiler,f as getPositionInfo,y as getComponentCacheStats,t as fileExists,a as extractVariables,c as extractScriptFromTemplate,i as extractDirectiveNames,w as createDetailedErrorMessage,b as convertToCommonJS,r as componentClientSignalNames,x as clearComponentCache};
@@ -2,4 +2,4 @@
2
2
  function A(h){let q=/import\s*\{([^}]+)\}\s*from\s*['"](@stores|stx\/stores)['"]\s*;?\n?/g;h=h.replace(q,(w,j)=>{return`const { ${j.split(",").map((k)=>k.trim()).filter(Boolean).join(", ")} } = window.__STX_STORES__
3
3
  `});let v=/import\s*\{([^}]+)\}\s*from\s*['"]@composables['"]\s*;?\n?/g;return h=h.replace(v,(w,j)=>{return`const { ${j.split(",").map((k)=>k.trim()).filter(Boolean).join(", ")} } = window.__composables
4
4
  `}),h}function B(h){return h.replace(/^import\s+[^'"]*?from\s*['"][^'"]+['"]\s*;?[ \t]*$/gm,"").replace(/^import\s+['"][^'"]+['"]\s*;?[ \t]*$/gm,"")}
5
- export{A as wv,B as xv};
5
+ export{A as tv,B as uv};
@@ -1,2 +1,2 @@
1
1
  // @bun
2
- import{dt as a,et as b,ft as c,gt as d,ht as e,it as f,jt as g,kt as h,lt as i,mt as j,nt as k,ot as l}from"./chunk-a3fsqjag.js";import"./chunk-2zbmyvqc.js";import"./chunk-myyj9qp3.js";export{e as resolveUserCssConfig,c as resetCssCache,h as rebuildCss,d as loadCssEngineConfig,b as loadCssEngine,l as injectCss,a as getCssServeAsset,i as getCachedCSS,k as generateCss,f as fingerprintConfig,j as extractClassNames,g as buildCss};
2
+ import{dt as a,et as b,ft as c,gt as d,ht as e,it as f,jt as g,kt as h,lt as i,mt as j,nt as k,ot as l}from"./chunk-fx32tvka.js";import"./chunk-2zbmyvqc.js";import"./chunk-1rdm5y91.js";export{e as resolveUserCssConfig,c as resetCssCache,h as rebuildCss,d as loadCssEngineConfig,b as loadCssEngine,l as injectCss,a as getCssServeAsset,i as getCachedCSS,k as generateCss,f as fingerprintConfig,j as extractClassNames,g as buildCss};
@@ -0,0 +1,2 @@
1
+ // @bun
2
+ import{Uk as a,Vk as b,Wk as c,Xk as d,Yk as e}from"./chunk-kagjfzk0.js";import"./chunk-kt6wm51e.js";import"./chunk-1rdm5y91.js";export{b as injectPwaTags,e as generateThemeColorMeta,c as generateSwRegistrationScript,a as generatePwaTags,d as generateManifestLink};
@@ -1,4 +1,4 @@
1
1
  // @bun
2
2
  var E=new Set(["area","base","br","col","embed","hr","img","input","link","meta","param","source","track","wbr"]),N=new Set(["html","head","body","p","li","dt","dd","rt","rp","option","optgroup","thead","tbody","tfoot","tr","td","th","colgroup","caption"]);function X(Q){return Q.replace(/[^\n]/g," ")}function R(Q){let H=Q.replace(/<script\b[^>]*>[\s\S]*?<\/script>/gi,X).replace(/<style\b[^>]*>[\s\S]*?<\/style>/gi,X).replace(/<!--[\s\S]*?-->/g,X).replace(/\{\{\{[\s\S]*?\}\}\}/g,X).replace(/\{\{[\s\S]*?\}\}/g,X).replace(/\{!![\s\S]*?!!\}/g,X),F=new Map,J=new Map,Y=/<(\/?)([A-Za-z][\w-]*)\b(?:[^>"']|"[^"]*"|'[^']*')*?(\/?)>/g,z;while((z=Y.exec(H))!==null){let j=z[1]==="/",q=z[2],W=z[3]==="/";if(E.has(q.toLowerCase()))continue;if(W)continue;if(j)J.set(q,(J.get(q)??0)+1);else{let Z=F.get(q);if(Z)Z.count++;else{let B=H.slice(0,z.index).split(`
3
3
  `).length;F.set(q,{count:1,firstLine:B})}}}let M=[];for(let j of new Set([...F.keys(),...J.keys()])){if(N.has(j.toLowerCase()))continue;let q=F.get(j)?.count??0,W=J.get(j)??0;if(q!==W)M.push({tag:j,opened:q,closed:W,firstOpenLine:F.get(j)?.firstLine??0})}return M}var $=new Set;function U(Q,H){let F;try{F=R(Q)}catch{return}if(F.length===0)return;let J=`${H}:${Q.length}`;if($.has(J))return;$.add(J);let Y=H?H.split(/[/\\]/).pop()||H:"template";for(let{tag:z,opened:M,closed:j,firstOpenLine:q}of F)if(M>j){let W=q?` (first opened at line ${q})`:"";console.warn(`[stx] ${Y}: <${z}> ${M} opened, ${j} closed \u2014 an unclosed <${z}>${W} may swallow the content that follows it.`)}else console.warn(`[stx] ${Y}: <${z}> ${M} opened, ${j} closed \u2014 ${j-M} stray </${z}>.`)}
4
- export{R as yv,U as zv};
4
+ export{R as vv,U as wv};
@@ -0,0 +1,2 @@
1
+ // @bun
2
+ import{Jp as b,Kp as c,Lp as d,Mp as e,no as a}from"./chunk-wgsmawhw.js";import"./chunk-ma41bbjn.js";import"./chunk-49trnqad.js";import"./chunk-c0vjhzjf.js";import"./chunk-vjn3r3sq.js";import"./chunk-cbj5a2tk.js";import"./chunk-fx32tvka.js";import"./chunk-2zbmyvqc.js";import"./chunk-sjpjge04.js";import"./chunk-dfeq9d99.js";import"./chunk-k6bagvmz.js";import"./chunk-sh77d4tv.js";import"./chunk-ystnxqsq.js";import"./chunk-4djwtq0y.js";import"./chunk-7wkxs25k.js";import"./chunk-8kwtg74v.js";import"./chunk-eap7w3a8.js";import"./chunk-h5pdcxre.js";import"./chunk-4vscfb5b.js";import"./chunk-kt6wm51e.js";import"./chunk-1rdm5y91.js";export{d as validateClientScript,c as processOnceDirective,b as processJsonDirective,e as processDirectives,a as injectRouterScript};
@@ -0,0 +1,2 @@
1
+ // @bun
2
+ import{ii as a}from"./chunk-fqq5k9ve.js";import"./chunk-1rdm5y91.js";export{a as processDeferDirectives};