@qitqode/qitqode-android-arm64 0.1.29 → 0.1.31

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (414) hide show
  1. package/bundle/{chunk-g06rv5fq.js → chunk-01my2y0c.js} +1 -1
  2. package/bundle/chunk-04n2ycg5.js +800 -0
  3. package/bundle/{chunk-k7dcfqjs.js → chunk-05mce0j3.js} +1 -1
  4. package/bundle/{chunk-3q6650we.js → chunk-0bbs01f0.js} +1 -1
  5. package/bundle/{chunk-1rn0vmvv.js → chunk-0dt0bxz6.js} +2 -2
  6. package/bundle/{chunk-x6nbck7p.js → chunk-0mx2psfc.js} +1 -1
  7. package/bundle/chunk-0p27fvfr.js +2 -0
  8. package/bundle/chunk-0qs1vx97.js +2 -0
  9. package/bundle/{chunk-8kz3n8ye.js → chunk-0v0vqbn5.js} +1 -1
  10. package/bundle/chunk-0w0ctb90.js +2 -0
  11. package/bundle/chunk-0yt5njh7.js +8 -0
  12. package/bundle/{chunk-fsy279s5.js → chunk-10bjs581.js} +2 -2
  13. package/bundle/{chunk-z29fwg61.js → chunk-11x3t2tt.js} +1 -1
  14. package/bundle/{chunk-qzjpea91.js → chunk-12vef2pr.js} +1 -1
  15. package/bundle/{chunk-kkae8ead.js → chunk-15hw2z9t.js} +1 -1
  16. package/bundle/chunk-1f7ajq8s.js +2 -0
  17. package/bundle/chunk-1fswr17z.js +2 -0
  18. package/bundle/{chunk-yt2k9ga8.js → chunk-1gx18dm5.js} +1 -1
  19. package/bundle/chunk-1rhhhm88.js +2 -0
  20. package/bundle/{chunk-b4qd109w.js → chunk-1sgahe1s.js} +1 -1
  21. package/bundle/{chunk-74zgcxeg.js → chunk-1vb79bw1.js} +1 -1
  22. package/bundle/chunk-1wbjh23g.js +2 -0
  23. package/bundle/chunk-20f83ca0.js +2 -0
  24. package/bundle/{chunk-ed723mw1.js → chunk-24jg9d61.js} +1 -1
  25. package/bundle/{chunk-csdm3n24.js → chunk-2hc5z7b5.js} +1 -1
  26. package/bundle/{chunk-bzrsnv2k.js → chunk-2maqde7w.js} +2 -2
  27. package/bundle/{chunk-awav98j0.js → chunk-2vn41ecx.js} +1 -1
  28. package/bundle/{chunk-50w28xj1.js → chunk-2zq4k837.js} +1 -1
  29. package/bundle/chunk-31mnd3ph.js +3 -0
  30. package/bundle/{chunk-a2qerqgd.js → chunk-31qrzrwy.js} +1 -1
  31. package/bundle/{chunk-abtn6nec.js → chunk-326p5b10.js} +2 -2
  32. package/bundle/{chunk-2p2ch1k2.js → chunk-33e9y2aw.js} +1 -1
  33. package/bundle/{chunk-asmfntjm.js → chunk-35xk4g91.js} +1 -1
  34. package/bundle/{chunk-n86s4fw4.js → chunk-3632wgg1.js} +1 -1
  35. package/bundle/{chunk-tqsx2m1j.js → chunk-3bxg5bta.js} +1 -1
  36. package/bundle/{chunk-6bsgrr5h.js → chunk-3c6p8tm3.js} +1 -1
  37. package/bundle/chunk-3h9rq2wq.js +2 -0
  38. package/bundle/{chunk-7wthn44y.js → chunk-3ytjm3az.js} +1 -1
  39. package/bundle/{chunk-2mjc44ev.js → chunk-40efytmk.js} +1 -1
  40. package/bundle/chunk-42p59wm4.js +2 -0
  41. package/bundle/{chunk-09j71kp6.js → chunk-44a82dg0.js} +4 -4
  42. package/bundle/chunk-4512pvca.js +2 -0
  43. package/bundle/chunk-456bmaww.js +2 -0
  44. package/bundle/{chunk-s6me101a.js → chunk-48ge2ryx.js} +1 -1
  45. package/bundle/chunk-48pajrnt.js +2 -0
  46. package/bundle/{chunk-hn1f6rne.js → chunk-4cnwn1rh.js} +2 -2
  47. package/bundle/chunk-4d87mhwn.js +3 -0
  48. package/bundle/chunk-4fy9c54h.js +2 -0
  49. package/bundle/{chunk-43ae3chd.js → chunk-4gkk28xk.js} +2 -2
  50. package/bundle/{chunk-bsf6n350.js → chunk-4jtxtkj7.js} +2 -2
  51. package/bundle/{chunk-pq2prhb2.js → chunk-50sv6y2e.js} +1 -1
  52. package/bundle/chunk-50tb3g5x.js +2 -0
  53. package/bundle/chunk-52bam8g7.js +2 -0
  54. package/bundle/{chunk-zqxmr01r.js → chunk-53bqcctj.js} +1 -1
  55. package/bundle/chunk-53w4zqps.js +2 -0
  56. package/bundle/chunk-59y8q9m5.js +2 -0
  57. package/bundle/chunk-5eq1fft9.js +3 -0
  58. package/bundle/{chunk-8f0g7d7k.js → chunk-5hw6xa49.js} +2 -2
  59. package/bundle/{chunk-9epjgend.js → chunk-5q4harvc.js} +2 -2
  60. package/bundle/chunk-5tray1fw.js +3 -0
  61. package/bundle/{chunk-a2g69pv6.js → chunk-5v0xjs3x.js} +1 -1
  62. package/bundle/{chunk-ce5t444d.js → chunk-60v5jvgt.js} +1 -1
  63. package/bundle/chunk-64ezpbwt.js +2 -0
  64. package/bundle/{chunk-b9hstp7h.js → chunk-68yw2hk9.js} +1 -1
  65. package/bundle/{chunk-hhgjbag9.js → chunk-69nzndk7.js} +1 -1
  66. package/bundle/chunk-6bpe215q.js +2 -0
  67. package/bundle/chunk-6bphjajd.js +2 -0
  68. package/bundle/{chunk-qredfmch.js → chunk-6d5rrre9.js} +1 -1
  69. package/bundle/{chunk-mb4wvwfw.js → chunk-6hpgb8h4.js} +3 -3
  70. package/bundle/{chunk-88dhcv37.js → chunk-6kp07m7p.js} +1 -1
  71. package/bundle/{chunk-csyw14fj.js → chunk-6phh70sp.js} +1 -1
  72. package/bundle/chunk-6t1ehq36.js +2 -0
  73. package/bundle/{chunk-hgbkg85g.js → chunk-70ck4v3t.js} +1 -1
  74. package/bundle/{chunk-3n49y4kh.js → chunk-71sjjjr8.js} +1 -1
  75. package/bundle/{chunk-geccvf9d.js → chunk-71xz70r9.js} +1 -1
  76. package/bundle/{chunk-9kjj44cr.js → chunk-73e409hd.js} +1 -1
  77. package/bundle/{chunk-1xw68zak.js → chunk-78ymd20x.js} +1 -1
  78. package/bundle/{chunk-n4gjpgnk.js → chunk-7avcnwv8.js} +1 -1
  79. package/bundle/{chunk-z8v2tsz2.js → chunk-7hm0c2yg.js} +1 -1
  80. package/bundle/{chunk-kfgn4apg.js → chunk-7mke41x0.js} +1 -1
  81. package/bundle/chunk-7pfj4x1a.js +2 -0
  82. package/bundle/chunk-7ry9cvby.js +2 -0
  83. package/bundle/chunk-7wczs9mx.js +2 -0
  84. package/bundle/{chunk-yjj4cvqg.js → chunk-7xm75w1e.js} +1 -1
  85. package/bundle/{chunk-y212x7ws.js → chunk-7z5jh4ra.js} +1 -1
  86. package/bundle/{chunk-98vfbn0h.js → chunk-81qwdg5s.js} +1 -1
  87. package/bundle/{chunk-r4mnbhe1.js → chunk-83gqkmth.js} +1 -1
  88. package/bundle/chunk-873skv7w.js +2 -0
  89. package/bundle/{chunk-ndmrg80b.js → chunk-8hytwgwf.js} +1 -1
  90. package/bundle/{chunk-0wdtbn59.js → chunk-8n20thvd.js} +2 -2
  91. package/bundle/{chunk-xn61fgrh.js → chunk-8qswepp2.js} +1 -1
  92. package/bundle/chunk-8v96pmqn.js +2 -0
  93. package/bundle/chunk-8y2scz6z.js +2 -0
  94. package/bundle/{chunk-7mc8nxve.js → chunk-8ymffyep.js} +1 -1
  95. package/bundle/chunk-8zx7vnx6.js +2 -0
  96. package/bundle/{chunk-8k55xz7z.js → chunk-93p131d5.js} +1 -1
  97. package/bundle/chunk-94a76f8w.js +2 -0
  98. package/bundle/{chunk-3h4y7n1a.js → chunk-9emq67vc.js} +1 -1
  99. package/bundle/{chunk-ypthfv6d.js → chunk-9f1z9xce.js} +1 -1
  100. package/bundle/chunk-9mjz6e27.js +2 -0
  101. package/bundle/chunk-9ng7jjp7.js +2 -0
  102. package/bundle/chunk-9tpgnjy8.js +2 -0
  103. package/bundle/{chunk-f29n7826.js → chunk-9x5232dw.js} +1 -1
  104. package/bundle/{chunk-t3tkp1em.js → chunk-a1wdeapb.js} +1 -1
  105. package/bundle/{chunk-b20xjnpw.js → chunk-a7amey9s.js} +1 -1
  106. package/bundle/chunk-a7ym9f0v.js +2 -0
  107. package/bundle/chunk-a8f2xvy3.js +2 -0
  108. package/bundle/chunk-a99cvwta.js +2 -0
  109. package/bundle/chunk-abd1cfpg.js +2 -0
  110. package/bundle/{chunk-yn576pje.js → chunk-ag8kz1e7.js} +2 -2
  111. package/bundle/chunk-anwnwfjf.js +2 -0
  112. package/bundle/chunk-avys5mnz.js +2 -0
  113. package/bundle/chunk-axvjd10y.js +2 -0
  114. package/bundle/{chunk-4vze3djr.js → chunk-ay8emwym.js} +1 -1
  115. package/bundle/chunk-b4pphqab.js +2 -0
  116. package/bundle/chunk-b6087ak4.js +2 -0
  117. package/bundle/{chunk-qje3683x.js → chunk-b8gjz6bk.js} +1 -1
  118. package/bundle/chunk-bgw4fvg2.js +2 -0
  119. package/bundle/{chunk-q0xzbad1.js → chunk-bh53dz71.js} +1 -1
  120. package/bundle/chunk-brkqxbjy.js +2 -0
  121. package/bundle/{chunk-j2zay4da.js → chunk-c11d28qn.js} +2 -2
  122. package/bundle/{chunk-hd2kb05a.js → chunk-c14s0kxq.js} +1 -1
  123. package/bundle/{chunk-qsszerj7.js → chunk-c1bdzxbx.js} +2 -2
  124. package/bundle/{chunk-v9xnk9pz.js → chunk-c1vnp55z.js} +1 -1
  125. package/bundle/chunk-c26qxt5g.js +2 -0
  126. package/bundle/chunk-c6zscb38.js +2 -0
  127. package/bundle/{chunk-g0mbbysk.js → chunk-cfgvm15x.js} +1 -1
  128. package/bundle/{chunk-jntqzhxr.js → chunk-chpr8ekb.js} +1 -1
  129. package/bundle/chunk-cjww2jmv.js +3 -0
  130. package/bundle/{chunk-hbtd620x.js → chunk-ck2gfaba.js} +1 -1
  131. package/bundle/chunk-cmbh77cs.js +7 -0
  132. package/bundle/{chunk-eqcd9k9p.js → chunk-cnmq5xtq.js} +218 -218
  133. package/bundle/{chunk-azx0zxnx.js → chunk-cphrgyp6.js} +1 -1
  134. package/bundle/chunk-csz0dgyp.js +2 -0
  135. package/bundle/{chunk-fhdpp77n.js → chunk-ctaze2hn.js} +1 -1
  136. package/bundle/{chunk-n5sh2790.js → chunk-cxnfy6qk.js} +1 -1
  137. package/bundle/{chunk-yn05n0az.js → chunk-d07p6fpk.js} +2 -2
  138. package/bundle/{chunk-kw09hbrb.js → chunk-d65qs4d0.js} +1 -1
  139. package/bundle/{chunk-xk1nh1ay.js → chunk-d68fzyw7.js} +2 -2
  140. package/bundle/{chunk-6hdjkvr1.js → chunk-d6ry9418.js} +2 -2
  141. package/bundle/{chunk-zbq60sw6.js → chunk-dactgryw.js} +1 -1
  142. package/bundle/chunk-dafmkrhn.js +2 -0
  143. package/bundle/{chunk-qzcfjz9g.js → chunk-db405hjg.js} +1 -1
  144. package/bundle/chunk-dgprdym0.js +2 -0
  145. package/bundle/{chunk-v7deh7aj.js → chunk-dnwefyhv.js} +1 -1
  146. package/bundle/{chunk-scqxmv8k.js → chunk-drvkj3xg.js} +1 -1
  147. package/bundle/chunk-dryzt12j.js +2 -0
  148. package/bundle/chunk-dsamees2.js +2 -0
  149. package/bundle/{chunk-bv8pf0m1.js → chunk-dxpj0cxh.js} +2 -2
  150. package/bundle/{chunk-nv2r4cns.js → chunk-dynv30gm.js} +1 -1
  151. package/bundle/chunk-dyqpxx3b.js +2 -0
  152. package/bundle/{chunk-pg8dz1rq.js → chunk-e01wnqvc.js} +1 -1
  153. package/bundle/{chunk-z160s5p5.js → chunk-e10py6yr.js} +1 -1
  154. package/bundle/{chunk-xk7je9y8.js → chunk-e7ny0b3x.js} +1 -1
  155. package/bundle/{chunk-2w20mhch.js → chunk-eh7e49k4.js} +1 -1
  156. package/bundle/{chunk-6jewfaqa.js → chunk-ehhas0ew.js} +2 -2
  157. package/bundle/{chunk-6scqd8fh.js → chunk-ejrhvy38.js} +1 -1
  158. package/bundle/{chunk-sv48x9h8.js → chunk-enpzvmtc.js} +1 -1
  159. package/bundle/chunk-excnptfy.js +2 -0
  160. package/bundle/chunk-ez8vkgfz.js +2 -0
  161. package/bundle/chunk-f2btnww9.js +2 -0
  162. package/bundle/chunk-f8eter69.js +5 -0
  163. package/bundle/{chunk-7926bzm7.js → chunk-fgg9txzb.js} +1 -1
  164. package/bundle/chunk-fjq3a347.js +2 -0
  165. package/bundle/{chunk-6528bthc.js → chunk-fn9h4ync.js} +1 -1
  166. package/bundle/{chunk-m2ny1en7.js → chunk-fq0x3esz.js} +5 -5
  167. package/bundle/{chunk-h8chkene.js → chunk-fvzwbjh8.js} +1 -1
  168. package/bundle/chunk-fxdtq2ed.js +2 -0
  169. package/bundle/{chunk-sbx9z70j.js → chunk-fyqjm5fv.js} +1 -1
  170. package/bundle/{chunk-t35n89t9.js → chunk-g10d6x57.js} +1 -1
  171. package/bundle/{chunk-1d9f53sk.js → chunk-g5rabwre.js} +2 -2
  172. package/bundle/{chunk-4fk4se02.js → chunk-g7ccdh7r.js} +1 -1
  173. package/bundle/{chunk-0yqbyres.js → chunk-g9cjsfvg.js} +1 -1
  174. package/bundle/{chunk-yvqbewmc.js → chunk-gagtmjmp.js} +2 -2
  175. package/bundle/{chunk-4fspp5fg.js → chunk-gb00fh4z.js} +3 -3
  176. package/bundle/{chunk-44jpsp97.js → chunk-gbpvs0fx.js} +1 -1
  177. package/bundle/{chunk-v9bmpndq.js → chunk-gbrnn2dk.js} +1 -1
  178. package/bundle/chunk-gcw4rn10.js +2 -0
  179. package/bundle/{chunk-j8efst22.js → chunk-gj0wt0cy.js} +1 -1
  180. package/bundle/{chunk-rptvpa1v.js → chunk-gsar6xda.js} +1 -1
  181. package/bundle/{chunk-nxn4arcf.js → chunk-gt31468k.js} +1 -1
  182. package/bundle/{chunk-c19t7e8s.js → chunk-gwp17r03.js} +1 -1
  183. package/bundle/chunk-gwzw92jt.js +2 -0
  184. package/bundle/{chunk-z5yrvg40.js → chunk-h2afsbm1.js} +1 -1
  185. package/bundle/{chunk-d86ma6zk.js → chunk-h4j5xzc8.js} +1 -1
  186. package/bundle/{chunk-hevb7k95.js → chunk-hbbsbyyq.js} +1 -1
  187. package/bundle/chunk-hnctaq8s.js +3 -0
  188. package/bundle/{chunk-g3ch14a1.js → chunk-hnzegjgv.js} +1 -1
  189. package/bundle/chunk-hp7tssgv.js +2 -0
  190. package/bundle/chunk-ht0hbdmx.js +2 -0
  191. package/bundle/{chunk-ekndhwnn.js → chunk-ht5w06x7.js} +2 -2
  192. package/bundle/{chunk-a8p9aggx.js → chunk-htz93dsd.js} +1 -1
  193. package/bundle/{chunk-svrxk3vf.js → chunk-jbx3s7nw.js} +2 -2
  194. package/bundle/chunk-jcjbr3q7.js +2 -0
  195. package/bundle/{chunk-yyqrbv2f.js → chunk-jef04wyf.js} +1 -1
  196. package/bundle/{chunk-b1ntb3dh.js → chunk-jh0bw59r.js} +1 -1
  197. package/bundle/{chunk-b73s2h43.js → chunk-jrqb0jwy.js} +1 -1
  198. package/bundle/{chunk-3rt2k5sc.js → chunk-js1n8tgv.js} +1 -1
  199. package/bundle/chunk-jxswwvr3.js +2 -0
  200. package/bundle/{chunk-0626rvy2.js → chunk-kf167jw7.js} +1 -1
  201. package/bundle/{chunk-byc7ev8p.js → chunk-kfxv5rfg.js} +1 -1
  202. package/bundle/{chunk-d0qqgxs4.js → chunk-kj20f048.js} +1 -1
  203. package/bundle/{chunk-cd867geb.js → chunk-kq6b222y.js} +1 -1
  204. package/bundle/{chunk-6hmj972a.js → chunk-ktzq4ha1.js} +1 -1
  205. package/bundle/chunk-m5m448mg.js +3 -0
  206. package/bundle/{chunk-dfja6dj6.js → chunk-mcg24gkb.js} +1 -1
  207. package/bundle/chunk-mh0j6dzy.js +2 -0
  208. package/bundle/{chunk-p7h2qd7z.js → chunk-mk1bfzg5.js} +1 -1
  209. package/bundle/chunk-mxzceza9.js +2 -0
  210. package/bundle/{chunk-4vemws1t.js → chunk-mzs2pjyc.js} +2 -2
  211. package/bundle/chunk-n0dy98h2.js +2 -0
  212. package/bundle/{chunk-jwtev7b7.js → chunk-n9xns8by.js} +2 -2
  213. package/bundle/chunk-ngm6pqyt.js +2 -0
  214. package/bundle/chunk-ngtavamt.js +2 -0
  215. package/bundle/chunk-nkhc32s3.js +2 -0
  216. package/bundle/chunk-npse2xrd.js +2 -0
  217. package/bundle/{chunk-3vmh2ge6.js → chunk-nsk8dkwp.js} +1 -1
  218. package/bundle/{chunk-1fz0383p.js → chunk-nv3eyyaj.js} +1 -1
  219. package/bundle/{chunk-az9hsk6z.js → chunk-p18axz0m.js} +1 -1
  220. package/bundle/{chunk-2p9py4rw.js → chunk-p62gb4wj.js} +1 -1
  221. package/bundle/chunk-p6e4vqy7.js +2 -0
  222. package/bundle/{chunk-ktqrbbkh.js → chunk-p9qfbr02.js} +1 -1
  223. package/bundle/chunk-pctt1qv8.js +14 -0
  224. package/bundle/{chunk-gd45tjbd.js → chunk-pe29yy6s.js} +1 -1
  225. package/bundle/chunk-pf9g671w.js +2 -0
  226. package/bundle/chunk-phv9kdq6.js +3 -0
  227. package/bundle/{chunk-k095hd3c.js → chunk-pp2eqkse.js} +1 -1
  228. package/bundle/{chunk-gjvymdhp.js → chunk-pp6vhqrr.js} +1 -1
  229. package/bundle/chunk-ppjnqexm.js +2 -0
  230. package/bundle/chunk-pqkjhn8h.js +2 -0
  231. package/bundle/{chunk-yj73ehjd.js → chunk-pxvk3syj.js} +1 -1
  232. package/bundle/{chunk-tsb9g1nz.js → chunk-qbc36nbb.js} +2 -2
  233. package/bundle/{chunk-xhncwg5v.js → chunk-qc8rsn4v.js} +1 -1
  234. package/bundle/chunk-qd8w2gkd.js +2 -0
  235. package/bundle/{chunk-k16s2dnx.js → chunk-qrsveve6.js} +1 -1
  236. package/bundle/chunk-qvnb3j71.js +3 -0
  237. package/bundle/{chunk-q5363rr9.js → chunk-r4ndwym0.js} +1 -1
  238. package/bundle/chunk-r78czx4d.js +8 -0
  239. package/bundle/{chunk-cjfgs1x8.js → chunk-rbk8seme.js} +1 -1
  240. package/bundle/{chunk-n34y5gp6.js → chunk-redjxn13.js} +2 -2
  241. package/bundle/chunk-rf12t4n5.js +2 -0
  242. package/bundle/{chunk-fj7kd4gc.js → chunk-rg0mrprz.js} +1 -1
  243. package/bundle/{chunk-2xxefrps.js → chunk-rjd8gbs5.js} +1 -1
  244. package/bundle/chunk-rpgne7xh.js +2 -0
  245. package/bundle/chunk-rvgj1vky.js +2 -0
  246. package/bundle/{chunk-bx6kyvg7.js → chunk-rvkrgkeq.js} +1 -1
  247. package/bundle/{chunk-2hw0jzv4.js → chunk-rzhdkkpz.js} +1 -1
  248. package/bundle/{chunk-45jqjyk9.js → chunk-s9ntkjz3.js} +1 -1
  249. package/bundle/{chunk-81h5f8ev.js → chunk-skqbaadf.js} +1 -1
  250. package/bundle/chunk-ss2jvqrg.js +2 -0
  251. package/bundle/{chunk-61yatzp8.js → chunk-ss2ms1r3.js} +1 -1
  252. package/bundle/chunk-ssajqv72.js +2 -0
  253. package/bundle/{chunk-xn5v8wgh.js → chunk-t56r99hp.js} +1 -1
  254. package/bundle/{chunk-s1sepxdp.js → chunk-t8m74g39.js} +1 -1
  255. package/bundle/{chunk-s6bar2f9.js → chunk-t9mz17gb.js} +2 -2
  256. package/bundle/chunk-takew94z.js +9 -0
  257. package/bundle/{chunk-yp3dj4wh.js → chunk-tq0239xp.js} +1 -1
  258. package/bundle/{chunk-20d0cd1j.js → chunk-tqj69nh6.js} +2 -2
  259. package/bundle/{chunk-hpfqnjfz.js → chunk-tt30dybd.js} +1 -1
  260. package/bundle/{chunk-thk93j3e.js → chunk-tvdmnee6.js} +1 -1
  261. package/bundle/chunk-tvwwq4b3.js +2 -0
  262. package/bundle/{chunk-18vygvnc.js → chunk-v1xjc3s8.js} +1 -1
  263. package/bundle/chunk-v2n26eg4.js +2 -0
  264. package/bundle/chunk-vb286b31.js +2 -0
  265. package/bundle/chunk-vbeb74ny.js +11 -0
  266. package/bundle/chunk-vcw00k0n.js +3 -0
  267. package/bundle/{chunk-cfxjwfn4.js → chunk-vhe0tth1.js} +1 -1
  268. package/bundle/{chunk-z4nay2ef.js → chunk-vvxmwyrw.js} +1 -1
  269. package/bundle/{chunk-js9wdh67.js → chunk-vxyy2dp3.js} +2 -2
  270. package/bundle/{chunk-qk9vccja.js → chunk-vywnd5sf.js} +1 -1
  271. package/bundle/{chunk-gd5stg49.js → chunk-w18xs2h5.js} +1 -1
  272. package/bundle/{chunk-5n4hpc4f.js → chunk-wfb608qf.js} +3 -3
  273. package/bundle/chunk-x24y7qyd.js +2 -0
  274. package/bundle/{chunk-jkm54mha.js → chunk-x3y2xzhn.js} +1 -1
  275. package/bundle/{chunk-n3t52cz2.js → chunk-x4sp99g6.js} +1 -1
  276. package/bundle/{chunk-ef2b07fm.js → chunk-x562b0xk.js} +1 -1
  277. package/bundle/{chunk-zasd8cz8.js → chunk-x7k5yeey.js} +1 -1
  278. package/bundle/{chunk-v00cptj6.js → chunk-x9rbv6p6.js} +1 -1
  279. package/bundle/{chunk-m6wceqay.js → chunk-xcmgkc57.js} +1 -1
  280. package/bundle/{chunk-pycjksh4.js → chunk-xm7wascx.js} +1 -1
  281. package/bundle/{chunk-yaj9ywvz.js → chunk-xthkjax9.js} +1 -1
  282. package/bundle/{chunk-ps6jk326.js → chunk-xvwvd4kq.js} +2 -2
  283. package/bundle/{chunk-31wxbws4.js → chunk-xzrb857v.js} +1 -1
  284. package/bundle/chunk-y2d0w09y.js +2 -0
  285. package/bundle/{chunk-cev2qj7w.js → chunk-y3b4k38p.js} +1 -1
  286. package/bundle/{chunk-b9nwaaqs.js → chunk-y9q0hb7b.js} +2 -2
  287. package/bundle/chunk-yb79f79m.js +2 -0
  288. package/bundle/{chunk-8d2ddmf0.js → chunk-yek0sk2q.js} +1 -1
  289. package/bundle/{chunk-9atkgkaq.js → chunk-yhbcbjfk.js} +1 -1
  290. package/bundle/{chunk-k20nrwbg.js → chunk-yjf3kyej.js} +1 -1
  291. package/bundle/chunk-yjnyzpmt.js +2 -0
  292. package/bundle/{chunk-0a0vat1h.js → chunk-yp5bypsp.js} +2 -2
  293. package/bundle/{chunk-89f8v2y8.js → chunk-yp8wyzzm.js} +1 -1
  294. package/bundle/chunk-yqbcnsa1.js +2 -0
  295. package/bundle/{chunk-qtsmgjk7.js → chunk-yv0xrnn9.js} +1 -1
  296. package/bundle/chunk-z3mra3nm.js +2 -0
  297. package/bundle/{chunk-7m8fdp5p.js → chunk-z6pwkwdr.js} +1 -1
  298. package/bundle/{chunk-t299e2aw.js → chunk-zs8kqdsf.js} +2 -2
  299. package/bundle/{chunk-6saj1dhz.js → chunk-zscer8rc.js} +1 -1
  300. package/bundle/{chunk-4mrz9b6d.js → chunk-zw815d68.js} +2 -2
  301. package/bundle/chunk-zy9w1vkc.js +2 -0
  302. package/bundle/index.js +3 -3
  303. package/bundle/parser.worker.js +2 -2
  304. package/bundle/worker.js +1 -1
  305. package/package.json +1 -1
  306. package/bundle/chunk-07c1mvy1.js +0 -2
  307. package/bundle/chunk-0p7qcm51.js +0 -2
  308. package/bundle/chunk-0pmb7zzh.js +0 -2
  309. package/bundle/chunk-0xm85ayc.js +0 -3
  310. package/bundle/chunk-11d987sj.js +0 -11
  311. package/bundle/chunk-19sa03c1.js +0 -3
  312. package/bundle/chunk-1s9ctg0d.js +0 -2
  313. package/bundle/chunk-2f9fn9xr.js +0 -2
  314. package/bundle/chunk-2fhcvfyg.js +0 -2
  315. package/bundle/chunk-2ztdqtnk.js +0 -3
  316. package/bundle/chunk-3mfj0x4p.js +0 -2
  317. package/bundle/chunk-3shnje9k.js +0 -2
  318. package/bundle/chunk-3tz1qhpt.js +0 -2
  319. package/bundle/chunk-4dtbdycg.js +0 -2
  320. package/bundle/chunk-4kpvceap.js +0 -2
  321. package/bundle/chunk-4pz8av2y.js +0 -2
  322. package/bundle/chunk-4r4xh8a6.js +0 -2
  323. package/bundle/chunk-5hpq59t1.js +0 -2
  324. package/bundle/chunk-5s90ehww.js +0 -2
  325. package/bundle/chunk-5z7mjwwa.js +0 -14
  326. package/bundle/chunk-63kcg127.js +0 -2
  327. package/bundle/chunk-6fejrpht.js +0 -2
  328. package/bundle/chunk-6zzdw7q1.js +0 -2
  329. package/bundle/chunk-71pmrpkc.js +0 -2
  330. package/bundle/chunk-78m8rayq.js +0 -2
  331. package/bundle/chunk-7j6p5j2g.js +0 -2
  332. package/bundle/chunk-7tjd6ba1.js +0 -2
  333. package/bundle/chunk-8d8efdry.js +0 -2
  334. package/bundle/chunk-8jzjvmaz.js +0 -2
  335. package/bundle/chunk-93jxndr8.js +0 -2
  336. package/bundle/chunk-94qmhz2p.js +0 -3
  337. package/bundle/chunk-95qs7wnz.js +0 -2
  338. package/bundle/chunk-97h0jx8y.js +0 -5
  339. package/bundle/chunk-99ve54r6.js +0 -2
  340. package/bundle/chunk-9ksaqyb2.js +0 -2
  341. package/bundle/chunk-9p7t748e.js +0 -2
  342. package/bundle/chunk-a69jgepp.js +0 -2
  343. package/bundle/chunk-a94s0jks.js +0 -2
  344. package/bundle/chunk-ar310tc3.js +0 -2
  345. package/bundle/chunk-at03h9eq.js +0 -2
  346. package/bundle/chunk-ay9p70xx.js +0 -2
  347. package/bundle/chunk-b6dsv601.js +0 -3
  348. package/bundle/chunk-bajtytm5.js +0 -2
  349. package/bundle/chunk-bh8v3mfg.js +0 -2
  350. package/bundle/chunk-bp8sxnrm.js +0 -2
  351. package/bundle/chunk-bw5e8thn.js +0 -2
  352. package/bundle/chunk-c8ajbhv3.js +0 -2
  353. package/bundle/chunk-c8n72r2k.js +0 -8
  354. package/bundle/chunk-ccddzk10.js +0 -2
  355. package/bundle/chunk-ch8cx9jn.js +0 -2
  356. package/bundle/chunk-cm4jtnkg.js +0 -2
  357. package/bundle/chunk-cq7j5tv5.js +0 -2
  358. package/bundle/chunk-cttqh20d.js +0 -2
  359. package/bundle/chunk-cvvfa1jf.js +0 -2
  360. package/bundle/chunk-d7t0bcvk.js +0 -800
  361. package/bundle/chunk-dd3m74rc.js +0 -3
  362. package/bundle/chunk-e3qtndrt.js +0 -2
  363. package/bundle/chunk-e8cac405.js +0 -2
  364. package/bundle/chunk-ez92ah9y.js +0 -2
  365. package/bundle/chunk-fazvedgy.js +0 -2
  366. package/bundle/chunk-gf5pwww1.js +0 -2
  367. package/bundle/chunk-gtzcm5sb.js +0 -2
  368. package/bundle/chunk-j0znryc6.js +0 -9
  369. package/bundle/chunk-kzrw6h8t.js +0 -2
  370. package/bundle/chunk-ma0m6kpj.js +0 -2
  371. package/bundle/chunk-mjrvj2cg.js +0 -2
  372. package/bundle/chunk-mpebdv59.js +0 -2
  373. package/bundle/chunk-n20v44zr.js +0 -2
  374. package/bundle/chunk-nfzmvy30.js +0 -2
  375. package/bundle/chunk-nksathh4.js +0 -2
  376. package/bundle/chunk-p5360c2q.js +0 -2
  377. package/bundle/chunk-q14890p6.js +0 -2
  378. package/bundle/chunk-q4n02cwv.js +0 -2
  379. package/bundle/chunk-q7s17j1b.js +0 -2
  380. package/bundle/chunk-qm07wesh.js +0 -2
  381. package/bundle/chunk-qrrg9v3d.js +0 -2
  382. package/bundle/chunk-rdqgss38.js +0 -2
  383. package/bundle/chunk-rf524gez.js +0 -3
  384. package/bundle/chunk-rqgcz2zr.js +0 -2
  385. package/bundle/chunk-rs1698xs.js +0 -3
  386. package/bundle/chunk-rzc528ym.js +0 -2
  387. package/bundle/chunk-s2za1n7h.js +0 -8
  388. package/bundle/chunk-sbv96mj0.js +0 -3
  389. package/bundle/chunk-t3q7qakr.js +0 -2
  390. package/bundle/chunk-th78zcds.js +0 -2
  391. package/bundle/chunk-tj00kzk4.js +0 -2
  392. package/bundle/chunk-tv26mwx5.js +0 -2
  393. package/bundle/chunk-v69n6mef.js +0 -2
  394. package/bundle/chunk-vegwb3t0.js +0 -2
  395. package/bundle/chunk-w9seyn69.js +0 -2
  396. package/bundle/chunk-wanf4se3.js +0 -2
  397. package/bundle/chunk-wdhzmk1b.js +0 -2
  398. package/bundle/chunk-wnwesaap.js +0 -2
  399. package/bundle/chunk-wxqtda70.js +0 -2
  400. package/bundle/chunk-wzb6s9rk.js +0 -2
  401. package/bundle/chunk-x0dg9rg6.js +0 -2
  402. package/bundle/chunk-xmnzrzbs.js +0 -2
  403. package/bundle/chunk-xzf62kc6.js +0 -2
  404. package/bundle/chunk-yk8kk25c.js +0 -3
  405. package/bundle/chunk-yned6vmd.js +0 -3
  406. package/bundle/chunk-yra49yga.js +0 -2
  407. package/bundle/chunk-ytye0p7f.js +0 -2
  408. package/bundle/chunk-yv2mxxbq.js +0 -2
  409. package/bundle/chunk-z2fqqer0.js +0 -2
  410. package/bundle/chunk-z3qanc8m.js +0 -2
  411. package/bundle/chunk-z44m19vm.js +0 -2
  412. package/bundle/chunk-zcagdtab.js +0 -2
  413. package/bundle/chunk-zervk6c5.js +0 -2
  414. package/bundle/chunk-zqjp7jdd.js +0 -7
