@stacksjs/stx 0.2.469 → 0.2.470

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 (117) hide show
  1. package/dist/chunk-0q8xacmn.js +2 -0
  2. package/dist/{chunk-zkg0rbmp.js → chunk-168dqya1.js} +3 -3
  3. package/dist/{chunk-9kzk7zyy.js → chunk-250psr2a.js} +1 -1
  4. package/dist/chunk-2a22ep8p.js +2 -0
  5. package/dist/{chunk-151d1av1.js → chunk-2qz5gqqe.js} +7 -7
  6. package/dist/{chunk-gxbd7pwn.js → chunk-3c6v9hp1.js} +1 -1
  7. package/dist/{chunk-hhy33p5v.js → chunk-3jjevm1j.js} +6 -6
  8. package/dist/{chunk-n8y0hp9b.js → chunk-3q9hhpvz.js} +1 -1
  9. package/dist/chunk-4waxn99v.js +2 -0
  10. package/dist/{chunk-bqx3dqv1.js → chunk-564pmmj3.js} +1 -1
  11. package/dist/{chunk-8adstrk5.js → chunk-594tt40e.js} +2 -2
  12. package/dist/{chunk-cxbp2m66.js → chunk-5rx7ptse.js} +2 -2
  13. package/dist/chunk-695de40v.js +2 -0
  14. package/dist/chunk-6a1g18h4.js +2 -0
  15. package/dist/{chunk-s23ka56m.js → chunk-6sken7b2.js} +1 -1
  16. package/dist/{chunk-gkj42zq7.js → chunk-6vstn9dk.js} +1 -1
  17. package/dist/{chunk-tdsajnjm.js → chunk-71ttf2ne.js} +1 -1
  18. package/dist/{chunk-g1562mcs.js → chunk-8v24kvjk.js} +1 -1
  19. package/dist/chunk-94d2t16y.js +2 -0
  20. package/dist/{chunk-cjb46akr.js → chunk-98gxw97n.js} +1 -1
  21. package/dist/{chunk-27kb6nrb.js → chunk-9kb3my0w.js} +2 -2
  22. package/dist/{chunk-ggde5cqk.js → chunk-9pjy59d6.js} +65 -65
  23. package/dist/{chunk-9rpw3gqx.js → chunk-9q3dbv0w.js} +1 -1
  24. package/dist/{chunk-81nqrcn0.js → chunk-a6amx427.js} +1 -1
  25. package/dist/{chunk-t7s0pdtw.js → chunk-aw4jxj6a.js} +2 -2
  26. package/dist/chunk-b5mfa6w6.js +2 -0
  27. package/dist/chunk-bprn7crb.js +2 -0
  28. package/dist/{chunk-mqdnfn4h.js → chunk-cxgr65kt.js} +1 -1
  29. package/dist/{chunk-5rvbpmzc.js → chunk-cxkyt6ht.js} +1 -1
  30. package/dist/{chunk-m8w4hve0.js → chunk-dj3b04tn.js} +1 -1
  31. package/dist/chunk-ds6eqyq2.js +2 -0
  32. package/dist/chunk-dy0gm4e4.js +2 -0
  33. package/dist/chunk-e8ewjcmj.js +2 -0
  34. package/dist/{chunk-g4dmjede.js → chunk-f64rmdvt.js} +2 -2
  35. package/dist/chunk-fkgdbdqa.js +2 -0
  36. package/dist/chunk-g9dh9yat.js +2 -0
  37. package/dist/chunk-gg4hrjrf.js +2 -0
  38. package/dist/chunk-gna3h2yv.js +2 -0
  39. package/dist/{chunk-tbef3yyk.js → chunk-gskjzw5r.js} +3 -3
  40. package/dist/chunk-gyfb3rj5.js +2 -0
  41. package/dist/chunk-gzk5ak8f.js +2 -0
  42. package/dist/{chunk-xnjcmhs5.js → chunk-hjhz90kg.js} +2 -2
  43. package/dist/{chunk-t794av8e.js → chunk-hvmtpe7w.js} +1 -1
  44. package/dist/chunk-j04s01mf.js +2 -0
  45. package/dist/{chunk-a6s6hvcd.js → chunk-j3z1bfjt.js} +1 -1
  46. package/dist/{chunk-t61vdbje.js → chunk-ktvr45qg.js} +6 -6
  47. package/dist/chunk-kyda9myt.js +2 -0
  48. package/dist/chunk-m4sd2ker.js +2 -0
  49. package/dist/chunk-mhjndjjb.js +2 -0
  50. package/dist/{chunk-8h8pf1cj.js → chunk-mn6gcvk9.js} +4 -4
  51. package/dist/{chunk-x0mc2kv0.js → chunk-mx446wgp.js} +12 -4
  52. package/dist/{chunk-cwzkq9bs.js → chunk-nma8b17c.js} +71 -16
  53. package/dist/chunk-nrjevcyh.js +2 -0
  54. package/dist/chunk-pq9978k5.js +2 -0
  55. package/dist/{chunk-28s5x7wv.js → chunk-pz537q62.js} +2 -2
  56. package/dist/{chunk-2542vq5p.js → chunk-qf7da9f6.js} +1 -1
  57. package/dist/chunk-r0gx4p2m.js +2 -0
  58. package/dist/{chunk-jjebxeee.js → chunk-r7m8dh2g.js} +5 -5
  59. package/dist/{chunk-cnxf8e5p.js → chunk-rdn3egy7.js} +1 -1
  60. package/dist/chunk-rskf20cw.js +2 -0
  61. package/dist/{chunk-dts9z53c.js → chunk-rvzx5s72.js} +1 -1
  62. package/dist/{chunk-99kt56fn.js → chunk-scvzv5y2.js} +2 -2
  63. package/dist/chunk-sz2cf4w6.js +2 -0
  64. package/dist/{chunk-07mksefx.js → chunk-tydxqfs6.js} +1 -1
  65. package/dist/chunk-vbbrtrcg.js +2 -0
  66. package/dist/chunk-vc24bahj.js +2 -0
  67. package/dist/chunk-vkgsj6k0.js +2 -0
  68. package/dist/{chunk-a0jyh65n.js → chunk-wc6k446y.js} +3 -3
  69. package/dist/{chunk-2swdrsrq.js → chunk-wzeq29c1.js} +2 -2
  70. package/dist/{chunk-8xcg2dqy.js → chunk-xc27xdm6.js} +1 -1
  71. package/dist/{chunk-ss7wapbh.js → chunk-xts31rkc.js} +199 -199
  72. package/dist/{chunk-ykqq6cw0.js → chunk-y42ge4xh.js} +20 -20
  73. package/dist/chunk-y51pb1tc.js +2 -0
  74. package/dist/{chunk-74j18qk0.js → chunk-y8h823cb.js} +28 -28
  75. package/dist/{chunk-s10r6hxp.js → chunk-yd7g02v5.js} +7 -7
  76. package/dist/chunk-yn2d8x8m.js +3 -0
  77. package/dist/{chunk-c9fj7t9b.js → chunk-yv00fy8z.js} +1 -1
  78. package/dist/cli.js +43 -43
  79. package/dist/color-mode-boot.js +1 -1
  80. package/dist/craft-entry.js +2 -2
  81. package/dist/craft.js +2 -2
  82. package/dist/dev-server/ts-css.js +18 -2
  83. package/dist/pwa.js +3 -3
  84. package/dist/signals.js +69 -14
  85. package/dist/ssg.js +2 -2
  86. package/package.json +5 -5
  87. package/dist/chunk-129ernx4.js +0 -2
  88. package/dist/chunk-2njt4vbe.js +0 -2
  89. package/dist/chunk-3w22gpa9.js +0 -2
  90. package/dist/chunk-3ztpcnga.js +0 -2
  91. package/dist/chunk-4aw47rmg.js +0 -2
  92. package/dist/chunk-549wm9qp.js +0 -2
  93. package/dist/chunk-5jak1hxp.js +0 -2
  94. package/dist/chunk-7ppykfx2.js +0 -2
  95. package/dist/chunk-82nw3942.js +0 -2
  96. package/dist/chunk-8h2adg8c.js +0 -2
  97. package/dist/chunk-9h1kq4hv.js +0 -2
  98. package/dist/chunk-awsg50kd.js +0 -2
  99. package/dist/chunk-ax1xbz1k.js +0 -2
  100. package/dist/chunk-cg8hg6cs.js +0 -3
  101. package/dist/chunk-g3xgcnh4.js +0 -2
  102. package/dist/chunk-j338fs8k.js +0 -2
  103. package/dist/chunk-kyd15xqj.js +0 -2
  104. package/dist/chunk-m5asyydz.js +0 -2
  105. package/dist/chunk-m5dgc757.js +0 -2
  106. package/dist/chunk-m6cfxjyy.js +0 -2
  107. package/dist/chunk-mmh37ywa.js +0 -2
  108. package/dist/chunk-nskfyvbv.js +0 -2
  109. package/dist/chunk-q0w6a9hv.js +0 -2
  110. package/dist/chunk-q9yhnqe5.js +0 -2
  111. package/dist/chunk-rkzvmk04.js +0 -2
  112. package/dist/chunk-rx6a75yf.js +0 -2
  113. package/dist/chunk-se4b8sjc.js +0 -2
  114. package/dist/chunk-t4rgn046.js +0 -2
  115. package/dist/chunk-tr3e1qzf.js +0 -2
  116. package/dist/chunk-vr4t7exr.js +0 -2
  117. package/dist/chunk-zb5p05v4.js +0 -2
@@ -1,2 +1,2 @@
1
1
  // @bun
2
- import{Ie,Wt,Gl}from"./chunk-cwzkq9bs.js";import{V,Tn,qt,Nr,Lr,Rn,Jl,Yl,Zl,Kt,Xt,jr,An,Ql}from"./chunk-80hpdc22.js";import"./chunk-01nx6zcw.js";export{Nr as batch,Gl as default,Tn as derived,qt as effect,Ie as generateSignalsRuntime,Wt as generateSignalsRuntimeDev,Xt as isDerived,Kt as isSignal,Rn as onDestroy,Lr as onMount,An as peek,Zl as pendingLifecycleCounts,Yl as runDestroyCallbacks,Jl as runMountCallbacks,V as state,jr as untrack,Ql as useOptimistic};
2
+ import{Ie,Wt,Gl}from"./chunk-nma8b17c.js";import{V,Tn,qt,Nr,Lr,Rn,Jl,Yl,Zl,Kt,Xt,jr,An,Ql}from"./chunk-80hpdc22.js";import"./chunk-01nx6zcw.js";export{Nr as batch,Gl as default,Tn as derived,qt as effect,Ie as generateSignalsRuntime,Wt as generateSignalsRuntimeDev,Xt as isDerived,Kt as isSignal,Rn as onDestroy,Lr as onMount,An as peek,Zl as pendingLifecycleCounts,Yl as runDestroyCallbacks,Jl as runMountCallbacks,V as state,jr as untrack,Ql as useOptimistic};
@@ -1,4 +1,4 @@
1
1
  // @bun
