@bkm016/basalt 0.1.35 → 0.1.36

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 (1013) hide show
  1. package/README.md +1 -1
  2. package/chunk-082x3g29.js +3 -0
  3. package/chunk-0aaf270z.js +3 -0
  4. package/chunk-0dqv9x0y.js +51 -0
  5. package/chunk-0ns02fzq.js +2 -0
  6. package/chunk-0y13kfpt.js +5 -0
  7. package/chunk-1753m6xk.js +4179 -0
  8. package/chunk-24ae99b6.js +5 -0
  9. package/chunk-2cp8why4.js +2 -0
  10. package/chunk-3bdzn4h2.js +2 -0
  11. package/chunk-48m0w8xg.js +2 -0
  12. package/chunk-4pr7ykh0.js +2 -0
  13. package/chunk-4qtw5cga.js +12 -0
  14. package/chunk-4yqge35f.js +3 -0
  15. package/chunk-65rd9zn4.js +3 -0
  16. package/chunk-67ehvv4n.js +44 -0
  17. package/chunk-6wm62kte.js +18 -0
  18. package/chunk-6zkggkdm.js +13 -0
  19. package/chunk-78ferdza.js +3 -0
  20. package/chunk-794r8w6m.js +2 -0
  21. package/chunk-7azn0brs.js +7 -0
  22. package/chunk-7wh4n0yg.js +2 -0
  23. package/chunk-7z0wh161.js +25 -0
  24. package/chunk-95aqrqnh.js +2 -0
  25. package/chunk-a0zcps2d.js +2 -0
  26. package/chunk-a23pv6tv.js +3 -0
  27. package/chunk-adb2nbxk.js +2 -0
  28. package/chunk-as2ty5w5.js +3 -0
  29. package/chunk-b84y794v.js +3 -0
  30. package/chunk-bh80e336.js +3 -0
  31. package/chunk-c6azecvs.js +3 -0
  32. package/chunk-cc8h8mz9.js +2 -0
  33. package/chunk-cdb6caq7.js +3 -0
  34. package/chunk-cjdbsa9s.js +3 -0
  35. package/chunk-cnqgtmwm.js +10 -0
  36. package/chunk-cwn9vs1a.js +3 -0
  37. package/chunk-cxybp3fn.js +8 -0
  38. package/chunk-dea2htm4.js +2 -0
  39. package/chunk-e01wravf.js +12 -0
  40. package/chunk-f0pz8pvb.js +5 -0
  41. package/chunk-fvmrsrmq.js +3 -0
  42. package/chunk-fwdhn0gw.js +7 -0
  43. package/chunk-h7x8g57v.js +9 -0
  44. package/chunk-h8qhy3px.js +39 -0
  45. package/chunk-hsvchrh3.js +7 -0
  46. package/chunk-j1peg724.js +504 -0
  47. package/chunk-j2cse817.js +63 -0
  48. package/chunk-j3jzgw98.js +31 -0
  49. package/chunk-jmzdtefg.js +2 -0
  50. package/chunk-k0e6n6yy.js +3 -0
  51. package/chunk-mb2jqd5z.js +3 -0
  52. package/chunk-nbgtqpay.js +3 -0
  53. package/chunk-prfczhpq.js +10 -0
  54. package/chunk-pv25a7sw.js +2 -0
  55. package/chunk-q8m2x20d.js +286 -0
  56. package/chunk-qnkxeh37.js +3 -0
  57. package/chunk-qvfrv3rb.js +59 -0
  58. package/chunk-r14x07ez.js +2 -0
  59. package/chunk-r1kah65k.js +2 -0
  60. package/chunk-r6pt44wk.js +60 -0
  61. package/chunk-rhkw8ygf.js +3 -0
  62. package/chunk-rvqeb7gr.js +3 -0
  63. package/chunk-rwa7mfwa.js +2 -0
  64. package/chunk-sj46f002.js +2 -0
  65. package/chunk-sp89jja7.js +3 -0
  66. package/chunk-sss5x2ak.js +2 -0
  67. package/chunk-szn4y5mx.js +25 -0
  68. package/chunk-t05q9ksf.js +2 -0
  69. package/chunk-tb66q678.js +11 -0
  70. package/chunk-tej75y8n.js +2 -0
  71. package/chunk-tmfr2ym8.js +4 -0
  72. package/chunk-txwheg1n.js +2 -0
  73. package/chunk-ve6n38r4.js +16 -0
  74. package/chunk-vfa49qcy.js +3 -0
  75. package/chunk-wcy1r6vv.js +2 -0
  76. package/chunk-wj6am3ag.js +3 -0
  77. package/chunk-x0afp8wt.js +3 -0
  78. package/chunk-xe627eyp.js +20 -0
  79. package/chunk-y18ey7s9.js +8 -0
  80. package/chunk-y9r7tt53.js +3 -0
  81. package/chunk-yq20v3va.js +3 -0
  82. package/chunk-yyg4ygv7.js +2 -0
  83. package/chunk-z2zhr4e5.js +3 -0
  84. package/chunk-zdtg52xn.js +2 -0
  85. package/chunk-zrhdrkdb.js +5 -0
  86. package/compiled.js +9 -9
  87. package/package.json +1 -1
  88. package/ui-test-worker.js +33 -33
  89. package/web/chunk-0d0fwb7b.js +2 -0
  90. package/web/chunk-0d0fwb7b.js.br +0 -0
  91. package/web/chunk-0d0fwb7b.js.gz +0 -0
  92. package/web/chunk-0jm4zyrt.js +1 -0
  93. package/web/chunk-0jm4zyrt.js.br +0 -0
  94. package/web/chunk-0jm4zyrt.js.gz +0 -0
  95. package/web/chunk-0pp7dzx1.js +1 -0
  96. package/web/chunk-0pp7dzx1.js.br +0 -0
  97. package/web/chunk-0pp7dzx1.js.gz +0 -0
  98. package/web/chunk-0w73jp4n.js +1 -0
  99. package/web/chunk-0w73jp4n.js.br +0 -0
  100. package/web/chunk-0w73jp4n.js.gz +0 -0
  101. package/web/chunk-1416f30c.js +2 -0
  102. package/web/chunk-1416f30c.js.br +0 -0
  103. package/web/chunk-1416f30c.js.gz +0 -0
  104. package/web/chunk-18wyawez.js +30 -0
  105. package/web/chunk-18wyawez.js.br +0 -0
  106. package/web/chunk-18wyawez.js.gz +0 -0
  107. package/web/chunk-19ew9re5.js +1 -0
  108. package/web/chunk-19ew9re5.js.br +0 -0
  109. package/web/chunk-19ew9re5.js.gz +0 -0
  110. package/web/chunk-1mdtr9wk.js +8 -0
  111. package/web/chunk-1mdtr9wk.js.br +1 -0
  112. package/web/chunk-1mdtr9wk.js.gz +0 -0
  113. package/web/chunk-1p4egv85.js +1 -0
  114. package/web/chunk-1p4egv85.js.br +0 -0
  115. package/web/chunk-1p4egv85.js.gz +0 -0
  116. package/web/chunk-1x61dvvr.js +2 -0
  117. package/web/chunk-1x61dvvr.js.br +0 -0
  118. package/web/chunk-1x61dvvr.js.gz +0 -0
  119. package/web/chunk-241n0y1h.js +1 -0
  120. package/web/chunk-241n0y1h.js.br +0 -0
  121. package/web/chunk-241n0y1h.js.gz +0 -0
  122. package/web/chunk-26sgnzb2.js +1 -0
  123. package/web/chunk-26sgnzb2.js.br +0 -0
  124. package/web/chunk-26sgnzb2.js.gz +0 -0
  125. package/web/chunk-2p77pefd.js +1 -0
  126. package/web/chunk-2p77pefd.js.br +0 -0
  127. package/web/chunk-2p77pefd.js.gz +0 -0
  128. package/web/chunk-2ppe5znq.js +1 -0
  129. package/web/chunk-2ppe5znq.js.br +0 -0
  130. package/web/chunk-2ppe5znq.js.gz +0 -0
  131. package/web/chunk-2qzr943m.js +2 -0
  132. package/web/chunk-2qzr943m.js.br +0 -0
  133. package/web/chunk-2qzr943m.js.gz +0 -0
  134. package/web/chunk-32k44660.js +214 -0
  135. package/web/chunk-32k44660.js.br +0 -0
  136. package/web/chunk-32k44660.js.gz +0 -0
  137. package/web/chunk-33zb5a76.js +2 -0
  138. package/web/chunk-33zb5a76.js.br +0 -0
  139. package/web/chunk-33zb5a76.js.gz +0 -0
  140. package/web/chunk-38bzkv9k.js +7 -0
  141. package/web/chunk-38bzkv9k.js.br +0 -0
  142. package/web/chunk-38bzkv9k.js.gz +0 -0
  143. package/web/chunk-42ytz496.js +1 -0
  144. package/web/chunk-42ytz496.js.br +0 -0
  145. package/web/chunk-42ytz496.js.gz +0 -0
  146. package/web/chunk-4749rrqv.js +55 -0
  147. package/web/chunk-4749rrqv.js.br +0 -0
  148. package/web/chunk-4749rrqv.js.gz +0 -0
  149. package/web/chunk-4d57cnh5.js +40 -0
  150. package/web/chunk-4d57cnh5.js.br +0 -0
  151. package/web/chunk-4d57cnh5.js.gz +0 -0
  152. package/web/chunk-4gh3hcrc.js +1 -0
  153. package/web/chunk-4gh3hcrc.js.br +0 -0
  154. package/web/chunk-4gh3hcrc.js.gz +0 -0
  155. package/web/chunk-4hg08mj3.js +1 -0
  156. package/web/chunk-4hg08mj3.js.br +0 -0
  157. package/web/chunk-4hg08mj3.js.gz +0 -0
  158. package/web/chunk-4rra9tt7.js +78 -0
  159. package/web/chunk-4rra9tt7.js.br +0 -0
  160. package/web/chunk-4rra9tt7.js.gz +0 -0
  161. package/web/chunk-572kjbne.js +89 -0
  162. package/web/chunk-572kjbne.js.br +0 -0
  163. package/web/chunk-572kjbne.js.gz +0 -0
  164. package/web/chunk-5hqe3cct.js +98 -0
  165. package/web/chunk-5hqe3cct.js.br +0 -0
  166. package/web/chunk-5hqe3cct.js.gz +0 -0
  167. package/web/chunk-5k4vdcwk.js +24 -0
  168. package/web/chunk-5k4vdcwk.js.br +0 -0
  169. package/web/chunk-5k4vdcwk.js.gz +0 -0
  170. package/web/chunk-5z44jbdc.js +1 -0
  171. package/web/chunk-5z44jbdc.js.br +0 -0
  172. package/web/chunk-5z44jbdc.js.gz +0 -0
  173. package/web/chunk-600x58nm.js +1143 -0
  174. package/web/chunk-600x58nm.js.br +0 -0
  175. package/web/chunk-600x58nm.js.gz +0 -0
  176. package/web/chunk-61djfs0t.js +140 -0
  177. package/web/chunk-61djfs0t.js.br +0 -0
  178. package/web/chunk-61djfs0t.js.gz +0 -0
  179. package/web/chunk-6j4jdvtd.js +1 -0
  180. package/web/chunk-6j4jdvtd.js.br +0 -0
  181. package/web/chunk-6j4jdvtd.js.gz +0 -0
  182. package/web/chunk-74ymgabb.js +2 -0
  183. package/web/chunk-74ymgabb.js.br +0 -0
  184. package/web/chunk-74ymgabb.js.gz +0 -0
  185. package/web/chunk-768vchz5.js +169 -0
  186. package/web/chunk-768vchz5.js.br +0 -0
  187. package/web/chunk-768vchz5.js.gz +0 -0
  188. package/web/chunk-7f87paxe.js +36 -0
  189. package/web/chunk-7f87paxe.js.br +0 -0
  190. package/web/chunk-7f87paxe.js.gz +0 -0
  191. package/web/chunk-7ns0kj87.js +2 -0
  192. package/web/chunk-7ns0kj87.js.br +0 -0
  193. package/web/chunk-7ns0kj87.js.gz +0 -0
  194. package/web/chunk-7vpk9y00.js +1 -0
  195. package/web/chunk-7vpk9y00.js.br +0 -0
  196. package/web/chunk-7vpk9y00.js.gz +0 -0
  197. package/web/chunk-89mc1vj3.js +1 -0
  198. package/web/chunk-89mc1vj3.js.br +0 -0
  199. package/web/chunk-89mc1vj3.js.gz +0 -0
  200. package/web/chunk-8wgpesrk.js +139 -0
  201. package/web/chunk-8wgpesrk.js.br +0 -0
  202. package/web/chunk-8wgpesrk.js.gz +0 -0
  203. package/web/chunk-9nh1aeqs.js +303 -0
  204. package/web/chunk-9nh1aeqs.js.br +0 -0
  205. package/web/chunk-9nh1aeqs.js.gz +0 -0
  206. package/web/chunk-9pgq2ax4.js +1 -0
  207. package/web/chunk-9pgq2ax4.js.br +0 -0
  208. package/web/chunk-9pgq2ax4.js.gz +0 -0
  209. package/web/chunk-9tfs2dg1.js +1 -0
  210. package/web/chunk-9tfs2dg1.js.br +0 -0
  211. package/web/chunk-9tfs2dg1.js.gz +0 -0
  212. package/web/chunk-9wemd2wn.js +41 -0
  213. package/web/chunk-9wemd2wn.js.br +0 -0
  214. package/web/chunk-9wemd2wn.js.gz +0 -0
  215. package/web/chunk-9wsz2j8n.js +1 -0
  216. package/web/chunk-9wsz2j8n.js.br +0 -0
  217. package/web/chunk-9wsz2j8n.js.gz +0 -0
  218. package/web/chunk-9wzvqpre.js +2 -0
  219. package/web/chunk-9wzvqpre.js.br +0 -0
  220. package/web/chunk-9wzvqpre.js.gz +0 -0
  221. package/web/chunk-a48wgrb1.js +1 -0
  222. package/web/chunk-a48wgrb1.js.br +2 -0
  223. package/web/chunk-a48wgrb1.js.gz +0 -0
  224. package/web/chunk-a67d8w1k.js +14 -0
  225. package/web/chunk-a67d8w1k.js.br +0 -0
  226. package/web/chunk-a67d8w1k.js.gz +0 -0
  227. package/web/chunk-ah8e1y9j.js +4 -0
  228. package/web/chunk-ah8e1y9j.js.br +0 -0
  229. package/web/chunk-ah8e1y9j.js.gz +0 -0
  230. package/web/chunk-amsr9cg2.js +1 -0
  231. package/web/chunk-amsr9cg2.js.br +0 -0
  232. package/web/chunk-amsr9cg2.js.gz +0 -0
  233. package/web/chunk-aps2c5t2.js +16 -0
  234. package/web/chunk-aps2c5t2.js.br +0 -0
  235. package/web/chunk-aps2c5t2.js.gz +0 -0
  236. package/web/chunk-avfynf6y.js +1 -0
  237. package/web/chunk-avfynf6y.js.br +0 -0
  238. package/web/chunk-avfynf6y.js.gz +0 -0
  239. package/web/chunk-b5zrttcx.js +2 -0
  240. package/web/chunk-b5zrttcx.js.br +0 -0
  241. package/web/chunk-b5zrttcx.js.gz +0 -0
  242. package/web/chunk-bvvf024a.js +24 -0
  243. package/web/chunk-bvvf024a.js.br +0 -0
  244. package/web/chunk-bvvf024a.js.gz +0 -0
  245. package/web/chunk-by2dphx7.js +200 -0
  246. package/web/chunk-by2dphx7.js.br +0 -0
  247. package/web/chunk-by2dphx7.js.gz +0 -0
  248. package/web/chunk-c0sc2yy1.js +1 -0
  249. package/web/chunk-c0sc2yy1.js.br +0 -0
  250. package/web/chunk-c0sc2yy1.js.gz +0 -0
  251. package/web/chunk-c612n2pw.js +2 -0
  252. package/web/chunk-c612n2pw.js.br +0 -0
  253. package/web/chunk-c612n2pw.js.gz +0 -0
  254. package/web/chunk-c91rk85x.js +2 -0
  255. package/web/chunk-c91rk85x.js.br +0 -0
  256. package/web/chunk-c91rk85x.js.gz +0 -0
  257. package/web/chunk-catm30vp.js +2 -0
  258. package/web/chunk-catm30vp.js.br +0 -0
  259. package/web/chunk-catm30vp.js.gz +0 -0
  260. package/web/chunk-cbdxzddd.js +142 -0
  261. package/web/chunk-cbdxzddd.js.br +0 -0
  262. package/web/chunk-cbdxzddd.js.gz +0 -0
  263. package/web/chunk-cng693ts.js +2 -0
  264. package/web/chunk-cng693ts.js.br +0 -0
  265. package/web/chunk-cng693ts.js.gz +0 -0
  266. package/web/chunk-d5vcma5a.js +89 -0
  267. package/web/chunk-d5vcma5a.js.br +0 -0
  268. package/web/chunk-d5vcma5a.js.gz +0 -0
  269. package/web/chunk-d6d9cp71.js +1 -0
  270. package/web/chunk-d6d9cp71.js.br +2 -0
  271. package/web/chunk-d6d9cp71.js.gz +0 -0
  272. package/web/chunk-dsghhcew.js +1 -0
  273. package/web/chunk-dsghhcew.js.br +0 -0
  274. package/web/chunk-dsghhcew.js.gz +0 -0
  275. package/web/chunk-dt2e6evf.js +1 -0
  276. package/web/chunk-dt2e6evf.js.br +0 -0
  277. package/web/chunk-dt2e6evf.js.gz +0 -0
  278. package/web/chunk-dxrsmcah.js +1 -0
  279. package/web/chunk-dxrsmcah.js.br +0 -0
  280. package/web/chunk-dxrsmcah.js.gz +0 -0
  281. package/web/chunk-ent5zx24.js +1 -0
  282. package/web/chunk-ent5zx24.js.br +2 -0
  283. package/web/chunk-ent5zx24.js.gz +0 -0
  284. package/web/chunk-f4n1q3mf.js +1 -0
  285. package/web/chunk-f4n1q3mf.js.br +0 -0
  286. package/web/chunk-f4n1q3mf.js.gz +0 -0
  287. package/web/chunk-fdfrv6bc.js +1 -0
  288. package/web/chunk-fdfrv6bc.js.br +2 -0
  289. package/web/chunk-fdfrv6bc.js.gz +0 -0
  290. package/web/chunk-fh44xz70.js +1 -0
  291. package/web/chunk-fh44xz70.js.br +0 -0
  292. package/web/chunk-fh44xz70.js.gz +0 -0
  293. package/web/chunk-fkbp72gk.js +1 -0
  294. package/web/chunk-fkbp72gk.js.br +0 -0
  295. package/web/chunk-fkbp72gk.js.gz +0 -0
  296. package/web/chunk-fzkjgwzq.js +4 -0
  297. package/web/chunk-fzkjgwzq.js.br +0 -0
  298. package/web/chunk-fzkjgwzq.js.gz +0 -0
  299. package/web/chunk-gf2gznsb.js +38 -0
  300. package/web/chunk-gf2gznsb.js.br +0 -0
  301. package/web/chunk-gf2gznsb.js.gz +0 -0
  302. package/web/chunk-gne1ybac.js +2 -0
  303. package/web/chunk-gne1ybac.js.br +0 -0
  304. package/web/chunk-gne1ybac.js.gz +0 -0
  305. package/web/chunk-gws1fj71.js +106 -0
  306. package/web/chunk-gws1fj71.js.br +0 -0
  307. package/web/chunk-gws1fj71.js.gz +0 -0
  308. package/web/chunk-h4m88fg8.js +2 -0
  309. package/web/chunk-h4m88fg8.js.br +0 -0
  310. package/web/chunk-h4m88fg8.js.gz +0 -0
  311. package/web/chunk-h4vk09kd.js +2 -0
  312. package/web/chunk-h4vk09kd.js.br +0 -0
  313. package/web/chunk-h4vk09kd.js.gz +0 -0
  314. package/web/chunk-h6wzjfj2.js +34 -0
  315. package/web/chunk-h6wzjfj2.js.br +0 -0
  316. package/web/chunk-h6wzjfj2.js.gz +0 -0
  317. package/web/chunk-hajg1p0h.js +7 -0
  318. package/web/chunk-hajg1p0h.js.br +0 -0
  319. package/web/chunk-hajg1p0h.js.gz +0 -0
  320. package/web/chunk-hhmd6qrc.js +2 -0
  321. package/web/chunk-hhmd6qrc.js.br +0 -0
  322. package/web/chunk-hhmd6qrc.js.gz +0 -0
  323. package/web/chunk-hya0fh1r.js +1 -0
  324. package/web/chunk-hya0fh1r.js.br +0 -0
  325. package/web/chunk-hya0fh1r.js.gz +0 -0
  326. package/web/chunk-j469ky77.js +1 -0
  327. package/web/chunk-j469ky77.js.br +0 -0
  328. package/web/chunk-j469ky77.js.gz +0 -0
  329. package/web/chunk-j6ymcm3h.js +2 -0
  330. package/web/chunk-j6ymcm3h.js.br +0 -0
  331. package/web/chunk-j6ymcm3h.js.gz +0 -0
  332. package/web/chunk-j79z6bta.js +21 -0
  333. package/web/chunk-j79z6bta.js.br +0 -0
  334. package/web/chunk-j79z6bta.js.gz +0 -0
  335. package/web/chunk-jbxc5y3z.js +12 -0
  336. package/web/chunk-jbxc5y3z.js.br +0 -0
  337. package/web/chunk-jbxc5y3z.js.gz +0 -0
  338. package/web/chunk-jcc187d7.js +1 -0
  339. package/web/chunk-jcc187d7.js.br +0 -0
  340. package/web/chunk-jcc187d7.js.gz +0 -0
  341. package/web/chunk-jjvpdxhd.js +2 -0
  342. package/web/chunk-jjvpdxhd.js.br +0 -0
  343. package/web/chunk-jjvpdxhd.js.gz +0 -0
  344. package/web/chunk-jrh3mwmy.js +2 -0
  345. package/web/chunk-jrh3mwmy.js.br +0 -0
  346. package/web/chunk-jrh3mwmy.js.gz +0 -0
  347. package/web/chunk-jv3pgdp0.js +1 -0
  348. package/web/chunk-jv3pgdp0.js.br +2 -0
  349. package/web/chunk-jv3pgdp0.js.gz +0 -0
  350. package/web/chunk-ksxjhezb.js +1 -0
  351. package/web/chunk-ksxjhezb.js.br +0 -0
  352. package/web/chunk-ksxjhezb.js.gz +0 -0
  353. package/web/chunk-ktnd8t40.js +2 -0
  354. package/web/chunk-ktnd8t40.js.br +0 -0
  355. package/web/chunk-ktnd8t40.js.gz +0 -0
  356. package/web/chunk-mgwv3dp0.js +1 -0
  357. package/web/chunk-mgwv3dp0.js.br +0 -0
  358. package/web/chunk-mgwv3dp0.js.gz +0 -0
  359. package/web/chunk-mtjdfgjj.js +2 -0
  360. package/web/chunk-mtjdfgjj.js.br +0 -0
  361. package/web/chunk-mtjdfgjj.js.gz +0 -0
  362. package/web/chunk-mzkaanwd.js +2 -0
  363. package/web/chunk-mzkaanwd.js.br +0 -0
  364. package/web/chunk-mzkaanwd.js.gz +0 -0
  365. package/web/chunk-n22pg5xy.js +1 -0
  366. package/web/chunk-n22pg5xy.js.br +0 -0
  367. package/web/chunk-n22pg5xy.js.gz +0 -0
  368. package/web/chunk-n58ezsfb.js +2 -0
  369. package/web/chunk-n58ezsfb.js.br +0 -0
  370. package/web/chunk-n58ezsfb.js.gz +0 -0
  371. package/web/chunk-nhx74teq.js +3 -0
  372. package/web/chunk-nhx74teq.js.br +0 -0
  373. package/web/chunk-nhx74teq.js.gz +0 -0
  374. package/web/chunk-njjsgwfw.js +2 -0
  375. package/web/chunk-njjsgwfw.js.br +0 -0
  376. package/web/chunk-njjsgwfw.js.gz +0 -0
  377. package/web/chunk-nwhqcbnr.js +1 -0
  378. package/web/chunk-nwhqcbnr.js.br +0 -0
  379. package/web/chunk-nwhqcbnr.js.gz +0 -0
  380. package/web/chunk-pnghaajd.js +70 -0
  381. package/web/chunk-pnghaajd.js.br +0 -0
  382. package/web/chunk-pnghaajd.js.gz +0 -0
  383. package/web/chunk-pqfn8x7v.js +1 -0
  384. package/web/chunk-pqfn8x7v.js.br +0 -0
  385. package/web/chunk-pqfn8x7v.js.gz +0 -0
  386. package/web/chunk-ptk0jnyx.js +1 -0
  387. package/web/chunk-ptk0jnyx.js.br +0 -0
  388. package/web/chunk-ptk0jnyx.js.gz +0 -0
  389. package/web/chunk-pv7e5g4k.js +370 -0
  390. package/web/chunk-pv7e5g4k.js.br +0 -0
  391. package/web/chunk-pv7e5g4k.js.gz +0 -0
  392. package/web/chunk-pxnh5qgn.js +2 -0
  393. package/web/chunk-pxnh5qgn.js.br +0 -0
  394. package/web/chunk-pxnh5qgn.js.gz +0 -0
  395. package/web/chunk-q6eq5y2t.js +1 -0
  396. package/web/chunk-q6eq5y2t.js.br +2 -0
  397. package/web/chunk-q6eq5y2t.js.gz +0 -0
  398. package/web/chunk-qdwg9n1d.js +1 -0
  399. package/web/chunk-qdwg9n1d.js.br +0 -0
  400. package/web/chunk-qdwg9n1d.js.gz +0 -0
  401. package/web/chunk-qp42gtvd.js +1 -0
  402. package/web/chunk-qp42gtvd.js.br +0 -0
  403. package/web/chunk-qp42gtvd.js.gz +0 -0
  404. package/web/chunk-qzdw8vdp.js +1 -0
  405. package/web/chunk-qzdw8vdp.js.br +0 -0
  406. package/web/chunk-qzdw8vdp.js.gz +0 -0
  407. package/web/chunk-r571ywxq.js +1 -0
  408. package/web/chunk-r571ywxq.js.br +0 -0
  409. package/web/chunk-r571ywxq.js.gz +0 -0
  410. package/web/chunk-r9fx4cjw.js +1 -0
  411. package/web/chunk-r9fx4cjw.js.br +0 -0
  412. package/web/chunk-r9fx4cjw.js.gz +0 -0
  413. package/web/chunk-rhvq3c1c.js +1 -0
  414. package/web/chunk-rhvq3c1c.js.br +0 -0
  415. package/web/chunk-rhvq3c1c.js.gz +0 -0
  416. package/web/chunk-rjay9w1t.js +1 -0
  417. package/web/chunk-rjay9w1t.js.br +0 -0
  418. package/web/chunk-rjay9w1t.js.gz +0 -0
  419. package/web/chunk-rpvdnc3p.js +1 -0
  420. package/web/chunk-rpvdnc3p.js.br +0 -0
  421. package/web/chunk-rpvdnc3p.js.gz +0 -0
  422. package/web/chunk-rrfr4wyt.js +62 -0
  423. package/web/chunk-rrfr4wyt.js.br +0 -0
  424. package/web/chunk-rrfr4wyt.js.gz +0 -0
  425. package/web/chunk-rvngywg9.js +2 -0
  426. package/web/chunk-rvngywg9.js.br +0 -0
  427. package/web/chunk-rvngywg9.js.gz +0 -0
  428. package/web/chunk-rw7d025r.js +84 -0
  429. package/web/chunk-rw7d025r.js.br +0 -0
  430. package/web/chunk-rw7d025r.js.gz +0 -0
  431. package/web/chunk-s1g8acth.js +324 -0
  432. package/web/chunk-s1g8acth.js.br +0 -0
  433. package/web/chunk-s1g8acth.js.gz +0 -0
  434. package/web/chunk-s8572njv.js +2 -0
  435. package/web/chunk-s8572njv.js.br +1 -0
  436. package/web/chunk-s8572njv.js.gz +0 -0
  437. package/web/chunk-sb57e1m9.css +1 -0
  438. package/web/chunk-sb57e1m9.css.br +0 -0
  439. package/web/chunk-sb57e1m9.css.gz +0 -0
  440. package/web/chunk-sn3h5adt.js +2 -0
  441. package/web/chunk-sn3h5adt.js.br +0 -0
  442. package/web/chunk-sn3h5adt.js.gz +0 -0
  443. package/web/chunk-tb2v18q8.js +2 -0
  444. package/web/chunk-tb2v18q8.js.br +0 -0
  445. package/web/chunk-tb2v18q8.js.gz +0 -0
  446. package/web/chunk-tetbyky0.js +39 -0
  447. package/web/chunk-tetbyky0.js.br +0 -0
  448. package/web/chunk-tetbyky0.js.gz +0 -0
  449. package/web/chunk-tqvctvsv.js +1 -0
  450. package/web/chunk-tqvctvsv.js.br +0 -0
  451. package/web/chunk-tqvctvsv.js.gz +0 -0
  452. package/web/chunk-v9mj2pxz.js +1 -0
  453. package/web/chunk-v9mj2pxz.js.br +0 -0
  454. package/web/chunk-v9mj2pxz.js.gz +0 -0
  455. package/web/chunk-vkhah4nd.js +2 -0
  456. package/web/chunk-vkhah4nd.js.br +0 -0
  457. package/web/chunk-vkhah4nd.js.gz +0 -0
  458. package/web/chunk-vpnh7wmw.js +1 -0
  459. package/web/chunk-vpnh7wmw.js.br +0 -0
  460. package/web/chunk-vpnh7wmw.js.gz +0 -0
  461. package/web/chunk-w1qe2x5p.js +217 -0
  462. package/web/chunk-w1qe2x5p.js.br +0 -0
  463. package/web/chunk-w1qe2x5p.js.gz +0 -0
  464. package/web/chunk-werh47fw.js +99 -0
  465. package/web/chunk-werh47fw.js.br +0 -0
  466. package/web/chunk-werh47fw.js.gz +0 -0
  467. package/web/chunk-wfmf0dc8.js +1 -0
  468. package/web/chunk-wfmf0dc8.js.br +0 -0
  469. package/web/chunk-wfmf0dc8.js.gz +0 -0
  470. package/web/chunk-wna4vqp6.js +1 -0
  471. package/web/chunk-wna4vqp6.js.br +0 -0
  472. package/web/chunk-wna4vqp6.js.gz +0 -0
  473. package/web/chunk-wwhq09nf.js +1 -0
  474. package/web/chunk-wwhq09nf.js.br +0 -0
  475. package/web/chunk-wwhq09nf.js.gz +0 -0
  476. package/web/chunk-x6va53y6.js +291 -0
  477. package/web/chunk-x6va53y6.js.br +0 -0
  478. package/web/chunk-x6va53y6.js.gz +0 -0
  479. package/web/chunk-xefyzr9s.js +120 -0
  480. package/web/chunk-xefyzr9s.js.br +0 -0
  481. package/web/chunk-xefyzr9s.js.gz +0 -0
  482. package/web/chunk-xj1w9054.js +2 -0
  483. package/web/chunk-xj1w9054.js.br +0 -0
  484. package/web/chunk-xj1w9054.js.gz +0 -0
  485. package/web/chunk-xtb3xhxk.js +2 -0
  486. package/web/chunk-xtb3xhxk.js.br +2 -0
  487. package/web/chunk-xtb3xhxk.js.gz +0 -0
  488. package/web/chunk-y1eeptks.js +2 -0
  489. package/web/chunk-y1eeptks.js.br +0 -0
  490. package/web/chunk-y1eeptks.js.gz +0 -0
  491. package/web/chunk-y7z6zmvp.js +292 -0
  492. package/web/chunk-y7z6zmvp.js.br +0 -0
  493. package/web/chunk-y7z6zmvp.js.gz +0 -0
  494. package/web/chunk-yj8tkncg.js +7 -0
  495. package/web/chunk-yj8tkncg.js.br +0 -0
  496. package/web/chunk-yj8tkncg.js.gz +0 -0
  497. package/web/chunk-z0m2d74w.js +1 -0
  498. package/web/chunk-z0m2d74w.js.br +0 -0
  499. package/web/chunk-z0m2d74w.js.gz +0 -0
  500. package/web/chunk-z30kqv40.js +1 -0
  501. package/web/chunk-z30kqv40.js.br +0 -0
  502. package/web/chunk-z30kqv40.js.gz +0 -0
  503. package/web/chunk-z3a96d42.js +332 -0
  504. package/web/chunk-z3a96d42.js.br +0 -0
  505. package/web/chunk-z3a96d42.js.gz +0 -0
  506. package/web/index.html +1 -1
  507. package/web/index.html.br +0 -0
  508. package/web/index.html.gz +0 -0
  509. package/worker.js +1 -1
  510. package/chunk-10y5hvt2.js +0 -2
  511. package/chunk-22k2be3e.js +0 -13
  512. package/chunk-28hye007.js +0 -2
  513. package/chunk-2fmsw1c6.js +0 -5
  514. package/chunk-2h2mvrw2.js +0 -3
  515. package/chunk-2xj51v3m.js +0 -3
  516. package/chunk-3x0wm92n.js +0 -3
  517. package/chunk-4fgsqb1e.js +0 -2
  518. package/chunk-519eek65.js +0 -39
  519. package/chunk-5qa4dean.js +0 -2
  520. package/chunk-5x256mz8.js +0 -2
  521. package/chunk-6n01sefp.js +0 -8
  522. package/chunk-74xtmwpw.js +0 -2
  523. package/chunk-7mafj833.js +0 -3
  524. package/chunk-7v1sqn9k.js +0 -59
  525. package/chunk-8my52htr.js +0 -3
  526. package/chunk-8vh98e46.js +0 -2
  527. package/chunk-92mpgche.js +0 -2
  528. package/chunk-9vacevyf.js +0 -3
  529. package/chunk-9y44m27k.js +0 -5
  530. package/chunk-a5wv2shs.js +0 -3
  531. package/chunk-a78qhb4t.js +0 -5
  532. package/chunk-axsxx67j.js +0 -3
  533. package/chunk-b49fzzzn.js +0 -2
  534. package/chunk-bc8awbnt.js +0 -2
  535. package/chunk-crxs0n0r.js +0 -3
  536. package/chunk-csed8fsv.js +0 -3
  537. package/chunk-cspx3bz9.js +0 -2
  538. package/chunk-ctdtmwmd.js +0 -63
  539. package/chunk-d3xsmwbh.js +0 -25
  540. package/chunk-dvwgpsfz.js +0 -3
  541. package/chunk-dzd8k6bw.js +0 -3
  542. package/chunk-e2xqa46t.js +0 -2
  543. package/chunk-e41mpwx9.js +0 -9
  544. package/chunk-e5ccfgsk.js +0 -3
  545. package/chunk-e67wqhzh.js +0 -12
  546. package/chunk-emeb13nd.js +0 -25
  547. package/chunk-ers9s2c4.js +0 -31
  548. package/chunk-ezq0fnz6.js +0 -3
  549. package/chunk-ezqvx0hm.js +0 -2
  550. package/chunk-f10ca9ma.js +0 -12
  551. package/chunk-f72jhcp8.js +0 -2
  552. package/chunk-fjv41a8r.js +0 -4155
  553. package/chunk-gj0dhgbg.js +0 -3
  554. package/chunk-h0ggc6pv.js +0 -60
  555. package/chunk-hrt42rkh.js +0 -4
  556. package/chunk-j7m36g5w.js +0 -3
  557. package/chunk-jhn30hjp.js +0 -2
  558. package/chunk-ka41gq1g.js +0 -16
  559. package/chunk-kcp9byws.js +0 -2
  560. package/chunk-me72k64f.js +0 -7
  561. package/chunk-n4jemqf1.js +0 -2
  562. package/chunk-ndt4jvh1.js +0 -3
  563. package/chunk-pyxn4wqj.js +0 -3
  564. package/chunk-rajb3566.js +0 -2
  565. package/chunk-rbq2gsar.js +0 -3
  566. package/chunk-rd98e7kg.js +0 -10
  567. package/chunk-rm5dbbsg.js +0 -3
  568. package/chunk-rztw3tgx.js +0 -3
  569. package/chunk-s4mn41eh.js +0 -8
  570. package/chunk-s9p624fq.js +0 -44
  571. package/chunk-sawrte7v.js +0 -3
  572. package/chunk-sd8d792h.js +0 -51
  573. package/chunk-sgvmxx0d.js +0 -2
  574. package/chunk-sqbnt2t1.js +0 -3
  575. package/chunk-t2bvj735.js +0 -2
  576. package/chunk-t8tkamx6.js +0 -2
  577. package/chunk-tbehe5ky.js +0 -18
  578. package/chunk-tsha69rv.js +0 -7
  579. package/chunk-twqwer9t.js +0 -5
  580. package/chunk-vr2rtqeh.js +0 -2
  581. package/chunk-vr6eej6b.js +0 -3
  582. package/chunk-w41gswj8.js +0 -3
  583. package/chunk-x7tras0x.js +0 -498
  584. package/chunk-xakmebnm.js +0 -10
  585. package/chunk-xj453mny.js +0 -286
  586. package/chunk-xmrw19xj.js +0 -2
  587. package/chunk-xpj8fcjp.js +0 -20
  588. package/chunk-y218jsvc.js +0 -3
  589. package/chunk-y33fkh8m.js +0 -2
  590. package/chunk-z3h9ydyr.js +0 -11
  591. package/chunk-zc51vfhr.js +0 -2
  592. package/chunk-zm88mnds.js +0 -7
  593. package/chunk-zz9rj82y.js +0 -3
  594. package/web/chunk-0b5vh2pt.js +0 -2
  595. package/web/chunk-0b5vh2pt.js.br +0 -0
  596. package/web/chunk-0b5vh2pt.js.gz +0 -0
  597. package/web/chunk-0hkdqhkv.js +0 -1
  598. package/web/chunk-0hkdqhkv.js.br +0 -0
  599. package/web/chunk-0hkdqhkv.js.gz +0 -0
  600. package/web/chunk-0v7wrb32.js +0 -2
  601. package/web/chunk-0v7wrb32.js.br +0 -0
  602. package/web/chunk-0v7wrb32.js.gz +0 -0
  603. package/web/chunk-0x2fgw1m.js +0 -1
  604. package/web/chunk-0x2fgw1m.js.br +0 -0
  605. package/web/chunk-0x2fgw1m.js.gz +0 -0
  606. package/web/chunk-0xctxqvv.js +0 -2
  607. package/web/chunk-0xctxqvv.js.br +0 -0
  608. package/web/chunk-0xctxqvv.js.gz +0 -0
  609. package/web/chunk-0y9tf0rt.js +0 -89
  610. package/web/chunk-0y9tf0rt.js.br +0 -0
  611. package/web/chunk-0y9tf0rt.js.gz +0 -0
  612. package/web/chunk-0yrp0f6x.js +0 -1
  613. package/web/chunk-0yrp0f6x.js.br +0 -0
  614. package/web/chunk-0yrp0f6x.js.gz +0 -0
  615. package/web/chunk-10jk2pn9.js +0 -1
  616. package/web/chunk-10jk2pn9.js.br +0 -0
  617. package/web/chunk-10jk2pn9.js.gz +0 -0
  618. package/web/chunk-15ka35m9.js +0 -2
  619. package/web/chunk-15ka35m9.js.br +0 -0
  620. package/web/chunk-15ka35m9.js.gz +0 -0
  621. package/web/chunk-1700cges.js +0 -1
  622. package/web/chunk-1700cges.js.br +0 -0
  623. package/web/chunk-1700cges.js.gz +0 -0
  624. package/web/chunk-1apw6pnk.css +0 -1
  625. package/web/chunk-1apw6pnk.css.br +0 -0
  626. package/web/chunk-1apw6pnk.css.gz +0 -0
  627. package/web/chunk-1b005nqw.js +0 -139
  628. package/web/chunk-1b005nqw.js.br +0 -0
  629. package/web/chunk-1b005nqw.js.gz +0 -0
  630. package/web/chunk-1c9khgyt.js +0 -1
  631. package/web/chunk-1c9khgyt.js.br +0 -2
  632. package/web/chunk-1c9khgyt.js.gz +0 -0
  633. package/web/chunk-1pr20x9x.js +0 -1
  634. package/web/chunk-1pr20x9x.js.br +0 -0
  635. package/web/chunk-1pr20x9x.js.gz +0 -0
  636. package/web/chunk-1sjgdggk.js +0 -7
  637. package/web/chunk-1sjgdggk.js.br +0 -0
  638. package/web/chunk-1sjgdggk.js.gz +0 -0
  639. package/web/chunk-1tt5ympp.js +0 -1
  640. package/web/chunk-1tt5ympp.js.br +0 -0
  641. package/web/chunk-1tt5ympp.js.gz +0 -0
  642. package/web/chunk-29fpfs5q.js +0 -1142
  643. package/web/chunk-29fpfs5q.js.br +0 -0
  644. package/web/chunk-29fpfs5q.js.gz +0 -0
  645. package/web/chunk-2gr7vwnp.js +0 -24
  646. package/web/chunk-2gr7vwnp.js.br +0 -0
  647. package/web/chunk-2gr7vwnp.js.gz +0 -0
  648. package/web/chunk-2p84jch3.js +0 -1
  649. package/web/chunk-2p84jch3.js.br +0 -0
  650. package/web/chunk-2p84jch3.js.gz +0 -0
  651. package/web/chunk-2qs283mh.js +0 -2
  652. package/web/chunk-2qs283mh.js.br +0 -0
  653. package/web/chunk-2qs283mh.js.gz +0 -0
  654. package/web/chunk-3gf2d852.js +0 -1
  655. package/web/chunk-3gf2d852.js.br +0 -0
  656. package/web/chunk-3gf2d852.js.gz +0 -0
  657. package/web/chunk-3hswqkb0.js +0 -1
  658. package/web/chunk-3hswqkb0.js.br +0 -0
  659. package/web/chunk-3hswqkb0.js.gz +0 -0
  660. package/web/chunk-46yjp1x4.js +0 -2
  661. package/web/chunk-46yjp1x4.js.br +0 -0
  662. package/web/chunk-46yjp1x4.js.gz +0 -0
  663. package/web/chunk-4ezd1rkc.js +0 -84
  664. package/web/chunk-4ezd1rkc.js.br +0 -0
  665. package/web/chunk-4ezd1rkc.js.gz +0 -0
  666. package/web/chunk-4v9ar0sf.js +0 -142
  667. package/web/chunk-4v9ar0sf.js.br +0 -0
  668. package/web/chunk-4v9ar0sf.js.gz +0 -0
  669. package/web/chunk-51z88j1t.js +0 -21
  670. package/web/chunk-51z88j1t.js.br +0 -0
  671. package/web/chunk-51z88j1t.js.gz +0 -0
  672. package/web/chunk-5f5zcfga.js +0 -1
  673. package/web/chunk-5f5zcfga.js.br +0 -2
  674. package/web/chunk-5f5zcfga.js.gz +0 -0
  675. package/web/chunk-5n61r0rr.js +0 -36
  676. package/web/chunk-5n61r0rr.js.br +0 -0
  677. package/web/chunk-5n61r0rr.js.gz +0 -0
  678. package/web/chunk-5vcdeenv.js +0 -2
  679. package/web/chunk-5vcdeenv.js.br +0 -0
  680. package/web/chunk-5vcdeenv.js.gz +0 -0
  681. package/web/chunk-5y7ks8c3.js +0 -30
  682. package/web/chunk-5y7ks8c3.js.br +0 -0
  683. package/web/chunk-5y7ks8c3.js.gz +0 -0
  684. package/web/chunk-60v8qwec.js +0 -2
  685. package/web/chunk-60v8qwec.js.br +0 -0
  686. package/web/chunk-60v8qwec.js.gz +0 -0
  687. package/web/chunk-61m5t9wg.js +0 -200
  688. package/web/chunk-61m5t9wg.js.br +0 -0
  689. package/web/chunk-61m5t9wg.js.gz +0 -0
  690. package/web/chunk-669n37qf.js +0 -70
  691. package/web/chunk-669n37qf.js.br +0 -0
  692. package/web/chunk-669n37qf.js.gz +0 -0
  693. package/web/chunk-6kf1xwz9.js +0 -2
  694. package/web/chunk-6kf1xwz9.js.br +0 -0
  695. package/web/chunk-6kf1xwz9.js.gz +0 -0
  696. package/web/chunk-6rw72jmj.js +0 -2
  697. package/web/chunk-6rw72jmj.js.br +0 -0
  698. package/web/chunk-6rw72jmj.js.gz +0 -0
  699. package/web/chunk-6wyxxd9h.js +0 -2
  700. package/web/chunk-6wyxxd9h.js.br +0 -0
  701. package/web/chunk-6wyxxd9h.js.gz +0 -0
  702. package/web/chunk-77vj65dc.js +0 -1
  703. package/web/chunk-77vj65dc.js.br +0 -0
  704. package/web/chunk-77vj65dc.js.gz +0 -0
  705. package/web/chunk-8ktz0w1x.js +0 -120
  706. package/web/chunk-8ktz0w1x.js.br +0 -0
  707. package/web/chunk-8ktz0w1x.js.gz +0 -0
  708. package/web/chunk-8rcfpj02.js +0 -2
  709. package/web/chunk-8rcfpj02.js.br +0 -0
  710. package/web/chunk-8rcfpj02.js.gz +0 -0
  711. package/web/chunk-8x4s1c9g.js +0 -1
  712. package/web/chunk-8x4s1c9g.js.br +0 -2
  713. package/web/chunk-8x4s1c9g.js.gz +0 -0
  714. package/web/chunk-8zf4cywy.js +0 -1
  715. package/web/chunk-8zf4cywy.js.br +0 -0
  716. package/web/chunk-8zf4cywy.js.gz +0 -0
  717. package/web/chunk-a18y5dmf.js +0 -2
  718. package/web/chunk-a18y5dmf.js.br +0 -0
  719. package/web/chunk-a18y5dmf.js.gz +0 -0
  720. package/web/chunk-a36sfjyk.js +0 -1
  721. package/web/chunk-a36sfjyk.js.br +0 -0
  722. package/web/chunk-a36sfjyk.js.gz +0 -0
  723. package/web/chunk-aahzqxq7.js +0 -34
  724. package/web/chunk-aahzqxq7.js.br +0 -0
  725. package/web/chunk-aahzqxq7.js.gz +0 -0
  726. package/web/chunk-b2gtwatf.js +0 -370
  727. package/web/chunk-b2gtwatf.js.br +0 -0
  728. package/web/chunk-b2gtwatf.js.gz +0 -0
  729. package/web/chunk-bdp4y1zg.js +0 -1
  730. package/web/chunk-bdp4y1zg.js.br +0 -0
  731. package/web/chunk-bdp4y1zg.js.gz +0 -0
  732. package/web/chunk-be67vfx1.js +0 -1
  733. package/web/chunk-be67vfx1.js.br +0 -0
  734. package/web/chunk-be67vfx1.js.gz +0 -0
  735. package/web/chunk-bt6r78y9.js +0 -106
  736. package/web/chunk-bt6r78y9.js.br +0 -0
  737. package/web/chunk-bt6r78y9.js.gz +0 -0
  738. package/web/chunk-bvyjy17t.js +0 -14
  739. package/web/chunk-bvyjy17t.js.br +0 -0
  740. package/web/chunk-bvyjy17t.js.gz +0 -0
  741. package/web/chunk-c97th1x0.js +0 -1
  742. package/web/chunk-c97th1x0.js.br +0 -0
  743. package/web/chunk-c97th1x0.js.gz +0 -0
  744. package/web/chunk-cfkp7taw.js +0 -1
  745. package/web/chunk-cfkp7taw.js.br +0 -0
  746. package/web/chunk-cfkp7taw.js.gz +0 -0
  747. package/web/chunk-cvf9k1fy.js +0 -140
  748. package/web/chunk-cvf9k1fy.js.br +0 -0
  749. package/web/chunk-cvf9k1fy.js.gz +0 -0
  750. package/web/chunk-d33n9fsr.js +0 -1
  751. package/web/chunk-d33n9fsr.js.br +0 -1
  752. package/web/chunk-d33n9fsr.js.gz +0 -0
  753. package/web/chunk-e667nxc9.js +0 -1
  754. package/web/chunk-e667nxc9.js.br +0 -0
  755. package/web/chunk-e667nxc9.js.gz +0 -0
  756. package/web/chunk-eejjsqm1.js +0 -303
  757. package/web/chunk-eejjsqm1.js.br +0 -0
  758. package/web/chunk-eejjsqm1.js.gz +0 -0
  759. package/web/chunk-eg3qjy7a.js +0 -2
  760. package/web/chunk-eg3qjy7a.js.br +0 -0
  761. package/web/chunk-eg3qjy7a.js.gz +0 -0
  762. package/web/chunk-embvjvdj.js +0 -12
  763. package/web/chunk-embvjvdj.js.br +0 -0
  764. package/web/chunk-embvjvdj.js.gz +0 -0
  765. package/web/chunk-etjfr79m.js +0 -2
  766. package/web/chunk-etjfr79m.js.br +0 -0
  767. package/web/chunk-etjfr79m.js.gz +0 -0
  768. package/web/chunk-ez36gbz3.js +0 -7
  769. package/web/chunk-ez36gbz3.js.br +0 -0
  770. package/web/chunk-ez36gbz3.js.gz +0 -0
  771. package/web/chunk-f0vcm8mk.js +0 -214
  772. package/web/chunk-f0vcm8mk.js.br +0 -0
  773. package/web/chunk-f0vcm8mk.js.gz +0 -0
  774. package/web/chunk-f3t3ey83.js +0 -1
  775. package/web/chunk-f3t3ey83.js.br +0 -0
  776. package/web/chunk-f3t3ey83.js.gz +0 -0
  777. package/web/chunk-f84sngcq.js +0 -2
  778. package/web/chunk-f84sngcq.js.br +0 -0
  779. package/web/chunk-f84sngcq.js.gz +0 -0
  780. package/web/chunk-f97hz4v5.js +0 -99
  781. package/web/chunk-f97hz4v5.js.br +0 -0
  782. package/web/chunk-f97hz4v5.js.gz +0 -0
  783. package/web/chunk-fnkp6s0g.js +0 -1
  784. package/web/chunk-fnkp6s0g.js.br +0 -0
  785. package/web/chunk-fnkp6s0g.js.gz +0 -0
  786. package/web/chunk-fpdyzyn8.js +0 -16
  787. package/web/chunk-fpdyzyn8.js.br +0 -0
  788. package/web/chunk-fpdyzyn8.js.gz +0 -0
  789. package/web/chunk-g43z223a.js +0 -2
  790. package/web/chunk-g43z223a.js.br +0 -0
  791. package/web/chunk-g43z223a.js.gz +0 -0
  792. package/web/chunk-gcm82aj8.js +0 -1
  793. package/web/chunk-gcm82aj8.js.br +0 -0
  794. package/web/chunk-gcm82aj8.js.gz +0 -0
  795. package/web/chunk-gffb3p4z.js +0 -2
  796. package/web/chunk-gffb3p4z.js.br +0 -0
  797. package/web/chunk-gffb3p4z.js.gz +0 -0
  798. package/web/chunk-gnzg3krt.js +0 -1
  799. package/web/chunk-gnzg3krt.js.br +0 -0
  800. package/web/chunk-gnzg3krt.js.gz +0 -0
  801. package/web/chunk-grqtpfdp.js +0 -2
  802. package/web/chunk-grqtpfdp.js.br +0 -0
  803. package/web/chunk-grqtpfdp.js.gz +0 -0
  804. package/web/chunk-gsm8spf8.js +0 -1
  805. package/web/chunk-gsm8spf8.js.br +0 -0
  806. package/web/chunk-gsm8spf8.js.gz +0 -0
  807. package/web/chunk-h6ygrnd0.js +0 -38
  808. package/web/chunk-h6ygrnd0.js.br +0 -0
  809. package/web/chunk-h6ygrnd0.js.gz +0 -0
  810. package/web/chunk-h8n9w5th.js +0 -169
  811. package/web/chunk-h8n9w5th.js.br +0 -0
  812. package/web/chunk-h8n9w5th.js.gz +0 -0
  813. package/web/chunk-hmdvm5pp.js +0 -2
  814. package/web/chunk-hmdvm5pp.js.br +0 -0
  815. package/web/chunk-hmdvm5pp.js.gz +0 -0
  816. package/web/chunk-hrntwvx8.js +0 -1
  817. package/web/chunk-hrntwvx8.js.br +0 -0
  818. package/web/chunk-hrntwvx8.js.gz +0 -0
  819. package/web/chunk-hrys15jh.js +0 -324
  820. package/web/chunk-hrys15jh.js.br +0 -0
  821. package/web/chunk-hrys15jh.js.gz +0 -0
  822. package/web/chunk-j0ng7zdq.js +0 -41
  823. package/web/chunk-j0ng7zdq.js.br +0 -0
  824. package/web/chunk-j0ng7zdq.js.gz +0 -0
  825. package/web/chunk-j2t5ycte.js +0 -78
  826. package/web/chunk-j2t5ycte.js.br +0 -0
  827. package/web/chunk-j2t5ycte.js.gz +0 -0
  828. package/web/chunk-jkjd1y3p.js +0 -3
  829. package/web/chunk-jkjd1y3p.js.br +0 -0
  830. package/web/chunk-jkjd1y3p.js.gz +0 -0
  831. package/web/chunk-jweahmyy.js +0 -1
  832. package/web/chunk-jweahmyy.js.br +0 -0
  833. package/web/chunk-jweahmyy.js.gz +0 -0
  834. package/web/chunk-k56v8k7n.js +0 -4
  835. package/web/chunk-k56v8k7n.js.br +0 -0
  836. package/web/chunk-k56v8k7n.js.gz +0 -0
  837. package/web/chunk-k59sk88z.js +0 -7
  838. package/web/chunk-k59sk88z.js.br +0 -0
  839. package/web/chunk-k59sk88z.js.gz +0 -0
  840. package/web/chunk-k75a0fpt.js +0 -62
  841. package/web/chunk-k75a0fpt.js.br +0 -0
  842. package/web/chunk-k75a0fpt.js.gz +0 -0
  843. package/web/chunk-kfx9q7xv.js +0 -2
  844. package/web/chunk-kfx9q7xv.js.br +0 -0
  845. package/web/chunk-kfx9q7xv.js.gz +0 -0
  846. package/web/chunk-ksp1gg3v.js +0 -1
  847. package/web/chunk-ksp1gg3v.js.br +0 -0
  848. package/web/chunk-ksp1gg3v.js.gz +0 -0
  849. package/web/chunk-kxxp1mn4.js +0 -2
  850. package/web/chunk-kxxp1mn4.js.br +0 -0
  851. package/web/chunk-kxxp1mn4.js.gz +0 -0
  852. package/web/chunk-mapbxzsz.js +0 -1
  853. package/web/chunk-mapbxzsz.js.br +0 -0
  854. package/web/chunk-mapbxzsz.js.gz +0 -0
  855. package/web/chunk-msw43fnq.js +0 -2
  856. package/web/chunk-msw43fnq.js.br +0 -0
  857. package/web/chunk-msw43fnq.js.gz +0 -0
  858. package/web/chunk-mzzjg4sn.js +0 -2
  859. package/web/chunk-mzzjg4sn.js.br +0 -0
  860. package/web/chunk-mzzjg4sn.js.gz +0 -0
  861. package/web/chunk-n1bmcj13.js +0 -2
  862. package/web/chunk-n1bmcj13.js.br +0 -0
  863. package/web/chunk-n1bmcj13.js.gz +0 -0
  864. package/web/chunk-n5y4ar3e.js +0 -1
  865. package/web/chunk-n5y4ar3e.js.br +0 -0
  866. package/web/chunk-n5y4ar3e.js.gz +0 -0
  867. package/web/chunk-n9vszqw9.js +0 -1
  868. package/web/chunk-n9vszqw9.js.br +0 -0
  869. package/web/chunk-n9vszqw9.js.gz +0 -0
  870. package/web/chunk-nzzcmxq8.js +0 -1
  871. package/web/chunk-nzzcmxq8.js.br +0 -0
  872. package/web/chunk-nzzcmxq8.js.gz +0 -0
  873. package/web/chunk-p25eppk1.js +0 -1
  874. package/web/chunk-p25eppk1.js.br +0 -0
  875. package/web/chunk-p25eppk1.js.gz +0 -0
  876. package/web/chunk-p9352vpw.js +0 -1
  877. package/web/chunk-p9352vpw.js.br +0 -0
  878. package/web/chunk-p9352vpw.js.gz +0 -0
  879. package/web/chunk-pdvm4n6f.js +0 -1
  880. package/web/chunk-pdvm4n6f.js.br +0 -2
  881. package/web/chunk-pdvm4n6f.js.gz +0 -0
  882. package/web/chunk-pjm2t9da.js +0 -1
  883. package/web/chunk-pjm2t9da.js.br +0 -0
  884. package/web/chunk-pjm2t9da.js.gz +0 -0
  885. package/web/chunk-pka3qm06.js +0 -98
  886. package/web/chunk-pka3qm06.js.br +0 -0
  887. package/web/chunk-pka3qm06.js.gz +0 -0
  888. package/web/chunk-pkbcbta6.js +0 -1
  889. package/web/chunk-pkbcbta6.js.br +0 -0
  890. package/web/chunk-pkbcbta6.js.gz +0 -0
  891. package/web/chunk-pq4vn3zh.js +0 -1
  892. package/web/chunk-pq4vn3zh.js.br +0 -0
  893. package/web/chunk-pq4vn3zh.js.gz +0 -0
  894. package/web/chunk-prk9ks5j.js +0 -1
  895. package/web/chunk-prk9ks5j.js.br +0 -0
  896. package/web/chunk-prk9ks5j.js.gz +0 -0
  897. package/web/chunk-px68tdjm.js +0 -1
  898. package/web/chunk-px68tdjm.js.br +0 -2
  899. package/web/chunk-px68tdjm.js.gz +0 -0
  900. package/web/chunk-px8k5edz.js +0 -24
  901. package/web/chunk-px8k5edz.js.br +0 -0
  902. package/web/chunk-px8k5edz.js.gz +0 -0
  903. package/web/chunk-pz4g2bem.js +0 -292
  904. package/web/chunk-pz4g2bem.js.br +0 -0
  905. package/web/chunk-pz4g2bem.js.gz +0 -0
  906. package/web/chunk-q0gx75nf.js +0 -55
  907. package/web/chunk-q0gx75nf.js.br +0 -0
  908. package/web/chunk-q0gx75nf.js.gz +0 -0
  909. package/web/chunk-q9rpxfmm.js +0 -1
  910. package/web/chunk-q9rpxfmm.js.br +0 -0
  911. package/web/chunk-q9rpxfmm.js.gz +0 -0
  912. package/web/chunk-qpfhs1x0.js +0 -1
  913. package/web/chunk-qpfhs1x0.js.br +0 -0
  914. package/web/chunk-qpfhs1x0.js.gz +0 -0
  915. package/web/chunk-qredmg6m.js +0 -1
  916. package/web/chunk-qredmg6m.js.br +0 -0
  917. package/web/chunk-qredmg6m.js.gz +0 -0
  918. package/web/chunk-qtc9ar2m.js +0 -2
  919. package/web/chunk-qtc9ar2m.js.br +0 -0
  920. package/web/chunk-qtc9ar2m.js.gz +0 -0
  921. package/web/chunk-r5dsw56r.js +0 -1
  922. package/web/chunk-r5dsw56r.js.br +0 -0
  923. package/web/chunk-r5dsw56r.js.gz +0 -0
  924. package/web/chunk-rkaps675.js +0 -1
  925. package/web/chunk-rkaps675.js.br +0 -0
  926. package/web/chunk-rkaps675.js.gz +0 -0
  927. package/web/chunk-rp87pgcp.js +0 -40
  928. package/web/chunk-rp87pgcp.js.br +0 -0
  929. package/web/chunk-rp87pgcp.js.gz +0 -0
  930. package/web/chunk-rs1mtd35.js +0 -2
  931. package/web/chunk-rs1mtd35.js.br +0 -0
  932. package/web/chunk-rs1mtd35.js.gz +0 -0
  933. package/web/chunk-s31n33g5.js +0 -2
  934. package/web/chunk-s31n33g5.js.br +0 -0
  935. package/web/chunk-s31n33g5.js.gz +0 -0
  936. package/web/chunk-sbcyvn42.js +0 -1
  937. package/web/chunk-sbcyvn42.js.br +0 -0
  938. package/web/chunk-sbcyvn42.js.gz +0 -0
  939. package/web/chunk-sew9vfwy.js +0 -1
  940. package/web/chunk-sew9vfwy.js.br +0 -0
  941. package/web/chunk-sew9vfwy.js.gz +0 -0
  942. package/web/chunk-sgaw26nc.js +0 -2
  943. package/web/chunk-sgaw26nc.js.br +0 -0
  944. package/web/chunk-sgaw26nc.js.gz +0 -0
  945. package/web/chunk-t2ak4a9d.js +0 -1
  946. package/web/chunk-t2ak4a9d.js.br +0 -0
  947. package/web/chunk-t2ak4a9d.js.gz +0 -0
  948. package/web/chunk-ta0e3dk6.js +0 -2
  949. package/web/chunk-ta0e3dk6.js.br +0 -0
  950. package/web/chunk-ta0e3dk6.js.gz +0 -0
  951. package/web/chunk-tqax5mb6.js +0 -217
  952. package/web/chunk-tqax5mb6.js.br +0 -0
  953. package/web/chunk-tqax5mb6.js.gz +0 -0
  954. package/web/chunk-v1wxeq38.js +0 -2
  955. package/web/chunk-v1wxeq38.js.br +0 -0
  956. package/web/chunk-v1wxeq38.js.gz +0 -0
  957. package/web/chunk-v3kwg4zn.js +0 -2
  958. package/web/chunk-v3kwg4zn.js.br +0 -0
  959. package/web/chunk-v3kwg4zn.js.gz +0 -0
  960. package/web/chunk-vcpvhkxh.js +0 -39
  961. package/web/chunk-vcpvhkxh.js.br +0 -0
  962. package/web/chunk-vcpvhkxh.js.gz +0 -0
  963. package/web/chunk-vg9qv3aa.js +0 -1
  964. package/web/chunk-vg9qv3aa.js.br +0 -0
  965. package/web/chunk-vg9qv3aa.js.gz +0 -0
  966. package/web/chunk-vwxnt3nh.js +0 -1
  967. package/web/chunk-vwxnt3nh.js.br +0 -0
  968. package/web/chunk-vwxnt3nh.js.gz +0 -0
  969. package/web/chunk-w1xjqhwy.js +0 -1
  970. package/web/chunk-w1xjqhwy.js.br +0 -2
  971. package/web/chunk-w1xjqhwy.js.gz +0 -0
  972. package/web/chunk-w3nfxvzd.js +0 -1
  973. package/web/chunk-w3nfxvzd.js.br +0 -0
  974. package/web/chunk-w3nfxvzd.js.gz +0 -0
  975. package/web/chunk-w7h3x3ys.js +0 -1
  976. package/web/chunk-w7h3x3ys.js.br +0 -0
  977. package/web/chunk-w7h3x3ys.js.gz +0 -0
  978. package/web/chunk-wb0yn3r4.js +0 -8
  979. package/web/chunk-wb0yn3r4.js.br +0 -0
  980. package/web/chunk-wb0yn3r4.js.gz +0 -0
  981. package/web/chunk-wff6hqjf.js +0 -1
  982. package/web/chunk-wff6hqjf.js.br +0 -0
  983. package/web/chunk-wff6hqjf.js.gz +0 -0
  984. package/web/chunk-whj4e4sb.js +0 -89
  985. package/web/chunk-whj4e4sb.js.br +0 -0
  986. package/web/chunk-whj4e4sb.js.gz +0 -0
  987. package/web/chunk-wn3kdpj0.js +0 -1
  988. package/web/chunk-wn3kdpj0.js.br +0 -0
  989. package/web/chunk-wn3kdpj0.js.gz +0 -0
  990. package/web/chunk-wzq3qxpb.js +0 -1
  991. package/web/chunk-wzq3qxpb.js.br +0 -0
  992. package/web/chunk-wzq3qxpb.js.gz +0 -0
  993. package/web/chunk-x2tezwv1.js +0 -4
  994. package/web/chunk-x2tezwv1.js.br +0 -0
  995. package/web/chunk-x2tezwv1.js.gz +0 -0
  996. package/web/chunk-xmajh4qe.js +0 -2
  997. package/web/chunk-xmajh4qe.js.br +0 -0
  998. package/web/chunk-xmajh4qe.js.gz +0 -0
  999. package/web/chunk-xz7py7yx.js +0 -1
  1000. package/web/chunk-xz7py7yx.js.br +0 -0
  1001. package/web/chunk-xz7py7yx.js.gz +0 -0
  1002. package/web/chunk-y4af9gsm.js +0 -291
  1003. package/web/chunk-y4af9gsm.js.br +0 -0
  1004. package/web/chunk-y4af9gsm.js.gz +0 -0
  1005. package/web/chunk-y512gr5a.js +0 -332
  1006. package/web/chunk-y512gr5a.js.br +0 -0
  1007. package/web/chunk-y512gr5a.js.gz +0 -0
  1008. package/web/chunk-ywg44m2b.js +0 -2
  1009. package/web/chunk-ywg44m2b.js.br +0 -0
  1010. package/web/chunk-ywg44m2b.js.gz +0 -0
  1011. package/web/chunk-zhzp4fm1.js +0 -2
  1012. package/web/chunk-zhzp4fm1.js.br +0 -0
  1013. package/web/chunk-zhzp4fm1.js.gz +0 -0