@@ -0,0 +1,2 @@
1
+ // @bun
2
+ import{n as a,o as b}from"./chunk-cnmq5xtq.js";import"./chunk-d65qs4d0.js";import"./chunk-83gqkmth.js";import"./chunk-c8k32724.js";import"./chunk-g9cjsfvg.js";import"./chunk-t9mz17gb.js";import"./chunk-yt3f3j35.js";import"./chunk-50sv6y2e.js";import"./chunk-wfb608qf.js";import"./chunk-eh7e49k4.js";import"./chunk-bzgj60w4.js";import"./chunk-kdcnder5.js";import"./chunk-x4sp99g6.js";import"./chunk-fvzwbjh8.js";import"./chunk-e10py6yr.js";import"./chunk-pxvk3syj.js";import"./chunk-rbk8seme.js";import"./chunk-68yw2hk9.js";import"./chunk-takew94z.js";import"./chunk-44a82dg0.js";import"./chunk-vxyy2dp3.js";import"./chunk-04n2ycg5.js";import"./chunk-8ymffyep.js";import"./chunk-mcg24gkb.js";import"./chunk-redjxn13.js";import"./chunk-bn0h9dny.js";import"./chunk-r4ndwym0.js";import"./chunk-3ytjm3az.js";import"./chunk-htz93dsd.js";import"./chunk-vcw00k0n.js";import"./chunk-r78czx4d.js";import"./chunk-2hc5z7b5.js";import"./chunk-d68fzyw7.js";import"./chunk-4jtxtkj7.js";import"./chunk-ay8emwym.js";import"./chunk-2maqde7w.js";import"./chunk-kj20f048.js";import"./chunk-cqtkxwd8.js";import"./chunk-x9rbv6p6.js";import"./chunk-g5rabwre.js";import"./chunk-jbx3s7nw.js";import"./chunk-15hw2z9t.js";import"./chunk-48ge2ryx.js";import"./chunk-n9xns8by.js";import"./chunk-y9q0hb7b.js";import"./chunk-c1bdzxbx.js";import"./chunk-ehhas0ew.js";import"./chunk-d6ry9418.js";import"./chunk-0dt0bxz6.js";import"./chunk-10bjs581.js";import"./chunk-4cnwn1rh.js";import"./chunk-gcw4rn10.js";import"./chunk-m5m448mg.js";import"./chunk-tqj69nh6.js";import"./chunk-ag8kz1e7.js";import"./chunk-5tray1fw.js";import"./chunk-c11d28qn.js";import"./chunk-mzs2pjyc.js";import"./chunk-gagtmjmp.js";import"./chunk-zs8kqdsf.js";import"./chunk-dxpj0cxh.js";import"./chunk-zw815d68.js";import"./chunk-7xm75w1e.js";export{b as tui,a as rendererConfig};
@@ -0,0 +1,2 @@
1
+ // @bun
2
+ import"./chunk-7xm75w1e.js";var r="./highlights-eq9cgrbb.scm";export{r as default};
@@ -1,5 +1,5 @@
1
1
  // @bun
