@qitqode/qitqode-android-arm64 0.1.29 → 0.1.30

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.
Files changed (386) hide show
  1. package/bundle/{chunk-fj7kd4gc.js → chunk-04tw0r4s.js} +1 -1
  2. package/bundle/{chunk-sbx9z70j.js → chunk-07g7cybt.js} +1 -1
  3. package/bundle/chunk-07ws99b1.js +2 -0
  4. package/bundle/chunk-09c4ngag.js +2 -0
  5. package/bundle/{chunk-j2zay4da.js → chunk-09kba1hg.js} +2 -2
  6. package/bundle/{chunk-dd3m74rc.js → chunk-0ch32p4c.js} +1 -1
  7. package/bundle/{chunk-2p2ch1k2.js → chunk-0df4kede.js} +1 -1
  8. package/bundle/{chunk-f29n7826.js → chunk-0fmbz83g.js} +1 -1
  9. package/bundle/{chunk-gd5stg49.js → chunk-0jgsp4c2.js} +1 -1
  10. package/bundle/chunk-0jgst767.js +2 -0
  11. package/bundle/chunk-0psrr9vp.js +2 -0
  12. package/bundle/{chunk-hn1f6rne.js → chunk-12bssxd4.js} +2 -2
  13. package/bundle/{chunk-a2qerqgd.js → chunk-1bhvt33f.js} +1 -1
  14. package/bundle/{chunk-3rt2k5sc.js → chunk-1dwcga8g.js} +1 -1
  15. package/bundle/{chunk-xn5v8wgh.js → chunk-1fbeendk.js} +1 -1
  16. package/bundle/chunk-1j73cnvz.js +2 -0
  17. package/bundle/{chunk-tqsx2m1j.js → chunk-1ngtxja9.js} +1 -1
  18. package/bundle/{chunk-p7h2qd7z.js → chunk-1qshjfzm.js} +1 -1
  19. package/bundle/{chunk-0626rvy2.js → chunk-1rp1cvmc.js} +1 -1
  20. package/bundle/{chunk-csdm3n24.js → chunk-1sgby720.js} +1 -1
  21. package/bundle/{chunk-6hmj972a.js → chunk-1t9jne14.js} +1 -1
  22. package/bundle/chunk-1yddn03z.js +2 -0
  23. package/bundle/{chunk-74zgcxeg.js → chunk-26nfphsg.js} +1 -1
  24. package/bundle/{chunk-71pmrpkc.js → chunk-27dgtm8r.js} +1 -1
  25. package/bundle/{chunk-n3t52cz2.js → chunk-27yxgy03.js} +1 -1
  26. package/bundle/{chunk-2hw0jzv4.js → chunk-2ahqhh4z.js} +1 -1
  27. package/bundle/{chunk-z5yrvg40.js → chunk-2bn4b42t.js} +1 -1
  28. package/bundle/{chunk-9kjj44cr.js → chunk-2dzk5txw.js} +1 -1
  29. package/bundle/chunk-2ec6ps8r.js +5 -0
  30. package/bundle/{chunk-q5363rr9.js → chunk-2gerf08b.js} +2 -2
  31. package/bundle/{chunk-2mjc44ev.js → chunk-2jmxt3fb.js} +1 -1
  32. package/bundle/{chunk-7926bzm7.js → chunk-2km50rd3.js} +1 -1
  33. package/bundle/{chunk-rptvpa1v.js → chunk-2q96x1t5.js} +1 -1
  34. package/bundle/{chunk-pg8dz1rq.js → chunk-2rs39vj2.js} +1 -1
  35. package/bundle/{chunk-3n49y4kh.js → chunk-2tnarng3.js} +1 -1
  36. package/bundle/{chunk-z160s5p5.js → chunk-2vepzgek.js} +1 -1
  37. package/bundle/{chunk-b9hstp7h.js → chunk-2y90ad1v.js} +1 -1
  38. package/bundle/{chunk-ed723mw1.js → chunk-371r2111.js} +1 -1
  39. package/bundle/{chunk-g06rv5fq.js → chunk-37n34pzd.js} +1 -1
  40. package/bundle/chunk-38g8yzw0.js +2 -0
  41. package/bundle/chunk-3bkd0ar3.js +2 -0
  42. package/bundle/{chunk-9atkgkaq.js → chunk-3bmzjznz.js} +1 -1
  43. package/bundle/chunk-3f4zht9e.js +2 -0
  44. package/bundle/{chunk-0yqbyres.js → chunk-3g1yz39h.js} +1 -1
  45. package/bundle/{chunk-k095hd3c.js → chunk-3n1324bt.js} +1 -1
  46. package/bundle/{chunk-ef2b07fm.js → chunk-3nwve06r.js} +1 -1
  47. package/bundle/{chunk-cev2qj7w.js → chunk-3nyqh1d6.js} +1 -1
  48. package/bundle/{chunk-p5360c2q.js → chunk-3pxnp6jb.js} +1 -1
  49. package/bundle/{chunk-94qmhz2p.js → chunk-3szwfy7w.js} +2 -2
  50. package/bundle/chunk-426dt7be.js +2 -0
  51. package/bundle/{chunk-6jewfaqa.js → chunk-42f7p0hq.js} +2 -2
  52. package/bundle/chunk-4amgp4yd.js +3 -0
  53. package/bundle/{chunk-3vmh2ge6.js → chunk-4p5e5tsz.js} +1 -1
  54. package/bundle/{chunk-nfzmvy30.js → chunk-4pjm21a5.js} +1 -1
  55. package/bundle/{chunk-6hdjkvr1.js → chunk-4qqkqrn9.js} +2 -2
  56. package/bundle/chunk-4sz3jbc5.js +2 -0
  57. package/bundle/{chunk-bsf6n350.js → chunk-4tbwha3m.js} +2 -2
  58. package/bundle/{chunk-qtsmgjk7.js → chunk-4xh1qm90.js} +1 -1
  59. package/bundle/{chunk-t3q7qakr.js → chunk-58x5seqn.js} +1 -1
  60. package/bundle/{chunk-thk93j3e.js → chunk-5a5t01ka.js} +1 -1
  61. package/bundle/{chunk-hhgjbag9.js → chunk-5fgx6fa4.js} +1 -1
  62. package/bundle/{chunk-n86s4fw4.js → chunk-5fz8tph5.js} +1 -1
  63. package/bundle/{chunk-n5sh2790.js → chunk-5qam3c8r.js} +1 -1
  64. package/bundle/{chunk-45jqjyk9.js → chunk-5v4py9p2.js} +1 -1
  65. package/bundle/{chunk-z44m19vm.js → chunk-5xe6x2rt.js} +1 -1
  66. package/bundle/chunk-618tmyx9.js +2 -0
  67. package/bundle/{chunk-zasd8cz8.js → chunk-61c62e5s.js} +1 -1
  68. package/bundle/chunk-6d9wsjxm.js +2 -0
  69. package/bundle/{chunk-zqxmr01r.js → chunk-6fp8a9ek.js} +1 -1
  70. package/bundle/{chunk-ndmrg80b.js → chunk-6hv59ere.js} +1 -1
  71. package/bundle/{chunk-yaj9ywvz.js → chunk-6nbzdb0r.js} +1 -1
  72. package/bundle/{chunk-k7dcfqjs.js → chunk-6qy1ghrx.js} +1 -1
  73. package/bundle/chunk-730a2d1k.js +2 -0
  74. package/bundle/{chunk-gf5pwww1.js → chunk-76wrw0cs.js} +1 -1
  75. package/bundle/chunk-7bd0x9vf.js +2 -0
  76. package/bundle/chunk-7czkntef.js +2 -0
  77. package/bundle/chunk-7ex57nyh.js +2 -0
  78. package/bundle/chunk-7gpczxbh.js +2 -0
  79. package/bundle/chunk-7j0bgeh2.js +2 -0
  80. package/bundle/{chunk-cfxjwfn4.js → chunk-7jbz3dgt.js} +1 -1
  81. package/bundle/{chunk-cjfgs1x8.js → chunk-7ppd2phw.js} +1 -1
  82. package/bundle/chunk-7py443fe.js +2 -0
  83. package/bundle/{chunk-v7deh7aj.js → chunk-7yrhe3xq.js} +1 -1
  84. package/bundle/{chunk-xhncwg5v.js → chunk-89q1y7tc.js} +1 -1
  85. package/bundle/{chunk-yn576pje.js → chunk-89v6dgpp.js} +2 -2
  86. package/bundle/chunk-8qkhddq3.js +8 -0
  87. package/bundle/chunk-90q5sae0.js +2 -0
  88. package/bundle/chunk-9amwe0ed.js +2 -0
  89. package/bundle/chunk-9grvepmd.js +2 -0
  90. package/bundle/chunk-9hrh15p2.js +2 -0
  91. package/bundle/{chunk-azx0zxnx.js → chunk-9j1qqdr2.js} +1 -1
  92. package/bundle/{chunk-s2za1n7h.js → chunk-a0v55ywn.js} +2 -2
  93. package/bundle/{chunk-a8p9aggx.js → chunk-a1p2f16h.js} +2 -2
  94. package/bundle/{chunk-8f0g7d7k.js → chunk-a1pw9r6f.js} +1 -1
  95. package/bundle/{chunk-95qs7wnz.js → chunk-a2qz9m10.js} +1 -1
  96. package/bundle/{chunk-az9hsk6z.js → chunk-ab6cabxh.js} +1 -1
  97. package/bundle/chunk-av6ezvxm.js +2 -0
  98. package/bundle/{chunk-yjj4cvqg.js → chunk-aztre27e.js} +1 -1
  99. package/bundle/{chunk-b4qd109w.js → chunk-b0syck9r.js} +1 -1
  100. package/bundle/{chunk-hevb7k95.js → chunk-b3dqcbsc.js} +1 -1
  101. package/bundle/{chunk-pq2prhb2.js → chunk-b3rpzkcb.js} +1 -1
  102. package/bundle/{chunk-tsb9g1nz.js → chunk-b8bytvka.js} +1 -1
  103. package/bundle/{chunk-awav98j0.js → chunk-b8tw709r.js} +1 -1
  104. package/bundle/{chunk-6528bthc.js → chunk-b9za12y1.js} +1 -1
  105. package/bundle/{chunk-fsy279s5.js → chunk-be216spx.js} +2 -2
  106. package/bundle/chunk-beksar7w.js +2 -0
  107. package/bundle/chunk-bg66rqrx.js +2 -0
  108. package/bundle/{chunk-a94s0jks.js → chunk-bn15mzd7.js} +1 -1
  109. package/bundle/{chunk-z29fwg61.js → chunk-bpbptx89.js} +1 -1
  110. package/bundle/{chunk-qzjpea91.js → chunk-bss414qz.js} +1 -1
  111. package/bundle/chunk-bt6yw07v.js +2 -0
  112. package/bundle/{chunk-d0qqgxs4.js → chunk-btz9jvec.js} +1 -1
  113. package/bundle/{chunk-ypthfv6d.js → chunk-bvkq0a5q.js} +1 -1
  114. package/bundle/{chunk-bx6kyvg7.js → chunk-c01z3cvg.js} +1 -1
  115. package/bundle/{chunk-s6me101a.js → chunk-c5e6sk9c.js} +1 -1
  116. package/bundle/{chunk-yn05n0az.js → chunk-cafzcmrg.js} +2 -2
  117. package/bundle/{chunk-2xxefrps.js → chunk-cdhmc0t0.js} +1 -1
  118. package/bundle/{chunk-qredfmch.js → chunk-chmrvbbj.js} +1 -1
  119. package/bundle/{chunk-b1ntb3dh.js → chunk-ct48575c.js} +1 -1
  120. package/bundle/{chunk-yp3dj4wh.js → chunk-cvdxgsq1.js} +1 -1
  121. package/bundle/chunk-cy9s1ma5.js +2 -0
  122. package/bundle/chunk-d0nkvp57.js +2 -0
  123. package/bundle/{chunk-abtn6nec.js → chunk-d5bxan80.js} +1 -1
  124. package/bundle/{chunk-5n4hpc4f.js → chunk-d6r4xwtg.js} +3 -3
  125. package/bundle/{chunk-xk1nh1ay.js → chunk-dcvatax2.js} +2 -2
  126. package/bundle/{chunk-m2ny1en7.js → chunk-ddnpx1yx.js} +4 -4
  127. package/bundle/{chunk-qzcfjz9g.js → chunk-dfnv7vkn.js} +1 -1
  128. package/bundle/{chunk-18vygvnc.js → chunk-dhjp0zx2.js} +1 -1
  129. package/bundle/{chunk-sv48x9h8.js → chunk-dq9kpj4a.js} +1 -1
  130. package/bundle/{chunk-88dhcv37.js → chunk-drs1gv2b.js} +1 -1
  131. package/bundle/{chunk-geccvf9d.js → chunk-ds69qc8b.js} +1 -1
  132. package/bundle/chunk-dvk2wwjj.js +2 -0
  133. package/bundle/chunk-dxe29jj6.js +2 -0
  134. package/bundle/chunk-e0jy9qxd.js +2 -0
  135. package/bundle/{chunk-fhdpp77n.js → chunk-eb9mytjq.js} +1 -1
  136. package/bundle/{chunk-c19t7e8s.js → chunk-ecn8gbtz.js} +1 -1
  137. package/bundle/chunk-eercqt72.js +2 -0
  138. package/bundle/{chunk-8jzjvmaz.js → chunk-efxd6b2k.js} +1 -1
  139. package/bundle/{chunk-hd2kb05a.js → chunk-ejjea8hh.js} +1 -1
  140. package/bundle/chunk-eneawsj8.js +2 -0
  141. package/bundle/{chunk-v9xnk9pz.js → chunk-ezja6njs.js} +1 -1
  142. package/bundle/{chunk-8kz3n8ye.js → chunk-f45tp3e3.js} +1 -1
  143. package/bundle/chunk-f72pppr7.js +2 -0
  144. package/bundle/chunk-feyphhxd.js +2 -0
  145. package/bundle/{chunk-2w20mhch.js → chunk-fjgyrsbw.js} +1 -1
  146. package/bundle/{chunk-v00cptj6.js → chunk-fkgv2hqd.js} +1 -1
  147. package/bundle/{chunk-8d2ddmf0.js → chunk-fnbpap62.js} +1 -1
  148. package/bundle/chunk-fnnch1e9.js +2 -0
  149. package/bundle/{chunk-7wthn44y.js → chunk-fqw4y7x0.js} +2 -2
  150. package/bundle/{chunk-yk8kk25c.js → chunk-ft93f33g.js} +1 -1
  151. package/bundle/{chunk-3q6650we.js → chunk-g1dwbvkg.js} +1 -1
  152. package/bundle/{chunk-mb4wvwfw.js → chunk-g3dhsmbt.js} +3 -3
  153. package/bundle/{chunk-1xw68zak.js → chunk-g7rjtehn.js} +1 -1
  154. package/bundle/{chunk-q0xzbad1.js → chunk-gf0pdgjs.js} +1 -1
  155. package/bundle/{chunk-gd45tjbd.js → chunk-ggqst87g.js} +1 -1
  156. package/bundle/{chunk-n34y5gp6.js → chunk-gj3hzx3d.js} +2 -2
  157. package/bundle/chunk-gk34kh8p.js +2 -0
  158. package/bundle/{chunk-pycjksh4.js → chunk-gm85xefs.js} +1 -1
  159. package/bundle/chunk-gn50xqbd.js +2 -0
  160. package/bundle/{chunk-89f8v2y8.js → chunk-h0rpmne5.js} +1 -1
  161. package/bundle/chunk-h6rv626m.js +2 -0
  162. package/bundle/chunk-h7s2w1e2.js +2 -0
  163. package/bundle/{chunk-yyqrbv2f.js → chunk-h9pvnp5c.js} +1 -1
  164. package/bundle/{chunk-hpfqnjfz.js → chunk-hj5y7fvk.js} +1 -1
  165. package/bundle/chunk-hmv2cdnz.js +2 -0
  166. package/bundle/chunk-ht81ensf.js +2 -0
  167. package/bundle/{chunk-44jpsp97.js → chunk-hw1dmx28.js} +1 -1
  168. package/bundle/{chunk-43ae3chd.js → chunk-hwbyqezq.js} +2 -2
  169. package/bundle/{chunk-97h0jx8y.js → chunk-hxpgs78j.js} +1 -1
  170. package/bundle/{chunk-yj73ehjd.js → chunk-hxz2rdjq.js} +1 -1
  171. package/bundle/chunk-j59ktwny.js +2 -0
  172. package/bundle/{chunk-cd867geb.js → chunk-j5kb0y1m.js} +1 -1
  173. package/bundle/{chunk-1rn0vmvv.js → chunk-j6emx6jn.js} +2 -2
  174. package/bundle/{chunk-ekndhwnn.js → chunk-j9pcnkkq.js} +2 -2
  175. package/bundle/{chunk-2p9py4rw.js → chunk-jje0srjq.js} +1 -1
  176. package/bundle/{chunk-kkae8ead.js → chunk-jm1ptn8n.js} +1 -1
  177. package/bundle/chunk-jmz2mq3t.js +2 -0
  178. package/bundle/{chunk-11d987sj.js → chunk-jvqbvgjy.js} +1 -1
  179. package/bundle/chunk-k309zez0.js +3 -0
  180. package/bundle/chunk-k3fn3yed.js +2 -0
  181. package/bundle/{chunk-1fz0383p.js → chunk-k7gq9bra.js} +1 -1
  182. package/bundle/{chunk-eqcd9k9p.js → chunk-k8ss3135.js} +130 -130
  183. package/bundle/{chunk-4fk4se02.js → chunk-kfsb2stm.js} +1 -1
  184. package/bundle/{chunk-b73s2h43.js → chunk-knpt9n8f.js} +1 -1
  185. package/bundle/chunk-kpw6nghv.js +2 -0
  186. package/bundle/{chunk-81h5f8ev.js → chunk-kqn9h2gk.js} +1 -1
  187. package/bundle/{chunk-jwtev7b7.js → chunk-m02zt1a3.js} +2 -2
  188. package/bundle/{chunk-ktqrbbkh.js → chunk-m1h5a4vg.js} +1 -1
  189. package/bundle/chunk-m5ghbt5y.js +2 -0
  190. package/bundle/{chunk-4vze3djr.js → chunk-m612agnk.js} +1 -1
  191. package/bundle/{chunk-hbtd620x.js → chunk-m67tcnk4.js} +1 -1
  192. package/bundle/{chunk-6bsgrr5h.js → chunk-mgk9sh16.js} +1 -1
  193. package/bundle/{chunk-wnwesaap.js → chunk-mj4bepvj.js} +1 -1
  194. package/bundle/{chunk-t3tkp1em.js → chunk-mk6cddvd.js} +1 -1
  195. package/bundle/chunk-mn41f9qv.js +2 -0
  196. package/bundle/chunk-mqjf9sbm.js +2 -0
  197. package/bundle/{chunk-r4mnbhe1.js → chunk-mrw279k3.js} +1 -1
  198. package/bundle/{chunk-qje3683x.js → chunk-msegx0t7.js} +1 -1
  199. package/bundle/{chunk-x6nbck7p.js → chunk-mskwkcgj.js} +1 -1
  200. package/bundle/{chunk-ce5t444d.js → chunk-my6sz5d6.js} +1 -1
  201. package/bundle/{chunk-scqxmv8k.js → chunk-n26yf3he.js} +1 -1
  202. package/bundle/chunk-n5gwrrbb.js +2 -0
  203. package/bundle/{chunk-6scqd8fh.js → chunk-n8h6x2en.js} +1 -1
  204. package/bundle/chunk-nfjhem1c.js +2 -0
  205. package/bundle/{chunk-h8chkene.js → chunk-ngchsw2g.js} +1 -1
  206. package/bundle/{chunk-rf524gez.js → chunk-ngytjdg2.js} +1 -1
  207. package/bundle/chunk-nj4d554m.js +11 -0
  208. package/bundle/chunk-nrc3bj9p.js +2 -0
  209. package/bundle/{chunk-0xm85ayc.js → chunk-nt4e3em9.js} +1 -1
  210. package/bundle/chunk-nxyyn2ra.js +2 -0
  211. package/bundle/{chunk-t35n89t9.js → chunk-nzehfpxp.js} +1 -1
  212. package/bundle/chunk-p5tceb4k.js +2 -0
  213. package/bundle/{chunk-js9wdh67.js → chunk-p68rwmhc.js} +1 -1
  214. package/bundle/{chunk-g0mbbysk.js → chunk-pekm54ce.js} +1 -1
  215. package/bundle/{chunk-yvqbewmc.js → chunk-phxrg7aw.js} +2 -2
  216. package/bundle/{chunk-3h4y7n1a.js → chunk-ppfjf7qx.js} +1 -1
  217. package/bundle/{chunk-d7t0bcvk.js → chunk-pvpy9kq1.js} +6 -6
  218. package/bundle/{chunk-k16s2dnx.js → chunk-q1v2pytx.js} +1 -1
  219. package/bundle/{chunk-svrxk3vf.js → chunk-q6ztpfcs.js} +2 -2
  220. package/bundle/{chunk-8k55xz7z.js → chunk-qhc90p4a.js} +1 -1
  221. package/bundle/chunk-qjgm3e2p.js +2 -0
  222. package/bundle/{chunk-4mrz9b6d.js → chunk-qjjch1zt.js} +2 -2
  223. package/bundle/{chunk-b20xjnpw.js → chunk-qjn86fc0.js} +1 -1
  224. package/bundle/{chunk-9epjgend.js → chunk-qrey2gwb.js} +2 -2
  225. package/bundle/chunk-qt80mhdn.js +2 -0
  226. package/bundle/chunk-qtw5nrr4.js +2 -0
  227. package/bundle/{chunk-xk7je9y8.js → chunk-qv2s39dv.js} +1 -1
  228. package/bundle/chunk-rc9ex3vt.js +2 -0
  229. package/bundle/{chunk-xn61fgrh.js → chunk-s07j8hfy.js} +1 -1
  230. package/bundle/{chunk-y212x7ws.js → chunk-s3yna2wm.js} +1 -1
  231. package/bundle/chunk-s9672vvv.js +2 -0
  232. package/bundle/chunk-sbyey0qb.js +2 -0
  233. package/bundle/{chunk-ps6jk326.js → chunk-scnz207s.js} +1 -1
  234. package/bundle/{chunk-k20nrwbg.js → chunk-sermjas1.js} +1 -1
  235. package/bundle/chunk-shpq6es1.js +3 -0
  236. package/bundle/chunk-sj5v361q.js +2 -0
  237. package/bundle/{chunk-qsszerj7.js → chunk-sn4nez18.js} +2 -2
  238. package/bundle/{chunk-t299e2aw.js → chunk-snm5q21k.js} +2 -2
  239. package/bundle/{chunk-yt2k9ga8.js → chunk-srh4xvsj.js} +1 -1
  240. package/bundle/{chunk-a2g69pv6.js → chunk-svvgv1s0.js} +1 -1
  241. package/bundle/{chunk-n4gjpgnk.js → chunk-szr0f7k2.js} +1 -1
  242. package/bundle/{chunk-4vemws1t.js → chunk-t12xrrfr.js} +2 -2
  243. package/bundle/chunk-ta3k9syc.js +2 -0
  244. package/bundle/{chunk-d86ma6zk.js → chunk-tj78jsp9.js} +1 -1
  245. package/bundle/chunk-tk5afan4.js +2 -0
  246. package/bundle/chunk-tpndnprb.js +2 -0
  247. package/bundle/{chunk-jkm54mha.js → chunk-tr8sf0dk.js} +1 -1
  248. package/bundle/{chunk-hgbkg85g.js → chunk-v2zp22r3.js} +1 -1
  249. package/bundle/{chunk-jntqzhxr.js → chunk-v4xcysh0.js} +1 -1
  250. package/bundle/{chunk-19sa03c1.js → chunk-v965rsr8.js} +2 -2
  251. package/bundle/{chunk-2ztdqtnk.js → chunk-vcmrrt8b.js} +1 -1
  252. package/bundle/chunk-vcrn3v70.js +2 -0
  253. package/bundle/{chunk-b9nwaaqs.js → chunk-vg2fmyje.js} +2 -2
  254. package/bundle/{chunk-98vfbn0h.js → chunk-vj62pc0h.js} +1 -1
  255. package/bundle/{chunk-g3ch14a1.js → chunk-vn7nkrqb.js} +1 -1
  256. package/bundle/chunk-vwxfgea7.js +2 -0
  257. package/bundle/chunk-w0kgcz1t.js +2 -0
  258. package/bundle/{chunk-50w28xj1.js → chunk-w87a3mzm.js} +1 -1
  259. package/bundle/{chunk-09j71kp6.js → chunk-wfs4pcwa.js} +3 -3
  260. package/bundle/{chunk-zqjp7jdd.js → chunk-wgpsmxqx.js} +1 -1
  261. package/bundle/{chunk-kw09hbrb.js → chunk-whcg14sc.js} +1 -1
  262. package/bundle/{chunk-20d0cd1j.js → chunk-whxjkz9a.js} +2 -2
  263. package/bundle/chunk-wksczmes.js +2 -0
  264. package/bundle/{chunk-m6wceqay.js → chunk-wnqwb6fd.js} +1 -1
  265. package/bundle/{chunk-7mc8nxve.js → chunk-wpajh5s5.js} +1 -1
  266. package/bundle/chunk-wsxta33r.js +2 -0
  267. package/bundle/{chunk-byc7ev8p.js → chunk-wsy0m70r.js} +1 -1
  268. package/bundle/{chunk-csyw14fj.js → chunk-wy46mbwt.js} +1 -1
  269. package/bundle/{chunk-0wdtbn59.js → chunk-wz0zcddf.js} +2 -2
  270. package/bundle/{chunk-gjvymdhp.js → chunk-x067eetw.js} +1 -1
  271. package/bundle/{chunk-s1sepxdp.js → chunk-xc5044tm.js} +1 -1
  272. package/bundle/{chunk-tj00kzk4.js → chunk-xck0sq3k.js} +1 -1
  273. package/bundle/chunk-xjyhtm8r.js +2 -0
  274. package/bundle/{chunk-rs1698xs.js → chunk-xm08fc2q.js} +1 -1
  275. package/bundle/{chunk-bv8pf0m1.js → chunk-xpc2zgj7.js} +2 -2
  276. package/bundle/{chunk-nxn4arcf.js → chunk-xs3xtz6x.js} +1 -1
  277. package/bundle/{chunk-6saj1dhz.js → chunk-y062spw2.js} +1 -1
  278. package/bundle/{chunk-qk9vccja.js → chunk-y2v09y71.js} +1 -1
  279. package/bundle/{chunk-61yatzp8.js → chunk-ydp0q1hk.js} +1 -1
  280. package/bundle/{chunk-z4nay2ef.js → chunk-yfkvjphe.js} +1 -1
  281. package/bundle/chunk-ygc5qegv.js +2 -0
  282. package/bundle/chunk-yjqmzm51.js +2 -0
  283. package/bundle/{chunk-nv2r4cns.js → chunk-yjtdgcq5.js} +1 -1
  284. package/bundle/{chunk-5z7mjwwa.js → chunk-yn6sbycg.js} +1 -1
  285. package/bundle/{chunk-4fspp5fg.js → chunk-yp0a8q29.js} +3 -3
  286. package/bundle/{chunk-bzrsnv2k.js → chunk-yq3m8190.js} +2 -2
  287. package/bundle/{chunk-7m8fdp5p.js → chunk-yy526n9c.js} +1 -1
  288. package/bundle/chunk-yzc53n88.js +2 -0
  289. package/bundle/{chunk-j0znryc6.js → chunk-yzjc15vp.js} +1 -1
  290. package/bundle/chunk-z7y9pdj7.js +2 -0
  291. package/bundle/{chunk-rqgcz2zr.js → chunk-z8g819cz.js} +1 -1
  292. package/bundle/{chunk-4kpvceap.js → chunk-z8r65yw3.js} +1 -1
  293. package/bundle/{chunk-31wxbws4.js → chunk-zb0me4kk.js} +1 -1
  294. package/bundle/{chunk-asmfntjm.js → chunk-zcm2jdr5.js} +1 -1
  295. package/bundle/chunk-zt1nbwmm.js +2 -0
  296. package/bundle/{chunk-zbq60sw6.js → chunk-ztc3gm8y.js} +1 -1
  297. package/bundle/{chunk-v9bmpndq.js → chunk-zv6pjtz1.js} +1 -1
  298. package/bundle/{chunk-1d9f53sk.js → chunk-zyhdxggp.js} +2 -2
  299. package/bundle/{chunk-ma0m6kpj.js → chunk-zz36xg2n.js} +1 -1
  300. package/bundle/index.js +3 -3
  301. package/bundle/parser.worker.js +2 -2
  302. package/bundle/worker.js +1 -1
  303. package/package.json +1 -1
  304. package/bundle/chunk-07c1mvy1.js +0 -2
  305. package/bundle/chunk-0p7qcm51.js +0 -2
  306. package/bundle/chunk-0pmb7zzh.js +0 -2
  307. package/bundle/chunk-1s9ctg0d.js +0 -2
  308. package/bundle/chunk-2f9fn9xr.js +0 -2
  309. package/bundle/chunk-2fhcvfyg.js +0 -2
  310. package/bundle/chunk-3mfj0x4p.js +0 -2
  311. package/bundle/chunk-3shnje9k.js +0 -2
  312. package/bundle/chunk-3tz1qhpt.js +0 -2
  313. package/bundle/chunk-4dtbdycg.js +0 -2
  314. package/bundle/chunk-4pz8av2y.js +0 -2
  315. package/bundle/chunk-4r4xh8a6.js +0 -2
  316. package/bundle/chunk-5hpq59t1.js +0 -2
  317. package/bundle/chunk-5s90ehww.js +0 -2
  318. package/bundle/chunk-63kcg127.js +0 -2
  319. package/bundle/chunk-6fejrpht.js +0 -2
  320. package/bundle/chunk-6zzdw7q1.js +0 -2
  321. package/bundle/chunk-78m8rayq.js +0 -2
  322. package/bundle/chunk-7j6p5j2g.js +0 -2
  323. package/bundle/chunk-7tjd6ba1.js +0 -2
  324. package/bundle/chunk-8d8efdry.js +0 -2
  325. package/bundle/chunk-93jxndr8.js +0 -2
  326. package/bundle/chunk-99ve54r6.js +0 -2
  327. package/bundle/chunk-9ksaqyb2.js +0 -2
  328. package/bundle/chunk-9p7t748e.js +0 -2
  329. package/bundle/chunk-a69jgepp.js +0 -2
  330. package/bundle/chunk-ar310tc3.js +0 -2
  331. package/bundle/chunk-at03h9eq.js +0 -2
  332. package/bundle/chunk-ay9p70xx.js +0 -2
  333. package/bundle/chunk-b6dsv601.js +0 -3
  334. package/bundle/chunk-bajtytm5.js +0 -2
  335. package/bundle/chunk-bh8v3mfg.js +0 -2
  336. package/bundle/chunk-bn0h9dny.js +0 -10
  337. package/bundle/chunk-bp8sxnrm.js +0 -2
  338. package/bundle/chunk-bw5e8thn.js +0 -2
  339. package/bundle/chunk-c8ajbhv3.js +0 -2
  340. package/bundle/chunk-c8n72r2k.js +0 -8
  341. package/bundle/chunk-ccddzk10.js +0 -2
  342. package/bundle/chunk-ch8cx9jn.js +0 -2
  343. package/bundle/chunk-cm4jtnkg.js +0 -2
  344. package/bundle/chunk-cq7j5tv5.js +0 -2
  345. package/bundle/chunk-cttqh20d.js +0 -2
  346. package/bundle/chunk-cvvfa1jf.js +0 -2
  347. package/bundle/chunk-dfja6dj6.js +0 -5
  348. package/bundle/chunk-e3qtndrt.js +0 -2
  349. package/bundle/chunk-e8cac405.js +0 -2
  350. package/bundle/chunk-ez92ah9y.js +0 -2
  351. package/bundle/chunk-fazvedgy.js +0 -2
  352. package/bundle/chunk-gtzcm5sb.js +0 -2
  353. package/bundle/chunk-kfgn4apg.js +0 -2
  354. package/bundle/chunk-kzrw6h8t.js +0 -2
  355. package/bundle/chunk-mjrvj2cg.js +0 -2
  356. package/bundle/chunk-mpebdv59.js +0 -2
  357. package/bundle/chunk-n20v44zr.js +0 -2
  358. package/bundle/chunk-nksathh4.js +0 -2
  359. package/bundle/chunk-q14890p6.js +0 -2
  360. package/bundle/chunk-q4n02cwv.js +0 -2
  361. package/bundle/chunk-q7s17j1b.js +0 -2
  362. package/bundle/chunk-qm07wesh.js +0 -2
  363. package/bundle/chunk-qrrg9v3d.js +0 -2
  364. package/bundle/chunk-rdqgss38.js +0 -2
  365. package/bundle/chunk-rzc528ym.js +0 -2
  366. package/bundle/chunk-sbv96mj0.js +0 -3
  367. package/bundle/chunk-th78zcds.js +0 -2
  368. package/bundle/chunk-tv26mwx5.js +0 -2
  369. package/bundle/chunk-v69n6mef.js +0 -2
  370. package/bundle/chunk-vegwb3t0.js +0 -2
  371. package/bundle/chunk-w9seyn69.js +0 -2
  372. package/bundle/chunk-wanf4se3.js +0 -2
  373. package/bundle/chunk-wdhzmk1b.js +0 -2
  374. package/bundle/chunk-wxqtda70.js +0 -2
  375. package/bundle/chunk-wzb6s9rk.js +0 -2
  376. package/bundle/chunk-x0dg9rg6.js +0 -2
  377. package/bundle/chunk-xmnzrzbs.js +0 -2
  378. package/bundle/chunk-xzf62kc6.js +0 -2
  379. package/bundle/chunk-yned6vmd.js +0 -3
  380. package/bundle/chunk-yra49yga.js +0 -2
  381. package/bundle/chunk-ytye0p7f.js +0 -2
  382. package/bundle/chunk-yv2mxxbq.js +0 -2
  383. package/bundle/chunk-z2fqqer0.js +0 -2
  384. package/bundle/chunk-z3qanc8m.js +0 -2
  385. package/bundle/chunk-zcagdtab.js +0 -2
  386. package/bundle/chunk-zervk6c5.js +0 -2
