@stacksjs/stx 0.2.859 → 0.2.861
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/body-close.d.ts +13 -0
- package/dist/body-close.js +8 -0
- package/dist/{chunk-5va6c7jf.js → chunk-02css3vk.js} +5 -5
- package/dist/chunk-0hqr6bff.js +2 -0
- package/dist/{chunk-astcp7bc.js → chunk-121cgm3s.js} +4 -4
- package/dist/{chunk-xytq7q8j.js → chunk-15jymk6t.js} +2 -2
- package/dist/{chunk-gq9h36jf.js → chunk-15rkvc0t.js} +4 -4
- package/dist/chunk-15sgdvyd.js +2 -0
- package/dist/{chunk-fkh4xece.js → chunk-1jwcp2k0.js} +2 -2
- package/dist/{chunk-b1kc0ka1.js → chunk-261t62q4.js} +38 -38
- package/dist/chunk-2b4a8tbd.js +3 -0
- package/dist/chunk-2fw36w1x.js +2 -0
- package/dist/chunk-2jcxsw75.js +2 -0
- package/dist/{chunk-t2nhr2tc.js → chunk-2pbhdaka.js} +1 -1
- package/dist/chunk-2wba5ypm.js +2 -0
- package/dist/chunk-353gnvfe.js +2 -0
- package/dist/{chunk-14h4n1sj.js → chunk-36vksrry.js} +2 -2
- package/dist/{chunk-0es47pwe.js → chunk-37tefp7s.js} +5 -5
- package/dist/{chunk-ktnb1j54.js → chunk-38qp2pg2.js} +2 -2
- package/dist/chunk-3cr5y8v1.js +2 -0
- package/dist/{chunk-g17q4y5k.js → chunk-3gfd9t8a.js} +2 -2
- package/dist/{chunk-ts4t2n6b.js → chunk-3wg9kr5z.js} +4 -4
- package/dist/chunk-3y7yp0ka.js +2 -0
- package/dist/chunk-41wwqw0q.js +2 -0
- package/dist/chunk-4a1y51fs.js +2 -0
- package/dist/chunk-4a751brg.js +2 -0
- package/dist/{chunk-kpsxhm4x.js → chunk-4jgcd4d9.js} +3 -3
- package/dist/{chunk-k8pzk8v9.js → chunk-4rrxrxp6.js} +4 -4
- package/dist/chunk-5awhm4na.js +2 -0
- package/dist/chunk-5fhp9hxd.js +2 -0
- package/dist/{chunk-ywk6t76q.js → chunk-5ka3h8dy.js} +6 -6
- package/dist/chunk-5mg443dw.js +2 -0
- package/dist/{chunk-9qe4qsc7.js → chunk-5neezkj1.js} +4 -4
- package/dist/{chunk-6w5a5ns4.js → chunk-5q4tncfw.js} +5 -5
- package/dist/chunk-5x9ajbq0.js +2 -0
- package/dist/{chunk-gndxakrh.js → chunk-5xdkmn39.js} +2 -2
- package/dist/{chunk-3w3fxcyx.js → chunk-65cbfx5x.js} +2 -2
- package/dist/{chunk-hf9pvmq2.js → chunk-68w65mhs.js} +3 -3
- package/dist/chunk-6g7tkmty.js +2 -0
- package/dist/{chunk-wfd9e224.js → chunk-6nb49h13.js} +9 -9
- package/dist/{chunk-6t0xy3wk.js → chunk-6tp0w6hf.js} +2 -2
- package/dist/chunk-72bj7ea4.js +2 -0
- package/dist/{chunk-tc31my2p.js → chunk-74g64pzt.js} +4 -4
- package/dist/{chunk-0yw86e75.js → chunk-76360zky.js} +5 -5
- package/dist/{chunk-wdcz6d20.js → chunk-7bajrfb1.js} +2 -2
- package/dist/{chunk-2kc0vsnb.js → chunk-7de5y29a.js} +5 -5
- package/dist/{chunk-cj9rev2p.js → chunk-7yhhwv07.js} +2 -2
- package/dist/chunk-811hh6vp.js +2 -0
- package/dist/{chunk-9nh48zvm.js → chunk-830ej8d2.js} +9 -9
- package/dist/chunk-8fkmxrat.js +2 -0
- package/dist/{chunk-dbm963p9.js → chunk-8hck9qqm.js} +4 -4
- package/dist/chunk-8p9npc8y.js +2 -0
- package/dist/chunk-9fz3h6sx.js +2 -0
- package/dist/chunk-9jr30fns.js +2 -0
- package/dist/{chunk-2sq9pdg3.js → chunk-9pyvc0dc.js} +2 -2
- package/dist/{chunk-4yfbd8ny.js → chunk-9syvkm5z.js} +6 -6
- package/dist/{chunk-a9c3gndq.js → chunk-a6d92kv6.js} +2 -2
- package/dist/chunk-a9m6ajd7.js +2 -0
- package/dist/{chunk-403a4pqm.js → chunk-aj6vqdf7.js} +3 -3
- package/dist/chunk-asr5v51s.js +2 -0
- package/dist/{chunk-v9h7s8ce.js → chunk-avp271q4.js} +1 -1
- package/dist/{chunk-3248qphb.js → chunk-b1tctqn5.js} +6 -6
- package/dist/{chunk-8mdhencj.js → chunk-b7nmgkwa.js} +3 -3
- package/dist/{chunk-6e44f8w8.js → chunk-bag9q4m0.js} +30 -30
- package/dist/{chunk-7m17m22p.js → chunk-bg0ywp5w.js} +2 -2
- package/dist/{chunk-aq8r4rbs.js → chunk-bv14vry8.js} +2 -2
- package/dist/chunk-byx82s10.js +2 -0
- package/dist/{chunk-q3cyycnh.js → chunk-c2w4wc9f.js} +1 -1
- package/dist/chunk-c9y1g61m.js +2 -0
- package/dist/chunk-ck5nzbbv.js +2 -0
- package/dist/{chunk-yd6ej23e.js → chunk-cq2hedwn.js} +5 -5
- package/dist/chunk-cvdm0hgq.js +2 -0
- package/dist/{chunk-6mza6zr3.js → chunk-d6216bcw.js} +3 -3
- package/dist/{chunk-s4592dy0.js → chunk-dba4bwkd.js} +6 -6
- package/dist/{chunk-rgjjt1mb.js → chunk-dt73ww6m.js} +1 -1
- package/dist/chunk-e0fxgbcc.js +2 -0
- package/dist/{chunk-49j3cn9h.js → chunk-e8nzbz66.js} +2 -2
- package/dist/chunk-ed2m6pjf.js +2 -0
- package/dist/chunk-ednwdhv0.js +2 -0
- package/dist/chunk-egtphftq.js +2 -0
- package/dist/{chunk-2w7csg0c.js → chunk-eye156nv.js} +1 -1
- package/dist/chunk-fahqq7c4.js +2 -0
- package/dist/chunk-fcbpzdyz.js +2 -0
- package/dist/{chunk-x9c4njvx.js → chunk-fyfvqd2s.js} +2 -2
- package/dist/{chunk-1v95w26e.js → chunk-gc79s0wh.js} +9 -9
- package/dist/{chunk-9a3rv0rj.js → chunk-gggadrs4.js} +2 -2
- package/dist/{chunk-vj1bwnvs.js → chunk-gjnrmz2q.js} +2 -2
- package/dist/{chunk-w1d8t47c.js → chunk-gp1dt8b8.js} +3 -3
- package/dist/{chunk-5t1k0dxm.js → chunk-gx96hctv.js} +2 -2
- package/dist/chunk-h0dsxxz4.js +2 -0
- package/dist/{chunk-1hebvmaj.js → chunk-h2cvfp9y.js} +1 -1
- package/dist/{chunk-ews9yzr7.js → chunk-h4aqpf2r.js} +3 -3
- package/dist/{chunk-52b6czss.js → chunk-hyea17hp.js} +69 -69
- package/dist/chunk-k3yym9zg.js +2 -0
- package/dist/chunk-k9fsd6t3.js +2 -0
- package/dist/chunk-kepxsjfx.js +2 -0
- package/dist/chunk-kh01rvag.js +2 -0
- package/dist/{chunk-qd87dk1d.js → chunk-kv40xq53.js} +14 -14
- package/dist/{chunk-m1qqqc2j.js → chunk-m3p4hksq.js} +2 -2
- package/dist/chunk-mad172af.js +2 -0
- package/dist/{chunk-kvc9cwvx.js → chunk-mjkdskeg.js} +1 -1
- package/dist/{chunk-wjamjgx6.js → chunk-naj146zq.js} +1 -1
- package/dist/chunk-npt0mdzb.js +2 -0
- package/dist/{chunk-shke1fcm.js → chunk-nwxjh1gv.js} +3 -3
- package/dist/chunk-ptc3yqn3.js +2 -0
- package/dist/chunk-pybm7c9p.js +2 -0
- package/dist/{chunk-xpg52hsz.js → chunk-q6w7a1vc.js} +3 -3
- package/dist/{chunk-26jt4jvh.js → chunk-qjm23ma2.js} +1 -1
- package/dist/chunk-qnx71b17.js +2 -0
- package/dist/chunk-qx8cav4w.js +2 -0
- package/dist/chunk-rb7cwck6.js +2 -0
- package/dist/chunk-s1e0t3hv.js +2 -0
- package/dist/chunk-s7vfmasx.js +2 -0
- package/dist/{chunk-jd4dr23j.js → chunk-scwbttvt.js} +2 -2
- package/dist/{chunk-7trdtz0c.js → chunk-sxtvy0sm.js} +2 -2
- package/dist/chunk-t7z67vf6.js +2 -0
- package/dist/{chunk-qttq8cje.js → chunk-tarvase5.js} +1 -1
- package/dist/{chunk-qgxwf9xr.js → chunk-thdnk1kd.js} +3 -3
- package/dist/{chunk-ftwdjgzd.js → chunk-tjz3r7rj.js} +5 -5
- package/dist/{chunk-yehdcjn1.js → chunk-tm201m9x.js} +2 -2
- package/dist/chunk-tqs9pcga.js +2 -0
- package/dist/chunk-twjfrywv.js +2 -0
- package/dist/{chunk-rwxg4m3h.js → chunk-v0wdgxga.js} +1 -1
- package/dist/{chunk-p9jfn4yh.js → chunk-vggtxttf.js} +5 -5
- package/dist/chunk-vyna2rsq.js +2 -0
- package/dist/chunk-w4gjx2zs.js +18 -0
- package/dist/{chunk-v4rrgphj.js → chunk-wrbhq1y2.js} +3 -3
- package/dist/{chunk-4a0x737h.js → chunk-x69457q9.js} +4 -4
- package/dist/chunk-xhe7pw6e.js +2 -0
- package/dist/{chunk-33x46g87.js → chunk-xmy6g81m.js} +1 -1
- package/dist/chunk-y86mpnrg.js +2 -0
- package/dist/{chunk-ypgegzh2.js → chunk-yj9nyt93.js} +2 -2
- package/dist/{chunk-w1stsxm3.js → chunk-z99bf0q0.js} +2 -2
- package/dist/chunk-zm0g7ntw.js +2 -0
- package/dist/{chunk-618t6hxp.js → chunk-zpkgs5d3.js} +4 -4
- package/dist/chunk-zrm2x65c.js +2 -0
- package/dist/{chunk-fxxh149b.js → chunk-zs4s9fcq.js} +4 -4
- package/dist/cli.js +13 -13
- package/dist/craft-entry.js +2 -2
- package/dist/craft.js +2 -2
- package/dist/index.d.ts +1 -0
- package/dist/index.js +1 -0
- package/dist/pwa.js +3 -3
- package/dist/render.js +2 -6
- package/dist/serve.js +2 -6
- package/dist/site-builder/build.js +2 -2
- package/dist/site-builder/router.js +2 -5
- package/dist/site-builder/theme.js +2 -2
- package/dist/ssg.js +4 -4
- package/package.json +5 -5
- package/dist/chunk-13fe3avf.js +0 -2
- package/dist/chunk-1p47cg0g.js +0 -2
- package/dist/chunk-1z46g29d.js +0 -2
- package/dist/chunk-228cbw2p.js +0 -2
- package/dist/chunk-2bggrzv0.js +0 -2
- package/dist/chunk-2dnd2s2a.js +0 -3
- package/dist/chunk-34rh88vd.js +0 -2
- package/dist/chunk-3cqp0m62.js +0 -2
- package/dist/chunk-3dtzcc9j.js +0 -2
- package/dist/chunk-3rgqrs3c.js +0 -2
- package/dist/chunk-51kb36f7.js +0 -2
- package/dist/chunk-53ezn1tw.js +0 -2
- package/dist/chunk-636j1nmd.js +0 -2
- package/dist/chunk-756rpwn0.js +0 -2
- package/dist/chunk-7pq02v7n.js +0 -2
- package/dist/chunk-7sht1rkv.js +0 -2
- package/dist/chunk-9rgp005c.js +0 -2
- package/dist/chunk-azvx5gaa.js +0 -2
- package/dist/chunk-ebk1723c.js +0 -2
- package/dist/chunk-emc7zqry.js +0 -2
- package/dist/chunk-eppv6knk.js +0 -2
- package/dist/chunk-f935fec7.js +0 -2
- package/dist/chunk-g0v1shhr.js +0 -2
- package/dist/chunk-g5pg0pg1.js +0 -2
- package/dist/chunk-g8x32bq2.js +0 -2
- package/dist/chunk-g978f9qg.js +0 -18
- package/dist/chunk-hk7vjyqa.js +0 -2
- package/dist/chunk-jmaw2cdt.js +0 -2
- package/dist/chunk-jw75rmpw.js +0 -2
- package/dist/chunk-m3fq72f8.js +0 -2
- package/dist/chunk-n54twtm7.js +0 -2
- package/dist/chunk-np6y9evb.js +0 -2
- package/dist/chunk-pk0mxjxw.js +0 -2
- package/dist/chunk-q9r13taa.js +0 -2
- package/dist/chunk-qqjhq0hb.js +0 -2
- package/dist/chunk-qsjkewah.js +0 -2
- package/dist/chunk-qw80eta1.js +0 -2
- package/dist/chunk-r51bfc2y.js +0 -2
- package/dist/chunk-rbrvepr3.js +0 -2
- package/dist/chunk-se4ny3q0.js +0 -2
- package/dist/chunk-sxvv9w8t.js +0 -2
- package/dist/chunk-sy703233.js +0 -2
- package/dist/chunk-syzn6mq5.js +0 -2
- package/dist/chunk-v3r1wwec.js +0 -2
- package/dist/chunk-vd5d1yb9.js +0 -2
- package/dist/chunk-vmdsj8r5.js +0 -2
- package/dist/chunk-vmg3f76h.js +0 -2
- package/dist/chunk-w63c96ce.js +0 -2
- package/dist/chunk-wcgca1q6.js +0 -2
- package/dist/chunk-wv8qmwqp.js +0 -2
- package/dist/chunk-x90f7h2g.js +0 -2
- package/dist/chunk-xhnpgey5.js +0 -2
- package/dist/chunk-y54pj23g.js +0 -2
- package/dist/chunk-yhrkqcqd.js +0 -2
- package/dist/chunk-ykxpzjgy.js +0 -2
- package/dist/chunk-zhyrhxdp.js +0 -2
- package/dist/chunk-zn5tewws.js +0 -2
- package/dist/chunk-zvra3bmk.js +0 -2
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
// @bun
|
|
2
|
+
import{Ca,yu,Un,qm,bu,wu,vu,Km}from"./chunk-wrbhq1y2.js";import"./chunk-261t62q4.js";import"./chunk-naj146zq.js";import"./chunk-5rxks14t.js";import"./chunk-830ej8d2.js";import"./chunk-xppm4cs4.js";import"./chunk-1jwcp2k0.js";export{Un as Validator,yu as defineForm,bu as processErrorDirective,wu as processErrorsDirective,Km as processFormValidationDirectives,vu as processHasErrorsDirective,Ca as useForm,qm as v};
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
// @bun
|
|
2
|
-
import{Ft,le,_,u,f,P,t,ee,K,l,Ce,Pi,z,En,Ii,Vt,Oi,
|
|
2
|
+
import{Ft,le,_,u,f,P,t,ee,K,l,Ce,Pi,z,En,Ii,Vt,Oi,ml,Ir,hl,lt,yl,Or,bl,Tn,Ni,wl,Nr,Dr,Ee,Mi}from"./chunk-830ej8d2.js";import{fi,Bc,o,C,Me,Nt,mn,De,ge,J,kr,hn,Vs,Xc,Jc,bn,$r,Ws,qs,Yc,vi,Zc,Qc,el,tl,je,Be,Ks,He,s,xn,m,p,W,Q,_e,E,Ti}from"./chunk-261t62q4.js";import{Bt}from"./chunk-5rxks14t.js";import{_n}from"./chunk-naj146zq.js";import{b}from"./chunk-5q4tncfw.js";import{br,Ns}from"./chunk-3gfd9t8a.js";import{Sc,kc,mr,tt,_c,O}from"./chunk-6nb49h13.js";import{ri,si,oi,ii}from"./chunk-dba4bwkd.js";import{yc,ms}from"./chunk-b7nmgkwa.js";import{us,ds,ps}from"./chunk-7de5y29a.js";import{bs,Xo,Jo,ws,vs,Yo}from"./chunk-b1tctqn5.js";import{hs,Uo}from"./chunk-aj6vqdf7.js";import{Fo}from"./chunk-t5q31st4.js";import{ie,Wo,qo,Ko}from"./chunk-v0wdgxga.js";import{dr,ve,wc,pr,vc}from"./chunk-02css3vk.js";import{B,Qe}from"./chunk-pb09xy77.js";import{Ec,Tc}from"./chunk-68w65mhs.js";import{T,$n,Di}from"./chunk-9xr628ew.js";import Kn from"fs";import se from"path";function pt(n){let e=Nt(n),c=e.find((x)=>x.closing&&x.name.toLowerCase()==="head");if(!c)return n;let a=new Set(["template","svg","noscript","math","textarea","title","xmp","iframe","noembed","noframes","plaintext"]),g=0,r=[];for(let x=0;x<e.length;x++){let w=e[x];if(w.start<c.end)continue;let v=w.name.toLowerCase();if(a.has(v)){g=Math.max(0,g+(w.closing?-1:w.selfClosing?0:1));continue}if(v!=="style"||w.closing||g>0)continue;let k=e[x+1];if(k?.name.toLowerCase()==="style"&&k.closing){if(/@scope\s*\{/.test(n.slice(w.end,k.start)))continue;r.push({start:w.start,end:k.end}),x++}}if(!r.length)return n;let d=r.map((x)=>n.slice(x.start,x.end)).join(`
|
|
3
3
|
`),y=[n.slice(0,c.start),d,`
|
|
4
4
|
`],h=c.start;for(let x of r)y.push(n.slice(h,x.start)),h=x.end;return y.push(n.slice(h)),y.join("")}function ft(){return`
|
|
5
5
|
// STX Lifecycle Runtime
|
|
@@ -580,7 +580,7 @@ ${A.element}`);else v.push(`@else
|
|
|
580
580
|
${A.element}`);v.push("@endif");let k=v.join(`
|
|
581
581
|
`),S=r[0].outerStart,M=r[r.length-1].outerEnd;e=e.slice(0,S)+k+e.slice(M),c=S+k.length}return e}function Cn(n){return n.replace(/\bv-show="([^"]*)"/g,'@show="$1"')}function An(n){let e=n,c=0;while(c<e.length){let a=$e(e,c);if(!a)break;let g=yn.has(a.tag),r=a.attrs.replace(/([^\s=]+)(?:\s*=\s*("[^"]*"|'[^']*'|[^\s]+))?/g,(y,h,x)=>{let w=/^v-model(?::([a-zA-Z_][a-zA-Z0-9_]*))?((?:\.[a-zA-Z]+)*)$/.exec(h);if(!w||!x||!/^["']/.test(x))return y;let v=w[1]||"modelValue",k=w[2];if(g&&!w[1])return`@model${k}=${x}`;let S=x[0],M=x.slice(1,-1),A=`:${v}=${x} @update:${v}=${S}${M} = $event${S}`;if(k){let R=w[1]?`${v}Modifiers`:"modelModifiers",D=k.slice(1).split(".").map((j)=>`${j}: true`).join(", ");A+=` :${R}="{ ${D} }"`}return A});if(r===a.attrs){c=a.end;continue}let d=Ie(a.full,{...a,start:0,end:a.full.length},r);e=e.slice(0,a.start)+d+e.slice(a.end),c=a.start+d.length}return e}function Rn(n){return n.replace(/\bv-bind:([a-zA-Z_][a-zA-Z0-9_-]*)\s*=\s*"([^"]*)"/g,'@bind:$1="$2"')}function Mn(n){return n.replace(/\bv-on:([a-zA-Z_][a-zA-Z0-9_.-]*)\s*=\s*"([^"]*)"/g,'@$1="$2"')}function Dn(n){let e=n,c=0;while(c<e.length){let a=$e(e,c);if(!a)break;let g=qe(a.attrs,"v-html");if(g===null){c=a.end;continue}if(a.selfClosing){c=a.end;continue}let r=Se(e,a),d=we(a.attrs,"v-html"),y=a.selfClosing?" /":"",h=`<${a.tag}${d}${y}>{!! ${g} !!}</${a.tag}>`;e=e.slice(0,r.outerStart)+h+e.slice(r.outerEnd),c=r.outerStart+h.length}return e}function In(n){let e=n,c=0;while(c<e.length){let a=$e(e,c);if(!a)break;let g=qe(a.attrs,"v-text");if(g===null){c=a.end;continue}if(a.selfClosing){c=a.end;continue}let r=Se(e,a),d=we(a.attrs,"v-text"),y=a.selfClosing?" /":"",h=`<${a.tag}${d}${y}>{{ ${g} }}</${a.tag}>`;e=e.slice(0,r.outerStart)+h+e.slice(r.outerEnd),c=r.outerStart+h.length}return e}function On(n){return n.replace(/(<[a-zA-Z][a-zA-Z0-9-]*)(\s[^>]*?)\s+v-pre([^>]*>)/g,"$1$2 data-stx-skip$3").replace(/(<[a-zA-Z][a-zA-Z0-9-]*)\s+v-pre(\s[^>]*>|>)/g,"$1 data-stx-skip$2")}function Ln(n){let e=n,c=0;while(c<e.length){let a=$e(e,c);if(!a)break;if(!Jt(a.attrs,"v-once")){c=a.end;continue}let g=we(a.attrs,"v-once"),r=Se(e,a),d=e.slice(r.outerStart,r.outerEnd),h=`@once
|
|
582
582
|
${Ie(d,{...a,start:0,end:a.end-a.start},g)}
|
|
583
|
-
@endonce`;e=e.slice(0,r.outerStart)+h+e.slice(r.outerEnd),c=r.outerStart+h.length}return e}function Pn(n){return n.replace(/\bv-memo="([^"]*)"/g,'data-stx-memo="$1"')}function jn(n){return n.replace(/\bv-slot:([a-zA-Z_][a-zA-Z0-9_-]*)\s*=\s*"([^"]*)"/g,'#$1="$2"').replace(/\bv-slot:([a-zA-Z_][a-zA-Z0-9_-]*)(?=[\s>])/g,"#$1").replace(/\bv-slot\s*=\s*"([^"]*)"/g,'#default="$1"')}function Qt(n){if(!vn(n))return n;let e=n;return e=kn(e),e=Sn(e),e=Ln(e),e=Rn(e),e=Mn(e),e=An(e),e=Cn(e),e=jn(e),e=Dn(e),e=In(e),e=On(e),e=Pn(e),e}function Ke(n){return n.replace(/--/g,"- -").replace(/</g,"<").replace(/>/g,">")}var st=new Set(["a","abbr","address","article","aside","audio","b","bdi","bdo","blockquote","button","canvas","caption","cite","code","col","colgroup","data","datalist","dd","del","details","dfn","dialog","div","dl","dt","em","fieldset","figcaption","figure","footer","form","h1","h2","h3","h4","h5","h6","header","hgroup","hr","i","iframe","img","input","ins","kbd","label","legend","li","main","mark","menu","meter","nav","ol","optgroup","option","output","p","picture","pre","progress","q","rp","rt","ruby","s","samp","section","select","small","span","strong","sub","summary","sup","table","tbody","td","textarea","tfoot","th","thead","time","tr","u","ul","video"]),Nn=new Set(["area","base","br","col","embed","hr","img","input","link","meta","source","track","wbr"]);function Yt(n,e){let c=/^\s*\{\{\s*([\s\S]+?)\s*\}\}\s*$/.exec(n),a=c?c[1]:n,g=u(a,e);if(g&&typeof g==="string")return g;let r=a.trim();return st.has(r)?r:null}function er(n){let e=/^\s*\{\{\s*([\s\S]+?)\s*\}\}\s*$/.exec(n);return e?e[1]:n}function tr(n,e,c){let a=e.replace(/\s*(?::is|v-bind:is)\s*=\s*"[^"]*"/gi,"").trim(),g=a?`<${n} ${a}>`:`<${n}>`;if(Nn.has(n))return a?`<${n} ${a}>`:`<${n}>`;return`${g}${c}</${n}>`}async function rr(n,e,c,a,g){let r=n,d=/<component\s+(?::is|v-bind:is)\s*=\s*"([^"]*)"([^>]*)>([\s\S]*?)<\/component>/gi,y=[],h;while((h=d.exec(r))!==null)y.push({full:h[0],expr:h[1],attrs:h[2],slotContent:h[3],index:h.index});for(let x=y.length-1;x>=0;x--){let w=y[x];try{let v=Yt(w.expr,e);if(!v||typeof v!=="string"){let j=`<!-- dynamic component: could not resolve "${Ke(er(w.expr))}" -->`;r=r.slice(0,w.index)+j+r.slice(w.index+w.full.length);continue}if(st.has(v)){let j=tr(v,w.attrs,w.slotContent);r=r.slice(0,w.index)+j+r.slice(w.index+w.full.length);continue}let k=w.attrs.trim(),S={},M=/(?::([a-zA-Z_][a-zA-Z0-9_-]*)|([a-zA-Z_][a-zA-Z0-9_-]*))\s*=\s*"([^"]*)"/g,A;while((A=M.exec(k))!==null){let j=A[1]||A[2],N=A[3];if(A[1])try{S[j]=u(N,e)}catch{S[j]=N}else S[j]=N}let R=a.componentsDir||"components",D=await He(v,S,w.slotContent,R,e,c,a,new Set,g??new Set);r=r.slice(0,w.index)+D+r.slice(w.index+w.full.length)}catch(v){let k=v instanceof Error?v.message:String(v),S=`<!-- dynamic component error: ${Ke(k)} -->`;r=r.slice(0,w.index)+S+r.slice(w.index+w.full.length)}}return r=await Hn(r,e,c,a,g),r}async function Hn(n,e,c,a,g){let r=n,d=/<component\s+(?::is|v-bind:is)\s*=\s*"([^"]*)"([^>]*?)\/>/gi,y=[],h;while((h=d.exec(r))!==null)y.push({full:h[0],expr:h[1],attrs:h[2],index:h.index});for(let x=y.length-1;x>=0;x--){let w=y[x];try{let v=Yt(w.expr,e);if(!v||typeof v!=="string"){let M=`<!-- dynamic component: could not resolve "${Ke(er(w.expr))}" -->`;r=r.slice(0,w.index)+M+r.slice(w.index+w.full.length);continue}if(st.has(v)){let M=tr(v,w.attrs,"");r=r.slice(0,w.index)+M+r.slice(w.index+w.full.length);continue}let k=a.componentsDir||"components",S=await He(v,{},"",k,e,c,a,new Set,g??new Set);r=r.slice(0,w.index)+S+r.slice(w.index+w.full.length)}catch(v){let k=v instanceof Error?v.message:String(v),S=`<!-- dynamic component error: ${Ke(k)} -->`;r=r.slice(0,w.index)+S+r.slice(w.index+w.full.length)}}return r}var
|
|
583
|
+
@endonce`;e=e.slice(0,r.outerStart)+h+e.slice(r.outerEnd),c=r.outerStart+h.length}return e}function Pn(n){return n.replace(/\bv-memo="([^"]*)"/g,'data-stx-memo="$1"')}function jn(n){return n.replace(/\bv-slot:([a-zA-Z_][a-zA-Z0-9_-]*)\s*=\s*"([^"]*)"/g,'#$1="$2"').replace(/\bv-slot:([a-zA-Z_][a-zA-Z0-9_-]*)(?=[\s>])/g,"#$1").replace(/\bv-slot\s*=\s*"([^"]*)"/g,'#default="$1"')}function Qt(n){if(!vn(n))return n;let e=n;return e=kn(e),e=Sn(e),e=Ln(e),e=Rn(e),e=Mn(e),e=An(e),e=Cn(e),e=jn(e),e=Dn(e),e=In(e),e=On(e),e=Pn(e),e}function Ke(n){return n.replace(/--/g,"- -").replace(/</g,"<").replace(/>/g,">")}var st=new Set(["a","abbr","address","article","aside","audio","b","bdi","bdo","blockquote","button","canvas","caption","cite","code","col","colgroup","data","datalist","dd","del","details","dfn","dialog","div","dl","dt","em","fieldset","figcaption","figure","footer","form","h1","h2","h3","h4","h5","h6","header","hgroup","hr","i","iframe","img","input","ins","kbd","label","legend","li","main","mark","menu","meter","nav","ol","optgroup","option","output","p","picture","pre","progress","q","rp","rt","ruby","s","samp","section","select","small","span","strong","sub","summary","sup","table","tbody","td","textarea","tfoot","th","thead","time","tr","u","ul","video"]),Nn=new Set(["area","base","br","col","embed","hr","img","input","link","meta","source","track","wbr"]);function Yt(n,e){let c=/^\s*\{\{\s*([\s\S]+?)\s*\}\}\s*$/.exec(n),a=c?c[1]:n,g=u(a,e);if(g&&typeof g==="string")return g;let r=a.trim();return st.has(r)?r:null}function er(n){let e=/^\s*\{\{\s*([\s\S]+?)\s*\}\}\s*$/.exec(n);return e?e[1]:n}function tr(n,e,c){let a=e.replace(/\s*(?::is|v-bind:is)\s*=\s*"[^"]*"/gi,"").trim(),g=a?`<${n} ${a}>`:`<${n}>`;if(Nn.has(n))return a?`<${n} ${a}>`:`<${n}>`;return`${g}${c}</${n}>`}async function rr(n,e,c,a,g){let r=n,d=/<component\s+(?::is|v-bind:is)\s*=\s*"([^"]*)"([^>]*)>([\s\S]*?)<\/component>/gi,y=[],h;while((h=d.exec(r))!==null)y.push({full:h[0],expr:h[1],attrs:h[2],slotContent:h[3],index:h.index});for(let x=y.length-1;x>=0;x--){let w=y[x];try{let v=Yt(w.expr,e);if(!v||typeof v!=="string"){let j=`<!-- dynamic component: could not resolve "${Ke(er(w.expr))}" -->`;r=r.slice(0,w.index)+j+r.slice(w.index+w.full.length);continue}if(st.has(v)){let j=tr(v,w.attrs,w.slotContent);r=r.slice(0,w.index)+j+r.slice(w.index+w.full.length);continue}let k=w.attrs.trim(),S={},M=/(?::([a-zA-Z_][a-zA-Z0-9_-]*)|([a-zA-Z_][a-zA-Z0-9_-]*))\s*=\s*"([^"]*)"/g,A;while((A=M.exec(k))!==null){let j=A[1]||A[2],N=A[3];if(A[1])try{S[j]=u(N,e)}catch{S[j]=N}else S[j]=N}let R=a.componentsDir||"components",D=await He(v,S,w.slotContent,R,e,c,a,new Set,g??new Set);r=r.slice(0,w.index)+D+r.slice(w.index+w.full.length)}catch(v){let k=v instanceof Error?v.message:String(v),S=`<!-- dynamic component error: ${Ke(k)} -->`;r=r.slice(0,w.index)+S+r.slice(w.index+w.full.length)}}return r=await Hn(r,e,c,a,g),r}async function Hn(n,e,c,a,g){let r=n,d=/<component\s+(?::is|v-bind:is)\s*=\s*"([^"]*)"([^>]*?)\/>/gi,y=[],h;while((h=d.exec(r))!==null)y.push({full:h[0],expr:h[1],attrs:h[2],index:h.index});for(let x=y.length-1;x>=0;x--){let w=y[x];try{let v=Yt(w.expr,e);if(!v||typeof v!=="string"){let M=`<!-- dynamic component: could not resolve "${Ke(er(w.expr))}" -->`;r=r.slice(0,w.index)+M+r.slice(w.index+w.full.length);continue}if(st.has(v)){let M=tr(v,w.attrs,"");r=r.slice(0,w.index)+M+r.slice(w.index+w.full.length);continue}let k=a.componentsDir||"components",S=await He(v,{},"",k,e,c,a,new Set,g??new Set);r=r.slice(0,w.index)+S+r.slice(w.index+w.full.length)}catch(v){let k=v instanceof Error?v.message:String(v),S=`<!-- dynamic component error: ${Ke(k)} -->`;r=r.slice(0,w.index)+S+r.slice(w.index+w.full.length)}}return r}var fc="X-STX-Build",it=Symbol.for("stx.buildId");function ls(){let n=globalThis;if(!n[it])n[it]=process.env.STX_BUILD_ID||`${Date.now().toString(36)}${Math.random().toString(36).slice(2,8)}`;return n[it]}function nr(n,e=ls()){if(n.includes('name="stx-build"'))return null;if(!/<head\b[^>]*>/i.test(n))return null;return`
|
|
584
584
|
<meta name="stx-build" content="${e}">`}var jo="/_stx/sw.js";function Bn(n){if(typeof n!=="string"||!n.startsWith("/"))return null;let e=[],c=[],a=n.replace(/\/+$/,"").split("/").slice(1).map((g)=>{let r=/^:(\w+)$/.exec(g)||/^\[(\w+)\]$/.exec(g);if(r)return e.push(r[1]),c.push("0"),"([^/]+)";return c.push(g),g.replace(/[.*+?^${}()|[\]\\]/g,"\\$&")});if(!e.length)return null;return{path:n,re:`^/${a.join("/")}/?$`,names:e,sample:`/${c.join("/")}`}}function Fn(n){if(typeof navigator>"u"||!("serviceWorker"in navigator)||!navigator.serviceWorker)return;let e=navigator.serviceWorker,c=window;if(c.stxOffline)return;let a=null,g=!1,r=[],d={updateReady:!1,reachable:!0,reachedAt:0,registration:()=>a,onUpdateReady(w){if(d.updateReady)try{w()}catch{}else r.push(w);return()=>{let v=r.indexOf(w);if(v!==-1)r.splice(v,1)}},applyUpdate(){let w=a&&a.waiting;if(!w)return!1;return g=!0,w.postMessage({type:"stx:activate-update",force:!0}),!0}};c.stxOffline=d;let y=(w)=>{if(!w.waiting||!e.controller||d.updateReady)return;d.updateReady=!0;let v=r.splice(0);for(let k of v)try{k()}catch{}try{window.dispatchEvent(new CustomEvent("stx:offline-update-ready"))}catch{}};e.addEventListener("message",(w)=>{let v=w.data||{};if(v.type==="stx:updated")try{window.dispatchEvent(new CustomEvent("stx:updated",{detail:{url:v.url,kind:v.kind,fragment:!!v.fragment}}))}catch{}if(v.type==="stx:reachability"){if(c.stxOffline.reachable=v.reachable!==!1,Number(v.at)>0)c.stxOffline.reachedAt=Number(v.at);try{window.dispatchEvent(new CustomEvent("stx:reachability",{detail:{reachable:v.reachable!==!1,at:Number(v.at)||0}}))}catch{}}}),e.addEventListener("controllerchange",()=>{if(g)g=!1,location.reload()}),document.addEventListener("visibilitychange",()=>{if(document.visibilityState==="hidden"&&a&&a.waiting)a.waiting.postMessage({type:"stx:activate-update",reason:"hidden"})});let h=()=>{e.register(n,{scope:"/"}).then((w)=>{a=w;try{e.controller?.postMessage({type:"stx:reachability?"})}catch{}if(w.waiting)y(w),w.waiting.postMessage({type:"stx:activate-update",reason:"load"});w.addEventListener("updatefound",()=>{let v=w.installing;if(!v)return;v.addEventListener("statechange",()=>{if(v.state==="installed")y(w)})})}).catch(()=>{})},x=()=>{let w=(v)=>{setTimeout(v,0)};if(typeof requestAnimationFrame==="function")requestAnimationFrame(()=>w(h));else w(h)};if(!e.controller)if(document.readyState==="complete")x();else addEventListener("load",x);else if(document.readyState==="loading")document.addEventListener("DOMContentLoaded",x);else x()}function Un(){let n=`(${Fn.toString()})(${JSON.stringify("/_stx/sw.js")})`;try{return new Bun.Transpiler({loader:"js",minifyWhitespace:!0}).transformSync(n).trim().replace(/;$/,"")}catch{return n}}function qn(n,e){if(typeof e==="string"&&e.startsWith("/"))return e==="/"?"/":e.replace(/\/+$/,"");if(!n||!n.startsWith("/"))return null;let c=n.split(/[?#]/)[0].split("/").filter(Boolean)[0];return c?`/${c}`:"/"}var sr=`<script data-stx-offline>${Un()}</script>`;function Bo(n,e){let c=Number(n.precacheTimeoutMs),a={build:String(e||"dev"),pages:Array.from(new Set((n.pages||[]).filter((g)=>typeof g==="string"&&g.startsWith("/")))),staticPages:(n.staticPages||[]).filter((g)=>typeof g==="string"&&((n.pages||[]).includes(g)||(n.routes||[]).includes(g))),api:n.apiPrefix||"/api/",timeout:Math.max(500,Number(n.networkTimeoutMs)||1500),precacheTimeout:Number.isFinite(c)&&c>0?Math.min(2147483647,Math.max(1,Math.floor(c))):1e4,networkFirst:(n.networkFirst||[]).filter((g)=>typeof g==="string"&&g.startsWith("/")),updateOnColdStart:n.updateOnColdStart===!0,fallback:n.fallback||n.pages&&n.pages[0]||null,fallbackScope:qn(n.fallback||n.pages&&n.pages[0]||null,n.fallbackScope),routes:(n.routes||[]).map(Bn).filter(Boolean),exclude:["/_stx/hmr","/_stx/sw.js",...n.exclude||[]],mediaMax:Math.max(10485760,Number(n.mediaMaxBytes)||629145600),assetsMax:Math.max(50,Number(n.assetsMaxEntries)||500)};return`/* stx offline worker, build ${a.build} */
|
|
585
585
|
'use strict';
|
|
586
586
|
var S = ${JSON.stringify(a)};
|
|
@@ -1295,35 +1295,35 @@ ${R}
|
|
|
1295
1295
|
</style>`;a=a.replace(x,D),y.lastIndex=0}catch(R){}}}return a}import ot from"path";var Wn=/(\bfrom\s*|\bimport\s*\(\s*|\bimport\s+)(['"])(\.\.?\/[^'"]*)\2/g,Xn=/(<script\b[^>]*>)([\s\S]*?)(<\/script>)/gi;function zn(n,e){if(!e||!n.includes("/"))return n;let c=ot.dirname(e);return n.replace(Wn,(a,g,r,d)=>{let y=ot.resolve(c,d);return`${g}${r}${y.split(ot.sep).join("/")}${r}`})}function ur(n,e){if(!e||!n.includes("<script"))return n;return n.replace(Xn,(c,a,g,r)=>`${a}${zn(g,e)}${r}`)}var Te="<!--PARENT_CONTENT_PLACEHOLDER-->";function fr(n){return n.replace(/&/g,"&").replace(/"/g,""").replace(/</g,"<").replace(/>/g,">")}function Sr(n,e){let c=n.length,a=e,g=!0,r=[],d=(y)=>y+9<=c&&n[y]==="<"&&n[y+1]==="/"&&(n[y+2]==="s"||n[y+2]==="S")&&(n[y+3]==="c"||n[y+3]==="C")&&(n[y+4]==="r"||n[y+4]==="R")&&(n[y+5]==="i"||n[y+5]==="I")&&(n[y+6]==="p"||n[y+6]==="P")&&(n[y+7]==="t"||n[y+7]==="T")&&(n[y+8]===">"||/\s/.test(n[y+8]));while(a<c){let y=n[a];if(d(a))return a;if(y==="/"&&n[a+1]==="/"){if(a=n.indexOf(`
|
|
1296
1296
|
`,a+2),a===-1)return-1;a+=1,g=!0;continue}if(y==="/"&&n[a+1]==="*"){let h=n.indexOf("*/",a+2);if(h===-1)return-1;a=h+2,g=!0;continue}if(y==="/"&&g){let h=a+1,x=!1;while(h<c){let w=n[h];if(w==="\\"){h+=2;continue}if(w==="[")x=!0;else if(w==="]")x=!1;else if(w==="/"&&!x){h++;break}else if(w===`
|
|
1297
1297
|
`){h=-1;break}h++}if(h===-1){a++,g=!1;continue}while(h<c&&/[a-z]/.test(n[h]))h++;a=h,g=!1;continue}if(y==="'"||y==='"'){let h=y;a++;while(a<c){if(n[a]==="\\"){a+=2;continue}if(n[a]===h){a++;break}if(n[a]===`
|
|
1298
|
-
`)break;a++}g=!1;continue}if(y==="`"){a++;while(a<c){if(n[a]==="\\"){a+=2;continue}if(n[a]==="`"){a++;break}if(n[a]==="$"&&n[a+1]==="{"){r.push(!0),a+=2,g=!0;break}a++}if(r.length===0)g=!1;continue}if(y==="}"&&r.length>0){r.pop(),a++;while(a<c){if(n[a]==="\\"){a+=2;continue}if(n[a]==="`"){a++,g=!1;break}if(n[a]==="$"&&n[a+1]==="{"){r.push(!0),a+=2,g=!0;break}a++}continue}if(/\s/.test(y));else if(/[)\].\w$]/.test(y))g=!1;else g=!0;a++}return-1}function Er(n,e){let c=e.replace(/[.*+?^${}()|[\]\\]/g,"\\$&"),a=new RegExp(`<script\\b(?=[^>]*\\b${c}(?:\\s|=|/?>))[^>]*>`,"i").exec(n);if(!a)return null;let g=a.index+a[0].length,r=n.indexOf("</script>",g);if(r===-1)return null;let d=n.indexOf(">",r);if(d===-1)return null;return{start:a.index,end:d+1}}var Gn=4096;async function at(n,e,c){if(c.buildMode!=="serve"||e.length<Gn)return null;let{registerServeModuleBundle:a}=await import("./chunk-
|
|
1298
|
+
`)break;a++}g=!1;continue}if(y==="`"){a++;while(a<c){if(n[a]==="\\"){a+=2;continue}if(n[a]==="`"){a++;break}if(n[a]==="$"&&n[a+1]==="{"){r.push(!0),a+=2,g=!0;break}a++}if(r.length===0)g=!1;continue}if(y==="}"&&r.length>0){r.pop(),a++;while(a<c){if(n[a]==="\\"){a+=2;continue}if(n[a]==="`"){a++,g=!1;break}if(n[a]==="$"&&n[a+1]==="{"){r.push(!0),a+=2,g=!0;break}a++}continue}if(/\s/.test(y));else if(/[)\].\w$]/.test(y))g=!1;else g=!0;a++}return-1}function Er(n,e){let c=e.replace(/[.*+?^${}()|[\]\\]/g,"\\$&"),a=new RegExp(`<script\\b(?=[^>]*\\b${c}(?:\\s|=|/?>))[^>]*>`,"i").exec(n);if(!a)return null;let g=a.index+a[0].length,r=n.indexOf("</script>",g);if(r===-1)return null;let d=n.indexOf(">",r);if(d===-1)return null;return{start:a.index,end:d+1}}var Gn=4096;async function at(n,e,c){if(c.buildMode!=="serve"||e.length<Gn)return null;let{registerServeModuleBundle:a}=await import("./chunk-qx8cav4w.js");return`<script ${n} src="${a(e)}"></script>`}async function or(n,e,c,a){try{let{registeredModuleIdsIn:g,buildModuleRegistryScript:r}=await o("stx/client-module-registry",()=>import("./chunk-9fz3h6sx.js")),d=[],y=await r(g(...n),{minify:Di(e.buildMode,e.minifyClient),collectInputs:d});for(let h of d)c?.add(h);if(a)a.inputs=d,a.code=y??void 0;if(!y)return null;if(e.buildMode==="serve"){let{registerServeModuleBundle:h}=await import("./chunk-qx8cav4w.js");return`<script data-stx-scoped data-stx-run="always" data-stx-modules src="${h(y)}"></script>`}return`<script data-stx-scoped data-stx-run="always" data-stx-modules>${y.replace(/<\/script/gi,"<\\/script")}</script>`}catch{return null}}async function Zn(n,e,c,a){let g={modulesTag:null,modulesCode:null,storeTag:null,storeCode:null,composableTag:null,composableCode:null,frameworkScript:null};try{let{getFrameworkComposableScript:k}=await o("stx/framework-composables",()=>import("./chunk-mjkdskeg.js"));g.frameworkScript=await k(n)}catch{}let r=null;try{r=await o("stx/store-loader",()=>import("./chunk-5x9ajbq0.js"))}catch{}let d=e.storesDir,y=!!a.__stx_native_screen||(r?.pageStoresAll()??!0),h=y?"":n.replace(/<script\b[^>]*\bdata-stx-(?:runtime|router|hmr)\b[^>]*>[\s\S]*?<\/script>/gi,""),x=[],w=[],v=null;for(let k=0;k<8;k++){let S=null,M="",A=!1;try{if(r){let N=y?await r.getStoreScript(d).then((F)=>F?{code:F,stores:["*"],functions:null}:null):await r.getStoreScriptFor(d,[h],{reads:r.storesReadInFiles([...x,...w]),runOnce:!0});if(N)S=N.code,M=N.stores.join(","),A=!!N.functions&&!y}}catch{}if(v!==null&&M===v)break;v=M;let R=A?'data-stx-scoped data-stx-run="always" data-stx-stores':"data-stx-stores",D=S?`<script ${R}>${S}</script>`:null;g.storeCode=S,g.storeTag=S?await at(R,S,e)??D:null;let j={};g.modulesTag=await or([n,D],e,c,j),g.modulesCode=j.code??null,x=j.inputs??[],g.composableTag=null,g.composableCode=null,w=[];try{let{getComposableScript:N}=await o("stx/composable-loader",()=>import("./chunk-3y7yp0ka.js")),F=e.composablesDir,I=[g.modulesCode??g.modulesTag,D,g.frameworkScript].filter((H)=>H!==null),L=await N(e._layerComposableDirs??F,n,I,w);if(L)g.composableCode=L,g.composableTag=await at('data-stx-scoped data-stx-run="always" data-stx-composables',L,e)??`<script data-stx-scoped data-stx-run="always" data-stx-composables>${L}</script>`}catch{}if(y||!r)break}return g}async function Jn(n,e,c,a={}){let{withModuleSubstitutes:g,moduleSubstitutionKey:r}=await import("./chunk-mad172af.js"),d=await import("./chunk-kh01rvag.js"),{messages:y,webModules:h}=e,x=null,w=null,v=r()===""&&!a.__stx_native_screen;if(y&&d.pageMessagesEnabled(e)&&v)try{x=await d.loadPageMessages(process.cwd(),y)}catch(R){Qn(R)}if(h&&Object.keys(h).length&&v)try{w=await(await import("./chunk-xmy6g81m.js")).loadWebModules(process.cwd(),h)}catch(R){Yn(R)}let k=new Map([...w??[],...x?.stubs??[]]),S=()=>Zn(n,e,c,a),M=k.size?await g(k,S):await S(),A=null;if(x){let R=d.messageAreasIn(M.modulesCode,M.storeCode,M.composableCode),D=d.pageMessagesScript(x,d.pageLanguages(n,x),R);if(D)A=await at('data-stx-scoped data-stx-run="always" data-stx-messages',D,e)??`<script data-stx-scoped data-stx-run="always" data-stx-messages>${D.replace(/<\/script/gi,"<\\/script")}</script>`}return[A,M.modulesTag,M.storeTag,M.composableTag,M.frameworkScript].filter((R)=>R!==null)}var gr=!1;function Qn(n){if(gr)return;gr=!0,console.warn(`[stx] messages: ${n instanceof Error?n.message:String(n)}; pages ship every language`)}var hr=!1;function Yn(n){if(hr)return;hr=!0,console.warn(`[stx] ${n instanceof Error?n.message:String(n)}; pages bundle the real modules`)}function es(n,e=""){let c=Er(n,"data-stx-runtime");if(!c)return n;let a=dr(n);if(a===-1||a===c.start){if(!e)return n;return n.slice(0,c.end)+e+n.slice(c.end)}if(a<c.start)return n.slice(0,a)+n.slice(c.start,c.end)+e+`
|
|
1299
1299
|
`+n.slice(a,c.start)+n.slice(c.end);let g=n.slice(c.start,c.end),r=n.slice(0,c.start)+n.slice(c.end),d=dr(r);if(d===-1)return g+e+`
|
|
1300
1300
|
`+r;return r.slice(0,d)+g+e+`
|
|
1301
|
-
`+r.slice(d)}function ts(n){let e=/\x00STX_ESC_MUSTACHE_OPEN\x00([\s\S]*?)\x00STX_ESC_MUSTACHE_CLOSE\x00/g;return n.replace(e,(c,a,g)=>{let r=n.slice(0,g);return r.lastIndexOf("<")>r.lastIndexOf(">")?`{{${a}}}`:`{<!--stx-literal-->{${a}}}`})}async function i(n,e,c,a,g){if(await _(),a.ssr===!1&&!a.autoShell&&a.buildMode==="spa")return n;if(e.__stx_signals_gate===void 0)e.__stx_signals_gate=_e(n,c);let r=!e.__stxProcessingDepth;bn(e);for(let d of a._layerGraph?.configDependencies??[])g.add(d);if(r&&a.runtimeConfig)await _n(e,c,a.runtimeConfig);if(r)
|
|
1302
|
-
`),...x.htmlAttrs&&{htmlAttrs:
|
|
1301
|
+
`+r.slice(d)}function ts(n){let e=/\x00STX_ESC_MUSTACHE_OPEN\x00([\s\S]*?)\x00STX_ESC_MUSTACHE_CLOSE\x00/g;return n.replace(e,(c,a,g)=>{let r=n.slice(0,g);return r.lastIndexOf("<")>r.lastIndexOf(">")?`{{${a}}}`:`{<!--stx-literal-->{${a}}}`})}async function i(n,e,c,a,g){if(await _(),a.ssr===!1&&!a.autoShell&&a.buildMode==="spa")return n;if(e.__stx_signals_gate===void 0)e.__stx_signals_gate=_e(n,c);let r=!e.__stxProcessingDepth;bn(e);for(let d of a._layerGraph?.configDependencies??[])g.add(d);if(r&&a.runtimeConfig)await _n(e,c,a.runtimeConfig);if(r)el(e),e.__stx_scope_seq??={n:0,key:Ks(String(e.__filename??c))},e.__stx_head_injections=Oi(),e.__stx_seo_staged=!1;if(!e.__stxProcessingDepth)e.__stxProcessingDepth=0;if(e.__stxProcessingDepth++,!e.__onceStore)e.__onceStore=new Set;if((a.debug||!T()&&!$n())&&c&&c.endsWith(".stx"))Fo(n,c);try{return await le.timeAsync("template-processing",async()=>{let d=await rs(n,e,c,a,g);if(r)d=vi(d);if(r&&a.autoShell&&a.buildMode!=="compile"){let y=Ee(a.app?.head,{known:Dr,source:"app.head"}),x=(e.__stx_runtime_head||null)??Mi(),w=(e.__stx_head_raw||"").trim(),v,k=w.match(/<title[^>]*>([\s\S]*?)<\/title>/i);if(k)v=k[1].trim(),w=w.replace(k[0],"").trim();let S=e.__sections?.title,M=S?E(S,e,c):void 0,A=x.title||v||M,R=!x.title&&(!!v||!!M),D=x.meta||[],j=new Set(D.map((V)=>lt(V)).filter(Boolean)),N={...y,...A&&{title:A},meta:[...(y.meta||[]).filter((V)=>!j.has(lt(V))),...D],link:[...y.link||[],...x.link||[]],script:[...y.script||[],...x.script||[]],headRaw:[y.headRaw,w].filter(Boolean).join(`
|
|
1302
|
+
`),...x.htmlAttrs&&{htmlAttrs:yl(y.htmlAttrs,x.htmlAttrs)},...x.bodyAttrs&&{bodyAttrs:{...y.bodyAttrs||{},...x.bodyAttrs}}},F=Ni(d);if(d=Nr(d,N,{...R&&{titleIsHtml:!0},...a.app?.colorMode&&{colorMode:a.app.colorMode}},F),F)d=wl(d,y),d=Or(d,N.htmlAttrs);let I=d.match(/<!-- stx-layout: ([^ ]+) -->/);if(I&&d.includes("<head")){let V=I[1],ae=Ns(V);d=d.replace(/<head\b[^>]*>/i,(X)=>`${X}
|
|
1303
1303
|
<meta name="stx-layout" content="${fr(V)}">
|
|
1304
|
-
<meta name="stx-layout-group" content="${fr(ae)}">`)}let L=d.match(/function (__stx_setup_\w+)\(/),H=L?B(d):null;if(L&&H&&!/\bdata-stx=/.test(H.tag)){d=Qe(d,(ae,X)=>`<body${X} data-stx="${L[1]}">`);let V=new RegExp(`(<(?!body)[a-zA-Z][^>]*) data-stx="${L[1]}"`,"i");d=d.replace(V,"$1")}}if(r){let y=e.__stx_head_injections??Oi(),h=
|
|
1304
|
+
<meta name="stx-layout-group" content="${fr(ae)}">`)}let L=d.match(/function (__stx_setup_\w+)\(/),H=L?B(d):null;if(L&&H&&!/\bdata-stx=/.test(H.tag)){d=Qe(d,(ae,X)=>`<body${X} data-stx="${L[1]}">`);let V=new RegExp(`(<(?!body)[a-zA-Z][^>]*) data-stx="${L[1]}"`,"i");d=d.replace(V,"$1")}}if(r){let y=e.__stx_head_injections??Oi(),h=bl(d);if(h!==null)y.beforeClose.push(h);let x=nr(d);if(x!==null)y.afterOpen.push(x);if(a.offline?.enabled&&!d.includes("data-stx-offline"))y.beforeClose.push(sr);d=ml(d,y);let w=a.app?.colorMode;if(w)d=Ir(d,w)}if(r)if(Er(d,"data-stx-runtime")){let h=await Jn(d,a,g,e);d=es(d,h.map((x)=>`
|
|
1305
1305
|
${x}`).join(""))}else{let h=await or([d],a,g);if(h){let x=d.search(/<script\b[^>]*>(?:(?!<\/script>)[\s\S])*?__stxModules\[/i);if(x!==-1)d=d.slice(0,x)+h+`
|
|
1306
|
-
`+d.slice(x)}}if(r)d=
|
|
1306
|
+
`+d.slice(x)}}if(r)d=hl(d);if(r&&e.__stx_inject_css!==!1)d=await b(d,void 0,a.buildMode==="serve",!0);else if(r)d=hn(d);if(r)d=pt(d);if(d=d.replace(/\x00STX_ESCAPED_AT\x00/g,"@"),d=ts(d),r&&e.__stx_runtime_config)d=Bt(d,e.__stx_runtime_config);if(r&&!e.__stx_defer_server_data){let y=$r(e);if(y){let h=/<head\b[^>]*>/i.exec(d),x=h?h.index+h[0].length:0;d=d.slice(0,x)+y+d.slice(x)}}return d})}catch(d){if(d instanceof K)throw d;let y=d instanceof Error?d.message:String(d),h=new ee(`Template processing failed: ${y}`,c,void 0,void 0,n.substring(0,200)+(n.length>200?"...":""));if(z.log(h,{filePath:c,context:e}),En.logDetailedError(h,{filePath:c,template:n.substring(0,500)}),T()&&!a.debug)console.error(`[stx] ${se.relative(process.cwd(),c)||c}: ${h.message}`);if(a.debug)throw h;return Pi.createFallbackContent("Template Processing",h)}}async function rs(n,e,c,a,g){let r=process.cwd(),d={...a,partialsDir:a.partialsDir&&!se.isAbsolute(a.partialsDir)?se.resolve(r,a.partialsDir):a.partialsDir,componentsDir:a.componentsDir&&!se.isAbsolute(a.componentsDir)?se.resolve(r,a.componentsDir):a.componentsDir,layoutsDir:a.layoutsDir&&!se.isAbsolute(a.layoutsDir)?se.resolve(r,a.layoutsDir):a.layoutsDir},y=d,h=n;await is(c,e),ss(e,y),h=await Ce(()=>zt(h,e,c,y),h,(I)=>{z.log(I,{filePath:c,phase:"pre-processing-middleware"},"warning"),console.warn(`[stx] pre-processing middleware failed for ${c}: ${I.message}`)}),h=h.replace(/\{\{--[\s\S]*?--\}\}/g,"");let x=ge(h,De,(I,L)=>`\x00STX_HTML_COMMENT_${L}\x00`);h=x.output;let w=x.tokens,v=(I)=>w.length===0?I:I.replace(/\x00STX_HTML_COMMENT_(\d+)\x00/g,(L,H)=>w[Number(H)]??""),k="\x00STX_ESCAPED_AT\x00",S="\x00STX_ESC_MUSTACHE_OPEN\x00",M="\x00STX_ESC_MUSTACHE_CLOSE\x00";h=h.replace(/@@/g,k),h=h.replace(/@\{\{([\s\S]*?)\}\}/g,(I,L)=>`${S}${L}${M}`),h=Qt(h),h=await lr(h,c,g);let A={};h=ds(h,A);let R={...e.__sections||{}},D="",j=bt(vt(n)),N=/@nolayout\b/.test(h)||j===!1;if(/@nolayout\b/.test(h))h=h.replace(/@nolayout\b\s*/g,"");let F=h.match(/@(?:layout|extends)\(\s*['"]([^'"]+)['"]\s*\)/);if(F)D=F[1],h=h.replace(/@(?:layout|extends)\(\s*['"]([^'"]+)['"]\s*\)/g,"");else if(typeof j==="string"){if(D=j,!/@section\s*\(/.test(h))h=`@section('content')
|
|
1307
1307
|
${h.trim()}
|
|
1308
1308
|
@endsection`}if(!D&&!N&&y.defaultLayout){let I=Tn(h),L=/@section\s*\(/.test(h);if(!I||L){let H="",V=se.dirname(c),ae=y.layoutsDir?se.dirname(y.layoutsDir):process.cwd();for(let X=0;X<20;X++){let ce=se.join(V,"_layout.stx");if(await s(ce)){H=ce;break}let oe=se.dirname(V);if(oe===V||oe.length<ae.length)break;V=oe}if(H)D=H;else if(y.layoutsDir){let X=se.isAbsolute(y.layoutsDir)?y.layoutsDir:se.resolve(process.cwd(),y.layoutsDir),ce=se.join(X,`${y.defaultLayout}.stx`);if(await s(ce))D=ce}if(D&&!L)h=`@section('content')
|
|
1309
1309
|
${h.trim()}
|
|
1310
1310
|
@endsection`}}if(D&&h.includes("<script")){let I=J(h),L=I.scripts.map((H)=>yr(H,c)??H);h=kr(I.output,L)}if(h=h.replace(/@section\(\s*['"]([^'"]+)['"]\s*,\s*['"]([^'"]+)['"]\s*\)/g,(I,L,H)=>(R[L]=H,"")),h=h.replace(/@section\(\s*['"]([^'"]+)['"]\s*,\s*([^)]+?)\s*\)/g,(I,L,H)=>{if(/^(['"]).*\1$/.test(H.trim()))return I;try{let V=u(H.trim(),e);if(V===void 0)return I;let X=(e.__stx_inline_section_values??=[]).push(V)-1;return R[L]=`{{ __stx_inline_section_values[${X}] }}`,""}catch{return I}}),h=h.replace(/@section\(\s*['"]([^'"]+)['"]\s*\)([\s\S]*?)(?:@endsection|@show)/g,(I,L,H)=>{if(H.includes("@parent"))R[L]=H.replace("@parent",Te);else R[L]=H.trim();return""}),e.__sections=R,h=h.replace(/@(?:yield|slot)\(\s*['"]([^'"]+)['"](?:,\s*['"]([^'"]+)['"])?\)/g,(I,L,H)=>R[L]||H||""),!("slot"in e)||e.slot===void 0)h=h.replace(/\{\{\s*slot\s*\}\}/g,()=>R.content||"");if(h=ps(h,A),D){let I=[],L=J(h),H=ge(L.output,mn,(V,ae)=>`\x00STX_ORPHAN_STYLE_${ae}\x00`);if(h=H.output.replace(/\x00STX_(SCRIPT|ORPHAN_STYLE)_(\d+)\x00/g,(V,ae,X)=>{let ce=ae==="SCRIPT"?yr(L.scripts[Number(X)],c):H.tokens[Number(X)];if(ce)I.push(ce);return""}),I.length>0){let V=I.join(`
|
|
1311
1311
|
`);R.content=R.content?`${R.content}
|
|
1312
1312
|
${V}`:V,e.__sections=R}}if(D)try{let I;if(se.isAbsolute(D))I=D,g.add(D);else I=await Ce(()=>xn(D,c,d,g),null,()=>{throw new ee(`Failed to resolve layout path: ${D}`,c,void 0,void 0,`Layout referenced from ${c}`)});if(!I){let oe=(G)=>{if(!G)return[];try{let ye=se.isAbsolute(G)?G:se.resolve(process.cwd(),G);return Kn.readdirSync(ye).filter((xe)=>xe.endsWith(".stx")).map((xe)=>xe.replace(/\.stx$/,""))}catch{return[]}},te=[...oe(d.layoutsDir),...oe(d.fallbackLayoutsDir)].filter((G,ye,xe)=>xe.indexOf(G)===ye).sort(),he=[d.layoutsDir,d.fallbackLayoutsDir].filter((G)=>typeof G==="string"&&G.length>0),de=he.length>0?` Searched: ${he.join(", ")} (set \`layoutsDir\` to look elsewhere).`:"",re=`Layout not found: ${D} (referenced from ${c})`+(te.length>0?`. Available layouts: ${te.join(", ")}`:d.layoutsDir?`. No .stx layouts found in ${d.layoutsDir}`:"")+de;if(z.log(Error(re),{layoutPath:D,filePath:c,available:te},"error"),console.error(`[stx] ${re}`),d.debug)throw new ee(re,c);return h}let L=await Ce(()=>Bun.file(I).text(),"",()=>{throw new ee(`Failed to read layout file: ${I}`,c,void 0,void 0,"Layout content could not be loaded")});L=ur(L,I),L=L.replace(/\{\{--[\s\S]*?--\}\}/g,"");let H=Array.isArray(e.__layoutChain)?e.__layoutChain:[];if(H.includes(I)){let oe=[...H.slice(H.indexOf(I)),I];throw new ee(oe.length===2?`Circular layout: ${I} extends itself`:`Circular layout: ${oe.join(" -> ")}`,c,void 0,void 0,"Remove the @extends or @layout line that points back at a layout already in use")}let V=L.match(/@(?:layout|extends)\(\s*['"]([^'"]+)['"]\s*\)/);if(V){if(d.debug)console.log(`Found nested layout: ${V[1]} in ${I}`);let oe={},te=L.replace(/@section\(\s*['"]([^'"]+)['"]\s*\)([\s\S]*?)(?:@show|@endsection)/g,(re,G,ye)=>(oe[G]=ye.trim(),""));for(let[re,G]of Object.entries(oe))if(R[re]&&R[re].includes(Te)){let ye=R[re].indexOf(Te);R[re]=R[re].slice(0,ye)+G+R[re].slice(ye+Te.length)}else if(!R[re])R[re]=G;let he={...e,__sections:R,__layoutChain:[...H,I]},de=`@layout('${V[1]}')${te}`;return await i(de,he,I,d,g)}let ae=L.replace(/\{\{--[\s\S]*?--\}\}/g,""),X=ds(ae,A),ce={};return X=X.replace(/@section\(\s*['"]([^'"]+)['"]\s*\)([\s\S]*?)(?:@show|@endsection)/g,(oe,te,he)=>(ce[te]=he.trim(),`@slot('${te}')`)),X=X.replace(/@(?:yield|slot)\(\s*['"]([^'"]+)['"]\s*(?:,\s*['"]([^'"]+)['"]\s*)?\)/g,(oe,te,he)=>{if(R[te]){let de=R[te];if(de.includes(Te)){let re=ce[te]||"",G=de.indexOf(Te);de=de.slice(0,G)+re+de.slice(G+Te.length)}return de}return he||""}),X=ns(X,R),X=X.replace(/\{\{\s*slot\s*\}\}/g,()=>R.content||""),X=ps(X,A),e.__originalFilePath=c,h=await xr(X,e,I,d,g),h=`<!-- stx-layout: ${D} -->
|
|
1313
|
-
${h}`,v(h)}catch(I){if(I instanceof K)throw I;throw new ee(`Error processing layout ${D}: ${I instanceof Error?I.message:String(I)}`,c)}return v(await xr(h,e,c,d,g))}function ns(n,e){return n.replace(/@(?:yield|slot)\(\s*['"]([^'"]+)['"]\s*(?:,\s*['"]([^'"]+)['"]\s*)?\)/g,(c,a,g)=>{let r=e[a];if(r!==void 0){if(!new RegExp(`@(?:yield|slot)\\(\\s*['"]${a.replace(/[.*+?^${}()|[\]\\]/g,"\\$&")}['"]`).test(r))return r}return g||""})}function ss(n,e){if(n.__stx_sfc_mode=!0,n.__stx_options=e,e.buildMode)n.__stx_buildMode=e.buildMode;let c=e.envPrefix||"STX_PUBLIC_",a={};for(let[g,r]of Object.entries(process.env))if(g.startsWith(c)&&r!==void 0)a[g]=r;n.$env=a}async function is(n,e){await Ce(()=>Zt(n,e),void 0,(c)=>{z.log(c,{filePath:n,phase:"view-composer"},"warning"),console.warn(`[stx] view composer failed for ${n}: ${c.message}`)})}var ct="data-stx-source";function yr(n,e){if(!n)return n;let c=/^<script\b([^>]*)>/i.exec(n);if(!c||!/\bserver\b/.test(c[1])||c[1].includes(ct))return n;return`<script ${ct}="${encodeURIComponent(e)}"${n.slice(7)}`}function os(n){let e=new RegExp(`${ct}="([^"]*)"`).exec(n);return e?decodeURIComponent(e[1]):void 0}function wr(n){return n.replace(/&/g,"&").replace(/</g,"<").replace(/>/g,">").replace(/"/g,""")}function vr(n,e,c){return`<div data-stx-server-script-error role="alert" style="padding:12px 14px;border:1px solid #f0b4b4;border-left-width:4px;background:#fff5f5;color:#7a1f1f;font:13px/1.5 ui-monospace,SFMono-Regular,Menlo,monospace"><strong style="display:block;margin-bottom:4px">stx: a <script server> ${e==="module-resolution"?"imports a module that does not resolve":e==="syntax"?"does not parse":"names something that does not exist"}, so this component rendered nothing.</strong><span style="display:block;opacity:.85">${wr(n)}</span><span style="display:block;margin-top:4px">${wr(c)}</span></div>`}async function as(n,e,c,a){let{scanScriptTags:g}=await o("stx/signal-processing",()=>import("./chunk-
|
|
1314
|
-
`;if(r=X(r,e),r=ce(r,e,c),r=Gt(r),r=Wo(r,e),r=Tt(r),r=Wt(r),r=await us(r,e,c,d,g),r=await ms(r,e,c,d,g),await _(),r=r.replace(/@push\s*\(\s*['"][^'"]+['"]\s*\)[\s\S]*?@endpush/g,""),r=vi(r),r=ie(r,e,c),r=hs(r),await _(),e.__stxProcessingDepth===1)r=
|
|
1313
|
+
${h}`,v(h)}catch(I){if(I instanceof K)throw I;throw new ee(`Error processing layout ${D}: ${I instanceof Error?I.message:String(I)}`,c)}return v(await xr(h,e,c,d,g))}function ns(n,e){return n.replace(/@(?:yield|slot)\(\s*['"]([^'"]+)['"]\s*(?:,\s*['"]([^'"]+)['"]\s*)?\)/g,(c,a,g)=>{let r=e[a];if(r!==void 0){if(!new RegExp(`@(?:yield|slot)\\(\\s*['"]${a.replace(/[.*+?^${}()|[\]\\]/g,"\\$&")}['"]`).test(r))return r}return g||""})}function ss(n,e){if(n.__stx_sfc_mode=!0,n.__stx_options=e,e.buildMode)n.__stx_buildMode=e.buildMode;let c=e.envPrefix||"STX_PUBLIC_",a={};for(let[g,r]of Object.entries(process.env))if(g.startsWith(c)&&r!==void 0)a[g]=r;n.$env=a}async function is(n,e){await Ce(()=>Zt(n,e),void 0,(c)=>{z.log(c,{filePath:n,phase:"view-composer"},"warning"),console.warn(`[stx] view composer failed for ${n}: ${c.message}`)})}var ct="data-stx-source";function yr(n,e){if(!n)return n;let c=/^<script\b([^>]*)>/i.exec(n);if(!c||!/\bserver\b/.test(c[1])||c[1].includes(ct))return n;return`<script ${ct}="${encodeURIComponent(e)}"${n.slice(7)}`}function os(n){let e=new RegExp(`${ct}="([^"]*)"`).exec(n);return e?decodeURIComponent(e[1]):void 0}function wr(n){return n.replace(/&/g,"&").replace(/</g,"<").replace(/>/g,">").replace(/"/g,""")}function vr(n,e,c){return`<div data-stx-server-script-error role="alert" style="padding:12px 14px;border:1px solid #f0b4b4;border-left-width:4px;background:#fff5f5;color:#7a1f1f;font:13px/1.5 ui-monospace,SFMono-Regular,Menlo,monospace"><strong style="display:block;margin-bottom:4px">stx: a <script server> ${e==="module-resolution"?"imports a module that does not resolve":e==="syntax"?"does not parse":"names something that does not exist"}, so this component rendered nothing.</strong><span style="display:block;opacity:.85">${wr(n)}</span><span style="display:block;margin-top:4px">${wr(c)}</span></div>`}async function as(n,e,c,a){let{scanScriptTags:g}=await o("stx/signal-processing",()=>import("./chunk-pybm7c9p.js")),r=[],d=!T()&&!$n();for(let h of g(n)){let x=h.attrs;if(!/\bserver\b/.test(x))continue;let w=h.start+h.fullMatch.indexOf(">")+1,v=Sr(n,w);if(v===-1)continue;let k=n.slice(w,v);if(!k.trim())continue;let S=os(x)??c,M={index:h.start,length:v+9-h.start};try{let{extractVariables:A}=await o("stx/variable-extractor",()=>import("./chunk-2wba5ypm.js"));await A(k,e,S,{preserveExisting:!0,onFailure:(R)=>{if(R.kind==="unknown")return;if(a?.onServerScriptError?.({sourcePath:S,kind:R.kind,message:R.message}),!d)return;r.push({...M,markup:vr(S,R.kind,R.message)})}})}catch(A){let R=A instanceof Error?A:Error(String(A));if(z.log(R,{filePath:S,phase:"server-script-extraction"},"warning"),console.warn(`[stx] server <script> extraction failed in ${S}: ${R.message}`),d)r.push({...M,markup:vr(S,"unknown",R.message)})}}if(r.length===0)return n;let y=n;for(let h of r.sort((x,w)=>w.index-x.index))y=y.slice(0,h.index)+h.markup+y.slice(h.index+h.length);return y}async function cs(n,e,c){try{let{interpolateScriptsInTemplate:a}=await o("stx/expressions",()=>import("./chunk-zrm2x65c.js"));return a(n,e,{skipServer:!0})}catch(a){let g=a instanceof Error?a:Error(String(a));return z.log(g,{filePath:c,phase:"script-expression-interpolation"},"warning"),console.warn(`[stx] script expression interpolation failed in ${c}: ${g.message}`),n}}async function xr(n,e,c,a,g){let r=n;await _();let d=a;if(r=await as(r,e,c,a),r=await Ht(r,e,c),r=await Ut(r,e,c),r=await cs(r,e,c),await _(),r=await At(r,e,c,d),_e(r))r=Xo(r,e),r=vs(r,e),r=ws(r,e);r=Jo(r),await _();let{processStreamDirectives:y}=await o("stx/streaming",()=>import("./chunk-ck5nzbbv.js"));r=y(r,e),r=await Uo(r,e,c,d,!0),await _(),r=await rr(r,e,c,d,g),r=await ms(r,e,c,d,g),await _(),r=Sc(r,e,c,d);let{processDeferDirectives:h}=await o("stx/defer",()=>import("./chunk-6g7tkmty.js"));r=h(r,e,c);let{processTeleportDirectives:x}=await o("stx/teleport",()=>import("./chunk-c9y1g61m.js"));r=x(r,e,c);let{processTransitionDirectives:w,processTransitionAttributes:v}=await o("stx/transitions",()=>import("./chunk-y86mpnrg.js"));r=w(r,e,c),r=v(r);let{processErrorBoundaryDirectives:k,stripRenderFailedMarkers:S}=await o("stx/error-boundaries",()=>import("./chunk-h85hrwkq.js"));r=k(r,e,c),r=S(r);let{processSuspenseDirectives:M}=await o("stx/suspense",()=>import("./chunk-9jr30fns.js"));r=M(r,e,c);let{processAsyncDirectives:A}=await o("stx/async-components",()=>import("./chunk-fcbpzdyz.js"));r=A(r,e,c);let{processKeepAliveDirectives:R}=await o("stx/keep-alive",()=>import("./chunk-41wwqw0q.js"));r=R(r,e,c);let{processVirtualListDirectives:D,processVirtualGridDirectives:j,processInfiniteListDirectives:N}=await o("stx/virtual-scrolling",()=>import("./chunk-asr5v51s.js"));r=D(r,e,c),r=j(r,e,c),r=N(r,e,c),await _();let{processPartialHydrationDirectives:F,processStaticDirectives:I}=await o("stx/partial-hydration",()=>import("./chunk-fahqq7c4.js"));r=F(r,e,c),r=I(r);let{processComputedDirectives:L,processWatchDirectives:H}=await o("stx/computed",()=>import("./chunk-1xdzcy9d.js"));r=L(r,e,c),r=H(r,e,c);let{processFormValidationDirectives:V}=await o("stx/forms-validation",()=>import("./chunk-kepxsjfx.js"));r=V(r,e,c);let{processHeadDirective:ae,processTitleDirective:X,processMetaDirective:ce,resetHead:oe}=await o("stx/head",()=>import("./chunk-zm0g7ntw.js"));if(!e.__stx_head_preset&&!e.__stx_runtime_head)oe();let te=ae(r);if(r=te.content,te.headContent)e.__stx_head_raw=`${e.__stx_head_raw||""}${te.headContent}
|
|
1314
|
+
`;if(r=X(r,e),r=ce(r,e,c),r=Gt(r),r=Wo(r,e),r=Tt(r),r=Wt(r),r=await us(r,e,c,d,g),r=await ms(r,e,c,d,g),await _(),r=r.replace(/@push\s*\(\s*['"][^'"]+['"]\s*\)[\s\S]*?@endpush/g,""),r=vi(r),r=ie(r,e,c),r=hs(r),await _(),e.__stxProcessingDepth===1)r=tl(r,e);if(r=Xc(r,e,{filePath:c,buildMode:d.buildMode}),r=qo(r,e),r=Ko(r,e),r=ze(r,e),r=Pt(r,e),r=jt(r,e),r=await wt(r,e,c,d),r=await _c(r,e,c),r=await Ec(r,e,c,d),await _(),r=Tc(r,e,c,d),r=ri(r,e,c,d),r=si(r,e,c),r=oi(r,e,c,d),r=_t(r,e,c,d),r=Ws(r,e),r=qs(r),r=Yc(r),!d.skipEventDirectives)r=Bc(r,e,c);if(r=Jc(r,e,c,a.skipSignalsRuntime===!0&&Number(e.__stxProcessingDepth)>0),await _(),d.debug){let U=/\bx-data\s*=/.test(r),q=bs(n);if(U&&q)console.warn(`[stx] ${c}: Template mixes Alpine-style (x-data) and signals (state/derived/effect) reactivity.
|
|
1315
1315
|
Both work on the same page, but they manage separate scopes.
|
|
1316
|
-
Prefer signals (state/derived/effect) for new components.`)}r=
|
|
1316
|
+
Prefer signals (state/derived/effect) for new components.`)}r=yc(r,e),r=await Ti(r,e,c),await _(),r=Zc(r),r=Qc(r),r=ht(r);let{processXElementDirectives:he}=await o("stx/x-element",()=>import("./chunk-zhxdpzga.js"));r=he(r);let de=e.__originalFilePath||c,re=je(e);if(r=await Yo(r,d,de,re),await _(),r=It(r,e),r=await Kt(r,e,c,d),await _(),d.media?.image?.autoSiblings){let U=d.publicDir||"public",{rewriteImagesWithSiblings:q}=await o("stx/image-optimization/auto-sibling",()=>import("./chunk-k9fsd6t3.js"));r=await q(r,{publicDir:U})}if(d.seo?.enabled)r=ii(r,e,d);let G=(U,q,Z=!0)=>{if(!q)return U;let me=q.match(/<title\b[^>]*>[\s\S]*?<\/title>/i),ne=/<head\b[^>]*>[\s\S]*?(?:<\/head\s*>|<body\b|$)/i.exec(U),pe=ne?/<title\b[^>]*>[\s\S]*?<\/title>/i.exec(ne[0]):null;if(me&&ne&&pe){if(Z){let Ae=ne.index+pe.index;U=U.slice(0,Ae)+me[0]+U.slice(Ae+pe[0].length)}if(q=q.replace(me[0],"").trim(),!q)return U}if(/<\/head>/i.test(U))return U.replace(/<\/head>/i,`${q}
|
|
1317
1317
|
</head>`);if(/<head\b[^>]*>/i.test(U))return U.replace(/(<head\b[^>]*>)/i,`$1
|
|
1318
1318
|
${q}`);if(/<html\b[^>]*>/i.test(U))return U.replace(/(<html\b[^>]*>)/i,`$1
|
|
1319
1319
|
<head>
|
|
1320
1320
|
${q}
|
|
1321
|
-
</head>`);return U},{renderHead:ye,getHead:xe}=await o("stx/head",()=>import("./chunk-
|
|
1321
|
+
</head>`);return U},{renderHead:ye,getHead:xe}=await o("stx/head",()=>import("./chunk-zm0g7ntw.js")),Le=e.__stx_runtime_head??xe();if(Le.title||Le.meta?.length||Le.link?.length){let U=ye(Le);if(U)r=G(r,U)}if(te.headContent)r=G(r,te.headContent,!Le.title);if(d.csp?.enabled&&d.csp.addMetaTag)r=$t(r,d.csp,e);if(d.analytics?.enabled)r=yt(r,d);if(d.heatmap?.enabled)r=kc(r,d);if(d.pwa?.enabled&&d.pwa.autoInject!==!1){let{injectPwaTags:U}=await o("stx/pwa/inject",()=>import("./chunk-5mg443dw.js"));r=U(r,d)}let _r=/<script\b(?![^>]*\bserver\b)[^>]*>[\s\S]*?<\/script>/i.test(r),Cr=/\bSTX\.\w+/.test(r),Tr=/window\.STX\s*=/.test(r);if(_r&&Cr&&!Tr){let q=`<script data-stx-scoped data-stx-run="once">
|
|
1322
1322
|
${ft()}
|
|
1323
1323
|
</script>`;if(r.includes("</head>")){let Z=r.indexOf("</head>"),ne=r.slice(0,Z).indexOf("<script");if(ne!==-1){let pe=r.slice(0,ne),Ae=r.slice(ne);r=pe+q+`
|
|
1324
1324
|
`+Ae}else r=r.replace("</head>",`${q}
|
|
1325
1325
|
</head>`)}else if(r.includes("<body"))r=r.replace(/<body([^>]*)>/,`<body$1>
|
|
1326
1326
|
${q}`);else r=q+`
|
|
1327
|
-
`+r}{let{scanScriptTags:U}=await o("stx/signal-processing",()=>import("./chunk-
|
|
1328
|
-
`+r.slice(Z)}e.__stx_event_bindings=[]}}if(!d.skipSignalsRuntime&&!ve(r)&&
|
|
1329
|
-
export{vt,Pe,
|
|
1327
|
+
`+r}{let{scanScriptTags:U}=await o("stx/signal-processing",()=>import("./chunk-pybm7c9p.js")),q=[];for(let Z of U(r)){if(!/\bserver\b/i.test(Z.attrs))continue;let me=Z.start+Z.fullMatch.indexOf(">")+1,ne=Sr(r,me);if(ne===-1)continue;let pe=ne+9;while(pe<r.length&&/\s/.test(r[pe]))pe++;q.push({start:Z.start,end:pe})}if(q.length>0){let Z=Array(q.length+1),me=0;for(let ne=0;ne<q.length;ne++){let{start:pe,end:Ae}=q[ne];Z[ne]=r.slice(me,pe),me=Ae}Z[q.length]=r.slice(me),r=Z.join("")}}let ut=Vs(r,c);if(ut.hasScoped)r=ut.html;let Ar=e.__stx_event_bindings||[],Ge=!1,dt=[],Rr=/\s:[a-z][\w.-]*\s*=/.test(r),{scanScriptTags:Mr}=await o("stx/signal-processing",()=>import("./chunk-pybm7c9p.js"));for(let U of Mr(r,{skipAttrs:/\bserver\b|\bsrc\s*=|\bdata-stx-scoped\b|\bdata-stx-router\b|\btype\s*=\s*["'](?!(?:text\/javascript|application\/javascript|module)["'])[^"']*["']/}))dt.push({match:U.fullMatch,attrs:U.attrs,content:U.body});for(let{match:U,attrs:q,content:Z}of dt){Ge=!0;let me=Z;Me(Z,c,a.strict,e.__originalFilePath);let ne=await Be(Z,{eventBindings:Ar,attrs:q,hasColonDirectives:Rr,templateContent:n,filePath:c,projectRoot:process.cwd(),production:Di(a.buildMode,a.minifyClient),serverData:re});r=r.replace(U,()=>ne)}if(Ge)e.__stx_event_bindings=[];if(!Ge&&e.__stxProcessingDepth===1){let U=e.__stx_event_bindings||[];if(U.length>0){let q=fi(U);if(q){let Z=r.lastIndexOf("</body>");r=Z===-1?r+q:r.slice(0,Z)+q+`
|
|
1328
|
+
`+r.slice(Z)}e.__stx_event_bindings=[]}}if(!d.skipSignalsRuntime&&!ve(r)&&wc(r))r=await pr(r,d);if(r=vc(r),d.csp?.enabled&&d.csp.useNonce&&typeof e.cspNonce==="string")r=Et(r,e.cspNonce);return r}
|
|
1329
|
+
export{vt,Pe,fc,ls,jo,Bo,or,i};
|
|
@@ -825,5 +825,5 @@ self.addEventListener('message', (event) => {
|
|
|
825
825
|
event.waitUntil(registerFormSync(event.data.payload));
|
|
826
826
|
}
|
|
827
827
|
});
|
|
828
|
-
`}function Wt(e){return e.pwa?.serviceWorker?.fileName||"sw.js"}function
|
|
829
|
-
export{so,Wt,
|
|
828
|
+
`}function Wt(e){return e.pwa?.serviceWorker?.fileName||"sw.js"}function Ol(e){return e.pwa?.enabled===!0&&e.pwa?.serviceWorker?.useWorkbox===!0}function Fg(e,a){if(!e.pwa?.enabled)return"";if(Ol(e)){let{generateWorkboxServiceWorker:t}=import.meta.require("./chunk-cxpq2zna.js");return t(e,a)}return so(e,a)}
|
|
829
|
+
export{so,Wt,Ol,Fg};
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
// @bun
|
|
2
|
+
import{Pf,If,be,Of,lc,sn,on,Lh,uc,an,rr,Nf,Mf,Df,cs,Lf,jf,dc,cn,Bf,ln,pc,jh}from"./chunk-74g64pzt.js";import"./chunk-15rkvc0t.js";import"./chunk-mzes9ds7.js";import"./chunk-6nb49h13.js";import"./chunk-68w65mhs.js";import"./chunk-9pyvc0dc.js";import"./chunk-4rrxrxp6.js";import"./chunk-dba4bwkd.js";import"./chunk-3gfd9t8a.js";import"./chunk-261t62q4.js";import"./chunk-naj146zq.js";import"./chunk-5rxks14t.js";import"./chunk-830ej8d2.js";import"./chunk-xppm4cs4.js";import"./chunk-1jwcp2k0.js";export{rr as MODULE_SPECIFIER_PREFIX,dc as assertBundleBuildCanSettle,Pf as bundleCacheDir,If as bundleCacheEntryLimit,jh as bundleClientEntriesSplit,ln as bundleClientScript,on as clearBundleFailures,be as clientBundleDependencies,sn as getBundleFailures,an as hasUserImports,jf as isWithinBundlerCallback,cn as moduleSubstitutionKey,Mf as normalizeRegistrySpecifiers,Bf as queueClientBundleBuild,lc as recordBundleFailure,Nf as registryIdForPath,uc as resolveBundlerFallback,Df as rewriteRegistryImports,Lh as setBundlerFallbackMode,Of as shouldLogBundlerDiagnostics,pc as tempBuildName,cs as withModuleSubstitutes,Lf as withinBundlerCallback};
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
// @bun
|
|
2
|
-
import"./chunk-
|
|
2
|
+
import"./chunk-1jwcp2k0.js";import"./chunk-xppm4cs4.js";import"./chunk-830ej8d2.js";import{w,S,C,Z}from"./chunk-261t62q4.js";import"./chunk-5rxks14t.js";import"./chunk-naj146zq.js";import{lr}from"./chunk-14cvwsy1.js";import{existsSync as R}from"fs";import l 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","useAmbientSound","useAnimationFrame","useAsyncData","useAttributeObserver","useAutoLogout","useAutoWakeLock","useBattery","useBreakpoint","useBreathPacer","useBroadcastChannel","useChannel","useChildListObserver","useClipboard","useColorHistory","useCompletion","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","useVirtualList","useVisibility","useWakeLock","useWindowSize"],F=new Set(b);var u=new Map,h=w(64),x=new Set,k=0,P=new Set(b);function z(){u.clear(),h.clear()}function I(s){let o=new Map;for(let t of s){let i=l.basename(t);if(i.endsWith(".d.ts"))continue;let r=i.replace(/\.[jt]s$/,"");if(r==="index")continue;if(r===i)continue;let a=o.get(r);if(a&&!a.endsWith(".js"))continue;o.set(r,t)}return[...o.values()].sort()}function M(s,o){let t=o.replace(/[$()*+.?[\\\]^{|}-]/g,"\\$&");return new RegExp(`(?:^|[^\\w$.])(?:const|let|var|function|class)\\s+${t}\\b`).test(s)}function L(s){if(!s)return[];let o=S(s,k),t=h.get(o);if(t)return t.slice();let i=s.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,""),r=[];for(let a of P){if(x.has(a))continue;let p=a.replace(/[$()*+.?[\\\]^{|}-]/g,"\\$&");if(new RegExp(`(^|[^\\w$.])${p}\\s*\\(`).test(i))r.push(a)}return r.sort(),h.set(o,r),r.slice()}function _(){let s=l.join(import.meta.dir,"composables"),o=import.meta.url.endsWith(".ts")?"ts":"js";if(R(l.join(s,`index.${o}`)))return s;let t=lr("@stacksjs/stx/composables");return t?l.dirname(t):void 0}async function V(s,o){let t=L(s);if(t.length===0)return null;let i=o??_();if(!i)return null;let r=`${i}\x00${t.join(",")}`,a=u.get(r);if(a!==void 0)return a||null;let p=Z({loader:"ts",target:"browser",define:C()}),O=new Set(t),m=[],d=new Set,f=[];try{let n=new Bun.Glob("*.{ts,js}");for await(let e of n.scan({cwd:i,absolute:!0}))f.push(e)}catch{return u.set(r,""),null}f=I(f);for(let n of f){let e;try{e=await Bun.file(n).text()}catch{continue}let g=[];try{g=p.scan(e).exports.filter((c)=>c!=="default")}catch{continue}if(!g.some((c)=>O.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(`// ${l.basename(n).replace(/\.[jt]s$/,"")}
|
|
3
3
|
${p.transformSync(e).trim()}`);for(let c of g)d.add(c)}catch(c){console.warn(`[stx] framework composable ${l.basename(n)} could not be bundled:`,c)}}let y=t.filter((n)=>!d.has(n)&&!M(s,n));if(y.length>0)console.warn(`[stx] could not bundle ${y.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 u.set(r,""),null;let E=[...d].map((n)=>` try { if (!(${JSON.stringify(n)} in __s)) { __s[${JSON.stringify(n)}] = ${n}; if (!(${JSON.stringify(n)} in window)) window[${JSON.stringify(n)}] = ${n}; } } catch (e) {}`).join(`
|
|
4
4
|
`),v=`<script data-stx-scoped data-stx-run="always" data-stx-framework-composables>
|
|
5
5
|
;(function(){
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
// @bun
|
|
2
|
-
import{Cn,M}from"./chunk-5rxks14t.js";import m from"fs";import e from"path";async function _n(r,o,i){if(r.__stx_runtime_config)return;let n=Cn();if(n||i){r.__stx_runtime_config=n??M(i);return}let t=e.dirname(e.resolve(o));while(!0){if(["stx.config.ts","stx.config.js",".config/stx.config.ts",".config/stx.config.js"].some((f)=>m.existsSync(e.join(t,f)))){let{loadStxConfig:f}=await import("./chunk-
|
|
2
|
+
import{Cn,M}from"./chunk-5rxks14t.js";import m from"fs";import e from"path";async function _n(r,o,i){if(r.__stx_runtime_config)return;let n=Cn();if(n||i){r.__stx_runtime_config=n??M(i);return}let t=e.dirname(e.resolve(o));while(!0){if(["stx.config.ts","stx.config.js",".config/stx.config.ts",".config/stx.config.js"].some((f)=>m.existsSync(e.join(t,f)))){let{loadStxConfig:f}=await import("./chunk-h0dsxxz4.js"),c=await f(t);if(c.runtimeConfig)r.__stx_runtime_config=M(c.runtimeConfig);return}let s=e.dirname(t);if(s===t)return;t=s}}async function $i(r,o){function i(n){if(n===null)return"null";if(Array.isArray(n))return`Array<${n.length?[...new Set(n.map(i))].join(" | "):"unknown"}>`;if(typeof n==="object")return`{ ${Object.entries(n).map(([t,s])=>`readonly ${JSON.stringify(t)}: ${i(s)}`).join("; ")} }`;return typeof n}await Bun.write(e.join(r,".stx/runtime-config.d.ts"),`import '@stacksjs/stx/runtime-config'
|
|
3
3
|
declare module '@stacksjs/stx/runtime-config' { interface PublicRuntimeConfig ${i(o.public??{})} }
|
|
4
4
|
`),await Bun.write(e.join(r,".stx/runtime-config-server.d.ts"),`import '@stacksjs/stx/runtime-config-server'
|
|
5
5
|
declare module '@stacksjs/stx/runtime-config-server' { interface PrivateRuntimeConfig ${i(o.private??{})} }
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
// @bun
|
|
2
|
+
import{ym,bm,wm,vm,Jl,xm,Sm,km,_m,Cm,Em,Tm}from"./chunk-5xdkmn39.js";export{Em as Broadcast,Tm as BroadcastServer,Jl as broadcast,_m as broadcastPresence,km as broadcastPrivate,Cm as channel,ym as getBroadcastServer,vm as loadChannels,bm as startBroadcasting,wm as stopBroadcasting,xm as toUser,Sm as toUsers};
|
|
@@ -1,12 +1,12 @@
|
|
|
1
1
|
// @bun
|
|
2
|
-
function o(t,i){let n=t[i],e=i+1;while(e<t.length){if(t[e]==="\\"){e+=2;continue}if(t[e]===n)return e+1;e++}return t.length}function b(t,i){let n=i+1;while(n<t.length){if(t[n]==="\\"){n+=2;continue}if(t[n]==="`")return n+1;if(t[n]==="$"&&t[n+1]==="{"){if(n=
|
|
2
|
+
function o(t,i){let n=t[i],e=i+1;while(e<t.length){if(t[e]==="\\"){e+=2;continue}if(t[e]===n)return e+1;e++}return t.length}function b(t,i){let n=i+1;while(n<t.length){if(t[n]==="\\"){n+=2;continue}if(t[n]==="`")return n+1;if(t[n]==="$"&&t[n+1]==="{"){if(n=pl(t,n+2),n<t.length)n++;continue}n++}return t.length}function pl(t,i){let n=1,e=i,s="{",f="";while(e<t.length){let l=t[e];if(l==="\\"){e+=2;continue}if(l==='"'||l==="'"){e=o(t,e),s=h,f="";continue}if(l==="`"){e=b(t,e),s=h,f="";continue}if(l==="/"&&t[e+1]==="/"){while(e<t.length&&t[e]!==`
|
|
3
3
|
`)e++;continue}if(l==="/"&&t[e+1]==="*"){e+=2;while(e<t.length&&t.slice(e,e+2)!=="*/")e++;e+=2;continue}if(l==="/"&&a(s,f)){let u=w(t,e);if(u!==-1){e=u,s=h,f="";continue}}if(l==="{")n++;else if(l==="}"){if(n--,n===0)return e}if(/[\w$]/.test(l))f=/[\w$]/.test(s)?f+l:l,s=l;else if(!/\s/.test(l))s=l,f="";e++}return t.length}var m=new Set(["return","typeof","instanceof","in","of","new","delete","void","throw","case","do","else","yield","await"]);function a(t,i){if(i)return m.has(i);return!(t===")"||t==="]"||t===h)}var h="\x00";function w(t,i){let n=i+1,e=!1;while(n<t.length){let s=t[n];if(s===`
|
|
4
4
|
`)return-1;if(s==="\\"){n+=2;continue}if(s==="[")e=!0;else if(s==="]")e=!1;else if(s==="/"&&!e){n++;while(n<t.length&&/[a-z]/i.test(t[n]))n++;return n}n++}return-1}function r(t){let i="",n=0,e="",s="";while(n<t.length){let f=t.slice(n,n+2);if(f==="//"){while(n<t.length&&t[n]!==`
|
|
5
5
|
`)i+=" ",n++;continue}if(f==="/*"){while(n<t.length&&t.slice(n,n+2)!=="*/")i+=t[n]===`
|
|
6
6
|
`?`
|
|
7
7
|
`:" ",n++;i+=" ",n+=2;continue}let l=t[n];if(l==='"'||l==="'"){let u=l;i+=" ",n++;while(n<t.length&&t[n]!==u){if(t[n]==="\\"){i+=" ",n+=2;continue}i+=t[n]===`
|
|
8
8
|
`?`
|
|
9
|
-
`:" ",n++}i+=" ",n++,e=h,s="";continue}if(l==="/"&&a(e,s)){let u=w(t,n);if(u!==-1){i+=`/${" ".repeat(u-n-2)}/`,n=u,e=h,s="";continue}}if(l==="`"){i+=" ",n++;while(n<t.length&&t[n]!=="`"){if(t[n]==="\\"){i+=" ",n+=2;continue}if(t[n]==="$"&&t[n+1]==="{"){let u=n+2,g=
|
|
9
|
+
`:" ",n++}i+=" ",n++,e=h,s="";continue}if(l==="/"&&a(e,s)){let u=w(t,n);if(u!==-1){i+=`/${" ".repeat(u-n-2)}/`,n=u,e=h,s="";continue}}if(l==="`"){i+=" ",n++;while(n<t.length&&t[n]!=="`"){if(t[n]==="\\"){i+=" ",n+=2;continue}if(t[n]==="$"&&t[n+1]==="{"){let u=n+2,g=pl(t,u);if(i+=" ",i+=r(t.slice(u,g)),g<t.length)i+=" ";n=g+1;continue}i+=t[n]===`
|
|
10
10
|
`?`
|
|
11
11
|
`:" ",n++}i+=" ",n++,e=h,s="";continue}if(i+=l,n++,/[\w$]/.test(l))s=/[\w$]/.test(e)?s+l:l,e=l;else if(!/\s/.test(l))e=l,s=""}return i}function he(t){let i=new Uint16Array(t.length),n=0,e=!0;for(let s=0;s<t.length;s++){let f=t[s];if(f===")"||f==="]"||f==="}")if(n===0)e=!1;else n--;if(i[s]=n,f==="("||f==="["||f==="{")n++}return{depths:i,balanced:e&&n===0}}
|
|
12
|
-
export{
|
|
12
|
+
export{pl,r,he};
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
// @bun
|
|
2
|
+
import{ai,ci,Ct,pe,hr,Ps,yr,Is,Os,ng,rg,sg,br,og,ig,ag,cg,Nc,Mc,Dc,li,Lc,lg,Et,Tt,$t,Rt,At,Pt,rt,ug}from"./chunk-3gfd9t8a.js";export{yr as Router,ag as abortNavigation,Ps as bracketPathToRegex,Et as clearMiddleware,Mc as createClientCookieManager,At as createMiddlewareContext,Rt as createRouteLocation,Nc as createServerCookieManager,Dc as createStorageManager,cg as defineMiddleware,rg as defineRoute,sg as defineRoutes,Is as findErrorPage,Os as formatRoutes,ci as generateRouteManifest,ai as generateRouteTypes,Lc as getMiddleware,Tt as getMiddlewareNames,rt as getRouterScript,ug as getRouterScriptDev,lg as hasMiddleware,Ct as isFileRequestPath,$t as loadMiddlewareFromDirectory,hr as matchRoute,ig as navigateTo,pe as patternToRegex,li as registerMiddleware,og as resetRoutes,br as route,Pt as runMiddleware,ng as setAppUrl};
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
// @bun
|
|
2
|
+
import{Xh,ys,Go,bs,ur,Xo,Jo,Xf,ws,vs,xs,Yo,bc,Jf,St}from"./chunk-b1tctqn5.js";import"./chunk-02css3vk.js";import"./chunk-h2cvfp9y.js";import"./chunk-6nb49h13.js";import"./chunk-68w65mhs.js";import"./chunk-9pyvc0dc.js";import"./chunk-4rrxrxp6.js";import"./chunk-dba4bwkd.js";import"./chunk-3gfd9t8a.js";import{V}from"./chunk-261t62q4.js";import"./chunk-naj146zq.js";import"./chunk-5rxks14t.js";import"./chunk-830ej8d2.js";import"./chunk-xppm4cs4.js";import"./chunk-1jwcp2k0.js";export{Xf as bindLoopInterpolations,Xh as clearScriptScanCache,ws as convertServerLoopAttributesToDirectives,Xo as convertSignalDirectivesToAttributes,vs as convertSignalLoopsToAttributes,ur as extractClientSignalNames,V as extractExports,bc as findMarkupIndexOutsideScripts,bs as hasSignalsSyntax,Go as parseLoopExpression,Jo as preEvalLiteralReactiveIfs,xs as processScriptSetup,Yo as processSignals,Jf as rewriteStxImportSpecifiers,ys as scanScriptTags,St as stripStxRuntimeImports};
|
|
@@ -45,12 +45,12 @@ var p=0;function f(){return`stx-teleport-${++p}`}function g(t){let e=t.split(","
|
|
|
45
45
|
});
|
|
46
46
|
})();
|
|
47
47
|
</script>
|
|
48
|
-
`}function
|
|
48
|
+
`}function oh(t,e,l){p=0;let o=/@teleport\s*\(([^)]+)\)\s*([\s\S]*?)@endteleport/g;return t.replace(o,(r,s,d)=>{let a=f(),{target:u,disabled:n}=g(s),c=d.trim();if(n)try{let i=!1;if(n==="true")i=!0;else if(n==="false")i=!1;else if(n in e)i=Boolean(e[n]);if(i)return`<div class="stx-teleport-inline" data-teleport-disabled>${c}</div>`}catch{}let m=h(a,u);return`
|
|
49
49
|
<div id="${a}" class="stx-teleport-source" style="display: none;">
|
|
50
50
|
<template>${c}</template>
|
|
51
51
|
</div>
|
|
52
52
|
${m}
|
|
53
|
-
`})}function
|
|
53
|
+
`})}function ih(){return`
|
|
54
54
|
<script>
|
|
55
55
|
(function() {
|
|
56
56
|
// Common teleport targets
|
|
@@ -68,4 +68,4 @@ var p=0;function f(){return`stx-teleport-${++p}`}function g(t){let e=t.split(","
|
|
|
68
68
|
})();
|
|
69
69
|
</script>
|
|
70
70
|
`}
|
|
71
|
-
export{
|
|
71
|
+
export{oh,ih};
|
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
// @bun
|
|
2
|
-
function Sa(e){return e}class a{plugins=new Map;sortedPlugins=[];initialized=!1;async register(e,t){if(this.plugins.has(e.name))throw Error(`Plugin "${e.name}" is already registered`);if(e.dependencies){for(let r of e.dependencies)if(!this.plugins.has(r))throw Error(`Plugin "${e.name}" depends on "${r}" which is not registered`)}if(this.plugins.set(e.name,e),e.onRegister)await e.onRegister(t);this.sortPlugins()}async unregister(e){let t=this.plugins.get(e);if(!t)return!1;for(let[r,i]of this.plugins)if(i.dependencies?.includes(e))throw Error(`Cannot unregister "${e}" because "${r}" depends on it`);if(t.onUnregister)await t.onUnregister();return this.plugins.delete(e),this.sortPlugins(),!0}get(e){return this.plugins.get(e)}has(e){return this.plugins.has(e)}getAll(){return[...this.sortedPlugins]}getAllDirectives(){let e=[];for(let t of this.sortedPlugins)if(t.registerDirectives)e.push(...t.registerDirectives());return e}getAllFilters(){let e={};for(let t of this.sortedPlugins)if(t.registerFilters)Object.assign(e,t.registerFilters());return e}async runBeforeProcess(e){return this.runHooks("beforeProcess",e)}async runAfterParse(e){return this.runHooks("afterParse",e)}async runBeforeDirective(e,t){return this.runDirectiveHooks("beforeDirective",e,t)}async runAfterDirective(e,t){return this.runDirectiveHooks("afterDirective",e,t)}async runBeforeRender(e){return this.runHooks("beforeRender",e)}async runAfterRender(e){return this.runHooks("afterRender",e)}async runOnError(e){for(let t of this.sortedPlugins)if(t.onError)try{let r=await t.onError(e);if(r){if(r.template!==void 0)e.template=r.template;if(r.context)e.context={...e.context,...r.context};if(r.metadata)e.metadata={...e.metadata,...r.metadata};if(r.skip)return e}}catch(r){console.error(`Error in plugin "${t.name}" onError hook:`,r)}return null}sortPlugins(){this.sortedPlugins=Array.from(this.plugins.values()).sort((e,t)=>(e.priority??100)-(t.priority??100))}async runHooks(e,t){let r={...t};for(let i of this.sortedPlugins){let s=i[e];if(s)try{let n=await s(r);if(n){if(n.template!==void 0)r.template=n.template;if(n.context)r.context={...r.context,...n.context};if(n.metadata)r.metadata={...r.metadata,...n.metadata};if(n.skip)break}}catch(n){console.error(`Error in plugin "${i.name}" ${e} hook:`,n)}}return r}async runDirectiveHooks(e,t,r){let i={...r};for(let s of this.sortedPlugins){let n=s[e];if(n)try{let o=await n(t,i);if(o){if(o.template!==void 0)i.template=o.template;if(o.context)i.context={...i.context,...o.context};if(o.metadata)i.metadata={...i.metadata,...o.metadata};if(o.skip)break}}catch(o){console.error(`Error in plugin "${s.name}" ${e} hook:`,o)}}return i}}var
|
|
2
|
+
function Sa(e){return e}class a{plugins=new Map;sortedPlugins=[];initialized=!1;async register(e,t){if(this.plugins.has(e.name))throw Error(`Plugin "${e.name}" is already registered`);if(e.dependencies){for(let r of e.dependencies)if(!this.plugins.has(r))throw Error(`Plugin "${e.name}" depends on "${r}" which is not registered`)}if(this.plugins.set(e.name,e),e.onRegister)await e.onRegister(t);this.sortPlugins()}async unregister(e){let t=this.plugins.get(e);if(!t)return!1;for(let[r,i]of this.plugins)if(i.dependencies?.includes(e))throw Error(`Cannot unregister "${e}" because "${r}" depends on it`);if(t.onUnregister)await t.onUnregister();return this.plugins.delete(e),this.sortPlugins(),!0}get(e){return this.plugins.get(e)}has(e){return this.plugins.has(e)}getAll(){return[...this.sortedPlugins]}getAllDirectives(){let e=[];for(let t of this.sortedPlugins)if(t.registerDirectives)e.push(...t.registerDirectives());return e}getAllFilters(){let e={};for(let t of this.sortedPlugins)if(t.registerFilters)Object.assign(e,t.registerFilters());return e}async runBeforeProcess(e){return this.runHooks("beforeProcess",e)}async runAfterParse(e){return this.runHooks("afterParse",e)}async runBeforeDirective(e,t){return this.runDirectiveHooks("beforeDirective",e,t)}async runAfterDirective(e,t){return this.runDirectiveHooks("afterDirective",e,t)}async runBeforeRender(e){return this.runHooks("beforeRender",e)}async runAfterRender(e){return this.runHooks("afterRender",e)}async runOnError(e){for(let t of this.sortedPlugins)if(t.onError)try{let r=await t.onError(e);if(r){if(r.template!==void 0)e.template=r.template;if(r.context)e.context={...e.context,...r.context};if(r.metadata)e.metadata={...e.metadata,...r.metadata};if(r.skip)return e}}catch(r){console.error(`Error in plugin "${t.name}" onError hook:`,r)}return null}sortPlugins(){this.sortedPlugins=Array.from(this.plugins.values()).sort((e,t)=>(e.priority??100)-(t.priority??100))}async runHooks(e,t){let r={...t};for(let i of this.sortedPlugins){let s=i[e];if(s)try{let n=await s(r);if(n){if(n.template!==void 0)r.template=n.template;if(n.context)r.context={...r.context,...n.context};if(n.metadata)r.metadata={...r.metadata,...n.metadata};if(n.skip)break}}catch(n){console.error(`Error in plugin "${i.name}" ${e} hook:`,n)}}return r}async runDirectiveHooks(e,t,r){let i={...r};for(let s of this.sortedPlugins){let n=s[e];if(n)try{let o=await n(t,i);if(o){if(o.template!==void 0)i.template=o.template;if(o.context)i.context={...i.context,...o.context};if(o.metadata)i.metadata={...i.metadata,...o.metadata};if(o.skip)break}}catch(o){console.error(`Error in plugin "${s.name}" ${e} hook:`,o)}}return i}}var $m=new a;var u=Sa({name:"stx-debug",version:"1.0.0",description:"Logs all plugin lifecycle events for debugging",priority:0,beforeProcess(e){console.log("[stx-debug] beforeProcess:",e.filePath)},afterParse(e){console.log("[stx-debug] afterParse:",e.template.length,"chars")},beforeDirective(e,t){console.log("[stx-debug] beforeDirective:",e)},afterDirective(e,t){console.log("[stx-debug] afterDirective:",e)},beforeRender(e){console.log("[stx-debug] beforeRender")},afterRender(e){console.log("[stx-debug] afterRender:",e.template.length,"chars")},onError(e){console.error("[stx-debug] onError:",e.error.message,"in phase:",e.phase)}}),l=Sa({name:"stx-timing",version:"1.0.0",description:"Measures template processing time",priority:1,beforeProcess(e){e.metadata.startTime=performance.now()},afterRender(e){let t=e.metadata.startTime;if(t){let r=performance.now()-t;console.log(`[stx-timing] Processing took ${r.toFixed(2)}ms`)}}});export{Sa,$m};
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
// @bun
|
|
2
|
+
import{hs,Kf,Uo,Gf}from"./chunk-aj6vqdf7.js";import"./chunk-v0wdgxga.js";import"./chunk-b1tctqn5.js";import"./chunk-02css3vk.js";import"./chunk-h2cvfp9y.js";import"./chunk-6nb49h13.js";import"./chunk-68w65mhs.js";import"./chunk-9pyvc0dc.js";import"./chunk-4rrxrxp6.js";import"./chunk-dba4bwkd.js";import"./chunk-3gfd9t8a.js";import{Mt}from"./chunk-261t62q4.js";import"./chunk-naj146zq.js";import"./chunk-5rxks14t.js";import"./chunk-830ej8d2.js";import"./chunk-xppm4cs4.js";import"./chunk-1jwcp2k0.js";export{Gf as declareBareLoopHead,Mt as parseLoopBinding,Kf as processLoops,Uo as processLoopsAsync,hs as reportDeferredLoopWarnings};
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
// @bun
|
|
2
|
+
import{Yf,Jh,Yh,Zh,Qh,Zf,Qf,ey,ty,Qo,ny,fr,gr,ks}from"./chunk-z99bf0q0.js";import{st}from"./chunk-9n8t7v78.js";import"./chunk-261t62q4.js";import"./chunk-naj146zq.js";import"./chunk-5rxks14t.js";import"./chunk-830ej8d2.js";import"./chunk-xppm4cs4.js";import"./chunk-1jwcp2k0.js";export{Qh as __setSignalsGeneratorsForTest,st as cacheEngineFingerprint,gr as cacheTemplate,fr as checkCache,ny as clearDevCaches,Qf as getCachedRouterScript,Zf as getCachedSignalsRuntime,ey as getServeClientAsset,Qo as getServeModuleBundle,ks as hashFilePath,Yh as invalidateFileCache,Zh as invalidateFileCacheByDir,Jh as readFileCached,ty as registerServeModuleBundle,Yf as templateCache};
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
// @bun
|
|
2
|
+
import{g,xi,nl,rl,xg,Sg,kg,_g,Cg,Ks,Eg,Fe,Z,ze,Tg,Rr,$g,il,al,_i,He,s,xn,cl,m,me,dy}from"./chunk-261t62q4.js";import"./chunk-naj146zq.js";import"./chunk-5rxks14t.js";import"./chunk-830ej8d2.js";import"./chunk-xppm4cs4.js";import"./chunk-1jwcp2k0.js";export{al as SIGNAL_COMPOSABLE_CALL,me as clearComponentCache,_i as componentClientSignalNames,xi as convertToCommonJS,m as createDetailedErrorMessage,Cg as extractDirectiveNames,nl as extractScriptFromTemplate,g as extractVariables,s as fileExists,dy as getComponentCacheStats,Sg as getPositionInfo,Z as getSharedTranspiler,cl as getSourceLineInfo,_g as hasDirectives,rl as hasVariables,$g as isHydrateTrigger,Eg as isJavaScriptScript,He as renderComponentWithSlot,xn as resolveTemplatePath,Tg as scopeOnRootElement,Ks as scopeSequenceKey,Fe as shouldTranspileTypeScript,il as slotContentHasExpressions,ze as transpileTypeScript,Rr as userComponentFileExists,kg as validateDirective,xg as validateTemplate};
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
// @bun
|
|
2
|
+
import{Fl,ua,zl,Hl,da,Vl,Ul,Wl,ql,pa,Kl,dm}from"./chunk-zs4s9fcq.js";import{xa,Yl}from"./chunk-15jymk6t.js";import{te,ne,re,jn,ye,Re,Yr,yt,Zt,Bn,Fn,zn,se,Hn,Vn,Zr}from"./chunk-fyfvqd2s.js";import{nu}from"./chunk-e8nzbz66.js";import"./chunk-yj9nyt93.js";export{ne as DEFAULT_FORMATS,re as DEFAULT_QUALITY,te as DEFAULT_WIDTHS,Zr as ImageProcessingError,Hl as clearImageCache,da as createImageDirective,Yl as createImageHandler,Ul as createImagePlugin,dm as defaultImageConfig,Vn as formatSize,pa as generateImageManifest,Zt as generateSizes,yt as generateSrcSet,Bn as getFallbackVariant,Yr as getImageMetadata,se as getMimeType,Hn as getTotalSize,Fn as groupVariantsByFormat,xa as handleImageRequest,Vl as imageDirective,ye as isImageBackendAvailable,zn as isImageFile,jn as isSharpAvailable,ql as optimizeDirectory,Wl as optimizeImage,ua as parseImageComponent,Re as processImage,zl as processImageComponents,Fl as renderImageComponent,nu as rewriteImagesWithSiblings,Kl as writeImageManifest};
|
|
@@ -1,3 +1,3 @@
|
|
|
1
1
|
// @bun
|
|
2
|
-
import{f,d}from"./chunk-
|
|
3
|
-
export{
|
|
2
|
+
import{f,d}from"./chunk-830ej8d2.js";import{Y,N,p}from"./chunk-261t62q4.js";function B(t,o){let i=1,r=o,e="<template",n="</template";while(r<t.length&&i>0){let s=t.indexOf("<",r);if(s===-1)break;if(r=s,t.startsWith(e,r)&&(r+e.length>=t.length||/[\s>\/]/.test(t[r+e.length]))){i++,r+=e.length;continue}if(t.startsWith(n,r)){let a=t.indexOf(">",r+n.length);if(a!==-1){if(i--,i===0)return a+1;r=a+1;continue}}r++}return i===0?r:-1}var k=new Set(["area","base","br","col","embed","hr","img","input","link","meta","param","source","track","wbr"]);function E(t,o){let i=null;for(let r=o;r<t.length;r++){let e=t[r];if(i){if(e==="\\"){r++;continue}if(e===i)i=null;continue}if(e==='"'||e==="'"){i=e;continue}if(e===">")return r+1}return-1}function Z(t,o,i){let r=o.toLowerCase(),e=1,n=i;while(n<t.length){let s=t.indexOf("<",n);if(s===-1)return-1;if(t.startsWith("<!--",s)){let g=t.indexOf("-->",s+4);n=g===-1?t.length:g+3;continue}let a=E(t,s+1);if(a===-1)return-1;let u=t.slice(s,a),c=u.match(/^<\s*(\/?)\s*([a-zA-Z][\w-]*)/);if(c&&c[2].toLowerCase()===r){if(c[1]==="/"){if(e--,e===0)return a}else if(!/\/\s*>$/.test(u))e++}n=a}return-1}function L(t){let o=[],i=[],r=/\bslot\s*=\s*(?:"([^"]+)"|'([^']+)')/i,e=0;while(e<t.length){let n=t.indexOf("<",e);if(n===-1)break;if(t.startsWith("<!--",n)){let l=t.indexOf("-->",n+4);e=l===-1?t.length:l+3;continue}let s=E(t,n+1);if(s===-1)break;let a=t.slice(n,s),u=a.match(/^<\s*(\/?)\s*([a-zA-Z][\w-]*)/);if(!u){e=s;continue}let c=u[2].toLowerCase();if(u[1]==="/"){let l=i.lastIndexOf(c);if(l!==-1)i.splice(l);e=s;continue}let g=/\/\s*>$/.test(a),m=i.length===0?a.match(r):null;if(m){let l=m[1]||m[2],h=a.replace(r,"").replace(/\s+(?=\/?>$)/,"").replace(/\s{2,}/g," "),S=g||k.has(c)?-1:Z(t,c,s);if(S===-1)o.push({start:n,end:s,slotName:l,element:h}),e=s;else o.push({start:n,end:S,slotName:l,element:h+t.slice(s,S)}),e=S;continue}if(!g&&!k.has(c)){if(i.push(c),c==="script"||c==="style"){let l=t.toLowerCase().indexOf(`</${c}>`,s);if(l!==-1){e=l;continue}}}e=s}return o}function j(t){let o=[],i=[],r=/^<template\s+(?:#([a-zA-Z][\w-]*)|v-slot:([a-zA-Z][\w-]*)|slot="([a-zA-Z][\w-]*)")(?:\s*=\s*"([^"]*)")?[^>]*>$/i,e=0;while(e<t.length){let n=t.indexOf("<",e);if(n===-1)break;if(t.startsWith("<!--",n)){let l=t.indexOf("-->",n+4);e=l===-1?t.length:l+3;continue}let s=E(t,n+1);if(s===-1)break;let a=t.slice(n,s),u=a.match(/^<\s*(\/?)\s*([a-zA-Z][\w-]*)/);if(!u){e=s;continue}let c=u[1]==="/",g=u[2].toLowerCase();if(c){let l=i.lastIndexOf(g);if(l!==-1)i.splice(l);e=s;continue}if(g==="template"&&i.length===0){let l=a.match(r);if(l){let h=B(t,s);if(h!==-1){let S=l[1]||l[2]||l[3];o.push({start:n,end:h,slotName:S,content:t.slice(s,h-11).trim(),propsBinding:l[4]||void 0}),e=h;continue}}}if(!/\/\s*>$/.test(a)&&!k.has(g)){if(i.push(g),g==="script"||g==="style"){let l=t.toLowerCase().indexOf(`</${g}>`,s);if(l!==-1){e=l;continue}}}e=s}return o}function Zl(t){let o={default:"",named:new Map},i=t,r=j(t);for(let n of r)o.named.set(n.slotName,{name:n.slotName,content:n.content,propsBinding:n.propsBinding});r.sort((n,s)=>s.start-n.start);for(let n of r)i=i.slice(0,n.start)+i.slice(n.end);let e=L(i);for(let n of e){let s=o.named.get(n.slotName);if(s)s.content+=n.element;else o.named.set(n.slotName,{name:n.slotName,content:n.element})}for(let n=e.length-1;n>=0;n--){let s=e[n];i=i.slice(0,s.start)+i.slice(s.end)}return o.default=i.trim(),o}function Rm(t){let o=t.match(/name\s*=\s*["']([^"']+)["']/),i=o?o[1]:"",r={},e=/:([a-zA-Z][\w-]*)\s*=\s*["']([^"']+)["']/g,n;while((n=e.exec(t))!==null)r[n[1]]=n[2];let s=t.match(/<slot[^>]*>([\s\S]*?)<\/slot>/i),a=s?s[1].trim():"";return{name:i,props:r,defaultContent:a}}async function Ql(t,o,i,r){if(!t)return i;let e=t.content;if(t.propsBinding&&Object.keys(o).length>0){let n=t.propsBinding.trim(),s={...r},a=new Set,u=new Set;if(n.startsWith("{")&&n.endsWith("}")){let c=n.slice(1,-1).split(",").map((g)=>g.trim()).filter(Boolean);for(let g of c){let[m,l]=g.split(":").map((S)=>S.trim()),h=l||m;if(s[h]=o[m],o[m]!==void 0)u.add(h);else a.add(h)}}else if(s[n]=o,Object.values(o).some((c)=>c===void 0))a.add(n);else u.add(n);e=I(e,s,a,u)}return e}function I(t,o,i,r){return t.replace(/\{\{\s*([^}]+)\s*\}\}/g,(e,n)=>{try{let s=n.trim();if(N(s,i))return e;if(Array.isArray(o.__stx_preserved_client_expressions)&&o.__stx_preserved_client_expressions.includes(s)&&!N(s,r))return e;let a=C(s,o);if(a===void 0)return e;return p(String(a??""))}catch{return`{{ ${n} }}`}})}function C(t,o){if(/^[a-zA-Z_$][\w$]*(\.[a-zA-Z_$][\w$]*)*$/.test(t)){let r=t.split("."),e=o;for(let n of r)if(e&&typeof e==="object"&&n in e)e=e[n];else return;return e}let i=t.match(/^([a-zA-Z_$][\w$]*)\s*([+\-*/])\s*(\d+)$/);if(i){let[,r,e,n]=i,s=o[r],a=parseInt(n,10);if(typeof s==="number")switch(e){case"+":return s+a;case"-":return s-a;case"*":return s*a;case"/":return s/a}}try{if(!f(t))return;return d(t,Object.keys(o))(...Object.values(o))}catch{return}}async function eu(t,o,i,r){let e=t;e=await W(e,/<slot\s+name\s*=\s*["']([^"']+)["']([^>]*?)(?:\/>|>([\s\S]*?)<\/slot>)/gi,async(a,u,c,g)=>{let m=o.named.get(u),l=g?.trim()||"",h=c||"",S={},A=[],M=/:([a-zA-Z_$][\w$-]*)\s*=\s*["']([^"']+)["']/g,b;while((b=M.exec(h))!==null){let w=b[1],x=b[2];S[w]=C(x,i),A.push([w,x])}if(r!==void 0&&m?.propsBinding&&Object.values(S).some((w)=>w===void 0)){let w=m.propsBinding.trim(),x=Y(`${w} in []`),y="__stx_slot_props";while(x.includes(y))y+="_";let v=A.map(([O,z])=>{let R=S[O],_;try{_=R===void 0?void 0:JSON.stringify(R)}catch{}return`${JSON.stringify(O)}:(${_??z})`}).join(","),P=p(JSON.stringify({binding:w,names:x,owner:r}));return`<template :for="${p(`${y} in [{${v}}]`)}" data-stx-slot-binding="${encodeURIComponent(w)}" data-stx-slot-scope="${P}">${m.content}</template>`}return await Ql(m,S,l,i)});let s=/<slot\b((?:"[^"]*"|'[^']*'|[^>"'])*?)\s*(?:\/>|>([\s\S]*?)<\/slot>)/gi;return e=e.replace(s,(a,u,c)=>{if(/\bname\s*=/.test(u||""))return a;let g=c?.trim()||"";return o.default||g}),e}async function W(t,o,i){let r=[],e=[];t.replace(o,(a,...u)=>{let c=u[u.length-2];return e.push({match:a,index:c}),r.push(i(a,...u.slice(0,-2))),a});let n=await Promise.all(r),s=t;for(let a=e.length-1;a>=0;a--){let{match:u,index:c}=e[a];s=s.slice(0,c)+n[a]+s.slice(c+u.length)}return s}function Am(t){let o=Zl(t);return{defaultSlot:o.default,namedSlots:o.named}}async function Pm(t,o,i,r,e){return await eu(t,{default:o,named:i},r,e)}
|
|
3
|
+
export{Zl,Rm,Ql,eu,Am,Pm};
|
|
@@ -1,3 +1,3 @@
|
|
|
1
1
|
// @bun
|
|
2
|
-
import i from"path";var gn=".stx",o="STX_DIR",e=null;function
|
|
3
|
-
export{gn,
|
|
2
|
+
import i from"path";var gn=".stx",o="STX_DIR",e=null;function jc(t){e=t?.trim()||null}function wr(){return process.env[o]?.trim()||e||gn}function c(t=process.cwd(),...n){let r=wr();return i.isAbsolute(r)?i.join(r,...n):i.join(t,r,...n)}function vr(t){if(!t||i.isAbsolute(t))return t;let n=t.replace(/\\/g,"/");if(n!==gn&&!n.startsWith(`${gn}/`))return t;let r=n.slice(gn.length+1);return r?i.join(wr(),r):wr()}
|
|
3
|
+
export{gn,jc,wr,c,vr};
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
// @bun
|
|
2
|
+
import{Ui,Wi,qi,Jg,Ki,Gi,Yg,Xi,Ji,Ml,Zg}from"./chunk-tm201m9x.js";export{Ui as VideoProcessorCache,Ml as analyzeVideo,Jg as clearVideoCache,Ji as generateDASHManifest,Xi as generateHLSManifest,Ki as generatePoster,Yg as generateSpriteSheet,Gi as generateThumbnails,Wi as getCachedVideoResult,Zg as processVideo,qi as setCachedVideoResult};
|
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
// @bun
|
|
2
|
-
import{_n,$i}from"./chunk-
|
|
2
|
+
import{_n,$i}from"./chunk-naj146zq.js";import"./chunk-5rxks14t.js";export{$i as generateRuntimeConfigTypes,_n as prepareRuntimeConfig};
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
// @bun
|
|
2
|
-
import y from"fs";import R from"path";var S="_stx";function F(e){return Bun.hash(e).toString(16).slice(0,8)}function k(e){let t=[],n=(i)=>{for(let s of y.readdirSync(i,{withFileTypes:!0})){let r=R.join(i,s.name);if(s.isDirectory())n(r);else if(s.isFile()&&r.endsWith(".html"))t.push(r)}};if(y.existsSync(e))n(e);return t}var z=[{pattern:/<script\b([^>]*\bdata-stx-runtime\b[^>]*)>([\s\S]*?)<\/script>/gi,prefix:"runtime",extension:"js",contentType:"text/javascript; charset=utf-8",replace:(e)=>`<script data-stx-runtime src="${e}"></script>`},{pattern:/<script\b([^>]*\bdata-stx-router\b[^>]*)>([\s\S]*?)<\/script>/gi,prefix:"router",extension:"js",contentType:"text/javascript; charset=utf-8",replace:(e)=>`<script data-stx-router src="${e}"></script>`},{pattern:/<style\b([^>]*\bdata-css=(?:"generated"|'generated')[^>]*)>([\s\S]*?)<\/style>/gi,prefix:"css",extension:"css",contentType:"text/css; charset=utf-8",replace:(e)=>`<link data-css="generated" rel="stylesheet" href="${e}">`}];function I(e,t=`/${S}`){let n=[],i=new Set,s=0,r=e;for(let o of z)r=r.replace(o.pattern,(g,u,c)=>{if(/\b(?:src|href)\s*=/.test(u)||!c.trim())return g;let a=`${o.prefix}.${F(c)}.${o.extension}`;if(!i.has(a))i.add(a),n.push({filename:a,contents:c,contentType:o.contentType});return s+=c.length,o.replace(`${t}/${a}`)});return{html:r,assets:n,bytesInlined:s}}function
|
|
2
|
+
import y from"fs";import R from"path";var S="_stx";function F(e){return Bun.hash(e).toString(16).slice(0,8)}function k(e){let t=[],n=(i)=>{for(let s of y.readdirSync(i,{withFileTypes:!0})){let r=R.join(i,s.name);if(s.isDirectory())n(r);else if(s.isFile()&&r.endsWith(".html"))t.push(r)}};if(y.existsSync(e))n(e);return t}var z=[{pattern:/<script\b([^>]*\bdata-stx-runtime\b[^>]*)>([\s\S]*?)<\/script>/gi,prefix:"runtime",extension:"js",contentType:"text/javascript; charset=utf-8",replace:(e)=>`<script data-stx-runtime src="${e}"></script>`},{pattern:/<script\b([^>]*\bdata-stx-router\b[^>]*)>([\s\S]*?)<\/script>/gi,prefix:"router",extension:"js",contentType:"text/javascript; charset=utf-8",replace:(e)=>`<script data-stx-router src="${e}"></script>`},{pattern:/<style\b([^>]*\bdata-css=(?:"generated"|'generated')[^>]*)>([\s\S]*?)<\/style>/gi,prefix:"css",extension:"css",contentType:"text/css; charset=utf-8",replace:(e)=>`<link data-css="generated" rel="stylesheet" href="${e}">`}];function I(e,t=`/${S}`){let n=[],i=new Set,s=0,r=e;for(let o of z)r=r.replace(o.pattern,(g,u,c)=>{if(/\b(?:src|href)\s*=/.test(u)||!c.trim())return g;let a=`${o.prefix}.${F(c)}.${o.extension}`;if(!i.has(a))i.add(a),n.push({filename:a,contents:c,contentType:o.contentType});return s+=c.length,o.replace(`${t}/${a}`)});return{html:r,assets:n,bytesInlined:s}}function ic(e){let t={pages:0,assets:0,bytesInlined:0},n=R.join(e,S),i=new Set;for(let s of k(e)){let r=y.readFileSync(s,"utf8"),{html:o,assets:g,bytesInlined:u}=I(r);if(o===r)continue;for(let c of g){if(i.has(c.filename))continue;i.add(c.filename),y.mkdirSync(n,{recursive:!0}),y.writeFileSync(R.join(n,c.filename),c.contents),t.assets++}y.writeFileSync(s,o),t.bytesInlined+=u,t.pages++}return t}import h from"fs";import T from"path";var L=1024,N=/<(script|style)\b([^>]*)>([\s\S]*?)<\/\1>/gi,_=new Set(["","module","text/javascript","application/javascript","module/javascript"]);function B(e){return Bun.hash(e).toString(16).slice(0,8)}function C(e){let t=[],n=(i)=>{for(let s of h.readdirSync(i,{withFileTypes:!0})){let r=T.join(i,s.name);if(s.isDirectory())n(r);else if(s.isFile()&&r.endsWith(".html"))t.push(r)}};if(h.existsSync(e))n(e);return t}function O(e,t){let n=e.match(new RegExp(`\\b${t}\\s*=\\s*("([^"]*)"|'([^']*)'|([^\\s>]+))`,"i"));if(!n)return;return n[2]??n[3]??n[4]??""}function H(e,t,n){if(n.length<L)return!1;if(/\b(?:src|href)\s*=/i.test(t))return!1;if(e.toLowerCase()==="script"){if(!_.has((O(t,"type")??"").trim().toLowerCase()))return!1;return!0}return!0}function D(e){let t=[];for(let n of e.matchAll(/<template\b[^>]*>[\s\S]*?<\/template>/gi))t.push([n.index,n.index+n[0].length]);return t}function ac(e){let t={pages:0,assets:0,bytesInlined:0},n=C(e);if(n.length<2)return t;let i=new Map,s=new Map;for(let a of n){let f=h.readFileSync(a,"utf8");i.set(a,f);let M=D(f);for(let d of f.matchAll(N)){let[x,p,l,m]=d;if(!H(p,l,m))continue;if(M.some(([j,A])=>d.index>=j&&d.index<A))continue;let w=`${p.toLowerCase()}\x00${m}`,b=s.get(w);if(b)b.push({file:a,whole:x,tag:p,attrs:l,body:m});else s.set(w,[{file:a,whole:x,tag:p,attrs:l,body:m}])}}let r=[...s.values()].filter((a)=>new Set(a.map((f)=>f.file)).size>1);if(r.length===0)return t;let o=T.join(e,S),g=new Map(i),u=new Map,c=[];for(let a of r){let{tag:f,body:M}=a[0],d=f.toLowerCase()==="script",x=`${d?"chunk":"style"}.${B(M)}.${d?"js":"css"}`;c.push({filename:x,contents:M,contentType:d?"text/javascript; charset=utf-8":"text/css; charset=utf-8"});let p=`/${S}/${x}`;for(let l of a){let m=d?`<script${l.attrs} src="${p}"></script>`:`<link${l.attrs} rel="stylesheet" href="${p}">`,w=g.get(l.file),b=w.replace(l.whole,()=>m);if(b===w)continue;g.set(l.file,b),u.set(l.file,(u.get(l.file)??0)+l.body.length)}}h.mkdirSync(o,{recursive:!0});for(let a of c)h.writeFileSync(T.join(o,a.filename),a.contents),t.assets++;for(let[a,f]of g){if(f===i.get(a))continue;h.writeFileSync(a,f),t.pages++,t.bytesInlined+=u.get(a)??0}return t}import E from"fs";import v from"path";var K="layout-types.d.ts";function P(e){let t=[],n=(i,s)=>{let r;try{r=E.readdirSync(i,{withFileTypes:!0})}catch{return}for(let o of r){if(o.name.startsWith("."))continue;let g=v.join(i,o.name);if(o.isDirectory())n(g,s?`${s}/${o.name}`:o.name);else if(o.isFile()&&o.name.endsWith(".stx")&&o.name!=="_layout.stx"){let u=o.name.slice(0,-4);t.push(s?`${s}/${u}`:u)}}};return n(e,""),t.sort()}function W(e){let t=["// Auto-generated by stx \u2014 do not edit.","//","// Makes `definePageMeta({ layout })` reject a name with no layout behind it.","// Include this file in your tsconfig (it lives in the stx state directory,","// `.stx/` by default) for the check to apply.",""];if(e.length===0)return t.push("// No layouts found \u2014 `layout` stays typed as `string`.","export {}",""),t.join(`
|
|
3
3
|
`);return t.push("declare module '@stacksjs/stx' {"," interface KnownLayouts {",...e.map((n)=>` '${n}': true`)," }","}","","export {}",""),t.join(`
|
|
4
|
-
`)}function
|
|
5
|
-
export{
|
|
4
|
+
`)}function cc(e,t){if(!e)return[];let n=v.isAbsolute(e)?e:v.resolve(process.cwd(),e),i=P(n),s=W(i),r=v.join(t,K);try{if(E.existsSync(r)&&E.readFileSync(r,"utf8")===s)return i;E.mkdirSync(t,{recursive:!0}),E.writeFileSync(r,s)}catch{}return i}
|
|
5
|
+
export{ic,ac,cc};
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
// @bun
|
|
2
|
-
var d=0;function l(){return`keep-alive-${++d}-${Date.now().toString(36)}`}function
|
|
2
|
+
var d=0;function l(){return`keep-alive-${++d}-${Date.now().toString(36)}`}function Lm(e,t={},n){let i=/@keepAlive(?:\s*\(([^)]*)\))?\s*([\s\S]*?)@endkeepAlive/gi;return e.replace(i,(a,c,o)=>{let s=l(),r=u(c||"");return p(s,o.trim(),r)})}function u(e){let t={max:10},n=/(\w+)\s*:\s*(?:'([^']*)'|"([^"]*)"|(\d+)|(\w+))/g,i;while((i=n.exec(e))!==null){let a=i[1],c=i[2]||i[3],o=i[4];switch(a){case"max":t.max=o?parseInt(o,10):10;break;case"include":t.include=c;break;case"exclude":t.exclude=c;break;case"id":t.id=c;break}}return t}function p(e,t,n){let{max:i,include:a,exclude:c}=n,o=n.id||e;return`
|
|
3
3
|
<div class="stx-keep-alive" data-keep-alive-id="${e}" data-custom-id="${o}">
|
|
4
4
|
<div class="stx-keep-alive-content" data-keep-alive-content="${e}">
|
|
5
5
|
${t}
|
|
@@ -286,7 +286,7 @@ else {
|
|
|
286
286
|
});
|
|
287
287
|
})();
|
|
288
288
|
</script>
|
|
289
|
-
`}function
|
|
289
|
+
`}function jm(e={}){return{id:e.id||l(),cache:new Map,max:e.max||10,include:e.include?e.include.split(",").map((n)=>n.trim()):null,exclude:e.exclude?e.exclude.split(",").map((n)=>n.trim()):null}}function Bm(e,t){if(t.exclude&&t.exclude.includes(e))return!1;if(t.include&&!t.include.includes(e))return!1;return!0}function Fm(){return`
|
|
290
290
|
/* STX Keep-Alive Styles */
|
|
291
291
|
.stx-keep-alive {
|
|
292
292
|
position: relative;
|
|
@@ -311,7 +311,7 @@ else {
|
|
|
311
311
|
.stx-keep-alive-content > [data-activated] {
|
|
312
312
|
opacity: 1;
|
|
313
313
|
}
|
|
314
|
-
`}function
|
|
314
|
+
`}function zm(){return`
|
|
315
315
|
// STX Keep-Alive Runtime
|
|
316
316
|
(function() {
|
|
317
317
|
if (typeof window === 'undefined') return;
|
|
@@ -347,5 +347,5 @@ else {
|
|
|
347
347
|
|
|
348
348
|
console.log('[stx] Keep-alive runtime initialized');
|
|
349
349
|
})();
|
|
350
|
-
`}function
|
|
351
|
-
export{
|
|
350
|
+
`}function Hm(e){if(typeof document<"u")document.addEventListener("stx:activated",(t)=>{e(t.detail)})}function Vm(e){if(typeof document<"u")document.addEventListener("stx:deactivated",(t)=>{e(t.detail)})}
|
|
351
|
+
export{Lm,jm,Bm,Fm,zm,Hm,Vm};
|