@stacksjs/stx 0.2.449 → 0.2.450
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.
- package/dist/{chunk-1h774y7j.js → chunk-01qq35ea.js} +1 -1
- package/dist/{chunk-2234az7m.js → chunk-20gh6qwe.js} +1 -1
- package/dist/{chunk-ff0csdfb.js → chunk-3ty4k2pr.js} +2 -2
- package/dist/{chunk-y0ny5xzw.js → chunk-4c84e4qb.js} +1 -1
- package/dist/{chunk-307a5hmc.js → chunk-4gjjyhwt.js} +1 -1
- package/dist/{chunk-25pjn68v.js → chunk-5bdcx5a6.js} +1 -1
- package/dist/{chunk-gshjxgm1.js → chunk-7r0zs237.js} +1 -1
- package/dist/{chunk-gxk09e0k.js → chunk-7t55gjvd.js} +5 -5
- package/dist/{chunk-tx28mc48.js → chunk-88vgxwmk.js} +1 -1
- package/dist/{chunk-pm492kcm.js → chunk-8f871c9w.js} +1 -1
- package/dist/chunk-987mr7v4.js +2 -0
- package/dist/{chunk-tfxn6w46.js → chunk-9r081dw0.js} +1 -1
- package/dist/{chunk-ms4arcga.js → chunk-a19qyxgs.js} +1 -1
- package/dist/{chunk-hx1dmj0e.js → chunk-ame3pmf0.js} +1 -1
- package/dist/{chunk-xfpmac91.js → chunk-cn0231jv.js} +1 -1
- package/dist/{chunk-x3ayv7n0.js → chunk-cnmvkmvg.js} +1 -1
- package/dist/{chunk-t9x7ts0e.js → chunk-dqd53ks1.js} +1 -1
- package/dist/{chunk-4c33955p.js → chunk-dsh48zkm.js} +1 -1
- package/dist/{chunk-4af6khdc.js → chunk-dye899tb.js} +1 -1
- package/dist/{chunk-atebr0qx.js → chunk-eg1tg9c8.js} +1 -1
- package/dist/{chunk-60mc14b6.js → chunk-f5cqvfw1.js} +1 -1
- package/dist/{chunk-5jtzxt0c.js → chunk-f5mxhh2s.js} +1 -1
- package/dist/{chunk-z939gvze.js → chunk-fj8bejca.js} +1 -1
- package/dist/{chunk-8p3jc9pd.js → chunk-gvc45mkw.js} +1 -1
- package/dist/{chunk-wtah2ty9.js → chunk-gxnx9tyz.js} +1 -1
- package/dist/{chunk-hk2qxa85.js → chunk-h152z1d5.js} +1 -1
- package/dist/{chunk-hnf5n809.js → chunk-jp874yvt.js} +1 -1
- package/dist/{chunk-r4q52w84.js → chunk-k94w32zh.js} +1 -1
- package/dist/{chunk-m9s92xgx.js → chunk-kqtfgace.js} +1 -1
- package/dist/{chunk-9e73j3kx.js → chunk-me6yg009.js} +1 -1
- package/dist/{chunk-n7jjqqbx.js → chunk-nadsxyng.js} +1 -1
- package/dist/{chunk-cac3vsxa.js → chunk-p3qnehys.js} +1 -1
- package/dist/{chunk-1gwq5pgj.js → chunk-pt6xds00.js} +1 -1
- package/dist/{chunk-4eq7ak70.js → chunk-r4xyes78.js} +2 -2
- package/dist/{chunk-2rky7wgq.js → chunk-rqb8w08k.js} +1 -1
- package/dist/{chunk-x83n89g3.js → chunk-rygb0w03.js} +1 -1
- package/dist/{chunk-3bjvgk8p.js → chunk-sk98kch4.js} +2 -2
- package/dist/{chunk-7758mtrv.js → chunk-tgyc1v2x.js} +1 -1
- package/dist/{chunk-rz4b20k1.js → chunk-vavj9qkx.js} +23 -23
- package/dist/{chunk-nbke0vc6.js → chunk-x6qt9hxd.js} +1 -1
- package/dist/{chunk-g231bs3w.js → chunk-xcag83az.js} +1 -1
- package/dist/{chunk-zqx4crbj.js → chunk-xcrp8m3f.js} +1 -1
- package/dist/{chunk-k467ry8f.js → chunk-xgzvfwvn.js} +1 -1
- package/dist/{chunk-jgdbyrqw.js → chunk-y19enzen.js} +1 -1
- package/dist/{chunk-nnha3jpr.js → chunk-ycdcawf5.js} +1 -1
- package/dist/{chunk-r8vpah5h.js → chunk-ygvyg62e.js} +1 -1
- package/dist/{chunk-48dvw3fw.js → chunk-ymvmhaqn.js} +1 -1
- package/dist/{chunk-888js6gw.js → chunk-z8r0mbtk.js} +1 -1
- package/dist/cli.js +7 -7
- package/dist/craft-entry.js +1 -1
- package/dist/craft.js +1 -1
- package/dist/pwa.js +1 -1
- package/dist/ssg.js +2 -2
- package/dist/utils.js +2 -2
- package/package.json +5 -5
- package/dist/chunk-6x4wwnsy.js +0 -2
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
// @bun
|
|
2
|
-
import{an,vs}from"./chunk-
|
|
2
|
+
import{an,vs}from"./chunk-ame3pmf0.js";import"./chunk-jwpcck1b.js";export{vs as generateRuntimeConfigTypes,an as prepareRuntimeConfig};
|
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
// @bun
|
|
2
|
-
import{Vi,Qs,Vc,Ui,Wi,Uc,Wc}from"./chunk-
|
|
2
|
+
import{Vi,Qs,Vc,Ui,Wi,Uc,Wc}from"./chunk-cnmvkmvg.js";import"./chunk-f5mxhh2s.js";import"./chunk-dsh48zkm.js";import"./chunk-4c84e4qb.js";import{He,gc}from"./chunk-vavj9qkx.js";import"./chunk-0xztxj98.js";import"./chunk-73h7qjgq.js";import"./chunk-yx37nrgr.js";import"./chunk-ame3pmf0.js";import"./chunk-jwpcck1b.js";import"./chunk-g8k5rsqq.js";import"./chunk-zqzv5jy2.js";import"./chunk-5xj1df83.js";import"./chunk-axydabse.js";import"./chunk-afhkvj3k.js";import"./chunk-qzgqg0bw.js";import"./chunk-dqr5n49p.js";export{Vi as buildVirtualSource,He as extractScriptBlocks,gc as extractTemplateExpressions,Ui as findRuntimeTypeDeclarations,Wi as findStxModuleDeclarations,Wc as formatTypecheckDiagnostics,Vc as sourcePathFor,Uc as typecheckStxFiles,Qs as virtualPathFor};
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
// @bun
|
|
2
|
-
import{W,n}from"./chunk-
|
|
2
|
+
import{W,n}from"./chunk-vavj9qkx.js";import p from"fs";import g from"path";import*as y from"readline";var e={reset:"\x1B[0m",bold:"\x1B[1m",dim:"\x1B[2m",red:"\x1B[31m",green:"\x1B[32m",yellow:"\x1B[33m",blue:"\x1B[34m",magenta:"\x1B[35m",cyan:"\x1B[36m"},u={help:{description:"Show available commands",usage:"help [command]",handler:async(t,o)=>{if(t[0]&&u[t[0]]){let r=u[t[0]];console.log(`
|
|
3
3
|
${e.bold}${t[0]}${e.reset} - ${r.description}`),console.log(` Usage: ${e.cyan}${r.usage}${e.reset}
|
|
4
4
|
`)}else{console.log(`
|
|
5
5
|
${e.bold}Available Commands:${e.reset}
|
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
// @bun
|
|
2
|
-
import{Yl,ho,Ea,Zl,Ql,eu,tu,nu,Ta,_a,ru,su,ou,iu}from"./chunk-
|
|
2
|
+
import{Yl,ho,Ea,Zl,Ql,eu,tu,nu,Ta,_a,ru,su,ou,iu}from"./chunk-8f871c9w.js";import"./chunk-vavj9qkx.js";import"./chunk-0xztxj98.js";import"./chunk-73h7qjgq.js";import"./chunk-yx37nrgr.js";import"./chunk-ame3pmf0.js";import"./chunk-jwpcck1b.js";import"./chunk-g8k5rsqq.js";import"./chunk-zqzv5jy2.js";import"./chunk-5xj1df83.js";import"./chunk-axydabse.js";import"./chunk-afhkvj3k.js";import"./chunk-qzgqg0bw.js";import"./chunk-dqr5n49p.js";export{Ea as SUSPENSE_RESOLVER_RUNTIME,ho as buildSuspenseResolveScript,nu as createStreamRenderer,eu as extractStreamBoundaries,iu as generateHydrationRuntime,_a as islandDirective,su as processSectionDirectives,Ql as processStreamDirectives,ru as registerStreamingDirectives,Zl as renderStreamingPage,Yl as streamTemplate,tu as streamTemplateSimple,ou as streamToResponse,Ta as streamingSuspenseDirective};
|
|
@@ -1,3 +1,3 @@
|
|
|
1
1
|
// @bun
|
|
2
|
-
import{o}from"./chunk-
|
|
2
|
+
import{o}from"./chunk-vavj9qkx.js";import{Sr}from"./chunk-rdq113p4.js";import p from"path";async function il(t={}){let d=performance.now(),s=t.root||process.cwd(),e=await o(s),u=t.ssr?.routeRules??e.routeRules??{};if(Sr(u),!e.ssr&&Object.keys(u).length)throw Error("routeRules require ssr: true and the production server; flat SSG output cannot apply request/cache policies");if(!e.ssr&&(t.ssr?.serverApi??e.serverApi))throw Error("serverApi requires ssr: true; flat SSG output cannot execute API endpoints");let r=e.ssr?"ssr":"ssg";console.log(`[stx build] Mode: ${r.toUpperCase()}${e.ssr?" (ssr: true in stx.config.ts)":" (default \u2014 ssr is false)"}`);let n,l;if(r==="ssg"){let{generateStaticSite:i}=await import("./ssg.js");n=await i({pagesDir:p.join(e.root||".",e.pagesDir||e.build?.pagesDir||"pages"),publicDir:e.publicDir||e.build?.publicDir||"public",outputDir:e.build?.outputDir||"dist",generate404:e.build?.generate404??!0,minify:e.build?.minify??!0,cleanOutput:e.build?.cleanOutput??!0,router:e.router,...t.ssg})}else{let{buildForProduction:i}=await import("./chunk-5bdcx5a6.js");l=await i({root:s,outputDir:".output",debug:t.debug,...t.ssr})}let a=Math.round(performance.now()-d);return{mode:r,ssg:n,ssr:l,duration:a}}
|
|
3
3
|
export{il};
|
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
// @bun
|
|
2
|
-
import{xo,So,ko,fu}from"./chunk-
|
|
2
|
+
import{xo,So,ko,fu}from"./chunk-88vgxwmk.js";import"./chunk-sk98kch4.js";import"./chunk-vavj9qkx.js";import"./chunk-0xztxj98.js";import"./chunk-73h7qjgq.js";import"./chunk-yx37nrgr.js";import"./chunk-ame3pmf0.js";import"./chunk-jwpcck1b.js";import"./chunk-g8k5rsqq.js";import"./chunk-zqzv5jy2.js";import"./chunk-5xj1df83.js";import"./chunk-axydabse.js";import"./chunk-afhkvj3k.js";import"./chunk-qzgqg0bw.js";import"./chunk-dqr5n49p.js";export{xo as buildNative,fu as default,ko as getAvailableFormats,So as getAvailableTargets};
|
|
@@ -1,4 +1,4 @@
|
|
|
1
1
|
// @bun
|
|
2
2
|
import g from"path";var y=/__stxModules\["((?:[^"\\]|\\.)*)"\]/g;function I(...r){let o=new Set;for(let s of r){if(!s||!s.includes("__stxModules["))continue;for(let e of s.matchAll(y))try{o.add(JSON.parse(`"${e[1]}"`))}catch{}}return[...o].sort()}async function M(r,o={}){if(r.length===0)return null;let s=process.cwd(),e=[],l=[];r.forEach((t,h)=>{let x=t.startsWith("npm:")?t.slice(4):g.resolve(s,t),a=`__stxRegistered${h}`,d=JSON.stringify(t);e.push(`import * as ${a} from ${JSON.stringify(x)};`),l.push(`if (!globalThis.__stxModules[${d}]) globalThis.__stxModules[${d}] = ${a};`)});let u=[...e,"globalThis.__stxModules = globalThis.__stxModules || {};",...l].join(`
|
|
3
|
-
`),n;try{let{bundleClientScript:t}=await import("./chunk-
|
|
3
|
+
`),n;try{let{bundleClientScript:t}=await import("./chunk-ycdcawf5.js");n=await t(u,g.join(s,".stx-module-registry.ts"),{projectRoot:s,minify:o.minify,externalizeUserModules:!1,collectInputs:o.collectInputs})}catch(t){return console.warn("[stx] could not build the page module registry (#1957):",t),null}let{transformAutoImports:p,generateAutoImportDestructuring:m}=await import("./chunk-fj8bejca.js"),i=p(n),f=m(i.stxImports,i.browserImports),{transformStoreImports:_}=await import("./chunk-wtqjfar3.js");n=_(i.code);let c=JSON.stringify(new Bun.CryptoHasher("md5").update(u).digest("hex").slice(0,12));return[";(function() {"," var __stxBundles = globalThis.__stxModuleBundles || (globalThis.__stxModuleBundles = {});",` if (__stxBundles[${c}]) return;`,` __stxBundles[${c}] = true;`,f,n,"})();"].join(`
|
|
4
4
|
`)}export{M as buildModuleRegistryScript,I as registeredModuleIdsIn};
|
|
@@ -1,3 +1,3 @@
|
|
|
1
1
|
// @bun
|
|
2
|
-
import{V,ae}from"./chunk-
|
|
2
|
+
import{V,ae}from"./chunk-vavj9qkx.js";import{le,S,Ke}from"./chunk-jwpcck1b.js";import{Ze,X,xe}from"./chunk-qzgqg0bw.js";import{_e,ne,C,re,ao,xr,co,Pt}from"./chunk-r4xyes78.js";import{Vr}from"./chunk-4c84e4qb.js";import{It}from"./chunk-rdq113p4.js";import H from"zlib";import{promisify as Y}from"util";var Q=Y(H.brotliCompress),Z=Y(H.gzip),K=["text/","application/json","application/javascript","application/xml","application/xhtml+xml","application/rss+xml","application/atom+xml","application/manifest+json","image/svg+xml"],ee=["text/event-stream","multipart/x-mixed-replace"],te=1024;function se(t){if(!t)return!1;let e=t.toLowerCase();if(ee.some((i)=>e.startsWith(i)))return!1;return K.some((i)=>e.startsWith(i))}function oe(t){let e=new Map;for(let i of t.split(",")){let[s,...c]=i.trim().split(";"),l=s.trim().toLowerCase();if(!l)continue;let m=1;for(let f of c){let x=/^\s*q\s*=\s*([\d.]+)\s*$/i.exec(f);if(!x)continue;let g=Number.parseFloat(x[1]);if(Number.isFinite(g))m=g}e.set(l,m)}return e}function ie(t){if(!t)return null;let e=oe(t),i=e.get("*"),s=(c)=>e.get(c)??i??0;if(s("br")>0)return"br";if(s("gzip")>0)return"gzip";return null}async function At(t,e,i={}){if(e.headers.get("content-encoding"))return e;if(e.status===204||e.status===304||!e.body)return e;if(!se(e.headers.get("content-type")))return e;let s=ie(t.headers.get("accept-encoding"));if(!s)return e;let c;try{c=new Uint8Array(await e.arrayBuffer())}catch{return e}let l=()=>new Response(c,{status:e.status,statusText:e.statusText,headers:q(e.headers)});if(c.length<(i.threshold??te))return l();try{let m=s==="br"?await Q(c,{params:{[H.constants.BROTLI_PARAM_QUALITY]:i.quality??5,[H.constants.BROTLI_PARAM_SIZE_HINT]:c.length}}):await Z(c);if(m.length>=c.length)return l();let f=q(e.headers);return f.set("Content-Encoding",s),f.set("Content-Length",String(m.length)),new Response(m,{status:e.status,statusText:e.statusText,headers:f})}catch{return l()}}function q(t){let e=new Headers(t),i=e.get("Vary");if(!i)return e.set("Vary","Accept-Encoding"),e;if(!i.split(",").some((c)=>c.trim().toLowerCase()==="accept-encoding"))e.set("Vary",`${i}, Accept-Encoding`);return e}import J from"fs";import M from"path";var{serve:ce}=globalThis.Bun;class G{now;entries=new V(1000,{maxBytes:33554432,sizeOf:(t)=>t.body.byteLength+JSON.stringify(t.headers).length*2});pending=new Map;generation=0;constructor(t=Date.now){this.now=t}invalidate(t){this.generation++,this.pending.clear();for(let e of Array.from(this.entries.keys()))if(t===void 0||this.entries.get(e)?.path===t)this.entries.delete(e)}async respond(t,e,i){let s,c=async()=>{let r=s??await i();return r.headers.set("Cache-Control","private, no-store"),r.headers.set("Vary",C(r.headers.get("Vary")).Vary),r};if(!e||t.method!=="GET"||t.headers.has("Cookie")||t.headers.has("Authorization")||t.headers.has("Range"))return c();let l=new URL(t.url),m=`${l.origin}${l.pathname}${l.search}|${ne(t)?"fragment":"document"}`,f=this.entries.get(m),x=(r)=>{let T=new Headers(r.headers);return T.set("Cache-Control","private, no-store"),T.set("Age",String(Math.max(0,Math.floor((this.now()-r.created)/1000)))),new Response(r.body.slice(0),{headers:T})},g=f?(this.now()-f.created)/1000:1/0;if(f&&g<e.maxAge)return x(f);let b=this.generation,O=async()=>{let r=await i();s=r;let T=(r.headers.get("Vary")??"").toLowerCase().split(",").map((R)=>R.trim()).filter(Boolean);if(r.status!==200||r.headers.has("Set-Cookie")||/(?:private|no-store|no-cache)/i.test(r.headers.get("Cache-Control")??"")||T.some((R)=>R!=="x-stx-router"&&R!=="accept-encoding"))return null;let L=await r.clone().arrayBuffer();if(L.byteLength>1048576)return null;r.headers.set("Vary",C(r.headers.get("Vary")).Vary);let n={body:L,headers:Array.from(r.headers.entries()),created:this.now(),path:l.pathname};if(this.generation===b)this.entries.set(m,n);return n},v=this.pending.get(m);if(!v){if(this.pending.size>=1000)return c();v=O().finally(()=>{if(this.pending.get(m)===v)this.pending.delete(m)}),this.pending.set(m,v)}if(f&&g<e.maxAge+(e.swr??0))return v.catch(()=>{}),x(f);let E=await v;return E?x(E):c()}}var pe={".js":"application/javascript",".mjs":"application/javascript",".css":"text/css",".json":"application/json",".html":"text/html",".txt":"text/plain",".xml":"application/xml",".pdf":"application/pdf",".png":"image/png",".jpg":"image/jpeg",".jpeg":"image/jpeg",".gif":"image/gif",".webp":"image/webp",".avif":"image/avif",".svg":"image/svg+xml",".ico":"image/x-icon",".bmp":"image/bmp",".mp4":"video/mp4",".webm":"video/webm",".ogg":"audio/ogg",".mp3":"audio/mpeg",".wav":"audio/wav",".woff":"font/woff",".woff2":"font/woff2",".ttf":"font/ttf",".otf":"font/otf",".eot":"application/vnd.ms-fontobject"};async function al(t={}){let e=M.resolve(t.outputDir||".output"),i=t.port??3000,s=ao(e);if(!s)console.error("[stx] No build manifest found. Run `stx build` first."),process.exit(1);console.log(`[stx] Production server loading ${s.routes.length} routes...`);let c=It(s.routeRules),l=new G,m=Vr(e,s.apiRoutes??[]),f=Bun.file(M.join(e,"server/runtime-config.json")),x=t.runtimeConfig??(await f.exists()?await f.json():void 0),g=x?S(x):void 0,b=new Map,O=new Map,v=new Map,E=new Map;for(let n of s.routes)try{let R=M.join(e,n.compiledPath),o=JSON.parse(await Bun.file(R).text());if(g)o.html=Ke(o.html,g);b.set(n.pattern,o),v.set(n.pattern,xe(o.html)),E.set(n.pattern,ae(o.html));let _=M.join(e,n.fragmentPath);if(await Bun.file(_).exists()){let A=await Bun.file(_).text();O.set(n.pattern,g?Ke(A,g):A)}}catch(R){console.warn(`[stx] Failed to load route ${n.pattern}:`,R)}let r=new Map,T=[];for(let n of s.routes)if(n.hasParams){let{regex:R,params:o}=X(n.pattern,{page:!0});T.push({regex:R,route:n,paramNames:o})}else r.set(n.pattern,n);let L=ce({port:i,async fetch(n){return At(n,await le(g??S(),async()=>{let o=new URL(n.url).pathname;if(t.onRequest){let p=await t.onRequest(n);if(p)return p}if(t.apiRouter){let p=await t.apiRouter.handleRequest(n);if(p.status!==404)return p}if(t.apiRoutes?.[o])return t.apiRoutes[o](n);let _=await m(n);if(_)return _;if((n.method==="GET"||n.method==="HEAD")&&o!=="/"){let p=M.resolve(e,"public"),d;try{d=decodeURIComponent(o)}catch{d=o}if(!d.includes("\x00")){let u=M.resolve(p,`.${d}`);if(u===p||u.startsWith(`${p}${M.sep}`))try{if(J.existsSync(u)&&J.statSync(u).isFile()){let h=M.extname(u).toLowerCase(),j=pe[h]||"application/octet-stream",B=o.startsWith("/__stx/")||/\.[0-9a-f]{8}\./.test(o);return new Response(Bun.file(u),{headers:{"Content-Type":j,"Cache-Control":B?"public, max-age=31536000, immutable":"public, max-age=3600"}})}}catch{}}}let A=ne(n),y=null,U={};if(y=r.get(o)||null,!y)for(let{regex:p,route:d,paramNames:u}of T){let a=o.match(p);if(a){y=d,u.forEach((h,j)=>{U[h]=a[j+1]});break}}if(!y){let p=Ze(o)?null:r.get("/404")||null;if(p){let d=b.get(p.pattern);if(d)return new Response(d.html,{status:404,headers:{"Content-Type":"text/html"}})}return new Response("Not Found",{status:404,headers:{"Content-Type":"text/plain; charset=utf-8"}})}let k=c(o),W=Object.keys(k).length>0;return l.respond(n,k.cache,async()=>{let p=b.get(y.pattern);if(A&&n.method==="GET"&&p&&!p.hasServerScripts&&Object.keys(p.placeholders).length===0){let a=O.get(y.pattern);if(a){let h=v.get(y.pattern);return new Response(a,{status:p.status??200,headers:{"Content-Type":"text/html","X-STX-Fragment":"true",...E.has(y.pattern)?{"X-STX-Runtime":E.get(y.pattern)?"true":"false"}:{},...h?{"X-STX-Layout":h.layout,"X-STX-Layout-Group":h.group}:{},...C(),...k.cache?{}:{"Cache-Control":_e}}})}}let d=xr(n.method),u=b.get(y.pattern);if(!u){let a=r.get("/500")||null;if(a){let h=b.get(a.pattern);if(h)return new Response(h.html,{status:500,headers:{"Content-Type":"text/html"}})}return new Response("Internal Server Error",{status:500})}if(y.prerendered&&d)return new Response("Prerendered pages do not accept actions",{status:405,headers:{Allow:"GET, HEAD"}});if(!d&&!u.hasServerScripts&&Object.keys(u.placeholders).length===0)return new Response(u.html,{status:u.status??200,headers:{"Content-Type":"text/html",...C(),"Cache-Control":"public, max-age=60"}});try{let{html:a,boundaries:h,redirect:j,cookies:B,status:I,headers:z}=await Pt(u,{params:U,request:n,method:n.method,__stx_strict_hydration:W,__stx_runtime_config:g});if(j)return co(j,B,z);if(h&&h.length>0){let{renderStreamingPage:P,streamToResponse:D}=await import("./chunk-k94w32zh.js"),N=new Headers({...C(),...z,"Cache-Control":"private, no-store"});for(let F of B??[])N.append("Set-Cookie",F);if(A&&!d){let F=xe(a);N.set("X-STX-Fragment","true"),N.set("X-STX-Runtime",ae(a)?"true":"false"),N.set("X-STX-Layout",F.layout),N.set("X-STX-Layout-Group",F.group)}return D(P(A&&!d?re(a,s.routerContainer||"main"):a,h,{timeoutMs:30000}),{status:I??u.status??200,headers:N})}let w=new Headers({"Content-Type":"text/html",...C(),...k.cache?{}:{"Cache-Control":"private, no-store"}});for(let P of B??[])w.append("Set-Cookie",P);for(let[P,D]of Object.entries(z??{}))w.set(P,D);if(w.set("Vary",C(w.get("Vary")).Vary),A&&!d){let P=xe(a);return w.set("X-STX-Fragment","true"),w.set("X-STX-Runtime",ae(a)?"true":"false"),w.set("X-STX-Layout",P.layout),w.set("X-STX-Layout-Group",P.group),new Response(re(a,s.routerContainer||"main"),{status:I??u.status??200,headers:w})}return new Response(a,{status:I??u.status??200,headers:w})}catch(a){if(console.error(`[stx] Hydration error for ${o}:`,a),W)return new Response("Internal Server Error",{status:500});return new Response(u.html,{headers:{"Content-Type":"text/html"}})}})}))}});return console.log(`[stx] Production server running at http://localhost:${L.port}`),console.log(`[stx] Serving ${s.routes.length} routes (${b.size} pre-loaded)`),{port:L.port,stop:()=>{l.invalidate(),L.stop()},invalidate:(n)=>l.invalidate(n)}}
|
|
3
3
|
export{At,al};
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
// @bun
|
|
2
|
-
import"./chunk-afhkvj3k.js";import"./chunk-axydabse.js";import{y,I,O,N}from"./chunk-
|
|
2
|
+
import"./chunk-afhkvj3k.js";import"./chunk-axydabse.js";import{y,I,O,N}from"./chunk-vavj9qkx.js";import"./chunk-5xj1df83.js";import"./chunk-73h7qjgq.js";import"./chunk-qzgqg0bw.js";import"./chunk-zqzv5jy2.js";import"./chunk-g8k5rsqq.js";import"./chunk-yx37nrgr.js";import"./chunk-jwpcck1b.js";import"./chunk-ame3pmf0.js";import"./chunk-dqr5n49p.js";import"./chunk-0xztxj98.js";import f from"path";var b=["applyOfflineUpdate","broadcast","cacheMedia","calculateDistance","canNotify","clearCookies","clearFetchCache","clearOfflineData","clearStorage","copyToClipboard","createShareableFile","defineForm","getBatteryLevel","getCookie","getCurrentPosition","getStorageKeys","getStorageSize","getVoices","hasBattery","hasCameraPermission","hasGeolocationPermission","hasMicrophonePermission","hasNotificationPermission","hasResizeObserver","hexToHsl","hexToRgb","isBroadcastChannelSupported","isCharging","isDeviceMotionSupported","isDeviceOrientationSupported","isEventSourceSupported","isEyeDropperSupported","isInFullscreen","isMutationObserverSupported","isPermissionGranted","isSpeechRecognitionSupported","isSpeechSynthesisSupported","isWakeLockSupported","isWebSocketSupported","notify","onOfflineUpdateReady","parseCookies","pickColor","prefetch","removeCookie","requestMediaPermissions","requestMotionPermission","requestNotificationPermission","requestOrientationPermission","setCookie","share","shareCurrentPage","shareFiles","shareText","shareURL","shareWithFallback","speak","stopSpeaking","toggleFullscreen","useAsyncData","useAttributeObserver","useAutoLogout","useAutoWakeLock","useBattery","useBreakpoint","useBroadcastChannel","useBroadcastStream","useChannel","useChildListObserver","useClipboard","useColorHistory","useConditionalWakeLock","useCookies","useCopySelection","useDeviceMotion","useDeviceOrientation","useElementSize","useElementTextSelection","useElementVisibility","useEventSource","useEyeDropper","useFavicon","useForm","useFullscreen","useGeolocation","useGeolocationWatch","useHotkey","useIdle","useIdleState","useInfiniteScroll","useIntersectionObserver","useIntersectionObserverMultiple","useIsDesktop","useIsMobile","useIsTablet","useKeyPressed","useKeySequence","useKeyboard","useLastActive","useLazyLoad","useMeta","useMouse","useMouseInElement","useMutationObserver","useNetwork","useNotification","useOnline","useOutbox","useParallax","usePermission","usePermissions","usePointer","usePost","useResizeObserver","useResizeObserverMultiple","useSSE","useScroll","useSelectionPopup","useShare","useSpeechRecognition","useSpeechSynthesis","useStorage","useTextObserver","useTextSelection","useTitle","useVisibility","useWakeLock","useWindowSize"],L=new Set(b);var l=new Map,h=I(64),S=new Set,v=0,E=new Set(b);function W(){l.clear(),h.clear()}function R(o){let n=new Map;for(let r of o){let a=f.basename(r);if(a.endsWith(".d.ts"))continue;let t=a.replace(/\.[jt]s$/,"");if(t==="index")continue;if(t===a)continue;let i=n.get(t);if(i&&!i.endsWith(".js"))continue;n.set(t,r)}return[...n.values()].sort()}function P(o,n){let r=n.replace(/[$()*+.?[\\\]^{|}-]/g,"\\$&");return new RegExp(`(?:^|[^\\w$.])(?:const|let|var|function|class)\\s+${r}\\b`).test(o)}function M(o){if(!o)return[];let n=O(o,v),r=h.get(n);if(r)return r.slice();let a=o.replace(/<script\b[^>]*\bdata-stx-runtime\b[^>]*>[\s\S]*?<\/script>/gi,"").replace(/<script\b[^>]*\bdata-stx-framework-composables\b[^>]*>[\s\S]*?<\/script>/gi,"").replace(/<script\b[^>]*\bdata-stx-stores\b[^>]*>[\s\S]*?<\/script>/gi,"").replace(/<script\b[^>]*\bdata-stx-composables\b[^>]*>[\s\S]*?<\/script>/gi,""),t=[];for(let i of E){if(S.has(i))continue;let u=i.replace(/[$()*+.?[\\\]^{|}-]/g,"\\$&");if(new RegExp(`(^|[^\\w$.])${u}\\s*\\(`).test(a))t.push(i)}return t.sort(),h.set(n,t),t.slice()}async function U(o,n){let r=M(o);if(r.length===0)return null;let a=n??f.join(import.meta.dir,"composables"),t=`${a}\x00${r.join(",")}`,i=l.get(t);if(i!==void 0)return i||null;let u=N({loader:"ts",target:"browser",define:y()}),k=new Set(r),m=[],d=new Set,p=[];try{let s=new Bun.Glob("*.{ts,js}");for await(let e of s.scan({cwd:a,absolute:!0}))p.push(e)}catch{return l.set(t,""),null}p=R(p);for(let s of p){let e;try{e=await Bun.file(s).text()}catch{continue}let g=[];try{g=u.scan(e).exports.filter((c)=>c!=="default")}catch{continue}if(!g.some((c)=>k.has(c)))continue;try{e=e.replace(/^import\s+.*from\s+['"][^'"]+['"]\s*;?\s*$/gm,""),e=e.replace(/^import\s+type\s+.*$/gm,""),e=e.replace(/^export\s+\*\s+(?:as\s+\w+\s+)?from\s*['"][^'"]+['"]\s*;?\s*$/gm,""),e=e.replace(/^export\s+(?:type\s+)?\{[\s\S]*?\}\s*(?:from\s*['"][^'"]+['"]\s*)?;?\s*$/gm,""),e=e.replace(/^export\s+default\s+/gm,""),e=e.replace(/^export\s+(?=(?:declare\s+)?(?:abstract\s+)?(?:async\s+)?(?:function|class|const|let|var|type|interface|enum)\b)/gm,""),m.push(`// ${f.basename(s).replace(/\.[jt]s$/,"")}
|
|
3
3
|
${u.transformSync(e).trim()}`);for(let c of g)d.add(c)}catch(c){console.warn(`[stx] framework composable ${f.basename(s)} could not be bundled:`,c)}}let w=r.filter((s)=>!d.has(s)&&!P(o,s));if(w.length>0)console.warn(`[stx] could not bundle ${w.join(", ")} from @stacksjs/stx/composables \u2014 `+"calls to them will throw ReferenceError in the browser. Import them explicitly so the bundler inlines them, or use a runtime equivalent from window.stx.");if(m.length===0)return l.set(t,""),null;let C=[...d].map((s)=>` try { if (!(${JSON.stringify(s)} in __s)) { __s[${JSON.stringify(s)}] = ${s}; if (!(${JSON.stringify(s)} in window)) window[${JSON.stringify(s)}] = ${s}; } } catch (e) {}`).join(`
|
|
4
4
|
`),x=`<script data-stx-framework-composables>
|
|
5
5
|
;(function(){
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
// @bun
|
|
2
|
-
import{Fo,Gr,Y,Le,wt,b,Be,Fe,Bn,d,rn}from"./chunk-
|
|
2
|
+
import{Fo,Gr,Y,Le,wt,b,Be,Fe,Bn,d,rn}from"./chunk-vavj9qkx.js";import{D}from"./chunk-yqsza22w.js";import E from"path";var j=/\b(?:state|derived|effect|batch|ref|reactive|computed|watch|watchEffect)\s*(?:<[^>]*>)?\s*\(/;function F(t,n,e){let r={fullTag:e,content:n,attrs:t};if(/\bserver\b/.test(t))return{...r,type:"server"};if(/\bdata-stx-scoped\b/.test(t))return{...r,type:"client"};if(j.test(n))return{...r,type:"signals"};if(/\bclient\b/.test(t)||/\btype\s*=\s*["']module["']/.test(t)||/\bsrc\s*=/.test(t))return{...r,type:"client"};return{...r,type:"server"}}var H=/^<script\b([^>]*)>([\s\S]*)<\/script\s*>$/i;function to(t){let n=[],e=[],r=[],o=0;while(o<t.length){let s=t.indexOf("<",o);if(s===-1)break;let a=Le(t,s);if(a>s){o=a;continue}let i=Y(t,s);if(i>s){let c=t.slice(s,i),u=H.exec(c);if(u){let l=F(u[1],u[2],c);switch(l.type){case"signals":n.push(l);break;case"client":e.push(l);break;case"server":r.push(l);break}}o=i;continue}o=s+(t.startsWith("<!--",s)?4:1)}return{signals:n,client:e,server:r}}var L=new Set(["area","base","br","col","embed","hr","img","input","link","meta","param","source","track","wbr"]);function V(t){let n=[],e=/<!--[\s\S]*?(?:-->|$)|<(script|style|textarea|title|template)\b[^>]*>[\s\S]*?<\/\1\s*>/gi,r;while((r=e.exec(t))!==null)n.push({start:r.index,end:r.index+r[0].length});return n}function P(t,n){return n.some((e)=>t>=e.start&&t<e.end)}function B(t){let n=(t||"").trim();if(!n)return null;if(/[\s>+~,:]/.test(n))return null;let e={},r=n,o=r.match(/^[a-z][\w-]*/i);if(o)e.tag=o[0].toLowerCase(),r=r.slice(o[0].length);while(r.length>0){let s=r.match(/^\[([\w-]+)(?:=(["']?)([^\]"']*)\2)?\]/);if(s){if(e.attr=s[1],s[3]!==void 0&&s[3]!=="")e.attrValue=s[3];r=r.slice(s[0].length);continue}let a=r.match(/^#([\w-]+)/);if(a){e.id=a[1],r=r.slice(a[0].length);continue}let i=r.match(/^\.([\w-]+)/);if(i){e.className=i[1],r=r.slice(i[0].length);continue}return null}if(!e.tag&&!e.attr&&!e.id&&!e.className)return null;return e}function q(t,n){if(n.attr){if(!(n.attrValue===void 0?new RegExp(`\\b${n.attr}(?=[\\s=>/]|$)`,"i"):new RegExp(`\\b${n.attr}\\s*=\\s*(["'])\\s*${n.attrValue}\\s*\\1`,"i")).test(t))return!1}if(n.id){if(!new RegExp(`\\bid\\s*=\\s*(["'])\\s*${n.id}\\s*\\1`,"i").test(t))return!1}if(n.className){let e=t.match(/\bclass\s*=\s*(["'])([\s\S]*?)\1/i);if(!e)return!1;if(!e[2].split(/\s+/).includes(n.className))return!1}return!0}function T(t,n="main"){let e=B(n);if(!e)return null;let r=/<([a-z][\w-]*)\b([^>]*)>/gi,o=V(t),s;while((s=r.exec(t))!==null){if(P(s.index,o))continue;let a=s[1].toLowerCase(),i=s[2]||"";if(i.trimEnd().endsWith("/")||L.has(a))continue;if(e.tag&&e.tag!==a)continue;if(!q(i,e))continue;let c=s[0],u=s.index+c.length,l=new RegExp(`<(/?)${a}\\b([^>]*)>`,"gi");l.lastIndex=u;let f=1,p;while((p=l.exec(t))!==null){if(P(p.index,o))continue;let h=p[1]==="/";if(!h&&(p[2]||"").trimEnd().endsWith("/"))continue;if(f+=h?-1:1,f===0)return{openTag:c,openIndex:s.index,start:u,end:p.index,tagName:a}}return null}return null}var _e="private, no-store";function no(t){return t.replace(/&#(\d+);/g,(n,e)=>O(Number(e),n)).replace(/&#x([0-9a-f]+);/gi,(n,e)=>O(Number.parseInt(e,16),n)).replace(/</g,"<").replace(/>/g,">").replace(/"/g,'"').replace(/'/g,"'").replace(/&/g,"&")}function O(t,n){if(!Number.isInteger(t)||t<0||t>1114111)return n;try{return String.fromCodePoint(t)}catch{return n}}function ne(t){return t.headers.get("X-STX-Router")==="true"}function z(t,n){if(!t)return n;return t.split(",").some((r)=>r.trim().toLowerCase()===n.toLowerCase())?t:`${t}, ${n}`}function C(t){return{Vary:z(t,"X-STX-Router")}}var G="stx-page-head:",U=/<!--stx-page-head:([A-Za-z0-9+/=]+)-->\n?/,v={dev:null,prod:null};function W(){let t=D()?"dev":"prod",n=v[t];if(n!==null)return n;try{let e=import.meta.require("./chunk-nkveg25t.js"),r=t==="dev"&&typeof e.getRouterScriptDev==="function"?e.getRouterScriptDev:e.getRouterScript;v[t]=`<script>${r()}</script>`}catch{v[t]=""}return v[t]}async function ro(t,n){if(n===!1)return null;if(n&&typeof n==="string"){let r=E.resolve(t,n);if(await Bun.file(r).exists())return r;return null}let e=E.join(t,"app.stx");if(await Bun.file(e).exists())return e;return null}async function vr(t,n){try{let e=await Bun.file(t).text(),r=e,o=e.match(/<template\b[^>]*>([\s\S]*?)<\/template>/i);if(o)r=o[1].trim();let s=to(e),a=[...s.client.map((m)=>m.fullTag),...s.signals.map((m)=>m.fullTag)],i=[],c=/<style\b[^>]*>([\s\S]*?)<\/style>/gi,u;while((u=c.exec(e))!==null)i.push(u[0]);let l=r;for(let m of s.server)l=l.replace(m.fullTag,"");for(let m of s.client)l=l.replace(m.fullTag,"");l=l.replace(/<style\b[^>]*>[\s\S]*?<\/style>/gi,"");let f="<!--__STX_PAGE_SLOT__-->";if(l=l.replace(/<slot\s*\/>/gi,f).replace(/<slot\s*>\s*<\/slot>/gi,f),!l.includes(f))return console.warn(`[stx] Shell ${t} has no <slot /> \u2014 pages won't be injected`),null;let{processDirectives:p,extractVariables:h,defaultConfig:x,loadStxConfig:y}=await import("./chunk-987mr7v4.js"),R=await y(),g={__filename:t,__dirname:E.dirname(t)};for(let m of a){let A=m.match(/<script\b[^>]*>([\s\S]*?)<\/script>/i);if(A&&!m.includes("client")&&!m.includes('type="module"'))await h(A[1],g,t)}let S=await p(l,g,t,{...x,...R,...n},new Set),w=S.indexOf(f);if(w===-1)return console.warn("[stx] Shell slot placeholder lost during processing"),null;return{beforeSlot:S.substring(0,w),afterSlot:S.substring(w+f.length),filePath:t,shellScripts:a,shellStyles:i}}catch(e){return console.error(`[stx] Error processing shell ${t}:`,e),null}}function kn(t,n,e){let r,o="",s=n.match(U);if(s){n=n.replace(s[0],"");try{let l=Buffer.from(s[1],"base64").toString("utf8"),f=l.match(/<title[^>]*>([\s\S]*?)<\/title>/i);if(f)r=f[1].trim();o=l.replace(/<title[^>]*>[\s\S]*?<\/title>/i,"").trim()}catch{}}let a=e||r||"stx App",i=W(),c="<script>window.__stxRouterConfig={container:'[data-stx-content]'};</script>";return`<!DOCTYPE html>
|
|
3
3
|
<html lang="en">
|
|
4
4
|
<head>
|
|
5
5
|
<meta charset="UTF-8">
|
|
@@ -26,5 +26,5 @@ ${i}
|
|
|
26
26
|
`));if(o.length>0)x.push(o.join(`
|
|
27
27
|
`));if(f.length>0)x.push(f.join(`
|
|
28
28
|
`));return x.push(l),x.join(`
|
|
29
|
-
`)}function _(t,n,e={}){let r=`${encodeURIComponent(t)}=${encodeURIComponent(n)}`;if(e.maxAge!==void 0)r+=`; Max-Age=${e.maxAge}`;if(e.expires)r+=`; Expires=${e.expires.toUTCString()}`;if(e.path)r+=`; Path=${e.path}`;if(e.domain)r+=`; Domain=${e.domain}`;if(e.secure)r+="; Secure";if(e.httpOnly)r+="; HttpOnly";if(e.sameSite)r+=`; SameSite=${e.sameSite}`;return r}async function J(t){let n=t.headers.get("content-type")||"",e={},r=(o,s)=>{let a=e[o];if(a===void 0)e[o]=s;else if(Array.isArray(a))a.push(s);else e[o]=[a,s]};if(n.includes("multipart/form-data")){let o=await t.formData();for(let[s,a]of o.entries())if(typeof a==="string")r(s,a);return e}if(n.includes("application/x-www-form-urlencoded")){for(let[o,s]of new URLSearchParams(await t.text()).entries())r(o,s);return e}return e}function xr(t){if(!t)return!1;let n=t.toUpperCase();return n!=="GET"&&n!=="HEAD"}async function N(t,n={}){let e=n.request,r=n.method??e?.method;if(!e||!xr(r))return{ran:!1};if(typeof t.action!=="function")return{ran:!1};let o={};try{o=await J(e)}catch{}let s=await t.action({request:e,form:o,params:n.params??{},query:t.query??{},cookies:n.cookies??{}});if(s&&typeof s==="object"){let a=s,i=K(a.cookies),c=a.redirect;if(typeof c==="string"&&c)return{redirect:c,ran:!0,...i.length>0?{cookies:i}:{}};let{cookies:u,redirect:l,...f}=a;if(Object.assign(t,f),i.length>0)return{ran:!0,cookies:i}}return{ran:!0}}function K(t){if(!t||typeof t!=="object"||Array.isArray(t))return[];let n=[];for(let[e,r]of Object.entries(t)){if(!e)continue;if(typeof r==="string"){n.push(_(e,r));continue}if(r&&typeof r==="object"){let o=r;if(typeof o.value!=="string")continue;n.push(_(e,o.value,o))}}return n}function co(t,n=[],e){let r=new Headers({Location:t,"Cache-Control":"no-store"});for(let o of n)r.append("Set-Cookie",o);for(let[o,s]of Object.entries(e??{}))if(o.toLowerCase()!=="location")r.set(o,s);return new Response(null,{status:303,headers:r})}import k from"fs";import I from"path";function oo(t,n,e){return{version:1,buildTime:new Date().toISOString(),routes:t,assets:n,outputDir:e}}function io(t,n){let e=I.join(n,"manifest.json");k.writeFileSync(e,JSON.stringify(t,null,2))}function ao(t){let n=I.join(t,"manifest.json");if(!k.existsSync(n))return null;try{let e=k.readFileSync(n,"utf-8"),r=JSON.parse(e);if(r.version!==1)return console.warn(`[stx] Manifest version mismatch: expected 1, got ${r.version}`),null;return r}catch(e){return console.warn("[stx] Failed to load manifest:",e),null}}async function Pt(t,n={}){let{html:e,context:r,redirect:o,cookies:s}=await Z(t,n),a=Be(r),i=Fe(r);if(o)return{html:e,redirect:o,cookies:s,status:a,headers:i};let{extractStreamBoundaries:c}=await import("./chunk-
|
|
29
|
+
`)}function _(t,n,e={}){let r=`${encodeURIComponent(t)}=${encodeURIComponent(n)}`;if(e.maxAge!==void 0)r+=`; Max-Age=${e.maxAge}`;if(e.expires)r+=`; Expires=${e.expires.toUTCString()}`;if(e.path)r+=`; Path=${e.path}`;if(e.domain)r+=`; Domain=${e.domain}`;if(e.secure)r+="; Secure";if(e.httpOnly)r+="; HttpOnly";if(e.sameSite)r+=`; SameSite=${e.sameSite}`;return r}async function J(t){let n=t.headers.get("content-type")||"",e={},r=(o,s)=>{let a=e[o];if(a===void 0)e[o]=s;else if(Array.isArray(a))a.push(s);else e[o]=[a,s]};if(n.includes("multipart/form-data")){let o=await t.formData();for(let[s,a]of o.entries())if(typeof a==="string")r(s,a);return e}if(n.includes("application/x-www-form-urlencoded")){for(let[o,s]of new URLSearchParams(await t.text()).entries())r(o,s);return e}return e}function xr(t){if(!t)return!1;let n=t.toUpperCase();return n!=="GET"&&n!=="HEAD"}async function N(t,n={}){let e=n.request,r=n.method??e?.method;if(!e||!xr(r))return{ran:!1};if(typeof t.action!=="function")return{ran:!1};let o={};try{o=await J(e)}catch{}let s=await t.action({request:e,form:o,params:n.params??{},query:t.query??{},cookies:n.cookies??{}});if(s&&typeof s==="object"){let a=s,i=K(a.cookies),c=a.redirect;if(typeof c==="string"&&c)return{redirect:c,ran:!0,...i.length>0?{cookies:i}:{}};let{cookies:u,redirect:l,...f}=a;if(Object.assign(t,f),i.length>0)return{ran:!0,cookies:i}}return{ran:!0}}function K(t){if(!t||typeof t!=="object"||Array.isArray(t))return[];let n=[];for(let[e,r]of Object.entries(t)){if(!e)continue;if(typeof r==="string"){n.push(_(e,r));continue}if(r&&typeof r==="object"){let o=r;if(typeof o.value!=="string")continue;n.push(_(e,o.value,o))}}return n}function co(t,n=[],e){let r=new Headers({Location:t,"Cache-Control":"no-store"});for(let o of n)r.append("Set-Cookie",o);for(let[o,s]of Object.entries(e??{}))if(o.toLowerCase()!=="location")r.set(o,s);return new Response(null,{status:303,headers:r})}import k from"fs";import I from"path";function oo(t,n,e){return{version:1,buildTime:new Date().toISOString(),routes:t,assets:n,outputDir:e}}function io(t,n){let e=I.join(n,"manifest.json");k.writeFileSync(e,JSON.stringify(t,null,2))}function ao(t){let n=I.join(t,"manifest.json");if(!k.existsSync(n))return null;try{let e=k.readFileSync(n,"utf-8"),r=JSON.parse(e);if(r.version!==1)return console.warn(`[stx] Manifest version mismatch: expected 1, got ${r.version}`),null;return r}catch(e){return console.warn("[stx] Failed to load manifest:",e),null}}async function Pt(t,n={}){let{html:e,context:r,redirect:o,cookies:s}=await Z(t,n),a=Be(r),i=Fe(r);if(o)return{html:e,redirect:o,cookies:s,status:a,headers:i};let{extractStreamBoundaries:c}=await import("./chunk-k94w32zh.js"),u=c(r),l=t.streamTemplates;if(l&&Object.keys(l).length>0){let{processDirectives:f}=await import("./chunk-ymvmhaqn.js"),{defaultConfig:p}=await import("./chunk-dqd53ks1.js"),h=r.streamBoundaries||{},x={...p,autoShell:!1},y=Object.keys(l).map((g)=>({id:g,render:async()=>{let S=typeof h[g]==="function"?await h[g]():void 0;return f(l[g],{...r,$boundary:S},t.sourceFile,x,new Set)}})),R=new Set(y.map((g)=>g.id));u=[...(u||[]).filter((g)=>!R.has(g.id)),...y]}return{html:e,boundaries:u&&u.length>0?u:void 0,cookies:s,status:a,headers:i}}async function Z(t,n){let e={__filename:t.sourceFile,__dirname:t.sourceFile.replace(/[/\\][^/\\]+$/,""),...n};if(!t.hasServerScripts&&!Gr(t.html))return{html:t.html,context:e};for(let a of t.serverScriptContent)try{await d(a,e,t.sourceFile)}catch(i){if(n.__stx_strict_hydration)throw i;console.warn(`[stx] Server script error in ${t.sourceFile}:`,i)}let r=await N(e,{request:n.request,method:n.method,params:n.params??{},cookies:n.cookies??{}}),o=(a)=>{let i=a.replace(/<script\b[^>]*\bdata-stx-server-data\b[^>]*>[\s\S]*?<\/script>/gi,""),c=Bn(e);if(!c)return i;let u=i.indexOf("</head>");return u<0?c+i:i.slice(0,u)+c+i.slice(u)};if(r.redirect)return{html:t.html,context:e,redirect:r.redirect,cookies:r.cookies};if(!Gr(t.html))return{html:o(t.html),context:e,cookies:r.cookies};let s=new Map;for(let[a,i]of Object.entries(t.placeholders))if(i.expression)try{let c=b(i.expression,e);if(i.type==="raw")s.set(a,c!==void 0&&c!==null?String(c):"");else s.set(a,c!==void 0&&c!==null?wt(String(c)):"")}catch(c){if(n.__stx_strict_hydration)throw c;s.set(a,"")}return{html:o(Fo(t.html,s)),context:e,cookies:r.cookies}}
|
|
30
30
|
export{to,_e,no,ne,C,ro,vr,kn,ge,so,re,oo,io,ao,xr,co,Pt};
|
|
@@ -1,4 +1,4 @@
|
|
|
1
1
|
// @bun
|
|
2
|
-
import{Pe,Ut}from"./chunk-p7m673vn.js";import{Se}from"./chunk-qzgqg0bw.js";import{jo,Bo,f,xt,M,Fn,zn,Hn,n,Q,A,o}from"./chunk-
|
|
2
|
+
import{Pe,Ut}from"./chunk-p7m673vn.js";import{Se}from"./chunk-qzgqg0bw.js";import{jo,Bo,f,xt,M,Fn,zn,Hn,n,Q,A,o}from"./chunk-vavj9qkx.js";import{S}from"./chunk-jwpcck1b.js";import{vs}from"./chunk-ame3pmf0.js";import{ln,de}from"./chunk-zqzv5jy2.js";import{yi}from"./chunk-yx37nrgr.js";import{ge,re,oo,io,Pt}from"./chunk-r4xyes78.js";import{yt,Hr}from"./chunk-4c84e4qb.js";import{It}from"./chunk-rdq113p4.js";import{dt,Xt,Gt}from"./chunk-yd50awqp.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?Ut():Pe(),a=J(l);return{content:l,filename:`runtime.${a}.js`,hash:a}}function V(){let i=Se(),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(),_=te("sha256").update(e).digest("hex").slice(0,16);jo();let R={};try{R=await o(a.configDir)}catch{}let y=[],d=/<script\b([^>]*)>([\s\S]*?)<\/script>/gi,g;while((g=d.exec(e))!==null){let v=g[1];if(/\bserver\b/.test(v))y.push(g[2])}let u=new Set(y.flatMap((v)=>Q(v))),{context:w}=se({__filename:r,__dirname:q.dirname(r),__stx_serverDeclared:u}),C=new Set,P={...A,...R,...a,buildMode:"compile",strict:!1},b=await n(e,w,r,P,C),T=ge(b),B=Bo();return{route:l,sourceFile:i,html:b,fragment:T,placeholders:B,hasServerScripts:y.length>0,serverScriptContent:y,dependencies:Array.from(C),contentHash:_,status:xt(e),streamTemplates:w.__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(_,R){let y=m.readdirSync(_,{withFileTypes:!0});for(let d of y){if(ne.has(d.name))continue;let g=c.join(_,d.name),u=c.join(R,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 Xc(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),_=c.resolve(a,i.componentsDir??e.componentsDir??"components"),R=c.resolve(a,i.partialsDir??e.partialsDir??"partials"),y=c.resolve(a,i.layoutsDir??e.layoutsDir??"layouts"),d=i.publicDir??e.publicDir??"public",g=de(e.app?.head,{known:ln,source:"app.head"}),u=e.app?.colorMode,w=e.router?.container||"main",C=i.routeRules??e.routeRules??{},P=It(C),b=i.serverApi??e.serverApi,T=typeof b==="object"?b:{};if(b)yt(a,T);if(e.runtimeConfig)S(e.runtimeConfig,{});if(m.existsSync(r))m.rmSync(r,{recursive:!0});let B=[c.join(r,"public","__stx"),c.join(r,"public","assets"),c.join(r,"server","pages"),c.join(r,"server","fragments")];for(let s of B)m.mkdirSync(s,{recursive:!0});console.log("[stx build] Discovering routes...");let v=M(a,{pagesDirs:e._layerPageDirs}),Y=["components","layouts","partials"],O=v.filter((s)=>!Y.some((h)=>s.pattern.startsWith(`/${h}/`)||s.pattern===`/${h}`));console.log(`[stx build] Found ${O.length} page routes (${v.length-O.length} non-page files excluded)`),console.log("[stx build] Generating shared assets...");let D=U(i.debug),x=V();await Bun.write(c.join(r,"public","__stx",D.filename),D.content),await Bun.write(c.join(r,"public","__stx",x.filename),x.content),console.log(`[stx build] Runtime: ${D.filename} (${(D.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 k=[],H=[];for(let s of O){let h=P(s.pattern),E=h.rendering==="prerender";if(E&&(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:_,partialsDir:R,layoutsDir:y,debug:i.debug});if(k.push(t),t.html=t.html.replace(/runtime\.__STX_HASH__\.js/g,D.filename).replace(/router\.__STX_HASH__\.js/g,x.filename),t.html=Hn(t.html,g,{bodyScripts:[`<script src="/__stx/${x.filename}"></script>`],...u&&{colorMode:u}}),u)t.html=Fn(t.html,u);if(g.htmlAttrs)t.html=zn(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),E){let p=await Pt(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,w);let z=s.pattern==="/"?"index":s.pattern.slice(1).replace(/\//g,"-").replace(/[[\]]/g,"_"),G=c.join("server","pages",`${z}.compiled.json`),I=c.join("server","fragments",`${z}.html`);await Bun.write(c.join(r,G),JSON.stringify(t,null,2)),await Bun.write(c.join(r,I),t.fragment),H.push({pattern:s.pattern,compiledPath:G,fragmentPath:I,isDynamic:t.hasServerScripts,hasParams:s.pattern.includes(":")||s.pattern.includes("["),prerendered:E}),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 F=c.resolve(a,d);if(m.existsSync(F)){let{copied:s,bytes:h}=Z(F,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 N=Gt(a);if(N){let{copied:s,bytes:h}=Z(N,c.join(r,"public",Xt));if(s>0)console.log(`[stx build] Copied ${s} asset${s===1?"":"s"} (${(h/1024).toFixed(1)}KB) from ${dt}/`)}let K={runtime:D.filename,router:x.filename},j=oo(H,K,r);if(j.routeRules=C,j.routerContainer=w,b)j.apiRoutes=await Hr(a,r,T);if(e.runtimeConfig)await Bun.write(c.join(r,"server/runtime-config.json"),JSON.stringify(e.runtimeConfig)),await vs(a,e.runtimeConfig);if(e._layerGraph)await Bun.write(c.join(r,"server/layers.json"),JSON.stringify(yi(e._layerGraph),null,2));io(j,r);let L=Date.now()-l;return console.log(`
|
|
3
3
|
[stx build] Done in ${L}ms \u2014 ${k.length} pages compiled`),{pageCount:k.length,assets:K,outputDir:r,duration:L}}
|
|
4
4
|
export{Xc};
|
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
// @bun
|
|
2
|
-
import{d,os,Go,Jo,mc,hc,yc,bc,wc,vc,Ve,N,Ue,xc,Un,Sc,ai,kc,We,r,Wn,ci,g,ee,ju}from"./chunk-
|
|
2
|
+
import{d,os,Go,Jo,mc,hc,yc,bc,wc,vc,Ve,N,Ue,xc,Un,Sc,ai,kc,We,r,Wn,ci,g,ee,ju}from"./chunk-vavj9qkx.js";import"./chunk-0xztxj98.js";import"./chunk-73h7qjgq.js";import"./chunk-yx37nrgr.js";import"./chunk-ame3pmf0.js";import"./chunk-jwpcck1b.js";import"./chunk-g8k5rsqq.js";import"./chunk-zqzv5jy2.js";import"./chunk-5xj1df83.js";import"./chunk-axydabse.js";import"./chunk-afhkvj3k.js";import"./chunk-qzgqg0bw.js";import"./chunk-dqr5n49p.js";export{ee as clearComponentCache,kc as componentClientSignalNames,os as convertToCommonJS,g as createDetailedErrorMessage,wc as extractDirectiveNames,Go as extractScriptFromTemplate,d as extractVariables,r as fileExists,ju as getComponentCacheStats,hc as getPositionInfo,N as getSharedTranspiler,ci as getSourceLineInfo,bc as hasDirectives,Jo as hasVariables,Sc as isHydrateTrigger,vc as isJavaScriptScript,We as renderComponentWithSlot,Wn as resolveTemplatePath,xc as scopeOnRootElement,Ve as shouldTranspileTypeScript,ai as slotContentHasExpressions,Ue as transpileTypeScript,Un as userComponentFileExists,yc as validateDirective,mc as validateTemplate};
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
// @bun
|
|
2
|
-
import{Pn,Oe,Ne,me,Uo,Nn,Z,q,nn,d,n,A}from"./chunk-
|
|
2
|
+
import{Pn,Oe,Ne,me,Uo,Nn,Z,q,nn,d,n,A}from"./chunk-vavj9qkx.js";import{dirname as C,resolve as R}from"path";function h(o){return o.endsWith(".md")||o.endsWith(".markdown")}function _(o){let e=[];m(/<pre\b[^>]*>[\s\S]*?<\/pre>/gi);let r=[...e];m(/<code\b[^>]*>[\s\S]*?<\/code>/gi,r);function m(s,p){let u;while((u=s.exec(o))!==null){let t=u.index,i=t+u[0].length;if(p?.some((l)=>t>=l.start&&i<=l.end))continue;e.push({start:t,end:i})}}if(e.length===0)return o;e.sort((s,p)=>s.start-p.start);let a="",c=0;for(let s of e){if(s.start<c)continue;a+=o.slice(c,s.start),a+=`@raw${o.slice(s.start,s.end)}@endraw`,c=s.end}return a+=o.slice(c),a}async function b(o,e={}){let{data:r,content:m}=Pn(o),c=await(e.renderer??((s)=>Oe(s)))(m);return{html:_(c),frontmatter:r??{}}}function k(o){let e=o,r=Z(o);if(r)e=r.content.trim();let m=/<script\b([^>]*)>([\s\S]*?)<\/script>/gi,a=[],c=[],s=[],p=(i)=>/\b(?:state|derived|effect|batch)\s*(?:<[^<>()]*>)?\s*\(/.test(i),u;while((u=m.exec(o))!==null){let i=u[1],l=u[2],f=u[0],g=i.includes("server");if(p(l))s.push(f);else if(g)c.push(l);else a.push(f)}let t=e;{let i=/<script\b(?![^>]*\b(?:client|type\s*=\s*["']module["']|src\s*=))[^>]*>/gi,l,f=[];while((l=i.exec(t))!==null){let g=l.index+l[0].length,x=t.indexOf("</script>",g);if(x===-1)continue;f.push({start:l.index,end:x+9}),i.lastIndex=x+9}for(let g=f.length-1;g>=0;g--)t=t.substring(0,f[g].start)+t.substring(f[g].end)}for(let i of a)t=t.replace(i,"");return{templateContent:t,serverScripts:c,clientScripts:a,signalsScripts:s}}function v(o,e){return`<!DOCTYPE html>
|
|
3
3
|
<html lang="en">
|
|
4
4
|
<head>
|
|
5
5
|
<meta charset="UTF-8">
|
|
@@ -14,5 +14,5 @@ ${c.join(`
|
|
|
14
14
|
`)}`}else{if(r.processClientScripts!==!1&&c.length>0){let i=p.__stx_event_bindings||[],l=Ne(p),g=(await Promise.all(c.map(async(w)=>{let y=w.match(/<script\b[^>]*>([\s\S]*?)<\/script>/);if(!y)return w;return await me(y[1],{eventBindings:i,templateContent:t,serverData:l,filePath:e})}))).join(`
|
|
15
15
|
`);if(t.match(/(<\/body>)/i))t=t.replace(/(<\/body>)/i,`${g}
|
|
16
16
|
$1`);else t+=`
|
|
17
|
-
${g}`}t=await q(t)}if(r.wrapInDocument){if(!t.trim().toLowerCase().startsWith("<!doctype")&&!t.trim().toLowerCase().startsWith("<html"))t=v(t,r.title)}if(r.injectCSS)try{let{injectCss:i}=await import("./chunk-
|
|
17
|
+
${g}`}t=await q(t)}if(r.wrapInDocument){if(!t.trim().toLowerCase().startsWith("<!doctype")&&!t.trim().toLowerCase().startsWith("<html"))t=v(t,r.title)}if(r.injectCSS)try{let{injectCss:i}=await import("./chunk-ygvyg62e.js");t=await i(t)}catch{}return t}
|
|
18
18
|
export{Eo};
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
// @bun
|
|
2
|
-
import"./chunk-5xj1df83.js";import"./chunk-73h7qjgq.js";import"./chunk-qzgqg0bw.js";import{sr,Is,_i}from"./chunk-afhkvj3k.js";import"./chunk-axydabse.js";import{Mn,jn,n,o}from"./chunk-rz4b20k1.js";import"./chunk-zqzv5jy2.js";import"./chunk-g8k5rsqq.js";import"./chunk-jwpcck1b.js";import"./chunk-hx1dmj0e.js";import"./chunk-dqr5n49p.js";import"./chunk-yx37nrgr.js";import{Pe}from"./chunk-p7m673vn.js";import"./chunk-0xztxj98.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(Is),Se=new Set(sr);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(_i(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 Ie(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 Le(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 De(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 Xe(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 Oe(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 $e(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 ze(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 Ae(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 Ve(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&&Mn[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(Ie(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(He(s,r))continue;if(Ae(s,r))continue;if(Fe(s,r))continue;if(Ve(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-5xj1df83.js";import"./chunk-73h7qjgq.js";import"./chunk-qzgqg0bw.js";import{sr,Is,_i}from"./chunk-afhkvj3k.js";import"./chunk-axydabse.js";import{Mn,jn,n,o}from"./chunk-vavj9qkx.js";import"./chunk-zqzv5jy2.js";import"./chunk-g8k5rsqq.js";import"./chunk-jwpcck1b.js";import"./chunk-ame3pmf0.js";import"./chunk-dqr5n49p.js";import"./chunk-yx37nrgr.js";import{Pe}from"./chunk-p7m673vn.js";import"./chunk-0xztxj98.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(Is),Se=new Set(sr);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(_i(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 Ie(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 Le(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 De(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 Xe(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 Oe(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 $e(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 ze(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 Ae(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 Ve(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&&Mn[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(Ie(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(He(s,r))continue;if(Ae(s,r))continue;if(Fe(s,r))continue;if(Ve(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 jn(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}:
|