@bkm016/basalt 0.1.20 → 0.1.21

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 (619) hide show
  1. package/{chunk-1tbv5t08.js → chunk-03b5jh31.js} +1 -1
  2. package/{chunk-3sg32v3n.js → chunk-0x0459qp.js} +1 -1
  3. package/{chunk-nszq2z0w.js → chunk-16yz5ebn.js} +1 -1
  4. package/chunk-1kdd7xry.js +2 -0
  5. package/{chunk-cks36jdh.js → chunk-225dyk1y.js} +2 -2
  6. package/{chunk-v7da0aqn.js → chunk-2fymxwe7.js} +2 -2
  7. package/{chunk-mde2dd79.js → chunk-2m2sa0bp.js} +1 -1
  8. package/{chunk-fgjw0r6g.js → chunk-35y6nf6k.js} +4 -4
  9. package/chunk-3qxq264t.js +2 -0
  10. package/{chunk-cwrf78vs.js → chunk-3s8rpc1w.js} +2 -2
  11. package/{chunk-wj09qkyw.js → chunk-3t8wz9w8.js} +2 -2
  12. package/{chunk-gg3kfa12.js → chunk-43qf44t8.js} +2 -2
  13. package/chunk-49hsqsht.js +2 -0
  14. package/chunk-4fj91gt1.js +4 -0
  15. package/{chunk-tb3zsqe8.js → chunk-51a0843g.js} +1 -1
  16. package/{chunk-51pfvmhh.js → chunk-5h59tby8.js} +69 -69
  17. package/{chunk-bkhsva5n.js → chunk-5m51j40e.js} +3 -3
  18. package/{chunk-2fts9k52.js → chunk-5mt8xxex.js} +2 -2
  19. package/{chunk-5e7yegea.js → chunk-85sjfyjd.js} +1 -1
  20. package/chunk-97ntcrm7.js +2 -0
  21. package/{chunk-0bgg0hdd.js → chunk-9t3v8c3m.js} +1 -1
  22. package/{chunk-7kz9435k.js → chunk-9w1m9av8.js} +3 -3
  23. package/{chunk-d2f0hq8z.js → chunk-9x28stv0.js} +1 -1
  24. package/{chunk-c5pg2875.js → chunk-ak95r8mq.js} +254 -250
  25. package/{chunk-a1vdrgsh.js → chunk-bn1aaewd.js} +4 -4
  26. package/{chunk-agb771ak.js → chunk-c5ydt3vq.js} +2 -2
  27. package/{chunk-y83tnkr3.js → chunk-cjh5h31t.js} +2 -2
  28. package/{chunk-p0e82mee.js → chunk-cr0tqn6j.js} +2 -2
  29. package/{chunk-np2xnt1g.js → chunk-e8xywvv4.js} +2 -2
  30. package/{chunk-w6nc3jn7.js → chunk-ewaskman.js} +1 -1
  31. package/{chunk-w045zk55.js → chunk-feyt85gg.js} +1 -1
  32. package/{chunk-s8m4svhf.js → chunk-ftg4b5pa.js} +1 -1
  33. package/{chunk-s819vmwh.js → chunk-g6cc7ac1.js} +2 -2
  34. package/{chunk-5ja0vsam.js → chunk-gdx1j9c5.js} +3 -3
  35. package/{chunk-h2pp8mnh.js → chunk-h00wjps7.js} +1 -1
  36. package/{chunk-4dgqcp6q.js → chunk-h1fwdz4h.js} +1 -1
  37. package/{chunk-6en06hkk.js → chunk-hhxtc9jn.js} +1 -1
  38. package/chunk-hrn2ss1a.js +2 -0
  39. package/chunk-jhwb962k.js +15 -0
  40. package/{chunk-11xxfc0x.js → chunk-jpwr1sd2.js} +1 -1
  41. package/chunk-jy07y4pv.js +7 -0
  42. package/{chunk-0g8rtf05.js → chunk-k9x1r69s.js} +8 -8
  43. package/chunk-kb5h9rmb.js +2 -0
  44. package/{chunk-eps1epfr.js → chunk-kgnd32hn.js} +2 -2
  45. package/{chunk-w9fdcchk.js → chunk-kka12j10.js} +1 -1
  46. package/{chunk-1gaj43fx.js → chunk-kypdthjg.js} +1 -1
  47. package/{chunk-30bbdzma.js → chunk-m9386732.js} +12 -12
  48. package/{chunk-qxpx8dn6.js → chunk-np123myw.js} +3 -3
  49. package/chunk-ntntwtxn.js +5 -0
  50. package/{chunk-29g01nrz.js → chunk-qn70tm91.js} +5 -5
  51. package/{chunk-yk29stq0.js → chunk-qtgc74er.js} +2 -2
  52. package/{chunk-tp885r8h.js → chunk-qz6ybxjg.js} +9 -9
  53. package/chunk-r36b12zb.js +2 -0
  54. package/{chunk-as2mwf79.js → chunk-re8n2te5.js} +1 -1
  55. package/{chunk-y3vap4a1.js → chunk-rpbxbb92.js} +1 -1
  56. package/chunk-rqrjzz73.js +2 -0
  57. package/{chunk-tpetsqzt.js → chunk-scy1p7x2.js} +3 -3
  58. package/{chunk-svx7mz0w.js → chunk-sq5ppnr3.js} +3 -3
  59. package/{chunk-e3bgzeb3.js → chunk-syhhzr1j.js} +2 -2
  60. package/chunk-tmq8ktys.js +3 -0
  61. package/{chunk-sm9fpy18.js → chunk-ttv805sb.js} +8 -8
  62. package/{chunk-eyyxqb6y.js → chunk-v878x8zr.js} +2 -2
  63. package/{chunk-a2z1cy84.js → chunk-ve1b6vg6.js} +1 -1
  64. package/chunk-w3n8wm44.js +2 -0
  65. package/{chunk-z9p2ry9w.js → chunk-w3skxmvx.js} +2 -2
  66. package/chunk-wxzk086k.js +2 -0
  67. package/chunk-y8mf9tcj.js +25 -0
  68. package/{chunk-ewr51fwc.js → chunk-z4g2q36h.js} +1 -1
  69. package/compiled.js +8 -8
  70. package/package.json +1 -1
  71. package/ui-test-worker.js +16 -16
  72. package/web/{chunk-mbpv2w5h.js → chunk-07dd0jed.js} +2 -2
  73. package/web/chunk-07dd0jed.js.br +0 -0
  74. package/web/chunk-07dd0jed.js.gz +0 -0
  75. package/web/{chunk-d7f85w1y.js → chunk-0hvyq55w.js} +1 -1
  76. package/web/chunk-0hvyq55w.js.br +0 -0
  77. package/web/chunk-0hvyq55w.js.gz +0 -0
  78. package/web/{chunk-ahdca62g.js → chunk-0q5drhbk.js} +1 -1
  79. package/web/chunk-0q5drhbk.js.br +0 -0
  80. package/web/chunk-0q5drhbk.js.gz +0 -0
  81. package/web/{chunk-zthww0ws.js → chunk-0w6ta3ps.js} +1 -1
  82. package/web/chunk-0w6ta3ps.js.br +0 -0
  83. package/web/chunk-0w6ta3ps.js.gz +0 -0
  84. package/web/{chunk-aw9bwd4w.js → chunk-16b5anw4.js} +2 -2
  85. package/web/chunk-16b5anw4.js.br +0 -0
  86. package/web/chunk-16b5anw4.js.gz +0 -0
  87. package/web/{chunk-53cg6pxm.js → chunk-21d8pzcm.js} +2 -2
  88. package/web/chunk-21d8pzcm.js.br +0 -0
  89. package/web/{chunk-53cg6pxm.js.gz → chunk-21d8pzcm.js.gz} +0 -0
  90. package/web/{chunk-72st75n7.js → chunk-2c4affp1.js} +3 -3
  91. package/web/chunk-2c4affp1.js.br +0 -0
  92. package/web/chunk-2c4affp1.js.gz +0 -0
  93. package/web/{chunk-1ghnag5v.js → chunk-2dykyq1n.js} +1 -1
  94. package/web/chunk-2dykyq1n.js.br +0 -0
  95. package/web/chunk-2dykyq1n.js.gz +0 -0
  96. package/web/{chunk-znrsm604.js → chunk-2h2w244w.js} +17 -17
  97. package/web/chunk-2h2w244w.js.br +0 -0
  98. package/web/chunk-2h2w244w.js.gz +0 -0
  99. package/web/{chunk-kdegb6pd.js → chunk-2hd51wb6.js} +5 -5
  100. package/web/chunk-2hd51wb6.js.br +0 -0
  101. package/web/chunk-2hd51wb6.js.gz +0 -0
  102. package/web/{chunk-2rnnvxa5.js → chunk-2tc6krye.js} +3 -3
  103. package/web/chunk-2tc6krye.js.br +0 -0
  104. package/web/chunk-2tc6krye.js.gz +0 -0
  105. package/web/{chunk-7h59ac2b.js → chunk-2w27acew.js} +1 -1
  106. package/web/chunk-2w27acew.js.br +0 -0
  107. package/web/chunk-2w27acew.js.gz +0 -0
  108. package/web/{chunk-gbcf0rdk.js → chunk-2w4rdnhj.js} +1 -1
  109. package/web/chunk-2w4rdnhj.js.br +0 -0
  110. package/web/chunk-2w4rdnhj.js.gz +0 -0
  111. package/web/{chunk-gj6bdv1y.js → chunk-31vxes2p.js} +9 -9
  112. package/web/chunk-31vxes2p.js.br +0 -0
  113. package/web/chunk-31vxes2p.js.gz +0 -0
  114. package/web/chunk-32qd2y5h.js +1 -0
  115. package/web/chunk-32qd2y5h.js.br +0 -0
  116. package/web/chunk-32qd2y5h.js.gz +0 -0
  117. package/web/{chunk-qx5ab39c.js → chunk-39kaz6fa.js} +2 -2
  118. package/web/chunk-39kaz6fa.js.br +0 -0
  119. package/web/chunk-39kaz6fa.js.gz +0 -0
  120. package/web/{chunk-mj8dzc8q.js → chunk-3d3y4tep.js} +5 -5
  121. package/web/chunk-3d3y4tep.js.br +0 -0
  122. package/web/chunk-3d3y4tep.js.gz +0 -0
  123. package/web/chunk-4makcmpw.js +1 -0
  124. package/web/chunk-4makcmpw.js.br +0 -0
  125. package/web/chunk-4makcmpw.js.gz +0 -0
  126. package/web/{chunk-1ps9fj5n.js → chunk-4zftsyq2.js} +2 -2
  127. package/web/chunk-4zftsyq2.js.br +0 -0
  128. package/web/chunk-4zftsyq2.js.gz +0 -0
  129. package/web/{chunk-bks2k04k.js → chunk-50wrjr22.js} +1 -1
  130. package/web/chunk-50wrjr22.js.br +0 -0
  131. package/web/chunk-50wrjr22.js.gz +0 -0
  132. package/web/{chunk-mhzqgzh0.js → chunk-55kw8p9r.js} +1 -1
  133. package/web/chunk-55kw8p9r.js.br +0 -0
  134. package/web/chunk-55kw8p9r.js.gz +0 -0
  135. package/web/{chunk-gpjytpyw.js → chunk-56tqa12m.js} +2 -2
  136. package/web/chunk-56tqa12m.js.br +0 -0
  137. package/web/chunk-56tqa12m.js.gz +0 -0
  138. package/web/{chunk-wbxz2bjb.js → chunk-595tqsv5.js} +1 -1
  139. package/web/chunk-595tqsv5.js.br +0 -0
  140. package/web/chunk-595tqsv5.js.gz +0 -0
  141. package/web/chunk-5h193k2c.js +1 -0
  142. package/web/chunk-5h193k2c.js.br +0 -0
  143. package/web/chunk-5h193k2c.js.gz +0 -0
  144. package/web/{chunk-k4pknkvp.js → chunk-5nbmnchg.js} +1 -1
  145. package/web/chunk-5nbmnchg.js.br +0 -0
  146. package/web/chunk-5nbmnchg.js.gz +0 -0
  147. package/web/{chunk-gk1bc3c3.js → chunk-5vc1wkwb.js} +1 -1
  148. package/web/chunk-5vc1wkwb.js.br +0 -0
  149. package/web/chunk-5vc1wkwb.js.gz +0 -0
  150. package/web/{chunk-tgeeggkh.js → chunk-5wgdprjp.js} +1 -1
  151. package/web/chunk-5wgdprjp.js.br +0 -0
  152. package/web/chunk-5wgdprjp.js.gz +0 -0
  153. package/web/{chunk-esckazz2.js → chunk-60fbfw70.js} +1 -1
  154. package/web/chunk-60fbfw70.js.br +0 -0
  155. package/web/chunk-60fbfw70.js.gz +0 -0
  156. package/web/{chunk-v5p2fds9.js → chunk-62z94rt2.js} +4 -4
  157. package/web/chunk-62z94rt2.js.br +0 -0
  158. package/web/chunk-62z94rt2.js.gz +0 -0
  159. package/web/chunk-67khfy00.css +1 -0
  160. package/web/chunk-67khfy00.css.br +0 -0
  161. package/web/chunk-67khfy00.css.gz +0 -0
  162. package/web/chunk-6bt2t0xt.js +8 -0
  163. package/web/chunk-6bt2t0xt.js.br +0 -0
  164. package/web/chunk-6bt2t0xt.js.gz +0 -0
  165. package/web/{chunk-h1c0m3g4.js → chunk-780qvh05.js} +3 -3
  166. package/web/chunk-780qvh05.js.br +0 -0
  167. package/web/chunk-780qvh05.js.gz +0 -0
  168. package/web/{chunk-k6fwzn0z.js → chunk-78t5dqea.js} +1 -1
  169. package/web/chunk-78t5dqea.js.br +0 -0
  170. package/web/chunk-78t5dqea.js.gz +0 -0
  171. package/web/chunk-7edmyret.js +1 -0
  172. package/web/chunk-7edmyret.js.br +0 -0
  173. package/web/chunk-7edmyret.js.gz +0 -0
  174. package/web/{chunk-cmhxtckb.js → chunk-7remkcff.js} +1 -1
  175. package/web/chunk-7remkcff.js.br +0 -0
  176. package/web/chunk-7remkcff.js.gz +0 -0
  177. package/web/chunk-7s062q01.js +1 -0
  178. package/web/chunk-7s062q01.js.br +0 -0
  179. package/web/chunk-7s062q01.js.gz +0 -0
  180. package/web/chunk-82zwwy0b.js +1 -0
  181. package/web/chunk-82zwwy0b.js.br +0 -0
  182. package/web/chunk-82zwwy0b.js.gz +0 -0
  183. package/web/{chunk-wa8wr2y9.js → chunk-8c6h952g.js} +9 -9
  184. package/web/chunk-8c6h952g.js.br +0 -0
  185. package/web/chunk-8c6h952g.js.gz +0 -0
  186. package/web/chunk-8wgev3hd.js +1 -0
  187. package/web/chunk-8wgev3hd.js.br +0 -0
  188. package/web/chunk-8wgev3hd.js.gz +0 -0
  189. package/web/chunk-9vcbnf1m.js +1 -0
  190. package/web/chunk-9vcbnf1m.js.br +0 -0
  191. package/web/chunk-9vcbnf1m.js.gz +0 -0
  192. package/web/{chunk-kedjfh66.js → chunk-abahqsws.js} +1 -1
  193. package/web/chunk-abahqsws.js.br +0 -0
  194. package/web/chunk-abahqsws.js.gz +0 -0
  195. package/web/{chunk-vhpzp7zd.js → chunk-acv6gk2b.js} +1 -1
  196. package/web/chunk-acv6gk2b.js.br +0 -0
  197. package/web/chunk-acv6gk2b.js.gz +0 -0
  198. package/web/{chunk-bg0qgabv.js → chunk-ajpzsx51.js} +1 -1
  199. package/web/chunk-ajpzsx51.js.br +0 -0
  200. package/web/chunk-ajpzsx51.js.gz +0 -0
  201. package/web/chunk-b1b9txvk.js +1 -0
  202. package/web/chunk-b1b9txvk.js.br +0 -0
  203. package/web/chunk-b1b9txvk.js.gz +0 -0
  204. package/web/{chunk-qjg6dw46.js → chunk-b83bzjcx.js} +73 -73
  205. package/web/chunk-b83bzjcx.js.br +0 -0
  206. package/web/chunk-b83bzjcx.js.gz +0 -0
  207. package/web/{chunk-v6snw1sw.js → chunk-c1zhat04.js} +1 -1
  208. package/web/chunk-c1zhat04.js.br +0 -0
  209. package/web/chunk-c1zhat04.js.gz +0 -0
  210. package/web/{chunk-186rp10x.js → chunk-c37hhmtd.js} +1 -1
  211. package/web/chunk-c37hhmtd.js.br +0 -0
  212. package/web/chunk-c37hhmtd.js.gz +0 -0
  213. package/web/{chunk-wvqcbp4a.js → chunk-c69t0ysj.js} +1 -1
  214. package/web/chunk-c69t0ysj.js.br +0 -0
  215. package/web/chunk-c69t0ysj.js.gz +0 -0
  216. package/web/chunk-caz85hz4.js +1 -0
  217. package/web/chunk-caz85hz4.js.br +0 -0
  218. package/web/chunk-caz85hz4.js.gz +0 -0
  219. package/web/{chunk-6n1ha6ta.js → chunk-cbtpaf3e.js} +1 -1
  220. package/web/chunk-cbtpaf3e.js.br +0 -0
  221. package/web/chunk-cbtpaf3e.js.gz +0 -0
  222. package/web/{chunk-dmhezjv3.js → chunk-d1gga18f.js} +4 -4
  223. package/web/chunk-d1gga18f.js.br +0 -0
  224. package/web/chunk-d1gga18f.js.gz +0 -0
  225. package/web/{chunk-q0srq8g5.js → chunk-d4kjy2qn.js} +1 -1
  226. package/web/chunk-d4kjy2qn.js.br +0 -0
  227. package/web/chunk-d4kjy2qn.js.gz +0 -0
  228. package/web/{chunk-v2bkkhb8.js → chunk-dbv8qpen.js} +41 -41
  229. package/web/chunk-dbv8qpen.js.br +0 -0
  230. package/web/chunk-dbv8qpen.js.gz +0 -0
  231. package/web/{chunk-37hmswdk.js → chunk-e6r1sb5r.js} +5 -5
  232. package/web/chunk-e6r1sb5r.js.br +0 -0
  233. package/web/chunk-e6r1sb5r.js.gz +0 -0
  234. package/web/chunk-ep5qff8m.js +1 -0
  235. package/web/chunk-ep5qff8m.js.br +0 -0
  236. package/web/chunk-ep5qff8m.js.gz +0 -0
  237. package/web/{chunk-c28crzwk.js → chunk-ex66t805.js} +1 -1
  238. package/web/chunk-ex66t805.js.br +0 -0
  239. package/web/chunk-ex66t805.js.gz +0 -0
  240. package/web/chunk-fb8qtyqg.js +1 -0
  241. package/web/chunk-fb8qtyqg.js.br +0 -0
  242. package/web/chunk-fb8qtyqg.js.gz +0 -0
  243. package/web/{chunk-vpbnyz43.js → chunk-fbzhgaak.js} +1 -1
  244. package/web/chunk-fbzhgaak.js.br +0 -0
  245. package/web/chunk-fbzhgaak.js.gz +0 -0
  246. package/web/{chunk-9n1nsdqs.js → chunk-ffwyfdg4.js} +1 -1
  247. package/web/chunk-ffwyfdg4.js.br +0 -0
  248. package/web/chunk-ffwyfdg4.js.gz +0 -0
  249. package/web/{chunk-0tcmnvab.js → chunk-fsz1msjr.js} +1 -1
  250. package/web/chunk-fsz1msjr.js.br +0 -0
  251. package/web/chunk-fsz1msjr.js.gz +0 -0
  252. package/web/{chunk-nb58m79v.js → chunk-fztzcy7c.js} +1 -1
  253. package/web/chunk-fztzcy7c.js.br +0 -0
  254. package/web/chunk-fztzcy7c.js.gz +0 -0
  255. package/web/chunk-g4st8a4e.js +1 -0
  256. package/web/chunk-g4st8a4e.js.br +0 -0
  257. package/web/chunk-g4st8a4e.js.gz +0 -0
  258. package/web/{chunk-82q4e8ff.js → chunk-gs41j1vb.js} +1 -1
  259. package/web/chunk-gs41j1vb.js.br +0 -0
  260. package/web/chunk-gs41j1vb.js.gz +0 -0
  261. package/web/{chunk-dmzvhbpn.js → chunk-gt4dzb4b.js} +3 -3
  262. package/web/chunk-gt4dzb4b.js.br +0 -0
  263. package/web/chunk-gt4dzb4b.js.gz +0 -0
  264. package/web/{chunk-1yvcxpp2.js → chunk-h4g8j133.js} +4 -4
  265. package/web/chunk-h4g8j133.js.br +0 -0
  266. package/web/chunk-h4g8j133.js.gz +0 -0
  267. package/web/chunk-ht3cek8b.js +1 -0
  268. package/web/chunk-ht3cek8b.js.br +2 -0
  269. package/web/chunk-ht3cek8b.js.gz +0 -0
  270. package/web/{chunk-3fd6mgf0.js → chunk-hw4f79k8.js} +1 -1
  271. package/web/chunk-hw4f79k8.js.br +0 -0
  272. package/web/chunk-hw4f79k8.js.gz +0 -0
  273. package/web/{chunk-js940jjj.js → chunk-j2y3wkxc.js} +4 -4
  274. package/web/chunk-j2y3wkxc.js.br +0 -0
  275. package/web/chunk-j2y3wkxc.js.gz +0 -0
  276. package/web/{chunk-vh2prc6k.js → chunk-j7sfcfxr.js} +1 -1
  277. package/web/chunk-j7sfcfxr.js.br +0 -0
  278. package/web/chunk-j7sfcfxr.js.gz +0 -0
  279. package/web/{chunk-ye7vge7s.js → chunk-jge5e8c4.js} +1 -1
  280. package/web/chunk-jge5e8c4.js.br +0 -0
  281. package/web/chunk-jge5e8c4.js.gz +0 -0
  282. package/web/chunk-jyjgvcac.js +2 -0
  283. package/web/chunk-jyjgvcac.js.br +0 -0
  284. package/web/chunk-jyjgvcac.js.gz +0 -0
  285. package/web/chunk-k9bzz441.js +1 -0
  286. package/web/chunk-k9bzz441.js.br +0 -0
  287. package/web/chunk-k9bzz441.js.gz +0 -0
  288. package/web/{chunk-e2z3kdhw.js → chunk-keway722.js} +3 -3
  289. package/web/chunk-keway722.js.br +0 -0
  290. package/web/chunk-keway722.js.gz +0 -0
  291. package/web/{chunk-ezj5rjqr.js → chunk-kr7shpnb.js} +1 -1
  292. package/web/chunk-kr7shpnb.js.br +0 -0
  293. package/web/chunk-kr7shpnb.js.gz +0 -0
  294. package/web/chunk-kv5swske.js +1 -0
  295. package/web/chunk-kv5swske.js.br +0 -0
  296. package/web/chunk-kv5swske.js.gz +0 -0
  297. package/web/{chunk-a8qe7kvz.js → chunk-kx2k462h.js} +1 -1
  298. package/web/chunk-kx2k462h.js.br +0 -0
  299. package/web/chunk-kx2k462h.js.gz +0 -0
  300. package/web/{chunk-recfg8af.js → chunk-m5b7hny2.js} +1 -1
  301. package/web/chunk-m5b7hny2.js.br +0 -0
  302. package/web/chunk-m5b7hny2.js.gz +0 -0
  303. package/web/{chunk-vxadngbp.js → chunk-m7kypzvp.js} +1 -1
  304. package/web/chunk-m7kypzvp.js.br +0 -0
  305. package/web/chunk-m7kypzvp.js.gz +0 -0
  306. package/web/{chunk-mwfrxgbs.js → chunk-n00se8nk.js} +1 -1
  307. package/web/chunk-n00se8nk.js.br +0 -0
  308. package/web/chunk-n00se8nk.js.gz +0 -0
  309. package/web/{chunk-hqt1f3fm.js → chunk-ngdj0r7w.js} +1 -1
  310. package/web/chunk-ngdj0r7w.js.br +0 -0
  311. package/web/chunk-ngdj0r7w.js.gz +0 -0
  312. package/web/{chunk-zbzgd8kn.js → chunk-p6ma361e.js} +1 -1
  313. package/web/chunk-p6ma361e.js.br +0 -0
  314. package/web/chunk-p6ma361e.js.gz +0 -0
  315. package/web/{chunk-1ratg1jd.js → chunk-pvhz0gqy.js} +1 -1
  316. package/web/chunk-pvhz0gqy.js.br +0 -0
  317. package/web/chunk-pvhz0gqy.js.gz +0 -0
  318. package/web/chunk-q96eky9v.js +1 -0
  319. package/web/chunk-q96eky9v.js.br +0 -0
  320. package/web/chunk-q96eky9v.js.gz +0 -0
  321. package/web/{chunk-1cwyy3gh.js → chunk-qcgs1mft.js} +1 -1
  322. package/web/chunk-qcgs1mft.js.br +0 -0
  323. package/web/chunk-qcgs1mft.js.gz +0 -0
  324. package/web/{chunk-hwxj58j5.js → chunk-qh24q7c0.js} +1 -1
  325. package/web/chunk-qh24q7c0.js.br +0 -0
  326. package/web/chunk-qh24q7c0.js.gz +0 -0
  327. package/web/chunk-r1xksxab.js +1 -0
  328. package/web/chunk-r1xksxab.js.br +0 -0
  329. package/web/chunk-r1xksxab.js.gz +0 -0
  330. package/web/{chunk-fjrgg82c.js → chunk-rsc5k5he.js} +4 -4
  331. package/web/chunk-rsc5k5he.js.br +0 -0
  332. package/web/chunk-rsc5k5he.js.gz +0 -0
  333. package/web/{chunk-apr33amc.js → chunk-s7a2f62f.js} +1 -1
  334. package/web/chunk-s7a2f62f.js.br +0 -0
  335. package/web/chunk-s7a2f62f.js.gz +0 -0
  336. package/web/{chunk-0h0whn75.js → chunk-sac6fn9n.js} +1 -1
  337. package/web/chunk-sac6fn9n.js.br +0 -0
  338. package/web/chunk-sac6fn9n.js.gz +0 -0
  339. package/web/{chunk-6a3wt5c5.js → chunk-t0xjx21h.js} +3 -3
  340. package/web/chunk-t0xjx21h.js.br +0 -0
  341. package/web/chunk-t0xjx21h.js.gz +0 -0
  342. package/web/{chunk-tg3f9xmp.js → chunk-v7ck87jf.js} +1 -1
  343. package/web/chunk-v7ck87jf.js.br +0 -0
  344. package/web/chunk-v7ck87jf.js.gz +0 -0
  345. package/web/{chunk-jmnzcm1f.js → chunk-vvk9nche.js} +4 -4
  346. package/web/chunk-vvk9nche.js.br +0 -0
  347. package/web/chunk-vvk9nche.js.gz +0 -0
  348. package/web/chunk-vxtfen72.js +1 -0
  349. package/web/chunk-vxtfen72.js.br +0 -0
  350. package/web/chunk-vxtfen72.js.gz +0 -0
  351. package/web/{chunk-81xbfpbq.js → chunk-w5c2r59n.js} +1 -1
  352. package/web/chunk-w5c2r59n.js.br +0 -0
  353. package/web/chunk-w5c2r59n.js.gz +0 -0
  354. package/web/{chunk-08w40agf.js → chunk-wh0vt2vd.js} +7 -7
  355. package/web/chunk-wh0vt2vd.js.br +0 -0
  356. package/web/chunk-wh0vt2vd.js.gz +0 -0
  357. package/web/chunk-xe7fj72r.js +1 -0
  358. package/web/chunk-xe7fj72r.js.br +0 -0
  359. package/web/chunk-xe7fj72r.js.gz +0 -0
  360. package/web/{chunk-59h87pvn.js → chunk-yarsp7h7.js} +1 -1
  361. package/web/chunk-yarsp7h7.js.br +0 -0
  362. package/web/chunk-yarsp7h7.js.gz +0 -0
  363. package/web/{chunk-x2hxq5yr.js → chunk-yw5wyz1q.js} +1 -1
  364. package/web/chunk-yw5wyz1q.js.br +0 -0
  365. package/web/chunk-yw5wyz1q.js.gz +0 -0
  366. package/web/chunk-z3ea4vhk.js +1 -0
  367. package/web/chunk-z3ea4vhk.js.br +0 -0
  368. package/web/chunk-z3ea4vhk.js.gz +0 -0
  369. package/web/{chunk-6pbhqbv0.js → chunk-z7adzvfz.js} +1 -1
  370. package/web/chunk-z7adzvfz.js.br +0 -0
  371. package/web/chunk-z7adzvfz.js.gz +0 -0
  372. package/web/{chunk-mh3nkkpx.js → chunk-zb01zmms.js} +6 -6
  373. package/web/chunk-zb01zmms.js.br +0 -0
  374. package/web/chunk-zb01zmms.js.gz +0 -0
  375. package/web/index.html +1 -1
  376. package/web/index.html.br +0 -0
  377. package/web/index.html.gz +0 -0
  378. package/worker.js +1 -1
  379. package/chunk-0wwd4q6h.js +0 -5
  380. package/chunk-204c01mz.js +0 -25
  381. package/chunk-4wc2gbhe.js +0 -2
  382. package/chunk-5tsfqsmf.js +0 -2
  383. package/chunk-6hatfwsq.js +0 -2
  384. package/chunk-78ky455y.js +0 -4
  385. package/chunk-8mqaq042.js +0 -2
  386. package/chunk-g9hsrrj5.js +0 -2
  387. package/chunk-gpceyezp.js +0 -2
  388. package/chunk-h4n0gg11.js +0 -2
  389. package/chunk-jzya0e5n.js +0 -7
  390. package/chunk-ncb0tyaw.js +0 -2
  391. package/chunk-tpeg9fkd.js +0 -2
  392. package/chunk-v0mw006s.js +0 -15
  393. package/chunk-ys2fds2x.js +0 -3
  394. package/chunk-yshdvnsp.js +0 -2
  395. package/web/chunk-08w40agf.js.br +0 -0
  396. package/web/chunk-08w40agf.js.gz +0 -0
  397. package/web/chunk-0bfypmyv.js +0 -1
  398. package/web/chunk-0bfypmyv.js.br +0 -2
  399. package/web/chunk-0bfypmyv.js.gz +0 -0
  400. package/web/chunk-0h0whn75.js.br +0 -0
  401. package/web/chunk-0h0whn75.js.gz +0 -0
  402. package/web/chunk-0pzs9k06.js +0 -1
  403. package/web/chunk-0pzs9k06.js.br +0 -0
  404. package/web/chunk-0pzs9k06.js.gz +0 -0
  405. package/web/chunk-0tcmnvab.js.br +0 -0
  406. package/web/chunk-0tcmnvab.js.gz +0 -0
  407. package/web/chunk-186rp10x.js.br +0 -0
  408. package/web/chunk-186rp10x.js.gz +0 -0
  409. package/web/chunk-1cwyy3gh.js.br +0 -0
  410. package/web/chunk-1cwyy3gh.js.gz +0 -0
  411. package/web/chunk-1ecsxh85.js +0 -1
  412. package/web/chunk-1ecsxh85.js.br +0 -0
  413. package/web/chunk-1ecsxh85.js.gz +0 -0
  414. package/web/chunk-1ghnag5v.js.br +0 -0
  415. package/web/chunk-1ghnag5v.js.gz +0 -0
  416. package/web/chunk-1ps9fj5n.js.br +0 -0
  417. package/web/chunk-1ps9fj5n.js.gz +0 -0
  418. package/web/chunk-1ratg1jd.js.br +0 -0
  419. package/web/chunk-1ratg1jd.js.gz +0 -0
  420. package/web/chunk-1yvcxpp2.js.br +0 -0
  421. package/web/chunk-1yvcxpp2.js.gz +0 -0
  422. package/web/chunk-2r3w0pt0.js +0 -8
  423. package/web/chunk-2r3w0pt0.js.br +0 -0
  424. package/web/chunk-2r3w0pt0.js.gz +0 -0
  425. package/web/chunk-2rnnvxa5.js.br +0 -0
  426. package/web/chunk-2rnnvxa5.js.gz +0 -0
  427. package/web/chunk-2stffcvc.js +0 -1
  428. package/web/chunk-2stffcvc.js.br +0 -0
  429. package/web/chunk-2stffcvc.js.gz +0 -0
  430. package/web/chunk-2svqgkqw.js +0 -1
  431. package/web/chunk-2svqgkqw.js.br +0 -0
  432. package/web/chunk-2svqgkqw.js.gz +0 -0
  433. package/web/chunk-37hmswdk.js.br +0 -0
  434. package/web/chunk-37hmswdk.js.gz +0 -0
  435. package/web/chunk-3fd6mgf0.js.br +0 -0
  436. package/web/chunk-3fd6mgf0.js.gz +0 -0
  437. package/web/chunk-53cg6pxm.js.br +0 -0
  438. package/web/chunk-59h87pvn.js.br +0 -0
  439. package/web/chunk-59h87pvn.js.gz +0 -0
  440. package/web/chunk-6a3wt5c5.js.br +0 -0
  441. package/web/chunk-6a3wt5c5.js.gz +0 -0
  442. package/web/chunk-6n1ha6ta.js.br +0 -0
  443. package/web/chunk-6n1ha6ta.js.gz +0 -0
  444. package/web/chunk-6pbhqbv0.js.br +0 -0
  445. package/web/chunk-6pbhqbv0.js.gz +0 -0
  446. package/web/chunk-72st75n7.js.br +0 -0
  447. package/web/chunk-72st75n7.js.gz +0 -0
  448. package/web/chunk-7h59ac2b.js.br +0 -0
  449. package/web/chunk-7h59ac2b.js.gz +0 -0
  450. package/web/chunk-81xbfpbq.js.br +0 -0
  451. package/web/chunk-81xbfpbq.js.gz +0 -0
  452. package/web/chunk-82q4e8ff.js.br +0 -0
  453. package/web/chunk-82q4e8ff.js.gz +0 -0
  454. package/web/chunk-89e8629e.js +0 -1
  455. package/web/chunk-89e8629e.js.br +0 -0
  456. package/web/chunk-89e8629e.js.gz +0 -0
  457. package/web/chunk-9n1nsdqs.js.br +0 -0
  458. package/web/chunk-9n1nsdqs.js.gz +0 -0
  459. package/web/chunk-a8qe7kvz.js.br +0 -0
  460. package/web/chunk-a8qe7kvz.js.gz +0 -0
  461. package/web/chunk-ahdca62g.js.br +0 -0
  462. package/web/chunk-ahdca62g.js.gz +0 -0
  463. package/web/chunk-apr33amc.js.br +0 -0
  464. package/web/chunk-apr33amc.js.gz +0 -0
  465. package/web/chunk-aw9bwd4w.js.br +0 -0
  466. package/web/chunk-aw9bwd4w.js.gz +0 -0
  467. package/web/chunk-bg0qgabv.js.br +0 -0
  468. package/web/chunk-bg0qgabv.js.gz +0 -0
  469. package/web/chunk-bks2k04k.js.br +0 -0
  470. package/web/chunk-bks2k04k.js.gz +0 -0
  471. package/web/chunk-c28crzwk.js.br +0 -0
  472. package/web/chunk-c28crzwk.js.gz +0 -0
  473. package/web/chunk-cmhxtckb.js.br +0 -0
  474. package/web/chunk-cmhxtckb.js.gz +0 -0
  475. package/web/chunk-d7f85w1y.js.br +0 -0
  476. package/web/chunk-d7f85w1y.js.gz +0 -0
  477. package/web/chunk-dmhezjv3.js.br +0 -0
  478. package/web/chunk-dmhezjv3.js.gz +0 -0
  479. package/web/chunk-dmzvhbpn.js.br +0 -0
  480. package/web/chunk-dmzvhbpn.js.gz +0 -0
  481. package/web/chunk-e2z3kdhw.js.br +0 -0
  482. package/web/chunk-e2z3kdhw.js.gz +0 -0
  483. package/web/chunk-eqmghkwh.js +0 -1
  484. package/web/chunk-eqmghkwh.js.br +0 -0
  485. package/web/chunk-eqmghkwh.js.gz +0 -0
  486. package/web/chunk-esckazz2.js.br +0 -0
  487. package/web/chunk-esckazz2.js.gz +0 -0
  488. package/web/chunk-ezj5rjqr.js.br +0 -0
  489. package/web/chunk-ezj5rjqr.js.gz +0 -0
  490. package/web/chunk-fjrgg82c.js.br +0 -0
  491. package/web/chunk-fjrgg82c.js.gz +0 -0
  492. package/web/chunk-gbcf0rdk.js.br +0 -0
  493. package/web/chunk-gbcf0rdk.js.gz +0 -0
  494. package/web/chunk-gj6bdv1y.js.br +0 -0
  495. package/web/chunk-gj6bdv1y.js.gz +0 -0
  496. package/web/chunk-gk1bc3c3.js.br +0 -0
  497. package/web/chunk-gk1bc3c3.js.gz +0 -0
  498. package/web/chunk-gpjytpyw.js.br +0 -0
  499. package/web/chunk-gpjytpyw.js.gz +0 -0
  500. package/web/chunk-h1c0m3g4.js.br +0 -0
  501. package/web/chunk-h1c0m3g4.js.gz +0 -0
  502. package/web/chunk-h1qv0cpd.css +0 -1
  503. package/web/chunk-h1qv0cpd.css.br +0 -0
  504. package/web/chunk-h1qv0cpd.css.gz +0 -0
  505. package/web/chunk-hq7e5xgd.js +0 -1
  506. package/web/chunk-hq7e5xgd.js.br +0 -0
  507. package/web/chunk-hq7e5xgd.js.gz +0 -0
  508. package/web/chunk-hqt1f3fm.js.br +0 -0
  509. package/web/chunk-hqt1f3fm.js.gz +0 -0
  510. package/web/chunk-hwxj58j5.js.br +0 -0
  511. package/web/chunk-hwxj58j5.js.gz +0 -0
  512. package/web/chunk-hxzb25a8.js +0 -1
  513. package/web/chunk-hxzb25a8.js.br +0 -0
  514. package/web/chunk-hxzb25a8.js.gz +0 -0
  515. package/web/chunk-jmnzcm1f.js.br +0 -0
  516. package/web/chunk-jmnzcm1f.js.gz +0 -0
  517. package/web/chunk-js940jjj.js.br +0 -0
  518. package/web/chunk-js940jjj.js.gz +0 -0
  519. package/web/chunk-jy9vkfbf.js +0 -1
  520. package/web/chunk-jy9vkfbf.js.br +0 -0
  521. package/web/chunk-jy9vkfbf.js.gz +0 -0
  522. package/web/chunk-k4pknkvp.js.br +0 -0
  523. package/web/chunk-k4pknkvp.js.gz +0 -0
  524. package/web/chunk-k6fwzn0z.js.br +0 -0
  525. package/web/chunk-k6fwzn0z.js.gz +0 -0
  526. package/web/chunk-kdegb6pd.js.br +0 -0
  527. package/web/chunk-kdegb6pd.js.gz +0 -0
  528. package/web/chunk-kedjfh66.js.br +0 -0
  529. package/web/chunk-kedjfh66.js.gz +0 -0
  530. package/web/chunk-mbpv2w5h.js.br +0 -0
  531. package/web/chunk-mbpv2w5h.js.gz +0 -0
  532. package/web/chunk-mh3nkkpx.js.br +0 -0
  533. package/web/chunk-mh3nkkpx.js.gz +0 -0
  534. package/web/chunk-mhzqgzh0.js.br +0 -0
  535. package/web/chunk-mhzqgzh0.js.gz +0 -0
  536. package/web/chunk-mj8dzc8q.js.br +0 -0
  537. package/web/chunk-mj8dzc8q.js.gz +0 -0
  538. package/web/chunk-mwfrxgbs.js.br +0 -0
  539. package/web/chunk-mwfrxgbs.js.gz +0 -0
  540. package/web/chunk-nb58m79v.js.br +0 -0
  541. package/web/chunk-nb58m79v.js.gz +0 -0
  542. package/web/chunk-nsna2v2r.js +0 -1
  543. package/web/chunk-nsna2v2r.js.br +0 -0
  544. package/web/chunk-nsna2v2r.js.gz +0 -0
  545. package/web/chunk-nxdp58nf.js +0 -1
  546. package/web/chunk-nxdp58nf.js.br +0 -0
  547. package/web/chunk-nxdp58nf.js.gz +0 -0
  548. package/web/chunk-nytgs01h.js +0 -1
  549. package/web/chunk-nytgs01h.js.br +0 -0
  550. package/web/chunk-nytgs01h.js.gz +0 -0
  551. package/web/chunk-pkxn54jm.js +0 -1
  552. package/web/chunk-pkxn54jm.js.br +0 -0
  553. package/web/chunk-pkxn54jm.js.gz +0 -0
  554. package/web/chunk-q0srq8g5.js.br +0 -0
  555. package/web/chunk-q0srq8g5.js.gz +0 -0
  556. package/web/chunk-qjg6dw46.js.br +0 -0
  557. package/web/chunk-qjg6dw46.js.gz +0 -0
  558. package/web/chunk-qjjxevxe.js +0 -1
  559. package/web/chunk-qjjxevxe.js.br +0 -0
  560. package/web/chunk-qjjxevxe.js.gz +0 -0
  561. package/web/chunk-qx5ab39c.js.br +0 -0
  562. package/web/chunk-qx5ab39c.js.gz +0 -0
  563. package/web/chunk-recfg8af.js.br +0 -0
  564. package/web/chunk-recfg8af.js.gz +0 -0
  565. package/web/chunk-tg3f9xmp.js.br +0 -0
  566. package/web/chunk-tg3f9xmp.js.gz +0 -0
  567. package/web/chunk-tgeeggkh.js.br +0 -0
  568. package/web/chunk-tgeeggkh.js.gz +0 -0
  569. package/web/chunk-v2bkkhb8.js.br +0 -0
  570. package/web/chunk-v2bkkhb8.js.gz +0 -0
  571. package/web/chunk-v5p2fds9.js.br +0 -0
  572. package/web/chunk-v5p2fds9.js.gz +0 -0
  573. package/web/chunk-v6snw1sw.js.br +0 -0
  574. package/web/chunk-v6snw1sw.js.gz +0 -0
  575. package/web/chunk-veadbga2.js +0 -1
  576. package/web/chunk-veadbga2.js.br +0 -2
  577. package/web/chunk-veadbga2.js.gz +0 -0
  578. package/web/chunk-vh2prc6k.js.br +0 -0
  579. package/web/chunk-vh2prc6k.js.gz +0 -0
  580. package/web/chunk-vhpzp7zd.js.br +0 -0
  581. package/web/chunk-vhpzp7zd.js.gz +0 -0
  582. package/web/chunk-vpbnyz43.js.br +0 -0
  583. package/web/chunk-vpbnyz43.js.gz +0 -0
  584. package/web/chunk-vxadngbp.js.br +0 -3
  585. package/web/chunk-vxadngbp.js.gz +0 -0
  586. package/web/chunk-wa8wr2y9.js.br +0 -0
  587. package/web/chunk-wa8wr2y9.js.gz +0 -0
  588. package/web/chunk-wbxz2bjb.js.br +0 -0
  589. package/web/chunk-wbxz2bjb.js.gz +0 -0
  590. package/web/chunk-wgzatts8.js +0 -1
  591. package/web/chunk-wgzatts8.js.br +0 -0
  592. package/web/chunk-wgzatts8.js.gz +0 -0
  593. package/web/chunk-whczyxqw.js +0 -1
  594. package/web/chunk-whczyxqw.js.br +0 -0
  595. package/web/chunk-whczyxqw.js.gz +0 -0
  596. package/web/chunk-wmzz2crn.js +0 -1
  597. package/web/chunk-wmzz2crn.js.br +0 -0
  598. package/web/chunk-wmzz2crn.js.gz +0 -0
  599. package/web/chunk-wvqcbp4a.js.br +0 -0
  600. package/web/chunk-wvqcbp4a.js.gz +0 -0
  601. package/web/chunk-x2hxq5yr.js.br +0 -0
  602. package/web/chunk-x2hxq5yr.js.gz +0 -0
  603. package/web/chunk-x8bnp6vr.js +0 -1
  604. package/web/chunk-x8bnp6vr.js.br +0 -0
  605. package/web/chunk-x8bnp6vr.js.gz +0 -0
  606. package/web/chunk-xvmzsftt.js +0 -2
  607. package/web/chunk-xvmzsftt.js.br +0 -0
  608. package/web/chunk-xvmzsftt.js.gz +0 -0
  609. package/web/chunk-ye7vge7s.js.br +0 -0
  610. package/web/chunk-ye7vge7s.js.gz +0 -0
  611. package/web/chunk-zbzgd8kn.js.br +0 -0
  612. package/web/chunk-zbzgd8kn.js.gz +0 -0
  613. package/web/chunk-zhwqscat.js +0 -1
  614. package/web/chunk-zhwqscat.js.br +0 -0
  615. package/web/chunk-zhwqscat.js.gz +0 -0
  616. package/web/chunk-znrsm604.js.br +0 -0
  617. package/web/chunk-znrsm604.js.gz +0 -0
  618. package/web/chunk-zthww0ws.js.br +0 -0
  619. package/web/chunk-zthww0ws.js.gz +0 -0
