@bkm016/basalt 0.1.21 → 0.1.22
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/{chunk-51a0843g.js → chunk-09tdbx7b.js} +1 -1
- package/{chunk-225dyk1y.js → chunk-0rsyawz5.js} +1 -1
- package/{chunk-y8mf9tcj.js → chunk-1td9hjn9.js} +8 -8
- package/{chunk-g6cc7ac1.js → chunk-1xjkzzyh.js} +2 -2
- package/{chunk-43qf44t8.js → chunk-38932kzp.js} +2 -2
- package/{chunk-gdx1j9c5.js → chunk-5415fcz7.js} +2 -2
- package/{chunk-3phf8eg6.js → chunk-5kezbmgw.js} +2 -2
- package/{chunk-qz6ybxjg.js → chunk-5ph58x6w.js} +8 -8
- package/{chunk-kgnd32hn.js → chunk-6jdqe7sz.js} +1 -1
- package/{chunk-2m2sa0bp.js → chunk-6ztgzx9s.js} +1 -1
- package/{chunk-3r38vbt5.js → chunk-7dzcdpdt.js} +1 -1
- package/{chunk-kka12j10.js → chunk-82djd5fk.js} +1 -1
- package/{chunk-x1y4s01x.js → chunk-86vhsd3y.js} +11 -11
- package/{chunk-jhwb962k.js → chunk-8rfv9mm1.js} +9 -9
- package/{chunk-m9386732.js → chunk-8tvz5ht1.js} +2 -2
- package/{chunk-ve1b6vg6.js → chunk-9pjmwz01.js} +1 -1
- package/{chunk-ewaskman.js → chunk-9wjd9bxm.js} +1 -1
- package/chunk-b49005n2.js +471 -0
- package/{chunk-feyt85gg.js → chunk-bdz2561d.js} +1 -1
- package/{chunk-3t8wz9w8.js → chunk-bkvhwgeb.js} +1 -1
- package/{chunk-kypdthjg.js → chunk-bp9tfav3.js} +1 -1
- package/{chunk-ak95r8mq.js → chunk-cc9htxzx.js} +216 -215
- package/chunk-chfzk1fx.js +3 -0
- package/{chunk-syhhzr1j.js → chunk-cv5kdnsw.js} +2 -2
- package/{chunk-sq5ppnr3.js → chunk-d79s1s4t.js} +3 -3
- package/{chunk-qn70tm91.js → chunk-ec6bzt7w.js} +3 -3
- package/{chunk-h00wjps7.js → chunk-eq54cmsa.js} +1 -1
- package/{chunk-03b5jh31.js → chunk-g54nd4fd.js} +1 -1
- package/{chunk-2fymxwe7.js → chunk-g8p5c4vx.js} +5 -5
- package/{chunk-tmq8ktys.js → chunk-g9bemxpt.js} +1 -1
- package/{chunk-35y6nf6k.js → chunk-hk5p2eee.js} +4 -4
- package/{chunk-9t3v8c3m.js → chunk-jerp4pj5.js} +1 -1
- package/{chunk-0x0459qp.js → chunk-jsvqp20s.js} +1 -1
- package/{chunk-85sjfyjd.js → chunk-kb526065.js} +1 -1
- package/{chunk-cjh5h31t.js → chunk-kpw1qa2n.js} +3 -3
- package/{chunk-97ntcrm7.js → chunk-mbvy2t23.js} +1 -1
- package/{chunk-ttv805sb.js → chunk-mmnsdje8.js} +5 -5
- package/{chunk-9x28stv0.js → chunk-nffwakxq.js} +1 -1
- package/{chunk-wxzk086k.js → chunk-nfj8sj53.js} +1 -1
- package/{chunk-ak9rkrf3.js → chunk-pzwaz2ew.js} +2 -2
- package/{chunk-jy07y4pv.js → chunk-qtrd33pp.js} +5 -5
- package/{chunk-hhxtc9jn.js → chunk-rbk6jxcr.js} +1 -1
- package/{chunk-c5ydt3vq.js → chunk-rx812nrp.js} +2 -2
- package/{chunk-h1fwdz4h.js → chunk-sfgw0vmt.js} +1 -1
- package/chunk-tmefdwxy.js +2 -0
- package/chunk-tvg54x0x.js +2 -0
- package/chunk-v89f2k9b.js +2 -0
- package/{chunk-z4g2q36h.js → chunk-vhe16b65.js} +2 -2
- package/{chunk-np123myw.js → chunk-w4kasz4j.js} +4 -4
- package/{chunk-4fj91gt1.js → chunk-w4zkgn1c.js} +2 -2
- package/chunk-we5emq6f.js +2 -0
- package/{chunk-jpwr1sd2.js → chunk-x0dcabw6.js} +2 -2
- package/{chunk-ntntwtxn.js → chunk-xtj7b70y.js} +2 -2
- package/{chunk-bn1aaewd.js → chunk-xwew53k7.js} +4 -4
- package/{chunk-e8xywvv4.js → chunk-xyhr89y5.js} +1 -1
- package/{chunk-hrn2ss1a.js → chunk-yce46csn.js} +1 -1
- package/{chunk-ftg4b5pa.js → chunk-yetcb1z9.js} +2 -2
- package/chunk-ypmpf75h.js +2 -0
- package/chunk-zz48zvk5.js +2 -0
- package/compiled.js +5 -5
- package/package.json +1 -1
- package/ui-test-worker.js +1 -1
- package/web/chunk-04c54f1s.js +1 -0
- package/web/chunk-04c54f1s.js.br +2 -0
- package/web/chunk-04c54f1s.js.gz +0 -0
- package/web/chunk-04m1cb8w.js +1 -0
- package/web/chunk-04m1cb8w.js.br +0 -0
- package/web/chunk-04m1cb8w.js.gz +0 -0
- package/web/{chunk-j2y3wkxc.js → chunk-08z6mkgz.js} +1 -1
- package/web/chunk-08z6mkgz.js.br +0 -0
- package/web/chunk-08z6mkgz.js.gz +0 -0
- package/web/{chunk-yw5wyz1q.js → chunk-0g9m3rpw.js} +1 -1
- package/web/chunk-0g9m3rpw.js.br +0 -0
- package/web/chunk-0g9m3rpw.js.gz +0 -0
- package/web/{chunk-5vc1wkwb.js → chunk-0jccrdw3.js} +1 -1
- package/web/chunk-0jccrdw3.js.br +0 -0
- package/web/chunk-0jccrdw3.js.gz +0 -0
- package/web/{chunk-yarsp7h7.js → chunk-0vweazdh.js} +1 -1
- package/web/chunk-0vweazdh.js.br +0 -0
- package/web/chunk-0vweazdh.js.gz +0 -0
- package/web/chunk-1vtf555r.js +1 -0
- package/web/chunk-1vtf555r.js.br +0 -0
- package/web/chunk-1vtf555r.js.gz +0 -0
- package/web/{chunk-2h2w244w.js → chunk-29z0ft67.js} +1 -1
- package/web/chunk-29z0ft67.js.br +0 -0
- package/web/chunk-29z0ft67.js.gz +0 -0
- package/web/{chunk-v7ck87jf.js → chunk-2q3m4btb.js} +1 -1
- package/web/chunk-2q3m4btb.js.br +0 -0
- package/web/chunk-2q3m4btb.js.gz +0 -0
- package/web/{chunk-b83bzjcx.js → chunk-2s6fhjjc.js} +90 -90
- package/web/chunk-2s6fhjjc.js.br +0 -0
- package/web/chunk-2s6fhjjc.js.gz +0 -0
- package/web/{chunk-rsc5k5he.js → chunk-2vdx4ykn.js} +1 -1
- package/web/chunk-2vdx4ykn.js.br +0 -0
- package/web/chunk-2vdx4ykn.js.gz +0 -0
- package/web/{chunk-0w6ta3ps.js → chunk-2zgqe8r7.js} +1 -1
- package/web/chunk-2zgqe8r7.js.br +0 -0
- package/web/chunk-2zgqe8r7.js.gz +0 -0
- package/web/{chunk-07dd0jed.js → chunk-3kqpmg83.js} +1 -1
- package/web/chunk-3kqpmg83.js.br +0 -0
- package/web/chunk-3kqpmg83.js.gz +0 -0
- package/web/chunk-3rmqxna0.js +1 -0
- package/web/chunk-3rmqxna0.js.br +0 -0
- package/web/chunk-3rmqxna0.js.gz +0 -0
- package/web/{chunk-vvk9nche.js → chunk-3xmv2349.js} +2 -2
- package/web/chunk-3xmv2349.js.br +0 -0
- package/web/chunk-3xmv2349.js.gz +0 -0
- package/web/{chunk-wh0vt2vd.js → chunk-46cdys11.js} +1 -1
- package/web/chunk-46cdys11.js.br +0 -0
- package/web/{chunk-wh0vt2vd.js.gz → chunk-46cdys11.js.gz} +0 -0
- package/web/chunk-46mw23f0.js +8 -0
- package/web/chunk-46mw23f0.js.br +0 -0
- package/web/chunk-46mw23f0.js.gz +0 -0
- package/web/{chunk-n00se8nk.js → chunk-4r0dvjrr.js} +1 -1
- package/web/chunk-4r0dvjrr.js.br +0 -0
- package/web/chunk-4r0dvjrr.js.gz +0 -0
- package/web/{chunk-16b5anw4.js → chunk-4v6m84pg.js} +1 -1
- package/web/chunk-4v6m84pg.js.br +0 -0
- package/web/chunk-4v6m84pg.js.gz +0 -0
- package/web/{chunk-c69t0ysj.js → chunk-4ye31s2w.js} +1 -1
- package/web/chunk-4ye31s2w.js.br +4 -0
- package/web/chunk-4ye31s2w.js.gz +0 -0
- package/web/{chunk-kr7shpnb.js → chunk-5kavsn22.js} +1 -1
- package/web/chunk-5kavsn22.js.br +0 -0
- package/web/{chunk-kr7shpnb.js.gz → chunk-5kavsn22.js.gz} +0 -0
- package/web/{chunk-m7kypzvp.js → chunk-5q2h4tg8.js} +1 -1
- package/web/chunk-5q2h4tg8.js.br +4 -0
- package/web/chunk-5q2h4tg8.js.gz +0 -0
- package/web/{chunk-gt4dzb4b.js → chunk-5tbk6dx6.js} +1 -1
- package/web/chunk-5tbk6dx6.js.br +0 -0
- package/web/chunk-5tbk6dx6.js.gz +0 -0
- package/web/{chunk-ffwyfdg4.js → chunk-5yb0sm1r.js} +1 -1
- package/web/chunk-5yb0sm1r.js.br +0 -0
- package/web/chunk-5yb0sm1r.js.gz +0 -0
- package/web/chunk-5yz46tjw.js +2 -0
- package/web/chunk-5yz46tjw.js.br +0 -0
- package/web/chunk-5yz46tjw.js.gz +0 -0
- package/web/{chunk-hw4f79k8.js → chunk-619a8t38.js} +1 -1
- package/web/chunk-619a8t38.js.br +0 -0
- package/web/chunk-619a8t38.js.gz +0 -0
- package/web/{chunk-7remkcff.js → chunk-6areryyn.js} +1 -1
- package/web/chunk-6areryyn.js.br +0 -0
- package/web/chunk-6areryyn.js.gz +0 -0
- package/web/{chunk-5wgdprjp.js → chunk-6ms78sx5.js} +1 -1
- package/web/chunk-6ms78sx5.js.br +0 -0
- package/web/chunk-6ms78sx5.js.gz +0 -0
- package/web/{chunk-50wrjr22.js → chunk-6ts9mtye.js} +1 -1
- package/web/chunk-6ts9mtye.js.br +0 -0
- package/web/chunk-6ts9mtye.js.gz +0 -0
- package/web/{chunk-abahqsws.js → chunk-79whhay2.js} +1 -1
- package/web/chunk-79whhay2.js.br +0 -0
- package/web/chunk-79whhay2.js.gz +0 -0
- package/web/{chunk-jge5e8c4.js → chunk-7n1abr86.js} +1 -1
- package/web/chunk-7n1abr86.js.br +0 -0
- package/web/chunk-7n1abr86.js.gz +0 -0
- package/web/chunk-7qxfx983.js +1 -0
- package/web/chunk-7qxfx983.js.br +0 -0
- package/web/chunk-7qxfx983.js.gz +0 -0
- package/web/chunk-91k30q92.js +1 -0
- package/web/chunk-91k30q92.js.br +0 -0
- package/web/chunk-91k30q92.js.gz +0 -0
- package/web/{chunk-78t5dqea.js → chunk-91nyvkrb.js} +1 -1
- package/web/chunk-91nyvkrb.js.br +0 -0
- package/web/chunk-91nyvkrb.js.gz +0 -0
- package/web/{chunk-0q5drhbk.js → chunk-9mbr6znb.js} +1 -1
- package/web/chunk-9mbr6znb.js.br +0 -0
- package/web/chunk-9mbr6znb.js.gz +0 -0
- package/web/{chunk-h4g8j133.js → chunk-9mvw6a5v.js} +1 -1
- package/web/chunk-9mvw6a5v.js.br +0 -0
- package/web/chunk-9mvw6a5v.js.gz +0 -0
- package/web/{chunk-2hd51wb6.js → chunk-a6hdn8tb.js} +1 -1
- package/web/chunk-a6hdn8tb.js.br +0 -0
- package/web/chunk-a6hdn8tb.js.gz +0 -0
- package/web/{chunk-e6r1sb5r.js → chunk-ar6m9fza.js} +1 -1
- package/web/chunk-ar6m9fza.js.br +0 -0
- package/web/chunk-ar6m9fza.js.gz +0 -0
- package/web/{chunk-d4kjy2qn.js → chunk-ayqakyyq.js} +1 -1
- package/web/chunk-ayqakyyq.js.br +0 -0
- package/web/chunk-ayqakyyq.js.gz +0 -0
- package/web/{chunk-4zftsyq2.js → chunk-cc6hn5xv.js} +1 -1
- package/web/chunk-cc6hn5xv.js.br +0 -0
- package/web/chunk-cc6hn5xv.js.gz +0 -0
- package/web/{chunk-0hvyq55w.js → chunk-ccymg1hp.js} +1 -1
- package/web/chunk-ccymg1hp.js.br +0 -0
- package/web/chunk-ccymg1hp.js.gz +0 -0
- package/web/{chunk-55kw8p9r.js → chunk-cg9fe42b.js} +1 -1
- package/web/chunk-cg9fe42b.js.br +0 -0
- package/web/chunk-cg9fe42b.js.gz +0 -0
- package/web/chunk-cmcgmf94.js +1 -0
- package/web/chunk-cmcgmf94.js.br +0 -0
- package/web/chunk-cmcgmf94.js.gz +0 -0
- package/web/chunk-cnbbvd6n.js +1 -0
- package/web/chunk-cnbbvd6n.js.br +0 -0
- package/web/chunk-cnbbvd6n.js.gz +0 -0
- package/web/{chunk-8c6h952g.js → chunk-cxp2nbtc.js} +1 -1
- package/web/chunk-cxp2nbtc.js.br +0 -0
- package/web/chunk-cxp2nbtc.js.gz +0 -0
- package/web/{chunk-j7sfcfxr.js → chunk-dj2b64aj.js} +1 -1
- package/web/chunk-dj2b64aj.js.br +0 -0
- package/web/chunk-dj2b64aj.js.gz +0 -0
- package/web/{chunk-2w4rdnhj.js → chunk-dsga6rp3.js} +1 -1
- package/web/chunk-dsga6rp3.js.br +0 -0
- package/web/chunk-dsga6rp3.js.gz +0 -0
- package/web/chunk-ek6q6a08.js +1 -0
- package/web/chunk-ek6q6a08.js.br +2 -0
- package/web/chunk-ek6q6a08.js.gz +0 -0
- package/web/{chunk-21d8pzcm.js → chunk-et1nm6h1.js} +2 -2
- package/web/chunk-et1nm6h1.js.br +0 -0
- package/web/chunk-et1nm6h1.js.gz +0 -0
- package/web/chunk-f1016wh6.js +1 -0
- package/web/chunk-f1016wh6.js.br +0 -0
- package/web/chunk-f1016wh6.js.gz +0 -0
- package/web/{chunk-z7adzvfz.js → chunk-f42mwg61.js} +1 -1
- package/web/chunk-f42mwg61.js.br +0 -0
- package/web/chunk-f42mwg61.js.gz +0 -0
- package/web/{chunk-pvhz0gqy.js → chunk-fk35d3bz.js} +1 -1
- package/web/chunk-fk35d3bz.js.br +0 -0
- package/web/chunk-fk35d3bz.js.gz +0 -0
- package/web/{chunk-keway722.js → chunk-fpwztdhn.js} +1 -1
- package/web/chunk-fpwztdhn.js.br +0 -0
- package/web/chunk-fpwztdhn.js.gz +0 -0
- package/web/{chunk-qcgs1mft.js → chunk-g30nqfka.js} +1 -1
- package/web/chunk-g30nqfka.js.br +0 -0
- package/web/chunk-g30nqfka.js.gz +0 -0
- package/web/chunk-gbwy4pfg.css +1 -0
- package/web/chunk-gbwy4pfg.css.br +0 -0
- package/web/chunk-gbwy4pfg.css.gz +0 -0
- package/web/{chunk-31vxes2p.js → chunk-gepgx19m.js} +1 -1
- package/web/chunk-gepgx19m.js.br +0 -0
- package/web/chunk-gepgx19m.js.gz +0 -0
- package/web/{chunk-62z94rt2.js → chunk-grz69q28.js} +1 -1
- package/web/chunk-grz69q28.js.br +0 -0
- package/web/chunk-grz69q28.js.gz +0 -0
- package/web/{chunk-acv6gk2b.js → chunk-gt62acsh.js} +1 -1
- package/web/chunk-gt62acsh.js.br +0 -0
- package/web/chunk-gt62acsh.js.gz +0 -0
- package/web/{chunk-w5c2r59n.js → chunk-h28xrvmg.js} +1 -1
- package/web/chunk-h28xrvmg.js.br +0 -0
- package/web/chunk-h28xrvmg.js.gz +0 -0
- package/web/{chunk-56tqa12m.js → chunk-h80ypke7.js} +1 -1
- package/web/chunk-h80ypke7.js.br +0 -0
- package/web/chunk-h80ypke7.js.gz +0 -0
- package/web/chunk-k1cd6e24.js +1 -0
- package/web/chunk-k1cd6e24.js.br +0 -0
- package/web/chunk-k1cd6e24.js.gz +0 -0
- package/web/chunk-k9248573.js +1 -0
- package/web/chunk-k9248573.js.br +0 -0
- package/web/chunk-k9248573.js.gz +0 -0
- package/web/{chunk-cbtpaf3e.js → chunk-kqgn9dsa.js} +1 -1
- package/web/chunk-kqgn9dsa.js.br +0 -0
- package/web/chunk-kqgn9dsa.js.gz +0 -0
- package/web/chunk-kqngpw5m.js +1 -0
- package/web/chunk-kqngpw5m.js.br +0 -0
- package/web/chunk-kqngpw5m.js.gz +0 -0
- package/web/{chunk-d1gga18f.js → chunk-kzj105r1.js} +1 -1
- package/web/chunk-kzj105r1.js.br +0 -0
- package/web/chunk-kzj105r1.js.gz +0 -0
- package/web/chunk-m14v2en1.js +1 -0
- package/web/chunk-m14v2en1.js.br +0 -0
- package/web/chunk-m14v2en1.js.gz +0 -0
- package/web/{chunk-2dykyq1n.js → chunk-m34et8g4.js} +1 -1
- package/web/chunk-m34et8g4.js.br +0 -0
- package/web/chunk-m34et8g4.js.gz +0 -0
- package/web/{chunk-60fbfw70.js → chunk-md1f6gmk.js} +1 -1
- package/web/chunk-md1f6gmk.js.br +0 -0
- package/web/chunk-md1f6gmk.js.gz +0 -0
- package/web/{chunk-fbzhgaak.js → chunk-n05xf20n.js} +1 -1
- package/web/chunk-n05xf20n.js.br +0 -0
- package/web/chunk-n05xf20n.js.gz +0 -0
- package/web/{chunk-zb01zmms.js → chunk-n2k1gd6n.js} +1 -1
- package/web/chunk-n2k1gd6n.js.br +0 -0
- package/web/chunk-n2k1gd6n.js.gz +0 -0
- package/web/{chunk-s7a2f62f.js → chunk-nm8yza3v.js} +1 -1
- package/web/chunk-nm8yza3v.js.br +0 -0
- package/web/chunk-nm8yza3v.js.gz +0 -0
- package/web/chunk-pbg9rdwv.js +1 -0
- package/web/chunk-pbg9rdwv.js.br +2 -0
- package/web/chunk-pbg9rdwv.js.gz +0 -0
- package/web/{chunk-8wgev3hd.js → chunk-qj9nd038.js} +1 -1
- package/web/chunk-qj9nd038.js.br +0 -0
- package/web/chunk-qj9nd038.js.gz +0 -0
- package/web/chunk-qjaex9c0.js +1 -0
- package/web/chunk-qjaex9c0.js.br +2 -0
- package/web/chunk-qjaex9c0.js.gz +0 -0
- package/web/{chunk-2c4affp1.js → chunk-qq79vsm8.js} +1 -1
- package/web/chunk-qq79vsm8.js.br +0 -0
- package/web/chunk-qq79vsm8.js.gz +0 -0
- package/web/{chunk-t0xjx21h.js → chunk-qs5wnwd6.js} +1 -1
- package/web/chunk-qs5wnwd6.js.br +0 -0
- package/web/chunk-qs5wnwd6.js.gz +0 -0
- package/web/{chunk-595tqsv5.js → chunk-r381n550.js} +1 -1
- package/web/chunk-r381n550.js.br +0 -0
- package/web/chunk-r381n550.js.gz +0 -0
- package/web/{chunk-2tc6krye.js → chunk-r48vazdm.js} +1 -1
- package/web/chunk-r48vazdm.js.br +0 -0
- package/web/chunk-r48vazdm.js.gz +0 -0
- package/web/{chunk-ngdj0r7w.js → chunk-r55seq42.js} +1 -1
- package/web/chunk-r55seq42.js.br +0 -0
- package/web/chunk-r55seq42.js.gz +0 -0
- package/web/{chunk-gs41j1vb.js → chunk-r79zekav.js} +1 -1
- package/web/chunk-r79zekav.js.br +0 -0
- package/web/chunk-r79zekav.js.gz +0 -0
- package/web/{chunk-fztzcy7c.js → chunk-r8qyvcks.js} +1 -1
- package/web/chunk-r8qyvcks.js.br +0 -0
- package/web/chunk-r8qyvcks.js.gz +0 -0
- package/web/chunk-r9dt0730.js +1 -0
- package/web/chunk-r9dt0730.js.br +0 -0
- package/web/chunk-r9dt0730.js.gz +0 -0
- package/web/{chunk-82zwwy0b.js → chunk-rpjzwknn.js} +1 -1
- package/web/chunk-rpjzwknn.js.br +0 -0
- package/web/{chunk-82zwwy0b.js.gz → chunk-rpjzwknn.js.gz} +0 -0
- package/web/{chunk-c37hhmtd.js → chunk-sk3065js.js} +1 -1
- package/web/chunk-sk3065js.js.br +0 -0
- package/web/chunk-sk3065js.js.gz +0 -0
- package/web/{chunk-qh24q7c0.js → chunk-smywa1zw.js} +1 -1
- package/web/chunk-smywa1zw.js.br +0 -0
- package/web/chunk-smywa1zw.js.gz +0 -0
- package/web/{chunk-kx2k462h.js → chunk-trssyq9a.js} +1 -1
- package/web/chunk-trssyq9a.js.br +0 -0
- package/web/chunk-trssyq9a.js.gz +0 -0
- package/web/{chunk-sac6fn9n.js → chunk-v329f8df.js} +1 -1
- package/web/chunk-v329f8df.js.br +0 -0
- package/web/chunk-v329f8df.js.gz +0 -0
- package/web/{chunk-p6ma361e.js → chunk-vb2feptd.js} +1 -1
- package/web/chunk-vb2feptd.js.br +0 -0
- package/web/chunk-vb2feptd.js.gz +0 -0
- package/web/chunk-vff33vj3.js +1 -0
- package/web/chunk-vff33vj3.js.br +2 -0
- package/web/chunk-vff33vj3.js.gz +0 -0
- package/web/{chunk-5nbmnchg.js → chunk-w9adyaze.js} +1 -1
- package/web/chunk-w9adyaze.js.br +0 -0
- package/web/chunk-w9adyaze.js.gz +0 -0
- package/web/{chunk-c1zhat04.js → chunk-wgc8z5jv.js} +1 -1
- package/web/chunk-wgc8z5jv.js.br +0 -0
- package/web/chunk-wgc8z5jv.js.gz +0 -0
- package/web/{chunk-m5b7hny2.js → chunk-wvdk3w03.js} +1 -1
- package/web/chunk-wvdk3w03.js.br +0 -0
- package/web/chunk-wvdk3w03.js.gz +0 -0
- package/web/{chunk-ajpzsx51.js → chunk-wxmaw4ht.js} +1 -1
- package/web/chunk-wxmaw4ht.js.br +0 -0
- package/web/chunk-wxmaw4ht.js.gz +0 -0
- package/web/{chunk-2w27acew.js → chunk-x19jdqnt.js} +1 -1
- package/web/chunk-x19jdqnt.js.br +0 -0
- package/web/chunk-x19jdqnt.js.gz +0 -0
- package/web/{chunk-3d3y4tep.js → chunk-x4153gx3.js} +1 -1
- package/web/chunk-x4153gx3.js.br +0 -0
- package/web/chunk-x4153gx3.js.gz +0 -0
- package/web/{chunk-39kaz6fa.js → chunk-x7wmb5d3.js} +1 -1
- package/web/chunk-x7wmb5d3.js.br +0 -0
- package/web/chunk-x7wmb5d3.js.gz +0 -0
- package/web/{chunk-dbv8qpen.js → chunk-xp2zpmpp.js} +2 -2
- package/web/chunk-xp2zpmpp.js.br +0 -0
- package/web/chunk-xp2zpmpp.js.gz +0 -0
- package/web/chunk-y09v3sz7.js +1 -0
- package/web/chunk-y09v3sz7.js.br +0 -0
- package/web/chunk-y09v3sz7.js.gz +0 -0
- package/web/{chunk-780qvh05.js → chunk-ywmsxe5z.js} +1 -1
- package/web/chunk-ywmsxe5z.js.br +0 -0
- package/web/{chunk-780qvh05.js.gz → chunk-ywmsxe5z.js.gz} +0 -0
- package/web/{chunk-fsz1msjr.js → chunk-yzyxa823.js} +1 -1
- package/web/chunk-yzyxa823.js.br +0 -0
- package/web/chunk-yzyxa823.js.gz +0 -0
- package/web/{chunk-ex66t805.js → chunk-zwx48gb8.js} +1 -1
- package/web/chunk-zwx48gb8.js.br +0 -0
- package/web/chunk-zwx48gb8.js.gz +0 -0
- package/web/index.html +1 -1
- package/web/index.html.br +0 -0
- package/web/index.html.gz +0 -0
- package/worker.js +1 -1
- package/chunk-49hsqsht.js +0 -2
- package/chunk-5h59tby8.js +0 -470
- package/chunk-b516bp7n.js +0 -3
- package/chunk-kb5h9rmb.js +0 -2
- package/chunk-r36b12zb.js +0 -2
- package/chunk-re8n2te5.js +0 -2
- package/chunk-rqrjzz73.js +0 -2
- package/chunk-w3n8wm44.js +0 -2
- package/web/chunk-07dd0jed.js.br +0 -0
- package/web/chunk-07dd0jed.js.gz +0 -0
- package/web/chunk-0hvyq55w.js.br +0 -0
- package/web/chunk-0hvyq55w.js.gz +0 -0
- package/web/chunk-0q5drhbk.js.br +0 -0
- package/web/chunk-0q5drhbk.js.gz +0 -0
- package/web/chunk-0w6ta3ps.js.br +0 -0
- package/web/chunk-0w6ta3ps.js.gz +0 -0
- package/web/chunk-16b5anw4.js.br +0 -0
- package/web/chunk-16b5anw4.js.gz +0 -0
- package/web/chunk-21d8pzcm.js.br +0 -0
- package/web/chunk-21d8pzcm.js.gz +0 -0
- package/web/chunk-2c4affp1.js.br +0 -0
- package/web/chunk-2c4affp1.js.gz +0 -0
- package/web/chunk-2dykyq1n.js.br +0 -0
- package/web/chunk-2dykyq1n.js.gz +0 -0
- package/web/chunk-2h2w244w.js.br +0 -0
- package/web/chunk-2h2w244w.js.gz +0 -0
- package/web/chunk-2hd51wb6.js.br +0 -0
- package/web/chunk-2hd51wb6.js.gz +0 -0
- package/web/chunk-2tc6krye.js.br +0 -0
- package/web/chunk-2tc6krye.js.gz +0 -0
- package/web/chunk-2w27acew.js.br +0 -0
- package/web/chunk-2w27acew.js.gz +0 -0
- package/web/chunk-2w4rdnhj.js.br +0 -0
- package/web/chunk-2w4rdnhj.js.gz +0 -0
- package/web/chunk-31vxes2p.js.br +0 -0
- package/web/chunk-31vxes2p.js.gz +0 -0
- package/web/chunk-32qd2y5h.js +0 -1
- package/web/chunk-32qd2y5h.js.br +0 -0
- package/web/chunk-32qd2y5h.js.gz +0 -0
- package/web/chunk-39kaz6fa.js.br +0 -0
- package/web/chunk-39kaz6fa.js.gz +0 -0
- package/web/chunk-3d3y4tep.js.br +0 -0
- package/web/chunk-3d3y4tep.js.gz +0 -0
- package/web/chunk-4makcmpw.js +0 -1
- package/web/chunk-4makcmpw.js.br +0 -0
- package/web/chunk-4makcmpw.js.gz +0 -0
- package/web/chunk-4zftsyq2.js.br +0 -0
- package/web/chunk-4zftsyq2.js.gz +0 -0
- package/web/chunk-50wrjr22.js.br +0 -0
- package/web/chunk-50wrjr22.js.gz +0 -0
- package/web/chunk-55kw8p9r.js.br +0 -0
- package/web/chunk-55kw8p9r.js.gz +0 -0
- package/web/chunk-56tqa12m.js.br +0 -0
- package/web/chunk-56tqa12m.js.gz +0 -0
- package/web/chunk-595tqsv5.js.br +0 -0
- package/web/chunk-595tqsv5.js.gz +0 -0
- package/web/chunk-5h193k2c.js +0 -1
- package/web/chunk-5h193k2c.js.br +0 -0
- package/web/chunk-5h193k2c.js.gz +0 -0
- package/web/chunk-5nbmnchg.js.br +0 -0
- package/web/chunk-5nbmnchg.js.gz +0 -0
- package/web/chunk-5vc1wkwb.js.br +0 -0
- package/web/chunk-5vc1wkwb.js.gz +0 -0
- package/web/chunk-5wgdprjp.js.br +0 -0
- package/web/chunk-5wgdprjp.js.gz +0 -0
- package/web/chunk-60fbfw70.js.br +0 -0
- package/web/chunk-60fbfw70.js.gz +0 -0
- package/web/chunk-62z94rt2.js.br +0 -0
- package/web/chunk-62z94rt2.js.gz +0 -0
- package/web/chunk-67khfy00.css +0 -1
- package/web/chunk-67khfy00.css.br +0 -0
- package/web/chunk-67khfy00.css.gz +0 -0
- package/web/chunk-6bt2t0xt.js +0 -8
- package/web/chunk-6bt2t0xt.js.br +0 -0
- package/web/chunk-6bt2t0xt.js.gz +0 -0
- package/web/chunk-780qvh05.js.br +0 -0
- package/web/chunk-78t5dqea.js.br +0 -0
- package/web/chunk-78t5dqea.js.gz +0 -0
- package/web/chunk-7edmyret.js +0 -1
- package/web/chunk-7edmyret.js.br +0 -0
- package/web/chunk-7edmyret.js.gz +0 -0
- package/web/chunk-7remkcff.js.br +0 -0
- package/web/chunk-7remkcff.js.gz +0 -0
- package/web/chunk-7s062q01.js +0 -1
- package/web/chunk-7s062q01.js.br +0 -0
- package/web/chunk-7s062q01.js.gz +0 -0
- package/web/chunk-82zwwy0b.js.br +0 -0
- package/web/chunk-8c6h952g.js.br +0 -0
- package/web/chunk-8c6h952g.js.gz +0 -0
- package/web/chunk-8wgev3hd.js.br +0 -0
- package/web/chunk-8wgev3hd.js.gz +0 -0
- package/web/chunk-9vcbnf1m.js +0 -1
- package/web/chunk-9vcbnf1m.js.br +0 -0
- package/web/chunk-9vcbnf1m.js.gz +0 -0
- package/web/chunk-abahqsws.js.br +0 -0
- package/web/chunk-abahqsws.js.gz +0 -0
- package/web/chunk-acv6gk2b.js.br +0 -0
- package/web/chunk-acv6gk2b.js.gz +0 -0
- package/web/chunk-ajpzsx51.js.br +0 -0
- package/web/chunk-ajpzsx51.js.gz +0 -0
- package/web/chunk-b1b9txvk.js +0 -1
- package/web/chunk-b1b9txvk.js.br +0 -0
- package/web/chunk-b1b9txvk.js.gz +0 -0
- package/web/chunk-b83bzjcx.js.br +0 -0
- package/web/chunk-b83bzjcx.js.gz +0 -0
- package/web/chunk-c1zhat04.js.br +0 -0
- package/web/chunk-c1zhat04.js.gz +0 -0
- package/web/chunk-c37hhmtd.js.br +0 -0
- package/web/chunk-c37hhmtd.js.gz +0 -0
- package/web/chunk-c69t0ysj.js.br +0 -0
- package/web/chunk-c69t0ysj.js.gz +0 -0
- package/web/chunk-caz85hz4.js +0 -1
- package/web/chunk-caz85hz4.js.br +0 -0
- package/web/chunk-caz85hz4.js.gz +0 -0
- package/web/chunk-cbtpaf3e.js.br +0 -0
- package/web/chunk-cbtpaf3e.js.gz +0 -0
- package/web/chunk-d1gga18f.js.br +0 -0
- package/web/chunk-d1gga18f.js.gz +0 -0
- package/web/chunk-d4kjy2qn.js.br +0 -0
- package/web/chunk-d4kjy2qn.js.gz +0 -0
- package/web/chunk-dbv8qpen.js.br +0 -0
- package/web/chunk-dbv8qpen.js.gz +0 -0
- package/web/chunk-e6r1sb5r.js.br +0 -0
- package/web/chunk-e6r1sb5r.js.gz +0 -0
- package/web/chunk-ep5qff8m.js +0 -1
- package/web/chunk-ep5qff8m.js.br +0 -0
- package/web/chunk-ep5qff8m.js.gz +0 -0
- package/web/chunk-ex66t805.js.br +0 -0
- package/web/chunk-ex66t805.js.gz +0 -0
- package/web/chunk-fb8qtyqg.js +0 -1
- package/web/chunk-fb8qtyqg.js.br +0 -0
- package/web/chunk-fb8qtyqg.js.gz +0 -0
- package/web/chunk-fbzhgaak.js.br +0 -0
- package/web/chunk-fbzhgaak.js.gz +0 -0
- package/web/chunk-ffwyfdg4.js.br +0 -0
- package/web/chunk-ffwyfdg4.js.gz +0 -0
- package/web/chunk-fsz1msjr.js.br +0 -0
- package/web/chunk-fsz1msjr.js.gz +0 -0
- package/web/chunk-fztzcy7c.js.br +0 -0
- package/web/chunk-fztzcy7c.js.gz +0 -0
- package/web/chunk-g4st8a4e.js +0 -1
- package/web/chunk-g4st8a4e.js.br +0 -0
- package/web/chunk-g4st8a4e.js.gz +0 -0
- package/web/chunk-gs41j1vb.js.br +0 -0
- package/web/chunk-gs41j1vb.js.gz +0 -0
- package/web/chunk-gt4dzb4b.js.br +0 -0
- package/web/chunk-gt4dzb4b.js.gz +0 -0
- package/web/chunk-h4g8j133.js.br +0 -0
- package/web/chunk-h4g8j133.js.gz +0 -0
- package/web/chunk-ht3cek8b.js +0 -1
- package/web/chunk-ht3cek8b.js.br +0 -2
- package/web/chunk-ht3cek8b.js.gz +0 -0
- package/web/chunk-hw4f79k8.js.br +0 -0
- package/web/chunk-hw4f79k8.js.gz +0 -0
- package/web/chunk-j2y3wkxc.js.br +0 -0
- package/web/chunk-j2y3wkxc.js.gz +0 -0
- package/web/chunk-j7sfcfxr.js.br +0 -0
- package/web/chunk-j7sfcfxr.js.gz +0 -0
- package/web/chunk-jge5e8c4.js.br +0 -0
- package/web/chunk-jge5e8c4.js.gz +0 -0
- package/web/chunk-jyjgvcac.js +0 -2
- package/web/chunk-jyjgvcac.js.br +0 -0
- package/web/chunk-jyjgvcac.js.gz +0 -0
- package/web/chunk-k9bzz441.js +0 -1
- package/web/chunk-k9bzz441.js.br +0 -0
- package/web/chunk-k9bzz441.js.gz +0 -0
- package/web/chunk-keway722.js.br +0 -0
- package/web/chunk-keway722.js.gz +0 -0
- package/web/chunk-kr7shpnb.js.br +0 -0
- package/web/chunk-kv5swske.js +0 -1
- package/web/chunk-kv5swske.js.br +0 -0
- package/web/chunk-kv5swske.js.gz +0 -0
- package/web/chunk-kx2k462h.js.br +0 -0
- package/web/chunk-kx2k462h.js.gz +0 -0
- package/web/chunk-m5b7hny2.js.br +0 -0
- package/web/chunk-m5b7hny2.js.gz +0 -0
- package/web/chunk-m7kypzvp.js.br +0 -0
- package/web/chunk-m7kypzvp.js.gz +0 -0
- package/web/chunk-n00se8nk.js.br +0 -0
- package/web/chunk-n00se8nk.js.gz +0 -0
- package/web/chunk-ngdj0r7w.js.br +0 -0
- package/web/chunk-ngdj0r7w.js.gz +0 -0
- package/web/chunk-p6ma361e.js.br +0 -0
- package/web/chunk-p6ma361e.js.gz +0 -0
- package/web/chunk-pvhz0gqy.js.br +0 -0
- package/web/chunk-pvhz0gqy.js.gz +0 -0
- package/web/chunk-q96eky9v.js +0 -1
- package/web/chunk-q96eky9v.js.br +0 -0
- package/web/chunk-q96eky9v.js.gz +0 -0
- package/web/chunk-qcgs1mft.js.br +0 -0
- package/web/chunk-qcgs1mft.js.gz +0 -0
- package/web/chunk-qh24q7c0.js.br +0 -0
- package/web/chunk-qh24q7c0.js.gz +0 -0
- package/web/chunk-r1xksxab.js +0 -1
- package/web/chunk-r1xksxab.js.br +0 -0
- package/web/chunk-r1xksxab.js.gz +0 -0
- package/web/chunk-rsc5k5he.js.br +0 -0
- package/web/chunk-rsc5k5he.js.gz +0 -0
- package/web/chunk-s7a2f62f.js.br +0 -0
- package/web/chunk-s7a2f62f.js.gz +0 -0
- package/web/chunk-sac6fn9n.js.br +0 -0
- package/web/chunk-sac6fn9n.js.gz +0 -0
- package/web/chunk-t0xjx21h.js.br +0 -0
- package/web/chunk-t0xjx21h.js.gz +0 -0
- package/web/chunk-v7ck87jf.js.br +0 -0
- package/web/chunk-v7ck87jf.js.gz +0 -0
- package/web/chunk-vvk9nche.js.br +0 -0
- package/web/chunk-vvk9nche.js.gz +0 -0
- package/web/chunk-vxtfen72.js +0 -1
- package/web/chunk-vxtfen72.js.br +0 -0
- package/web/chunk-vxtfen72.js.gz +0 -0
- package/web/chunk-w5c2r59n.js.br +0 -0
- package/web/chunk-w5c2r59n.js.gz +0 -0
- package/web/chunk-wh0vt2vd.js.br +0 -0
- package/web/chunk-xe7fj72r.js +0 -1
- package/web/chunk-xe7fj72r.js.br +0 -0
- package/web/chunk-xe7fj72r.js.gz +0 -0
- package/web/chunk-yarsp7h7.js.br +0 -0
- package/web/chunk-yarsp7h7.js.gz +0 -0
- package/web/chunk-yw5wyz1q.js.br +0 -0
- package/web/chunk-yw5wyz1q.js.gz +0 -0
- package/web/chunk-z3ea4vhk.js +0 -1
- package/web/chunk-z3ea4vhk.js.br +0 -0
- package/web/chunk-z3ea4vhk.js.gz +0 -0
- package/web/chunk-z7adzvfz.js.br +0 -0
- package/web/chunk-z7adzvfz.js.gz +0 -0
- package/web/chunk-zb01zmms.js.br +0 -0
- package/web/chunk-zb01zmms.js.gz +0 -0
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
// @bun
|
|
2
|
-
import{Mr,Ut,or,ir,sr,ar,Lr,Or,Bt,Nr,Dr,Ur,Br,Fr,$r}from"./chunk-
|
|
2
|
+
import{Mr,Ut,or,ir,sr,ar,Lr,Or,Bt,Nr,Dr,Ur,Br,Fr,$r}from"./chunk-5ph58x6w.js";import{E}from"./chunk-rx812nrp.js";import{se}from"./chunk-keq5kv9b.js";import{V,X}from"./chunk-e2m8ap8f.js";import{Y}from"./chunk-38932kzp.js";import{x}from"./chunk-chfzk1fx.js";import{xe}from"./chunk-0b2brwjc.js";import{W,q,fe,ce,Fe,ee,K}from"./chunk-hk5p2eee.js";var b="v1",O="gcp-vertex-credentials",R=0,C=(e,o,t)=>{let i=new W,u=Fe(o);return(async()=>{let n={role:"assistant",content:[],api:"google-vertex",provider:e.provider,model:e.id,usage:{input:0,output:0,cacheRead:0,cacheWrite:0,totalTokens:0,cost:{input:0,output:0,cacheRead:0,cacheWrite:0,total:0}},stopReason:"pending",timestamp:Date.now()};try{if(t?.fetch&&t.fetch!==globalThis.fetch)throw Error("Custom fetch is not supported by the Google Vertex adapter");let c=L(t),g=c?S(e,c,t?.headers):I(e,M(t),P(t),t?.headers,t?.env),h=U(e,u,t),m=await t?.onPayload?.(h,e);if(m!==void 0)h=m;let p=await $r(()=>g.models.generateContentStream(h),t);i.push({type:"start",partial:n});let r=null,f=n.content,l=()=>f.length-1;for await(let s of p){await t?.onProviderStreamEvent?.(s,e),n.responseId||=s.responseId;let k=s.candidates?.[0];if(k?.content?.parts)for(let a of k.content.parts){if(a.text!==void 0){let d=Or(a);if(!r||d&&r.type!=="thinking"||!d&&r.type!=="text"){if(r)if(r.type==="text")i.push({type:"text_end",contentIndex:f.length-1,content:r.text,partial:n});else i.push({type:"thinking_end",contentIndex:l(),content:r.thinking,partial:n});if(d)r={type:"thinking",thinking:"",thinkingSignature:void 0},n.content.push(r),i.push({type:"thinking_start",contentIndex:l(),partial:n});else r={type:"text",text:""},n.content.push(r),i.push({type:"text_start",contentIndex:l(),partial:n})}if(r.type==="thinking")r.thinking+=a.text,r.thinkingSignature=Bt(r.thinkingSignature,a.thoughtSignature),i.push({type:"thinking_delta",contentIndex:l(),delta:a.text,partial:n});else r.text+=a.text,r.textSignature=Bt(r.textSignature,a.thoughtSignature),i.push({type:"text_delta",contentIndex:l(),delta:a.text,partial:n})}if(a.functionCall){if(r){if(r.type==="text")i.push({type:"text_end",contentIndex:l(),content:r.text,partial:n});else i.push({type:"thinking_end",contentIndex:l(),content:r.thinking,partial:n});r=null}let d=a.functionCall.id,y={type:"toolCall",id:!d||n.content.some((T)=>T.type==="toolCall"&&T.id===d)?`${a.functionCall.name}_${Date.now()}_${++R}`:d,name:a.functionCall.name||"",arguments:a.functionCall.args??{},...a.thoughtSignature&&{thoughtSignature:a.thoughtSignature}};n.content.push(y),i.push({type:"toolcall_start",contentIndex:l(),partial:n}),i.push({type:"toolcall_delta",contentIndex:l(),delta:JSON.stringify(y.arguments),partial:n}),i.push({type:"toolcall_end",contentIndex:l(),toolCall:y,partial:n})}}if(k?.finishReason){if(n.rawStopReason=k.finishReason,n.stopReason=Fr(k.finishReason),n.content.some((a)=>a.type==="toolCall")&&n.stopReason==="stop")n.stopReason="toolUse"}if(s.usageMetadata)n.usage={input:(s.usageMetadata.promptTokenCount||0)-(s.usageMetadata.cachedContentTokenCount||0),output:(s.usageMetadata.candidatesTokenCount||0)+(s.usageMetadata.thoughtsTokenCount||0),cacheRead:s.usageMetadata.cachedContentTokenCount||0,cacheWrite:0,reasoning:s.usageMetadata.thoughtsTokenCount||0,totalTokens:s.usageMetadata.totalTokenCount||0,cost:{input:0,output:0,cacheRead:0,cacheWrite:0,total:0}},ee(e,n.usage)}if(r)if(r.type==="text")i.push({type:"text_end",contentIndex:l(),content:r.text,partial:n});else i.push({type:"thinking_end",contentIndex:l(),content:r.thinking,partial:n});if(t?.signal?.aborted)throw Error("Request was aborted");if(n.stopReason==="pending")throw Error("Google Vertex stream ended without a finish reason");if(n.stopReason==="aborted"||n.stopReason==="error"){let s=n.rawStopReason?`Provider stopped with: ${n.rawStopReason}`:"An unknown error occurred";throw Error(s)}i.push({type:"done",reason:n.stopReason,message:n}),i.end()}catch(c){for(let g of n.content)if("index"in g)delete g.index;n.stopReason=t?.signal?.aborted?"aborted":"error",n.errorMessage=X(V(c)),i.push({type:"error",reason:n.stopReason,error:n}),i.end()}})(),i},ae=(e,o,t)=>{let i={...Y(e,o,t,void 0),toolChoice:t?.toolChoice};if(!t?.reasoning)return C(e,o,{...i,thinking:{enabled:!1}});let u=K(e,t.reasoning);if(u==="off")return C(e,o,{...i,thinking:{enabled:!1}});let n=or(e,u);if(ir(e))return C(e,o,{...i,thinking:{enabled:!0,level:sr(n)}});return C(e,o,{...i,thinking:{enabled:!0,budgetTokens:D(e,n,t.thinkingBudgets)}})};function I(e,o,t,i,u){let n=G(u);return new Ut({vertexai:!0,project:o,location:t,apiVersion:b,...n?{googleAuthOptions:n}:{},httpOptions:v(e,i)})}function S(e,o,t){return new Ut({vertexai:!0,apiKey:o,apiVersion:b,httpOptions:v(e,t)})}function v(e,o){let t={},i=w(e.baseUrl);if(i){if(t.baseUrl=i,t.baseUrlResourceScope=Mr.COLLECTION,_(i))t.apiVersion=""}let u=xe({"User-Agent":se(),...e.headers,...o});if(u)t.headers=u;return Object.keys(t).length>0?t:void 0}function w(e){let o=e.trim();if(!o||o.includes("{location}"))return;return o}function _(e){try{return new URL(e).pathname.split("/").some((t)=>/^v\d+(?:beta\d*)?$/.test(t))}catch{return/(?:^|\/)v\d+(?:beta\d*)?(?:\/|$)/.test(e)}}function G(e){let o=E("GOOGLE_APPLICATION_CREDENTIALS",e);return o?{keyFilename:o}:void 0}function L(e){let o=e?.apiKey?.trim();if(!o||o===O||A(o))return;return o}function A(e){return/^<[^>]+>$/.test(e)}function M(e){let o=e?.project||E("GOOGLE_CLOUD_PROJECT",e?.env)||E("GCLOUD_PROJECT",e?.env);if(!o)throw Error("Vertex AI requires a project ID. Set GOOGLE_CLOUD_PROJECT/GCLOUD_PROJECT or pass project in options.");return o}function P(e){let o=e?.location||E("GOOGLE_CLOUD_LOCATION",e?.env);if(!o)throw Error("Vertex AI requires a location. Set GOOGLE_CLOUD_LOCATION or pass location in options.");return o}function U(e,o,t={}){let i=Nr(e,o),u=fe(o.messages),n=ce(o.messages),c={};if(t.temperature!==void 0)c.temperature=t.temperature;if(t.maxTokens!==void 0)c.maxOutputTokens=t.maxTokens;let g=Ur(e.id),h=n.length>0?Br(n,t.toolChoice,g):void 0,m=u?q(u):"",p={...Object.keys(c).length>0&&c,...m&&{systemInstruction:x(m)},...n.length>0&&{tools:Dr(n,!1,g)},...h!==void 0&&{toolConfig:{functionCallingConfig:{mode:h}}}};if(t.thinking?.enabled&&e.reasoning){let f={includeThoughts:!0};if(t.thinking.level!==void 0)f.thinkingLevel=ar(t.thinking.level);else if(t.thinking.budgetTokens!==void 0)f.thinkingBudget=t.thinking.budgetTokens;p.thinkingConfig=f}else if(e.reasoning&&t.thinking&&!t.thinking.enabled)p.thinkingConfig=Lr(e);if(t.signal){if(t.signal.aborted)throw Error("Request aborted");p.abortSignal=t.signal}return{model:e.id,contents:i,config:p}}function D(e,o,t){if(t?.[o]!==void 0)return t[o];if(e.id.includes("2.5-pro"))return{minimal:128,low:2048,medium:8192,high:32768}[o];if(e.id.includes("2.5-flash"))return{minimal:128,low:2048,medium:8192,high:24576}[o];return-1}export{C as stream,ae as streamSimple};
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
// @bun
|
|
2
2
|
import{a,r}from"./chunk-zkjnt298.js";var R=r(function(U){Object.defineProperty(U,"__esModule",{value:!0});U.Allow=U.ALL=U.COLLECTION=U.ATOM=U.SPECIAL=U.INF=U._INFINITY=U.INFINITY=U.NAN=U.BOOL=U.NULL=U.OBJ=U.ARR=U.NUM=U.STR=void 0;U.STR=1;U.NUM=2;U.ARR=4;U.OBJ=8;U.NULL=16;U.BOOL=32;U.NAN=64;U.INFINITY=128;U._INFINITY=256;U.INF=U.INFINITY|U._INFINITY;U.SPECIAL=U.NULL|U.BOOL|U.INF|U.NAN;U.ATOM=U.STR|U.NUM|U.SPECIAL;U.COLLECTION=U.ARR|U.OBJ;U.ALL=U.ATOM|U.COLLECTION;U.Allow={STR:U.STR,NUM:U.NUM,ARR:U.ARR,OBJ:U.OBJ,NULL:U.NULL,BOOL:U.BOOL,NAN:U.NAN,INFINITY:U.INFINITY,_INFINITY:U._INFINITY,INF:U.INF,SPECIAL:U.SPECIAL,ATOM:U.ATOM,COLLECTION:U.COLLECTION,ALL:U.ALL};U.default=U.Allow});var v=r(function(o){var G=o&&o.__createBinding||(Object.create?function(t,s,i,e){if(e===void 0)e=i;var n=Object.getOwnPropertyDescriptor(s,i);if(!n||("get"in n?!s.__esModule:n.writable||n.configurable))n={enumerable:!0,get:function(){return s[i]}};Object.defineProperty(t,e,n)}:function(t,s,i,e){if(e===void 0)e=i;t[e]=s[i]}),H=o&&o.__exportStar||function(t,s){for(var i in t)if(i!=="default"&&!Object.prototype.hasOwnProperty.call(s,i))G(s,t,i)};Object.defineProperty(o,"__esModule",{value:!0});o.Allow=o.MalformedJSON=o.PartialJSON=o.parseJSON=o.parse=void 0;var u=R();Object.defineProperty(o,"Allow",{enumerable:!0,get:function(){return u.Allow}});H(R(),o);class B extends Error{}o.PartialJSON=B;class F extends Error{}o.MalformedJSON=F;function Y(t,s=u.Allow.ALL){if(typeof t!=="string")throw TypeError(`expecting str, got ${typeof t}`);if(!t.trim())throw Error(`${t} is empty`);return K(t.trim(),s)}o.parseJSON=Y;var K=(t,s)=>{let i=t.length,e=0,n=(c)=>{throw new B(`${c} at position ${e}`)},p=(c)=>{throw new F(`${c} at position ${e}`)},l=()=>{if(O(),e>=i)n("Unexpected end of input");if(t[e]==='"')return M();if(t[e]==="{")return W();if(t[e]==="[")return D();if(t.substring(e,e+4)==="null"||u.Allow.NULL&s&&i-e<4&&"null".startsWith(t.substring(e)))return e+=4,null;if(t.substring(e,e+4)==="true"||u.Allow.BOOL&s&&i-e<4&&"true".startsWith(t.substring(e)))return e+=4,!0;if(t.substring(e,e+5)==="false"||u.Allow.BOOL&s&&i-e<5&&"false".startsWith(t.substring(e)))return e+=5,!1;if(t.substring(e,e+8)==="Infinity"||u.Allow.INFINITY&s&&i-e<8&&"Infinity".startsWith(t.substring(e)))return e+=8,1/0;if(t.substring(e,e+9)==="-Infinity"||u.Allow._INFINITY&s&&1<i-e&&i-e<9&&"-Infinity".startsWith(t.substring(e)))return e+=9,-1/0;if(t.substring(e,e+3)==="NaN"||u.Allow.NAN&s&&i-e<3&&"NaN".startsWith(t.substring(e)))return e+=3,NaN;return q()},M=()=>{let c=e,f=!1;e++;while(e<i&&(t[e]!=='"'||f&&t[e-1]==="\\"))f=t[e]==="\\"?!f:!1,e++;if(t.charAt(e)=='"')try{return JSON.parse(t.substring(c,++e-Number(f)))}catch(N){p(String(N))}else if(u.Allow.STR&s)try{return JSON.parse(t.substring(c,e-Number(f))+'"')}catch(N){return JSON.parse(t.substring(c,t.lastIndexOf("\\"))+'"')}n("Unterminated string literal")},W=()=>{e++,O();let c={};try{while(t[e]!=="}"){if(O(),e>=i&&u.Allow.OBJ&s)return c;let f=M();O(),e++;try{let N=l();c[f]=N}catch(N){if(u.Allow.OBJ&s)return c;else throw N}if(O(),t[e]===",")e++}}catch(f){if(u.Allow.OBJ&s)return c;else n("Expected '}' at end of object")}return e++,c},D=()=>{e++;let c=[];try{while(t[e]!=="]")if(c.push(l()),O(),t[e]===",")e++}catch(f){if(u.Allow.ARR&s)return c;n("Expected ']' at end of array")}return e++,c},q=()=>{if(e===0){if(t==="-")p("Not sure what '-' is");try{return JSON.parse(t)}catch(f){if(u.Allow.NUM&s)try{return JSON.parse(t.substring(0,t.lastIndexOf("e")))}catch(N){}p(String(f))}}let c=e;if(t[e]==="-")e++;while(t[e]&&",]}".indexOf(t[e])===-1)e++;if(e==i&&!(u.Allow.NUM&s))n("Unterminated number literal");try{return JSON.parse(t.substring(c,e))}catch(f){if(t.substring(c,e)==="-")n("Not sure what '-' is");try{return JSON.parse(t.substring(c,t.lastIndexOf("e")))}catch(N){p(String(N))}}},O=()=>{while(e<i&&`
|
|
3
3
|
\r `.includes(t[e]))e++};return l()},Q=Y;o.parse=Q});var P=a(v(),1),X=new Set(['"',"\\","/","b","f","n","r","t","u"]);function Z(t){let s=t.codePointAt(0);return s!==void 0&&s>=0&&s<=31}function S(t){switch(t){case"\b":return"\\b";case"\f":return"\\f";case`
|
|
4
|
-
`:return"\\n";case"\r":return"\\r";case"\t":return"\\t";default:return`\\u${t.codePointAt(0)?.toString(16).padStart(4,"0")??"0000"}`}}function
|
|
5
|
-
export{
|
|
4
|
+
`:return"\\n";case"\r":return"\\r";case"\t":return"\\t";default:return`\\u${t.codePointAt(0)?.toString(16).padStart(4,"0")??"0000"}`}}function ai(t){let s="",i=!1;for(let e=0;e<t.length;e++){let n=t[e];if(!i){if(s+=n,n==='"')i=!0;continue}if(n==='"'){s+=n,i=!1;continue}if(n==="\\"){let p=t[e+1];if(p===void 0){s+="\\\\";continue}if(p==="u"){let l=t.slice(e+2,e+6);if(/^[0-9a-fA-F]{4}$/.test(l)){s+=`\\u${l}`,e+=5;continue}}if(X.has(p)){s+=`\\${p}`,e+=1;continue}s+="\\\\";continue}s+=Z(n)?S(n):n}return s}function vn(t){try{return JSON.parse(t)}catch(s){let i=ai(t);if(i!==t)return JSON.parse(i);throw s}}function z(t){if(!t||t.trim()==="")return{};try{return vn(t)}catch{try{return P.parse(t)??{}}catch{try{return P.parse(ai(t))??{}}catch{return{}}}}}
|
|
5
|
+
export{ai,vn,z};
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
// @bun
|
|
2
|
-
import{
|
|
3
|
-
${a}`;s.push({type:"error",reason:r.stopReason,error:r}),s.end()}})(),s},mt=(e,n,t)=>{ie(e.provider,t?.apiKey,t?.headers);let s={...Y(e,n,t,t?.apiKey),toolChoice:t?.toolChoice},u=t?.reasoning?K(e,t.reasoning):void 0;return be(e,n,{...s,reasoningEffort:u==="off"?void 0:u,thinkingBudgets:t?.thinkingBudgets})};function Pe(e,n,t,s,u,r,k=G(e)){let g={"User-Agent":se(),...e.headers};if(e.provider==="github-copilot"){let R=Ct(n.messages),a=It({messages:n.messages,hasImages:R});Object.assign(g,a)}if(r&&k.sendSessionAffinityHeaders)if(k.sessionAffinityFormat==="openrouter")g["x-session-id"]=r;else{if(k.sessionAffinityFormat==="openai")g.session_id=r;g["x-client-request-id"]=r,g["x-session-affinity"]=r}if(s)Object.assign(g,s);return new
|
|
2
|
+
import{w}from"./chunk-86vhsd3y.js";import{z}from"./chunk-pzwaz2ew.js";import{E}from"./chunk-rx812nrp.js";import{et}from"./chunk-4fbj3k59.js";import{lt}from"./chunk-w3skxmvx.js";import{Ct,It}from"./chunk-cr0tqn6j.js";import{se}from"./chunk-keq5kv9b.js";import{pe}from"./chunk-fj56fznw.js";import{V,X}from"./chunk-e2m8ap8f.js";import{Se,on,sn,he,hr,Re,bt,Y,zo,jo,we}from"./chunk-38932kzp.js";import{x}from"./chunk-chfzk1fx.js";import{J}from"./chunk-0b2brwjc.js";import{W,q,Be,ae,_e,Ae,ee,K}from"./chunk-hk5p2eee.js";function Q(e,n){if(!e)return!1;let t=n.toLowerCase();for(let[s,u]of Object.entries(e))if(s.toLowerCase()===t&&u!==null&&u.trim().length>0)return!0;return!1}function ie(e,n,t){if(n)return n;if(Q(t,"authorization")||Q(t,"cf-aig-authorization"))return"unused";throw Error(`No API key for provider: ${e}`)}function ye(e){for(let n of e){if(n.role==="toolResult")return!0;if(n.role==="assistant"){if(n.content.some((t)=>t.type==="toolCall"))return!0}}return!1}function te(e){return e.type==="text"}function ke(e){return e.type==="thinking"}function Te(e){return e.type==="toolCall"}function xe(e){return e.type==="image"}function ve(e){return typeof e==="object"&&e!==null&&!Array.isArray(e)}function Ce(e){return(e.id===void 0||e.id===null||typeof e.id==="string")&&(e.format===void 0||typeof e.format==="string")&&(e.index===void 0||typeof e.index==="number")}function j(e){if(!ve(e)||!Ce(e))return!1;switch(e.type){case"reasoning.summary":return typeof e.summary==="string";case"reasoning.encrypted":return typeof e.data==="string";case"reasoning.text":return typeof e.text==="string"&&(e.signature===void 0||e.signature===null||typeof e.signature==="string");default:return!1}}function Me(e){if(!e)return;try{let n=JSON.parse(e);return Array.isArray(n)&&n.length>0&&n.every(j)?n:void 0}catch{return}}function Ie(e){if(!e)return;try{let n=JSON.parse(e);return j(n)&&n.type==="reasoning.encrypted"&&typeof n.id==="string"&&n.id.length>0&&n.data.length>0?n:void 0}catch{return}}function ne(e,n){e.id??=n.id,e.format||=n.format,e.index??=n.index}function Ee(e,n){let t=e[e.length-1];if(n.type==="reasoning.text"&&t?.type==="reasoning.text"){t.text+=n.text,t.signature||=n.signature,ne(t,n);return}if(n.type==="reasoning.summary"&&t?.type==="reasoning.summary"){t.summary+=n.summary,ne(t,n);return}e.push({...n})}var Fe=["reasoning","reasoning_content","reasoning_text"];function Oe(e){return Fe.includes(e)}function ue(e,n){if(e)return e;if(E("PI_CACHE_RETENTION",n)==="long")return"long";return"short"}var be=(e,n,t)=>{let s=new W,u=ae(n,G(e).supportsMidConvoSystemMessages);return(async()=>{let r={role:"assistant",content:[],api:e.api,provider:e.provider,model:e.id,usage:{input:0,output:0,cacheRead:0,cacheWrite:0,totalTokens:0,cost:{input:0,output:0,cacheRead:0,cacheWrite:0,total:0}},stopReason:"pending",timestamp:Date.now()},k,g=(R)=>{if(k!==void 0)R.thinkingSignature=JSON.stringify(k)};try{let R=ie(e.provider,t?.apiKey,t?.headers),a=G(e),T=Re(_e(u.messages),a.supportsOpenAIGrammarTools),p=ue(t?.cacheRetention,t?.env),d=p==="none"?void 0:t?.sessionId,o=Pe(e,u,R,t?.headers,t?.fetch,d,a),f=Le(e,u,t,a,p,T),h=await t?.onPayload?.(f,e);if(h!==void 0)f=h;let C={...t?.signal?{signal:t.signal}:{},...t?.timeoutMs!==void 0?{timeout:t.timeoutMs}:{},maxRetries:0},{data:M,response:P}=await pe(()=>o.chat.completions.create(f,C).withResponse(),{maxRetries:t?.maxRetries,maxRetryDelayMs:t?.maxRetryDelayMs,signal:t?.signal});await t?.onResponse?.({status:P.status,headers:J(P.headers)},e),s.push({type:"start",partial:r});let O=null,F=null,A=!1,b=new Map,L=new Map,l=r.content,I=(i)=>l.indexOf(i),H=(i)=>{let c=i.customInput?.property;if(c===void 0)return"";let _=i.arguments[c];return typeof _==="string"?_:""},U=(i,c,_)=>{let m=i.customInput;if(!m)return;let S=sn(m.jsonBuffer,m.property,c,_);return i.arguments={[m.property]:c},S},ce=(i)=>{let c=I(i);if(c===-1)return;if(i.type==="text")s.push({type:"text_end",contentIndex:c,content:i.text,partial:r});else if(i.type==="thinking")g(i),s.push({type:"thinking_end",contentIndex:c,content:i.thinking,partial:r});else if(i.type==="toolCall"){if(i.customInput){let _=U(i,H(i),!0);if(_!==void 0)s.push({type:"toolcall_delta",contentIndex:c,delta:_,partial:r})}else i.arguments=z(i.partialArgs);delete i.partialArgs,delete i.customInput,delete i.streamIndex,s.push({type:"toolcall_end",contentIndex:c,toolCall:i,partial:r})}},ge=()=>{if(!O)O={type:"text",text:""},l.push(O),s.push({type:"text_start",contentIndex:I(O),partial:r});return O},Z=(i)=>{if(!F)F={type:"thinking",thinking:"",thinkingSignature:i},l.push(F),s.push({type:"thinking_start",contentIndex:I(F),partial:r});return F},de=(i)=>{let c=typeof i.index==="number"?i.index:void 0,_=i.function?.name??i.custom?.name??"",m=c!==void 0?b.get(c):void 0;if(!m&&i.id)m=L.get(i.id);if(!m){let S=i.custom&&!i.function?T.get(_)??"input":void 0,B=S!==void 0;if(m={type:"toolCall",id:i.id||"",name:_,arguments:B?{[S]:""}:{},partialArgs:B?void 0:"",customInput:B?{property:S,jsonBuffer:{input:"",started:!1,closed:!1}}:void 0,streamIndex:c},c!==void 0)b.set(c,m);if(i.id)L.set(i.id,m);l.push(m),s.push({type:"toolcall_start",contentIndex:I(m),partial:r})}if(c!==void 0&&m.streamIndex===void 0)m.streamIndex=c,b.set(c,m);if(i.id)L.set(i.id,m);if(!m.name&&_)m.name=_;if(i.custom&&!i.function&&!m.customInput){let S=T.get(m.name)??"input";m.arguments={[S]:""},m.customInput={property:S,jsonBuffer:{input:"",started:!1,closed:!1}},delete m.partialArgs}return m};for await(let i of M){if(await t?.onProviderStreamEvent?.(i,e),!i||typeof i!=="object")continue;if(r.responseId||=i.id,typeof i.model==="string"&&i.model.length>0&&i.model!==e.id)r.responseModel||=i.model;if(i.usage)r.usage=oe(i.usage,e);let c=Array.isArray(i.choices)?i.choices[0]:void 0;if(!c)continue;if(!i.usage&&c.usage)r.usage=oe(c.usage,e);if(c.finish_reason){r.rawStopReason=c.finish_reason;let _=Je(c.finish_reason);if(r.stopReason=_.stopReason,_.errorMessage)r.errorMessage=_.errorMessage;A=!0}if(c.delta){if(c.delta.content!==null&&c.delta.content!==void 0&&c.delta.content.length>0){let y=ge();y.text+=c.delta.content,s.push({type:"text_delta",contentIndex:I(y),delta:c.delta.content,partial:r})}let _=["reasoning_content","reasoning","reasoning_text"],m=c.delta,S=null;for(let y of _){let v=m[y];if(typeof v==="string"&&v.length>0){S=y;break}}if(S){let y=m[S];if(typeof y==="string"&&y.length>0){let v=e.provider==="opencode-go"&&S==="reasoning"?"reasoning_content":S,D=Z(v);D.thinking+=y,s.push({type:"thinking_delta",contentIndex:I(D),delta:y,partial:r})}}if(c?.delta?.tool_calls)for(let y of c.delta.tool_calls){let v=de(y);if(!v.id&&y.id)v.id=y.id,L.set(y.id,v);let D=y.function?.name??y.custom?.name;if(!v.name&&D)v.name=D;let N="";if(y.function?.arguments)N=y.function.arguments,v.partialArgs=(v.partialArgs??"")+y.function.arguments,v.arguments=z(v.partialArgs);else if(y.custom?.input){let me=H(v)+y.custom.input;N=U(v,me,!1)??""}s.push({type:"toolcall_delta",contentIndex:I(v),delta:N,partial:r})}let B=c.delta.reasoning_details;if(Array.isArray(B))for(let y of B){if(!j(y))continue;Z(""),k??=[],Ee(k,y)}}}for(let i of l)ce(i);if(t?.signal?.aborted)throw Error("Request was aborted");if(r.stopReason==="aborted")throw Error("Request was aborted");if(!A&&!a.supportsFinishReason)r.stopReason=r.content.some((i)=>i.type==="toolCall")?"toolUse":"stop";if(r.stopReason==="error")throw Error(r.errorMessage||"Provider returned an error stop reason");if(a.supportsFinishReason&&!A||r.stopReason==="pending")throw Error("Stream ended without finish_reason");s.push({type:"done",reason:r.stopReason,message:r}),s.end()}catch(R){for(let T of r.content){if(T.type==="thinking")g(T);delete T.index,delete T.partialArgs,delete T.customInput,delete T.streamIndex}r.stopReason=t?.signal?.aborted?"aborted":"error",r.errorMessage=X(V(R));let a=R?.error?.metadata?.raw;if(a&&!r.errorMessage.includes(String(a)))r.errorMessage+=`
|
|
3
|
+
${a}`;s.push({type:"error",reason:r.stopReason,error:r}),s.end()}})(),s},mt=(e,n,t)=>{ie(e.provider,t?.apiKey,t?.headers);let s={...Y(e,n,t,t?.apiKey),toolChoice:t?.toolChoice},u=t?.reasoning?K(e,t.reasoning):void 0;return be(e,n,{...s,reasoningEffort:u==="off"?void 0:u,thinkingBudgets:t?.thinkingBudgets})};function Pe(e,n,t,s,u,r,k=G(e)){let g={"User-Agent":se(),...e.headers};if(e.provider==="github-copilot"){let R=Ct(n.messages),a=It({messages:n.messages,hasImages:R});Object.assign(g,a)}if(r&&k.sendSessionAffinityHeaders)if(k.sessionAffinityFormat==="openrouter")g["x-session-id"]=r;else{if(k.sessionAffinityFormat==="openai")g.session_id=r;g["x-client-request-id"]=r,g["x-session-affinity"]=r}if(s)Object.assign(g,s);return new w({apiKey:t,baseURL:e.baseUrl,dangerouslyAllowBrowser:!0,fetch:u,defaultHeaders:g})}function Le(e,n,t,s=G(e),u=ue(t?.cacheRetention,t?.env),r=Re(_e(n.messages),s.supportsOpenAIGrammarTools)){let k=Ae(n.messages,s.supportsMidConvoSystemMessages===!0&&s.supportsMidConvoToolAdditions===!0),g=We(e,n,s,{grammarToolInputProperties:r}),R=Ge(s,u),a={model:e.id,messages:g,stream:!0,prompt_cache_key:e.baseUrl.includes("api.openai.com")&&u!=="none"||u==="long"&&s.supportsLongCacheRetention?et(t?.sessionId):void 0,prompt_cache_retention:u==="long"&&s.supportsLongCacheRetention?"24h":void 0};if(s.supportsUsageInStreaming!==!1)a.stream_options={include_usage:!0};if(s.supportsStore)a.store=!1;if(t?.maxTokens)if(s.maxTokensField==="max_tokens")a.max_tokens=t.maxTokens;else a.max_completion_tokens=t.maxTokens;if(t?.temperature!==void 0)a.temperature=t.temperature;if(k.requestTools.length>0){if(a.tools=le(k.requestTools,s),s.zaiToolStream)a.tool_stream=!0}else if(ye(n.messages))a.tools=[];if(R)Ne(g,a.tools,R);if(t?.toolChoice)a.tool_choice=t.toolChoice;if(s.vllmPriority!==void 0)a.priority=s.vllmPriority;let T=qe(s),p=De(e,t,a);if(s.thinkingFormat==="zai"&&e.reasoning){let o=a;if(o.thinking=t?.reasoningEffort?{type:"enabled",clear_thinking:!1}:{type:"disabled"},t?.reasoningEffort&&s.supportsReasoningEffort){let f=e.thinkingLevelMap?.[t.reasoningEffort],h=f===void 0?t.reasoningEffort:f;if(typeof h==="string")o.reasoning_effort=h}}else if(s.thinkingFormat==="qwen"&&e.reasoning){if(a.enable_thinking=!!t?.reasoningEffort,t?.reasoningEffort&&s.supportsReasoningEffort){let o=e.thinkingLevelMap?.[t.reasoningEffort]??t.reasoningEffort;if(typeof o==="string")a.reasoning_effort=o}}else if(s.thinkingFormat==="qwen-chat-template"&&e.reasoning)a.chat_template_kwargs={enable_thinking:!!t?.reasoningEffort,preserve_thinking:!0};else if(s.thinkingFormat==="chat-template"&&e.reasoning){let o=re(e,t,s.chatTemplateKwargs,p);if(o)a.chat_template_kwargs=o}else if(s.thinkingFormat==="baseten"&&e.reasoning){let o=a,f=re(e,t,s.chatTemplateArgs,p);if(f)o.chat_template_args=f;if(s.supportsReasoningEffort){let h=t?.reasoningEffort,C=h?e.thinkingLevelMap?.[h]:e.thinkingLevelMap?.off,M=C===void 0?h:C;if(typeof M==="string")o.reasoning_effort=M}}else if(s.thinkingFormat==="deepseek"&&e.reasoning){if(t?.reasoningEffort)a.thinking={type:"enabled"};else if(e.thinkingLevelMap?.off!==null)a.thinking={type:"disabled"};if(t?.reasoningEffort&&s.supportsReasoningEffort)a.reasoning_effort=e.thinkingLevelMap?.[t.reasoningEffort]??t.reasoningEffort}else if(s.thinkingFormat==="openrouter"&&e.reasoning){let o=a;if(t?.reasoningEffort)o.reasoning={effort:e.thinkingLevelMap?.[t.reasoningEffort]??t.reasoningEffort};else if(e.thinkingLevelMap?.off!==null)o.reasoning={effort:e.thinkingLevelMap?.off??"none"}}else if(s.thinkingFormat==="ant-ling"&&e.reasoning&&t?.reasoningEffort){let o=e.thinkingLevelMap?.[t.reasoningEffort];if(typeof o==="string")a.reasoning={effort:o}}else if(s.thinkingFormat==="together"&&e.reasoning){let o=a;if(o.reasoning={enabled:!!t?.reasoningEffort},t?.reasoningEffort&&s.supportsReasoningEffort)o.reasoning_effort=e.thinkingLevelMap?.[t.reasoningEffort]??t.reasoningEffort}else if(s.thinkingFormat==="string-thinking"&&e.reasoning){let o=a;if(t?.reasoningEffort)o.thinking=e.thinkingLevelMap?.[t.reasoningEffort]??t.reasoningEffort;else if(e.thinkingLevelMap?.off!==null)o.thinking=e.thinkingLevelMap?.off??"none"}else if(t?.reasoningEffort&&e.reasoning&&s.supportsReasoningEffort)a.reasoning_effort=e.thinkingLevelMap?.[t.reasoningEffort]??t.reasoningEffort;else if(!t?.reasoningEffort&&e.reasoning&&s.supportsReasoningEffort){let o=e.thinkingLevelMap?.off;if(typeof o==="string")a.reasoning_effort=o}if(T&&p!==void 0)Object.assign(a,{[T]:p});if(e.compat?.openRouterRouting)a.provider=e.compat.openRouterRouting;if(e.compat?.vercelGatewayRouting){let o=e.compat.vercelGatewayRouting;if(o.only||o.order){let f={};if(o.only)f.only=o.only;if(o.order)f.order=o.order;a.providerOptions={gateway:f}}}let d=bt(e,t?.reasoningEffort??"off",t?.samplingParams);if(d)Object.assign(a,d);return a}function qe(e){if(e.thinkingTokenBudgetField)return e.thinkingTokenBudgetField;if(e.supportsThinkingTokenBudget)return"thinking_token_budget";return}function De(e,n,t){if(!n?.reasoningEffort||!e.reasoning)return;let s=t.max_tokens??t.max_completion_tokens??e.maxTokens,u=jo(zo(n.reasoningEffort,n.thinkingBudgets),s);return u>0?u:void 0}function re(e,n,t,s){let u={};for(let[r,k]of Object.entries(t)){let g=ze(e,n,k,s);if(g!==void 0)u[r]=g}return Object.keys(u).length>0?u:void 0}function ze(e,n,t,s){if(typeof t!=="object"||t===null)return t;let u=n?.reasoningEffort;if(!u&&t.omitWhenOff)return;if(t.$var==="thinking.enabled")return!!u;if(t.$var==="thinking.budget")return s;let r=u?e.thinkingLevelMap?.[u]:e.thinkingLevelMap?.off;return r===void 0?u:typeof r==="string"?r:void 0}function Ge(e,n){if(e.cacheControlFormat!=="anthropic"||n==="none")return;let t=n==="long"&&e.supportsLongCacheRetention?"1h":void 0;return{type:"ephemeral",...t?{ttl:t}:{}}}function Ne(e,n,t){je(e,t),Ke(n,t),$e(e,t)}function je(e,n){for(let t of e)if(t.role==="system"||t.role==="developer"){He(t,n);return}}function $e(e,n){for(let t=e.length-1;t>=0;t--){let s=e[t];if(s.role==="user"||s.role==="assistant"||s.role==="tool"){if(Ue(s,n))return}}}function Ke(e,n){if(!e||e.length===0)return;let t=e[e.length-1];t.cache_control=n}function He(e,n){return fe(e,n)}function Ue(e,n){if(e.role==="user"||e.role==="assistant"||e.role==="tool")return fe(e,n);return!1}function fe(e,n){let t=e.content;if(typeof t==="string"){if(t.length===0)return!1;return e.content=[{type:"text",text:t,cache_control:n}],!0}if(!Array.isArray(t))return!1;for(let s=t.length-1;s>=0;s--){let u=t[s];if(u?.type==="text"){let r=u;return r.cache_control=n,!0}}return!1}function We(e,n,t,s){let u=ae(n,t.supportsMidConvoSystemMessages),r=[],k=(p)=>{if(p.includes("|")){let d=p.indexOf("|"),o=p.slice(0,d).replace(/[^a-zA-Z0-9_-]/g,"_"),f=p.slice(d+1).replace(/[^a-zA-Z0-9_-]/g,"_"),h=f.length>0?`${o}_${f}`:o;if(h.length<=40)return h;let C=lt(p).slice(0,8);return`${o.slice(0,Math.max(1,40-C.length-1))}_${C}`}if(e.provider==="openai")return p.length>40?p.slice(0,40):p;return p},g=we(u.messages,e,(p)=>k(p)),R=Ae(u.messages,t.supportsMidConvoSystemMessages===!0&&t.supportsMidConvoToolAdditions===!0),a=e.reasoning&&t.supportsDeveloperRole?"developer":"system",T=null;for(let p=0;p<g.length;p++){let d=g[p];if(t.requiresAssistantAfterToolResult&&T==="toolResult"&&d.role==="user")r.push({role:"assistant",content:"I have processed the tool results."});if(d.role==="system"){let o=p>0&&R.anchorsAdditions?d.toolsAdded??[]:[];if(o.length>0){let h={role:"system",tools:le(o,t)};r.push(h)}let f=p===0?q(d):Be(d);if(f.length>0)r.push({role:a,content:x(f)})}else if(d.role==="user")if(typeof d.content==="string")r.push({role:"user",content:x(d.content)});else{let o=d.content.filter((f)=>f.type!=="text"||f.text.length>0).map((f)=>{if(f.type==="text")return{type:"text",text:x(f.text)};else return{type:"image_url",image_url:{url:`data:${f.mimeType};base64,${f.data}`}}});if(o.length===0)continue;r.push({role:"user",content:o})}else if(d.role==="assistant"){let o={role:"assistant",content:t.requiresAssistantAfterToolResult?"":null},f=d.content.filter(te).filter((l)=>l.text.trim().length>0).map((l)=>({type:"text",text:x(l.text)})),h=f.map((l)=>l.text).join(""),C=d.content.filter(ke),M=d.content.filter(Te),P=C.map((l)=>Me(l.thinkingSignature)).find((l)=>l!==void 0),O=M.map((l)=>Ie(l.thoughtSignature)).filter((l)=>l!==void 0),F=P??(O.length>0?O:void 0),A=C.filter((l)=>l.thinking.trim().length>0);if(A.length>0)if(t.requiresThinkingAsText){let l=A.map((I)=>x(I.thinking)).join(`
|
|
4
4
|
|
|
5
|
-
`);o.content=[{type:"text",text:l},...f]}else{if(h.length>0)o.content=h;if(!F){let l=
|
|
6
|
-
`)}}else if(h.length>0)o.content=h;if(
|
|
7
|
-
`),
|
|
5
|
+
`);o.content=[{type:"text",text:l},...f]}else{if(h.length>0)o.content=h;if(!F){let l=A[0].thinkingSignature;if(e.provider==="opencode-go"&&l==="reasoning")l="reasoning_content";if(l&&Oe(l))o[l]=A.map((I)=>I.thinking).join(`
|
|
6
|
+
`)}}else if(h.length>0)o.content=h;if(M.length>0)o.tool_calls=M.map((l)=>{let I=s?.grammarToolInputProperties?.get(l.name);if(I!==void 0)return{id:l.id,type:"custom",custom:{name:l.name,input:x(on(l.name,l.arguments,I))}};return{id:l.id,type:"function",function:{name:l.name,arguments:JSON.stringify(l.arguments)}}});if(F)o.reasoning_details=F;if(t.requiresReasoningContentOnAssistantMessages&&e.reasoning&&o.reasoning_content===void 0)o.reasoning_content="";let b=o.content;if(!(b!==null&&b!==void 0&&(typeof b==="string"?b.length>0:b.length>0))&&!o.tool_calls)continue;r.push(o)}else if(d.role==="toolResult"){let o=[],f=p;for(;f<g.length&&g[f].role==="toolResult";f++){let h=g[f],C=h.content.filter(te).map((A)=>A.text).join(`
|
|
7
|
+
`),M=h.content.some((A)=>A.type==="image"),O=C.length>0?C:M?"(see attached image)":"(no tool output)",F={role:"tool",content:x(O),tool_call_id:h.toolCallId};if(t.requiresToolResultName&&h.toolName)F.name=h.toolName;if(r.push(F),M&&e.input.includes("image")){for(let A of h.content)if(xe(A))o.push({type:"image_url",image_url:{url:`data:${A.mimeType};base64,${A.data}`}})}}if(p=f-1,o.length>0){if(t.requiresAssistantAfterToolResult)r.push({role:"assistant",content:"I have processed the tool results."});r.push({role:"user",content:[{type:"text",text:"Attached image(s) from tool result:"},...o]}),T="user"}else T="toolResult";continue}T=d.role}return r}function le(e,n){return e.map((t)=>{let s=hr(t,n.supportsOpenAIGrammarTools);if(s)return{type:"custom",custom:{name:t.name,description:t.description,format:{type:"grammar",grammar:{syntax:s.format,definition:s.definition}}}};let u=he(t,n.supportsStrictMode!==!1);return{type:"function",function:{name:t.name,description:t.description,parameters:Se(t,u),...n.supportsStrictMode!==!1&&{strict:u??!1}}}})}function oe(e,n){let t=e.prompt_tokens||0,s=e.prompt_tokens_details?.cached_tokens??e.prompt_cache_hit_tokens??e.cached_tokens??0,u=e.prompt_tokens_details?.cache_write_tokens||0,r=Math.max(0,t-s-u),k=e.completion_tokens||0,g={input:r,output:k,cacheRead:s,cacheWrite:u,reasoning:e.completion_tokens_details?.reasoning_tokens||0,totalTokens:r+k+s+u,cost:{input:0,output:0,cacheRead:0,cacheWrite:0,total:0}};return ee(n,g),g}function Je(e){if(e===null)return{stopReason:"stop"};switch(e){case"stop":case"end":return{stopReason:"stop"};case"length":return{stopReason:"length"};case"function_call":case"tool_calls":return{stopReason:"toolUse"};case"content_filter":return{stopReason:"error",errorMessage:"Provider finish_reason: content_filter"};case"network_error":return{stopReason:"error",errorMessage:"Provider finish_reason: network_error"};default:return{stopReason:"error",errorMessage:`Provider finish_reason: ${e}`}}}function Ve(e){let{provider:n,baseUrl:t}=e,s=n==="zai"||n==="zai-coding-cn"||t.includes("api.z.ai")||t.includes("open.bigmodel.cn"),u=n==="together"||t.includes("api.together.ai")||t.includes("api.together.xyz"),r=n==="moonshotai"||n==="moonshotai-cn"||t.includes("api.moonshot."),k=n==="openrouter"||t.includes("openrouter.ai"),g=n==="cloudflare-workers-ai"||t.includes("api.cloudflare.com"),R=n==="cloudflare-ai-gateway"||t.includes("gateway.ai.cloudflare.com"),a=n==="nvidia"||t.includes("integrate.api.nvidia.com"),T=n==="ant-ling"||t.includes("api.ant-ling.com"),p=n==="cerebras"||t.includes("cerebras.ai"),d=n==="deepseek"||t.toLowerCase().includes("deepseek.com"),o=a||p||n==="xai"||t.includes("api.x.ai")||u||t.includes("chutes.ai")||d||s||r||n==="opencode"||t.includes("opencode.ai")||g||R||T,f=t.includes("chutes.ai")||d||r||R||u||a||T||s,h=n==="xai"||t.includes("api.x.ai"),C=k&&(e.id.startsWith("anthropic/")||e.id.startsWith("openai/")),M=n==="openrouter"&&e.id.startsWith("anthropic/")?"anthropic":void 0;return{supportsStore:!o,supportsDeveloperRole:C||!o&&!k,supportsReasoningEffort:!h&&!s&&!r&&!u&&!R&&!a&&!T,supportsUsageInStreaming:!0,supportsFinishReason:!0,maxTokensField:f?"max_tokens":"max_completion_tokens",requiresToolResultName:!1,requiresAssistantAfterToolResult:!1,requiresThinkingAsText:!1,requiresReasoningContentOnAssistantMessages:d,thinkingFormat:d?"deepseek":s?"zai":u?"together":T?"ant-ling":k?"openrouter":"openai",openRouterRouting:{},vercelGatewayRouting:{},chatTemplateKwargs:{},chatTemplateArgs:{},zaiToolStream:!1,supportsThinkingTokenBudget:!1,thinkingTokenBudgetField:void 0,supportsStrictMode:!1,supportsOpenAIGrammarTools:!1,supportsMidConvoSystemMessages:!1,supportsMidConvoToolAdditions:!1,cacheControlFormat:M,sendSessionAffinityHeaders:k,sessionAffinityFormat:k?"openrouter":"openai",supportsLongCacheRetention:!(u||g||R||a||T)}}function G(e){let n=Ve(e);if(!e.compat)return n;return{supportsStore:e.compat.supportsStore??n.supportsStore,supportsDeveloperRole:e.compat.supportsDeveloperRole??n.supportsDeveloperRole,supportsReasoningEffort:e.compat.supportsReasoningEffort??n.supportsReasoningEffort,supportsUsageInStreaming:e.compat.supportsUsageInStreaming??n.supportsUsageInStreaming,supportsFinishReason:e.compat.supportsFinishReason??n.supportsFinishReason,maxTokensField:e.compat.maxTokensField??n.maxTokensField,requiresToolResultName:e.compat.requiresToolResultName??n.requiresToolResultName,requiresAssistantAfterToolResult:e.compat.requiresAssistantAfterToolResult??n.requiresAssistantAfterToolResult,requiresThinkingAsText:e.compat.requiresThinkingAsText??n.requiresThinkingAsText,requiresReasoningContentOnAssistantMessages:e.compat.requiresReasoningContentOnAssistantMessages??n.requiresReasoningContentOnAssistantMessages,thinkingFormat:e.compat.thinkingFormat??n.thinkingFormat,openRouterRouting:e.compat.openRouterRouting??{},vercelGatewayRouting:e.compat.vercelGatewayRouting??n.vercelGatewayRouting,chatTemplateKwargs:e.compat.chatTemplateKwargs??n.chatTemplateKwargs,chatTemplateArgs:e.compat.chatTemplateArgs??n.chatTemplateArgs,zaiToolStream:e.compat.zaiToolStream??n.zaiToolStream,supportsThinkingTokenBudget:e.compat.supportsThinkingTokenBudget??n.supportsThinkingTokenBudget,thinkingTokenBudgetField:e.compat.thinkingTokenBudgetField??n.thinkingTokenBudgetField,supportsStrictMode:e.compat.supportsStrictMode??n.supportsStrictMode,supportsOpenAIGrammarTools:e.compat.supportsOpenAIGrammarTools??n.supportsOpenAIGrammarTools,supportsMidConvoSystemMessages:e.compat.supportsMidConvoSystemMessages??n.supportsMidConvoSystemMessages,supportsMidConvoToolAdditions:e.compat.supportsMidConvoToolAdditions??n.supportsMidConvoToolAdditions,cacheControlFormat:e.compat.cacheControlFormat??n.cacheControlFormat,sendSessionAffinityHeaders:e.compat.sendSessionAffinityHeaders??n.sendSessionAffinityHeaders,sessionAffinityFormat:e.compat.sessionAffinityFormat??n.sessionAffinityFormat,supportsLongCacheRetention:e.compat.supportsLongCacheRetention??n.supportsLongCacheRetention,vllmPriority:e.compat.vllmPriority}}export{We as convertMessages,be as stream,mt as streamSimple};
|