@@ -1,7 +1,7 @@
1
1
  // @bun
2
- import{$p as A,Tp as k,Up as C,Vp as t,Xp as V,_p as B,aq as H,dq as I,iq as o}from"./chunk-d0qqgxs4.js";import{jq as w}from"./chunk-v00cptj6.js";import{xt as f}from"./chunk-j2zay4da.js";import{Hy as n}from"./chunk-4vemws1t.js";function RJ(...F){return F.reduce((J,Q)=>({...J,...Q!=null?Q:{}}),{})}function NJ({tools:F=[],providerToolNames:J,resolveProviderToolName:Q}){var W;let X={},Y={};for(let Z of F)if(Z.type==="provider"){let $=(W=Q==null?void 0:Q(Z))!=null?W:(Z.id in J)?J[Z.id]:void 0;if($==null)continue;X[Z.name]=$,Y[$]=Z.name}return{toProviderToolName:(Z)=>{var $;return($=X[Z])!=null?$:Z},toCustomToolName:(Z)=>{var $;return($=Y[Z])!=null?$:Z}}}async function VJ(F,J){if(F==null)return Promise.resolve();let Q=J==null?void 0:J.abortSignal;return new Promise((W,X)=>{if(Q==null?void 0:Q.aborted){X(m());return}let Y=setTimeout(()=>{Z(),W()},F),Z=()=>{clearTimeout(Y),Q==null||Q.removeEventListener("abort",$)},$=()=>{Z(),X(m())};Q==null||Q.addEventListener("abort",$)})}function m(){return new DOMException("Delay was aborted","AbortError")}var TJ=class{constructor(){this.status={type:"pending"},this._resolve=void 0,this._reject=void 0}get promise(){if(this._promise)return this._promise;return this._promise=new Promise((F,J)=>{if(this.status.type==="resolved")F(this.status.value);else if(this.status.type==="rejected")J(this.status.error);this._resolve=F,this._reject=J}),this._promise}resolve(F){var J;if(this.status={type:"resolved",value:F},this._promise)(J=this._resolve)==null||J.call(this,F)}reject(F){var J;if(this.status={type:"rejected",error:F},this._promise)(J=this._reject)==null||J.call(this,F)}isResolved(){return this.status.type==="resolved"}isRejected(){return this.status.type==="rejected"}isPending(){return this.status.type==="pending"}};function z(F){return Object.fromEntries([...F.headers])}var{btoa:GF,atob:CF}=globalThis;function _J(F){let J=F.replace(/-/g,"+").replace(/_/g,"/"),Q=CF(J);return Uint8Array.from(Q,(W)=>W.codePointAt(0))}function a(F){let J="";for(let Q=0;Q<F.length;Q++)J+=String.fromCodePoint(F[Q]);return GF(J)}function jJ(F){return F instanceof Uint8Array?a(F):F}function kJ(F){if(F.type==="url")return F.url;return`data:${F.mediaType};base64,${typeof F.data==="string"?F.data:a(F.data)}`}function bJ(F,J={}){let{useArrayBrackets:Q=!0}=J,W=new FormData;for(let[X,Y]of Object.entries(F)){if(Y==null)continue;if(Array.isArray(Y)){if(Y.length===1){W.append(X,Y[0]);continue}let Z=Q?`${X}[]`:X;for(let $ of Y)W.append(Z,$);continue}W.append(X,Y)}return W}var s="AI_DownloadError",r=`vercel.ai.error.${s}`,MF=Symbol.for(r),u,i,O=class extends(i=k,u=MF,i){constructor({url:F,statusCode:J,statusText:Q,cause:W,message:X=W==null?`Failed to download ${F}: ${J} ${Q}`:`Failed to download ${F}: ${W}`}){super({name:s,message:X,cause:W});this[u]=!0,this.url=F,this.statusCode=J,this.statusText=Q}static isInstance(F){return k.hasMarker(F,r)}},e=2147483648;async function KF({response:F,url:J,maxBytes:Q=e}){let W=F.headers.get("content-length");if(W!=null){let G=parseInt(W,10);if(!isNaN(G)&&G>Q)throw new O({url:J,message:`Download of ${J} exceeded maximum size of ${Q} bytes (Content-Length: ${G}).`})}let X=F.body;if(X==null)return new Uint8Array(0);let Y=X.getReader(),Z=[],$=0;try{while(!0){let{done:G,value:N}=await Y.read();if(G)break;if($+=N.length,$>Q)throw new O({url:J,message:`Download of ${J} exceeded maximum size of ${Q} bytes.`});Z.push(N)}}finally{try{await Y.cancel()}finally{Y.releaseLock()}}let U=new Uint8Array($),L=0;for(let G of Z)U.set(G,L),L+=G.length;return U}function p(F){let J;try{J=new URL(F)}catch(W){throw new O({url:F,message:`Invalid URL: ${F}`})}if(J.protocol==="data:")return;if(J.protocol!=="http:"&&J.protocol!=="https:")throw new O({url:F,message:`URL scheme must be http, https, or data, got ${J.protocol}`});let Q=J.hostname;if(!Q)throw new O({url:F,message:"URL must have a hostname"});if(Q==="localhost"||Q.endsWith(".local")||Q.endsWith(".localhost"))throw new O({url:F,message:`URL with hostname ${Q} is not allowed`});if(Q.startsWith("[")&&Q.endsWith("]")){let W=Q.slice(1,-1);if(qF(W))throw new O({url:F,message:`URL with IPv6 address ${Q} is not allowed`});return}if(FF(Q)){if(b(Q))throw new O({url:F,message:`URL with IP address ${Q} is not allowed`});return}}function FF(F){let J=F.split(".");if(J.length!==4)return!1;return J.every((Q)=>{let W=Number(Q);return Number.isInteger(W)&&W>=0&&W<=255&&String(W)===Q})}function b(F){let J=F.split(".").map(Number),[Q,W]=J;if(Q===0)return!0;if(Q===10)return!0;if(Q===127)return!0;if(Q===169&&W===254)return!0;if(Q===172&&W>=16&&W<=31)return!0;if(Q===192&&W===168)return!0;return!1}function qF(F){let J=F.toLowerCase();if(J==="::1")return!0;if(J==="::")return!0;if(J.startsWith("::ffff:")){let Q=J.slice(7);if(FF(Q))return b(Q);let W=Q.split(":");if(W.length===2){let X=parseInt(W[0],16),Y=parseInt(W[1],16);if(!isNaN(X)&&!isNaN(Y)){let Z=X>>8&255,$=X&255,U=Y>>8&255,L=Y&255;return b(`${Z}.${$}.${U}.${L}`)}}}if(J.startsWith("fc")||J.startsWith("fd"))return!0;if(J.startsWith("fe80"))return!0;return!1}async function gJ(F,J){var Q,W;p(F);try{let X=await fetch(F,{signal:J==null?void 0:J.abortSignal});if(X.redirected)p(X.url);if(!X.ok)throw new O({url:F,statusCode:X.status,statusText:X.statusText});let Y=await KF({response:X,url:F,maxBytes:(Q=J==null?void 0:J.maxBytes)!=null?Q:e}),Z=(W=X.headers.get("content-type"))!=null?W:void 0;return new Blob([Y],Z?{type:Z}:void 0)}catch(X){if(O.isInstance(X))throw X;throw new O({url:F,cause:X})}}var DF=({prefix:F,size:J=16,alphabet:Q="0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz",separator:W="-"}={})=>{let X=()=>{let Y=Q.length,Z=Array(J);for(let $=0;$<J;$++)Z[$]=Q[Math.random()*Y|0];return Z.join("")};if(F==null)return X;if(Q.includes(W))throw new V({argument:"separator",message:`The separator "${W}" must not be part of the alphabet "${Q}".`});return()=>`${F}${W}${X()}`},vJ=DF();function yJ(F){if(F==null)return"unknown error";if(typeof F==="string")return F;if(F instanceof Error)return F.message;return JSON.stringify(F)}function R(F){return(F instanceof Error||F instanceof DOMException)&&(F.name==="AbortError"||F.name==="ResponseAborted"||F.name==="TimeoutError")}var OF=["fetch failed","failed to fetch"],IF=["ConnectionRefused","ConnectionClosed","FailedToOpenSocket","ECONNRESET","ECONNREFUSED","ETIMEDOUT","EPIPE"];function PF(F){if(!(F instanceof Error))return!1;let J=F.code;if(typeof J==="string"&&IF.includes(J))return!0;return!1}function JF({error:F,url:J,requestBodyValues:Q}){if(R(F))return F;if(F instanceof TypeError&&OF.includes(F.message.toLowerCase())){let W=F.cause;if(W!=null)return new C({message:`Cannot connect to API: ${W.message}`,cause:W,url:J,requestBodyValues:Q,isRetryable:!0})}if(PF(F))return new C({message:`Cannot connect to API: ${F.message}`,cause:F,url:J,requestBodyValues:Q,isRetryable:!0});return F}function QF(F=globalThis){var J,Q,W;if(F.window)return"runtime/browser";if((J=F.navigator)==null?void 0:J.userAgent)return`runtime/${F.navigator.userAgent.toLowerCase()}`;if((W=(Q=F.process)==null?void 0:Q.versions)==null?void 0:W.node)return`runtime/node.js/${F.process.version.substring(0)}`;if(F.EdgeRuntime)return"runtime/vercel-edge";return"runtime/unknown"}function zF(F){if(F==null)return{};let J={};if(F instanceof Headers)F.forEach((Q,W)=>{J[W.toLowerCase()]=Q});else{if(!Array.isArray(F))F=Object.entries(F);for(let[Q,W]of F)if(W!=null)J[Q.toLowerCase()]=W}return J}function WF(F,...J){let Q=new Headers(zF(F)),W=Q.get("user-agent")||"";return Q.set("user-agent",[W,...J].filter(Boolean).join(" ")),Object.fromEntries(Q.entries())}var XF="4.0.23",AF=()=>globalThis.fetch,uJ=async({url:F,headers:J={},successfulResponseHandler:Q,failedResponseHandler:W,abortSignal:X,fetch:Y=AF()})=>{try{let Z=await Y(F,{method:"GET",headers:WF(J,`ai-sdk/provider-utils/${XF}`,QF()),signal:X}),$=z(Z);if(!Z.ok){let U;try{U=await W({response:Z,url:F,requestBodyValues:{}})}catch(L){if(R(L)||C.isInstance(L))throw L;throw new C({message:"Failed to process error response",cause:L,statusCode:Z.status,url:F,responseHeaders:$,requestBodyValues:{}})}throw U.value}try{return await Q({response:Z,url:F,requestBodyValues:{}})}catch(U){if(U instanceof Error){if(R(U)||C.isInstance(U))throw U}throw new C({message:"Failed to process successful response",cause:U,statusCode:Z.status,url:F,responseHeaders:$,requestBodyValues:{}})}}catch(Z){throw JF({error:Z,url:F,requestBodyValues:{}})}};function iJ(F){return F!=null}function pJ({mediaType:F,url:J,supportedUrls:Q}){return J=J.toLowerCase(),F=F.toLowerCase(),Object.entries(Q).map(([W,X])=>{let Y=W.toLowerCase();return Y==="*"||Y==="*/*"?{mediaTypePrefix:"",regexes:X}:{mediaTypePrefix:Y.replace(/\*/,""),regexes:X}}).filter(({mediaTypePrefix:W})=>F.startsWith(W)).flatMap(({regexes:W})=>W).some((W)=>W.test(J))}function cJ({apiKey:F,environmentVariableName:J,apiKeyParameterName:Q="apiKey",description:W}){if(typeof F==="string")return F;if(F!=null)throw new A({message:`${W} API key must be a string.`});if(typeof process>"u")throw new A({message:`${W} API key is missing. Pass it using the '${Q}' parameter. Environment variables are not supported in this environment.`});if(F=process.env[J],F==null)throw new A({message:`${W} API key is missing. Pass it using the '${Q}' parameter or the ${J} environment variable.`});if(typeof F!=="string")throw new A({message:`${W} API key must be a string. The value of the ${J} environment variable is not a string.`});return F}function dJ({settingValue:F,environmentVariableName:J}){if(typeof F==="string")return F;if(F!=null||typeof process>"u")return;if(F=process.env[J],F==null||typeof F!=="string")return;return F}function fJ({settingValue:F,environmentVariableName:J,settingName:Q,description:W}){if(typeof F==="string")return F;if(F!=null)throw new H({message:`${W} setting must be a string.`});if(typeof process>"u")throw new H({message:`${W} setting is missing. Pass it using the '${Q}' parameter. Environment variables are not supported in this environment.`});if(F=process.env[J],F==null)throw new H({message:`${W} setting is missing. Pass it using the '${Q}' parameter or the ${J} environment variable.`});if(typeof F!=="string")throw new H({message:`${W} setting must be a string. The value of the ${J} environment variable is not a string.`});return F}function tJ(F){var J;let[Q,W=""]=F.toLowerCase().split("/");return(J={mpeg:"mp3","x-wav":"wav",opus:"ogg",mp4:"m4a","x-m4a":"m4a"}[W])!=null?J:W}var HF=/"(?:_|\\u005[Ff])(?:_|\\u005[Ff])(?:p|\\u0070)(?:r|\\u0072)(?:o|\\u006[Ff])(?:t|\\u0074)(?:o|\\u006[Ff])(?:_|\\u005[Ff])(?:_|\\u005[Ff])"\s*:/,BF=/"(?:c|\\u0063)(?:o|\\u006[Ff])(?:n|\\u006[Ee])(?:s|\\u0073)(?:t|\\u0074)(?:r|\\u0072)(?:u|\\u0075)(?:c|\\u0063)(?:t|\\u0074)(?:o|\\u006[Ff])(?:r|\\u0072)"\s*:/;function l(F){let J=JSON.parse(F);if(J===null||typeof J!=="object")return J;if(HF.test(F)===!1&&BF.test(F)===!1)return J;return RF(J)}function RF(F){let J=[F];while(J.length){let Q=J;J=[];for(let W of Q){if(Object.prototype.hasOwnProperty.call(W,"__proto__"))throw SyntaxError("Object contains forbidden prototype property");if(Object.prototype.hasOwnProperty.call(W,"constructor")&&W.constructor!==null&&typeof W.constructor==="object"&&Object.prototype.hasOwnProperty.call(W.constructor,"prototype"))throw SyntaxError("Object contains forbidden prototype property");for(let X in W){let Y=W[X];if(Y&&typeof Y==="object")J.push(Y)}}}return F}function x(F){let{stackTraceLimit:J}=Error;try{Error.stackTraceLimit=0}catch(Q){return l(F)}try{return l(F)}finally{Error.stackTraceLimit=J}}function v(F){if(F.type==="object"||Array.isArray(F.type)&&F.type.includes("object")){F.additionalProperties=!1;let{properties:Q}=F;if(Q!=null)for(let W of Object.keys(Q))Q[W]=P(Q[W])}if(F.items!=null)F.items=Array.isArray(F.items)?F.items.map(P):P(F.items);if(F.anyOf!=null)F.anyOf=F.anyOf.map(P);if(F.allOf!=null)F.allOf=F.allOf.map(P);if(F.oneOf!=null)F.oneOf=F.oneOf.map(P);let{definitions:J}=F;if(J!=null)for(let Q of Object.keys(J))J[Q]=P(J[Q]);return F}function P(F){if(typeof F==="boolean")return F;return v(F)}var NF=Symbol("Let zodToJsonSchema decide on which parser to use"),c={name:void 0,$refStrategy:"root",basePath:["#"],effectStrategy:"input",pipeStrategy:"all",dateStrategy:"format:date-time",mapStrategy:"entries",removeAdditionalStrategy:"passthrough",allowedAdditionalProperties:!0,rejectedAdditionalProperties:!1,definitionPath:"definitions",strictUnions:!1,definitions:{},errorMessages:!1,patternStrategy:"escape",applyRegexFlags:!1,emailStrategy:"format:email",base64Strategy:"contentEncoding:base64",nameStrategy:"ref"},VF=(F)=>typeof F==="string"?{...c,name:F}:{...c,...F};function K(){return{}}function TF(F,J){var Q,W,X;let Y={type:"array"};if(((Q=F.type)==null?void 0:Q._def)&&((X=(W=F.type)==null?void 0:W._def)==null?void 0:X.typeName)!==w.ZodAny)Y.items=E(F.type._def,{...J,currentPath:[...J.currentPath,"items"]});if(F.minLength)Y.minItems=F.minLength.value;if(F.maxLength)Y.maxItems=F.maxLength.value;if(F.exactLength)Y.minItems=F.exactLength.value,Y.maxItems=F.exactLength.value;return Y}function _F(F){let J={type:"integer",format:"int64"};if(!F.checks)return J;for(let Q of F.checks)switch(Q.kind){case"min":if(Q.inclusive)J.minimum=Q.value;else J.exclusiveMinimum=Q.value;break;case"max":if(Q.inclusive)J.maximum=Q.value;else J.exclusiveMaximum=Q.value;break;case"multipleOf":J.multipleOf=Q.value;break}return J}function jF(){return{type:"boolean"}}function YF(F,J){return E(F.type._def,J)}var kF=(F,J)=>{return E(F.innerType._def,J)};function ZF(F,J,Q){let W=Q!=null?Q:J.dateStrategy;if(Array.isArray(W))return{anyOf:W.map((X,Y)=>ZF(F,J,X))};switch(W){case"string":case"format:date-time":return{type:"string",format:"date-time"};case"format:date":return{type:"string",format:"date"};case"integer":return bF(F)}}var bF=(F)=>{let J={type:"integer",format:"unix-time"};for(let Q of F.checks)switch(Q.kind){case"min":J.minimum=Q.value;break;case"max":J.maximum=Q.value;break}return J};function SF(F,J){return{...E(F.innerType._def,J),default:F.defaultValue()}}function gF(F,J){return J.effectStrategy==="input"?E(F.schema._def,J):K()}function xF(F){return{type:"string",enum:Array.from(F.values)}}var vF=(F)=>{if("type"in F&&F.type==="string")return!1;return"allOf"in F};function yF(F,J){let Q=[E(F.left._def,{...J,currentPath:[...J.currentPath,"allOf","0"]}),E(F.right._def,{...J,currentPath:[...J.currentPath,"allOf","1"]})].filter((X)=>!!X),W=[];return Q.forEach((X)=>{if(vF(X))W.push(...X.allOf);else{let Y=X;if("additionalProperties"in X&&X.additionalProperties===!1){let{additionalProperties:Z,...$}=X;Y=$}W.push(Y)}}),W.length?{allOf:W}:void 0}function hF(F){let J=typeof F.value;if(J!=="bigint"&&J!=="number"&&J!=="boolean"&&J!=="string")return{type:Array.isArray(F.value)?"array":"object"};return{type:J==="bigint"?"integer":J,const:F.value}}var _=void 0,q={cuid:/^[cC][^\s-]{8,}$/,cuid2:/^[0-9a-z]+$/,ulid:/^[0-9A-HJKMNP-TV-Z]{26}$/,email:/^(?!\.)(?!.*\.\.)([a-zA-Z0-9_'+\-\.]*)[a-zA-Z0-9_+-]@([a-zA-Z0-9][a-zA-Z0-9\-]*\.)+[a-zA-Z]{2,}$/,emoji:()=>{if(_===void 0)_=RegExp("^(\\p{Extended_Pictographic}|\\p{Emoji_Component})+$","u");return _},uuid:/^[0-9a-fA-F]{8}\b-[0-9a-fA-F]{4}\b-[0-9a-fA-F]{4}\b-[0-9a-fA-F]{4}\b-[0-9a-fA-F]{12}$/,ipv4:/^(?:(?:25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])\.){3}(?:25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])$/,ipv4Cidr:/^(?:(?:25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])\.){3}(?:25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])\/(3[0-2]|[12]?[0-9])$/,ipv6:/^(([a-f0-9]{1,4}:){7}|::([a-f0-9]{1,4}:){0,6}|([a-f0-9]{1,4}:){1}:([a-f0-9]{1,4}:){0,5}|([a-f0-9]{1,4}:){2}:([a-f0-9]{1,4}:){0,4}|([a-f0-9]{1,4}:){3}:([a-f0-9]{1,4}:){0,3}|([a-f0-9]{1,4}:){4}:([a-f0-9]{1,4}:){0,2}|([a-f0-9]{1,4}:){5}:([a-f0-9]{1,4}:){0,1})([a-f0-9]{1,4}|(((25[0-5])|(2[0-4][0-9])|(1[0-9]{2})|([0-9]{1,2}))\.){3}((25[0-5])|(2[0-4][0-9])|(1[0-9]{2})|([0-9]{1,2})))$/,ipv6Cidr:/^(([0-9a-fA-F]{1,4}:){7,7}[0-9a-fA-F]{1,4}|([0-9a-fA-F]{1,4}:){1,7}:|([0-9a-fA-F]{1,4}:){1,6}:[0-9a-fA-F]{1,4}|([0-9a-fA-F]{1,4}:){1,5}(:[0-9a-fA-F]{1,4}){1,2}|([0-9a-fA-F]{1,4}:){1,4}(:[0-9a-fA-F]{1,4}){1,3}|([0-9a-fA-F]{1,4}:){1,3}(:[0-9a-fA-F]{1,4}){1,4}|([0-9a-fA-F]{1,4}:){1,2}(:[0-9a-fA-F]{1,4}){1,5}|[0-9a-fA-F]{1,4}:((:[0-9a-fA-F]{1,4}){1,6})|:((:[0-9a-fA-F]{1,4}){1,7}|:)|fe80:(:[0-9a-fA-F]{0,4}){0,4}%[0-9a-zA-Z]{1,}|::(ffff(:0{1,4}){0,1}:){0,1}((25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9])\.){3,3}(25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9])|([0-9a-fA-F]{1,4}:){1,4}:((25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9])\.){3,3}(25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9]))\/(12[0-8]|1[01][0-9]|[1-9]?[0-9])$/,base64:/^([0-9a-zA-Z+/]{4})*(([0-9a-zA-Z+/]{2}==)|([0-9a-zA-Z+/]{3}=))?$/,base64url:/^([0-9a-zA-Z-_]{4})*(([0-9a-zA-Z-_]{2}(==)?)|([0-9a-zA-Z-_]{3}(=)?))?$/,nanoid:/^[a-zA-Z0-9_-]{21}$/,jwt:/^[A-Za-z0-9-_]+\.[A-Za-z0-9-_]+\.[A-Za-z0-9-_]*$/};function $F(F,J){let Q={type:"string"};if(F.checks)for(let W of F.checks)switch(W.kind){case"min":Q.minLength=typeof Q.minLength==="number"?Math.max(Q.minLength,W.value):W.value;break;case"max":Q.maxLength=typeof Q.maxLength==="number"?Math.min(Q.maxLength,W.value):W.value;break;case"email":switch(J.emailStrategy){case"format:email":D(Q,"email",W.message,J);break;case"format:idn-email":D(Q,"idn-email",W.message,J);break;case"pattern:zod":M(Q,q.email,W.message,J);break}break;case"url":D(Q,"uri",W.message,J);break;case"uuid":D(Q,"uuid",W.message,J);break;case"regex":M(Q,W.regex,W.message,J);break;case"cuid":M(Q,q.cuid,W.message,J);break;case"cuid2":M(Q,q.cuid2,W.message,J);break;case"startsWith":M(Q,RegExp(`^${j(W.value,J)}`),W.message,J);break;case"endsWith":M(Q,RegExp(`${j(W.value,J)}$`),W.message,J);break;case"datetime":D(Q,"date-time",W.message,J);break;case"date":D(Q,"date",W.message,J);break;case"time":D(Q,"time",W.message,J);break;case"duration":D(Q,"duration",W.message,J);break;case"length":Q.minLength=typeof Q.minLength==="number"?Math.max(Q.minLength,W.value):W.value,Q.maxLength=typeof Q.maxLength==="number"?Math.min(Q.maxLength,W.value):W.value;break;case"includes":{M(Q,RegExp(j(W.value,J)),W.message,J);break}case"ip":{if(W.version!=="v6")D(Q,"ipv4",W.message,J);if(W.version!=="v4")D(Q,"ipv6",W.message,J);break}case"base64url":M(Q,q.base64url,W.message,J);break;case"jwt":M(Q,q.jwt,W.message,J);break;case"cidr":{if(W.version!=="v6")M(Q,q.ipv4Cidr,W.message,J);if(W.version!=="v4")M(Q,q.ipv6Cidr,W.message,J);break}case"emoji":M(Q,q.emoji(),W.message,J);break;case"ulid":{M(Q,q.ulid,W.message,J);break}case"base64":{switch(J.base64Strategy){case"format:binary":{D(Q,"binary",W.message,J);break}case"contentEncoding:base64":{Q.contentEncoding="base64";break}case"pattern:zod":{M(Q,q.base64,W.message,J);break}}break}case"nanoid":M(Q,q.nanoid,W.message,J);case"toLowerCase":case"toUpperCase":case"trim":break;default:}return Q}function j(F,J){return J.patternStrategy==="escape"?uF(F):F}var mF=new Set("ABCDEFGHIJKLMNOPQRSTUVXYZabcdefghijklmnopqrstuvxyz0123456789");function uF(F){let J="";for(let Q=0;Q<F.length;Q++){if(!mF.has(F[Q]))J+="\\";J+=F[Q]}return J}function D(F,J,Q,W){var X;if(F.format||((X=F.anyOf)==null?void 0:X.some((Y)=>Y.format))){if(!F.anyOf)F.anyOf=[];if(F.format)F.anyOf.push({format:F.format}),delete F.format;F.anyOf.push({format:J,...Q&&W.errorMessages&&{errorMessage:{format:Q}}})}else F.format=J}function M(F,J,Q,W){var X;if(F.pattern||((X=F.allOf)==null?void 0:X.some((Y)=>Y.pattern))){if(!F.allOf)F.allOf=[];if(F.pattern)F.allOf.push({pattern:F.pattern}),delete F.pattern;F.allOf.push({pattern:d(J,W),...Q&&W.errorMessages&&{errorMessage:{pattern:Q}}})}else F.pattern=d(J,W)}function d(F,J){var Q;if(!J.applyRegexFlags||!F.flags)return F.source;let W={i:F.flags.includes("i"),m:F.flags.includes("m"),s:F.flags.includes("s")},X=W.i?F.source.toLowerCase():F.source,Y="",Z=!1,$=!1,U=!1;for(let L=0;L<X.length;L++){if(Z){Y+=X[L],Z=!1;continue}if(W.i){if($){if(X[L].match(/[a-z]/)){if(U)Y+=X[L],Y+=`${X[L-2]}-${X[L]}`.toUpperCase(),U=!1;else if(X[L+1]==="-"&&((Q=X[L+2])==null?void 0:Q.match(/[a-z]/)))Y+=X[L],U=!0;else Y+=`${X[L]}${X[L].toUpperCase()}`;continue}}else if(X[L].match(/[a-z]/)){Y+=`[${X[L]}${X[L].toUpperCase()}]`;continue}}if(W.m){if(X[L]==="^"){Y+=`(^|(?<=[\r
2
+ import{Cr as I,Hr as o,qr as k,rr as C,sr as t,ur as V,xr as B,yr as A,zr as H}from"./chunk-btz9jvec.js";import{Ir as w}from"./chunk-fkgv2hqd.js";import{Wu as f}from"./chunk-09kba1hg.js";import{eA as n}from"./chunk-t12xrrfr.js";function RJ(...F){return F.reduce((J,Q)=>({...J,...Q!=null?Q:{}}),{})}function NJ({tools:F=[],providerToolNames:J,resolveProviderToolName:Q}){var W;let X={},Y={};for(let Z of F)if(Z.type==="provider"){let $=(W=Q==null?void 0:Q(Z))!=null?W:(Z.id in J)?J[Z.id]:void 0;if($==null)continue;X[Z.name]=$,Y[$]=Z.name}return{toProviderToolName:(Z)=>{var $;return($=X[Z])!=null?$:Z},toCustomToolName:(Z)=>{var $;return($=Y[Z])!=null?$:Z}}}async function VJ(F,J){if(F==null)return Promise.resolve();let Q=J==null?void 0:J.abortSignal;return new Promise((W,X)=>{if(Q==null?void 0:Q.aborted){X(m());return}let Y=setTimeout(()=>{Z(),W()},F),Z=()=>{clearTimeout(Y),Q==null||Q.removeEventListener("abort",$)},$=()=>{Z(),X(m())};Q==null||Q.addEventListener("abort",$)})}function m(){return new DOMException("Delay was aborted","AbortError")}var TJ=class{constructor(){this.status={type:"pending"},this._resolve=void 0,this._reject=void 0}get promise(){if(this._promise)return this._promise;return this._promise=new Promise((F,J)=>{if(this.status.type==="resolved")F(this.status.value);else if(this.status.type==="rejected")J(this.status.error);this._resolve=F,this._reject=J}),this._promise}resolve(F){var J;if(this.status={type:"resolved",value:F},this._promise)(J=this._resolve)==null||J.call(this,F)}reject(F){var J;if(this.status={type:"rejected",error:F},this._promise)(J=this._reject)==null||J.call(this,F)}isResolved(){return this.status.type==="resolved"}isRejected(){return this.status.type==="rejected"}isPending(){return this.status.type==="pending"}};function z(F){return Object.fromEntries([...F.headers])}var{btoa:GF,atob:CF}=globalThis;function _J(F){let J=F.replace(/-/g,"+").replace(/_/g,"/"),Q=CF(J);return Uint8Array.from(Q,(W)=>W.codePointAt(0))}function a(F){let J="";for(let Q=0;Q<F.length;Q++)J+=String.fromCodePoint(F[Q]);return GF(J)}function jJ(F){return F instanceof Uint8Array?a(F):F}function kJ(F){if(F.type==="url")return F.url;return`data:${F.mediaType};base64,${typeof F.data==="string"?F.data:a(F.data)}`}function bJ(F,J={}){let{useArrayBrackets:Q=!0}=J,W=new FormData;for(let[X,Y]of Object.entries(F)){if(Y==null)continue;if(Array.isArray(Y)){if(Y.length===1){W.append(X,Y[0]);continue}let Z=Q?`${X}[]`:X;for(let $ of Y)W.append(Z,$);continue}W.append(X,Y)}return W}var s="AI_DownloadError",r=`vercel.ai.error.${s}`,MF=Symbol.for(r),u,i,O=class extends(i=k,u=MF,i){constructor({url:F,statusCode:J,statusText:Q,cause:W,message:X=W==null?`Failed to download ${F}: ${J} ${Q}`:`Failed to download ${F}: ${W}`}){super({name:s,message:X,cause:W});this[u]=!0,this.url=F,this.statusCode=J,this.statusText=Q}static isInstance(F){return k.hasMarker(F,r)}},e=2147483648;async function KF({response:F,url:J,maxBytes:Q=e}){let W=F.headers.get("content-length");if(W!=null){let G=parseInt(W,10);if(!isNaN(G)&&G>Q)throw new O({url:J,message:`Download of ${J} exceeded maximum size of ${Q} bytes (Content-Length: ${G}).`})}let X=F.body;if(X==null)return new Uint8Array(0);let Y=X.getReader(),Z=[],$=0;try{while(!0){let{done:G,value:N}=await Y.read();if(G)break;if($+=N.length,$>Q)throw new O({url:J,message:`Download of ${J} exceeded maximum size of ${Q} bytes.`});Z.push(N)}}finally{try{await Y.cancel()}finally{Y.releaseLock()}}let U=new Uint8Array($),L=0;for(let G of Z)U.set(G,L),L+=G.length;return U}function p(F){let J;try{J=new URL(F)}catch(W){throw new O({url:F,message:`Invalid URL: ${F}`})}if(J.protocol==="data:")return;if(J.protocol!=="http:"&&J.protocol!=="https:")throw new O({url:F,message:`URL scheme must be http, https, or data, got ${J.protocol}`});let Q=J.hostname;if(!Q)throw new O({url:F,message:"URL must have a hostname"});if(Q==="localhost"||Q.endsWith(".local")||Q.endsWith(".localhost"))throw new O({url:F,message:`URL with hostname ${Q} is not allowed`});if(Q.startsWith("[")&&Q.endsWith("]")){let W=Q.slice(1,-1);if(qF(W))throw new O({url:F,message:`URL with IPv6 address ${Q} is not allowed`});return}if(FF(Q)){if(b(Q))throw new O({url:F,message:`URL with IP address ${Q} is not allowed`});return}}function FF(F){let J=F.split(".");if(J.length!==4)return!1;return J.every((Q)=>{let W=Number(Q);return Number.isInteger(W)&&W>=0&&W<=255&&String(W)===Q})}function b(F){let J=F.split(".").map(Number),[Q,W]=J;if(Q===0)return!0;if(Q===10)return!0;if(Q===127)return!0;if(Q===169&&W===254)return!0;if(Q===172&&W>=16&&W<=31)return!0;if(Q===192&&W===168)return!0;return!1}function qF(F){let J=F.toLowerCase();if(J==="::1")return!0;if(J==="::")return!0;if(J.startsWith("::ffff:")){let Q=J.slice(7);if(FF(Q))return b(Q);let W=Q.split(":");if(W.length===2){let X=parseInt(W[0],16),Y=parseInt(W[1],16);if(!isNaN(X)&&!isNaN(Y)){let Z=X>>8&255,$=X&255,U=Y>>8&255,L=Y&255;return b(`${Z}.${$}.${U}.${L}`)}}}if(J.startsWith("fc")||J.startsWith("fd"))return!0;if(J.startsWith("fe80"))return!0;return!1}async function gJ(F,J){var Q,W;p(F);try{let X=await fetch(F,{signal:J==null?void 0:J.abortSignal});if(X.redirected)p(X.url);if(!X.ok)throw new O({url:F,statusCode:X.status,statusText:X.statusText});let Y=await KF({response:X,url:F,maxBytes:(Q=J==null?void 0:J.maxBytes)!=null?Q:e}),Z=(W=X.headers.get("content-type"))!=null?W:void 0;return new Blob([Y],Z?{type:Z}:void 0)}catch(X){if(O.isInstance(X))throw X;throw new O({url:F,cause:X})}}var DF=({prefix:F,size:J=16,alphabet:Q="0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz",separator:W="-"}={})=>{let X=()=>{let Y=Q.length,Z=Array(J);for(let $=0;$<J;$++)Z[$]=Q[Math.random()*Y|0];return Z.join("")};if(F==null)return X;if(Q.includes(W))throw new V({argument:"separator",message:`The separator "${W}" must not be part of the alphabet "${Q}".`});return()=>`${F}${W}${X()}`},vJ=DF();function yJ(F){if(F==null)return"unknown error";if(typeof F==="string")return F;if(F instanceof Error)return F.message;return JSON.stringify(F)}function R(F){return(F instanceof Error||F instanceof DOMException)&&(F.name==="AbortError"||F.name==="ResponseAborted"||F.name==="TimeoutError")}var OF=["fetch failed","failed to fetch"],IF=["ConnectionRefused","ConnectionClosed","FailedToOpenSocket","ECONNRESET","ECONNREFUSED","ETIMEDOUT","EPIPE"];function PF(F){if(!(F instanceof Error))return!1;let J=F.code;if(typeof J==="string"&&IF.includes(J))return!0;return!1}function JF({error:F,url:J,requestBodyValues:Q}){if(R(F))return F;if(F instanceof TypeError&&OF.includes(F.message.toLowerCase())){let W=F.cause;if(W!=null)return new C({message:`Cannot connect to API: ${W.message}`,cause:W,url:J,requestBodyValues:Q,isRetryable:!0})}if(PF(F))return new C({message:`Cannot connect to API: ${F.message}`,cause:F,url:J,requestBodyValues:Q,isRetryable:!0});return F}function QF(F=globalThis){var J,Q,W;if(F.window)return"runtime/browser";if((J=F.navigator)==null?void 0:J.userAgent)return`runtime/${F.navigator.userAgent.toLowerCase()}`;if((W=(Q=F.process)==null?void 0:Q.versions)==null?void 0:W.node)return`runtime/node.js/${F.process.version.substring(0)}`;if(F.EdgeRuntime)return"runtime/vercel-edge";return"runtime/unknown"}function zF(F){if(F==null)return{};let J={};if(F instanceof Headers)F.forEach((Q,W)=>{J[W.toLowerCase()]=Q});else{if(!Array.isArray(F))F=Object.entries(F);for(let[Q,W]of F)if(W!=null)J[Q.toLowerCase()]=W}return J}function WF(F,...J){let Q=new Headers(zF(F)),W=Q.get("user-agent")||"";return Q.set("user-agent",[W,...J].filter(Boolean).join(" ")),Object.fromEntries(Q.entries())}var XF="4.0.23",AF=()=>globalThis.fetch,uJ=async({url:F,headers:J={},successfulResponseHandler:Q,failedResponseHandler:W,abortSignal:X,fetch:Y=AF()})=>{try{let Z=await Y(F,{method:"GET",headers:WF(J,`ai-sdk/provider-utils/${XF}`,QF()),signal:X}),$=z(Z);if(!Z.ok){let U;try{U=await W({response:Z,url:F,requestBodyValues:{}})}catch(L){if(R(L)||C.isInstance(L))throw L;throw new C({message:"Failed to process error response",cause:L,statusCode:Z.status,url:F,responseHeaders:$,requestBodyValues:{}})}throw U.value}try{return await Q({response:Z,url:F,requestBodyValues:{}})}catch(U){if(U instanceof Error){if(R(U)||C.isInstance(U))throw U}throw new C({message:"Failed to process successful response",cause:U,statusCode:Z.status,url:F,responseHeaders:$,requestBodyValues:{}})}}catch(Z){throw JF({error:Z,url:F,requestBodyValues:{}})}};function iJ(F){return F!=null}function pJ({mediaType:F,url:J,supportedUrls:Q}){return J=J.toLowerCase(),F=F.toLowerCase(),Object.entries(Q).map(([W,X])=>{let Y=W.toLowerCase();return Y==="*"||Y==="*/*"?{mediaTypePrefix:"",regexes:X}:{mediaTypePrefix:Y.replace(/\*/,""),regexes:X}}).filter(({mediaTypePrefix:W})=>F.startsWith(W)).flatMap(({regexes:W})=>W).some((W)=>W.test(J))}function cJ({apiKey:F,environmentVariableName:J,apiKeyParameterName:Q="apiKey",description:W}){if(typeof F==="string")return F;if(F!=null)throw new A({message:`${W} API key must be a string.`});if(typeof process>"u")throw new A({message:`${W} API key is missing. Pass it using the '${Q}' parameter. Environment variables are not supported in this environment.`});if(F=process.env[J],F==null)throw new A({message:`${W} API key is missing. Pass it using the '${Q}' parameter or the ${J} environment variable.`});if(typeof F!=="string")throw new A({message:`${W} API key must be a string. The value of the ${J} environment variable is not a string.`});return F}function dJ({settingValue:F,environmentVariableName:J}){if(typeof F==="string")return F;if(F!=null||typeof process>"u")return;if(F=process.env[J],F==null||typeof F!=="string")return;return F}function fJ({settingValue:F,environmentVariableName:J,settingName:Q,description:W}){if(typeof F==="string")return F;if(F!=null)throw new H({message:`${W} setting must be a string.`});if(typeof process>"u")throw new H({message:`${W} setting is missing. Pass it using the '${Q}' parameter. Environment variables are not supported in this environment.`});if(F=process.env[J],F==null)throw new H({message:`${W} setting is missing. Pass it using the '${Q}' parameter or the ${J} environment variable.`});if(typeof F!=="string")throw new H({message:`${W} setting must be a string. The value of the ${J} environment variable is not a string.`});return F}function tJ(F){var J;let[Q,W=""]=F.toLowerCase().split("/");return(J={mpeg:"mp3","x-wav":"wav",opus:"ogg",mp4:"m4a","x-m4a":"m4a"}[W])!=null?J:W}var HF=/"(?:_|\\u005[Ff])(?:_|\\u005[Ff])(?:p|\\u0070)(?:r|\\u0072)(?:o|\\u006[Ff])(?:t|\\u0074)(?:o|\\u006[Ff])(?:_|\\u005[Ff])(?:_|\\u005[Ff])"\s*:/,BF=/"(?:c|\\u0063)(?:o|\\u006[Ff])(?:n|\\u006[Ee])(?:s|\\u0073)(?:t|\\u0074)(?:r|\\u0072)(?:u|\\u0075)(?:c|\\u0063)(?:t|\\u0074)(?:o|\\u006[Ff])(?:r|\\u0072)"\s*:/;function l(F){let J=JSON.parse(F);if(J===null||typeof J!=="object")return J;if(HF.test(F)===!1&&BF.test(F)===!1)return J;return RF(J)}function RF(F){let J=[F];while(J.length){let Q=J;J=[];for(let W of Q){if(Object.prototype.hasOwnProperty.call(W,"__proto__"))throw SyntaxError("Object contains forbidden prototype property");if(Object.prototype.hasOwnProperty.call(W,"constructor")&&W.constructor!==null&&typeof W.constructor==="object"&&Object.prototype.hasOwnProperty.call(W.constructor,"prototype"))throw SyntaxError("Object contains forbidden prototype property");for(let X in W){let Y=W[X];if(Y&&typeof Y==="object")J.push(Y)}}}return F}function x(F){let{stackTraceLimit:J}=Error;try{Error.stackTraceLimit=0}catch(Q){return l(F)}try{return l(F)}finally{Error.stackTraceLimit=J}}function v(F){if(F.type==="object"||Array.isArray(F.type)&&F.type.includes("object")){F.additionalProperties=!1;let{properties:Q}=F;if(Q!=null)for(let W of Object.keys(Q))Q[W]=P(Q[W])}if(F.items!=null)F.items=Array.isArray(F.items)?F.items.map(P):P(F.items);if(F.anyOf!=null)F.anyOf=F.anyOf.map(P);if(F.allOf!=null)F.allOf=F.allOf.map(P);if(F.oneOf!=null)F.oneOf=F.oneOf.map(P);let{definitions:J}=F;if(J!=null)for(let Q of Object.keys(J))J[Q]=P(J[Q]);return F}function P(F){if(typeof F==="boolean")return F;return v(F)}var NF=Symbol("Let zodToJsonSchema decide on which parser to use"),c={name:void 0,$refStrategy:"root",basePath:["#"],effectStrategy:"input",pipeStrategy:"all",dateStrategy:"format:date-time",mapStrategy:"entries",removeAdditionalStrategy:"passthrough",allowedAdditionalProperties:!0,rejectedAdditionalProperties:!1,definitionPath:"definitions",strictUnions:!1,definitions:{},errorMessages:!1,patternStrategy:"escape",applyRegexFlags:!1,emailStrategy:"format:email",base64Strategy:"contentEncoding:base64",nameStrategy:"ref"},VF=(F)=>typeof F==="string"?{...c,name:F}:{...c,...F};function K(){return{}}function TF(F,J){var Q,W,X;let Y={type:"array"};if(((Q=F.type)==null?void 0:Q._def)&&((X=(W=F.type)==null?void 0:W._def)==null?void 0:X.typeName)!==w.ZodAny)Y.items=E(F.type._def,{...J,currentPath:[...J.currentPath,"items"]});if(F.minLength)Y.minItems=F.minLength.value;if(F.maxLength)Y.maxItems=F.maxLength.value;if(F.exactLength)Y.minItems=F.exactLength.value,Y.maxItems=F.exactLength.value;return Y}function _F(F){let J={type:"integer",format:"int64"};if(!F.checks)return J;for(let Q of F.checks)switch(Q.kind){case"min":if(Q.inclusive)J.minimum=Q.value;else J.exclusiveMinimum=Q.value;break;case"max":if(Q.inclusive)J.maximum=Q.value;else J.exclusiveMaximum=Q.value;break;case"multipleOf":J.multipleOf=Q.value;break}return J}function jF(){return{type:"boolean"}}function YF(F,J){return E(F.type._def,J)}var kF=(F,J)=>{return E(F.innerType._def,J)};function ZF(F,J,Q){let W=Q!=null?Q:J.dateStrategy;if(Array.isArray(W))return{anyOf:W.map((X,Y)=>ZF(F,J,X))};switch(W){case"string":case"format:date-time":return{type:"string",format:"date-time"};case"format:date":return{type:"string",format:"date"};case"integer":return bF(F)}}var bF=(F)=>{let J={type:"integer",format:"unix-time"};for(let Q of F.checks)switch(Q.kind){case"min":J.minimum=Q.value;break;case"max":J.maximum=Q.value;break}return J};function SF(F,J){return{...E(F.innerType._def,J),default:F.defaultValue()}}function gF(F,J){return J.effectStrategy==="input"?E(F.schema._def,J):K()}function xF(F){return{type:"string",enum:Array.from(F.values)}}var vF=(F)=>{if("type"in F&&F.type==="string")return!1;return"allOf"in F};function yF(F,J){let Q=[E(F.left._def,{...J,currentPath:[...J.currentPath,"allOf","0"]}),E(F.right._def,{...J,currentPath:[...J.currentPath,"allOf","1"]})].filter((X)=>!!X),W=[];return Q.forEach((X)=>{if(vF(X))W.push(...X.allOf);else{let Y=X;if("additionalProperties"in X&&X.additionalProperties===!1){let{additionalProperties:Z,...$}=X;Y=$}W.push(Y)}}),W.length?{allOf:W}:void 0}function hF(F){let J=typeof F.value;if(J!=="bigint"&&J!=="number"&&J!=="boolean"&&J!=="string")return{type:Array.isArray(F.value)?"array":"object"};return{type:J==="bigint"?"integer":J,const:F.value}}var _=void 0,q={cuid:/^[cC][^\s-]{8,}$/,cuid2:/^[0-9a-z]+$/,ulid:/^[0-9A-HJKMNP-TV-Z]{26}$/,email:/^(?!\.)(?!.*\.\.)([a-zA-Z0-9_'+\-\.]*)[a-zA-Z0-9_+-]@([a-zA-Z0-9][a-zA-Z0-9\-]*\.)+[a-zA-Z]{2,}$/,emoji:()=>{if(_===void 0)_=RegExp("^(\\p{Extended_Pictographic}|\\p{Emoji_Component})+$","u");return _},uuid:/^[0-9a-fA-F]{8}\b-[0-9a-fA-F]{4}\b-[0-9a-fA-F]{4}\b-[0-9a-fA-F]{4}\b-[0-9a-fA-F]{12}$/,ipv4:/^(?:(?:25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])\.){3}(?:25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])$/,ipv4Cidr:/^(?:(?:25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])\.){3}(?:25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])\/(3[0-2]|[12]?[0-9])$/,ipv6:/^(([a-f0-9]{1,4}:){7}|::([a-f0-9]{1,4}:){0,6}|([a-f0-9]{1,4}:){1}:([a-f0-9]{1,4}:){0,5}|([a-f0-9]{1,4}:){2}:([a-f0-9]{1,4}:){0,4}|([a-f0-9]{1,4}:){3}:([a-f0-9]{1,4}:){0,3}|([a-f0-9]{1,4}:){4}:([a-f0-9]{1,4}:){0,2}|([a-f0-9]{1,4}:){5}:([a-f0-9]{1,4}:){0,1})([a-f0-9]{1,4}|(((25[0-5])|(2[0-4][0-9])|(1[0-9]{2})|([0-9]{1,2}))\.){3}((25[0-5])|(2[0-4][0-9])|(1[0-9]{2})|([0-9]{1,2})))$/,ipv6Cidr:/^(([0-9a-fA-F]{1,4}:){7,7}[0-9a-fA-F]{1,4}|([0-9a-fA-F]{1,4}:){1,7}:|([0-9a-fA-F]{1,4}:){1,6}:[0-9a-fA-F]{1,4}|([0-9a-fA-F]{1,4}:){1,5}(:[0-9a-fA-F]{1,4}){1,2}|([0-9a-fA-F]{1,4}:){1,4}(:[0-9a-fA-F]{1,4}){1,3}|([0-9a-fA-F]{1,4}:){1,3}(:[0-9a-fA-F]{1,4}){1,4}|([0-9a-fA-F]{1,4}:){1,2}(:[0-9a-fA-F]{1,4}){1,5}|[0-9a-fA-F]{1,4}:((:[0-9a-fA-F]{1,4}){1,6})|:((:[0-9a-fA-F]{1,4}){1,7}|:)|fe80:(:[0-9a-fA-F]{0,4}){0,4}%[0-9a-zA-Z]{1,}|::(ffff(:0{1,4}){0,1}:){0,1}((25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9])\.){3,3}(25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9])|([0-9a-fA-F]{1,4}:){1,4}:((25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9])\.){3,3}(25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9]))\/(12[0-8]|1[01][0-9]|[1-9]?[0-9])$/,base64:/^([0-9a-zA-Z+/]{4})*(([0-9a-zA-Z+/]{2}==)|([0-9a-zA-Z+/]{3}=))?$/,base64url:/^([0-9a-zA-Z-_]{4})*(([0-9a-zA-Z-_]{2}(==)?)|([0-9a-zA-Z-_]{3}(=)?))?$/,nanoid:/^[a-zA-Z0-9_-]{21}$/,jwt:/^[A-Za-z0-9-_]+\.[A-Za-z0-9-_]+\.[A-Za-z0-9-_]*$/};function $F(F,J){let Q={type:"string"};if(F.checks)for(let W of F.checks)switch(W.kind){case"min":Q.minLength=typeof Q.minLength==="number"?Math.max(Q.minLength,W.value):W.value;break;case"max":Q.maxLength=typeof Q.maxLength==="number"?Math.min(Q.maxLength,W.value):W.value;break;case"email":switch(J.emailStrategy){case"format:email":D(Q,"email",W.message,J);break;case"format:idn-email":D(Q,"idn-email",W.message,J);break;case"pattern:zod":M(Q,q.email,W.message,J);break}break;case"url":D(Q,"uri",W.message,J);break;case"uuid":D(Q,"uuid",W.message,J);break;case"regex":M(Q,W.regex,W.message,J);break;case"cuid":M(Q,q.cuid,W.message,J);break;case"cuid2":M(Q,q.cuid2,W.message,J);break;case"startsWith":M(Q,RegExp(`^${j(W.value,J)}`),W.message,J);break;case"endsWith":M(Q,RegExp(`${j(W.value,J)}$`),W.message,J);break;case"datetime":D(Q,"date-time",W.message,J);break;case"date":D(Q,"date",W.message,J);break;case"time":D(Q,"time",W.message,J);break;case"duration":D(Q,"duration",W.message,J);break;case"length":Q.minLength=typeof Q.minLength==="number"?Math.max(Q.minLength,W.value):W.value,Q.maxLength=typeof Q.maxLength==="number"?Math.min(Q.maxLength,W.value):W.value;break;case"includes":{M(Q,RegExp(j(W.value,J)),W.message,J);break}case"ip":{if(W.version!=="v6")D(Q,"ipv4",W.message,J);if(W.version!=="v4")D(Q,"ipv6",W.message,J);break}case"base64url":M(Q,q.base64url,W.message,J);break;case"jwt":M(Q,q.jwt,W.message,J);break;case"cidr":{if(W.version!=="v6")M(Q,q.ipv4Cidr,W.message,J);if(W.version!=="v4")M(Q,q.ipv6Cidr,W.message,J);break}case"emoji":M(Q,q.emoji(),W.message,J);break;case"ulid":{M(Q,q.ulid,W.message,J);break}case"base64":{switch(J.base64Strategy){case"format:binary":{D(Q,"binary",W.message,J);break}case"contentEncoding:base64":{Q.contentEncoding="base64";break}case"pattern:zod":{M(Q,q.base64,W.message,J);break}}break}case"nanoid":M(Q,q.nanoid,W.message,J);case"toLowerCase":case"toUpperCase":case"trim":break;default:}return Q}function j(F,J){return J.patternStrategy==="escape"?uF(F):F}var mF=new Set("ABCDEFGHIJKLMNOPQRSTUVXYZabcdefghijklmnopqrstuvxyz0123456789");function uF(F){let J="";for(let Q=0;Q<F.length;Q++){if(!mF.has(F[Q]))J+="\\";J+=F[Q]}return J}function D(F,J,Q,W){var X;if(F.format||((X=F.anyOf)==null?void 0:X.some((Y)=>Y.format))){if(!F.anyOf)F.anyOf=[];if(F.format)F.anyOf.push({format:F.format}),delete F.format;F.anyOf.push({format:J,...Q&&W.errorMessages&&{errorMessage:{format:Q}}})}else F.format=J}function M(F,J,Q,W){var X;if(F.pattern||((X=F.allOf)==null?void 0:X.some((Y)=>Y.pattern))){if(!F.allOf)F.allOf=[];if(F.pattern)F.allOf.push({pattern:F.pattern}),delete F.pattern;F.allOf.push({pattern:d(J,W),...Q&&W.errorMessages&&{errorMessage:{pattern:Q}}})}else F.pattern=d(J,W)}function d(F,J){var Q;if(!J.applyRegexFlags||!F.flags)return F.source;let W={i:F.flags.includes("i"),m:F.flags.includes("m"),s:F.flags.includes("s")},X=W.i?F.source.toLowerCase():F.source,Y="",Z=!1,$=!1,U=!1;for(let L=0;L<X.length;L++){if(Z){Y+=X[L],Z=!1;continue}if(W.i){if($){if(X[L].match(/[a-z]/)){if(U)Y+=X[L],Y+=`${X[L-2]}-${X[L]}`.toUpperCase(),U=!1;else if(X[L+1]==="-"&&((Q=X[L+2])==null?void 0:Q.match(/[a-z]/)))Y+=X[L],U=!0;else Y+=`${X[L]}${X[L].toUpperCase()}`;continue}}else if(X[L].match(/[a-z]/)){Y+=`[${X[L]}${X[L].toUpperCase()}]`;continue}}if(W.m){if(X[L]==="^"){Y+=`(^|(?<=[\r
3
3
  ]))`;continue}else if(X[L]==="$"){Y+=`($|(?=[\r
4
4
  ]))`;continue}}if(W.s&&X[L]==="."){Y+=$?`${X[L]}\r
5
5
  `:`[${X[L]}\r
6
6
  ]`;continue}if(Y+=X[L],X[L]==="\\")Z=!0;else if($&&X[L]==="]")$=!1;else if(!$&&X[L]==="[")$=!0}try{new RegExp(Y)}catch(L){return console.warn(`Could not convert regex pattern at ${J.currentPath.join("/")} to a flag-independent form! Falling back to the flag-ignorant source`),F.source}return Y}function LF(F,J){var Q,W,X,Y,Z,$;let U={type:"object",additionalProperties:(Q=E(F.valueType._def,{...J,currentPath:[...J.currentPath,"additionalProperties"]}))!=null?Q:J.allowedAdditionalProperties};if(((W=F.keyType)==null?void 0:W._def.typeName)===w.ZodString&&((X=F.keyType._def.checks)==null?void 0:X.length)){let{type:L,...G}=$F(F.keyType._def,J);return{...U,propertyNames:G}}else if(((Y=F.keyType)==null?void 0:Y._def.typeName)===w.ZodEnum)return{...U,propertyNames:{enum:F.keyType._def.values}};else if(((Z=F.keyType)==null?void 0:Z._def.typeName)===w.ZodBranded&&F.keyType._def.type._def.typeName===w.ZodString&&(($=F.keyType._def.type._def.checks)==null?void 0:$.length)){let{type:L,...G}=YF(F.keyType._def,J);return{...U,propertyNames:G}}return U}function iF(F,J){if(J.mapStrategy==="record")return LF(F,J);let Q=E(F.keyType._def,{...J,currentPath:[...J.currentPath,"items","items","0"]})||K(),W=E(F.valueType._def,{...J,currentPath:[...J.currentPath,"items","items","1"]})||K();return{type:"array",maxItems:125,items:{type:"array",items:[Q,W],minItems:2,maxItems:2}}}function pF(F){let J=F.values,W=Object.keys(F.values).filter((Y)=>{return typeof J[J[Y]]!=="number"}).map((Y)=>J[Y]),X=Array.from(new Set(W.map((Y)=>typeof Y)));return{type:X.length===1?X[0]==="string"?"string":"number":["string","number"],enum:W}}function lF(){return{not:K()}}function cF(){return{type:"null"}}var S={ZodString:"string",ZodNumber:"number",ZodBigInt:"integer",ZodBoolean:"boolean",ZodNull:"null"};function dF(F,J){let Q=F.options instanceof Map?Array.from(F.options.values()):F.options;if(Q.every((W)=>(W._def.typeName in S)&&(!W._def.checks||!W._def.checks.length))){let W=Q.reduce((X,Y)=>{let Z=S[Y._def.typeName];return Z&&!X.includes(Z)?[...X,Z]:X},[]);return{type:W.length>1?W:W[0]}}else if(Q.every((W)=>W._def.typeName==="ZodLiteral"&&!W.description)){let W=Q.reduce((X,Y)=>{let Z=typeof Y._def.value;switch(Z){case"string":case"number":case"boolean":return[...X,Z];case"bigint":return[...X,"integer"];case"object":if(Y._def.value===null)return[...X,"null"];case"symbol":case"undefined":case"function":default:return X}},[]);if(W.length===Q.length){let X=W.filter((Y,Z,$)=>$.indexOf(Y)===Z);return{type:X.length>1?X:X[0],enum:Q.reduce((Y,Z)=>{return Y.includes(Z._def.value)?Y:[...Y,Z._def.value]},[])}}}else if(Q.every((W)=>W._def.typeName==="ZodEnum"))return{type:"string",enum:Q.reduce((W,X)=>[...W,...X._def.values.filter((Y)=>!W.includes(Y))],[])};return nF(F,J)}var nF=(F,J)=>{let Q=(F.options instanceof Map?Array.from(F.options.values()):F.options).map((W,X)=>E(W._def,{...J,currentPath:[...J.currentPath,"anyOf",`${X}`]})).filter((W)=>!!W&&(!J.strictUnions||typeof W==="object"&&Object.keys(W).length>0));return Q.length?{anyOf:Q}:void 0};function fF(F,J){if(["ZodString","ZodNumber","ZodBigInt","ZodBoolean","ZodNull"].includes(F.innerType._def.typeName)&&(!F.innerType._def.checks||!F.innerType._def.checks.length))return{type:[S[F.innerType._def.typeName],"null"]};let Q=E(F.innerType._def,{...J,currentPath:[...J.currentPath,"anyOf","0"]});return Q&&{anyOf:[Q,{type:"null"}]}}function tF(F){let J={type:"number"};if(!F.checks)return J;for(let Q of F.checks)switch(Q.kind){case"int":J.type="integer";break;case"min":if(Q.inclusive)J.minimum=Q.value;else J.exclusiveMinimum=Q.value;break;case"max":if(Q.inclusive)J.maximum=Q.value;else J.exclusiveMaximum=Q.value;break;case"multipleOf":J.multipleOf=Q.value;break}return J}function oF(F,J){let Q={type:"object",properties:{}},W=[],X=F.shape();for(let Z in X){let $=X[Z];if($===void 0||$._def===void 0)continue;let U=sF($),L=E($._def,{...J,currentPath:[...J.currentPath,"properties",Z],propertyPath:[...J.currentPath,"properties",Z]});if(L===void 0)continue;if(Q.properties[Z]=L,!U)W.push(Z)}if(W.length)Q.required=W;let Y=aF(F,J);if(Y!==void 0)Q.additionalProperties=Y;return Q}function aF(F,J){if(F.catchall._def.typeName!=="ZodNever")return E(F.catchall._def,{...J,currentPath:[...J.currentPath,"additionalProperties"]});switch(F.unknownKeys){case"passthrough":return J.allowedAdditionalProperties;case"strict":return J.rejectedAdditionalProperties;case"strip":return J.removeAdditionalStrategy==="strict"?J.allowedAdditionalProperties:J.rejectedAdditionalProperties}}function sF(F){try{return F.isOptional()}catch(J){return!0}}var rF=(F,J)=>{var Q;if(J.currentPath.toString()===((Q=J.propertyPath)==null?void 0:Q.toString()))return E(F.innerType._def,J);let W=E(F.innerType._def,{...J,currentPath:[...J.currentPath,"anyOf","1"]});return W?{anyOf:[{not:K()},W]}:K()},eF=(F,J)=>{if(J.pipeStrategy==="input")return E(F.in._def,J);else if(J.pipeStrategy==="output")return E(F.out._def,J);let Q=E(F.in._def,{...J,currentPath:[...J.currentPath,"allOf","0"]}),W=E(F.out._def,{...J,currentPath:[...J.currentPath,"allOf",Q?"1":"0"]});return{allOf:[Q,W].filter((X)=>X!==void 0)}};function FJ(F,J){return E(F.type._def,J)}function JJ(F,J){let W={type:"array",uniqueItems:!0,items:E(F.valueType._def,{...J,currentPath:[...J.currentPath,"items"]})};if(F.minSize)W.minItems=F.minSize.value;if(F.maxSize)W.maxItems=F.maxSize.value;return W}function QJ(F,J){if(F.rest)return{type:"array",minItems:F.items.length,items:F.items.map((Q,W)=>E(Q._def,{...J,currentPath:[...J.currentPath,"items",`${W}`]})).reduce((Q,W)=>W===void 0?Q:[...Q,W],[]),additionalItems:E(F.rest._def,{...J,currentPath:[...J.currentPath,"additionalItems"]})};else return{type:"array",minItems:F.items.length,maxItems:F.items.length,items:F.items.map((Q,W)=>E(Q._def,{...J,currentPath:[...J.currentPath,"items",`${W}`]})).reduce((Q,W)=>W===void 0?Q:[...Q,W],[])}}function WJ(){return{not:K()}}function XJ(){return K()}var YJ=(F,J)=>{return E(F.innerType._def,J)},ZJ=(F,J,Q)=>{switch(J){case w.ZodString:return $F(F,Q);case w.ZodNumber:return tF(F);case w.ZodObject:return oF(F,Q);case w.ZodBigInt:return _F(F);case w.ZodBoolean:return jF();case w.ZodDate:return ZF(F,Q);case w.ZodUndefined:return WJ();case w.ZodNull:return cF();case w.ZodArray:return TF(F,Q);case w.ZodUnion:case w.ZodDiscriminatedUnion:return dF(F,Q);case w.ZodIntersection:return yF(F,Q);case w.ZodTuple:return QJ(F,Q);case w.ZodRecord:return LF(F,Q);case w.ZodLiteral:return hF(F);case w.ZodEnum:return xF(F);case w.ZodNativeEnum:return pF(F);case w.ZodNullable:return fF(F,Q);case w.ZodOptional:return rF(F,Q);case w.ZodMap:return iF(F,Q);case w.ZodSet:return JJ(F,Q);case w.ZodLazy:return()=>F.getter()._def;case w.ZodPromise:return FJ(F,Q);case w.ZodNaN:case w.ZodNever:return lF();case w.ZodEffects:return gF(F,Q);case w.ZodAny:return K();case w.ZodUnknown:return XJ();case w.ZodDefault:return SF(F,Q);case w.ZodBranded:return YF(F,Q);case w.ZodReadonly:return YJ(F,Q);case w.ZodCatch:return kF(F,Q);case w.ZodPipeline:return eF(F,Q);case w.ZodFunction:case w.ZodVoid:case w.ZodSymbol:return;default:return((W)=>{return})(J)}},$J=(F,J)=>{let Q=0;for(;Q<F.length&&Q<J.length;Q++)if(F[Q]!==J[Q])break;return[(F.length-Q).toString(),...J.slice(Q)].join("/")};function E(F,J,Q=!1){var W;let X=J.seen.get(F);if(J.override){let U=(W=J.override)==null?void 0:W.call(J,F,J,X,Q);if(U!==NF)return U}if(X&&!Q){let U=LJ(X,J);if(U!==void 0)return U}let Y={def:F,path:J.currentPath,jsonSchema:void 0};J.seen.set(F,Y);let Z=ZJ(F,F.typeName,J),$=typeof Z==="function"?E(Z(),J):Z;if($)UJ(F,J,$);if(J.postProcess){let U=J.postProcess($,F,J);return Y.jsonSchema=$,U}return Y.jsonSchema=$,$}var LJ=(F,J)=>{switch(J.$refStrategy){case"root":return{$ref:F.path.join("/")};case"relative":return{$ref:$J(J.currentPath,F.path)};case"none":case"seen":{if(F.path.length<J.currentPath.length&&F.path.every((Q,W)=>J.currentPath[W]===Q))return console.warn(`Recursive reference detected at ${J.currentPath.join("/")}! Defaulting to any`),K();return J.$refStrategy==="seen"?K():void 0}}},UJ=(F,J,Q)=>{if(F.description)Q.description=F.description;return Q},wJ=(F)=>{let J=VF(F),Q=J.name!==void 0?[...J.basePath,J.definitionPath,J.name]:J.basePath;return{...J,currentPath:Q,propertyPath:void 0,seen:new Map(Object.entries(J.definitions).map(([W,X])=>[X._def,{def:X._def,path:[...J.basePath,J.definitionPath,W],jsonSchema:void 0}]))}},EJ=(F,J)=>{var Q;let W=wJ(J),X=typeof J==="object"&&J.definitions?Object.entries(J.definitions).reduce((L,[G,N])=>{var h;return{...L,[G]:(h=E(N._def,{...W,currentPath:[...W.basePath,W.definitionPath,G]},!0))!=null?h:K()}},{}):void 0,Y=typeof J==="string"?J:(J==null?void 0:J.nameStrategy)==="title"?void 0:J==null?void 0:J.name,Z=(Q=E(F._def,Y===void 0?W:{...W,currentPath:[...W.basePath,W.definitionPath,Y]},!1))!=null?Q:K(),$=typeof J==="object"&&J.name!==void 0&&J.nameStrategy==="title"?J.name:void 0;if($!==void 0)Z.title=$;let U=Y===void 0?X?{...Z,[W.definitionPath]:X}:Z:{$ref:[...W.$refStrategy==="relative"?[]:W.basePath,W.definitionPath,Y].join("/"),[W.definitionPath]:{...X,[Y]:Z}};return U.$schema="http://json-schema.org/draft-07/schema#",U},g=Symbol.for("vercel.ai.schema");function JQ(F){let J;return()=>{if(J==null)J=F();return J}}function T(F,{validate:J}={}){return{[g]:!0,_type:void 0,get jsonSchema(){if(typeof F==="function")F=F();return F},validate:J}}function GJ(F){return typeof F==="object"&&F!==null&&g in F&&F[g]===!0&&"jsonSchema"in F&&"validate"in F}function CJ(F){return F==null?T({properties:{},additionalProperties:!1}):GJ(F)?F:("~standard"in F)?F["~standard"].vendor==="zod"?OJ(F):MJ(F):F()}function MJ(F){return T(()=>v(F["~standard"].jsonSchema.input({target:"draft-07"})),{validate:async(J)=>{let Q=await F["~standard"].validate(J);return"value"in Q?{success:!0,value:Q.value}:{success:!1,error:new I({value:J,cause:Q.issues})}}})}function KJ(F,J){var Q;let W=(Q=J==null?void 0:J.useReferences)!=null?Q:!1;return T(()=>EJ(F,{$refStrategy:W?"root":"none"}),{validate:async(X)=>{let Y=await F.safeParseAsync(X);return Y.success?{success:!0,value:Y.data}:{success:!1,error:Y.error}}})}function qJ(F,J){var Q;let W=(Q=J==null?void 0:J.useReferences)!=null?Q:!1;return T(()=>v(n(F,{target:"draft-7",io:"input",reused:W?"ref":"inline"})),{validate:async(X)=>{let Y=await f(F,X);return Y.success?{success:!0,value:Y.data}:{success:!1,error:Y.error}}})}function DJ(F){return"_zod"in F}function OJ(F,J){if(DJ(F))return qJ(F,J);else return KJ(F,J)}async function IJ({value:F,schema:J,context:Q}){let W=await y({value:F,schema:J,context:Q});if(!W.success)throw I.wrap({value:F,cause:W.error,context:Q});return W.value}async function y({value:F,schema:J,context:Q}){let W=CJ(J);try{if(W.validate==null)return{success:!0,value:F,rawValue:F};let X=await W.validate(F);if(X.success)return{success:!0,value:X.value,rawValue:F};return{success:!1,error:I.wrap({value:F,cause:X.error,context:Q}),rawValue:F}}catch(X){return{success:!1,error:I.wrap({value:F,cause:X,context:Q}),rawValue:F}}}async function PJ({text:F,schema:J}){try{let Q=x(F);if(J==null)return Q;return IJ({value:Q,schema:J})}catch(Q){if(B.isInstance(Q)||I.isInstance(Q))throw Q;throw new B({text:F,cause:Q})}}async function UF({text:F,schema:J}){try{let Q=x(F);if(J==null)return{success:!0,value:Q,rawValue:Q};return await y({value:Q,schema:J})}catch(Q){return{success:!1,error:B.isInstance(Q)?Q:new B({text:F,cause:Q}),rawValue:void 0}}}function QQ(F){try{return x(F),!0}catch(J){return!1}}function zJ({stream:F,schema:J}){return F.pipeThrough(new TextDecoderStream).pipeThrough(new o).pipeThrough(new TransformStream({async transform({data:Q},W){if(Q==="[DONE]")return;W.enqueue(await UF({text:Q,schema:J}))}}))}async function YQ({provider:F,providerOptions:J,schema:Q}){if((J==null?void 0:J[F])==null)return;let W=await y({value:J[F],schema:Q});if(!W.success)throw new V({argument:"providerOptions",message:`invalid ${F} provider options`,cause:W.error});return W.value}var AJ=()=>globalThis.fetch,$Q=async({url:F,headers:J,body:Q,failedResponseHandler:W,successfulResponseHandler:X,abortSignal:Y,fetch:Z})=>wF({url:F,headers:{"Content-Type":"application/json",...J},body:{content:JSON.stringify(Q),values:Q},failedResponseHandler:W,successfulResponseHandler:X,abortSignal:Y,fetch:Z}),LQ=async({url:F,headers:J,formData:Q,failedResponseHandler:W,successfulResponseHandler:X,abortSignal:Y,fetch:Z})=>wF({url:F,headers:J,body:{content:Q,values:Object.fromEntries(Q.entries())},failedResponseHandler:W,successfulResponseHandler:X,abortSignal:Y,fetch:Z}),wF=async({url:F,headers:J={},body:Q,successfulResponseHandler:W,failedResponseHandler:X,abortSignal:Y,fetch:Z=AJ()})=>{try{let $=await Z(F,{method:"POST",headers:WF(J,`ai-sdk/provider-utils/${XF}`,QF()),body:Q.content,signal:Y}),U=z($);if(!$.ok){let L;try{L=await X({response:$,url:F,requestBodyValues:Q.values})}catch(G){if(R(G)||C.isInstance(G))throw G;throw new C({message:"Failed to process error response",cause:G,statusCode:$.status,url:F,responseHeaders:U,requestBodyValues:Q.values})}throw L.value}try{return await W({response:$,url:F,requestBodyValues:Q.values})}catch(L){if(L instanceof Error){if(R(L)||C.isInstance(L))throw L}throw new C({message:"Failed to process successful response",cause:L,statusCode:$.status,url:F,responseHeaders:U,requestBodyValues:Q.values})}}catch($){throw JF({error:$,url:F,requestBodyValues:Q.values})}};function EF(F){return F}function UQ(F){return{...F,type:"dynamic"}}function wQ({id:F,inputSchema:J}){return({execute:Q,outputSchema:W,needsApproval:X,toModelOutput:Y,onInputStart:Z,onInputDelta:$,onInputAvailable:U,...L})=>EF({type:"provider",id:F,args:L,inputSchema:J,outputSchema:W,execute:Q,needsApproval:X,toModelOutput:Y,onInputStart:Z,onInputDelta:$,onInputAvailable:U})}function EQ({id:F,inputSchema:J,outputSchema:Q,supportsDeferredResults:W}){return({execute:X,needsApproval:Y,toModelOutput:Z,onInputStart:$,onInputDelta:U,onInputAvailable:L,...G})=>EF({type:"provider",id:F,args:G,inputSchema:J,outputSchema:Q,execute:X,needsApproval:Y,toModelOutput:Z,onInputStart:$,onInputDelta:U,onInputAvailable:L,supportsDeferredResults:W})}async function GQ(F){if(typeof F==="function")F=F();return Promise.resolve(F)}var MQ=({errorSchema:F,errorToMessage:J,isRetryable:Q})=>async({response:W,url:X,requestBodyValues:Y})=>{let Z=await W.text(),$=z(W);if(Z.trim()==="")return{responseHeaders:$,value:new C({message:W.statusText,url:X,requestBodyValues:Y,statusCode:W.status,responseHeaders:$,responseBody:Z,isRetryable:Q==null?void 0:Q(W)})};try{let U=await PJ({text:Z,schema:F});return{responseHeaders:$,value:new C({message:J(U),url:X,requestBodyValues:Y,statusCode:W.status,responseHeaders:$,responseBody:Z,data:U,isRetryable:Q==null?void 0:Q(W,U)})}}catch(U){return{responseHeaders:$,value:new C({message:W.statusText,url:X,requestBodyValues:Y,statusCode:W.status,responseHeaders:$,responseBody:Z,isRetryable:Q==null?void 0:Q(W)})}}},KQ=(F)=>async({response:J})=>{let Q=z(J);if(J.body==null)throw new t({});return{responseHeaders:Q,value:zJ({stream:J.body,schema:F})}},qQ=(F)=>async({response:J,url:Q,requestBodyValues:W})=>{let X=await J.text(),Y=await UF({text:X,schema:F}),Z=z(J);if(!Y.success)throw new C({message:"Invalid JSON response",cause:Y.error,statusCode:J.status,responseHeaders:Z,responseBody:X,url:Q,requestBodyValues:W});return{responseHeaders:Z,value:Y.value,rawValue:Y.rawValue}},DQ=()=>async({response:F,url:J,requestBodyValues:Q})=>{let W=z(F);if(!F.body)throw new C({message:"Response body is empty",url:J,requestBodyValues:Q,statusCode:F.status,responseHeaders:W,responseBody:void 0});try{let X=await F.arrayBuffer();return{responseHeaders:W,value:new Uint8Array(X)}}catch(X){throw new C({message:"Failed to read response as array buffer",url:J,requestBodyValues:Q,statusCode:F.status,responseHeaders:W,responseBody:void 0,cause:X})}},OQ=()=>async({response:F,url:J,requestBodyValues:Q})=>{let W=z(F),X=await F.text();return{responseHeaders:W,value:new C({message:F.statusText,url:J,requestBodyValues:Q,statusCode:F.status,responseHeaders:W,responseBody:X})}};function IQ(F){let J=F.indexOf(".");return J===-1?F:F.slice(0,J)}function PQ(F){return F==null?void 0:F.replace(/\/$/,"")}function HJ(F){return F!=null&&typeof F[Symbol.asyncIterator]==="function"}async function*zQ({execute:F,input:J,options:Q}){let W=F(J,Q);if(HJ(W)){let X;for await(let Y of W)X=Y,yield{type:"preliminary",output:Y};yield{type:"final",output:X}}else yield{type:"final",output:await W}}
7
- export{RJ as So,NJ as To,VJ as Uo,TJ as Vo,z as Wo,_J as Xo,a as Yo,jJ as Zo,kJ as _o,bJ as $o,O as ap,e as bp,KF as cp,p as dp,gJ as ep,DF as fp,vJ as gp,yJ as hp,R as ip,QF as jp,zF as kp,WF as lp,uJ as mp,iJ as np,pJ as op,cJ as pp,dJ as qp,fJ as rp,tJ as sp,JQ as tp,T as up,CJ as vp,OJ as wp,IJ as xp,y as yp,PJ as zp,UF as Ap,QQ as Bp,zJ as Cp,YQ as Dp,$Q as Ep,LQ as Fp,EF as Gp,UQ as Hp,wQ as Ip,EQ as Jp,GQ as Kp,MQ as Lp,KQ as Mp,qQ as Np,DQ as Op,OQ as Pp,IQ as Qp,PQ as Rp,zQ as Sp};
7
+ export{RJ as pq,NJ as qq,VJ as rq,TJ as sq,z as tq,_J as uq,a as vq,jJ as wq,kJ as xq,bJ as yq,O as zq,e as Aq,KF as Bq,p as Cq,gJ as Dq,DF as Eq,vJ as Fq,yJ as Gq,R as Hq,QF as Iq,zF as Jq,WF as Kq,uJ as Lq,iJ as Mq,pJ as Nq,cJ as Oq,dJ as Pq,fJ as Qq,tJ as Rq,JQ as Sq,T as Tq,CJ as Uq,OJ as Vq,IJ as Wq,y as Xq,PJ as Yq,UF as Zq,QQ as _q,zJ as $q,YQ as ar,$Q as br,LQ as cr,EF as dr,UQ as er,wQ as fr,EQ as gr,GQ as hr,MQ as ir,KQ as jr,qQ as kr,DQ as lr,OQ as mr,IQ as nr,PQ as or,zQ as pr};
@@ -1,5 +1,5 @@
1
1
  // @bun
2
- import{N as R9}from"./chunk-pq2prhb2.js";import{Ed as E9}from"./chunk-sbx9z70j.js";import{Fd as P6,Id as p$,Jd as S9,Kd as U9,Nd as H9,Od as q6}from"./chunk-2p9py4rw.js";import"./chunk-n3t52cz2.js";import{Rd as T0}from"./chunk-yajd975f.js";import{Vf as O}from"./chunk-cjfgs1x8.js";import{Wg as j9,dh as I9,hh as E$}from"./chunk-m2ny1en7.js";import"./chunk-09j71kp6.js";import"./chunk-js9wdh67.js";import"./chunk-0a0vat1h.js";import"./chunk-z8v2tsz2.js";import"./chunk-j8efst22.js";import"./chunk-8f0g7d7k.js";import"./chunk-abtn6nec.js";import{Cl as b9,Xj as T9,lk as O6,mk as M0,rl as w9,tl as D9}from"./chunk-d7t0bcvk.js";import{Pl as N9}from"./chunk-7mc8nxve.js";import{cm as A0,lm as T$}from"./chunk-dfja6dj6.js";import"./chunk-n34y5gp6.js";import"./chunk-bn0h9dny.js";import"./chunk-q5363rr9.js";import"./chunk-7wthn44y.js";import"./chunk-a8p9aggx.js";import"./chunk-0xm85ayc.js";import"./chunk-s2za1n7h.js";import"./chunk-19sa03c1.js";import"./chunk-csdm3n24.js";import"./chunk-xk1nh1ay.js";import"./chunk-bsf6n350.js";import"./chunk-4vze3djr.js";import"./chunk-bzrsnv2k.js";import"./chunk-d0qqgxs4.js";import"./chunk-cqtkxwd8.js";import"./chunk-v00cptj6.js";import"./chunk-1d9f53sk.js";import"./chunk-svrxk3vf.js";import"./chunk-kkae8ead.js";import"./chunk-s6me101a.js";import"./chunk-jwtev7b7.js";import"./chunk-b9nwaaqs.js";import"./chunk-qsszerj7.js";import"./chunk-6jewfaqa.js";import"./chunk-6hdjkvr1.js";import"./chunk-1rn0vmvv.js";import"./chunk-fsy279s5.js";import"./chunk-hn1f6rne.js";import"./chunk-4kpvceap.js";import{_r as V9,bs as R6,cs as L9,hs as F9}from"./chunk-94qmhz2p.js";import{it as C6,tt as A9}from"./chunk-20d0cd1j.js";import"./chunk-yn576pje.js";import"./chunk-b6dsv601.js";import"./chunk-j2zay4da.js";import"./chunk-4vemws1t.js";import"./chunk-yvqbewmc.js";import{qH as M9}from"./chunk-t299e2aw.js";import"./chunk-bv8pf0m1.js";import"./chunk-4mrz9b6d.js";import{CO as q0,DO as D,GO as E}from"./chunk-yjj4cvqg.js";var JZ=D((zZ)=>{/*!
2
+ import{N as R9}from"./chunk-b3rpzkcb.js";import{Ed as E9}from"./chunk-07g7cybt.js";import{Fd as P6,Id as p$,Jd as S9,Kd as U9,Nd as H9,Od as q6}from"./chunk-jje0srjq.js";import"./chunk-27yxgy03.js";import{Rd as T0}from"./chunk-yajd975f.js";import{Vf as O}from"./chunk-7ppd2phw.js";import{Wg as j9,dh as I9,hh as E$}from"./chunk-ddnpx1yx.js";import"./chunk-wfs4pcwa.js";import"./chunk-p68rwmhc.js";import"./chunk-0a0vat1h.js";import"./chunk-z8v2tsz2.js";import"./chunk-j8efst22.js";import"./chunk-a1pw9r6f.js";import"./chunk-d5bxan80.js";import{Cl as b9,Xj as T9,lk as O6,mk as M0,rl as w9,tl as D9}from"./chunk-pvpy9kq1.js";import{Pl as N9}from"./chunk-wpajh5s5.js";import{cm as A0,lm as T$}from"./chunk-2ec6ps8r.js";import"./chunk-gj3hzx3d.js";import"./chunk-nj4d554m.js";import"./chunk-2gerf08b.js";import"./chunk-fqw4y7x0.js";import"./chunk-a1p2f16h.js";import"./chunk-nt4e3em9.js";import"./chunk-a0v55ywn.js";import"./chunk-v965rsr8.js";import"./chunk-1sgby720.js";import"./chunk-dcvatax2.js";import"./chunk-4tbwha3m.js";import"./chunk-m612agnk.js";import"./chunk-yq3m8190.js";import"./chunk-btz9jvec.js";import"./chunk-cqtkxwd8.js";import"./chunk-fkgv2hqd.js";import"./chunk-zyhdxggp.js";import"./chunk-q6ztpfcs.js";import"./chunk-jm1ptn8n.js";import"./chunk-c5e6sk9c.js";import"./chunk-m02zt1a3.js";import"./chunk-vg2fmyje.js";import"./chunk-sn4nez18.js";import"./chunk-42f7p0hq.js";import"./chunk-4qqkqrn9.js";import"./chunk-j6emx6jn.js";import"./chunk-be216spx.js";import"./chunk-12bssxd4.js";import"./chunk-z8r65yw3.js";import{At as R6,Bt as L9,Gt as F9,xt as V9}from"./chunk-3szwfy7w.js";import{Hu as C6,Su as A9}from"./chunk-whxjkz9a.js";import"./chunk-89v6dgpp.js";import"./chunk-k309zez0.js";import"./chunk-09kba1hg.js";import"./chunk-t12xrrfr.js";import"./chunk-phxrg7aw.js";import{PI as M9}from"./chunk-snm5q21k.js";import"./chunk-xpc2zgj7.js";import"./chunk-qjjch1zt.js";import{$P as q0,aQ as D,dQ as E}from"./chunk-aztre27e.js";var JZ=D((zZ)=>{/*!
3
3
  * content-type
4
4
  * Copyright(c) 2015 Douglas Christopher Wilson
5
5
  * MIT Licensed
@@ -0,0 +1,2 @@
1
+ // @bun
2
+ import{Gl as a,Hl as b,Il as c,Jl as d,Kl as e,Ll as f,Ml as g,Nl as h,Ol as i}from"./chunk-wpajh5s5.js";import"./chunk-gj3hzx3d.js";import"./chunk-a1p2f16h.js";import"./chunk-1sgby720.js";import"./chunk-4qqkqrn9.js";import"./chunk-3szwfy7w.js";import"./chunk-whxjkz9a.js";import"./chunk-89v6dgpp.js";import"./chunk-k309zez0.js";import"./chunk-09kba1hg.js";import"./chunk-t12xrrfr.js";import"./chunk-phxrg7aw.js";import"./chunk-snm5q21k.js";import"./chunk-aztre27e.js";export{i as stopRefresh,h as startRefresh,g as refresh,d as readModelCatalogResponse,f as get,c as Provider,b as Model,a as MODEL_CATALOG_MAX_BYTES,e as Data};
@@ -1,5 +1,5 @@
1
1
  // @bun
2
- import{bi as P}from"./chunk-js9wdh67.js";import{ko as o,uo as k,yo as u}from"./chunk-s2za1n7h.js";import{$s as L,Ss as t}from"./chunk-94qmhz2p.js";import{qH as j}from"./chunk-t299e2aw.js";class Q extends Error{cause;constructor(J,Z){super(J);this.name="ForgewiseError",this.cause=Z}}class K extends Q{constructor(J="Device flow is not supported by this issuer."){super(J);this.name="DeviceFlowUnsupportedError"}}var e=L.create({service:"forgewise.config"}),J1="https://accounts.forgewise.tech",Z1="forgewise-cli",b=!1,$1={defaultFallbacks:0};function D(...J){return J.find((Z)=>Z!==void 0&&Z.trim().length>0)}function X1(){return!!process.env.REPLIT_DEV_DOMAIN}async function H(){let J=process.env.ACCOUNTS_ISSUER,Z=process.env.FORGEWISE_CLIENT_ID;if(J&&Z)return{issuer:J.replace(/\/+$/,""),clientId:Z};let $,X;try{$=await k()}catch(N){$=void 0,X=N}let Y=D(J,$?.issuer,J1).replace(/\/+$/,""),V=D(Z,$?.clientId,Z1),x=D(J,$?.issuer)===void 0,G=D(Z,$?.clientId)===void 0;if((x||G)&&!b)b=!0,$1.defaultFallbacks++,e.warn("remote Forgewise coordinate lookup unavailable; falling back to baked-in defaults",{issuer:Y,clientId:V,usedDefaultIssuer:x,usedDefaultClientId:G,remoteError:X instanceof Error?X.message:X?String(X):void 0});return{issuer:Y,clientId:V}}function C(J,Z,$){if(J>=200&&J<300)return{kind:"success"};let X=Z?.error??"";if(X==="authorization_pending")return{kind:"wait",intervalMs:$};if(X==="slow_down")return{kind:"wait",intervalMs:$+5000};if(X==="access_denied")return{kind:"fatal",message:"Sign-in was denied in the browser."};if(X==="expired_token")return{kind:"fatal",message:"The sign-in code expired before it was approved. Try again."};return{kind:"fatal",message:`Device sign-in failed: ${Z?.error_description||X||`HTTP ${J}`}`}}import v from"http";var g="/callback",E=[51737,51738],_=new Set;function h(J){return J.replace(/[&<>\"']/g,(Z)=>{switch(Z){case"&":return"&amp;";case"<":return"&lt;";case">":return"&gt;";case'"':return"&quot;";default:return"&#39;"}})}function R(J){return`http://127.0.0.1:${J}${g}`}async function V1(J){return new Promise((Z,$)=>{let X=v.createServer();X.listen(J,"127.0.0.1",()=>{X.close(()=>Z(J))}),X.on("error",$)})}async function d(){for(let J of E){if(_.has(J))continue;_.add(J);try{return await V1(J)}catch{_.delete(J)}}throw new Q(`Could not bind to any loopback port (tried ${E.join(", ")}). Free one of those ports and retry.`)}function m(J,Z,$,X){return new Promise((Y,V)=>{let x=()=>_.delete(J),G=v.createServer((q,W)=>{try{let z=new URL(q.url??"/",`http://localhost:${J}`);if(z.pathname!==g){W.writeHead(404),W.end();return}let B=z.searchParams.get("code"),M=z.searchParams.get("state"),O=z.searchParams.get("error"),U=z.searchParams.get("error_description");if(O){let r=`${h(O)}${U?": "+h(U):""}`;W.writeHead(200,{"Content-Type":"text/html"}),W.end(`<html><body style="font-family:sans-serif;padding:2rem"><h2>Authorization failed</h2><p>${r}</p><p>You can close this tab.</p></body></html>`),G.close(),V(new Q(`Authorization error: ${O}${U?" \u2014 "+U:""}`));return}if(!B||M!==Z){W.writeHead(400),W.end("Invalid request");return}W.writeHead(200,{"Content-Type":"text/html"}),W.end('<html><body style="font-family:sans-serif;padding:2rem"><h2>Signed in! You can close this tab.</h2><p>Return to your terminal to continue.</p></body></html>'),G.close(),Y({code:B})}catch(z){G.close(),V(z)}});if($?.aborted){x(),V(new Q("Login cancelled"));return}let N=()=>{x(),G.close(()=>V(new Q("Login cancelled")))};if($?.addEventListener("abort",N,{once:!0}),$?.aborted){N();return}G.listen(J,"127.0.0.1",()=>{x(),X?.()}),G.on("error",(q)=>{x(),V(q)})})}function p(J,Z){return new Promise(($,X)=>{if(Z?.aborted){X(new Q("Login cancelled"));return}let Y,V=()=>{clearTimeout(Y),Z?.removeEventListener("abort",V),X(new Q("Login cancelled"))};if(Y=setTimeout(()=>{Z?.removeEventListener("abort",V),$()},J),Z?.addEventListener("abort",V,{once:!0}),Z?.aborted)V()})}function T(J,Z=300000){if(!J)return!1;return Date.now()>=J-Z}async function Y1(J){let{issuer:Z}=await H();return u({issuer:Z,...J.accessToken?{accessToken:J.accessToken}:{}})}import F from"crypto";var c="openid profile email",w=(J)=>J.toString("base64url");function i(){let J=w(F.randomBytes(32)),Z=w(F.createHash("sha256").update(J).digest()),$=w(F.randomBytes(16));return{verifier:J,challenge:Z,state:$}}function l(J){let Z=new URL(`${J.issuer}/api/oauth/authorize`);return Z.searchParams.set("response_type","code"),Z.searchParams.set("client_id",J.clientId),Z.searchParams.set("redirect_uri",J.redirectUri),Z.searchParams.set("scope",c),Z.searchParams.set("state",J.state),Z.searchParams.set("code_challenge",J.challenge),Z.searchParams.set("code_challenge_method","S256"),Z.toString()}async function A(J,Z){let $=await fetch(`${J}/api/oauth/userinfo`,{headers:{Authorization:`Bearer ${Z.access_token}`}});if(!$.ok)throw new Q(`Failed to fetch user profile (${$.status})`);let X=await $.json();if(!X.sub)throw new Q("Userinfo response is missing required 'sub' field \u2014 the server returned an invalid user profile.");return{sub:X.sub,name:X.name??"",email:X.email??"",access_token:Z.access_token,expires_at:Date.now()+(Z.expires_in??3600)*1000,...Z.refresh_token?{refresh_token:Z.refresh_token}:{}}}async function y(J){let Z=await fetch(`${J.issuer}/api/oauth/token`,{method:"POST",headers:{"content-type":"application/x-www-form-urlencoded"},body:new URLSearchParams({grant_type:"authorization_code",code:J.code,redirect_uri:J.redirectUri,client_id:J.clientId,code_verifier:J.verifier}).toString(),signal:J.signal??null});if(!Z.ok){let X=await Z.text().catch(()=>"");throw new Q(`Token exchange failed (${Z.status}): ${X}`)}let $=await Z.json();return A(J.issuer,$)}async function x1(J,Z,$=5000){let X=new AbortController,Y=setTimeout(()=>X.abort(),$);try{let V=await fetch(`${J}/api/oauth/userinfo`,{headers:{Authorization:`Bearer ${Z}`},signal:X.signal});if(V.status===401||V.status===403)return!1;if(!V.ok)return null;return!0}catch{return null}finally{clearTimeout(Y)}}async function f(J){let{issuer:Z,clientId:$}=await H(),X;try{X=await fetch(`${Z}/api/oauth/token`,{method:"POST",headers:{"content-type":"application/x-www-form-urlencoded"},body:new URLSearchParams({grant_type:"refresh_token",client_id:$,refresh_token:J}).toString()})}catch(V){throw new Q(`Could not reach the sign-in server to refresh the session: ${V instanceof Error?V.message:String(V)}`,V)}if(!X.ok){let V=await X.json().catch(()=>{return});if(V?.error==="invalid_grant")return"invalid_grant";throw new Q(`Token refresh failed (${X.status}): ${V?.error??""}`)}let Y=await X.json();return A(Z,Y)}async function a(J){let Z;try{Z=await fetch(`${J.issuer}/api/oauth/device_authorization`,{method:"POST",headers:{"content-type":"application/x-www-form-urlencoded"},body:new URLSearchParams({client_id:J.clientId,scope:c}).toString(),signal:J.signal??null})}catch{if(J.signal?.aborted)throw new Q("Login cancelled");throw new K}if(Z.status===404||Z.status===405||Z.status===501)throw new K;if(!Z.ok){let X=await Z.text().catch(()=>"");throw new Q(`Device authorization failed (${Z.status}): ${X}`)}let $;try{$=await Z.json()}catch{throw new K}if(!$.device_code||!$.user_code||!$.verification_uri)throw new K;return{deviceCode:$.device_code,info:{userCode:$.user_code,verificationUri:$.verification_uri,verificationUriComplete:$.verification_uri_complete,expiresAt:Date.now()+($.expires_in??900)*1000},intervalMs:Math.max(1,$.interval??5)*1000}}async function n(J){let Z;try{Z=await fetch(`${J.issuer}/api/oauth/token`,{method:"POST",headers:{"content-type":"application/x-www-form-urlencoded"},body:new URLSearchParams({grant_type:"urn:ietf:params:oauth:grant-type:device_code",device_code:J.deviceCode,client_id:J.clientId}).toString(),signal:J.signal??null})}catch{if(J.signal?.aborted)throw new Q("Login cancelled");return{kind:"wait",intervalMs:J.currentIntervalMs}}let $;try{$=await Z.json()}catch{$=void 0}let X=C(Z.status,$,J.currentIntervalMs);if(X.kind==="success"){if(!$?.access_token)throw new Q("Token endpoint returned success without an access_token.");return{kind:"success",profile:await A(J.issuer,{access_token:$.access_token,expires_in:$.expires_in})}}if(X.kind==="fatal")throw new Q(X.message);return{kind:"wait",intervalMs:X.intervalMs}}var I="forgewise",G1=()=>j.gen(function*(){let J=yield*o.Service,Z=yield*J.get(I);if(!Z||Z.type!=="api")return;let $=Z.metadata??{},X=$.access_token;if(!X)return;let Y=Number($.access_token_expires_at??0);if(!T(Y))return X;let V=$.refresh_token;if(!V)return;let x=yield*j.promise(()=>f(V).catch(()=>null));if(!x||x==="invalid_grant")return;let G=yield*J.get(I);if(!G||G.type!=="api"||G.key!==Z.key)return x.access_token;let N={...G,metadata:{...G.metadata??{},access_token:x.access_token,access_token_expires_at:String(x.expires_at),...x.refresh_token?{refresh_token:x.refresh_token}:{}}};return yield*j.orElseSucceed(J.set(I,N),()=>{return}),x.access_token}),Q1=(J)=>j.gen(function*(){if(J.method==="sso")return{key:J.key,method:"sso",accessToken:J.key};let Z=yield*G1();return{key:J.key,method:"api-key",accessToken:Z}});var W1=300000;async function s(){let{issuer:J,clientId:Z}=await H(),{verifier:$,challenge:X,state:Y}=i(),V=await d(),x=R(V),G=l({issuer:J,clientId:Z,redirectUri:x,challenge:X,state:Y});return{issuer:J,clientId:Z,verifier:$,port:V,redirectUri:x,authorizeStr:G,state:Y}}async function z1(J){let{issuer:Z,clientId:$}=await H(),{deviceCode:X,info:Y,intervalMs:V}=await a({issuer:Z,clientId:$,signal:J.signal});if(J.onCode(Y),J.tryOpen){let G=Y.verificationUriComplete??Y.verificationUri;P(G)}let x=V;while(Date.now()<Y.expiresAt){await p(x,J.signal);let G=await n({issuer:Z,clientId:$,deviceCode:X,currentIntervalMs:x,signal:J.signal});if(G.kind==="success")return G.profile;x=G.intervalMs}throw new Q("The sign-in code expired before it was approved. Try again.")}async function N1(){let{issuer:J,clientId:Z,verifier:$,port:X,redirectUri:Y,authorizeStr:V,state:x}=await s();process.stdout.write(`
2
+ import{bi as P}from"./chunk-p68rwmhc.js";import{Jp as o,Tp as k,Xp as u}from"./chunk-a0v55ywn.js";import{pu as t,yu as L}from"./chunk-3szwfy7w.js";import{PI as j}from"./chunk-snm5q21k.js";class Q extends Error{cause;constructor(J,Z){super(J);this.name="ForgewiseError",this.cause=Z}}class K extends Q{constructor(J="Device flow is not supported by this issuer."){super(J);this.name="DeviceFlowUnsupportedError"}}var e=L.create({service:"forgewise.config"}),J1="https://accounts.forgewise.tech",Z1="forgewise-cli",b=!1,$1={defaultFallbacks:0};function D(...J){return J.find((Z)=>Z!==void 0&&Z.trim().length>0)}function X1(){return!!process.env.REPLIT_DEV_DOMAIN}async function H(){let J=process.env.ACCOUNTS_ISSUER,Z=process.env.FORGEWISE_CLIENT_ID;if(J&&Z)return{issuer:J.replace(/\/+$/,""),clientId:Z};let $,X;try{$=await k()}catch(N){$=void 0,X=N}let Y=D(J,$?.issuer,J1).replace(/\/+$/,""),V=D(Z,$?.clientId,Z1),x=D(J,$?.issuer)===void 0,G=D(Z,$?.clientId)===void 0;if((x||G)&&!b)b=!0,$1.defaultFallbacks++,e.warn("remote Forgewise coordinate lookup unavailable; falling back to baked-in defaults",{issuer:Y,clientId:V,usedDefaultIssuer:x,usedDefaultClientId:G,remoteError:X instanceof Error?X.message:X?String(X):void 0});return{issuer:Y,clientId:V}}function C(J,Z,$){if(J>=200&&J<300)return{kind:"success"};let X=Z?.error??"";if(X==="authorization_pending")return{kind:"wait",intervalMs:$};if(X==="slow_down")return{kind:"wait",intervalMs:$+5000};if(X==="access_denied")return{kind:"fatal",message:"Sign-in was denied in the browser."};if(X==="expired_token")return{kind:"fatal",message:"The sign-in code expired before it was approved. Try again."};return{kind:"fatal",message:`Device sign-in failed: ${Z?.error_description||X||`HTTP ${J}`}`}}import v from"http";var g="/callback",E=[51737,51738],_=new Set;function h(J){return J.replace(/[&<>\"']/g,(Z)=>{switch(Z){case"&":return"&amp;";case"<":return"&lt;";case">":return"&gt;";case'"':return"&quot;";default:return"&#39;"}})}function R(J){return`http://127.0.0.1:${J}${g}`}async function V1(J){return new Promise((Z,$)=>{let X=v.createServer();X.listen(J,"127.0.0.1",()=>{X.close(()=>Z(J))}),X.on("error",$)})}async function d(){for(let J of E){if(_.has(J))continue;_.add(J);try{return await V1(J)}catch{_.delete(J)}}throw new Q(`Could not bind to any loopback port (tried ${E.join(", ")}). Free one of those ports and retry.`)}function m(J,Z,$,X){return new Promise((Y,V)=>{let x=()=>_.delete(J),G=v.createServer((q,W)=>{try{let z=new URL(q.url??"/",`http://localhost:${J}`);if(z.pathname!==g){W.writeHead(404),W.end();return}let B=z.searchParams.get("code"),M=z.searchParams.get("state"),O=z.searchParams.get("error"),U=z.searchParams.get("error_description");if(O){let r=`${h(O)}${U?": "+h(U):""}`;W.writeHead(200,{"Content-Type":"text/html"}),W.end(`<html><body style="font-family:sans-serif;padding:2rem"><h2>Authorization failed</h2><p>${r}</p><p>You can close this tab.</p></body></html>`),G.close(),V(new Q(`Authorization error: ${O}${U?" \u2014 "+U:""}`));return}if(!B||M!==Z){W.writeHead(400),W.end("Invalid request");return}W.writeHead(200,{"Content-Type":"text/html"}),W.end('<html><body style="font-family:sans-serif;padding:2rem"><h2>Signed in! You can close this tab.</h2><p>Return to your terminal to continue.</p></body></html>'),G.close(),Y({code:B})}catch(z){G.close(),V(z)}});if($?.aborted){x(),V(new Q("Login cancelled"));return}let N=()=>{x(),G.close(()=>V(new Q("Login cancelled")))};if($?.addEventListener("abort",N,{once:!0}),$?.aborted){N();return}G.listen(J,"127.0.0.1",()=>{x(),X?.()}),G.on("error",(q)=>{x(),V(q)})})}function p(J,Z){return new Promise(($,X)=>{if(Z?.aborted){X(new Q("Login cancelled"));return}let Y,V=()=>{clearTimeout(Y),Z?.removeEventListener("abort",V),X(new Q("Login cancelled"))};if(Y=setTimeout(()=>{Z?.removeEventListener("abort",V),$()},J),Z?.addEventListener("abort",V,{once:!0}),Z?.aborted)V()})}function T(J,Z=300000){if(!J)return!1;return Date.now()>=J-Z}async function Y1(J){let{issuer:Z}=await H();return u({issuer:Z,...J.accessToken?{accessToken:J.accessToken}:{}})}import F from"crypto";var c="openid profile email",w=(J)=>J.toString("base64url");function i(){let J=w(F.randomBytes(32)),Z=w(F.createHash("sha256").update(J).digest()),$=w(F.randomBytes(16));return{verifier:J,challenge:Z,state:$}}function l(J){let Z=new URL(`${J.issuer}/api/oauth/authorize`);return Z.searchParams.set("response_type","code"),Z.searchParams.set("client_id",J.clientId),Z.searchParams.set("redirect_uri",J.redirectUri),Z.searchParams.set("scope",c),Z.searchParams.set("state",J.state),Z.searchParams.set("code_challenge",J.challenge),Z.searchParams.set("code_challenge_method","S256"),Z.toString()}async function A(J,Z){let $=await fetch(`${J}/api/oauth/userinfo`,{headers:{Authorization:`Bearer ${Z.access_token}`}});if(!$.ok)throw new Q(`Failed to fetch user profile (${$.status})`);let X=await $.json();if(!X.sub)throw new Q("Userinfo response is missing required 'sub' field \u2014 the server returned an invalid user profile.");return{sub:X.sub,name:X.name??"",email:X.email??"",access_token:Z.access_token,expires_at:Date.now()+(Z.expires_in??3600)*1000,...Z.refresh_token?{refresh_token:Z.refresh_token}:{}}}async function y(J){let Z=await fetch(`${J.issuer}/api/oauth/token`,{method:"POST",headers:{"content-type":"application/x-www-form-urlencoded"},body:new URLSearchParams({grant_type:"authorization_code",code:J.code,redirect_uri:J.redirectUri,client_id:J.clientId,code_verifier:J.verifier}).toString(),signal:J.signal??null});if(!Z.ok){let X=await Z.text().catch(()=>"");throw new Q(`Token exchange failed (${Z.status}): ${X}`)}let $=await Z.json();return A(J.issuer,$)}async function x1(J,Z,$=5000){let X=new AbortController,Y=setTimeout(()=>X.abort(),$);try{let V=await fetch(`${J}/api/oauth/userinfo`,{headers:{Authorization:`Bearer ${Z}`},signal:X.signal});if(V.status===401||V.status===403)return!1;if(!V.ok)return null;return!0}catch{return null}finally{clearTimeout(Y)}}async function f(J){let{issuer:Z,clientId:$}=await H(),X;try{X=await fetch(`${Z}/api/oauth/token`,{method:"POST",headers:{"content-type":"application/x-www-form-urlencoded"},body:new URLSearchParams({grant_type:"refresh_token",client_id:$,refresh_token:J}).toString()})}catch(V){throw new Q(`Could not reach the sign-in server to refresh the session: ${V instanceof Error?V.message:String(V)}`,V)}if(!X.ok){let V=await X.json().catch(()=>{return});if(V?.error==="invalid_grant")return"invalid_grant";throw new Q(`Token refresh failed (${X.status}): ${V?.error??""}`)}let Y=await X.json();return A(Z,Y)}async function a(J){let Z;try{Z=await fetch(`${J.issuer}/api/oauth/device_authorization`,{method:"POST",headers:{"content-type":"application/x-www-form-urlencoded"},body:new URLSearchParams({client_id:J.clientId,scope:c}).toString(),signal:J.signal??null})}catch{if(J.signal?.aborted)throw new Q("Login cancelled");throw new K}if(Z.status===404||Z.status===405||Z.status===501)throw new K;if(!Z.ok){let X=await Z.text().catch(()=>"");throw new Q(`Device authorization failed (${Z.status}): ${X}`)}let $;try{$=await Z.json()}catch{throw new K}if(!$.device_code||!$.user_code||!$.verification_uri)throw new K;return{deviceCode:$.device_code,info:{userCode:$.user_code,verificationUri:$.verification_uri,verificationUriComplete:$.verification_uri_complete,expiresAt:Date.now()+($.expires_in??900)*1000},intervalMs:Math.max(1,$.interval??5)*1000}}async function n(J){let Z;try{Z=await fetch(`${J.issuer}/api/oauth/token`,{method:"POST",headers:{"content-type":"application/x-www-form-urlencoded"},body:new URLSearchParams({grant_type:"urn:ietf:params:oauth:grant-type:device_code",device_code:J.deviceCode,client_id:J.clientId}).toString(),signal:J.signal??null})}catch{if(J.signal?.aborted)throw new Q("Login cancelled");return{kind:"wait",intervalMs:J.currentIntervalMs}}let $;try{$=await Z.json()}catch{$=void 0}let X=C(Z.status,$,J.currentIntervalMs);if(X.kind==="success"){if(!$?.access_token)throw new Q("Token endpoint returned success without an access_token.");return{kind:"success",profile:await A(J.issuer,{access_token:$.access_token,expires_in:$.expires_in})}}if(X.kind==="fatal")throw new Q(X.message);return{kind:"wait",intervalMs:X.intervalMs}}var I="forgewise",G1=()=>j.gen(function*(){let J=yield*o.Service,Z=yield*J.get(I);if(!Z||Z.type!=="api")return;let $=Z.metadata??{},X=$.access_token;if(!X)return;let Y=Number($.access_token_expires_at??0);if(!T(Y))return X;let V=$.refresh_token;if(!V)return;let x=yield*j.promise(()=>f(V).catch(()=>null));if(!x||x==="invalid_grant")return;let G=yield*J.get(I);if(!G||G.type!=="api"||G.key!==Z.key)return x.access_token;let N={...G,metadata:{...G.metadata??{},access_token:x.access_token,access_token_expires_at:String(x.expires_at),...x.refresh_token?{refresh_token:x.refresh_token}:{}}};return yield*j.orElseSucceed(J.set(I,N),()=>{return}),x.access_token}),Q1=(J)=>j.gen(function*(){if(J.method==="sso")return{key:J.key,method:"sso",accessToken:J.key};let Z=yield*G1();return{key:J.key,method:"api-key",accessToken:Z}});var W1=300000;async function s(){let{issuer:J,clientId:Z}=await H(),{verifier:$,challenge:X,state:Y}=i(),V=await d(),x=R(V),G=l({issuer:J,clientId:Z,redirectUri:x,challenge:X,state:Y});return{issuer:J,clientId:Z,verifier:$,port:V,redirectUri:x,authorizeStr:G,state:Y}}async function z1(J){let{issuer:Z,clientId:$}=await H(),{deviceCode:X,info:Y,intervalMs:V}=await a({issuer:Z,clientId:$,signal:J.signal});if(J.onCode(Y),J.tryOpen){let G=Y.verificationUriComplete??Y.verificationUri;P(G)}let x=V;while(Date.now()<Y.expiresAt){await p(x,J.signal);let G=await n({issuer:Z,clientId:$,deviceCode:X,currentIntervalMs:x,signal:J.signal});if(G.kind==="success")return G.profile;x=G.intervalMs}throw new Q("The sign-in code expired before it was approved. Try again.")}async function N1(){let{issuer:J,clientId:Z,verifier:$,port:X,redirectUri:Y,authorizeStr:V,state:x}=await s();process.stdout.write(`
3
3
  `),process.stdout.write(` Opening Forgewise sign-in in your browser...
4
4
  `),process.stdout.write(" Sign-in URL: "+V+`
5
5
  `),process.stdout.write(`
@@ -0,0 +1,2 @@
1
+ // @bun
2
+ import{Cf as l}from"./chunk-a2qz9m10.js";import"./chunk-ywkvq7zb.js";import{Hg as q}from"./chunk-4amgp4yd.js";import"./chunk-nfg7nt13.js";import"./chunk-scnz207s.js";import{dQ as C}from"./chunk-aztre27e.js";function J(){return async(f,b)=>{if("_zod"in f)return l()(f,{components:b.components,options:{io:"input",...b.options}});try{let{createSchema:w}=await import("./chunk-kqn9h2gk.js"),{schema:B,components:k}=w(f,{schemaType:"input",...b.options});if(k)b.components.schemas={...b.components.schemas,...k};return B}catch{throw Error(q('Missing dependencies "zod-openapi v4".'))}}}export{J as default};
@@ -1,2 +1,2 @@
1
1
  // @bun
2
- import{ci as b}from"./chunk-0a0vat1h.js";import"./chunk-z8v2tsz2.js";import"./chunk-yjj4cvqg.js";export{b as QuickJSAsyncWASMModule};
2
+ import{ci as b}from"./chunk-0a0vat1h.js";import"./chunk-z8v2tsz2.js";import"./chunk-aztre27e.js";export{b as QuickJSAsyncWASMModule};
@@ -1,2 +1,2 @@
1
1
  // @bun
2
- import{os as q,qs as c,rs as f,ss as P,ts as Y,us as y,vs as F}from"./chunk-94qmhz2p.js";import{EO as X}from"./chunk-yjj4cvqg.js";var W={free:{providerID:"qlex",modelID:"free"},default:{providerID:"qlex",modelID:"default"},fast:{providerID:"qlex",modelID:"fast"},economical:{providerID:"qlex",modelID:"economical"},power:{providerID:"qlex",modelID:"power"},orchestrated:{providerID:"qlex",modelID:"orchestrated"}},Z={free:"Free (no cost)",default:"Default",fast:"Fast",economical:"Economy",power:"Power",orchestrated:"Orchestrated"},$={free:{intelligence:6,speed:7,cost:0},fast:{intelligence:4,speed:10,cost:1},economical:{intelligence:8,speed:2,cost:1},default:{intelligence:9,speed:1,cost:5},power:{intelligence:10,speed:4,cost:10},orchestrated:{intelligence:7,speed:6,cost:1}};function z(x){return typeof x==="number"&&Number.isFinite(x)&&x>=0&&x<=10}function D(x){if(!x||typeof x!=="object"||Array.isArray(x))return;for(let[j,H]of Object.entries(x)){if(!H||typeof H!=="object"||Array.isArray(H))continue;let K=H;if(!z(K.intelligence)||!z(K.speed)||!z(K.cost))continue;$[j]={intelligence:K.intelligence,speed:K.speed,cost:K.cost}}}function V(x){if(!Array.isArray(x)||x.length===0)return;let j={},H={};for(let K of x){let J=W[K.id];j[K.id]={providerID:K.providerID??J?.providerID??"qlex",modelID:K.modelID??J?.modelID??K.id},H[K.id]=K.label??Z[K.id]??K.id}for(let K of Object.keys(W))delete W[K];Object.assign(W,j);for(let K of Object.keys(Z))delete Z[K];Object.assign(Z,H)}var Q={};X(Q,{tiers:()=>p,tierRatings:()=>m,streamUrl:()=>w,streamBaseUrl:()=>G,sanitizeUpstreamError:()=>U,qlexProviderMeta:()=>N,omniqueryBaseUrl:()=>O,mergeLiveTiers:()=>b,mergeLiveTierRatings:()=>h,evaluatePermission:()=>M,copy:()=>d,bashPrefixWith:()=>B,TIER_RATINGS:()=>$,AGENT_PROMPT_NAMES:()=>k});function b(x){V(x)}function h(x){D(x)}function p(){return Object.entries(W).map(([x,j])=>({id:x,label:Z[x]??x,providerID:j.providerID,modelID:j.modelID}))}function m(){return $}function M(x,j,...H){return H.flat().findLast((C)=>q(x,C.permission)&&q(j,C.pattern))??{action:"ask",permission:x,pattern:"*"}}function B(x,j){for(let H=j.length;H>0;H--){let K=j.slice(0,H).join(" "),J=x[K];if(J!==void 0)return j.slice(0,J)}if(j.length===0)return[];return j.slice(0,1)}function w(){return c}function G(){return f}function O(){return P}function N(){return Y}function U(x){return y(x)}function d(){return F}var k=["generate","explore","dream","distill","summary","compaction","title"];export{W as Ur,Q as Vr};
2
+ import{Nt as q,Pt as c,Qt as f,Rt as P,St as Y,Tt as y,Ut as F}from"./chunk-3szwfy7w.js";import{bQ as X}from"./chunk-aztre27e.js";var W={free:{providerID:"qlex",modelID:"free"},default:{providerID:"qlex",modelID:"default"},fast:{providerID:"qlex",modelID:"fast"},economical:{providerID:"qlex",modelID:"economical"},power:{providerID:"qlex",modelID:"power"},orchestrated:{providerID:"qlex",modelID:"orchestrated"}},Z={free:"Free (no cost)",default:"Default",fast:"Fast",economical:"Economy",power:"Power",orchestrated:"Orchestrated"},$={free:{intelligence:6,speed:7,cost:0},fast:{intelligence:4,speed:10,cost:1},economical:{intelligence:8,speed:2,cost:1},default:{intelligence:9,speed:1,cost:5},power:{intelligence:10,speed:4,cost:10},orchestrated:{intelligence:7,speed:6,cost:1}};function z(x){return typeof x==="number"&&Number.isFinite(x)&&x>=0&&x<=10}function D(x){if(!x||typeof x!=="object"||Array.isArray(x))return;for(let[j,H]of Object.entries(x)){if(!H||typeof H!=="object"||Array.isArray(H))continue;let K=H;if(!z(K.intelligence)||!z(K.speed)||!z(K.cost))continue;$[j]={intelligence:K.intelligence,speed:K.speed,cost:K.cost}}}function V(x){if(!Array.isArray(x)||x.length===0)return;let j={},H={};for(let K of x){let J=W[K.id];j[K.id]={providerID:K.providerID??J?.providerID??"qlex",modelID:K.modelID??J?.modelID??K.id},H[K.id]=K.label??Z[K.id]??K.id}for(let K of Object.keys(W))delete W[K];Object.assign(W,j);for(let K of Object.keys(Z))delete Z[K];Object.assign(Z,H)}var Q={};X(Q,{tiers:()=>p,tierRatings:()=>m,streamUrl:()=>w,streamBaseUrl:()=>G,sanitizeUpstreamError:()=>U,qlexProviderMeta:()=>N,omniqueryBaseUrl:()=>O,mergeLiveTiers:()=>b,mergeLiveTierRatings:()=>h,evaluatePermission:()=>M,copy:()=>d,bashPrefixWith:()=>B,TIER_RATINGS:()=>$,AGENT_PROMPT_NAMES:()=>k});function b(x){V(x)}function h(x){D(x)}function p(){return Object.entries(W).map(([x,j])=>({id:x,label:Z[x]??x,providerID:j.providerID,modelID:j.modelID}))}function m(){return $}function M(x,j,...H){return H.flat().findLast((C)=>q(x,C.permission)&&q(j,C.pattern))??{action:"ask",permission:x,pattern:"*"}}function B(x,j){for(let H=j.length;H>0;H--){let K=j.slice(0,H).join(" "),J=x[K];if(J!==void 0)return j.slice(0,J)}if(j.length===0)return[];return j.slice(0,1)}function w(){return c}function G(){return f}function O(){return P}function N(){return Y}function U(x){return y(x)}function d(){return F}var k=["generate","explore","dream","distill","summary","compaction","title"];export{W as rt,Q as st};
@@ -1,2 +1,2 @@
1
1
  // @bun
2
- import"./chunk-kdcnder5.js";import"./chunk-yjj4cvqg.js";var e={"ui.sessionReview.title":"\u4F1A\u8BDD\u53D8\u66F4","ui.sessionReview.title.lastTurn":"\u4E0A\u4E00\u8F6E\u53D8\u66F4","ui.sessionReview.diffStyle.unified":"\u7EDF\u4E00","ui.sessionReview.diffStyle.split":"\u62C6\u5206","ui.sessionReview.openFile":"\u6253\u5F00\u6587\u4EF6","ui.sessionReview.selection.line":"\u7B2C {{line}} \u884C","ui.sessionReview.selection.lines":"\u7B2C {{start}}-{{end}} \u884C","ui.sessionReview.expandAll":"\u5168\u90E8\u5C55\u5F00","ui.sessionReview.collapseAll":"\u5168\u90E8\u6536\u8D77","ui.sessionReview.change.added":"\u5DF2\u6DFB\u52A0","ui.sessionReview.change.removed":"\u5DF2\u79FB\u9664","ui.sessionReview.change.modified":"\u5DF2\u4FEE\u6539","ui.sessionReview.image.loading":"\u52A0\u8F7D\u4E2D...","ui.sessionReview.image.placeholder":"\u56FE\u7247","ui.sessionReview.largeDiff.title":"\u5DEE\u5F02\u8FC7\u5927\uFF0C\u65E0\u6CD5\u6E32\u67D3","ui.sessionReview.largeDiff.meta":"\u9650\u5236\uFF1A{{limit}} \u884C\u53D8\u66F4\u3002\u5F53\u524D\uFF1A{{current}} \u884C\u53D8\u66F4\u3002","ui.sessionReview.largeDiff.renderAnyway":"\u4ECD\u7136\u6E32\u67D3","ui.fileMedia.kind.image":"\u56FE\u7247","ui.fileMedia.kind.audio":"\u97F3\u9891","ui.fileMedia.state.removed":"{{kind}}\u5DF2\u79FB\u9664","ui.fileMedia.state.loading":"\u6B63\u5728\u52A0\u8F7D{{kind}}...","ui.fileMedia.state.error":"\u52A0\u8F7D{{kind}}\u5931\u8D25","ui.fileMedia.state.unavailable":"{{kind}}\u4E0D\u53EF\u9884\u89C8","ui.fileMedia.binary.title":"\u4E8C\u8FDB\u5236\u6587\u4EF6","ui.fileMedia.binary.description.path":"\u65E0\u6CD5\u663E\u793A {{path}}\uFF0C\u56E0\u4E3A\u5B83\u662F\u4E8C\u8FDB\u5236\u6587\u4EF6\u3002","ui.fileMedia.binary.description.default":"\u65E0\u6CD5\u663E\u793A\u6B64\u6587\u4EF6\uFF0C\u56E0\u4E3A\u5B83\u662F\u4E8C\u8FDB\u5236\u6587\u4EF6\u3002","ui.lineComment.label.prefix":"\u8BC4\u8BBA ","ui.lineComment.label.suffix":"","ui.lineComment.editorLabel.prefix":"\u6B63\u5728\u8BC4\u8BBA ","ui.lineComment.editorLabel.suffix":"","ui.lineComment.placeholder":"\u6DFB\u52A0\u8BC4\u8BBA","ui.lineComment.submit":"\u8BC4\u8BBA","ui.sessionTurn.steps.show":"\u663E\u793A\u6B65\u9AA4","ui.sessionTurn.steps.hide":"\u9690\u85CF\u6B65\u9AA4","ui.sessionTurn.summary.response":"\u56DE\u590D","ui.sessionTurn.diff.showMore":"\u663E\u793A\u66F4\u591A\u66F4\u6539\uFF08{{count}}\uFF09","ui.sessionTurn.retry.retrying":"\u91CD\u8BD5\u4E2D","ui.sessionTurn.retry.inSeconds":"{{seconds}} \u79D2\u540E","ui.sessionTurn.retry.attempt":"\u7B2C {{attempt}} \u6B21","ui.sessionTurn.retry.attemptLine":"{{line}} - \u7B2C {{attempt}} \u6B21","ui.sessionTurn.retry.geminiHot":"gemini \u5F53\u524D\u8FC7\u8F7D","ui.sessionTurn.error.freeUsageExceeded":"\u514D\u8D39\u4F7F\u7528\u989D\u5EA6\u5DF2\u7528\u5B8C","ui.sessionTurn.error.addQredits":"\u6DFB\u52A0\u79EF\u5206","ui.sessionTurn.status.delegating":"\u6B63\u5728\u59D4\u6D3E\u5DE5\u4F5C","ui.sessionTurn.status.planning":"\u6B63\u5728\u89C4\u5212\u4E0B\u4E00\u6B65","ui.sessionTurn.status.gatheringContext":"\u6B63\u5728\u63A2\u7D22","ui.sessionTurn.status.gatheredContext":"\u5DF2\u63A2\u7D22","ui.sessionTurn.status.searchingCodebase":"\u6B63\u5728\u641C\u7D22\u4EE3\u7801\u5E93","ui.sessionTurn.status.searchingWeb":"\u6B63\u5728\u641C\u7D22\u7F51\u9875","ui.sessionTurn.status.makingEdits":"\u6B63\u5728\u4FEE\u6539","ui.sessionTurn.status.runningCommands":"\u6B63\u5728\u8FD0\u884C\u547D\u4EE4","ui.sessionTurn.status.thinking":"\u601D\u8003\u4E2D","ui.sessionTurn.status.thinkingWithTopic":"\u601D\u8003\uFF1A{{topic}}","ui.sessionTurn.status.gatheringThoughts":"\u6B63\u5728\u6574\u7406\u601D\u8DEF","ui.sessionTurn.status.consideringNextSteps":"\u6B63\u5728\u8003\u8651\u4E0B\u4E00\u6B65","ui.messagePart.questions.dismissed":"\u95EE\u9898\u5DF2\u5FFD\u7565","ui.messagePart.compaction":"\u4F1A\u8BDD\u5DF2\u538B\u7F29","ui.messagePart.context.read.one":"{{count}} \u6B21\u8BFB\u53D6","ui.messagePart.context.read.other":"{{count}} \u6B21\u8BFB\u53D6","ui.messagePart.context.search.one":"{{count}} \u6B21\u641C\u7D22","ui.messagePart.context.search.other":"{{count}} \u6B21\u641C\u7D22","ui.messagePart.context.list.one":"{{count}} \u4E2A\u5217\u8868","ui.messagePart.context.list.other":"{{count}} \u4E2A\u5217\u8868","ui.messagePart.diagnostic.error":"\u9519\u8BEF","ui.messagePart.title.edit":"\u7F16\u8F91","ui.messagePart.title.write":"\u5199\u5165","ui.messagePart.option.typeOwnAnswer":"\u8F93\u5165\u81EA\u5DF1\u7684\u7B54\u6848","ui.messagePart.review.title":"\u68C0\u67E5\u4F60\u7684\u7B54\u6848","ui.list.loading":"\u52A0\u8F7D\u4E2D","ui.list.empty":"\u65E0\u7ED3\u679C","ui.list.clearFilter":"\u6E05\u9664\u7B5B\u9009","ui.list.emptyWithFilter.prefix":"\u6CA1\u6709\u5173\u4E8E","ui.list.emptyWithFilter.suffix":"\u7684\u7ED3\u679C","ui.messageNav.newMessage":"\u65B0\u6D88\u606F","ui.textField.copyToClipboard":"\u590D\u5236\u5230\u526A\u8D34\u677F","ui.textField.copyLink":"\u590D\u5236\u94FE\u63A5","ui.textField.copied":"\u5DF2\u590D\u5236","ui.imagePreview.alt":"\u56FE\u7247\u9884\u89C8","ui.scrollView.ariaLabel":"\u53EF\u6EDA\u52A8\u5185\u5BB9","ui.tool.read":"\u8BFB\u53D6","ui.tool.loaded":"\u5DF2\u52A0\u8F7D","ui.tool.list":"\u5217\u8868","ui.tool.glob":"Glob","ui.tool.grep":"Grep","ui.tool.webfetch":"Webfetch","ui.tool.websearch":"\u7F51\u7EDC\u641C\u7D22","ui.tool.codesearch":"\u4EE3\u7801\u641C\u7D22","ui.tool.shell":"Shell","ui.tool.patch":"\u8865\u4E01","ui.tool.todos":"\u5F85\u529E","ui.tool.todos.read":"\u8BFB\u53D6\u5F85\u529E","ui.tool.questions":"\u95EE\u9898","ui.tool.agent":"{{type}} \u667A\u80FD\u4F53","ui.tool.agent.default":"\u667A\u80FD\u4F53","ui.common.file.one":"\u4E2A\u6587\u4EF6","ui.common.file.other":"\u4E2A\u6587\u4EF6","ui.common.question.one":"\u4E2A\u95EE\u9898","ui.common.question.other":"\u4E2A\u95EE\u9898","ui.common.add":"\u6DFB\u52A0","ui.common.back":"\u8FD4\u56DE","ui.common.cancel":"\u53D6\u6D88","ui.common.confirm":"\u786E\u8BA4","ui.common.dismiss":"\u5FFD\u7565","ui.common.close":"\u5173\u95ED","ui.common.next":"\u4E0B\u4E00\u6B65","ui.common.submit":"\u63D0\u4EA4","ui.permission.deny":"\u62D2\u7EDD","ui.permission.allowAlways":"\u59CB\u7EC8\u5141\u8BB8","ui.permission.allowOnce":"\u5141\u8BB8\u4E00\u6B21","ui.message.expand":"\u5C55\u5F00\u6D88\u606F","ui.message.collapse":"\u6536\u8D77\u6D88\u606F","ui.message.copy":"\u590D\u5236","ui.message.copyMessage":"\u590D\u5236\u6D88\u606F","ui.message.forkMessage":"\u5206\u53C9\u5230\u65B0\u4F1A\u8BDD","ui.message.revertMessage":"\u91CD\u7F6E\u5230\u6B64\u70B9","ui.message.copyResponse":"\u590D\u5236\u56DE\u590D","ui.message.copied":"\u5DF2\u590D\u5236\uFF01","ui.message.interrupted":"\u5DF2\u4E2D\u65AD","ui.message.queued":"\u6392\u961F\u4E2D","ui.message.attachment.alt":"\u9644\u4EF6","ui.patch.action.deleted":"\u5DF2\u5220\u9664","ui.patch.action.created":"\u5DF2\u521B\u5EFA","ui.patch.action.moved":"\u5DF2\u79FB\u52A8","ui.patch.action.patched":"\u5DF2\u5E94\u7528\u8865\u4E01","ui.question.subtitle.answered":"{{count}} \u5DF2\u56DE\u7B54","ui.question.answer.none":"(\u65E0\u7B54\u6848)","ui.question.review.notAnswered":"(\u672A\u56DE\u7B54)","ui.question.multiHint":"\u53EF\u591A\u9009","ui.question.singleHint":"\u9009\u62E9\u4E00\u4E2A\u7B54\u6848","ui.question.custom.placeholder":"\u8F93\u5165\u4F60\u7684\u7B54\u6848...","ui.fileSearch.placeholder":"\u67E5\u627E","ui.fileSearch.previousMatch":"\u4E0A\u4E00\u4E2A","ui.fileSearch.nextMatch":"\u4E0B\u4E00\u4E2A","ui.fileSearch.close":"\u5173\u95ED\u641C\u7D22","ui.tool.task":"\u4EFB\u52A1","ui.tool.skill":"\u6280\u80FD","ui.basicTool.called":"\u8C03\u7528\u4E86 `{{tool}}`","ui.toolErrorCard.failed":"\u5931\u8D25","ui.toolErrorCard.copyError":"\u590D\u5236\u9519\u8BEF","ui.message.duration.seconds":"{{count}}\u79D2","ui.message.duration.minutesSeconds":"{{minutes}}\u5206 {{seconds}}\u79D2"};export{e as dict};
2
+ import"./chunk-kdcnder5.js";import"./chunk-aztre27e.js";var e={"ui.sessionReview.title":"\u4F1A\u8BDD\u53D8\u66F4","ui.sessionReview.title.lastTurn":"\u4E0A\u4E00\u8F6E\u53D8\u66F4","ui.sessionReview.diffStyle.unified":"\u7EDF\u4E00","ui.sessionReview.diffStyle.split":"\u62C6\u5206","ui.sessionReview.openFile":"\u6253\u5F00\u6587\u4EF6","ui.sessionReview.selection.line":"\u7B2C {{line}} \u884C","ui.sessionReview.selection.lines":"\u7B2C {{start}}-{{end}} \u884C","ui.sessionReview.expandAll":"\u5168\u90E8\u5C55\u5F00","ui.sessionReview.collapseAll":"\u5168\u90E8\u6536\u8D77","ui.sessionReview.change.added":"\u5DF2\u6DFB\u52A0","ui.sessionReview.change.removed":"\u5DF2\u79FB\u9664","ui.sessionReview.change.modified":"\u5DF2\u4FEE\u6539","ui.sessionReview.image.loading":"\u52A0\u8F7D\u4E2D...","ui.sessionReview.image.placeholder":"\u56FE\u7247","ui.sessionReview.largeDiff.title":"\u5DEE\u5F02\u8FC7\u5927\uFF0C\u65E0\u6CD5\u6E32\u67D3","ui.sessionReview.largeDiff.meta":"\u9650\u5236\uFF1A{{limit}} \u884C\u53D8\u66F4\u3002\u5F53\u524D\uFF1A{{current}} \u884C\u53D8\u66F4\u3002","ui.sessionReview.largeDiff.renderAnyway":"\u4ECD\u7136\u6E32\u67D3","ui.fileMedia.kind.image":"\u56FE\u7247","ui.fileMedia.kind.audio":"\u97F3\u9891","ui.fileMedia.state.removed":"{{kind}}\u5DF2\u79FB\u9664","ui.fileMedia.state.loading":"\u6B63\u5728\u52A0\u8F7D{{kind}}...","ui.fileMedia.state.error":"\u52A0\u8F7D{{kind}}\u5931\u8D25","ui.fileMedia.state.unavailable":"{{kind}}\u4E0D\u53EF\u9884\u89C8","ui.fileMedia.binary.title":"\u4E8C\u8FDB\u5236\u6587\u4EF6","ui.fileMedia.binary.description.path":"\u65E0\u6CD5\u663E\u793A {{path}}\uFF0C\u56E0\u4E3A\u5B83\u662F\u4E8C\u8FDB\u5236\u6587\u4EF6\u3002","ui.fileMedia.binary.description.default":"\u65E0\u6CD5\u663E\u793A\u6B64\u6587\u4EF6\uFF0C\u56E0\u4E3A\u5B83\u662F\u4E8C\u8FDB\u5236\u6587\u4EF6\u3002","ui.lineComment.label.prefix":"\u8BC4\u8BBA ","ui.lineComment.label.suffix":"","ui.lineComment.editorLabel.prefix":"\u6B63\u5728\u8BC4\u8BBA ","ui.lineComment.editorLabel.suffix":"","ui.lineComment.placeholder":"\u6DFB\u52A0\u8BC4\u8BBA","ui.lineComment.submit":"\u8BC4\u8BBA","ui.sessionTurn.steps.show":"\u663E\u793A\u6B65\u9AA4","ui.sessionTurn.steps.hide":"\u9690\u85CF\u6B65\u9AA4","ui.sessionTurn.summary.response":"\u56DE\u590D","ui.sessionTurn.diff.showMore":"\u663E\u793A\u66F4\u591A\u66F4\u6539\uFF08{{count}}\uFF09","ui.sessionTurn.retry.retrying":"\u91CD\u8BD5\u4E2D","ui.sessionTurn.retry.inSeconds":"{{seconds}} \u79D2\u540E","ui.sessionTurn.retry.attempt":"\u7B2C {{attempt}} \u6B21","ui.sessionTurn.retry.attemptLine":"{{line}} - \u7B2C {{attempt}} \u6B21","ui.sessionTurn.retry.geminiHot":"gemini \u5F53\u524D\u8FC7\u8F7D","ui.sessionTurn.error.freeUsageExceeded":"\u514D\u8D39\u4F7F\u7528\u989D\u5EA6\u5DF2\u7528\u5B8C","ui.sessionTurn.error.addQredits":"\u6DFB\u52A0\u79EF\u5206","ui.sessionTurn.status.delegating":"\u6B63\u5728\u59D4\u6D3E\u5DE5\u4F5C","ui.sessionTurn.status.planning":"\u6B63\u5728\u89C4\u5212\u4E0B\u4E00\u6B65","ui.sessionTurn.status.gatheringContext":"\u6B63\u5728\u63A2\u7D22","ui.sessionTurn.status.gatheredContext":"\u5DF2\u63A2\u7D22","ui.sessionTurn.status.searchingCodebase":"\u6B63\u5728\u641C\u7D22\u4EE3\u7801\u5E93","ui.sessionTurn.status.searchingWeb":"\u6B63\u5728\u641C\u7D22\u7F51\u9875","ui.sessionTurn.status.makingEdits":"\u6B63\u5728\u4FEE\u6539","ui.sessionTurn.status.runningCommands":"\u6B63\u5728\u8FD0\u884C\u547D\u4EE4","ui.sessionTurn.status.thinking":"\u601D\u8003\u4E2D","ui.sessionTurn.status.thinkingWithTopic":"\u601D\u8003\uFF1A{{topic}}","ui.sessionTurn.status.gatheringThoughts":"\u6B63\u5728\u6574\u7406\u601D\u8DEF","ui.sessionTurn.status.consideringNextSteps":"\u6B63\u5728\u8003\u8651\u4E0B\u4E00\u6B65","ui.messagePart.questions.dismissed":"\u95EE\u9898\u5DF2\u5FFD\u7565","ui.messagePart.compaction":"\u4F1A\u8BDD\u5DF2\u538B\u7F29","ui.messagePart.context.read.one":"{{count}} \u6B21\u8BFB\u53D6","ui.messagePart.context.read.other":"{{count}} \u6B21\u8BFB\u53D6","ui.messagePart.context.search.one":"{{count}} \u6B21\u641C\u7D22","ui.messagePart.context.search.other":"{{count}} \u6B21\u641C\u7D22","ui.messagePart.context.list.one":"{{count}} \u4E2A\u5217\u8868","ui.messagePart.context.list.other":"{{count}} \u4E2A\u5217\u8868","ui.messagePart.diagnostic.error":"\u9519\u8BEF","ui.messagePart.title.edit":"\u7F16\u8F91","ui.messagePart.title.write":"\u5199\u5165","ui.messagePart.option.typeOwnAnswer":"\u8F93\u5165\u81EA\u5DF1\u7684\u7B54\u6848","ui.messagePart.review.title":"\u68C0\u67E5\u4F60\u7684\u7B54\u6848","ui.list.loading":"\u52A0\u8F7D\u4E2D","ui.list.empty":"\u65E0\u7ED3\u679C","ui.list.clearFilter":"\u6E05\u9664\u7B5B\u9009","ui.list.emptyWithFilter.prefix":"\u6CA1\u6709\u5173\u4E8E","ui.list.emptyWithFilter.suffix":"\u7684\u7ED3\u679C","ui.messageNav.newMessage":"\u65B0\u6D88\u606F","ui.textField.copyToClipboard":"\u590D\u5236\u5230\u526A\u8D34\u677F","ui.textField.copyLink":"\u590D\u5236\u94FE\u63A5","ui.textField.copied":"\u5DF2\u590D\u5236","ui.imagePreview.alt":"\u56FE\u7247\u9884\u89C8","ui.scrollView.ariaLabel":"\u53EF\u6EDA\u52A8\u5185\u5BB9","ui.tool.read":"\u8BFB\u53D6","ui.tool.loaded":"\u5DF2\u52A0\u8F7D","ui.tool.list":"\u5217\u8868","ui.tool.glob":"Glob","ui.tool.grep":"Grep","ui.tool.webfetch":"Webfetch","ui.tool.websearch":"\u7F51\u7EDC\u641C\u7D22","ui.tool.codesearch":"\u4EE3\u7801\u641C\u7D22","ui.tool.shell":"Shell","ui.tool.patch":"\u8865\u4E01","ui.tool.todos":"\u5F85\u529E","ui.tool.todos.read":"\u8BFB\u53D6\u5F85\u529E","ui.tool.questions":"\u95EE\u9898","ui.tool.agent":"{{type}} \u667A\u80FD\u4F53","ui.tool.agent.default":"\u667A\u80FD\u4F53","ui.common.file.one":"\u4E2A\u6587\u4EF6","ui.common.file.other":"\u4E2A\u6587\u4EF6","ui.common.question.one":"\u4E2A\u95EE\u9898","ui.common.question.other":"\u4E2A\u95EE\u9898","ui.common.add":"\u6DFB\u52A0","ui.common.back":"\u8FD4\u56DE","ui.common.cancel":"\u53D6\u6D88","ui.common.confirm":"\u786E\u8BA4","ui.common.dismiss":"\u5FFD\u7565","ui.common.close":"\u5173\u95ED","ui.common.next":"\u4E0B\u4E00\u6B65","ui.common.submit":"\u63D0\u4EA4","ui.permission.deny":"\u62D2\u7EDD","ui.permission.allowAlways":"\u59CB\u7EC8\u5141\u8BB8","ui.permission.allowOnce":"\u5141\u8BB8\u4E00\u6B21","ui.message.expand":"\u5C55\u5F00\u6D88\u606F","ui.message.collapse":"\u6536\u8D77\u6D88\u606F","ui.message.copy":"\u590D\u5236","ui.message.copyMessage":"\u590D\u5236\u6D88\u606F","ui.message.forkMessage":"\u5206\u53C9\u5230\u65B0\u4F1A\u8BDD","ui.message.revertMessage":"\u91CD\u7F6E\u5230\u6B64\u70B9","ui.message.copyResponse":"\u590D\u5236\u56DE\u590D","ui.message.copied":"\u5DF2\u590D\u5236\uFF01","ui.message.interrupted":"\u5DF2\u4E2D\u65AD","ui.message.queued":"\u6392\u961F\u4E2D","ui.message.attachment.alt":"\u9644\u4EF6","ui.patch.action.deleted":"\u5DF2\u5220\u9664","ui.patch.action.created":"\u5DF2\u521B\u5EFA","ui.patch.action.moved":"\u5DF2\u79FB\u52A8","ui.patch.action.patched":"\u5DF2\u5E94\u7528\u8865\u4E01","ui.question.subtitle.answered":"{{count}} \u5DF2\u56DE\u7B54","ui.question.answer.none":"(\u65E0\u7B54\u6848)","ui.question.review.notAnswered":"(\u672A\u56DE\u7B54)","ui.question.multiHint":"\u53EF\u591A\u9009","ui.question.singleHint":"\u9009\u62E9\u4E00\u4E2A\u7B54\u6848","ui.question.custom.placeholder":"\u8F93\u5165\u4F60\u7684\u7B54\u6848...","ui.fileSearch.placeholder":"\u67E5\u627E","ui.fileSearch.previousMatch":"\u4E0A\u4E00\u4E2A","ui.fileSearch.nextMatch":"\u4E0B\u4E00\u4E2A","ui.fileSearch.close":"\u5173\u95ED\u641C\u7D22","ui.tool.task":"\u4EFB\u52A1","ui.tool.skill":"\u6280\u80FD","ui.basicTool.called":"\u8C03\u7528\u4E86 `{{tool}}`","ui.toolErrorCard.failed":"\u5931\u8D25","ui.toolErrorCard.copyError":"\u590D\u5236\u9519\u8BEF","ui.message.duration.seconds":"{{count}}\u79D2","ui.message.duration.minutesSeconds":"{{minutes}}\u5206 {{seconds}}\u79D2"};export{e as dict};
@@ -1,2 +1,2 @@
1
1
  // @bun
2
- import"./chunk-kdcnder5.js";import"./chunk-yjj4cvqg.js";var e={"ui.sessionReview.title":"Oturum de\u011Fi\u015Fiklikleri","ui.sessionReview.title.lastTurn":"Son tur de\u011Fi\u015Fiklikleri","ui.sessionReview.diffStyle.unified":"Birle\u015Fik","ui.sessionReview.diffStyle.split":"B\xF6l\xFCnm\xFC\u015F","ui.sessionReview.openFile":"Dosyay\u0131 a\xE7","ui.sessionReview.selection.line":"sat\u0131r {{line}}","ui.sessionReview.selection.lines":"sat\u0131rlar {{start}}-{{end}}","ui.sessionReview.expandAll":"T\xFCm\xFCn\xFC geni\u015Flet","ui.sessionReview.collapseAll":"T\xFCm\xFCn\xFC daralt","ui.sessionReview.change.added":"Eklendi","ui.sessionReview.change.removed":"Kald\u0131r\u0131ld\u0131","ui.sessionReview.change.modified":"De\u011Fi\u015Ftirildi","ui.sessionReview.image.loading":"Y\xFCkleniyor...","ui.sessionReview.image.placeholder":"G\xF6rsel","ui.sessionReview.largeDiff.title":"Fark g\xF6sterimi i\xE7in \xE7ok b\xFCy\xFCk","ui.sessionReview.largeDiff.meta":"Limit: {{limit}} de\u011Fi\u015Fen sat\u0131r. Mevcut: {{current}} de\u011Fi\u015Fen sat\u0131r.","ui.sessionReview.largeDiff.renderAnyway":"Yine de g\xF6ster","ui.fileMedia.kind.image":"g\xF6rsel","ui.fileMedia.kind.audio":"ses","ui.fileMedia.state.removed":"{{kind}} dosyas\u0131 kald\u0131r\u0131ld\u0131.","ui.fileMedia.state.loading":"{{kind}} y\xFCkleniyor...","ui.fileMedia.state.error":"{{kind}} y\xFCklenemedi.","ui.fileMedia.state.unavailable":"{{kind}} \xF6nizlemesi kullan\u0131lam\u0131yor.","ui.fileMedia.binary.title":"\u0130kili dosya","ui.fileMedia.binary.description.path":"{{path}} ikili dosyad\u0131r.","ui.fileMedia.binary.description.default":"\u0130kili i\xE7erik","ui.lineComment.label.prefix":"Yorum: ","ui.lineComment.label.suffix":"","ui.lineComment.editorLabel.prefix":"Yorum yap\u0131l\u0131yor: ","ui.lineComment.editorLabel.suffix":"","ui.lineComment.placeholder":"Yorum ekle","ui.lineComment.submit":"Yorum yap","ui.sessionTurn.steps.show":"Ad\u0131mlar\u0131 g\xF6ster","ui.sessionTurn.steps.hide":"Ad\u0131mlar\u0131 gizle","ui.sessionTurn.summary.response":"Yan\u0131t","ui.sessionTurn.diff.showMore":"Daha fazla de\u011Fi\u015Fiklik g\xF6ster ({{count}})","ui.sessionTurn.retry.retrying":"yeniden deneniyor","ui.sessionTurn.retry.inSeconds":"{{seconds}}sn i\xE7inde","ui.sessionTurn.retry.attempt":"deneme #{{attempt}}","ui.sessionTurn.retry.attemptLine":"{{line}} - deneme #{{attempt}}","ui.sessionTurn.retry.geminiHot":"gemini \u015Fu anda a\u015F\u0131r\u0131 yo\u011Fun","ui.sessionTurn.error.freeUsageExceeded":"\xDCcretsiz kullan\u0131m a\u015F\u0131ld\u0131","ui.sessionTurn.error.addQredits":"Kredi ekle","ui.sessionTurn.status.delegating":"G\xF6rev devrediliyor","ui.sessionTurn.status.planning":"Sonraki ad\u0131mlar planlan\u0131yor","ui.sessionTurn.status.gatheringContext":"Ke\u015Ffediliyor","ui.sessionTurn.status.gatheredContext":"Ke\u015Ffedildi","ui.sessionTurn.status.searchingCodebase":"Kod taban\u0131 aran\u0131yor","ui.sessionTurn.status.searchingWeb":"Web aran\u0131yor","ui.sessionTurn.status.makingEdits":"D\xFCzenlemeler yap\u0131l\u0131yor","ui.sessionTurn.status.runningCommands":"Komutlar \xE7al\u0131\u015Ft\u0131r\u0131l\u0131yor","ui.sessionTurn.status.thinking":"D\xFC\u015F\xFCn\xFCyor","ui.sessionTurn.status.thinkingWithTopic":"D\xFC\u015F\xFCn\xFCyor - {{topic}}","ui.sessionTurn.status.gatheringThoughts":"D\xFC\u015F\xFCnceler toplan\u0131yor","ui.sessionTurn.status.consideringNextSteps":"Sonraki ad\u0131mlar de\u011Ferlendiriliyor","ui.messagePart.questions.dismissed":"Sorular reddedildi","ui.messagePart.compaction":"Oturum s\u0131k\u0131\u015Ft\u0131r\u0131ld\u0131","ui.messagePart.context.read.one":"{{count}} okuma","ui.messagePart.context.read.other":"{{count}} okuma","ui.messagePart.context.search.one":"{{count}} arama","ui.messagePart.context.search.other":"{{count}} arama","ui.messagePart.context.list.one":"{{count}} liste","ui.messagePart.context.list.other":"{{count}} liste","ui.messagePart.diagnostic.error":"Hata","ui.messagePart.title.edit":"D\xFCzenle","ui.messagePart.title.write":"Yaz","ui.messagePart.option.typeOwnAnswer":"Kendi cevab\u0131n\u0131z\u0131 yaz\u0131n","ui.messagePart.review.title":"Cevaplar\u0131 inceleyin","ui.list.loading":"Y\xFCkleniyor","ui.list.empty":"Sonu\xE7 bulunamad\u0131","ui.list.clearFilter":"Filtreyi temizle","ui.list.emptyWithFilter.prefix":"Sonu\xE7 bulunamad\u0131:","ui.list.emptyWithFilter.suffix":"","ui.messageNav.newMessage":"Yeni mesaj","ui.textField.copyToClipboard":"Panoya kopyala","ui.textField.copyLink":"Ba\u011Flant\u0131 kopyala","ui.textField.copied":"Kopyaland\u0131","ui.imagePreview.alt":"G\xF6rsel \xF6nizleme","ui.scrollView.ariaLabel":"kayd\u0131r\u0131labilir i\xE7erik","ui.tool.read":"Oku","ui.tool.loaded":"Y\xFCklendi","ui.tool.list":"Listele","ui.tool.glob":"Glob","ui.tool.grep":"Grep","ui.tool.webfetch":"Web getir","ui.tool.websearch":"Web Aramas\u0131","ui.tool.codesearch":"Kod Aramas\u0131","ui.tool.shell":"Kabuk","ui.tool.patch":"Yama","ui.tool.todos":"G\xF6revler","ui.tool.todos.read":"G\xF6revleri oku","ui.tool.questions":"Sorular","ui.tool.agent":"{{type}} Ajan","ui.tool.agent.default":"Ajan","ui.common.file.one":"dosya","ui.common.file.other":"dosya","ui.common.question.one":"soru","ui.common.question.other":"soru","ui.common.add":"Ekle","ui.common.back":"Geri","ui.common.cancel":"\u0130ptal","ui.common.confirm":"Onayla","ui.common.dismiss":"Kapat","ui.common.close":"Kapat","ui.common.next":"\u0130leri","ui.common.submit":"G\xF6nder","ui.permission.deny":"Reddet","ui.permission.allowAlways":"Her zaman izin ver","ui.permission.allowOnce":"Bir kez izin ver","ui.message.expand":"Mesaj\u0131 geni\u015Flet","ui.message.collapse":"Mesaj\u0131 daralt","ui.message.copy":"Kopyala","ui.message.copyMessage":"Mesaj\u0131 kopyala","ui.message.forkMessage":"Yeni oturuma dalland\u0131r","ui.message.revertMessage":"Bu noktaya s\u0131f\u0131rla","ui.message.copyResponse":"Yan\u0131t\u0131 kopyala","ui.message.copied":"Kopyaland\u0131","ui.message.interrupted":"Kesildi","ui.message.queued":"S\u0131rada","ui.message.attachment.alt":"ek","ui.patch.action.deleted":"Silindi","ui.patch.action.created":"Olu\u015Fturuldu","ui.patch.action.moved":"Ta\u015F\u0131nd\u0131","ui.patch.action.patched":"Yamaland\u0131","ui.question.subtitle.answered":"{{count}} cevapland\u0131","ui.question.answer.none":"(cevap yok)","ui.question.review.notAnswered":"(cevaplanmad\u0131)","ui.question.multiHint":"Ge\xE7erli t\xFCm cevaplar\u0131 se\xE7in","ui.question.singleHint":"Bir cevap se\xE7in","ui.question.custom.placeholder":"Cevab\u0131n\u0131z\u0131 yaz\u0131n...","ui.fileSearch.placeholder":"Bul","ui.fileSearch.previousMatch":"\xD6nceki","ui.fileSearch.nextMatch":"Sonraki","ui.fileSearch.close":"Aramay\u0131 kapat","ui.tool.task":"G\xF6rev","ui.tool.skill":"Yetenek","ui.basicTool.called":"`{{tool}}` \xE7a\u011Fr\u0131ld\u0131","ui.toolErrorCard.failed":"Ba\u015Far\u0131s\u0131z","ui.toolErrorCard.copyError":"Hatay\u0131 kopyala","ui.message.duration.seconds":"{{count}}sn","ui.message.duration.minutesSeconds":"{{minutes}}dk {{seconds}}sn"};export{e as dict};
2
+ import"./chunk-kdcnder5.js";import"./chunk-aztre27e.js";var e={"ui.sessionReview.title":"Oturum de\u011Fi\u015Fiklikleri","ui.sessionReview.title.lastTurn":"Son tur de\u011Fi\u015Fiklikleri","ui.sessionReview.diffStyle.unified":"Birle\u015Fik","ui.sessionReview.diffStyle.split":"B\xF6l\xFCnm\xFC\u015F","ui.sessionReview.openFile":"Dosyay\u0131 a\xE7","ui.sessionReview.selection.line":"sat\u0131r {{line}}","ui.sessionReview.selection.lines":"sat\u0131rlar {{start}}-{{end}}","ui.sessionReview.expandAll":"T\xFCm\xFCn\xFC geni\u015Flet","ui.sessionReview.collapseAll":"T\xFCm\xFCn\xFC daralt","ui.sessionReview.change.added":"Eklendi","ui.sessionReview.change.removed":"Kald\u0131r\u0131ld\u0131","ui.sessionReview.change.modified":"De\u011Fi\u015Ftirildi","ui.sessionReview.image.loading":"Y\xFCkleniyor...","ui.sessionReview.image.placeholder":"G\xF6rsel","ui.sessionReview.largeDiff.title":"Fark g\xF6sterimi i\xE7in \xE7ok b\xFCy\xFCk","ui.sessionReview.largeDiff.meta":"Limit: {{limit}} de\u011Fi\u015Fen sat\u0131r. Mevcut: {{current}} de\u011Fi\u015Fen sat\u0131r.","ui.sessionReview.largeDiff.renderAnyway":"Yine de g\xF6ster","ui.fileMedia.kind.image":"g\xF6rsel","ui.fileMedia.kind.audio":"ses","ui.fileMedia.state.removed":"{{kind}} dosyas\u0131 kald\u0131r\u0131ld\u0131.","ui.fileMedia.state.loading":"{{kind}} y\xFCkleniyor...","ui.fileMedia.state.error":"{{kind}} y\xFCklenemedi.","ui.fileMedia.state.unavailable":"{{kind}} \xF6nizlemesi kullan\u0131lam\u0131yor.","ui.fileMedia.binary.title":"\u0130kili dosya","ui.fileMedia.binary.description.path":"{{path}} ikili dosyad\u0131r.","ui.fileMedia.binary.description.default":"\u0130kili i\xE7erik","ui.lineComment.label.prefix":"Yorum: ","ui.lineComment.label.suffix":"","ui.lineComment.editorLabel.prefix":"Yorum yap\u0131l\u0131yor: ","ui.lineComment.editorLabel.suffix":"","ui.lineComment.placeholder":"Yorum ekle","ui.lineComment.submit":"Yorum yap","ui.sessionTurn.steps.show":"Ad\u0131mlar\u0131 g\xF6ster","ui.sessionTurn.steps.hide":"Ad\u0131mlar\u0131 gizle","ui.sessionTurn.summary.response":"Yan\u0131t","ui.sessionTurn.diff.showMore":"Daha fazla de\u011Fi\u015Fiklik g\xF6ster ({{count}})","ui.sessionTurn.retry.retrying":"yeniden deneniyor","ui.sessionTurn.retry.inSeconds":"{{seconds}}sn i\xE7inde","ui.sessionTurn.retry.attempt":"deneme #{{attempt}}","ui.sessionTurn.retry.attemptLine":"{{line}} - deneme #{{attempt}}","ui.sessionTurn.retry.geminiHot":"gemini \u015Fu anda a\u015F\u0131r\u0131 yo\u011Fun","ui.sessionTurn.error.freeUsageExceeded":"\xDCcretsiz kullan\u0131m a\u015F\u0131ld\u0131","ui.sessionTurn.error.addQredits":"Kredi ekle","ui.sessionTurn.status.delegating":"G\xF6rev devrediliyor","ui.sessionTurn.status.planning":"Sonraki ad\u0131mlar planlan\u0131yor","ui.sessionTurn.status.gatheringContext":"Ke\u015Ffediliyor","ui.sessionTurn.status.gatheredContext":"Ke\u015Ffedildi","ui.sessionTurn.status.searchingCodebase":"Kod taban\u0131 aran\u0131yor","ui.sessionTurn.status.searchingWeb":"Web aran\u0131yor","ui.sessionTurn.status.makingEdits":"D\xFCzenlemeler yap\u0131l\u0131yor","ui.sessionTurn.status.runningCommands":"Komutlar \xE7al\u0131\u015Ft\u0131r\u0131l\u0131yor","ui.sessionTurn.status.thinking":"D\xFC\u015F\xFCn\xFCyor","ui.sessionTurn.status.thinkingWithTopic":"D\xFC\u015F\xFCn\xFCyor - {{topic}}","ui.sessionTurn.status.gatheringThoughts":"D\xFC\u015F\xFCnceler toplan\u0131yor","ui.sessionTurn.status.consideringNextSteps":"Sonraki ad\u0131mlar de\u011Ferlendiriliyor","ui.messagePart.questions.dismissed":"Sorular reddedildi","ui.messagePart.compaction":"Oturum s\u0131k\u0131\u015Ft\u0131r\u0131ld\u0131","ui.messagePart.context.read.one":"{{count}} okuma","ui.messagePart.context.read.other":"{{count}} okuma","ui.messagePart.context.search.one":"{{count}} arama","ui.messagePart.context.search.other":"{{count}} arama","ui.messagePart.context.list.one":"{{count}} liste","ui.messagePart.context.list.other":"{{count}} liste","ui.messagePart.diagnostic.error":"Hata","ui.messagePart.title.edit":"D\xFCzenle","ui.messagePart.title.write":"Yaz","ui.messagePart.option.typeOwnAnswer":"Kendi cevab\u0131n\u0131z\u0131 yaz\u0131n","ui.messagePart.review.title":"Cevaplar\u0131 inceleyin","ui.list.loading":"Y\xFCkleniyor","ui.list.empty":"Sonu\xE7 bulunamad\u0131","ui.list.clearFilter":"Filtreyi temizle","ui.list.emptyWithFilter.prefix":"Sonu\xE7 bulunamad\u0131:","ui.list.emptyWithFilter.suffix":"","ui.messageNav.newMessage":"Yeni mesaj","ui.textField.copyToClipboard":"Panoya kopyala","ui.textField.copyLink":"Ba\u011Flant\u0131 kopyala","ui.textField.copied":"Kopyaland\u0131","ui.imagePreview.alt":"G\xF6rsel \xF6nizleme","ui.scrollView.ariaLabel":"kayd\u0131r\u0131labilir i\xE7erik","ui.tool.read":"Oku","ui.tool.loaded":"Y\xFCklendi","ui.tool.list":"Listele","ui.tool.glob":"Glob","ui.tool.grep":"Grep","ui.tool.webfetch":"Web getir","ui.tool.websearch":"Web Aramas\u0131","ui.tool.codesearch":"Kod Aramas\u0131","ui.tool.shell":"Kabuk","ui.tool.patch":"Yama","ui.tool.todos":"G\xF6revler","ui.tool.todos.read":"G\xF6revleri oku","ui.tool.questions":"Sorular","ui.tool.agent":"{{type}} Ajan","ui.tool.agent.default":"Ajan","ui.common.file.one":"dosya","ui.common.file.other":"dosya","ui.common.question.one":"soru","ui.common.question.other":"soru","ui.common.add":"Ekle","ui.common.back":"Geri","ui.common.cancel":"\u0130ptal","ui.common.confirm":"Onayla","ui.common.dismiss":"Kapat","ui.common.close":"Kapat","ui.common.next":"\u0130leri","ui.common.submit":"G\xF6nder","ui.permission.deny":"Reddet","ui.permission.allowAlways":"Her zaman izin ver","ui.permission.allowOnce":"Bir kez izin ver","ui.message.expand":"Mesaj\u0131 geni\u015Flet","ui.message.collapse":"Mesaj\u0131 daralt","ui.message.copy":"Kopyala","ui.message.copyMessage":"Mesaj\u0131 kopyala","ui.message.forkMessage":"Yeni oturuma dalland\u0131r","ui.message.revertMessage":"Bu noktaya s\u0131f\u0131rla","ui.message.copyResponse":"Yan\u0131t\u0131 kopyala","ui.message.copied":"Kopyaland\u0131","ui.message.interrupted":"Kesildi","ui.message.queued":"S\u0131rada","ui.message.attachment.alt":"ek","ui.patch.action.deleted":"Silindi","ui.patch.action.created":"Olu\u015Fturuldu","ui.patch.action.moved":"Ta\u015F\u0131nd\u0131","ui.patch.action.patched":"Yamaland\u0131","ui.question.subtitle.answered":"{{count}} cevapland\u0131","ui.question.answer.none":"(cevap yok)","ui.question.review.notAnswered":"(cevaplanmad\u0131)","ui.question.multiHint":"Ge\xE7erli t\xFCm cevaplar\u0131 se\xE7in","ui.question.singleHint":"Bir cevap se\xE7in","ui.question.custom.placeholder":"Cevab\u0131n\u0131z\u0131 yaz\u0131n...","ui.fileSearch.placeholder":"Bul","ui.fileSearch.previousMatch":"\xD6nceki","ui.fileSearch.nextMatch":"Sonraki","ui.fileSearch.close":"Aramay\u0131 kapat","ui.tool.task":"G\xF6rev","ui.tool.skill":"Yetenek","ui.basicTool.called":"`{{tool}}` \xE7a\u011Fr\u0131ld\u0131","ui.toolErrorCard.failed":"Ba\u015Far\u0131s\u0131z","ui.toolErrorCard.copyError":"Hatay\u0131 kopyala","ui.message.duration.seconds":"{{count}}sn","ui.message.duration.minutesSeconds":"{{minutes}}dk {{seconds}}sn"};export{e as dict};
@@ -0,0 +1,2 @@
1
+ // @bun
2
+ import{Hf as a}from"./chunk-61c62e5s.js";import"./chunk-2vepzgek.js";import"./chunk-aztre27e.js";export default a();
@@ -1,3 +1,3 @@
1
1
  // @bun
2
- import{yf as i}from"./chunk-yp3dj4wh.js";import{DO as f}from"./chunk-yjj4cvqg.js";var o=f((e)=>{Object.defineProperty(e,"__esModule",{value:!0});e.fromString=e.fromArrayBuffer=void 0;var n=i();Object.defineProperty(e,"fromArrayBuffer",{enumerable:!0,get:function(){return n.fromArrayBuffer}});Object.defineProperty(e,"fromString",{enumerable:!0,get:function(){return n.fromString}})});var E=f((m)=>{var u=o(),y=(r)=>{let t=u.fromString(r,"utf8");return new Uint8Array(t.buffer,t.byteOffset,t.byteLength/Uint8Array.BYTES_PER_ELEMENT)},b=(r)=>{if(typeof r==="string")return y(r);if(ArrayBuffer.isView(r))return new Uint8Array(r.buffer,r.byteOffset,r.byteLength/Uint8Array.BYTES_PER_ELEMENT);return new Uint8Array(r)},c=(r)=>{if(typeof r==="string")return r;if(typeof r!=="object"||typeof r.byteOffset!=="number"||typeof r.byteLength!=="number")throw Error("@smithy/util-utf8: toUtf8 encoder function only accepts string | Uint8Array.");return u.fromArrayBuffer(r.buffer,r.byteOffset,r.byteLength).toString("utf8")};m.fromUtf8=y;m.toUint8Array=b;m.toUtf8=c});
2
+ import{yf as i}from"./chunk-cvdxgsq1.js";import{aQ as f}from"./chunk-aztre27e.js";var o=f((e)=>{Object.defineProperty(e,"__esModule",{value:!0});e.fromString=e.fromArrayBuffer=void 0;var n=i();Object.defineProperty(e,"fromArrayBuffer",{enumerable:!0,get:function(){return n.fromArrayBuffer}});Object.defineProperty(e,"fromString",{enumerable:!0,get:function(){return n.fromString}})});var E=f((m)=>{var u=o(),y=(r)=>{let t=u.fromString(r,"utf8");return new Uint8Array(t.buffer,t.byteOffset,t.byteLength/Uint8Array.BYTES_PER_ELEMENT)},b=(r)=>{if(typeof r==="string")return y(r);if(ArrayBuffer.isView(r))return new Uint8Array(r.buffer,r.byteOffset,r.byteLength/Uint8Array.BYTES_PER_ELEMENT);return new Uint8Array(r)},c=(r)=>{if(typeof r==="string")return r;if(typeof r!=="object"||typeof r.byteOffset!=="number"||typeof r.byteLength!=="number")throw Error("@smithy/util-utf8: toUtf8 encoder function only accepts string | Uint8Array.");return u.fromArrayBuffer(r.buffer,r.byteOffset,r.byteLength).toString("utf8")};m.fromUtf8=y;m.toUint8Array=b;m.toUtf8=c});
3
3
  export{E as pf};
@@ -1,5 +1,5 @@
1
1
  // @bun
2
- import{Fd as y,Hd as T,Id as t,Jd as O,Kd as l,Md as v,Nd as Q,Od as X,Pd as J}from"./chunk-2p9py4rw.js";import"./chunk-n3t52cz2.js";import{Rd as w}from"./chunk-yajd975f.js";import{Vf as f}from"./chunk-cjfgs1x8.js";import{Ng as Y,Og as mt,Pg as pt,Qg as st,Rg as et,Sg as ft,Tg as E,hh as q}from"./chunk-m2ny1en7.js";import{Eh as Mt}from"./chunk-09j71kp6.js";import"./chunk-js9wdh67.js";import"./chunk-0a0vat1h.js";import"./chunk-z8v2tsz2.js";import"./chunk-j8efst22.js";import"./chunk-8f0g7d7k.js";import"./chunk-abtn6nec.js";import{Dl as F,Xj as nt,bk as L}from"./chunk-d7t0bcvk.js";import"./chunk-7mc8nxve.js";import{lm as $}from"./chunk-dfja6dj6.js";import"./chunk-n34y5gp6.js";import"./chunk-bn0h9dny.js";import"./chunk-q5363rr9.js";import{Kn as P,Ln as h}from"./chunk-7wthn44y.js";import"./chunk-a8p9aggx.js";import"./chunk-0xm85ayc.js";import"./chunk-s2za1n7h.js";import"./chunk-19sa03c1.js";import"./chunk-csdm3n24.js";import"./chunk-xk1nh1ay.js";import"./chunk-bsf6n350.js";import"./chunk-4vze3djr.js";import"./chunk-bzrsnv2k.js";import"./chunk-d0qqgxs4.js";import"./chunk-cqtkxwd8.js";import"./chunk-v00cptj6.js";import"./chunk-1d9f53sk.js";import"./chunk-svrxk3vf.js";import"./chunk-kkae8ead.js";import"./chunk-s6me101a.js";import"./chunk-jwtev7b7.js";import"./chunk-b9nwaaqs.js";import"./chunk-qsszerj7.js";import"./chunk-6jewfaqa.js";import"./chunk-6hdjkvr1.js";import"./chunk-1rn0vmvv.js";import"./chunk-fsy279s5.js";import"./chunk-hn1f6rne.js";import"./chunk-4kpvceap.js";import{Rs as A,Wr as g}from"./chunk-94qmhz2p.js";import{tt as D}from"./chunk-20d0cd1j.js";import"./chunk-yn576pje.js";import"./chunk-b6dsv601.js";import"./chunk-j2zay4da.js";import"./chunk-4vemws1t.js";import"./chunk-yvqbewmc.js";import{qH as a}from"./chunk-t299e2aw.js";import"./chunk-bv8pf0m1.js";import"./chunk-4mrz9b6d.js";import{CO as ut}from"./chunk-yjj4cvqg.js";import W from"path";function G(o){switch(o){case"authenticated":return"\u2713";case"expired":return"\u26A0";case"not_authenticated":return"\u2717"}}function H(o){switch(o){case"authenticated":return"authenticated";case"expired":return"expired";case"not_authenticated":return"not authenticated"}}function N(o){return typeof o==="object"&&o!==null&&"type"in o}function k(o){return N(o)&&o.type==="remote"}function B(o){return Object.entries(o.mcp??{}).filter((e)=>N(e[1]))}function U(o,e){let r=o.mcp_origins?.[e];if(!r)return"qitqode";let i=A.Path.home,m=r.source===i?"~":r.source.startsWith(i+W.sep)?"~"+r.source.slice(i.length):r.source;return`${r.type}:${m}`}function C(o){return B(o).filter((e)=>k(e[1])&&e[1].oauth!==!1)}async function I(){return q.runPromise(a.gen(function*(){let o=yield*F.Service,e=yield*E.Service,r=yield*o.get(),i=yield*e.status(),m=yield*a.all(Object.fromEntries(B(r).map(([p])=>[p,e.hasStoredTokens(p)])),{concurrency:"unbounded"});return{config:r,statuses:i,stored:m}}))}async function S(){return q.runPromise(a.gen(function*(){let o=yield*F.Service,e=yield*E.Service,r=yield*o.get(),i=yield*a.all(Object.fromEntries(C(r).map(([m])=>[m,e.getAuthStatus(m)])),{concurrency:"unbounded"});return{config:r,auth:i}}))}async function V(o,e=!1){let r=[W.join(o,"qitqode.json"),W.join(o,"qitqode.jsonc")];if(!e)r.push(W.join(o,".qitqode","qitqode.json"),W.join(o,".qitqode","qitqode.jsonc"));for(let i of r)if(await D.exists(i))return i;return r[0]}async function R(o,e,r){let i="{}";if(await D.exists(r))i=await D.readText(r);let m=P(i,["mcp",o],e,{formattingOptions:{tabSize:2,insertSpaces:!0}});return await D.write(r,h(i,m)),r}var tt=ut(Mt(),1);function yt(o){let e=tt.parse(o);if(!e.every((r)=>typeof r==="string"))throw Error("Shell operators are not supported; enter only the command and its arguments");if(e.length===0)throw Error("Command is required");return e}var ot=w({command:"add",describe:"add an MCP server",async handler(){await $.provide({directory:process.cwd(),async fn(){f.empty(),O("Add MCP server");let o=$.project,[e,r]=await Promise.all([V($.worktree),V(A.Path.config,!0)]),i=r;if(o.vcs==="git"){let c=await X({message:"Location",options:[{label:"Current project",value:e,hint:e},{label:"Global",value:r,hint:r}]});if(y(c))throw new f.CancelledError;i=c}let m=await J({message:"Enter MCP server name",validate:(c)=>c&&c.length>0?void 0:"Required"});if(y(m))throw new f.CancelledError;let p=await X({message:"Select MCP server type",options:[{label:"Local",value:"local",hint:"Run a local command"},{label:"Remote",value:"remote",hint:"Connect to a remote URL"}]});if(y(p))throw new f.CancelledError;if(p==="local"){let c=await J({message:"Enter command to run",placeholder:"e.g., qode x @modelcontextprotocol/server-filesystem",validate:(s)=>s&&s.length>0?void 0:"Required"});if(y(c))throw new f.CancelledError;let u;try{u=yt(c)}catch(s){t.error(s instanceof Error?s.message:"Invalid command"),l("MCP server was not added");return}await R(m,{type:"local",command:u},i),t.success(`MCP server "${m}" added to ${i}`),l("MCP server added successfully");return}if(p==="remote"){let c=await J({message:"Enter MCP server URL",placeholder:"e.g., https://example.com/mcp",validate:(s)=>{if(!s)return"Required";if(s.length===0)return"Required";return URL.canParse(s)?void 0:"Invalid URL"}});if(y(c))throw new f.CancelledError;let u=await T({message:"Does this server require OAuth authentication?",initialValue:!1});if(y(u))throw new f.CancelledError;let n;if(u){let s=await T({message:"Do you have a pre-registered client ID?",initialValue:!1});if(y(s))throw new f.CancelledError;if(s){let d=await J({message:"Enter client ID",validate:(j)=>j&&j.length>0?void 0:"Required"});if(y(d))throw new f.CancelledError;let M=await T({message:"Do you have a client secret?",initialValue:!1});if(y(M))throw new f.CancelledError;let _;if(M){let j=await v({message:"Enter client secret"});if(y(j))throw new f.CancelledError;_=j}n={type:"remote",url:c,oauth:{clientId:d,..._&&{clientSecret:_}}}}else n={type:"remote",url:c,oauth:{}}}else n={type:"remote",url:c,oauth:!1};await R(m,n,i),t.success(`MCP server "${m}" added to ${i}`)}l("MCP server added successfully")}})}});var it=w({command:"list",aliases:["ls"],describe:"list MCP servers and their status",async handler(){await $.provide({directory:process.cwd(),async fn(){f.empty(),O("MCP Servers");let{config:o,statuses:e,stored:r}=await I(),i=B(o);if(i.length===0){t.warn("No MCP servers configured"),l("Add servers with: qode mcp add");return}for(let[m,p]of i){let c=e[m],u=k(p)&&p.oauth!==!1,n=r[m],s,d,M="";if(!c)s="\u25CB",d="not initialized";else if(c.status==="connected"){if(s="\u2713",d="connected",u&&n)M=" (OAuth)"}else if(c.status==="disabled")s="\u25CB",d="disabled";else if(c.status==="pending")s="\u25CB",d="pending approval";else if(c.status==="needs_auth")s="\u26A0",d="needs authentication";else if(c.status==="needs_client_registration")s="\u2717",d="needs client registration",M=`
2
+ import{Fd as y,Hd as T,Id as t,Jd as O,Kd as l,Md as v,Nd as Q,Od as X,Pd as J}from"./chunk-jje0srjq.js";import"./chunk-27yxgy03.js";import{Rd as w}from"./chunk-yajd975f.js";import{Vf as f}from"./chunk-7ppd2phw.js";import{Ng as Y,Og as mt,Pg as pt,Qg as st,Rg as et,Sg as ft,Tg as E,hh as q}from"./chunk-ddnpx1yx.js";import{Eh as Mt}from"./chunk-wfs4pcwa.js";import"./chunk-p68rwmhc.js";import"./chunk-0a0vat1h.js";import"./chunk-z8v2tsz2.js";import"./chunk-j8efst22.js";import"./chunk-a1pw9r6f.js";import"./chunk-d5bxan80.js";import{Dl as F,Xj as nt,bk as L}from"./chunk-pvpy9kq1.js";import"./chunk-wpajh5s5.js";import{lm as $}from"./chunk-2ec6ps8r.js";import"./chunk-gj3hzx3d.js";import"./chunk-nj4d554m.js";import"./chunk-2gerf08b.js";import{hp as P,ip as h}from"./chunk-fqw4y7x0.js";import"./chunk-a1p2f16h.js";import"./chunk-nt4e3em9.js";import"./chunk-a0v55ywn.js";import"./chunk-v965rsr8.js";import"./chunk-1sgby720.js";import"./chunk-dcvatax2.js";import"./chunk-4tbwha3m.js";import"./chunk-m612agnk.js";import"./chunk-yq3m8190.js";import"./chunk-btz9jvec.js";import"./chunk-cqtkxwd8.js";import"./chunk-fkgv2hqd.js";import"./chunk-zyhdxggp.js";import"./chunk-q6ztpfcs.js";import"./chunk-jm1ptn8n.js";import"./chunk-c5e6sk9c.js";import"./chunk-m02zt1a3.js";import"./chunk-vg2fmyje.js";import"./chunk-sn4nez18.js";import"./chunk-42f7p0hq.js";import"./chunk-4qqkqrn9.js";import"./chunk-j6emx6jn.js";import"./chunk-be216spx.js";import"./chunk-12bssxd4.js";import"./chunk-z8r65yw3.js";import{ou as A,tt as g}from"./chunk-3szwfy7w.js";import{Su as D}from"./chunk-whxjkz9a.js";import"./chunk-89v6dgpp.js";import"./chunk-k309zez0.js";import"./chunk-09kba1hg.js";import"./chunk-t12xrrfr.js";import"./chunk-phxrg7aw.js";import{PI as a}from"./chunk-snm5q21k.js";import"./chunk-xpc2zgj7.js";import"./chunk-qjjch1zt.js";import{$P as ut}from"./chunk-aztre27e.js";import W from"path";function G(o){switch(o){case"authenticated":return"\u2713";case"expired":return"\u26A0";case"not_authenticated":return"\u2717"}}function H(o){switch(o){case"authenticated":return"authenticated";case"expired":return"expired";case"not_authenticated":return"not authenticated"}}function N(o){return typeof o==="object"&&o!==null&&"type"in o}function k(o){return N(o)&&o.type==="remote"}function B(o){return Object.entries(o.mcp??{}).filter((e)=>N(e[1]))}function U(o,e){let r=o.mcp_origins?.[e];if(!r)return"qitqode";let i=A.Path.home,m=r.source===i?"~":r.source.startsWith(i+W.sep)?"~"+r.source.slice(i.length):r.source;return`${r.type}:${m}`}function C(o){return B(o).filter((e)=>k(e[1])&&e[1].oauth!==!1)}async function I(){return q.runPromise(a.gen(function*(){let o=yield*F.Service,e=yield*E.Service,r=yield*o.get(),i=yield*e.status(),m=yield*a.all(Object.fromEntries(B(r).map(([p])=>[p,e.hasStoredTokens(p)])),{concurrency:"unbounded"});return{config:r,statuses:i,stored:m}}))}async function S(){return q.runPromise(a.gen(function*(){let o=yield*F.Service,e=yield*E.Service,r=yield*o.get(),i=yield*a.all(Object.fromEntries(C(r).map(([m])=>[m,e.getAuthStatus(m)])),{concurrency:"unbounded"});return{config:r,auth:i}}))}async function V(o,e=!1){let r=[W.join(o,"qitqode.json"),W.join(o,"qitqode.jsonc")];if(!e)r.push(W.join(o,".qitqode","qitqode.json"),W.join(o,".qitqode","qitqode.jsonc"));for(let i of r)if(await D.exists(i))return i;return r[0]}async function R(o,e,r){let i="{}";if(await D.exists(r))i=await D.readText(r);let m=P(i,["mcp",o],e,{formattingOptions:{tabSize:2,insertSpaces:!0}});return await D.write(r,h(i,m)),r}var tt=ut(Mt(),1);function yt(o){let e=tt.parse(o);if(!e.every((r)=>typeof r==="string"))throw Error("Shell operators are not supported; enter only the command and its arguments");if(e.length===0)throw Error("Command is required");return e}var ot=w({command:"add",describe:"add an MCP server",async handler(){await $.provide({directory:process.cwd(),async fn(){f.empty(),O("Add MCP server");let o=$.project,[e,r]=await Promise.all([V($.worktree),V(A.Path.config,!0)]),i=r;if(o.vcs==="git"){let c=await X({message:"Location",options:[{label:"Current project",value:e,hint:e},{label:"Global",value:r,hint:r}]});if(y(c))throw new f.CancelledError;i=c}let m=await J({message:"Enter MCP server name",validate:(c)=>c&&c.length>0?void 0:"Required"});if(y(m))throw new f.CancelledError;let p=await X({message:"Select MCP server type",options:[{label:"Local",value:"local",hint:"Run a local command"},{label:"Remote",value:"remote",hint:"Connect to a remote URL"}]});if(y(p))throw new f.CancelledError;if(p==="local"){let c=await J({message:"Enter command to run",placeholder:"e.g., qode x @modelcontextprotocol/server-filesystem",validate:(s)=>s&&s.length>0?void 0:"Required"});if(y(c))throw new f.CancelledError;let u;try{u=yt(c)}catch(s){t.error(s instanceof Error?s.message:"Invalid command"),l("MCP server was not added");return}await R(m,{type:"local",command:u},i),t.success(`MCP server "${m}" added to ${i}`),l("MCP server added successfully");return}if(p==="remote"){let c=await J({message:"Enter MCP server URL",placeholder:"e.g., https://example.com/mcp",validate:(s)=>{if(!s)return"Required";if(s.length===0)return"Required";return URL.canParse(s)?void 0:"Invalid URL"}});if(y(c))throw new f.CancelledError;let u=await T({message:"Does this server require OAuth authentication?",initialValue:!1});if(y(u))throw new f.CancelledError;let n;if(u){let s=await T({message:"Do you have a pre-registered client ID?",initialValue:!1});if(y(s))throw new f.CancelledError;if(s){let d=await J({message:"Enter client ID",validate:(j)=>j&&j.length>0?void 0:"Required"});if(y(d))throw new f.CancelledError;let M=await T({message:"Do you have a client secret?",initialValue:!1});if(y(M))throw new f.CancelledError;let _;if(M){let j=await v({message:"Enter client secret"});if(y(j))throw new f.CancelledError;_=j}n={type:"remote",url:c,oauth:{clientId:d,..._&&{clientSecret:_}}}}else n={type:"remote",url:c,oauth:{}}}else n={type:"remote",url:c,oauth:!1};await R(m,n,i),t.success(`MCP server "${m}" added to ${i}`)}l("MCP server added successfully")}})}});var it=w({command:"list",aliases:["ls"],describe:"list MCP servers and their status",async handler(){await $.provide({directory:process.cwd(),async fn(){f.empty(),O("MCP Servers");let{config:o,statuses:e,stored:r}=await I(),i=B(o);if(i.length===0){t.warn("No MCP servers configured"),l("Add servers with: qode mcp add");return}for(let[m,p]of i){let c=e[m],u=k(p)&&p.oauth!==!1,n=r[m],s,d,M="";if(!c)s="\u25CB",d="not initialized";else if(c.status==="connected"){if(s="\u2713",d="connected",u&&n)M=" (OAuth)"}else if(c.status==="disabled")s="\u25CB",d="disabled";else if(c.status==="pending")s="\u25CB",d="pending approval";else if(c.status==="needs_auth")s="\u26A0",d="needs authentication";else if(c.status==="needs_client_registration")s="\u2717",d="needs client registration",M=`
3
3
  `+c.error;else s="\u2717",d="failed",M=`
4
4
  `+c.error;let _=p.type==="remote"?L.redactString(p.url):L.redactCommand(p.command).join(" ");t.info(`${s} ${m} ${f.Style.TEXT_DIM}${d} ${U(o,m)}${M}
5
5
  ${f.Style.TEXT_DIM}${_}`)}l(`${i.length} server(s)`)}})}});var dt=w({command:"auth [name]",describe:"authenticate with an OAuth-enabled MCP server",builder:(o)=>o.positional("name",{describe:"name of the MCP server",type:"string"}).command(ct),async handler(o){await $.provide({directory:process.cwd(),async fn(){f.empty(),O("MCP OAuth Authentication");let{config:e,auth:r}=await S(),i=e.mcp??{},m=C(e);if(m.length===0){t.warn("No OAuth-capable MCP servers configured"),t.info("Remote MCP servers support OAuth by default. Add a remote server in qitqode.json:"),t.info(`
@@ -1,3 +1,3 @@
1
1
  // @bun
2
- import{DO as Z,GO as W}from"./chunk-yjj4cvqg.js";var R=Z(($G,E)=>{var{defineProperty:N,getOwnPropertyDescriptor:Kz,getOwnPropertyNames:Qz}=Object,Wz=Object.prototype.hasOwnProperty,Xz=(z,G)=>{for(var H in G)N(z,H,{get:G[H],enumerable:!0})},Yz=(z,G,H,Q)=>{if(G&&typeof G==="object"||typeof G==="function"){for(let K of Qz(G))if(!Wz.call(z,K)&&K!==H)N(z,K,{get:()=>G[K],enumerable:!(Q=Kz(G,K))||Q.enumerable})}return z},Zz=(z)=>Yz(N({},"__esModule",{value:!0}),z),O={};Xz(O,{VercelOidcTokenError:()=>S});E.exports=Zz(O);class S extends Error{constructor(z,G){super(z);this.name="VercelOidcTokenError",this.cause=G}toString(){if(this.cause)return`${this.name}: ${this.message}: ${this.cause}`;return`${this.name}: ${this.message}`}}});var P=Z((qG,y)=>{var{create:$z,defineProperty:L,getOwnPropertyDescriptor:qz,getOwnPropertyNames:vz,getPrototypeOf:Bz}=Object,Fz=Object.prototype.hasOwnProperty,Uz=(z,G)=>{for(var H in G)L(z,H,{get:G[H],enumerable:!0})},C=(z,G,H,Q)=>{if(G&&typeof G==="object"||typeof G==="function"){for(let K of vz(G))if(!Fz.call(z,K)&&K!==H)L(z,K,{get:()=>G[K],enumerable:!(Q=qz(G,K))||Q.enumerable})}return z},I=(z,G,H)=>(H=z!=null?$z(Bz(z)):{},C(G||!z||!z.__esModule?L(H,"default",{value:z,enumerable:!0}):H,z)),Lz=(z)=>C(L({},"__esModule",{value:!0}),z),x={};Uz(x,{findRootDir:()=>Jz,getUserDataDir:()=>Nz});y.exports=Lz(x);var B=I(W("path")),bz=I(W("fs")),A=I(W("os")),Vz=R();function Jz(){try{let z=process.cwd();while(z!==B.default.dirname(z)){let G=B.default.join(z,".vercel");if(bz.default.existsSync(G))return z;z=B.default.dirname(z)}}catch(z){throw new Vz.VercelOidcTokenError("Token refresh only supported in node server environments")}return null}function Nz(){if(process.env.XDG_DATA_HOME)return process.env.XDG_DATA_HOME;switch(A.default.platform()){case"darwin":return B.default.join(A.default.homedir(),"Library/Application Support");case"linux":return B.default.join(A.default.homedir(),".local/share");case"win32":if(process.env.LOCALAPPDATA)return process.env.LOCALAPPDATA;return null;default:return null}}});var i=Z((vG,c)=>{var{create:Rz,defineProperty:b,getOwnPropertyDescriptor:Az,getOwnPropertyNames:Iz,getPrototypeOf:Dz}=Object,wz=Object.prototype.hasOwnProperty,Tz=(z,G)=>{for(var H in G)b(z,H,{get:G[H],enumerable:!0})},u=(z,G,H,Q)=>{if(G&&typeof G==="object"||typeof G==="function"){for(let K of Iz(G))if(!wz.call(z,K)&&K!==H)b(z,K,{get:()=>G[K],enumerable:!(Q=Az(G,K))||Q.enumerable})}return z},l=(z,G,H)=>(H=z!=null?Rz(Dz(z)):{},u(G||!z||!z.__esModule?b(H,"default",{value:z,enumerable:!0}):H,z)),jz=(z)=>u(b({},"__esModule",{value:!0}),z),g={};Tz(g,{isValidAccessToken:()=>Ez,readAuthConfig:()=>Oz,writeAuthConfig:()=>Sz});c.exports=jz(g);var F=l(W("fs")),h=l(W("path")),Mz=f();function k(){let z=(0,Mz.getVercelDataDir)();if(!z)throw Error(`Unable to find Vercel CLI data directory. Your platform: ${process.platform}. Supported: darwin, linux, win32.`);return h.join(z,"auth.json")}function Oz(){try{let z=k();if(!F.existsSync(z))return null;let G=F.readFileSync(z,"utf8");if(!G)return null;return JSON.parse(G)}catch(z){return null}}function Sz(z){let G=k(),H=h.dirname(G);if(!F.existsSync(H))F.mkdirSync(H,{mode:504,recursive:!0});F.writeFileSync(G,JSON.stringify(z,null,2),{mode:384})}function Ez(z,G=0){if(!z.token)return!1;if(typeof z.expiresAt!=="number")return!0;let H=Math.floor(Date.now()/1000),Q=G/1000;return z.expiresAt>=H+Q}});var a=Z((BG,s)=>{var{defineProperty:T,getOwnPropertyDescriptor:Cz,getOwnPropertyNames:xz}=Object,yz=Object.prototype.hasOwnProperty,Pz=(z,G)=>{for(var H in G)T(z,H,{get:G[H],enumerable:!0})},uz=(z,G,H,Q)=>{if(G&&typeof G==="object"||typeof G==="function"){for(let K of xz(G))if(!yz.call(z,K)&&K!==H)T(z,K,{get:()=>G[K],enumerable:!(Q=Cz(G,K))||Q.enumerable})}return z},lz=(z)=>uz(T({},"__esModule",{value:!0}),z),d={};Pz(d,{processTokenResponse:()=>iz,refreshTokenRequest:()=>cz});s.exports=lz(d);var D=W("os"),gz="https://vercel.com",hz="cl_HYyOPBNtFMfHhaUn9L4QPfTZz6TP47bp",p=`@vercel/oidc node-${process.version} ${(0,D.platform)()} (${(0,D.arch)()}) ${(0,D.hostname)()}`,w=null;async function kz(){if(w)return w;let z=`${gz}/.well-known/openid-configuration`,G=await fetch(z,{headers:{"user-agent":p}});if(!G.ok)throw Error("Failed to discover OAuth endpoints");let H=await G.json();if(!H||typeof H.token_endpoint!=="string")throw Error("Invalid OAuth discovery response");let Q=H.token_endpoint;return w=Q,Q}async function cz(z){let G=await kz();return await fetch(G,{method:"POST",headers:{"Content-Type":"application/x-www-form-urlencoded","user-agent":p},body:new URLSearchParams({client_id:hz,grant_type:"refresh_token",...z})})}async function iz(z){let G=await z.json();if(!z.ok){let H=typeof G==="object"&&G&&"error"in G?String(G.error):"Token refresh failed";return[Error(H)]}if(typeof G!=="object"||G===null)return[Error("Invalid token response")];if(typeof G.access_token!=="string")return[Error("Missing access_token in response")];if(G.token_type!=="Bearer")return[Error("Invalid token_type in response")];if(typeof G.expires_in!=="number")return[Error("Missing expires_in in response")];return[null,G]}});var t=Z((FG,r)=>{var{defineProperty:j,getOwnPropertyDescriptor:fz,getOwnPropertyNames:dz}=Object,pz=Object.prototype.hasOwnProperty,sz=(z,G)=>{for(var H in G)j(z,H,{get:G[H],enumerable:!0})},az=(z,G,H,Q)=>{if(G&&typeof G==="object"||typeof G==="function"){for(let K of dz(G))if(!pz.call(z,K)&&K!==H)j(z,K,{get:()=>G[K],enumerable:!(Q=fz(G,K))||Q.enumerable})}return z},_z=(z)=>az(j({},"__esModule",{value:!0}),z),_={};sz(_,{AccessTokenMissingError:()=>m,RefreshAccessTokenFailedError:()=>n});r.exports=_z(_);class m extends Error{constructor(){super("No authentication found. Please log in with the Vercel CLI (vercel login).");this.name="AccessTokenMissingError"}}class n extends Error{constructor(z){super("Failed to refresh authentication token.",{cause:z});this.name="RefreshAccessTokenFailedError"}}});var f=Z((UG,Hz)=>{var{create:mz,defineProperty:V,getOwnPropertyDescriptor:nz,getOwnPropertyNames:rz,getPrototypeOf:tz}=Object,ez=Object.prototype.hasOwnProperty,oz=(z,G)=>{for(var H in G)V(z,H,{get:G[H],enumerable:!0})},o=(z,G,H,Q)=>{if(G&&typeof G==="object"||typeof G==="function"){for(let K of rz(G))if(!ez.call(z,K)&&K!==H)V(z,K,{get:()=>G[K],enumerable:!(Q=nz(G,K))||Q.enumerable})}return z},zz=(z,G,H)=>(H=z!=null?mz(tz(z)):{},o(G||!z||!z.__esModule?V(H,"default",{value:z,enumerable:!0}):H,z)),zG=(z)=>o(V({},"__esModule",{value:!0}),z),Gz={};oz(Gz,{assertVercelOidcTokenResponse:()=>M,findProjectInfo:()=>QG,getTokenPayload:()=>YG,getVercelDataDir:()=>GG,getVercelOidcToken:()=>KG,getVercelToken:()=>HG,isExpired:()=>ZG,loadToken:()=>XG,saveToken:()=>WG});Hz.exports=zG(Gz);var U=zz(W("path")),X=zz(W("fs")),v=R(),J=P(),$=i(),e=a(),q=t();function GG(){let G=(0,J.getUserDataDir)();if(!G)return null;return U.join(G,"com.vercel.cli")}async function HG(z){let G=(0,$.readAuthConfig)();if(!G?.token)throw new q.AccessTokenMissingError;if((0,$.isValidAccessToken)(G,z?.expirationBufferMs))return G.token;if(!G.refreshToken)throw(0,$.writeAuthConfig)({}),new q.RefreshAccessTokenFailedError("No refresh token available");try{let H=await(0,e.refreshTokenRequest)({refresh_token:G.refreshToken}),[Q,K]=await(0,e.processTokenResponse)(H);if(Q||!K)throw(0,$.writeAuthConfig)({}),new q.RefreshAccessTokenFailedError(Q);let Y={token:K.access_token,expiresAt:Math.floor(Date.now()/1000)+K.expires_in};if(K.refresh_token)Y.refreshToken=K.refresh_token;return(0,$.writeAuthConfig)(Y),Y.token}catch(H){if((0,$.writeAuthConfig)({}),H instanceof q.AccessTokenMissingError||H instanceof q.RefreshAccessTokenFailedError)throw H;throw new q.RefreshAccessTokenFailedError(H)}}async function KG(z,G,H){let Q=`https://api.vercel.com/v1/projects/${G}/token?source=vercel-oidc-refresh${H?`&teamId=${H}`:""}`,K=await fetch(Q,{method:"POST",headers:{Authorization:`Bearer ${z}`}});if(!K.ok)throw new v.VercelOidcTokenError(`Failed to refresh OIDC token: ${K.statusText}`);let Y=await K.json();return M(Y),Y}function M(z){if(!z||typeof z!=="object")throw TypeError("Vercel OIDC token is malformed. Expected an object. Please run `vc env pull` and try again");if(!("token"in z)||typeof z.token!=="string")throw TypeError("Vercel OIDC token is malformed. Expected a string-valued token property. Please run `vc env pull` and try again")}function QG(){let z=(0,J.findRootDir)();if(!z)throw new v.VercelOidcTokenError("Unable to find project root directory. Have you linked your project with `vc link?`");let G=U.join(z,".vercel","project.json");if(!X.existsSync(G))throw new v.VercelOidcTokenError("project.json not found, have you linked your project with `vc link?`");let H=JSON.parse(X.readFileSync(G,"utf8"));if(typeof H.projectId!=="string"&&typeof H.orgId!=="string")throw TypeError("Expected a string-valued projectId property. Try running `vc link` to re-link your project.");return{projectId:H.projectId,teamId:H.orgId}}function WG(z,G){let H=(0,J.getUserDataDir)();if(!H)throw new v.VercelOidcTokenError("Unable to find user data directory. Please reach out to Vercel support.");let Q=U.join(H,"com.vercel.token",`${G}.json`),K=JSON.stringify(z);X.mkdirSync(U.dirname(Q),{mode:504,recursive:!0}),X.writeFileSync(Q,K),X.chmodSync(Q,432);return}function XG(z){let G=(0,J.getUserDataDir)();if(!G)throw new v.VercelOidcTokenError("Unable to find user data directory. Please reach out to Vercel support.");let H=U.join(G,"com.vercel.token",`${z}.json`);if(!X.existsSync(H))return null;let Q=JSON.parse(X.readFileSync(H,"utf8"));return M(Q),Q}function YG(z){let G=z.split(".");if(G.length!==3)throw new v.VercelOidcTokenError("Invalid token. Please run `vc env pull` and try again");let H=G[1].replace(/-/g,"+").replace(/_/g,"/"),Q=H.padEnd(H.length+(4-H.length%4)%4,"=");return JSON.parse(Buffer.from(Q,"base64").toString("utf8"))}function ZG(z,G=0){return z.exp*1000<Date.now()+G}});
3
- export{R as kq,t as lq,f as mq};
2
+ import{aQ as Z,dQ as W}from"./chunk-aztre27e.js";var R=Z(($G,E)=>{var{defineProperty:N,getOwnPropertyDescriptor:Kz,getOwnPropertyNames:Qz}=Object,Wz=Object.prototype.hasOwnProperty,Xz=(z,G)=>{for(var H in G)N(z,H,{get:G[H],enumerable:!0})},Yz=(z,G,H,Q)=>{if(G&&typeof G==="object"||typeof G==="function"){for(let K of Qz(G))if(!Wz.call(z,K)&&K!==H)N(z,K,{get:()=>G[K],enumerable:!(Q=Kz(G,K))||Q.enumerable})}return z},Zz=(z)=>Yz(N({},"__esModule",{value:!0}),z),O={};Xz(O,{VercelOidcTokenError:()=>S});E.exports=Zz(O);class S extends Error{constructor(z,G){super(z);this.name="VercelOidcTokenError",this.cause=G}toString(){if(this.cause)return`${this.name}: ${this.message}: ${this.cause}`;return`${this.name}: ${this.message}`}}});var P=Z((qG,y)=>{var{create:$z,defineProperty:L,getOwnPropertyDescriptor:qz,getOwnPropertyNames:vz,getPrototypeOf:Bz}=Object,Fz=Object.prototype.hasOwnProperty,Uz=(z,G)=>{for(var H in G)L(z,H,{get:G[H],enumerable:!0})},C=(z,G,H,Q)=>{if(G&&typeof G==="object"||typeof G==="function"){for(let K of vz(G))if(!Fz.call(z,K)&&K!==H)L(z,K,{get:()=>G[K],enumerable:!(Q=qz(G,K))||Q.enumerable})}return z},I=(z,G,H)=>(H=z!=null?$z(Bz(z)):{},C(G||!z||!z.__esModule?L(H,"default",{value:z,enumerable:!0}):H,z)),Lz=(z)=>C(L({},"__esModule",{value:!0}),z),x={};Uz(x,{findRootDir:()=>Jz,getUserDataDir:()=>Nz});y.exports=Lz(x);var B=I(W("path")),bz=I(W("fs")),A=I(W("os")),Vz=R();function Jz(){try{let z=process.cwd();while(z!==B.default.dirname(z)){let G=B.default.join(z,".vercel");if(bz.default.existsSync(G))return z;z=B.default.dirname(z)}}catch(z){throw new Vz.VercelOidcTokenError("Token refresh only supported in node server environments")}return null}function Nz(){if(process.env.XDG_DATA_HOME)return process.env.XDG_DATA_HOME;switch(A.default.platform()){case"darwin":return B.default.join(A.default.homedir(),"Library/Application Support");case"linux":return B.default.join(A.default.homedir(),".local/share");case"win32":if(process.env.LOCALAPPDATA)return process.env.LOCALAPPDATA;return null;default:return null}}});var i=Z((vG,c)=>{var{create:Rz,defineProperty:b,getOwnPropertyDescriptor:Az,getOwnPropertyNames:Iz,getPrototypeOf:Dz}=Object,wz=Object.prototype.hasOwnProperty,Tz=(z,G)=>{for(var H in G)b(z,H,{get:G[H],enumerable:!0})},u=(z,G,H,Q)=>{if(G&&typeof G==="object"||typeof G==="function"){for(let K of Iz(G))if(!wz.call(z,K)&&K!==H)b(z,K,{get:()=>G[K],enumerable:!(Q=Az(G,K))||Q.enumerable})}return z},l=(z,G,H)=>(H=z!=null?Rz(Dz(z)):{},u(G||!z||!z.__esModule?b(H,"default",{value:z,enumerable:!0}):H,z)),jz=(z)=>u(b({},"__esModule",{value:!0}),z),g={};Tz(g,{isValidAccessToken:()=>Ez,readAuthConfig:()=>Oz,writeAuthConfig:()=>Sz});c.exports=jz(g);var F=l(W("fs")),h=l(W("path")),Mz=f();function k(){let z=(0,Mz.getVercelDataDir)();if(!z)throw Error(`Unable to find Vercel CLI data directory. Your platform: ${process.platform}. Supported: darwin, linux, win32.`);return h.join(z,"auth.json")}function Oz(){try{let z=k();if(!F.existsSync(z))return null;let G=F.readFileSync(z,"utf8");if(!G)return null;return JSON.parse(G)}catch(z){return null}}function Sz(z){let G=k(),H=h.dirname(G);if(!F.existsSync(H))F.mkdirSync(H,{mode:504,recursive:!0});F.writeFileSync(G,JSON.stringify(z,null,2),{mode:384})}function Ez(z,G=0){if(!z.token)return!1;if(typeof z.expiresAt!=="number")return!0;let H=Math.floor(Date.now()/1000),Q=G/1000;return z.expiresAt>=H+Q}});var a=Z((BG,s)=>{var{defineProperty:T,getOwnPropertyDescriptor:Cz,getOwnPropertyNames:xz}=Object,yz=Object.prototype.hasOwnProperty,Pz=(z,G)=>{for(var H in G)T(z,H,{get:G[H],enumerable:!0})},uz=(z,G,H,Q)=>{if(G&&typeof G==="object"||typeof G==="function"){for(let K of xz(G))if(!yz.call(z,K)&&K!==H)T(z,K,{get:()=>G[K],enumerable:!(Q=Cz(G,K))||Q.enumerable})}return z},lz=(z)=>uz(T({},"__esModule",{value:!0}),z),d={};Pz(d,{processTokenResponse:()=>iz,refreshTokenRequest:()=>cz});s.exports=lz(d);var D=W("os"),gz="https://vercel.com",hz="cl_HYyOPBNtFMfHhaUn9L4QPfTZz6TP47bp",p=`@vercel/oidc node-${process.version} ${(0,D.platform)()} (${(0,D.arch)()}) ${(0,D.hostname)()}`,w=null;async function kz(){if(w)return w;let z=`${gz}/.well-known/openid-configuration`,G=await fetch(z,{headers:{"user-agent":p}});if(!G.ok)throw Error("Failed to discover OAuth endpoints");let H=await G.json();if(!H||typeof H.token_endpoint!=="string")throw Error("Invalid OAuth discovery response");let Q=H.token_endpoint;return w=Q,Q}async function cz(z){let G=await kz();return await fetch(G,{method:"POST",headers:{"Content-Type":"application/x-www-form-urlencoded","user-agent":p},body:new URLSearchParams({client_id:hz,grant_type:"refresh_token",...z})})}async function iz(z){let G=await z.json();if(!z.ok){let H=typeof G==="object"&&G&&"error"in G?String(G.error):"Token refresh failed";return[Error(H)]}if(typeof G!=="object"||G===null)return[Error("Invalid token response")];if(typeof G.access_token!=="string")return[Error("Missing access_token in response")];if(G.token_type!=="Bearer")return[Error("Invalid token_type in response")];if(typeof G.expires_in!=="number")return[Error("Missing expires_in in response")];return[null,G]}});var t=Z((FG,r)=>{var{defineProperty:j,getOwnPropertyDescriptor:fz,getOwnPropertyNames:dz}=Object,pz=Object.prototype.hasOwnProperty,sz=(z,G)=>{for(var H in G)j(z,H,{get:G[H],enumerable:!0})},az=(z,G,H,Q)=>{if(G&&typeof G==="object"||typeof G==="function"){for(let K of dz(G))if(!pz.call(z,K)&&K!==H)j(z,K,{get:()=>G[K],enumerable:!(Q=fz(G,K))||Q.enumerable})}return z},_z=(z)=>az(j({},"__esModule",{value:!0}),z),_={};sz(_,{AccessTokenMissingError:()=>m,RefreshAccessTokenFailedError:()=>n});r.exports=_z(_);class m extends Error{constructor(){super("No authentication found. Please log in with the Vercel CLI (vercel login).");this.name="AccessTokenMissingError"}}class n extends Error{constructor(z){super("Failed to refresh authentication token.",{cause:z});this.name="RefreshAccessTokenFailedError"}}});var f=Z((UG,Hz)=>{var{create:mz,defineProperty:V,getOwnPropertyDescriptor:nz,getOwnPropertyNames:rz,getPrototypeOf:tz}=Object,ez=Object.prototype.hasOwnProperty,oz=(z,G)=>{for(var H in G)V(z,H,{get:G[H],enumerable:!0})},o=(z,G,H,Q)=>{if(G&&typeof G==="object"||typeof G==="function"){for(let K of rz(G))if(!ez.call(z,K)&&K!==H)V(z,K,{get:()=>G[K],enumerable:!(Q=nz(G,K))||Q.enumerable})}return z},zz=(z,G,H)=>(H=z!=null?mz(tz(z)):{},o(G||!z||!z.__esModule?V(H,"default",{value:z,enumerable:!0}):H,z)),zG=(z)=>o(V({},"__esModule",{value:!0}),z),Gz={};oz(Gz,{assertVercelOidcTokenResponse:()=>M,findProjectInfo:()=>QG,getTokenPayload:()=>YG,getVercelDataDir:()=>GG,getVercelOidcToken:()=>KG,getVercelToken:()=>HG,isExpired:()=>ZG,loadToken:()=>XG,saveToken:()=>WG});Hz.exports=zG(Gz);var U=zz(W("path")),X=zz(W("fs")),v=R(),J=P(),$=i(),e=a(),q=t();function GG(){let G=(0,J.getUserDataDir)();if(!G)return null;return U.join(G,"com.vercel.cli")}async function HG(z){let G=(0,$.readAuthConfig)();if(!G?.token)throw new q.AccessTokenMissingError;if((0,$.isValidAccessToken)(G,z?.expirationBufferMs))return G.token;if(!G.refreshToken)throw(0,$.writeAuthConfig)({}),new q.RefreshAccessTokenFailedError("No refresh token available");try{let H=await(0,e.refreshTokenRequest)({refresh_token:G.refreshToken}),[Q,K]=await(0,e.processTokenResponse)(H);if(Q||!K)throw(0,$.writeAuthConfig)({}),new q.RefreshAccessTokenFailedError(Q);let Y={token:K.access_token,expiresAt:Math.floor(Date.now()/1000)+K.expires_in};if(K.refresh_token)Y.refreshToken=K.refresh_token;return(0,$.writeAuthConfig)(Y),Y.token}catch(H){if((0,$.writeAuthConfig)({}),H instanceof q.AccessTokenMissingError||H instanceof q.RefreshAccessTokenFailedError)throw H;throw new q.RefreshAccessTokenFailedError(H)}}async function KG(z,G,H){let Q=`https://api.vercel.com/v1/projects/${G}/token?source=vercel-oidc-refresh${H?`&teamId=${H}`:""}`,K=await fetch(Q,{method:"POST",headers:{Authorization:`Bearer ${z}`}});if(!K.ok)throw new v.VercelOidcTokenError(`Failed to refresh OIDC token: ${K.statusText}`);let Y=await K.json();return M(Y),Y}function M(z){if(!z||typeof z!=="object")throw TypeError("Vercel OIDC token is malformed. Expected an object. Please run `vc env pull` and try again");if(!("token"in z)||typeof z.token!=="string")throw TypeError("Vercel OIDC token is malformed. Expected a string-valued token property. Please run `vc env pull` and try again")}function QG(){let z=(0,J.findRootDir)();if(!z)throw new v.VercelOidcTokenError("Unable to find project root directory. Have you linked your project with `vc link?`");let G=U.join(z,".vercel","project.json");if(!X.existsSync(G))throw new v.VercelOidcTokenError("project.json not found, have you linked your project with `vc link?`");let H=JSON.parse(X.readFileSync(G,"utf8"));if(typeof H.projectId!=="string"&&typeof H.orgId!=="string")throw TypeError("Expected a string-valued projectId property. Try running `vc link` to re-link your project.");return{projectId:H.projectId,teamId:H.orgId}}function WG(z,G){let H=(0,J.getUserDataDir)();if(!H)throw new v.VercelOidcTokenError("Unable to find user data directory. Please reach out to Vercel support.");let Q=U.join(H,"com.vercel.token",`${G}.json`),K=JSON.stringify(z);X.mkdirSync(U.dirname(Q),{mode:504,recursive:!0}),X.writeFileSync(Q,K),X.chmodSync(Q,432);return}function XG(z){let G=(0,J.getUserDataDir)();if(!G)throw new v.VercelOidcTokenError("Unable to find user data directory. Please reach out to Vercel support.");let H=U.join(G,"com.vercel.token",`${z}.json`);if(!X.existsSync(H))return null;let Q=JSON.parse(X.readFileSync(H,"utf8"));return M(Q),Q}function YG(z){let G=z.split(".");if(G.length!==3)throw new v.VercelOidcTokenError("Invalid token. Please run `vc env pull` and try again");let H=G[1].replace(/-/g,"+").replace(/_/g,"/"),Q=H.padEnd(H.length+(4-H.length%4)%4,"=");return JSON.parse(Buffer.from(Q,"base64").toString("utf8"))}function ZG(z,G=0){return z.exp*1000<Date.now()+G}});
3
+ export{R as Jr,t as Kr,f as Lr};
@@ -1,2 +1,2 @@
1
1
  // @bun
2
- import{Ed as s}from"./chunk-sbx9z70j.js";import{Rd as r}from"./chunk-yajd975f.js";import{hh as i}from"./chunk-m2ny1en7.js";import{Uh as z,Vh as B,jh as u,kh as g,oh as q}from"./chunk-09j71kp6.js";import"./chunk-js9wdh67.js";import"./chunk-0a0vat1h.js";import"./chunk-z8v2tsz2.js";import"./chunk-j8efst22.js";import"./chunk-8f0g7d7k.js";import"./chunk-abtn6nec.js";import{Cl as K,Dl as J,Xk as f,lk as G,mk as V,pk as S,rl as x,xk as $}from"./chunk-d7t0bcvk.js";import"./chunk-7mc8nxve.js";import{jm as R,lm as p}from"./chunk-dfja6dj6.js";import"./chunk-n34y5gp6.js";import"./chunk-bn0h9dny.js";import"./chunk-q5363rr9.js";import"./chunk-7wthn44y.js";import"./chunk-a8p9aggx.js";import"./chunk-0xm85ayc.js";import"./chunk-s2za1n7h.js";import"./chunk-19sa03c1.js";import"./chunk-csdm3n24.js";import"./chunk-xk1nh1ay.js";import"./chunk-bsf6n350.js";import"./chunk-4vze3djr.js";import"./chunk-bzrsnv2k.js";import"./chunk-d0qqgxs4.js";import"./chunk-cqtkxwd8.js";import"./chunk-v00cptj6.js";import"./chunk-1d9f53sk.js";import"./chunk-svrxk3vf.js";import"./chunk-kkae8ead.js";import"./chunk-s6me101a.js";import"./chunk-jwtev7b7.js";import"./chunk-b9nwaaqs.js";import"./chunk-qsszerj7.js";import"./chunk-6jewfaqa.js";import"./chunk-6hdjkvr1.js";import"./chunk-1rn0vmvv.js";import"./chunk-fsy279s5.js";import"./chunk-hn1f6rne.js";import"./chunk-4kpvceap.js";import{$s as w,Rs as U}from"./chunk-94qmhz2p.js";import"./chunk-20d0cd1j.js";import"./chunk-yn576pje.js";import"./chunk-b6dsv601.js";import"./chunk-j2zay4da.js";import"./chunk-4vemws1t.js";import"./chunk-yvqbewmc.js";import{RN as A,qH as c}from"./chunk-t299e2aw.js";import"./chunk-bv8pf0m1.js";import"./chunk-4mrz9b6d.js";import{HO as v,IO as P}from"./chunk-yjj4cvqg.js";import{EOL as X}from"os";var k=r({command:"config",describe:"show resolved configuration",builder:(e)=>e,async handler(){await s(process.cwd(),async()=>{let e=await i.runPromise(J.Service.use((o)=>o.get()));process.stdout.write(JSON.stringify(e,null,2)+X)})}});import{EOL as y}from"os";var Y=r({command:"search <query>",describe:"search files by query",builder:(e)=>e.positional("query",{type:"string",demandOption:!0,description:"Search query"}),async handler(e){await s(process.cwd(),async()=>{let o=await i.runPromise(g.Service.use((t)=>t.search({query:e.query})));process.stdout.write(o.join(y)+y)})}}),Z=r({command:"read <path>",describe:"read file contents as JSON",builder:(e)=>e.positional("path",{type:"string",demandOption:!0,description:"File path to read"}),async handler(e){await s(process.cwd(),async()=>{let o=await i.runPromise(g.Service.use((t)=>t.read(e.path)));process.stdout.write(JSON.stringify(o,null,2)+y)})}}),H=r({command:"status",describe:"show file status information",builder:(e)=>e,async handler(){await s(process.cwd(),async()=>{let e=await i.runPromise(g.Service.use((o)=>o.status()));process.stdout.write(JSON.stringify(e,null,2)+y)})}}),ee=r({command:"list <path>",describe:"list files in a directory",builder:(e)=>e.positional("path",{type:"string",demandOption:!0,description:"File path to list"}),async handler(e){await s(process.cwd(),async()=>{let o=await i.runPromise(g.Service.use((t)=>t.list(e.path)));process.stdout.write(JSON.stringify(o,null,2)+y)})}}),oe=r({command:"tree [dir]",describe:"show directory tree",builder:(e)=>e.positional("dir",{type:"string",description:"Directory to tree",default:process.cwd()}),async handler(e){await s(process.cwd(),async()=>{let o=await i.runPromise(u.Service.use((t)=>t.tree({cwd:e.dir,limit:200})));console.log(JSON.stringify(o,null,2))})}}),L=r({command:"file",describe:"file system debugging utilities",builder:(e)=>e.command(Z).command(H).command(ee).command(Y).command(oe).demandCommand(),async handler(){}});import{EOL as D}from"os";var E=r({command:"lsp",describe:"LSP debugging utilities",builder:(e)=>e.command(te).command(re).command(ie).demandCommand(),async handler(){}}),te=r({command:"diagnostics <file>",describe:"get diagnostics for a file",builder:(e)=>e.positional("file",{type:"string",demandOption:!0}),async handler(e){await s(process.cwd(),async()=>{let o=await i.runPromise(S.Service.use((t)=>c.gen(function*(){return yield*t.touchFile(e.file,!0),yield*c.sleep(1000),yield*t.diagnostics()})));process.stdout.write(JSON.stringify(o,null,2)+D)})}}),re=r({command:"symbols <query>",describe:"search workspace symbols",builder:(e)=>e.positional("query",{type:"string",demandOption:!0}),async handler(e){await s(process.cwd(),async()=>{let n=[];try{const o=v(n,w.Default.time("symbols"),0);let t=await i.runPromise(S.Service.use((d)=>d.workspaceSymbol(e.query)));process.stdout.write(JSON.stringify(t,null,2)+D)}catch(a){var m=a,l=1}finally{P(n,m,l)}})}}),ie=r({command:"document-symbols <uri>",describe:"get symbols from a document",builder:(e)=>e.positional("uri",{type:"string",demandOption:!0}),async handler(e){await s(process.cwd(),async()=>{let n=[];try{const o=v(n,w.Default.time("document-symbols"),0);let t=await i.runPromise(S.Service.use((d)=>d.documentSymbol(e.uri)));process.stdout.write(JSON.stringify(t,null,2)+D)}catch(a){var m=a,l=1}finally{P(n,m,l)}})}});import{EOL as C}from"os";var F=r({command:"rg",describe:"ripgrep debugging utilities",builder:(e)=>e.command(se).command(ne).command(ae).demandCommand(),async handler(){}}),se=r({command:"tree",describe:"show file tree using ripgrep",builder:(e)=>e.option("limit",{type:"number"}),async handler(e){await s(process.cwd(),async()=>{let o=await i.runPromise(u.Service.use((t)=>t.tree({cwd:p.directory,limit:e.limit})));process.stdout.write(o+C)})}}),ne=r({command:"files",describe:"list files using ripgrep",builder:(e)=>e.option("query",{type:"string",description:"Filter files by query"}).option("glob",{type:"string",description:"Glob pattern to match files"}).option("limit",{type:"number",description:"Limit number of results"}),async handler(e){await s(process.cwd(),async()=>{let o=await i.runPromise(c.gen(function*(){return yield*(yield*u.Service).files({cwd:p.directory,glob:e.glob?[e.glob]:void 0}).pipe(A.take(e.limit??1/0),A.runCollect,c.map((n)=>[...n]))}));process.stdout.write(o.join(C)+C)})}}),ae=r({command:"search <pattern>",describe:"search file contents using ripgrep",builder:(e)=>e.positional("pattern",{type:"string",demandOption:!0,description:"Search pattern"}).option("glob",{type:"array",description:"File glob patterns"}).option("limit",{type:"number",description:"Limit number of results"}),async handler(e){await s(process.cwd(),async()=>{let o=await i.runPromise(u.Service.use((t)=>t.search({cwd:p.directory,pattern:e.pattern,glob:e.glob,limit:e.limit})));process.stdout.write(JSON.stringify(o.items,null,2)+C)})}});import{EOL as me}from"os";var T=r({command:"scrap",describe:"list all known projects",builder:(e)=>e,async handler(){let e=w.Default.time("scrap"),o=await R.list();process.stdout.write(JSON.stringify(o,null,2)+me),e.stop()}});import{EOL as ce}from"os";var j=r({command:"skill",describe:"list all available skills",builder:(e)=>e,async handler(){await s(process.cwd(),async()=>{let e=await i.runPromise(c.gen(function*(){return yield*(yield*q.Service).all()}));process.stdout.write(JSON.stringify(e,null,2)+ce)})}});var M=r({command:"snapshot",describe:"snapshot debugging utilities",builder:(e)=>e.command(de).command(le).command(pe).demandCommand(),async handler(){}}),I=(e)=>s(process.cwd(),async()=>{console.log(await i.runPromise($.Service.use(e)))}),_=(e)=>e.positional("hash",{type:"string",description:"hash",demandOption:!0}),de=r({command:"track",describe:"track current snapshot state",async handler(){await I((e)=>e.track())}}),le=r({command:"patch <hash>",describe:"show patch for a snapshot hash",builder:_,async handler(e){await I((o)=>o.patch(e.hash))}}),pe=r({command:"diff <hash>",describe:"show diff for a snapshot hash",builder:_,async handler(e){await I((o)=>o.diff(e.hash))}});import{EOL as b}from"os";import{basename as ue}from"path";var Q=r({command:"agent <name>",describe:"show agent configuration details",builder:(e)=>e.positional("name",{type:"string",demandOption:!0,description:"Agent name"}).option("tool",{type:"string",description:"Tool id to execute"}).option("params",{type:"string",description:"Tool params as a JSON object"}),async handler(e){await s(process.cwd(),async()=>{let o=e.name,t=await i.runPromise(B.Service.use((d)=>d.get(o)));if(!t)process.stderr.write(`Agent ${o} not found, run '${ue(process.execPath)} agent list' to get an agent list`+b),process.exit(1);let n=await fe(t),a=await ye(t,n),m=e.tool;if(m){let d=n.find((W)=>W.id===m);if(!d)process.stderr.write(`Tool ${m} not found for agent ${o}`+b),process.exit(1);if(a[m]===!1)process.stderr.write(`Tool ${m} is disabled for agent ${o}`+b),process.exit(1);let h=ge(e.params),O=await we(t),N=await d.execute(h,O);process.stdout.write(JSON.stringify({tool:m,input:h,result:N},null,2)+b);return}let l={...t,tools:a};process.stdout.write(JSON.stringify(l,null,2)+b)})}});async function fe(e){return i.runPromise(c.gen(function*(){let o=yield*x.Service,t=yield*z.Service,n=e.model??(yield*o.defaultModel());return yield*t.tools({...n,agent:e})}))}async function ye(e,o){let t=f.disabled(o.map((a)=>a.id),e.permission),n={};for(let a of o)n[a.id]=!t.has(a.id);return n}function ge(e){if(!e)return{};let o=e.trim();if(o.length===0)return{};let t=(()=>{try{return JSON.parse(o)}catch{throw Error("Failed to parse --params. Provide a valid JSON object.")}})();if(!t||typeof t!=="object"||Array.isArray(t))throw Error("Tool params must be an object.");return t}async function we(e){let{session:o,messageID:t}=await i.runPromise(c.gen(function*(){let a=yield*K.Service,m=yield*a.create({title:`Debug tool run (${e.name})`}),l=G.ascending(),d=e.model?e.model:yield*c.gen(function*(){return yield*(yield*x.Service).defaultModel()}),h=Date.now(),O={id:l,sessionID:m.id,role:"assistant",time:{created:h},parentID:l,modelID:d.modelID,providerID:d.providerID,mode:"debug",agent:e.name,path:{cwd:p.directory,root:p.worktree},cost:0,tokens:{input:0,output:0,reasoning:0,cache:{read:0,write:0}}};return yield*a.updateMessage(O),{session:m,messageID:l}})),n=f.merge(e.permission,o.permission??[]);return{sessionID:o.id,messageID:t,callID:V.ascending(),agent:e.name,abort:new AbortController().signal,messages:[],metadata:()=>c.void,ask(a){return c.sync(()=>{for(let m of a.patterns)if(f.evaluate(a.permission,m,n).action==="deny")throw new f.DeniedError({ruleset:n})})}}}var jo=r({command:"debug",describe:"debugging and troubleshooting tools",builder:(e)=>e.command(k).command(E).command(F).command(L).command(T).command(j).command(M).command(Q).command(be).command({command:"wait",describe:"wait indefinitely (for debugging)",async handler(){await s(process.cwd(),async()=>{await new Promise((o)=>setTimeout(o,86400000))})}}).demandCommand(),async handler(){}}),be=r({command:"paths",describe:"show global paths (data, config, cache, state)",handler(){for(let[e,o]of Object.entries(U.Path))console.log(e.padEnd(10),o)}});export{jo as DebugCommand};
2
+ import{Ed as s}from"./chunk-07g7cybt.js";import{Rd as r}from"./chunk-yajd975f.js";import{hh as i}from"./chunk-ddnpx1yx.js";import{Uh as z,Vh as B,jh as u,kh as g,oh as q}from"./chunk-wfs4pcwa.js";import"./chunk-p68rwmhc.js";import"./chunk-0a0vat1h.js";import"./chunk-z8v2tsz2.js";import"./chunk-j8efst22.js";import"./chunk-a1pw9r6f.js";import"./chunk-d5bxan80.js";import{Cl as K,Dl as J,Xk as f,lk as G,mk as V,pk as S,rl as x,xk as $}from"./chunk-pvpy9kq1.js";import"./chunk-wpajh5s5.js";import{jm as R,lm as p}from"./chunk-2ec6ps8r.js";import"./chunk-gj3hzx3d.js";import"./chunk-nj4d554m.js";import"./chunk-2gerf08b.js";import"./chunk-fqw4y7x0.js";import"./chunk-a1p2f16h.js";import"./chunk-nt4e3em9.js";import"./chunk-a0v55ywn.js";import"./chunk-v965rsr8.js";import"./chunk-1sgby720.js";import"./chunk-dcvatax2.js";import"./chunk-4tbwha3m.js";import"./chunk-m612agnk.js";import"./chunk-yq3m8190.js";import"./chunk-btz9jvec.js";import"./chunk-cqtkxwd8.js";import"./chunk-fkgv2hqd.js";import"./chunk-zyhdxggp.js";import"./chunk-q6ztpfcs.js";import"./chunk-jm1ptn8n.js";import"./chunk-c5e6sk9c.js";import"./chunk-m02zt1a3.js";import"./chunk-vg2fmyje.js";import"./chunk-sn4nez18.js";import"./chunk-42f7p0hq.js";import"./chunk-4qqkqrn9.js";import"./chunk-j6emx6jn.js";import"./chunk-be216spx.js";import"./chunk-12bssxd4.js";import"./chunk-z8r65yw3.js";import{ou as U,yu as w}from"./chunk-3szwfy7w.js";import"./chunk-whxjkz9a.js";import"./chunk-89v6dgpp.js";import"./chunk-k309zez0.js";import"./chunk-09kba1hg.js";import"./chunk-t12xrrfr.js";import"./chunk-phxrg7aw.js";import{PI as c,oP as A}from"./chunk-snm5q21k.js";import"./chunk-xpc2zgj7.js";import"./chunk-qjjch1zt.js";import{eQ as v,fQ as P}from"./chunk-aztre27e.js";import{EOL as X}from"os";var k=r({command:"config",describe:"show resolved configuration",builder:(e)=>e,async handler(){await s(process.cwd(),async()=>{let e=await i.runPromise(J.Service.use((o)=>o.get()));process.stdout.write(JSON.stringify(e,null,2)+X)})}});import{EOL as y}from"os";var Y=r({command:"search <query>",describe:"search files by query",builder:(e)=>e.positional("query",{type:"string",demandOption:!0,description:"Search query"}),async handler(e){await s(process.cwd(),async()=>{let o=await i.runPromise(g.Service.use((t)=>t.search({query:e.query})));process.stdout.write(o.join(y)+y)})}}),Z=r({command:"read <path>",describe:"read file contents as JSON",builder:(e)=>e.positional("path",{type:"string",demandOption:!0,description:"File path to read"}),async handler(e){await s(process.cwd(),async()=>{let o=await i.runPromise(g.Service.use((t)=>t.read(e.path)));process.stdout.write(JSON.stringify(o,null,2)+y)})}}),H=r({command:"status",describe:"show file status information",builder:(e)=>e,async handler(){await s(process.cwd(),async()=>{let e=await i.runPromise(g.Service.use((o)=>o.status()));process.stdout.write(JSON.stringify(e,null,2)+y)})}}),ee=r({command:"list <path>",describe:"list files in a directory",builder:(e)=>e.positional("path",{type:"string",demandOption:!0,description:"File path to list"}),async handler(e){await s(process.cwd(),async()=>{let o=await i.runPromise(g.Service.use((t)=>t.list(e.path)));process.stdout.write(JSON.stringify(o,null,2)+y)})}}),oe=r({command:"tree [dir]",describe:"show directory tree",builder:(e)=>e.positional("dir",{type:"string",description:"Directory to tree",default:process.cwd()}),async handler(e){await s(process.cwd(),async()=>{let o=await i.runPromise(u.Service.use((t)=>t.tree({cwd:e.dir,limit:200})));console.log(JSON.stringify(o,null,2))})}}),L=r({command:"file",describe:"file system debugging utilities",builder:(e)=>e.command(Z).command(H).command(ee).command(Y).command(oe).demandCommand(),async handler(){}});import{EOL as D}from"os";var E=r({command:"lsp",describe:"LSP debugging utilities",builder:(e)=>e.command(te).command(re).command(ie).demandCommand(),async handler(){}}),te=r({command:"diagnostics <file>",describe:"get diagnostics for a file",builder:(e)=>e.positional("file",{type:"string",demandOption:!0}),async handler(e){await s(process.cwd(),async()=>{let o=await i.runPromise(S.Service.use((t)=>c.gen(function*(){return yield*t.touchFile(e.file,!0),yield*c.sleep(1000),yield*t.diagnostics()})));process.stdout.write(JSON.stringify(o,null,2)+D)})}}),re=r({command:"symbols <query>",describe:"search workspace symbols",builder:(e)=>e.positional("query",{type:"string",demandOption:!0}),async handler(e){await s(process.cwd(),async()=>{let n=[];try{const o=v(n,w.Default.time("symbols"),0);let t=await i.runPromise(S.Service.use((d)=>d.workspaceSymbol(e.query)));process.stdout.write(JSON.stringify(t,null,2)+D)}catch(a){var m=a,l=1}finally{P(n,m,l)}})}}),ie=r({command:"document-symbols <uri>",describe:"get symbols from a document",builder:(e)=>e.positional("uri",{type:"string",demandOption:!0}),async handler(e){await s(process.cwd(),async()=>{let n=[];try{const o=v(n,w.Default.time("document-symbols"),0);let t=await i.runPromise(S.Service.use((d)=>d.documentSymbol(e.uri)));process.stdout.write(JSON.stringify(t,null,2)+D)}catch(a){var m=a,l=1}finally{P(n,m,l)}})}});import{EOL as C}from"os";var F=r({command:"rg",describe:"ripgrep debugging utilities",builder:(e)=>e.command(se).command(ne).command(ae).demandCommand(),async handler(){}}),se=r({command:"tree",describe:"show file tree using ripgrep",builder:(e)=>e.option("limit",{type:"number"}),async handler(e){await s(process.cwd(),async()=>{let o=await i.runPromise(u.Service.use((t)=>t.tree({cwd:p.directory,limit:e.limit})));process.stdout.write(o+C)})}}),ne=r({command:"files",describe:"list files using ripgrep",builder:(e)=>e.option("query",{type:"string",description:"Filter files by query"}).option("glob",{type:"string",description:"Glob pattern to match files"}).option("limit",{type:"number",description:"Limit number of results"}),async handler(e){await s(process.cwd(),async()=>{let o=await i.runPromise(c.gen(function*(){return yield*(yield*u.Service).files({cwd:p.directory,glob:e.glob?[e.glob]:void 0}).pipe(A.take(e.limit??1/0),A.runCollect,c.map((n)=>[...n]))}));process.stdout.write(o.join(C)+C)})}}),ae=r({command:"search <pattern>",describe:"search file contents using ripgrep",builder:(e)=>e.positional("pattern",{type:"string",demandOption:!0,description:"Search pattern"}).option("glob",{type:"array",description:"File glob patterns"}).option("limit",{type:"number",description:"Limit number of results"}),async handler(e){await s(process.cwd(),async()=>{let o=await i.runPromise(u.Service.use((t)=>t.search({cwd:p.directory,pattern:e.pattern,glob:e.glob,limit:e.limit})));process.stdout.write(JSON.stringify(o.items,null,2)+C)})}});import{EOL as me}from"os";var T=r({command:"scrap",describe:"list all known projects",builder:(e)=>e,async handler(){let e=w.Default.time("scrap"),o=await R.list();process.stdout.write(JSON.stringify(o,null,2)+me),e.stop()}});import{EOL as ce}from"os";var j=r({command:"skill",describe:"list all available skills",builder:(e)=>e,async handler(){await s(process.cwd(),async()=>{let e=await i.runPromise(c.gen(function*(){return yield*(yield*q.Service).all()}));process.stdout.write(JSON.stringify(e,null,2)+ce)})}});var M=r({command:"snapshot",describe:"snapshot debugging utilities",builder:(e)=>e.command(de).command(le).command(pe).demandCommand(),async handler(){}}),I=(e)=>s(process.cwd(),async()=>{console.log(await i.runPromise($.Service.use(e)))}),_=(e)=>e.positional("hash",{type:"string",description:"hash",demandOption:!0}),de=r({command:"track",describe:"track current snapshot state",async handler(){await I((e)=>e.track())}}),le=r({command:"patch <hash>",describe:"show patch for a snapshot hash",builder:_,async handler(e){await I((o)=>o.patch(e.hash))}}),pe=r({command:"diff <hash>",describe:"show diff for a snapshot hash",builder:_,async handler(e){await I((o)=>o.diff(e.hash))}});import{EOL as b}from"os";import{basename as ue}from"path";var Q=r({command:"agent <name>",describe:"show agent configuration details",builder:(e)=>e.positional("name",{type:"string",demandOption:!0,description:"Agent name"}).option("tool",{type:"string",description:"Tool id to execute"}).option("params",{type:"string",description:"Tool params as a JSON object"}),async handler(e){await s(process.cwd(),async()=>{let o=e.name,t=await i.runPromise(B.Service.use((d)=>d.get(o)));if(!t)process.stderr.write(`Agent ${o} not found, run '${ue(process.execPath)} agent list' to get an agent list`+b),process.exit(1);let n=await fe(t),a=await ye(t,n),m=e.tool;if(m){let d=n.find((W)=>W.id===m);if(!d)process.stderr.write(`Tool ${m} not found for agent ${o}`+b),process.exit(1);if(a[m]===!1)process.stderr.write(`Tool ${m} is disabled for agent ${o}`+b),process.exit(1);let h=ge(e.params),O=await we(t),N=await d.execute(h,O);process.stdout.write(JSON.stringify({tool:m,input:h,result:N},null,2)+b);return}let l={...t,tools:a};process.stdout.write(JSON.stringify(l,null,2)+b)})}});async function fe(e){return i.runPromise(c.gen(function*(){let o=yield*x.Service,t=yield*z.Service,n=e.model??(yield*o.defaultModel());return yield*t.tools({...n,agent:e})}))}async function ye(e,o){let t=f.disabled(o.map((a)=>a.id),e.permission),n={};for(let a of o)n[a.id]=!t.has(a.id);return n}function ge(e){if(!e)return{};let o=e.trim();if(o.length===0)return{};let t=(()=>{try{return JSON.parse(o)}catch{throw Error("Failed to parse --params. Provide a valid JSON object.")}})();if(!t||typeof t!=="object"||Array.isArray(t))throw Error("Tool params must be an object.");return t}async function we(e){let{session:o,messageID:t}=await i.runPromise(c.gen(function*(){let a=yield*K.Service,m=yield*a.create({title:`Debug tool run (${e.name})`}),l=G.ascending(),d=e.model?e.model:yield*c.gen(function*(){return yield*(yield*x.Service).defaultModel()}),h=Date.now(),O={id:l,sessionID:m.id,role:"assistant",time:{created:h},parentID:l,modelID:d.modelID,providerID:d.providerID,mode:"debug",agent:e.name,path:{cwd:p.directory,root:p.worktree},cost:0,tokens:{input:0,output:0,reasoning:0,cache:{read:0,write:0}}};return yield*a.updateMessage(O),{session:m,messageID:l}})),n=f.merge(e.permission,o.permission??[]);return{sessionID:o.id,messageID:t,callID:V.ascending(),agent:e.name,abort:new AbortController().signal,messages:[],metadata:()=>c.void,ask(a){return c.sync(()=>{for(let m of a.patterns)if(f.evaluate(a.permission,m,n).action==="deny")throw new f.DeniedError({ruleset:n})})}}}var jo=r({command:"debug",describe:"debugging and troubleshooting tools",builder:(e)=>e.command(k).command(E).command(F).command(L).command(T).command(j).command(M).command(Q).command(be).command({command:"wait",describe:"wait indefinitely (for debugging)",async handler(){await s(process.cwd(),async()=>{await new Promise((o)=>setTimeout(o,86400000))})}}).demandCommand(),async handler(){}}),be=r({command:"paths",describe:"show global paths (data, config, cache, state)",handler(){for(let[e,o]of Object.entries(U.Path))console.log(e.padEnd(10),o)}});export{jo as DebugCommand};