2
- import{Tr as w}from"./chunk-hn1f6rne.js";import{Vr as z}from"./chunk-4kpvceap.js";import{bt as J}from"./chunk-20d0cd1j.js";function H(j,v){return typeof j==="object"&&j!==null&&"_tag"in j&&j._tag===v}function V(j){if(w.hasName(j,"MCPFailed"))return`MCP server "${j.data?.name}" failed. Note, qitqode does not support MCP authentication yet.`;if(H(j,"AccountServiceError")||H(j,"AccountTransportError"))return j.message??"";if(w.hasName(j,"ProviderModelNotFoundError")){let k=j.data,A=Array.isArray(k?.suggestions)?k.suggestions:[];return[`Model not found: ${k?.providerID}/${k?.modelID}`,...A.length?["Did you mean: "+A.join(", ")]:[],"Try: `qitqode models` to list available models","Or check your config (qitqode.json) provider/model names"].join(`
2
+ import{Sr as w}from"./chunk-4cnwn1rh.js";import{Ur as z}from"./chunk-gcw4rn10.js";import{at as J}from"./chunk-tqj69nh6.js";function H(j,v){return typeof j==="object"&&j!==null&&"_tag"in j&&j._tag===v}function V(j){if(w.hasName(j,"MCPFailed"))return`MCP server "${j.data?.name}" failed. Note, qitqode does not support MCP authentication yet.`;if(H(j,"AccountServiceError")||H(j,"AccountTransportError"))return j.message??"";if(w.hasName(j,"ProviderModelNotFoundError")){let k=j.data,A=Array.isArray(k?.suggestions)?k.suggestions:[];return[`Model not found: ${k?.providerID}/${k?.modelID}`,...A.length?["Did you mean: "+A.join(", ")]:[],"Try: `qitqode models` to list available models","Or check your config (qitqode.json) provider/model names"].join(`
3
3
  `)}if(w.hasName(j,"ProviderInitError"))return`Failed to initialize provider "${j.data?.providerID}". Check credentials and configuration.`;if(w.hasName(j,"ConfigJsonError")){let k=j.data;return`Config file at ${k?.path} is not valid JSON(C)`+(k?.message?`: ${k.message}`:"")}if(w.hasName(j,"ConfigDirectoryTypoError")){let k=j.data;return`Directory "${k?.dir}" in ${k?.path} is not valid. Rename the directory to "${k?.suggestion}" or remove it. This is a common typo.`}if(w.hasName(j,"ConfigFrontmatterError"))return j.data?.message??"";if(w.hasName(j,"ConfigInvalidError")){let k=j.data,A=k?.path,B=k?.message,K=Array.isArray(k?.issues)?k.issues:[];return[`Configuration is invalid${A&&A!=="config"?` at ${A}`:""}`+(B?`: ${B}`:""),...K.map((G)=>"\u21B3 "+G.message+" "+G.path.join("."))].join(`
4
4
  `)}if(w.hasName(j,"UICancelledError"))return"";let v=typeof j==="object"&&j!==null&&"name"in j?j.name:void 0;if(v==="QlexNotLoggedInError")return z.copy().notLoggedIn;if(v==="QlexInsufficientBalanceError")return(j.message??z.copy().insufficientBalanceFallback)+z.copy().insufficientBalanceCliSuffix;if(v==="QlexRateLimitError")return z.copy().rateLimit;if(v==="BackendInsufficientBalanceError")return(j.message??z.copy().insufficientBalanceFallback)+z.copy().insufficientBalanceCliSuffix;if(v==="BackendRateLimitError")return j.message??z.copy().rateLimit;if(v==="QlexInvalidCredentialsError")return j.message??z.copy().invalidCredentialsFallback}function W(j){return J(j)}function D({onlyFirst:j=!1}={}){return new RegExp("(?:\\u001B\\][\\s\\S]*?(?:\\u0007|\\u001B\\u005C|\\u009C))|[\\u001B\\u009B][[\\]()#;?]*(?:\\d{1,4}(?:[;:]\\d{0,4})*)?[\\dA-PR-TZcf-nq-uy=><~]",j?void 0:"g")}var L=D();function M(j){if(typeof j!=="string")throw TypeError(`Expected a \`string\`, got \`${typeof j}\``);return j.replace(L,"")}
5
5
  export{M as Jf,V as Kf,W as Lf};
@@ -1,3 +1,3 @@
1
1
  // @bun
2
- import{fl as e}from"./chunk-d7t0bcvk.js";import{fm as r}from"./chunk-dfja6dj6.js";import{vt as o}from"./chunk-b6dsv601.js";var s=o.object({id:e.zod,type:o.string(),name:o.string(),branch:o.string().nullable(),directory:o.string().nullable(),extra:o.unknown().nullable(),projectID:r.zod});
3
- export{s as Lg};
2
+ import{fl as e}from"./chunk-04n2ycg5.js";import{fm as r}from"./chunk-mcg24gkb.js";import{ut as o}from"./chunk-5tray1fw.js";var s=o.object({id:e.zod,type:o.string(),name:o.string(),branch:o.string().nullable(),directory:o.string().nullable(),extra:o.unknown().nullable(),projectID:r.zod});
3
+ export{s as Kg};
@@ -1,2 +1,2 @@
1
1
  // @bun
2
- import{Ef as M}from"./chunk-zqxmr01r.js";import"./chunk-b9nwaaqs.js";import{BO as B}from"./chunk-4mrz9b6d.js";import{CO as b,DO as X,GO as V}from"./chunk-yjj4cvqg.js";var a=X((l)=>{Object.defineProperty(l,"__esModule",{value:!0});l.OTLPExporterBase=void 0;class p{_delegate;constructor(Z){this._delegate=Z}export(Z,$){this._delegate.export(Z,$)}forceFlush(){return this._delegate.forceFlush()}shutdown(){return this._delegate.shutdown()}}l.OTLPExporterBase=p});var R=X((t)=>{Object.defineProperty(t,"__esModule",{value:!0});t.OTLPExporterError=void 0;class n extends Error{code;name="OTLPExporterError";data;constructor(Z,$,Y){super(Z);this.data=Y,this.code=$}}t.OTLPExporterError=n});var H=X((r)=>{Object.defineProperty(r,"__esModule",{value:!0});r.getSharedConfigurationDefaults=r.mergeOtlpSharedConfigurationWithDefaults=r.wrapStaticHeadersInFunction=r.validateTimeoutMillis=void 0;function o(Z){if(Number.isFinite(Z)&&Z>0)return Z;throw Error(`Configuration: timeoutMillis is invalid, expected number greater than 0 (actual: '${Z}')`)}r.validateTimeoutMillis=o;function I0(Z){if(Z==null)return;return async()=>Z}r.wrapStaticHeadersInFunction=I0;function P0(Z,$,Y){return{timeoutMillis:o(Z.timeoutMillis??$.timeoutMillis??Y.timeoutMillis),concurrencyLimit:Z.concurrencyLimit??$.concurrencyLimit??Y.concurrencyLimit,compression:Z.compression??$.compression??Y.compression}}r.mergeOtlpSharedConfigurationWithDefaults=P0;function S0(){return{timeoutMillis:1e4,concurrencyLimit:30,compression:"none"}}r.getSharedConfigurationDefaults=S0});var $Z=X((ZZ)=>{Object.defineProperty(ZZ,"__esModule",{value:!0});ZZ.CompressionAlgorithm=void 0;var T0;(function(Z){Z.NONE="none",Z.GZIP="gzip"})(T0=ZZ.CompressionAlgorithm||(ZZ.CompressionAlgorithm={}))});var _=X((GZ)=>{Object.defineProperty(GZ,"__esModule",{value:!0});GZ.createBoundedQueueExportPromiseHandler=void 0;class YZ{_concurrencyLimit;_sendingPromises=[];constructor(Z){this._concurrencyLimit=Z}pushPromise(Z){if(this.hasReachedLimit())throw Error("Concurrency Limit reached");this._sendingPromises.push(Z);let $=()=>{let Y=this._sendingPromises.indexOf(Z);this._sendingPromises.splice(Y,1)};Z.then($,$)}hasReachedLimit(){return this._sendingPromises.length>=this._concurrencyLimit}async awaitAll(){await Promise.all(this._sendingPromises)}}function k0(Z){return new YZ(Z.concurrencyLimit)}GZ.createBoundedQueueExportPromiseHandler=k0});var XZ=X((WZ)=>{Object.defineProperty(WZ,"__esModule",{value:!0});WZ.createLoggingPartialSuccessResponseHandler=void 0;var E0=B();function y0(Z){return Object.prototype.hasOwnProperty.call(Z,"partialSuccess")}function x0(){return{handleResponse(Z){if(Z==null||!y0(Z)||Z.partialSuccess==null||Object.keys(Z.partialSuccess).length===0)return;E0.diag.warn("Received Partial Success response:",JSON.stringify(Z.partialSuccess))}}}WZ.createLoggingPartialSuccessResponseHandler=x0});var v=X((zZ)=>{Object.defineProperty(zZ,"__esModule",{value:!0});zZ.createOtlpExportDelegate=void 0;var q=M(),KZ=R(),h0=XZ(),C0=B();class wZ{_diagLogger;_transport;_serializer;_responseHandler;_promiseQueue;_timeout;constructor(Z,$,Y,G,Q){this._transport=Z,this._serializer=$,this._responseHandler=Y,this._promiseQueue=G,this._timeout=Q,this._diagLogger=C0.diag.createComponentLogger({namespace:"OTLPExportDelegate"})}export(Z,$){if(this._diagLogger.debug("items to be sent",Z),this._promiseQueue.hasReachedLimit()){$({code:q.ExportResultCode.FAILED,error:Error("Concurrent export limit reached")});return}let Y=this._serializer.serializeRequest(Z);if(Y==null){$({code:q.ExportResultCode.FAILED,error:Error("Nothing to send")});return}this._promiseQueue.pushPromise(this._transport.send(Y,this._timeout).then((G)=>{if(G.status==="success"){if(G.data!=null)try{this._responseHandler.handleResponse(this._serializer.deserializeResponse(G.data))}catch(Q){this._diagLogger.warn("Export succeeded but could not deserialize response - is the response specification compliant?",Q,G.data)}$({code:q.ExportResultCode.SUCCESS});return}else if(G.status==="failure"&&G.error){$({code:q.ExportResultCode.FAILED,error:G.error});return}else if(G.status==="retryable")$({code:q.ExportResultCode.FAILED,error:G.error??new KZ.OTLPExporterError("Export failed with retryable status")});else $({code:q.ExportResultCode.FAILED,error:new KZ.OTLPExporterError("Export failed with unknown error")})},(G)=>$({code:q.ExportResultCode.FAILED,error:G})))}forceFlush(){return this._promiseQueue.awaitAll()}async shutdown(){this._diagLogger.debug("shutdown started"),await this.forceFlush(),this._transport.shutdown()}}function _0(Z,$){return new wZ(Z.transport,Z.serializer,(0,h0.createLoggingPartialSuccessResponseHandler)(),Z.promiseHandler,$.timeout)}zZ.createOtlpExportDelegate=_0});var NZ=X((FZ)=>{Object.defineProperty(FZ,"__esModule",{value:!0});FZ.createOtlpNetworkExportDelegate=void 0;var v0=_(),m0=v();function f0(Z,$,Y){return(0,m0.createOtlpExportDelegate)({transport:Y,serializer:$,promiseHandler:(0,v0.createBoundedQueueExportPromiseHandler)(Z)},{timeout:Z.timeoutMillis})}FZ.createOtlpNetworkExportDelegate=f0});var jZ=X((N)=>{Object.defineProperty(N,"__esModule",{value:!0});N.createOtlpNetworkExportDelegate=N.CompressionAlgorithm=N.getSharedConfigurationDefaults=N.mergeOtlpSharedConfigurationWithDefaults=N.OTLPExporterError=N.OTLPExporterBase=void 0;var g0=a();Object.defineProperty(N,"OTLPExporterBase",{enumerable:!0,get:function(){return g0.OTLPExporterBase}});var d0=R();Object.defineProperty(N,"OTLPExporterError",{enumerable:!0,get:function(){return d0.OTLPExporterError}});var VZ=H();Object.defineProperty(N,"mergeOtlpSharedConfigurationWithDefaults",{enumerable:!0,get:function(){return VZ.mergeOtlpSharedConfigurationWithDefaults}});Object.defineProperty(N,"getSharedConfigurationDefaults",{enumerable:!0,get:function(){return VZ.getSharedConfigurationDefaults}});var c0=$Z();Object.defineProperty(N,"CompressionAlgorithm",{enumerable:!0,get:function(){return c0.CompressionAlgorithm}});var u0=NZ();Object.defineProperty(N,"createOtlpNetworkExportDelegate",{enumerable:!0,get:function(){return u0.createOtlpNetworkExportDelegate}})});var MZ=X((SZ)=>{Object.defineProperty(SZ,"__esModule",{value:!0});SZ.validateAndNormalizeHeaders=void 0;var Y3=B();function G3(Z){let $={};return Object.entries(Z??{}).forEach(([Y,G])=>{if(typeof G<"u")$[Y]=String(G);else Y3.diag.warn(`Header "${Y}" has invalid value (${G}) and will be ignored`)}),$}SZ.validateAndNormalizeHeaders=G3});var EZ=X((TZ)=>{Object.defineProperty(TZ,"__esModule",{value:!0});TZ.getHttpConfigurationDefaults=TZ.mergeOtlpHttpConfigurationWithDefaults=void 0;var bZ=H(),Q3=MZ();function W3(Z,$,Y){return async()=>{let G={...await Y()},Q={};if($!=null)Object.assign(Q,await $());if(Z!=null)Object.assign(Q,(0,Q3.validateAndNormalizeHeaders)(await Z()));return Object.assign(Q,G)}}function J3(Z){if(Z==null)return;try{let $=globalThis.location?.href;return new URL(Z,$).href}catch{throw Error(`Configuration: Could not parse user-provided export URL: '${Z}'`)}}function X3(Z,$,Y){return{...(0,bZ.mergeOtlpSharedConfigurationWithDefaults)(Z,$,Y),headers:W3(Z.headers,$.headers,Y.headers),url:J3(Z.url)??$.url??Y.url}}TZ.mergeOtlpHttpConfigurationWithDefaults=X3;function K3(Z,$){return{...(0,bZ.getSharedConfigurationDefaults)(),headers:async()=>Z,url:"http://localhost:4318/"+$}}TZ.getHttpConfigurationDefaults=K3});var k=X((hZ)=>{Object.defineProperty(hZ,"__esModule",{value:!0});hZ.getNodeHttpConfigurationDefaults=hZ.mergeOtlpNodeHttpConfigurationWithDefaults=hZ.httpAgentFactoryFromOptions=void 0;var yZ=EZ();function xZ(Z){return async($)=>{let Y=$==="http:",G=Y?import("http"):import("https"),{Agent:Q}=await G;if(Y){let{ca:W,cert:U,key:z,...K}=Z;return new Q(K)}return new Q(Z)}}hZ.httpAgentFactoryFromOptions=xZ;function z3(Z,$,Y){return{...(0,yZ.mergeOtlpHttpConfigurationWithDefaults)(Z,$,Y),agentFactory:Z.agentFactory??$.agentFactory??Y.agentFactory,userAgent:Z.userAgent}}hZ.mergeOtlpNodeHttpConfigurationWithDefaults=z3;function D3(Z,$){return{...(0,yZ.getHttpConfigurationDefaults)(Z,$),agentFactory:xZ({keepAlive:!0})}}hZ.getNodeHttpConfigurationDefaults=D3});var mZ=X((_Z)=>{Object.defineProperty(_Z,"__esModule",{value:!0});_Z.parseRetryAfterToMills=_Z.isExportHTTPErrorRetryable=void 0;function N3(Z){return Z===429||Z===502||Z===503||Z===504}_Z.isExportHTTPErrorRetryable=N3;function V3(Z){if(Z==null)return;let $=Number.parseInt(Z,10);if(Number.isInteger($))return $>0?$*1000:-1;let Y=new Date(Z).getTime()-Date.now();if(Y>=0)return Y;return 0}_Z.parseRetryAfterToMills=V3});var dZ=X((fZ)=>{Object.defineProperty(fZ,"__esModule",{value:!0});fZ.VERSION=void 0;fZ.VERSION="0.220.0"});var iZ=X((pZ)=>{Object.defineProperty(pZ,"__esModule",{value:!0});pZ.compressAndSend=pZ.sendWithHttp=pZ.MAX_RESPONSE_BODY_SIZE=void 0;var q3=V("zlib"),U3=V("stream"),E=mZ(),O3=R(),L3=dZ(),cZ=`OTel-OTLP-Exporter-JavaScript/${L3.VERSION}`;pZ.MAX_RESPONSE_BODY_SIZE=4194304;function H3(Z,$,Y,G,Q,W,U,z){return new Promise((K)=>{let I=new URL($);if(Q)Y["User-Agent"]=`${Q} ${cZ}`;else Y["User-Agent"]=cZ;let j=Z(I,{method:"POST",headers:Y,agent:W},(J)=>{let F=[],S=0;J.on("data",(D)=>{if(S+=D.length,S>pZ.MAX_RESPONSE_BODY_SIZE){let A0=Error(`OTLP export response body exceeded size limit of ${pZ.MAX_RESPONSE_BODY_SIZE} bytes`);K({status:"failure",error:A0}),J.destroy();return}F.push(D)}),J.on("end",()=>{if(J.statusCode&&J.statusCode<=299)K({status:"success",data:Buffer.concat(F)});else if(J.statusCode&&(0,E.isExportHTTPErrorRetryable)(J.statusCode))K({status:"retryable",retryInMillis:(0,E.parseRetryAfterToMills)(J.headers["retry-after"])});else{let D=new O3.OTLPExporterError(J.statusMessage,J.statusCode,Buffer.concat(F).toString());K({status:"failure",error:D})}}),J.on("error",(D)=>{if(J.statusCode&&J.statusCode<=299)K({status:"success"});else if(J.statusCode&&(0,E.isExportHTTPErrorRetryable)(J.statusCode))K({status:"retryable",error:D,retryInMillis:(0,E.parseRetryAfterToMills)(J.headers["retry-after"])});else K({status:"failure",error:D})})});j.setTimeout(z,()=>{j.destroy(),K({status:"retryable",error:Error("Request timed out")})}),j.on("error",(J)=>{if(I3(J))K({status:"retryable",error:J});else K({status:"failure",error:J})}),uZ(j,G,U,(J)=>{K({status:"failure",error:J})})})}pZ.sendWithHttp=H3;function uZ(Z,$,Y,G){let Q=A3(Y);if($==="gzip")Z.setHeader("Content-Encoding","gzip"),Q=Q.on("error",G).pipe(q3.createGzip()).on("error",G);Q.pipe(Z).on("error",G)}pZ.compressAndSend=uZ;function A3(Z){let $=new U3.Readable;return $.push(Z),$.push(null),$}function I3(Z){let $=new Set(["ECONNRESET","ECONNREFUSED","EPIPE","ETIMEDOUT","EAI_AGAIN","ENOTFOUND","ENETUNREACH","EHOSTUNREACH"]);if("code"in Z&&typeof Z.code==="string")return $.has(Z.code);return!1}});var sZ=X((nZ)=>{Object.defineProperty(nZ,"__esModule",{value:!0});nZ.createHttpExporterTransport=void 0;var S3=iZ();class aZ{_utils=null;_parameters;constructor(Z){this._parameters=Z}async send(Z,$){let{agent:Y,request:G}=await this._loadUtils(),Q=await this._parameters.headers();return(0,S3.sendWithHttp)(G,this._parameters.url,Q,this._parameters.compression,this._parameters.userAgent,Y,Z,$)}shutdown(){}async _loadUtils(){let Z=this._utils;if(Z===null){let $=new URL(this._parameters.url).protocol,[Y,G]=await Promise.all([this._parameters.agentFactory($),R3($)]);Z=this._utils={agent:Y,request:G}}return Z}}async function R3(Z){let $=Z==="http:"?import("http"):import("https"),{request:Y}=await $;return Y}function M3(Z){return new aZ(Z)}nZ.createHttpExporterTransport=M3});var $0=X((eZ)=>{Object.defineProperty(eZ,"__esModule",{value:!0});eZ.createRetryingTransport=void 0;var A=B(),g=5,b3=1000,T3=5000,k3=1.5,oZ=0.2;function E3(){return Math.random()*(2*oZ)-oZ}class rZ{_transport;constructor(Z){this._transport=Z}retry(Z,$,Y){return new Promise((G,Q)=>{setTimeout(()=>{this._transport.send(Z,$).then(G,Q)},Y)})}async send(Z,$){let Y=g,G=b3,Q=Date.now()+$,W=await this._transport.send(Z,$);while(W.status==="retryable"&&Y>0){Y--;let U=Math.max(Math.min(G*(1+E3()),T3),0);G=G*k3;let z=W.retryInMillis??U,K=Q-Date.now();if(z>K)return A.diag.info(`Export retry time ${Math.round(z)}ms exceeds remaining timeout ${Math.round(K)}ms, not retrying further.`),W;A.diag.verbose(`Scheduling export retry in ${Math.round(z)}ms`),W=await this.retry(Z,K,z)}if(W.status==="success")A.diag.verbose(`Export succeeded after ${g-Y} retry attempts.`);else if(W.status==="retryable")A.diag.info(`Export failed after maximum retry attempts (${g}).`);else A.diag.info(`Export failed with non-retryable error: ${W.error}`);return W}shutdown(){return this._transport.shutdown()}}function y3(Z){return new rZ(Z.transport)}eZ.createRetryingTransport=y3});var Q0=X((Y0)=>{Object.defineProperty(Y0,"__esModule",{value:!0});Y0.createOtlpHttpExportDelegate=void 0;var x3=v(),h3=sZ(),C3=_(),_3=$0();function v3(Z,$){return(0,x3.createOtlpExportDelegate)({transport:(0,_3.createRetryingTransport)({transport:(0,h3.createHttpExporterTransport)(Z)}),serializer:$,promiseHandler:(0,C3.createBoundedQueueExportPromiseHandler)(Z)},{timeout:Z.timeoutMillis})}Y0.createOtlpHttpExportDelegate=v3});var d=X((w0)=>{Object.defineProperty(w0,"__esModule",{value:!0});w0.getSharedConfigurationFromEnvironment=void 0;var X0=M(),K0=B();function W0(Z){let $=(0,X0.getNumberFromEnv)(Z);if($!=null){if(Number.isFinite($)&&$>0)return $;K0.diag.warn(`Configuration: ${Z} is invalid, expected number greater than 0 (actual: ${$})`)}return}function m3(Z){let $=W0(`OTEL_EXPORTER_OTLP_${Z}_TIMEOUT`),Y=W0("OTEL_EXPORTER_OTLP_TIMEOUT");return $??Y}function J0(Z){let $=(0,X0.getStringFromEnv)(Z)?.trim();if($==null||$==="none"||$==="gzip")return $;K0.diag.warn(`Configuration: ${Z} is invalid, expected 'none' or 'gzip' (actual: '${$}')`);return}function f3(Z){let $=J0(`OTEL_EXPORTER_OTLP_${Z}_COMPRESSION`),Y=J0("OTEL_EXPORTER_OTLP_COMPRESSION");return $??Y}function g3(Z){return{timeoutMillis:m3(Z),compression:f3(Z)}}w0.getSharedConfigurationFromEnvironment=g3});var B0=X((D0)=>{Object.defineProperty(D0,"__esModule",{value:!0});D0.getNodeHttpConfigurationFromEnvironment=void 0;var d3=V("fs"),c3=V("path"),w=M(),y=B(),u3=d(),p3=H(),l3=k();function i3(Z){let $=(0,w.getStringFromEnv)(`OTEL_EXPORTER_OTLP_${Z}_HEADERS`),Y=(0,w.getStringFromEnv)("OTEL_EXPORTER_OTLP_HEADERS"),G=(0,w.parseKeyPairsIntoRecord)($),Q=(0,w.parseKeyPairsIntoRecord)(Y);if(Object.keys(G).length===0&&Object.keys(Q).length===0)return;return Object.assign({},(0,w.parseKeyPairsIntoRecord)(Y),(0,w.parseKeyPairsIntoRecord)($))}function a3(Z){try{return new URL(Z).toString()}catch{y.diag.warn(`Configuration: Could not parse environment-provided export URL: '${Z}', falling back to undefined`);return}}function n3(Z,$){try{new URL(Z)}catch{y.diag.warn(`Configuration: Could not parse environment-provided export URL: '${Z}', falling back to undefined`);return}if(!Z.endsWith("/"))Z=Z+"/";Z+=$;try{new URL(Z)}catch{y.diag.warn(`Configuration: Provided URL appended with '${$}' is not a valid URL, using 'undefined' instead of '${Z}'`);return}return Z}function t3(Z){let $=(0,w.getStringFromEnv)("OTEL_EXPORTER_OTLP_ENDPOINT");if($===void 0)return;return n3($,Z)}function s3(Z){let $=(0,w.getStringFromEnv)(`OTEL_EXPORTER_OTLP_${Z}_ENDPOINT`);if($===void 0)return;return a3($)}function c(Z,$,Y){let G=(0,w.getStringFromEnv)(Z),Q=(0,w.getStringFromEnv)($),W=G??Q;if(W!=null)try{return d3.readFileSync(c3.resolve(process.cwd(),W))}catch{y.diag.warn(Y);return}else return}function o3(Z){return c(`OTEL_EXPORTER_OTLP_${Z}_CLIENT_CERTIFICATE`,"OTEL_EXPORTER_OTLP_CLIENT_CERTIFICATE","Failed to read client certificate chain file")}function r3(Z){return c(`OTEL_EXPORTER_OTLP_${Z}_CLIENT_KEY`,"OTEL_EXPORTER_OTLP_CLIENT_KEY","Failed to read client certificate private key file")}function e3(Z){return c(`OTEL_EXPORTER_OTLP_${Z}_CERTIFICATE`,"OTEL_EXPORTER_OTLP_CERTIFICATE","Failed to read root certificate file")}function Z4(Z,$){return{...(0,u3.getSharedConfigurationFromEnvironment)(Z),url:s3(Z)??t3($),headers:(0,p3.wrapStaticHeadersInFunction)(i3(Z)),agentFactory:(0,l3.httpAgentFactoryFromOptions)({keepAlive:!0,ca:e3(Z),cert:o3(Z),key:r3(Z)})}}D0.getNodeHttpConfigurationFromEnvironment=Z4});var j0=X((N0)=>{Object.defineProperty(N0,"__esModule",{value:!0});N0.convertLegacyHeaders=void 0;var $4=H();function Y4(Z){if(typeof Z.headers==="function")return Z.headers;return(0,$4.wrapStaticHeadersInFunction)(Z.headers)}N0.convertLegacyHeaders=Y4});var L0=X((U0)=>{Object.defineProperty(U0,"__esModule",{value:!0});U0.convertLegacyHttpOptions=void 0;var G4=B(),q0=k(),Q4=u(),W4=B0(),J4=j0();function X4(Z){if(typeof Z.httpAgentOptions==="function")return Z.httpAgentOptions;let $=Z.httpAgentOptions;if(Z.keepAlive!=null)$={keepAlive:Z.keepAlive,...$};if($!=null)return(0,Q4.httpAgentFactoryFromOptions)($);else return}function K4(Z,$,Y,G){if(Z.metadata)G4.diag.warn("Metadata cannot be set when using http");return(0,q0.mergeOtlpNodeHttpConfigurationWithDefaults)({url:Z.url,headers:(0,J4.convertLegacyHeaders)(Z),concurrencyLimit:Z.concurrencyLimit,timeoutMillis:Z.timeoutMillis,compression:Z.compression,agentFactory:X4(Z),userAgent:Z.userAgent},(0,W4.getNodeHttpConfigurationFromEnvironment)($,Y),(0,q0.getNodeHttpConfigurationDefaults)(G,Y))}U0.convertLegacyHttpOptions=K4});var u=X((L)=>{Object.defineProperty(L,"__esModule",{value:!0});L.convertLegacyHttpOptions=L.getSharedConfigurationFromEnvironment=L.createOtlpHttpExportDelegate=L.httpAgentFactoryFromOptions=void 0;var w4=k();Object.defineProperty(L,"httpAgentFactoryFromOptions",{enumerable:!0,get:function(){return w4.httpAgentFactoryFromOptions}});var z4=Q0();Object.defineProperty(L,"createOtlpHttpExportDelegate",{enumerable:!0,get:function(){return z4.createOtlpHttpExportDelegate}});var D4=d();Object.defineProperty(L,"getSharedConfigurationFromEnvironment",{enumerable:!0,get:function(){return D4.getSharedConfigurationFromEnvironment}});var F4=L0();Object.defineProperty(L,"convertLegacyHttpOptions",{enumerable:!0,get:function(){return F4.convertLegacyHttpOptions}})});var H0=b(jZ(),1);function qZ(Z,$){let Y={attributes:O(Z.attributes,$),droppedAttributesCount:0},G=Z.schemaUrl;if(G&&G!=="")Y.schemaUrl=G;return Y}function UZ(Z,$){let Y={name:Z.name,version:Z.version};if(Z.attributes&&Object.keys(Z.attributes).length>0)Y.attributes=O(Z.attributes,$),Y.droppedAttributesCount=Z.droppedAttributesCount??0;return Y}function O(Z,$){return Object.keys(Z).map((Y)=>l0(Y,Z[Y],$))}function l0(Z,$,Y){return{key:Z,value:m($,Y)}}function m(Z,$){let Y=typeof Z;if(Y==="string")return{stringValue:Z};if(Y==="number"){if(!Number.isInteger(Z))return{doubleValue:Z};return{intValue:Z}}if(Y==="boolean")return{boolValue:Z};if(Z instanceof Uint8Array)return{bytesValue:$.encodeUint8Array(Z)};if(Array.isArray(Z)){let G=Array(Z.length);for(let Q=0;Q<Z.length;Q++)G[Q]=m(Z[Q],$);return{arrayValue:{values:G}}}if(Y==="object"&&Z!=null){let G=Object.keys(Z),Q=Array(G.length);for(let W=0;W<G.length;W++)Q[W]={key:G[W],value:m(Z[G[W]],$)};return{kvlistValue:{values:Q}}}return{}}var i0=256,a0=512;function OZ(Z,$){let Y=Z&255|i0;if($)Y|=a0;return Y}function n0(Z,$){let Y=Z.spanContext(),G=Z.status,Q=Z.parentSpanContext?.spanId?$.encodeSpanContext(Z.parentSpanContext?.spanId):void 0;return{traceId:$.encodeSpanContext(Y.traceId),spanId:$.encodeSpanContext(Y.spanId),parentSpanId:Q,traceState:Y.traceState?.serialize(),name:Z.name,kind:Z.kind==null?0:Z.kind+1,startTimeUnixNano:$.encodeHrTime(Z.startTime),endTimeUnixNano:$.encodeHrTime(Z.endTime),attributes:O(Z.attributes,$),droppedAttributesCount:Z.droppedAttributesCount,events:Z.events.map((W)=>s0(W,$)),droppedEventsCount:Z.droppedEventsCount,status:{code:G.code,message:G.message},links:Z.links.map((W)=>t0(W,$)),droppedLinksCount:Z.droppedLinksCount,flags:OZ(Y.traceFlags,Z.parentSpanContext?.isRemote)}}function t0(Z,$){return{attributes:Z.attributes?O(Z.attributes,$):[],spanId:$.encodeSpanContext(Z.context.spanId),traceId:$.encodeSpanContext(Z.context.traceId),traceState:Z.context.traceState?.serialize(),droppedAttributesCount:Z.droppedAttributesCount||0,flags:OZ(Z.context.traceFlags,Z.context.isRemote)}}function s0(Z,$){return{attributes:Z.attributes?O(Z.attributes,$):[],name:Z.name,timeUnixNano:$.encodeHrTime(Z.time),droppedAttributesCount:Z.droppedAttributesCount||0}}function LZ(Z,$){return{resourceSpans:r0(Z,$)}}function o0(Z){let $=new Map;for(let Y of Z){let G=$.get(Y.resource);if(!G)G=new Map,$.set(Y.resource,G);let Q=`${Y.instrumentationScope.name}@${Y.instrumentationScope.version||""}:${Y.instrumentationScope.schemaUrl||""}`,W=G.get(Q);if(!W)W=[],G.set(Q,W);W.push(Y)}return $}function r0(Z,$){let Y=o0(Z),G=[],Q=Y.entries(),W=Q.next();while(!W.done){let[U,z]=W.value,K=[],I=z.values(),P=I.next();while(!P.done){let F=P.value;if(F.length>0){let S=F.map((D)=>n0(D,$));K.push({scope:UZ(F[0].instrumentationScope,$),spans:S,schemaUrl:F[0].instrumentationScope.schemaUrl})}P=I.next()}let j=qZ(U,$),J={resource:j,scopeSpans:K,schemaUrl:j.schemaUrl};G.push(J),W=Q.next()}return G}var AZ=b(M(),1);function e0(Z){let $=BigInt(1e9);return BigInt(Math.trunc(Z[0]))*$+BigInt(Math.trunc(Z[1]))}function Z3(Z){return e0(Z).toString()}var $3=typeof BigInt<"u"?Z3:AZ.hrTimeToNanoseconds;function HZ(Z){return Z}var IZ={encodeHrTime:$3,encodeSpanContext:HZ,encodeOptionalSpanContext:HZ,encodeUint8Array:(Z)=>{if(typeof Buffer<"u")return Buffer.from(Z).toString("base64");let $=Array(Z.length);for(let Y=0;Y<Z.length;Y++)$[Y]=String.fromCharCode(Z[Y]);return btoa($.join(""))}};var PZ=b(B(),1),T={serializeRequest:(Z)=>{let $=LZ(Z,IZ);return new TextEncoder().encode(JSON.stringify($))},deserializeResponse:(Z)=>{if(Z.length===0)return{};let $=new TextDecoder;try{return JSON.parse($.decode(Z))}catch(Y){return PZ.diag.warn(`Failed to parse trace export response: ${Y.message}. Returning empty response`),{}}}};var x=b(u(),1);class h extends H0.OTLPExporterBase{constructor(Z={}){super(x.createOtlpHttpExportDelegate(x.convertLegacyHttpOptions(Z,"TRACES","v1/traces",{"Content-Type":"application/json"}),T))}}export{h as OTLPTraceExporter};
2
+ import{Ef as M}from"./chunk-53bqcctj.js";import"./chunk-y9q0hb7b.js";import{AO as B}from"./chunk-zw815d68.js";import{BO as b,CO as X,FO as V}from"./chunk-7xm75w1e.js";var a=X((l)=>{Object.defineProperty(l,"__esModule",{value:!0});l.OTLPExporterBase=void 0;class p{_delegate;constructor(Z){this._delegate=Z}export(Z,$){this._delegate.export(Z,$)}forceFlush(){return this._delegate.forceFlush()}shutdown(){return this._delegate.shutdown()}}l.OTLPExporterBase=p});var R=X((t)=>{Object.defineProperty(t,"__esModule",{value:!0});t.OTLPExporterError=void 0;class n extends Error{code;name="OTLPExporterError";data;constructor(Z,$,Y){super(Z);this.data=Y,this.code=$}}t.OTLPExporterError=n});var H=X((r)=>{Object.defineProperty(r,"__esModule",{value:!0});r.getSharedConfigurationDefaults=r.mergeOtlpSharedConfigurationWithDefaults=r.wrapStaticHeadersInFunction=r.validateTimeoutMillis=void 0;function o(Z){if(Number.isFinite(Z)&&Z>0)return Z;throw Error(`Configuration: timeoutMillis is invalid, expected number greater than 0 (actual: '${Z}')`)}r.validateTimeoutMillis=o;function I0(Z){if(Z==null)return;return async()=>Z}r.wrapStaticHeadersInFunction=I0;function P0(Z,$,Y){return{timeoutMillis:o(Z.timeoutMillis??$.timeoutMillis??Y.timeoutMillis),concurrencyLimit:Z.concurrencyLimit??$.concurrencyLimit??Y.concurrencyLimit,compression:Z.compression??$.compression??Y.compression}}r.mergeOtlpSharedConfigurationWithDefaults=P0;function S0(){return{timeoutMillis:1e4,concurrencyLimit:30,compression:"none"}}r.getSharedConfigurationDefaults=S0});var $Z=X((ZZ)=>{Object.defineProperty(ZZ,"__esModule",{value:!0});ZZ.CompressionAlgorithm=void 0;var T0;(function(Z){Z.NONE="none",Z.GZIP="gzip"})(T0=ZZ.CompressionAlgorithm||(ZZ.CompressionAlgorithm={}))});var _=X((GZ)=>{Object.defineProperty(GZ,"__esModule",{value:!0});GZ.createBoundedQueueExportPromiseHandler=void 0;class YZ{_concurrencyLimit;_sendingPromises=[];constructor(Z){this._concurrencyLimit=Z}pushPromise(Z){if(this.hasReachedLimit())throw Error("Concurrency Limit reached");this._sendingPromises.push(Z);let $=()=>{let Y=this._sendingPromises.indexOf(Z);this._sendingPromises.splice(Y,1)};Z.then($,$)}hasReachedLimit(){return this._sendingPromises.length>=this._concurrencyLimit}async awaitAll(){await Promise.all(this._sendingPromises)}}function k0(Z){return new YZ(Z.concurrencyLimit)}GZ.createBoundedQueueExportPromiseHandler=k0});var XZ=X((WZ)=>{Object.defineProperty(WZ,"__esModule",{value:!0});WZ.createLoggingPartialSuccessResponseHandler=void 0;var E0=B();function y0(Z){return Object.prototype.hasOwnProperty.call(Z,"partialSuccess")}function x0(){return{handleResponse(Z){if(Z==null||!y0(Z)||Z.partialSuccess==null||Object.keys(Z.partialSuccess).length===0)return;E0.diag.warn("Received Partial Success response:",JSON.stringify(Z.partialSuccess))}}}WZ.createLoggingPartialSuccessResponseHandler=x0});var v=X((zZ)=>{Object.defineProperty(zZ,"__esModule",{value:!0});zZ.createOtlpExportDelegate=void 0;var q=M(),KZ=R(),h0=XZ(),C0=B();class wZ{_diagLogger;_transport;_serializer;_responseHandler;_promiseQueue;_timeout;constructor(Z,$,Y,G,Q){this._transport=Z,this._serializer=$,this._responseHandler=Y,this._promiseQueue=G,this._timeout=Q,this._diagLogger=C0.diag.createComponentLogger({namespace:"OTLPExportDelegate"})}export(Z,$){if(this._diagLogger.debug("items to be sent",Z),this._promiseQueue.hasReachedLimit()){$({code:q.ExportResultCode.FAILED,error:Error("Concurrent export limit reached")});return}let Y=this._serializer.serializeRequest(Z);if(Y==null){$({code:q.ExportResultCode.FAILED,error:Error("Nothing to send")});return}this._promiseQueue.pushPromise(this._transport.send(Y,this._timeout).then((G)=>{if(G.status==="success"){if(G.data!=null)try{this._responseHandler.handleResponse(this._serializer.deserializeResponse(G.data))}catch(Q){this._diagLogger.warn("Export succeeded but could not deserialize response - is the response specification compliant?",Q,G.data)}$({code:q.ExportResultCode.SUCCESS});return}else if(G.status==="failure"&&G.error){$({code:q.ExportResultCode.FAILED,error:G.error});return}else if(G.status==="retryable")$({code:q.ExportResultCode.FAILED,error:G.error??new KZ.OTLPExporterError("Export failed with retryable status")});else $({code:q.ExportResultCode.FAILED,error:new KZ.OTLPExporterError("Export failed with unknown error")})},(G)=>$({code:q.ExportResultCode.FAILED,error:G})))}forceFlush(){return this._promiseQueue.awaitAll()}async shutdown(){this._diagLogger.debug("shutdown started"),await this.forceFlush(),this._transport.shutdown()}}function _0(Z,$){return new wZ(Z.transport,Z.serializer,(0,h0.createLoggingPartialSuccessResponseHandler)(),Z.promiseHandler,$.timeout)}zZ.createOtlpExportDelegate=_0});var NZ=X((FZ)=>{Object.defineProperty(FZ,"__esModule",{value:!0});FZ.createOtlpNetworkExportDelegate=void 0;var v0=_(),m0=v();function f0(Z,$,Y){return(0,m0.createOtlpExportDelegate)({transport:Y,serializer:$,promiseHandler:(0,v0.createBoundedQueueExportPromiseHandler)(Z)},{timeout:Z.timeoutMillis})}FZ.createOtlpNetworkExportDelegate=f0});var jZ=X((N)=>{Object.defineProperty(N,"__esModule",{value:!0});N.createOtlpNetworkExportDelegate=N.CompressionAlgorithm=N.getSharedConfigurationDefaults=N.mergeOtlpSharedConfigurationWithDefaults=N.OTLPExporterError=N.OTLPExporterBase=void 0;var g0=a();Object.defineProperty(N,"OTLPExporterBase",{enumerable:!0,get:function(){return g0.OTLPExporterBase}});var d0=R();Object.defineProperty(N,"OTLPExporterError",{enumerable:!0,get:function(){return d0.OTLPExporterError}});var VZ=H();Object.defineProperty(N,"mergeOtlpSharedConfigurationWithDefaults",{enumerable:!0,get:function(){return VZ.mergeOtlpSharedConfigurationWithDefaults}});Object.defineProperty(N,"getSharedConfigurationDefaults",{enumerable:!0,get:function(){return VZ.getSharedConfigurationDefaults}});var c0=$Z();Object.defineProperty(N,"CompressionAlgorithm",{enumerable:!0,get:function(){return c0.CompressionAlgorithm}});var u0=NZ();Object.defineProperty(N,"createOtlpNetworkExportDelegate",{enumerable:!0,get:function(){return u0.createOtlpNetworkExportDelegate}})});var MZ=X((SZ)=>{Object.defineProperty(SZ,"__esModule",{value:!0});SZ.validateAndNormalizeHeaders=void 0;var Y3=B();function G3(Z){let $={};return Object.entries(Z??{}).forEach(([Y,G])=>{if(typeof G<"u")$[Y]=String(G);else Y3.diag.warn(`Header "${Y}" has invalid value (${G}) and will be ignored`)}),$}SZ.validateAndNormalizeHeaders=G3});var EZ=X((TZ)=>{Object.defineProperty(TZ,"__esModule",{value:!0});TZ.getHttpConfigurationDefaults=TZ.mergeOtlpHttpConfigurationWithDefaults=void 0;var bZ=H(),Q3=MZ();function W3(Z,$,Y){return async()=>{let G={...await Y()},Q={};if($!=null)Object.assign(Q,await $());if(Z!=null)Object.assign(Q,(0,Q3.validateAndNormalizeHeaders)(await Z()));return Object.assign(Q,G)}}function J3(Z){if(Z==null)return;try{let $=globalThis.location?.href;return new URL(Z,$).href}catch{throw Error(`Configuration: Could not parse user-provided export URL: '${Z}'`)}}function X3(Z,$,Y){return{...(0,bZ.mergeOtlpSharedConfigurationWithDefaults)(Z,$,Y),headers:W3(Z.headers,$.headers,Y.headers),url:J3(Z.url)??$.url??Y.url}}TZ.mergeOtlpHttpConfigurationWithDefaults=X3;function K3(Z,$){return{...(0,bZ.getSharedConfigurationDefaults)(),headers:async()=>Z,url:"http://localhost:4318/"+$}}TZ.getHttpConfigurationDefaults=K3});var k=X((hZ)=>{Object.defineProperty(hZ,"__esModule",{value:!0});hZ.getNodeHttpConfigurationDefaults=hZ.mergeOtlpNodeHttpConfigurationWithDefaults=hZ.httpAgentFactoryFromOptions=void 0;var yZ=EZ();function xZ(Z){return async($)=>{let Y=$==="http:",G=Y?import("http"):import("https"),{Agent:Q}=await G;if(Y){let{ca:W,cert:U,key:z,...K}=Z;return new Q(K)}return new Q(Z)}}hZ.httpAgentFactoryFromOptions=xZ;function z3(Z,$,Y){return{...(0,yZ.mergeOtlpHttpConfigurationWithDefaults)(Z,$,Y),agentFactory:Z.agentFactory??$.agentFactory??Y.agentFactory,userAgent:Z.userAgent}}hZ.mergeOtlpNodeHttpConfigurationWithDefaults=z3;function D3(Z,$){return{...(0,yZ.getHttpConfigurationDefaults)(Z,$),agentFactory:xZ({keepAlive:!0})}}hZ.getNodeHttpConfigurationDefaults=D3});var mZ=X((_Z)=>{Object.defineProperty(_Z,"__esModule",{value:!0});_Z.parseRetryAfterToMills=_Z.isExportHTTPErrorRetryable=void 0;function N3(Z){return Z===429||Z===502||Z===503||Z===504}_Z.isExportHTTPErrorRetryable=N3;function V3(Z){if(Z==null)return;let $=Number.parseInt(Z,10);if(Number.isInteger($))return $>0?$*1000:-1;let Y=new Date(Z).getTime()-Date.now();if(Y>=0)return Y;return 0}_Z.parseRetryAfterToMills=V3});var dZ=X((fZ)=>{Object.defineProperty(fZ,"__esModule",{value:!0});fZ.VERSION=void 0;fZ.VERSION="0.220.0"});var iZ=X((pZ)=>{Object.defineProperty(pZ,"__esModule",{value:!0});pZ.compressAndSend=pZ.sendWithHttp=pZ.MAX_RESPONSE_BODY_SIZE=void 0;var q3=V("zlib"),U3=V("stream"),E=mZ(),O3=R(),L3=dZ(),cZ=`OTel-OTLP-Exporter-JavaScript/${L3.VERSION}`;pZ.MAX_RESPONSE_BODY_SIZE=4194304;function H3(Z,$,Y,G,Q,W,U,z){return new Promise((K)=>{let I=new URL($);if(Q)Y["User-Agent"]=`${Q} ${cZ}`;else Y["User-Agent"]=cZ;let j=Z(I,{method:"POST",headers:Y,agent:W},(J)=>{let F=[],S=0;J.on("data",(D)=>{if(S+=D.length,S>pZ.MAX_RESPONSE_BODY_SIZE){let A0=Error(`OTLP export response body exceeded size limit of ${pZ.MAX_RESPONSE_BODY_SIZE} bytes`);K({status:"failure",error:A0}),J.destroy();return}F.push(D)}),J.on("end",()=>{if(J.statusCode&&J.statusCode<=299)K({status:"success",data:Buffer.concat(F)});else if(J.statusCode&&(0,E.isExportHTTPErrorRetryable)(J.statusCode))K({status:"retryable",retryInMillis:(0,E.parseRetryAfterToMills)(J.headers["retry-after"])});else{let D=new O3.OTLPExporterError(J.statusMessage,J.statusCode,Buffer.concat(F).toString());K({status:"failure",error:D})}}),J.on("error",(D)=>{if(J.statusCode&&J.statusCode<=299)K({status:"success"});else if(J.statusCode&&(0,E.isExportHTTPErrorRetryable)(J.statusCode))K({status:"retryable",error:D,retryInMillis:(0,E.parseRetryAfterToMills)(J.headers["retry-after"])});else K({status:"failure",error:D})})});j.setTimeout(z,()=>{j.destroy(),K({status:"retryable",error:Error("Request timed out")})}),j.on("error",(J)=>{if(I3(J))K({status:"retryable",error:J});else K({status:"failure",error:J})}),uZ(j,G,U,(J)=>{K({status:"failure",error:J})})})}pZ.sendWithHttp=H3;function uZ(Z,$,Y,G){let Q=A3(Y);if($==="gzip")Z.setHeader("Content-Encoding","gzip"),Q=Q.on("error",G).pipe(q3.createGzip()).on("error",G);Q.pipe(Z).on("error",G)}pZ.compressAndSend=uZ;function A3(Z){let $=new U3.Readable;return $.push(Z),$.push(null),$}function I3(Z){let $=new Set(["ECONNRESET","ECONNREFUSED","EPIPE","ETIMEDOUT","EAI_AGAIN","ENOTFOUND","ENETUNREACH","EHOSTUNREACH"]);if("code"in Z&&typeof Z.code==="string")return $.has(Z.code);return!1}});var sZ=X((nZ)=>{Object.defineProperty(nZ,"__esModule",{value:!0});nZ.createHttpExporterTransport=void 0;var S3=iZ();class aZ{_utils=null;_parameters;constructor(Z){this._parameters=Z}async send(Z,$){let{agent:Y,request:G}=await this._loadUtils(),Q=await this._parameters.headers();return(0,S3.sendWithHttp)(G,this._parameters.url,Q,this._parameters.compression,this._parameters.userAgent,Y,Z,$)}shutdown(){}async _loadUtils(){let Z=this._utils;if(Z===null){let $=new URL(this._parameters.url).protocol,[Y,G]=await Promise.all([this._parameters.agentFactory($),R3($)]);Z=this._utils={agent:Y,request:G}}return Z}}async function R3(Z){let $=Z==="http:"?import("http"):import("https"),{request:Y}=await $;return Y}function M3(Z){return new aZ(Z)}nZ.createHttpExporterTransport=M3});var $0=X((eZ)=>{Object.defineProperty(eZ,"__esModule",{value:!0});eZ.createRetryingTransport=void 0;var A=B(),g=5,b3=1000,T3=5000,k3=1.5,oZ=0.2;function E3(){return Math.random()*(2*oZ)-oZ}class rZ{_transport;constructor(Z){this._transport=Z}retry(Z,$,Y){return new Promise((G,Q)=>{setTimeout(()=>{this._transport.send(Z,$).then(G,Q)},Y)})}async send(Z,$){let Y=g,G=b3,Q=Date.now()+$,W=await this._transport.send(Z,$);while(W.status==="retryable"&&Y>0){Y--;let U=Math.max(Math.min(G*(1+E3()),T3),0);G=G*k3;let z=W.retryInMillis??U,K=Q-Date.now();if(z>K)return A.diag.info(`Export retry time ${Math.round(z)}ms exceeds remaining timeout ${Math.round(K)}ms, not retrying further.`),W;A.diag.verbose(`Scheduling export retry in ${Math.round(z)}ms`),W=await this.retry(Z,K,z)}if(W.status==="success")A.diag.verbose(`Export succeeded after ${g-Y} retry attempts.`);else if(W.status==="retryable")A.diag.info(`Export failed after maximum retry attempts (${g}).`);else A.diag.info(`Export failed with non-retryable error: ${W.error}`);return W}shutdown(){return this._transport.shutdown()}}function y3(Z){return new rZ(Z.transport)}eZ.createRetryingTransport=y3});var Q0=X((Y0)=>{Object.defineProperty(Y0,"__esModule",{value:!0});Y0.createOtlpHttpExportDelegate=void 0;var x3=v(),h3=sZ(),C3=_(),_3=$0();function v3(Z,$){return(0,x3.createOtlpExportDelegate)({transport:(0,_3.createRetryingTransport)({transport:(0,h3.createHttpExporterTransport)(Z)}),serializer:$,promiseHandler:(0,C3.createBoundedQueueExportPromiseHandler)(Z)},{timeout:Z.timeoutMillis})}Y0.createOtlpHttpExportDelegate=v3});var d=X((w0)=>{Object.defineProperty(w0,"__esModule",{value:!0});w0.getSharedConfigurationFromEnvironment=void 0;var X0=M(),K0=B();function W0(Z){let $=(0,X0.getNumberFromEnv)(Z);if($!=null){if(Number.isFinite($)&&$>0)return $;K0.diag.warn(`Configuration: ${Z} is invalid, expected number greater than 0 (actual: ${$})`)}return}function m3(Z){let $=W0(`OTEL_EXPORTER_OTLP_${Z}_TIMEOUT`),Y=W0("OTEL_EXPORTER_OTLP_TIMEOUT");return $??Y}function J0(Z){let $=(0,X0.getStringFromEnv)(Z)?.trim();if($==null||$==="none"||$==="gzip")return $;K0.diag.warn(`Configuration: ${Z} is invalid, expected 'none' or 'gzip' (actual: '${$}')`);return}function f3(Z){let $=J0(`OTEL_EXPORTER_OTLP_${Z}_COMPRESSION`),Y=J0("OTEL_EXPORTER_OTLP_COMPRESSION");return $??Y}function g3(Z){return{timeoutMillis:m3(Z),compression:f3(Z)}}w0.getSharedConfigurationFromEnvironment=g3});var B0=X((D0)=>{Object.defineProperty(D0,"__esModule",{value:!0});D0.getNodeHttpConfigurationFromEnvironment=void 0;var d3=V("fs"),c3=V("path"),w=M(),y=B(),u3=d(),p3=H(),l3=k();function i3(Z){let $=(0,w.getStringFromEnv)(`OTEL_EXPORTER_OTLP_${Z}_HEADERS`),Y=(0,w.getStringFromEnv)("OTEL_EXPORTER_OTLP_HEADERS"),G=(0,w.parseKeyPairsIntoRecord)($),Q=(0,w.parseKeyPairsIntoRecord)(Y);if(Object.keys(G).length===0&&Object.keys(Q).length===0)return;return Object.assign({},(0,w.parseKeyPairsIntoRecord)(Y),(0,w.parseKeyPairsIntoRecord)($))}function a3(Z){try{return new URL(Z).toString()}catch{y.diag.warn(`Configuration: Could not parse environment-provided export URL: '${Z}', falling back to undefined`);return}}function n3(Z,$){try{new URL(Z)}catch{y.diag.warn(`Configuration: Could not parse environment-provided export URL: '${Z}', falling back to undefined`);return}if(!Z.endsWith("/"))Z=Z+"/";Z+=$;try{new URL(Z)}catch{y.diag.warn(`Configuration: Provided URL appended with '${$}' is not a valid URL, using 'undefined' instead of '${Z}'`);return}return Z}function t3(Z){let $=(0,w.getStringFromEnv)("OTEL_EXPORTER_OTLP_ENDPOINT");if($===void 0)return;return n3($,Z)}function s3(Z){let $=(0,w.getStringFromEnv)(`OTEL_EXPORTER_OTLP_${Z}_ENDPOINT`);if($===void 0)return;return a3($)}function c(Z,$,Y){let G=(0,w.getStringFromEnv)(Z),Q=(0,w.getStringFromEnv)($),W=G??Q;if(W!=null)try{return d3.readFileSync(c3.resolve(process.cwd(),W))}catch{y.diag.warn(Y);return}else return}function o3(Z){return c(`OTEL_EXPORTER_OTLP_${Z}_CLIENT_CERTIFICATE`,"OTEL_EXPORTER_OTLP_CLIENT_CERTIFICATE","Failed to read client certificate chain file")}function r3(Z){return c(`OTEL_EXPORTER_OTLP_${Z}_CLIENT_KEY`,"OTEL_EXPORTER_OTLP_CLIENT_KEY","Failed to read client certificate private key file")}function e3(Z){return c(`OTEL_EXPORTER_OTLP_${Z}_CERTIFICATE`,"OTEL_EXPORTER_OTLP_CERTIFICATE","Failed to read root certificate file")}function Z4(Z,$){return{...(0,u3.getSharedConfigurationFromEnvironment)(Z),url:s3(Z)??t3($),headers:(0,p3.wrapStaticHeadersInFunction)(i3(Z)),agentFactory:(0,l3.httpAgentFactoryFromOptions)({keepAlive:!0,ca:e3(Z),cert:o3(Z),key:r3(Z)})}}D0.getNodeHttpConfigurationFromEnvironment=Z4});var j0=X((N0)=>{Object.defineProperty(N0,"__esModule",{value:!0});N0.convertLegacyHeaders=void 0;var $4=H();function Y4(Z){if(typeof Z.headers==="function")return Z.headers;return(0,$4.wrapStaticHeadersInFunction)(Z.headers)}N0.convertLegacyHeaders=Y4});var L0=X((U0)=>{Object.defineProperty(U0,"__esModule",{value:!0});U0.convertLegacyHttpOptions=void 0;var G4=B(),q0=k(),Q4=u(),W4=B0(),J4=j0();function X4(Z){if(typeof Z.httpAgentOptions==="function")return Z.httpAgentOptions;let $=Z.httpAgentOptions;if(Z.keepAlive!=null)$={keepAlive:Z.keepAlive,...$};if($!=null)return(0,Q4.httpAgentFactoryFromOptions)($);else return}function K4(Z,$,Y,G){if(Z.metadata)G4.diag.warn("Metadata cannot be set when using http");return(0,q0.mergeOtlpNodeHttpConfigurationWithDefaults)({url:Z.url,headers:(0,J4.convertLegacyHeaders)(Z),concurrencyLimit:Z.concurrencyLimit,timeoutMillis:Z.timeoutMillis,compression:Z.compression,agentFactory:X4(Z),userAgent:Z.userAgent},(0,W4.getNodeHttpConfigurationFromEnvironment)($,Y),(0,q0.getNodeHttpConfigurationDefaults)(G,Y))}U0.convertLegacyHttpOptions=K4});var u=X((L)=>{Object.defineProperty(L,"__esModule",{value:!0});L.convertLegacyHttpOptions=L.getSharedConfigurationFromEnvironment=L.createOtlpHttpExportDelegate=L.httpAgentFactoryFromOptions=void 0;var w4=k();Object.defineProperty(L,"httpAgentFactoryFromOptions",{enumerable:!0,get:function(){return w4.httpAgentFactoryFromOptions}});var z4=Q0();Object.defineProperty(L,"createOtlpHttpExportDelegate",{enumerable:!0,get:function(){return z4.createOtlpHttpExportDelegate}});var D4=d();Object.defineProperty(L,"getSharedConfigurationFromEnvironment",{enumerable:!0,get:function(){return D4.getSharedConfigurationFromEnvironment}});var F4=L0();Object.defineProperty(L,"convertLegacyHttpOptions",{enumerable:!0,get:function(){return F4.convertLegacyHttpOptions}})});var H0=b(jZ(),1);function qZ(Z,$){let Y={attributes:O(Z.attributes,$),droppedAttributesCount:0},G=Z.schemaUrl;if(G&&G!=="")Y.schemaUrl=G;return Y}function UZ(Z,$){let Y={name:Z.name,version:Z.version};if(Z.attributes&&Object.keys(Z.attributes).length>0)Y.attributes=O(Z.attributes,$),Y.droppedAttributesCount=Z.droppedAttributesCount??0;return Y}function O(Z,$){return Object.keys(Z).map((Y)=>l0(Y,Z[Y],$))}function l0(Z,$,Y){return{key:Z,value:m($,Y)}}function m(Z,$){let Y=typeof Z;if(Y==="string")return{stringValue:Z};if(Y==="number"){if(!Number.isInteger(Z))return{doubleValue:Z};return{intValue:Z}}if(Y==="boolean")return{boolValue:Z};if(Z instanceof Uint8Array)return{bytesValue:$.encodeUint8Array(Z)};if(Array.isArray(Z)){let G=Array(Z.length);for(let Q=0;Q<Z.length;Q++)G[Q]=m(Z[Q],$);return{arrayValue:{values:G}}}if(Y==="object"&&Z!=null){let G=Object.keys(Z),Q=Array(G.length);for(let W=0;W<G.length;W++)Q[W]={key:G[W],value:m(Z[G[W]],$)};return{kvlistValue:{values:Q}}}return{}}var i0=256,a0=512;function OZ(Z,$){let Y=Z&255|i0;if($)Y|=a0;return Y}function n0(Z,$){let Y=Z.spanContext(),G=Z.status,Q=Z.parentSpanContext?.spanId?$.encodeSpanContext(Z.parentSpanContext?.spanId):void 0;return{traceId:$.encodeSpanContext(Y.traceId),spanId:$.encodeSpanContext(Y.spanId),parentSpanId:Q,traceState:Y.traceState?.serialize(),name:Z.name,kind:Z.kind==null?0:Z.kind+1,startTimeUnixNano:$.encodeHrTime(Z.startTime),endTimeUnixNano:$.encodeHrTime(Z.endTime),attributes:O(Z.attributes,$),droppedAttributesCount:Z.droppedAttributesCount,events:Z.events.map((W)=>s0(W,$)),droppedEventsCount:Z.droppedEventsCount,status:{code:G.code,message:G.message},links:Z.links.map((W)=>t0(W,$)),droppedLinksCount:Z.droppedLinksCount,flags:OZ(Y.traceFlags,Z.parentSpanContext?.isRemote)}}function t0(Z,$){return{attributes:Z.attributes?O(Z.attributes,$):[],spanId:$.encodeSpanContext(Z.context.spanId),traceId:$.encodeSpanContext(Z.context.traceId),traceState:Z.context.traceState?.serialize(),droppedAttributesCount:Z.droppedAttributesCount||0,flags:OZ(Z.context.traceFlags,Z.context.isRemote)}}function s0(Z,$){return{attributes:Z.attributes?O(Z.attributes,$):[],name:Z.name,timeUnixNano:$.encodeHrTime(Z.time),droppedAttributesCount:Z.droppedAttributesCount||0}}function LZ(Z,$){return{resourceSpans:r0(Z,$)}}function o0(Z){let $=new Map;for(let Y of Z){let G=$.get(Y.resource);if(!G)G=new Map,$.set(Y.resource,G);let Q=`${Y.instrumentationScope.name}@${Y.instrumentationScope.version||""}:${Y.instrumentationScope.schemaUrl||""}`,W=G.get(Q);if(!W)W=[],G.set(Q,W);W.push(Y)}return $}function r0(Z,$){let Y=o0(Z),G=[],Q=Y.entries(),W=Q.next();while(!W.done){let[U,z]=W.value,K=[],I=z.values(),P=I.next();while(!P.done){let F=P.value;if(F.length>0){let S=F.map((D)=>n0(D,$));K.push({scope:UZ(F[0].instrumentationScope,$),spans:S,schemaUrl:F[0].instrumentationScope.schemaUrl})}P=I.next()}let j=qZ(U,$),J={resource:j,scopeSpans:K,schemaUrl:j.schemaUrl};G.push(J),W=Q.next()}return G}var AZ=b(M(),1);function e0(Z){let $=BigInt(1e9);return BigInt(Math.trunc(Z[0]))*$+BigInt(Math.trunc(Z[1]))}function Z3(Z){return e0(Z).toString()}var $3=typeof BigInt<"u"?Z3:AZ.hrTimeToNanoseconds;function HZ(Z){return Z}var IZ={encodeHrTime:$3,encodeSpanContext:HZ,encodeOptionalSpanContext:HZ,encodeUint8Array:(Z)=>{if(typeof Buffer<"u")return Buffer.from(Z).toString("base64");let $=Array(Z.length);for(let Y=0;Y<Z.length;Y++)$[Y]=String.fromCharCode(Z[Y]);return btoa($.join(""))}};var PZ=b(B(),1),T={serializeRequest:(Z)=>{let $=LZ(Z,IZ);return new TextEncoder().encode(JSON.stringify($))},deserializeResponse:(Z)=>{if(Z.length===0)return{};let $=new TextDecoder;try{return JSON.parse($.decode(Z))}catch(Y){return PZ.diag.warn(`Failed to parse trace export response: ${Y.message}. Returning empty response`),{}}}};var x=b(u(),1);class h extends H0.OTLPExporterBase{constructor(Z={}){super(x.createOtlpHttpExportDelegate(x.convertLegacyHttpOptions(Z,"TRACES","v1/traces",{"Content-Type":"application/json"}),T))}}export{h as OTLPTraceExporter};
@@ -0,0 +1,2 @@
1
+ // @bun
2
+ import{Ig as r}from"./chunk-xvwvd4kq.js";import{FO as o}from"./chunk-7xm75w1e.js";var c=new r("zod v4");async function m(){return async(n,e)=>{let t;if("_zod"in n)try{t=(await import("./chunk-xm7wascx.js")).toJSONSchema}catch{throw c}else try{t=(await import("./chunk-81qwdg5s.js")).zodToJsonSchema}catch{throw new r("zod-to-json-schema")}return t(n,e)}}export{m as default};
@@ -1,2 +1,2 @@
1
1
  // @bun
2
- import"./chunk-yjj4cvqg.js";var e={"ui.sessionReview.title":"Altera\xE7\xF5es da sess\xE3o","ui.sessionReview.title.lastTurn":"Altera\xE7\xF5es do \xFAltimo turno","ui.sessionReview.diffStyle.unified":"Unificado","ui.sessionReview.diffStyle.split":"Dividido","ui.sessionReview.openFile":"Abrir arquivo","ui.sessionReview.selection.line":"linha {{line}}","ui.sessionReview.selection.lines":"linhas {{start}}-{{end}}","ui.sessionReview.expandAll":"Expandir tudo","ui.sessionReview.collapseAll":"Recolher tudo","ui.sessionReview.change.added":"Adicionado","ui.sessionReview.change.removed":"Removido","ui.sessionReview.change.modified":"Modificado","ui.sessionReview.image.loading":"Carregando...","ui.sessionReview.image.placeholder":"Imagem","ui.sessionReview.largeDiff.title":"Diff grande demais para renderizar","ui.sessionReview.largeDiff.meta":"Limite: {{limit}} linhas alteradas. Atual: {{current}} linhas alteradas.","ui.sessionReview.largeDiff.renderAnyway":"Renderizar mesmo assim","ui.fileMedia.kind.image":"imagem","ui.fileMedia.kind.audio":"\xE1udio","ui.fileMedia.state.removed":"Removido: {{kind}}","ui.fileMedia.state.loading":"Carregando {{kind}}...","ui.fileMedia.state.error":"Erro ao carregar {{kind}}","ui.fileMedia.state.unavailable":"{{kind}} indispon\xEDvel","ui.fileMedia.binary.title":"Arquivo bin\xE1rio","ui.fileMedia.binary.description.path":"N\xE3o \xE9 poss\xEDvel exibir {{path}} porque \xE9 um arquivo bin\xE1rio.","ui.fileMedia.binary.description.default":"N\xE3o \xE9 poss\xEDvel exibir o arquivo porque ele \xE9 bin\xE1rio.","ui.lineComment.label.prefix":"Comentar em ","ui.lineComment.label.suffix":"","ui.lineComment.editorLabel.prefix":"Comentando em ","ui.lineComment.editorLabel.suffix":"","ui.lineComment.placeholder":"Adicionar coment\xE1rio","ui.lineComment.submit":"Comentar","ui.sessionTurn.steps.show":"Mostrar passos","ui.sessionTurn.steps.hide":"Ocultar passos","ui.sessionTurn.summary.response":"Resposta","ui.sessionTurn.diff.showMore":"Mostrar mais altera\xE7\xF5es ({{count}})","ui.sessionTurn.retry.retrying":"tentando novamente","ui.sessionTurn.retry.inSeconds":"em {{seconds}}s","ui.sessionTurn.retry.attempt":"tentativa #{{attempt}}","ui.sessionTurn.retry.attemptLine":"{{line}} - tentativa #{{attempt}}","ui.sessionTurn.retry.geminiHot":"gemini est\xE1 muito sobrecarregado agora","ui.sessionTurn.error.freeUsageExceeded":"Limite de uso gratuito excedido","ui.sessionTurn.error.addQredits":"Adicionar cr\xE9ditos","ui.sessionTurn.status.delegating":"Delegando trabalho","ui.sessionTurn.status.planning":"Planejando pr\xF3ximos passos","ui.sessionTurn.status.gatheringContext":"Explorando","ui.sessionTurn.status.gatheredContext":"Explorado","ui.sessionTurn.status.searchingCodebase":"Pesquisando no c\xF3digo","ui.sessionTurn.status.searchingWeb":"Pesquisando na web","ui.sessionTurn.status.makingEdits":"Fazendo edi\xE7\xF5es","ui.sessionTurn.status.runningCommands":"Executando comandos","ui.sessionTurn.status.thinking":"Pensando","ui.sessionTurn.status.thinkingWithTopic":"Pensando - {{topic}}","ui.sessionTurn.status.gatheringThoughts":"Organizando pensamentos","ui.sessionTurn.status.consideringNextSteps":"Considerando pr\xF3ximos passos","ui.messagePart.questions.dismissed":"Perguntas descartadas","ui.messagePart.compaction":"Sess\xE3o compactada","ui.messagePart.context.read.one":"{{count}} leitura","ui.messagePart.context.read.other":"{{count}} leituras","ui.messagePart.context.search.one":"{{count}} pesquisa","ui.messagePart.context.search.other":"{{count}} pesquisas","ui.messagePart.context.list.one":"{{count}} lista","ui.messagePart.context.list.other":"{{count}} listas","ui.messagePart.diagnostic.error":"Erro","ui.messagePart.title.edit":"Editar","ui.messagePart.title.write":"Escrever","ui.messagePart.option.typeOwnAnswer":"Digite sua pr\xF3pria resposta","ui.messagePart.review.title":"Revise suas respostas","ui.list.loading":"Carregando","ui.list.empty":"Nenhum resultado","ui.list.clearFilter":"Limpar filtro","ui.list.emptyWithFilter.prefix":"Nenhum resultado para","ui.list.emptyWithFilter.suffix":"","ui.messageNav.newMessage":"Nova mensagem","ui.textField.copyToClipboard":"Copiar para \xE1rea de transfer\xEAncia","ui.textField.copyLink":"Copiar link","ui.textField.copied":"Copiado","ui.imagePreview.alt":"Visualiza\xE7\xE3o de imagem","ui.scrollView.ariaLabel":"conte\xFAdo rol\xE1vel","ui.tool.read":"Ler","ui.tool.loaded":"Carregado","ui.tool.list":"Listar","ui.tool.glob":"Glob","ui.tool.grep":"Grep","ui.tool.webfetch":"Buscar Web","ui.tool.websearch":"Pesquisa na Web","ui.tool.codesearch":"Pesquisa de C\xF3digo","ui.tool.shell":"Shell","ui.tool.patch":"Patch","ui.tool.todos":"Tarefas","ui.tool.todos.read":"Ler tarefas","ui.tool.questions":"Perguntas","ui.tool.agent":"Agente {{type}}","ui.tool.agent.default":"Agente","ui.common.file.one":"arquivo","ui.common.file.other":"arquivos","ui.common.question.one":"pergunta","ui.common.question.other":"perguntas","ui.common.add":"Adicionar","ui.common.back":"Voltar","ui.common.cancel":"Cancelar","ui.common.confirm":"Confirmar","ui.common.dismiss":"Descartar","ui.common.close":"Fechar","ui.common.next":"Pr\xF3ximo","ui.common.submit":"Enviar","ui.permission.deny":"Negar","ui.permission.allowAlways":"Permitir sempre","ui.permission.allowOnce":"Permitir uma vez","ui.message.expand":"Expandir mensagem","ui.message.collapse":"Recolher mensagem","ui.message.copy":"Copiar","ui.message.copyMessage":"Copiar mensagem","ui.message.forkMessage":"Bifurcar para nova sess\xE3o","ui.message.revertMessage":"Redefinir para este ponto","ui.message.copyResponse":"Copiar resposta","ui.message.copied":"Copiado!","ui.message.interrupted":"Interrompido","ui.message.queued":"Na fila","ui.message.attachment.alt":"anexo","ui.patch.action.deleted":"Exclu\xEDdo","ui.patch.action.created":"Criado","ui.patch.action.moved":"Movido","ui.patch.action.patched":"Patch aplicado","ui.question.subtitle.answered":"{{count}} respondidas","ui.question.answer.none":"(sem resposta)","ui.question.review.notAnswered":"(n\xE3o respondida)","ui.question.multiHint":"Selecione todas que se aplicam","ui.question.singleHint":"Selecione uma resposta","ui.question.custom.placeholder":"Digite sua resposta...","ui.fileSearch.placeholder":"Localizar","ui.fileSearch.previousMatch":"Ocorr\xEAncia anterior","ui.fileSearch.nextMatch":"Pr\xF3xima ocorr\xEAncia","ui.fileSearch.close":"Fechar busca","ui.tool.task":"Tarefa","ui.tool.skill":"Habilidade","ui.basicTool.called":"Chamou `{{tool}}`","ui.toolErrorCard.failed":"Falhou","ui.toolErrorCard.copyError":"Copiar erro","ui.message.duration.seconds":"{{count}}s","ui.message.duration.minutesSeconds":"{{minutes}}m {{seconds}}s"};export{e as dict};
2
+ import"./chunk-7xm75w1e.js";var e={"ui.sessionReview.title":"Altera\xE7\xF5es da sess\xE3o","ui.sessionReview.title.lastTurn":"Altera\xE7\xF5es do \xFAltimo turno","ui.sessionReview.diffStyle.unified":"Unificado","ui.sessionReview.diffStyle.split":"Dividido","ui.sessionReview.openFile":"Abrir arquivo","ui.sessionReview.selection.line":"linha {{line}}","ui.sessionReview.selection.lines":"linhas {{start}}-{{end}}","ui.sessionReview.expandAll":"Expandir tudo","ui.sessionReview.collapseAll":"Recolher tudo","ui.sessionReview.change.added":"Adicionado","ui.sessionReview.change.removed":"Removido","ui.sessionReview.change.modified":"Modificado","ui.sessionReview.image.loading":"Carregando...","ui.sessionReview.image.placeholder":"Imagem","ui.sessionReview.largeDiff.title":"Diff grande demais para renderizar","ui.sessionReview.largeDiff.meta":"Limite: {{limit}} linhas alteradas. Atual: {{current}} linhas alteradas.","ui.sessionReview.largeDiff.renderAnyway":"Renderizar mesmo assim","ui.fileMedia.kind.image":"imagem","ui.fileMedia.kind.audio":"\xE1udio","ui.fileMedia.state.removed":"Removido: {{kind}}","ui.fileMedia.state.loading":"Carregando {{kind}}...","ui.fileMedia.state.error":"Erro ao carregar {{kind}}","ui.fileMedia.state.unavailable":"{{kind}} indispon\xEDvel","ui.fileMedia.binary.title":"Arquivo bin\xE1rio","ui.fileMedia.binary.description.path":"N\xE3o \xE9 poss\xEDvel exibir {{path}} porque \xE9 um arquivo bin\xE1rio.","ui.fileMedia.binary.description.default":"N\xE3o \xE9 poss\xEDvel exibir o arquivo porque ele \xE9 bin\xE1rio.","ui.lineComment.label.prefix":"Comentar em ","ui.lineComment.label.suffix":"","ui.lineComment.editorLabel.prefix":"Comentando em ","ui.lineComment.editorLabel.suffix":"","ui.lineComment.placeholder":"Adicionar coment\xE1rio","ui.lineComment.submit":"Comentar","ui.sessionTurn.steps.show":"Mostrar passos","ui.sessionTurn.steps.hide":"Ocultar passos","ui.sessionTurn.summary.response":"Resposta","ui.sessionTurn.diff.showMore":"Mostrar mais altera\xE7\xF5es ({{count}})","ui.sessionTurn.retry.retrying":"tentando novamente","ui.sessionTurn.retry.inSeconds":"em {{seconds}}s","ui.sessionTurn.retry.attempt":"tentativa #{{attempt}}","ui.sessionTurn.retry.attemptLine":"{{line}} - tentativa #{{attempt}}","ui.sessionTurn.retry.geminiHot":"gemini est\xE1 muito sobrecarregado agora","ui.sessionTurn.error.freeUsageExceeded":"Limite de uso gratuito excedido","ui.sessionTurn.error.addQredits":"Adicionar cr\xE9ditos","ui.sessionTurn.status.delegating":"Delegando trabalho","ui.sessionTurn.status.planning":"Planejando pr\xF3ximos passos","ui.sessionTurn.status.gatheringContext":"Explorando","ui.sessionTurn.status.gatheredContext":"Explorado","ui.sessionTurn.status.searchingCodebase":"Pesquisando no c\xF3digo","ui.sessionTurn.status.searchingWeb":"Pesquisando na web","ui.sessionTurn.status.makingEdits":"Fazendo edi\xE7\xF5es","ui.sessionTurn.status.runningCommands":"Executando comandos","ui.sessionTurn.status.thinking":"Pensando","ui.sessionTurn.status.thinkingWithTopic":"Pensando - {{topic}}","ui.sessionTurn.status.gatheringThoughts":"Organizando pensamentos","ui.sessionTurn.status.consideringNextSteps":"Considerando pr\xF3ximos passos","ui.messagePart.questions.dismissed":"Perguntas descartadas","ui.messagePart.compaction":"Sess\xE3o compactada","ui.messagePart.context.read.one":"{{count}} leitura","ui.messagePart.context.read.other":"{{count}} leituras","ui.messagePart.context.search.one":"{{count}} pesquisa","ui.messagePart.context.search.other":"{{count}} pesquisas","ui.messagePart.context.list.one":"{{count}} lista","ui.messagePart.context.list.other":"{{count}} listas","ui.messagePart.diagnostic.error":"Erro","ui.messagePart.title.edit":"Editar","ui.messagePart.title.write":"Escrever","ui.messagePart.option.typeOwnAnswer":"Digite sua pr\xF3pria resposta","ui.messagePart.review.title":"Revise suas respostas","ui.list.loading":"Carregando","ui.list.empty":"Nenhum resultado","ui.list.clearFilter":"Limpar filtro","ui.list.emptyWithFilter.prefix":"Nenhum resultado para","ui.list.emptyWithFilter.suffix":"","ui.messageNav.newMessage":"Nova mensagem","ui.textField.copyToClipboard":"Copiar para \xE1rea de transfer\xEAncia","ui.textField.copyLink":"Copiar link","ui.textField.copied":"Copiado","ui.imagePreview.alt":"Visualiza\xE7\xE3o de imagem","ui.scrollView.ariaLabel":"conte\xFAdo rol\xE1vel","ui.tool.read":"Ler","ui.tool.loaded":"Carregado","ui.tool.list":"Listar","ui.tool.glob":"Glob","ui.tool.grep":"Grep","ui.tool.webfetch":"Buscar Web","ui.tool.websearch":"Pesquisa na Web","ui.tool.codesearch":"Pesquisa de C\xF3digo","ui.tool.shell":"Shell","ui.tool.patch":"Patch","ui.tool.todos":"Tarefas","ui.tool.todos.read":"Ler tarefas","ui.tool.questions":"Perguntas","ui.tool.agent":"Agente {{type}}","ui.tool.agent.default":"Agente","ui.common.file.one":"arquivo","ui.common.file.other":"arquivos","ui.common.question.one":"pergunta","ui.common.question.other":"perguntas","ui.common.add":"Adicionar","ui.common.back":"Voltar","ui.common.cancel":"Cancelar","ui.common.confirm":"Confirmar","ui.common.dismiss":"Descartar","ui.common.close":"Fechar","ui.common.next":"Pr\xF3ximo","ui.common.submit":"Enviar","ui.permission.deny":"Negar","ui.permission.allowAlways":"Permitir sempre","ui.permission.allowOnce":"Permitir uma vez","ui.message.expand":"Expandir mensagem","ui.message.collapse":"Recolher mensagem","ui.message.copy":"Copiar","ui.message.copyMessage":"Copiar mensagem","ui.message.forkMessage":"Bifurcar para nova sess\xE3o","ui.message.revertMessage":"Redefinir para este ponto","ui.message.copyResponse":"Copiar resposta","ui.message.copied":"Copiado!","ui.message.interrupted":"Interrompido","ui.message.queued":"Na fila","ui.message.attachment.alt":"anexo","ui.patch.action.deleted":"Exclu\xEDdo","ui.patch.action.created":"Criado","ui.patch.action.moved":"Movido","ui.patch.action.patched":"Patch aplicado","ui.question.subtitle.answered":"{{count}} respondidas","ui.question.answer.none":"(sem resposta)","ui.question.review.notAnswered":"(n\xE3o respondida)","ui.question.multiHint":"Selecione todas que se aplicam","ui.question.singleHint":"Selecione uma resposta","ui.question.custom.placeholder":"Digite sua resposta...","ui.fileSearch.placeholder":"Localizar","ui.fileSearch.previousMatch":"Ocorr\xEAncia anterior","ui.fileSearch.nextMatch":"Pr\xF3xima ocorr\xEAncia","ui.fileSearch.close":"Fechar busca","ui.tool.task":"Tarefa","ui.tool.skill":"Habilidade","ui.basicTool.called":"Chamou `{{tool}}`","ui.toolErrorCard.failed":"Falhou","ui.toolErrorCard.copyError":"Copiar erro","ui.message.duration.seconds":"{{count}}s","ui.message.duration.minutesSeconds":"{{minutes}}m {{seconds}}s"};export{e as dict};
@@ -0,0 +1,3 @@
1
+ // @bun
2
+ import{Rd as q}from"./chunk-yajd975f.js";import{Vf as v}from"./chunk-rbk8seme.js";import{gh as S}from"./chunk-fq0x3esz.js";import"./chunk-44a82dg0.js";import"./chunk-vxyy2dp3.js";import"./chunk-yp5bypsp.js";import"./chunk-7hm0c2yg.js";import"./chunk-gj0wt0cy.js";import"./chunk-5hw6xa49.js";import"./chunk-326p5b10.js";import"./chunk-04n2ycg5.js";import"./chunk-8ymffyep.js";import{cm as Q,lm as H}from"./chunk-mcg24gkb.js";import"./chunk-redjxn13.js";import"./chunk-bn0h9dny.js";import"./chunk-r4ndwym0.js";import"./chunk-3ytjm3az.js";import"./chunk-htz93dsd.js";import"./chunk-vcw00k0n.js";import"./chunk-r78czx4d.js";import"./chunk-2hc5z7b5.js";import"./chunk-d68fzyw7.js";import"./chunk-4jtxtkj7.js";import"./chunk-ay8emwym.js";import"./chunk-2maqde7w.js";import"./chunk-kj20f048.js";import"./chunk-cqtkxwd8.js";import"./chunk-x9rbv6p6.js";import"./chunk-g5rabwre.js";import"./chunk-jbx3s7nw.js";import"./chunk-15hw2z9t.js";import"./chunk-48ge2ryx.js";import"./chunk-n9xns8by.js";import"./chunk-y9q0hb7b.js";import"./chunk-c1bdzxbx.js";import"./chunk-ehhas0ew.js";import"./chunk-d6ry9418.js";import"./chunk-0dt0bxz6.js";import"./chunk-10bjs581.js";import"./chunk-4cnwn1rh.js";import"./chunk-gcw4rn10.js";import"./chunk-m5m448mg.js";import{ht as K}from"./chunk-tqj69nh6.js";import"./chunk-ag8kz1e7.js";import"./chunk-5tray1fw.js";import"./chunk-c11d28qn.js";import"./chunk-mzs2pjyc.js";import"./chunk-gagtmjmp.js";import"./chunk-zs8kqdsf.js";import"./chunk-dxpj0cxh.js";import"./chunk-zw815d68.js";import"./chunk-7xm75w1e.js";var P=q({command:"pr <number>",describe:"fetch and checkout a GitHub PR branch, then run qitqode",builder:(Y)=>Y.positional("number",{type:"number",describe:"PR number to checkout",demandOption:!0}),async handler(Y){await H.provide({directory:process.cwd(),async fn(){if(H.project.vcs!=="git")v.error("Could not find git repository. Please run this command from a git repository."),process.exit(1);let J=Y.number,Z=`pr/${J}`;if(v.println(`Fetching and checking out PR #${J}...`),(await K.run(["gh","pr","checkout",`${J}`,"--branch",Z,"--force"],{nothrow:!0})).code!==0)v.error(`Failed to checkout PR #${J}. Make sure you have gh CLI installed and authenticated.`),process.exit(1);let _=await K.text(["gh","pr","view",`${J}`,"--json","headRepository,headRepositoryOwner,isCrossRepository,headRefName,body"],{nothrow:!0}),V;if(_.code===0){let j=_.text;if(j.trim()){let z=JSON.parse(j);if(z&&z.isCrossRepository&&z.headRepository&&z.headRepositoryOwner){let L=z.headRepositoryOwner.login,W=z.headRepository.name,C=L;if(!(await S.runPromise(Q.Service.use((F)=>F.run(["remote"],{cwd:H.worktree}))).then((F)=>F.text().trim())).split(`
3
+ `).includes(C))await S.runPromise(Q.Service.use((F)=>F.run(["remote","add",C,`https://github.com/${L}/${W}.git`],{cwd:H.worktree}))),v.println(`Added fork remote: ${C}`);let X=z.headRefName;await S.runPromise(Q.Service.use((F)=>F.run(["branch",`--set-upstream-to=${C}/${X}`,Z],{cwd:H.worktree})))}if(z&&z.body){let L=z.body.match(/https:\/\/opncd\.ai\/s\/([a-zA-Z0-9_-]+)/);if(L){let W=L[0];v.println(`Found qitqode session: ${W}`),v.println("Importing session...");let C=await K.text(["qitqode","import",W],{nothrow:!0});if(C.code===0){let X=C.text.trim().match(/Imported session: ([a-zA-Z0-9_-]+)/);if(X)V=X[1],v.println(`Session imported: ${V}`)}}}}}v.println(`Successfully checked out PR #${J} as branch '${Z}'`),v.println(),v.println("Starting qitqode..."),v.println();let D=V?["-s",V]:[],$=await K.spawn(["qitqode",...D],{stdin:"inherit",stdout:"inherit",stderr:"inherit",cwd:process.cwd()}).exited;if($!==0)throw Error(`qitqode exited with code ${$}`)}})}});export{P as PrCommand};
@@ -1,5 +1,5 @@
1
1
  // @bun
2
- import{In as w,Jn as A,Mn as U,Nn as O,Rn as R,Tn as s,Un as F}from"./chunk-7wthn44y.js";import{ho as G}from"./chunk-0xm85ayc.js";import{Co as L}from"./chunk-19sa03c1.js";import{ot as M,tt as k}from"./chunk-20d0cd1j.js";import{SM as y}from"./chunk-t299e2aw.js";import{EO as Y}from"./chunk-yjj4cvqg.js";var _={};Y(_,{schema:()=>x,jsonc:()=>v,ConfigParse:()=>_});function v($,r){let E=[],J=w($,E,{allowTrailingComma:!0});if(E.length){let C=$.split(`
2
+ import{In as w,Jn as A,Mn as U,Nn as O,Rn as R,Tn as s,Un as F}from"./chunk-3ytjm3az.js";import{ho as G,lo as L}from"./chunk-vcw00k0n.js";import{nt as M,st as k}from"./chunk-tqj69nh6.js";import{RM as y}from"./chunk-zs8kqdsf.js";import{DO as Y}from"./chunk-7xm75w1e.js";var _={};Y(_,{schema:()=>x,jsonc:()=>v,ConfigParse:()=>_});function v($,r){let E=[],J=w($,E,{allowTrailingComma:!0});if(E.length){let C=$.split(`
3
3
  `),T=E.map((I)=>{let Z=$.substring(0,I.offset).split(`
4
4
  `),H=Z.length,j=Z[Z.length-1].length+1,B=C[H-1],Q=`${A(I.error)} at line ${H}, column ${j}`;if(!B)return Q;return`${Q}
5
5
  Line ${H}: ${B}
@@ -0,0 +1,8 @@
1
+ // @bun
2
+ import{No as qO,Oo as EO,Qo as HO}from"./chunk-ay8emwym.js";import{Ur as u}from"./chunk-gcw4rn10.js";import{Ns as X$,Qs as J$,Rs as R,_s as FO}from"./chunk-m5m448mg.js";import{tt as Y1}from"./chunk-ag8kz1e7.js";import{pH as c}from"./chunk-zs8kqdsf.js";import{BO as J1,DO as D1,FO as RO}from"./chunk-7xm75w1e.js";function x$({onRequest:O,onSseError:$,onSseEvent:Z,responseTransformer:J,responseValidator:Y,sseDefaultRetryDelay:D,sseMaxRetryAttempts:W,sseMaxRetryDelay:G,sseSleepFn:V,url:K,...z}){let L,M=V??((U)=>new Promise((j)=>setTimeout(j,U)));return{stream:async function*(){let U=D??3000,j=0,B=z.signal??new AbortController().signal;while(!0){if(B.aborted)break;j++;let l=z.headers instanceof Headers?z.headers:new Headers(z.headers);if(L!==void 0)l.set("Last-Event-ID",L);try{let E={redirect:"follow",...z,body:z.serializedBody,headers:l,signal:B},A=new Request(K,E);if(O)A=await O(K,E);let Q=await(z.fetch??globalThis.fetch)(A);if(!Q.ok)throw Error(`SSE failed: ${Q.status} ${Q.statusText}`);if(!Q.body)throw Error("No body in SSE response");let w=Q.body.pipeThrough(new TextDecoderStream).getReader(),T="",T$=()=>{try{w.cancel()}catch{}};B.addEventListener("abort",T$);try{while(!0){let{done:CO,value:vO}=await w.read();if(CO)break;T+=vO,T=T.replace(/\r\n?/g,`
3
+ `);let _$=T.split(`
4
+
5
+ `);T=_$.pop()??"";for(let yO of _$){let cO=yO.split(`
6
+ `),n=[],N$;for(let F of cO)if(F.startsWith("data:"))n.push(F.replace(/^data:\s*/,""));else if(F.startsWith("event:"))N$=F.replace(/^event:\s*/,"");else if(F.startsWith("id:"))L=F.replace(/^id:\s*/,"");else if(F.startsWith("retry:")){let R$=Number.parseInt(F.replace(/^retry:\s*/,""),10);if(!Number.isNaN(R$))U=R$}let h,B$=!1;if(n.length){let F=n.join(`
7
+ `);try{h=JSON.parse(F),B$=!0}catch{h=F}}if(B$){if(Y)await Y(h);if(J)h=await J(h)}if(Z?.({data:h,event:N$,id:L,retry:U}),n.length)yield h}}}finally{B.removeEventListener("abort",T$),w.releaseLock()}break}catch(E){if($?.(E),W!==void 0&&j>=W)break;let A=Math.min(U*2**(j-1),G??30000);await M(A)}}}()}}var uO=(O)=>{switch(O){case"label":return".";case"matrix":return";";case"simple":return",";default:return"&"}},dO=(O)=>{switch(O){case"form":return",";case"pipeDelimited":return"|";case"spaceDelimited":return"%20";default:return","}},mO=(O)=>{switch(O){case"label":return".";case"matrix":return";";case"simple":return",";default:return"&"}},p=({allowReserved:O,explode:$,name:Z,style:J,value:Y})=>{if(!$){let G=(O?Y:Y.map((V)=>encodeURIComponent(V))).join(dO(J));switch(J){case"label":return`.${G}`;case"matrix":return`;${Z}=${G}`;case"simple":return G;default:return`${Z}=${G}`}}let D=uO(J),W=Y.map((G)=>{if(J==="label"||J==="simple")return O?G:encodeURIComponent(G);return f({allowReserved:O,name:Z,value:G})}).join(D);return J==="label"||J==="matrix"?D+W:W},f=({allowReserved:O,name:$,value:Z})=>{if(Z===void 0||Z===null)return"";if(typeof Z==="object")throw Error("Deeply-nested arrays/objects aren\u2019t supported. Provide your own `querySerializer()` to handle these.");return`${$}=${O?Z:encodeURIComponent(Z)}`},i=({allowReserved:O,explode:$,name:Z,style:J,value:Y,valueOnly:D})=>{if(Y instanceof Date)return D?Y.toISOString():`${Z}=${Y.toISOString()}`;if(J!=="deepObject"&&!$){let V=[];Object.entries(Y).forEach(([z,L])=>{V=[...V,z,O?L:encodeURIComponent(L)]});let K=V.join(",");switch(J){case"form":return`${Z}=${K}`;case"label":return`.${K}`;case"matrix":return`;${Z}=${K}`;default:return K}}let W=mO(J),G=Object.entries(Y).map(([V,K])=>f({allowReserved:O,name:J==="deepObject"?`${Z}[${V}]`:V,value:K})).join(W);return J==="label"||J==="matrix"?W+G:G};var lO=/\{[^{}]+\}/g,nO=({path:O,url:$})=>{let Z=$,J=$.match(lO);if(J)for(let Y of J){let D=!1,W=Y.substring(1,Y.length-1),G="simple";if(W.endsWith("*"))D=!0,W=W.substring(0,W.length-1);if(W.startsWith("."))W=W.substring(1),G="label";else if(W.startsWith(";"))W=W.substring(1),G="matrix";let V=O[W];if(V===void 0||V===null)continue;if(Array.isArray(V)){Z=Z.replace(Y,p({explode:D,name:W,style:G,value:V}));continue}if(typeof V==="object"){Z=Z.replace(Y,i({explode:D,name:W,style:G,value:V,valueOnly:!0}));continue}if(G==="matrix"){Z=Z.replace(Y,`;${f({name:W,value:V})}`);continue}let K=encodeURIComponent(G==="label"?`.${V}`:V);Z=Z.replace(Y,K)}return Z},w$=({baseUrl:O,path:$,query:Z,querySerializer:J,url:Y})=>{let D=Y.startsWith("/")?Y:`/${Y}`,W=(O??"")+D;if($)W=nO({path:$,url:W});let G=Z?J(Z):"";if(G.startsWith("?"))G=G.substring(1);if(G)W+=`?${G}`;return W};function e(O){let $=O.body!==void 0;if($&&O.bodySerializer){if("serializedBody"in O)return O.serializedBody!==void 0&&O.serializedBody!==""?O.serializedBody:null;return O.body!==""?O.body:null}if($)return O.body;return}var F$=async(O,$)=>{let Z=typeof $==="function"?await $(O):$;if(!Z)return;if(O.scheme==="bearer")return`Bearer ${Z}`;if(O.scheme==="basic")return`Basic ${btoa(Z)}`;return Z};var $$={bodySerializer:(O)=>JSON.stringify(O,($,Z)=>typeof Z==="bigint"?Z.toString():Z)};var q$=({parameters:O={},...$}={})=>{return(J)=>{let Y=[];if(J&&typeof J==="object")for(let D in J){let W=J[D];if(W===void 0||W===null)continue;let G=O[D]||$;if(Array.isArray(W)){let V=p({allowReserved:G.allowReserved,explode:!0,name:D,style:"form",value:W,...G.array});if(V)Y.push(V)}else if(typeof W==="object"){let V=i({allowReserved:G.allowReserved,explode:!0,name:D,style:"deepObject",value:W,...G.object});if(V)Y.push(V)}else{let V=f({allowReserved:G.allowReserved,name:D,value:W});if(V)Y.push(V)}}return Y.join("&")}},E$=(O)=>{if(!O)return"stream";let $=O.split(";")[0]?.trim();if(!$)return;if($.startsWith("application/json")||$.endsWith("+json"))return"json";if($==="multipart/form-data")return"formData";if(["application/","audio/","image/","video/"].some((Z)=>$.startsWith(Z)))return"blob";if($.startsWith("text/"))return"text";return},pO=(O,$)=>{if(!$)return!1;if(O.headers.has($)||O.query?.[$]||O.headers.get("Cookie")?.includes(`${$}=`))return!0;return!1};async function H$(O){for(let $ of O.security??[]){if(pO(O,$.name))continue;let Z=await F$($,O.auth);if(!Z)continue;let J=$.name??"Authorization";switch($.in){case"query":if(!O.query)O.query={};O.query[J]=Z;break;case"cookie":O.headers.append("Cookie",`${J}=${Z}`);break;case"header":default:O.headers.set(J,Z);break}}}var O$=(O)=>w$({baseUrl:O.baseUrl,path:O.path,query:O.query,querySerializer:typeof O.querySerializer==="function"?O.querySerializer:q$(O.querySerializer),url:O.url}),Z$=(O,$)=>{let Z={...O,...$};if(Z.baseUrl?.endsWith("/"))Z.baseUrl=Z.baseUrl.substring(0,Z.baseUrl.length-1);return Z.headers=s(O.headers,$.headers),Z},iO=(O)=>{let $=[];return O.forEach((Z,J)=>{$.push([J,Z])}),$},s=(...O)=>{let $=new Headers;for(let Z of O){if(!Z)continue;let J=Z instanceof Headers?iO(Z):Object.entries(Z);for(let[Y,D]of J)if(D===null)$.delete(Y);else if(Array.isArray(D))for(let W of D)$.append(Y,W);else if(D!==void 0)$.set(Y,typeof D==="object"?JSON.stringify(D):D)}return $};class r{fns=[];clear(){this.fns=[]}eject(O){let $=this.getInterceptorIndex(O);if(this.fns[$])this.fns[$]=null}exists(O){let $=this.getInterceptorIndex(O);return Boolean(this.fns[$])}getInterceptorIndex(O){if(typeof O==="number")return this.fns[O]?O:-1;return this.fns.indexOf(O)}update(O,$){let Z=this.getInterceptorIndex(O);if(this.fns[Z])return this.fns[Z]=$,O;return!1}use(O){return this.fns.push(O),this.fns.length-1}}var A$=()=>({error:new r,request:new r,response:new r}),rO=q$({allowReserved:!1,array:{explode:!0,style:"form"},object:{explode:!0,style:"deepObject"}}),sO={"Content-Type":"application/json"},b=(O={})=>({...$$,headers:sO,parseAs:"auto",querySerializer:rO,...O});var C=(O={})=>{let $=Z$(b(),O),Z=()=>({...$}),J=(z)=>{return $=Z$($,z),Z()},Y=A$(),D=async(z)=>{let L={...$,...z,fetch:z.fetch??$.fetch??globalThis.fetch,headers:s($.headers,z.headers),serializedBody:void 0};if(L.security)await H$(L);if(L.requestValidator)await L.requestValidator(L);if(L.body!==void 0&&L.bodySerializer)L.serializedBody=L.bodySerializer(L.body);if(L.body===void 0||L.serializedBody==="")L.headers.delete("Content-Type");let M=L,_=O$(M);return{opts:M,url:_}},W=async(z)=>{let L=z.throwOnError??$.throwOnError,M=z.responseStyle??$.responseStyle,_,S;try{let{opts:U,url:j}=await D(z),B={redirect:"follow",...U,body:e(U)};_=new Request(j,B);for(let Q of Y.request.fns)if(Q)_=await Q(_,U);let l=U.fetch;S=await l(_);for(let Q of Y.response.fns)if(Q)S=await Q(S,_,U);let E={request:_,response:S};if(S.ok){let Q=(U.parseAs==="auto"?E$(S.headers.get("Content-Type")):U.parseAs)??"json";if(S.status===204||S.headers.get("Content-Length")==="0"){let T;switch(Q){case"arrayBuffer":case"blob":case"text":T=await S[Q]();break;case"formData":T=new FormData;break;case"stream":T=S.body;break;case"json":default:T={};break}return U.responseStyle==="data"?T:{data:T,...E}}let w;switch(Q){case"arrayBuffer":case"blob":case"formData":case"text":w=await S[Q]();break;case"json":{let T=await S.text();w=T?JSON.parse(T):{};break}case"stream":return U.responseStyle==="data"?S.body:{data:S.body,...E}}if(Q==="json"){if(U.responseValidator)await U.responseValidator(w);if(U.responseTransformer)w=await U.responseTransformer(w)}return U.responseStyle==="data"?w:{data:w,...E}}let A=await S.text(),o;try{o=JSON.parse(A)}catch{}throw o??A}catch(U){let j=U;for(let B of Y.error.fns)if(B)j=await B(j,S,_,z);if(j=j||{},L)throw j;return M==="data"?void 0:{error:j,request:_,response:S}}},G=(z)=>(L)=>W({...L,method:z}),V=(z)=>async(L)=>{let{opts:M,url:_}=await D(L);return x$({...M,body:M.body,method:z,onRequest:async(S,U)=>{let j=new Request(S,U);for(let B of Y.request.fns)if(B)j=await B(j,M);return j},serializedBody:e(M),url:_})};return{buildUrl:(z)=>O$({...$,...z}),connect:G("CONNECT"),delete:G("DELETE"),get:G("GET"),getConfig:Z,head:G("HEAD"),interceptors:Y,options:G("OPTIONS"),patch:G("PATCH"),post:G("POST"),put:G("PUT"),request:W,setConfig:J,sse:{connect:V("CONNECT"),delete:V("DELETE"),get:V("GET"),head:V("HEAD"),options:V("OPTIONS"),patch:V("PATCH"),post:V("POST"),put:V("PUT"),trace:V("TRACE")},trace:G("TRACE")}};var tO={$body_:"body",$headers_:"headers",$path_:"path",$query_:"query"},aO=Object.entries(tO),h$=(O,$)=>{if(!$)$=new Map;for(let Z of O)if("in"in Z){if(Z.key)$.set(Z.key,{in:Z.in,map:Z.map})}else if("key"in Z)$.set(Z.key,{map:Z.map});else if(Z.args)h$(Z.args,$);return $},oO=(O)=>{for(let[$,Z]of Object.entries(O))if(Z&&typeof Z==="object"&&!Array.isArray(Z)&&!Object.keys(Z).length)delete O[$]},X=(O,$)=>{let Z={body:Object.create(null),headers:Object.create(null),path:Object.create(null),query:Object.create(null)},J=h$($),Y;for(let[D,W]of O.entries()){if($[D])Y=$[D];if(!Y)continue;if("in"in Y)if(Y.key){let G=J.get(Y.key),V=G.map||Y.key;if(G.in)Z[G.in][V]=W}else Z.body=W;else for(let[G,V]of Object.entries(W??{})){let K=J.get(G);if(K)if(K.in){let z=K.map||G;Z[K.in][z]=V}else Z[K.map]=V;else{let z=aO.find(([L])=>G.startsWith(L));if(z){let[L,M]=z;Z[M][G.slice(L.length)]=V}else if("allowExtra"in Y&&Y.allowExtra){for(let[L,M]of Object.entries(Y.allowExtra))if(M){Z[L][G]=V;break}}}}}return oO(Z),Z};var k$=C(b({baseUrl:"http://localhost:4096"}));class I{client;constructor(O){this.client=O?.client??k$}}class P${defaultKey="default";instances=new Map;get(O){let $=this.instances.get(O??this.defaultKey);if(!$)throw Error('No SDK client found. Create one with "new QitQodeClient()" to fix this error.');return $}set(O,$){this.instances.set($??this.defaultKey,O)}}class g$ extends I{get(O){return(O?.client??this.client).get({url:"/global/config",...O})}update(O,$){let Z=X([O],[{args:[{key:"config",map:"body"}]}]);return($?.client??this.client).patch({url:"/global/config",...$,...Z,headers:{"Content-Type":"application/json",...$?.headers,...Z.headers}})}}class f$ extends I{scan(O){return(O?.client??this.client).get({url:"/global/import/scan",...O})}run(O,$){let Z=X([O],[{args:[{in:"body",key:"sources"},{in:"body",key:"force"}]}]);return($?.client??this.client).post({url:"/global/import/run",...$,...Z,headers:{"Content-Type":"application/json",...$?.headers,...Z.headers}})}}class b$ extends I{health(O){return(O?.client??this.client).get({url:"/global/health",...O})}event(O){return(O?.client??this.client).sse.get({url:"/global/event",...O})}dispose(O){return(O?.client??this.client).post({url:"/global/dispose",...O})}upgrade(O,$){let Z=X([O],[{args:[{in:"body",key:"target"}]}]);return($?.client??this.client).post({url:"/global/upgrade",...$,...Z,headers:{"Content-Type":"application/json",...$?.headers,...Z.headers}})}_config;get config(){return this._config??=new g$({client:this.client})}_import;get import(){return this._import??=new f$({client:this.client})}}class C$ extends I{remove(O,$){let Z=X([O],[{args:[{in:"path",key:"providerID"}]}]);return($?.client??this.client).delete({url:"/auth/{providerID}",...$,...Z})}set(O,$){let Z=X([O],[{args:[{in:"path",key:"providerID"},{key:"auth",map:"body"}]}]);return($?.client??this.client).put({url:"/auth/{providerID}",...$,...Z,headers:{"Content-Type":"application/json",...$?.headers,...Z.headers}})}}class v$ extends I{log(O,$){let Z=X([O],[{args:[{in:"query",key:"directory"},{in:"query",key:"workspace"},{in:"body",key:"service"},{in:"body",key:"level"},{in:"body",key:"message"},{in:"body",key:"extra"}]}]);return($?.client??this.client).post({url:"/log",...$,...Z,headers:{"Content-Type":"application/json",...$?.headers,...Z.headers}})}agents(O,$){let Z=X([O],[{args:[{in:"query",key:"directory"},{in:"query",key:"workspace"}]}]);return($?.client??this.client).get({url:"/agent",...$,...Z})}skills(O,$){let Z=X([O],[{args:[{in:"query",key:"directory"},{in:"query",key:"workspace"}]}]);return($?.client??this.client).get({url:"/skill",...$,...Z})}}class y$ extends I{list(O,$){let Z=X([O],[{args:[{in:"query",key:"directory"},{in:"query",key:"workspace"}]}]);return($?.client??this.client).get({url:"/experimental/workspace/adaptor",...$,...Z})}}class c$ extends I{list(O,$){let Z=X([O],[{args:[{in:"query",key:"directory"},{in:"query",key:"workspace"}]}]);return($?.client??this.client).get({url:"/experimental/workspace",...$,...Z})}create(O,$){let Z=X([O],[{args:[{in:"query",key:"directory"},{in:"query",key:"workspace"},{in:"body",key:"id"},{in:"body",key:"type"},{in:"body",key:"branch"},{in:"body",key:"extra"}]}]);return($?.client??this.client).post({url:"/experimental/workspace",...$,...Z,headers:{"Content-Type":"application/json",...$?.headers,...Z.headers}})}status(O,$){let Z=X([O],[{args:[{in:"query",key:"directory"},{in:"query",key:"workspace"}]}]);return($?.client??this.client).get({url:"/experimental/workspace/status",...$,...Z})}remove(O,$){let Z=X([O],[{args:[{in:"path",key:"id"},{in:"query",key:"directory"},{in:"query",key:"workspace"}]}]);return($?.client??this.client).delete({url:"/experimental/workspace/{id}",...$,...Z})}sessionRestore(O,$){let Z=X([O],[{args:[{in:"path",key:"id"},{in:"query",key:"directory"},{in:"query",key:"workspace"},{in:"body",key:"sessionID"}]}]);return($?.client??this.client).post({url:"/experimental/workspace/{id}/session-restore",...$,...Z,headers:{"Content-Type":"application/json",...$?.headers,...Z.headers}})}_adaptor;get adaptor(){return this._adaptor??=new y$({client:this.client})}}class u$ extends I{get(O,$){let Z=X([O],[{args:[{in:"query",key:"directory"},{in:"query",key:"workspace"}]}]);return($?.client??this.client).get({url:"/experimental/console",...$,...Z})}listOrgs(O,$){let Z=X([O],[{args:[{in:"query",key:"directory"},{in:"query",key:"workspace"}]}]);return($?.client??this.client).get({url:"/experimental/console/orgs",...$,...Z})}switchOrg(O,$){let Z=X([O],[{args:[{in:"query",key:"directory"},{in:"query",key:"workspace"},{in:"body",key:"accountID"},{in:"body",key:"orgID"}]}]);return($?.client??this.client).post({url:"/experimental/console/switch",...$,...Z,headers:{"Content-Type":"application/json",...$?.headers,...Z.headers}})}}class d$ extends I{list(O,$){let Z=X([O],[{args:[{in:"query",key:"directory"},{in:"query",key:"workspace"},{in:"query",key:"roots"},{in:"query",key:"start"},{in:"query",key:"cursor"},{in:"query",key:"search"},{in:"query",key:"limit"},{in:"query",key:"archived"}]}]);return($?.client??this.client).get({url:"/experimental/session",...$,...Z})}}class m$ extends I{list(O,$){let Z=X([O],[{args:[{in:"query",key:"directory"},{in:"query",key:"workspace"}]}]);return($?.client??this.client).get({url:"/experimental/resource",...$,...Z})}}class l$ extends I{_workspace;get workspace(){return this._workspace??=new c$({client:this.client})}_console;get console(){return this._console??=new u$({client:this.client})}_session;get session(){return this._session??=new d$({client:this.client})}_resource;get resource(){return this._resource??=new m$({client:this.client})}}class n$ extends I{list(O,$){let Z=X([O],[{args:[{in:"query",key:"directory"},{in:"query",key:"workspace"}]}]);return($?.client??this.client).get({url:"/project",...$,...Z})}current(O,$){let Z=X([O],[{args:[{in:"query",key:"directory"},{in:"query",key:"workspace"}]}]);return($?.client??this.client).get({url:"/project/current",...$,...Z})}initGit(O,$){let Z=X([O],[{args:[{in:"query",key:"directory"},{in:"query",key:"workspace"}]}]);return($?.client??this.client).post({url:"/project/git/init",...$,...Z})}update(O,$){let Z=X([O],[{args:[{in:"path",key:"projectID"},{in:"query",key:"directory"},{in:"query",key:"workspace"},{in:"body",key:"name"},{in:"body",key:"icon"},{in:"body",key:"commands"}]}]);return($?.client??this.client).patch({url:"/project/{projectID}",...$,...Z,headers:{"Content-Type":"application/json",...$?.headers,...Z.headers}})}}class p$ extends I{list(O,$){let Z=X([O],[{args:[{in:"query",key:"directory"},{in:"query",key:"workspace"}]}]);return($?.client??this.client).get({url:"/pty",...$,...Z})}create(O,$){let Z=X([O],[{args:[{in:"query",key:"directory"},{in:"query",key:"workspace"},{in:"body",key:"command"},{in:"body",key:"args"},{in:"body",key:"cwd"},{in:"body",key:"title"},{in:"body",key:"env"}]}]);return($?.client??this.client).post({url:"/pty",...$,...Z,headers:{"Content-Type":"application/json",...$?.headers,...Z.headers}})}remove(O,$){let Z=X([O],[{args:[{in:"path",key:"ptyID"},{in:"query",key:"directory"},{in:"query",key:"workspace"}]}]);return($?.client??this.client).delete({url:"/pty/{ptyID}",...$,...Z})}get(O,$){let Z=X([O],[{args:[{in:"path",key:"ptyID"},{in:"query",key:"directory"},{in:"query",key:"workspace"}]}]);return($?.client??this.client).get({url:"/pty/{ptyID}",...$,...Z})}update(O,$){let Z=X([O],[{args:[{in:"path",key:"ptyID"},{in:"query",key:"directory"},{in:"query",key:"workspace"},{in:"body",key:"title"},{in:"body",key:"size"}]}]);return($?.client??this.client).put({url:"/pty/{ptyID}",...$,...Z,headers:{"Content-Type":"application/json",...$?.headers,...Z.headers}})}connectToken(O,$){let Z=X([O],[{args:[{in:"path",key:"ptyID"},{in:"query",key:"directory"},{in:"query",key:"workspace"}]}]);return($?.client??this.client).post({url:"/pty/{ptyID}/connect-token",...$,...Z})}connect(O,$){let Z=X([O],[{args:[{in:"path",key:"ptyID"},{in:"query",key:"directory"},{in:"query",key:"workspace"}]}]);return($?.client??this.client).get({url:"/pty/{ptyID}/connect",...$,...Z})}}class i$ extends I{get(O,$){let Z=X([O],[{args:[{in:"query",key:"directory"},{in:"query",key:"workspace"}]}]);return($?.client??this.client).get({url:"/config",...$,...Z})}update(O,$){let Z=X([O],[{args:[{in:"query",key:"directory"},{in:"query",key:"workspace"},{key:"config",map:"body"}]}]);return($?.client??this.client).patch({url:"/config",...$,...Z,headers:{"Content-Type":"application/json",...$?.headers,...Z.headers}})}providers(O,$){let Z=X([O],[{args:[{in:"query",key:"directory"},{in:"query",key:"workspace"}]}]);return($?.client??this.client).get({url:"/config/providers",...$,...Z})}}class r$ extends I{ids(O,$){let Z=X([O],[{args:[{in:"query",key:"directory"},{in:"query",key:"workspace"}]}]);return($?.client??this.client).get({url:"/experimental/tool/ids",...$,...Z})}list(O,$){let Z=X([O],[{args:[{in:"query",key:"directory"},{in:"query",key:"workspace"},{in:"query",key:"provider"},{in:"query",key:"model"}]}]);return($?.client??this.client).get({url:"/experimental/tool",...$,...Z})}}class s$ extends I{remove(O,$){let Z=X([O],[{args:[{in:"query",key:"directory"},{in:"query",key:"workspace"},{key:"worktreeRemoveInput",map:"body"}]}]);return($?.client??this.client).delete({url:"/experimental/worktree",...$,...Z,headers:{"Content-Type":"application/json",...$?.headers,...Z.headers}})}list(O,$){let Z=X([O],[{args:[{in:"query",key:"directory"},{in:"query",key:"workspace"}]}]);return($?.client??this.client).get({url:"/experimental/worktree",...$,...Z})}create(O,$){let Z=X([O],[{args:[{in:"query",key:"directory"},{in:"query",key:"workspace"},{key:"worktreeCreateInput",map:"body"}]}]);return($?.client??this.client).post({url:"/experimental/worktree",...$,...Z,headers:{"Content-Type":"application/json",...$?.headers,...Z.headers}})}reset(O,$){let Z=X([O],[{args:[{in:"query",key:"directory"},{in:"query",key:"workspace"},{key:"worktreeResetInput",map:"body"}]}]);return($?.client??this.client).post({url:"/experimental/worktree/reset",...$,...Z,headers:{"Content-Type":"application/json",...$?.headers,...Z.headers}})}}class t$ extends I{list(O,$){let Z=X([O],[{args:[{in:"query",key:"directory"},{in:"query",key:"workspace"},{in:"query",key:"roots"},{in:"query",key:"start"},{in:"query",key:"search"},{in:"query",key:"limit"}]}]);return($?.client??this.client).get({url:"/session",...$,...Z})}create(O,$){let Z=X([O],[{args:[{in:"query",key:"directory"},{in:"query",key:"workspace"},{in:"body",key:"parentID"},{in:"body",key:"contextFrom"},{in:"body",key:"contextWatermark"},{in:"body",key:"title"},{in:"body",key:"permission"},{in:"body",key:"workspaceID"}]}]);return($?.client??this.client).post({url:"/session",...$,...Z,headers:{"Content-Type":"application/json",...$?.headers,...Z.headers}})}status(O,$){let Z=X([O],[{args:[{in:"query",key:"directory"},{in:"query",key:"workspace"}]}]);return($?.client??this.client).get({url:"/session/status",...$,...Z})}delete(O,$){let Z=X([O],[{args:[{in:"path",key:"sessionID"},{in:"query",key:"directory"},{in:"query",key:"workspace"}]}]);return($?.client??this.client).delete({url:"/session/{sessionID}",...$,...Z})}get(O,$){let Z=X([O],[{args:[{in:"path",key:"sessionID"},{in:"query",key:"directory"},{in:"query",key:"workspace"}]}]);return($?.client??this.client).get({url:"/session/{sessionID}",...$,...Z})}update(O,$){let Z=X([O],[{args:[{in:"path",key:"sessionID"},{in:"query",key:"directory"},{in:"query",key:"workspace"},{in:"body",key:"title"},{in:"body",key:"permission"},{in:"body",key:"time"}]}]);return($?.client??this.client).patch({url:"/session/{sessionID}",...$,...Z,headers:{"Content-Type":"application/json",...$?.headers,...Z.headers}})}children(O,$){let Z=X([O],[{args:[{in:"path",key:"sessionID"},{in:"query",key:"directory"},{in:"query",key:"workspace"}]}]);return($?.client??this.client).get({url:"/session/{sessionID}/children",...$,...Z})}init(O,$){let Z=X([O],[{args:[{in:"path",key:"sessionID"},{in:"query",key:"directory"},{in:"query",key:"workspace"},{in:"body",key:"modelID"},{in:"body",key:"providerID"},{in:"body",key:"messageID"}]}]);return($?.client??this.client).post({url:"/session/{sessionID}/init",...$,...Z,headers:{"Content-Type":"application/json",...$?.headers,...Z.headers}})}fork(O,$){let Z=X([O],[{args:[{in:"path",key:"sessionID"},{in:"query",key:"directory"},{in:"query",key:"workspace"},{in:"body",key:"messageID"}]}]);return($?.client??this.client).post({url:"/session/{sessionID}/fork",...$,...Z,headers:{"Content-Type":"application/json",...$?.headers,...Z.headers}})}abort(O,$){let Z=X([O],[{args:[{in:"path",key:"sessionID"},{in:"query",key:"directory"},{in:"query",key:"workspace"}]}]);return($?.client??this.client).post({url:"/session/{sessionID}/abort",...$,...Z})}actors(O,$){let Z=X([O],[{args:[{in:"path",key:"sessionID"},{in:"query",key:"directory"},{in:"query",key:"workspace"}]}]);return($?.client??this.client).get({url:"/session/{sessionID}/actors",...$,...Z})}todo(O,$){let Z=X([O],[{args:[{in:"path",key:"sessionID"},{in:"query",key:"directory"},{in:"query",key:"workspace"}]}]);return($?.client??this.client).get({url:"/session/{sessionID}/todo",...$,...Z})}task(O,$){let Z=X([O],[{args:[{in:"path",key:"sessionID"},{in:"query",key:"directory"},{in:"query",key:"workspace"}]}]);return($?.client??this.client).get({url:"/session/{sessionID}/task",...$,...Z})}unshare(O,$){let Z=X([O],[{args:[{in:"path",key:"sessionID"},{in:"query",key:"directory"},{in:"query",key:"workspace"}]}]);return($?.client??this.client).delete({url:"/session/{sessionID}/share",...$,...Z})}share(O,$){let Z=X([O],[{args:[{in:"path",key:"sessionID"},{in:"query",key:"directory"},{in:"query",key:"workspace"}]}]);return($?.client??this.client).post({url:"/session/{sessionID}/share",...$,...Z})}diff(O,$){let Z=X([O],[{args:[{in:"path",key:"sessionID"},{in:"query",key:"directory"},{in:"query",key:"workspace"},{in:"query",key:"messageID"}]}]);return($?.client??this.client).get({url:"/session/{sessionID}/diff",...$,...Z})}summarize(O,$){let Z=X([O],[{args:[{in:"path",key:"sessionID"},{in:"query",key:"directory"},{in:"query",key:"workspace"},{in:"body",key:"providerID"},{in:"body",key:"modelID"},{in:"body",key:"auto"}]}]);return($?.client??this.client).post({url:"/session/{sessionID}/summarize",...$,...Z,headers:{"Content-Type":"application/json",...$?.headers,...Z.headers}})}revert(O,$){let Z=X([O],[{args:[{in:"path",key:"sessionID"},{in:"query",key:"directory"},{in:"query",key:"workspace"},{in:"body",key:"messageID"},{in:"body",key:"partID"}]}]);return($?.client??this.client).post({url:"/session/{sessionID}/revert",...$,...Z,headers:{"Content-Type":"application/json",...$?.headers,...Z.headers}})}unrevert(O,$){let Z=X([O],[{args:[{in:"path",key:"sessionID"},{in:"query",key:"directory"},{in:"query",key:"workspace"}]}]);return($?.client??this.client).post({url:"/session/{sessionID}/unrevert",...$,...Z})}messages(O,$){let Z=X([O],[{args:[{in:"path",key:"sessionID"},{in:"query",key:"directory"},{in:"query",key:"workspace"},{in:"query",key:"limit"},{in:"query",key:"before"},{in:"query",key:"agent_id"}]}]);return($?.client??this.client).get({url:"/session/{sessionID}/message",...$,...Z})}prompt(O,$){let Z=X([O],[{args:[{in:"path",key:"sessionID"},{in:"query",key:"directory"},{in:"query",key:"workspace"},{in:"body",key:"messageID"},{in:"body",key:"model"},{in:"body",key:"modelRef"},{in:"body",key:"agent"},{in:"body",key:"agentID"},{in:"body",key:"task_id"},{in:"body",key:"source"},{in:"body",key:"provenance"},{in:"body",key:"noReply"},{in:"body",key:"tools"},{in:"body",key:"format"},{in:"body",key:"system"},{in:"body",key:"variant"},{in:"body",key:"parts"}]}]);return($?.client??this.client).post({url:"/session/{sessionID}/message",...$,...Z,headers:{"Content-Type":"application/json",...$?.headers,...Z.headers}})}deleteMessage(O,$){let Z=X([O],[{args:[{in:"path",key:"sessionID"},{in:"path",key:"messageID"},{in:"query",key:"directory"},{in:"query",key:"workspace"}]}]);return($?.client??this.client).delete({url:"/session/{sessionID}/message/{messageID}",...$,...Z})}message(O,$){let Z=X([O],[{args:[{in:"path",key:"sessionID"},{in:"path",key:"messageID"},{in:"query",key:"directory"},{in:"query",key:"workspace"}]}]);return($?.client??this.client).get({url:"/session/{sessionID}/message/{messageID}",...$,...Z})}promptAsync(O,$){let Z=X([O],[{args:[{in:"path",key:"sessionID"},{in:"query",key:"directory"},{in:"query",key:"workspace"},{in:"body",key:"messageID"},{in:"body",key:"model"},{in:"body",key:"modelRef"},{in:"body",key:"agent"},{in:"body",key:"agentID"},{in:"body",key:"task_id"},{in:"body",key:"source"},{in:"body",key:"provenance"},{in:"body",key:"noReply"},{in:"body",key:"tools"},{in:"body",key:"format"},{in:"body",key:"system"},{in:"body",key:"variant"},{in:"body",key:"parts"}]}]);return($?.client??this.client).post({url:"/session/{sessionID}/prompt_async",...$,...Z,headers:{"Content-Type":"application/json",...$?.headers,...Z.headers}})}command(O,$){let Z=X([O],[{args:[{in:"path",key:"sessionID"},{in:"query",key:"directory"},{in:"query",key:"workspace"},{in:"body",key:"messageID"},{in:"body",key:"agent"},{in:"body",key:"model"},{in:"body",key:"arguments"},{in:"body",key:"command"},{in:"body",key:"variant"},{in:"body",key:"parts"}]}]);return($?.client??this.client).post({url:"/session/{sessionID}/command",...$,...Z,headers:{"Content-Type":"application/json",...$?.headers,...Z.headers}})}predict(O,$){let Z=X([O],[{args:[{in:"path",key:"sessionID"},{in:"query",key:"directory"},{in:"query",key:"workspace"}]}]);return($?.client??this.client).post({url:"/session/{sessionID}/predict",...$,...Z})}shell(O,$){let Z=X([O],[{args:[{in:"path",key:"sessionID"},{in:"query",key:"directory"},{in:"query",key:"workspace"},{in:"body",key:"messageID"},{in:"body",key:"agent"},{in:"body",key:"model"},{in:"body",key:"modelRef"},{in:"body",key:"command"}]}]);return($?.client??this.client).post({url:"/session/{sessionID}/shell",...$,...Z,headers:{"Content-Type":"application/json",...$?.headers,...Z.headers}})}}class a$ extends I{delete(O,$){let Z=X([O],[{args:[{in:"path",key:"sessionID"},{in:"path",key:"messageID"},{in:"path",key:"partID"},{in:"query",key:"directory"},{in:"query",key:"workspace"}]}]);return($?.client??this.client).delete({url:"/session/{sessionID}/message/{messageID}/part/{partID}",...$,...Z})}update(O,$){let Z=X([O],[{args:[{in:"path",key:"sessionID"},{in:"path",key:"messageID"},{in:"path",key:"partID"},{in:"query",key:"directory"},{in:"query",key:"workspace"},{key:"part",map:"body"}]}]);return($?.client??this.client).patch({url:"/session/{sessionID}/message/{messageID}/part/{partID}",...$,...Z,headers:{"Content-Type":"application/json",...$?.headers,...Z.headers}})}}class o$ extends I{respond(O,$){let Z=X([O],[{args:[{in:"path",key:"sessionID"},{in:"path",key:"permissionID"},{in:"query",key:"directory"},{in:"query",key:"workspace"},{in:"body",key:"response"}]}]);return($?.client??this.client).post({url:"/session/{sessionID}/permissions/{permissionID}",...$,...Z,headers:{"Content-Type":"application/json",...$?.headers,...Z.headers}})}reply(O,$){let Z=X([O],[{args:[{in:"path",key:"requestID"},{in:"query",key:"directory"},{in:"query",key:"workspace"},{in:"body",key:"reply"},{in:"body",key:"message"}]}]);return($?.client??this.client).post({url:"/permission/{requestID}/reply",...$,...Z,headers:{"Content-Type":"application/json",...$?.headers,...Z.headers}})}list(O,$){let Z=X([O],[{args:[{in:"query",key:"directory"},{in:"query",key:"workspace"}]}]);return($?.client??this.client).get({url:"/permission",...$,...Z})}}class e$ extends I{balance(O,$){let Z=X([O],[{args:[{in:"query",key:"directory"},{in:"query",key:"workspace"}]}]);return($?.client??this.client).get({url:"/qredits/balance",...$,...Z})}}class $O extends I{list(O,$){let Z=X([O],[{args:[{in:"query",key:"directory"},{in:"query",key:"workspace"},{in:"query",key:"sessionID"}]}]);return($?.client??this.client).get({url:"/workflows",...$,...Z})}resume(O,$){let Z=X([O],[{args:[{in:"path",key:"runID"},{in:"query",key:"directory"},{in:"query",key:"workspace"}]}]);return($?.client??this.client).post({url:"/workflows/{runID}/resume",...$,...Z})}}class OO extends I{list(O,$){let Z=X([O],[{args:[{in:"query",key:"directory"},{in:"query",key:"workspace"}]}]);return($?.client??this.client).get({url:"/question",...$,...Z})}neverAsk(O,$){let Z=X([O],[{args:[{in:"query",key:"directory"},{in:"query",key:"workspace"}]}]);return($?.client??this.client).get({url:"/question/never-ask",...$,...Z})}setNeverAsk(O,$){let Z=X([O],[{args:[{in:"query",key:"directory"},{in:"query",key:"workspace"},{in:"body",key:"enabled"}]}]);return($?.client??this.client).post({url:"/question/never-ask",...$,...Z,headers:{"Content-Type":"application/json",...$?.headers,...Z.headers}})}reply(O,$){let Z=X([O],[{args:[{in:"path",key:"requestID"},{in:"query",key:"directory"},{in:"query",key:"workspace"},{in:"body",key:"answers"}]}]);return($?.client??this.client).post({url:"/question/{requestID}/reply",...$,...Z,headers:{"Content-Type":"application/json",...$?.headers,...Z.headers}})}reject(O,$){let Z=X([O],[{args:[{in:"path",key:"requestID"},{in:"query",key:"directory"},{in:"query",key:"workspace"}]}]);return($?.client??this.client).post({url:"/question/{requestID}/reject",...$,...Z})}}class ZO extends I{list(O,$){let Z=X([O],[{args:[{in:"query",key:"directory"},{in:"query",key:"workspace"}]}]);return($?.client??this.client).get({url:"/bash-interactive",...$,...Z})}reply(O,$){let Z=X([O],[{args:[{in:"path",key:"id"},{in:"query",key:"directory"},{in:"query",key:"workspace"},{in:"body",key:"output"},{in:"body",key:"exitCode"}]}]);return($?.client??this.client).post({url:"/bash-interactive/{id}/reply",...$,...Z,headers:{"Content-Type":"application/json",...$?.headers,...Z.headers}})}}class XO extends I{_interactive;get interactive(){return this._interactive??=new ZO({client:this.client})}}class JO extends I{authorize(O,$){let Z=X([O],[{args:[{in:"path",key:"providerID"},{in:"query",key:"directory"},{in:"query",key:"workspace"},{in:"body",key:"method"},{in:"body",key:"inputs"}]}]);return($?.client??this.client).post({url:"/provider/{providerID}/oauth/authorize",...$,...Z,headers:{"Content-Type":"application/json",...$?.headers,...Z.headers}})}callback(O,$){let Z=X([O],[{args:[{in:"path",key:"providerID"},{in:"query",key:"directory"},{in:"query",key:"workspace"},{in:"body",key:"method"},{in:"body",key:"code"}]}]);return($?.client??this.client).post({url:"/provider/{providerID}/oauth/callback",...$,...Z,headers:{"Content-Type":"application/json",...$?.headers,...Z.headers}})}}class YO extends I{list(O,$){let Z=X([O],[{args:[{in:"query",key:"directory"},{in:"query",key:"workspace"}]}]);return($?.client??this.client).get({url:"/provider",...$,...Z})}auth(O,$){let Z=X([O],[{args:[{in:"query",key:"directory"},{in:"query",key:"workspace"}]}]);return($?.client??this.client).get({url:"/provider/auth",...$,...Z})}_oauth;get oauth(){return this._oauth??=new JO({client:this.client})}}class WO extends I{list(O,$){let Z=X([O],[{args:[{in:"query",key:"directory"},{in:"query",key:"workspace"},{key:"body",map:"body"}]}]);return($?.client??this.client).post({url:"/sync/history",...$,...Z,headers:{"Content-Type":"application/json",...$?.headers,...Z.headers}})}}class GO extends I{start(O,$){let Z=X([O],[{args:[{in:"query",key:"directory"},{in:"query",key:"workspace"}]}]);return($?.client??this.client).post({url:"/sync/start",...$,...Z})}replay(O,$){let Z=X([O],[{args:[{in:"query",key:"query_directory",map:"directory"},{in:"query",key:"workspace"},{in:"body",key:"body_directory",map:"directory"},{in:"body",key:"events"}]}]);return($?.client??this.client).post({url:"/sync/replay",...$,...Z,headers:{"Content-Type":"application/json",...$?.headers,...Z.headers}})}_history;get history(){return this._history??=new WO({client:this.client})}}class VO extends I{text(O,$){let Z=X([O],[{args:[{in:"query",key:"directory"},{in:"query",key:"workspace"},{in:"query",key:"pattern"}]}]);return($?.client??this.client).get({url:"/find",...$,...Z})}files(O,$){let Z=X([O],[{args:[{in:"query",key:"directory"},{in:"query",key:"workspace"},{in:"query",key:"query"},{in:"query",key:"dirs"},{in:"query",key:"type"},{in:"query",key:"limit"}]}]);return($?.client??this.client).get({url:"/find/file",...$,...Z})}symbols(O,$){let Z=X([O],[{args:[{in:"query",key:"directory"},{in:"query",key:"workspace"},{in:"query",key:"query"}]}]);return($?.client??this.client).get({url:"/find/symbol",...$,...Z})}}class DO extends I{list(O,$){let Z=X([O],[{args:[{in:"query",key:"directory"},{in:"query",key:"workspace"},{in:"query",key:"path"}]}]);return($?.client??this.client).get({url:"/file",...$,...Z})}read(O,$){let Z=X([O],[{args:[{in:"query",key:"directory"},{in:"query",key:"workspace"},{in:"query",key:"path"}]}]);return($?.client??this.client).get({url:"/file/content",...$,...Z})}status(O,$){let Z=X([O],[{args:[{in:"query",key:"directory"},{in:"query",key:"workspace"}]}]);return($?.client??this.client).get({url:"/file/status",...$,...Z})}}class zO extends I{subscribe(O,$){let Z=X([O],[{args:[{in:"query",key:"directory"},{in:"query",key:"workspace"}]}]);return($?.client??this.client).sse.get({url:"/event",...$,...Z})}}class LO extends I{remove(O,$){let Z=X([O],[{args:[{in:"path",key:"name"},{in:"query",key:"directory"},{in:"query",key:"workspace"}]}]);return($?.client??this.client).delete({url:"/mcp/{name}/auth",...$,...Z})}start(O,$){let Z=X([O],[{args:[{in:"path",key:"name"},{in:"query",key:"directory"},{in:"query",key:"workspace"}]}]);return($?.client??this.client).post({url:"/mcp/{name}/auth",...$,...Z})}callback(O,$){let Z=X([O],[{args:[{in:"path",key:"name"},{in:"query",key:"directory"},{in:"query",key:"workspace"},{in:"body",key:"code"}]}]);return($?.client??this.client).post({url:"/mcp/{name}/auth/callback",...$,...Z,headers:{"Content-Type":"application/json",...$?.headers,...Z.headers}})}authenticate(O,$){let Z=X([O],[{args:[{in:"path",key:"name"},{in:"query",key:"directory"},{in:"query",key:"workspace"}]}]);return($?.client??this.client).post({url:"/mcp/{name}/auth/authenticate",...$,...Z})}}class IO extends I{status(O,$){let Z=X([O],[{args:[{in:"query",key:"directory"},{in:"query",key:"workspace"}]}]);return($?.client??this.client).get({url:"/mcp",...$,...Z})}add(O,$){let Z=X([O],[{args:[{in:"query",key:"directory"},{in:"query",key:"workspace"},{in:"body",key:"name"},{in:"body",key:"config"}]}]);return($?.client??this.client).post({url:"/mcp",...$,...Z,headers:{"Content-Type":"application/json",...$?.headers,...Z.headers}})}connect(O,$){let Z=X([O],[{args:[{in:"path",key:"name"},{in:"query",key:"directory"},{in:"query",key:"workspace"}]}]);return($?.client??this.client).post({url:"/mcp/{name}/connect",...$,...Z})}disconnect(O,$){let Z=X([O],[{args:[{in:"path",key:"name"},{in:"query",key:"directory"},{in:"query",key:"workspace"}]}]);return($?.client??this.client).post({url:"/mcp/{name}/disconnect",...$,...Z})}_auth;get auth(){return this._auth??=new LO({client:this.client})}}class KO extends I{next(O,$){let Z=X([O],[{args:[{in:"query",key:"directory"},{in:"query",key:"workspace"}]}]);return($?.client??this.client).get({url:"/tui/control/next",...$,...Z})}response(O,$){let Z=X([O],[{args:[{in:"query",key:"directory"},{in:"query",key:"workspace"},{key:"body",map:"body"}]}]);return($?.client??this.client).post({url:"/tui/control/response",...$,...Z,headers:{"Content-Type":"application/json",...$?.headers,...Z.headers}})}}class UO extends I{appendPrompt(O,$){let Z=X([O],[{args:[{in:"query",key:"directory"},{in:"query",key:"workspace"},{in:"body",key:"text"}]}]);return($?.client??this.client).post({url:"/tui/append-prompt",...$,...Z,headers:{"Content-Type":"application/json",...$?.headers,...Z.headers}})}openHelp(O,$){let Z=X([O],[{args:[{in:"query",key:"directory"},{in:"query",key:"workspace"}]}]);return($?.client??this.client).post({url:"/tui/open-help",...$,...Z})}openSessions(O,$){let Z=X([O],[{args:[{in:"query",key:"directory"},{in:"query",key:"workspace"}]}]);return($?.client??this.client).post({url:"/tui/open-sessions",...$,...Z})}openThemes(O,$){let Z=X([O],[{args:[{in:"query",key:"directory"},{in:"query",key:"workspace"}]}]);return($?.client??this.client).post({url:"/tui/open-themes",...$,...Z})}openModels(O,$){let Z=X([O],[{args:[{in:"query",key:"directory"},{in:"query",key:"workspace"}]}]);return($?.client??this.client).post({url:"/tui/open-models",...$,...Z})}submitPrompt(O,$){let Z=X([O],[{args:[{in:"query",key:"directory"},{in:"query",key:"workspace"}]}]);return($?.client??this.client).post({url:"/tui/submit-prompt",...$,...Z})}clearPrompt(O,$){let Z=X([O],[{args:[{in:"query",key:"directory"},{in:"query",key:"workspace"}]}]);return($?.client??this.client).post({url:"/tui/clear-prompt",...$,...Z})}executeCommand(O,$){let Z=X([O],[{args:[{in:"query",key:"directory"},{in:"query",key:"workspace"},{in:"body",key:"command"}]}]);return($?.client??this.client).post({url:"/tui/execute-command",...$,...Z,headers:{"Content-Type":"application/json",...$?.headers,...Z.headers}})}showToast(O,$){let Z=X([O],[{args:[{in:"query",key:"directory"},{in:"query",key:"workspace"},{in:"body",key:"title"},{in:"body",key:"message"},{in:"body",key:"variant"},{in:"body",key:"duration"}]}]);return($?.client??this.client).post({url:"/tui/show-toast",...$,...Z,headers:{"Content-Type":"application/json",...$?.headers,...Z.headers}})}publish(O,$){let Z=X([O],[{args:[{in:"query",key:"directory"},{in:"query",key:"workspace"},{key:"body",map:"body"}]}]);return($?.client??this.client).post({url:"/tui/publish",...$,...Z,headers:{"Content-Type":"application/json",...$?.headers,...Z.headers}})}selectSession(O,$){let Z=X([O],[{args:[{in:"query",key:"directory"},{in:"query",key:"workspace"},{in:"body",key:"sessionID"}]}]);return($?.client??this.client).post({url:"/tui/select-session",...$,...Z,headers:{"Content-Type":"application/json",...$?.headers,...Z.headers}})}_control;get control(){return this._control??=new KO({client:this.client})}}class SO extends I{dispose(O,$){let Z=X([O],[{args:[{in:"query",key:"directory"},{in:"query",key:"workspace"}]}]);return($?.client??this.client).post({url:"/instance/dispose",...$,...Z})}}class jO extends I{get(O,$){let Z=X([O],[{args:[{in:"query",key:"directory"},{in:"query",key:"workspace"}]}]);return($?.client??this.client).get({url:"/path",...$,...Z})}}class MO extends I{get(O,$){let Z=X([O],[{args:[{in:"query",key:"directory"},{in:"query",key:"workspace"}]}]);return($?.client??this.client).get({url:"/vcs",...$,...Z})}diff(O,$){let Z=X([O],[{args:[{in:"query",key:"directory"},{in:"query",key:"workspace"},{in:"query",key:"mode"}]}]);return($?.client??this.client).get({url:"/vcs/diff",...$,...Z})}}class QO extends I{list(O,$){let Z=X([O],[{args:[{in:"query",key:"directory"},{in:"query",key:"workspace"}]}]);return($?.client??this.client).get({url:"/command",...$,...Z})}}class TO extends I{status(O,$){let Z=X([O],[{args:[{in:"query",key:"directory"},{in:"query",key:"workspace"}]}]);return($?.client??this.client).get({url:"/lsp",...$,...Z})}}class _O extends I{status(O,$){let Z=X([O],[{args:[{in:"query",key:"directory"},{in:"query",key:"workspace"}]}]);return($?.client??this.client).get({url:"/formatter",...$,...Z})}}class t extends I{static __registry=new P$;constructor(O){super(O);t.__registry.set(this,O?.key)}_global;get global(){return this._global??=new b$({client:this.client})}_auth;get auth(){return this._auth??=new C$({client:this.client})}_app;get app(){return this._app??=new v$({client:this.client})}_experimental;get experimental(){return this._experimental??=new l$({client:this.client})}_project;get project(){return this._project??=new n$({client:this.client})}_pty;get pty(){return this._pty??=new p$({client:this.client})}_config;get config(){return this._config??=new i$({client:this.client})}_tool;get tool(){return this._tool??=new r$({client:this.client})}_worktree;get worktree(){return this._worktree??=new s$({client:this.client})}_session;get session(){return this._session??=new t$({client:this.client})}_part;get part(){return this._part??=new a$({client:this.client})}_permission;get permission(){return this._permission??=new o$({client:this.client})}_qredits;get qredits(){return this._qredits??=new e$({client:this.client})}_workflow;get workflow(){return this._workflow??=new $O({client:this.client})}_question;get question(){return this._question??=new OO({client:this.client})}_bash;get bash(){return this._bash??=new XO({client:this.client})}_provider;get provider(){return this._provider??=new YO({client:this.client})}_sync;get sync(){return this._sync??=new GO({client:this.client})}_find;get find(){return this._find??=new VO({client:this.client})}_file;get file(){return this._file??=new DO({client:this.client})}_event;get event(){return this._event??=new zO({client:this.client})}_mcp;get mcp(){return this._mcp??=new IO({client:this.client})}_tui;get tui(){return this._tui??=new UO({client:this.client})}_instance;get instance(){return this._instance??=new SO({client:this.client})}_path;get path(){return this._path??=new jO({client:this.client})}_vcs;get vcs(){return this._vcs??=new MO({client:this.client})}_command;get command(){return this._command??=new QO({client:this.client})}_lsp;get lsp(){return this._lsp??=new TO({client:this.client})}_formatter;get formatter(){return this._formatter??=new _O({client:this.client})}}function NO(O){if(!O?.fetch)O={...O,fetch:(Z)=>{return Z.timeout=!1,fetch(Z)}};if(O?.directory)O.headers={...O.headers,"x-qitqode-directory":encodeURIComponent(O.directory)};return O}function eO(O,$,Z){if(!O)return;if(!$)return O;if(O===$)return $;if(Z&&O===Z($))return $;return O}function $1(O,$){if(O.method!=="GET"&&O.method!=="HEAD")return O;let Z=new URL(O.url),J=!1;for(let[D,W]of[["x-qitqode-directory","directory"],["x-qitqode-workspace","workspace"]]){let G=eO(O.headers.get(D),W==="directory"?$.directory:$.workspace,W==="directory"?encodeURIComponent:void 0);if(!G)continue;if(!Z.searchParams.has(W))Z.searchParams.set(W,G);J=!0}if(!J)return O;let Y=new Request(Z,O);return Y.headers.delete("x-qitqode-directory"),Y.headers.delete("x-qitqode-workspace"),Y}function O1(O){if(O=NO(O),O?.experimental_workspaceID)O.headers={...O.headers,"x-qitqode-workspace":O.experimental_workspaceID};let $=C(O);return $.interceptors.request.use((Z)=>$1(Z,{directory:O?.directory,workspace:O?.experimental_workspaceID})),$.interceptors.response.use((Z)=>{if(Z.headers.get("content-type")==="text/html")throw Error("Request is not supported by this version of QitQode Server (Server responded with text/html)");return Z}),new t({client:$})}var W1=J1(Y1(),1);import xO from"path";var V1="QITQODE_KEY was rejected by the server (401/403). Check that the key is correct and has not expired.",Y$=`[qitqode] ${V1}`;function BO(O){if(O?.type!=="api"||typeof O.key!=="string")return;let Z=O.metadata?.method==="api-key"?"api-key":"sso";return{key:O.key,method:Z}}async function v(){if(process.env.QITQODE_KEY)return{key:process.env.QITQODE_KEY,method:"api-key"};let O=xO.join(J$.Path.data,"auth.json");try{let{readFile:$}=await import("fs/promises"),Z=await X$.withLock("auth-file",async()=>{let J=await $(O,"utf8"),Y=JSON.parse(J);return BO(Y?.forgewise)});if(Z)return Z}catch{}if(process.env.QITQODE_AUTH_CONTENT)try{let $=JSON.parse(process.env.QITQODE_AUTH_CONTENT);return BO($?.forgewise)}catch{}return}async function a(){if(process.env.QITQODE_KEY)return;let O=xO.join(J$.Path.data,"auth.json"),{readFile:$,writeFile:Z,chmod:J,rename:Y}=await import("fs/promises");await X$.withLock("auth-file",async()=>{let D=await $(O,"utf8"),W=JSON.parse(D);if(!("forgewise"in W))return;delete W.forgewise;let G=O+".tmp";await Z(G,JSON.stringify(W,null,2),"utf8"),await J(G,384),await Y(G,O)})}function y(O){return O.method==="api-key"?{"x-api-key":O.key}:{authorization:`Bearer ${O.key}`}}var Q$={};D1(Q$,{toolDescriptionEffect:()=>T1,resolveWorkflowSummaries:()=>j1,resolveWorkflowSpec:()=>M1,resolveToolManifest:()=>fO,resolveToolDescription:()=>bO,resolveTierRatings:()=>F1,resolveSubmitBatch:()=>b1,resolveRetrieveBatch:()=>C1,resolvePrompt:()=>kO,resolveListTiers:()=>w1,resolveGetHistory:()=>H1,resolveGenerateInlineComments:()=>P1,resolveGenerateDocumentation:()=>k1,resolveForgewiseConfig:()=>x1,resolveFetchQreditsBalance:()=>A1,resolveCompressTrajectorySafe:()=>q1,resolveChatCompletion:()=>f1,resolveChatBoolean:()=>g1,resolveBraveSearch:()=>E1,resolveBashArity:()=>Q1,resolveAnalyzeCodeForIssues:()=>h1,resolveAgentPrompt:()=>U1,remoteStats:()=>x,isBackendBillingError:()=>z1,clearRemoteCache:()=>K1,beginIdempotentAttempt:()=>hO,BackendRemote:()=>Q$,BackendRateLimitError:()=>m,BackendInsufficientBalanceError:()=>d,BackendAuthRejectedError:()=>H,BackendAccountNotLinkedError:()=>U$});import{createHash as AO,randomUUID as wO}from"crypto";var N=FO.create({service:"backend.remote"}),I$=30000,K$=5000,P=new Map,x={failures:0,authRejections:0,missingPrompts:0,missingToolDescriptions:0},W$=new Set,G$=new Set;class H extends Error{name="BackendAuthRejectedError";constructor(O){super(u.copy().invalidCredentials(O))}}class d extends Error{name="BackendInsufficientBalanceError";status=402;code;constructor(O,$){super(u.copy().insufficientBalance(O));this.code=$}}class m extends Error{name="BackendRateLimitError";status=429;retryAfterMs;constructor(O,$){let Z=O!==void 0?` Retry in about ${Math.max(1,Math.round(O/1000))}s.`:"";super(u.copy().rateLimit+Z+($?` (${$})`:""));this.retryAfterMs=O}}class U$ extends Error{name="BackendAccountNotLinkedError";status=409;constructor(O){super(u.copy().accountNotLinked(O))}}function z1(O){return O instanceof d||O instanceof m}var L1=600000,k=new Map;function I1(O,$){try{return AO("sha256").update(`${O}\x00${JSON.stringify($)}`).digest("hex").slice(0,16)}catch{return"unscoped"}}function hO(O,$,Z){let J=Date.now(),Y;try{Y=AO("sha256").update(`${O}\x00${$}\x00${JSON.stringify(Z)??""}`).digest("hex")}catch{return{key:`${$}-${wO()}`,settle:()=>{}}}let D=()=>k.delete(Y),W=k.get(Y);if(W&&W.expires>J)return{key:W.key,settle:D};if(k.size>256){for(let[V,K]of k)if(K.expires<=J)k.delete(V)}let G=`${$}-${Y.slice(0,16)}-${wO()}`;return k.set(Y,{key:G,expires:J+L1}),{key:G,settle:D}}function K1(){P.clear(),z$.clear(),V$.clear(),W$.clear(),G$.clear(),k.clear()}async function g(O,$){let Z=R.QITQODE_BACKEND_URL,J=Date.now(),Y=`${Z}::${O}`,D=P.get(Y);if(D&&D.expires>J)return D.value;try{let W=await v(),G=W?y(W):void 0,K=await $(HO({baseUrl:Z,headers:G,fetch:(z,L)=>fetch(z,{...L,signal:L?.signal??AbortSignal.timeout(K$)})}));return P.set(Y,{value:K,expires:J+I$}),K}catch(W){if(W instanceof EO){if(x.authRejections++,await a().catch(()=>{}),N.warn("backend rejected the credential; prompting re-auth",{cacheKey:O,baseUrl:Z,status:W.status}),process.env.QITQODE_KEY)N.error(Y$),console.error(Y$);throw new H(`HTTP ${W.status}`)}throw x.failures++,N.warn("backend request failed; surfacing error",{cacheKey:O,baseUrl:Z,error:W instanceof Error?W.message:String(W)}),W}}async function kO(O){if(O.indexOf("/")<=0)return;return g(`prompt:${O}`,($)=>$.prompt(O).then((Z)=>Z??void 0))}async function U1(O){let $=`agent/${O}`,Z=await kO($);if(Z===void 0||Z===""){if(!W$.has(O))W$.add(O),x.missingPrompts++,N.warn("backend served no content for agent prompt; running with an empty prompt",{prompt:$,baseUrl:R.QITQODE_BACKEND_URL,missingPrompts:x.missingPrompts})}return Z}var V$=new Map;function D$(O){let $=V$.get(O);if(!$)$={unsupported:!1},V$.set(O,$);return $}async function S1(){let O=D$(R.QITQODE_BACKEND_URL);if(O.inFlight)return O.inFlight;let $=g("workflow.catalog",(Z)=>Z.workflowSpecs().then((J)=>J??void 0)).then((Z)=>{let J=new Map;for(let Y of Z??[])if(Y&&typeof Y.name==="string"&&typeof Y.script==="string")J.set(Y.name,Y);return J});O.inFlight=$;try{return await $}finally{if(O.inFlight===$)O.inFlight=void 0}}async function PO(O,$){let Z=R.QITQODE_BACKEND_URL;if(!D$(Z).unsupported)try{return O(await S1())}catch(J){if(!gO(J))throw J;D$(Z).unsupported=!0,N.warn("backend has no workflowSpecs route; falling back to per-name workflow lookups",{baseUrl:Z})}return $()}async function j1(){return PO((O)=>[...O.values()].map(({script:$,...Z})=>Z),()=>g("workflow.list",(O)=>O.workflowSummaries()))}async function M1(O){return PO(($)=>$.get(O),()=>g(`workflow.get:${O}`,($)=>$.workflowSpec(O).then((Z)=>Z??void 0)))}async function Q1(){return g("permission.arity",(O)=>O.bashArity())}var z$=new Map;function L$(O){let $=z$.get(O);if(!$)$={unsupported:!1},z$.set(O,$);return $}function gO(O){return O instanceof qO&&(O.status===404||O.status===501)}async function fO(){let O=L$(R.QITQODE_BACKEND_URL);if(O.inFlight)return O.inFlight;let $=g("tool.manifest",(Z)=>Z.toolManifest().then((J)=>J??void 0)).then((Z)=>{let J=new Map;for(let Y of Z??[])if(Y&&typeof Y.id==="string"&&typeof Y.description==="string")J.set(Y.id,Y.description);return J});O.inFlight=$;try{return await $}finally{if(O.inFlight===$)O.inFlight=void 0}}async function bO(O){let $=R.QITQODE_BACKEND_URL,Z;if(!L$($).unsupported)try{Z=(await fO()).get(O)}catch(J){if(!gO(J))throw J;L$($).unsupported=!0,N.warn("backend has no toolManifest route; falling back to one request per tool description",{baseUrl:$})}if(Z===void 0||Z==="")Z=await g(`tool.description:${O}`,(J)=>J.toolDescription(O).then((Y)=>Y??void 0));if(Z===void 0||Z===""){if(!G$.has(O))G$.add(O),x.missingToolDescriptions++,N.warn("backend served no content for tool description; running with an empty description",{tool:O,baseUrl:R.QITQODE_BACKEND_URL,missingToolDescriptions:x.missingToolDescriptions})}return Z}function T1(O){return c.promise(()=>bO(O)).pipe(c.catchDefect(($)=>$ instanceof H?c.succeed(void 0):c.die($)))}function _1(O){if(!O)return{};try{let $=JSON.parse(O);if($&&typeof $==="object")return{code:typeof $.error==="string"?$.error:void 0,detail:typeof $.message==="string"?$.message:void 0}}catch{}return{detail:O.slice(0,300)}}function N1(O){let $=O.headers?.get?.("retry-after-ms");if($){let J=Number.parseFloat($);if(!Number.isNaN(J))return J}let Z=O.headers?.get?.("retry-after");if(Z){let J=Number.parseFloat(Z);if(!Number.isNaN(J))return Math.ceil(J*1000);let Y=Date.parse(Z)-Date.now();if(!Number.isNaN(Y)&&Y>0)return Math.ceil(Y)}return}async function S$(O,$){let Z=await O.text().catch(()=>""),{code:J,detail:Y}=_1(Z);if(O.status===402)return new d(Y,J);if(O.status===409)return new U$(Y);if(O.status===429)return new m(N1(O),Y);let D=Y?`: ${Y}`:J?`: ${J}`:"";return Error(`${$} failed: ${O.status}${D}`)}function B1(O){if(O===null||typeof O!=="object")return O;if(O.data!==void 0)return O.data;let $={};for(let[Z,J]of Object.entries(O)){if(Z==="success"||Z==="data"||Z==="error"||Z==="message")continue;$[Z]=J}return Object.keys($).length>0?$:void 0}function j$(O,$){let{error:Z,message:J}=O;if(Z==="insufficient_balance")return new d(J,Z);if(Z==="rate_limited"||Z==="too_many_requests")return new m(void 0,J);return Error(`${$} returned failure: ${Z??"unknown error"}${J?` \u2014 ${J}`:""}`)}async function q(O,$,Z,J={}){let Y=R.QITQODE_BACKEND_URL,D=`${Y}::post:${O}`;if(!J.noCache){let W=Date.now(),G=P.get(D);if(G&&G.expires>W)return G.value}try{let W=await v(),G=W?y(W):{},V=J.billable?hO(I1(Y,G),$,Z):void 0,K=V?{"x-idempotency-key":V.key}:{},z=await fetch(`${Y}/${$}`,{method:"POST",headers:{"Content-Type":"application/json",...G,...K},body:JSON.stringify(Z),signal:J.signal});if(z.status===401||z.status===403){V?.settle();let U=await z.text().catch(()=>"");if(U.includes("ERR_GATEWAY_REQUIRED"))throw Error(`Backend routing error: ${U}`);throw x.authRejections++,await a().catch(()=>{}),N.warn("backend rejected the credential; prompting re-auth",{fnName:$,baseUrl:Y,status:z.status}),new H(`HTTP ${z.status}`)}if(!z.ok){let U=await S$(z,`Backend POST /${$}`);if(z.status<500)V?.settle();throw U}let L=await z.json(),M=L!==null&&typeof L==="object"&&typeof L.error==="string";if((!J.acceptTopLevel||typeof L?.success==="boolean"||M)&&!L.success)throw V?.settle(),j$(L,`Backend POST /${$}`);V?.settle();let S=J.acceptTopLevel?B1(L):L.data;if(!J.noCache)P.set(D,{value:S,expires:Date.now()+I$});return S}catch(W){if(W instanceof H)throw W;throw x.failures++,N.warn("backend POST request failed; surfacing error",{fnName:$,baseUrl:Y,error:W instanceof Error?W.message:String(W)}),W}}async function M$(O,$,Z={}){let J=R.QITQODE_BACKEND_URL;try{let Y=await v(),D=Y?y(Y):{},W=new URLSearchParams(Object.entries($).map(([z,L])=>[z,String(L)])).toString(),G=W?`${J}/${O}?${W}`:`${J}/${O}`,V=await fetch(G,{method:"GET",headers:{...D},signal:Z.signal});if(V.status===401||V.status===403){let z=await V.text().catch(()=>"");if(z.includes("ERR_GATEWAY_REQUIRED"))throw Error(`Backend routing error: ${z}`);throw x.authRejections++,await a().catch(()=>{}),N.warn("backend rejected the credential; prompting re-auth",{fnName:O,baseUrl:J,status:V.status}),new H(`HTTP ${V.status}`)}if(!V.ok)throw await S$(V,`Backend GET /${O}`);let K=await V.json();if(!K.success)throw j$(K,`Backend GET /${O}`);return K.data}catch(Y){if(Y instanceof H)throw Y;throw x.failures++,N.warn("backend GET request failed; surfacing error",{fnName:O,baseUrl:J,error:Y instanceof Error?Y.message:String(Y)}),Y}}async function R1(O,$,Z){let J=R.QITQODE_BACKEND_URL,Y=`${J}::public:${O}`,D=Date.now(),W=P.get(Y);if(W&&W.expires>D)return W.value;try{let G=await fetch(`${J}/${$}`,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify(Z),signal:AbortSignal.timeout(K$)});if(!G.ok)throw await S$(G,`Backend public POST /${$}`);let V=await G.json();if(!V.success)throw j$(V,`Backend public POST /${$}`);let K=V.data;return P.set(Y,{value:K,expires:D+I$}),K}catch(G){throw x.failures++,N.warn("backend public request failed; surfacing error",{fnName:$,baseUrl:J,error:G instanceof Error?G.message:String(G)}),G}}async function x1(){try{return await R1("forgewise.config","forgewiseConfig",{})}catch(O){let $=await v().catch(()=>null);if(!$)throw O;let Z=R.QITQODE_BACKEND_URL,J=await fetch(`${Z}/forgewiseConfig`,{method:"POST",headers:{"Content-Type":"application/json",...y($)},body:JSON.stringify({}),signal:AbortSignal.timeout(K$)}).catch(()=>null);if(!J?.ok)throw O;let Y=await J.json().catch(()=>null);if(!Y?.success)throw O;return Y.data}}async function w1(){return M$("listTiers",{}).then((O)=>{if(!Array.isArray(O))return[];return O.flatMap(($)=>{if(typeof $==="string")return[{id:$}];if(!$||typeof $!=="object"||Array.isArray($))return[];let Z=$;return typeof Z.id==="string"?[{id:Z.id,...typeof Z.label==="string"?{label:Z.label}:{},...typeof Z.providerID==="string"?{providerID:Z.providerID}:{},...typeof Z.modelID==="string"?{modelID:Z.modelID}:{}}]:[]})}).catch((O)=>{return N.warn("listTiers fetch failed; using hardcoded tier fallback",{error:O instanceof Error?O.message:String(O)}),[]})}async function F1(){return M$("TIER_RATINGS",{}).catch((O)=>{N.warn("TIER_RATINGS fetch failed; no tier ratings will be shown",{error:O instanceof Error?O.message:String(O)});return})}async function q1(O){return q("compaction.trajectory","compressTrajectorySafe",O,{noCache:!0,billable:!0,signal:AbortSignal.timeout(120000)})}async function E1(O,$){let Z=$?.timeoutMs??30000,J={query:O};if($?.numResults)J.options={count:$.numResults};return q("brave.search","braveSearch",J,{noCache:!0,signal:AbortSignal.timeout(Z)})}async function H1(O){return q("qredits.history","getHistory",O,{noCache:!0})}async function A1(O){return q("forgewise.qredits.balance","fetchQreditsBalance",O,{noCache:!0,acceptTopLevel:!0})}async function h1(O){return q(`code.analyze:${O.filePath}`,"analyzeCodeForIssues",O,{noCache:!0,billable:!0,signal:AbortSignal.timeout(60000)})}async function k1(O){return q(`code.docs:${O.filePath}:${O.functionName??""}`,"generateDocumentation",O,{noCache:!0,billable:!0,signal:AbortSignal.timeout(60000)})}async function P1(O){return q(`code.comments:${O.filePath}`,"generateInlineComments",O,{noCache:!0,billable:!0,signal:AbortSignal.timeout(60000)})}async function g1(O,$,Z){return q("chat.boolean","chatBoolean",{sample:O,test:$},{noCache:!0,billable:!0,signal:AbortSignal.timeout(Z?.timeoutMs??30000)})}async function f1(O,$){let Z={message:O},J={};if($?.provider!==void 0)J.provider=$.provider;if($?.temperature!==void 0)J.temperature=$.temperature;if($?.maxTokens!==void 0)J.maxTokens=$.maxTokens;if(Object.keys(J).length>0)Z.options=J;return q("chat.completion","chatCompletion",Z,{noCache:!0,billable:!0,signal:AbortSignal.timeout($?.timeoutMs??30000)})}async function b1(O){return q("batch.submit","submitBatch",O,{noCache:!0,billable:!0,signal:AbortSignal.timeout(60000)})}async function C1(O){return M$("retrieveBatch",{batchId:O.batchId},{signal:AbortSignal.timeout(30000)})}
8
+ export{NO as mo,O1 as no,V1 as oo,Y$ as po,v as qo,a as ro,H as so,d as to,m as uo,U$ as vo,x1 as wo,w1 as xo,F1 as yo,H1 as zo,A1 as Ao,Q$ as Bo};
@@ -1,3 +1,3 @@
1
1
  // @bun
2
- import{Tr as _}from"./chunk-hn1f6rne.js";import{vt as h}from"./chunk-b6dsv601.js";import{EO as X,GO as L}from"./chunk-yjj4cvqg.js";var E={};X(E,{println:()=>g,print:()=>a,markdown:()=>G,logo:()=>I,input:()=>w,error:()=>A,empty:()=>D,UI:()=>E,Style:()=>m,CancelledError:()=>N});import{EOL as x}from"os";var T={left:[" "," "," \u2588\u2588\u2588\u2588\u2588\u2588\u2557 \u2588\u2588\u2557 \u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2557","\u2588\u2588\u2554\u2550\u2550\u2550\u2588\u2588\u2557 \u2588\u2588\u2551 \u255A\u2550\u2550\u2588\u2588\u2554\u2550\u2550\u255D","\u2588\u2588\u2551 \u2588\u2588\u2551 \u2588\u2588\u2551 \u2588\u2588\u2551 ","\u2588\u2588\u2551\u2584\u2584 \u2588\u2588\u2551 \u2588\u2588\u2551 \u2588\u2588\u2551 ","\u255A\u2588\u2588\u2588\u2588\u2588\u2588\u2554\u255D \u2588\u2588\u2551 \u2588\u2588\u2551 "," \u255A\u2550\u2550\u2580\u2580\u2550\u255D \u255A\u2550\u255D \u255A\u2550\u255D "],right:[" "," "," \u2588\u2588\u2588\u2588\u2588\u2588\u2557 \u2588\u2588\u2588\u2588\u2588\u2588\u2557 \u2588\u2588\u2588\u2588\u2588\u2588\u2557 \u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2557","\u2588\u2588\u2554\u2550\u2550\u2550\u2588\u2588\u2557 \u2588\u2588\u2554\u2550\u2550\u2550\u2588\u2588\u2557 \u2588\u2588\u2554\u2550\u2550\u2588\u2588\u2557 \u2588\u2588\u2554\u2550\u2550\u2550\u2550\u255D","\u2588\u2588\u2551 \u2588\u2588\u2551 \u2588\u2588\u2551 \u2588\u2588\u2551 \u2588\u2588\u2551 \u2588\u2588\u2551 \u2588\u2588\u2588\u2588\u2588\u2557 ","\u2588\u2588\u2551\u2584\u2584 \u2588\u2588\u2551 \u2588\u2588\u2551 \u2588\u2588\u2551 \u2588\u2588\u2551 \u2588\u2588\u2551 \u2588\u2588\u2554\u2550\u2550\u255D ","\u255A\u2588\u2588\u2588\u2588\u2588\u2588\u2554\u255D \u255A\u2588\u2588\u2588\u2588\u2588\u2588\u2554\u255D \u2588\u2588\u2588\u2588\u2588\u2588\u2554\u255D \u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2557"," \u255A\u2550\u2550\u2580\u2580\u2550\u255D \u255A\u2550\u2550\u2550\u2550\u2550\u255D \u255A\u2550\u2550\u2550\u2550\u2550\u255D \u255A\u2550\u2550\u2550\u2550\u2550\u2550\u255D"]},R={left:[" "," ","\u2588\u2580\u2580\u2588 \u2588 \u2580\u2580\u2580","\u2588 \u2584\u2588 \u2588 \u2588 ","\u2580\u2580\u2580\u2580 \u2580 \u2580 "],right:[" "," ","\u2588\u2580\u2580\u2588 \u2588\u2580\u2580\u2588 \u2588\u2580\u2580\u2584 \u2588\u2580\u2580\u2580","\u2588 \u2584\u2588 \u2588 \u2588 \u2588 \u2588 \u2588\u2580\u2580 ","\u2580\u2580\u2580\u2580 \u2580\u2580\u2580\u2580 \u2580\u2580\u2580 \u2580\u2580\u2580\u2580"]};var O=["\u2800 ","\u2588\u2580\u2580\u2588 \u2588 \u2580\u2580\u2580 \u2588\u2580\u2580\u2588 \u2588\u2580\u2580\u2588 \u2588\u2580\u2580\u2584 \u2588\u2580\u2580\u2580","\u2588 \u2584\u2588 \u2588 \u2588 \u2588 \u2584\u2588 \u2588 \u2588 \u2588 \u2588 \u2588\u2580\u2580 ","\u2580\u2580\u2580\u2580 \u2580 \u2580 \u2580\u2580\u2580\u2580 \u2580\u2580\u2580\u2580 \u2580\u2580\u2580 \u2580\u2580\u2580\u2580"],N=_.create("UICancelledError",h.void()),m={TEXT_HIGHLIGHT:"\x1B[96m",TEXT_HIGHLIGHT_BOLD:"\x1B[96m\x1B[1m",TEXT_DIM:"\x1B[90m",TEXT_DIM_BOLD:"\x1B[90m\x1B[1m",TEXT_NORMAL:"\x1B[0m",TEXT_NORMAL_BOLD:"\x1B[1m",TEXT_WARNING:"\x1B[93m",TEXT_WARNING_BOLD:"\x1B[93m\x1B[1m",TEXT_DANGER:"\x1B[91m",TEXT_DANGER_BOLD:"\x1B[91m\x1B[1m",TEXT_SUCCESS:"\x1B[92m",TEXT_SUCCESS_BOLD:"\x1B[92m\x1B[1m",TEXT_INFO:"\x1B[94m",TEXT_INFO_BOLD:"\x1B[94m\x1B[1m"};function g(...r){a(...r),process.stderr.write(x)}function a(...r){f=!1,process.stderr.write(r.join(" "))}var f=!1;function D(){if(f)return;g(""+m.TEXT_NORMAL),f=!0}function I(r){if(!process.stdout.isTTY&&!process.stderr.isTTY){let o=[];for(let s of O){if(r)o.push(r);o.push(s),o.push(x)}return o.join("").trimEnd()}let n=[],t="\x1B[0m",i={fg:"\x1B[90m",shadow:"\x1B[38;5;235m",bg:"\x1B[48;5;235m"},c={fg:t,shadow:"\x1B[38;5;238m",bg:"\x1B[48;5;238m"},d=" ",b=(o,s,u,l)=>{let e=[];for(let p of o){if(p==="_"){e.push(l," ",t);continue}if(p==="^"){e.push(s,l,"\u2580",t);continue}if(p==="~"){e.push(u,"\u2580",t);continue}if(p===" "){e.push(" ");continue}e.push(s,p,t)}return e.join("")};return T.left.forEach((o,s)=>{if(r)n.push(r);n.push(b(o,i.fg,i.shadow,i.bg)),n.push(d);let u=T.right[s]??"";n.push(b(u,c.fg,c.shadow,c.bg)),n.push(x)}),n.join("").trimEnd()}async function w(r){let t=L("readline").createInterface({input:process.stdin,output:process.stdout});return new Promise((i)=>{t.question(r,(c)=>{t.close(),i(c.trim())})})}function A(r){if(r.startsWith("Error: "))r=r.slice(7);g(m.TEXT_DANGER_BOLD+"Error: "+m.TEXT_NORMAL+r)}function G(r){return r}
2
+ import{Sr as _}from"./chunk-4cnwn1rh.js";import{ut as h}from"./chunk-5tray1fw.js";import{DO as X,FO as L}from"./chunk-7xm75w1e.js";var E={};X(E,{println:()=>g,print:()=>a,markdown:()=>G,logo:()=>I,input:()=>w,error:()=>A,empty:()=>D,UI:()=>E,Style:()=>m,CancelledError:()=>N});import{EOL as x}from"os";var T={left:[" "," "," \u2588\u2588\u2588\u2588\u2588\u2588\u2557 \u2588\u2588\u2557 \u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2557","\u2588\u2588\u2554\u2550\u2550\u2550\u2588\u2588\u2557 \u2588\u2588\u2551 \u255A\u2550\u2550\u2588\u2588\u2554\u2550\u2550\u255D","\u2588\u2588\u2551 \u2588\u2588\u2551 \u2588\u2588\u2551 \u2588\u2588\u2551 ","\u2588\u2588\u2551\u2584\u2584 \u2588\u2588\u2551 \u2588\u2588\u2551 \u2588\u2588\u2551 ","\u255A\u2588\u2588\u2588\u2588\u2588\u2588\u2554\u255D \u2588\u2588\u2551 \u2588\u2588\u2551 "," \u255A\u2550\u2550\u2580\u2580\u2550\u255D \u255A\u2550\u255D \u255A\u2550\u255D "],right:[" "," "," \u2588\u2588\u2588\u2588\u2588\u2588\u2557 \u2588\u2588\u2588\u2588\u2588\u2588\u2557 \u2588\u2588\u2588\u2588\u2588\u2588\u2557 \u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2557","\u2588\u2588\u2554\u2550\u2550\u2550\u2588\u2588\u2557 \u2588\u2588\u2554\u2550\u2550\u2550\u2588\u2588\u2557 \u2588\u2588\u2554\u2550\u2550\u2588\u2588\u2557 \u2588\u2588\u2554\u2550\u2550\u2550\u2550\u255D","\u2588\u2588\u2551 \u2588\u2588\u2551 \u2588\u2588\u2551 \u2588\u2588\u2551 \u2588\u2588\u2551 \u2588\u2588\u2551 \u2588\u2588\u2588\u2588\u2588\u2557 ","\u2588\u2588\u2551\u2584\u2584 \u2588\u2588\u2551 \u2588\u2588\u2551 \u2588\u2588\u2551 \u2588\u2588\u2551 \u2588\u2588\u2551 \u2588\u2588\u2554\u2550\u2550\u255D ","\u255A\u2588\u2588\u2588\u2588\u2588\u2588\u2554\u255D \u255A\u2588\u2588\u2588\u2588\u2588\u2588\u2554\u255D \u2588\u2588\u2588\u2588\u2588\u2588\u2554\u255D \u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2557"," \u255A\u2550\u2550\u2580\u2580\u2550\u255D \u255A\u2550\u2550\u2550\u2550\u2550\u255D \u255A\u2550\u2550\u2550\u2550\u2550\u255D \u255A\u2550\u2550\u2550\u2550\u2550\u2550\u255D"]},R={left:[" "," ","\u2588\u2580\u2580\u2588 \u2588 \u2580\u2580\u2580","\u2588 \u2584\u2588 \u2588 \u2588 ","\u2580\u2580\u2580\u2580 \u2580 \u2580 "],right:[" "," ","\u2588\u2580\u2580\u2588 \u2588\u2580\u2580\u2588 \u2588\u2580\u2580\u2584 \u2588\u2580\u2580\u2580","\u2588 \u2584\u2588 \u2588 \u2588 \u2588 \u2588 \u2588\u2580\u2580 ","\u2580\u2580\u2580\u2580 \u2580\u2580\u2580\u2580 \u2580\u2580\u2580 \u2580\u2580\u2580\u2580"]};var O=["\u2800 ","\u2588\u2580\u2580\u2588 \u2588 \u2580\u2580\u2580 \u2588\u2580\u2580\u2588 \u2588\u2580\u2580\u2588 \u2588\u2580\u2580\u2584 \u2588\u2580\u2580\u2580","\u2588 \u2584\u2588 \u2588 \u2588 \u2588 \u2584\u2588 \u2588 \u2588 \u2588 \u2588 \u2588\u2580\u2580 ","\u2580\u2580\u2580\u2580 \u2580 \u2580 \u2580\u2580\u2580\u2580 \u2580\u2580\u2580\u2580 \u2580\u2580\u2580 \u2580\u2580\u2580\u2580"],N=_.create("UICancelledError",h.void()),m={TEXT_HIGHLIGHT:"\x1B[96m",TEXT_HIGHLIGHT_BOLD:"\x1B[96m\x1B[1m",TEXT_DIM:"\x1B[90m",TEXT_DIM_BOLD:"\x1B[90m\x1B[1m",TEXT_NORMAL:"\x1B[0m",TEXT_NORMAL_BOLD:"\x1B[1m",TEXT_WARNING:"\x1B[93m",TEXT_WARNING_BOLD:"\x1B[93m\x1B[1m",TEXT_DANGER:"\x1B[91m",TEXT_DANGER_BOLD:"\x1B[91m\x1B[1m",TEXT_SUCCESS:"\x1B[92m",TEXT_SUCCESS_BOLD:"\x1B[92m\x1B[1m",TEXT_INFO:"\x1B[94m",TEXT_INFO_BOLD:"\x1B[94m\x1B[1m"};function g(...r){a(...r),process.stderr.write(x)}function a(...r){f=!1,process.stderr.write(r.join(" "))}var f=!1;function D(){if(f)return;g(""+m.TEXT_NORMAL),f=!0}function I(r){if(!process.stdout.isTTY&&!process.stderr.isTTY){let o=[];for(let s of O){if(r)o.push(r);o.push(s),o.push(x)}return o.join("").trimEnd()}let n=[],t="\x1B[0m",i={fg:"\x1B[90m",shadow:"\x1B[38;5;235m",bg:"\x1B[48;5;235m"},c={fg:t,shadow:"\x1B[38;5;238m",bg:"\x1B[48;5;238m"},d=" ",b=(o,s,u,l)=>{let e=[];for(let p of o){if(p==="_"){e.push(l," ",t);continue}if(p==="^"){e.push(s,l,"\u2580",t);continue}if(p==="~"){e.push(u,"\u2580",t);continue}if(p===" "){e.push(" ");continue}e.push(s,p,t)}return e.join("")};return T.left.forEach((o,s)=>{if(r)n.push(r);n.push(b(o,i.fg,i.shadow,i.bg)),n.push(d);let u=T.right[s]??"";n.push(b(u,c.fg,c.shadow,c.bg)),n.push(x)}),n.join("").trimEnd()}async function w(r){let t=L("readline").createInterface({input:process.stdin,output:process.stdout});return new Promise((i)=>{t.question(r,(c)=>{t.close(),i(c.trim())})})}function A(r){if(r.startsWith("Error: "))r=r.slice(7);g(m.TEXT_DANGER_BOLD+"Error: "+m.TEXT_NORMAL+r)}function G(r){return r}
3
3
  export{T as Tf,R as Uf,E as Vf};
@@ -1,5 +1,5 @@
1
1
  // @bun
2
- import{Do as G$}from"./chunk-csdm3n24.js";import{et as eZ,jt as U$,kt as A$,mt as CZ,nt as KZ}from"./chunk-20d0cd1j.js";import{ut as k$}from"./chunk-yn576pje.js";import{vt as SZ}from"./chunk-b6dsv601.js";import{$F as IZ,$N as F$,AF as J$,AN as JZ,BF as i,DN as fZ,EF as K$,EN as iZ,HF as o,IE as D$,IN as PZ,JF as l,JN as lZ,NE as RZ,NF as h,NN as cZ,Nz as a,OF as Q$,QA as kZ,QF as c,QG as EZ,RF as vZ,RN as v,TN as Y$,UA as rZ,UM as X$,VA as sZ,WH as YZ,XM as d,YD as $$,ZM as m,cG as zZ,cH as p,dE as q$,eA as L,eE as E,eN as DZ,fA as Z$,gE as WZ,hA as ZZ,hE as z$,iN as C,jA as oZ,nC as gZ,qH as P,qN as r,tF as $Z,uF as LZ,vF as qZ,vG as xZ,vN as B$,wF as f,wG as V$,yF as jZ}from"./chunk-t299e2aw.js";import{CO as u$,EO as BZ,GO as h$}from"./chunk-yjj4cvqg.js";var pZ={};BZ(pZ,{makeHandle:()=>AZ,make:()=>GZ,ProcessId:()=>UZ,ExitCode:()=>FZ,ChildProcessSpawner:()=>W});var FZ=YZ(),UZ=YZ(),hZ="~effect/ChildProcessSpawner/ChildProcessHandle",j$={[hZ]:hZ,...kZ,toJSON(){return{_id:"ChildProcessHandle",pid:this.pid}}},AZ=(Z)=>Object.assign(Object.create(j$),Z),GZ=(Z)=>{let q=(B,Q)=>Z(B).pipe(h((U)=>fZ(Q?.includeStderr===!0?U.all:U.stdout)),r),z=(B,Q)=>iZ(q(B,Q));return W.of({spawn:Z,exitCode:(B)=>xZ(o(Z(B),(Q)=>Q.exitCode)),streamString:q,streamLines:z,lines:(B,Q)=>lZ(z(B,Q)),string:(B,Q)=>cZ(q(B,Q))})};class W extends gZ()("effect/process/ChildProcessSpawner"){}var x={};BZ(x,{setEnv:()=>HZ,setCwd:()=>yZ,prefix:()=>C$,pipeTo:()=>P$,parseFdName:()=>g,make:()=>k,isStandardCommand:()=>I$,isPipedCommand:()=>E$,isCommand:()=>s,fdName:()=>NZ});var MZ="~effect/unstable/process/ChildProcess",aZ={...rZ,...sZ,[MZ]:MZ,asEffect(){return W.use((Z)=>Z.spawn(this))}},s=(Z)=>oZ(Z,MZ),I$=(Z)=>Z._tag==="StandardCommand",E$=(Z)=>Z._tag==="PipedCommand",I=(Z,q,z)=>Object.assign(Object.create(aZ),{_tag:"StandardCommand",command:Z,args:q,options:z}),e=(Z,q,z={})=>Object.assign(Object.create(aZ),{_tag:"PipedCommand",left:Z,right:q,options:z}),k=function(...q){if(OZ(q[0])){let[U,...A]=q,G=bZ(U,A);return I(G[0]??"",G.slice(1),{})}if(typeof q[0]==="object"&&!Array.isArray(q[0])&&!OZ(q[0])){let U=q[0];return function(A,...G){let b=bZ(A,G);return I(b[0]??"",b.slice(1),U)}}if(typeof q[0]==="string"&&!Array.isArray(q[1])){let[U,A={}]=q;return I(U,[],A)}let[z,B=[],Q={}]=q;return I(z,B,Q)},P$=a((Z)=>s(Z[0])&&s(Z[1]),(Z,q,z)=>e(Z,q,z??{})),C$=function(...q){if(s(q[0])&&q.length>1){let[B,...Q]=q,U=dZ(Q);return _Z(B,U)}let z=dZ(q);return(B)=>_Z(B,z)},dZ=(Z)=>{if(OZ(Z[0])){let[B,...Q]=Z,U=bZ(B,Q);return{command:U[0]??"",args:U.slice(1)}}let[q,z=[]]=Z;return{command:q,args:z}},_Z=(Z,q)=>{switch(Z._tag){case"StandardCommand":return I(q.command,[...q.args,Z.command,...Z.args],Z.options);case"PipedCommand":return e(_Z(Z.left,q),Z.right,Z.options)}},yZ=a(2,(Z,q)=>{switch(Z._tag){case"StandardCommand":return I(Z.command,Z.args,{...Z.options,cwd:q});case"PipedCommand":return e(yZ(Z.left,q),yZ(Z.right,q),Z.options)}}),HZ=a(2,(Z,q)=>{switch(Z._tag){case"StandardCommand":{let z=Z.options.env===void 0?q:{...Z.options.env,...q};return I(Z.command,Z.args,{...Z.options,env:z})}case"PipedCommand":return e(HZ(Z.left,q),HZ(Z.right,q),Z.options)}}),OZ=(Z)=>Array.isArray(Z)&&("raw"in Z)&&Array.isArray(Z.raw),g=(Z)=>{let q=/^fd(\d+)$/.exec(Z);if(q===null)return;let z=parseInt(q[1],10);return z>=3?z:void 0},NZ=(Z)=>`fd${Z}`,bZ=(Z,q)=>{let z=[];for(let[B,Q]of Z.entries())z=S$(Z,q,z,Q,B);return z},S$=(Z,q,z,B,Q)=>{let U=Z.raw[Q];if(U===void 0)throw Error(`Invalid backslash sequence: ${Z.raw[Q]}`);let{hasLeadingWhitespace:A,hasTrailingWhitespace:G,tokens:b}=w$(B,U),N=nZ(z,b,A);if(Q===q.length)return N;let S=q[Q],QZ=Array.isArray(S)?S.map((VZ)=>mZ(VZ)):[mZ(S)];return nZ(N,QZ,G)},mZ=(Z)=>{if(typeof Z==="string")return Z;return String(Z)},tZ=new Set([" ","\t","\r",`
2
+ import{Co as G$}from"./chunk-2hc5z7b5.js";import{dt as eZ,it as U$,jt as A$,lt as CZ,mt as KZ}from"./chunk-tqj69nh6.js";import{tt as k$}from"./chunk-ag8kz1e7.js";import{ut as SZ}from"./chunk-5tray1fw.js";import{AF as i,CN as fZ,DF as K$,DN as iZ,GF as o,HE as D$,HN as PZ,IF as l,IN as lZ,ME as RZ,MF as h,MN as cZ,Mz as a,NF as Q$,PA as kZ,PF as c,PG as EZ,QF as vZ,QN as v,SN as Y$,TA as rZ,TM as X$,UA as sZ,VH as YZ,WM as d,XD as $$,YM as m,_F as IZ,_N as F$,bG as zZ,bH as p,cE as q$,dA as L,dE as E,dN as DZ,eA as Z$,fE as WZ,gA as ZZ,gE as z$,hN as C,iA as oZ,mC as gZ,pH as P,pN as r,sF as $Z,tF as LZ,uF as qZ,uG as xZ,uN as B$,vF as f,vG as V$,xF as jZ,zF as J$,zN as JZ}from"./chunk-zs8kqdsf.js";import{BO as u$,DO as BZ,FO as h$}from"./chunk-7xm75w1e.js";var pZ={};BZ(pZ,{makeHandle:()=>AZ,make:()=>GZ,ProcessId:()=>UZ,ExitCode:()=>FZ,ChildProcessSpawner:()=>W});var FZ=YZ(),UZ=YZ(),hZ="~effect/ChildProcessSpawner/ChildProcessHandle",j$={[hZ]:hZ,...kZ,toJSON(){return{_id:"ChildProcessHandle",pid:this.pid}}},AZ=(Z)=>Object.assign(Object.create(j$),Z),GZ=(Z)=>{let q=(B,Q)=>Z(B).pipe(h((U)=>fZ(Q?.includeStderr===!0?U.all:U.stdout)),r),z=(B,Q)=>iZ(q(B,Q));return W.of({spawn:Z,exitCode:(B)=>xZ(o(Z(B),(Q)=>Q.exitCode)),streamString:q,streamLines:z,lines:(B,Q)=>lZ(z(B,Q)),string:(B,Q)=>cZ(q(B,Q))})};class W extends gZ()("effect/process/ChildProcessSpawner"){}var x={};BZ(x,{setEnv:()=>HZ,setCwd:()=>yZ,prefix:()=>C$,pipeTo:()=>P$,parseFdName:()=>g,make:()=>k,isStandardCommand:()=>I$,isPipedCommand:()=>E$,isCommand:()=>s,fdName:()=>NZ});var MZ="~effect/unstable/process/ChildProcess",aZ={...rZ,...sZ,[MZ]:MZ,asEffect(){return W.use((Z)=>Z.spawn(this))}},s=(Z)=>oZ(Z,MZ),I$=(Z)=>Z._tag==="StandardCommand",E$=(Z)=>Z._tag==="PipedCommand",I=(Z,q,z)=>Object.assign(Object.create(aZ),{_tag:"StandardCommand",command:Z,args:q,options:z}),e=(Z,q,z={})=>Object.assign(Object.create(aZ),{_tag:"PipedCommand",left:Z,right:q,options:z}),k=function(...q){if(OZ(q[0])){let[U,...A]=q,G=bZ(U,A);return I(G[0]??"",G.slice(1),{})}if(typeof q[0]==="object"&&!Array.isArray(q[0])&&!OZ(q[0])){let U=q[0];return function(A,...G){let b=bZ(A,G);return I(b[0]??"",b.slice(1),U)}}if(typeof q[0]==="string"&&!Array.isArray(q[1])){let[U,A={}]=q;return I(U,[],A)}let[z,B=[],Q={}]=q;return I(z,B,Q)},P$=a((Z)=>s(Z[0])&&s(Z[1]),(Z,q,z)=>e(Z,q,z??{})),C$=function(...q){if(s(q[0])&&q.length>1){let[B,...Q]=q,U=dZ(Q);return _Z(B,U)}let z=dZ(q);return(B)=>_Z(B,z)},dZ=(Z)=>{if(OZ(Z[0])){let[B,...Q]=Z,U=bZ(B,Q);return{command:U[0]??"",args:U.slice(1)}}let[q,z=[]]=Z;return{command:q,args:z}},_Z=(Z,q)=>{switch(Z._tag){case"StandardCommand":return I(q.command,[...q.args,Z.command,...Z.args],Z.options);case"PipedCommand":return e(_Z(Z.left,q),Z.right,Z.options)}},yZ=a(2,(Z,q)=>{switch(Z._tag){case"StandardCommand":return I(Z.command,Z.args,{...Z.options,cwd:q});case"PipedCommand":return e(yZ(Z.left,q),yZ(Z.right,q),Z.options)}}),HZ=a(2,(Z,q)=>{switch(Z._tag){case"StandardCommand":{let z=Z.options.env===void 0?q:{...Z.options.env,...q};return I(Z.command,Z.args,{...Z.options,env:z})}case"PipedCommand":return e(HZ(Z.left,q),HZ(Z.right,q),Z.options)}}),OZ=(Z)=>Array.isArray(Z)&&("raw"in Z)&&Array.isArray(Z.raw),g=(Z)=>{let q=/^fd(\d+)$/.exec(Z);if(q===null)return;let z=parseInt(q[1],10);return z>=3?z:void 0},NZ=(Z)=>`fd${Z}`,bZ=(Z,q)=>{let z=[];for(let[B,Q]of Z.entries())z=S$(Z,q,z,Q,B);return z},S$=(Z,q,z,B,Q)=>{let U=Z.raw[Q];if(U===void 0)throw Error(`Invalid backslash sequence: ${Z.raw[Q]}`);let{hasLeadingWhitespace:A,hasTrailingWhitespace:G,tokens:b}=w$(B,U),N=nZ(z,b,A);if(Q===q.length)return N;let S=q[Q],QZ=Array.isArray(S)?S.map((VZ)=>mZ(VZ)):[mZ(S)];return nZ(N,QZ,G)},mZ=(Z)=>{if(typeof Z==="string")return Z;return String(Z)},tZ=new Set([" ","\t","\r",`
3
3
  `]),T$={x:3,u:5},w$=(Z,q)=>{if(q.length===0)return{tokens:[],hasLeadingWhitespace:!1,hasTrailingWhitespace:!1};let z=tZ.has(q[0]),B=[],Q=0;for(let A=0,G=0;A<Z.length;A+=1,G+=1){let b=q[G];if(tZ.has(b)){if(Q!==A)B.push(Z.slice(Q,A));Q=A+1}else if(b==="\\"){let N=q[G+1];if(N===`
4
- `)A-=1,G+=1;else if(N==="u"&&q[G+2]==="{")G=q.indexOf("}",G+3);else G+=T$[N]??1}}let U=Q===Z.length;if(!U)B.push(Z.slice(Q));return{tokens:B,hasLeadingWhitespace:z,hasTrailingWhitespace:U}},nZ=(Z,q,z)=>z||Z.length===0||q.length===0?[...Z,...q]:[...Z.slice(0,-1),`${Z.at(-1)}${q.at(0)}`,...q.slice(1)];var _$=u$(k$(),1);import*as M$ from"child_process";import{PassThrough as g$}from"stream";var R=(Z)=>Z instanceof globalThis.Error?Z:new globalThis.Error(String(Z)),x$=(Z)=>{switch(Z.code){case"ENOENT":return"NotFound";case"EACCES":return"PermissionDenied";case"EEXIST":return"AlreadyExists";case"EISDIR":return"BadResource";case"ENOTDIR":return"BadResource";case"EBUSY":return"Busy";case"ELOOP":return"BadResource";default:return"Unknown"}},y$=(Z)=>{let q=[],z=[],B=(A)=>{switch(A._tag){case"StandardCommand":q.push(A);return;case"PipedCommand":B(A.left),z.push(A.options),B(A.right);return}};if(B(Z),q.length===0)throw Error("flatten produced empty commands array");let[Q,...U]=q;return{commands:[Q,...U],opts:z}},O=(Z,q,z)=>{let B=y$(z).commands.map((Q)=>`${Q.command} ${Q.args.join(" ")}`).join(" | ");return X$({_tag:x$(q),module:"ChildProcess",method:Z,pathOrDescriptor:B,syscall:q.syscall,cause:q})},f$=J$(function*(){let Z=yield*Y$,q=yield*F$,z=p(function*($){if(L($.cwd))return;return yield*Z.access($.cwd),q.resolve($.cwd)}),B=($)=>$.extendEnv?{...eZ(),...$.env}:$.env,Q=($)=>DZ($)?"pipe":$,U=($)=>d($)?"pipe":$,A=($)=>{let D={stream:"pipe",encoding:"utf-8",endOnDone:!0};if(L($.stdin))return D;if(typeof $.stdin==="string")return{...D,stream:$.stdin};if(DZ($.stdin))return{...D,stream:$.stdin};return{stream:$.stdin.stream,encoding:$.stdin.encoding??D.encoding,endOnDone:$.stdin.endOnDone??D.endOnDone}},G=($,D)=>{let J=$[D];if(L(J))return{stream:"pipe"};if(typeof J==="string")return{stream:J};if(d(J))return{stream:J};return{stream:J.stream}},b=($)=>{if(L($.additionalFds))return[];return Object.entries($.additionalFds).flatMap(([D,J])=>{let K=g(D);return L(K)?[]:[{fd:K,config:J}]}).toSorted((D,J)=>D.fd-J.fd)},N=($,D,J,K)=>{let X=(F)=>process.platform==="win32"&&F==="pipe"?"overlapped":F,Y=[X(Q($.stream)),X(U(D.stream)),X(U(J.stream))];if(K.length===0)return Y;let V=K.reduce((F,_)=>Math.max(F,_.fd),2);for(let F=3;F<=V;F++)Y[F]="ignore";for(let F of K)Y[F.fd]=X("pipe");return Y},S=p(function*($,D,J){if(J.length===0)return{getInputFd:()=>m,getOutputFd:()=>C};let K=new Map,X=new Map;for(let Y of J){let V=D.stdio[Y.fd];switch(Y.config.type){case"input":{let F=m;if(V&&"write"in V)F=CZ.fromWritable({evaluate:()=>V,onError:(_)=>O(`fromWritable(fd${Y.fd})`,R(_),$),endOnDone:!0});if(Y.config.stream)yield*EZ(PZ(Y.config.stream,F));K.set(Y.fd,F);break}case"output":{let F=C;if(V&&"read"in V){let _=new g$;V.on("error",(y)=>_.destroy(R(y))),V.pipe(_),F=KZ.fromReadable({evaluate:()=>_,onError:(y)=>O(`fromReadable(fd${Y.fd})`,R(y),$)})}if(Y.config.sink)F=JZ(F,Y.config.sink);X.set(Y.fd,F);break}}}return{getInputFd:(Y)=>K.get(Y)??m,getOutputFd:(Y)=>X.get(Y)??C}}),QZ=($,D,J)=>LZ(()=>{let K=m;if(ZZ(D.stdin))K=CZ.fromWritable({evaluate:()=>D.stdin,onError:(X)=>O("fromWritable(stdin)",R(X),$),endOnDone:J.endOnDone,encoding:J.encoding});if(DZ(J.stream))return Q$(EZ(PZ(J.stream,K)),K);return $Z(K)}),VZ=($,D,J,K)=>{let X=D.stdout?KZ.fromReadable({evaluate:()=>D.stdout,onError:(V)=>O("fromReadable(stdout)",R(V),$)}):C,Y=D.stderr?KZ.fromReadable({evaluate:()=>D.stderr,onError:(V)=>O("fromReadable(stderr)",R(V),$)}):C;if(d(J.stream))X=JZ(X,J.stream);if(d(K.stream))Y=JZ(Y,K.stream);return{stdout:X,stderr:Y,all:B$(X,Y)}},b$=($,D)=>jZ((J)=>{let K=q$(),X=_$.default($.command,$.args,D),Y=!1,V;return X.on("error",(F)=>{J(i(O("spawn",F,$)))}),X.on("exit",(...F)=>{V=F}),X.on("close",(...F)=>{if(Y)return;Y=!0,z$(K,$$(V??F))}),X.on("spawn",()=>{J($Z([X,K]))}),qZ(()=>{X.kill("SIGTERM")})}),XZ=($,D,J)=>{if(globalThis.process.platform==="win32")return jZ((K)=>{M$.exec(`taskkill /pid ${D.pid} /T /F`,{windowsHide:!0},(X)=>{if(X)return K(i(O("kill",R(X),$)));K(f)})});return K$({try:()=>{globalThis.process.kill(-D.pid,J)},catch:(K)=>O("kill",R(K),$)})},wZ=($,D,J)=>LZ(()=>{if(D.kill(J))return f;return i(O("kill",Error("Failed to kill child process"),$))}),N$=($,D,J)=>(K)=>{let X=J?.killSignal??"SIGTERM";if(L(J?.forceKillAfter))return K(D,$,X);return zZ(K(D,$,X),{duration:J.forceKillAfter,orElse:()=>K(D,$,"SIGKILL")})},W$=($,D)=>{let J=D??"stdout";switch(J){case"stdout":return $.stdout;case"stderr":return $.stderr;case"all":return $.all;default:{let K=g(J);return Z$(K)?$.getOutputFd(K):$.stdout}}},T=p(function*($){switch($._tag){case"StandardCommand":{let D=A($.options),J=G($.options,"stdout"),K=G($.options,"stderr"),X=b($.options),Y=yield*z($.options),[V,F]=yield*V$(b$($,{cwd:Y,env:B($.options),stdio:N(D,J,K,X),detached:$.options.detached??process.platform!=="win32",shell:$.options.shell,windowsHide:process.platform==="win32"}),p(function*([M,H]){let t=yield*WZ(H),n=N$(M,$,$.options);if(t){let[u]=yield*E(H);if(process.platform==="win32")return yield*f;if(u!==0&&ZZ(u))return yield*IZ(n(XZ));return yield*f}let w=(u)=>vZ(XZ($,M,u),()=>wZ($,M,u)),R$=$.options.killSignal??"SIGTERM",uZ=w(R$).pipe(l(E(H)),c),L$=$.options.forceKillAfter?zZ(uZ,{duration:$.options.forceKillAfter,orElse:()=>w("SIGKILL").pipe(l(E(H)),c)}):uZ;return yield*IZ(L$)})),_=yield*S($,V,X),y=VZ($,V,J,K),j=!0;return AZ({pid:UZ(V.pid),stdin:yield*QZ($,V,D),stdout:y.stdout,stderr:y.stderr,all:y.all,getInputFd:_.getInputFd,getOutputFd:_.getOutputFd,isRunning:h(WZ(F),(M)=>!M),exitCode:o(E(F),([M,H])=>{if(ZZ(M))return $Z(FZ(M));return i(O("exitCode",Error(`Process interrupted due to receipt of signal: '${H}'`),$))}),kill:(M)=>{let H=M?.killSignal??"SIGTERM",t=(w)=>vZ(XZ($,V,w),()=>wZ($,V,w)),n=t(H).pipe(l(E(F)),c);if(!M?.forceKillAfter)return n;return zZ(n,{duration:M.forceKillAfter,orElse:()=>t("SIGKILL").pipe(l(E(F)),c)})},unref:qZ(()=>{if(j)V.unref(),j=!1;return qZ(()=>{if(!j)V.ref(),j=!0})})})}case"PipedCommand":{let D=y$($),[J,...K]=D.commands,X=T(J);for(let Y=0;Y<K.length;Y++){let V=K[Y],F=D.opts[Y]??{},_=A(V.options),y=r(h(X,(H)=>W$(H,F.from))),j=F.to??"stdin";if(j==="stdin"){X=T(k(V.command,V.args,{...V.options,stdin:{..._,stream:y}}));continue}let M=g(j);if(L(M)){X=T(k(V.command,V.args,{...V.options,stdin:{..._,stream:y}}));continue}X=T(k(V.command,V.args,{...V.options,additionalFds:{...V.options.additionalFds,[NZ(M)]:{type:"input",stream:y}}}))}return yield*X}}});return GZ(T)}),i$=D$(W,f$),l$=i$.pipe(RZ(U$.layer),RZ(A$)),Bq=G$(async()=>{let{makeRuntime:Z}=await import("./chunk-bajtytm5.js");return Z(W,l$)});var H$=(Z,q)=>P.gen(function*(){let z=yield*Z.spawn(q),[B,Q]=yield*P.all([v.mkString(v.decodeText(z.stdout)),v.mkString(v.decodeText(z.stderr))],{concurrency:2});return{code:yield*z.exitCode,text:B,stderr:Q}}).pipe(P.scoped),Mq=H$,_q=(Z,q,z)=>H$(Z,x.make("git",q,{cwd:z?.cwd,extendEnv:!0,stdin:"ignore"}));var TZ={};BZ(TZ,{payloads:()=>p$,define:()=>c$,BusEvent:()=>TZ});var O$=new Map;function c$(Z,q){let z={type:Z,properties:q};return O$.set(Z,z),z}function p$(){return O$.entries().map(([Z,q])=>{return SZ.object({type:SZ.literal(Z),properties:q.properties}).meta({ref:`Event.${q.type}`})}).toArray()}
4
+ `)A-=1,G+=1;else if(N==="u"&&q[G+2]==="{")G=q.indexOf("}",G+3);else G+=T$[N]??1}}let U=Q===Z.length;if(!U)B.push(Z.slice(Q));return{tokens:B,hasLeadingWhitespace:z,hasTrailingWhitespace:U}},nZ=(Z,q,z)=>z||Z.length===0||q.length===0?[...Z,...q]:[...Z.slice(0,-1),`${Z.at(-1)}${q.at(0)}`,...q.slice(1)];var _$=u$(k$(),1);import*as M$ from"child_process";import{PassThrough as g$}from"stream";var R=(Z)=>Z instanceof globalThis.Error?Z:new globalThis.Error(String(Z)),x$=(Z)=>{switch(Z.code){case"ENOENT":return"NotFound";case"EACCES":return"PermissionDenied";case"EEXIST":return"AlreadyExists";case"EISDIR":return"BadResource";case"ENOTDIR":return"BadResource";case"EBUSY":return"Busy";case"ELOOP":return"BadResource";default:return"Unknown"}},y$=(Z)=>{let q=[],z=[],B=(A)=>{switch(A._tag){case"StandardCommand":q.push(A);return;case"PipedCommand":B(A.left),z.push(A.options),B(A.right);return}};if(B(Z),q.length===0)throw Error("flatten produced empty commands array");let[Q,...U]=q;return{commands:[Q,...U],opts:z}},O=(Z,q,z)=>{let B=y$(z).commands.map((Q)=>`${Q.command} ${Q.args.join(" ")}`).join(" | ");return X$({_tag:x$(q),module:"ChildProcess",method:Z,pathOrDescriptor:B,syscall:q.syscall,cause:q})},f$=J$(function*(){let Z=yield*Y$,q=yield*F$,z=p(function*($){if(L($.cwd))return;return yield*Z.access($.cwd),q.resolve($.cwd)}),B=($)=>$.extendEnv?{...eZ(),...$.env}:$.env,Q=($)=>DZ($)?"pipe":$,U=($)=>d($)?"pipe":$,A=($)=>{let D={stream:"pipe",encoding:"utf-8",endOnDone:!0};if(L($.stdin))return D;if(typeof $.stdin==="string")return{...D,stream:$.stdin};if(DZ($.stdin))return{...D,stream:$.stdin};return{stream:$.stdin.stream,encoding:$.stdin.encoding??D.encoding,endOnDone:$.stdin.endOnDone??D.endOnDone}},G=($,D)=>{let J=$[D];if(L(J))return{stream:"pipe"};if(typeof J==="string")return{stream:J};if(d(J))return{stream:J};return{stream:J.stream}},b=($)=>{if(L($.additionalFds))return[];return Object.entries($.additionalFds).flatMap(([D,J])=>{let K=g(D);return L(K)?[]:[{fd:K,config:J}]}).toSorted((D,J)=>D.fd-J.fd)},N=($,D,J,K)=>{let X=(F)=>process.platform==="win32"&&F==="pipe"?"overlapped":F,Y=[X(Q($.stream)),X(U(D.stream)),X(U(J.stream))];if(K.length===0)return Y;let V=K.reduce((F,_)=>Math.max(F,_.fd),2);for(let F=3;F<=V;F++)Y[F]="ignore";for(let F of K)Y[F.fd]=X("pipe");return Y},S=p(function*($,D,J){if(J.length===0)return{getInputFd:()=>m,getOutputFd:()=>C};let K=new Map,X=new Map;for(let Y of J){let V=D.stdio[Y.fd];switch(Y.config.type){case"input":{let F=m;if(V&&"write"in V)F=CZ.fromWritable({evaluate:()=>V,onError:(_)=>O(`fromWritable(fd${Y.fd})`,R(_),$),endOnDone:!0});if(Y.config.stream)yield*EZ(PZ(Y.config.stream,F));K.set(Y.fd,F);break}case"output":{let F=C;if(V&&"read"in V){let _=new g$;V.on("error",(y)=>_.destroy(R(y))),V.pipe(_),F=KZ.fromReadable({evaluate:()=>_,onError:(y)=>O(`fromReadable(fd${Y.fd})`,R(y),$)})}if(Y.config.sink)F=JZ(F,Y.config.sink);X.set(Y.fd,F);break}}}return{getInputFd:(Y)=>K.get(Y)??m,getOutputFd:(Y)=>X.get(Y)??C}}),QZ=($,D,J)=>LZ(()=>{let K=m;if(ZZ(D.stdin))K=CZ.fromWritable({evaluate:()=>D.stdin,onError:(X)=>O("fromWritable(stdin)",R(X),$),endOnDone:J.endOnDone,encoding:J.encoding});if(DZ(J.stream))return Q$(EZ(PZ(J.stream,K)),K);return $Z(K)}),VZ=($,D,J,K)=>{let X=D.stdout?KZ.fromReadable({evaluate:()=>D.stdout,onError:(V)=>O("fromReadable(stdout)",R(V),$)}):C,Y=D.stderr?KZ.fromReadable({evaluate:()=>D.stderr,onError:(V)=>O("fromReadable(stderr)",R(V),$)}):C;if(d(J.stream))X=JZ(X,J.stream);if(d(K.stream))Y=JZ(Y,K.stream);return{stdout:X,stderr:Y,all:B$(X,Y)}},b$=($,D)=>jZ((J)=>{let K=q$(),X=_$.default($.command,$.args,D),Y=!1,V;return X.on("error",(F)=>{J(i(O("spawn",F,$)))}),X.on("exit",(...F)=>{V=F}),X.on("close",(...F)=>{if(Y)return;Y=!0,z$(K,$$(V??F))}),X.on("spawn",()=>{J($Z([X,K]))}),qZ(()=>{X.kill("SIGTERM")})}),XZ=($,D,J)=>{if(globalThis.process.platform==="win32")return jZ((K)=>{M$.exec(`taskkill /pid ${D.pid} /T /F`,{windowsHide:!0},(X)=>{if(X)return K(i(O("kill",R(X),$)));K(f)})});return K$({try:()=>{globalThis.process.kill(-D.pid,J)},catch:(K)=>O("kill",R(K),$)})},wZ=($,D,J)=>LZ(()=>{if(D.kill(J))return f;return i(O("kill",Error("Failed to kill child process"),$))}),N$=($,D,J)=>(K)=>{let X=J?.killSignal??"SIGTERM";if(L(J?.forceKillAfter))return K(D,$,X);return zZ(K(D,$,X),{duration:J.forceKillAfter,orElse:()=>K(D,$,"SIGKILL")})},W$=($,D)=>{let J=D??"stdout";switch(J){case"stdout":return $.stdout;case"stderr":return $.stderr;case"all":return $.all;default:{let K=g(J);return Z$(K)?$.getOutputFd(K):$.stdout}}},T=p(function*($){switch($._tag){case"StandardCommand":{let D=A($.options),J=G($.options,"stdout"),K=G($.options,"stderr"),X=b($.options),Y=yield*z($.options),[V,F]=yield*V$(b$($,{cwd:Y,env:B($.options),stdio:N(D,J,K,X),detached:$.options.detached??process.platform!=="win32",shell:$.options.shell,windowsHide:process.platform==="win32"}),p(function*([M,H]){let t=yield*WZ(H),n=N$(M,$,$.options);if(t){let[u]=yield*E(H);if(process.platform==="win32")return yield*f;if(u!==0&&ZZ(u))return yield*IZ(n(XZ));return yield*f}let w=(u)=>vZ(XZ($,M,u),()=>wZ($,M,u)),R$=$.options.killSignal??"SIGTERM",uZ=w(R$).pipe(l(E(H)),c),L$=$.options.forceKillAfter?zZ(uZ,{duration:$.options.forceKillAfter,orElse:()=>w("SIGKILL").pipe(l(E(H)),c)}):uZ;return yield*IZ(L$)})),_=yield*S($,V,X),y=VZ($,V,J,K),j=!0;return AZ({pid:UZ(V.pid),stdin:yield*QZ($,V,D),stdout:y.stdout,stderr:y.stderr,all:y.all,getInputFd:_.getInputFd,getOutputFd:_.getOutputFd,isRunning:h(WZ(F),(M)=>!M),exitCode:o(E(F),([M,H])=>{if(ZZ(M))return $Z(FZ(M));return i(O("exitCode",Error(`Process interrupted due to receipt of signal: '${H}'`),$))}),kill:(M)=>{let H=M?.killSignal??"SIGTERM",t=(w)=>vZ(XZ($,V,w),()=>wZ($,V,w)),n=t(H).pipe(l(E(F)),c);if(!M?.forceKillAfter)return n;return zZ(n,{duration:M.forceKillAfter,orElse:()=>t("SIGKILL").pipe(l(E(F)),c)})},unref:qZ(()=>{if(j)V.unref(),j=!1;return qZ(()=>{if(!j)V.ref(),j=!0})})})}case"PipedCommand":{let D=y$($),[J,...K]=D.commands,X=T(J);for(let Y=0;Y<K.length;Y++){let V=K[Y],F=D.opts[Y]??{},_=A(V.options),y=r(h(X,(H)=>W$(H,F.from))),j=F.to??"stdin";if(j==="stdin"){X=T(k(V.command,V.args,{...V.options,stdin:{..._,stream:y}}));continue}let M=g(j);if(L(M)){X=T(k(V.command,V.args,{...V.options,stdin:{..._,stream:y}}));continue}X=T(k(V.command,V.args,{...V.options,additionalFds:{...V.options.additionalFds,[NZ(M)]:{type:"input",stream:y}}}))}return yield*X}}});return GZ(T)}),i$=D$(W,f$),l$=i$.pipe(RZ(U$.layer),RZ(A$)),Bq=G$(async()=>{let{makeRuntime:Z}=await import("./chunk-n0dy98h2.js");return Z(W,l$)});var H$=(Z,q)=>P.gen(function*(){let z=yield*Z.spawn(q),[B,Q]=yield*P.all([v.mkString(v.decodeText(z.stdout)),v.mkString(v.decodeText(z.stderr))],{concurrency:2});return{code:yield*z.exitCode,text:B,stderr:Q}}).pipe(P.scoped),Mq=H$,_q=(Z,q,z)=>H$(Z,x.make("git",q,{cwd:z?.cwd,extendEnv:!0,stdin:"ignore"}));var TZ={};BZ(TZ,{payloads:()=>p$,define:()=>c$,BusEvent:()=>TZ});var O$=new Map;function c$(Z,q){let z={type:Z,properties:q};return O$.set(Z,z),z}function p$(){return O$.entries().map(([Z,q])=>{return SZ.object({type:SZ.literal(Z),properties:q.properties}).meta({ref:`Event.${q.type}`})}).toArray()}
5
5
  export{W as qm,pZ as rm,x as sm,l$ as tm,H$ as um,Mq as vm,_q as wm,TZ as xm};
@@ -0,0 +1,2 @@
1
+ // @bun
2
+ import"./chunk-7xm75w1e.js";function o(){return(e,n)=>e.toJsonSchema(n)}export{o as default};
@@ -1,2 +1,2 @@
1
1
  // @bun
2
- import{Be as T}from"./chunk-ekndhwnn.js";import{wf as p}from"./chunk-yp3dj4wh.js";import{CO as N}from"./chunk-yjj4cvqg.js";var a=N(T(),1),t=N(p(),1);import{readFileSync as f}from"fs";var i=(e)=>async(s)=>{e.logger?.debug("@aws-sdk/credential-provider-web-identity - fromWebToken");let{roleArn:o,roleSessionName:r,webIdentityToken:E,providerId:n,policyArns:d,policy:S,durationSeconds:l}=e,{roleAssumerWithWebIdentity:c}=e;if(!c){let{getDefaultRoleAssumerWithWebIdentity:m}=await import("./chunk-hhgjbag9.js");c=m({...e.clientConfig,credentialProviderLogger:e.logger,parentClientConfig:{...s?.callerClientConfig,...e.parentClientConfig}},e.clientPlugins)}return c({RoleArn:o,RoleSessionName:r??`aws-sdk-js-session-${Date.now()}`,WebIdentityToken:E,ProviderId:n,PolicyArns:d,Policy:S,DurationSeconds:l})};var _="AWS_WEB_IDENTITY_TOKEN_FILE",I="AWS_ROLE_ARN",A="AWS_ROLE_SESSION_NAME",w=(e={})=>async(s)=>{e.logger?.debug("@aws-sdk/credential-provider-web-identity - fromTokenFile");let o=e?.webIdentityTokenFile??process.env[_],r=e?.roleArn??process.env[I],E=e?.roleSessionName??process.env[A];if(!o||!r)throw new t.CredentialsProviderError("Web identity configuration not specified",{logger:e.logger});let n=await i({...e,webIdentityToken:t.externalDataInterceptor?.getTokenRecord?.()[o]??f(o,{encoding:"ascii"}),roleArn:r,roleSessionName:E})(s);if(o===process.env[_])a.setCredentialFeature(n,"CREDENTIALS_ENV_VARS_STS_WEB_ID_TOKEN","h");return n};export{i as Vd,w as Wd};
2
+ import{Be as T}from"./chunk-ht5w06x7.js";import{wf as p}from"./chunk-tq0239xp.js";import{BO as N}from"./chunk-7xm75w1e.js";var a=N(T(),1),t=N(p(),1);import{readFileSync as f}from"fs";var i=(e)=>async(s)=>{e.logger?.debug("@aws-sdk/credential-provider-web-identity - fromWebToken");let{roleArn:o,roleSessionName:r,webIdentityToken:E,providerId:n,policyArns:d,policy:S,durationSeconds:l}=e,{roleAssumerWithWebIdentity:c}=e;if(!c){let{getDefaultRoleAssumerWithWebIdentity:m}=await import("./chunk-69nzndk7.js");c=m({...e.clientConfig,credentialProviderLogger:e.logger,parentClientConfig:{...s?.callerClientConfig,...e.parentClientConfig}},e.clientPlugins)}return c({RoleArn:o,RoleSessionName:r??`aws-sdk-js-session-${Date.now()}`,WebIdentityToken:E,ProviderId:n,PolicyArns:d,Policy:S,DurationSeconds:l})};var _="AWS_WEB_IDENTITY_TOKEN_FILE",I="AWS_ROLE_ARN",A="AWS_ROLE_SESSION_NAME",w=(e={})=>async(s)=>{e.logger?.debug("@aws-sdk/credential-provider-web-identity - fromTokenFile");let o=e?.webIdentityTokenFile??process.env[_],r=e?.roleArn??process.env[I],E=e?.roleSessionName??process.env[A];if(!o||!r)throw new t.CredentialsProviderError("Web identity configuration not specified",{logger:e.logger});let n=await i({...e,webIdentityToken:t.externalDataInterceptor?.getTokenRecord?.()[o]??f(o,{encoding:"ascii"}),roleArn:r,roleSessionName:E})(s);if(o===process.env[_])a.setCredentialFeature(n,"CREDENTIALS_ENV_VARS_STS_WEB_ID_TOKEN","h");return n};export{i as Vd,w as Wd};
@@ -1,2 +1,2 @@
1
1
  // @bun
2
- import{te as Qb}from"./chunk-8d2ddmf0.js";import{xe as Xb}from"./chunk-g06rv5fq.js";import{ye as Wb}from"./chunk-hgbkg85g.js";import{Ae as Kb,Be as Lb,ze as Jb}from"./chunk-ekndhwnn.js";import{Ce as Db}from"./chunk-sv48x9h8.js";import{uf as bb,vf as jb,wf as kb,xf as wb,yf as Bb}from"./chunk-yp3dj4wh.js";import"./chunk-yjj4cvqg.js";var K=Lb(),V=Kb(),D=jb(),J=kb(),H=wb(),M=Db(),G=Jb(),P=bb(),E=Qb(),Z=Bb(),m=Wb(),Yb=Xb(),Zb=async(b,j,k)=>{return{operation:D.getSmithyContext(j).operation,region:await D.normalizeProvider(b.region)()||(()=>{throw Error("expected `region` to be configured for `aws.auth#sigv4`")})()}};function Hb(b){return{schemeId:"aws.auth#sigv4",signingProperties:{name:"awsssoportal",region:b.region},propertiesExtractor:(j,k)=>({signingProperties:{config:j,context:k}})}}function Gb(b){return{schemeId:"smithy.api#noAuth"}}var zb=(b)=>{let j=[];switch(b.operation){case"GetRoleCredentials":{j.push(Gb());break}default:j.push(Hb(b))}return j},Fb=(b)=>{let j=E.resolveAwsSdkSigV4Config(b);return Object.assign(j,{authSchemePreference:D.normalizeProvider(b.authSchemePreference??[])})},Ib=(b)=>{return Object.assign(b,{useDualstackEndpoint:b.useDualstackEndpoint??!1,useFipsEndpoint:b.useFipsEndpoint??!1,defaultSigningName:"awsssoportal"})},Nb={UseFIPS:{type:"builtInParams",name:"useFipsEndpoint"},Endpoint:{type:"builtInParams",name:"endpoint"},Region:{type:"builtInParams",name:"region"},UseDualStack:{type:"builtInParams",name:"useDualstackEndpoint"}},Ub="3.997.14",Vb={version:Ub},z="ref",W=-1,N=!0,S="isSet",a="PartitionResult",U="booleanEquals",A="getAttr",h={[z]:"Endpoint"},v={[z]:a},Y={},p=[{[z]:"Region"}],u={conditions:[[S,[h]],[S,p],["aws.partition",p,a],[U,[{[z]:"UseFIPS"},N]],[U,[{[z]:"UseDualStack"},N]],[U,[{fn:A,argv:[v,"supportsDualStack"]},N]],[U,[{fn:A,argv:[v,"supportsFIPS"]},N]],["stringEquals",[{fn:A,argv:[v,"name"]},"aws-us-gov"]]],results:[[W],[W,"Invalid Configuration: FIPS and custom endpoint are not supported"],[W,"Invalid Configuration: Dualstack and custom endpoint are not supported"],[h,Y],["https://portal.sso-fips.{Region}.{PartitionResult#dualStackDnsSuffix}",Y],[W,"FIPS and DualStack are enabled, but this partition does not support one or both"],["https://portal.sso.{Region}.amazonaws.com",Y],["https://portal.sso-fips.{Region}.{PartitionResult#dnsSuffix}",Y],[W,"FIPS is enabled but this partition does not support FIPS"],["https://portal.sso.{Region}.{PartitionResult#dualStackDnsSuffix}",Y],[W,"DualStack is enabled but this partition does not support DualStack"],["https://portal.sso.{Region}.{PartitionResult#dnsSuffix}",Y],[W,"Invalid Configuration: Missing Region"]]},Mb=2,B=1e8,qb=new Int32Array([-1,1,-1,0,13,3,1,4,B+12,2,5,B+12,3,8,6,4,7,B+11,5,B+9,B+10,4,11,9,6,10,B+8,7,B+6,B+7,5,12,B+5,6,B+4,B+5,3,B+1,14,4,B+2,B+3]),Tb=H.BinaryDecisionDiagram.from(qb,Mb,u.conditions,u.results),yb=new H.EndpointCache({size:50,params:["Endpoint","Region","UseDualStack","UseFIPS"]}),Ob=(b,j={})=>{return yb.get(b,()=>H.decideEndpoint(Tb,{endpointParams:b,logger:j.logger}))};H.customEndpointFunctions.aws=K.awsEndpointFunctions;class X extends D.ServiceException{constructor(b){super(b);Object.setPrototypeOf(this,X.prototype)}}class l extends X{name="InvalidRequestException";$fault="client";constructor(b){super({name:"InvalidRequestException",$fault:"client",...b});Object.setPrototypeOf(this,l.prototype)}}class x extends X{name="ResourceNotFoundException";$fault="client";constructor(b){super({name:"ResourceNotFoundException",$fault:"client",...b});Object.setPrototypeOf(this,x.prototype)}}class C extends X{name="TooManyRequestsException";$fault="client";constructor(b){super({name:"TooManyRequestsException",$fault:"client",...b});Object.setPrototypeOf(this,C.prototype)}}class $ extends X{name="UnauthorizedException";$fault="client";constructor(b){super({name:"UnauthorizedException",$fault:"client",...b});Object.setPrototypeOf(this,$.prototype)}}var Rb="AccessTokenType",Ab="GetRoleCredentials",vb="GetRoleCredentialsRequest",Pb="GetRoleCredentialsResponse",Eb="InvalidRequestException",lb="RoleCredentials",xb="ResourceNotFoundException",Cb="SecretAccessKeyType",$b="SessionTokenType",_b="TooManyRequestsException",db="UnauthorizedException",mb="accountId",Sb="accessKeyId",hb="accessToken",pb="account_id",q="client",T="error",ub="expiration",sb="http",y="httpError",ab="httpHeader",s="httpQuery",O="message",rb="roleCredentials",gb="roleName",fb="role_name",r="smithy.ts.sdk.synthetic.com.amazonaws.sso",cb="secretAccessKey",tb="sessionToken",eb="x-amz-sso_bearer_token",L="com.amazonaws.sso",g=P.TypeRegistry.for(r),ib=[-3,r,"SSOServiceException",0,[],[]];g.registerError(ib,X);var F=P.TypeRegistry.for(L),nb=[-3,L,Eb,{[T]:q,[y]:400},[O],[0]];F.registerError(nb,l);var ob=[-3,L,xb,{[T]:q,[y]:404},[O],[0]];F.registerError(ob,x);var bj=[-3,L,_b,{[T]:q,[y]:429},[O],[0]];F.registerError(bj,C);var jj=[-3,L,db,{[T]:q,[y]:401},[O],[0]];F.registerError(jj,$);var kj=[g,F],wj=[0,L,Rb,8,0],Bj=[0,L,Cb,8,0],Dj=[0,L,$b,8,0],Jj=[3,L,vb,0,[gb,mb,hb],[[0,{[s]:fb}],[0,{[s]:pb}],[()=>wj,{[ab]:eb}]],3],Kj=[3,L,Pb,0,[rb],[[()=>Lj,0]]],Lj=[3,L,lb,0,[Sb,cb,tb,ub],[0,[()=>Bj,0],[()=>Dj,0],1]],Qj=[9,L,Ab,{[sb]:["GET","/federation/credentials",200]},()=>Jj,()=>Kj],Wj=(b)=>{return{apiVersion:"2019-06-10",base64Decoder:b?.base64Decoder??Z.fromBase64,base64Encoder:b?.base64Encoder??Z.toBase64,disableHostPrefix:b?.disableHostPrefix??!1,endpointProvider:b?.endpointProvider??Ob,extensions:b?.extensions??[],httpAuthSchemeProvider:b?.httpAuthSchemeProvider??zb,httpAuthSchemes:b?.httpAuthSchemes??[{schemeId:"aws.auth#sigv4",identityProvider:(j)=>j.getIdentityProvider("aws.auth#sigv4"),signer:new E.AwsSdkSigV4Signer},{schemeId:"smithy.api#noAuth",identityProvider:(j)=>j.getIdentityProvider("smithy.api#noAuth")||(async()=>({})),signer:new V.NoAuthSigner}],logger:b?.logger??new D.NoOpLogger,protocol:b?.protocol??Yb.AwsRestJsonProtocol,protocolSettings:b?.protocolSettings??{defaultNamespace:"com.amazonaws.sso",errorTypeRegistries:kj,version:"2019-06-10",serviceTarget:"SWBPortalService"},serviceId:b?.serviceId??"SSO",urlParser:b?.urlParser??M.parseUrl,utf8Decoder:b?.utf8Decoder??Z.fromUtf8,utf8Encoder:b?.utf8Encoder??Z.toUtf8}},Xj=(b)=>{D.emitWarningIfUnsupportedVersion(process.version);let j=J.resolveDefaultsModeConfig(b),k=()=>j().then(D.loadConfigsForDefaultMode),Q=Wj(b);K.emitWarningIfUnsupportedVersion(process.version);let w={profile:b?.profile,logger:Q.logger};return{...Q,...b,runtime:"node",defaultsMode:j,authSchemePreference:b?.authSchemePreference??J.loadConfig(E.NODE_AUTH_SCHEME_PREFERENCE_OPTIONS,w),bodyLengthChecker:b?.bodyLengthChecker??Z.calculateBodyLength,defaultUserAgentProvider:b?.defaultUserAgentProvider??K.createDefaultUserAgentProvider({serviceId:Q.serviceId,clientVersion:Vb.version}),maxAttempts:b?.maxAttempts??J.loadConfig(G.NODE_MAX_ATTEMPT_CONFIG_OPTIONS,b),region:b?.region??J.loadConfig(J.NODE_REGION_CONFIG_OPTIONS,{...J.NODE_REGION_CONFIG_FILE_OPTIONS,...w}),requestHandler:m.NodeHttpHandler.create(b?.requestHandler??k),retryMode:b?.retryMode??J.loadConfig({...G.NODE_RETRY_MODE_CONFIG_OPTIONS,default:async()=>(await k()).retryMode||G.DEFAULT_RETRY_MODE},b),sha256:b?.sha256??Z.Hash.bind(null,"sha256"),streamCollector:b?.streamCollector??m.streamCollector,useDualstackEndpoint:b?.useDualstackEndpoint??J.loadConfig(J.NODE_USE_DUALSTACK_ENDPOINT_CONFIG_OPTIONS,w),useFipsEndpoint:b?.useFipsEndpoint??J.loadConfig(J.NODE_USE_FIPS_ENDPOINT_CONFIG_OPTIONS,w),userAgentAppId:b?.userAgentAppId??J.loadConfig(K.NODE_APP_ID_CONFIG_OPTIONS,w)}},Yj=(b)=>{let{httpAuthSchemes:j,httpAuthSchemeProvider:k,credentials:Q}=b;return{setHttpAuthScheme(w){let I=j.findIndex((R)=>R.schemeId===w.schemeId);if(I===-1)j.push(w);else j.splice(I,1,w)},httpAuthSchemes(){return j},setHttpAuthSchemeProvider(w){k=w},httpAuthSchemeProvider(){return k},setCredentials(w){Q=w},credentials(){return Q}}},Zj=(b)=>{return{httpAuthSchemes:b.httpAuthSchemes(),httpAuthSchemeProvider:b.httpAuthSchemeProvider(),credentials:b.credentials()}},Hj=(b,j)=>{let k=Object.assign(K.getAwsRegionExtensionConfiguration(b),D.getDefaultExtensionConfiguration(b),M.getHttpHandlerExtensionConfiguration(b),Yj(b));return j.forEach((Q)=>Q.configure(k)),Object.assign(b,K.resolveAwsRegionExtensionConfiguration(k),D.resolveDefaultRuntimeConfig(k),M.resolveHttpHandlerRuntimeConfig(k),Zj(k))};class _ extends D.Client{config;constructor(...[b]){let j=Xj(b||{});super(j);this.initConfig=j;let k=Ib(j),Q=K.resolveUserAgentConfig(k),w=G.resolveRetryConfig(Q),I=J.resolveRegionConfig(w),R=K.resolveHostHeaderConfig(I),e=H.resolveEndpointConfig(R),i=Fb(e),n=Hj(i,b?.extensions||[]);this.config=n,this.middlewareStack.use(P.getSchemaSerdePlugin(this.config)),this.middlewareStack.use(K.getUserAgentPlugin(this.config)),this.middlewareStack.use(G.getRetryPlugin(this.config)),this.middlewareStack.use(M.getContentLengthPlugin(this.config)),this.middlewareStack.use(K.getHostHeaderPlugin(this.config)),this.middlewareStack.use(K.getLoggerPlugin(this.config)),this.middlewareStack.use(K.getRecursionDetectionPlugin(this.config)),this.middlewareStack.use(V.getHttpAuthSchemeEndpointRuleSetPlugin(this.config,{httpAuthSchemeParametersProvider:Zb,identityProviderConfigProvider:async(o)=>new V.DefaultIdentityProviderConfig({"aws.auth#sigv4":o.credentials})})),this.middlewareStack.use(V.getHttpSigningPlugin(this.config))}destroy(){super.destroy()}}class d extends D.Command.classBuilder().ep(Nb).m(function(b,j,k,Q){return[H.getEndpointPlugin(k,b.getEndpointParameterInstructions())]}).s("SWBPortalService","GetRoleCredentials",{}).n("SSOClient","GetRoleCredentialsCommand").sc(Qj).build(){}var Gj={GetRoleCredentialsCommand:d};class f extends _{}D.createAggregatedClient(Gj,f);var{Command:zj,Client:Fj}=D;var c=d;var t=_;export{t as SSOClient,c as GetRoleCredentialsCommand};
2
+ import{te as Qb}from"./chunk-yek0sk2q.js";import{xe as Xb}from"./chunk-01my2y0c.js";import{ye as Wb}from"./chunk-70ck4v3t.js";import{Ae as Kb,Be as Lb,ze as Jb}from"./chunk-ht5w06x7.js";import{Ce as Db}from"./chunk-enpzvmtc.js";import{uf as bb,vf as jb,wf as kb,xf as wb,yf as Bb}from"./chunk-tq0239xp.js";import"./chunk-7xm75w1e.js";var K=Lb(),V=Kb(),D=jb(),J=kb(),H=wb(),M=Db(),G=Jb(),P=bb(),E=Qb(),Z=Bb(),m=Wb(),Yb=Xb(),Zb=async(b,j,k)=>{return{operation:D.getSmithyContext(j).operation,region:await D.normalizeProvider(b.region)()||(()=>{throw Error("expected `region` to be configured for `aws.auth#sigv4`")})()}};function Hb(b){return{schemeId:"aws.auth#sigv4",signingProperties:{name:"awsssoportal",region:b.region},propertiesExtractor:(j,k)=>({signingProperties:{config:j,context:k}})}}function Gb(b){return{schemeId:"smithy.api#noAuth"}}var zb=(b)=>{let j=[];switch(b.operation){case"GetRoleCredentials":{j.push(Gb());break}default:j.push(Hb(b))}return j},Fb=(b)=>{let j=E.resolveAwsSdkSigV4Config(b);return Object.assign(j,{authSchemePreference:D.normalizeProvider(b.authSchemePreference??[])})},Ib=(b)=>{return Object.assign(b,{useDualstackEndpoint:b.useDualstackEndpoint??!1,useFipsEndpoint:b.useFipsEndpoint??!1,defaultSigningName:"awsssoportal"})},Nb={UseFIPS:{type:"builtInParams",name:"useFipsEndpoint"},Endpoint:{type:"builtInParams",name:"endpoint"},Region:{type:"builtInParams",name:"region"},UseDualStack:{type:"builtInParams",name:"useDualstackEndpoint"}},Ub="3.997.14",Vb={version:Ub},z="ref",W=-1,N=!0,S="isSet",a="PartitionResult",U="booleanEquals",A="getAttr",h={[z]:"Endpoint"},v={[z]:a},Y={},p=[{[z]:"Region"}],u={conditions:[[S,[h]],[S,p],["aws.partition",p,a],[U,[{[z]:"UseFIPS"},N]],[U,[{[z]:"UseDualStack"},N]],[U,[{fn:A,argv:[v,"supportsDualStack"]},N]],[U,[{fn:A,argv:[v,"supportsFIPS"]},N]],["stringEquals",[{fn:A,argv:[v,"name"]},"aws-us-gov"]]],results:[[W],[W,"Invalid Configuration: FIPS and custom endpoint are not supported"],[W,"Invalid Configuration: Dualstack and custom endpoint are not supported"],[h,Y],["https://portal.sso-fips.{Region}.{PartitionResult#dualStackDnsSuffix}",Y],[W,"FIPS and DualStack are enabled, but this partition does not support one or both"],["https://portal.sso.{Region}.amazonaws.com",Y],["https://portal.sso-fips.{Region}.{PartitionResult#dnsSuffix}",Y],[W,"FIPS is enabled but this partition does not support FIPS"],["https://portal.sso.{Region}.{PartitionResult#dualStackDnsSuffix}",Y],[W,"DualStack is enabled but this partition does not support DualStack"],["https://portal.sso.{Region}.{PartitionResult#dnsSuffix}",Y],[W,"Invalid Configuration: Missing Region"]]},Mb=2,B=1e8,qb=new Int32Array([-1,1,-1,0,13,3,1,4,B+12,2,5,B+12,3,8,6,4,7,B+11,5,B+9,B+10,4,11,9,6,10,B+8,7,B+6,B+7,5,12,B+5,6,B+4,B+5,3,B+1,14,4,B+2,B+3]),Tb=H.BinaryDecisionDiagram.from(qb,Mb,u.conditions,u.results),yb=new H.EndpointCache({size:50,params:["Endpoint","Region","UseDualStack","UseFIPS"]}),Ob=(b,j={})=>{return yb.get(b,()=>H.decideEndpoint(Tb,{endpointParams:b,logger:j.logger}))};H.customEndpointFunctions.aws=K.awsEndpointFunctions;class X extends D.ServiceException{constructor(b){super(b);Object.setPrototypeOf(this,X.prototype)}}class l extends X{name="InvalidRequestException";$fault="client";constructor(b){super({name:"InvalidRequestException",$fault:"client",...b});Object.setPrototypeOf(this,l.prototype)}}class x extends X{name="ResourceNotFoundException";$fault="client";constructor(b){super({name:"ResourceNotFoundException",$fault:"client",...b});Object.setPrototypeOf(this,x.prototype)}}class C extends X{name="TooManyRequestsException";$fault="client";constructor(b){super({name:"TooManyRequestsException",$fault:"client",...b});Object.setPrototypeOf(this,C.prototype)}}class $ extends X{name="UnauthorizedException";$fault="client";constructor(b){super({name:"UnauthorizedException",$fault:"client",...b});Object.setPrototypeOf(this,$.prototype)}}var Rb="AccessTokenType",Ab="GetRoleCredentials",vb="GetRoleCredentialsRequest",Pb="GetRoleCredentialsResponse",Eb="InvalidRequestException",lb="RoleCredentials",xb="ResourceNotFoundException",Cb="SecretAccessKeyType",$b="SessionTokenType",_b="TooManyRequestsException",db="UnauthorizedException",mb="accountId",Sb="accessKeyId",hb="accessToken",pb="account_id",q="client",T="error",ub="expiration",sb="http",y="httpError",ab="httpHeader",s="httpQuery",O="message",rb="roleCredentials",gb="roleName",fb="role_name",r="smithy.ts.sdk.synthetic.com.amazonaws.sso",cb="secretAccessKey",tb="sessionToken",eb="x-amz-sso_bearer_token",L="com.amazonaws.sso",g=P.TypeRegistry.for(r),ib=[-3,r,"SSOServiceException",0,[],[]];g.registerError(ib,X);var F=P.TypeRegistry.for(L),nb=[-3,L,Eb,{[T]:q,[y]:400},[O],[0]];F.registerError(nb,l);var ob=[-3,L,xb,{[T]:q,[y]:404},[O],[0]];F.registerError(ob,x);var bj=[-3,L,_b,{[T]:q,[y]:429},[O],[0]];F.registerError(bj,C);var jj=[-3,L,db,{[T]:q,[y]:401},[O],[0]];F.registerError(jj,$);var kj=[g,F],wj=[0,L,Rb,8,0],Bj=[0,L,Cb,8,0],Dj=[0,L,$b,8,0],Jj=[3,L,vb,0,[gb,mb,hb],[[0,{[s]:fb}],[0,{[s]:pb}],[()=>wj,{[ab]:eb}]],3],Kj=[3,L,Pb,0,[rb],[[()=>Lj,0]]],Lj=[3,L,lb,0,[Sb,cb,tb,ub],[0,[()=>Bj,0],[()=>Dj,0],1]],Qj=[9,L,Ab,{[sb]:["GET","/federation/credentials",200]},()=>Jj,()=>Kj],Wj=(b)=>{return{apiVersion:"2019-06-10",base64Decoder:b?.base64Decoder??Z.fromBase64,base64Encoder:b?.base64Encoder??Z.toBase64,disableHostPrefix:b?.disableHostPrefix??!1,endpointProvider:b?.endpointProvider??Ob,extensions:b?.extensions??[],httpAuthSchemeProvider:b?.httpAuthSchemeProvider??zb,httpAuthSchemes:b?.httpAuthSchemes??[{schemeId:"aws.auth#sigv4",identityProvider:(j)=>j.getIdentityProvider("aws.auth#sigv4"),signer:new E.AwsSdkSigV4Signer},{schemeId:"smithy.api#noAuth",identityProvider:(j)=>j.getIdentityProvider("smithy.api#noAuth")||(async()=>({})),signer:new V.NoAuthSigner}],logger:b?.logger??new D.NoOpLogger,protocol:b?.protocol??Yb.AwsRestJsonProtocol,protocolSettings:b?.protocolSettings??{defaultNamespace:"com.amazonaws.sso",errorTypeRegistries:kj,version:"2019-06-10",serviceTarget:"SWBPortalService"},serviceId:b?.serviceId??"SSO",urlParser:b?.urlParser??M.parseUrl,utf8Decoder:b?.utf8Decoder??Z.fromUtf8,utf8Encoder:b?.utf8Encoder??Z.toUtf8}},Xj=(b)=>{D.emitWarningIfUnsupportedVersion(process.version);let j=J.resolveDefaultsModeConfig(b),k=()=>j().then(D.loadConfigsForDefaultMode),Q=Wj(b);K.emitWarningIfUnsupportedVersion(process.version);let w={profile:b?.profile,logger:Q.logger};return{...Q,...b,runtime:"node",defaultsMode:j,authSchemePreference:b?.authSchemePreference??J.loadConfig(E.NODE_AUTH_SCHEME_PREFERENCE_OPTIONS,w),bodyLengthChecker:b?.bodyLengthChecker??Z.calculateBodyLength,defaultUserAgentProvider:b?.defaultUserAgentProvider??K.createDefaultUserAgentProvider({serviceId:Q.serviceId,clientVersion:Vb.version}),maxAttempts:b?.maxAttempts??J.loadConfig(G.NODE_MAX_ATTEMPT_CONFIG_OPTIONS,b),region:b?.region??J.loadConfig(J.NODE_REGION_CONFIG_OPTIONS,{...J.NODE_REGION_CONFIG_FILE_OPTIONS,...w}),requestHandler:m.NodeHttpHandler.create(b?.requestHandler??k),retryMode:b?.retryMode??J.loadConfig({...G.NODE_RETRY_MODE_CONFIG_OPTIONS,default:async()=>(await k()).retryMode||G.DEFAULT_RETRY_MODE},b),sha256:b?.sha256??Z.Hash.bind(null,"sha256"),streamCollector:b?.streamCollector??m.streamCollector,useDualstackEndpoint:b?.useDualstackEndpoint??J.loadConfig(J.NODE_USE_DUALSTACK_ENDPOINT_CONFIG_OPTIONS,w),useFipsEndpoint:b?.useFipsEndpoint??J.loadConfig(J.NODE_USE_FIPS_ENDPOINT_CONFIG_OPTIONS,w),userAgentAppId:b?.userAgentAppId??J.loadConfig(K.NODE_APP_ID_CONFIG_OPTIONS,w)}},Yj=(b)=>{let{httpAuthSchemes:j,httpAuthSchemeProvider:k,credentials:Q}=b;return{setHttpAuthScheme(w){let I=j.findIndex((R)=>R.schemeId===w.schemeId);if(I===-1)j.push(w);else j.splice(I,1,w)},httpAuthSchemes(){return j},setHttpAuthSchemeProvider(w){k=w},httpAuthSchemeProvider(){return k},setCredentials(w){Q=w},credentials(){return Q}}},Zj=(b)=>{return{httpAuthSchemes:b.httpAuthSchemes(),httpAuthSchemeProvider:b.httpAuthSchemeProvider(),credentials:b.credentials()}},Hj=(b,j)=>{let k=Object.assign(K.getAwsRegionExtensionConfiguration(b),D.getDefaultExtensionConfiguration(b),M.getHttpHandlerExtensionConfiguration(b),Yj(b));return j.forEach((Q)=>Q.configure(k)),Object.assign(b,K.resolveAwsRegionExtensionConfiguration(k),D.resolveDefaultRuntimeConfig(k),M.resolveHttpHandlerRuntimeConfig(k),Zj(k))};class _ extends D.Client{config;constructor(...[b]){let j=Xj(b||{});super(j);this.initConfig=j;let k=Ib(j),Q=K.resolveUserAgentConfig(k),w=G.resolveRetryConfig(Q),I=J.resolveRegionConfig(w),R=K.resolveHostHeaderConfig(I),e=H.resolveEndpointConfig(R),i=Fb(e),n=Hj(i,b?.extensions||[]);this.config=n,this.middlewareStack.use(P.getSchemaSerdePlugin(this.config)),this.middlewareStack.use(K.getUserAgentPlugin(this.config)),this.middlewareStack.use(G.getRetryPlugin(this.config)),this.middlewareStack.use(M.getContentLengthPlugin(this.config)),this.middlewareStack.use(K.getHostHeaderPlugin(this.config)),this.middlewareStack.use(K.getLoggerPlugin(this.config)),this.middlewareStack.use(K.getRecursionDetectionPlugin(this.config)),this.middlewareStack.use(V.getHttpAuthSchemeEndpointRuleSetPlugin(this.config,{httpAuthSchemeParametersProvider:Zb,identityProviderConfigProvider:async(o)=>new V.DefaultIdentityProviderConfig({"aws.auth#sigv4":o.credentials})})),this.middlewareStack.use(V.getHttpSigningPlugin(this.config))}destroy(){super.destroy()}}class d extends D.Command.classBuilder().ep(Nb).m(function(b,j,k,Q){return[H.getEndpointPlugin(k,b.getEndpointParameterInstructions())]}).s("SWBPortalService","GetRoleCredentials",{}).n("SSOClient","GetRoleCredentialsCommand").sc(Qj).build(){}var Gj={GetRoleCredentialsCommand:d};class f extends _{}D.createAggregatedClient(Gj,f);var{Command:zj,Client:Fj}=D;var c=d;var t=_;export{t as SSOClient,c as GetRoleCredentialsCommand};