@stacksjs/stx 0.2.430 → 0.2.432
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-mdr0sr41.js → chunk-18rtxwty.js} +1 -1
- package/dist/{chunk-21rqr54j.js → chunk-19mnptan.js} +1 -1
- package/dist/{chunk-e1vsbjtw.js → chunk-2112wffa.js} +2 -2
- package/dist/{chunk-718avy9p.js → chunk-2gxe5pj7.js} +1 -1
- package/dist/{chunk-db6sq3d2.js → chunk-2xdqkskn.js} +1 -1
- package/dist/{chunk-f3dk4y9n.js → chunk-2y936zb0.js} +82 -82
- package/dist/{chunk-00h762q8.js → chunk-3b61yd4r.js} +1 -1
- package/dist/{chunk-pdp961ge.js → chunk-4dvb6crf.js} +1 -1
- package/dist/{chunk-vpz0t82q.js → chunk-4gs26aa4.js} +1 -1
- package/dist/{chunk-n7nvj7dk.js → chunk-5egy805h.js} +1 -1
- package/dist/{chunk-2mzy3z72.js → chunk-61gkb7kj.js} +1 -1
- package/dist/chunk-66acqgyj.js +2 -0
- package/dist/{chunk-z21mv6bz.js → chunk-7534j756.js} +1 -1
- package/dist/{chunk-513vzzf5.js → chunk-a1wag3ds.js} +1 -1
- package/dist/{chunk-n58q81vv.js → chunk-be01xyb8.js} +1 -1
- package/dist/{chunk-0sg48cd0.js → chunk-bfk9vd0v.js} +1 -1
- package/dist/{chunk-e6j0tynb.js → chunk-d20xsth5.js} +1 -1
- package/dist/{chunk-1qf3wc23.js → chunk-d9hwqs78.js} +1 -1
- package/dist/{chunk-hxn9gk7h.js → chunk-dsxgv6g2.js} +107 -107
- package/dist/{chunk-h3anf0qz.js → chunk-dx2nvsb9.js} +1 -1
- package/dist/{chunk-1sqf2vvk.js → chunk-dxvh9qea.js} +1 -1
- package/dist/{chunk-35qj567j.js → chunk-e1yags7g.js} +1 -1
- package/dist/{chunk-h873ye0z.js → chunk-e7n9gzf4.js} +2 -2
- package/dist/{chunk-jeand25b.js → chunk-f29rsb4g.js} +1 -1
- package/dist/{chunk-6wynj5pv.js → chunk-fdz00v9y.js} +1 -1
- package/dist/{chunk-7gsdrmh1.js → chunk-fk1qnh5n.js} +1 -1
- package/dist/{chunk-4fqtfhv2.js → chunk-ga18rt5h.js} +1 -1
- package/dist/{chunk-je7ymnck.js → chunk-hpjtjd0c.js} +1 -1
- package/dist/{chunk-1gqd0mdg.js → chunk-hr0b9xec.js} +1 -1
- package/dist/{chunk-0hd9xzf2.js → chunk-j67ns7p6.js} +1 -1
- package/dist/{chunk-hr5db6bk.js → chunk-k1pjb22z.js} +1 -1
- package/dist/{chunk-84gsk8fk.js → chunk-knmj9ynm.js} +1 -1
- package/dist/{chunk-cr3f21mg.js → chunk-mqbknfvt.js} +1 -1
- package/dist/{chunk-d50dn3jp.js → chunk-myfm3415.js} +1 -1
- package/dist/{chunk-4rvwz6jn.js → chunk-nswshvzg.js} +1 -1
- package/dist/{chunk-85pvq4a2.js → chunk-pmpc9fd5.js} +1 -1
- package/dist/{chunk-8f39se4k.js → chunk-rwrbcam0.js} +1 -1
- package/dist/{chunk-3hv5ggdq.js → chunk-s6dfjx5d.js} +1 -1
- package/dist/{chunk-jv9gvzvy.js → chunk-tgq0vprh.js} +1 -1
- package/dist/{chunk-jkks9x5g.js → chunk-tz3v9sdj.js} +1 -1
- package/dist/{chunk-6gnza26n.js → chunk-vkhrkt58.js} +1 -1
- package/dist/{chunk-z52txevf.js → chunk-vz821mjg.js} +1 -1
- package/dist/{chunk-98hj1mvn.js → chunk-vz86nx8y.js} +1 -1
- package/dist/{chunk-78ac2603.js → chunk-w715g0wp.js} +1 -1
- package/dist/{chunk-gc0w2cx7.js → chunk-wrj5fcvb.js} +2 -2
- package/dist/{chunk-5f6nfpm7.js → chunk-xtmfcav4.js} +1 -1
- package/dist/{chunk-veqtn1rd.js → chunk-zjet6r6p.js} +1 -1
- package/dist/{chunk-n4203761.js → chunk-zywwzf6t.js} +1 -1
- package/dist/cli.js +7 -7
- package/dist/composables/use-broadcast-stream.d.ts +11 -0
- package/dist/composables/use-broadcast-stream.js +63 -0
- package/dist/craft-entry.js +1 -1
- package/dist/craft.js +1 -1
- package/dist/index.d.ts +1 -0
- package/dist/index.js +1 -0
- package/dist/pwa.js +1 -1
- package/dist/ssg.js +2 -2
- package/dist/utils.js +23 -6
- package/package.json +5 -5
- package/dist/chunk-h03hamnb.js +0 -2
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
// @bun
|
|
2
|
-
import{il}from"./chunk-
|
|
2
|
+
import{il}from"./chunk-zjet6r6p.js";import"./chunk-dsxgv6g2.js";import"./chunk-ktedzx9e.js";import"./chunk-3ry9ca1s.js";import"./chunk-k8sqs7j2.js";import"./chunk-be01xyb8.js";import"./chunk-y438dzvn.js";import"./chunk-fb7bfyjz.js";import"./chunk-mjgqhhap.js";import"./chunk-5f0r0g18.js";import"./chunk-axydabse.js";import"./chunk-w3j0ppg4.js";import"./chunk-12pvnn1e.js";import"./chunk-b7973zvk.js";export{il as buildApp};
|
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
// @bun
|
|
2
|
-
import{In,za,yu,Ha,bu,Va,Dn,h,wt,he,Ua,Xr,Wa,wu,W,qa,vu,b,xu}from"./chunk-
|
|
2
|
+
import{In,za,yu,Ha,bu,Va,Dn,h,wt,he,Ua,Xr,Wa,wu,W,qa,vu,b,xu}from"./chunk-dsxgv6g2.js";import"./chunk-ktedzx9e.js";import"./chunk-3ry9ca1s.js";import"./chunk-k8sqs7j2.js";import"./chunk-be01xyb8.js";import"./chunk-y438dzvn.js";import"./chunk-fb7bfyjz.js";import"./chunk-mjgqhhap.js";import"./chunk-5f0r0g18.js";import"./chunk-axydabse.js";import"./chunk-w3j0ppg4.js";import"./chunk-12pvnn1e.js";import"./chunk-b7973zvk.js";export{qa as applyFilters,bu as clearCustomFilters,Ua as clientLoopScopes,In as defaultFilters,h as escapeHtml,wt as escapeHtmlValue,b as evaluateExpression,Va as findMustacheEnd,Ha as getAllFilters,Wa as interpolateScriptAttributes,Xr as interpolateScriptExpressions,wu as interpolateScriptsInTemplate,W as processExpressions,za as registerFilter,yu as registerFilters,Dn as replaceInterpolations,vu as resetRejectedExpressionWarnings,xu as unescapeHtml,he as usesSignalsInScript};
|
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
// @bun
|
|
2
|
-
import{St,ic,oc,ac,cc,lc,d,uc,rs,dc,Ki,Xi}from"./chunk-
|
|
2
|
+
import{St,ic,oc,ac,cc,lc,d,uc,rs,dc,Ki,Xi}from"./chunk-dsxgv6g2.js";import"./chunk-ktedzx9e.js";import"./chunk-3ry9ca1s.js";import"./chunk-k8sqs7j2.js";import"./chunk-be01xyb8.js";import"./chunk-y438dzvn.js";import"./chunk-fb7bfyjz.js";import"./chunk-mjgqhhap.js";import"./chunk-5f0r0g18.js";import"./chunk-axydabse.js";import"./chunk-w3j0ppg4.js";import"./chunk-12pvnn1e.js";import"./chunk-b7973zvk.js";export{St as STX_ENGINE_BINDING_NAMES,rs as convertToCommonJS,Ki as extractScriptFromTemplate,d as extractVariables,Xi as hasVariables,uc as isCompleteImport,lc as isMissingBindingFailure,ac as isModuleResolutionFailure,cc as isSyntaxFailure,dc as splitDeclaration,ic as stripTypeScript,oc as withoutStxReferrer};
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
// @bun
|
|
2
|
-
import{Pn,Oe,Ne,me,Hi,Mn,Z,q,nn,d,n,A}from"./chunk-
|
|
2
|
+
import{Pn,Oe,Ne,me,Hi,Mn,Z,q,nn,d,n,A}from"./chunk-dsxgv6g2.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-2xdqkskn.js");t=await i(t)}catch{}return t}
|
|
18
18
|
export{ki};
|
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
// @bun
|
|
2
|
-
import{oe,Oa,Pi,ft,gt,gu,Ii,mt,Jt,Ma,Na,La,ja,ht,Ba}from"./chunk-
|
|
2
|
+
import{oe,Oa,Pi,ft,gt,gu,Ii,mt,Jt,Ma,Na,La,ja,ht,Ba}from"./chunk-j67ns7p6.js";import"./chunk-19mnptan.js";import"./chunk-dsxgv6g2.js";import"./chunk-ktedzx9e.js";import"./chunk-3ry9ca1s.js";import"./chunk-k8sqs7j2.js";import"./chunk-be01xyb8.js";import"./chunk-y438dzvn.js";import"./chunk-fb7bfyjz.js";import"./chunk-mjgqhhap.js";import"./chunk-5f0r0g18.js";import"./chunk-axydabse.js";import"./chunk-w3j0ppg4.js";import"./chunk-12pvnn1e.js";import"./chunk-b7973zvk.js";export{Jt as MODULE_SPECIFIER_PREFIX,ht as bundleClientScript,gt as clearBundleFailures,oe as clientBundleDependencies,ft as getBundleFailures,mt as hasUserImports,Na as normalizeRegistrySpecifiers,ja as queueClientBundleBuild,Pi as recordBundleFailure,Ma as registryIdForPath,Ii as resolveBundlerFallback,La as rewriteRegistryImports,gu as setBundlerFallbackMode,Oa as shouldLogBundlerDiagnostics,Ba as tempBuildName};
|
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
// @bun
|
|
2
|
-
import{bi,wi,vi,pu}from"./chunk-
|
|
2
|
+
import{bi,wi,vi,pu}from"./chunk-tz3v9sdj.js";import"./chunk-e7n9gzf4.js";import"./chunk-dsxgv6g2.js";import"./chunk-ktedzx9e.js";import"./chunk-3ry9ca1s.js";import"./chunk-k8sqs7j2.js";import"./chunk-be01xyb8.js";import"./chunk-y438dzvn.js";import"./chunk-fb7bfyjz.js";import"./chunk-mjgqhhap.js";import"./chunk-5f0r0g18.js";import"./chunk-axydabse.js";import"./chunk-w3j0ppg4.js";import"./chunk-12pvnn1e.js";import"./chunk-b7973zvk.js";export{bi as buildNative,pu as default,vi as getAvailableFormats,wi as getAvailableTargets};
|
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
// @bun
|
|
2
|
-
import{kt,ss,Gi,pc}from"./chunk-
|
|
2
|
+
import{kt,ss,Gi,pc}from"./chunk-dsxgv6g2.js";import"./chunk-ktedzx9e.js";import"./chunk-3ry9ca1s.js";import"./chunk-k8sqs7j2.js";import"./chunk-be01xyb8.js";import"./chunk-y438dzvn.js";import"./chunk-fb7bfyjz.js";import"./chunk-mjgqhhap.js";import"./chunk-5f0r0g18.js";import"./chunk-axydabse.js";import"./chunk-w3j0ppg4.js";import"./chunk-12pvnn1e.js";import"./chunk-b7973zvk.js";export{pc as declareBareLoopHead,kt as parseLoopBinding,Gi as processLoops,ss as reportDeferredLoopWarnings};
|
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
// @bun
|
|
2
|
-
import{ol}from"./chunk-
|
|
2
|
+
import{ol}from"./chunk-myfm3415.js";import"./chunk-wrj5fcvb.js";import"./chunk-19mnptan.js";import"./chunk-dsxgv6g2.js";import"./chunk-ktedzx9e.js";import"./chunk-3ry9ca1s.js";import"./chunk-k8sqs7j2.js";import"./chunk-be01xyb8.js";import"./chunk-y438dzvn.js";import"./chunk-fb7bfyjz.js";import"./chunk-mjgqhhap.js";import"./chunk-5f0r0g18.js";import"./chunk-axydabse.js";import"./chunk-w3j0ppg4.js";import"./chunk-12pvnn1e.js";import"./chunk-b7973zvk.js";export{ol as startProductionServer};
|
|
@@ -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-f29rsb4g.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-bfk9vd0v.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,2 +1,2 @@
|
|
|
1
1
|
// @bun
|
|
2
|
-
import{Gr,Jr,Yr,Iu,Nn,Du}from"./chunk-
|
|
2
|
+
import{Gr,Jr,Yr,Iu,Nn,Du}from"./chunk-dsxgv6g2.js";export{Nn as clearImageDeliveryCatalog,Iu as deliveredImage,Yr as efficientDeliverySources,Gr as getImageDelivery,Jr as isTransparentImage,Du as prepareImageDelivery};
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
// @bun
|
|
2
|
-
import{y,Me,I,Yt,i,T}from"./chunk-
|
|
2
|
+
import{y,Me,I,Yt,i,T}from"./chunk-dsxgv6g2.js";import{Vr}from"./chunk-19mnptan.js";import{s,be}from"./chunk-3pxp0r0a.js";import{a}from"./chunk-wtms9jhs.js";import f from"path";import b from"fs";function de(e){if(!e||typeof e!=="object")return!1;let t=e;return typeof t.message==="string"&&(t.name==="BuildMessage"||t.name==="ResolveMessage"||("position"in t))}function pe(e){if(e&&typeof e==="object"&&Array.isArray(e.errors))return e.errors;return[e]}function z(e,t){let r=[];for(let l of pe(e)){if(de(l)){let u=l.position||void 0;r.push({file:t||u?.file,line:u?.line,column:u?.column,message:l.message??"",lineText:u?.lineText});continue}r.push({file:t,message:l instanceof Error?l.message:String(l)})}return r}function De(e,t){return z(e,t).map((r)=>{let l=r.file?`${r.file}${r.line?`:${r.line}${r.column?`:${r.column}`:""}`:""}`:"",u=r.lineText?`
|
|
3
3
|
${r.lineText.trim()}`:"";return l?`${l}: ${r.message}${u}`:`${r.message}${u}`}).join(`
|
|
4
4
|
`)}var me=9;function J(e,t,r){return/^(?:(?:stx|ui)\.config\.[cm]?[jt]s|runtime-config-(?:server|loader)\.[cm]?[jt]s)$/.test(f.basename(e))||Vr(e,t,r)}var re=1,se=new Map,P=600,fe=100,V=new Map;async function ge(e){let t=V.get(e)??0;if(t>0&&t<fe){V.set(e,t+1);return}V.set(e,1);try{let r=(await b.promises.readdir(e)).filter((p)=>p.endsWith(".js"));if(r.length<=P)return;let u=(await Promise.all(r.map(async(p)=>{try{return{name:p,at:(await b.promises.stat(f.join(e,p))).mtimeMs}}catch{return null}}))).filter((p)=>p!==null);u.sort((p,d)=>d.at-p.at);for(let p of u.slice(P)){let d=p.name.slice(0,-3);await b.promises.rm(f.join(e,`${d}.js`),{force:!0}),await b.promises.rm(f.join(e,`${d}.deps.json`),{force:!0})}F("pruned bundle cache to",P,"entries")}catch{}}function oe(e){return se.get(e)??[]}function G(e,t){if(e)se.set(e,t)}function Oa(e=process.env){return e.STX_DEBUG==="true"||e.STX_DEBUG==="1"}function F(...e){if(Oa())console.log("[stx:bundler]",...e)}var q=[];function Pi(e,t,r){q.push({filePath:e||"<inline>",message:t,details:r})}function ft(){return q.slice()}function gt(){q.length=0}var X;function gu(e){X=e}function Ii(){if(X)return X;try{let e=T.strict;return typeof e==="object"&&e!==null?e.bundlerFallback??"warn":"warn"}catch{return"warn"}}var ee=[/^stx$/,/^@stacksjs\/stx$/,/^@stores$/,/^stx\/stores$/,/^@composables$/];function mt(e){let t=/^[ \t]*import[ \t]+(?!type(?:[ \t]|{))[\s\S]*?\s+from\s+['"]([^'"]+)['"][ \t]*;?/gm,r;while((r=t.exec(e))!==null){let u=r[1];if(!ee.some((d)=>d.test(u)))return F("detected user import:",u),!0}let l=/^[ \t]*import[ \t]+['"]([^'"]+)['"]/gm;while((r=l.exec(e))!==null){let u=r[1];if(/\.css(?:\?.*)?$/.test(u))continue;if(!ee.some((d)=>d.test(u)))return F("detected side-effect import:",u),!0}return!1}var Jt="stx-module:",he=/\.(?:[cm]?[jt]sx?|json)$/i;function Ma(e,t){return f.relative(e,t).split(f.sep).join("/")}function Na(e,t){if(t.size===0)return e;return e.replace(/^([ \t]*import\s+(?:[^;"']*?\s+from\s+)?)(["'])([^"']+)\2/gm,(r,l,u,p)=>{let d=t.get(p);return d&&!p.startsWith(Jt)?`${l}${u}${d}${u}`:r})}function La(e,t){let r=0,l=(p)=>{let d=`__stxMod${r++}`,x=JSON.stringify(p);return t.push(`var ${d} = globalThis.__stxModules && globalThis.__stxModules[${x}];`,`if (${d} === undefined) throw new Error("[stx] module " + ${JSON.stringify(x)} + " is not registered on this page (#1957)");`),d},u=(p,d)=>{for(let x of p.split(",")){let v=x.trim();if(!v)continue;let c=v.match(/^("(?:[^"\\]|\\.)*"|[\w$]+)(?:\s+as\s+([\w$]+))?$/);if(!c)continue;let n=c[1].startsWith('"')?JSON.parse(c[1]):c[1],o=c[2]??n;t.push(`var ${o} = ${d}[${JSON.stringify(n)}];`)}};return e=e.replace(/^[ \t]*import\s+([^;"']*?)\s+from\s+["'](stx-module:[^"']+)["'];?[ \t]*$/gm,(p,d,x)=>{let v=x.slice(Jt.length),c=l(v),n=d.trim(),o=n.match(/^([\w$]+)\s*(?:,\s*|$)/);if(o&&!n.startsWith("{")&&!n.startsWith("*"))t.push(`var ${o[1]} = ${c}.default;`),n=n.slice(o[0].length).trim();let m=n.match(/^\*\s*as\s+([\w$]+)$/);if(m)t.push(`var ${m[1]} = ${c};`);else if(n.startsWith("{"))u(n.replace(/^\{|\}$/g,""),c);return""}),e=e.replace(/^[ \t]*import\s+["'](stx-module:[^"']+)["'];?[ \t]*$/gm,(p,d)=>(l(d.slice(Jt.length)),"")),e}function te(e){let t=[e,`${e}.ts`,`${e}.tsx`,`${e}.js`,`${e}.mjs`,`${e}.jsx`,f.join(e,"index.ts"),f.join(e,"index.tsx"),f.join(e,"index.js"),f.join(e,"index.mjs")];for(let r of t)try{if(b.existsSync(r)&&b.statSync(r,{throwIfNoEntry:!1})?.isFile())return r}catch{}return}function xe(e,t,r,l,u,p=new Map,d){let x=(c,n,o)=>{if(J(n,e,d))return null;if(!u||c!==r||!he.test(n))return null;try{if(!b.statSync(n,{throwIfNoEntry:!1})?.isFile())return null}catch{return null}l.add(n);let m=`${Jt}${Ma(process.cwd(),n)}`;return p.set(o,m),{path:m,external:!0}},v=(c,n)=>{let o=c===r?t:f.dirname(c),m=f.resolve(o,n);return te(m)??m};return{name:"stx-client-bundle",setup(c){if(c.onResolve({filter:/^(stx|@stacksjs\/stx)$/},(n)=>({path:n.path,external:!0})),c.onResolve({filter:/^(@stores|@composables|stx\/stores)$/},(n)=>({path:n.path,external:!0})),c.onResolve({filter:/^\//},(n)=>{let o=te(n.path);if(o){let m=x(n.importer,o,n.path);if(m)return m;if(o!==r)l.add(o);return{path:o}}return{path:n.path,external:!0}}),c.onResolve({filter:/^\.\.?\//},(n)=>{let o=v(n.importer,n.path),m=x(n.importer,o,n.path);if(m)return m;return l.add(o),{path:o}}),c.onResolve({filter:/^[@~]\//},(n)=>{let o=f.resolve(e,n.path.slice(2)),m=[o,`${o}.ts`,`${o}.tsx`,`${o}.js`,`${o}.mjs`,`${o}.jsx`,f.join(o,"index.ts"),f.join(o,"index.tsx"),f.join(o,"index.js"),f.join(o,"index.mjs")];for(let w of m)if(b.existsSync(w)&&b.statSync(w,{throwIfNoEntry:!1})?.isFile()){let N=x(n.importer,w,n.path);if(N)return N;return F(`resolved ${n.path[0]}/ import:`,n.path,"\u2192",w),l.add(w),{path:w}}return console.warn(`[stx:bundler] could not resolve ${n.path[0]}/ import:`,n.path),{path:o}}),u)c.onResolve({filter:/^(?!node:|bun:)(?:@[\w.-]+\/)?[\w.-]/},(n)=>{if(n.importer!==r)return;let o=`${Jt}npm:${n.path}`;return p.set(n.path,o),{path:o,external:!0}});c.onLoad({filter:/\.(?:[cm]?[jt]sx?|json)$/},(n)=>{if(J(n.path,e,d))throw Error(`Server-only API source cannot be imported by a client script: ${n.path}`);let o=f.extname(n.path).toLowerCase(),m=o===".json"?"json":o===".tsx"?"tsx":o===".jsx"?"jsx":o===".ts"||o===".mts"||o===".cts"?"ts":"js";if(n.path!==r)l.add(n.path);return{contents:b.readFileSync(n.path,"utf8"),loader:m}})}}}var W=new Map,O=I(64),ne=Symbol.for("stx.client-bundle-build-queue");function ja(e){let t=globalThis,l=(t[ne]??Promise.resolve()).then(e,e);return t[ne]=l.then(()=>{return},()=>{return}),l}async function ht(e,t,r={}){let l=r.projectRoot||process.cwd(),u=(await i(l)).serverApi,p=r.minify??!1,d=r.externalizeUserModules??!0,x=r.cacheDir||a(l,"bundle-cache"),v=new Bun.CryptoHasher("md5");v.update(`${me}\x00${Me()}\x00${JSON.stringify(u??!1)}\x00${d?"registry":"inline"}\x00${e}\x00${t}`);let c=v.digest("hex").slice(0,12),n=f.join(x,`${c}.js`),o=O.get(n);if(o){if(Yt(o.files)&&o.files.every((E)=>!J(E.path,l,u))){F("memo hit:",c);let E=o.files.map((S)=>S.path);return G(t,E),r.collectInputs?.push(...E),o.code}O.delete(n),F("memo invalidated by dep change:",c)}let m=f.join(x,`${c}.deps.json`),w=Bun.file(n);if(await w.exists()){let E=Bun.file(m),S=!1,B=null;if(await E.exists())try{let D=JSON.parse(await E.text());if(D.metadataVersion!==re||!Array.isArray(D.files))S=!1;else B=D.files,S=!0;if(B&&(!Yt(B)||B.some((k)=>J(k.path,l,u))))S=!1}catch{S=!1}if(S){if(F("cache hit:",c),B)G(t,B.map((k)=>k.path)),r.collectInputs?.push(...B.map((k)=>k.path));let D=await w.text();if(B)O.set(n,{code:D,files:B});return D}F("cache invalidated by dep change:",c)}let N=W.get(c);if(N){let E=await N;if(r.collectInputs)r.collectInputs.push(...(O.get(n)?.files??[]).map((S)=>S.path));return E}let _=ja(()=>ye(e,t,{projectRoot:l,minify:p,cacheDir:x,hash:c,cachePath:n,depsPath:m,collectInputs:r.collectInputs,externalizeUserModules:d,serverApi:u}));W.set(c,_);try{return await _}finally{W.delete(c)}}var $e=0;function Ba(e){return`${e}-${process.pid}-${++$e}`}async function ye(e,t,r){let{projectRoot:l,minify:u,cacheDir:p,hash:d,cachePath:x,depsPath:v,externalizeUserModules:c}=r,n=a(l,"bundle-tmp"),o=Ba(d),m=f.join(n,`${o}.ts`),w=f.join(n,"out",o);b.mkdirSync(n,{recursive:!0}),b.mkdirSync(w,{recursive:!0});let N=f.dirname(t),_=new Set,E=/^[ \t]*(export\s+)?(?:const|let|var)\s+(?:\{([^}]+)\}|(\w+))/gm,S=/^[ \t]*(export\s+)?(?:async\s+)?function\s+(\w+)/gm,B=s(e),{depths:D,balanced:k}=be(B),H=(j)=>!k||D[j]===0,M;while((M=E.exec(B))!==null){if(M[1])continue;if(!H(M.index))continue;if(M[2])M[2].split(",").forEach((j)=>{let h=we(j);if(h)_.add(h)});else if(M[3])_.add(M[3])}while((M=S.exec(B))!==null){if(M[1])continue;if(!H(M.index))continue;_.add(M[2])}let ie=_.size>0?`
|
|
5
5
|
export { ${[..._].join(", ")} }`:"";await Bun.write(m,e+ie),F("bundling:",d,"from:",f.basename(t));let Z=new Set,Y=new Map;try{let j=await Bun.build({entrypoints:[m],outdir:w,target:"browser",format:"esm",minify:u,plugins:[xe(l,N,m,Z,c,Y,r.serverApi)],define:{"process.env.NODE_ENV":u?'"production"':'"development"',...y()},root:l});if(!j.success){let R=j.logs.filter((C)=>C.level==="error").map((C)=>C.message).join(", ")||`Unable to bundle ${f.basename(t)}`,L=z(j.logs,t||void 0);if(console.warn("[stx:bundler] build failed:",R),Pi(t||"",R,L),Ii()==="error")throw Error(R);return e}let h="";for(let g of j.outputs){h=await g.text();break}let A=[];for(let g of h.matchAll(/^\s*export\s*\{([^}]*)\}\s*;?\s*$/gm))for(let R of g[1].split(",")){let L=R.trim().match(/^([A-Za-z_$][\w$]*)\s+as\s+([A-Za-z_$][\w$]*)$/);if(L){A.push([L[2],L[1]]);continue}let C=R.trim();if(/^[A-Za-z_$][\w$]*$/.test(C))A.push([C,C])}let Q=[];h=La(Na(h,Y),Q);let ae=h.match(/^\s*import\s+[^;]+;?\s*$/gm)||[];h=h.replace(/^\s*import\s+[^;]+;?\s*$/gm,"").replace(/^\s*export\s*\{[^}]*\}\s*;?\s*$/gm,"").replace(/^\s*export\s+default\s+.*$/gm,"").trim();let K=`__stxBundle_${d}`,le=A.map(([g,R])=>`${JSON.stringify(g)}: ${R}`).join(", "),ce=A.map(([g])=>`var ${g} = undefined;`).join(`
|
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
// @bun
|
|
2
|
-
import{an,bs}from"./chunk-
|
|
2
|
+
import{an,bs}from"./chunk-be01xyb8.js";import"./chunk-y438dzvn.js";export{bs as generateRuntimeConfigTypes,an as prepareRuntimeConfig};
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
// @bun
|
|
2
|
-
import{m}from"./chunk-w3j0ppg4.js";import{R,Tt}from"./chunk-axydabse.js";import{y,ze,N,i}from"./chunk-
|
|
2
|
+
import{m}from"./chunk-w3j0ppg4.js";import{R,Tt}from"./chunk-axydabse.js";import{y,ze,N,i}from"./chunk-dsxgv6g2.js";import{oe,mt,ht}from"./chunk-j67ns7p6.js";import{Ae,Vt,J}from"./chunk-j7zywbq0.js";import _ from"path";var g=new Map,v=new Map,P=["composables","functions"];function E(n){let t=_.basename(n,".ts");return t==="index"||t==="types"||n.endsWith(".d.ts")}async function G(n){if(n)return _.resolve(n);let t=`<default>:${process.cwd()}`,l=v.get(t);if(l!==void 0)return l;let s=await T();if(s!==null)v.set(t,s);return s}async function T(){let n=await i(),t=n.root||process.cwd(),l=n.composablesDir;if(l)return _.resolve(t,l);for(let s of P){let r=_.resolve(t,s);try{let c=new Bun.Glob("**/*.ts");for await(let a of c.scan({cwd:r,absolute:!0}))if(!E(a))return r}catch{}}return null}async function j(n){let t=Array.isArray(n)?n:n?[_.resolve(n)]:(await i())._layerComposableDirs??[await G()].filter((s)=>!!s),l=new Map;for(let s of t){let r=new Bun.Glob("**/*.ts");try{for await(let c of r.scan({cwd:s,absolute:!0})){let a=_.relative(s,c);if(!E(c)&&!l.has(a))l.set(a,c)}}catch{}}return{key:t.join("\x00"),files:[...l.values()].sort()}}async function Ir(n){let{files:t}=await j(n),l=N({loader:"ts",target:"browser",define:y()}),s=[];for(let r of t)try{let c=await Bun.file(r).text(),a=l.scan(c).exports.filter((d)=>d!=="default");if(a.length>0)s.push({file:r,names:a})}catch{}return s}function z(n,t){return new RegExp(`\\b${t.replace(/[.*+?^${}()|[\]\\]/g,"\\$&")}\\b`).test(n)}function U(n,t,l){let s=new Map;for(let{file:d,names:f}of n)for(let u of f)if(!s.has(u))s.set(u,d);let r=(d)=>{let f=[];for(let[u,w]of s)if(z(d,u))f.push(w);return f},c=new Set,a=l.flatMap(r);while(a.length>0){let d=[];for(let f of a){if(c.has(f))continue;c.add(f);for(let u of r(t.get(f)??""))if(!c.has(u))d.push(u)}a=d}return c}async function ml(n,t,l){let{key:s,files:r}=await j(n);if(!s)return null;let c=()=>[...new Set([...r,...r.flatMap((e)=>oe(e))])],a=Ae(c());if(r.length===0)return J(g,s,a,""),null;r.sort();let d=N({loader:"ts",target:"browser",define:y()}),f=new Map,u=[];for(let e of r)try{let o=await Bun.file(e).text();f.set(e,o);let h=d.scan(o).exports.filter((p)=>p!=="default");if(h.length>0)u.push({file:e,names:h})}catch{f.set(e,"")}let w=t===void 0?new Set(r):U(u,f,l?[t,...l]:[t]);if(w.size===0)return null;let B=r.filter((e)=>w.has(e)),x=`${s}\x00${B.join("\x00")}`,M=Vt(g,x,a);if(M!==void 0)return M||null;let S=[],b=new Set,D=new Set;for(let e of B)try{let o=f.get(e)??await Bun.file(e).text(),h=_.basename(e,".ts");for(let p of o.matchAll(/\b(?:const|let|var|function|class)\s+([A-Z_a-z$][\w$]*)/g))if(p[1])D.add(p[1]);try{for(let p of d.scan(o).exports)if(p!=="default")b.add(p)}catch{}if(o=R(o),mt(o))o=await ht(o,e,{projectRoot:process.cwd(),externalizeUserModules:!1}),o=ze(o);o=Tt(o),o=o.replace(/^export\s+(default\s+)?/gm,""),o=d.transformSync(o),S.push(`// Composable: ${h}
|
|
3
3
|
${o.trim()}`)}catch(o){console.warn(`[stx] Failed to load composable ${e}:`,o)}if(S.length===0||b.size===0)return J(g,x,a,""),null;let F=[...b].map((e)=>` try { if (!(${JSON.stringify(e)} in __c)) __c[${JSON.stringify(e)}] = ${e}; } catch (e) {}`).join(`
|
|
4
4
|
`),k=JSON.stringify([...b]),C=S.join(`
|
|
5
5
|
|
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
// @bun
|
|
2
|
-
import{Jl,fi,$a,Yl,Zl,Ql,eu,tu,Ea,Ta,nu,ru,su,iu}from"./chunk-
|
|
2
|
+
import{Jl,fi,$a,Yl,Zl,Ql,eu,tu,Ea,Ta,nu,ru,su,iu}from"./chunk-zywwzf6t.js";import"./chunk-dsxgv6g2.js";import"./chunk-ktedzx9e.js";import"./chunk-3ry9ca1s.js";import"./chunk-k8sqs7j2.js";import"./chunk-be01xyb8.js";import"./chunk-y438dzvn.js";import"./chunk-fb7bfyjz.js";import"./chunk-mjgqhhap.js";import"./chunk-5f0r0g18.js";import"./chunk-axydabse.js";import"./chunk-w3j0ppg4.js";import"./chunk-12pvnn1e.js";import"./chunk-b7973zvk.js";export{$a as SUSPENSE_RESOLVER_RUNTIME,fi as buildSuspenseResolveScript,tu as createStreamRenderer,Ql as extractStreamBoundaries,iu as generateHydrationRuntime,Ta as islandDirective,ru as processSectionDirectives,Zl as processStreamDirectives,nu as registerStreamingDirectives,Yl as renderStreamingPage,Jl as streamTemplate,eu as streamTemplateSimple,su as streamToResponse,Ea as streamingSuspenseDirective};
|
|
@@ -1,3 +1,3 @@
|
|
|
1
1
|
// @bun
|
|
2
|
-
import{V,ae}from"./chunk-
|
|
2
|
+
import{V,ae}from"./chunk-dsxgv6g2.js";import{le,S,Ke}from"./chunk-y438dzvn.js";import{Ze,X,xe}from"./chunk-12pvnn1e.js";import{_e,ne,C,re,ii,vr,oi,Pt}from"./chunk-wrj5fcvb.js";import{Hr}from"./chunk-19mnptan.js";import{It}from"./chunk-8zf5q1m3.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 ol(t={}){let e=M.resolve(t.outputDir||".output"),i=t.port??3000,s=ii(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=Hr(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=vr(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 oi(j,B,z);if(h&&h.length>0){let{renderStreamingPage:P,streamToResponse:D}=await import("./chunk-mqbknfvt.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,ol};
|
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
// @bun
|
|
2
|
-
import{A,kc,i,T,ju,Bu}from"./chunk-
|
|
2
|
+
import{A,kc,i,T,ju,Bu}from"./chunk-dsxgv6g2.js";import"./chunk-ktedzx9e.js";import"./chunk-3ry9ca1s.js";import"./chunk-k8sqs7j2.js";import"./chunk-be01xyb8.js";import"./chunk-y438dzvn.js";import"./chunk-fb7bfyjz.js";import"./chunk-mjgqhhap.js";import"./chunk-5f0r0g18.js";import"./chunk-axydabse.js";import"./chunk-w3j0ppg4.js";import"./chunk-12pvnn1e.js";import"./chunk-b7973zvk.js";export{T as config,A as defaultConfig,ju as defineStxConfig,i as loadStxConfig,kc as resolveStxDirectories,Bu as validateConfig};
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
// @bun
|
|
2
|
-
import{rr,As,To}from"./chunk-w3j0ppg4.js";import"./chunk-axydabse.js";import{Ln,n}from"./chunk-hxn9gk7h.js";import"./chunk-5f0r0g18.js";import"./chunk-y438dzvn.js";import"./chunk-n58q81vv.js";import"./chunk-mjgqhhap.js";import"./chunk-3ry9ca1s.js";import"./chunk-12pvnn1e.js";import"./chunk-fb7bfyjz.js";import"./chunk-k8sqs7j2.js";import"./chunk-b7973zvk.js";import{Pe}from"./chunk-jp602m75.js";import"./chunk-ktedzx9e.js";import{existsSync as j,mkdirSync as ot,readFileSync as st}from"fs";import T from"path";import{existsSync as tt,mkdirSync as nt}from"fs";import y from"path";import{existsSync as Ze}from"fs";import C from"path";var de="data-stx-b",F=new Set(As),pe=new Set(rr);function ge(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(F.has(e))return e==="if"?"if":e;if(e==="for"||e==="else"||e==="else-if"||e==="elseif")return"for";if(To(e))return"event";if(t.startsWith("@"))return"event";return"attr"}if(t.startsWith("x-")){let e=t.split(".")[0];if(!pe.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 F.has(r)?r==="if"?"if":r:"attr"}return null}function me(t){let e=[];for(let[r,i]of t){let o=ge(r);if(o)e.push({name:r,value:i,kind:o})}return e}var he=/<([a-z][\w-]*)((?:\s+[^\s"'=<>/]+(?:\s*=\s*(?:"[^"]*"|'[^']*'|[^\s"'=<>`]+))?)*)\s*\/?>/gi,D=/([^\s"'=<>/]+)(?:\s*=\s*(?:"([^"]*)"|'([^']*)'|([^\s"'=<>`]+)))?/g;function M(t){let e=[],r=0;return{html:t.replace(he,(o,s,c)=>{if(!c||!/[:@]|x-/.test(c))return o;let f=[];D.lastIndex=0;for(let l=D.exec(c);l;l=D.exec(c))f.push([l[1],l[2]??l[3]??l[4]??""]);let d=me(f);if(!d.length)return o;let p={id:r++,bindings:d};if(d.some((l)=>l.kind==="for"))p.template=!0;e.push(p);let a=o.endsWith("/>");return`${o.slice(0,a?-2:-1).trimEnd()} ${de}="${p.id}"${a?"/>":">"}`}),manifest:{entries:e}}}var be=["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"],Se=new Map(be.map((t)=>[H(t),t]));function H(t){return t.replace(/[-_]/g,"").toLowerCase()}function L(t){return Se.get(H(t))??t}var xe={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 G(t){return xe[t.toLowerCase()]||t}var we={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"}},J={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},U={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},w={none:0,sm:2,DEFAULT:4,md:6,lg:8,xl:12,"2xl":16,"3xl":24,full:9999};function W(t){let e=t.lastIndexOf("/");if(e>0&&!t.endsWith("]")){let i=W(t.slice(0,e)),o=t.slice(e+1),s=/^\[(.+)\]$/.test(o)?Number.parseFloat(o.slice(1,-1))*(o.includes("%")?1:100):Number.parseFloat(o);if(!i||!Number.isFinite(s))return;return Te(i,s/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,o]=r,s=we[i];if(s&&typeof s==="object")return s[o]}if(t.startsWith("[")&&t.endsWith("]")){let i=t.slice(1,-1);return/^(#|rgba?\(|hsla?\(|[a-z]+$)/i.test(i)?i:void 0}return}function Te(t,e){if(t==="transparent")return t;let r=t.startsWith("#")?t.slice(1):"";if(r.length===3)r=r.split("").map((o)=>o+o).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 O(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 g(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 J[t]}var ye={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 ve(t,e){if(!t.startsWith("bg-"))return!1;let r=t.slice(3),i=W(r);if(i)return e.backgroundColor=i,!0;return!1}function Re(t,e){if(!t.startsWith("text-"))return!1;let r=t.slice(5);if(U[r])return e.fontSize=U[r],!0;if(r.startsWith("[")&&r.endsWith("]")){let o=r.slice(1,-1);if(/^-?[\d.]+(?:px|r?em)?$/.test(o)){let s=o.endsWith("rem")||o.endsWith("em")?Number.parseFloat(o)*16:Number.parseFloat(o);if(Number.isFinite(s))return e.fontSize=s,!0}}let i=W(r);if(i)return e.color=i,!0;return!1}function _e(t,e){if(t.startsWith("p-")){let r=g(t.slice(2));if(r!==void 0)return e.padding=r,!0}if(t.startsWith("px-")){let r=g(t.slice(3));if(r!==void 0)return e.paddingHorizontal=r,!0}if(t.startsWith("py-")){let r=g(t.slice(3));if(r!==void 0)return e.paddingVertical=r,!0}if(t.startsWith("pt-")){let r=g(t.slice(3));if(r!==void 0)return e.paddingTop=r,!0}if(t.startsWith("pr-")){let r=g(t.slice(3));if(r!==void 0)return e.paddingRight=r,!0}if(t.startsWith("pb-")){let r=g(t.slice(3));if(r!==void 0)return e.paddingBottom=r,!0}if(t.startsWith("pl-")){let r=g(t.slice(3));if(r!==void 0)return e.paddingLeft=r,!0}return!1}function ke(t,e){if(t.startsWith("m-")){let r=g(t.slice(2));if(r!==void 0)return e.margin=r,!0}if(t.startsWith("mx-")){let r=g(t.slice(3));if(r!==void 0)return e.marginHorizontal=r,!0}if(t.startsWith("my-")){let r=g(t.slice(3));if(r!==void 0)return e.marginVertical=r,!0}if(t.startsWith("mt-")){let r=g(t.slice(3));if(r!==void 0)return e.marginTop=r,!0}if(t.startsWith("mr-")){let r=g(t.slice(3));if(r!==void 0)return e.marginRight=r,!0}if(t.startsWith("mb-")){let r=g(t.slice(3));if(r!==void 0)return e.marginBottom=r,!0}if(t.startsWith("ml-")){let r=g(t.slice(3));if(r!==void 0)return e.marginLeft=r,!0}return!1}function Ce(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[o,s]=r.split("/"),c=Number.parseInt(o)/Number.parseInt(s)*100;return e.width=`${c}%`,!0}let i=g(r);if(i!==void 0)return e.width=i,!0;return!1}function We(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=g(r);if(i!==void 0)return e.height=i,!0;return!1}function Ne(t,e){if(!t.startsWith("rounded"))return!1;if(t==="rounded")return e.borderRadius=w.DEFAULT,!0;let r=t.slice(8);if(r==="")return!1;let i=/^(?:(t|b|l|r)-)?(\[[^\]]+\])$/.exec(r);if(i){let s=O(i[2]);if(s===void 0)return!1;let c={t:["borderTopLeftRadius","borderTopRightRadius"],b:["borderBottomLeftRadius","borderBottomRightRadius"],l:["borderTopLeftRadius","borderBottomLeftRadius"],r:["borderTopRightRadius","borderBottomRightRadius"]};for(let f of i[1]?c[i[1]]:["borderRadius"])e[f]=s;return!0}if(r.startsWith("t-")){let s=w[r.slice(2)]??w.DEFAULT;return e.borderTopLeftRadius=s,e.borderTopRightRadius=s,!0}if(r.startsWith("b-")){let s=w[r.slice(2)]??w.DEFAULT;return e.borderBottomLeftRadius=s,e.borderBottomRightRadius=s,!0}if(r.startsWith("l-")){let s=w[r.slice(2)]??w.DEFAULT;return e.borderTopLeftRadius=s,e.borderBottomLeftRadius=s,!0}if(r.startsWith("r-")){let s=w[r.slice(2)]??w.DEFAULT;return e.borderTopRightRadius=s,e.borderBottomRightRadius=s,!0}let o=w[r];if(o!==void 0)return e.borderRadius=o,!0;return!1}function Be(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[,o,s]=i,c=s?Number.parseInt(s):1;switch(o){case"t":e.borderTopWidth=c;break;case"r":e.borderRightWidth=c;break;case"b":e.borderBottomWidth=c;break;case"l":e.borderLeftWidth=c;break}return!0}return!1}function Ee(t,e){if(!t.startsWith("border-"))return!1;let r=t.slice(7),i=W(r);if(i)return e.borderColor=i,!0;return!1}function Xe(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 Ie(t,e){if(t.startsWith("tracking-[")){let r=O(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,o={none:1,tight:1.25,snug:1.375,normal:1.5,relaxed:1.625,loose:2},s=r.startsWith("[")?/^\[[\d.]+\]$/.test(r)?Number.parseFloat(r.slice(1,-1))*i:O(r,i):o[r]!==void 0?o[r]*i:J[r];if(s===void 0||!Number.isFinite(s))return!1;return e.lineHeight=s,!0}return!1}function De(t,e){let r=/^grid-cols-(\d+)$/.exec(t);if(!r)return!1;return e.gridColumns=Number(r[1]),!0}function Le(t,e){if(!t.startsWith("size-"))return!1;let r=t.slice(5),i=r==="full"?"100%":g(r);if(i===void 0)return!1;return e.width=i,e.height=i,!0}function Oe(t,e){let r=/^(-?)(top|right|bottom|left)-(.+)$/.exec(t);if(!r)return!1;let i=r[3]==="full"?"100%":g(r[3]);if(i===void 0)return!1;return e[r[2]]=typeof i==="number"&&r[1]?-i:i,!0}function Ve(t,e){let r=/^space-(x|y)-(.+)$/.exec(t);if(!r)return!1;let i=g(r[2]);if(i===void 0)return!1;return e.gap=i,!0}function $e(t,e){if(t.startsWith("gap-")){let r=g(t.slice(4));if(r!==void 0)return e.gap=r,!0}if(t.startsWith("gap-x-")){let r=g(t.slice(6));if(r!==void 0)return e.columnGap=r,!0}if(t.startsWith("gap-y-")){let r=g(t.slice(6));if(r!==void 0)return e.rowGap=r,!0}return!1}function Y(t,e){let r={},i=t.split(/\s+/).filter(Boolean);for(let o of i){if(/^i-[a-z0-9]+-/.test(o))continue;let s=ye[o];if(s){s("",r);continue}if(ve(o,r))continue;if(Re(o,r))continue;if(_e(o,r))continue;if(ke(o,r))continue;if(Ce(o,r))continue;if(We(o,r))continue;if(Ne(o,r))continue;if(Be(o,r))continue;if(Ee(o,r))continue;if(Xe(o,r))continue;if($e(o,r))continue;if(Ie(o,r))continue;if(Le(o,r))continue;if(De(o,r))continue;if(Oe(o,r))continue;if(Ve(o,r))continue;if(e?.push(o),typeof process<"u"&&process.env?.NODE_ENV==="development")console.warn(`[STX Native] Unknown Headwind class: ${o}`)}return r}function N(t,e={},r={},i={},o=[]){return{type:t,props:e,style:r,events:i,children:o}}function K(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 q=new Set(["script","style","head","meta","link","title","base","noscript","svg"]),Z=new Set(["template","body","html","main","fragment"]),B=new Set(["svg"]),Ae={click:"onPress",press:"onPress",longpress:"onLongPress",contextmenu:"onLongPress",input:"onChangeText",change:"onValueChange",focus:"onFocus",focusin:"onFocus",blur:"onBlur",focusout:"onBlur",submit:"onSubmitEditing",scroll:"onScroll",close:"onRequestClose"},ze=new Set(["onBlur","onChangeText","onEndReached","onFocus","onLayout","onLongPress","onPress","onRequestClose","onScroll","onValueChange"]),V=new Set(["display","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"]),je=new Set(["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"]),Fe=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"]),Q=new Set(["View","ScrollView","SafeAreaView","KeyboardAvoidingView","Text","TextInput","Button","TouchableOpacity","TouchableHighlight","Pressable","Image","ImageBackground","FlatList","SectionList","Switch","Slider","Picker","DatePicker","Modal","ActivityIndicator","StatusBar","RefreshControl"]),ee=new Set(["View","SafeAreaView","ScrollView","KeyboardAvoidingView"]),Me={amp:"&",lt:"<",gt:">",quot:'"',apos:"'",nbsp:" ","#39":"'","#x27":"'"};function k(t){return t.replace(/&(#x?[0-9a-f]+|\w+);/gi,(e,r)=>{let i=Me[r.toLowerCase()];if(i!==void 0)return i;if(r[0]==="#"){let o=r[1]==="x"||r[1]==="X"?Number.parseInt(r.slice(2),16):Number.parseInt(r.slice(1),10);return Number.isFinite(o)?String.fromCodePoint(o):e}return e})}function te(t){return t.replace(/-([a-z])/g,(e,r)=>r.toUpperCase())}function ne(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 He(t,e,r){let i={},o={},s={},c="",f={};for(let[p,a]of e){let u=p.toLowerCase();if(u==="class"||u==="classname"){c=c?`${c} ${a}`:a;continue}if(u==="style"){f={...f,...Ge(t,a,r)};continue}if(u.startsWith(":")||u.startsWith("x-")&&u!=="x-cloak"){s[u.startsWith(":")?u.slice(1):u.slice(2)]=k(a);continue}if(u==="x-cloak")continue;if(u.startsWith("@")||u.startsWith("v-on:")){let b=u.startsWith("@")?u.slice(1):u.slice(5),[m]=b.split("."),S=Ae[m]??(m.startsWith("on")?m:"");if(!S||!ze.has(S)){r.push({kind:"unread-event",tag:t,name:p});continue}o[S]=k(a);continue}if(u==="key"){i.key=a;continue}let l=k(a);try{i[L(p)]=JSON.parse(l)}catch{i[L(p)]=l}}let d={...c?Y(c):{},...f};return{props:i,style:d,events:o,bindings:s,classes:c}}function re(t,e){if(je.has(t))return!1;if(Fe.has(t))return/^-?[\d.]+%$/.test(e);return!0}function Ge(t,e,r){let i={},o=k(e);try{let s=JSON.parse(o);if(s&&typeof s==="object"&&!Array.isArray(s)){for(let[c,f]of Object.entries(s)){let d=V.has(c)?c:te(c.trim().toLowerCase());if(!V.has(d)){r.push({kind:"unknown-style",tag:t,name:d});continue}if(f===null||f===void 0)continue;let p=typeof f==="string"?ne(f):f;if(typeof p!=="string"&&typeof p!=="number")continue;if(typeof p==="string"&&!re(d,p)){r.push({kind:"non-numeric-style",tag:t,name:d});continue}i[d]=p}return i}}catch{}for(let s of o.split(";")){let c=s.indexOf(":");if(c===-1)continue;let f=te(s.slice(0,c).trim().toLowerCase()),d=s.slice(c+1).trim();if(!f||!d)continue;if(!V.has(f)){r.push({kind:"unknown-style",tag:t,name:f});continue}let p=ne(d);if(typeof p==="string"&&!re(f,p)){r.push({kind:"non-numeric-style",tag:t,name:f});continue}i[f]=p}return i}function ie(t){return t.children.map((e)=>typeof e==="string"?e:ie(e)).join("").replace(/\s+/g," ").trim()}function Ue(t,e){let r=t.node,i=r.children.filter((s)=>typeof s!=="string"),o=r.children.filter((s)=>typeof s==="string").join("").trim();if(ee.has(r.type)&&i.length===0&&o)return r.type="Text",r.children=[o],r;if(r.type==="Text"&&i.length>0){let s=ie(r);return e.push({kind:"flattened-text",tag:t.tag}),r.children=s?[s]:[],r}if(ee.has(r.type)&&i.length>0)r.children=i;return r}async function Je(t,e={}){let r=[],i=[],o=[],s=new Set;function c(a){let u=o[o.length-1];if(!u)i.push(a);else if(!u.dropped)u.node.children.push(a)}function f(a){if(a.node.bindings&&Object.keys(a.node.bindings).length>0){let l=a.node.children,b=l.filter((S)=>typeof S!=="string"),m=b.length===1&&b.length===l.length?b[0]:N("View",{},{},{},l);if(m.bindings={...a.node.bindings,...m.bindings},m.bindingId===void 0&&a.node.bindingId!==void 0)m.bindingId=a.node.bindingId;c(m);return}let u=o[o.length-1];for(let l of a.node.children){if(typeof l==="string"){if(u&&!u.dropped)u.node.children.push(l);continue}if(!u)i.push(l);else if(!u.dropped)u.node.children.push(l)}}function d(a,u){let l=q.has(a)&&!B.has(a),b=o[o.length-1]?.dropped??!1,{props:m,style:S,events:h,bindings:x,classes:v}=l||b?{props:{},style:{},events:{},bindings:{},classes:""}:He(a,u,r),X=m["data-native"],R;if(typeof X==="string"&&Q.has(X))R=X,delete m["data-native"];else R=B.has(a)?"View":G(a);if(R===a&&!Q.has(R)&&!q.has(a)&&!Z.has(a)&&!s.has(a))s.add(a),r.push({kind:"unmapped-tag",tag:a});if((l||B.has(a))&&!s.has(`drop:${a}`))s.add(`drop:${a}`),r.push({kind:"dropped-subtree",tag:a});let _=N(R,m,S,h),I=m["data-stx-b"];if(typeof I==="number"&&Number.isInteger(I))_.bindingId=I;if(delete m["data-stx-b"],v)_._classes=v;if(Object.keys(x).length>0)_.bindings=x;if(typeof m.key==="string")_.key=m.key,delete m.key;return{tag:a,node:_,dropped:l||b||B.has(a),discard:l||b,unwrap:Z.has(a)}}if(await new HTMLRewriter().on("*",{element(a){let u=a.tagName.toLowerCase(),l=d(u,[...a.attributes]),b=!0;try{a.onEndTag(()=>{if(o.pop(),l.discard)return;if(l.unwrap)f(l);else c(Ue(l,r))})}catch{b=!1}if(b)o.push(l);else if(!l.discard)c(l.node)},text(a){let u=o[o.length-1];if(!u||u.dropped)return;let l=k(a.text).replace(/\s+/g," ");if(!l.trim())return;u.node.children.push(l)}}).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]:N("View",{},{},{},i),diagnostics:r}}async function oe(t,e={}){let{root:r,diagnostics:i}=await Je(t,e),o=e.script??{exports:{},functions:[],code:""};return{document:K(r,o,{source:e.source??"unknown"}),diagnostics:i}}var se=/<script\b([^>]*)>([\s\S]*?)<\/script>/gi,Ye=/(?:^|\n)\s*(?:export\s+)?(?:async\s+)?function\s*\*?\s*([$\w]+)\s*\(/g,Ke=/(?:^|\n)\s*(?:export\s+)?(?:const|let|var)\s+([$\w]+)\s*=\s*(?:async\s*)?(?:\([^)]*\)|[$\w]+)\s*=>/g,ae=/(?:^|\n)\s*(?:export\s+)?const\s+([$\w]+)\s*=\s*(-?[\d.]+|true|false|'[^']*'|"[^"]*")\s*(?=;|\n|$)/g;function A(t){let e=[];se.lastIndex=0;for(let s of t.matchAll(se)){let c=s[1]??"";if(/\bserver\b/.test(c))continue;e.push(s[2].trim())}let r=e.filter(Boolean).join(`
|
|
2
|
+
import{rr,As,To}from"./chunk-w3j0ppg4.js";import"./chunk-axydabse.js";import{Ln,n}from"./chunk-dsxgv6g2.js";import"./chunk-5f0r0g18.js";import"./chunk-y438dzvn.js";import"./chunk-be01xyb8.js";import"./chunk-mjgqhhap.js";import"./chunk-3ry9ca1s.js";import"./chunk-12pvnn1e.js";import"./chunk-fb7bfyjz.js";import"./chunk-k8sqs7j2.js";import"./chunk-b7973zvk.js";import{Pe}from"./chunk-jp602m75.js";import"./chunk-ktedzx9e.js";import{existsSync as j,mkdirSync as ot,readFileSync as st}from"fs";import T from"path";import{existsSync as tt,mkdirSync as nt}from"fs";import y from"path";import{existsSync as Ze}from"fs";import C from"path";var de="data-stx-b",F=new Set(As),pe=new Set(rr);function ge(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(F.has(e))return e==="if"?"if":e;if(e==="for"||e==="else"||e==="else-if"||e==="elseif")return"for";if(To(e))return"event";if(t.startsWith("@"))return"event";return"attr"}if(t.startsWith("x-")){let e=t.split(".")[0];if(!pe.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 F.has(r)?r==="if"?"if":r:"attr"}return null}function me(t){let e=[];for(let[r,i]of t){let o=ge(r);if(o)e.push({name:r,value:i,kind:o})}return e}var he=/<([a-z][\w-]*)((?:\s+[^\s"'=<>/]+(?:\s*=\s*(?:"[^"]*"|'[^']*'|[^\s"'=<>`]+))?)*)\s*\/?>/gi,D=/([^\s"'=<>/]+)(?:\s*=\s*(?:"([^"]*)"|'([^']*)'|([^\s"'=<>`]+)))?/g;function M(t){let e=[],r=0;return{html:t.replace(he,(o,s,c)=>{if(!c||!/[:@]|x-/.test(c))return o;let f=[];D.lastIndex=0;for(let l=D.exec(c);l;l=D.exec(c))f.push([l[1],l[2]??l[3]??l[4]??""]);let d=me(f);if(!d.length)return o;let p={id:r++,bindings:d};if(d.some((l)=>l.kind==="for"))p.template=!0;e.push(p);let a=o.endsWith("/>");return`${o.slice(0,a?-2:-1).trimEnd()} ${de}="${p.id}"${a?"/>":">"}`}),manifest:{entries:e}}}var be=["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"],Se=new Map(be.map((t)=>[H(t),t]));function H(t){return t.replace(/[-_]/g,"").toLowerCase()}function L(t){return Se.get(H(t))??t}var xe={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 G(t){return xe[t.toLowerCase()]||t}var we={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"}},J={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},U={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},w={none:0,sm:2,DEFAULT:4,md:6,lg:8,xl:12,"2xl":16,"3xl":24,full:9999};function W(t){let e=t.lastIndexOf("/");if(e>0&&!t.endsWith("]")){let i=W(t.slice(0,e)),o=t.slice(e+1),s=/^\[(.+)\]$/.test(o)?Number.parseFloat(o.slice(1,-1))*(o.includes("%")?1:100):Number.parseFloat(o);if(!i||!Number.isFinite(s))return;return Te(i,s/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,o]=r,s=we[i];if(s&&typeof s==="object")return s[o]}if(t.startsWith("[")&&t.endsWith("]")){let i=t.slice(1,-1);return/^(#|rgba?\(|hsla?\(|[a-z]+$)/i.test(i)?i:void 0}return}function Te(t,e){if(t==="transparent")return t;let r=t.startsWith("#")?t.slice(1):"";if(r.length===3)r=r.split("").map((o)=>o+o).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 O(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 g(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 J[t]}var ye={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 ve(t,e){if(!t.startsWith("bg-"))return!1;let r=t.slice(3),i=W(r);if(i)return e.backgroundColor=i,!0;return!1}function Re(t,e){if(!t.startsWith("text-"))return!1;let r=t.slice(5);if(U[r])return e.fontSize=U[r],!0;if(r.startsWith("[")&&r.endsWith("]")){let o=r.slice(1,-1);if(/^-?[\d.]+(?:px|r?em)?$/.test(o)){let s=o.endsWith("rem")||o.endsWith("em")?Number.parseFloat(o)*16:Number.parseFloat(o);if(Number.isFinite(s))return e.fontSize=s,!0}}let i=W(r);if(i)return e.color=i,!0;return!1}function _e(t,e){if(t.startsWith("p-")){let r=g(t.slice(2));if(r!==void 0)return e.padding=r,!0}if(t.startsWith("px-")){let r=g(t.slice(3));if(r!==void 0)return e.paddingHorizontal=r,!0}if(t.startsWith("py-")){let r=g(t.slice(3));if(r!==void 0)return e.paddingVertical=r,!0}if(t.startsWith("pt-")){let r=g(t.slice(3));if(r!==void 0)return e.paddingTop=r,!0}if(t.startsWith("pr-")){let r=g(t.slice(3));if(r!==void 0)return e.paddingRight=r,!0}if(t.startsWith("pb-")){let r=g(t.slice(3));if(r!==void 0)return e.paddingBottom=r,!0}if(t.startsWith("pl-")){let r=g(t.slice(3));if(r!==void 0)return e.paddingLeft=r,!0}return!1}function ke(t,e){if(t.startsWith("m-")){let r=g(t.slice(2));if(r!==void 0)return e.margin=r,!0}if(t.startsWith("mx-")){let r=g(t.slice(3));if(r!==void 0)return e.marginHorizontal=r,!0}if(t.startsWith("my-")){let r=g(t.slice(3));if(r!==void 0)return e.marginVertical=r,!0}if(t.startsWith("mt-")){let r=g(t.slice(3));if(r!==void 0)return e.marginTop=r,!0}if(t.startsWith("mr-")){let r=g(t.slice(3));if(r!==void 0)return e.marginRight=r,!0}if(t.startsWith("mb-")){let r=g(t.slice(3));if(r!==void 0)return e.marginBottom=r,!0}if(t.startsWith("ml-")){let r=g(t.slice(3));if(r!==void 0)return e.marginLeft=r,!0}return!1}function Ce(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[o,s]=r.split("/"),c=Number.parseInt(o)/Number.parseInt(s)*100;return e.width=`${c}%`,!0}let i=g(r);if(i!==void 0)return e.width=i,!0;return!1}function We(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=g(r);if(i!==void 0)return e.height=i,!0;return!1}function Ne(t,e){if(!t.startsWith("rounded"))return!1;if(t==="rounded")return e.borderRadius=w.DEFAULT,!0;let r=t.slice(8);if(r==="")return!1;let i=/^(?:(t|b|l|r)-)?(\[[^\]]+\])$/.exec(r);if(i){let s=O(i[2]);if(s===void 0)return!1;let c={t:["borderTopLeftRadius","borderTopRightRadius"],b:["borderBottomLeftRadius","borderBottomRightRadius"],l:["borderTopLeftRadius","borderBottomLeftRadius"],r:["borderTopRightRadius","borderBottomRightRadius"]};for(let f of i[1]?c[i[1]]:["borderRadius"])e[f]=s;return!0}if(r.startsWith("t-")){let s=w[r.slice(2)]??w.DEFAULT;return e.borderTopLeftRadius=s,e.borderTopRightRadius=s,!0}if(r.startsWith("b-")){let s=w[r.slice(2)]??w.DEFAULT;return e.borderBottomLeftRadius=s,e.borderBottomRightRadius=s,!0}if(r.startsWith("l-")){let s=w[r.slice(2)]??w.DEFAULT;return e.borderTopLeftRadius=s,e.borderBottomLeftRadius=s,!0}if(r.startsWith("r-")){let s=w[r.slice(2)]??w.DEFAULT;return e.borderTopRightRadius=s,e.borderBottomRightRadius=s,!0}let o=w[r];if(o!==void 0)return e.borderRadius=o,!0;return!1}function Be(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[,o,s]=i,c=s?Number.parseInt(s):1;switch(o){case"t":e.borderTopWidth=c;break;case"r":e.borderRightWidth=c;break;case"b":e.borderBottomWidth=c;break;case"l":e.borderLeftWidth=c;break}return!0}return!1}function Ee(t,e){if(!t.startsWith("border-"))return!1;let r=t.slice(7),i=W(r);if(i)return e.borderColor=i,!0;return!1}function Xe(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 Ie(t,e){if(t.startsWith("tracking-[")){let r=O(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,o={none:1,tight:1.25,snug:1.375,normal:1.5,relaxed:1.625,loose:2},s=r.startsWith("[")?/^\[[\d.]+\]$/.test(r)?Number.parseFloat(r.slice(1,-1))*i:O(r,i):o[r]!==void 0?o[r]*i:J[r];if(s===void 0||!Number.isFinite(s))return!1;return e.lineHeight=s,!0}return!1}function De(t,e){let r=/^grid-cols-(\d+)$/.exec(t);if(!r)return!1;return e.gridColumns=Number(r[1]),!0}function Le(t,e){if(!t.startsWith("size-"))return!1;let r=t.slice(5),i=r==="full"?"100%":g(r);if(i===void 0)return!1;return e.width=i,e.height=i,!0}function Oe(t,e){let r=/^(-?)(top|right|bottom|left)-(.+)$/.exec(t);if(!r)return!1;let i=r[3]==="full"?"100%":g(r[3]);if(i===void 0)return!1;return e[r[2]]=typeof i==="number"&&r[1]?-i:i,!0}function Ve(t,e){let r=/^space-(x|y)-(.+)$/.exec(t);if(!r)return!1;let i=g(r[2]);if(i===void 0)return!1;return e.gap=i,!0}function $e(t,e){if(t.startsWith("gap-")){let r=g(t.slice(4));if(r!==void 0)return e.gap=r,!0}if(t.startsWith("gap-x-")){let r=g(t.slice(6));if(r!==void 0)return e.columnGap=r,!0}if(t.startsWith("gap-y-")){let r=g(t.slice(6));if(r!==void 0)return e.rowGap=r,!0}return!1}function Y(t,e){let r={},i=t.split(/\s+/).filter(Boolean);for(let o of i){if(/^i-[a-z0-9]+-/.test(o))continue;let s=ye[o];if(s){s("",r);continue}if(ve(o,r))continue;if(Re(o,r))continue;if(_e(o,r))continue;if(ke(o,r))continue;if(Ce(o,r))continue;if(We(o,r))continue;if(Ne(o,r))continue;if(Be(o,r))continue;if(Ee(o,r))continue;if(Xe(o,r))continue;if($e(o,r))continue;if(Ie(o,r))continue;if(Le(o,r))continue;if(De(o,r))continue;if(Oe(o,r))continue;if(Ve(o,r))continue;if(e?.push(o),typeof process<"u"&&process.env?.NODE_ENV==="development")console.warn(`[STX Native] Unknown Headwind class: ${o}`)}return r}function N(t,e={},r={},i={},o=[]){return{type:t,props:e,style:r,events:i,children:o}}function K(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 q=new Set(["script","style","head","meta","link","title","base","noscript","svg"]),Z=new Set(["template","body","html","main","fragment"]),B=new Set(["svg"]),Ae={click:"onPress",press:"onPress",longpress:"onLongPress",contextmenu:"onLongPress",input:"onChangeText",change:"onValueChange",focus:"onFocus",focusin:"onFocus",blur:"onBlur",focusout:"onBlur",submit:"onSubmitEditing",scroll:"onScroll",close:"onRequestClose"},ze=new Set(["onBlur","onChangeText","onEndReached","onFocus","onLayout","onLongPress","onPress","onRequestClose","onScroll","onValueChange"]),V=new Set(["display","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"]),je=new Set(["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"]),Fe=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"]),Q=new Set(["View","ScrollView","SafeAreaView","KeyboardAvoidingView","Text","TextInput","Button","TouchableOpacity","TouchableHighlight","Pressable","Image","ImageBackground","FlatList","SectionList","Switch","Slider","Picker","DatePicker","Modal","ActivityIndicator","StatusBar","RefreshControl"]),ee=new Set(["View","SafeAreaView","ScrollView","KeyboardAvoidingView"]),Me={amp:"&",lt:"<",gt:">",quot:'"',apos:"'",nbsp:" ","#39":"'","#x27":"'"};function k(t){return t.replace(/&(#x?[0-9a-f]+|\w+);/gi,(e,r)=>{let i=Me[r.toLowerCase()];if(i!==void 0)return i;if(r[0]==="#"){let o=r[1]==="x"||r[1]==="X"?Number.parseInt(r.slice(2),16):Number.parseInt(r.slice(1),10);return Number.isFinite(o)?String.fromCodePoint(o):e}return e})}function te(t){return t.replace(/-([a-z])/g,(e,r)=>r.toUpperCase())}function ne(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 He(t,e,r){let i={},o={},s={},c="",f={};for(let[p,a]of e){let u=p.toLowerCase();if(u==="class"||u==="classname"){c=c?`${c} ${a}`:a;continue}if(u==="style"){f={...f,...Ge(t,a,r)};continue}if(u.startsWith(":")||u.startsWith("x-")&&u!=="x-cloak"){s[u.startsWith(":")?u.slice(1):u.slice(2)]=k(a);continue}if(u==="x-cloak")continue;if(u.startsWith("@")||u.startsWith("v-on:")){let b=u.startsWith("@")?u.slice(1):u.slice(5),[m]=b.split("."),S=Ae[m]??(m.startsWith("on")?m:"");if(!S||!ze.has(S)){r.push({kind:"unread-event",tag:t,name:p});continue}o[S]=k(a);continue}if(u==="key"){i.key=a;continue}let l=k(a);try{i[L(p)]=JSON.parse(l)}catch{i[L(p)]=l}}let d={...c?Y(c):{},...f};return{props:i,style:d,events:o,bindings:s,classes:c}}function re(t,e){if(je.has(t))return!1;if(Fe.has(t))return/^-?[\d.]+%$/.test(e);return!0}function Ge(t,e,r){let i={},o=k(e);try{let s=JSON.parse(o);if(s&&typeof s==="object"&&!Array.isArray(s)){for(let[c,f]of Object.entries(s)){let d=V.has(c)?c:te(c.trim().toLowerCase());if(!V.has(d)){r.push({kind:"unknown-style",tag:t,name:d});continue}if(f===null||f===void 0)continue;let p=typeof f==="string"?ne(f):f;if(typeof p!=="string"&&typeof p!=="number")continue;if(typeof p==="string"&&!re(d,p)){r.push({kind:"non-numeric-style",tag:t,name:d});continue}i[d]=p}return i}}catch{}for(let s of o.split(";")){let c=s.indexOf(":");if(c===-1)continue;let f=te(s.slice(0,c).trim().toLowerCase()),d=s.slice(c+1).trim();if(!f||!d)continue;if(!V.has(f)){r.push({kind:"unknown-style",tag:t,name:f});continue}let p=ne(d);if(typeof p==="string"&&!re(f,p)){r.push({kind:"non-numeric-style",tag:t,name:f});continue}i[f]=p}return i}function ie(t){return t.children.map((e)=>typeof e==="string"?e:ie(e)).join("").replace(/\s+/g," ").trim()}function Ue(t,e){let r=t.node,i=r.children.filter((s)=>typeof s!=="string"),o=r.children.filter((s)=>typeof s==="string").join("").trim();if(ee.has(r.type)&&i.length===0&&o)return r.type="Text",r.children=[o],r;if(r.type==="Text"&&i.length>0){let s=ie(r);return e.push({kind:"flattened-text",tag:t.tag}),r.children=s?[s]:[],r}if(ee.has(r.type)&&i.length>0)r.children=i;return r}async function Je(t,e={}){let r=[],i=[],o=[],s=new Set;function c(a){let u=o[o.length-1];if(!u)i.push(a);else if(!u.dropped)u.node.children.push(a)}function f(a){if(a.node.bindings&&Object.keys(a.node.bindings).length>0){let l=a.node.children,b=l.filter((S)=>typeof S!=="string"),m=b.length===1&&b.length===l.length?b[0]:N("View",{},{},{},l);if(m.bindings={...a.node.bindings,...m.bindings},m.bindingId===void 0&&a.node.bindingId!==void 0)m.bindingId=a.node.bindingId;c(m);return}let u=o[o.length-1];for(let l of a.node.children){if(typeof l==="string"){if(u&&!u.dropped)u.node.children.push(l);continue}if(!u)i.push(l);else if(!u.dropped)u.node.children.push(l)}}function d(a,u){let l=q.has(a)&&!B.has(a),b=o[o.length-1]?.dropped??!1,{props:m,style:S,events:h,bindings:x,classes:v}=l||b?{props:{},style:{},events:{},bindings:{},classes:""}:He(a,u,r),X=m["data-native"],R;if(typeof X==="string"&&Q.has(X))R=X,delete m["data-native"];else R=B.has(a)?"View":G(a);if(R===a&&!Q.has(R)&&!q.has(a)&&!Z.has(a)&&!s.has(a))s.add(a),r.push({kind:"unmapped-tag",tag:a});if((l||B.has(a))&&!s.has(`drop:${a}`))s.add(`drop:${a}`),r.push({kind:"dropped-subtree",tag:a});let _=N(R,m,S,h),I=m["data-stx-b"];if(typeof I==="number"&&Number.isInteger(I))_.bindingId=I;if(delete m["data-stx-b"],v)_._classes=v;if(Object.keys(x).length>0)_.bindings=x;if(typeof m.key==="string")_.key=m.key,delete m.key;return{tag:a,node:_,dropped:l||b||B.has(a),discard:l||b,unwrap:Z.has(a)}}if(await new HTMLRewriter().on("*",{element(a){let u=a.tagName.toLowerCase(),l=d(u,[...a.attributes]),b=!0;try{a.onEndTag(()=>{if(o.pop(),l.discard)return;if(l.unwrap)f(l);else c(Ue(l,r))})}catch{b=!1}if(b)o.push(l);else if(!l.discard)c(l.node)},text(a){let u=o[o.length-1];if(!u||u.dropped)return;let l=k(a.text).replace(/\s+/g," ");if(!l.trim())return;u.node.children.push(l)}}).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]:N("View",{},{},{},i),diagnostics:r}}async function oe(t,e={}){let{root:r,diagnostics:i}=await Je(t,e),o=e.script??{exports:{},functions:[],code:""};return{document:K(r,o,{source:e.source??"unknown"}),diagnostics:i}}var se=/<script\b([^>]*)>([\s\S]*?)<\/script>/gi,Ye=/(?:^|\n)\s*(?:export\s+)?(?:async\s+)?function\s*\*?\s*([$\w]+)\s*\(/g,Ke=/(?:^|\n)\s*(?:export\s+)?(?:const|let|var)\s+([$\w]+)\s*=\s*(?:async\s*)?(?:\([^)]*\)|[$\w]+)\s*=>/g,ae=/(?:^|\n)\s*(?:export\s+)?const\s+([$\w]+)\s*=\s*(-?[\d.]+|true|false|'[^']*'|"[^"]*")\s*(?=;|\n|$)/g;function A(t){let e=[];se.lastIndex=0;for(let s of t.matchAll(se)){let c=s[1]??"";if(/\bserver\b/.test(c))continue;e.push(s[2].trim())}let r=e.filter(Boolean).join(`
|
|
3
3
|
|
|
4
4
|
`),i=[];for(let s of[Ye,Ke]){s.lastIndex=0;for(let c of r.matchAll(s))if(!i.includes(c[1]))i.push(c[1])}let o={};ae.lastIndex=0;for(let s of r.matchAll(ae)){let c=s[2];try{o[s[1]]=JSON.parse(c.replace(/^'(.*)'$/,'"$1"'))}catch{o[s[1]]=c}}return{exports:o,functions:i,code:r}}var ce=/<script\b[^>]*\bdata-stx-scoped\b[^>]*>([\s\S]*?)<\/script>/gi,qe=/function\s+(__stx_setup_[\w$]+)\s*\(/;function P(t){ce.lastIndex=0;for(let e of t.matchAll(ce)){let r=e[1].trim(),i=qe.exec(r)?.[1];if(i)return{name:i,code:r}}return null}function Qe(){let t=[C.join(import.meta.dir,"..","primitives"),C.join(import.meta.dir,"native","primitives")];for(let e of t)if(Ze(C.join(e,"View.stx")))return e;return t[0]}async function et(t,e,r={}){let i=r.root??C.dirname(e),o={root:i,componentsDir:r.componentsDir??C.join(i,"components"),buildMode:"serve",cache:!1,_pluginComponentDirs:[Qe()]},s={...r.context??{},__stx_inject_css:!1},c=await n(t,s,e,o,new Set),{html:f,manifest:d}=M(c),{document:p,diagnostics:a}=await oe(f,{source:e,script:A(t)}),u=P(f);if(A(t).code.trim()){let l=await Ln(t,e,r.context,{forceClientSetup:!0});u=P(l.setupCode??"")??u}return{document:p,manifest:d,setup:u,diagnostics:a,html:f}}async function E(t,e={}){return et(await Bun.file(t).text(),t,e)}function ue(t){let r=[y.join(import.meta.dir,"..","runtime",`${t}.ts`),y.join(import.meta.dir,"..","runtime",`${t}.js`),y.join(import.meta.dir,"native","runtime",`${t}.js`)].find((i)=>tt(i));if(!r)throw Error(`Native runtime module ${t} is missing`);return r}async function rt(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 o=i.logs.map((s)=>String(s.message??s)).join(`
|
|
5
5
|
`);throw Error(`Could not bundle ${t}:
|
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
// @bun
|
|
2
|
-
import{Kc}from"./chunk-
|
|
2
|
+
import{Kc}from"./chunk-3b61yd4r.js";import"./chunk-wrj5fcvb.js";import"./chunk-jp602m75.js";import"./chunk-19mnptan.js";import"./chunk-dsxgv6g2.js";import"./chunk-ktedzx9e.js";import"./chunk-3ry9ca1s.js";import"./chunk-k8sqs7j2.js";import"./chunk-be01xyb8.js";import"./chunk-y438dzvn.js";import"./chunk-fb7bfyjz.js";import"./chunk-mjgqhhap.js";import"./chunk-5f0r0g18.js";import"./chunk-axydabse.js";import"./chunk-w3j0ppg4.js";import"./chunk-12pvnn1e.js";import"./chunk-b7973zvk.js";export{Kc as buildForProduction};
|
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
// @bun
|
|
2
|
-
import{Ho,Ys,Hc,Vo,Uo,Vc,Uc}from"./chunk-
|
|
2
|
+
import{Ho,Ys,Hc,Vo,Uo,Vc,Uc}from"./chunk-w715g0wp.js";import"./chunk-knmj9ynm.js";import"./chunk-j67ns7p6.js";import"./chunk-19mnptan.js";import{He,fc}from"./chunk-dsxgv6g2.js";import"./chunk-ktedzx9e.js";import"./chunk-3ry9ca1s.js";import"./chunk-k8sqs7j2.js";import"./chunk-be01xyb8.js";import"./chunk-y438dzvn.js";import"./chunk-fb7bfyjz.js";import"./chunk-mjgqhhap.js";import"./chunk-5f0r0g18.js";import"./chunk-axydabse.js";import"./chunk-w3j0ppg4.js";import"./chunk-12pvnn1e.js";import"./chunk-b7973zvk.js";export{Ho as buildVirtualSource,He as extractScriptBlocks,fc as extractTemplateExpressions,Vo as findRuntimeTypeDeclarations,Uo as findStxModuleDeclarations,Uc as formatTypecheckDiagnostics,Hc as sourcePathFor,Vc as typecheckStxFiles,Ys as virtualPathFor};
|
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
// @bun
|
|
2
|
-
import{d,rs,Ki,Xi,gc,mc,hc,yc,bc,wc,Ve,N,Ue,vc,Vn,xc,io,Sc,We,r,Un,oo,g,ee,Lu}from"./chunk-
|
|
2
|
+
import{d,rs,Ki,Xi,gc,mc,hc,yc,bc,wc,Ve,N,Ue,vc,Vn,xc,io,Sc,We,r,Un,oo,g,ee,Lu}from"./chunk-dsxgv6g2.js";import"./chunk-ktedzx9e.js";import"./chunk-3ry9ca1s.js";import"./chunk-k8sqs7j2.js";import"./chunk-be01xyb8.js";import"./chunk-y438dzvn.js";import"./chunk-fb7bfyjz.js";import"./chunk-mjgqhhap.js";import"./chunk-5f0r0g18.js";import"./chunk-axydabse.js";import"./chunk-w3j0ppg4.js";import"./chunk-12pvnn1e.js";import"./chunk-b7973zvk.js";export{ee as clearComponentCache,Sc as componentClientSignalNames,rs as convertToCommonJS,g as createDetailedErrorMessage,bc as extractDirectiveNames,Ki as extractScriptFromTemplate,d as extractVariables,r as fileExists,Lu as getComponentCacheStats,mc as getPositionInfo,N as getSharedTranspiler,oo as getSourceLineInfo,yc as hasDirectives,Xi as hasVariables,xc as isHydrateTrigger,wc as isJavaScriptScript,We as renderComponentWithSlot,Un as resolveTemplatePath,vc as scopeOnRootElement,Ve as shouldTranspileTypeScript,io as slotContentHasExpressions,Ue as transpileTypeScript,Vn as userComponentFileExists,hc as validateDirective,gc as validateTemplate};
|
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
// @bun
|
|
2
|
-
import{Ou,nc,Qr,es,Vi,Ui,ts,ns,Ln,rc,Wi,qi,sc,ze}from"./chunk-
|
|
2
|
+
import{Ou,nc,Qr,es,Vi,Ui,ts,ns,Ln,rc,Wi,qi,sc,ze}from"./chunk-dsxgv6g2.js";import"./chunk-ktedzx9e.js";import"./chunk-3ry9ca1s.js";import"./chunk-k8sqs7j2.js";import"./chunk-be01xyb8.js";import"./chunk-y438dzvn.js";import"./chunk-fb7bfyjz.js";import"./chunk-mjgqhhap.js";import"./chunk-5f0r0g18.js";import"./chunk-axydabse.js";import"./chunk-w3j0ppg4.js";import"./chunk-12pvnn1e.js";import"./chunk-b7973zvk.js";export{Ou as clearScriptScanCache,ts as convertServerLoopAttributesToDirectives,Vi as convertSignalDirectivesToAttributes,ns as convertSignalLoopsToAttributes,rc as extractExports,qi as findMarkupIndexOutsideScripts,es as hasSignalsSyntax,Qr as parseLoopExpression,Ui as preEvalLiteralReactiveIfs,Ln as processScriptSetup,Wi as processSignals,sc as rewriteStxImportSpecifiers,nc as scanScriptTags,ze as stripStxRuntimeImports};
|
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
// @bun
|
|
2
|
-
import{Me,Ka,Su,ku,Cu,$u,Xa,Ga,Eu,Tu,Bi,_u,Zt,Qt,On}from"./chunk-
|
|
2
|
+
import{Me,Ka,Su,ku,Cu,$u,Xa,Ga,Eu,Tu,Bi,_u,Zt,Qt,On}from"./chunk-dsxgv6g2.js";import"./chunk-ktedzx9e.js";import"./chunk-3ry9ca1s.js";import"./chunk-k8sqs7j2.js";import"./chunk-be01xyb8.js";import"./chunk-y438dzvn.js";import"./chunk-fb7bfyjz.js";import"./chunk-mjgqhhap.js";import"./chunk-5f0r0g18.js";import"./chunk-axydabse.js";import"./chunk-w3j0ppg4.js";import"./chunk-12pvnn1e.js";import"./chunk-b7973zvk.js";export{$u as __setSignalsGeneratorsForTest,Me as cacheEngineFingerprint,Qt as cacheTemplate,Zt as checkCache,_u as clearDevCaches,Ga as getCachedRouterScript,Xa as getCachedSignalsRuntime,Eu as getServeClientAsset,Bi as getServeModuleBundle,On as hashFilePath,ku as invalidateFileCache,Cu as invalidateFileCacheByDir,Su as readFileCached,Tu as registerServeModuleBundle,Ka as templateCache};
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
// @bun
|
|
2
|
-
import"./chunk-w3j0ppg4.js";import"./chunk-axydabse.js";import{y,I,O,N}from"./chunk-
|
|
2
|
+
import"./chunk-w3j0ppg4.js";import"./chunk-axydabse.js";import{y,I,O,N}from"./chunk-dsxgv6g2.js";import"./chunk-5f0r0g18.js";import"./chunk-3ry9ca1s.js";import"./chunk-12pvnn1e.js";import"./chunk-mjgqhhap.js";import"./chunk-fb7bfyjz.js";import"./chunk-k8sqs7j2.js";import"./chunk-y438dzvn.js";import"./chunk-be01xyb8.js";import"./chunk-b7973zvk.js";import"./chunk-ktedzx9e.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","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{m}from"./chunk-w3j0ppg4.js";import{H,St,He,ps,gs,Zi,Qi,eo,to,Hn,ms,no,ro,so,i}from"./chunk-
|
|
2
|
+
import{m}from"./chunk-w3j0ppg4.js";import{H,St,He,ps,gs,Zi,Qi,eo,to,Hn,ms,no,ro,so,i}from"./chunk-dsxgv6g2.js";import{Ir}from"./chunk-knmj9ynm.js";import{a}from"./chunk-wtms9jhs.js";import{existsSync as M,readFileSync as K}from"fs";import b from"path";var me=new Set(["module","exports","require","$bool","$num","window","document","console","confirm","alert","fetch"]),te=St.filter((e)=>!me.has(e)).sort(),ne=[...m].sort(),he=[...new Set([...te,...ne])].sort(),be=new Set(te),ye=new Set(ne),xe=new Set(he),ee=/\bimport\s+(?!type[\s{])\{([^}]*)\}\s*from\s*(['"])stx\2/g;function Se(e,t){if(t==="server")return`'${e}' is not provided by 'stx' in a <script server> block. The engine binds only its own names there (defineProps, state, useHead, ...); any other name becomes \`await import('stx')\`, which does not resolve, so the whole script fails when the page renders. Import it from '@stacksjs/stx' instead.`;return`'${e}' is not provided by 'stx' in a client <script> block. The import is replaced by the window.stx runtime, which has no '${e}', so it is undefined in the browser.`}function ie(e,t){let r=[];for(let u of t){if(u.offset===void 0)continue;let s=u.kind==="server"?be:ye;ee.lastIndex=0;for(let l of u.code.matchAll(ee)){let g=l.index+l[0].indexOf("{")+1;for(let h of l[1].matchAll(/[^,]+/g)){let S=h[0];if(/^\s*type\s/.test(S))continue;let x=/^\s*([A-Za-z_$][\w$]*)/.exec(S);if(!x)continue;let o=x[1];if(!xe.has(o)||s.has(o))continue;let f=u.offset+g+h.index+x[0].length-o.length,p=e.slice(0,f),w=p.split(`
|
|
3
3
|
`).length;r.push({line:w,column:f-(p.lastIndexOf(`
|
|
4
4
|
`)+1)+1,offset:f,length:o.length,name:o,kind:u.kind,message:Se(o,u.kind)})}}}return r}import T from"path";var ke="@stacksjs/stx-typescript-plugin";function we(e,t){let r=T.resolve(e);for(;;){let u=T.join(r,"tsconfig.json");if(t(u))return u;let s=T.dirname(r);if(s===r)return;r=s}}function se(e,t,r){let u=we(e,r);if(!u)return;let s=new Set,l=(g)=>{if(s.has(g))return;s.add(g);let h=t(g);if(!h)return;let S=h.compilerOptions?.plugins;if(Array.isArray(S)){let o=S.find((p)=>p?.name===ke),f=Array.isArray(o?.libs)?o.libs.filter((p)=>typeof p==="string"):[];return o?{configPath:g,libs:f.map((p)=>T.resolve(T.dirname(g),p))}:null}let x=typeof h.extends==="string"?[h.extends]:Array.isArray(h.extends)?h.extends:[];for(let o of[...x].reverse()){if(typeof o!=="string"||!o.startsWith("."))continue;let f=T.resolve(T.dirname(g),o.endsWith(".json")?o:`${o}.json`),p=l(f);if(p!==void 0)return p}return};return l(u)??void 0}function Ho(e,t="",r=""){let u=e.startLine>1?`
|
|
5
5
|
`.repeat(e.startLine-1):"",s=ms(e)+gs(ps(e.code)),l=e.kind==="client"||e.kind==="plain"?eo(t,e.code):"";return Hn(`${u+s}
|