@stacksjs/stx 0.2.855 → 0.2.857

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 (154) hide show
  1. package/dist/{chunk-6w3gv9d6.js → chunk-03t7tk2k.js} +1 -1
  2. package/dist/{chunk-jn6mdfrs.js → chunk-08a7j82a.js} +1 -1
  3. package/dist/{chunk-5ppe8d51.js → chunk-08vwk3x7.js} +1 -1
  4. package/dist/{chunk-0dmpc70r.js → chunk-0d3z8hwz.js} +14 -14
  5. package/dist/{chunk-k0arm18k.js → chunk-0hrkpb2h.js} +1 -1
  6. package/dist/{chunk-yzvp90yk.js → chunk-0veh8bcn.js} +2 -2
  7. package/dist/{chunk-4cd94cd5.js → chunk-1277d5we.js} +4 -4
  8. package/dist/{chunk-279n7sde.js → chunk-16p1vkn6.js} +3 -3
  9. package/dist/{chunk-zqb294v2.js → chunk-1772ax8e.js} +1 -1
  10. package/dist/chunk-1ffkbwdz.js +2 -0
  11. package/dist/{chunk-xfb7fdeq.js → chunk-1kmzj10y.js} +10 -10
  12. package/dist/{chunk-w032x0zm.js → chunk-1nankvf6.js} +2 -2
  13. package/dist/chunk-1qbagang.js +2 -0
  14. package/dist/{chunk-7tteg9bn.js → chunk-1qvtme01.js} +1 -1
  15. package/dist/{chunk-gn1dmfdv.js → chunk-1xx55d2p.js} +1 -1
  16. package/dist/{chunk-q0ycypnt.js → chunk-1ywqsmy2.js} +1 -1
  17. package/dist/{chunk-9n3584wt.js → chunk-23mccy5y.js} +1 -1
  18. package/dist/{chunk-2j2qzv8g.js → chunk-27zp4q77.js} +2 -2
  19. package/dist/chunk-2a471sw1.js +3 -0
  20. package/dist/{chunk-33ph9zb2.js → chunk-2cy33z00.js} +2 -2
  21. package/dist/chunk-2jrf9m4w.js +2 -0
  22. package/dist/chunk-3jgrrjvx.js +2 -0
  23. package/dist/{chunk-q0jmc3m4.js → chunk-3wabhzf4.js} +8 -8
  24. package/dist/{chunk-68pvvd7v.js → chunk-3zjyhhg4.js} +3 -3
  25. package/dist/{chunk-gxqtbbz0.js → chunk-41md2f3q.js} +3 -3
  26. package/dist/{chunk-ngnvyqk3.js → chunk-432c35hs.js} +2 -2
  27. package/dist/{chunk-a2fngjfx.js → chunk-4h9kkkh7.js} +1 -1
  28. package/dist/{chunk-h1f3dpvq.js → chunk-4tzsze9z.js} +2 -2
  29. package/dist/chunk-655m8g98.js +2 -0
  30. package/dist/chunk-68kspmq4.js +2 -0
  31. package/dist/{chunk-e8zpzt9s.js → chunk-6tpcm12w.js} +1 -1
  32. package/dist/chunk-6x0jm4bv.js +2 -0
  33. package/dist/{chunk-w835crjw.js → chunk-6zj9wsy3.js} +1 -1
  34. package/dist/{chunk-0vg0j7xa.js → chunk-827rt3ew.js} +1 -1
  35. package/dist/{chunk-fzkyk5j4.js → chunk-8hymdzv2.js} +4 -4
  36. package/dist/chunk-8j8fth4b.js +2 -0
  37. package/dist/{chunk-enxnw50k.js → chunk-8ta5b0eb.js} +1 -1
  38. package/dist/{chunk-pwem4sed.js → chunk-914wcp1a.js} +3 -3
  39. package/dist/{chunk-f858fazq.js → chunk-93cgpqva.js} +1 -1
  40. package/dist/{chunk-car6nhfe.js → chunk-9n8t7v78.js} +2 -2
  41. package/dist/chunk-9wf5fx4s.js +2 -0
  42. package/dist/chunk-a4v8z93r.js +2 -0
  43. package/dist/{chunk-463zkecq.js → chunk-a53jtd74.js} +1 -1
  44. package/dist/{chunk-krtkxnz6.js → chunk-admnvsmx.js} +2 -2
  45. package/dist/chunk-b16g785w.js +2 -0
  46. package/dist/{chunk-ctb1bj28.js → chunk-bg574nvy.js} +3 -3
  47. package/dist/{chunk-fbpqkrvb.js → chunk-bq6jy4yk.js} +3 -3
  48. package/dist/{chunk-hgy98n76.js → chunk-cama7kaq.js} +3 -3
  49. package/dist/chunk-ccdp6g5z.js +2 -0
  50. package/dist/chunk-chr56bhk.js +2 -0
  51. package/dist/{chunk-v8p8t3t4.js → chunk-cskmp5p1.js} +1 -1
  52. package/dist/{chunk-77kanny8.js → chunk-cvrkr3re.js} +9 -9
  53. package/dist/{chunk-9r999ees.js → chunk-dhpd4mx7.js} +2 -2
  54. package/dist/{chunk-9hvfmqs1.js → chunk-dnrgcjds.js} +8 -8
  55. package/dist/chunk-dtxg2a6m.js +2 -0
  56. package/dist/{chunk-wzv7k91a.js → chunk-e8we717q.js} +2 -2
  57. package/dist/{chunk-zswtgwxg.js → chunk-eefdz43s.js} +1 -1
  58. package/dist/chunk-ent64fyq.js +2 -0
  59. package/dist/chunk-erfspa7v.js +2 -0
  60. package/dist/chunk-f0kveh4g.js +2 -0
  61. package/dist/{chunk-anva219c.js → chunk-f1vvhbmw.js} +2 -2
  62. package/dist/chunk-f1z6y2ts.js +2 -0
  63. package/dist/chunk-f3msj6jf.js +2 -0
  64. package/dist/chunk-fk7wk568.js +2 -0
  65. package/dist/{chunk-mv48q1p4.js → chunk-fp24ecp8.js} +65 -65
  66. package/dist/{chunk-9z7fnv33.js → chunk-fyp1v087.js} +1 -1
  67. package/dist/{chunk-1qybwj8k.js → chunk-g0h1gxew.js} +11 -11
  68. package/dist/{chunk-kez50h8a.js → chunk-gggethdc.js} +1 -1
  69. package/dist/{chunk-7kc9xwht.js → chunk-gqrypyk7.js} +2 -2
  70. package/dist/chunk-gr19kv83.js +2 -0
  71. package/dist/{chunk-ynd2nfvs.js → chunk-hfng042r.js} +26 -26
  72. package/dist/chunk-hj1yn8w5.js +2 -0
  73. package/dist/{chunk-7hp50cpd.js → chunk-htwn1f36.js} +6 -6
  74. package/dist/chunk-hzrcnxzg.js +2 -0
  75. package/dist/{chunk-vw73gsxx.js → chunk-j2s8j7ff.js} +3 -3
  76. package/dist/chunk-jed9n2hz.js +2 -0
  77. package/dist/{chunk-xn2gyhes.js → chunk-jefafv6s.js} +4 -4
  78. package/dist/chunk-jhm1228j.js +4 -0
  79. package/dist/chunk-js7nmw8v.js +2 -0
  80. package/dist/chunk-k0ert6e7.js +3 -0
  81. package/dist/{chunk-2rxr5cj6.js → chunk-mfwfaggj.js} +9 -9
  82. package/dist/{chunk-hpwtjb4a.js → chunk-mzes9ds7.js} +2 -2
  83. package/dist/chunk-n68sanmz.js +2 -0
  84. package/dist/{chunk-cy60hmv2.js → chunk-npzzbdn1.js} +1 -1
  85. package/dist/chunk-nstcwcpj.js +2 -0
  86. package/dist/{chunk-ybq56wam.js → chunk-pb09xy77.js} +2 -2
  87. package/dist/chunk-q87hkwfg.js +3 -0
  88. package/dist/chunk-qe6631me.js +2 -0
  89. package/dist/{chunk-ma4ftg5p.js → chunk-qvydfw8g.js} +4 -4
  90. package/dist/{chunk-pesgcwrj.js → chunk-qw0ctwnc.js} +3 -3
  91. package/dist/chunk-rrf78ezg.js +2 -0
  92. package/dist/{chunk-4dfz7cdr.js → chunk-sb7zn84j.js} +5 -5
  93. package/dist/{chunk-f9thwm8c.js → chunk-sftyb8k4.js} +8 -8
  94. package/dist/{chunk-zme05d1n.js → chunk-sgnkbgx1.js} +1 -1
  95. package/dist/chunk-shy2hkvj.js +2 -0
  96. package/dist/{chunk-v4bqmzj9.js → chunk-sny8rqe8.js} +2 -2
  97. package/dist/{chunk-csgfws3j.js → chunk-v1eycdhj.js} +2 -2
  98. package/dist/{chunk-eegs2at0.js → chunk-vmrvkbw6.js} +1 -1
  99. package/dist/chunk-vr5h5jpw.js +2 -0
  100. package/dist/{chunk-11y3106w.js → chunk-wdh20fxz.js} +1 -1
  101. package/dist/chunk-wg7xzens.js +2 -0
  102. package/dist/{chunk-te82sjhy.js → chunk-xejhmsfw.js} +7 -7
  103. package/dist/{chunk-4wrddn8m.js → chunk-xfymp197.js} +9 -9
  104. package/dist/{chunk-qxk9grjm.js → chunk-xqr2ec9k.js} +1 -1
  105. package/dist/{chunk-fba71th7.js → chunk-xw12cd90.js} +7 -7
  106. package/dist/{chunk-gsn5vvw4.js → chunk-y5agvhgg.js} +1 -1
  107. package/dist/chunk-zd2c84ct.js +2 -0
  108. package/dist/{chunk-yscys65t.js → chunk-zrsc45wv.js} +1 -1
  109. package/dist/{chunk-mhjxx64x.js → chunk-zx5bt056.js} +24 -24
  110. package/dist/cli.js +17 -17
  111. package/dist/component-client-factories.js +6 -5
  112. package/dist/craft-entry.js +1 -1
  113. package/dist/craft.js +1 -1
  114. package/dist/pwa.js +3 -3
  115. package/dist/ssg.js +8 -8
  116. package/dist/utils.js +3 -2
  117. package/package.json +5 -5
  118. package/dist/chunk-161ksm7f.js +0 -2
  119. package/dist/chunk-1p968nww.js +0 -2
  120. package/dist/chunk-2y20dvab.js +0 -2
  121. package/dist/chunk-33yeb861.js +0 -2
  122. package/dist/chunk-3pm6d9zj.js +0 -2
  123. package/dist/chunk-3wt0nh3p.js +0 -2
  124. package/dist/chunk-5dykcrnv.js +0 -2
  125. package/dist/chunk-5xcxc9f8.js +0 -2
  126. package/dist/chunk-6bm19d4k.js +0 -2
  127. package/dist/chunk-81z64a84.js +0 -2
  128. package/dist/chunk-8gsd2n0j.js +0 -2
  129. package/dist/chunk-8kqqxqyp.js +0 -2
  130. package/dist/chunk-8qe34jb8.js +0 -3
  131. package/dist/chunk-bk0arddt.js +0 -2
  132. package/dist/chunk-c557w9e6.js +0 -2
  133. package/dist/chunk-cfmjtyzm.js +0 -2
  134. package/dist/chunk-ck9zengd.js +0 -2
  135. package/dist/chunk-cwt26rvt.js +0 -3
  136. package/dist/chunk-dbag44ta.js +0 -2
  137. package/dist/chunk-dfcnaaym.js +0 -2
  138. package/dist/chunk-ehp792dy.js +0 -3
  139. package/dist/chunk-ggthncvg.js +0 -2
  140. package/dist/chunk-hfcagm39.js +0 -2
  141. package/dist/chunk-hfe2byfx.js +0 -2
  142. package/dist/chunk-hmys6w75.js +0 -2
  143. package/dist/chunk-hqtj4ngq.js +0 -2
  144. package/dist/chunk-j3s5y2k5.js +0 -2
  145. package/dist/chunk-ns5epsng.js +0 -2
  146. package/dist/chunk-p91288ce.js +0 -2
  147. package/dist/chunk-pw6n7a9k.js +0 -2
  148. package/dist/chunk-qccpfn5x.js +0 -2
  149. package/dist/chunk-vbsr76qe.js +0 -2
  150. package/dist/chunk-vgaqznwt.js +0 -2
  151. package/dist/chunk-w165qe5q.js +0 -2
  152. package/dist/chunk-wz54wsm7.js +0 -2
  153. package/dist/chunk-x4077p94.js +0 -2
  154. package/dist/chunk-z0qfspzg.js +0 -4
