@stacksjs/stx 0.2.413 → 0.2.414
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/appearance-bootstrap.js +1 -1
- package/dist/binding-manifest.d.ts +1 -1
- package/dist/bundle-analyzer.js +20 -20
- package/dist/chunk-020xyn9q.js +3 -0
- package/dist/chunk-04jhmfbz.js +2 -0
- package/dist/chunk-10957mcb.js +2 -0
- package/dist/chunk-1098mas0.js +2 -0
- package/dist/chunk-169n1vpx.js +12 -0
- package/dist/chunk-1b6t12hd.js +2 -0
- package/dist/chunk-1chw8xsw.js +2 -0
- package/dist/chunk-1xdzcy9d.js +14 -0
- package/dist/chunk-2ce7f416.js +2 -0
- package/dist/chunk-2gr351s0.js +7 -0
- package/dist/chunk-2mkcjw08.js +2 -0
- package/dist/chunk-2v8wztd5.js +2 -0
- package/dist/chunk-340a824p.js +2 -0
- package/dist/chunk-39g1134q.js +2 -0
- package/dist/chunk-3c74vag1.js +2 -0
- package/dist/chunk-3kthfs03.js +3 -0
- package/dist/chunk-3qn1wcdg.js +2 -0
- package/dist/chunk-3s2vnqcf.js +2 -0
- package/dist/chunk-48bwk47q.js +2 -0
- package/dist/chunk-4bjravgk.js +2 -0
- package/dist/chunk-4jjme6a5.js +2 -0
- package/dist/chunk-5g3y8kym.js +2 -0
- package/dist/chunk-5gsxpaqk.js +2 -0
- package/dist/{chunk-bwsxym3d.js → chunk-5qns2sdz.js} +17 -17
- package/dist/chunk-69mc2np8.js +2785 -0
- package/dist/chunk-6cfa3g0r.js +2 -0
- package/dist/{chunk-bjar18jd.js → chunk-6h38kkjf.js} +46 -52
- package/dist/chunk-6hc5vz20.js +3 -0
- package/dist/chunk-6q6g76vg.js +499 -0
- package/dist/{chunk-bwjxk1dw.js → chunk-6sgswrqw.js} +29 -29
- package/dist/chunk-6y8hnymb.js +2 -0
- package/dist/chunk-74j18qk0.js +930 -0
- package/dist/chunk-752hw7cd.js +4 -0
- package/dist/{chunk-kgd8kchy.js → chunk-765e1s44.js} +11 -76
- package/dist/chunk-7gkv67ky.js +4 -0
- package/dist/chunk-7z2ra0yf.js +2 -0
- package/dist/chunk-866n724v.js +2 -0
- package/dist/chunk-8nhshfz6.js +5 -0
- package/dist/chunk-92ps1xpk.js +2 -0
- package/dist/chunk-9g27ybyr.js +3 -0
- package/dist/{chunk-xq1acw1r.js → chunk-9pt8fd2n.js} +13 -13
- package/dist/{chunk-24zher49.js → chunk-9vrja6vp.js} +4 -4
- package/dist/chunk-9xrbve19.js +2 -0
- package/dist/chunk-a688m6js.js +3 -0
- package/dist/chunk-afhxw2t8.js +2 -0
- package/dist/chunk-ak1cgcah.js +5 -0
- package/dist/{chunk-4m7ajama.js → chunk-amd6ey3t.js} +14 -14
- package/dist/chunk-apg16xcn.js +2 -0
- package/dist/chunk-b52s5z0c.js +2 -0
- package/dist/chunk-b84h16er.js +61 -0
- package/dist/{chunk-hx998w7n.js → chunk-bay9s6rs.js} +13 -13
- package/dist/chunk-bmt7w2pk.js +2 -0
- package/dist/chunk-btmhj5t7.js +2 -0
- package/dist/chunk-ce1sejr3.js +3 -0
- package/dist/chunk-cg8hg6cs.js +3 -0
- package/dist/{chunk-4f9zyfdw.js → chunk-czxt605c.js} +4 -5
- package/dist/chunk-d44b9ktb.js +4 -0
- package/dist/chunk-daz5aqcf.js +24 -0
- package/dist/chunk-dgdm3hy3.js +2 -0
- package/dist/chunk-dvgv8nry.js +11 -0
- package/dist/chunk-dx7n22ed.js +2 -0
- package/dist/chunk-e57rhf65.js +3 -0
- package/dist/chunk-eed4fwps.js +3 -0
- package/dist/chunk-ej9j6k1q.js +3 -0
- package/dist/chunk-et0rr8c7.js +3 -0
- package/dist/chunk-f46qsp4m.js +4 -0
- package/dist/chunk-f6az0xj5.js +2 -0
- package/dist/{chunk-bjcsc6wx.js → chunk-fh1qrp68.js} +21 -21
- package/dist/chunk-fjs0a8h7.js +2 -0
- package/dist/chunk-fr2txj8q.js +829 -0
- package/dist/{chunk-xssw417m.js → chunk-ft4p6d28.js} +14 -14
- package/dist/chunk-fyzajkrx.js +2 -0
- package/dist/chunk-fzapbw9p.js +3 -0
- package/dist/chunk-g578mcb0.js +194 -0
- package/dist/chunk-gawrg4gb.js +216 -0
- package/dist/chunk-gw07qmjk.js +2 -0
- package/dist/chunk-h0atqq82.js +32 -0
- package/dist/chunk-h6zsqb9r.js +3 -0
- package/dist/{chunk-2snqdnk9.js → chunk-h85hrwkq.js} +13 -13
- package/dist/chunk-hbxz85wy.js +2 -0
- package/dist/chunk-hjg3ndgh.js +2 -0
- package/dist/chunk-hkxsewzk.js +2 -0
- package/dist/chunk-hrbbbtbn.js +2 -0
- package/dist/chunk-j03revz2.js +8 -0
- package/dist/chunk-j9qcrwbg.js +2 -0
- package/dist/chunk-jk4njz0w.js +2 -0
- package/dist/chunk-jmabeqfq.js +2 -0
- package/dist/chunk-jt0n43mk.js +2 -0
- package/dist/chunk-kjbv8a3m.js +2 -0
- package/dist/chunk-m1vdghnx.js +2 -0
- package/dist/chunk-m4sk62wb.js +5 -0
- package/dist/chunk-md8rqn48.js +30 -0
- package/dist/chunk-mepdnezf.js +17 -0
- package/dist/chunk-mhq0pjws.js +2 -0
- package/dist/chunk-mp6hy8g4.js +2 -0
- package/dist/chunk-ngc2wke4.js +3 -0
- package/dist/chunk-nn2vstke.js +2 -0
- package/dist/chunk-p2v2a68k.js +2 -0
- package/dist/{chunk-qn5srnj3.js → chunk-pbh4smw3.js} +16 -16
- package/dist/chunk-pdt69hpb.js +2 -0
- package/dist/chunk-pgzvyrv6.js +29 -0
- package/dist/chunk-pj1wg7jg.js +2 -0
- package/dist/chunk-pqxzp1bb.js +3 -0
- package/dist/chunk-px7fvbj6.js +3 -0
- package/dist/chunk-q4c06e8x.js +20 -0
- package/dist/chunk-q6vrb2pe.js +2 -0
- package/dist/chunk-q7qchkvk.js +2 -0
- package/dist/chunk-q9bdh4s5.js +8 -0
- package/dist/chunk-qet5gc6s.js +2033 -0
- package/dist/chunk-qz519eyp.js +2 -0
- package/dist/chunk-r3f9jcf7.js +5 -0
- package/dist/chunk-rs4v4fha.js +4 -0
- package/dist/chunk-s2x4wcrz.js +2 -0
- package/dist/chunk-s5xezjps.js +3 -0
- package/dist/chunk-scezfp0w.js +30 -0
- package/dist/chunk-sd321bn3.js +2 -0
- package/dist/{chunk-smcj3442.js → chunk-sd47dzs0.js} +79 -79
- package/dist/chunk-se7mwqd1.js +2 -0
- package/dist/chunk-shr559s7.js +3 -0
- package/dist/chunk-syaw6b75.js +2 -0
- package/dist/chunk-t4hzprsm.js +3 -0
- package/dist/{chunk-pv3d7sfn.js → chunk-t61vdbje.js} +89 -89
- package/dist/chunk-tfexmdkt.js +3 -0
- package/dist/chunk-thyt8ed8.js +6 -0
- package/dist/chunk-v091jft4.js +12 -0
- package/dist/chunk-v4vaqxrf.js +33 -0
- package/dist/chunk-vgvtnwxa.js +4 -0
- package/dist/chunk-x0q32ees.js +3 -0
- package/dist/chunk-x5bpeb4a.js +2 -0
- package/dist/chunk-x72tv2cg.js +3 -0
- package/dist/chunk-xfp7k0v8.js +64 -0
- package/dist/chunk-xtdw3692.js +6 -0
- package/dist/chunk-y1cmjvk3.js +43 -0
- package/dist/chunk-y5310237.js +311 -0
- package/dist/chunk-ya0qecph.js +27 -0
- package/dist/chunk-yazk54jr.js +8 -0
- package/dist/chunk-ydjfar14.js +2 -0
- package/dist/chunk-ym95v4nc.js +3 -0
- package/dist/chunk-ynvdvbat.js +18 -0
- package/dist/chunk-yvx1ap9b.js +3 -0
- package/dist/chunk-z0g9jvv0.js +40 -0
- package/dist/chunk-z6d0jmjb.js +2 -0
- package/dist/{chunk-8sdhs0zk.js → chunk-zhxdpzga.js} +4 -4
- package/dist/cli.js +110 -110
- package/dist/craft-entry.js +7 -7
- package/dist/craft.js +7 -7
- package/dist/database.js +2 -2
- package/dist/image-optimization/component.js +4 -4
- package/dist/media/image/component.js +5 -5
- package/dist/media/protected/component.js +2 -2
- package/dist/media/video/index.js +4 -4
- package/dist/native/bridge/protocol.d.ts +325 -0
- package/dist/native/bridge/protocol.js +219 -0
- package/dist/native/cli.d.ts +24 -0
- package/dist/native/cli.js +52 -0
- package/dist/native/compiler/bundle.d.ts +41 -0
- package/dist/native/compiler/bundle.js +90 -0
- package/dist/native/compiler/client-script.d.ts +8 -0
- package/dist/native/compiler/client-script.js +31 -0
- package/dist/native/compiler/codegen.d.ts +10 -0
- package/dist/native/compiler/codegen.js +145 -0
- package/dist/native/compiler/headwind-to-style.d.ts +395 -0
- package/dist/native/compiler/headwind-to-style.js +1163 -0
- package/dist/native/compiler/html-to-ir.d.ts +41 -0
- package/dist/native/compiler/html-to-ir.js +411 -0
- package/dist/native/compiler/icons.d.ts +220 -0
- package/dist/native/compiler/icons.js +208 -0
- package/dist/native/compiler/ir.d.ts +234 -0
- package/dist/native/compiler/ir.js +15 -0
- package/dist/native/compiler/parser.d.ts +88 -0
- package/dist/native/compiler/parser.js +753 -0
- package/dist/native/compiler/render-screen.d.ts +26 -0
- package/dist/native/compiler/render-screen.js +31 -0
- package/dist/native/components/primitives.d.ts +291 -0
- package/dist/native/components/primitives.js +22 -0
- package/dist/native/hot-reload/client.d.ts +62 -0
- package/dist/native/hot-reload/client.js +324 -0
- package/dist/native/index.d.ts +90 -0
- package/dist/native/index.js +34 -0
- package/dist/native/primitives/ActivityIndicator.stx +5 -0
- package/dist/native/primitives/Button.stx +5 -0
- package/dist/native/primitives/DatePicker.stx +5 -0
- package/dist/native/primitives/FlatList.stx +5 -0
- package/dist/native/primitives/Image.stx +5 -0
- package/dist/native/primitives/ImageBackground.stx +5 -0
- package/dist/native/primitives/KeyboardAvoidingView.stx +5 -0
- package/dist/native/primitives/Modal.stx +5 -0
- package/dist/native/primitives/Picker.stx +5 -0
- package/dist/native/primitives/Pressable.stx +5 -0
- package/dist/native/primitives/RefreshControl.stx +5 -0
- package/dist/native/primitives/SafeAreaView.stx +5 -0
- package/dist/native/primitives/ScrollView.stx +5 -0
- package/dist/native/primitives/SectionList.stx +5 -0
- package/dist/native/primitives/Slider.stx +5 -0
- package/dist/native/primitives/StatusBar.stx +5 -0
- package/dist/native/primitives/Switch.stx +5 -0
- package/dist/native/primitives/Text.stx +5 -0
- package/dist/native/primitives/TextInput.stx +5 -0
- package/dist/native/primitives/TouchableHighlight.stx +5 -0
- package/dist/native/primitives/TouchableOpacity.stx +5 -0
- package/dist/native/primitives/View.stx +5 -0
- package/dist/native/runtime/craft.d.ts +75 -0
- package/dist/native/runtime/craft.js +0 -0
- package/dist/native/runtime/entry.d.ts +1 -0
- package/dist/native/runtime/entry.js +3 -0
- package/dist/native/runtime/index.d.ts +45 -0
- package/dist/native/runtime/index.js +165 -0
- package/dist/native/runtime/native-host.d.ts +33 -0
- package/dist/native/runtime/native-host.js +184 -0
- package/dist/native/runtime/screen.d.ts +43 -0
- package/dist/native/runtime/screen.js +808 -0
- package/dist/pwa/service-worker.js +1 -1
- package/dist/pwa/workbox.js +1 -1
- package/dist/pwa.js +8 -8
- package/dist/site-url.d.ts +1 -1
- package/dist/ssg.js +53 -53
- package/dist/visual-testing.js +42 -42
- package/dist/web-components/reactive-generator.js +2 -2
- package/package.json +9 -5
- package/dist/chunk-0btmm4m2.js +0 -147
- package/dist/chunk-0c2h69k2.js +0 -4
- package/dist/chunk-0d0qeqvv.js +0 -2
- package/dist/chunk-0psndabd.js +0 -2
- package/dist/chunk-0qv8yf53.js +0 -2
- package/dist/chunk-0vkxyvsd.js +0 -2
- package/dist/chunk-0we9nw1d.js +0 -3
- package/dist/chunk-0xqdmemy.js +0 -3
- package/dist/chunk-0y46fbkx.js +0 -3
- package/dist/chunk-158wqccn.js +0 -4422
- package/dist/chunk-1cyxbb8y.js +0 -16
- package/dist/chunk-1enwnh2a.js +0 -2
- package/dist/chunk-213pzm0d.js +0 -3
- package/dist/chunk-21hzqyja.js +0 -12
- package/dist/chunk-266t58b8.js +0 -5
- package/dist/chunk-27fgag95.js +0 -4
- package/dist/chunk-2a9n102n.js +0 -2
- package/dist/chunk-2eqzrczk.js +0 -2
- package/dist/chunk-2ke37m54.js +0 -14
- package/dist/chunk-35ds08e7.js +0 -3
- package/dist/chunk-3mtwkjcg.js +0 -2
- package/dist/chunk-4xr8zwkp.js +0 -2
- package/dist/chunk-58v77x2c.js +0 -2
- package/dist/chunk-5mhq8605.js +0 -2
- package/dist/chunk-5se8xt9e.js +0 -64
- package/dist/chunk-5zh0h080.js +0 -2
- package/dist/chunk-62435225.js +0 -2
- package/dist/chunk-6kdrncsx.js +0 -30
- package/dist/chunk-6n2rr3x7.js +0 -2
- package/dist/chunk-6xk87qf2.js +0 -30
- package/dist/chunk-72rwcbp6.js +0 -3
- package/dist/chunk-76w34xne.js +0 -3
- package/dist/chunk-7ekd7zj9.js +0 -2
- package/dist/chunk-7pr3wdd5.js +0 -3
- package/dist/chunk-7rxvafwc.js +0 -24
- package/dist/chunk-7tnwfa7w.js +0 -8
- package/dist/chunk-8c5je0wf.js +0 -2
- package/dist/chunk-8dz6nyvx.js +0 -2
- package/dist/chunk-98zj3fv2.js +0 -7
- package/dist/chunk-9e8t0twa.js +0 -3
- package/dist/chunk-9fqp72ze.js +0 -5
- package/dist/chunk-anydpa34.js +0 -3
- package/dist/chunk-ay6zjq8v.js +0 -3
- package/dist/chunk-az4v4ard.js +0 -3
- package/dist/chunk-ba5erggg.js +0 -2
- package/dist/chunk-bnagrdz6.js +0 -2
- package/dist/chunk-by8wghtf.js +0 -2
- package/dist/chunk-cd7h4q51.js +0 -2
- package/dist/chunk-cjmv8hgp.js +0 -33
- package/dist/chunk-cthf912y.js +0 -2
- package/dist/chunk-cxbpmwq5.js +0 -4
- package/dist/chunk-d3sy16qn.js +0 -2
- package/dist/chunk-dh6s7mrj.js +0 -1199
- package/dist/chunk-dm2nzg7a.js +0 -2
- package/dist/chunk-e2sgcnxc.js +0 -2
- package/dist/chunk-e3b7jj74.js +0 -2
- package/dist/chunk-ec4wq2sv.js +0 -6
- package/dist/chunk-ekzg97dn.js +0 -29
- package/dist/chunk-epjt342x.js +0 -2
- package/dist/chunk-eqe26g14.js +0 -18
- package/dist/chunk-ev0v1yma.js +0 -2
- package/dist/chunk-f53psr2y.js +0 -5
- package/dist/chunk-f8p69dsg.js +0 -3
- package/dist/chunk-f95drhdb.js +0 -194
- package/dist/chunk-ff5a6hvb.js +0 -17
- package/dist/chunk-fs5fy4h8.js +0 -2
- package/dist/chunk-fzsygce3.js +0 -2
- package/dist/chunk-g465x63k.js +0 -2
- package/dist/chunk-g708ekh1.js +0 -2
- package/dist/chunk-gcr9e83g.js +0 -11
- package/dist/chunk-gdmyrsr8.js +0 -4
- package/dist/chunk-gkms2ngq.js +0 -2
- package/dist/chunk-gnfywmgs.js +0 -7
- package/dist/chunk-hpf8kq7e.js +0 -2
- package/dist/chunk-j4x3faf8.js +0 -2
- package/dist/chunk-jkavtw9f.js +0 -2
- package/dist/chunk-kg1rdena.js +0 -3
- package/dist/chunk-km91wx0v.js +0 -2
- package/dist/chunk-kmsyvaex.js +0 -8
- package/dist/chunk-mrahwn5v.js +0 -8
- package/dist/chunk-nk3czvnk.js +0 -2
- package/dist/chunk-nmw4eewb.js +0 -2
- package/dist/chunk-nq5zxrk0.js +0 -4
- package/dist/chunk-ny67c03k.js +0 -3
- package/dist/chunk-p4wdxp2c.js +0 -2
- package/dist/chunk-pcxp4r9n.js +0 -3
- package/dist/chunk-pdyeaxc1.js +0 -2
- package/dist/chunk-pf06ded4.js +0 -2
- package/dist/chunk-pfs0gpzm.js +0 -2
- package/dist/chunk-pshdwq44.js +0 -2
- package/dist/chunk-pwgv84pn.js +0 -32
- package/dist/chunk-pwsnafp3.js +0 -4367
- package/dist/chunk-q9n5swx7.js +0 -3
- package/dist/chunk-qr346wnp.js +0 -2
- package/dist/chunk-r02hke04.js +0 -2
- package/dist/chunk-ranshpyc.js +0 -3
- package/dist/chunk-rn194bhp.js +0 -20
- package/dist/chunk-rn1hgyc8.js +0 -930
- package/dist/chunk-s7z5dp70.js +0 -43
- package/dist/chunk-s8jd13nb.js +0 -3
- package/dist/chunk-sn7exv0n.js +0 -2
- package/dist/chunk-t1tdjjht.js +0 -216
- package/dist/chunk-t6qx04s8.js +0 -499
- package/dist/chunk-t6y6gyps.js +0 -2
- package/dist/chunk-tjfs7cc3.js +0 -2
- package/dist/chunk-tkyrk66a.js +0 -3
- package/dist/chunk-tntv9hvq.js +0 -2
- package/dist/chunk-v3nwkveg.js +0 -12
- package/dist/chunk-vd4cb5xr.js +0 -2
- package/dist/chunk-vkhdce50.js +0 -2
- package/dist/chunk-w183av08.js +0 -2
- package/dist/chunk-w2m02njv.js +0 -2
- package/dist/chunk-wpjrcrs5.js +0 -2
- package/dist/chunk-wqmppf6b.js +0 -3
- package/dist/chunk-wtb9fxdy.js +0 -2
- package/dist/chunk-xmzygmcz.js +0 -3
- package/dist/chunk-xsng1mtq.js +0 -3
- package/dist/chunk-xxzefj4j.js +0 -2
- package/dist/chunk-yq8x8bxq.js +0 -47
- package/dist/chunk-ytma76qe.js +0 -3
- package/dist/chunk-yw1m115e.js +0 -2
- package/dist/chunk-z64a924m.js +0 -2
- package/dist/chunk-zcz9rs6p.js +0 -3
package/dist/chunk-dm2nzg7a.js
DELETED
|
@@ -1,2 +0,0 @@
|
|
|
1
|
-
// @bun
|
|
2
|
-
import{qh as x,vh as M,wh as C,xh as v,yh as P}from"./chunk-pcxp4r9n.js";import{kx as y}from"./chunk-ay6zjq8v.js";import{resolve as h,basename as f,extname as u,join as m}from"path";import{mkdir as l}from"fs/promises";var I={enabled:!0,directory:".stx/media-cache",maxAge:30,maxSize:500,cacheVariants:!0,cachePlaceholders:!0};class z{config;constructor(J={}){this.config={...I,...J}}async get(J,Z){return C(J,Z,"image",this.config)}async set(J,Z,Y){return v(J,Z,Y,"image",this.config)}async clear(){return P("image",this.config)}updateConfig(J){this.config={...this.config,...J}}}var H=null;function S(J){if(!H)H=new z(J);else if(J)H.updateConfig(J);return H}async function w(J,Z,Y){let K=Y?{directory:`${Y.outputDir}/../.cache`}:{};return S(K).get(J,Z)}async function Q(J,Z,Y,K){let X=K?{directory:`${K.outputDir}/../.cache`}:{};return S(X).set(J,Z,Y)}async function d(){return S().clear()}async function R(){try{return await import("ts-images")}catch{return null}}function b(J){switch(J){case"quality":return{jpeg:{quality:90,mozjpeg:!0,progressive:!0},png:{compressionLevel:6,palette:!1},webp:{quality:90,effort:6,smartSubsample:!0},avif:{quality:85,effort:6}};case"performance":return{jpeg:{quality:70,mozjpeg:!0,progressive:!0},png:{compressionLevel:9,palette:!0},webp:{quality:70,effort:4,smartSubsample:!0},avif:{quality:60,effort:2}};case"web":default:return{jpeg:{quality:82,mozjpeg:!0,progressive:!0},png:{compressionLevel:8,palette:!1},webp:{quality:82,effort:5,smartSubsample:!0},avif:{quality:75,effort:4}}}}function p(J,Z){let Y=Z?b(Z):b("web"),K=J.formatQuality||{};return{jpeg:{...Y.jpeg,...K.jpeg},png:{...Y.png,...K.png},webp:{...Y.webp,...K.webp},avif:{...Y.avif,...K.avif}}}async function g(J,Z,Y){let K=await R();if(!K)return console.warn("[stx-media] ts-images not installed, skipping optimization"),{src:J,processed:!1};let X=await w(J,Z,Y);if(X)return X;try{let N=h(J);if(!await M(N))return{src:J,processed:!1,errors:[`Source file not found: ${J}`]};let L=p(Y,Z.preset),V=Y.outputDir||"dist/images",F=Y.baseUrl||"/images";await l(V,{recursive:!0});let q=await x(N),U=f(J,u(J)),E=Z.outputFormat?[Z.outputFormat]:Y.defaultFormats||["avif","webp","jpeg"],G={src:J,processed:!0,variants:[],hash:q},j=null;if(Z.transformations&&Z.transformations.length>0)j=await D(N,Z.transformations,K);for(let $ of E){let A=L[$]||{},W=`${U}-${q}.${$}`,_=m(V,W);try{let O=await K.optimizeImage({input:j||N,output:_,format:$,quality:A.quality,progressive:A.progressive});if(O){if(G.variants.push({path:_,url:`${F}/${W}`,width:O.width||0,height:O.height||0,format:$,size:O.outputSize||0}),!G.originalWidth&&O.width)G.originalWidth=O.width,G.originalHeight=O.height}}catch(O){G.errors=G.errors||[],G.errors.push(`Failed to optimize ${$}: ${O}`)}}if(Z.embedThumbhash||Z.placeholder==="thumbhash")try{let $=await K.generateThumbHash(N);G.placeholder=$.dataUrl}catch($){G.errors=G.errors||[],G.errors.push(`Failed to generate thumbhash: ${$}`)}if(Z.useDominantColor)try{let $=await K.generatePlaceholder(N,{strategy:"dominant-color"});G.dominantColor=$.dominantColor}catch($){G.errors=G.errors||[],G.errors.push(`Failed to extract dominant color: ${$}`)}return await Q(J,Z,G,Y),G}catch(N){return{src:J,processed:!1,errors:[`Processing failed: ${N}`]}}}async function n(J,Z,Y,K){let X=await R();if(!X)return{success:!1,error:"ts-images not installed"};try{return{success:!0,size:(await X.optimizeImage({input:J,output:K,format:Z,quality:Y}))?.outputSize}}catch(N){return{success:!1,error:String(N)}}}async function D(J,Z,Y){let K=Y||await R();if(!K)return console.warn("[stx-media] ts-images not installed, skipping transformations"),null;try{let X=await K.decode(J);for(let N of Z){let L=N.options||{};switch(N.type){case"resize":if(L.width||L.height)X=await K.resize(X,{width:L.width,height:L.height,fit:L.fit});break;case"blur":if(L.sigma!==void 0)X=await K.blur(X,L.sigma);break;case"sharpen":if(L.amount!==void 0)X=await K.sharpen(X,L.amount);break;case"grayscale":X=await K.grayscale(X);break;case"rotate":if(L.angle!==void 0)X=await K.rotate(X,L.angle);break;case"flip":X=await K.flip(X);break;case"flop":X=await K.flop(X);break;case"brightness":if(L.value!==void 0)X=await K.brightness(X,L.value);break;case"contrast":if(L.value!==void 0)X=await K.contrast(X,L.value);break;case"saturation":if(L.value!==void 0)X=await K.saturation(X,L.value);break}}return await K.encode(X,"png")}catch(X){return console.error(`[stx-media] Transformation failed: ${X}`),null}}import{resolve as c,basename as i,extname as r,join as o}from"path";import{mkdir as a}from"fs/promises";async function e(){try{return await import("ts-images")}catch{return null}}var s=[320,480,640,768,1024,1280,1536,1920];async function t(J,Z,Y){let K=await e();if(!K)return console.warn("[stx-media] ts-images not installed, skipping responsive generation"),null;let X=c(J);if(!await M(X))return console.warn(`[stx-media] Source file not found: ${J}`),null;try{let N=Z.responsiveWidths||Y.breakpoints||s,L=Z.formats||Y.defaultFormats||["avif","webp","jpeg"],V=Y.outputDir||"dist/images",F=Y.baseUrl||"/images";await a(V,{recursive:!0});let q=await x(X),U=i(J,r(J)),E=Y.formatQuality||{jpeg:{quality:82},png:{quality:80},webp:{quality:82},avif:{quality:75}},G={src:J,byFormat:{},srcsets:{}};for(let $ of L){G.byFormat[$]=[];let A=[];for(let W of N){let _=`${U}-${W}w-${q}.${$}`,O=o(V,_),B=`${F}/${_}`;try{let T=E[$]?.quality||80;if(await M(O)){G.byFormat[$].push({path:O,url:B,width:W,height:0,format:$,size:0}),A.push(`${B} ${W}w`);continue}let k=await K.processImage({input:X,output:O,format:$,quality:T,resize:{width:W}});if(k)G.byFormat[$].push({path:O,url:B,width:W,height:k.height||Math.round(W*(k.height||1)/(k.width||1)),format:$,size:k.outputSize||0}),A.push(`${B} ${W}w`)}catch(T){console.warn(`[stx-media] Failed to generate ${$} at ${W}w: ${T}`)}}G.srcsets[$]=A.join(", ")}let j=Z.placeholder||Y.placeholderStrategy||"thumbhash";if(j!=="none")try{if(j==="thumbhash"){let $=await K.generateThumbHash(X);G.placeholder={dataURL:$.dataUrl,width:$.width||32,height:$.height||32,strategy:"thumbhash"}}else{let $=await K.generatePlaceholder(X,{strategy:j,width:20});G.placeholder={dataURL:$.dataURL,width:$.width,height:$.height,strategy:j}}}catch($){console.warn(`[stx-media] Failed to generate placeholder: ${$}`)}return G.sizes=Z.sizes||JJ(N),G}catch(N){return console.error(`[stx-media] Responsive generation failed: ${N}`),null}}function JJ(J){let Z=[...J].sort((K,X)=>K-X),Y=[];for(let K=0;K<Z.length-1;K++){let X=Z[K];Y.push(`(max-width: ${X}px) ${X}px`)}return Y.push(`${Z[Z.length-1]}px`),Y.join(", ")}function KJ(J,Z="width"){if(!J||J.length===0)return"";if(Z==="dpr")return J.filter((Y)=>Y.dpr).map((Y)=>`${Y.url} ${Y.dpr}x`).join(", ");return J.map((Y)=>`${Y.url} ${Y.width}w`).join(", ")}export{z as Yg,w as Zg,Q as _g,d as $g,g as ah,n as bh,D as ch,t as dh,KJ as eh};
|
package/dist/chunk-e2sgcnxc.js
DELETED
|
@@ -1,2 +0,0 @@
|
|
|
1
|
-
// @bun
|
|
2
|
-
import{Af as A,Bf as B,Cf as C,Df as D,Ef as E,tf as t,uf as u,vf as v,wf as w,xf as x,yf as y,zf as z}from"./chunk-s7z5dp70.js";import{Ff as r,Gf as s}from"./chunk-213pzm0d.js";import{Hf as b,If as c,Jf as d,Kf as e,Lf as f,Mf as g,Nf as h,Pf as i,Qf as j,Rf as k,Sf as l,Tf as m,Uf as n,Vf as o,Wf as p,Xf as q}from"./chunk-ytma76qe.js";import{li as a}from"./chunk-0we9nw1d.js";import"./chunk-0btmm4m2.js";import"./chunk-ay6zjq8v.js";export{D as writeImageManifest,a as rewriteImagesWithSiblings,t as renderImageComponent,v as processImageComponents,g as processImage,u as parseImageComponent,A as optimizeImage,B as optimizeDirectory,e as isSharpAvailable,m as isImageFile,f as isImageBackendAvailable,y as imageDirective,r as handleImageRequest,l as groupVariantsByFormat,o as getTotalSize,n as getMimeType,h as getImageMetadata,k as getFallbackVariant,i as generateSrcSet,j as generateSizes,C as generateImageManifest,p as formatSize,E as defaultImageConfig,z as createImagePlugin,s as createImageHandler,x as createImageDirective,w as clearImageCache,q as ImageProcessingError,b as DEFAULT_WIDTHS,d as DEFAULT_QUALITY,c as DEFAULT_FORMATS};
|
package/dist/chunk-e3b7jj74.js
DELETED
|
@@ -1,2 +0,0 @@
|
|
|
1
|
-
// @bun
|
|
2
|
-
import{$ as pm,$a as to,$b as Ep,$c as Eq,$d as Er,A as $k,Aa as En,Ab as Xo,Ac as dq,Ad as dr,Ae as js,B as al,Ba as Fn,Bb as Zo,Bc as eq,Bd as er,Be as ks,C as bl,Ca as Gn,Cb as _o,Cc as fq,Cd as fr,Ce as ls,D as cl,Da as Hn,Db as $o,Dc as gq,Dd as gr,De as ms,E as dl,Ea as In,Eb as ap,Ec as hq,Ed as hr,Ee as ns,F as el,Fa as Jn,Fb as bp,Fc as iq,Fd as ir,Fe as os,G as fl,Ga as Kn,Gb as cp,Gc as jq,Gd as jr,Ge as ps,H as gl,Ha as Ln,Hb as dp,Hc as kq,Hd as kr,He as qs,I as hl,Ia as Yn,Ib as ep,Ic as lq,Id as lr,Ie as rs,J as il,Ja as Zn,Jb as fp,Jc as mq,Jd as mr,Je as ss,K as _l,Ka as _n,Kb as gp,Kc as nq,Kd as nr,Ke as ts,L as $l,La as $n,Lb as hp,Lc as oq,Ld as or,Le as us,M as am,Ma as ao,Mb as ip,Mc as pq,Md as pr,Me as vs,N as bm,Na as bo,Nb as jp,Nc as qq,Nd as qr,Ne as ws,O as cm,Oa as go,Ob as kp,Oc as rq,Od as rr,Oe as xs,P as dm,Pa as ho,Pb as lp,Pc as sq,Pd as sr,Pe as ys,Q as em,Qa as io,Qb as mp,Qc as tq,Qd as tr,Qe as zs,R as fm,Ra as jo,Rb as np,Rc as uq,Rd as ur,S as gm,Sa as ko,Sb as op,Sc as vq,Sd as vr,T as hm,Ta as lo,Tb as wp,Tc as wq,Td as wr,U as im,Ua as mo,Ub as xp,Uc as xq,Ud as xr,V as jm,Va as no,Vb as yp,Vc as yq,Vd as yr,W as km,Wa as oo,Wb as zp,Wc as zq,Wd as zr,X as lm,Xa as po,Xb as Ap,Xc as Aq,Xd as Ar,Y as mm,Ya as qo,Yb as Bp,Yc as Bq,Yd as Br,Z as nm,Za as ro,Zb as Cp,Zc as Cq,Zd as Cr,_ as om,_a as so,_b as Dp,_c as Dq,_d as Dr,aa as qm,ab as uo,ac as Fp,ad as Fq,ae as Fr,ba as rm,bb as vo,bc as Gp,bd as Gq,be as Gr,ca as sm,cb as wo,cc as Hp,cd as Hq,ce as Hr,da as tm,db as xo,dc as Ip,dd as Iq,de as Ir,ea as um,eb as yo,ec as Jp,ed as Jq,ee as Jr,fa as vm,fb as zo,fc as Kp,fd as Kq,fe as Kr,ga as wm,gb as Ao,gc as Lp,gd as Lq,ge as Lr,ha as xm,hb as Bo,hc as Mp,hd as Mq,he as Sr,ia as ym,ib as Co,ic as Np,id as Nq,ie as Tr,ja as zm,jb as Do,jc as Op,jd as Oq,je as Ur,ka as Am,kb as Eo,kc as Pp,kd as Pq,ke as Vr,la as Bm,lb as Fo,lc as Qp,ld as Qq,le as Wr,ma as Cm,mb as Go,mc as Rp,md as Rq,me as Xr,na as Dm,nb as Ho,nc as Sp,nd as Sq,ne as Yr,o as a,oa as Em,ob as Io,oc as Tp,od as Tq,oe as Zr,p as Mk,pa as Fm,pb as Jo,pc as Up,pd as Uq,pe as _r,q as Nk,qa as Gm,qb as Ko,qc as Vp,qd as Vq,qe as $r,r as Ok,ra as Hm,rb as Lo,rc as Wp,rd as Wq,re as as,s as Pk,sa as Im,sb as Mo,sc as Xp,sd as Xq,se as bs,t as Qk,ta as Jm,tb as Po,tc as Yp,td as Yq,te as cs,u as Rk,ua as Km,ub as Qo,uc as Zp,ud as Zq,ue as ds,v as Sk,va as zn,vb as Ro,vc as _p,vd as _q,ve as es,w as Tk,wa as An,wb as So,wc as $p,wd as $q,we as fs,x as Uk,xa as Bn,xb as Uo,xc as aq,xd as ar,xe as gs,y as Zk,ya as Cn,yb as Vo,yc as bq,yd as br,ye as hs,z as _k,za as Dn,zb as Wo,zc as cq,zd as cr,ze as is}from"./chunk-158wqccn.js";import{Re as pp,Se as qp,Te as rp,Ue as sp,Ve as tp,We as up,Xe as vp}from"./chunk-rn194bhp.js";import{Ye as No,Ze as Oo}from"./chunk-72rwcbp6.js";import{_e as To}from"./chunk-7rxvafwc.js";import{$e as yn}from"./chunk-wqmppf6b.js";import{af as co,bf as eo,cf as fo,df as Yo}from"./chunk-xmzygmcz.js";import{ef as jl,ff as kl,gf as ll,hf as ml,if as nl,jf as ol,kf as pl,lf as ql,mf as rl,nf as sl,of as tl,pf as ul,qf as vl,rf as wl,sf as xl}from"./chunk-6kdrncsx.js";import{Af as Vl,Bf as Wl,Cf as Xl,Df as Yl,Ef as Zl,tf as Ol,uf as Pl,vf as Ql,wf as Rl,xf as Sl,yf as Tl,zf as Ul}from"./chunk-s7z5dp70.js";import{Ff as Ml,Gf as Nl}from"./chunk-213pzm0d.js";import{Hf as yl,If as zl,Jf as Al,Kf as Bl,Lf as Cl,Mf as Dl,Nf as El,Pf as Fl,Qf as Gl,Rf as Hl,Sf as Il,Tf as Jl,Uf as Kl,Xf as Ll}from"./chunk-ytma76qe.js";import{$f as kn,Yf as gn,Zf as hn,_f as jn,ag as ln,bg as xn}from"./chunk-cxbpmwq5.js";import{Ag as tn,Bg as un,Cg as vn,Dg as wn,cg as Lm,dg as Mm,eg as Nm,fg as Om,gg as Pm,hg as Qm,ig as Rm,jg as Sm,kg as Tm,lg as Um,mg as Vm,ng as Wm,og as Xm,pg as Ym,qg as Zm,rg as _m,sg as $m,tg as mn,ug as nn,vg as on,wg as pn,xg as qn,yg as rn,zg as sn}from"./chunk-6xk87qf2.js";import{Eg as an,Fg as bn}from"./chunk-ny67c03k.js";import{Gg as Mn,Hg as Nn,Ig as On,Jg as Pn,Kg as Qn,Lg as Rn,Mg as Sn,Ng as Tn,Og as Un,Pg as Vn,Qg as Wn,Rg as Xn}from"./chunk-xsng1mtq.js";import{Sg as vi,Tg as wi,Ug as xi,Vg as yi,Wg as zi,Xg as Ai}from"./chunk-0xqdmemy.js";import{Yg as Qj,Zg as Rj,_g as Sj,ch as Tj,dh as Uj,eh as Vj}from"./chunk-dm2nzg7a.js";import{fh as $j,gh as ak,hh as bk,ih as ck,jh as dk,kh as ek,lh as fk,mh as gk,nh as hk,oh as ik,ph as jk}from"./chunk-ekzg97dn.js";import{Ah as Pj,qh as Gj,rh as Hj,sh as Ij,th as Jj,uh as Kj,wh as Lj,xh as Mj,yh as Nj,zh as Oj}from"./chunk-pcxp4r9n.js";import{Bh as Bk,Dh as Ck}from"./chunk-76w34xne.js";import{Jh as Qh,Kh as Rh,Lh as Sh,Mh as Th,Nh as Uh,Oh as Vh}from"./chunk-t1tdjjht.js";import{$h as fi,Qh as Wh,Rh as Xh,Sh as Yh,Th as Zh,Uh as _h,Vh as $h,Wh as ai,Xh as bi,Yh as ci,Zh as di,_h as ei,ai as gi,bi as hi}from"./chunk-bjar18jd.js";import{di as ii,ei as ji,fi as ki,gi as li}from"./chunk-27fgag95.js";import{li as mi}from"./chunk-0we9nw1d.js";import{oi as ph}from"./chunk-cjmv8hgp.js";import{pi as qh}from"./chunk-bwsxym3d.js";import{qi as rh,ri as sh}from"./chunk-xq1acw1r.js";import{si as th,ti as uh,ui as vh,vi as wh,wi as xh,xi as yh}from"./chunk-hx998w7n.js";import{Ai as Bh,Bi as Ch,Ci as Dh,yi as zh,zi as Ah}from"./chunk-bjcsc6wx.js";import{Di as Eh,Ei as Fh,Fi as Gh,Gi as Hh,Hi as Ih}from"./chunk-qn5srnj3.js";import{Ii as Jh,Ji as Kh,Ki as Lh,Li as Mh,Mi as Nh,Ni as Oh,Oi as Ph}from"./chunk-4m7ajama.js";import{Pi as nh,Qi as oh}from"./chunk-gcr9e83g.js";import"./chunk-0c2h69k2.js";import{$i as Xe,Ui as Qe,Vi as Re,Wi as Se,Xi as Te,Yi as Ue,Zi as Ve,_i as We,aj as Ye,bj as Ze,cj as _e,dj as $e,ej as af,fj as bf}from"./chunk-f95drhdb.js";import{Aj as Jf,gj as tf,hj as uf,ij as vf,jj as wf,kj as xf,lj as yf,mj as zf,nj as Af,oj as Bf,pj as Cf,qj as Df,rj as Ef,sj as Ff,tj as Gf,uj as Hf,zj as If}from"./chunk-kgd8kchy.js";import{Hj as ef,Ij as ff,Jj as gf,Kj as hf,Lj as jf,Mj as kf,Nj as lf,Oj as mf,Pj as nf,Qj as of,Rj as pf,Sj as qf,Tj as rf,Uj as sf}from"./chunk-9e8t0twa.js";import{$j as Qf,Vj as Kf,Wj as Lf,Xj as Mf,Yj as Nf,Zj as Of,_j as Pf,ak as Rf,bk as Sf,ck as Tf,dk as Uf,ek as Vf,fk as Wf,gk as Xf}from"./chunk-f8p69dsg.js";import{Ak as Mr,Bk as Nr,Ck as Or,Dk as Pr,Ek as Qr,Fk as Rr}from"./chunk-eqe26g14.js";import{Gk as Vk,Hk as Wk,Ik as Xk,Jk as Yk,Kk as cn,Lk as dn,Mk as en,Nk as fn}from"./chunk-f53psr2y.js";import"./chunk-anydpa34.js";import"./chunk-ff5a6hvb.js";import{Dl as gc,yl as ec,zl as fc}from"./chunk-ec4wq2sv.js";import{Fl as bc}from"./chunk-s8jd13nb.js";import{$l as lb,$m as bd,$n as ue,$o as bg,$p as mh,$q as pj,Am as tc,An as Fd,Ap as Ng,Aq as Hi,Ar as pk,Bm as uc,Bn as Gd,Bp as Og,Bq as Ii,Br as qk,Cm as vc,Cn as Hd,Cp as Pg,Cq as Ji,Cr as rk,Dm as wc,Dn as Id,Dp as Qg,Dq as Ki,Dr as sk,Em as xc,En as Jd,Ep as Rg,Eq as Li,Er as tk,Fm as yc,Fn as Kd,Fp as Sg,Fq as Mi,Fr as uk,Gl as xa,Gm as zc,Gn as Ld,Gp as Tg,Gq as Ni,Gr as vk,Hl as ya,Hm as Ac,Hn as Md,Hp as Ug,Hq as Oi,Hr as wk,Il as za,Im as Bc,In as Nd,Ip as Vg,Iq as Pi,Ir as xk,Jl as Aa,Jm as Cc,Jn as Od,Jp as Wg,Jq as Qi,Jr as yk,Kl as Ba,Km as Dc,Kn as Pd,Kp as Xg,Kq as Ri,Kr as zk,Ll as Ca,Lm as Ec,Ln as Qd,Lp as Yg,Lq as Si,Lr as Ak,Ml as Da,Mm as Fc,Mn as Rd,Mp as Zg,Mq as aj,Mr as Dk,Nl as Ea,Nm as Gc,Nn as Sd,Np as _g,Nq as bj,Nr as Ek,Ol as Fa,Om as Hc,On as Td,Oo as Zf,Op as $g,Oq as cj,Or as Fk,Pl as Ga,Pm as Ic,Pn as Ud,Pp as ah,Pq as dj,Pr as Gk,Ql as Ha,Qm as Jc,Qn as Vd,Qp as bh,Qq as ej,Qr as Hk,Rl as Ia,Rm as Kc,Rn as Wd,Rp as ch,Rq as fj,Rr as Ik,Sl as Ja,Sm as Lc,Sn as Xd,Sp as dh,Sq as gj,Sr as Jk,Tl as Ka,Tm as Mc,Tn as Yd,Tp as eh,Tq as hj,Tr as Kk,Ul as La,Um as Nc,Un as Zd,Up as fh,Uq as ij,Ur as Lk,Vl as Ma,Vm as Oc,Vn as _d,Vp as gh,Vq as jj,Wl as Na,Wm as Pc,Wn as $d,Wo as _f,Wp as hh,Wq as kj,Xl as Oa,Xm as Qc,Xn as ae,Xp as ih,Xq as lj,Yl as ib,Ym as _c,Yn as re,Yo as $f,Yp as jh,Yq as mj,Zl as jb,Zm as $c,Zn as se,Zp as kh,Zq as nj,_l as kb,_m as ad,_n as te,_o as ag,_p as lh,_q as oj,am as mb,an as cd,ao as ve,ap as cg,aq as ni,ar as qj,bm as nb,bn as dd,bo as we,bp as dg,bq as oi,br as rj,cn as ed,co as xe,cp as eg,cr as sj,do as ye,dp as fg,dr as tj,em as Kb,en as fd,eo as ze,ep as rg,eq as pi,er as uj,fm as Lb,fn as gd,fo as Ae,fp as sg,fr as vj,gm as Mb,gn as hd,go as Be,gp as tg,gr as wj,hm as Nb,hn as id,ho as Ce,hp as ug,hr as xj,im as Ob,in as jd,io as De,ip as vg,ir as yj,jm as Pb,jn as kd,jo as Ee,jp as wg,jr as zj,km as Qb,kn as ld,kp as xg,kr as Aj,lm as Ub,ln as md,lo as Je,lp as yg,lr as Bj,mm as Vb,mn as nd,mo as Ke,mp as zg,mr as Cj,nm as Wb,nn as od,no as Le,np as Ag,nr as Dj,om as hc,on as pd,oo as Me,op as Bg,or as Ej,pm as ic,pn as qd,po as Ne,pp as Cg,pq as qi,pr as Fj,qm as jc,qn as vd,qo as Oe,qp as Dg,qq as ri,qr as Wj,rm as kc,rn as wd,ro as Pe,rp as Eg,rq as si,rr as Xj,sm as lc,sn as xd,sp as Fg,sq as ti,sr as Yj,tm as mc,tn as yd,tp as Gg,tq as ui,tr as Zj,um as nc,un as zd,up as Hg,uq as Bi,ur as _j,vm as oc,vn as Ad,vo as cf,vp as Ig,vq as Ci,vr as kk,wm as pc,wn as Bd,wo as df,wp as Jg,wq as Di,wr as lk,xm as qc,xn as Cd,xp as Kg,xq as Ei,xr as mk,ym as rc,yn as Dd,yo as Yf,yp as Lg,yq as Fi,yr as nk,zm as sc,zn as Ed,zp as Mg,zq as Gi,zr as ok}from"./chunk-pwsnafp3.js";import{$r as S,As as ta,Bs as ua,Cs as va,Ds as wa,Vr as M,Wr as N,Xr as O,Yr as P,Zr as Q,_r as R,as as T,bs as U,cs as V,ds as W,es as X,fs as Y,gs as Z,hs as _,is as $,js as aa,ks as ba,ls as ca,ms as da,ns as ea,os as fa,ps as ia,qs as ja,rs as ka,ss as la,ts as ma,us as na,vs as oa,ws as pa,xs as qa,ys as ra,zs as sa}from"./chunk-1cyxbb8y.js";import{Es as ga,Fs as ha}from"./chunk-zcz9rs6p.js";import{Gs as Rb,Hs as Sb,Is as Tb}from"./chunk-v3nwkveg.js";import"./chunk-9fqp72ze.js";import{Ps as Ti,Qs as Ui,Rs as Vi,Ss as Wi,Ts as Xi,Us as Yi,Vs as Zi,Ws as _i,Xs as $i}from"./chunk-0btmm4m2.js";import{Ct as Xc,Dt as Yc,Et as Zc,nt as Rc,ot as Sc,pt as Tc,qt as Uc,rt as Vc,tt as Wc}from"./chunk-pwgv84pn.js";import{Ft as Xb,Gt as Yb,Ht as Zb,It as _b,Jt as $b,Kt as ac}from"./chunk-tkyrk66a.js";import{Rt as Fe,Ut as Ge,Vt as He,Yt as Ie}from"./chunk-ranshpyc.js";import"./chunk-98zj3fv2.js";import{bu as cc,cu as dc}from"./chunk-35ds08e7.js";import{gu as gg,hu as hg,iu as ig,ju as jg,ku as kg,lu as lg,mu as mg,ou as ng,pu as og,qu as pg,ru as qg}from"./chunk-5se8xt9e.js";import{Fu as be,Gu as ce,Hu as de,Iu as ee,Ju as fe,Ku as ge,Lu as he,Mu as ie,Nu as je,Ou as ke,Pu as le,Qu as me,Ru as ne,Su as oe,Tu as pe,Uu as qe,su as rd,tu as sd,uu as td,vu as ud}from"./chunk-gnfywmgs.js";import{$u as h,Av as L,Vu as b,Wu as c,Xu as d,Yu as e,Zu as f,_u as g,av as i,bv as m,cv as n,dv as o,ev as p,fv as q,gv as r,hv as s,iv as t,jv as u,kv as v,lv as w,mv as x,nv as y,ov as z,pv as A,qv as B,rv as C,sv as D,tv as E,uv as F,vv as G,wv as H,xv as I,yv as J,zv as K}from"./chunk-yq8x8bxq.js";import"./chunk-266t58b8.js";import"./chunk-nq5zxrk0.js";import{$v as zb,Qv as ob,Rv as pb,Sv as qb,Tv as rb,Uv as sb,Vv as tb,Wv as ub,Xv as vb,Yv as wb,Zv as xb,_v as yb,aw as Ab,bw as Bb,cw as Cb,dw as Db,ew as Eb,fw as Fb,gw as Gb,hw as Hb,iw as Ib,jw as Jb}from"./chunk-az4v4ard.js";import{Dw as Ua,Ew as Va,Fw as Wa,Gw as Xa,Hw as Ya,Iw as Za,Jw as _a,Kw as $a,Lw as ab,Mw as bb,Nw as cb,Ow as db,Pw as eb,Qw as fb,Rw as gb,Tw as hb,nw as Pa,ow as Qa,rw as Ra,ww as Sa,xw as Ta}from"./chunk-4f9zyfdw.js";import"./chunk-xssw417m.js";import{dx as j,ex as k,fx as l}from"./chunk-kg1rdena.js";import"./chunk-ay6zjq8v.js";export{tl as writeNetlifyConfig,nn as writeManifest,Yl as writeImageManifest,Fp as wrapComponentForHMR,ms as withDefaults,Ak as webComponentDirectiveHandler,uq as watermark,wr as watchViews,gm as watchMultiple,hm as watchEffect,fm as watch,Ne as warmImagePlaceholders,um as waitForStore,X as waitForLocale,qp as virtualPathFor,nk as videoDirective,G as validators,qs as validated,Ce as validateValueEnhanced,qi as validateTemplate,an as validateRouteRules,zq as validateParams,De as validateFormEnhanced,lr as validateFile,ye as validateFields,xe as validateField,si as validateDirective,Xd as validateCspDirectives,Ik as validateConfig,An as validateComponentScripts,Yn as validateComponentProps,mh as validateClientScript,li as v,Hc as usesSignalsInScript,ub as usesReactiveRuntime,Gi as userComponentFileExists,Th as useVirtualList,je as useTitle,tm as useStoreOrThrow,Xp as useStore,al as useStorage,Bf as useSlots,cl as useSessionStorage,cc as useServerRuntimeConfig,Zf as useServerData,ge as useSeoMeta,dc as useRuntimeConfig,vm as useRouteParams,xm as useRouteParamOrThrow,wm as useRouteParam,je as usePageTitle,sf as useOptimistic,Gf as useModel,zm as useMiddlewareValue,ym as useMiddlewareState,bl as useLocalStorage,yp as useLoadingIndicator,ee as useHead,ii as useForm,Df as useAttrs,nr as uploadFiles,mr as uploadFile,qm as updateInstance,qf as untrack,Wi as unregisterDirective,rm as unmountInstance,Qc as unescapeHtml,up as typecheckStxFiles,Ei as transpileTypeScript,$r as translate,Ba as transitionDirective,lc as transformAutoImports,Sn as toUsers,Rn as toUser,dq as thumbnail,er as thumbHashToRGBA,fr as thumbHashToDataURL,wb as templateNeedsRuntime,vb as templateHasReactiveContext,Kf as templateCache,nd as syncRecordedResponse,Cp as stxClientHelpers,lg as structuredDataDirective,cs as stripLocalePrefix,Ym as stripDocumentWrapper,Sb as stripCommentsAndLiterals,Do as stringToStream,Ld as strictCspPreset,Ye as streamingSuspenseDirective,af as streamToResponse,We as streamTemplateSimple,Qe as streamTemplate,Uk as stopHmrServer,On as stopBroadcasting,_b as stateDirName,$b as stateDir,ef as state,gh as startsDocument,Yo as startProductionServer,To as startInteractive,Nn as startBroadcasting,es as stampLocaleLayoutGroup,Ia as staggerDirective,xq as srcsetUrls,Ja as springDirective,ud as splitByPipe,Um as spaNavVaryHeaders,rp as sourcePathFor,Eq as smartBatchSign,Ii as slotContentHasExpressions,Cq as signUrl,Ci as shouldTranspileTypeScript,Rk as shouldReloadOnChange,Hq as shouldRefreshSignature,Sk as shouldIgnoreFile,Lh as shouldCacheComponent,hq as sharpen,ts as shape,Zb as setStateDir,Dm as setRouteParams,Em as setMiddlewareState,_k as setKeptScope,Me as setImagePlaceholder,vf as setGlobalProvide,b as setErrorLocale,_l as setCurrentInstance,bk as setCachedVideoResult,Sj as setCachedImageResult,Mj as setCached,ws as serveStxFile,ys as serveMultipleStxFiles,Mk as serveMarkdownFile,hp as serveFile,zs as serveApp,gp as serve,Ip as serializeState,pn as serializeSetCookie,jq as sepia,he as seoMetaToHeadConfig,Ca as scrollAnimateDirective,va as screenReaderDirective,Fi as scopeOnRootElement,rk as scopeHTML,qk as scopeCSS,og as scanForSitemapEntries,pa as scanA11yTargets,qa as scanA11yIssues,nq as saturation,Aq 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,Gb as runtimeEventRegexLiteral,Eb as runtimeDirectiveNamesLiteral,zg as runPreProcessingMiddleware,Ag as runPostProcessingMiddleware,sn as runPageAction,lf as runMountCallbacks,gb as runMiddleware,om as runHooks,Ur as runDoctor,mf as runDestroyCallbacks,Dg as runComposers,oq as rotate,mi as rewriteImagesWithSiblings,od as responseBindings,Mi as resolveTemplatePath,ha as resolveStxTargets,Ek as resolveStxDirectories,_r as resolveI18n,bq as resize,rg as resetUnscopedSignalWarnings,Oc as resetRejectedExpressionWarnings,sc as resetPlaceholders,de as resetHead,Hp as resetHMRHandler,o as resetErrorConfig,os as required,dg as reportDeferredLoopWarnings,wc as replacePlaceholders,Ec as replaceInterpolations,ur as renderView,kk as renderVideoComponent,ic as renderVendorStyleTags,Dr as renderToString,Er as renderToStream,Fr as renderToDOM,dr as renderThumbhashToCanvas,Rr as renderTemplateString,Pr as renderTemplate,Qr as renderString,Te as renderStreamingPage,xi as renderSlot,Bh as renderSSRSuspense,Pq as renderProtectedVideo,Oq as renderProtectedImg,Bq as renderMediaUpload,Or as renderMarkdownView,en as renderLayoutTypes,Wj as renderImgComponent,Ol as renderImageComponent,le as renderHtmlAttrs,ke as renderHead,xr as renderEmail,Ki as renderComponentWithSlot,me as renderBodyAttrs,Sp as render,Nd as relaxedCspPreset,we as registerValidationRule,_e as registerStreamingDirectives,Zp as registerStoresClient,Bm as registerStore,Sf as registerServeModuleBundle,mg as registerSeoDirectives,_a as registerMiddleware,Ac as registerFilters,zc as registerFilter,d as registerErrorMessages,Be as registerEnhancedValidationRule,Ti as registerDirective,Wd as registerCspDirectives,$n as registerComponentDirectives,Oa as registerAnimationDirectives,wa as registerA11yDirectives,mc as referencesName,cm as ref,Lo as redirect,jd as recordResponseStatus,kd as recordResponseHeader,ac as rebaseOntoStateDir,ld as readResponseStatus,md as readResponseHeaders,Kk as readMarkdownFile,Lf as readFileCached,dm as reactive,sq as quality,Mq as pruneSignatureCache,Pj as pruneCache,tf as provide,Nr as protectCodeBlocks,ns as prop,Gg as processVueTemplate,Rh as processVirtualListDirectives,Vh as processVirtualGridDirectives,jk as processVideo,ze as processValidateDirective,ea as processTranslateDirective,vh as processTransitionDirectives,yh as processTransitionAttributes,pe as processTitleDirective,bd as processTemplateBindings,rh as processTeleportDirectives,zh as processSuspenseDirectives,hg as processStructuredData,Ue as processStreamDirectives,pd as processStatusDirective,gi as processStaticDirectives,xg as processStackReplacements,wg as processStackPushDirectives,yi as processSlots,Wm as processShell,Pe as processServerBindings,ig as processSeoDirective,$e as processSectionDirectives,Vc as processScopedStyles,$c as processReactiveBindings,Qq as processProtectedMedia,$h as processPartialHydrationDirectives,lh as processOnceDirective,yg as processMiddleware,gg as processMetaDirectives,qe as processMetaDirective,Lk as processMarkdownFileDirectives,Ri as processMarkdownDirectives,eg as processLoops,Jh as processKeepAliveDirectives,kh as processJsonDirective,Uh as processInfiniteListDirectives,vg as processIncludes,Yj as processImgComponents,Ql as processImageComponents,Dl as processImage,oe as processHeadDirective,se as processForms,ue as processFormInputDirectives,Mc as processExpressions,Pb as processEventDirectives,ve as processErrorDirective,Hg as processDynamicComponents,ni as processDirectives,$i as processDirectiveAttributes,qh as processDeferDirectives,$d as processCustomDirectives,Td as processCspDirectives,us as processComponentProps,rc as processClientScript,te as processBasicFormDirectives,Eh as processAsyncDirectives,ae as processAppearanceBootstrapDirective,Fa as processAnimationDirectives,ka as processA11yDirectives,Ie as prepareImageDelivery,T as preloadTranslationsBackground,S as preloadTranslations,xp as preloadIslandHandlers,Oe as preloadIconCollection,Jn as poolStrings,Ck as pluginManager,Ke as placeholdersWarmed,uh as performLeave,th as performEnter,nf as pendingLifecycleCounts,rf as peek,sg as partialsCache,lk as parseVideoDirectiveOptions,$p as parseUrl,gr as parseThumbhashString,Ad as parseSwitchBlock,vi as parseSlots,wi as parseSlotElement,Fd as parseScriptDeclarations,yk as parseSFCComponent,Rq as parseProtectedArgs,cg as parseLoopBinding,Xj as parseImgComponent,nj as parseImageUrl,Pl as parseImageComponent,qn as parseFormBody,Cd as parseExpressionWithFilters,ao as parseDefaults,Io as parseCookies,Nm as parseContainerSelector,xd as parseConditionalBlock,Dd as parseArguments,Ma as parseAnimationShorthand,ps as optional,Kn as optimizeTemplate,Vl as optimizeImage,Wl as optimizeDirectory,rs as oneOf,tg as onceStore,lm as onUpdated,_c as onUpdate,nm as onUnmounted,Im as onServer,jm as onMounted,jf as onMount,fi as onHydrated,zf as onErrorCaptured,kf as onDestroy,Ph as onDeactivated,Hm as onClient,km as onBeforeUpdate,mm as onBeforeUnmount,im as onBeforeMount,Oh as onActivated,$q as observeElement,Mo as notFound,Mg as normalizeCriticalHeadOrder,yf as nextTick,eo as negotiateEncoding,Ua as navigateTo,pm as mountInstance,Ea as motionDirective,Md as moderateCspPreset,In as minifyHtml,kg as metaDirective,_g as metaDedupKey,aq as mergeParams,ah as mergeHtmlAttrs,fe as mergeHeadConfigs,Sc as mergeCssConfig,Qd as mergeCspDirectives,Ra as matchRoute,Si as markdownDirectiveHandler,Jk as markdownCache,ga as looksLikeGlob,bs as localizePath,U as loadTranslationLazy,_ as loadTranslation,Fk as loadStxConfig,db as loadMiddlewareFromDirectory,on as loadManifest,Xq as loadElement,Pn as loadChannels,Lb as listensPassively,is as lintStxStrict,Zq as lazyLoadAll,Yq as lazyLoad,Ha as keyframeDirective,hl as keptState,Br as jsxs,Cr as jsxDEV,Ar as jsx,Ko as jsonResponse,Ze as islandDirective,l as isTest,_m as isSpaNavigation,Sm as isSpaNavRequest,Fq as isSignatureValid,of as isSignal,Bl as isSharpAvailable,wo as isServerEnvironment,Fm as isServer,yb as isRuntimeOwnedColonAttr,Hb as isRuntimeEventName,da as isRtlLocale,j as isProduction,ia as isPresentationalRole,Uq as isNativeLazySupported,Mr as isMarkdownPath,Q as isLoading,R as isLoaded,Bi as isJavaScriptScript,Vq as isIntersectionObserverSupported,Jl as isImageFile,Cl as isImageBackendAvailable,aa as isICUFormat,ei as isHydrated,Hi as isHydrateTrigger,hd as isHttpStatus,vo as isEdgeEnvironment,js as isDirectiveKind,k as isDevelopment,pf as isDerived,Qk as isCssOnlyChange,co as isCompressible,Gm as isClient,Zm as isChromeInstanceScript,Gh as isAsyncComponent,rn as isActionableMethod,kq as invert,Nf as invalidateFileCacheByDir,Mf as invalidateFileCache,Lc as interpolateScriptsInTemplate,Jc as interpolateScriptExpressions,Kc as interpolateScriptAttributes,x as inlineError,Zr as injectThemeBootstrap,jg as injectSeoTags,Wr as injectSeo,Yf as injectRouterScript,Pk as injectHotReload,kb as injectHeatmap,Zc as injectCss,Rd as injectCspMetaTag,ih as injectConfigHeadTags,Lg as injectColorModeBootScript,ch as injectCloakStyle,Sg as injectBuildId,kc as injectBrowserCoreAutoImports,dd as injectAnalytics,uf as inject,Am as initStoreRegistry,wl as initNetlify,zp as initLoadingIndicator,Wq as initLazyLoading,So as initFile,cr as initBlurUp,ir as initAllBlurUp,_j as imgDirective,Tl as imageDirective,vn as hydrateTemplateStream,un as hydrateTemplate,wp as hydrateIslands,bi as hydrateIsland,wn as hydrateFragment,ci as hydrateByStrategy,di as hydrateAll,Pp as hydrate,fp as htmlResponse,eh as hoistLeadingHeadTags,Ng as hoistColorModeBootScript,lb as heatmapDirective,Ij as hashString,Xf as hashFilePath,Gj as hashFile,Hj as hashBuffer,Fg as hasVueTemplateSyntax,bg as hasVariables,Up as hasStore,xc as hasPlaceholders,ul as hasNetlifyConfig,ab as hasMiddleware,Qb as hasEventDirectives,hh as hasDocumentShell,ti as hasDirectives,ma as hasDOMSupport,Ml as handleImageRequest,Af as handleError,Jr as h,Il as groupVariantsByFormat,iq as grayscale,_o as gitHash,Cn as getUnusedDirectives,V as getTranslationSync,O as getTranslationCacheStats,W as getTranslationAsync,ba as getTranslation,pl as getTotalSize,Gq as getTimeUntilExpiry,nh as getStoreScript,Vp as getStoreNames,Tp as getStore,fl as getStorageSize,el as getStorageKeys,Ni as getSourceLineInfo,Di as getSharedTranspiler,Tf as getServeModuleBundle,Rf as getServeClientAsset,la as getScreenReaderOnlyStyle,sk as getScopeAttribute,df as getRouteParams,Vb as getPublicEnvDefine,Wb as getPublicEnv,ri as getPositionInfo,uc as getPlaceholderRegistry,Fj as getPlaceholderCacheStats,ce as getPageMeta,Hd as getNonce,Kl as getMimeType,cb as getMiddlewareNames,$a as getMiddleware,ca as getLocaleDirection,P as getLoadingState,Y as getLoadingLocales,Je as getImagePlaceholder,El as getImageMetadata,Fe as getImageDelivery,Op as getHydrationRuntime,Cm as getHydratedStoreState,Tk as getHmrServer,be as getHead,Gp as getHMRHandler,rj as getFormatExtension,Kj as getFileMtime,Hl as getFallbackVariant,f as getErrorMessage,c as getErrorLocale,n as getErrorConfig,i as getErrorCodeName,Vi as getDirectives,Ui as getDirective,$l as getCurrentInstance,Wc as getCssServeAsset,Pd as getCspPreset,Yd as getCspHeaderName,Qi as getComponentCacheStats,ak as getCachedVideoResult,Kq as getCachedSignature,Pf as getCachedSignalsRuntime,Qf as getCachedRouterScript,Dj as getCachedPlaceholder,Rj as getCachedImageResult,Lj as getCached,Oj as getCacheStats,Qg as getBuildId,Mn as getBroadcastServer,qj as getBestVariant,Bc as getAllFilters,ej as generateWidthSrcset,Sh as generateVirtualListCSS,pr as generateVideoPreview,Ee as generateValidationScript,qr as generateUploadRuntime,Dn as generateTreeShakenBundle,xh as generateTransitionRuntime,wh as generateTransitionCSS,ek as generateThumbnails,wj as generateThumbhashPlaceholder,no as generateTemplatesDocs,Dh as generateSuspenseRuntime,Ch as generateSuspenseCSS,Jp as generateStateScript,oj as generateSrcsetData,Vj as generateSrcset,Fl as generateSrcSet,fk as generateSpriteSheet,yr as generateSpaShell,pj as generateSourceTags,kj as generateSizesFromBreakpoints,jj as generateSizesAttribute,Gl as generateSizes,ng as generateSitemapIndex,Xr as generateSitemap,Tq as generateSimpleMediaPicker,Nq as generateSignatureRuntime,Jf as generateSignalsRuntimeDev,If as generateSignalsRuntime,qc as generateServerDataBridge,pk as generateScopeId,zk as generateSFCWebComponent,Nb as generateRuntimeScript,Pa as generateRouteTypes,Qa as generateRouteManifest,pg as generateRobotsTxt,Yr as generateRobots,Uj as generateResponsiveVariants,vk as generateReactiveWebComponentTS,uk as generateReactiveWebComponent,xk as generateReactiveRuntime,wk as generateReactiveMixin,dk as generatePoster,Cj as generatePlaceholderStyle,Bj as generatePlaceholderCSS,vj as generatePlaceholder,ai as generatePartialHydrationCSS,Wg as generateOfflineWorker,Gd as generateNonce,ql as generateNetlifyToml,sr as generateMinifiedMediaRuntime,rr as generateMediaRuntime,Sq as generateMediaManagerEmbed,mn as generateManifest,Bp as generateLoadingIndicatorHtml,br as generateLazyLoadRuntime,fn as generateLayoutTypes,yj as generateLQIP,Nh as generateKeepAliveRuntime,Mh as generateKeepAliveCSS,hi as generateIslandManifest,or as generateImagePreview,Xl as generateImageManifest,Np as generateHydrationScript,bf as generateHydrationRuntime,Qp as generateHydrationCSS,Wh as generateHydrationBootstrap,Ok as generateHotReloadScript,jb as generateHeatmapScript,Ep as generateHMRClientScript,gk as generateHLSManifest,Kp as generateEventBindings,ij as generateDprSrcsetWithVariableQuality,hj as generateDprSrcset,fh as generateDocumentShell,so as generateDocs,oo as generateDirectivesDocs,_i as generateDirectiveRuntime,qg as generateDefaultRobotsTxt,hk as generateDASHManifest,Yc as generateCss,Kd as generateCspMetaTag,Jd as generateCspHeader,Ff as generateCompositionRuntime,mo as generateComponentsDocs,Xh as generateComponentManifest,ko as generateComponentDoc,Aj as generateColorPlaceholder,Kg as generateColorModeBootScript,sm as generateClientRuntime,Jj as generateCacheKey,oc as generateBrowserAutoImportDestructuring,jr as generateBlurUpRuntime,kr as generateBlurUpCSS,ad as generateBindingsRuntime,fj as generateAutoWidthSrcset,nc as generateAutoImportDestructuring,Ih as generateAsyncComponentRuntime,Hh as generateAsyncComponentCSS,fc as generateApiTypes,Na as generateAnimationRuntime,La as generateAnimationCSS,cd as generateAnalyticsScript,vp as formatTypecheckDiagnostics,op as formatTypeErrors,Po as formatStxContent,ol as formatSize,Ta as formatRoutes,Qo as formatMarkdownContent,g as formatLocalizedError,$ as formatICU,p as formatFilePath,w as formatError,Vr as formatDoctorReport,po as formatDocsAsMarkdown,ro as formatDocsAsJson,qo as formatDocsAsHtml,rq as format,il as forgetKeptState,Hn as foldConstants,$k as flushKeptState,qq as flipVertical,pq as flipHorizontal,gn as fingerprint,tp as findStxModuleDeclarations,sp as findRuntimeTypeDeclarations,Tr as findPantryPackage,Dc as findMustacheEnd,wd as findMatchingEndTag,sd as findMatchingDelimiter,Rb as findInterpolationEnd,yd as findIfBlocks,Bd as findExpressions,Sa as findErrorPage,Tc as findDuplicateScopedStyleRanges,zd as findDirectiveBlocks,En as findDeadCode,En as findDeadBranches,Om as findContainerRegion,lo as findComponentFiles,xs as findCommonDir,nl as filterRequiredFiles,Li as fileExists,_f as extractVariables,pi as extractTemplateExpressions,Ve as extractStreamBoundaries,Lp as extractState,zi as extractSlotContent,ag as extractScriptFromTemplate,oi as extractScriptBlocks,vc as extractPlaceholders,vd as extractParenthesizedExpression,id as extractPageResponseStatus,hb as extractLayoutMetadata,zj as extractDominantColor,Ed as extractDirectiveParams,ui as extractDirectiveNames,$m as extractContainerContent,io as extractComponentProps,Yh as extractComponentName,jo as extractComponentDescription,Xc as extractClassNames,pc as extractBridgeData,Zh as extractBoundProps,td as extractBalancedExpression,hc as extractAndStripCssImports,tk as extractAndScopeStyles,Ob as extractAndProcessEvents,Xk as externalizeSharedAssets,Yk as externalizeRepeatedAssets,Wk as externalizeHtml,Pc as evaluateExpression,Gn as evaluateConstant,qd as evaluateAuthExpression,Gc as escapeHtmlValue,Fc as escapeHtml,C as errorRecovery,E as errorLogger,sh as ensureTeleportTargets,jh as ensureDocumentShell,Ae as enhancedValidationRules,go as enableDevTools,Fn as eliminateDeadCode,gf as effect,yq as dprUrls,to as docsCommand,ec as discoverServerApi,dn as discoverLayoutNames,ar as disconnectObserver,ho as disableDevTools,F as devHelpers,Vm as detectShell,uo as detectRuntime,rl as detectProjectConfig,sj as detectFormat,zn as detectBuildMode,ff as derived,vl as deploy,Ge as deliveredImage,Hk as defineStxConfig,Yp as defineStore,Cf as defineSlots,hs as defineSiteConfig,ls as definePropsWithValidation,ks as defineProps,Bk as definePlugin,ie as definePageMeta,Wa as defineMiddleware,ji as defineForm,xf as defineExpose,wf as defineEmits,Xi as defineDirective,Lr as defineCustomElement,Xo as defineConfig,Yi as defineClientDirective,Fh as defineAsyncComponent,Zo as defineApiHandler,tr as defaultMediaConfig,Zl as defaultImageConfig,M as defaultI18nConfig,ib as defaultHeatmapConfig,re as defaultFormClasses,yc as defaultFilters,_d as defaultCspConfig,Dk as defaultConfig,vs as default,Rc as deepMergeThemes,Uc as dedupeScopedStyles,Rm as decodeTitleEntities,xj as decodeThumbhash,fg as declareBareLoopHead,Vd as cspNonceDirective,Ud as cspDirective,hr as crossfadeTransition,cq as crop,Qh as createVirtualList,mk as createVideoDirective,Go as createVercelHandler,lp as createTypeChecker,fa as createTranslateFilter,Co as createTextEncoderStream,Kr as createStxApp,Bo as createStreamingResponse,Xe as createStreamRenderer,Wp as createStore,Za as createStorageManager,Xa as createServerCookieManager,gc as createServerApi,bm as createScope,Ah as createSSRSuspense,cf as createRouter,bn as createRouteRuleResolver,eb as createRouteLocation,jp as createRoute,cm as createRef,dm as createReactive,Ef as createProvideContext,ap as createProject,Wo as createProductionBuild,tc as createPlaceholder,Ln as createOptimizedBuild,Ho as createNetlifyHandler,jl as createNetlifyClient,fb as createMiddlewareContext,ip as createMiddleware,_q as createLazyObserver,Kh as createKeepAliveCache,yo as createKVNamespace,_h as createIslandRegistry,Zj as createImgDirective,Ul as createImagePlugin,Nl as createImageHandler,Sl as createImageDirective,nb as createHeatmapAggregator,ml as createFileManifest,xo as createEnvAccessor,z as createEnhancedError,Ao as createEdgeHandler,zo as createEdgeCache,Oi as createDetailedErrorMessage,Fo as createDenoHandler,sl as createDefaultNetlifyConfig,Zd as createCspHeaders,Jo as createCookie,em as createComputed,am as createComponentInstance,Eo as createCloudflareHandler,Ya as createClientCookieManager,Zi as createBuiltinDirectives,Kr as createApp,Ka as createAnimationTimeline,fq as cover,$f as convertToCommonJS,mq as contrast,eq as contain,y as consoleError,m as configureErrorHandling,Gk as config,em as computed,fo as compressResponse,Cg as composerPattern,Bg as composer,Xm as composeShellWithPage,_n as componentDirective,Ji as componentClientSignalNames,ln as compileTemplate,a as collectRepeatedFlag,ll as collectDeployFiles,dh as cloakStyleFragment,Ic as clientLoopScopes,ck as clearVideoCache,N as clearTranslationCache,oh as clearStoreCache,dl as clearStorage,Lq as clearSignatureCache,Hf as clearServerData,Ej as clearPlaceholderCache,ug as clearOnceStore,Id as clearNonce,bb as clearMiddleware,Le as clearImagePlaceholders,He as clearImageDeliveryCatalog,Rl as clearImageCache,e as clearErrorMessages,Uf as clearDevCaches,Cc as clearCustomFilters,Eg as clearComposers,ph as clearComposableCache,Pi as clearComponentCache,Nj as clearCache,Ib as clearBlankCache,Ap as cleanupLoadingIndicator,Lm as classifyScript,Mm as classifyAllScripts,mp as checkTemplateFile,np as checkTemplate,Vf as checkCache,Iq as checkAuthAccess,na as checkA11yWithRegex,oa as checkA11y,Vn as channel,Oo as captureScreenshots,No as captureScreenshot,Z as cancelPendingLoads,kl as calculateSha1,gj as calculateOptimalWidths,Zk as cachedQuery,Wf as cacheTemplate,bc as cacheEngineFingerprint,ok as buildWebComponents,pp as buildVirtualSource,vr as buildViews,_p as buildUrl,Re as buildSuspenseResolveScript,gs as buildStaticSite,qb as buildRuntimeGlobalsDestructure,hn as buildRuntimeAsset,jn as buildRouterAsset,fs as buildLangPickerScript,mj as buildImageUrl,Tg as buildIdFragment,$g as buildHtmlAttrs,xn as buildForProduction,bo as buildComponentLibrary,Jq as buildAuthParams,yn as buildApp,ds as buildAlternateLinks,Vo as build,Tn as broadcastPrivate,Un as broadcastPresence,Qn as broadcast,lq as brightness,Tb as bracketDepths,gq as blur,Jb as blankInertHtmlRegions,Dq as batchSignUrls,hf as batch,sa as autoFixA11yFile,ta as autoFixA11yDirectory,ra as autoFixA11y,tq as auto,ja as attributeValue,kn as assetTags,Mb as asInvocableStatement,ss as arrayOf,as as applyTranslations,Tj as applyTransformations,Ai as applySlots,Zn as applyPropDefaults,wq as applyPreset,bh as applyHtmlAttrs,ne as applyHead,Nc as applyFilters,Tm as appendVary,Od as apiCspPreset,Da as animationGroupDirective,ik as analyzeVideo,Bn as analyzeUsage,Jm as analyzeTemplate,Km as analyzeProject,Bn as analyzeDirectiveUsage,ed as analyticsDirective,dp as addStore,cp as addPage,Sd as addNonceToInlineContent,ep as addLayout,bp as addComponent,tn as actionRedirectResponse,Va as abortNavigation,ua as a11yDirective,Of as __setSignalsGeneratorsForTest,Rg as __setBuildIdForTest,$j as VideoProcessorCache,ki as Validator,xa as TransitionType,za as TransitionEase,ya as TransitionDirection,rd as Tokenizer,kp as TemplateTypeChecker,Ro as TEMPLATE_PRESETS,v as StxValidationError,r as StxSyntaxError,t as StxSecurityError,s as StxRuntimeError,u as StxFileError,q as StxError,Gr as Show,Se as SUSPENSE_RESOLVER_RUNTIME,ob as STX_RUNTIME_GLOBALS,jc as STX_AUTO_IMPORTS,Yb as STATE_DIR_ENV_VAR,Ga as SPRING_PRESETS,Pm as SPA_NAV_HEADER,Kb as SCROLL_BLOCKING_EVENTS,xb as RUNTIME_OWNED_COLON_ATTRS,zb as RUNTIME_HANDLED_X_ATTRS,Fb as RUNTIME_EVENT_NAMES,Db as RUNTIME_DIRECTIVE_NAMES,fd as RESPONSE_STATUS_KEY,gd as RESPONSE_HEADERS_KEY,tb as REACTIVE_RUNTIME_GLOBALS,Uo as ProductionBuild,Ir as Portal,$o as PROJECT_TEMPLATES,vq as PRESETS,Ug as OFFLINE_WORKER_PATH,Vg as OFFLINE_REGISTER_SCRIPT,sb as NON_CLIENT_PRIMITIVES,Rp as MemorySessionStore,dj as MIME_TYPES,aj as MEDIA_DEFAULT_WIDTHS,cj as MEDIA_DEFAULT_FORMATS,cn as LAYOUT_TYPES_FILE,gl as KEPT_STATE_PREFIX,Qj as ImageProcessorCache,Ll as ImageProcessingError,Mp as HydrationRuntime,Nk as HotReloadServer,mb as HeatmapAggregator,Zg as HTML_CLASS_MARKER,Yg as HTML_ATTRS_MARKER,zr as Fragment,Hr as For,Qm as FRAGMENT_CACHE_CONTROL,D as ErrorLogger,h as ErrorCodes,Vk as EXTERNALIZED_ASSET_DIR,xl as DeployError,yl as DEFAULT_WIDTHS,Aa as DEFAULT_TRANSITION_OPTIONS,Xb as DEFAULT_STATE_DIR,Al as DEFAULT_QUALITY,tj as DEFAULT_PLACEHOLDER_OPTIONS,zl as DEFAULT_FORMATS,bj as DEFAULT_DPR_VALUES,Dp as ComponentHMRHandler,pb as COMPONENT_SCOPE_LOCAL_GLOBALS,Bb as COMPONENT_PASSTHROUGH_X_ATTRS,rb as COMPILE_TIME_ONLY_GLOBALS,lj as COMMON_SIZES,Ig as COLOR_MODE_BOOT_MARKER,Jg as COLOR_MODE_BOOT_GLOBAL,Xg as CLOAK_STYLE,Xn as BroadcastServer,Wn as Broadcast,Og as BUILD_ID_META,Pg as BUILD_ID_HEADER,Ub as BROWSER_CORE_IMPORTS,uj as BLUR_UP_CSS,Ab as ALPINE_BRIDGE_X_ATTRS,Sr as $path};
|
package/dist/chunk-ec4wq2sv.js
DELETED
|
@@ -1,6 +0,0 @@
|
|
|
1
|
-
// @bun
|
|
2
|
-
import{Js as x}from"./chunk-9fqp72ze.js";import{Jt as A}from"./chunk-tkyrk66a.js";import{$t as T,du as q}from"./chunk-35ds08e7.js";import{Yw as y,qw as C}from"./chunk-4f9zyfdw.js";import{kx as P}from"./chunk-ay6zjq8v.js";y();import H from"fs";import $ from"path";import{pathToFileURL as b}from"url";var R=["GET","POST","PUT","PATCH","DELETE","HEAD","OPTIONS"],O=new Set;function N(J,Y={}){let K=$.resolve(J,Y.dir??"server/api"),Q=[],Z=new Map;if(!H.existsSync(K))return Q;let B=Array.from(new Bun.Glob("**/*.{ts,js,mts,mjs}").scanSync({cwd:K})).sort();for(let z of B){if(z.endsWith(".d.ts"))continue;let W=z.replace(/\.(?:ts|js|mts|mjs)$/,"").split("/"),I=W.pop(),X=I.lastIndexOf("."),_=X>=0?I.slice(X+1):"get",F=_.toUpperCase();if(!R.includes(F)||_!==_.toLowerCase())throw Error(`Unsupported API method suffix in ${z}; use ${R.map((k)=>k.toLowerCase()).join(", ")}`);if(X>=0)I=I.slice(0,X);if(I!=="index")W.push(I);let G=new Set,j=W.map((k,S)=>{let E=/^\[(\.\.\.)?([A-Za-z_]\w*)\]$/.exec(k);if(E){if(G.has(E[2])||E[1]&&S!==W.length-1)throw Error(`Invalid API parameter in ${z}`);return G.add(E[2]),`:${E[2]}${E[1]?"*":""}`}if(!/^[\w-]+$/.test(k))throw Error(`Unsupported API path segment ${k} in ${z}`);return k}),U=`/api${j.length?`/${j.join("/")}`:""}`,L=`${F} ${U.replace(/:\w+/g,":param")}`;if(Z.has(L))throw Error(`Ambiguous API route ${F} ${U}: ${Z.get(L)} and ${z}`);Z.set(L,z);let M=$.join(K,z);O.add($.resolve(M)),O.add(H.realpathSync(M)),Q.push({pattern:U,method:F,filePath:M})}return Q.sort((z,V)=>{let W=z.pattern.split("/"),I=V.pattern.split("/"),X=(_)=>_?.endsWith("*")?0:_?.startsWith(":")?1:2;for(let _=0;_<Math.max(W.length,I.length);_++){let F=X(I[_])-X(W[_]);if(F)return F}return z.pattern.localeCompare(V.pattern)||z.method.localeCompare(V.method)})}async function w(J,Y){let K=A(J,"api-types.d.ts"),Q=["// Generated by stx. Include this file in tsconfig.json.","declare module '@stacksjs/stx/api-client' {"," interface KnownApiRoutes {"];for(let B of Y){let z=`./${$.relative($.dirname(K),B.filePath).replace(/\\/g,"/")}`,{params:V}=C(B.pattern);Q.push(` ${JSON.stringify(`${B.method} ${B.pattern}`)}: { params: { ${V.map((W)=>`${JSON.stringify(W)}: string`).join("; ")} }; response: Awaited<ReturnType<typeof import(${JSON.stringify(z)}).default>> }`)}Q.push(" }","}","export {}","");let Z=Q.join(`
|
|
3
|
-
`);if(!await Bun.file(K).exists()||await Bun.file(K).text()!==Z)await Bun.write(K,Z);return K}async function p(J,Y,K={}){let Q=N(J,K);await w(J,Q);let Z=[];for(let B of Q){let z=await Bun.build({entrypoints:[B.filePath],target:"bun",format:"esm",minify:!1,splitting:!1});if(!z.success)throw Error(`API build failed for ${B.filePath}: ${z.logs.join(`
|
|
4
|
-
`)}`);let V=z.outputs.find((X)=>X.kind==="entry-point");if(!V)throw Error(`No API bundle for ${B.filePath}`);if(z.outputs.length!==1)throw Error(`API endpoint ${B.filePath} emits assets; package those explicitly instead`);let I=`server/api/endpoint-${new Bun.CryptoHasher("sha256").update(await V.arrayBuffer()).digest("hex").slice(0,20)}.mjs`;await Bun.write($.join(Y,I),V),Z.push({...B,filePath:I})}return Z}function D(J,Y){let K=J.map((Q)=>({route:Q,...C(Q.pattern)}));return async(Q)=>{let Z=new URL(Q.url).pathname,B=K.filter((G)=>G.regex.test(Z));if(!B.length)return null;let z=B[0].route.pattern,V=(G)=>G.replace(/:\w+/g,":param"),W=B.filter((G)=>V(G.route.pattern)===V(z)),I=Q.method,X=W.find((G)=>G.route.method===I)??(I==="HEAD"?W.find((G)=>G.route.method==="GET"):void 0);if(!X){let G=new Set(W.map((j)=>j.route.method));if(G.has("GET"))G.add("HEAD");return G.add("OPTIONS"),new Response(null,{status:I==="OPTIONS"?204:405,headers:{Allow:Array.from(G).sort().join(", ")}})}let _=X.regex.exec(Z),F=Object.create(null);try{X.params.forEach((G,j)=>{F[G]=decodeURIComponent(_[j+1])})}catch{return new Response("Invalid URL parameter encoding",{status:400})}try{let G=await Y(X.route);if(typeof G!=="function")throw Error(`API endpoint ${X.route.filePath} must default-export a handler`);let j=await G(Q,{params:F}),U=j instanceof Response?j:j===void 0?new Response(null,{status:204}):Response.json(j);if(I==="HEAD")return new Response(null,{status:U.status,headers:U.headers});return U}catch(G){return console.error(`[stx] API error for ${I} ${z}:`,G),Response.json({error:"Internal Server Error"},{status:500})}}}function l(J,Y){return D(Y,async(K)=>(await import(b($.resolve(J,K.filePath)).href)).default)}async function s(J,Y){if(!Y)return async()=>null;let K=Y===!0?{}:Y,Q=N(J,K);return await w(J,Q),async(Z)=>{if(!new URL(Z.url).pathname.match(/^\/api(?:\/|$)/))return null;try{let B=N(J,K);await w(J,B);let{loadStxConfig:z}=await import("./chunk-tntv9hvq.js"),V=q((await z(J)).runtimeConfig);return await T(V,()=>D(B,async(W)=>{let I=await Bun.build({entrypoints:[W.filePath],target:"bun",format:"esm",splitting:!1});if(!I.success)throw Error(I.logs.join(`
|
|
5
|
-
`));let X=I.outputs.find((_)=>_.kind==="entry-point");if(!X||I.outputs.length!==1)throw Error(`Unsupported API bundle output: ${W.filePath}`);return(await import(`data:text/javascript;base64,${Buffer.from(await X.text()).toString("base64")}`)).default})(Z))}catch(B){return console.error("[stx] API discovery failed:",B),Response.json({error:"API discovery failed; check the server log"},{status:500})}}}function u(J,Y,K){if(x(J))return!0;let Q=/^(?:(?:stx|ui)\.config\.[cm]?[jt]s|runtime-config-(?:server|loader)\.[cm]?[jt]s)$/;if(Q.test($.basename(J)))return!0;try{if(Q.test($.basename(H.realpathSync(J))))return!0}catch{}if(O.has($.resolve(J)))return!0;if(!K)return!1;let Z=$.resolve(Y,typeof K==="object"?K.dir??"server/api":"server/api"),B=(V)=>{try{return H.realpathSync(V)}catch{return $.resolve(V)}},z=B(J);return[Z,$.resolve(Y,"server"),$.resolve(Y,".output/server")].some((V)=>{let W=B(V);return z===W||z.startsWith(`${W}${$.sep}`)})}
|
|
6
|
-
export{N as yl,w as zl,p as Al,D as Bl,l as Cl,s as Dl,u as El};
|
package/dist/chunk-ekzg97dn.js
DELETED
|
@@ -1,29 +0,0 @@
|
|
|
1
|
-
// @bun
|
|
2
|
-
import{qh as x,vh as B,wh as c,xh as u,yh as n}from"./chunk-pcxp4r9n.js";import{kx as v}from"./chunk-ay6zjq8v.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
|
-
`)}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
|
-
<MPD xmlns="urn:mpeg:dash:schema:mpd:2011"
|
|
5
|
-
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
|
|
6
|
-
xsi:schemaLocation="urn:mpeg:dash:schema:mpd:2011 DASH-MPD.xsd"
|
|
7
|
-
type="static"
|
|
8
|
-
mediaPresentationDuration="${$}"
|
|
9
|
-
minBufferTime="${Y}"
|
|
10
|
-
profiles="urn:mpeg:dash:profile:isoff-on-demand:2011">
|
|
11
|
-
<Period>
|
|
12
|
-
<AdaptationSet mimeType="video/mp4" codecs="avc1.64001f" segmentAlignment="true" startWithSAP="1">
|
|
13
|
-
`;for(let G=0;G<K.length;G++){let M=K[G];z+=` <Representation id="video${G}" bandwidth="${M.bandwidth}" width="${M.width}" height="${M.height}">
|
|
14
|
-
<BaseURL>${M.url}/</BaseURL>
|
|
15
|
-
<SegmentBase indexRange="0-999">
|
|
16
|
-
<Initialization range="0-999"/>
|
|
17
|
-
</SegmentBase>
|
|
18
|
-
</Representation>
|
|
19
|
-
`}if(z+=` </AdaptationSet>
|
|
20
|
-
`,J.length>0){z+=` <AdaptationSet mimeType="audio/mp4" codecs="mp4a.40.2" segmentAlignment="true" startWithSAP="1">
|
|
21
|
-
`;for(let G=0;G<J.length;G++){let M=J[G];z+=` <Representation id="audio${G}" bandwidth="${M.bandwidth}">
|
|
22
|
-
<BaseURL>${M.url}/</BaseURL>
|
|
23
|
-
<SegmentBase indexRange="0-999">
|
|
24
|
-
<Initialization range="0-999"/>
|
|
25
|
-
</SegmentBase>
|
|
26
|
-
</Representation>
|
|
27
|
-
`}z+=` </AdaptationSet>
|
|
28
|
-
`}return z+=` </Period>
|
|
29
|
-
</MPD>`,z}function a(K){let J=Math.floor(K/3600),X=Math.floor(K%3600/60),N=Math.floor(K%60),Z="PT";if(J>0)Z+=`${J}H`;if(X>0)Z+=`${X}M`;return Z+=`${N}S`,Z}async function KJ(){try{return await import("ts-videos")}catch{return null}}function MJ(K){switch(K){case"very-low":return 500000;case"low":return 1e6;case"medium":return 2500000;case"high":return 5000000;case"very-high":return 1e7;case"lossless":return 0;default:return 2500000}}function OJ(K){switch(K){case"youtube":return{codec:"h264",maxWidth:1920,maxHeight:1080,frameRate:30,audioCodec:"aac",audioBitrate:128000};case"twitter":return{codec:"h264",maxWidth:1280,maxHeight:720,frameRate:30,bitrate:5000000,audioCodec:"aac",audioBitrate:128000};case"instagram-feed":return{codec:"h264",maxWidth:1080,maxHeight:1080,frameRate:30,bitrate:3500000,audioCodec:"aac",audioBitrate:128000};case"instagram-story":case"instagram-reels":return{codec:"h264",maxWidth:1080,maxHeight:1920,frameRate:30,bitrate:3500000,audioCodec:"aac",audioBitrate:128000};case"tiktok":return{codec:"h264",maxWidth:1080,maxHeight:1920,frameRate:30,bitrate:4000000,audioCodec:"aac",audioBitrate:128000};case"discord":return{codec:"h264",maxWidth:1920,maxHeight:1080,frameRate:60,bitrate:8000000,audioCodec:"aac",audioBitrate:192000};case"linkedin":return{codec:"h264",maxWidth:1920,maxHeight:1080,frameRate:30,bitrate:5000000,audioCodec:"aac",audioBitrate:128000};case"facebook":return{codec:"h264",maxWidth:1280,maxHeight:720,frameRate:30,bitrate:4000000,audioCodec:"aac",audioBitrate:128000};case"web-progressive":return{codec:"h264",maxWidth:1920,maxHeight:1080,frameRate:30,audioCodec:"aac",audioBitrate:128000,twoPass:!0};case"web-streaming":return{codec:"h264",maxWidth:1920,maxHeight:1080,frameRate:30,audioCodec:"aac",audioBitrate:128000};default:return{}}}async function XJ(K){let J=await KJ();if(!J)return null;try{let X=JJ(K),Z=await new J.Input(X).getInfo();return{duration:Z.duration||0,width:Z.width||0,height:Z.height||0,frameRate:Z.frameRate||0,bitrate:Z.bitrate||0,codec:Z.videoCodec||"",audioCodec:Z.audioCodec}}catch(X){return console.warn(`[stx-media] Failed to analyze video: ${X}`),null}}async function wJ(K,J,X,N){let Z=await KJ();if(!Z)return console.warn("[stx-media] ts-videos not installed, skipping processing"),{src:K,processed:!1};let $=await q(K,J,X);if($)return $;try{let Y=JJ(K);if(!await B(Y))return{src:K,processed:!1,errors:[`Source file not found: ${K}`]};let z=X.outputDir||"dist/videos",G=X.baseUrl||"/videos";await QJ(z,{recursive:!0});let M=await x(Y),E=WJ(K,_J(K)),W={src:K,processed:!0,hash:M};N?.({percentage:5,stage:"analyzing"}),W.metadata=await XJ(Y)||void 0;let Q={};if(J.quality)Q.bitrate=MJ(J.quality);if(J.platform)Object.assign(Q,OJ(J.platform));if(J.transcode)Object.assign(Q,J.transcode);if(Object.keys(Q).length>0||J.process){N?.({percentage:10,stage:"transcoding"});let _=`${E}-${M}.mp4`,O=LJ(z,_);try{let L=await AJ(Y,O,Q,Z,(w)=>N?.({percentage:10+w*0.5,stage:"transcoding"}));if(L)W.transcoded={path:O,url:`${G}/${_}`,duration:L.duration,size:L.size,video:{codec:Q.codec||"h264",width:L.width,height:L.height,bitrate:L.bitrate,frameRate:L.frameRate},audio:L.audioCodec?{codec:Q.audioCodec||"aac",bitrate:Q.audioBitrate||128000,sampleRate:Q.sampleRate||48000,channels:Q.channels||2}:void 0}}catch(L){W.errors=W.errors||[],W.errors.push(`Transcoding failed: ${L}`)}}if(J.generatePoster){N?.({percentage:65,stage:"generating-poster"});let _=typeof J.generatePoster==="object"?J.generatePoster:{timestamp:0},O=await h(Y,_,z,G);if(O)W.poster=O}if(X.thumbnails?.enabled){N?.({percentage:70,stage:"generating-thumbnails"});let _=await d(Y,X.thumbnails,z,G);if(_.length>0)W.thumbnails=_}if(J.streaming){N?.({percentage:80,stage:"generating-manifests"});let _=typeof J.streaming==="object"?J.streaming:X.streaming||{format:"hls"};if(_.format==="hls"||_.format===void 0){let O=await p(Y,_.qualities||X.streaming?.defaultQualities||[],z,G);if(O)W.streaming={...W.streaming,hls:O}}if(_.format==="dash"){let O=await l(Y,_.qualities||X.streaming?.defaultQualities||[],z,G);if(O)W.streaming={...W.streaming,dash:O}}}if(J.spriteSheet)N?.({percentage:90,stage:"generating-sprite-sheet"});return N?.({percentage:100,stage:"complete"}),await b(K,J,W,X),W}catch(Y){return{src:K,processed:!1,errors:[`Processing failed: ${Y}`]}}}async function AJ(K,J,X,N,Z){try{let Y=await new N.Conversion(K,J,{videoCodec:X.codec,videoBitrate:X.bitrate,width:X.maxWidth,height:X.maxHeight,frameRate:X.frameRate,audioCodec:X.audioCodec,audioBitrate:X.audioBitrate,sampleRate:X.sampleRate,channels:X.channels}).run((z)=>{Z?.(z.percentage/100)});return{duration:Y.duration||0,size:Y.size||0,width:Y.width||X.maxWidth||0,height:Y.height||X.maxHeight||0,bitrate:Y.bitrate||X.bitrate||0,frameRate:Y.frameRate||X.frameRate||30,audioCodec:Y.audioCodec}}catch($){return console.error(`[stx-media] Transcoding failed: ${$}`),null}}export{V as fh,q as gh,b as hh,$J as ih,h as jh,d as kh,zJ as lh,p as mh,l as nh,XJ as oh,wJ as ph};
|
package/dist/chunk-epjt342x.js
DELETED
|
@@ -1,2 +0,0 @@
|
|
|
1
|
-
// @bun
|
|
2
|
-
import{$i as h,Ui as a,Vi as b,Wi as c,Xi as d,Yi as e,Zi as f,_i as g,aj as i,bj as j,cj as k,dj as l,ej as m,fj as n}from"./chunk-f95drhdb.js";import"./chunk-pwsnafp3.js";import"./chunk-1cyxbb8y.js";import"./chunk-zcz9rs6p.js";import"./chunk-v3nwkveg.js";import"./chunk-9fqp72ze.js";import"./chunk-0btmm4m2.js";import"./chunk-pwgv84pn.js";import"./chunk-tkyrk66a.js";import"./chunk-ranshpyc.js";import"./chunk-98zj3fv2.js";import"./chunk-35ds08e7.js";import"./chunk-5se8xt9e.js";import"./chunk-gnfywmgs.js";import"./chunk-yq8x8bxq.js";import"./chunk-266t58b8.js";import"./chunk-nq5zxrk0.js";import"./chunk-az4v4ard.js";import"./chunk-4f9zyfdw.js";import"./chunk-xssw417m.js";import"./chunk-kg1rdena.js";import"./chunk-ay6zjq8v.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};
|
package/dist/chunk-eqe26g14.js
DELETED
|
@@ -1,18 +0,0 @@
|
|
|
1
|
-
// @bun
|
|
2
|
-
import{Mr as P,No as x,Wo as k,aq as w,cm as A,dm as b,ko as M,mn as T,nn as y,wm as B,ym as F,yo as R}from"./chunk-pwsnafp3.js";import{kx as v}from"./chunk-ay6zjq8v.js";function j(K){return K.endsWith(".md")||K.endsWith(".markdown")}function C(K){let z=[];_(/<pre\b[^>]*>[\s\S]*?<\/pre>/gi);let G=[...z];_(/<code\b[^>]*>[\s\S]*?<\/code>/gi,G);function _(J,Y){let $;while(($=J.exec(K))!==null){let q=$.index,N=q+$[0].length;if(Y?.some((X)=>q>=X.start&&N<=X.end))continue;z.push({start:q,end:N})}}if(z.length===0)return K;z.sort((J,Y)=>J.start-Y.start);let U="",Q=0;for(let J of z){if(J.start<Q)continue;U+=K.slice(Q,J.start),U+=`@raw${K.slice(J.start,J.end)}@endraw`,Q=J.end}return U+=K.slice(Q),U}async function D(K,z={}){let{data:G,content:_}=A(K),Q=await(z.renderer??((J)=>b(J)))(_);return{html:C(Q),frontmatter:G??{}}}import{dirname as f,resolve as H}from"path";function S(K){let z=K,G=M(K);if(G)z=G.content.trim();let _=/<script\b([^>]*)>([\s\S]*?)<\/script>/gi,U=[],Q=[],J=[],Y=(N)=>/\b(?:state|derived|effect|batch)\s*(?:<[^<>()]*>)?\s*\(/.test(N),$;while(($=_.exec(K))!==null){let N=$[1],X=$[2],E=$[0],Z=N.includes("server");if(Y(X))J.push(E);else if(Z)Q.push(X);else U.push(E)}let q=z;{let N=/<script\b(?![^>]*\b(?:client|type\s*=\s*["']module["']|src\s*=))[^>]*>/gi,X,E=[];while((X=N.exec(q))!==null){let Z=X.index+X[0].length,L=q.indexOf("</script>",Z);if(L===-1)continue;E.push({start:X.index,end:L+9}),N.lastIndex=L+9}for(let Z=E.length-1;Z>=0;Z--)q=q.substring(0,E[Z].start)+q.substring(E[Z].end)}for(let N of U)q=q.replace(N,"");return{templateContent:q,serverScripts:Q,clientScripts:U,signalsScripts:J}}function g(K,z){return`<!DOCTYPE html>
|
|
3
|
-
<html lang="en">
|
|
4
|
-
<head>
|
|
5
|
-
<meta charset="UTF-8">
|
|
6
|
-
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
|
7
|
-
<title>${(z||"stx").replace(/&/g,"&").replace(/</g,"<").replace(/>/g,">")}</title>
|
|
8
|
-
</head>
|
|
9
|
-
<body>
|
|
10
|
-
${K}
|
|
11
|
-
</body>
|
|
12
|
-
</html>`}async function o(K,z={}){let G=H(K),_=Bun.file(G);if(!await _.exists())throw Error(`Template file not found: ${G}`);let U=await _.text(),Q=null;if(j(G)){let J=await D(U,{renderer:z.markdownRenderer});U=J.html,Q=J.frontmatter}if(Q)z={...z,context:{...Q,...z.context||{}}};if(z.layout){let J=H(z.layout),Y=Bun.file(J);if(!await Y.exists())throw Error(`Layout template not found: ${J}`);let{layout:$,injectCSS:q,...N}=z,X={...z.context||{}};x(X);let E=await V(U,G,{...N,context:{...X,__stx_defer_server_data:!0},injectCSS:!1}),Z=await Y.text(),L={...X,content:E},I={...N,context:L,injectCSS:q};return V(Z,J,I)}return V(U,G,z)}async function r(K,z={},G={}){return V(K,process.cwd(),{context:z,...G})}async function V(K,z,G={}){let{templateContent:_,serverScripts:U,clientScripts:Q}=S(K),J={...P,...G.options},Y={__filename:z,__dirname:f(z),__stx:{},__stx_options:J,__stx_sfc_mode:!0,__stx_inject_css:G.injectCSS===!0,__stxServeContext:void 0,...y(G.context??{}),definePageMeta:()=>{},...G.context||{}};for(let N of U)await k(N,Y,z);let $=new Set,q=_;if(q=await w(q,Y,z,J,$),T(Y,G.context),G.templateOnly){if(q=q.replace(/<script data-stx-scoped>[\s\S]*?<\/script>\s*/gi,""),q=q.replace(/<!-- stx SEO Tags -->[\s\S]*?(?=<)/i,""),Q.length>0)q+=`
|
|
13
|
-
${Q.join(`
|
|
14
|
-
`)}`}else{if(G.processClientScripts!==!1&&Q.length>0){let N=Y.__stx_event_bindings||[],X=B(Y),Z=(await Promise.all(Q.map(async(I)=>{let W=I.match(/<script\b[^>]*>([\s\S]*?)<\/script>/);if(!W)return I;return await F(W[1],{eventBindings:N,templateContent:q,serverData:X,filePath:z})}))).join(`
|
|
15
|
-
`);if(q.match(/(<\/body>)/i))q=q.replace(/(<\/body>)/i,`${Z}
|
|
16
|
-
$1`);else q+=`
|
|
17
|
-
${Z}`}q=await R(q)}if(G.wrapInDocument){if(!q.trim().toLowerCase().startsWith("<!doctype")&&!q.trim().toLowerCase().startsWith("<html"))q=g(q,G.title)}if(G.injectCSS)try{let{injectCss:N}=await import("./chunk-62435225.js");q=await N(q)}catch{}return q}
|
|
18
|
-
export{j as Ak,C as Bk,D as Ck,o as Dk,r as Ek,V as Fk};
|
package/dist/chunk-ev0v1yma.js
DELETED
package/dist/chunk-f53psr2y.js
DELETED
|
@@ -1,5 +0,0 @@
|
|
|
1
|
-
// @bun
|
|
2
|
-
import{Yw as y}from"./chunk-4f9zyfdw.js";import N from"fs";import B from"path";var Y="_stx";function L(M){return Bun.hash(M).toString(16).slice(0,8)}function T(M){let C=[],v=(q)=>{for(let g of N.readdirSync(q,{withFileTypes:!0})){let j=B.join(q,g.name);if(g.isDirectory())v(j);else if(g.isFile()&&j.endsWith(".html"))C.push(j)}};if(N.existsSync(M))v(M);return C}var S=[{pattern:/<script\b([^>]*\bdata-stx-runtime\b[^>]*)>([\s\S]*?)<\/script>/gi,prefix:"runtime",extension:"js",contentType:"text/javascript; charset=utf-8",replace:(M)=>`<script data-stx-runtime src="${M}"></script>`},{pattern:/<script\b([^>]*\bdata-stx-router\b[^>]*)>([\s\S]*?)<\/script>/gi,prefix:"router",extension:"js",contentType:"text/javascript; charset=utf-8",replace:(M)=>`<script data-stx-router src="${M}"></script>`},{pattern:/<style\b([^>]*\bdata-css=(?:"generated"|'generated')[^>]*)>([\s\S]*?)<\/style>/gi,prefix:"css",extension:"css",contentType:"text/css; charset=utf-8",replace:(M)=>`<link data-css="generated" rel="stylesheet" href="${M}">`}];function _(M,C=`/${Y}`){let v=[],q=new Set,g=0,j=M;for(let G of S)j=j.replace(G.pattern,(R,K,W)=>{if(/\b(?:src|href)\s*=/.test(K)||!W.trim())return R;let Q=`${G.prefix}.${L(W)}.${G.extension}`;if(!q.has(Q))q.add(Q),v.push({filename:Q,contents:W,contentType:G.contentType});return g+=W.length,G.replace(`${C}/${Q}`)});return{html:j,assets:v,bytesInlined:g}}function a(M){let C={pages:0,assets:0,bytesInlined:0},v=B.join(M,Y),q=new Set;for(let g of T(M)){let j=N.readFileSync(g,"utf8"),{html:G,assets:R,bytesInlined:K}=_(j);if(G===j)continue;for(let W of R){if(q.has(W.filename))continue;q.add(W.filename),N.mkdirSync(v,{recursive:!0}),N.writeFileSync(B.join(v,W.filename),W.contents),C.assets++}N.writeFileSync(g,G),C.bytesInlined+=K,C.pages++}return C}import z from"fs";import P from"path";var I=1024,E=/<(script|style)\b([^>]*)>([\s\S]*?)<\/\1>/gi,d=new Set(["","module","text/javascript","application/javascript","module/javascript"]);function b(M){return Bun.hash(M).toString(16).slice(0,8)}function p(M){let C=[],v=(q)=>{for(let g of z.readdirSync(q,{withFileTypes:!0})){let j=P.join(q,g.name);if(g.isDirectory())v(j);else if(g.isFile()&&j.endsWith(".html"))C.push(j)}};if(z.existsSync(M))v(M);return C}function D(M,C){let v=M.match(new RegExp(`\\b${C}\\s*=\\s*("([^"]*)"|'([^']*)'|([^\\s>]+))`,"i"));if(!v)return;return v[2]??v[3]??v[4]??""}function m(M,C,v){if(v.length<I)return!1;if(/\b(?:src|href)\s*=/i.test(C))return!1;if(M.toLowerCase()==="script"){if(!d.has((D(C,"type")??"").trim().toLowerCase()))return!1;return!0}return!0}function o(M){let C=[];for(let v of M.matchAll(/<template\b[^>]*>[\s\S]*?<\/template>/gi))C.push([v.index,v.index+v[0].length]);return C}function s(M){let C={pages:0,assets:0,bytesInlined:0},v=p(M);if(v.length<2)return C;let q=new Map,g=new Map;for(let Q of v){let O=z.readFileSync(Q,"utf8");q.set(Q,O);let x=o(O);for(let U of O.matchAll(E)){let[w,V,J,$]=U;if(!m(V,J,$))continue;if(x.some(([A,k])=>U.index>=A&&U.index<k))continue;let H=`${V.toLowerCase()}\x00${$}`,X=g.get(H);if(X)X.push({file:Q,whole:w,tag:V,attrs:J,body:$});else g.set(H,[{file:Q,whole:w,tag:V,attrs:J,body:$}])}}let j=[...g.values()].filter((Q)=>new Set(Q.map((O)=>O.file)).size>1);if(j.length===0)return C;let G=P.join(M,Y),R=new Map(q),K=new Map,W=[];for(let Q of j){let{tag:O,body:x}=Q[0],U=O.toLowerCase()==="script",w=`${U?"chunk":"style"}.${b(x)}.${U?"js":"css"}`;W.push({filename:w,contents:x,contentType:U?"text/javascript; charset=utf-8":"text/css; charset=utf-8"});let V=`/${Y}/${w}`;for(let J of Q){let $=U?`<script${J.attrs} src="${V}"></script>`:`<link${J.attrs} rel="stylesheet" href="${V}">`,H=R.get(J.file),X=H.replace(J.whole,()=>$);if(X===H)continue;R.set(J.file,X),K.set(J.file,(K.get(J.file)??0)+J.body.length)}}z.mkdirSync(G,{recursive:!0});for(let Q of W)z.writeFileSync(P.join(G,Q.filename),Q.contents),C.assets++;for(let[Q,O]of R){if(O===q.get(Q))continue;z.writeFileSync(Q,O),C.pages++,C.bytesInlined+=K.get(Q)??0}return C}y();import Z from"fs";import F from"path";var h="layout-types.d.ts";function f(M){let C=[],v=(q,g)=>{let j;try{j=Z.readdirSync(q,{withFileTypes:!0})}catch{return}for(let G of j){if(G.name.startsWith("."))continue;let R=F.join(q,G.name);if(G.isDirectory())v(R,g?`${g}/${G.name}`:G.name);else if(G.isFile()&&G.name.endsWith(".stx")&&G.name!=="_layout.stx"){let K=G.name.slice(0,-4);C.push(g?`${g}/${K}`:K)}}};return v(M,""),C.sort()}function c(M){let C=["// Auto-generated by stx \u2014 do not edit.","//","// Makes `definePageMeta({ layout })` reject a name with no layout behind it.","// Include this file in your tsconfig (it lives in the stx state directory,","// `.stx/` by default) for the check to apply.",""];if(M.length===0)return C.push("// No layouts found \u2014 `layout` stays typed as `string`.","export {}",""),C.join(`
|
|
3
|
-
`);return C.push("declare module '@stacksjs/stx' {"," interface KnownLayouts {",...M.map((v)=>` '${v}': true`)," }","}","","export {}",""),C.join(`
|
|
4
|
-
`)}function HM(M,C){if(!M)return[];let v=F.isAbsolute(M)?M:F.resolve(process.cwd(),M),q=f(v),g=c(q),j=F.join(C,h);try{if(Z.existsSync(j)&&Z.readFileSync(j,"utf8")===g)return q;Z.mkdirSync(C,{recursive:!0}),Z.writeFileSync(j,g)}catch{}return q}
|
|
5
|
-
export{Y as Gk,_ as Hk,a as Ik,s as Jk,h as Kk,f as Lk,c as Mk,HM as Nk};
|
package/dist/chunk-f8p69dsg.js
DELETED
|
@@ -1,3 +0,0 @@
|
|
|
1
|
-
// @bun
|
|
2
|
-
import{Fl as G}from"./chunk-s8jd13nb.js";import{Eq as U,Iq as B}from"./chunk-pwsnafp3.js";import{at as O}from"./chunk-pwgv84pn.js";import{Jt as L}from"./chunk-tkyrk66a.js";import{kx as y}from"./chunk-ay6zjq8v.js";import X from"fs";import Z from"path";var H=new Map,$=new Map;async function p(j){let J;for(let V=0;V<3;V++)try{let q=(await X.promises.stat(j)).mtime.getTime(),W=$.get(j);if(W&&W.mtime===q)return W.content;let I=await Bun.file(j).text(),T=(await X.promises.stat(j)).mtime.getTime();if(T!==q)continue;return $.set(j,{content:I,mtime:T}),I}catch(Q){J=Q;break}throw $.delete(j),Error(`File not found: ${j}${J?` (${J.message})`:""}`)}function m(j){$.delete(j)}function f(j){for(let z of $.keys())if(z.startsWith(j))$.delete(z)}var M=null,v=null,b=null;function r(j){b=j}async function k(j=!1){let z=b??await import("./chunk-vkhdce50.js");if(j)return z.generateSignalsRuntimeDev();if(M===null)M=z.generateSignalsRuntime();return M}var N=null;async function R(){if(N===null){let{getRouterScript:j}=await import("./chunk-0qv8yf53.js");N=j()}return N}var x={};async function d(j,z=!1){let J=j==="runtime"?await k(z):await R(),V=j==="runtime"&&z?"runtime-debug":j,Q=x[V];if(!Q||Q.content!==J)Q={content:J,hash:Bun.hash(J).toString(16).padStart(16,"0").slice(0,16)},x[V]=Q;return{content:J,hash:Q.hash,url:`/_stx/${j}.${Q.hash}.js`}}var E=500,Y=new Map;function w(j){return L(process.cwd(),"module-bundles",`${j}.js`)}function c(j){let z=Bun.hash(j).toString(16).padStart(16,"0").slice(0,16),J=Y.has(z);if(J)Y.delete(z);Y.set(z,j);while(Y.size>E)Y.delete(Y.keys().next().value);if(!J)try{let V=w(z);if(!X.existsSync(V))X.mkdirSync(Z.dirname(V),{recursive:!0}),X.writeFileSync(V,j)}catch{}return`/_stx/modules.${z}.js`}function l(j){if(!/^[0-9a-f]{16}$/.test(j))return;let z=Y.get(j);if(z!==void 0)return z;try{return X.readFileSync(w(j),"utf8")}catch{return}}function o(){$.clear(),B(),O(),M=null,v=null,N=null}function A(j){let z={debug:j.debug===!0,middleware:(j.middleware??[]).map((J)=>({name:J.name,timing:J.timing,handler:String(J.handler)})),customDirectives:(j.customDirectives??[]).map((J)=>({name:J.name,hasEndTag:J.hasEndTag===!0,rawParams:J.rawParams===!0,handler:String(J.handler)}))};return new Bun.CryptoHasher("sha1").update(JSON.stringify(z)).digest("hex")}async function s(j,z){try{if(!z.cachePath)return null;let J=Z.resolve(z.cachePath),V=Z.join(J,`${D(j)}.html`),Q=Z.join(J,`${D(j)}.meta.json`);if(!await U(V)||!await U(Q))return null;let q=await Bun.file(Q).text(),W=JSON.parse(q);if(W.cacheVersion!==z.cacheVersion)return null;if(W.engine!==G())return null;if(W.optionsSignature!==A(z))return null;if((await X.promises.stat(j)).mtime.getTime()>W.mtime)return null;for(let K of W.dependencies)if(await U(K)){if((await X.promises.stat(K)).mtime.getTime()>W.mtime)return null}else return null;return await Bun.file(V).text()}catch(J){return console.warn(`Cache error for ${j}:`,J),null}}async function n(j,z,J,V){try{if(!V.cachePath)return;let Q=Z.resolve(V.cachePath);await X.promises.mkdir(Q,{recursive:!0});let q=Z.join(Q,`${D(j)}.html`),W=Z.join(Q,`${D(j)}.meta.json`),I=await X.promises.stat(j);await Bun.write(q,z);let K={sourcePath:j,mtime:I.mtime.getTime(),dependencies:Array.from(J),cacheVersion:V.cacheVersion,engine:G(),optionsSignature:A(V),generatedAt:Date.now()};await Bun.write(W,JSON.stringify(K,null,2)),H.set(j,{output:z,mtime:I.mtime.getTime(),dependencies:J})}catch(Q){console.warn(`Failed to cache template ${j}:`,Q)}}var F=16;function D(j){return new Bun.CryptoHasher("sha1").update(j).digest("hex").substring(0,F)}
|
|
3
|
-
export{H as Vj,p as Wj,m as Xj,f as Yj,r as Zj,k as _j,R as $j,d as ak,c as bk,l as ck,o as dk,s as ek,n as fk,D as gk};
|
package/dist/chunk-f95drhdb.js
DELETED
|
@@ -1,194 +0,0 @@
|
|
|
1
|
-
// @bun
|
|
2
|
-
import{Hq as x,Mm as O,Mr as g,Wo as R,aq as H}from"./chunk-pwsnafp3.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
|
-
<template data-suspense-fallback>Loading...</template>
|
|
4
|
-
</div>`),w.set(Z.name,H(Z.content,j,q,G,$))}K.enqueue(`
|
|
5
|
-
<script>
|
|
6
|
-
(function() {
|
|
7
|
-
window.__stxSuspense = window.__stxSuspense || {
|
|
8
|
-
resolve: function(name, content) {
|
|
9
|
-
var el = document.querySelector('[data-suspense="' + name + '"]');
|
|
10
|
-
if (el) {
|
|
11
|
-
// Create a template to parse the HTML
|
|
12
|
-
var template = document.createElement('template');
|
|
13
|
-
template.innerHTML = content;
|
|
14
|
-
// Replace placeholder with actual content
|
|
15
|
-
el.replaceWith(template.content);
|
|
16
|
-
}
|
|
17
|
-
}
|
|
18
|
-
};
|
|
19
|
-
})();
|
|
20
|
-
</script>`);let U=Array.from(w.entries()).map(async([Z,F])=>{K.enqueue(await N(Z,F))});await Promise.all(U)}K.close()}catch(X){K.error(X)}}})}async function N(q,B){try{let G=(await B).replace(/`/g,"\\`").replace(/<\/script>/gi,"<\\/script>");return`
|
|
21
|
-
<script>
|
|
22
|
-
window.__stxSuspense.resolve('${q}', \`${G}\`);
|
|
23
|
-
</script>`}catch(Q){let G=Q instanceof Error?Q.message:String(Q);return`
|
|
24
|
-
<script>
|
|
25
|
-
window.__stxSuspense.resolve('${q}', '<div class="stx-error">Error loading content: ${O(G)}</div>');
|
|
26
|
-
</script>`}}var C=`
|
|
27
|
-
<script>
|
|
28
|
-
(function(){
|
|
29
|
-
window.__stxSuspense = window.__stxSuspense || {
|
|
30
|
-
resolve: function(name, content){
|
|
31
|
-
var el = document.querySelector('[data-suspense="' + name + '"]');
|
|
32
|
-
if (!el) return;
|
|
33
|
-
var t = document.createElement('template');
|
|
34
|
-
t.innerHTML = content;
|
|
35
|
-
// Keep handles to the inserted nodes \u2014 the fragment is emptied on insert.
|
|
36
|
-
var nodes = Array.prototype.slice.call(t.content.childNodes);
|
|
37
|
-
el.replaceWith(t.content);
|
|
38
|
-
// Hydrate the streamed content so interactive islands/directives inside
|
|
39
|
-
// it come alive (no-op when the signals runtime isn't on the page).
|
|
40
|
-
if (window.stx && typeof window.stx.hydrate === 'function') {
|
|
41
|
-
nodes.forEach(function(n){ if (n.nodeType === 1) window.stx.hydrate(n); });
|
|
42
|
-
}
|
|
43
|
-
}
|
|
44
|
-
};
|
|
45
|
-
})();
|
|
46
|
-
</script>`;function P(q,B,Q){if(!B||B<=0)return q;let G,J=new Promise((K,X)=>{G=setTimeout(()=>X(Error(`streaming boundary "${Q}" timed out after ${B}ms`)),B)});return Promise.race([q,J]).finally(()=>clearTimeout(G))}function s(q,B=[],Q={}){let G=Q.timeoutMs??0;return new ReadableStream({async start(J){try{if(J.enqueue(q),B.length>0)J.enqueue(C),await Promise.all(B.map(async(K)=>{let X=P(K.render(),G,K.id);J.enqueue(await N(K.id,X))}));J.close()}catch(K){J.error(K)}}})}var u=/@stream\s*\(\s*['"]([^'"]+)['"]\s*\)([\s\S]*?)@endstream/gi;function a(q,B){return q.replace(u,(Q,G,J)=>{let K=G.trim(),X=J.split(/@fallback/i),z=X[0].trim(),L=X.length>1?X.slice(1).join("@fallback").trim():"";if(!B.__streamTemplates)B.__streamTemplates={};return B.__streamTemplates[K]=z,`<div data-suspense="${K}">${L}</div>`})}function o(q){let B=q?.streamBoundaries;if(!B||typeof B!=="object")return;let Q=Object.entries(B).filter(([,G])=>typeof G==="function");return Q.length>0?Q.map(([G,J])=>({id:G,render:J})):void 0}async function n(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=new Set,$=G.streaming?.strategy||"auto",_=new RegExp(M.source,"g");if(!($!=="manual"&&_.test(Y))){let U=await H(Y,j,q,G,D);for(let Z=0;Z<U.length;Z+=J)K.enqueue(U.slice(Z,Z+J))}else{let U=[],Z=new RegExp(M.source,"g"),F;while((F=Z.exec(Y))!==null)U.push({name:F[1],content:F[2],start:F.index,end:F.index+F[0].length});let V=0;for(let W of U){if(W.start>V){let A=Y.slice(V,W.start);if(A.trim()){let I=await H(A,j,q,G,D);K.enqueue(I)}}let y=await H(W.content,j,q,G,D);K.enqueue(y),V=W.end}if(V<Y.length){let W=Y.slice(V);if(W.trim()){let y=await H(W,j,q,G,D);K.enqueue(y)}}}K.close()}catch(X){K.error(X)}}})}async function e(q,B={}){let Q={...g,...B,streaming:{...v,...B.streaming}},G=await Bun.file(q).text(),J=G.match(/<script\b[^>]*\bserver\b[^>]*>([\s\S]*?)<\/script>/i),K=J?J[1]:"",X=G.replace(/<script\b[^>]*>[\s\S]*?<\/script>/gi,""),z=X,L={},Y;M.lastIndex=0;while((Y=M.exec(X))!==null){let $=Y[1],_=Y[2];L[$]=_}let j=X.replace(M,"");return{renderShell:async($={})=>{let _={...$,__filename:q,__dirname:b.dirname(q)};return await R(K,_,q),H(j,_,q,Q,new Set)},renderSection:async($,_={})=>{try{if(!L[$])return`<div class="error-message">Section "${O($)}" not found in template "${O(q)}"</div>`;let w={..._,__filename:q,__dirname:b.dirname(q)};await R(K,w,q);let U=new Set;return await H(L[$],w,q,Q,U)}catch(w){let U=w instanceof Error?w.message:String(w);return x("Expression",U,q,L[$]||"",0,L[$]||"")}},getSections:()=>{return Object.keys(L)},getTemplate:()=>{return z}}}var d={name:"suspense",hasEndTag:!0,handler:(q,B,Q,G)=>{if(!B||B.length===0)throw Error("Suspense directive requires a name parameter");let J=B[0].replace(/['"`]/g,"");return`<!-- @suspense:${J} -->${q}<!-- @endsuspense:${J} -->`}},h={name:"island",hasEndTag:!0,handler:(q,B,Q,G)=>{if(!B||B.length===0)throw Error("Island directive requires a name parameter");let J=B[0].replace(/['"`]/g,""),K=B[1]?B[1].replace(/['"`]/g,""):"lazy",X=`island-${J}-${Math.random().toString(36).substring(2,9)}`,z=q.match(/<script\s+props\s*>([\s\S]*?)<\/script>/i),L=z?z[1].trim():"",Y=z?q.replace(z[0],""):q;return`<div data-island="${J}" data-island-id="${X}" data-priority="${K}">
|
|
47
|
-
${Y}
|
|
48
|
-
<script type="application/json" data-island-props="${X}">
|
|
49
|
-
${L?`{${L}}`:"{}"}
|
|
50
|
-
</script>
|
|
51
|
-
</div>`}};function t(q={}){let B=[];if(q.streaming?.enabled)B.push(d);if(q.hydration?.enabled)B.push(h);return B}async function qq(q,B,Q,G={}){return q}function Bq(q,B={}){let Q=new TextEncoder,G=q.pipeThrough(new TransformStream({transform(K,X){X.enqueue(Q.encode(K))}})),J=new Headers(B.headers);if(!J.has("Content-Type"))J.set("Content-Type","text/html; charset=utf-8");if(!J.has("Transfer-Encoding"))J.set("Transfer-Encoding","chunked");if(!J.has("X-Content-Type-Options"))J.set("X-Content-Type-Options","nosniff");if(!J.has("X-Accel-Buffering"))J.set("X-Accel-Buffering","no");return new Response(G,{...B,headers:J})}function Gq(q={mode:"full"}){let{mode:B,components:Q={},dynamicImports:G=!0}=q,J=Object.entries(Q).map(([K,X])=>`'${K}': ${G?`() => import('${X}')`:`require('${X}')`}`).join(`,
|
|
52
|
-
`);if(B==="loader")return`
|
|
53
|
-
(function() {
|
|
54
|
-
window.__stx = window.__stx || {};
|
|
55
|
-
window.__stx.islands = new Map();
|
|
56
|
-
window.__stx.registerComponent = function(name, component) {
|
|
57
|
-
window.__stx.islands.set(name, component);
|
|
58
|
-
};
|
|
59
|
-
})();`;return`
|
|
60
|
-
(function() {
|
|
61
|
-
'use strict';
|
|
62
|
-
|
|
63
|
-
// Hydration runtime for stx islands
|
|
64
|
-
const stx = {
|
|
65
|
-
// Component registry
|
|
66
|
-
components: {
|
|
67
|
-
${J}
|
|
68
|
-
},
|
|
69
|
-
|
|
70
|
-
// Loaded island instances
|
|
71
|
-
islands: new Map(),
|
|
72
|
-
|
|
73
|
-
// Register a component for hydration
|
|
74
|
-
registerComponent: function(name, loader) {
|
|
75
|
-
this.components[name] = loader;
|
|
76
|
-
},
|
|
77
|
-
|
|
78
|
-
// Get props for an island by ID
|
|
79
|
-
getIslandProps: function(id) {
|
|
80
|
-
const propsScript = document.querySelector('[data-island-props="' + id + '"]');
|
|
81
|
-
if (!propsScript) return {};
|
|
82
|
-
try {
|
|
83
|
-
return JSON.parse(propsScript.textContent || '{}');
|
|
84
|
-
}
|
|
85
|
-
catch (e) {
|
|
86
|
-
console.warn('[stx] Failed to parse island props:', id, e);
|
|
87
|
-
return {};
|
|
88
|
-
}
|
|
89
|
-
},
|
|
90
|
-
|
|
91
|
-
// Hydrate a single island
|
|
92
|
-
hydrateIsland: async function(element) {
|
|
93
|
-
const name = element.dataset.island;
|
|
94
|
-
const id = element.dataset.islandId;
|
|
95
|
-
|
|
96
|
-
if (!name || this.islands.has(id)) return;
|
|
97
|
-
|
|
98
|
-
const loader = this.components[name];
|
|
99
|
-
if (!loader) {
|
|
100
|
-
console.warn('[stx] Unknown island component:', name);
|
|
101
|
-
return;
|
|
102
|
-
}
|
|
103
|
-
|
|
104
|
-
try {
|
|
105
|
-
const component = typeof loader === 'function' ? await loader() : loader;
|
|
106
|
-
const props = this.getIslandProps(id);
|
|
107
|
-
|
|
108
|
-
// Mark as hydrating
|
|
109
|
-
element.dataset.hydrating = 'true';
|
|
110
|
-
|
|
111
|
-
// Call component's hydrate method if available
|
|
112
|
-
if (component.hydrate) {
|
|
113
|
-
await component.hydrate(element, props);
|
|
114
|
-
}
|
|
115
|
-
else if (component.default && component.default.hydrate) {
|
|
116
|
-
await component.default.hydrate(element, props);
|
|
117
|
-
}
|
|
118
|
-
|
|
119
|
-
// Mark as hydrated
|
|
120
|
-
delete element.dataset.hydrating;
|
|
121
|
-
element.dataset.hydrated = 'true';
|
|
122
|
-
this.islands.set(id, { element, component, props });
|
|
123
|
-
|
|
124
|
-
}
|
|
125
|
-
catch (error) {
|
|
126
|
-
console.error('[stx] Failed to hydrate island:', name, error);
|
|
127
|
-
element.dataset.hydrateError = 'true';
|
|
128
|
-
}
|
|
129
|
-
},
|
|
130
|
-
|
|
131
|
-
// Hydrate all islands based on priority
|
|
132
|
-
hydrate: function() {
|
|
133
|
-
const islands = document.querySelectorAll('[data-island]');
|
|
134
|
-
|
|
135
|
-
// Group by priority
|
|
136
|
-
const eager = [];
|
|
137
|
-
const lazy = [];
|
|
138
|
-
const idle = [];
|
|
139
|
-
|
|
140
|
-
islands.forEach(function(el) {
|
|
141
|
-
const priority = el.dataset.priority || 'lazy';
|
|
142
|
-
if (priority === 'eager') eager.push(el);
|
|
143
|
-
else if (priority === 'idle') idle.push(el);
|
|
144
|
-
else lazy.push(el);
|
|
145
|
-
});
|
|
146
|
-
|
|
147
|
-
// Hydrate eager immediately
|
|
148
|
-
eager.forEach(function(el) { stx.hydrateIsland(el); });
|
|
149
|
-
|
|
150
|
-
// Hydrate lazy on intersection
|
|
151
|
-
if (lazy.length > 0 && 'IntersectionObserver' in window) {
|
|
152
|
-
const observer = new IntersectionObserver(function(entries) {
|
|
153
|
-
entries.forEach(function(entry) {
|
|
154
|
-
if (entry.isIntersecting) {
|
|
155
|
-
observer.unobserve(entry.target);
|
|
156
|
-
stx.hydrateIsland(entry.target);
|
|
157
|
-
}
|
|
158
|
-
});
|
|
159
|
-
}, { rootMargin: '50px' });
|
|
160
|
-
|
|
161
|
-
lazy.forEach(function(el) { observer.observe(el); });
|
|
162
|
-
}
|
|
163
|
-
else {
|
|
164
|
-
// Fallback: hydrate all lazy immediately
|
|
165
|
-
lazy.forEach(function(el) { stx.hydrateIsland(el); });
|
|
166
|
-
}
|
|
167
|
-
|
|
168
|
-
// Hydrate idle during browser idle time
|
|
169
|
-
if (idle.length > 0 && 'requestIdleCallback' in window) {
|
|
170
|
-
requestIdleCallback(function() {
|
|
171
|
-
idle.forEach(function(el) { stx.hydrateIsland(el); });
|
|
172
|
-
});
|
|
173
|
-
}
|
|
174
|
-
else {
|
|
175
|
-
// Fallback: hydrate after a delay
|
|
176
|
-
setTimeout(function() {
|
|
177
|
-
idle.forEach(function(el) { stx.hydrateIsland(el); });
|
|
178
|
-
}, 200);
|
|
179
|
-
}
|
|
180
|
-
}
|
|
181
|
-
};
|
|
182
|
-
|
|
183
|
-
// Expose to window
|
|
184
|
-
window.__stx = stx;
|
|
185
|
-
|
|
186
|
-
// Auto-hydrate on DOMContentLoaded if not SSR
|
|
187
|
-
if (document.readyState === 'loading') {
|
|
188
|
-
document.addEventListener('DOMContentLoaded', function() { stx.hydrate(); });
|
|
189
|
-
}
|
|
190
|
-
else {
|
|
191
|
-
stx.hydrate();
|
|
192
|
-
}
|
|
193
|
-
})();`}
|
|
194
|
-
export{r as Ui,N as Vi,C as Wi,s as Xi,a as Yi,o as Zi,n as _i,e as $i,d as aj,h as bj,t as cj,qq as dj,Bq as ej,Gq as fj};
|
package/dist/chunk-ff5a6hvb.js
DELETED
|
@@ -1,17 +0,0 @@
|
|
|
1
|
-
// @bun
|
|
2
|
-
import{El as QJ}from"./chunk-ec4wq2sv.js";import{Fl as WJ}from"./chunk-s8jd13nb.js";import{Or as XJ,Pr as qJ,mm as GJ}from"./chunk-pwsnafp3.js";import{Hs as ZJ,Is as $J}from"./chunk-v3nwkveg.js";import{$s as YJ,dt as u}from"./chunk-pwgv84pn.js";import{Jt as c}from"./chunk-tkyrk66a.js";import X from"path";import O from"fs";function UJ(J){if(!J||typeof J!=="object")return!1;let K=J;return typeof K.message==="string"&&(K.name==="BuildMessage"||K.name==="ResolveMessage"||("position"in K))}function LJ(J){if(J&&typeof J==="object"&&Array.isArray(J.errors))return J.errors;return[J]}function b(J,K){let $=[];for(let W of LJ(J)){if(UJ(W)){let Y=W.position||void 0;$.push({file:K||Y?.file,line:Y?.line,column:Y?.column,message:W.message??"",lineText:Y?.lineText});continue}$.push({file:K,message:W instanceof Error?W.message:String(W)})}return $}function t(J,K){return b(J,K).map(($)=>{let W=$.file?`${$.file}${$.line?`:${$.line}${$.column?`:${$.column}`:""}`:""}`:"",Y=$.lineText?`
|
|
3
|
-
${$.lineText.trim()}`:"";return W?`${W}: ${$.message}${Y}`:`${$.message}${Y}`}).join(`
|
|
4
|
-
`)}var TJ=9;function P(J,K,$){return/^(?:(?:stx|ui)\.config\.[cm]?[jt]s|runtime-config-(?:server|loader)\.[cm]?[jt]s)$/.test(X.basename(J))||QJ(J,K,$)}var HJ=1,zJ=new Map,f=600,AJ=100,g=new Map;async function MJ(J){let K=g.get(J)??0;if(K>0&&K<AJ){g.set(J,K+1);return}g.set(J,1);try{let $=(await O.promises.readdir(J)).filter((z)=>z.endsWith(".js"));if($.length<=f)return;let Y=(await Promise.all($.map(async(z)=>{try{return{name:z,at:(await O.promises.stat(X.join(J,z))).mtimeMs}}catch{return null}}))).filter((z)=>z!==null);Y.sort((z,H)=>H.at-z.at);for(let z of Y.slice(f)){let H=z.name.slice(0,-3);await O.promises.rm(X.join(J,`${H}.js`),{force:!0}),await O.promises.rm(X.join(J,`${H}.deps.json`),{force:!0})}x("pruned bundle cache to",f,"entries")}catch{}}function nJ(J){return zJ.get(J)??[]}function h(J,K){if(J)zJ.set(J,K)}function CJ(J=process.env){return J.STX_DEBUG==="true"||J.STX_DEBUG==="1"}function x(...J){if(CJ())console.log("[stx:bundler]",...J)}var n=[];function r(J,K,$){n.push({filePath:J||"<inline>",message:K,details:$})}function oJ(){return n.slice()}function lJ(){n.length=0}var p;function dJ(J){p=J}function a(){if(p)return p;try{let J=qJ.strict;return typeof J==="object"&&J!==null?J.bundlerFallback??"warn":"warn"}catch{return"warn"}}var e=[/^stx$/,/^@stacksjs\/stx$/,/^@stores$/,/^stx\/stores$/,/^@composables$/];function sJ(J){let K=/^[ \t]*import[ \t]+(?!type(?:[ \t]|{))[\s\S]*?\s+from\s+['"]([^'"]+)['"][ \t]*;?/gm,$;while(($=K.exec(J))!==null){let Y=$[1];if(!e.some((H)=>H.test(Y)))return x("detected user import:",Y),!0}let W=/^[ \t]*import[ \t]+['"]([^'"]+)['"]/gm;while(($=W.exec(J))!==null){let Y=$[1];if(/\.css(?:\?.*)?$/.test(Y))continue;if(!e.some((H)=>H.test(Y)))return x("detected side-effect import:",Y),!0}return!1}var v="stx-module:",xJ=/\.(?:[cm]?[jt]sx?|json)$/i;function IJ(J,K){return X.relative(J,K).split(X.sep).join("/")}function _J(J,K){if(K.size===0)return J;return J.replace(/^([ \t]*import\s+(?:[^;"']*?\s+from\s+)?)(["'])([^"']+)\2/gm,($,W,Y,z)=>{let H=K.get(z);return H&&!z.startsWith(v)?`${W}${Y}${H}${Y}`:$})}function NJ(J,K){let $=0,W=(z)=>{let H=`__stxMod${$++}`,j=JSON.stringify(z);return K.push(`var ${H} = globalThis.__stxModules && globalThis.__stxModules[${j}];`,`if (${H} === undefined) throw new Error("[stx] module " + ${JSON.stringify(j)} + " is not registered on this page (#1957)");`),H},Y=(z,H)=>{for(let j of z.split(",")){let T=j.trim();if(!T)continue;let Q=T.match(/^("(?:[^"\\]|\\.)*"|[\w$]+)(?:\s+as\s+([\w$]+))?$/);if(!Q)continue;let Z=Q[1].startsWith('"')?JSON.parse(Q[1]):Q[1],G=Q[2]??Z;K.push(`var ${G} = ${H}[${JSON.stringify(Z)}];`)}};return J=J.replace(/^[ \t]*import\s+([^;"']*?)\s+from\s+["'](stx-module:[^"']+)["'];?[ \t]*$/gm,(z,H,j)=>{let T=j.slice(v.length),Q=W(T),Z=H.trim(),G=Z.match(/^([\w$]+)\s*(?:,\s*|$)/);if(G&&!Z.startsWith("{")&&!Z.startsWith("*"))K.push(`var ${G[1]} = ${Q}.default;`),Z=Z.slice(G[0].length).trim();let q=Z.match(/^\*\s*as\s+([\w$]+)$/);if(q)K.push(`var ${q[1]} = ${Q};`);else if(Z.startsWith("{"))Y(Z.replace(/^\{|\}$/g,""),Q);return""}),J=J.replace(/^[ \t]*import\s+["'](stx-module:[^"']+)["'];?[ \t]*$/gm,(z,H)=>{return W(H.slice(v.length)),""}),J}function JJ(J){let K=[J,`${J}.ts`,`${J}.tsx`,`${J}.js`,`${J}.mjs`,`${J}.jsx`,X.join(J,"index.ts"),X.join(J,"index.tsx"),X.join(J,"index.js"),X.join(J,"index.mjs")];for(let $ of K)try{if(O.existsSync($)&&O.statSync($,{throwIfNoEntry:!1})?.isFile())return $}catch{}return}function SJ(J,K,$,W,Y,z=new Map,H){let j=(Q,Z,G)=>{if(P(Z,J,H))return null;if(!Y||Q!==$||!xJ.test(Z))return null;try{if(!O.statSync(Z,{throwIfNoEntry:!1})?.isFile())return null}catch{return null}W.add(Z);let q=`${v}${IJ(process.cwd(),Z)}`;return z.set(G,q),{path:q,external:!0}},T=(Q,Z)=>{let G=Q===$?K:X.dirname(Q),q=X.resolve(G,Z);return JJ(q)??q};return{name:"stx-client-bundle",setup(Q){if(Q.onResolve({filter:/^(stx|@stacksjs\/stx)$/},(Z)=>({path:Z.path,external:!0})),Q.onResolve({filter:/^(@stores|@composables|stx\/stores)$/},(Z)=>({path:Z.path,external:!0})),Q.onResolve({filter:/^\//},(Z)=>{let G=JJ(Z.path);if(G){let q=j(Z.importer,G,Z.path);if(q)return q;if(G!==$)W.add(G);return{path:G}}return{path:Z.path,external:!0}}),Q.onResolve({filter:/^\.\.?\//},(Z)=>{let G=T(Z.importer,Z.path),q=j(Z.importer,G,Z.path);if(q)return q;return W.add(G),{path:G}}),Q.onResolve({filter:/^[@~]\//},(Z)=>{let G=X.resolve(J,Z.path.slice(2)),q=[G,`${G}.ts`,`${G}.tsx`,`${G}.js`,`${G}.mjs`,`${G}.jsx`,X.join(G,"index.ts"),X.join(G,"index.tsx"),X.join(G,"index.js"),X.join(G,"index.mjs")];for(let w of q)if(O.existsSync(w)&&O.statSync(w,{throwIfNoEntry:!1})?.isFile()){let y=j(Z.importer,w,Z.path);if(y)return y;return x(`resolved ${Z.path[0]}/ import:`,Z.path,"\u2192",w),W.add(w),{path:w}}return console.warn(`[stx:bundler] could not resolve ${Z.path[0]}/ import:`,Z.path),{path:G}}),Y)Q.onResolve({filter:/^(?!node:|bun:)(?:@[\w.-]+\/)?[\w.-]/},(Z)=>{if(Z.importer!==$)return;let G=`${v}npm:${Z.path}`;return z.set(Z.path,G),{path:G,external:!0}});Q.onLoad({filter:/\.(?:[cm]?[jt]sx?|json)$/},(Z)=>{if(P(Z.path,J,H))throw Error(`Server-only API source cannot be imported by a client script: ${Z.path}`);let G=X.extname(Z.path).toLowerCase(),q=G===".json"?"json":G===".tsx"?"tsx":G===".jsx"?"jsx":G===".ts"||G===".mts"||G===".cts"?"ts":"js";if(Z.path!==$)W.add(Z.path);return{contents:O.readFileSync(Z.path,"utf8"),loader:q}})}}}var m=new Map,D=YJ(64),KJ=Symbol.for("stx.client-bundle-build-queue");function yJ(J){let K=globalThis,W=(K[KJ]??Promise.resolve()).then(J,J);return K[KJ]=W.then(()=>{return},()=>{return}),W}async function iJ(J,K,$={}){let W=$.projectRoot||process.cwd(),Y=(await XJ(W)).serverApi,z=$.minify??!1,H=$.externalizeUserModules??!0,j=$.cacheDir||c(W,"bundle-cache"),T=new Bun.CryptoHasher("md5");T.update(`${TJ}\x00${WJ()}\x00${JSON.stringify(Y??!1)}\x00${H?"registry":"inline"}\x00${J}\x00${K}`);let Q=T.digest("hex").slice(0,12),Z=X.join(j,`${Q}.js`),G=D.get(Z);if(G){if(u(G.files)&&G.files.every((A)=>!P(A.path,W,Y))){x("memo hit:",Q);let A=G.files.map((M)=>M.path);return h(K,A),$.collectInputs?.push(...A),G.code}D.delete(Z),x("memo invalidated by dep change:",Q)}let q=X.join(j,`${Q}.deps.json`),w=Bun.file(Z);if(await w.exists()){let A=Bun.file(q),M=!1,U=null;if(await A.exists())try{let N=JSON.parse(await A.text());if(N.metadataVersion!==HJ||!Array.isArray(N.files))M=!1;else U=N.files,M=!0;if(U&&(!u(U)||U.some((B)=>P(B.path,W,Y))))M=!1}catch{M=!1}if(M){if(x("cache hit:",Q),U)h(K,U.map((B)=>B.path)),$.collectInputs?.push(...U.map((B)=>B.path));let N=await w.text();if(U)D.set(Z,{code:N,files:U});return N}x("cache invalidated by dep change:",Q)}let y=m.get(Q);if(y){let A=await y;if($.collectInputs)$.collectInputs.push(...(D.get(Z)?.files??[]).map((M)=>M.path));return A}let I=yJ(()=>FJ(J,K,{projectRoot:W,minify:z,cacheDir:j,hash:Q,cachePath:Z,depsPath:q,collectInputs:$.collectInputs,externalizeUserModules:H,serverApi:Y}));m.set(Q,I);try{return await I}finally{m.delete(Q)}}var BJ=0;function RJ(J){return`${J}-${process.pid}-${++BJ}`}async function FJ(J,K,$){let{projectRoot:W,minify:Y,cacheDir:z,hash:H,cachePath:j,depsPath:T,externalizeUserModules:Q}=$,Z=c(W,"bundle-tmp"),G=RJ(H),q=X.join(Z,`${G}.ts`),w=X.join(Z,"out",G);O.mkdirSync(Z,{recursive:!0}),O.mkdirSync(w,{recursive:!0});let y=X.dirname(K),I=new Set,A=/^[ \t]*(export\s+)?(?:const|let|var)\s+(?:\{([^}]+)\}|(\w+))/gm,M=/^[ \t]*(export\s+)?(?:async\s+)?function\s+(\w+)/gm,U=ZJ(J),{depths:N,balanced:B}=$J(U),o=(L)=>!B||N[L]===0,C;while((C=A.exec(U))!==null){if(C[1])continue;if(!o(C.index))continue;if(C[2])C[2].split(",").forEach((L)=>{let k=DJ(L);if(k)I.add(k)});else if(C[3])I.add(C[3])}while((C=M.exec(U))!==null){if(C[1])continue;if(!o(C.index))continue;I.add(C[2])}let VJ=I.size>0?`
|
|
5
|
-
export { ${[...I].join(", ")} }`:"";await Bun.write(q,J+VJ),x("bundling:",H,"from:",X.basename(K));let l=new Set,d=new Map;try{let L=await Bun.build({entrypoints:[q],outdir:w,target:"browser",format:"esm",minify:Y,plugins:[SJ(W,y,q,l,Q,d,$.serverApi)],define:{"process.env.NODE_ENV":Y?'"production"':'"development"',...GJ()},root:W});if(!L.success){let S=L.logs.filter((R)=>R.level==="error").map((R)=>R.message).join(", ")||`Unable to bundle ${X.basename(K)}`,F=b(L.logs,K||void 0);if(console.warn("[stx:bundler] build failed:",S),r(K||"",S,F),a()==="error")throw Error(S);return J}let k="";for(let V of L.outputs){k=await V.text();break}let _=[];for(let V of k.matchAll(/^\s*export\s*\{([^}]*)\}\s*;?\s*$/gm))for(let S of V[1].split(",")){let F=S.trim().match(/^([A-Za-z_$][\w$]*)\s+as\s+([A-Za-z_$][\w$]*)$/);if(F){_.push([F[2],F[1]]);continue}let R=S.trim();if(/^[A-Za-z_$][\w$]*$/.test(R))_.push([R,R])}let s=[];k=NJ(_J(k,d),s);let kJ=k.match(/^\s*import\s+[^;]+;?\s*$/gm)||[];k=k.replace(/^\s*import\s+[^;]+;?\s*$/gm,"").replace(/^\s*export\s*\{[^}]*\}\s*;?\s*$/gm,"").replace(/^\s*export\s+default\s+.*$/gm,"").trim();let i=`__stxBundle_${H}`,jJ=_.map(([V,S])=>`${JSON.stringify(V)}: ${S}`).join(", "),OJ=_.map(([V])=>`var ${V} = undefined;`).join(`
|
|
6
|
-
`),wJ=_.map(([V])=>`${V} = ${i}[${JSON.stringify(V)}];`).join(`
|
|
7
|
-
`);if(k=`${kJ.join(`
|
|
8
|
-
`)}
|
|
9
|
-
${OJ}
|
|
10
|
-
var ${i} = (function() {
|
|
11
|
-
${s.join(`
|
|
12
|
-
`)}
|
|
13
|
-
${k}
|
|
14
|
-
return { ${jJ} };
|
|
15
|
-
})();
|
|
16
|
-
${wJ}`.trim(),x("bundled:",H,"output:",k.length,"bytes"),I.size>0&&_.length===0)return console.warn(`[stx:bundler] dropped every binding for ${X.basename(K)} (${H}); serving the unbundled source and not caching this result`),J;O.mkdirSync(z,{recursive:!0}),await Bun.write(j,k);let E=Array.from(l).map((V)=>{try{return{path:V,mtimeMs:O.statSync(V).mtimeMs}}catch{return null}}).filter((V)=>V!==null);return await Bun.write(T,JSON.stringify({metadataVersion:HJ,files:E})),h(K,E.map((V)=>V.path)),$.collectInputs?.push(...E.map((V)=>V.path)),D.set(j,{code:k,files:E}),await MJ(z),k}catch(L){let k=b(L,K||void 0),_=t(L,K||void 0);if(console.warn(`[stx:bundler] error: ${_}`),r(K||"",_,k),a()==="error")throw L;return J}finally{try{O.rmSync(q,{force:!0}),O.rmSync(w,{recursive:!0,force:!0})}catch{}}}function DJ(J){let K=J.trim();if(!K)return null;let $=K.indexOf("=");if($!==-1)K=K.slice(0,$).trim();let W=K.indexOf(":");if(W!==-1)K=K.slice(W+1).trim();if(K.startsWith("..."))K=K.slice(3).trim();return/^[A-Za-z_$][\w$]*$/.test(K)?K:null}
|
|
17
|
-
export{t as il,nJ as jl,CJ as kl,r as ll,oJ as ml,lJ as nl,dJ as ol,a as pl,sJ as ql,v as rl,IJ as sl,_J as tl,NJ as ul,yJ as vl,iJ as wl,RJ as xl};
|
package/dist/chunk-fs5fy4h8.js
DELETED
|
@@ -1,2 +0,0 @@
|
|
|
1
|
-
// @bun
|
|
2
|
-
import{ap as a,bp as b,cp as c,dp as d}from"./chunk-pwsnafp3.js";import"./chunk-1cyxbb8y.js";import"./chunk-zcz9rs6p.js";import"./chunk-v3nwkveg.js";import"./chunk-9fqp72ze.js";import"./chunk-0btmm4m2.js";import"./chunk-pwgv84pn.js";import"./chunk-tkyrk66a.js";import"./chunk-ranshpyc.js";import"./chunk-98zj3fv2.js";import"./chunk-35ds08e7.js";import"./chunk-5se8xt9e.js";import"./chunk-gnfywmgs.js";import"./chunk-yq8x8bxq.js";import"./chunk-266t58b8.js";import"./chunk-nq5zxrk0.js";import"./chunk-az4v4ard.js";import"./chunk-4f9zyfdw.js";import"./chunk-xssw417m.js";import"./chunk-kg1rdena.js";import"./chunk-ay6zjq8v.js";export{b as reportDeferredLoopWarnings,c as processLoops,a as parseLoopBinding,d as declareBareLoopHead};
|
package/dist/chunk-fzsygce3.js
DELETED
package/dist/chunk-g465x63k.js
DELETED
|
@@ -1,2 +0,0 @@
|
|
|
1
|
-
// @bun
|
|
2
|
-
import{jl as a,kl as b,ll as c,ml as d,nl as e,ol as f,pl as g,ql as h,rl as i,sl as j,tl as k,ul as l,vl as m,wl as n,xl as o}from"./chunk-ff5a6hvb.js";import"./chunk-ec4wq2sv.js";import"./chunk-s8jd13nb.js";import"./chunk-pwsnafp3.js";import"./chunk-1cyxbb8y.js";import"./chunk-zcz9rs6p.js";import"./chunk-v3nwkveg.js";import"./chunk-9fqp72ze.js";import"./chunk-0btmm4m2.js";import"./chunk-pwgv84pn.js";import"./chunk-tkyrk66a.js";import"./chunk-ranshpyc.js";import"./chunk-98zj3fv2.js";import"./chunk-35ds08e7.js";import"./chunk-5se8xt9e.js";import"./chunk-gnfywmgs.js";import"./chunk-yq8x8bxq.js";import"./chunk-266t58b8.js";import"./chunk-nq5zxrk0.js";import"./chunk-az4v4ard.js";import"./chunk-4f9zyfdw.js";import"./chunk-xssw417m.js";import"./chunk-kg1rdena.js";import"./chunk-ay6zjq8v.js";export{o as tempBuildName,b as shouldLogBundlerDiagnostics,f as setBundlerFallbackMode,l as rewriteRegistryImports,g as resolveBundlerFallback,j as registryIdForPath,c as recordBundleFailure,m as queueClientBundleBuild,k as normalizeRegistrySpecifiers,h as hasUserImports,d as getBundleFailures,a as clientBundleDependencies,e as clearBundleFailures,n as bundleClientScript,i as MODULE_SPECIFIER_PREFIX};
|
package/dist/chunk-g708ekh1.js
DELETED
package/dist/chunk-gcr9e83g.js
DELETED
|
@@ -1,11 +0,0 @@
|
|
|
1
|
-
// @bun
|
|
2
|
-
import{Ri as O,Si as w,Ti as Z}from"./chunk-0c2h69k2.js";import{jl as R,ql as U,wl as T}from"./chunk-ff5a6hvb.js";import{Mo as W,Or as C,mm as M,wq as k}from"./chunk-pwsnafp3.js";import{Lv as E,Mv as L}from"./chunk-266t58b8.js";import{Qv as B}from"./chunk-az4v4ard.js";import $ from"path";var Y=new Map;function b(Q,z){for(let J of Q.matchAll(/\b(?:const|let|var|function|class)\s+([A-Z_a-z$][\w$]*)/g))if(J[1])z.add(J[1]);for(let J of Q.matchAll(/\b(?:const|let|var)\s*\{([^{}]*)\}\s*=/g))for(let H of(J[1]??"").split(",")){let K=((H.includes(":")?H.split(":").pop():H)??"").replace(/=.*$/s,"").replace(/^\s*\.\.\./,"").trim();if(/^[A-Z_a-z$][\w$]*$/.test(K))z.add(K)}for(let J of Q.matchAll(/\b(?:const|let|var)\s*\[([^\]]*)\]\s*=/g))for(let H of(J[1]??"").split(",")){let V=H.replace(/=.*$/s,"").replace(/^\s*\.\.\./,"").trim();if(/^[A-Z_a-z$][\w$]*$/.test(V))z.add(V)}}async function l(Q){let z;if(Q)z=$.resolve(Q);else{let q=await C();z=$.resolve(q.root||process.cwd(),q.storesDir||"stores")}let J=new Bun.Glob("*.ts"),H=[];try{for await(let q of J.scan({cwd:z,absolute:!0})){let y=$.basename(q,".ts");if(["index","types"].includes(y))continue;if(q.includes(".d.ts"))continue;H.push(q)}}catch{return Z(Y,z,"",""),null}let V=()=>[...new Set([...H,...H.flatMap((q)=>R(q))])],K=O(V()),P=w(Y,z,K);if(P!==void 0)return P||null;if(H.length===0)return Z(Y,z,K,""),null;let A=[];for(let q of H){let y=await Bun.file(q).text();A.push({file:q,hasUseStore:/useStore\s*\(/.test(y)})}A.sort((q,y)=>{if(q.hasUseStore===y.hasUseStore)return 0;return q.hasUseStore?1:-1});let N=A.map((q)=>q.file),G=[],X=new Set,F=k({loader:"ts",target:"browser",define:M()});for(let q of N)try{let y=await Bun.file(q).text(),I=$.basename(q,".ts");if(b(y,X),U(y))y=await T(y,q,{projectRoot:process.cwd(),externalizeUserModules:!1});y=W(y),y=E(y),y=L(y),y=y.replace(/^export\s+(default\s+)?/gm,""),y=F.transformSync(y),G.push(`// Store: ${I}
|
|
3
|
-
${y.trim()}`)}catch(y){console.warn(`[stx] Failed to load store ${q}:`,y)}if(G.length===0)return Z(Y,z,K,""),null;let j=G.join(`
|
|
4
|
-
|
|
5
|
-
`),x=`;(function(){
|
|
6
|
-
var __stx = window.stx || {};
|
|
7
|
-
${B.filter((q)=>!X.has(q)&&new RegExp(`\\b${q}\\b`).test(j)).map((q)=>`var ${q} = __stx[${JSON.stringify(q)}];`).join(`
|
|
8
|
-
`)}
|
|
9
|
-
${j}
|
|
10
|
-
})();`;return K=O(V()),Z(Y,z,K,x),x}function a(){Y.clear()}
|
|
11
|
-
export{l as Pi,a as Qi};
|
package/dist/chunk-gdmyrsr8.js
DELETED
|
@@ -1,4 +0,0 @@
|
|
|
1
|
-
// @bun
|
|
2
|
-
import{kx as H}from"./chunk-ay6zjq8v.js";import P from"path";var $=/__stxModules\["((?:[^"\\]|\\.)*)"\]/g;function G(...w){let v=new Set;for(let q of w){if(!q||!q.includes("__stxModules["))continue;for(let z of q.matchAll($))try{v.add(JSON.parse(`"${z[1]}"`))}catch{}}return[...v].sort()}async function T(w,v={}){if(w.length===0)return null;let q=process.cwd(),z=[],J=[];w.forEach((j,X)=>{let Z=j.startsWith("npm:")?j.slice(4):P.resolve(q,j),N=`__stxRegistered${X}`,O=JSON.stringify(j);z.push(`import * as ${N} from ${JSON.stringify(Z)};`),J.push(`if (!globalThis.__stxModules[${O}]) globalThis.__stxModules[${O}] = ${N};`)});let L=[...z,"globalThis.__stxModules = globalThis.__stxModules || {};",...J].join(`
|
|
3
|
-
`),B;try{let{bundleClientScript:j}=await import("./chunk-g465x63k.js");B=await j(L,P.join(q,".stx-module-registry.ts"),{projectRoot:q,minify:v.minify,externalizeUserModules:!1,collectInputs:v.collectInputs})}catch(j){return console.warn("[stx] could not build the page module registry (#1957):",j),null}let{transformAutoImports:Q,generateAutoImportDestructuring:U}=await import("./chunk-pfs0gpzm.js"),F=Q(B),V=U(F.stxImports,F.browserImports),{transformStoreImports:W}=await import("./chunk-pshdwq44.js");B=W(F.code);let M=JSON.stringify(new Bun.CryptoHasher("md5").update(L).digest("hex").slice(0,12));return[";(function() {"," var __stxBundles = globalThis.__stxModuleBundles || (globalThis.__stxModuleBundles = {});",` if (__stxBundles[${M}]) return;`,` __stxBundles[${M}] = true;`,V,B,"})();"].join(`
|
|
4
|
-
`)}export{G as registeredModuleIdsIn,T as buildModuleRegistryScript};
|
package/dist/chunk-gkms2ngq.js
DELETED
|
@@ -1,2 +0,0 @@
|
|
|
1
|
-
// @bun
|
|
2
|
-
import{$t as a,au as b,bu as c,cu as d,du as e,eu as f,fu as g}from"./chunk-35ds08e7.js";import"./chunk-ay6zjq8v.js";export{a as withRuntimeConfig,c as useServerRuntimeConfig,d as useRuntimeConfig,f as runtimeConfigTag,e as resolveRuntimeConfig,g as injectRuntimeConfig,b as currentRuntimeConfig};
|