@qitqode/qitqode-android-arm64 0.1.23 → 0.1.24

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 (423) hide show
  1. package/bundle/{chunk-9zg3y89v.js → chunk-02txthqv.js} +2 -2
  2. package/bundle/{chunk-q1472d56.js → chunk-0ae5q6ck.js} +2 -2
  3. package/bundle/chunk-0bvde0cx.js +2 -0
  4. package/bundle/chunk-0kbxnazj.js +2 -0
  5. package/bundle/{chunk-ax9yyznf.js → chunk-0pbt75ev.js} +1 -1
  6. package/bundle/{chunk-8hh5ejmr.js → chunk-0pvbk8ks.js} +2 -2
  7. package/bundle/{chunk-9jjjzmvn.js → chunk-0rtshz2r.js} +1 -1
  8. package/bundle/{chunk-8e2wwdgb.js → chunk-0w0jfzb4.js} +1 -1
  9. package/bundle/{chunk-9y65kbcf.js → chunk-0w4v0fbs.js} +2 -2
  10. package/bundle/{chunk-fzzze6zd.js → chunk-0z3z0gk1.js} +2 -2
  11. package/bundle/{chunk-ypff4a5n.js → chunk-17ggas8k.js} +1 -1
  12. package/bundle/chunk-19z5q33z.js +2 -0
  13. package/bundle/chunk-1a0wnwna.js +2 -0
  14. package/bundle/{chunk-3cpqdake.js → chunk-1d64dywx.js} +2 -2
  15. package/bundle/chunk-1ddm2wxv.js +2 -0
  16. package/bundle/chunk-1fk4vsmc.js +2 -0
  17. package/bundle/{chunk-m8tfv36b.js → chunk-1fnmkm0z.js} +2 -2
  18. package/bundle/chunk-1j2f9nd5.js +2 -0
  19. package/bundle/{chunk-b2k9yafd.js → chunk-1jh5p5qw.js} +2 -2
  20. package/bundle/{chunk-0136n3jt.js → chunk-1jsywey3.js} +1 -1
  21. package/bundle/{chunk-29hmwttd.js → chunk-1p34bx7c.js} +2 -2
  22. package/bundle/{chunk-m34zrf70.js → chunk-1xyn0sp2.js} +2 -2
  23. package/bundle/{chunk-g6gs7cc6.js → chunk-1y9t7nxn.js} +1 -1
  24. package/bundle/{chunk-zx90w4mt.js → chunk-21ejqv4v.js} +1 -1
  25. package/bundle/chunk-23geekk5.js +3 -0
  26. package/bundle/chunk-27s736an.js +2 -0
  27. package/bundle/{chunk-y68fp4kt.js → chunk-2eardzxs.js} +1 -1
  28. package/bundle/{chunk-jvkqvgae.js → chunk-2gxjjqfx.js} +1 -1
  29. package/bundle/chunk-2j17xrzj.js +2 -0
  30. package/bundle/{chunk-dq1wprmb.js → chunk-2mmspnr3.js} +1 -1
  31. package/bundle/{chunk-m8njvpb8.js → chunk-2qcndbxv.js} +1 -1
  32. package/bundle/{chunk-z65snfyw.js → chunk-2wp1w8cy.js} +1 -1
  33. package/bundle/{chunk-agx5m1ev.js → chunk-2y8qz8te.js} +1 -1
  34. package/bundle/{chunk-9n6f9n1c.js → chunk-2z6fzwyc.js} +2 -2
  35. package/bundle/chunk-2zca3nak.js +2 -0
  36. package/bundle/chunk-2zcvcfq4.js +2 -0
  37. package/bundle/chunk-38hwkfj5.js +2 -0
  38. package/bundle/chunk-3afqxvsn.js +2 -0
  39. package/bundle/chunk-3avc1ppg.js +7 -0
  40. package/bundle/{chunk-yccm7cfm.js → chunk-3nhqd8wg.js} +3 -3
  41. package/bundle/{chunk-hqv0s6sw.js → chunk-3tdqsm5c.js} +1 -1
  42. package/bundle/{chunk-0vhsc0yh.js → chunk-3tkp27x7.js} +2 -2
  43. package/bundle/chunk-3v4vtah1.js +2 -0
  44. package/bundle/{chunk-cwkdc1cc.js → chunk-3vbtra1j.js} +1 -1
  45. package/bundle/{chunk-b54t7ycj.js → chunk-3wzqs241.js} +1 -1
  46. package/bundle/chunk-3ypk0j2f.js +2 -0
  47. package/bundle/{chunk-jazpapb9.js → chunk-3z1y040p.js} +2 -2
  48. package/bundle/{chunk-3w60y2x5.js → chunk-453wpzg6.js} +1 -1
  49. package/bundle/chunk-4aykrj51.js +9 -0
  50. package/bundle/{chunk-ejy5404v.js → chunk-4d1a547n.js} +1 -1
  51. package/bundle/chunk-4dtbmqmq.js +2 -0
  52. package/bundle/{chunk-7pr4jxkn.js → chunk-4k149ews.js} +1 -1
  53. package/bundle/{chunk-hyr049cr.js → chunk-4kse3awh.js} +1 -1
  54. package/bundle/chunk-4q9w2yve.js +5 -0
  55. package/bundle/{chunk-1gg4c0pq.js → chunk-4tn69nqs.js} +1 -1
  56. package/bundle/chunk-4zjb6rps.js +2 -0
  57. package/bundle/{chunk-px15ev1g.js → chunk-58enbars.js} +2 -2
  58. package/bundle/{chunk-07szgr15.js → chunk-5h2hcp46.js} +1 -1
  59. package/bundle/chunk-5hkcjgwh.js +2 -0
  60. package/bundle/{chunk-7b69jj5g.js → chunk-5kmfnkzv.js} +1 -1
  61. package/bundle/{chunk-hvcdemxe.js → chunk-5rkmhzq0.js} +2 -2
  62. package/bundle/chunk-5snrz263.js +2 -0
  63. package/bundle/{chunk-erh9y0sx.js → chunk-5y8efy5b.js} +1 -1
  64. package/bundle/chunk-653c0mxr.js +11 -0
  65. package/bundle/chunk-6av7hrrk.js +7 -0
  66. package/bundle/chunk-6bswn7w5.js +2 -0
  67. package/bundle/{chunk-sgq94p3x.js → chunk-6dxaty1v.js} +1 -1
  68. package/bundle/chunk-6epghftw.js +2 -0
  69. package/bundle/{chunk-a3te67a5.js → chunk-6g3m7yxf.js} +2 -2
  70. package/bundle/{chunk-5x19yah0.js → chunk-6j0365q3.js} +2 -2
  71. package/bundle/chunk-6jjhxh8p.js +2 -0
  72. package/bundle/{chunk-101y7ce2.js → chunk-6mscvf6y.js} +1 -1
  73. package/bundle/{chunk-mj7rk4xs.js → chunk-6nhje520.js} +1 -1
  74. package/bundle/{chunk-5wr5gpaa.js → chunk-6sdh1q7g.js} +1 -1
  75. package/bundle/{chunk-bwvjft74.js → chunk-6szvs3k9.js} +1 -1
  76. package/bundle/chunk-6ws7xyc5.js +2 -0
  77. package/bundle/{chunk-n889mwgv.js → chunk-78bajmqm.js} +1 -1
  78. package/bundle/{chunk-3wzpdvpg.js → chunk-7a6p7dfx.js} +1 -1
  79. package/bundle/{chunk-kfdqfha0.js → chunk-7dckfame.js} +1 -1
  80. package/bundle/chunk-7g28zhar.js +2 -0
  81. package/bundle/{chunk-w6t1qmeg.js → chunk-7gczzccz.js} +1 -1
  82. package/bundle/{chunk-2wcwbp3t.js → chunk-7mhffm9f.js} +199 -198
  83. package/bundle/{chunk-7bxe5s20.js → chunk-7tgm8wp5.js} +1 -1
  84. package/bundle/chunk-7v02b2ms.js +2 -0
  85. package/bundle/chunk-7vmp2034.js +2 -0
  86. package/bundle/chunk-7wxrypkr.js +2 -0
  87. package/bundle/{chunk-576zfh1s.js → chunk-7y3y3j51.js} +2 -2
  88. package/bundle/{chunk-vay29sqp.js → chunk-7yf15a3a.js} +1 -1
  89. package/bundle/{chunk-qzd0q1jg.js → chunk-82gs5cmn.js} +1 -1
  90. package/bundle/{chunk-wf2mj6de.js → chunk-84gnbzky.js} +1 -1
  91. package/bundle/{chunk-3xf7q4ww.js → chunk-8651hq0k.js} +1 -1
  92. package/bundle/{chunk-g8zrn0at.js → chunk-8717htya.js} +1 -1
  93. package/bundle/{chunk-b8z4hgq0.js → chunk-8ace31r2.js} +1 -1
  94. package/bundle/{chunk-2e9a9brg.js → chunk-8cr7ks31.js} +1 -1
  95. package/bundle/{chunk-3ne6j2h5.js → chunk-8h9r6c8g.js} +2 -2
  96. package/bundle/chunk-8kk9gvdy.js +2 -0
  97. package/bundle/{chunk-haw1jzwb.js → chunk-8pe047p0.js} +1 -1
  98. package/bundle/{chunk-22tf95dw.js → chunk-8r79zf3y.js} +2 -2
  99. package/bundle/chunk-8ygpp4y3.js +2 -0
  100. package/bundle/chunk-95q60g1p.js +2 -0
  101. package/bundle/{chunk-5d18fd4p.js → chunk-9798jffg.js} +1 -1
  102. package/bundle/{chunk-r0sjwtfc.js → chunk-99n6czag.js} +2 -2
  103. package/bundle/{chunk-bwgnmy92.js → chunk-9easaxy7.js} +1 -1
  104. package/bundle/{chunk-wk11xsdh.js → chunk-9f7y0dj0.js} +1 -1
  105. package/bundle/{chunk-799c17nk.js → chunk-9jf67xb0.js} +2 -2
  106. package/bundle/chunk-9mjbenja.js +2 -0
  107. package/bundle/{chunk-381j1hqf.js → chunk-9nx8hm57.js} +1 -1
  108. package/bundle/{chunk-bqeyh2gx.js → chunk-9pe4agdz.js} +2 -2
  109. package/bundle/{chunk-k0v37hc6.js → chunk-9rqrm9y8.js} +1 -1
  110. package/bundle/{chunk-qx9j6nz1.js → chunk-9sy9ws1w.js} +1 -1
  111. package/bundle/{chunk-62yja34m.js → chunk-9vcw33dv.js} +1 -1
  112. package/bundle/chunk-9vn1gy8h.js +2 -0
  113. package/bundle/{chunk-wmmck56g.js → chunk-9xvctnjr.js} +1 -1
  114. package/bundle/{chunk-apv1v4tk.js → chunk-a5zjrwqy.js} +2 -2
  115. package/bundle/{chunk-jj7wrfty.js → chunk-a9y27zd2.js} +1 -1
  116. package/bundle/{chunk-m3gsrb1x.js → chunk-ac202abt.js} +1 -1
  117. package/bundle/{chunk-brrtcqrc.js → chunk-agdfqncf.js} +2 -2
  118. package/bundle/chunk-ajp3f08k.js +2 -0
  119. package/bundle/{chunk-y0qaz8db.js → chunk-am73j1bt.js} +1 -1
  120. package/bundle/{chunk-2es79khv.js → chunk-apq38bt4.js} +3 -3
  121. package/bundle/chunk-aptkpdkc.js +2 -0
  122. package/bundle/{chunk-7n994qss.js → chunk-b643cra9.js} +211 -211
  123. package/bundle/{chunk-2e76kpa6.js → chunk-b6m4yyww.js} +1 -1
  124. package/bundle/{chunk-v1hvnq7y.js → chunk-b8ag61vj.js} +1 -1
  125. package/bundle/{chunk-k0arcqnt.js → chunk-bas6x25m.js} +2 -2
  126. package/bundle/{chunk-q6x5bmc3.js → chunk-bd21p9zz.js} +2 -2
  127. package/bundle/{chunk-fp5mvrrx.js → chunk-bf146hz2.js} +2 -2
  128. package/bundle/{chunk-s7sksztt.js → chunk-bky5a42k.js} +2 -2
  129. package/bundle/chunk-bry94ar5.js +2 -0
  130. package/bundle/chunk-btzyvqkf.js +2 -0
  131. package/bundle/{chunk-hs8qwx4n.js → chunk-c31k8yh0.js} +1 -1
  132. package/bundle/chunk-c94pjdfh.js +2 -0
  133. package/bundle/chunk-cct9ds5c.js +2 -0
  134. package/bundle/{chunk-3j6nrrva.js → chunk-cesrhm09.js} +1 -1
  135. package/bundle/{chunk-mwjhyj53.js → chunk-cvchztkc.js} +1 -1
  136. package/bundle/{chunk-12cd1yj9.js → chunk-cy2586rv.js} +1 -1
  137. package/bundle/chunk-czn535v0.js +2 -0
  138. package/bundle/chunk-d56zc21w.js +3 -0
  139. package/bundle/chunk-d7wd5hz1.js +2 -0
  140. package/bundle/chunk-d86cmjrp.js +2 -0
  141. package/bundle/{chunk-t86vj45b.js → chunk-dann9gfq.js} +1 -1
  142. package/bundle/{chunk-nb0gc3sx.js → chunk-dcx8hjbs.js} +1 -1
  143. package/bundle/{chunk-p33fchnf.js → chunk-dgzyn27r.js} +1 -1
  144. package/bundle/{chunk-shav33fq.js → chunk-dkm7x8rj.js} +2 -2
  145. package/bundle/chunk-dkv2mg97.js +3 -0
  146. package/bundle/chunk-dnq65xvn.js +2 -0
  147. package/bundle/chunk-dpqv8rtn.js +2 -0
  148. package/bundle/chunk-e346x00p.js +10 -0
  149. package/bundle/chunk-e9mh7s3z.js +2 -0
  150. package/bundle/{chunk-26m5yn5d.js → chunk-ebjhggdw.js} +1 -1
  151. package/bundle/{chunk-ntfh16rj.js → chunk-ecwz9nhs.js} +2 -2
  152. package/bundle/{chunk-jge74hh4.js → chunk-edvcz2gd.js} +1 -1
  153. package/bundle/chunk-ek2y5f6g.js +2 -0
  154. package/bundle/{chunk-dsny9dh8.js → chunk-ep8zn49w.js} +2 -2
  155. package/bundle/chunk-epdsay73.js +2 -0
  156. package/bundle/{chunk-y3qf1kg9.js → chunk-evqxvhdb.js} +1 -1
  157. package/bundle/{chunk-58w4dhb6.js → chunk-ewyk4py6.js} +1 -1
  158. package/bundle/{chunk-scb48j07.js → chunk-f3kjp838.js} +2 -2
  159. package/bundle/{chunk-3w9k7yxx.js → chunk-f819a7ec.js} +1 -1
  160. package/bundle/chunk-f89gntcy.js +3 -0
  161. package/bundle/{chunk-eqed7tvt.js → chunk-fdezde1z.js} +1 -1
  162. package/bundle/chunk-ffnsn7tv.js +2 -0
  163. package/bundle/{chunk-7tb9fjvq.js → chunk-fhng5her.js} +2 -2
  164. package/bundle/chunk-fkezc7ew.js +2 -0
  165. package/bundle/{chunk-88kt6qmd.js → chunk-fkvccmgk.js} +2 -2
  166. package/bundle/{chunk-k5294ajv.js → chunk-fm4xa6yx.js} +2 -2
  167. package/bundle/{chunk-fhjpfzjc.js → chunk-frdc3ysq.js} +1 -1
  168. package/bundle/chunk-fsxddgj0.js +2 -0
  169. package/bundle/{chunk-kbhby60s.js → chunk-ftk58wxe.js} +1 -1
  170. package/bundle/{chunk-shxny9x9.js → chunk-g0v9g37f.js} +1 -1
  171. package/bundle/{chunk-afpwjn78.js → chunk-g7vkkmsk.js} +3 -3
  172. package/bundle/chunk-gbcsfg6v.js +2 -0
  173. package/bundle/{chunk-y2h0adg5.js → chunk-gc9q0x8z.js} +3 -3
  174. package/bundle/{chunk-s75chpxq.js → chunk-gen6f3dn.js} +2 -2
  175. package/bundle/{chunk-1eg8mr1q.js → chunk-gf4ek7rv.js} +1 -1
  176. package/bundle/{chunk-1w8b88y5.js → chunk-gff87y4n.js} +1 -1
  177. package/bundle/chunk-gfmz85hp.js +2 -0
  178. package/bundle/chunk-gk63k4t6.js +2 -0
  179. package/bundle/{chunk-g7742sqm.js → chunk-gn7xgd4c.js} +1 -1
  180. package/bundle/{chunk-6j07cgna.js → chunk-gn9p1d50.js} +1 -1
  181. package/bundle/{chunk-yyarzhw3.js → chunk-gvzfffr4.js} +1 -1
  182. package/bundle/{chunk-zeh3mjgp.js → chunk-ha1w0xzh.js} +1 -1
  183. package/bundle/{chunk-vxc5q0wk.js → chunk-hbnr0j7h.js} +2 -2
  184. package/bundle/chunk-hg563h5r.js +3 -0
  185. package/bundle/{chunk-8k4mkrdw.js → chunk-hg9nk090.js} +1 -1
  186. package/bundle/{chunk-gjsaw7wm.js → chunk-hh3w51wp.js} +2 -2
  187. package/bundle/{chunk-naq602da.js → chunk-hh4c02fh.js} +1 -1
  188. package/bundle/{chunk-k1ht1sjr.js → chunk-hh9a709t.js} +1 -1
  189. package/bundle/{chunk-7tthc48p.js → chunk-hjbks7r9.js} +1 -1
  190. package/bundle/{chunk-ky840wjj.js → chunk-hqg5qbxk.js} +1 -1
  191. package/bundle/{chunk-0svy8w30.js → chunk-hv4nhx6q.js} +2 -2
  192. package/bundle/{chunk-26mt118z.js → chunk-hxgb0y1w.js} +1 -1
  193. package/bundle/chunk-j0vf8s12.js +2 -0
  194. package/bundle/chunk-j1a64ade.js +3 -0
  195. package/bundle/chunk-j1bxt69x.js +2 -0
  196. package/bundle/{chunk-t42kh492.js → chunk-j1veq3zr.js} +2 -2
  197. package/bundle/{chunk-c38ppnm8.js → chunk-jbd9k041.js} +2 -2
  198. package/bundle/chunk-jcem8s30.js +2 -0
  199. package/bundle/{chunk-z1hd38wp.js → chunk-jegn6jc3.js} +2 -2
  200. package/bundle/chunk-jjwjb9w0.js +3 -0
  201. package/bundle/{chunk-87pzwjjj.js → chunk-jmjg8d8a.js} +4 -4
  202. package/bundle/chunk-jpham2a3.js +2 -0
  203. package/bundle/{chunk-jq6y56m5.js → chunk-jpygkh1c.js} +1 -1
  204. package/bundle/{chunk-rwanncah.js → chunk-jr8qcf99.js} +2 -2
  205. package/bundle/{chunk-rmmyjyr9.js → chunk-jr9xnvjq.js} +1 -1
  206. package/bundle/{chunk-t66hycva.js → chunk-jz3aav8a.js} +2 -2
  207. package/bundle/chunk-jzkymnr5.js +2 -0
  208. package/bundle/chunk-k0qtwnhb.js +2 -0
  209. package/bundle/{chunk-bkaprkf6.js → chunk-k16hzy2q.js} +1 -1
  210. package/bundle/chunk-k2rsky7z.js +2 -0
  211. package/bundle/{chunk-an5sr6gw.js → chunk-k9d927xe.js} +1 -1
  212. package/bundle/{chunk-cz8nnm2a.js → chunk-k9g77a02.js} +1 -1
  213. package/bundle/{chunk-sjqgmp12.js → chunk-kaeyhw2n.js} +2 -2
  214. package/bundle/{chunk-kpkbyek5.js → chunk-kc3hpmr2.js} +2 -2
  215. package/bundle/chunk-kcetcysa.js +2 -0
  216. package/bundle/chunk-kjfc5v3s.js +2 -0
  217. package/bundle/chunk-kkvb2c2z.js +8 -0
  218. package/bundle/chunk-km2ayfyf.js +2 -0
  219. package/bundle/chunk-knrh89eb.js +2 -0
  220. package/bundle/{chunk-g0vzdt58.js → chunk-kr0fsqas.js} +1 -1
  221. package/bundle/chunk-ksqfjawv.js +2 -0
  222. package/bundle/{chunk-863s0tqa.js → chunk-ktmazmas.js} +2 -2
  223. package/bundle/{chunk-c4x99ayd.js → chunk-m8djypsy.js} +1 -1
  224. package/bundle/{chunk-qr2ave8f.js → chunk-mj24ntn9.js} +1 -1
  225. package/bundle/chunk-mjhb1q0n.js +3 -0
  226. package/bundle/{chunk-c546xxjk.js → chunk-ms1fd6h4.js} +1 -1
  227. package/bundle/chunk-mxcger73.js +2 -0
  228. package/bundle/{chunk-tfpwfczs.js → chunk-n1chdwrs.js} +1 -1
  229. package/bundle/{chunk-mt8btwrv.js → chunk-najzfhb2.js} +1 -1
  230. package/bundle/chunk-nazkrkeb.js +2 -0
  231. package/bundle/chunk-nk01s49e.js +2 -0
  232. package/bundle/{chunk-9tq5yt3t.js → chunk-ns0pswww.js} +1 -1
  233. package/bundle/chunk-ns8b7rx1.js +2 -0
  234. package/bundle/chunk-ny6vpkx2.js +2 -0
  235. package/bundle/{chunk-qkn4039t.js → chunk-p4hpr8d7.js} +1 -1
  236. package/bundle/{chunk-n1m5qdf5.js → chunk-p54bzjtv.js} +1 -1
  237. package/bundle/{chunk-q1nvfmrm.js → chunk-pb7rnkke.js} +1 -1
  238. package/bundle/{chunk-70gfpkxv.js → chunk-pfhp78cr.js} +1 -1
  239. package/bundle/{chunk-y2r3zker.js → chunk-ps543k72.js} +1 -1
  240. package/bundle/{chunk-w9vv1whr.js → chunk-pv8jcpnf.js} +1 -1
  241. package/bundle/{chunk-9yaw0hbp.js → chunk-pyq01301.js} +1 -1
  242. package/bundle/chunk-q0dd3ak6.js +3 -0
  243. package/bundle/chunk-q2s057bm.js +2 -0
  244. package/bundle/{chunk-2qy760rf.js → chunk-q3x4x2tq.js} +1 -1
  245. package/bundle/chunk-q5cqg2c0.js +28 -0
  246. package/bundle/{chunk-kktcccep.js → chunk-q6fbyvpq.js} +1 -1
  247. package/bundle/chunk-qk2wnp2x.js +2 -0
  248. package/bundle/{chunk-05badzhy.js → chunk-qw2hgs5b.js} +2 -2
  249. package/bundle/{chunk-5dpev64z.js → chunk-qywwj58s.js} +2 -2
  250. package/bundle/chunk-r012q335.js +3 -0
  251. package/bundle/{chunk-5vyper2h.js → chunk-r3yqe7x0.js} +1 -1
  252. package/bundle/{chunk-xqzbcs8x.js → chunk-r48g0kaq.js} +2 -2
  253. package/bundle/{chunk-22vvjp4g.js → chunk-r7xp0xcn.js} +2 -2
  254. package/bundle/chunk-rbdjbgkb.js +2 -0
  255. package/bundle/{chunk-m81z3zgm.js → chunk-rvvfs9ps.js} +2 -2
  256. package/bundle/chunk-rxjprhgh.js +2 -0
  257. package/bundle/chunk-s3w9bmze.js +2 -0
  258. package/bundle/chunk-s3zste1a.js +2 -0
  259. package/bundle/{chunk-f958hsha.js → chunk-s9amvacw.js} +2 -2
  260. package/bundle/chunk-sbt7qmwm.js +3 -0
  261. package/bundle/chunk-sf6h44pb.js +2 -0
  262. package/bundle/{chunk-kn9skc0g.js → chunk-sgtgvzv6.js} +1 -1
  263. package/bundle/chunk-sgvzxs7m.js +2 -0
  264. package/bundle/{chunk-ac69b9tm.js → chunk-sjrmhd3e.js} +1 -1
  265. package/bundle/chunk-sp9bndyh.js +2 -0
  266. package/bundle/{chunk-7m4camry.js → chunk-spm1yy6w.js} +1 -1
  267. package/bundle/{chunk-xtj5qqsw.js → chunk-srf73nm4.js} +1 -1
  268. package/bundle/{chunk-fnect0ny.js → chunk-sswbfqcq.js} +1 -1
  269. package/bundle/{chunk-zzdbrxkh.js → chunk-t488d66k.js} +1 -1
  270. package/bundle/{chunk-w6zgm4vn.js → chunk-t6w96xq2.js} +1 -1
  271. package/bundle/{chunk-xjr0xy58.js → chunk-te1zfpzv.js} +1 -1
  272. package/bundle/{chunk-mwbcmvmh.js → chunk-tk3bve0x.js} +2 -2
  273. package/bundle/chunk-tsn1jkr7.js +2 -0
  274. package/bundle/{chunk-dn1jryxz.js → chunk-tzc4jkzg.js} +1 -1
  275. package/bundle/{chunk-kdr6nxmk.js → chunk-v2kyarwz.js} +2 -2
  276. package/bundle/{chunk-mg03szpz.js → chunk-v7r9np94.js} +1 -1
  277. package/bundle/{chunk-my0kzcby.js → chunk-va4davgy.js} +317 -297
  278. package/bundle/{chunk-febbrhev.js → chunk-vavrczqm.js} +1 -1
  279. package/bundle/{chunk-hk1ha5fj.js → chunk-ve5gb789.js} +2 -2
  280. package/bundle/{chunk-ar1by07g.js → chunk-vf1r5ckp.js} +1 -1
  281. package/bundle/{chunk-hnzs3ywg.js → chunk-vftqwdpg.js} +1 -1
  282. package/bundle/chunk-vg4styg5.js +2 -0
  283. package/bundle/chunk-vh09hhcs.js +2 -0
  284. package/bundle/chunk-vhktpm0n.js +2 -0
  285. package/bundle/{chunk-36c2avm4.js → chunk-vvypb02q.js} +1 -1
  286. package/bundle/{chunk-g6tw5dvr.js → chunk-vzjcmwry.js} +2 -2
  287. package/bundle/{chunk-fvwys8ej.js → chunk-w1atxyz0.js} +1 -1
  288. package/bundle/{chunk-44amvtcs.js → chunk-w7p2x973.js} +2 -2
  289. package/bundle/{chunk-ecczet3b.js → chunk-wa2ce2sg.js} +2 -2
  290. package/bundle/{chunk-24r5h0fx.js → chunk-wf09j72q.js} +2 -2
  291. package/bundle/{chunk-w8r4gjea.js → chunk-wfnk2vsd.js} +1 -1
  292. package/bundle/{chunk-1vx26nt2.js → chunk-wj6aq50n.js} +1 -1
  293. package/bundle/{chunk-39h565hz.js → chunk-wmrq9qqf.js} +1 -1
  294. package/bundle/{chunk-cbfjjbfd.js → chunk-wmw2gne9.js} +2 -2
  295. package/bundle/chunk-wtp0yvqw.js +2 -0
  296. package/bundle/{chunk-g7g3zm4v.js → chunk-x6z2b63w.js} +1 -1
  297. package/bundle/{chunk-g5g9r3v5.js → chunk-xccs5c50.js} +1 -1
  298. package/bundle/{chunk-2adsn1ca.js → chunk-xj73j10a.js} +1 -1
  299. package/bundle/chunk-xmzs7q66.js +2 -0
  300. package/bundle/chunk-xv80476w.js +2 -0
  301. package/bundle/{chunk-gz8x3915.js → chunk-xv8gnkh5.js} +1 -1
  302. package/bundle/{chunk-g2ec45xj.js → chunk-y1srca0c.js} +2 -2
  303. package/bundle/{chunk-gzse9pab.js → chunk-y2jmtfdh.js} +2 -2
  304. package/bundle/{chunk-c7dt464m.js → chunk-y3n31nnx.js} +2 -2
  305. package/bundle/{chunk-2qj66wf5.js → chunk-ygj1cy0n.js} +1 -1
  306. package/bundle/{chunk-k3pvgwgc.js → chunk-yh174jhg.js} +2 -2
  307. package/bundle/chunk-yjvr0et1.js +2 -0
  308. package/bundle/{chunk-63pvqy8n.js → chunk-yz7rqzby.js} +3 -3
  309. package/bundle/{chunk-w32tj884.js → chunk-yzdty5t9.js} +2 -2
  310. package/bundle/{chunk-yffkcska.js → chunk-zavtsfxz.js} +1 -1
  311. package/bundle/{chunk-y62tnk9q.js → chunk-zeh481tm.js} +2 -2
  312. package/bundle/{chunk-cn7nnjsf.js → chunk-zfnbk5gy.js} +1 -1
  313. package/bundle/{chunk-tydvpy1s.js → chunk-zk8n8hnh.js} +2 -2
  314. package/bundle/{chunk-agyxa9nj.js → chunk-zp2ffbc2.js} +2 -2
  315. package/bundle/chunk-zx3kcfkj.js +2 -0
  316. package/bundle/index.js +4 -4
  317. package/bundle/parser.worker.js +2 -2
  318. package/bundle/worker.js +1 -1
  319. package/package.json +1 -1
  320. package/bundle/chunk-1by6y9tm.js +0 -2
  321. package/bundle/chunk-1gjh45v5.js +0 -9
  322. package/bundle/chunk-1p7wqmxp.js +0 -2
  323. package/bundle/chunk-1v47v7vm.js +0 -3
  324. package/bundle/chunk-21hnx8rx.js +0 -24
  325. package/bundle/chunk-22pvftx8.js +0 -2
  326. package/bundle/chunk-2bce1njy.js +0 -2
  327. package/bundle/chunk-338hbnza.js +0 -11
  328. package/bundle/chunk-3gsvbfqz.js +0 -2
  329. package/bundle/chunk-3sem578c.js +0 -3
  330. package/bundle/chunk-3vgnqaem.js +0 -2
  331. package/bundle/chunk-3xrhxyz9.js +0 -2
  332. package/bundle/chunk-3zdyrnvp.js +0 -2
  333. package/bundle/chunk-4nhbgva1.js +0 -2
  334. package/bundle/chunk-5ch23jj3.js +0 -2
  335. package/bundle/chunk-5hzkd9te.js +0 -2
  336. package/bundle/chunk-5vwhfa42.js +0 -2
  337. package/bundle/chunk-662x3gq6.js +0 -2
  338. package/bundle/chunk-6an0pk19.js +0 -2
  339. package/bundle/chunk-6ybqwnp7.js +0 -2
  340. package/bundle/chunk-7365jzj1.js +0 -2
  341. package/bundle/chunk-7amvpgng.js +0 -2
  342. package/bundle/chunk-7dcz5ytp.js +0 -2
  343. package/bundle/chunk-7h7bwjmm.js +0 -2
  344. package/bundle/chunk-7vk5fhhv.js +0 -2
  345. package/bundle/chunk-7vqw9wge.js +0 -2
  346. package/bundle/chunk-7vxk5t11.js +0 -2
  347. package/bundle/chunk-83fm5xcn.js +0 -2
  348. package/bundle/chunk-8b644ae2.js +0 -2
  349. package/bundle/chunk-av2q0ffj.js +0 -2
  350. package/bundle/chunk-avk3wfch.js +0 -7
  351. package/bundle/chunk-azna4wdf.js +0 -2
  352. package/bundle/chunk-b192q4m0.js +0 -2
  353. package/bundle/chunk-bh46627y.js +0 -2
  354. package/bundle/chunk-c267ggx2.js +0 -2
  355. package/bundle/chunk-c6kxegws.js +0 -2
  356. package/bundle/chunk-cek3cfz4.js +0 -2
  357. package/bundle/chunk-ete0y35c.js +0 -2
  358. package/bundle/chunk-f1mmzzsn.js +0 -2
  359. package/bundle/chunk-f66cvq2q.js +0 -2
  360. package/bundle/chunk-fd1vbz1f.js +0 -3
  361. package/bundle/chunk-fq4v97xn.js +0 -2
  362. package/bundle/chunk-fw1f6br4.js +0 -2
  363. package/bundle/chunk-g3pb8rad.js +0 -2
  364. package/bundle/chunk-gc1yetqd.js +0 -2
  365. package/bundle/chunk-gtckkn15.js +0 -2
  366. package/bundle/chunk-gtzreftf.js +0 -2
  367. package/bundle/chunk-hg7kfd0t.js +0 -3
  368. package/bundle/chunk-j5vahbw1.js +0 -2
  369. package/bundle/chunk-jek1cnfk.js +0 -3
  370. package/bundle/chunk-jevrajsx.js +0 -2
  371. package/bundle/chunk-jzdks7bv.js +0 -2
  372. package/bundle/chunk-k1e7w7w5.js +0 -2
  373. package/bundle/chunk-k33xx2z9.js +0 -2
  374. package/bundle/chunk-k6vf6vq6.js +0 -2
  375. package/bundle/chunk-kn391hb2.js +0 -2
  376. package/bundle/chunk-knmba0q6.js +0 -2
  377. package/bundle/chunk-knnemqfm.js +0 -3
  378. package/bundle/chunk-kx4b39v6.js +0 -2
  379. package/bundle/chunk-mah572rs.js +0 -2
  380. package/bundle/chunk-mg6nwfw3.js +0 -2
  381. package/bundle/chunk-pdgrang4.js +0 -2
  382. package/bundle/chunk-r3q82hz3.js +0 -2
  383. package/bundle/chunk-r4ygs0jv.js +0 -2
  384. package/bundle/chunk-r6xhxvjv.js +0 -2
  385. package/bundle/chunk-r79mz5kd.js +0 -5
  386. package/bundle/chunk-r99pnfra.js +0 -2
  387. package/bundle/chunk-rjjgnvdk.js +0 -2
  388. package/bundle/chunk-rq4xdyst.js +0 -2
  389. package/bundle/chunk-rsd3v7cg.js +0 -2
  390. package/bundle/chunk-rxsgbdv0.js +0 -2
  391. package/bundle/chunk-s4x1jhj3.js +0 -2
  392. package/bundle/chunk-sx760d9d.js +0 -2
  393. package/bundle/chunk-tmjd3evp.js +0 -8
  394. package/bundle/chunk-tp1d856p.js +0 -2
  395. package/bundle/chunk-tpxs00p5.js +0 -2
  396. package/bundle/chunk-tqk12r89.js +0 -2
  397. package/bundle/chunk-tycgrqgq.js +0 -2
  398. package/bundle/chunk-tz8qhbk9.js +0 -3
  399. package/bundle/chunk-v1y3pbfv.js +0 -2
  400. package/bundle/chunk-v32cyrg2.js +0 -2
  401. package/bundle/chunk-v7pypmvk.js +0 -2
  402. package/bundle/chunk-vbqyddy8.js +0 -2
  403. package/bundle/chunk-vgx86f2r.js +0 -2
  404. package/bundle/chunk-w0jvqdez.js +0 -2
  405. package/bundle/chunk-w79yek40.js +0 -2
  406. package/bundle/chunk-w7nxsfbd.js +0 -3
  407. package/bundle/chunk-wcea06cr.js +0 -2
  408. package/bundle/chunk-wcx4bbvn.js +0 -2
  409. package/bundle/chunk-wdw183vh.js +0 -2
  410. package/bundle/chunk-wqd3svh6.js +0 -2
  411. package/bundle/chunk-wqe5spdq.js +0 -2
  412. package/bundle/chunk-wqww2byk.js +0 -2
  413. package/bundle/chunk-wybd806z.js +0 -2
  414. package/bundle/chunk-x1vb00hr.js +0 -2
  415. package/bundle/chunk-xafh07r3.js +0 -2
  416. package/bundle/chunk-xgzjcsad.js +0 -2
  417. package/bundle/chunk-xn0xhd0w.js +0 -3
  418. package/bundle/chunk-xnbfy5jy.js +0 -2
  419. package/bundle/chunk-xxed39zx.js +0 -3
  420. package/bundle/chunk-y6pzag4n.js +0 -2
  421. package/bundle/chunk-y7w6fjwt.js +0 -2
  422. package/bundle/chunk-yr4evt94.js +0 -7
  423. package/bundle/chunk-z195gv71.js +0 -2
