@qitqode/qitqode-android-arm64 0.1.29 → 0.1.31
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/bundle/{chunk-g06rv5fq.js → chunk-01my2y0c.js} +1 -1
- package/bundle/chunk-04n2ycg5.js +800 -0
- package/bundle/{chunk-k7dcfqjs.js → chunk-05mce0j3.js} +1 -1
- package/bundle/{chunk-3q6650we.js → chunk-0bbs01f0.js} +1 -1
- package/bundle/{chunk-1rn0vmvv.js → chunk-0dt0bxz6.js} +2 -2
- package/bundle/{chunk-x6nbck7p.js → chunk-0mx2psfc.js} +1 -1
- package/bundle/chunk-0p27fvfr.js +2 -0
- package/bundle/chunk-0qs1vx97.js +2 -0
- package/bundle/{chunk-8kz3n8ye.js → chunk-0v0vqbn5.js} +1 -1
- package/bundle/chunk-0w0ctb90.js +2 -0
- package/bundle/chunk-0yt5njh7.js +8 -0
- package/bundle/{chunk-fsy279s5.js → chunk-10bjs581.js} +2 -2
- package/bundle/{chunk-z29fwg61.js → chunk-11x3t2tt.js} +1 -1
- package/bundle/{chunk-qzjpea91.js → chunk-12vef2pr.js} +1 -1
- package/bundle/{chunk-kkae8ead.js → chunk-15hw2z9t.js} +1 -1
- package/bundle/chunk-1f7ajq8s.js +2 -0
- package/bundle/chunk-1fswr17z.js +2 -0
- package/bundle/{chunk-yt2k9ga8.js → chunk-1gx18dm5.js} +1 -1
- package/bundle/chunk-1rhhhm88.js +2 -0
- package/bundle/{chunk-b4qd109w.js → chunk-1sgahe1s.js} +1 -1
- package/bundle/{chunk-74zgcxeg.js → chunk-1vb79bw1.js} +1 -1
- package/bundle/chunk-1wbjh23g.js +2 -0
- package/bundle/chunk-20f83ca0.js +2 -0
- package/bundle/{chunk-ed723mw1.js → chunk-24jg9d61.js} +1 -1
- package/bundle/{chunk-csdm3n24.js → chunk-2hc5z7b5.js} +1 -1
- package/bundle/{chunk-bzrsnv2k.js → chunk-2maqde7w.js} +2 -2
- package/bundle/{chunk-awav98j0.js → chunk-2vn41ecx.js} +1 -1
- package/bundle/{chunk-50w28xj1.js → chunk-2zq4k837.js} +1 -1
- package/bundle/chunk-31mnd3ph.js +3 -0
- package/bundle/{chunk-a2qerqgd.js → chunk-31qrzrwy.js} +1 -1
- package/bundle/{chunk-abtn6nec.js → chunk-326p5b10.js} +2 -2
- package/bundle/{chunk-2p2ch1k2.js → chunk-33e9y2aw.js} +1 -1
- package/bundle/{chunk-asmfntjm.js → chunk-35xk4g91.js} +1 -1
- package/bundle/{chunk-n86s4fw4.js → chunk-3632wgg1.js} +1 -1
- package/bundle/{chunk-tqsx2m1j.js → chunk-3bxg5bta.js} +1 -1
- package/bundle/{chunk-6bsgrr5h.js → chunk-3c6p8tm3.js} +1 -1
- package/bundle/chunk-3h9rq2wq.js +2 -0
- package/bundle/{chunk-7wthn44y.js → chunk-3ytjm3az.js} +1 -1
- package/bundle/{chunk-2mjc44ev.js → chunk-40efytmk.js} +1 -1
- package/bundle/chunk-42p59wm4.js +2 -0
- package/bundle/{chunk-09j71kp6.js → chunk-44a82dg0.js} +4 -4
- package/bundle/chunk-4512pvca.js +2 -0
- package/bundle/chunk-456bmaww.js +2 -0
- package/bundle/{chunk-s6me101a.js → chunk-48ge2ryx.js} +1 -1
- package/bundle/chunk-48pajrnt.js +2 -0
- package/bundle/{chunk-hn1f6rne.js → chunk-4cnwn1rh.js} +2 -2
- package/bundle/chunk-4d87mhwn.js +3 -0
- package/bundle/chunk-4fy9c54h.js +2 -0
- package/bundle/{chunk-43ae3chd.js → chunk-4gkk28xk.js} +2 -2
- package/bundle/{chunk-bsf6n350.js → chunk-4jtxtkj7.js} +2 -2
- package/bundle/{chunk-pq2prhb2.js → chunk-50sv6y2e.js} +1 -1
- package/bundle/chunk-50tb3g5x.js +2 -0
- package/bundle/chunk-52bam8g7.js +2 -0
- package/bundle/{chunk-zqxmr01r.js → chunk-53bqcctj.js} +1 -1
- package/bundle/chunk-53w4zqps.js +2 -0
- package/bundle/chunk-59y8q9m5.js +2 -0
- package/bundle/chunk-5eq1fft9.js +3 -0
- package/bundle/{chunk-8f0g7d7k.js → chunk-5hw6xa49.js} +2 -2
- package/bundle/{chunk-9epjgend.js → chunk-5q4harvc.js} +2 -2
- package/bundle/chunk-5tray1fw.js +3 -0
- package/bundle/{chunk-a2g69pv6.js → chunk-5v0xjs3x.js} +1 -1
- package/bundle/{chunk-ce5t444d.js → chunk-60v5jvgt.js} +1 -1
- package/bundle/chunk-64ezpbwt.js +2 -0
- package/bundle/{chunk-b9hstp7h.js → chunk-68yw2hk9.js} +1 -1
- package/bundle/{chunk-hhgjbag9.js → chunk-69nzndk7.js} +1 -1
- package/bundle/chunk-6bpe215q.js +2 -0
- package/bundle/chunk-6bphjajd.js +2 -0
- package/bundle/{chunk-qredfmch.js → chunk-6d5rrre9.js} +1 -1
- package/bundle/{chunk-mb4wvwfw.js → chunk-6hpgb8h4.js} +3 -3
- package/bundle/{chunk-88dhcv37.js → chunk-6kp07m7p.js} +1 -1
- package/bundle/{chunk-csyw14fj.js → chunk-6phh70sp.js} +1 -1
- package/bundle/chunk-6t1ehq36.js +2 -0
- package/bundle/{chunk-hgbkg85g.js → chunk-70ck4v3t.js} +1 -1
- package/bundle/{chunk-3n49y4kh.js → chunk-71sjjjr8.js} +1 -1
- package/bundle/{chunk-geccvf9d.js → chunk-71xz70r9.js} +1 -1
- package/bundle/{chunk-9kjj44cr.js → chunk-73e409hd.js} +1 -1
- package/bundle/{chunk-1xw68zak.js → chunk-78ymd20x.js} +1 -1
- package/bundle/{chunk-n4gjpgnk.js → chunk-7avcnwv8.js} +1 -1
- package/bundle/{chunk-z8v2tsz2.js → chunk-7hm0c2yg.js} +1 -1
- package/bundle/{chunk-kfgn4apg.js → chunk-7mke41x0.js} +1 -1
- package/bundle/chunk-7pfj4x1a.js +2 -0
- package/bundle/chunk-7ry9cvby.js +2 -0
- package/bundle/chunk-7wczs9mx.js +2 -0
- package/bundle/{chunk-yjj4cvqg.js → chunk-7xm75w1e.js} +1 -1
- package/bundle/{chunk-y212x7ws.js → chunk-7z5jh4ra.js} +1 -1
- package/bundle/{chunk-98vfbn0h.js → chunk-81qwdg5s.js} +1 -1
- package/bundle/{chunk-r4mnbhe1.js → chunk-83gqkmth.js} +1 -1
- package/bundle/chunk-873skv7w.js +2 -0
- package/bundle/{chunk-ndmrg80b.js → chunk-8hytwgwf.js} +1 -1
- package/bundle/{chunk-0wdtbn59.js → chunk-8n20thvd.js} +2 -2
- package/bundle/{chunk-xn61fgrh.js → chunk-8qswepp2.js} +1 -1
- package/bundle/chunk-8v96pmqn.js +2 -0
- package/bundle/chunk-8y2scz6z.js +2 -0
- package/bundle/{chunk-7mc8nxve.js → chunk-8ymffyep.js} +1 -1
- package/bundle/chunk-8zx7vnx6.js +2 -0
- package/bundle/{chunk-8k55xz7z.js → chunk-93p131d5.js} +1 -1
- package/bundle/chunk-94a76f8w.js +2 -0
- package/bundle/{chunk-3h4y7n1a.js → chunk-9emq67vc.js} +1 -1
- package/bundle/{chunk-ypthfv6d.js → chunk-9f1z9xce.js} +1 -1
- package/bundle/chunk-9mjz6e27.js +2 -0
- package/bundle/chunk-9ng7jjp7.js +2 -0
- package/bundle/chunk-9tpgnjy8.js +2 -0
- package/bundle/{chunk-f29n7826.js → chunk-9x5232dw.js} +1 -1
- package/bundle/{chunk-t3tkp1em.js → chunk-a1wdeapb.js} +1 -1
- package/bundle/{chunk-b20xjnpw.js → chunk-a7amey9s.js} +1 -1
- package/bundle/chunk-a7ym9f0v.js +2 -0
- package/bundle/chunk-a8f2xvy3.js +2 -0
- package/bundle/chunk-a99cvwta.js +2 -0
- package/bundle/chunk-abd1cfpg.js +2 -0
- package/bundle/{chunk-yn576pje.js → chunk-ag8kz1e7.js} +2 -2
- package/bundle/chunk-anwnwfjf.js +2 -0
- package/bundle/chunk-avys5mnz.js +2 -0
- package/bundle/chunk-axvjd10y.js +2 -0
- package/bundle/{chunk-4vze3djr.js → chunk-ay8emwym.js} +1 -1
- package/bundle/chunk-b4pphqab.js +2 -0
- package/bundle/chunk-b6087ak4.js +2 -0
- package/bundle/{chunk-qje3683x.js → chunk-b8gjz6bk.js} +1 -1
- package/bundle/chunk-bgw4fvg2.js +2 -0
- package/bundle/{chunk-q0xzbad1.js → chunk-bh53dz71.js} +1 -1
- package/bundle/chunk-brkqxbjy.js +2 -0
- package/bundle/{chunk-j2zay4da.js → chunk-c11d28qn.js} +2 -2
- package/bundle/{chunk-hd2kb05a.js → chunk-c14s0kxq.js} +1 -1
- package/bundle/{chunk-qsszerj7.js → chunk-c1bdzxbx.js} +2 -2
- package/bundle/{chunk-v9xnk9pz.js → chunk-c1vnp55z.js} +1 -1
- package/bundle/chunk-c26qxt5g.js +2 -0
- package/bundle/chunk-c6zscb38.js +2 -0
- package/bundle/{chunk-g0mbbysk.js → chunk-cfgvm15x.js} +1 -1
- package/bundle/{chunk-jntqzhxr.js → chunk-chpr8ekb.js} +1 -1
- package/bundle/chunk-cjww2jmv.js +3 -0
- package/bundle/{chunk-hbtd620x.js → chunk-ck2gfaba.js} +1 -1
- package/bundle/chunk-cmbh77cs.js +7 -0
- package/bundle/{chunk-eqcd9k9p.js → chunk-cnmq5xtq.js} +218 -218
- package/bundle/{chunk-azx0zxnx.js → chunk-cphrgyp6.js} +1 -1
- package/bundle/chunk-csz0dgyp.js +2 -0
- package/bundle/{chunk-fhdpp77n.js → chunk-ctaze2hn.js} +1 -1
- package/bundle/{chunk-n5sh2790.js → chunk-cxnfy6qk.js} +1 -1
- package/bundle/{chunk-yn05n0az.js → chunk-d07p6fpk.js} +2 -2
- package/bundle/{chunk-kw09hbrb.js → chunk-d65qs4d0.js} +1 -1
- package/bundle/{chunk-xk1nh1ay.js → chunk-d68fzyw7.js} +2 -2
- package/bundle/{chunk-6hdjkvr1.js → chunk-d6ry9418.js} +2 -2
- package/bundle/{chunk-zbq60sw6.js → chunk-dactgryw.js} +1 -1
- package/bundle/chunk-dafmkrhn.js +2 -0
- package/bundle/{chunk-qzcfjz9g.js → chunk-db405hjg.js} +1 -1
- package/bundle/chunk-dgprdym0.js +2 -0
- package/bundle/{chunk-v7deh7aj.js → chunk-dnwefyhv.js} +1 -1
- package/bundle/{chunk-scqxmv8k.js → chunk-drvkj3xg.js} +1 -1
- package/bundle/chunk-dryzt12j.js +2 -0
- package/bundle/chunk-dsamees2.js +2 -0
- package/bundle/{chunk-bv8pf0m1.js → chunk-dxpj0cxh.js} +2 -2
- package/bundle/{chunk-nv2r4cns.js → chunk-dynv30gm.js} +1 -1
- package/bundle/chunk-dyqpxx3b.js +2 -0
- package/bundle/{chunk-pg8dz1rq.js → chunk-e01wnqvc.js} +1 -1
- package/bundle/{chunk-z160s5p5.js → chunk-e10py6yr.js} +1 -1
- package/bundle/{chunk-xk7je9y8.js → chunk-e7ny0b3x.js} +1 -1
- package/bundle/{chunk-2w20mhch.js → chunk-eh7e49k4.js} +1 -1
- package/bundle/{chunk-6jewfaqa.js → chunk-ehhas0ew.js} +2 -2
- package/bundle/{chunk-6scqd8fh.js → chunk-ejrhvy38.js} +1 -1
- package/bundle/{chunk-sv48x9h8.js → chunk-enpzvmtc.js} +1 -1
- package/bundle/chunk-excnptfy.js +2 -0
- package/bundle/chunk-ez8vkgfz.js +2 -0
- package/bundle/chunk-f2btnww9.js +2 -0
- package/bundle/chunk-f8eter69.js +5 -0
- package/bundle/{chunk-7926bzm7.js → chunk-fgg9txzb.js} +1 -1
- package/bundle/chunk-fjq3a347.js +2 -0
- package/bundle/{chunk-6528bthc.js → chunk-fn9h4ync.js} +1 -1
- package/bundle/{chunk-m2ny1en7.js → chunk-fq0x3esz.js} +5 -5
- package/bundle/{chunk-h8chkene.js → chunk-fvzwbjh8.js} +1 -1
- package/bundle/chunk-fxdtq2ed.js +2 -0
- package/bundle/{chunk-sbx9z70j.js → chunk-fyqjm5fv.js} +1 -1
- package/bundle/{chunk-t35n89t9.js → chunk-g10d6x57.js} +1 -1
- package/bundle/{chunk-1d9f53sk.js → chunk-g5rabwre.js} +2 -2
- package/bundle/{chunk-4fk4se02.js → chunk-g7ccdh7r.js} +1 -1
- package/bundle/{chunk-0yqbyres.js → chunk-g9cjsfvg.js} +1 -1
- package/bundle/{chunk-yvqbewmc.js → chunk-gagtmjmp.js} +2 -2
- package/bundle/{chunk-4fspp5fg.js → chunk-gb00fh4z.js} +3 -3
- package/bundle/{chunk-44jpsp97.js → chunk-gbpvs0fx.js} +1 -1
- package/bundle/{chunk-v9bmpndq.js → chunk-gbrnn2dk.js} +1 -1
- package/bundle/chunk-gcw4rn10.js +2 -0
- package/bundle/{chunk-j8efst22.js → chunk-gj0wt0cy.js} +1 -1
- package/bundle/{chunk-rptvpa1v.js → chunk-gsar6xda.js} +1 -1
- package/bundle/{chunk-nxn4arcf.js → chunk-gt31468k.js} +1 -1
- package/bundle/{chunk-c19t7e8s.js → chunk-gwp17r03.js} +1 -1
- package/bundle/chunk-gwzw92jt.js +2 -0
- package/bundle/{chunk-z5yrvg40.js → chunk-h2afsbm1.js} +1 -1
- package/bundle/{chunk-d86ma6zk.js → chunk-h4j5xzc8.js} +1 -1
- package/bundle/{chunk-hevb7k95.js → chunk-hbbsbyyq.js} +1 -1
- package/bundle/chunk-hnctaq8s.js +3 -0
- package/bundle/{chunk-g3ch14a1.js → chunk-hnzegjgv.js} +1 -1
- package/bundle/chunk-hp7tssgv.js +2 -0
- package/bundle/chunk-ht0hbdmx.js +2 -0
- package/bundle/{chunk-ekndhwnn.js → chunk-ht5w06x7.js} +2 -2
- package/bundle/{chunk-a8p9aggx.js → chunk-htz93dsd.js} +1 -1
- package/bundle/{chunk-svrxk3vf.js → chunk-jbx3s7nw.js} +2 -2
- package/bundle/chunk-jcjbr3q7.js +2 -0
- package/bundle/{chunk-yyqrbv2f.js → chunk-jef04wyf.js} +1 -1
- package/bundle/{chunk-b1ntb3dh.js → chunk-jh0bw59r.js} +1 -1
- package/bundle/{chunk-b73s2h43.js → chunk-jrqb0jwy.js} +1 -1
- package/bundle/{chunk-3rt2k5sc.js → chunk-js1n8tgv.js} +1 -1
- package/bundle/chunk-jxswwvr3.js +2 -0
- package/bundle/{chunk-0626rvy2.js → chunk-kf167jw7.js} +1 -1
- package/bundle/{chunk-byc7ev8p.js → chunk-kfxv5rfg.js} +1 -1
- package/bundle/{chunk-d0qqgxs4.js → chunk-kj20f048.js} +1 -1
- package/bundle/{chunk-cd867geb.js → chunk-kq6b222y.js} +1 -1
- package/bundle/{chunk-6hmj972a.js → chunk-ktzq4ha1.js} +1 -1
- package/bundle/chunk-m5m448mg.js +3 -0
- package/bundle/{chunk-dfja6dj6.js → chunk-mcg24gkb.js} +1 -1
- package/bundle/chunk-mh0j6dzy.js +2 -0
- package/bundle/{chunk-p7h2qd7z.js → chunk-mk1bfzg5.js} +1 -1
- package/bundle/chunk-mxzceza9.js +2 -0
- package/bundle/{chunk-4vemws1t.js → chunk-mzs2pjyc.js} +2 -2
- package/bundle/chunk-n0dy98h2.js +2 -0
- package/bundle/{chunk-jwtev7b7.js → chunk-n9xns8by.js} +2 -2
- package/bundle/chunk-ngm6pqyt.js +2 -0
- package/bundle/chunk-ngtavamt.js +2 -0
- package/bundle/chunk-nkhc32s3.js +2 -0
- package/bundle/chunk-npse2xrd.js +2 -0
- package/bundle/{chunk-3vmh2ge6.js → chunk-nsk8dkwp.js} +1 -1
- package/bundle/{chunk-1fz0383p.js → chunk-nv3eyyaj.js} +1 -1
- package/bundle/{chunk-az9hsk6z.js → chunk-p18axz0m.js} +1 -1
- package/bundle/{chunk-2p9py4rw.js → chunk-p62gb4wj.js} +1 -1
- package/bundle/chunk-p6e4vqy7.js +2 -0
- package/bundle/{chunk-ktqrbbkh.js → chunk-p9qfbr02.js} +1 -1
- package/bundle/chunk-pctt1qv8.js +14 -0
- package/bundle/{chunk-gd45tjbd.js → chunk-pe29yy6s.js} +1 -1
- package/bundle/chunk-pf9g671w.js +2 -0
- package/bundle/chunk-phv9kdq6.js +3 -0
- package/bundle/{chunk-k095hd3c.js → chunk-pp2eqkse.js} +1 -1
- package/bundle/{chunk-gjvymdhp.js → chunk-pp6vhqrr.js} +1 -1
- package/bundle/chunk-ppjnqexm.js +2 -0
- package/bundle/chunk-pqkjhn8h.js +2 -0
- package/bundle/{chunk-yj73ehjd.js → chunk-pxvk3syj.js} +1 -1
- package/bundle/{chunk-tsb9g1nz.js → chunk-qbc36nbb.js} +2 -2
- package/bundle/{chunk-xhncwg5v.js → chunk-qc8rsn4v.js} +1 -1
- package/bundle/chunk-qd8w2gkd.js +2 -0
- package/bundle/{chunk-k16s2dnx.js → chunk-qrsveve6.js} +1 -1
- package/bundle/chunk-qvnb3j71.js +3 -0
- package/bundle/{chunk-q5363rr9.js → chunk-r4ndwym0.js} +1 -1
- package/bundle/chunk-r78czx4d.js +8 -0
- package/bundle/{chunk-cjfgs1x8.js → chunk-rbk8seme.js} +1 -1
- package/bundle/{chunk-n34y5gp6.js → chunk-redjxn13.js} +2 -2
- package/bundle/chunk-rf12t4n5.js +2 -0
- package/bundle/{chunk-fj7kd4gc.js → chunk-rg0mrprz.js} +1 -1
- package/bundle/{chunk-2xxefrps.js → chunk-rjd8gbs5.js} +1 -1
- package/bundle/chunk-rpgne7xh.js +2 -0
- package/bundle/chunk-rvgj1vky.js +2 -0
- package/bundle/{chunk-bx6kyvg7.js → chunk-rvkrgkeq.js} +1 -1
- package/bundle/{chunk-2hw0jzv4.js → chunk-rzhdkkpz.js} +1 -1
- package/bundle/{chunk-45jqjyk9.js → chunk-s9ntkjz3.js} +1 -1
- package/bundle/{chunk-81h5f8ev.js → chunk-skqbaadf.js} +1 -1
- package/bundle/chunk-ss2jvqrg.js +2 -0
- package/bundle/{chunk-61yatzp8.js → chunk-ss2ms1r3.js} +1 -1
- package/bundle/chunk-ssajqv72.js +2 -0
- package/bundle/{chunk-xn5v8wgh.js → chunk-t56r99hp.js} +1 -1
- package/bundle/{chunk-s1sepxdp.js → chunk-t8m74g39.js} +1 -1
- package/bundle/{chunk-s6bar2f9.js → chunk-t9mz17gb.js} +2 -2
- package/bundle/chunk-takew94z.js +9 -0
- package/bundle/{chunk-yp3dj4wh.js → chunk-tq0239xp.js} +1 -1
- package/bundle/{chunk-20d0cd1j.js → chunk-tqj69nh6.js} +2 -2
- package/bundle/{chunk-hpfqnjfz.js → chunk-tt30dybd.js} +1 -1
- package/bundle/{chunk-thk93j3e.js → chunk-tvdmnee6.js} +1 -1
- package/bundle/chunk-tvwwq4b3.js +2 -0
- package/bundle/{chunk-18vygvnc.js → chunk-v1xjc3s8.js} +1 -1
- package/bundle/chunk-v2n26eg4.js +2 -0
- package/bundle/chunk-vb286b31.js +2 -0
- package/bundle/chunk-vbeb74ny.js +11 -0
- package/bundle/chunk-vcw00k0n.js +3 -0
- package/bundle/{chunk-cfxjwfn4.js → chunk-vhe0tth1.js} +1 -1
- package/bundle/{chunk-z4nay2ef.js → chunk-vvxmwyrw.js} +1 -1
- package/bundle/{chunk-js9wdh67.js → chunk-vxyy2dp3.js} +2 -2
- package/bundle/{chunk-qk9vccja.js → chunk-vywnd5sf.js} +1 -1
- package/bundle/{chunk-gd5stg49.js → chunk-w18xs2h5.js} +1 -1
- package/bundle/{chunk-5n4hpc4f.js → chunk-wfb608qf.js} +3 -3
- package/bundle/chunk-x24y7qyd.js +2 -0
- package/bundle/{chunk-jkm54mha.js → chunk-x3y2xzhn.js} +1 -1
- package/bundle/{chunk-n3t52cz2.js → chunk-x4sp99g6.js} +1 -1
- package/bundle/{chunk-ef2b07fm.js → chunk-x562b0xk.js} +1 -1
- package/bundle/{chunk-zasd8cz8.js → chunk-x7k5yeey.js} +1 -1
- package/bundle/{chunk-v00cptj6.js → chunk-x9rbv6p6.js} +1 -1
- package/bundle/{chunk-m6wceqay.js → chunk-xcmgkc57.js} +1 -1
- package/bundle/{chunk-pycjksh4.js → chunk-xm7wascx.js} +1 -1
- package/bundle/{chunk-yaj9ywvz.js → chunk-xthkjax9.js} +1 -1
- package/bundle/{chunk-ps6jk326.js → chunk-xvwvd4kq.js} +2 -2
- package/bundle/{chunk-31wxbws4.js → chunk-xzrb857v.js} +1 -1
- package/bundle/chunk-y2d0w09y.js +2 -0
- package/bundle/{chunk-cev2qj7w.js → chunk-y3b4k38p.js} +1 -1
- package/bundle/{chunk-b9nwaaqs.js → chunk-y9q0hb7b.js} +2 -2
- package/bundle/chunk-yb79f79m.js +2 -0
- package/bundle/{chunk-8d2ddmf0.js → chunk-yek0sk2q.js} +1 -1
- package/bundle/{chunk-9atkgkaq.js → chunk-yhbcbjfk.js} +1 -1
- package/bundle/{chunk-k20nrwbg.js → chunk-yjf3kyej.js} +1 -1
- package/bundle/chunk-yjnyzpmt.js +2 -0
- package/bundle/{chunk-0a0vat1h.js → chunk-yp5bypsp.js} +2 -2
- package/bundle/{chunk-89f8v2y8.js → chunk-yp8wyzzm.js} +1 -1
- package/bundle/chunk-yqbcnsa1.js +2 -0
- package/bundle/{chunk-qtsmgjk7.js → chunk-yv0xrnn9.js} +1 -1
- package/bundle/chunk-z3mra3nm.js +2 -0
- package/bundle/{chunk-7m8fdp5p.js → chunk-z6pwkwdr.js} +1 -1
- package/bundle/{chunk-t299e2aw.js → chunk-zs8kqdsf.js} +2 -2
- package/bundle/{chunk-6saj1dhz.js → chunk-zscer8rc.js} +1 -1
- package/bundle/{chunk-4mrz9b6d.js → chunk-zw815d68.js} +2 -2
- package/bundle/chunk-zy9w1vkc.js +2 -0
- package/bundle/index.js +3 -3
- package/bundle/parser.worker.js +2 -2
- package/bundle/worker.js +1 -1
- package/package.json +1 -1
- package/bundle/chunk-07c1mvy1.js +0 -2
- package/bundle/chunk-0p7qcm51.js +0 -2
- package/bundle/chunk-0pmb7zzh.js +0 -2
- package/bundle/chunk-0xm85ayc.js +0 -3
- package/bundle/chunk-11d987sj.js +0 -11
- package/bundle/chunk-19sa03c1.js +0 -3
- package/bundle/chunk-1s9ctg0d.js +0 -2
- package/bundle/chunk-2f9fn9xr.js +0 -2
- package/bundle/chunk-2fhcvfyg.js +0 -2
- package/bundle/chunk-2ztdqtnk.js +0 -3
- package/bundle/chunk-3mfj0x4p.js +0 -2
- package/bundle/chunk-3shnje9k.js +0 -2
- package/bundle/chunk-3tz1qhpt.js +0 -2
- package/bundle/chunk-4dtbdycg.js +0 -2
- package/bundle/chunk-4kpvceap.js +0 -2
- package/bundle/chunk-4pz8av2y.js +0 -2
- package/bundle/chunk-4r4xh8a6.js +0 -2
- package/bundle/chunk-5hpq59t1.js +0 -2
- package/bundle/chunk-5s90ehww.js +0 -2
- package/bundle/chunk-5z7mjwwa.js +0 -14
- package/bundle/chunk-63kcg127.js +0 -2
- package/bundle/chunk-6fejrpht.js +0 -2
- package/bundle/chunk-6zzdw7q1.js +0 -2
- package/bundle/chunk-71pmrpkc.js +0 -2
- package/bundle/chunk-78m8rayq.js +0 -2
- package/bundle/chunk-7j6p5j2g.js +0 -2
- package/bundle/chunk-7tjd6ba1.js +0 -2
- package/bundle/chunk-8d8efdry.js +0 -2
- package/bundle/chunk-8jzjvmaz.js +0 -2
- package/bundle/chunk-93jxndr8.js +0 -2
- package/bundle/chunk-94qmhz2p.js +0 -3
- package/bundle/chunk-95qs7wnz.js +0 -2
- package/bundle/chunk-97h0jx8y.js +0 -5
- package/bundle/chunk-99ve54r6.js +0 -2
- package/bundle/chunk-9ksaqyb2.js +0 -2
- package/bundle/chunk-9p7t748e.js +0 -2
- package/bundle/chunk-a69jgepp.js +0 -2
- package/bundle/chunk-a94s0jks.js +0 -2
- package/bundle/chunk-ar310tc3.js +0 -2
- package/bundle/chunk-at03h9eq.js +0 -2
- package/bundle/chunk-ay9p70xx.js +0 -2
- package/bundle/chunk-b6dsv601.js +0 -3
- package/bundle/chunk-bajtytm5.js +0 -2
- package/bundle/chunk-bh8v3mfg.js +0 -2
- package/bundle/chunk-bp8sxnrm.js +0 -2
- package/bundle/chunk-bw5e8thn.js +0 -2
- package/bundle/chunk-c8ajbhv3.js +0 -2
- package/bundle/chunk-c8n72r2k.js +0 -8
- package/bundle/chunk-ccddzk10.js +0 -2
- package/bundle/chunk-ch8cx9jn.js +0 -2
- package/bundle/chunk-cm4jtnkg.js +0 -2
- package/bundle/chunk-cq7j5tv5.js +0 -2
- package/bundle/chunk-cttqh20d.js +0 -2
- package/bundle/chunk-cvvfa1jf.js +0 -2
- package/bundle/chunk-d7t0bcvk.js +0 -800
- package/bundle/chunk-dd3m74rc.js +0 -3
- package/bundle/chunk-e3qtndrt.js +0 -2
- package/bundle/chunk-e8cac405.js +0 -2
- package/bundle/chunk-ez92ah9y.js +0 -2
- package/bundle/chunk-fazvedgy.js +0 -2
- package/bundle/chunk-gf5pwww1.js +0 -2
- package/bundle/chunk-gtzcm5sb.js +0 -2
- package/bundle/chunk-j0znryc6.js +0 -9
- package/bundle/chunk-kzrw6h8t.js +0 -2
- package/bundle/chunk-ma0m6kpj.js +0 -2
- package/bundle/chunk-mjrvj2cg.js +0 -2
- package/bundle/chunk-mpebdv59.js +0 -2
- package/bundle/chunk-n20v44zr.js +0 -2
- package/bundle/chunk-nfzmvy30.js +0 -2
- package/bundle/chunk-nksathh4.js +0 -2
- package/bundle/chunk-p5360c2q.js +0 -2
- package/bundle/chunk-q14890p6.js +0 -2
- package/bundle/chunk-q4n02cwv.js +0 -2
- package/bundle/chunk-q7s17j1b.js +0 -2
- package/bundle/chunk-qm07wesh.js +0 -2
- package/bundle/chunk-qrrg9v3d.js +0 -2
- package/bundle/chunk-rdqgss38.js +0 -2
- package/bundle/chunk-rf524gez.js +0 -3
- package/bundle/chunk-rqgcz2zr.js +0 -2
- package/bundle/chunk-rs1698xs.js +0 -3
- package/bundle/chunk-rzc528ym.js +0 -2
- package/bundle/chunk-s2za1n7h.js +0 -8
- package/bundle/chunk-sbv96mj0.js +0 -3
- package/bundle/chunk-t3q7qakr.js +0 -2
- package/bundle/chunk-th78zcds.js +0 -2
- package/bundle/chunk-tj00kzk4.js +0 -2
- package/bundle/chunk-tv26mwx5.js +0 -2
- package/bundle/chunk-v69n6mef.js +0 -2
- package/bundle/chunk-vegwb3t0.js +0 -2
- package/bundle/chunk-w9seyn69.js +0 -2
- package/bundle/chunk-wanf4se3.js +0 -2
- package/bundle/chunk-wdhzmk1b.js +0 -2
- package/bundle/chunk-wnwesaap.js +0 -2
- package/bundle/chunk-wxqtda70.js +0 -2
- package/bundle/chunk-wzb6s9rk.js +0 -2
- package/bundle/chunk-x0dg9rg6.js +0 -2
- package/bundle/chunk-xmnzrzbs.js +0 -2
- package/bundle/chunk-xzf62kc6.js +0 -2
- package/bundle/chunk-yk8kk25c.js +0 -3
- package/bundle/chunk-yned6vmd.js +0 -3
- package/bundle/chunk-yra49yga.js +0 -2
- package/bundle/chunk-ytye0p7f.js +0 -2
- package/bundle/chunk-yv2mxxbq.js +0 -2
- package/bundle/chunk-z2fqqer0.js +0 -2
- package/bundle/chunk-z3qanc8m.js +0 -2
- package/bundle/chunk-z44m19vm.js +0 -2
- package/bundle/chunk-zcagdtab.js +0 -2
- package/bundle/chunk-zervk6c5.js +0 -2
- package/bundle/chunk-zqjp7jdd.js +0 -7
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
// @bun
|
|
2
|
-
import{$e as XQ,Ge as l,He as jW,Ie as LQ,Ke as KQ,Me as GW,Ne as AQ,Oe as QQ,Pe as hW,Re as OQ,Se as CW,Te as IW,Ue as KW,Ve as P,We as O,Xe as u,Ye as VW,Ze as bQ,_e as WQ,af as qQ,bf as DW,cf as a,df as FW,ef as wQ,ff as BQ,gf as wW}from"./chunk-xk7je9y8.js";import{Up as $W,Yp as BW,Zp as UQ,cq as JW,eq as ZQ}from"./chunk-d0qqgxs4.js";import"./chunk-cqtkxwd8.js";import"./chunk-v00cptj6.js";import{Tt as Q}from"./chunk-j2zay4da.js";import"./chunk-4vemws1t.js";import"./chunk-yjj4cvqg.js";var NQ=Q.object({error:Q.object({message:Q.string(),type:Q.string().nullish(),param:Q.any().nullish(),code:Q.union([Q.string(),Q.number()]).nullish()})}),jQ=FW({errorSchema:NQ,errorToMessage:(X)=>X.error.message});function zW(X){let Z=X.startsWith("o3")||X.startsWith("o4-mini")||X.startsWith("gpt-5")&&!X.startsWith("gpt-5-chat"),j=X.startsWith("gpt-4")||X.startsWith("gpt-5")&&!X.startsWith("gpt-5-nano")&&!X.startsWith("gpt-5-chat")&&!X.startsWith("gpt-5.4-nano")||X.startsWith("o3")||X.startsWith("o4-mini"),F=X.startsWith("o1")||X.startsWith("o3")||X.startsWith("o4-mini")||X.startsWith("gpt-5")&&!X.startsWith("gpt-5-chat"),J=X.startsWith("gpt-5.1")||X.startsWith("gpt-5.2")||X.startsWith("gpt-5.3")||X.startsWith("gpt-5.4");return{supportsFlexProcessing:Z,supportsPriorityProcessing:j,isReasoningModel:F,systemMessageMode:F?"developer":"system",supportsNonReasoningParameters:J}}function cQ(X){var Z,j,F,J,w,D;if(X==null)return{inputTokens:{total:void 0,noCache:void 0,cacheRead:void 0,cacheWrite:void 0},outputTokens:{total:void 0,text:void 0,reasoning:void 0},raw:void 0};let $=(Z=X.prompt_tokens)!=null?Z:0,q=(j=X.completion_tokens)!=null?j:0,b=(J=(F=X.prompt_tokens_details)==null?void 0:F.cached_tokens)!=null?J:0,K=(D=(w=X.completion_tokens_details)==null?void 0:w.reasoning_tokens)!=null?D:0;return{inputTokens:{total:$,noCache:$-b,cacheRead:b,cacheWrite:void 0},outputTokens:{total:q,text:q-K,reasoning:K},raw:X}}function _W({prompt:X,systemMessageMode:Z="system"}){var j;let F=[],J=[];for(let{role:w,content:D}of X)switch(w){case"system":{switch(Z){case"system":{F.push({role:"system",content:D});break}case"developer":{F.push({role:"developer",content:D});break}case"remove":{J.push({type:"other",message:"system messages are removed for this model"});break}default:throw Error(`Unsupported system message mode: ${Z}`)}break}case"user":{if(D.length===1&&D[0].type==="text"){F.push({role:"user",content:D[0].text});break}F.push({role:"user",content:D.map(($,q)=>{var b,K,B;switch($.type){case"text":return{type:"text",text:$.text};case"file":if($.mediaType.startsWith("image/")){let f=$.mediaType==="image/*"?"image/jpeg":$.mediaType;return{type:"image_url",image_url:{url:$.data instanceof URL?$.data.toString():`data:${f};base64,${KQ($.data)}`,detail:(K=(b=$.providerOptions)==null?void 0:b.openai)==null?void 0:K.imageDetail}}}else if($.mediaType.startsWith("audio/")){if($.data instanceof URL)throw new ZQ({functionality:"audio file parts with URLs"});switch($.mediaType){case"audio/wav":return{type:"input_audio",input_audio:{data:KQ($.data),format:"wav"}};case"audio/mp3":case"audio/mpeg":return{type:"input_audio",input_audio:{data:KQ($.data),format:"mp3"}};default:throw new ZQ({functionality:`audio content parts with media type ${$.mediaType}`})}}else if($.mediaType==="application/pdf"){if($.data instanceof URL)throw new ZQ({functionality:"PDF file parts with URLs"});return{type:"file",file:typeof $.data==="string"&&$.data.startsWith("file-")?{file_id:$.data}:{filename:(B=$.filename)!=null?B:`part-${q}.pdf`,file_data:`data:application/pdf;base64,${KQ($.data)}`}}}else throw new ZQ({functionality:`file part media type ${$.mediaType}`})}})});break}case"assistant":{let $="",q=[];for(let b of D)switch(b.type){case"text":{$+=b.text;break}case"tool-call":{q.push({id:b.toolCallId,type:"function",function:{name:b.toolName,arguments:JSON.stringify(b.input)}});break}}F.push({role:"assistant",content:$,tool_calls:q.length>0?q:void 0});break}case"tool":{for(let $ of D){if($.type==="tool-approval-response")continue;let q=$.output,b;switch(q.type){case"text":case"error-text":b=q.value;break;case"execution-denied":b=(j=q.reason)!=null?j:"Tool execution denied.";break;case"content":case"json":case"error-json":b=JSON.stringify(q.value);break}F.push({role:"tool",tool_call_id:$.toolCallId,content:b})}break}default:throw Error(`Unsupported role: ${w}`)}return{messages:F,warnings:J}}function EQ({id:X,model:Z,created:j}){return{id:X!=null?X:void 0,modelId:Z!=null?Z:void 0,timestamp:j?new Date(j*1000):void 0}}function vQ(X){switch(X){case"stop":return"stop";case"length":return"length";case"content_filter":return"content-filter";case"function_call":case"tool_calls":return"tool-calls";default:return"other"}}var mW=P(()=>O(Q.object({id:Q.string().nullish(),created:Q.number().nullish(),model:Q.string().nullish(),choices:Q.array(Q.object({message:Q.object({role:Q.literal("assistant").nullish(),content:Q.string().nullish(),tool_calls:Q.array(Q.object({id:Q.string().nullish(),type:Q.literal("function"),function:Q.object({name:Q.string(),arguments:Q.string()})})).nullish(),annotations:Q.array(Q.object({type:Q.literal("url_citation"),url_citation:Q.object({start_index:Q.number(),end_index:Q.number(),url:Q.string(),title:Q.string()})})).nullish()}),index:Q.number(),logprobs:Q.object({content:Q.array(Q.object({token:Q.string(),logprob:Q.number(),top_logprobs:Q.array(Q.object({token:Q.string(),logprob:Q.number()}))})).nullish()}).nullish(),finish_reason:Q.string().nullish()})),usage:Q.object({prompt_tokens:Q.number().nullish(),completion_tokens:Q.number().nullish(),total_tokens:Q.number().nullish(),prompt_tokens_details:Q.object({cached_tokens:Q.number().nullish()}).nullish(),completion_tokens_details:Q.object({reasoning_tokens:Q.number().nullish(),accepted_prediction_tokens:Q.number().nullish(),rejected_prediction_tokens:Q.number().nullish()}).nullish()}).nullish()}))),pW=P(()=>O(Q.union([Q.object({id:Q.string().nullish(),created:Q.number().nullish(),model:Q.string().nullish(),choices:Q.array(Q.object({delta:Q.object({role:Q.enum(["assistant"]).nullish(),content:Q.string().nullish(),tool_calls:Q.array(Q.object({index:Q.number(),id:Q.string().nullish(),type:Q.literal("function").nullish(),function:Q.object({name:Q.string().nullish(),arguments:Q.string().nullish()})})).nullish(),annotations:Q.array(Q.object({type:Q.literal("url_citation"),url_citation:Q.object({start_index:Q.number(),end_index:Q.number(),url:Q.string(),title:Q.string()})})).nullish()}).nullish(),logprobs:Q.object({content:Q.array(Q.object({token:Q.string(),logprob:Q.number(),top_logprobs:Q.array(Q.object({token:Q.string(),logprob:Q.number()}))})).nullish()}).nullish(),finish_reason:Q.string().nullish(),index:Q.number()})),usage:Q.object({prompt_tokens:Q.number().nullish(),completion_tokens:Q.number().nullish(),total_tokens:Q.number().nullish(),prompt_tokens_details:Q.object({cached_tokens:Q.number().nullish()}).nullish(),completion_tokens_details:Q.object({reasoning_tokens:Q.number().nullish(),accepted_prediction_tokens:Q.number().nullish(),rejected_prediction_tokens:Q.number().nullish()}).nullish()}).nullish()}),NQ]))),sW=P(()=>O(Q.object({logitBias:Q.record(Q.coerce.number(),Q.number()).optional(),logprobs:Q.union([Q.boolean(),Q.number()]).optional(),parallelToolCalls:Q.boolean().optional(),user:Q.string().optional(),reasoningEffort:Q.enum(["none","minimal","low","medium","high","xhigh"]).optional(),maxCompletionTokens:Q.number().optional(),store:Q.boolean().optional(),metadata:Q.record(Q.string().max(64),Q.string().max(512)).optional(),prediction:Q.record(Q.string(),Q.any()).optional(),serviceTier:Q.enum(["auto","flex","priority","default"]).optional(),strictJsonSchema:Q.boolean().optional(),textVerbosity:Q.enum(["low","medium","high"]).optional(),promptCacheKey:Q.string().optional(),promptCacheRetention:Q.enum(["in_memory","24h"]).optional(),safetyIdentifier:Q.string().optional(),systemMessageMode:Q.enum(["system","developer","remove"]).optional(),forceReasoning:Q.boolean().optional()})));function iW({tools:X,toolChoice:Z}){X=(X==null?void 0:X.length)?X:void 0;let j=[];if(X==null)return{tools:void 0,toolChoice:void 0,toolWarnings:j};let F=[];for(let w of X)switch(w.type){case"function":F.push({type:"function",function:{name:w.name,description:w.description,parameters:w.inputSchema,...w.strict!=null?{strict:w.strict}:{}}});break;default:j.push({type:"unsupported",feature:`tool type: ${w.type}`});break}if(Z==null)return{tools:F,toolChoice:void 0,toolWarnings:j};let J=Z.type;switch(J){case"auto":case"none":case"required":return{tools:F,toolChoice:J,toolWarnings:j};case"tool":return{tools:F,toolChoice:{type:"function",function:{name:Z.toolName}},toolWarnings:j};default:throw new ZQ({functionality:`tool choice type: ${J}`})}}var LW=class{constructor(X,Z){this.specificationVersion="v3",this.supportedUrls={"image/*":[/^https?:\/\/.*$/]},this.modelId=X,this.config=Z}get provider(){return this.config.provider}async getArgs({prompt:X,maxOutputTokens:Z,temperature:j,topP:F,topK:J,frequencyPenalty:w,presencePenalty:D,stopSequences:$,responseFormat:q,seed:b,tools:K,toolChoice:B,providerOptions:f}){var L,S,_,g,A;let R=[],H=(L=await WQ({provider:"openai",providerOptions:f,schema:sW}))!=null?L:{},n=zW(this.modelId),s=(S=H.forceReasoning)!=null?S:n.isReasoningModel;if(J!=null)R.push({type:"unsupported",feature:"topK"});let{messages:p,warnings:m}=_W({prompt:X,systemMessageMode:(_=H.systemMessageMode)!=null?_:s?"developer":n.systemMessageMode});R.push(...m);let i=(g=H.strictJsonSchema)!=null?g:!0,Y={model:this.modelId,logit_bias:H.logitBias,logprobs:H.logprobs===!0||typeof H.logprobs==="number"?!0:void 0,top_logprobs:typeof H.logprobs==="number"?H.logprobs:typeof H.logprobs==="boolean"?H.logprobs?0:void 0:void 0,user:H.user,parallel_tool_calls:H.parallelToolCalls,max_tokens:Z,temperature:j,top_p:F,frequency_penalty:w,presence_penalty:D,response_format:(q==null?void 0:q.type)==="json"?q.schema!=null?{type:"json_schema",json_schema:{schema:q.schema,strict:i,name:(A=q.name)!=null?A:"response",description:q.description}}:{type:"json_object"}:void 0,stop:$,seed:b,verbosity:H.textVerbosity,max_completion_tokens:H.maxCompletionTokens,store:H.store,metadata:H.metadata,prediction:H.prediction,reasoning_effort:H.reasoningEffort,service_tier:H.serviceTier,prompt_cache_key:H.promptCacheKey,prompt_cache_retention:H.promptCacheRetention,safety_identifier:H.safetyIdentifier,messages:p};if(s){if(H.reasoningEffort!=="none"||!n.supportsNonReasoningParameters){if(Y.temperature!=null)Y.temperature=void 0,R.push({type:"unsupported",feature:"temperature",details:"temperature is not supported for reasoning models"});if(Y.top_p!=null)Y.top_p=void 0,R.push({type:"unsupported",feature:"topP",details:"topP is not supported for reasoning models"});if(Y.logprobs!=null)Y.logprobs=void 0,R.push({type:"other",message:"logprobs is not supported for reasoning models"})}if(Y.frequency_penalty!=null)Y.frequency_penalty=void 0,R.push({type:"unsupported",feature:"frequencyPenalty",details:"frequencyPenalty is not supported for reasoning models"});if(Y.presence_penalty!=null)Y.presence_penalty=void 0,R.push({type:"unsupported",feature:"presencePenalty",details:"presencePenalty is not supported for reasoning models"});if(Y.logit_bias!=null)Y.logit_bias=void 0,R.push({type:"other",message:"logitBias is not supported for reasoning models"});if(Y.top_logprobs!=null)Y.top_logprobs=void 0,R.push({type:"other",message:"topLogprobs is not supported for reasoning models"});if(Y.max_tokens!=null){if(Y.max_completion_tokens==null)Y.max_completion_tokens=Y.max_tokens;Y.max_tokens=void 0}}else if(this.modelId.startsWith("gpt-4o-search-preview")||this.modelId.startsWith("gpt-4o-mini-search-preview")){if(Y.temperature!=null)Y.temperature=void 0,R.push({type:"unsupported",feature:"temperature",details:"temperature is not supported for the search preview models and has been removed."})}if(H.serviceTier==="flex"&&!n.supportsFlexProcessing)R.push({type:"unsupported",feature:"serviceTier",details:"flex processing is only available for o3, o4-mini, and gpt-5 models"}),Y.service_tier=void 0;if(H.serviceTier==="priority"&&!n.supportsPriorityProcessing)R.push({type:"unsupported",feature:"serviceTier",details:"priority processing is only available for supported models (gpt-4, gpt-5, gpt-5-mini, o3, o4-mini) and requires Enterprise access. gpt-5-nano is not supported"}),Y.service_tier=void 0;let{tools:t,toolChoice:C,toolWarnings:N}=iW({tools:K,toolChoice:B});return{args:{...Y,tools:t,tool_choice:C},warnings:[...R,...N]}}async doGenerate(X){var Z,j,F,J,w,D,$;let{args:q,warnings:b}=await this.getArgs(X),{responseHeaders:K,value:B,rawValue:f}=await XQ({url:this.config.url({path:"/chat/completions",modelId:this.modelId}),headers:l(this.config.headers(),X.headers),body:q,failedResponseHandler:jQ,successfulResponseHandler:BQ(mW),abortSignal:X.abortSignal,fetch:this.config.fetch}),L=B.choices[0],S=[],_=L.message.content;if(_!=null&&_.length>0)S.push({type:"text",text:_});for(let H of(Z=L.message.tool_calls)!=null?Z:[])S.push({type:"tool-call",toolCallId:(j=H.id)!=null?j:QQ(),toolName:H.function.name,input:H.function.arguments});for(let H of(F=L.message.annotations)!=null?F:[])S.push({type:"source",sourceType:"url",id:QQ(),url:H.url_citation.url,title:H.url_citation.title});let g=(J=B.usage)==null?void 0:J.completion_tokens_details,A=(w=B.usage)==null?void 0:w.prompt_tokens_details,R={openai:{}};if((g==null?void 0:g.accepted_prediction_tokens)!=null)R.openai.acceptedPredictionTokens=g==null?void 0:g.accepted_prediction_tokens;if((g==null?void 0:g.rejected_prediction_tokens)!=null)R.openai.rejectedPredictionTokens=g==null?void 0:g.rejected_prediction_tokens;if(((D=L.logprobs)==null?void 0:D.content)!=null)R.openai.logprobs=L.logprobs.content;return{content:S,finishReason:{unified:vQ(L.finish_reason),raw:($=L.finish_reason)!=null?$:void 0},usage:cQ(B.usage),request:{body:q},response:{...EQ(B),headers:K,body:f},warnings:b,providerMetadata:R}}async doStream(X){let{args:Z,warnings:j}=await this.getArgs(X),F={...Z,stream:!0,stream_options:{include_usage:!0}},{responseHeaders:J,value:w}=await XQ({url:this.config.url({path:"/chat/completions",modelId:this.modelId}),headers:l(this.config.headers(),X.headers),body:F,failedResponseHandler:jQ,successfulResponseHandler:wQ(pW),abortSignal:X.abortSignal,fetch:this.config.fetch}),D=[],$={unified:"other",raw:void 0},q=void 0,b=!1,K=!1,B={openai:{}};return{stream:w.pipeThrough(new TransformStream({start(f){f.enqueue({type:"stream-start",warnings:j})},transform(f,L){var S,_,g,A,R,H,n,s,p,m,i,Y,t,C,N,d,e;if(X.includeRawChunks)L.enqueue({type:"raw",rawValue:f.rawValue});if(!f.success){$={unified:"error",raw:void 0},L.enqueue({type:"error",error:f.error});return}let k=f.value;if("error"in k){$={unified:"error",raw:void 0},L.enqueue({type:"error",error:k.error});return}if(!b){let G=EQ(k);if(Object.values(G).some(Boolean))b=!0,L.enqueue({type:"response-metadata",...EQ(k)})}if(k.usage!=null){if(q=k.usage,((S=k.usage.completion_tokens_details)==null?void 0:S.accepted_prediction_tokens)!=null)B.openai.acceptedPredictionTokens=(_=k.usage.completion_tokens_details)==null?void 0:_.accepted_prediction_tokens;if(((g=k.usage.completion_tokens_details)==null?void 0:g.rejected_prediction_tokens)!=null)B.openai.rejectedPredictionTokens=(A=k.usage.completion_tokens_details)==null?void 0:A.rejected_prediction_tokens}let M=k.choices[0];if((M==null?void 0:M.finish_reason)!=null)$={unified:vQ(M.finish_reason),raw:M.finish_reason};if(((R=M==null?void 0:M.logprobs)==null?void 0:R.content)!=null)B.openai.logprobs=M.logprobs.content;if((M==null?void 0:M.delta)==null)return;let E=M.delta;if(E.content!=null){if(!K)L.enqueue({type:"text-start",id:"0"}),K=!0;L.enqueue({type:"text-delta",id:"0",delta:E.content})}if(E.tool_calls!=null)for(let G of E.tool_calls){let T=G.index;if(D[T]==null){if(G.type!=null&&G.type!=="function")throw new UQ({data:G,message:"Expected 'function' type."});if(G.id==null)throw new UQ({data:G,message:"Expected 'id' to be a string."});if(((H=G.function)==null?void 0:H.name)==null)throw new UQ({data:G,message:"Expected 'function.name' to be a string."});L.enqueue({type:"tool-input-start",id:G.id,toolName:G.function.name}),D[T]={id:G.id,type:"function",function:{name:G.function.name,arguments:(n=G.function.arguments)!=null?n:""},hasFinished:!1};let z=D[T];if(((s=z.function)==null?void 0:s.name)!=null&&((p=z.function)==null?void 0:p.arguments)!=null){if(z.function.arguments.length>0)L.enqueue({type:"tool-input-delta",id:z.id,delta:z.function.arguments});if(bQ(z.function.arguments))L.enqueue({type:"tool-input-end",id:z.id}),L.enqueue({type:"tool-call",toolCallId:(m=z.id)!=null?m:QQ(),toolName:z.function.name,input:z.function.arguments}),z.hasFinished=!0}continue}let x=D[T];if(x.hasFinished)continue;if(((i=G.function)==null?void 0:i.arguments)!=null)x.function.arguments+=(t=(Y=G.function)==null?void 0:Y.arguments)!=null?t:"";if(L.enqueue({type:"tool-input-delta",id:x.id,delta:(C=G.function.arguments)!=null?C:""}),((N=x.function)==null?void 0:N.name)!=null&&((d=x.function)==null?void 0:d.arguments)!=null&&bQ(x.function.arguments))L.enqueue({type:"tool-input-end",id:x.id}),L.enqueue({type:"tool-call",toolCallId:(e=x.id)!=null?e:QQ(),toolName:x.function.name,input:x.function.arguments}),x.hasFinished=!0}if(E.annotations!=null)for(let G of E.annotations)L.enqueue({type:"source",sourceType:"url",id:QQ(),url:G.url_citation.url,title:G.url_citation.title})},flush(f){if(K)f.enqueue({type:"text-end",id:"0"});f.enqueue({type:"finish",finishReason:$,usage:cQ(q),...B!=null?{providerMetadata:B}:{}})}})),request:{body:F},response:{headers:J}}}};function nQ(X){var Z,j,F,J;if(X==null)return{inputTokens:{total:void 0,noCache:void 0,cacheRead:void 0,cacheWrite:void 0},outputTokens:{total:void 0,text:void 0,reasoning:void 0},raw:void 0};let w=(Z=X.prompt_tokens)!=null?Z:0,D=(j=X.completion_tokens)!=null?j:0;return{inputTokens:{total:(F=X.prompt_tokens)!=null?F:void 0,noCache:w,cacheRead:void 0,cacheWrite:void 0},outputTokens:{total:(J=X.completion_tokens)!=null?J:void 0,text:D,reasoning:void 0},raw:X}}function dW({prompt:X,user:Z="user",assistant:j="assistant"}){let F="";if(X[0].role==="system")F+=`${X[0].content}
|
|
2
|
+
import{$e as XQ,Ge as l,He as jW,Ie as LQ,Ke as KQ,Me as GW,Ne as AQ,Oe as QQ,Pe as hW,Re as OQ,Se as CW,Te as IW,Ue as KW,Ve as P,We as O,Xe as u,Ye as VW,Ze as bQ,_e as WQ,af as qQ,bf as DW,cf as a,df as FW,ef as wQ,ff as BQ,gf as wW}from"./chunk-e7ny0b3x.js";import{Tp as $W,Xp as BW,Yp as UQ,bq as JW,dq as ZQ}from"./chunk-kj20f048.js";import"./chunk-cqtkxwd8.js";import"./chunk-x9rbv6p6.js";import{St as Q}from"./chunk-c11d28qn.js";import"./chunk-mzs2pjyc.js";import"./chunk-7xm75w1e.js";var NQ=Q.object({error:Q.object({message:Q.string(),type:Q.string().nullish(),param:Q.any().nullish(),code:Q.union([Q.string(),Q.number()]).nullish()})}),jQ=FW({errorSchema:NQ,errorToMessage:(X)=>X.error.message});function zW(X){let Z=X.startsWith("o3")||X.startsWith("o4-mini")||X.startsWith("gpt-5")&&!X.startsWith("gpt-5-chat"),j=X.startsWith("gpt-4")||X.startsWith("gpt-5")&&!X.startsWith("gpt-5-nano")&&!X.startsWith("gpt-5-chat")&&!X.startsWith("gpt-5.4-nano")||X.startsWith("o3")||X.startsWith("o4-mini"),F=X.startsWith("o1")||X.startsWith("o3")||X.startsWith("o4-mini")||X.startsWith("gpt-5")&&!X.startsWith("gpt-5-chat"),J=X.startsWith("gpt-5.1")||X.startsWith("gpt-5.2")||X.startsWith("gpt-5.3")||X.startsWith("gpt-5.4");return{supportsFlexProcessing:Z,supportsPriorityProcessing:j,isReasoningModel:F,systemMessageMode:F?"developer":"system",supportsNonReasoningParameters:J}}function cQ(X){var Z,j,F,J,w,D;if(X==null)return{inputTokens:{total:void 0,noCache:void 0,cacheRead:void 0,cacheWrite:void 0},outputTokens:{total:void 0,text:void 0,reasoning:void 0},raw:void 0};let $=(Z=X.prompt_tokens)!=null?Z:0,q=(j=X.completion_tokens)!=null?j:0,b=(J=(F=X.prompt_tokens_details)==null?void 0:F.cached_tokens)!=null?J:0,K=(D=(w=X.completion_tokens_details)==null?void 0:w.reasoning_tokens)!=null?D:0;return{inputTokens:{total:$,noCache:$-b,cacheRead:b,cacheWrite:void 0},outputTokens:{total:q,text:q-K,reasoning:K},raw:X}}function _W({prompt:X,systemMessageMode:Z="system"}){var j;let F=[],J=[];for(let{role:w,content:D}of X)switch(w){case"system":{switch(Z){case"system":{F.push({role:"system",content:D});break}case"developer":{F.push({role:"developer",content:D});break}case"remove":{J.push({type:"other",message:"system messages are removed for this model"});break}default:throw Error(`Unsupported system message mode: ${Z}`)}break}case"user":{if(D.length===1&&D[0].type==="text"){F.push({role:"user",content:D[0].text});break}F.push({role:"user",content:D.map(($,q)=>{var b,K,B;switch($.type){case"text":return{type:"text",text:$.text};case"file":if($.mediaType.startsWith("image/")){let f=$.mediaType==="image/*"?"image/jpeg":$.mediaType;return{type:"image_url",image_url:{url:$.data instanceof URL?$.data.toString():`data:${f};base64,${KQ($.data)}`,detail:(K=(b=$.providerOptions)==null?void 0:b.openai)==null?void 0:K.imageDetail}}}else if($.mediaType.startsWith("audio/")){if($.data instanceof URL)throw new ZQ({functionality:"audio file parts with URLs"});switch($.mediaType){case"audio/wav":return{type:"input_audio",input_audio:{data:KQ($.data),format:"wav"}};case"audio/mp3":case"audio/mpeg":return{type:"input_audio",input_audio:{data:KQ($.data),format:"mp3"}};default:throw new ZQ({functionality:`audio content parts with media type ${$.mediaType}`})}}else if($.mediaType==="application/pdf"){if($.data instanceof URL)throw new ZQ({functionality:"PDF file parts with URLs"});return{type:"file",file:typeof $.data==="string"&&$.data.startsWith("file-")?{file_id:$.data}:{filename:(B=$.filename)!=null?B:`part-${q}.pdf`,file_data:`data:application/pdf;base64,${KQ($.data)}`}}}else throw new ZQ({functionality:`file part media type ${$.mediaType}`})}})});break}case"assistant":{let $="",q=[];for(let b of D)switch(b.type){case"text":{$+=b.text;break}case"tool-call":{q.push({id:b.toolCallId,type:"function",function:{name:b.toolName,arguments:JSON.stringify(b.input)}});break}}F.push({role:"assistant",content:$,tool_calls:q.length>0?q:void 0});break}case"tool":{for(let $ of D){if($.type==="tool-approval-response")continue;let q=$.output,b;switch(q.type){case"text":case"error-text":b=q.value;break;case"execution-denied":b=(j=q.reason)!=null?j:"Tool execution denied.";break;case"content":case"json":case"error-json":b=JSON.stringify(q.value);break}F.push({role:"tool",tool_call_id:$.toolCallId,content:b})}break}default:throw Error(`Unsupported role: ${w}`)}return{messages:F,warnings:J}}function EQ({id:X,model:Z,created:j}){return{id:X!=null?X:void 0,modelId:Z!=null?Z:void 0,timestamp:j?new Date(j*1000):void 0}}function vQ(X){switch(X){case"stop":return"stop";case"length":return"length";case"content_filter":return"content-filter";case"function_call":case"tool_calls":return"tool-calls";default:return"other"}}var mW=P(()=>O(Q.object({id:Q.string().nullish(),created:Q.number().nullish(),model:Q.string().nullish(),choices:Q.array(Q.object({message:Q.object({role:Q.literal("assistant").nullish(),content:Q.string().nullish(),tool_calls:Q.array(Q.object({id:Q.string().nullish(),type:Q.literal("function"),function:Q.object({name:Q.string(),arguments:Q.string()})})).nullish(),annotations:Q.array(Q.object({type:Q.literal("url_citation"),url_citation:Q.object({start_index:Q.number(),end_index:Q.number(),url:Q.string(),title:Q.string()})})).nullish()}),index:Q.number(),logprobs:Q.object({content:Q.array(Q.object({token:Q.string(),logprob:Q.number(),top_logprobs:Q.array(Q.object({token:Q.string(),logprob:Q.number()}))})).nullish()}).nullish(),finish_reason:Q.string().nullish()})),usage:Q.object({prompt_tokens:Q.number().nullish(),completion_tokens:Q.number().nullish(),total_tokens:Q.number().nullish(),prompt_tokens_details:Q.object({cached_tokens:Q.number().nullish()}).nullish(),completion_tokens_details:Q.object({reasoning_tokens:Q.number().nullish(),accepted_prediction_tokens:Q.number().nullish(),rejected_prediction_tokens:Q.number().nullish()}).nullish()}).nullish()}))),pW=P(()=>O(Q.union([Q.object({id:Q.string().nullish(),created:Q.number().nullish(),model:Q.string().nullish(),choices:Q.array(Q.object({delta:Q.object({role:Q.enum(["assistant"]).nullish(),content:Q.string().nullish(),tool_calls:Q.array(Q.object({index:Q.number(),id:Q.string().nullish(),type:Q.literal("function").nullish(),function:Q.object({name:Q.string().nullish(),arguments:Q.string().nullish()})})).nullish(),annotations:Q.array(Q.object({type:Q.literal("url_citation"),url_citation:Q.object({start_index:Q.number(),end_index:Q.number(),url:Q.string(),title:Q.string()})})).nullish()}).nullish(),logprobs:Q.object({content:Q.array(Q.object({token:Q.string(),logprob:Q.number(),top_logprobs:Q.array(Q.object({token:Q.string(),logprob:Q.number()}))})).nullish()}).nullish(),finish_reason:Q.string().nullish(),index:Q.number()})),usage:Q.object({prompt_tokens:Q.number().nullish(),completion_tokens:Q.number().nullish(),total_tokens:Q.number().nullish(),prompt_tokens_details:Q.object({cached_tokens:Q.number().nullish()}).nullish(),completion_tokens_details:Q.object({reasoning_tokens:Q.number().nullish(),accepted_prediction_tokens:Q.number().nullish(),rejected_prediction_tokens:Q.number().nullish()}).nullish()}).nullish()}),NQ]))),sW=P(()=>O(Q.object({logitBias:Q.record(Q.coerce.number(),Q.number()).optional(),logprobs:Q.union([Q.boolean(),Q.number()]).optional(),parallelToolCalls:Q.boolean().optional(),user:Q.string().optional(),reasoningEffort:Q.enum(["none","minimal","low","medium","high","xhigh"]).optional(),maxCompletionTokens:Q.number().optional(),store:Q.boolean().optional(),metadata:Q.record(Q.string().max(64),Q.string().max(512)).optional(),prediction:Q.record(Q.string(),Q.any()).optional(),serviceTier:Q.enum(["auto","flex","priority","default"]).optional(),strictJsonSchema:Q.boolean().optional(),textVerbosity:Q.enum(["low","medium","high"]).optional(),promptCacheKey:Q.string().optional(),promptCacheRetention:Q.enum(["in_memory","24h"]).optional(),safetyIdentifier:Q.string().optional(),systemMessageMode:Q.enum(["system","developer","remove"]).optional(),forceReasoning:Q.boolean().optional()})));function iW({tools:X,toolChoice:Z}){X=(X==null?void 0:X.length)?X:void 0;let j=[];if(X==null)return{tools:void 0,toolChoice:void 0,toolWarnings:j};let F=[];for(let w of X)switch(w.type){case"function":F.push({type:"function",function:{name:w.name,description:w.description,parameters:w.inputSchema,...w.strict!=null?{strict:w.strict}:{}}});break;default:j.push({type:"unsupported",feature:`tool type: ${w.type}`});break}if(Z==null)return{tools:F,toolChoice:void 0,toolWarnings:j};let J=Z.type;switch(J){case"auto":case"none":case"required":return{tools:F,toolChoice:J,toolWarnings:j};case"tool":return{tools:F,toolChoice:{type:"function",function:{name:Z.toolName}},toolWarnings:j};default:throw new ZQ({functionality:`tool choice type: ${J}`})}}var LW=class{constructor(X,Z){this.specificationVersion="v3",this.supportedUrls={"image/*":[/^https?:\/\/.*$/]},this.modelId=X,this.config=Z}get provider(){return this.config.provider}async getArgs({prompt:X,maxOutputTokens:Z,temperature:j,topP:F,topK:J,frequencyPenalty:w,presencePenalty:D,stopSequences:$,responseFormat:q,seed:b,tools:K,toolChoice:B,providerOptions:f}){var L,S,_,g,A;let R=[],H=(L=await WQ({provider:"openai",providerOptions:f,schema:sW}))!=null?L:{},n=zW(this.modelId),s=(S=H.forceReasoning)!=null?S:n.isReasoningModel;if(J!=null)R.push({type:"unsupported",feature:"topK"});let{messages:p,warnings:m}=_W({prompt:X,systemMessageMode:(_=H.systemMessageMode)!=null?_:s?"developer":n.systemMessageMode});R.push(...m);let i=(g=H.strictJsonSchema)!=null?g:!0,Y={model:this.modelId,logit_bias:H.logitBias,logprobs:H.logprobs===!0||typeof H.logprobs==="number"?!0:void 0,top_logprobs:typeof H.logprobs==="number"?H.logprobs:typeof H.logprobs==="boolean"?H.logprobs?0:void 0:void 0,user:H.user,parallel_tool_calls:H.parallelToolCalls,max_tokens:Z,temperature:j,top_p:F,frequency_penalty:w,presence_penalty:D,response_format:(q==null?void 0:q.type)==="json"?q.schema!=null?{type:"json_schema",json_schema:{schema:q.schema,strict:i,name:(A=q.name)!=null?A:"response",description:q.description}}:{type:"json_object"}:void 0,stop:$,seed:b,verbosity:H.textVerbosity,max_completion_tokens:H.maxCompletionTokens,store:H.store,metadata:H.metadata,prediction:H.prediction,reasoning_effort:H.reasoningEffort,service_tier:H.serviceTier,prompt_cache_key:H.promptCacheKey,prompt_cache_retention:H.promptCacheRetention,safety_identifier:H.safetyIdentifier,messages:p};if(s){if(H.reasoningEffort!=="none"||!n.supportsNonReasoningParameters){if(Y.temperature!=null)Y.temperature=void 0,R.push({type:"unsupported",feature:"temperature",details:"temperature is not supported for reasoning models"});if(Y.top_p!=null)Y.top_p=void 0,R.push({type:"unsupported",feature:"topP",details:"topP is not supported for reasoning models"});if(Y.logprobs!=null)Y.logprobs=void 0,R.push({type:"other",message:"logprobs is not supported for reasoning models"})}if(Y.frequency_penalty!=null)Y.frequency_penalty=void 0,R.push({type:"unsupported",feature:"frequencyPenalty",details:"frequencyPenalty is not supported for reasoning models"});if(Y.presence_penalty!=null)Y.presence_penalty=void 0,R.push({type:"unsupported",feature:"presencePenalty",details:"presencePenalty is not supported for reasoning models"});if(Y.logit_bias!=null)Y.logit_bias=void 0,R.push({type:"other",message:"logitBias is not supported for reasoning models"});if(Y.top_logprobs!=null)Y.top_logprobs=void 0,R.push({type:"other",message:"topLogprobs is not supported for reasoning models"});if(Y.max_tokens!=null){if(Y.max_completion_tokens==null)Y.max_completion_tokens=Y.max_tokens;Y.max_tokens=void 0}}else if(this.modelId.startsWith("gpt-4o-search-preview")||this.modelId.startsWith("gpt-4o-mini-search-preview")){if(Y.temperature!=null)Y.temperature=void 0,R.push({type:"unsupported",feature:"temperature",details:"temperature is not supported for the search preview models and has been removed."})}if(H.serviceTier==="flex"&&!n.supportsFlexProcessing)R.push({type:"unsupported",feature:"serviceTier",details:"flex processing is only available for o3, o4-mini, and gpt-5 models"}),Y.service_tier=void 0;if(H.serviceTier==="priority"&&!n.supportsPriorityProcessing)R.push({type:"unsupported",feature:"serviceTier",details:"priority processing is only available for supported models (gpt-4, gpt-5, gpt-5-mini, o3, o4-mini) and requires Enterprise access. gpt-5-nano is not supported"}),Y.service_tier=void 0;let{tools:t,toolChoice:C,toolWarnings:N}=iW({tools:K,toolChoice:B});return{args:{...Y,tools:t,tool_choice:C},warnings:[...R,...N]}}async doGenerate(X){var Z,j,F,J,w,D,$;let{args:q,warnings:b}=await this.getArgs(X),{responseHeaders:K,value:B,rawValue:f}=await XQ({url:this.config.url({path:"/chat/completions",modelId:this.modelId}),headers:l(this.config.headers(),X.headers),body:q,failedResponseHandler:jQ,successfulResponseHandler:BQ(mW),abortSignal:X.abortSignal,fetch:this.config.fetch}),L=B.choices[0],S=[],_=L.message.content;if(_!=null&&_.length>0)S.push({type:"text",text:_});for(let H of(Z=L.message.tool_calls)!=null?Z:[])S.push({type:"tool-call",toolCallId:(j=H.id)!=null?j:QQ(),toolName:H.function.name,input:H.function.arguments});for(let H of(F=L.message.annotations)!=null?F:[])S.push({type:"source",sourceType:"url",id:QQ(),url:H.url_citation.url,title:H.url_citation.title});let g=(J=B.usage)==null?void 0:J.completion_tokens_details,A=(w=B.usage)==null?void 0:w.prompt_tokens_details,R={openai:{}};if((g==null?void 0:g.accepted_prediction_tokens)!=null)R.openai.acceptedPredictionTokens=g==null?void 0:g.accepted_prediction_tokens;if((g==null?void 0:g.rejected_prediction_tokens)!=null)R.openai.rejectedPredictionTokens=g==null?void 0:g.rejected_prediction_tokens;if(((D=L.logprobs)==null?void 0:D.content)!=null)R.openai.logprobs=L.logprobs.content;return{content:S,finishReason:{unified:vQ(L.finish_reason),raw:($=L.finish_reason)!=null?$:void 0},usage:cQ(B.usage),request:{body:q},response:{...EQ(B),headers:K,body:f},warnings:b,providerMetadata:R}}async doStream(X){let{args:Z,warnings:j}=await this.getArgs(X),F={...Z,stream:!0,stream_options:{include_usage:!0}},{responseHeaders:J,value:w}=await XQ({url:this.config.url({path:"/chat/completions",modelId:this.modelId}),headers:l(this.config.headers(),X.headers),body:F,failedResponseHandler:jQ,successfulResponseHandler:wQ(pW),abortSignal:X.abortSignal,fetch:this.config.fetch}),D=[],$={unified:"other",raw:void 0},q=void 0,b=!1,K=!1,B={openai:{}};return{stream:w.pipeThrough(new TransformStream({start(f){f.enqueue({type:"stream-start",warnings:j})},transform(f,L){var S,_,g,A,R,H,n,s,p,m,i,Y,t,C,N,d,e;if(X.includeRawChunks)L.enqueue({type:"raw",rawValue:f.rawValue});if(!f.success){$={unified:"error",raw:void 0},L.enqueue({type:"error",error:f.error});return}let k=f.value;if("error"in k){$={unified:"error",raw:void 0},L.enqueue({type:"error",error:k.error});return}if(!b){let G=EQ(k);if(Object.values(G).some(Boolean))b=!0,L.enqueue({type:"response-metadata",...EQ(k)})}if(k.usage!=null){if(q=k.usage,((S=k.usage.completion_tokens_details)==null?void 0:S.accepted_prediction_tokens)!=null)B.openai.acceptedPredictionTokens=(_=k.usage.completion_tokens_details)==null?void 0:_.accepted_prediction_tokens;if(((g=k.usage.completion_tokens_details)==null?void 0:g.rejected_prediction_tokens)!=null)B.openai.rejectedPredictionTokens=(A=k.usage.completion_tokens_details)==null?void 0:A.rejected_prediction_tokens}let M=k.choices[0];if((M==null?void 0:M.finish_reason)!=null)$={unified:vQ(M.finish_reason),raw:M.finish_reason};if(((R=M==null?void 0:M.logprobs)==null?void 0:R.content)!=null)B.openai.logprobs=M.logprobs.content;if((M==null?void 0:M.delta)==null)return;let E=M.delta;if(E.content!=null){if(!K)L.enqueue({type:"text-start",id:"0"}),K=!0;L.enqueue({type:"text-delta",id:"0",delta:E.content})}if(E.tool_calls!=null)for(let G of E.tool_calls){let T=G.index;if(D[T]==null){if(G.type!=null&&G.type!=="function")throw new UQ({data:G,message:"Expected 'function' type."});if(G.id==null)throw new UQ({data:G,message:"Expected 'id' to be a string."});if(((H=G.function)==null?void 0:H.name)==null)throw new UQ({data:G,message:"Expected 'function.name' to be a string."});L.enqueue({type:"tool-input-start",id:G.id,toolName:G.function.name}),D[T]={id:G.id,type:"function",function:{name:G.function.name,arguments:(n=G.function.arguments)!=null?n:""},hasFinished:!1};let z=D[T];if(((s=z.function)==null?void 0:s.name)!=null&&((p=z.function)==null?void 0:p.arguments)!=null){if(z.function.arguments.length>0)L.enqueue({type:"tool-input-delta",id:z.id,delta:z.function.arguments});if(bQ(z.function.arguments))L.enqueue({type:"tool-input-end",id:z.id}),L.enqueue({type:"tool-call",toolCallId:(m=z.id)!=null?m:QQ(),toolName:z.function.name,input:z.function.arguments}),z.hasFinished=!0}continue}let x=D[T];if(x.hasFinished)continue;if(((i=G.function)==null?void 0:i.arguments)!=null)x.function.arguments+=(t=(Y=G.function)==null?void 0:Y.arguments)!=null?t:"";if(L.enqueue({type:"tool-input-delta",id:x.id,delta:(C=G.function.arguments)!=null?C:""}),((N=x.function)==null?void 0:N.name)!=null&&((d=x.function)==null?void 0:d.arguments)!=null&&bQ(x.function.arguments))L.enqueue({type:"tool-input-end",id:x.id}),L.enqueue({type:"tool-call",toolCallId:(e=x.id)!=null?e:QQ(),toolName:x.function.name,input:x.function.arguments}),x.hasFinished=!0}if(E.annotations!=null)for(let G of E.annotations)L.enqueue({type:"source",sourceType:"url",id:QQ(),url:G.url_citation.url,title:G.url_citation.title})},flush(f){if(K)f.enqueue({type:"text-end",id:"0"});f.enqueue({type:"finish",finishReason:$,usage:cQ(q),...B!=null?{providerMetadata:B}:{}})}})),request:{body:F},response:{headers:J}}}};function nQ(X){var Z,j,F,J;if(X==null)return{inputTokens:{total:void 0,noCache:void 0,cacheRead:void 0,cacheWrite:void 0},outputTokens:{total:void 0,text:void 0,reasoning:void 0},raw:void 0};let w=(Z=X.prompt_tokens)!=null?Z:0,D=(j=X.completion_tokens)!=null?j:0;return{inputTokens:{total:(F=X.prompt_tokens)!=null?F:void 0,noCache:w,cacheRead:void 0,cacheWrite:void 0},outputTokens:{total:(J=X.completion_tokens)!=null?J:void 0,text:D,reasoning:void 0},raw:X}}function dW({prompt:X,user:Z="user",assistant:j="assistant"}){let F="";if(X[0].role==="system")F+=`${X[0].content}
|
|
3
3
|
|
|
4
4
|
`,X=X.slice(1);for(let{role:J,content:w}of X)switch(J){case"system":throw new BW({message:"Unexpected system message in prompt: ${content}",prompt:X});case"user":{let D=w.map(($)=>{switch($.type){case"text":return $.text}}).filter(Boolean).join("");F+=`${Z}:
|
|
5
5
|
${D}
|
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
// @bun
|
|
2
|
-
import{Aj as
|
|
2
|
+
import{Aj as w,Bj as x,Cj as y,Dj as z,Ej as A,Fj as B,Gj as C,Hj as D,Ij as E,Jj as F,Kj as G,Lj as H,Mj as I,Nj as J,Oj as K,Pj as L,Qj as M,Rj as N,Sj as O,Tj as P,Uj as Q,Vj as R,ej as a,fj as b,gj as c,hj as d,ij as e,jj as f,kj as g,lj as h,mj as i,nj as j,oj as k,pj as l,qj as m,rj as n,sj as o,tj as p,uj as q,vj as r,wj as s,xj as t,yj as u,zj as v}from"./chunk-326p5b10.js";import"./chunk-x9rbv6p6.js";import"./chunk-7xm75w1e.js";export{Q as zodToJsonSchema,u as zodPatterns,g as setResponseValueAndErrors,O as selectParser,B as primitiveMappings,M as parseUnknownDef,C as parseUnionDef,L as parseUndefinedDef,K as parseTupleDef,v as parseStringDef,J as parseSetDef,w as parseRecordDef,N as parseReadonlyDef,I as parsePromiseDef,H as parsePipelineDef,G as parseOptionalDef,F as parseObjectDef,E as parseNumberDef,D as parseNullableDef,A as parseNullDef,z as parseNeverDef,y as parseNativeEnumDef,x as parseMapDef,t as parseLiteralDef,s as parseIntersectionDef,r as parseEnumDef,q as parseEffectsDef,p as parseDefaultDef,P as parseDef,o as parseDateDef,n as parseCatchDef,m as parseBrandedDef,l as parseBooleanDef,k as parseBigintDef,j as parseArrayDef,i as parseAnyDef,b as jsonDescription,a as ignoreOverride,h as getRelativePath,e as getRefs,d as getDefaultOptions,c as defaultOptions,R as default,f as addErrorMessage};
|
|
@@ -1,3 +1,3 @@
|
|
|
1
1
|
// @bun
|
|
2
|
-
import{En as E,Fn as e,Gn as I}from"./chunk-q5363rr9.js";import{In as b,Kn as g,Ln as n,On as i,Pn as x,bo as _0,co as O0,do as G,eo as Z0}from"./chunk-7wthn44y.js";import{Co as p}from"./chunk-19sa03c1.js";import{$r as A,$s as q,Rs as T,Ss as X,Wr as t,Zr as y,es as c}from"./chunk-94qmhz2p.js";import{at as s,pt as d,tt as Q}from"./chunk-20d0cd1j.js";import{vt as w}from"./chunk-b6dsv601.js";import{AC as v,FI as a,PE as o,SM as M,qH as B}from"./chunk-t299e2aw.js";import{EO as F}from"./chunk-yjj4cvqg.js";var h={};F(h,{waitForDependencies:()=>R0,layer:()=>$0,get:()=>C0,defaultLayer:()=>j0,TuiConfig:()=>h,Service:()=>C,Info:()=>W0});import r from"path";var D={};F(D,{Keybinds:()=>Q0,ConfigKeybinds:()=>D});var _=(O,Z)=>M.String.pipe(M.optional,M.withDecodingDefault(B.succeed(O))).annotate({description:Z}),B0=process.platform==="win32"?"ctrl+z,ctrl+-,super+z":"ctrl+-,super+z",K0=M.Struct({leader:_("ctrl+x","Leader key for keybind combinations"),app_exit:_("ctrl+c,ctrl+d,<leader>q","Exit the application"),editor_open:_("<leader>e","Open external editor"),theme_list:_("<leader>t","List available themes"),sidebar_toggle:_("<leader>b","Toggle sidebar"),scrollbar_toggle:_("none","Toggle session scrollbar"),status_view:_("<leader>s","View status"),session_export:_("<leader>x","Export session to editor"),session_new:_("<leader>n","Create a new session"),session_list:_("<leader>l","List all sessions"),session_timeline:_("<leader>g","Show session timeline"),session_fork:_("none","Fork session from message"),session_rename:_("ctrl+r","Rename session"),session_delete:_("ctrl+d","Delete session"),stash_delete:_("ctrl+d","Delete stash entry"),model_provider_list:_("ctrl+a","Open provider list from model dialog"),model_favorite_toggle:_("ctrl+f","Toggle model favorite status"),session_share:_("none","Share current session"),session_unshare:_("none","Unshare current session"),session_interrupt:_("escape","Interrupt current session"),session_compact:_("<leader>c","Compact the session"),messages_page_up:_("pageup,ctrl+alt+b","Scroll messages up by one page"),messages_page_down:_("pagedown,ctrl+alt+f","Scroll messages down by one page"),messages_line_up:_("ctrl+alt+y","Scroll messages up by one line"),messages_line_down:_("ctrl+alt+e","Scroll messages down by one line"),messages_half_page_up:_("ctrl+alt+u","Scroll messages up by half page"),messages_half_page_down:_("ctrl+alt+d","Scroll messages down by half page"),messages_first:_("ctrl+g,home","Navigate to first message"),messages_last:_("ctrl+alt+g,end","Navigate to last message"),messages_next:_("none","Navigate to next message"),messages_previous:_("none","Navigate to previous message"),messages_last_user:_("none","Navigate to last user message"),messages_copy:_("<leader>y","Copy message"),messages_undo:_("<leader>u","Undo message"),messages_redo:_("<leader>r","Redo message"),messages_toggle_conceal:_("<leader>h","Toggle code block concealment in messages"),tool_details:_("none","Toggle tool details visibility"),model_list:_("<leader>m","List available models"),model_cycle_recent:_("f2","Next recently used model"),model_cycle_recent_reverse:_("shift+f2","Previous recently used model"),model_cycle_favorite:_("none","Next favorite model"),model_cycle_favorite_reverse:_("none","Previous favorite model"),command_list:_("ctrl+p","List available commands"),agent_list:_("<leader>a","List agents"),agent_cycle:_("ctrl+space","Next agent"),agent_cycle_reverse:_("none","Previous agent"),variant_cycle:_("ctrl+t","Cycle model variants"),variant_list:_("none","List model variants"),input_clear:_("ctrl+c","Clear input field"),input_paste:_("super+v,ctrl+v","Paste from clipboard"),input_submit:_("return","Submit input"),input_newline:_("shift+return,ctrl+return,alt+return,ctrl+j","Insert newline in input"),input_move_left:_("left,ctrl+b","Move cursor left in input"),input_move_right:_("right,ctrl+f","Move cursor right in input"),input_move_up:_("up","Move cursor up in input"),input_move_down:_("down","Move cursor down in input"),input_select_left:_("shift+left","Select left in input"),input_select_right:_("shift+right","Select right in input"),input_select_up:_("shift+up","Select up in input"),input_select_down:_("shift+down","Select down in input"),input_line_home:_("ctrl+a","Move to start of line in input"),input_line_end:_("ctrl+e","Move to end of line in input"),input_select_line_home:_("ctrl+shift+a","Select to start of line in input"),input_select_line_end:_("ctrl+shift+e","Select to end of line in input"),input_visual_line_home:_("alt+a","Move to start of visual line in input"),input_visual_line_end:_("alt+e","Move to end of visual line in input"),input_select_visual_line_home:_("alt+shift+a","Select to start of visual line in input"),input_select_visual_line_end:_("alt+shift+e","Select to end of visual line in input"),input_buffer_home:_("home","Move to start of buffer in input"),input_buffer_end:_("end","Move to end of buffer in input"),input_select_buffer_home:_("shift+home","Select to start of buffer in input"),input_select_buffer_end:_("shift+end","Select to end of buffer in input"),input_delete_line:_("ctrl+shift+d","Delete line in input"),input_delete_to_line_end:_("ctrl+k","Delete to end of line in input"),input_delete_to_line_start:_("ctrl+u","Delete to start of line in input"),input_backspace:_("backspace,shift+backspace","Backspace in input"),input_delete:_("ctrl+d,delete,shift+delete","Delete character in input"),input_undo:_(B0,"Undo in input"),input_redo:_("ctrl+.,super+shift+z","Redo in input"),input_word_forward:_("alt+f,alt+right,ctrl+right","Move word forward in input"),input_word_backward:_("alt+b,alt+left,ctrl+left","Move word backward in input"),input_select_word_forward:_("alt+shift+f,alt+shift+right","Select word forward in input"),input_select_word_backward:_("alt+shift+b,alt+shift+left","Select word backward in input"),input_delete_word_forward:_("alt+d,alt+delete,ctrl+delete","Delete word forward in input"),input_delete_word_backward:_("ctrl+w,ctrl+backspace,alt+backspace","Delete word backward in input"),history_previous:_("up","Previous history item"),history_next:_("down","Next history item"),session_child_first:_("<leader>down","Go to first child session"),session_child_cycle:_("right","Go to next child session"),session_child_cycle_reverse:_("left","Go to previous child session"),session_parent:_("up","Go to parent session"),terminal_suspend:_("ctrl+z","Suspend terminal"),terminal_title_toggle:_("none","Toggle terminal title"),tips_toggle:_("<leader>h","Toggle tips on home screen"),plugin_manager:_("none","Open plugin manager dialog"),display_thinking:_("none","Toggle thinking blocks visibility")}).annotate({identifier:"KeybindsConfig"}),Q0=p(K0);var V0=w.object(Object.fromEntries(Object.keys(D.Keybinds.shape).map((O)=>[O,w.string().optional()]))).strict(),R=w.object({scroll_speed:w.number().min(0.001).optional().describe("TUI scroll speed"),scroll_acceleration:w.object({enabled:w.boolean().describe("Enable scroll acceleration")}).optional().describe("Scroll acceleration settings"),diff_style:w.enum(["auto","stacked"]).optional().describe("Control diff rendering style: 'auto' adapts to terminal width, 'stacked' always shows single column"),mouse:w.boolean().optional().describe("Enable or disable mouse capture (default: true on desktop, false on Android/Termux)"),accessible:w.boolean().optional().describe("Screen-reader friendly mode: linear main-screen rendering, no mouse capture, reduced motion, no sound (default: false)"),reduce_motion:w.boolean().optional().describe("Disable spinners and other animations, showing static text instead (default: false)"),sound:w.boolean().optional().describe("Enable or disable sound cues (default: true)"),announcements:w.enum(["quiet","normal","verbose"]).optional().describe("Verbosity of accessible-mode screen-reader announcements: 'quiet' announces only turn boundaries, errors, and stops; 'normal' adds tool-start lines; 'verbose' adds tool-completion lines (default: normal). Errors are always announced.")}),P=w.object({$schema:w.string().optional(),theme:w.string().optional(),keybinds:V0.optional(),plugin:I.Spec.zod.array().optional(),plugin_enabled:w.record(w.string(),w.boolean()).optional()}).extend(R.shape).strict();var H=q.create({service:"tui.migrate"}),Y0="https://qitqode.com/tui.json",D0=P.shape.theme.optional(),l=w.record(w.string(),w.unknown()).optional(),H0=w.object({scroll_speed:R.shape.scroll_speed.catch(void 0),scroll_acceleration:R.shape.scroll_acceleration.catch(void 0),diff_style:R.shape.diff_style.catch(void 0)}).strip();async function k(O){let Z=await G0(O);for(let W of Z){let j=await Q.readText(W).catch((m)=>{H.warn("failed to read config for tui migration",{path:W,error:m});return});if(!j)continue;let V=[],K=b(j,V,{allowTrailingComma:!0});if(V.length||!K||typeof K!=="object"||Array.isArray(K))continue;let $=D0.safeParse("theme"in K?K.theme:void 0),J=l.safeParse("keybinds"in K?K.keybinds:void 0),N=l.safeParse("tui"in K?K.tui:void 0),Y={theme:$.success?$.data:void 0,keybinds:J.success?J.data:void 0,tui:N.success?N.data:void 0},L=Y.tui?J0(Y.tui):void 0;if(Y.theme===void 0&&Y.keybinds===void 0&&!L)continue;let U=r.join(r.dirname(W),"tui.json");if(await Q.exists(U))continue;let z={$schema:Y0};if(Y.theme!==void 0)z.theme=Y.theme;if(Y.keybinds!==void 0)z.keybinds=Y.keybinds;if(L)Object.assign(z,L);if(!await Q.write(U,JSON.stringify(z,null,2)).then(()=>!0).catch((m)=>{return H.warn("failed to write tui migration target",{from:W,to:U,error:m}),!1}))continue;if(!await A0(W,j)){H.warn("tui config migrated but source file was not stripped",{from:W,to:U});continue}H.info("migrated tui config",{from:W,to:U})}}function J0(O){let Z=H0.parse(O);if(Z.scroll_speed===void 0&&Z.diff_style===void 0&&Z.scroll_acceleration===void 0)return;return Z}async function A0(O,Z){let W=O+".tui-migration.bak";if(!(await Q.exists(W)?!0:await Q.write(W,Z).then(()=>!0).catch(($)=>{return H.warn("failed to backup source config during tui migration",{path:O,backup:W,error:$}),!1})))return!1;let K=["theme","keybinds","tui"].reduce(($,J)=>{let N=g($,[J],void 0,{formattingOptions:{insertSpaces:!0,tabSize:2}});if(!N.length)return $;return n($,N)},Z);return Q.write(O,K).then(()=>{return H.info("stripped tui keys from server config",{path:O,backup:W}),!0}).catch(($)=>{return H.warn("failed to strip legacy tui keys from server config",{path:O,backup:W,error:$}),!1})}async function G0(O){let Z=[...G(T.Path.config,"qitqode"),...await Q.findUp(["qitqode.json","qitqode.jsonc"],O.cwd,void 0,{rootFirst:!0})];for(let j of A(O.directories))Z.push(...G(j,"qitqode"));if(X.QITQODE_CONFIG)Z.push(X.QITQODE_CONFIG);return(await Promise.all(A(Z).map(async(j)=>{return await Q.exists(j)?j:void 0}))).filter((j)=>!!j)}var f=v.Reference("CurrentWorkingDirectory",{defaultValue:()=>process.cwd()});var u=q.create({service:"tui.config"}),W0=P;class C extends v.Service()("@qitqode/TuiConfig"){}function N0(O,Z){if(Q.contains(Z.directory,O))return"local";return"global"}function U0(O){let Z={...O};if(!("tui"in Z))return Z;if(!s(Z.tui))return delete Z.tui,Z;let W=Z.tui;return delete Z.tui,{...W,...Z}}async function M0(O,Z){if(!O.plugin)return O;for(let W=0;W<O.plugin.length;W++)O.plugin[W]=await I.resolvePluginSpec(O.plugin[W],Z);return O}async function S(O,Z,W){let j=await z0(Z);if(O.result=c(O.result,j),!j.plugin?.length)return;let V=N0(Z,W),K=I.deduplicatePluginOrigins([...O.result.plugin_origins??[],...j.plugin.map(($)=>({spec:$,scope:V,source:Z}))]);O.result.plugin=K.map(($)=>$.spec),O.result.plugin_origins=K}var I0=B.fn("TuiConfig.loadState")(function*(O){let Z=yield*O0(O.directory);yield*B.promise(()=>k({directories:Z,cwd:O.directory}));let W=X.QITQODE_DISABLE_PROJECT_CONFIG?[]:yield*_0("tui",O.directory),j={result:{}};for(let $ of G(T.Path.config,"tui"))yield*B.promise(()=>S(j,$,O)).pipe(B.orDie);if(X.QITQODE_TUI_CONFIG){let $=X.QITQODE_TUI_CONFIG;yield*B.promise(()=>S(j,$,O)).pipe(B.orDie),u.debug("loaded custom tui config",{path:$})}for(let $ of W)yield*B.promise(()=>S(j,$,O)).pipe(B.orDie);let V=A(Z).filter(($)=>$.endsWith(".qitqode")||$===X.QITQODE_CONFIG_DIR);for(let $ of V){if(!$.endsWith(".qitqode")&&$!==X.QITQODE_CONFIG_DIR)continue;for(let J of G($,"tui"))yield*B.promise(()=>S(j,J,O)).pipe(B.orDie)}let K={...j.result.keybinds??{}};if(process.platform==="win32")K.terminal_suspend="none",K.input_undo??=A(["ctrl+z",...D.Keybinds.shape.input_undo.parse(void 0).split(",")]).join(",");return j.result.keybinds=D.Keybinds.parse(K),{config:j.result,dirs:j.result.plugin?.length?V:[]}}),$0=o.effect(C,B.gen(function*(){let O=yield*f,Z=yield*x.Service,W=yield*I0({directory:O}),j=yield*B.forEach(W.dirs,($)=>Z.install($,{add:[{name:"@qitqode/plugin",version:y?void 0:t}]}).pipe(B.forkScoped),{concurrency:"unbounded"}),V=B.fn("TuiConfig.get")(()=>B.succeed(W.config)),K=B.fn("TuiConfig.waitForDependencies")(()=>B.forEach(j,a.join,{concurrency:"unbounded"}).pipe(B.ignore(),B.asVoid));return C.of({get:V,waitForDependencies:K})}).pipe(B.withSpan("TuiConfig.layer"))),j0=$0.pipe(o.provide(x.defaultLayer),o.provide(d.defaultLayer)),{runPromise:w0}=i(C,j0);async function R0(){await w0((O)=>O.waitForDependencies())}async function C0(){return w0((O)=>O.get())}async function z0(O){let Z=await Z0(O);if(!Z)return{};return P0(Z,O).catch((W)=>{return u.warn("failed to load tui config",{path:O,error:W}),{}})}async function P0(O,Z){return e.substitute({text:O,type:"path",path:Z,missing:"empty"}).then((W)=>E.jsonc(W,Z)).then((W)=>{if(!s(W))return{};return E.schema(W0,U0(W),Z)}).then((W)=>M0(W,Z)).catch((W)=>{return u.warn("invalid tui config",{path:Z,error:W}),{}})}
|
|
2
|
+
import{En as E,Fn as e,Gn as I}from"./chunk-r4ndwym0.js";import{In as b,Kn as g,Ln as n,On as i,Pn as x,bo as _0,co as O0,do as G,eo as Z0}from"./chunk-3ytjm3az.js";import{lo as p}from"./chunk-vcw00k0n.js";import{Qs as T,Rs as X,Vr as t,Yr as y,_r as A,_s as q,ds as c}from"./chunk-m5m448mg.js";import{$s as s,ot as d,st as Q}from"./chunk-tqj69nh6.js";import{ut as w}from"./chunk-5tray1fw.js";import{EI as a,OE as o,RM as M,pH as B,zC as v}from"./chunk-zs8kqdsf.js";import{DO as F}from"./chunk-7xm75w1e.js";var h={};F(h,{waitForDependencies:()=>R0,layer:()=>$0,get:()=>C0,defaultLayer:()=>j0,TuiConfig:()=>h,Service:()=>C,Info:()=>W0});import r from"path";var D={};F(D,{Keybinds:()=>Q0,ConfigKeybinds:()=>D});var _=(O,Z)=>M.String.pipe(M.optional,M.withDecodingDefault(B.succeed(O))).annotate({description:Z}),B0=process.platform==="win32"?"ctrl+z,ctrl+-,super+z":"ctrl+-,super+z",K0=M.Struct({leader:_("ctrl+x","Leader key for keybind combinations"),app_exit:_("ctrl+c,ctrl+d,<leader>q","Exit the application"),editor_open:_("<leader>e","Open external editor"),theme_list:_("<leader>t","List available themes"),sidebar_toggle:_("<leader>b","Toggle sidebar"),scrollbar_toggle:_("none","Toggle session scrollbar"),status_view:_("<leader>s","View status"),session_export:_("<leader>x","Export session to editor"),session_new:_("<leader>n","Create a new session"),session_list:_("<leader>l","List all sessions"),session_timeline:_("<leader>g","Show session timeline"),session_fork:_("none","Fork session from message"),session_rename:_("ctrl+r","Rename session"),session_delete:_("ctrl+d","Delete session"),stash_delete:_("ctrl+d","Delete stash entry"),model_provider_list:_("ctrl+a","Open provider list from model dialog"),model_favorite_toggle:_("ctrl+f","Toggle model favorite status"),session_share:_("none","Share current session"),session_unshare:_("none","Unshare current session"),session_interrupt:_("escape","Interrupt current session"),session_compact:_("<leader>c","Compact the session"),messages_page_up:_("pageup,ctrl+alt+b","Scroll messages up by one page"),messages_page_down:_("pagedown,ctrl+alt+f","Scroll messages down by one page"),messages_line_up:_("ctrl+alt+y","Scroll messages up by one line"),messages_line_down:_("ctrl+alt+e","Scroll messages down by one line"),messages_half_page_up:_("ctrl+alt+u","Scroll messages up by half page"),messages_half_page_down:_("ctrl+alt+d","Scroll messages down by half page"),messages_first:_("ctrl+g,home","Navigate to first message"),messages_last:_("ctrl+alt+g,end","Navigate to last message"),messages_next:_("none","Navigate to next message"),messages_previous:_("none","Navigate to previous message"),messages_last_user:_("none","Navigate to last user message"),messages_copy:_("<leader>y","Copy message"),messages_undo:_("<leader>u","Undo message"),messages_redo:_("<leader>r","Redo message"),messages_toggle_conceal:_("<leader>h","Toggle code block concealment in messages"),tool_details:_("none","Toggle tool details visibility"),model_list:_("<leader>m","List available models"),model_cycle_recent:_("f2","Next recently used model"),model_cycle_recent_reverse:_("shift+f2","Previous recently used model"),model_cycle_favorite:_("none","Next favorite model"),model_cycle_favorite_reverse:_("none","Previous favorite model"),command_list:_("ctrl+p","List available commands"),agent_list:_("<leader>a","List agents"),agent_cycle:_("ctrl+space","Next agent"),agent_cycle_reverse:_("none","Previous agent"),variant_cycle:_("ctrl+t","Cycle model variants"),variant_list:_("none","List model variants"),input_clear:_("ctrl+c","Clear input field"),input_paste:_("super+v,ctrl+v","Paste from clipboard"),input_submit:_("return","Submit input"),input_newline:_("shift+return,ctrl+return,alt+return,ctrl+j","Insert newline in input"),input_move_left:_("left,ctrl+b","Move cursor left in input"),input_move_right:_("right,ctrl+f","Move cursor right in input"),input_move_up:_("up","Move cursor up in input"),input_move_down:_("down","Move cursor down in input"),input_select_left:_("shift+left","Select left in input"),input_select_right:_("shift+right","Select right in input"),input_select_up:_("shift+up","Select up in input"),input_select_down:_("shift+down","Select down in input"),input_line_home:_("ctrl+a","Move to start of line in input"),input_line_end:_("ctrl+e","Move to end of line in input"),input_select_line_home:_("ctrl+shift+a","Select to start of line in input"),input_select_line_end:_("ctrl+shift+e","Select to end of line in input"),input_visual_line_home:_("alt+a","Move to start of visual line in input"),input_visual_line_end:_("alt+e","Move to end of visual line in input"),input_select_visual_line_home:_("alt+shift+a","Select to start of visual line in input"),input_select_visual_line_end:_("alt+shift+e","Select to end of visual line in input"),input_buffer_home:_("home","Move to start of buffer in input"),input_buffer_end:_("end","Move to end of buffer in input"),input_select_buffer_home:_("shift+home","Select to start of buffer in input"),input_select_buffer_end:_("shift+end","Select to end of buffer in input"),input_delete_line:_("ctrl+shift+d","Delete line in input"),input_delete_to_line_end:_("ctrl+k","Delete to end of line in input"),input_delete_to_line_start:_("ctrl+u","Delete to start of line in input"),input_backspace:_("backspace,shift+backspace","Backspace in input"),input_delete:_("ctrl+d,delete,shift+delete","Delete character in input"),input_undo:_(B0,"Undo in input"),input_redo:_("ctrl+.,super+shift+z","Redo in input"),input_word_forward:_("alt+f,alt+right,ctrl+right","Move word forward in input"),input_word_backward:_("alt+b,alt+left,ctrl+left","Move word backward in input"),input_select_word_forward:_("alt+shift+f,alt+shift+right","Select word forward in input"),input_select_word_backward:_("alt+shift+b,alt+shift+left","Select word backward in input"),input_delete_word_forward:_("alt+d,alt+delete,ctrl+delete","Delete word forward in input"),input_delete_word_backward:_("ctrl+w,ctrl+backspace,alt+backspace","Delete word backward in input"),history_previous:_("up","Previous history item"),history_next:_("down","Next history item"),session_child_first:_("<leader>down","Go to first child session"),session_child_cycle:_("right","Go to next child session"),session_child_cycle_reverse:_("left","Go to previous child session"),session_parent:_("up","Go to parent session"),terminal_suspend:_("ctrl+z","Suspend terminal"),terminal_title_toggle:_("none","Toggle terminal title"),tips_toggle:_("<leader>h","Toggle tips on home screen"),plugin_manager:_("none","Open plugin manager dialog"),display_thinking:_("none","Toggle thinking blocks visibility")}).annotate({identifier:"KeybindsConfig"}),Q0=p(K0);var V0=w.object(Object.fromEntries(Object.keys(D.Keybinds.shape).map((O)=>[O,w.string().optional()]))).strict(),R=w.object({scroll_speed:w.number().min(0.001).optional().describe("TUI scroll speed"),scroll_acceleration:w.object({enabled:w.boolean().describe("Enable scroll acceleration")}).optional().describe("Scroll acceleration settings"),diff_style:w.enum(["auto","stacked"]).optional().describe("Control diff rendering style: 'auto' adapts to terminal width, 'stacked' always shows single column"),mouse:w.boolean().optional().describe("Enable or disable mouse capture (default: true on desktop, false on Android/Termux)"),accessible:w.boolean().optional().describe("Screen-reader friendly mode: linear main-screen rendering, no mouse capture, reduced motion, no sound (default: false)"),reduce_motion:w.boolean().optional().describe("Disable spinners and other animations, showing static text instead (default: false)"),sound:w.boolean().optional().describe("Enable or disable sound cues (default: true)"),announcements:w.enum(["quiet","normal","verbose"]).optional().describe("Verbosity of accessible-mode screen-reader announcements: 'quiet' announces only turn boundaries, errors, and stops; 'normal' adds tool-start lines; 'verbose' adds tool-completion lines (default: normal). Errors are always announced.")}),P=w.object({$schema:w.string().optional(),theme:w.string().optional(),keybinds:V0.optional(),plugin:I.Spec.zod.array().optional(),plugin_enabled:w.record(w.string(),w.boolean()).optional()}).extend(R.shape).strict();var H=q.create({service:"tui.migrate"}),Y0="https://qitqode.com/tui.json",D0=P.shape.theme.optional(),l=w.record(w.string(),w.unknown()).optional(),H0=w.object({scroll_speed:R.shape.scroll_speed.catch(void 0),scroll_acceleration:R.shape.scroll_acceleration.catch(void 0),diff_style:R.shape.diff_style.catch(void 0)}).strip();async function k(O){let Z=await G0(O);for(let W of Z){let j=await Q.readText(W).catch((m)=>{H.warn("failed to read config for tui migration",{path:W,error:m});return});if(!j)continue;let V=[],K=b(j,V,{allowTrailingComma:!0});if(V.length||!K||typeof K!=="object"||Array.isArray(K))continue;let $=D0.safeParse("theme"in K?K.theme:void 0),J=l.safeParse("keybinds"in K?K.keybinds:void 0),N=l.safeParse("tui"in K?K.tui:void 0),Y={theme:$.success?$.data:void 0,keybinds:J.success?J.data:void 0,tui:N.success?N.data:void 0},L=Y.tui?J0(Y.tui):void 0;if(Y.theme===void 0&&Y.keybinds===void 0&&!L)continue;let U=r.join(r.dirname(W),"tui.json");if(await Q.exists(U))continue;let z={$schema:Y0};if(Y.theme!==void 0)z.theme=Y.theme;if(Y.keybinds!==void 0)z.keybinds=Y.keybinds;if(L)Object.assign(z,L);if(!await Q.write(U,JSON.stringify(z,null,2)).then(()=>!0).catch((m)=>{return H.warn("failed to write tui migration target",{from:W,to:U,error:m}),!1}))continue;if(!await A0(W,j)){H.warn("tui config migrated but source file was not stripped",{from:W,to:U});continue}H.info("migrated tui config",{from:W,to:U})}}function J0(O){let Z=H0.parse(O);if(Z.scroll_speed===void 0&&Z.diff_style===void 0&&Z.scroll_acceleration===void 0)return;return Z}async function A0(O,Z){let W=O+".tui-migration.bak";if(!(await Q.exists(W)?!0:await Q.write(W,Z).then(()=>!0).catch(($)=>{return H.warn("failed to backup source config during tui migration",{path:O,backup:W,error:$}),!1})))return!1;let K=["theme","keybinds","tui"].reduce(($,J)=>{let N=g($,[J],void 0,{formattingOptions:{insertSpaces:!0,tabSize:2}});if(!N.length)return $;return n($,N)},Z);return Q.write(O,K).then(()=>{return H.info("stripped tui keys from server config",{path:O,backup:W}),!0}).catch(($)=>{return H.warn("failed to strip legacy tui keys from server config",{path:O,backup:W,error:$}),!1})}async function G0(O){let Z=[...G(T.Path.config,"qitqode"),...await Q.findUp(["qitqode.json","qitqode.jsonc"],O.cwd,void 0,{rootFirst:!0})];for(let j of A(O.directories))Z.push(...G(j,"qitqode"));if(X.QITQODE_CONFIG)Z.push(X.QITQODE_CONFIG);return(await Promise.all(A(Z).map(async(j)=>{return await Q.exists(j)?j:void 0}))).filter((j)=>!!j)}var f=v.Reference("CurrentWorkingDirectory",{defaultValue:()=>process.cwd()});var u=q.create({service:"tui.config"}),W0=P;class C extends v.Service()("@qitqode/TuiConfig"){}function N0(O,Z){if(Q.contains(Z.directory,O))return"local";return"global"}function U0(O){let Z={...O};if(!("tui"in Z))return Z;if(!s(Z.tui))return delete Z.tui,Z;let W=Z.tui;return delete Z.tui,{...W,...Z}}async function M0(O,Z){if(!O.plugin)return O;for(let W=0;W<O.plugin.length;W++)O.plugin[W]=await I.resolvePluginSpec(O.plugin[W],Z);return O}async function S(O,Z,W){let j=await z0(Z);if(O.result=c(O.result,j),!j.plugin?.length)return;let V=N0(Z,W),K=I.deduplicatePluginOrigins([...O.result.plugin_origins??[],...j.plugin.map(($)=>({spec:$,scope:V,source:Z}))]);O.result.plugin=K.map(($)=>$.spec),O.result.plugin_origins=K}var I0=B.fn("TuiConfig.loadState")(function*(O){let Z=yield*O0(O.directory);yield*B.promise(()=>k({directories:Z,cwd:O.directory}));let W=X.QITQODE_DISABLE_PROJECT_CONFIG?[]:yield*_0("tui",O.directory),j={result:{}};for(let $ of G(T.Path.config,"tui"))yield*B.promise(()=>S(j,$,O)).pipe(B.orDie);if(X.QITQODE_TUI_CONFIG){let $=X.QITQODE_TUI_CONFIG;yield*B.promise(()=>S(j,$,O)).pipe(B.orDie),u.debug("loaded custom tui config",{path:$})}for(let $ of W)yield*B.promise(()=>S(j,$,O)).pipe(B.orDie);let V=A(Z).filter(($)=>$.endsWith(".qitqode")||$===X.QITQODE_CONFIG_DIR);for(let $ of V){if(!$.endsWith(".qitqode")&&$!==X.QITQODE_CONFIG_DIR)continue;for(let J of G($,"tui"))yield*B.promise(()=>S(j,J,O)).pipe(B.orDie)}let K={...j.result.keybinds??{}};if(process.platform==="win32")K.terminal_suspend="none",K.input_undo??=A(["ctrl+z",...D.Keybinds.shape.input_undo.parse(void 0).split(",")]).join(",");return j.result.keybinds=D.Keybinds.parse(K),{config:j.result,dirs:j.result.plugin?.length?V:[]}}),$0=o.effect(C,B.gen(function*(){let O=yield*f,Z=yield*x.Service,W=yield*I0({directory:O}),j=yield*B.forEach(W.dirs,($)=>Z.install($,{add:[{name:"@qitqode/plugin",version:y?void 0:t}]}).pipe(B.forkScoped),{concurrency:"unbounded"}),V=B.fn("TuiConfig.get")(()=>B.succeed(W.config)),K=B.fn("TuiConfig.waitForDependencies")(()=>B.forEach(j,a.join,{concurrency:"unbounded"}).pipe(B.ignore(),B.asVoid));return C.of({get:V,waitForDependencies:K})}).pipe(B.withSpan("TuiConfig.layer"))),j0=$0.pipe(o.provide(x.defaultLayer),o.provide(d.defaultLayer)),{runPromise:w0}=i(C,j0);async function R0(){await w0((O)=>O.waitForDependencies())}async function C0(){return w0((O)=>O.get())}async function z0(O){let Z=await Z0(O);if(!Z)return{};return P0(Z,O).catch((W)=>{return u.warn("failed to load tui config",{path:O,error:W}),{}})}async function P0(O,Z){return e.substitute({text:O,type:"path",path:Z,missing:"empty"}).then((W)=>E.jsonc(W,Z)).then((W)=>{if(!s(W))return{};return E.schema(W0,U0(W),Z)}).then((W)=>M0(W,Z)).catch((W)=>{return u.warn("invalid tui config",{path:Z,error:W}),{}})}
|
|
3
3
|
export{W0 as u,C as v,$0 as w,j0 as x,R0 as y,C0 as z,h as A};
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
// @bun
|
|
2
|
+
import{h as N}from"./chunk-5eq1fft9.js";import{F as K,G as L,H as $}from"./chunk-g9cjsfvg.js";import"./chunk-t9mz17gb.js";import{Rd as X}from"./chunk-yajd975f.js";import{Vf as j}from"./chunk-rbk8seme.js";import{zg as H}from"./chunk-takew94z.js";import{gh as Z}from"./chunk-fq0x3esz.js";import"./chunk-44a82dg0.js";import"./chunk-vxyy2dp3.js";import"./chunk-yp5bypsp.js";import"./chunk-7hm0c2yg.js";import"./chunk-gj0wt0cy.js";import"./chunk-5hw6xa49.js";import"./chunk-326p5b10.js";import{Xj as w}from"./chunk-04n2ycg5.js";import"./chunk-8ymffyep.js";import"./chunk-mcg24gkb.js";import"./chunk-redjxn13.js";import"./chunk-bn0h9dny.js";import"./chunk-r4ndwym0.js";import"./chunk-3ytjm3az.js";import"./chunk-htz93dsd.js";import"./chunk-vcw00k0n.js";import{qo as F,vo as G}from"./chunk-r78czx4d.js";import"./chunk-2hc5z7b5.js";import"./chunk-d68fzyw7.js";import"./chunk-4jtxtkj7.js";import"./chunk-ay8emwym.js";import"./chunk-2maqde7w.js";import"./chunk-kj20f048.js";import"./chunk-cqtkxwd8.js";import"./chunk-x9rbv6p6.js";import"./chunk-g5rabwre.js";import"./chunk-jbx3s7nw.js";import"./chunk-15hw2z9t.js";import"./chunk-48ge2ryx.js";import"./chunk-n9xns8by.js";import"./chunk-y9q0hb7b.js";import"./chunk-c1bdzxbx.js";import"./chunk-ehhas0ew.js";import"./chunk-d6ry9418.js";import"./chunk-0dt0bxz6.js";import"./chunk-10bjs581.js";import"./chunk-4cnwn1rh.js";import"./chunk-gcw4rn10.js";import"./chunk-m5m448mg.js";import"./chunk-tqj69nh6.js";import"./chunk-ag8kz1e7.js";import"./chunk-5tray1fw.js";import"./chunk-c11d28qn.js";import"./chunk-mzs2pjyc.js";import"./chunk-gagtmjmp.js";import{pH as z}from"./chunk-zs8kqdsf.js";import"./chunk-dxpj0cxh.js";import"./chunk-zw815d68.js";import"./chunk-7xm75w1e.js";var Q="forgewise";function R(D){return z.gen(function*(){let J=yield*D.get(Q);if(!J||J.type!=="api")return;return(J.metadata??{}).sub})}var O=()=>z.gen(function*(){if((yield*N())==="revoked")return null;let D=yield*z.promise(()=>F());if(!D)return yield*z.sync(()=>j.println(j.Style.TEXT_DANGER+"Not signed in to Forgewise. Run `qitqode auth login` first."+j.Style.TEXT_NORMAL)),null;let J=yield*w.Service,M=D.method==="sso"?yield*R(J):void 0;return{key:D.key,method:D.method,sub:M}}),q=()=>z.gen(function*(){let D=yield*O();if(!D)return;let J=yield*z.tryPromise({try:()=>H(D),catch:(P)=>P}).pipe(z.map((P)=>({ok:!0,result:P})),z.catch((P)=>z.succeed({ok:!1,error:P})));if(!J.ok){let P=J.error instanceof G?J.error.message:"Could not fetch balance.";yield*z.sync(()=>j.println(j.Style.TEXT_DANGER+P+j.Style.TEXT_NORMAL));return}let M=J.result;if(!M){yield*z.sync(()=>j.println(j.Style.TEXT_DANGER+"Could not fetch balance."+j.Style.TEXT_NORMAL));return}yield*z.sync(()=>j.println(j.Style.TEXT_SUCCESS+"Qredits balance: "+j.Style.TEXT_NORMAL+j.Style.TEXT_HIGHLIGHT_BOLD+$(M.balance)+j.Style.TEXT_NORMAL))}).pipe(z.withSpan("qredits.balance")),A=()=>z.gen(function*(){let D=yield*O();if(!D)return;let J=D.method==="sso"&&D.sub?{userId:D.sub,accessToken:D.key}:{},M=yield*z.tryPromise({try:()=>L({...J,limit:20}),catch:(T)=>T});if(M instanceof Error){let T=M instanceof K?M.message:String(M);yield*z.sync(()=>j.println(j.Style.TEXT_DANGER+"Could not fetch history: "+T+j.Style.TEXT_NORMAL));return}if(M.length===0){yield*z.sync(()=>j.println("No spend history yet."));return}let P=j.Style.TEXT_DIM,V=j.Style.TEXT_NORMAL,W=j.Style.TEXT_DANGER;yield*z.sync(()=>{j.println(P+" Date Description Amount"+V),j.println(P+" \u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500 \u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500 \u2500\u2500\u2500\u2500\u2500\u2500"+V);for(let T of M){let Y=(T.date||"").slice(0,10).padEnd(18),_=(T.description||"").slice(0,32).padEnd(32),v=(T.amount<0?"-":" ")+$(Math.abs(T.amount)),x=T.amount<0?W:V;j.println(` ${P}${Y}${V} ${_} ${x}${v}${V}`)}})}).pipe(z.withSpan("qredits.history")),U=X({command:"qredits <command>",describe:"Check Qredits balance and spend history",builder:(D)=>D.command(X({command:"balance",describe:"Show current Qredits balance",builder:(J)=>J,async handler(){j.empty(),await Z.runPromise(q())}})).command(X({command:"history",describe:"Show recent Qredit spend history",builder:(J)=>J,async handler(){j.empty(),await Z.runPromise(A())}})).demandCommand(),async handler(){}});export{A as historyEffect,q as balanceEffect,U as QreditsCommand};
|
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
// @bun
|
|
2
|
-
import"./chunk-kdcnder5.js";import"./chunk-
|
|
2
|
+
import"./chunk-kdcnder5.js";import"./chunk-7xm75w1e.js";var e={"ui.sessionReview.title":"Sesjonsendringer","ui.sessionReview.title.lastTurn":"Endringer i siste tur","ui.sessionReview.diffStyle.unified":"Samlet","ui.sessionReview.diffStyle.split":"Delt","ui.sessionReview.openFile":"\xC5pne fil","ui.sessionReview.selection.line":"linje {{line}}","ui.sessionReview.selection.lines":"linjer {{start}}-{{end}}","ui.sessionReview.expandAll":"Utvid alle","ui.sessionReview.collapseAll":"Fold sammen alle","ui.sessionReview.change.added":"Lagt til","ui.sessionReview.change.removed":"Fjernet","ui.sessionReview.change.modified":"Endret","ui.sessionReview.image.loading":"Laster...","ui.sessionReview.image.placeholder":"Bilde","ui.sessionReview.largeDiff.title":"Diff er for stor til \xE5 gjengi","ui.sessionReview.largeDiff.meta":"Grense: {{limit}} endrede linjer. N\xE5v\xE6rende: {{current}} endrede linjer.","ui.sessionReview.largeDiff.renderAnyway":"Gjengi likevel","ui.fileMedia.kind.image":"bilde","ui.fileMedia.kind.audio":"lyd","ui.fileMedia.state.removed":"Fjernet: {{kind}}","ui.fileMedia.state.loading":"Laster inn {{kind}}...","ui.fileMedia.state.error":"Feil ved innlasting: {{kind}}","ui.fileMedia.state.unavailable":"Ikke tilgjengelig: {{kind}}","ui.fileMedia.binary.title":"Bin\xE6rfil","ui.fileMedia.binary.description.path":"{{path}} kan ikke vises fordi det er en bin\xE6rfil.","ui.fileMedia.binary.description.default":"Denne filen kan ikke vises fordi det er en bin\xE6rfil.","ui.lineComment.label.prefix":"Kommenter p\xE5 ","ui.lineComment.label.suffix":"","ui.lineComment.editorLabel.prefix":"Kommenterer p\xE5 ","ui.lineComment.editorLabel.suffix":"","ui.lineComment.placeholder":"Legg til kommentar","ui.lineComment.submit":"Kommenter","ui.sessionTurn.steps.show":"Vis trinn","ui.sessionTurn.steps.hide":"Skjul trinn","ui.sessionTurn.summary.response":"Svar","ui.sessionTurn.diff.showMore":"Vis flere endringer ({{count}})","ui.sessionTurn.retry.retrying":"Pr\xF8ver igjen","ui.sessionTurn.retry.inSeconds":"om {{seconds}}s","ui.sessionTurn.retry.attempt":"fors\xF8k #{{attempt}}","ui.sessionTurn.retry.attemptLine":"{{line}} - fors\xF8k #{{attempt}}","ui.sessionTurn.retry.geminiHot":"gemini er veldig overbelastet n\xE5","ui.sessionTurn.error.freeUsageExceeded":"Gratis bruk overskredet","ui.sessionTurn.error.addQredits":"Legg til kreditt","ui.sessionTurn.status.delegating":"Delegerer arbeid","ui.sessionTurn.status.planning":"Planlegger neste trinn","ui.sessionTurn.status.gatheringContext":"Utforsker","ui.sessionTurn.status.gatheredContext":"Utforsket","ui.sessionTurn.status.searchingCodebase":"S\xF8ker i kodebasen","ui.sessionTurn.status.searchingWeb":"S\xF8ker p\xE5 nettet","ui.sessionTurn.status.makingEdits":"Gj\xF8r endringer","ui.sessionTurn.status.runningCommands":"Kj\xF8rer kommandoer","ui.sessionTurn.status.thinking":"Tenker","ui.sessionTurn.status.thinkingWithTopic":"Tenker - {{topic}}","ui.sessionTurn.status.gatheringThoughts":"Samler tanker","ui.sessionTurn.status.consideringNextSteps":"Vurderer neste trinn","ui.messagePart.questions.dismissed":"Sp\xF8rsm\xE5l avvist","ui.messagePart.compaction":"\xD8kt komprimert","ui.messagePart.context.read.one":"{{count}} lest","ui.messagePart.context.read.other":"{{count}} lest","ui.messagePart.context.search.one":"{{count}} s\xF8k","ui.messagePart.context.search.other":"{{count}} s\xF8k","ui.messagePart.context.list.one":"{{count}} liste","ui.messagePart.context.list.other":"{{count}} lister","ui.messagePart.diagnostic.error":"Feil","ui.messagePart.title.edit":"Rediger","ui.messagePart.title.write":"Skriv","ui.messagePart.option.typeOwnAnswer":"Skriv ditt eget svar","ui.messagePart.review.title":"Gjennomg\xE5 svarene dine","ui.list.loading":"Laster","ui.list.empty":"Ingen resultater","ui.list.clearFilter":"T\xF8m filter","ui.list.emptyWithFilter.prefix":"Ingen resultater for","ui.list.emptyWithFilter.suffix":"","ui.messageNav.newMessage":"Ny melding","ui.textField.copyToClipboard":"Kopier til utklippstavlen","ui.textField.copyLink":"Kopier lenke","ui.textField.copied":"Kopiert","ui.imagePreview.alt":"Bildeforh\xE5ndsvisning","ui.scrollView.ariaLabel":"rullbart innhold","ui.tool.read":"Les","ui.tool.loaded":"Lastet","ui.tool.list":"Liste","ui.tool.glob":"Glob","ui.tool.grep":"Grep","ui.tool.webfetch":"Webhenting","ui.tool.websearch":"Netts\xF8k","ui.tool.codesearch":"Kodes\xF8k","ui.tool.shell":"Shell","ui.tool.patch":"Patch","ui.tool.todos":"Gj\xF8rem\xE5l","ui.tool.todos.read":"Les gj\xF8rem\xE5l","ui.tool.questions":"Sp\xF8rsm\xE5l","ui.tool.agent":"{{type}}-agent","ui.tool.agent.default":"Agent","ui.common.file.one":"fil","ui.common.file.other":"filer","ui.common.question.one":"sp\xF8rsm\xE5l","ui.common.question.other":"sp\xF8rsm\xE5l","ui.common.add":"Legg til","ui.common.back":"Tilbake","ui.common.cancel":"Avbryt","ui.common.confirm":"Bekreft","ui.common.dismiss":"Avvis","ui.common.close":"Lukk","ui.common.next":"Neste","ui.common.submit":"Send inn","ui.permission.deny":"Avsl\xE5","ui.permission.allowAlways":"Tillat alltid","ui.permission.allowOnce":"Tillat \xE9n gang","ui.message.expand":"Utvid melding","ui.message.collapse":"Skjul melding","ui.message.copy":"Kopier","ui.message.copyMessage":"Kopier melding","ui.message.forkMessage":"Forgren til ny sesjon","ui.message.revertMessage":"Tilbakestill til dette punktet","ui.message.copyResponse":"Kopier svar","ui.message.copied":"Kopiert!","ui.message.interrupted":"Avbrutt","ui.message.queued":"I k\xF8","ui.message.attachment.alt":"vedlegg","ui.patch.action.deleted":"Slettet","ui.patch.action.created":"Opprettet","ui.patch.action.moved":"Flyttet","ui.patch.action.patched":"Oppdatert","ui.question.subtitle.answered":"{{count}} besvart","ui.question.answer.none":"(ingen svar)","ui.question.review.notAnswered":"(ikke besvart)","ui.question.multiHint":"Velg alle som gjelder","ui.question.singleHint":"Velg ett svar","ui.question.custom.placeholder":"Skriv svaret ditt...","ui.fileSearch.placeholder":"Finn","ui.fileSearch.previousMatch":"Forrige treff","ui.fileSearch.nextMatch":"Neste treff","ui.fileSearch.close":"Lukk s\xF8k","ui.tool.task":"Oppgave","ui.tool.skill":"Ferdighet","ui.basicTool.called":"Kalte `{{tool}}`","ui.toolErrorCard.failed":"Mislyktes","ui.toolErrorCard.copyError":"Kopier feil","ui.message.duration.seconds":"{{count}}s","ui.message.duration.minutesSeconds":"{{minutes}}m {{seconds}}s"};export{e as dict};
|
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
// @bun
|
|
2
|
-
import{
|
|
2
|
+
import{BO as vQ,CO as A,FO as _}from"./chunk-7xm75w1e.js";var U1=A((_5,e6)=>{var E8=Object.prototype.hasOwnProperty,t6=Object.prototype.toString,i6=Object.defineProperty,a6=Object.getOwnPropertyDescriptor,n6=function($){if(typeof Array.isArray==="function")return Array.isArray($);return t6.call($)==="[object Array]"},r6=function($){if(!$||t6.call($)!=="[object Object]")return!1;var Q=E8.call($,"constructor"),Y=$.constructor&&$.constructor.prototype&&E8.call($.constructor.prototype,"isPrototypeOf");if($.constructor&&!Q&&!Y)return!1;var V;for(V in $);return typeof V>"u"||E8.call($,V)},s6=function($,Q){if(i6&&Q.name==="__proto__")i6($,Q.name,{enumerable:!0,configurable:!0,value:Q.newValue,writable:!0});else $[Q.name]=Q.newValue},o6=function($,Q){if(Q==="__proto__"){if(!E8.call($,Q))return;else if(a6)return a6($,Q).value}return $[Q]};e6.exports=function Z(){var $,Q,Y,V,W,z,K=arguments[0],F=1,L=arguments.length,N=!1;if(typeof K==="boolean")N=K,K=arguments[1]||{},F=2;if(K==null||typeof K!=="object"&&typeof K!=="function")K={};for(;F<L;++F)if($=arguments[F],$!=null){for(Q in $)if(Y=o6(K,Q),V=o6($,Q),K!==V){if(N&&V&&(r6(V)||(W=n6(V)))){if(W)W=!1,z=Y&&n6(Y)?Y:[];else z=Y&&r6(Y)?Y:{};s6(K,{name:Q,newValue:Z(N,z,V)})}else if(typeof V<"u")s6(K,{name:Q,newValue:V})}}return K}});var ZZ=A((x5,LQ)=>{LQ.exports={name:"gaxios",version:"7.1.4",description:"A simple common HTTP client specifically for Google APIs and services.",main:"build/cjs/src/index.js",types:"build/cjs/src/index.d.ts",files:["build/"],exports:{".":{import:{types:"./build/esm/src/index.d.ts",default:"./build/esm/src/index.js"},require:{types:"./build/cjs/src/index.d.ts",default:"./build/cjs/src/index.js"}}},scripts:{lint:"gts check --no-inline-config",test:"c8 mocha build/esm/test","presystem-test":"npm run compile","system-test":"mocha build/esm/system-test --timeout 80000",compile:"tsc -b ./tsconfig.json ./tsconfig.cjs.json && node utils/enable-esm.mjs",fix:"gts fix",prepare:"npm run compile",pretest:"npm run compile",webpack:"webpack","prebrowser-test":"npm run compile","browser-test":"node build/browser-test/browser-test-runner.js",docs:"jsdoc -c .jsdoc.js","docs-test":"linkinator docs","predocs-test":"npm run docs","samples-test":"cd samples/ && npm link ../ && npm test && cd ../",prelint:"cd samples; npm link ../; npm install",clean:"gts clean"},repository:{type:"git",directory:"packages/gaxios",url:"https://github.com/googleapis/google-cloud-node-core.git"},keywords:["google"],engines:{node:">=18"},author:"Google, LLC",license:"Apache-2.0",devDependencies:{"@babel/plugin-proposal-private-methods":"^7.18.6","@types/cors":"^2.8.6","@types/express":"^5.0.0","@types/extend":"^3.0.1","@types/mocha":"^10.0.10","@types/multiparty":"4.2.1","@types/mv":"^2.1.0","@types/ncp":"^2.0.8","@types/node":"^22.13.1","@types/sinon":"^17.0.3","@types/tmp":"^0.2.6",assert:"^2.0.0",browserify:"^17.0.0",c8:"^10.1.3",cors:"^2.8.5",express:"^5.0.0",gts:"^6.0.2","is-docker":"^3.0.0",jsdoc:"^4.0.4","jsdoc-fresh":"^5.0.0","jsdoc-region-tag":"^4.0.0",karma:"^6.0.0","karma-chrome-launcher":"^3.0.0","karma-coverage":"^2.0.0","karma-firefox-launcher":"^2.0.0","karma-mocha":"^2.0.0","karma-remap-coverage":"^0.1.5","karma-sourcemap-loader":"^0.4.0","karma-webpack":"^5.0.1",linkinator:"^6.1.2",mocha:"^11.1.0",multiparty:"^4.2.1",mv:"^2.1.1",ncp:"^2.0.0",nock:"^14.0.5","null-loader":"^4.0.1","pack-n-play":"^4.0.0",puppeteer:"^24.0.0",sinon:"^21.0.0","stream-browserify":"^3.0.0",tmp:"0.2.5","ts-loader":"^9.5.2",typescript:"5.8.3",webpack:"^5.97.1","webpack-cli":"^6.0.1"},dependencies:{extend:"^3.0.2","https-proxy-agent":"^7.0.1","node-fetch":"^3.3.2"},homepage:"https://github.com/googleapis/google-cloud-node-core/tree/main/packages/gaxios"}});var QZ=A((b5,$Z)=>{var SQ=ZZ();$Z.exports={pkg:SQ}});var G1=A((T0)=>{var VZ=T0&&T0.__importDefault||function(Z){return Z&&Z.__esModule?Z:{default:Z}};Object.defineProperty(T0,"__esModule",{value:!0});T0.GaxiosError=T0.GAXIOS_ERROR_SYMBOL=void 0;T0.defaultErrorRedactor=WZ;var YZ=VZ(U1()),BQ=VZ(QZ()),D1=BQ.default.pkg;T0.GAXIOS_ERROR_SYMBOL=Symbol.for(`${D1.name}-gaxios-error`);class M1 extends Error{config;response;code;status;error;[T0.GAXIOS_ERROR_SYMBOL]=D1.version;static[Symbol.hasInstance](Z){if(Z&&typeof Z==="object"&&T0.GAXIOS_ERROR_SYMBOL in Z&&Z[T0.GAXIOS_ERROR_SYMBOL]===D1.version)return!0;return Function.prototype[Symbol.hasInstance].call(M1,Z)}constructor(Z,$,Q,Y){super(Z,{cause:Y});if(this.config=$,this.response=Q,this.error=Y instanceof Error?Y:void 0,this.config=(0,YZ.default)(!0,{},$),this.response)this.response.config=(0,YZ.default)(!0,{},this.response.config);if(this.response){try{this.response.data=OQ(this.config.responseType,this.response?.bodyUsed?this.response?.data:void 0)}catch{}this.status=this.response.status}if(Y instanceof DOMException)this.code=Y.name;else if(Y&&typeof Y==="object"&&"code"in Y&&(typeof Y.code==="string"||typeof Y.code==="number"))this.code=Y.code}static extractAPIErrorFromResponse(Z,$="The request failed"){let Q=$;if(typeof Z.data==="string")Q=Z.data;if(Z.data&&typeof Z.data==="object"&&"error"in Z.data&&Z.data.error&&!Z.ok){if(typeof Z.data.error==="string")return{message:Z.data.error,code:Z.status,status:Z.statusText};if(typeof Z.data.error==="object"){Q="message"in Z.data.error&&typeof Z.data.error.message==="string"?Z.data.error.message:Q;let Y="status"in Z.data.error&&typeof Z.data.error.status==="string"?Z.data.error.status:Z.statusText,V="code"in Z.data.error&&typeof Z.data.error.code==="number"?Z.data.error.code:Z.status;if("errors"in Z.data.error&&Array.isArray(Z.data.error.errors)){let W=[];for(let z of Z.data.error.errors)if(typeof z==="object"&&"message"in z&&typeof z.message==="string")W.push(z.message);return Object.assign({message:W.join(`
|
|
3
3
|
`)||Q,code:V,status:Y},Z.data.error)}return Object.assign({message:Q,code:V,status:Y},Z.data.error)}}return{message:Q,code:Z.status,status:Z.statusText}}}T0.GaxiosError=M1;function OQ(Z,$){switch(Z){case"stream":return $;case"json":return JSON.parse(JSON.stringify($));case"arraybuffer":return JSON.parse(Buffer.from($).toString("utf8"));case"blob":return JSON.parse($.text());default:return $}}function WZ(Z){function Q(W){if(!W)return;W.forEach((z,K)=>{if(/^authentication$/i.test(K)||/^authorization$/i.test(K)||/secret/i.test(K))W.set(K,"<<REDACTED> - See `errorRedactor` option in `gaxios` for configuration>.")})}function Y(W,z){if(typeof W==="object"&&W!==null&&typeof W[z]==="string"){let K=W[z];if(/grant_type=/i.test(K)||/assertion=/i.test(K)||/secret/i.test(K))W[z]="<<REDACTED> - See `errorRedactor` option in `gaxios` for configuration>."}}function V(W){if(!W||typeof W!=="object")return;else if(W instanceof FormData||W instanceof URLSearchParams||"forEach"in W&&"set"in W)W.forEach((z,K)=>{if(["grant_type","assertion"].includes(K)||/secret/.test(K))W.set(K,"<<REDACTED> - See `errorRedactor` option in `gaxios` for configuration>.")});else{if("grant_type"in W)W.grant_type="<<REDACTED> - See `errorRedactor` option in `gaxios` for configuration>.";if("assertion"in W)W.assertion="<<REDACTED> - See `errorRedactor` option in `gaxios` for configuration>.";if("client_secret"in W)W.client_secret="<<REDACTED> - See `errorRedactor` option in `gaxios` for configuration>."}}if(Z.config){if(Q(Z.config.headers),Y(Z.config,"data"),V(Z.config.data),Y(Z.config,"body"),V(Z.config.body),Z.config.url.searchParams.has("token"))Z.config.url.searchParams.set("token","<<REDACTED> - See `errorRedactor` option in `gaxios` for configuration>.");if(Z.config.url.searchParams.has("client_secret"))Z.config.url.searchParams.set("client_secret","<<REDACTED> - See `errorRedactor` option in `gaxios` for configuration>.")}if(Z.response){if(WZ({config:Z.response.config}),Q(Z.response.headers),Z.response.bodyUsed)Y(Z.response,"data"),V(Z.response.data)}return Z}});var HZ=A((XZ)=>{Object.defineProperty(XZ,"__esModule",{value:!0});XZ.getRetryConfig=PQ;async function PQ(Z){let $=JZ(Z);if(!Z||!Z.config||!$&&!Z.config.retry)return{shouldRetry:!1};$=$||{},$.currentRetryAttempt=$.currentRetryAttempt||0,$.retry=$.retry===void 0||$.retry===null?3:$.retry,$.httpMethodsToRetry=$.httpMethodsToRetry||["GET","HEAD","PUT","OPTIONS","DELETE"],$.noResponseRetries=$.noResponseRetries===void 0||$.noResponseRetries===null?2:$.noResponseRetries,$.retryDelayMultiplier=$.retryDelayMultiplier?$.retryDelayMultiplier:2,$.timeOfFirstRequest=$.timeOfFirstRequest?$.timeOfFirstRequest:Date.now(),$.totalTimeout=$.totalTimeout?$.totalTimeout:Number.MAX_SAFE_INTEGER,$.maxRetryDelay=$.maxRetryDelay?$.maxRetryDelay:Number.MAX_SAFE_INTEGER;let Q=[[100,199],[408,408],[429,429],[500,599]];if($.statusCodesToRetry=$.statusCodesToRetry||Q,Z.config.retryConfig=$,!await($.shouldRetry||AQ)(Z))return{shouldRetry:!1,config:Z.config};let V=jQ($);Z.config.retryConfig.currentRetryAttempt+=1;let W=$.retryBackoff?$.retryBackoff(Z,V):new Promise((z)=>{setTimeout(z,V)});if($.onRetryAttempt)await $.onRetryAttempt(Z);return await W,{shouldRetry:!0,config:Z.config}}function AQ(Z){let $=JZ(Z);if(Z.config.signal?.aborted&&Z.code!=="TimeoutError"||Z.code==="AbortError")return!1;if(!$||$.retry===0)return!1;if(!Z.response&&($.currentRetryAttempt||0)>=$.noResponseRetries)return!1;if(!$.httpMethodsToRetry||!$.httpMethodsToRetry.includes(Z.config.method?.toUpperCase()||"GET"))return!1;if(Z.response&&Z.response.status){let Q=!1;for(let[Y,V]of $.statusCodesToRetry){let W=Z.response.status;if(W>=Y&&W<=V){Q=!0;break}}if(!Q)return!1}if($.currentRetryAttempt=$.currentRetryAttempt||0,$.currentRetryAttempt>=$.retry)return!1;return!0}function JZ(Z){if(Z&&Z.config&&Z.config.retryConfig)return Z.config.retryConfig;return}function jQ(Z){let Q=(Z.currentRetryAttempt?0:Z.retryDelay??100)+(Math.pow(Z.retryDelayMultiplier,Z.currentRetryAttempt)-1)/2*1000,Y=Z.totalTimeout-(Date.now()-Z.timeOfFirstRequest);return Math.min(Q,Y,Z.maxRetryDelay)}});var I1=A((KZ)=>{Object.defineProperty(KZ,"__esModule",{value:!0});KZ.GaxiosInterceptorManager=void 0;class zZ extends Set{}KZ.GaxiosInterceptorManager=zZ});var UZ=A((o0)=>{var EQ=o0&&o0.__importDefault||function(Z){return Z&&Z.__esModule?Z:{default:Z}},s0;Object.defineProperty(o0,"__esModule",{value:!0});o0.Gaxios=void 0;var hQ=EQ(U1()),fQ=_("https"),p0=G1(),kQ=HZ(),wZ=_("stream"),FZ=I1(),yQ=async()=>globalThis.crypto?.randomUUID()||(await import("crypto")).randomUUID(),_Q=204;class R1{agentCache=new Map;defaults;interceptors;constructor(Z){this.defaults=Z||{},this.interceptors={request:new FZ.GaxiosInterceptorManager,response:new FZ.GaxiosInterceptorManager}}fetch(...Z){let $=Z[0],Q=Z[1],Y=void 0,V=new Headers;if(typeof $==="string")Y=new URL($);else if($ instanceof URL)Y=$;else if($&&$.url)Y=new URL($.url);if($&&typeof $==="object"&&"headers"in $)s0.mergeHeaders(V,$.headers);if(Q)s0.mergeHeaders(V,new Headers(Q.headers));if(typeof $==="object"&&!($ instanceof URL))return this.request({...Q,...$,headers:V,url:Y});else return this.request({...Q,headers:V,url:Y})}async request(Z={}){let $=await this.#Y(Z);return $=await this.#$($),this.#Q(this._request($))}async _defaultAdapter(Z){let $=Z.fetchImplementation||this.defaults.fetchImplementation||await s0.#H(),Q={...Z};delete Q.data;let Y=await $(Z.url,Q),V=await this.getResponseData(Z,Y);if(!Object.getOwnPropertyDescriptor(Y,"data")?.configurable)Object.defineProperties(Y,{data:{configurable:!0,writable:!0,enumerable:!0,value:V}});return Object.assign(Y,{config:Z,data:V})}async _request(Z){try{let $;if(Z.adapter)$=await Z.adapter(Z,this._defaultAdapter.bind(this));else $=await this._defaultAdapter(Z);if(!Z.validateStatus($.status)){if(Z.responseType==="stream"){let Y=[];for await(let V of $.data)Y.push(V);$.data=Y.toString()}let Q=p0.GaxiosError.extractAPIErrorFromResponse($,`Request failed with status code ${$.status}`);throw new p0.GaxiosError(Q?.message,Z,$,Q)}return $}catch($){let Q;if($ instanceof p0.GaxiosError)Q=$;else if($ instanceof Error)Q=new p0.GaxiosError($.message,Z,void 0,$);else Q=new p0.GaxiosError("Unexpected Gaxios Error",Z,void 0,$);let{shouldRetry:Y,config:V}=await(0,kQ.getRetryConfig)(Q);if(Y&&V)return Q.config.retryConfig.currentRetryAttempt=V.retryConfig.currentRetryAttempt,Z.retryConfig=Q.config?.retryConfig,this.#V(Z),this._request(Z);if(Z.errorRedactor)Z.errorRedactor(Q);throw Q}}async getResponseData(Z,$){if($.status===_Q)return"";if(Z.maxContentLength&&$.headers.has("content-length")&&Z.maxContentLength<Number.parseInt($.headers?.get("content-length")||""))throw new p0.GaxiosError("Response's `Content-Length` is over the limit.",Z,Object.assign($,{config:Z}));switch(Z.responseType){case"stream":return $.body;case"json":{let Q=await $.text();try{return JSON.parse(Q)}catch{return Q}}case"arraybuffer":return $.arrayBuffer();case"blob":return $.blob();case"text":return $.text();default:return this.getResponseDataFromContentType($)}}#Z(Z,$=[]){let Q=new URL(Z),Y=[...$],V=(process.env.NO_PROXY??process.env.no_proxy)?.split(",")||[];for(let W of V)Y.push(W.trim());for(let W of Y)if(W instanceof RegExp){if(W.test(Q.toString()))return!1}else if(W instanceof URL){if(W.origin===Q.origin)return!1}else if(W.startsWith("*.")||W.startsWith(".")){let z=W.replace(/^\*\./,".");if(Q.hostname.endsWith(z))return!1}else if(W===Q.origin||W===Q.hostname||W===Q.href)return!1;return!0}async#$(Z){let $=Promise.resolve(Z);for(let Q of this.interceptors.request.values())if(Q)$=$.then(Q.resolved,Q.rejected);return $}async#Q(Z){let $=Promise.resolve(Z);for(let Q of this.interceptors.response.values())if(Q)$=$.then(Q.resolved,Q.rejected);return $}async#Y(Z){let $=new Headers(this.defaults.headers);s0.mergeHeaders($,Z.headers);let Q=(0,hQ.default)(!0,{},this.defaults,Z);if(!Q.url)throw Error("URL is required.");if(Q.baseURL)Q.url=new URL(Q.url,Q.baseURL);if(Q.url=new URL(Q.url),Q.params)if(Q.paramsSerializer){let W=Q.paramsSerializer(Q.params);if(W.startsWith("?"))W=W.slice(1);let z=Q.url.toString().includes("?")?"&":"?";Q.url=Q.url+z+W}else{let W=Q.url instanceof URL?Q.url:new URL(Q.url);for(let[z,K]of new URLSearchParams(Q.params))W.searchParams.append(z,K);Q.url=W}if(typeof Z.maxContentLength==="number")Q.size=Z.maxContentLength;if(typeof Z.maxRedirects==="number")Q.follow=Z.maxRedirects;let Y=typeof Q.data==="string"||Q.data instanceof ArrayBuffer||Q.data instanceof Blob||globalThis.File&&Q.data instanceof File||Q.data instanceof FormData||Q.data instanceof wZ.Readable||Q.data instanceof ReadableStream||Q.data instanceof String||Q.data instanceof URLSearchParams||ArrayBuffer.isView(Q.data)||["Blob","File","FormData"].includes(Q.data?.constructor?.name||"");if(Q.multipart?.length){let W=await yQ();$.set("content-type",`multipart/related; boundary=${W}`),Q.body=wZ.Readable.from(this.getMultipartRequest(Q.multipart,W))}else if(Y)Q.body=Q.data;else if(typeof Q.data==="object")if($.get("Content-Type")==="application/x-www-form-urlencoded")Q.body=Q.paramsSerializer?Q.paramsSerializer(Q.data):new URLSearchParams(Q.data);else{if(!$.has("content-type"))$.set("content-type","application/json");Q.body=JSON.stringify(Q.data)}else if(Q.data)Q.body=Q.data;if(Q.validateStatus=Q.validateStatus||this.validateStatus,Q.responseType=Q.responseType||"unknown",!$.has("accept")&&Q.responseType==="json")$.set("accept","application/json");let V=Q.proxy||process?.env?.HTTPS_PROXY||process?.env?.https_proxy||process?.env?.HTTP_PROXY||process?.env?.http_proxy;if(Q.agent);else if(V&&this.#Z(Q.url,Q.noProxy)){let W=await s0.#X();if(this.agentCache.has(V))Q.agent=this.agentCache.get(V);else Q.agent=new W(V,{cert:Q.cert,key:Q.key}),this.agentCache.set(V,Q.agent)}else if(Q.cert&&Q.key)if(this.agentCache.has(Q.key))Q.agent=this.agentCache.get(Q.key);else Q.agent=new fQ.Agent({cert:Q.cert,key:Q.key}),this.agentCache.set(Q.key,Q.agent);if(typeof Q.errorRedactor!=="function"&&Q.errorRedactor!==!1)Q.errorRedactor=p0.defaultErrorRedactor;if(Q.body&&!("duplex"in Q))Q.duplex="half";return this.#V(Q),Object.assign(Q,{headers:$,url:Q.url instanceof URL?Q.url:new URL(Q.url)})}#V(Z){if(Z.timeout){let $=AbortSignal.timeout(Z.timeout);if(Z.signal&&!Z.signal.aborted)Z.signal=AbortSignal.any([Z.signal,$]);else Z.signal=$}}validateStatus(Z){return Z>=200&&Z<300}async getResponseDataFromContentType(Z){let $=Z.headers.get("Content-Type");if($===null)return Z.text();if($=$.toLowerCase(),$.includes("application/json")){let Q=await Z.text();try{Q=JSON.parse(Q)}catch{}return Q}else if($.match(/^text\//))return Z.text();else return Z.blob()}async*getMultipartRequest(Z,$){let Q=`--${$}--`;for(let Y of Z){let V=Y.headers.get("Content-Type")||"application/octet-stream";if(yield`--${$}\r
|
|
4
4
|
Content-Type: ${V}\r
|
|
5
5
|
\r
|
|
6
6
|
`,typeof Y.content==="string")yield Y.content;else yield*Y.content;yield`\r
|
|
7
|
-
`}yield Q}static#W;static#J;static async#X(){return this.#W||=(await import("./chunk-kzrw6h8t.js").then((m)=>vQ(m.default))).HttpsProxyAgent,this.#W}static async#H(){let Z=typeof window<"u"&&!!window;return this.#J||=Z?window.fetch:(await import("node-fetch")).default,this.#J}static mergeHeaders(Z,...$){Z=Z instanceof Headers?Z:new Headers(Z);for(let Q of $)(Q instanceof Headers?Q:new Headers(Q)).forEach((V,W)=>{W==="set-cookie"?Z.append(W,V):Z.set(W,V)});return Z}}o0.Gaxios=R1;s0=R1});var X0=A((q0)=>{var xQ=q0&&q0.__createBinding||(Object.create?function(Z,$,Q,Y){if(Y===void 0)Y=Q;var V=Object.getOwnPropertyDescriptor($,Q);if(!V||("get"in V?!$.__esModule:V.writable||V.configurable))V={enumerable:!0,get:function(){return $[Q]}};Object.defineProperty(Z,Y,V)}:function(Z,$,Q,Y){if(Y===void 0)Y=Q;Z[Y]=$[Q]}),bQ=q0&&q0.__exportStar||function(Z,$){for(var Q in Z)if(Q!=="default"&&!Object.prototype.hasOwnProperty.call($,Q))xQ($,Z,Q)};Object.defineProperty(q0,"__esModule",{value:!0});q0.instance=q0.Gaxios=q0.GaxiosError=void 0;q0.request=gQ;var DZ=UZ();Object.defineProperty(q0,"Gaxios",{enumerable:!0,get:function(){return DZ.Gaxios}});var mQ=G1();Object.defineProperty(q0,"GaxiosError",{enumerable:!0,get:function(){return mQ.GaxiosError}});bQ(I1(),q0);q0.instance=new DZ.Gaxios;async function gQ(Z){return q0.instance.request(Z)}});var N1=A((MZ,h8)=>{(function(Z){var $,Q=/^-?(?:\d+(?:\.\d*)?|\.\d+)(?:e[+-]?\d+)?$/i,Y=Math.ceil,V=Math.floor,W="[BigNumber Error] ",z=W+"Number primitive has more than 15 significant digits: ",K=100000000000000,F=14,L=9007199254740991,N=[1,10,100,1000,1e4,1e5,1e6,1e7,1e8,1e9,10000000000,100000000000,1000000000000,10000000000000],S=1e7,P=1e9;function x(b){var v,k,m,O=B.prototype={constructor:B,toString:null,valueOf:null},t=new B(1),i=20,d=4,V0=-7,s=21,Q0=-1e7,e=1e7,Y0=!1,y0=1,w0=0,H1={prefix:"",groupSize:3,secondaryGroupSize:0,groupSeparator:",",decimalSeparator:".",fractionGroupSize:0,fractionGroupSeparator:"\xA0",suffix:""},c0="0123456789abcdefghijklmnopqrstuvwxyz",z1=!0;function B(J,X){var H,G,w,D,R,q,U,I,M=this;if(!(M instanceof B))return new B(J,X);if(X==null){if(J&&J._isBigNumber===!0){if(M.s=J.s,!J.c||J.e>e)M.c=M.e=null;else if(J.e<Q0)M.c=[M.e=0];else M.e=J.e,M.c=J.c.slice();return}if((q=typeof J=="number")&&J*0==0){if(M.s=1/J<0?(J=-J,-1):1,J===~~J){for(D=0,R=J;R>=10;R/=10,D++);if(D>e)M.c=M.e=null;else M.e=D,M.c=[J];return}I=String(J)}else{if(!Q.test(I=String(J)))return m(M,I,q);M.s=I.charCodeAt(0)==45?(I=I.slice(1),-1):1}if((D=I.indexOf("."))>-1)I=I.replace(".","");if((R=I.search(/e/i))>0){if(D<0)D=R;D+=+I.slice(R+1),I=I.substring(0,R)}else if(D<0)D=I.length}else{if(j(X,2,c0.length,"Base"),X==10&&z1)return M=new B(J),R0(M,i+M.e+1,d);if(I=String(J),q=typeof J=="number"){if(J*0!=0)return m(M,I,q,X);if(M.s=1/J<0?(I=I.slice(1),-1):1,B.DEBUG&&I.replace(/^0\.0*|\./,"").length>15)throw Error(z+J)}else M.s=I.charCodeAt(0)===45?(I=I.slice(1),-1):1;H=c0.slice(0,X),D=R=0;for(U=I.length;R<U;R++)if(H.indexOf(G=I.charAt(R))<0){if(G=="."){if(R>D){D=U;continue}}else if(!w){if(I==I.toUpperCase()&&(I=I.toLowerCase())||I==I.toLowerCase()&&(I=I.toUpperCase())){w=!0,R=-1,D=0;continue}}return m(M,String(J),q,X)}if(q=!1,I=k(I,X,10,M.s),(D=I.indexOf("."))>-1)I=I.replace(".","");else D=I.length}for(R=0;I.charCodeAt(R)===48;R++);for(U=I.length;I.charCodeAt(--U)===48;);if(I=I.slice(R,++U)){if(U-=R,q&&B.DEBUG&&U>15&&(J>L||J!==V(J)))throw Error(z+M.s*J);if((D=D-R-1)>e)M.c=M.e=null;else if(D<Q0)M.c=[M.e=0];else{if(M.e=D,M.c=[],R=(D+1)%F,D<0)R+=F;if(R<U){if(R)M.c.push(+I.slice(0,R));for(U-=F;R<U;)M.c.push(+I.slice(R,R+=F));R=F-(I=I.slice(R)).length}else R-=U;for(;R--;I+="0");M.c.push(+I)}}else M.c=[M.e=0]}B.clone=x,B.ROUND_UP=0,B.ROUND_DOWN=1,B.ROUND_CEIL=2,B.ROUND_FLOOR=3,B.ROUND_HALF_UP=4,B.ROUND_HALF_DOWN=5,B.ROUND_HALF_EVEN=6,B.ROUND_HALF_CEIL=7,B.ROUND_HALF_FLOOR=8,B.EUCLID=9,B.config=B.set=function(J){var X,H;if(J!=null)if(typeof J=="object"){if(J.hasOwnProperty(X="DECIMAL_PLACES"))H=J[X],j(H,0,P,X),i=H;if(J.hasOwnProperty(X="ROUNDING_MODE"))H=J[X],j(H,0,8,X),d=H;if(J.hasOwnProperty(X="EXPONENTIAL_AT"))if(H=J[X],H&&H.pop)j(H[0],-P,0,X),j(H[1],0,P,X),V0=H[0],s=H[1];else j(H,-P,P,X),V0=-(s=H<0?-H:H);if(J.hasOwnProperty(X="RANGE"))if(H=J[X],H&&H.pop)j(H[0],-P,-1,X),j(H[1],1,P,X),Q0=H[0],e=H[1];else if(j(H,-P,P,X),H)Q0=-(e=H<0?-H:H);else throw Error(W+X+" cannot be zero: "+H);if(J.hasOwnProperty(X="CRYPTO"))if(H=J[X],H===!!H)if(H)if(typeof crypto<"u"&&crypto&&(crypto.getRandomValues||crypto.randomBytes))Y0=H;else throw Y0=!H,Error(W+"crypto unavailable");else Y0=H;else throw Error(W+X+" not true or false: "+H);if(J.hasOwnProperty(X="MODULO_MODE"))H=J[X],j(H,0,9,X),y0=H;if(J.hasOwnProperty(X="POW_PRECISION"))H=J[X],j(H,0,P,X),w0=H;if(J.hasOwnProperty(X="FORMAT"))if(H=J[X],typeof H=="object")H1=H;else throw Error(W+X+" not an object: "+H);if(J.hasOwnProperty(X="ALPHABET"))if(H=J[X],typeof H=="string"&&!/^.?$|[+\-.\s]|(.).*\1/.test(H))z1=H.slice(0,10)=="0123456789",c0=H;else throw Error(W+X+" invalid: "+H)}else throw Error(W+"Object expected: "+J);return{DECIMAL_PLACES:i,ROUNDING_MODE:d,EXPONENTIAL_AT:[V0,s],RANGE:[Q0,e],CRYPTO:Y0,MODULO_MODE:y0,POW_PRECISION:w0,FORMAT:H1,ALPHABET:c0}},B.isBigNumber=function(J){if(!J||J._isBigNumber!==!0)return!1;if(!B.DEBUG)return!0;var X,H,G=J.c,w=J.e,D=J.s;Z:if({}.toString.call(G)=="[object Array]"){if((D===1||D===-1)&&w>=-P&&w<=P&&w===V(w)){if(G[0]===0){if(w===0&&G.length===1)return!0;break Z}if(X=(w+1)%F,X<1)X+=F;if(String(G[0]).length==X){for(X=0;X<G.length;X++)if(H=G[X],H<0||H>=K||H!==V(H))break Z;if(H!==0)return!0}}}else if(G===null&&w===null&&(D===null||D===1||D===-1))return!0;throw Error(W+"Invalid BigNumber: "+J)},B.maximum=B.max=function(){return p6(arguments,-1)},B.minimum=B.min=function(){return p6(arguments,1)},B.random=function(){var J=9007199254740992,X=Math.random()*J&2097151?function(){return V(Math.random()*J)}:function(){return(Math.random()*1073741824|0)*8388608+(Math.random()*8388608|0)};return function(H){var G,w,D,R,q,U=0,I=[],M=new B(t);if(H==null)H=i;else j(H,0,P);if(R=Y(H/F),Y0)if(crypto.getRandomValues){G=crypto.getRandomValues(new Uint32Array(R*=2));for(;U<R;)if(q=G[U]*131072+(G[U+1]>>>11),q>=9000000000000000)w=crypto.getRandomValues(new Uint32Array(2)),G[U]=w[0],G[U+1]=w[1];else I.push(q%100000000000000),U+=2;U=R/2}else if(crypto.randomBytes){G=crypto.randomBytes(R*=7);for(;U<R;)if(q=(G[U]&31)*281474976710656+G[U+1]*1099511627776+G[U+2]*4294967296+G[U+3]*16777216+(G[U+4]<<16)+(G[U+5]<<8)+G[U+6],q>=9000000000000000)crypto.randomBytes(7).copy(G,U);else I.push(q%100000000000000),U+=7;U=R/7}else throw Y0=!1,Error(W+"crypto unavailable");if(!Y0){for(;U<R;)if(q=X(),q<9000000000000000)I[U++]=q%100000000000000}if(R=I[--U],H%=F,R&&H)q=N[F-H],I[U]=V(R/q)*q;for(;I[U]===0;I.pop(),U--);if(U<0)I=[D=0];else{for(D=-1;I[0]===0;I.splice(0,1),D-=F);for(U=1,q=I[0];q>=10;q/=10,U++);if(U<F)D-=F-U}return M.e=D,M.c=I,M}}(),B.sum=function(){var J=1,X=arguments,H=new B(X[0]);for(;J<X.length;)H=H.plus(X[J++]);return H},k=function(){var J="0123456789";function X(H,G,w,D){var R,q=[0],U,I=0,M=H.length;for(;I<M;){for(U=q.length;U--;q[U]*=G);q[0]+=D.indexOf(H.charAt(I++));for(R=0;R<q.length;R++)if(q[R]>w-1){if(q[R+1]==null)q[R+1]=0;q[R+1]+=q[R]/w|0,q[R]%=w}}return q.reverse()}return function(H,G,w,D,R){var q,U,I,M,T,E,h,c,Z0=H.indexOf("."),W0=i,l=d;if(Z0>=0)M=w0,w0=0,H=H.replace(".",""),c=new B(G),E=c.pow(H.length-Z0),w0=M,c.c=X(J0(C(E.c),E.e,"0"),10,w,J),c.e=c.c.length;h=X(H,G,w,R?(q=c0,J):(q=J,c0)),I=M=h.length;for(;h[--M]==0;h.pop());if(!h[0])return q.charAt(0);if(Z0<0)--I;else E.c=h,E.e=I,E.s=D,E=v(E,c,W0,l,w),h=E.c,T=E.r,I=E.e;if(U=I+W0+1,Z0=h[U],M=w/2,T=T||U<0||h[U+1]!=null,T=l<4?(Z0!=null||T)&&(l==0||l==(E.s<0?3:2)):Z0>M||Z0==M&&(l==4||T||l==6&&h[U-1]&1||l==(E.s<0?8:7)),U<1||!h[0])H=T?J0(q.charAt(1),-W0,q.charAt(0)):q.charAt(0);else{if(h.length=U,T){for(--w;++h[--U]>w;)if(h[U]=0,!U)++I,h=[1].concat(h)}for(M=h.length;!h[--M];);for(Z0=0,H="";Z0<=M;H+=q.charAt(h[Z0++]));H=J0(H,I,q.charAt(0))}return H}}(),v=function(){function J(G,w,D){var R,q,U,I,M=0,T=G.length,E=w%S,h=w/S|0;for(G=G.slice();T--;)U=G[T]%S,I=G[T]/S|0,R=h*U+I*E,q=E*U+R%S*S+M,M=(q/D|0)+(R/S|0)+h*I,G[T]=q%D;if(M)G=[M].concat(G);return G}function X(G,w,D,R){var q,U;if(D!=R)U=D>R?1:-1;else for(q=U=0;q<D;q++)if(G[q]!=w[q]){U=G[q]>w[q]?1:-1;break}return U}function H(G,w,D,R){var q=0;for(;D--;)G[D]-=q,q=G[D]<w[D]?1:0,G[D]=q*R+G[D]-w[D];for(;!G[0]&&G.length>1;G.splice(0,1));}return function(G,w,D,R,q){var U,I,M,T,E,h,c,Z0,W0,l,a,z0,v8,w1,F1,v0,K8,N0=G.s==w.s?1:-1,K0=G.c,$0=w.c;if(!K0||!K0[0]||!$0||!$0[0])return new B(!G.s||!w.s||(K0?$0&&K0[0]==$0[0]:!$0)?NaN:K0&&K0[0]==0||!$0?N0*0:N0/0);if(Z0=new B(N0),W0=Z0.c=[],I=G.e-w.e,N0=D+I+1,!q)q=K,I=u(G.e/F)-u(w.e/F),N0=N0/F|0;for(M=0;$0[M]==(K0[M]||0);M++);if($0[M]>(K0[M]||0))I--;if(N0<0)W0.push(1),T=!0;else{if(w1=K0.length,v0=$0.length,M=0,N0+=2,E=V(q/($0[0]+1)),E>1)$0=J($0,E,q),K0=J(K0,E,q),v0=$0.length,w1=K0.length;v8=v0,l=K0.slice(0,v0),a=l.length;for(;a<v0;l[a++]=0);if(K8=$0.slice(),K8=[0].concat(K8),F1=$0[0],$0[1]>=q/2)F1++;do{if(E=0,U=X($0,l,v0,a),U<0){if(z0=l[0],v0!=a)z0=z0*q+(l[1]||0);if(E=V(z0/F1),E>1){if(E>=q)E=q-1;h=J($0,E,q),c=h.length,a=l.length;while(X(h,l,c,a)==1)E--,H(h,v0<c?K8:$0,c,q),c=h.length,U=1}else{if(E==0)U=E=1;h=$0.slice(),c=h.length}if(c<a)h=[0].concat(h);if(H(l,h,a,q),a=l.length,U==-1)while(X($0,l,v0,a)<1)E++,H(l,v0<a?K8:$0,a,q),a=l.length}else if(U===0)E++,l=[0];if(W0[M++]=E,l[0])l[a++]=K0[v8]||0;else l=[K0[v8]],a=1}while((v8++<w1||l[0]!=null)&&N0--);if(T=l[0]!=null,!W0[0])W0.splice(0,1)}if(q==K){for(M=1,N0=W0[0];N0>=10;N0/=10,M++);R0(Z0,D+(Z0.e=M+I*F-1)+1,R,T)}else Z0.e=I,Z0.r=+T;return Z0}}();function K1(J,X,H,G){var w,D,R,q,U;if(H==null)H=d;else j(H,0,8);if(!J.c)return J.toString();if(w=J.c[0],R=J.e,X==null)U=C(J.c),U=G==1||G==2&&(R<=V0||R>=s)?o(U,R):J0(U,R,"0");else if(J=R0(new B(J),X,H),D=J.e,U=C(J.c),q=U.length,G==1||G==2&&(X<=D||D<=V0)){for(;q<X;U+="0",q++);U=o(U,D)}else if(X-=R+(G===2&&D>R),U=J0(U,D,"0"),D+1>q){if(--X>0)for(U+=".";X--;U+="0");}else if(X+=D-q,X>0){if(D+1==q)U+=".";for(;X--;U+="0");}return J.s<0&&w?"-"+U:U}function p6(J,X){var H,G,w=1,D=new B(J[0]);for(;w<J.length;w++)if(G=new B(J[w]),!G.s||(H=f(D,G))===X||H===0&&D.s===X)D=G;return D}function q1(J,X,H){var G=1,w=X.length;for(;!X[--w];X.pop());for(w=X[0];w>=10;w/=10,G++);if((H=G+H*F-1)>e)J.c=J.e=null;else if(H<Q0)J.c=[J.e=0];else J.e=H,J.c=X;return J}m=function(){var J=/^(-?)0([xbo])(?=\w[\w.]*$)/i,X=/^([^.]+)\.$/,H=/^\.([^.]+)$/,G=/^-?(Infinity|NaN)$/,w=/^\s*\+(?=[\w.])|^\s+|\s+$/g;return function(D,R,q,U){var I,M=q?R:R.replace(w,"");if(G.test(M))D.s=isNaN(M)?null:M<0?-1:1;else{if(!q){if(M=M.replace(J,function(T,E,h){return I=(h=h.toLowerCase())=="x"?16:h=="b"?2:8,!U||U==I?E:T}),U)I=U,M=M.replace(X,"$1").replace(H,"0.$1");if(R!=M)return new B(M,I)}if(B.DEBUG)throw Error(W+"Not a"+(U?" base "+U:"")+" number: "+R);D.s=null}D.c=D.e=null}}();function R0(J,X,H,G){var w,D,R,q,U,I,M,T=J.c,E=N;if(T){Z:{for(w=1,q=T[0];q>=10;q/=10,w++);if(D=X-w,D<0)D+=F,R=X,U=T[I=0],M=V(U/E[w-R-1]%10);else if(I=Y((D+1)/F),I>=T.length)if(G){for(;T.length<=I;T.push(0));U=M=0,w=1,D%=F,R=D-F+1}else break Z;else{U=q=T[I];for(w=1;q>=10;q/=10,w++);D%=F,R=D-F+w,M=R<0?0:V(U/E[w-R-1]%10)}if(G=G||X<0||T[I+1]!=null||(R<0?U:U%E[w-R-1]),G=H<4?(M||G)&&(H==0||H==(J.s<0?3:2)):M>5||M==5&&(H==4||G||H==6&&(D>0?R>0?U/E[w-R]:0:T[I-1])%10&1||H==(J.s<0?8:7)),X<1||!T[0]){if(T.length=0,G)X-=J.e+1,T[0]=E[(F-X%F)%F],J.e=-X||0;else T[0]=J.e=0;return J}if(D==0)T.length=I,q=1,I--;else T.length=I+1,q=E[F-D],T[I]=R>0?V(U/E[w-R]%E[R])*q:0;if(G)for(;;)if(I==0){for(D=1,R=T[0];R>=10;R/=10,D++);R=T[0]+=q;for(q=1;R>=10;R/=10,q++);if(D!=q){if(J.e++,T[0]==K)T[0]=1}break}else{if(T[I]+=q,T[I]!=K)break;T[I--]=0,q=1}for(D=T.length;T[--D]===0;T.pop());}if(J.e>e)J.c=J.e=null;else if(J.e<Q0)J.c=[J.e=0]}return J}function _0(J){var X,H=J.e;if(H===null)return J.toString();return X=C(J.c),X=H<=V0||H>=s?o(X,H):J0(X,H,"0"),J.s<0?"-"+X:X}if(O.absoluteValue=O.abs=function(){var J=new B(this);if(J.s<0)J.s=1;return J},O.comparedTo=function(J,X){return f(this,new B(J,X))},O.decimalPlaces=O.dp=function(J,X){var H,G,w,D=this;if(J!=null){if(j(J,0,P),X==null)X=d;else j(X,0,8);return R0(new B(D),J+D.e+1,X)}if(!(H=D.c))return null;if(G=((w=H.length-1)-u(this.e/F))*F,w=H[w])for(;w%10==0;w/=10,G--);if(G<0)G=0;return G},O.dividedBy=O.div=function(J,X){return v(this,new B(J,X),i,d)},O.dividedToIntegerBy=O.idiv=function(J,X){return v(this,new B(J,X),0,1)},O.exponentiatedBy=O.pow=function(J,X){var H,G,w,D,R,q,U,I,M,T=this;if(J=new B(J),J.c&&!J.isInteger())throw Error(W+"Exponent not an integer: "+_0(J));if(X!=null)X=new B(X);if(q=J.e>14,!T.c||!T.c[0]||T.c[0]==1&&!T.e&&T.c.length==1||!J.c||!J.c[0])return M=new B(Math.pow(+_0(T),q?J.s*(2-p(J)):+_0(J))),X?M.mod(X):M;if(U=J.s<0,X){if(X.c?!X.c[0]:!X.s)return new B(NaN);if(G=!U&&T.isInteger()&&X.isInteger(),G)T=T.mod(X)}else if(J.e>9&&(T.e>0||T.e<-1||(T.e==0?T.c[0]>1||q&&T.c[1]>=240000000:T.c[0]<80000000000000||q&&T.c[0]<=99999750000000))){if(D=T.s<0&&p(J)?-0:0,T.e>-1)D=1/D;return new B(U?1/D:D)}else if(w0)D=Y(w0/F+2);if(q){if(H=new B(0.5),U)J.s=1;I=p(J)}else w=Math.abs(+_0(J)),I=w%2;M=new B(t);for(;;){if(I){if(M=M.times(T),!M.c)break;if(D){if(M.c.length>D)M.c.length=D}else if(G)M=M.mod(X)}if(w){if(w=V(w/2),w===0)break;I=w%2}else if(J=J.times(H),R0(J,J.e+1,1),J.e>14)I=p(J);else{if(w=+_0(J),w===0)break;I=w%2}if(T=T.times(T),D){if(T.c&&T.c.length>D)T.c.length=D}else if(G)T=T.mod(X)}if(G)return M;if(U)M=t.div(M);return X?M.mod(X):D?R0(M,w0,d,R):M},O.integerValue=function(J){var X=new B(this);if(J==null)J=d;else j(J,0,8);return R0(X,X.e+1,J)},O.isEqualTo=O.eq=function(J,X){return f(this,new B(J,X))===0},O.isFinite=function(){return!!this.c},O.isGreaterThan=O.gt=function(J,X){return f(this,new B(J,X))>0},O.isGreaterThanOrEqualTo=O.gte=function(J,X){return(X=f(this,new B(J,X)))===1||X===0},O.isInteger=function(){return!!this.c&&u(this.e/F)>this.c.length-2},O.isLessThan=O.lt=function(J,X){return f(this,new B(J,X))<0},O.isLessThanOrEqualTo=O.lte=function(J,X){return(X=f(this,new B(J,X)))===-1||X===0},O.isNaN=function(){return!this.s},O.isNegative=function(){return this.s<0},O.isPositive=function(){return this.s>0},O.isZero=function(){return!!this.c&&this.c[0]==0},O.minus=function(J,X){var H,G,w,D,R=this,q=R.s;if(J=new B(J,X),X=J.s,!q||!X)return new B(NaN);if(q!=X)return J.s=-X,R.plus(J);var U=R.e/F,I=J.e/F,M=R.c,T=J.c;if(!U||!I){if(!M||!T)return M?(J.s=-X,J):new B(T?R:NaN);if(!M[0]||!T[0])return T[0]?(J.s=-X,J):new B(M[0]?R:d==3?-0:0)}if(U=u(U),I=u(I),M=M.slice(),q=U-I){if(D=q<0)q=-q,w=M;else I=U,w=T;w.reverse();for(X=q;X--;w.push(0));w.reverse()}else{G=(D=(q=M.length)<(X=T.length))?q:X;for(q=X=0;X<G;X++)if(M[X]!=T[X]){D=M[X]<T[X];break}}if(D)w=M,M=T,T=w,J.s=-J.s;if(X=(G=T.length)-(H=M.length),X>0)for(;X--;M[H++]=0);X=K-1;for(;G>q;){if(M[--G]<T[G]){for(H=G;H&&!M[--H];M[H]=X);--M[H],M[G]+=K}M[G]-=T[G]}for(;M[0]==0;M.splice(0,1),--I);if(!M[0])return J.s=d==3?-1:1,J.c=[J.e=0],J;return q1(J,M,I)},O.modulo=O.mod=function(J,X){var H,G,w=this;if(J=new B(J,X),!w.c||!J.s||J.c&&!J.c[0])return new B(NaN);else if(!J.c||w.c&&!w.c[0])return new B(w);if(y0==9)G=J.s,J.s=1,H=v(w,J,0,3),J.s=G,H.s*=G;else H=v(w,J,0,y0);if(J=w.minus(H.times(J)),!J.c[0]&&y0==1)J.s=w.s;return J},O.multipliedBy=O.times=function(J,X){var H,G,w,D,R,q,U,I,M,T,E,h,c,Z0,W0,l=this,a=l.c,z0=(J=new B(J,X)).c;if(!a||!z0||!a[0]||!z0[0]){if(!l.s||!J.s||a&&!a[0]&&!z0||z0&&!z0[0]&&!a)J.c=J.e=J.s=null;else if(J.s*=l.s,!a||!z0)J.c=J.e=null;else J.c=[0],J.e=0;return J}if(G=u(l.e/F)+u(J.e/F),J.s*=l.s,U=a.length,T=z0.length,U<T)c=a,a=z0,z0=c,w=U,U=T,T=w;for(w=U+T,c=[];w--;c.push(0));Z0=K,W0=S;for(w=T;--w>=0;){H=0,E=z0[w]%W0,h=z0[w]/W0|0;for(R=U,D=w+R;D>w;)I=a[--R]%W0,M=a[R]/W0|0,q=h*I+M*E,I=E*I+q%W0*W0+c[D]+H,H=(I/Z0|0)+(q/W0|0)+h*M,c[D--]=I%Z0;c[D]=H}if(H)++G;else c.splice(0,1);return q1(J,c,G)},O.negated=function(){var J=new B(this);return J.s=-J.s||null,J},O.plus=function(J,X){var H,G=this,w=G.s;if(J=new B(J,X),X=J.s,!w||!X)return new B(NaN);if(w!=X)return J.s=-X,G.minus(J);var D=G.e/F,R=J.e/F,q=G.c,U=J.c;if(!D||!R){if(!q||!U)return new B(w/0);if(!q[0]||!U[0])return U[0]?J:new B(q[0]?G:w*0)}if(D=u(D),R=u(R),q=q.slice(),w=D-R){if(w>0)R=D,H=U;else w=-w,H=q;H.reverse();for(;w--;H.push(0));H.reverse()}if(w=q.length,X=U.length,w-X<0)H=U,U=q,q=H,X=w;for(w=0;X;)w=(q[--X]=q[X]+U[X]+w)/K|0,q[X]=K===q[X]?0:q[X]%K;if(w)q=[w].concat(q),++R;return q1(J,q,R)},O.precision=O.sd=function(J,X){var H,G,w,D=this;if(J!=null&&J!==!!J){if(j(J,1,P),X==null)X=d;else j(X,0,8);return R0(new B(D),J,X)}if(!(H=D.c))return null;if(w=H.length-1,G=w*F+1,w=H[w]){for(;w%10==0;w/=10,G--);for(w=H[0];w>=10;w/=10,G++);}if(J&&D.e+1>G)G=D.e+1;return G},O.shiftedBy=function(J){return j(J,-L,L),this.times("1e"+J)},O.squareRoot=O.sqrt=function(){var J,X,H,G,w,D=this,R=D.c,q=D.s,U=D.e,I=i+4,M=new B("0.5");if(q!==1||!R||!R[0])return new B(!q||q<0&&(!R||R[0])?NaN:R?D:1/0);if(q=Math.sqrt(+_0(D)),q==0||q==1/0){if(X=C(R),(X.length+U)%2==0)X+="0";if(q=Math.sqrt(+X),U=u((U+1)/2)-(U<0||U%2),q==1/0)X="5e"+U;else X=q.toExponential(),X=X.slice(0,X.indexOf("e")+1)+U;H=new B(X)}else H=new B(q+"");if(H.c[0]){if(U=H.e,q=U+I,q<3)q=0;for(;;)if(w=H,H=M.times(w.plus(v(D,w,I,1))),C(w.c).slice(0,q)===(X=C(H.c)).slice(0,q)){if(H.e<U)--q;if(X=X.slice(q-3,q+1),X=="9999"||!G&&X=="4999"){if(!G){if(R0(w,w.e+i+2,0),w.times(w).eq(D)){H=w;break}}I+=4,q+=4,G=1}else{if(!+X||!+X.slice(1)&&X.charAt(0)=="5")R0(H,H.e+i+2,1),J=!H.times(H).eq(D);break}}}return R0(H,H.e+i+1,d,J)},O.toExponential=function(J,X){if(J!=null)j(J,0,P),J++;return K1(this,J,X,1)},O.toFixed=function(J,X){if(J!=null)j(J,0,P),J=J+this.e+1;return K1(this,J,X)},O.toFormat=function(J,X,H){var G,w=this;if(H==null)if(J!=null&&X&&typeof X=="object")H=X,X=null;else if(J&&typeof J=="object")H=J,J=X=null;else H=H1;else if(typeof H!="object")throw Error(W+"Argument not an object: "+H);if(G=w.toFixed(J,X),w.c){var D,R=G.split("."),q=+H.groupSize,U=+H.secondaryGroupSize,I=H.groupSeparator||"",M=R[0],T=R[1],E=w.s<0,h=E?M.slice(1):M,c=h.length;if(U)D=q,q=U,U=D,c-=D;if(q>0&&c>0){D=c%q||q,M=h.substr(0,D);for(;D<c;D+=q)M+=I+h.substr(D,q);if(U>0)M+=I+h.slice(D);if(E)M="-"+M}G=T?M+(H.decimalSeparator||"")+((U=+H.fractionGroupSize)?T.replace(new RegExp("\\d{"+U+"}\\B","g"),"$&"+(H.fractionGroupSeparator||"")):T):M}return(H.prefix||"")+G+(H.suffix||"")},O.toFraction=function(J){var X,H,G,w,D,R,q,U,I,M,T,E,h=this,c=h.c;if(J!=null){if(q=new B(J),!q.isInteger()&&(q.c||q.s!==1)||q.lt(t))throw Error(W+"Argument "+(q.isInteger()?"out of range: ":"not an integer: ")+_0(q))}if(!c)return new B(h);X=new B(t),I=H=new B(t),G=U=new B(t),E=C(c),D=X.e=E.length-h.e-1,X.c[0]=N[(R=D%F)<0?F+R:R],J=!J||q.comparedTo(X)>0?D>0?X:I:q,R=e,e=1/0,q=new B(E),U.c[0]=0;for(;;){if(M=v(q,X,0,1),w=H.plus(M.times(G)),w.comparedTo(J)==1)break;H=G,G=w,I=U.plus(M.times(w=I)),U=w,X=q.minus(M.times(w=X)),q=w}return w=v(J.minus(H),G,0,1),U=U.plus(w.times(I)),H=H.plus(w.times(G)),U.s=I.s=h.s,D=D*2,T=v(I,G,D,d).minus(h).abs().comparedTo(v(U,H,D,d).minus(h).abs())<1?[I,G]:[U,H],e=R,T},O.toNumber=function(){return+_0(this)},O.toPrecision=function(J,X){if(J!=null)j(J,1,P);return K1(this,J,X,2)},O.toString=function(J){var X,H=this,G=H.s,w=H.e;if(w===null)if(G){if(X="Infinity",G<0)X="-"+X}else X="NaN";else{if(J==null)X=w<=V0||w>=s?o(C(H.c),w):J0(C(H.c),w,"0");else if(J===10&&z1)H=R0(new B(H),i+w+1,d),X=J0(C(H.c),H.e,"0");else j(J,2,c0.length,"Base"),X=k(J0(C(H.c),w,"0"),10,J,G,!0);if(G<0&&H.c[0])X="-"+X}return X},O.valueOf=O.toJSON=function(){return _0(this)},O._isBigNumber=!0,b!=null)B.set(b);return B}function u(b){var v=b|0;return b>0||b===v?v:v-1}function C(b){var v,k,m=1,O=b.length,t=b[0]+"";for(;m<O;){v=b[m++]+"",k=F-v.length;for(;k--;v="0"+v);t+=v}for(O=t.length;t.charCodeAt(--O)===48;);return t.slice(0,O+1||1)}function f(b,v){var k,m,O=b.c,t=v.c,i=b.s,d=v.s,V0=b.e,s=v.e;if(!i||!d)return null;if(k=O&&!O[0],m=t&&!t[0],k||m)return k?m?0:-d:i;if(i!=d)return i;if(k=i<0,m=V0==s,!O||!t)return m?0:!O^k?1:-1;if(!m)return V0>s^k?1:-1;d=(V0=O.length)<(s=t.length)?V0:s;for(i=0;i<d;i++)if(O[i]!=t[i])return O[i]>t[i]^k?1:-1;return V0==s?0:V0>s^k?1:-1}function j(b,v,k,m){if(b<v||b>k||b!==V(b))throw Error(W+(m||"Argument")+(typeof b=="number"?b<v||b>k?" out of range: ":" not an integer: ":" not a primitive number: ")+String(b))}function p(b){var v=b.c.length-1;return u(b.e/F)==v&&b.c[v]%2!=0}function o(b,v){return(b.length>1?b.charAt(0)+"."+b.slice(1):b)+(v<0?"e":"e+")+v}function J0(b,v,k){var m,O;if(v<0){for(O=k+".";++v;O+=k);b=O+b}else if(m=b.length,++v>m){for(O=k,v-=m;--v;O+=k);b+=O}else if(v<m)b=b.slice(0,v)+"."+b.slice(v);return b}if($=x(),$.default=$.BigNumber=$,typeof define=="function"&&define.amd)define(function(){return $});else if(typeof h8<"u"&&h8.exports)h8.exports=$;else{if(!Z)Z=typeof self<"u"&&self?self:window;Z.BigNumber=$}})(MZ)});var NZ=A((c5,RZ)=>{var GZ=N1(),IZ=c5;(function(){function Z(L){return L<10?"0"+L:L}var $=/[\u0000\u00ad\u0600-\u0604\u070f\u17b4\u17b5\u200c-\u200f\u2028-\u202f\u2060-\u206f\ufeff\ufff0-\uffff]/g,Q=/[\\\"\x00-\x1f\x7f-\x9f\u00ad\u0600-\u0604\u070f\u17b4\u17b5\u200c-\u200f\u2028-\u202f\u2060-\u206f\ufeff\ufff0-\uffff]/g,Y,V,W={"\b":"\\b","\t":"\\t","\n":"\\n","\f":"\\f","\r":"\\r",'"':"\\\"","\\":"\\\\"},z;function K(L){return Q.lastIndex=0,Q.test(L)?'"'+L.replace(Q,function(N){var S=W[N];return typeof S==="string"?S:"\\u"+("0000"+N.charCodeAt(0).toString(16)).slice(-4)})+'"':'"'+L+'"'}function F(L,N){var S,P,x,u,C=Y,f,j=N[L],p=j!=null&&(j instanceof GZ||GZ.isBigNumber(j));if(j&&typeof j==="object"&&typeof j.toJSON==="function")j=j.toJSON(L);if(typeof z==="function")j=z.call(N,L,j);switch(typeof j){case"string":if(p)return j;else return K(j);case"number":return isFinite(j)?String(j):"null";case"boolean":case"null":case"bigint":return String(j);case"object":if(!j)return"null";if(Y+=V,f=[],Object.prototype.toString.apply(j)==="[object Array]"){u=j.length;for(S=0;S<u;S+=1)f[S]=F(S,j)||"null";return x=f.length===0?"[]":Y?`[
|
|
7
|
+
`}yield Q}static#W;static#J;static async#X(){return this.#W||=(await import("./chunk-64ezpbwt.js").then((m)=>vQ(m.default))).HttpsProxyAgent,this.#W}static async#H(){let Z=typeof window<"u"&&!!window;return this.#J||=Z?window.fetch:(await import("node-fetch")).default,this.#J}static mergeHeaders(Z,...$){Z=Z instanceof Headers?Z:new Headers(Z);for(let Q of $)(Q instanceof Headers?Q:new Headers(Q)).forEach((V,W)=>{W==="set-cookie"?Z.append(W,V):Z.set(W,V)});return Z}}o0.Gaxios=R1;s0=R1});var X0=A((q0)=>{var xQ=q0&&q0.__createBinding||(Object.create?function(Z,$,Q,Y){if(Y===void 0)Y=Q;var V=Object.getOwnPropertyDescriptor($,Q);if(!V||("get"in V?!$.__esModule:V.writable||V.configurable))V={enumerable:!0,get:function(){return $[Q]}};Object.defineProperty(Z,Y,V)}:function(Z,$,Q,Y){if(Y===void 0)Y=Q;Z[Y]=$[Q]}),bQ=q0&&q0.__exportStar||function(Z,$){for(var Q in Z)if(Q!=="default"&&!Object.prototype.hasOwnProperty.call($,Q))xQ($,Z,Q)};Object.defineProperty(q0,"__esModule",{value:!0});q0.instance=q0.Gaxios=q0.GaxiosError=void 0;q0.request=gQ;var DZ=UZ();Object.defineProperty(q0,"Gaxios",{enumerable:!0,get:function(){return DZ.Gaxios}});var mQ=G1();Object.defineProperty(q0,"GaxiosError",{enumerable:!0,get:function(){return mQ.GaxiosError}});bQ(I1(),q0);q0.instance=new DZ.Gaxios;async function gQ(Z){return q0.instance.request(Z)}});var N1=A((MZ,h8)=>{(function(Z){var $,Q=/^-?(?:\d+(?:\.\d*)?|\.\d+)(?:e[+-]?\d+)?$/i,Y=Math.ceil,V=Math.floor,W="[BigNumber Error] ",z=W+"Number primitive has more than 15 significant digits: ",K=100000000000000,F=14,L=9007199254740991,N=[1,10,100,1000,1e4,1e5,1e6,1e7,1e8,1e9,10000000000,100000000000,1000000000000,10000000000000],S=1e7,P=1e9;function x(b){var v,k,m,O=B.prototype={constructor:B,toString:null,valueOf:null},t=new B(1),i=20,d=4,V0=-7,s=21,Q0=-1e7,e=1e7,Y0=!1,y0=1,w0=0,H1={prefix:"",groupSize:3,secondaryGroupSize:0,groupSeparator:",",decimalSeparator:".",fractionGroupSize:0,fractionGroupSeparator:"\xA0",suffix:""},c0="0123456789abcdefghijklmnopqrstuvwxyz",z1=!0;function B(J,X){var H,G,w,D,R,q,U,I,M=this;if(!(M instanceof B))return new B(J,X);if(X==null){if(J&&J._isBigNumber===!0){if(M.s=J.s,!J.c||J.e>e)M.c=M.e=null;else if(J.e<Q0)M.c=[M.e=0];else M.e=J.e,M.c=J.c.slice();return}if((q=typeof J=="number")&&J*0==0){if(M.s=1/J<0?(J=-J,-1):1,J===~~J){for(D=0,R=J;R>=10;R/=10,D++);if(D>e)M.c=M.e=null;else M.e=D,M.c=[J];return}I=String(J)}else{if(!Q.test(I=String(J)))return m(M,I,q);M.s=I.charCodeAt(0)==45?(I=I.slice(1),-1):1}if((D=I.indexOf("."))>-1)I=I.replace(".","");if((R=I.search(/e/i))>0){if(D<0)D=R;D+=+I.slice(R+1),I=I.substring(0,R)}else if(D<0)D=I.length}else{if(j(X,2,c0.length,"Base"),X==10&&z1)return M=new B(J),R0(M,i+M.e+1,d);if(I=String(J),q=typeof J=="number"){if(J*0!=0)return m(M,I,q,X);if(M.s=1/J<0?(I=I.slice(1),-1):1,B.DEBUG&&I.replace(/^0\.0*|\./,"").length>15)throw Error(z+J)}else M.s=I.charCodeAt(0)===45?(I=I.slice(1),-1):1;H=c0.slice(0,X),D=R=0;for(U=I.length;R<U;R++)if(H.indexOf(G=I.charAt(R))<0){if(G=="."){if(R>D){D=U;continue}}else if(!w){if(I==I.toUpperCase()&&(I=I.toLowerCase())||I==I.toLowerCase()&&(I=I.toUpperCase())){w=!0,R=-1,D=0;continue}}return m(M,String(J),q,X)}if(q=!1,I=k(I,X,10,M.s),(D=I.indexOf("."))>-1)I=I.replace(".","");else D=I.length}for(R=0;I.charCodeAt(R)===48;R++);for(U=I.length;I.charCodeAt(--U)===48;);if(I=I.slice(R,++U)){if(U-=R,q&&B.DEBUG&&U>15&&(J>L||J!==V(J)))throw Error(z+M.s*J);if((D=D-R-1)>e)M.c=M.e=null;else if(D<Q0)M.c=[M.e=0];else{if(M.e=D,M.c=[],R=(D+1)%F,D<0)R+=F;if(R<U){if(R)M.c.push(+I.slice(0,R));for(U-=F;R<U;)M.c.push(+I.slice(R,R+=F));R=F-(I=I.slice(R)).length}else R-=U;for(;R--;I+="0");M.c.push(+I)}}else M.c=[M.e=0]}B.clone=x,B.ROUND_UP=0,B.ROUND_DOWN=1,B.ROUND_CEIL=2,B.ROUND_FLOOR=3,B.ROUND_HALF_UP=4,B.ROUND_HALF_DOWN=5,B.ROUND_HALF_EVEN=6,B.ROUND_HALF_CEIL=7,B.ROUND_HALF_FLOOR=8,B.EUCLID=9,B.config=B.set=function(J){var X,H;if(J!=null)if(typeof J=="object"){if(J.hasOwnProperty(X="DECIMAL_PLACES"))H=J[X],j(H,0,P,X),i=H;if(J.hasOwnProperty(X="ROUNDING_MODE"))H=J[X],j(H,0,8,X),d=H;if(J.hasOwnProperty(X="EXPONENTIAL_AT"))if(H=J[X],H&&H.pop)j(H[0],-P,0,X),j(H[1],0,P,X),V0=H[0],s=H[1];else j(H,-P,P,X),V0=-(s=H<0?-H:H);if(J.hasOwnProperty(X="RANGE"))if(H=J[X],H&&H.pop)j(H[0],-P,-1,X),j(H[1],1,P,X),Q0=H[0],e=H[1];else if(j(H,-P,P,X),H)Q0=-(e=H<0?-H:H);else throw Error(W+X+" cannot be zero: "+H);if(J.hasOwnProperty(X="CRYPTO"))if(H=J[X],H===!!H)if(H)if(typeof crypto<"u"&&crypto&&(crypto.getRandomValues||crypto.randomBytes))Y0=H;else throw Y0=!H,Error(W+"crypto unavailable");else Y0=H;else throw Error(W+X+" not true or false: "+H);if(J.hasOwnProperty(X="MODULO_MODE"))H=J[X],j(H,0,9,X),y0=H;if(J.hasOwnProperty(X="POW_PRECISION"))H=J[X],j(H,0,P,X),w0=H;if(J.hasOwnProperty(X="FORMAT"))if(H=J[X],typeof H=="object")H1=H;else throw Error(W+X+" not an object: "+H);if(J.hasOwnProperty(X="ALPHABET"))if(H=J[X],typeof H=="string"&&!/^.?$|[+\-.\s]|(.).*\1/.test(H))z1=H.slice(0,10)=="0123456789",c0=H;else throw Error(W+X+" invalid: "+H)}else throw Error(W+"Object expected: "+J);return{DECIMAL_PLACES:i,ROUNDING_MODE:d,EXPONENTIAL_AT:[V0,s],RANGE:[Q0,e],CRYPTO:Y0,MODULO_MODE:y0,POW_PRECISION:w0,FORMAT:H1,ALPHABET:c0}},B.isBigNumber=function(J){if(!J||J._isBigNumber!==!0)return!1;if(!B.DEBUG)return!0;var X,H,G=J.c,w=J.e,D=J.s;Z:if({}.toString.call(G)=="[object Array]"){if((D===1||D===-1)&&w>=-P&&w<=P&&w===V(w)){if(G[0]===0){if(w===0&&G.length===1)return!0;break Z}if(X=(w+1)%F,X<1)X+=F;if(String(G[0]).length==X){for(X=0;X<G.length;X++)if(H=G[X],H<0||H>=K||H!==V(H))break Z;if(H!==0)return!0}}}else if(G===null&&w===null&&(D===null||D===1||D===-1))return!0;throw Error(W+"Invalid BigNumber: "+J)},B.maximum=B.max=function(){return p6(arguments,-1)},B.minimum=B.min=function(){return p6(arguments,1)},B.random=function(){var J=9007199254740992,X=Math.random()*J&2097151?function(){return V(Math.random()*J)}:function(){return(Math.random()*1073741824|0)*8388608+(Math.random()*8388608|0)};return function(H){var G,w,D,R,q,U=0,I=[],M=new B(t);if(H==null)H=i;else j(H,0,P);if(R=Y(H/F),Y0)if(crypto.getRandomValues){G=crypto.getRandomValues(new Uint32Array(R*=2));for(;U<R;)if(q=G[U]*131072+(G[U+1]>>>11),q>=9000000000000000)w=crypto.getRandomValues(new Uint32Array(2)),G[U]=w[0],G[U+1]=w[1];else I.push(q%100000000000000),U+=2;U=R/2}else if(crypto.randomBytes){G=crypto.randomBytes(R*=7);for(;U<R;)if(q=(G[U]&31)*281474976710656+G[U+1]*1099511627776+G[U+2]*4294967296+G[U+3]*16777216+(G[U+4]<<16)+(G[U+5]<<8)+G[U+6],q>=9000000000000000)crypto.randomBytes(7).copy(G,U);else I.push(q%100000000000000),U+=7;U=R/7}else throw Y0=!1,Error(W+"crypto unavailable");if(!Y0){for(;U<R;)if(q=X(),q<9000000000000000)I[U++]=q%100000000000000}if(R=I[--U],H%=F,R&&H)q=N[F-H],I[U]=V(R/q)*q;for(;I[U]===0;I.pop(),U--);if(U<0)I=[D=0];else{for(D=-1;I[0]===0;I.splice(0,1),D-=F);for(U=1,q=I[0];q>=10;q/=10,U++);if(U<F)D-=F-U}return M.e=D,M.c=I,M}}(),B.sum=function(){var J=1,X=arguments,H=new B(X[0]);for(;J<X.length;)H=H.plus(X[J++]);return H},k=function(){var J="0123456789";function X(H,G,w,D){var R,q=[0],U,I=0,M=H.length;for(;I<M;){for(U=q.length;U--;q[U]*=G);q[0]+=D.indexOf(H.charAt(I++));for(R=0;R<q.length;R++)if(q[R]>w-1){if(q[R+1]==null)q[R+1]=0;q[R+1]+=q[R]/w|0,q[R]%=w}}return q.reverse()}return function(H,G,w,D,R){var q,U,I,M,T,E,h,c,Z0=H.indexOf("."),W0=i,l=d;if(Z0>=0)M=w0,w0=0,H=H.replace(".",""),c=new B(G),E=c.pow(H.length-Z0),w0=M,c.c=X(J0(C(E.c),E.e,"0"),10,w,J),c.e=c.c.length;h=X(H,G,w,R?(q=c0,J):(q=J,c0)),I=M=h.length;for(;h[--M]==0;h.pop());if(!h[0])return q.charAt(0);if(Z0<0)--I;else E.c=h,E.e=I,E.s=D,E=v(E,c,W0,l,w),h=E.c,T=E.r,I=E.e;if(U=I+W0+1,Z0=h[U],M=w/2,T=T||U<0||h[U+1]!=null,T=l<4?(Z0!=null||T)&&(l==0||l==(E.s<0?3:2)):Z0>M||Z0==M&&(l==4||T||l==6&&h[U-1]&1||l==(E.s<0?8:7)),U<1||!h[0])H=T?J0(q.charAt(1),-W0,q.charAt(0)):q.charAt(0);else{if(h.length=U,T){for(--w;++h[--U]>w;)if(h[U]=0,!U)++I,h=[1].concat(h)}for(M=h.length;!h[--M];);for(Z0=0,H="";Z0<=M;H+=q.charAt(h[Z0++]));H=J0(H,I,q.charAt(0))}return H}}(),v=function(){function J(G,w,D){var R,q,U,I,M=0,T=G.length,E=w%S,h=w/S|0;for(G=G.slice();T--;)U=G[T]%S,I=G[T]/S|0,R=h*U+I*E,q=E*U+R%S*S+M,M=(q/D|0)+(R/S|0)+h*I,G[T]=q%D;if(M)G=[M].concat(G);return G}function X(G,w,D,R){var q,U;if(D!=R)U=D>R?1:-1;else for(q=U=0;q<D;q++)if(G[q]!=w[q]){U=G[q]>w[q]?1:-1;break}return U}function H(G,w,D,R){var q=0;for(;D--;)G[D]-=q,q=G[D]<w[D]?1:0,G[D]=q*R+G[D]-w[D];for(;!G[0]&&G.length>1;G.splice(0,1));}return function(G,w,D,R,q){var U,I,M,T,E,h,c,Z0,W0,l,a,z0,v8,w1,F1,v0,K8,N0=G.s==w.s?1:-1,K0=G.c,$0=w.c;if(!K0||!K0[0]||!$0||!$0[0])return new B(!G.s||!w.s||(K0?$0&&K0[0]==$0[0]:!$0)?NaN:K0&&K0[0]==0||!$0?N0*0:N0/0);if(Z0=new B(N0),W0=Z0.c=[],I=G.e-w.e,N0=D+I+1,!q)q=K,I=u(G.e/F)-u(w.e/F),N0=N0/F|0;for(M=0;$0[M]==(K0[M]||0);M++);if($0[M]>(K0[M]||0))I--;if(N0<0)W0.push(1),T=!0;else{if(w1=K0.length,v0=$0.length,M=0,N0+=2,E=V(q/($0[0]+1)),E>1)$0=J($0,E,q),K0=J(K0,E,q),v0=$0.length,w1=K0.length;v8=v0,l=K0.slice(0,v0),a=l.length;for(;a<v0;l[a++]=0);if(K8=$0.slice(),K8=[0].concat(K8),F1=$0[0],$0[1]>=q/2)F1++;do{if(E=0,U=X($0,l,v0,a),U<0){if(z0=l[0],v0!=a)z0=z0*q+(l[1]||0);if(E=V(z0/F1),E>1){if(E>=q)E=q-1;h=J($0,E,q),c=h.length,a=l.length;while(X(h,l,c,a)==1)E--,H(h,v0<c?K8:$0,c,q),c=h.length,U=1}else{if(E==0)U=E=1;h=$0.slice(),c=h.length}if(c<a)h=[0].concat(h);if(H(l,h,a,q),a=l.length,U==-1)while(X($0,l,v0,a)<1)E++,H(l,v0<a?K8:$0,a,q),a=l.length}else if(U===0)E++,l=[0];if(W0[M++]=E,l[0])l[a++]=K0[v8]||0;else l=[K0[v8]],a=1}while((v8++<w1||l[0]!=null)&&N0--);if(T=l[0]!=null,!W0[0])W0.splice(0,1)}if(q==K){for(M=1,N0=W0[0];N0>=10;N0/=10,M++);R0(Z0,D+(Z0.e=M+I*F-1)+1,R,T)}else Z0.e=I,Z0.r=+T;return Z0}}();function K1(J,X,H,G){var w,D,R,q,U;if(H==null)H=d;else j(H,0,8);if(!J.c)return J.toString();if(w=J.c[0],R=J.e,X==null)U=C(J.c),U=G==1||G==2&&(R<=V0||R>=s)?o(U,R):J0(U,R,"0");else if(J=R0(new B(J),X,H),D=J.e,U=C(J.c),q=U.length,G==1||G==2&&(X<=D||D<=V0)){for(;q<X;U+="0",q++);U=o(U,D)}else if(X-=R+(G===2&&D>R),U=J0(U,D,"0"),D+1>q){if(--X>0)for(U+=".";X--;U+="0");}else if(X+=D-q,X>0){if(D+1==q)U+=".";for(;X--;U+="0");}return J.s<0&&w?"-"+U:U}function p6(J,X){var H,G,w=1,D=new B(J[0]);for(;w<J.length;w++)if(G=new B(J[w]),!G.s||(H=f(D,G))===X||H===0&&D.s===X)D=G;return D}function q1(J,X,H){var G=1,w=X.length;for(;!X[--w];X.pop());for(w=X[0];w>=10;w/=10,G++);if((H=G+H*F-1)>e)J.c=J.e=null;else if(H<Q0)J.c=[J.e=0];else J.e=H,J.c=X;return J}m=function(){var J=/^(-?)0([xbo])(?=\w[\w.]*$)/i,X=/^([^.]+)\.$/,H=/^\.([^.]+)$/,G=/^-?(Infinity|NaN)$/,w=/^\s*\+(?=[\w.])|^\s+|\s+$/g;return function(D,R,q,U){var I,M=q?R:R.replace(w,"");if(G.test(M))D.s=isNaN(M)?null:M<0?-1:1;else{if(!q){if(M=M.replace(J,function(T,E,h){return I=(h=h.toLowerCase())=="x"?16:h=="b"?2:8,!U||U==I?E:T}),U)I=U,M=M.replace(X,"$1").replace(H,"0.$1");if(R!=M)return new B(M,I)}if(B.DEBUG)throw Error(W+"Not a"+(U?" base "+U:"")+" number: "+R);D.s=null}D.c=D.e=null}}();function R0(J,X,H,G){var w,D,R,q,U,I,M,T=J.c,E=N;if(T){Z:{for(w=1,q=T[0];q>=10;q/=10,w++);if(D=X-w,D<0)D+=F,R=X,U=T[I=0],M=V(U/E[w-R-1]%10);else if(I=Y((D+1)/F),I>=T.length)if(G){for(;T.length<=I;T.push(0));U=M=0,w=1,D%=F,R=D-F+1}else break Z;else{U=q=T[I];for(w=1;q>=10;q/=10,w++);D%=F,R=D-F+w,M=R<0?0:V(U/E[w-R-1]%10)}if(G=G||X<0||T[I+1]!=null||(R<0?U:U%E[w-R-1]),G=H<4?(M||G)&&(H==0||H==(J.s<0?3:2)):M>5||M==5&&(H==4||G||H==6&&(D>0?R>0?U/E[w-R]:0:T[I-1])%10&1||H==(J.s<0?8:7)),X<1||!T[0]){if(T.length=0,G)X-=J.e+1,T[0]=E[(F-X%F)%F],J.e=-X||0;else T[0]=J.e=0;return J}if(D==0)T.length=I,q=1,I--;else T.length=I+1,q=E[F-D],T[I]=R>0?V(U/E[w-R]%E[R])*q:0;if(G)for(;;)if(I==0){for(D=1,R=T[0];R>=10;R/=10,D++);R=T[0]+=q;for(q=1;R>=10;R/=10,q++);if(D!=q){if(J.e++,T[0]==K)T[0]=1}break}else{if(T[I]+=q,T[I]!=K)break;T[I--]=0,q=1}for(D=T.length;T[--D]===0;T.pop());}if(J.e>e)J.c=J.e=null;else if(J.e<Q0)J.c=[J.e=0]}return J}function _0(J){var X,H=J.e;if(H===null)return J.toString();return X=C(J.c),X=H<=V0||H>=s?o(X,H):J0(X,H,"0"),J.s<0?"-"+X:X}if(O.absoluteValue=O.abs=function(){var J=new B(this);if(J.s<0)J.s=1;return J},O.comparedTo=function(J,X){return f(this,new B(J,X))},O.decimalPlaces=O.dp=function(J,X){var H,G,w,D=this;if(J!=null){if(j(J,0,P),X==null)X=d;else j(X,0,8);return R0(new B(D),J+D.e+1,X)}if(!(H=D.c))return null;if(G=((w=H.length-1)-u(this.e/F))*F,w=H[w])for(;w%10==0;w/=10,G--);if(G<0)G=0;return G},O.dividedBy=O.div=function(J,X){return v(this,new B(J,X),i,d)},O.dividedToIntegerBy=O.idiv=function(J,X){return v(this,new B(J,X),0,1)},O.exponentiatedBy=O.pow=function(J,X){var H,G,w,D,R,q,U,I,M,T=this;if(J=new B(J),J.c&&!J.isInteger())throw Error(W+"Exponent not an integer: "+_0(J));if(X!=null)X=new B(X);if(q=J.e>14,!T.c||!T.c[0]||T.c[0]==1&&!T.e&&T.c.length==1||!J.c||!J.c[0])return M=new B(Math.pow(+_0(T),q?J.s*(2-p(J)):+_0(J))),X?M.mod(X):M;if(U=J.s<0,X){if(X.c?!X.c[0]:!X.s)return new B(NaN);if(G=!U&&T.isInteger()&&X.isInteger(),G)T=T.mod(X)}else if(J.e>9&&(T.e>0||T.e<-1||(T.e==0?T.c[0]>1||q&&T.c[1]>=240000000:T.c[0]<80000000000000||q&&T.c[0]<=99999750000000))){if(D=T.s<0&&p(J)?-0:0,T.e>-1)D=1/D;return new B(U?1/D:D)}else if(w0)D=Y(w0/F+2);if(q){if(H=new B(0.5),U)J.s=1;I=p(J)}else w=Math.abs(+_0(J)),I=w%2;M=new B(t);for(;;){if(I){if(M=M.times(T),!M.c)break;if(D){if(M.c.length>D)M.c.length=D}else if(G)M=M.mod(X)}if(w){if(w=V(w/2),w===0)break;I=w%2}else if(J=J.times(H),R0(J,J.e+1,1),J.e>14)I=p(J);else{if(w=+_0(J),w===0)break;I=w%2}if(T=T.times(T),D){if(T.c&&T.c.length>D)T.c.length=D}else if(G)T=T.mod(X)}if(G)return M;if(U)M=t.div(M);return X?M.mod(X):D?R0(M,w0,d,R):M},O.integerValue=function(J){var X=new B(this);if(J==null)J=d;else j(J,0,8);return R0(X,X.e+1,J)},O.isEqualTo=O.eq=function(J,X){return f(this,new B(J,X))===0},O.isFinite=function(){return!!this.c},O.isGreaterThan=O.gt=function(J,X){return f(this,new B(J,X))>0},O.isGreaterThanOrEqualTo=O.gte=function(J,X){return(X=f(this,new B(J,X)))===1||X===0},O.isInteger=function(){return!!this.c&&u(this.e/F)>this.c.length-2},O.isLessThan=O.lt=function(J,X){return f(this,new B(J,X))<0},O.isLessThanOrEqualTo=O.lte=function(J,X){return(X=f(this,new B(J,X)))===-1||X===0},O.isNaN=function(){return!this.s},O.isNegative=function(){return this.s<0},O.isPositive=function(){return this.s>0},O.isZero=function(){return!!this.c&&this.c[0]==0},O.minus=function(J,X){var H,G,w,D,R=this,q=R.s;if(J=new B(J,X),X=J.s,!q||!X)return new B(NaN);if(q!=X)return J.s=-X,R.plus(J);var U=R.e/F,I=J.e/F,M=R.c,T=J.c;if(!U||!I){if(!M||!T)return M?(J.s=-X,J):new B(T?R:NaN);if(!M[0]||!T[0])return T[0]?(J.s=-X,J):new B(M[0]?R:d==3?-0:0)}if(U=u(U),I=u(I),M=M.slice(),q=U-I){if(D=q<0)q=-q,w=M;else I=U,w=T;w.reverse();for(X=q;X--;w.push(0));w.reverse()}else{G=(D=(q=M.length)<(X=T.length))?q:X;for(q=X=0;X<G;X++)if(M[X]!=T[X]){D=M[X]<T[X];break}}if(D)w=M,M=T,T=w,J.s=-J.s;if(X=(G=T.length)-(H=M.length),X>0)for(;X--;M[H++]=0);X=K-1;for(;G>q;){if(M[--G]<T[G]){for(H=G;H&&!M[--H];M[H]=X);--M[H],M[G]+=K}M[G]-=T[G]}for(;M[0]==0;M.splice(0,1),--I);if(!M[0])return J.s=d==3?-1:1,J.c=[J.e=0],J;return q1(J,M,I)},O.modulo=O.mod=function(J,X){var H,G,w=this;if(J=new B(J,X),!w.c||!J.s||J.c&&!J.c[0])return new B(NaN);else if(!J.c||w.c&&!w.c[0])return new B(w);if(y0==9)G=J.s,J.s=1,H=v(w,J,0,3),J.s=G,H.s*=G;else H=v(w,J,0,y0);if(J=w.minus(H.times(J)),!J.c[0]&&y0==1)J.s=w.s;return J},O.multipliedBy=O.times=function(J,X){var H,G,w,D,R,q,U,I,M,T,E,h,c,Z0,W0,l=this,a=l.c,z0=(J=new B(J,X)).c;if(!a||!z0||!a[0]||!z0[0]){if(!l.s||!J.s||a&&!a[0]&&!z0||z0&&!z0[0]&&!a)J.c=J.e=J.s=null;else if(J.s*=l.s,!a||!z0)J.c=J.e=null;else J.c=[0],J.e=0;return J}if(G=u(l.e/F)+u(J.e/F),J.s*=l.s,U=a.length,T=z0.length,U<T)c=a,a=z0,z0=c,w=U,U=T,T=w;for(w=U+T,c=[];w--;c.push(0));Z0=K,W0=S;for(w=T;--w>=0;){H=0,E=z0[w]%W0,h=z0[w]/W0|0;for(R=U,D=w+R;D>w;)I=a[--R]%W0,M=a[R]/W0|0,q=h*I+M*E,I=E*I+q%W0*W0+c[D]+H,H=(I/Z0|0)+(q/W0|0)+h*M,c[D--]=I%Z0;c[D]=H}if(H)++G;else c.splice(0,1);return q1(J,c,G)},O.negated=function(){var J=new B(this);return J.s=-J.s||null,J},O.plus=function(J,X){var H,G=this,w=G.s;if(J=new B(J,X),X=J.s,!w||!X)return new B(NaN);if(w!=X)return J.s=-X,G.minus(J);var D=G.e/F,R=J.e/F,q=G.c,U=J.c;if(!D||!R){if(!q||!U)return new B(w/0);if(!q[0]||!U[0])return U[0]?J:new B(q[0]?G:w*0)}if(D=u(D),R=u(R),q=q.slice(),w=D-R){if(w>0)R=D,H=U;else w=-w,H=q;H.reverse();for(;w--;H.push(0));H.reverse()}if(w=q.length,X=U.length,w-X<0)H=U,U=q,q=H,X=w;for(w=0;X;)w=(q[--X]=q[X]+U[X]+w)/K|0,q[X]=K===q[X]?0:q[X]%K;if(w)q=[w].concat(q),++R;return q1(J,q,R)},O.precision=O.sd=function(J,X){var H,G,w,D=this;if(J!=null&&J!==!!J){if(j(J,1,P),X==null)X=d;else j(X,0,8);return R0(new B(D),J,X)}if(!(H=D.c))return null;if(w=H.length-1,G=w*F+1,w=H[w]){for(;w%10==0;w/=10,G--);for(w=H[0];w>=10;w/=10,G++);}if(J&&D.e+1>G)G=D.e+1;return G},O.shiftedBy=function(J){return j(J,-L,L),this.times("1e"+J)},O.squareRoot=O.sqrt=function(){var J,X,H,G,w,D=this,R=D.c,q=D.s,U=D.e,I=i+4,M=new B("0.5");if(q!==1||!R||!R[0])return new B(!q||q<0&&(!R||R[0])?NaN:R?D:1/0);if(q=Math.sqrt(+_0(D)),q==0||q==1/0){if(X=C(R),(X.length+U)%2==0)X+="0";if(q=Math.sqrt(+X),U=u((U+1)/2)-(U<0||U%2),q==1/0)X="5e"+U;else X=q.toExponential(),X=X.slice(0,X.indexOf("e")+1)+U;H=new B(X)}else H=new B(q+"");if(H.c[0]){if(U=H.e,q=U+I,q<3)q=0;for(;;)if(w=H,H=M.times(w.plus(v(D,w,I,1))),C(w.c).slice(0,q)===(X=C(H.c)).slice(0,q)){if(H.e<U)--q;if(X=X.slice(q-3,q+1),X=="9999"||!G&&X=="4999"){if(!G){if(R0(w,w.e+i+2,0),w.times(w).eq(D)){H=w;break}}I+=4,q+=4,G=1}else{if(!+X||!+X.slice(1)&&X.charAt(0)=="5")R0(H,H.e+i+2,1),J=!H.times(H).eq(D);break}}}return R0(H,H.e+i+1,d,J)},O.toExponential=function(J,X){if(J!=null)j(J,0,P),J++;return K1(this,J,X,1)},O.toFixed=function(J,X){if(J!=null)j(J,0,P),J=J+this.e+1;return K1(this,J,X)},O.toFormat=function(J,X,H){var G,w=this;if(H==null)if(J!=null&&X&&typeof X=="object")H=X,X=null;else if(J&&typeof J=="object")H=J,J=X=null;else H=H1;else if(typeof H!="object")throw Error(W+"Argument not an object: "+H);if(G=w.toFixed(J,X),w.c){var D,R=G.split("."),q=+H.groupSize,U=+H.secondaryGroupSize,I=H.groupSeparator||"",M=R[0],T=R[1],E=w.s<0,h=E?M.slice(1):M,c=h.length;if(U)D=q,q=U,U=D,c-=D;if(q>0&&c>0){D=c%q||q,M=h.substr(0,D);for(;D<c;D+=q)M+=I+h.substr(D,q);if(U>0)M+=I+h.slice(D);if(E)M="-"+M}G=T?M+(H.decimalSeparator||"")+((U=+H.fractionGroupSize)?T.replace(new RegExp("\\d{"+U+"}\\B","g"),"$&"+(H.fractionGroupSeparator||"")):T):M}return(H.prefix||"")+G+(H.suffix||"")},O.toFraction=function(J){var X,H,G,w,D,R,q,U,I,M,T,E,h=this,c=h.c;if(J!=null){if(q=new B(J),!q.isInteger()&&(q.c||q.s!==1)||q.lt(t))throw Error(W+"Argument "+(q.isInteger()?"out of range: ":"not an integer: ")+_0(q))}if(!c)return new B(h);X=new B(t),I=H=new B(t),G=U=new B(t),E=C(c),D=X.e=E.length-h.e-1,X.c[0]=N[(R=D%F)<0?F+R:R],J=!J||q.comparedTo(X)>0?D>0?X:I:q,R=e,e=1/0,q=new B(E),U.c[0]=0;for(;;){if(M=v(q,X,0,1),w=H.plus(M.times(G)),w.comparedTo(J)==1)break;H=G,G=w,I=U.plus(M.times(w=I)),U=w,X=q.minus(M.times(w=X)),q=w}return w=v(J.minus(H),G,0,1),U=U.plus(w.times(I)),H=H.plus(w.times(G)),U.s=I.s=h.s,D=D*2,T=v(I,G,D,d).minus(h).abs().comparedTo(v(U,H,D,d).minus(h).abs())<1?[I,G]:[U,H],e=R,T},O.toNumber=function(){return+_0(this)},O.toPrecision=function(J,X){if(J!=null)j(J,1,P);return K1(this,J,X,2)},O.toString=function(J){var X,H=this,G=H.s,w=H.e;if(w===null)if(G){if(X="Infinity",G<0)X="-"+X}else X="NaN";else{if(J==null)X=w<=V0||w>=s?o(C(H.c),w):J0(C(H.c),w,"0");else if(J===10&&z1)H=R0(new B(H),i+w+1,d),X=J0(C(H.c),H.e,"0");else j(J,2,c0.length,"Base"),X=k(J0(C(H.c),w,"0"),10,J,G,!0);if(G<0&&H.c[0])X="-"+X}return X},O.valueOf=O.toJSON=function(){return _0(this)},O._isBigNumber=!0,b!=null)B.set(b);return B}function u(b){var v=b|0;return b>0||b===v?v:v-1}function C(b){var v,k,m=1,O=b.length,t=b[0]+"";for(;m<O;){v=b[m++]+"",k=F-v.length;for(;k--;v="0"+v);t+=v}for(O=t.length;t.charCodeAt(--O)===48;);return t.slice(0,O+1||1)}function f(b,v){var k,m,O=b.c,t=v.c,i=b.s,d=v.s,V0=b.e,s=v.e;if(!i||!d)return null;if(k=O&&!O[0],m=t&&!t[0],k||m)return k?m?0:-d:i;if(i!=d)return i;if(k=i<0,m=V0==s,!O||!t)return m?0:!O^k?1:-1;if(!m)return V0>s^k?1:-1;d=(V0=O.length)<(s=t.length)?V0:s;for(i=0;i<d;i++)if(O[i]!=t[i])return O[i]>t[i]^k?1:-1;return V0==s?0:V0>s^k?1:-1}function j(b,v,k,m){if(b<v||b>k||b!==V(b))throw Error(W+(m||"Argument")+(typeof b=="number"?b<v||b>k?" out of range: ":" not an integer: ":" not a primitive number: ")+String(b))}function p(b){var v=b.c.length-1;return u(b.e/F)==v&&b.c[v]%2!=0}function o(b,v){return(b.length>1?b.charAt(0)+"."+b.slice(1):b)+(v<0?"e":"e+")+v}function J0(b,v,k){var m,O;if(v<0){for(O=k+".";++v;O+=k);b=O+b}else if(m=b.length,++v>m){for(O=k,v-=m;--v;O+=k);b+=O}else if(v<m)b=b.slice(0,v)+"."+b.slice(v);return b}if($=x(),$.default=$.BigNumber=$,typeof define=="function"&&define.amd)define(function(){return $});else if(typeof h8<"u"&&h8.exports)h8.exports=$;else{if(!Z)Z=typeof self<"u"&&self?self:window;Z.BigNumber=$}})(MZ)});var NZ=A((c5,RZ)=>{var GZ=N1(),IZ=c5;(function(){function Z(L){return L<10?"0"+L:L}var $=/[\u0000\u00ad\u0600-\u0604\u070f\u17b4\u17b5\u200c-\u200f\u2028-\u202f\u2060-\u206f\ufeff\ufff0-\uffff]/g,Q=/[\\\"\x00-\x1f\x7f-\x9f\u00ad\u0600-\u0604\u070f\u17b4\u17b5\u200c-\u200f\u2028-\u202f\u2060-\u206f\ufeff\ufff0-\uffff]/g,Y,V,W={"\b":"\\b","\t":"\\t","\n":"\\n","\f":"\\f","\r":"\\r",'"':"\\\"","\\":"\\\\"},z;function K(L){return Q.lastIndex=0,Q.test(L)?'"'+L.replace(Q,function(N){var S=W[N];return typeof S==="string"?S:"\\u"+("0000"+N.charCodeAt(0).toString(16)).slice(-4)})+'"':'"'+L+'"'}function F(L,N){var S,P,x,u,C=Y,f,j=N[L],p=j!=null&&(j instanceof GZ||GZ.isBigNumber(j));if(j&&typeof j==="object"&&typeof j.toJSON==="function")j=j.toJSON(L);if(typeof z==="function")j=z.call(N,L,j);switch(typeof j){case"string":if(p)return j;else return K(j);case"number":return isFinite(j)?String(j):"null";case"boolean":case"null":case"bigint":return String(j);case"object":if(!j)return"null";if(Y+=V,f=[],Object.prototype.toString.apply(j)==="[object Array]"){u=j.length;for(S=0;S<u;S+=1)f[S]=F(S,j)||"null";return x=f.length===0?"[]":Y?`[
|
|
8
8
|
`+Y+f.join(`,
|
|
9
9
|
`+Y)+`
|
|
10
10
|
`+C+"]":"["+f.join(",")+"]",Y=C,x}if(z&&typeof z==="object"){u=z.length;for(S=0;S<u;S+=1)if(typeof z[S]==="string"){if(P=z[S],x=F(P,j),x)f.push(K(P)+(Y?": ":":")+x)}}else Object.keys(j).forEach(function(o){var J0=F(o,j);if(J0)f.push(K(o)+(Y?": ":":")+J0)});return x=f.length===0?"{}":Y?`{
|
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
// @bun
|
|
2
|
-
import{ae as a,be as b,ce as c,de as d,ee as e,fe as f,ge as g,he as h,ie as i,je as j,ke as k}from"./chunk-
|
|
2
|
+
import{ae as a,be as b,ce as c,de as d,ee as e,fe as f,ge as g,he as h,ie as i,je as j,ke as k}from"./chunk-e01wnqvc.js";import"./chunk-enpzvmtc.js";import"./chunk-tq0239xp.js";import"./chunk-7xm75w1e.js";export{c as providerConfigFromInit,d as httpRequest,j as getInstanceMetadataEndpoint,k as fromInstanceMetadata,h as fromContainerMetadata,i as Endpoint,f as ENV_CMDS_RELATIVE_URI,e as ENV_CMDS_FULL_URI,g as ENV_CMDS_AUTH_TOKEN,a as DEFAULT_TIMEOUT,b as DEFAULT_MAX_RETRIES};
|
|
@@ -1,3 +1,3 @@
|
|
|
1
1
|
// @bun
|
|
2
|
-
import{rm as f,sm as Gj,tm as Rj,um as Hj,xm as s}from"./chunk-n34y5gp6.js";import{go as xj}from"./chunk-a8p9aggx.js";import{Do as vj}from"./chunk-csdm3n24.js";import{cr as P,dr as wj,jr as k,kr as Kj}from"./chunk-6hdjkvr1.js";import{$s as h,Ns as Ij,Os as Jj,Rs as Nj,Ss as I,Wr as a,Xr as y}from"./chunk-94qmhz2p.js";import{tt as i}from"./chunk-20d0cd1j.js";import{vt as j}from"./chunk-b6dsv601.js";import{AC as Wj,PE as o,RN as l,SM as C,iF as d,qH as Q}from"./chunk-t299e2aw.js";import{CO as Mj,EO as Oj,GO as Ej}from"./chunk-yjj4cvqg.js";var tj={};Oj(tj,{stopRefresh:()=>aj,startRefresh:()=>sj,refresh:()=>jj,readModelCatalogResponse:()=>Pj,get:()=>fj,Provider:()=>cj,Model:()=>pj,MODEL_CATALOG_MAX_BYTES:()=>Aj,Data:()=>S});import hj from"path";var U={};Oj(U,{layer:()=>Bj,isPreview:()=>ij,isNewerVersion:()=>qj,isLocal:()=>mj,getReleaseType:()=>yj,defaultLayer:()=>uj,UpgradeFailedError:()=>x,USER_AGENT:()=>Sj,Service:()=>E,Installation:()=>U,Info:()=>Uj,Event:()=>Cj});var _j=(J)=>J.pipe(k.retryTransient({retryOn:"errors-and-responses",times:2,schedule:d.exponential(200).pipe(d.jittered)}));import Yj from"path";var z=Mj(xj(),1);import n from"crypto";import v from"fs";import Zj from"path";class H extends Error{constructor(J){super(J);this.name="SelfUpdateError"}}function $j(J){let V=J?.platform??process.platform,_=J?.arch??process.arch,$=J?.libc??"bionic",W=["qitqode",V==="win32"?"windows":V,_];if(_==="x64")W.push("baseline");if(V==="linux"&&$==="musl")W.push("musl");return`@qitqode/${W.join("-")}`}function kj(J,V){if(V.integrity){let _=V.integrity.match(/^(sha512|sha384|sha256)-([A-Za-z0-9+/=]+)$/);if(!_)throw new H(`registry returned an unrecognized integrity string: ${V.integrity}`);if(n.createHash(_[1]).update(J).digest("base64")!==_[2])throw new H(`checksum mismatch: downloaded tarball does not match the registry ${_[1]} integrity value; refusing to install`);return}if(V.shasum){if(n.createHash("sha1").update(J).digest("hex")!==V.shasum.toLowerCase())throw new H("checksum mismatch: downloaded tarball does not match the registry shasum; refusing to install");return}throw new H("registry provided no integrity metadata for the tarball; refusing to install")}function Qj(J,V){let _=(w,R)=>{let G=w,q=w+R;while(G<q&&J[G]!==0)G++;return new TextDecoder().decode(J.subarray(w,G))},$=0,W;while($+512<=J.length){if(J.subarray($,$+512).every((Z)=>Z===0))break;let R=_($+124,12).trim(),G=R?parseInt(R,8):0;if(!Number.isFinite(G)||G<0)throw new H("downloaded tarball is corrupt (bad tar header)");let q=String.fromCharCode(J[$+156]),B=_($,100),N=_($+345,155);if(N)B=`${N}/${B}`;if(W)B=W,W=void 0;let b=$+512,X=b+G;if(q==="L")W=new TextDecoder().decode(J.subarray(b,X)).replace(/\0+$/,"");else if((q==="0"||q==="\x00"||q==="")&&B===V)return J.slice(b,X);$=b+Math.ceil(G/512)*512}return}var A=(J)=>String(J instanceof Error?J.message:J),u=(J)=>Q.fail(new H(J)),p=(J,V)=>Q.try({try:J,catch:(_)=>new H(V(_))}),Xj=Q.fnUntraced(function*(J){let{target:V,execPath:_,packageName:$,registry:W}=J,w=J.gunzip??((K)=>Bun.gunzipSync(K)),R=Zj.dirname(_);yield*p(()=>v.accessSync(R,v.constants.W_OK),()=>`no write permission for ${R}; cannot replace ${_}. Fix the directory permissions or re-run with sufficient privileges.`);let G=`${W}/${$}/${encodeURIComponent(V)}`,B=(yield*J.fetchJson(G).pipe(Q.mapError((K)=>new H(`download failed: could not fetch ${$}@${V} from ${W} (${A(K)}). Check your network connection and that version ${V} exists.`))))?.dist;if(!B?.tarball)return yield*u(`registry response for ${$}@${V} has no tarball URL; cannot self-update`);let N=B.tarball,b=yield*J.fetchBytes(N).pipe(Q.mapError((K)=>new H(`download failed: could not download ${N} (${A(K)}). Check your network connection and try again.`)));yield*Q.try({try:()=>kj(b,B),catch:(K)=>K instanceof H?K:new H(A(K))});let X=yield*Q.try({try:()=>w(b),catch:()=>new H("downloaded tarball is corrupt (gunzip failed); try again")}),Z=Qj(X,"package/bin/qitqode")??Qj(X,"package/bin/qitqode.exe");if(!Z||Z.length===0)return yield*u(`tarball for ${$}@${V} does not contain the expected binary at bin/qitqode`);let O=Zj.join(R,`.qitqode-upgrade-${process.pid}`),Y=`${_}.backup-${process.pid}`,D=(K)=>{try{v.rmSync(K,{force:!0})}catch{}};yield*p(()=>v.writeFileSync(O,Z,{mode:493}),(K)=>{return D(O),`no write permission: could not write ${O} (${A(K)})`});let L=yield*J.runVersion(O).pipe(Q.mapError((K)=>{return D(O),new H(`downloaded binary failed its --version check (${A(K)}); keeping the current installation`)}));if(L.code!==0)return D(O),yield*u(`downloaded binary failed its --version check (exit ${L.code}); keeping the current installation`);let m=L.stdout.trim();if(m&&!m.includes(V))return D(O),yield*u(`downloaded binary reports version "${m}" instead of ${V}; keeping the current installation`);yield*p(()=>v.renameSync(_,Y),(K)=>{return D(O),`could not move the current binary aside (${A(K)}); check permissions on ${_}`}),yield*Q.try({try:()=>v.renameSync(O,_),catch:(K)=>{try{v.renameSync(Y,_)}catch{return new H(`failed to install the new binary AND failed to restore the old one; your previous binary is preserved at ${Y} \u2014 move it back to ${_} manually`)}return D(O),new H(`could not install the new binary (${A(K)}); the previous version was restored`)}}),D(Y)});var c=h.create({service:"installation"}),M="@qitqode/cli";function qj(J,V){if(!z.default.valid(J)||!z.default.valid(V))return!1;return z.default.gt(V,J)}var Cj={Updated:s.define("installation.updated",j.object({version:j.string()})),UpdateAvailable:s.define("installation.update-available",j.object({version:j.string()}))};function yj(J,V){if(!qj(J,V))throw Error(`Version ${V} is not newer than ${J}`);let _=z.default.major(J),$=z.default.minor(J),W=z.default.major(V),w=z.default.minor(V);if(W>_)return"major";if(w>$)return"minor";return"patch"}var Uj=j.object({version:j.string(),latest:j.string()}).meta({ref:"InstallationInfo"}),Sj=`qitqode/${y}/${a}/${I.QITQODE_CLIENT}`;function ij(){return y!=="latest"}function mj(){return y==="local"}class x extends C.TaggedErrorClass()("UpgradeFailedError",{stderr:C.String}){}var nj=C.Struct({version:C.String});class E extends Wj.Service()("@qitqode/Installation"){}var Bj=o.effect(E,Q.gen(function*(){let J=yield*k.HttpClient,V=k.filterStatusOk(_j(J)),_=yield*f.ChildProcessSpawner,$=(X,Z)=>Gj.make(X[0],X.slice(1),{cwd:Z?.cwd,env:Z?.env,extendEnv:!0}),W=Q.fnUntraced(function*(X){let Z=yield*Hj(_,X);return{code:Z.code,stdout:Z.text,stderr:Z.stderr}},Q.scoped),w=Q.fnUntraced(function*(X,Z){let O=yield*_.spawn($(X,Z)),Y=yield*l.mkString(l.decodeText(O.stdout));return yield*O.exitCode,Y},Q.scoped,Q.catch(()=>Q.succeed(""))),R=Q.fnUntraced(function*(X,Z){return yield*W($(X,Z))},Q.catch(()=>Q.succeed({code:f.ExitCode(1),stdout:"",stderr:""}))),G=Q.fn("Installation.method")(function*(){if(process.execPath.includes(Yj.join(".qitqode","bin")))return"curl";if(process.execPath.includes(Yj.join(".local","bin")))return"curl";let X=process.execPath.toLowerCase(),Z=[{name:"npm",command:()=>w(["npm","list","-g","--depth=0"])},{name:"pnpm",command:()=>w(["pnpm","list","-g","--depth=0"])},{name:"bun",command:()=>w(["bun","pm","ls","-g"])}];Z.sort((O,Y)=>{let D=X.includes(O.name),L=X.includes(Y.name);if(D&&!L)return-1;if(!D&&L)return 1;return 0});for(let O of Z)if((yield*O.command()).includes(M))return O.name;return"unknown"}),q=Q.fn("Installation.latest")(function*(X){let Z=X||(yield*G());if(Z==="curl"){let Y=(yield*w(["curl","-sI","https://github.com/qitqode/qitqode/releases/latest"])).match(/^location:.*\/tag\/v([0-9][^\s/]*)/im);if(Y)return Y[1];return yield*Q.die(Error("failed to resolve latest version from GitHub releases redirect"))}if(Z==="npm"||Z==="bun"||Z==="pnpm"){let Y=(yield*w(["npm","config","get","registry"])).trim()||"https://registry.npmjs.org",D=Y.endsWith("/")?Y.slice(0,-1):Y,L=yield*V.execute(P.get(`${D}/${encodeURIComponent(M)}/${y}`).pipe(P.acceptJson));return(yield*wj.schemaBodyJson(nj)(L)).version}return c.warn("unsupported update channel, skipping",{method:Z}),yield*Q.die(Error(`unsupported update channel: ${Z}`))},Q.orDie),B=Q.fnUntraced(function*(){let Z=(yield*w(["npm","config","get","registry"])).trim()||"https://registry.npmjs.org";return Z.endsWith("/")?Z.slice(0,-1):Z}),N=Q.fnUntraced(function*(X){let Z=yield*B();yield*Xj({target:X,execPath:process.env.QITQODE_SELF_UPDATE_TARGET_BINARY||process.execPath,packageName:$j(),registry:Z,fetchJson:(O)=>V.execute(P.get(O).pipe(P.acceptJson)).pipe(Q.flatMap((Y)=>Y.json)),fetchBytes:(O)=>V.execute(P.get(O)).pipe(Q.flatMap((Y)=>Y.arrayBuffer),Q.map((Y)=>new Uint8Array(Y))),runVersion:(O)=>R([O,"--version"]).pipe(Q.map((Y)=>({code:Y.code,stdout:Y.stdout})))}).pipe(Q.mapError((O)=>new x({stderr:O.message})))}),b=Q.fn("Installation.upgrade")(function*(X,Z){if(X==="curl"){yield*N(Z),c.info("upgraded",{method:X,target:Z});return}let Y=yield*(()=>{if(X==="npm")return R(["npm","install","-g",`${M}@${Z}`]);if(X==="pnpm")return R(["pnpm","install","-g",`${M}@${Z}`]);if(X==="bun")return R(["bun","install","-g",`${M}@${Z}`]);return new x({stderr:`Unknown method: ${X}`})})();if(Y.code!==0){let D=Y.stderr||"";return yield*new x({stderr:D})}c.info("upgraded",{method:X,target:Z,stdout:Y.stdout,stderr:Y.stderr}),yield*w([process.execPath,"--version"])});return E.of({info:Q.fn("Installation.info")(function*(){return{version:a,latest:yield*q()}}),method:G,latest:q,upgrade:b})})),uj=Bj.pipe(o.provide(Kj.layer),o.provide(Rj));var t=j.lazy(()=>j.union([j.string(),j.number(),j.boolean(),j.null(),j.array(t),j.record(j.string(),t)])),Dj=j.object({input:j.number(),output:j.number(),cache_read:j.number().optional(),cache_write:j.number().optional(),context_over_200k:j.object({input:j.number(),output:j.number(),cache_read:j.number().optional(),cache_write:j.number().optional()}).optional()}),r=j.object({id:j.string(),name:j.string(),family:j.string().optional(),release_date:j.string(),attachment:j.boolean(),reasoning:j.boolean(),temperature:j.boolean().optional(),tool_call:j.boolean(),interleaved:j.union([j.literal(!0),j.object({field:j.enum(["reasoning_content","reasoning_details"])}).strict()]).optional(),cost:Dj.optional(),limit:j.object({context:j.number(),input:j.number().optional(),output:j.number()}),modalities:j.object({input:j.array(j.enum(["text","audio","image","video","pdf"])),output:j.array(j.enum(["text","audio","image","video","pdf"]))}).optional(),experimental:j.object({modes:j.record(j.string(),j.object({cost:Dj.optional(),provider:j.object({body:j.record(j.string(),t).optional(),headers:j.record(j.string(),j.string()).optional()}).optional()})).optional()}).optional(),status:j.enum(["alpha","beta","deprecated"]).optional(),provider:j.object({npm:j.string().optional(),api:j.string().optional()}).optional()}),e=j.object({api:j.string().optional(),name:j.string(),env:j.array(j.string()),id:j.string(),npm:j.string().optional(),models:j.record(j.string(),r)});var Vj=h.create({service:"models.dev"}),bj=Fj(),F=hj.join(Nj.Path.cache,bj==="https://models.dev"?"models.json":`models-${Ij.fast(bj)}.json`),gj=300000,Aj=8388608,T,dj=j.record(j.string(),e),pj=r,cj=e;function Fj(){return I.QITQODE_MODELS_URL||"https://models.dev"}function lj(){return Date.now()-Number(i.stat(F)?.mtimeMs??0)<gj}function Lj(J){return!J&&lj()}function g(J){let V=dj.parse(typeof J==="string"?JSON.parse(J):J);for(let[_,$]of Object.entries(V))if($.id!==_)throw Error(`Invalid model provider: ${_}`);return V}async function zj(J){let V=await i.readJson(J).catch(()=>{return});if(!V)return;try{return g(V)}catch(_){Vj.warn("Ignoring invalid model catalog cache",{file:J,error:_});return}}async function Pj(J,V,_=Aj){let $=J.headers.get("content-type")?.split(";")[0]?.trim().toLowerCase();if($!=="application/json"&&!$?.endsWith("+json"))throw Error(`Invalid model catalog content type: ${$||"missing"}`);let W=Number(J.headers.get("content-length"));if(Number.isFinite(W)&&W>_)throw Error("Model catalog response is too large");if(!J.body)return"";let w=J.body.getReader(),R=()=>void w.cancel(V.reason);V.addEventListener("abort",R,{once:!0});let G=new Uint8Array(_),q=0;try{for(;;){let B=await w.read();if(B.done)break;if(q+=B.value.byteLength,q>_)throw await w.cancel(),Error("Model catalog response is too large");G.set(B.value,q-B.value.byteLength)}}finally{V.removeEventListener("abort",R)}return new TextDecoder().decode(G.subarray(0,q))}var Tj=async()=>{let J=AbortSignal.timeout(1e4),V=await fetch(`${Fj()}/api.json`,{headers:{"User-Agent":U.USER_AGENT},signal:J});if(!V.ok)return;let _=g(await Pj(V,J));return JSON.stringify(_)},S=vj(async()=>{let J=await zj(I.QITQODE_MODELS_PATH??F);if(J)return J;let V=await import("./chunk-a2qerqgd.js").then((_)=>g(_.snapshot)).catch(()=>{return});if(V)return V;if(I.QITQODE_DISABLE_MODELS_FETCH)return{};return Jj.withLock(`models-dev:${F}`,async()=>{let _=await zj(I.QITQODE_MODELS_PATH??F);if(_)return _;let $=await Tj();if($)return await i.write(F,$).catch((W)=>{Vj.error("Failed to write models cache",{error:W})}),g($);return{}})});async function fj(){return S()}async function jj(J=!1){if(Lj(J))return S.reset();await Jj.withLock(`models-dev:${F}`,async()=>{if(Lj(J))return S.reset();let V=await Tj();if(!V)return;await i.write(F,V),S.reset()}).catch((V)=>{Vj.error("Failed to fetch models.dev",{error:V})})}function sj(){if(T||I.QITQODE_DISABLE_MODELS_FETCH||process.argv.includes("--get-yargs-completions"))return;jj(),T=setInterval(async()=>{await jj()},3600000),T.unref()}function aj(){if(!T)return;clearInterval(T),T=void 0}
|
|
2
|
+
import{rm as f,sm as Gj,tm as Rj,um as Hj,xm as s}from"./chunk-redjxn13.js";import{go as xj}from"./chunk-htz93dsd.js";import{Co as vj}from"./chunk-2hc5z7b5.js";import{br as P,cr as wj,ir as k,jr as Kj}from"./chunk-d6ry9418.js";import{Ms as Ij,Ns as Jj,Qs as Nj,Rs as I,Vr as a,Wr as y,_s as h}from"./chunk-m5m448mg.js";import{st as i}from"./chunk-tqj69nh6.js";import{ut as j}from"./chunk-5tray1fw.js";import{OE as o,QN as l,RM as C,hF as d,pH as Q,zC as Wj}from"./chunk-zs8kqdsf.js";import{BO as Mj,DO as Oj,FO as Ej}from"./chunk-7xm75w1e.js";var tj={};Oj(tj,{stopRefresh:()=>aj,startRefresh:()=>sj,refresh:()=>jj,readModelCatalogResponse:()=>Pj,get:()=>fj,Provider:()=>cj,Model:()=>pj,MODEL_CATALOG_MAX_BYTES:()=>Aj,Data:()=>S});import hj from"path";var U={};Oj(U,{layer:()=>Bj,isPreview:()=>ij,isNewerVersion:()=>qj,isLocal:()=>mj,getReleaseType:()=>yj,defaultLayer:()=>uj,UpgradeFailedError:()=>x,USER_AGENT:()=>Sj,Service:()=>E,Installation:()=>U,Info:()=>Uj,Event:()=>Cj});var _j=(J)=>J.pipe(k.retryTransient({retryOn:"errors-and-responses",times:2,schedule:d.exponential(200).pipe(d.jittered)}));import Yj from"path";var z=Mj(xj(),1);import n from"crypto";import v from"fs";import Zj from"path";class H extends Error{constructor(J){super(J);this.name="SelfUpdateError"}}function $j(J){let V=J?.platform??process.platform,_=J?.arch??process.arch,$=J?.libc??"bionic",W=["qitqode",V==="win32"?"windows":V,_];if(_==="x64")W.push("baseline");if(V==="linux"&&$==="musl")W.push("musl");return`@qitqode/${W.join("-")}`}function kj(J,V){if(V.integrity){let _=V.integrity.match(/^(sha512|sha384|sha256)-([A-Za-z0-9+/=]+)$/);if(!_)throw new H(`registry returned an unrecognized integrity string: ${V.integrity}`);if(n.createHash(_[1]).update(J).digest("base64")!==_[2])throw new H(`checksum mismatch: downloaded tarball does not match the registry ${_[1]} integrity value; refusing to install`);return}if(V.shasum){if(n.createHash("sha1").update(J).digest("hex")!==V.shasum.toLowerCase())throw new H("checksum mismatch: downloaded tarball does not match the registry shasum; refusing to install");return}throw new H("registry provided no integrity metadata for the tarball; refusing to install")}function Qj(J,V){let _=(w,R)=>{let G=w,q=w+R;while(G<q&&J[G]!==0)G++;return new TextDecoder().decode(J.subarray(w,G))},$=0,W;while($+512<=J.length){if(J.subarray($,$+512).every((Z)=>Z===0))break;let R=_($+124,12).trim(),G=R?parseInt(R,8):0;if(!Number.isFinite(G)||G<0)throw new H("downloaded tarball is corrupt (bad tar header)");let q=String.fromCharCode(J[$+156]),B=_($,100),N=_($+345,155);if(N)B=`${N}/${B}`;if(W)B=W,W=void 0;let b=$+512,X=b+G;if(q==="L")W=new TextDecoder().decode(J.subarray(b,X)).replace(/\0+$/,"");else if((q==="0"||q==="\x00"||q==="")&&B===V)return J.slice(b,X);$=b+Math.ceil(G/512)*512}return}var A=(J)=>String(J instanceof Error?J.message:J),u=(J)=>Q.fail(new H(J)),p=(J,V)=>Q.try({try:J,catch:(_)=>new H(V(_))}),Xj=Q.fnUntraced(function*(J){let{target:V,execPath:_,packageName:$,registry:W}=J,w=J.gunzip??((K)=>Bun.gunzipSync(K)),R=Zj.dirname(_);yield*p(()=>v.accessSync(R,v.constants.W_OK),()=>`no write permission for ${R}; cannot replace ${_}. Fix the directory permissions or re-run with sufficient privileges.`);let G=`${W}/${$}/${encodeURIComponent(V)}`,B=(yield*J.fetchJson(G).pipe(Q.mapError((K)=>new H(`download failed: could not fetch ${$}@${V} from ${W} (${A(K)}). Check your network connection and that version ${V} exists.`))))?.dist;if(!B?.tarball)return yield*u(`registry response for ${$}@${V} has no tarball URL; cannot self-update`);let N=B.tarball,b=yield*J.fetchBytes(N).pipe(Q.mapError((K)=>new H(`download failed: could not download ${N} (${A(K)}). Check your network connection and try again.`)));yield*Q.try({try:()=>kj(b,B),catch:(K)=>K instanceof H?K:new H(A(K))});let X=yield*Q.try({try:()=>w(b),catch:()=>new H("downloaded tarball is corrupt (gunzip failed); try again")}),Z=Qj(X,"package/bin/qitqode")??Qj(X,"package/bin/qitqode.exe");if(!Z||Z.length===0)return yield*u(`tarball for ${$}@${V} does not contain the expected binary at bin/qitqode`);let O=Zj.join(R,`.qitqode-upgrade-${process.pid}`),Y=`${_}.backup-${process.pid}`,D=(K)=>{try{v.rmSync(K,{force:!0})}catch{}};yield*p(()=>v.writeFileSync(O,Z,{mode:493}),(K)=>{return D(O),`no write permission: could not write ${O} (${A(K)})`});let L=yield*J.runVersion(O).pipe(Q.mapError((K)=>{return D(O),new H(`downloaded binary failed its --version check (${A(K)}); keeping the current installation`)}));if(L.code!==0)return D(O),yield*u(`downloaded binary failed its --version check (exit ${L.code}); keeping the current installation`);let m=L.stdout.trim();if(m&&!m.includes(V))return D(O),yield*u(`downloaded binary reports version "${m}" instead of ${V}; keeping the current installation`);yield*p(()=>v.renameSync(_,Y),(K)=>{return D(O),`could not move the current binary aside (${A(K)}); check permissions on ${_}`}),yield*Q.try({try:()=>v.renameSync(O,_),catch:(K)=>{try{v.renameSync(Y,_)}catch{return new H(`failed to install the new binary AND failed to restore the old one; your previous binary is preserved at ${Y} \u2014 move it back to ${_} manually`)}return D(O),new H(`could not install the new binary (${A(K)}); the previous version was restored`)}}),D(Y)});var c=h.create({service:"installation"}),M="@qitqode/cli";function qj(J,V){if(!z.default.valid(J)||!z.default.valid(V))return!1;return z.default.gt(V,J)}var Cj={Updated:s.define("installation.updated",j.object({version:j.string()})),UpdateAvailable:s.define("installation.update-available",j.object({version:j.string()}))};function yj(J,V){if(!qj(J,V))throw Error(`Version ${V} is not newer than ${J}`);let _=z.default.major(J),$=z.default.minor(J),W=z.default.major(V),w=z.default.minor(V);if(W>_)return"major";if(w>$)return"minor";return"patch"}var Uj=j.object({version:j.string(),latest:j.string()}).meta({ref:"InstallationInfo"}),Sj=`qitqode/${y}/${a}/${I.QITQODE_CLIENT}`;function ij(){return y!=="latest"}function mj(){return y==="local"}class x extends C.TaggedErrorClass()("UpgradeFailedError",{stderr:C.String}){}var nj=C.Struct({version:C.String});class E extends Wj.Service()("@qitqode/Installation"){}var Bj=o.effect(E,Q.gen(function*(){let J=yield*k.HttpClient,V=k.filterStatusOk(_j(J)),_=yield*f.ChildProcessSpawner,$=(X,Z)=>Gj.make(X[0],X.slice(1),{cwd:Z?.cwd,env:Z?.env,extendEnv:!0}),W=Q.fnUntraced(function*(X){let Z=yield*Hj(_,X);return{code:Z.code,stdout:Z.text,stderr:Z.stderr}},Q.scoped),w=Q.fnUntraced(function*(X,Z){let O=yield*_.spawn($(X,Z)),Y=yield*l.mkString(l.decodeText(O.stdout));return yield*O.exitCode,Y},Q.scoped,Q.catch(()=>Q.succeed(""))),R=Q.fnUntraced(function*(X,Z){return yield*W($(X,Z))},Q.catch(()=>Q.succeed({code:f.ExitCode(1),stdout:"",stderr:""}))),G=Q.fn("Installation.method")(function*(){if(process.execPath.includes(Yj.join(".qitqode","bin")))return"curl";if(process.execPath.includes(Yj.join(".local","bin")))return"curl";let X=process.execPath.toLowerCase(),Z=[{name:"npm",command:()=>w(["npm","list","-g","--depth=0"])},{name:"pnpm",command:()=>w(["pnpm","list","-g","--depth=0"])},{name:"bun",command:()=>w(["bun","pm","ls","-g"])}];Z.sort((O,Y)=>{let D=X.includes(O.name),L=X.includes(Y.name);if(D&&!L)return-1;if(!D&&L)return 1;return 0});for(let O of Z)if((yield*O.command()).includes(M))return O.name;return"unknown"}),q=Q.fn("Installation.latest")(function*(X){let Z=X||(yield*G());if(Z==="curl"){let Y=(yield*w(["curl","-sI","https://github.com/qitqode/qitqode/releases/latest"])).match(/^location:.*\/tag\/v([0-9][^\s/]*)/im);if(Y)return Y[1];return yield*Q.die(Error("failed to resolve latest version from GitHub releases redirect"))}if(Z==="npm"||Z==="bun"||Z==="pnpm"){let Y=(yield*w(["npm","config","get","registry"])).trim()||"https://registry.npmjs.org",D=Y.endsWith("/")?Y.slice(0,-1):Y,L=yield*V.execute(P.get(`${D}/${encodeURIComponent(M)}/${y}`).pipe(P.acceptJson));return(yield*wj.schemaBodyJson(nj)(L)).version}return c.warn("unsupported update channel, skipping",{method:Z}),yield*Q.die(Error(`unsupported update channel: ${Z}`))},Q.orDie),B=Q.fnUntraced(function*(){let Z=(yield*w(["npm","config","get","registry"])).trim()||"https://registry.npmjs.org";return Z.endsWith("/")?Z.slice(0,-1):Z}),N=Q.fnUntraced(function*(X){let Z=yield*B();yield*Xj({target:X,execPath:process.env.QITQODE_SELF_UPDATE_TARGET_BINARY||process.execPath,packageName:$j(),registry:Z,fetchJson:(O)=>V.execute(P.get(O).pipe(P.acceptJson)).pipe(Q.flatMap((Y)=>Y.json)),fetchBytes:(O)=>V.execute(P.get(O)).pipe(Q.flatMap((Y)=>Y.arrayBuffer),Q.map((Y)=>new Uint8Array(Y))),runVersion:(O)=>R([O,"--version"]).pipe(Q.map((Y)=>({code:Y.code,stdout:Y.stdout})))}).pipe(Q.mapError((O)=>new x({stderr:O.message})))}),b=Q.fn("Installation.upgrade")(function*(X,Z){if(X==="curl"){yield*N(Z),c.info("upgraded",{method:X,target:Z});return}let Y=yield*(()=>{if(X==="npm")return R(["npm","install","-g",`${M}@${Z}`]);if(X==="pnpm")return R(["pnpm","install","-g",`${M}@${Z}`]);if(X==="bun")return R(["bun","install","-g",`${M}@${Z}`]);return new x({stderr:`Unknown method: ${X}`})})();if(Y.code!==0){let D=Y.stderr||"";return yield*new x({stderr:D})}c.info("upgraded",{method:X,target:Z,stdout:Y.stdout,stderr:Y.stderr}),yield*w([process.execPath,"--version"])});return E.of({info:Q.fn("Installation.info")(function*(){return{version:a,latest:yield*q()}}),method:G,latest:q,upgrade:b})})),uj=Bj.pipe(o.provide(Kj.layer),o.provide(Rj));var t=j.lazy(()=>j.union([j.string(),j.number(),j.boolean(),j.null(),j.array(t),j.record(j.string(),t)])),Dj=j.object({input:j.number(),output:j.number(),cache_read:j.number().optional(),cache_write:j.number().optional(),context_over_200k:j.object({input:j.number(),output:j.number(),cache_read:j.number().optional(),cache_write:j.number().optional()}).optional()}),r=j.object({id:j.string(),name:j.string(),family:j.string().optional(),release_date:j.string(),attachment:j.boolean(),reasoning:j.boolean(),temperature:j.boolean().optional(),tool_call:j.boolean(),interleaved:j.union([j.literal(!0),j.object({field:j.enum(["reasoning_content","reasoning_details"])}).strict()]).optional(),cost:Dj.optional(),limit:j.object({context:j.number(),input:j.number().optional(),output:j.number()}),modalities:j.object({input:j.array(j.enum(["text","audio","image","video","pdf"])),output:j.array(j.enum(["text","audio","image","video","pdf"]))}).optional(),experimental:j.object({modes:j.record(j.string(),j.object({cost:Dj.optional(),provider:j.object({body:j.record(j.string(),t).optional(),headers:j.record(j.string(),j.string()).optional()}).optional()})).optional()}).optional(),status:j.enum(["alpha","beta","deprecated"]).optional(),provider:j.object({npm:j.string().optional(),api:j.string().optional()}).optional()}),e=j.object({api:j.string().optional(),name:j.string(),env:j.array(j.string()),id:j.string(),npm:j.string().optional(),models:j.record(j.string(),r)});var Vj=h.create({service:"models.dev"}),bj=Fj(),F=hj.join(Nj.Path.cache,bj==="https://models.dev"?"models.json":`models-${Ij.fast(bj)}.json`),gj=300000,Aj=8388608,T,dj=j.record(j.string(),e),pj=r,cj=e;function Fj(){return I.QITQODE_MODELS_URL||"https://models.dev"}function lj(){return Date.now()-Number(i.stat(F)?.mtimeMs??0)<gj}function Lj(J){return!J&&lj()}function g(J){let V=dj.parse(typeof J==="string"?JSON.parse(J):J);for(let[_,$]of Object.entries(V))if($.id!==_)throw Error(`Invalid model provider: ${_}`);return V}async function zj(J){let V=await i.readJson(J).catch(()=>{return});if(!V)return;try{return g(V)}catch(_){Vj.warn("Ignoring invalid model catalog cache",{file:J,error:_});return}}async function Pj(J,V,_=Aj){let $=J.headers.get("content-type")?.split(";")[0]?.trim().toLowerCase();if($!=="application/json"&&!$?.endsWith("+json"))throw Error(`Invalid model catalog content type: ${$||"missing"}`);let W=Number(J.headers.get("content-length"));if(Number.isFinite(W)&&W>_)throw Error("Model catalog response is too large");if(!J.body)return"";let w=J.body.getReader(),R=()=>void w.cancel(V.reason);V.addEventListener("abort",R,{once:!0});let G=new Uint8Array(_),q=0;try{for(;;){let B=await w.read();if(B.done)break;if(q+=B.value.byteLength,q>_)throw await w.cancel(),Error("Model catalog response is too large");G.set(B.value,q-B.value.byteLength)}}finally{V.removeEventListener("abort",R)}return new TextDecoder().decode(G.subarray(0,q))}var Tj=async()=>{let J=AbortSignal.timeout(1e4),V=await fetch(`${Fj()}/api.json`,{headers:{"User-Agent":U.USER_AGENT},signal:J});if(!V.ok)return;let _=g(await Pj(V,J));return JSON.stringify(_)},S=vj(async()=>{let J=await zj(I.QITQODE_MODELS_PATH??F);if(J)return J;let V=await import("./chunk-31qrzrwy.js").then((_)=>g(_.snapshot)).catch(()=>{return});if(V)return V;if(I.QITQODE_DISABLE_MODELS_FETCH)return{};return Jj.withLock(`models-dev:${F}`,async()=>{let _=await zj(I.QITQODE_MODELS_PATH??F);if(_)return _;let $=await Tj();if($)return await i.write(F,$).catch((W)=>{Vj.error("Failed to write models cache",{error:W})}),g($);return{}})});async function fj(){return S()}async function jj(J=!1){if(Lj(J))return S.reset();await Jj.withLock(`models-dev:${F}`,async()=>{if(Lj(J))return S.reset();let V=await Tj();if(!V)return;await i.write(F,V),S.reset()}).catch((V)=>{Vj.error("Failed to fetch models.dev",{error:V})})}function sj(){if(T||I.QITQODE_DISABLE_MODELS_FETCH||process.argv.includes("--get-yargs-completions"))return;jj(),T=setInterval(async()=>{await jj()},3600000),T.unref()}function aj(){if(!T)return;clearInterval(T),T=void 0}
|
|
3
3
|
export{_j as El,U as Fl,Aj as Gl,pj as Hl,cj as Il,Pj as Jl,S as Kl,fj as Ll,jj as Ml,sj as Nl,aj as Ol,tj as Pl};
|