@@ -1,5 +1,5 @@
1
1
  // @bun
2
- import{kl,_l,Cl}from"./chunk-ngnvyqk3.js";import{ue,Kn,Gn,_o,Qr,es,Xn,Jn,Co,ts}from"./chunk-csgfws3j.js";function z(e,o,l,r,d,y){let s=!0,u=new Set,h=(p)=>r.get?r.get(p):p,a=()=>h(e());return Object.defineProperty(a,"_isSignal",{value:!0}),Object.defineProperty(a,"modifiers",{get:o}),a.set=(p)=>{if(!s)return;let f=o(),t=r.set?r.set(p,f):p;if(f.trim&&typeof t==="string")t=t.trim();if(f.number&&typeof t==="string"&&t!==""){let i=Number(t);if(!Number.isNaN(i))t=i}if(Object.is(e(),t))return;e.set(t),l(t)},a.update=(p)=>a.set(p(a())),a.input=(p)=>{if(!o().lazy)a.set(p)},a.change=(p)=>{if(o().lazy)a.set(p)},a.subscribe=(p)=>{if(!s)return()=>{};let f=e.subscribe((t,i)=>p(h(t),h(i)));return u.add(f),()=>{f(),u.delete(f)}},Object.defineProperty(a,"value",{get:a,set:a.set}),d(()=>{s=!1,u.forEach((p)=>p()),u.clear()}),y?.(()=>{s=!0}),a}function X(e,o=!0,l){if(!o||!e||typeof window>"u")return;let r=window;if(!r.__STX_DATA__){let y=document.querySelector("script[data-stx-server-data]");try{let s=JSON.parse(y?.textContent||"{}");r.__STX_DATA__=s&&typeof s==="object"&&!Array.isArray(s)?s:{}}catch{r.__STX_DATA__={}}}let d=r.__STX_DATA__;if(d&&Object.prototype.hasOwnProperty.call(d,e))try{return{data:l?l(d[e]):d[e]}}catch(y){return{data:null,error:y instanceof Error?y:Error(String(y))}}return}function Q(e){if(typeof window>"u")return;let o=window;if(e===void 0)o.__STX_DATA__={};else{if(!o.__STX_DATA__)try{let l=JSON.parse(document.querySelector("script[data-stx-server-data]")?.textContent||"{}");o.__STX_DATA__=l&&typeof l==="object"&&!Array.isArray(l)?l:{}}catch{o.__STX_DATA__={}}if(o.__STX_DATA__)delete o.__STX_DATA__[e]}}function Y(e){let o=null;try{o=typeof indexedDB<"u"?indexedDB:null}catch{o=null}if(!o)return null;let l=o,r=e||"stx-kept",d=null,y=()=>{if(!d)d=new Promise((u,h)=>{let a=l.open(r,1);a.onupgradeneeded=()=>{a.result.createObjectStore("kv")},a.onsuccess=()=>u(a.result),a.onerror=()=>h(a.error),a.onblocked=()=>h(Error("blocked"))}),d.catch(()=>{d=null});return d},s=(u,h)=>y().then((a)=>new Promise((p,f)=>{let t=a.transaction("kv",u),i=h(t.objectStore("kv"));t.oncomplete=()=>p(i?i.result:void 0),t.onerror=()=>f(t.error),t.onabort=()=>f(t.error)}));return{get:(u)=>s("readonly",(h)=>h.get(u)),set:(u,h)=>s("readwrite",(a)=>{a.put(h,u)}),remove:(u)=>s("readwrite",(h)=>{h.delete(u)}),removePrefix:(u)=>s("readwrite",(h)=>{h.delete(IDBKeyRange.bound(u,`${u}\uFFFF`))})}}function J(e,o){let l=e||{},r=null;if(l.storage!==void 0)r=l.storage;else try{r=typeof localStorage<"u"?localStorage:null}catch{r=null}let d=null,y=l.backend!==void 0;if(y)d=l.backend||null;let s=()=>{if(y)return d;y=!0;try{d=o?o():null}catch{d=null}if(d){let n=d;n.get("__stx_probe__").catch(()=>{if(d===n)d=null})}return d},u=l.limit||32768,h=l.defer||((n)=>{let c=typeof requestIdleCallback==="function"?requestIdleCallback:null;if(c)c(n,{timeout:200});else setTimeout(n,16)}),a=new Map,p=new Set,f=new Map,t=!1,i=Promise.resolve(),g=(n)=>{try{return JSON.parse(n)}catch{return n}},m=(n,c)=>{if(!r)return!1;try{return r.setItem(n,c),!0}catch{return!1}},_=(n)=>{try{if(r)r.removeItem(n)}catch{}},k=()=>{if(t=!1,!f.size)return i;let n=Array.from(f.entries());return f.clear(),i=i.then(()=>Promise.all(n.map(([c,v])=>{if(!d){p.delete(c);try{m(c,JSON.stringify(v===void 0?null:v))}catch{}return}let x;try{return x={v},d.set(c,x).catch(()=>{let S;try{S=JSON.stringify(v)}catch{return}return d?d.set(c,{j:S}).catch(()=>{m(c,S)}):void 0})}catch{return}}))).then(()=>{}),i},N=(n,c)=>{if(f.set(n,c),p.add(n),t)return;t=!0,h(()=>{k()})},P=(n)=>{if(!n||typeof n!=="object")return;let c=n;if("v"in c)return{value:c.v};if(typeof c.j==="string")return{value:g(c.j)};return},E={peek(n){if(a.has(n))return{value:a.get(n)};let c=null;try{c=r?r.getItem(n):null}catch{c=null}if(c===null||c===void 0)return;let v=g(c);return a.set(n,v),{value:v}},load(n){let c=E.peek(n),v=c?null:s();if(c||!v)return Promise.resolve(c);return v.get(n).then((x)=>{if(a.has(n))return{value:a.get(n)};let S=P(x);if(S)a.set(n,S.value),p.add(n);return S},()=>{return})},set(n,c){if(a.set(n,c),d&&p.has(n)){N(n,c);return}let v;try{v=JSON.stringify(c===void 0?null:c)}catch{return}if(v.length<=u&&m(n,v))return;if(!s()){if(v.length>u)m(n,v);return}_(n),N(n,c)},forget(n){for(let v of Array.from(a.keys()))if(v.indexOf(n)===0)a.delete(v);for(let v of Array.from(f.keys()))if(v.indexOf(n)===0)f.delete(v);for(let v of Array.from(p))if(v.indexOf(n)===0)p.delete(v);try{if(r)for(let v=r.length-1;v>=0;v--){let x=r.key(v);if(x&&x.indexOf(n)===0)r.removeItem(x)}}catch{}let c=s();if(!c)return i;return i=i.then(()=>c.removePrefix(n)).catch(()=>{}),i},flush(){return k()}};try{if(typeof document<"u"&&document.addEventListener)document.addEventListener("visibilitychange",()=>{if(document.visibilityState==="hidden")k()});if(typeof addEventListener==="function")addEventListener("pagehide",()=>{k()})}catch{}return E}function Z(e,o){if(!e)return!1;if(e===o.key)return!0;if(!o.url)return!1;if(e===o.url)return!0;try{let l=typeof location<"u"&&location.origin&&location.origin!=="null"?location.origin:"http://localhost",r=new URL(e,l),d=new URL(o.url,l);if(r.origin!==d.origin||r.pathname!==d.pathname)return!1;return!r.search||r.search===d.search}catch{return!1}}function ee(e){let o=e.prefix||"stx:kept:",l=e.matches||((t,i)=>t===i.key||t===i.url),r=new Set,d=new Map,y,s=(t)=>t===void 0?y:t,u=(t,i)=>{let g=s(i);if(g===!1||g===null||g==="")return null;return`${o}${g===void 0?"":`${g}:`}query:${t}`},h=(t)=>{let i=t&&t.value;if(!i||typeof i!=="object"||!("d"in i))return;return{data:i.d,at:Number(i.at)||0}},a=()=>{let t=globalThis;return t.__stx_outboxes instanceof Map?t.__stx_outboxes:null},p={setScope(t){y=t},scope:()=>y,keyFor:u,seed(t,i){let g=u(t,i);return g?h(e.kept.peek(g)):void 0},restore(t,i){let g=u(t,i);return g?e.kept.load(g).then(h):Promise.resolve(void 0)},persist(t,i,g){let m=u(t,g);if(m)e.kept.set(m,{d:i,at:Date.now()})},overlay(t,i,g){let m=a();if(!m||!m.size)return i;let _=i;return m.forEach((k)=>{try{_=k.overlay(t,_,g)}catch{}}),_},watch(t){return r.add(t),()=>{r.delete(t)}},cachedQuery(t,i){let g=d.get(t);if(g){if(i&&g.__options)g.__options(i);return g}let m=i||{},_=m.initial===void 0?null:m.initial,k=()=>typeof m.scope==="function"?m.scope():m.scope,N=()=>(typeof m.url==="function"?m.url():m.url)||null,P=()=>({key:t,url:N()}),E=k(),n=_,c=0,v=e.sharedRequest(),x=0,S=p.seed(t,E);if(S)n=S.data;let C=e.state(p.overlay(P(),n)),U=e.state(!1),q=e.state(!1),K=e.state(null),M=e.state(S?S.at:0),R=0,V=()=>{C.set(p.overlay(P(),n))},W=(w)=>{let b=R;p.restore(t,w).then((T)=>{if(!T||b!==R||c)return;n=T.data,M.set(T.at),V()})};if(!S)W(E);let xt=()=>{let w=k();if(w===E)return;E=w,R++,x=0,q.set(!1),U.set(!1),c=0;let b=p.seed(t,E);if(n=b?b.data:_,M.set(b?b.at:0),V(),!b)W(E)},St=(w,b)=>{let T=m.timeoutMs||15000,I=typeof AbortController<"u"?new AbortController:null,O=null,j=new Promise((D,F)=>{O=setTimeout(()=>{if(I)I.abort();F(Error("The request took too long."))},T)}),A;if(m.load)A=m.load({force:w,url:b,signal:I?I.signal:void 0});else if(b){let D=m.fetch||((L,H)=>fetch(L,H)),F={method:"GET",headers:{Accept:"application/json"}};if(w)F.cache="no-cache";if(I)F.signal=I.signal;A=D(b,F).then((L)=>{if(!L.ok)return L.json().catch(()=>null).then((H)=>{throw Error(H&&(H.error||H.message)||`Request failed (${L.status})`)});return L.json()})}else return Promise.resolve(C());return Promise.race([A,j]).then((D)=>{if(O)clearTimeout(O);return m.transform?m.transform(D):D},(D)=>{if(O)clearTimeout(O);throw D})},G=(w)=>{let b=R,T=N(),I=()=>{if(b!==R)return Promise.resolve(C());if(x++,q.set(!0),c===0&&!M())U.set(!0);let j=()=>{if(b!==R)return;if(x=Math.max(0,x-1),!x)q.set(!1),U.set(!1)};return St(w,T).then((A)=>{if(b!==R||T!==N())return j(),C();return n=A,c=Date.now(),M.set(c),K.set(null),p.persist(t,A,E),V(),j(),C()},(A)=>{if(b===R&&T===N())K.set(A&&A.message?A.message:"Could not load.");return j(),C()})},O=`${b} ${T||""}`;return w?v.fresh(O,I):v.run(O,I)},B={data:C,loading:U,isFetching:q,error:K,updatedAt:M,get key(){return t},load(w){if(xt(),!w&&c&&Date.now()-c<(m.staleTime||0))return Promise.resolve(C());return G(!!w)},refresh(){return B.load(!0)},set(w){n=typeof w==="function"?w(n):w,p.persist(t,n,E),V()},invalidate(){c=0},__options(w){m={...m,...w}}};if(r.add({target:P,updated:()=>{if(c||M())G(!1)},outbox:(w)=>{if(w)n=p.overlay(P(),n,w.id),c=0,G(!0);V()}}),d.set(t,B),m.immediate)B.load();return B}},f=typeof window<"u"?window:typeof addEventListener==="function"?globalThis:null;if(e.listen!==!1&&f&&typeof f.addEventListener==="function")f.addEventListener("stx:updated",(t)=>{let i=t.detail||{};if(i.kind!=="api"||typeof i.url!=="string")return;r.forEach((g)=>{if(l(i.url,g.target()))g.updated()})}),f.addEventListener("stx:outbox",(t)=>{let i=t.detail||{},g=i.sent&&typeof i.sent.id==="string"?i.sent:null;r.forEach((m)=>{if(g){let _=Array.isArray(g.affects)?g.affects:[],k=m.target();if(!_.some((N)=>l(N,k)))return}m.outbox(g)})});return p}function te(e){let o=e&&e.covers||((s,u)=>Object.is(s,u)),l=[],r=[],d=0,y=(s,u)=>{let h;try{h=Promise.resolve(u())}catch(f){h=Promise.reject(f)}let a={key:s,promise:h};l.push(a);let p=()=>{let f=l.indexOf(a);if(f!==-1)l.splice(f,1)};return h.then(p,p),h};return{run(s,u){for(let h of l)if(o(h.key,s))return h.promise;for(let h of r)if(o(h.key,s))return h.promise;return y(s,u)},fresh(s,u){for(let f of r)if(o(f.key,s))return f.promise;let h=l.filter((f)=>o(f.key,s)).map((f)=>f.promise);if(!h.length)return y(s,u);let a={key:s,promise:null},p=()=>{};return a.promise=Promise.all(h.map((f)=>f.then(p,p))).then(()=>{let f=r.indexOf(a);if(f!==-1)r.splice(f,1);return y(s,u)}),r.push(a),a.promise},latest(){let s=++d;return()=>s===d},get busy(){return l.length>0||r.length>0}}}function ne(e){let o=!1,l=null,r=null,d=0;async function y(){if(o)return;l=new AbortController;try{let s=await e.request(e.endpoint,{signal:l.signal,cache:"no-store",headers:{Accept:"text/event-stream"}});if(!s.ok||!s.body||!s.headers.get("content-type")?.includes("text/event-stream"))throw Error("Broadcast stream unavailable");if(o){await s.body.cancel();return}let u=s.body.getReader(),h=new TextDecoder,a="";d=0,e.onStatus?.(!0),e.onConnected?.();try{while(!o){let{done:p,value:f}=await u.read();if(p)break;if(a+=h.decode(f,{stream:!0}).replace(/\r\n/g,`
2
+ import{kl,_l,Cl}from"./chunk-432c35hs.js";import{de,Kn,Gn,_o,Qr,es,Xn,Jn,Co,ts}from"./chunk-v1eycdhj.js";function z(e,o,l,r,d,y){let s=!0,u=new Set,h=(p)=>r.get?r.get(p):p,a=()=>h(e());return Object.defineProperty(a,"_isSignal",{value:!0}),Object.defineProperty(a,"modifiers",{get:o}),a.set=(p)=>{if(!s)return;let f=o(),t=r.set?r.set(p,f):p;if(f.trim&&typeof t==="string")t=t.trim();if(f.number&&typeof t==="string"&&t!==""){let i=Number(t);if(!Number.isNaN(i))t=i}if(Object.is(e(),t))return;e.set(t),l(t)},a.update=(p)=>a.set(p(a())),a.input=(p)=>{if(!o().lazy)a.set(p)},a.change=(p)=>{if(o().lazy)a.set(p)},a.subscribe=(p)=>{if(!s)return()=>{};let f=e.subscribe((t,i)=>p(h(t),h(i)));return u.add(f),()=>{f(),u.delete(f)}},Object.defineProperty(a,"value",{get:a,set:a.set}),d(()=>{s=!1,u.forEach((p)=>p()),u.clear()}),y?.(()=>{s=!0}),a}function X(e,o=!0,l){if(!o||!e||typeof window>"u")return;let r=window;if(!r.__STX_DATA__){let y=document.querySelector("script[data-stx-server-data]");try{let s=JSON.parse(y?.textContent||"{}");r.__STX_DATA__=s&&typeof s==="object"&&!Array.isArray(s)?s:{}}catch{r.__STX_DATA__={}}}let d=r.__STX_DATA__;if(d&&Object.prototype.hasOwnProperty.call(d,e))try{return{data:l?l(d[e]):d[e]}}catch(y){return{data:null,error:y instanceof Error?y:Error(String(y))}}return}function Q(e){if(typeof window>"u")return;let o=window;if(e===void 0)o.__STX_DATA__={};else{if(!o.__STX_DATA__)try{let l=JSON.parse(document.querySelector("script[data-stx-server-data]")?.textContent||"{}");o.__STX_DATA__=l&&typeof l==="object"&&!Array.isArray(l)?l:{}}catch{o.__STX_DATA__={}}if(o.__STX_DATA__)delete o.__STX_DATA__[e]}}function Y(e){let o=null;try{o=typeof indexedDB<"u"?indexedDB:null}catch{o=null}if(!o)return null;let l=o,r=e||"stx-kept",d=null,y=()=>{if(!d)d=new Promise((u,h)=>{let a=l.open(r,1);a.onupgradeneeded=()=>{a.result.createObjectStore("kv")},a.onsuccess=()=>u(a.result),a.onerror=()=>h(a.error),a.onblocked=()=>h(Error("blocked"))}),d.catch(()=>{d=null});return d},s=(u,h)=>y().then((a)=>new Promise((p,f)=>{let t=a.transaction("kv",u),i=h(t.objectStore("kv"));t.oncomplete=()=>p(i?i.result:void 0),t.onerror=()=>f(t.error),t.onabort=()=>f(t.error)}));return{get:(u)=>s("readonly",(h)=>h.get(u)),set:(u,h)=>s("readwrite",(a)=>{a.put(h,u)}),remove:(u)=>s("readwrite",(h)=>{h.delete(u)}),removePrefix:(u)=>s("readwrite",(h)=>{h.delete(IDBKeyRange.bound(u,`${u}\uFFFF`))})}}function J(e,o){let l=e||{},r=null;if(l.storage!==void 0)r=l.storage;else try{r=typeof localStorage<"u"?localStorage:null}catch{r=null}let d=null,y=l.backend!==void 0;if(y)d=l.backend||null;let s=()=>{if(y)return d;y=!0;try{d=o?o():null}catch{d=null}if(d){let n=d;n.get("__stx_probe__").catch(()=>{if(d===n)d=null})}return d},u=l.limit||32768,h=l.defer||((n)=>{let c=typeof requestIdleCallback==="function"?requestIdleCallback:null;if(c)c(n,{timeout:200});else setTimeout(n,16)}),a=new Map,p=new Set,f=new Map,t=!1,i=Promise.resolve(),g=(n)=>{try{return JSON.parse(n)}catch{return n}},m=(n,c)=>{if(!r)return!1;try{return r.setItem(n,c),!0}catch{return!1}},_=(n)=>{try{if(r)r.removeItem(n)}catch{}},k=()=>{if(t=!1,!f.size)return i;let n=Array.from(f.entries());return f.clear(),i=i.then(()=>Promise.all(n.map(([c,v])=>{if(!d){p.delete(c);try{m(c,JSON.stringify(v===void 0?null:v))}catch{}return}let x;try{return x={v},d.set(c,x).catch(()=>{let S;try{S=JSON.stringify(v)}catch{return}return d?d.set(c,{j:S}).catch(()=>{m(c,S)}):void 0})}catch{return}}))).then(()=>{}),i},N=(n,c)=>{if(f.set(n,c),p.add(n),t)return;t=!0,h(()=>{k()})},P=(n)=>{if(!n||typeof n!=="object")return;let c=n;if("v"in c)return{value:c.v};if(typeof c.j==="string")return{value:g(c.j)};return},E={peek(n){if(a.has(n))return{value:a.get(n)};let c=null;try{c=r?r.getItem(n):null}catch{c=null}if(c===null||c===void 0)return;let v=g(c);return a.set(n,v),{value:v}},load(n){let c=E.peek(n),v=c?null:s();if(c||!v)return Promise.resolve(c);return v.get(n).then((x)=>{if(a.has(n))return{value:a.get(n)};let S=P(x);if(S)a.set(n,S.value),p.add(n);return S},()=>{return})},set(n,c){if(a.set(n,c),d&&p.has(n)){N(n,c);return}let v;try{v=JSON.stringify(c===void 0?null:c)}catch{return}if(v.length<=u&&m(n,v))return;if(!s()){if(v.length>u)m(n,v);return}_(n),N(n,c)},forget(n){for(let v of Array.from(a.keys()))if(v.indexOf(n)===0)a.delete(v);for(let v of Array.from(f.keys()))if(v.indexOf(n)===0)f.delete(v);for(let v of Array.from(p))if(v.indexOf(n)===0)p.delete(v);try{if(r)for(let v=r.length-1;v>=0;v--){let x=r.key(v);if(x&&x.indexOf(n)===0)r.removeItem(x)}}catch{}let c=s();if(!c)return i;return i=i.then(()=>c.removePrefix(n)).catch(()=>{}),i},flush(){return k()}};try{if(typeof document<"u"&&document.addEventListener)document.addEventListener("visibilitychange",()=>{if(document.visibilityState==="hidden")k()});if(typeof addEventListener==="function")addEventListener("pagehide",()=>{k()})}catch{}return E}function Z(e,o){if(!e)return!1;if(e===o.key)return!0;if(!o.url)return!1;if(e===o.url)return!0;try{let l=typeof location<"u"&&location.origin&&location.origin!=="null"?location.origin:"http://localhost",r=new URL(e,l),d=new URL(o.url,l);if(r.origin!==d.origin||r.pathname!==d.pathname)return!1;return!r.search||r.search===d.search}catch{return!1}}function ee(e){let o=e.prefix||"stx:kept:",l=e.matches||((t,i)=>t===i.key||t===i.url),r=new Set,d=new Map,y,s=(t)=>t===void 0?y:t,u=(t,i)=>{let g=s(i);if(g===!1||g===null||g==="")return null;return`${o}${g===void 0?"":`${g}:`}query:${t}`},h=(t)=>{let i=t&&t.value;if(!i||typeof i!=="object"||!("d"in i))return;return{data:i.d,at:Number(i.at)||0}},a=()=>{let t=globalThis;return t.__stx_outboxes instanceof Map?t.__stx_outboxes:null},p={setScope(t){y=t},scope:()=>y,keyFor:u,seed(t,i){let g=u(t,i);return g?h(e.kept.peek(g)):void 0},restore(t,i){let g=u(t,i);return g?e.kept.load(g).then(h):Promise.resolve(void 0)},persist(t,i,g){let m=u(t,g);if(m)e.kept.set(m,{d:i,at:Date.now()})},overlay(t,i,g){let m=a();if(!m||!m.size)return i;let _=i;return m.forEach((k)=>{try{_=k.overlay(t,_,g)}catch{}}),_},watch(t){return r.add(t),()=>{r.delete(t)}},cachedQuery(t,i){let g=d.get(t);if(g){if(i&&g.__options)g.__options(i);return g}let m=i||{},_=m.initial===void 0?null:m.initial,k=()=>typeof m.scope==="function"?m.scope():m.scope,N=()=>(typeof m.url==="function"?m.url():m.url)||null,P=()=>({key:t,url:N()}),E=k(),n=_,c=0,v=e.sharedRequest(),x=0,S=p.seed(t,E);if(S)n=S.data;let C=e.state(p.overlay(P(),n)),U=e.state(!1),q=e.state(!1),K=e.state(null),M=e.state(S?S.at:0),R=0,V=()=>{C.set(p.overlay(P(),n))},W=(w)=>{let b=R;p.restore(t,w).then((T)=>{if(!T||b!==R||c)return;n=T.data,M.set(T.at),V()})};if(!S)W(E);let xt=()=>{let w=k();if(w===E)return;E=w,R++,x=0,q.set(!1),U.set(!1),c=0;let b=p.seed(t,E);if(n=b?b.data:_,M.set(b?b.at:0),V(),!b)W(E)},St=(w,b)=>{let T=m.timeoutMs||15000,I=typeof AbortController<"u"?new AbortController:null,O=null,j=new Promise((D,F)=>{O=setTimeout(()=>{if(I)I.abort();F(Error("The request took too long."))},T)}),A;if(m.load)A=m.load({force:w,url:b,signal:I?I.signal:void 0});else if(b){let D=m.fetch||((L,H)=>fetch(L,H)),F={method:"GET",headers:{Accept:"application/json"}};if(w)F.cache="no-cache";if(I)F.signal=I.signal;A=D(b,F).then((L)=>{if(!L.ok)return L.json().catch(()=>null).then((H)=>{throw Error(H&&(H.error||H.message)||`Request failed (${L.status})`)});return L.json()})}else return Promise.resolve(C());return Promise.race([A,j]).then((D)=>{if(O)clearTimeout(O);return m.transform?m.transform(D):D},(D)=>{if(O)clearTimeout(O);throw D})},G=(w)=>{let b=R,T=N(),I=()=>{if(b!==R)return Promise.resolve(C());if(x++,q.set(!0),c===0&&!M())U.set(!0);let j=()=>{if(b!==R)return;if(x=Math.max(0,x-1),!x)q.set(!1),U.set(!1)};return St(w,T).then((A)=>{if(b!==R||T!==N())return j(),C();return n=A,c=Date.now(),M.set(c),K.set(null),p.persist(t,A,E),V(),j(),C()},(A)=>{if(b===R&&T===N())K.set(A&&A.message?A.message:"Could not load.");return j(),C()})},O=`${b} ${T||""}`;return w?v.fresh(O,I):v.run(O,I)},B={data:C,loading:U,isFetching:q,error:K,updatedAt:M,get key(){return t},load(w){if(xt(),!w&&c&&Date.now()-c<(m.staleTime||0))return Promise.resolve(C());return G(!!w)},refresh(){return B.load(!0)},set(w){n=typeof w==="function"?w(n):w,p.persist(t,n,E),V()},invalidate(){c=0},__options(w){m={...m,...w}}};if(r.add({target:P,updated:()=>{if(c||M())G(!1)},outbox:(w)=>{if(w)n=p.overlay(P(),n,w.id),c=0,G(!0);V()}}),d.set(t,B),m.immediate)B.load();return B}},f=typeof window<"u"?window:typeof addEventListener==="function"?globalThis:null;if(e.listen!==!1&&f&&typeof f.addEventListener==="function")f.addEventListener("stx:updated",(t)=>{let i=t.detail||{};if(i.kind!=="api"||typeof i.url!=="string")return;r.forEach((g)=>{if(l(i.url,g.target()))g.updated()})}),f.addEventListener("stx:outbox",(t)=>{let i=t.detail||{},g=i.sent&&typeof i.sent.id==="string"?i.sent:null;r.forEach((m)=>{if(g){let _=Array.isArray(g.affects)?g.affects:[],k=m.target();if(!_.some((N)=>l(N,k)))return}m.outbox(g)})});return p}function te(e){let o=e&&e.covers||((s,u)=>Object.is(s,u)),l=[],r=[],d=0,y=(s,u)=>{let h;try{h=Promise.resolve(u())}catch(f){h=Promise.reject(f)}let a={key:s,promise:h};l.push(a);let p=()=>{let f=l.indexOf(a);if(f!==-1)l.splice(f,1)};return h.then(p,p),h};return{run(s,u){for(let h of l)if(o(h.key,s))return h.promise;for(let h of r)if(o(h.key,s))return h.promise;return y(s,u)},fresh(s,u){for(let f of r)if(o(f.key,s))return f.promise;let h=l.filter((f)=>o(f.key,s)).map((f)=>f.promise);if(!h.length)return y(s,u);let a={key:s,promise:null},p=()=>{};return a.promise=Promise.all(h.map((f)=>f.then(p,p))).then(()=>{let f=r.indexOf(a);if(f!==-1)r.splice(f,1);return y(s,u)}),r.push(a),a.promise},latest(){let s=++d;return()=>s===d},get busy(){return l.length>0||r.length>0}}}function ne(e){let o=!1,l=null,r=null,d=0;async function y(){if(o)return;l=new AbortController;try{let s=await e.request(e.endpoint,{signal:l.signal,cache:"no-store",headers:{Accept:"text/event-stream"}});if(!s.ok||!s.body||!s.headers.get("content-type")?.includes("text/event-stream"))throw Error("Broadcast stream unavailable");if(o){await s.body.cancel();return}let u=s.body.getReader(),h=new TextDecoder,a="";d=0,e.onStatus?.(!0),e.onConnected?.();try{while(!o){let{done:p,value:f}=await u.read();if(p)break;if(a+=h.decode(f,{stream:!0}).replace(/\r\n/g,`
3
3
  `),a.length>1048576)throw Error("Broadcast frame too large");let t;while((t=a.indexOf(`
4
4
 
5
5
  `))!==-1){let i=a.slice(0,t);a=a.slice(t+2);let g=i.split(`
@@ -993,7 +993,7 @@ else {
993
993
  if (name in window) return window[name];
994
994
  return defaultValue;
995
995
  }
996
- `;var de=` function bindParentComponentProps(el, callerScope) {
996
+ `;var ue=` function bindParentComponentProps(el, callerScope) {
997
997
  if (!el || !el.getAttribute || el.__stx_parent_props_bound) return;
998
998
  var names = __stxWords(el.getAttribute('data-stx-parent-bindings') || '');
999
999
  if (!names.length) return;
@@ -11547,7 +11547,7 @@ else if (timer === null) {
11547
11547
  removeToast(tid);
11548
11548
  }
11549
11549
  }
11550
- };`;var wt=` // \u2500\u2500 <TransitionGroup> support (#1742) \u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500
11550
+ };`;var bt=` // \u2500\u2500 <TransitionGroup> support (#1742) \u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500
11551
11551
  // Class-driven enter/leave + FLIP move animations for keyed :for lists whose
11552
11552
  // parent is a [data-stx-transition-group]. All helpers are self-contained and
11553
11553
  // guarded (no-ops off the happy path), and every transition has a timeout
@@ -11775,7 +11775,7 @@ else if (timer === null) {
11775
11775
  subscribe: subscribe
11776
11776
  };
11777
11777
  }
11778
- `;function bt(e={}){let o=kt(qn(e));try{let r=new Bun.Transpiler({loader:"js",minifyWhitespace:!0}).transformSync(o);return r=r.replace(/\}(var |let |const |function )/g,"};$1"),r}catch{return o}}function kt(e){let o=[],l=0,r="console.log(";while(l<e.length){let d=e.indexOf(r,l);if(d===-1){o.push(e.slice(l));break}o.push(e.slice(l,d));let y=1,s=d+r.length;while(s<e.length&&y>0){let u=e[s];if(u==='"'||u==="'"||u==="`"){let h=u;s++;while(s<e.length&&e[s]!==h){if(e[s]==="\\")s++;s++}s++;continue}if(u==="(")y++;else if(u===")")y--;s++}o.push("0"),l=s}return o.join("")}function qn(e={}){return`${ae}${Pe}
11778
+ `;function wt(e={}){let o=kt(qn(e));try{let r=new Bun.Transpiler({loader:"js",minifyWhitespace:!0}).transformSync(o);return r=r.replace(/\}(var |let |const |function )/g,"};$1"),r}catch{return o}}function kt(e){let o=[],l=0,r="console.log(";while(l<e.length){let d=e.indexOf(r,l);if(d===-1){o.push(e.slice(l));break}o.push(e.slice(l,d));let y=1,s=d+r.length;while(s<e.length&&y>0){let u=e[s];if(u==='"'||u==="'"||u==="`"){let h=u;s++;while(s<e.length&&e[s]!==h){if(e[s]==="\\")s++;s++}s++;continue}if(u==="(")y++;else if(u===")")y--;s++}o.push("0"),l=s}return o.join("")}function qn(e={}){return`${ae}${Pe}
11779
11779
  ${Ze(ie,ke,Te)}
11780
11780
 
11781
11781
  ${De}
@@ -11799,7 +11799,7 @@ ${Se}
11799
11799
  ${Re}
11800
11800
  ${He}
11801
11801
  ${se}
11802
- ${de}
11802
+ ${ue}
11803
11803
  ${me}
11804
11804
  ${Ge}
11805
11805
  ${nt(_l(),Cl(),kl())}
@@ -11809,7 +11809,7 @@ ${lt}
11809
11809
  ${$e}
11810
11810
  ${le}
11811
11811
  ${ht}
11812
- ${wt}
11812
+ ${bt}
11813
11813
  ${qe}
11814
11814
  ${pe}
11815
11815
  ${Ke}
@@ -11856,5 +11856,5 @@ ${ct}
11856
11856
  ${dt}
11857
11857
  ${it}
11858
11858
  })();
11859
- `}var vh={state:ue,derived:Kn,effect:Gn,batch:_o,onMount:Qr,onDestroy:es,isSignal:Xn,isDerived:Jn,untrack:Co,peek:ts,generateSignalsRuntime:bt,generateSignalsRuntimeDev:qn};
11860
- export{bt,qn,vh};
11859
+ `}var vh={state:de,derived:Kn,effect:Gn,batch:_o,onMount:Qr,onDestroy:es,isSignal:Xn,isDerived:Jn,untrack:Co,peek:ts,generateSignalsRuntime:wt,generateSignalsRuntimeDev:qn};
11860
+ export{wt,qn,vh};
@@ -1,3 +1,3 @@
1
1
  // @bun
2
- import{a}from"./chunk-1qybwj8k.js";import{xo}from"./chunk-12r22pf0.js";import p from"path";async function nm(t={}){let l=performance.now(),s=t.root||process.cwd(),e=await a(s),o=t.ssr?.routeRules??e.routeRules??{};if(xo(o),!e.ssr&&Object.keys(o).length)throw Error("routeRules require ssr: true and the production server; flat SSG output cannot apply request/cache policies");if(!e.ssr&&(t.ssr?.serverApi??e.serverApi))throw Error("serverApi requires ssr: true; flat SSG output cannot execute API endpoints");let r=e.ssr?"ssr":"ssg";console.log(`[stx build] Mode: ${r.toUpperCase()}${e.ssr?" (ssr: true in stx.config.ts)":" (default \u2014 ssr is false)"}`);let u,n;if(r==="ssg"){let{generateStaticSite:i}=await import("./ssg.js");u=await i({pagesDir:p.join(e.root||".",e.pagesDir||e.build?.pagesDir||"pages"),publicDir:e.publicDir||e.build?.publicDir||"public",outputDir:e.build?.outputDir||"dist",generate404:e.build?.generate404??!0,minify:e.build?.minify??!0,cleanOutput:e.build?.cleanOutput??!0,router:e.router,...t.ssg})}else{let{buildForProduction:i}=await import("./chunk-ck9zengd.js");n=await i({root:s,outputDir:".output",debug:t.debug,...t.ssr})}let d=Math.round(performance.now()-l);return{mode:r,ssg:u,ssr:n,duration:d}}
2
+ import{a}from"./chunk-g0h1gxew.js";import{xo}from"./chunk-12r22pf0.js";import p from"path";async function nm(t={}){let l=performance.now(),s=t.root||process.cwd(),e=await a(s),o=t.ssr?.routeRules??e.routeRules??{};if(xo(o),!e.ssr&&Object.keys(o).length)throw Error("routeRules require ssr: true and the production server; flat SSG output cannot apply request/cache policies");if(!e.ssr&&(t.ssr?.serverApi??e.serverApi))throw Error("serverApi requires ssr: true; flat SSG output cannot execute API endpoints");let r=e.ssr?"ssr":"ssg";console.log(`[stx build] Mode: ${r.toUpperCase()}${e.ssr?" (ssr: true in stx.config.ts)":" (default \u2014 ssr is false)"}`);let u,n;if(r==="ssg"){let{generateStaticSite:i}=await import("./ssg.js");u=await i({pagesDir:p.join(e.root||".",e.pagesDir||e.build?.pagesDir||"pages"),publicDir:e.publicDir||e.build?.publicDir||"public",outputDir:e.build?.outputDir||"dist",generate404:e.build?.generate404??!0,minify:e.build?.minify??!0,cleanOutput:e.build?.cleanOutput??!0,router:e.router,...t.ssg})}else{let{buildForProduction:i}=await import("./chunk-n68sanmz.js");n=await i({root:s,outputDir:".output",debug:t.debug,...t.ssr})}let d=Math.round(performance.now()-l);return{mode:r,ssg:u,ssr:n,duration:d}}
3
3
  export{nm};
@@ -0,0 +1,2 @@
1
+ // @bun
2
+ import{sr,Ae}from"./chunk-mzes9ds7.js";export{sr as describeBuildFailure,Ae as formatBuildFailure};
@@ -1,3 +1,3 @@
1
1
  // @bun
2
- import{AsyncLocalStorage as R}from"async_hooks";var b=Symbol.for("stx.runtime-config.scope"),y=globalThis,m=y[b]??=new R;function He(n,f){return m.run(n,f)}function Cn(){return m.getStore()}function Xs(){let n=m.getStore();if(!n)throw Error("useServerRuntimeConfig requires a server request or template render");return Object.freeze(Object.defineProperty({public:n.public},"private",{value:n.private}))}function $i(){return Xs().public}function M(n={},f=process.env){let s=new Set;function o(e,i){if(i===null)return e===null;if(Array.isArray(i))return Array.isArray(e)&&(!i.length||e.every((r)=>i.some((u)=>o(r,u))));if(typeof i==="object")return e!==null&&typeof e==="object"&&!Array.isArray(e)&&Object.entries(i).every(([r,u])=>Object.hasOwn(e,r)&&o(e[r],u));return typeof e===typeof i}function g(e,i){if(e&&typeof e==="object"&&!Array.isArray(e)){if(Object.getPrototypeOf(e)!==Object.prototype&&Object.getPrototypeOf(e)!==null)throw TypeError(`Runtime config ${i.join(".")} must contain JSON values`);let t=Object.create(null);for(let[c,l]of Object.entries(e)){if(!/^[a-zA-Z][a-zA-Z0-9_]*$/.test(c)||["constructor","prototype","__proto__"].includes(c))throw TypeError(`Invalid runtime config key: ${c}`);t[c]=g(l,[...i,c])}return Object.freeze(t)}let r=`STX_RUNTIME_${i.map((t)=>t.replace(/([a-z0-9])([A-Z])/g,"$1_$2").toUpperCase()).join("__")}`;if(s.has(r))throw TypeError(`Ambiguous runtime config environment key: ${r}`);s.add(r);let u=f[r],a=e;if(u!==void 0){try{a=typeof e==="string"?u:JSON.parse(u)}catch{throw TypeError(`Invalid runtime config override: ${r}`)}if(!o(a,e))throw TypeError(`Wrong runtime config override type: ${r}`)}function p(t){if(t===null||typeof t==="string"||typeof t==="boolean")return t;if(typeof t==="number"&&Number.isFinite(t))return t;if(Array.isArray(t))return Object.freeze(t.map(p));if(t&&typeof t==="object"&&(Object.getPrototypeOf(t)===Object.prototype||Object.getPrototypeOf(t)===null))return Object.freeze(Object.fromEntries(Object.entries(t).map(([c,l])=>[c,p(l)])));throw TypeError(`Runtime config ${i.join(".")} must contain JSON values`)}return p(a)}return Object.freeze({public:g(n.public??{},["public"]),private:g(n.private??{},["private"])})}function C(n){return`<script data-stx-scoped data-stx-runtime-config type="application/json">${JSON.stringify(n.public).replace(/</g,"\\u003c").replace(/\u2028/g,"\\u2028").replace(/\u2029/g,"\\u2029")}</script>`}function jt(n,f){let s=n.replace(/<script\b[^>]*\bdata-stx-runtime-config\b[^>]*>[\s\S]*?<\/script>/gi,""),o=/<head\b[^>]*>/i.exec(s),g=o?o.index+o[0].length:0;return s.slice(0,g)+C(f)+s.slice(g)}
3
- export{He,Cn,Xs,$i,M,jt};
2
+ import{AsyncLocalStorage as R}from"async_hooks";var b=Symbol.for("stx.runtime-config.scope"),y=globalThis,m=y[b]??=new R;function Ve(n,f){return m.run(n,f)}function Cn(){return m.getStore()}function Xs(){let n=m.getStore();if(!n)throw Error("useServerRuntimeConfig requires a server request or template render");return Object.freeze(Object.defineProperty({public:n.public},"private",{value:n.private}))}function $i(){return Xs().public}function M(n={},f=process.env){let s=new Set;function o(e,i){if(i===null)return e===null;if(Array.isArray(i))return Array.isArray(e)&&(!i.length||e.every((r)=>i.some((u)=>o(r,u))));if(typeof i==="object")return e!==null&&typeof e==="object"&&!Array.isArray(e)&&Object.entries(i).every(([r,u])=>Object.hasOwn(e,r)&&o(e[r],u));return typeof e===typeof i}function g(e,i){if(e&&typeof e==="object"&&!Array.isArray(e)){if(Object.getPrototypeOf(e)!==Object.prototype&&Object.getPrototypeOf(e)!==null)throw TypeError(`Runtime config ${i.join(".")} must contain JSON values`);let t=Object.create(null);for(let[c,l]of Object.entries(e)){if(!/^[a-zA-Z][a-zA-Z0-9_]*$/.test(c)||["constructor","prototype","__proto__"].includes(c))throw TypeError(`Invalid runtime config key: ${c}`);t[c]=g(l,[...i,c])}return Object.freeze(t)}let r=`STX_RUNTIME_${i.map((t)=>t.replace(/([a-z0-9])([A-Z])/g,"$1_$2").toUpperCase()).join("__")}`;if(s.has(r))throw TypeError(`Ambiguous runtime config environment key: ${r}`);s.add(r);let u=f[r],a=e;if(u!==void 0){try{a=typeof e==="string"?u:JSON.parse(u)}catch{throw TypeError(`Invalid runtime config override: ${r}`)}if(!o(a,e))throw TypeError(`Wrong runtime config override type: ${r}`)}function p(t){if(t===null||typeof t==="string"||typeof t==="boolean")return t;if(typeof t==="number"&&Number.isFinite(t))return t;if(Array.isArray(t))return Object.freeze(t.map(p));if(t&&typeof t==="object"&&(Object.getPrototypeOf(t)===Object.prototype||Object.getPrototypeOf(t)===null))return Object.freeze(Object.fromEntries(Object.entries(t).map(([c,l])=>[c,p(l)])));throw TypeError(`Runtime config ${i.join(".")} must contain JSON values`)}return p(a)}return Object.freeze({public:g(n.public??{},["public"]),private:g(n.private??{},["private"])})}function C(n){return`<script data-stx-scoped data-stx-runtime-config type="application/json">${JSON.stringify(n.public).replace(/</g,"\\u003c").replace(/\u2028/g,"\\u2028").replace(/\u2029/g,"\\u2029")}</script>`}function Bt(n,f){let s=n.replace(/<script\b[^>]*\bdata-stx-runtime-config\b[^>]*>[\s\S]*?<\/script>/gi,""),o=/<head\b[^>]*>/i.exec(s),g=o?o.index+o[0].length:0;return s.slice(0,g)+C(f)+s.slice(g)}
3
+ export{Ve,Cn,Xs,$i,M,Bt};
@@ -1,3 +1,3 @@
1
1
  // @bun
2
- var f=null,D=[],v=0,g=new Set;function x(){return f}function S(e){let n=f;return D.push(e),f=e,n}function h(e){D.pop(),f=e}var A=new WeakMap;function w(e,n){A.set(e,n)}function p(e,n){for(let r of e){let i=A.get(r);if(i)i(n);else n.add(r)}}function b(e){if(v>0){p(e,g);return}let n=new Set;p(e,n);for(let r of n)r()}function C(e){v++;try{e()}finally{if(v--,v===0){let n=[...g];g.clear();for(let r of n)r()}}}function m(e){let n=f;f=null;try{return e()}finally{f=n}}var k=[],T=[];function ue(e){let n=e,r=new Set,i=new Set,o=()=>{let t=x();if(t)i.add(t);return n};return o.set=(t)=>{if(!Object.is(t,n)){let c=n;n=t,r.forEach((u)=>{try{u(n,c)}catch(l){console.error("[stx] subscriber error:",l)}}),b(i)}},o.update=(t)=>{o.set(t(n))},o.subscribe=(t)=>(r.add(t),()=>r.delete(t)),Object.defineProperty(o,"_isSignal",{value:!0,writable:!1}),Object.defineProperty(o,"value",{get:()=>o(),set:(t)=>o.set(t),configurable:!0}),o}function Kn(e,n={}){let r,i=!0,o=!1,t=new Set,c=typeof n.equals==="function"?n.equals:null,u=()=>{let s=S(d);try{r=e(),o=!0}finally{h(s)}i=!1},l=()=>{let s=r,y=o;try{u()}catch{return i=!0,!0}return!y||!c(s,r)},d=()=>{if(i)return;if(c&&t.size){if(l())b(t);return}i=!0,b(t)};w(d,(s)=>{if(i)return;if(c&&t.size){if(l())p(t,s);return}i=!0,p(t,s)});let a=()=>{let s=x();if(s)t.add(s);if(i)u();return r};return Object.defineProperty(a,"_isDerived",{value:!0,writable:!1}),Object.defineProperty(a,"value",{get:()=>a(),configurable:!0}),a}function xh(e,n=Object.is){return Kn(e,{equals:n})}function Gn(e,n={}){let r,i=!1,o=()=>{if(i)return;if(r){let c=r;r=void 0;try{c()}catch(u){console.error("[stx] effect cleanup error:",u)}}let t=S(o);try{let c=e();r=typeof c==="function"?c:void 0}catch(c){i=!0,console.error("[stx] effect error (the effect is disposed):",c)}finally{h(t)}};if(n.immediate!==!1)o();return()=>{if(i=!0,r){let t=r;r=void 0,t()}}}function _o(e){C(e)}function Qr(e){k.push(e)}function es(e){T.push(e)}function Sh(){O(k,"onMount",T)}function kh(){O(T,"onDestroy")}function O(e,n,r){let i=e.splice(0,e.length);for(let o of i)try{let t=o();if(r&&typeof t==="function")r.push(t)}catch(t){console.error(`[stx] ${n} callback threw:`,t)}}function _h(){return{mount:k.length,destroy:T.length}}function Xn(e){return typeof e==="function"&&e._isSignal===!0}function Jn(e){return typeof e==="function"&&e._isDerived===!0}function Co(e){if(Xn(e)||Jn(e))return m(()=>e());return e}function ts(e){return m(e)}function Ch(e,n){let r=typeof e==="function"?e:()=>e,i=ue([]),o=Kn(()=>i().reduce((u,l)=>n(u,l.action),r())),t=!1;return Gn(()=>{if(r(),!t){t=!0;return}if(ts(()=>i().length))i.set([])}),[o,(u,l)=>{let d={action:u};i.set([...i(),d]);let a=()=>{let s=i().filter((y)=>y!==d);if(s.length!==i().length)i.set(s)};if(l&&typeof l.then==="function")Promise.resolve(l).then(a,a);return a}]}
3
- export{ue,Kn,xh,Gn,_o,Qr,es,Sh,kh,_h,Xn,Jn,Co,ts,Ch};
2
+ var f=null,D=[],v=0,g=new Set;function x(){return f}function S(e){let n=f;return D.push(e),f=e,n}function h(e){D.pop(),f=e}var A=new WeakMap;function w(e,n){A.set(e,n)}function p(e,n){for(let r of e){let i=A.get(r);if(i)i(n);else n.add(r)}}function b(e){if(v>0){p(e,g);return}let n=new Set;p(e,n);for(let r of n)r()}function C(e){v++;try{e()}finally{if(v--,v===0){let n=[...g];g.clear();for(let r of n)r()}}}function m(e){let n=f;f=null;try{return e()}finally{f=n}}var k=[],T=[];function de(e){let n=e,r=new Set,i=new Set,o=()=>{let t=x();if(t)i.add(t);return n};return o.set=(t)=>{if(!Object.is(t,n)){let c=n;n=t,r.forEach((u)=>{try{u(n,c)}catch(l){console.error("[stx] subscriber error:",l)}}),b(i)}},o.update=(t)=>{o.set(t(n))},o.subscribe=(t)=>(r.add(t),()=>r.delete(t)),Object.defineProperty(o,"_isSignal",{value:!0,writable:!1}),Object.defineProperty(o,"value",{get:()=>o(),set:(t)=>o.set(t),configurable:!0}),o}function Kn(e,n={}){let r,i=!0,o=!1,t=new Set,c=typeof n.equals==="function"?n.equals:null,u=()=>{let s=S(d);try{r=e(),o=!0}finally{h(s)}i=!1},l=()=>{let s=r,y=o;try{u()}catch{return i=!0,!0}return!y||!c(s,r)},d=()=>{if(i)return;if(c&&t.size){if(l())b(t);return}i=!0,b(t)};w(d,(s)=>{if(i)return;if(c&&t.size){if(l())p(t,s);return}i=!0,p(t,s)});let a=()=>{let s=x();if(s)t.add(s);if(i)u();return r};return Object.defineProperty(a,"_isDerived",{value:!0,writable:!1}),Object.defineProperty(a,"value",{get:()=>a(),configurable:!0}),a}function xh(e,n=Object.is){return Kn(e,{equals:n})}function Gn(e,n={}){let r,i=!1,o=()=>{if(i)return;if(r){let c=r;r=void 0;try{c()}catch(u){console.error("[stx] effect cleanup error:",u)}}let t=S(o);try{let c=e();r=typeof c==="function"?c:void 0}catch(c){i=!0,console.error("[stx] effect error (the effect is disposed):",c)}finally{h(t)}};if(n.immediate!==!1)o();return()=>{if(i=!0,r){let t=r;r=void 0,t()}}}function _o(e){C(e)}function Qr(e){k.push(e)}function es(e){T.push(e)}function Sh(){O(k,"onMount",T)}function kh(){O(T,"onDestroy")}function O(e,n,r){let i=e.splice(0,e.length);for(let o of i)try{let t=o();if(r&&typeof t==="function")r.push(t)}catch(t){console.error(`[stx] ${n} callback threw:`,t)}}function _h(){return{mount:k.length,destroy:T.length}}function Xn(e){return typeof e==="function"&&e._isSignal===!0}function Jn(e){return typeof e==="function"&&e._isDerived===!0}function Co(e){if(Xn(e)||Jn(e))return m(()=>e());return e}function ts(e){return m(e)}function Ch(e,n){let r=typeof e==="function"?e:()=>e,i=de([]),o=Kn(()=>i().reduce((u,l)=>n(u,l.action),r())),t=!1;return Gn(()=>{if(r(),!t){t=!0;return}if(ts(()=>i().length))i.set([])}),[o,(u,l)=>{let d={action:u};i.set([...i(),d]);let a=()=>{let s=i().filter((y)=>y!==d);if(s.length!==i().length)i.set(s)};if(l&&typeof l.then==="function")Promise.resolve(l).then(a,a);return a}]}
3
+ export{de,Kn,xh,Gn,_o,Qr,es,Sh,kh,_h,Xn,Jn,Co,ts,Ch};
@@ -1,2 +1,2 @@
1
1
  // @bun
2
- import{wn,ag,cg,lg,ug,dg,g,pg,vi,fg,Qc,el}from"./chunk-mv48q1p4.js";import"./chunk-e8zpzt9s.js";import"./chunk-v4bqmzj9.js";import"./chunk-0dmpc70r.js";import"./chunk-xppm4cs4.js";import"./chunk-ngnvyqk3.js";export{wn as STX_ENGINE_BINDING_NAMES,vi as convertToCommonJS,Qc as extractScriptFromTemplate,g as extractVariables,el as hasVariables,pg as isCompleteImport,dg as isMissingBindingFailure,lg as isModuleResolutionFailure,ug as isSyntaxFailure,fg as splitDeclaration,ag as stripTypeScript,cg as withoutStxReferrer};
2
+ import{wn,ag,cg,lg,ug,dg,g,pg,vi,fg,Qc,el}from"./chunk-fp24ecp8.js";import"./chunk-6tpcm12w.js";import"./chunk-sny8rqe8.js";import"./chunk-0d3z8hwz.js";import"./chunk-xppm4cs4.js";import"./chunk-432c35hs.js";export{wn as STX_ENGINE_BINDING_NAMES,vi as convertToCommonJS,Qc as extractScriptFromTemplate,g as extractVariables,el as hasVariables,pg as isCompleteImport,dg as isMissingBindingFailure,lg as isModuleResolutionFailure,ug as isSyntaxFailure,fg as splitDeclaration,ag as stripTypeScript,cg as withoutStxReferrer};
@@ -0,0 +1,2 @@
1
+ // @bun
2
+ import{pa,am,fa,cm,Wl,ql,lm,um}from"./chunk-jefafv6s.js";import"./chunk-914wcp1a.js";import"./chunk-qw0ctwnc.js";import"./chunk-1277d5we.js";import"./chunk-mzes9ds7.js";import"./chunk-xfymp197.js";import"./chunk-htwn1f36.js";import"./chunk-eefdz43s.js";import"./chunk-g0h1gxew.js";import"./chunk-xqr2ec9k.js";import"./chunk-kvafq9gy.js";import"./chunk-tm8a2b69.js";import"./chunk-j2s8j7ff.js";import"./chunk-dhpd4mx7.js";import{it,ig}from"./chunk-fp24ecp8.js";import"./chunk-6tpcm12w.js";import"./chunk-sny8rqe8.js";import"./chunk-0d3z8hwz.js";import"./chunk-xppm4cs4.js";import"./chunk-432c35hs.js";export{pa as buildScriptVirtualFile,am as buildVirtualSource,it as extractScriptBlocks,ig as extractTemplateExpressions,Wl as findRuntimeTypeDeclarations,ql as findStxModuleDeclarations,um as formatTypecheckDiagnostics,cm as sourcePathFor,lm as typecheckStxFiles,fa as virtualPathFor};
@@ -1,5 +1,5 @@
1
1
  // @bun
2
- import{g,m,p}from"./chunk-mv48q1p4.js";import{F}from"./chunk-1qybwj8k.js";import{i}from"./chunk-ynd2nfvs.js";import k from"path";var q={enabled:!0,bufferSize:16384,strategy:"auto",timeout:30000},T=/<!-- @section:([\w-]+) -->([\s\S]*?)<!-- @endsection:\1 -->/g;var M=/<!-- @suspense:([\w-]+) -->([\s\S]*?)<!-- @endsuspense:\1 -->/g;function H(e){let t=[],o=0,n;M.lastIndex=0;while((n=M.exec(e))!==null){if(n.index>o){let a=e.slice(o,n.index);if(a.trim())t.push({type:t.length===0?"shell":"content",content:a})}let s=n[1],r=n[2];t.push({type:"suspense",name:s,content:r}),o=n.index+n[0].length}if(o<e.length){let s=e.slice(o);if(s.trim())t.push({type:t.length===0?"shell":"content",content:s})}if(t.length===0)t.push({type:"shell",content:e});return t}async function Vm(e,t={},o={}){let n={...F,...o,streaming:{...q,...o.streaming}},s=n.streaming?.bufferSize||16384;return new ReadableStream({async start(r){try{let a=await Bun.file(e).text(),S=a.match(/<script\b[^>]*\bserver\b[^>]*>([\s\S]*?)<\/script>/i),f=S?S[1]:"",c=a.replace(/<script\b[^>]*>[\s\S]*?<\/script>/gi,""),h={...t,__filename:e,__dirname:k.dirname(e)};if(f.trim())await g(f,h,e);let E=H(c),l=new Set;if(!E.some((w)=>w.type==="suspense")){let w=n.streaming?.strategy||"auto",x=new RegExp(T.source,"g");if(!(w!=="manual"&&x.test(c))){let u=await i(c,h,e,n,l);for(let b=0;b<u.length;b+=s)r.enqueue(u.slice(b,b+s)),await new Promise((y)=>setTimeout(y,0))}else{let u=[],b=new RegExp(T.source,"g"),y;while((y=b.exec(c))!==null)u.push({name:y[1],content:y[2],start:y.index,end:y.index+y[0].length});let v=0;for(let _ of u){if(_.start>v){let I=c.slice(v,_.start);if(I.trim()){let O=await i(I,h,e,n,l);r.enqueue(O),await new Promise((D)=>setTimeout(D,0))}}let C=await i(_.content,h,e,n,l);r.enqueue(C),await new Promise((I)=>setTimeout(I,0)),v=_.end}if(v<c.length){let _=c.slice(v);if(_.trim()){let C=await i(_,h,e,n,l);r.enqueue(C)}}}}else{let w=new Map;for(let d of E)if(d.type==="shell"||d.type==="content"){let u=await i(d.content,h,e,n,l);r.enqueue(u)}else if(d.type==="suspense"&&d.name){let u=`stx-suspense-${d.name}`;r.enqueue(`<div id="${u}" data-suspense="${d.name}" style="display:contents;">
2
+ import{g,m,p}from"./chunk-fp24ecp8.js";import{F}from"./chunk-g0h1gxew.js";import{i}from"./chunk-hfng042r.js";import k from"path";var q={enabled:!0,bufferSize:16384,strategy:"auto",timeout:30000},T=/<!-- @section:([\w-]+) -->([\s\S]*?)<!-- @endsection:\1 -->/g;var M=/<!-- @suspense:([\w-]+) -->([\s\S]*?)<!-- @endsuspense:\1 -->/g;function H(e){let t=[],o=0,n;M.lastIndex=0;while((n=M.exec(e))!==null){if(n.index>o){let a=e.slice(o,n.index);if(a.trim())t.push({type:t.length===0?"shell":"content",content:a})}let s=n[1],r=n[2];t.push({type:"suspense",name:s,content:r}),o=n.index+n[0].length}if(o<e.length){let s=e.slice(o);if(s.trim())t.push({type:t.length===0?"shell":"content",content:s})}if(t.length===0)t.push({type:"shell",content:e});return t}async function Vm(e,t={},o={}){let n={...F,...o,streaming:{...q,...o.streaming}},s=n.streaming?.bufferSize||16384;return new ReadableStream({async start(r){try{let a=await Bun.file(e).text(),S=a.match(/<script\b[^>]*\bserver\b[^>]*>([\s\S]*?)<\/script>/i),f=S?S[1]:"",c=a.replace(/<script\b[^>]*>[\s\S]*?<\/script>/gi,""),h={...t,__filename:e,__dirname:k.dirname(e)};if(f.trim())await g(f,h,e);let E=H(c),l=new Set;if(!E.some((w)=>w.type==="suspense")){let w=n.streaming?.strategy||"auto",x=new RegExp(T.source,"g");if(!(w!=="manual"&&x.test(c))){let u=await i(c,h,e,n,l);for(let b=0;b<u.length;b+=s)r.enqueue(u.slice(b,b+s)),await new Promise((y)=>setTimeout(y,0))}else{let u=[],b=new RegExp(T.source,"g"),y;while((y=b.exec(c))!==null)u.push({name:y[1],content:y[2],start:y.index,end:y.index+y[0].length});let v=0;for(let _ of u){if(_.start>v){let I=c.slice(v,_.start);if(I.trim()){let O=await i(I,h,e,n,l);r.enqueue(O),await new Promise((D)=>setTimeout(D,0))}}let C=await i(_.content,h,e,n,l);r.enqueue(C),await new Promise((I)=>setTimeout(I,0)),v=_.end}if(v<c.length){let _=c.slice(v);if(_.trim()){let C=await i(_,h,e,n,l);r.enqueue(C)}}}}else{let w=new Map;for(let d of E)if(d.type==="shell"||d.type==="content"){let u=await i(d.content,h,e,n,l);r.enqueue(u)}else if(d.type==="suspense"&&d.name){let u=`stx-suspense-${d.name}`;r.enqueue(`<div id="${u}" data-suspense="${d.name}" style="display:contents;">
3
3
  <template data-suspense-fallback>Loading...</template>
4
4
  </div>`),w.set(d.name,i(d.content,h,e,n,l))}r.enqueue(`
5
5
  <script>
@@ -0,0 +1,2 @@
1
+ // @bun
2
+ import{ro,ji,Ig,Og,Ng}from"./chunk-2cy33z00.js";import"./chunk-bg574nvy.js";export{Og as generateManifestLink,ro as generatePwaTags,Ig as generateSwRegistrationScript,Ng as generateThemeColorMeta,ji as injectPwaTags};