@@ -1,2 +1,2 @@
1
1
  // @bun
2
- import{h as P,i as g,j as b,k as h,l as O}from"./chunk-k0v37hc6.js";import"./chunk-3ne6j2h5.js";import"./chunk-799c17nk.js";import{Od as u}from"./chunk-wmmck56g.js";import{Sf as s}from"./chunk-s75chpxq.js";import{qh as f}from"./chunk-my0kzcby.js";import"./chunk-1v47v7vm.js";import{Ah as E}from"./chunk-tmjd3evp.js";import"./chunk-q6x5bmc3.js";import"./chunk-n1m5qdf5.js";import"./chunk-zeh3mjgp.js";import"./chunk-ntfh16rj.js";import"./chunk-tz8qhbk9.js";import"./chunk-hvcdemxe.js";import{Gj as S,Hj as p}from"./chunk-2wcwbp3t.js";import"./chunk-3sem578c.js";import"./chunk-fzzze6zd.js";import"./chunk-afpwjn78.js";import"./chunk-c4x99ayd.js";import"./chunk-44amvtcs.js";import"./chunk-cbfjjbfd.js";import"./chunk-c7dt464m.js";import"./chunk-jazpapb9.js";import"./chunk-knnemqfm.js";import"./chunk-hqv0s6sw.js";import"./chunk-apv1v4tk.js";import"./chunk-7tb9fjvq.js";import"./chunk-fp5mvrrx.js";import"./chunk-zzdbrxkh.js";import"./chunk-cqtkxwd8.js";import"./chunk-xtj5qqsw.js";import"./chunk-w32tj884.js";import"./chunk-29hmwttd.js";import"./chunk-2qy760rf.js";import"./chunk-kfdqfha0.js";import"./chunk-t42kh492.js";import"./chunk-8hh5ejmr.js";import"./chunk-mwbcmvmh.js";import"./chunk-9y65kbcf.js";import"./chunk-24r5h0fx.js";import"./chunk-vxc5q0wk.js";import"./chunk-dsny9dh8.js";import"./chunk-scb48j07.js";import"./chunk-k33xx2z9.js";import"./chunk-tydvpy1s.js";import"./chunk-b2k9yafd.js";import"./chunk-sjqgmp12.js";import"./chunk-jek1cnfk.js";import"./chunk-s7sksztt.js";import"./chunk-22vvjp4g.js";import"./chunk-a3te67a5.js";import{Lz as I}from"./chunk-kdr6nxmk.js";import{bI as l,gC as d,xD as D}from"./chunk-shav33fq.js";import"./chunk-bqeyh2gx.js";import"./chunk-kpkbyek5.js";import"./chunk-naq602da.js";var A=(o)=>l.promise(()=>E(o)),m=(o)=>l.sync(()=>s.println(o)),v=(o)=>s.Style.TEXT_DIM+o+s.Style.TEXT_NORMAL,L=(o)=>o?v(" (active)"):"",w=(o,e)=>`${o.email} ${v(o.url)}${L(e)}`,x=(o,e,t)=>`${e.name} (${o.email})${L(t)}`,C=(o,e,t)=>{let n=t?s.Style.TEXT_SUCCESS+"\u25CF"+s.Style.TEXT_NORMAL:" ",c=t?s.Style.TEXT_HIGHLIGHT_BOLD+e.name+s.Style.TEXT_NORMAL:e.name;return` ${n} ${c} ${v(o.email)} ${v(o.url)} ${v(e.id)}`},T=(o,e)=>d.isSome(o)&&o.value.id===e.accountID&&o.value.active_org_id===e.orgID,_=l.fn("login")(function*(o){let e=yield*p.Service;yield*P("Log in");let t=yield*e.login(o);yield*b.info("Go to: "+t.url),yield*b.info("Enter code: "+t.user),yield*A(t.url);let n=O();yield*n.start("Waiting for authorization...");let c=(r)=>l.gen(function*(){yield*l.sleep(r);let i=yield*e.poll(t);if(i._tag==="PollPending")return yield*c(r);if(i._tag==="PollSlow")return yield*c(D.sum(r,D.seconds(5)));return i}),a=yield*c(t.interval).pipe(l.timeout(t.expiry),l.catchTag("TimeoutError",()=>l.succeed(new S)));yield*I.valueTags(a,{PollSuccess:(r)=>l.gen(function*(){yield*n.stop("Logged in as "+r.email),yield*g("Done")}),PollExpired:()=>n.stop("Device code expired",1),PollDenied:()=>n.stop("Authorization denied",1),PollError:(r)=>n.stop("Error: "+String(r.cause),1),PollPending:()=>n.stop("Unexpected state",1),PollSlow:()=>n.stop("Unexpected state",1)})}),N=l.fn("logout")(function*(o){let e=yield*p.Service,t=yield*e.list();if(t.length===0)return yield*m("Not logged in");if(o){let i=t.find((y)=>y.email===o);if(!i)return yield*m("Account not found: "+o);yield*e.remove(i.id),yield*g("Logged out from "+o);return}let n=yield*e.active(),c=d.map(n,(i)=>i.id);yield*P("Log out");let a=t.map((i)=>{let y=d.isSome(c)&&c.value===i.id;return{value:i,label:w(i,y)}}),r=yield*h({message:"Select account to log out",options:a});if(d.isNone(r))return;yield*e.remove(r.value.id),yield*g("Logged out from "+r.value.email)}),$=l.fn("switch")(function*(){let o=yield*p.Service,e=yield*o.orgsByAccount();if(e.length===0)return yield*m("Not logged in");let t=yield*o.active(),n=e.flatMap((r)=>r.orgs.map((i)=>{let y=T(t,{accountID:r.account.id,orgID:i.id});return{value:{orgID:i.id,accountID:r.account.id,label:i.name},label:x(r.account,i,y)}}));if(n.length===0)return yield*m("No orgs found");yield*P("Switch org");let c=yield*h({message:"Select org",options:n});if(d.isNone(c))return;let a=c.value;yield*o.use(a.accountID,d.some(a.orgID)),yield*g("Switched to "+a.label)}),R=l.fn("orgs")(function*(){let o=yield*p.Service,e=yield*o.orgsByAccount();if(e.length===0)return yield*m("No accounts found");if(!e.some((n)=>n.orgs.length>0))return yield*m("No orgs found");let t=yield*o.active();for(let n of e)for(let c of n.orgs){let a=T(t,{accountID:n.account.id,orgID:c.id});yield*m(C(n.account,c,a))}}),M=l.fn("open")(function*(){let e=yield*(yield*p.Service).active();if(d.isNone(e))return yield*m("No active account");let t=e.value.url;yield*A(t),yield*g("Opened "+t)}),X=u({command:"login <url>",describe:!1,builder:(o)=>o.positional("url",{describe:"server URL",type:"string",demandOption:!0}),async handler(o){s.empty(),await f.runPromise(_(o.url))}}),B=u({command:"logout [email]",describe:!1,builder:(o)=>o.positional("email",{describe:"account email to log out from",type:"string"}),async handler(o){s.empty(),await f.runPromise(N(o.email))}}),U=u({command:"switch",describe:!1,async handler(){s.empty(),await f.runPromise($())}}),G=u({command:"orgs",describe:!1,async handler(){s.empty(),await f.runPromise(R())}}),H=u({command:"open",describe:!1,async handler(){s.empty(),await f.runPromise(M())}}),Y=u({command:"console",describe:!1,builder:(o)=>o.command({...X,describe:"log in to console"}).command({...B,describe:"log out from console"}).command({...U,describe:"switch active org"}).command({...G,describe:"list orgs"}).command({...H,describe:"open active console account"}).demandCommand(),async handler(){}});export{C as formatOrgLine,w as formatAccountLabel,U as SwitchCommand,G as OrgsCommand,H as OpenCommand,B as LogoutCommand,X as LoginCommand,Y as ConsoleCommand};
2
+ import{h as P,i as g,j as b,k as h,l as O}from"./chunk-9rqrm9y8.js";import"./chunk-8h9r6c8g.js";import"./chunk-9jf67xb0.js";import{Pd as u}from"./chunk-9xvctnjr.js";import{Tf as s}from"./chunk-gen6f3dn.js";import{sh as f}from"./chunk-va4davgy.js";import"./chunk-hg563h5r.js";import{Ch as E}from"./chunk-j1a64ade.js";import"./chunk-bd21p9zz.js";import"./chunk-p54bzjtv.js";import"./chunk-ha1w0xzh.js";import"./chunk-ecwz9nhs.js";import"./chunk-5rkmhzq0.js";import{Aj as S,Bj as p}from"./chunk-7mhffm9f.js";import"./chunk-r012q335.js";import"./chunk-0z3z0gk1.js";import"./chunk-g7vkkmsk.js";import"./chunk-m8djypsy.js";import"./chunk-w7p2x973.js";import"./chunk-wmw2gne9.js";import"./chunk-y3n31nnx.js";import"./chunk-3z1y040p.js";import"./chunk-kkvb2c2z.js";import"./chunk-3tdqsm5c.js";import"./chunk-a5zjrwqy.js";import"./chunk-fhng5her.js";import"./chunk-dkv2mg97.js";import"./chunk-bf146hz2.js";import"./chunk-t488d66k.js";import"./chunk-cqtkxwd8.js";import"./chunk-srf73nm4.js";import"./chunk-yzdty5t9.js";import"./chunk-1p34bx7c.js";import"./chunk-q3x4x2tq.js";import"./chunk-7dckfame.js";import"./chunk-j1veq3zr.js";import"./chunk-0pvbk8ks.js";import"./chunk-tk3bve0x.js";import"./chunk-0w4v0fbs.js";import"./chunk-wf09j72q.js";import"./chunk-hbnr0j7h.js";import"./chunk-ep8zn49w.js";import"./chunk-f3kjp838.js";import"./chunk-tsn1jkr7.js";import"./chunk-zk8n8hnh.js";import"./chunk-1jh5p5qw.js";import"./chunk-kaeyhw2n.js";import"./chunk-f89gntcy.js";import"./chunk-bky5a42k.js";import"./chunk-r7xp0xcn.js";import"./chunk-6g3m7yxf.js";import{Wz as I}from"./chunk-v2kyarwz.js";import{ID as D,mI as l,rC as d}from"./chunk-dkm7x8rj.js";import"./chunk-9pe4agdz.js";import"./chunk-kc3hpmr2.js";import"./chunk-hh4c02fh.js";var A=(o)=>l.promise(()=>E(o)),m=(o)=>l.sync(()=>s.println(o)),v=(o)=>s.Style.TEXT_DIM+o+s.Style.TEXT_NORMAL,L=(o)=>o?v(" (active)"):"",w=(o,e)=>`${o.email} ${v(o.url)}${L(e)}`,x=(o,e,t)=>`${e.name} (${o.email})${L(t)}`,C=(o,e,t)=>{let n=t?s.Style.TEXT_SUCCESS+"\u25CF"+s.Style.TEXT_NORMAL:" ",c=t?s.Style.TEXT_HIGHLIGHT_BOLD+e.name+s.Style.TEXT_NORMAL:e.name;return` ${n} ${c} ${v(o.email)} ${v(o.url)} ${v(e.id)}`},T=(o,e)=>d.isSome(o)&&o.value.id===e.accountID&&o.value.active_org_id===e.orgID,_=l.fn("login")(function*(o){let e=yield*p.Service;yield*P("Log in");let t=yield*e.login(o);yield*b.info("Go to: "+t.url),yield*b.info("Enter code: "+t.user),yield*A(t.url);let n=O();yield*n.start("Waiting for authorization...");let c=(r)=>l.gen(function*(){yield*l.sleep(r);let i=yield*e.poll(t);if(i._tag==="PollPending")return yield*c(r);if(i._tag==="PollSlow")return yield*c(D.sum(r,D.seconds(5)));return i}),a=yield*c(t.interval).pipe(l.timeout(t.expiry),l.catchTag("TimeoutError",()=>l.succeed(new S)));yield*I.valueTags(a,{PollSuccess:(r)=>l.gen(function*(){yield*n.stop("Logged in as "+r.email),yield*g("Done")}),PollExpired:()=>n.stop("Device code expired",1),PollDenied:()=>n.stop("Authorization denied",1),PollError:(r)=>n.stop("Error: "+String(r.cause),1),PollPending:()=>n.stop("Unexpected state",1),PollSlow:()=>n.stop("Unexpected state",1)})}),N=l.fn("logout")(function*(o){let e=yield*p.Service,t=yield*e.list();if(t.length===0)return yield*m("Not logged in");if(o){let i=t.find((y)=>y.email===o);if(!i)return yield*m("Account not found: "+o);yield*e.remove(i.id),yield*g("Logged out from "+o);return}let n=yield*e.active(),c=d.map(n,(i)=>i.id);yield*P("Log out");let a=t.map((i)=>{let y=d.isSome(c)&&c.value===i.id;return{value:i,label:w(i,y)}}),r=yield*h({message:"Select account to log out",options:a});if(d.isNone(r))return;yield*e.remove(r.value.id),yield*g("Logged out from "+r.value.email)}),$=l.fn("switch")(function*(){let o=yield*p.Service,e=yield*o.orgsByAccount();if(e.length===0)return yield*m("Not logged in");let t=yield*o.active(),n=e.flatMap((r)=>r.orgs.map((i)=>{let y=T(t,{accountID:r.account.id,orgID:i.id});return{value:{orgID:i.id,accountID:r.account.id,label:i.name},label:x(r.account,i,y)}}));if(n.length===0)return yield*m("No orgs found");yield*P("Switch org");let c=yield*h({message:"Select org",options:n});if(d.isNone(c))return;let a=c.value;yield*o.use(a.accountID,d.some(a.orgID)),yield*g("Switched to "+a.label)}),R=l.fn("orgs")(function*(){let o=yield*p.Service,e=yield*o.orgsByAccount();if(e.length===0)return yield*m("No accounts found");if(!e.some((n)=>n.orgs.length>0))return yield*m("No orgs found");let t=yield*o.active();for(let n of e)for(let c of n.orgs){let a=T(t,{accountID:n.account.id,orgID:c.id});yield*m(C(n.account,c,a))}}),M=l.fn("open")(function*(){let e=yield*(yield*p.Service).active();if(d.isNone(e))return yield*m("No active account");let t=e.value.url;yield*A(t),yield*g("Opened "+t)}),X=u({command:"login <url>",describe:!1,builder:(o)=>o.positional("url",{describe:"server URL",type:"string",demandOption:!0}),async handler(o){s.empty(),await f.runPromise(_(o.url))}}),B=u({command:"logout [email]",describe:!1,builder:(o)=>o.positional("email",{describe:"account email to log out from",type:"string"}),async handler(o){s.empty(),await f.runPromise(N(o.email))}}),U=u({command:"switch",describe:!1,async handler(){s.empty(),await f.runPromise($())}}),G=u({command:"orgs",describe:!1,async handler(){s.empty(),await f.runPromise(R())}}),H=u({command:"open",describe:!1,async handler(){s.empty(),await f.runPromise(M())}}),Y=u({command:"console",describe:!1,builder:(o)=>o.command({...X,describe:"log in to console"}).command({...B,describe:"log out from console"}).command({...U,describe:"switch active org"}).command({...G,describe:"list orgs"}).command({...H,describe:"open active console account"}).demandCommand(),async handler(){}});export{C as formatOrgLine,w as formatAccountLabel,U as SwitchCommand,G as OrgsCommand,H as OpenCommand,B as LogoutCommand,X as LoginCommand,Y as ConsoleCommand};
@@ -1,5 +1,5 @@
1
1
  // @bun