@@ -0,0 +1,2 @@
1
+ // @bun
2
+ import{Ke,ct,Fi,Jn,qe,Mt,tt,R,$i,jt,As,ot,Z,ro,gn,kr,no,Yo}from"./chunk-5h59tby8.js";import{Je,t,m}from"./chunk-2fymxwe7.js";import"./chunk-ak9rkrf3.js";import"./chunk-sq5ppnr3.js";export{ot as ArchivedError,t as BadRequestError,Z as BusyError,Fi as FileCredentialStore,Ke as MAX_ATTACHMENTS,m as NotFoundError,tt as PluginCheckError,$i as ProxyManager,Yo as Runtime,Jn as answerShellApproval,Je as dataDir,R as definePlugin,qe as gateShellCommand,Mt as modelID,ro as parseSessionImport,jt as providerProxyScope,As as proxyTargets,gn as readSearchCursor,kr as search,no as searchSuggestions,ct as validAttachment};
@@ -1,2 +1,2 @@
1
1
  // @bun
2
- import{Qo}from"./chunk-51pfvmhh.js";import"./chunk-ak9rkrf3.js";import"./chunk-svx7mz0w.js";import{jo}from"./chunk-78ky455y.js";Bun.plugin({name:"basalt-plugin-sdk",setup(o){o.module("@basalt/plugin",()=>({exports:jo,loader:"object"})),o.module("@earendil-works/pi-ai",()=>({exports:Qo,loader:"object"}))}});
2
+ import{Qo}from"./chunk-5h59tby8.js";import"./chunk-ak9rkrf3.js";import"./chunk-sq5ppnr3.js";import{jo}from"./chunk-4fj91gt1.js";Bun.plugin({name:"basalt-plugin-sdk",setup(o){o.module("@basalt/plugin",()=>({exports:jo,loader:"object"})),o.module("@earendil-works/pi-ai",()=>({exports:Qo,loader:"object"}))}});
@@ -1,5 +1,5 @@
1
1
  // @bun
