@stacksjs/stx 0.2.293 → 0.2.295
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/caching.d.ts +25 -0
- package/dist/caching.js +10 -0
- package/dist/{chunk-r2pck10q.js → chunk-0btmm4m2.js} +1 -1
- package/dist/chunk-0dk4qvb6.js +2 -0
- package/dist/chunk-11az7s55.js +2 -0
- package/dist/{chunk-ytax6h7b.js → chunk-18cn95p7.js} +1 -1
- package/dist/chunk-1jxhfa9g.js +2 -0
- package/dist/chunk-1pwcgb1t.js +2 -0
- package/dist/chunk-1xrc4jg5.js +2 -0
- package/dist/{chunk-vqq5zjbg.js → chunk-24j0qx2z.js} +1 -1
- package/dist/chunk-295qskae.js +2 -0
- package/dist/{chunk-1jaecby8.js → chunk-2bpa6n7s.js} +1 -1
- package/dist/chunk-2cm2j31x.js +2 -0
- package/dist/{chunk-ncnmb3kq.js → chunk-359ps7j5.js} +1 -1
- package/dist/{chunk-qkjrhzng.js → chunk-38nfzyxc.js} +1 -1
- package/dist/chunk-3geahqf7.js +2 -0
- package/dist/chunk-4y5q9hhx.js +2 -0
- package/dist/{chunk-txmze65m.js → chunk-55rgvjvd.js} +1 -1
- package/dist/{chunk-kzt0ycg7.js → chunk-5g1amf33.js} +2 -2
- package/dist/chunk-5wfgvwzg.js +2 -0
- package/dist/{chunk-qsgd6bvq.js → chunk-64d20kkv.js} +26 -8
- package/dist/chunk-68z2ga8f.js +2 -0
- package/dist/{chunk-d76qy741.js → chunk-6dkpsw29.js} +1 -1
- package/dist/{chunk-278ay77z.js → chunk-6w76w8tt.js} +1 -1
- package/dist/{chunk-1808n1wa.js → chunk-6x87aw24.js} +1 -1
- package/dist/{chunk-hf3pqryr.js → chunk-7rkxdbzr.js} +1 -1
- package/dist/{chunk-xz3gc1kb.js → chunk-7s1kdzcr.js} +1 -1
- package/dist/{chunk-fq5d2r74.js → chunk-7sdvaras.js} +1 -1
- package/dist/{chunk-eqnsptkc.js → chunk-7wnbgnxj.js} +1 -1
- package/dist/{chunk-x21tn7gc.js → chunk-8553dwfj.js} +1 -1
- package/dist/{chunk-64gh98cz.js → chunk-85xj7cgm.js} +1 -1
- package/dist/{chunk-9rww0f53.js → chunk-8cdfsgjb.js} +1 -1
- package/dist/{chunk-4njgtpcx.js → chunk-8r7r92n4.js} +2 -2
- package/dist/{chunk-hpybjwwf.js → chunk-9a1f6dz7.js} +1 -1
- package/dist/{chunk-gcwnxq0b.js → chunk-9mzj4q5k.js} +1 -1
- package/dist/{chunk-mf4akzqj.js → chunk-9rgwpt1m.js} +2 -2
- package/dist/{chunk-n3kmd544.js → chunk-9s0ax53m.js} +1 -1
- package/dist/{chunk-fvh9ca47.js → chunk-ahqn4s3t.js} +1 -1
- package/dist/chunk-arb8nckf.js +2 -0
- package/dist/{chunk-c1rwzz7v.js → chunk-b16crvqg.js} +1 -1
- package/dist/{chunk-3esxha5p.js → chunk-bcgywywg.js} +1 -1
- package/dist/{chunk-603dkj8s.js → chunk-bh4aq0dx.js} +1 -1
- package/dist/chunk-bm8mgc3b.js +2 -0
- package/dist/chunk-bnw4dyp3.js +2 -0
- package/dist/{chunk-t7jv48p8.js → chunk-br48y7q9.js} +3 -3
- package/dist/{chunk-ant3p5v8.js → chunk-caf2cj4f.js} +1 -1
- package/dist/chunk-ccmr3ksw.js +2 -0
- package/dist/chunk-cemkg4m3.js +2 -0
- package/dist/{chunk-zdd1gjzw.js → chunk-cjhwpp4c.js} +2 -2
- package/dist/{chunk-0vnb799d.js → chunk-cvw9brjj.js} +1 -1
- package/dist/{chunk-9r5kevtk.js → chunk-d2rhtvxx.js} +1 -1
- package/dist/{chunk-qyww2kx3.js → chunk-dd5jk2w3.js} +1 -1
- package/dist/{chunk-x544hah3.js → chunk-dd7f8yxx.js} +1 -1
- package/dist/chunk-dfcsn711.js +2 -0
- package/dist/{chunk-e4gbq08h.js → chunk-dxevp6w7.js} +1 -1
- package/dist/chunk-ez6x07ts.js +2 -0
- package/dist/{chunk-sg0wxqc0.js → chunk-gjjvjzm2.js} +1 -1
- package/dist/{chunk-sdfr543c.js → chunk-gw4hwf49.js} +1 -1
- package/dist/chunk-gxm3awwv.js +2 -0
- package/dist/{chunk-a540pndz.js → chunk-h06cjhqg.js} +1 -1
- package/dist/chunk-h1tkqfym.js +3 -0
- package/dist/{chunk-ry9mp3gp.js → chunk-h5898m09.js} +1 -1
- package/dist/{chunk-f8hdq4gt.js → chunk-h61mtxjp.js} +2 -2
- package/dist/{chunk-7g71qjfg.js → chunk-hh1knan6.js} +10 -10
- package/dist/chunk-hwn896re.js +2 -0
- package/dist/{chunk-ejcag982.js → chunk-hx6y0qqy.js} +1 -1
- package/dist/{chunk-6sme368t.js → chunk-j83cstqe.js} +1 -1
- package/dist/{chunk-bf4xr43a.js → chunk-ja39jznm.js} +1 -1
- package/dist/chunk-jzhk9rg5.js +2 -0
- package/dist/chunk-kagw0ckh.js +2 -0
- package/dist/{chunk-6b9tm22t.js → chunk-kxjh5mc2.js} +1 -1
- package/dist/{chunk-2hjag2ze.js → chunk-m8nswk6n.js} +1 -1
- package/dist/{chunk-z21f96n7.js → chunk-map1tr8n.js} +2 -2
- package/dist/{chunk-tj99frhg.js → chunk-mdfyv4hb.js} +1 -1
- package/dist/{chunk-vw5ynbz7.js → chunk-mfwass3b.js} +2 -2
- package/dist/chunk-mg0adds2.js +2 -0
- package/dist/{chunk-y0xah453.js → chunk-n0hgshd5.js} +1 -1
- package/dist/{chunk-2zbkpbhr.js → chunk-nk11g9k5.js} +1 -1
- package/dist/{chunk-s8xdgqxn.js → chunk-p7b34wcs.js} +1 -1
- package/dist/{chunk-vcmbscjx.js → chunk-p9wkzh0k.js} +1 -1
- package/dist/{chunk-0nsa242z.js → chunk-prt5da17.js} +1 -1
- package/dist/chunk-qfrz7b04.js +2 -0
- package/dist/{chunk-hmzf7jey.js → chunk-rbabq8ds.js} +1 -1
- package/dist/{chunk-cdmk58g1.js → chunk-rbg1m54v.js} +1 -1
- package/dist/{chunk-vvkh24d4.js → chunk-regxa2tq.js} +1 -1
- package/dist/{chunk-0gtbzvdf.js → chunk-s30wc9qn.js} +1 -1
- package/dist/{chunk-5k2vmefg.js → chunk-t5d0pm2c.js} +1 -1
- package/dist/chunk-t9489pxe.js +2 -0
- package/dist/{chunk-w6d78tbf.js → chunk-tjverybm.js} +68 -68
- package/dist/{chunk-2h3jgpts.js → chunk-tweb2f3m.js} +3 -3
- package/dist/{chunk-12sfyfes.js → chunk-txjckheb.js} +1 -1
- package/dist/chunk-v9p2r2dv.js +2 -0
- package/dist/chunk-vgcpawx1.js +2 -0
- package/dist/{chunk-0jznnssx.js → chunk-vkc53tv3.js} +1 -1
- package/dist/{chunk-z7g7djb3.js → chunk-vpbtp5ws.js} +1 -1
- package/dist/{chunk-0ya4v5pr.js → chunk-w1h2g1ej.js} +1 -1
- package/dist/chunk-w2j5ze75.js +2 -0
- package/dist/{chunk-tkpafgzq.js → chunk-weny2sns.js} +1 -1
- package/dist/{chunk-ke383bna.js → chunk-wvn4gc66.js} +1 -1
- package/dist/{chunk-wzb9q4ta.js → chunk-wxgkq79w.js} +1 -1
- package/dist/{chunk-7cwqawqt.js → chunk-x6ehvkry.js} +1 -1
- package/dist/{chunk-58f0mthg.js → chunk-xtx53xyz.js} +1 -1
- package/dist/{chunk-a5x23sjv.js → chunk-y6x6pbw0.js} +1 -1
- package/dist/chunk-ygy2r4a8.js +2 -0
- package/dist/{chunk-eaev54m8.js → chunk-ym0dqh13.js} +1 -1
- package/dist/chunk-yshwe3ny.js +2 -0
- package/dist/{chunk-yh6he959.js → chunk-zg2kxgd4.js} +1 -1
- package/dist/{chunk-7emhfsfb.js → chunk-zgevnvfs.js} +1 -1
- package/dist/chunk-zkfxz3fj.js +2 -0
- package/dist/cli.js +14 -14
- package/dist/craft-entry.js +1 -1
- package/dist/craft.js +1 -1
- package/dist/database.js +1 -1
- package/dist/pwa.js +2 -2
- package/dist/runtime-injection.js +5 -3
- package/dist/ssg.js +2 -2
- package/dist/visual-testing.js +1 -1
- package/package.json +5 -5
- package/dist/chunk-0pjqw9nf.js +0 -2
- package/dist/chunk-208m2e5n.js +0 -2
- package/dist/chunk-28fp26rb.js +0 -2
- package/dist/chunk-34wtqndg.js +0 -2
- package/dist/chunk-367148d4.js +0 -2
- package/dist/chunk-3vf4w6tn.js +0 -2
- package/dist/chunk-418g2nh4.js +0 -2
- package/dist/chunk-5ygw1kzd.js +0 -3
- package/dist/chunk-6exjvza5.js +0 -2
- package/dist/chunk-6xm5p7xv.js +0 -2
- package/dist/chunk-9xtn4ybq.js +0 -2
- package/dist/chunk-ag3k1cp7.js +0 -2
- package/dist/chunk-bk3pm7vs.js +0 -2
- package/dist/chunk-cfy4n2pn.js +0 -2
- package/dist/chunk-cjf28904.js +0 -2
- package/dist/chunk-et9qad4w.js +0 -2
- package/dist/chunk-fcde3yy0.js +0 -2
- package/dist/chunk-gb98w455.js +0 -2
- package/dist/chunk-kxz4c02k.js +0 -2
- package/dist/chunk-mqempwb6.js +0 -2
- package/dist/chunk-msb45j2n.js +0 -2
- package/dist/chunk-mytda2c7.js +0 -2
- package/dist/chunk-pktseark.js +0 -2
- package/dist/chunk-rwaqb3bs.js +0 -2
- package/dist/chunk-s4h21td2.js +0 -2
- package/dist/chunk-tq005ysq.js +0 -2
- package/dist/chunk-vvnfyt9w.js +0 -2
- package/dist/chunk-vynan80s.js +0 -2
- package/dist/chunk-wmgndxeg.js +0 -2
- package/dist/chunk-xr0g1j44.js +0 -2
- package/dist/chunk-xxp2vgk5.js +0 -2
- package/dist/chunk-z26wja8z.js +0 -2
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
// @bun
|
|
2
|
+
import{$ as wl,$a as qn,$b as Io,$c as Ip,$d as Iq,A as gk,Aa as Am,Ab as ao,Ac as hp,Ad as hq,Ae as nr,B as hk,Ba as Bm,Bb as bo,Bc as ip,Bd as iq,Be as or,C as ik,Ca as Om,Cb as co,Cc as jp,Cd as jq,Ce as pr,D as jk,Da as Pm,Db as eo,Dc as kp,Dd as kq,De as qr,E as $k,Ea as Qm,Eb as fo,Ec as lp,Ed as lq,Ee as rr,F as al,Fa as Rm,Fb as go,Fc as mp,Fd as mq,Fe as sr,G as bl,Ga as Sm,Gb as ho,Gc as np,Gd as nq,Ge as tr,H as cl,Ha as Tm,Hb as io,Hc as op,Hd as oq,He as ur,I as dl,Ia as Xm,Ib as jo,Ic as pp,Id as pq,Ie as vr,J as el,Ja as Ym,Jb as ko,Jc as qp,Jd as qq,Je as wr,K as fl,Ka as Zm,Kb as lo,Kc as rp,Kd as rq,Ke as xr,L as gl,La as _m,Lb as mo,Lc as sp,Ld as sq,Le as yr,M as hl,Ma as $m,Mb as to,Mc as tp,Md as tq,Me as zr,N as il,Na as an,Nb as uo,Nc as up,Nd as uq,Ne as Ar,O as jl,Oa as bn,Ob as vo,Oc as vp,Od as vq,Oe as Br,P as kl,Pa as cn,Pb as wo,Pc as wp,Pd as wq,Pe as Cr,Q as ll,Qa as dn,Qb as xo,Qc as xp,Qd as xq,Qe as Dr,R as ml,Ra as en,Rb as yo,Rc as yp,Rd as yq,Re as Er,S as nl,Sa as fn,Sb as zo,Sc as zp,Sd as zq,Se as Fr,T as ol,Ta as gn,Tb as Ao,Tc as Ap,Td as Aq,Te as Gr,U as pl,Ua as hn,Ub as Bo,Uc as Bp,Ud as Bq,Ue as Hr,V as ql,Va as jn,Vb as Co,Vc as Cp,Vd as Cq,Ve as Ir,W as rl,Wa as ln,Wb as Do,Wc as Dp,Wd as Dq,We as Jr,X as sl,Xa as mn,Xb as Eo,Xc as Ep,Xd as Eq,Y as tl,Ya as nn,Yb as Fo,Yc as Fp,Yd as Fq,Z as ul,Za as on,Zb as Go,Zc as Gp,Zd as Gq,_ as vl,_a as pn,_b as Ho,_c as Hp,_d as Hq,aa as xl,ab as rn,ac as Jo,ad as Jp,ae as Jq,ba as yl,bb as sn,bc as Ko,bd as Kp,be as Kq,ca as zl,cb as tn,cc as Lo,cd as Lp,ce as Lq,da as Al,db as un,dc as Mo,dd as Mp,de as Mq,ea as Bl,eb as vn,ec as No,ed as Np,ee as Nq,fa as Cl,fb as wn,fc as Oo,fd as Op,fe as Oq,ga as Dl,gb as xn,gc as Po,gd as Pp,ge as Pq,ha as El,hb as yn,hc as Qo,hd as Qp,he as Qq,ia as Fl,ib as zn,ic as Ro,id as Rp,ie as Rq,ja as Gl,jb as An,jc as So,jd as Sp,je as Sq,ka as Hl,kb as Bn,kc as To,kd as Tp,ke as Tq,la as Il,lb as Cn,lc as Uo,ld as Up,le as Uq,ma as Jl,mb as Dn,mc as Vo,md as Vp,me as Vq,na as Kl,nb as Gn,nc as Wo,nd as Wp,ne as ar,o as a,oa as Ll,ob as Hn,oc as Xo,od as Xp,oe as br,p as Tj,pa as pm,pb as In,pc as Yo,pd as Yp,pe as cr,q as Uj,qa as qm,qb as Jn,qc as Zo,qd as Zp,qe as dr,r as Vj,ra as rm,rb as Pn,rc as _o,rd as _p,re as er,s as Wj,sa as sm,sb as Qn,sc as $o,sd as $p,se as fr,t as Xj,ta as tm,tb as Rn,tc as ap,td as aq,te as gr,u as Yj,ua as um,ub as Sn,uc as bp,ud as bq,ue as hr,v as Zj,va as vm,vb as Xn,vc as cp,vd as cq,ve as ir,w as _j,wa as wm,wb as Yn,wc as dp,wd as dq,we as jr,x as $j,xa as xm,xb as Zn,xc as ep,xd as eq,xe as kr,y as ek,ya as ym,yb as _n,yc as fp,yd as fq,ye as lr,z as fk,za as zm,zb as $n,zc as gp,zd as gq,ze as mr}from"./chunk-hh1knan6.js";import{Xe as Kn}from"./chunk-weny2sns.js";import{$e as kn,Ye as Um,Ze as Vm,_e as Wm,af as Ln,bf as Mn,cf as Nn,df as On,ef as Tn,ff as Un,gf as Vn,hf as Wn}from"./chunk-9mzj4q5k.js";import{if as kk,jf as lk,kf as mk,lf as nk,mf as ok,nf as pk,of as qk,pf as rk,qf as sk,rf as tk,sf as uk,tf as vk,uf as wk,vf as xk,wf as yk}from"./chunk-ps20v1ah.js";import{Af as Sk,Bf as Tk,Cf as Uk,Df as Vk,Ef as Wk,Ff as Xk,Gf as Yk,Hf as Zk,If as _k,xf as Pk,yf as Qk,zf as Rk}from"./chunk-kxjh5mc2.js";import{Jf as no,Kf as oo,Lf as po,Mf as qo,Nf as ro,Of as so}from"./chunk-6x87aw24.js";import{Pf as En,Qf as Fn}from"./chunk-mjpqz66q.js";import{Rf as dm,Sf as em,Tf as fm,Uf as gm,Vf as jm,Wf as nm}from"./chunk-2bpa6n7s.js";import{$f as Ql,Xf as Ml,Yf as Nl,Zf as Ol,_f as Pl,ag as Rl,bg as Sl,cg as Tl,dg as Ul,eg as Vl,fg as Wl,gg as Xl,hg as Yl,ig as Zl,jg as _l,kg as km,lg as lm,mg as mm}from"./chunk-d2rhtvxx.js";import{ng as hm,qg as im}from"./chunk-bcgywywg.js";import{Ag as Em,Bg as Fm,Cg as Gm,Dg as Hm,Eg as Im,Fg as Jm,Gg as Km,Hg as Lm,Ig as Mm,Jg as Nm,yg as Cm,zg as Dm}from"./chunk-8bxtvsgm.js";import{Kg as Nk,Lg as Ok}from"./chunk-j83cstqe.js";import{Mg as om}from"./chunk-nk11g9k5.js";import{Ng as Dh,Og as Eh,Pg as Fh,Qg as Gh,Rg as Hh,Sg as Ih}from"./chunk-cvw9brjj.js";import{$g as aj,Tg as Xi,Ug as Yi,Vg as Zi,Zg as _i,_g as $i}from"./chunk-prt5da17.js";import{ah as gj,bh as hj,ch as ij,dh as jj,eh as kj,fh as lj,gh as mj,hh as nj,ih as oj,jh as pj,kh as qj}from"./chunk-h5898m09.js";import{lh as Ni,mh as Oi,nh as Pi,oh as Qi,ph as Ri,rh as Si,sh as Ti,th as Ui,uh as Vi,vh as Wi}from"./chunk-k78gvm0g.js";import{wh as Ij,yh as Jj}from"./chunk-hmf9z4jx.js";import{Eh as zk,Fh as Ak,Gh as Bk,Hh as Ck,Ih as Dk,Jh as Ek,Kh as Fk,Mh as Gk,Nh as Hk,Oh as Ik,Ph as Jk,Qh as Kk,Rh as Lk,Uh as Mk}from"./chunk-8cdfsgjb.js";import{$h as kh,Vh as eh,Wh as fh,Xh as gh,Yh as hh,Zh as ih,_h as jh,ai as lh,bi as mh,ci as nh,di as oh,ei as ph,fi as qh,gi as rh}from"./chunk-mywp77gt.js";import{ii as sh,ji as th,ki as uh,li as vh}from"./chunk-nmkra8q5.js";import{qi as wh}from"./chunk-k0y7ta0d.js";import{ri as Ag}from"./chunk-a668m28h.js";import{si as Bg,ti as Cg}from"./chunk-ynt7y2n5.js";import{ui as Dg,vi as Eg,wi as Fg,xi as Gg,yi as Hg,zi as Ig}from"./chunk-wvq1g6gr.js";import{Ai as Jg,Bi as Kg,Ci as Lg,Di as Mg,Ei as Ng}from"./chunk-wyxw61az.js";import{Fi as Og,Gi as Pg,Hi as Qg,Ii as Rg,Ji as Sg}from"./chunk-k70fgb2f.js";import{Ki as Tg,Li as Ug,Mi as Vg,Ni as Wg,Oi as Xg,Pi as Yg,Qi as Zg}from"./chunk-4vpsvh6x.js";import{Ri as _g,Si as $g,Ti as ah,Ui as bh,Vi as ch,Wi as dh}from"./chunk-jem20v5k.js";import{Yi as xg,Zi as yg}from"./chunk-rbabq8ds.js";import{aj as zg}from"./chunk-p9wkzh0k.js";import"./chunk-efr3ejqt.js";import{ej as ue,fj as ve,gj as we,hj as xe,ij as ye,jj as ze,kj as Ae,lj as Be,mj as Ce,nj as De,oj as Ee,pj as Fe,qj as Ge,rj as He}from"./chunk-hx6y0qqy.js";import{sj as Ye,tj as Ze}from"./chunk-85xj7cgm.js";import{Aj as Ke,Bj as Le,Cj as Me,Dj as Ne,Ej as Oe,Fj as Pe,Gj as Qe,Hj as Re,Ij as Se,Jj as Te,Kj as Ue,Lj as Ve,Mj as We,Nj as Xe}from"./chunk-fed3xsp9.js";import{Oj as _e,Pj as $e,Qj as af,Rj as bf,Sj as cf,Tj as df,Uj as ef,Vj as ff,Wj as gf,Xj as hf,Yj as jf,Zj as kf}from"./chunk-h1tkqfym.js";import{rk as Wq,sk as Xq,tk as Yq,uk as Zq,vk as _q,wk as $q}from"./chunk-tweb2f3m.js";import{Ak as dk,Bk as $l,Ck as am,Dk as bm,Ek as cm,xk as ak,yk as bk,zk as ck}from"./chunk-cjhwpp4c.js";import"./chunk-xtx53xyz.js";import"./chunk-9rgwpt1m.js";import{$l as ac,$m as dd,$o as Pf,$p as Vh,$q as Dj,Al as Ka,Am as Fc,An as Ed,Ao as of,Ap as og,Aq as Di,Bl as La,Bm as Gc,Bn as Fd,Bo as pf,Bp as pg,Bq as Ei,Cl as Ma,Cm as Hc,Cn as Gd,Co as qf,Cp as qg,Cq as Fi,Dl as Na,Dm as Ic,Dn as Hd,Do as rf,Dp as rg,Dq as Gi,El as Oa,Em as Jc,En as Yd,Eo as sf,Ep as sg,Eq as Hi,Fl as ib,Fm as Kc,Fn as Zd,Fo as tf,Fp as tg,Fq as Ii,Gl as jb,Gm as Lc,Gn as _d,Go as uf,Gp as ug,Gq as Ji,Hl as kb,Hn as $d,Ho as vf,Hp as vg,Hq as Ki,Il as lb,Im as Mc,In as ae,Io as wf,Ip as wg,Iq as Li,Jl as mb,Jm as Nc,Jn as be,Jo as xf,Jp as xh,Jq as Mi,Kl as nb,Km as Oc,Kn as ce,Ko as yf,Kp as yh,Kq as bj,Lm as Pc,Ln as de,Lo as zf,Lp as zh,Lq as cj,Mm as Qc,Mn as ee,Mo as Af,Mp as Ah,Mq as dj,Nl as Fb,Nm as Rc,Nn as fe,No as Bf,Np as Bh,Nq as ej,Ol as Gb,Om as Sc,On as ge,Oo as Cf,Op as Ch,Oq as fj,Pl as Hb,Pm as Tc,Pn as he,Po as Df,Pp as Jh,Pq as rj,Ql as Ib,Qm as Uc,Qn as ie,Qo as Ef,Qp as Kh,Qq as sj,Rl as Jb,Rm as Vc,Rn as je,Ro as Ff,Rp as Lh,Rq as tj,Sl as Nb,Sm as Wc,So as Gf,Sp as Mh,Sq as uj,Tl as Ob,Tm as Xc,Tn as ne,To as Hf,Tp as Nh,Tq as vj,Ul as Pb,Um as Yc,Un as oe,Uo as If,Up as Oh,Uq as wj,Vl as Wb,Vm as Zc,Vn as pe,Vo as Jf,Vp as Ph,Vq as xj,Wl as Xb,Wm as _c,Wn as qe,Wo as Kf,Wp as Qh,Wq as yj,Xl as Yb,Xm as $c,Xn as re,Xo as Lf,Xp as Rh,Xq as zj,Yl as Zb,Ym as ad,Yn as se,Yo as Mf,Yp as Sh,Yq as Aj,Zl as _b,Zm as bd,Zn as te,Zo as Nf,Zp as Th,Zq as Bj,_l as $b,_m as cd,_o as Of,_p as Uh,_q as Cj,am as bc,an as ed,ap as Qf,aq as Wh,ar as Ej,bm as cc,bn as fd,bo as Ie,bp as Rf,bq as Xh,br as Fj,cm as dc,cn as gd,co as Je,cp as Sf,cq as Yh,cr as Gj,dm as ec,dn as hd,dp as Tf,dq as Zh,dr as Hj,em as fc,en as id,eo as lf,ep as Uf,eq as hi,er as Kj,fm as gc,fn as jd,fp as Vf,fq as ii,fr as Lj,gm as hc,gn as kd,gp as Wf,gq as ji,gr as Mj,hm as ic,hn as ld,hp as Xf,hq as ki,hr as Nj,im as jc,in as md,ip as Yf,iq as li,ir as Oj,jn as nd,jp as Zf,jq as mi,jr as Pj,kn as od,kp as _f,kq as ni,kr as Qj,lm as kc,ln as pd,lp as $f,lq as oi,lr as Rj,mm as lc,mn as qd,mp as ag,mq as pi,mr as Sj,nl as xa,nm as mc,nn as rd,np as bg,nq as qi,ol as ya,om as nc,on as sd,op as cg,oq as ri,pl as za,pm as oc,pn as td,pp as dg,pq as si,ql as Aa,qm as pc,qn as ud,qp as eg,qq as ti,rl as Ba,rm as qc,rn as vd,rp as fg,rq as ui,sl as Ca,sm as rc,sn as wd,sp as gg,sq as vi,tl as Da,tm as sc,tn as xd,tp as hg,tq as wi,ul as Ea,um as tc,un as yd,up as ig,uq as xi,vl as Fa,vm as uc,vn as zd,vp as jg,vq as yi,wl as Ga,wm as vc,wn as Ad,wo as mf,wp as kg,wq as zi,xl as Ha,xm as wc,xn as Bd,xp as lg,xq as Ai,yl as Ia,ym as xc,yn as Cd,yo as nf,yp as mg,yq as Bi,zl as Ja,zm as yc,zn as Dd,zp as ng,zq as Ci}from"./chunk-tjverybm.js";import{Ar as o,As as ia,Br as p,Bs as ja,Cr as q,Cs as ka,Dr as r,Ds as la,Er as s,Es as ma,Fr as t,Fs as na,Gr as u,Gs as oa,Hr as v,Hs as pa,Ir as w,Is as qa,Jr as x,Js as ra,Kr as y,Ks as sa,Lr as z,Ls as ta,Mr as A,Ms as ua,Nr as B,Ns as va,Or as C,Os as wa,Pr as D,Qr as E,Rr as F,Sr as G,Tr as H,Ur as I,Vr as J,Wr as K,Xr as L,es as M,fs as N,gs as O,hs as P,is as Q,js as R,ks as S,ls as T,ms as U,nr as b,ns as V,or as c,os as W,pr as d,ps as X,qr as e,qs as Y,rr as f,rs as Z,sr as g,ss as _,tr as h,ts as $,ur as i,us as aa,vr as j,vs as ba,wr as k,ws as ca,xr as l,xs as da,yr as m,ys as ea,zr as n,zs as fa}from"./chunk-5g1amf33.js";import{Ps as _h,Qs as $h,Rs as ai,Ss as bi,Ts as ci,Us as di,Vs as ei,Ws as fi,Xs as gi}from"./chunk-0btmm4m2.js";import{Ys as ga,Zs as ha}from"./chunk-6w76w8tt.js";import{$s as Lb,_s as Kb,at as Mb}from"./chunk-7sdvaras.js";import{bt as ke,ct as le,dt as me}from"./chunk-caf2cj4f.js";import{At as Ec,mt as zc,nt as Ac,pt as Bc,yt as Cc,zt as Dc}from"./chunk-br48y7q9.js";import{Bt as Qb,Ct as Rb,Dt as Sb,Et as Tb,Ft as Ub,Gt as Vb}from"./chunk-ja39jznm.js";import{Ht as Id,It as Jd,Jt as Kd,Kt as Ld,Lt as Md,Mt as Nd,Nt as Od,Ot as Pd,Pt as Qd,Qt as Rd,Rt as Sd,St as Td,Tt as Ud,Ut as Vd,Vt as Wd,Wt as Xd}from"./chunk-9s0ax53m.js";import"./chunk-b16crvqg.js";import"./chunk-wxgkq79w.js";import{au as ob,bu as pb,cu as qb,du as rb,eu as sb,fu as tb,gu as ub,hu as vb,iu as wb,ju as xb,ku as yb,lu as zb,mu as Ab,nu as Bb,ou as Cb,pu as Db,qu as Eb}from"./chunk-359ps7j5.js";import{Du as Sa,Eu as Ta,Ku as Ua,Lu as Va,Mu as Wa,Nu as Xa,Ou as Ya,Pu as Za,Qu as _a,Ru as $a,Su as ab,Tu as bb,Uu as cb,Vu as db,Wu as eb,Xu as fb,Yu as gb,_u as hb,uu as Pa,vu as Qa,yu as Ra}from"./chunk-64d20kkv.js";import"./chunk-vkc53tv3.js";import"./chunk-24j0qx2z.js";export{uk as writeNetlifyConfig,lm as writeManifest,Zk as writeImageManifest,Co as wrapComponentForHMR,wr as withDefaults,Hj as webComponentDirectiveHandler,rp as watermark,tq as watchViews,hl as watchMultiple,il as watchEffect,gl as watch,re as warmImagePlaceholders,vl as waitForStore,X as waitForLocale,oo as virtualPathFor,uj as videoDirective,G as validators,Ar as validated,he as validateValueEnhanced,yh as validateTemplate,wp as validateParams,ie as validateFormEnhanced,iq as validateFile,de as validateFields,ce as validateField,Ah as validateDirective,Cd as validateCspDirectives,Pj as validateConfig,qm as validateComponentScripts,Om as validateComponentProps,wg as validateClientScript,vh as v,rc as usesSignalsInScript,ub as usesReactiveRuntime,Nh as userComponentFileExists,bh as useVirtualList,Qd as useTitle,ul as useStoreOrThrow,Uo as useStore,ek as useStorage,Eq as useSlots,gk as useSessionStorage,Nd as useSeoMeta,wl as useRouteParams,yl as useRouteParamOrThrow,xl as useRouteParam,Qd as usePageTitle,Xe as useOptimistic,Al as useMiddlewareValue,zl as useMiddlewareState,fk as useLocalStorage,vo as useLoadingIndicator,Ld as useHead,sh as useForm,Gq as useAttrs,kq as uploadFiles,jq as uploadFile,rl as updateInstance,Ve as untrack,bi as unregisterDirective,sl as unmountInstance,yc as unescapeHtml,ro as typecheckStxFiles,Mh as transpileTypeScript,jr as translate,Ba as transitionDirective,_b as transformAutoImports,Im as toUsers,Hm as toUser,ap as thumbnail,bq as thumbHashToRGBA,cq as thumbHashToDataURL,wb as templateNeedsRuntime,vb as templateHasReactiveContext,_e as templateCache,Uc as syncRecordedResponse,zo as stxClientHelpers,Gf as structuredDataDirective,mr as stripLocalePrefix,Yl as stripDocumentWrapper,Lb as stripCommentsAndLiterals,un as stringToStream,qd as strictCspPreset,Ce as streamingSuspenseDirective,Ge as streamToResponse,Ae as streamTemplateSimple,ue as streamTemplate,$j as stopHmrServer,Em as stopBroadcasting,Tb as stateDirName,Ub as stateDir,Ke as state,qg as startsDocument,Wn as startProductionServer,Kn as startInteractive,Dm as startBroadcasting,or as stampLocaleLayoutGroup,Ia as staggerDirective,up as srcsetUrls,Ja as springDirective,$c as splitByPipe,Ul as spaNavVaryHeaders,po as sourcePathFor,Bp as smartBatchSign,Ph as slotContentHasExpressions,zp as signUrl,Kh as shouldTranspileTypeScript,Yj as shouldReloadOnChange,Ep as shouldRefreshSignature,Zj as shouldIgnoreFile,Vg as shouldCacheComponent,ep as sharpen,Dr as shape,Sb as setStateDir,El as setRouteParams,Fl as setMiddlewareState,qe as setImagePlaceholder,yq as setGlobalProvide,b as setErrorLocale,$k as setCurrentInstance,ij as setCachedVideoResult,Zi as setCachedImageResult,Ti as setCached,Gr as serveStxFile,Ir as serveMultipleStxFiles,Tj as serveMarkdownFile,fo as serveFile,Jr as serveApp,eo as serve,Fo as serializeState,kn as serializeSetCookie,gp as sepia,Od as seoMetaToHeadConfig,Ca as scrollAnimateDirective,va as screenReaderDirective,yj as scopeHTML,xj as scopeCSS,Jf as scanForSitemapEntries,pa as scanA11yTargets,qa as scanA11yIssues,kp as saturation,xp as sanitizeParams,I as sanitizeFilePath,J as sanitizeExpression,K as sanitizeDirectiveParams,H as sanitizeDirectiveParam,L as sanitizeComponentProps,B as safeExecuteAsync,A as safeExecute,Cb as runtimeHandledXAttrsLiteral,zf as runPreProcessingMiddleware,Af as runPostProcessingMiddleware,Nn as runPageAction,Qe as runMountCallbacks,gb as runMiddleware,pl as runHooks,cr as runDoctor,Re as runDestroyCallbacks,Of as runComposers,lp as rotate,wh as rewriteImagesWithSiblings,Vc as responseBindings,Th as resolveTemplatePath,ha as resolveStxTargets,Lj as resolveStxDirectories,ir as resolveI18n,_o as resize,ec as resetPlaceholders,Kd as resetHead,Eo as resetHMRHandler,o as resetErrorConfig,yr as required,ic as replacePlaceholders,rq as renderView,rj as renderVideoComponent,Xb as renderVendorStyleTags,Nq as renderToString,Oq as renderToStream,Pq as renderToDOM,aq as renderThumbhashToCanvas,$q as renderTemplateString,Zq as renderTemplate,_q as renderString,xe as renderStreamingPage,Fh as renderSlot,Lg as renderSSRSuspense,Mp as renderProtectedVideo,Lp as renderProtectedImg,yp as renderMediaUpload,Yq as renderMarkdownView,bm as renderLayoutTypes,bj as renderImgComponent,Pk as renderImageComponent,Sd as renderHtmlAttrs,Rd as renderHead,uq as renderEmail,Rh as renderComponentWithSlot,Td as renderBodyAttrs,Po as render,sd as relaxedCspPreset,be as registerValidationRule,Ee as registerStreamingDirectives,Wo as registerStoresClient,Cl as registerStore,Hf as registerSeoDirectives,_a as registerMiddleware,mc as registerFilters,lc as registerFilter,d as registerErrorMessages,ge as registerEnhancedValidationRule,_h as registerDirective,Bd as registerCspDirectives,Rm as registerComponentDirectives,Oa as registerAnimationDirectives,wa as registerA11yDirectives,dl as ref,Cn as redirect,Qc as recordResponseStatus,Rc as recordResponseHeader,Vb as rebaseOntoStateDir,Sc as readResponseStatus,Tc as readResponseHeaders,Rj as readMarkdownFile,$e as readFileCached,el as reactive,pp as quality,Jp as pruneSignatureCache,Wi as pruneCache,wq as provide,Xq as protectCodeBlocks,xr as prop,Rf as processVueTemplate,$g as processVirtualListDirectives,dh as processVirtualGridDirectives,qj as processVideo,ee as processValidateDirective,ea as processTranslateDirective,Fg as processTransitionDirectives,Ig as processTransitionAttributes,Wd as processTitleDirective,Ic as processTemplateBindings,Bg as processTeleportDirectives,Jg as processSuspenseDirectives,Cf as processStructuredData,ye as processStreamDirectives,Wc as processStatusDirective,qh as processStaticDirectives,xf as processStackReplacements,wf as processStackPushDirectives,Gh as processSlots,Wl as processShell,te as processServerBindings,Df as processSeoDirective,Fe as processSectionDirectives,Uf as processScopedStyles,Gc as processReactiveBindings,Np as processProtectedMedia,jh as processPartialHydrationDirectives,vg as processOnceDirective,yf as processMiddleware,Bf as processMetaDirectives,Xd as processMetaDirective,Sj as processMarkdownFileDirectives,Yh as processMarkdownDirectives,rf as processLoops,Tg as processKeepAliveDirectives,ug as processJsonDirective,ch as processInfiniteListDirectives,vf as processIncludes,dj as processImgComponents,Rk as processImageComponents,Ek as processImage,Vd as processHeadDirective,Zd as processForms,$d as processFormInputDirectives,vc as processExpressions,Ib as processEventDirectives,ae as processErrorDirective,Sf as processDynamicComponents,xh as processDirectives,gi as processDirectiveAttributes,Ag as processDeferDirectives,Gd as processCustomDirectives,yd as processCspDirectives,Er as processComponentProps,dc as processClientScript,_d as processBasicFormDirectives,Og as processAsyncDirectives,Hd as processAppearanceBootstrapDirective,Fa as processAnimationDirectives,ka as processA11yDirectives,me as prepareImageDelivery,T as preloadTranslationsBackground,S as preloadTranslations,uo as preloadIslandHandlers,se as preloadIconCollection,zm as poolStrings,Jj as pluginManager,oe as placeholdersWarmed,Eg as performLeave,Dg as performEnter,Se as pendingLifecycleCounts,We as peek,sf as partialsCache,sj as parseVideoDirectiveOptions,Yo as parseUrl,dq as parseThumbhashString,fd as parseSwitchBlock,Dh as parseSlots,Eh as parseSlotElement,kd as parseScriptDeclarations,Fj as parseSFCComponent,Op as parseProtectedArgs,qf as parseLoopBinding,cj as parseImgComponent,ui as parseImageUrl,Qk as parseImageComponent,Ln as parseFormBody,hd as parseExpressionWithFilters,Sm as parseDefaults,zn as parseCookies,Ol as parseContainerSelector,cd as parseConditionalBlock,id as parseArguments,Ma as parseAnimationShorthand,zr as optional,Am as optimizeTemplate,Wk as optimizeImage,Xk as optimizeDirectory,Br as oneOf,tf as onceStore,ml as onUpdated,Fc as onUpdate,ol as onUnmounted,Jl as onServer,kl as onMounted,Oe as onMount,ph as onHydrated,Cq as onErrorCaptured,Pe as onDestroy,Zg as onDeactivated,Il as onClient,ll as onBeforeUpdate,nl as onBeforeUnmount,jl as onBeforeMount,Yg as onActivated,Yp as observeElement,Dn as notFound,Zf as normalizeCriticalHeadOrder,Bq as nextTick,Vm as negotiateEncoding,Ua as navigateTo,ql as mountInstance,Ea as motionDirective,rd as moderateCspPreset,ym as minifyHtml,Ff as metaDirective,ig as metaDedupKey,Zo as mergeParams,kg as mergeHtmlAttrs,Md as mergeHeadConfigs,Ac as mergeCssConfig,vd as mergeCspDirectives,Ra as matchRoute,Zh as markdownDirectiveHandler,Qj as markdownCache,ga as looksLikeGlob,lr as localizePath,U as loadTranslationLazy,_ as loadTranslation,Mj as loadStxConfig,db as loadMiddlewareFromDirectory,mm as loadManifest,Up as loadElement,Fm as loadChannels,sr as lintStxStrict,Wp as lazyLoadAll,Vp as lazyLoad,Ha as keyframeDirective,Lq as jsxs,Mq as jsxDEV,Kq as jsx,Bn as jsonResponse,De as islandDirective,l as isTest,Zl as isSpaNavigation,Sl as isSpaNavRequest,Cp as isSignatureValid,Te as isSignal,Ck as isSharpAvailable,nn as isServerEnvironment,Gl as isServer,yb as isRuntimeOwnedColonAttr,da as isRtlLocale,j as isProduction,ia as isPresentationalRole,Rp as isNativeLazySupported,Wq as isMarkdownPath,Q as isLoading,R as isLoaded,Jh as isJavaScriptScript,Sp as isIntersectionObserverSupported,Kk as isImageFile,Dk as isImageBackendAvailable,aa as isICUFormat,oh as isHydrated,Oh as isHydrateTrigger,Oc as isHttpStatus,mn as isEdgeEnvironment,tr as isDirectiveKind,k as isDevelopment,Ue as isDerived,Xj as isCssOnlyChange,Um as isCompressible,Hl as isClient,Qg as isAsyncComponent,Mn as isActionableMethod,hp as invert,bf as invalidateFileCacheByDir,af as invalidateFileCache,uc as interpolateScriptsInTemplate,sc as interpolateScriptExpressions,tc as interpolateScriptAttributes,x as inlineError,hr as injectThemeBootstrap,Ef as injectSeoTags,er as injectSeo,lf as injectRouterScript,Wj as injectHotReload,kb as injectHeatmap,Ec as injectCss,wd as injectCspMetaTag,sg as injectConfigHeadTags,Yf as injectColorModeBootScript,mg as injectCloakStyle,dg as injectBuildId,Zb as injectBrowserCoreAutoImports,Kc as injectAnalytics,xq as inject,Bl as initStoreRegistry,xk as initNetlify,wo as initLoadingIndicator,Tp as initLazyLoading,Jn as initFile,$p as initBlurUp,fq as initAllBlurUp,fj as imgDirective,Uk as imageDirective,Un as hydrateTemplateStream,Tn as hydrateTemplate,to as hydrateIslands,lh as hydrateIsland,Vn as hydrateFragment,mh as hydrateByStrategy,nh as hydrateAll,Mo as hydrate,co as htmlResponse,og as hoistLeadingHeadTags,_f as hoistColorModeBootScript,lb as heatmapDirective,Pi as hashString,kf as hashFilePath,Ni as hashFile,Oi as hashBuffer,Qf as hasVueTemplateSyntax,pf as hasVariables,Ro as hasStore,jc as hasPlaceholders,vk as hasNetlifyConfig,ab as hasMiddleware,Jb as hasEventDirectives,rg as hasDocumentShell,Bh as hasDirectives,ma as hasDOMSupport,Nk as handleImageRequest,Dq as handleError,Tq as h,Jk as groupVariantsByFormat,fp as grayscale,Xn as gitHash,sm as getUnusedDirectives,V as getTranslationSync,O as getTranslationCacheStats,W as getTranslationAsync,ba as getTranslation,qk as getTotalSize,Dp as getTimeUntilExpiry,xg as getStoreScript,So as getStoreNames,Qo as getStore,jk as getStorageSize,ik as getStorageKeys,Uh as getSourceLineInfo,Lh as getSharedTranspiler,ff as getServeClientAsset,la as getScreenReaderOnlyStyle,zj as getScopeAttribute,Je as getRouteParams,Ob as getPublicEnvDefine,Pb as getPublicEnv,zh as getPositionInfo,gc as getPlaceholderRegistry,Mi as getPlaceholderCacheStats,Jd as getPageMeta,md as getNonce,Lk as getMimeType,cb as getMiddlewareNames,$a as getMiddleware,ca as getLocaleDirection,P as getLoadingState,Y as getLoadingLocales,ne as getImagePlaceholder,Fk as getImageMetadata,ke as getImageDelivery,Lo as getHydrationRuntime,Dl as getHydratedStoreState,_j as getHmrServer,Id as getHead,Do as getHMRHandler,yi as getFormatExtension,Ri as getFileMtime,Ik as getFallbackVariant,f as getErrorMessage,c as getErrorLocale,n as getErrorConfig,i as getErrorCodeName,ai as getDirectives,$h as getDirective,al as getCurrentInstance,Bc as getCssServeAsset,ud as getCspPreset,Dd as getCspHeaderName,Xh as getComponentCacheStats,hj as getCachedVideoResult,Hp as getCachedSignature,df as getCachedSignalsRuntime,ef as getCachedRouterScript,Ki as getCachedPlaceholder,Yi as getCachedImageResult,Si as getCached,Vi as getCacheStats,bg as getBuildId,Cm as getBroadcastServer,xi as getBestVariant,nc as getAllFilters,li as generateWidthSrcset,ah as generateVirtualListCSS,mq as generateVideoPreview,je as generateValidationScript,nq as generateUploadRuntime,tm as generateTreeShakenBundle,Hg as generateTransitionRuntime,Gg as generateTransitionCSS,lj as generateThumbnails,Di as generateThumbhashPlaceholder,cn as generateTemplatesDocs,Ng as generateSuspenseRuntime,Mg as generateSuspenseCSS,Go as generateStateScript,vi as generateSrcsetData,aj as generateSrcset,Gk as generateSrcSet,mj as generateSpriteSheet,vq as generateSpaShell,wi as generateSourceTags,ri as generateSizesFromBreakpoints,qi as generateSizesAttribute,Hk as generateSizes,If as generateSitemapIndex,fr as generateSitemap,Qp as generateSimpleMediaPicker,Kp as generateSignatureRuntime,Ze as generateSignalsRuntimeDev,Ye as generateSignalsRuntime,cc as generateServerDataBridge,wj as generateScopeId,Gj as generateSFCWebComponent,Gb as generateRuntimeScript,Pa as generateRouteTypes,Qa as generateRouteManifest,Kf as generateRobotsTxt,gr as generateRobots,$i as generateResponsiveVariants,Cj as generateReactiveWebComponentTS,Bj as generateReactiveWebComponent,Ej as generateReactiveRuntime,Dj as generateReactiveMixin,kj as generatePoster,Ji as generatePlaceholderStyle,Ii as generatePlaceholderCSS,Ci as generatePlaceholder,kh as generatePartialHydrationCSS,ld as generateNonce,rk as generateNetlifyToml,pq as generateMinifiedMediaRuntime,oq as generateMediaRuntime,Pp as generateMediaManagerEmbed,km as generateManifest,yo as generateLoadingIndicatorHtml,_p as generateLazyLoadRuntime,cm as generateLayoutTypes,Fi as generateLQIP,Xg as generateKeepAliveRuntime,Wg as generateKeepAliveCSS,rh as generateIslandManifest,lq as generateImagePreview,Yk as generateImageManifest,Ko as generateHydrationScript,He as generateHydrationRuntime,No as generateHydrationCSS,eh as generateHydrationBootstrap,Vj as generateHotReloadScript,jb as generateHeatmapScript,Bo as generateHMRClientScript,nj as generateHLSManifest,Ho as generateEventBindings,pi as generateDprSrcsetWithVariableQuality,oi as generateDprSrcset,pg as generateDocumentShell,hn as generateDocs,dn as generateDirectivesDocs,fi as generateDirectiveRuntime,Lf as generateDefaultRobotsTxt,oj as generateDASHManifest,Dc as generateCss,pd as generateCspMetaTag,od as generateCspHeader,Iq as generateCompositionRuntime,bn as generateComponentsDocs,fh as generateComponentManifest,$m as generateComponentDoc,Hi as generateColorPlaceholder,Xf as generateColorModeBootScript,tl as generateClientRuntime,Qi as generateCacheKey,ac as generateBrowserAutoImportDestructuring,gq as generateBlurUpRuntime,hq as generateBlurUpCSS,Hc as generateBindingsRuntime,mi as generateAutoWidthSrcset,$b as generateAutoImportDestructuring,Sg as generateAsyncComponentRuntime,Rg as generateAsyncComponentCSS,Na as generateAnimationRuntime,La as generateAnimationCSS,Jc as generateAnalyticsScript,so as formatTypecheckDiagnostics,mo as formatTypeErrors,Gn as formatStxContent,pk as formatSize,Ta as formatRoutes,Hn as formatMarkdownContent,g as formatLocalizedError,$ as formatICU,p as formatFilePath,w as formatError,dr as formatDoctorReport,en as formatDocsAsMarkdown,gn as formatDocsAsJson,fn as formatDocsAsHtml,op as format,xm as foldConstants,np as flipVertical,mp as flipHorizontal,dm as fingerprint,qo as findRuntimeTypeDeclarations,br as findPantryPackage,bd as findMatchingEndTag,Zc as findMatchingDelimiter,Kb as findInterpolationEnd,dd as findIfBlocks,gd as findExpressions,Sa as findErrorPage,ed as findDirectiveBlocks,um as findDeadCode,um as findDeadBranches,Pl as findContainerRegion,an as findComponentFiles,Hr as findCommonDir,ok as filterRequiredFiles,Sh as fileExists,mf as extractVariables,im as extractTemplateExpressions,ze as extractStreamBoundaries,Io as extractState,Hh as extractSlotContent,of as extractScriptFromTemplate,hm as extractScriptBlocks,hc as extractPlaceholders,ad as extractParenthesizedExpression,Pc as extractPageResponseStatus,hb as extractLayoutMetadata,Gi as extractDominantColor,jd as extractDirectiveParams,Ch as extractDirectiveNames,_l as extractContainerContent,Zm as extractComponentProps,gh as extractComponentName,_m as extractComponentDescription,Cc as extractClassNames,bc as extractBridgeData,hh as extractBoundProps,_c as extractBalancedExpression,Wb as extractAndStripCssImports,Aj as extractAndScopeStyles,Hb as extractAndProcessEvents,ck as externalizeSharedAssets,dk as externalizeRepeatedAssets,bk as externalizeHtml,xc as evaluateExpression,wm as evaluateConstant,Xc as evaluateAuthExpression,qc as escapeHtmlValue,pc as escapeHtml,C as errorRecovery,E as errorLogger,Cg as ensureTeleportTargets,tg as ensureDocumentShell,fe as enhancedValidationRules,Xm as enableDevTools,vm as eliminateDeadCode,Me as effect,vp as dprUrls,jn as docsCommand,am as discoverLayoutNames,Zp as disconnectObserver,Ym as disableDevTools,F as devHelpers,Vl as detectShell,ln as detectRuntime,sk as detectProjectConfig,zi as detectFormat,pm as detectBuildMode,Le as derived,wk as deploy,Oj as defineStxConfig,Vo as defineStore,Fq as defineSlots,rr as defineSiteConfig,vr as definePropsWithValidation,ur as defineProps,Ij as definePlugin,Pd as definePageMeta,Wa as defineMiddleware,th as defineForm,Aq as defineExpose,zq as defineEmits,ci as defineDirective,Vq as defineCustomElement,Sn as defineConfig,di as defineClientDirective,Pg as defineAsyncComponent,qq as defaultMediaConfig,_k as defaultImageConfig,M as defaultI18nConfig,ib as defaultHeatmapConfig,Yd as defaultFormClasses,kc as defaultFilters,Fd as defaultCspConfig,Kj as defaultConfig,Fr as default,zc as deepMergeThemes,Tf as dedupeScopedStyles,Ei as decodeThumbhash,Ad as cspNonceDirective,zd as cspDirective,eq as crossfadeTransition,$o as crop,_g as createVirtualList,tj as createVideoDirective,xn as createVercelHandler,jo as createTypeChecker,fa as createTranslateFilter,tn as createTextEncoderStream,Uq as createStxApp,sn as createStreamingResponse,Be as createStreamRenderer,To as createStore,Za as createStorageManager,Xa as createServerCookieManager,cl as createScope,Kg as createSSRSuspense,Ie as createRouter,eb as createRouteLocation,ho as createRoute,dl as createRef,el as createReactive,Hq as createProvideContext,Zn as createProject,Rn as createProductionBuild,fc as createPlaceholder,Bm as createOptimizedBuild,yn as createNetlifyHandler,kk as createNetlifyClient,fb as createMiddlewareContext,go as createMiddleware,Xp as createLazyObserver,Ug as createKeepAliveCache,pn as createKVNamespace,ih as createIslandRegistry,ej as createImgDirective,Vk as createImagePlugin,Ok as createImageHandler,Tk as createImageDirective,nb as createHeatmapAggregator,nk as createFileManifest,on as createEnvAccessor,z as createEnhancedError,rn as createEdgeHandler,qn as createEdgeCache,Vh as createDetailedErrorMessage,wn as createDenoHandler,tk as createDefaultNetlifyConfig,Ed as createCspHeaders,An as createCookie,fl as createComputed,bl as createComponentInstance,vn as createCloudflareHandler,Ya as createClientCookieManager,ei as createBuiltinDirectives,Uq as createApp,Ka as createAnimationTimeline,cp as cover,nf as convertToCommonJS,jp as contrast,bp as contain,y as consoleError,m as configureErrorHandling,Nj as config,fl as computed,Wm as compressResponse,Nf as composerPattern,Mf as composer,Xl as composeShellWithPage,Qm as componentDirective,Qh as componentClientSignalNames,jm as compileTemplate,a as collectRepeatedFlag,mk as collectDeployFiles,ng as cloakStyleFragment,jj as clearVideoCache,N as clearTranslationCache,yg as clearStoreCache,hk as clearStorage,Ip as clearSignatureCache,Li as clearPlaceholderCache,uf as clearOnceStore,nd as clearNonce,bb as clearMiddleware,pe as clearImagePlaceholders,le as clearImageDeliveryCatalog,Sk as clearImageCache,e as clearErrorMessages,gf as clearDevCaches,oc as clearCustomFilters,Pf as clearComposers,zg as clearComposableCache,Wh as clearComponentCache,Ui as clearCache,Db as clearBlankCache,xo as cleanupLoadingIndicator,Ml as classifyScript,Nl as classifyAllScripts,ko as checkTemplateFile,lo as checkTemplate,hf as checkCache,Fp as checkAuthAccess,na as checkA11yWithRegex,oa as checkA11y,Lm as channel,Fn as captureScreenshots,En as captureScreenshot,Z as cancelPendingLoads,lk as calculateSha1,ni as calculateOptimalWidths,jf as cacheTemplate,vj as buildWebComponents,no as buildVirtualSource,sq as buildViews,Xo as buildUrl,ve as buildSuspenseResolveScript,qr as buildStaticSite,qb as buildRuntimeGlobalsDestructure,em as buildRuntimeAsset,fm as buildRouterAsset,pr as buildLangPickerScript,ti as buildImageUrl,eg as buildIdFragment,jg as buildHtmlAttrs,nm as buildForProduction,Tm as buildComponentLibrary,Gp as buildAuthParams,om as buildApp,nr as buildAlternateLinks,Qn as build,Jm as broadcastPrivate,Km as broadcastPresence,Gm as broadcast,ip as brightness,Mb as bracketDepths,dp as blur,Eb as blankInertHtmlRegions,Ap as batchSignUrls,Ne as batch,sa as autoFixA11yFile,ta as autoFixA11yDirectory,ra as autoFixA11y,qp as auto,ja as attributeValue,gm as assetTags,Fb as asInvocableStatement,Cr as arrayOf,kr as applyTranslations,_i as applyTransformations,Ih as applySlots,Pm as applyPropDefaults,tp as applyPreset,lg as applyHtmlAttrs,Ud as applyHead,wc as applyFilters,Tl as appendVary,td as apiCspPreset,Da as animationGroupDirective,pj as analyzeVideo,rm as analyzeUsage,Kl as analyzeTemplate,Ll as analyzeProject,rm as analyzeDirectiveUsage,Lc as analyticsDirective,ao as addStore,$n as addPage,xd as addNonceToInlineContent,bo as addLayout,_n as addComponent,On as actionRedirectResponse,Va as abortNavigation,ua as a11yDirective,cf as __setSignalsGeneratorsForTest,cg as __setBuildIdForTest,gj as VideoProcessorCache,uh as Validator,xa as TransitionType,za as TransitionEase,ya as TransitionDirection,Yc as Tokenizer,io as TemplateTypeChecker,In as TEMPLATE_PRESETS,v as StxValidationError,r as StxSyntaxError,t as StxSecurityError,s as StxRuntimeError,u as StxFileError,q as StxError,Qq as Show,we as SUSPENSE_RESOLVER_RUNTIME,ob as STX_RUNTIME_GLOBALS,Yb as STX_AUTO_IMPORTS,Rb as STATE_DIR_ENV_VAR,Ga as SPRING_PRESETS,Ql as SPA_NAV_HEADER,xb as RUNTIME_OWNED_COLON_ATTRS,zb as RUNTIME_HANDLED_X_ATTRS,Mc as RESPONSE_STATUS_KEY,Nc as RESPONSE_HEADERS_KEY,tb as REACTIVE_RUNTIME_GLOBALS,Pn as ProductionBuild,Sq as Portal,Yn as PROJECT_TEMPLATES,sp as PRESETS,sb as NON_CLIENT_PRIMITIVES,Oo as MemorySessionStore,ki as MIME_TYPES,hi as MEDIA_DEFAULT_WIDTHS,ji as MEDIA_DEFAULT_FORMATS,$l as LAYOUT_TYPES_FILE,Xi as ImageProcessorCache,Mk as ImageProcessingError,Jo as HydrationRuntime,Uj as HotReloadServer,mb as HeatmapAggregator,hg as HTML_CLASS_MARKER,gg as HTML_ATTRS_MARKER,Jq as Fragment,Rq as For,Rl as FRAGMENT_CACHE_CONTROL,D as ErrorLogger,h as ErrorCodes,ak as EXTERNALIZED_ASSET_DIR,yk as DeployError,zk as DEFAULT_WIDTHS,Aa as DEFAULT_TRANSITION_OPTIONS,Qb as DEFAULT_STATE_DIR,Bk as DEFAULT_QUALITY,Ai as DEFAULT_PLACEHOLDER_OPTIONS,Ak as DEFAULT_FORMATS,ii as DEFAULT_DPR_VALUES,Ao as ComponentHMRHandler,pb as COMPONENT_SCOPE_LOCAL_GLOBALS,Bb as COMPONENT_PASSTHROUGH_X_ATTRS,rb as COMPILE_TIME_ONLY_GLOBALS,si as COMMON_SIZES,Vf as COLOR_MODE_BOOT_MARKER,Wf as COLOR_MODE_BOOT_GLOBAL,fg as CLOAK_STYLE,Nm as BroadcastServer,Mm as Broadcast,$f as BUILD_ID_META,ag as BUILD_ID_HEADER,Nb as BROWSER_CORE_IMPORTS,Bi as BLUR_UP_CSS,Ab as ALPINE_BRIDGE_X_ATTRS,ar as $path};
|
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
// @bun
|
|
2
|
-
import{Ag as c,Bg as d,Cg as e,Dg as f,Eg as g,Fg as h,Gg as i,Hg as j,Ig as k,Jg as l,yg as a,zg as b}from"./chunk-8bxtvsgm.js";import"./chunk-
|
|
2
|
+
import{Ag as c,Bg as d,Cg as e,Dg as f,Eg as g,Fg as h,Gg as i,Hg as j,Ig as k,Jg as l,yg as a,zg as b}from"./chunk-8bxtvsgm.js";import"./chunk-24j0qx2z.js";export{g as toUsers,f as toUser,c as stopBroadcasting,b as startBroadcasting,d as loadChannels,a as getBroadcastServer,j as channel,h as broadcastPrivate,i as broadcastPresence,e as broadcast,l as BroadcastServer,k as Broadcast};
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
// @bun
|
|
2
|
+
import{$n as c,_n as b,ao as d}from"./chunk-tjverybm.js";import{as as a}from"./chunk-5g1amf33.js";import"./chunk-0btmm4m2.js";import"./chunk-6w76w8tt.js";import"./chunk-7sdvaras.js";import"./chunk-caf2cj4f.js";import"./chunk-br48y7q9.js";import"./chunk-ja39jznm.js";import"./chunk-9s0ax53m.js";import"./chunk-b16crvqg.js";import"./chunk-wxgkq79w.js";import"./chunk-359ps7j5.js";import"./chunk-64d20kkv.js";import"./chunk-vkc53tv3.js";import"./chunk-24j0qx2z.js";export{b as rendersAsElement,c as processESImports,d as processComponents,a as freeIdentifiers};
|
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
// @bun
|
|
2
|
-
import{Ki as a,Li as b,Mi as c,Ni as d,Oi as e,Pi as f,Qi as g}from"./chunk-4vpsvh6x.js";import"./chunk-
|
|
2
|
+
import{Ki as a,Li as b,Mi as c,Ni as d,Oi as e,Pi as f,Qi as g}from"./chunk-4vpsvh6x.js";import"./chunk-24j0qx2z.js";export{c as shouldCacheComponent,a as processKeepAliveDirectives,g as onDeactivated,f as onActivated,e as generateKeepAliveRuntime,d as generateKeepAliveCSS,b as createKeepAliveCache};
|
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
// @bun
|
|
2
|
-
import{Pf as a,Qf as b}from"./chunk-mjpqz66q.js";import"./chunk-
|
|
2
|
+
import{Pf as a,Qf as b}from"./chunk-mjpqz66q.js";import"./chunk-24j0qx2z.js";export{b as captureScreenshots,a as captureScreenshot};
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
// @bun
|
|
2
|
+
import{Yi as a,Zi as b}from"./chunk-rbabq8ds.js";import"./chunk-efr3ejqt.js";import"./chunk-9rgwpt1m.js";import"./chunk-tjverybm.js";import"./chunk-5g1amf33.js";import"./chunk-0btmm4m2.js";import"./chunk-6w76w8tt.js";import"./chunk-7sdvaras.js";import"./chunk-caf2cj4f.js";import"./chunk-br48y7q9.js";import"./chunk-ja39jznm.js";import"./chunk-9s0ax53m.js";import"./chunk-b16crvqg.js";import"./chunk-wxgkq79w.js";import"./chunk-359ps7j5.js";import"./chunk-64d20kkv.js";import"./chunk-vkc53tv3.js";import"./chunk-24j0qx2z.js";export{a as getStoreScript,b as clearStoreCache};
|
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
// @bun
|
|
2
|
-
import{ej as a,fj as b,gj as c,hj as d,ij as e,jj as f,kj as g,lj as h,mj as i,nj as j,oj as k,pj as l,qj as m,rj as n}from"./chunk-
|
|
2
|
+
import{ej as a,fj as b,gj as c,hj as d,ij as e,jj as f,kj as g,lj as h,mj as i,nj as j,oj as k,pj as l,qj as m,rj as n}from"./chunk-hx6y0qqy.js";import"./chunk-tjverybm.js";import"./chunk-5g1amf33.js";import"./chunk-0btmm4m2.js";import"./chunk-6w76w8tt.js";import"./chunk-7sdvaras.js";import"./chunk-caf2cj4f.js";import"./chunk-br48y7q9.js";import"./chunk-ja39jznm.js";import"./chunk-9s0ax53m.js";import"./chunk-b16crvqg.js";import"./chunk-wxgkq79w.js";import"./chunk-359ps7j5.js";import"./chunk-64d20kkv.js";import"./chunk-vkc53tv3.js";import"./chunk-24j0qx2z.js";export{i as streamingSuspenseDirective,m as streamToResponse,g as streamTemplateSimple,a as streamTemplate,d as renderStreamingPage,k as registerStreamingDirectives,e as processStreamDirectives,l as processSectionDirectives,j as islandDirective,n as generateHydrationRuntime,f as extractStreamBoundaries,h as createStreamRenderer,b as buildSuspenseResolveScript,c as SUSPENSE_RESOLVER_RUNTIME};
|
|
@@ -0,0 +1,3 @@
|
|
|
1
|
+
// @bun
|
|
2
|
+
import{Yp as M,aq as x}from"./chunk-tjverybm.js";import{it as T}from"./chunk-br48y7q9.js";import{mv as N}from"./chunk-24j0qx2z.js";import V from"fs";import Z from"path";var y=new Map,W=new Map;async function R(j){let z;for(let J=0;J<3;J++)try{let X=(await V.promises.stat(j)).mtime.getTime(),Q=W.get(j);if(Q&&Q.mtime===X)return Q.content;let Y=await Bun.file(j).text(),K=(await V.promises.stat(j)).mtime.getTime();if(K!==X)continue;return W.set(j,{content:Y,mtime:K}),Y}catch(I){z=I;break}throw W.delete(j),Error(`File not found: ${j}${z?` (${z.message})`:""}`)}function S(j){W.delete(j)}function _(j){for(let B of W.keys())if(B.startsWith(j))W.delete(B)}var q=null,w=null,G=null;function C(j){G=j}async function b(j=!1){let B=G??await import("./chunk-regxa2tq.js");if(j)return B.generateSignalsRuntimeDev();if(q===null)q=B.generateSignalsRuntime();return q}var D=null;async function A(){if(D===null){let{getRouterScript:j}=await import("./chunk-7wnbgnxj.js");D=j()}return D}var L={};async function g(j,B=!1){let z=j==="runtime"?await b(B):await A(),J=j==="runtime"&&B?"runtime-debug":j,I=L[J];if(!I||I.content!==z)I={content:z,hash:Bun.hash(z).toString(16).padStart(16,"0").slice(0,16)},L[J]=I;return{content:z,hash:I.hash,url:`/_stx/${j}.${I.hash}.js`}}function u(){W.clear(),x(),T(),q=null,w=null,D=null}function O(j){let B={debug:j.debug===!0,middleware:(j.middleware??[]).map((z)=>({name:z.name,timing:z.timing,handler:String(z.handler)})),customDirectives:(j.customDirectives??[]).map((z)=>({name:z.name,hasEndTag:z.hasEndTag===!0,handler:String(z.handler)}))};return new Bun.CryptoHasher("sha1").update(JSON.stringify(B)).digest("hex")}async function P(j,B){try{if(!B.cachePath)return null;let z=Z.resolve(B.cachePath),J=Z.join(z,`${U(j)}.html`),I=Z.join(z,`${U(j)}.meta.json`);if(!await M(J)||!await M(I))return null;let X=await Bun.file(I).text(),Q=JSON.parse(X);if(Q.cacheVersion!==B.cacheVersion)return null;if(Q.optionsSignature!==O(B))return null;if((await V.promises.stat(j)).mtime.getTime()>Q.mtime)return null;for(let $ of Q.dependencies)if(await M($)){if((await V.promises.stat($)).mtime.getTime()>Q.mtime)return null}else return null;return await Bun.file(J).text()}catch(z){return console.warn(`Cache error for ${j}:`,z),null}}async function p(j,B,z,J){try{if(!J.cachePath)return;let I=Z.resolve(J.cachePath);await V.promises.mkdir(I,{recursive:!0});let X=Z.join(I,`${U(j)}.html`),Q=Z.join(I,`${U(j)}.meta.json`),Y=await V.promises.stat(j);await Bun.write(X,B);let $={sourcePath:j,mtime:Y.mtime.getTime(),dependencies:Array.from(z),cacheVersion:J.cacheVersion,optionsSignature:O(J),generatedAt:Date.now()};await Bun.write(Q,JSON.stringify($,null,2)),y.set(j,{output:B,mtime:Y.mtime.getTime(),dependencies:z})}catch(I){console.warn(`Failed to cache template ${j}:`,I)}}var v=16;function U(j){return new Bun.CryptoHasher("sha1").update(j).digest("hex").substring(0,v)}
|
|
3
|
+
export{y as Oj,R as Pj,S as Qj,_ as Rj,C as Sj,b as Tj,A as Uj,g as Vj,u as Wj,P as Xj,p as Yj,U as Zj};
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
// @bun
|
|
2
|
-
import{lh as x,qh as B,rh as c,sh as u,th as n}from"./chunk-k78gvm0g.js";import{
|
|
2
|
+
import{lh as x,qh as B,rh as c,sh as u,th as n}from"./chunk-k78gvm0g.js";import{mv as v}from"./chunk-24j0qx2z.js";import{resolve as JJ,basename as WJ,extname as _J,join as LJ}from"path";import{mkdir as QJ}from"fs/promises";var ZJ={enabled:!0,directory:".stx/media-cache",maxAge:30,maxSize:2000,cacheTranscoded:!0,cacheThumbnails:!0,cacheManifests:!0};class V{config;constructor(K={}){this.config={...ZJ,...K}}async get(K,J){return c(K,J,"video",this.config)}async set(K,J,X){return u(K,J,X,"video",this.config)}async clear(){return n("video",this.config)}updateConfig(K){this.config={...this.config,...K}}}var S=null;function D(K){if(!S)S=new V(K);else if(K)S.updateConfig(K);return S}async function q(K,J,X){let N=X?{directory:`${X.outputDir}/../.cache`}:{};return D(N).get(K,J)}async function b(K,J,X,N){let Z=N?{directory:`${N.outputDir}/../.cache`}:{};return D(Z).set(K,J,X)}async function $J(){return D().clear()}import{resolve as y,basename as P,extname as f,join as U}from"path";import{mkdir as g}from"fs/promises";async function m(){try{return await import("ts-videos")}catch{return null}}async function h(K,J,X,N){let Z=await m();if(!Z)return console.warn("[stx-media] ts-videos not installed, cannot generate poster"),null;try{let $=y(K);if(!await B($))return null;await g(X,{recursive:!0});let Y=await x($),z=P(K,f(K)),G=J.format||"webp",M=J.timestamp||0,E=`${z}-poster-${Y}.${G}`,W=U(X,E),Q=await Z.extractThumbnails($,{timestamps:[M],width:J.width||1280,height:J.height,format:G,quality:J.quality||85,outputDir:X,outputPattern:E.replace(`.${G}`,"")});if(Q&&Q.length>0){let _=Q[0];return{path:W,url:`${N}/${E}`,width:_.width||J.width||1280,height:_.height||720,timestamp:M,size:_.size||0}}return null}catch($){return console.warn(`[stx-media] Failed to generate poster: ${$}`),null}}async function d(K,J,X,N){let Z=await m();if(!Z)return[];try{let $=y(K);if(!await B($))return[];await g(X,{recursive:!0});let Y=await x($),z=P(K,f(K)),G=J.format||"webp",W=(await new Z.Input($).getInfo()).duration||60,Q=J.count||10,_=J.interval||W/Q,O=[];for(let w=0;w<Q&&w*_<W;w++)O.push(w*_);let L=await Z.extractThumbnails($,{timestamps:O,width:J.width||320,format:G,quality:J.quality||80,outputDir:X,outputPattern:`${z}-thumb-${Y}`});if(L&&L.length>0)return L.map((w,j)=>({path:w.path||U(X,`${z}-thumb-${Y}-${j}.${G}`),url:`${N}/${z}-thumb-${Y}-${j}.${G}`,width:w.width||J.width||320,height:w.height||180,timestamp:O[j],size:w.size||0}));return[]}catch($){return console.warn(`[stx-media] Failed to generate thumbnails: ${$}`),[]}}async function zJ(K,J,X,N){let Z=await m();if(!Z)return console.warn("[stx-media] ts-videos not installed, cannot generate sprite sheet"),null;try{let $=y(K);if(!await B($))return null;await g(X,{recursive:!0});let Y=await x($),z=P(K,f(K)),E=(await new Z.Input($).getInfo()).duration||60,W=J.columns||10,Q=J.interval||5,_=J.thumbnailWidth||160,O=J.thumbnailHeight||90,L=J.format||"jpeg",w=Math.ceil(E/Q),j=Math.ceil(w/W),F=`${z}-sprite-${Y}.${L}`,k=U(X,F),T=[];for(let I=0;I<w;I++)T.push(I*Q);let A=await Z.extractThumbnails($,{timestamps:T,width:_,height:O,format:L,quality:J.quality||70,outputDir:U(X,".temp")});if(!A||A.length===0)return null;try{let I=await import("ts-images"),H=W*_,kJ=j*O,jJ=await I.createSprite({images:A.map((YJ)=>YJ.path),columns:W,padding:0,outputPath:k,format:L,quality:J.quality||70});return{url:`${N}/${F}`,path:k,columns:W,rows:j,thumbnailWidth:_,thumbnailHeight:O,interval:Q,totalFrames:w}}catch{return console.warn("[stx-media] ts-images not installed, sprite sheet generation skipped"),null}}catch($){return console.warn(`[stx-media] Failed to generate sprite sheet: ${$}`),null}}import{resolve as r,basename as e,extname as i,join as C}from"path";import{mkdir as R,writeFile as o}from"fs/promises";async function t(){try{return await import("ts-videos")}catch{return null}}var s=[{label:"1080p",width:1920,height:1080,bitrate:5000000,audioBitrate:192000},{label:"720p",width:1280,height:720,bitrate:2500000,audioBitrate:128000},{label:"480p",width:854,height:480,bitrate:1e6,audioBitrate:96000},{label:"360p",width:640,height:360,bitrate:600000,audioBitrate:64000}];async function p(K,J,X,N,Z){let $=await t();if(!$)return console.warn("[stx-media] ts-videos not installed, cannot generate HLS manifest"),null;try{let Y=r(K);if(!await B(Y))return null;let z=await x(Y),G=e(K,i(K)),M=C(X,`${G}-${z}-hls`);await R(M,{recursive:!0});let E=J.length>0?J:s,W=Z?.segmentDuration||6,O=(await new $.Input(Y).getInfo()).duration||0,L=[],w=0;for(let k of E){let T=C(M,k.label);await R(T,{recursive:!0});let A=`${k.label}.m3u8`,I=C(T,A);try{let H=await $.generateHLS(Y,{outputDir:T,segmentDuration:W,width:k.width,height:k.height,videoBitrate:k.bitrate,audioBitrate:k.audioBitrate,playlistName:k.label});if(H)L.push({quality:k,url:`${N}/${G}-${z}-hls/${k.label}/${A}`,path:I}),w+=H.segmentCount||Math.ceil(O/W)}catch(H){console.warn(`[stx-media] Failed to generate HLS for ${k.label}: ${H}`)}}if(L.length===0)return null;let j=C(M,"master.m3u8"),F=GJ(L,N,G,z);return await o(j,F),{manifestUrl:`${N}/${G}-${z}-hls/master.m3u8`,manifestPath:j,playlists:L,segmentCount:w,duration:O}}catch(Y){return console.warn(`[stx-media] Failed to generate HLS manifest: ${Y}`),null}}function GJ(K,J,X,N){let Z=["#EXTM3U","#EXT-X-VERSION:3"];for(let $ of K){let{quality:Y}=$,z=Y.bitrate+(Y.audioBitrate||128000),G=`${Y.width}x${Y.height||Math.round(Y.width*9/16)}`;Z.push(`#EXT-X-STREAM-INF:BANDWIDTH=${z},RESOLUTION=${G},NAME="${Y.label}"`,`${Y.label}/${Y.label}.m3u8`)}return Z.join(`
|
|
3
3
|
`)}async function l(K,J,X,N,Z){let $=await t();if(!$)return console.warn("[stx-media] ts-videos not installed, cannot generate DASH manifest"),null;try{let Y=r(K);if(!await B(Y))return null;let z=await x(Y),G=e(K,i(K)),M=C(X,`${G}-${z}-dash`);await R(M,{recursive:!0});let E=J.length>0?J:s,W=Z?.segmentDuration||4,Q=Z?.minBufferTime||2,L=(await new $.Input(Y).getInfo()).duration||0,w=[],j=[];for(let A of E){let I=C(M,A.label);await R(I,{recursive:!0});try{if(await $.generateDASH(Y,{outputDir:I,segmentDuration:W,width:A.width,height:A.height,videoBitrate:A.bitrate,audioBitrate:A.audioBitrate})){if(w.push({bandwidth:A.bitrate,width:A.width,height:A.height||Math.round(A.width*9/16),url:`${N}/${G}-${z}-dash/${A.label}/video`}),A.audioBitrate)j.push({bandwidth:A.audioBitrate,url:`${N}/${G}-${z}-dash/${A.label}/audio`})}}catch(H){console.warn(`[stx-media] Failed to generate DASH for ${A.label}: ${H}`)}}if(w.length===0)return null;let F=C(M,"manifest.mpd"),k=NJ(w,j,L,W,Q);await o(F,k);let T=[{type:"video",representations:w}];if(j.length>0)T.push({type:"audio",representations:j});return{manifestUrl:`${N}/${G}-${z}-dash/manifest.mpd`,manifestPath:F,adaptationSets:T,duration:L}}catch(Y){return console.warn(`[stx-media] Failed to generate DASH manifest: ${Y}`),null}}function NJ(K,J,X,N,Z){let $=a(X),Y=a(Z),z=`<?xml version="1.0" encoding="UTF-8"?>
|
|
4
4
|
<MPD xmlns="urn:mpeg:dash:schema:mpd:2011"
|
|
5
5
|
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
// @bun
|
|
2
|
-
import{
|
|
2
|
+
import{jv as W,kv as k,lv as G}from"./chunk-24j0qx2z.js";import A from"fs";import B from"path";function h(j){let q=0;for(let K=0;K<j.length;K++){let Q=j[K];q=(q<<5)-q+Q,q=q&q}return Math.abs(q).toString(16).padStart(8,"0")}function u(j,q){let K=B.basename(j);for(let Q of q)if(Q.startsWith("*.")){let Y=Q.slice(1);if(K.endsWith(Y))return!0}else if(Q.includes("*")){let Y=new RegExp(`^${Q.replace(/\*/g,".*")}$`);if(Y.test(K)||Y.test(j))return!0}else if(K===Q||j.includes(Q))return!0;return!1}function f(j,q,K){let Q=B.extname(j).toLowerCase(),Y=l[Q],X=(K.maxFileSizeKB||500)*1024;if(q>X)return!1;if(K.exclude&&u(j,K.exclude))return!1;if(K.include&&K.include.length>0){for(let Z of K.include)if(Z.startsWith("*.")){if(j.endsWith(Z.slice(1)))return!0}else if(j.includes(Z))return!0}if(Y&&K[Y]===!0)return!0;if(!Y)return!1;return!1}function T(j,q,K,Q){let Y=A.readdirSync(j,{withFileTypes:!0});for(let X of Y){let Z=B.join(j,X.name);if(X.isDirectory()){if(["node_modules",".git",".stx"].includes(X.name))continue;T(Z,q,K,Q)}else if(X.isFile()){let O=A.statSync(Z),_=B.relative(q,Z);if(f(_,O.size,K)){let $=A.readFileSync(Z),L=h($),V=`/${_.replace(/\\/g,"/")}`;Q.push({url:V,revision:L,size:O.size})}}}}function U(j,q){let K=q.pwa?.precache,Q=[];if(!K?.enabled)return{entries:[],totalSize:0,fileCount:0};if(!A.existsSync(j))return{entries:[],totalSize:0,fileCount:0};T(j,j,K,Q),Q.sort((X,Z)=>X.url.localeCompare(Z.url));let Y=Q.reduce((X,Z)=>X+Z.size,0);return{entries:Q,totalSize:Y,fileCount:Q.length}}function J(j){if(j.entries.length===0)return"[]";return`[
|
|
3
3
|
${j.entries.map((K)=>` { url: '${K.url}', revision: '${K.revision}' }`).join(`,
|
|
4
4
|
`)}
|
|
5
5
|
]`}function E(j){if(j<1024)return`${j} B`;if(j<1048576)return`${(j/1024).toFixed(1)} KB`;return`${(j/1048576).toFixed(2)} MB`}var l;var F=G(()=>{l={".html":"includeHtml",".htm":"includeHtml",".js":"includeJs",".mjs":"includeJs",".css":"includeCss",".png":"includeImages",".jpg":"includeImages",".jpeg":"includeImages",".gif":"includeImages",".webp":"includeImages",".svg":"includeImages",".ico":"includeImages",".woff":"includeFonts",".woff2":"includeFonts",".ttf":"includeFonts",".eot":"includeFonts",".otf":"includeFonts"}});function g(j){let q={"cache-first":{className:"CacheFirst",importFrom:"workbox-strategies"},"network-first":{className:"NetworkFirst",importFrom:"workbox-strategies"},"stale-while-revalidate":{className:"StaleWhileRevalidate",importFrom:"workbox-strategies"},"network-only":{className:"NetworkOnly",importFrom:"workbox-strategies"},"cache-only":{className:"CacheOnly",importFrom:"workbox-strategies"}};return q[j]||q["network-first"]}function R(j){return g(j).className}function M(j){let q=j.pwa;if(!q?.enabled)return"";let K=q.routes||[],Q=q.cacheStorage,Y=[];for(let X of K){let Z=R(X.strategy),O=[];if(X.maxAgeSeconds||X.maxEntries||Q?.maxEntries){let $=X.maxEntries||Q?.maxEntries||100,L=X.maxAgeSeconds||(Q?.maxAge?Q.maxAge*24*60*60:void 0);O.push(`new ExpirationPlugin({
|
|
@@ -1191,4 +1191,4 @@ if ('serviceWorker' in navigator) {
|
|
|
1191
1191
|
});
|
|
1192
1192
|
}
|
|
1193
1193
|
</script>`}function Vj(){return'<link rel="manifest" href="/manifest.json">'}function Aj(j){return`<meta name="theme-color" content="${N(j)}">`}function N(j){return j.replace(/&/g,"&").replace(/</g,"<").replace(/>/g,">").replace(/"/g,""").replace(/'/g,"'")}
|
|
1194
|
-
export{U as
|
|
1194
|
+
export{U as Nk,J as Ok,E as Pk,F as Qk,w as Rk,z as Sk,y as Tk,qj as Uk,H as Vk,I as Wk,Lj as Xk,Uj as Yk,Vj as Zk,Aj as _k};
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
// @bun
|
|
2
|
-
import{$e as K5,_e as _$}from"./chunk-
|
|
2
|
+
import{$e as K5,_e as _$}from"./chunk-9mzj4q5k.js";import{Yf as y7,ag as U$,bg as q6,dg as Z1,eg as y6,fg as Q5,gg as B$,hg as L$,ig as v6,jg as g6}from"./chunk-d2rhtvxx.js";import{Aj as p5,Cj as c5,vj as u1,wj as O1,xj as H1,yj as m$,zj as p$}from"./chunk-fed3xsp9.js";import{Xj as Y$,Yj as J$}from"./chunk-h1tkqfym.js";import{Ak as f5,zk as g5}from"./chunk-cjhwpp4c.js";import{Gk as l7,Hk as i7}from"./chunk-xtx53xyz.js";import{$k as Q1}from"./chunk-9rgwpt1m.js";import{Eo as m0,Hm as x6,Jp as O0,Lm as Z5,Om as N1,Pm as M1,Sn as Z$,Tq as G$,Xp as Q6,Yp as E1,aq as p0,bo as X5,cm as b7,do as S6,eo as z6,er as E$,fp as g7,gr as d0,hr as M0,lr as V0,mp as P6,np as b6,qm as u0,wo as j0}from"./chunk-tjverybm.js";import{$r as X6,Er as s$,Gr as n$,Jr as l1,Nr as o$,Qr as Q$,Rr as F6,tr as c1,wr as L6}from"./chunk-5g1amf33.js";import{At as o,gt as t$,ot as B,vt as W$,wt as K$}from"./chunk-br48y7q9.js";import{Ft as S0}from"./chunk-ja39jznm.js";import{Du as V6,Eu as E6,Tu as R6,Uu as I6,Vu as D6,Wu as w6,Xu as T6,Yu as C6,_u as k6,cv as A6,yu as $5,zu as H6}from"./chunk-64d20kkv.js";import{mv as p}from"./chunk-24j0qx2z.js";var l5={read:($)=>{try{return JSON.parse($)}catch{return $}},write:($)=>{return JSON.stringify($)}};function e7($,X,Q={}){let{storage:Z="local",serializer:Y=l5,mergeDefaults:J=!1,listenToStorageChanges:G=!0}=Q,W=new Set,K=typeof window<"u",_=()=>{if(!K)return null;return Z==="session"?sessionStorage:localStorage},U=()=>{let L=_();if(!L)return X;try{let H=L.getItem($);if(H===null)return X;let q=Y.read(H);if(J&&typeof X==="object"&&X!==null)return{...X,...q};return q}catch{return X}},F=(L)=>{let H=_();if(!H)return;try{if(L===null||L===void 0)H.removeItem($);else H.setItem($,Y.write(L))}catch(q){console.warn(`[useStorage] Failed to write key "${$}":`,q)}},z=U(),j=(L,H)=>{for(let q of W)try{q(L,H)}catch(A){console.error("[useStorage] Subscriber error:",A)}};if(K&&G){let L=(q)=>{if(q.key===$&&q.storageArea===_()){let A=z;try{z=q.newValue?Y.read(q.newValue):X}catch(N){console.warn(`[useStorage] Failed to read key "${$}" from a cross-tab update:`,N);return}j(z,A)}};window.addEventListener("storage",L);let H=globalThis.onDestroy;if(typeof H==="function")H(()=>window.removeEventListener("storage",L))}let O={get value(){return z},set value(L){let H=z;z=L,F(L),j(L,H)},get:()=>z,set:(L)=>{O.value=L},remove:()=>{let L=_();if(L){L.removeItem($);let H=z;z=X,j(X,H)}},subscribe:(L)=>{return W.add(L),L(z,void 0),()=>W.delete(L)}};return O}function i5($,X,Q,Z,Y={}){let{serializer:J=l5,mergeDefaults:G=!1,listenToStorageChanges:W=!0}=Y,K=typeof window<"u",_=()=>{if(!K)return null;return $==="session"?sessionStorage:localStorage},U=(j)=>{if(j===null||j===void 0)return Z;try{let O=J.read(j);if(G&&typeof Z==="object"&&Z!==null)return{...Z,...O};return O}catch(O){return console.warn(`[${X}] Failed to read key "${Q}":`,O),Z}},z=p5((()=>{let j=_();if(!j)return Z;try{return U(j.getItem(Q))}catch(O){return console.warn(`[${X}] Cannot read "${Q}":`,O),Z}})());if(c5(()=>{let j=z(),O=_();if(!O)return;try{if(j===null||j===void 0)O.removeItem(Q);else O.setItem(Q,J.write(j))}catch(L){console.warn(`[${X}] Cannot persist "${Q}":`,L)}}),K&&W){let j=(L)=>{if(L.key!==Q)return;if(L.storageArea&&L.storageArea!==_())return;z.set(U(L.newValue))};window.addEventListener("storage",j);let O=globalThis.onDestroy;if(typeof O==="function")O(()=>window.removeEventListener("storage",j))}return z}function $3($,X,Q){return i5("local","useLocalStorage",$,X,Q)}function X3($,X,Q){return i5("session","useSessionStorage",$,X,Q)}function Q3($="local"){if(typeof window>"u")return;($==="session"?sessionStorage:localStorage).clear()}function Z3($="local"){if(typeof window>"u")return[];let X=$==="session"?sessionStorage:localStorage;return Object.keys(X)}function Y3($="local"){if(typeof window>"u")return 0;let X=$==="session"?sessionStorage:localStorage,Q=0;for(let Z in X)if(Object.prototype.hasOwnProperty.call(X,Z))Q+=(Z.length+(X.getItem(Z)?.length||0))*2;return Q}var l=null;function d1($,X,Q=new WeakSet){if(Object.is($,X))return!0;if(typeof $!=="object"||typeof X!=="object"||$===null||X===null)return!1;if(Q.has($))return!0;if(Q.add($),$ instanceof Date&&X instanceof Date)return $.getTime()===X.getTime();if($ instanceof RegExp&&X instanceof RegExp)return $.source===X.source&&$.flags===X.flags;if(Array.isArray($)){if(!Array.isArray(X)||$.length!==X.length)return!1;for(let J=0;J<$.length;J++)if(!d1($[J],X[J],Q))return!1;return!0}if(Array.isArray(X))return!1;if($ instanceof Map){if(!(X instanceof Map)||$.size!==X.size)return!1;for(let[J,G]of $)if(!X.has(J)||!d1(G,X.get(J),Q))return!1;return!0}if(X instanceof Map)return!1;if($ instanceof Set){if(!(X instanceof Set)||$.size!==X.size)return!1;for(let J of $)if(!X.has(J))return!1;return!0}if(X instanceof Set)return!1;let Z=Object.keys($),Y=Object.keys(X);if(Z.length!==Y.length)return!1;for(let J of Z){if(!Object.prototype.hasOwnProperty.call(X,J))return!1;if(!d1($[J],X[J],Q))return!1}return!0}function KJ($){l=$}function _J(){return l}function UJ(){return{isMounted:!1,isUnmounted:!1,hooks:{beforeMount:[],mounted:[],beforeUpdate:[],updated:[],beforeUnmount:[],unmounted:[]},effects:[],scope:J3()}}function J3(){return{refs:new Map,effects:new Set,cleanups:[]}}function BJ($){let X=new Set,Q=new Set,Z=$,Y=Symbol("ref"),J={get value(){let G=u1();if(G)Q.add(G);return Z},set value(G){if(!Object.is(G,Z)){let W=Z;Z=G;for(let K of X)K(G,W);for(let K of Q)if(m$())p$(K);else K()}},subscribe(G){return X.add(G),()=>{X.delete(G)}}};if(l)l.scope.refs.set(Y,J);return J}var a5=new WeakMap;function G3($){let X=a5.get($);if(X)return X;let Q=new Map,Z=(G)=>{let W=Q.get(G);if(!W)return;for(let K of[...W])if(m$())p$(K);else K()},Y=(G,W)=>{if(!Q.has(G))Q.set(G,new Set);return Q.get(G).add(W),()=>{Q.get(G)?.delete(W)}},J=new Proxy($,{get(G,W,K){let _=Reflect.get(G,W,K),U=u1();if(U)Y(W,U);if(_!==null&&typeof _==="object"&&!Array.isArray(_)){let F=Object.getPrototypeOf(_);if(F===Object.prototype||F===null)return G3(_)}return _},set(G,W,K,_){let U=Reflect.get(G,W,_),F=Reflect.set(G,W,K,_);if(!Object.is(K,U))Z(W);return F},deleteProperty(G,W){let K=Reflect.deleteProperty(G,W);return Z(W),K}});return a5.set($,J),J}function LJ($){let X,Q=!0,Z=new Set,Y=new Set,J=()=>{Q=!0,G()},G=()=>{if(Q){let K=X,_=O1(J);if(X=$(),H1(_),Q=!1,!Object.is(X,K)){for(let U of Z)U(X,K);for(let U of Y)U()}}},W=O1(J);return X=$(),Q=!1,H1(W),{get value(){let K=u1();if(K)Y.add(K);return G(),X},set value(K){console.warn("[stx] Computed properties are readonly")},subscribe(K){return Z.add(K),()=>{Z.delete(K)}}}}function W3($){if(typeof requestAnimationFrame==="function"){requestAnimationFrame(()=>{requestAnimationFrame($)});return}setTimeout($,0)}function FJ($,X,Q={}){let{immediate:Z=!1,deep:Y=!1,flush:J="post"}=Q,G,W,K=!1,_=()=>{if(K)return;let O=j();if((Y?!d1(O,G):!Object.is(O,G))||Z)if(X(O,G),Y&&O!==null&&typeof O==="object")try{G=structuredClone(O)}catch{G=O}else G=O},U=(O)=>{if(J==="sync")O();else if(J==="pre")Promise.resolve().then(O);else W3(O)},F=!1,z=()=>{if(K||F)return;F=!0,U(()=>{F=!1,_()})},j=()=>{if(typeof $==="function"){let O=O1(z);try{return $()}finally{H1(O)}}return $.value};if(typeof $!=="function"){let O=$.subscribe(()=>{U(_)});W=()=>{K=!0,O()}}else W=()=>{K=!0};if(G=j(),Z)U(_);if(l)l.scope.cleanups.push(()=>W?.());return()=>W?.()}function zJ($,X,Q={}){let Z=[],Y=$.map((J)=>J.value);for(let J of $){let G=J.subscribe(()=>{let W=$.map((K)=>K.value);X(W,Y),Y=[...W]});Z.push(G)}if(Q.immediate){let J=$.map((G)=>G.value);X(J,Y)}return()=>{for(let J of Z)J()}}function jJ($){let X,Q=!1,Z=()=>{if(Q)return;if(X)X();let Y=O1(Z);X=$(),H1(Y)};if(Z(),l)l.scope.cleanups.push(()=>{if(Q=!0,X)X()});return()=>{if(Q=!0,X)X()}}function OJ($){if(l)l.hooks.beforeMount.push($);else console.warn("[stx] onBeforeMount called outside of component setup")}function HJ($){if(l)l.hooks.mounted.push($);else console.warn("[stx] onMounted called outside of component setup")}function AJ($){if(l)l.hooks.beforeUpdate.push($);else console.warn("[stx] onBeforeUpdate called outside of component setup")}function qJ($){if(l)l.hooks.updated.push($);else console.warn("[stx] onUpdated called outside of component setup")}function NJ($){if(l)l.hooks.beforeUnmount.push($);else console.warn("[stx] onBeforeUnmount called outside of component setup")}function MJ($){if(l)l.hooks.unmounted.push($);else console.warn("[stx] onUnmounted called outside of component setup")}async function n0($,X){let Q=$.hooks[X];for(let Z of Q)await Z()}async function VJ($){await n0($,"beforeMount"),$.isMounted=!0,await n0($,"mounted")}async function EJ($){if(!$.isMounted||$.isUnmounted)return;await n0($,"beforeUpdate"),await n0($,"updated")}async function RJ($){if($.isUnmounted)return;await n0($,"beforeUnmount");for(let X of $.scope.cleanups)X();$.isUnmounted=!0,await n0($,"unmounted")}function IJ(){return`
|
|
3
3
|
<script data-stx-client-runtime>
|
|
4
4
|
(function() {
|
|
5
5
|
'use strict';
|
|
@@ -685,7 +685,7 @@ else {
|
|
|
685
685
|
<span class="frontmatter-label">${X}:</span>
|
|
686
686
|
<span>${Array.isArray(Q)?Q.join(", "):String(Q)}</span>
|
|
687
687
|
</div>`).join("")}
|
|
688
|
-
</div>`}import U6 from"net";async function J4($){return new Promise((X)=>{let Q=U6.createServer();Q.once("error",()=>X(!1)),Q.once("listening",()=>{Q.close(()=>X(!0))}),Q.listen($,"0.0.0.0")})}async function G4($){return new Promise((X)=>{let Q=U6.createServer();Q.once("error",()=>X(!1)),Q.once("listening",()=>{Q.close(()=>X(!0))}),Q.listen($,"::")})}async function W4($){if(!await J4($))return!1;return await G4($)}async function k0($,X=20){$=Number($);for(let Q=0;Q<X;Q++){let Z=$+Q;if(await W4(Z))return Z}throw Error(`Could not find an available port between ${$} and ${$+X-1}`)}var K4={title:"stx Development",width:1400,height:900,darkMode:!0,hotReload:!0,titlebarHidden:!1,nativeSidebar:!1,sidebarWidth:260,sidebarConfig:void 0};async function _4(){try{let $=await import("./chunk-
|
|
688
|
+
</div>`}import U6 from"net";async function J4($){return new Promise((X)=>{let Q=U6.createServer();Q.once("error",()=>X(!1)),Q.once("listening",()=>{Q.close(()=>X(!0))}),Q.listen($,"0.0.0.0")})}async function G4($){return new Promise((X)=>{let Q=U6.createServer();Q.once("error",()=>X(!1)),Q.once("listening",()=>{Q.close(()=>X(!0))}),Q.listen($,"::")})}async function W4($){if(!await J4($))return!1;return await G4($)}async function k0($,X=20){$=Number($);for(let Q=0;Q<X;Q++){let Z=$+Q;if(await W4(Z))return Z}throw Error(`Could not find an available port between ${$} and ${$+X-1}`)}var K4={title:"stx Development",width:1400,height:900,darkMode:!0,hotReload:!0,titlebarHidden:!1,nativeSidebar:!1,sidebarWidth:260,sidebarConfig:void 0};async function _4(){try{let $=await import("./chunk-n0hgshd5.js");if(typeof $.openDevWindow!=="function")return null;return $}catch{return null}}async function t0($,X={}){let Q={...K4,...X},Z=await _4();if(!Z)return console.log(`${B.yellow}\u26A0${B.reset} Native window requested, but @stacksjs/desktop is not available.`),console.log(" Install & build the desktop package to enable --native."),!1;try{let Y=await Z.openDevWindow($,{title:Q.title,width:Q.width,height:Q.height,darkMode:Q.darkMode,hotReload:Q.hotReload,titlebarHidden:Q.titlebarHidden,nativeSidebar:Q.nativeSidebar,sidebarWidth:Q.sidebarWidth,sidebarConfig:Q.sidebarConfig});if(Y&&Q.nativeSidebar)console.log(`${B.green}\u2713${B.reset} Native sidebar enabled (macOS Tahoe style)`);return Y}catch(Y){return console.log(`${B.red}\u2717${B.reset} Could not open native window:`,Y),!1}}function o1($){if($.match(/<Sidebar[\s\S]*?variant=["'](?:tahoe|vibrancy|desktop)["'][\s\S]*?\/>/i)){let Y=$.match(/<script\s+server[^>]*>([\s\S]*?)<\/script>/i);if(Y){let J=Y[1];try{let G=`
|
|
689
689
|
${J}
|
|
690
690
|
return typeof sidebarConfig !== 'undefined' ? sidebarConfig : null;
|
|
691
691
|
`,K=Function(G)();if(K)return K}catch(G){console.warn("Invalid sidebarConfig:",G)}}return{sections:[]}}let Q=$.match(/@nativeSidebar\s*\(\s*(\{[\s\S]*?\})\s*\)/m);if(Q)try{return JSON.parse(Q[1])}catch{console.warn("Invalid @nativeSidebar configuration")}let Z=$.match(/<script\s+native-sidebar[^>]*>([\s\S]*?)<\/script>/i);if(Z)try{let Y=Z[1].match(/(?:export\s+(?:default\s+)?|const\s+\w+\s*=\s*)(\{[\s\S]*\})/m);if(Y)return Function(`return ${Y[1]}`)()}catch(Y){console.warn("Invalid native-sidebar script configuration:",Y)}return}function i$(){console.log(`
|
|
@@ -1057,7 +1057,7 @@ else {
|
|
|
1057
1057
|
};
|
|
1058
1058
|
})();
|
|
1059
1059
|
</script>
|
|
1060
|
-
`}function D0($,X,Q={}){let Z=j4(X,Q),Y=$.lastIndexOf("</body>");if(Y!==-1)return $.slice(0,Y)+Z+$.slice(Y);if($.includes("</html>"))return $.replace("</html>",`${Z}</html>`);return $+Z}function t1($){let X=$.toLowerCase();return X.endsWith(".css")||X.endsWith(".scss")||X.endsWith(".sass")||X.endsWith(".less")}function e1($){let X=$.toLowerCase();return[".stx",".html",".htm",".md",".js",".ts",".jsx",".tsx",".json"].some((Z)=>X.endsWith(Z))}function $$($){return[/^\./,/node_modules/,/\.stx\/output/,/\.stx\/cache/,/~$/,/\.swp$/,/\.swo$/].some((Q)=>Q.test($))}var $1=null;function X$($){if(!$1)$1=new B6($);return $1}function A1(){if($1)$1.stop(),$1=null}import q1 from"path";var X1={name:"bun-plugin-stx",async setup($){let Q={...await d0(),...$.config?.stx},Z=new Set,Y=Q.webComponents?.enabled?`./${q1.relative(q1.dirname($.config?.outdir||"dist"),Q.webComponents.outputDir||"dist/web-components")}`:"/web-components",J=[];if(Q.webComponents?.enabled)try{let G=await G$(Q,Z);if(J.push(...G),Q.debug&&G.length>0)console.log(`Successfully built ${G.length} web components`)}catch(G){console.error("Failed to build web components:",G)}$.onLoad({filter:/\.stx$/},async({path:G})=>{try{let W=new Set;if(Q.cache&&Q.cachePath){let L=await Y$(G,Q);if(L){if(Q.debug)console.log(`Using cached version of ${G}`);return{contents:L,loader:"html"}}}let K=await o$(()=>Bun.file(G).text(),"",(L)=>{throw new n$(`Failed to read stx file: ${G}`,G,void 0,void 0,`File read error: ${L.message}`)});if(!K)throw new n$(`stx file is empty: ${G}`,G);let{scriptContent:_,templateContent:U,allScripts:F}=t$.time("script-extraction",()=>{let L=K,H=Z$(K);if(H)L=H.content.trim();let q=K.match(/<script\b[^>]*>[\s\S]*?<\/script>/gi)||[],A="",N=[];for(let M of q){let R=M.match(/<script\b[^>]*>([\s\S]*?)<\/script>/i)?.[1]||"",w=M.match(/<script\b([^>]*)>/i),C=w?w[1]:"";if(/\bserver\b/i.test(C))A=R;else N.push(M)}let V=L.replace(/<script\b[^>]*>[\s\S]*?<\/script>/gi,"");return{scriptContent:A,templateContent:V,allScripts:N}}),z={__filename:G,__dirname:q1.dirname(G),__stx:{webComponentsPath:Y,builtComponents:J}};await o$(()=>j0(_,z,G),void 0,(L)=>{let H=new s$(`Script execution failed in ${G}: ${L.message}`,G,void 0,void 0,_.substring(0,100));if(Q$.log(H,{filePath:G,scriptContent:_}),Q.debug)throw H});let O=await t$.timeAsync("directive-processing",async()=>{return await O0(U,z,G,Q,W)});if(F.length>0){let{interpolateScriptsInTemplate:L}=await import("./chunk-
|
|
1060
|
+
`}function D0($,X,Q={}){let Z=j4(X,Q),Y=$.lastIndexOf("</body>");if(Y!==-1)return $.slice(0,Y)+Z+$.slice(Y);if($.includes("</html>"))return $.replace("</html>",`${Z}</html>`);return $+Z}function t1($){let X=$.toLowerCase();return X.endsWith(".css")||X.endsWith(".scss")||X.endsWith(".sass")||X.endsWith(".less")}function e1($){let X=$.toLowerCase();return[".stx",".html",".htm",".md",".js",".ts",".jsx",".tsx",".json"].some((Z)=>X.endsWith(Z))}function $$($){return[/^\./,/node_modules/,/\.stx\/output/,/\.stx\/cache/,/~$/,/\.swp$/,/\.swo$/].some((Q)=>Q.test($))}var $1=null;function X$($){if(!$1)$1=new B6($);return $1}function A1(){if($1)$1.stop(),$1=null}import q1 from"path";var X1={name:"bun-plugin-stx",async setup($){let Q={...await d0(),...$.config?.stx},Z=new Set,Y=Q.webComponents?.enabled?`./${q1.relative(q1.dirname($.config?.outdir||"dist"),Q.webComponents.outputDir||"dist/web-components")}`:"/web-components",J=[];if(Q.webComponents?.enabled)try{let G=await G$(Q,Z);if(J.push(...G),Q.debug&&G.length>0)console.log(`Successfully built ${G.length} web components`)}catch(G){console.error("Failed to build web components:",G)}$.onLoad({filter:/\.stx$/},async({path:G})=>{try{let W=new Set;if(Q.cache&&Q.cachePath){let L=await Y$(G,Q);if(L){if(Q.debug)console.log(`Using cached version of ${G}`);return{contents:L,loader:"html"}}}let K=await o$(()=>Bun.file(G).text(),"",(L)=>{throw new n$(`Failed to read stx file: ${G}`,G,void 0,void 0,`File read error: ${L.message}`)});if(!K)throw new n$(`stx file is empty: ${G}`,G);let{scriptContent:_,templateContent:U,allScripts:F}=t$.time("script-extraction",()=>{let L=K,H=Z$(K);if(H)L=H.content.trim();let q=K.match(/<script\b[^>]*>[\s\S]*?<\/script>/gi)||[],A="",N=[];for(let M of q){let R=M.match(/<script\b[^>]*>([\s\S]*?)<\/script>/i)?.[1]||"",w=M.match(/<script\b([^>]*)>/i),C=w?w[1]:"";if(/\bserver\b/i.test(C))A=R;else N.push(M)}let V=L.replace(/<script\b[^>]*>[\s\S]*?<\/script>/gi,"");return{scriptContent:A,templateContent:V,allScripts:N}}),z={__filename:G,__dirname:q1.dirname(G),__stx:{webComponentsPath:Y,builtComponents:J}};await o$(()=>j0(_,z,G),void 0,(L)=>{let H=new s$(`Script execution failed in ${G}: ${L.message}`,G,void 0,void 0,_.substring(0,100));if(Q$.log(H,{filePath:G,scriptContent:_}),Q.debug)throw H});let O=await t$.timeAsync("directive-processing",async()=>{return await O0(U,z,G,Q,W)});if(F.length>0){let{interpolateScriptsInTemplate:L}=await import("./chunk-1pwcgb1t.js"),H=L(F.join(`
|
|
1061
1061
|
`),z),q=O.search(/<\/body>/i);if(q!==-1)O=O.slice(0,q)+H+`
|
|
1062
1062
|
`+O.slice(q);else O+=`
|
|
1063
1063
|
${H}`}if(O=await z6(O),W.forEach((L)=>Z.add(L)),Q.cache&&Q.cachePath){if(await J$(G,O,W,Q),Q.debug)console.log(`Cached template ${G} with ${W.size} dependencies`)}return{contents:O,loader:"html"}}catch(W){let K=W instanceof Error?W:new s$(`Plugin processing failed: ${String(W)}`,G);if(Q$.log(K,{filePath:G,buildConfig:$.config}),F6.logDetailedError(K,{filePath:G,plugin:"bun-plugin-stx"}),Q.debug)console.error("stx Plugin Error:",K);let _=K,U=_.line||null,F=_.context||null;return{contents:Q.debug||L6()?`<!DOCTYPE html>
|
|
@@ -1120,7 +1120,7 @@ ${H}`}if(O=await z6(O),W.forEach((L)=>Z.add(L)),Q.cache&&Q.cachePath){if(await J
|
|
|
1120
1120
|
<h1>Something went wrong</h1>
|
|
1121
1121
|
<p>An internal error occurred. Please try again later.</p>
|
|
1122
1122
|
</body>
|
|
1123
|
-
</html>`,loader:"html"}}})}};async function H4($,X={}){let Q=X.port||3000,Z=X.watch!==!1,Y=X.hotReload!==!1&&Z,J=null,G=X.hmrPort||Q+1,W=Y0.resolve($);if(!H0.existsSync(W))return console.error(`${B.red}Error: File not found: ${B.bright}${W}${B.reset}`),!1;if(W.endsWith(".md"))return r$(W,X);else if(!W.endsWith(".stx"))return console.error(`${B.red}Error: Unsupported file type: ${B.bright}${W}${B.reset}. Only .stx and .md files are supported.`),!1;let K=S0(process.cwd(),"output");H0.mkdirSync(K,{recursive:!0}),console.log(`${B.blue}Building ${B.bright}${$}${B.reset}...`);let _=null,U=async()=>{try{let A={name:"public-assets",setup(R){R.onResolve({filter:/^\/(images|fonts|assets|public)\//},(w)=>{return{path:w.path,external:!0}})}},N=await Bun.build({entrypoints:[W],outdir:K,plugins:[A,X1],publicPath:"/",define:{"process.env.NODE_ENV":'"development"'},...X.stxOptions});if(!N.success)return console.error(`${B.red}Build failed:${B.reset}`,N.logs),!1;let V=N.outputs.find((R)=>R.path.endsWith(".html"));if(!V)return console.error(`${B.red}No HTML output found${B.reset}`),!1;return _=await Bun.file(V.path).text(),!0}catch(A){return console.error(`${B.red}Error building stx file:${B.reset}`,A),!1}};if(!await U())return!1;let z=Y0.dirname(W);await W$(z);let j=Q;try{if(j=await k0(Q),j!==Q)console.log(`${B.yellow}Port ${Q} is busy, using port ${j} instead${B.reset}`)}catch{return console.error(`${B.red}Could not find an available port${B.reset}`),!1}if(Y){let A=X.hmrPort||j+1;J=X$({wsPort:A,verbose:!1}),G=J.start(A)}let O={},L=null;try{let{loadStxConfig:A}=await import("./chunk-
|
|
1123
|
+
</html>`,loader:"html"}}})}};async function H4($,X={}){let Q=X.port||3000,Z=X.watch!==!1,Y=X.hotReload!==!1&&Z,J=null,G=X.hmrPort||Q+1,W=Y0.resolve($);if(!H0.existsSync(W))return console.error(`${B.red}Error: File not found: ${B.bright}${W}${B.reset}`),!1;if(W.endsWith(".md"))return r$(W,X);else if(!W.endsWith(".stx"))return console.error(`${B.red}Error: Unsupported file type: ${B.bright}${W}${B.reset}. Only .stx and .md files are supported.`),!1;let K=S0(process.cwd(),"output");H0.mkdirSync(K,{recursive:!0}),console.log(`${B.blue}Building ${B.bright}${$}${B.reset}...`);let _=null,U=async()=>{try{let A={name:"public-assets",setup(R){R.onResolve({filter:/^\/(images|fonts|assets|public)\//},(w)=>{return{path:w.path,external:!0}})}},N=await Bun.build({entrypoints:[W],outdir:K,plugins:[A,X1],publicPath:"/",define:{"process.env.NODE_ENV":'"development"'},...X.stxOptions});if(!N.success)return console.error(`${B.red}Build failed:${B.reset}`,N.logs),!1;let V=N.outputs.find((R)=>R.path.endsWith(".html"));if(!V)return console.error(`${B.red}No HTML output found${B.reset}`),!1;return _=await Bun.file(V.path).text(),!0}catch(A){return console.error(`${B.red}Error building stx file:${B.reset}`,A),!1}};if(!await U())return!1;let z=Y0.dirname(W);await W$(z);let j=Q;try{if(j=await k0(Q),j!==Q)console.log(`${B.yellow}Port ${Q} is busy, using port ${j} instead${B.reset}`)}catch{return console.error(`${B.red}Could not find an available port${B.reset}`),!1}if(Y){let A=X.hmrPort||j+1;J=X$({wsPort:A,verbose:!1}),G=J.start(A)}let O={},L=null;try{let{loadStxConfig:A}=await import("./chunk-dfcsn711.js"),N=await A();if(N?.apiRouter)L=N?.apiRouter,console.log(`${B.blue}Using custom router for API handling${B.reset}`);if(N?.apiRoutes){O=N.apiRoutes;let V=Object.keys(O).length;if(V>0)console.log(`${B.blue}Loaded ${B.bright}${V} API route${V>1?"s":""}${B.reset}`)}if(N?.broadcasting?.enabled)try{let{startBroadcasting:V,loadChannels:M}=await import("./chunk-dxevp6w7.js"),R=N.broadcasting;await V(R);let w=R.port??6001;console.log(`${B.magenta}Broadcasting on ${B.cyan}ws://localhost:${w}/ws${B.reset}`);let C=Y0.join(process.cwd(),"channels.ts");if(H0.existsSync(C))try{let I=await M(C);console.log(`${B.blue}Loaded ${B.bright}${I} broadcast channel${I!==1?"s":""}${B.blue} from channels.ts${B.reset}`)}catch(I){console.warn(`${B.yellow}Failed to load channels.ts: ${I.message}${B.reset}`)}}catch(V){console.warn(`${B.yellow}Broadcasting failed to start: ${V.message}${B.reset}`)}}catch{}if(console.log(`${B.blue}Starting server on ${B.cyan}http://localhost:${j}/${B.reset}...`),Y)console.log(`${B.magenta}Hot reload enabled on ws://localhost:${G}${B.reset}`);let H=O4({port:j,async fetch(A){return _$(A,await(async()=>{let N=new URL(A.url);if(L)try{let C=await L.handleRequest(A);if(C.status!==404)return C}catch{}if(O[N.pathname])try{return await O[N.pathname](A)}catch(C){return new Response(JSON.stringify({error:C.message}),{status:500,headers:{"Content-Type":"application/json"}})}if(N.pathname==="/")return(async()=>{let I=await o(_||"");if(Y)I=D0(I,G);if(X.native)if(I.includes("<head>"))I=I.replace("<head>","<head><style>[data-stx-sidebar],.stx-sidebar{display:none!important}</style><script>window.__craftNativeSidebar=true;document.documentElement.classList.add('has-native-sidebar')</script>");else if(I.includes("<html"))I=I.replace(/(<html[^>]*>)/,"$1<head><style>[data-stx-sidebar],.stx-sidebar{display:none!important}</style><script>window.__craftNativeSidebar=true;document.documentElement.classList.add('has-native-sidebar')</script></head>");else I="<head><style>[data-stx-sidebar],.stx-sidebar{display:none!important}</style><script>window.__craftNativeSidebar=true;document.documentElement.classList.add('has-native-sidebar')</script></head>"+I;if(X.titlebarHidden)if(I.includes("<head>"))I=I.replace("<head>","<head><style>html.stx-titlebar-hidden .stx-traffic-lights-dot{visibility:hidden}</style><script>document.documentElement.classList.add('stx-titlebar-hidden')</script>");else if(I.includes("<html"))I=I.replace(/(<html[^>]*>)/,"$1<head><style>html.stx-titlebar-hidden .stx-traffic-lights-dot{visibility:hidden}</style><script>document.documentElement.classList.add('stx-titlebar-hidden')</script></head>");else I=`<head><style>html.stx-titlebar-hidden .stx-traffic-lights-dot{visibility:hidden}</style><script>document.documentElement.classList.add('stx-titlebar-hidden')</script></head>${I}`;return I})().then((I)=>new Response(I,{headers:{"Content-Type":"text/html","Cache-Control":"no-store, no-cache, must-revalidate",Pragma:"no-cache",Expires:"0"}}));let V=Y0.join(K,N.pathname);if(H0.existsSync(V)&&H0.statSync(V).isFile()){let C=Bun.file(V),I=Y0.extname(V).toLowerCase(),E="text/plain";if(I===".ts"||I===".tsx"){let h=new Bun.Transpiler({loader:I===".tsx"?"tsx":"ts"}),u=await C.text(),t=h.transformSync(u);return new Response(t,{headers:{"Content-Type":"application/javascript","Cache-Control":"no-store, no-cache, must-revalidate",Pragma:"no-cache",Expires:"0"}})}switch(I){case".html":E="text/html";break;case".css":E="text/css";break;case".js":E="text/javascript";break;case".json":E="application/json";break;case".png":E="image/png";break;case".jpg":case".jpeg":E="image/jpeg";break;case".gif":E="image/gif";break;case".woff":E="font/woff";break;case".woff2":E="font/woff2";break;case".ttf":E="font/ttf";break;case".otf":E="font/otf";break;case".eot":E="application/vnd.ms-fontobject";break}return new Response(C,{headers:{"Content-Type":E}})}let M=Y0.dirname(W),R=Y0.join(M,N.pathname);if(H0.existsSync(R)&&H0.statSync(R).isFile()){let C=Bun.file(R),I=Y0.extname(R).toLowerCase(),E="text/plain";if(I===".ts"||I===".tsx"){let h=new Bun.Transpiler({loader:I===".tsx"?"tsx":"ts"}),u=await C.text(),t=h.transformSync(u);return new Response(t,{headers:{"Content-Type":"application/javascript","Cache-Control":"no-store, no-cache, must-revalidate",Pragma:"no-cache",Expires:"0"}})}switch(I){case".html":E="text/html";break;case".css":E="text/css";break;case".js":E="text/javascript";break;case".json":E="application/json";break;case".png":E="image/png";break;case".jpg":case".jpeg":E="image/jpeg";break;case".gif":E="image/gif";break;case".svg":E="image/svg+xml";break;case".ico":E="image/x-icon";break;case".woff":E="font/woff";break;case".woff2":E="font/woff2";break;case".ttf":E="font/ttf";break;case".otf":E="font/otf";break;case".eot":E="application/vnd.ms-fontobject";break}return new Response(C,{headers:{"Content-Type":E}})}let w=Y0.join(process.cwd(),"public",N.pathname);if(H0.existsSync(w)&&H0.statSync(w).isFile()){let C=Bun.file(w),I=Y0.extname(w).toLowerCase(),E="application/octet-stream";if(I===".ts"||I===".tsx"){let h=new Bun.Transpiler({loader:I===".tsx"?"tsx":"ts"}),u=await C.text(),t=h.transformSync(u);return new Response(t,{headers:{"Content-Type":"application/javascript","Cache-Control":"no-store, no-cache, must-revalidate",Pragma:"no-cache",Expires:"0"}})}switch(I){case".html":E="text/html";break;case".css":E="text/css";break;case".js":E="text/javascript";break;case".json":E="application/json";break;case".png":E="image/png";break;case".jpg":case".jpeg":E="image/jpeg";break;case".gif":E="image/gif";break;case".svg":E="image/svg+xml";break;case".ico":E="image/x-icon";break;case".woff":E="font/woff";break;case".woff2":E="font/woff2";break;case".ttf":E="font/ttf";break;case".otf":E="font/otf";break;case".eot":E="application/vnd.ms-fontobject";break}return new Response(C,{headers:{"Content-Type":E}})}return new Response("Not Found",{status:404})})())},error(A){return new Response(`<pre>${A}
|
|
1124
1124
|
${A.stack}</pre>`,{headers:{"Content-Type":"text/html"}})}});console.clear(),console.log(`
|
|
1125
1125
|
${B.blue}stx${B.reset} ${B.green}${process.env.stx_VERSION||"v0.0.10"}${B.reset} ${B.dim}ready in ${Math.random()*10+5|0}.${Math.random()*90+10|0} ms${B.reset}`),console.log(`
|
|
1126
1126
|
${B.bright}\u2192 ${B.cyan}http://localhost:${j}/${B.reset}`),console.log(`
|
|
@@ -1607,12 +1607,12 @@ ${O.stack}</pre>`,{headers:{"Content-Type":"text/html"}})}});console.clear(),con
|
|
|
1607
1607
|
${B.blue}stx${B.reset} ${B.green}${process.env.stx_VERSION||"v0.0.10"}${B.reset} ${B.dim}ready in ${Math.random()*10+5|0}.${Math.random()*90+10|0} ms${B.reset}`),console.log(`
|
|
1608
1608
|
${B.bright}\u2192 ${B.cyan}http://localhost:${U}/${B.reset}`),console.log(`
|
|
1609
1609
|
${B.yellow}Routes:${B.reset}`);let z=new Set(W.map((O)=>O.routeTemplate)),j=Object.entries(G).filter(([O])=>!z.has(O)).sort(([O],[L])=>O.localeCompare(L)).map(([O,L])=>({route:O==="/"?"/":O,filePath:Q0.relative(process.cwd(),L.filePath),fileType:L.fileType}));for(let O of W){let L=O.routeTemplate.replace(/\[([^\]]+)\]/g,":$1");j.push({route:L,filePath:Q0.relative(process.cwd(),O.filePath),fileType:"stx"})}if(j.sort((O,L)=>O.route.localeCompare(L.route)),j.forEach((O,L)=>{let q=L===j.length-1?"\u2514\u2500 ":"\u251C\u2500 ",A=O.fileType==="md"?`${B.magenta}(markdown)${B.reset}`:"";console.log(` ${B.green}${q}${O.route}${B.reset} \u2192 ${B.bright}${O.filePath}${B.reset} ${A}`)}),console.log(`
|
|
1610
|
-
Press ${B.cyan}h${B.reset} + ${B.cyan}Enter${B.reset} to show shortcuts`),x0(F.url.toString(),()=>{if(Z)P0.watch(J,{recursive:!0}).close();F.stop()}),Z){console.log(`${B.blue}Watching for changes...${B.reset}`);let O=P0.watch(J,{recursive:!0},async(L,H)=>{if(!H)return;if(H.endsWith(".stx")||H.endsWith(".js")||H.endsWith(".ts")||H.endsWith(".md"))console.log(`${B.yellow}File ${B.bright}${H}${B.yellow} changed, rebuilding...${B.reset}`),m0.clear(),p0(),await K()});process.on("SIGINT",()=>{O.close(),F.stop(),process.exit(0)})}return!0}function O6($){return String($??"").replace(/&/g,"&").replace(/</g,"<").replace(/>/g,">")}var{serve:N4}=globalThis.Bun;import J0 from"fs";import g from"path";async function M6($){try{return Z5(await Bun.file($).text())}catch{return}}function e$($){let X=Bun.file($),Q=g.extname($).toLowerCase(),Z={".html":"text/html",".css":"text/css",".js":"text/javascript",".json":"application/json",".png":"image/png",".jpg":"image/jpeg",".jpeg":"image/jpeg",".gif":"image/gif",".svg":"image/svg+xml",".ico":"image/x-icon",".woff":"font/woff",".woff2":"font/woff2",".ttf":"font/ttf",".otf":"font/otf",".eot":"application/vnd.ms-fontobject"},J=[".js",".css",".json"].includes(Q)?{"Cache-Control":"no-store, no-cache, must-revalidate",Pragma:"no-cache",Expires:"0"}:{};return new Response(X,{headers:{"Content-Type":Z[Q]||"application/octet-stream",...J}})}async function M4($=".",X={}){let Q=X.port||3000,Z=X.watch!==!1,Y=X.hotReload!==!1&&Z,J=null,G=X.hmrPort||Q+1,W=g.resolve($),{loadStxConfig:K}=await import("./chunk-208m2e5n.js"),_=await K(W),U=_.root&&_.root!=="."?g.join(W,_.root):W,F=X.pagesDir||_.pagesDir||"pages",z=g.join(U,F);if(!J0.existsSync(z))return console.error(`${B.red}Error: No '${F}' directory found${B.reset}`),console.log(`${B.dim}Looked in: ${B.bright}${z}${B.reset}`),console.log(`${B.dim}Run stx dev from the app directory, pass it as an argument (stx dev <dir>),${B.reset}`),console.log(`${B.dim}point at another directory with --pages <dir>, or set pagesDir in stx.config.ts.${B.reset}`),console.log(`${B.dim}Starting fresh? Create ${F}/index.stx for the homepage.${B.reset}`),!1;let j=X5(U,{pagesDir:F});if(j.length===0)return console.error(`${B.red}Error: No page files found in ${B.bright}${z}${B.reset}`),!1;console.log(`${B.blue}Found ${B.bright}${j.length}${B.blue} routes${B.reset}`);let O=_?._pluginPageDirs||[],L=[];for(let{dir:D,prefix:T}of O)if(J0.existsSync(D)){let x=X5(g.dirname(D),{pagesDir:g.basename(D)});for(let S of x){let b=T==="/"?S.pattern:`${T}${S.pattern==="/"?"":S.pattern}`;L.push({route:{...S,pattern:b},prefix:T})}if(x.length>0)console.log(`${B.blue}Plugin pages: ${B.bright}${x.length}${B.blue} routes at ${B.cyan}${T}${B.reset}`)}let H=new Map,q=null,A=null;if(X.stxOptions?.shell!==!1){if(A=await y6(W,X.stxOptions?.shell),A){if(q=await Q5(A,X.stxOptions||{}),q)console.log(`${B.blue}Using app shell: ${B.bright}${g.relative(W,A)}${B.reset} ${B.dim}(deprecated: use layouts/default.stx instead)${B.reset}`)}}R6(),await D6(W);let N=I6();if(N.length>0)console.log(`${B.blue}Loaded ${B.bright}${N.length}${B.blue} middleware: ${B.dim}${N.join(", ")}${B.reset}`);let V={},M=null;try{let{loadStxConfig:D}=await import("./chunk-208m2e5n.js"),T=await D(W);if(T?.apiRouter)M=T?.apiRouter,console.log(`${B.blue}Using custom router for API handling${B.reset}`);if(T?.apiRoutes){V=T.apiRoutes;let x=Object.keys(V).length;if(x>0)console.log(`${B.blue}Loaded ${B.bright}${x} API route${x>1?"s":""}${B.reset}`)}if(T?.broadcasting?.enabled)try{let{startBroadcasting:x,loadChannels:S}=await import("./chunk-e4gbq08h.js"),b=T.broadcasting;await x(b);let _0=b.port??6001;console.log(`${B.magenta}Broadcasting on ${B.cyan}ws://localhost:${_0}/ws${B.reset}`);let K0=g.join(process.cwd(),"channels.ts");if(J0.existsSync(K0))try{let C0=await S(K0);console.log(`${B.blue}Loaded ${B.bright}${C0} broadcast channel${C0!==1?"s":""}${B.blue} from channels.ts${B.reset}`)}catch(C0){console.warn(`${B.yellow}Failed to load channels.ts: ${C0.message}${B.reset}`)}}catch(x){console.warn(`${B.yellow}Broadcasting failed to start: ${x.message}${B.reset}`)}}catch{}let R=S0(W,"output");J0.mkdirSync(R,{recursive:!0});let w=new Map,C=new Set,I=async(D)=>{let T=V6(z,D);if(!T)return null;try{let x=await Bun.build({entrypoints:[T],outdir:R,plugins:[X1],publicPath:"/",define:{"process.env.NODE_ENV":'"development"'},...X.stxOptions});if(!x.success)return null;let S=x.outputs.find((b)=>b.path.endsWith(".html"));if(!S)return null;return await Bun.file(S.path).text()}catch{return null}},E=new Map,h=async(D,T)=>{try{let{processDirectives:x,extractVariables:S,defaultConfig:b,loadStxConfig:_0,injectRouterScript:K0}=await import("./chunk-208m2e5n.js"),{checkCache:C0,cacheTemplate:u$,readFileCached:r,templateCache:f1}=await import("./chunk-rwaqb3bs.js"),h1=await _0(W),k=(d)=>{if(!d)return d;if(g.isAbsolute(d))return d;return g.resolve(W,d)},y={...b,...h1,...X.stxOptions,autoShell:!0};if(X.debugDirectives)y.debug=!0;y.partialsDir=k(y.partialsDir),y.componentsDir=k(y.componentsDir),y.layoutsDir=k(y.layoutsDir),y.storesDir=k(y.storesDir||"stores"),y.cachePath=k(y.cachePath)??S0(W,"cache");let m=!T&&!X.profile,c=y.cache!==!1;if(c&&m){let d=f1.get(D.filePath);if(d)try{if((await J0.promises.stat(D.filePath)).mtime.getTime()<=d.mtime){let z0=!0;for(let $0 of d.dependencies){if(!J0.existsSync($0)){z0=!1;break}if((await J0.promises.stat($0)).mtime.getTime()>d.mtime){z0=!1;break}}if(z0){let $0=d.output;if(q)$0=L$($0,{preserveHead:!0});let j1=E.get(D.filePath);return{route:D,content:$0,status:j1?.status??await M6(D.filePath),headers:j1?.headers}}}}catch{}let L0=await C0(D.filePath,y);if(L0){let F0=L0;if(q)F0=L$(F0,{preserveHead:!0});let z0=E.get(D.filePath);return{route:D,content:F0,status:z0?.status??await M6(D.filePath),headers:z0?.headers}}}let s=c?await r(D.filePath):await Bun.file(D.filePath).text(),v=Z5(s),{classifyAllScripts:U0}=await import("./chunk-208m2e5n.js"),B0=U0(s),a=B0.server.map((d)=>d.content),e=s;for(let d of B0.server)e=e.replace(d.fullTag,"");let n={__filename:D.filePath,__dirname:g.dirname(D.filePath),params:T??{},__stx_runtime_head:{}};for(let d of a)try{await S(d,n,D.filePath)}catch(L0){if(X.stxOptions?.debug)console.error("[stx] variable extraction error",D.filePath,L0?.message||L0)}let r0=new Set,N0;if(X.profile){let d=performance.now();N0=await x(e,n,D.filePath,y,r0);let L0=performance.now()-d,F0=g.relative(W,D.filePath)||D.filePath;console.log(`[stx:profile] ${F0} \u2192 ${L0.toFixed(2)}ms`)}else N0=await x(e,n,D.filePath,y,r0);if(!q)N0=await K0(N0,{router:y.router});{let{interpolateScriptExpressions:d}=await import("./chunk-6exjvza5.js");N0=N0.replace(/<script\b([^>]*)>([\s\S]*?)<\/script>/g,(L0,F0,z0)=>{if(!/function\s+__stx_setup_/.test(z0))return L0;return`<script${F0}>${d(z0,n)}</script>`})}if(q)N0=L$(N0,{preserveHead:!0});if(c&&m)await u$(D.filePath,N0,r0,y);let{extractStreamBoundaries:t7}=await import("./chunk-a540pndz.js"),s0=t7(n),z1=n.__streamTemplates;if(z1&&typeof z1==="object"&&Object.keys(z1).length>0){let d=n.streamBoundaries||{},L0={...y,autoShell:!1},F0=Object.keys(z1).map(($0)=>({id:$0,render:async()=>{let j1=typeof d[$0]==="function"?await d[$0]():void 0;return x(z1[$0],{...n,$boundary:j1},D.filePath,L0,new Set)}})),z0=new Set(F0.map(($0)=>$0.id));s0=[...(s0||[]).filter(($0)=>!z0.has($0.id)),...F0]}if(s0&&s0.length>0)C.add(D.pattern);else s0=void 0;let u5=N1(n),m5=M1(n);if(m)E.set(D.filePath,{status:u5,headers:m5});return{route:D,content:N0,status:u5??v,headers:m5,boundaries:s0}}catch(x){return console.error(`${B.red}Error building ${B.bright}${D.pattern}${B.reset}:`,x),null}},u=8,t=async()=>{w.clear(),H.clear();for(let D=0;D<j.length;D+=u){let T=j.slice(D,D+u),x=await Promise.all(T.map((S)=>h(S)));for(let S of x)if(S)w.set(S.route.pattern,S)}for(let D=0;D<L.length;D+=u){let T=L.slice(D,D+u),x=await Promise.all(T.map(({route:S})=>h(S)));for(let S of x)if(S)H.set(S.route.pattern,S)}return w.size>0};if(console.log(`${B.blue}Building pages...${B.reset}`),!await t())return console.error(`${B.red}No pages were successfully built${B.reset}`),!1;await W$(W);let W0=Q;try{if(W0=await k0(Q),W0!==Q)console.log(`${B.yellow}Port ${Q} is busy, using port ${W0} instead${B.reset}`)}catch{return console.error(`${B.red}Could not find an available port${B.reset}`),!1}if(Y){let D=X.hmrPort||W0+1;J=X$({wsPort:D,verbose:!1}),G=J.start(D)}let v1=(D,T)=>{let S=`<script data-stx-route-params>(function(){var p=${JSON.stringify(T).replace(/</g,"\\u003C").replace(/\u2028/g,"\\u2028").replace(/\u2029/g,"\\u2029")};window.__stx_rp=p;if(window.stx){window.stx._rp=p;if(window.stx.setRouteParams)window.stx.setRouteParams(p)}})()</script>`;if(D.includes("</head>"))return D.replace("</head>",`${S}</head>`);if(D.includes("<body"))return D.replace(/<body([^>]*)>/,`<body$1>${S}`);return S+D};console.log(`${B.blue}Starting server...${B.reset}`);let g1=N4({port:W0,async fetch(D){let T=new URL(D.url),x=_?.publicDir||"public",S=g.join(W,x,T.pathname),b=g.join(W,T.pathname),_0=g.join(R,T.pathname),[K0,C0,u$]=await Promise.all([J0.promises.stat(S).catch(()=>null),J0.promises.stat(b).catch(()=>null),J0.promises.stat(_0).catch(()=>null)]);if(K0?.isFile())return e$(S);if(C0?.isFile())return e$(b);if(u$?.isFile())return e$(_0);if(T.pathname.startsWith("/_stx/component/")){let k=decodeURIComponent(T.pathname.slice(16));if(k)try{let y=`<${k} />`,m={...buildConfig,autoShell:!1},c=await processDirectives(y,{},g.join(W,"components",`${k}.stx`),m,new Set);return new Response(c,{headers:{"Content-Type":"text/html"}})}catch(y){return new Response(`<div class="stx-async-error">${y.message}</div>`,{status:500,headers:{"Content-Type":"text/html"}})}}if(T.pathname==="/_stx/img"){let{handleImageRequest:k}=await import("./chunk-3vf4w6tn.js"),y=await k(D,{publicDir:g.join(W,x),cacheDir:S0(W,"cache","img")});if(y)return y}if(M)try{let k=await M.handleRequest(D);if(k.status!==404)return k}catch{}if(V[T.pathname])try{return await V[T.pathname](D)}catch(k){return new Response(JSON.stringify({error:k.message}),{status:500,headers:{"Content-Type":"application/json"}})}let r=$5(T.pathname,j);if(r){let k=w.get(r.route.pattern),y=C.has(r.route.pattern);if(r.route.isDynamic&&Object.keys(r.params).length>0||y){let m=await h(r.route,r.params);if(m)k=m}if(k){let m=k.status??200,c=k.headers??{},s=(r.route.filePath?x6(await Bun.file(r.route.filePath).text().catch(()=>"")):null)??{};if(s.validate){if(!await s.validate({params:r.params})){let B0=await I(404);if(B0){let a=B0;if(a=await o(a,W),Y)a=D0(a,G);return new Response(a,{status:404,headers:{"Content-Type":"text/html"}})}return new Response("Not Found",{status:404})}}if(s.middleware){let U0=w6(T.pathname,r.params,s,T.search),B0=T6(U0,null,D,{isServer:!0}),a=await C6(s.middleware,B0);if(a.redirect){let e=a.redirect.path,n=a.redirect.options.redirectCode||302,r0=new Headers(a.responseHeaders);return r0.set("Location",e),new Response(null,{status:n,headers:r0})}if(a.abort){let{statusCode:e,message:n}=a.abort.error;return new Response(`<!DOCTYPE html><html><head><title>Error ${e}</title></head><body><h1>Error ${e}</h1><p>${n}</p></body></html>`,{status:e,headers:{"Content-Type":"text/html"}})}if(Object.keys(a.state).length>0){let e=`<script>(function(){var s=typeof stx!=='undefined'?stx:{};s._ms=${JSON.stringify(a.state)};if(s.setMiddlewareState)s.setMiddlewareState(s._ms);})()</script>`;k.content=k.content.replace("</head>",`${e}</head>`)}}let v=k.content;if(q&&v6(D)){let U0=k6(v),B0=S6(v),a=v.match(/<title[^>]*>([\s\S]*?)<\/title>/i),e=a?a[1].trim():"";if(Object.keys(r.params).length>0)v=v1(v,r.params);v=await o(v,W);let n=_?.router?.container||"main";return v=g6(v,n),new Response(v,{status:m,headers:{"Content-Type":"text/html","X-STX-Fragment":"true","X-STX-Layout":U0.layout,"X-STX-Layout-Group":U0.group,"X-STX-Runtime":B0?"true":"false",...e&&{"X-STX-Title":encodeURIComponent(e)},[P6]:b6(),...Z1(),"Cache-Control":U$}})}if(q)v=B$(q,v);if(Object.keys(r.params).length>0)v=v1(v,r.params);if(v=await o(v,W),Y)v=D0(v,G);if(X.native)if(v.includes("<head>"))v=v.replace("<head>","<head><style>[data-stx-sidebar],.stx-sidebar{display:none!important}</style><script>window.__craftNativeSidebar=true;document.documentElement.classList.add('has-native-sidebar')</script>");else v="<head><style>[data-stx-sidebar],.stx-sidebar{display:none!important}</style><script>window.__craftNativeSidebar=true;document.documentElement.classList.add('has-native-sidebar')</script></head>"+v;if(X.titlebarHidden)if(v.includes("<head>"))v=v.replace("<head>","<head><style>html.stx-titlebar-hidden .stx-traffic-lights-dot{visibility:hidden}</style><script>document.documentElement.classList.add('stx-titlebar-hidden')</script>");else v=`<head><style>html.stx-titlebar-hidden .stx-traffic-lights-dot{visibility:hidden}</style><script>document.documentElement.classList.add('stx-titlebar-hidden')</script></head>${v}`;if(k.boundaries&&k.boundaries.length>0){let{renderStreamingPage:U0,streamToResponse:B0}=await import("./chunk-a540pndz.js");return B0(U0(v,k.boundaries,{timeoutMs:30000}),{status:m,headers:{"Cache-Control":"no-store, no-cache, must-revalidate",Pragma:"no-cache",Expires:"0"}})}return new Response(v,{status:m,headers:{"Content-Type":"text/html",...Z1(),"Cache-Control":"no-store, no-cache, must-revalidate",Pragma:"no-cache",Expires:"0",...c}})}}if(L.length>0){let k=L.map((m)=>m.route),y=$5(T.pathname,k);if(y){let m=H.get(y.route.pattern);if(m){let c=m.content;if(q)c=B$(q,c);if(Object.keys(y.params).length>0)c=v1(c,y.params);if(c=await o(c,W),Y)c=D0(c,G);return new Response(c,{status:m.status??200,headers:{"Content-Type":"text/html","Cache-Control":"no-store, no-cache, must-revalidate",Pragma:"no-cache",Expires:"0"}})}}for(let{prefix:m}of O)if(m!=="/"&&T.pathname.startsWith(m)){let c=H.get(m)||H.get(m+"/");if(c){let s=c.content;if(q)s=B$(q,s);if(s=await o(s,W),Y)s=D0(s,G);return new Response(s,{headers:{"Content-Type":"text/html","Cache-Control":"no-store, no-cache, must-revalidate",Pragma:"no-cache",Expires:"0"}})}}}let f1=w.get("/");if(f1){let k=f1.content;if(k=await o(k,W),Y)k=D0(k,G);if(X.native)if(k.includes("<head>"))k=k.replace("<head>","<head><style>[data-stx-sidebar],.stx-sidebar{display:none!important}</style><script>window.__craftNativeSidebar=true;document.documentElement.classList.add('has-native-sidebar')</script>");else k="<head><style>[data-stx-sidebar],.stx-sidebar{display:none!important}</style><script>window.__craftNativeSidebar=true;document.documentElement.classList.add('has-native-sidebar')</script></head>"+k;return new Response(k,{headers:{"Content-Type":"text/html","Cache-Control":"no-store, no-cache, must-revalidate",Pragma:"no-cache",Expires:"0"}})}let h1=await I(404);if(h1){let k=h1;if(k=await o(k,W),Y)k=D0(k,G);return new Response(k,{status:404,headers:{"Content-Type":"text/html"}})}return new Response("Not Found",{status:404})},async error(D){let T=await I(500);if(T)return new Response(T,{status:500,headers:{"Content-Type":"text/html"}});return new Response(`<pre>${D}
|
|
1610
|
+
Press ${B.cyan}h${B.reset} + ${B.cyan}Enter${B.reset} to show shortcuts`),x0(F.url.toString(),()=>{if(Z)P0.watch(J,{recursive:!0}).close();F.stop()}),Z){console.log(`${B.blue}Watching for changes...${B.reset}`);let O=P0.watch(J,{recursive:!0},async(L,H)=>{if(!H)return;if(H.endsWith(".stx")||H.endsWith(".js")||H.endsWith(".ts")||H.endsWith(".md"))console.log(`${B.yellow}File ${B.bright}${H}${B.yellow} changed, rebuilding...${B.reset}`),m0.clear(),p0(),await K()});process.on("SIGINT",()=>{O.close(),F.stop(),process.exit(0)})}return!0}function O6($){return String($??"").replace(/&/g,"&").replace(/</g,"<").replace(/>/g,">")}var{serve:N4}=globalThis.Bun;import J0 from"fs";import g from"path";async function M6($){try{return Z5(await Bun.file($).text())}catch{return}}function e$($){let X=Bun.file($),Q=g.extname($).toLowerCase(),Z={".html":"text/html",".css":"text/css",".js":"text/javascript",".json":"application/json",".png":"image/png",".jpg":"image/jpeg",".jpeg":"image/jpeg",".gif":"image/gif",".svg":"image/svg+xml",".ico":"image/x-icon",".woff":"font/woff",".woff2":"font/woff2",".ttf":"font/ttf",".otf":"font/otf",".eot":"application/vnd.ms-fontobject"},J=[".js",".css",".json"].includes(Q)?{"Cache-Control":"no-store, no-cache, must-revalidate",Pragma:"no-cache",Expires:"0"}:{};return new Response(X,{headers:{"Content-Type":Z[Q]||"application/octet-stream",...J}})}async function M4($=".",X={}){let Q=X.port||3000,Z=X.watch!==!1,Y=X.hotReload!==!1&&Z,J=null,G=X.hmrPort||Q+1,W=g.resolve($),{loadStxConfig:K}=await import("./chunk-dfcsn711.js"),_=await K(W),U=_.root&&_.root!=="."?g.join(W,_.root):W,F=X.pagesDir||_.pagesDir||"pages",z=g.join(U,F);if(!J0.existsSync(z))return console.error(`${B.red}Error: No '${F}' directory found${B.reset}`),console.log(`${B.dim}Looked in: ${B.bright}${z}${B.reset}`),console.log(`${B.dim}Run stx dev from the app directory, pass it as an argument (stx dev <dir>),${B.reset}`),console.log(`${B.dim}point at another directory with --pages <dir>, or set pagesDir in stx.config.ts.${B.reset}`),console.log(`${B.dim}Starting fresh? Create ${F}/index.stx for the homepage.${B.reset}`),!1;let j=X5(U,{pagesDir:F});if(j.length===0)return console.error(`${B.red}Error: No page files found in ${B.bright}${z}${B.reset}`),!1;console.log(`${B.blue}Found ${B.bright}${j.length}${B.blue} routes${B.reset}`);let O=_?._pluginPageDirs||[],L=[];for(let{dir:D,prefix:T}of O)if(J0.existsSync(D)){let x=X5(g.dirname(D),{pagesDir:g.basename(D)});for(let S of x){let b=T==="/"?S.pattern:`${T}${S.pattern==="/"?"":S.pattern}`;L.push({route:{...S,pattern:b},prefix:T})}if(x.length>0)console.log(`${B.blue}Plugin pages: ${B.bright}${x.length}${B.blue} routes at ${B.cyan}${T}${B.reset}`)}let H=new Map,q=null,A=null;if(X.stxOptions?.shell!==!1){if(A=await y6(W,X.stxOptions?.shell),A){if(q=await Q5(A,X.stxOptions||{}),q)console.log(`${B.blue}Using app shell: ${B.bright}${g.relative(W,A)}${B.reset} ${B.dim}(deprecated: use layouts/default.stx instead)${B.reset}`)}}R6(),await D6(W);let N=I6();if(N.length>0)console.log(`${B.blue}Loaded ${B.bright}${N.length}${B.blue} middleware: ${B.dim}${N.join(", ")}${B.reset}`);let V={},M=null;try{let{loadStxConfig:D}=await import("./chunk-dfcsn711.js"),T=await D(W);if(T?.apiRouter)M=T?.apiRouter,console.log(`${B.blue}Using custom router for API handling${B.reset}`);if(T?.apiRoutes){V=T.apiRoutes;let x=Object.keys(V).length;if(x>0)console.log(`${B.blue}Loaded ${B.bright}${x} API route${x>1?"s":""}${B.reset}`)}if(T?.broadcasting?.enabled)try{let{startBroadcasting:x,loadChannels:S}=await import("./chunk-dxevp6w7.js"),b=T.broadcasting;await x(b);let _0=b.port??6001;console.log(`${B.magenta}Broadcasting on ${B.cyan}ws://localhost:${_0}/ws${B.reset}`);let K0=g.join(process.cwd(),"channels.ts");if(J0.existsSync(K0))try{let C0=await S(K0);console.log(`${B.blue}Loaded ${B.bright}${C0} broadcast channel${C0!==1?"s":""}${B.blue} from channels.ts${B.reset}`)}catch(C0){console.warn(`${B.yellow}Failed to load channels.ts: ${C0.message}${B.reset}`)}}catch(x){console.warn(`${B.yellow}Broadcasting failed to start: ${x.message}${B.reset}`)}}catch{}let R=S0(W,"output");J0.mkdirSync(R,{recursive:!0});let w=new Map,C=new Set,I=async(D)=>{let T=V6(z,D);if(!T)return null;try{let x=await Bun.build({entrypoints:[T],outdir:R,plugins:[X1],publicPath:"/",define:{"process.env.NODE_ENV":'"development"'},...X.stxOptions});if(!x.success)return null;let S=x.outputs.find((b)=>b.path.endsWith(".html"));if(!S)return null;return await Bun.file(S.path).text()}catch{return null}},E=new Map,h=async(D,T)=>{try{let{processDirectives:x,extractVariables:S,defaultConfig:b,loadStxConfig:_0,injectRouterScript:K0}=await import("./chunk-dfcsn711.js"),{checkCache:C0,cacheTemplate:u$,readFileCached:r,templateCache:f1}=await import("./chunk-kagw0ckh.js"),h1=await _0(W),k=(d)=>{if(!d)return d;if(g.isAbsolute(d))return d;return g.resolve(W,d)},y={...b,...h1,...X.stxOptions,autoShell:!0};if(X.debugDirectives)y.debug=!0;y.partialsDir=k(y.partialsDir),y.componentsDir=k(y.componentsDir),y.layoutsDir=k(y.layoutsDir),y.storesDir=k(y.storesDir||"stores"),y.cachePath=k(y.cachePath)??S0(W,"cache");let m=!T&&!X.profile,c=y.cache!==!1;if(c&&m){let d=f1.get(D.filePath);if(d)try{if((await J0.promises.stat(D.filePath)).mtime.getTime()<=d.mtime){let z0=!0;for(let $0 of d.dependencies){if(!J0.existsSync($0)){z0=!1;break}if((await J0.promises.stat($0)).mtime.getTime()>d.mtime){z0=!1;break}}if(z0){let $0=d.output;if(q)$0=L$($0,{preserveHead:!0});let j1=E.get(D.filePath);return{route:D,content:$0,status:j1?.status??await M6(D.filePath),headers:j1?.headers}}}}catch{}let L0=await C0(D.filePath,y);if(L0){let F0=L0;if(q)F0=L$(F0,{preserveHead:!0});let z0=E.get(D.filePath);return{route:D,content:F0,status:z0?.status??await M6(D.filePath),headers:z0?.headers}}}let s=c?await r(D.filePath):await Bun.file(D.filePath).text(),v=Z5(s),{classifyAllScripts:U0}=await import("./chunk-dfcsn711.js"),B0=U0(s),a=B0.server.map((d)=>d.content),e=s;for(let d of B0.server)e=e.replace(d.fullTag,"");let n={__filename:D.filePath,__dirname:g.dirname(D.filePath),params:T??{},__stx_runtime_head:{}};for(let d of a)try{await S(d,n,D.filePath)}catch(L0){if(X.stxOptions?.debug)console.error("[stx] variable extraction error",D.filePath,L0?.message||L0)}let r0=new Set,N0;if(X.profile){let d=performance.now();N0=await x(e,n,D.filePath,y,r0);let L0=performance.now()-d,F0=g.relative(W,D.filePath)||D.filePath;console.log(`[stx:profile] ${F0} \u2192 ${L0.toFixed(2)}ms`)}else N0=await x(e,n,D.filePath,y,r0);if(!q)N0=await K0(N0,{router:y.router});{let{interpolateScriptExpressions:d}=await import("./chunk-1pwcgb1t.js");N0=N0.replace(/<script\b([^>]*)>([\s\S]*?)<\/script>/g,(L0,F0,z0)=>{if(!/function\s+__stx_setup_/.test(z0))return L0;return`<script${F0}>${d(z0,n)}</script>`})}if(q)N0=L$(N0,{preserveHead:!0});if(c&&m)await u$(D.filePath,N0,r0,y);let{extractStreamBoundaries:t7}=await import("./chunk-h06cjhqg.js"),s0=t7(n),z1=n.__streamTemplates;if(z1&&typeof z1==="object"&&Object.keys(z1).length>0){let d=n.streamBoundaries||{},L0={...y,autoShell:!1},F0=Object.keys(z1).map(($0)=>({id:$0,render:async()=>{let j1=typeof d[$0]==="function"?await d[$0]():void 0;return x(z1[$0],{...n,$boundary:j1},D.filePath,L0,new Set)}})),z0=new Set(F0.map(($0)=>$0.id));s0=[...(s0||[]).filter(($0)=>!z0.has($0.id)),...F0]}if(s0&&s0.length>0)C.add(D.pattern);else s0=void 0;let u5=N1(n),m5=M1(n);if(m)E.set(D.filePath,{status:u5,headers:m5});return{route:D,content:N0,status:u5??v,headers:m5,boundaries:s0}}catch(x){return console.error(`${B.red}Error building ${B.bright}${D.pattern}${B.reset}:`,x),null}},u=8,t=async()=>{w.clear(),H.clear();for(let D=0;D<j.length;D+=u){let T=j.slice(D,D+u),x=await Promise.all(T.map((S)=>h(S)));for(let S of x)if(S)w.set(S.route.pattern,S)}for(let D=0;D<L.length;D+=u){let T=L.slice(D,D+u),x=await Promise.all(T.map(({route:S})=>h(S)));for(let S of x)if(S)H.set(S.route.pattern,S)}return w.size>0};if(console.log(`${B.blue}Building pages...${B.reset}`),!await t())return console.error(`${B.red}No pages were successfully built${B.reset}`),!1;await W$(W);let W0=Q;try{if(W0=await k0(Q),W0!==Q)console.log(`${B.yellow}Port ${Q} is busy, using port ${W0} instead${B.reset}`)}catch{return console.error(`${B.red}Could not find an available port${B.reset}`),!1}if(Y){let D=X.hmrPort||W0+1;J=X$({wsPort:D,verbose:!1}),G=J.start(D)}let v1=(D,T)=>{let S=`<script data-stx-route-params>(function(){var p=${JSON.stringify(T).replace(/</g,"\\u003C").replace(/\u2028/g,"\\u2028").replace(/\u2029/g,"\\u2029")};window.__stx_rp=p;if(window.stx){window.stx._rp=p;if(window.stx.setRouteParams)window.stx.setRouteParams(p)}})()</script>`;if(D.includes("</head>"))return D.replace("</head>",`${S}</head>`);if(D.includes("<body"))return D.replace(/<body([^>]*)>/,`<body$1>${S}`);return S+D};console.log(`${B.blue}Starting server...${B.reset}`);let g1=N4({port:W0,async fetch(D){let T=new URL(D.url),x=_?.publicDir||"public",S=g.join(W,x,T.pathname),b=g.join(W,T.pathname),_0=g.join(R,T.pathname),[K0,C0,u$]=await Promise.all([J0.promises.stat(S).catch(()=>null),J0.promises.stat(b).catch(()=>null),J0.promises.stat(_0).catch(()=>null)]);if(K0?.isFile())return e$(S);if(C0?.isFile())return e$(b);if(u$?.isFile())return e$(_0);if(T.pathname.startsWith("/_stx/component/")){let k=decodeURIComponent(T.pathname.slice(16));if(k)try{let y=`<${k} />`,m={...buildConfig,autoShell:!1},c=await processDirectives(y,{},g.join(W,"components",`${k}.stx`),m,new Set);return new Response(c,{headers:{"Content-Type":"text/html"}})}catch(y){return new Response(`<div class="stx-async-error">${y.message}</div>`,{status:500,headers:{"Content-Type":"text/html"}})}}if(T.pathname==="/_stx/img"){let{handleImageRequest:k}=await import("./chunk-11az7s55.js"),y=await k(D,{publicDir:g.join(W,x),cacheDir:S0(W,"cache","img")});if(y)return y}if(M)try{let k=await M.handleRequest(D);if(k.status!==404)return k}catch{}if(V[T.pathname])try{return await V[T.pathname](D)}catch(k){return new Response(JSON.stringify({error:k.message}),{status:500,headers:{"Content-Type":"application/json"}})}let r=$5(T.pathname,j);if(r){let k=w.get(r.route.pattern),y=C.has(r.route.pattern);if(r.route.isDynamic&&Object.keys(r.params).length>0||y){let m=await h(r.route,r.params);if(m)k=m}if(k){let m=k.status??200,c=k.headers??{},s=(r.route.filePath?x6(await Bun.file(r.route.filePath).text().catch(()=>"")):null)??{};if(s.validate){if(!await s.validate({params:r.params})){let B0=await I(404);if(B0){let a=B0;if(a=await o(a,W),Y)a=D0(a,G);return new Response(a,{status:404,headers:{"Content-Type":"text/html"}})}return new Response("Not Found",{status:404})}}if(s.middleware){let U0=w6(T.pathname,r.params,s,T.search),B0=T6(U0,null,D,{isServer:!0}),a=await C6(s.middleware,B0);if(a.redirect){let e=a.redirect.path,n=a.redirect.options.redirectCode||302,r0=new Headers(a.responseHeaders);return r0.set("Location",e),new Response(null,{status:n,headers:r0})}if(a.abort){let{statusCode:e,message:n}=a.abort.error;return new Response(`<!DOCTYPE html><html><head><title>Error ${e}</title></head><body><h1>Error ${e}</h1><p>${n}</p></body></html>`,{status:e,headers:{"Content-Type":"text/html"}})}if(Object.keys(a.state).length>0){let e=`<script>(function(){var s=typeof stx!=='undefined'?stx:{};s._ms=${JSON.stringify(a.state)};if(s.setMiddlewareState)s.setMiddlewareState(s._ms);})()</script>`;k.content=k.content.replace("</head>",`${e}</head>`)}}let v=k.content;if(q&&v6(D)){let U0=k6(v),B0=S6(v),a=v.match(/<title[^>]*>([\s\S]*?)<\/title>/i),e=a?a[1].trim():"";if(Object.keys(r.params).length>0)v=v1(v,r.params);v=await o(v,W);let n=_?.router?.container||"main";return v=g6(v,n),new Response(v,{status:m,headers:{"Content-Type":"text/html","X-STX-Fragment":"true","X-STX-Layout":U0.layout,"X-STX-Layout-Group":U0.group,"X-STX-Runtime":B0?"true":"false",...e&&{"X-STX-Title":encodeURIComponent(e)},[P6]:b6(),...Z1(),"Cache-Control":U$}})}if(q)v=B$(q,v);if(Object.keys(r.params).length>0)v=v1(v,r.params);if(v=await o(v,W),Y)v=D0(v,G);if(X.native)if(v.includes("<head>"))v=v.replace("<head>","<head><style>[data-stx-sidebar],.stx-sidebar{display:none!important}</style><script>window.__craftNativeSidebar=true;document.documentElement.classList.add('has-native-sidebar')</script>");else v="<head><style>[data-stx-sidebar],.stx-sidebar{display:none!important}</style><script>window.__craftNativeSidebar=true;document.documentElement.classList.add('has-native-sidebar')</script></head>"+v;if(X.titlebarHidden)if(v.includes("<head>"))v=v.replace("<head>","<head><style>html.stx-titlebar-hidden .stx-traffic-lights-dot{visibility:hidden}</style><script>document.documentElement.classList.add('stx-titlebar-hidden')</script>");else v=`<head><style>html.stx-titlebar-hidden .stx-traffic-lights-dot{visibility:hidden}</style><script>document.documentElement.classList.add('stx-titlebar-hidden')</script></head>${v}`;if(k.boundaries&&k.boundaries.length>0){let{renderStreamingPage:U0,streamToResponse:B0}=await import("./chunk-h06cjhqg.js");return B0(U0(v,k.boundaries,{timeoutMs:30000}),{status:m,headers:{"Cache-Control":"no-store, no-cache, must-revalidate",Pragma:"no-cache",Expires:"0"}})}return new Response(v,{status:m,headers:{"Content-Type":"text/html",...Z1(),"Cache-Control":"no-store, no-cache, must-revalidate",Pragma:"no-cache",Expires:"0",...c}})}}if(L.length>0){let k=L.map((m)=>m.route),y=$5(T.pathname,k);if(y){let m=H.get(y.route.pattern);if(m){let c=m.content;if(q)c=B$(q,c);if(Object.keys(y.params).length>0)c=v1(c,y.params);if(c=await o(c,W),Y)c=D0(c,G);return new Response(c,{status:m.status??200,headers:{"Content-Type":"text/html","Cache-Control":"no-store, no-cache, must-revalidate",Pragma:"no-cache",Expires:"0"}})}}for(let{prefix:m}of O)if(m!=="/"&&T.pathname.startsWith(m)){let c=H.get(m)||H.get(m+"/");if(c){let s=c.content;if(q)s=B$(q,s);if(s=await o(s,W),Y)s=D0(s,G);return new Response(s,{headers:{"Content-Type":"text/html","Cache-Control":"no-store, no-cache, must-revalidate",Pragma:"no-cache",Expires:"0"}})}}}let f1=w.get("/");if(f1){let k=f1.content;if(k=await o(k,W),Y)k=D0(k,G);if(X.native)if(k.includes("<head>"))k=k.replace("<head>","<head><style>[data-stx-sidebar],.stx-sidebar{display:none!important}</style><script>window.__craftNativeSidebar=true;document.documentElement.classList.add('has-native-sidebar')</script>");else k="<head><style>[data-stx-sidebar],.stx-sidebar{display:none!important}</style><script>window.__craftNativeSidebar=true;document.documentElement.classList.add('has-native-sidebar')</script></head>"+k;return new Response(k,{headers:{"Content-Type":"text/html","Cache-Control":"no-store, no-cache, must-revalidate",Pragma:"no-cache",Expires:"0"}})}let h1=await I(404);if(h1){let k=h1;if(k=await o(k,W),Y)k=D0(k,G);return new Response(k,{status:404,headers:{"Content-Type":"text/html"}})}return new Response("Not Found",{status:404})},async error(D){let T=await I(500);if(T)return new Response(T,{status:500,headers:{"Content-Type":"text/html"}});return new Response(`<pre>${D}
|
|
1611
1611
|
${D.stack}</pre>`,{headers:{"Content-Type":"text/html"}})}});if(console.clear(),console.log(`
|
|
1612
1612
|
${B.blue}stx${B.reset} ${B.green}${process.env.stx_VERSION||"v0.0.10"}${B.reset} ${B.dim}ready in ${Math.random()*10+5|0}.${Math.random()*90+10|0} ms${B.reset}`),console.log(`
|
|
1613
1613
|
${B.bright}\u2192 ${B.cyan}http://localhost:${W0}/${B.reset}`),Y)console.log(`${B.dim} HMR: ws://localhost:${G}${B.reset}`);console.log(`
|
|
1614
1614
|
${B.yellow}Routes:${B.reset}`);let a0=[...E6(j,W)];for(let{route:D}of L)a0.push(`${D.pattern}`);if(a0.forEach((D,T)=>{let S=T===a0.length-1?"\u2514\u2500 ":"\u251C\u2500 ";console.log(` ${B.green}${S}${B.reset}${D}`)}),console.log(`
|
|
1615
|
-
Press ${B.cyan}h${B.reset} + ${B.cyan}Enter${B.reset} to show shortcuts`),x0(g1.url.toString(),()=>{if(J)A1();g1.stop()}),X.native){let D,T=g.join(z,"index.stx");if(J0.existsSync(T)){let S=await Bun.file(T).text();D=o1(S)}let x=_?.app?.window??{};await t0(W0,{title:_?.app?.head?.title||g.basename(W)||"stx App",width:x.width,height:x.height,darkMode:x.darkMode,hotReload:x.hotReload,titlebarHidden:x.titlebarHidden??X.titlebarHidden===!0,nativeSidebar:!!D,sidebarConfig:D})}if(Z){console.log(`${B.blue}Watching for changes...${B.reset}`);let D=(S)=>{return S.startsWith("public/")||S.startsWith("public\\")},T=(S)=>{let b=S.toLowerCase();return b.endsWith(".stx")||b.endsWith(".html")||b.endsWith(".md")},x=J0.watch(W,{recursive:!0},async(S,b)=>{if(!b||$$(b))return;if(e1(b))if(D(b)){if(console.log(`${B.cyan}${b} changed${B.reset}`),Y&&J)J.reload(b)}else if(T(b)){console.log(`${B.yellow}${b} changed, rebuilding...${B.reset}`),m0.clear(),p0();try{let{invalidateFileCache:_0,templateCache:K0}=await import("./chunk-
|
|
1615
|
+
Press ${B.cyan}h${B.reset} + ${B.cyan}Enter${B.reset} to show shortcuts`),x0(g1.url.toString(),()=>{if(J)A1();g1.stop()}),X.native){let D,T=g.join(z,"index.stx");if(J0.existsSync(T)){let S=await Bun.file(T).text();D=o1(S)}let x=_?.app?.window??{};await t0(W0,{title:_?.app?.head?.title||g.basename(W)||"stx App",width:x.width,height:x.height,darkMode:x.darkMode,hotReload:x.hotReload,titlebarHidden:x.titlebarHidden??X.titlebarHidden===!0,nativeSidebar:!!D,sidebarConfig:D})}if(Z){console.log(`${B.blue}Watching for changes...${B.reset}`);let D=(S)=>{return S.startsWith("public/")||S.startsWith("public\\")},T=(S)=>{let b=S.toLowerCase();return b.endsWith(".stx")||b.endsWith(".html")||b.endsWith(".md")},x=J0.watch(W,{recursive:!0},async(S,b)=>{if(!b||$$(b))return;if(e1(b))if(D(b)){if(console.log(`${B.cyan}${b} changed${B.reset}`),Y&&J)J.reload(b)}else if(T(b)){console.log(`${B.yellow}${b} changed, rebuilding...${B.reset}`),m0.clear(),p0();try{let{invalidateFileCache:_0,templateCache:K0}=await import("./chunk-kagw0ckh.js");_0(g.resolve(W,b)),K0.delete(g.resolve(W,b))}catch{}if(A&&b){if(g.resolve(W,b)===A||g.basename(A)===b){let K0=await Q5(A,X.stxOptions||{});if(K0)q=K0}}if(await t(),await K$(W),Y&&J)J.reload(b)}else{console.log(`${B.yellow}${b} changed, rebuilding...${B.reset}`),m0.clear(),p0();try{let{invalidateFileCache:_0,templateCache:K0}=await import("./chunk-kagw0ckh.js");_0(g.resolve(W,b)),K0.delete(g.resolve(W,b))}catch{}if(await t(),Y&&J)J.reload(b)}else if(t1(b)){if(console.log(`${B.cyan}CSS ${b} changed${B.reset}`),Y&&J)J.updateCss(b)}});process.on("SIGINT",()=>{if(x.close(),J)A1();g1.stop(),process.exit(0)})}return!0}var P={enabled:!1,components:new Map,stores:new Map,events:[],performance:[],selectedComponent:null,selectedStore:null,maxEvents:1000,maxPerformance:500};function V4($={}){if(typeof window>"u")return;P.enabled=!0,P.maxEvents=$.maxEvents||1000,P.maxPerformance=$.maxPerformance||500,window.__STX_DEVTOOLS__={getState:()=>P,getComponents:()=>Array.from(P.components.values()),getComponent:(X)=>P.components.get(X),getStores:()=>Array.from(P.stores.values()),getStore:(X)=>P.stores.get(X),getEvents:()=>P.events,getPerformance:()=>P.performance,selectComponent:(X)=>J5(X),selectStore:(X)=>R4(X),inspectElement:(X)=>I4(X),highlightComponent:(X)=>m6(X),clearHighlight:()=>p6(),logComponentTree:()=>D4(),logStoreState:(X)=>w4(X),timeTravel:(X,Q)=>T4(X,Q)},k4(),C4(),console.log("%c[STX DevTools] Enabled","color: #10b981; font-weight: bold;")}function E4(){P.enabled=!1,delete window.__STX_DEVTOOLS__;let $=document.getElementById("stx-devtools-panel");if($)$.remove();console.log("%c[STX DevTools] Disabled","color: #ef4444;")}function f6($){if(!P.enabled)return;let X=P.components.get($);if(X){if(X.parentId){let Q=P.components.get(X.parentId);if(Q)Q.children=Q.children.filter((Z)=>Z!==$)}P.components.delete($),Y5({timestamp:Date.now(),type:"component:unmounted",componentId:$,payload:{name:X.name}})}}function d6($,X,Q={},Z=[]){if(!P.enabled)return;let Y={id:$,state:X,getters:Q,actions:Z,history:[{timestamp:Date.now(),type:"state",name:"__init__",newValue:X}]};P.stores.set($,Y),Y5({timestamp:Date.now(),type:"store:registered",payload:{id:$,state:X}})}function u6($,X,Q,Z,Y="state"){if(!P.enabled)return;let J=P.stores.get($);if(J){let G={timestamp:Date.now(),type:Y,name:X,oldValue:Q,newValue:Z,stack:Error().stack};if(J.history.push(G),J.history.length>100)J.history=J.history.slice(-100);if(Y==="state")J.state={...J.state,[X]:Z};Y5({timestamp:Date.now(),type:`store:${Y}`,payload:{storeId:$,name:X,oldValue:Q,newValue:Z}})}}function Y5($){if(!P.enabled)return;if(P.events.push($),P.events.length>P.maxEvents)P.events=P.events.slice(-P.maxEvents);if(typeof window<"u")window.dispatchEvent(new CustomEvent("stx:devtools:event",{detail:$}))}function J5($){P.selectedComponent=$;let X=P.components.get($);if(X)m6($),console.log("%c[STX DevTools] Selected component:","color: #3b82f6;",X);return X}function R4($){P.selectedStore=$;let X=P.stores.get($);if(X)console.log("%c[STX DevTools] Selected store:","color: #8b5cf6;",X);return X}function I4($){let X=$;while(X){let Q=X.getAttribute("data-stx-component-id");if(Q)return J5(Q);X=X.parentElement}console.log("%c[STX DevTools] No component found for element","color: #f59e0b;");return}function m6($){p6();let X=P.components.get($);if(X?.element){let Q=document.createElement("div");Q.id="stx-devtools-highlight",Q.style.cssText=`
|
|
1616
1616
|
position: absolute;
|
|
1617
1617
|
background: rgba(59, 130, 246, 0.2);
|
|
1618
1618
|
border: 2px solid #3b82f6;
|
|
@@ -2881,9 +2881,9 @@ describe('Example', () => {
|
|
|
2881
2881
|
</footer>
|
|
2882
2882
|
@yield('scripts')
|
|
2883
2883
|
</body>
|
|
2884
|
-
</html>`}function iX(){return"<!-- Hero section -->"}function aX(){return"<!-- Features -->"}function rX(){return"<!-- Pricing -->"}function sX(){return"<!-- Button -->"}function C1($){if(!T1($))L5($,{recursive:!0})}function nX(){if(T1("bun.lockb"))return"bun";if(T1("pnpm-lock.yaml"))return"pnpm";if(T1("yarn.lock"))return"yarn";return"bun"}function F5($){return $.replace(/[-_\s]+(.)?/g,(X,Q)=>Q?Q.toUpperCase():"").replace(/^./,(X)=>X.toUpperCase())}function oX($){return $.replace(/[-_\s]+(.)?/g,(X,Q)=>Q?Q.toUpperCase():"").replace(/^./,(X)=>X.toLowerCase())}function c0($){return $.replace(/([a-z])([A-Z])/g,"$1-$2").replace(/[\s_]+/g,"-").toLowerCase()}var{serve:tX}=globalThis.Bun;import k1 from"fs";import y0 from"path";function p2($,X=200,Q={}){return new Response($,{status:X,headers:{"Content-Type":"text/html; charset=utf-8",...Q}})}async function J8($){let{loadStxConfig:X}=await import("./chunk-
|
|
2884
|
+
</html>`}function iX(){return"<!-- Hero section -->"}function aX(){return"<!-- Features -->"}function rX(){return"<!-- Pricing -->"}function sX(){return"<!-- Button -->"}function C1($){if(!T1($))L5($,{recursive:!0})}function nX(){if(T1("bun.lockb"))return"bun";if(T1("pnpm-lock.yaml"))return"pnpm";if(T1("yarn.lock"))return"yarn";return"bun"}function F5($){return $.replace(/[-_\s]+(.)?/g,(X,Q)=>Q?Q.toUpperCase():"").replace(/^./,(X)=>X.toUpperCase())}function oX($){return $.replace(/[-_\s]+(.)?/g,(X,Q)=>Q?Q.toUpperCase():"").replace(/^./,(X)=>X.toLowerCase())}function c0($){return $.replace(/([a-z])([A-Z])/g,"$1-$2").replace(/[\s_]+/g,"-").toLowerCase()}var{serve:tX}=globalThis.Bun;import k1 from"fs";import y0 from"path";function p2($,X=200,Q={}){return new Response($,{status:X,headers:{"Content-Type":"text/html; charset=utf-8",...Q}})}async function J8($){let{loadStxConfig:X}=await import("./chunk-hwn896re.js");return{...await X($.configDir??process.cwd()).catch(()=>({})),...$.stxOptions??{}}}async function eX($={}){let{port:X=3000,root:Q=".",watch:Z=!0,onRequest:Y,routes:J={},middleware:G=[],on404:W,onError:K}=$,_=y0.resolve(Q),U=await J8($),F=new Map;async function z(A){let N=k1.statSync(A),V=`${A}:${N.mtimeMs}`,M=F.get(V);if(M)return{content:M.content,status:M.status,headers:M.headers};for(let T of F.keys())if(T.startsWith(`${A}:`)&&T!==V)F.delete(T);let R=await Bun.file(A).text(),w=R,C=Z$(R);if(C)w=C.content.trim();let I=/<script\b([^>]*)>([\s\S]*?)<\/script>/gi,E=[],h=[],u;while((u=I.exec(R))!==null){let T=u[1],x=u[2],S=u[0];if(T.includes("server"))h.push(x);else E.push(S)}let t=R.match(/<style\b[^>]*>[\s\S]*?<\/style>/gi)||[],d5=w.replace(/<script\b[^>]*>[\s\S]*?<\/script>/gi,"").replace(/<style\b[^>]*>[\s\S]*?<\/style>/gi,""),W0={__filename:A,__dirname:y0.dirname(A)};for(let T of h)await j0(T,W0,A);let q0=await O0(d5,W0,A,U,new Set);if(t.length>0){let T=t.join(`
|
|
2885
2885
|
`);if(q0.match(/(<\/head>)/i))q0=q0.replace(/(<\/head>)/i,`${T}
|
|
2886
|
-
$1`)}if(E.length>0){let{interpolateScriptsInTemplate:T}=await import("./chunk-
|
|
2886
|
+
$1`)}if(E.length>0){let{interpolateScriptsInTemplate:T}=await import("./chunk-1pwcgb1t.js"),x=T(E.join(`
|
|
2887
2887
|
`),W0);if(q0.match(/(<\/body>)/i))q0=q0.replace(/(<\/body>)/i,`${x}
|
|
2888
2888
|
$1`);else q0+=`
|
|
2889
2889
|
${x}`}let a0=N1(W0),D=M1(W0);return F.set(V,{content:q0,mtime:N.mtimeMs,status:a0,headers:D}),{content:q0,status:a0,headers:D}}async function j(A){let N=k1.statSync(A),V=`${A}:${N.mtimeMs}`,M=F.get(V);if(M)return M.content;let{content:R}=await V0(A,U);return F.set(V,{content:R,mtime:N.mtimeMs}),R}function O(A){let N=A.startsWith("/")?A.slice(1):A,V=[N,`${N}.stx`,`${N}.md`,`${N}.html`,y0.join(N,"index.stx"),y0.join(N,"index.md"),y0.join(N,"index.html")];for(let M of V){let R=y0.join(_,M);if(k1.existsSync(R)&&k1.statSync(R).isFile())return R}return null}async function L(A){let N=new URL(A.url),V=async()=>{if(J[N.pathname])return await J[N.pathname](A);if(Y){let R=await Y(A);if(R)return R}let M=O(N.pathname);if(!M){if(W)return await W(A);return new Response("Not Found",{status:404})}try{let R,w="text/html",C,I;if(M.endsWith(".stx")){let E=await z(M);R=E.content,C=E.status,I=E.headers}else if(M.endsWith(".md"))R=await j(M);else if(M.endsWith(".html"))R=await Bun.file(M).text();else if(M.endsWith(".css"))R=await Bun.file(M).text(),w="text/css";else if(M.endsWith(".js"))R=await Bun.file(M).text(),w="text/javascript";else if(M.endsWith(".json"))R=await Bun.file(M).text(),w="application/json";else return new Response(Bun.file(M));return new Response(R,{status:C??200,headers:{"Content-Type":w,...I}})}catch(R){if(K)return await K(R,A);let w=R instanceof Error?R.message:String(R),I=U?.debug===!0?`<h1>Error</h1><pre>${w}
|
|
@@ -4315,7 +4315,7 @@ else {
|
|
|
4315
4315
|
\u26A0\uFE0F Built ${Q.views.length} views with ${Q.errors.length} errors`);return Q}function Z9($,X){let Q=V$.watch($.viewsDir,{recursive:!0},async(Z,Y)=>{if(!Y)return;if(Y.endsWith(".stx")||Y.endsWith(".ts")||Y.endsWith(".js")){if($.debug)console.log(`
|
|
4316
4316
|
File changed: ${Y}, rebuilding...`);let J=await VZ($);X?.(J)}});return{close:()=>Q.close()}}async function Y9($,X={},Q={}){let Z={...Q,skipDefaultSeoTags:!0,skipSignalsRuntime:!0},Y=await V7($,X,Z);Y=await EZ(Y),Y=Y.replace(/<script\b[^>]*>[\s\S]*?<\/script>/gi,""),Y=Y.replace(/<style\b[^>]*>[\s\S]*?<\/style>/gi,""),Y=Y.replace(/<!--\s*stx SEO Tags\s*-->/gi,""),Y=Y.replace(/\n\s*\n\s*\n/g,`
|
|
4317
4317
|
|
|
4318
|
-
`).trim();let J=IZ(Y);return{html:Y,text:J}}async function EZ($){try{let{generateCss:X,extractClassNames:Q}=await import("./chunk-
|
|
4318
|
+
`).trim();let J=IZ(Y);return{html:Y,text:J}}async function EZ($){try{let{generateCss:X,extractClassNames:Q}=await import("./chunk-dd7f8yxx.js");if(Q($).size===0)return $;let Y=await X($);if(!Y)return $;let J=RZ(Y);if(J.size===0)return $;return $.replace(/(<[a-z][a-z0-9]*)((?:\s+[a-z][a-z0-9-]*(?:\s*=\s*(?:"[^"]*"|'[^']*'|[^\s>]*))?)*\s+)class\s*=\s*"([^"]*)"((?:\s+[a-z][a-z0-9-]*(?:\s*=\s*(?:"[^"]*"|'[^']*'|[^\s>]*))?)*\s*)(\/?>)/gi,(G,W,K,_,U,F)=>{let z=_.split(/\s+/).filter(Boolean),j=[];for(let q of z){let A=J.get(q);if(A)j.push(A)}if(j.length===0)return`${W}${K}class="${_}"${U}${F}`;let O=j.join("; "),H=`${K}${U}`.match(/style\s*=\s*"([^"]*)"/);if(H){let q=`${O}; ${H[1]}`,A=K.replace(/style\s*=\s*"[^"]*"/,`style="${q}"`),N=U.replace(/style\s*=\s*"[^"]*"/,`style="${q}"`);return`${W}${A}class="${_}"${N}${F}`}return`${W}${K}class="${_}" style="${O}"${U}${F}`})}catch{return $}}function RZ($){let X=new Map,Q=/\.([a-zA-Z0-9_-]+(?:\\:[a-zA-Z0-9_-]+)*)\s*\{([^}]+)\}/g,Z=Q.exec($);while(Z!==null){let Y=Z[1].replace(/\\/g,""),J=Z[2].split(";").map((G)=>G.trim()).filter(Boolean).join("; ");if(J)X.set(Y,J);Z=Q.exec($)}return X}function IZ($){return $.replace(/<br\s*\/?>/gi,`
|
|
4319
4319
|
`).replace(/<\/(p|div|h[1-6]|li|tr)>/gi,`
|
|
4320
4320
|
`).replace(/<\/td>/gi,"\t").replace(/<[^>]*>/g,"").replace(/ /g," ").replace(/&/g,"&").replace(/</g,"<").replace(/>/g,">").replace(/"/g,'"').replace(/'/g,"'").replace(/©/g,"(c)").replace(/·/g,"-").replace(/\n\s*\n\s*\n/g,`
|
|
4321
4321
|
|
|
@@ -4450,7 +4450,7 @@ ${R}`}function Z0($){return $.replace(/&/g,"&").replace(/"/g,""").repla
|
|
|
4450
4450
|
`;let Q=$.sitemap!==!1?`Sitemap: ${$.url.replace(/\/$/,"")}/sitemap.xml
|
|
4451
4451
|
`:"";if(X==="disallow")return["User-agent: *","Disallow: /","",Q].filter(Boolean).join(`
|
|
4452
4452
|
`);return["User-agent: *","Allow: /","",Q].filter(Boolean).join(`
|
|
4453
|
-
`)}var F1=null;async function JY(){if(F1!==null)return F1;try{let $=await import("./chunk-
|
|
4453
|
+
`)}var F1=null;async function JY(){if(F1!==null)return F1;try{let $=await import("./chunk-7wnbgnxj.js");if(typeof $.getRouterScript==="function")F1=$.getRouterScript();else F1=""}catch{F1=""}return F1}async function b5($,X){let Q=await JY();if(!Q)return $;let Z={interceptAllLinks:!0,container:"main",...X},J=`${`<script>window.__stxRouterConfig=${JSON.stringify(Z)};</script>
|
|
4454
4454
|
`}<script>${Q}</script>`;if(/<\/body>/i.test($))return $.replace(/<\/body>/i,`${J}
|
|
4455
4455
|
</body>`);return`${$}
|
|
4456
4456
|
${J}`}var GY=`window.__stxThemeIcon=function(isDark){try{var want=isDark?'dark':'light';var pick=document.querySelector('link[rel~="icon"][media*="prefers-color-scheme: '+want+'"]');if(!pick)return;var live=document.querySelector('link[rel~="icon"]:not([media])');if(!live){live=document.createElement('link');live.setAttribute('rel','icon');document.head.appendChild(live)}if(pick.type)live.setAttribute('type',pick.type);var href=pick.getAttribute('href');if(live.getAttribute('href')!==href)live.setAttribute('href',href)}catch(e){}};`,WY=($,X,Q,Z)=>`(function(){${GY}function read(){try{var k=${JSON.stringify(X)};var t=localStorage.getItem(k);return t===null?(${JSON.stringify($)}==='dark'||(${JSON.stringify($)}==='auto'&&window.matchMedia('(prefers-color-scheme: dark)').matches)):t==='dark'}catch(e){return ${JSON.stringify($)}==='dark'}}function apply(){var isDark=read();var html=document.documentElement;html.classList[isDark?'add':'remove']('dark');var color=isDark?${JSON.stringify(Z)}:${JSON.stringify(Q)};if(!document.head)return;var tc=document.querySelector('meta[name="theme-color"]:not([media])');if(!tc){tc=document.createElement('meta');tc.setAttribute('name','theme-color');tc.setAttribute('data-stx-theme-meta','1')}tc.setAttribute('content',color);if(tc!==document.head.firstChild){document.head.insertBefore(tc,document.head.firstChild)}if(window.__stxThemeIcon)window.__stxThemeIcon(isDark)}apply();window.addEventListener('stx:navigate',apply);window.addEventListener('popstate',apply)})();`,KY=($,X,Q)=>`document.addEventListener('click',function(e){var t=e.target&&e.target.closest&&e.target.closest('#theme-toggle');if(!t)return;var html=document.documentElement;var isDark=html.classList.toggle('dark');try{localStorage.setItem(${JSON.stringify($)},isDark?'dark':'light')}catch(e){}var tc=document.querySelector('meta[name="theme-color"]:not([media])');if(tc)tc.setAttribute('content',isDark?${JSON.stringify(Q)}:${JSON.stringify(X)});if(window.__stxThemeIcon)window.__stxThemeIcon(isDark)});`;function C$($,X){if(X.theme===!1)return $;let Q=$.includes(g7),Z=typeof X.theme==="object"&&X.theme!==null?X.theme:{},Y=Z.default??"dark",J=Z.storageKey??"theme",G=Z.colors?.light??"#ffffff",W=Z.colors?.dark??"#000000";if(Y==="dark"&&!Q){if(!/<html\b[^>]*\bclass=/.test($))$=$.replace(/<html\b([^>]*)>/i,'<html$1 class="dark">');else if(!/<html\b[^>]*\bclass="[^"]*\bdark\b/.test($))$=$.replace(/<html\b([^>]*\bclass=")([^"]*)(")/i,"<html$1$2 dark$3")}if(!$.includes("data-stx-theme-meta")&&/<head\b[^>]*>/i.test($)){let K=['<meta name="color-scheme" content="dark light" data-stx-theme-meta="1">',`<meta name="theme-color" media="(prefers-color-scheme: light)" content="${G}" data-stx-theme-meta="1">`,`<meta name="theme-color" media="(prefers-color-scheme: dark)" content="${W}" data-stx-theme-meta="1">`].join(`
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
// @bun
|
|
2
|
+
import{er as a,fr as b,gr as c,hr as d,ir as e,jr as f}from"./chunk-tjverybm.js";import"./chunk-5g1amf33.js";import"./chunk-0btmm4m2.js";import"./chunk-6w76w8tt.js";import"./chunk-7sdvaras.js";import"./chunk-caf2cj4f.js";import"./chunk-br48y7q9.js";import"./chunk-ja39jznm.js";import"./chunk-9s0ax53m.js";import"./chunk-b16crvqg.js";import"./chunk-wxgkq79w.js";import"./chunk-359ps7j5.js";import"./chunk-64d20kkv.js";import"./chunk-vkc53tv3.js";import"./chunk-24j0qx2z.js";export{f as validateConfig,b as resolveStxDirectories,c as loadStxConfig,e as defineStxConfig,a as defaultConfig,d as config};
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
// @bun
|
|
2
|
-
import{
|
|
2
|
+
import{$p as x,Jp as H,er as g,qm as O,wo as R}from"./chunk-tjverybm.js";import b from"path";var v={enabled:!0,bufferSize:16384,strategy:"auto",timeout:30000},M=/<!-- @section:([\w-]+) -->([\s\S]*?)<!-- @endsection:\1 -->/g;var T=/<!-- @suspense:([\w-]+) -->([\s\S]*?)<!-- @endsuspense:\1 -->/g;function f(q){let B=[],Q=0,G;T.lastIndex=0;while((G=T.exec(q))!==null){if(G.index>Q){let X=q.slice(Q,G.index);if(X.trim())B.push({type:B.length===0?"shell":"content",content:X})}let J=G[1],K=G[2];B.push({type:"suspense",name:J,content:K}),Q=G.index+G[0].length}if(Q<q.length){let J=q.slice(Q);if(J.trim())B.push({type:B.length===0?"shell":"content",content:J})}if(B.length===0)B.push({type:"shell",content:q});return B}async function r(q,B={},Q={}){let G={...g,...Q,streaming:{...v,...Q.streaming}},J=G.streaming?.bufferSize||16384;return new ReadableStream({async start(K){try{let X=await Bun.file(q).text(),z=X.match(/<script\b[^>]*\bserver\b[^>]*>([\s\S]*?)<\/script>/i),L=z?z[1]:"",Y=X.replace(/<script\b[^>]*>[\s\S]*?<\/script>/gi,""),j={...B,__filename:q,__dirname:b.dirname(q)};if(L.trim())await R(L,j,q);let D=f(Y),$=new Set;if(!D.some((w)=>w.type==="suspense")){let w=G.streaming?.strategy||"auto",U=new RegExp(M.source,"g");if(!(w!=="manual"&&U.test(Y))){let F=await H(Y,j,q,G,$);for(let V=0;V<F.length;V+=J)K.enqueue(F.slice(V,V+J)),await new Promise((W)=>setTimeout(W,0))}else{let F=[],V=new RegExp(M.source,"g"),W;while((W=V.exec(Y))!==null)F.push({name:W[1],content:W[2],start:W.index,end:W.index+W[0].length});let y=0;for(let A of F){if(A.start>y){let k=Y.slice(y,A.start);if(k.trim()){let E=await H(k,j,q,G,$);K.enqueue(E),await new Promise((S)=>setTimeout(S,0))}}let I=await H(A.content,j,q,G,$);K.enqueue(I),await new Promise((k)=>setTimeout(k,0)),y=A.end}if(y<Y.length){let A=Y.slice(y);if(A.trim()){let I=await H(A,j,q,G,$);K.enqueue(I)}}}}else{let w=new Map;for(let Z of D)if(Z.type==="shell"||Z.type==="content"){let F=await H(Z.content,j,q,G,$);K.enqueue(F)}else if(Z.type==="suspense"&&Z.name){let F=`stx-suspense-${Z.name}`;K.enqueue(`<div id="${F}" data-suspense="${Z.name}" style="display:contents;">
|
|
3
3
|
<template data-suspense-fallback>Loading...</template>
|
|
4
4
|
</div>`),w.set(Z.name,H(Z.content,j,q,G,$))}K.enqueue(`
|
|
5
5
|
<script>
|
|
@@ -1,3 +1,3 @@
|
|
|
1
1
|
// @bun
|
|
2
|
-
import{Rh as T}from"./chunk-
|
|
2
|
+
import{Rh as T}from"./chunk-8cdfsgjb.js";import{mv as I}from"./chunk-24j0qx2z.js";import E from"fs";import X from"path";import U from"crypto";var _=new Set(["webp","avif","jpeg","png"]),F=new Set(["cover","contain","fill","inside","outside"]),A=new Set([".jpg",".jpeg",".png",".webp",".avif",".gif"]),S=4096,y=80,D="cover";async function g(k,G){let J=G.routePath??"/_stx/img",B=new URL(k.url);if(B.pathname!==J)return null;let $=q(B,G);if(!$.ok)return new Response($.error,{status:$.status,headers:{"Content-Type":"text/plain"}});let{srcFsPath:j,srcUrl:K,width:H,height:v,format:Z,quality:Y,fit:z}=$,C;try{C=E.statSync(j)}catch{return new Response(`Source image not found: ${K}`,{status:404,headers:{"Content-Type":"text/plain"}})}if(!C.isFile())return new Response("Not a file",{status:404,headers:{"Content-Type":"text/plain"}});let N=G.cacheDir??".stx/cache/img";await E.promises.mkdir(N,{recursive:!0});let V=`${j}:${C.mtimeMs}:${C.size}`,O=`${H}x${v}:${Z}:${Y}:${z}`,b=U.createHash("sha256").update(`${V}|${O}`).digest("hex").slice(0,16),Q=X.join(N,`${b}.${Z}`),W={"Content-Type":T(Z),"Cache-Control":"public, max-age=31536000, immutable",ETag:`"${b}"`,"X-Stx-Image-Cache":"HIT"};if(k.headers.get("if-none-match")===`"${b}"`)return new Response(null,{status:304,headers:W});let L=Bun.file(Q);if(await L.exists())return new Response(L,{headers:W});try{let R=Buffer.from(await Bun.file(j).arrayBuffer()),{resizeAndConvert:M}=await P(),w=await M(R,{width:H,height:v,format:Z,quality:Y,fit:z});return await Bun.write(Q,w),W["X-Stx-Image-Cache"]="MISS",new Response(new Uint8Array(w),{headers:W})}catch(R){let M=R.message;return new Response(`Image processing failed: ${M}`,{status:500,headers:{"Content-Type":"text/plain"}})}}function l(k){return async(G)=>{return await g(G,k)??new Response("Not Found",{status:404,headers:{"Content-Type":"text/plain"}})}}function q(k,G){let J=k.searchParams.get("src");if(!J)return{ok:!1,error:"Missing required param: src",status:400};if(!J.startsWith("/"))return{ok:!1,error:"src must be an absolute URL path (start with /)",status:400};if(J.startsWith("//"))return{ok:!1,error:"src must be a local path",status:400};let B=X.extname(J).toLowerCase();if(!A.has(B))return{ok:!1,error:`Unsupported source extension: ${B}`,status:400};let $=X.resolve(G.publicDir),j=X.resolve($,J.slice(1));if(!j.startsWith(`${$}${X.sep}`)&&j!==$)return{ok:!1,error:"src is outside publicDir",status:400};let K=G.maxWidth??S,H=G.maxHeight??S,v=k.searchParams.get("w"),Z=k.searchParams.get("h"),Y=v?Number.parseInt(v,10):0,z=Z?Number.parseInt(Z,10):0;if(v&&(!Number.isFinite(Y)||Y<=0))return{ok:!1,error:"Invalid w (must be positive integer)",status:400};if(Z&&(!Number.isFinite(z)||z<=0))return{ok:!1,error:"Invalid h (must be positive integer)",status:400};if(!v&&!Z)return{ok:!1,error:"At least one of w or h is required",status:400};let C=Math.min(Y||K,K),N=Math.min(z||H,H),V=k.searchParams.get("f")||"webp";if(!_.has(V))return{ok:!1,error:`Invalid f (must be one of: ${[..._].join(", ")})`,status:400};let O=V,b=k.searchParams.get("q"),Q=b?Number.parseInt(b,10):G.defaultQuality??y;if(!Number.isFinite(Q)||Q<1||Q>100)return{ok:!1,error:"Invalid q (must be 1-100)",status:400};let x=k.searchParams.get("fit")||G.defaultFit||D;if(!F.has(x))return{ok:!1,error:`Invalid fit (must be one of: ${[...F].join(", ")})`,status:400};return{ok:!0,srcFsPath:j,srcUrl:J,width:C,height:N,format:O,quality:Q,fit:x}}async function P(){return await import("./chunk-ym0dqh13.js")}
|
|
3
3
|
export{g as Kg,l as Lg};
|
|
@@ -1,3 +1,3 @@
|
|
|
1
1
|
// @bun
|
|
2
2
|
import C from"path";var G=".stx",K="STX_DIR",J=null;function O(j){J=j?.trim()||null}function H(){return process.env[K]?.trim()||J||G}function Q(j=process.cwd(),...q){let B=H();return C.isAbsolute(B)?C.join(B,...q):C.join(j,B,...q)}function W(j){if(!j||C.isAbsolute(j))return j;let q=j.replace(/\\/g,"/");if(q!==G&&!q.startsWith(`${G}/`))return j;let B=q.slice(G.length+1);return B?C.join(H(),B):H()}
|
|
3
|
-
export{G as
|
|
3
|
+
export{G as Bt,K as Ct,O as Dt,H as Et,Q as Ft,W as Gt};
|