2
- import{Cd as T,Ed as q,Fd as N,Gd as w,Hd as X,Kd as D}from"./chunk-3ne6j2h5.js";import"./chunk-799c17nk.js";import{Sf as Q}from"./chunk-s75chpxq.js";import{qh as A}from"./chunk-my0kzcby.js";import"./chunk-1v47v7vm.js";import"./chunk-tmjd3evp.js";import"./chunk-q6x5bmc3.js";import"./chunk-n1m5qdf5.js";import"./chunk-zeh3mjgp.js";import"./chunk-ntfh16rj.js";import"./chunk-tz8qhbk9.js";import"./chunk-hvcdemxe.js";import"./chunk-2wcwbp3t.js";import{hl as $}from"./chunk-3sem578c.js";import"./chunk-fzzze6zd.js";import"./chunk-afpwjn78.js";import"./chunk-c4x99ayd.js";import"./chunk-44amvtcs.js";import"./chunk-cbfjjbfd.js";import"./chunk-c7dt464m.js";import"./chunk-jazpapb9.js";import"./chunk-knnemqfm.js";import"./chunk-hqv0s6sw.js";import"./chunk-apv1v4tk.js";import"./chunk-7tb9fjvq.js";import"./chunk-fp5mvrrx.js";import"./chunk-zzdbrxkh.js";import"./chunk-cqtkxwd8.js";import"./chunk-xtj5qqsw.js";import"./chunk-w32tj884.js";import"./chunk-29hmwttd.js";import"./chunk-2qy760rf.js";import"./chunk-kfdqfha0.js";import"./chunk-t42kh492.js";import"./chunk-8hh5ejmr.js";import"./chunk-mwbcmvmh.js";import"./chunk-9y65kbcf.js";import"./chunk-24r5h0fx.js";import"./chunk-vxc5q0wk.js";import"./chunk-dsny9dh8.js";import"./chunk-scb48j07.js";import"./chunk-k33xx2z9.js";import{et as W}from"./chunk-tydvpy1s.js";import{It as Y,xt as _}from"./chunk-b2k9yafd.js";import"./chunk-sjqgmp12.js";import"./chunk-jek1cnfk.js";import"./chunk-s7sksztt.js";import"./chunk-22vvjp4g.js";import"./chunk-a3te67a5.js";import"./chunk-kdr6nxmk.js";import"./chunk-shav33fq.js";import"./chunk-bqeyh2gx.js";import"./chunk-kpkbyek5.js";import"./chunk-naq602da.js";import V from"fs/promises";import L from"path";import R from"os";var g={command:"uninstall",describe:"uninstall qitqode and remove all related files",builder:(j)=>j.option("keep-config",{alias:"c",type:"boolean",describe:"keep configuration files",default:!1}).option("keep-data",{alias:"d",type:"boolean",describe:"keep session data and snapshots",default:!1}).option("dry-run",{type:"boolean",describe:"show what would be removed without removing",default:!1}).option("force",{alias:"f",type:"boolean",describe:"skip confirmation prompts",default:!1}),handler:async(j)=>{Q.empty(),Q.println(Q.logo(" ")),Q.empty(),w("Uninstall QitQode");let B=await A.runPromise($.Service.use((J)=>J.method()));N.info(`Installation method: ${B}`);let E=await v(j,B);if(await z(E,B),!j.force&&!j.dryRun){let J=await q({message:"Are you sure you want to uninstall?",initialValue:!1});if(!J||T(J)){X("Cancelled");return}}if(j.dryRun){N.warn("Dry run - no changes made"),X("Done");return}await G(B,E),X("Done")}};async function v(j,B){let E=[{path:W.Path.data,label:"Data",keep:j.keepData},{path:W.Path.cache,label:"Cache",keep:!1},{path:W.Path.config,label:"Config",keep:j.keepConfig},{path:W.Path.state,label:"State",keep:!1}],J=B==="curl"?await P():null,H=B==="curl"?process.execPath:null;return{directories:E,shellConfig:J,binary:H}}async function z(j,B){N.message("The following will be removed:");for(let E of j.directories){if(!await V.access(E.path).then(()=>!0).catch(()=>!1))continue;let H=await F(E.path),K=S(H),O=E.keep?Q.Style.TEXT_DIM+"(keeping)":"",M=E.keep?"\u25CB":"\u2713";N.info(` ${M} ${E.label}: ${Z(E.path)} ${Q.Style.TEXT_DIM}(${K})${O}`)}if(j.binary)N.info(` \u2713 Binary: ${Z(j.binary)}`);if(j.shellConfig)N.info(` \u2713 Shell PATH in ${Z(j.shellConfig)}`);if(B!=="curl"&&B!=="unknown"){let E={npm:"npm uninstall -g @qitqode/cli",pnpm:"pnpm uninstall -g @qitqode/cli",bun:"bun remove -g @qitqode/cli"};N.info(` \u2713 Package: ${E[B]||B}`)}}async function G(j,B){let E=D(),J=[];for(let H of B.directories){if(H.keep){N.step(`Skipping ${H.label} (--keep-${H.label.toLowerCase()})`);continue}if(!await V.access(H.path).then(()=>!0).catch(()=>!1))continue;E.start(`Removing ${H.label}...`);let O=await V.rm(H.path,{recursive:!0,force:!0}).catch((M)=>M);if(O){E.stop(`Failed to remove ${H.label}`,1),J.push(`${H.label}: ${O.message}`);continue}E.stop(`Removed ${H.label}`)}if(B.shellConfig){E.start("Cleaning shell config...");let H=await k(B.shellConfig).catch((K)=>K);if(H)E.stop("Failed to clean shell config",1),J.push(`Shell config: ${H.message}`);else E.stop("Cleaned shell config")}if(j!=="curl"&&j!=="unknown"){let K={npm:["npm","uninstall","-g","@qitqode/cli"],pnpm:["pnpm","uninstall","-g","@qitqode/cli"],bun:["bun","remove","-g","@qitqode/cli"]}[j];if(K){E.start(`Running ${K.join(" ")}...`);let O=await _.run(K,{nothrow:!0});if(O.code!==0)E.stop(`Package manager uninstall failed: exit code ${O.code}`,1),N.warn(`You may need to run manually: ${K.join(" ")}`);else E.stop("Package removed")}else N.warn(`Uninstall not supported for method "${j}" yet, skipping package removal`)}if(j==="curl"&&B.binary){Q.empty(),N.message("To finish removing the binary, run:"),N.info(` rm "${B.binary}"`);let H=L.dirname(B.binary);if(H.includes(".qitqode"))N.info(` rmdir "${H}" 2>/dev/null`)}if(J.length>0){Q.empty(),N.warn("Some operations failed:");for(let H of J)N.error(` ${H}`)}Q.empty(),N.success("Thank you for using QitQode!")}async function P(){let j=L.basename(process.env.SHELL||"bash"),B=R.homedir(),E=process.env.XDG_CONFIG_HOME||L.join(B,".config"),J={fish:[L.join(E,"fish","config.fish")],zsh:[L.join(B,".zshrc"),L.join(B,".zshenv"),L.join(E,"zsh",".zshrc"),L.join(E,"zsh",".zshenv")],bash:[L.join(B,".bashrc"),L.join(B,".bash_profile"),L.join(B,".profile"),L.join(E,"bash",".bashrc"),L.join(E,"bash",".bash_profile")],ash:[L.join(B,".ashrc"),L.join(B,".profile")],sh:[L.join(B,".profile")]},H=J[j]||J.bash;for(let K of H){if(!await V.access(K).then(()=>!0).catch(()=>!1))continue;let M=await Y.readText(K).catch(()=>"");if(M.includes("# qitqode")||M.includes(".qitqode/bin"))return K}return null}async function k(j){let E=(await Y.readText(j)).split(`
2
+ import{Dd as T,Fd as q,Gd as N,Hd as w,Id as X,Ld as D}from"./chunk-8h9r6c8g.js";import"./chunk-9jf67xb0.js";import{Tf as Q}from"./chunk-gen6f3dn.js";import{sh as A}from"./chunk-va4davgy.js";import"./chunk-hg563h5r.js";import"./chunk-j1a64ade.js";import"./chunk-bd21p9zz.js";import"./chunk-p54bzjtv.js";import"./chunk-ha1w0xzh.js";import"./chunk-ecwz9nhs.js";import"./chunk-5rkmhzq0.js";import"./chunk-7mhffm9f.js";import{fl as $}from"./chunk-r012q335.js";import"./chunk-0z3z0gk1.js";import"./chunk-g7vkkmsk.js";import"./chunk-m8djypsy.js";import"./chunk-w7p2x973.js";import"./chunk-wmw2gne9.js";import"./chunk-y3n31nnx.js";import"./chunk-3z1y040p.js";import"./chunk-kkvb2c2z.js";import"./chunk-3tdqsm5c.js";import"./chunk-a5zjrwqy.js";import"./chunk-fhng5her.js";import"./chunk-dkv2mg97.js";import"./chunk-bf146hz2.js";import"./chunk-t488d66k.js";import"./chunk-cqtkxwd8.js";import"./chunk-srf73nm4.js";import"./chunk-yzdty5t9.js";import"./chunk-1p34bx7c.js";import"./chunk-q3x4x2tq.js";import"./chunk-7dckfame.js";import"./chunk-j1veq3zr.js";import"./chunk-0pvbk8ks.js";import"./chunk-tk3bve0x.js";import"./chunk-0w4v0fbs.js";import"./chunk-wf09j72q.js";import"./chunk-hbnr0j7h.js";import"./chunk-ep8zn49w.js";import"./chunk-f3kjp838.js";import"./chunk-tsn1jkr7.js";import{pt as W}from"./chunk-zk8n8hnh.js";import{It as _,Tt as Y}from"./chunk-1jh5p5qw.js";import"./chunk-kaeyhw2n.js";import"./chunk-f89gntcy.js";import"./chunk-bky5a42k.js";import"./chunk-r7xp0xcn.js";import"./chunk-6g3m7yxf.js";import"./chunk-v2kyarwz.js";import"./chunk-dkm7x8rj.js";import"./chunk-9pe4agdz.js";import"./chunk-kc3hpmr2.js";import"./chunk-hh4c02fh.js";import V from"fs/promises";import L from"path";import R from"os";var g={command:"uninstall",describe:"uninstall qitqode and remove all related files",builder:(j)=>j.option("keep-config",{alias:"c",type:"boolean",describe:"keep configuration files",default:!1}).option("keep-data",{alias:"d",type:"boolean",describe:"keep session data and snapshots",default:!1}).option("dry-run",{type:"boolean",describe:"show what would be removed without removing",default:!1}).option("force",{alias:"f",type:"boolean",describe:"skip confirmation prompts",default:!1}),handler:async(j)=>{Q.empty(),Q.println(Q.logo(" ")),Q.empty(),w("Uninstall QitQode");let B=await A.runPromise($.Service.use((J)=>J.method()));N.info(`Installation method: ${B}`);let E=await v(j,B);if(await z(E,B),!j.force&&!j.dryRun){let J=await q({message:"Are you sure you want to uninstall?",initialValue:!1});if(!J||T(J)){X("Cancelled");return}}if(j.dryRun){N.warn("Dry run - no changes made"),X("Done");return}await G(B,E),X("Done")}};async function v(j,B){let E=[{path:W.Path.data,label:"Data",keep:j.keepData},{path:W.Path.cache,label:"Cache",keep:!1},{path:W.Path.config,label:"Config",keep:j.keepConfig},{path:W.Path.state,label:"State",keep:!1}],J=B==="curl"?await P():null,H=B==="curl"?process.execPath:null;return{directories:E,shellConfig:J,binary:H}}async function z(j,B){N.message("The following will be removed:");for(let E of j.directories){if(!await V.access(E.path).then(()=>!0).catch(()=>!1))continue;let H=await F(E.path),K=S(H),O=E.keep?Q.Style.TEXT_DIM+"(keeping)":"",M=E.keep?"\u25CB":"\u2713";N.info(` ${M} ${E.label}: ${Z(E.path)} ${Q.Style.TEXT_DIM}(${K})${O}`)}if(j.binary)N.info(` \u2713 Binary: ${Z(j.binary)}`);if(j.shellConfig)N.info(` \u2713 Shell PATH in ${Z(j.shellConfig)}`);if(B!=="curl"&&B!=="unknown"){let E={npm:"npm uninstall -g @qitqode/cli",pnpm:"pnpm uninstall -g @qitqode/cli",bun:"bun remove -g @qitqode/cli"};N.info(` \u2713 Package: ${E[B]||B}`)}}async function G(j,B){let E=D(),J=[];for(let H of B.directories){if(H.keep){N.step(`Skipping ${H.label} (--keep-${H.label.toLowerCase()})`);continue}if(!await V.access(H.path).then(()=>!0).catch(()=>!1))continue;E.start(`Removing ${H.label}...`);let O=await V.rm(H.path,{recursive:!0,force:!0}).catch((M)=>M);if(O){E.stop(`Failed to remove ${H.label}`,1),J.push(`${H.label}: ${O.message}`);continue}E.stop(`Removed ${H.label}`)}if(B.shellConfig){E.start("Cleaning shell config...");let H=await k(B.shellConfig).catch((K)=>K);if(H)E.stop("Failed to clean shell config",1),J.push(`Shell config: ${H.message}`);else E.stop("Cleaned shell config")}if(j!=="curl"&&j!=="unknown"){let K={npm:["npm","uninstall","-g","@qitqode/cli"],pnpm:["pnpm","uninstall","-g","@qitqode/cli"],bun:["bun","remove","-g","@qitqode/cli"]}[j];if(K){E.start(`Running ${K.join(" ")}...`);let O=await _.run(K,{nothrow:!0});if(O.code!==0)E.stop(`Package manager uninstall failed: exit code ${O.code}`,1),N.warn(`You may need to run manually: ${K.join(" ")}`);else E.stop("Package removed")}else N.warn(`Uninstall not supported for method "${j}" yet, skipping package removal`)}if(j==="curl"&&B.binary){Q.empty(),N.message("To finish removing the binary, run:"),N.info(` rm "${B.binary}"`);let H=L.dirname(B.binary);if(H.includes(".qitqode"))N.info(` rmdir "${H}" 2>/dev/null`)}if(J.length>0){Q.empty(),N.warn("Some operations failed:");for(let H of J)N.error(` ${H}`)}Q.empty(),N.success("Thank you for using QitQode!")}async function P(){let j=L.basename(process.env.SHELL||"bash"),B=R.homedir(),E=process.env.XDG_CONFIG_HOME||L.join(B,".config"),J={fish:[L.join(E,"fish","config.fish")],zsh:[L.join(B,".zshrc"),L.join(B,".zshenv"),L.join(E,"zsh",".zshrc"),L.join(E,"zsh",".zshenv")],bash:[L.join(B,".bashrc"),L.join(B,".bash_profile"),L.join(B,".profile"),L.join(E,"bash",".bashrc"),L.join(E,"bash",".bash_profile")],ash:[L.join(B,".ashrc"),L.join(B,".profile")],sh:[L.join(B,".profile")]},H=J[j]||J.bash;for(let K of H){if(!await V.access(K).then(()=>!0).catch(()=>!1))continue;let M=await Y.readText(K).catch(()=>"");if(M.includes("# qitqode")||M.includes(".qitqode/bin"))return K}return null}async function k(j){let E=(await Y.readText(j)).split(`
3
3
  `),J=[],H=!1;for(let O of E){let M=O.trim();if(M==="# qitqode"){H=!0;continue}if(H){if(H=!1,M.includes(".qitqode/bin")||M.includes("fish_add_path"))continue}if(M.startsWith("export PATH=")&&M.includes(".qitqode/bin")||M.startsWith("fish_add_path")&&M.includes(".qitqode"))continue;J.push(O)}while(J.length>0&&J[J.length-1].trim()==="")J.pop();let K=J.join(`
4
4
  `)+`
5
5
  `;await Y.write(j,K)}async function F(j){let B=0,E=async(J)=>{let H=await V.readdir(J,{withFileTypes:!0}).catch(()=>[]);for(let K of H){let O=L.join(J,K.name);if(K.isDirectory()){await E(O);continue}if(K.isFile()){let M=await V.stat(O).catch(()=>null);if(M)B+=M.size}}};return await E(j),B}function S(j){if(j<1024)return`${j} B`;if(j<1048576)return`${(j/1024).toFixed(1)} KB`;if(j<1073741824)return`${(j/1048576).toFixed(1)} MB`;return`${(j/1073741824).toFixed(1)} GB`}function Z(j){let B=R.homedir();if(j===B||j.startsWith(B+L.sep))return"~"+j.slice(B.length);return j}export{g as UninstallCommand};
@@ -1,5 +1,5 @@
1
1
  // @bun
2
- import{pP as k}from"./chunk-naq602da.js";var GY={};k(GY,{pipeArguments:()=>o,Prototype:()=>$M,Mixin:()=>fp,Class:()=>G5});var o=(X,Q)=>{switch(Q.length){case 0:return X;case 1:return Q[0](X);case 2:return Q[1](Q[0](X));case 3:return Q[2](Q[1](Q[0](X)));case 4:return Q[3](Q[2](Q[1](Q[0](X))));case 5:return Q[4](Q[3](Q[2](Q[1](Q[0](X)))));case 6:return Q[5](Q[4](Q[3](Q[2](Q[1](Q[0](X))))));case 7:return Q[6](Q[5](Q[4](Q[3](Q[2](Q[1](Q[0](X)))))));case 8:return Q[7](Q[6](Q[5](Q[4](Q[3](Q[2](Q[1](Q[0](X))))))));case 9:return Q[8](Q[7](Q[6](Q[5](Q[4](Q[3](Q[2](Q[1](Q[0](X)))))))));default:{let Y=X;for(let G=0,J=Q.length;G<J;G++)Y=Q[G](Y);return Y}}},$M={pipe(){return o(this,arguments)}},G5=function(){function X(){}return X.prototype=$M,X}(),fp=(X)=>class extends X{pipe(){return o(this,arguments)}};var H_={};k(H_,{untupled:()=>ap,tupled:()=>rp,satisfies:()=>op,pipe:()=>U6,memoize:()=>b1,identity:()=>C,hole:()=>sp,flow:()=>QX,flip:()=>ip,dual:()=>W,constant:()=>I0,constVoid:()=>y8,constUndefined:()=>D6,constTrue:()=>r1,constNull:()=>qG,constFalse:()=>U7,compose:()=>np,cast:()=>ZM,apply:()=>lp,absurd:()=>HM,SK:()=>tp});var W=function(X,Q){if(typeof X==="function")return function(){return X(arguments)?Q.apply(this,arguments):(Y)=>Q(Y,...arguments)};switch(X){case 0:case 1:throw RangeError(`Invalid arity ${X}`);case 2:return function(Y,G){if(arguments.length>=2)return Q(Y,G);return function(J){return Q(J,Y)}};case 3:return function(Y,G,J){if(arguments.length>=3)return Q(Y,G,J);return function($){return Q($,Y,G)}};default:return function(){if(arguments.length>=X)return Q.apply(this,arguments);let Y=arguments;return function(G){return Q(G,...Y)}}}},lp=(X)=>(Q)=>Q(X),C=(X)=>X,op=()=>(X)=>X,ZM=C,I0=(X)=>()=>X,r1=I0(!0),U7=I0(!1),qG=I0(null),D6=I0(void 0),y8=D6,ip=(X)=>(...Q)=>(...Y)=>X(...Y)(...Q),np=W(2,(X,Q)=>(Y)=>Q(X(Y))),HM=(X)=>{throw Error("Called `absurd` function which should be uncallable")},rp=(X)=>(Q)=>X(...Q),ap=(X)=>(...Q)=>X(Q);function U6(X,...Q){return o(X,Q)}function QX(X,Q,Y,G,J,$,Z,H,K){switch(arguments.length){case 1:return X;case 2:return function(){return Q(X.apply(this,arguments))};case 3:return function(){return Y(Q(X.apply(this,arguments)))};case 4:return function(){return G(Y(Q(X.apply(this,arguments))))};case 5:return function(){return J(G(Y(Q(X.apply(this,arguments)))))};case 6:return function(){return $(J(G(Y(Q(X.apply(this,arguments))))))};case 7:return function(){return Z($(J(G(Y(Q(X.apply(this,arguments)))))))};case 8:return function(){return H(Z($(J(G(Y(Q(X.apply(this,arguments))))))))};case 9:return function(){return K(H(Z($(J(G(Y(Q(X.apply(this,arguments)))))))))}}return}var sp=ZM(HM),tp=(X,Q)=>Q;function b1(X){let Q=new WeakMap;return(Y)=>{if(Q.has(Y))return Q.get(Y);let G=X(Y);return Q.set(Y,G),G}}var s0={};k(s0,{xor:()=>Nc,some:()=>Mc,or:()=>Oc,not:()=>qc,nor:()=>Lc,nand:()=>wc,mapInput:()=>ep,isUnknown:()=>wZ,isUndefined:()=>B_,isUint8Array:()=>Wc,isTupleOfAtLeast:()=>W_,isTupleOf:()=>K_,isTruthy:()=>Xc,isTagged:()=>P1,isSymbol:()=>JY,isString:()=>b8,isSet:()=>Qc,isRegExp:()=>D_,isReadonlyObject:()=>Hc,isPropertyKey:()=>zG,isPromiseLike:()=>Vc,isPromise:()=>Bc,isObjectOrArray:()=>Zc,isObjectKeyword:()=>AZ,isObject:()=>h1,isNumber:()=>M9,isNullish:()=>$c,isNull:()=>Gc,isNotUndefined:()=>M1,isNotNullish:()=>NG,isNotNull:()=>Jc,isNever:()=>V_,isMap:()=>Yc,isIterable:()=>T9,isFunction:()=>g1,isError:()=>Kc,isDate:()=>__,isBoolean:()=>P9,isBigInt:()=>OG,implies:()=>Fc,hasProperty:()=>P,every:()=>Ac,eqv:()=>Rc,compose:()=>_c,and:()=>zc,Tuple:()=>Dc,Struct:()=>Uc});var ep=W(2,(X,Q)=>(Y)=>X(Q(Y))),K_=W(2,(X,Q)=>X.length===Q),W_=W(2,(X,Q)=>X.length>=Q);function Xc(X){return!!X}function Qc(X){return X instanceof Set}function Yc(X){return X instanceof Map}function b8(X){return typeof X==="string"}function M9(X){return typeof X==="number"}function P9(X){return typeof X==="boolean"}function OG(X){return typeof X==="bigint"}function JY(X){return typeof X==="symbol"}function zG(X){return b8(X)||M9(X)||JY(X)}function g1(X){return typeof X==="function"}function B_(X){return X===void 0}function M1(X){return X!==void 0}function Gc(X){return X===null}function Jc(X){return X!==null}function $c(X){return X===null||X===void 0}function NG(X){return X!=null}function V_(X){return!1}function wZ(X){return!0}function Zc(X){return typeof X==="object"&&X!==null}function h1(X){return typeof X==="object"&&X!==null&&!Array.isArray(X)}function Hc(X){return h1(X)}function AZ(X){return typeof X==="object"&&X!==null||g1(X)}var P=W(2,(X,Q)=>AZ(X)&&(Q in X)),P1=W(2,(X,Q)=>P(X,"_tag")&&X._tag===Q);function Kc(X){return X instanceof Error}function Wc(X){return X instanceof Uint8Array}function __(X){return X instanceof Date}function T9(X){return P(X,Symbol.iterator)||b8(X)}function Bc(X){return P(X,"then")&&"catch"in X&&g1(X.then)&&g1(X.catch)}function Vc(X){return P(X,"then")&&g1(X.then)}function D_(X){return X instanceof RegExp}var _c=W(2,(X,Q)=>(Y)=>X(Y)&&Q(Y));function Dc(X){return(Q)=>{for(let Y=0;Y<X.length;Y++)if(X[Y](Q[Y])===!1)return!1;return!0}}function Uc(X){let Q=Object.keys(X);return(Y)=>{for(let G of Q)if(!X[G](Y[G]))return!1;return!0}}function qc(X){return(Q)=>!X(Q)}var Oc=W(2,(X,Q)=>(Y)=>X(Y)||Q(Y)),zc=W(2,(X,Q)=>(Y)=>X(Y)&&Q(Y)),Nc=W(2,(X,Q)=>(Y)=>X(Y)!==Q(Y)),Rc=W(2,(X,Q)=>(Y)=>X(Y)===Q(Y)),Fc=W(2,(X,Q)=>(Y)=>X(Y)?Q(Y):!0),Lc=W(2,(X,Q)=>(Y)=>!(X(Y)||Q(Y))),wc=W(2,(X,Q)=>(Y)=>!(X(Y)&&Q(Y)));function Ac(X){return(Q)=>{for(let Y of X)if(!Y(Q))return!1;return!0}}function Mc(X){return(Q)=>{for(let Y of X)if(Y(Q))return!0;return!1}}var g8={};k(g8,{symbol:()=>L0,structureKeys:()=>MZ,structure:()=>PZ,string:()=>Y1,random:()=>FG,optimize:()=>LG,number:()=>I9,isHash:()=>KM,hash:()=>H0,combine:()=>t0,array:()=>S6});var RG=(X)=>{let Q=new Set(Reflect.ownKeys(X));if(X.constructor===Object)return Q;if(X instanceof Error)Q.delete("stack");let Y=Object.getPrototypeOf(X),G=Y;while(G!==null&&G!==Object.prototype){let J=Reflect.ownKeys(G);for(let $=0;$<J.length;$++)Q.add(J[$]);G=Object.getPrototypeOf(G)}if(Q.has("constructor")&&typeof X.constructor==="function"&&Y===X.constructor.prototype)Q.delete("constructor");return Q},$Y=new WeakSet;var L0="~effect/interfaces/Hash",H0=(X)=>{switch(typeof X){case"number":return I9(X);case"bigint":return Y1(X.toString(10));case"boolean":return Y1(String(X));case"symbol":return Y1(String(X));case"string":return Y1(X);case"undefined":return Y1("undefined");case"function":case"object":if(X===null)return Y1("null");else if(X instanceof Date)return Y1(X.toISOString());else if(X instanceof RegExp)return Y1(X.toString());else{if($Y.has(X))return FG(X);if(q_.has(X))return q_.get(X);let Q=Ic(X,()=>{if(KM(X))return X[L0]();else if(typeof X==="function")return FG(X);else if(Array.isArray(X)||ArrayBuffer.isView(X))return S6(X);else if(X instanceof Map)return Pc(X);else if(X instanceof Set)return Tc(X);return PZ(X)});return q_.set(X,Q),Q}default:throw Error(`BUG: unhandled typeof ${typeof X} - please report an issue at https://github.com/Effect-TS/effect/issues`)}},FG=(X)=>{if(!U_.has(X))U_.set(X,I9(Math.floor(Math.random()*Number.MAX_SAFE_INTEGER)));return U_.get(X)},t0=W(2,(X,Q)=>X*53^Q),LG=(X)=>X&3221225471|X>>>1&1073741824,KM=(X)=>P(X,L0),I9=(X)=>{if(X!==X)return Y1("NaN");if(X===1/0)return Y1("Infinity");if(X===-1/0)return Y1("-Infinity");let Q=X|0;if(Q!==X)Q^=X*4294967295;while(X>4294967295)Q^=X/=4294967295;return LG(Q)},Y1=(X)=>{let Q=5381,Y=X.length;while(Y)Q=Q*33^X.charCodeAt(--Y);return LG(Q)},MZ=(X,Q)=>{let Y=12289;for(let G of Q)Y^=t0(H0(G),H0(X[G]));return LG(Y)},PZ=(X)=>MZ(X,RG(X)),z_=(X,Q)=>(Y)=>{let G=X;for(let J of Y)G^=Q(J);return LG(G)},S6=z_(6151,H0),Pc=z_(Y1("Map"),([X,Q])=>t0(H0(X),H0(Q))),Tc=z_(Y1("Set"),H0),U_=new WeakMap,q_=new WeakMap,O_=new WeakSet;function Ic(X,Q){if(O_.has(X))return Y1("[Circular]");O_.add(X);let Y=Q();return O_.delete(X),Y}var G1={};k(G1,{symbol:()=>w0,makeCompareSet:()=>AG,makeCompareMap:()=>wG,isEqual:()=>F_,equals:()=>Q0,byReferenceUnsafe:()=>IZ,byReference:()=>bc,asEquivalence:()=>Z8});var w0="~effect/interfaces/Equal";function Q0(){if(arguments.length===1)return(X)=>q7(X,arguments[0]);return q7(arguments[0],arguments[1])}function q7(X,Q){if(X===Q)return!0;if(X==null||Q==null)return!1;let Y=typeof X;if(Y!==typeof Q)return!1;if(Y==="number"&&X!==X&&Q!==Q)return!0;if(Y!=="object"&&Y!=="function")return!1;if($Y.has(X)||$Y.has(Q))return!1;return Ec(X,Q,jc)}function Cc(X,Q,Y){let G=N_.has(X),J=R_.has(Q);if(G&&J)return!0;if(G||J)return!1;N_.add(X),R_.add(Q);let $=Y();return N_.delete(X),R_.delete(Q),$}var N_=new WeakSet,R_=new WeakSet;function jc(X,Q){if(H0(X)!==H0(Q))return!1;else if(X instanceof Date){if(!(Q instanceof Date))return!1;return X.toISOString()===Q.toISOString()}else if(X instanceof RegExp){if(!(Q instanceof RegExp))return!1;return X.toString()===Q.toString()}let Y=F_(X),G=F_(Q);if(Y!==G)return!1;let J=Y&&G;if(typeof X==="function"&&!J)return!1;return Cc(X,Q,()=>{if(J)return X[w0](Q);else if(Array.isArray(X)){if(!Array.isArray(Q)||X.length!==Q.length)return!1;return Sc(X,Q)}else if(ArrayBuffer.isView(X)){if(!ArrayBuffer.isView(Q)||X.byteLength!==Q.byteLength)return!1;return xc(X,Q)}else if(X instanceof Map){if(!(Q instanceof Map)||X.size!==Q.size)return!1;return kc(X,Q)}else if(X instanceof Set){if(!(Q instanceof Set)||X.size!==Q.size)return!1;return yc(X,Q)}return vc(X,Q)})}function Ec(X,Q,Y){let G=TZ.get(X);if(!G)G=new WeakMap,TZ.set(X,G);else if(G.has(Q))return G.get(Q);let J=Y(X,Q);G.set(Q,J);let $=TZ.get(Q);if(!$)$=new WeakMap,TZ.set(Q,$);return $.set(X,J),J}var TZ=new WeakMap;function Sc(X,Q){for(let Y=0;Y<X.length;Y++)if(!q7(X[Y],Q[Y]))return!1;return!0}function xc(X,Q){if(X.length!==Q.length)return!1;for(let Y=0;Y<X.length;Y++)if(X[Y]!==Q[Y])return!1;return!0}function vc(X,Q){let Y=RG(X),G=RG(Q);if(Y.size!==G.size)return!1;for(let J of Y)if(!G.has(J)||!q7(X[J],Q[J]))return!1;return!0}function wG(X,Q){return function(G,J){for(let[$,Z]of G){let H=!1;for(let[K,B]of J)if(X($,K)&&Q(Z,B)){H=!0;break}if(!H)return!1}return!0}}var kc=wG(q7,q7);function AG(X){return function(Y,G){for(let J of Y){let $=!1;for(let Z of G)if(X(J,Z)){$=!0;break}if(!$)return!1}return!0}}var yc=AG(q7),F_=(X)=>P(X,w0),Z8=()=>Q0,bc=(X)=>IZ(new Proxy(X,{})),IZ=(X)=>{return $Y.add(X),X};var x6={};k(x6,{make:()=>b0,flip:()=>gc});function b0(X,Q,Y){return{combine:X,initialValue:Q,combineAll:Y??((G)=>{let J=Q;for(let $ of G)J=X(J,$);return J})}}function gc(X){return b0((Q,Y)=>X.combine(Y,Q),X.initialValue)}var P8={};k(P8,{strictEqual:()=>MG,mapInput:()=>VM,makeReducer:()=>dc,make:()=>n0,combineAll:()=>BM,combine:()=>WM,Tuple:()=>A_,Struct:()=>M_,String:()=>L_,Record:()=>mc,Number:()=>jZ,Date:()=>pc,Boolean:()=>w_,BigInt:()=>hc,Array:()=>O7});var n0=(X)=>(Q,Y)=>Q===Y||X(Q,Y),CZ=(X,Q)=>X===Q,MG=()=>CZ,L_=CZ,jZ=n0((X,Q)=>globalThis.Number.isNaN(X)&&globalThis.Number.isNaN(Q)),w_=CZ,hc=CZ,WM=W(2,(X,Q)=>n0((Y,G)=>X(Y,G)&&Q(Y,G))),BM=(X)=>n0((Q,Y)=>{for(let G of X)if(!G(Q,Y))return!1;return!0}),VM=W(2,(X,Q)=>n0((Y,G)=>X(Q(Y),Q(G))));function A_(X){return n0((Q,Y)=>{if(Q.length!==Y.length)return!1;for(let G=0;G<Q.length;G++)if(!X[G](Q[G],Y[G]))return!1;return!0})}function O7(X){return n0((Q,Y)=>{if(Q.length!==Y.length)return!1;for(let G=0;G<Q.length;G++)if(!X(Q[G],Y[G]))return!1;return!0})}function M_(X){let Q=Reflect.ownKeys(X);return n0((Y,G)=>{for(let J of Q)if(!X[J](Y[J],G[J]))return!1;return!0})}function mc(X){return n0((Q,Y)=>{let G=Reflect.ownKeys(Q),J=Reflect.ownKeys(Y);if(G.length!==J.length)return!1;for(let $ of G)if(!Object.hasOwn(Y,$)||!X(Q[$],Y[$]))return!1;return!0})}function dc(){return b0(WM,()=>!0,BM)}var pc=VM(jZ,(X)=>X.getTime());var ZY={};k(ZY,{min:()=>P_,max:()=>T_,make:()=>h8,last:()=>fc,intercalate:()=>oc,flip:()=>cc,first:()=>uc,constant:()=>lc});function h8(X){return{combine:X}}function cc(X){return h8((Q,Y)=>X.combine(Y,Q))}function P_(X){return h8((Q,Y)=>X(Q,Y)===-1?Q:Y)}function T_(X){return h8((Q,Y)=>X(Q,Y)===1?Q:Y)}function uc(){return h8((X,Q)=>X)}function fc(){return h8((X,Q)=>Q)}function lc(X){return h8(()=>X)}function oc(X){return(Q)=>h8((Y,G)=>Q.combine(Y,Q.combine(X,G)))}var DM={};k(DM,{symbolRedactable:()=>PG,redact:()=>G4,isRedactable:()=>_M,getRedacted:()=>EZ,currentFiberTypeId:()=>z7});var PG=Symbol.for("~effect/Redactable"),_M=(X)=>P(X,PG);function G4(X){if(_M(X))return EZ(X);return X}function EZ(X){return X[PG](globalThis[z7]?.context??ic)}var z7="~effect/Fiber/currentFiber",ic={"~effect/Context":{},mapUnsafe:new Map,pipe(){return o(this,arguments)}};var qM={};k(qM,{formatPropertyKey:()=>YX,formatPath:()=>TG,formatJson:()=>HY,formatDate:()=>SZ,format:()=>u});function u(X,Q){let Y=Q?.space??0,G=new WeakSet,J=!Y?"":typeof Y==="number"?" ".repeat(Y):Y,$=(B)=>J.repeat(B),Z=(B,V)=>{let _=B?.constructor;return _&&_!==Object.prototype.constructor&&_.name?`${_.name}(${V})`:V},H=(B)=>{try{return Reflect.ownKeys(B)}catch{return["[ownKeys threw]"]}};function K(B,V=0){if(Array.isArray(B)){if(G.has(B))return UM;if(G.add(B),!J||B.length<=1)return`[${B.map((D)=>K(D,V)).join(",")}]`;let _=B.map((D)=>K(D,V+1)).join(`,
2
+ import{AP as k}from"./chunk-hh4c02fh.js";var GY={};k(GY,{pipeArguments:()=>o,Prototype:()=>$M,Mixin:()=>fp,Class:()=>G5});var o=(X,Q)=>{switch(Q.length){case 0:return X;case 1:return Q[0](X);case 2:return Q[1](Q[0](X));case 3:return Q[2](Q[1](Q[0](X)));case 4:return Q[3](Q[2](Q[1](Q[0](X))));case 5:return Q[4](Q[3](Q[2](Q[1](Q[0](X)))));case 6:return Q[5](Q[4](Q[3](Q[2](Q[1](Q[0](X))))));case 7:return Q[6](Q[5](Q[4](Q[3](Q[2](Q[1](Q[0](X)))))));case 8:return Q[7](Q[6](Q[5](Q[4](Q[3](Q[2](Q[1](Q[0](X))))))));case 9:return Q[8](Q[7](Q[6](Q[5](Q[4](Q[3](Q[2](Q[1](Q[0](X)))))))));default:{let Y=X;for(let G=0,J=Q.length;G<J;G++)Y=Q[G](Y);return Y}}},$M={pipe(){return o(this,arguments)}},G5=function(){function X(){}return X.prototype=$M,X}(),fp=(X)=>class extends X{pipe(){return o(this,arguments)}};var H_={};k(H_,{untupled:()=>ap,tupled:()=>rp,satisfies:()=>op,pipe:()=>U6,memoize:()=>b1,identity:()=>C,hole:()=>sp,flow:()=>QX,flip:()=>ip,dual:()=>W,constant:()=>I0,constVoid:()=>y8,constUndefined:()=>D6,constTrue:()=>r1,constNull:()=>qG,constFalse:()=>U7,compose:()=>np,cast:()=>ZM,apply:()=>lp,absurd:()=>HM,SK:()=>tp});var W=function(X,Q){if(typeof X==="function")return function(){return X(arguments)?Q.apply(this,arguments):(Y)=>Q(Y,...arguments)};switch(X){case 0:case 1:throw RangeError(`Invalid arity ${X}`);case 2:return function(Y,G){if(arguments.length>=2)return Q(Y,G);return function(J){return Q(J,Y)}};case 3:return function(Y,G,J){if(arguments.length>=3)return Q(Y,G,J);return function($){return Q($,Y,G)}};default:return function(){if(arguments.length>=X)return Q.apply(this,arguments);let Y=arguments;return function(G){return Q(G,...Y)}}}},lp=(X)=>(Q)=>Q(X),C=(X)=>X,op=()=>(X)=>X,ZM=C,I0=(X)=>()=>X,r1=I0(!0),U7=I0(!1),qG=I0(null),D6=I0(void 0),y8=D6,ip=(X)=>(...Q)=>(...Y)=>X(...Y)(...Q),np=W(2,(X,Q)=>(Y)=>Q(X(Y))),HM=(X)=>{throw Error("Called `absurd` function which should be uncallable")},rp=(X)=>(Q)=>X(...Q),ap=(X)=>(...Q)=>X(Q);function U6(X,...Q){return o(X,Q)}function QX(X,Q,Y,G,J,$,Z,H,K){switch(arguments.length){case 1:return X;case 2:return function(){return Q(X.apply(this,arguments))};case 3:return function(){return Y(Q(X.apply(this,arguments)))};case 4:return function(){return G(Y(Q(X.apply(this,arguments))))};case 5:return function(){return J(G(Y(Q(X.apply(this,arguments)))))};case 6:return function(){return $(J(G(Y(Q(X.apply(this,arguments))))))};case 7:return function(){return Z($(J(G(Y(Q(X.apply(this,arguments)))))))};case 8:return function(){return H(Z($(J(G(Y(Q(X.apply(this,arguments))))))))};case 9:return function(){return K(H(Z($(J(G(Y(Q(X.apply(this,arguments)))))))))}}return}var sp=ZM(HM),tp=(X,Q)=>Q;function b1(X){let Q=new WeakMap;return(Y)=>{if(Q.has(Y))return Q.get(Y);let G=X(Y);return Q.set(Y,G),G}}var s0={};k(s0,{xor:()=>Nc,some:()=>Mc,or:()=>Oc,not:()=>qc,nor:()=>Lc,nand:()=>wc,mapInput:()=>ep,isUnknown:()=>wZ,isUndefined:()=>B_,isUint8Array:()=>Wc,isTupleOfAtLeast:()=>W_,isTupleOf:()=>K_,isTruthy:()=>Xc,isTagged:()=>P1,isSymbol:()=>JY,isString:()=>b8,isSet:()=>Qc,isRegExp:()=>D_,isReadonlyObject:()=>Hc,isPropertyKey:()=>zG,isPromiseLike:()=>Vc,isPromise:()=>Bc,isObjectOrArray:()=>Zc,isObjectKeyword:()=>AZ,isObject:()=>h1,isNumber:()=>M9,isNullish:()=>$c,isNull:()=>Gc,isNotUndefined:()=>M1,isNotNullish:()=>NG,isNotNull:()=>Jc,isNever:()=>V_,isMap:()=>Yc,isIterable:()=>T9,isFunction:()=>g1,isError:()=>Kc,isDate:()=>__,isBoolean:()=>P9,isBigInt:()=>OG,implies:()=>Fc,hasProperty:()=>P,every:()=>Ac,eqv:()=>Rc,compose:()=>_c,and:()=>zc,Tuple:()=>Dc,Struct:()=>Uc});var ep=W(2,(X,Q)=>(Y)=>X(Q(Y))),K_=W(2,(X,Q)=>X.length===Q),W_=W(2,(X,Q)=>X.length>=Q);function Xc(X){return!!X}function Qc(X){return X instanceof Set}function Yc(X){return X instanceof Map}function b8(X){return typeof X==="string"}function M9(X){return typeof X==="number"}function P9(X){return typeof X==="boolean"}function OG(X){return typeof X==="bigint"}function JY(X){return typeof X==="symbol"}function zG(X){return b8(X)||M9(X)||JY(X)}function g1(X){return typeof X==="function"}function B_(X){return X===void 0}function M1(X){return X!==void 0}function Gc(X){return X===null}function Jc(X){return X!==null}function $c(X){return X===null||X===void 0}function NG(X){return X!=null}function V_(X){return!1}function wZ(X){return!0}function Zc(X){return typeof X==="object"&&X!==null}function h1(X){return typeof X==="object"&&X!==null&&!Array.isArray(X)}function Hc(X){return h1(X)}function AZ(X){return typeof X==="object"&&X!==null||g1(X)}var P=W(2,(X,Q)=>AZ(X)&&(Q in X)),P1=W(2,(X,Q)=>P(X,"_tag")&&X._tag===Q);function Kc(X){return X instanceof Error}function Wc(X){return X instanceof Uint8Array}function __(X){return X instanceof Date}function T9(X){return P(X,Symbol.iterator)||b8(X)}function Bc(X){return P(X,"then")&&"catch"in X&&g1(X.then)&&g1(X.catch)}function Vc(X){return P(X,"then")&&g1(X.then)}function D_(X){return X instanceof RegExp}var _c=W(2,(X,Q)=>(Y)=>X(Y)&&Q(Y));function Dc(X){return(Q)=>{for(let Y=0;Y<X.length;Y++)if(X[Y](Q[Y])===!1)return!1;return!0}}function Uc(X){let Q=Object.keys(X);return(Y)=>{for(let G of Q)if(!X[G](Y[G]))return!1;return!0}}function qc(X){return(Q)=>!X(Q)}var Oc=W(2,(X,Q)=>(Y)=>X(Y)||Q(Y)),zc=W(2,(X,Q)=>(Y)=>X(Y)&&Q(Y)),Nc=W(2,(X,Q)=>(Y)=>X(Y)!==Q(Y)),Rc=W(2,(X,Q)=>(Y)=>X(Y)===Q(Y)),Fc=W(2,(X,Q)=>(Y)=>X(Y)?Q(Y):!0),Lc=W(2,(X,Q)=>(Y)=>!(X(Y)||Q(Y))),wc=W(2,(X,Q)=>(Y)=>!(X(Y)&&Q(Y)));function Ac(X){return(Q)=>{for(let Y of X)if(!Y(Q))return!1;return!0}}function Mc(X){return(Q)=>{for(let Y of X)if(Y(Q))return!0;return!1}}var g8={};k(g8,{symbol:()=>L0,structureKeys:()=>MZ,structure:()=>PZ,string:()=>Y1,random:()=>FG,optimize:()=>LG,number:()=>I9,isHash:()=>KM,hash:()=>H0,combine:()=>t0,array:()=>S6});var RG=(X)=>{let Q=new Set(Reflect.ownKeys(X));if(X.constructor===Object)return Q;if(X instanceof Error)Q.delete("stack");let Y=Object.getPrototypeOf(X),G=Y;while(G!==null&&G!==Object.prototype){let J=Reflect.ownKeys(G);for(let $=0;$<J.length;$++)Q.add(J[$]);G=Object.getPrototypeOf(G)}if(Q.has("constructor")&&typeof X.constructor==="function"&&Y===X.constructor.prototype)Q.delete("constructor");return Q},$Y=new WeakSet;var L0="~effect/interfaces/Hash",H0=(X)=>{switch(typeof X){case"number":return I9(X);case"bigint":return Y1(X.toString(10));case"boolean":return Y1(String(X));case"symbol":return Y1(String(X));case"string":return Y1(X);case"undefined":return Y1("undefined");case"function":case"object":if(X===null)return Y1("null");else if(X instanceof Date)return Y1(X.toISOString());else if(X instanceof RegExp)return Y1(X.toString());else{if($Y.has(X))return FG(X);if(q_.has(X))return q_.get(X);let Q=Ic(X,()=>{if(KM(X))return X[L0]();else if(typeof X==="function")return FG(X);else if(Array.isArray(X)||ArrayBuffer.isView(X))return S6(X);else if(X instanceof Map)return Pc(X);else if(X instanceof Set)return Tc(X);return PZ(X)});return q_.set(X,Q),Q}default:throw Error(`BUG: unhandled typeof ${typeof X} - please report an issue at https://github.com/Effect-TS/effect/issues`)}},FG=(X)=>{if(!U_.has(X))U_.set(X,I9(Math.floor(Math.random()*Number.MAX_SAFE_INTEGER)));return U_.get(X)},t0=W(2,(X,Q)=>X*53^Q),LG=(X)=>X&3221225471|X>>>1&1073741824,KM=(X)=>P(X,L0),I9=(X)=>{if(X!==X)return Y1("NaN");if(X===1/0)return Y1("Infinity");if(X===-1/0)return Y1("-Infinity");let Q=X|0;if(Q!==X)Q^=X*4294967295;while(X>4294967295)Q^=X/=4294967295;return LG(Q)},Y1=(X)=>{let Q=5381,Y=X.length;while(Y)Q=Q*33^X.charCodeAt(--Y);return LG(Q)},MZ=(X,Q)=>{let Y=12289;for(let G of Q)Y^=t0(H0(G),H0(X[G]));return LG(Y)},PZ=(X)=>MZ(X,RG(X)),z_=(X,Q)=>(Y)=>{let G=X;for(let J of Y)G^=Q(J);return LG(G)},S6=z_(6151,H0),Pc=z_(Y1("Map"),([X,Q])=>t0(H0(X),H0(Q))),Tc=z_(Y1("Set"),H0),U_=new WeakMap,q_=new WeakMap,O_=new WeakSet;function Ic(X,Q){if(O_.has(X))return Y1("[Circular]");O_.add(X);let Y=Q();return O_.delete(X),Y}var G1={};k(G1,{symbol:()=>w0,makeCompareSet:()=>AG,makeCompareMap:()=>wG,isEqual:()=>F_,equals:()=>Q0,byReferenceUnsafe:()=>IZ,byReference:()=>bc,asEquivalence:()=>Z8});var w0="~effect/interfaces/Equal";function Q0(){if(arguments.length===1)return(X)=>q7(X,arguments[0]);return q7(arguments[0],arguments[1])}function q7(X,Q){if(X===Q)return!0;if(X==null||Q==null)return!1;let Y=typeof X;if(Y!==typeof Q)return!1;if(Y==="number"&&X!==X&&Q!==Q)return!0;if(Y!=="object"&&Y!=="function")return!1;if($Y.has(X)||$Y.has(Q))return!1;return Ec(X,Q,jc)}function Cc(X,Q,Y){let G=N_.has(X),J=R_.has(Q);if(G&&J)return!0;if(G||J)return!1;N_.add(X),R_.add(Q);let $=Y();return N_.delete(X),R_.delete(Q),$}var N_=new WeakSet,R_=new WeakSet;function jc(X,Q){if(H0(X)!==H0(Q))return!1;else if(X instanceof Date){if(!(Q instanceof Date))return!1;return X.toISOString()===Q.toISOString()}else if(X instanceof RegExp){if(!(Q instanceof RegExp))return!1;return X.toString()===Q.toString()}let Y=F_(X),G=F_(Q);if(Y!==G)return!1;let J=Y&&G;if(typeof X==="function"&&!J)return!1;return Cc(X,Q,()=>{if(J)return X[w0](Q);else if(Array.isArray(X)){if(!Array.isArray(Q)||X.length!==Q.length)return!1;return Sc(X,Q)}else if(ArrayBuffer.isView(X)){if(!ArrayBuffer.isView(Q)||X.byteLength!==Q.byteLength)return!1;return xc(X,Q)}else if(X instanceof Map){if(!(Q instanceof Map)||X.size!==Q.size)return!1;return kc(X,Q)}else if(X instanceof Set){if(!(Q instanceof Set)||X.size!==Q.size)return!1;return yc(X,Q)}return vc(X,Q)})}function Ec(X,Q,Y){let G=TZ.get(X);if(!G)G=new WeakMap,TZ.set(X,G);else if(G.has(Q))return G.get(Q);let J=Y(X,Q);G.set(Q,J);let $=TZ.get(Q);if(!$)$=new WeakMap,TZ.set(Q,$);return $.set(X,J),J}var TZ=new WeakMap;function Sc(X,Q){for(let Y=0;Y<X.length;Y++)if(!q7(X[Y],Q[Y]))return!1;return!0}function xc(X,Q){if(X.length!==Q.length)return!1;for(let Y=0;Y<X.length;Y++)if(X[Y]!==Q[Y])return!1;return!0}function vc(X,Q){let Y=RG(X),G=RG(Q);if(Y.size!==G.size)return!1;for(let J of Y)if(!G.has(J)||!q7(X[J],Q[J]))return!1;return!0}function wG(X,Q){return function(G,J){for(let[$,Z]of G){let H=!1;for(let[K,B]of J)if(X($,K)&&Q(Z,B)){H=!0;break}if(!H)return!1}return!0}}var kc=wG(q7,q7);function AG(X){return function(Y,G){for(let J of Y){let $=!1;for(let Z of G)if(X(J,Z)){$=!0;break}if(!$)return!1}return!0}}var yc=AG(q7),F_=(X)=>P(X,w0),Z8=()=>Q0,bc=(X)=>IZ(new Proxy(X,{})),IZ=(X)=>{return $Y.add(X),X};var x6={};k(x6,{make:()=>b0,flip:()=>gc});function b0(X,Q,Y){return{combine:X,initialValue:Q,combineAll:Y??((G)=>{let J=Q;for(let $ of G)J=X(J,$);return J})}}function gc(X){return b0((Q,Y)=>X.combine(Y,Q),X.initialValue)}var P8={};k(P8,{strictEqual:()=>MG,mapInput:()=>VM,makeReducer:()=>dc,make:()=>n0,combineAll:()=>BM,combine:()=>WM,Tuple:()=>A_,Struct:()=>M_,String:()=>L_,Record:()=>mc,Number:()=>jZ,Date:()=>pc,Boolean:()=>w_,BigInt:()=>hc,Array:()=>O7});var n0=(X)=>(Q,Y)=>Q===Y||X(Q,Y),CZ=(X,Q)=>X===Q,MG=()=>CZ,L_=CZ,jZ=n0((X,Q)=>globalThis.Number.isNaN(X)&&globalThis.Number.isNaN(Q)),w_=CZ,hc=CZ,WM=W(2,(X,Q)=>n0((Y,G)=>X(Y,G)&&Q(Y,G))),BM=(X)=>n0((Q,Y)=>{for(let G of X)if(!G(Q,Y))return!1;return!0}),VM=W(2,(X,Q)=>n0((Y,G)=>X(Q(Y),Q(G))));function A_(X){return n0((Q,Y)=>{if(Q.length!==Y.length)return!1;for(let G=0;G<Q.length;G++)if(!X[G](Q[G],Y[G]))return!1;return!0})}function O7(X){return n0((Q,Y)=>{if(Q.length!==Y.length)return!1;for(let G=0;G<Q.length;G++)if(!X(Q[G],Y[G]))return!1;return!0})}function M_(X){let Q=Reflect.ownKeys(X);return n0((Y,G)=>{for(let J of Q)if(!X[J](Y[J],G[J]))return!1;return!0})}function mc(X){return n0((Q,Y)=>{let G=Reflect.ownKeys(Q),J=Reflect.ownKeys(Y);if(G.length!==J.length)return!1;for(let $ of G)if(!Object.hasOwn(Y,$)||!X(Q[$],Y[$]))return!1;return!0})}function dc(){return b0(WM,()=>!0,BM)}var pc=VM(jZ,(X)=>X.getTime());var ZY={};k(ZY,{min:()=>P_,max:()=>T_,make:()=>h8,last:()=>fc,intercalate:()=>oc,flip:()=>cc,first:()=>uc,constant:()=>lc});function h8(X){return{combine:X}}function cc(X){return h8((Q,Y)=>X.combine(Y,Q))}function P_(X){return h8((Q,Y)=>X(Q,Y)===-1?Q:Y)}function T_(X){return h8((Q,Y)=>X(Q,Y)===1?Q:Y)}function uc(){return h8((X,Q)=>X)}function fc(){return h8((X,Q)=>Q)}function lc(X){return h8(()=>X)}function oc(X){return(Q)=>h8((Y,G)=>Q.combine(Y,Q.combine(X,G)))}var DM={};k(DM,{symbolRedactable:()=>PG,redact:()=>G4,isRedactable:()=>_M,getRedacted:()=>EZ,currentFiberTypeId:()=>z7});var PG=Symbol.for("~effect/Redactable"),_M=(X)=>P(X,PG);function G4(X){if(_M(X))return EZ(X);return X}function EZ(X){return X[PG](globalThis[z7]?.context??ic)}var z7="~effect/Fiber/currentFiber",ic={"~effect/Context":{},mapUnsafe:new Map,pipe(){return o(this,arguments)}};var qM={};k(qM,{formatPropertyKey:()=>YX,formatPath:()=>TG,formatJson:()=>HY,formatDate:()=>SZ,format:()=>u});function u(X,Q){let Y=Q?.space??0,G=new WeakSet,J=!Y?"":typeof Y==="number"?" ".repeat(Y):Y,$=(B)=>J.repeat(B),Z=(B,V)=>{let _=B?.constructor;return _&&_!==Object.prototype.constructor&&_.name?`${_.name}(${V})`:V},H=(B)=>{try{return Reflect.ownKeys(B)}catch{return["[ownKeys threw]"]}};function K(B,V=0){if(Array.isArray(B)){if(G.has(B))return UM;if(G.add(B),!J||B.length<=1)return`[${B.map((D)=>K(D,V)).join(",")}]`;let _=B.map((D)=>K(D,V+1)).join(`,
3
3
  `+$(V+1));return`[
4
4
  ${$(V+1)}${_}
5
5
  ${$(V)}]`}if(B instanceof Date)return SZ(B);if(!Q?.ignoreToString&&P(B,"toString")&&typeof B.toString==="function"&&B.toString!==Object.prototype.toString&&B.toString!==Array.prototype.toString){let _=nc(B);if(B instanceof Error&&B.cause)return`${_} (cause: ${K(B.cause,V)})`;return _}if(typeof B==="string")return JSON.stringify(B);if(typeof B==="number"||B==null||typeof B==="boolean"||typeof B==="symbol")return String(B);if(typeof B==="bigint")return String(B)+"n";if(typeof B==="object"||typeof B==="function"){if(G.has(B))return UM;if(G.add(B),PG in B)return u(EZ(B));if(Symbol.iterator in B)return`${B.constructor.name}(${K(Array.from(B),V)})`;let _=H(B);if(!J||_.length<=1){let U=`{${_.map((z)=>`${YX(z)}:${K(B[z],V)}`).join(",")}}`;return Z(B,U)}let D=`{
@@ -74,4 +74,4 @@ ${tG0(J)}`;return $}function Ng(X){return Uw(X,k1)}async function Rg(X){let Q=[]
74
74
  `),J=J.replace(/\\r/g,"\r");Q[G]=J}return Q}function bz0(X){let Q={};for(let Y in X)Q[Y]=zp(X[Y],X).replace(/\\\$/g,"$");return Q}function zp(X,Q){let Y=gz0(X,/(?!(?<=\\))\$/g);if(Y===-1)return X;let G=X.slice(Y),J=/((?!(?<=\\))\${?([\w]+)(?::-([^}\\]*))?}?)/,$=G.match(J);if($!==null){let[Z,H,K,B]=$;return zp(X.replace(H,B||Q[K]||""),Q)}return X}function gz0(X,Q){let Y=Array.from(X.matchAll(Q));return Y.length>0?Y.slice(-1)[0].index:-1}var hz0=Z0(function*(X){let Y=yield*(yield*Y5).readFileString(X?.path??".env");return Q_({env:Op(Y)})}),mz0=Z0(function*(X){let Q=yield*FZ,Y=yield*Y5,G=X?.rootPath??"/";return QY((J)=>{let $=Q.join(G,...J.map(String)),Z=Y.readFileString($).pipe(E((K)=>DG(K.trim()))),H=Y.readDirectory($).pipe(E((K)=>{let B=K.map((V)=>typeof V==="string"?Q.basename(V):u(V?.name??""));return X_(new Set(B))}));return Z.pipe(T4(()=>H),J3((K)=>new eA({message:`Failed to read file at ${Q.join(G,...J.map(String))}`,cause:K})))})});var Fp={};k(Fp,{values:()=>QM,isLessThanOrEqualTo:()=>fz0,isLessThan:()=>uz0,isGreaterThanOrEqualTo:()=>cz0,isGreaterThan:()=>Rp,isEnabled:()=>lz0,getOrdinal:()=>pz0,Order:()=>Y_,Equivalence:()=>dz0});var QM=["All","Fatal","Error","Warn","Info","Debug","Trace","None"],Y_=Jq,dz0=MG(),pz0=(X)=>Gq(X),Rp=rH,cz0=O6(Y_),uz0=a8(Y_),fz0=q6(Y_),lz0=(X)=>n((Q)=>T(!Rp(Q.getRef(Fq),X)));var VN0={};k(VN0,{withDefault:()=>Mp,url:()=>KN0,unwrap:()=>Pp,succeed:()=>vp,string:()=>sz0,schema:()=>E6,redacted:()=>HN0,port:()=>$N0,orElse:()=>Ap,option:()=>rz0,number:()=>ez0,nonEmptyString:()=>tz0,nested:()=>BN0,mapOrFail:()=>iz0,map:()=>wp,make:()=>w9,logLevel:()=>ZN0,literal:()=>YN0,isConfig:()=>Lp,int:()=>QN0,finite:()=>XN0,fail:()=>xp,duration:()=>JN0,date:()=>WN0,boolean:()=>GN0,all:()=>nz0,TrueValues:()=>Tp,Record:()=>az0,Port:()=>Ep,LogLevel:()=>Sp,FalseValues:()=>Ip,Duration:()=>jp,ConfigError:()=>J_,Boolean:()=>Cp});var YM="~effect/Config",Lp=(X)=>P(X,YM);class J_{_tag="ConfigError";name="ConfigError";cause;constructor(X){this.cause=X}get message(){return this.cause.toString()}toString(){return`ConfigError(${this.message})`}}var oz0={...z8,...ZX,[YM]:YM,asEffect(){return R(XY.asEffect(),(X)=>this.parse(X))},toJSON(){return{_id:"Config"}}};function w9(X){let Q=Object.create(oz0);return Q.parse=X,Q}var wp=W(2,(X,Q)=>{return w9((Y)=>E(X.parse(Y),Q))}),iz0=W(2,(X,Q)=>{return w9((Y)=>R(X.parse(Y),Q))}),Ap=W(2,(X,Q)=>{return w9((Y)=>T4(X.parse(Y),(G)=>Q(G).parse(Y)))});function nz0(X){let Q=Array.isArray(X)?X:(Symbol.iterator in X)?[...X]:X;if(Array.isArray(Q))return w9((Y)=>X3(Q.map((G)=>G.parse(Y))));else return w9((Y)=>X3(VX(Q,(G)=>G.parse(Y))))}function G_(X){switch(X._tag){case"MissingKey":return!0;case"InvalidType":case"InvalidValue":return d(X.actual)||$0(X.actual)&&X.actual.value===void 0;case"OneOf":return X.actual===void 0;case"Encoding":return d(X.actual)||$0(X.actual)&&X.actual.value===void 0?!0:G_(X.issue);case"Pointer":case"Filter":return G_(X.issue);case"UnexpectedKey":return!1;case"Forbidden":return!1;case"Composite":case"AnyOf":return X.issues.every(G_)}}var Mp=W(2,(X,Q)=>{return Ap(X,(Y)=>{if(_A(Y.cause)){let G=Y.cause.issue;if(G_(G))return vp(Q)}return xp(Y.cause)})}),rz0=(X)=>X.pipe(wp(q),Mp(w())),Pp=(X)=>{if(Lp(X))return X;return w9((Q)=>{let G=Object.entries(X).map(([J,$])=>Pp($).parse(Q).pipe(E((Z)=>[J,Z])));return X3(G).pipe(E(Object.fromEntries))})},GM=Z0(function*(X,Q){let Y=yield*X.load(Q);if(Y===void 0)return;switch(Y._tag){case"Value":return Y.value;case"Record":{if(Y.value!==void 0)return Y.value;let G={};for(let J of Y.keys){let $=yield*GM(X,[...Q,J]);if($!==void 0)G[J]=$}return G}case"Array":{if(Y.value!==void 0)return Y.value;let G=[];for(let J=0;J<Y.length;J++)G.push(yield*GM(X,[...Q,J]));return G}}}),LZ=Z0(function*(X,Q,Y){switch(X._tag){case"Objects":{let G={};for(let J of X.propertySignatures){let $=J.name;if(typeof $==="string"){let Z=yield*LZ(J.type,Q,[...Y,$]);if(Z!==void 0)G[$]=Z}}if(X.indexSignatures.length>0){let J=yield*Q.load(Y);if(J&&J._tag==="Record")for(let $ of X.indexSignatures){let Z=Q7($.parameter);for(let H of J.keys)if(!Object.hasOwn(G,H)&&Z(H)){let K=yield*LZ($.type,Q,[...Y,H]);if(K!==void 0)G[H]=K}}}return G}case"Arrays":{let G=yield*Q.load(Y);if(G&&G._tag==="Value")return G.value;let J=[];for(let $=0;$<X.elements.length;$++)J.push(yield*LZ(X.elements[$],Q,[...Y,$]));return J}case"Union":return yield*GM(Q,Y);case"Suspend":return yield*LZ(X.thunk(),Q,Y);default:{let G=yield*Q.load(Y);if(G===void 0)return;if(G._tag==="Value")return G.value;if(G._tag==="Record"&&G.value!==void 0)return G.value;if(G._tag==="Array"&&G.value!==void 0)return G.value;return}}});function E6(X,Q){let Y=kV(X),G=U1(Y),J=Y8(Y.ast),$=typeof Q==="string"?[Q]:Q??[];return w9((Z)=>{let H=Z.prefix?[...Z.prefix,...$]:$;return LZ(J,Z,$).pipe(o8((K)=>G(K).pipe(l8((B)=>new z9(H.length>0?new E0(H,B):B)))),l8((K)=>new J_(K)))})}var Tp=_7(["true","yes","on","1","y"]),Ip=_7(["false","no","off","0","n"]),Cp=_7([...Tp.literals,...Ip.literals]).pipe(X0(wV,Z1({decode:(X)=>X==="true"||X==="yes"||X==="on"||X==="1"||X==="y",encode:(X)=>X?"true":"false"}))),jp=W0.pipe(X0(UZ,{decode:E8((X)=>{let Q=cD(X);return t8(Q,{onNone:()=>I(new P0(q(X))),onSome:O})}),encode:D2(()=>"Encoding Duration is not supported")})),Ep=qZ.check(DZ({minimum:1,maximum:65535})),Sp=_7(QM),az0=(X,Q,Y)=>{let G=ZZ(X,Q),J=W0.pipe(X0(ZZ(W0,W0),tz(Y)),X0(G));return i1([G,J])};function xp(X){return w9(()=>I(new J_(X)))}function vp(X){return w9(()=>O(X))}function sz0(X){return E6(W0,X)}function tz0(X){return E6(FA,X)}function ez0(X){return E6(e9,X)}function XN0(X){return E6(KG,X)}function QN0(X){return E6(qZ,X)}function YN0(X,Q){return E6(G8(X),Q)}function GN0(X){return E6(Cp,X)}function JN0(X){return E6(jp,X)}function $N0(X){return E6(Ep,X)}function ZN0(X){return E6(Sp,X)}function HN0(X){return E6(IV(W0),X)}function KN0(X){return E6(jV,X)}function WN0(X){return E6(EV,X)}var BN0=W(2,(X,Q)=>w9((Y)=>X.parse(XM(Y,Q))));var CN0={};k(CN0,{withLeveledConsole:()=>qN0,withConsoleLog:()=>$_,withConsoleError:()=>UN0,tracerLogger:()=>PN0,toFile:()=>IN0,map:()=>bp,make:()=>NN0,layer:()=>TN0,isLogger:()=>kp,formatStructured:()=>JM,formatSimple:()=>FN0,formatLogFmt:()=>mp,formatJson:()=>dp,defaultLogger:()=>RN0,consoleStructured:()=>AN0,consolePretty:()=>LN0,consoleLogFmt:()=>wN0,consoleJson:()=>MN0,batched:()=>pp,LogToStderr:()=>DN0,CurrentLoggers:()=>yp});var _N0="~effect/Logger",kp=(X)=>P(X,_N0),yp=M5,DN0=oY,bp=W(2,(X,Q)=>F6((Y)=>Q(X.log(Y)))),$_=(X)=>F6((Q)=>{return Q.fiber.getRef(i7).log(X.log(Q))}),UN0=(X)=>F6((Q)=>{return Q.fiber.getRef(i7).error(X.log(Q))}),qN0=(X)=>F6((Q)=>{let Y=Q.fiber.getRef(i7),G=X.log(Q);switch(Q.logLevel){case"Debug":return Y.debug(G);case"Info":return Y.info(G);case"Trace":return Y.trace(G);case"Warn":return Y.warn(G);case"Error":case"Fatal":return Y.error(G);default:return Y.log(G)}}),ON0=/^[^\s"=]*$/,zN0=(X)=>`"${X.replace(/\\([\s\S])|(")/g,"\\$1$2")}"`,gp=(X)=>`#${X}`,hp=(X,Q)=>({cause:Y,date:G,fiber:J,logLevel:$,message:Z})=>{let H=(N)=>N.match(ON0)?N:X(N),K=(N,L)=>`${$q(N)}=${H(L)}`,B=(N,L)=>" "+K(N,L),V=K("timestamp",G.toISOString());V+=B("level",$),V+=B("fiber",gp(J.id));let _=wY(Z);for(let N=0;N<_.length;N++)V+=B("message",u(_[N],{space:Q}));if(Y.reasons.length>0)V+=B("cause",OX(Y));let D=G.getTime(),U=J.getRef(rY);for(let N of U)V+=" "+MJ(N,D);let z=J.getRef(nY);for(let[N,L]of Object.entries(z))V+=B(N,u(L,{space:Q}));return V},NN0=F6,RN0=Zq,FN0=F6(hp(zN0)),mp=F6(hp(JSON.stringify,0)),JM=F6(({cause:X,date:Q,fiber:Y,logLevel:G,message:J})=>{let $={},Z={},H=Y.getRef(nY);for(let[_,D]of Object.entries(H))$[_]=iY(D);let K=Q.getTime(),B=Y.getRef(rY);for(let[_,D]of B)Z[_]=K-D;let V=wY(J);return{message:V.length===1?iY(V[0]):V.map(iY),level:G.toUpperCase(),timestamp:Q.toISOString(),cause:X.reasons.length>0?OX(X):void 0,annotations:$,spans:Z,fiberId:gp(Y.id)}}),dp=bp(JM,HY),pp=W(2,(X,Q)=>g(f7,(Y)=>{let G=[],J=f(()=>{if(G.length===0)return U0;let $=G;return G=[],Q.flush($)});return h6(($)=>$(wX(Q.window).pipe(t1(J),cY)).pipe(pH,g((Z)=>N4(Y,()=>gY(Z))),t1(A5(()=>J)),F8(F6((Z)=>{G.push(X.log(Z))}))))})),LN0=nC,wN0=$_(mp),AN0=$_(JM),MN0=$_(dp),PN0=Hq,TN0=(X,Q)=>G9(yp,n(zJ(function*(Y){let G=new Set(Q?.mergeWithExisting===!0?Y.getRef(M5):[]);for(let J of X)G.add(Y0(J)?yield*J:J);return G}))),IN0=W((X)=>kp(X[0]),(X,Q,Y)=>IH(function*(){let J=yield*(yield*Y5).open(Q,{flag:"a+",...Y}),$=new TextEncoder;return yield*pp(X,{window:Y?.batchWindow??1000,flush:(Z)=>yH(J.write($.encode(Z.join(`
75
75
  `)+`
76
76
  `)))})}));
77
- export{o as wA,GY as xA,W as yA,C as zA,ZM as AA,I0 as BA,r1 as CA,U7 as DA,D6 as EA,y8 as FA,np as GA,HM as HA,U6 as IA,QX as JA,sp as KA,H_ as LA,b8 as MA,M9 as NA,P9 as OA,OG as PA,JY as QA,B_ as RA,M1 as SA,Gc as TA,Jc as UA,h1 as VA,P as WA,__ as XA,Oc as YA,s0 as ZA,L0 as _A,H0 as $A,t0 as aB,I9 as bB,Y1 as cB,PZ as dB,S6 as eB,g8 as fB,w0 as gB,Q0 as hB,G1 as iB,b0 as jB,x6 as kB,n0 as lB,MG as mB,hc as nB,P8 as oB,P_ as pB,T_ as qB,ZY as rB,PG as sB,G4 as tB,DM as uB,u as vB,YX as wB,qM as xB,q1 as yB,T1 as zB,I_ as AB,rc as BB,zM as CB,NM as DB,tc as EB,z8 as FB,ZX as GB,Y0 as HB,v_ as IB,q0 as JB,a1 as KB,n as LB,p4 as MB,a8 as NB,s8 as OB,q6 as PB,O6 as QB,J4 as RB,$4 as SB,GX as TB,JX as UB,m8 as VB,w as WB,q as XB,d as YB,$0 as ZB,t8 as _B,yG as $B,qu as aC,bG as bC,C9 as cC,f4 as dC,O1 as eC,I7 as fC,S0 as gC,S as hC,y as iC,p_ as jC,ou as kC,cZ as lC,b as mC,M0 as nC,e8 as oC,k6 as pC,I1 as qC,Lf as rC,i_ as sC,xf as tC,a_ as uC,lf as vC,t_ as wC,aM as xC,XD as yC,pG as zC,l4 as AC,o4 as BC,VX as CC,GD as DC,JD as EC,Fl as FC,Tl as GC,FY as HC,uZ as IC,x as JC,wY as KC,j7 as LC,AY as MC,V1 as NC,B0 as OC,BD as PC,nZ as QC,J1 as RC,D0 as SC,j1 as TC,S7 as UC,wD as VC,jo as WC,s1 as XC,vD as YC,gP as ZC,d1 as _C,V4 as $C,IY as aD,R8 as bD,W8 as cD,gD as dD,Ii as eD,n4 as fD,l0 as gD,mD as hD,CY as iD,Ei as jD,O0 as kD,F1 as lD,x0 as mD,b7 as nD,g7 as oD,e0 as pD,p1 as qD,c1 as rD,oP as sD,$1 as tD,hi as uD,lD as vD,sP as wD,b6 as xD,Zn as yD,Wn as zD,An as AD,rD as BD,aD as CD,x9 as DD,ZT as ED,Pn as FD,m7 as GD,d7 as HD,tD as ID,KT as JD,XU as KD,F5 as LD,bY as MD,T as ND,m as OD,f as PD,qU as QD,mY as RD,U0 as SD,zJ as TD,F8 as UD,dY as VD,lT as WD,g as XD,r as YD,L5 as ZD,FU as _D,g6 as $D,RJ as aE,w5 as bE,N6 as cE,R6 as dE,AJ as eE,cI as fE,c8 as gE,oI as hE,nI as iE,l7 as jE,h6 as kE,o7 as lE,eU as mE,Y6 as nE,i7 as oE,Vr as pE,rC as qE,_r as rE,PJ as sE,Rr as tE,Fr as uE,IJ as vE,Lr as wE,n7 as xE,jr as yE,xr as zE,vr as AE,_q as BE,kr as CE,Dq as DE,v as EE,mr as FE,ar as GE,sC as HE,R4 as IE,m6 as JE,Q9 as KE,qq as LE,T8 as ME,u8 as NE,r7 as OE,F4 as PE,AX as QE,P5 as RE,T5 as SE,Ma as TE,a7 as UE,Jj as VE,tH as WE,nY as XE,rY as YE,ja as ZE,xa as _E,$j as $E,L6 as aF,ya as bF,d6 as cF,w6 as dF,Y9 as eF,B8 as fF,ba as gF,V8 as hF,p0 as iF,ga as jF,I5 as kF,j5 as lF,aY as mF,e7 as nF,_j as oF,xJ as pF,A6 as qF,s7 as rF,pa as sF,G9 as tF,Tq as uF,ca as vF,Aq as wF,YK as xF,sY as yF,la as zF,b9 as AF,Cq as BF,JK as CF,jq as DF,g9 as EF,tY as FF,eY as GF,Sq as HF,ks as IF,ZK as JF,Q2 as KF,jE as LF,SE as MF,K0 as NF,M4 as OF,Ze as PF,GQ as QF,EK as RF,Be as SF,oJ as TF,Z2 as UF,iJ as VF,re as WF,JS as XF,OO as YF,aE as ZF,d9 as _F,X3 as $F,CX as aG,M6 as bG,Q3 as cG,HQ as dG,O as eG,h as fG,i as gG,p as hG,k00 as iG,AO as jG,WQ as kG,w8 as lG,I as mG,_1 as nG,J6 as oG,H9 as pG,MO as qG,p6 as rG,R as sG,PO as tG,c6 as uG,$6 as vG,f00 as wG,f8 as xG,E as yG,Q8 as zG,TO as AG,v5 as BG,T4 as CG,CO as DG,n00 as EG,_8 as FG,Y10 as GG,J3 as HG,J10 as IG,dK as JG,BS as KG,W10 as LG,_10 as MG,q10 as NG,N10 as OG,R10 as PG,EO as QG,BQ as RG,pK as SG,M10 as TG,T10 as UG,kO as VG,C10 as WG,E10 as XG,K2 as YG,S10 as ZG,VQ as _G,W2 as $G,u6 as aH,bO as bH,gO as cH,y10 as dH,I4 as eH,k5 as fH,fK as gH,_Q as hH,h10 as iH,m10 as jH,y5 as kH,mO as lH,p9 as mH,f10 as nH,f6 as oH,i10 as pH,DQ as qH,W9 as rH,jX as sH,g0 as tH,n10 as uH,s10 as vH,Q80 as wH,V80 as xH,_80 as yH,U80 as zH,E1 as AH,Z3 as BH,z80 as CH,H3 as DH,b5 as EH,L80 as FH,w80 as GH,K3 as HH,cO as IH,A80 as JH,uO as KH,W3 as LH,M80 as MH,lK as NH,P80 as OH,Z0 as PH,T80 as QH,oK as RH,I80 as SH,E80 as TH,x80 as UH,y80 as VH,g80 as WH,eJ as XH,u80 as YH,i80 as ZH,n80 as _H,B2 as $H,o8 as aI,D8 as bI,cF0 as cI,fO as dI,aK as eI,Zz as fI,Dz as gI,hF0 as hI,c9 as iI,Oz as jI,E0 as kI,vX as lI,P0 as mI,FQ as nI,LQ as oI,U8 as pI,M3 as qI,C3 as rI,E4 as sI,Z1 as tI,RW as uI,v4 as vI,v40 as wI,zN as xI,L2 as yI,Z6 as zI,I2 as AI,H1 as BI,Y8 as CI,G90 as DI,J90 as EI,Z90 as FI,_9 as GI,kW as HI,$x as II,IQ as JI,_90 as KI,Zx as LI,D9 as MI,YR as NI,D90 as OI,bW as PI,i5 as QI,n5 as RI,r3 as SI,GR as TI,JR as UI,HR as VI,k2 as WI,M90 as XI,I90 as YI,C90 as ZI,x2 as _I,mX as $I,S90 as aJ,gX as bJ,v90 as cJ,m90 as dJ,d90 as eJ,p90 as fJ,l90 as gJ,WR as hJ,BR as iJ,MX0 as jJ,dX as kJ,TX0 as lJ,IX0 as mJ,CX0 as nJ,t3 as oJ,r5 as pJ,e3 as qJ,I6 as rJ,hW as sJ,cW as tJ,uW as uJ,G$ as vJ,Px as wJ,RR as xJ,Q50 as yJ,IR as zJ,n8 as AJ,jR as BJ,K6 as CJ,ER as DJ,f1 as EJ,n9 as FJ,g2 as GJ,s5 as HJ,y4 as IJ,C50 as JJ,XB as KJ,jQ as LJ,bR as MJ,ix as NJ,V0 as OJ,K1 as PJ,X70 as QJ,VB as RJ,n6 as SJ,r9 as TJ,bF as UJ,x70 as VJ,v70 as WJ,I$ as XJ,k70 as YJ,y70 as ZJ,b70 as _J,h70 as $J,m70 as aK,d70 as bK,p70 as cK,c70 as dK,u70 as eK,C$ as fK,iF as gK,a70 as hK,s70 as iK,t70 as jK,e70 as kK,XQ0 as lK,GQ0 as mK,JQ0 as nK,$Q0 as oK,ZQ0 as pK,HQ0 as qK,KQ0 as rK,WQ0 as sK,kv as tK,_Q0 as uK,DQ0 as vK,E$ as wK,UQ0 as xK,qQ0 as yK,OQ0 as zK,tF as AK,zQ0 as BK,NQ0 as CK,RQ0 as DK,FQ0 as EK,LQ0 as FK,wQ0 as GK,AQ0 as HK,MQ0 as IK,PQ0 as JK,TQ0 as KK,rv as LK,IB as MK,mQ0 as NK,dQ0 as OK,tv as PK,oX as QK,b$ as RK,g$ as SK,i2 as TK,iQ0 as UK,kk as VK,CY0 as WK,jY0 as XK,yk as YK,EY0 as ZK,qL as _K,Jk as $K,QY0 as aL,Vk as bL,Uk as cL,wL as dL,Mk as eL,eX as fL,xW0 as gL,_A as hL,uh as iL,fh as jL,mW0 as kL,oh as lL,ih as mL,FV as nL,lQ as oL,ZG as pL,HB0 as qL,_6 as rL,G8 as sL,BB0 as tL,_B0 as uL,DB0 as vL,$Z as wL,LV as xL,DA as yL,UA as zL,W0 as AL,e9 as BL,wV as CL,ah as DL,AV as EL,UB0 as FL,qB0 as GL,OB0 as HL,Q1 as IL,ZZ as JL,FB0 as KL,$G as LL,LB0 as ML,J8 as NL,wB0 as OL,i1 as PL,_7 as QL,MV as RL,Xm as SL,X0 as TL,NA as UL,oQ as VL,XX as WL,u0 as XL,hB0 as YL,Km as ZL,HZ as _L,mB0 as $L,dB0 as aM,pB0 as bM,uB0 as cM,fB0 as dM,Wm as eM,lB0 as fM,oB0 as gM,iB0 as hM,nB0 as iM,rB0 as jM,aB0 as kM,sB0 as lM,tB0 as mM,Bm as nM,eB0 as oM,_m as pM,XV0 as qM,QV0 as rM,DZ as sM,YV0 as tM,TV as uM,Dm as vM,$V0 as wM,ZV0 as xM,HV0 as yM,KV0 as zM,WV0 as AM,BV0 as BM,Um as CM,VV0 as DM,_V0 as EM,DV0 as FM,qm as GM,RV0 as HM,zm as IM,FV0 as JM,LV0 as KM,wV0 as LM,AV0 as MM,MV0 as NM,PV0 as OM,TV0 as PM,Nm as QM,iQ as RM,kV0 as SM,IV as TM,KA as UM,WA as VM,Pm as WM,Tm as XM,bV0 as YM,hV0 as ZM,mV0 as _M,dV0 as $M,pV0 as aN,cV0 as bN,uV0 as cN,fV0 as dN,jV as eN,wA as fN,UZ as gN,Em as hN,aV0 as iN,Sm as jN,xm as kN,vm as lN,km as mN,KG as nN,qZ as oN,BA as pN,SV as qN,xV as rN,q_0 as sN,hm as tN,dm as uN,cm as vN,lm as wN,A_0 as xN,rm as yN,kV as zN,c_0 as AN,u_0 as BN,f_0 as CN,Xd as DN,nQ as EN,PA as FN,bV as GN,i_0 as HN,e_0 as IN,Jd as JN,Zd as KN,kA as LN,yA as MN,uV as NN,aD0 as ON,zd as PN,wd as QN,T0 as RN,j as SN,Td as TN,Id as UN,aQ as VN,BG as WN,L9 as XN,rQ as YN,sQ as ZN,NU0 as _N,RU0 as $N,FU0 as aO,tQ as bO,CU0 as cO,Y4 as dO,NZ as eO,xd as fO,pA as gO,Bq0 as hO,dd as iO,vq0 as jO,pd as kO,ZO0 as lO,WO0 as mO,BO0 as nO,OO0 as oO,NO0 as pO,AO0 as qO,IO0 as rO,CO0 as sO,Jp as tO,$p as uO,uO0 as vO,Zp as wO,sV as xO,oO0 as yO,iO0 as zO,iA as AO,rO0 as BO,Kp as CO,D7 as DO,Y5 as EO,Kz0 as FO,Wz0 as GO,Bp as HO,Vz0 as IO,Vp as JO,rA as KO,aA as LO,FZ as MO,wz0 as NO,Up as OO,Np as PO,QM as QO,pz0 as RO,Fp as SO,wp as TO,Mp as UO,rz0 as VO,E6 as WO,az0 as XO,sz0 as YO,VN0 as ZO,NN0 as _O,TN0 as $O,CN0 as aP};
77
+ export{o as HA,GY as IA,W as JA,C as KA,ZM as LA,I0 as MA,r1 as NA,U7 as OA,D6 as PA,y8 as QA,np as RA,HM as SA,U6 as TA,QX as UA,sp as VA,H_ as WA,b8 as XA,M9 as YA,P9 as ZA,OG as _A,JY as $A,B_ as aB,M1 as bB,Gc as cB,Jc as dB,h1 as eB,P as fB,__ as gB,Oc as hB,s0 as iB,L0 as jB,H0 as kB,t0 as lB,I9 as mB,Y1 as nB,PZ as oB,S6 as pB,g8 as qB,w0 as rB,Q0 as sB,G1 as tB,b0 as uB,x6 as vB,n0 as wB,MG as xB,hc as yB,P8 as zB,P_ as AB,T_ as BB,ZY as CB,PG as DB,G4 as EB,DM as FB,u as GB,YX as HB,qM as IB,q1 as JB,T1 as KB,I_ as LB,rc as MB,zM as NB,NM as OB,tc as PB,z8 as QB,ZX as RB,Y0 as SB,v_ as TB,q0 as UB,a1 as VB,n as WB,p4 as XB,a8 as YB,s8 as ZB,q6 as _B,O6 as $B,J4 as aC,$4 as bC,GX as cC,JX as dC,m8 as eC,w as fC,q as gC,d as hC,$0 as iC,t8 as jC,yG as kC,qu as lC,bG as mC,C9 as nC,f4 as oC,O1 as pC,I7 as qC,S0 as rC,S as sC,y as tC,p_ as uC,ou as vC,cZ as wC,b as xC,M0 as yC,e8 as zC,k6 as AC,I1 as BC,Lf as CC,i_ as DC,xf as EC,a_ as FC,lf as GC,t_ as HC,aM as IC,XD as JC,pG as KC,l4 as LC,o4 as MC,VX as NC,GD as OC,JD as PC,Fl as QC,Tl as RC,FY as SC,uZ as TC,x as UC,wY as VC,j7 as WC,AY as XC,V1 as YC,B0 as ZC,BD as _C,nZ as $C,J1 as aD,D0 as bD,j1 as cD,S7 as dD,wD as eD,jo as fD,s1 as gD,vD as hD,gP as iD,d1 as jD,V4 as kD,IY as lD,R8 as mD,W8 as nD,gD as oD,Ii as pD,n4 as qD,l0 as rD,mD as sD,CY as tD,Ei as uD,O0 as vD,F1 as wD,x0 as xD,b7 as yD,g7 as zD,e0 as AD,p1 as BD,c1 as CD,oP as DD,$1 as ED,hi as FD,lD as GD,sP as HD,b6 as ID,Zn as JD,Wn as KD,An as LD,rD as MD,aD as ND,x9 as OD,ZT as PD,Pn as QD,m7 as RD,d7 as SD,tD as TD,KT as UD,XU as VD,F5 as WD,bY as XD,T as YD,m as ZD,f as _D,qU as $D,mY as aE,U0 as bE,zJ as cE,F8 as dE,dY as eE,lT as fE,g as gE,r as hE,L5 as iE,FU as jE,g6 as kE,RJ as lE,w5 as mE,N6 as nE,R6 as oE,AJ as pE,cI as qE,c8 as rE,oI as sE,nI as tE,l7 as uE,h6 as vE,o7 as wE,eU as xE,Y6 as yE,i7 as zE,Vr as AE,rC as BE,_r as CE,PJ as DE,Rr as EE,Fr as FE,IJ as GE,Lr as HE,n7 as IE,jr as JE,xr as KE,vr as LE,_q as ME,kr as NE,Dq as OE,v as PE,mr as QE,ar as RE,sC as SE,R4 as TE,m6 as UE,Q9 as VE,qq as WE,T8 as XE,u8 as YE,r7 as ZE,F4 as _E,AX as $E,P5 as aF,T5 as bF,Ma as cF,a7 as dF,Jj as eF,tH as fF,nY as gF,rY as hF,ja as iF,xa as jF,$j as kF,L6 as lF,ya as mF,d6 as nF,w6 as oF,Y9 as pF,B8 as qF,ba as rF,V8 as sF,p0 as tF,ga as uF,I5 as vF,j5 as wF,aY as xF,e7 as yF,_j as zF,xJ as AF,A6 as BF,s7 as CF,pa as DF,G9 as EF,Tq as FF,ca as GF,Aq as HF,YK as IF,sY as JF,la as KF,b9 as LF,Cq as MF,JK as NF,jq as OF,g9 as PF,tY as QF,eY as RF,Sq as SF,ks as TF,ZK as UF,Q2 as VF,jE as WF,SE as XF,K0 as YF,M4 as ZF,Ze as _F,GQ as $F,EK as aG,Be as bG,oJ as cG,Z2 as dG,iJ as eG,re as fG,JS as gG,OO as hG,aE as iG,d9 as jG,X3 as kG,CX as lG,M6 as mG,Q3 as nG,HQ as oG,O as pG,h as qG,i as rG,p as sG,k00 as tG,AO as uG,WQ as vG,w8 as wG,I as xG,_1 as yG,J6 as zG,H9 as AG,MO as BG,p6 as CG,R as DG,PO as EG,c6 as FG,$6 as GG,f00 as HG,f8 as IG,E as JG,Q8 as KG,TO as LG,v5 as MG,T4 as NG,CO as OG,n00 as PG,_8 as QG,Y10 as RG,J3 as SG,J10 as TG,dK as UG,BS as VG,W10 as WG,_10 as XG,q10 as YG,N10 as ZG,R10 as _G,EO as $G,BQ as aH,pK as bH,M10 as cH,T10 as dH,kO as eH,C10 as fH,E10 as gH,K2 as hH,S10 as iH,VQ as jH,W2 as kH,u6 as lH,bO as mH,gO as nH,y10 as oH,I4 as pH,k5 as qH,fK as rH,_Q as sH,h10 as tH,m10 as uH,y5 as vH,mO as wH,p9 as xH,f10 as yH,f6 as zH,i10 as AH,DQ as BH,W9 as CH,jX as DH,g0 as EH,n10 as FH,s10 as GH,Q80 as HH,V80 as IH,_80 as JH,U80 as KH,E1 as LH,Z3 as MH,z80 as NH,H3 as OH,b5 as PH,L80 as QH,w80 as RH,K3 as SH,cO as TH,A80 as UH,uO as VH,W3 as WH,M80 as XH,lK as YH,P80 as ZH,Z0 as _H,T80 as $H,oK as aI,I80 as bI,E80 as cI,x80 as dI,y80 as eI,g80 as fI,eJ as gI,u80 as hI,i80 as iI,n80 as jI,B2 as kI,o8 as lI,D8 as mI,cF0 as nI,fO as oI,aK as pI,Zz as qI,Dz as rI,hF0 as sI,c9 as tI,Oz as uI,E0 as vI,vX as wI,P0 as xI,FQ as yI,LQ as zI,U8 as AI,M3 as BI,C3 as CI,E4 as DI,Z1 as EI,RW as FI,v4 as GI,v40 as HI,zN as II,L2 as JI,Z6 as KI,I2 as LI,H1 as MI,Y8 as NI,G90 as OI,J90 as PI,Z90 as QI,_9 as RI,kW as SI,$x as TI,IQ as UI,_90 as VI,Zx as WI,D9 as XI,YR as YI,D90 as ZI,bW as _I,i5 as $I,n5 as aJ,r3 as bJ,GR as cJ,JR as dJ,HR as eJ,k2 as fJ,M90 as gJ,I90 as hJ,C90 as iJ,x2 as jJ,mX as kJ,S90 as lJ,gX as mJ,v90 as nJ,m90 as oJ,d90 as pJ,p90 as qJ,l90 as rJ,WR as sJ,BR as tJ,MX0 as uJ,dX as vJ,TX0 as wJ,IX0 as xJ,CX0 as yJ,t3 as zJ,r5 as AJ,e3 as BJ,I6 as CJ,hW as DJ,cW as EJ,uW as FJ,G$ as GJ,Px as HJ,RR as IJ,Q50 as JJ,IR as KJ,n8 as LJ,jR as MJ,K6 as NJ,ER as OJ,f1 as PJ,n9 as QJ,g2 as RJ,s5 as SJ,y4 as TJ,C50 as UJ,XB as VJ,jQ as WJ,bR as XJ,ix as YJ,V0 as ZJ,K1 as _J,X70 as $J,VB as aK,n6 as bK,r9 as cK,bF as dK,x70 as eK,v70 as fK,I$ as gK,k70 as hK,y70 as iK,b70 as jK,h70 as kK,m70 as lK,d70 as mK,p70 as nK,c70 as oK,u70 as pK,C$ as qK,iF as rK,a70 as sK,s70 as tK,t70 as uK,e70 as vK,XQ0 as wK,GQ0 as xK,JQ0 as yK,$Q0 as zK,ZQ0 as AK,HQ0 as BK,KQ0 as CK,WQ0 as DK,kv as EK,_Q0 as FK,DQ0 as GK,E$ as HK,UQ0 as IK,qQ0 as JK,OQ0 as KK,tF as LK,zQ0 as MK,NQ0 as NK,RQ0 as OK,FQ0 as PK,LQ0 as QK,wQ0 as RK,AQ0 as SK,MQ0 as TK,PQ0 as UK,TQ0 as VK,rv as WK,IB as XK,mQ0 as YK,dQ0 as ZK,tv as _K,oX as $K,b$ as aL,g$ as bL,i2 as cL,iQ0 as dL,kk as eL,CY0 as fL,jY0 as gL,yk as hL,EY0 as iL,qL as jL,Jk as kL,QY0 as lL,Vk as mL,Uk as nL,wL as oL,Mk as pL,eX as qL,xW0 as rL,_A as sL,uh as tL,fh as uL,mW0 as vL,oh as wL,ih as xL,FV as yL,lQ as zL,ZG as AL,HB0 as BL,_6 as CL,G8 as DL,BB0 as EL,_B0 as FL,DB0 as GL,$Z as HL,LV as IL,DA as JL,UA as KL,W0 as LL,e9 as ML,wV as NL,ah as OL,AV as PL,UB0 as QL,qB0 as RL,OB0 as SL,Q1 as TL,ZZ as UL,FB0 as VL,$G as WL,LB0 as XL,J8 as YL,wB0 as ZL,i1 as _L,_7 as $L,MV as aM,Xm as bM,X0 as cM,NA as dM,oQ as eM,XX as fM,u0 as gM,hB0 as hM,Km as iM,HZ as jM,mB0 as kM,dB0 as lM,pB0 as mM,uB0 as nM,fB0 as oM,Wm as pM,lB0 as qM,oB0 as rM,iB0 as sM,nB0 as tM,rB0 as uM,aB0 as vM,sB0 as wM,tB0 as xM,Bm as yM,eB0 as zM,_m as AM,XV0 as BM,QV0 as CM,DZ as DM,YV0 as EM,TV as FM,Dm as GM,$V0 as HM,ZV0 as IM,HV0 as JM,KV0 as KM,WV0 as LM,BV0 as MM,Um as NM,VV0 as OM,_V0 as PM,DV0 as QM,qm as RM,RV0 as SM,zm as TM,FV0 as UM,LV0 as VM,wV0 as WM,AV0 as XM,MV0 as YM,PV0 as ZM,TV0 as _M,Nm as $M,iQ as aN,kV0 as bN,IV as cN,KA as dN,WA as eN,Pm as fN,Tm as gN,bV0 as hN,hV0 as iN,mV0 as jN,dV0 as kN,pV0 as lN,cV0 as mN,uV0 as nN,fV0 as oN,jV as pN,wA as qN,UZ as rN,Em as sN,aV0 as tN,Sm as uN,xm as vN,vm as wN,km as xN,KG as yN,qZ as zN,BA as AN,SV as BN,xV as CN,q_0 as DN,hm as EN,dm as FN,cm as GN,lm as HN,A_0 as IN,rm as JN,kV as KN,c_0 as LN,u_0 as MN,f_0 as NN,Xd as ON,nQ as PN,PA as QN,bV as RN,i_0 as SN,e_0 as TN,Jd as UN,Zd as VN,kA as WN,yA as XN,uV as YN,aD0 as ZN,zd as _N,wd as $N,T0 as aO,j as bO,Td as cO,Id as dO,aQ as eO,BG as fO,L9 as gO,rQ as hO,sQ as iO,NU0 as jO,RU0 as kO,FU0 as lO,tQ as mO,CU0 as nO,Y4 as oO,NZ as pO,xd as qO,pA as rO,Bq0 as sO,dd as tO,vq0 as uO,pd as vO,ZO0 as wO,WO0 as xO,BO0 as yO,OO0 as zO,NO0 as AO,AO0 as BO,IO0 as CO,CO0 as DO,Jp as EO,$p as FO,uO0 as GO,Zp as HO,sV as IO,oO0 as JO,iO0 as KO,iA as LO,rO0 as MO,Kp as NO,D7 as OO,Y5 as PO,Kz0 as QO,Wz0 as RO,Bp as SO,Vz0 as TO,Vp as UO,rA as VO,aA as WO,FZ as XO,wz0 as YO,Up as ZO,Np as _O,QM as $O,pz0 as aP,Fp as bP,wp as cP,Mp as dP,rz0 as eP,E6 as fP,az0 as gP,sz0 as hP,VN0 as iP,NN0 as jP,TN0 as kP,CN0 as lP};
@@ -0,0 +1,3 @@
1
+ // @bun
2
+ class M extends Error{name="BackendCallError";status;fn;constructor(j,x,I){super(`backend function call failed (${j}): ${x}${I?` ${I}`:""}`);this.status=j,this.fn=x}}class N extends Error{name="BackendAuthError";status;constructor(j,x){super(`backend authentication rejected (${j})${x?`: ${x}`:""}`);this.status=j}}function Q(j){if(!j)return!1;try{let x=JSON.parse(j);if(x&&x.code==="ERR_GATEWAY_REQUIRED")return!0}catch{}return j.includes("ERR_GATEWAY_REQUIRED")}function S(j){let x=j.fetch??fetch,I=j.baseUrl.replace(/\/+$/,"");async function z(D,P={}){let L=new Headers(j.headers);L.set("content-type","application/json");let H=await x(`${I}/${D}`,{method:"POST",headers:L,body:JSON.stringify(P)});if(!H.ok){let K=await H.text().catch(()=>"");if((H.status===401||H.status===403)&&!Q(K))throw new N(H.status,K||void 0);throw new M(H.status,D,K||void 0)}let J=await H.json();if(!J.success)throw Error(`backend function call returned failure: ${D} \u2014 ${J.error??"unknown error"}`);return J.data}return{promptNames:()=>z("promptNames"),prompt:(D)=>z("prompt",{name:D}),tiers:()=>z("tiers"),workflowSummaries:()=>z("workflowSummaries"),workflowSpec:(D)=>z("workflowSpec",{name:D}),workflowSpecs:()=>z("workflowSpecs"),bashArity:()=>z("bashArity"),toolManifest:()=>z("toolManifest"),toolDescription:(D)=>z("toolDescription",{id:D})}}
3
+ export{M as Lp,N as Mp,Q as Np,S as Op};
@@ -0,0 +1,2 @@
1
+ // @bun
2
+ import{n as L}from"./chunk-b643cra9.js";import"./chunk-rvvfs9ps.js";import{z as K}from"./chunk-q0dd3ak6.js";import{A as N}from"./chunk-wmrq9qqf.js";import{B as F,D as J}from"./chunk-453wpzg6.js";import"./chunk-d56zc21w.js";import"./chunk-mjhb1q0n.js";import"./chunk-a9y27zd2.js";import"./chunk-ve5gb789.js";import{N as M}from"./chunk-agdfqncf.js";import"./chunk-jmjg8d8a.js";import"./chunk-y1srca0c.js";import"./chunk-23geekk5.js";import"./chunk-5kmfnkzv.js";import"./chunk-9jf67xb0.js";import{Pd as B}from"./chunk-9xvctnjr.js";import"./chunk-zp2ffbc2.js";import"./chunk-jegn6jc3.js";import"./chunk-4q9w2yve.js";import{Tf as z}from"./chunk-gen6f3dn.js";import"./chunk-7y3y3j51.js";import"./chunk-4aykrj51.js";import"./chunk-hg563h5r.js";import"./chunk-j1a64ade.js";import"./chunk-7mhffm9f.js";import"./chunk-r012q335.js";import"./chunk-0z3z0gk1.js";import"./chunk-g7vkkmsk.js";import"./chunk-m8djypsy.js";import"./chunk-w7p2x973.js";import"./chunk-wmw2gne9.js";import"./chunk-y3n31nnx.js";import"./chunk-3z1y040p.js";import"./chunk-kkvb2c2z.js";import"./chunk-3tdqsm5c.js";import"./chunk-a5zjrwqy.js";import"./chunk-fhng5her.js";import"./chunk-dkv2mg97.js";import"./chunk-bf146hz2.js";import"./chunk-t488d66k.js";import"./chunk-cqtkxwd8.js";import"./chunk-srf73nm4.js";import"./chunk-yzdty5t9.js";import"./chunk-1p34bx7c.js";import"./chunk-q3x4x2tq.js";import"./chunk-7dckfame.js";import"./chunk-tk3bve0x.js";import"./chunk-0w4v0fbs.js";import"./chunk-wf09j72q.js";import"./chunk-hbnr0j7h.js";import"./chunk-ep8zn49w.js";import"./chunk-f3kjp838.js";import"./chunk-tsn1jkr7.js";import"./chunk-zk8n8hnh.js";import"./chunk-1jh5p5qw.js";import"./chunk-kaeyhw2n.js";import"./chunk-f89gntcy.js";import"./chunk-bky5a42k.js";import"./chunk-r7xp0xcn.js";import"./chunk-6g3m7yxf.js";import"./chunk-v2kyarwz.js";import"./chunk-dkm7x8rj.js";import"./chunk-kc3hpmr2.js";import"./chunk-hh4c02fh.js";var x=B({command:"attach <url>",describe:"attach to a running qitqode server",builder:(j)=>j.positional("url",{type:"string",describe:"http://localhost:4096",demandOption:!0}).option("dir",{type:"string",description:"directory to run in"}).option("continue",{alias:["c"],describe:"continue the last session",type:"boolean"}).option("session",{alias:["s"],type:"string",describe:"session id to continue"}).option("fork",{type:"boolean",describe:"fork the session when continuing (use with --continue or --session)"}).option("password",{alias:["p"],type:"string",describe:"basic auth password (defaults to QITQODE_SERVER_PASSWORD)"}),handler:async(j)=>{let Q=J();try{F();let q=N(j);if(q){z.error(q),process.exitCode=1;return}let R=(()=>{if(!j.dir)return;try{return process.chdir(j.dir),process.cwd()}catch{return j.dir}})(),S=M({password:j.password}),V=await K.get();await L({url:j.url,config:V,args:{continue:j.continue,sessionID:j.session,fork:j.fork},directory:R,headers:S})}finally{Q?.()}}});export{x as AttachCommand};
@@ -0,0 +1,2 @@
1
+ // @bun
2
+ import{Cp as a,Dp as b,Ep as c,Fp as d,Gp as e,Hp as f,Ip as g,Jp as h,Kp as i}from"./chunk-fhng5her.js";import"./chunk-bf146hz2.js";import"./chunk-t488d66k.js";import"./chunk-cqtkxwd8.js";import"./chunk-srf73nm4.js";import"./chunk-yzdty5t9.js";import"./chunk-f89gntcy.js";import"./chunk-r7xp0xcn.js";import"./chunk-6g3m7yxf.js";import"./chunk-hh4c02fh.js";export{i as gateway,h as createGatewayProvider,h as createGateway,g as GatewayResponseError,d as GatewayRateLimitError,e as GatewayModelNotFoundError,c as GatewayInvalidRequestError,f as GatewayInternalServerError,a as GatewayError,b as GatewayAuthenticationError};
@@ -0,0 +1,10 @@
1
+ // @bun
2
+ import{g as S}from"./chunk-vavrczqm.js";import"./chunk-mjhb1q0n.js";import{Pd as $}from"./chunk-9xvctnjr.js";import{Tf as v}from"./chunk-gen6f3dn.js";import"./chunk-4aykrj51.js";import{sh as L}from"./chunk-va4davgy.js";import"./chunk-hg563h5r.js";import"./chunk-j1a64ade.js";import"./chunk-bd21p9zz.js";import"./chunk-p54bzjtv.js";import"./chunk-ha1w0xzh.js";import"./chunk-ecwz9nhs.js";import"./chunk-5rkmhzq0.js";import"./chunk-7mhffm9f.js";import"./chunk-r012q335.js";import"./chunk-0z3z0gk1.js";import"./chunk-g7vkkmsk.js";import"./chunk-m8djypsy.js";import"./chunk-w7p2x973.js";import"./chunk-wmw2gne9.js";import"./chunk-y3n31nnx.js";import"./chunk-3z1y040p.js";import{rp as g,sp as y,tp as B,zp as N}from"./chunk-kkvb2c2z.js";import"./chunk-3tdqsm5c.js";import"./chunk-a5zjrwqy.js";import"./chunk-fhng5her.js";import"./chunk-dkv2mg97.js";import"./chunk-bf146hz2.js";import"./chunk-t488d66k.js";import"./chunk-cqtkxwd8.js";import"./chunk-srf73nm4.js";import"./chunk-yzdty5t9.js";import"./chunk-1p34bx7c.js";import"./chunk-q3x4x2tq.js";import"./chunk-7dckfame.js";import"./chunk-j1veq3zr.js";import"./chunk-0pvbk8ks.js";import"./chunk-tk3bve0x.js";import"./chunk-0w4v0fbs.js";import"./chunk-wf09j72q.js";import"./chunk-hbnr0j7h.js";import"./chunk-ep8zn49w.js";import"./chunk-f3kjp838.js";import{Ss as q}from"./chunk-tsn1jkr7.js";import"./chunk-zk8n8hnh.js";import"./chunk-1jh5p5qw.js";import"./chunk-kaeyhw2n.js";import"./chunk-f89gntcy.js";import"./chunk-bky5a42k.js";import"./chunk-r7xp0xcn.js";import"./chunk-6g3m7yxf.js";import"./chunk-v2kyarwz.js";import{mI as z}from"./chunk-dkm7x8rj.js";import"./chunk-9pe4agdz.js";import"./chunk-kc3hpmr2.js";import"./chunk-hh4c02fh.js";import j from"fs/promises";import P from"path";function F(x){return z.promise(async()=>{try{return{ok:!0,value:await x()}}catch(D){return{ok:!1,err:D}}})}function A(x){if(x instanceof g)return"Not signed in. Run `qitqode auth login` first.";if(x instanceof y)return x.message+q.copy().insufficientBalanceCliSuffix;if(x instanceof B)return x.message;return"Request failed: "+(x instanceof Error?x.message:String(x))}var w=(x)=>z.gen(function*(){if((yield*S())==="revoked")return;let D=yield*z.promise(async()=>{try{return{ok:!0,content:await j.readFile(P.resolve(x),"utf8")}}catch(V){let K=V;return{ok:!1,message:`Cannot read '${x}': ${K.message??String(K)}`}}});if(!D.ok){yield*z.sync(()=>v.println(v.Style.TEXT_DANGER+D.message+v.Style.TEXT_NORMAL));return}let O=[],T=D.content.split(`
3
+ `);for(let V=0;V<T.length;V++){let K=T[V];if(!K||!K.trim())continue;let G=V+1,H;try{H=JSON.parse(K)}catch{yield*z.sync(()=>v.println(v.Style.TEXT_DANGER+`Error: line ${G} is not valid JSON.`+v.Style.TEXT_NORMAL));return}if(typeof H!=="object"||H===null||Array.isArray(H)){yield*z.sync(()=>v.println(v.Style.TEXT_DANGER+`Error: line ${G} must be a JSON object (got ${H===null?"null":Array.isArray(H)?"array":typeof H}).`+v.Style.TEXT_NORMAL));return}let J=H;if(typeof J.prompt!=="string"||!J.prompt.trim()){yield*z.sync(()=>v.println(v.Style.TEXT_DANGER+`Error: line ${G} must have a non-empty string 'prompt' field.`+v.Style.TEXT_NORMAL));return}let W={prompt:J.prompt};if(typeof J.options==="object"&&J.options!==null&&!Array.isArray(J.options))W.options=J.options;O.push(W)}if(O.length===0){yield*z.sync(()=>v.println(v.Style.TEXT_WARNING+"No prompts found in the file."+v.Style.TEXT_NORMAL));return}yield*z.sync(()=>v.println(v.Style.TEXT_DIM+`Submitting ${O.length} request${O.length===1?"":"s"}\u2026`+v.Style.TEXT_NORMAL));let Q=yield*F(()=>N.resolveSubmitBatch({requests:O}));if(!Q.ok){yield*z.sync(()=>v.println(v.Style.TEXT_DANGER+A(Q.err)+v.Style.TEXT_NORMAL));return}let{batchId:X,status:Y,createdAt:Z,totalCount:_}=Q.value;process.stdout.write(X+`
4
+ `),yield*z.sync(()=>{if(v.println(v.Style.TEXT_SUCCESS+"Batch submitted."+v.Style.TEXT_NORMAL),v.println(" ID: "+v.Style.TEXT_HIGHLIGHT_BOLD+X+v.Style.TEXT_NORMAL),Y)v.println(" Status: "+Y);if(_!==void 0)v.println(" Requests: "+_);if(Z)v.println(" Created: "+v.Style.TEXT_DIM+new Date(Z).toLocaleString()+v.Style.TEXT_NORMAL);v.println(`
5
+ `+v.Style.TEXT_DIM+`Run \`qitqode batch status ${X}\` to check progress.`+v.Style.TEXT_NORMAL)})}).pipe(z.withSpan("batch.submit")),k=(x,D)=>z.gen(function*(){if((yield*S())==="revoked")return;let O=yield*F(()=>N.resolveRetrieveBatch({batchId:x}));if(!O.ok){yield*z.sync(()=>v.println(v.Style.TEXT_DANGER+A(O.err)+v.Style.TEXT_NORMAL));return}let{status:T,results:Q,completedCount:X,totalCount:Y,createdAt:Z,completedAt:_}=O.value,V=T==="completed"?v.Style.TEXT_SUCCESS:T==="failed"?v.Style.TEXT_DANGER:v.Style.TEXT_WARNING;if(yield*z.sync(()=>{v.println(" ID: "+v.Style.TEXT_HIGHLIGHT_BOLD+x+v.Style.TEXT_NORMAL),v.println(" Status: "+V+T+v.Style.TEXT_NORMAL);let K=X??Q?.length;if(Y!==void 0)v.println(" Progress: "+(K??"?")+" / "+Y);if(Z)v.println(" Created: "+v.Style.TEXT_DIM+new Date(Z).toLocaleString()+v.Style.TEXT_NORMAL);if(_)v.println(" Finished: "+v.Style.TEXT_DIM+new Date(_).toLocaleString()+v.Style.TEXT_NORMAL);if(Q&&Q.length>0){v.println(""),v.println(v.Style.TEXT_DIM+" \u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500"+v.Style.TEXT_NORMAL);for(let G of Q){let H=` [${G.index+1}] `;if(G.error)v.println(H+v.Style.TEXT_DANGER+G.error+v.Style.TEXT_NORMAL);else{let J=G.content??"",W=J.length>500?J.slice(0,500)+"\u2026":J;v.println(H+W)}}}else if(T!=="completed"&&T!=="failed")v.println(`
6
+ `+v.Style.TEXT_DIM+` No results yet. Re-run \`qitqode batch status ${x}\` to check again.`+v.Style.TEXT_NORMAL)}),D&&Q&&Q.length>0){let K=yield*z.promise(async()=>{let G=P.resolve(D),H=Q.map((M)=>JSON.stringify(M)).join(`
7
+ `)+`
8
+ `,J=P.dirname(G),W=P.join(J,`.batch-${x}-${process.pid}.tmp`);try{return await j.writeFile(W,H,"utf8"),await j.rename(W,G),{ok:!0,dest:G}}catch(M){await j.unlink(W).catch(()=>{});let C=M;return{ok:!1,message:`Cannot write '${G}': ${C.message??String(C)}`}}});yield*z.sync(()=>{if(K.ok)v.println(`
9
+ `+v.Style.TEXT_SUCCESS+` Results written to ${K.dest}`+v.Style.TEXT_NORMAL);else v.println(`
10
+ `+v.Style.TEXT_DANGER+" "+K.message+v.Style.TEXT_NORMAL)})}}).pipe(z.withSpan("batch.status")),o=$({command:"batch <command>",describe:"Submit and poll async batch LLM jobs",builder:(x)=>x.command($({command:"submit <file>",describe:"Submit a JSONL file of prompts as an async batch job; prints the batch ID to stdout",builder:(D)=>D.positional("file",{type:"string",describe:"Path to a JSONL file where each line is a JSON object with a 'prompt' field (and optional 'options' object)",demandOption:!0}),async handler(D){v.empty(),await L.runPromise(w(D.file))}})).command($({command:"status <id>",describe:"Poll a batch job and print the current status and any completed results",builder:(D)=>D.positional("id",{type:"string",describe:"Batch ID printed by `qitqode batch submit`",demandOption:!0}).option("output",{alias:"o",type:"string",describe:"Write completed results as JSONL (one result object per line) to this file. The file is written atomically so a partial run never leaves a truncated file."}),async handler(D){v.empty();let{id:O,output:T}=D;await L.runPromise(k(O,T))}})).demandCommand(),async handler(){}});export{w as submitEffect,k as statusEffect,o as BatchCommand};
@@ -0,0 +1,2 @@
1
+ // @bun
2
+ import{$d as b,_d as a,ae as c,be as d,ce as e,de as f,ee as g,fe as h,ge as i,he as j,ie as k}from"./chunk-8r79zf3y.js";import"./chunk-fkvccmgk.js";import"./chunk-jbd9k041.js";import"./chunk-hh4c02fh.js";export{c as providerConfigFromInit,d as httpRequest,j as getInstanceMetadataEndpoint,k as fromInstanceMetadata,h as fromContainerMetadata,i as Endpoint,f as ENV_CMDS_RELATIVE_URI,e as ENV_CMDS_FULL_URI,g as ENV_CMDS_AUTH_TOKEN,a as DEFAULT_TIMEOUT,b as DEFAULT_MAX_RETRIES};
@@ -1,5 +1,5 @@
1
1
  // @bun