2
2
  import m from"path";var y=/__stxModules\["((?:[^"\\]|\\.)*)"\]/g;function I(...o){let r=new Set;for(let s of o){if(!s||!s.includes("__stxModules["))continue;for(let e of s.matchAll(y))try{r.add(JSON.parse(`"${e[1]}"`))}catch{}}return[...r].sort()}async function w(o,r={}){if(o.length===0)return null;let s=process.cwd(),e=[],a=[];o.forEach((t,c)=>{let i=t.startsWith("npm:")?t.slice(4):m.resolve(s,t),l=`__stxRegistered${c}`,p=JSON.stringify(t);e.push(`import * as ${l} from ${JSON.stringify(i)};`),a.push(`if (!globalThis.__stxModules[${p}]) globalThis.__stxModules[${p}] = ${l};`)});let d=[...e,"globalThis.__stxModules = globalThis.__stxModules || {};",...a].join(`
3
- `),n;try{let{bundleClientScript:t}=await import("./chunk-07mksefx.js");n=await t(d,m.join(s,".stx-module-registry.ts"),{projectRoot:s,minify:r.minify,externalizeUserModules:!1,collectInputs:r.collectInputs,throwOnFailure:!0})}catch(t){let{formatBuildFailure:c}=await import("./chunk-eev60q15.js"),i=c(t);console.warn(`[stx] could not build the page module registry (#1957): ${i}`);let l=`[stx] the page module registry did not build, so ${o.join(", ")} cannot load (#1957): ${i}`;return`;console.error(${JSON.stringify(l)});`}let{transformAutoImports:f,generateAutoImportDestructuring:_}=await import("./chunk-a6s6hvcd.js"),u=f(n),h=_(u.stxImports,u.browserImports),{transformStoreImports:x}=await import("./chunk-0e1rga0j.js");n=x(u.code);let g=JSON.stringify(new Bun.CryptoHasher("md5").update(d).digest("hex").slice(0,12));return[";(function() {"," var __stxBundles = globalThis.__stxModuleBundles || (globalThis.__stxModuleBundles = {});",` if (__stxBundles[${g}]) return;`,` __stxBundles[${g}] = true;`,h,n,"})();"].join(`
3
+ `),n;try{let{bundleClientScript:t}=await import("./chunk-tydxqfs6.js");n=await t(d,m.join(s,".stx-module-registry.ts"),{projectRoot:s,minify:r.minify,externalizeUserModules:!1,collectInputs:r.collectInputs,throwOnFailure:!0})}catch(t){let{formatBuildFailure:c}=await import("./chunk-eev60q15.js"),i=c(t);console.warn(`[stx] could not build the page module registry (#1957): ${i}`);let l=`[stx] the page module registry did not build, so ${o.join(", ")} cannot load (#1957): ${i}`;return`;console.error(${JSON.stringify(l)});`}let{transformAutoImports:f,generateAutoImportDestructuring:_}=await import("./chunk-j3z1bfjt.js"),u=f(n),h=_(u.stxImports,u.browserImports),{transformStoreImports:x}=await import("./chunk-0e1rga0j.js");n=x(u.code);let g=JSON.stringify(new Bun.CryptoHasher("md5").update(d).digest("hex").slice(0,12));return[";(function() {"," var __stxBundles = globalThis.__stxModuleBundles || (globalThis.__stxModuleBundles = {});",` if (__stxBundles[${g}]) return;`,` __stxBundles[${g}] = true;`,h,n,"})();"].join(`
4
4
  `)}export{w as buildModuleRegistryScript,I as registeredModuleIdsIn};
@@ -4,5 +4,5 @@ var Fr=new Map([["craft-button",{name:"Button",zigType:"craft.Button",props:[{na
4
4
  `)}function v(e,t){let r=" ".repeat(t),n=[];for(let[a,l]of Object.entries(e.props))if(l.type==="literal"){let p=typeof l.value==="string"?`"${l.value}"`:String(l.value);n.push(`${a}: ${p}`)}let i=n.length>0?`{ ${n.join(", ")} }`:"{}",o=e.children.map((a)=>a.type==="text"?`"${a.props.text?.type==="literal"?a.props.text.value:""}"`:v(a,t+1)),s=o.length>0?`,
5
5
  ${r} [${o.join(`,
6
6
  ${r} `)}]`:"";return`Craft.create("${e.zigType}", ${i}${s})`}function H(e,t,r){if(t.target==="universal"){let n=[];n.push("// Universal entry point"),n.push("");for(let[i,o]of r)n.push(`// --- ${i.toUpperCase()} ---`),n.push(`#if ${i.toUpperCase()}`),n.push(o),n.push("#endif"),n.push("");return n.join(`
7
- `)}return r.get(t.target)||u(e,t)}function _(e,t,r){let n=[];function i(o){n.push({name:o.zigType,hash:x(JSON.stringify(o.props)),props:Object.keys(o.props),events:Array.from(o.events.keys()),slots:[],isNative:o.zigType.startsWith("craft.")});for(let s of o.children)i(s)}return i(t),{version:"1.0.0",components:n,entry:e.id,assets:[],styles:e.styles}}function B(e,t){return JSON.stringify({version:3,file:"output.zig",sources:["input.stx"],mappings:""})}var F=0;function T(){return`id_${++F}`}function x(e){let t=0;for(let r=0;r<e.length;r++){let n=e.charCodeAt(r);t=(t<<5)-t+n,t=t&t}return Math.abs(t).toString(36)}function J(e){return e.charAt(0).toUpperCase()+e.slice(1)}function U(e){let t=[],r=/<script[^>]*>([\s\S]*?)<\/script>/gi,n;while((n=r.exec(e))!==null)t.push(n[1]);return t}function Z(e){let t=[],r=/<style[^>]*>([\s\S]*?)<\/style>/gi,n;while((n=r.exec(e))!==null)t.push(n[1]);return t}function f(e){let t=e.type==="component"?1:0;if(e.children)for(let r of e.children)t+=f(r);return t}function d(e){let t=e.zigType.startsWith("craft.")?1:0;for(let r of e.children)t+=d(r);return t}function _o(e){return{start:async()=>{console.log("[craft-compiler] Hot reload server started")},stop:async()=>{console.log("[craft-compiler] Hot reload server stopped")},notifyChange:(t)=>{console.log(`[craft-compiler] File changed: ${t}`)}}}var K={compileToNative:Eo,createHotReloadServer:_o,NATIVE_COMPONENTS:Fr},yu=K;
8
- export{Fr,Eo,_o,yu};
7
+ `)}return r.get(t.target)||u(e,t)}function _(e,t,r){let n=[];function i(o){n.push({name:o.zigType,hash:x(JSON.stringify(o.props)),props:Object.keys(o.props),events:Array.from(o.events.keys()),slots:[],isNative:o.zigType.startsWith("craft.")});for(let s of o.children)i(s)}return i(t),{version:"1.0.0",components:n,entry:e.id,assets:[],styles:e.styles}}function B(e,t){return JSON.stringify({version:3,file:"output.zig",sources:["input.stx"],mappings:""})}var F=0;function T(){return`id_${++F}`}function x(e){let t=0;for(let r=0;r<e.length;r++){let n=e.charCodeAt(r);t=(t<<5)-t+n,t=t&t}return Math.abs(t).toString(36)}function J(e){return e.charAt(0).toUpperCase()+e.slice(1)}function U(e){let t=[],r=/<script[^>]*>([\s\S]*?)<\/script>/gi,n;while((n=r.exec(e))!==null)t.push(n[1]);return t}function Z(e){let t=[],r=/<style[^>]*>([\s\S]*?)<\/style>/gi,n;while((n=r.exec(e))!==null)t.push(n[1]);return t}function f(e){let t=e.type==="component"?1:0;if(e.children)for(let r of e.children)t+=f(r);return t}function d(e){let t=e.zigType.startsWith("craft.")?1:0;for(let r of e.children)t+=d(r);return t}function _o(e){return{start:async()=>{console.log("[craft-compiler] Hot reload server started")},stop:async()=>{console.log("[craft-compiler] Hot reload server stopped")},notifyChange:(t)=>{console.log(`[craft-compiler] File changed: ${t}`)}}}var K={compileToNative:Eo,createHotReloadServer:_o,NATIVE_COMPONENTS:Fr},yd=K;
8
+ export{Fr,Eo,_o,yd};
@@ -0,0 +1,2 @@
1
+ // @bun
2
+ import{Mr,El,_l}from"./chunk-71ttf2ne.js";import"./chunk-f64rmdvt.js";import"./chunk-wc6k446y.js";import"./chunk-8scw1bes.js";import"./chunk-xts31rkc.js";import"./chunk-594tt40e.js";import"./chunk-wkc34drs.js";import"./chunk-j4afmryj.js";import"./chunk-xc27xdm6.js";import"./chunk-scvzv5y2.js";import"./chunk-yd7g02v5.js";import"./chunk-gskjzw5r.js";import"./chunk-ab7vh24b.js";import"./chunk-pf0d8y9n.js";import"./chunk-01nx6zcw.js";import"./chunk-mx446wgp.js";import"./chunk-pcq6vphz.js";export{_l as clearComposableCache,El as getComposableScript,Mr as listComposableModules};
@@ -0,0 +1,2 @@
1
+ // @bun
2
+ import{Ct,lc,dc,uc,pc,fc,u,gc,ds,mc,si,oi}from"./chunk-xts31rkc.js";import"./chunk-594tt40e.js";import"./chunk-wkc34drs.js";import"./chunk-j4afmryj.js";import"./chunk-xc27xdm6.js";import"./chunk-scvzv5y2.js";import"./chunk-yd7g02v5.js";import"./chunk-gskjzw5r.js";import"./chunk-ab7vh24b.js";import"./chunk-pf0d8y9n.js";import"./chunk-01nx6zcw.js";import"./chunk-mx446wgp.js";import"./chunk-pcq6vphz.js";export{Ct as STX_ENGINE_BINDING_NAMES,ds as convertToCommonJS,si as extractScriptFromTemplate,u as extractVariables,oi as hasVariables,gc as isCompleteImport,fc as isMissingBindingFailure,uc as isModuleResolutionFailure,pc as isSyntaxFailure,mc as splitDeclaration,lc as stripTypeScript,dc as withoutStxReferrer};
@@ -1,5 +1,5 @@
1
1
  // @bun
2
- import"./chunk-ab7vh24b.js";import"./chunk-wkc34drs.js";import"./chunk-x0mc2kv0.js";import{ir,Os,Ai}from"./chunk-01nx6zcw.js";import"./chunk-pf0d8y9n.js";import{Ln,zn,n,o}from"./chunk-ss7wapbh.js";import"./chunk-tbef3yyk.js";import"./chunk-s10r6hxp.js";import"./chunk-99kt56fn.js";import"./chunk-8xcg2dqy.js";import"./chunk-pcq6vphz.js";import"./chunk-j4afmryj.js";import{Ie}from"./chunk-cwzkq9bs.js";import"./chunk-8adstrk5.js";import{existsSync as M,mkdirSync as dt,readFileSync as ft}from"fs";import T from"path";import{existsSync as at,mkdirSync as ct}from"fs";import k from"path";import{existsSync as it}from"fs";import E from"path";var be="data-stx-b",H=new Set(Os),Se=new Set(ir);function xe(t){if(t==="ref"||t==="data-stx-ref")return"ref";if(t.startsWith("::"))return null;if(t.startsWith("@bind:")||t.startsWith("x-bind:"))return"attr";if(t.startsWith("@")||t.startsWith(":")){let e=t.slice(1).split(".")[0];if(H.has(e))return e==="if"?"if":e;if(e==="for"||e==="else"||e==="else-if"||e==="elseif")return"for";if(Ai(e))return"event";if(t.startsWith("@"))return"event";return"attr"}if(t.startsWith("x-")){let e=t.split(".")[0];if(!Se.has(e))return"attr";let r=e.slice(2);if(r==="cloak"||r==="data"||r==="bind")return null;if(r==="tooltip"||r==="tooltip-position")return null;return H.has(r)?r==="if"?"if":r:"attr"}return null}function we(t){let e=[];for(let[r,i]of t){let s=xe(r);if(s)e.push({name:r,value:i,kind:s})}return e}var ye=/<([a-z][\w-]*)((?:\s+[^\s"'=<>/]+(?:\s*=\s*(?:"[^"]*"|'[^']*'|[^\s"'=<>`]+))?)*)\s*\/?>/gi,X=/([^\s"'=<>/]+)(?:\s*=\s*(?:"([^"]*)"|'([^']*)'|([^\s"'=<>`]+)))?/g;function G(t){let e=[],r=0;return{html:t.replace(ye,(s,a,l)=>{if(!l||!/[:@]|x-/.test(l))return s;let u=[];X.lastIndex=0;for(let p=X.exec(l);p;p=X.exec(l))u.push([p[1],p[2]??p[3]??p[4]??""]);let d=we(u);if(!d.length)return s;let g={id:r++,bindings:d};if(d.some((p)=>p.kind==="for"))g.template=!0;e.push(g);let c=s.endsWith("/>");return`${s.slice(0,c?-2:-1).trimEnd()} ${be}="${g.id}"${c?"/>":">"}`}),manifest:{entries:e}}}var Te=["accessibilityHint","accessibilityLabel","accessibilityRole","accessibilityState","accessibilityValue","activeOpacity","alwaysBounceHorizontal","alwaysBounceVertical","animationType","autoCapitalize","autoCorrect","autoFocus","blurRadius","contentContainerStyle","defaultSource","defaultValue","ellipsizeMode","fadeDuration","hidesWhenStopped","hitSlop","imageStyle","initialNumToRender","iosBackgroundColor","keyboardDismissMode","keyboardShouldPersistTaps","keyboardType","keyboardVerticalOffset","keyExtractor","maxLength","maximumTrackTintColor","maximumValue","maxToRenderPerBatch","minimumTrackTintColor","minimumValue","numberOfLines","numColumns","onEndReachedThreshold","pagingEnabled","placeholderTextColor","pointerEvents","presentationStyle","pressRetentionOffset","progressBackgroundColor","progressViewOffset","refreshControl","resizeMode","returnKeyType","scrollEnabled","scrollTarget","secureTextEntry","selectedValue","selectionColor","showsHorizontalScrollIndicator","showsVerticalScrollIndicator","statusBarTranslucent","stickyHeaderIndices","testID","thumbColor","thumbTintColor","titleColor","trackColor","underlayColor","windowSize"],ve=new Map(Te.map((t)=>[q(t),t]));function q(t){return t.replace(/[-_]/g,"").toLowerCase()}function O(t){return ve.get(q(t))??t}var ke={view:"View",text:"Text",button:"Button",image:"Image",img:"Image",input:"TextInput",textarea:"TextInput",scroll:"ScrollView",scrollview:"ScrollView",list:"FlatList",flatlist:"FlatList",modal:"Modal",switch:"Switch",slider:"Slider",picker:"Picker",select:"Picker",loading:"ActivityIndicator",spinner:"ActivityIndicator",div:"View",span:"Text",p:"Text",h1:"Text",h2:"Text",h3:"Text",h4:"Text",h5:"Text",h6:"Text",a:"TouchableOpacity",section:"View",article:"View",header:"SafeAreaView",footer:"View",main:"View",nav:"View",aside:"View",form:"View",label:"Text",fieldset:"View",legend:"Text",option:"Text",dialog:"Modal",figure:"View",figcaption:"Text",picture:"View",hr:"View",ul:"View",ol:"View",li:"View",dl:"View",dt:"Text",dd:"Text",table:"View",thead:"View",tbody:"View",tfoot:"View",tr:"View",th:"Text",td:"Text",caption:"Text",strong:"Text",b:"Text",em:"Text",i:"Text",u:"Text",s:"Text",small:"Text",mark:"Text",abbr:"Text",time:"Text",code:"Text",kbd:"Text",samp:"Text",pre:"Text",blockquote:"Text",cite:"Text",q:"Text",sub:"Text",sup:"Text"};function U(t){return ke[t.toLowerCase()]||t}var Re={activity:"waveform.path.ecg","alarm-clock":"alarm","alert-circle":"exclamationmark.circle","alert-triangle":"exclamationmark.triangle",archive:"archivebox","arrow-down":"arrow.down","arrow-left":"arrow.left","arrow-right":"arrow.right","arrow-up":"arrow.up","arrow-up-right":"arrow.up.right","at-sign":"at","audio-lines":"waveform",award:"rosette","badge-check":"checkmark.seal","bar-chart":"chart.bar","bar-chart-2":"chart.bar","bar-chart-3":"chart.bar",battery:"battery.100",bed:"bed.double",bell:"bell","bell-off":"bell.slash",bike:"figure.outdoor.cycle",bluetooth:"antenna.radiowaves.left.and.right",book:"book","book-open":"book",bookmark:"bookmark",brain:"brain",calendar:"calendar","calendar-check":"calendar.badge.checkmark","calendar-clock":"calendar.badge.clock","calendar-days":"calendar","calendar-plus":"calendar.badge.plus","calendar-range":"calendar","calendar-sync":"arrow.triangle.2.circlepath",camera:"camera","chart-bar":"chart.bar","chart-line":"chart.xyaxis.line",check:"checkmark","check-circle":"checkmark.circle","check-circle-2":"checkmark.circle","chevron-down":"chevron.down","chevron-left":"chevron.left","chevron-right":"chevron.right","chevron-up":"chevron.up",circle:"circle","circle-alert":"exclamationmark.circle","circle-check":"checkmark.circle","circle-check-big":"checkmark.circle","circle-help":"questionmark.circle","circle-play":"play.circle","circle-plus":"plus.circle","circle-user":"person.crop.circle","circle-x":"xmark.circle",clapperboard:"film",clipboard:"clipboard","clipboard-list":"list.clipboard",clock:"clock",cloud:"cloud","cloud-off":"icloud.slash",coffee:"cup.and.saucer",copy:"doc.on.doc","credit-card":"creditcard",download:"arrow.down.circle",droplet:"drop",droplets:"drop",dumbbell:"dumbbell",edit:"pencil","external-link":"arrow.up.right.square",eye:"eye","eye-off":"eye.slash",file:"doc","file-text":"doc.text",filter:"line.3.horizontal.decrease",flag:"flag",flame:"flame","flower-2":"camera.macro",footprints:"figure.run",gauge:"gauge",gift:"gift",globe:"globe","graduation-cap":"graduationcap","grip-vertical":"line.3.horizontal",heart:"heart","heart-pulse":"heart.text.square","help-circle":"questionmark.circle",history:"clock.arrow.circlepath",home:"house",house:"house",image:"photo",inbox:"tray",info:"info.circle",layers:"square.3.layers.3d","layout-grid":"square.grid.2x2",library:"books.vertical",link:"link",list:"list.bullet","list-checks":"checklist",loader:"arrow.triangle.2.circlepath","loader-2":"arrow.triangle.2.circlepath","loader-circle":"arrow.triangle.2.circlepath",lock:"lock","log-in":"arrow.right.to.line","log-out":"rectangle.portrait.and.arrow.right",mail:"envelope",map:"map","map-pin":"mappin.and.ellipse",medal:"medal",menu:"line.3.horizontal","message-circle":"bubble.left","message-square":"text.bubble","message-square-quote":"quote.bubble",mic:"mic",minus:"minus",moon:"moon","more-horizontal":"ellipsis","more-vertical":"ellipsis",mountain:"mountain.2",music:"music.note",package:"shippingbox",pause:"pause","pause-circle":"pause.circle",pencil:"pencil","person-standing":"figure.walk",phone:"phone",play:"play.fill",plug:"powerplug",plus:"plus","plus-circle":"plus.circle","refresh-cw":"arrow.clockwise",repeat:"repeat","rotate-ccw":"arrow.counterclockwise",route:"point.topleft.down.to.point.bottomright.curvepath",ruler:"ruler",sailboat:"sailboat",satellite:"antenna.radiowaves.left.and.right",save:"square.and.arrow.down",scale:"scalemass",search:"magnifyingglass",send:"paperplane",settings:"gearshape","settings-2":"slider.horizontal.3",share:"square.and.arrow.up","share-2":"square.and.arrow.up",shield:"shield","shield-check":"checkmark.shield","shopping-bag":"bag","shopping-cart":"cart","skip-back":"backward.end","skip-forward":"forward.end",sliders:"slider.horizontal.3","sliders-horizontal":"slider.horizontal.3",smartphone:"iphone",snowflake:"snowflake",sparkles:"sparkles",square:"square",star:"star",stopwatch:"stopwatch",store:"storefront",sun:"sun.max",sunrise:"sunrise",sunset:"sunset",tag:"tag",target:"scope",thermometer:"thermometer.medium","thumbs-up":"hand.thumbsup",timer:"timer",trash:"trash","trash-2":"trash","trending-down":"chart.line.downtrend.xyaxis","trending-up":"chart.line.uptrend.xyaxis",trophy:"trophy",unlink:"personalhotspot.slash",upload:"arrow.up.circle",user:"person","user-plus":"person.badge.plus","user-round":"person",users:"person.2",video:"video","volume-2":"speaker.wave.2",watch:"applewatch",waves:"figure.pool.swim",weight:"scalemass",wifi:"wifi","wifi-off":"wifi.slash",wind:"wind",x:"xmark","x-circle":"xmark.circle",zap:"bolt"};function J(t,e=!1){let r=String(t??"").trim();if(!r)return{symbol:"circle",known:!1};if(e)return{symbol:r,known:!0};let i=/^i-([a-z0-9]+)-(.+)$/.exec(r)??/^([a-z0-9]+):(.+)$/.exec(r),s=i?i[1]:"lucide",a=i?i[2]:r;if(s==="lucide"){let l=Re[a];if(l)return{symbol:l,iconify:`i-lucide-${a}`,known:!0};if(!i&&r.includes("."))return{symbol:r,known:!0}}return{symbol:"circle",iconify:i?r:`i-lucide-${a}`,known:!1}}var Ce={transparent:"transparent",current:"currentColor",black:"#000000",white:"#ffffff",slate:{50:"#f8fafc",100:"#f1f5f9",200:"#e2e8f0",300:"#cbd5e1",400:"#94a3b8",500:"#64748b",600:"#475569",700:"#334155",800:"#1e293b",900:"#0f172a",950:"#020617"},gray:{50:"#f9fafb",100:"#f3f4f6",200:"#e5e7eb",300:"#d1d5db",400:"#9ca3af",500:"#6b7280",600:"#4b5563",700:"#374151",800:"#1f2937",900:"#111827",950:"#030712"},zinc:{50:"#fafafa",100:"#f4f4f5",200:"#e4e4e7",300:"#d4d4d8",400:"#a1a1aa",500:"#71717a",600:"#52525b",700:"#3f3f46",800:"#27272a",900:"#18181b",950:"#09090b"},red:{50:"#fef2f2",100:"#fee2e2",200:"#fecaca",300:"#fca5a5",400:"#f87171",500:"#ef4444",600:"#dc2626",700:"#b91c1c",800:"#991b1b",900:"#7f1d1d",950:"#450a0a"},orange:{50:"#fff7ed",100:"#ffedd5",200:"#fed7aa",300:"#fdba74",400:"#fb923c",500:"#f97316",600:"#ea580c",700:"#c2410c",800:"#9a3412",900:"#7c2d12",950:"#431407"},amber:{50:"#fffbeb",100:"#fef3c7",200:"#fde68a",300:"#fcd34d",400:"#fbbf24",500:"#f59e0b",600:"#d97706",700:"#b45309",800:"#92400e",900:"#78350f",950:"#451a03"},yellow:{50:"#fefce8",100:"#fef9c3",200:"#fef08a",300:"#fde047",400:"#facc15",500:"#eab308",600:"#ca8a04",700:"#a16207",800:"#854d0e",900:"#713f12",950:"#422006"},green:{50:"#f0fdf4",100:"#dcfce7",200:"#bbf7d0",300:"#86efac",400:"#4ade80",500:"#22c55e",600:"#16a34a",700:"#15803d",800:"#166534",900:"#14532d",950:"#052e16"},emerald:{50:"#ecfdf5",100:"#d1fae5",200:"#a7f3d0",300:"#6ee7b7",400:"#34d399",500:"#10b981",600:"#059669",700:"#047857",800:"#065f46",900:"#064e3b",950:"#022c22"},teal:{50:"#f0fdfa",100:"#ccfbf1",200:"#99f6e4",300:"#5eead4",400:"#2dd4bf",500:"#14b8a6",600:"#0d9488",700:"#0f766e",800:"#115e59",900:"#134e4a",950:"#042f2e"},cyan:{50:"#ecfeff",100:"#cffafe",200:"#a5f3fc",300:"#67e8f9",400:"#22d3ee",500:"#06b6d4",600:"#0891b2",700:"#0e7490",800:"#155e75",900:"#164e63",950:"#083344"},sky:{50:"#f0f9ff",100:"#e0f2fe",200:"#bae6fd",300:"#7dd3fc",400:"#38bdf8",500:"#0ea5e9",600:"#0284c7",700:"#0369a1",800:"#075985",900:"#0c4a6e",950:"#082f49"},lime:{50:"#f7fee7",100:"#ecfccb",200:"#d9f99d",300:"#bef264",400:"#a3e635",500:"#84cc16",600:"#65a30d",700:"#4d7c0f",800:"#3f6212",900:"#365314",950:"#1a2e05"},fuchsia:{50:"#fdf4ff",100:"#fae8ff",200:"#f5d0fe",300:"#f0abfc",400:"#e879f9",500:"#d946ef",600:"#c026d3",700:"#a21caf",800:"#86198f",900:"#701a75",950:"#4a044e"},neutral:{50:"#fafafa",100:"#f5f5f5",200:"#e5e5e5",300:"#d4d4d4",400:"#a3a3a3",500:"#737373",600:"#525252",700:"#404040",800:"#262626",900:"#171717",950:"#0a0a0a"},stone:{50:"#fafaf9",100:"#f5f5f4",200:"#e7e5e4",300:"#d6d3d1",400:"#a8a29e",500:"#78716c",600:"#57534e",700:"#44403c",800:"#292524",900:"#1c1917",950:"#0c0a09"},blue:{50:"#eff6ff",100:"#dbeafe",200:"#bfdbfe",300:"#93c5fd",400:"#60a5fa",500:"#3b82f6",600:"#2563eb",700:"#1d4ed8",800:"#1e40af",900:"#1e3a8a",950:"#172554"},indigo:{50:"#eef2ff",100:"#e0e7ff",200:"#c7d2fe",300:"#a5b4fc",400:"#818cf8",500:"#6366f1",600:"#4f46e5",700:"#4338ca",800:"#3730a3",900:"#312e81",950:"#1e1b4b"},violet:{50:"#f5f3ff",100:"#ede9fe",200:"#ddd6fe",300:"#c4b5fd",400:"#a78bfa",500:"#8b5cf6",600:"#7c3aed",700:"#6d28d9",800:"#5b21b6",900:"#4c1d95",950:"#2e1065"},purple:{50:"#faf5ff",100:"#f3e8ff",200:"#e9d5ff",300:"#d8b4fe",400:"#c084fc",500:"#a855f7",600:"#9333ea",700:"#7e22ce",800:"#6b21a8",900:"#581c87",950:"#3b0764"},pink:{50:"#fdf2f8",100:"#fce7f3",200:"#fbcfe8",300:"#f9a8d4",400:"#f472b6",500:"#ec4899",600:"#db2777",700:"#be185d",800:"#9d174d",900:"#831843",950:"#500724"},rose:{50:"#fff1f2",100:"#ffe4e6",200:"#fecdd3",300:"#fda4af",400:"#fb7185",500:"#f43f5e",600:"#e11d48",700:"#be123c",800:"#9f1239",900:"#881337",950:"#4c0519"}},Z={px:1,0:0,0.5:2,1:4,1.5:6,2:8,2.5:10,3:12,3.5:14,4:16,5:20,6:24,7:28,8:32,9:36,10:40,11:44,12:48,14:56,16:64,20:80,24:96,28:112,32:128,36:144,40:160,44:176,48:192,52:208,56:224,60:240,64:256,72:288,80:320,96:384},Y={xs:12,sm:14,base:16,lg:18,xl:20,"2xl":24,"3xl":30,"4xl":36,"5xl":48,"6xl":60,"7xl":72,"8xl":96,"9xl":128},y={none:0,sm:2,DEFAULT:4,md:6,lg:8,xl:12,"2xl":16,"3xl":24,full:9999};function N(t){let e=t.lastIndexOf("/");if(e>0&&!t.endsWith("]")){let i=N(t.slice(0,e)),s=t.slice(e+1),a=/^\[(.+)\]$/.test(s)?Number.parseFloat(s.slice(1,-1))*(s.includes("%")?1:100):Number.parseFloat(s);if(!i||!Number.isFinite(a))return;return _e(i,a/100)}if(t==="transparent")return"transparent";if(t==="current")return"currentColor";if(t==="black")return"#000000";if(t==="white")return"#ffffff";let r=t.split("-");if(r.length===2){let[i,s]=r,a=Ce[i];if(a&&typeof a==="object")return a[s]}if(t.startsWith("[")&&t.endsWith("]")){let i=t.slice(1,-1);return/^(#|rgba?\(|hsla?\(|[a-z]+$)/i.test(i)?i:void 0}return}function _e(t,e){if(t==="transparent")return t;let r=t.startsWith("#")?t.slice(1):"";if(r.length===3)r=r.split("").map((s)=>s+s).join("");if(r.length===8)r=r.slice(0,6);if(r.length!==6)return;let i=Math.round(Math.min(1,Math.max(0,e))*255);return`#${r}${i.toString(16).padStart(2,"0")}`}function z(t,e=16){if(!t.startsWith("[")||!t.endsWith("]"))return;let r=t.slice(1,-1),i=Number.parseFloat(r);if(!Number.isFinite(i))return;if(r.endsWith("rem"))return i*16;if(r.endsWith("em"))return i*e;return i}function h(t){if(t.startsWith("[")&&t.endsWith("]")){let e=t.slice(1,-1),r=e.endsWith("rem")?Number.parseFloat(e)*16:Number.parseFloat(e);return Number.isFinite(r)?r:void 0}return Z[t]}var Ee={flex:(t,e)=>(e.display="flex",!0),hidden:(t,e)=>(e.display="none",!0),grid:(t,e)=>(e.display="grid",!0),"flex-row":(t,e)=>(e.flexDirection="row",!0),"flex-col":(t,e)=>(e.flexDirection="column",!0),"flex-row-reverse":(t,e)=>(e.flexDirection="row-reverse",!0),"flex-col-reverse":(t,e)=>(e.flexDirection="column-reverse",!0),"flex-wrap":(t,e)=>(e.flexWrap="wrap",!0),"flex-nowrap":(t,e)=>(e.flexWrap="nowrap",!0),"flex-wrap-reverse":(t,e)=>(e.flexWrap="wrap-reverse",!0),"flex-1":(t,e)=>(e.flex=1,e.flexGrow=1,e.flexShrink=1,e.flexBasis=0,!0),"flex-auto":(t,e)=>(e.flexGrow=1,e.flexShrink=1,!0),"flex-initial":(t,e)=>(e.flexGrow=0,e.flexShrink=1,!0),"flex-none":(t,e)=>(e.flexGrow=0,e.flexShrink=0,!0),grow:(t,e)=>(e.flexGrow=1,!0),"grow-0":(t,e)=>(e.flexGrow=0,!0),shrink:(t,e)=>(e.flexShrink=1,!0),"shrink-0":(t,e)=>(e.flexShrink=0,!0),"justify-start":(t,e)=>(e.justifyContent="flex-start",!0),"justify-center":(t,e)=>(e.justifyContent="center",!0),"justify-end":(t,e)=>(e.justifyContent="flex-end",!0),"justify-between":(t,e)=>(e.justifyContent="space-between",!0),"justify-around":(t,e)=>(e.justifyContent="space-around",!0),"justify-evenly":(t,e)=>(e.justifyContent="space-evenly",!0),"items-start":(t,e)=>(e.alignItems="flex-start",!0),"items-center":(t,e)=>(e.alignItems="center",!0),"items-end":(t,e)=>(e.alignItems="flex-end",!0),"items-stretch":(t,e)=>(e.alignItems="stretch",!0),"items-baseline":(t,e)=>(e.alignItems="baseline",!0),"self-auto":(t,e)=>(e.alignSelf="auto",!0),"self-start":(t,e)=>(e.alignSelf="flex-start",!0),"self-center":(t,e)=>(e.alignSelf="center",!0),"self-end":(t,e)=>(e.alignSelf="flex-end",!0),"self-stretch":(t,e)=>(e.alignSelf="stretch",!0),"self-baseline":(t,e)=>(e.alignSelf="baseline",!0),"min-w-0":(t,e)=>(e.minWidth=0,!0),"aspect-square":(t,e)=>(e.aspectRatio=1,!0),"inset-0":(t,e)=>(e.top=0,e.right=0,e.bottom=0,e.left=0,!0),"tracking-tighter":(t,e)=>(e.letterSpacing=-0.8,!0),"tracking-tight":(t,e)=>(e.letterSpacing=-0.4,!0),"tracking-normal":(t,e)=>(e.letterSpacing=0,!0),"tracking-wide":(t,e)=>(e.letterSpacing=0.4,!0),"tracking-wider":(t,e)=>(e.letterSpacing=0.8,!0),"tracking-widest":(t,e)=>(e.letterSpacing=1.6,!0),"tabular-nums":()=>!0,block:()=>!0,"inline-flex":(t,e)=>(e.display="flex",!0),truncate:()=>!0,relative:(t,e)=>(e.position="relative",!0),absolute:(t,e)=>(e.position="absolute",!0),"overflow-visible":(t,e)=>(e.overflow="visible",!0),"overflow-hidden":(t,e)=>(e.overflow="hidden",!0),"overflow-scroll":(t,e)=>(e.overflow="scroll",!0),"font-thin":(t,e)=>(e.fontWeight="100",!0),"font-extralight":(t,e)=>(e.fontWeight="200",!0),"font-light":(t,e)=>(e.fontWeight="300",!0),"font-normal":(t,e)=>(e.fontWeight="400",!0),"font-medium":(t,e)=>(e.fontWeight="500",!0),"font-semibold":(t,e)=>(e.fontWeight="600",!0),"font-bold":(t,e)=>(e.fontWeight="bold",!0),"font-extrabold":(t,e)=>(e.fontWeight="800",!0),"font-black":(t,e)=>(e.fontWeight="900",!0),italic:(t,e)=>(e.fontStyle="italic",!0),"not-italic":(t,e)=>(e.fontStyle="normal",!0),"text-left":(t,e)=>(e.textAlign="left",!0),"text-center":(t,e)=>(e.textAlign="center",!0),"text-right":(t,e)=>(e.textAlign="right",!0),"text-justify":(t,e)=>(e.textAlign="justify",!0),uppercase:(t,e)=>(e.textTransform="uppercase",!0),lowercase:(t,e)=>(e.textTransform="lowercase",!0),capitalize:(t,e)=>(e.textTransform="capitalize",!0),"normal-case":(t,e)=>(e.textTransform="none",!0),underline:(t,e)=>(e.textDecorationLine="underline",!0),"line-through":(t,e)=>(e.textDecorationLine="line-through",!0),"no-underline":(t,e)=>(e.textDecorationLine="none",!0)};function Ne(t,e){if(!t.startsWith("bg-"))return!1;let r=t.slice(3),i=N(r);if(i)return e.backgroundColor=i,!0;return!1}function We(t,e){if(!t.startsWith("text-"))return!1;let r=t.slice(5);if(Y[r])return e.fontSize=Y[r],!0;if(r.startsWith("[")&&r.endsWith("]")){let s=r.slice(1,-1);if(/^-?[\d.]+(?:px|r?em)?$/.test(s)){let a=s.endsWith("rem")||s.endsWith("em")?Number.parseFloat(s)*16:Number.parseFloat(s);if(Number.isFinite(a))return e.fontSize=a,!0}}let i=N(r);if(i)return e.color=i,!0;return!1}function Be(t,e){if(t.startsWith("p-")){let r=h(t.slice(2));if(r!==void 0)return e.padding=r,!0}if(t.startsWith("px-")){let r=h(t.slice(3));if(r!==void 0)return e.paddingHorizontal=r,!0}if(t.startsWith("py-")){let r=h(t.slice(3));if(r!==void 0)return e.paddingVertical=r,!0}if(t.startsWith("pt-")){let r=h(t.slice(3));if(r!==void 0)return e.paddingTop=r,!0}if(t.startsWith("pr-")){let r=h(t.slice(3));if(r!==void 0)return e.paddingRight=r,!0}if(t.startsWith("pb-")){let r=h(t.slice(3));if(r!==void 0)return e.paddingBottom=r,!0}if(t.startsWith("pl-")){let r=h(t.slice(3));if(r!==void 0)return e.paddingLeft=r,!0}return!1}function Le(t,e){if(t.startsWith("m-")){let r=h(t.slice(2));if(r!==void 0)return e.margin=r,!0}if(t.startsWith("mx-")){let r=h(t.slice(3));if(r!==void 0)return e.marginHorizontal=r,!0}if(t.startsWith("my-")){let r=h(t.slice(3));if(r!==void 0)return e.marginVertical=r,!0}if(t.startsWith("mt-")){let r=h(t.slice(3));if(r!==void 0)return e.marginTop=r,!0}if(t.startsWith("mr-")){let r=h(t.slice(3));if(r!==void 0)return e.marginRight=r,!0}if(t.startsWith("mb-")){let r=h(t.slice(3));if(r!==void 0)return e.marginBottom=r,!0}if(t.startsWith("ml-")){let r=h(t.slice(3));if(r!==void 0)return e.marginLeft=r,!0}return!1}function De(t,e){if(!t.startsWith("w-"))return!1;let r=t.slice(2);if(r==="full")return e.width="100%",!0;if(r==="screen")return e.width="100%",!0;if(r==="auto")return e.width="auto",!0;if(r.includes("/")){let[s,a]=r.split("/"),l=Number.parseInt(s)/Number.parseInt(a)*100;return e.width=`${l}%`,!0}let i=h(r);if(i!==void 0)return e.width=i,!0;return!1}function Xe(t,e){if(!t.startsWith("h-"))return!1;let r=t.slice(2);if(r==="full")return e.height="100%",!0;if(r==="screen")return e.height="100%",!0;if(r==="auto")return e.height="auto",!0;let i=h(r);if(i!==void 0)return e.height=i,!0;return!1}function Oe(t,e){if(!t.startsWith("rounded"))return!1;if(t==="rounded")return e.borderRadius=y.DEFAULT,!0;let r=t.slice(8);if(r==="")return!1;let i=/^(?:(t|b|l|r)-)?(\[[^\]]+\])$/.exec(r);if(i){let a=z(i[2]);if(a===void 0)return!1;let l={t:["borderTopLeftRadius","borderTopRightRadius"],b:["borderBottomLeftRadius","borderBottomRightRadius"],l:["borderTopLeftRadius","borderBottomLeftRadius"],r:["borderTopRightRadius","borderBottomRightRadius"]};for(let u of i[1]?l[i[1]]:["borderRadius"])e[u]=a;return!0}if(r.startsWith("t-")){let a=y[r.slice(2)]??y.DEFAULT;return e.borderTopLeftRadius=a,e.borderTopRightRadius=a,!0}if(r.startsWith("b-")){let a=y[r.slice(2)]??y.DEFAULT;return e.borderBottomLeftRadius=a,e.borderBottomRightRadius=a,!0}if(r.startsWith("l-")){let a=y[r.slice(2)]??y.DEFAULT;return e.borderTopLeftRadius=a,e.borderBottomLeftRadius=a,!0}if(r.startsWith("r-")){let a=y[r.slice(2)]??y.DEFAULT;return e.borderTopRightRadius=a,e.borderBottomRightRadius=a,!0}let s=y[r];if(s!==void 0)return e.borderRadius=s,!0;return!1}function $e(t,e){if(!t.startsWith("border"))return!1;if(t==="border")return e.borderWidth=1,!0;let r=t.match(/^border-(\d+)$/);if(r)return e.borderWidth=Number.parseInt(r[1]),!0;let i=t.match(/^border-(t|r|b|l)-?(\d*)$/);if(i){let[,s,a]=i,l=a?Number.parseInt(a):1;switch(s){case"t":e.borderTopWidth=l;break;case"r":e.borderRightWidth=l;break;case"b":e.borderBottomWidth=l;break;case"l":e.borderLeftWidth=l;break}return!0}return!1}function ze(t,e){if(!t.startsWith("border-"))return!1;let r=t.slice(7),i=N(r);if(i)return e.borderColor=i,!0;return!1}function Ae(t,e){if(!t.startsWith("opacity-"))return!1;let r=Number.parseInt(t.slice(8));if(!Number.isNaN(r))return e.opacity=r/100,!0;return!1}function Ve(t,e){if(t.startsWith("tracking-[")){let r=z(t.slice(9),typeof e.fontSize==="number"?e.fontSize:16);if(r===void 0)return!1;return e.letterSpacing=r,!0}if(t.startsWith("leading-")){let r=t.slice(8),i=typeof e.fontSize==="number"?e.fontSize:16,s={none:1,tight:1.25,snug:1.375,normal:1.5,relaxed:1.625,loose:2},a=r.startsWith("[")?/^\[[\d.]+\]$/.test(r)?Number.parseFloat(r.slice(1,-1))*i:z(r,i):s[r]!==void 0?s[r]*i:Z[r];if(a===void 0||!Number.isFinite(a))return!1;return e.lineHeight=a,!0}return!1}function Pe(t,e){let r=/^grid-cols-(\d+)$/.exec(t);if(!r)return!1;return e.gridColumns=Number(r[1]),!0}function Fe(t,e){if(!t.startsWith("size-"))return!1;let r=t.slice(5),i=r==="full"?"100%":h(r);if(i===void 0)return!1;return e.width=i,e.height=i,!0}function je(t,e){let r=/^(-?)(top|right|bottom|left)-(.+)$/.exec(t);if(!r)return!1;let i=r[3]==="full"?"100%":h(r[3]);if(i===void 0)return!1;return e[r[2]]=typeof i==="number"&&r[1]?-i:i,!0}function Me(t,e){let r=/^space-(x|y)-(.+)$/.exec(t);if(!r)return!1;let i=h(r[2]);if(i===void 0)return!1;return e.gap=i,!0}function He(t,e){if(t.startsWith("gap-")){let r=h(t.slice(4));if(r!==void 0)return e.gap=r,!0}if(t.startsWith("gap-x-")){let r=h(t.slice(6));if(r!==void 0)return e.columnGap=r,!0}if(t.startsWith("gap-y-")){let r=h(t.slice(6));if(r!==void 0)return e.rowGap=r,!0}return!1}function A(t){let e=[],r=[],i=[];function s(d,g){let c=/^(text|bg|border|ring)-([a-z-]+)(\/[^\s]+)?$/.exec(d),f=c&&Ln[c[2]];return f?`${c[1]}-${f[g]}${c[3]||""}`:d}for(let d of t.split(/\s+/).filter(Boolean))if(d.startsWith("dark:"))r.push(s(d.slice(5),"dark"));else if(!d.includes(":")||d.startsWith("[")){if(e.push(s(d,"light")),s(d,"dark")!==d)i.push(s(d,"dark"))}let a=[],u={style:K(e.join(" "),a),unknown:a};if(r.length||i.length)u.dark=K([...i,...r].join(" "),a);for(let d of e){if(d==="truncate")u.numberOfLines=1;let g=/^line-clamp-(\d+)$/.exec(d);if(g)u.numberOfLines=Number(g[1]);if(!u.icon&&/^i-[a-z0-9]+-[a-z0-9-]+$/.test(d))u.icon=d}return u.unknown=a.filter((d)=>!/^line-clamp-\d+$/.test(d)),u}function K(t,e){let r={},i=t.split(/\s+/).filter(Boolean);for(let s of i){if(/^i-[a-z0-9]+-/.test(s))continue;let a=Ee[s];if(a){a("",r);continue}if(Ne(s,r))continue;if(We(s,r))continue;if(Be(s,r))continue;if(Le(s,r))continue;if(De(s,r))continue;if(Xe(s,r))continue;if(Oe(s,r))continue;if($e(s,r))continue;if(ze(s,r))continue;if(Ae(s,r))continue;if(He(s,r))continue;if(Ve(s,r))continue;if(Fe(s,r))continue;if(Pe(s,r))continue;if(je(s,r))continue;if(Me(s,r))continue;if(e?.push(s),typeof process<"u"&&process.env?.NODE_ENV==="development")console.warn(`[STX Native] Unknown Headwind class: ${s}`)}return r}function W(t,e={},r={},i={},s=[]){return{type:t,props:e,style:r,events:i,children:s}}function Q(t,e,r={}){return{version:"1.0.0",root:t,script:e,meta:{source:r.source||"unknown",compiledAt:r.compiledAt||Date.now(),headwindConfig:r.headwindConfig}}}var ee=new Set(["script","style","head","meta","link","title","base","noscript","svg"]),te=new Set(["template","body","html","main","fragment"]),B=new Set(["svg"]),Ge={click:"onPress",press:"onPress","press-in":"onPressIn",pressin:"onPressIn","press-out":"onPressOut",pressout:"onPressOut",longpress:"onLongPress",contextmenu:"onLongPress",input:"onChangeText",change:"onValueChange","value-change":"onValueChange",valuechange:"onValueChange",focus:"onFocus",focusin:"onFocus",blur:"onBlur",focusout:"onBlur",submit:"onSubmitEditing","submit-editing":"onSubmitEditing",submitediting:"onSubmitEditing","end-editing":"onEndEditing",endediting:"onEndEditing",scroll:"onScroll",refresh:"onRefresh",layout:"onLayout","end-reached":"onEndReached",endreached:"onEndReached",close:"onRequestClose","request-close":"onRequestClose",requestclose:"onRequestClose",show:"onShow",dismiss:"onDismiss","sliding-complete":"onSlidingComplete",slidingcomplete:"onSlidingComplete","load-start":"onLoadStart",loadstart:"onLoadStart",load:"onLoad","load-end":"onLoadEnd",loadend:"onLoadEnd",error:"onError"},qe=new Set(["onBlur","onChangeText","onDismiss","onEndEditing","onEndReached","onError","onFocus","onLayout","onLoad","onLoadEnd","onLoadStart","onLongPress","onPress","onPressIn","onPressOut","onRequestClose","onRefresh","onScroll","onShow","onSlidingComplete","onSubmitEditing","onValueChange"]),V=new Set(["display","gridColumns","gridTemplateColumns","gridAutoRows","flex","flexGrow","flexShrink","flexBasis","flexDirection","flexWrap","justifyContent","alignItems","alignSelf","alignContent","position","top","right","bottom","left","zIndex","width","height","minWidth","maxWidth","minHeight","maxHeight","aspectRatio","margin","marginTop","marginRight","marginBottom","marginLeft","marginHorizontal","marginVertical","padding","paddingTop","paddingRight","paddingBottom","paddingLeft","paddingHorizontal","paddingVertical","gap","rowGap","columnGap","borderWidth","borderTopWidth","borderRightWidth","borderBottomWidth","borderLeftWidth","borderColor","borderTopColor","borderRightColor","borderBottomColor","borderLeftColor","borderRadius","borderTopLeftRadius","borderTopRightRadius","borderBottomLeftRadius","borderBottomRightRadius","borderStyle","backgroundColor","backgroundImage","opacity","shadowColor","shadowOffset","shadowOpacity","shadowRadius","elevation","color","fontSize","fontWeight","fontStyle","fontFamily","lineHeight","letterSpacing","textAlign","textDecorationLine","textDecorationColor","textTransform","resizeMode","tintColor","transform","overflow"]),Ue=new Set(["gridColumns","gridAutoRows","flex","flexGrow","flexShrink","zIndex","aspectRatio","gap","rowGap","columnGap","borderWidth","borderTopWidth","borderRightWidth","borderBottomWidth","borderLeftWidth","borderRadius","borderTopLeftRadius","borderTopRightRadius","borderBottomLeftRadius","borderBottomRightRadius","opacity","shadowOpacity","shadowRadius","elevation","fontSize","lineHeight","letterSpacing"]),Je=new Set(["top","right","bottom","left","width","height","minWidth","maxWidth","minHeight","maxHeight","flexBasis","margin","marginTop","marginRight","marginBottom","marginLeft","marginHorizontal","marginVertical","padding","paddingTop","paddingRight","paddingBottom","paddingLeft","paddingHorizontal","paddingVertical"]),re=new Set(["View","ScrollView","SafeAreaView","KeyboardAvoidingView","Text","TextInput","Button","TouchableOpacity","TouchableHighlight","Pressable","Icon","Image","ImageBackground","FlatList","SectionList","Switch","Slider","Picker","DatePicker","Modal","ActivityIndicator","StatusBar","RefreshControl"]),ne=new Set(["View","SafeAreaView","ScrollView","KeyboardAvoidingView"]),Ye={amp:"&",lt:"<",gt:">",quot:'"',apos:"'",nbsp:" ","#39":"'","#x27":"'"};function _(t){return t.replace(/&(#x?[0-9a-f]+|\w+);/gi,(e,r)=>{let i=Ye[r.toLowerCase()];if(i!==void 0)return i;if(r[0]==="#"){let s=r[1]==="x"||r[1]==="X"?Number.parseInt(r.slice(2),16):Number.parseInt(r.slice(1),10);return Number.isFinite(s)?String.fromCodePoint(s):e}return e})}function ie(t){return t.replace(/-([a-z])/g,(e,r)=>r.toUpperCase())}function oe(t){let e=/^(-?[\d.]+)px$/.exec(t);if(e)return Number.parseFloat(e[1]);let r=/^(-?[\d.]+)r?em$/.exec(t);if(r)return Number.parseFloat(r[1])*16;if(/^-?[\d.]+$/.test(t))return Number.parseFloat(t);return t}function Ke(t,e,r){let i={},s={},a={},l="",u={};for(let[g,c]of e){let f=g.toLowerCase();if(f==="class"||f==="classname"){l=l?`${l} ${c}`:c;continue}if(f==="style"){u={...u,...Ze(t,c,r)};continue}if(f.startsWith(":")||f.startsWith("x-")&&f!=="x-cloak"){a[f.startsWith(":")?f.slice(1):f.slice(2)]=_(c);continue}if(f==="x-cloak")continue;if(f.startsWith("@")||f.startsWith("v-on:")){let b=f.startsWith("@")?f.slice(1):f.slice(5),[m]=b.split("."),x=Ge[m]??(m.startsWith("on")?m:"");if(!x||!qe.has(x)){r.push({kind:"unread-event",tag:t,name:g});continue}s[x]=_(c);continue}if(f==="key"){i.key=c;continue}let p=_(c);try{i[O(g)]=JSON.parse(p)}catch{i[O(g)]=p}}let d={...l?A(l).style:{},...u};return{props:i,style:d,events:s,bindings:a,classes:l,inline:u}}function se(t,e){if(Ue.has(t))return!1;if(Je.has(t))return/^-?[\d.]+%$/.test(e);return!0}function Ze(t,e,r){let i={},s=_(e);try{let a=JSON.parse(s);if(a&&typeof a==="object"&&!Array.isArray(a)){for(let[l,u]of Object.entries(a)){let d=V.has(l)?l:ie(l.trim().toLowerCase());if(!V.has(d)){r.push({kind:"unknown-style",tag:t,name:d});continue}if(u===null||u===void 0)continue;let g=typeof u==="string"?oe(u):u;if(typeof g!=="string"&&typeof g!=="number")continue;if(typeof g==="string"&&!se(d,g)){r.push({kind:"non-numeric-style",tag:t,name:d});continue}i[d]=g}return i}}catch{}for(let a of s.split(";")){let l=a.indexOf(":");if(l===-1)continue;let u=ie(a.slice(0,l).trim().toLowerCase()),d=a.slice(l+1).trim();if(!u||!d)continue;if(!V.has(u)){r.push({kind:"unknown-style",tag:t,name:u});continue}let g=oe(d);if(typeof g==="string"&&!se(u,g)){r.push({kind:"non-numeric-style",tag:t,name:u});continue}i[u]=g}return i}function ae(t){return t.children.map((e)=>typeof e==="string"?e:ae(e)).join("").replace(/\s+/g," ").trim()}function Qe(t,e){let r=t.node,i=r.children.filter((a)=>typeof a!=="string"),s=r.children.filter((a)=>typeof a==="string").join("").trim();if(ne.has(r.type)&&i.length===0&&s)return r.type="Text",r.children=[s],r;if(r.type==="Text"&&i.length>0){let a=ae(r);return e.push({kind:"flattened-text",tag:t.tag}),r.children=a?[a]:[],r}if(ne.has(r.type)&&i.length>0)r.children=i;return r}async function et(t,e={}){let r=[],i=[],s=[],a=new Set;function l(c){let f=s[s.length-1];if(!f)i.push(c);else if(!f.dropped)f.node.children.push(c)}function u(c){if(c.node.bindings&&Object.keys(c.node.bindings).length>0){let p=c.node.children,b=p.filter((x)=>typeof x!=="string"),m=b.length===1&&b.length===p.length?b[0]:W("View",{},{},{},p);if(m.bindings={...c.node.bindings,...m.bindings},m.bindingId===void 0&&c.node.bindingId!==void 0)m.bindingId=c.node.bindingId;l(m);return}let f=s[s.length-1];for(let p of c.node.children){if(typeof p==="string"){if(f&&!f.dropped)f.node.children.push(p);continue}if(!f)i.push(p);else if(!f.dropped)f.node.children.push(p)}}function d(c,f){let p=ee.has(c)&&!B.has(c),b=s[s.length-1]?.dropped??!1,{props:m,style:x,events:S,bindings:w,classes:v,inline:me}=p||b?{props:{},style:{},events:{},bindings:{},classes:"",inline:{}}:Ke(c,f,r),L=m["data-native"],R;if(typeof L==="string"&&re.has(L))R=L,delete m["data-native"];else R=B.has(c)?"View":U(c);if(R===c&&!re.has(R)&&!ee.has(c)&&!te.has(c)&&!a.has(c))a.add(c),r.push({kind:"unmapped-tag",tag:c});if((p||B.has(c))&&!a.has(`drop:${c}`))a.add(`drop:${c}`),r.push({kind:"dropped-subtree",tag:c});if(R==="Icon"){let he=A(v).icon;m.symbol=J(String(m.symbol||m.name||he||""),Boolean(m.symbol)).symbol}let C=W(R,m,x,S);C._inlineStyle=me;let D=m["data-stx-b"];if(typeof D==="number"&&Number.isInteger(D))C.bindingId=D;if(delete m["data-stx-b"],v)C._classes=v;if(Object.keys(w).length>0)C.bindings=w;if(typeof m.key==="string")C.key=m.key,delete m.key;return{tag:c,node:C,dropped:p||b||B.has(c),discard:p||b,unwrap:te.has(c)}}if(await new HTMLRewriter().on("*",{element(c){let f=c.tagName.toLowerCase(),p=d(f,[...c.attributes]),b=!0;try{c.onEndTag(()=>{if(s.pop(),p.discard)return;if(p.unwrap)u(p);else l(Qe(p,r))})}catch{b=!1}if(b)s.push(p);else if(!p.discard)l(p.node)},text(c){let f=s[s.length-1];if(!f||f.dropped)return;let p=_(c.text).replace(/\s+/g," ");if(!p.trim())return;f.node.children.push(p)}}).transform(new Response(t)).text(),i.length===0)throw Error(`No element to translate in the rendered output of ${e.source??"unknown"}`);return{root:i.length===1?i[0]:W("View",{},{},{},i),diagnostics:r}}async function ce(t,e={}){let{root:r,diagnostics:i}=await et(t,e),s=e.script??{exports:{},functions:[],code:""};return{document:Q(r,s,{source:e.source??"unknown"}),diagnostics:i}}var le=/<script\b([^>]*)>([\s\S]*?)<\/script>/gi,tt=/(?:^|\n)\s*(?:export\s+)?(?:async\s+)?function\s*\*?\s*([$\w]+)\s*\(/g,rt=/(?:^|\n)\s*(?:export\s+)?(?:const|let|var)\s+([$\w]+)\s*=\s*(?:async\s*)?(?:\([^)]*\)|[$\w]+)\s*=>/g,ue=/(?:^|\n)\s*(?:export\s+)?const\s+([$\w]+)\s*=\s*(-?[\d.]+|true|false|'[^']*'|"[^"]*")\s*(?=;|\n|$)/g;function P(t){let e=[];le.lastIndex=0;for(let a of t.matchAll(le)){let l=a[1]??"";if(/\bserver\b/.test(l))continue;e.push(a[2].trim())}let r=e.filter(Boolean).join(`
2
+ import"./chunk-ab7vh24b.js";import"./chunk-wkc34drs.js";import"./chunk-mx446wgp.js";import{ir,Os,Ai}from"./chunk-01nx6zcw.js";import"./chunk-pf0d8y9n.js";import{Ln,zn,n,o}from"./chunk-xts31rkc.js";import"./chunk-gskjzw5r.js";import"./chunk-yd7g02v5.js";import"./chunk-scvzv5y2.js";import"./chunk-xc27xdm6.js";import"./chunk-pcq6vphz.js";import"./chunk-j4afmryj.js";import{Ie}from"./chunk-nma8b17c.js";import"./chunk-594tt40e.js";import{existsSync as M,mkdirSync as dt,readFileSync as ft}from"fs";import T from"path";import{existsSync as at,mkdirSync as ct}from"fs";import k from"path";import{existsSync as it}from"fs";import E from"path";var be="data-stx-b",H=new Set(Os),Se=new Set(ir);function xe(t){if(t==="ref"||t==="data-stx-ref")return"ref";if(t.startsWith("::"))return null;if(t.startsWith("@bind:")||t.startsWith("x-bind:"))return"attr";if(t.startsWith("@")||t.startsWith(":")){let e=t.slice(1).split(".")[0];if(H.has(e))return e==="if"?"if":e;if(e==="for"||e==="else"||e==="else-if"||e==="elseif")return"for";if(Ai(e))return"event";if(t.startsWith("@"))return"event";return"attr"}if(t.startsWith("x-")){let e=t.split(".")[0];if(!Se.has(e))return"attr";let r=e.slice(2);if(r==="cloak"||r==="data"||r==="bind")return null;if(r==="tooltip"||r==="tooltip-position")return null;return H.has(r)?r==="if"?"if":r:"attr"}return null}function we(t){let e=[];for(let[r,i]of t){let s=xe(r);if(s)e.push({name:r,value:i,kind:s})}return e}var ye=/<([a-z][\w-]*)((?:\s+[^\s"'=<>/]+(?:\s*=\s*(?:"[^"]*"|'[^']*'|[^\s"'=<>`]+))?)*)\s*\/?>/gi,X=/([^\s"'=<>/]+)(?:\s*=\s*(?:"([^"]*)"|'([^']*)'|([^\s"'=<>`]+)))?/g;function G(t){let e=[],r=0;return{html:t.replace(ye,(s,a,l)=>{if(!l||!/[:@]|x-/.test(l))return s;let u=[];X.lastIndex=0;for(let p=X.exec(l);p;p=X.exec(l))u.push([p[1],p[2]??p[3]??p[4]??""]);let d=we(u);if(!d.length)return s;let g={id:r++,bindings:d};if(d.some((p)=>p.kind==="for"))g.template=!0;e.push(g);let c=s.endsWith("/>");return`${s.slice(0,c?-2:-1).trimEnd()} ${be}="${g.id}"${c?"/>":">"}`}),manifest:{entries:e}}}var Te=["accessibilityHint","accessibilityLabel","accessibilityRole","accessibilityState","accessibilityValue","activeOpacity","alwaysBounceHorizontal","alwaysBounceVertical","animationType","autoCapitalize","autoCorrect","autoFocus","blurRadius","contentContainerStyle","defaultSource","defaultValue","ellipsizeMode","fadeDuration","hidesWhenStopped","hitSlop","imageStyle","initialNumToRender","iosBackgroundColor","keyboardDismissMode","keyboardShouldPersistTaps","keyboardType","keyboardVerticalOffset","keyExtractor","maxLength","maximumTrackTintColor","maximumValue","maxToRenderPerBatch","minimumTrackTintColor","minimumValue","numberOfLines","numColumns","onEndReachedThreshold","pagingEnabled","placeholderTextColor","pointerEvents","presentationStyle","pressRetentionOffset","progressBackgroundColor","progressViewOffset","refreshControl","resizeMode","returnKeyType","scrollEnabled","scrollTarget","secureTextEntry","selectedValue","selectionColor","showsHorizontalScrollIndicator","showsVerticalScrollIndicator","statusBarTranslucent","stickyHeaderIndices","testID","thumbColor","thumbTintColor","titleColor","trackColor","underlayColor","windowSize"],ve=new Map(Te.map((t)=>[q(t),t]));function q(t){return t.replace(/[-_]/g,"").toLowerCase()}function O(t){return ve.get(q(t))??t}var ke={view:"View",text:"Text",button:"Button",image:"Image",img:"Image",input:"TextInput",textarea:"TextInput",scroll:"ScrollView",scrollview:"ScrollView",list:"FlatList",flatlist:"FlatList",modal:"Modal",switch:"Switch",slider:"Slider",picker:"Picker",select:"Picker",loading:"ActivityIndicator",spinner:"ActivityIndicator",div:"View",span:"Text",p:"Text",h1:"Text",h2:"Text",h3:"Text",h4:"Text",h5:"Text",h6:"Text",a:"TouchableOpacity",section:"View",article:"View",header:"SafeAreaView",footer:"View",main:"View",nav:"View",aside:"View",form:"View",label:"Text",fieldset:"View",legend:"Text",option:"Text",dialog:"Modal",figure:"View",figcaption:"Text",picture:"View",hr:"View",ul:"View",ol:"View",li:"View",dl:"View",dt:"Text",dd:"Text",table:"View",thead:"View",tbody:"View",tfoot:"View",tr:"View",th:"Text",td:"Text",caption:"Text",strong:"Text",b:"Text",em:"Text",i:"Text",u:"Text",s:"Text",small:"Text",mark:"Text",abbr:"Text",time:"Text",code:"Text",kbd:"Text",samp:"Text",pre:"Text",blockquote:"Text",cite:"Text",q:"Text",sub:"Text",sup:"Text"};function U(t){return ke[t.toLowerCase()]||t}var Re={activity:"waveform.path.ecg","alarm-clock":"alarm","alert-circle":"exclamationmark.circle","alert-triangle":"exclamationmark.triangle",archive:"archivebox","arrow-down":"arrow.down","arrow-left":"arrow.left","arrow-right":"arrow.right","arrow-up":"arrow.up","arrow-up-right":"arrow.up.right","at-sign":"at","audio-lines":"waveform",award:"rosette","badge-check":"checkmark.seal","bar-chart":"chart.bar","bar-chart-2":"chart.bar","bar-chart-3":"chart.bar",battery:"battery.100",bed:"bed.double",bell:"bell","bell-off":"bell.slash",bike:"figure.outdoor.cycle",bluetooth:"antenna.radiowaves.left.and.right",book:"book","book-open":"book",bookmark:"bookmark",brain:"brain",calendar:"calendar","calendar-check":"calendar.badge.checkmark","calendar-clock":"calendar.badge.clock","calendar-days":"calendar","calendar-plus":"calendar.badge.plus","calendar-range":"calendar","calendar-sync":"arrow.triangle.2.circlepath",camera:"camera","chart-bar":"chart.bar","chart-line":"chart.xyaxis.line",check:"checkmark","check-circle":"checkmark.circle","check-circle-2":"checkmark.circle","chevron-down":"chevron.down","chevron-left":"chevron.left","chevron-right":"chevron.right","chevron-up":"chevron.up",circle:"circle","circle-alert":"exclamationmark.circle","circle-check":"checkmark.circle","circle-check-big":"checkmark.circle","circle-help":"questionmark.circle","circle-play":"play.circle","circle-plus":"plus.circle","circle-user":"person.crop.circle","circle-x":"xmark.circle",clapperboard:"film",clipboard:"clipboard","clipboard-list":"list.clipboard",clock:"clock",cloud:"cloud","cloud-off":"icloud.slash",coffee:"cup.and.saucer",copy:"doc.on.doc","credit-card":"creditcard",download:"arrow.down.circle",droplet:"drop",droplets:"drop",dumbbell:"dumbbell",edit:"pencil","external-link":"arrow.up.right.square",eye:"eye","eye-off":"eye.slash",file:"doc","file-text":"doc.text",filter:"line.3.horizontal.decrease",flag:"flag",flame:"flame","flower-2":"camera.macro",footprints:"figure.run",gauge:"gauge",gift:"gift",globe:"globe","graduation-cap":"graduationcap","grip-vertical":"line.3.horizontal",heart:"heart","heart-pulse":"heart.text.square","help-circle":"questionmark.circle",history:"clock.arrow.circlepath",home:"house",house:"house",image:"photo",inbox:"tray",info:"info.circle",layers:"square.3.layers.3d","layout-grid":"square.grid.2x2",library:"books.vertical",link:"link",list:"list.bullet","list-checks":"checklist",loader:"arrow.triangle.2.circlepath","loader-2":"arrow.triangle.2.circlepath","loader-circle":"arrow.triangle.2.circlepath",lock:"lock","log-in":"arrow.right.to.line","log-out":"rectangle.portrait.and.arrow.right",mail:"envelope",map:"map","map-pin":"mappin.and.ellipse",medal:"medal",menu:"line.3.horizontal","message-circle":"bubble.left","message-square":"text.bubble","message-square-quote":"quote.bubble",mic:"mic",minus:"minus",moon:"moon","more-horizontal":"ellipsis","more-vertical":"ellipsis",mountain:"mountain.2",music:"music.note",package:"shippingbox",pause:"pause","pause-circle":"pause.circle",pencil:"pencil","person-standing":"figure.walk",phone:"phone",play:"play.fill",plug:"powerplug",plus:"plus","plus-circle":"plus.circle","refresh-cw":"arrow.clockwise",repeat:"repeat","rotate-ccw":"arrow.counterclockwise",route:"point.topleft.down.to.point.bottomright.curvepath",ruler:"ruler",sailboat:"sailboat",satellite:"antenna.radiowaves.left.and.right",save:"square.and.arrow.down",scale:"scalemass",search:"magnifyingglass",send:"paperplane",settings:"gearshape","settings-2":"slider.horizontal.3",share:"square.and.arrow.up","share-2":"square.and.arrow.up",shield:"shield","shield-check":"checkmark.shield","shopping-bag":"bag","shopping-cart":"cart","skip-back":"backward.end","skip-forward":"forward.end",sliders:"slider.horizontal.3","sliders-horizontal":"slider.horizontal.3",smartphone:"iphone",snowflake:"snowflake",sparkles:"sparkles",square:"square",star:"star",stopwatch:"stopwatch",store:"storefront",sun:"sun.max",sunrise:"sunrise",sunset:"sunset",tag:"tag",target:"scope",thermometer:"thermometer.medium","thumbs-up":"hand.thumbsup",timer:"timer",trash:"trash","trash-2":"trash","trending-down":"chart.line.downtrend.xyaxis","trending-up":"chart.line.uptrend.xyaxis",trophy:"trophy",unlink:"personalhotspot.slash",upload:"arrow.up.circle",user:"person","user-plus":"person.badge.plus","user-round":"person",users:"person.2",video:"video","volume-2":"speaker.wave.2",watch:"applewatch",waves:"figure.pool.swim",weight:"scalemass",wifi:"wifi","wifi-off":"wifi.slash",wind:"wind",x:"xmark","x-circle":"xmark.circle",zap:"bolt"};function J(t,e=!1){let r=String(t??"").trim();if(!r)return{symbol:"circle",known:!1};if(e)return{symbol:r,known:!0};let i=/^i-([a-z0-9]+)-(.+)$/.exec(r)??/^([a-z0-9]+):(.+)$/.exec(r),s=i?i[1]:"lucide",a=i?i[2]:r;if(s==="lucide"){let l=Re[a];if(l)return{symbol:l,iconify:`i-lucide-${a}`,known:!0};if(!i&&r.includes("."))return{symbol:r,known:!0}}return{symbol:"circle",iconify:i?r:`i-lucide-${a}`,known:!1}}var Ce={transparent:"transparent",current:"currentColor",black:"#000000",white:"#ffffff",slate:{50:"#f8fafc",100:"#f1f5f9",200:"#e2e8f0",300:"#cbd5e1",400:"#94a3b8",500:"#64748b",600:"#475569",700:"#334155",800:"#1e293b",900:"#0f172a",950:"#020617"},gray:{50:"#f9fafb",100:"#f3f4f6",200:"#e5e7eb",300:"#d1d5db",400:"#9ca3af",500:"#6b7280",600:"#4b5563",700:"#374151",800:"#1f2937",900:"#111827",950:"#030712"},zinc:{50:"#fafafa",100:"#f4f4f5",200:"#e4e4e7",300:"#d4d4d8",400:"#a1a1aa",500:"#71717a",600:"#52525b",700:"#3f3f46",800:"#27272a",900:"#18181b",950:"#09090b"},red:{50:"#fef2f2",100:"#fee2e2",200:"#fecaca",300:"#fca5a5",400:"#f87171",500:"#ef4444",600:"#dc2626",700:"#b91c1c",800:"#991b1b",900:"#7f1d1d",950:"#450a0a"},orange:{50:"#fff7ed",100:"#ffedd5",200:"#fed7aa",300:"#fdba74",400:"#fb923c",500:"#f97316",600:"#ea580c",700:"#c2410c",800:"#9a3412",900:"#7c2d12",950:"#431407"},amber:{50:"#fffbeb",100:"#fef3c7",200:"#fde68a",300:"#fcd34d",400:"#fbbf24",500:"#f59e0b",600:"#d97706",700:"#b45309",800:"#92400e",900:"#78350f",950:"#451a03"},yellow:{50:"#fefce8",100:"#fef9c3",200:"#fef08a",300:"#fde047",400:"#facc15",500:"#eab308",600:"#ca8a04",700:"#a16207",800:"#854d0e",900:"#713f12",950:"#422006"},green:{50:"#f0fdf4",100:"#dcfce7",200:"#bbf7d0",300:"#86efac",400:"#4ade80",500:"#22c55e",600:"#16a34a",700:"#15803d",800:"#166534",900:"#14532d",950:"#052e16"},emerald:{50:"#ecfdf5",100:"#d1fae5",200:"#a7f3d0",300:"#6ee7b7",400:"#34d399",500:"#10b981",600:"#059669",700:"#047857",800:"#065f46",900:"#064e3b",950:"#022c22"},teal:{50:"#f0fdfa",100:"#ccfbf1",200:"#99f6e4",300:"#5eead4",400:"#2dd4bf",500:"#14b8a6",600:"#0d9488",700:"#0f766e",800:"#115e59",900:"#134e4a",950:"#042f2e"},cyan:{50:"#ecfeff",100:"#cffafe",200:"#a5f3fc",300:"#67e8f9",400:"#22d3ee",500:"#06b6d4",600:"#0891b2",700:"#0e7490",800:"#155e75",900:"#164e63",950:"#083344"},sky:{50:"#f0f9ff",100:"#e0f2fe",200:"#bae6fd",300:"#7dd3fc",400:"#38bdf8",500:"#0ea5e9",600:"#0284c7",700:"#0369a1",800:"#075985",900:"#0c4a6e",950:"#082f49"},lime:{50:"#f7fee7",100:"#ecfccb",200:"#d9f99d",300:"#bef264",400:"#a3e635",500:"#84cc16",600:"#65a30d",700:"#4d7c0f",800:"#3f6212",900:"#365314",950:"#1a2e05"},fuchsia:{50:"#fdf4ff",100:"#fae8ff",200:"#f5d0fe",300:"#f0abfc",400:"#e879f9",500:"#d946ef",600:"#c026d3",700:"#a21caf",800:"#86198f",900:"#701a75",950:"#4a044e"},neutral:{50:"#fafafa",100:"#f5f5f5",200:"#e5e5e5",300:"#d4d4d4",400:"#a3a3a3",500:"#737373",600:"#525252",700:"#404040",800:"#262626",900:"#171717",950:"#0a0a0a"},stone:{50:"#fafaf9",100:"#f5f5f4",200:"#e7e5e4",300:"#d6d3d1",400:"#a8a29e",500:"#78716c",600:"#57534e",700:"#44403c",800:"#292524",900:"#1c1917",950:"#0c0a09"},blue:{50:"#eff6ff",100:"#dbeafe",200:"#bfdbfe",300:"#93c5fd",400:"#60a5fa",500:"#3b82f6",600:"#2563eb",700:"#1d4ed8",800:"#1e40af",900:"#1e3a8a",950:"#172554"},indigo:{50:"#eef2ff",100:"#e0e7ff",200:"#c7d2fe",300:"#a5b4fc",400:"#818cf8",500:"#6366f1",600:"#4f46e5",700:"#4338ca",800:"#3730a3",900:"#312e81",950:"#1e1b4b"},violet:{50:"#f5f3ff",100:"#ede9fe",200:"#ddd6fe",300:"#c4b5fd",400:"#a78bfa",500:"#8b5cf6",600:"#7c3aed",700:"#6d28d9",800:"#5b21b6",900:"#4c1d95",950:"#2e1065"},purple:{50:"#faf5ff",100:"#f3e8ff",200:"#e9d5ff",300:"#d8b4fe",400:"#c084fc",500:"#a855f7",600:"#9333ea",700:"#7e22ce",800:"#6b21a8",900:"#581c87",950:"#3b0764"},pink:{50:"#fdf2f8",100:"#fce7f3",200:"#fbcfe8",300:"#f9a8d4",400:"#f472b6",500:"#ec4899",600:"#db2777",700:"#be185d",800:"#9d174d",900:"#831843",950:"#500724"},rose:{50:"#fff1f2",100:"#ffe4e6",200:"#fecdd3",300:"#fda4af",400:"#fb7185",500:"#f43f5e",600:"#e11d48",700:"#be123c",800:"#9f1239",900:"#881337",950:"#4c0519"}},Z={px:1,0:0,0.5:2,1:4,1.5:6,2:8,2.5:10,3:12,3.5:14,4:16,5:20,6:24,7:28,8:32,9:36,10:40,11:44,12:48,14:56,16:64,20:80,24:96,28:112,32:128,36:144,40:160,44:176,48:192,52:208,56:224,60:240,64:256,72:288,80:320,96:384},Y={xs:12,sm:14,base:16,lg:18,xl:20,"2xl":24,"3xl":30,"4xl":36,"5xl":48,"6xl":60,"7xl":72,"8xl":96,"9xl":128},y={none:0,sm:2,DEFAULT:4,md:6,lg:8,xl:12,"2xl":16,"3xl":24,full:9999};function N(t){let e=t.lastIndexOf("/");if(e>0&&!t.endsWith("]")){let i=N(t.slice(0,e)),s=t.slice(e+1),a=/^\[(.+)\]$/.test(s)?Number.parseFloat(s.slice(1,-1))*(s.includes("%")?1:100):Number.parseFloat(s);if(!i||!Number.isFinite(a))return;return _e(i,a/100)}if(t==="transparent")return"transparent";if(t==="current")return"currentColor";if(t==="black")return"#000000";if(t==="white")return"#ffffff";let r=t.split("-");if(r.length===2){let[i,s]=r,a=Ce[i];if(a&&typeof a==="object")return a[s]}if(t.startsWith("[")&&t.endsWith("]")){let i=t.slice(1,-1);return/^(#|rgba?\(|hsla?\(|[a-z]+$)/i.test(i)?i:void 0}return}function _e(t,e){if(t==="transparent")return t;let r=t.startsWith("#")?t.slice(1):"";if(r.length===3)r=r.split("").map((s)=>s+s).join("");if(r.length===8)r=r.slice(0,6);if(r.length!==6)return;let i=Math.round(Math.min(1,Math.max(0,e))*255);return`#${r}${i.toString(16).padStart(2,"0")}`}function z(t,e=16){if(!t.startsWith("[")||!t.endsWith("]"))return;let r=t.slice(1,-1),i=Number.parseFloat(r);if(!Number.isFinite(i))return;if(r.endsWith("rem"))return i*16;if(r.endsWith("em"))return i*e;return i}function h(t){if(t.startsWith("[")&&t.endsWith("]")){let e=t.slice(1,-1),r=e.endsWith("rem")?Number.parseFloat(e)*16:Number.parseFloat(e);return Number.isFinite(r)?r:void 0}return Z[t]}var Ee={flex:(t,e)=>(e.display="flex",!0),hidden:(t,e)=>(e.display="none",!0),grid:(t,e)=>(e.display="grid",!0),"flex-row":(t,e)=>(e.flexDirection="row",!0),"flex-col":(t,e)=>(e.flexDirection="column",!0),"flex-row-reverse":(t,e)=>(e.flexDirection="row-reverse",!0),"flex-col-reverse":(t,e)=>(e.flexDirection="column-reverse",!0),"flex-wrap":(t,e)=>(e.flexWrap="wrap",!0),"flex-nowrap":(t,e)=>(e.flexWrap="nowrap",!0),"flex-wrap-reverse":(t,e)=>(e.flexWrap="wrap-reverse",!0),"flex-1":(t,e)=>(e.flex=1,e.flexGrow=1,e.flexShrink=1,e.flexBasis=0,!0),"flex-auto":(t,e)=>(e.flexGrow=1,e.flexShrink=1,!0),"flex-initial":(t,e)=>(e.flexGrow=0,e.flexShrink=1,!0),"flex-none":(t,e)=>(e.flexGrow=0,e.flexShrink=0,!0),grow:(t,e)=>(e.flexGrow=1,!0),"grow-0":(t,e)=>(e.flexGrow=0,!0),shrink:(t,e)=>(e.flexShrink=1,!0),"shrink-0":(t,e)=>(e.flexShrink=0,!0),"justify-start":(t,e)=>(e.justifyContent="flex-start",!0),"justify-center":(t,e)=>(e.justifyContent="center",!0),"justify-end":(t,e)=>(e.justifyContent="flex-end",!0),"justify-between":(t,e)=>(e.justifyContent="space-between",!0),"justify-around":(t,e)=>(e.justifyContent="space-around",!0),"justify-evenly":(t,e)=>(e.justifyContent="space-evenly",!0),"items-start":(t,e)=>(e.alignItems="flex-start",!0),"items-center":(t,e)=>(e.alignItems="center",!0),"items-end":(t,e)=>(e.alignItems="flex-end",!0),"items-stretch":(t,e)=>(e.alignItems="stretch",!0),"items-baseline":(t,e)=>(e.alignItems="baseline",!0),"self-auto":(t,e)=>(e.alignSelf="auto",!0),"self-start":(t,e)=>(e.alignSelf="flex-start",!0),"self-center":(t,e)=>(e.alignSelf="center",!0),"self-end":(t,e)=>(e.alignSelf="flex-end",!0),"self-stretch":(t,e)=>(e.alignSelf="stretch",!0),"self-baseline":(t,e)=>(e.alignSelf="baseline",!0),"min-w-0":(t,e)=>(e.minWidth=0,!0),"aspect-square":(t,e)=>(e.aspectRatio=1,!0),"inset-0":(t,e)=>(e.top=0,e.right=0,e.bottom=0,e.left=0,!0),"tracking-tighter":(t,e)=>(e.letterSpacing=-0.8,!0),"tracking-tight":(t,e)=>(e.letterSpacing=-0.4,!0),"tracking-normal":(t,e)=>(e.letterSpacing=0,!0),"tracking-wide":(t,e)=>(e.letterSpacing=0.4,!0),"tracking-wider":(t,e)=>(e.letterSpacing=0.8,!0),"tracking-widest":(t,e)=>(e.letterSpacing=1.6,!0),"tabular-nums":()=>!0,block:()=>!0,"inline-flex":(t,e)=>(e.display="flex",!0),truncate:()=>!0,relative:(t,e)=>(e.position="relative",!0),absolute:(t,e)=>(e.position="absolute",!0),"overflow-visible":(t,e)=>(e.overflow="visible",!0),"overflow-hidden":(t,e)=>(e.overflow="hidden",!0),"overflow-scroll":(t,e)=>(e.overflow="scroll",!0),"font-thin":(t,e)=>(e.fontWeight="100",!0),"font-extralight":(t,e)=>(e.fontWeight="200",!0),"font-light":(t,e)=>(e.fontWeight="300",!0),"font-normal":(t,e)=>(e.fontWeight="400",!0),"font-medium":(t,e)=>(e.fontWeight="500",!0),"font-semibold":(t,e)=>(e.fontWeight="600",!0),"font-bold":(t,e)=>(e.fontWeight="bold",!0),"font-extrabold":(t,e)=>(e.fontWeight="800",!0),"font-black":(t,e)=>(e.fontWeight="900",!0),italic:(t,e)=>(e.fontStyle="italic",!0),"not-italic":(t,e)=>(e.fontStyle="normal",!0),"text-left":(t,e)=>(e.textAlign="left",!0),"text-center":(t,e)=>(e.textAlign="center",!0),"text-right":(t,e)=>(e.textAlign="right",!0),"text-justify":(t,e)=>(e.textAlign="justify",!0),uppercase:(t,e)=>(e.textTransform="uppercase",!0),lowercase:(t,e)=>(e.textTransform="lowercase",!0),capitalize:(t,e)=>(e.textTransform="capitalize",!0),"normal-case":(t,e)=>(e.textTransform="none",!0),underline:(t,e)=>(e.textDecorationLine="underline",!0),"line-through":(t,e)=>(e.textDecorationLine="line-through",!0),"no-underline":(t,e)=>(e.textDecorationLine="none",!0)};function Ne(t,e){if(!t.startsWith("bg-"))return!1;let r=t.slice(3),i=N(r);if(i)return e.backgroundColor=i,!0;return!1}function We(t,e){if(!t.startsWith("text-"))return!1;let r=t.slice(5);if(Y[r])return e.fontSize=Y[r],!0;if(r.startsWith("[")&&r.endsWith("]")){let s=r.slice(1,-1);if(/^-?[\d.]+(?:px|r?em)?$/.test(s)){let a=s.endsWith("rem")||s.endsWith("em")?Number.parseFloat(s)*16:Number.parseFloat(s);if(Number.isFinite(a))return e.fontSize=a,!0}}let i=N(r);if(i)return e.color=i,!0;return!1}function Be(t,e){if(t.startsWith("p-")){let r=h(t.slice(2));if(r!==void 0)return e.padding=r,!0}if(t.startsWith("px-")){let r=h(t.slice(3));if(r!==void 0)return e.paddingHorizontal=r,!0}if(t.startsWith("py-")){let r=h(t.slice(3));if(r!==void 0)return e.paddingVertical=r,!0}if(t.startsWith("pt-")){let r=h(t.slice(3));if(r!==void 0)return e.paddingTop=r,!0}if(t.startsWith("pr-")){let r=h(t.slice(3));if(r!==void 0)return e.paddingRight=r,!0}if(t.startsWith("pb-")){let r=h(t.slice(3));if(r!==void 0)return e.paddingBottom=r,!0}if(t.startsWith("pl-")){let r=h(t.slice(3));if(r!==void 0)return e.paddingLeft=r,!0}return!1}function Le(t,e){if(t.startsWith("m-")){let r=h(t.slice(2));if(r!==void 0)return e.margin=r,!0}if(t.startsWith("mx-")){let r=h(t.slice(3));if(r!==void 0)return e.marginHorizontal=r,!0}if(t.startsWith("my-")){let r=h(t.slice(3));if(r!==void 0)return e.marginVertical=r,!0}if(t.startsWith("mt-")){let r=h(t.slice(3));if(r!==void 0)return e.marginTop=r,!0}if(t.startsWith("mr-")){let r=h(t.slice(3));if(r!==void 0)return e.marginRight=r,!0}if(t.startsWith("mb-")){let r=h(t.slice(3));if(r!==void 0)return e.marginBottom=r,!0}if(t.startsWith("ml-")){let r=h(t.slice(3));if(r!==void 0)return e.marginLeft=r,!0}return!1}function De(t,e){if(!t.startsWith("w-"))return!1;let r=t.slice(2);if(r==="full")return e.width="100%",!0;if(r==="screen")return e.width="100%",!0;if(r==="auto")return e.width="auto",!0;if(r.includes("/")){let[s,a]=r.split("/"),l=Number.parseInt(s)/Number.parseInt(a)*100;return e.width=`${l}%`,!0}let i=h(r);if(i!==void 0)return e.width=i,!0;return!1}function Xe(t,e){if(!t.startsWith("h-"))return!1;let r=t.slice(2);if(r==="full")return e.height="100%",!0;if(r==="screen")return e.height="100%",!0;if(r==="auto")return e.height="auto",!0;let i=h(r);if(i!==void 0)return e.height=i,!0;return!1}function Oe(t,e){if(!t.startsWith("rounded"))return!1;if(t==="rounded")return e.borderRadius=y.DEFAULT,!0;let r=t.slice(8);if(r==="")return!1;let i=/^(?:(t|b|l|r)-)?(\[[^\]]+\])$/.exec(r);if(i){let a=z(i[2]);if(a===void 0)return!1;let l={t:["borderTopLeftRadius","borderTopRightRadius"],b:["borderBottomLeftRadius","borderBottomRightRadius"],l:["borderTopLeftRadius","borderBottomLeftRadius"],r:["borderTopRightRadius","borderBottomRightRadius"]};for(let u of i[1]?l[i[1]]:["borderRadius"])e[u]=a;return!0}if(r.startsWith("t-")){let a=y[r.slice(2)]??y.DEFAULT;return e.borderTopLeftRadius=a,e.borderTopRightRadius=a,!0}if(r.startsWith("b-")){let a=y[r.slice(2)]??y.DEFAULT;return e.borderBottomLeftRadius=a,e.borderBottomRightRadius=a,!0}if(r.startsWith("l-")){let a=y[r.slice(2)]??y.DEFAULT;return e.borderTopLeftRadius=a,e.borderBottomLeftRadius=a,!0}if(r.startsWith("r-")){let a=y[r.slice(2)]??y.DEFAULT;return e.borderTopRightRadius=a,e.borderBottomRightRadius=a,!0}let s=y[r];if(s!==void 0)return e.borderRadius=s,!0;return!1}function $e(t,e){if(!t.startsWith("border"))return!1;if(t==="border")return e.borderWidth=1,!0;let r=t.match(/^border-(\d+)$/);if(r)return e.borderWidth=Number.parseInt(r[1]),!0;let i=t.match(/^border-(t|r|b|l)-?(\d*)$/);if(i){let[,s,a]=i,l=a?Number.parseInt(a):1;switch(s){case"t":e.borderTopWidth=l;break;case"r":e.borderRightWidth=l;break;case"b":e.borderBottomWidth=l;break;case"l":e.borderLeftWidth=l;break}return!0}return!1}function ze(t,e){if(!t.startsWith("border-"))return!1;let r=t.slice(7),i=N(r);if(i)return e.borderColor=i,!0;return!1}function Ae(t,e){if(!t.startsWith("opacity-"))return!1;let r=Number.parseInt(t.slice(8));if(!Number.isNaN(r))return e.opacity=r/100,!0;return!1}function Ve(t,e){if(t.startsWith("tracking-[")){let r=z(t.slice(9),typeof e.fontSize==="number"?e.fontSize:16);if(r===void 0)return!1;return e.letterSpacing=r,!0}if(t.startsWith("leading-")){let r=t.slice(8),i=typeof e.fontSize==="number"?e.fontSize:16,s={none:1,tight:1.25,snug:1.375,normal:1.5,relaxed:1.625,loose:2},a=r.startsWith("[")?/^\[[\d.]+\]$/.test(r)?Number.parseFloat(r.slice(1,-1))*i:z(r,i):s[r]!==void 0?s[r]*i:Z[r];if(a===void 0||!Number.isFinite(a))return!1;return e.lineHeight=a,!0}return!1}function Pe(t,e){let r=/^grid-cols-(\d+)$/.exec(t);if(!r)return!1;return e.gridColumns=Number(r[1]),!0}function Fe(t,e){if(!t.startsWith("size-"))return!1;let r=t.slice(5),i=r==="full"?"100%":h(r);if(i===void 0)return!1;return e.width=i,e.height=i,!0}function je(t,e){let r=/^(-?)(top|right|bottom|left)-(.+)$/.exec(t);if(!r)return!1;let i=r[3]==="full"?"100%":h(r[3]);if(i===void 0)return!1;return e[r[2]]=typeof i==="number"&&r[1]?-i:i,!0}function Me(t,e){let r=/^space-(x|y)-(.+)$/.exec(t);if(!r)return!1;let i=h(r[2]);if(i===void 0)return!1;return e.gap=i,!0}function He(t,e){if(t.startsWith("gap-")){let r=h(t.slice(4));if(r!==void 0)return e.gap=r,!0}if(t.startsWith("gap-x-")){let r=h(t.slice(6));if(r!==void 0)return e.columnGap=r,!0}if(t.startsWith("gap-y-")){let r=h(t.slice(6));if(r!==void 0)return e.rowGap=r,!0}return!1}function A(t){let e=[],r=[],i=[];function s(d,g){let c=/^(text|bg|border|ring)-([a-z-]+)(\/[^\s]+)?$/.exec(d),f=c&&Ln[c[2]];return f?`${c[1]}-${f[g]}${c[3]||""}`:d}for(let d of t.split(/\s+/).filter(Boolean))if(d.startsWith("dark:"))r.push(s(d.slice(5),"dark"));else if(!d.includes(":")||d.startsWith("[")){if(e.push(s(d,"light")),s(d,"dark")!==d)i.push(s(d,"dark"))}let a=[],u={style:K(e.join(" "),a),unknown:a};if(r.length||i.length)u.dark=K([...i,...r].join(" "),a);for(let d of e){if(d==="truncate")u.numberOfLines=1;let g=/^line-clamp-(\d+)$/.exec(d);if(g)u.numberOfLines=Number(g[1]);if(!u.icon&&/^i-[a-z0-9]+-[a-z0-9-]+$/.test(d))u.icon=d}return u.unknown=a.filter((d)=>!/^line-clamp-\d+$/.test(d)),u}function K(t,e){let r={},i=t.split(/\s+/).filter(Boolean);for(let s of i){if(/^i-[a-z0-9]+-/.test(s))continue;let a=Ee[s];if(a){a("",r);continue}if(Ne(s,r))continue;if(We(s,r))continue;if(Be(s,r))continue;if(Le(s,r))continue;if(De(s,r))continue;if(Xe(s,r))continue;if(Oe(s,r))continue;if($e(s,r))continue;if(ze(s,r))continue;if(Ae(s,r))continue;if(He(s,r))continue;if(Ve(s,r))continue;if(Fe(s,r))continue;if(Pe(s,r))continue;if(je(s,r))continue;if(Me(s,r))continue;if(e?.push(s),typeof process<"u"&&process.env?.NODE_ENV==="development")console.warn(`[STX Native] Unknown Headwind class: ${s}`)}return r}function W(t,e={},r={},i={},s=[]){return{type:t,props:e,style:r,events:i,children:s}}function Q(t,e,r={}){return{version:"1.0.0",root:t,script:e,meta:{source:r.source||"unknown",compiledAt:r.compiledAt||Date.now(),headwindConfig:r.headwindConfig}}}var ee=new Set(["script","style","head","meta","link","title","base","noscript","svg"]),te=new Set(["template","body","html","main","fragment"]),B=new Set(["svg"]),Ge={click:"onPress",press:"onPress","press-in":"onPressIn",pressin:"onPressIn","press-out":"onPressOut",pressout:"onPressOut",longpress:"onLongPress",contextmenu:"onLongPress",input:"onChangeText",change:"onValueChange","value-change":"onValueChange",valuechange:"onValueChange",focus:"onFocus",focusin:"onFocus",blur:"onBlur",focusout:"onBlur",submit:"onSubmitEditing","submit-editing":"onSubmitEditing",submitediting:"onSubmitEditing","end-editing":"onEndEditing",endediting:"onEndEditing",scroll:"onScroll",refresh:"onRefresh",layout:"onLayout","end-reached":"onEndReached",endreached:"onEndReached",close:"onRequestClose","request-close":"onRequestClose",requestclose:"onRequestClose",show:"onShow",dismiss:"onDismiss","sliding-complete":"onSlidingComplete",slidingcomplete:"onSlidingComplete","load-start":"onLoadStart",loadstart:"onLoadStart",load:"onLoad","load-end":"onLoadEnd",loadend:"onLoadEnd",error:"onError"},qe=new Set(["onBlur","onChangeText","onDismiss","onEndEditing","onEndReached","onError","onFocus","onLayout","onLoad","onLoadEnd","onLoadStart","onLongPress","onPress","onPressIn","onPressOut","onRequestClose","onRefresh","onScroll","onShow","onSlidingComplete","onSubmitEditing","onValueChange"]),V=new Set(["display","gridColumns","gridTemplateColumns","gridAutoRows","flex","flexGrow","flexShrink","flexBasis","flexDirection","flexWrap","justifyContent","alignItems","alignSelf","alignContent","position","top","right","bottom","left","zIndex","width","height","minWidth","maxWidth","minHeight","maxHeight","aspectRatio","margin","marginTop","marginRight","marginBottom","marginLeft","marginHorizontal","marginVertical","padding","paddingTop","paddingRight","paddingBottom","paddingLeft","paddingHorizontal","paddingVertical","gap","rowGap","columnGap","borderWidth","borderTopWidth","borderRightWidth","borderBottomWidth","borderLeftWidth","borderColor","borderTopColor","borderRightColor","borderBottomColor","borderLeftColor","borderRadius","borderTopLeftRadius","borderTopRightRadius","borderBottomLeftRadius","borderBottomRightRadius","borderStyle","backgroundColor","backgroundImage","opacity","shadowColor","shadowOffset","shadowOpacity","shadowRadius","elevation","color","fontSize","fontWeight","fontStyle","fontFamily","lineHeight","letterSpacing","textAlign","textDecorationLine","textDecorationColor","textTransform","resizeMode","tintColor","transform","overflow"]),Ue=new Set(["gridColumns","gridAutoRows","flex","flexGrow","flexShrink","zIndex","aspectRatio","gap","rowGap","columnGap","borderWidth","borderTopWidth","borderRightWidth","borderBottomWidth","borderLeftWidth","borderRadius","borderTopLeftRadius","borderTopRightRadius","borderBottomLeftRadius","borderBottomRightRadius","opacity","shadowOpacity","shadowRadius","elevation","fontSize","lineHeight","letterSpacing"]),Je=new Set(["top","right","bottom","left","width","height","minWidth","maxWidth","minHeight","maxHeight","flexBasis","margin","marginTop","marginRight","marginBottom","marginLeft","marginHorizontal","marginVertical","padding","paddingTop","paddingRight","paddingBottom","paddingLeft","paddingHorizontal","paddingVertical"]),re=new Set(["View","ScrollView","SafeAreaView","KeyboardAvoidingView","Text","TextInput","Button","TouchableOpacity","TouchableHighlight","Pressable","Icon","Image","ImageBackground","FlatList","SectionList","Switch","Slider","Picker","DatePicker","Modal","ActivityIndicator","StatusBar","RefreshControl"]),ne=new Set(["View","SafeAreaView","ScrollView","KeyboardAvoidingView"]),Ye={amp:"&",lt:"<",gt:">",quot:'"',apos:"'",nbsp:" ","#39":"'","#x27":"'"};function _(t){return t.replace(/&(#x?[0-9a-f]+|\w+);/gi,(e,r)=>{let i=Ye[r.toLowerCase()];if(i!==void 0)return i;if(r[0]==="#"){let s=r[1]==="x"||r[1]==="X"?Number.parseInt(r.slice(2),16):Number.parseInt(r.slice(1),10);return Number.isFinite(s)?String.fromCodePoint(s):e}return e})}function ie(t){return t.replace(/-([a-z])/g,(e,r)=>r.toUpperCase())}function oe(t){let e=/^(-?[\d.]+)px$/.exec(t);if(e)return Number.parseFloat(e[1]);let r=/^(-?[\d.]+)r?em$/.exec(t);if(r)return Number.parseFloat(r[1])*16;if(/^-?[\d.]+$/.test(t))return Number.parseFloat(t);return t}function Ke(t,e,r){let i={},s={},a={},l="",u={};for(let[g,c]of e){let f=g.toLowerCase();if(f==="class"||f==="classname"){l=l?`${l} ${c}`:c;continue}if(f==="style"){u={...u,...Ze(t,c,r)};continue}if(f.startsWith(":")||f.startsWith("x-")&&f!=="x-cloak"){a[f.startsWith(":")?f.slice(1):f.slice(2)]=_(c);continue}if(f==="x-cloak")continue;if(f.startsWith("@")||f.startsWith("v-on:")){let b=f.startsWith("@")?f.slice(1):f.slice(5),[m]=b.split("."),x=Ge[m]??(m.startsWith("on")?m:"");if(!x||!qe.has(x)){r.push({kind:"unread-event",tag:t,name:g});continue}s[x]=_(c);continue}if(f==="key"){i.key=c;continue}let p=_(c);try{i[O(g)]=JSON.parse(p)}catch{i[O(g)]=p}}let d={...l?A(l).style:{},...u};return{props:i,style:d,events:s,bindings:a,classes:l,inline:u}}function se(t,e){if(Ue.has(t))return!1;if(Je.has(t))return/^-?[\d.]+%$/.test(e);return!0}function Ze(t,e,r){let i={},s=_(e);try{let a=JSON.parse(s);if(a&&typeof a==="object"&&!Array.isArray(a)){for(let[l,u]of Object.entries(a)){let d=V.has(l)?l:ie(l.trim().toLowerCase());if(!V.has(d)){r.push({kind:"unknown-style",tag:t,name:d});continue}if(u===null||u===void 0)continue;let g=typeof u==="string"?oe(u):u;if(typeof g!=="string"&&typeof g!=="number")continue;if(typeof g==="string"&&!se(d,g)){r.push({kind:"non-numeric-style",tag:t,name:d});continue}i[d]=g}return i}}catch{}for(let a of s.split(";")){let l=a.indexOf(":");if(l===-1)continue;let u=ie(a.slice(0,l).trim().toLowerCase()),d=a.slice(l+1).trim();if(!u||!d)continue;if(!V.has(u)){r.push({kind:"unknown-style",tag:t,name:u});continue}let g=oe(d);if(typeof g==="string"&&!se(u,g)){r.push({kind:"non-numeric-style",tag:t,name:u});continue}i[u]=g}return i}function ae(t){return t.children.map((e)=>typeof e==="string"?e:ae(e)).join("").replace(/\s+/g," ").trim()}function Qe(t,e){let r=t.node,i=r.children.filter((a)=>typeof a!=="string"),s=r.children.filter((a)=>typeof a==="string").join("").trim();if(ne.has(r.type)&&i.length===0&&s)return r.type="Text",r.children=[s],r;if(r.type==="Text"&&i.length>0){let a=ae(r);return e.push({kind:"flattened-text",tag:t.tag}),r.children=a?[a]:[],r}if(ne.has(r.type)&&i.length>0)r.children=i;return r}async function et(t,e={}){let r=[],i=[],s=[],a=new Set;function l(c){let f=s[s.length-1];if(!f)i.push(c);else if(!f.dropped)f.node.children.push(c)}function u(c){if(c.node.bindings&&Object.keys(c.node.bindings).length>0){let p=c.node.children,b=p.filter((x)=>typeof x!=="string"),m=b.length===1&&b.length===p.length?b[0]:W("View",{},{},{},p);if(m.bindings={...c.node.bindings,...m.bindings},m.bindingId===void 0&&c.node.bindingId!==void 0)m.bindingId=c.node.bindingId;l(m);return}let f=s[s.length-1];for(let p of c.node.children){if(typeof p==="string"){if(f&&!f.dropped)f.node.children.push(p);continue}if(!f)i.push(p);else if(!f.dropped)f.node.children.push(p)}}function d(c,f){let p=ee.has(c)&&!B.has(c),b=s[s.length-1]?.dropped??!1,{props:m,style:x,events:S,bindings:w,classes:v,inline:me}=p||b?{props:{},style:{},events:{},bindings:{},classes:"",inline:{}}:Ke(c,f,r),L=m["data-native"],R;if(typeof L==="string"&&re.has(L))R=L,delete m["data-native"];else R=B.has(c)?"View":U(c);if(R===c&&!re.has(R)&&!ee.has(c)&&!te.has(c)&&!a.has(c))a.add(c),r.push({kind:"unmapped-tag",tag:c});if((p||B.has(c))&&!a.has(`drop:${c}`))a.add(`drop:${c}`),r.push({kind:"dropped-subtree",tag:c});if(R==="Icon"){let he=A(v).icon;m.symbol=J(String(m.symbol||m.name||he||""),Boolean(m.symbol)).symbol}let C=W(R,m,x,S);C._inlineStyle=me;let D=m["data-stx-b"];if(typeof D==="number"&&Number.isInteger(D))C.bindingId=D;if(delete m["data-stx-b"],v)C._classes=v;if(Object.keys(w).length>0)C.bindings=w;if(typeof m.key==="string")C.key=m.key,delete m.key;return{tag:c,node:C,dropped:p||b||B.has(c),discard:p||b,unwrap:te.has(c)}}if(await new HTMLRewriter().on("*",{element(c){let f=c.tagName.toLowerCase(),p=d(f,[...c.attributes]),b=!0;try{c.onEndTag(()=>{if(s.pop(),p.discard)return;if(p.unwrap)u(p);else l(Qe(p,r))})}catch{b=!1}if(b)s.push(p);else if(!p.discard)l(p.node)},text(c){let f=s[s.length-1];if(!f||f.dropped)return;let p=_(c.text).replace(/\s+/g," ");if(!p.trim())return;f.node.children.push(p)}}).transform(new Response(t)).text(),i.length===0)throw Error(`No element to translate in the rendered output of ${e.source??"unknown"}`);return{root:i.length===1?i[0]:W("View",{},{},{},i),diagnostics:r}}async function ce(t,e={}){let{root:r,diagnostics:i}=await et(t,e),s=e.script??{exports:{},functions:[],code:""};return{document:Q(r,s,{source:e.source??"unknown"}),diagnostics:i}}var le=/<script\b([^>]*)>([\s\S]*?)<\/script>/gi,tt=/(?:^|\n)\s*(?:export\s+)?(?:async\s+)?function\s*\*?\s*([$\w]+)\s*\(/g,rt=/(?:^|\n)\s*(?:export\s+)?(?:const|let|var)\s+([$\w]+)\s*=\s*(?:async\s*)?(?:\([^)]*\)|[$\w]+)\s*=>/g,ue=/(?:^|\n)\s*(?:export\s+)?const\s+([$\w]+)\s*=\s*(-?[\d.]+|true|false|'[^']*'|"[^"]*")\s*(?=;|\n|$)/g;function P(t){let e=[];le.lastIndex=0;for(let a of t.matchAll(le)){let l=a[1]??"";if(/\bserver\b/.test(l))continue;e.push(a[2].trim())}let r=e.filter(Boolean).join(`
3
3
 
4
4
  `),i=[];for(let a of[tt,rt]){a.lastIndex=0;for(let l of r.matchAll(a))if(!i.includes(l[1]))i.push(l[1])}let s={};ue.lastIndex=0;for(let a of r.matchAll(ue)){let l=a[2];try{s[a[1]]=JSON.parse(l.replace(/^'(.*)'$/,'"$1"'))}catch{s[a[1]]=l}}return{exports:s,functions:i,code:r}}var de=/<script\b[^>]*\bdata-stx-scoped\b[^>]*>([\s\S]*?)<\/script>/gi,nt=/function\s+(__stx_setup_[\w$]+)\s*\(/;function F(t){de.lastIndex=0;for(let e of t.matchAll(de)){let r=e[1].trim(),i=nt.exec(r)?.[1];if(i)return{name:i,code:r}}return null}function ot(){let t=[E.join(import.meta.dir,"..","primitives"),E.join(import.meta.dir,"native","primitives")];for(let e of t)if(it(E.join(e,"View.stx")))return e;return t[0]}async function st(t,e,r={}){let i=r.root??E.dirname(e),s=await o(i),a={root:i,componentsDir:r.componentsDir??E.join(i,"components"),buildMode:"serve",cache:!1,_pluginComponentDirs:[ot(),...s._pluginComponentDirs??[]]},l={...r.context??{},__stx_inject_css:!1},u=await n(t,l,e,a,new Set),{html:d,manifest:g}=G(u),{document:c,diagnostics:f}=await ce(d,{source:e,script:P(t)}),p=F(d);if(P(t).code.trim()){let b=await zn(t,e,r.context,{forceClientSetup:!0});p=F(b.setupCode??"")??p}return{document:c,manifest:g,setup:p,diagnostics:f,html:d}}async function I(t,e={}){return st(await Bun.file(t).text(),t,e)}function fe(t){let r=[k.join(import.meta.dir,"..","runtime",`${t}.ts`),k.join(import.meta.dir,"..","runtime",`${t}.js`),k.join(import.meta.dir,"native","runtime",`${t}.js`)].find((i)=>at(i));if(!r)throw Error(`Native runtime module ${t} is missing`);return r}async function lt(t,e,r){let i=await Bun.build({entrypoints:[t],target:"browser",format:"iife",minify:r,plugins:e,define:{"process.env.NODE_ENV":JSON.stringify(r?"production":"development")}});if(!i.success){let s=i.logs.map((a)=>String(a.message??a)).join(`
5
5
  `);throw Error(`Could not bundle ${t}:
@@ -1,5 +1,5 @@
1
1
  // @bun
2
- import{y}from"./chunk-01nx6zcw.js";import{P,Tt}from"./chunk-pf0d8y9n.js";import{w,He,L,o}from"./chunk-ss7wapbh.js";import{ie,ht,yt}from"./chunk-g4dmjede.js";import{Pe,Ut,dt,H}from"./chunk-xnjcmhs5.js";import f from"path";var l=new Map;function v(a,s){for(let n of a.matchAll(/\b(?:const|let|var|function|class)\s+([A-Z_a-z$][\w$]*)/g))if(n[1])s.add(n[1]);for(let n of a.matchAll(/\b(?:const|let|var)\s*\{([^{}]*)\}\s*=/g))for(let r of(n[1]??"").split(",")){let i=((r.includes(":")?r.split(":").pop():r)??"").replace(/=.*$/s,"").replace(/^\s*\.\.\./,"").trim();if(/^[A-Z_a-z$][\w$]*$/.test(i))s.add(i)}for(let n of a.matchAll(/\b(?:const|let|var)\s*\[([^\]]*)\]\s*=/g))for(let r of(n[1]??"").split(",")){let c=r.replace(/=.*$/s,"").replace(/^\s*\.\.\./,"").trim();if(/^[A-Z_a-z$][\w$]*$/.test(c))s.add(c)}}async function Kl(a){let s;if(a)s=f.resolve(a);else{let t=await o();s=f.resolve(t.root||process.cwd(),t.storesDir||"stores")}let n=new Bun.Glob("*.ts"),r=[];try{for await(let t of n.scan({cwd:s,absolute:!0})){let e=f.basename(t,".ts");if(["index","types"].includes(e))continue;if(t.includes(".d.ts"))continue;r.push(t)}}catch{return H(l,s,"",""),null}let c=()=>[...new Set([...r,...r.flatMap((t)=>ie(t))])],i=Pe(c()),d=dt(l,s,i);if(d!==void 0)return d||null;if(r.length===0)return H(l,s,i,""),null;let p=[];for(let t of r){let e=await Bun.file(t).text();p.push({file:t,hasUseStore:/useStore\s*\(/.test(e)})}p.sort((t,e)=>{if(t.hasUseStore===e.hasUseStore)return 0;return t.hasUseStore?1:-1});let h=p.map((t)=>t.file),u=[],m=new Set,b=L({loader:"ts",target:"browser",define:w()});for(let t of h)try{let e=await Bun.file(t).text(),x=f.basename(t,".ts");if(v(e,m),ht(e))e=await yt(e,t,{projectRoot:process.cwd(),externalizeUserModules:!1});e=He(e),e=P(e),e=Tt(e),e=e.replace(/^export\s+(default\s+)?/gm,""),e=b.transformSync(e),u.push(`// Store: ${x}
2
+ import{y}from"./chunk-01nx6zcw.js";import{P,Tt}from"./chunk-pf0d8y9n.js";import{w,He,L,o}from"./chunk-xts31rkc.js";import{ie,ht,yt}from"./chunk-f64rmdvt.js";import{Pe,Ut,ut,H}from"./chunk-hjhz90kg.js";import f from"path";var l=new Map;function v(a,s){for(let n of a.matchAll(/\b(?:const|let|var|function|class)\s+([A-Z_a-z$][\w$]*)/g))if(n[1])s.add(n[1]);for(let n of a.matchAll(/\b(?:const|let|var)\s*\{([^{}]*)\}\s*=/g))for(let r of(n[1]??"").split(",")){let i=((r.includes(":")?r.split(":").pop():r)??"").replace(/=.*$/s,"").replace(/^\s*\.\.\./,"").trim();if(/^[A-Z_a-z$][\w$]*$/.test(i))s.add(i)}for(let n of a.matchAll(/\b(?:const|let|var)\s*\[([^\]]*)\]\s*=/g))for(let r of(n[1]??"").split(",")){let c=r.replace(/=.*$/s,"").replace(/^\s*\.\.\./,"").trim();if(/^[A-Z_a-z$][\w$]*$/.test(c))s.add(c)}}async function Kl(a){let s;if(a)s=f.resolve(a);else{let t=await o();s=f.resolve(t.root||process.cwd(),t.storesDir||"stores")}let n=new Bun.Glob("*.ts"),r=[];try{for await(let t of n.scan({cwd:s,absolute:!0})){let e=f.basename(t,".ts");if(["index","types"].includes(e))continue;if(t.includes(".d.ts"))continue;r.push(t)}}catch{return H(l,s,"",""),null}let c=()=>[...new Set([...r,...r.flatMap((t)=>ie(t))])],i=Pe(c()),d=ut(l,s,i);if(d!==void 0)return d||null;if(r.length===0)return H(l,s,i,""),null;let p=[];for(let t of r){let e=await Bun.file(t).text();p.push({file:t,hasUseStore:/useStore\s*\(/.test(e)})}p.sort((t,e)=>{if(t.hasUseStore===e.hasUseStore)return 0;return t.hasUseStore?1:-1});let h=p.map((t)=>t.file),u=[],m=new Set,b=L({loader:"ts",target:"browser",define:w()});for(let t of h)try{let e=await Bun.file(t).text(),x=f.basename(t,".ts");if(v(e,m),ht(e))e=await yt(e,t,{projectRoot:process.cwd(),externalizeUserModules:!1});e=He(e),e=P(e),e=Tt(e),e=e.replace(/^export\s+(default\s+)?/gm,""),e=b.transformSync(e),u.push(`// Store: ${x}
3
3
  ${e.trim()}`)}catch(e){console.warn(`[stx] Failed to load store ${t}:`,e)}if(u.length===0)return H(l,s,i,""),null;let g=u.join(`
4
4
 
5
5
  `),S=`;(function(){
@@ -1,2 +1,2 @@
1
1
  // @bun
2
- import{Li,Zs,ji,Bi,Qs,Fi,zi,Hi,Vi,eo,Ui,Kc}from"./chunk-cxbp2m66.js";import{uo,Ji}from"./chunk-gkj42zq7.js";import{j,B,F,Ot,J,se,En,Ae,ut,Mt,Nt,Lt,z,jt,Bt,_n}from"./chunk-28s5x7wv.js";import{_a}from"./chunk-vvs75dse.js";export{B as DEFAULT_FORMATS,F as DEFAULT_QUALITY,j as DEFAULT_WIDTHS,_n as ImageProcessingError,Bi as clearImageCache,Qs as createImageDirective,Ji as createImageHandler,zi as createImagePlugin,Kc as defaultImageConfig,Bt as formatSize,eo as generateImageManifest,ut as generateSizes,Ae as generateSrcSet,Mt as getFallbackVariant,En as getImageMetadata,z as getMimeType,jt as getTotalSize,Nt as groupVariantsByFormat,uo as handleImageRequest,Fi as imageDirective,J as isImageBackendAvailable,Lt as isImageFile,Ot as isSharpAvailable,Vi as optimizeDirectory,Hi as optimizeImage,Zs as parseImageComponent,se as processImage,ji as processImageComponents,Li as renderImageComponent,_a as rewriteImagesWithSiblings,Ui as writeImageManifest};
2
+ import{Li,Zs,ji,Bi,Qs,Fi,zi,Hi,Vi,eo,Ui,Kc}from"./chunk-5rx7ptse.js";import{uo,Ji}from"./chunk-6vstn9dk.js";import{j,B,F,Ot,J,se,En,Ae,dt,Mt,Nt,Lt,z,jt,Bt,_n}from"./chunk-pz537q62.js";import{_a}from"./chunk-vvs75dse.js";export{B as DEFAULT_FORMATS,F as DEFAULT_QUALITY,j as DEFAULT_WIDTHS,_n as ImageProcessingError,Bi as clearImageCache,Qs as createImageDirective,Ji as createImageHandler,zi as createImagePlugin,Kc as defaultImageConfig,Bt as formatSize,eo as generateImageManifest,dt as generateSizes,Ae as generateSrcSet,Mt as getFallbackVariant,En as getImageMetadata,z as getMimeType,jt as getTotalSize,Nt as groupVariantsByFormat,uo as handleImageRequest,Fi as imageDirective,J as isImageBackendAvailable,Lt as isImageFile,Ot as isSharpAvailable,Vi as optimizeDirectory,Hi as optimizeImage,Zs as parseImageComponent,se as processImage,ji as processImageComponents,Li as renderImageComponent,_a as rewriteImagesWithSiblings,Ui as writeImageManifest};
@@ -0,0 +1,2 @@
1
+ // @bun
2
+ import{kt,us,ii,hc}from"./chunk-xts31rkc.js";import"./chunk-594tt40e.js";import"./chunk-wkc34drs.js";import"./chunk-j4afmryj.js";import"./chunk-xc27xdm6.js";import"./chunk-scvzv5y2.js";import"./chunk-yd7g02v5.js";import"./chunk-gskjzw5r.js";import"./chunk-ab7vh24b.js";import"./chunk-pf0d8y9n.js";import"./chunk-01nx6zcw.js";import"./chunk-mx446wgp.js";import"./chunk-pcq6vphz.js";export{hc as declareBareLoopHead,kt as parseLoopBinding,ii as processLoops,us as reportDeferredLoopWarnings};
@@ -0,0 +1,2 @@
1
+ // @bun
2
+ import{bt,Vr,Ur,Wr,wd,qr}from"./chunk-wc6k446y.js";import"./chunk-j4afmryj.js";import"./chunk-scvzv5y2.js";import"./chunk-mx446wgp.js";export{Ur as buildServerApi,wd as createServerApi,bt as discoverServerApi,Vr as generateApiTypes,qr as isServerApiSource,Wr as productionApiDispatcher};
@@ -0,0 +1,2 @@
1
+ // @bun
2
+ import{Qr,es,ts,Nd,Bn,Ld}from"./chunk-xts31rkc.js";export{Bn as clearImageDeliveryCatalog,Nd as deliveredImage,ts as efficientDeliverySources,Qr as getImageDelivery,es as isTransparentImage,Ld as prepareImageDelivery};
@@ -1,5 +1,5 @@
1
1
  // @bun
2
- import{Zt,ae}from"./chunk-8scw1bes.js";import{m,Qt,w,Me,o,R}from"./chunk-ss7wapbh.js";import{qr}from"./chunk-a0jyh65n.js";import{s,we}from"./chunk-ak95401g.js";import{a}from"./chunk-kk5cyjfs.js";import f from"path";import j from"fs";var pe=10;function V(e,n,i){return/^(?:(?:stx|ui)\.config\.[cm]?[jt]s|runtime-config-(?:server|loader)\.[cm]?[jt]s)$/.test(f.basename(e))||qr(e,n,i)}var ne=1,re=new Map,P=600,fe=100,W=new Map;async function me(e){let n=W.get(e)??0;if(n>0&&n<fe){W.set(e,n+1);return}W.set(e,1);try{let i=(await j.promises.readdir(e)).filter((u)=>u.endsWith(".js"));if(i.length<=P)return;let g=(await Promise.all(i.map(async(u)=>{try{return{name:u,at:(await j.promises.stat(f.join(e,u))).mtimeMs}}catch{return null}}))).filter((u)=>u!==null);g.sort((u,l)=>l.at-u.at);for(let u of g.slice(P)){let l=u.name.slice(0,-3);await j.promises.rm(f.join(e,`${l}.js`),{force:!0}),await j.promises.rm(f.join(e,`${l}.deps.json`),{force:!0})}I("pruned bundle cache to",P,"entries")}catch{}}function ie(e){return re.get(e)??[]}function X(e,n){if(e)re.set(e,n)}function La(e=process.env){return e.STX_DEBUG==="true"||e.STX_DEBUG==="1"}function I(...e){if(La())console.log("[stx:bundler]",...e)}var Z=[];function No(e,n,i){Z.push({filePath:e||"<inline>",message:n,details:i})}function gt(){return Z.slice()}function mt(){Z.length=0}var q;function bu(e){q=e}function Lo(){if(q)return q;try{let e=R.strict;return typeof e==="object"&&e!==null?e.bundlerFallback??"warn":"warn"}catch{return"warn"}}var H=[/^stx$/,/^@stacksjs\/stx$/,/^@stores$/,/^stx\/stores$/,/^@composables$/];function ht(e){let n=/^[ \t]*import[ \t]+(?!type(?:[ \t]|{))[\s\S]*?\s+from\s+['"]([^'"]+)['"][ \t]*;?/gm,i;while((i=n.exec(e))!==null){let g=i[1];if(!H.some((l)=>l.test(g)))return I("detected user import:",g),!0}let c=/^[ \t]*import[ \t]+['"]([^'"]+)['"]/gm;while((i=c.exec(e))!==null){let g=i[1];if(/\.css(?:\?.*)?$/.test(g))continue;if(!H.some((l)=>l.test(g)))return I("detected side-effect import:",g),!0}return!1}var Yt="stx-module:",ge=/\.(?:[cm]?[jt]sx?|json)$/i;function ja(e,n){return f.relative(e,n).split(f.sep).join("/")}function Ba(e,n){if(n.size===0)return e;return e.replace(/^([ \t]*import\s+(?:[^;"']*?\s+from\s+)?)(["'])([^"']+)\2/gm,(i,c,g,u)=>{let l=n.get(u);return l&&!u.startsWith(Yt)?`${c}${g}${l}${g}`:i})}function Fa(e,n){let i=0,c=(u)=>{let l=`__stxMod${i++}`,v=JSON.stringify(u);return n.push(`var ${l} = globalThis.__stxModules && globalThis.__stxModules[${v}];`,`if (${l} === undefined) throw new Error("[stx] module " + ${JSON.stringify(v)} + " is not registered on this page (#1957)");`),l},g=(u,l)=>{for(let v of u.split(",")){let M=v.trim();if(!M)continue;let p=M.match(/^("(?:[^"\\]|\\.)*"|[\w$]+)(?:\s+as\s+([\w$]+))?$/);if(!p)continue;let t=p[1].startsWith('"')?JSON.parse(p[1]):p[1],r=p[2]??t;n.push(`var ${r} = ${l}[${JSON.stringify(t)}];`)}};return e=e.replace(/^[ \t]*import\s+([^;"']*?)\s+from\s+["'](stx-module:[^"']+)["'];?[ \t]*$/gm,(u,l,v)=>{let M=v.slice(Yt.length),p=c(M),t=l.trim(),r=t.match(/^([\w$]+)\s*(?:,\s*|$)/);if(r&&!t.startsWith("{")&&!t.startsWith("*"))n.push(`var ${r[1]} = ${p}.default;`),t=t.slice(r[0].length).trim();let d=t.match(/^\*\s*as\s+([\w$]+)$/);if(d)n.push(`var ${d[1]} = ${p};`);else if(t.startsWith("{"))g(t.replace(/^\{|\}$/g,""),p);return""}),e=e.replace(/^[ \t]*import\s+["'](stx-module:[^"']+)["'];?[ \t]*$/gm,(u,l)=>(c(l.slice(Yt.length)),"")),e}function ee(e){let n=[e,`${e}.ts`,`${e}.tsx`,`${e}.js`,`${e}.mjs`,`${e}.jsx`,f.join(e,"index.ts"),f.join(e,"index.tsx"),f.join(e,"index.js"),f.join(e,"index.mjs")];for(let i of n)try{if(j.existsSync(i)&&j.statSync(i,{throwIfNoEntry:!1})?.isFile())return i}catch{}return}function he(e,n,i,c,g,u=new Map,l){let v=(p,t,r)=>{if(V(t,e,l))return null;if(!g||p!==i||!ge.test(t))return null;try{if(!j.statSync(t,{throwIfNoEntry:!1})?.isFile())return null}catch{return null}c.add(t);let d=`${Yt}${ja(process.cwd(),t)}`;return u.set(r,d),{path:d,external:!0}},M=(p,t)=>{let r=p===i?n:f.dirname(p),d=f.resolve(r,t);return ee(d)??d};return{name:"stx-client-bundle",setup(p){if(p.onResolve({filter:/^(stx|@stacksjs\/stx)$/},(t)=>({path:t.path,external:!0})),p.onResolve({filter:/^(@stores|@composables|stx\/stores)$/},(t)=>({path:t.path,external:!0})),p.onResolve({filter:/^\//},(t)=>{let r=ee(t.path);if(r){let d=v(t.importer,r,t.path);if(d)return d;if(r!==i)c.add(r);return{path:r}}return{path:t.path,external:!0}}),p.onResolve({filter:/^\.\.?\//},(t)=>{let r=M(t.importer,t.path),d=v(t.importer,r,t.path);if(d)return d;return c.add(r),{path:r}}),p.onResolve({filter:/^[@~]\//},(t)=>{let r=f.resolve(e,t.path.slice(2)),d=[r,`${r}.ts`,`${r}.tsx`,`${r}.js`,`${r}.mjs`,`${r}.jsx`,f.join(r,"index.ts"),f.join(r,"index.tsx"),f.join(r,"index.js"),f.join(r,"index.mjs")];for(let E of d)if(j.existsSync(E)&&j.statSync(E,{throwIfNoEntry:!1})?.isFile()){let C=v(t.importer,E,t.path);if(C)return C;return I(`resolved ${t.path[0]}/ import:`,t.path,"\u2192",E),c.add(E),{path:E}}return console.warn(`[stx:bundler] could not resolve ${t.path[0]}/ import:`,t.path),{path:r}}),g)p.onResolve({filter:/^(?!node:|bun:)(?:@[\w.-]+\/)?[\w.-]/},(t)=>{if(t.importer!==i)return;let r=`${Yt}npm:${t.path}`;return u.set(t.path,r),{path:r,external:!0}});p.onLoad({filter:/\.(?:[cm]?[jt]sx?|json)$/},(t)=>{if(V(t.path,e,l))throw Error(`Server-only API source cannot be imported by a client script: ${t.path}`);let r=f.extname(t.path).toLowerCase(),d=r===".json"?"json":r===".tsx"?"tsx":r===".jsx"?"jsx":r===".ts"||r===".mts"||r===".cts"?"ts":"js";if(t.path!==i)c.add(t.path);return{contents:j.readFileSync(t.path,"utf8"),loader:d}})}}}var G=new Map,L=m(64),te=Symbol.for("stx.client-bundle-build-queue");function za(e){let n=globalThis,c=(n[te]??Promise.resolve()).then(e,e);return n[te]=c.then(()=>{return},()=>{return}),c}async function yt(e,n,i={}){let c=i.projectRoot||process.cwd(),g=(await o(c)).serverApi,u=i.minify??!1,l=i.externalizeUserModules??!0,v=i.expose?.length?[...new Set(i.expose)].sort():void 0,M=i.cacheDir||a(c,"bundle-cache"),p=new Bun.CryptoHasher("md5");p.update(`${pe}\x00${Me()}\x00${JSON.stringify(g??!1)}\x00${l?"registry":"inline"}\x00${v?v.join(","):"*"}\x00${e}\x00${n}`);let t=p.digest("hex").slice(0,12),r=f.join(M,`${t}.js`),d=L.get(r);if(d){if(Qt(d.files)&&d.files.every((A)=>!V(A.path,c,g))){I("memo hit:",t);let A=d.files.map((B)=>B.path);return X(n,A),i.collectInputs?.push(...A),d.code}L.delete(r),I("memo invalidated by dep change:",t)}let E=f.join(M,`${t}.deps.json`),C=Bun.file(r);if(await C.exists()){let A=Bun.file(E),B=!1,N=null;if(await A.exists())try{let O=JSON.parse(await A.text());if(O.metadataVersion!==ne||!Array.isArray(O.files))B=!1;else N=O.files,B=!0;if(N&&(!Qt(N)||N.some((D)=>V(D.path,c,g))))B=!1}catch{B=!1}if(B){if(I("cache hit:",t),N)X(n,N.map((D)=>D.path)),i.collectInputs?.push(...N.map((D)=>D.path));let O=await C.text();if(N)L.set(r,{code:O,files:N});return O}I("cache invalidated by dep change:",t)}let _=G.get(t);if(_){let A=await _;if(i.collectInputs)i.collectInputs.push(...(L.get(r)?.files??[]).map((B)=>B.path));return A}let z=za(()=>$e(e,n,{projectRoot:c,minify:u,cacheDir:M,hash:t,cachePath:r,depsPath:E,collectInputs:i.collectInputs,externalizeUserModules:l,serverApi:g,expose:v,throwOnFailure:i.throwOnFailure}));G.set(t,z);try{return await z}finally{G.delete(t)}}var xe=0;function Ha(e){return`${e}-${process.pid}-${++xe}`}async function $e(e,n,i){let{projectRoot:c,minify:g,cacheDir:u,hash:l,cachePath:v,depsPath:M,externalizeUserModules:p}=i,t=a(c,"bundle-tmp"),r=Ha(l),d=f.join(t,`${r}.ts`),E=f.join(t,"out",r);j.mkdirSync(t,{recursive:!0}),j.mkdirSync(E,{recursive:!0});let C=f.dirname(n),_=new Set,z=/^[ \t]*(export\s+)?(?:const|let|var)\s+(?:\{([^}]+)\}|(\w+))/gm,A=/^[ \t]*(export\s+)?(?:async\s+)?function\s+(\w+)/gm,B=s(e),{depths:N,balanced:O}=we(B),D=(S)=>!O||N[S]===0,b;while((b=z.exec(B))!==null){if(b[1])continue;if(!D(b.index))continue;if(b[2])b[2].split(",").forEach((S)=>{let h=be(S);if(h)_.add(h)});else if(b[3])_.add(b[3])}while((b=A.exec(B))!==null){if(b[1])continue;if(!D(b.index))continue;_.add(b[2])}let se=/^[ \t]*import[ \t]+(?!type\b)(?:(\w+)\s*(?:,\s*)?)?(?:\*\s+as\s+(\w+)|\{([^}]+)\})?\s+from\b/gm;while((b=se.exec(B))!==null){if(!D(b.index))continue;let S=/^\s*['"]([^'"]+)['"]/.exec(e.slice(b.index+b[0].length))?.[1];if(S&&H.some((h)=>h.test(S)))continue;if(b[1])_.add(b[1]);if(b[2])_.add(b[2]);for(let h of(b[3]??"").split(",")){let y=h.trim();if(!y||/^type\s/.test(y))continue;let U=/\bas\s+(\w+)\s*$/.exec(y)?.[1]??/^\w+$/.exec(y)?.[0];if(U)_.add(U)}}for(let S of B.matchAll(/\bexport\s*\{([^}]+)\}/g))for(let h of S[1].split(",")){let y=/\bas\s+(\w+)\s*$/.exec(h)?.[1]??/^\s*(\w+)\s*$/.exec(h)?.[1];if(y)_.delete(y)}let oe=_.size>0?`
2
+ import{Zt,ae}from"./chunk-8scw1bes.js";import{m,Qt,w,Me,o,R}from"./chunk-xts31rkc.js";import{qr}from"./chunk-wc6k446y.js";import{s,we}from"./chunk-ak95401g.js";import{a}from"./chunk-kk5cyjfs.js";import f from"path";import j from"fs";var pe=10;function V(e,n,i){return/^(?:(?:stx|ui)\.config\.[cm]?[jt]s|runtime-config-(?:server|loader)\.[cm]?[jt]s)$/.test(f.basename(e))||qr(e,n,i)}var ne=1,re=new Map,P=600,fe=100,W=new Map;async function me(e){let n=W.get(e)??0;if(n>0&&n<fe){W.set(e,n+1);return}W.set(e,1);try{let i=(await j.promises.readdir(e)).filter((u)=>u.endsWith(".js"));if(i.length<=P)return;let g=(await Promise.all(i.map(async(u)=>{try{return{name:u,at:(await j.promises.stat(f.join(e,u))).mtimeMs}}catch{return null}}))).filter((u)=>u!==null);g.sort((u,l)=>l.at-u.at);for(let u of g.slice(P)){let l=u.name.slice(0,-3);await j.promises.rm(f.join(e,`${l}.js`),{force:!0}),await j.promises.rm(f.join(e,`${l}.deps.json`),{force:!0})}I("pruned bundle cache to",P,"entries")}catch{}}function ie(e){return re.get(e)??[]}function X(e,n){if(e)re.set(e,n)}function La(e=process.env){return e.STX_DEBUG==="true"||e.STX_DEBUG==="1"}function I(...e){if(La())console.log("[stx:bundler]",...e)}var Z=[];function No(e,n,i){Z.push({filePath:e||"<inline>",message:n,details:i})}function gt(){return Z.slice()}function mt(){Z.length=0}var q;function bd(e){q=e}function Lo(){if(q)return q;try{let e=R.strict;return typeof e==="object"&&e!==null?e.bundlerFallback??"warn":"warn"}catch{return"warn"}}var H=[/^stx$/,/^@stacksjs\/stx$/,/^@stores$/,/^stx\/stores$/,/^@composables$/];function ht(e){let n=/^[ \t]*import[ \t]+(?!type(?:[ \t]|{))[\s\S]*?\s+from\s+['"]([^'"]+)['"][ \t]*;?/gm,i;while((i=n.exec(e))!==null){let g=i[1];if(!H.some((l)=>l.test(g)))return I("detected user import:",g),!0}let c=/^[ \t]*import[ \t]+['"]([^'"]+)['"]/gm;while((i=c.exec(e))!==null){let g=i[1];if(/\.css(?:\?.*)?$/.test(g))continue;if(!H.some((l)=>l.test(g)))return I("detected side-effect import:",g),!0}return!1}var Yt="stx-module:",ge=/\.(?:[cm]?[jt]sx?|json)$/i;function ja(e,n){return f.relative(e,n).split(f.sep).join("/")}function Ba(e,n){if(n.size===0)return e;return e.replace(/^([ \t]*import\s+(?:[^;"']*?\s+from\s+)?)(["'])([^"']+)\2/gm,(i,c,g,u)=>{let l=n.get(u);return l&&!u.startsWith(Yt)?`${c}${g}${l}${g}`:i})}function Fa(e,n){let i=0,c=(u)=>{let l=`__stxMod${i++}`,v=JSON.stringify(u);return n.push(`var ${l} = globalThis.__stxModules && globalThis.__stxModules[${v}];`,`if (${l} === undefined) throw new Error("[stx] module " + ${JSON.stringify(v)} + " is not registered on this page (#1957)");`),l},g=(u,l)=>{for(let v of u.split(",")){let M=v.trim();if(!M)continue;let p=M.match(/^("(?:[^"\\]|\\.)*"|[\w$]+)(?:\s+as\s+([\w$]+))?$/);if(!p)continue;let t=p[1].startsWith('"')?JSON.parse(p[1]):p[1],r=p[2]??t;n.push(`var ${r} = ${l}[${JSON.stringify(t)}];`)}};return e=e.replace(/^[ \t]*import\s+([^;"']*?)\s+from\s+["'](stx-module:[^"']+)["'];?[ \t]*$/gm,(u,l,v)=>{let M=v.slice(Yt.length),p=c(M),t=l.trim(),r=t.match(/^([\w$]+)\s*(?:,\s*|$)/);if(r&&!t.startsWith("{")&&!t.startsWith("*"))n.push(`var ${r[1]} = ${p}.default;`),t=t.slice(r[0].length).trim();let d=t.match(/^\*\s*as\s+([\w$]+)$/);if(d)n.push(`var ${d[1]} = ${p};`);else if(t.startsWith("{"))g(t.replace(/^\{|\}$/g,""),p);return""}),e=e.replace(/^[ \t]*import\s+["'](stx-module:[^"']+)["'];?[ \t]*$/gm,(u,l)=>(c(l.slice(Yt.length)),"")),e}function ee(e){let n=[e,`${e}.ts`,`${e}.tsx`,`${e}.js`,`${e}.mjs`,`${e}.jsx`,f.join(e,"index.ts"),f.join(e,"index.tsx"),f.join(e,"index.js"),f.join(e,"index.mjs")];for(let i of n)try{if(j.existsSync(i)&&j.statSync(i,{throwIfNoEntry:!1})?.isFile())return i}catch{}return}function he(e,n,i,c,g,u=new Map,l){let v=(p,t,r)=>{if(V(t,e,l))return null;if(!g||p!==i||!ge.test(t))return null;try{if(!j.statSync(t,{throwIfNoEntry:!1})?.isFile())return null}catch{return null}c.add(t);let d=`${Yt}${ja(process.cwd(),t)}`;return u.set(r,d),{path:d,external:!0}},M=(p,t)=>{let r=p===i?n:f.dirname(p),d=f.resolve(r,t);return ee(d)??d};return{name:"stx-client-bundle",setup(p){if(p.onResolve({filter:/^(stx|@stacksjs\/stx)$/},(t)=>({path:t.path,external:!0})),p.onResolve({filter:/^(@stores|@composables|stx\/stores)$/},(t)=>({path:t.path,external:!0})),p.onResolve({filter:/^\//},(t)=>{let r=ee(t.path);if(r){let d=v(t.importer,r,t.path);if(d)return d;if(r!==i)c.add(r);return{path:r}}return{path:t.path,external:!0}}),p.onResolve({filter:/^\.\.?\//},(t)=>{let r=M(t.importer,t.path),d=v(t.importer,r,t.path);if(d)return d;return c.add(r),{path:r}}),p.onResolve({filter:/^[@~]\//},(t)=>{let r=f.resolve(e,t.path.slice(2)),d=[r,`${r}.ts`,`${r}.tsx`,`${r}.js`,`${r}.mjs`,`${r}.jsx`,f.join(r,"index.ts"),f.join(r,"index.tsx"),f.join(r,"index.js"),f.join(r,"index.mjs")];for(let E of d)if(j.existsSync(E)&&j.statSync(E,{throwIfNoEntry:!1})?.isFile()){let C=v(t.importer,E,t.path);if(C)return C;return I(`resolved ${t.path[0]}/ import:`,t.path,"\u2192",E),c.add(E),{path:E}}return console.warn(`[stx:bundler] could not resolve ${t.path[0]}/ import:`,t.path),{path:r}}),g)p.onResolve({filter:/^(?!node:|bun:)(?:@[\w.-]+\/)?[\w.-]/},(t)=>{if(t.importer!==i)return;let r=`${Yt}npm:${t.path}`;return u.set(t.path,r),{path:r,external:!0}});p.onLoad({filter:/\.(?:[cm]?[jt]sx?|json)$/},(t)=>{if(V(t.path,e,l))throw Error(`Server-only API source cannot be imported by a client script: ${t.path}`);let r=f.extname(t.path).toLowerCase(),d=r===".json"?"json":r===".tsx"?"tsx":r===".jsx"?"jsx":r===".ts"||r===".mts"||r===".cts"?"ts":"js";if(t.path!==i)c.add(t.path);return{contents:j.readFileSync(t.path,"utf8"),loader:d}})}}}var G=new Map,L=m(64),te=Symbol.for("stx.client-bundle-build-queue");function za(e){let n=globalThis,c=(n[te]??Promise.resolve()).then(e,e);return n[te]=c.then(()=>{return},()=>{return}),c}async function yt(e,n,i={}){let c=i.projectRoot||process.cwd(),g=(await o(c)).serverApi,u=i.minify??!1,l=i.externalizeUserModules??!0,v=i.expose?.length?[...new Set(i.expose)].sort():void 0,M=i.cacheDir||a(c,"bundle-cache"),p=new Bun.CryptoHasher("md5");p.update(`${pe}\x00${Me()}\x00${JSON.stringify(g??!1)}\x00${l?"registry":"inline"}\x00${v?v.join(","):"*"}\x00${e}\x00${n}`);let t=p.digest("hex").slice(0,12),r=f.join(M,`${t}.js`),d=L.get(r);if(d){if(Qt(d.files)&&d.files.every((A)=>!V(A.path,c,g))){I("memo hit:",t);let A=d.files.map((B)=>B.path);return X(n,A),i.collectInputs?.push(...A),d.code}L.delete(r),I("memo invalidated by dep change:",t)}let E=f.join(M,`${t}.deps.json`),C=Bun.file(r);if(await C.exists()){let A=Bun.file(E),B=!1,N=null;if(await A.exists())try{let O=JSON.parse(await A.text());if(O.metadataVersion!==ne||!Array.isArray(O.files))B=!1;else N=O.files,B=!0;if(N&&(!Qt(N)||N.some((D)=>V(D.path,c,g))))B=!1}catch{B=!1}if(B){if(I("cache hit:",t),N)X(n,N.map((D)=>D.path)),i.collectInputs?.push(...N.map((D)=>D.path));let O=await C.text();if(N)L.set(r,{code:O,files:N});return O}I("cache invalidated by dep change:",t)}let _=G.get(t);if(_){let A=await _;if(i.collectInputs)i.collectInputs.push(...(L.get(r)?.files??[]).map((B)=>B.path));return A}let z=za(()=>$e(e,n,{projectRoot:c,minify:u,cacheDir:M,hash:t,cachePath:r,depsPath:E,collectInputs:i.collectInputs,externalizeUserModules:l,serverApi:g,expose:v,throwOnFailure:i.throwOnFailure}));G.set(t,z);try{return await z}finally{G.delete(t)}}var xe=0;function Ha(e){return`${e}-${process.pid}-${++xe}`}async function $e(e,n,i){let{projectRoot:c,minify:g,cacheDir:u,hash:l,cachePath:v,depsPath:M,externalizeUserModules:p}=i,t=a(c,"bundle-tmp"),r=Ha(l),d=f.join(t,`${r}.ts`),E=f.join(t,"out",r);j.mkdirSync(t,{recursive:!0}),j.mkdirSync(E,{recursive:!0});let C=f.dirname(n),_=new Set,z=/^[ \t]*(export\s+)?(?:const|let|var)\s+(?:\{([^}]+)\}|(\w+))/gm,A=/^[ \t]*(export\s+)?(?:async\s+)?function\s+(\w+)/gm,B=s(e),{depths:N,balanced:O}=we(B),D=(S)=>!O||N[S]===0,b;while((b=z.exec(B))!==null){if(b[1])continue;if(!D(b.index))continue;if(b[2])b[2].split(",").forEach((S)=>{let h=be(S);if(h)_.add(h)});else if(b[3])_.add(b[3])}while((b=A.exec(B))!==null){if(b[1])continue;if(!D(b.index))continue;_.add(b[2])}let se=/^[ \t]*import[ \t]+(?!type\b)(?:(\w+)\s*(?:,\s*)?)?(?:\*\s+as\s+(\w+)|\{([^}]+)\})?\s+from\b/gm;while((b=se.exec(B))!==null){if(!D(b.index))continue;let S=/^\s*['"]([^'"]+)['"]/.exec(e.slice(b.index+b[0].length))?.[1];if(S&&H.some((h)=>h.test(S)))continue;if(b[1])_.add(b[1]);if(b[2])_.add(b[2]);for(let h of(b[3]??"").split(",")){let y=h.trim();if(!y||/^type\s/.test(y))continue;let U=/\bas\s+(\w+)\s*$/.exec(y)?.[1]??/^\w+$/.exec(y)?.[0];if(U)_.add(U)}}for(let S of B.matchAll(/\bexport\s*\{([^}]+)\}/g))for(let h of S[1].split(",")){let y=/\bas\s+(\w+)\s*$/.exec(h)?.[1]??/^\s*(\w+)\s*$/.exec(h)?.[1];if(y)_.delete(y)}let oe=_.size>0?`
3
3
  export { ${[..._].join(", ")} }`:"";await Bun.write(d,e+oe),I("bundling:",l,"from:",f.basename(n));let Y=new Set,Q=new Map;try{let S=await Bun.build({entrypoints:[d],outdir:E,target:"browser",format:"esm",minify:g,plugins:[he(c,C,d,Y,p,Q,i.serverApi)],define:{"process.env.NODE_ENV":g?'"production"':'"development"',...w()},root:c});if(!S.success){let F=S.logs.filter((T)=>T.level==="error").map((T)=>T.message).join(", ")||`Unable to bundle ${f.basename(n)}`,k=Zt(S.logs,n||void 0);if(console.warn("[stx:bundler] build failed:",F),No(n||"",F,k),i.throwOnFailure||Lo()==="error")throw Error(F);return e}let h="";for(let x of S.outputs){h=await x.text();break}let y=[];for(let x of h.matchAll(/^\s*export\s*\{([^}]*)\}\s*;?\s*$/gm))for(let F of x[1].split(",")){let k=F.trim().match(/^([A-Za-z_$][\w$]*)\s+as\s+([A-Za-z_$][\w$]*)$/);if(k){y.push([k[2],k[1]]);continue}let T=F.trim();if(/^[A-Za-z_$][\w$]*$/.test(T))y.push([T,T])}if(i.expose){let x=new Set(i.expose);for(let F=y.length-1;F>=0;F--)if(!x.has(y[F][0]))y.splice(F,1)}let U=[];h=Fa(Ba(h,Q),U);let le=h.match(/^\s*import\s+[^;]+;?\s*$/gm)||[];h=h.replace(/^\s*import\s+[^;]+;?\s*$/gm,"").replace(/^\s*export\s*\{[^}]*\}\s*;?\s*$/gm,"").replace(/^\s*export\s+default\s+.*$/gm,"").trim();let K=`__stxBundle_${l}`,ce=y.map(([x,F])=>`${JSON.stringify(x)}: ${F}`).join(", "),ue=y.map(([x])=>`var ${x} = undefined;`).join(`
4
4
  `),de=y.map(([x])=>`${x} = ${K}[${JSON.stringify(x)}];`).join(`
5
5
  `);if(h=`${le.join(`
@@ -12,4 +12,4 @@ ${h}
12
12
  return { ${ce} };
13
13
  })();
14
14
  ${de}`.trim(),I("bundled:",l,"output:",h.length,"bytes"),_.size>0&&y.length===0)return console.warn(`[stx:bundler] dropped every binding for ${f.basename(n)} (${l}); serving the unbundled source and not caching this result`),e;j.mkdirSync(u,{recursive:!0}),await Bun.write(v,h);let J=Array.from(Y).map((x)=>{try{return{path:x,mtimeMs:j.statSync(x).mtimeMs}}catch{return null}}).filter((x)=>x!==null);return await Bun.write(M,JSON.stringify({metadataVersion:ne,files:J})),X(n,J.map((x)=>x.path)),i.collectInputs?.push(...J.map((x)=>x.path)),L.set(v,{code:h,files:J}),await me(u),h}catch(S){let h=Zt(S,n||void 0),y=ae(S,n||void 0);if(console.warn(`[stx:bundler] error: ${y}`),No(n||"",y,h),i.throwOnFailure||Lo()==="error")throw S;return e}finally{try{j.rmSync(d,{force:!0}),j.rmSync(E,{recursive:!0,force:!0})}catch{}}}function be(e){let n=e.trim();if(!n)return null;let i=n.indexOf("=");if(i!==-1)n=n.slice(0,i).trim();let c=n.indexOf(":");if(c!==-1)n=n.slice(c+1).trim();if(n.startsWith("..."))n=n.slice(3).trim();return/^[A-Za-z_$][\w$]*$/.test(n)?n:null}
15
- export{ie,La,No,gt,mt,bu,Lo,ht,Yt,ja,Ba,Fa,za,yt,Ha};
15
+ export{ie,La,No,gt,mt,bd,Lo,ht,Yt,ja,Ba,Fa,za,yt,Ha};
@@ -0,0 +1,2 @@
1
+ // @bun
2
+ import{rn,oc,os}from"./chunk-xts31rkc.js";import"./chunk-594tt40e.js";import"./chunk-wkc34drs.js";import"./chunk-j4afmryj.js";import"./chunk-xc27xdm6.js";import"./chunk-scvzv5y2.js";import"./chunk-yd7g02v5.js";import"./chunk-gskjzw5r.js";import{xe}from"./chunk-ab7vh24b.js";import"./chunk-pf0d8y9n.js";import"./chunk-01nx6zcw.js";import"./chunk-mx446wgp.js";import"./chunk-pcq6vphz.js";export{xe as freeIdentifiers,os as processComponents,oc as processESImports,rn as rendersAsElement};
@@ -0,0 +1,2 @@
1
+ // @bun
2
+ import{ed,bo,Ta,td,nd,rd,sd,od,Ra,Aa,id,ad,cd,ld}from"./chunk-3jjevm1j.js";import"./chunk-xts31rkc.js";import"./chunk-594tt40e.js";import"./chunk-wkc34drs.js";import"./chunk-j4afmryj.js";import"./chunk-xc27xdm6.js";import"./chunk-scvzv5y2.js";import"./chunk-yd7g02v5.js";import"./chunk-gskjzw5r.js";import"./chunk-ab7vh24b.js";import"./chunk-pf0d8y9n.js";import"./chunk-01nx6zcw.js";import"./chunk-mx446wgp.js";import"./chunk-pcq6vphz.js";export{Ta as SUSPENSE_RESOLVER_RUNTIME,bo as buildSuspenseResolveScript,od as createStreamRenderer,rd as extractStreamBoundaries,ld as generateHydrationRuntime,Aa as islandDirective,ad as processSectionDirectives,nd as processStreamDirectives,id as registerStreamingDirectives,td as renderStreamingPage,ed as streamTemplate,sd as streamTemplateSimple,cd as streamToResponse,Ra as streamingSuspenseDirective};
@@ -0,0 +1,2 @@
1
+ // @bun
2
+ import{ko,Co,$o,hd}from"./chunk-y42ge4xh.js";import"./chunk-r7m8dh2g.js";import"./chunk-xts31rkc.js";import"./chunk-594tt40e.js";import"./chunk-wkc34drs.js";import"./chunk-j4afmryj.js";import"./chunk-xc27xdm6.js";import"./chunk-scvzv5y2.js";import"./chunk-yd7g02v5.js";import"./chunk-gskjzw5r.js";import"./chunk-ab7vh24b.js";import"./chunk-pf0d8y9n.js";import"./chunk-01nx6zcw.js";import"./chunk-mx446wgp.js";import"./chunk-pcq6vphz.js";export{ko as buildNative,hd as default,$o as getAvailableFormats,Co as getAvailableTargets};
@@ -0,0 +1,2 @@
1
+ // @bun
2
+ import{mo,ho,la,da,ua,pa,Sl}from"./chunk-168dqya1.js";export{mo as createVirtualList,Sl as default,la as generateVirtualListCSS,ua as processInfiniteListDirectives,pa as processVirtualGridDirectives,ho as processVirtualListDirectives,da as useVirtualList};
@@ -1,5 +1,5 @@
1
1
  // @bun
2
2
  import{t,i,fn,Is,xe,l}from"./chunk-ab7vh24b.js";function S(e,n,r,o=0){let a=0,s=o,u=null,c=0,p=!1;while(s<e.length){let h=e[s];if(u&&p){p=!1,s++;continue}if(u&&h==="\\"){p=!0,s++;continue}if(p=!1,(h==='"'||h==="'"||h==="`")&&!u){u=h,s++;continue}if(h===u&&u!=="`"){u=null,s++;continue}if(u==="`"&&h==="$"&&e[s+1]==="{"){c++,s+=2;continue}if(c>0&&h==="}"){c--,s++;continue}if(h==="`"&&u==="`"&&c===0){u=null,s++;continue}if(u){s++;continue}if(h===n)a++;else if(h===r){if(a--,a===0)return s}s++}return-1}import T from"path";function Ts(e,n){let r=[];n.lastIndex=0;let o;while((o=n.exec(e))!==null){let a=o.index,s=a+o[0].length-1,u=S(e,"(",")",s);if(u===-1){r.push({start:a,end:-1,args:"",call:e.slice(a,Math.min(e.length,a+80))}),n.lastIndex=s+1;continue}r.push({start:a,end:u+1,args:e.slice(s+1,u),call:e.slice(a,u+1)}),n.lastIndex=u+1}return r}function Xe(e,n,r,o){let a="",s=0;for(let u of Ts(e,n)){if(a+=e.slice(s,u.start),u.end===-1){a+=o(u.call),s=u.start;continue}a+=r(u.args,u.call),s=u.end}return a+e.slice(s)}function Ge(e){let n=[],r=0,o=null,a="";for(let s=0;s<e.length;s++){let u=e[s];if(o){if(a+=u,u==="\\"&&s+1<e.length){a+=e[++s];continue}if(u===o)o=null;continue}if(u==="'"||u==='"'||u==="`")o=u;else if(u==="("||u==="["||u==="{")r++;else if(u===")"||u==="]"||u==="}")r--;else if(u===","&&r===0){n.push(a.trim()),a="";continue}a+=u}if(a.trim())n.push(a.trim());return n}function y(e){let n=e.trim(),r=n[0];if(r!=="'"&&r!=='"'&&r!=="`"||n.length<2||n.at(-1)!==r)return null;let o="";for(let a=1;a<n.length-1;a++){let s=n[a];if(s==="\\"&&a+1<n.length-1){let u=n[++a];o+=u==="n"?`
3
- `:u==="t"?"\t":u;continue}if(s===r)return null;if(r==="`"&&s==="$"&&n[a+1]==="{")return null;o+=s}return o}var R=new Set(["true","false","null","undefined","typeof","void","new","in","of","instanceof","this","delete","await","async","function","return","NaN","Infinity"]);function Je(e,n){let r=e.trim();if(!r)return{ok:!1,message:"the argument is empty",code:t.INVALID_DIRECTIVE_SYNTAX};let o=fn(r);if(o)return{ok:!1,message:`the expression is not allowed (${o})`,code:t.UNSAFE_EXPRESSION};let a=Is(n),s;try{s=l(r,Object.keys(a))(...Object.values(a))}catch(c){return{ok:!1,message:`the expression could not be evaluated: ${c instanceof Error?c.message:String(c)}`,code:t.EVALUATION_ERROR}}if(s!==void 0&&s!==null)return{ok:!0,value:s};let u=[...new Set(xe(r))].filter((c)=>!R.has(c)&&!(c in a)&&!(c in globalThis));if(u.length>0)return{ok:!1,message:`${u.map((p)=>`"${p}"`).join(", ")} ${u.length===1?"is":"are"} not defined here. Values a directive reads must come from <script server> or the render context; a plain <script> runs in the browser. To pass literal text, quote it.`,code:t.UNDEFINED_VARIABLE};if(s===void 0&&(r.startsWith("{")||r.startsWith("[")))return{ok:!1,message:"the expression threw while it was evaluated",code:t.EVALUATION_ERROR};return{ok:!0,value:s}}function de(e){if(e===null)return"null";if(Array.isArray(e))return"an array";if(typeof e==="object")return"an object";if(typeof e==="string")return`a string ("${e.length>40?`${e.slice(0,40)}...`:e}")`;return`${/^[aeiou]/.test(typeof e)?"an":"a"} ${typeof e}`}function ve(e){return typeof e==="object"&&e!==null&&!Array.isArray(e)}function v(e){if(!e)return"";return T.isAbsolute(e)?T.relative(process.cwd(),e)||e:e}function f(e){let n=e.replace(/\s+/g," ").trim();return n.length>80?`${n.slice(0,77)}...`:n}function E(e,n,r,o,a=t.EVALUATION_ERROR){let s=o?` in ${v(o)}`:"";return console.warn(`[stx] ${f(n)}${s}: ${r}`),i(e,`${f(n)}: ${r}`,a)}function tr(e,n,r){let o=r?` in ${v(r)}`:"";console.warn(`[stx] ${f(e)}${o}: ${n}`)}var x=["og:","article:","book:","profile:","fb:","music:","video:"],I=/^[a-z][\w-]*(?::[\w:-]+)?$/i;function un(e,n){if(e.length<1)return{kind:"error",message:"meta directive requires at least the meta name",code:t.INVALID_DIRECTIVE_SYNTAX};if(e.length>2)return{kind:"error",message:`@meta takes a name and a value, got ${e.length} arguments`,code:t.INVALID_DIRECTIVE_SYNTAX};let r=_(e[0],n);if(typeof r!=="string")return r;let o;if(e.length===2){let s=C(e[1],n);if(typeof s!=="string")return s;o=s}else{let s=r.includes(":")?r.slice(r.indexOf(":")+1):r,u=n.openGraph,c=n[s]??(ve(u)?u[s]:void 0);o=c===void 0||c===null||typeof c==="object"?"":String(c)}if(!o)return{kind:"empty"};return{kind:"tag",tag:x.some((s)=>r.startsWith(s))?{property:r,content:o}:{name:r,content:o}}}function _(e,n){let r=y(e);if(r!==null)return r.trim()?r:{kind:"error",message:"the meta name is empty",code:t.INVALID_DIRECTIVE_SYNTAX};if(I.test(e.trim()))return e.trim();let o=Je(e,n);if(!o.ok)return{kind:"error",message:`meta name: ${o.message}`,code:o.code};if(typeof o.value!=="string"||!o.value.trim())return{kind:"error",message:`the meta name must be a non-empty string, got ${de(o.value)}`,code:t.TYPE_ERROR};return o.value}function C(e,n){let r=y(e);if(r!==null)return r;let o=Je(e,n);if(!o.ok)return{kind:"error",message:o.message,code:o.code};let a=o.value;if(a===void 0||a===null||a===!1)return"";if(Array.isArray(a))return a.filter((s)=>s!==void 0&&s!==null&&s!=="").map(String).join(", ");if(typeof a==="object"&&!(a instanceof Date))return{kind:"error",message:`the content must be text, got ${de(a)}`,code:t.TYPE_ERROR};return String(a)}var dn=["title","lang","meta","link","script","headRaw","htmlAttrs","bodyClass","bodyAttrs"],nr=["title","titleTemplate","base","meta","link","script","style","htmlAttrs","bodyAttrs"],w={links:"link",metas:"meta",scripts:"script",styles:"style"},b=new Set,A=new WeakMap;function k(e){if(b.has(e))return;b.add(e),console.warn(e)}function N(e,n){let r=Array.from({length:n.length+1},(o,a)=>a);for(let o=1;o<=e.length;o++){let a=r[0];r[0]=o;for(let s=1;s<=n.length;s++){let u=r[s];r[s]=Math.min(r[s]+1,r[s-1]+1,a+(e[o-1]===n[s-1]?0:1)),a=u}}return r[n.length]}function M(e,n){let r=e.toLowerCase(),o=n.find((p)=>p.toLowerCase()===r);if(o)return o;let a=w[r];if(a&&n.includes(a))return a;let s,u=1/0;for(let p of n){let h=N(r,p.toLowerCase());if(h<u)s=p,u=h}let c=Math.min(e.length,s?.length??0)<=4?1:2;return u<=c?s:void 0}function pe(e,n){if(!e||typeof e!=="object"||Array.isArray(e))return e||{};let r=A.get(e);if(r)return r;let{known:o,source:a}=n,s=e;for(let u of Object.keys(e)){if(o.includes(u))continue;let c=w[u];if(c&&o.includes(c)&&Array.isArray(e[u])){if(s===e)s={...e};let h=Array.isArray(s[c])?s[c]:[];s[c]=[...h,...e[u]],delete s[u],k(`[stx] ${a}.${u} is not a head key; reading it as ${a}.${c}. Rename it to \`${c}\`.`);continue}if(/^styles?$/.test(u)&&!o.includes("style")){k(`[stx] ${a}.${u} is not a head key and is ignored. Use \`link\` with rel: 'stylesheet', or \`headRaw\` for an inline <style>.`);continue}let p=M(u,o);k(p?`[stx] ${a}.${u} is not a head key and is ignored. Did you mean \`${p}\`?`:`[stx] ${a}.${u} is not a head key and is ignored. Known keys: ${o.join(", ")}.`)}return A.set(e,s),s}var d={},D=[],g={};function Rs(){return d}function Gu(){return g}function Ju(){d={},D.length=0,g={}}function xi(e){d=fe(d,pe(e,{known:nr,source:"useHead()"}))}function fe(e,n){return{title:n.title??e.title,titleTemplate:n.titleTemplate??e.titleTemplate,base:n.base??e.base,meta:[...e.meta||[],...n.meta||[]],link:[...e.link||[],...n.link||[]],script:[...e.script||[],...n.script||[]],style:[...e.style||[],...n.style||[]],htmlAttrs:{...e.htmlAttrs,...n.htmlAttrs},bodyAttrs:{...e.bodyAttrs,...n.bodyAttrs}}}function Rc(e){xi(rr(e))}function rr(e){let n=[];if(e.description)n.push({name:"description",content:e.description});if(e.keywords){let p=Array.isArray(e.keywords)?e.keywords.join(", "):e.keywords;n.push({name:"keywords",content:p})}if(e.author)n.push({name:"author",content:e.author});if(e.robots)n.push({name:"robots",content:e.robots});let r=e.ogTitle??e.title,o=e.ogDescription??e.description;if(r)n.push({property:"og:title",content:r});if(o)n.push({property:"og:description",content:o});if(e.ogImage){if(n.push({property:"og:image",content:e.ogImage}),e.ogImageType)n.push({property:"og:image:type",content:e.ogImageType});if(e.ogImageWidth)n.push({property:"og:image:width",content:String(e.ogImageWidth)});if(e.ogImageHeight)n.push({property:"og:image:height",content:String(e.ogImageHeight)});if(e.ogImageAlt)n.push({property:"og:image:alt",content:e.ogImageAlt})}if(e.ogUrl)n.push({property:"og:url",content:e.ogUrl});if(e.ogType)n.push({property:"og:type",content:e.ogType});if(e.ogSiteName)n.push({property:"og:site_name",content:e.ogSiteName});if(e.ogLocale)n.push({property:"og:locale",content:e.ogLocale});if(e.profileFirstName)n.push({property:"profile:first_name",content:e.profileFirstName});if(e.profileLastName)n.push({property:"profile:last_name",content:e.profileLastName});if(e.profileUsername)n.push({property:"profile:username",content:e.profileUsername});let a=e.twitterTitle??e.title,s=e.twitterDescription??e.description,u=e.twitterImage??e.ogImage;if(e.twitterCard)n.push({name:"twitter:card",content:e.twitterCard});if(a)n.push({name:"twitter:title",content:a});if(s)n.push({name:"twitter:description",content:s});if(u){n.push({name:"twitter:image",content:u});let p=e.twitterImageAlt??(e.twitterImage?void 0:e.ogImageAlt);if(p)n.push({name:"twitter:image:alt",content:p})}if(e.twitterSite)n.push({name:"twitter:site",content:e.twitterSite});if(e.twitterCreator)n.push({name:"twitter:creator",content:e.twitterCreator});if(e.articleAuthor)n.push({property:"article:author",content:e.articleAuthor});if(e.articlePublishedTime)n.push({property:"article:published_time",content:e.articlePublishedTime});if(e.articleModifiedTime)n.push({property:"article:modified_time",content:e.articleModifiedTime});if(e.articleSection)n.push({property:"article:section",content:e.articleSection});if(e.articleTags)for(let p of e.articleTags)n.push({property:"article:tag",content:p});let c=[];if(e.canonical)c.push({rel:"canonical",href:e.canonical});return{title:e.title,titleTemplate:e.titleTemplate,meta:n,link:c}}function Yu(e){if(g={...g,...e},e.title||e.description)Rc({title:e.title,description:e.description})}function Zu(e){let n=typeof e==="function"?e():e;xi({title:n})}function Qu(e=d){let n=[];if(e.title){let r=e.title;if(e.titleTemplate)r=typeof e.titleTemplate==="function"?e.titleTemplate(r):e.titleTemplate.replace("%s",r);n.push(`<title>${m(r)}</title>`)}if(e.base){let r=Object.entries(e.base).map(([o,a])=>`${o}="${m(a)}"`).join(" ");n.push(`<base ${r}>`)}for(let r of e.meta||[]){let o=Object.entries(r).filter(([a,s])=>s!==void 0).map(([a,s])=>`${a==="httpEquiv"?"http-equiv":a}="${m(String(s))}"`).join(" ");n.push(`<meta ${o}>`)}for(let r of e.link||[]){let o=Object.entries(r).filter(([a,s])=>s!==void 0).map(([a,s])=>`${a}="${m(String(s))}"`).join(" ");n.push(`<link ${o}>`)}for(let r of e.script||[]){let{content:o,...a}=r,s=Object.entries(a).filter(([u,c])=>c!==void 0).map(([u,c])=>{if(typeof c==="boolean")return c?u:"";return`${u}="${m(String(c))}"`}).filter(Boolean).join(" ");if(o)n.push(`<script ${s}>${o}</script>`);else n.push(`<script ${s}></script>`)}for(let r of e.style||[]){let o=r.type?` type="${r.type}"`:"";n.push(`<style${o}>${r.content}</style>`)}return n.join(`
4
- `)}function ed(e=d){if(!e.htmlAttrs)return"";return Object.entries(e.htmlAttrs).map(([n,r])=>`${n}="${m(r)}"`).join(" ")}function td(e=d){if(!e.bodyAttrs)return"";return Object.entries(e.bodyAttrs).map(([n,r])=>`${n}="${m(r)}"`).join(" ")}function m(e){return e.replace(/&/g,"&amp;").replace(/</g,"&lt;").replace(/>/g,"&gt;").replace(/"/g,"&quot;").replace(/'/g,"&#039;")}function nd(e=d){if(typeof document>"u")return;if(e.title){let n=e.title;if(e.titleTemplate)n=typeof e.titleTemplate==="function"?e.titleTemplate(n):e.titleTemplate.replace("%s",n);document.title=n}for(let n of e.meta||[]){let r=n.name?`meta[name="${n.name}"]`:n.property?`meta[property="${n.property}"]`:null;if(r){let o=document.querySelector(r);if(!o){if(o=document.createElement("meta"),n.name)o.setAttribute("name",n.name);if(n.property)o.setAttribute("property",n.property);document.head.appendChild(o)}o.setAttribute("content",n.content)}}for(let n of e.link||[]){let r=`link[rel="${n.rel}"]${n.href?`[href="${n.href}"]`:""}`,o=document.querySelector(r);if(!o)o=document.createElement("link"),document.head.appendChild(o);for(let[a,s]of Object.entries(n))if(s!==void 0)o.setAttribute(a,String(s))}if(e.htmlAttrs)for(let[n,r]of Object.entries(e.htmlAttrs))if(n==="class")for(let o of String(r).split(/\s+/).filter(Boolean))document.documentElement.classList.add(o);else document.documentElement.setAttribute(n,r);if(e.bodyAttrs)for(let[n,r]of Object.entries(e.bodyAttrs))document.body.setAttribute(n,r)}function rd(e){let n="";return{content:e.replace(/@head\s*([\s\S]*?)@endhead/g,(o,a)=>(n+=a.trim()+`
5
- `,"")),headContent:n.trim()}}function sd(e,n){return e.replace(/@title\s*\(\s*(?:(['"`])(.+?)\1|([^)]+))\s*\)/g,(r,o,a,s)=>{let u=o?a:n[(s||"").trim()]??s,c=n.__stx_runtime_head??{};return n.__stx_runtime_head=fe(c,{title:u}),""})}function od(e,n,r=""){if(!e.includes("@meta"))return e;return Xe(e,/(?<![\w$@])@meta\s*\(/g,(o,a)=>{let s=un(Ge(o),n);if(s.kind==="error")return E("Meta",a,s.message,r,s.code);if(s.kind==="tag"){let u=n.__stx_runtime_head??{};n.__stx_runtime_head=fe(u,{meta:[s.tag]})}return""},(o)=>E("Meta",o,"the call has no closing parenthesis",r,t.INVALID_DIRECTIVE_SYNTAX))}export{S,Ts,Xe,Ge,Je,de,ve,E,tr,un,dn,nr,pe,Rs,Gu,Ju,xi,fe,Rc,rr,Yu,Zu,Qu,ed,td,nd,rd,sd,od};
3
+ `:u==="t"?"\t":u;continue}if(s===r)return null;if(r==="`"&&s==="$"&&n[a+1]==="{")return null;o+=s}return o}var R=new Set(["true","false","null","undefined","typeof","void","new","in","of","instanceof","this","delete","await","async","function","return","NaN","Infinity"]);function Je(e,n){let r=e.trim();if(!r)return{ok:!1,message:"the argument is empty",code:t.INVALID_DIRECTIVE_SYNTAX};let o=fn(r);if(o)return{ok:!1,message:`the expression is not allowed (${o})`,code:t.UNSAFE_EXPRESSION};let a=Is(n),s;try{s=l(r,Object.keys(a))(...Object.values(a))}catch(c){return{ok:!1,message:`the expression could not be evaluated: ${c instanceof Error?c.message:String(c)}`,code:t.EVALUATION_ERROR}}if(s!==void 0&&s!==null)return{ok:!0,value:s};let u=[...new Set(xe(r))].filter((c)=>!R.has(c)&&!(c in a)&&!(c in globalThis));if(u.length>0)return{ok:!1,message:`${u.map((p)=>`"${p}"`).join(", ")} ${u.length===1?"is":"are"} not defined here. Values a directive reads must come from <script server> or the render context; a plain <script> runs in the browser. To pass literal text, quote it.`,code:t.UNDEFINED_VARIABLE};if(s===void 0&&(r.startsWith("{")||r.startsWith("[")))return{ok:!1,message:"the expression threw while it was evaluated",code:t.EVALUATION_ERROR};return{ok:!0,value:s}}function ue(e){if(e===null)return"null";if(Array.isArray(e))return"an array";if(typeof e==="object")return"an object";if(typeof e==="string")return`a string ("${e.length>40?`${e.slice(0,40)}...`:e}")`;return`${/^[aeiou]/.test(typeof e)?"an":"a"} ${typeof e}`}function ve(e){return typeof e==="object"&&e!==null&&!Array.isArray(e)}function v(e){if(!e)return"";return T.isAbsolute(e)?T.relative(process.cwd(),e)||e:e}function f(e){let n=e.replace(/\s+/g," ").trim();return n.length>80?`${n.slice(0,77)}...`:n}function E(e,n,r,o,a=t.EVALUATION_ERROR){let s=o?` in ${v(o)}`:"";return console.warn(`[stx] ${f(n)}${s}: ${r}`),i(e,`${f(n)}: ${r}`,a)}function tr(e,n,r){let o=r?` in ${v(r)}`:"";console.warn(`[stx] ${f(e)}${o}: ${n}`)}var x=["og:","article:","book:","profile:","fb:","music:","video:"],I=/^[a-z][\w-]*(?::[\w:-]+)?$/i;function dn(e,n){if(e.length<1)return{kind:"error",message:"meta directive requires at least the meta name",code:t.INVALID_DIRECTIVE_SYNTAX};if(e.length>2)return{kind:"error",message:`@meta takes a name and a value, got ${e.length} arguments`,code:t.INVALID_DIRECTIVE_SYNTAX};let r=_(e[0],n);if(typeof r!=="string")return r;let o;if(e.length===2){let s=C(e[1],n);if(typeof s!=="string")return s;o=s}else{let s=r.includes(":")?r.slice(r.indexOf(":")+1):r,u=n.openGraph,c=n[s]??(ve(u)?u[s]:void 0);o=c===void 0||c===null||typeof c==="object"?"":String(c)}if(!o)return{kind:"empty"};return{kind:"tag",tag:x.some((s)=>r.startsWith(s))?{property:r,content:o}:{name:r,content:o}}}function _(e,n){let r=y(e);if(r!==null)return r.trim()?r:{kind:"error",message:"the meta name is empty",code:t.INVALID_DIRECTIVE_SYNTAX};if(I.test(e.trim()))return e.trim();let o=Je(e,n);if(!o.ok)return{kind:"error",message:`meta name: ${o.message}`,code:o.code};if(typeof o.value!=="string"||!o.value.trim())return{kind:"error",message:`the meta name must be a non-empty string, got ${ue(o.value)}`,code:t.TYPE_ERROR};return o.value}function C(e,n){let r=y(e);if(r!==null)return r;let o=Je(e,n);if(!o.ok)return{kind:"error",message:o.message,code:o.code};let a=o.value;if(a===void 0||a===null||a===!1)return"";if(Array.isArray(a))return a.filter((s)=>s!==void 0&&s!==null&&s!=="").map(String).join(", ");if(typeof a==="object"&&!(a instanceof Date))return{kind:"error",message:`the content must be text, got ${ue(a)}`,code:t.TYPE_ERROR};return String(a)}var un=["title","lang","meta","link","script","headRaw","htmlAttrs","bodyClass","bodyAttrs"],nr=["title","titleTemplate","base","meta","link","script","style","htmlAttrs","bodyAttrs"],w={links:"link",metas:"meta",scripts:"script",styles:"style"},b=new Set,A=new WeakMap;function k(e){if(b.has(e))return;b.add(e),console.warn(e)}function N(e,n){let r=Array.from({length:n.length+1},(o,a)=>a);for(let o=1;o<=e.length;o++){let a=r[0];r[0]=o;for(let s=1;s<=n.length;s++){let u=r[s];r[s]=Math.min(r[s]+1,r[s-1]+1,a+(e[o-1]===n[s-1]?0:1)),a=u}}return r[n.length]}function M(e,n){let r=e.toLowerCase(),o=n.find((p)=>p.toLowerCase()===r);if(o)return o;let a=w[r];if(a&&n.includes(a))return a;let s,u=1/0;for(let p of n){let h=N(r,p.toLowerCase());if(h<u)s=p,u=h}let c=Math.min(e.length,s?.length??0)<=4?1:2;return u<=c?s:void 0}function pe(e,n){if(!e||typeof e!=="object"||Array.isArray(e))return e||{};let r=A.get(e);if(r)return r;let{known:o,source:a}=n,s=e;for(let u of Object.keys(e)){if(o.includes(u))continue;let c=w[u];if(c&&o.includes(c)&&Array.isArray(e[u])){if(s===e)s={...e};let h=Array.isArray(s[c])?s[c]:[];s[c]=[...h,...e[u]],delete s[u],k(`[stx] ${a}.${u} is not a head key; reading it as ${a}.${c}. Rename it to \`${c}\`.`);continue}if(/^styles?$/.test(u)&&!o.includes("style")){k(`[stx] ${a}.${u} is not a head key and is ignored. Use \`link\` with rel: 'stylesheet', or \`headRaw\` for an inline <style>.`);continue}let p=M(u,o);k(p?`[stx] ${a}.${u} is not a head key and is ignored. Did you mean \`${p}\`?`:`[stx] ${a}.${u} is not a head key and is ignored. Known keys: ${o.join(", ")}.`)}return A.set(e,s),s}var d={},D=[],g={};function Rs(){return d}function Gd(){return g}function Jd(){d={},D.length=0,g={}}function xi(e){d=fe(d,pe(e,{known:nr,source:"useHead()"}))}function fe(e,n){return{title:n.title??e.title,titleTemplate:n.titleTemplate??e.titleTemplate,base:n.base??e.base,meta:[...e.meta||[],...n.meta||[]],link:[...e.link||[],...n.link||[]],script:[...e.script||[],...n.script||[]],style:[...e.style||[],...n.style||[]],htmlAttrs:{...e.htmlAttrs,...n.htmlAttrs},bodyAttrs:{...e.bodyAttrs,...n.bodyAttrs}}}function Rc(e){xi(rr(e))}function rr(e){let n=[];if(e.description)n.push({name:"description",content:e.description});if(e.keywords){let p=Array.isArray(e.keywords)?e.keywords.join(", "):e.keywords;n.push({name:"keywords",content:p})}if(e.author)n.push({name:"author",content:e.author});if(e.robots)n.push({name:"robots",content:e.robots});let r=e.ogTitle??e.title,o=e.ogDescription??e.description;if(r)n.push({property:"og:title",content:r});if(o)n.push({property:"og:description",content:o});if(e.ogImage){if(n.push({property:"og:image",content:e.ogImage}),e.ogImageType)n.push({property:"og:image:type",content:e.ogImageType});if(e.ogImageWidth)n.push({property:"og:image:width",content:String(e.ogImageWidth)});if(e.ogImageHeight)n.push({property:"og:image:height",content:String(e.ogImageHeight)});if(e.ogImageAlt)n.push({property:"og:image:alt",content:e.ogImageAlt})}if(e.ogUrl)n.push({property:"og:url",content:e.ogUrl});if(e.ogType)n.push({property:"og:type",content:e.ogType});if(e.ogSiteName)n.push({property:"og:site_name",content:e.ogSiteName});if(e.ogLocale)n.push({property:"og:locale",content:e.ogLocale});if(e.profileFirstName)n.push({property:"profile:first_name",content:e.profileFirstName});if(e.profileLastName)n.push({property:"profile:last_name",content:e.profileLastName});if(e.profileUsername)n.push({property:"profile:username",content:e.profileUsername});let a=e.twitterTitle??e.title,s=e.twitterDescription??e.description,u=e.twitterImage??e.ogImage;if(e.twitterCard)n.push({name:"twitter:card",content:e.twitterCard});if(a)n.push({name:"twitter:title",content:a});if(s)n.push({name:"twitter:description",content:s});if(u){n.push({name:"twitter:image",content:u});let p=e.twitterImageAlt??(e.twitterImage?void 0:e.ogImageAlt);if(p)n.push({name:"twitter:image:alt",content:p})}if(e.twitterSite)n.push({name:"twitter:site",content:e.twitterSite});if(e.twitterCreator)n.push({name:"twitter:creator",content:e.twitterCreator});if(e.articleAuthor)n.push({property:"article:author",content:e.articleAuthor});if(e.articlePublishedTime)n.push({property:"article:published_time",content:e.articlePublishedTime});if(e.articleModifiedTime)n.push({property:"article:modified_time",content:e.articleModifiedTime});if(e.articleSection)n.push({property:"article:section",content:e.articleSection});if(e.articleTags)for(let p of e.articleTags)n.push({property:"article:tag",content:p});let c=[];if(e.canonical)c.push({rel:"canonical",href:e.canonical});return{title:e.title,titleTemplate:e.titleTemplate,meta:n,link:c}}function Yd(e){if(g={...g,...e},e.title||e.description)Rc({title:e.title,description:e.description})}function Zd(e){let n=typeof e==="function"?e():e;xi({title:n})}function Qd(e=d){let n=[];if(e.title){let r=e.title;if(e.titleTemplate)r=typeof e.titleTemplate==="function"?e.titleTemplate(r):e.titleTemplate.replace("%s",r);n.push(`<title>${m(r)}</title>`)}if(e.base){let r=Object.entries(e.base).map(([o,a])=>`${o}="${m(a)}"`).join(" ");n.push(`<base ${r}>`)}for(let r of e.meta||[]){let o=Object.entries(r).filter(([a,s])=>s!==void 0).map(([a,s])=>`${a==="httpEquiv"?"http-equiv":a}="${m(String(s))}"`).join(" ");n.push(`<meta ${o}>`)}for(let r of e.link||[]){let o=Object.entries(r).filter(([a,s])=>s!==void 0).map(([a,s])=>`${a}="${m(String(s))}"`).join(" ");n.push(`<link ${o}>`)}for(let r of e.script||[]){let{content:o,...a}=r,s=Object.entries(a).filter(([u,c])=>c!==void 0).map(([u,c])=>{if(typeof c==="boolean")return c?u:"";return`${u}="${m(String(c))}"`}).filter(Boolean).join(" ");if(o)n.push(`<script ${s}>${o}</script>`);else n.push(`<script ${s}></script>`)}for(let r of e.style||[]){let o=r.type?` type="${r.type}"`:"";n.push(`<style${o}>${r.content}</style>`)}return n.join(`
4
+ `)}function eu(e=d){if(!e.htmlAttrs)return"";return Object.entries(e.htmlAttrs).map(([n,r])=>`${n}="${m(r)}"`).join(" ")}function tu(e=d){if(!e.bodyAttrs)return"";return Object.entries(e.bodyAttrs).map(([n,r])=>`${n}="${m(r)}"`).join(" ")}function m(e){return e.replace(/&/g,"&amp;").replace(/</g,"&lt;").replace(/>/g,"&gt;").replace(/"/g,"&quot;").replace(/'/g,"&#039;")}function nu(e=d){if(typeof document>"u")return;if(e.title){let n=e.title;if(e.titleTemplate)n=typeof e.titleTemplate==="function"?e.titleTemplate(n):e.titleTemplate.replace("%s",n);document.title=n}for(let n of e.meta||[]){let r=n.name?`meta[name="${n.name}"]`:n.property?`meta[property="${n.property}"]`:null;if(r){let o=document.querySelector(r);if(!o){if(o=document.createElement("meta"),n.name)o.setAttribute("name",n.name);if(n.property)o.setAttribute("property",n.property);document.head.appendChild(o)}o.setAttribute("content",n.content)}}for(let n of e.link||[]){let r=`link[rel="${n.rel}"]${n.href?`[href="${n.href}"]`:""}`,o=document.querySelector(r);if(!o)o=document.createElement("link"),document.head.appendChild(o);for(let[a,s]of Object.entries(n))if(s!==void 0)o.setAttribute(a,String(s))}if(e.htmlAttrs)for(let[n,r]of Object.entries(e.htmlAttrs))if(n==="class")for(let o of String(r).split(/\s+/).filter(Boolean))document.documentElement.classList.add(o);else document.documentElement.setAttribute(n,r);if(e.bodyAttrs)for(let[n,r]of Object.entries(e.bodyAttrs))document.body.setAttribute(n,r)}function ru(e){let n="";return{content:e.replace(/@head\s*([\s\S]*?)@endhead/g,(o,a)=>(n+=a.trim()+`
5
+ `,"")),headContent:n.trim()}}function su(e,n){return e.replace(/@title\s*\(\s*(?:(['"`])(.+?)\1|([^)]+))\s*\)/g,(r,o,a,s)=>{let u=o?a:n[(s||"").trim()]??s,c=n.__stx_runtime_head??{};return n.__stx_runtime_head=fe(c,{title:u}),""})}function ou(e,n,r=""){if(!e.includes("@meta"))return e;return Xe(e,/(?<![\w$@])@meta\s*\(/g,(o,a)=>{let s=dn(Ge(o),n);if(s.kind==="error")return E("Meta",a,s.message,r,s.code);if(s.kind==="tag"){let u=n.__stx_runtime_head??{};n.__stx_runtime_head=fe(u,{meta:[s.tag]})}return""},(o)=>E("Meta",o,"the call has no closing parenthesis",r,t.INVALID_DIRECTIVE_SYNTAX))}export{S,Ts,Xe,Ge,Je,ue,ve,E,tr,dn,un,nr,pe,Rs,Gd,Jd,xi,fe,Rc,rr,Yd,Zd,Qd,eu,tu,nu,ru,su,ou};
@@ -0,0 +1,2 @@
1
+ // @bun
2
+ import{Rs,Gd,Jd,xi,fe,Rc,rr,Yd,Zd,Qd,eu,tu,nu,ru,su,ou}from"./chunk-gskjzw5r.js";import"./chunk-ab7vh24b.js";export{nu as applyHead,Yd as definePageMeta,Rs as getHead,Gd as getPageMeta,fe as mergeHeadConfigs,ru as processHeadDirective,ou as processMetaDirective,su as processTitleDirective,tu as renderBodyAttrs,Qd as renderHead,eu as renderHtmlAttrs,Jd as resetHead,rr as seoMetaToHeadConfig,xi as useHead,Zd as usePageTitle,Rc as useSeoMeta,Zd as useTitle};
@@ -0,0 +1,2 @@
1
+ // @bun
2
+ import{I,_c,o,R,Hd,Vd}from"./chunk-xts31rkc.js";import"./chunk-594tt40e.js";import"./chunk-wkc34drs.js";import"./chunk-j4afmryj.js";import"./chunk-xc27xdm6.js";import"./chunk-scvzv5y2.js";import"./chunk-yd7g02v5.js";import"./chunk-gskjzw5r.js";import"./chunk-ab7vh24b.js";import"./chunk-pf0d8y9n.js";import"./chunk-01nx6zcw.js";import"./chunk-mx446wgp.js";import"./chunk-pcq6vphz.js";export{R as config,I as defaultConfig,Hd as defineStxConfig,o as loadStxConfig,_c as resolveStxDirectories,Vd as validateConfig};
@@ -1,4 +1,4 @@
1
1
  // @bun
2
2
  import a from"fs";function Pe(r){return o(r)}var g=1000,i=new Map;function Ut(){i.clear()}function o(r){return[...r].sort().map((n)=>{try{let t=a.statSync(n);return`${n}:${t.size}:${t.mtimeMs}`}catch{return`${n}:missing`}}).join(`
3
- `)}function dt(r,n,t){let e=r.get(n);return e!==void 0&&e.signature===t?e.value:void 0}function H(r,n,t,e){return r.set(n,{signature:t,value:e}),e}
4
- export{Pe,Ut,dt,H};
3
+ `)}function ut(r,n,t){let e=r.get(n);return e!==void 0&&e.signature===t?e.value:void 0}function H(r,n,t,e){return r.set(n,{signature:t,value:e}),e}
4
+ export{Pe,Ut,ut,H};
@@ -1,4 +1,4 @@
1
1
  // @bun
2
- import{Ie,Wt}from"./chunk-cwzkq9bs.js";import{ke}from"./chunk-x0mc2kv0.js";import{Fo,zo,f,St,Q,N,Vn,Un,Wn,n,I,o}from"./chunk-ss7wapbh.js";import{C}from"./chunk-99kt56fn.js";import{Ss}from"./chunk-8xcg2dqy.js";import{dn,pe}from"./chunk-tbef3yyk.js";import{wi}from"./chunk-j4afmryj.js";import{me,re,io,ao,It}from"./chunk-151d1av1.js";import{bt,Ur}from"./chunk-a0jyh65n.js";import{Dt}from"./chunk-7grtpdw5.js";import{pt,Gt,Jt}from"./chunk-5pjsc9zv.js";import{createHash as ee}from"crypto";function J(i){return ee("sha256").update(i).digest("hex").slice(0,8)}function U(i=!1){let l=i?Wt():Ie(),a=J(l);return{content:l,filename:`runtime.${a}.js`,hash:a}}function V(){let i=ke(),l=J(i);return{content:i,filename:`router.${l}.js`,hash:l}}import m from"fs";import c from"path";import q from"path";import{createHash as te}from"crypto";function se(i={}){let l=new Set;return{context:new Proxy(i,{get(r,e){if(e in r)return r[e];if(typeof e==="string"&&!e.startsWith("__"))l.add(e);return},has(r,e){if(e in r)return!0;if(typeof e==="string"&&!e.startsWith("__"))l.add(e);return!1}}),accessedKeys:l}}async function X(i,l,a={}){let r=q.resolve(i),e=await Bun.file(r).text(),S=te("sha256").update(e).digest("hex").slice(0,16);Fo();let _={};try{_=await o(a.configDir)}catch{}let y=[],d=/<script\b([^>]*)>([\s\S]*?)<\/script>/gi,g;while((g=d.exec(e))!==null){let R=g[1];if(/\bserver\b/.test(R))y.push(g[2])}let u=new Set(y.flatMap((R)=>Q(R))),{context:D}=se({__filename:r,__dirname:q.dirname(r),__stx_serverDeclared:u}),A=new Set,j={...I,..._,...a,buildMode:"compile",strict:!1},b=await n(e,D,r,j,A),w=me(b),P=zo();return{route:l,sourceFile:i,html:b,fragment:w,placeholders:P,hasServerScripts:y.length>0,serverScriptContent:y,dependencies:Array.from(A),contentHash:S,status:St(e),streamTemplates:D.__streamTemplates}}var ne=new Set([".DS_Store","Thumbs.db","desktop.ini",".gitkeep",".gitignore"]);function Z(i,l){let a=0,r=0;if(!m.existsSync(i))return{copied:a,bytes:r};m.mkdirSync(l,{recursive:!0});function e(S,_){let y=m.readdirSync(S,{withFileTypes:!0});for(let d of y){if(ne.has(d.name))continue;let g=c.join(S,d.name),u=c.join(_,d.name);if(d.isDirectory())m.mkdirSync(u,{recursive:!0}),e(g,u);else if(d.isFile()){if(m.existsSync(u))continue;m.copyFileSync(g,u),a++,r+=m.statSync(u).size}}}return e(i,l),{copied:a,bytes:r}}async function Zc(i={}){let l=Date.now(),a=c.resolve(i.root||process.cwd()),r=c.resolve(a,i.outputDir||".output");console.log("[stx build] Starting production build...");let e=await o(a),S=c.resolve(a,i.componentsDir??e.componentsDir??"components"),_=c.resolve(a,i.partialsDir??e.partialsDir??"partials"),y=c.resolve(a,i.layoutsDir??e.layoutsDir??"layouts"),d=i.publicDir??e.publicDir??"public",g=pe(e.app?.head,{known:dn,source:"app.head"}),u=e.app?.colorMode,D=e.router?.container||"main",A=i.routeRules??e.routeRules??{},j=Dt(A),b=i.serverApi??e.serverApi,w=typeof b==="object"?b:{};if(b)bt(a,w);if(e.runtimeConfig)C(e.runtimeConfig,{});if(m.existsSync(r))m.rmSync(r,{recursive:!0});let P=[c.join(r,"public","__stx"),c.join(r,"public","assets"),c.join(r,"server","pages"),c.join(r,"server","fragments")];for(let s of P)m.mkdirSync(s,{recursive:!0});console.log("[stx build] Discovering routes...");let R=N(a,{pagesDirs:e._layerPageDirs}),Y=["components","layouts","partials"],B=R.filter((s)=>!Y.some((h)=>s.pattern.startsWith(`/${h}/`)||s.pattern===`/${h}`));console.log(`[stx build] Found ${B.length} page routes (${R.length-B.length} non-page files excluded)`),console.log("[stx build] Generating shared assets...");let v=U(i.debug),x=V();await Bun.write(c.join(r,"public","__stx",v.filename),v.content),await Bun.write(c.join(r,"public","__stx",x.filename),x.content),console.log(`[stx build] Runtime: ${v.filename} (${(v.content.length/1024).toFixed(1)}KB)`),console.log(`[stx build] Router: ${x.filename} (${(x.content.length/1024).toFixed(1)}KB)`),console.log("[stx build] Compiling templates...");let M=[],k=[];for(let s of B){let h=j(s.pattern),O=h.rendering==="prerender";if(O&&(s.pattern.includes(":")||s.pattern.includes("[")))throw Error(`Cannot prerender parameter route ${s.pattern}; use dynamic rendering (explicit path enumeration is not supported here)`);try{let t=await X(s.filePath,s.pattern,{configDir:a,componentsDir:S,partialsDir:_,layoutsDir:y,debug:i.debug});if(M.push(t),t.html=t.html.replace(/runtime\.__STX_HASH__\.js/g,v.filename).replace(/router\.__STX_HASH__\.js/g,x.filename),t.html=Wn(t.html,g,{bodyScripts:[`<script src="/__stx/${x.filename}"></script>`],...u&&{colorMode:u}}),u)t.html=Vn(t.html,u);if(g.htmlAttrs)t.html=Un(t.html,g.htmlAttrs);if(!/<body[^>]*\bdata-stx=/.test(t.html)){let p=t.html.match(/<(?!body\b)[a-zA-Z][a-zA-Z0-9-]*\b[^>]*?\s(data-stx="[^"]+")[^>]*>/);if(p&&p[1]){let W=p[1];t.html=t.html.replace(" "+W,""),t.html=t.html.replace(/<body([^>]*)>/,`<body$1 ${W}>`)}}if(t.html=t.html.replace(/<style data-css="generated">[\s\S]*?<\/style>\s*/g,""),t.html=await f(t.html),O){let p=await It(t,{params:{},request:new Request(`http://stx.build${s.pattern}`),method:"GET",__stx_strict_hydration:!0});if(p.redirect||p.cookies?.length||p.boundaries?.length||p.headers&&Object.keys(p.headers).length)throw Error(`Prerendered route ${s.pattern} cannot set response headers/cookies, redirect or stream`);t.html=p.html,t.status=p.status??t.status,t.hasServerScripts=!1,t.serverScriptContent=[],t.placeholders={}}t.fragment=re(t.html,D);let L=s.pattern==="/"?"index":s.pattern.slice(1).replace(/\//g,"-").replace(/[[\]]/g,"_"),z=c.join("server","pages",`${L}.compiled.json`),G=c.join("server","fragments",`${L}.html`);await Bun.write(c.join(r,z),JSON.stringify(t,null,2)),await Bun.write(c.join(r,G),t.fragment),k.push({pattern:s.pattern,compiledPath:z,fragmentPath:G,isDynamic:t.hasServerScripts,hasParams:s.pattern.includes(":")||s.pattern.includes("["),prerendered:O}),console.log(`[stx build] \u2713 ${s.pattern}`)}catch(t){if(Object.keys(h).length)throw t;console.error(`[stx build] \u2717 ${s.pattern}:`,t instanceof Error?t.message:t)}}let E=c.resolve(a,d);if(m.existsSync(E)){let{copied:s,bytes:h}=Z(E,c.join(r,"public"));if(s>0)console.log(`[stx build] Copied ${s} public asset${s===1?"":"s"} (${(h/1024).toFixed(1)}KB) from ${d}/`)}let H=Jt(a);if(H){let{copied:s,bytes:h}=Z(H,c.join(r,"public",Gt));if(s>0)console.log(`[stx build] Copied ${s} asset${s===1?"":"s"} (${(h/1024).toFixed(1)}KB) from ${pt}/`)}let F={runtime:v.filename,router:x.filename},T=io(k,F,r);if(T.routeRules=A,T.routerContainer=D,b)T.apiRoutes=await Ur(a,r,w);if(e.runtimeConfig)await Bun.write(c.join(r,"server/runtime-config.json"),JSON.stringify(e.runtimeConfig)),await Ss(a,e.runtimeConfig);if(e._layerGraph)await Bun.write(c.join(r,"server/layers.json"),JSON.stringify(wi(e._layerGraph),null,2));ao(T,r);let K=Date.now()-l;return console.log(`
2
+ import{Ie,Wt}from"./chunk-nma8b17c.js";import{ke}from"./chunk-mx446wgp.js";import{Fo,zo,f,St,Q,N,Vn,Un,Wn,n,I,o}from"./chunk-xts31rkc.js";import{C}from"./chunk-scvzv5y2.js";import{Ss}from"./chunk-xc27xdm6.js";import{un,pe}from"./chunk-gskjzw5r.js";import{wi}from"./chunk-j4afmryj.js";import{me,re,io,ao,It}from"./chunk-2qz5gqqe.js";import{bt,Ur}from"./chunk-wc6k446y.js";import{Dt}from"./chunk-7grtpdw5.js";import{pt,Gt,Jt}from"./chunk-5pjsc9zv.js";import{createHash as ee}from"crypto";function J(i){return ee("sha256").update(i).digest("hex").slice(0,8)}function U(i=!1){let l=i?Wt():Ie(),a=J(l);return{content:l,filename:`runtime.${a}.js`,hash:a}}function V(){let i=ke(),l=J(i);return{content:i,filename:`router.${l}.js`,hash:l}}import m from"fs";import c from"path";import q from"path";import{createHash as te}from"crypto";function se(i={}){let l=new Set;return{context:new Proxy(i,{get(r,e){if(e in r)return r[e];if(typeof e==="string"&&!e.startsWith("__"))l.add(e);return},has(r,e){if(e in r)return!0;if(typeof e==="string"&&!e.startsWith("__"))l.add(e);return!1}}),accessedKeys:l}}async function X(i,l,a={}){let r=q.resolve(i),e=await Bun.file(r).text(),S=te("sha256").update(e).digest("hex").slice(0,16);Fo();let _={};try{_=await o(a.configDir)}catch{}let y=[],d=/<script\b([^>]*)>([\s\S]*?)<\/script>/gi,g;while((g=d.exec(e))!==null){let R=g[1];if(/\bserver\b/.test(R))y.push(g[2])}let u=new Set(y.flatMap((R)=>Q(R))),{context:D}=se({__filename:r,__dirname:q.dirname(r),__stx_serverDeclared:u}),A=new Set,j={...I,..._,...a,buildMode:"compile",strict:!1},b=await n(e,D,r,j,A),w=me(b),P=zo();return{route:l,sourceFile:i,html:b,fragment:w,placeholders:P,hasServerScripts:y.length>0,serverScriptContent:y,dependencies:Array.from(A),contentHash:S,status:St(e),streamTemplates:D.__streamTemplates}}var ne=new Set([".DS_Store","Thumbs.db","desktop.ini",".gitkeep",".gitignore"]);function Z(i,l){let a=0,r=0;if(!m.existsSync(i))return{copied:a,bytes:r};m.mkdirSync(l,{recursive:!0});function e(S,_){let y=m.readdirSync(S,{withFileTypes:!0});for(let d of y){if(ne.has(d.name))continue;let g=c.join(S,d.name),u=c.join(_,d.name);if(d.isDirectory())m.mkdirSync(u,{recursive:!0}),e(g,u);else if(d.isFile()){if(m.existsSync(u))continue;m.copyFileSync(g,u),a++,r+=m.statSync(u).size}}}return e(i,l),{copied:a,bytes:r}}async function Zc(i={}){let l=Date.now(),a=c.resolve(i.root||process.cwd()),r=c.resolve(a,i.outputDir||".output");console.log("[stx build] Starting production build...");let e=await o(a),S=c.resolve(a,i.componentsDir??e.componentsDir??"components"),_=c.resolve(a,i.partialsDir??e.partialsDir??"partials"),y=c.resolve(a,i.layoutsDir??e.layoutsDir??"layouts"),d=i.publicDir??e.publicDir??"public",g=pe(e.app?.head,{known:un,source:"app.head"}),u=e.app?.colorMode,D=e.router?.container||"main",A=i.routeRules??e.routeRules??{},j=Dt(A),b=i.serverApi??e.serverApi,w=typeof b==="object"?b:{};if(b)bt(a,w);if(e.runtimeConfig)C(e.runtimeConfig,{});if(m.existsSync(r))m.rmSync(r,{recursive:!0});let P=[c.join(r,"public","__stx"),c.join(r,"public","assets"),c.join(r,"server","pages"),c.join(r,"server","fragments")];for(let s of P)m.mkdirSync(s,{recursive:!0});console.log("[stx build] Discovering routes...");let R=N(a,{pagesDirs:e._layerPageDirs}),Y=["components","layouts","partials"],B=R.filter((s)=>!Y.some((h)=>s.pattern.startsWith(`/${h}/`)||s.pattern===`/${h}`));console.log(`[stx build] Found ${B.length} page routes (${R.length-B.length} non-page files excluded)`),console.log("[stx build] Generating shared assets...");let v=U(i.debug),x=V();await Bun.write(c.join(r,"public","__stx",v.filename),v.content),await Bun.write(c.join(r,"public","__stx",x.filename),x.content),console.log(`[stx build] Runtime: ${v.filename} (${(v.content.length/1024).toFixed(1)}KB)`),console.log(`[stx build] Router: ${x.filename} (${(x.content.length/1024).toFixed(1)}KB)`),console.log("[stx build] Compiling templates...");let M=[],k=[];for(let s of B){let h=j(s.pattern),O=h.rendering==="prerender";if(O&&(s.pattern.includes(":")||s.pattern.includes("[")))throw Error(`Cannot prerender parameter route ${s.pattern}; use dynamic rendering (explicit path enumeration is not supported here)`);try{let t=await X(s.filePath,s.pattern,{configDir:a,componentsDir:S,partialsDir:_,layoutsDir:y,debug:i.debug});if(M.push(t),t.html=t.html.replace(/runtime\.__STX_HASH__\.js/g,v.filename).replace(/router\.__STX_HASH__\.js/g,x.filename),t.html=Wn(t.html,g,{bodyScripts:[`<script src="/__stx/${x.filename}"></script>`],...u&&{colorMode:u}}),u)t.html=Vn(t.html,u);if(g.htmlAttrs)t.html=Un(t.html,g.htmlAttrs);if(!/<body[^>]*\bdata-stx=/.test(t.html)){let p=t.html.match(/<(?!body\b)[a-zA-Z][a-zA-Z0-9-]*\b[^>]*?\s(data-stx="[^"]+")[^>]*>/);if(p&&p[1]){let W=p[1];t.html=t.html.replace(" "+W,""),t.html=t.html.replace(/<body([^>]*)>/,`<body$1 ${W}>`)}}if(t.html=t.html.replace(/<style data-css="generated">[\s\S]*?<\/style>\s*/g,""),t.html=await f(t.html),O){let p=await It(t,{params:{},request:new Request(`http://stx.build${s.pattern}`),method:"GET",__stx_strict_hydration:!0});if(p.redirect||p.cookies?.length||p.boundaries?.length||p.headers&&Object.keys(p.headers).length)throw Error(`Prerendered route ${s.pattern} cannot set response headers/cookies, redirect or stream`);t.html=p.html,t.status=p.status??t.status,t.hasServerScripts=!1,t.serverScriptContent=[],t.placeholders={}}t.fragment=re(t.html,D);let L=s.pattern==="/"?"index":s.pattern.slice(1).replace(/\//g,"-").replace(/[[\]]/g,"_"),z=c.join("server","pages",`${L}.compiled.json`),G=c.join("server","fragments",`${L}.html`);await Bun.write(c.join(r,z),JSON.stringify(t,null,2)),await Bun.write(c.join(r,G),t.fragment),k.push({pattern:s.pattern,compiledPath:z,fragmentPath:G,isDynamic:t.hasServerScripts,hasParams:s.pattern.includes(":")||s.pattern.includes("["),prerendered:O}),console.log(`[stx build] \u2713 ${s.pattern}`)}catch(t){if(Object.keys(h).length)throw t;console.error(`[stx build] \u2717 ${s.pattern}:`,t instanceof Error?t.message:t)}}let E=c.resolve(a,d);if(m.existsSync(E)){let{copied:s,bytes:h}=Z(E,c.join(r,"public"));if(s>0)console.log(`[stx build] Copied ${s} public asset${s===1?"":"s"} (${(h/1024).toFixed(1)}KB) from ${d}/`)}let H=Jt(a);if(H){let{copied:s,bytes:h}=Z(H,c.join(r,"public",Gt));if(s>0)console.log(`[stx build] Copied ${s} asset${s===1?"":"s"} (${(h/1024).toFixed(1)}KB) from ${pt}/`)}let F={runtime:v.filename,router:x.filename},T=io(k,F,r);if(T.routeRules=A,T.routerContainer=D,b)T.apiRoutes=await Ur(a,r,w);if(e.runtimeConfig)await Bun.write(c.join(r,"server/runtime-config.json"),JSON.stringify(e.runtimeConfig)),await Ss(a,e.runtimeConfig);if(e._layerGraph)await Bun.write(c.join(r,"server/layers.json"),JSON.stringify(wi(e._layerGraph),null,2));ao(T,r);let K=Date.now()-l;return console.log(`
3
3
  [stx build] Done in ${K}ms \u2014 ${M.length} pages compiled`),{pageCount:M.length,assets:F,outputDir:r,duration:K}}
4
4
  export{Zc};
@@ -0,0 +1,2 @@
1
+ // @bun
2
+ import{Zc}from"./chunk-hvmtpe7w.js";import"./chunk-2qz5gqqe.js";import"./chunk-nma8b17c.js";import"./chunk-wc6k446y.js";import"./chunk-xts31rkc.js";import"./chunk-594tt40e.js";import"./chunk-wkc34drs.js";import"./chunk-j4afmryj.js";import"./chunk-xc27xdm6.js";import"./chunk-scvzv5y2.js";import"./chunk-yd7g02v5.js";import"./chunk-gskjzw5r.js";import"./chunk-ab7vh24b.js";import"./chunk-pf0d8y9n.js";import"./chunk-01nx6zcw.js";import"./chunk-mx446wgp.js";import"./chunk-pcq6vphz.js";export{Zc as buildForProduction};
@@ -1,2 +1,2 @@
1
1
  // @bun
2
- import{W,Kr,Xr,Va,wt,jo,Gr,Bo,vu,Ne,Jr,he}from"./chunk-ss7wapbh.js";import"./chunk-8adstrk5.js";import"./chunk-wkc34drs.js";import{hi,s}from"./chunk-ak95401g.js";import"./chunk-j4afmryj.js";import"./chunk-8xcg2dqy.js";import"./chunk-99kt56fn.js";import"./chunk-s10r6hxp.js";import"./chunk-tbef3yyk.js";import"./chunk-ab7vh24b.js";import"./chunk-pf0d8y9n.js";import"./chunk-01nx6zcw.js";import"./chunk-x0mc2kv0.js";import"./chunk-pcq6vphz.js";export{W as BROWSER_CORE_IMPORTS,Va as STX_AUTO_IMPORTS,Kr as extractAndStripCssImports,Ne as extractBridgeData,hi as findInterpolationEnd,Bo as generateAutoImportDestructuring,vu as generateBrowserAutoImportDestructuring,Jr as generateServerDataBridge,wt as injectBrowserCoreAutoImports,he as processClientScript,Gr as referencesName,Xr as renderVendorStyleTags,s as stripCommentsAndLiterals,jo as transformAutoImports};
2
+ import{W,Kr,Xr,Va,wt,jo,Gr,Bo,vd,Ne,Jr,he}from"./chunk-xts31rkc.js";import"./chunk-594tt40e.js";import"./chunk-wkc34drs.js";import{hi,s}from"./chunk-ak95401g.js";import"./chunk-j4afmryj.js";import"./chunk-xc27xdm6.js";import"./chunk-scvzv5y2.js";import"./chunk-yd7g02v5.js";import"./chunk-gskjzw5r.js";import"./chunk-ab7vh24b.js";import"./chunk-pf0d8y9n.js";import"./chunk-01nx6zcw.js";import"./chunk-mx446wgp.js";import"./chunk-pcq6vphz.js";export{W as BROWSER_CORE_IMPORTS,Va as STX_AUTO_IMPORTS,Kr as extractAndStripCssImports,Ne as extractBridgeData,hi as findInterpolationEnd,Bo as generateAutoImportDestructuring,vd as generateBrowserAutoImportDestructuring,Jr as generateServerDataBridge,wt as injectBrowserCoreAutoImports,he as processClientScript,Gr as referencesName,Xr as renderVendorStyleTags,s as stripCommentsAndLiterals,jo as transformAutoImports};