2
- import{yr,Vn,Kn}from"./chunk-cwrf78vs.js";import{nr}from"./chunk-zkjnt298.js";var iu={};nr(iu,{unstable_now:()=>rl,unstable_IdlePriority:()=>wn,unstable_ImmediatePriority:()=>Wn,unstable_LowPriority:()=>Fn,unstable_NormalPriority:()=>vu,unstable_Profiling:()=>G0,unstable_UserBlockingPriority:()=>rn,unstable_cancelCallback:()=>$n,unstable_forceFrameRate:()=>Q0,unstable_getCurrentPriorityLevel:()=>In,unstable_next:()=>X0,unstable_requestPaint:()=>kn,unstable_runWithPriority:()=>Z0,unstable_scheduleCallback:()=>mu,unstable_shouldYield:()=>Pn,unstable_wrapCallback:()=>V0},{unstable_now:(B2)=>rl=B2,unstable_IdlePriority:(B2)=>wn=B2,unstable_ImmediatePriority:(B2)=>Wn=B2,unstable_LowPriority:(B2)=>Fn=B2,unstable_NormalPriority:(B2)=>vu=B2,unstable_Profiling:(B2)=>G0=B2,unstable_UserBlockingPriority:(B2)=>rn=B2,unstable_cancelCallback:(B2)=>$n=B2,unstable_forceFrameRate:(B2)=>Q0=B2,unstable_getCurrentPriorityLevel:(B2)=>In=B2,unstable_next:(B2)=>X0=B2,unstable_requestPaint:(B2)=>kn=B2,unstable_runWithPriority:(B2)=>Z0=B2,unstable_scheduleCallback:(B2)=>mu=B2,unstable_shouldYield:(B2)=>Pn=B2,unstable_wrapCallback:(B2)=>V0=B2});function zh(){if(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__>"u"||typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE!=="function")return;try{__REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE(zh)}catch(l){console.error(l)}}function qf(l,t){var u=l.length;l.push(t);l:for(;0<u;){var a=u-1>>>1,n=l[a];if(0<xn(n,t))l[a]=t,l[u]=n,u=a;else break l}}function ut(l){return l.length===0?null:l[0]}function pn(l){if(l.length===0)return null;var t=l[0],u=l.pop();if(u!==t){l[0]=u;l:for(var a=0,n=l.length,e=n>>>1;a<e;){var f=2*(a+1)-1,c=l[f],i=f+1,y=l[i];if(0>xn(c,u))i<n&&0>xn(y,c)?(l[a]=y,l[i]=u,a=i):(l[a]=c,l[f]=u,a=f);else if(i<n&&0>xn(y,u))l[a]=y,l[i]=u,a=i;else break l}}return t}function xn(l,t){var u=l.sortIndex-t.sortIndex;return u!==0?u:l.id-t.id}var rl=void 0;if(typeof performance==="object"&&typeof performance.now==="function")Yf=performance,rl=function(){return Yf.now()};else jn=Date,Gf=jn.now(),rl=function(){return jn.now()-Gf};var Yf,jn,Gf,St=[],Yt=[],bh=1,Zl=null,ol=3,Qf=!1,Ya=!1,Ga=!1,Zf=!1,C0=typeof setTimeout==="function"?setTimeout:null,B0=typeof clearTimeout==="function"?clearTimeout:null,s0=typeof setImmediate<"u"?setImmediate:null;function Ln(l){for(var t=ut(Yt);t!==null;){if(t.callback===null)pn(Yt);else if(t.startTime<=l)pn(Yt),t.sortIndex=t.expirationTime,qf(St,t);else break;t=ut(Yt)}}function Vf(l){if(Ga=!1,Ln(l),!Ya)if(ut(St)!==null)Ya=!0,xu||(xu=!0,Vu());else{var t=ut(Yt);t!==null&&xf(Vf,t.startTime-l)}}var xu=!1,Qa=-1,R0=5,q0=-1;function Y0(){return Zf?!0:iu.unstable_now()-q0<R0?!1:!0}function Rf(){if(Zf=!1,xu){var l=iu.unstable_now();q0=l;var t=!0;try{l:{Ya=!1,Ga&&(Ga=!1,B0(Qa),Qa=-1),Qf=!0;var u=ol;try{t:{Ln(l);for(Zl=ut(St);Zl!==null&&!(Zl.expirationTime>l&&Y0());){var a=Zl.callback;if(typeof a==="function"){Zl.callback=null,ol=Zl.priorityLevel;var n=a(Zl.expirationTime<=l);if(l=iu.unstable_now(),typeof n==="function"){Zl.callback=n,Ln(l),t=!0;break t}Zl===ut(St)&&pn(St),Ln(l)}else pn(St);Zl=ut(St)}if(Zl!==null)t=!0;else{var e=ut(Yt);e!==null&&xf(Vf,e.startTime-l),t=!1}}break l}finally{Zl=null,ol=u,Qf=!1}t=void 0}}finally{t?Vu():xu=!1}}}var Vu;if(typeof s0==="function")Vu=function(){s0(Rf)};else if(typeof MessageChannel<"u")Jn=new MessageChannel,Xf=Jn.port2,Jn.port1.onmessage=Rf,Vu=function(){Xf.postMessage(null)};else Vu=function(){C0(Rf,0)};var Jn,Xf;function xf(l,t){Qa=C0(function(){l(iu.unstable_now())},t)}var wn=5,Wn=1,Fn=4,vu=3,G0=null,rn=2,$n=function(l){l.callback=null},Q0=function(l){0>l||125<l?console.error("forceFrameRate takes a positive int between 0 and 125, forcing frame rates higher than 125 fps is not supported"):R0=0<l?Math.floor(1000/l):5},In=function(){return ol},X0=function(l){switch(ol){case 1:case 2:case 3:var t=3;break;default:t=ol}var u=ol;ol=t;try{return l()}finally{ol=u}},kn=function(){Zf=!0},Z0=function(l,t){switch(l){case 1:case 2:case 3:case 4:case 5:break;default:l=3}var u=ol;ol=l;try{return t()}finally{ol=u}},mu=function(l,t,u){var a=iu.unstable_now();switch(typeof u==="object"&&u!==null?(u=u.delay,u=typeof u==="number"&&0<u?a+u:a):u=a,l){case 1:var n=-1;break;case 2:n=250;break;case 5:n=1073741823;break;case 4:n=1e4;break;default:n=5000}return n=u+n,l={id:bh++,callback:t,priorityLevel:l,startTime:u,expirationTime:n,sortIndex:-1},u>a?(l.sortIndex=u,qf(Yt,l),ut(St)===null&&l===ut(Yt)&&(Ga?(B0(Qa),Qa=-1):Ga=!0,xf(Vf,u-a))):(l.sortIndex=n,qf(St,l),Ya||Qf||(Ya=!0,xu||(xu=!0,Vu()))),l},Pn=Y0,V0=function(l){var t=ol;return function(){var u=ol;ol=t;try{return l.apply(this,arguments)}finally{ol=u}}};function T(l){var t="https://react.dev/errors/"+l;if(1<arguments.length){t+="?args[]="+encodeURIComponent(arguments[1]);for(var u=2;u<arguments.length;u++)t+="&args[]="+encodeURIComponent(arguments[u])}return"Minified React error #"+l+"; visit "+t+" for the full message or use the non-minified dev environment for full errors and additional helpful warnings."}function Eh(l){return!(!l||l.nodeType!==1&&l.nodeType!==9&&l.nodeType!==11)}function _n(l){for(var t=l,u=t;u&&!u.alternate;)t=u,(t.flags&4098)!==0&&(l=t.return),u=t.return;for(;t.return;)t=t.return;return t.tag===3?l:null}function Nv(l){if(l.tag===13){var t=l.memoizedState;if(t===null&&(l=l.alternate,l!==null&&(t=l.memoizedState)),t!==null)return t.dehydrated}return null}function Av(l){if(l.tag===31){var t=l.memoizedState;if(t===null&&(l=l.alternate,l!==null&&(t=l.memoizedState)),t!==null)return t.dehydrated}return null}function x0(l){if(_n(l)!==l)throw Error(T(188))}function Oh(l){var t=l.alternate;if(!t){if(t=_n(l),t===null)throw Error(T(188));return t!==l?null:l}for(var u=l,a=t;;){var n=u.return;if(n===null)break;var e=n.alternate;if(e===null){if(a=n.return,a!==null){u=a;continue}break}if(n.child===e.child){for(e=n.child;e;){if(e===u)return x0(n),l;if(e===a)return x0(n),t;e=e.sibling}throw Error(T(188))}if(u.return!==a.return)u=n,a=e;else{for(var f=!1,c=n.child;c;){if(c===u){f=!0,u=n,a=e;break}if(c===a){f=!0,a=n,u=e;break}c=c.sibling}if(!f){for(c=e.child;c;){if(c===u){f=!0,u=e,a=n;break}if(c===a){f=!0,a=e,u=n;break}c=c.sibling}if(!f)throw Error(T(189))}}if(u.alternate!==a)throw Error(T(190))}if(u.tag!==3)throw Error(T(188));return u.stateNode.current===u?l:t}function Dv(l){var t=l.tag;if(t===5||t===26||t===27||t===6)return l;for(l=l.child;l!==null;){if(t=Dv(l),t!==null)return t;l=l.sibling}return null}function Ul(l,t,u,a,n,e){for(;l!==null;){if((l.tag===5||l.tag===27||l.tag===6)&&u(l,a,n,e)||(l.tag!==22||l.memoizedState===null)&&(t||l.tag!==5&&l.tag!==27)&&Ul(l.child,t,u,a,n,e))return!0;l=l.sibling}return!1}function Yu(l){for(l=l.return;l!==null;){if(l.tag===3||l.tag===5||l.tag===27)return l;l=l.return}return null}function j0(l){var t=!1;for(l=l.return;l!==null;){if(l.tag===4&&(t=!0),l.tag===3||l.tag===5||l.tag===27)break;l=l.return}return t}function Mv(l){var t=[null,null],u=Yu(l);if(u===null)return t;return Uv(t,l,u.child,{foundSelf:!1}),t}function Uv(l,t,u,a){for(;u!==null;){if(u===t)a.foundSelf=!0;else if(u.tag===5||u.tag===27||u.tag===6){if(a.foundSelf)return l[1]=u,!0;l[0]=u}else if((u.tag!==22||u.memoizedState===null)&&Uv(l,t,u.child,a))return!0;u=u.sibling}return!1}function al(l){switch(l.tag){case 5:case 27:case 6:return l.stateNode;case 3:return l.stateNode.containerInfo;default:throw Error(T(559))}}var Wu=null,zc=null;function Nh(l,t,u){return l===u?!0:l===t?(Wu=l,!0):!1}function Ah(l,t,u){return l===u?(zc=l,!1):l===t?(zc!==null&&(Wu=l),!0):!1}function K0(l){if(l===null)return null;do l=l===null?null:l.return;while(l&&l.tag!==5&&l.tag!==27&&l.tag!==3);return l?l:null}function Tc(l,t,u){for(var a=0,n=l;n;n=u(n))a++;n=0;for(var e=t;e;e=u(e))n++;for(;0<a-n;)l=u(l),a--;for(;0<n-a;)t=u(t),n--;for(;a--;){if(l===t||t!==null&&l===t.alternate)return l;l=u(l),t=u(t)}return null}var K=Object.assign,Dh=Symbol.for("react.element"),le=Symbol.for("react.transitional.element"),Ka=Symbol.for("react.portal"),Fu=Symbol.for("react.fragment"),_v=Symbol.for("react.strict_mode"),bc=Symbol.for("react.profiler"),Hv=Symbol.for("react.consumer"),it=Symbol.for("react.context"),Ci=Symbol.for("react.forward_ref"),Ec=Symbol.for("react.suspense"),Oc=Symbol.for("react.suspense_list"),Bi=Symbol.for("react.memo"),Zt=Symbol.for("react.lazy"),Nc=Symbol.for("react.activity"),Mh=Symbol.for("react.legacy_hidden"),Uh=Symbol.for("react.memo_cache_sentinel"),Ac=Symbol.for("react.view_transition"),_h=Symbol.for("react.recoverable"),L0=Symbol.iterator;function Xa(l){if(l===null||typeof l!=="object")return null;return l=L0&&l[L0]||l["@@iterator"],typeof l==="function"?l:null}var Hh=Symbol.for("react.client.reference");function Dc(l){if(l==null)return null;if(typeof l==="function")return l.$$typeof===Hh?null:l.displayName||l.name||null;if(typeof l==="string")return l;switch(l){case Fu:return"Fragment";case bc:return"Profiler";case _v:return"StrictMode";case Ec:return"Suspense";case Oc:return"SuspenseList";case Nc:return"Activity";case Ac:return"ViewTransition"}if(typeof l==="object")switch(l.$$typeof){case Ka:return"Portal";case it:return l.displayName||"Context";case Hv:return(l._context.displayName||"Context")+".Consumer";case Ci:var t=l.render;return l=l.displayName,l||(l=t.displayName||t.name||"",l=l!==""?"ForwardRef("+l+")":"ForwardRef"),l;case Bi:return t=l.displayName||null,t!==null?t:Dc(l.type)||"Memo";case Zt:t=l._payload,l=l._init;try{return Dc(l(t))}catch(u){}}return null}var La=Array.isArray,D=yr,G=Kn,bu={pending:!1,data:null,method:null,action:null},Mc=[],ru=-1;function ot(l){return{current:l}}function yl(l){0>ru||(l.current=Mc[ru],Mc[ru]=null,ru--)}function p(l,t){ru++,Mc[ru]=l.current,l.current=t}var ht=ot(null),yn=ot(null),Wt=ot(null),Xe=ot(null);function Ze(l,t){switch(p(Wt,t),p(yn,l),p(ht,null),t.nodeType){case 9:case 11:l=(l=t.documentElement)?(l=l.namespaceURI)?tv(l):0:0;break;default:if(l=t.tagName,t=t.namespaceURI)t=tv(t),l=ry(t,l);else switch(l){case"svg":l=1;break;case"math":l=2;break;default:l=0}}yl(ht),p(ht,l)}function oa(){yl(ht),yl(yn),yl(Wt)}function Uc(l){var t=l.memoizedState;t!==null&&(Ma._currentValue=t.memoizedState,p(Xe,l)),t=ht.current;var u=ry(t,l.type);t!==u&&(p(yn,l),p(ht,u))}function Ve(l){yn.current===l&&(yl(ht),yl(yn)),Xe.current===l&&(yl(Xe),Ma._currentValue=bu)}var jf,J0;function Qt(l){if(jf===void 0)try{throw Error()}catch(u){var t=u.stack.trim().match(/\n( *(at )?)/);jf=t&&t[1]||"",J0=-1<u.stack.indexOf(`
2
+ import{yr,Vn,Kn}from"./chunk-3s8rpc1w.js";import{nr}from"./chunk-zkjnt298.js";var iu={};nr(iu,{unstable_now:()=>rl,unstable_IdlePriority:()=>wn,unstable_ImmediatePriority:()=>Wn,unstable_LowPriority:()=>Fn,unstable_NormalPriority:()=>vu,unstable_Profiling:()=>G0,unstable_UserBlockingPriority:()=>rn,unstable_cancelCallback:()=>$n,unstable_forceFrameRate:()=>Q0,unstable_getCurrentPriorityLevel:()=>In,unstable_next:()=>X0,unstable_requestPaint:()=>kn,unstable_runWithPriority:()=>Z0,unstable_scheduleCallback:()=>mu,unstable_shouldYield:()=>Pn,unstable_wrapCallback:()=>V0},{unstable_now:(B2)=>rl=B2,unstable_IdlePriority:(B2)=>wn=B2,unstable_ImmediatePriority:(B2)=>Wn=B2,unstable_LowPriority:(B2)=>Fn=B2,unstable_NormalPriority:(B2)=>vu=B2,unstable_Profiling:(B2)=>G0=B2,unstable_UserBlockingPriority:(B2)=>rn=B2,unstable_cancelCallback:(B2)=>$n=B2,unstable_forceFrameRate:(B2)=>Q0=B2,unstable_getCurrentPriorityLevel:(B2)=>In=B2,unstable_next:(B2)=>X0=B2,unstable_requestPaint:(B2)=>kn=B2,unstable_runWithPriority:(B2)=>Z0=B2,unstable_scheduleCallback:(B2)=>mu=B2,unstable_shouldYield:(B2)=>Pn=B2,unstable_wrapCallback:(B2)=>V0=B2});function zh(){if(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__>"u"||typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE!=="function")return;try{__REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE(zh)}catch(l){console.error(l)}}function qf(l,t){var u=l.length;l.push(t);l:for(;0<u;){var a=u-1>>>1,n=l[a];if(0<xn(n,t))l[a]=t,l[u]=n,u=a;else break l}}function ut(l){return l.length===0?null:l[0]}function pn(l){if(l.length===0)return null;var t=l[0],u=l.pop();if(u!==t){l[0]=u;l:for(var a=0,n=l.length,e=n>>>1;a<e;){var f=2*(a+1)-1,c=l[f],i=f+1,y=l[i];if(0>xn(c,u))i<n&&0>xn(y,c)?(l[a]=y,l[i]=u,a=i):(l[a]=c,l[f]=u,a=f);else if(i<n&&0>xn(y,u))l[a]=y,l[i]=u,a=i;else break l}}return t}function xn(l,t){var u=l.sortIndex-t.sortIndex;return u!==0?u:l.id-t.id}var rl=void 0;if(typeof performance==="object"&&typeof performance.now==="function")Yf=performance,rl=function(){return Yf.now()};else jn=Date,Gf=jn.now(),rl=function(){return jn.now()-Gf};var Yf,jn,Gf,St=[],Yt=[],bh=1,Zl=null,ol=3,Qf=!1,Ya=!1,Ga=!1,Zf=!1,C0=typeof setTimeout==="function"?setTimeout:null,B0=typeof clearTimeout==="function"?clearTimeout:null,s0=typeof setImmediate<"u"?setImmediate:null;function Ln(l){for(var t=ut(Yt);t!==null;){if(t.callback===null)pn(Yt);else if(t.startTime<=l)pn(Yt),t.sortIndex=t.expirationTime,qf(St,t);else break;t=ut(Yt)}}function Vf(l){if(Ga=!1,Ln(l),!Ya)if(ut(St)!==null)Ya=!0,xu||(xu=!0,Vu());else{var t=ut(Yt);t!==null&&xf(Vf,t.startTime-l)}}var xu=!1,Qa=-1,R0=5,q0=-1;function Y0(){return Zf?!0:iu.unstable_now()-q0<R0?!1:!0}function Rf(){if(Zf=!1,xu){var l=iu.unstable_now();q0=l;var t=!0;try{l:{Ya=!1,Ga&&(Ga=!1,B0(Qa),Qa=-1),Qf=!0;var u=ol;try{t:{Ln(l);for(Zl=ut(St);Zl!==null&&!(Zl.expirationTime>l&&Y0());){var a=Zl.callback;if(typeof a==="function"){Zl.callback=null,ol=Zl.priorityLevel;var n=a(Zl.expirationTime<=l);if(l=iu.unstable_now(),typeof n==="function"){Zl.callback=n,Ln(l),t=!0;break t}Zl===ut(St)&&pn(St),Ln(l)}else pn(St);Zl=ut(St)}if(Zl!==null)t=!0;else{var e=ut(Yt);e!==null&&xf(Vf,e.startTime-l),t=!1}}break l}finally{Zl=null,ol=u,Qf=!1}t=void 0}}finally{t?Vu():xu=!1}}}var Vu;if(typeof s0==="function")Vu=function(){s0(Rf)};else if(typeof MessageChannel<"u")Jn=new MessageChannel,Xf=Jn.port2,Jn.port1.onmessage=Rf,Vu=function(){Xf.postMessage(null)};else Vu=function(){C0(Rf,0)};var Jn,Xf;function xf(l,t){Qa=C0(function(){l(iu.unstable_now())},t)}var wn=5,Wn=1,Fn=4,vu=3,G0=null,rn=2,$n=function(l){l.callback=null},Q0=function(l){0>l||125<l?console.error("forceFrameRate takes a positive int between 0 and 125, forcing frame rates higher than 125 fps is not supported"):R0=0<l?Math.floor(1000/l):5},In=function(){return ol},X0=function(l){switch(ol){case 1:case 2:case 3:var t=3;break;default:t=ol}var u=ol;ol=t;try{return l()}finally{ol=u}},kn=function(){Zf=!0},Z0=function(l,t){switch(l){case 1:case 2:case 3:case 4:case 5:break;default:l=3}var u=ol;ol=l;try{return t()}finally{ol=u}},mu=function(l,t,u){var a=iu.unstable_now();switch(typeof u==="object"&&u!==null?(u=u.delay,u=typeof u==="number"&&0<u?a+u:a):u=a,l){case 1:var n=-1;break;case 2:n=250;break;case 5:n=1073741823;break;case 4:n=1e4;break;default:n=5000}return n=u+n,l={id:bh++,callback:t,priorityLevel:l,startTime:u,expirationTime:n,sortIndex:-1},u>a?(l.sortIndex=u,qf(Yt,l),ut(St)===null&&l===ut(Yt)&&(Ga?(B0(Qa),Qa=-1):Ga=!0,xf(Vf,u-a))):(l.sortIndex=n,qf(St,l),Ya||Qf||(Ya=!0,xu||(xu=!0,Vu()))),l},Pn=Y0,V0=function(l){var t=ol;return function(){var u=ol;ol=t;try{return l.apply(this,arguments)}finally{ol=u}}};function T(l){var t="https://react.dev/errors/"+l;if(1<arguments.length){t+="?args[]="+encodeURIComponent(arguments[1]);for(var u=2;u<arguments.length;u++)t+="&args[]="+encodeURIComponent(arguments[u])}return"Minified React error #"+l+"; visit "+t+" for the full message or use the non-minified dev environment for full errors and additional helpful warnings."}function Eh(l){return!(!l||l.nodeType!==1&&l.nodeType!==9&&l.nodeType!==11)}function _n(l){for(var t=l,u=t;u&&!u.alternate;)t=u,(t.flags&4098)!==0&&(l=t.return),u=t.return;for(;t.return;)t=t.return;return t.tag===3?l:null}function Nv(l){if(l.tag===13){var t=l.memoizedState;if(t===null&&(l=l.alternate,l!==null&&(t=l.memoizedState)),t!==null)return t.dehydrated}return null}function Av(l){if(l.tag===31){var t=l.memoizedState;if(t===null&&(l=l.alternate,l!==null&&(t=l.memoizedState)),t!==null)return t.dehydrated}return null}function x0(l){if(_n(l)!==l)throw Error(T(188))}function Oh(l){var t=l.alternate;if(!t){if(t=_n(l),t===null)throw Error(T(188));return t!==l?null:l}for(var u=l,a=t;;){var n=u.return;if(n===null)break;var e=n.alternate;if(e===null){if(a=n.return,a!==null){u=a;continue}break}if(n.child===e.child){for(e=n.child;e;){if(e===u)return x0(n),l;if(e===a)return x0(n),t;e=e.sibling}throw Error(T(188))}if(u.return!==a.return)u=n,a=e;else{for(var f=!1,c=n.child;c;){if(c===u){f=!0,u=n,a=e;break}if(c===a){f=!0,a=n,u=e;break}c=c.sibling}if(!f){for(c=e.child;c;){if(c===u){f=!0,u=e,a=n;break}if(c===a){f=!0,a=e,u=n;break}c=c.sibling}if(!f)throw Error(T(189))}}if(u.alternate!==a)throw Error(T(190))}if(u.tag!==3)throw Error(T(188));return u.stateNode.current===u?l:t}function Dv(l){var t=l.tag;if(t===5||t===26||t===27||t===6)return l;for(l=l.child;l!==null;){if(t=Dv(l),t!==null)return t;l=l.sibling}return null}function Ul(l,t,u,a,n,e){for(;l!==null;){if((l.tag===5||l.tag===27||l.tag===6)&&u(l,a,n,e)||(l.tag!==22||l.memoizedState===null)&&(t||l.tag!==5&&l.tag!==27)&&Ul(l.child,t,u,a,n,e))return!0;l=l.sibling}return!1}function Yu(l){for(l=l.return;l!==null;){if(l.tag===3||l.tag===5||l.tag===27)return l;l=l.return}return null}function j0(l){var t=!1;for(l=l.return;l!==null;){if(l.tag===4&&(t=!0),l.tag===3||l.tag===5||l.tag===27)break;l=l.return}return t}function Mv(l){var t=[null,null],u=Yu(l);if(u===null)return t;return Uv(t,l,u.child,{foundSelf:!1}),t}function Uv(l,t,u,a){for(;u!==null;){if(u===t)a.foundSelf=!0;else if(u.tag===5||u.tag===27||u.tag===6){if(a.foundSelf)return l[1]=u,!0;l[0]=u}else if((u.tag!==22||u.memoizedState===null)&&Uv(l,t,u.child,a))return!0;u=u.sibling}return!1}function al(l){switch(l.tag){case 5:case 27:case 6:return l.stateNode;case 3:return l.stateNode.containerInfo;default:throw Error(T(559))}}var Wu=null,zc=null;function Nh(l,t,u){return l===u?!0:l===t?(Wu=l,!0):!1}function Ah(l,t,u){return l===u?(zc=l,!1):l===t?(zc!==null&&(Wu=l),!0):!1}function K0(l){if(l===null)return null;do l=l===null?null:l.return;while(l&&l.tag!==5&&l.tag!==27&&l.tag!==3);return l?l:null}function Tc(l,t,u){for(var a=0,n=l;n;n=u(n))a++;n=0;for(var e=t;e;e=u(e))n++;for(;0<a-n;)l=u(l),a--;for(;0<n-a;)t=u(t),n--;for(;a--;){if(l===t||t!==null&&l===t.alternate)return l;l=u(l),t=u(t)}return null}var K=Object.assign,Dh=Symbol.for("react.element"),le=Symbol.for("react.transitional.element"),Ka=Symbol.for("react.portal"),Fu=Symbol.for("react.fragment"),_v=Symbol.for("react.strict_mode"),bc=Symbol.for("react.profiler"),Hv=Symbol.for("react.consumer"),it=Symbol.for("react.context"),Ci=Symbol.for("react.forward_ref"),Ec=Symbol.for("react.suspense"),Oc=Symbol.for("react.suspense_list"),Bi=Symbol.for("react.memo"),Zt=Symbol.for("react.lazy"),Nc=Symbol.for("react.activity"),Mh=Symbol.for("react.legacy_hidden"),Uh=Symbol.for("react.memo_cache_sentinel"),Ac=Symbol.for("react.view_transition"),_h=Symbol.for("react.recoverable"),L0=Symbol.iterator;function Xa(l){if(l===null||typeof l!=="object")return null;return l=L0&&l[L0]||l["@@iterator"],typeof l==="function"?l:null}var Hh=Symbol.for("react.client.reference");function Dc(l){if(l==null)return null;if(typeof l==="function")return l.$$typeof===Hh?null:l.displayName||l.name||null;if(typeof l==="string")return l;switch(l){case Fu:return"Fragment";case bc:return"Profiler";case _v:return"StrictMode";case Ec:return"Suspense";case Oc:return"SuspenseList";case Nc:return"Activity";case Ac:return"ViewTransition"}if(typeof l==="object")switch(l.$$typeof){case Ka:return"Portal";case it:return l.displayName||"Context";case Hv:return(l._context.displayName||"Context")+".Consumer";case Ci:var t=l.render;return l=l.displayName,l||(l=t.displayName||t.name||"",l=l!==""?"ForwardRef("+l+")":"ForwardRef"),l;case Bi:return t=l.displayName||null,t!==null?t:Dc(l.type)||"Memo";case Zt:t=l._payload,l=l._init;try{return Dc(l(t))}catch(u){}}return null}var La=Array.isArray,D=yr,G=Kn,bu={pending:!1,data:null,method:null,action:null},Mc=[],ru=-1;function ot(l){return{current:l}}function yl(l){0>ru||(l.current=Mc[ru],Mc[ru]=null,ru--)}function p(l,t){ru++,Mc[ru]=l.current,l.current=t}var ht=ot(null),yn=ot(null),Wt=ot(null),Xe=ot(null);function Ze(l,t){switch(p(Wt,t),p(yn,l),p(ht,null),t.nodeType){case 9:case 11:l=(l=t.documentElement)?(l=l.namespaceURI)?tv(l):0:0;break;default:if(l=t.tagName,t=t.namespaceURI)t=tv(t),l=ry(t,l);else switch(l){case"svg":l=1;break;case"math":l=2;break;default:l=0}}yl(ht),p(ht,l)}function oa(){yl(ht),yl(yn),yl(Wt)}function Uc(l){var t=l.memoizedState;t!==null&&(Ma._currentValue=t.memoizedState,p(Xe,l)),t=ht.current;var u=ry(t,l.type);t!==u&&(p(yn,l),p(ht,u))}function Ve(l){yn.current===l&&(yl(ht),yl(yn)),Xe.current===l&&(yl(Xe),Ma._currentValue=bu)}var jf,J0;function Qt(l){if(jf===void 0)try{throw Error()}catch(u){var t=u.stack.trim().match(/\n( *(at )?)/);jf=t&&t[1]||"",J0=-1<u.stack.indexOf(`
3
3
  at`)?" (<anonymous>)":-1<u.stack.indexOf("@")?"@unknown:0:0":""}return`
4
4
  `+jf+l+J0}var Kf=!1;function Lf(l,t){if(!l||Kf)return"";Kf=!0;var u=Error.prepareStackTrace;Error.prepareStackTrace=void 0;try{var a={DetermineComponentFrameRoot:function(){try{if(t){var z=function(){throw Error()};if(Object.defineProperty(z.prototype,"props",{set:function(){throw Error()}}),typeof Reflect==="object"&&Reflect.construct){try{Reflect.construct(z,[])}catch(b){var m=b}Reflect.construct(l,[],z)}else{try{z.call()}catch(b){m=b}z=!1;try{var g=Object.getOwnPropertyDescriptor(l.prototype,"props");Object.defineProperty(l.prototype,"props",{configurable:!0,set:function(){throw Error()}}),z=!0,new l}finally{z&&(g!==void 0?Object.defineProperty(l.prototype,"props",g):delete l.prototype.props)}}}else{try{throw Error()}catch(b){m=b}(z=l())&&typeof z.catch==="function"&&z.catch(function(){})}}catch(b){if(b&&m&&typeof b.stack==="string")return[b.stack,m.stack]}return[null,null]}};a.DetermineComponentFrameRoot.displayName="DetermineComponentFrameRoot";var n=Object.getOwnPropertyDescriptor(a.DetermineComponentFrameRoot,"name");n&&n.configurable&&Object.defineProperty(a.DetermineComponentFrameRoot,"name",{value:"DetermineComponentFrameRoot"});var e=a.DetermineComponentFrameRoot(),f=e[0],c=e[1];if(f&&c){var i=f.split(`
5
5
  `),y=c.split(`
@@ -0,0 +1,2 @@
1
+ // @bun
2
+ import*as Do from"child_process";import*as Rt from"crypto";import*as ft from"fs";import*as k from"path";import*as Un from"stream";import*as Uo from"util";export{Do,Rt,ft,k,Un,Uo};
@@ -1,9 +1,9 @@
1
1
  // @bun
2
- import{qt}from"./chunk-eyyxqb6y.js";import{r,p}from"./chunk-zkjnt298.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(p("http")),ne=B(p("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((a,i)=>{o.once("response",a).once("error",i).end()});return o.then=s.then.bind(s),o}c.req=se});var U=r(function(u){var I=u&&u.__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=u&&u.__setModuleDefault||(Object.create?function(e,t){Object.defineProperty(e,"default",{enumerable:!0,value:t})}:function(e,t){e.default=t}),L=u&&u.__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=u&&u.__exportStar||function(e,t){for(var n in e)if(n!=="default"&&!Object.prototype.hasOwnProperty.call(t,n))I(t,e,n)};Object.defineProperty(u,"__esModule",{value:!0});u.Agent=void 0;var ue=L(p("net")),H=L(p("http")),R=p("https");ce(T(),u);var d=Symbol("AgentBaseInternalState");class k extends H.Agent{constructor(e){super(e);this[d]={}}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),a=this.incrementSockets(s);Promise.resolve().then(()=>this.connect(e,o)).then((i)=>{if(this.decrementSockets(s,a),i instanceof H.Agent)try{return i.addRequest(e,o)}catch(_){return n(_)}this[d].currentSocket=i,super.createSocket(e,t,n)},(i)=>{this.decrementSockets(s,a),n(i)})}createConnection(){let e=this[d].currentSocket;if(this[d].currentSocket=void 0,!e)throw Error("No socket was returned in the `connect()` function");return e}get defaultPort(){return this[d].defaultPort??(this.protocol==="https:"?443:80)}set defaultPort(e){if(this[d])this[d].defaultPort=e}get protocol(){return this[d].protocol??(this.isSecureEndpoint()?"https:":"http:")}set protocol(e){if(this[d])this[d].protocol=e}}u.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(qt()),S=(0,fe.default)("https-proxy-agent:parse-proxy-response");function le(e){return new Promise((t,n)=>{let o=0,s=[];function a(){let h=e.read();if(h)j(h);else e.once("readable",a)}function i(){e.removeListener("end",_),e.removeListener("error",y),e.removeListener("readable",a)}function _(){i(),S("onend"),n(Error("Proxy connection ended before receiving CONNECT response"))}function y(h){i(),S("onerror %o",h),n(h)}function j(h){s.push(h),o+=h.length;let f=Buffer.concat(s,o),M=f.indexOf(`\r
2
+ import{Gt}from"./chunk-v878x8zr.js";import{r,p}from"./chunk-zkjnt298.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(p("http")),ne=B(p("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((a,i)=>{o.once("response",a).once("error",i).end()});return o.then=s.then.bind(s),o}c.req=se});var U=r(function(u){var I=u&&u.__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=u&&u.__setModuleDefault||(Object.create?function(e,t){Object.defineProperty(e,"default",{enumerable:!0,value:t})}:function(e,t){e.default=t}),L=u&&u.__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=u&&u.__exportStar||function(e,t){for(var n in e)if(n!=="default"&&!Object.prototype.hasOwnProperty.call(t,n))I(t,e,n)};Object.defineProperty(u,"__esModule",{value:!0});u.Agent=void 0;var ue=L(p("net")),H=L(p("http")),R=p("https");ce(T(),u);var d=Symbol("AgentBaseInternalState");class k extends H.Agent{constructor(e){super(e);this[d]={}}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),a=this.incrementSockets(s);Promise.resolve().then(()=>this.connect(e,o)).then((i)=>{if(this.decrementSockets(s,a),i instanceof H.Agent)try{return i.addRequest(e,o)}catch(_){return n(_)}this[d].currentSocket=i,super.createSocket(e,t,n)},(i)=>{this.decrementSockets(s,a),n(i)})}createConnection(){let e=this[d].currentSocket;if(this[d].currentSocket=void 0,!e)throw Error("No socket was returned in the `connect()` function");return e}get defaultPort(){return this[d].defaultPort??(this.protocol==="https:"?443:80)}set defaultPort(e){if(this[d])this[d].defaultPort=e}get protocol(){return this[d].protocol??(this.isSecureEndpoint()?"https:":"http:")}set protocol(e){if(this[d])this[d].protocol=e}}u.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(Gt()),S=(0,fe.default)("https-proxy-agent:parse-proxy-response");function le(e){return new Promise((t,n)=>{let o=0,s=[];function a(){let h=e.read();if(h)j(h);else e.once("readable",a)}function i(){e.removeListener("end",_),e.removeListener("error",y),e.removeListener("readable",a)}function _(){i(),S("onend"),n(Error("Proxy connection ended before receiving CONNECT response"))}function y(h){i(),S("onerror %o",h),n(h)}function j(h){s.push(h),o+=h.length;let f=Buffer.concat(s,o),M=f.indexOf(`\r
4
4
  \r
5
5
  `);if(M===-1){S("have not received end of HTTP headers yet..."),a();return}let q=f.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:f})}e.on("error",y),e.on("end",_),a()})}g.parseProxyResponse=le});var ge=r(function(l){var he=l&&l.__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=l&&l.__setModuleDefault||(Object.create?function(e,t){Object.defineProperty(e,"default",{enumerable:!0,value:t})}:function(e,t){e.default=t}),W=l&&l.__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=l&&l.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(l,"__esModule",{value:!0});l.HttpsProxyAgent=void 0;var w=W(p("net")),F=W(p("tls")),pe=G(p("assert")),_e=G(qt()),Q=U(),V=p("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},a=w.isIPv6(t.host)?`[${t.host}]`:t.host,i=`CONNECT ${a}:${t.port} HTTP/1.1\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:f})}e.on("error",y),e.on("end",_),a()})}g.parseProxyResponse=le});var ge=r(function(l){var he=l&&l.__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=l&&l.__setModuleDefault||(Object.create?function(e,t){Object.defineProperty(e,"default",{enumerable:!0,value:t})}:function(e,t){e.default=t}),W=l&&l.__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=l&&l.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(l,"__esModule",{value:!0});l.HttpsProxyAgent=void 0;var w=W(p("net")),F=W(p("tls")),pe=G(p("assert")),_e=G(Gt()),Q=U(),V=p("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},a=w.isIPv6(t.host)?`[${t.host}]`:t.host,i=`CONNECT ${a}:${t.port} HTTP/1.1\r
7
7
  `;if(n.username||n.password){let f=`${decodeURIComponent(n.username)}:${decodeURIComponent(n.password)}`;s["Proxy-Authorization"]=`Basic ${Buffer.from(f).toString("base64")}`}if(s.Host=`${a}:${t.port}`,!s["Proxy-Connection"])s["Proxy-Connection"]=this.keepAlive?"Keep-Alive":"close";for(let f of Object.keys(s))i+=`${f}: ${s[f]}\r
8
8
  `;let _=X.parseProxyResponse(o);o.write(`${i}\r
9
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 h=new w.Socket({writable:!1});return h.readable=!0,e.once("socket",(f)=>{O("Replaying proxy buffer for failed request"),(0,pe.default)(f.listenerCount("data")>0),f.push(j),f.push(null)}),h}}x.protocols=["http","https"];l.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();
@@ -1,5 +1,5 @@
1
1
  // @bun
2
- import{Database as E}from"bun:sqlite";import{chmodSync as R,closeSync as I,existsSync as T,openSync as m,rmSync as N}from"fs";var S=2,g=2,cs="basalt-search.db",Xe=0,At=1;function c(t){let e=new E(":memory:");try{for(let r of t)e.run(r);return!0}catch{return!1}finally{e.close()}}var u;function us(){if(u)return u;let t=c(["CREATE VIRTUAL TABLE f USING fts5(text)"]),e=t&&c(["CREATE VIRTUAL TABLE f USING fts5(text, tokenize='trigram')"]);return u={fts5:t,trigram:e,trigramDiacritics:e&&c(["CREATE VIRTUAL TABLE f USING fts5(text, tokenize='trigram remove_diacritics 1')"]),contentlessDelete:t&&c(["CREATE VIRTUAL TABLE f USING fts5(text, content='', contentless_delete=1)","INSERT INTO f (rowid, text) VALUES (1, 'probe')","DELETE FROM f WHERE rowid = 1"]),secureDelete:t&&c(["CREATE VIRTUAL TABLE f USING fts5(text)","INSERT INTO f (f, rank) VALUES ('secure-delete', 1)"])},u}function L(t){return{msg:t.trigram?"trigram":"unicode61",contentless:t.contentlessDelete}}function A(t){return JSON.stringify({schema:S,extractor:g,...t})}function p(t,e){return`text, ${t.contentless?"content='', contentless_delete=1, ":""}detail=full, tokenize="${e}"`}function d(t,e,r){let n=r.msg==="trigram"?e.trigramDiacritics?"trigram remove_diacritics 1":"trigram":"unicode61 remove_diacritics 2";t.transaction(()=>{if(t.run("CREATE TABLE IF NOT EXISTS meta (k TEXT PRIMARY KEY, v) WITHOUT ROWID"),t.run(`CREATE TABLE IF NOT EXISTS doc (
2
+ import{Database as E}from"bun:sqlite";import{chmodSync as R,closeSync as I,existsSync as T,openSync as m,rmSync as N}from"fs";var S=2,g=2,cs="basalt-search.db",Xe=0,Et=1;function c(t){let e=new E(":memory:");try{for(let r of t)e.run(r);return!0}catch{return!1}finally{e.close()}}var u;function us(){if(u)return u;let t=c(["CREATE VIRTUAL TABLE f USING fts5(text)"]),e=t&&c(["CREATE VIRTUAL TABLE f USING fts5(text, tokenize='trigram')"]);return u={fts5:t,trigram:e,trigramDiacritics:e&&c(["CREATE VIRTUAL TABLE f USING fts5(text, tokenize='trigram remove_diacritics 1')"]),contentlessDelete:t&&c(["CREATE VIRTUAL TABLE f USING fts5(text, content='', contentless_delete=1)","INSERT INTO f (rowid, text) VALUES (1, 'probe')","DELETE FROM f WHERE rowid = 1"]),secureDelete:t&&c(["CREATE VIRTUAL TABLE f USING fts5(text)","INSERT INTO f (f, rank) VALUES ('secure-delete', 1)"])},u}function L(t){return{msg:t.trigram?"trigram":"unicode61",contentless:t.contentlessDelete}}function A(t){return JSON.stringify({schema:S,extractor:g,...t})}function p(t,e){return`text, ${t.contentless?"content='', contentless_delete=1, ":""}detail=full, tokenize="${e}"`}function d(t,e,r){let n=r.msg==="trigram"?e.trigramDiacritics?"trigram remove_diacritics 1":"trigram":"unicode61 remove_diacritics 2";t.transaction(()=>{if(t.run("CREATE TABLE IF NOT EXISTS meta (k TEXT PRIMARY KEY, v) WITHOUT ROWID"),t.run(`CREATE TABLE IF NOT EXISTS doc (
3
3
  id INTEGER PRIMARY KEY,
4
4
  hash INTEGER NOT NULL UNIQUE,
5
5
  refs INTEGER NOT NULL,
@@ -18,8 +18,8 @@ import{Database as E}from"bun:sqlite";import{chmodSync as R,closeSync as I,exist
18
18
  PRIMARY KEY (session_id, seq, part)
19
19
  ) WITHOUT ROWID`),t.run("CREATE INDEX IF NOT EXISTS ref_doc ON ref(doc,time,kind,tool,err,model)"),t.run("CREATE INDEX IF NOT EXISTS ref_time ON ref(time,session_id,seq,part,doc,kind,tool,err,model)"),t.run("CREATE TABLE IF NOT EXISTS term (t TEXT PRIMARY KEY, n INTEGER NOT NULL) WITHOUT ROWID"),t.run("CREATE TABLE IF NOT EXISTS evicted (session_id TEXT PRIMARY KEY) WITHOUT ROWID"),t.run("CREATE TABLE IF NOT EXISTS backfill_todo (ord INTEGER PRIMARY KEY, session_id TEXT NOT NULL)"),t.run(`CREATE VIRTUAL TABLE IF NOT EXISTS fts USING fts5(${p(r,n)})`),t.run(`CREATE VIRTUAL TABLE IF NOT EXISTS fts_out USING fts5(${p(r,"unicode61 remove_diacritics 2")})`),t.run("CREATE VIRTUAL TABLE IF NOT EXISTS fts_vocab USING fts5vocab(fts, 'row')"),t.run("CREATE VIRTUAL TABLE IF NOT EXISTS fts_out_vocab USING fts5vocab(fts_out, 'row')"),e.secureDelete)t.run("INSERT INTO fts (fts, rank) VALUES ('secure-delete', 1)"),t.run("INSERT INTO fts_out (fts_out, rank) VALUES ('secure-delete', 1)");t.query("INSERT OR REPLACE INTO meta (k, v) VALUES ('fingerprint', ?)").run(A(r)),t.query("INSERT OR REPLACE INTO meta (k, v) VALUES ('layout', ?)").run(JSON.stringify(r))})()}function go(t){for(let e of["","-wal","-shm","-journal"])N(t+e,{force:!0})}function x(t){for(let e of["","-wal","-shm"])if(T(t+e))R(t+e,384)}function Tn(t,e){return t.query("SELECT v FROM main.meta WHERE k = ?").get(e)?.v??void 0}function rr(t,e,r){t.query("INSERT OR REPLACE INTO main.meta (k, v) VALUES (?, ?)").run(e,r)}function ps(t,e,r){let n=L(r),s=!1;if(T(t)){let i=!1;try{let a=new E(t);try{i=a.query("SELECT v FROM meta WHERE k = 'fingerprint'").get()?.v===A(n)}finally{a.close()}}catch{i=!1}if(!i)go(t),s=!0}if(!T(t))I(m(t,"a",384));let o=new E(t,{create:!0,strict:!0});return o.run("PRAGMA journal_mode = WAL"),o.run("PRAGMA synchronous = NORMAL"),o.run("PRAGMA busy_timeout = 5000"),d(o,r,n),x(t),o.query("ATTACH ? AS store").run(e),{db:o,layout:n,reset:s}}function ds(t,e){if(!T(t))return;let r;try{return r=new E(t,{readonly:!0,strict:!0}),r.run("PRAGMA busy_timeout = 5000"),r.query("ATTACH ? AS store").run(e),r.query("SELECT v FROM meta WHERE k = 'layout'").get(),r}catch{r?.close();return}}var ms=49152,hs=16384,gs=64;function f(t){if(t.length<=65536)return t;return`${t.slice(0,49152)}
20
20
  \u2026
21
- ${t.slice(-16384)}`}var O=/[\u3040-\u30FF\u3400-\u9FFF\uF900-\uFAFF\uAC00-\uD7AF]+/g,_=/[A-Za-z][a-z0-9]*(?:[A-Z][a-z0-9]+)+|[A-Z]{2,}[a-z0-9]+[A-Za-z0-9]*/g,U=/([a-z0-9])([A-Z])|([A-Z])([A-Z][a-z])/g;function yo(t){return t.replace(O,(e)=>{if(e.length===1)return` ${e} `;let r=[];for(let n=0;n<e.length-1;n++)r.push(e.slice(n,n+2));return` ${r.join(" ")} `}).replace(_,(e)=>`${e} ${e.replace(U,"$1$3 $2$4")}`)}function ys(t){return`${t} `}function Nt(t){return t.toLowerCase().normalize("NFD").replace(/[\u0300-\u036f]+/g,"").normalize("NFC")}var y=/[\p{L}\p{N}\p{Co}]+/gu;function bs(t){return Nt(yo(t)).match(y)??[]}var $e={user:1,assistant:2,thinking:3,tool_input:4,tool_output:5,error:6,extension:7,notice:8,attachment:9,title:10},bo=Object.fromEntries(Object.entries($e).map(([t,e])=>[e,t])),h=1e4,k=-1,C=2048;function Ss(t){return t==="tool_output"||t==="attachment"||t==="thinking"||t==="tool_input"}function l(t,e=[],r=0){if(r>6)return e;if(typeof t==="string")e.push(t);else if(typeof t==="number"||typeof t==="boolean")e.push(String(t));else if(Array.isArray(t))for(let n of t)l(n,e,r+1);else if(t&&typeof t==="object")for(let n of Object.values(t))l(n,e,r+1);return e}function ot(t,e=!1){let r=[];switch(t.type){case"user":{if(typeof t.text==="string")r.push({part:0,kind:t.notices?"notice":"user",text:t.text});(Array.isArray(t.attachments)?t.attachments:[]).forEach((s,o)=>{let i=String(s?.name??""),a=s?.kind==="image"?i:`${i}
21
+ ${t.slice(-16384)}`}var O=/[\u3040-\u30FF\u3400-\u9FFF\uF900-\uFAFF\uAC00-\uD7AF]+/g,_=/[A-Za-z][a-z0-9]*(?:[A-Z][a-z0-9]+)+|[A-Z]{2,}[a-z0-9]+[A-Za-z0-9]*/g,U=/([a-z0-9])([A-Z])|([A-Z])([A-Z][a-z])/g;function yo(t){return t.replace(O,(e)=>{if(e.length===1)return` ${e} `;let r=[];for(let n=0;n<e.length-1;n++)r.push(e.slice(n,n+2));return` ${r.join(" ")} `}).replace(_,(e)=>`${e} ${e.replace(U,"$1$3 $2$4")}`)}function ys(t){return`${t} `}function Dt(t){return t.toLowerCase().normalize("NFD").replace(/[\u0300-\u036f]+/g,"").normalize("NFC")}var y=/[\p{L}\p{N}\p{Co}]+/gu;function bs(t){return Dt(yo(t)).match(y)??[]}var $e={user:1,assistant:2,thinking:3,tool_input:4,tool_output:5,error:6,extension:7,notice:8,attachment:9,title:10},bo=Object.fromEntries(Object.entries($e).map(([t,e])=>[e,t])),h=1e4,k=-1,C=2048;function Ss(t){return t==="tool_output"||t==="attachment"||t==="thinking"||t==="tool_input"}function l(t,e=[],r=0){if(r>6)return e;if(typeof t==="string")e.push(t);else if(typeof t==="number"||typeof t==="boolean")e.push(String(t));else if(Array.isArray(t))for(let n of t)l(n,e,r+1);else if(t&&typeof t==="object")for(let n of Object.values(t))l(n,e,r+1);return e}function it(t,e=!1){let r=[];switch(t.type){case"user":{if(typeof t.text==="string")r.push({part:0,kind:t.notices?"notice":"user",text:t.text});(Array.isArray(t.attachments)?t.attachments:[]).forEach((s,o)=>{let i=String(s?.name??""),a=s?.kind==="image"?i:`${i}
22
22
  ${String(s?.data??"")}`;r.push({part:1+o,kind:"attachment",text:a})});break}case"notice_pending":if(typeof t.notice?.text==="string")r.push({part:0,kind:"notice",text:t.notice.text});break;case"assistant":{let n=typeof t.model==="string"?t.model:void 0;if((Array.isArray(t.parts)?t.parts:[]).forEach((o,i)=>{if(o?.type==="text"||o?.type==="thinking"){if(typeof o.text==="string")r.push({part:i,kind:o.type==="text"?"assistant":"thinking",text:o.text,model:n})}else if(o?.type==="tool_call"){let a=typeof o.name==="string"?o.name:void 0;if(r.push({part:i,kind:"tool_input",tool:a,model:n,text:[a??"",...l(o.input)].join(`
23
23
  `)}),typeof o.output==="string")r.push({part:h+i,kind:"tool_output",tool:a,model:n,text:o.output})}}),typeof t.error==="string")r.push({part:k,kind:"error",err:!0,model:n,text:t.error});break}case"tool_result":{let n=typeof t.name==="string"?t.name:void 0,s=typeof t.output==="string"?t.output:"",o=t.isError===!0;if(r.push({part:0,kind:"tool_output",tool:n,err:o,text:s}),o)r.push({part:1,kind:"error",tool:n,err:o,text:s.slice(0,C)});break}case"run":if("error"in t&&typeof t.error==="string")r.push({part:0,kind:"error",err:!0,text:t.error});break;case"extension":{let n=t.display;if(n&&typeof n.text==="string")r.push({part:0,kind:"extension",text:`${n.title??""}
24
24
  ${n.text}`});break}}if(!e)for(let n of r)n.text=f(n.text);return r.filter((n)=>n.text.trim())}function ws(t){return t.trim()?[{part:0,kind:"title",text:f(t)}]:[]}
25
- export{cs,Xe,At,us,go,Tn,rr,ps,ds,ms,hs,gs,yo,ys,Nt,bs,$e,bo,Ss,ot,ws};
25
+ export{cs,Xe,Et,us,go,Tn,rr,ps,ds,ms,hs,gs,yo,ys,Dt,bs,$e,bo,Ss,it,ws};
@@ -1,3 +1,3 @@
1
1
  // @bun
2
- import{h,f,g,Ii}from"./chunk-agb771ak.js";import{b,ue}from"./chunk-t3mq64c8.js";import{ie,Ue,d}from"./chunk-fgjw0r6g.js";var l=function(e,t){if(typeof e==="string"&&/^\.\.?\//.test(e))return e.replace(/\.(tsx)$|((?:\.d)?)((?:\.[^./]+?)?)\.([cm]?)ts$/i,function(i,c,p,s,n){return c?t?".jsx":".js":p&&(!s||!n)?i:p+s+"."+n.toLowerCase()+"js"});return e},x=null,T=null,y=null,o=(e)=>import(l(e)),A="node:fs",R="node:os",P="node:path";if(typeof process<"u"&&(process.versions?.node||process.versions?.bun))o(A).then((e)=>{x=e.existsSync}),o(R).then((e)=>{T=e.homedir}),o(P).then((e)=>{y=e.join});var Bo="ANTHROPIC_AUTH_TOKEN",vi="ANTHROPIC_OAUTH_TOKEN",_i="ANTHROPIC_API_KEY",Jr="ANTHROPIC_FEDERATION_RULE_ID",Xr="ANTHROPIC_ORGANIZATION_ID",Yr="ANTHROPIC_SERVICE_ACCOUNT_ID",Zr="ANTHROPIC_IDENTITY_TOKEN_FILE",en="ANTHROPIC_WORKSPACE_ID";var _=()=>ie(()=>import("./chunk-jzya0e5n.js"));var ye=()=>ie(()=>import("./chunk-s819vmwh.js"));var r=()=>({classify:async(e,t,i)=>(await import("./chunk-1tbv5t08.js")).classify(e,t,i)});var a={"openai-decisions":{"classifier:gpt-6-luna":{type:"classifier",id:"gpt-6-luna",name:"GPT-6 Luna",api:"openai-decisions",provider:"openai",baseUrl:"https://api.openai.com/v1",input:["text","image"],cost:{input:0.1,output:0,cacheRead:0,cacheWrite:0,tiers:[{inputTokensAbove:272000,input:0.2,output:0,cacheRead:0,cacheWrite:0}]},contextWindow:922000}},"openai-responses":{"chat:gpt-4":{id:"gpt-4",name:"GPT-4",api:"openai-responses",provider:"openai",baseUrl:"https://api.openai.com/v1",reasoning:!1,input:["text"],cost:{input:30,output:60,cacheRead:0,cacheWrite:0},contextWindow:8192,maxTokens:8192,compat:{supportsStrictMode:!0},type:"chat"},"chat:gpt-4-turbo":{id:"gpt-4-turbo",name:"GPT-4 Turbo",api:"openai-responses",provider:"openai",baseUrl:"https://api.openai.com/v1",reasoning:!1,input:["text","image"],cost:{input:10,output:30,cacheRead:0,cacheWrite:0},contextWindow:128000,maxTokens:4096,compat:{supportsStrictMode:!0},inputLimits:{maxRequestBytes:536870912,images:{maxPerRequest:1500,resize:{maxWidth:2000,maxHeight:2000,maxBytes:4718592,jpegQuality:80}}},type:"chat"},"chat:gpt-4.1":{id:"gpt-4.1",name:"GPT-4.1",api:"openai-responses",provider:"openai",baseUrl:"https://api.openai.com/v1",reasoning:!1,input:["text","image"],cost:{input:2,output:8,cacheRead:0.5,cacheWrite:0},contextWindow:1047576,maxTokens:32768,compat:{supportsStrictMode:!0},inputLimits:{maxRequestBytes:536870912,images:{maxPerRequest:1500,resize:{maxWidth:2000,maxHeight:2000,maxBytes:4718592,jpegQuality:80}}},type:"chat"},"chat:gpt-4.1-mini":{id:"gpt-4.1-mini",name:"GPT-4.1 mini",api:"openai-responses",provider:"openai",baseUrl:"https://api.openai.com/v1",reasoning:!1,input:["text","image"],cost:{input:0.4,output:1.6,cacheRead:0.1,cacheWrite:0},contextWindow:1047576,maxTokens:32768,compat:{supportsStrictMode:!0},inputLimits:{maxRequestBytes:536870912,images:{maxPerRequest:1500,resize:{maxWidth:2000,maxHeight:2000,maxBytes:4718592,jpegQuality:80}}},type:"chat"},"chat:gpt-4.1-nano":{id:"gpt-4.1-nano",name:"GPT-4.1 nano",api:"openai-responses",provider:"openai",baseUrl:"https://api.openai.com/v1",reasoning:!1,input:["text","image"],cost:{input:0.1,output:0.4,cacheRead:0.025,cacheWrite:0},contextWindow:1047576,maxTokens:32768,compat:{supportsStrictMode:!0},inputLimits:{maxRequestBytes:536870912,images:{maxPerRequest:1500,resize:{maxWidth:2000,maxHeight:2000,maxBytes:4718592,jpegQuality:80}}},type:"chat"},"chat:gpt-4o":{id:"gpt-4o",name:"GPT-4o",api:"openai-responses",provider:"openai",baseUrl:"https://api.openai.com/v1",reasoning:!1,input:["text","image"],cost:{input:2.5,output:10,cacheRead:1.25,cacheWrite:0},contextWindow:128000,maxTokens:16384,compat:{supportsStrictMode:!0},inputLimits:{maxRequestBytes:536870912,images:{maxPerRequest:1500,resize:{maxWidth:2000,maxHeight:2000,maxBytes:4718592,jpegQuality:80}}},type:"chat"},"chat:gpt-4o-2024-05-13":{id:"gpt-4o-2024-05-13",name:"GPT-4o (2024-05-13)",api:"openai-responses",provider:"openai",baseUrl:"https://api.openai.com/v1",reasoning:!1,input:["text","image"],cost:{input:5,output:15,cacheRead:0,cacheWrite:0},contextWindow:128000,maxTokens:4096,compat:{supportsStrictMode:!0},inputLimits:{maxRequestBytes:536870912,images:{maxPerRequest:1500,resize:{maxWidth:2000,maxHeight:2000,maxBytes:4718592,jpegQuality:80}}},type:"chat"},"chat:gpt-4o-2024-08-06":{id:"gpt-4o-2024-08-06",name:"GPT-4o (2024-08-06)",api:"openai-responses",provider:"openai",baseUrl:"https://api.openai.com/v1",reasoning:!1,input:["text","image"],cost:{input:2.5,output:10,cacheRead:1.25,cacheWrite:0},contextWindow:128000,maxTokens:16384,compat:{supportsStrictMode:!0},inputLimits:{maxRequestBytes:536870912,images:{maxPerRequest:1500,resize:{maxWidth:2000,maxHeight:2000,maxBytes:4718592,jpegQuality:80}}},type:"chat"},"chat:gpt-4o-2024-11-20":{id:"gpt-4o-2024-11-20",name:"GPT-4o (2024-11-20)",api:"openai-responses",provider:"openai",baseUrl:"https://api.openai.com/v1",reasoning:!1,input:["text","image"],cost:{input:2.5,output:10,cacheRead:1.25,cacheWrite:0},contextWindow:128000,maxTokens:16384,compat:{supportsStrictMode:!0},inputLimits:{maxRequestBytes:536870912,images:{maxPerRequest:1500,resize:{maxWidth:2000,maxHeight:2000,maxBytes:4718592,jpegQuality:80}}},type:"chat"},"chat:gpt-4o-mini":{id:"gpt-4o-mini",name:"GPT-4o mini",api:"openai-responses",provider:"openai",baseUrl:"https://api.openai.com/v1",reasoning:!1,input:["text","image"],cost:{input:0.15,output:0.6,cacheRead:0.075,cacheWrite:0},contextWindow:128000,maxTokens:16384,compat:{supportsStrictMode:!0},inputLimits:{maxRequestBytes:536870912,images:{maxPerRequest:1500,resize:{maxWidth:2000,maxHeight:2000,maxBytes:4718592,jpegQuality:80}}},type:"chat"},"chat:gpt-5":{id:"gpt-5",name:"GPT-5",api:"openai-responses",provider:"openai",baseUrl:"https://api.openai.com/v1",reasoning:!0,input:["text","image"],cost:{input:1.25,output:10,cacheRead:0.125,cacheWrite:0},contextWindow:400000,maxTokens:128000,thinkingLevelMap:{off:null,minimal:"minimal",low:"low",medium:"medium",high:"high",xhigh:null,max:null},compat:{supportsStrictMode:!0,supportsOpenAIGrammarTools:!0},inputLimits:{maxRequestBytes:536870912,images:{maxPerRequest:1500,resize:{maxWidth:2000,maxHeight:2000,maxBytes:4718592,jpegQuality:80}}},type:"chat"},"chat:gpt-5-chat-latest":{id:"gpt-5-chat-latest",name:"GPT-5 Chat Latest",api:"openai-responses",baseUrl:"https://api.openai.com/v1",provider:"openai",reasoning:!1,input:["text","image"],cost:{input:1.25,output:10,cacheRead:0.125,cacheWrite:0},contextWindow:128000,maxTokens:16384,thinkingLevelMap:{off:null},compat:{supportsStrictMode:!0,supportsOpenAIGrammarTools:!0},inputLimits:{maxRequestBytes:536870912,images:{maxPerRequest:1500,resize:{maxWidth:2000,maxHeight:2000,maxBytes:4718592,jpegQuality:80}}},type:"chat"},"chat:gpt-5-mini":{id:"gpt-5-mini",name:"GPT-5 Mini",api:"openai-responses",provider:"openai",baseUrl:"https://api.openai.com/v1",reasoning:!0,input:["text","image"],cost:{input:0.25,output:2,cacheRead:0.025,cacheWrite:0},contextWindow:400000,maxTokens:128000,thinkingLevelMap:{off:null,minimal:"minimal",low:"low",medium:"medium",high:"high",xhigh:null,max:null},compat:{supportsStrictMode:!0,supportsOpenAIGrammarTools:!0},inputLimits:{maxRequestBytes:536870912,images:{maxPerRequest:1500,resize:{maxWidth:2000,maxHeight:2000,maxBytes:4718592,jpegQuality:80}}},type:"chat"},"chat:gpt-5-nano":{id:"gpt-5-nano",name:"GPT-5 Nano",api:"openai-responses",provider:"openai",baseUrl:"https://api.openai.com/v1",reasoning:!0,input:["text","image"],cost:{input:0.05,output:0.4,cacheRead:0.005,cacheWrite:0},contextWindow:400000,maxTokens:128000,thinkingLevelMap:{off:null,minimal:"minimal",low:"low",medium:"medium",high:"high",xhigh:null,max:null},compat:{supportsStrictMode:!0,supportsOpenAIGrammarTools:!0},inputLimits:{maxRequestBytes:536870912,images:{maxPerRequest:1500,resize:{maxWidth:2000,maxHeight:2000,maxBytes:4718592,jpegQuality:80}}},type:"chat"},"chat:gpt-5-pro":{id:"gpt-5-pro",name:"GPT-5 Pro",api:"openai-responses",provider:"openai",baseUrl:"https://api.openai.com/v1",reasoning:!0,input:["text","image"],cost:{input:15,output:120,cacheRead:0,cacheWrite:0},contextWindow:400000,maxTokens:128000,thinkingLevelMap:{off:null,minimal:null,low:null,medium:null,high:"high",xhigh:null,max:null},compat:{supportsStrictMode:!0,supportsOpenAIGrammarTools:!0},inputLimits:{maxRequestBytes:536870912,images:{maxPerRequest:1500,resize:{maxWidth:2000,maxHeight:2000,maxBytes:4718592,jpegQuality:80}}},type:"chat"},"chat:gpt-5.1":{id:"gpt-5.1",name:"GPT-5.1",api:"openai-responses",provider:"openai",baseUrl:"https://api.openai.com/v1",reasoning:!0,input:["text","image"],cost:{input:1.25,output:10,cacheRead:0.125,cacheWrite:0},contextWindow:400000,maxTokens:128000,thinkingLevelMap:{off:"none",minimal:null,low:"low",medium:"medium",high:"high",xhigh:null,max:null},compat:{supportsStrictMode:!0,supportsOpenAIGrammarTools:!0},inputLimits:{maxRequestBytes:536870912,images:{maxPerRequest:1500,resize:{maxWidth:2000,maxHeight:2000,maxBytes:4718592,jpegQuality:80}}},type:"chat"},"chat:gpt-5.2":{id:"gpt-5.2",name:"GPT-5.2",api:"openai-responses",provider:"openai",baseUrl:"https://api.openai.com/v1",reasoning:!0,input:["text","image"],cost:{input:1.75,output:14,cacheRead:0.175,cacheWrite:0},contextWindow:400000,maxTokens:128000,thinkingLevelMap:{off:"none",minimal:null,low:"low",medium:"medium",high:"high",xhigh:"xhigh",max:null},compat:{supportsStrictMode:!0,supportsOpenAIGrammarTools:!0},inputLimits:{maxRequestBytes:536870912,images:{maxPerRequest:1500,resize:{maxWidth:2000,maxHeight:2000,maxBytes:4718592,jpegQuality:80}}},type:"chat"},"chat:gpt-5.2-chat-latest":{id:"gpt-5.2-chat-latest",name:"GPT-5.2 Chat",api:"openai-responses",provider:"openai",baseUrl:"https://api.openai.com/v1",reasoning:!0,input:["text","image"],cost:{input:1.75,output:14,cacheRead:0.175,cacheWrite:0},contextWindow:128000,maxTokens:16384,thinkingLevelMap:{off:null,minimal:null,low:null,medium:"medium",high:null,xhigh:"xhigh",max:null},compat:{supportsStrictMode:!0,supportsOpenAIGrammarTools:!0},inputLimits:{maxRequestBytes:536870912,images:{maxPerRequest:1500,resize:{maxWidth:2000,maxHeight:2000,maxBytes:4718592,jpegQuality:80}}},type:"chat"},"chat:gpt-5.2-pro":{id:"gpt-5.2-pro",name:"GPT-5.2 Pro",api:"openai-responses",provider:"openai",baseUrl:"https://api.openai.com/v1",reasoning:!0,input:["text","image"],cost:{input:21,output:168,cacheRead:0,cacheWrite:0},contextWindow:400000,maxTokens:128000,thinkingLevelMap:{off:null,minimal:null,low:null,medium:"medium",high:"high",xhigh:"xhigh",max:null},compat:{supportsStrictMode:!0,supportsOpenAIGrammarTools:!0},inputLimits:{maxRequestBytes:536870912,images:{maxPerRequest:1500,resize:{maxWidth:2000,maxHeight:2000,maxBytes:4718592,jpegQuality:80}}},type:"chat"},"chat:gpt-5.3-chat-latest":{id:"gpt-5.3-chat-latest",name:"GPT-5.3 Chat (latest)",api:"openai-responses",provider:"openai",baseUrl:"https://api.openai.com/v1",reasoning:!1,input:["text","image"],cost:{input:1.75,output:14,cacheRead:0.175,cacheWrite:0},contextWindow:128000,maxTokens:16384,thinkingLevelMap:{off:null,xhigh:"xhigh"},compat:{supportsStrictMode:!0,supportsOpenAIGrammarTools:!0},inputLimits:{maxRequestBytes:536870912,images:{maxPerRequest:1500,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:"openai",baseUrl:"https://api.openai.com/v1",reasoning:!0,input:["text","image"],cost:{input:1.75,output:14,cacheRead:0.175,cacheWrite:0},contextWindow:400000,maxTokens:128000,thinkingLevelMap:{off:"none",minimal:null,low:"low",medium:"medium",high:"high",xhigh:"xhigh",max:null},compat:{supportsStrictMode:!0,supportsOpenAIGrammarTools:!0},inputLimits:{maxRequestBytes:536870912,images:{maxPerRequest:1500,resize:{maxWidth:2000,maxHeight:2000,maxBytes:4718592,jpegQuality:80}}},type:"chat"},"chat:gpt-5.3-codex-spark":{id:"gpt-5.3-codex-spark",name:"GPT-5.3 Codex Spark",api:"openai-responses",provider:"openai",baseUrl:"https://api.openai.com/v1",reasoning:!0,input:["text","image"],cost:{input:1.75,output:14,cacheRead:0.175,cacheWrite:0},contextWindow:128000,maxTokens:32000,thinkingLevelMap:{off:null,minimal:null,low:"low",medium:"medium",high:"high",xhigh:"xhigh",max:null},compat:{supportsStrictMode:!0,supportsOpenAIGrammarTools:!0},inputLimits:{maxRequestBytes:536870912,images:{maxPerRequest:1500,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:"openai",baseUrl:"https://api.openai.com/v1",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:272000,maxTokens:128000,thinkingLevelMap:{off:"none",minimal:null,low:"low",medium:"medium",high:"high",xhigh:"xhigh",max:null},compat:{supportsStrictMode:!0,supportsOpenAIGrammarTools:!0,supportsAdditionalTools:!0,supportsToolSearch:!0,supportsMidConvoSystemMessages:!0},inputLimits:{maxRequestBytes:536870912,images:{maxPerRequest:1500,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:"openai",baseUrl:"https://api.openai.com/v1",reasoning:!0,input:["text","image"],cost:{input:0.75,output:4.5,cacheRead:0.075,cacheWrite:0},contextWindow:400000,maxTokens:128000,thinkingLevelMap:{off:"none",minimal:null,low:"low",medium:"medium",high:"high",xhigh:"xhigh",max:null},compat:{supportsStrictMode:!0,supportsOpenAIGrammarTools:!0,supportsAdditionalTools:!0,supportsToolSearch:!0,supportsMidConvoSystemMessages:!0},inputLimits:{maxRequestBytes:536870912,images:{maxPerRequest:1500,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:"openai",baseUrl:"https://api.openai.com/v1",reasoning:!0,input:["text","image"],cost:{input:0.2,output:1.25,cacheRead:0.02,cacheWrite:0},contextWindow:400000,maxTokens:128000,thinkingLevelMap:{off:"none",minimal:null,low:"low",medium:"medium",high:"high",xhigh:"xhigh",max:null},compat:{supportsStrictMode:!0,supportsOpenAIGrammarTools:!0},inputLimits:{maxRequestBytes:536870912,images:{maxPerRequest:1500,resize:{maxWidth:2000,maxHeight:2000,maxBytes:4718592,jpegQuality:80}}},type:"chat"},"chat:gpt-5.4-pro":{id:"gpt-5.4-pro",name:"GPT-5.4 Pro",api:"openai-responses",provider:"openai",baseUrl:"https://api.openai.com/v1",reasoning:!0,input:["text","image"],cost:{input:30,output:180,cacheRead:0,cacheWrite:0,tiers:[{inputTokensAbove:272000,input:60,output:270,cacheRead:0,cacheWrite:0}]},contextWindow:1050000,maxTokens:128000,thinkingLevelMap:{off:null,minimal:null,low:null,medium:"medium",high:"high",xhigh:"xhigh",max:null},compat:{supportsStrictMode:!0,supportsOpenAIGrammarTools:!0,supportsAdditionalTools:!0,supportsToolSearch:!0,supportsMidConvoSystemMessages:!0},inputLimits:{maxRequestBytes:536870912,images:{maxPerRequest:1500,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:"openai",baseUrl:"https://api.openai.com/v1",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:272000,maxTokens:128000,thinkingLevelMap:{off:"none",minimal:null,low:"low",medium:"medium",high:"high",xhigh:"xhigh",max:null},compat:{supportsStrictMode:!0,supportsOpenAIGrammarTools:!0,supportsAdditionalTools:!0,supportsToolSearch:!0,supportsMidConvoSystemMessages:!0},inputLimits:{maxRequestBytes:536870912,images:{maxPerRequest:1500,resize:{maxWidth:2000,maxHeight:2000,maxBytes:4718592,jpegQuality:80}}},type:"chat"},"chat:gpt-5.5-pro":{id:"gpt-5.5-pro",name:"GPT-5.5 Pro",api:"openai-responses",provider:"openai",baseUrl:"https://api.openai.com/v1",reasoning:!0,input:["text","image"],cost:{input:30,output:180,cacheRead:0,cacheWrite:0,tiers:[{inputTokensAbove:272000,input:60,output:270,cacheRead:0,cacheWrite:0}]},contextWindow:1050000,maxTokens:128000,thinkingLevelMap:{off:null,minimal:null,low:null,medium:"medium",high:"high",xhigh:"xhigh",max:null},compat:{supportsStrictMode:!0,supportsOpenAIGrammarTools:!0},inputLimits:{maxRequestBytes:536870912,images:{maxPerRequest:1500,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:"openai",baseUrl:"https://api.openai.com/v1",reasoning:!0,input:["text","image"],cost:{input:0.2,output:1.2,cacheRead:0.02,cacheWrite:0.25,tiers:[{inputTokensAbove:272000,input:0.4,output:1.8,cacheRead:0.04,cacheWrite:0.5}]},contextWindow:272000,maxTokens:128000,thinkingLevelMap:{off:"none",minimal:null,low:"low",medium:"medium",high:"high",xhigh:"xhigh",max:"max"},compat:{supportsStrictMode:!0,supportsOpenAIGrammarTools:!0,supportsAdditionalTools:!0,supportsToolSearch:!0,supportsMidConvoSystemMessages:!0,supportsExplicitPromptCacheMode:!0},inputLimits:{maxRequestBytes:536870912,images:{maxPerRequest:1500,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:"openai",baseUrl:"https://api.openai.com/v1",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:272000,maxTokens:128000,thinkingLevelMap:{off:"none",minimal:null,low:"low",medium:"medium",high:"high",xhigh:"xhigh",max:"max"},compat:{supportsStrictMode:!0,supportsOpenAIGrammarTools:!0,supportsAdditionalTools:!0,supportsToolSearch:!0,supportsMidConvoSystemMessages:!0,supportsExplicitPromptCacheMode:!0},inputLimits:{maxRequestBytes:536870912,images:{maxPerRequest:1500,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:"openai",baseUrl:"https://api.openai.com/v1",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:272000,maxTokens:128000,thinkingLevelMap:{off:"none",minimal:null,low:"low",medium:"medium",high:"high",xhigh:"xhigh",max:"max"},compat:{supportsStrictMode:!0,supportsOpenAIGrammarTools:!0,supportsAdditionalTools:!0,supportsToolSearch:!0,supportsMidConvoSystemMessages:!0,supportsExplicitPromptCacheMode:!0},inputLimits:{maxRequestBytes:536870912,images:{maxPerRequest:1500,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:"openai",baseUrl:"https://api.openai.com/v1",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:272000,maxTokens:128000,thinkingLevelMap:{off:null,minimal:null,low:"low",medium:"medium",high:"high",xhigh:"xhigh",max:"max"},compat:{supportsStrictMode:!0,supportsOpenAIGrammarTools:!0,supportsAdditionalTools:!0,supportsToolSearch:!0,supportsMidConvoSystemMessages:!0,supportsExplicitPromptCacheMode:!0},inputLimits:{maxRequestBytes:536870912,images:{maxPerRequest:1500,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:"openai",baseUrl:"https://api.openai.com/v1",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:272000,maxTokens:128000,thinkingLevelMap:{off:"none",minimal:null,low:"low",medium:"medium",high:"high",xhigh:"xhigh",max:"max"},compat:{supportsStrictMode:!0,supportsOpenAIGrammarTools:!0,supportsAdditionalTools:!0,supportsToolSearch:!0,supportsMidConvoSystemMessages:!0,supportsExplicitPromptCacheMode:!0},inputLimits:{maxRequestBytes:536870912,images:{maxPerRequest:1500,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:"openai",baseUrl:"https://api.openai.com/v1",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:272000,maxTokens:128000,thinkingLevelMap:{off:"none",minimal:null,low:"low",medium:"medium",high:"high",xhigh:"xhigh",max:"max"},compat:{supportsStrictMode:!0,supportsOpenAIGrammarTools:!0,supportsAdditionalTools:!0,supportsToolSearch:!0,supportsMidConvoSystemMessages:!0,supportsExplicitPromptCacheMode:!0},inputLimits:{maxRequestBytes:536870912,images:{maxPerRequest:1500,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:"openai",baseUrl:"https://api.openai.com/v1",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:272000,maxTokens:128000,thinkingLevelMap:{off:null,minimal:null,low:"low",medium:"medium",high:"high",xhigh:"xhigh",max:"max"},compat:{supportsStrictMode:!0,supportsOpenAIGrammarTools:!0,supportsAdditionalTools:!0,supportsToolSearch:!0,supportsMidConvoSystemMessages:!0,supportsExplicitPromptCacheMode:!0},inputLimits:{maxRequestBytes:536870912,images:{maxPerRequest:1500,resize:{maxWidth:2000,maxHeight:2000,maxBytes:4718592,jpegQuality:80}}},type:"chat"},"chat:gpt-daybreak-blue-latest":{id:"gpt-daybreak-blue-latest",name:"Daybreak Blue",api:"openai-responses",provider:"openai",baseUrl:"https://api.openai.com/v1",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,thinkingLevelMap:{off:"none",minimal:null,low:"low",medium:"medium",high:"high",xhigh:"xhigh",max:"max"},compat:{supportsStrictMode:!0,supportsExplicitPromptCacheMode:!0},inputLimits:{maxRequestBytes:536870912,images:{maxPerRequest:1500,resize:{maxWidth:2000,maxHeight:2000,maxBytes:4718592,jpegQuality:80}}},type:"chat"},"chat:gpt-daybreak-red-latest":{id:"gpt-daybreak-red-latest",name:"Daybreak Red",api:"openai-responses",provider:"openai",baseUrl:"https://api.openai.com/v1",reasoning:!0,input:["text","image"],cost:{input:12.5,output:75,cacheRead:1.25,cacheWrite:15.625},contextWindow:400000,maxTokens:128000,thinkingLevelMap:{off:"none",minimal:null,low:"low",medium:"medium",high:"high",xhigh:"xhigh",max:"max"},compat:{supportsStrictMode:!0,supportsExplicitPromptCacheMode:!0},inputLimits:{maxRequestBytes:536870912,images:{maxPerRequest:1500,resize:{maxWidth:2000,maxHeight:2000,maxBytes:4718592,jpegQuality:80}}},type:"chat"},"chat:gpt-realtime-2.1":{id:"gpt-realtime-2.1",name:"GPT-Realtime-2.1",api:"openai-responses",provider:"openai",baseUrl:"https://api.openai.com/v1",reasoning:!0,input:["text","image"],cost:{input:4,output:24,cacheRead:0.4,cacheWrite:0},contextWindow:128000,maxTokens:32000,thinkingLevelMap:{off:null,minimal:"minimal",low:"low",medium:"medium",high:"high",xhigh:"xhigh",max:null},compat:{supportsStrictMode:!0},inputLimits:{maxRequestBytes:536870912,images:{maxPerRequest:1500,resize:{maxWidth:2000,maxHeight:2000,maxBytes:4718592,jpegQuality:80}}},type:"chat"},"chat:o1":{id:"o1",name:"o1",api:"openai-responses",provider:"openai",baseUrl:"https://api.openai.com/v1",reasoning:!0,input:["text","image"],cost:{input:15,output:60,cacheRead:7.5,cacheWrite:0},contextWindow:200000,maxTokens:1e5,thinkingLevelMap:{off:null,minimal:null,low:"low",medium:"medium",high:"high",xhigh:null,max:null},compat:{supportsStrictMode:!0},inputLimits:{maxRequestBytes:536870912,images:{maxPerRequest:1500,resize:{maxWidth:2000,maxHeight:2000,maxBytes:4718592,jpegQuality:80}}},type:"chat"},"chat:o1-pro":{id:"o1-pro",name:"o1-pro",api:"openai-responses",provider:"openai",baseUrl:"https://api.openai.com/v1",reasoning:!0,input:["text","image"],cost:{input:150,output:600,cacheRead:0,cacheWrite:0},contextWindow:200000,maxTokens:1e5,thinkingLevelMap:{off:null,minimal:null,low:"low",medium:"medium",high:"high",xhigh:null,max:null},compat:{supportsStrictMode:!0},inputLimits:{maxRequestBytes:536870912,images:{maxPerRequest:1500,resize:{maxWidth:2000,maxHeight:2000,maxBytes:4718592,jpegQuality:80}}},type:"chat"},"chat:o3":{id:"o3",name:"o3",api:"openai-responses",provider:"openai",baseUrl:"https://api.openai.com/v1",reasoning:!0,input:["text","image"],cost:{input:2,output:8,cacheRead:0.5,cacheWrite:0},contextWindow:200000,maxTokens:1e5,thinkingLevelMap:{off:null,minimal:null,low:"low",medium:"medium",high:"high",xhigh:null,max:null},compat:{supportsStrictMode:!0},inputLimits:{maxRequestBytes:536870912,images:{maxPerRequest:1500,resize:{maxWidth:2000,maxHeight:2000,maxBytes:4718592,jpegQuality:80}}},type:"chat"},"chat:o3-mini":{id:"o3-mini",name:"o3-mini",api:"openai-responses",provider:"openai",baseUrl:"https://api.openai.com/v1",reasoning:!0,input:["text"],cost:{input:1.1,output:4.4,cacheRead:0.55,cacheWrite:0},contextWindow:200000,maxTokens:1e5,thinkingLevelMap:{off:null,minimal:null,low:"low",medium:"medium",high:"high",xhigh:null,max:null},compat:{supportsStrictMode:!0},type:"chat"},"chat:o3-pro":{id:"o3-pro",name:"o3-pro",api:"openai-responses",provider:"openai",baseUrl:"https://api.openai.com/v1",reasoning:!0,input:["text","image"],cost:{input:20,output:80,cacheRead:0,cacheWrite:0},contextWindow:200000,maxTokens:1e5,thinkingLevelMap:{off:null,minimal:null,low:"low",medium:"medium",high:"high",xhigh:null,max:null},compat:{supportsStrictMode:!0},inputLimits:{maxRequestBytes:536870912,images:{maxPerRequest:1500,resize:{maxWidth:2000,maxHeight:2000,maxBytes:4718592,jpegQuality:80}}},type:"chat"},"chat:o4-mini":{id:"o4-mini",name:"o4-mini",api:"openai-responses",provider:"openai",baseUrl:"https://api.openai.com/v1",reasoning:!0,input:["text","image"],cost:{input:1.1,output:4.4,cacheRead:0.275,cacheWrite:0},contextWindow:200000,maxTokens:1e5,thinkingLevelMap:{off:null,minimal:null,low:"low",medium:"medium",high:"high",xhigh:null,max:null},compat:{supportsStrictMode:!0},inputLimits:{maxRequestBytes:536870912,images:{maxPerRequest:1500,resize:{maxWidth:2000,maxHeight:2000,maxBytes:4718592,jpegQuality:80}}},type:"chat"}}};var m=h("openai",a),N=f("openai",a),u=g("openai",a);function tn(){return d({id:"openai",name:"OpenAI",baseUrl:"https://api.openai.com/v1",auth:{apiKey:b("OpenAI API key",["OPENAI_API_KEY"]),oauth:ue({name:"OpenAI (ChatGPT subscription)",isSubscription:!0,loginLabel:"Sign in with ChatGPT",load:Ii})},models:[...Object.values(m),...Object.values(u)],filterAllModels:(e,t)=>t?.type==="oauth"?e.filter((i)=>!Ue(i,"classifier")):e,api:ye(),classifiers:{"openai-decisions":r()}})}
3
- export{Bo,vi,_i,Jr,Xr,Yr,Zr,en,_,ye,tn};
2
+ import{h,f,g,Ii}from"./chunk-c5ydt3vq.js";import{b,ue}from"./chunk-t3mq64c8.js";import{ie,Ue,d}from"./chunk-35y6nf6k.js";var l=function(e,t){if(typeof e==="string"&&/^\.\.?\//.test(e))return e.replace(/\.(tsx)$|((?:\.d)?)((?:\.[^./]+?)?)\.([cm]?)ts$/i,function(i,c,p,s,n){return c?t?".jsx":".js":p&&(!s||!n)?i:p+s+"."+n.toLowerCase()+"js"});return e},x=null,T=null,y=null,o=(e)=>import(l(e)),R="node:fs",_="node:os",P="node:path";if(typeof process<"u"&&(process.versions?.node||process.versions?.bun))o(R).then((e)=>{x=e.existsSync}),o(_).then((e)=>{T=e.homedir}),o(P).then((e)=>{y=e.join});var Bo="ANTHROPIC_AUTH_TOKEN",vi="ANTHROPIC_OAUTH_TOKEN",_i="ANTHROPIC_API_KEY",Jr="ANTHROPIC_FEDERATION_RULE_ID",Xr="ANTHROPIC_ORGANIZATION_ID",Yr="ANTHROPIC_SERVICE_ACCOUNT_ID",Zr="ANTHROPIC_IDENTITY_TOKEN_FILE",en="ANTHROPIC_WORKSPACE_ID";var A=()=>ie(()=>import("./chunk-jy07y4pv.js"));var ye=()=>ie(()=>import("./chunk-g6cc7ac1.js"));var r=()=>({classify:async(e,t,i)=>(await import("./chunk-03b5jh31.js")).classify(e,t,i)});var a={"openai-decisions":{"classifier:gpt-6-luna":{type:"classifier",id:"gpt-6-luna",name:"GPT-6 Luna",api:"openai-decisions",provider:"openai",baseUrl:"https://api.openai.com/v1",input:["text","image"],cost:{input:0.1,output:0,cacheRead:0,cacheWrite:0,tiers:[{inputTokensAbove:272000,input:0.2,output:0,cacheRead:0,cacheWrite:0}]},contextWindow:922000}},"openai-responses":{"chat:gpt-4":{id:"gpt-4",name:"GPT-4",api:"openai-responses",provider:"openai",baseUrl:"https://api.openai.com/v1",reasoning:!1,input:["text"],cost:{input:30,output:60,cacheRead:0,cacheWrite:0},contextWindow:8192,maxTokens:8192,compat:{supportsStrictMode:!0},type:"chat"},"chat:gpt-4-turbo":{id:"gpt-4-turbo",name:"GPT-4 Turbo",api:"openai-responses",provider:"openai",baseUrl:"https://api.openai.com/v1",reasoning:!1,input:["text","image"],cost:{input:10,output:30,cacheRead:0,cacheWrite:0},contextWindow:128000,maxTokens:4096,compat:{supportsStrictMode:!0},inputLimits:{maxRequestBytes:536870912,images:{maxPerRequest:1500,resize:{maxWidth:2000,maxHeight:2000,maxBytes:4718592,jpegQuality:80}}},type:"chat"},"chat:gpt-4.1":{id:"gpt-4.1",name:"GPT-4.1",api:"openai-responses",provider:"openai",baseUrl:"https://api.openai.com/v1",reasoning:!1,input:["text","image"],cost:{input:2,output:8,cacheRead:0.5,cacheWrite:0},contextWindow:1047576,maxTokens:32768,compat:{supportsStrictMode:!0},inputLimits:{maxRequestBytes:536870912,images:{maxPerRequest:1500,resize:{maxWidth:2000,maxHeight:2000,maxBytes:4718592,jpegQuality:80}}},type:"chat"},"chat:gpt-4.1-mini":{id:"gpt-4.1-mini",name:"GPT-4.1 mini",api:"openai-responses",provider:"openai",baseUrl:"https://api.openai.com/v1",reasoning:!1,input:["text","image"],cost:{input:0.4,output:1.6,cacheRead:0.1,cacheWrite:0},contextWindow:1047576,maxTokens:32768,compat:{supportsStrictMode:!0},inputLimits:{maxRequestBytes:536870912,images:{maxPerRequest:1500,resize:{maxWidth:2000,maxHeight:2000,maxBytes:4718592,jpegQuality:80}}},type:"chat"},"chat:gpt-4.1-nano":{id:"gpt-4.1-nano",name:"GPT-4.1 nano",api:"openai-responses",provider:"openai",baseUrl:"https://api.openai.com/v1",reasoning:!1,input:["text","image"],cost:{input:0.1,output:0.4,cacheRead:0.025,cacheWrite:0},contextWindow:1047576,maxTokens:32768,compat:{supportsStrictMode:!0},inputLimits:{maxRequestBytes:536870912,images:{maxPerRequest:1500,resize:{maxWidth:2000,maxHeight:2000,maxBytes:4718592,jpegQuality:80}}},type:"chat"},"chat:gpt-4o":{id:"gpt-4o",name:"GPT-4o",api:"openai-responses",provider:"openai",baseUrl:"https://api.openai.com/v1",reasoning:!1,input:["text","image"],cost:{input:2.5,output:10,cacheRead:1.25,cacheWrite:0},contextWindow:128000,maxTokens:16384,compat:{supportsStrictMode:!0},inputLimits:{maxRequestBytes:536870912,images:{maxPerRequest:1500,resize:{maxWidth:2000,maxHeight:2000,maxBytes:4718592,jpegQuality:80}}},type:"chat"},"chat:gpt-4o-2024-05-13":{id:"gpt-4o-2024-05-13",name:"GPT-4o (2024-05-13)",api:"openai-responses",provider:"openai",baseUrl:"https://api.openai.com/v1",reasoning:!1,input:["text","image"],cost:{input:5,output:15,cacheRead:0,cacheWrite:0},contextWindow:128000,maxTokens:4096,compat:{supportsStrictMode:!0},inputLimits:{maxRequestBytes:536870912,images:{maxPerRequest:1500,resize:{maxWidth:2000,maxHeight:2000,maxBytes:4718592,jpegQuality:80}}},type:"chat"},"chat:gpt-4o-2024-08-06":{id:"gpt-4o-2024-08-06",name:"GPT-4o (2024-08-06)",api:"openai-responses",provider:"openai",baseUrl:"https://api.openai.com/v1",reasoning:!1,input:["text","image"],cost:{input:2.5,output:10,cacheRead:1.25,cacheWrite:0},contextWindow:128000,maxTokens:16384,compat:{supportsStrictMode:!0},inputLimits:{maxRequestBytes:536870912,images:{maxPerRequest:1500,resize:{maxWidth:2000,maxHeight:2000,maxBytes:4718592,jpegQuality:80}}},type:"chat"},"chat:gpt-4o-2024-11-20":{id:"gpt-4o-2024-11-20",name:"GPT-4o (2024-11-20)",api:"openai-responses",provider:"openai",baseUrl:"https://api.openai.com/v1",reasoning:!1,input:["text","image"],cost:{input:2.5,output:10,cacheRead:1.25,cacheWrite:0},contextWindow:128000,maxTokens:16384,compat:{supportsStrictMode:!0},inputLimits:{maxRequestBytes:536870912,images:{maxPerRequest:1500,resize:{maxWidth:2000,maxHeight:2000,maxBytes:4718592,jpegQuality:80}}},type:"chat"},"chat:gpt-4o-mini":{id:"gpt-4o-mini",name:"GPT-4o mini",api:"openai-responses",provider:"openai",baseUrl:"https://api.openai.com/v1",reasoning:!1,input:["text","image"],cost:{input:0.15,output:0.6,cacheRead:0.075,cacheWrite:0},contextWindow:128000,maxTokens:16384,compat:{supportsStrictMode:!0},inputLimits:{maxRequestBytes:536870912,images:{maxPerRequest:1500,resize:{maxWidth:2000,maxHeight:2000,maxBytes:4718592,jpegQuality:80}}},type:"chat"},"chat:gpt-5":{id:"gpt-5",name:"GPT-5",api:"openai-responses",provider:"openai",baseUrl:"https://api.openai.com/v1",reasoning:!0,input:["text","image"],cost:{input:1.25,output:10,cacheRead:0.125,cacheWrite:0},contextWindow:400000,maxTokens:128000,thinkingLevelMap:{off:null,minimal:"minimal",low:"low",medium:"medium",high:"high",xhigh:null,max:null},compat:{supportsStrictMode:!0,supportsOpenAIGrammarTools:!0},inputLimits:{maxRequestBytes:536870912,images:{maxPerRequest:1500,resize:{maxWidth:2000,maxHeight:2000,maxBytes:4718592,jpegQuality:80}}},type:"chat"},"chat:gpt-5-chat-latest":{id:"gpt-5-chat-latest",name:"GPT-5 Chat Latest",api:"openai-responses",baseUrl:"https://api.openai.com/v1",provider:"openai",reasoning:!1,input:["text","image"],cost:{input:1.25,output:10,cacheRead:0.125,cacheWrite:0},contextWindow:128000,maxTokens:16384,thinkingLevelMap:{off:null},compat:{supportsStrictMode:!0,supportsOpenAIGrammarTools:!0},inputLimits:{maxRequestBytes:536870912,images:{maxPerRequest:1500,resize:{maxWidth:2000,maxHeight:2000,maxBytes:4718592,jpegQuality:80}}},type:"chat"},"chat:gpt-5-mini":{id:"gpt-5-mini",name:"GPT-5 Mini",api:"openai-responses",provider:"openai",baseUrl:"https://api.openai.com/v1",reasoning:!0,input:["text","image"],cost:{input:0.25,output:2,cacheRead:0.025,cacheWrite:0},contextWindow:400000,maxTokens:128000,thinkingLevelMap:{off:null,minimal:"minimal",low:"low",medium:"medium",high:"high",xhigh:null,max:null},compat:{supportsStrictMode:!0,supportsOpenAIGrammarTools:!0},inputLimits:{maxRequestBytes:536870912,images:{maxPerRequest:1500,resize:{maxWidth:2000,maxHeight:2000,maxBytes:4718592,jpegQuality:80}}},type:"chat"},"chat:gpt-5-nano":{id:"gpt-5-nano",name:"GPT-5 Nano",api:"openai-responses",provider:"openai",baseUrl:"https://api.openai.com/v1",reasoning:!0,input:["text","image"],cost:{input:0.05,output:0.4,cacheRead:0.005,cacheWrite:0},contextWindow:400000,maxTokens:128000,thinkingLevelMap:{off:null,minimal:"minimal",low:"low",medium:"medium",high:"high",xhigh:null,max:null},compat:{supportsStrictMode:!0,supportsOpenAIGrammarTools:!0},inputLimits:{maxRequestBytes:536870912,images:{maxPerRequest:1500,resize:{maxWidth:2000,maxHeight:2000,maxBytes:4718592,jpegQuality:80}}},type:"chat"},"chat:gpt-5-pro":{id:"gpt-5-pro",name:"GPT-5 Pro",api:"openai-responses",provider:"openai",baseUrl:"https://api.openai.com/v1",reasoning:!0,input:["text","image"],cost:{input:15,output:120,cacheRead:0,cacheWrite:0},contextWindow:400000,maxTokens:128000,thinkingLevelMap:{off:null,minimal:null,low:null,medium:null,high:"high",xhigh:null,max:null},compat:{supportsStrictMode:!0,supportsOpenAIGrammarTools:!0},inputLimits:{maxRequestBytes:536870912,images:{maxPerRequest:1500,resize:{maxWidth:2000,maxHeight:2000,maxBytes:4718592,jpegQuality:80}}},type:"chat"},"chat:gpt-5.1":{id:"gpt-5.1",name:"GPT-5.1",api:"openai-responses",provider:"openai",baseUrl:"https://api.openai.com/v1",reasoning:!0,input:["text","image"],cost:{input:1.25,output:10,cacheRead:0.125,cacheWrite:0},contextWindow:400000,maxTokens:128000,thinkingLevelMap:{off:"none",minimal:null,low:"low",medium:"medium",high:"high",xhigh:null,max:null},compat:{supportsStrictMode:!0,supportsOpenAIGrammarTools:!0},inputLimits:{maxRequestBytes:536870912,images:{maxPerRequest:1500,resize:{maxWidth:2000,maxHeight:2000,maxBytes:4718592,jpegQuality:80}}},type:"chat"},"chat:gpt-5.2":{id:"gpt-5.2",name:"GPT-5.2",api:"openai-responses",provider:"openai",baseUrl:"https://api.openai.com/v1",reasoning:!0,input:["text","image"],cost:{input:1.75,output:14,cacheRead:0.175,cacheWrite:0},contextWindow:400000,maxTokens:128000,thinkingLevelMap:{off:"none",minimal:null,low:"low",medium:"medium",high:"high",xhigh:"xhigh",max:null},compat:{supportsStrictMode:!0,supportsOpenAIGrammarTools:!0},inputLimits:{maxRequestBytes:536870912,images:{maxPerRequest:1500,resize:{maxWidth:2000,maxHeight:2000,maxBytes:4718592,jpegQuality:80}}},type:"chat"},"chat:gpt-5.2-chat-latest":{id:"gpt-5.2-chat-latest",name:"GPT-5.2 Chat",api:"openai-responses",provider:"openai",baseUrl:"https://api.openai.com/v1",reasoning:!0,input:["text","image"],cost:{input:1.75,output:14,cacheRead:0.175,cacheWrite:0},contextWindow:128000,maxTokens:16384,thinkingLevelMap:{off:null,minimal:null,low:null,medium:"medium",high:null,xhigh:"xhigh",max:null},compat:{supportsStrictMode:!0,supportsOpenAIGrammarTools:!0},inputLimits:{maxRequestBytes:536870912,images:{maxPerRequest:1500,resize:{maxWidth:2000,maxHeight:2000,maxBytes:4718592,jpegQuality:80}}},type:"chat"},"chat:gpt-5.2-pro":{id:"gpt-5.2-pro",name:"GPT-5.2 Pro",api:"openai-responses",provider:"openai",baseUrl:"https://api.openai.com/v1",reasoning:!0,input:["text","image"],cost:{input:21,output:168,cacheRead:0,cacheWrite:0},contextWindow:400000,maxTokens:128000,thinkingLevelMap:{off:null,minimal:null,low:null,medium:"medium",high:"high",xhigh:"xhigh",max:null},compat:{supportsStrictMode:!0,supportsOpenAIGrammarTools:!0},inputLimits:{maxRequestBytes:536870912,images:{maxPerRequest:1500,resize:{maxWidth:2000,maxHeight:2000,maxBytes:4718592,jpegQuality:80}}},type:"chat"},"chat:gpt-5.3-chat-latest":{id:"gpt-5.3-chat-latest",name:"GPT-5.3 Chat (latest)",api:"openai-responses",provider:"openai",baseUrl:"https://api.openai.com/v1",reasoning:!1,input:["text","image"],cost:{input:1.75,output:14,cacheRead:0.175,cacheWrite:0},contextWindow:128000,maxTokens:16384,thinkingLevelMap:{off:null,xhigh:"xhigh"},compat:{supportsStrictMode:!0,supportsOpenAIGrammarTools:!0},inputLimits:{maxRequestBytes:536870912,images:{maxPerRequest:1500,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:"openai",baseUrl:"https://api.openai.com/v1",reasoning:!0,input:["text","image"],cost:{input:1.75,output:14,cacheRead:0.175,cacheWrite:0},contextWindow:400000,maxTokens:128000,thinkingLevelMap:{off:"none",minimal:null,low:"low",medium:"medium",high:"high",xhigh:"xhigh",max:null},compat:{supportsStrictMode:!0,supportsOpenAIGrammarTools:!0},inputLimits:{maxRequestBytes:536870912,images:{maxPerRequest:1500,resize:{maxWidth:2000,maxHeight:2000,maxBytes:4718592,jpegQuality:80}}},type:"chat"},"chat:gpt-5.3-codex-spark":{id:"gpt-5.3-codex-spark",name:"GPT-5.3 Codex Spark",api:"openai-responses",provider:"openai",baseUrl:"https://api.openai.com/v1",reasoning:!0,input:["text","image"],cost:{input:1.75,output:14,cacheRead:0.175,cacheWrite:0},contextWindow:128000,maxTokens:32000,thinkingLevelMap:{off:null,minimal:null,low:"low",medium:"medium",high:"high",xhigh:"xhigh",max:null},compat:{supportsStrictMode:!0,supportsOpenAIGrammarTools:!0},inputLimits:{maxRequestBytes:536870912,images:{maxPerRequest:1500,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:"openai",baseUrl:"https://api.openai.com/v1",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:272000,maxTokens:128000,thinkingLevelMap:{off:"none",minimal:null,low:"low",medium:"medium",high:"high",xhigh:"xhigh",max:null},compat:{supportsStrictMode:!0,supportsOpenAIGrammarTools:!0,supportsAdditionalTools:!0,supportsToolSearch:!0,supportsMidConvoSystemMessages:!0},inputLimits:{maxRequestBytes:536870912,images:{maxPerRequest:1500,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:"openai",baseUrl:"https://api.openai.com/v1",reasoning:!0,input:["text","image"],cost:{input:0.75,output:4.5,cacheRead:0.075,cacheWrite:0},contextWindow:400000,maxTokens:128000,thinkingLevelMap:{off:"none",minimal:null,low:"low",medium:"medium",high:"high",xhigh:"xhigh",max:null},compat:{supportsStrictMode:!0,supportsOpenAIGrammarTools:!0,supportsAdditionalTools:!0,supportsToolSearch:!0,supportsMidConvoSystemMessages:!0},inputLimits:{maxRequestBytes:536870912,images:{maxPerRequest:1500,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:"openai",baseUrl:"https://api.openai.com/v1",reasoning:!0,input:["text","image"],cost:{input:0.2,output:1.25,cacheRead:0.02,cacheWrite:0},contextWindow:400000,maxTokens:128000,thinkingLevelMap:{off:"none",minimal:null,low:"low",medium:"medium",high:"high",xhigh:"xhigh",max:null},compat:{supportsStrictMode:!0,supportsOpenAIGrammarTools:!0},inputLimits:{maxRequestBytes:536870912,images:{maxPerRequest:1500,resize:{maxWidth:2000,maxHeight:2000,maxBytes:4718592,jpegQuality:80}}},type:"chat"},"chat:gpt-5.4-pro":{id:"gpt-5.4-pro",name:"GPT-5.4 Pro",api:"openai-responses",provider:"openai",baseUrl:"https://api.openai.com/v1",reasoning:!0,input:["text","image"],cost:{input:30,output:180,cacheRead:0,cacheWrite:0,tiers:[{inputTokensAbove:272000,input:60,output:270,cacheRead:0,cacheWrite:0}]},contextWindow:1050000,maxTokens:128000,thinkingLevelMap:{off:null,minimal:null,low:null,medium:"medium",high:"high",xhigh:"xhigh",max:null},compat:{supportsStrictMode:!0,supportsOpenAIGrammarTools:!0,supportsAdditionalTools:!0,supportsToolSearch:!0,supportsMidConvoSystemMessages:!0},inputLimits:{maxRequestBytes:536870912,images:{maxPerRequest:1500,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:"openai",baseUrl:"https://api.openai.com/v1",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:272000,maxTokens:128000,thinkingLevelMap:{off:"none",minimal:null,low:"low",medium:"medium",high:"high",xhigh:"xhigh",max:null},compat:{supportsStrictMode:!0,supportsOpenAIGrammarTools:!0,supportsAdditionalTools:!0,supportsToolSearch:!0,supportsMidConvoSystemMessages:!0},inputLimits:{maxRequestBytes:536870912,images:{maxPerRequest:1500,resize:{maxWidth:2000,maxHeight:2000,maxBytes:4718592,jpegQuality:80}}},type:"chat"},"chat:gpt-5.5-pro":{id:"gpt-5.5-pro",name:"GPT-5.5 Pro",api:"openai-responses",provider:"openai",baseUrl:"https://api.openai.com/v1",reasoning:!0,input:["text","image"],cost:{input:30,output:180,cacheRead:0,cacheWrite:0,tiers:[{inputTokensAbove:272000,input:60,output:270,cacheRead:0,cacheWrite:0}]},contextWindow:1050000,maxTokens:128000,thinkingLevelMap:{off:null,minimal:null,low:null,medium:"medium",high:"high",xhigh:"xhigh",max:null},compat:{supportsStrictMode:!0,supportsOpenAIGrammarTools:!0},inputLimits:{maxRequestBytes:536870912,images:{maxPerRequest:1500,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:"openai",baseUrl:"https://api.openai.com/v1",reasoning:!0,input:["text","image"],cost:{input:0.2,output:1.2,cacheRead:0.02,cacheWrite:0.25,tiers:[{inputTokensAbove:272000,input:0.4,output:1.8,cacheRead:0.04,cacheWrite:0.5}]},contextWindow:272000,maxTokens:128000,thinkingLevelMap:{off:"none",minimal:null,low:"low",medium:"medium",high:"high",xhigh:"xhigh",max:"max"},compat:{supportsStrictMode:!0,supportsOpenAIGrammarTools:!0,supportsAdditionalTools:!0,supportsToolSearch:!0,supportsMidConvoSystemMessages:!0,supportsExplicitPromptCacheMode:!0},inputLimits:{maxRequestBytes:536870912,images:{maxPerRequest:1500,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:"openai",baseUrl:"https://api.openai.com/v1",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:272000,maxTokens:128000,thinkingLevelMap:{off:"none",minimal:null,low:"low",medium:"medium",high:"high",xhigh:"xhigh",max:"max"},compat:{supportsStrictMode:!0,supportsOpenAIGrammarTools:!0,supportsAdditionalTools:!0,supportsToolSearch:!0,supportsMidConvoSystemMessages:!0,supportsExplicitPromptCacheMode:!0},inputLimits:{maxRequestBytes:536870912,images:{maxPerRequest:1500,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:"openai",baseUrl:"https://api.openai.com/v1",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:272000,maxTokens:128000,thinkingLevelMap:{off:"none",minimal:null,low:"low",medium:"medium",high:"high",xhigh:"xhigh",max:"max"},compat:{supportsStrictMode:!0,supportsOpenAIGrammarTools:!0,supportsAdditionalTools:!0,supportsToolSearch:!0,supportsMidConvoSystemMessages:!0,supportsExplicitPromptCacheMode:!0},inputLimits:{maxRequestBytes:536870912,images:{maxPerRequest:1500,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:"openai",baseUrl:"https://api.openai.com/v1",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:272000,maxTokens:128000,thinkingLevelMap:{off:null,minimal:null,low:"low",medium:"medium",high:"high",xhigh:"xhigh",max:"max"},compat:{supportsStrictMode:!0,supportsOpenAIGrammarTools:!0,supportsAdditionalTools:!0,supportsToolSearch:!0,supportsMidConvoSystemMessages:!0,supportsExplicitPromptCacheMode:!0},inputLimits:{maxRequestBytes:536870912,images:{maxPerRequest:1500,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:"openai",baseUrl:"https://api.openai.com/v1",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:272000,maxTokens:128000,thinkingLevelMap:{off:"none",minimal:null,low:"low",medium:"medium",high:"high",xhigh:"xhigh",max:"max"},compat:{supportsStrictMode:!0,supportsOpenAIGrammarTools:!0,supportsAdditionalTools:!0,supportsToolSearch:!0,supportsMidConvoSystemMessages:!0,supportsExplicitPromptCacheMode:!0},inputLimits:{maxRequestBytes:536870912,images:{maxPerRequest:1500,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:"openai",baseUrl:"https://api.openai.com/v1",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:272000,maxTokens:128000,thinkingLevelMap:{off:"none",minimal:null,low:"low",medium:"medium",high:"high",xhigh:"xhigh",max:"max"},compat:{supportsStrictMode:!0,supportsOpenAIGrammarTools:!0,supportsAdditionalTools:!0,supportsToolSearch:!0,supportsMidConvoSystemMessages:!0,supportsExplicitPromptCacheMode:!0},inputLimits:{maxRequestBytes:536870912,images:{maxPerRequest:1500,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:"openai",baseUrl:"https://api.openai.com/v1",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:272000,maxTokens:128000,thinkingLevelMap:{off:null,minimal:null,low:"low",medium:"medium",high:"high",xhigh:"xhigh",max:"max"},compat:{supportsStrictMode:!0,supportsOpenAIGrammarTools:!0,supportsAdditionalTools:!0,supportsToolSearch:!0,supportsMidConvoSystemMessages:!0,supportsExplicitPromptCacheMode:!0},inputLimits:{maxRequestBytes:536870912,images:{maxPerRequest:1500,resize:{maxWidth:2000,maxHeight:2000,maxBytes:4718592,jpegQuality:80}}},type:"chat"},"chat:gpt-daybreak-blue-latest":{id:"gpt-daybreak-blue-latest",name:"Daybreak Blue",api:"openai-responses",provider:"openai",baseUrl:"https://api.openai.com/v1",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,thinkingLevelMap:{off:"none",minimal:null,low:"low",medium:"medium",high:"high",xhigh:"xhigh",max:"max"},compat:{supportsStrictMode:!0,supportsExplicitPromptCacheMode:!0},inputLimits:{maxRequestBytes:536870912,images:{maxPerRequest:1500,resize:{maxWidth:2000,maxHeight:2000,maxBytes:4718592,jpegQuality:80}}},type:"chat"},"chat:gpt-daybreak-red-latest":{id:"gpt-daybreak-red-latest",name:"Daybreak Red",api:"openai-responses",provider:"openai",baseUrl:"https://api.openai.com/v1",reasoning:!0,input:["text","image"],cost:{input:12.5,output:75,cacheRead:1.25,cacheWrite:15.625},contextWindow:400000,maxTokens:128000,thinkingLevelMap:{off:"none",minimal:null,low:"low",medium:"medium",high:"high",xhigh:"xhigh",max:"max"},compat:{supportsStrictMode:!0,supportsExplicitPromptCacheMode:!0},inputLimits:{maxRequestBytes:536870912,images:{maxPerRequest:1500,resize:{maxWidth:2000,maxHeight:2000,maxBytes:4718592,jpegQuality:80}}},type:"chat"},"chat:gpt-realtime-2.1":{id:"gpt-realtime-2.1",name:"GPT-Realtime-2.1",api:"openai-responses",provider:"openai",baseUrl:"https://api.openai.com/v1",reasoning:!0,input:["text","image"],cost:{input:4,output:24,cacheRead:0.4,cacheWrite:0},contextWindow:128000,maxTokens:32000,thinkingLevelMap:{off:null,minimal:"minimal",low:"low",medium:"medium",high:"high",xhigh:"xhigh",max:null},compat:{supportsStrictMode:!0},inputLimits:{maxRequestBytes:536870912,images:{maxPerRequest:1500,resize:{maxWidth:2000,maxHeight:2000,maxBytes:4718592,jpegQuality:80}}},type:"chat"},"chat:o1":{id:"o1",name:"o1",api:"openai-responses",provider:"openai",baseUrl:"https://api.openai.com/v1",reasoning:!0,input:["text","image"],cost:{input:15,output:60,cacheRead:7.5,cacheWrite:0},contextWindow:200000,maxTokens:1e5,thinkingLevelMap:{off:null,minimal:null,low:"low",medium:"medium",high:"high",xhigh:null,max:null},compat:{supportsStrictMode:!0},inputLimits:{maxRequestBytes:536870912,images:{maxPerRequest:1500,resize:{maxWidth:2000,maxHeight:2000,maxBytes:4718592,jpegQuality:80}}},type:"chat"},"chat:o1-pro":{id:"o1-pro",name:"o1-pro",api:"openai-responses",provider:"openai",baseUrl:"https://api.openai.com/v1",reasoning:!0,input:["text","image"],cost:{input:150,output:600,cacheRead:0,cacheWrite:0},contextWindow:200000,maxTokens:1e5,thinkingLevelMap:{off:null,minimal:null,low:"low",medium:"medium",high:"high",xhigh:null,max:null},compat:{supportsStrictMode:!0},inputLimits:{maxRequestBytes:536870912,images:{maxPerRequest:1500,resize:{maxWidth:2000,maxHeight:2000,maxBytes:4718592,jpegQuality:80}}},type:"chat"},"chat:o3":{id:"o3",name:"o3",api:"openai-responses",provider:"openai",baseUrl:"https://api.openai.com/v1",reasoning:!0,input:["text","image"],cost:{input:2,output:8,cacheRead:0.5,cacheWrite:0},contextWindow:200000,maxTokens:1e5,thinkingLevelMap:{off:null,minimal:null,low:"low",medium:"medium",high:"high",xhigh:null,max:null},compat:{supportsStrictMode:!0},inputLimits:{maxRequestBytes:536870912,images:{maxPerRequest:1500,resize:{maxWidth:2000,maxHeight:2000,maxBytes:4718592,jpegQuality:80}}},type:"chat"},"chat:o3-mini":{id:"o3-mini",name:"o3-mini",api:"openai-responses",provider:"openai",baseUrl:"https://api.openai.com/v1",reasoning:!0,input:["text"],cost:{input:1.1,output:4.4,cacheRead:0.55,cacheWrite:0},contextWindow:200000,maxTokens:1e5,thinkingLevelMap:{off:null,minimal:null,low:"low",medium:"medium",high:"high",xhigh:null,max:null},compat:{supportsStrictMode:!0},type:"chat"},"chat:o3-pro":{id:"o3-pro",name:"o3-pro",api:"openai-responses",provider:"openai",baseUrl:"https://api.openai.com/v1",reasoning:!0,input:["text","image"],cost:{input:20,output:80,cacheRead:0,cacheWrite:0},contextWindow:200000,maxTokens:1e5,thinkingLevelMap:{off:null,minimal:null,low:"low",medium:"medium",high:"high",xhigh:null,max:null},compat:{supportsStrictMode:!0},inputLimits:{maxRequestBytes:536870912,images:{maxPerRequest:1500,resize:{maxWidth:2000,maxHeight:2000,maxBytes:4718592,jpegQuality:80}}},type:"chat"},"chat:o4-mini":{id:"o4-mini",name:"o4-mini",api:"openai-responses",provider:"openai",baseUrl:"https://api.openai.com/v1",reasoning:!0,input:["text","image"],cost:{input:1.1,output:4.4,cacheRead:0.275,cacheWrite:0},contextWindow:200000,maxTokens:1e5,thinkingLevelMap:{off:null,minimal:null,low:"low",medium:"medium",high:"high",xhigh:null,max:null},compat:{supportsStrictMode:!0},inputLimits:{maxRequestBytes:536870912,images:{maxPerRequest:1500,resize:{maxWidth:2000,maxHeight:2000,maxBytes:4718592,jpegQuality:80}}},type:"chat"}}};var m=h("openai",a),N=f("openai",a),u=g("openai",a);function tn(){return d({id:"openai",name:"OpenAI",baseUrl:"https://api.openai.com/v1",auth:{apiKey:b("OpenAI API key",["OPENAI_API_KEY"]),oauth:ue({name:"OpenAI (ChatGPT subscription)",isSubscription:!0,loginLabel:"Sign in with ChatGPT",load:Ii})},models:[...Object.values(m),...Object.values(u)],filterAllModels:(e,t)=>t?.type==="oauth"?e.filter((i)=>!Ue(i,"classifier")):e,api:ye(),classifiers:{"openai-decisions":r()}})}
3
+ export{Bo,vi,_i,Jr,Xr,Yr,Zr,en,A,ye,tn};
@@ -0,0 +1,3 @@
1
+ // @bun
2
+ import{pe}from"./chunk-fj56fznw.js";import{J,xe}from"./chunk-0b2brwjc.js";import{ee}from"./chunk-35y6nf6k.js";function w(e,t,n){let a=Error(`${e} returned ${t.status}`);return a.status=t.status,a.headers=t.headers,a.body=n,a}function b(e){let t=Error(`Request timed out after ${e}ms`);return t.name="TimeoutError",t.status=void 0,t.headers=void 0,t.body="",t}function me(e){return typeof e==="object"&&e!==null&&!Array.isArray(e)}function He(e,t,n){if(typeof t!=="number"||!Number.isFinite(t))throw Error(`${e} returned an invalid ${n}`);return t}function g(e,t,n){return xe({authorization:`Bearer ${t}`,"content-type":"application/json"},e.headers,n)??{}}async function Vr(e,t,n,a,r,f){if(!r?.apiKey)throw Error(`No API key for provider: ${n.provider}`);let h=r.apiKey,s=a,u=await r.onPayload?.(s,n);if(u!==void 0)s=u;let y=r.fetch??globalThis.fetch,{response:d,json:m}=await pe(async()=>{let i=r.timeoutMs!==void 0?AbortSignal.timeout(r.timeoutMs):void 0,p=r.signal&&i?AbortSignal.any([r.signal,i]):r.signal??i;try{let o=await y(t,{method:"POST",headers:g(n,h,r.headers),body:JSON.stringify(s),signal:p});if(!o.ok)throw w(e,o,await o.text());return{response:o,json:await o.json()}}catch(o){if(i?.aborted&&!r.signal?.aborted)throw b(r.timeoutMs);throw o}},{maxRetries:r.maxRetries??2,maxRetryDelayMs:r.maxRetryDelayMs,signal:r.signal,noRetryStatuses:f});return await r.onResponse?.({status:d.status,headers:J(d.headers)},n),m}function c(e){return typeof e==="number"&&Number.isFinite(e)&&e>0?e:0}function Kr(e,t){if(!me(e)||e.input_tokens===void 0&&e.output_tokens===void 0)return;let n=c(e.input_tokens),a=c(e.output_tokens),r={input:n,output:a,cacheRead:0,cacheWrite:0,totalTokens:n+a,cost:{input:0,output:0,cacheRead:0,cacheWrite:0,total:0}};return ee(t,r),r}
3
+ export{me,He,Vr,Kr};
@@ -1,6 +1,6 @@
1
1
  #!/usr/bin/env bun
2
2
  // @bun
3
- import{dt}from"./chunk-np2xnt1g.js";import{Me}from"./chunk-enmrpjpt.js";import{Je,Cr,es,ts,ri}from"./chunk-v7da0aqn.js";import{chmodSync as Or,mkdirSync as Tt,readFileSync as Ur,rmSync as mt,writeFileSync as Br}from"fs";import{dirname as bt,join as ke,resolve as Dr}from"path";import{parseArgs as Lr}from"util";var We=void 0;import{join as Ut}from"path";import{existsSync as Ye,readdirSync as $t}from"fs";import{join as Rt}from"path";var Mt={".html":"text/html; charset=utf-8",".js":"application/javascript; charset=utf-8",".css":"text/css; charset=utf-8",".woff2":"font/woff2",".png":"image/png",".svg":"image/svg+xml; charset=utf-8",".webmanifest":"application/manifest+json; charset=utf-8",".sh":"text/plain; charset=utf-8",".ps1":"text/plain; charset=utf-8"};var Ot=/^chunk-[a-z0-9]+\.(js|css)$|-[a-z0-9]{8}\.(woff2|png|svg|webmanifest)$/;function He(e){let t={};for(let r of $t(e)){if(r.endsWith(".br")||r.endsWith(".gz"))continue;t[`/${r}`]=oe(e,r)}return t["/"]=oe(e,"index.html"),t["/*"]=oe(e,"index.html"),t}function oe(e,t){let r=Rt(e,t),n=Mt[t.slice(t.lastIndexOf("."))]??"application/octet-stream",s=t==="index.html"||t==="sw.js"||t==="manifest.webmanifest"?"no-cache":Ot.test(t)?"public, max-age=31536000, immutable":"public, max-age=3600",o=Ye(`${r}.br`),l=Ye(`${r}.gz`);return(u)=>{let I=u.headers.get("accept-encoding")??"",g=o&&/\bbr\b/.test(I)?"br":l&&/\bgzip\b/.test(I)?"gzip":void 0,d={"content-type":n,"cache-control":s};if(o||l)d.vary="accept-encoding";if(!g)return new Response(Bun.file(r),{headers:d});return d["content-encoding"]=g,new Response(Bun.file(`${r}.${g==="br"?"br":"gz"}`),{headers:d})}}var Ge=He(Ut(import.meta.dir,"web"));import{existsSync as M,mkdirSync as H,rmSync as W,writeFileSync as le}from"fs";import{homedir as pe}from"os";import{dirname as ue,join as P}from"path";import{closeSync as Bt,existsSync as Ve,mkdirSync as Dt,openSync as Ct,readdirSync as Lt,readFileSync as D,rmSync as Nt,writeFileSync as Wt}from"fs";import{join as C,resolve as Qe}from"path";var je=20000,Yt=262144;function T(e){return C(e,"basalt.log")}function ie(e){try{let t=JSON.parse(D(e,"utf8"));if(typeof t!=="object"||t===null)return;let r=t;if(typeof r.pid!=="number"||!Number.isInteger(r.pid)||r.pid<=0)return;if(typeof r.url!=="string")return;let n=new URL(r.url);if(n.protocol!=="http:"&&n.protocol!=="https:")return;let s=Array.isArray(r.argv)&&r.argv.every((o)=>typeof o==="string")?r.argv.map((o)=>String(o)):void 0;return{pid:r.pid,url:r.url,...typeof r.hwnd==="number"&&Number.isInteger(r.hwnd)&&r.hwnd>0?{hwnd:r.hwnd}:{},...s?{argv:s}:{},...typeof r.cwd==="string"&&r.cwd?{cwd:r.cwd}:{},...typeof r.secret==="string"&&r.secret?{secret:r.secret}:{}}}catch{return}}function ae(e){try{return process.kill(e,0),!0}catch{return!1}}async function f(e,t){let r=C(e,"server.json");if(!Ve(r))return;let n=ie(r);if(!n||t!==void 0&&n.pid!==t)return;return ce(n.pid)?n:void 0}async function Xe(e,t=1500){try{return(await fetch(`${e.url}/api/info`,{signal:AbortSignal.timeout(t)})).ok}catch{return!1}}function ce(e){if(!A(e))return!1;let t=Ht(e);return t===void 0||/bun|basalt/i.test(t)}function A(e){if(!ae(e))return!1;if(process.platform!=="linux")return!0;try{return D(`/proc/${e}/stat`,"utf8").split(") ")[1]?.[0]!=="Z"}catch{return!0}}function Ht(e){try{if(process.platform==="linux")return D(`/proc/${e}/cmdline`,"utf8");let t=process.platform==="win32"?Bun.spawnSync(["tasklist","/FI",`PID eq ${e}`,"/FO","CSV","/NH"],{windowsHide:!0}):Bun.spawnSync(["ps","-p",String(e),"-o","command="]);return t.success?t.stdout.toString():void 0}catch{return}}function Ke(e,t){Dt(e,{recursive:!0});let r=C(e,`${process.pid}.json`);return Wt(r,JSON.stringify({dataDir:Qe(t)})),r}async function qe(e){if(!Ve(e))return[];let t=[];for(let r of Lt(e)){let n=/^(\d+)\.json$/.exec(r);if(!n)continue;let s=C(e,r),o=Number(n[1]);if(!A(o)){Nt(s,{force:!0});continue}let l;try{l=JSON.parse(D(s,"utf8"))}catch{continue}if(!l||typeof l!=="object"||!("dataDir"in l)||typeof l.dataDir!=="string")continue;let u=await f(l.dataDir,o);if(u)t.push({dataDir:l.dataDir,service:u})}return t}async function L(e,t){if(t?.secret&&t.pid===e){let r=new URL(t.url);if(["127.0.0.1","localhost","[::1]"].includes(r.hostname))try{if((await fetch(new URL("/api/server/shutdown",r),{method:"POST",headers:{authorization:`Bearer ${t.secret}`},redirect:"error",signal:AbortSignal.timeout(2000)})).ok){for(let s=0;s<220&&A(e);s++)await Bun.sleep(100);if(!A(e))return}}catch(n){if(A(e))console.warn("\u6B63\u5E38\u5173\u505C\u8BF7\u6C42\u5931\u8D25\uFF0C\u56DE\u9000\u5230\u8FDB\u7A0B\u4FE1\u53F7\uFF1A",n instanceof Error?n.message:String(n))}}try{process.kill(e,"SIGTERM")}catch{return}for(let r=0;r<50&&A(e);r++)await Bun.sleep(100);if(A(e)){try{process.kill(e,"SIGKILL")}catch(r){if(!(r instanceof Error&&("code"in r)&&r.code==="ESRCH"))console.error(`\u65E0\u6CD5\u5F3A\u5236\u7ED3\u675F\u8FDB\u7A0B ${e}\uFF1A`,r)}await Bun.sleep(200)}}function N(e,t){let r=[];for(let n=0;n<e.length;n++){let s=e[n];if(s===void 0)continue;if(s==="--data"){n++;continue}if(s.startsWith("--data=")||s==="--open"||s==="--replace"||s==="--foreground")continue;r.push(s)}return[...r,"--data",Qe(t)]}async function Ze(e){if(e.command.length===0)throw Error("\u7F3A\u5C11\u540E\u53F0\u670D\u52A1\u542F\u52A8\u5165\u53E3");let t=Ct(T(e.dataDir),"a",384),r;try{r=Bun.spawn([...e.command,...e.args.filter((s)=>s!=="--foreground"),"--foreground"],{cwd:e.cwd??process.cwd(),detached:!0,stdio:["ignore",t,t],windowsHide:!0})}finally{Bt(t)}r.unref();let n=Date.now()+je;while(Date.now()<n){if(r.exitCode!==null)throw Error(`\u670D\u52A1\u8FDB\u7A0B\u5728\u5C31\u7EEA\u524D\u9000\u51FA\uFF08\u9000\u51FA\u7801 ${r.exitCode}\uFF09`);let s=await f(e.dataDir,r.pid);if(s)return s;await Bun.sleep(100)}throw await L(r.pid),Error(`\u7B49\u5F85\u670D\u52A1\u5C31\u7EEA\u8D85\u65F6\uFF08${je/1000} \u79D2\uFF09`)}async function ze(e){let t=Bun.file(T(e));if(!await t.exists()||t.size===0)return;let r=Math.max(0,t.size-Yt),n=await t.slice(r).text();if(r>0){let s=n.indexOf(`
3
+ import{mt}from"./chunk-e8xywvv4.js";import{Me}from"./chunk-enmrpjpt.js";import{Je,Cr,es,ts,ri}from"./chunk-2fymxwe7.js";import{chmodSync as Or,mkdirSync as Tt,readFileSync as Ur,rmSync as gt,writeFileSync as Br}from"fs";import{dirname as bt,join as ke,resolve as Dr}from"path";import{parseArgs as Lr}from"util";var We=void 0;import{join as Ut}from"path";import{existsSync as Ye,readdirSync as $t}from"fs";import{join as Rt}from"path";var Mt={".html":"text/html; charset=utf-8",".js":"application/javascript; charset=utf-8",".css":"text/css; charset=utf-8",".woff2":"font/woff2",".png":"image/png",".svg":"image/svg+xml; charset=utf-8",".webmanifest":"application/manifest+json; charset=utf-8",".sh":"text/plain; charset=utf-8",".ps1":"text/plain; charset=utf-8"};var Ot=/^chunk-[a-z0-9]+\.(js|css)$|-[a-z0-9]{8}\.(woff2|png|svg|webmanifest)$/;function He(e){let t={};for(let r of $t(e)){if(r.endsWith(".br")||r.endsWith(".gz"))continue;t[`/${r}`]=oe(e,r)}return t["/"]=oe(e,"index.html"),t["/*"]=oe(e,"index.html"),t}function oe(e,t){let r=Rt(e,t),n=Mt[t.slice(t.lastIndexOf("."))]??"application/octet-stream",s=t==="index.html"||t==="sw.js"||t==="manifest.webmanifest"?"no-cache":Ot.test(t)?"public, max-age=31536000, immutable":"public, max-age=3600",o=Ye(`${r}.br`),l=Ye(`${r}.gz`);return(u)=>{let I=u.headers.get("accept-encoding")??"",g=o&&/\bbr\b/.test(I)?"br":l&&/\bgzip\b/.test(I)?"gzip":void 0,d={"content-type":n,"cache-control":s};if(o||l)d.vary="accept-encoding";if(!g)return new Response(Bun.file(r),{headers:d});return d["content-encoding"]=g,new Response(Bun.file(`${r}.${g==="br"?"br":"gz"}`),{headers:d})}}var Ge=He(Ut(import.meta.dir,"web"));import{existsSync as M,mkdirSync as H,rmSync as W,writeFileSync as le}from"fs";import{homedir as pe}from"os";import{dirname as ue,join as P}from"path";import{closeSync as Bt,existsSync as Ve,mkdirSync as Dt,openSync as Ct,readdirSync as Lt,readFileSync as D,rmSync as Nt,writeFileSync as Wt}from"fs";import{join as C,resolve as Qe}from"path";var je=20000,Yt=262144;function T(e){return C(e,"basalt.log")}function ie(e){try{let t=JSON.parse(D(e,"utf8"));if(typeof t!=="object"||t===null)return;let r=t;if(typeof r.pid!=="number"||!Number.isInteger(r.pid)||r.pid<=0)return;if(typeof r.url!=="string")return;let n=new URL(r.url);if(n.protocol!=="http:"&&n.protocol!=="https:")return;let s=Array.isArray(r.argv)&&r.argv.every((o)=>typeof o==="string")?r.argv.map((o)=>String(o)):void 0;return{pid:r.pid,url:r.url,...typeof r.hwnd==="number"&&Number.isInteger(r.hwnd)&&r.hwnd>0?{hwnd:r.hwnd}:{},...s?{argv:s}:{},...typeof r.cwd==="string"&&r.cwd?{cwd:r.cwd}:{},...typeof r.secret==="string"&&r.secret?{secret:r.secret}:{}}}catch{return}}function ae(e){try{return process.kill(e,0),!0}catch{return!1}}async function f(e,t){let r=C(e,"server.json");if(!Ve(r))return;let n=ie(r);if(!n||t!==void 0&&n.pid!==t)return;return ce(n.pid)?n:void 0}async function Xe(e,t=1500){try{return(await fetch(`${e.url}/api/info`,{signal:AbortSignal.timeout(t)})).ok}catch{return!1}}function ce(e){if(!A(e))return!1;let t=Ht(e);return t===void 0||/bun|basalt/i.test(t)}function A(e){if(!ae(e))return!1;if(process.platform!=="linux")return!0;try{return D(`/proc/${e}/stat`,"utf8").split(") ")[1]?.[0]!=="Z"}catch{return!0}}function Ht(e){try{if(process.platform==="linux")return D(`/proc/${e}/cmdline`,"utf8");let t=process.platform==="win32"?Bun.spawnSync(["tasklist","/FI",`PID eq ${e}`,"/FO","CSV","/NH"],{windowsHide:!0}):Bun.spawnSync(["ps","-p",String(e),"-o","command="]);return t.success?t.stdout.toString():void 0}catch{return}}function Ke(e,t){Dt(e,{recursive:!0});let r=C(e,`${process.pid}.json`);return Wt(r,JSON.stringify({dataDir:Qe(t)})),r}async function qe(e){if(!Ve(e))return[];let t=[];for(let r of Lt(e)){let n=/^(\d+)\.json$/.exec(r);if(!n)continue;let s=C(e,r),o=Number(n[1]);if(!A(o)){Nt(s,{force:!0});continue}let l;try{l=JSON.parse(D(s,"utf8"))}catch{continue}if(!l||typeof l!=="object"||!("dataDir"in l)||typeof l.dataDir!=="string")continue;let u=await f(l.dataDir,o);if(u)t.push({dataDir:l.dataDir,service:u})}return t}async function L(e,t){if(t?.secret&&t.pid===e){let r=new URL(t.url);if(["127.0.0.1","localhost","[::1]"].includes(r.hostname))try{if((await fetch(new URL("/api/server/shutdown",r),{method:"POST",headers:{authorization:`Bearer ${t.secret}`},redirect:"error",signal:AbortSignal.timeout(2000)})).ok){for(let s=0;s<220&&A(e);s++)await Bun.sleep(100);if(!A(e))return}}catch(n){if(A(e))console.warn("\u6B63\u5E38\u5173\u505C\u8BF7\u6C42\u5931\u8D25\uFF0C\u56DE\u9000\u5230\u8FDB\u7A0B\u4FE1\u53F7\uFF1A",n instanceof Error?n.message:String(n))}}try{process.kill(e,"SIGTERM")}catch{return}for(let r=0;r<50&&A(e);r++)await Bun.sleep(100);if(A(e)){try{process.kill(e,"SIGKILL")}catch(r){if(!(r instanceof Error&&("code"in r)&&r.code==="ESRCH"))console.error(`\u65E0\u6CD5\u5F3A\u5236\u7ED3\u675F\u8FDB\u7A0B ${e}\uFF1A`,r)}await Bun.sleep(200)}}function N(e,t){let r=[];for(let n=0;n<e.length;n++){let s=e[n];if(s===void 0)continue;if(s==="--data"){n++;continue}if(s.startsWith("--data=")||s==="--open"||s==="--replace"||s==="--foreground")continue;r.push(s)}return[...r,"--data",Qe(t)]}async function Ze(e){if(e.command.length===0)throw Error("\u7F3A\u5C11\u540E\u53F0\u670D\u52A1\u542F\u52A8\u5165\u53E3");let t=Ct(T(e.dataDir),"a",384),r;try{r=Bun.spawn([...e.command,...e.args.filter((s)=>s!=="--foreground"),"--foreground"],{cwd:e.cwd??process.cwd(),detached:!0,stdio:["ignore",t,t],windowsHide:!0})}finally{Bt(t)}r.unref();let n=Date.now()+je;while(Date.now()<n){if(r.exitCode!==null)throw Error(`\u670D\u52A1\u8FDB\u7A0B\u5728\u5C31\u7EEA\u524D\u9000\u51FA\uFF08\u9000\u51FA\u7801 ${r.exitCode}\uFF09`);let s=await f(e.dataDir,r.pid);if(s)return s;await Bun.sleep(100)}throw await L(r.pid),Error(`\u7B49\u5F85\u670D\u52A1\u5C31\u7EEA\u8D85\u65F6\uFF08${je/1000} \u79D2\uFF09`)}async function ze(e){let t=Bun.file(T(e));if(!await t.exists()||t.size===0)return;let r=Math.max(0,t.size-Yt),n=await t.slice(r).text();if(r>0){let s=n.indexOf(`
4
4
  `);if(s>=0)n=n.slice(s+1)}return n||void 0}var tt="work.basalt",V="basalt.service",Gt=`
5
5
  [Console]::OutputEncoding = [System.Text.Encoding]::UTF8
6
6
  $shell = New-Object -ComObject WScript.Shell
@@ -338,8 +338,8 @@ self.onmessage = (event) => {
338
338
  wndProc.close();
339
339
  self.postMessage({ type: "closed" });
340
340
  };
341
- `;import{readFileSync as Sr,realpathSync as Ir}from"fs";import{homedir as Ar}from"os";import{isAbsolute as Pr,join as K,relative as _r}from"path";var vr="https://registry.npmjs.org",xr=1e4,Fr=21600000,Er=15000,kr=300000,$r=/^\d+\.\d+\.\d+(?:-[0-9A-Za-z.-]+)?(?:\+[0-9A-Za-z.-]+)?$/;function pt(e,t){try{return Bun.semver.order(e.replace(/^v/,""),t.replace(/^v/,""))===1}catch{return!1}}function Rr(e=process.env){let t=e.BUN_INSTALL_GLOBAL_DIR??K(e.BUN_INSTALL??K(Ar(),".bun"),"install","global");return K(t,"node_modules")}function ft(e,t){let r=_r(t,e);return r!==""&&!r.startsWith("..")&&!Pr(r)}function gt(e,t){if(ft(e,t.bun))return"bun";if(t.npm&&ft(e,t.npm))return"npm";return}function Ae(e){try{return Ir(e)}catch{return e}}function Pe(e){return e instanceof Error?e.message:String(e)}async function Mr(e,t){let r=Bun.spawn(e,{stdout:"pipe",stderr:"pipe",windowsHide:!0,timeout:kr,env:t}),[n,s,o]=await Promise.all([r.exited,new Response(r.stdout).text(),new Response(r.stderr).text()]);return{exitCode:n,output:`${s}
342
- ${o}`.trim()}}class _e{options;latest;checkedAt;error;applying=!1;installed;manager;unsupported;failed;pending;managerLookup;lastDiskVersion;hooks;autoInstall=!1;watching;checkTimer;watchTimer;fetch;run;constructor(e){this.options=e;this.fetch=e.fetch??fetch,this.run=e.run??((t)=>Mr(t,e.env))}status(){let e=this.options.disabled??this.unsupported,t=this.installed??this.options.current,r=this.latest!==void 0&&pt(this.latest,t);return{current:this.options.current,...this.latest?{latest:this.latest}:{},available:r,...this.options.packageName?{url:`https://www.npmjs.com/package/${this.options.packageName}`}:{},...this.checkedAt?{checkedAt:this.checkedAt}:{},...this.error?{error:this.error}:{},...this.manager?{manager:this.manager}:{},...this.installed?{installed:this.installed}:{},canApply:!e&&this.manager!==void 0&&!this.applying,...this.applying?{applying:!0}:{},...e?{disabled:e}:{}}}check(){let e=this.options.packageName;if(this.options.disabled||!e)return Promise.resolve(this.status());return this.pending??=this.resolveManager().then((t)=>t?this.fetchLatest(e):this.status()).finally(()=>{this.pending=void 0}),this.pending}start(e,t){if(this.options.disabled)return;if(this.hooks=e,this.autoInstall=t,this.watchTimer=setInterval(()=>void this.watch(),Er),this.watchTimer.unref?.(),!t)return;let r=async()=>{if(this.failed=void 0,(await this.check()).disabled)return;this.checkTimer=setTimeout(r,Fr),this.checkTimer.unref?.()};this.checkTimer=setTimeout(r,xr),this.checkTimer.unref?.()}stop(){if(this.checkTimer)clearTimeout(this.checkTimer);if(this.watchTimer)clearInterval(this.watchTimer)}async apply(){if(this.applying)throw Error("\u66F4\u65B0\u6B63\u5728\u8FDB\u884C\u4E2D");let e=await this.check();if(!e.available||!e.latest)return e;let t=this.manager,r=this.options.packageName;if(e.disabled||!t||!r)throw Error(e.disabled??"\u5F53\u524D\u5B89\u88C5\u65B9\u5F0F\u4E0D\u652F\u6301\u81EA\u52A8\u66F4\u65B0");this.applying=!0;try{return await this.install(t,r,e.latest),this.installed=e.latest,this.error=void 0,this.status()}catch(n){throw this.error=`\u66F4\u65B0\u5931\u8D25\uFF1A${Pe(n)}`,n}finally{this.applying=!1}}watch(){return this.watching??=this.watchOnce().finally(()=>{this.watching=void 0}),this.watching}async watchOnce(){let e=this.hooks;if(!e||this.applying)return;let t=this.diskVersion();if(t&&t===this.lastDiskVersion&&pt(t,this.installed??this.options.current))this.installed=t;if(this.lastDiskVersion=t,!e.idle())return;let r=this.status();if(this.autoInstall&&r.available&&r.canApply&&r.latest!==this.failed){try{await this.apply()}catch(n){this.failed=r.latest,console.error(`\u81EA\u52A8\u66F4\u65B0\u5931\u8D25\uFF1A${Pe(n)}`);return}if(!e.idle())return}if(!this.installed||this.hooks!==e)return;this.stop(),this.hooks=void 0,e.restart(this.installed)}diskVersion(){try{let e=JSON.parse(Sr(K(this.options.packageDir,"package.json"),"utf8"));if(e&&typeof e==="object"&&"version"in e&&typeof e.version==="string")return e.version}catch{}return}resolveManager(){return this.managerLookup??=(async()=>{let e=Ae(this.options.packageDir),t=Ae(Rr()),r=gt(e,{bun:t});if(!r){let n=Bun.which("npm"),s=n?await this.run([n,"root","-g"]).catch(()=>{return}):void 0,o=s?.exitCode===0?s.output.split(/\r?\n/)[0]?.trim():void 0;r=gt(e,{bun:t,npm:o?Ae(o):void 0})}if(this.manager=r,!r){let n=this.options.packageName;this.unsupported=`\u4E0D\u662F npm \u6216 bun \u7684\u5168\u5C40\u5B89\u88C5\uFF08\u5982 npx\u3001bunx \u4E34\u65F6\u8FD0\u884C\uFF09\uFF0C\u65E0\u6CD5\u81EA\u52A8\u66F4\u65B0\uFF1B\u8BF7\u8FD0\u884C npm i -g ${n} \u6216 bun add -g ${n}`}return r})(),this.managerLookup}async fetchLatest(e){try{let t=await this.fetch(`${vr}/${e}/latest`,{headers:{accept:"application/json","user-agent":`basalt/${this.options.current}`},signal:AbortSignal.timeout(15000)});if(t.status===404)throw Error(`npm \u4E0A\u6CA1\u6709 ${e}`);if(!t.ok)throw Error(`npm registry \u8FD4\u56DE ${t.status}`);let r=await t.json();if(!r||typeof r!=="object"||!("version"in r)||typeof r.version!=="string")throw Error("npm registry \u8FD4\u56DE\u7684\u6570\u636E\u7F3A\u5C11\u7248\u672C\u53F7");if(!$r.test(r.version))throw Error("npm registry \u8FD4\u56DE\u7684\u7248\u672C\u53F7\u683C\u5F0F\u4E0D\u5408\u6CD5");this.latest=r.version,this.error=void 0}catch(t){this.error=`\u68C0\u67E5\u66F4\u65B0\u5931\u8D25\uFF1A${Pe(t)}`}return this.checkedAt=Date.now(),this.status()}async install(e,t,r){let n=`${t}@${r}`,s;if(e==="bun")s=[process.execPath,"add","-g",n];else{let u=Bun.which("npm");if(!u)throw Error("PATH \u4E2D\u627E\u4E0D\u5230 npm");s=[u,"install","-g",n]}let o=await this.run(s);if(o.exitCode!==0)throw Error(`${e} \u5B89\u88C5 ${n} \u5931\u8D25\uFF08\u9000\u51FA\u7801 ${o.exitCode}\uFF09\uFF1A${o.output.slice(-500)}`);let l=this.diskVersion();if(l!==r)throw Error(`${e} \u5B89\u88C5\u5B8C\u6210\uFF0C\u4F46 ${this.options.packageDir} \u4E2D\u7684\u7248\u672C\u662F ${l??"\u672A\u77E5"}`)}}var Nr=`basalt \u2014 \u542F\u52A8\u5373\u670D\u52A1\u5668
341
+ `;import{readFileSync as Sr,realpathSync as Ir}from"fs";import{homedir as Ar}from"os";import{isAbsolute as Pr,join as K,relative as _r}from"path";var vr="https://registry.npmjs.org",xr=1e4,Fr=21600000,Er=15000,kr=300000,$r=/^\d+\.\d+\.\d+(?:-[0-9A-Za-z.-]+)?(?:\+[0-9A-Za-z.-]+)?$/;function pt(e,t){try{return Bun.semver.order(e.replace(/^v/,""),t.replace(/^v/,""))===1}catch{return!1}}function Rr(e=process.env){let t=e.BUN_INSTALL_GLOBAL_DIR??K(e.BUN_INSTALL??K(Ar(),".bun"),"install","global");return K(t,"node_modules")}function dt(e,t){let r=_r(t,e);return r!==""&&!r.startsWith("..")&&!Pr(r)}function ft(e,t){if(dt(e,t.bun))return"bun";if(t.npm&&dt(e,t.npm))return"npm";return}function Ae(e){try{return Ir(e)}catch{return e}}function Pe(e){return e instanceof Error?e.message:String(e)}async function Mr(e,t){let r=Bun.spawn(e,{stdout:"pipe",stderr:"pipe",windowsHide:!0,timeout:kr,env:t}),[n,s,o]=await Promise.all([r.exited,new Response(r.stdout).text(),new Response(r.stderr).text()]);return{exitCode:n,output:`${s}
342
+ ${o}`.trim()}}class _e{options;latest;checkedAt;error;applying=!1;installed;manager;unsupported;failed;pending;managerLookup;lastDiskVersion;hooks;autoInstall=!1;watching;checkTimer;watchTimer;fetch;run;constructor(e){this.options=e;this.fetch=e.fetch??fetch,this.run=e.run??((t)=>Mr(t,e.env))}status(){let e=this.options.disabled??this.unsupported,t=this.installed??this.options.current,r=this.latest!==void 0&&pt(this.latest,t);return{current:this.options.current,...this.latest?{latest:this.latest}:{},available:r,...this.options.packageName?{url:`https://www.npmjs.com/package/${this.options.packageName}`}:{},...this.checkedAt?{checkedAt:this.checkedAt}:{},...this.error?{error:this.error}:{},...this.manager?{manager:this.manager}:{},...this.installed?{installed:this.installed}:{},canApply:!e&&this.manager!==void 0&&!this.applying,...this.applying?{applying:!0}:{},...e?{disabled:e}:{}}}check(){let e=this.options.packageName;if(this.options.disabled||!e)return Promise.resolve(this.status());return this.pending??=this.resolveManager().then((t)=>t?this.fetchLatest(e):this.status()).finally(()=>{this.pending=void 0}),this.pending}start(e,t){if(this.options.disabled)return;if(this.hooks=e,this.autoInstall=t,this.watchTimer=setInterval(()=>void this.watch(),Er),this.watchTimer.unref?.(),!t)return;let r=async()=>{if(this.failed=void 0,(await this.check()).disabled)return;this.checkTimer=setTimeout(r,Fr),this.checkTimer.unref?.()};this.checkTimer=setTimeout(r,xr),this.checkTimer.unref?.()}stop(){if(this.checkTimer)clearTimeout(this.checkTimer);if(this.watchTimer)clearInterval(this.watchTimer)}async apply(){if(this.applying)throw Error("\u66F4\u65B0\u6B63\u5728\u8FDB\u884C\u4E2D");let e=await this.check();if(!e.available||!e.latest)return e;let t=this.manager,r=this.options.packageName;if(e.disabled||!t||!r)throw Error(e.disabled??"\u5F53\u524D\u5B89\u88C5\u65B9\u5F0F\u4E0D\u652F\u6301\u81EA\u52A8\u66F4\u65B0");this.applying=!0;try{return await this.install(t,r,e.latest),this.installed=e.latest,this.error=void 0,this.status()}catch(n){throw this.error=`\u66F4\u65B0\u5931\u8D25\uFF1A${Pe(n)}`,n}finally{this.applying=!1}}watch(){return this.watching??=this.watchOnce().finally(()=>{this.watching=void 0}),this.watching}async watchOnce(){let e=this.hooks;if(!e||this.applying)return;let t=this.diskVersion();if(t&&t===this.lastDiskVersion&&pt(t,this.installed??this.options.current))this.installed=t;if(this.lastDiskVersion=t,!e.idle())return;let r=this.status();if(this.autoInstall&&r.available&&r.canApply&&r.latest!==this.failed){try{await this.apply()}catch(n){this.failed=r.latest,console.error(`\u81EA\u52A8\u66F4\u65B0\u5931\u8D25\uFF1A${Pe(n)}`);return}if(!e.idle())return}if(!this.installed||this.hooks!==e)return;this.stop(),this.hooks=void 0,e.restart(this.installed)}diskVersion(){try{let e=JSON.parse(Sr(K(this.options.packageDir,"package.json"),"utf8"));if(e&&typeof e==="object"&&"version"in e&&typeof e.version==="string")return e.version}catch{}return}resolveManager(){return this.managerLookup??=(async()=>{let e=Ae(this.options.packageDir),t=Ae(Rr()),r=ft(e,{bun:t});if(!r){let n=Bun.which("npm"),s=n?await this.run([n,"root","-g"]).catch(()=>{return}):void 0,o=s?.exitCode===0?s.output.split(/\r?\n/)[0]?.trim():void 0;r=ft(e,{bun:t,npm:o?Ae(o):void 0})}if(this.manager=r,!r){let n=this.options.packageName;this.unsupported=`\u4E0D\u662F npm \u6216 bun \u7684\u5168\u5C40\u5B89\u88C5\uFF08\u5982 npx\u3001bunx \u4E34\u65F6\u8FD0\u884C\uFF09\uFF0C\u65E0\u6CD5\u81EA\u52A8\u66F4\u65B0\uFF1B\u8BF7\u8FD0\u884C npm i -g ${n} \u6216 bun add -g ${n}`}return r})(),this.managerLookup}async fetchLatest(e){try{let t=await this.fetch(`${vr}/${e}/latest`,{headers:{accept:"application/json","user-agent":`basalt/${this.options.current}`},signal:AbortSignal.timeout(15000)});if(t.status===404)throw Error(`npm \u4E0A\u6CA1\u6709 ${e}`);if(!t.ok)throw Error(`npm registry \u8FD4\u56DE ${t.status}`);let r=await t.json();if(!r||typeof r!=="object"||!("version"in r)||typeof r.version!=="string")throw Error("npm registry \u8FD4\u56DE\u7684\u6570\u636E\u7F3A\u5C11\u7248\u672C\u53F7");if(!$r.test(r.version))throw Error("npm registry \u8FD4\u56DE\u7684\u7248\u672C\u53F7\u683C\u5F0F\u4E0D\u5408\u6CD5");this.latest=r.version,this.error=void 0}catch(t){this.error=`\u68C0\u67E5\u66F4\u65B0\u5931\u8D25\uFF1A${Pe(t)}`}return this.checkedAt=Date.now(),this.status()}async install(e,t,r){let n=`${t}@${r}`,s;if(e==="bun")s=[process.execPath,"add","-g",n];else{let u=Bun.which("npm");if(!u)throw Error("PATH \u4E2D\u627E\u4E0D\u5230 npm");s=[u,"install","-g",n]}let o=await this.run(s);if(o.exitCode!==0)throw Error(`${e} \u5B89\u88C5 ${n} \u5931\u8D25\uFF08\u9000\u51FA\u7801 ${o.exitCode}\uFF09\uFF1A${o.output.slice(-500)}`);let l=this.diskVersion();if(l!==r)throw Error(`${e} \u5B89\u88C5\u5B8C\u6210\uFF0C\u4F46 ${this.options.packageDir} \u4E2D\u7684\u7248\u672C\u662F ${l??"\u672A\u77E5"}`)}}var Nr=`basalt \u2014 \u542F\u52A8\u5373\u670D\u52A1\u5668
343
343
 
344
344
  \u7528\u6CD5: basalt [\u9009\u9879] \u540E\u53F0\u542F\u52A8\u670D\u52A1\uFF0C\u5C31\u7EEA\u540E\u8FD4\u56DE
345
345
  basalt status \u67E5\u770B\u670D\u52A1\u72B6\u6001
@@ -375,12 +375,12 @@ ${o}`.trim()}}class _e{options;latest;checkedAt;error;applying=!1;installed;mana
375
375
  --no-update-check \u4E0D\u81EA\u52A8\u68C0\u67E5\u548C\u5B89\u88C5\u65B0\u7248\u672C\uFF08\u4E5F\u53EF\u8BBE BASALT_NO_UPDATE_CHECK=1\uFF09
376
376
  -v, --version \u663E\u793A\u7248\u672C
377
377
  -h, --help \u663E\u793A\u5E2E\u52A9
378
- `,{values:i,positionals:p}=Lr({allowPositionals:!0,options:{host:{type:"string"},port:{type:"string"},"no-auth":{type:"boolean",default:!1},"no-tray":{type:"boolean",default:!1},"insecure-http":{type:"boolean",default:!1},"allow-remote-no-auth":{type:"boolean",default:!1},"allow-origin":{type:"string",multiple:!0,default:[]},"allow-host":{type:"string",multiple:!0,default:[]},"web-url":{type:"string"},model:{type:"string"},demo:{type:"boolean",default:!1},data:{type:"string"},token:{type:"string"},team:{type:"string"},aud:{type:"string"},open:{type:"boolean",default:!1},foreground:{type:"boolean",default:!1},replace:{type:"boolean",default:!1},"no-update-check":{type:"boolean",default:!1},version:{type:"boolean",short:"v",default:!1},help:{type:"boolean",short:"h",default:!1}}});if(i.help||p[0]==="help"&&p.length===1)console.log(Nr),process.exit(0);if(i.version)console.log(dt.version),process.exit(0);var re=process.argv.slice(2),St=ke(Je(),"instances"),c=i.data??(["status","stop","restart","logs","pair","plugin"].includes(p[0]??"")?await sn():Je()),$e=!0,q="@bkm016/basalt",ne=$e&&!q?[process.execPath]:[process.execPath,Bun.main],h=p[0],Wr=!i["no-update-check"]&&!process.env.BASALT_NO_UPDATE_CHECK;async function It(){let{ProxyManager:e}=await import("./chunk-gpceyezp.js"),t=new e(c);t.load();let r=new _e({current:dt.version,packageName:q,packageDir:bt(Bun.main),fetch:t.createFetch(Cr),env:t.providerOptions({},Cr).env,disabled:q?void 0:$e?"\u5355\u6587\u4EF6\u7248\u4E0D\u652F\u6301\u81EA\u52A8\u66F4\u65B0\uFF0C\u8BF7\u6539\u7528 npm i -g @bkm016/basalt \u6216 bun add -g @bkm016/basalt \u5B89\u88C5":"\u4ECE\u6E90\u7801\u8FD0\u884C\uFF0C\u7528 git pull \u66F4\u65B0"});return{proxy:t,updater:r}}var ve=i.host===void 0||Me(i.host),Re=i.port!==void 0,se=Re?Number(i.port):ri;if(Re&&(!/^\d+$/.test(i.port??"")||se>65535))console.error(`\u7AEF\u53E3\u53C2\u6570\u65E0\u6548\uFF1A${i.port}\u3002--port \u5E94\u4E3A 0-65535 \u4E4B\u95F4\u7684\u6574\u6570\u3002`),process.exit(1);if(h==="update"&&p.length===1)process.exit(await nn());if(h==="tunnel"){let{tunnelCommand:e}=await import("./chunk-h2pp8mnh.js");process.exit(await e(c,p[1],p[2],{token:i.token,team:i.team,aud:i.aud,port:se}))}if(h==="setup"&&p.length===1)process.exit(it({compiled:$e,npmPackage:q,executable:process.execPath}));if(h==="plugin"){let[,e,t]=p;if(e!=="reload"||!t||p.length!==3)console.error("\u7528\u6CD5: basalt plugin reload <id> [--data <\u76EE\u5F55>]"),process.exit(1);process.exit(await rt(c,t))}if(h==="status"&&p.length===1)process.exit(await an());if(h==="stop"&&p.length===1)process.exit(await cn());if(h==="restart"&&p.length===1)process.exit(await ln());if(h==="logs"&&p.length===1)process.exit(await un());if(h==="pair"&&p.length===1)process.exit(await pn());if(h==="autostart"&&p.length===2)process.exit(await dn(p[1]??""));if(p.length)console.error(`\u672A\u77E5\u547D\u4EE4\uFF1A${p.join(" ")}
379
- \u8FD0\u884C basalt --help \u67E5\u770B\u53EF\u7528\u547D\u4EE4`),process.exit(1);Tt(c,{recursive:!0});Ce();var{chatGPTProvider:Yr,ModelProviderManager:Hr,NetworkManager:Gr,ProviderAuthManager:jr,resolveNetworkHost:Vr,startServer:Qr,TunnelManager:Xr}=await import("./chunk-g9hsrrj5.js"),Oe=new Gr(c);Oe.load();var Ue;try{Ue=Vr(Oe.settings(),{host:i.host,auth:!i["no-auth"],insecureHttp:i["insecure-http"],allowRemoteNoAuth:i["allow-remote-no-auth"]})}catch(e){console.error(`\u62D2\u7EDD\u542F\u52A8\uFF1A${e instanceof Error?e.message:String(e)}`),process.exit(1)}if(!i.foreground)process.exit(await on());var{builtinPlugins:Kr}=await import("./chunk-c5pg2875.js"),{FileCredentialStore:qr,modelID:Zr,proxyTargets:Jr,Runtime:zr}=await import("./chunk-gpceyezp.js"),{builtinModels:en}=await import("./chunk-6en06hkk.js"),{demoProviders:tn}=await import("./chunk-eps1epfr.js");await import("./chunk-as2mwf79.js");var{proxy:Be,updater:E}=await It(),De=N(re,c),At=!1,xe=At?{sourceRoot:Dr(bt(Bun.main),"../../.."),watched:!!process.env.BASALT_DEV_GUARD}:void 0,rn=70,ht=20000,Z=ke(c,"server.json"),Pt=Buffer.from(crypto.getRandomValues(new Uint8Array(32))).toString("base64url"),b=await f(c);if(b&&i.replace)await L(b.pid,b),b=void 0;if(b){if(!i["no-tray"]&&typeof b.hwnd==="number")be(b.hwnd);console.log(`basalt \u5DF2\u5728\u8FD0\u884C\uFF1A${b.url}`),process.exit(0)}async function nn(){let{updater:e}=await It(),t=await e.check();if(t.disabled)return console.error(t.disabled),1;if(t.error)return console.error(t.error),1;if(!t.available)return console.log(`\u5DF2\u662F\u6700\u65B0\u7248\u672C v${t.current}`),0;console.log(`\u6B63\u5728\u901A\u8FC7 ${t.manager} \u66F4\u65B0 v${t.current} \u2192 v${t.latest}\u2026`);try{await e.apply()}catch(n){return console.error(n instanceof Error?n.message:String(n)),1}let r=ie(ke(c,"server.json"));if(r&&ae(r.pid))console.log(`\u5DF2\u66F4\u65B0\u5230 v${t.latest}\uFF0C\u6B63\u5728\u8FD0\u884C\u7684 Basalt \u4F1A\u5728\u6240\u6709\u5BF9\u8BDD\u7A7A\u95F2\u540E\u81EA\u52A8\u91CD\u542F`);else console.log(`\u5DF2\u66F4\u65B0\u5230 v${t.latest}`);return 0}async function sn(){let e=Je();if(await f(e))return e;let t=await qe(St),r=t.length===1?t[0]:void 0;if(r)return r.dataDir;if(t.length>1){console.error("\u6709\u591A\u4E2A basalt \u5B9E\u4F8B\u5728\u8FD0\u884C\uFF0C\u7528 --data \u6307\u5B9A\u8981\u64CD\u4F5C\u7684\u4E00\u4E2A\uFF1A");for(let{dataDir:n,service:s}of t)console.error(` ${s.url} --data "${n}"`);process.exit(1)}return e}async function on(){let e=await f(c);if(e&&!i.replace){if(!i["no-tray"]&&typeof e.hwnd==="number")be(e.hwnd);return console.log(`basalt \u5DF2\u5728\u8FD0\u884C\uFF1A${e.url}`),0}return _t(re,process.cwd())}async function _t(e,t){try{let r=await Ze({command:ne,args:e,dataDir:c,cwd:t});return console.log(`basalt \u5DF2\u5728\u540E\u53F0\u8FD0\u884C\uFF1A${r.url}`),console.log(`\u65E5\u5FD7\uFF1A${T(c)}`),0}catch(r){return console.error(`\u540E\u53F0\u542F\u52A8\u5931\u8D25\uFF1A${r instanceof Error?r.message:String(r)}`),console.error(`\u65E5\u5FD7\uFF1A${T(c)}`),1}}async function an(){let e=await f(c);if(!e)return console.log("basalt \u672A\u8FD0\u884C"),1;let t=await Xe(e)?"":"\uFF0C\u6682\u65F6\u65E0\u54CD\u5E94\uFF0C\u53EF\u80FD\u6B63\u5FD9";return console.log(`basalt \u6B63\u5728\u8FD0\u884C\uFF1A${e.url}\uFF08PID ${e.pid}${t}\uFF09`),0}async function vt(e){if(await L(e.pid,e),ce(e.pid))return console.error(`\u65E0\u6CD5\u505C\u6B62 Basalt \u8FDB\u7A0B ${e.pid}`),!1;return!0}async function cn(){let e=await f(c);if(!e)return console.log("basalt \u672A\u8FD0\u884C"),0;if(!await vt(e))return 1;return console.log("basalt \u5DF2\u505C\u6B62"),0}async function ln(){Ce(),Tt(c,{recursive:!0});let e=await f(c),t=N(e?.argv??re.slice(1),c),r=e?.cwd??process.cwd();if(e&&!await vt(e))return 1;if(i.open)t.push("--open");return _t(t,r)}async function un(){let e=await ze(c);if(!e)return console.error(`\u6CA1\u6709\u540E\u53F0\u65E5\u5FD7\uFF1A${T(c)}`),1;return process.stdout.write(e.endsWith(`
378
+ `,{values:i,positionals:p}=Lr({allowPositionals:!0,options:{host:{type:"string"},port:{type:"string"},"no-auth":{type:"boolean",default:!1},"no-tray":{type:"boolean",default:!1},"insecure-http":{type:"boolean",default:!1},"allow-remote-no-auth":{type:"boolean",default:!1},"allow-origin":{type:"string",multiple:!0,default:[]},"allow-host":{type:"string",multiple:!0,default:[]},"web-url":{type:"string"},model:{type:"string"},demo:{type:"boolean",default:!1},data:{type:"string"},token:{type:"string"},team:{type:"string"},aud:{type:"string"},open:{type:"boolean",default:!1},foreground:{type:"boolean",default:!1},replace:{type:"boolean",default:!1},"no-update-check":{type:"boolean",default:!1},version:{type:"boolean",short:"v",default:!1},help:{type:"boolean",short:"h",default:!1}}});if(i.help||p[0]==="help"&&p.length===1)console.log(Nr),process.exit(0);if(i.version)console.log(mt.version),process.exit(0);var re=process.argv.slice(2),St=ke(Je(),"instances"),c=i.data??(["status","stop","restart","logs","pair","plugin"].includes(p[0]??"")?await sn():Je()),$e=!0,q="@bkm016/basalt",ne=$e&&!q?[process.execPath]:[process.execPath,Bun.main],h=p[0],Wr=!i["no-update-check"]&&!process.env.BASALT_NO_UPDATE_CHECK;async function It(){let{ProxyManager:e}=await import("./chunk-r36b12zb.js"),t=new e(c);t.load();let r=new _e({current:mt.version,packageName:q,packageDir:bt(Bun.main),fetch:t.createFetch(Cr),env:t.providerOptions({},Cr).env,disabled:q?void 0:$e?"\u5355\u6587\u4EF6\u7248\u4E0D\u652F\u6301\u81EA\u52A8\u66F4\u65B0\uFF0C\u8BF7\u6539\u7528 npm i -g @bkm016/basalt \u6216 bun add -g @bkm016/basalt \u5B89\u88C5":"\u4ECE\u6E90\u7801\u8FD0\u884C\uFF0C\u7528 git pull \u66F4\u65B0"});return{proxy:t,updater:r}}var ve=i.host===void 0||Me(i.host),Re=i.port!==void 0,se=Re?Number(i.port):ri;if(Re&&(!/^\d+$/.test(i.port??"")||se>65535))console.error(`\u7AEF\u53E3\u53C2\u6570\u65E0\u6548\uFF1A${i.port}\u3002--port \u5E94\u4E3A 0-65535 \u4E4B\u95F4\u7684\u6574\u6570\u3002`),process.exit(1);if(h==="update"&&p.length===1)process.exit(await nn());if(h==="tunnel"){let{tunnelCommand:e}=await import("./chunk-h00wjps7.js");process.exit(await e(c,p[1],p[2],{token:i.token,team:i.team,aud:i.aud,port:se}))}if(h==="setup"&&p.length===1)process.exit(it({compiled:$e,npmPackage:q,executable:process.execPath}));if(h==="plugin"){let[,e,t]=p;if(e!=="reload"||!t||p.length!==3)console.error("\u7528\u6CD5: basalt plugin reload <id> [--data <\u76EE\u5F55>]"),process.exit(1);process.exit(await rt(c,t))}if(h==="status"&&p.length===1)process.exit(await an());if(h==="stop"&&p.length===1)process.exit(await cn());if(h==="restart"&&p.length===1)process.exit(await ln());if(h==="logs"&&p.length===1)process.exit(await un());if(h==="pair"&&p.length===1)process.exit(await pn());if(h==="autostart"&&p.length===2)process.exit(await dn(p[1]??""));if(p.length)console.error(`\u672A\u77E5\u547D\u4EE4\uFF1A${p.join(" ")}
379
+ \u8FD0\u884C basalt --help \u67E5\u770B\u53EF\u7528\u547D\u4EE4`),process.exit(1);Tt(c,{recursive:!0});Ce();var{chatGPTProvider:Yr,ModelProviderManager:Hr,NetworkManager:Gr,ProviderAuthManager:jr,resolveNetworkHost:Vr,startServer:Qr,TunnelManager:Xr}=await import("./chunk-49hsqsht.js"),Oe=new Gr(c);Oe.load();var Ue;try{Ue=Vr(Oe.settings(),{host:i.host,auth:!i["no-auth"],insecureHttp:i["insecure-http"],allowRemoteNoAuth:i["allow-remote-no-auth"]})}catch(e){console.error(`\u62D2\u7EDD\u542F\u52A8\uFF1A${e instanceof Error?e.message:String(e)}`),process.exit(1)}if(!i.foreground)process.exit(await on());var{builtinPlugins:Kr}=await import("./chunk-ak95r8mq.js"),{FileCredentialStore:qr,modelID:Zr,proxyTargets:Jr,Runtime:zr}=await import("./chunk-r36b12zb.js"),{builtinModels:en}=await import("./chunk-hhxtc9jn.js"),{demoProviders:tn}=await import("./chunk-kgnd32hn.js");await import("./chunk-re8n2te5.js");var{proxy:Be,updater:E}=await It(),De=N(re,c),At=!1,xe=At?{sourceRoot:Dr(bt(Bun.main),"../../.."),watched:!!process.env.BASALT_DEV_GUARD}:void 0,rn=70,ht=20000,Z=ke(c,"server.json"),Pt=Buffer.from(crypto.getRandomValues(new Uint8Array(32))).toString("base64url"),b=await f(c);if(b&&i.replace)await L(b.pid,b),b=void 0;if(b){if(!i["no-tray"]&&typeof b.hwnd==="number")be(b.hwnd);console.log(`basalt \u5DF2\u5728\u8FD0\u884C\uFF1A${b.url}`),process.exit(0)}async function nn(){let{updater:e}=await It(),t=await e.check();if(t.disabled)return console.error(t.disabled),1;if(t.error)return console.error(t.error),1;if(!t.available)return console.log(`\u5DF2\u662F\u6700\u65B0\u7248\u672C v${t.current}`),0;console.log(`\u6B63\u5728\u901A\u8FC7 ${t.manager} \u66F4\u65B0 v${t.current} \u2192 v${t.latest}\u2026`);try{await e.apply()}catch(n){return console.error(n instanceof Error?n.message:String(n)),1}let r=ie(ke(c,"server.json"));if(r&&ae(r.pid))console.log(`\u5DF2\u66F4\u65B0\u5230 v${t.latest}\uFF0C\u6B63\u5728\u8FD0\u884C\u7684 Basalt \u4F1A\u5728\u6240\u6709\u5BF9\u8BDD\u7A7A\u95F2\u540E\u81EA\u52A8\u91CD\u542F`);else console.log(`\u5DF2\u66F4\u65B0\u5230 v${t.latest}`);return 0}async function sn(){let e=Je();if(await f(e))return e;let t=await qe(St),r=t.length===1?t[0]:void 0;if(r)return r.dataDir;if(t.length>1){console.error("\u6709\u591A\u4E2A basalt \u5B9E\u4F8B\u5728\u8FD0\u884C\uFF0C\u7528 --data \u6307\u5B9A\u8981\u64CD\u4F5C\u7684\u4E00\u4E2A\uFF1A");for(let{dataDir:n,service:s}of t)console.error(` ${s.url} --data "${n}"`);process.exit(1)}return e}async function on(){let e=await f(c);if(e&&!i.replace){if(!i["no-tray"]&&typeof e.hwnd==="number")be(e.hwnd);return console.log(`basalt \u5DF2\u5728\u8FD0\u884C\uFF1A${e.url}`),0}return _t(re,process.cwd())}async function _t(e,t){try{let r=await Ze({command:ne,args:e,dataDir:c,cwd:t});return console.log(`basalt \u5DF2\u5728\u540E\u53F0\u8FD0\u884C\uFF1A${r.url}`),console.log(`\u65E5\u5FD7\uFF1A${T(c)}`),0}catch(r){return console.error(`\u540E\u53F0\u542F\u52A8\u5931\u8D25\uFF1A${r instanceof Error?r.message:String(r)}`),console.error(`\u65E5\u5FD7\uFF1A${T(c)}`),1}}async function an(){let e=await f(c);if(!e)return console.log("basalt \u672A\u8FD0\u884C"),1;let t=await Xe(e)?"":"\uFF0C\u6682\u65F6\u65E0\u54CD\u5E94\uFF0C\u53EF\u80FD\u6B63\u5FD9";return console.log(`basalt \u6B63\u5728\u8FD0\u884C\uFF1A${e.url}\uFF08PID ${e.pid}${t}\uFF09`),0}async function vt(e){if(await L(e.pid,e),ce(e.pid))return console.error(`\u65E0\u6CD5\u505C\u6B62 Basalt \u8FDB\u7A0B ${e.pid}`),!1;return!0}async function cn(){let e=await f(c);if(!e)return console.log("basalt \u672A\u8FD0\u884C"),0;if(!await vt(e))return 1;return console.log("basalt \u5DF2\u505C\u6B62"),0}async function ln(){Ce(),Tt(c,{recursive:!0});let e=await f(c),t=N(e?.argv??re.slice(1),c),r=e?.cwd??process.cwd();if(e&&!await vt(e))return 1;if(i.open)t.push("--open");return _t(t,r)}async function un(){let e=await ze(c);if(!e)return console.error(`\u6CA1\u6709\u540E\u53F0\u65E5\u5FD7\uFF1A${T(c)}`),1;return process.stdout.write(e.endsWith(`
380
380
  `)?e:`${e}
381
- `),0}async function pn(){let e=await f(c);if(!e)return console.error("basalt \u672A\u8FD0\u884C\uFF0C\u5148\u8FD0\u884C basalt \u542F\u52A8\u670D\u52A1"),1;if(!e.secret)return console.error("\u6B63\u5728\u8FD0\u884C\u7684\u670D\u52A1\u7248\u672C\u8FC7\u65E7\uFF0C\u4E0D\u652F\u6301\u8BE5\u547D\u4EE4\uFF1B\u8FD0\u884C basalt restart \u540E\u91CD\u8BD5"),1;let t;try{t=await fetch(`${e.url}/api/pair/code`,{method:"POST",redirect:"error",headers:{Authorization:`Bearer ${e.secret}`},signal:AbortSignal.timeout(1e4)})}catch(o){return console.error(`\u65E0\u6CD5\u8FDE\u63A5 ${e.url}\uFF1A${o instanceof Error?o.message:String(o)}`),1}if(!t.ok){let o=await t.json().catch(()=>{return}),l=o?.error?.message?`\uFF1A${o.error.message}`:"";return console.error(`\u83B7\u53D6\u914D\u5BF9\u7801\u5931\u8D25\uFF08HTTP ${t.status}\uFF09${l}`),1}let{code:r}=await t.json();console.log(`\u914D\u5BF9\u7801 ${r.slice(0,4)}-${r.slice(4)}\uFF0810 \u5206\u949F\u5185\u6709\u6548\uFF0C\u7528\u4E00\u6B21\u5373\u5931\u6548\uFF09`);let{TunnelManager:n}=await import("./chunk-g9hsrrj5.js"),s=new n(c,{localPort:()=>ri}).publicURL();if(s)console.log(`\u8FDC\u7A0B\uFF1A${te(s,s,r)}`);return console.log(`\u672C\u673A\uFF1A${te(e.url,e.url,r)}`),0}async function dn(e){try{if(e==="status"){let s=Q(c);return console.log(s.enabled?`\u5DF2\u5F00\u542F\u767B\u5F55\u81EA\u542F\uFF1A${s.target}`:`\u672A\u5F00\u542F\u767B\u5F55\u81EA\u542F\uFF1A${s.target}`),0}if(e==="disable"){let s=ye(c);return console.log(`\u5DF2\u5173\u95ED\u767B\u5F55\u81EA\u542F\uFF1A${s}`),0}if(e!=="enable")return console.error("\u7528\u6CD5\uFF1Abasalt autostart <enable|disable|status> [--data <\u76EE\u5F55>]"),1;Ce();let t=await f(c),r=N(t?.argv??re.slice(2),c),n=he({command:ne,args:r,dataDir:c,cwd:t?.cwd??process.cwd()});return console.log(`\u5DF2\u5F00\u542F\u767B\u5F55\u81EA\u542F\uFF1A${n}`),console.log("\u5F53\u524D\u670D\u52A1\u4FDD\u6301\u4E0D\u53D8\uFF0C\u4E0B\u6B21\u767B\u5F55\u751F\u6548\u3002"),0}catch(t){return console.error(t instanceof Error?t.message:String(t)),1}}function Ce(){if(!ve&&!i["insecure-http"])console.error("\u62D2\u7EDD\u542F\u52A8\uFF1A\u975E\u672C\u673A\u76D1\u542C\u5FC5\u987B\u901A\u8FC7 HTTPS/WSS\uFF0C\u6216\u663E\u5F0F\u4F20\u5165 --insecure-http\u3002"),process.exit(1);if(!ve&&i["no-auth"]&&!i["allow-remote-no-auth"])console.error("\u62D2\u7EDD\u542F\u52A8\uFF1A\u975E\u672C\u673A\u76D1\u542C\u4E0D\u80FD\u5173\u95ED\u8BA4\u8BC1\uFF0C\u9664\u975E\u663E\u5F0F\u4F20\u5165 --allow-remote-no-auth\u3002"),process.exit(1);for(let t of i["allow-host"])if(!/^(?:[a-zA-Z0-9](?:[a-zA-Z0-9.-]*[a-zA-Z0-9])?|\[[0-9a-fA-F:]+\])$/.test(t))console.error("--allow-host \u5FC5\u987B\u662F\u4E3B\u673A\u540D\uFF0C\u4E0D\u542B\u534F\u8BAE\u3001\u7AEF\u53E3\u3001\u8DEF\u5F84\u6216\u901A\u914D\u7B26\u3002"),process.exit(1);if(i["no-auth"]&&i["allow-origin"].includes("*"))console.error("\u62D2\u7EDD\u542F\u52A8\uFF1A\u5173\u95ED\u8BA4\u8BC1\u65F6\u4E0D\u80FD\u7528 --allow-origin * \u653E\u5F00\u4EFB\u610F\u6765\u6E90\u3002\u53BB\u6389 --allow-origin *\uFF0C\u6216\u53BB\u6389 --no-auth\u3002"),process.exit(1);let e=i["web-url"];if(e!==void 0){let t=URL.canParse(e)?new URL(e).protocol:void 0;if(t!=="http:"&&t!=="https:")console.error(`--web-url \u65E0\u6548\uFF1A${e}\u3002\u5E94\u4E3A\u5B8C\u6574\u7684 http:// \u6216 https:// \u5730\u5740\u3002`),process.exit(1)}}var U=new qr(c);U.load();U.migrateOpenAISubscription();var k=Be.models(en({credentials:U})),Le=Yr();k.setProvider(Le);if(i.demo||process.env.BASALT_DEMO_MODELS)for(let e of tn())k.setProvider(e);var J=new Hr(c,k,Be);await J.load();var xt=new jr(k,U),Ft=()=>[Le.id,...i.demo?["demo"]:[],...J.list().map((e)=>e.id)],fn=Ft(),z=i.model??process.env.BASALT_MODEL??(i.demo?"demo/echo":(await k.getAvailable()).filter((e)=>fn.includes(e.provider)).map(Zr)[0]);if(!z)console.warn("\u8FD8\u6CA1\u6709\u53EF\u7528\u7684\u6A21\u578B\uFF1A\u6253\u5F00\u5DE5\u4F5C\u53F0\u6309\u5F15\u5BFC\u6DFB\u52A0\u6A21\u578B\u670D\u52A1\u5546\u4E0E API key\uFF0C\u6216\u52A0 --demo \u8BD5\u7528\u3002");var Ne=await zr.create({builtinPlugins:Kr,dataDir:c,models:k,defaultModel:z??"demo/echo",visibleModelProviders:Ft,development:xe}),B=!i["no-auth"],Fe=se,S=new Xr(c,{localPort:()=>Fe});if(!B&&S.status().configured)console.error("\u62D2\u7EDD\u542F\u52A8\uFF1A\u5DF2\u914D\u7F6E\u8FDC\u7A0B\u8BBF\u95EE\uFF0C\u4E0D\u80FD\u540C\u65F6\u7528 --no-auth \u5173\u95ED\u8BA4\u8BC1\u3002\u5148\u8FD0\u884C basalt tunnel off\uFF0C\u6216\u53BB\u6389 --no-auth\u3002"),process.exit(1);var v=[...i["allow-origin"]];if(!v.includes("*")){for(let e of ts)if(!v.includes(e))v.push(e)}if(i["web-url"]){let e=new URL(i["web-url"]).origin;if(!v.includes("*")&&!v.includes(e))v.push(e)}var m=Qr({runtime:Ne,dataDir:c,host:Ue,network:Oe,networkHostOverride:i.host,port:se,fallbackPort:!Re,auth:B,origins:v,allowedHosts:i["allow-host"],web:We,webStatic:Ge,development:At,version:dt.version??"dev",modelProviders:J,providerAuth:xt,proxy:Be,proxyTargets:()=>Jr([Le,...J.list()]),tunnel:S,cliSecret:Pt,approveLocalPairing:process.platform==="win32"?lt:void 0,restart:gn,shutdown:()=>{setTimeout(()=>void x(),0)},autostart:{status:()=>Q(c),set(e){if(e)he({command:ne,args:De,dataDir:c,cwd:process.cwd()});else ye(c);return Q(c)}},updates:{status:()=>E.status(),check:()=>E.check(),async apply(){let e=await E.apply();return setTimeout(()=>void E.watch(),300),e}}});Fe=m.tunnelPort??Fe;S.start();var ee=!1,yt=!1;function Et(){return Ne.list(!0,{archive:"all"}).every((e)=>e.status!=="busy")}function gn(){if(yt||ee)return;yt=!0;let e=()=>{if(ee)return;if(!Et()){setTimeout(e,1000).unref?.();return}console.log(`
382
- \u5BF9\u8BDD\u5747\u5DF2\u7A7A\u95F2\uFF0C\u6B63\u5728\u6309\u539F\u53C2\u6570\u91CD\u542F\u670D\u52A1\u2026`),x(!0)};setTimeout(e,300).unref?.()}var Ee=i["no-tray"]?void 0:await ut({title:`Basalt ${dt.version??"dev"} (${new URL(m.url).host})`,tooltip:`Basalt \u2014 ${m.url}`,auth:B,onOpen:()=>Se(O()),onCopyLink:()=>Ie(O()),onCopyCode:()=>{let e=m.auth.pairingCode();Ie(`${e.slice(0,4)}-${e.slice(4)}`)},onQuit:()=>{x()}});Br(Z,JSON.stringify({pid:process.pid,url:m.url,argv:De,cwd:process.cwd(),secret:Pt,...Ee?{hwnd:Ee.hwnd}:{}}),{mode:384});Or(Z,384);var mn=Ke(St,c),x=async(e=!1,t=0)=>{if(ee){if(t!==0)process.exit(t);return}ee=!0;try{let s=JSON.parse(Ur(Z,"utf8"));if(s&&typeof s==="object"&&"pid"in s&&s.pid===process.pid)mt(Z,{force:!0})}catch(s){if(!(s instanceof Error&&("code"in s)&&s.code==="ENOENT"))console.error("\u65E0\u6CD5\u6E05\u7406\u670D\u52A1\u8BB0\u5F55\uFF1A",s)}let r=setTimeout(()=>{console.error(`[basalt] \u5173\u95ED\u670D\u52A1\u8D85\u8FC7 ${ht/1000} \u79D2\u4ECD\u672A\u5B8C\u6210\uFF0C\u5F3A\u5236\u9000\u51FA`),process.exit(1)},ht),n=[["\u5355\u5B9E\u4F8B\u767B\u8BB0",()=>mt(mn,{force:!0})],["\u66F4\u65B0\u68C0\u67E5",()=>E.stop()],["\u6A21\u578B\u767B\u5F55\u6D41\u7A0B",()=>xt.close()],["\u8FDC\u7A0B\u8BBF\u95EE\u96A7\u9053",()=>S.stop()],["\u6258\u76D8",()=>Ee?.close()],["HTTP \u670D\u52A1",()=>m.stop()],["\u8FD0\u884C\u65F6",()=>Ne.close()],["\u51ED\u636E\u5B58\u50A8",()=>U.close()]];try{for(let[s,o]of n)try{await o()}catch(l){console.error(`[basalt] \u5173\u95ED${s}\u5931\u8D25\uFF0C\u7EE7\u7EED\u5173\u95ED\u5176\u4F59\u8D44\u6E90\uFF1A`,l)}if(e&&!xe?.watched)Bun.spawn([...ne,...De],{cwd:process.cwd(),detached:!0,stdio:["ignore","ignore","ignore"],windowsHide:!0}).unref()}catch(s){console.error("[basalt] \u91CD\u65B0\u62C9\u8D77\u670D\u52A1\u5931\u8D25\uFF1A",s)}finally{clearTimeout(r),process.exit(e&&xe?.watched?rn:t)}};process.on("SIGINT",()=>void x());process.on("SIGTERM",()=>void x());process.on("unhandledRejection",(e)=>{console.error("[basalt] \u62E6\u622A\u5230\u672A\u5904\u7406\u7684\u5F02\u6B65\u5F02\u5E38\uFF08\u4FDD\u6301\u670D\u52A1\u8FD0\u884C\uFF09\uFF1A",e)});process.on("uncaughtException",(e)=>{console.error("[basalt] \u672A\u6355\u83B7\u7684\u8FD0\u884C\u65F6\u5F02\u5E38\uFF0C\u6B63\u5728\u5173\u95ED\u670D\u52A1\uFF1A",e),x(!1,1)});console.log(`
383
- basalt ${dt.version??""} \u8FD0\u884C\u4E8E ${m.url}`);console.log(`\u6570\u636E\u76EE\u5F55 ${c}`);if(z)console.log(`\u542F\u52A8\u6A21\u578B ${z}`);hn();E.start({idle:Et,restart(e){console.log(`
381
+ `),0}async function pn(){let e=await f(c);if(!e)return console.error("basalt \u672A\u8FD0\u884C\uFF0C\u5148\u8FD0\u884C basalt \u542F\u52A8\u670D\u52A1"),1;if(!e.secret)return console.error("\u6B63\u5728\u8FD0\u884C\u7684\u670D\u52A1\u7248\u672C\u8FC7\u65E7\uFF0C\u4E0D\u652F\u6301\u8BE5\u547D\u4EE4\uFF1B\u8FD0\u884C basalt restart \u540E\u91CD\u8BD5"),1;let t;try{t=await fetch(`${e.url}/api/pair/code`,{method:"POST",redirect:"error",headers:{Authorization:`Bearer ${e.secret}`},signal:AbortSignal.timeout(1e4)})}catch(o){return console.error(`\u65E0\u6CD5\u8FDE\u63A5 ${e.url}\uFF1A${o instanceof Error?o.message:String(o)}`),1}if(!t.ok){let o=await t.json().catch(()=>{return}),l=o?.error?.message?`\uFF1A${o.error.message}`:"";return console.error(`\u83B7\u53D6\u914D\u5BF9\u7801\u5931\u8D25\uFF08HTTP ${t.status}\uFF09${l}`),1}let{code:r}=await t.json();console.log(`\u914D\u5BF9\u7801 ${r.slice(0,4)}-${r.slice(4)}\uFF0810 \u5206\u949F\u5185\u6709\u6548\uFF0C\u7528\u4E00\u6B21\u5373\u5931\u6548\uFF09`);let{TunnelManager:n}=await import("./chunk-49hsqsht.js"),s=new n(c,{localPort:()=>ri}).publicURL();if(s)console.log(`\u8FDC\u7A0B\uFF1A${te(s,s,r)}`);return console.log(`\u672C\u673A\uFF1A${te(e.url,e.url,r)}`),0}async function dn(e){try{if(e==="status"){let s=Q(c);return console.log(s.enabled?`\u5DF2\u5F00\u542F\u767B\u5F55\u81EA\u542F\uFF1A${s.target}`:`\u672A\u5F00\u542F\u767B\u5F55\u81EA\u542F\uFF1A${s.target}`),0}if(e==="disable"){let s=ye(c);return console.log(`\u5DF2\u5173\u95ED\u767B\u5F55\u81EA\u542F\uFF1A${s}`),0}if(e!=="enable")return console.error("\u7528\u6CD5\uFF1Abasalt autostart <enable|disable|status> [--data <\u76EE\u5F55>]"),1;Ce();let t=await f(c),r=N(t?.argv??re.slice(2),c),n=he({command:ne,args:r,dataDir:c,cwd:t?.cwd??process.cwd()});return console.log(`\u5DF2\u5F00\u542F\u767B\u5F55\u81EA\u542F\uFF1A${n}`),console.log("\u5F53\u524D\u670D\u52A1\u4FDD\u6301\u4E0D\u53D8\uFF0C\u4E0B\u6B21\u767B\u5F55\u751F\u6548\u3002"),0}catch(t){return console.error(t instanceof Error?t.message:String(t)),1}}function Ce(){if(!ve&&!i["insecure-http"])console.error("\u62D2\u7EDD\u542F\u52A8\uFF1A\u975E\u672C\u673A\u76D1\u542C\u5FC5\u987B\u901A\u8FC7 HTTPS/WSS\uFF0C\u6216\u663E\u5F0F\u4F20\u5165 --insecure-http\u3002"),process.exit(1);if(!ve&&i["no-auth"]&&!i["allow-remote-no-auth"])console.error("\u62D2\u7EDD\u542F\u52A8\uFF1A\u975E\u672C\u673A\u76D1\u542C\u4E0D\u80FD\u5173\u95ED\u8BA4\u8BC1\uFF0C\u9664\u975E\u663E\u5F0F\u4F20\u5165 --allow-remote-no-auth\u3002"),process.exit(1);for(let t of i["allow-host"])if(!/^(?:[a-zA-Z0-9](?:[a-zA-Z0-9.-]*[a-zA-Z0-9])?|\[[0-9a-fA-F:]+\])$/.test(t))console.error("--allow-host \u5FC5\u987B\u662F\u4E3B\u673A\u540D\uFF0C\u4E0D\u542B\u534F\u8BAE\u3001\u7AEF\u53E3\u3001\u8DEF\u5F84\u6216\u901A\u914D\u7B26\u3002"),process.exit(1);if(i["no-auth"]&&i["allow-origin"].includes("*"))console.error("\u62D2\u7EDD\u542F\u52A8\uFF1A\u5173\u95ED\u8BA4\u8BC1\u65F6\u4E0D\u80FD\u7528 --allow-origin * \u653E\u5F00\u4EFB\u610F\u6765\u6E90\u3002\u53BB\u6389 --allow-origin *\uFF0C\u6216\u53BB\u6389 --no-auth\u3002"),process.exit(1);let e=i["web-url"];if(e!==void 0){let t=URL.canParse(e)?new URL(e).protocol:void 0;if(t!=="http:"&&t!=="https:")console.error(`--web-url \u65E0\u6548\uFF1A${e}\u3002\u5E94\u4E3A\u5B8C\u6574\u7684 http:// \u6216 https:// \u5730\u5740\u3002`),process.exit(1)}}var U=new qr(c);U.load();U.migrateOpenAISubscription();var k=Be.models(en({credentials:U})),Le=Yr();k.setProvider(Le);if(i.demo||process.env.BASALT_DEMO_MODELS)for(let e of tn())k.setProvider(e);var J=new Hr(c,k,Be);await J.load();var xt=new jr(k,U),Ft=()=>[Le.id,...i.demo?["demo"]:[],...J.list().map((e)=>e.id)],fn=Ft(),z=i.model??process.env.BASALT_MODEL??(i.demo?"demo/echo":(await k.getAvailable()).filter((e)=>fn.includes(e.provider)).map(Zr)[0]);if(!z)console.warn("\u8FD8\u6CA1\u6709\u53EF\u7528\u7684\u6A21\u578B\uFF1A\u6253\u5F00\u5DE5\u4F5C\u53F0\u6309\u5F15\u5BFC\u6DFB\u52A0\u6A21\u578B\u670D\u52A1\u5546\u4E0E API key\uFF0C\u6216\u52A0 --demo \u8BD5\u7528\u3002");var Ne=await zr.create({builtinPlugins:Kr,dataDir:c,models:k,defaultModel:z??"demo/echo",visibleModelProviders:Ft,development:xe}),B=!i["no-auth"],Fe=se,S=new Xr(c,{localPort:()=>Fe});if(!B&&S.status().configured)console.error("\u62D2\u7EDD\u542F\u52A8\uFF1A\u5DF2\u914D\u7F6E\u8FDC\u7A0B\u8BBF\u95EE\uFF0C\u4E0D\u80FD\u540C\u65F6\u7528 --no-auth \u5173\u95ED\u8BA4\u8BC1\u3002\u5148\u8FD0\u884C basalt tunnel off\uFF0C\u6216\u53BB\u6389 --no-auth\u3002"),process.exit(1);var v=[...i["allow-origin"]];if(!v.includes("*")){for(let e of ts)if(!v.includes(e))v.push(e)}if(i["web-url"]){let e=new URL(i["web-url"]).origin;if(!v.includes("*")&&!v.includes(e))v.push(e)}var m=Qr({runtime:Ne,dataDir:c,host:Ue,network:Oe,networkHostOverride:i.host,port:se,fallbackPort:!Re,auth:B,origins:v,allowedHosts:i["allow-host"],web:We,webStatic:Ge,development:At,version:mt.version??"dev",modelProviders:J,providerAuth:xt,proxy:Be,proxyTargets:()=>Jr([Le,...J.list()]),tunnel:S,cliSecret:Pt,approveLocalPairing:process.platform==="win32"?lt:void 0,restart:gn,shutdown:()=>{setTimeout(()=>void x(),0)},autostart:{status:()=>Q(c),set(e){if(e)he({command:ne,args:De,dataDir:c,cwd:process.cwd()});else ye(c);return Q(c)}},updates:{status:()=>E.status(),check:()=>E.check(),async apply(){let e=await E.apply();return setTimeout(()=>void E.watch(),300),e}}});Fe=m.tunnelPort??Fe;S.start();var ee=!1,yt=!1;function Et(){return Ne.list(!0,{archive:"all"}).every((e)=>e.status!=="busy")}function gn(){if(yt||ee)return;yt=!0;let e=()=>{if(ee)return;if(!Et()){setTimeout(e,1000).unref?.();return}console.log(`
382
+ \u5BF9\u8BDD\u5747\u5DF2\u7A7A\u95F2\uFF0C\u6B63\u5728\u6309\u539F\u53C2\u6570\u91CD\u542F\u670D\u52A1\u2026`),x(!0)};setTimeout(e,300).unref?.()}var Ee=i["no-tray"]?void 0:await ut({title:`Basalt ${mt.version??"dev"} (${new URL(m.url).host})`,tooltip:`Basalt \u2014 ${m.url}`,auth:B,onOpen:()=>Se(O()),onCopyLink:()=>Ie(O()),onCopyCode:()=>{let e=m.auth.pairingCode();Ie(`${e.slice(0,4)}-${e.slice(4)}`)},onQuit:()=>{x()}});Br(Z,JSON.stringify({pid:process.pid,url:m.url,argv:De,cwd:process.cwd(),secret:Pt,...Ee?{hwnd:Ee.hwnd}:{}}),{mode:384});Or(Z,384);var mn=Ke(St,c),x=async(e=!1,t=0)=>{if(ee){if(t!==0)process.exit(t);return}ee=!0;try{let s=JSON.parse(Ur(Z,"utf8"));if(s&&typeof s==="object"&&"pid"in s&&s.pid===process.pid)gt(Z,{force:!0})}catch(s){if(!(s instanceof Error&&("code"in s)&&s.code==="ENOENT"))console.error("\u65E0\u6CD5\u6E05\u7406\u670D\u52A1\u8BB0\u5F55\uFF1A",s)}let r=setTimeout(()=>{console.error(`[basalt] \u5173\u95ED\u670D\u52A1\u8D85\u8FC7 ${ht/1000} \u79D2\u4ECD\u672A\u5B8C\u6210\uFF0C\u5F3A\u5236\u9000\u51FA`),process.exit(1)},ht),n=[["\u5355\u5B9E\u4F8B\u767B\u8BB0",()=>gt(mn,{force:!0})],["\u66F4\u65B0\u68C0\u67E5",()=>E.stop()],["\u6A21\u578B\u767B\u5F55\u6D41\u7A0B",()=>xt.close()],["\u8FDC\u7A0B\u8BBF\u95EE\u96A7\u9053",()=>S.stop()],["\u6258\u76D8",()=>Ee?.close()],["HTTP \u670D\u52A1",()=>m.stop()],["\u8FD0\u884C\u65F6",()=>Ne.close()],["\u51ED\u636E\u5B58\u50A8",()=>U.close()]];try{for(let[s,o]of n)try{await o()}catch(l){console.error(`[basalt] \u5173\u95ED${s}\u5931\u8D25\uFF0C\u7EE7\u7EED\u5173\u95ED\u5176\u4F59\u8D44\u6E90\uFF1A`,l)}if(e&&!xe?.watched)Bun.spawn([...ne,...De],{cwd:process.cwd(),detached:!0,stdio:["ignore","ignore","ignore"],windowsHide:!0}).unref()}catch(s){console.error("[basalt] \u91CD\u65B0\u62C9\u8D77\u670D\u52A1\u5931\u8D25\uFF1A",s)}finally{clearTimeout(r),process.exit(e&&xe?.watched?rn:t)}};process.on("SIGINT",()=>void x());process.on("SIGTERM",()=>void x());process.on("unhandledRejection",(e)=>{console.error("[basalt] \u62E6\u622A\u5230\u672A\u5904\u7406\u7684\u5F02\u6B65\u5F02\u5E38\uFF08\u4FDD\u6301\u670D\u52A1\u8FD0\u884C\uFF09\uFF1A",e)});process.on("uncaughtException",(e)=>{console.error("[basalt] \u672A\u6355\u83B7\u7684\u8FD0\u884C\u65F6\u5F02\u5E38\uFF0C\u6B63\u5728\u5173\u95ED\u670D\u52A1\uFF1A",e),x(!1,1)});console.log(`
383
+ basalt ${mt.version??""} \u8FD0\u884C\u4E8E ${m.url}`);console.log(`\u6570\u636E\u76EE\u5F55 ${c}`);if(z)console.log(`\u542F\u52A8\u6A21\u578B ${z}`);hn();E.start({idle:Et,restart(e){console.log(`
384
384
  \u5DF2\u5B89\u88C5 v${e}\uFF0C\u5BF9\u8BDD\u5747\u5DF2\u7A7A\u95F2\uFF0C\u6B63\u5728\u91CD\u542F\u5230\u65B0\u7248\u672C\u2026`),x(!0)}},Wr);if(i.open)try{Se(O())}catch(e){console.warn("\u65E0\u6CD5\u6253\u5F00\u6D4F\u89C8\u5668\uFF1A",e)}if(!B)console.warn(ve?`
385
385
  \u8BA4\u8BC1\u5DF2\u5173\u95ED\uFF08\u4EC5\u672C\u673A\u53EF\u8BBF\u95EE\uFF09\u3002`:`
386
386
  \u26A0 \u8BA4\u8BC1\u5DF2\u5173\u95ED\uFF0C\u4E14\u76D1\u542C\u5728 ${Ue}\uFF1A\u4EFB\u4F55\u80FD\u8FDE\u5230\u8FD9\u4E2A\u5730\u5740\u7684\u4EBA\u90FD\u80FD\u5728\u8FD9\u53F0\u673A\u5668\u4E0A\u6267\u884C\u547D\u4EE4\u3002`);else if(wt(),process.stdin.isTTY)console.log("\u6309\u56DE\u8F66\u751F\u6210\u65B0\u7684\u914D\u5BF9\u7801\u3002"),process.stdin.on("data",wt);function te(e,t,r){let n=Buffer.from(JSON.stringify({server:t,code:r})).toString("base64url");return`${e.replace(/\/$/,"")}/#pair=${n}`}function O(e=B?m.auth.pairingCode():void 0){let t=(i["web-url"]??es).replace(/\/$/,"");if(!e)return`${t}/`;return te(t,m.url,e)}function wt(){let e=m.auth.pairingCode(),t=S.publicURL();console.log(`
@@ -3,5 +3,5 @@ import{r,p}from"./chunk-zkjnt298.js";var U=r(function(De,S){var y=1000,x=y*60,b=
3
3
  `).join(`
4
4
  `+C),e.push(f+"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(d.formatWithOptions(B.inspectOpts,...e)+`
5
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,d.inspect(e,this.inspectOpts).split(`
6
- `).map((s)=>s.trim()).join(" ")};G.O=function(e){return this.inspectOpts.colors=this.useColors,d.inspect(e,this.inspectOpts)}});var qt=r(function(Se,q){if(typeof process>"u"||process.type==="renderer"||!1||process.__nwjs)q.exports=z();else q.exports=J()});
7
- export{qt};
6
+ `).map((s)=>s.trim()).join(" ")};G.O=function(e){return this.inspectOpts.colors=this.useColors,d.inspect(e,this.inspectOpts)}});var Gt=r(function(Se,q){if(typeof process>"u"||process.type==="renderer"||!1||process.__nwjs)q.exports=z();else q.exports=J()});
7
+ export{Gt};
@@ -1,2 +1,2 @@
1
1
  // @bun
2
- import{B}from"./chunk-7kz9435k.js";import{v}from"./chunk-0g8rtf05.js";import{a}from"./chunk-zkjnt298.js";var u=a(v());var M=a(v());var p=a(B()),d=a(v());var P=a(B()),f=a(v()),S=(e,t,r)=>{let o={EcsContainer:async(s)=>{let{fromHttp:i}=await import("./chunk-bkhsva5n.js"),{fromContainerMetadata:n}=await import("./chunk-2fts9k52.js");return r?.debug("@aws-sdk/credential-provider-ini - credential_source is EcsContainer"),async()=>f.chain(i(s??{}),n(s))().then(m)},Ec2InstanceMetadata:async(s)=>{r?.debug("@aws-sdk/credential-provider-ini - credential_source is Ec2InstanceMetadata");let{fromInstanceMetadata:i}=await import("./chunk-2fts9k52.js");return async()=>i(s)().then(m)},Environment:async(s)=>{r?.debug("@aws-sdk/credential-provider-ini - credential_source is Environment");let{fromEnv:i}=await import("./chunk-5tsfqsmf.js");return async()=>i(s)().then(m)}};if(e in o)return o[e];else throw new f.CredentialsProviderError(`Unsupported credential source in profile ${t}. Got ${e}, expected EcsContainer or Ec2InstanceMetadata or Environment.`,{logger:r})},m=(e)=>P.setCredentialFeature(e,"CREDENTIALS_PROFILE_NAMED_PROVIDER","p");var R=(e,{profile:t="default",logger:r}={})=>Boolean(e)&&typeof e==="object"&&typeof e.role_arn==="string"&&["undefined","string"].indexOf(typeof e.role_session_name)>-1&&["undefined","string"].indexOf(typeof e.external_id)>-1&&["undefined","string"].indexOf(typeof e.mfa_serial)>-1&&(q(e,{profile:t,logger:r})||H(e,{profile:t,logger:r})),q=(e,{profile:t,logger:r})=>{let o=typeof e.source_profile==="string"&&typeof e.credential_source>"u";if(o)r?.debug?.(` ${t} isAssumeRoleWithSourceProfile source_profile=${e.source_profile}`);return o},H=(e,{profile:t,logger:r})=>{let o=typeof e.credential_source==="string"&&typeof e.source_profile>"u";if(o)r?.debug?.(` ${t} isCredentialSourceProfile credential_source=${e.credential_source}`);return o},A=async(e,t,r,o,s={},i)=>{r.logger?.debug("@aws-sdk/credential-provider-ini - resolveAssumeRoleCredentials (STS)");let n=t[e],{source_profile:c,region:K}=n;if(!r.roleAssumer){let{getDefaultRoleAssumer:l}=await import("./chunk-4dgqcp6q.js");r.roleAssumer=l({...r.clientConfig,credentialProviderLogger:r.logger,parentClientConfig:{...o,...r?.parentClientConfig,region:K??r?.parentClientConfig?.region??o?.region}},r.clientPlugins)}if(c&&c in s)throw new d.CredentialsProviderError(`Detected a cycle attempting to resolve credentials for profile ${d.getProfileName(r)}. Profiles visited: `+Object.keys(s).join(", "),{logger:r.logger});r.logger?.debug(`@aws-sdk/credential-provider-ini - finding credential resolver using ${c?`source_profile=[${c}]`:`profile=[${e}]`}`);let E=c?i(c,t,r,o,{...s,[c]:!0},I(t[c]??{})):(await S(n.credential_source,e,r.logger)(r))();if(I(n))return E.then((l)=>p.setCredentialFeature(l,"CREDENTIALS_PROFILE_SOURCE_PROFILE","o"));else{let l={RoleArn:n.role_arn,RoleSessionName:n.role_session_name||`aws-sdk-js-${Date.now()}`,ExternalId:n.external_id,DurationSeconds:parseInt(n.duration_seconds||"3600",10)},{mfa_serial:_}=n;if(_){if(!r.mfaCodeProvider)throw new d.CredentialsProviderError(`Profile ${e} requires multi-factor authentication, but no MFA code callback was provided.`,{logger:r.logger,tryNextLink:!1});l.SerialNumber=_,l.TokenCode=await r.mfaCodeProvider(_)}let G=await E;return r.roleAssumer(G,l).then((U)=>p.setCredentialFeature(U,"CREDENTIALS_PROFILE_SOURCE_PROFILE","o"))}},I=(e)=>!e.role_arn&&!!e.credential_source;var L=a(B()),O=(e)=>Boolean(e&&e.login_session),b=async(e,t,r)=>{let{fromLoginCredentials:o}=await import("./chunk-1gaj43fx.js"),s=await o({...t,profile:e})({callerClientConfig:r});return L.setCredentialFeature(s,"CREDENTIALS_PROFILE_LOGIN","AC")};var x=a(B()),k=(e)=>Boolean(e)&&typeof e==="object"&&typeof e.credential_process==="string",F=async(e,t)=>{let{fromProcess:r}=await import("./chunk-nszq2z0w.js"),o=await r({...e,profile:t})();return x.setCredentialFeature(o,"CREDENTIALS_PROFILE_PROCESS","v")};var C=a(B()),h=async(e,t,r={},o)=>{let{fromSSO:s}=await import("./chunk-wj09qkyw.js");return s({profile:e,logger:r.logger,parentClientConfig:r.parentClientConfig,clientConfig:r.clientConfig})({callerClientConfig:o}).then((i)=>{if(t.sso_session)return C.setCredentialFeature(i,"CREDENTIALS_PROFILE_SSO","r");else return C.setCredentialFeature(i,"CREDENTIALS_PROFILE_SSO_LEGACY","t")})},D=(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 T=a(B()),y=(e)=>Boolean(e)&&typeof e==="object"&&typeof e.aws_access_key_id==="string"&&typeof e.aws_secret_access_key==="string"&&["undefined","string"].indexOf(typeof e.aws_session_token)>-1&&["undefined","string"].indexOf(typeof e.aws_account_id)>-1,g=async(e,t)=>{t?.logger?.debug("@aws-sdk/credential-provider-ini - resolveStaticCredentials");let r={accessKeyId:e.aws_access_key_id,secretAccessKey:e.aws_secret_access_key,sessionToken:e.aws_session_token,...e.aws_credential_scope&&{credentialScope:e.aws_credential_scope},...e.aws_account_id&&{accountId:e.aws_account_id}};return T.setCredentialFeature(r,"CREDENTIALS_PROFILE","n")};var W=a(B()),N=(e)=>Boolean(e)&&typeof e==="object"&&typeof e.web_identity_token_file==="string"&&typeof e.role_arn==="string"&&["undefined","string"].indexOf(typeof e.role_session_name)>-1,j=async(e,t,r)=>{let{fromTokenFile:o}=await import("./chunk-mde2dd79.js"),s=await o({webIdentityTokenFile:e.web_identity_token_file,roleArn:e.role_arn,roleSessionName:e.role_session_name,roleAssumerWithWebIdentity:t.roleAssumerWithWebIdentity,logger:t.logger,parentClientConfig:t.parentClientConfig})({callerClientConfig:r});return W.setCredentialFeature(s,"CREDENTIALS_PROFILE_STS_WEB_ID_TOKEN","q")};var w=async(e,t,r,o,s={},i=!1)=>{let n=t[e];if(Object.keys(s).length>0&&y(n))return g(n,r);if(i||R(n,{profile:e,logger:r.logger}))return A(e,t,r,o,s,w);if(y(n))return g(n,r);if(N(n))return j(n,r,o);if(k(n))return F(r,e);if(D(n))return await h(e,n,r,o);if(O(n))return b(e,r,o);throw new M.CredentialsProviderError(`Could not resolve credentials using profile: [${e}] in configuration/credentials file(s).`,{logger:r.logger})};var V=(e={})=>async({callerClientConfig:t}={})=>{e.logger?.debug("@aws-sdk/credential-provider-ini - fromIni");let r=await u.parseKnownFiles(e);return w(u.getProfileName({profile:e.profile??t?.profile}),r,e,t)};export{V as fromIni};
2
+ import{B}from"./chunk-9w1m9av8.js";import{_}from"./chunk-k9x1r69s.js";import{a}from"./chunk-zkjnt298.js";var u=a(_());var M=a(_());var C=a(B()),d=a(_());var S=a(B()),f=a(_()),v=(e,t,r)=>{let o={EcsContainer:async(s)=>{let{fromHttp:i}=await import("./chunk-5m51j40e.js"),{fromContainerMetadata:n}=await import("./chunk-5mt8xxex.js");return r?.debug("@aws-sdk/credential-provider-ini - credential_source is EcsContainer"),async()=>f.chain(i(s??{}),n(s))().then(p)},Ec2InstanceMetadata:async(s)=>{r?.debug("@aws-sdk/credential-provider-ini - credential_source is Ec2InstanceMetadata");let{fromInstanceMetadata:i}=await import("./chunk-5mt8xxex.js");return async()=>i(s)().then(p)},Environment:async(s)=>{r?.debug("@aws-sdk/credential-provider-ini - credential_source is Environment");let{fromEnv:i}=await import("./chunk-1kdd7xry.js");return async()=>i(s)().then(p)}};if(e in o)return o[e];else throw new f.CredentialsProviderError(`Unsupported credential source in profile ${t}. Got ${e}, expected EcsContainer or Ec2InstanceMetadata or Environment.`,{logger:r})},p=(e)=>S.setCredentialFeature(e,"CREDENTIALS_PROFILE_NAMED_PROVIDER","p");var R=(e,{profile:t="default",logger:r}={})=>Boolean(e)&&typeof e==="object"&&typeof e.role_arn==="string"&&["undefined","string"].indexOf(typeof e.role_session_name)>-1&&["undefined","string"].indexOf(typeof e.external_id)>-1&&["undefined","string"].indexOf(typeof e.mfa_serial)>-1&&(q(e,{profile:t,logger:r})||H(e,{profile:t,logger:r})),q=(e,{profile:t,logger:r})=>{let o=typeof e.source_profile==="string"&&typeof e.credential_source>"u";if(o)r?.debug?.(` ${t} isAssumeRoleWithSourceProfile source_profile=${e.source_profile}`);return o},H=(e,{profile:t,logger:r})=>{let o=typeof e.credential_source==="string"&&typeof e.source_profile>"u";if(o)r?.debug?.(` ${t} isCredentialSourceProfile credential_source=${e.credential_source}`);return o},A=async(e,t,r,o,s={},i)=>{r.logger?.debug("@aws-sdk/credential-provider-ini - resolveAssumeRoleCredentials (STS)");let n=t[e],{source_profile:c,region:K}=n;if(!r.roleAssumer){let{getDefaultRoleAssumer:l}=await import("./chunk-h1fwdz4h.js");r.roleAssumer=l({...r.clientConfig,credentialProviderLogger:r.logger,parentClientConfig:{...o,...r?.parentClientConfig,region:K??r?.parentClientConfig?.region??o?.region}},r.clientPlugins)}if(c&&c in s)throw new d.CredentialsProviderError(`Detected a cycle attempting to resolve credentials for profile ${d.getProfileName(r)}. Profiles visited: `+Object.keys(s).join(", "),{logger:r.logger});r.logger?.debug(`@aws-sdk/credential-provider-ini - finding credential resolver using ${c?`source_profile=[${c}]`:`profile=[${e}]`}`);let P=c?i(c,t,r,o,{...s,[c]:!0},I(t[c]??{})):(await v(n.credential_source,e,r.logger)(r))();if(I(n))return P.then((l)=>C.setCredentialFeature(l,"CREDENTIALS_PROFILE_SOURCE_PROFILE","o"));else{let l={RoleArn:n.role_arn,RoleSessionName:n.role_session_name||`aws-sdk-js-${Date.now()}`,ExternalId:n.external_id,DurationSeconds:parseInt(n.duration_seconds||"3600",10)},{mfa_serial:m}=n;if(m){if(!r.mfaCodeProvider)throw new d.CredentialsProviderError(`Profile ${e} requires multi-factor authentication, but no MFA code callback was provided.`,{logger:r.logger,tryNextLink:!1});l.SerialNumber=m,l.TokenCode=await r.mfaCodeProvider(m)}let G=await P;return r.roleAssumer(G,l).then((U)=>C.setCredentialFeature(U,"CREDENTIALS_PROFILE_SOURCE_PROFILE","o"))}},I=(e)=>!e.role_arn&&!!e.credential_source;var L=a(B()),O=(e)=>Boolean(e&&e.login_session),b=async(e,t,r)=>{let{fromLoginCredentials:o}=await import("./chunk-kypdthjg.js"),s=await o({...t,profile:e})({callerClientConfig:r});return L.setCredentialFeature(s,"CREDENTIALS_PROFILE_LOGIN","AC")};var x=a(B()),k=(e)=>Boolean(e)&&typeof e==="object"&&typeof e.credential_process==="string",F=async(e,t)=>{let{fromProcess:r}=await import("./chunk-16yz5ebn.js"),o=await r({...e,profile:t})();return x.setCredentialFeature(o,"CREDENTIALS_PROFILE_PROCESS","v")};var y=a(B()),h=async(e,t,r={},o)=>{let{fromSSO:s}=await import("./chunk-3t8wz9w8.js");return s({profile:e,logger:r.logger,parentClientConfig:r.parentClientConfig,clientConfig:r.clientConfig})({callerClientConfig:o}).then((i)=>{if(t.sso_session)return y.setCredentialFeature(i,"CREDENTIALS_PROFILE_SSO","r");else return y.setCredentialFeature(i,"CREDENTIALS_PROFILE_SSO_LEGACY","t")})},D=(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 T=a(B()),g=(e)=>Boolean(e)&&typeof e==="object"&&typeof e.aws_access_key_id==="string"&&typeof e.aws_secret_access_key==="string"&&["undefined","string"].indexOf(typeof e.aws_session_token)>-1&&["undefined","string"].indexOf(typeof e.aws_account_id)>-1,w=async(e,t)=>{t?.logger?.debug("@aws-sdk/credential-provider-ini - resolveStaticCredentials");let r={accessKeyId:e.aws_access_key_id,secretAccessKey:e.aws_secret_access_key,sessionToken:e.aws_session_token,...e.aws_credential_scope&&{credentialScope:e.aws_credential_scope},...e.aws_account_id&&{accountId:e.aws_account_id}};return T.setCredentialFeature(r,"CREDENTIALS_PROFILE","n")};var W=a(B()),N=(e)=>Boolean(e)&&typeof e==="object"&&typeof e.web_identity_token_file==="string"&&typeof e.role_arn==="string"&&["undefined","string"].indexOf(typeof e.role_session_name)>-1,j=async(e,t,r)=>{let{fromTokenFile:o}=await import("./chunk-2m2sa0bp.js"),s=await o({webIdentityTokenFile:e.web_identity_token_file,roleArn:e.role_arn,roleSessionName:e.role_session_name,roleAssumerWithWebIdentity:t.roleAssumerWithWebIdentity,logger:t.logger,parentClientConfig:t.parentClientConfig})({callerClientConfig:r});return W.setCredentialFeature(s,"CREDENTIALS_PROFILE_STS_WEB_ID_TOKEN","q")};var E=async(e,t,r,o,s={},i=!1)=>{let n=t[e];if(Object.keys(s).length>0&&g(n))return w(n,r);if(i||R(n,{profile:e,logger:r.logger}))return A(e,t,r,o,s,E);if(g(n))return w(n,r);if(N(n))return j(n,r,o);if(k(n))return F(r,e);if(D(n))return await h(e,n,r,o);if(O(n))return b(e,r,o);throw new M.CredentialsProviderError(`Could not resolve credentials using profile: [${e}] in configuration/credentials file(s).`,{logger:r.logger})};var V=(e={})=>async({callerClientConfig:t}={})=>{e.logger?.debug("@aws-sdk/credential-provider-ini - fromIni");let r=await u.parseKnownFiles(e);return E(u.getProfileName({profile:e.profile??t?.profile}),r,e,t)};export{V as fromIni};
@@ -0,0 +1,2 @@
1
+ // @bun
2
+ import{Do,Rt,ft,k,Un,Uo}from"./chunk-rqrjzz73.js";export{Do as child_process,Rt as crypto,ft as fs,k as path,Un as stream,Uo as util};
@@ -1,3 +1,3 @@
1
1
  // @bun
2
- function at(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{at};
2
+ function lt(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{lt};