@@ -0,0 +1,2 @@
1
+ // @bun
2
+ import{Cn,br,Wr,Hr,zr,qr,In,Mn,wr,On,Ln,Dn,Nn,Un,Fn}from"./chunk-h8qhy3px.js";import{A}from"./chunk-rhkw8ygf.js";import{ue}from"./chunk-x0afp8wt.js";import{Q,te}from"./chunk-tnay319j.js";import{re}from"./chunk-yq20v3va.js";import{v}from"./chunk-fsekbhqb.js";import{ke}from"./chunk-9nkb5q43.js";import{G,ve,me,tt,oe,Y}from"./chunk-4qtw5cga.js";import{W}from"./chunk-nbgtqpay.js";var T="v1",O="gcp-vertex-credentials",R=0,C=(e,o,t)=>{let i=new W,u=tt(o);return(async()=>{let n={role:"assistant",content:[],api:"google-vertex",provider:e.provider,model:e.id,usage:{input:0,output:0,cacheRead:0,cacheWrite:0,totalTokens:0,cost:{input:0,output:0,cacheRead:0,cacheWrite:0,total:0}},stopReason:"pending",timestamp:Date.now()};try{if(t?.fetch&&t.fetch!==globalThis.fetch)throw Error("Custom fetch is not supported by the Google Vertex adapter");let c=L(t),g=c?S(e,c,t?.headers):I(e,P(t),U(t),t?.headers,t?.env),h=D(e,u,t),m=await t?.onPayload?.(h,e);if(m!==void 0)h=m;let p=await Fn(()=>g.models.generateContentStream(h),t);i.push({type:"start",partial:n});let r=null,f=n.content,l=()=>f.length-1;for await(let s of p){await t?.onProviderStreamEvent?.(s,e),n.responseId||=s.responseId;let k=s.candidates?.[0];if(k?.content?.parts)for(let a of k.content.parts){if(a.text!==void 0){let d=Mn(a);if(!r||d&&r.type!=="thinking"||!d&&r.type!=="text"){if(r)if(r.type==="text")i.push({type:"text_end",contentIndex:f.length-1,content:r.text,partial:n});else i.push({type:"thinking_end",contentIndex:l(),content:r.thinking,partial:n});if(d)r={type:"thinking",thinking:"",thinkingSignature:void 0},n.content.push(r),i.push({type:"thinking_start",contentIndex:l(),partial:n});else r={type:"text",text:""},n.content.push(r),i.push({type:"text_start",contentIndex:l(),partial:n})}if(r.type==="thinking")r.thinking+=a.text,r.thinkingSignature=wr(r.thinkingSignature,a.thoughtSignature),i.push({type:"thinking_delta",contentIndex:l(),delta:a.text,partial:n});else r.text+=a.text,r.textSignature=wr(r.textSignature,a.thoughtSignature),i.push({type:"text_delta",contentIndex:l(),delta:a.text,partial:n})}if(a.functionCall){if(r){if(r.type==="text")i.push({type:"text_end",contentIndex:l(),content:r.text,partial:n});else i.push({type:"thinking_end",contentIndex:l(),content:r.thinking,partial:n});r=null}let d=a.functionCall.id,y={type:"toolCall",id:!d||n.content.some((x)=>x.type==="toolCall"&&x.id===d)?`${a.functionCall.name}_${Date.now()}_${++R}`:d,name:a.functionCall.name||"",arguments:a.functionCall.args??{},...a.thoughtSignature&&{thoughtSignature:a.thoughtSignature}};n.content.push(y),i.push({type:"toolcall_start",contentIndex:l(),partial:n}),i.push({type:"toolcall_delta",contentIndex:l(),delta:JSON.stringify(y.arguments),partial:n}),i.push({type:"toolcall_end",contentIndex:l(),toolCall:y,partial:n})}}if(k?.finishReason){if(n.rawStopReason=k.finishReason,n.stopReason=Un(k.finishReason),n.content.some((a)=>a.type==="toolCall")&&n.stopReason==="stop")n.stopReason="toolUse"}if(s.usageMetadata)n.usage={input:(s.usageMetadata.promptTokenCount||0)-(s.usageMetadata.cachedContentTokenCount||0),output:(s.usageMetadata.candidatesTokenCount||0)+(s.usageMetadata.thoughtsTokenCount||0),cacheRead:s.usageMetadata.cachedContentTokenCount||0,cacheWrite:0,reasoning:s.usageMetadata.thoughtsTokenCount||0,totalTokens:s.usageMetadata.totalTokenCount||0,cost:{input:0,output:0,cacheRead:0,cacheWrite:0,total:0}},oe(e,n.usage)}if(r)if(r.type==="text")i.push({type:"text_end",contentIndex:l(),content:r.text,partial:n});else i.push({type:"thinking_end",contentIndex:l(),content:r.thinking,partial:n});if(t?.signal?.aborted)throw Error("Request was aborted");if(n.stopReason==="pending")throw Error("Google Vertex stream ended without a finish reason");if(n.stopReason==="aborted"||n.stopReason==="error"){let s=n.rawStopReason?`Provider stopped with: ${n.rawStopReason}`:"An unknown error occurred";throw Error(s)}i.push({type:"done",reason:n.stopReason,message:n}),i.end()}catch(c){for(let g of n.content)if("index"in g)delete g.index;n.stopReason=t?.signal?.aborted?"aborted":"error",n.errorMessage=te(Q(c)),i.push({type:"error",reason:n.stopReason,error:n}),i.end()}})(),i},ae=(e,o,t)=>{let i={...re(e,o,t,void 0),toolChoice:t?.toolChoice};if(!t?.reasoning)return C(e,o,{...i,thinking:{enabled:!1}});let u=Y(e,t.reasoning);if(u==="off")return C(e,o,{...i,thinking:{enabled:!1}});let n=Wr(e,u);if(Hr(e))return C(e,o,{...i,thinking:{enabled:!0,level:zr(n)}});return C(e,o,{...i,thinking:{enabled:!0,budgetTokens:V(e,n,t.thinkingBudgets)}})};function I(e,o,t,i,u){let n=E(u);return new br({vertexai:!0,project:o,location:t,apiVersion:T,...n?{googleAuthOptions:n}:{},httpOptions:b(e,i)})}function S(e,o,t){return new br({vertexai:!0,apiKey:o,apiVersion:T,httpOptions:b(e,t)})}function b(e,o){let t={},i=w(e.baseUrl);if(i){if(t.baseUrl=i,t.baseUrlResourceScope=Cn.COLLECTION,_(i))t.apiVersion=""}let u=ke({"User-Agent":ue(),...e.headers,...o});if(u)t.headers=u;return Object.keys(t).length>0?t:void 0}function w(e){let o=e.trim();if(!o||o.includes("{location}"))return;return o}function _(e){try{return new URL(e).pathname.split("/").some((t)=>/^v\d+(?:beta\d*)?$/.test(t))}catch{return/(?:^|\/)v\d+(?:beta\d*)?(?:\/|$)/.test(e)}}function E(e){let o=A("GOOGLE_APPLICATION_CREDENTIALS",e);return o?{keyFilename:o}:void 0}function L(e){let o=e?.apiKey?.trim();if(!o||o===O||M(o))return;return o}function M(e){return/^<[^>]+>$/.test(e)}function P(e){let o=e?.project||A("GOOGLE_CLOUD_PROJECT",e?.env)||A("GCLOUD_PROJECT",e?.env);if(!o)throw Error("Vertex AI requires a project ID. Set GOOGLE_CLOUD_PROJECT/GCLOUD_PROJECT or pass project in options.");return o}function U(e){let o=e?.location||A("GOOGLE_CLOUD_LOCATION",e?.env);if(!o)throw Error("Vertex AI requires a location. Set GOOGLE_CLOUD_LOCATION or pass location in options.");return o}function D(e,o,t={}){let i=On(e,o),u=ve(o.messages),n=me(o.messages),c={};if(t.temperature!==void 0)c.temperature=t.temperature;if(t.maxTokens!==void 0)c.maxOutputTokens=t.maxTokens;let g=Dn(e.id),h=n.length>0?Nn(n,t.toolChoice,g):void 0,m=u?G(u):"",p={...Object.keys(c).length>0&&c,...m&&{systemInstruction:v(m)},...n.length>0&&{tools:Ln(n,!1,g)},...h!==void 0&&{toolConfig:{functionCallingConfig:{mode:h}}}};if(t.thinking?.enabled&&e.reasoning){let f={includeThoughts:!0};if(t.thinking.level!==void 0)f.thinkingLevel=qr(t.thinking.level);else if(t.thinking.budgetTokens!==void 0)f.thinkingBudget=t.thinking.budgetTokens;p.thinkingConfig=f}else if(e.reasoning&&t.thinking&&!t.thinking.enabled)p.thinkingConfig=In(e);if(t.signal){if(t.signal.aborted)throw Error("Request aborted");p.abortSignal=t.signal}return{model:e.id,contents:i,config:p}}function V(e,o,t){if(t?.[o]!==void 0)return t[o];if(e.id.includes("2.5-pro"))return{minimal:128,low:2048,medium:8192,high:32768}[o];if(e.id.includes("2.5-flash"))return{minimal:128,low:2048,medium:8192,high:24576}[o];return-1}export{C as stream,ae as streamSimple};
@@ -0,0 +1,3 @@
1
+ // @bun
2
+ import{f,g,y}from"./chunk-fvmrsrmq.js";import{ce}from"./chunk-4qtw5cga.js";var c=function(t,i){if(typeof t==="string"&&/^\.\.?\//.test(t))return t.replace(/\.(tsx)$|((?:\.d)?)((?:\.[^./]+?)?)\.([cm]?)ts$/i,function(e,a,o,s,p){return a?i?".jsx":".js":o&&(!s||!p)?e:o+s+"."+p.toLowerCase()+"js"});return t},h=(t)=>{let i=import.meta.url.endsWith(".js")?t.replace(/\.ts$/,".js"):t;return import(c(i))},r;function fa(t){r=t}var ga=()=>ce(async()=>r??await h("./bedrock-converse-stream.ts"));var n={"anthropic-messages":{"chat:claude-fable-5":{id:"claude-fable-5",name:"Claude Fable 5",api:"anthropic-messages",provider:"github-copilot",baseUrl:"https://api.individual.githubcopilot.com",reasoning:!0,input:["text","image"],cost:{input:10,output:50,cacheRead:1,cacheWrite:12.5},contextWindow:1e6,maxTokens:128000,headers:{"User-Agent":"GitHubCopilotChat/0.35.0","Editor-Version":"vscode/1.107.0","Editor-Plugin-Version":"copilot-chat/0.35.0","Copilot-Integration-Id":"vscode-chat"},compat:{supportsMidConvoSystemMessages:!0,forceAdaptiveThinking:!0},thinkingLevelMap:{off:null,xhigh:"xhigh",max:"max"},inputLimits:{images:{resize:{maxWidth:2000,maxHeight:2000,maxBytes:4718592,jpegQuality:80}}},type:"chat"},"chat:claude-fable-5.1":{id:"claude-fable-5.1",name:"Claude Fable 5.1",api:"anthropic-messages",provider:"github-copilot",baseUrl:"https://api.individual.githubcopilot.com",reasoning:!0,input:["text","image"],cost:{input:10,output:50,cacheRead:0.25,cacheWrite:12.5},contextWindow:1e6,maxTokens:128000,headers:{"User-Agent":"GitHubCopilotChat/0.35.0","Editor-Version":"vscode/1.107.0","Editor-Plugin-Version":"copilot-chat/0.35.0","Copilot-Integration-Id":"vscode-chat"},compat:{supportsMidConvoSystemMessages:!0,forceAdaptiveThinking:!0},thinkingLevelMap:{off:null,xhigh:"xhigh",max:"max"},inputLimits:{images:{resize:{maxWidth:2000,maxHeight:2000,maxBytes:4718592,jpegQuality:80}}},type:"chat"},"chat:claude-haiku-4.5":{id:"claude-haiku-4.5",name:"Claude Haiku 4.5 (latest)",api:"anthropic-messages",provider:"github-copilot",baseUrl:"https://api.individual.githubcopilot.com",reasoning:!0,input:["text","image"],cost:{input:1,output:5,cacheRead:0.1,cacheWrite:1.25},contextWindow:200000,maxTokens:64000,headers:{"User-Agent":"GitHubCopilotChat/0.35.0","Editor-Version":"vscode/1.107.0","Editor-Plugin-Version":"copilot-chat/0.35.0","Copilot-Integration-Id":"vscode-chat"},compat:{supportsEagerToolInputStreaming:!1},inputLimits:{images:{resize:{maxWidth:2000,maxHeight:2000,maxBytes:4718592,jpegQuality:80}}},type:"chat"},"chat:claude-haiku-5.5":{id:"claude-haiku-5.5",name:"Claude Haiku 5.5",api:"anthropic-messages",provider:"github-copilot",baseUrl:"https://api.individual.githubcopilot.com",reasoning:!0,input:["text","image"],cost:{input:0.1,output:0.5,cacheRead:0.01,cacheWrite:0.125,tiers:[{inputTokensAbove:1e5,input:0.5,output:2.5,cacheRead:0.05,cacheWrite:0.625}]},contextWindow:1e6,maxTokens:128000,headers:{"User-Agent":"GitHubCopilotChat/0.35.0","Editor-Version":"vscode/1.107.0","Editor-Plugin-Version":"copilot-chat/0.35.0","Copilot-Integration-Id":"vscode-chat"},compat:{supportsMidConvoSystemMessages:!0,forceAdaptiveThinking:!0,supportsTemperature:!1},thinkingLevelMap:{xhigh:"xhigh",max:"max"},inputLimits:{images:{resize:{maxWidth:2000,maxHeight:2000,maxBytes:4718592,jpegQuality:80}}},type:"chat"},"chat:claude-opus-4.7":{id:"claude-opus-4.7",name:"Claude Opus 4.7",api:"anthropic-messages",provider:"github-copilot",baseUrl:"https://api.individual.githubcopilot.com",reasoning:!0,input:["text","image"],cost:{input:5,output:25,cacheRead:0.5,cacheWrite:6.25},contextWindow:1e6,maxTokens:32000,headers:{"User-Agent":"GitHubCopilotChat/0.35.0","Editor-Version":"vscode/1.107.0","Editor-Plugin-Version":"copilot-chat/0.35.0","Copilot-Integration-Id":"vscode-chat"},thinkingLevelMap:{xhigh:"xhigh",max:"max",minimal:"low"},compat:{forceAdaptiveThinking:!0,supportsTemperature:!1},inputLimits:{images:{resize:{maxWidth:2000,maxHeight:2000,maxBytes:4718592,jpegQuality:80}}},type:"chat"},"chat:claude-opus-4.8":{id:"claude-opus-4.8",name:"Claude Opus 4.8",api:"anthropic-messages",provider:"github-copilot",baseUrl:"https://api.individual.githubcopilot.com",reasoning:!0,input:["text","image"],cost:{input:5,output:25,cacheRead:0.5,cacheWrite:6.25},contextWindow:1e6,maxTokens:64000,headers:{"User-Agent":"GitHubCopilotChat/0.35.0","Editor-Version":"vscode/1.107.0","Editor-Plugin-Version":"copilot-chat/0.35.0","Copilot-Integration-Id":"vscode-chat"},compat:{supportsMidConvoSystemMessages:!0,forceAdaptiveThinking:!0,supportsTemperature:!1},thinkingLevelMap:{xhigh:"xhigh",max:"max",minimal:"low"},inputLimits:{images:{resize:{maxWidth:2000,maxHeight:2000,maxBytes:4718592,jpegQuality:80}}},type:"chat"},"chat:claude-opus-5":{id:"claude-opus-5",name:"Claude Opus 5",api:"anthropic-messages",provider:"github-copilot",baseUrl:"https://api.individual.githubcopilot.com",reasoning:!0,input:["text","image"],cost:{input:5,output:25,cacheRead:0.5,cacheWrite:6.25},contextWindow:1e6,maxTokens:64000,headers:{"User-Agent":"GitHubCopilotChat/0.35.0","Editor-Version":"vscode/1.107.0","Editor-Plugin-Version":"copilot-chat/0.35.0","Copilot-Integration-Id":"vscode-chat"},compat:{supportsMidConvoSystemMessages:!0,forceAdaptiveThinking:!0,supportsTemperature:!1},thinkingLevelMap:{xhigh:"xhigh",max:"max",minimal:"low"},inputLimits:{images:{resize:{maxWidth:2000,maxHeight:2000,maxBytes:4718592,jpegQuality:80}}},type:"chat"},"chat:claude-opus-5.5":{id:"claude-opus-5.5",name:"Claude Opus 5.5",api:"anthropic-messages",provider:"github-copilot",baseUrl:"https://api.individual.githubcopilot.com",reasoning:!0,input:["text","image"],cost:{input:4,output:20,cacheRead:0.2,cacheWrite:5},contextWindow:1e6,maxTokens:128000,headers:{"User-Agent":"GitHubCopilotChat/0.35.0","Editor-Version":"vscode/1.107.0","Editor-Plugin-Version":"copilot-chat/0.35.0","Copilot-Integration-Id":"vscode-chat"},compat:{supportsMidConvoSystemMessages:!0,forceAdaptiveThinking:!0,supportsTemperature:!1},thinkingLevelMap:{off:null,minimal:null,low:"low",medium:"medium",high:"high",xhigh:"xhigh",max:"max"},inputLimits:{images:{resize:{maxWidth:2000,maxHeight:2000,maxBytes:4718592,jpegQuality:80}}},type:"chat"},"chat:claude-sonnet-4.6":{id:"claude-sonnet-4.6",name:"Claude Sonnet 4.6",api:"anthropic-messages",provider:"github-copilot",baseUrl:"https://api.individual.githubcopilot.com",reasoning:!0,input:["text","image"],cost:{input:3,output:15,cacheRead:0.3,cacheWrite:3.75},contextWindow:1e6,maxTokens:32000,headers:{"User-Agent":"GitHubCopilotChat/0.35.0","Editor-Version":"vscode/1.107.0","Editor-Plugin-Version":"copilot-chat/0.35.0","Copilot-Integration-Id":"vscode-chat"},thinkingLevelMap:{max:"max",minimal:"low"},compat:{forceAdaptiveThinking:!0},inputLimits:{images:{resize:{maxWidth:2000,maxHeight:2000,maxBytes:4718592,jpegQuality:80}}},type:"chat"},"chat:claude-sonnet-5":{id:"claude-sonnet-5",name:"Claude Sonnet 5",api:"anthropic-messages",provider:"github-copilot",baseUrl:"https://api.individual.githubcopilot.com",reasoning:!0,input:["text","image"],cost:{input:2,output:10,cacheRead:0.2,cacheWrite:2.5},contextWindow:1e6,maxTokens:128000,headers:{"User-Agent":"GitHubCopilotChat/0.35.0","Editor-Version":"vscode/1.107.0","Editor-Plugin-Version":"copilot-chat/0.35.0","Copilot-Integration-Id":"vscode-chat"},thinkingLevelMap:{xhigh:"xhigh",max:"max"},compat:{forceAdaptiveThinking:!0},inputLimits:{images:{resize:{maxWidth:2000,maxHeight:2000,maxBytes:4718592,jpegQuality:80}}},type:"chat"},"chat:claude-sonnet-5.5":{id:"claude-sonnet-5.5",name:"Claude Sonnet 5.5",api:"anthropic-messages",provider:"github-copilot",baseUrl:"https://api.individual.githubcopilot.com",reasoning:!0,input:["text","image"],cost:{input:2,output:10,cacheRead:0.1,cacheWrite:2.5},contextWindow:1e6,maxTokens:128000,headers:{"User-Agent":"GitHubCopilotChat/0.35.0","Editor-Version":"vscode/1.107.0","Editor-Plugin-Version":"copilot-chat/0.35.0","Copilot-Integration-Id":"vscode-chat"},compat:{supportsMidConvoSystemMessages:!0,forceAdaptiveThinking:!0,supportsTemperature:!1},thinkingLevelMap:{xhigh:"xhigh",max:"max"},inputLimits:{images:{resize:{maxWidth:2000,maxHeight:2000,maxBytes:4718592,jpegQuality:80}}},type:"chat"}},"openai-completions":{"chat:gemini-3.5-flash":{id:"gemini-3.5-flash",name:"Gemini 3.5 Flash",api:"openai-completions",provider:"github-copilot",baseUrl:"https://api.individual.githubcopilot.com",reasoning:!0,input:["text","image"],cost:{input:1.5,output:9,cacheRead:0.15,cacheWrite:0},contextWindow:200000,maxTokens:64000,headers:{"User-Agent":"GitHubCopilotChat/0.35.0","Editor-Version":"vscode/1.107.0","Editor-Plugin-Version":"copilot-chat/0.35.0","Copilot-Integration-Id":"vscode-chat"},compat:{supportsStrictMode:!0,supportsStore:!1,supportsDeveloperRole:!1,supportsReasoningEffort:!1},inputLimits:{images:{resize:{maxWidth:2000,maxHeight:2000,maxBytes:4718592,jpegQuality:80}}},type:"chat"},"chat:gemini-3.6-flash":{id:"gemini-3.6-flash",name:"Gemini 3.6 Flash",api:"openai-completions",provider:"github-copilot",baseUrl:"https://api.individual.githubcopilot.com",reasoning:!0,input:["text","image"],cost:{input:0.75,output:3.75,cacheRead:0.075,cacheWrite:0},contextWindow:1e6,maxTokens:64000,headers:{"User-Agent":"GitHubCopilotChat/0.35.0","Editor-Version":"vscode/1.107.0","Editor-Plugin-Version":"copilot-chat/0.35.0","Copilot-Integration-Id":"vscode-chat"},compat:{supportsStrictMode:!0,supportsStore:!1,supportsDeveloperRole:!1,supportsReasoningEffort:!1},inputLimits:{images:{resize:{maxWidth:2000,maxHeight:2000,maxBytes:4718592,jpegQuality:80}}},type:"chat"},"chat:gemini-3.7-flash":{id:"gemini-3.7-flash",name:"Gemini 3.7 Flash",api:"openai-completions",provider:"github-copilot",baseUrl:"https://api.individual.githubcopilot.com",reasoning:!0,input:["text","image"],cost:{input:0.75,output:3.75,cacheRead:0.075,cacheWrite:0},contextWindow:1e6,maxTokens:64000,headers:{"User-Agent":"GitHubCopilotChat/0.35.0","Editor-Version":"vscode/1.107.0","Editor-Plugin-Version":"copilot-chat/0.35.0","Copilot-Integration-Id":"vscode-chat"},compat:{supportsStrictMode:!0,supportsStore:!1,supportsDeveloperRole:!1,supportsReasoningEffort:!1},inputLimits:{images:{resize:{maxWidth:2000,maxHeight:2000,maxBytes:4718592,jpegQuality:80}}},type:"chat"},"chat:gemini-3.8-flash":{id:"gemini-3.8-flash",name:"Gemini 3.8 Flash",api:"openai-completions",provider:"github-copilot",baseUrl:"https://api.individual.githubcopilot.com",reasoning:!0,input:["text","image"],cost:{input:0.75,output:3.75,cacheRead:0.075,cacheWrite:0},contextWindow:1e6,maxTokens:64000,headers:{"User-Agent":"GitHubCopilotChat/0.35.0","Editor-Version":"vscode/1.107.0","Editor-Plugin-Version":"copilot-chat/0.35.0","Copilot-Integration-Id":"vscode-chat"},compat:{supportsStrictMode:!0,supportsStore:!1,supportsDeveloperRole:!1,supportsReasoningEffort:!1},inputLimits:{images:{resize:{maxWidth:2000,maxHeight:2000,maxBytes:4718592,jpegQuality:80}}},type:"chat"},"chat:kimi-k2.7-code":{id:"kimi-k2.7-code",name:"Kimi K2.7 Code",api:"openai-completions",provider:"github-copilot",baseUrl:"https://api.individual.githubcopilot.com",reasoning:!0,input:["text","image"],cost:{input:0.95,output:4,cacheRead:0.19,cacheWrite:0},contextWindow:256000,maxTokens:32000,headers:{"User-Agent":"GitHubCopilotChat/0.35.0","Editor-Version":"vscode/1.107.0","Editor-Plugin-Version":"copilot-chat/0.35.0","Copilot-Integration-Id":"vscode-chat"},compat:{supportsStrictMode:!0,supportsStore:!1,supportsDeveloperRole:!1,supportsReasoningEffort:!1},inputLimits:{images:{resize:{maxWidth:2000,maxHeight:2000,maxBytes:4718592,jpegQuality:80}}},type:"chat"},"chat:kimi-k3":{id:"kimi-k3",name:"Kimi K3",api:"openai-completions",provider:"github-copilot",baseUrl:"https://api.individual.githubcopilot.com",reasoning:!0,input:["text","image"],cost:{input:3,output:15,cacheRead:0.3,cacheWrite:0},contextWindow:1048576,maxTokens:131072,headers:{"User-Agent":"GitHubCopilotChat/0.35.0","Editor-Version":"vscode/1.107.0","Editor-Plugin-Version":"copilot-chat/0.35.0","Copilot-Integration-Id":"vscode-chat"},compat:{supportsStrictMode:!0,supportsStore:!1,supportsDeveloperRole:!1,supportsReasoningEffort:!1,supportsMidConvoSystemMessages:!0},inputLimits:{images:{resize:{maxWidth:2000,maxHeight:2000,maxBytes:4718592,jpegQuality:80}}},type:"chat"}},"openai-responses":{"chat:gpt-5-mini":{id:"gpt-5-mini",name:"GPT-5 Mini",api:"openai-responses",provider:"github-copilot",baseUrl:"https://api.individual.githubcopilot.com",reasoning:!0,input:["text","image"],cost:{input:0.25,output:2,cacheRead:0.025,cacheWrite:0},contextWindow:264000,maxTokens:64000,headers:{"User-Agent":"GitHubCopilotChat/0.35.0","Editor-Version":"vscode/1.107.0","Editor-Plugin-Version":"copilot-chat/0.35.0","Copilot-Integration-Id":"vscode-chat"},thinkingLevelMap:{off:null,minimal:"low",low:"low",medium:"medium",high:"high",xhigh:null,max:null},compat:{supportsOpenAIGrammarTools:!0},inputLimits:{images:{resize:{maxWidth:2000,maxHeight:2000,maxBytes:4718592,jpegQuality:80}}},type:"chat"},"chat:gpt-5.3-codex":{id:"gpt-5.3-codex",name:"GPT-5.3 Codex",api:"openai-responses",provider:"github-copilot",baseUrl:"https://api.individual.githubcopilot.com",reasoning:!0,input:["text","image"],cost:{input:1.75,output:14,cacheRead:0.175,cacheWrite:0},contextWindow:1e6,maxTokens:128000,headers:{"User-Agent":"GitHubCopilotChat/0.35.0","Editor-Version":"vscode/1.107.0","Editor-Plugin-Version":"copilot-chat/0.35.0","Copilot-Integration-Id":"vscode-chat"},thinkingLevelMap:{off:null,minimal:"low",low:"low",medium:"medium",high:"high",xhigh:"xhigh",max:null},compat:{supportsOpenAIGrammarTools:!0},inputLimits:{images:{resize:{maxWidth:2000,maxHeight:2000,maxBytes:4718592,jpegQuality:80}}},type:"chat"},"chat:gpt-5.4":{id:"gpt-5.4",name:"GPT-5.4",api:"openai-responses",provider:"github-copilot",baseUrl:"https://api.individual.githubcopilot.com",reasoning:!0,input:["text","image"],cost:{input:2.5,output:15,cacheRead:0.25,cacheWrite:0,tiers:[{inputTokensAbove:272000,input:5,output:22.5,cacheRead:0.5,cacheWrite:0}]},contextWindow:1e6,maxTokens:128000,headers:{"User-Agent":"GitHubCopilotChat/0.35.0","Editor-Version":"vscode/1.107.0","Editor-Plugin-Version":"copilot-chat/0.35.0","Copilot-Integration-Id":"vscode-chat"},thinkingLevelMap:{off:null,minimal:"low",low:"low",medium:"medium",high:"high",xhigh:"xhigh",max:null},compat:{supportsOpenAIGrammarTools:!0,supportsMidConvoSystemMessages:!0,supportsAdditionalTools:!0},inputLimits:{images:{resize:{maxWidth:2000,maxHeight:2000,maxBytes:4718592,jpegQuality:80}}},type:"chat"},"chat:gpt-5.4-mini":{id:"gpt-5.4-mini",name:"GPT-5.4 mini",api:"openai-responses",provider:"github-copilot",baseUrl:"https://api.individual.githubcopilot.com",reasoning:!0,input:["text","image"],cost:{input:0.75,output:4.5,cacheRead:0.075,cacheWrite:0},contextWindow:400000,maxTokens:128000,headers:{"User-Agent":"GitHubCopilotChat/0.35.0","Editor-Version":"vscode/1.107.0","Editor-Plugin-Version":"copilot-chat/0.35.0","Copilot-Integration-Id":"vscode-chat"},thinkingLevelMap:{off:null,minimal:"low",low:"low",medium:"medium",high:"high",xhigh:"xhigh",max:null},compat:{supportsOpenAIGrammarTools:!0,supportsMidConvoSystemMessages:!0,supportsAdditionalTools:!0},inputLimits:{images:{resize:{maxWidth:2000,maxHeight:2000,maxBytes:4718592,jpegQuality:80}}},type:"chat"},"chat:gpt-5.4-nano":{id:"gpt-5.4-nano",name:"GPT-5.4 nano",api:"openai-responses",provider:"github-copilot",baseUrl:"https://api.individual.githubcopilot.com",reasoning:!0,input:["text","image"],cost:{input:0.2,output:1.25,cacheRead:0.02,cacheWrite:0},contextWindow:400000,maxTokens:128000,headers:{"User-Agent":"GitHubCopilotChat/0.35.0","Editor-Version":"vscode/1.107.0","Editor-Plugin-Version":"copilot-chat/0.35.0","Copilot-Integration-Id":"vscode-chat"},thinkingLevelMap:{off:null,minimal:"low",xhigh:"xhigh"},compat:{supportsOpenAIGrammarTools:!0},inputLimits:{images:{resize:{maxWidth:2000,maxHeight:2000,maxBytes:4718592,jpegQuality:80}}},type:"chat"},"chat:gpt-5.5":{id:"gpt-5.5",name:"GPT-5.5",api:"openai-responses",provider:"github-copilot",baseUrl:"https://api.individual.githubcopilot.com",reasoning:!0,input:["text","image"],cost:{input:5,output:30,cacheRead:0.5,cacheWrite:0,tiers:[{inputTokensAbove:272000,input:10,output:45,cacheRead:1,cacheWrite:0}]},contextWindow:1e6,maxTokens:128000,headers:{"User-Agent":"GitHubCopilotChat/0.35.0","Editor-Version":"vscode/1.107.0","Editor-Plugin-Version":"copilot-chat/0.35.0","Copilot-Integration-Id":"vscode-chat"},thinkingLevelMap:{off:null,minimal:"low",low:"low",medium:"medium",high:"high",xhigh:"xhigh",max:null},compat:{supportsOpenAIGrammarTools:!0,supportsMidConvoSystemMessages:!0,supportsAdditionalTools:!0},inputLimits:{images:{resize:{maxWidth:2000,maxHeight:2000,maxBytes:4718592,jpegQuality:80}}},type:"chat"},"chat:gpt-5.6-luna":{id:"gpt-5.6-luna",name:"GPT-5.6 Luna",api:"openai-responses",provider:"github-copilot",baseUrl:"https://api.individual.githubcopilot.com",reasoning:!0,input:["text","image"],cost:{input:0.2,output:1.2,cacheRead:0.02,cacheWrite:0.25,tiers:[{inputTokensAbove:200000,input:0.4,output:1.8,cacheRead:0.04,cacheWrite:0.5}]},contextWindow:1050000,maxTokens:128000,headers:{"User-Agent":"GitHubCopilotChat/0.35.0","Editor-Version":"vscode/1.107.0","Editor-Plugin-Version":"copilot-chat/0.35.0","Copilot-Integration-Id":"vscode-chat"},thinkingLevelMap:{off:null,minimal:"low",low:"low",medium:"medium",high:"high",xhigh:"xhigh",max:"max"},compat:{supportsOpenAIGrammarTools:!0,supportsMidConvoSystemMessages:!0,supportsAdditionalTools:!0},inputLimits:{images:{resize:{maxWidth:2000,maxHeight:2000,maxBytes:4718592,jpegQuality:80}}},type:"chat"},"chat:gpt-5.6-sol":{id:"gpt-5.6-sol",name:"GPT-5.6 Sol",api:"openai-responses",provider:"github-copilot",baseUrl:"https://api.individual.githubcopilot.com",reasoning:!0,input:["text","image"],cost:{input:4,output:20,cacheRead:0.4,cacheWrite:5,tiers:[{inputTokensAbove:272000,input:8,output:30,cacheRead:0.8,cacheWrite:10}]},contextWindow:1050000,maxTokens:128000,headers:{"User-Agent":"GitHubCopilotChat/0.35.0","Editor-Version":"vscode/1.107.0","Editor-Plugin-Version":"copilot-chat/0.35.0","Copilot-Integration-Id":"vscode-chat"},thinkingLevelMap:{off:null,minimal:"low",low:"low",medium:"medium",high:"high",xhigh:"xhigh",max:"max"},compat:{supportsOpenAIGrammarTools:!0,supportsMidConvoSystemMessages:!0,supportsAdditionalTools:!0},inputLimits:{images:{resize:{maxWidth:2000,maxHeight:2000,maxBytes:4718592,jpegQuality:80}}},type:"chat"},"chat:gpt-5.6-terra":{id:"gpt-5.6-terra",name:"GPT-5.6 Terra",api:"openai-responses",provider:"github-copilot",baseUrl:"https://api.individual.githubcopilot.com",reasoning:!0,input:["text","image"],cost:{input:2,output:12,cacheRead:0.2,cacheWrite:2.5,tiers:[{inputTokensAbove:272000,input:4,output:18,cacheRead:0.4,cacheWrite:5}]},contextWindow:1050000,maxTokens:128000,headers:{"User-Agent":"GitHubCopilotChat/0.35.0","Editor-Version":"vscode/1.107.0","Editor-Plugin-Version":"copilot-chat/0.35.0","Copilot-Integration-Id":"vscode-chat"},thinkingLevelMap:{off:null,minimal:"low",low:"low",medium:"medium",high:"high",xhigh:"xhigh",max:"max"},compat:{supportsOpenAIGrammarTools:!0,supportsMidConvoSystemMessages:!0,supportsAdditionalTools:!0},inputLimits:{images:{resize:{maxWidth:2000,maxHeight:2000,maxBytes:4718592,jpegQuality:80}}},type:"chat"},"chat:gpt-6-astra":{id:"gpt-6-astra",name:"GPT-6 Astra",api:"openai-responses",provider:"github-copilot",baseUrl:"https://api.individual.githubcopilot.com",reasoning:!0,input:["text","image"],cost:{input:10,output:50,cacheRead:1,cacheWrite:12.5,tiers:[{inputTokensAbove:272000,input:20,output:75,cacheRead:2,cacheWrite:25}]},contextWindow:1e6,maxTokens:128000,headers:{"User-Agent":"GitHubCopilotChat/0.35.0","Editor-Version":"vscode/1.107.0","Editor-Plugin-Version":"copilot-chat/0.35.0","Copilot-Integration-Id":"vscode-chat"},thinkingLevelMap:{off:null,minimal:null,low:"low",medium:"medium",high:"high",xhigh:"xhigh",max:"max"},compat:{supportsOpenAIGrammarTools:!0,supportsMidConvoSystemMessages:!0,supportsAdditionalTools:!0},inputLimits:{images:{resize:{maxWidth:2000,maxHeight:2000,maxBytes:4718592,jpegQuality:80}}},type:"chat"},"chat:gpt-6-luna":{id:"gpt-6-luna",name:"GPT-6 Luna",api:"openai-responses",provider:"github-copilot",baseUrl:"https://api.individual.githubcopilot.com",reasoning:!0,input:["text","image"],cost:{input:0.1,output:0.5,cacheRead:0.01,cacheWrite:0.125,tiers:[{inputTokensAbove:272000,input:0.2,output:0.75,cacheRead:0.02,cacheWrite:0.25}]},contextWindow:1e6,maxTokens:128000,headers:{"User-Agent":"GitHubCopilotChat/0.35.0","Editor-Version":"vscode/1.107.0","Editor-Plugin-Version":"copilot-chat/0.35.0","Copilot-Integration-Id":"vscode-chat"},thinkingLevelMap:{off:"none",minimal:null,low:"low",medium:"medium",high:"high",xhigh:"xhigh",max:"max"},compat:{supportsOpenAIGrammarTools:!0,supportsMidConvoSystemMessages:!0,supportsAdditionalTools:!0},inputLimits:{images:{resize:{maxWidth:2000,maxHeight:2000,maxBytes:4718592,jpegQuality:80}}},type:"chat"},"chat:gpt-6-sol":{id:"gpt-6-sol",name:"GPT-6 Sol",api:"openai-responses",provider:"github-copilot",baseUrl:"https://api.individual.githubcopilot.com",reasoning:!0,input:["text","image"],cost:{input:2,output:10,cacheRead:0.2,cacheWrite:2.5,tiers:[{inputTokensAbove:272000,input:4,output:15,cacheRead:0.4,cacheWrite:5}]},contextWindow:1e6,maxTokens:128000,headers:{"User-Agent":"GitHubCopilotChat/0.35.0","Editor-Version":"vscode/1.107.0","Editor-Plugin-Version":"copilot-chat/0.35.0","Copilot-Integration-Id":"vscode-chat"},thinkingLevelMap:{off:"none",minimal:null,low:"low",medium:"medium",high:"high",xhigh:"xhigh",max:"max"},compat:{supportsOpenAIGrammarTools:!0,supportsMidConvoSystemMessages:!0,supportsAdditionalTools:!0},inputLimits:{images:{resize:{maxWidth:2000,maxHeight:2000,maxBytes:4718592,jpegQuality:80}}},type:"chat"},"chat:gpt-6.1-sol":{id:"gpt-6.1-sol",name:"GPT-6.1 Sol",api:"openai-responses",provider:"github-copilot",baseUrl:"https://api.individual.githubcopilot.com",reasoning:!0,input:["text","image"],cost:{input:2,output:10,cacheRead:0.1,cacheWrite:2.5,tiers:[{inputTokensAbove:272000,input:4,output:15,cacheRead:0.2,cacheWrite:5}]},contextWindow:1050000,maxTokens:128000,headers:{"User-Agent":"GitHubCopilotChat/0.35.0","Editor-Version":"vscode/1.107.0","Editor-Plugin-Version":"copilot-chat/0.35.0","Copilot-Integration-Id":"vscode-chat"},thinkingLevelMap:{off:null,minimal:null,low:"low",medium:"medium",high:"high",xhigh:"xhigh",max:"max"},compat:{supportsOpenAIGrammarTools:!0,supportsMidConvoSystemMessages:!0,supportsAdditionalTools:!0},inputLimits:{images:{resize:{maxWidth:2000,maxHeight:2000,maxBytes:4718592,jpegQuality:80}}},type:"chat"},"chat:grok-4.5":{id:"grok-4.5",name:"Grok 4.5",api:"openai-responses",provider:"github-copilot",baseUrl:"https://api.individual.githubcopilot.com",reasoning:!0,input:["text","image"],cost:{input:2,output:6,cacheRead:0.5,cacheWrite:0,tiers:[{inputTokensAbove:200000,input:4,output:12,cacheRead:1,cacheWrite:0}]},contextWindow:500000,maxTokens:128000,headers:{"User-Agent":"GitHubCopilotChat/0.35.0","Editor-Version":"vscode/1.107.0","Editor-Plugin-Version":"copilot-chat/0.35.0","Copilot-Integration-Id":"vscode-chat"},thinkingLevelMap:{off:null,minimal:null,low:"low",medium:"medium",high:"high",xhigh:null,max:null},inputLimits:{images:{resize:{maxWidth:2000,maxHeight:2000,maxBytes:4718592,jpegQuality:80}}},type:"chat"},"chat:grok-4.6":{id:"grok-4.6",name:"Grok 4.6",api:"openai-responses",provider:"github-copilot",baseUrl:"https://api.individual.githubcopilot.com",reasoning:!0,input:["text","image"],cost:{input:2,output:6,cacheRead:0.5,cacheWrite:0,tiers:[{inputTokensAbove:200000,input:4,output:12,cacheRead:1,cacheWrite:0}]},contextWindow:500000,maxTokens:128000,headers:{"User-Agent":"GitHubCopilotChat/0.35.0","Editor-Version":"vscode/1.107.0","Editor-Plugin-Version":"copilot-chat/0.35.0","Copilot-Integration-Id":"vscode-chat"},thinkingLevelMap:{off:null,minimal:null,low:"low",medium:"medium",high:"high",xhigh:"xhigh",max:null},inputLimits:{images:{resize:{maxWidth:2000,maxHeight:2000,maxBytes:4718592,jpegQuality:80}}},type:"chat"},"chat:grok-4.7":{id:"grok-4.7",name:"Grok 4.7",api:"openai-responses",provider:"github-copilot",baseUrl:"https://api.individual.githubcopilot.com",reasoning:!0,input:["text","image"],cost:{input:2,output:6,cacheRead:0.5,cacheWrite:0,tiers:[{inputTokensAbove:200000,input:4,output:12,cacheRead:1,cacheWrite:0}]},contextWindow:500000,maxTokens:128000,headers:{"User-Agent":"GitHubCopilotChat/0.35.0","Editor-Version":"vscode/1.107.0","Editor-Plugin-Version":"copilot-chat/0.35.0","Copilot-Integration-Id":"vscode-chat"},thinkingLevelMap:{off:null,minimal:null,low:"low",medium:"medium",high:"high",xhigh:"xhigh",max:null},inputLimits:{images:{resize:{maxWidth:2000,maxHeight:2000,maxBytes:4718592,jpegQuality:80}}},type:"chat"},"chat:mai-code-1-flash-picker":{id:"mai-code-1-flash-picker",name:"MAI-Code-1-Flash",api:"openai-responses",provider:"github-copilot",baseUrl:"https://api.individual.githubcopilot.com",reasoning:!0,input:["text"],cost:{input:0.75,output:4.5,cacheRead:0.075,cacheWrite:0},contextWindow:256000,maxTokens:128000,headers:{"User-Agent":"GitHubCopilotChat/0.35.0","Editor-Version":"vscode/1.107.0","Editor-Plugin-Version":"copilot-chat/0.35.0","Copilot-Integration-Id":"vscode-chat"},thinkingLevelMap:{off:null,minimal:null,low:"low",medium:"medium",high:"high",xhigh:null,max:null},type:"chat"},"chat:mai-code-1.1-flash":{id:"mai-code-1.1-flash",name:"MAI-Code-1.1-Flash",api:"openai-responses",provider:"github-copilot",baseUrl:"https://api.individual.githubcopilot.com",reasoning:!0,input:["text","image"],cost:{input:0.2,output:1.2,cacheRead:0.02,cacheWrite:0},contextWindow:256000,maxTokens:128000,headers:{"User-Agent":"GitHubCopilotChat/0.35.0","Editor-Version":"vscode/1.107.0","Editor-Plugin-Version":"copilot-chat/0.35.0","Copilot-Integration-Id":"vscode-chat"},thinkingLevelMap:{off:null,minimal:null,low:"low",medium:"medium",high:"high",xhigh:null,max:null},inputLimits:{images:{resize:{maxWidth:2000,maxHeight:2000,maxBytes:4718592,jpegQuality:80}}},type:"chat"}}};var Gn=f("github-copilot",n),T=g("github-copilot",n),w=y("github-copilot",n);var bs="https://radius.pi.dev";function d(t){if(typeof t!=="object"||t===null||Array.isArray(t))return!1;let i=t;return typeof i.id==="string"&&typeof i.name==="string"&&typeof i.reasoning==="boolean"&&Array.isArray(i.input)&&typeof i.cost==="object"&&i.cost!==null&&!Array.isArray(i.cost)&&typeof i.contextWindow==="number"&&typeof i.maxTokens==="number"}function u(t){if(typeof t!=="object"||t===null||Array.isArray(t))return;let{baseUrl:i,models:e}=t;if(typeof i!=="string"||!Array.isArray(e))return;return{baseUrl:i,models:e.filter(d).map((a)=>({...a}))}}function Kr(t){return(/^https?:\/\//iu.test(t)?t:`https://${t}`).replace(/\/+$/u,"")}function m(t){return u(t?.gatewayConfig)}function ws(t,i){return i.models.map((e)=>({...e,api:"pi-messages",provider:t,baseUrl:i.baseUrl}))}function ya(t,i){let e=m(i);return e?ws(t,e):[]}function x(t){let i=t.trim();return i.length>512?`${i.slice(0,512)}\u2026`:i}async function ba(t,i,e){let a={accept:"application/json"};if(i)a.authorization=`Bearer ${i}`;let o=await fetch(new URL("/v1/config",t),{headers:a,signal:e});if(!o.ok)throw Error(`Could not load Radius config from ${t}: ${o.status}: ${x(await o.text())}`);let s=u(await o.json());if(!s)throw Error(`Invalid Radius config from ${t}`);return s}
3
+ export{fa,ga,Gn,bs,Kr,ws,ya,ba};
@@ -0,0 +1,3 @@
1
+ // @bun
2
+ function Rt(i){let t=3735928559,h=1103547991;for(let e=0;e<i.length;e++){let l=i.charCodeAt(e);t=Math.imul(t^l,2654435761),h=Math.imul(h^l,1597334677)}return t=Math.imul(t^t>>>16,2246822507)^Math.imul(h^h>>>13,3266489909),h=Math.imul(h^h>>>16,2246822507)^Math.imul(t^t>>>13,3266489909),(h>>>0).toString(36)+(t>>>0).toString(36)}
3
+ export{Rt};
@@ -0,0 +1,3 @@
1
+ // @bun
2
+ var l=Object.create;var{getPrototypeOf:m,defineProperty:g,getOwnPropertyNames:n}=Object;var k=Object.prototype.hasOwnProperty;function o(a){return this[a]}var p,q,c=(a,b,d)=>{var e=a!=null&&typeof a==="object";if(e){var i=b?p??=new WeakMap:q??=new WeakMap,j=i.get(a);if(j)return j}d=a!=null?l(m(a)):{};let f=b||!a||!a.__esModule||!k.call(a,"default")?g(d,"default",{value:a,enumerable:!0}):d;if(a&&typeof a==="object"||typeof a==="function"){for(let h of n(a))if(!k.call(f,h))g(f,h,{get:o.bind(a,h),enumerable:!0})}if(e)i.set(a,f);return f};var r=(a,b)=>()=>(b||a((b={exports:{}}).exports,b),b.exports);var s=(a)=>a;function t(a,b){this[a]=s.bind(null,b)}var yt=(a,b)=>{for(var d in b)g(a,d,{get:b[d],enumerable:!0,configurable:!0,set:t.bind(b,d)})};var Ur=(a,b,d)=>{for(var e in b)g(a,e,{get:b[e],set:d[e],enumerable:!0,configurable:!0})},u=import.meta.require;
3
+ export{c,r,yt,Ur,u};
@@ -0,0 +1,3 @@
1
+ // @bun
2
+ import{E,K}from"./chunk-6wm62kte.js";import{c}from"./chunk-bh80e336.js";var T=c(E());var C=(e)=>Boolean(e)&&typeof e==="object"&&typeof e.AccessKeyId==="string"&&typeof e.SecretAccessKey==="string"&&typeof e.Token==="string"&&typeof e.Expiration==="string",v=(e)=>({accessKeyId:e.AccessKeyId,secretAccessKey:e.SecretAccessKey,sessionToken:e.Token,expiration:new Date(e.Expiration),...e.AccountId&&{accountId:e.AccountId}});var g=({maxRetries:e=0,timeout:t=1000})=>({maxRetries:e,timeout:t});var O=c(E());import P from"http";function I(e){return new Promise((t,n)=>{let o=P.request({method:"GET",...e,hostname:e.hostname?.replace(/^\[(.+)\]$/,"$1")});o.on("error",(r)=>{n(Object.assign(new O.ProviderError("Unable to connect to instance metadata service"),r)),o.destroy()}),o.on("timeout",()=>{n(new O.ProviderError("TimeoutError from instance metadata service")),o.destroy()}),o.on("response",(r)=>{let{statusCode:a=400}=r;if(a<200||300<=a)n(Object.assign(new O.ProviderError("Error response received from instance metadata service"),{statusCode:a})),o.destroy();let m=[];r.on("data",(s)=>{m.push(s)}),r.on("end",()=>{t(Buffer.concat(m)),o.destroy()})}),o.end()})}var S=(e,t)=>{let n=e();for(let o=0;o<t;o++)n=n.catch(e);return n};var u="AWS_CONTAINER_CREDENTIALS_FULL_URI",D="AWS_CONTAINER_CREDENTIALS_RELATIVE_URI",M="AWS_CONTAINER_AUTHORIZATION_TOKEN",Y=(e={})=>{let{timeout:t,maxRetries:n}=g(e);return()=>S(async()=>{let o=await Z({logger:e.logger}),r=JSON.parse(await j(t,o));if(!C(r))throw new T.CredentialsProviderError("Invalid response received from instance metadata service.",{logger:e.logger});return v(r)},n)},j=async(e,t)=>{if(process.env[M])t.headers={...t.headers,Authorization:process.env[M]};return(await I({...t,timeout:e})).toString()},J="169.254.170.2",X=new Set(["localhost","127.0.0.1"]),z=new Set(["http:","https:"]),Z=async({logger:e})=>{if(process.env[D])return{hostname:J,path:process.env[D]};if(process.env[u]){let t;try{t=new URL(process.env[u])}catch{throw new T.CredentialsProviderError(`${process.env[u]} is not a valid container metadata service URL`,{tryNextLink:!1,logger:e})}if(!t.hostname||!X.has(t.hostname))throw new T.CredentialsProviderError(`${t.hostname} is not a valid container metadata service hostname`,{tryNextLink:!1,logger:e});if(!t.protocol||!z.has(t.protocol))throw new T.CredentialsProviderError(`${t.protocol} is not a valid container metadata service protocol`,{tryNextLink:!1,logger:e});return{protocol:t.protocol,hostname:t.hostname,path:t.pathname+t.search,port:t.port?parseInt(t.port,10):void 0}}throw new T.CredentialsProviderError(`The container metadata credential provider cannot be used unless the ${D} or ${u} environment variable is set`,{tryNextLink:!1,logger:e})};var h=c(E());var L=c(E());class w extends L.CredentialsProviderError{tryNextLink;name="InstanceMetadataV1FallbackError";constructor(e,t=!0){super(e,t);this.tryNextLink=t,Object.setPrototypeOf(this,w.prototype)}}var x=c(E()),V=c(K());var N;(function(e){e.IPv4="http://169.254.169.254",e.IPv6="http://[fd00:ec2::254]"})(N||(N={}));var F={environmentVariableSelector:(e)=>e.AWS_EC2_METADATA_SERVICE_ENDPOINT,configFileSelector:(e)=>e.ec2_metadata_service_endpoint,default:void 0};var p;(function(e){e.IPv4="IPv4",e.IPv6="IPv6"})(p||(p={}));var Q="AWS_EC2_METADATA_SERVICE_ENDPOINT_MODE",ee="ec2_metadata_service_endpoint_mode",b={environmentVariableSelector:(e)=>e[Q],configFileSelector:(e)=>e[ee],default:p.IPv4};var k=async()=>V.parseUrl(await te()||await oe()),te=async()=>x.loadConfig(F)(),oe=async()=>{let e=await x.loadConfig(b)();switch(e){case p.IPv4:return N.IPv4;case p.IPv6:return N.IPv6;default:throw Error(`Unsupported endpoint mode: ${e}. Select from ${Object.values(p)}`)}};var R=(e,t)=>{let n=300+Math.floor(Math.random()*300),o=new Date(Date.now()+n*1000);t.warn(`Attempting credential expiration extension due to a credential service availability issue. A refresh of these credentials will be attempted after ${new Date(o)}.
3
+ For more information, please visit: https://docs.aws.amazon.com/sdkref/latest/guide/feature-static-credentials.html`);let r=e.originalExpiration??e.expiration;return{...e,...r?{originalExpiration:r}:{},expiration:o}};var U=(e,t={})=>{let n=t?.logger||console,o;return async()=>{let r;try{if(r=await e(),r.expiration&&r.expiration.getTime()<Date.now())r=R(r,n)}catch(a){if(o)n.warn("Credential renew failed: ",a),r=R(o,n);else throw a}return o=r,r}};var G="/latest/meta-data/iam/security-credentials/",re="/latest/api/token",y="AWS_EC2_METADATA_V1_DISABLED",W="ec2_metadata_v1_disabled",B="x-aws-ec2-metadata-token",ne=(e={})=>U(ae(e),{logger:e.logger}),ae=(e={})=>{let t=!1,{logger:n,profile:o}=e,{timeout:r,maxRetries:a}=g(e),m=async(s,f)=>{if(t||f.headers?.[B]==null){let i=!1,d=!1,q=await h.loadConfig({environmentVariableSelector:(l)=>{let _=l[y];if(d=!!_&&_!=="false",_===void 0)throw new h.CredentialsProviderError(`${y} not set in env, checking config file next.`,{logger:e.logger});return d},configFileSelector:(l)=>{let _=l[W];return i=!!_&&_!=="false",i},default:!1},{profile:o})();if(e.ec2MetadataV1Disabled||q){let l=[];if(e.ec2MetadataV1Disabled)l.push("credential provider initialization (runtime option ec2MetadataV1Disabled)");if(i)l.push(`config file profile (${W})`);if(d)l.push(`process environment variable (${y})`);throw new w(`AWS EC2 Metadata v1 fallback has been blocked by AWS SDK configuration in the following: [${l.join(", ")}].`)}}let H=(await S(async()=>{let i;try{i=await ie(f)}catch(d){if(d.statusCode===401)t=!1;throw d}return i},s)).trim();return S(async()=>{let i;try{i=await ce(H,f,e)}catch(d){if(d.statusCode===401)t=!1;throw d}return i},s)};return async()=>{let s=await k();if(t)return n?.debug("AWS SDK Instance Metadata","using v1 fallback (no token fetch)"),m(a,{...s,timeout:r});else{let f;try{f=(await se({...s,timeout:r})).toString()}catch(A){if(A?.statusCode===400)throw Object.assign(A,{message:"EC2 Metadata token request returned error"});else if(A.message==="TimeoutError"||[403,404,405].includes(A.statusCode))t=!0;return n?.debug("AWS SDK Instance Metadata","using v1 fallback (initial)"),m(a,{...s,timeout:r})}return m(a,{...s,headers:{[B]:f},timeout:r})}}},se=async(e)=>I({...e,path:re,method:"PUT",headers:{"x-aws-ec2-metadata-token-ttl-seconds":"21600"}}),ie=async(e)=>(await I({...e,path:G})).toString(),ce=async(e,t,n)=>{let o=JSON.parse((await I({...t,path:G+e})).toString());if(!C(o))throw new h.CredentialsProviderError("Invalid response received from instance metadata service.",{logger:n.logger});return v(o)};export{u as ENV_CMDS_FULL_URI,D as ENV_CMDS_RELATIVE_URI,Y as fromContainerMetadata,ne as fromInstanceMetadata};
@@ -0,0 +1,2 @@
1
+ // @bun
2
+ import{br,Wr,Hr,zr,qr,In,Mn,wr,On,Ln,Dn,Nn,Un,Fn}from"./chunk-h8qhy3px.js";import{ue}from"./chunk-x0afp8wt.js";import{Q,te}from"./chunk-tnay319j.js";import{re}from"./chunk-yq20v3va.js";import{v}from"./chunk-fsekbhqb.js";import{ke}from"./chunk-9nkb5q43.js";import{G,ve,me,tt,oe,Y}from"./chunk-4qtw5cga.js";import{W}from"./chunk-nbgtqpay.js";var b=0,y=(n,a,t)=>{let o=new W,g=tt(a);return(async()=>{let e={role:"assistant",content:[],api:"google-generative-ai",provider:n.provider,model:n.id,usage:{input:0,output:0,cacheRead:0,cacheWrite:0,totalTokens:0,cost:{input:0,output:0,cacheRead:0,cacheWrite:0,total:0}},stopReason:"pending",timestamp:Date.now()};try{if(t?.fetch&&t.fetch!==globalThis.fetch)throw Error("Custom fetch is not supported by the Google Generative AI adapter");let l=t?.apiKey;if(!l)throw Error(`No API key for provider: ${n.provider}`);let c=w(n,l,t?.headers),h=T(n,g,t),k=await t?.onPayload?.(h,n);if(k!==void 0)h=k;let p=await Fn(()=>c.models.generateContentStream(h),t);o.push({type:"start",partial:e});let i=null,f=e.content,u=()=>f.length-1;for await(let s of p){await t?.onProviderStreamEvent?.(s,n),e.responseId||=s.responseId;let m=s.candidates?.[0];if(m?.content?.parts)for(let r of m.content.parts){if(r.text!==void 0){let d=Mn(r);if(!i||d&&i.type!=="thinking"||!d&&i.type!=="text"){if(i)if(i.type==="text")o.push({type:"text_end",contentIndex:f.length-1,content:i.text,partial:e});else o.push({type:"thinking_end",contentIndex:u(),content:i.thinking,partial:e});if(d)i={type:"thinking",thinking:"",thinkingSignature:void 0},e.content.push(i),o.push({type:"thinking_start",contentIndex:u(),partial:e});else i={type:"text",text:""},e.content.push(i),o.push({type:"text_start",contentIndex:u(),partial:e})}if(i.type==="thinking")i.thinking+=r.text,i.thinkingSignature=wr(i.thinkingSignature,r.thoughtSignature),o.push({type:"thinking_delta",contentIndex:u(),delta:r.text,partial:e});else i.text+=r.text,i.textSignature=wr(i.textSignature,r.thoughtSignature),o.push({type:"text_delta",contentIndex:u(),delta:r.text,partial:e})}if(r.functionCall){if(i){if(i.type==="text")o.push({type:"text_end",contentIndex:u(),content:i.text,partial:e});else o.push({type:"thinking_end",contentIndex:u(),content:i.thinking,partial:e});i=null}let d=r.functionCall.id,C={type:"toolCall",id:!d||e.content.some((x)=>x.type==="toolCall"&&x.id===d)?`${r.functionCall.name}_${Date.now()}_${++b}`:d,name:r.functionCall.name||"",arguments:r.functionCall.args??{},...r.thoughtSignature&&{thoughtSignature:r.thoughtSignature}};e.content.push(C),o.push({type:"toolcall_start",contentIndex:u(),partial:e}),o.push({type:"toolcall_delta",contentIndex:u(),delta:JSON.stringify(C.arguments),partial:e}),o.push({type:"toolcall_end",contentIndex:u(),toolCall:C,partial:e})}}if(m?.finishReason){if(e.rawStopReason=m.finishReason,e.stopReason=Un(m.finishReason),e.content.some((r)=>r.type==="toolCall")&&e.stopReason==="stop")e.stopReason="toolUse"}if(s.usageMetadata)e.usage={input:(s.usageMetadata.promptTokenCount||0)-(s.usageMetadata.cachedContentTokenCount||0),output:(s.usageMetadata.candidatesTokenCount||0)+(s.usageMetadata.thoughtsTokenCount||0),cacheRead:s.usageMetadata.cachedContentTokenCount||0,cacheWrite:0,reasoning:s.usageMetadata.thoughtsTokenCount||0,totalTokens:s.usageMetadata.totalTokenCount||0,cost:{input:0,output:0,cacheRead:0,cacheWrite:0,total:0}},oe(n,e.usage)}if(i)if(i.type==="text")o.push({type:"text_end",contentIndex:u(),content:i.text,partial:e});else o.push({type:"thinking_end",contentIndex:u(),content:i.thinking,partial:e});if(t?.signal?.aborted)throw Error("Request was aborted");if(e.stopReason==="pending")throw Error("Google stream ended without a finish reason");if(e.stopReason==="aborted"||e.stopReason==="error"){let s=e.rawStopReason?`Provider stopped with: ${e.rawStopReason}`:"An unknown error occurred";throw Error(s)}o.push({type:"done",reason:e.stopReason,message:e}),o.end()}catch(l){for(let c of e.content)if("index"in c)delete c.index;e.stopReason=t?.signal?.aborted?"aborted":"error",e.errorMessage=te(Q(l)),o.push({type:"error",reason:e.stopReason,error:e}),o.end()}})(),o},q=(n,a,t)=>{let o=t?.apiKey;if(!o)throw Error(`No API key for provider: ${n.provider}`);let g={...re(n,a,t,o),toolChoice:t?.toolChoice};if(!t?.reasoning)return y(n,a,{...g,thinking:{enabled:!1}});let e=Y(n,t.reasoning);if(e==="off")return y(n,a,{...g,thinking:{enabled:!1}});let l=Wr(n,e);if(Hr(n))return y(n,a,{...g,thinking:{enabled:!0,level:zr(l)}});return y(n,a,{...g,thinking:{enabled:!0,budgetTokens:S(n,l,t.thinkingBudgets)}})};function w(n,a,t){let o={};if(n.baseUrl)o.baseUrl=n.baseUrl,o.apiVersion="";let g=ke({"User-Agent":ue(),...n.headers,...t});if(g)o.headers=g;return new br({apiKey:a,httpOptions:Object.keys(o).length>0?o:void 0})}function T(n,a,t={}){let o=On(n,a),g=ve(a.messages),e=me(a.messages),l={};if(t.temperature!==void 0)l.temperature=t.temperature;if(t.maxTokens!==void 0)l.maxOutputTokens=t.maxTokens;let c=Dn(n.id),h=e.length>0?Nn(e,t.toolChoice,c):void 0,k=g?G(g):"",p={...Object.keys(l).length>0&&l,...k&&{systemInstruction:v(k)},...e.length>0&&{tools:Ln(e,!1,c)},...h!==void 0&&{toolConfig:{functionCallingConfig:{mode:h}}}};if(t.thinking?.enabled&&n.reasoning){let f={includeThoughts:!0};if(t.thinking.level!==void 0)f.thinkingLevel=qr(t.thinking.level);else if(t.thinking.budgetTokens!==void 0)f.thinkingBudget=t.thinking.budgetTokens;p.thinkingConfig=f}else if(n.reasoning&&t.thinking&&!t.thinking.enabled)p.thinkingConfig=In(n);if(t.signal){if(t.signal.aborted)throw Error("Request aborted");p.abortSignal=t.signal}return{model:n.id,contents:o,config:p}}function S(n,a,t){if(t?.[a]!==void 0)return t[a];if(n.id.includes("2.5-pro"))return{minimal:128,low:2048,medium:8192,high:32768}[a];if(n.id.includes("2.5-flash-lite"))return{minimal:512,low:2048,medium:8192,high:24576}[a];if(n.id.includes("2.5-flash"))return{minimal:128,low:2048,medium:8192,high:24576}[a];return-1}export{y as stream,q as streamSimple};
@@ -0,0 +1,3 @@
1
+ // @bun
2
+ import{H}from"./chunk-tb66q678.js";import{E}from"./chunk-6wm62kte.js";import{c}from"./chunk-bh80e336.js";var g=c(E());var U=(e)=>e&&(typeof e.sso_start_url==="string"||typeof e.sso_account_id==="string"||typeof e.sso_session==="string"||typeof e.sso_region==="string"||typeof e.sso_role_name==="string");var v=c(H());var f=c(E());var j=300000,k="To refresh this SSO session run 'aws sso login' with the corresponding profile.";var q=async(e,o={},r)=>{let{SSOOIDCClient:t}=await import("./chunk-48m0w8xg.js"),n=(p)=>o.clientConfig?.[p]??o.parentClientConfig?.[p]??r?.[p];return new t(Object.assign({},o.clientConfig??{},{region:e??o.clientConfig?.region,logger:n("logger"),userAgentAppId:n("userAgentAppId")}))};var W=async(e,o,r={},t)=>{let{CreateTokenCommand:n}=await import("./chunk-48m0w8xg.js");return(await q(o,r,t)).send(new n({clientId:e.clientId,clientSecret:e.clientSecret,refreshToken:e.refreshToken,grantType:"refresh_token"}))};var X=c(E());var N=(e)=>{if(e.expiration&&e.expiration.getTime()<Date.now())throw new X.TokenProviderError(`Token is expired. ${k}`,!1)};var z=c(E());var w=(e,o,r=!1)=>{if(typeof o>"u")throw new z.TokenProviderError(`Value not present for '${e}' in SSO Token${r?". Cannot refresh":""}. ${k}`,!1)};var J=c(E());import{promises as ee}from"fs";var{writeFile:oe}=ee,V=(e,o)=>{let r=J.getSSOTokenFilepath(e),t=JSON.stringify(o,null,2);return oe(r,t)};var Y=new Map,R=(e={})=>async({callerClientConfig:o}={})=>{e.logger?.debug("@aws-sdk/token-providers - fromSso");let r=await f.parseKnownFiles(e),t=f.getProfileName({profile:e.profile??o?.profile}),n=r[t];if(!n)throw new f.TokenProviderError(`Profile '${t}' could not be found in shared credentials file.`,!1);else if(!n.sso_session)throw new f.TokenProviderError(`Profile '${t}' is missing required property 'sso_session'.`);let i=n.sso_session,S=(await f.loadSsoSessionData(e))[i];if(!S)throw new f.TokenProviderError(`Sso session '${i}' could not be found in shared credentials file.`,!1);for(let l of["sso_start_url","sso_region"])if(!S[l])throw new f.TokenProviderError(`Sso session '${i}' is missing required property '${l}'.`,!1);let{sso_start_url:d,sso_region:y}=S,s;try{s=await f.getSSOTokenFromFile(i)}catch(l){throw new f.TokenProviderError(`The SSO session token associated with profile=${t} was not found or is invalid. ${k}`,!1)}w("accessToken",s.accessToken),w("expiresAt",s.expiresAt);let{accessToken:T,expiresAt:x}=s,a={token:T,expiration:new Date(x)};if(a.expiration.getTime()-Date.now()>j)return a;let m=Y.get(i)??0;if(Date.now()-m<30000)return N(a),a;w("clientId",s.clientId,!0),w("clientSecret",s.clientSecret,!0),w("refreshToken",s.refreshToken,!0);try{Y.set(i,Date.now());let l=await W(s,y,e,o);w("accessToken",l.accessToken),w("expiresIn",l.expiresIn);let C=new Date(Date.now()+l.expiresIn*1000);try{await V(i,{...s,accessToken:l.accessToken,expiresAt:C.toISOString(),refreshToken:l.refreshToken})}catch(u){}return{token:l.accessToken,expiration:C}}catch(l){return N(a),a}};var h=c(E()),O=!1,P=async({ssoStartUrl:e,ssoSession:o,ssoAccountId:r,ssoRegion:t,ssoRoleName:n,ssoClient:i,clientConfig:p,parentClientConfig:S,callerClientConfig:d,profile:y,filepath:s,configFilepath:T,ignoreCache:x,logger:a})=>{let m,l="To refresh this SSO session run aws sso login with the corresponding profile.";if(o)try{let _=await R({profile:y,filepath:s,configFilepath:T,ignoreCache:x,clientConfig:p,parentClientConfig:S,logger:a})({callerClientConfig:d});m={accessToken:_.token,expiresAt:new Date(_.expiration).toISOString()}}catch(_){throw new h.CredentialsProviderError(_.message,{tryNextLink:O,logger:a})}else try{m=await h.getSSOTokenFromFile(e)}catch(_){throw new h.CredentialsProviderError("The SSO session associated with this profile is invalid. To refresh this SSO session run aws sso login with the corresponding profile.",{tryNextLink:O,logger:a})}if(new Date(m.expiresAt).getTime()-Date.now()<=0)throw new h.CredentialsProviderError("The SSO session associated with this profile has expired. To refresh this SSO session run aws sso login with the corresponding profile.",{tryNextLink:O,logger:a});let{accessToken:C}=m,{SSOClient:u,GetRoleCredentialsCommand:A}=await import("./chunk-7wh4n0yg.js"),Z=i||new u(Object.assign({},p??{},{logger:p?.logger??d?.logger??S?.logger,region:p?.region??t,userAgentAppId:p?.userAgentAppId??d?.userAgentAppId??S?.userAgentAppId})),F;try{F=await Z.send(new A({accountId:r,roleName:n,accessToken:C}))}catch(_){throw new h.CredentialsProviderError(_,{tryNextLink:O,logger:a})}let{roleCredentials:{accessKeyId:D,secretAccessKey:L,sessionToken:M,expiration:b,credentialScope:G,accountId:K}={}}=F;if(!D||!L||!M||!b)throw new h.CredentialsProviderError("SSO returns an invalid temporary credential.",{tryNextLink:O,logger:a});let I={accessKeyId:D,secretAccessKey:L,sessionToken:M,expiration:new Date(b),...G&&{credentialScope:G},...K&&{accountId:K}};if(o)v.setCredentialFeature(I,"CREDENTIALS_SSO","s");else v.setCredentialFeature(I,"CREDENTIALS_SSO_LEGACY","u");return I};var B=c(E()),Q=(e,o)=>{let{sso_start_url:r,sso_account_id:t,sso_region:n,sso_role_name:i}=e;if(!r||!t||!n||!i)throw new B.CredentialsProviderError(`Profile is configured with invalid SSO credentials. Required parameters "sso_account_id", "sso_region", "sso_role_name", "sso_start_url". Got ${Object.keys(e).join(", ")}
3
+ Reference: https://docs.aws.amazon.com/cli/latest/userguide/cli-configure-sso.html`,{tryNextLink:!1,logger:o});return e};var se=(e={})=>async({callerClientConfig:o}={})=>{e.logger?.debug("@aws-sdk/credential-provider-sso - fromSSO");let{ssoStartUrl:r,ssoAccountId:t,ssoRegion:n,ssoRoleName:i,ssoSession:p}=e,{ssoClient:S}=e,d=g.getProfileName({profile:e.profile??o?.profile});if(!r&&!t&&!n&&!i&&!p){let s=(await g.parseKnownFiles(e))[d];if(!s)throw new g.CredentialsProviderError(`Profile ${d} was not found.`,{logger:e.logger});if(!U(s))throw new g.CredentialsProviderError(`Profile ${d} is not configured with SSO credentials.`,{logger:e.logger});if(s?.sso_session){let u=(await g.loadSsoSessionData(e))[s.sso_session],A=` configurations in profile ${d} and sso-session ${s.sso_session}`;if(n&&n!==u.sso_region)throw new g.CredentialsProviderError("Conflicting SSO region"+A,{tryNextLink:!1,logger:e.logger});if(r&&r!==u.sso_start_url)throw new g.CredentialsProviderError("Conflicting SSO start_url"+A,{tryNextLink:!1,logger:e.logger});s.sso_region=u.sso_region,s.sso_start_url=u.sso_start_url}let{sso_start_url:T,sso_account_id:x,sso_region:a,sso_role_name:m,sso_session:l}=Q(s,e.logger);return P({ssoStartUrl:T,ssoSession:l,ssoAccountId:x,ssoRegion:a,ssoRoleName:m,ssoClient:S,clientConfig:e.clientConfig,parentClientConfig:e.parentClientConfig,callerClientConfig:e.callerClientConfig,profile:d,filepath:e.filepath,configFilepath:e.configFilepath,ignoreCache:e.ignoreCache,logger:e.logger})}else if(!r||!t||!n||!i)throw new g.CredentialsProviderError('Incomplete configuration. The fromSSO() argument hash must include "ssoStartUrl", "ssoAccountId", "ssoRegion", "ssoRoleName"',{tryNextLink:!1,logger:e.logger});else return P({ssoStartUrl:r,ssoSession:p,ssoAccountId:t,ssoRegion:n,ssoRoleName:i,ssoClient:S,clientConfig:e.clientConfig,parentClientConfig:e.parentClientConfig,callerClientConfig:e.callerClientConfig,profile:d,filepath:e.filepath,configFilepath:e.configFilepath,ignoreCache:e.ignoreCache,logger:e.logger})};export{se as fromSSO};
@@ -0,0 +1,3 @@
1
+ // @bun
2
+ import{Vr}from"./chunk-a23pv6tv.js";var y=Promise.resolve(),M=60000,T=1e4,E=(r)=>r instanceof Error?r.message:String(r);function R(){return new Worker(new URL("./ui-test-worker.js",import.meta.url))}function I(r,e,t){if(!Number.isInteger(e)||e<1||e>t)throw Error(`${r} must be between 1 and ${t}`)}async function ii(r,e,t={}){let l=t.timeoutMs??M,u=t.importTimeoutMs??T;I("timeoutMs",l,M),I("importTimeoutMs",u,T);let i=y,p=Promise.withResolvers();y=i.then(()=>p.promise);let o=new AbortController,n=t.signal?AbortSignal.any([t.signal,o.signal]):o.signal,g,b,f,w=new Map,c=Promise.withResolvers(),k=()=>c.reject(n.reason??Error("UI test cancelled"));n.addEventListener("abort",k,{once:!0});async function h(d,s){let m=new AbortController;w.set(s.id,m);try{if(!t.runtime)throw Error("API unavailable during module inspection");let a=await Vr(t.runtime,s.input,AbortSignal.any([n,m.signal]));if(!n.aborted)d.postMessage({type:"response",id:s.id,response:a})}catch(a){if(!n.aborted)d.postMessage({type:"response",id:s.id,error:E(a)})}finally{w.delete(s.id)}}try{n.throwIfAborted(),f=setTimeout(()=>o.abort(Error(`UI execution timed out after ${l}ms`)),l),await Promise.race([i,c.promise]),n.throwIfAborted();let d=typeof r==="string"?{source:r,css:t.css}:await Promise.race([r(),c.promise.then(()=>{throw Error("Worker finished before startup")})]);n.throwIfAborted();let s=R();return g=s,s.onerror=(m)=>c.reject(Error(m.message)),s.onmessage=(m)=>{let a=m.data;switch(a.type){case"importing":b=setTimeout(()=>o.abort(Error(`UI import timed out after ${u}ms`)),u);break;case"imported":clearTimeout(b);break;case"done":c.resolve(a.result);break;case"error":c.reject(Error(a.error));break;case"cancel":w.get(a.id)?.abort();break;case"request":h(s,a);break}},s.postMessage({type:"start",...d,id:e,input:t.input}),await c.promise}finally{clearTimeout(f),clearTimeout(b),n.removeEventListener("abort",k),o.abort();for(let d of w.values())d.abort();g?.terminate(),p.resolve()}}async function sc(r,e,t){t?.throwIfAborted();let l=r.plugins.list().find((o)=>o.id===e.id);if(l?.status!=="enabled")throw Error("Load and enable the plugin before ui_test");if([e.slot,e.view,e.codeBlock].filter(Boolean).length!==1)throw Error("ui_test requires exactly one of slot, view or codeBlock");let u=e.view?l.web?.find((o)=>o.view===e.view):void 0;if(e.view&&u&&e.kind&&u.kind!==e.kind)throw Error(`View kind mismatch: expected ${u.kind}, got ${e.kind}`);let i=e.kind??u?.kind;if(i!==void 0&&i!=="page"&&i!=="tab"&&i!=="card"&&i!=="sidebar")throw Error(`Unsupported view kind: ${i}`);let p=await ii(async()=>{let o=await r.plugins.webBundle(e.id);if(!o)throw Error("Plugin has no dynamic Web bundle");let n=await r.plugins.webCSS(e.id);return{source:o,css:n}},e.id,{input:{...e,kind:i},runtime:r,signal:t,timeoutMs:e.timeoutMs,importTimeoutMs:e.importTimeoutMs});if(!("steps"in p))throw Error("Worker returned an invalid UI report");return p}
3
+ export{ii,sc};
@@ -0,0 +1,10 @@
1
+ // @bun
2
+ import"./chunk-rhkw8ygf.js";import"./chunk-0y13kfpt.js";import{vn}from"./chunk-082x3g29.js";import{$t,Pt,jt}from"./chunk-e01wravf.js";import{bt}from"./chunk-y9r7tt53.js";import{ue}from"./chunk-x0afp8wt.js";import{qn}from"./chunk-z2zhr4e5.js";import{Q,te}from"./chunk-tnay319j.js";import{We,re}from"./chunk-yq20v3va.js";import{J}from"./chunk-9nkb5q43.js";import{Ci,mo}from"./chunk-qnkxeh37.js";import{G,Vt,ve,pe,Ce,Ie,Y}from"./chunk-4qtw5cga.js";import{W,_t,Nr,ze}from"./chunk-nbgtqpay.js";var Se="https://chatgpt.com/backend-api",Ee="https://api.openai.com/auth",_e=0,X=1000,ke=60000,Te=15000,Re=3,ae=new Set(["openai","openai-codex","opencode"]),xe=1009,Oe="websocket_connection_limit_reached",Ae="previous_response_not_found",Me=new Set(["completed","incomplete","failed","cancelled","queued","in_progress"]);function Z(e){if(e.stopReason==="pending")throw Error("Codex stream ended without a stop reason");if(e.stopReason==="error"||e.stopReason==="aborted")throw Error(e.errorMessage||"An unknown error occurred")}function Le(e){return/GoUsageLimitError|FreeUsageLimitError|Monthly usage limit reached|available balance|insufficient_quota|out of budget|quota exceeded|billing/i.test(e)}function De(e,r){if(e===429&&Le(r))return!1;if(e===429||e===500||e===502||e===503||e===504)return!0;return/rate.?limit|overloaded|service.?unavailable|upstream.?connect|connection.?refused/i.test(r)}function Ne(e){let r=e.get("retry-after-ms");if(r!==null){let s=Number(r);if(Number.isFinite(s))return Math.max(0,s)}let t=e.get("retry-after");if(!t)return;let n=Number(t);if(Number.isFinite(n))return Math.max(0,n*1000);let o=Date.parse(t);if(!Number.isNaN(o))return Math.max(0,o-Date.now());return}class K extends Error{}function qe(e,r){let t=r?.maxRetryDelayMs??ke;if(t>0&&e>t)throw new K(`Server requested ${Math.ceil(e/1000)}s retry delay (max: ${Math.ceil(t/1000)}s)`);return e}function ee(e,r){return new Promise((t,n)=>{if(r?.aborted){n(Error("Request was aborted"));return}let o=setTimeout(t,e);r?.addEventListener("abort",()=>{clearTimeout(o),n(Error("Request was aborted"))})})}function ne(e){if(e===void 0)return;if(!Number.isFinite(e)||e<0)throw Error(`Invalid timeoutMs: ${String(e)}`);return Math.floor(e)}function Be(){if(typeof process>"u"||!(process.versions?.node||process.versions?.bun))return null;return process.getBuiltinModule?.("node:zlib")??null}function Pe(e){let r=Be();if(!r||typeof r.zstdCompressSync!=="function")return null;try{let t=r.zstdCompressSync(e,{params:{[r.constants.ZSTD_c_compressionLevel]:Re}});return new Uint8Array(t)}catch{return null}}var Fe=(e,r,t)=>{let n=new W,o=pe(r,e.compat?.supportsMidConvoSystemMessages);return(async()=>{let s={role:"assistant",content:[],api:"openai-codex-responses",provider:e.provider,model:e.id,usage:{input:0,output:0,cacheRead:0,cacheWrite:0,totalTokens:0,cost:{input:0,output:0,cacheRead:0,cacheWrite:0,total:0}},stopReason:"pending",timestamp:Date.now()};try{let i=t?.apiKey;if(!i)throw Error(`No API key for provider: ${e.provider}`);let u=ht(i),a=We(Ce(o.messages),e.compat?.supportsOpenAIGrammarTools??!1),d=t?.cacheRetention==="none"?void 0:t?.sessionId,p=bt(d),c=Ue(e,o,t,p,a),l=await t?.onPayload?.(c,e);if(l!==void 0)c=l;let f=p||mo(),m=wt(e.headers,t?.headers,u,i,p),b=gt(e.headers,t?.headers,u,i,f),h=JSON.stringify(c),E=ne(t?.timeoutMs),w=ne(t?.websocketConnectTimeoutMs),v=t?.transport||"auto",T=!1,y=v!=="sse"&&me(d);if(y)se(d);if(v!=="sse"&&!y){let S=!1,k=!1,O=!1;while(!0){S=!1;try{if(await mt(Je(e.baseUrl),c,b,s,n,e,()=>{if(S=!0,!T)T=!0,n.push({type:"start",partial:s})},E,w,d,u,a,t),t?.signal?.aborted)throw Error("Request was aborted");Z(s),n.push({type:"done",reason:s.stopReason,message:s}),n.end();return}catch(R){let N=t?.signal?.aborted,q=!S&&Ge(R),M=je(R);if(!N&&M&&!O){O=!0;continue}if(!N&&q&&!k){k=!0;continue}if(N||Ke(R)&&!q)throw R;if(ze(s,Nr("provider_transport_failure",R,{configuredTransport:v,...S?{}:{fallbackTransport:"sse"},eventsEmitted:S,phase:S?"after_message_stream_start":"before_message_stream_start",requestBytes:new TextEncoder().encode(h).byteLength})),rt(d,R),S)throw R;se(d);break}}}let x=Pe(h);if(x)m.set("content-encoding","zstd");let A=x??h,_,D,U=t?.maxRetries??_e;for(let S=0;S<=U;S++){if(t?.signal?.aborted)throw Error("Request was aborted");try{let k=E!==void 0&&E>0?AbortSignal.timeout(E):void 0,O=vn([t?.signal,k]);try{_=await(t?.fetch??globalThis.fetch)(le(e.baseUrl),{method:"POST",headers:m,body:A,signal:O.signal})}catch(M){if(k?.aborted&&!t?.signal?.aborted)throw Error(`Codex SSE response headers timed out after ${E}ms`);throw M}finally{O.cleanup()}if(await t?.onResponse?.({status:_.status,headers:J(_.headers)},e),_.ok)break;let R=await _.text();if(S<U&&De(_.status,R)){let M=Ne(_.headers),ge=M===void 0?X*2**S:qe(M,t);await ee(ge,t?.signal);continue}let N=new Response(R,{status:_.status,statusText:_.statusText}),q=await yt(N);throw Error(q.friendlyMessage||q.message)}catch(k){if(k instanceof Error){if(k.name==="AbortError"||k.message==="Request was aborted")throw Error("Request was aborted")}if(D=k instanceof Error?k:Error(String(k)),S<U&&!(D instanceof K)&&!D.message.includes("usage limit")){let O=X*2**S;await ee(O,t?.signal);continue}throw D}}if(!_?.ok)throw D??Error("Failed after retries");if(!_.body)throw Error("No response body");if(!T)T=!0,n.push({type:"start",partial:s});if(await He(_,s,n,e,a,t),t?.signal?.aborted)throw Error("Request was aborted");Z(s),n.push({type:"done",reason:s.stopReason,message:s}),n.end()}catch(i){for(let u of s.content)delete u.partialJson,delete u.customInput;s.stopReason=t?.signal?.aborted?"aborted":"error",s.errorMessage=te(Q(i)),n.push({type:"error",reason:s.stopReason,error:s}),n.end()}})(),n},Bt=(e,r,t)=>{let n=t?.apiKey;if(!n)throw Error(`No API key for provider: ${e.provider}`);let o={...re(e,r,t,n),toolChoice:t?.toolChoice},s=t?.reasoning?Y(e,t.reasoning):void 0;return Fe(e,r,{...o,reasoningEffort:s==="off"?void 0:s})};function Ue(e,r,t,n,o=We(Ce(r.messages),e.compat?.supportsOpenAIGrammarTools??!1)){let s=e.compat?.supportsStrictMode??!0,i=e.compat?.supportsOpenAIGrammarTools??!1,u=e.compat?.supportsAdditionalTools??!1,a=e.compat?.supportsToolSearch??!1,d=Ie(r.messages,u||a),p=$t(e,r,ae,{includeSystemPrompt:!1,grammarToolInputProperties:o,supportsMidConvoSystemMessages:e.compat?.supportsMidConvoSystemMessages??!1,supportsAdditionalTools:u,supportsToolSearch:a,toolOptions:{strict:null,supportsStrictMode:s,supportsOpenAIGrammarTools:i}}),c=ve(r.messages),l=c?G(c):"",f={model:e.id,store:!1,stream:!0,instructions:l||"You are a helpful assistant.",input:p,text:{verbosity:t?.textVerbosity||"low"},include:["reasoning.encrypted_content"],prompt_cache_key:n,tool_choice:t?.toolChoice??"auto",parallel_tool_calls:!0};if(t?.temperature!==void 0)f.temperature=t.temperature;if(t?.serviceTier!==void 0)f.service_tier=t.serviceTier;if(d.requestTools.length>0)f.tools=Pt(d.requestTools,{strict:null,supportsStrictMode:s,supportsOpenAIGrammarTools:i});if(t?.reasoningEffort!==void 0){let m=t.reasoningEffort==="none"?e.thinkingLevelMap?.off===void 0?"none":e.thinkingLevelMap.off:e.thinkingLevelMap?.[t.reasoningEffort]??t.reasoningEffort;if(m!==null)f.reasoning={effort:m,summary:t.reasoningSummary??"auto"}}else if(e.reasoning&&e.thinkingLevelMap?.off!==null)f.reasoning={effort:e.thinkingLevelMap?.off??"none"};return f}function $e(e,r){switch(r){case"flex":return 0.5;case"priority":return e.id==="gpt-5.5"?2.5:2;default:return 1}}function ce(e,r,t){let n=$e(t,r);if(n===1)return;e.cost.input*=n,e.cost.output*=n,e.cost.cacheRead*=n,e.cost.cacheWrite*=n,e.cost.total=e.cost.input+e.cost.output+e.cost.cacheRead+e.cost.cacheWrite}function fe(e,r){if(e==="default"&&(r==="flex"||r==="priority"))return r;return e??r}function le(e){let t=(e&&e.trim().length>0?e:Se).replace(/\/+$/,"");if(t.endsWith("/codex/responses"))return t;if(t.endsWith("/codex"))return`${t}/responses`;return`${t}/codex/responses`}function Je(e){let r=new URL(le(e));if(r.protocol==="https:")r.protocol="wss:";if(r.protocol==="http:")r.protocol="ws:";return r.toString()}async function He(e,r,t,n,o,s){await jt(de(Ye(e,s?.signal),r,n,s?.onProviderStreamEvent),r,t,n,{serviceTier:s?.serviceTier,grammarToolInputProperties:o,resolveServiceTier:fe,applyServiceTierPricing:(i,u)=>ce(i,u,n)})}class L extends Error{code;payload;constructor(e,r){super(e);this.name="CodexApiError",this.code=r?.code,this.payload=r?.payload,this.cause=r?.cause}}class F extends Error{payload;constructor(e,r){super(e);this.name="CodexProtocolError",this.payload=r?.payload,this.cause=r?.cause}}class j extends Error{constructor(e){super(_t(e));this.name="ProviderStreamEventCallbackError",this.cause=e}}function Ke(e){return e instanceof L||e instanceof F||e instanceof j}function Ge(e){return e instanceof L&&e.code===Oe}function je(e){return e instanceof L&&e.code===Ae}function Ve(e){let r=e.error&&typeof e.error==="object"?e.error:void 0;return{code:typeof e.code==="string"?e.code:typeof r?.code==="string"?r.code:void 0,message:typeof e.message==="string"?e.message:typeof r?.message==="string"?r.message:void 0}}async function*de(e,r,t,n){for await(let o of e){try{await n?.(o,t)}catch(i){throw new j(i)}let s=typeof o.type==="string"?o.type:void 0;if(!s)continue;if(s==="error"){let{code:i,message:u}=Ve(o);throw new L(`Codex error: ${u||i||JSON.stringify(o)}`,{code:i,payload:o})}if(s==="response.failed"){let i=o.response,u=i?.error?.code,a=i?.error?.message;throw new L(a||"Codex response failed",{code:u,payload:o})}if(s==="response.done"||s==="response.completed"||s==="response.incomplete"){let i=o.response;if(typeof i?.end_turn==="boolean")r.endTurn=i.end_turn;let u=i?{...i,status:Xe(i.status)}:i;yield{...o,type:"response.completed",response:u};return}yield o}}function Xe(e){if(typeof e!=="string")return;return Me.has(e)?e:void 0}async function*Ye(e,r){if(!e.body)return;let t=e.body.getReader(),n=new TextDecoder,o="",s=()=>{t.cancel().catch(()=>{})};r?.addEventListener("abort",s,{once:!0});try{while(!0){if(r?.aborted)throw Error("Request was aborted");let{done:i,value:u}=await t.read();if(r?.aborted)throw Error("Request was aborted");if(o+=i?n.decode():n.decode(u,{stream:!0}),i&&o.trim())o+=`
3
+
4
+ `;let a=o.indexOf(`
5
+
6
+ `);while(a!==-1){let d=o.slice(0,a);o=o.slice(a+2);let p=d.split(`
7
+ `).filter((c)=>c.startsWith("data:")).map((c)=>c.slice(5).trim());if(p.length>0){let c=p.join(`
8
+ `).trim();if(c&&c!=="[DONE]")try{yield JSON.parse(c)}catch(l){throw new F(`Invalid Codex SSE JSON: ${_t(l)}`,{cause:l,payload:c})}}a=o.indexOf(`
9
+
10
+ `)}if(i)break}}finally{r?.removeEventListener("abort",s);try{await t.cancel()}catch{}try{t.releaseLock()}catch{}}}var Ze="responses_websockets=2026-02-06",Qe=300000,et=3300000,g=new Map,B=new Map,I=new Set;function V(e){let r=B.get(e);if(!r)r={requests:0,connectionsCreated:0,connectionsReused:0,cachedContextRequests:0,storeTrueRequests:0,fullContextRequests:0,deltaRequests:0,lastInputItems:0,websocketFailures:0,sseFallbacks:0},B.set(e,r);return r}function It(e){let r=B.get(e);return r?{...r}:void 0}function Ft(e){if(e){B.delete(e),I.delete(e);return}B.clear(),I.clear()}function tt(e){let r=(t)=>{if(t.idleTimer)clearTimeout(t.idleTimer);C(t.socket,1000,"debug_close")};if(e){for(let t of g.get(e)?.values()??[])r(t);g.delete(e);return}for(let t of g.values())for(let n of t.values())r(n);g.clear()}Ci(tt);function me(e){return e?I.has(e):!1}function se(e){if(!e)return;let r=V(e);r.sseFallbacks++,r.websocketFallbackActive=me(e)}function rt(e,r){if(!e)return;I.add(e);let t=V(e);t.websocketFailures++,t.lastWebSocketError=_t(r),t.websocketFallbackActive=!0}var z=null;async function nt(e){if(!e&&z)return z;if(typeof process<"u"&&process.versions?.bun){let t=class extends WebSocket{constructor(n,o){let s={};if(Array.isArray(o)||typeof o==="string")s={protocols:o};else s={...o};let i=qn(n.toString().replace(/^wss:/,"https:").replace(/^ws:/,"http:"),e);super(n,{...s,...i?{proxy:i.toString()}:{}})}};if(!e)z=t;return t}let r=globalThis.WebSocket;if(typeof r!=="function")return null;return r}class ye extends Error{code;reason;wasClean;constructor(e,r){super(e);this.name="WebSocketCloseError",this.code=r?.code,this.reason=r?.reason,this.wasClean=r?.wasClean}}function st(e){let r=e.readyState;return typeof r==="number"?r:void 0}function P(e){let r=st(e);return r===void 0||r===1}function ot(e){return Date.now()-e.createdAt>=et}function C(e,r=1000,t="done"){try{e.close(r,t)}catch{}}function oe(e,r,t){if(t.idleTimer)clearTimeout(t.idleTimer);t.idleTimer=setTimeout(()=>{if(t.busy)return;C(t.socket,1000,"idle_timeout");let n=g.get(e);if(n?.get(r)===t)n.delete(r);if(n?.size===0)g.delete(e)},Qe)}async function H(e,r,t,n=Te,o){let s=await nt(o);if(!s)throw Error("WebSocket transport is not available in this runtime");let i=J(r);return delete i["OpenAI-Beta"],new Promise((u,a)=>{let d=!1,p,c;try{c=new s(e,{headers:i})}catch(w){a(w instanceof Error?w:Error(String(w)));return}let l=()=>{if(p)clearTimeout(p),p=void 0;c.removeEventListener("open",m),c.removeEventListener("error",b),c.removeEventListener("close",h),t?.removeEventListener("abort",E)},f=(w,v)=>{if(d)return;if(d=!0,l(),v)C(c,1000,v);a(w)},m=()=>{if(d)return;d=!0,l(),u(c)},b=(w)=>{f(be(w))},h=(w)=>{f(he(w))},E=()=>{f(Error("Request was aborted"),"aborted")};if(c.addEventListener("open",m),c.addEventListener("error",b),c.addEventListener("close",h),t?.addEventListener("abort",E),n>0)p=setTimeout(()=>{f(Error(`WebSocket connect timeout after ${n}ms`),"connect_timeout")},n);if(t?.aborted)E()})}async function it(e,r,t,n,o,s,i){if(!t){let c=await H(e,r,o,s,i);return{socket:c,reused:!1,release:()=>C(c)}}let u=g.get(t),a=u?.get(n);if(a){if(a.idleTimer)clearTimeout(a.idleTimer),a.idleTimer=void 0;if(!a.busy&&ot(a)){if(C(a.socket,1000,"connection_age_limit"),u?.delete(n),u?.size===0)g.delete(t)}else if(!a.busy&&P(a.socket))return a.busy=!0,{socket:a.socket,entry:a,reused:!0,release:({keep:c}={})=>{if(!c||!P(a.socket)){C(a.socket);let l=g.get(t);if(l?.get(n)===a)l.delete(n);if(l?.size===0)g.delete(t);return}a.busy=!1,oe(t,n,a)}};if(a.busy){let c=await H(e,r,o,s,i);return{socket:c,reused:!1,release:()=>{C(c)}}}if(!P(a.socket)){if(C(a.socket),u?.delete(n),u?.size===0)g.delete(t)}}let d=await H(e,r,o,s,i),p={socket:d,busy:!0,createdAt:Date.now()};if(u=g.get(t),!u)u=new Map,g.set(t,u);return u.set(n,p),{socket:d,entry:p,reused:!1,release:({keep:c}={})=>{if(!c||!P(p.socket)){if(C(p.socket),p.idleTimer)clearTimeout(p.idleTimer);let l=g.get(t);if(l?.get(n)===p)l.delete(n);if(l?.size===0)g.delete(t);return}p.busy=!1,oe(t,n,p)}}}function be(e){if(e&&typeof e==="object"){let r="message"in e?e.message:void 0;if(typeof r==="string"&&r.length>0)return Error(r);let t="error"in e?e.error:void 0;if(t instanceof Error&&t.message.length>0)return t;if(t&&typeof t==="object"&&"message"in t){let n=t.message;if(typeof n==="string"&&n.length>0)return Error(n)}}return Error("WebSocket error")}function he(e){if(e&&typeof e==="object"){let r="code"in e?e.code:void 0,t="reason"in e?e.reason:void 0,n="wasClean"in e?e.wasClean:void 0,o=typeof r==="number"?` ${r}`:"",s=typeof t==="string"&&t.length>0?` ${t}`:"";if(!s&&r===xe)s=" message too big";return new ye(`WebSocket closed${o}${s}`.trim(),{code:typeof r==="number"?r:void 0,reason:typeof t==="string"&&t.length>0?t:void 0,wasClean:typeof n==="boolean"?n:void 0})}return Error("WebSocket closed")}async function at(e){if(typeof e==="string")return e;if(e instanceof ArrayBuffer)return new TextDecoder().decode(new Uint8Array(e));if(ArrayBuffer.isView(e)){let r=e;return new TextDecoder().decode(new Uint8Array(r.buffer,r.byteOffset,r.byteLength))}if(e&&typeof e==="object"&&"arrayBuffer"in e){let t=await e.arrayBuffer();return new TextDecoder().decode(new Uint8Array(t))}return null}async function*ct(e,r,t){let n=[],o=null,s=!1,i=null,u=!1,a=()=>{if(!o)return;let f=o;o=null,f()},d=(f)=>{(async()=>{let m=null;try{if(!f||typeof f!=="object"||!("data"in f))return;if(m=await at(f.data),!m)return;let b=JSON.parse(m),h=typeof b.type==="string"?b.type:"";if(h==="response.completed"||h==="response.done"||h==="response.incomplete")u=!0,s=!0;n.push(b),a()}catch(b){i=new F(`Invalid Codex WebSocket JSON: ${_t(b)}`,{cause:b,payload:m}),s=!0,a()}})()},p=(f)=>{i=be(f),s=!0,a()},c=(f)=>{if(u){s=!0,a();return}if(!i)i=he(f);s=!0,a()},l=()=>{i=Error("Request was aborted"),s=!0,a()};e.addEventListener("message",d),e.addEventListener("error",p),e.addEventListener("close",c),r?.addEventListener("abort",l);try{while(!0){if(r?.aborted)throw Error("Request was aborted");if(n.length>0){yield n.shift();continue}if(s)break;let f;await new Promise((m,b)=>{if(o=m,t!==void 0&&t>0)f=setTimeout(()=>{let h=Error(`WebSocket idle timeout after ${t}ms`);i=h,s=!0,o=null,C(e,1000,"idle_timeout"),b(h)},t)}).finally(()=>{if(f)clearTimeout(f)})}if(i)throw i;if(!u)throw Error("WebSocket stream closed before response.completed")}finally{e.removeEventListener("message",d),e.removeEventListener("error",p),e.removeEventListener("close",c),r?.removeEventListener("abort",l)}}function ie(e){let{input:r,previous_response_id:t,...n}=e;return n}function ut(e,r){return JSON.stringify(e??[])===JSON.stringify(r??[])}function ft(e,r){return JSON.stringify(ie(e))===JSON.stringify(ie(r))}function lt(e,r){if(!ft(e,r.lastRequestBody))return;let t=e.input??[],n=[...r.lastRequestBody.input??[],...r.lastResponseItems];if(t.length<n.length)return;let o=t.slice(0,n.length);if(!ut(o,n))return;return t.slice(n.length)}function dt(e,r){let t=e.continuation;if(!t)return r;let n=lt(r,t);if(!n||!t.lastResponseId)return e.continuation=void 0,r;return{...r,previous_response_id:t.lastResponseId,input:n}}async function*pt(e,r){let t=!1;for await(let n of e){if(!t)t=!0,r();yield n}}async function mt(e,r,t,n,o,s,i,u,a,d,p,c,l){let{socket:f,entry:m,reused:b,release:h}=await it(e,t,d,p,l?.signal,a,l?.env),E=!0,w=l?.transport==="websocket-cached"||l?.transport==="auto",v=r,T=w&&m?dt(m,v):v,y=d?V(d):void 0;if(y){if(y.requests++,b)y.connectionsReused++;else y.connectionsCreated++;if(w)y.cachedContextRequests++;if(T.store===!0)y.storeTrueRequests++;if(y.lastInputItems=T.input?.length??0,T.previous_response_id)y.deltaRequests++,y.lastDeltaInputItems=T.input?.length??0,y.lastPreviousResponseId=T.previous_response_id;else y.fullContextRequests++,y.lastDeltaInputItems=void 0,y.lastPreviousResponseId=void 0}try{if(f.send(JSON.stringify({type:"response.create",...T})),await jt(pt(de(ct(f,l?.signal,u),n,s,l?.onProviderStreamEvent),i),n,o,s,{serviceTier:l?.serviceTier,grammarToolInputProperties:c,resolveServiceTier:fe,applyServiceTierPricing:(x,A)=>ce(x,A,s)}),l?.signal?.aborted)E=!1;else if(w&&m&&n.responseId){let x=$t(s,Vt({messages:[n]}),ae,{includeSystemPrompt:!1,grammarToolInputProperties:c}).filter((A)=>A.type!=="function_call_output"&&A.type!=="custom_tool_call_output");m.continuation={lastRequestBody:v,lastResponseId:n.responseId,lastResponseItems:x}}}catch(x){if(m)m.continuation=void 0;throw E=!1,x}finally{h({keep:E})}}async function yt(e){let r=await e.text(),t=r||e.statusText||"Request failed",n;try{let s=JSON.parse(r)?.error;if(s){let i=s.code||s.type||"";if(/usage_limit_reached|usage_not_included|rate_limit_exceeded/i.test(i)||e.status===429){let u=s.plan_type?` (${s.plan_type.toLowerCase()} plan)`:"",a=s.resets_at?Math.max(0,Math.round((s.resets_at*1000-Date.now())/60000)):void 0,d=a!==void 0?` Try again in ~${a} min.`:"";n=`You have hit your ChatGPT usage limit${u}.${d}`.trim()}t=s.message||n||t}}catch{}return{message:t,friendlyMessage:n}}function ht(e){try{let r=e.split(".");if(r.length!==3)throw Error("Invalid token");let n=JSON.parse(atob(r[1]))?.[Ee]?.chatgpt_account_id;if(!n)throw Error("No account ID in token");return n}catch{throw Error("Failed to extract accountId from token")}}function we(e,r,t,n){let o=new Headers({originator:"pi","User-Agent":ue()});for(let[s,i]of Object.entries(e||{}))o.set(s,i);for(let[s,i]of Object.entries(r||{}))if(i===null)o.delete(s);else o.set(s,i);return o.set("Authorization",`Bearer ${n}`),o.set("chatgpt-account-id",t),o}function wt(e,r,t,n,o){let s=we(e,r,t,n);if(s.set("OpenAI-Beta","responses=experimental"),s.set("accept","text/event-stream"),s.set("content-type","application/json"),o)s.set("session-id",o),s.set("x-client-request-id",o);return s}function gt(e,r,t,n,o){let s=we(e,r,t,n);return s.delete("accept"),s.delete("content-type"),s.delete("OpenAI-Beta"),s.delete("openai-beta"),s.set("OpenAI-Beta",Ze),s.set("x-client-request-id",o),s.set("session-id",o),s}export{tt as closeOpenAICodexWebSocketSessions,It as getOpenAICodexWebSocketDebugStats,Ft as resetOpenAICodexWebSocketDebugStats,Fe as stream,Bt as streamSimple};
@@ -0,0 +1,3 @@
1
+ // @bun
2
+ function o(t,r,n,i,s){if(i==="m")throw TypeError("Private method is not writable");if(i==="a"&&!s)throw TypeError("Private accessor was defined without a setter");if(typeof r==="function"?t!==r||!s:!r.has(t))throw TypeError("Cannot write private member to an object whose class did not declare it");return i==="a"?s.call(t,n):s?s.value=n:r.set(t,n),n}function e(t,r,n,i){if(n==="a"&&!i)throw TypeError("Private accessor was defined without a getter");if(typeof r==="function"?t!==r||!i:!r.has(t))throw TypeError("Cannot read private member from an object whose class did not declare it");return n==="m"?i:n==="a"?i.call(t):i?i.value:r.get(t)}function wt(t){return typeof t==="object"&&t!==null&&(("name"in t)&&t.name==="AbortError"||("message"in t)&&String(t.message).includes("FetchRequestCanceledException"))}var Sr=(t)=>{if(t instanceof Error)return t;if(typeof t==="object"&&t!==null){try{let r=Object.prototype.toString.call(t);if(r==="[object Error]"||r==="[object DOMException]"){let n=Error(t.message,t.cause?{cause:t.cause}:{});if(t.stack)n.stack=t.stack;if(t.cause&&!n.cause)n.cause=t.cause;if(t.name)n.name=t.name;return n}}catch{}try{return Error(JSON.stringify(t))}catch{}}return Error(t)};var p=(()=>{class t extends Error{}return t})();class le extends p{constructor(t,r,n,i,s){super(`${le.makeMessage(t,r,n)}`);this.status=t,this.headers=i,this.requestID=i?.get("request-id"),this.workspaceID=i?.get("anthropic-workspace-id"),this.error=r,this.type=s??null}static makeMessage(t,r,n){let i=r?.message?typeof r.message==="string"?r.message:JSON.stringify(r.message):r?JSON.stringify(r):n;if(t&&i)return`${t} ${i}`;if(t)return`${t} status code (no body)`;if(i)return i;return"(no status code or body)"}static generate(t,r,n,i){if(!t||!i)return new er({message:n,cause:Sr(r)});let s=r,c=s?.error?.type;if(t===400)return new Go(t,s,n,i,c);if(t===401)return new Vo(t,s,n,i,c);if(t===403)return new Ko(t,s,n,i,c);if(t===404)return new Qo(t,s,n,i,c);if(t===409)return new Yo(t,s,n,i,c);if(t===422)return new Xo(t,s,n,i,c);if(t===429)return new Jo(t,s,n,i,c);if(t>=500)return new Zo(t,s,n,i,c);return new le(t,s,n,i,c)}}class je extends le{constructor({message:t}={}){super(void 0,void 0,t||"Request was aborted.",void 0)}}class er extends le{constructor({message:t,cause:r}){super(void 0,void 0,t||"Connection error.",void 0);if(r)this.cause=r}}class qo extends er{constructor({message:t}={}){super({message:t??"Request timed out."})}}class ds extends p{constructor(t,{cause:r}={}){super(t??"Retryable error.");if(r!==void 0)this.cause=r}}class Go extends le{}class Vo extends le{}class Ko extends le{}class Qo extends le{}class Yo extends le{}class Xo extends le{}class Jo extends le{}class Zo extends le{}var b=/^[a-z][a-z0-9+.-]*:/i,pa=(t)=>b.test(t),De=(t)=>(De=Array.isArray,De(t)),ms=De;function Wn(t){if(typeof t!=="object")return{};return t??{}}function hs(t){if(!t)return!0;for(let r in t)return!1;return!0}function l(t,r){return Object.prototype.hasOwnProperty.call(t,r)}function gs(t){return t!=null&&typeof t==="object"&&!Array.isArray(t)}var ei=(t,r)=>{if(typeof r!=="number"||!Number.isInteger(r))throw new p(`${t} must be an integer`);if(r<0)throw new p(`${t} must be a positive integer`);return r};var ti=(t)=>{try{return JSON.parse(t)}catch(r){return}};function tr(t){}var U=(t)=>{if(typeof globalThis.process<"u")return globalThis.process.env?.[t]?.trim()||void 0;if(typeof globalThis.Deno<"u")return globalThis.Deno.env?.get?.(t)?.trim()||void 0;return};function da(t){let r=0;for(let s of t)r+=s.length;let n=new Uint8Array(r),i=0;for(let s of t)n.set(s,i),i+=s.length;return n}var y;function xr(t){let r;return(y??(r=new globalThis.TextEncoder,y=r.encode.bind(r)))(t)}var w;function rr(t){let r;return(w??(r=new globalThis.TextDecoder,w=r.decode.bind(r)))(t)}var Hn="warn",a={off:0,error:200,warn:300,info:400,debug:500},ri=(t,r,n)=>{if(!t)return;if(l(a,t))return t;n.warn(`${r} was set to ${JSON.stringify(t)}, expected one of ${JSON.stringify(Object.keys(a))}`);return};function u(){}function f(t,r,n){if(!r||a[t]>a[n])return u;else return r[t].bind(r)}var O={error:u,warn:u,info:u,debug:u},h=new WeakMap;function x(t,r){let n=h.get(t);if(n&&n[0]===r)return n[1];let i={error:f("error",t,r),warn:f("warn",t,r),info:f("info",t,r),debug:f("debug",t,r)};return h.set(t,[r,i]),i}function N(t){let r=t.logger,n=t.logLevel??"off";if(!r)return O;return x(r,n)}var m,d;function ma(){let t=U("ANTHROPIC_LOG");if(!d||t!==m)m=t,d=x(console,ri(t,"process.env['ANTHROPIC_LOG']",x(console,Hn))??Hn);return d}function Ct(t,r,n){if(t.debug===u)return;t.debug(r,E(n))}var E=(t)=>{if(t.options)t.options={...t.options},delete t.options.headers;if(t.headers)t.headers=Object.fromEntries((t.headers instanceof Headers?[...t.headers]:Object.entries(t.headers)).map(([r,n])=>[r,r.toLowerCase()==="authorization"||r.toLowerCase()==="api-key"||r.toLowerCase()==="x-api-key"||r.toLowerCase()==="cookie"||r.toLowerCase()==="set-cookie"?"***":n]));if("retryOfRequestLogID"in t){if(t.retryOfRequestLogID)t.retryOf=t.retryOfRequestLogID;delete t.retryOfRequestLogID}return t};function Se(t,r){return t instanceof le&&t.status===r}function T(t){return t instanceof le&&typeof t.status==="number"&&t.status>=400&&t.status<500}function vr(t){return T(t)&&!Se(t,408)&&!Se(t,409)&&!Se(t,429)}function ni(t,r,n){return Math.min(r*2**t,n)}function ha(t,r){return t+Math.random()*(r-t)}function oi(t){return t*(1-Math.random()*0.25)}var M=(()=>{class t extends Error{constructor(r){let n=typeof r==="string"?r:r.map((i)=>{if(i.type==="text")return i.text;return`[${i.type}]`}).join(" ");super(n);this.name="ToolError",this.content=r}}return t})();var ys=15000,g=5000;function zn(t,r){if(!(t>=g))throw new p(`${r} must be at least ${g}ms (got ${t}); to run without memory sync, pass \`memorySyncIntervalMs: null\` to the worker instead`)}function _r(){let t,r;return{promise:new Promise((i,s)=>{t=i,r=s}),resolve:t,reject:r}}
3
+ export{o,e,wt,Sr,p,le,je,er,qo,ds,Go,Vo,Ko,Qo,Yo,Xo,Jo,Zo,pa,De,ms,Wn,hs,gs,ei,ti,tr,U,da,xr,rr,Hn,ri,N,ma,Ct,Se,vr,ni,ha,oi,M,ys,zn,_r};
@@ -0,0 +1,8 @@
1
+ // @bun
2
+ import{V}from"./chunk-0y13kfpt.js";import{A}from"./chunk-rhkw8ygf.js";import{J,ke}from"./chunk-9nkb5q43.js";import{W,Nr,ze}from"./chunk-nbgtqpay.js";class u extends Error{code;diagnosticDetails;constructor(r,t,n){super(r);this.name="PiMessagesResponseError",this.code=t,this.diagnosticDetails=n}}function x(r){try{let t=JSON.parse(r),n=t?.error;return t&&typeof n==="object"&&n!==null&&!Array.isArray(n)?t:void 0}catch{return}}function m(r){return r.length>8192?`${r.slice(0,8192)}\u2026`:r}function y(r,t,n){let e=typeof n?.error?.message==="string"?n.error.message:void 0,s=typeof n?.error?.code==="string"?n.error.code:void 0,a=e??t,o=s?` (${s})`:"";return`${r.status} ${r.statusText}: ${a}${o}`}function k(r,t,n,e){let s=x(e),a=typeof s?.error?.code==="string"?s.error.code:void 0;return new u(y(n,e,s),a,{version:1,provider:r.provider,model:r.id,url:t.toString(),status:n.status,statusText:n.statusText,...s?.error===void 0?{}:{error:s.error},...s?{}:{body:m(e)},timestampMs:Date.now()})}function h(){return{input:0,output:0,cacheRead:0,cacheWrite:0,totalTokens:0,cost:{input:0,output:0,cacheRead:0,cacheWrite:0,total:0}}}function l(r,t){if(!t)return;ze(r,{type:"pi_messages_rewrite",timestamp:Date.now(),details:{...t}})}function w(r){let t={role:"assistant",content:[],api:r.api,provider:r.provider,model:r.id,usage:h(),stopReason:"pending",timestamp:Date.now()},n=new Map;return(e)=>{switch(e.type){case"done":if(Object.assign(t,{stopReason:e.reason,usage:e.usage,responseId:e.responseId}),e.providerThinkingLevel!==void 0)t.providerThinkingLevel=e.providerThinkingLevel;return l(t,e.rewrite),{type:"done",reason:e.reason,message:t};case"error":if(Object.assign(t,{stopReason:e.reason,usage:e.usage,errorMessage:e.errorMessage,responseId:e.responseId}),e.providerThinkingLevel!==void 0)t.providerThinkingLevel=e.providerThinkingLevel;return l(t,e.rewrite),{type:"error",reason:e.reason,error:t};case"start":break;case"text_start":t.content[e.contentIndex]={type:"text",text:""};break;case"text_delta":t.content[e.contentIndex].text+=e.delta;break;case"text_end":Object.assign(t.content[e.contentIndex],{text:e.content,textSignature:e.contentSignature});break;case"thinking_start":t.content[e.contentIndex]={type:"thinking",thinking:""};break;case"thinking_delta":t.content[e.contentIndex].thinking+=e.delta;break;case"thinking_end":Object.assign(t.content[e.contentIndex],{thinking:e.content,thinkingSignature:e.contentSignature,redacted:e.redacted});break;case"toolcall_start":t.content[e.contentIndex]={type:"toolCall",id:e.id,name:e.toolName,arguments:{}},n.set(e.contentIndex,"");break;case"toolcall_delta":{let s=`${n.get(e.contentIndex)??""}${e.delta}`;n.set(e.contentIndex,s),t.content[e.contentIndex].arguments=V(s);break}case"toolcall_end":return Object.assign(t.content[e.contentIndex],e.toolCall),n.delete(e.contentIndex),{type:"toolcall_end",contentIndex:e.contentIndex,toolCall:t.content[e.contentIndex],partial:t}}return{...e,partial:t}}}async function*b(r){let t=new TextDecoder,n=r.getReader(),e="";try{while(!0){let{done:s,value:a}=await n.read();e+=s?t.decode():t.decode(a,{stream:!0}),e=e.replace(/\r\n/g,`
3
+ `);let o=e.indexOf(`
4
+
5
+ `);while(o!==-1){let c=f(e.slice(0,o));if(c)yield c;e=e.slice(o+2),o=e.indexOf(`
6
+
7
+ `)}if(s)break}if(e.trim()){let s=f(e);if(s)yield s}}finally{n.releaseLock()}}function f(r){let t=r.split(`
8
+ `).find((n)=>n.startsWith("data:"))?.slice(5).trim();return t&&t!=="[DONE]"?JSON.parse(t):void 0}function I(r,t,n){let e=n?"aborted":"error",s={role:"assistant",content:[],api:r.api,provider:r.provider,model:r.id,usage:h(),stopReason:e,errorMessage:t instanceof Error?t.message:String(t),timestamp:Date.now()};if(!n&&t instanceof u)ze(s,Nr("pi_messages_response_failure",t,t.diagnosticDetails));return{type:"error",reason:e,error:s}}function E(r,t){if(r)return r;return A("PI_CACHE_RETENTION",t)==="long"?"long":void 0}var T=(r,t,n)=>{let e=new W,s=w(r);return(async()=>{try{let a=n?.apiKey;if(!a)throw Error(`No API key provided for provider "${r.provider}"`);let o=new URL(`${r.baseUrl.replace(/\/+$/u,"")}/messages`);if(n?.debug)o.searchParams.set("debug","1");let c={model:r.id,context:t,options:{temperature:n?.temperature,maxTokens:n?.maxTokens,reasoning:n?.reasoning,cacheRetention:E(n?.cacheRetention,n?.env),sessionId:n?.sessionId,toolChoice:n?.toolChoice}},p=await n?.onPayload?.(c,r);if(p!==void 0)c=p;let i=await(n?.fetch??globalThis.fetch)(o,{method:"POST",headers:{authorization:`Bearer ${a}`,accept:"text/event-stream","content-type":"application/json",...ke(n?.headers)},body:JSON.stringify(c),signal:n?.signal});if(await n?.onResponse?.({status:i.status,headers:J(i.headers)},r),!i.ok){let d=await i.text();throw k(r,o,i,d)}if(!i.body)throw Error(`${r.provider} response has no body`);for await(let d of b(i.body)){await n?.onProviderStreamEvent?.(d,r);let g=s(d);if(e.push(g),g.type==="done"||g.type==="error")return}throw Error(`${r.provider} stream ended without a terminal event`)}catch(a){e.push(I(r,a,n?.signal?.aborted??!1))}})(),e},O=(r,t,n)=>{let e=n;return T(r,t,{...n,reasoning:n?.reasoning,toolChoice:n?.toolChoice,debug:e?.debug})};export{u as PiMessagesResponseError,T as stream,O as streamSimple};
@@ -0,0 +1,2 @@
1
+ // @bun
2
+ import{x}from"./chunk-j3jzgw98.js";import{ye}from"./chunk-0aaf270z.js";import{Q,te}from"./chunk-tnay319j.js";import{v}from"./chunk-fsekbhqb.js";import{J,ke}from"./chunk-9nkb5q43.js";var P=async(e,s,t)=>{let a={api:e.api,provider:e.provider,model:e.id,output:[],stopReason:"stop",timestamp:Date.now()};try{let r=t?.apiKey;if(!r)throw Error(`No API key for provider: ${e.provider}`);let c=y(e,r,t?.headers,t?.fetch),n=R(e,s),i=await t?.onPayload?.(n,e);if(i!==void 0)n=i;let o={...t?.signal?{signal:t.signal}:{},...t?.timeoutMs!==void 0?{timeout:t.timeoutMs}:{},maxRetries:0},{data:f,response:g}=await ye(()=>c.chat.completions.create(n,o).withResponse(),{maxRetries:t?.maxRetries,maxRetryDelayMs:t?.maxRetryDelayMs,signal:t?.signal});await t?.onResponse?.({status:g.status,headers:J(g.headers)},e);let u=f;if(a.responseId=u.id,u.usage)a.usage=_(u.usage,e);let p=u.choices[0];if(p){let m=p.message.content;if(typeof m==="string"&&m.length>0)a.output.push({type:"text",text:m});for(let d of p.message.images??[]){let l=typeof d.image_url==="string"?d.image_url:d.image_url?.url;if(!l?.startsWith("data:"))continue;let h=l.match(/^data:([^;]+);base64,(.+)$/);if(!h)continue;a.output.push({type:"image",mimeType:h[1],data:h[2]})}}return a}catch(r){return a.stopReason=t?.signal?.aborted?"aborted":"error",a.errorMessage=te(Q(r)),a}};function y(e,s,t,a){return new x({apiKey:s,baseURL:e.baseUrl,dangerouslyAllowBrowser:!0,fetch:a,defaultHeaders:ke({...e.headers,...t})})}function R(e,s){let t=s.input.map((a)=>{if(a.type==="text")return{type:"text",text:v(a.text)};return{type:"image_url",image_url:{url:`data:${a.mimeType};base64,${a.data}`}}});return{model:e.id,messages:[{role:"user",content:t}],stream:!1,modalities:e.output.includes("text")?["image","text"]:["image"]}}function _(e,s){let t=e.prompt_tokens||0,a=e.prompt_tokens_details?.cached_tokens||0,r=e.prompt_tokens_details?.cache_write_tokens||0,c=r>0?Math.max(0,a-r):a,n=Math.max(0,t-c-r),i=e.completion_tokens||0,o={input:n,output:i,cacheRead:c,cacheWrite:r,totalTokens:n+i+c+r,cost:{input:s.cost.input/1e6*n,output:s.cost.output/1e6*i,cacheRead:s.cost.cacheRead/1e6*c,cacheWrite:s.cost.cacheWrite/1e6*r,total:0}};return o.cost.total=o.cost.input+o.cost.output+o.cost.cacheRead+o.cost.cacheWrite,o}export{P as generateImages};
@@ -0,0 +1,12 @@
1
+ // @bun
2
+ import{V}from"./chunk-0y13kfpt.js";import{Rt}from"./chunk-b84y794v.js";import{Ae,Vn,Kn,xe,Qr,Te}from"./chunk-yq20v3va.js";import{v}from"./chunk-fsekbhqb.js";import{G,et,pe,Ie,oe}from"./chunk-4qtw5cga.js";function j(a,o){let l={v:1,id:a};if(o)l.phase=o;return JSON.stringify(l)}function E(a){if(!a)return;if(a.startsWith("{"))try{let o=JSON.parse(a);if(o.v===1&&typeof o.id==="string"){if(o.phase==="commentary"||o.phase==="final_answer")return{id:o.id,phase:o.phase};return{id:o.id}}}catch{}return{id:a}}function N(a,o){let l=o.filter((c)=>c.type==="text").map((c)=>c.text).join(`
3
+ `),d=o.filter((c)=>c.type==="image"),u=l.length>0;if(d.length===0||!a.input.includes("image"))return v(u?l:d.length>0?"(see attached image)":"(no tool output)");let p=[];if(u)p.push({type:"input_text",text:v(l)});for(let c of d)p.push({type:"input_image",detail:"auto",image_url:`data:${c.mimeType};base64,${c.data}`});return p}function $t(a,o,l,d){let u=pe(o,d?.supportsMidConvoSystemMessages),p=[],c=(n)=>{let s=n.replace(/[^a-zA-Z0-9_-]/g,"_");return(s.length>64?s.slice(0,64):s).replace(/_+$/,"")},S=(n)=>{let s=`fc_${Rt(n)}`;return s.length>64?s.slice(0,64):s},x=(n,s,i)=>{if(!l.has(a.provider))return c(n);if(!n.includes("|"))return c(n);let[r,g]=n.split("|"),h=c(r),y=i.provider!==a.provider||i.api!==a.api?S(g):c(g);if(!y.startsWith("fc_"))y=c(`fc_${y}`);return`${h}|${y}`},m=Te(u.messages,a,x),k=Ie(u.messages,(d?.supportsAdditionalTools??!1)||(d?.supportsToolSearch??!1)),T=(n,s)=>{let i=k.anchorsAdditions?n.toolsAdded??[]:[];if(i.length===0)return;if(d?.supportsAdditionalTools){p.push({type:"additional_tools",role:"developer",tools:Pt(i,d.toolOptions)});return}if(!d?.supportsToolSearch)return;let r=i.map((h)=>h.name),g=`pi_tool_load_${Rt(`${s}:${r.join(",")}`)}`;p.push({type:"tool_search_call",call_id:g,execution:"client",status:"completed",arguments:{query:r.join(" "),limit:r.length}}),p.push({type:"tool_search_output",call_id:g,execution:"client",status:"completed",tools:Pt(i,{...d.toolOptions,toolSearchResult:!0})})},C=d?.includeSystemPrompt??!0,w=a.compat,M=a.reasoning&&w?.supportsDeveloperRole!==!1?"developer":"system",t=0,e=0;for(let n of m){let s=e++===0&&n.role==="system";if(n.role==="system"){if(!s)T(n,`system:${t}`);if(!s||C){let i=s?G(n):et(n);if(i.length>0)p.push({role:M,content:v(i)})}}else if(n.role==="user")if(typeof n.content==="string")p.push({role:"user",content:[{type:"input_text",text:v(n.content)}]});else{let i=n.content.map((r)=>{if(r.type==="text")return{type:"input_text",text:v(r.text)};return{type:"input_image",detail:"auto",image_url:`data:${r.mimeType};base64,${r.data}`}});if(i.length===0)continue;p.push({role:"user",content:i})}else if(n.role==="assistant"){let i=[],r=n,g=r.provider===a.provider&&r.api===a.api,h=g&&r.model===a.id,P=g&&r.model!==a.id,y=0;for(let I of n.content)if(I.type==="thinking"){if(I.thinkingSignature){let f=JSON.parse(I.thinkingSignature);i.push(f)}}else if(I.type==="text"){let f=I,b=E(f.textSignature),J=y===0?`msg_pi_${t}`:`msg_pi_${t}_${y}`;y++;let _=b?.id;if(!_)_=J;else if(_.length>64)_=`msg_${Rt(_)}`;i.push({type:"message",role:"assistant",content:[{type:"output_text",text:v(f.text),annotations:[]}],status:"completed",id:_,phase:b?.phase})}else if(I.type==="toolCall"){let f=I,[b,J]=f.id.split("|"),_=d?.grammarToolInputProperties?.get(f.name),R=J,A=_===void 0?"fc_":"ctc_";if(P||!R?.startsWith(A))R=void 0;if(_!==void 0)i.push({type:"custom_tool_call",id:R,call_id:b,name:f.name,input:v(Vn(f.name,f.arguments,_)),...h&&f.namespace!==void 0?{namespace:f.namespace}:{}});else i.push({type:"function_call",id:R,call_id:b,name:f.name,arguments:JSON.stringify(f.arguments),...h&&f.namespace!==void 0?{namespace:f.namespace}:{}})}if(i.length===0)continue;p.push(...i)}else if(n.role==="toolResult"){let[i]=n.toolCallId.split("|"),r=N(a,n.content);if(d?.grammarToolInputProperties?.has(n.toolName))p.push({type:"custom_tool_call_output",call_id:i,output:r});else p.push({type:"function_call_output",call_id:i,output:r})}if(!s)t++}return p}function Pt(a,o){let l=o?.strict===void 0?!1:o.strict,d=o?.supportsStrictMode??!0,u=o?.supportsOpenAIGrammarTools??!1;return a.map((p)=>{let c=Qr(p,u);if(c)return{type:"custom",name:p.name,description:p.description,format:{type:"grammar",syntax:c.format,definition:c.definition},...o?.toolSearchResult?{defer_loading:!0}:{}};let x=xe(p,d)??l,m={type:"function",name:p.name,description:p.description,parameters:Ae(p,x===!0),...o?.toolSearchResult?{defer_loading:!0}:{}};if(d)m.strict=x;return m})}function z(a){let o=a.customInput?.property;if(o===void 0)return"";let l=a.arguments[o];return typeof l==="string"?l:""}function O(a,o,l){let d=a.customInput;if(!d)return;let u=Kn(d.jsonBuffer,d.property,o,l);return a.arguments={[d.property]:o},u}async function jt(a,o,l,d,u){let p=!1,c=new Map,S=new Map,x=(t)=>{if(t.type==="message"&&t.phase==="final_answer")o.stopReason="stop"},m=(t,e)=>{let n=c.get(t);return n?.type===e?n:void 0},k=(t,e)=>{if(e===void 0)return;l.push({type:"toolcall_delta",contentIndex:t.contentIndex,delta:e,partial:o})},T=(t,e)=>{if(e.type==="reasoning"){let n={type:"thinking",thinking:""};o.content.push(n);let s={type:"thinking",block:n,contentIndex:o.content.length-1};return c.set(t,s),l.push({type:"thinking_start",contentIndex:s.contentIndex,partial:o}),s}if(e.type==="message"){x(e);let n={type:"text",text:""};o.content.push(n);let s={type:"text",block:n,contentIndex:o.content.length-1};return c.set(t,s),l.push({type:"text_start",contentIndex:s.contentIndex,partial:o}),s}if(e.type==="function_call"){let n={type:"toolCall",id:`${e.call_id}|${e.id}`,name:e.name,arguments:{},...e.namespace!==void 0?{namespace:e.namespace}:{},partialJson:e.arguments||""};o.content.push(n);let s={type:"toolCall",block:n,contentIndex:o.content.length-1};return c.set(t,s),l.push({type:"toolcall_start",contentIndex:s.contentIndex,partial:o}),s}if(e.type==="custom_tool_call"){let n=u?.grammarToolInputProperties?.get(e.name)??"input",s=e.input||"",i={type:"toolCall",id:`${e.call_id}|${e.id}`,name:e.name,arguments:{[n]:s},...e.namespace!==void 0?{namespace:e.namespace}:{},customInput:{property:n,jsonBuffer:{input:"",started:!1,closed:!1}}};o.content.push(i);let r={type:"toolCall",block:i,contentIndex:o.content.length-1};return c.set(t,r),l.push({type:"toolcall_start",contentIndex:r.contentIndex,partial:o}),r}return},C=(t,e)=>c.get(t)??T(t,e),w=(t)=>{for(let e of t){if(e.type!=="reasoning"||!e.encrypted_content)continue;let n=S.get(e.id);if(!n?.thinkingSignature)continue;let s=JSON.parse(n.thinkingSignature);if(s.encrypted_content)continue;n.thinkingSignature=JSON.stringify({...s,encrypted_content:e.encrypted_content})}},M=(t)=>{if(p=!0,w(t.output??[]),t?.id)o.responseId=t.id;if(t?.usage){let r=t.usage.input_tokens_details,g=r?.cached_tokens||0,h=r?.cache_write_tokens||0;o.usage={input:Math.max(0,(t.usage.input_tokens||0)-g-h),output:t.usage.output_tokens||0,cacheRead:g,cacheWrite:h,reasoning:t.usage.output_tokens_details?.reasoning_tokens||0,totalTokens:t.usage.total_tokens||0,cost:{input:0,output:0,cacheRead:0,cacheWrite:0,total:0}}}if(oe(d,o.usage),u?.applyServiceTierPricing){let r=u.resolveServiceTier?u.resolveServiceTier(t?.service_tier,u.serviceTier):t?.service_tier??u.serviceTier;u.applyServiceTierPricing(o.usage,r)}let e=t?.status,n=t?.incomplete_details,s=typeof n?.reason==="string"?n.reason:void 0;o.rawStopReason=s?`${e}.${s}`:e;let i=W(e,s);if(o.stopReason=i.stopReason,i.errorMessage===void 0)delete o.errorMessage;else o.errorMessage=i.errorMessage;if(o.content.some((r)=>r.type==="toolCall")&&o.stopReason==="stop")o.stopReason="toolUse"};for await(let t of a)if(await u?.onProviderStreamEvent?.(t,d),t.type==="response.created")o.responseId=t.response.id;else if(t.type==="response.output_item.added")T(t.output_index,t.item);else if(t.type==="response.reasoning_summary_text.delta"){let e=m(t.output_index,"thinking");if(!e)continue;e.block.thinking+=t.delta,l.push({type:"thinking_delta",contentIndex:e.contentIndex,delta:t.delta,partial:o})}else if(t.type==="response.reasoning_summary_part.done"){let e=m(t.output_index,"thinking");if(!e)continue;e.block.thinking+=`
4
+
5
+ `,l.push({type:"thinking_delta",contentIndex:e.contentIndex,delta:`
6
+
7
+ `,partial:o})}else if(t.type==="response.reasoning_text.delta"){let e=m(t.output_index,"thinking");if(!e)continue;e.block.thinking+=t.delta,l.push({type:"thinking_delta",contentIndex:e.contentIndex,delta:t.delta,partial:o})}else if(t.type==="response.output_text.delta"){let e=m(t.output_index,"text");if(!e)continue;e.block.text+=t.delta,l.push({type:"text_delta",contentIndex:e.contentIndex,delta:t.delta,partial:o})}else if(t.type==="response.refusal.delta"){let e=m(t.output_index,"text");if(!e)continue;e.block.text+=t.delta,l.push({type:"text_delta",contentIndex:e.contentIndex,delta:t.delta,partial:o})}else if(t.type==="response.function_call_arguments.delta"){let e=m(t.output_index,"toolCall");if(!e||e.block.partialJson===void 0)continue;e.block.partialJson+=t.delta,e.block.arguments=V(e.block.partialJson),k(e,t.delta)}else if(t.type==="response.function_call_arguments.done"){let e=m(t.output_index,"toolCall");if(!e||e.block.partialJson===void 0)continue;let n=e.block.partialJson;if(e.block.partialJson=t.arguments,e.block.arguments=V(e.block.partialJson),t.arguments.startsWith(n)){let s=t.arguments.slice(n.length);if(s.length>0)k(e,s)}}else if(t.type==="response.custom_tool_call_input.delta"){let e=m(t.output_index,"toolCall");if(!e||!e.block.customInput)continue;k(e,O(e.block,z(e.block)+t.delta,!1))}else if(t.type==="response.custom_tool_call_input.done"){let e=m(t.output_index,"toolCall");if(!e||!e.block.customInput)continue;k(e,O(e.block,t.input,!0))}else if(t.type==="response.output_item.done"){let e=t.item;x(e);let n=C(t.output_index,e);if(e.type==="reasoning"&&n?.type==="thinking"){let s=e.summary?.map((r)=>r.text).join(`
8
+
9
+ `)||"",i=e.content?.map((r)=>r.text).join(`
10
+
11
+ `)||"";n.block.thinking=s||i||n.block.thinking,n.block.thinkingSignature=JSON.stringify(e),S.set(e.id,n.block),l.push({type:"thinking_end",contentIndex:n.contentIndex,content:n.block.thinking,partial:o}),c.delete(t.output_index)}else if(e.type==="message"&&n?.type==="text")n.block.text=e.content?.map((s)=>s.type==="output_text"?s.text:s.refusal).join("")||"",n.block.textSignature=j(e.id,e.phase??void 0),l.push({type:"text_end",contentIndex:n.contentIndex,content:n.block.text,partial:o}),c.delete(t.output_index);else if(e.type==="function_call"&&n?.type==="toolCall"&&n.block.partialJson!==void 0){if(n.block.arguments=V(e.arguments||n.block.partialJson||"{}"),e.namespace!==void 0)n.block.namespace=e.namespace;delete n.block.partialJson,l.push({type:"toolcall_end",contentIndex:n.contentIndex,toolCall:n.block,partial:o}),c.delete(t.output_index)}else if(e.type==="custom_tool_call"&&n?.type==="toolCall"&&n.block.customInput){if(k(n,O(n.block,e.input??z(n.block),!0)),e.namespace!==void 0)n.block.namespace=e.namespace;delete n.block.customInput,l.push({type:"toolcall_end",contentIndex:n.contentIndex,toolCall:n.block,partial:o}),c.delete(t.output_index)}}else if(t.type==="response.completed"||t.type==="response.incomplete")M(t.response);else if(t.type==="error")throw Error(`Error Code ${t.code}: ${t.message}`||"Unknown error");else if(t.type==="response.failed"){p=!0,o.rawStopReason=t.response?.status;let e=t.response?.error,n=t.response?.incomplete_details,s=e?`${e.code||"unknown"}: ${e.message||"no message"}`:n?.reason?`incomplete: ${n.reason}`:"Unknown error (no error details in response)";throw Error(s)}if(!p)throw Error("OpenAI Responses stream ended before a terminal response event");if(o.stopReason==="toolUse")for(let t of o.content){if(t.type!=="toolCall")continue;let e=t;if(e.partialJson!==void 0||e.customInput!==void 0)throw Error(`OpenAI Responses stream completed with an unfinished tool call: ${e.name} (${e.id})`)}}function W(a,o){if(!a)return{stopReason:"stop"};switch(a){case"completed":return{stopReason:"stop"};case"incomplete":if(o==="max_output_tokens")return{stopReason:"length"};return{stopReason:"error",errorMessage:o?`Response incomplete: ${o}`:"Response incomplete without a provider reason"};case"failed":case"cancelled":return{stopReason:"error"};case"in_progress":case"queued":return{stopReason:"stop"};default:throw Error(`Unhandled stop reason: ${a}`)}}
12
+ export{$t,Pt,jt};
@@ -0,0 +1,5 @@
1
+ // @bun
2
+ import{we,it,Bn,$n}from"./chunk-k0e6n6yy.js";import{Q,te}from"./chunk-tnay319j.js";var o="OpenAI Decisions",a=128;function f(r){let t=[r.criteria.true?`True means: ${r.criteria.true}`:"",r.criteria.false?`False means: ${r.criteria.false}`:""].filter(Boolean);return t.length>0?`${r.instructions}
3
+
4
+ ${t.join(`
5
+ `)}`:r.instructions}function u(r,t){if(t.type==="choice")return{type:"choice",name:r,instructions:t.instructions,choices:Object.entries(t.criteria).map(([e,i])=>i?{value:e,description:i}:{value:e})};if(t.type==="score")return{type:"score",name:r,instructions:t.instructions,levels:t.criteria.map((e)=>({label:e}))};return{type:"predicate",name:r,instructions:f(t)}}function y(r){let t=JSON.stringify(r.state),e=r.images??[];if(e.length===0)return t;if(e.length>a)throw Error(`${o} accepts at most ${a} images, got ${e.length}`);return[{role:"user",content:[{type:"input_text",text:t},...e.map((i)=>({type:"input_image",image_url:`data:${i.mimeType};base64,${i.data}`}))]}]}function b(r,t){if(!Array.isArray(r))throw Error(`${o} returned invalid probabilities for ${t}`);return Object.fromEntries(r.map((e)=>{if(!we(e)||typeof e.value!=="string")throw Error(`${o} returned invalid probabilities for ${t}`);return[e.value,it(o,e.probability,`probability for ${t}.${e.value}`)]}))}function l(r,t,e){if(e.type==="refusal")throw Error(`${o} refused to answer ${r}`);if(t.type==="choice"){if(e.type!=="choice"||typeof e.choice!=="string")throw Error(`${o} did not return a choice answer for ${r}`);return{type:"choice",choice:e.choice,probabilities:b(e.probabilities,r),confidence:it(o,e.confidence,`confidence for ${r}`)}}if(t.type==="score"){if(e.type!=="score")throw Error(`${o} did not return a score answer for ${r}`);return{type:"score",score:it(o,e.score,`score for ${r}`),confidence:it(o,e.confidence,`confidence for ${r}`)}}if(e.type!=="predicate")throw Error(`${o} did not return a predicate answer for ${r}`);return{type:"bool",probability:it(o,e.probability,`probability for ${r}`)}}function w(r,t){if(!Array.isArray(r))throw Error(`${o} returned an unexpected response`);let e=new Map;for(let i of r)if(we(i)&&typeof i.name==="string")e.set(i.name,i);return Object.fromEntries(Object.entries(t.questions).map(([i,n])=>{let s=e.get(i);if(!s)throw Error(`${o} did not return an answer for ${i}`);return[i,l(i,n,s)]}))}var h=[504];function d(r){if(r.status===504)return`${o} error (504): the request timed out at the gateway. Very large inputs (above roughly 600K tokens) currently exceed its time limit.`;return te(Q(r),`${o} error`)}var E=async(r,t,e)=>{let i={api:r.api,provider:r.provider,model:r.id,answers:{},stopReason:"stop",timestamp:Date.now()};try{if(r.api!=="openai-decisions")throw Error(`Unsupported classifier API: ${r.api}`);let n=await Bn(o,new URL("decisions",`${r.baseUrl.replace(/\/+$/u,"")}/`),r,{model:r.id,input:y(t),questions:Object.entries(t.questions).map(([c,p])=>u(c,p))},e,h);if(!we(n))throw Error(`${o} returned an unexpected response`);let s=$n(n.usage,r);if(s)i.usage=s;return i.answers=w(n.answers,t),i}catch(n){return i.answers={},i.stopReason=e?.signal?.aborted?"aborted":"error",i.errorMessage=d(n),i}};export{E as classify};
@@ -0,0 +1,3 @@
1
+ // @bun
2
+ function a(e,r){return Object.fromEntries(Object.values(e).flatMap((n)=>Object.values(n)).filter((n)=>n.type===r).map((n)=>[n.id,n]))}function f(e,r){return a(r,"chat")}function g(e,r){return a(r,"image")}function y(e,r){return a(r,"classifier")}var c=function(e,r){if(typeof e==="string"&&/^\.\.?\//.test(e))return e.replace(/\.(tsx)$|((?:\.d)?)((?:\.[^./]+?)?)\.([cm]?)ts$/i,function(n,p,i,u,s){return p?r?".jsx":".js":i&&(!u||!s)?n:i+u+"."+s.toLowerCase()+"js"});return e},o=(e)=>{let r=import.meta.url.endsWith(".js")?e.replace(/\.ts$/,".js"):e;return import(c(r))},t;function wa(e){t=e}var Sa=async()=>{if(t)return t.anthropic();return(await o("./anthropic.ts")).anthropicOAuth},xa=async()=>{if(t)return t.openaiCodex();return(await o("./openai-codex.ts")).openaiCodexOAuth},va=async()=>{if(t)return t.openaiChatGPT();return(await o("./openai-chatgpt.ts")).openaiChatGPTOAuth},_a=async()=>{if(t)return t.githubCopilot();return(await o("./github-copilot.ts")).githubCopilotOAuth},Ea=async()=>{if(t)return t.openrouter();return(await o("./openrouter.ts")).openRouterOAuth},Aa=async()=>{if(t)return t.kimiCoding();return(await o("./kimi-coding.ts")).kimiCodingOAuth},Ta=async()=>{if(t)return t.meta();return(await o("./meta.ts")).metaOAuth},ka=async()=>{if(t)return t.xai();return(await o("./xai.ts")).xaiOAuth},Pa=async(e)=>{if(t)return t.radius(e);return(await o("./radius.ts")).createRadiusOAuth(e)};
3
+ export{f,g,y,wa,Sa,xa,va,_a,Ea,Aa,Ta,ka,Pa};
@@ -0,0 +1,7 @@
1
+ // @bun
2
+ import{r,u}from"./chunk-bh80e336.js";var U=r(function(De,S){var y=1000,x=y*60,b=x*60,m=b*24,R=m*7,V=m*365.25;S.exports=function(e,s){s=s||{};var t=typeof e;if(t==="string"&&e.length>0)return X(e);else if(t==="number"&&isFinite(e))return s.long?ee(e):Y(e);throw Error("val is not a non-empty string or a valid number. val="+JSON.stringify(e))};function X(e){if(e=String(e),e.length>100)return;var s=/^(-?(?:\d+)?\.?\d+) *(milliseconds?|msecs?|ms|seconds?|secs?|s|minutes?|mins?|m|hours?|hrs?|h|days?|d|weeks?|w|years?|yrs?|y)?$/i.exec(e);if(!s)return;var t=parseFloat(s[1]),i=(s[2]||"ms").toLowerCase();switch(i){case"years":case"year":case"yrs":case"yr":case"y":return t*V;case"weeks":case"week":case"w":return t*R;case"days":case"day":case"d":return t*m;case"hours":case"hour":case"hrs":case"hr":case"h":return t*b;case"minutes":case"minute":case"mins":case"min":case"m":return t*x;case"seconds":case"second":case"secs":case"sec":case"s":return t*y;case"milliseconds":case"millisecond":case"msecs":case"msec":case"ms":return t;default:return}}function Y(e){var s=Math.abs(e);if(s>=m)return Math.round(e/m)+"d";if(s>=b)return Math.round(e/b)+"h";if(s>=x)return Math.round(e/x)+"m";if(s>=y)return Math.round(e/y)+"s";return e+"ms"}function ee(e){var s=Math.abs(e);if(s>=m)return A(e,s,m,"day");if(s>=b)return A(e,s,b,"hour");if(s>=x)return A(e,s,x,"minute");if(s>=y)return A(e,s,y,"second");return e+" ms"}function A(e,s,t,i){var d=s>=t*1.5;return Math.round(e/t)+" "+i+(d?"s":"")}});var E=r(function(Be,_){function te(e){t.debug=t,t.default=t,t.coerce=W,t.disable=P,t.enable=d,t.enabled=T,t.humanize=U(),t.destroy=Z,Object.keys(e).forEach((n)=>{t[n]=e[n]}),t.names=[],t.skips=[],t.formatters={};function s(n){let o=0;for(let c=0;c<n.length;c++)o=(o<<5)-o+n.charCodeAt(c),o|=0;return t.colors[Math.abs(o)%t.colors.length]}t.selectColor=s;function t(n){let o,c=null,a,g;function l(...f){if(!l.enabled)return;let h=l,v=Number(new Date),H=v-(o||v);if(h.diff=H,h.prev=o,h.curr=v,o=v,f[0]=t.coerce(f[0]),typeof f[0]!=="string")f.unshift("%O");let O=0;f[0]=f[0].replace(/%([a-zA-Z%])/g,(j,K)=>{if(j==="%%")return"%";O++;let M=t.formatters[K];if(typeof M==="function"){let Q=f[O];j=M.call(h,Q),f.splice(O,1),O--}return j}),t.formatArgs.call(h,f),(h.log||t.log).apply(h,f)}if(l.namespace=n,l.useColors=t.useColors(),l.color=t.selectColor(n),l.extend=i,l.destroy=t.destroy,Object.defineProperty(l,"enabled",{enumerable:!0,configurable:!1,get:()=>{if(c!==null)return c;if(a!==t.namespaces)a=t.namespaces,g=t.enabled(n);return g},set:(f)=>{c=f}}),typeof t.init==="function")t.init(l);return l}function i(n,o){let c=t(this.namespace+(typeof o>"u"?":":o)+n);return c.log=this.log,c}function d(n){t.save(n),t.namespaces=n,t.names=[],t.skips=[];let o=(typeof n==="string"?n:"").trim().replace(/\s+/g,",").split(",").filter(Boolean);for(let c of o)if(c[0]==="-")t.skips.push(c.slice(1));else t.names.push(c)}function C(n,o){let c=0,a=0,g=-1,l=0;while(c<n.length)if(a<o.length&&(o[a]===n[c]||o[a]==="*"))if(o[a]==="*")g=a,l=c,a++;else c++,a++;else if(g!==-1)a=g+1,l++,c=l;else return!1;while(a<o.length&&o[a]==="*")a++;return a===o.length}function P(){let n=[...t.names,...t.skips.map((o)=>"-"+o)].join(",");return t.enable(""),n}function T(n){for(let o of t.skips)if(C(n,o))return!1;for(let o of t.names)if(C(n,o))return!0;return!1}function W(n){if(n instanceof Error)return n.stack||n.message;return n}function Z(){console.warn("Instance method `debug.destroy()` is deprecated and no longer does anything. It will be removed in the next major version of `debug`.")}return t.enable(t.load()),t}_.exports=te});var z=r(function(D,I){D.formatArgs=se;D.save=ne;D.load=oe;D.useColors=re;D.storage=ie();D.destroy=(()=>{let e=!1;return()=>{if(!e)e=!0,console.warn("Instance method `debug.destroy()` is deprecated and no longer does anything. It will be removed in the next major version of `debug`.")}})();D.colors=["#0000CC","#0000FF","#0033CC","#0033FF","#0066CC","#0066FF","#0099CC","#0099FF","#00CC00","#00CC33","#00CC66","#00CC99","#00CCCC","#00CCFF","#3300CC","#3300FF","#3333CC","#3333FF","#3366CC","#3366FF","#3399CC","#3399FF","#33CC00","#33CC33","#33CC66","#33CC99","#33CCCC","#33CCFF","#6600CC","#6600FF","#6633CC","#6633FF","#66CC00","#66CC33","#9900CC","#9900FF","#9933CC","#9933FF","#99CC00","#99CC33","#CC0000","#CC0033","#CC0066","#CC0099","#CC00CC","#CC00FF","#CC3300","#CC3333","#CC3366","#CC3399","#CC33CC","#CC33FF","#CC6600","#CC6633","#CC9900","#CC9933","#CCCC00","#CCCC33","#FF0000","#FF0033","#FF0066","#FF0099","#FF00CC","#FF00FF","#FF3300","#FF3333","#FF3366","#FF3399","#FF33CC","#FF33FF","#FF6600","#FF6633","#FF9900","#FF9933","#FFCC00","#FFCC33"];function re(){if(typeof window<"u"&&window.process&&(window.process.type==="renderer"||window.process.__nwjs))return!0;if(typeof navigator<"u"&&navigator.userAgent&&navigator.userAgent.toLowerCase().match(/(edge|trident)\/(\d+)/))return!1;let e;return typeof document<"u"&&document.documentElement&&document.documentElement.style&&document.documentElement.style.WebkitAppearance||typeof window<"u"&&window.console&&(window.console.firebug||window.console.exception&&window.console.table)||typeof navigator<"u"&&navigator.userAgent&&(e=navigator.userAgent.toLowerCase().match(/firefox\/(\d+)/))&&parseInt(e[1],10)>=31||typeof navigator<"u"&&navigator.userAgent&&navigator.userAgent.toLowerCase().match(/applewebkit\/(\d+)/)}function se(e){if(e[0]=(this.useColors?"%c":"")+this.namespace+(this.useColors?" %c":" ")+e[0]+(this.useColors?"%c ":" ")+"+"+I.exports.humanize(this.diff),!this.useColors)return;let s="color: "+this.color;e.splice(1,0,s,"color: inherit");let t=0,i=0;e[0].replace(/%[a-zA-Z%]/g,(d)=>{if(d==="%%")return;if(t++,d==="%c")i=t}),e.splice(i,0,s)}D.log=console.debug||console.log||(()=>{});function ne(e){try{if(e)D.storage.setItem("debug",e);else D.storage.removeItem("debug")}catch(s){}}function oe(){let e;try{e=D.storage.getItem("debug")||D.storage.getItem("DEBUG")}catch(s){}if(!e&&typeof process<"u"&&"env"in process)e=process.env.DEBUG;return e}function ie(){try{return localStorage}catch(e){}}I.exports=E()(D);var{formatters:ce}=I.exports;ce.j=function(e){try{return JSON.stringify(e)}catch(s){return"[UnexpectedJSONParseError]: "+s.message}}});var J=r(function(B,k){var L=u("tty"),p=u("util");B.init=be;B.log=ge;B.formatArgs=me;B.save=ye;B.load=xe;B.useColors=he;B.destroy=p.deprecate(()=>{},"Instance method `debug.destroy()` is deprecated and no longer does anything. It will be removed in the next major version of `debug`.");B.colors=[6,2,3,4,5,1];try{let e=(()=>{throw new Error("Cannot require module "+"supports-color");})();if(e&&(e.stderr||e).level>=2)B.colors=[20,21,26,27,32,33,38,39,40,41,42,43,44,45,56,57,62,63,68,69,74,75,76,77,78,79,80,81,92,93,98,99,112,113,128,129,134,135,148,149,160,161,162,163,164,165,166,167,168,169,170,171,172,173,178,179,184,185,196,197,198,199,200,201,202,203,204,205,206,207,208,209,214,215,220,221]}catch(e){}B.inspectOpts=Object.keys(process.env).filter((e)=>/^debug_/i.test(e)).reduce((e,s)=>{let t=s.substring(6).toLowerCase().replace(/_([a-z])/g,(d,C)=>C.toUpperCase()),i=process.env[s];if(/^(yes|on|true|enabled)$/i.test(i))i=!0;else if(/^(no|off|false|disabled)$/i.test(i))i=!1;else if(i==="null")i=null;else i=Number(i);return e[t]=i,e},{});function he(){return"colors"in B.inspectOpts?Boolean(B.inspectOpts.colors):L.isatty(process.stderr.fd)}function me(e){let{namespace:s,useColors:t}=this;if(t){let i=this.color,d="\x1B[3"+(i<8?i:"8;5;"+i),C=` ${d};1m${s} \x1B[0m`;e[0]=C+e[0].split(`
3
+ `).join(`
4
+ `+C),e.push(d+"m+"+k.exports.humanize(this.diff)+"\x1B[0m")}else e[0]=Fe()+s+" "+e[0]}function Fe(){if(B.inspectOpts.hideDate)return"";return new Date().toISOString()+" "}function ge(...e){return process.stderr.write(p.formatWithOptions(B.inspectOpts,...e)+`
5
+ `)}function ye(e){if(e)process.env.DEBUG=e;else delete process.env.DEBUG}function xe(){return process.env.DEBUG}function be(e){e.inspectOpts={};let s=Object.keys(B.inspectOpts);for(let t=0;t<s.length;t++)e.inspectOpts[s[t]]=B.inspectOpts[s[t]]}k.exports=E()(B);var{formatters:G}=k.exports;G.o=function(e){return this.inspectOpts.colors=this.useColors,p.inspect(e,this.inspectOpts).split(`
6
+ `).map((s)=>s.trim()).join(" ")};G.O=function(e){return this.inspectOpts.colors=this.useColors,p.inspect(e,this.inspectOpts)}});var Er=r(function(Se,q){if(typeof process>"u"||process.type==="renderer"||!1||process.__nwjs)q.exports=z();else q.exports=J()});
7
+ export{Er};
@@ -0,0 +1,9 @@
1
+ // @bun
2
+ import{Er}from"./chunk-fwdhn0gw.js";import{r,u}from"./chunk-bh80e336.js";var T=r(function(c){var ee=c&&c.__createBinding||(Object.create?function(e,t,n,o){if(o===void 0)o=n;var s=Object.getOwnPropertyDescriptor(t,n);if(!s||("get"in s?!t.__esModule:s.writable||s.configurable))s={enumerable:!0,get:function(){return t[n]}};Object.defineProperty(e,o,s)}:function(e,t,n,o){if(o===void 0)o=n;e[o]=t[n]}),te=c&&c.__setModuleDefault||(Object.create?function(e,t){Object.defineProperty(e,"default",{enumerable:!0,value:t})}:function(e,t){e.default=t}),B=c&&c.__importStar||function(e){if(e&&e.__esModule)return e;var t={};if(e!=null){for(var n in e)if(n!=="default"&&Object.prototype.hasOwnProperty.call(e,n))ee(t,e,n)}return te(t,e),t};Object.defineProperty(c,"__esModule",{value:!0});c.req=c.json=c.toBuffer=void 0;var re=B(u("http")),ne=B(u("https"));async function D(e){let t=0,n=[];for await(let o of e)t+=o.length,n.push(o);return Buffer.concat(n,t)}c.toBuffer=D;async function oe(e){let n=(await D(e)).toString("utf8");try{return JSON.parse(n)}catch(o){let s=o;throw s.message+=` (input: ${n})`,s}}c.json=oe;function se(e,t={}){let o=((typeof e==="string"?e:e.href).startsWith("https:")?ne:re).request(e,t),s=new Promise((f,i)=>{o.once("response",f).once("error",i).end()});return o.then=s.then.bind(s),o}c.req=se});var U=r(function(a){var I=a&&a.__createBinding||(Object.create?function(e,t,n,o){if(o===void 0)o=n;var s=Object.getOwnPropertyDescriptor(t,n);if(!s||("get"in s?!t.__esModule:s.writable||s.configurable))s={enumerable:!0,get:function(){return t[n]}};Object.defineProperty(e,o,s)}:function(e,t,n,o){if(o===void 0)o=n;e[o]=t[n]}),ie=a&&a.__setModuleDefault||(Object.create?function(e,t){Object.defineProperty(e,"default",{enumerable:!0,value:t})}:function(e,t){e.default=t}),L=a&&a.__importStar||function(e){if(e&&e.__esModule)return e;var t={};if(e!=null){for(var n in e)if(n!=="default"&&Object.prototype.hasOwnProperty.call(e,n))I(t,e,n)}return ie(t,e),t},ce=a&&a.__exportStar||function(e,t){for(var n in e)if(n!=="default"&&!Object.prototype.hasOwnProperty.call(t,n))I(t,e,n)};Object.defineProperty(a,"__esModule",{value:!0});a.Agent=void 0;var ue=L(u("net")),H=L(u("http")),R=u("https");ce(T(),a);var p=Symbol("AgentBaseInternalState");class k extends H.Agent{constructor(e){super(e);this[p]={}}isSecureEndpoint(e){if(e){if(typeof e.secureEndpoint==="boolean")return e.secureEndpoint;if(typeof e.protocol==="string")return e.protocol==="https:"}let{stack:t}=Error();if(typeof t!=="string")return!1;return t.split(`
3
+ `).some((n)=>n.indexOf("(https.js:")!==-1||n.indexOf("node:https:")!==-1)}incrementSockets(e){if(this.maxSockets===1/0&&this.maxTotalSockets===1/0)return null;if(!this.sockets[e])this.sockets[e]=[];let t=new ue.Socket({writable:!1});return this.sockets[e].push(t),this.totalSocketCount++,t}decrementSockets(e,t){if(!this.sockets[e]||t===null)return;let n=this.sockets[e],o=n.indexOf(t);if(o!==-1){if(n.splice(o,1),this.totalSocketCount--,n.length===0)delete this.sockets[e]}}getName(e){if(this.isSecureEndpoint(e))return R.Agent.prototype.getName.call(this,e);return super.getName(e)}createSocket(e,t,n){let o={...t,secureEndpoint:this.isSecureEndpoint(t)},s=this.getName(o),f=this.incrementSockets(s);Promise.resolve().then(()=>this.connect(e,o)).then((i)=>{if(this.decrementSockets(s,f),i instanceof H.Agent)try{return i.addRequest(e,o)}catch(_){return n(_)}this[p].currentSocket=i,super.createSocket(e,t,n)},(i)=>{this.decrementSockets(s,f),n(i)})}createConnection(){let e=this[p].currentSocket;if(this[p].currentSocket=void 0,!e)throw Error("No socket was returned in the `connect()` function");return e}get defaultPort(){return this[p].defaultPort??(this.protocol==="https:"?443:80)}set defaultPort(e){if(this[p])this[p].defaultPort=e}get protocol(){return this[p].protocol??(this.isSecureEndpoint()?"https:":"http:")}set protocol(e){if(this[p])this[p].protocol=e}}a.Agent=k});var z=r(function(g){var ae=g&&g.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(g,"__esModule",{value:!0});g.parseProxyResponse=void 0;var fe=ae(Er()),S=(0,fe.default)("https-proxy-agent:parse-proxy-response");function le(e){return new Promise((t,n)=>{let o=0,s=[];function f(){let d=e.read();if(d)j(d);else e.once("readable",f)}function i(){e.removeListener("end",_),e.removeListener("error",y),e.removeListener("readable",f)}function _(){i(),S("onend"),n(Error("Proxy connection ended before receiving CONNECT response"))}function y(d){i(),S("onerror %o",d),n(d)}function j(d){s.push(d),o+=d.length;let l=Buffer.concat(s,o),M=l.indexOf(`\r
4
+ \r
5
+ `);if(M===-1){S("have not received end of HTTP headers yet..."),f();return}let q=l.slice(0,M).toString("ascii").split(`\r
6
+ `),C=q.shift();if(!C)return e.destroy(),n(Error("No header received from proxy CONNECT response"));let A=C.split(" "),Y=+A[1],Z=A.slice(2).join(" "),b={};for(let v of q){if(!v)continue;let E=v.indexOf(":");if(E===-1)return e.destroy(),n(Error(`Invalid header from proxy CONNECT response: "${v}"`));let m=v.slice(0,E).toLowerCase(),N=v.slice(E+1).trimStart(),P=b[m];if(typeof P==="string")b[m]=[P,N];else if(Array.isArray(P))P.push(N);else b[m]=N}S("got proxy server response: %o %o",C,b),i(),t({connect:{statusCode:Y,statusText:Z,headers:b},buffered:l})}e.on("error",y),e.on("end",_),f()})}g.parseProxyResponse=le});var ge=r(function(h){var he=h&&h.__createBinding||(Object.create?function(e,t,n,o){if(o===void 0)o=n;var s=Object.getOwnPropertyDescriptor(t,n);if(!s||("get"in s?!t.__esModule:s.writable||s.configurable))s={enumerable:!0,get:function(){return t[n]}};Object.defineProperty(e,o,s)}:function(e,t,n,o){if(o===void 0)o=n;e[o]=t[n]}),de=h&&h.__setModuleDefault||(Object.create?function(e,t){Object.defineProperty(e,"default",{enumerable:!0,value:t})}:function(e,t){e.default=t}),W=h&&h.__importStar||function(e){if(e&&e.__esModule)return e;var t={};if(e!=null){for(var n in e)if(n!=="default"&&Object.prototype.hasOwnProperty.call(e,n))he(t,e,n)}return de(t,e),t},G=h&&h.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(h,"__esModule",{value:!0});h.HttpsProxyAgent=void 0;var w=W(u("net")),F=W(u("tls")),pe=G(u("assert")),_e=G(Er()),Q=U(),V=u("url"),X=z(),O=(0,_e.default)("https-proxy-agent"),J=(e)=>{if(e.servername===void 0&&e.host&&!w.isIP(e.host))return{...e,servername:e.host};return e};class x extends Q.Agent{constructor(e,t){super(t);this.options={path:void 0},this.proxy=typeof e==="string"?new V.URL(e):e,this.proxyHeaders=t?.headers??{},O("Creating new HttpsProxyAgent instance: %o",this.proxy.href);let n=(this.proxy.hostname||this.proxy.host).replace(/^\[|\]$/g,""),o=this.proxy.port?parseInt(this.proxy.port,10):this.proxy.protocol==="https:"?443:80;this.connectOpts={ALPNProtocols:["http/1.1"],...t?K(t,"headers"):null,host:n,port:o}}async connect(e,t){let{proxy:n}=this;if(!t.host)throw TypeError('No "host" provided');let o;if(n.protocol==="https:")O("Creating `tls.Socket`: %o",this.connectOpts),o=F.connect(J(this.connectOpts));else O("Creating `net.Socket`: %o",this.connectOpts),o=w.connect(this.connectOpts);let s=typeof this.proxyHeaders==="function"?this.proxyHeaders():{...this.proxyHeaders},f=w.isIPv6(t.host)?`[${t.host}]`:t.host,i=`CONNECT ${f}:${t.port} HTTP/1.1\r
7
+ `;if(n.username||n.password){let l=`${decodeURIComponent(n.username)}:${decodeURIComponent(n.password)}`;s["Proxy-Authorization"]=`Basic ${Buffer.from(l).toString("base64")}`}if(s.Host=`${f}:${t.port}`,!s["Proxy-Connection"])s["Proxy-Connection"]=this.keepAlive?"Keep-Alive":"close";for(let l of Object.keys(s))i+=`${l}: ${s[l]}\r
8
+ `;let _=X.parseProxyResponse(o);o.write(`${i}\r
9
+ `);let{connect:y,buffered:j}=await _;if(e.emit("proxyConnect",y),this.emit("proxyConnect",y,e),y.statusCode===200){if(e.once("socket",ye),t.secureEndpoint)return O("Upgrading socket connection to TLS"),F.connect({...K(J(t),"host","path","port"),socket:o});return o}o.destroy();let d=new w.Socket({writable:!1});return d.readable=!0,e.once("socket",(l)=>{O("Replaying proxy buffer for failed request"),(0,pe.default)(l.listenerCount("data")>0),l.push(j),l.push(null)}),d}}x.protocols=["http","https"];h.HttpsProxyAgent=x;function ye(e){e.resume()}function K(e,...t){let n={},o;for(o in e)if(!t.includes(o))n[o]=e[o];return n}});export default ge();