@stacksjs/stx 0.2.604 → 0.2.606
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/{chunk-38mt83wa.js → chunk-06wv8qwy.js} +6 -6
- package/dist/chunk-0d6b3eeb.js +2 -0
- package/dist/{chunk-9cgga2aw.js → chunk-0v89nfz1.js} +2 -2
- package/dist/chunk-1e28n9q2.js +2 -0
- package/dist/chunk-1fdrhfc0.js +2 -0
- package/dist/{chunk-htcptqtn.js → chunk-1jxdkp8x.js} +6 -6
- package/dist/chunk-1veeefpn.js +2 -0
- package/dist/{chunk-6eg9a3mt.js → chunk-20k77e2a.js} +4 -4
- package/dist/chunk-2r4an7bh.js +2 -0
- package/dist/chunk-304vaxnk.js +2 -0
- package/dist/chunk-327bt8zb.js +2 -0
- package/dist/chunk-36n8yz6t.js +2 -0
- package/dist/{chunk-jczknjbw.js → chunk-3cnwstra.js} +2 -2
- package/dist/chunk-3gm6013p.js +2 -0
- package/dist/chunk-3ttnn4t3.js +2 -0
- package/dist/chunk-3yttgk0s.js +2 -0
- package/dist/chunk-4ck2xc8m.js +2 -0
- package/dist/{chunk-rd7w0cx4.js → chunk-4dfqgmgs.js} +39 -39
- package/dist/chunk-4jasfhh6.js +2 -0
- package/dist/{chunk-axz1x4r9.js → chunk-4tj0ap61.js} +5 -5
- package/dist/{chunk-9nt3q23a.js → chunk-53y4z4p2.js} +3 -3
- package/dist/{chunk-j1dmkt29.js → chunk-5e182xqt.js} +1 -1
- package/dist/{chunk-67m2prah.js → chunk-5s47qfp6.js} +2 -2
- package/dist/{chunk-bn7fzfc2.js → chunk-5taenpfg.js} +1 -1
- package/dist/chunk-605c6zks.js +2 -0
- package/dist/chunk-61d0gr5b.js +2 -0
- package/dist/{chunk-1944jgb2.js → chunk-67tpacz0.js} +1 -1
- package/dist/{chunk-9h1ytsgm.js → chunk-6by8dtan.js} +2 -2
- package/dist/{chunk-k71e38fk.js → chunk-6xsm53pz.js} +4 -4
- package/dist/{chunk-tc3ne706.js → chunk-7095f0hb.js} +9 -9
- package/dist/chunk-7renf4zp.js +2 -0
- package/dist/{chunk-9wtb959p.js → chunk-81qmj3sd.js} +7 -7
- package/dist/chunk-8t3c2myr.js +2 -0
- package/dist/chunk-8x2ejkcc.js +2 -0
- package/dist/chunk-915s0may.js +2 -0
- package/dist/chunk-93na8hh0.js +2 -0
- package/dist/{chunk-de3gknmn.js → chunk-9734nkc8.js} +3 -3
- package/dist/chunk-9fpnnfr3.js +2 -0
- package/dist/{chunk-ftr0fvw7.js → chunk-9zwdpa7p.js} +5 -5
- package/dist/chunk-ajd5w5c4.js +2 -0
- package/dist/{chunk-nfht2ryp.js → chunk-azpkje69.js} +8 -5
- package/dist/chunk-b4tbqz8r.js +2 -0
- package/dist/chunk-be2kmw0p.js +2 -0
- package/dist/{chunk-48s1nprc.js → chunk-bhf9yt2w.js} +2 -2
- package/dist/chunk-bkjre6xk.js +127 -0
- package/dist/chunk-bnpb6ez9.js +2 -0
- package/dist/{chunk-jtq8e3b0.js → chunk-bsy8v1xj.js} +2 -2
- package/dist/chunk-c0h9cxew.js +2 -0
- package/dist/{chunk-zrw1zf54.js → chunk-cfpenvc7.js} +3 -3
- package/dist/chunk-cw76y2p5.js +2 -0
- package/dist/chunk-d0kes50w.js +2 -0
- package/dist/{chunk-4st1qw62.js → chunk-dmdhbwmn.js} +3 -3
- package/dist/{chunk-t19th11m.js → chunk-dnqq1ze0.js} +3 -3
- package/dist/chunk-dzbkgsv8.js +4 -0
- package/dist/chunk-dzekcand.js +2 -0
- package/dist/{chunk-bfbmdjh4.js → chunk-efy3038a.js} +2 -2
- package/dist/chunk-en388k3h.js +2 -0
- package/dist/chunk-ewkza45r.js +2 -0
- package/dist/chunk-fcgf8d5k.js +2 -0
- package/dist/chunk-fese2cf6.js +2 -0
- package/dist/{chunk-79zfhk62.js → chunk-fwp1en28.js} +6 -6
- package/dist/{chunk-9x4r15mv.js → chunk-ghdyqt98.js} +2 -2
- package/dist/chunk-gk7mmc2e.js +2 -0
- package/dist/chunk-gw2dvp35.js +2 -0
- package/dist/chunk-h9drxwva.js +2 -0
- package/dist/chunk-hrr7k1qc.js +2 -0
- package/dist/{chunk-jb6zejnt.js → chunk-htf3z9et.js} +3 -3
- package/dist/chunk-j04brkj0.js +2 -0
- package/dist/chunk-jbvwg4gs.js +2 -0
- package/dist/{chunk-wkxzzdzs.js → chunk-jpxekhdh.js} +3 -3
- package/dist/chunk-jshj69dy.js +2 -0
- package/dist/{chunk-y09g63k0.js → chunk-jsktg3ab.js} +5 -5
- package/dist/{chunk-zvs13kgh.js → chunk-k3f4044e.js} +2 -2
- package/dist/chunk-k7spjpr0.js +2 -0
- package/dist/chunk-kgvm5ytn.js +2 -0
- package/dist/chunk-km9a5gp4.js +2 -0
- package/dist/{chunk-4h58as2c.js → chunk-kxjd6e2h.js} +2 -2
- package/dist/{chunk-nb0ytx70.js → chunk-m95zjk91.js} +2 -2
- package/dist/{chunk-h7atbtds.js → chunk-m9h7pmkh.js} +5 -5
- package/dist/chunk-mfery7a4.js +2 -0
- package/dist/chunk-mn7a5b55.js +3 -0
- package/dist/{chunk-vmsw9sdw.js → chunk-mtxs4fya.js} +2 -2
- package/dist/{chunk-8s7zbhdd.js → chunk-mvwcf4xy.js} +4 -4
- package/dist/chunk-myqhdz1w.js +2 -0
- package/dist/chunk-n35yc890.js +3 -0
- package/dist/chunk-n882b1fy.js +2 -0
- package/dist/chunk-p8sv5fqs.js +2 -0
- package/dist/chunk-pndhb1nk.js +2 -0
- package/dist/chunk-pt7e0be5.js +2 -0
- package/dist/chunk-q40ahbjs.js +2 -0
- package/dist/{chunk-gzpxvca7.js → chunk-qh07a85k.js} +3 -3
- package/dist/chunk-qjxxhdv7.js +2 -0
- package/dist/chunk-qygr4pv8.js +2 -0
- package/dist/{chunk-18ws9heh.js → chunk-r4h8fg1x.js} +1 -1
- package/dist/chunk-r4wqh5fd.js +2845 -0
- package/dist/{chunk-tnafnb23.js → chunk-r69jfs59.js} +1 -1
- package/dist/{chunk-xcyreehd.js → chunk-rg7wvcqw.js} +2 -2
- package/dist/{chunk-82bttwqm.js → chunk-rmv35cx0.js} +2 -2
- package/dist/chunk-rp93n4z7.js +3 -0
- package/dist/chunk-rrw2jg26.js +2 -0
- package/dist/{chunk-kn2exbq7.js → chunk-s45envb5.js} +5 -5
- package/dist/{chunk-tds3d65g.js → chunk-s4pjf2pc.js} +2 -2
- package/dist/{chunk-b3c1gggs.js → chunk-sswjv8p9.js} +2 -2
- package/dist/{chunk-bsy10tz6.js → chunk-t9t66sz4.js} +6 -6
- package/dist/{chunk-pb7vste8.js → chunk-tbsjg23k.js} +4 -4
- package/dist/{chunk-q6h6yjg4.js → chunk-tcd2zez3.js} +2 -2
- package/dist/{chunk-f17rcvdb.js → chunk-td30jg06.js} +2 -2
- package/dist/{chunk-qf39z0hg.js → chunk-td5100fz.js} +7 -7
- package/dist/{chunk-hvqjs9ps.js → chunk-tyb481p0.js} +1 -1
- package/dist/{chunk-a8n6mt7s.js → chunk-tydv84gj.js} +2 -2
- package/dist/{chunk-hsy9rhct.js → chunk-vehtypx0.js} +2 -2
- package/dist/{chunk-jmczvhpy.js → chunk-vhajhs44.js} +5 -5
- package/dist/{chunk-5c153w4j.js → chunk-vm2d4hap.js} +3 -3
- package/dist/{chunk-y3wdf7v7.js → chunk-vntpfbwy.js} +1 -1
- package/dist/{chunk-25zpd110.js → chunk-vp3fzjsc.js} +2 -2
- package/dist/{chunk-3xdfqn0d.js → chunk-vvfpb3k3.js} +5 -5
- package/dist/{chunk-q1cvef6b.js → chunk-vw62fjpv.js} +3 -3
- package/dist/{chunk-er5wxv0f.js → chunk-w67rrd1f.js} +10 -10
- package/dist/{chunk-shnsvsg4.js → chunk-w8g2ppnr.js} +2 -2
- package/dist/chunk-wjhhb6dn.js +2 -0
- package/dist/chunk-wm8w2721.js +2 -0
- package/dist/{chunk-g6ew2drc.js → chunk-wy53pys4.js} +5 -5
- package/dist/{chunk-v8ze2q95.js → chunk-wzjf33es.js} +2 -2
- package/dist/{chunk-gh181dnr.js → chunk-x8q5przn.js} +10 -10
- package/dist/{chunk-vn6h03nq.js → chunk-xjxc4q3w.js} +27 -27
- package/dist/chunk-y2wr7c9e.js +2 -0
- package/dist/{chunk-kx52xt96.js → chunk-y54fz9rk.js} +2 -2
- package/dist/{chunk-788d9msn.js → chunk-y6gj9jq8.js} +6 -6
- package/dist/chunk-y8jjmwa9.js +2 -0
- package/dist/{chunk-xwatzxk5.js → chunk-y9a9cvke.js} +13 -13
- package/dist/{chunk-y0qjpcc8.js → chunk-yzj55rfs.js} +3 -3
- package/dist/{chunk-hz11wmx9.js → chunk-z8fhtym2.js} +2 -2
- package/dist/chunk-z8mdsjzw.js +2 -0
- package/dist/chunk-zg87pybq.js +2 -0
- package/dist/chunk-zs3ezqy3.js +2 -0
- package/dist/{chunk-ydt4sd6m.js → chunk-zs3tmd12.js} +2 -2
- package/dist/cli.js +20 -20
- package/dist/component-renderer.js +62 -9
- package/dist/craft-entry.js +2 -2
- package/dist/craft.js +2 -2
- package/dist/expressions.js +7 -1
- package/dist/native/accessibility.d.ts +12 -0
- package/dist/native/accessibility.js +19 -0
- package/dist/native/compiler/headwind-to-style.js +23 -29
- package/dist/native/compiler/html-to-ir.js +17 -7
- package/dist/native/compiler/inline-style.d.ts +7 -0
- package/dist/native/compiler/inline-style.js +8 -1
- package/dist/native/compiler/ir.d.ts +3 -1
- package/dist/native/compiler/render-screen.js +1 -1
- package/dist/native/components/primitives.d.ts +16 -14
- package/dist/native/components/primitives.js +1 -0
- package/dist/native/index.d.ts +1 -0
- package/dist/native/primitives/Link.stx +5 -0
- package/dist/native/prop-names.js +6 -0
- package/dist/native/runtime/binding-tree.js +2 -1
- package/dist/native/runtime/browser-renderer.js +63 -4
- package/dist/native/runtime/craft-bridge.js +8 -2
- package/dist/native/runtime/craft.d.ts +4 -0
- package/dist/native/runtime/native-host.js +20 -14
- package/dist/native/runtime/overlay-presenter.d.ts +2 -0
- package/dist/native/runtime/overlay-presenter.js +10 -5
- package/dist/native/runtime/view-operations.d.ts +1 -1
- package/dist/native/runtime/view-operations.js +5 -1
- package/dist/pwa.js +3 -3
- package/dist/slot-scopes.d.ts +7 -0
- package/dist/slot-scopes.js +19 -0
- package/dist/slots.js +23 -7
- package/dist/ssg.js +12 -12
- package/dist/stx-virtual-ts.js +6 -5
- package/dist/utils.d.ts +1 -1
- package/dist/utils.js +1 -1
- package/package.json +5 -5
- package/dist/chunk-00vp75pj.js +0 -2
- package/dist/chunk-04gt67sv.js +0 -2
- package/dist/chunk-08p1kxsj.js +0 -2
- package/dist/chunk-0hpw65yr.js +0 -2
- package/dist/chunk-0rekvsy4.js +0 -2
- package/dist/chunk-122y2fkw.js +0 -3
- package/dist/chunk-138zjhwa.js +0 -2
- package/dist/chunk-1sbj8yqe.js +0 -2
- package/dist/chunk-2c7ysn9s.js +0 -2
- package/dist/chunk-2qt63502.js +0 -2
- package/dist/chunk-2wb1w0p6.js +0 -2
- package/dist/chunk-38mt99p3.js +0 -2
- package/dist/chunk-3q312svf.js +0 -2
- package/dist/chunk-6djvj6hg.js +0 -2
- package/dist/chunk-6vncjspv.js +0 -2
- package/dist/chunk-7dkwf9h5.js +0 -2
- package/dist/chunk-7ejmya3v.js +0 -2
- package/dist/chunk-8992smwz.js +0 -2
- package/dist/chunk-8mffwm1f.js +0 -2
- package/dist/chunk-8txwa114.js +0 -2
- package/dist/chunk-9j6hk72q.js +0 -2
- package/dist/chunk-a1szmtn1.js +0 -127
- package/dist/chunk-acm2tym9.js +0 -2
- package/dist/chunk-afmzxwj1.js +0 -2
- package/dist/chunk-bk3yktq8.js +0 -2
- package/dist/chunk-bpz3yv92.js +0 -2
- package/dist/chunk-bx3qewwk.js +0 -2
- package/dist/chunk-ce2d0hz9.js +0 -2
- package/dist/chunk-d81h4mxd.js +0 -2
- package/dist/chunk-dgtxj56t.js +0 -3
- package/dist/chunk-djqmzzn6.js +0 -2
- package/dist/chunk-eactb0nz.js +0 -2
- package/dist/chunk-eqa0wdv9.js +0 -4
- package/dist/chunk-esac5ych.js +0 -2
- package/dist/chunk-esj49jvz.js +0 -2
- package/dist/chunk-et8wjgxw.js +0 -2
- package/dist/chunk-ffykng6w.js +0 -2
- package/dist/chunk-fwt5fh5w.js +0 -2
- package/dist/chunk-g3qbe5y2.js +0 -2
- package/dist/chunk-h5g8k974.js +0 -2
- package/dist/chunk-hhwnd24n.js +0 -2
- package/dist/chunk-hq4mtcp0.js +0 -2
- package/dist/chunk-hvd9qc98.js +0 -2
- package/dist/chunk-j0z7010x.js +0 -2845
- package/dist/chunk-jhswy523.js +0 -2
- package/dist/chunk-jjs6nqh1.js +0 -2
- package/dist/chunk-jyqanvwp.js +0 -2
- package/dist/chunk-khdvzjzd.js +0 -2
- package/dist/chunk-n06xznty.js +0 -2
- package/dist/chunk-p973efbe.js +0 -2
- package/dist/chunk-qq59xzwc.js +0 -2
- package/dist/chunk-r0e743c3.js +0 -2
- package/dist/chunk-r4adpej7.js +0 -2
- package/dist/chunk-rd9yv1n3.js +0 -3
- package/dist/chunk-shzesarq.js +0 -2
- package/dist/chunk-t9914jjh.js +0 -2
- package/dist/chunk-wf2wnmjg.js +0 -2
- package/dist/chunk-wn2gzwmv.js +0 -2
- package/dist/chunk-wr6gw263.js +0 -2
- package/dist/chunk-xarb7knj.js +0 -2
- package/dist/chunk-xe7jw7nn.js +0 -2
- package/dist/chunk-xfe2nzxd.js +0 -2
- package/dist/chunk-xjwgzp6s.js +0 -2
- package/dist/chunk-xmz2h8cb.js +0 -2
- package/dist/chunk-y6909jm7.js +0 -2
- package/dist/chunk-zg0pnh4w.js +0 -2
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
// @bun
|
|
2
|
-
import{t,i,
|
|
3
|
-
`:l==="t"?"\t":l;continue}if(o===r)return null;if(r==="`"&&o==="$"&&n[a+1]==="{")return null;s+=o}return s}var ue=new Set(["true","false","null","undefined","typeof","void","new","in","of","instanceof","this","delete","await","async","function","return","NaN","Infinity"]);function
|
|
4
|
-
${s}${e.slice(r)}`}var N=
|
|
5
|
-
${o[0]}${e.slice(r,o.index)}${e.slice(l,a)}${e.slice(a)}`}function
|
|
6
|
-
${n[0]}${s.slice(a)}`}var Y="<style data-stx-cloak>[x-cloak]{display:none !important}</style>",w="data-stx-html-attrs",C="data-stx-html-class",G=/^[A-Za-z_:][\w:.-]*$/;function y(e){return String(e).replace(/&/g,"&").replace(/"/g,""").replace(/</g,"<").replace(/>/g,">")}function we(e){return String(e).replace(/&/g,"&").replace(/</g,"<").replace(/>/g,">")}function
|
|
7
|
-
`}function Ie(e){let n=[],r=0;while(r<e.length){let o=e.slice(r),l=o.match(/^\s+/);if(l){r+=l[0].length;continue}if(o.startsWith("<!--")){let h=e.indexOf("-->",r);if(h===-1)break;r=h+3;continue}let u=o.match(/^<script\b[^>]*>/i);if(u){let h=e.toLowerCase().indexOf("</script>",r+u[0].length);if(h===-1)break;r=h+9;continue}let p=o.match(/^<link\b[^>]*>/i);if(p){n.push(p[0]),r+=p[0].length;continue}let d=o.match(/^<meta\b[^>]*>/i);if(d){n.push(d[0]),r+=d[0].length;continue}let f=o.match(/^<style\b[^>]*>[\s\S]*?<\/style>/i);if(f){n.push(f[0]),r+=f[0].length;continue}break}if(n.length===0)return{body:e,hoisted:n};let s="",a=0;while(a<e.length&&a<r){let o=e.slice(a),l=o.match(/^<link\b[^>]*>/i);if(l&&n.includes(l[0])){a+=l[0].length;continue}let u=o.match(/^<meta\b[^>]*>/i);if(u&&n.includes(u[0])){a+=u[0].length;continue}let p=o.match(/^<style\b[^>]*>[\s\S]*?<\/style>/i);if(p&&n.includes(p[0])){a+=p[0].length;continue}s+=e[a],a++}return s+=e.slice(r),{body:s,hoisted:n}}function _e(e,n={},r={}){let{title:s="stx App",lang:a="en",meta:o=[],link:l=[],script:u=[],headRaw:p="",htmlAttrs:d={},bodyClass:f="",bodyAttrs:h={}}=n,m=r.title||s,A=[{charset:"UTF-8"},{name:"viewport",content:"width=device-width, initial-scale=1.0"}],E=new Set(o.map(
|
|
2
|
+
import{t,i,Dn,kr,Ae,c}from"./chunk-06wv8qwy.js";import U from"path";function S(e,n,r,s=0){let a=0,o=s,l=null,u=0,p=!1;while(o<e.length){let d=e[o];if(l&&p){p=!1,o++;continue}if(l&&d==="\\"){p=!0,o++;continue}if(p=!1,(d==='"'||d==="'"||d==="`")&&!l){l=d,o++;continue}if(d===l&&l!=="`"){l=null,o++;continue}if(l==="`"&&d==="$"&&e[o+1]==="{"){u++,o+=2;continue}if(u>0&&d==="}"){u--,o++;continue}if(d==="`"&&l==="`"&&u===0){l=null,o++;continue}if(l){o++;continue}if(d===n)a++;else if(d===r){if(a--,a===0)return o}o++}return-1}function Gs(e,n){let r=[];n.lastIndex=0;let s;while((s=n.exec(e))!==null){let a=s.index,o=a+s[0].length-1,l=S(e,"(",")",o);if(l===-1){r.push({start:a,end:-1,args:"",call:e.slice(a,Math.min(e.length,a+80))}),n.lastIndex=o+1;continue}r.push({start:a,end:l+1,args:e.slice(o+1,l),call:e.slice(a,l+1)}),n.lastIndex=l+1}return r}function st(e,n,r,s){let a="",o=0;for(let l of Gs(e,n)){if(a+=e.slice(o,l.start),l.end===-1){a+=s(l.call),o=l.start;continue}a+=r(l.args,l.call),o=l.end}return a+e.slice(o)}function ot(e){let n=[],r=0,s=null,a="";for(let o=0;o<e.length;o++){let l=e[o];if(s){if(a+=l,l==="\\"&&o+1<e.length){a+=e[++o];continue}if(l===s)s=null;continue}if(l==="'"||l==='"'||l==="`")s=l;else if(l==="("||l==="["||l==="{")r++;else if(l===")"||l==="]"||l==="}")r--;else if(l===","&&r===0){n.push(a.trim()),a="";continue}a+=l}if(a.trim())n.push(a.trim());return n}function O(e){let n=e.trim(),r=n[0];if(r!=="'"&&r!=='"'&&r!=="`"||n.length<2||n.at(-1)!==r)return null;let s="";for(let a=1;a<n.length-1;a++){let o=n[a];if(o==="\\"&&a+1<n.length-1){let l=n[++a];s+=l==="n"?`
|
|
3
|
+
`:l==="t"?"\t":l;continue}if(o===r)return null;if(r==="`"&&o==="$"&&n[a+1]==="{")return null;s+=o}return s}var ue=new Set(["true","false","null","undefined","typeof","void","new","in","of","instanceof","this","delete","await","async","function","return","NaN","Infinity"]);function it(e,n){let r=e.trim();if(!r)return{ok:!1,message:"the argument is empty",code:t.INVALID_DIRECTIVE_SYNTAX};let s=Dn(r);if(s)return{ok:!1,message:`the expression is not allowed (${s})`,code:t.UNSAFE_EXPRESSION};let a=kr(n),o;try{o=c(r,Object.keys(a))(...Object.values(a))}catch(u){return{ok:!1,message:`the expression could not be evaluated: ${u instanceof Error?u.message:String(u)}`,code:t.EVALUATION_ERROR}}if(o!==void 0&&o!==null)return{ok:!0,value:o};let l=[...new Set(Ae(r))].filter((u)=>!ue.has(u)&&!(u in a)&&!(u in globalThis));if(l.length>0)return{ok:!1,message:`${l.map((p)=>`"${p}"`).join(", ")} ${l.length===1?"is":"are"} not defined here. Values a directive reads must come from <script server> or the render context; a plain <script> runs in the browser. To pass literal text, quote it.`,code:t.UNDEFINED_VARIABLE};if(o===void 0&&(r.startsWith("{")||r.startsWith("[")))return{ok:!1,message:"the expression threw while it was evaluated",code:t.EVALUATION_ERROR};return{ok:!0,value:o}}function ye(e){if(e===null)return"null";if(Array.isArray(e))return"an array";if(typeof e==="object")return"an object";if(typeof e==="string")return`a string ("${e.length>40?`${e.slice(0,40)}...`:e}")`;return`${/^[aeiou]/.test(typeof e)?"an":"a"} ${typeof e}`}function $e(e){return typeof e==="object"&&e!==null&&!Array.isArray(e)}function V(e){if(!e)return"";return U.isAbsolute(e)?U.relative(process.cwd(),e)||e:e}function M(e){let n=e.replace(/\s+/g," ").trim();return n.length>80?`${n.slice(0,77)}...`:n}function _(e,n,r,s,a=t.EVALUATION_ERROR){let o=s?` in ${V(s)}`:"";return console.warn(`[stx] ${M(n)}${o}: ${r}`),i(e,`${M(n)}: ${r}`,a)}function vr(e,n,r){let s=r?` in ${V(r)}`:"";console.warn(`[stx] ${M(e)}${s}: ${n}`)}function Ks(){return{afterOpen:[],beforeClose:[]}}function pe(e){return e.afterOpen.length>0||e.beforeClose.length>0}function Vi(e,n){if(!pe(n))return e;let r=n.afterOpen.join(""),s=n.beforeClose.join(""),a=e.lastIndexOf("</head>"),o=r?Tn(e):null,l=s&&a!==-1?a:null;if(o===null&&l===null)return e;if(o!==null&&l!==null)return`${e.slice(0,o)}${r}${e.slice(o,l)}${s}${e.slice(l)}`;if(o!==null)return`${e.slice(0,o)}${r}${e.slice(o)}`;return`${e.slice(0,l)}${s}${e.slice(l)}`}var K=/\s*<meta\b[^>]*\bcharset\b[^>]*>/iy;function Tn(e){let n=/<head\b[^>]*>/i.exec(e);if(!n)return null;let r=n.index+n[0].length;K.lastIndex=r;let s=K.exec(e);return s?r+s[0].length:r}var L="data-stx-color-mode-boot",F="__STX_COLOR_MODE__",de=new Set(["light","dark","auto","system"]),ge=new Set(["auto","system"]),fe=/^[a-z][\w:-]*$/i,he=/^[\w-]+$/;function me(e){let n=e.storageKey??"stx-color-mode",r=e.initialMode??"auto",s=e.darkClass===void 0?"dark":e.darkClass,a=e.attribute??null,o=e.autoValue??null,l=e.respectExisting===!0;if(typeof n!=="string"||n.length===0)throw Error("colorMode.storageKey must be a non-empty string");if(!de.has(r))throw Error(`colorMode.initialMode must be one of light, dark, auto, system \u2014 got ${JSON.stringify(r)}`);if(s!==null&&(typeof s!=="string"||!he.test(s)))throw Error(`colorMode.darkClass must be a single CSS class name, or null to opt out \u2014 got ${JSON.stringify(s)}`);if(a!==null&&(typeof a!=="string"||!fe.test(a)))throw Error(`colorMode.attribute must be a valid HTML attribute name \u2014 got ${JSON.stringify(a)}`);if(o!==null&&!ge.has(o))throw Error(`colorMode.autoValue must be 'auto' or 'system' \u2014 got ${JSON.stringify(o)}`);if(s===null&&a===null)throw Error("colorMode needs at least one of darkClass or attribute \u2014 with both null nothing would mark the mode on <html>");if(l&&a===null)throw Error("colorMode.respectExisting needs an attribute to read \u2014 the dark class alone cannot say whether a mode was chosen");return{storageKey:n,initialMode:r==="system"?"auto":r,darkClass:s,attribute:a,autoValue:o,respectExisting:l}}function ke(e){return JSON.stringify(e).replace(/</g,"\\u003c").replace(/>/g,"\\u003e").replace(/&/g,"\\u0026").replace(/\u2028/g,"\\u2028").replace(/\u2029/g,"\\u2029")}function D(e={}){let n=me(e),r=ke(n),s=`(function(){"use strict";var o=window.${F};if(o&&typeof o.sync==="function"){o.sync();return}var c=${r};var r=document.documentElement;function read(){var p=c.initialMode,a=c.autoValue;try{var v=localStorage.getItem(c.storageKey);if(v==="light"||v==="dark"){p=v}else if(v==="auto"||v==="system"){p="auto";if(!a)a=v}}catch(e){}return{p:p,a:a}}function sys(){try{return matchMedia("(prefers-color-scheme: dark)").matches?"dark":"light"}catch(e){return"light"}}function stamp(m){if(c.attribute)r.setAttribute(c.attribute,m);if(c.darkClass){if(m==="dark")r.classList.add(c.darkClass);else r.classList.remove(c.darkClass)}}var s=read();var f=null;if(c.respectExisting&&c.attribute){var x=r.getAttribute(c.attribute);if(x==="light"||x==="dark")f=x}var m=f||(s.p==="auto"?sys():s.p);var p=s.p;stamp(m);var g=null;function sync(){var t=read(),n=f||(t.p==="auto"?sys():t.p);var moved=n!==m,chose=t.p!==p;if(moved){r.style.setProperty("transition","none","important");stamp(n);void r.offsetHeight;r.style.removeProperty("transition")}else stamp(n);m=n;p=t.p;if(g){g.mode=n;g.preference=t.p;if(t.a)g.autoValue=t.a}if(moved||chose){try{window.dispatchEvent(new CustomEvent("stx:color-mode",{detail:{mode:n,preference:t.p}}))}catch(e){}}}try{g=window.${F}={storageKey:c.storageKey,initialMode:c.initialMode,darkClass:c.darkClass,attribute:c.attribute,autoValue:s.a||"auto",respectExisting:c.respectExisting,forced:f,preference:p,mode:m,watching:true,sync:sync}}catch(e){}try{var q=matchMedia("(prefers-color-scheme: dark)");if(q.addEventListener)q.addEventListener("change",sync);else if(q.addListener)q.addListener(sync)}catch(e){}try{addEventListener("pageshow",sync);addEventListener("storage",function(e){if(e.key===null||e.key===c.storageKey)sync()});document.addEventListener("visibilitychange",function(){if(document.visibilityState==="visible")sync()})}catch(e){}}());`;return`<script ${L}>${s}</script>`}function $n(e,n={}){if(e.includes(L))return e;let r=N(e);if(r===null)return e;let s=D(n);return`${e.slice(0,r)}
|
|
4
|
+
${s}${e.slice(r)}`}var N=Tn,Te=new RegExp(`<script\\b[^>]*\\b${L}\\b[^>]*>[\\s\\S]*?<\\/script>`,"i"),W=/<meta\b[^>]*\bcharset\b[^>]*>/gi,q=/<\/head>/gi;function Ee(e){let n=/<head\b[^>]*>/i.exec(e);if(!n)return e;let r=n.index+n[0].length;q.lastIndex=r;let s=q.exec(e),a=s?s.index:e.length;W.lastIndex=r;let o=W.exec(e);if(!o||o.index>=a)return e;if(e.slice(r,o.index).trim()==="")return e;let l=o.index+o[0].length;return`${e.slice(0,r)}
|
|
5
|
+
${o[0]}${e.slice(r,o.index)}${e.slice(l,a)}${e.slice(a)}`}function Ui(e){return xe(Ee(e))}function xe(e){let n=Te.exec(e);if(!n)return e;let r=N(e);if(r===null)return e;if(n.index<=r||e.slice(r,n.index).trim()==="")return e;let s=e.slice(0,n.index)+e.slice(n.index+n[0].length),a=N(s);if(a===null)return e;return`${s.slice(0,a)}
|
|
6
|
+
${n[0]}${s.slice(a)}`}var Y="<style data-stx-cloak>[x-cloak]{display:none !important}</style>",w="data-stx-html-attrs",C="data-stx-html-class",G=/^[A-Za-z_:][\w:.-]*$/;function y(e){return String(e).replace(/&/g,"&").replace(/"/g,""").replace(/</g,"<").replace(/>/g,">")}function we(e){return String(e).replace(/&/g,"&").replace(/</g,"<").replace(/>/g,">")}function Re(e){if(e.name)return`name="${e.name}"`;if(e.property)return`property="${e.property}"`;if(e.charset!=null)return"charset=";if(e["http-equiv"])return`http-equiv="${e["http-equiv"]}"`;return""}function Ce(e){let n=/^\s*<meta\b([^>]*)>/i.exec(e);if(!n)return null;let r={};for(let s of n[1].matchAll(/([\w:-]+)(?:\s*=\s*(?:"([^"]*)"|'([^']*)'|([^\s"'>]+)))?/g))r[s[1].toLowerCase()]=s[2]??s[3]??s[4]??"";return r}function k(e,n){return Object.entries(e).filter(([r])=>!n?.(r)).map(([r,s])=>`${r}="${y(String(s))}"`).join(" ")}function R(e){let n=String(e.content),r=typeof e.type==="string"?e.type.trim().toLowerCase():"";return/json$|^importmap$/.test(r)?n.replace(/<\//g,"<\\/"):n}function J(e){let n=k(e,(r)=>r==="content");return`<script${n?` ${n}`:""}>${R(e)}</script>`}function Se(e={},n="en"){let r=[],s=[],a="",o=n;for(let[u,p]of Object.entries(e||{})){if(p==null)continue;let d=u.trim();if(!G.test(d))continue;let f=d.toLowerCase();if(f==="lang"){o=String(p);continue}if(f==="class"){a=String(p).trim();continue}r.push(` ${d}="${y(String(p))}"`),s.push(d)}let l=` lang="${y(o)}"`;if(a)l+=` class="${y(a)}"`;if(l+=r.join(""),a)l+=` ${C}="${y(a)}"`;if(s.length)l+=` ${w}="${y(s.join(" "))}"`;return l}function Wi(e={},n={}){let r={...e,...n};if(e.class&&n.class){let s=e.class.split(/\s+/).filter(Boolean);for(let a of n.class.split(/\s+/).filter(Boolean))if(!s.includes(a))s.push(a);r.class=s.join(" ")}return r}function Rn(e,n={}){if(!n||Object.keys(n).length===0)return e;let r=e.match(/<html\b([^>]*)>/i);if(!r)return e;let s={},a=[],o=/([A-Za-z_:][\w:.-]*)(?:\s*=\s*(?:"([^"]*)"|'([^']*)'|([^\s"'>]+)))?/g,l;while((l=o.exec(r[1]))!==null){let f=l[1];if(!(f in s))a.push(f);s[f]=l[2]??l[3]??l[4]??""}let u=[],p=[];for(let[f,h]of Object.entries(n)){if(h==null)continue;let m=f.trim();if(!G.test(m))continue;let A=m.toLowerCase();if(A==="class"){let E=(s.class||"").split(/\s+/).filter(Boolean);for(let x of String(h).split(/\s+/).filter(Boolean))if(!E.includes(x))E.push(x),u.push(x);if(!("class"in s))a.push("class");s.class=E.join(" ");continue}if(!(m in s))a.push(m);if(s[m]=String(h),A!=="lang")p.push(m)}if(u.length){if(!(C in s))a.push(C);s[C]=u.join(" ")}if(p.length){if(!(w in s))a.push(w);s[w]=p.join(" ")}let d=a.map((f)=>` ${f}="${y(s[f])}"`).join("");return e.replace(r[0],()=>`<html${d}>`)}function qi(e){if(e.includes("data-stx-cloak"))return null;if(e.lastIndexOf("</head>")===-1)return null;return`${Y}
|
|
7
|
+
`}function Ie(e){let n=[],r=0;while(r<e.length){let o=e.slice(r),l=o.match(/^\s+/);if(l){r+=l[0].length;continue}if(o.startsWith("<!--")){let h=e.indexOf("-->",r);if(h===-1)break;r=h+3;continue}let u=o.match(/^<script\b[^>]*>/i);if(u){let h=e.toLowerCase().indexOf("</script>",r+u[0].length);if(h===-1)break;r=h+9;continue}let p=o.match(/^<link\b[^>]*>/i);if(p){n.push(p[0]),r+=p[0].length;continue}let d=o.match(/^<meta\b[^>]*>/i);if(d){n.push(d[0]),r+=d[0].length;continue}let f=o.match(/^<style\b[^>]*>[\s\S]*?<\/style>/i);if(f){n.push(f[0]),r+=f[0].length;continue}break}if(n.length===0)return{body:e,hoisted:n};let s="",a=0;while(a<e.length&&a<r){let o=e.slice(a),l=o.match(/^<link\b[^>]*>/i);if(l&&n.includes(l[0])){a+=l[0].length;continue}let u=o.match(/^<meta\b[^>]*>/i);if(u&&n.includes(u[0])){a+=u[0].length;continue}let p=o.match(/^<style\b[^>]*>[\s\S]*?<\/style>/i);if(p&&n.includes(p[0])){a+=p[0].length;continue}s+=e[a],a++}return s+=e.slice(r),{body:s,hoisted:n}}function _e(e,n={},r={}){let{title:s="stx App",lang:a="en",meta:o=[],link:l=[],script:u=[],headRaw:p="",htmlAttrs:d={},bodyClass:f="",bodyAttrs:h={}}=n,m=r.title||s,A=[{charset:"UTF-8"},{name:"viewport",content:"width=device-width, initial-scale=1.0"}],E=new Set(o.map(Re).filter(Boolean)),{body:x,hoisted:B}=Ie(e),te=new Set(B.flatMap((g)=>{let v=Ce(g);return v?[Re(v)].filter(Boolean):[]})),ne=[...A.filter((g)=>!E.has(Re(g))),...o].filter((g)=>!te.has(Re(g))).map((g)=>` <meta ${k(g)}>`).join(`
|
|
8
8
|
`),re=l.map((g)=>` <link ${k(g)}>`).join(`
|
|
9
9
|
`),ie=u.map((g)=>{if(g.src)return` <script ${k(g,(v)=>v==="content")}></script>`;if(g.content)return` ${J(g)}`;return""}).filter(Boolean).join(`
|
|
10
10
|
`),se=Se(d,a),oe=Object.entries(h).map(([g,v])=>` ${g}="${y(String(v))}"`).join(""),ae=f?` class="${y(f)}"`:"",le=[ne,r.colorMode?` ${D(r.colorMode)}`:"",` <title>${r.titleIsHtml?m:we(m)}</title>`,` ${Y}`,re,ie,p?` ${p}`:"",...(r.styles||[]).map((g)=>` ${g}`),...B.map((g)=>` ${g}`),...(r.headScripts||[]).map((g)=>` ${g}`),r.headStack||""].filter(Boolean),ce=[x,...(r.bodyScripts||[]).map((g)=>g),r.bodyStack||""].filter(Boolean);return`<!DOCTYPE html>
|
|
@@ -17,8 +17,8 @@ ${le.join(`
|
|
|
17
17
|
${ce.join(`
|
|
18
18
|
`)}
|
|
19
19
|
</body>
|
|
20
|
-
</html>`}var H=/\s+/y,j=/<(script|style)\b[^>]*>/iy,Me=/<\/script>/gi,Oe=/<\/style>/gi,z=/<!DOCTYPE\b/iy,X=/<html[\s>]/iy;function
|
|
20
|
+
</html>`}var H=/\s+/y,j=/<(script|style)\b[^>]*>/iy,Me=/<\/script>/gi,Oe=/<\/style>/gi,z=/<!DOCTYPE\b/iy,X=/<html[\s>]/iy;function Ft(e){let n=0;while(n<e.length){if(H.lastIndex=n,H.exec(e)){n=H.lastIndex;continue}if(e.startsWith("<!--",n)){let a=e.indexOf("-->",n);if(a===-1)return!1;n=a+3;continue}j.lastIndex=n;let s=j.exec(e);if(s){let a=s[1].toLowerCase()==="script"?Me:Oe;a.lastIndex=j.lastIndex;let o=a.exec(e);if(o===null)return!1;n=o.index+o[0].length;continue}if(z.lastIndex=n,z.test(e))return!0;return X.lastIndex=n,X.test(e)}return!1}function Xs(e){return Ft(e)}function Gi(e,n={}){let r=e.lastIndexOf("</head>");if(r===-1)return e;let{meta:s=[],link:a=[],script:o=[],headRaw:l=""}=n,u=e.slice(0,r),p=[];for(let d of s){let f=Re(d);if(f&&u.includes(f))continue;p.push(` <meta ${k(d)}>`)}for(let d of a){if(d.href&&u.includes(`href="${d.href}"`))continue;p.push(` <link ${k(d)}>`)}for(let d of o)if(d.src){if(u.includes(`src="${d.src}"`))continue;p.push(` <script ${k(d,(f)=>f==="content")}></script>`)}else if(d.content){if(u.includes(R(d)))continue;p.push(` ${J(d)}`)}if(l&&!u.includes(l))p.push(` ${l}`);if(p.length===0)return e;return`${e.slice(0,r)}${p.join(`
|
|
21
21
|
`)}
|
|
22
|
-
${e.slice(r)}`}function
|
|
23
|
-
`)}function
|
|
24
|
-
`,"")),headContent:n.trim()}}function
|
|
22
|
+
${e.slice(r)}`}function An(e,n={},r={},s){if(s??Xs(e))return e;return _e(e,n,r)}var Ne=["og:","article:","book:","profile:","fb:","music:","video:"],Le=/^[a-z][\w-]*(?::[\w:-]+)?$/i;function Pn(e,n){if(e.length<1)return{kind:"error",message:"meta directive requires at least the meta name",code:t.INVALID_DIRECTIVE_SYNTAX};if(e.length>2)return{kind:"error",message:`@meta takes a name and a value, got ${e.length} arguments`,code:t.INVALID_DIRECTIVE_SYNTAX};let r=De(e[0],n);if(typeof r!=="string")return r;let s;if(e.length===2){let o=He(e[1],n);if(typeof o!=="string")return o;s=o}else{let o=r.includes(":")?r.slice(r.indexOf(":")+1):r,l=n.openGraph,u=n[o]??($e(l)?l[o]:void 0);s=u===void 0||u===null||typeof u==="object"?"":String(u)}if(!s)return{kind:"empty"};return{kind:"tag",tag:Ne.some((o)=>r.startsWith(o))?{property:r,content:s}:{name:r,content:s}}}function De(e,n){let r=O(e);if(r!==null)return r.trim()?r:{kind:"error",message:"the meta name is empty",code:t.INVALID_DIRECTIVE_SYNTAX};if(Le.test(e.trim()))return e.trim();let s=it(e,n);if(!s.ok)return{kind:"error",message:`meta name: ${s.message}`,code:s.code};if(typeof s.value!=="string"||!s.value.trim())return{kind:"error",message:`the meta name must be a non-empty string, got ${ye(s.value)}`,code:t.TYPE_ERROR};return s.value}function He(e,n){let r=O(e);if(r!==null)return r;let s=it(e,n);if(!s.ok)return{kind:"error",message:s.message,code:s.code};let a=s.value;if(a===void 0||a===null||a===!1)return"";if(Array.isArray(a))return a.filter((o)=>o!==void 0&&o!==null&&o!=="").map(String).join(", ");if(typeof a==="object"&&!(a instanceof Date))return{kind:"error",message:`the content must be text, got ${ye(a)}`,code:t.TYPE_ERROR};return String(a)}var In=["title","lang","meta","link","script","headRaw","htmlAttrs","bodyClass","bodyAttrs"],wr=["title","titleTemplate","base","meta","link","script","style","htmlAttrs","bodyAttrs"],ee={links:"link",metas:"meta",scripts:"script",styles:"style"},Z=new Set,Q=new WeakMap;function P(e){if(Z.has(e))return;Z.add(e),console.warn(e)}function je(e,n){let r=Array.from({length:n.length+1},(s,a)=>a);for(let s=1;s<=e.length;s++){let a=r[0];r[0]=s;for(let o=1;o<=n.length;o++){let l=r[o];r[o]=Math.min(r[o]+1,r[o-1]+1,a+(e[s-1]===n[o-1]?0:1)),a=l}}return r[n.length]}function Pe(e,n){let r=e.toLowerCase(),s=n.find((p)=>p.toLowerCase()===r);if(s)return s;let a=ee[r];if(a&&n.includes(a))return a;let o,l=1/0;for(let p of n){let d=je(r,p.toLowerCase());if(d<l)o=p,l=d}let u=Math.min(e.length,o?.length??0)<=4?1:2;return l<=u?o:void 0}function be(e,n){if(!e||typeof e!=="object"||Array.isArray(e))return e||{};let r=Q.get(e);if(r)return r;let{known:s,source:a}=n,o=e;for(let l of Object.keys(e)){if(s.includes(l))continue;let u=ee[l];if(u&&s.includes(u)&&Array.isArray(e[l])){if(o===e)o={...e};let d=Array.isArray(o[u])?o[u]:[];o[u]=[...d,...e[l]],delete o[l],P(`[stx] ${a}.${l} is not a head key; reading it as ${a}.${u}. Rename it to \`${u}\`.`);continue}if(/^styles?$/.test(l)&&!s.includes("style")){P(`[stx] ${a}.${l} is not a head key and is ignored. Use \`link\` with rel: 'stylesheet', or \`headRaw\` for an inline <style>.`);continue}let p=Pe(l,s);P(p?`[stx] ${a}.${l} is not a head key and is ignored. Did you mean \`${p}\`?`:`[stx] ${a}.${l} is not a head key and is ignored. Known keys: ${s.join(", ")}.`)}return Q.set(e,o),o}var b={},Be=[],I={};function Js(){return b}function Cd(){return I}function _d(){b={},Be.length=0,I={}}function Ki(e){b=ve(b,be(e,{known:wr,source:"useHead()"}))}function ve(e,n){return{title:n.title??e.title,titleTemplate:n.titleTemplate??e.titleTemplate,base:n.base??e.base,meta:[...e.meta||[],...n.meta||[]],link:[...e.link||[],...n.link||[]],script:[...e.script||[],...n.script||[]],style:[...e.style||[],...n.style||[]],htmlAttrs:{...e.htmlAttrs,...n.htmlAttrs},bodyAttrs:{...e.bodyAttrs,...n.bodyAttrs}}}function nl(e){Ki(xr(e))}function xr(e){let n=[];if(e.description)n.push({name:"description",content:e.description});if(e.keywords){let p=Array.isArray(e.keywords)?e.keywords.join(", "):e.keywords;n.push({name:"keywords",content:p})}if(e.author)n.push({name:"author",content:e.author});if(e.robots)n.push({name:"robots",content:e.robots});let r=e.ogTitle??e.title,s=e.ogDescription??e.description;if(r)n.push({property:"og:title",content:r});if(s)n.push({property:"og:description",content:s});if(e.ogImage){if(n.push({property:"og:image",content:e.ogImage}),e.ogImageType)n.push({property:"og:image:type",content:e.ogImageType});if(e.ogImageWidth)n.push({property:"og:image:width",content:String(e.ogImageWidth)});if(e.ogImageHeight)n.push({property:"og:image:height",content:String(e.ogImageHeight)});if(e.ogImageAlt)n.push({property:"og:image:alt",content:e.ogImageAlt})}if(e.ogUrl)n.push({property:"og:url",content:e.ogUrl});if(e.ogType)n.push({property:"og:type",content:e.ogType});if(e.ogSiteName)n.push({property:"og:site_name",content:e.ogSiteName});if(e.ogLocale)n.push({property:"og:locale",content:e.ogLocale});if(e.profileFirstName)n.push({property:"profile:first_name",content:e.profileFirstName});if(e.profileLastName)n.push({property:"profile:last_name",content:e.profileLastName});if(e.profileUsername)n.push({property:"profile:username",content:e.profileUsername});let a=e.twitterTitle??e.title,o=e.twitterDescription??e.description,l=e.twitterImage??e.ogImage;if(e.twitterCard)n.push({name:"twitter:card",content:e.twitterCard});if(a)n.push({name:"twitter:title",content:a});if(o)n.push({name:"twitter:description",content:o});if(l){n.push({name:"twitter:image",content:l});let p=e.twitterImageAlt??(e.twitterImage?void 0:e.ogImageAlt);if(p)n.push({name:"twitter:image:alt",content:p})}if(e.twitterSite)n.push({name:"twitter:site",content:e.twitterSite});if(e.twitterCreator)n.push({name:"twitter:creator",content:e.twitterCreator});if(e.articleAuthor)n.push({property:"article:author",content:e.articleAuthor});if(e.articlePublishedTime)n.push({property:"article:published_time",content:e.articlePublishedTime});if(e.articleModifiedTime)n.push({property:"article:modified_time",content:e.articleModifiedTime});if(e.articleSection)n.push({property:"article:section",content:e.articleSection});if(e.articleTags)for(let p of e.articleTags)n.push({property:"article:tag",content:p});let u=[];if(e.canonical)u.push({rel:"canonical",href:e.canonical});return{title:e.title,titleTemplate:e.titleTemplate,meta:n,link:u}}function Ed(e){if(I={...I,...e},e.title||e.description)nl({title:e.title,description:e.description})}function Td(e){let n=typeof e==="function"?e():e;Ki({title:n})}function $d(e=b){let n=[];if(e.title){let r=e.title;if(e.titleTemplate)r=typeof e.titleTemplate==="function"?e.titleTemplate(r):e.titleTemplate.replace("%s",r);n.push(`<title>${T(r)}</title>`)}if(e.base){let r=Object.entries(e.base).map(([s,a])=>`${s}="${T(a)}"`).join(" ");n.push(`<base ${r}>`)}for(let r of e.meta||[]){let s=Object.entries(r).filter(([a,o])=>o!==void 0).map(([a,o])=>`${a==="httpEquiv"?"http-equiv":a}="${T(String(o))}"`).join(" ");n.push(`<meta ${s}>`)}for(let r of e.link||[]){let s=Object.entries(r).filter(([a,o])=>o!==void 0).map(([a,o])=>`${a}="${T(String(o))}"`).join(" ");n.push(`<link ${s}>`)}for(let r of e.script||[]){let{content:s,...a}=r,o=Object.entries(a).filter(([l,u])=>u!==void 0).map(([l,u])=>{if(typeof u==="boolean")return u?l:"";return`${l}="${T(String(u))}"`}).filter(Boolean).join(" ");if(s)n.push(`<script ${o}>${R(r)}</script>`);else n.push(`<script ${o}></script>`)}for(let r of e.style||[]){let s=r.type?` type="${r.type}"`:"";n.push(`<style${s}>${r.content}</style>`)}return n.join(`
|
|
23
|
+
`)}function Rd(e=b){if(!e.htmlAttrs)return"";return Object.entries(e.htmlAttrs).map(([n,r])=>`${n}="${T(r)}"`).join(" ")}function Ad(e=b){if(!e.bodyAttrs)return"";return Object.entries(e.bodyAttrs).map(([n,r])=>`${n}="${T(r)}"`).join(" ")}function T(e){return e.replace(/&/g,"&").replace(/</g,"<").replace(/>/g,">").replace(/"/g,""").replace(/'/g,"'")}function Pd(e=b){if(typeof document>"u")return;if(e.title){let n=e.title;if(e.titleTemplate)n=typeof e.titleTemplate==="function"?e.titleTemplate(n):e.titleTemplate.replace("%s",n);document.title=n}for(let n of e.meta||[]){let r=n.name?`meta[name="${n.name}"]`:n.property?`meta[property="${n.property}"]`:null;if(r){let s=document.querySelector(r);if(!s){if(s=document.createElement("meta"),n.name)s.setAttribute("name",n.name);if(n.property)s.setAttribute("property",n.property);document.head.appendChild(s)}s.setAttribute("content",n.content)}}for(let n of e.link||[]){let r=`link[rel="${n.rel}"]${n.href?`[href="${n.href}"]`:""}`,s=document.querySelector(r);if(!s)s=document.createElement("link"),document.head.appendChild(s);for(let[a,o]of Object.entries(n))if(o!==void 0)s.setAttribute(a,String(o))}if(e.htmlAttrs)for(let[n,r]of Object.entries(e.htmlAttrs))if(n==="class")for(let s of String(r).split(/\s+/).filter(Boolean))document.documentElement.classList.add(s);else document.documentElement.setAttribute(n,r);if(e.bodyAttrs)for(let[n,r]of Object.entries(e.bodyAttrs))document.body.setAttribute(n,r)}function Id(e){let n="";return{content:e.replace(/@head\s*([\s\S]*?)@endhead/g,(s,a)=>(n+=a.trim()+`
|
|
24
|
+
`,"")),headContent:n.trim()}}function Od(e,n){return e.replace(/@title\s*\(\s*(?:(['"`])(.+?)\1|([^)]+))\s*\)/g,(r,s,a,o)=>{let l=s?a:n[(o||"").trim()]??o,u=n.__stx_runtime_head??{};return n.__stx_runtime_head=ve(u,{title:l}),""})}function Dd(e,n,r=""){if(!e.includes("@meta"))return e;return st(e,/(?<![\w$@])@meta\s*\(/g,(s,a)=>{let o=Pn(ot(s),n);if(o.kind==="error")return _("Meta",a,o.message,r,o.code);if(o.kind==="tag"){let l=n.__stx_runtime_head??{};n.__stx_runtime_head=ve(l,{meta:[o.tag]})}return""},(s)=>_("Meta",s,"the call has no closing parenthesis",r,t.INVALID_DIRECTIVE_SYNTAX))}export{S,Gs,st,ot,it,ye,$e,_,vr,Ks,Vi,Tn,$n,Ui,Re,Wi,Rn,qi,Ft,Xs,Gi,An,Pn,In,wr,be,Js,Cd,_d,Ki,ve,nl,xr,Ed,Td,$d,Rd,Ad,Pd,Id,Od,Dd};
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
// @bun
|
|
2
|
-
import{
|
|
2
|
+
import{ta,na,ra}from"./chunk-sswjv8p9.js";import{W,an,cn,ts,Jn,Yn,ln,un,ns,Zn}from"./chunk-w8g2ppnr.js";function X(t,a,i,r,d,y){let o=!0,u=new Set,f=(p)=>r.get?r.get(p):p,l=()=>f(t());return Object.defineProperty(l,"_isSignal",{value:!0}),Object.defineProperty(l,"modifiers",{get:a}),l.set=(p)=>{if(!o)return;let h=a(),e=r.set?r.set(p,h):p;if(h.trim&&typeof e==="string")e=e.trim();if(h.number&&typeof e==="string"&&e!==""){let s=Number(e);if(!Number.isNaN(s))e=s}if(Object.is(t(),e))return;t.set(e),i(e)},l.update=(p)=>l.set(p(l())),l.input=(p)=>{if(!a().lazy)l.set(p)},l.change=(p)=>{if(a().lazy)l.set(p)},l.subscribe=(p)=>{if(!o)return()=>{};let h=t.subscribe((e,s)=>p(f(e),f(s)));return u.add(h),()=>{h(),u.delete(h)}},Object.defineProperty(l,"value",{get:l,set:l.set}),d(()=>{o=!1,u.forEach((p)=>p()),u.clear()}),y?.(()=>{o=!0}),l}function Q(t,a=!0,i){if(!a||!t||typeof window>"u")return;let r=window;if(!r.__STX_DATA__){let y=document.querySelector("script[data-stx-server-data]");try{let o=JSON.parse(y?.textContent||"{}");r.__STX_DATA__=o&&typeof o==="object"&&!Array.isArray(o)?o:{}}catch{r.__STX_DATA__={}}}let d=r.__STX_DATA__;if(d&&Object.prototype.hasOwnProperty.call(d,t))try{return{data:i?i(d[t]):d[t]}}catch(y){return{data:null,error:y instanceof Error?y:Error(String(y))}}return}function Y(t){if(typeof window>"u")return;let a=window;if(t===void 0)a.__STX_DATA__={};else{if(!a.__STX_DATA__)try{let i=JSON.parse(document.querySelector("script[data-stx-server-data]")?.textContent||"{}");a.__STX_DATA__=i&&typeof i==="object"&&!Array.isArray(i)?i:{}}catch{a.__STX_DATA__={}}if(a.__STX_DATA__)delete a.__STX_DATA__[t]}}function J(t){let a=null;try{a=typeof indexedDB<"u"?indexedDB:null}catch{a=null}if(!a)return null;let i=a,r=t||"stx-kept",d=null,y=()=>{if(!d)d=new Promise((u,f)=>{let l=i.open(r,1);l.onupgradeneeded=()=>{l.result.createObjectStore("kv")},l.onsuccess=()=>u(l.result),l.onerror=()=>f(l.error),l.onblocked=()=>f(Error("blocked"))}),d.catch(()=>{d=null});return d},o=(u,f)=>y().then((l)=>new Promise((p,h)=>{let e=l.transaction("kv",u),s=f(e.objectStore("kv"));e.oncomplete=()=>p(s?s.result:void 0),e.onerror=()=>h(e.error),e.onabort=()=>h(e.error)}));return{get:(u)=>o("readonly",(f)=>f.get(u)),set:(u,f)=>o("readwrite",(l)=>{l.put(f,u)}),remove:(u)=>o("readwrite",(f)=>{f.delete(u)}),removePrefix:(u)=>o("readwrite",(f)=>{f.delete(IDBKeyRange.bound(u,`${u}\uFFFF`))})}}function Z(t,a){let i=t||{},r=null;if(i.storage!==void 0)r=i.storage;else try{r=typeof localStorage<"u"?localStorage:null}catch{r=null}let d=null,y=i.backend!==void 0;if(y)d=i.backend||null;let o=()=>{if(y)return d;y=!0;try{d=a?a():null}catch{d=null}if(d){let n=d;n.get("__stx_probe__").catch(()=>{if(d===n)d=null})}return d},u=i.limit||32768,f=i.defer||((n)=>{let c=typeof requestIdleCallback==="function"?requestIdleCallback:null;if(c)c(n,{timeout:200});else setTimeout(n,16)}),l=new Map,p=new Set,h=new Map,e=!1,s=Promise.resolve(),v=(n)=>{try{return JSON.parse(n)}catch{return n}},m=(n,c)=>{if(!r)return!1;try{return r.setItem(n,c),!0}catch{return!1}},E=(n)=>{try{if(r)r.removeItem(n)}catch{}},S=()=>{if(e=!1,!h.size)return s;let n=Array.from(h.entries());return h.clear(),s=s.then(()=>Promise.all(n.map(([c,g])=>{if(!d){p.delete(c);try{m(c,JSON.stringify(g===void 0?null:g))}catch{}return}let _;try{return _={v:g},d.set(c,_).catch(()=>{let x;try{x=JSON.stringify(g)}catch{return}return d?d.set(c,{j:x}).catch(()=>{m(c,x)}):void 0})}catch{return}}))).then(()=>{}),s},N=(n,c)=>{if(h.set(n,c),p.add(n),e)return;e=!0,f(()=>{S()})},D=(n)=>{if(!n||typeof n!=="object")return;let c=n;if("v"in c)return{value:c.v};if(typeof c.j==="string")return{value:v(c.j)};return},k={peek(n){if(l.has(n))return{value:l.get(n)};let c=null;try{c=r?r.getItem(n):null}catch{c=null}if(c===null||c===void 0)return;let g=v(c);return l.set(n,g),{value:g}},load(n){let c=k.peek(n),g=c?null:o();if(c||!g)return Promise.resolve(c);return g.get(n).then((_)=>{if(l.has(n))return{value:l.get(n)};let x=D(_);if(x)l.set(n,x.value),p.add(n);return x},()=>{return})},set(n,c){if(l.set(n,c),d&&p.has(n)){N(n,c);return}let g;try{g=JSON.stringify(c===void 0?null:c)}catch{return}if(g.length<=u&&m(n,g))return;if(!o()){if(g.length>u)m(n,g);return}E(n),N(n,c)},forget(n){for(let g of Array.from(l.keys()))if(g.indexOf(n)===0)l.delete(g);for(let g of Array.from(h.keys()))if(g.indexOf(n)===0)h.delete(g);for(let g of Array.from(p))if(g.indexOf(n)===0)p.delete(g);try{if(r)for(let g=r.length-1;g>=0;g--){let _=r.key(g);if(_&&_.indexOf(n)===0)r.removeItem(_)}}catch{}let c=o();if(!c)return s;return s=s.then(()=>c.removePrefix(n)).catch(()=>{}),s},flush(){return S()}};try{if(typeof document<"u"&&document.addEventListener)document.addEventListener("visibilitychange",()=>{if(document.visibilityState==="hidden")S()});if(typeof addEventListener==="function")addEventListener("pagehide",()=>{S()})}catch{}return k}function ee(t,a){if(!t)return!1;if(t===a.key)return!0;if(!a.url)return!1;if(t===a.url)return!0;try{let i=typeof location<"u"&&location.origin&&location.origin!=="null"?location.origin:"http://localhost",r=new URL(t,i),d=new URL(a.url,i);if(r.origin!==d.origin||r.pathname!==d.pathname)return!1;return!r.search||r.search===d.search}catch{return!1}}function te(t){let a=t.prefix||"stx:kept:",i=t.matches||((e,s)=>e===s.key||e===s.url),r=new Set,d=new Map,y,o=(e)=>e===void 0?y:e,u=(e,s)=>{let v=o(s);if(v===!1||v===null||v==="")return null;return`${a}${v===void 0?"":`${v}:`}query:${e}`},f=(e)=>{let s=e&&e.value;if(!s||typeof s!=="object"||!("d"in s))return;return{data:s.d,at:Number(s.at)||0}},l=()=>{let e=globalThis;return e.__stx_outboxes instanceof Map?e.__stx_outboxes:null},p={setScope(e){y=e},scope:()=>y,keyFor:u,seed(e,s){let v=u(e,s);return v?f(t.kept.peek(v)):void 0},restore(e,s){let v=u(e,s);return v?t.kept.load(v).then(f):Promise.resolve(void 0)},persist(e,s,v){let m=u(e,v);if(m)t.kept.set(m,{d:s,at:Date.now()})},overlay(e,s,v){let m=l();if(!m||!m.size)return s;let E=s;return m.forEach((S)=>{try{E=S.overlay(e,E,v)}catch{}}),E},watch(e){return r.add(e),()=>{r.delete(e)}},cachedQuery(e,s){let v=d.get(e);if(v){if(s&&v.__options)v.__options(s);return v}let m=s||{},E=m.initial===void 0?null:m.initial,S=()=>typeof m.scope==="function"?m.scope():m.scope,N=()=>(typeof m.url==="function"?m.url():m.url)||null,D=()=>({key:e,url:N()}),k=S(),n=E,c=0,g=t.sharedRequest(),_=0,x=p.seed(e,k);if(x)n=x.data;let I=t.state(p.overlay(D(),n)),U=t.state(!1),q=t.state(!1),K=t.state(null),P=t.state(x?x.at:0),R=0,F=()=>{I.set(p.overlay(D(),n))},z=(b)=>{let w=R;p.restore(e,b).then((A)=>{if(!A||w!==R||c)return;n=A.data,P.set(A.at),F()})};if(!x)z(k);let wt=()=>{let b=S();if(b===k)return;k=b,R++,_=0,q.set(!1),U.set(!1),c=0;let w=p.seed(e,k);if(n=w?w.data:E,P.set(w?w.at:0),F(),!w)z(k)},_t=(b,w)=>{let A=m.timeoutMs||15000,C=typeof AbortController<"u"?new AbortController:null,O=null,j=new Promise((M,V)=>{O=setTimeout(()=>{if(C)C.abort();V(Error("The request took too long."))},A)}),T;if(m.load)T=m.load({force:b,url:w,signal:C?C.signal:void 0});else if(w){let M=m.fetch||((L,H)=>fetch(L,H)),V={method:"GET",headers:{Accept:"application/json"}};if(b)V.cache="no-cache";if(C)V.signal=C.signal;T=M(w,V).then((L)=>{if(!L.ok)return L.json().catch(()=>null).then((H)=>{throw Error(H&&(H.error||H.message)||`Request failed (${L.status})`)});return L.json()})}else return Promise.resolve(I());return Promise.race([T,j]).then((M)=>{if(O)clearTimeout(O);return m.transform?m.transform(M):M},(M)=>{if(O)clearTimeout(O);throw M})},G=(b)=>{let w=R,A=N(),C=()=>{if(w!==R)return Promise.resolve(I());if(_++,q.set(!0),c===0&&!P())U.set(!0);let j=()=>{if(w!==R)return;if(_=Math.max(0,_-1),!_)q.set(!1),U.set(!1)};return _t(b,A).then((T)=>{if(w!==R||A!==N())return j(),I();return n=T,c=Date.now(),P.set(c),K.set(null),p.persist(e,T,k),F(),j(),I()},(T)=>{if(w===R&&A===N())K.set(T&&T.message?T.message:"Could not load.");return j(),I()})},O=`${w} ${A||""}`;return b?g.fresh(O,C):g.run(O,C)},B={data:I,loading:U,isFetching:q,error:K,updatedAt:P,get key(){return e},load(b){if(wt(),!b&&c&&Date.now()-c<(m.staleTime||0))return Promise.resolve(I());return G(!!b)},refresh(){return B.load(!0)},set(b){n=typeof b==="function"?b(n):b,p.persist(e,n,k),F()},invalidate(){c=0},__options(b){m={...m,...b}}};if(r.add({target:D,updated:()=>{if(c||P())G(!1)},outbox:(b)=>{if(b)n=p.overlay(D(),n,b.id),c=0,G(!0);F()}}),d.set(e,B),m.immediate)B.load();return B}},h=typeof window<"u"?window:typeof addEventListener==="function"?globalThis:null;if(t.listen!==!1&&h&&typeof h.addEventListener==="function")h.addEventListener("stx:updated",(e)=>{let s=e.detail||{};if(s.kind!=="api"||typeof s.url!=="string")return;r.forEach((v)=>{if(i(s.url,v.target()))v.updated()})}),h.addEventListener("stx:outbox",(e)=>{let s=e.detail||{},v=s.sent&&typeof s.sent.id==="string"?s.sent:null;r.forEach((m)=>{if(v){let E=Array.isArray(v.affects)?v.affects:[],S=m.target();if(!E.some((N)=>i(N,S)))return}m.outbox(v)})});return p}function ne(t){let a=t&&t.covers||((o,u)=>Object.is(o,u)),i=[],r=[],d=0,y=(o,u)=>{let f;try{f=Promise.resolve(u())}catch(h){f=Promise.reject(h)}let l={key:o,promise:f};i.push(l);let p=()=>{let h=i.indexOf(l);if(h!==-1)i.splice(h,1)};return f.then(p,p),f};return{run(o,u){for(let f of i)if(a(f.key,o))return f.promise;for(let f of r)if(a(f.key,o))return f.promise;return y(o,u)},fresh(o,u){for(let h of r)if(a(h.key,o))return h.promise;let f=i.filter((h)=>a(h.key,o)).map((h)=>h.promise);if(!f.length)return y(o,u);let l={key:o,promise:null},p=()=>{};return l.promise=Promise.all(f.map((h)=>h.then(p,p))).then(()=>{let h=r.indexOf(l);if(h!==-1)r.splice(h,1);return y(o,u)}),r.push(l),l.promise},latest(){let o=++d;return()=>o===d},get busy(){return i.length>0||r.length>0}}}var re=` function useColorMode(options) {
|
|
3
3
|
options = options || {};
|
|
4
4
|
// The pre-paint boot script (stacksjs/stx#1794) publishes the app's
|
|
5
5
|
// configured options here. Reading them makes a bare useColorMode() agree
|
|
@@ -5000,7 +5000,7 @@ else if (!value && isInserted) {
|
|
|
5000
5000
|
}
|
|
5001
5001
|
});
|
|
5002
5002
|
}
|
|
5003
|
-
`;function
|
|
5003
|
+
`;function Fe(t,a,i,r,d){return` // One request for every caller that wants the same answer: run joins one
|
|
5004
5004
|
// in flight, fresh waits one out and asks again, latest replaces a request
|
|
5005
5005
|
// counter. See shared-request.ts; cached queries are built on it.
|
|
5006
5006
|
var sharedRequest = (${d});
|
|
@@ -5064,7 +5064,7 @@ else if (!value && isInserted) {
|
|
|
5064
5064
|
function cachedQuery(key, options) {
|
|
5065
5065
|
return __stxQueries.cachedQuery(key, options);
|
|
5066
5066
|
}
|
|
5067
|
-
`}var
|
|
5067
|
+
`}var je=` // Lazy hydration: defer processElement for subtrees marked with stx-hydrate.
|
|
5068
5068
|
// Triggers: "visible" (IntersectionObserver), "idle" (requestIdleCallback),
|
|
5069
5069
|
// "interaction" (mouseenter/click/focus), "media:<query>" (matchMedia).
|
|
5070
5070
|
function deferHydration(el, trigger, scope) {
|
|
@@ -5196,7 +5196,7 @@ else if (!value && isInserted) {
|
|
|
5196
5196
|
run();
|
|
5197
5197
|
}
|
|
5198
5198
|
}
|
|
5199
|
-
`;var
|
|
5199
|
+
`;var Ve=` // ==========================================================================
|
|
5200
5200
|
// Lifecycle
|
|
5201
5201
|
// ==========================================================================
|
|
5202
5202
|
|
|
@@ -5309,7 +5309,7 @@ else if (!value && isInserted) {
|
|
|
5309
5309
|
// Drain any early mount/destroy calls captured by the pre-initialization shim
|
|
5310
5310
|
if (window.__stx_early_mounts) { window.__stx_early_mounts.forEach(function(fn) { mountCallbacks.push(fn); }); window.__stx_early_mounts = null; }
|
|
5311
5311
|
if (window.__stx_early_destroys) { window.__stx_early_destroys.forEach(function(fn) { destroyCallbacks.push(fn); }); window.__stx_early_destroys = null; }
|
|
5312
|
-
`;var
|
|
5312
|
+
`;var He=` var __forComponentScopeCounter = 0;
|
|
5313
5313
|
var __forComponentSetupFactories = new Map();
|
|
5314
5314
|
|
|
5315
5315
|
function forEachGroupElement(nodes, callback) {
|
|
@@ -5374,7 +5374,7 @@ else if (!value && isInserted) {
|
|
|
5374
5374
|
}
|
|
5375
5375
|
});
|
|
5376
5376
|
}
|
|
5377
|
-
`;var
|
|
5377
|
+
`;var Ue=` // A :for row is a clone of its template, so a conditional element in the row
|
|
5378
5378
|
// is built for every row whether or not its condition ever holds; :if then
|
|
5379
5379
|
// parks the false ones. In WebKit a <video> or <audio> sets up a media player
|
|
5380
5380
|
// as it is created: a message list with one media slot per attachment took
|
|
@@ -5421,7 +5421,7 @@ else if (!value && isInserted) {
|
|
|
5421
5421
|
holder.content.appendChild(el);
|
|
5422
5422
|
}
|
|
5423
5423
|
}
|
|
5424
|
-
`;var
|
|
5424
|
+
`;var qe=` // A loop row binds in its own iteration scope, and only its loop puts it
|
|
5425
5425
|
// there. A walk from further out (an enclosing :if hydrating the branch it
|
|
5426
5426
|
// shows) carries no item, so it used to bind whatever in the row was still
|
|
5427
5427
|
// unbound -- a conditional's children, waiting for their own deferred pass
|
|
@@ -5461,7 +5461,7 @@ else if (!value && isInserted) {
|
|
|
5461
5461
|
}
|
|
5462
5462
|
return now;
|
|
5463
5463
|
}
|
|
5464
|
-
`;var
|
|
5464
|
+
`;var Be=` /**
|
|
5465
5465
|
* Bind what the server said carries a binding, instead of looking for it.
|
|
5466
5466
|
*
|
|
5467
5467
|
* The walk exists because the runtime does not know where the bindings are.
|
|
@@ -5562,7 +5562,7 @@ else if (!value && isInserted) {
|
|
|
5562
5562
|
}
|
|
5563
5563
|
};
|
|
5564
5564
|
}
|
|
5565
|
-
`;var
|
|
5565
|
+
`;var Ke=` function bindModel(el, expr, passedScope = componentScope, attrName = '@model') {
|
|
5566
5566
|
if (el.__stx_model_bound) return;
|
|
5567
5567
|
el.__stx_model_bound = true;
|
|
5568
5568
|
const tag = el.tagName.toLowerCase();
|
|
@@ -5719,7 +5719,7 @@ else {
|
|
|
5719
5719
|
|
|
5720
5720
|
el.removeAttribute(attrName);
|
|
5721
5721
|
}
|
|
5722
|
-
`;var
|
|
5722
|
+
`;var Ge=` mountEl: function(selector, setupFn) {
|
|
5723
5723
|
function doMount() {
|
|
5724
5724
|
var root = document.querySelector(selector);
|
|
5725
5725
|
if (!root) { console.warn('[stx] mountEl: element not found:', selector); return; }
|
|
@@ -5953,7 +5953,7 @@ else {
|
|
|
5953
5953
|
else {
|
|
5954
5954
|
doMount();
|
|
5955
5955
|
}
|
|
5956
|
-
}`;var
|
|
5956
|
+
}`;var $e=` // ==========================================================================
|
|
5957
5957
|
// Navigation API
|
|
5958
5958
|
// ==========================================================================
|
|
5959
5959
|
|
|
@@ -6150,7 +6150,7 @@ else {
|
|
|
6150
6150
|
}
|
|
6151
6151
|
};
|
|
6152
6152
|
}
|
|
6153
|
-
`;var
|
|
6153
|
+
`;var We=` // ==========================================================================
|
|
6154
6154
|
// Optimistic State (useOptimistic) \u2014 stacksjs/stx#1742
|
|
6155
6155
|
// ==========================================================================
|
|
6156
6156
|
// Mirrors signals-api.ts useOptimistic. Shows base + pending actions while an
|
|
@@ -10288,7 +10288,7 @@ else if (timer === null) {
|
|
|
10288
10288
|
subscribe: subscribe
|
|
10289
10289
|
};
|
|
10290
10290
|
}
|
|
10291
|
-
`;function
|
|
10291
|
+
`;function ze(){let t=xt(on());try{let i=new Bun.Transpiler({loader:"js",minifyWhitespace:!0}).transformSync(t);return i=i.replace(/\}(var |let |const |function )/g,"};$1"),i}catch{return t}}function xt(t){let a=[],i=0,r="console.log(";while(i<t.length){let d=t.indexOf(r,i);if(d===-1){a.push(t.slice(i));break}a.push(t.slice(i,d));let y=1,o=d+r.length;while(o<t.length&&y>0){let u=t[o];if(u==='"'||u==="'"||u==="`"){let f=u;o++;while(o<t.length&&t[o]!==f){if(t[o]==="\\")o++;o++}o++;continue}if(u==="(")y++;else if(u===")")y--;o++}a.push("0"),i=o}return a.join("")}function on(){return`${ae}${Oe}
|
|
10292
10292
|
${Je(ie,Se,Ee)}
|
|
10293
10293
|
|
|
10294
10294
|
${Re}
|
|
@@ -10296,13 +10296,13 @@ ${nt}
|
|
|
10296
10296
|
${et}
|
|
10297
10297
|
${dt}
|
|
10298
10298
|
${_e}
|
|
10299
|
-
${
|
|
10299
|
+
${Ve}
|
|
10300
10300
|
${bt}
|
|
10301
10301
|
${Ae(Q.toString(),Y.toString())}
|
|
10302
10302
|
${ot}
|
|
10303
|
-
${
|
|
10303
|
+
${$e}
|
|
10304
10304
|
${Qe}
|
|
10305
|
-
${
|
|
10305
|
+
${We}
|
|
10306
10306
|
// ==========================================================================
|
|
10307
10307
|
// Template Binding
|
|
10308
10308
|
// ==========================================================================
|
|
@@ -10310,24 +10310,24 @@ ${ze}
|
|
|
10310
10310
|
${ke}
|
|
10311
10311
|
${xe}
|
|
10312
10312
|
${Ce}
|
|
10313
|
-
${
|
|
10313
|
+
${je}
|
|
10314
10314
|
${se}
|
|
10315
10315
|
${de}
|
|
10316
10316
|
${fe}
|
|
10317
|
-
${
|
|
10318
|
-
${tt(
|
|
10317
|
+
${Be}
|
|
10318
|
+
${tt(na(),ra(),ta())}
|
|
10319
10319
|
|
|
10320
10320
|
${ft}
|
|
10321
10321
|
${it}
|
|
10322
|
-
${
|
|
10322
|
+
${Ke}
|
|
10323
10323
|
${le}
|
|
10324
10324
|
${ht}
|
|
10325
10325
|
${yt}
|
|
10326
|
-
${
|
|
10326
|
+
${He}
|
|
10327
10327
|
${ue}
|
|
10328
|
-
${Be}
|
|
10329
|
-
${Te}
|
|
10330
10328
|
${qe}
|
|
10329
|
+
${Te}
|
|
10330
|
+
${Ue}
|
|
10331
10331
|
${he}
|
|
10332
10332
|
${Pe}
|
|
10333
10333
|
${Le}
|
|
@@ -10338,7 +10338,7 @@ ${Ze}
|
|
|
10338
10338
|
|
|
10339
10339
|
${pt}
|
|
10340
10340
|
|
|
10341
|
-
${
|
|
10341
|
+
${Fe(Z.toString(),J.toString(),te.toString(),ee.toString(),ne.toString())}
|
|
10342
10342
|
${ge}
|
|
10343
10343
|
${oe(X.toString())}
|
|
10344
10344
|
${Ie}
|
|
@@ -10353,7 +10353,7 @@ ${rt(pe)}
|
|
|
10353
10353
|
|
|
10354
10354
|
${ut}
|
|
10355
10355
|
|
|
10356
|
-
${
|
|
10356
|
+
${Ge}
|
|
10357
10357
|
});
|
|
10358
10358
|
|
|
10359
10359
|
${Ne}
|
|
@@ -10366,5 +10366,5 @@ ${lt}
|
|
|
10366
10366
|
${ct}
|
|
10367
10367
|
${at}
|
|
10368
10368
|
})();
|
|
10369
|
-
`}var
|
|
10370
|
-
export{
|
|
10369
|
+
`}var Su={state:W,derived:an,effect:cn,batch:ts,onMount:Jn,onDestroy:Yn,isSignal:ln,isDerived:un,untrack:ns,peek:Zn,generateSignalsRuntime:ze,generateSignalsRuntimeDev:on};
|
|
10370
|
+
export{ze,on,Su};
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
// @bun
|
|
2
|
+
import{It,As,$i,Vc}from"./chunk-r4wqh5fd.js";import"./chunk-dnqq1ze0.js";import"./chunk-wzjf33es.js";import"./chunk-6xsm53pz.js";import"./chunk-3cnwstra.js";import"./chunk-bhf9yt2w.js";import"./chunk-td5100fz.js";import"./chunk-x8q5przn.js";import"./chunk-06wv8qwy.js";import"./chunk-bsy8v1xj.js";import"./chunk-sswjv8p9.js";import"./chunk-azpkje69.js";import"./chunk-rmv35cx0.js";export{Vc as declareBareLoopHead,It as parseLoopBinding,$i as processLoops,As as reportDeferredLoopWarnings};
|
|
@@ -1,3 +1,3 @@
|
|
|
1
1
|
// @bun
|
|
2
|
-
import c from"path";var s=[{label:"Mobile (Small)",width:320,height:568},{label:"Mobile (Medium)",width:375,height:667},{label:"Mobile (Large)",width:414,height:896},{label:"Tablet",width:768,height:1024},{label:"Laptop",width:1024},{label:"Desktop",width:1280},{label:"Desktop (Large)",width:1920}],n=[{label:"Transparent",color:"transparent",contrastColor:"#333"},{label:"White",color:"#ffffff",contrastColor:"#333"},{label:"Light Gray",color:"#f5f5f5",contrastColor:"#333"},{label:"Dark Gray",color:"#333333",contrastColor:"#fff"},{label:"Black",color:"#000000",contrastColor:"#fff"}],i={file:"title",order:"asc",groups:[]},d={enabled:!0,outDir:".stx/dist/story",storyMatch:["**/*.story.stx"],storyIgnored:["**/node_modules/**","**/dist/**","**/.stx/**"],tree:i,theme:{title:"STX Components",defaultColorScheme:"auto",darkClass:"dark"},responsivePresets:s,backgroundPresets:n,autoApplyContrastColor:!1,port:6006};function l(e){let t={...d,...e};return{enabled:t.enabled??!0,outDir:t.outDir??".stx/dist/story",storyMatch:t.storyMatch??["**/*.story.stx"],storyIgnored:t.storyIgnored??["**/node_modules/**","**/dist/**","**/.stx/**"],tree:{...i,...t.tree},theme:{title:"STX Components",defaultColorScheme:"auto",darkClass:"dark",...t.theme},responsivePresets:t.responsivePresets??s,backgroundPresets:t.backgroundPresets??n,autoApplyContrastColor:t.autoApplyContrastColor??!1,setupFile:t.setupFile,port:t.port??6006}}async function
|
|
3
|
-
export{
|
|
2
|
+
import c from"path";var s=[{label:"Mobile (Small)",width:320,height:568},{label:"Mobile (Medium)",width:375,height:667},{label:"Mobile (Large)",width:414,height:896},{label:"Tablet",width:768,height:1024},{label:"Laptop",width:1024},{label:"Desktop",width:1280},{label:"Desktop (Large)",width:1920}],n=[{label:"Transparent",color:"transparent",contrastColor:"#333"},{label:"White",color:"#ffffff",contrastColor:"#333"},{label:"Light Gray",color:"#f5f5f5",contrastColor:"#333"},{label:"Dark Gray",color:"#333333",contrastColor:"#fff"},{label:"Black",color:"#000000",contrastColor:"#fff"}],i={file:"title",order:"asc",groups:[]},d={enabled:!0,outDir:".stx/dist/story",storyMatch:["**/*.story.stx"],storyIgnored:["**/node_modules/**","**/dist/**","**/.stx/**"],tree:i,theme:{title:"STX Components",defaultColorScheme:"auto",darkClass:"dark"},responsivePresets:s,backgroundPresets:n,autoApplyContrastColor:!1,port:6006};function l(e){let t={...d,...e};return{enabled:t.enabled??!0,outDir:t.outDir??".stx/dist/story",storyMatch:t.storyMatch??["**/*.story.stx"],storyIgnored:t.storyIgnored??["**/node_modules/**","**/dist/**","**/.stx/**"],tree:{...i,...t.tree},theme:{title:"STX Components",defaultColorScheme:"auto",darkClass:"dark",...t.theme},responsivePresets:t.responsivePresets??s,backgroundPresets:t.backgroundPresets??n,autoApplyContrastColor:t.autoApplyContrastColor??!1,setupFile:t.setupFile,port:t.port??6006}}async function De(e){let t=e.root??process.cwd(),o;try{let r=await import(c.join(t,"stx.config.ts"));o=(r.default||r).story}catch{}let a={...o,...e.config},f=l(a);return{root:t,config:f,storyFiles:[],tree:void 0,mode:e.mode}}function Ne(e,t){e.storyFiles=t}function Me(e,t){e.tree=t}
|
|
3
|
+
export{De,Ne,Me};
|
|
@@ -1,15 +1,15 @@
|
|
|
1
1
|
// @bun
|
|
2
|
-
import{
|
|
3
|
-
export { ${[...B].join(", ")} }`:"";await Bun.write(i,e+oe),D("bundling:",l,"from:",h.basename(n));let Q=new Set,K=new Map;try{let S=await Bun.build({entrypoints:[i],outdir:x,target:"browser",format:"esm",minify:p?{whitespace:!1,identifiers:!0,syntax:!0}:!1,plugins:[$e(u,F,i,Q,j,K,r.serverApi,r.substitutes)],define:{"process.env.NODE_ENV":p?'"production"':'"development"',...w()},root:u});if(!S.success){let R=S.logs.filter((O)=>O.level==="error").map((O)=>O.message).join(", ")||`Unable to bundle ${h.basename(n)}`,C=
|
|
2
|
+
import{gn,de}from"./chunk-s4pjf2pc.js";import{m,mn,w,We,o,P}from"./chunk-r4wqh5fd.js";import{ds}from"./chunk-vhajhs44.js";import{s,Te}from"./chunk-20k77e2a.js";import{a}from"./chunk-n35yc890.js";import h from"path";import v from"fs";import{AsyncLocalStorage as fe}from"async_hooks";var me=10;function J(e,n,r){return/^(?:(?:stx|ui)\.config\.[cm]?[jt]s|runtime-config-(?:server|loader)\.[cm]?[jt]s)$/.test(h.basename(e))||ds(e,n,r)}var re=1,se=new Map,V=600,ge=100,W=new Map;async function he(e){let n=W.get(e)??0;if(n>0&&n<ge){W.set(e,n+1);return}W.set(e,1);try{let r=(await v.promises.readdir(e)).filter((c)=>c.endsWith(".js"));if(r.length<=V)return;let p=(await Promise.all(r.map(async(c)=>{try{return{name:c,at:(await v.promises.stat(h.join(e,c))).mtimeMs}}catch{return null}}))).filter((c)=>c!==null);p.sort((c,l)=>l.at-c.at);for(let c of p.slice(V)){let l=c.name.slice(0,-3);await v.promises.rm(h.join(e,`${l}.js`),{force:!0}),await v.promises.rm(h.join(e,`${l}.deps.json`),{force:!0})}D("pruned bundle cache to",V,"entries")}catch{}}function ue(e){return se.get(e)??[]}function X(e,n){if(e)se.set(e,n)}function dc(e=process.env){return e.STX_DEBUG==="true"||e.STX_DEBUG==="1"}function D(...e){if(dc())console.log("[stx:bundler]",...e)}var Z=[];function si(e,n,r){Z.push({filePath:e||"<inline>",message:n,details:r})}function Ct(){return Z.slice()}function _t(){Z.length=0}var H;function qu(e){H=e}function oi(){if(H)return H;try{let e=P.strict;return typeof e==="object"&&e!==null?e.bundlerFallback??"warn":"warn"}catch{return"warn"}}var q=[/^stx$/,/^@stacksjs\/stx$/,/^@stores$/,/^stx\/stores$/,/^@composables$/];function Et(e){let n=/^[ \t]*import[ \t]+(?!type(?:[ \t]|{))[\s\S]*?\s+from\s+['"]([^'"]+)['"][ \t]*;?/gm,r;while((r=n.exec(e))!==null){let p=r[1];if(!q.some((l)=>l.test(p)))return D("detected user import:",p),!0}let u=/^[ \t]*import[ \t]*['"]([^'"]+)['"]/gm;while((r=u.exec(e))!==null){let p=r[1];if(/\.css(?:\?.*)?$/.test(p))continue;if(!q.some((l)=>l.test(p)))return D("detected side-effect import:",p),!0}return!1}var fn="stx-module:",xe=/\.(?:[cm]?[jt]sx?|json)$/i;function pc(e,n){return h.relative(e,n).split(h.sep).join("/")}function fc(e,n){if(n.size===0)return e;return e.replace(/^([ \t]*import(?:(?:\s+|(?=[{*]))[^;"']*?\s*from\s*|\s*))(["'])([^"']+)\2/gm,(r,u,p,c)=>{let l=n.get(c);return l&&!c.startsWith(fn)?`${u}${p}${l}${p}`:r})}function gc(e,n){let r=0,u=(c)=>{let l=`__stxMod${r++}`,E=JSON.stringify(c);return n.push(`var ${l} = globalThis.__stxModules && globalThis.__stxModules[${E}];`,`if (${l} === undefined) throw new Error("[stx] module " + ${JSON.stringify(E)} + " is not registered on this page (#1957)");`),l},p=(c,l)=>{for(let E of c.split(",")){let _=E.trim();if(!_)continue;let j=_.match(/^("(?:[^"\\]|\\.)*"|[\w$]+)(?:\s+as\s+([\w$]+))?$/);if(!j)continue;let d=j[1].startsWith('"')?JSON.parse(j[1]):j[1],t=j[2]??d;n.push(`var ${t} = ${l}[${JSON.stringify(d)}];`)}};return e=e.replace(/^[ \t]*import(?:\s+|(?=[{*]))([^;"']+?)\s*from\s*["'](stx-module:[^"']+)["'];?[ \t]*$/gm,(c,l,E)=>{let _=E.slice(fn.length),j=u(_),d=l.trim(),t=d.match(/^([\w$]+)\s*(?:,\s*|$)/);if(t&&!d.startsWith("{")&&!d.startsWith("*"))n.push(`var ${t[1]} = ${j}.default;`),d=d.slice(t[0].length).trim();let i=d.match(/^\*\s*as\s+([\w$]+)$/);if(i)n.push(`var ${i[1]} = ${j};`);else if(d.startsWith("{"))p(d.replace(/^\{|\}$/g,""),j);return""}),e=e.replace(/^[ \t]*import\s*["'](stx-module:[^"']+)["'];?[ \t]*$/gm,(c,l)=>(u(l.slice(fn.length)),"")),e}function te(e){let n=[e,`${e}.ts`,`${e}.tsx`,`${e}.js`,`${e}.mjs`,`${e}.jsx`,h.join(e,"index.ts"),h.join(e,"index.tsx"),h.join(e,"index.js"),h.join(e,"index.mjs")];for(let r of n)try{if(v.existsSync(r)&&v.statSync(r,{throwIfNoEntry:!1})?.isFile())return r}catch{}return}var Y=new fe;function as(e,n){let r=new Bun.CryptoHasher("md5");for(let[u,p]of[...e].sort(([c],[l])=>c<l?-1:c>l?1:0))r.update(`${u}\x00${p}\x00`);return Y.run({modules:e,key:r.digest("hex").slice(0,12)},n)}function Tt(){return Y.getStore()?.key??""}function $e(e,n,r,u,p,c=new Map,l,E){let _=(d,t,i)=>{if(J(t,e,l))return null;if(!p||d!==r||!xe.test(t))return null;try{if(!v.statSync(t,{throwIfNoEntry:!1})?.isFile())return null}catch{return null}u.add(t);let x=`${fn}${pc(process.cwd(),t)}`;return c.set(i,x),{path:x,external:!0}},j=(d,t)=>{let i=d===r?n:h.dirname(d),x=h.resolve(i,t);return te(x)??x};return{name:"stx-client-bundle",setup(d){if(d.onResolve({filter:/^(stx|@stacksjs\/stx)$/},(t)=>({path:t.path,external:!0})),d.onResolve({filter:/^(@stores|@composables|stx\/stores)$/},(t)=>({path:t.path,external:!0})),d.onResolve({filter:/^\//},(t)=>{let i=te(t.path);if(i){let x=_(t.importer,i,t.path);if(x)return x;if(i!==r)u.add(i);return{path:i}}return{path:t.path,external:!0}}),d.onResolve({filter:/^\.\.?\//},(t)=>{let i=j(t.importer,t.path),x=_(t.importer,i,t.path);if(x)return x;return u.add(i),{path:i}}),d.onResolve({filter:/^[@~]\//},(t)=>{let i=h.resolve(e,t.path.slice(2)),x=[i,`${i}.ts`,`${i}.tsx`,`${i}.js`,`${i}.mjs`,`${i}.jsx`,h.join(i,"index.ts"),h.join(i,"index.tsx"),h.join(i,"index.js"),h.join(i,"index.mjs")];for(let F of x)if(v.existsSync(F)&&v.statSync(F,{throwIfNoEntry:!1})?.isFile()){let B=_(t.importer,F,t.path);if(B)return B;return D(`resolved ${t.path[0]}/ import:`,t.path,"\u2192",F),u.add(F),{path:F}}return console.warn(`[stx:bundler] could not resolve ${t.path[0]}/ import:`,t.path),{path:i}}),p)d.onResolve({filter:/^(?!node:|bun:)(?:@[\w.-]+\/)?[\w.-]/},(t)=>{if(t.importer!==r)return;let i=`${fn}npm:${t.path}`;return c.set(t.path,i),{path:i,external:!0}});d.onLoad({filter:/\.(?:[cm]?[jt]sx?|json)$/},(t)=>{if(J(t.path,e,l))throw Error(`Server-only API source cannot be imported by a client script: ${t.path}`);let i=h.extname(t.path).toLowerCase(),x=i===".json"?"json":i===".tsx"?"tsx":i===".jsx"?"jsx":i===".ts"||i===".mts"||i===".cts"?"ts":"js";if(t.path!==r)u.add(t.path);let F=E?.get(t.path);if(F!==void 0)return{contents:F,loader:"js"};return{contents:v.readFileSync(t.path,"utf8"),loader:x}})}}}var G=new Map,k=m(64),ne=Symbol.for("stx.client-bundle-build-queue");function mc(e){let n=globalThis,u=(n[ne]??Promise.resolve()).then(e,e);return n[ne]=u.then(()=>{return},()=>{return}),u}async function $t(e,n,r={}){let u=r.projectRoot||process.cwd(),p=(await o(u)).serverApi,c=r.minify??!1,l=r.externalizeUserModules??!0,E=r.expose?.length?[...new Set(r.expose)].sort():void 0,_=r.cacheDir||a(u,"bundle-cache"),j=Y.getStore(),d=new Bun.CryptoHasher("md5");d.update(`${me}\x00${We()}\x00${JSON.stringify(p??!1)}\x00${l?"registry":"inline"}\x00${E?E.join(","):"*"}\x00${c?"minified":"readable"}\x00${j?.key??""}\x00${e}\x00${n}`);let t=d.digest("hex").slice(0,12),i=h.join(_,`${t}.js`),x=k.get(i);if(x){if(mn(x.files)&&x.files.every((M)=>!J(M.path,u,p))){D("memo hit:",t);let M=x.files.map((A)=>A.path);return X(n,M),r.collectInputs?.push(...M),x.code}k.delete(i),D("memo invalidated by dep change:",t)}let F=h.join(_,`${t}.deps.json`),B=Bun.file(i);if(await B.exists()){let M=Bun.file(F),A=!1,N=null;if(await M.exists())try{let I=JSON.parse(await M.text());if(I.metadataVersion!==re||!Array.isArray(I.files))A=!1;else N=I.files,A=!0;if(N&&(!mn(N)||N.some((g)=>J(g.path,u,p))))A=!1}catch{A=!1}if(A){if(D("cache hit:",t),N)X(n,N.map((g)=>g.path)),r.collectInputs?.push(...N.map((g)=>g.path));let I=await B.text();if(N)k.set(i,{code:I,files:N});return I}D("cache invalidated by dep change:",t)}let U=G.get(t);if(U){let M=await U;if(r.collectInputs)r.collectInputs.push(...(k.get(i)?.files??[]).map((A)=>A.path));return M}let L=mc(()=>be(e,n,{projectRoot:u,minify:c,cacheDir:_,hash:t,cachePath:i,depsPath:F,collectInputs:r.collectInputs,externalizeUserModules:l,serverApi:p,expose:E,throwOnFailure:r.throwOnFailure,substitutes:j?.modules}));G.set(t,L);try{return await L}finally{G.delete(t)}}var ye=0;function hc(e){return`${e}-${process.pid}-${++ye}`}async function be(e,n,r){let{projectRoot:u,minify:p,cacheDir:c,hash:l,cachePath:E,depsPath:_,externalizeUserModules:j}=r,d=a(u,"bundle-tmp"),t=hc(l),i=h.join(d,`${t}.ts`),x=h.join(d,"out",t);v.mkdirSync(d,{recursive:!0}),v.mkdirSync(x,{recursive:!0});let F=h.dirname(n),B=new Set,U=/^[ \t]*(export\s+)?(?:const|let|var)\s+(?:\{([^}]+)\}|(\w+))/gm,L=/^[ \t]*(export\s+)?(?:async\s+)?function\s+(\w+)/gm,M=s(e),{depths:A,balanced:N}=Te(M),I=(S)=>!N||A[S]===0,g;while((g=U.exec(M))!==null){if(g[1])continue;if(!I(g.index))continue;if(g[2])g[2].split(",").forEach((S)=>{let f=we(S);if(f)B.add(f)});else if(g[3])B.add(g[3])}while((g=L.exec(M))!==null){if(g[1])continue;if(!I(g.index))continue;B.add(g[2])}let ie=/^[ \t]*import[ \t]+(?!type\b)(?:(\w+)\s*(?:,\s*)?)?(?:\*\s+as\s+(\w+)|\{([^}]+)\})?\s+from\b/gm;while((g=ie.exec(M))!==null){if(!I(g.index))continue;let S=/^\s*['"]([^'"]+)['"]/.exec(e.slice(g.index+g[0].length))?.[1];if(S&&q.some((f)=>f.test(S)))continue;if(g[1])B.add(g[1]);if(g[2])B.add(g[2]);for(let f of(g[3]??"").split(",")){let b=f.trim();if(!b||/^type\s/.test(b))continue;let T=/\bas\s+(\w+)\s*$/.exec(b)?.[1]??/^\w+$/.exec(b)?.[0];if(T)B.add(T)}}for(let S of M.matchAll(/\bexport\s*\{([^}]+)\}/g))for(let f of S[1].split(",")){let b=/\bas\s+(\w+)\s*$/.exec(f)?.[1]??/^\s*(\w+)\s*$/.exec(f)?.[1];if(b)B.delete(b)}let oe=B.size>0?`
|
|
3
|
+
export { ${[...B].join(", ")} }`:"";await Bun.write(i,e+oe),D("bundling:",l,"from:",h.basename(n));let Q=new Set,K=new Map;try{let S=await Bun.build({entrypoints:[i],outdir:x,target:"browser",format:"esm",minify:p?{whitespace:!1,identifiers:!0,syntax:!0}:!1,plugins:[$e(u,F,i,Q,j,K,r.serverApi,r.substitutes)],define:{"process.env.NODE_ENV":p?'"production"':'"development"',...w()},root:u});if(!S.success){let R=S.logs.filter((O)=>O.level==="error").map((O)=>O.message).join(", ")||`Unable to bundle ${h.basename(n)}`,C=gn(S.logs,n||void 0);if(console.warn("[stx:bundler] build failed:",R),si(n||"",R,C),r.throwOnFailure||oi()==="error")throw Error(R);return e}let f="";for(let y of S.outputs){f=await y.text();break}let b=[];for(let y of f.matchAll(/^\s*export\s*\{([^}]*)\}\s*;?\s*$/gm))for(let R of y[1].split(",")){let C=R.trim().match(/^([A-Za-z_$][\w$]*)\s+as\s+([A-Za-z_$][\w$]*)$/);if(C){b.push([C[2],C[1]]);continue}let O=R.trim();if(/^[A-Za-z_$][\w$]*$/.test(O))b.push([O,O])}if(r.expose){let y=new Set(r.expose);for(let R=b.length-1;R>=0;R--)if(!y.has(b[R][0]))b.splice(R,1)}let T=[];f=gc(fc(f,K),T);let ae=f.match(/^\s*import(?:\s+|(?=["'{*]))[^;]+;?\s*$/gm)||[];if(f=f.replace(/^\s*import(?:\s+|(?=["'{*]))[^;]+;?\s*$/gm,"").replace(/^\s*export\s*\{[^}]*\}\s*;?\s*$/gm,"").replace(/^\s*export\s+default\s+.*$/gm,"").trim(),p&&f)try{f=new Bun.Transpiler({loader:"js",minifyWhitespace:!0}).transformSync(f)}catch{}let ee=`__stxBundle_${l}`,le=b.map(([y,R])=>`${JSON.stringify(y)}: ${R}`).join(", "),ce=b.map(([y])=>`var ${y} = undefined;`).join(`
|
|
4
4
|
`),pe=b.map(([y])=>`${y} = ${ee}[${JSON.stringify(y)}];`).join(`
|
|
5
5
|
`);if(f=`${ae.join(`
|
|
6
6
|
`)}
|
|
7
|
-
${
|
|
7
|
+
${ce}
|
|
8
8
|
var ${ee} = (function() {
|
|
9
9
|
${T.join(`
|
|
10
10
|
`)}
|
|
11
11
|
${f}
|
|
12
|
-
return { ${
|
|
12
|
+
return { ${le} };
|
|
13
13
|
})();
|
|
14
|
-
${pe}`.trim(),D("bundled:",l,"output:",f.length,"bytes"),B.size>0&&b.length===0)return console.warn(`[stx:bundler] dropped every binding for ${h.basename(n)} (${l}); serving the unbundled source and not caching this result`),e;v.mkdirSync(c,{recursive:!0}),await Bun.write(E,f);let z=Array.from(Q).map((y)=>{try{return{path:y,mtimeMs:v.statSync(y).mtimeMs}}catch{return null}}).filter((y)=>y!==null);return await Bun.write(_,JSON.stringify({metadataVersion:re,files:z})),X(n,z.map((y)=>y.path)),r.collectInputs?.push(...z.map((y)=>y.path)),k.set(E,{code:f,files:z}),await he(c),f}catch(S){let f=
|
|
15
|
-
export{
|
|
14
|
+
${pe}`.trim(),D("bundled:",l,"output:",f.length,"bytes"),B.size>0&&b.length===0)return console.warn(`[stx:bundler] dropped every binding for ${h.basename(n)} (${l}); serving the unbundled source and not caching this result`),e;v.mkdirSync(c,{recursive:!0}),await Bun.write(E,f);let z=Array.from(Q).map((y)=>{try{return{path:y,mtimeMs:v.statSync(y).mtimeMs}}catch{return null}}).filter((y)=>y!==null);return await Bun.write(_,JSON.stringify({metadataVersion:re,files:z})),X(n,z.map((y)=>y.path)),r.collectInputs?.push(...z.map((y)=>y.path)),k.set(E,{code:f,files:z}),await he(c),f}catch(S){let f=gn(S,n||void 0),b=de(S,n||void 0);if(console.warn(`[stx:bundler] error: ${b}`),si(n||"",b,f),r.throwOnFailure||oi()==="error")throw S;return e}finally{try{v.rmSync(i,{force:!0}),v.rmSync(x,{recursive:!0,force:!0})}catch{}}}function we(e){let n=e.trim();if(!n)return null;let r=n.indexOf("=");if(r!==-1)n=n.slice(0,r).trim();let u=n.indexOf(":");if(u!==-1)n=n.slice(u+1).trim();if(n.startsWith("..."))n=n.slice(3).trim();return/^[A-Za-z_$][\w$]*$/.test(n)?n:null}
|
|
15
|
+
export{ue,dc,si,Ct,_t,qu,oi,Et,fn,pc,fc,gc,as,Tt,mc,$t,hc};
|