2
- import"./chunk-naq602da.js";var{create:os,defineProperty:Gt,getOwnPropertyDescriptor:us,getOwnPropertyNames:ps,getPrototypeOf:hs}=Object,cs=Object.prototype.hasOwnProperty,ce=(t,e)=>()=>(e||t((e={exports:{}}).exports,e),e.exports),ls=(t,e)=>{for(var s in e)Gt(t,s,{get:e[s],enumerable:!0})},ds=(t,e,s,i)=>{if(e&&typeof e=="object"||typeof e=="function")for(let r of ps(e))!cs.call(t,r)&&r!==s&&Gt(t,r,{get:()=>e[r],enumerable:!(i=us(e,r))||i.enumerable});return t},le=(t,e,s)=>(s=t!=null?os(hs(t)):{},ds(e||!t||!t.__esModule?Gt(s,"default",{value:t,enumerable:!0}):s,t)),fs=ce((t,e)=>{e.exports={}}),de=ce((t,e)=>{var s=fs(),i=/^[\da-fA-F]+$/,r=/^\d+$/,n=new WeakMap;function o(h){h=h.Parser.acorn||h;let l=n.get(h);if(!l){let{tokTypes:g,TokContext:C,TokenType:A}=h,S=new C("<tag",!1),V=new C("</tag",!1),P=new C("<tag>...</tag>",!0,!0),U={tc_oTag:S,tc_cTag:V,tc_expr:P},et={jsxName:new A("jsxName"),jsxText:new A("jsxText",{beforeExpr:!0}),jsxTagStart:new A("jsxTagStart",{startsExpr:!0}),jsxTagEnd:new A("jsxTagEnd")};et.jsxTagStart.updateContext=function(){this.context.push(P),this.context.push(S),this.exprAllowed=!1},et.jsxTagEnd.updateContext=function(dt){let ft=this.context.pop();ft===S&&dt===g.slash||ft===V?(this.context.pop(),this.exprAllowed=this.curContext()===P):this.exprAllowed=!0},l={tokContexts:U,tokTypes:et},n.set(h,l)}return l}function p(h){if(!h)return h;if(h.type==="JSXIdentifier")return h.name;if(h.type==="JSXNamespacedName")return h.namespace.name+":"+h.name.name;if(h.type==="JSXMemberExpression")return p(h.object)+"."+p(h.property)}e.exports=function(h){return h=h||{},function(l){return u({allowNamespaces:h.allowNamespaces!==!1,allowNamespacedObjects:!!h.allowNamespacedObjects},l)}},Object.defineProperty(e.exports,"tokTypes",{get:function(){return o(void 0).tokTypes},configurable:!0,enumerable:!0});function u(h,l){let g=l.acorn||void 0,C=o(g),A=g.tokTypes,S=C.tokTypes,V=g.tokContexts,P=C.tokContexts.tc_oTag,U=C.tokContexts.tc_cTag,et=C.tokContexts.tc_expr,dt=g.isNewLine,ft=g.isIdentifierStart,ns=g.isIdentifierChar;return class extends l{static get acornJsx(){return C}jsx_readToken(){let c="",y=this.pos;for(;;){this.pos>=this.input.length&&this.raise(this.start,"Unterminated JSX contents");let x=this.input.charCodeAt(this.pos);switch(x){case 60:case 123:return this.pos===this.start?x===60&&this.exprAllowed?(++this.pos,this.finishToken(S.jsxTagStart)):this.getTokenFromCode(x):(c+=this.input.slice(y,this.pos),this.finishToken(S.jsxText,c));case 38:c+=this.input.slice(y,this.pos),c+=this.jsx_readEntity(),y=this.pos;break;case 62:case 125:this.raise(this.pos,"Unexpected token `"+this.input[this.pos]+"`. Did you mean `"+(x===62?"&gt;":"&rbrace;")+'` or `{"'+this.input[this.pos]+'"}`?');default:dt(x)?(c+=this.input.slice(y,this.pos),c+=this.jsx_readNewLine(!0),y=this.pos):++this.pos}}}jsx_readNewLine(c){let y=this.input.charCodeAt(this.pos),x;return++this.pos,y===13&&this.input.charCodeAt(this.pos)===10?(++this.pos,x=c?`
2
+ import"./chunk-hh4c02fh.js";var{create:os,defineProperty:Gt,getOwnPropertyDescriptor:us,getOwnPropertyNames:ps,getPrototypeOf:hs}=Object,cs=Object.prototype.hasOwnProperty,ce=(t,e)=>()=>(e||t((e={exports:{}}).exports,e),e.exports),ls=(t,e)=>{for(var s in e)Gt(t,s,{get:e[s],enumerable:!0})},ds=(t,e,s,i)=>{if(e&&typeof e=="object"||typeof e=="function")for(let r of ps(e))!cs.call(t,r)&&r!==s&&Gt(t,r,{get:()=>e[r],enumerable:!(i=us(e,r))||i.enumerable});return t},le=(t,e,s)=>(s=t!=null?os(hs(t)):{},ds(e||!t||!t.__esModule?Gt(s,"default",{value:t,enumerable:!0}):s,t)),fs=ce((t,e)=>{e.exports={}}),de=ce((t,e)=>{var s=fs(),i=/^[\da-fA-F]+$/,r=/^\d+$/,n=new WeakMap;function o(h){h=h.Parser.acorn||h;let l=n.get(h);if(!l){let{tokTypes:g,TokContext:C,TokenType:A}=h,S=new C("<tag",!1),V=new C("</tag",!1),P=new C("<tag>...</tag>",!0,!0),U={tc_oTag:S,tc_cTag:V,tc_expr:P},et={jsxName:new A("jsxName"),jsxText:new A("jsxText",{beforeExpr:!0}),jsxTagStart:new A("jsxTagStart",{startsExpr:!0}),jsxTagEnd:new A("jsxTagEnd")};et.jsxTagStart.updateContext=function(){this.context.push(P),this.context.push(S),this.exprAllowed=!1},et.jsxTagEnd.updateContext=function(dt){let ft=this.context.pop();ft===S&&dt===g.slash||ft===V?(this.context.pop(),this.exprAllowed=this.curContext()===P):this.exprAllowed=!0},l={tokContexts:U,tokTypes:et},n.set(h,l)}return l}function p(h){if(!h)return h;if(h.type==="JSXIdentifier")return h.name;if(h.type==="JSXNamespacedName")return h.namespace.name+":"+h.name.name;if(h.type==="JSXMemberExpression")return p(h.object)+"."+p(h.property)}e.exports=function(h){return h=h||{},function(l){return u({allowNamespaces:h.allowNamespaces!==!1,allowNamespacedObjects:!!h.allowNamespacedObjects},l)}},Object.defineProperty(e.exports,"tokTypes",{get:function(){return o(void 0).tokTypes},configurable:!0,enumerable:!0});function u(h,l){let g=l.acorn||void 0,C=o(g),A=g.tokTypes,S=C.tokTypes,V=g.tokContexts,P=C.tokContexts.tc_oTag,U=C.tokContexts.tc_cTag,et=C.tokContexts.tc_expr,dt=g.isNewLine,ft=g.isIdentifierStart,ns=g.isIdentifierChar;return class extends l{static get acornJsx(){return C}jsx_readToken(){let c="",y=this.pos;for(;;){this.pos>=this.input.length&&this.raise(this.start,"Unterminated JSX contents");let x=this.input.charCodeAt(this.pos);switch(x){case 60:case 123:return this.pos===this.start?x===60&&this.exprAllowed?(++this.pos,this.finishToken(S.jsxTagStart)):this.getTokenFromCode(x):(c+=this.input.slice(y,this.pos),this.finishToken(S.jsxText,c));case 38:c+=this.input.slice(y,this.pos),c+=this.jsx_readEntity(),y=this.pos;break;case 62:case 125:this.raise(this.pos,"Unexpected token `"+this.input[this.pos]+"`. Did you mean `"+(x===62?"&gt;":"&rbrace;")+'` or `{"'+this.input[this.pos]+'"}`?');default:dt(x)?(c+=this.input.slice(y,this.pos),c+=this.jsx_readNewLine(!0),y=this.pos):++this.pos}}}jsx_readNewLine(c){let y=this.input.charCodeAt(this.pos),x;return++this.pos,y===13&&this.input.charCodeAt(this.pos)===10?(++this.pos,x=c?`
3
3
  `:`\r
4
4
  `):x=String.fromCharCode(y),this.options.locations&&(++this.curLine,this.lineStart=this.pos),x}jsx_readString(c){let y="",x=++this.pos;for(;;){this.pos>=this.input.length&&this.raise(this.start,"Unterminated string constant");let k=this.input.charCodeAt(this.pos);if(k===c)break;k===38?(y+=this.input.slice(x,this.pos),y+=this.jsx_readEntity(),x=this.pos):dt(k)?(y+=this.input.slice(x,this.pos),y+=this.jsx_readNewLine(!1),x=this.pos):++this.pos}return y+=this.input.slice(x,this.pos++),this.finishToken(A.string,y)}jsx_readEntity(){let c="",y=0,x,k=this.input[this.pos];k!=="&"&&this.raise(this.pos,"Entity must start with an ampersand");let Y=++this.pos;for(;this.pos<this.input.length&&y++<10;){if(k=this.input[this.pos++],k===";"){c[0]==="#"?c[1]==="x"?(c=c.substr(2),i.test(c)&&(x=String.fromCharCode(parseInt(c,16)))):(c=c.substr(1),r.test(c)&&(x=String.fromCharCode(parseInt(c,10)))):x=s[c];break}c+=k}return x||(this.pos=Y,"&")}jsx_readWord(){let c,y=this.pos;do c=this.input.charCodeAt(++this.pos);while(ns(c)||c===45);return this.finishToken(S.jsxName,this.input.slice(y,this.pos))}jsx_parseIdentifier(){let c=this.startNode();return this.type===S.jsxName?c.name=this.value:this.type.keyword?c.name=this.type.keyword:this.unexpected(),this.next(),this.finishNode(c,"JSXIdentifier")}jsx_parseNamespacedName(){let c=this.start,y=this.startLoc,x=this.jsx_parseIdentifier();if(!h.allowNamespaces||!this.eat(A.colon))return x;var k=this.startNodeAt(c,y);return k.namespace=x,k.name=this.jsx_parseIdentifier(),this.finishNode(k,"JSXNamespacedName")}jsx_parseElementName(){if(this.type===S.jsxTagEnd)return"";let c=this.start,y=this.startLoc,x=this.jsx_parseNamespacedName();for(this.type===A.dot&&x.type==="JSXNamespacedName"&&!h.allowNamespacedObjects&&this.unexpected();this.eat(A.dot);){let k=this.startNodeAt(c,y);k.object=x,k.property=this.jsx_parseIdentifier(),x=this.finishNode(k,"JSXMemberExpression")}return x}jsx_parseAttributeValue(){switch(this.type){case A.braceL:let c=this.jsx_parseExpressionContainer();return c.expression.type==="JSXEmptyExpression"&&this.raise(c.start,"JSX attributes must only be assigned a non-empty expression"),c;case S.jsxTagStart:case A.string:return this.parseExprAtom();default:this.raise(this.start,"JSX value should be either an expression or a quoted JSX text")}}jsx_parseEmptyExpression(){let c=this.startNodeAt(this.lastTokEnd,this.lastTokEndLoc);return this.finishNodeAt(c,"JSXEmptyExpression",this.start,this.startLoc)}jsx_parseExpressionContainer(){let c=this.startNode();return this.next(),c.expression=this.type===A.braceR?this.jsx_parseEmptyExpression():this.parseExpression(),this.expect(A.braceR),this.finishNode(c,"JSXExpressionContainer")}jsx_parseAttribute(){let c=this.startNode();return this.eat(A.braceL)?(this.expect(A.ellipsis),c.argument=this.parseMaybeAssign(),this.expect(A.braceR),this.finishNode(c,"JSXSpreadAttribute")):(c.name=this.jsx_parseNamespacedName(),c.value=this.eat(A.eq)?this.jsx_parseAttributeValue():null,this.finishNode(c,"JSXAttribute"))}jsx_parseOpeningElementAt(c,y){let x=this.startNodeAt(c,y);x.attributes=[];let k=this.jsx_parseElementName();for(k&&(x.name=k);this.type!==A.slash&&this.type!==S.jsxTagEnd;)x.attributes.push(this.jsx_parseAttribute());return x.selfClosing=this.eat(A.slash),this.expect(S.jsxTagEnd),this.finishNode(x,k?"JSXOpeningElement":"JSXOpeningFragment")}jsx_parseClosingElementAt(c,y){let x=this.startNodeAt(c,y),k=this.jsx_parseElementName();return k&&(x.name=k),this.expect(S.jsxTagEnd),this.finishNode(x,k?"JSXClosingElement":"JSXClosingFragment")}jsx_parseElementAt(c,y){let x=this.startNodeAt(c,y),k=[],Y=this.jsx_parseOpeningElementAt(c,y),mt=null;if(!Y.selfClosing){t:for(;;)switch(this.type){case S.jsxTagStart:if(c=this.start,y=this.startLoc,this.next(),this.eat(A.slash)){mt=this.jsx_parseClosingElementAt(c,y);break t}k.push(this.jsx_parseElementAt(c,y));break;case S.jsxText:k.push(this.parseExprAtom());break;case A.braceL:k.push(this.jsx_parseExpressionContainer());break;default:this.unexpected()}p(mt.name)!==p(Y.name)&&this.raise(mt.start,"Expected corresponding JSX closing tag for <"+p(Y.name)+">")}let wt=Y.name?"Element":"Fragment";return x["opening"+wt]=Y,x["closing"+wt]=mt,x.children=k,this.type===A.relational&&this.value==="<"&&this.raise(this.start,"Adjacent JSX elements must be wrapped in an enclosing tag"),this.finishNode(x,"JSX"+wt)}jsx_parseText(){let c=this.parseLiteral(this.value);return c.type="JSXText",c}jsx_parseElement(){let c=this.start,y=this.startLoc;return this.next(),this.jsx_parseElementAt(c,y)}parseExprAtom(c){return this.type===S.jsxText?this.jsx_parseText():this.type===S.jsxTagStart?this.jsx_parseElement():super.parseExprAtom(c)}readToken(c){let y=this.curContext();if(y===et)return this.jsx_readToken();if(y===P||y===U){if(ft(c))return this.jsx_readWord();if(c==62)return++this.pos,this.finishToken(S.jsxTagEnd);if((c===34||c===39)&&y==P)return this.jsx_readString(c)}return c===60&&this.exprAllowed&&this.input.charCodeAt(this.pos+1)!==33?(++this.pos,this.finishToken(S.jsxTagStart)):super.readToken(c)}updateContext(c){if(this.type==A.braceL){var y=this.curContext();y==P?this.context.push(V.b_expr):y==et?this.context.push(V.b_tmpl):super.updateContext(c),this.exprAllowed=!0}else if(this.type===A.slash&&c===S.jsxTagStart)this.context.length-=2,this.context.push(U),this.exprAllowed=!1;else return super.updateContext(c)}}}}),fe={};ls(fe,{parsers:()=>hr});var ms=[509,0,227,0,150,4,294,9,1368,2,2,1,6,3,41,2,5,0,166,1,574,3,9,9,7,9,32,4,318,1,80,3,71,10,50,3,123,2,54,14,32,10,3,1,11,3,46,10,8,0,46,9,7,2,37,13,2,9,6,1,45,0,13,2,49,13,9,3,2,11,83,11,7,0,3,0,158,11,6,9,7,3,56,1,2,6,3,1,3,2,10,0,11,1,3,6,4,4,68,8,2,0,3,0,2,3,2,4,2,0,15,1,83,17,10,9,5,0,82,19,13,9,214,6,3,8,28,1,83,16,16,9,82,12,9,9,7,19,58,14,5,9,243,14,166,9,71,5,2,1,3,3,2,0,2,1,13,9,120,6,3,6,4,0,29,9,41,6,2,3,9,0,10,10,47,15,343,9,54,7,2,7,17,9,57,21,2,13,123,5,4,0,2,1,2,6,2,0,9,9,49,4,2,1,2,4,9,9,330,3,10,1,2,0,49,6,4,4,14,10,5350,0,7,14,11465,27,2343,9,87,9,39,4,60,6,26,9,535,9,470,0,2,54,8,3,82,0,12,1,19628,1,4178,9,519,45,3,22,543,4,4,5,9,7,3,6,31,3,149,2,1418,49,513,54,5,49,9,0,15,0,23,4,2,14,1361,6,2,16,3,6,2,1,2,4,101,0,161,6,10,9,357,0,62,13,499,13,245,1,2,9,726,6,110,6,6,9,4759,9,787719,239],me=[0,11,2,25,2,18,2,1,2,14,3,13,35,122,70,52,268,28,4,48,48,31,14,29,6,37,11,29,3,35,5,7,2,4,43,157,19,35,5,35,5,39,9,51,13,10,2,14,2,6,2,1,2,10,2,14,2,6,2,1,4,51,13,310,10,21,11,7,25,5,2,41,2,8,70,5,3,0,2,43,2,1,4,0,3,22,11,22,10,30,66,18,2,1,11,21,11,25,71,55,7,1,65,0,16,3,2,2,2,28,43,28,4,28,36,7,2,27,28,53,11,21,11,18,14,17,111,72,56,50,14,50,14,35,39,27,10,22,251,41,7,1,17,2,60,28,11,0,9,21,43,17,47,20,28,22,13,52,58,1,3,0,14,44,33,24,27,35,30,0,3,0,9,34,4,0,13,47,15,3,22,0,2,0,36,17,2,24,20,1,64,6,2,0,2,3,2,14,2,9,8,46,39,7,3,1,3,21,2,6,2,1,2,4,4,0,19,0,13,4,31,9,2,0,3,0,2,37,2,0,26,0,2,0,45,52,19,3,21,2,31,47,21,1,2,0,185,46,42,3,37,47,21,0,60,42,14,0,72,26,38,6,186,43,117,63,32,7,3,0,3,7,2,1,2,23,16,0,2,0,95,7,3,38,17,0,2,0,29,0,11,39,8,0,22,0,12,45,20,0,19,72,200,32,32,8,2,36,18,0,50,29,113,6,2,1,2,37,22,0,26,5,2,1,2,31,15,0,328,18,16,0,2,12,2,33,125,0,80,921,103,110,18,195,2637,96,16,1071,18,5,26,3994,6,582,6842,29,1763,568,8,30,18,78,18,29,19,47,17,3,32,20,6,18,433,44,212,63,129,74,6,0,67,12,65,1,2,0,29,6135,9,1237,42,9,8936,3,2,6,2,1,2,290,16,0,30,2,3,0,15,3,9,395,2309,106,6,12,4,8,8,9,5991,84,2,70,2,1,3,0,3,1,3,3,2,11,2,0,2,6,2,64,2,3,3,7,2,6,2,27,2,3,2,4,2,0,4,6,2,339,3,24,2,24,2,30,2,24,2,30,2,24,2,30,2,24,2,30,2,24,2,7,1845,30,7,5,262,61,147,44,11,6,17,0,322,29,19,43,485,27,229,29,3,0,496,6,2,3,2,1,2,14,2,196,60,67,8,0,1205,3,2,26,2,1,2,0,3,0,2,9,2,3,2,0,2,0,7,0,5,0,2,0,2,0,2,2,2,1,2,0,3,0,2,0,2,0,2,0,2,0,2,1,2,0,3,3,2,6,2,3,2,3,2,0,2,9,2,16,6,2,2,4,2,16,4421,42719,33,4153,7,221,3,5761,15,7472,16,621,2467,541,1507,4938,6,4191],ys="\u200C\u200D\xB7\u0300-\u036F\u0387\u0483-\u0487\u0591-\u05BD\u05BF\u05C1\u05C2\u05C4\u05C5\u05C7\u0610-\u061A\u064B-\u0669\u0670\u06D6-\u06DC\u06DF-\u06E4\u06E7\u06E8\u06EA-\u06ED\u06F0-\u06F9\u0711\u0730-\u074A\u07A6-\u07B0\u07C0-\u07C9\u07EB-\u07F3\u07FD\u0816-\u0819\u081B-\u0823\u0825-\u0827\u0829-\u082D\u0859-\u085B\u0897-\u089F\u08CA-\u08E1\u08E3-\u0903\u093A-\u093C\u093E-\u094F\u0951-\u0957\u0962\u0963\u0966-\u096F\u0981-\u0983\u09BC\u09BE-\u09C4\u09C7\u09C8\u09CB-\u09CD\u09D7\u09E2\u09E3\u09E6-\u09EF\u09FE\u0A01-\u0A03\u0A3C\u0A3E-\u0A42\u0A47\u0A48\u0A4B-\u0A4D\u0A51\u0A66-\u0A71\u0A75\u0A81-\u0A83\u0ABC\u0ABE-\u0AC5\u0AC7-\u0AC9\u0ACB-\u0ACD\u0AE2\u0AE3\u0AE6-\u0AEF\u0AFA-\u0AFF\u0B01-\u0B03\u0B3C\u0B3E-\u0B44\u0B47\u0B48\u0B4B-\u0B4D\u0B55-\u0B57\u0B62\u0B63\u0B66-\u0B6F\u0B82\u0BBE-\u0BC2\u0BC6-\u0BC8\u0BCA-\u0BCD\u0BD7\u0BE6-\u0BEF\u0C00-\u0C04\u0C3C\u0C3E-\u0C44\u0C46-\u0C48\u0C4A-\u0C4D\u0C55\u0C56\u0C62\u0C63\u0C66-\u0C6F\u0C81-\u0C83\u0CBC\u0CBE-\u0CC4\u0CC6-\u0CC8\u0CCA-\u0CCD\u0CD5\u0CD6\u0CE2\u0CE3\u0CE6-\u0CEF\u0CF3\u0D00-\u0D03\u0D3B\u0D3C\u0D3E-\u0D44\u0D46-\u0D48\u0D4A-\u0D4D\u0D57\u0D62\u0D63\u0D66-\u0D6F\u0D81-\u0D83\u0DCA\u0DCF-\u0DD4\u0DD6\u0DD8-\u0DDF\u0DE6-\u0DEF\u0DF2\u0DF3\u0E31\u0E34-\u0E3A\u0E47-\u0E4E\u0E50-\u0E59\u0EB1\u0EB4-\u0EBC\u0EC8-\u0ECE\u0ED0-\u0ED9\u0F18\u0F19\u0F20-\u0F29\u0F35\u0F37\u0F39\u0F3E\u0F3F\u0F71-\u0F84\u0F86\u0F87\u0F8D-\u0F97\u0F99-\u0FBC\u0FC6\u102B-\u103E\u1040-\u1049\u1056-\u1059\u105E-\u1060\u1062-\u1064\u1067-\u106D\u1071-\u1074\u1082-\u108D\u108F-\u109D\u135D-\u135F\u1369-\u1371\u1712-\u1715\u1732-\u1734\u1752\u1753\u1772\u1773\u17B4-\u17D3\u17DD\u17E0-\u17E9\u180B-\u180D\u180F-\u1819\u18A9\u1920-\u192B\u1930-\u193B\u1946-\u194F\u19D0-\u19DA\u1A17-\u1A1B\u1A55-\u1A5E\u1A60-\u1A7C\u1A7F-\u1A89\u1A90-\u1A99\u1AB0-\u1ABD\u1ABF-\u1ACE\u1B00-\u1B04\u1B34-\u1B44\u1B50-\u1B59\u1B6B-\u1B73\u1B80-\u1B82\u1BA1-\u1BAD\u1BB0-\u1BB9\u1BE6-\u1BF3\u1C24-\u1C37\u1C40-\u1C49\u1C50-\u1C59\u1CD0-\u1CD2\u1CD4-\u1CE8\u1CED\u1CF4\u1CF7-\u1CF9\u1DC0-\u1DFF\u200C\u200D\u203F\u2040\u2054\u20D0-\u20DC\u20E1\u20E5-\u20F0\u2CEF-\u2CF1\u2D7F\u2DE0-\u2DFF\u302A-\u302F\u3099\u309A\u30FB\uA620-\uA629\uA66F\uA674-\uA67D\uA69E\uA69F\uA6F0\uA6F1\uA802\uA806\uA80B\uA823-\uA827\uA82C\uA880\uA881\uA8B4-\uA8C5\uA8D0-\uA8D9\uA8E0-\uA8F1\uA8FF-\uA909\uA926-\uA92D\uA947-\uA953\uA980-\uA983\uA9B3-\uA9C0\uA9D0-\uA9D9\uA9E5\uA9F0-\uA9F9\uAA29-\uAA36\uAA43\uAA4C\uAA4D\uAA50-\uAA59\uAA7B-\uAA7D\uAAB0\uAAB2-\uAAB4\uAAB7\uAAB8\uAABE\uAABF\uAAC1\uAAEB-\uAAEF\uAAF5\uAAF6\uABE3-\uABEA\uABEC\uABED\uABF0-\uABF9\uFB1E\uFE00-\uFE0F\uFE20-\uFE2F\uFE33\uFE34\uFE4D-\uFE4F\uFF10-\uFF19\uFF3F\uFF65",ye="\xAA\xB5\xBA\xC0-\xD6\xD8-\xF6\xF8-\u02C1\u02C6-\u02D1\u02E0-\u02E4\u02EC\u02EE\u0370-\u0374\u0376\u0377\u037A-\u037D\u037F\u0386\u0388-\u038A\u038C\u038E-\u03A1\u03A3-\u03F5\u03F7-\u0481\u048A-\u052F\u0531-\u0556\u0559\u0560-\u0588\u05D0-\u05EA\u05EF-\u05F2\u0620-\u064A\u066E\u066F\u0671-\u06D3\u06D5\u06E5\u06E6\u06EE\u06EF\u06FA-\u06FC\u06FF\u0710\u0712-\u072F\u074D-\u07A5\u07B1\u07CA-\u07EA\u07F4\u07F5\u07FA\u0800-\u0815\u081A\u0824\u0828\u0840-\u0858\u0860-\u086A\u0870-\u0887\u0889-\u088E\u08A0-\u08C9\u0904-\u0939\u093D\u0950\u0958-\u0961\u0971-\u0980\u0985-\u098C\u098F\u0990\u0993-\u09A8\u09AA-\u09B0\u09B2\u09B6-\u09B9\u09BD\u09CE\u09DC\u09DD\u09DF-\u09E1\u09F0\u09F1\u09FC\u0A05-\u0A0A\u0A0F\u0A10\u0A13-\u0A28\u0A2A-\u0A30\u0A32\u0A33\u0A35\u0A36\u0A38\u0A39\u0A59-\u0A5C\u0A5E\u0A72-\u0A74\u0A85-\u0A8D\u0A8F-\u0A91\u0A93-\u0AA8\u0AAA-\u0AB0\u0AB2\u0AB3\u0AB5-\u0AB9\u0ABD\u0AD0\u0AE0\u0AE1\u0AF9\u0B05-\u0B0C\u0B0F\u0B10\u0B13-\u0B28\u0B2A-\u0B30\u0B32\u0B33\u0B35-\u0B39\u0B3D\u0B5C\u0B5D\u0B5F-\u0B61\u0B71\u0B83\u0B85-\u0B8A\u0B8E-\u0B90\u0B92-\u0B95\u0B99\u0B9A\u0B9C\u0B9E\u0B9F\u0BA3\u0BA4\u0BA8-\u0BAA\u0BAE-\u0BB9\u0BD0\u0C05-\u0C0C\u0C0E-\u0C10\u0C12-\u0C28\u0C2A-\u0C39\u0C3D\u0C58-\u0C5A\u0C5D\u0C60\u0C61\u0C80\u0C85-\u0C8C\u0C8E-\u0C90\u0C92-\u0CA8\u0CAA-\u0CB3\u0CB5-\u0CB9\u0CBD\u0CDD\u0CDE\u0CE0\u0CE1\u0CF1\u0CF2\u0D04-\u0D0C\u0D0E-\u0D10\u0D12-\u0D3A\u0D3D\u0D4E\u0D54-\u0D56\u0D5F-\u0D61\u0D7A-\u0D7F\u0D85-\u0D96\u0D9A-\u0DB1\u0DB3-\u0DBB\u0DBD\u0DC0-\u0DC6\u0E01-\u0E30\u0E32\u0E33\u0E40-\u0E46\u0E81\u0E82\u0E84\u0E86-\u0E8A\u0E8C-\u0EA3\u0EA5\u0EA7-\u0EB0\u0EB2\u0EB3\u0EBD\u0EC0-\u0EC4\u0EC6\u0EDC-\u0EDF\u0F00\u0F40-\u0F47\u0F49-\u0F6C\u0F88-\u0F8C\u1000-\u102A\u103F\u1050-\u1055\u105A-\u105D\u1061\u1065\u1066\u106E-\u1070\u1075-\u1081\u108E\u10A0-\u10C5\u10C7\u10CD\u10D0-\u10FA\u10FC-\u1248\u124A-\u124D\u1250-\u1256\u1258\u125A-\u125D\u1260-\u1288\u128A-\u128D\u1290-\u12B0\u12B2-\u12B5\u12B8-\u12BE\u12C0\u12C2-\u12C5\u12C8-\u12D6\u12D8-\u1310\u1312-\u1315\u1318-\u135A\u1380-\u138F\u13A0-\u13F5\u13F8-\u13FD\u1401-\u166C\u166F-\u167F\u1681-\u169A\u16A0-\u16EA\u16EE-\u16F8\u1700-\u1711\u171F-\u1731\u1740-\u1751\u1760-\u176C\u176E-\u1770\u1780-\u17B3\u17D7\u17DC\u1820-\u1878\u1880-\u18A8\u18AA\u18B0-\u18F5\u1900-\u191E\u1950-\u196D\u1970-\u1974\u1980-\u19AB\u19B0-\u19C9\u1A00-\u1A16\u1A20-\u1A54\u1AA7\u1B05-\u1B33\u1B45-\u1B4C\u1B83-\u1BA0\u1BAE\u1BAF\u1BBA-\u1BE5\u1C00-\u1C23\u1C4D-\u1C4F\u1C5A-\u1C7D\u1C80-\u1C8A\u1C90-\u1CBA\u1CBD-\u1CBF\u1CE9-\u1CEC\u1CEE-\u1CF3\u1CF5\u1CF6\u1CFA\u1D00-\u1DBF\u1E00-\u1F15\u1F18-\u1F1D\u1F20-\u1F45\u1F48-\u1F4D\u1F50-\u1F57\u1F59\u1F5B\u1F5D\u1F5F-\u1F7D\u1F80-\u1FB4\u1FB6-\u1FBC\u1FBE\u1FC2-\u1FC4\u1FC6-\u1FCC\u1FD0-\u1FD3\u1FD6-\u1FDB\u1FE0-\u1FEC\u1FF2-\u1FF4\u1FF6-\u1FFC\u2071\u207F\u2090-\u209C\u2102\u2107\u210A-\u2113\u2115\u2118-\u211D\u2124\u2126\u2128\u212A-\u2139\u213C-\u213F\u2145-\u2149\u214E\u2160-\u2188\u2C00-\u2CE4\u2CEB-\u2CEE\u2CF2\u2CF3\u2D00-\u2D25\u2D27\u2D2D\u2D30-\u2D67\u2D6F\u2D80-\u2D96\u2DA0-\u2DA6\u2DA8-\u2DAE\u2DB0-\u2DB6\u2DB8-\u2DBE\u2DC0-\u2DC6\u2DC8-\u2DCE\u2DD0-\u2DD6\u2DD8-\u2DDE\u3005-\u3007\u3021-\u3029\u3031-\u3035\u3038-\u303C\u3041-\u3096\u309B-\u309F\u30A1-\u30FA\u30FC-\u30FF\u3105-\u312F\u3131-\u318E\u31A0-\u31BF\u31F0-\u31FF\u3400-\u4DBF\u4E00-\uA48C\uA4D0-\uA4FD\uA500-\uA60C\uA610-\uA61F\uA62A\uA62B\uA640-\uA66E\uA67F-\uA69D\uA6A0-\uA6EF\uA717-\uA71F\uA722-\uA788\uA78B-\uA7CD\uA7D0\uA7D1\uA7D3\uA7D5-\uA7DC\uA7F2-\uA801\uA803-\uA805\uA807-\uA80A\uA80C-\uA822\uA840-\uA873\uA882-\uA8B3\uA8F2-\uA8F7\uA8FB\uA8FD\uA8FE\uA90A-\uA925\uA930-\uA946\uA960-\uA97C\uA984-\uA9B2\uA9CF\uA9E0-\uA9E4\uA9E6-\uA9EF\uA9FA-\uA9FE\uAA00-\uAA28\uAA40-\uAA42\uAA44-\uAA4B\uAA60-\uAA76\uAA7A\uAA7E-\uAAAF\uAAB1\uAAB5\uAAB6\uAAB9-\uAABD\uAAC0\uAAC2\uAADB-\uAADD\uAAE0-\uAAEA\uAAF2-\uAAF4\uAB01-\uAB06\uAB09-\uAB0E\uAB11-\uAB16\uAB20-\uAB26\uAB28-\uAB2E\uAB30-\uAB5A\uAB5C-\uAB69\uAB70-\uABE2\uAC00-\uD7A3\uD7B0-\uD7C6\uD7CB-\uD7FB\uF900-\uFA6D\uFA70-\uFAD9\uFB00-\uFB06\uFB13-\uFB17\uFB1D\uFB1F-\uFB28\uFB2A-\uFB36\uFB38-\uFB3C\uFB3E\uFB40\uFB41\uFB43\uFB44\uFB46-\uFBB1\uFBD3-\uFD3D\uFD50-\uFD8F\uFD92-\uFDC7\uFDF0-\uFDFB\uFE70-\uFE74\uFE76-\uFEFC\uFF21-\uFF3A\uFF41-\uFF5A\uFF66-\uFFBE\uFFC2-\uFFC7\uFFCA-\uFFCF\uFFD2-\uFFD7\uFFDA-\uFFDC",Dt={3:"abstract boolean byte char class double enum export extends final float goto implements import int interface long native package private protected public short static super synchronized throws transient volatile",5:"class enum extends super const export import",6:"enum",strict:"implements interface let package private protected public static yield",strictBind:"eval arguments"},Ft="break case catch continue debugger default do else finally for function if return switch throw try var while with null true false instanceof typeof void delete new in this",xs={5:Ft,"5module":Ft+" export import",6:Ft+" const class extends export import super"},gs=/^in(stanceof)?$/,As=new RegExp("["+ye+"]"),vs=new RegExp("["+ye+ys+"]");function Lt(t,e){for(var s=65536,i=0;i<e.length;i+=2){if(s+=e[i],s>t)return!1;if(s+=e[i+1],s>=t)return!0}return!1}function G(t,e){return t<65?t===36:t<91?!0:t<97?t===95:t<123?!0:t<=65535?t>=170&&As.test(String.fromCharCode(t)):e===!1?!1:Lt(t,me)}function Q(t,e){return t<48?t===36:t<58?!0:t<65?!1:t<91?!0:t<97?t===95:t<123?!0:t<=65535?t>=170&&vs.test(String.fromCharCode(t)):e===!1?!1:Lt(t,me)||Lt(t,ms)}var E=function(t,e){e===void 0&&(e={}),this.label=t,this.keyword=e.keyword,this.beforeExpr=!!e.beforeExpr,this.startsExpr=!!e.startsExpr,this.isLoop=!!e.isLoop,this.isAssign=!!e.isAssign,this.prefix=!!e.prefix,this.postfix=!!e.postfix,this.binop=e.binop||null,this.updateContext=null};function L(t,e){return new E(t,{beforeExpr:!0,binop:e})}var R={beforeExpr:!0},B={startsExpr:!0},Jt={};function b(t,e){return e===void 0&&(e={}),e.keyword=t,Jt[t]=new E(t,e)}var a={num:new E("num",B),regexp:new E("regexp",B),string:new E("string",B),name:new E("name",B),privateId:new E("privateId",B),eof:new E("eof"),bracketL:new E("[",{beforeExpr:!0,startsExpr:!0}),bracketR:new E("]"),braceL:new E("{",{beforeExpr:!0,startsExpr:!0}),braceR:new E("}"),parenL:new E("(",{beforeExpr:!0,startsExpr:!0}),parenR:new E(")"),comma:new E(",",R),semi:new E(";",R),colon:new E(":",R),dot:new E("."),question:new E("?",R),questionDot:new E("?."),arrow:new E("=>",R),template:new E("template"),invalidTemplate:new E("invalidTemplate"),ellipsis:new E("...",R),backQuote:new E("`",B),dollarBraceL:new E("${",{beforeExpr:!0,startsExpr:!0}),eq:new E("=",{beforeExpr:!0,isAssign:!0}),assign:new E("_=",{beforeExpr:!0,isAssign:!0}),incDec:new E("++/--",{prefix:!0,postfix:!0,startsExpr:!0}),prefix:new E("!/~",{beforeExpr:!0,prefix:!0,startsExpr:!0}),logicalOR:L("||",1),logicalAND:L("&&",2),bitwiseOR:L("|",3),bitwiseXOR:L("^",4),bitwiseAND:L("&",5),equality:L("==/!=/===/!==",6),relational:L("</>/<=/>=",7),bitShift:L("<</>>/>>>",8),plusMin:new E("+/-",{beforeExpr:!0,binop:9,prefix:!0,startsExpr:!0}),modulo:L("%",10),star:L("*",10),slash:L("/",10),starstar:new E("**",{beforeExpr:!0}),coalesce:L("??",1),_break:b("break"),_case:b("case",R),_catch:b("catch"),_continue:b("continue"),_debugger:b("debugger"),_default:b("default",R),_do:b("do",{isLoop:!0,beforeExpr:!0}),_else:b("else",R),_finally:b("finally"),_for:b("for",{isLoop:!0}),_function:b("function",B),_if:b("if"),_return:b("return",R),_switch:b("switch"),_throw:b("throw",R),_try:b("try"),_var:b("var"),_const:b("const"),_while:b("while",{isLoop:!0}),_with:b("with"),_new:b("new",{beforeExpr:!0,startsExpr:!0}),_this:b("this",B),_super:b("super",B),_class:b("class",B),_extends:b("extends",R),_export:b("export"),_import:b("import",B),_null:b("null",B),_true:b("true",B),_false:b("false",B),_in:b("in",{beforeExpr:!0,binop:7}),_instanceof:b("instanceof",{beforeExpr:!0,binop:7}),_typeof:b("typeof",{beforeExpr:!0,prefix:!0,startsExpr:!0}),_void:b("void",{beforeExpr:!0,prefix:!0,startsExpr:!0}),_delete:b("delete",{beforeExpr:!0,prefix:!0,startsExpr:!0})},N=/\r\n?|\n|\u2028|\u2029/,bs=new RegExp(N.source,"g");function st(t){return t===10||t===13||t===8232||t===8233}function xe(t,e,s){s===void 0&&(s=t.length);for(var i=e;i<s;i++){var r=t.charCodeAt(i);if(st(r))return i<s-1&&r===13&&t.charCodeAt(i+1)===10?i+2:i+1}return-1}var ge=/[\u1680\u2000-\u200a\u202f\u205f\u3000\ufeff]/,w=/(?:\s|\/\/.*|\/\*[^]*?\*\/)*/g,Ae=Object.prototype,Cs=Ae.hasOwnProperty,Es=Ae.toString,it=Object.hasOwn||function(t,e){return Cs.call(t,e)},ee=Array.isArray||function(t){return Es.call(t)==="[object Array]"},se=Object.create(null);function z(t){return se[t]||(se[t]=new RegExp("^(?:"+t.replace(/ /g,"|")+")$"))}function X(t){return t<=65535?String.fromCharCode(t):(t-=65536,String.fromCharCode((t>>10)+55296,(t&1023)+56320))}var Ss=/(?:[\uD800-\uDBFF](?![\uDC00-\uDFFF])|(?:[^\uD800-\uDBFF]|^)[\uDC00-\uDFFF])/,pt=function(t,e){this.line=t,this.column=e};pt.prototype.offset=function(t){return new pt(this.line,this.column+t)};var Ct=function(t,e,s){this.start=e,this.end=s,t.sourceFile!==null&&(this.source=t.sourceFile)};function ve(t,e){for(var s=1,i=0;;){var r=xe(t,i,e);if(r<0)return new pt(s,e-i);++s,i=r}}var Rt={ecmaVersion:null,sourceType:"script",onInsertedSemicolon:null,onTrailingComma:null,allowReserved:null,allowReturnOutsideFunction:!1,allowImportExportEverywhere:!1,allowAwaitOutsideFunction:null,allowSuperOutsideMethod:null,allowHashBang:!1,checkPrivateFields:!0,locations:!1,onToken:null,onComment:null,ranges:!1,program:null,sourceFile:null,directSourceFile:null,preserveParens:!1},ie=!1;function ks(t){var e={};for(var s in Rt)e[s]=t&&it(t,s)?t[s]:Rt[s];if(e.ecmaVersion==="latest"?e.ecmaVersion=1e8:e.ecmaVersion==null?(!ie&&typeof console=="object"&&console.warn&&(ie=!0,console.warn(`Since Acorn 8.0.0, options.ecmaVersion is required.
5
5
  Defaulting to 2020, but this will stop working in the future.`)),e.ecmaVersion=11):e.ecmaVersion>=2015&&(e.ecmaVersion-=2009),e.allowReserved==null&&(e.allowReserved=e.ecmaVersion<5),(!t||t.allowHashBang==null)&&(e.allowHashBang=e.ecmaVersion>=14),ee(e.onToken)){var i=e.onToken;e.onToken=function(r){return i.push(r)}}return ee(e.onComment)&&(e.onComment=Ts(e,e.onComment)),e}function Ts(t,e){return function(s,i,r,n,o,p){var u={type:s?"Block":"Line",value:i,start:r,end:n};t.locations&&(u.loc=new Ct(this,o,p)),t.ranges&&(u.range=[r,n]),e.push(u)}}var ht=1,rt=2,Kt=4,be=8,Xt=16,Ce=32,Et=64,Ee=128,tt=256,ct=512,St=ht|rt|tt;function Ht(t,e){return rt|(t?Kt:0)|(e?be:0)}var gt=0,Wt=1,W=2,Se=3,ke=4,Te=5,_=function(t,e,s){this.options=t=ks(t),this.sourceFile=t.sourceFile,this.keywords=z(xs[t.ecmaVersion>=6?6:t.sourceType==="module"?"5module":5]);var i="";t.allowReserved!==!0&&(i=Dt[t.ecmaVersion>=6?6:t.ecmaVersion===5?5:3],t.sourceType==="module"&&(i+=" await")),this.reservedWords=z(i);var r=(i?i+" ":"")+Dt.strict;this.reservedWordsStrict=z(r),this.reservedWordsStrictBind=z(r+" "+Dt.strictBind),this.input=String(e),this.containsEsc=!1,s?(this.pos=s,this.lineStart=this.input.lastIndexOf(`
@@ -1,5 +1,5 @@
1
1
  // @bun
2
- import{pP as d3,rP as P5}from"./chunk-naq602da.js";function R($,X,Y,J,Q){if(J==="m")throw TypeError("Private method is not writable");if(J==="a"&&!Q)throw TypeError("Private accessor was defined without a setter");if(typeof X==="function"?$!==X||!Q:!X.has($))throw TypeError("Cannot write private member to an object whose class did not declare it");return J==="a"?Q.call($,Y):Q?Q.value=Y:X.set($,Y),Y}function M($,X,Y,J){if(Y==="a"&&!J)throw TypeError("Private accessor was defined without a getter");if(typeof X==="function"?$!==X||!J:!X.has($))throw TypeError("Cannot read private member from an object whose class did not declare it");return Y==="m"?J:Y==="a"?J.call($):J?J.value:X.get($)}var t4=function(){let{crypto:$}=globalThis;if($?.randomUUID)return t4=$.randomUUID.bind($),$.randomUUID();let X=new Uint8Array(1),Y=$?()=>$.getRandomValues(X)[0]:()=>Math.random()*255&255;return"10000000-1000-4000-8000-100000000000".replace(/[018]/g,(J)=>(+J^Y()&15>>+J/4).toString(16))};function e$($){return typeof $==="object"&&$!==null&&(("name"in $)&&$.name==="AbortError"||("message"in $)&&String($.message).includes("FetchRequestCanceledException"))}var M8=($)=>{if($ instanceof Error)return $;if(typeof $==="object"&&$!==null){try{if(Object.prototype.toString.call($)==="[object Error]"){let X=Error($.message,$.cause?{cause:$.cause}:{});if($.stack)X.stack=$.stack;if($.cause&&!X.cause)X.cause=$.cause;if($.name)X.name=$.name;return X}}catch{}try{return Error(JSON.stringify($))}catch{}}return Error($)};class f extends Error{}class X$ extends f{constructor($,X,Y,J){super(`${X$.makeMessage($,X,Y)}`);this.status=$,this.headers=J,this.requestID=J?.get("request-id"),this.error=X}static makeMessage($,X,Y){let J=X?.message?typeof X.message==="string"?X.message:JSON.stringify(X.message):X?JSON.stringify(X):Y;if($&&J)return`${$} ${J}`;if($)return`${$} status code (no body)`;if(J)return J;return"(no status code or body)"}static generate($,X,Y,J){if(!$||!J)return new f0({message:Y,cause:M8(X)});let Q=X;if($===400)return new E8($,Q,Y,J);if($===401)return new L8($,Q,Y,J);if($===403)return new Z8($,Q,Y,J);if($===404)return new S8($,Q,Y,J);if($===409)return new A8($,Q,Y,J);if($===422)return new C8($,Q,Y,J);if($===429)return new D8($,Q,Y,J);if($>=500)return new R8($,Q,Y,J);return new X$($,Q,Y,J)}}class q$ extends X${constructor({message:$}={}){super(void 0,void 0,$||"Request was aborted.",void 0)}}class f0 extends X${constructor({message:$,cause:X}){super(void 0,void 0,$||"Connection error.",void 0);if(X)this.cause=X}}class O8 extends f0{constructor({message:$}={}){super({message:$??"Request timed out."})}}class E8 extends X${}class L8 extends X${}class Z8 extends X${}class S8 extends X${}class A8 extends X${}class C8 extends X${}class D8 extends X${}class R8 extends X${}var o5=/^[a-z][a-z0-9+.-]*:/i,E7=($)=>{return o5.test($)},o4=($)=>(o4=Array.isArray,o4($)),e4=o4;function c6($){if(typeof $!=="object")return{};return $??{}}function L7($){if(!$)return!0;for(let X in $)return!1;return!0}function Z7($,X){return Object.prototype.hasOwnProperty.call($,X)}var S7=($,X)=>{if(typeof X!=="number"||!Number.isInteger(X))throw new f(`${$} must be an integer`);if(X<0)throw new f(`${$} must be a positive integer`);return X};var l6=($)=>{try{return JSON.parse($)}catch(X){return}};var A7=($)=>new Promise((X)=>setTimeout(X,$));var w0="0.71.2";var T7=()=>{return typeof window<"u"&&typeof window.document<"u"&&typeof navigator<"u"};function e5(){if(typeof Deno<"u"&&Deno.build!=null)return"deno";if(typeof EdgeRuntime<"u")return"edge";if(Object.prototype.toString.call(typeof globalThis.process<"u"?globalThis.process:0)==="[object process]")return"node";return"unknown"}var $Y=()=>{let $=e5();if($==="deno")return{"X-Stainless-Lang":"js","X-Stainless-Package-Version":w0,"X-Stainless-OS":D7(Deno.build.os),"X-Stainless-Arch":C7(Deno.build.arch),"X-Stainless-Runtime":"deno","X-Stainless-Runtime-Version":typeof Deno.version==="string"?Deno.version:Deno.version?.deno??"unknown"};if(typeof EdgeRuntime<"u")return{"X-Stainless-Lang":"js","X-Stainless-Package-Version":w0,"X-Stainless-OS":"Unknown","X-Stainless-Arch":`other:${EdgeRuntime}`,"X-Stainless-Runtime":"edge","X-Stainless-Runtime-Version":globalThis.process.version};if($==="node")return{"X-Stainless-Lang":"js","X-Stainless-Package-Version":w0,"X-Stainless-OS":D7(globalThis.process.platform??"unknown"),"X-Stainless-Arch":C7(globalThis.process.arch??"unknown"),"X-Stainless-Runtime":"node","X-Stainless-Runtime-Version":globalThis.process.version??"unknown"};let X=XY();if(X)return{"X-Stainless-Lang":"js","X-Stainless-Package-Version":w0,"X-Stainless-OS":"Unknown","X-Stainless-Arch":"unknown","X-Stainless-Runtime":`browser:${X.browser}`,"X-Stainless-Runtime-Version":X.version};return{"X-Stainless-Lang":"js","X-Stainless-Package-Version":w0,"X-Stainless-OS":"Unknown","X-Stainless-Arch":"unknown","X-Stainless-Runtime":"unknown","X-Stainless-Runtime-Version":"unknown"}};function XY(){if(typeof navigator>"u"||!navigator)return null;let $=[{key:"edge",pattern:/Edge(?:\W+(\d+)\.(\d+)(?:\.(\d+))?)?/},{key:"ie",pattern:/MSIE(?:\W+(\d+)\.(\d+)(?:\.(\d+))?)?/},{key:"ie",pattern:/Trident(?:.*rv\:(\d+)\.(\d+)(?:\.(\d+))?)?/},{key:"chrome",pattern:/Chrome(?:\W+(\d+)\.(\d+)(?:\.(\d+))?)?/},{key:"firefox",pattern:/Firefox(?:\W+(\d+)\.(\d+)(?:\.(\d+))?)?/},{key:"safari",pattern:/(?:Version\W+(\d+)\.(\d+)(?:\.(\d+))?)?(?:\W+Mobile\S*)?\W+Safari/}];for(let{key:X,pattern:Y}of $){let J=Y.exec(navigator.userAgent);if(J){let Q=J[1]||0,W=J[2]||0,z=J[3]||0;return{browser:X,version:`${Q}.${W}.${z}`}}}return null}var C7=($)=>{if($==="x32")return"x32";if($==="x86_64"||$==="x64")return"x64";if($==="arm")return"arm";if($==="aarch64"||$==="arm64")return"arm64";if($)return`other:${$}`;return"unknown"},D7=($)=>{if($=$.toLowerCase(),$.includes("ios"))return"iOS";if($==="android")return"Android";if($==="darwin")return"MacOS";if($==="win32")return"Windows";if($==="freebsd")return"FreeBSD";if($==="openbsd")return"OpenBSD";if($==="linux")return"Linux";if($)return`Other:${$}`;return"Unknown"},R7,_7=()=>{return R7??(R7=$Y())};function P7(){if(typeof fetch<"u")return fetch;throw Error("`fetch` is not defined as a global; Either pass `fetch` to the client, `new Anthropic({ fetch })` or polyfill the global, `globalThis.fetch = fetch`")}function $X(...$){let X=globalThis.ReadableStream;if(typeof X>"u")throw Error("`ReadableStream` is not defined as a global; You will need to polyfill it, `globalThis.ReadableStream = ReadableStream`");return new X(...$)}function p6($){let X=Symbol.asyncIterator in $?$[Symbol.asyncIterator]():$[Symbol.iterator]();return $X({start(){},async pull(Y){let{done:J,value:Q}=await X.next();if(J)Y.close();else Y.enqueue(Q)},async cancel(){await X.return?.()}})}function T8($){if($[Symbol.asyncIterator])return $;let X=$.getReader();return{async next(){try{let Y=await X.read();if(Y?.done)X.releaseLock();return Y}catch(Y){throw X.releaseLock(),Y}},async return(){let Y=X.cancel();return X.releaseLock(),await Y,{done:!0,value:void 0}},[Symbol.asyncIterator](){return this}}}async function j7($){if($===null||typeof $!=="object")return;if($[Symbol.asyncIterator]){await $[Symbol.asyncIterator]().return?.();return}let X=$.getReader(),Y=X.cancel();X.releaseLock(),await Y}var k7=({headers:$,body:X})=>{return{bodyHeaders:{"content-type":"application/json"},body:JSON.stringify(X)}};function b7($){let X=0;for(let Q of $)X+=Q.length;let Y=new Uint8Array(X),J=0;for(let Q of $)Y.set(Q,J),J+=Q.length;return Y}var x7;function _8($){let X;return(x7??(X=new globalThis.TextEncoder,x7=X.encode.bind(X)))($)}var f7;function XX($){let X;return(f7??(X=new globalThis.TextDecoder,f7=X.decode.bind(X)))($)}var Z$,S$;class N0{constructor(){Z$.set(this,void 0),S$.set(this,void 0),R(this,Z$,new Uint8Array,"f"),R(this,S$,null,"f")}decode($){if($==null)return[];let X=$ instanceof ArrayBuffer?new Uint8Array($):typeof $==="string"?_8($):$;R(this,Z$,b7([M(this,Z$,"f"),X]),"f");let Y=[],J;while((J=QY(M(this,Z$,"f"),M(this,S$,"f")))!=null){if(J.carriage&&M(this,S$,"f")==null){R(this,S$,J.index,"f");continue}if(M(this,S$,"f")!=null&&(J.index!==M(this,S$,"f")+1||J.carriage)){Y.push(XX(M(this,Z$,"f").subarray(0,M(this,S$,"f")-1))),R(this,Z$,M(this,Z$,"f").subarray(M(this,S$,"f")),"f"),R(this,S$,null,"f");continue}let Q=M(this,S$,"f")!==null?J.preceding-1:J.preceding,W=XX(M(this,Z$,"f").subarray(0,Q));Y.push(W),R(this,Z$,M(this,Z$,"f").subarray(J.index),"f"),R(this,S$,null,"f")}return Y}flush(){if(!M(this,Z$,"f").length)return[];return this.decode(`
2
+ import{AP as d3,CP as P5}from"./chunk-hh4c02fh.js";function R($,X,Y,J,Q){if(J==="m")throw TypeError("Private method is not writable");if(J==="a"&&!Q)throw TypeError("Private accessor was defined without a setter");if(typeof X==="function"?$!==X||!Q:!X.has($))throw TypeError("Cannot write private member to an object whose class did not declare it");return J==="a"?Q.call($,Y):Q?Q.value=Y:X.set($,Y),Y}function M($,X,Y,J){if(Y==="a"&&!J)throw TypeError("Private accessor was defined without a getter");if(typeof X==="function"?$!==X||!J:!X.has($))throw TypeError("Cannot read private member from an object whose class did not declare it");return Y==="m"?J:Y==="a"?J.call($):J?J.value:X.get($)}var t4=function(){let{crypto:$}=globalThis;if($?.randomUUID)return t4=$.randomUUID.bind($),$.randomUUID();let X=new Uint8Array(1),Y=$?()=>$.getRandomValues(X)[0]:()=>Math.random()*255&255;return"10000000-1000-4000-8000-100000000000".replace(/[018]/g,(J)=>(+J^Y()&15>>+J/4).toString(16))};function e$($){return typeof $==="object"&&$!==null&&(("name"in $)&&$.name==="AbortError"||("message"in $)&&String($.message).includes("FetchRequestCanceledException"))}var M8=($)=>{if($ instanceof Error)return $;if(typeof $==="object"&&$!==null){try{if(Object.prototype.toString.call($)==="[object Error]"){let X=Error($.message,$.cause?{cause:$.cause}:{});if($.stack)X.stack=$.stack;if($.cause&&!X.cause)X.cause=$.cause;if($.name)X.name=$.name;return X}}catch{}try{return Error(JSON.stringify($))}catch{}}return Error($)};class f extends Error{}class X$ extends f{constructor($,X,Y,J){super(`${X$.makeMessage($,X,Y)}`);this.status=$,this.headers=J,this.requestID=J?.get("request-id"),this.error=X}static makeMessage($,X,Y){let J=X?.message?typeof X.message==="string"?X.message:JSON.stringify(X.message):X?JSON.stringify(X):Y;if($&&J)return`${$} ${J}`;if($)return`${$} status code (no body)`;if(J)return J;return"(no status code or body)"}static generate($,X,Y,J){if(!$||!J)return new f0({message:Y,cause:M8(X)});let Q=X;if($===400)return new E8($,Q,Y,J);if($===401)return new L8($,Q,Y,J);if($===403)return new Z8($,Q,Y,J);if($===404)return new S8($,Q,Y,J);if($===409)return new A8($,Q,Y,J);if($===422)return new C8($,Q,Y,J);if($===429)return new D8($,Q,Y,J);if($>=500)return new R8($,Q,Y,J);return new X$($,Q,Y,J)}}class q$ extends X${constructor({message:$}={}){super(void 0,void 0,$||"Request was aborted.",void 0)}}class f0 extends X${constructor({message:$,cause:X}){super(void 0,void 0,$||"Connection error.",void 0);if(X)this.cause=X}}class O8 extends f0{constructor({message:$}={}){super({message:$??"Request timed out."})}}class E8 extends X${}class L8 extends X${}class Z8 extends X${}class S8 extends X${}class A8 extends X${}class C8 extends X${}class D8 extends X${}class R8 extends X${}var o5=/^[a-z][a-z0-9+.-]*:/i,E7=($)=>{return o5.test($)},o4=($)=>(o4=Array.isArray,o4($)),e4=o4;function c6($){if(typeof $!=="object")return{};return $??{}}function L7($){if(!$)return!0;for(let X in $)return!1;return!0}function Z7($,X){return Object.prototype.hasOwnProperty.call($,X)}var S7=($,X)=>{if(typeof X!=="number"||!Number.isInteger(X))throw new f(`${$} must be an integer`);if(X<0)throw new f(`${$} must be a positive integer`);return X};var l6=($)=>{try{return JSON.parse($)}catch(X){return}};var A7=($)=>new Promise((X)=>setTimeout(X,$));var w0="0.71.2";var T7=()=>{return typeof window<"u"&&typeof window.document<"u"&&typeof navigator<"u"};function e5(){if(typeof Deno<"u"&&Deno.build!=null)return"deno";if(typeof EdgeRuntime<"u")return"edge";if(Object.prototype.toString.call(typeof globalThis.process<"u"?globalThis.process:0)==="[object process]")return"node";return"unknown"}var $Y=()=>{let $=e5();if($==="deno")return{"X-Stainless-Lang":"js","X-Stainless-Package-Version":w0,"X-Stainless-OS":D7(Deno.build.os),"X-Stainless-Arch":C7(Deno.build.arch),"X-Stainless-Runtime":"deno","X-Stainless-Runtime-Version":typeof Deno.version==="string"?Deno.version:Deno.version?.deno??"unknown"};if(typeof EdgeRuntime<"u")return{"X-Stainless-Lang":"js","X-Stainless-Package-Version":w0,"X-Stainless-OS":"Unknown","X-Stainless-Arch":`other:${EdgeRuntime}`,"X-Stainless-Runtime":"edge","X-Stainless-Runtime-Version":globalThis.process.version};if($==="node")return{"X-Stainless-Lang":"js","X-Stainless-Package-Version":w0,"X-Stainless-OS":D7(globalThis.process.platform??"unknown"),"X-Stainless-Arch":C7(globalThis.process.arch??"unknown"),"X-Stainless-Runtime":"node","X-Stainless-Runtime-Version":globalThis.process.version??"unknown"};let X=XY();if(X)return{"X-Stainless-Lang":"js","X-Stainless-Package-Version":w0,"X-Stainless-OS":"Unknown","X-Stainless-Arch":"unknown","X-Stainless-Runtime":`browser:${X.browser}`,"X-Stainless-Runtime-Version":X.version};return{"X-Stainless-Lang":"js","X-Stainless-Package-Version":w0,"X-Stainless-OS":"Unknown","X-Stainless-Arch":"unknown","X-Stainless-Runtime":"unknown","X-Stainless-Runtime-Version":"unknown"}};function XY(){if(typeof navigator>"u"||!navigator)return null;let $=[{key:"edge",pattern:/Edge(?:\W+(\d+)\.(\d+)(?:\.(\d+))?)?/},{key:"ie",pattern:/MSIE(?:\W+(\d+)\.(\d+)(?:\.(\d+))?)?/},{key:"ie",pattern:/Trident(?:.*rv\:(\d+)\.(\d+)(?:\.(\d+))?)?/},{key:"chrome",pattern:/Chrome(?:\W+(\d+)\.(\d+)(?:\.(\d+))?)?/},{key:"firefox",pattern:/Firefox(?:\W+(\d+)\.(\d+)(?:\.(\d+))?)?/},{key:"safari",pattern:/(?:Version\W+(\d+)\.(\d+)(?:\.(\d+))?)?(?:\W+Mobile\S*)?\W+Safari/}];for(let{key:X,pattern:Y}of $){let J=Y.exec(navigator.userAgent);if(J){let Q=J[1]||0,W=J[2]||0,z=J[3]||0;return{browser:X,version:`${Q}.${W}.${z}`}}}return null}var C7=($)=>{if($==="x32")return"x32";if($==="x86_64"||$==="x64")return"x64";if($==="arm")return"arm";if($==="aarch64"||$==="arm64")return"arm64";if($)return`other:${$}`;return"unknown"},D7=($)=>{if($=$.toLowerCase(),$.includes("ios"))return"iOS";if($==="android")return"Android";if($==="darwin")return"MacOS";if($==="win32")return"Windows";if($==="freebsd")return"FreeBSD";if($==="openbsd")return"OpenBSD";if($==="linux")return"Linux";if($)return`Other:${$}`;return"Unknown"},R7,_7=()=>{return R7??(R7=$Y())};function P7(){if(typeof fetch<"u")return fetch;throw Error("`fetch` is not defined as a global; Either pass `fetch` to the client, `new Anthropic({ fetch })` or polyfill the global, `globalThis.fetch = fetch`")}function $X(...$){let X=globalThis.ReadableStream;if(typeof X>"u")throw Error("`ReadableStream` is not defined as a global; You will need to polyfill it, `globalThis.ReadableStream = ReadableStream`");return new X(...$)}function p6($){let X=Symbol.asyncIterator in $?$[Symbol.asyncIterator]():$[Symbol.iterator]();return $X({start(){},async pull(Y){let{done:J,value:Q}=await X.next();if(J)Y.close();else Y.enqueue(Q)},async cancel(){await X.return?.()}})}function T8($){if($[Symbol.asyncIterator])return $;let X=$.getReader();return{async next(){try{let Y=await X.read();if(Y?.done)X.releaseLock();return Y}catch(Y){throw X.releaseLock(),Y}},async return(){let Y=X.cancel();return X.releaseLock(),await Y,{done:!0,value:void 0}},[Symbol.asyncIterator](){return this}}}async function j7($){if($===null||typeof $!=="object")return;if($[Symbol.asyncIterator]){await $[Symbol.asyncIterator]().return?.();return}let X=$.getReader(),Y=X.cancel();X.releaseLock(),await Y}var k7=({headers:$,body:X})=>{return{bodyHeaders:{"content-type":"application/json"},body:JSON.stringify(X)}};function b7($){let X=0;for(let Q of $)X+=Q.length;let Y=new Uint8Array(X),J=0;for(let Q of $)Y.set(Q,J),J+=Q.length;return Y}var x7;function _8($){let X;return(x7??(X=new globalThis.TextEncoder,x7=X.encode.bind(X)))($)}var f7;function XX($){let X;return(f7??(X=new globalThis.TextDecoder,f7=X.decode.bind(X)))($)}var Z$,S$;class N0{constructor(){Z$.set(this,void 0),S$.set(this,void 0),R(this,Z$,new Uint8Array,"f"),R(this,S$,null,"f")}decode($){if($==null)return[];let X=$ instanceof ArrayBuffer?new Uint8Array($):typeof $==="string"?_8($):$;R(this,Z$,b7([M(this,Z$,"f"),X]),"f");let Y=[],J;while((J=QY(M(this,Z$,"f"),M(this,S$,"f")))!=null){if(J.carriage&&M(this,S$,"f")==null){R(this,S$,J.index,"f");continue}if(M(this,S$,"f")!=null&&(J.index!==M(this,S$,"f")+1||J.carriage)){Y.push(XX(M(this,Z$,"f").subarray(0,M(this,S$,"f")-1))),R(this,Z$,M(this,Z$,"f").subarray(M(this,S$,"f")),"f"),R(this,S$,null,"f");continue}let Q=M(this,S$,"f")!==null?J.preceding-1:J.preceding,W=XX(M(this,Z$,"f").subarray(0,Q));Y.push(W),R(this,Z$,M(this,Z$,"f").subarray(J.index),"f"),R(this,S$,null,"f")}return Y}flush(){if(!M(this,Z$,"f").length)return[];return this.decode(`
3
3
  `)}}Z$=new WeakMap,S$=new WeakMap;N0.NEWLINE_CHARS=new Set([`
4
4
  `,"\r"]);N0.NEWLINE_REGEXP=/\r\n|[\n\r]/g;function QY($,X){for(let Q=X??0;Q<$.length;Q++){if($[Q]===10)return{preceding:Q,index:Q+1,carriage:!1};if($[Q]===13)return{preceding:Q,index:Q+1,carriage:!0}}return null}function I7($){for(let J=0;J<$.length-1;J++){if($[J]===10&&$[J+1]===10)return J+2;if($[J]===13&&$[J+1]===13)return J+2;if($[J]===13&&$[J+1]===10&&J+3<$.length&&$[J+2]===13&&$[J+3]===10)return J+4}return-1}var n6={off:0,error:200,warn:300,info:400,debug:500},YX=($,X,Y)=>{if(!$)return;if(Z7(n6,$))return $;G$(Y).warn(`${X} was set to ${JSON.stringify($)}, expected one of ${JSON.stringify(Object.keys(n6))}`);return};function P8(){}function i6($,X,Y){if(!X||n6[$]>n6[Y])return P8;else return X[$].bind(X)}var WY={error:P8,warn:P8,info:P8,debug:P8},v7=new WeakMap;function G$($){let X=$.logger,Y=$.logLevel??"off";if(!X)return WY;let J=v7.get(X);if(J&&J[0]===Y)return J[1];let Q={error:i6("error",X,Y),warn:i6("warn",X,Y),info:i6("info",X,Y),debug:i6("debug",X,Y)};return v7.set(X,[Y,Q]),Q}var $0=($)=>{if($.options)$.options={...$.options},delete $.options.headers;if($.headers)$.headers=Object.fromEntries(($.headers instanceof Headers?[...$.headers]:Object.entries($.headers)).map(([X,Y])=>[X,X.toLowerCase()==="x-api-key"||X.toLowerCase()==="authorization"||X.toLowerCase()==="cookie"||X.toLowerCase()==="set-cookie"?"***":Y]));if("retryOfRequestLogID"in $){if($.retryOfRequestLogID)$.retryOf=$.retryOfRequestLogID;delete $.retryOfRequestLogID}return $};var j8;class A${constructor($,X,Y){this.iterator=$,j8.set(this,void 0),this.controller=X,R(this,j8,Y,"f")}static fromSSEResponse($,X,Y){let J=!1,Q=Y?G$(Y):console;async function*W(){if(J)throw new f("Cannot iterate over a consumed stream, use `.tee()` to split the stream.");J=!0;let z=!1;try{for await(let G of zY($,X)){if(G.event==="completion")try{yield JSON.parse(G.data)}catch(V){throw Q.error("Could not parse message into JSON:",G.data),Q.error("From chunk:",G.raw),V}if(G.event==="message_start"||G.event==="message_delta"||G.event==="message_stop"||G.event==="content_block_start"||G.event==="content_block_delta"||G.event==="content_block_stop")try{yield JSON.parse(G.data)}catch(V){throw Q.error("Could not parse message into JSON:",G.data),Q.error("From chunk:",G.raw),V}if(G.event==="ping")continue;if(G.event==="error")throw new X$(void 0,l6(G.data)??G.data,void 0,$.headers)}z=!0}catch(G){if(e$(G))return;throw G}finally{if(!z)X.abort()}}return new A$(W,X,Y)}static fromReadableStream($,X,Y){let J=!1;async function*Q(){let z=new N0,G=T8($);for await(let V of G)for(let H of z.decode(V))yield H;for(let V of z.flush())yield V}async function*W(){if(J)throw new f("Cannot iterate over a consumed stream, use `.tee()` to split the stream.");J=!0;let z=!1;try{for await(let G of Q()){if(z)continue;if(G)yield JSON.parse(G)}z=!0}catch(G){if(e$(G))return;throw G}finally{if(!z)X.abort()}}return new A$(W,X,Y)}[(j8=new WeakMap,Symbol.asyncIterator)](){return this.iterator()}tee(){let $=[],X=[],Y=this.iterator(),J=(Q)=>{return{next:()=>{if(Q.length===0){let W=Y.next();$.push(W),X.push(W)}return Q.shift()}}};return[new A$(()=>J($),this.controller,M(this,j8,"f")),new A$(()=>J(X),this.controller,M(this,j8,"f"))]}toReadableStream(){let $=this,X;return $X({async start(){X=$[Symbol.asyncIterator]()},async pull(Y){try{let{value:J,done:Q}=await X.next();if(Q)return Y.close();let W=_8(JSON.stringify(J)+`
5
5
  `);Y.enqueue(W)}catch(J){Y.error(J)}},async cancel(){await X.return?.()}})}}async function*zY($,X){if(!$.body){if(X.abort(),typeof globalThis.navigator<"u"&&globalThis.navigator.product==="ReactNative")throw new f("The default react-native fetch implementation does not support streaming. Please use expo/fetch: https://docs.expo.dev/versions/latest/sdk/expo/#expofetch-api");throw new f("Attempted to iterate over a response with no body")}let Y=new y7,J=new N0,Q=T8($.body);for await(let W of GY(Q))for(let z of J.decode(W)){let G=Y.decode(z);if(G)yield G}for(let W of J.flush()){let z=Y.decode(W);if(z)yield z}}async function*GY($){let X=new Uint8Array;for await(let Y of $){if(Y==null)continue;let J=Y instanceof ArrayBuffer?new Uint8Array(Y):typeof Y==="string"?_8(Y):Y,Q=new Uint8Array(X.length+J.length);Q.set(X),Q.set(J,X.length),X=Q;let W;while((W=I7(X))!==-1)yield X.slice(0,W),X=X.slice(W)}if(X.length>0)yield X}class y7{constructor(){this.event=null,this.data=[],this.chunks=[]}decode($){if($.endsWith("\r"))$=$.substring(0,$.length-1);if(!$){if(!this.event&&!this.data.length)return null;let Q={event:this.event,data:this.data.join(`
@@ -99,4 +99,4 @@ ${Q.content}`:Q.content;continue}if(Q.role==="user"){let W=[];for(let z of Q.con
99
99
  `,wW=600000,d5=class{config;fetchFn;cache=new Map;constructor($){this.config=$,this.fetchFn=$.fetch??fetch}async discover($){let X=this.cache.get($);if(X&&X.expiresAt>Date.now())return X.data;let Y=`${this.config.instanceUrl}/api/graphql`;try{let J=await this.fetchFn(Y,{method:"POST",headers:{...this.config.getHeaders(),"Content-Type":"application/json"},body:JSON.stringify({query:qW,variables:{rootNamespaceId:$}})});if(!J.ok){let H=await J.text();throw new x({message:`Model discovery GraphQL request failed: ${J.status} ${J.statusText} - ${H}`,statusCode:J.status,responseBody:H})}let Q=await J.json();if(Q.errors&&Q.errors.length>0)throw new x({message:`Model discovery GraphQL errors: ${Q.errors.map((H)=>H.message).join(", ")}`});let W=Q.data?.aiChatAvailableModels,z=Q.data?.metadata,G=z?.featureFlags?.find((H)=>H.name==="ai_user_model_switching")?.enabled??!1,V={defaultModel:W?.defaultModel??null,selectableModels:W?.selectableModels??[],pinnedModel:W?.pinnedModel??null,modelSwitchingEnabled:G,instanceVersion:z?.version??null};return this.cache.set($,{data:V,expiresAt:Date.now()+wW}),V}catch(J){if(J instanceof x)throw J;throw new x({message:`Model discovery failed: ${J}`,cause:J})}}async getEffectiveModelRef($,X){let Y=await this.discover($);if(Y.pinnedModel)return Y.pinnedModel.ref;if(X&&Y.modelSwitchingEnabled){if(Y.selectableModels.some((Q)=>Q.ref===X))return X}return Y.defaultModel?.ref??null}invalidateCache(){this.cache.clear()}},NW=600000;function UW(){let $=process.env.XDG_CACHE_HOME||h6.join(c5.homedir(),".cache");return h6.join($,"opencode","gitlab-workflow-model-cache.json")}function FW($,X){let Y=(X||"https://gitlab.com").replace(/\/$/,"");return l5.createHash("sha256").update(`${$}\x00${Y}`).digest("hex").slice(0,12)}var p5=class{filePath;key;constructor($,X){this.filePath=UW(),this.key=FW($,X)}readAll(){try{if(!u$.existsSync(this.filePath))return{};let $=u$.readFileSync(this.filePath,"utf-8");return JSON.parse($)}catch{return{}}}writeAll($){try{let X=h6.dirname(this.filePath);u$.mkdirSync(X,{recursive:!0,mode:448}),u$.writeFileSync(this.filePath,JSON.stringify($,null,2),{mode:384})}catch{}}load(){return this.readAll()[this.key]??null}save($){let X=this.readAll();X[this.key]=$,this.writeAll(X)}isDiscoveryExpired(){let $=this.load();if(!$?.discovery||!$.updatedAt)return!0;return Date.now()-new Date($.updatedAt).getTime()>NW}saveDiscovery($,X){let Y=this.load();this.save({discovery:$,project:X!==void 0?X:Y?.project??null,selectedModelRef:Y?.selectedModelRef??null,selectedModelName:Y?.selectedModelName??null,updatedAt:new Date().toISOString()})}saveSelection($,X){let Y=this.load(),J=X;if(!J&&$&&Y?.discovery){let Q=Y.discovery;J=(Q.pinnedModel?.ref===$?Q.pinnedModel:Q.selectableModels.find((z)=>z.ref===$)??(Q.defaultModel?.ref===$?Q.defaultModel:null))?.name??null}this.save({discovery:Y?.discovery??null,project:Y?.project??null,selectedModelRef:$,selectedModelName:J,updatedAt:new Date().toISOString()})}clear(){let $=this.readAll();if(delete $[this.key],Object.keys($).length===0)try{if(u$.existsSync(this.filePath))u$.unlinkSync(this.filePath)}catch{}else this.writeAll($)}getSelectedModelRef(){return this.load()?.selectedModelRef??null}getSelectedModelName(){return this.load()?.selectedModelName??null}getDiscovery(){return this.load()?.discovery??null}};function B7($){if(!$||typeof $!=="object")return $;let X={};for(let[Y,J]of Object.entries($)){if(Y==="description"||Y==="examples"||Y==="default")continue;if(Y==="properties"&&typeof J==="object"&&J!==null){let Q={};for(let[W,z]of Object.entries(J))if(typeof z==="object"&&z!==null)Q[W]=B7(z);else Q[W]=z;X[Y]=Q}else if(Y==="items"&&typeof J==="object"&&J!==null)X[Y]=B7(J);else X[Y]=J}return X}function MW($){try{return JSON.stringify(B7(JSON.parse($)))}catch{return $}}function OW($){if(!$||typeof $!=="object")return $;let X={type:$.type||"object"};if($.required)X.required=$.required;if($.properties&&typeof $.properties==="object"){let Y={};for(let[J,Q]of Object.entries($.properties))if(typeof Q==="object"&&Q!==null){let W=Q;Y[J]={type:W.type||"string"}}else Y[J]={type:"string"};X.properties=Y}return X}function EW($){try{return JSON.stringify(OW(JSON.parse($)))}catch{return $}}var LW=class ${specificationVersion="v3";modelId;supportedUrls={};config;workflowOptions;tokenClient;projectDetector;modelDiscovery;modelCache;detectedProjectPath=null;sessionWorkflows=new Map;currentWorkflowId=null;currentWorkflowDefinition=null;persistedAgentEmitted=new Map;activeClients=new Set;_selectedModelRef;_selectedModelName;_rootNamespaceId;_discoveryPromise;get selectedModelRef(){return this._selectedModelRef??null}set selectedModelRef(X){this._selectedModelRef=X??void 0,this._selectedModelName=void 0,this.modelCache.saveSelection(X,null)}get selectedModelName(){return this._selectedModelName??null}set selectedModelName(X){this._selectedModelName=X??void 0,this.modelCache.saveSelection(this._selectedModelRef??null,X)}_toolExecutor=null;onUsageUpdate=null;sessionPreapprovedTools=[];sessionID="";set approvalHandler(X){this.workflowOptions.approvalHandler=X??void 0}get approvalHandler(){return this.workflowOptions.approvalHandler??null}onSelectModel=null;set systemPrompt(X){this.workflowOptions.systemPrompt=X??void 0}get systemPrompt(){return this.workflowOptions.systemPrompt??null}get toolExecutor(){return this._toolExecutor}set toolExecutor(X){if(X)try{let{AsyncResource:Y}=N7("async_hooks");this._toolExecutor=Y.bind(X)}catch{this._toolExecutor=X}else this._toolExecutor=null}constructor(X,Y,J={}){this.modelId=X,this.config=Y,this.workflowOptions=J;let Q=J.workingDirectory??process.cwd();this.modelCache=new p5(Q,Y.instanceUrl);let W=this.modelCache.load();if(W?.selectedModelRef)this._selectedModelRef=W.selectedModelRef;if(W?.selectedModelName)this._selectedModelName=W.selectedModelName;this.tokenClient=new HW({instanceUrl:Y.instanceUrl,getHeaders:Y.getHeaders,refreshApiKey:Y.refreshApiKey,fetch:Y.fetch,featureFlags:Y.featureFlags}),this.projectDetector=new u5({instanceUrl:Y.instanceUrl,getHeaders:Y.getHeaders,fetch:Y.fetch}),this.modelDiscovery=new d5({instanceUrl:Y.instanceUrl,getHeaders:Y.getHeaders,fetch:Y.fetch})}get provider(){return this.config.provider}async resolveProjectId(){if(this.workflowOptions.projectId)return this.workflowOptions.projectId;if(this.detectedProjectPath)return this.detectedProjectPath;let X=this.workflowOptions.workingDirectory??process.cwd(),Y=await this.projectDetector.detectProject(X);if(Y)return this.detectedProjectPath=Y.pathWithNamespace,Y.pathWithNamespace;return}async resolveRootNamespaceId(){if(this.workflowOptions.rootNamespaceId)return this.workflowOptions.rootNamespaceId;if(this._rootNamespaceId!==void 0)return this._rootNamespaceId;let X=this.workflowOptions.workingDirectory??process.cwd(),Y=await this.projectDetector.detectProject(X);if(Y?.namespaceId){let J=`gid://gitlab/Group/${Y.namespaceId}`;return this._rootNamespaceId=J,J}return this._rootNamespaceId=null,null}async resolveModelRef(){let X=sQ(this.modelId);if(this.modelId!=="duo-workflow")return X??"default";if(this._selectedModelRef)return this._selectedModelRef;if(!this._discoveryPromise)this._discoveryPromise=this.doResolveModelRef(),this._discoveryPromise.finally(()=>{this._discoveryPromise=void 0});return this._discoveryPromise}async doResolveModelRef(){let X=await this.resolveRootNamespaceId();if(!X)return this._selectedModelRef="default","default";try{let Y=await this.modelDiscovery.discover(X);if(this.modelCache.saveDiscovery(Y),Y.pinnedModel)return this._selectedModelRef=Y.pinnedModel.ref,this._selectedModelName=Y.pinnedModel.name,this.modelCache.saveSelection(Y.pinnedModel.ref,Y.pinnedModel.name),Y.pinnedModel.ref;let J=this.onSelectModel??this.workflowOptions.onSelectModel;if(Y.selectableModels.length>0&&J){let Q=await J(Y.selectableModels);if(Q){let W=Y.selectableModels.find((z)=>z.ref===Q);if(W)return this._selectedModelRef=W.ref,this._selectedModelName=W.name,this.modelCache.saveSelection(W.ref,W.name),W.ref}}if(Y.defaultModel)return this._selectedModelRef=Y.defaultModel.ref,this._selectedModelName=Y.defaultModel.name,this.modelCache.saveSelection(Y.defaultModel.ref,Y.defaultModel.name),Y.defaultModel.ref}catch{let Y=this.modelCache.load();if(Y?.selectedModelRef)return this._selectedModelRef=Y.selectedModelRef,this._selectedModelName=Y.selectedModelName??void 0,Y.selectedModelRef}return this._selectedModelRef="default","default"}async discoverModels(X){let Y=await this.modelDiscovery.discover(X);return this.modelCache.saveDiscovery(Y),Y}getModelCache(){return this.modelCache}stopWorkflow(){for(let X of this.activeClients)if(X.isConnected)X.stop()}resetWorkflow(X){if(X)this.sessionWorkflows.delete(X);else this.sessionWorkflows.clear(),this.currentWorkflowId=null,this.persistedAgentEmitted.clear()}get workflowId(){return this.currentWorkflowId}createUsage(X){return{inputTokens:{total:X?.inputTotal,noCache:X?.inputTotal,cacheRead:void 0,cacheWrite:void 0},outputTokens:{total:X?.outputTotal,text:X?.outputTotal,reasoning:void 0}}}createFinishReason(X,Y){return{unified:X,raw:Y}}async doGenerate(X){let{stream:Y}=await this.doStream(X),J=Y.getReader(),Q=[],W=[],z={unified:"other",raw:void 0},G=this.createUsage();try{while(!0){let{done:q,value:w}=await J.read();if(q)break;switch(w.type){case"text-delta":Q.push(w.delta);break;case"tool-call":W.push({type:"tool-call",toolCallId:w.toolCallId,toolName:w.toolName,input:w.input});break;case"finish":if(z=w.finishReason,w.usage)G=w.usage;break;case"error":throw w.error}}}finally{J.releaseLock()}let V=[],H=Q.join("");if(H)V.push({type:"text",text:H});return V.push(...W),{content:V,finishReason:z,usage:G,warnings:[]}}async doStream(X){let Y=this.extractGoalFromPrompt(X.prompt),J=await this.resolveModelRef(),Q=this.extractMcpTools(X),W=[...this.workflowOptions.preapprovedTools??Q.map((a)=>a.name),...this.sessionPreapprovedTools],z=this.buildAdditionalContext(X.prompt),G=this.toolExecutor??null,V=new Set(X.tools?.map((a)=>a.name)??[]),H=X.providerOptions?.gitlab,q=H?.workflowDefinition??this.workflowOptions.workflowDefinition,w=H?.flowConfig??void 0,B=H?.flowConfigSchemaVersion??void 0,U=H?.aiCatalogItemVersionId??void 0;await this.tokenClient.getToken(q??y6,this.workflowOptions.rootNamespaceId);let O=await this.resolveProjectId(),P=w??q??y6,j=this.sessionID,L=this.sessionWorkflows.get(j);if(L&&L.workflowDefinition!==P)this.sessionWorkflows.delete(j),L=void 0;let A=j==="";if(A&&this.currentWorkflowId&&this.currentWorkflowDefinition!==P)this.currentWorkflowId=null,this.currentWorkflowDefinition=null;let E;if(L)E=L.workflowId;else if(A&&this.currentWorkflowId)E=this.currentWorkflowId;else if(E=await this.tokenClient.createWorkflow(Y,{projectId:O,namespaceId:this.workflowOptions.namespaceId,workflowDefinition:q,agentPrivileges:this.workflowOptions.agentPrivileges,aiCatalogItemVersionId:U}),A)this.currentWorkflowId=E,this.currentWorkflowDefinition=P;else this.sessionWorkflows.set(j,{workflowId:E,workflowDefinition:P,agentEmitted:new Map,toolEntries:new Set}),L=this.sessionWorkflows.get(j);let _=new x5;this.activeClients.add(_);let c=0,n={streamClosed:!1,streamedInputChars:0,streamedOutputChars:0,pendingToolCount:0,approvalPending:!1,deferredClose:null,activeTextBlockId:null,agentMessageEmitted:new Map(L?.agentEmitted??this.persistedAgentEmitted),currentAgentMessageId:"",activeClient:_,processedRequestIDs:new Set,emittedToolEntries:new Set(L?.toolEntries),emittedToolKeys:new Set,sessionKey:j};for(let a of X.prompt)if(a.role==="system")n.streamedInputChars+=a.content.length;else if(a.role==="user"){for(let u of a.content)if(u.type==="text")n.streamedInputChars+=u.text.length}let p;return{stream:new ReadableStream({start:async(a)=>{try{await _.connect({instanceUrl:this.config.instanceUrl,modelRef:J,headers:this.config.getHeaders(),projectId:this.workflowOptions.projectId,namespaceId:this.workflowOptions.namespaceId,rootNamespaceId:this.workflowOptions.rootNamespaceId,aiCatalogItemVersionId:U,workflowDefinition:q??this.workflowOptions.workflowDefinition},(s4)=>{this.handleWorkflowEvent(n,s4,a,_,G,()=>`text-${c++}`,V,p,{aiCatalogItemVersionId:U,workflowDefinition:q??this.workflowOptions.workflowDefinition})});let u=q??y6,x$=this.workflowOptions.clientCapabilities??$W,u6=await this.buildWorkflowMetadata(),w2=JSON.stringify(u6),d6=JSON.stringify({workflowID:E,clientVersion:K7,workflowDefinition:u,goal:Y,workflowMetadata:w2,clientCapabilities:x$,preapproved_tools:W}).length+100,r4=this.trimPayload(Q,z,d6),r5=W.filter((s4)=>r4.mcpTools.some((s5)=>s5.name===s4));p={workflowID:E,clientVersion:K7,workflowDefinition:u,goal:Y,workflowMetadata:w2,additional_context:r4.additionalContext,clientCapabilities:x$,mcpTools:r4.mcpTools,preapproved_tools:r5};let M7=w??this.workflowOptions.flowConfig,O7=B??this.workflowOptions.flowConfigSchemaVersion;if(M7)p.flowConfig=M7;if(O7)p.flowConfigSchemaVersion=O7;else if(p.flowConfig)p.flowConfigSchemaVersion="v1";_.sendStartRequest(p),a.enqueue({type:"stream-start",warnings:[]}),a.enqueue({type:"response-metadata",id:E,modelId:J})}catch(u){if(!n.streamClosed)a.enqueue({type:"error",error:u instanceof x?u:new x({message:`Workflow connection failed: ${u}`,cause:u})}),n.streamClosed=!0,a.close()}},cancel:(a)=>{if(_.stop(),_.close(),this.activeClients.delete(_),n.activeClient=null,!n.streamClosed)if(n.sessionKey)this.sessionWorkflows.delete(n.sessionKey);else this.currentWorkflowId=null}}),request:{body:{workflowId:E,modelRef:J,goal:Y}}}}handleWorkflowEvent(X,Y,J,Q,W,z,G,V,H){if(X.streamClosed)return;switch(Y.type){case"checkpoint":{this.processCheckpoint(X,Y.data,J,z);break}case"tool-request":{let{requestID:q,data:w}=Y;if(X.processedRequestIDs.has(q))break;X.processedRequestIDs.add(q),X.emittedToolKeys.add(w.name);let B;try{JSON.parse(w.args),B=w.args}catch{B=w.args||"{}"}if(X.activeTextBlockId)J.enqueue({type:"text-end",id:X.activeTextBlockId}),X.activeTextBlockId=null;J.enqueue({type:"tool-input-start",id:q,toolName:w.name,providerExecuted:!0}),J.enqueue({type:"tool-input-delta",id:q,delta:B}),J.enqueue({type:"tool-input-end",id:q}),J.enqueue({type:"tool-call",toolCallId:q,toolName:w.name,input:B,providerExecuted:!0}),this.executeToolAndRespond(X,Q,J,q,w.name,B,W).catch(()=>{});break}case"builtin-tool-request":{if(X.processedRequestIDs.has(Y.requestID))break;X.processedRequestIDs.add(Y.requestID);let q=WW(Y.toolName,Y.data,G);X.emittedToolKeys.add(q.toolName);let w=JSON.stringify(q.args);if(X.activeTextBlockId)J.enqueue({type:"text-end",id:X.activeTextBlockId}),X.activeTextBlockId=null;J.enqueue({type:"tool-input-start",id:Y.requestID,toolName:q.toolName,providerExecuted:!0}),J.enqueue({type:"tool-input-delta",id:Y.requestID,delta:w}),J.enqueue({type:"tool-input-end",id:Y.requestID}),J.enqueue({type:"tool-call",toolCallId:Y.requestID,toolName:q.toolName,input:w,providerExecuted:!0}),this.executeToolAndRespond(X,Q,J,Y.requestID,q.toolName,w,W).catch(()=>{});break}case"approval-required":{X.approvalPending=!0,this.approveAndResume(X,Y.tools,V,J,W,z,G,H).catch((q)=>{if(X.approvalPending=!1,X.deferredClose){let w=X.deferredClose;X.deferredClose=null,w()}});break}case"completed":{if(X.activeTextBlockId)J.enqueue({type:"text-end",id:X.activeTextBlockId}),X.activeTextBlockId=null;let q=()=>{if(X.streamClosed)return;let w=Math.ceil(X.streamedInputChars/4),B=Math.ceil(X.streamedOutputChars/4);J.enqueue({type:"finish",finishReason:this.createFinishReason("stop","completed"),usage:this.createUsage({inputTotal:w,outputTotal:B})}),X.streamClosed=!0,J.close(),this.cleanupClient(X,!1)};if(X.pendingToolCount>0||X.approvalPending)X.deferredClose=q;else X.deferredClose=null,q();break}case"failed":{if(X.activeTextBlockId)J.enqueue({type:"text-end",id:X.activeTextBlockId}),X.activeTextBlockId=null;J.enqueue({type:"error",error:new x({message:`Workflow failed: ${g6(Y.error.message)}`,cause:Y.error})}),X.streamClosed=!0,J.close(),this.cleanupClient(X,!0);break}case"closed":{if(X.streamClosed)break;if(X.activeTextBlockId)J.enqueue({type:"text-end",id:X.activeTextBlockId}),X.activeTextBlockId=null;let q=()=>{if(X.streamClosed)return;if(Y.code!==1000)J.enqueue({type:"error",error:new x({message:`WebSocket closed unexpectedly: code=${Y.code} reason=${g6(Y.reason)}`,statusCode:Y.code})}),X.streamClosed=!0,J.close(),this.cleanupClient(X,!0);else{let w=Math.ceil(X.streamedInputChars/4),B=Math.ceil(X.streamedOutputChars/4);J.enqueue({type:"finish",finishReason:this.createFinishReason("stop","closed"),usage:this.createUsage({inputTotal:w,outputTotal:B})}),X.streamClosed=!0,J.close(),this.cleanupClient(X,!1)}};if(X.pendingToolCount>0||X.approvalPending)X.deferredClose=q;else X.deferredClose=null,q();break}}}processCheckpoint(X,Y,J,Q){if(!Y.checkpoint){if(Y.content){if(!X.activeTextBlockId)X.activeTextBlockId=Q(),J.enqueue({type:"text-start",id:X.activeTextBlockId});J.enqueue({type:"text-delta",id:X.activeTextBlockId,delta:Y.content}),X.streamedOutputChars+=Y.content.length}return}let W;try{W=JSON.parse(Y.checkpoint)}catch(G){return}let z=W.channel_values?.ui_chat_log;if(!z||!Array.isArray(z)||z.length===0)return;if(Y.status!=="RUNNING"&&Y.status!=="INPUT_REQUIRED"&&Y.status!=="FINISHED"&&Y.status!=="COMPLETED"&&Y.status!=="TOOL_CALL_APPROVAL_REQUIRED")return;for(let G=0;G<z.length;G++){let V=z[G];if(V.message_type==="tool"&&V.tool_info){let P=V.message_id||V.correlation_id||`tool-${G}`;if(X.emittedToolEntries.has(P))continue;let j=V.tool_info.name,L=JSON.stringify(V.tool_info.args??{});if(X.emittedToolKeys.has(j)){X.emittedToolEntries.add(P);let c=this.sessionWorkflows.get(X.sessionKey);if(c)c.toolEntries.add(P);continue}if(X.activeTextBlockId)J.enqueue({type:"text-end",id:X.activeTextBlockId}),X.activeTextBlockId=null;J.enqueue({type:"tool-input-start",id:P,toolName:j,providerExecuted:!0}),J.enqueue({type:"tool-input-delta",id:P,delta:L}),J.enqueue({type:"tool-input-end",id:P}),J.enqueue({type:"tool-call",toolCallId:P,toolName:j,input:L,providerExecuted:!0,dynamic:!0});let A=V.tool_info.tool_response,E=typeof A==="string"?A:A?A.content:V.content||"";J.enqueue({type:"tool-result",toolCallId:P,toolName:j,result:{output:E,title:j,metadata:{}},isError:!1}),X.emittedToolEntries.add(P);let _=this.sessionWorkflows.get(X.sessionKey);if(_)_.toolEntries.add(P);continue}if(V.message_type!=="agent")continue;let H=V.content||"",q=V.message_id||`idx-${G}`,w=X.agentMessageEmitted.get(q)??0;if(H.length<=w)continue;let B=H.slice(w);if(q!==X.currentAgentMessageId&&X.activeTextBlockId)J.enqueue({type:"text-end",id:X.activeTextBlockId}),X.activeTextBlockId=null;if(!X.activeTextBlockId)X.activeTextBlockId=Q(),J.enqueue({type:"text-start",id:X.activeTextBlockId});J.enqueue({type:"text-delta",id:X.activeTextBlockId,delta:B}),X.streamedOutputChars+=B.length,X.agentMessageEmitted.set(q,H.length),(this.sessionWorkflows.get(X.sessionKey)?.agentEmitted??this.persistedAgentEmitted).set(q,H.length),X.currentAgentMessageId=q}}async executeToolAndRespond(X,Y,J,Q,W,z,G){X.pendingToolCount++;let V=(H)=>{if(X.streamClosed)return;try{J.enqueue(H)}catch{}};try{if(G){let H=await G(W,z,Q);if(H.error&&/^Unknown tool:/.test(H.error)){let U=zW(W,z);if(U)H=U}Y.sendActionResponse(Q,H.result,H.error),X.streamedInputChars+=z.length,X.streamedOutputChars+=H.result.length;let q=H.result,w=H.title??`${W} result`,B=H.metadata??{output:H.result};if(H.error){let U;if(typeof H.error==="string")U=H.error;else if(H.error&&typeof H.error==="object")U=JSON.stringify(H.error);else U=String(H.error);V({type:"tool-result",toolCallId:Q,toolName:W,result:U,isError:!0})}else V({type:"tool-result",toolCallId:Q,toolName:W,result:{output:q,title:w,metadata:B},isError:!1})}else{let H=`Tool executor not configured for tool: ${W}`;Y.sendActionResponse(Q,"",H),V({type:"tool-result",toolCallId:Q,toolName:W,result:H,isError:!0})}}catch(H){let q=H instanceof Error?H.message:String(H),w=g6(q);Y.sendActionResponse(Q,"",w),V({type:"tool-result",toolCallId:Q,toolName:W,result:w,isError:!0})}finally{if(X.pendingToolCount--,this.onUsageUpdate)try{this.onUsageUpdate({inputTokens:Math.ceil(X.streamedInputChars/4),outputTokens:Math.ceil(X.streamedOutputChars/4)})}catch{}if(X.pendingToolCount<=0&&X.deferredClose){let H=X.deferredClose;X.deferredClose=null,H()}}}cleanupClient(X,Y=!1){if(X.activeClient)X.activeClient.close(),this.activeClients.delete(X.activeClient),X.activeClient=null;if(Y)if(X.sessionKey)this.sessionWorkflows.delete(X.sessionKey);else this.currentWorkflowId=null,this.persistedAgentEmitted.clear()}async approveAndResume(X,Y,J,Q,W,z,G,V){let H=this.workflowOptions.approvalHandler;if(!H||!J){if(X.approvalPending=!1,X.deferredClose){let P=X.deferredClose;X.deferredClose=null,P()}return}let q;try{q=await H(Y)}catch(P){if(X.approvalPending=!1,!X.streamClosed)Q.error(P);return}X.approvalPending=!1,X.deferredClose=null,this.cleanupClient(X,!1);let w=q.approved?{approval:{tool_name:Y[0]?.name,tool_args_json:Y[0]?.args}}:{rejection:{message:q.message??"User rejected"}},B={...J,approval:w,preapproved_tools:q.approved?[...J.preapproved_tools??[],...Y.map((P)=>P.name)]:J.preapproved_tools??[]},U=new x5;this.activeClients.add(U),X.activeClient=U;let O=await this.resolveModelRef();try{await U.connect({instanceUrl:this.config.instanceUrl,modelRef:O,headers:this.config.getHeaders(),projectId:this.workflowOptions.projectId,namespaceId:this.workflowOptions.namespaceId,rootNamespaceId:this.workflowOptions.rootNamespaceId,aiCatalogItemVersionId:V?.aiCatalogItemVersionId,workflowDefinition:V?.workflowDefinition},(P)=>this.handleWorkflowEvent(X,P,Q,U,W,z,G,B,V)),U.sendStartRequest(B)}catch(P){if(this.cleanupClient(X,!0),!X.streamClosed)Q.error(P)}}async buildWorkflowMetadata(){let X={extended_logging:!1,tool_approval_for_session_enabled:!0};try{let Y=this.workflowOptions.workingDirectory??process.cwd(),J=await this.getGitInfo(Y);if(J.url)X.git_url=J.url;if(J.sha)X.git_sha=J.sha;if(J.branch)X.git_branch=J.branch}catch{}return X}async getGitInfo(X){let{execFile:Y}=await import("child_process"),{promisify:J}=await import("util"),Q=J(Y),W={cwd:X,timeout:3000},z=async(q,w)=>{try{let{stdout:B}=await Q(q,w,W);return B.trim()||void 0}catch{return}},[G,V,H]=await Promise.all([z("git",["remote","get-url","origin"]),z("git",["rev-parse","HEAD"]),z("git",["rev-parse","--abbrev-ref","HEAD"])]);return{url:G,sha:V,branch:H}}static SYSTEM_REMINDER_RE=/<system-reminder>([\s\S]*?)<\/system-reminder>/g;extractGoalFromPrompt(X){for(let Y=X.length-1;Y>=0;Y--){let J=X[Y];if(J.role==="user"){let Q=J.content.filter((W)=>W.type==="text").map((W)=>W.text);if(Q.length>0){let W=Q.join(`
100
100
  `);return W.replace($.SYSTEM_REMINDER_RE,"").trim()||W}}}return""}extractMcpTools(X){if(this.workflowOptions.mcpTools&&this.workflowOptions.mcpTools.length>0)return this.workflowOptions.mcpTools;if(!X.tools||X.tools.length===0)return[];return X.tools.filter((Y)=>Y.type==="function").map((Y)=>({name:Y.name,description:Y.description||"",inputSchema:JSON.stringify(Y.inputSchema||{type:"object",properties:{}})}))}static MAX_START_REQUEST_BYTES=4194304;trimPayload(X,Y,J){let Q=$.MAX_START_REQUEST_BYTES-J,W=JSON.stringify(Y);if(JSON.stringify(X).length+W.length<=Q)return{mcpTools:X,additionalContext:Y};let V=X.map((U)=>({name:U.name,description:U.description,inputSchema:MW(U.inputSchema)}));if(JSON.stringify(V).length+W.length<=Q)return{mcpTools:V,additionalContext:Y};let q=V.map((U)=>({name:U.name,description:U.description,inputSchema:EW(U.inputSchema)}));if(JSON.stringify(q).length+W.length<=Q)return{mcpTools:q,additionalContext:Y};let B=[...q];while(B.length>0){if(JSON.stringify(B).length+W.length<=Q)break;B.pop()}return{mcpTools:B,additionalContext:Y}}buildAdditionalContext(X){let Y=[];if(this.workflowOptions.additionalContext)Y.push(...this.workflowOptions.additionalContext);for(let J of X)if(J.role==="system")Y.push({category:"system_prompt",content:J.content,metadata:JSON.stringify({role:"system"})});else if(J.role==="assistant"){let Q=J.content.filter((W)=>W.type==="text").map((W)=>W.text).join(`
101
101
  `);if(Q)Y.push({category:"conversation",content:Q,metadata:JSON.stringify({role:"assistant"})})}else if(J.role==="user"){for(let Q of J.content)if(Q.type==="text"){let z=Q.text.matchAll($.SYSTEM_REMINDER_RE);for(let G of z){let V=G[1].trim();if(V)Y.push({category:"agent_context",content:V,metadata:JSON.stringify({source:"system-reminder"})})}}}return Y}},ZW="1d89f9fdb23ee96d4e603201f6861dab6e143c5c3c00469a018a2d94bdc03d4e",vE="36f2a70cddeb5a0889d4fd8295c241b7e9848e89cf9e599d0eed2d8e5350fbf5",SW="https://gitlab.com",AW=300000,yE=["api"],CW=class{fetch;constructor($=fetch){this.fetch=$}isTokenExpired($){return Date.now()>=$}needsRefresh($){return Date.now()>=$-AW}async refreshIfNeeded($,X){if(!this.needsRefresh($.expiresAt))return $;if(this.isTokenExpired($.expiresAt))throw new x({message:"OAuth token has expired and cannot be used"});return this.exchangeRefreshToken({instanceUrl:$.instanceUrl,refreshToken:$.refreshToken,clientId:X})}async exchangeAuthorizationCode($){let{instanceUrl:X,code:Y,codeVerifier:J,clientId:Q,redirectUri:W}=$,z=await this.exchangeToken({instanceUrl:X,grantType:"authorization_code",code:Y,codeVerifier:J,clientId:Q||this.getClientId(X),redirectUri:W});return this.createTokensFromResponse(z,X)}async exchangeRefreshToken($){let{instanceUrl:X,refreshToken:Y,clientId:J}=$,Q=await this.exchangeToken({instanceUrl:X,grantType:"refresh_token",refreshToken:Y,clientId:J||this.getClientId(X)});return this.createTokensFromResponse(Q,X)}getClientId($){let X=process.env.GITLAB_OAUTH_CLIENT_ID;if(X)return X;if($===SW)return ZW;throw new x({message:`No OAuth client ID configured for instance ${$}. Please provide a clientId parameter or set GITLAB_OAUTH_CLIENT_ID environment variable.`})}async exchangeToken($){let{instanceUrl:X,grantType:Y,code:J,codeVerifier:Q,refreshToken:W,clientId:z,redirectUri:G}=$,V={client_id:z,grant_type:Y};if(Y==="authorization_code"){if(!J||!Q||!G)throw new x({message:"Authorization code, code verifier, and redirect URI are required for authorization_code grant"});V.code=J,V.code_verifier=Q,V.redirect_uri=G}else if(Y==="refresh_token"){if(!W)throw new x({message:"Refresh token is required for refresh_token grant"});V.refresh_token=W}let H=`${X}/oauth/token`;try{let q=await this.fetch(H,{method:"POST",headers:{"Content-Type":"application/x-www-form-urlencoded"},body:new URLSearchParams(V).toString()});if(!q.ok){let B=await q.text();throw new x({message:`OAuth token exchange failed: ${q.status} ${q.statusText}`,cause:Error(B)})}return await q.json()}catch(q){if(q instanceof x)throw q;throw new x({message:`Failed to exchange OAuth token: ${q instanceof Error?q.message:String(q)}`,cause:q instanceof Error?q:void 0})}}createTokensFromResponse($,X){let Y=this.createExpiresTimestamp($);return{accessToken:$.access_token,refreshToken:$.refresh_token||"",expiresAt:Y,instanceUrl:X}}createExpiresTimestamp($){let X=$.created_at*1000,Y=$.expires_in*1000;return X+Y}};function n5(){let $=i5.homedir(),X=process.env.XDG_DATA_HOME;if(X)return a4.join(X,"opencode","auth.json");if(process.platform!=="win32")return a4.join($,".local","share","opencode","auth.json");return a4.join($,".opencode","auth.json")}async function DW($){try{let X=n5();if(!q2.existsSync(X))return;let Y=JSON.parse(q2.readFileSync(X,"utf-8"));if(Y.gitlab?.type==="oauth"){let W=Y.gitlab;if(W.enterpriseUrl===$||W.enterpriseUrl===$.replace(/\/$/,""))return W}let J=$.replace(/\/$/,"");return Y[J]||Y[`${J}/`]}catch(X){throw Error(`Failed to load auth.json: ${X instanceof Error?X.message:X}`)}}async function v5($,X,Y){if($.apiKey)return $.apiKey;let J=await DW(X);if(J?.type==="oauth"){let W=new CW;if(W.needsRefresh(J.expires))try{let z=await W.exchangeRefreshToken({instanceUrl:X,refreshToken:J.refresh,clientId:Y}),G=n5(),V=JSON.parse(q2.readFileSync(G,"utf-8"));return V.gitlab={type:"oauth",refresh:z.refreshToken,access:z.accessToken,expires:z.expiresAt,enterpriseUrl:X},q2.writeFileSync(G,JSON.stringify(V,null,2),{mode:384}),z.accessToken}catch(z){let G=z instanceof Error?z.message:String(z),V=process.env[$.environmentVariableName];if(V)return V;throw new x({message:`OAuth token refresh failed and no fallback ${$.environmentVariableName} environment variable is set. Refresh error: ${G}. Re-authenticate with 'opencode auth login gitlab' or set ${$.environmentVariableName}.`})}else return J.access}let Q=process.env[$.environmentVariableName];if(!Q)throw new x({message:`${$.description} API key is missing. Pass it as the 'apiKey' parameter, set the ${$.environmentVariableName} environment variable, or authenticate with 'opencode auth login gitlab'.`});return Q}function RW($,X){let Y=$["User-Agent"];return{...$,"User-Agent":Y?`${Y} ${X}`:X}}function TW($={}){let X=$.instanceUrl??process.env.GITLAB_INSTANCE_URL??"https://gitlab.com",Y=$.name??"gitlab",J,Q,W=async()=>{if(J)return J;if(Q)return Q;return Q=v5({apiKey:$.apiKey,environmentVariableName:"GITLAB_TOKEN",description:"GitLab"},X,$.clientId),J=await Q,Q=void 0,J},z=async()=>{J=void 0,Q=void 0,J=await v5({apiKey:void 0,environmentVariableName:"GITLAB_TOKEN",description:"GitLab"},X,$.clientId)},G=()=>{let B=J||$.apiKey||process.env.GITLAB_TOKEN||"";if(!B)throw new x({message:"GitLab API key is missing. Pass it as the 'apiKey' parameter, set the GITLAB_TOKEN environment variable, or authenticate with 'opencode auth login gitlab'."});return RW({Authorization:`Bearer ${B}`,"Content-Type":"application/json",...$.headers},`ai-sdk-gitlab/${H7}`)};W().catch(()=>{});let V=(B,U)=>{let O=j5(B);if(!O)throw new x({message:`Unknown model ID: ${B}. Model must be registered in MODEL_MAPPINGS.`});if(U?.providerModel){let E=iQ(O.provider);if(!E.includes(U.providerModel))throw new x({message:`Invalid providerModel '${U.providerModel}' for provider '${O.provider}'. Valid models: ${E.join(", ")}`})}let P={DuoAgentPlatformNext:!0,...$.featureFlags,...U?.featureFlags},L={...{"User-Agent":`gitlab-ai-provider/${H7}`},...$.aiGatewayHeaders,...U?.aiGatewayHeaders},A={provider:`${Y}.agentic`,instanceUrl:X,getHeaders:G,refreshApiKey:z,fetch:$.fetch,maxTokens:U?.maxTokens,featureFlags:P,aiGatewayUrl:$.aiGatewayUrl,aiGatewayHeaders:L};if(O.provider==="openai")return new tQ(B,{...A,openaiModel:U?.providerModel??O.model});return new pQ(B,{...A,anthropicModel:U?.providerModel??O.model})},H=(B,U)=>{let O=j5(B);if(!O||O.provider!=="workflow")throw new x({message:`Unknown workflow model ID: ${B}. Use 'duo-workflow' or a 'duo-workflow-*' model ID.`});return new LW(B,{provider:`${Y}.workflow`,instanceUrl:X,getHeaders:G,refreshApiKey:z,fetch:$.fetch,featureFlags:{...$.featureFlags,...U?.featureFlags},aiGatewayUrl:$.aiGatewayUrl},U)},q=(B)=>{if(rQ(B))return H(B);return V(B)},w=Object.assign((B)=>q(B),{specificationVersion:"v3",languageModel:q,chat:q,agenticChat:V,workflowChat:H});return w.embeddingModel=(B)=>{throw new x({message:`GitLab provider does not support text embedding models. Model ID: ${B}`})},w.imageModel=(B)=>{throw new x({message:`GitLab provider does not support image models. Model ID: ${B}`})},w}var gE=TW(),_W="https://gitlab.com/gitlab-org/modelops/applied-ml/code-suggestions/ai-assist/-/raw/main/ai_gateway/model_selection/models.yml",PW=86400000,q7=200000,w7=64000;function U7(){let $=process.env.XDG_CACHE_HOME||m6.join(a5.homedir(),".cache");return m6.join($,"opencode","gitlab-model-configs.json")}function jW(){try{let $=U7();if(!d$.existsSync($))return null;let X=d$.readFileSync($,"utf-8");return JSON.parse(X)}catch{return null}}function kW($){try{let X=U7(),Y=m6.dirname(X);d$.mkdirSync(Y,{recursive:!0,mode:448});let J={configs:Object.fromEntries($),updatedAt:new Date().toISOString()};d$.writeFileSync(X,JSON.stringify(J,null,2),{mode:384})}catch{}}function y5($){let X=jW();if(!X)return null;let Y=new Date(X.updatedAt).getTime();if(Date.now()-Y>$)return null;return{configs:new Map(Object.entries(X.configs)),writtenAt:Y}}var xW=class{url;ttlMs;fetchFn;memCache=null;memExpiresAt=0;pending=null;constructor($){this.url=$?.url??_W,this.ttlMs=$?.ttlMs??PW,this.fetchFn=$?.fetch??fetch}async getConfigs(){if(this.memCache&&Date.now()<this.memExpiresAt)return this.memCache;let $=y5(this.ttlMs);if($)return this.memCache=$.configs,this.memExpiresAt=$.writtenAt+this.ttlMs,$.configs;if(this.pending)return this.pending;this.pending=this.fetchConfigs();try{return await this.pending}finally{this.pending=null}}async getConfig($){return(await this.getConfigs()).get($)??{context:q7,output:w7}}invalidateCache(){this.memCache=null,this.memExpiresAt=0;try{let $=U7();if(d$.existsSync($))d$.unlinkSync($)}catch{}}async fetchConfigs(){try{let $=await this.fetchFn(this.url);if(!$.ok)throw Error(`HTTP ${$.status}`);let X=await $.text(),Y=fW(X);return this.memCache=Y,this.memExpiresAt=Date.now()+this.ttlMs,kW(Y),Y}catch{return this.memCache??y5(1/0)?.configs??new Map}}};function fW($){let X=new Map,Y=null,J=0,Q=0,W=!1,z=-1;for(let G of $.split(`
102
- `)){let V=G.match(/^\s*gitlab_identifier:\s*"?([^"#\s]+)"?/);if(V){if(Y)X.set(Y,{context:J||q7,output:Q||w7});Y=V[1],J=0,Q=0,W=!1,z=-1}let H=G.match(/^\s*max_context_tokens:\s*([0-9_]+)/);if(H&&Y)J=parseInt(H[1].replace(/_/g,""),10);if(/^\s*params:\s*$/.test(G))W=!0,z=G.match(/^(\s*)/)?.[1].length??0;else if(W&&/^\s*\S+:/.test(G)){if((G.match(/^(\s*)/)?.[1].length??0)<=z)W=!1,z=-1}if(W){let q=G.match(/^\s*max_tokens:\s*([0-9_]+)/);if(q&&Y)Q=parseInt(q[1].replace(/_/g,""),10)}}if(Y)X.set(Y,{context:J||q7,output:Q||w7});return X}var bW=new xW;async function g5($,X){let Y=await bW.getConfigs(),J=new Map;for(let[G,V]of Object.entries(o$))if(V.provider==="workflow"&&G!=="duo-workflow"&&G!=="duo-workflow-default")J.set(V.model,G);let Q=$.pinnedModel?[$.pinnedModel]:[...$.selectableModels??[],...$.defaultModel?[$.defaultModel]:[]],W=new Set,z=[];for(let G of Q){if(!G.ref||W.has(G.ref))continue;W.add(G.ref);let V=J.get(G.ref)??`duo-workflow-${G.ref.replace(/[/_]/g,"-")}`,H=Y.get(G.ref);z.push({id:V,ref:G.ref,name:G.name,context:H?.context??200000,output:H?.output??64000,pinned:!!$.pinnedModel&&$.pinnedModel.ref===G.ref})}return{models:z,project:X}}async function hE($,X){let Y=new p5(X.workingDirectory,$.instanceUrl);if(!Y.isDiscoveryExpired()){let V=Y.load();return g5(V.discovery,V.project)}let J=new u5({instanceUrl:$.instanceUrl,getHeaders:$.getHeaders,fetch:$.fetch}),Q=null;try{Q=await J.detectProject(X.workingDirectory)}catch{return{models:[],project:null}}let W=Q?.namespaceId;if(!W)return{models:[],project:Q};let G=await new d5({instanceUrl:$.instanceUrl,getHeaders:$.getHeaders,fetch:$.fetch}).discover(`gid://gitlab/Group/${W}`);if(Y.saveDiscovery(G,Q),!Y.getSelectedModelRef()){let V=G.pinnedModel??G.defaultModel;if(V)Y.saveSelection(V.ref,V.name)}return g5(G,Q)}export{x as Th,lQ as Uh,h5 as Vh,pQ as Wh,o$ as Xh,j5 as Yh,jE as Zh,iQ as _h,kE as $h,xE as ai,nQ as bi,aQ as ci,rQ as di,sQ as ei,fE as fi,tQ as gi,H7 as hi,oQ as ii,eQ as ji,k5 as ki,y6 as li,$W as mi,K7 as ni,U8 as oi,YW as pi,JW as qi,x5 as ri,HW as si,BW as ti,u5 as ui,d5 as vi,p5 as wi,LW as xi,ZW as yi,vE as zi,SW as Ai,AW as Bi,yE as Ci,CW as Di,TW as Ei,gE as Fi,xW as Gi,fW as Hi,hE as Ii};
102
+ `)){let V=G.match(/^\s*gitlab_identifier:\s*"?([^"#\s]+)"?/);if(V){if(Y)X.set(Y,{context:J||q7,output:Q||w7});Y=V[1],J=0,Q=0,W=!1,z=-1}let H=G.match(/^\s*max_context_tokens:\s*([0-9_]+)/);if(H&&Y)J=parseInt(H[1].replace(/_/g,""),10);if(/^\s*params:\s*$/.test(G))W=!0,z=G.match(/^(\s*)/)?.[1].length??0;else if(W&&/^\s*\S+:/.test(G)){if((G.match(/^(\s*)/)?.[1].length??0)<=z)W=!1,z=-1}if(W){let q=G.match(/^\s*max_tokens:\s*([0-9_]+)/);if(q&&Y)Q=parseInt(q[1].replace(/_/g,""),10)}}if(Y)X.set(Y,{context:J||q7,output:Q||w7});return X}var bW=new xW;async function g5($,X){let Y=await bW.getConfigs(),J=new Map;for(let[G,V]of Object.entries(o$))if(V.provider==="workflow"&&G!=="duo-workflow"&&G!=="duo-workflow-default")J.set(V.model,G);let Q=$.pinnedModel?[$.pinnedModel]:[...$.selectableModels??[],...$.defaultModel?[$.defaultModel]:[]],W=new Set,z=[];for(let G of Q){if(!G.ref||W.has(G.ref))continue;W.add(G.ref);let V=J.get(G.ref)??`duo-workflow-${G.ref.replace(/[/_]/g,"-")}`,H=Y.get(G.ref);z.push({id:V,ref:G.ref,name:G.name,context:H?.context??200000,output:H?.output??64000,pinned:!!$.pinnedModel&&$.pinnedModel.ref===G.ref})}return{models:z,project:X}}async function hE($,X){let Y=new p5(X.workingDirectory,$.instanceUrl);if(!Y.isDiscoveryExpired()){let V=Y.load();return g5(V.discovery,V.project)}let J=new u5({instanceUrl:$.instanceUrl,getHeaders:$.getHeaders,fetch:$.fetch}),Q=null;try{Q=await J.detectProject(X.workingDirectory)}catch{return{models:[],project:null}}let W=Q?.namespaceId;if(!W)return{models:[],project:Q};let G=await new d5({instanceUrl:$.instanceUrl,getHeaders:$.getHeaders,fetch:$.fetch}).discover(`gid://gitlab/Group/${W}`);if(Y.saveDiscovery(G,Q),!Y.getSelectedModelRef()){let V=G.pinnedModel??G.defaultModel;if(V)Y.saveSelection(V.ref,V.name)}return g5(G,Q)}export{x as Qh,lQ as Rh,h5 as Sh,pQ as Th,o$ as Uh,j5 as Vh,jE as Wh,iQ as Xh,kE as Yh,xE as Zh,nQ as _h,aQ as $h,rQ as ai,sQ as bi,fE as ci,tQ as di,H7 as ei,oQ as fi,eQ as gi,k5 as hi,y6 as ii,$W as ji,K7 as ki,U8 as li,YW as mi,JW as ni,x5 as oi,HW as pi,BW as qi,u5 as ri,d5 as si,p5 as ti,LW as ui,ZW as vi,vE as wi,SW as xi,AW as yi,yE as zi,CW as Ai,TW as Bi,gE as Ci,xW as Di,fW as Ei,hE as Fi};
@@ -1,2 +1,2 @@
1
1
  // @bun
2
- import{$i as p,Aj as Q,Bj as R,Mi as a,Ni as b,Oi as c,Pi as d,Qi as e,Ri as f,Si as g,Ti as h,Ui as i,Vi as j,Wi as k,Xi as l,Yi as m,Zi as n,_i as o,aj as q,bj as r,cj as s,dj as t,ej as u,fj as v,gj as w,hj as x,ij as y,jj as z,kj as A,lj as B,mj as C,nj as D,oj as E,pj as F,qj as G,rj as H,sj as I,tj as J,uj as K,vj as L,wj as M,xj as N,yj as O,zj as P}from"./chunk-hvcdemxe.js";import"./chunk-xtj5qqsw.js";import"./chunk-naq602da.js";export{Q as zodToJsonSchema,u as zodPatterns,g as setResponseValueAndErrors,O as selectParser,B as primitiveMappings,M as parseUnknownDef,C as parseUnionDef,L as parseUndefinedDef,K as parseTupleDef,v as parseStringDef,J as parseSetDef,w as parseRecordDef,N as parseReadonlyDef,I as parsePromiseDef,H as parsePipelineDef,G as parseOptionalDef,F as parseObjectDef,E as parseNumberDef,D as parseNullableDef,A as parseNullDef,z as parseNeverDef,y as parseNativeEnumDef,x as parseMapDef,t as parseLiteralDef,s as parseIntersectionDef,r as parseEnumDef,q as parseEffectsDef,p as parseDefaultDef,P as parseDef,o as parseDateDef,n as parseCatchDef,m as parseBrandedDef,l as parseBooleanDef,k as parseBigintDef,j as parseArrayDef,i as parseAnyDef,b as jsonDescription,a as ignoreOverride,h as getRelativePath,e as getRefs,d as getDefaultOptions,c as defaultOptions,R as default,f as addErrorMessage};
2
+ import{$i as v,Gi as a,Hi as b,Ii as c,Ji as d,Ki as e,Li as f,Mi as g,Ni as h,Oi as i,Pi as j,Qi as k,Ri as l,Si as m,Ti as n,Ui as o,Vi as p,Wi as q,Xi as r,Yi as s,Zi as t,_i as u,aj as w,bj as x,cj as y,dj as z,ej as A,fj as B,gj as C,hj as D,ij as E,jj as F,kj as G,lj as H,mj as I,nj as J,oj as K,pj as L,qj as M,rj as N,sj as O,tj as P,uj as Q,vj as R}from"./chunk-5rkmhzq0.js";import"./chunk-srf73nm4.js";import"./chunk-hh4c02fh.js";export{Q as zodToJsonSchema,u as zodPatterns,g as setResponseValueAndErrors,O as selectParser,B as primitiveMappings,M as parseUnknownDef,C as parseUnionDef,L as parseUndefinedDef,K as parseTupleDef,v as parseStringDef,J as parseSetDef,w as parseRecordDef,N as parseReadonlyDef,I as parsePromiseDef,H as parsePipelineDef,G as parseOptionalDef,F as parseObjectDef,E as parseNumberDef,D as parseNullableDef,A as parseNullDef,z as parseNeverDef,y as parseNativeEnumDef,x as parseMapDef,t as parseLiteralDef,s as parseIntersectionDef,r as parseEnumDef,q as parseEffectsDef,p as parseDefaultDef,P as parseDef,o as parseDateDef,n as parseCatchDef,m as parseBrandedDef,l as parseBooleanDef,k as parseBigintDef,j as parseArrayDef,i as parseAnyDef,b as jsonDescription,a as ignoreOverride,h as getRelativePath,e as getRefs,d as getDefaultOptions,c as defaultOptions,R as default,f as addErrorMessage};
@@ -0,0 +1,2 @@
1
+ // @bun
2
+ import{kg as a,lg as b,mg as c}from"./chunk-6j0365q3.js";import"./chunk-7mhffm9f.js";import"./chunk-r012q335.js";import"./chunk-0z3z0gk1.js";import"./chunk-g7vkkmsk.js";import"./chunk-m8djypsy.js";import"./chunk-w7p2x973.js";import"./chunk-wmw2gne9.js";import"./chunk-y3n31nnx.js";import"./chunk-3z1y040p.js";import"./chunk-kkvb2c2z.js";import"./chunk-3tdqsm5c.js";import"./chunk-a5zjrwqy.js";import"./chunk-fhng5her.js";import"./chunk-dkv2mg97.js";import"./chunk-bf146hz2.js";import"./chunk-t488d66k.js";import"./chunk-cqtkxwd8.js";import"./chunk-srf73nm4.js";import"./chunk-yzdty5t9.js";import"./chunk-1p34bx7c.js";import"./chunk-q3x4x2tq.js";import"./chunk-7dckfame.js";import"./chunk-tk3bve0x.js";import"./chunk-0w4v0fbs.js";import"./chunk-wf09j72q.js";import"./chunk-hbnr0j7h.js";import"./chunk-ep8zn49w.js";import"./chunk-f3kjp838.js";import"./chunk-tsn1jkr7.js";import"./chunk-zk8n8hnh.js";import"./chunk-1jh5p5qw.js";import"./chunk-kaeyhw2n.js";import"./chunk-f89gntcy.js";import"./chunk-bky5a42k.js";import"./chunk-r7xp0xcn.js";import"./chunk-6g3m7yxf.js";import"./chunk-v2kyarwz.js";import"./chunk-dkm7x8rj.js";import"./chunk-kc3hpmr2.js";import"./chunk-hh4c02fh.js";export{b as run,a as encodeDir,c as ClaudeImport};