@qitqode/qitqode-android-arm64 0.1.35 → 0.2.0

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 (451) hide show
  1. package/bundle/{chunk-7311jry1.js → chunk-00sr2gwz.js} +2 -2
  2. package/bundle/{chunk-azhw650z.js → chunk-02xcb52z.js} +2 -2
  3. package/bundle/{chunk-gws1rn1v.js → chunk-08q55ya0.js} +1 -1
  4. package/bundle/chunk-092bx2yw.js +2 -0
  5. package/bundle/{chunk-xgr6jnd6.js → chunk-0g25z230.js} +1 -1
  6. package/bundle/chunk-0jrgk6vk.js +2 -0
  7. package/bundle/chunk-0ne5m1n3.js +2 -0
  8. package/bundle/chunk-0qn52zsd.js +2 -0
  9. package/bundle/{chunk-7mxt5b0h.js → chunk-0z33en1a.js} +1 -1
  10. package/bundle/chunk-10accb7b.js +2 -0
  11. package/bundle/chunk-13kpdfr7.js +2 -0
  12. package/bundle/chunk-15s8zwgf.js +2 -0
  13. package/bundle/chunk-17pxm5d3.js +14 -0
  14. package/bundle/{chunk-nj4d554m.js → chunk-1bx2sjn6.js} +1 -1
  15. package/bundle/chunk-1kgyfja6.js +2 -0
  16. package/bundle/{chunk-bv29k2pf.js → chunk-1mcsf4yb.js} +2 -2
  17. package/bundle/{chunk-kwx9ewe0.js → chunk-1wpjmwnh.js} +1 -1
  18. package/bundle/{chunk-snr44en9.js → chunk-25bp7pcm.js} +2 -2
  19. package/bundle/{chunk-kmcsz8yv.js → chunk-2dkrfc1s.js} +1 -1
  20. package/bundle/chunk-2pzvcpv4.js +3 -0
  21. package/bundle/chunk-3bkdbqjj.js +2 -0
  22. package/bundle/{chunk-08m0hkdz.js → chunk-3dr4469n.js} +1 -1
  23. package/bundle/{chunk-n96tvjgj.js → chunk-3mepk08v.js} +2 -2
  24. package/bundle/chunk-3sz6gw10.js +3 -0
  25. package/bundle/{chunk-xqdrr7xg.js → chunk-45mjcxqk.js} +1 -1
  26. package/bundle/chunk-46ztrjw0.js +7 -0
  27. package/bundle/chunk-4dtkj9zg.js +2 -0
  28. package/bundle/chunk-4e9p3e0a.js +2 -0
  29. package/bundle/{chunk-qrtc3etn.js → chunk-4fa390yr.js} +2 -2
  30. package/bundle/chunk-4gs87ghj.js +3 -0
  31. package/bundle/{chunk-3k2b05fv.js → chunk-4sazy0nq.js} +1 -1
  32. package/bundle/chunk-4tbqsrsn.js +2 -0
  33. package/bundle/{chunk-ngccf7ga.js → chunk-52b1v7mn.js} +1 -1
  34. package/bundle/chunk-53kns5wy.js +2 -0
  35. package/bundle/{chunk-11v7vz3y.js → chunk-549ptbaj.js} +1 -1
  36. package/bundle/chunk-559ek1ym.js +2 -0
  37. package/bundle/chunk-55wxgsga.js +2 -0
  38. package/bundle/{chunk-34p46th6.js → chunk-5bate758.js} +1 -1
  39. package/bundle/chunk-5ke0yqqz.js +8 -0
  40. package/bundle/{chunk-kdcnder5.js → chunk-5kmfnkzv.js} +1 -1
  41. package/bundle/chunk-5myxjxae.js +3 -0
  42. package/bundle/chunk-5q1fz2az.js +2 -0
  43. package/bundle/{chunk-txbwmwxj.js → chunk-5sgpjgss.js} +1 -1
  44. package/bundle/{chunk-rsszcqxd.js → chunk-60qyqqxx.js} +1 -1
  45. package/bundle/{chunk-94pcpztx.js → chunk-64s7vfj7.js} +2 -2
  46. package/bundle/{chunk-6ged58yw.js → chunk-6r8pg6ma.js} +2 -2
  47. package/bundle/{chunk-8762ty72.js → chunk-70pb4kcm.js} +2 -2
  48. package/bundle/{chunk-04hvaaje.js → chunk-72zxassf.js} +1 -1
  49. package/bundle/{chunk-yz6898wy.js → chunk-73ckx171.js} +1 -1
  50. package/bundle/{chunk-gj0wt0cy.js → chunk-7fawtcnn.js} +1 -1
  51. package/bundle/{chunk-zfn0z4sh.js → chunk-7gbytqkn.js} +2 -2
  52. package/bundle/{chunk-x66ycpfs.js → chunk-7jhrxzjx.js} +2 -2
  53. package/bundle/{chunk-09pkckr1.js → chunk-7vftsy04.js} +1 -1
  54. package/bundle/chunk-871f8x99.js +4 -0
  55. package/bundle/chunk-88emsbaz.js +2 -0
  56. package/bundle/{chunk-zfd70p01.js → chunk-8dxdeksr.js} +1 -1
  57. package/bundle/{chunk-6styp5dn.js → chunk-8fgamz4y.js} +1 -1
  58. package/bundle/{chunk-9qdr9t8c.js → chunk-8q6z6emx.js} +1 -1
  59. package/bundle/{chunk-4ttf9rjd.js → chunk-8r3410c2.js} +1 -1
  60. package/bundle/{chunk-3mzcr3fw.js → chunk-8tp4whyw.js} +1 -1
  61. package/bundle/chunk-8yn64y27.js +2 -0
  62. package/bundle/{chunk-41v0x1jk.js → chunk-8yr682pv.js} +2 -2
  63. package/bundle/chunk-8ywa7az5.js +2 -0
  64. package/bundle/chunk-8ywdddts.js +2 -0
  65. package/bundle/{chunk-exmw8jfa.js → chunk-909fp6pm.js} +2 -2
  66. package/bundle/chunk-92zjark4.js +2 -0
  67. package/bundle/chunk-98effz12.js +2 -0
  68. package/bundle/{chunk-kjyw00jp.js → chunk-9cw4cnz0.js} +1 -1
  69. package/bundle/{chunk-2swch6mx.js → chunk-9dh9bc9d.js} +1 -1
  70. package/bundle/{chunk-y437vyza.js → chunk-9fkmhmh6.js} +1 -1
  71. package/bundle/{chunk-7vd91wsd.js → chunk-9nk0ts0s.js} +1 -1
  72. package/bundle/{chunk-p9cnzxb8.js → chunk-9s4whpg1.js} +2 -2
  73. package/bundle/{chunk-yajd975f.js → chunk-9xvctnjr.js} +1 -1
  74. package/bundle/{chunk-4wxxyrxn.js → chunk-9zre5e54.js} +1 -1
  75. package/bundle/chunk-a6z0fhta.js +2 -0
  76. package/bundle/{chunk-yt3f3j35.js → chunk-a9y27zd2.js} +1 -1
  77. package/bundle/{chunk-mex0fe9s.js → chunk-acyj91wq.js} +1 -1
  78. package/bundle/chunk-aj3y2e86.js +3 -0
  79. package/bundle/chunk-akpssv2d.js +2 -0
  80. package/bundle/chunk-aq28ejhv.js +2 -0
  81. package/bundle/{chunk-pkc4ddw1.js → chunk-atpzz901.js} +1 -1
  82. package/bundle/chunk-aw8af3ky.js +2 -0
  83. package/bundle/chunk-ax1y4699.js +2 -0
  84. package/bundle/{chunk-dctj3c22.js → chunk-b0jh0rby.js} +2 -2
  85. package/bundle/chunk-b10px5g4.js +2 -0
  86. package/bundle/chunk-bha3sbsj.js +2 -0
  87. package/bundle/{chunk-67d5d8mr.js → chunk-bnz0mxak.js} +1 -1
  88. package/bundle/chunk-bs020a3x.js +2 -0
  89. package/bundle/chunk-bs61sezq.js +2 -0
  90. package/bundle/{chunk-7eexey82.js → chunk-c72jajx9.js} +1 -1
  91. package/bundle/{chunk-81trveht.js → chunk-cagk1sjd.js} +1 -1
  92. package/bundle/{chunk-1byd3wma.js → chunk-cdh26622.js} +2 -2
  93. package/bundle/{chunk-t2vm08v6.js → chunk-ceefd2nj.js} +1 -1
  94. package/bundle/chunk-cmdjkx32.js +2 -0
  95. package/bundle/{chunk-zh3fny3z.js → chunk-cx7p4ezk.js} +2 -2
  96. package/bundle/chunk-cxtxvt43.js +2 -0
  97. package/bundle/{chunk-pxmhe36r.js → chunk-d1rn44wz.js} +1 -1
  98. package/bundle/{chunk-0c6ep9mc.js → chunk-d93z6hrn.js} +1 -1
  99. package/bundle/{chunk-zddknkw7.js → chunk-d9x9kqvy.js} +1 -1
  100. package/bundle/chunk-de2rfsaf.js +2 -0
  101. package/bundle/{chunk-seghf5fc.js → chunk-dgx4rq86.js} +1 -1
  102. package/bundle/{chunk-qzj6027k.js → chunk-dh1h513y.js} +1 -1
  103. package/bundle/chunk-dncnyzaa.js +2 -0
  104. package/bundle/chunk-dp6zktka.js +2 -0
  105. package/bundle/{chunk-ba3h1pzs.js → chunk-dshnn54c.js} +1 -1
  106. package/bundle/{chunk-73myw3bj.js → chunk-dt899wbf.js} +2 -2
  107. package/bundle/chunk-dvqdtdza.js +2 -0
  108. package/bundle/{chunk-6ynxf3q7.js → chunk-dvxk6mr6.js} +2 -2
  109. package/bundle/{chunk-bnss5dkk.js → chunk-dykqn0nj.js} +2 -2
  110. package/bundle/{chunk-hv6eccx1.js → chunk-dz3s882k.js} +220 -220
  111. package/bundle/{chunk-y9zstzed.js → chunk-eaqfnwdj.js} +1 -1
  112. package/bundle/{chunk-54wh8b12.js → chunk-eb8nsk7e.js} +2 -2
  113. package/bundle/chunk-ebabnv33.js +3 -0
  114. package/bundle/chunk-ebdpg3cn.js +2 -0
  115. package/bundle/{chunk-kfmz2p27.js → chunk-ev3a2sxv.js} +2 -2
  116. package/bundle/{chunk-d00c1k9w.js → chunk-ewpzqnj4.js} +1 -1
  117. package/bundle/chunk-eyc6tb5h.js +2 -0
  118. package/bundle/chunk-eze57bty.js +2 -0
  119. package/bundle/{chunk-qddt2gcs.js → chunk-ezrskm25.js} +1 -1
  120. package/bundle/chunk-fa47vzfc.js +2 -0
  121. package/bundle/chunk-fe397ph0.js +2 -0
  122. package/bundle/{chunk-bzgj60w4.js → chunk-fn8191ps.js} +2 -2
  123. package/bundle/chunk-fr75ytdr.js +2 -0
  124. package/bundle/chunk-fw2tnbt6.js +2 -0
  125. package/bundle/chunk-fwr2qgqb.js +2 -0
  126. package/bundle/chunk-fyz7fngd.js +2 -0
  127. package/bundle/chunk-g204pt98.js +2 -0
  128. package/bundle/{chunk-ggydr1ze.js → chunk-g794ey6w.js} +1 -1
  129. package/bundle/chunk-g8cfzzrs.js +2 -0
  130. package/bundle/chunk-gcgmwqhh.js +2 -0
  131. package/bundle/{chunk-rmve21dh.js → chunk-gg7bg3ek.js} +1 -1
  132. package/bundle/{chunk-9x25d115.js → chunk-gkj4a27z.js} +1 -1
  133. package/bundle/{chunk-sjw56r2n.js → chunk-gnt982jr.js} +3 -3
  134. package/bundle/chunk-grdfpd57.js +2 -0
  135. package/bundle/chunk-gt6tgm42.js +5 -0
  136. package/bundle/chunk-gw36mrg4.js +2 -0
  137. package/bundle/{chunk-z8gdmvgg.js → chunk-gwfx7tx7.js} +2 -2
  138. package/bundle/{chunk-q8hd01j7.js → chunk-gxmxx8jb.js} +1 -1
  139. package/bundle/{chunk-tge53d52.js → chunk-h1kg35mn.js} +1 -1
  140. package/bundle/chunk-h36qec67.js +2 -0
  141. package/bundle/{chunk-0msqaywp.js → chunk-h7w35n7w.js} +1 -1
  142. package/bundle/chunk-h9gtymfm.js +2 -0
  143. package/bundle/chunk-h9qn35pn.js +2 -0
  144. package/bundle/{chunk-mr8j7rc6.js → chunk-hb9mc5f9.js} +1 -1
  145. package/bundle/{chunk-df2aswz3.js → chunk-hcy77w6t.js} +1 -1
  146. package/bundle/chunk-hd8q4msp.js +2 -0
  147. package/bundle/{chunk-6a7c7wnf.js → chunk-hgsykghj.js} +2 -2
  148. package/bundle/chunk-hhjkezfz.js +2 -0
  149. package/bundle/chunk-hnz570f9.js +3 -0
  150. package/bundle/chunk-j5kyf7vt.js +5 -0
  151. package/bundle/{chunk-1yt5rsew.js → chunk-j63fkt6n.js} +1 -1
  152. package/bundle/{chunk-03xppy47.js → chunk-jcjaw7tk.js} +2 -2
  153. package/bundle/{chunk-jkh6eg7d.js → chunk-jf6ry79j.js} +4 -4
  154. package/bundle/chunk-jfz8wwk9.js +2 -0
  155. package/bundle/{chunk-ke7n9t5p.js → chunk-jgz1a29w.js} +3 -3
  156. package/bundle/{chunk-ebcdxmdd.js → chunk-jngchw38.js} +1 -1
  157. package/bundle/{chunk-j5ymkhry.js → chunk-jqn27885.js} +1 -1
  158. package/bundle/chunk-js6hqmq7.js +2 -0
  159. package/bundle/{chunk-hj3ddt53.js → chunk-jts0dma5.js} +2 -2
  160. package/bundle/chunk-k70x182t.js +2 -0
  161. package/bundle/chunk-k7n1csxv.js +3 -0
  162. package/bundle/{chunk-er38zew1.js → chunk-kb6v5hhm.js} +2 -2
  163. package/bundle/chunk-kmtfdky8.js +4 -0
  164. package/bundle/chunk-kp8nkm3m.js +2 -0
  165. package/bundle/{chunk-7hm0c2yg.js → chunk-kqhh2pm9.js} +1 -1
  166. package/bundle/{chunk-0h8wdch6.js → chunk-kt0ej3nq.js} +1 -1
  167. package/bundle/chunk-kwzawx7r.js +2 -0
  168. package/bundle/{chunk-n6msxne8.js → chunk-kx2dp8ch.js} +1 -1
  169. package/bundle/chunk-m0mek3es.js +2 -0
  170. package/bundle/{chunk-tbgczapt.js → chunk-m0xsvzyd.js} +2 -2
  171. package/bundle/chunk-m31d2n6h.js +2 -0
  172. package/bundle/{chunk-9ayxg9mq.js → chunk-m6zxr0j8.js} +2 -2
  173. package/bundle/{chunk-egn55fa2.js → chunk-mcc5ynma.js} +3 -3
  174. package/bundle/{chunk-md8161zd.js → chunk-mdzzcrf9.js} +2 -2
  175. package/bundle/{chunk-ynwkr3yh.js → chunk-mvnxwwe7.js} +2 -2
  176. package/bundle/{chunk-b4knxpqh.js → chunk-mw2hr4pd.js} +1 -1
  177. package/bundle/{chunk-vszbqv24.js → chunk-mzbr0m2v.js} +1 -1
  178. package/bundle/{chunk-bj00xk8k.js → chunk-n0trgp1c.js} +2 -2
  179. package/bundle/chunk-n14qktbg.js +2 -0
  180. package/bundle/{chunk-yjk6zv2z.js → chunk-n2ygpy76.js} +1 -1
  181. package/bundle/{chunk-yprmd5b7.js → chunk-n38h109k.js} +2 -2
  182. package/bundle/{chunk-8vg4fmg2.js → chunk-n7d9eemn.js} +180 -178
  183. package/bundle/{chunk-06k6egt2.js → chunk-neqy8j4n.js} +1 -1
  184. package/bundle/chunk-nhwhkx62.js +4 -0
  185. package/bundle/{chunk-nj61v4n7.js → chunk-njkserae.js} +1 -1
  186. package/bundle/{chunk-n6gtdx5h.js → chunk-nq495be3.js} +1 -1
  187. package/bundle/{chunk-p3qkexpk.js → chunk-nsjp44fp.js} +1 -1
  188. package/bundle/chunk-nzzsj54n.js +2 -0
  189. package/bundle/chunk-p19qfw59.js +2 -0
  190. package/bundle/chunk-p2yxj9s4.js +2 -0
  191. package/bundle/{chunk-1dtzxt2w.js → chunk-p3rp99na.js} +1 -1
  192. package/bundle/{chunk-79agp7v3.js → chunk-p8kpqyxb.js} +2 -2
  193. package/bundle/{chunk-9fxkh84w.js → chunk-p9zrk16q.js} +1 -1
  194. package/bundle/chunk-pnpre7ys.js +3 -0
  195. package/bundle/{chunk-ee23d2nz.js → chunk-pnq1h5az.js} +2 -2
  196. package/bundle/{chunk-wfd5h6ax.js → chunk-pqnbdygz.js} +2 -2
  197. package/bundle/chunk-pr1ysgr3.js +2 -0
  198. package/bundle/chunk-ps9p14y6.js +2 -0
  199. package/bundle/chunk-px8vtbmr.js +3 -0
  200. package/bundle/{chunk-zfcp509b.js → chunk-pxx2hz0g.js} +2 -2
  201. package/bundle/{chunk-rq4w0by4.js → chunk-q81m4m9z.js} +1 -1
  202. package/bundle/chunk-qagc6v17.js +2 -0
  203. package/bundle/{chunk-mq6jn47r.js → chunk-qb35hqm4.js} +1 -1
  204. package/bundle/chunk-qc0zhbhm.js +2 -0
  205. package/bundle/{chunk-keveg5gx.js → chunk-qdcf1ay5.js} +2 -2
  206. package/bundle/{chunk-t3eymzg1.js → chunk-qpzspr9z.js} +2 -2
  207. package/bundle/chunk-qq2rcxv2.js +9 -0
  208. package/bundle/{chunk-axdzm75h.js → chunk-qqne79vp.js} +2 -2
  209. package/bundle/{chunk-g4gjz7sq.js → chunk-qs4wef8c.js} +1 -1
  210. package/bundle/{chunk-nmehsm3w.js → chunk-qy1a2tpc.js} +1 -1
  211. package/bundle/chunk-qyjt0qnq.js +3 -0
  212. package/bundle/{chunk-6a77w77q.js → chunk-r0g5yyhf.js} +4 -4
  213. package/bundle/{chunk-by855es0.js → chunk-r58gzg6m.js} +1 -1
  214. package/bundle/{chunk-fmq0m4k5.js → chunk-r6ndvzd0.js} +1 -1
  215. package/bundle/chunk-r78kfhvz.js +2 -0
  216. package/bundle/{chunk-dyv2hqvc.js → chunk-rcyhqkv5.js} +1 -1
  217. package/bundle/{chunk-yp5bypsp.js → chunk-rexdr63q.js} +2 -2
  218. package/bundle/{chunk-1me21qdc.js → chunk-rgxy4ngt.js} +1 -1
  219. package/bundle/chunk-rnd5mnsm.js +2 -0
  220. package/bundle/{chunk-dcndy4sr.js → chunk-rph9zj24.js} +1 -1
  221. package/bundle/{chunk-ryfqwsft.js → chunk-rrd0jf5m.js} +1 -1
  222. package/bundle/{chunk-e74efvj2.js → chunk-rtdym35y.js} +172 -172
  223. package/bundle/chunk-s2xdf6qh.js +14 -0
  224. package/bundle/{chunk-mpygdb5a.js → chunk-s8mghr5a.js} +2 -2
  225. package/bundle/chunk-schtpyjs.js +2 -0
  226. package/bundle/{chunk-08f4khsw.js → chunk-snt1kefv.js} +3 -3
  227. package/bundle/{chunk-a1hzeejj.js → chunk-sp8ek94w.js} +2 -2
  228. package/bundle/{chunk-s8hq6trz.js → chunk-srxx88nb.js} +1 -1
  229. package/bundle/{chunk-gy0wm7e1.js → chunk-std2bgv7.js} +2 -2
  230. package/bundle/chunk-sv1s1qxd.js +619 -0
  231. package/bundle/{chunk-dffhkd30.js → chunk-swcgsrbj.js} +1 -1
  232. package/bundle/chunk-sxwqrvmy.js +28 -0
  233. package/bundle/chunk-sxy4hyyy.js +2 -0
  234. package/bundle/chunk-syc4b8rt.js +2 -0
  235. package/bundle/{chunk-wgk7ynt3.js → chunk-t01bhw5h.js} +3 -3
  236. package/bundle/chunk-tcs6wgna.js +3 -0
  237. package/bundle/{chunk-gmzrvxnv.js → chunk-tdmn21z0.js} +2 -2
  238. package/bundle/{chunk-71zw0qhf.js → chunk-tdxbm1nd.js} +1 -1
  239. package/bundle/{chunk-p825vsjy.js → chunk-te5tfq79.js} +1 -1
  240. package/bundle/chunk-tf4xwqz7.js +2 -0
  241. package/bundle/{chunk-fg35hwa0.js → chunk-tgd5ctnt.js} +2 -2
  242. package/bundle/chunk-twhavv1m.js +2 -0
  243. package/bundle/{chunk-qa2j0qmy.js → chunk-txqc7543.js} +2 -2
  244. package/bundle/chunk-tzg4z74d.js +2 -0
  245. package/bundle/chunk-tzrbb0e8.js +3 -0
  246. package/bundle/chunk-v0yxkq99.js +3 -0
  247. package/bundle/{chunk-a3a1trap.js → chunk-v3x5nrc4.js} +2 -2
  248. package/bundle/chunk-v7q3d3n6.js +3 -0
  249. package/bundle/chunk-v8vcwx23.js +2 -0
  250. package/bundle/chunk-vc4e6xc4.js +10 -0
  251. package/bundle/{chunk-6p7yg5sr.js → chunk-vftqwdpg.js} +1 -1
  252. package/bundle/{chunk-r0k21apr.js → chunk-vgaxv70x.js} +2 -2
  253. package/bundle/{chunk-nkk4fyqf.js → chunk-vgnddhdj.js} +1 -1
  254. package/bundle/{chunk-xd3xc1vv.js → chunk-vm58fkrv.js} +1 -1
  255. package/bundle/{chunk-qg2vk5fw.js → chunk-vsys768k.js} +1 -1
  256. package/bundle/{chunk-5a7fs1hg.js → chunk-vvzbfv2f.js} +1 -1
  257. package/bundle/{chunk-s4qtphwx.js → chunk-w03fdrxe.js} +1 -1
  258. package/bundle/{chunk-z1ay3qd0.js → chunk-w3bmf3zz.js} +1 -1
  259. package/bundle/{chunk-vsr8mnj6.js → chunk-w5940jxm.js} +1 -1
  260. package/bundle/chunk-w6rf2knb.js +2 -0
  261. package/bundle/{chunk-aa8hymcv.js → chunk-w8d9srv7.js} +2 -2
  262. package/bundle/chunk-w9pdvcf9.js +3 -0
  263. package/bundle/{chunk-yk97q51d.js → chunk-wev34grp.js} +2 -2
  264. package/bundle/chunk-wh7r96t3.js +2 -0
  265. package/bundle/{chunk-1pg6pv0m.js → chunk-wm77svwm.js} +1 -1
  266. package/bundle/chunk-wnjqaxze.js +2 -0
  267. package/bundle/{chunk-gckgaqqr.js → chunk-ws3p9cya.js} +2 -2
  268. package/bundle/chunk-x42w8ewc.js +2 -0
  269. package/bundle/{chunk-qkjdr337.js → chunk-x6rr6ss1.js} +1 -1
  270. package/bundle/chunk-xc9se3c8.js +2 -0
  271. package/bundle/{chunk-bbzztav6.js → chunk-xdacgfba.js} +1 -1
  272. package/bundle/{chunk-6p94fpbn.js → chunk-xdjwapwy.js} +2 -2
  273. package/bundle/chunk-xfz698bh.js +2 -0
  274. package/bundle/{chunk-zwnhf4z1.js → chunk-xhbb8b5g.js} +1 -1
  275. package/bundle/chunk-xjhezxft.js +8 -0
  276. package/bundle/chunk-xxj3sgd5.js +2 -0
  277. package/bundle/chunk-xxvqq7kc.js +2 -0
  278. package/bundle/{chunk-cs38g1bx.js → chunk-y0ydzdfc.js} +1 -1
  279. package/bundle/{chunk-wvf5q2hz.js → chunk-y1b2h15z.js} +1 -1
  280. package/bundle/{chunk-1gf116rg.js → chunk-yacccwf6.js} +1 -1
  281. package/bundle/chunk-ydc6ypjt.js +77 -0
  282. package/bundle/chunk-ye0mkqb4.js +2 -0
  283. package/bundle/{chunk-dhqaqeq6.js → chunk-yeq7b87a.js} +1 -1
  284. package/bundle/chunk-yfp9y71y.js +2 -0
  285. package/bundle/{chunk-e6xnynaz.js → chunk-yha554nm.js} +2 -2
  286. package/bundle/{chunk-rv1stdvb.js → chunk-yj6rbe9p.js} +2 -2
  287. package/bundle/chunk-yjjh339w.js +2 -0
  288. package/bundle/{chunk-c5pb87yf.js → chunk-ymtcm4xd.js} +1 -1
  289. package/bundle/chunk-ypk3t1eh.js +3 -0
  290. package/bundle/chunk-yt6vd7a5.js +2 -0
  291. package/bundle/{chunk-ssk8tkwd.js → chunk-yw9pfqxt.js} +1 -1
  292. package/bundle/{chunk-g6cyhxwg.js → chunk-yykjvt7f.js} +2 -2
  293. package/bundle/{chunk-sfes6pp1.js → chunk-yzh4rmrt.js} +1 -1
  294. package/bundle/chunk-yzn08nx1.js +2 -0
  295. package/bundle/chunk-yzq3c3dq.js +2 -0
  296. package/bundle/{chunk-prh3c44x.js → chunk-yzwgvjzd.js} +1 -1
  297. package/bundle/chunk-z0tfsdb9.js +3 -0
  298. package/bundle/chunk-z1j25911.js +2 -0
  299. package/bundle/{chunk-rkwrjphh.js → chunk-z1rshv6g.js} +1 -1
  300. package/bundle/chunk-z210dtw1.js +3 -0
  301. package/bundle/chunk-z29ahthm.js +2 -0
  302. package/bundle/{chunk-w1n4rf6n.js → chunk-z7vv0ngm.js} +2 -2
  303. package/bundle/{chunk-jgjnz82k.js → chunk-zaan8jk6.js} +1 -1
  304. package/bundle/{chunk-6gb65bv1.js → chunk-zbqzm65q.js} +1 -1
  305. package/bundle/{chunk-bk4phk66.js → chunk-zesbm9k1.js} +1 -1
  306. package/bundle/{chunk-c6vfwjg4.js → chunk-zfcfyagt.js} +1 -1
  307. package/bundle/{chunk-ywkvq7zb.js → chunk-zfnbk5gy.js} +1 -1
  308. package/bundle/chunk-zgre4gc2.js +2 -0
  309. package/bundle/{chunk-z7430qxg.js → chunk-zrmx397j.js} +1 -1
  310. package/bundle/chunk-zthkjx33.js +2 -0
  311. package/bundle/chunk-ztnepaqc.js +3 -0
  312. package/bundle/chunk-zwvwbrsc.js +2 -0
  313. package/bundle/chunk-zxddasg8.js +2 -0
  314. package/bundle/index.js +3 -3
  315. package/bundle/parser.worker.js +2 -2
  316. package/bundle/worker.js +1 -1
  317. package/package.json +1 -1
  318. package/bundle/chunk-0442cmw2.js +0 -2
  319. package/bundle/chunk-085pvqr4.js +0 -2
  320. package/bundle/chunk-0x5jn813.js +0 -2
  321. package/bundle/chunk-11g2rpv8.js +0 -3
  322. package/bundle/chunk-28t9akfn.js +0 -2
  323. package/bundle/chunk-2h1fcqvf.js +0 -2
  324. package/bundle/chunk-2kens6wh.js +0 -2
  325. package/bundle/chunk-2scyp9ns.js +0 -2
  326. package/bundle/chunk-2tw58kwb.js +0 -2
  327. package/bundle/chunk-2vxx0tax.js +0 -2
  328. package/bundle/chunk-2ybt3p5z.js +0 -2
  329. package/bundle/chunk-2zpkw3ge.js +0 -2
  330. package/bundle/chunk-31g86yn6.js +0 -2
  331. package/bundle/chunk-397be2x0.js +0 -2
  332. package/bundle/chunk-3c78nkgn.js +0 -2
  333. package/bundle/chunk-3d91q2qd.js +0 -2
  334. package/bundle/chunk-43yv7tz1.js +0 -2
  335. package/bundle/chunk-496ajawz.js +0 -2
  336. package/bundle/chunk-499gp5g5.js +0 -2
  337. package/bundle/chunk-4hzm14xt.js +0 -3
  338. package/bundle/chunk-4xw14sed.js +0 -2
  339. package/bundle/chunk-536naqqv.js +0 -2
  340. package/bundle/chunk-57nvmhjq.js +0 -2
  341. package/bundle/chunk-5e4fxy99.js +0 -616
  342. package/bundle/chunk-5he3d7cy.js +0 -2
  343. package/bundle/chunk-5qr286w8.js +0 -2
  344. package/bundle/chunk-606vpgc4.js +0 -4
  345. package/bundle/chunk-6a1skxcj.js +0 -3
  346. package/bundle/chunk-6cj7cn5x.js +0 -2
  347. package/bundle/chunk-6hybp2mt.js +0 -2
  348. package/bundle/chunk-6y423jax.js +0 -3
  349. package/bundle/chunk-72ghkgcn.js +0 -2
  350. package/bundle/chunk-741teh8k.js +0 -2
  351. package/bundle/chunk-7b3wx6kn.js +0 -2
  352. package/bundle/chunk-891yevv2.js +0 -2
  353. package/bundle/chunk-8c1ypgw5.js +0 -3
  354. package/bundle/chunk-8ktgy41r.js +0 -2
  355. package/bundle/chunk-8q73cjyj.js +0 -2
  356. package/bundle/chunk-8rt63jbm.js +0 -2
  357. package/bundle/chunk-8y623qdx.js +0 -2
  358. package/bundle/chunk-921vn745.js +0 -2
  359. package/bundle/chunk-945ebhte.js +0 -2
  360. package/bundle/chunk-9548cc0c.js +0 -2
  361. package/bundle/chunk-9yrypq1r.js +0 -14
  362. package/bundle/chunk-a0rp7gh4.js +0 -77
  363. package/bundle/chunk-a48t0g95.js +0 -3
  364. package/bundle/chunk-a949at1c.js +0 -3
  365. package/bundle/chunk-akk84fnc.js +0 -2
  366. package/bundle/chunk-aw7j7brm.js +0 -2
  367. package/bundle/chunk-b6cybdj3.js +0 -2
  368. package/bundle/chunk-c5fa8cb1.js +0 -2
  369. package/bundle/chunk-ca4r31we.js +0 -2
  370. package/bundle/chunk-ckbwdrm3.js +0 -2
  371. package/bundle/chunk-cqj21rfj.js +0 -3
  372. package/bundle/chunk-cz3h5n1v.js +0 -3
  373. package/bundle/chunk-dhc6e1t7.js +0 -2
  374. package/bundle/chunk-dk6rbqvp.js +0 -2
  375. package/bundle/chunk-dk975etf.js +0 -3
  376. package/bundle/chunk-dwajajaq.js +0 -2
  377. package/bundle/chunk-dxcrggvq.js +0 -2
  378. package/bundle/chunk-dyt3n3fe.js +0 -2
  379. package/bundle/chunk-e7ah0e61.js +0 -2
  380. package/bundle/chunk-e7v9trve.js +0 -11
  381. package/bundle/chunk-e8ws454m.js +0 -2
  382. package/bundle/chunk-efndtzby.js +0 -2
  383. package/bundle/chunk-eq2pepce.js +0 -2
  384. package/bundle/chunk-eva3nqqb.js +0 -14
  385. package/bundle/chunk-f3bnn9rf.js +0 -8
  386. package/bundle/chunk-f693s9vn.js +0 -2
  387. package/bundle/chunk-ftepqwyq.js +0 -2
  388. package/bundle/chunk-g18ax6yp.js +0 -2
  389. package/bundle/chunk-gadyp6mb.js +0 -2
  390. package/bundle/chunk-ge8315te.js +0 -5
  391. package/bundle/chunk-gk28ffhg.js +0 -2
  392. package/bundle/chunk-gpfc4z4v.js +0 -2
  393. package/bundle/chunk-gqvg02zp.js +0 -2
  394. package/bundle/chunk-gsyt2sv7.js +0 -2
  395. package/bundle/chunk-h3k1dk9m.js +0 -2
  396. package/bundle/chunk-h8c3dcqt.js +0 -2
  397. package/bundle/chunk-hfq11w4h.js +0 -2
  398. package/bundle/chunk-hw5qyht3.js +0 -3
  399. package/bundle/chunk-hwf58w1k.js +0 -2
  400. package/bundle/chunk-jyczz3yh.js +0 -8
  401. package/bundle/chunk-k8k8z6b7.js +0 -3
  402. package/bundle/chunk-kk3ve911.js +0 -2
  403. package/bundle/chunk-kv72hxkp.js +0 -3
  404. package/bundle/chunk-m4j7jyrd.js +0 -3
  405. package/bundle/chunk-mf3sm0pk.js +0 -2
  406. package/bundle/chunk-mkng9ykt.js +0 -2
  407. package/bundle/chunk-mxvypy3s.js +0 -2
  408. package/bundle/chunk-n5ypgxrn.js +0 -28
  409. package/bundle/chunk-n9xw9kqc.js +0 -2
  410. package/bundle/chunk-nc4wbc89.js +0 -2
  411. package/bundle/chunk-ngk67rt3.js +0 -3
  412. package/bundle/chunk-nj2bbtmx.js +0 -2
  413. package/bundle/chunk-nr1g57b2.js +0 -2
  414. package/bundle/chunk-p0ahbpxv.js +0 -2
  415. package/bundle/chunk-p7y8z5rd.js +0 -2
  416. package/bundle/chunk-pt26gerr.js +0 -2
  417. package/bundle/chunk-qkk1as5n.js +0 -2
  418. package/bundle/chunk-qsm9xw87.js +0 -2
  419. package/bundle/chunk-qw980y8h.js +0 -2
  420. package/bundle/chunk-r2w3gr8d.js +0 -2
  421. package/bundle/chunk-r5bqcpkz.js +0 -2
  422. package/bundle/chunk-r67c858b.js +0 -2
  423. package/bundle/chunk-r9fvfkee.js +0 -2
  424. package/bundle/chunk-rcn0dhbj.js +0 -2
  425. package/bundle/chunk-rq47pn3r.js +0 -2
  426. package/bundle/chunk-rvt1tdy8.js +0 -2
  427. package/bundle/chunk-ry7q8xn6.js +0 -2
  428. package/bundle/chunk-s27xvrft.js +0 -2
  429. package/bundle/chunk-s5nde2kd.js +0 -5
  430. package/bundle/chunk-scy39p6q.js +0 -2
  431. package/bundle/chunk-srpe3v8e.js +0 -9
  432. package/bundle/chunk-st5jaszz.js +0 -3
  433. package/bundle/chunk-t5qamf96.js +0 -2
  434. package/bundle/chunk-t9mz17gb.js +0 -3
  435. package/bundle/chunk-tns5x4w0.js +0 -3
  436. package/bundle/chunk-ttevj0pj.js +0 -2
  437. package/bundle/chunk-v7c54cyj.js +0 -2
  438. package/bundle/chunk-vgefaens.js +0 -2
  439. package/bundle/chunk-vv59b4re.js +0 -2
  440. package/bundle/chunk-vwqy7n3g.js +0 -2
  441. package/bundle/chunk-vysa9hp4.js +0 -7
  442. package/bundle/chunk-wn076jwj.js +0 -2
  443. package/bundle/chunk-x0m1qye9.js +0 -2
  444. package/bundle/chunk-xvntsbb1.js +0 -3
  445. package/bundle/chunk-y70aachh.js +0 -2
  446. package/bundle/chunk-yqk58hf6.js +0 -3
  447. package/bundle/chunk-ysgxt83y.js +0 -2
  448. package/bundle/chunk-ze9e6nt3.js +0 -3
  449. package/bundle/chunk-znzan00b.js +0 -3
  450. package/bundle/chunk-zrp55k47.js +0 -2
  451. package/bundle/chunk-zwdnh860.js +0 -2
@@ -0,0 +1,2 @@
1
+ // @bun
2
+ import{Vf as a,Wf as b,Xf as c,Yf as d,Zf as e}from"./chunk-s2xdf6qh.js";import"./chunk-m0xsvzyd.js";import"./chunk-ws3p9cya.js";import"./chunk-qq2rcxv2.js";import"./chunk-ebabnv33.js";import"./chunk-nfg7nt13.js";import"./chunk-yj6rbe9p.js";import"./chunk-m6zxr0j8.js";import"./chunk-sv1s1qxd.js";import"./chunk-n7d9eemn.js";import"./chunk-pxx2hz0g.js";import"./chunk-rexdr63q.js";import"./chunk-kqhh2pm9.js";import"./chunk-7fawtcnn.js";import"./chunk-mdzzcrf9.js";import"./chunk-wev34grp.js";import"./chunk-rtdym35y.js";import"./chunk-5myxjxae.js";import"./chunk-sp8ek94w.js";import"./chunk-gnt982jr.js";import"./chunk-1bx2sjn6.js";import"./chunk-17pxm5d3.js";import"./chunk-n38h109k.js";import"./chunk-25bp7pcm.js";import"./chunk-qdcf1ay5.js";import"./chunk-45mjcxqk.js";import"./chunk-qqne79vp.js";import"./chunk-64s7vfj7.js";import"./chunk-xjhezxft.js";import"./chunk-gwfx7tx7.js";import"./chunk-1wpjmwnh.js";import"./chunk-cqtkxwd8.js";import"./chunk-ymtcm4xd.js";import"./chunk-yykjvt7f.js";import"./chunk-3mepk08v.js";import"./chunk-atpzz901.js";import"./chunk-0g25z230.js";import"./chunk-w9pdvcf9.js";import"./chunk-4gs87ghj.js";import"./chunk-kb6v5hhm.js";import"./chunk-qyjt0qnq.js";import"./chunk-xdjwapwy.js";import"./chunk-cxtxvt43.js";import"./chunk-871f8x99.js";import"./chunk-cx7p4ezk.js";import"./chunk-tgd5ctnt.js";import"./chunk-p8kpqyxb.js";import"./chunk-3sz6gw10.js";import"./chunk-twhavv1m.js";import"./chunk-v0yxkq99.js";import"./chunk-2pzvcpv4.js";import"./chunk-kmtfdky8.js";import"./chunk-vc4e6xc4.js";import"./chunk-hnz570f9.js";import"./chunk-tdmn21z0.js";import"./chunk-s8mghr5a.js";import"./chunk-pqnbdygz.js";import"./chunk-ydc6ypjt.js";import"./chunk-ev3a2sxv.js";import"./chunk-pnq1h5az.js";import"./chunk-4sazy0nq.js";export{c as url,b as openapi,d as listen,e as Server,a as Default};
@@ -0,0 +1,2 @@
1
+ // @bun
2
+ import"./chunk-4sazy0nq.js";var L="./opentui-c5en9p2g.dll";export{L as default};
@@ -1,2 +1,2 @@
1
1
  // @bun
2
- import{ZP as T}from"./chunk-ee23d2nz.js";import{$P as G,cQ as J}from"./chunk-3k2b05fv.js";var K=G((Q)=>{Object.defineProperty(Q,"__esModule",{value:!0});Q.AbstractAsyncHooksContextManager=void 0;var b=J("events"),f=["addListener","on","once","prependListener","prependOnceListener"];class P{bind(q,j){if(j instanceof b.EventEmitter)return this._bindEventEmitter(q,j);if(typeof j==="function")return this._bindFunction(q,j);return j}_bindFunction(q,j){let z=this,w=function(...B){return z.with(q,()=>j.apply(this,B))};return Object.defineProperty(w,"length",{enumerable:!1,configurable:!0,writable:!1,value:j.length}),w}_bindEventEmitter(q,j){if(this._getPatchMap(j)!==void 0)return j;if(this._createPatchMap(j),f.forEach((w)=>{if(j[w]===void 0)return;j[w]=this._patchAddListener(j,j[w],q)}),typeof j.removeListener==="function")j.removeListener=this._patchRemoveListener(j,j.removeListener);if(typeof j.off==="function")j.off=this._patchRemoveListener(j,j.off);if(typeof j.removeAllListeners==="function")j.removeAllListeners=this._patchRemoveAllListeners(j,j.removeAllListeners);return j}_patchRemoveListener(q,j){let z=this;return function(w,B){let D=z._getPatchMap(q)?.[w];if(D===void 0)return j.call(this,w,B);let E=D.get(B);return j.call(this,w,E||B)}}_patchRemoveAllListeners(q,j){let z=this;return function(w){let B=z._getPatchMap(q);if(B!==void 0){if(arguments.length===0)z._createPatchMap(q);else if(B[w]!==void 0)delete B[w]}return j.apply(this,arguments)}}_patchAddListener(q,j,z){let w=this;return function(B,D){if(w._wrapped)return j.call(this,B,D);let E=w._getPatchMap(q);if(E===void 0)E=w._createPatchMap(q);let F=E[B];if(F===void 0)F=new WeakMap,E[B]=F;let O=w.bind(z,D);F.set(D,O),w._wrapped=!0;try{return j.call(this,B,O)}finally{w._wrapped=!1}}}_createPatchMap(q){let j=Object.create(null);return q[this._kOtListeners]=j,j}_getPatchMap(q){return q[this._kOtListeners]}_kOtListeners=Symbol("OtListeners");_wrapped=!1}Q.AbstractAsyncHooksContextManager=P});var Y=G((V)=>{Object.defineProperty(V,"__esModule",{value:!0});V.AsyncHooksContextManager=void 0;var u=T(),L=J("async_hooks"),N=K();class U extends N.AbstractAsyncHooksContextManager{_asyncHook;_contexts=new Map;_stack=[];constructor(){super();this._asyncHook=L.createHook({init:this._init.bind(this),before:this._before.bind(this),after:this._after.bind(this),destroy:this._destroy.bind(this),promiseResolve:this._destroy.bind(this)})}active(){return this._stack[this._stack.length-1]??u.ROOT_CONTEXT}with(q,j,z,...w){this._enterContext(q);try{return j.call(z,...w)}finally{this._exitContext()}}enable(){return this._asyncHook.enable(),this}disable(){return this._asyncHook.disable(),this._contexts.clear(),this._stack=[],this}_init(q,j){if(j==="TIMERWRAP")return;let z=this._stack[this._stack.length-1];if(z!==void 0)this._contexts.set(q,z)}_destroy(q){this._contexts.delete(q)}_before(q){let j=this._contexts.get(q);if(j!==void 0)this._enterContext(j)}_after(){this._exitContext()}_enterContext(q){this._stack.push(q)}_exitContext(){this._stack.pop()}}V.AsyncHooksContextManager=U});var S=G(($)=>{Object.defineProperty($,"__esModule",{value:!0});$.AsyncLocalStorageContextManager=void 0;var H=T(),k=J("async_hooks"),_=K();class Z extends _.AbstractAsyncHooksContextManager{_asyncLocalStorage;constructor(){super();this._asyncLocalStorage=new k.AsyncLocalStorage}active(){return this._asyncLocalStorage.getStore()??H.ROOT_CONTEXT}with(q,j,z,...w){let B=z==null?j:j.bind(z);return this._asyncLocalStorage.run(q,B,...w)}enable(){return this}disable(){return this._asyncLocalStorage.disable(),this}}$.AsyncLocalStorageContextManager=Z});var h=G((I)=>{Object.defineProperty(I,"__esModule",{value:!0});I.AsyncLocalStorageContextManager=I.AsyncHooksContextManager=void 0;var C=Y();Object.defineProperty(I,"AsyncHooksContextManager",{enumerable:!0,get:function(){return C.AsyncHooksContextManager}});var y=S();Object.defineProperty(I,"AsyncLocalStorageContextManager",{enumerable:!0,get:function(){return y.AsyncLocalStorageContextManager}})});export default h();
2
+ import{fQ as T}from"./chunk-pnq1h5az.js";import{hQ as G,kQ as J}from"./chunk-4sazy0nq.js";var K=G((Q)=>{Object.defineProperty(Q,"__esModule",{value:!0});Q.AbstractAsyncHooksContextManager=void 0;var b=J("events"),f=["addListener","on","once","prependListener","prependOnceListener"];class P{bind(q,j){if(j instanceof b.EventEmitter)return this._bindEventEmitter(q,j);if(typeof j==="function")return this._bindFunction(q,j);return j}_bindFunction(q,j){let z=this,w=function(...B){return z.with(q,()=>j.apply(this,B))};return Object.defineProperty(w,"length",{enumerable:!1,configurable:!0,writable:!1,value:j.length}),w}_bindEventEmitter(q,j){if(this._getPatchMap(j)!==void 0)return j;if(this._createPatchMap(j),f.forEach((w)=>{if(j[w]===void 0)return;j[w]=this._patchAddListener(j,j[w],q)}),typeof j.removeListener==="function")j.removeListener=this._patchRemoveListener(j,j.removeListener);if(typeof j.off==="function")j.off=this._patchRemoveListener(j,j.off);if(typeof j.removeAllListeners==="function")j.removeAllListeners=this._patchRemoveAllListeners(j,j.removeAllListeners);return j}_patchRemoveListener(q,j){let z=this;return function(w,B){let D=z._getPatchMap(q)?.[w];if(D===void 0)return j.call(this,w,B);let E=D.get(B);return j.call(this,w,E||B)}}_patchRemoveAllListeners(q,j){let z=this;return function(w){let B=z._getPatchMap(q);if(B!==void 0){if(arguments.length===0)z._createPatchMap(q);else if(B[w]!==void 0)delete B[w]}return j.apply(this,arguments)}}_patchAddListener(q,j,z){let w=this;return function(B,D){if(w._wrapped)return j.call(this,B,D);let E=w._getPatchMap(q);if(E===void 0)E=w._createPatchMap(q);let F=E[B];if(F===void 0)F=new WeakMap,E[B]=F;let O=w.bind(z,D);F.set(D,O),w._wrapped=!0;try{return j.call(this,B,O)}finally{w._wrapped=!1}}}_createPatchMap(q){let j=Object.create(null);return q[this._kOtListeners]=j,j}_getPatchMap(q){return q[this._kOtListeners]}_kOtListeners=Symbol("OtListeners");_wrapped=!1}Q.AbstractAsyncHooksContextManager=P});var Y=G((V)=>{Object.defineProperty(V,"__esModule",{value:!0});V.AsyncHooksContextManager=void 0;var u=T(),L=J("async_hooks"),N=K();class U extends N.AbstractAsyncHooksContextManager{_asyncHook;_contexts=new Map;_stack=[];constructor(){super();this._asyncHook=L.createHook({init:this._init.bind(this),before:this._before.bind(this),after:this._after.bind(this),destroy:this._destroy.bind(this),promiseResolve:this._destroy.bind(this)})}active(){return this._stack[this._stack.length-1]??u.ROOT_CONTEXT}with(q,j,z,...w){this._enterContext(q);try{return j.call(z,...w)}finally{this._exitContext()}}enable(){return this._asyncHook.enable(),this}disable(){return this._asyncHook.disable(),this._contexts.clear(),this._stack=[],this}_init(q,j){if(j==="TIMERWRAP")return;let z=this._stack[this._stack.length-1];if(z!==void 0)this._contexts.set(q,z)}_destroy(q){this._contexts.delete(q)}_before(q){let j=this._contexts.get(q);if(j!==void 0)this._enterContext(j)}_after(){this._exitContext()}_enterContext(q){this._stack.push(q)}_exitContext(){this._stack.pop()}}V.AsyncHooksContextManager=U});var S=G(($)=>{Object.defineProperty($,"__esModule",{value:!0});$.AsyncLocalStorageContextManager=void 0;var H=T(),k=J("async_hooks"),_=K();class Z extends _.AbstractAsyncHooksContextManager{_asyncLocalStorage;constructor(){super();this._asyncLocalStorage=new k.AsyncLocalStorage}active(){return this._asyncLocalStorage.getStore()??H.ROOT_CONTEXT}with(q,j,z,...w){let B=z==null?j:j.bind(z);return this._asyncLocalStorage.run(q,B,...w)}enable(){return this}disable(){return this._asyncLocalStorage.disable(),this}}$.AsyncLocalStorageContextManager=Z});var h=G((I)=>{Object.defineProperty(I,"__esModule",{value:!0});I.AsyncLocalStorageContextManager=I.AsyncHooksContextManager=void 0;var C=Y();Object.defineProperty(I,"AsyncHooksContextManager",{enumerable:!0,get:function(){return C.AsyncHooksContextManager}});var y=S();Object.defineProperty(I,"AsyncLocalStorageContextManager",{enumerable:!0,get:function(){return y.AsyncLocalStorageContextManager}})});export default h();
@@ -0,0 +1,3 @@
1
+ // @bun
2
+ import{qq as z}from"./chunk-xjhezxft.js";class B extends Error{cause;constructor(q,x){super(q);this.name="QreditChargeError",this.cause=x}}async function E(q){return z(q)}function F(q){if(q===void 0)return"\u2014";if(q===0)return"0";let x=q<0?"-":"",j=Math.abs(q);if(j<0.001)return x+j.toFixed(6);if(j<0.01)return x+j.toFixed(4);if(j<0.1)return x+j.toFixed(3);if(j<1)return x+j.toFixed(2);return x+(Number.isInteger(j)?String(j):j.toFixed(2))}
3
+ export{B as F,E as G,F as H};
@@ -0,0 +1,2 @@
1
+ // @bun
2
+ import{$d as b,_d as a,ae as c,be as d,ce as e,de as f,ee as g,fe as h,ge as i,he as j,ie as k}from"./chunk-dykqn0nj.js";import"./chunk-8yr682pv.js";import"./chunk-v3x5nrc4.js";import"./chunk-4sazy0nq.js";export{c as providerConfigFromInit,d as httpRequest,j as getInstanceMetadataEndpoint,k as fromInstanceMetadata,h as fromContainerMetadata,i as Endpoint,f as ENV_CMDS_RELATIVE_URI,e as ENV_CMDS_FULL_URI,g as ENV_CMDS_AUTH_TOKEN,a as DEFAULT_TIMEOUT,b as DEFAULT_MAX_RETRIES};
@@ -1,2 +1,2 @@
1
1
  // @bun
2
- import{te as _w}from"./chunk-6a7c7wnf.js";import{ue as Mw,xe as Aw}from"./chunk-hj3ddt53.js";import{ye as Ww}from"./chunk-r0k21apr.js";import{Ae as hw,Be as fw,ze as Iw}from"./chunk-wgk7ynt3.js";import{Ce as Pw}from"./chunk-41v0x1jk.js";import{uf as kw,vf as Uw,wf as Jw,xf as Hw,yf as bw}from"./chunk-a3a1trap.js";import{$P as $w}from"./chunk-3k2b05fv.js";var zj=$w((Dw)=>{var jj=Mw(),m={CrtSignerV4:null},wj="X-Amz-S3session-Token",Mj=wj.toLowerCase();class xj extends jj.SignatureV4{async signWithCredentials(j,w,x){let E=Dj(w);j.headers[Mj]=w.sessionToken;let B=this;return yj(B,E),B.signRequest(j,x??{})}async presignWithCredentials(j,w,x){let E=Dj(w);return delete j.headers[Mj],j.headers[wj]=w.sessionToken,j.query=j.query??{},j.query[wj]=w.sessionToken,yj(this,E),this.presign(j,x)}}function Dj(j){return{accessKeyId:j.accessKeyId,secretAccessKey:j.secretAccessKey,expiration:j.expiration}}function yj(j,w){let x=j.credentialProvider;j.credentialProvider=()=>{return j.credentialProvider=x,Promise.resolve(w)}}class Lj{sigv4aSigner;sigv4Signer;signerOptions;static sigv4aDependency(){if(typeof m.CrtSignerV4==="function")return"crt";else if(typeof jj.signatureV4aContainer.SignatureV4a==="function")return"js";return"none"}constructor(j){this.sigv4Signer=new xj(j),this.signerOptions=j}async sign(j,w={}){if(w.signingRegion==="*")return this.getSigv4aSigner().sign(j,w);return this.sigv4Signer.sign(j,w)}async signWithCredentials(j,w,x={}){if(x.signingRegion==="*"){let E=this.getSigv4aSigner(),B=m.CrtSignerV4;if(B&&E instanceof B)return E.signWithCredentials(j,w,x);else throw Error(`signWithCredentials with signingRegion '*' is only supported when using the CRT dependency @aws-sdk/signature-v4-crt. Please check whether you have installed the "@aws-sdk/signature-v4-crt" package explicitly. You must also register the package by calling [require("@aws-sdk/signature-v4-crt");] or an ESM equivalent such as [import "@aws-sdk/signature-v4-crt";]. For more information please go to https://github.com/aws/aws-sdk-js-v3#functionality-requiring-aws-common-runtime-crt`)}return this.sigv4Signer.signWithCredentials(j,w,x)}async presign(j,w={}){if(w.signingRegion==="*"){let x=this.getSigv4aSigner(),E=m.CrtSignerV4;if(E&&x instanceof E)return x.presign(j,w);else throw Error(`presign with signingRegion '*' is only supported when using the CRT dependency @aws-sdk/signature-v4-crt. Please check whether you have installed the "@aws-sdk/signature-v4-crt" package explicitly. You must also register the package by calling [require("@aws-sdk/signature-v4-crt");] or an ESM equivalent such as [import "@aws-sdk/signature-v4-crt";]. For more information please go to https://github.com/aws/aws-sdk-js-v3#functionality-requiring-aws-common-runtime-crt`)}return this.sigv4Signer.presign(j,w)}async presignWithCredentials(j,w,x={}){if(x.signingRegion==="*")throw Error("Method presignWithCredentials is not supported for [signingRegion=*].");return this.sigv4Signer.presignWithCredentials(j,w,x)}getSigv4aSigner(){if(!this.sigv4aSigner){let j=m.CrtSignerV4,w=jj.signatureV4aContainer.SignatureV4a;if(this.signerOptions.runtime==="node"){if(!j&&!w)throw Error("Neither CRT nor JS SigV4a implementation is available. Please load either @aws-sdk/signature-v4-crt or @aws-sdk/signature-v4a. For more information please go to https://github.com/aws/aws-sdk-js-v3#functionality-requiring-aws-common-runtime-crt");if(j&&typeof j==="function")this.sigv4aSigner=new j({...this.signerOptions,signingAlgorithm:1});else if(w&&typeof w==="function")this.sigv4aSigner=new w({...this.signerOptions});else throw Error("Available SigV4a implementation is not a valid constructor. Please ensure you've properly imported @aws-sdk/signature-v4-crt or @aws-sdk/signature-v4a.For more information please go to https://github.com/aws/aws-sdk-js-v3#functionality-requiring-aws-common-runtime-crt")}else{if(!w||typeof w!=="function")throw Error("JS SigV4a implementation is not available or not a valid constructor. Please check whether you have installed the @aws-sdk/signature-v4a package explicitly. The CRT implementation is not available for browsers. You must also register the package by calling [require('@aws-sdk/signature-v4a');] or an ESM equivalent such as [import '@aws-sdk/signature-v4a';]. For more information please go to https://github.com/aws/aws-sdk-js-v3#using-javascript-non-crt-implementation-of-sigv4a");this.sigv4aSigner=new w({...this.signerOptions})}}return this.sigv4aSigner}}Dw.SignatureV4MultiRegion=Lj;Dw.SignatureV4SignWithCredentials=xj;Dw.signatureV4CrtContainer=m});var Y=fw(),S=hw(),Z=Uw(),$=Jw(),b=Hw(),d=Pw(),c=Iw(),Gj=kw(),H=_w(),_j=zj(),O=bw(),kj=Ww(),vw=Aw(),T="ref",h=-1,q=!0,Uj="isSet",Wj="PartitionResult",C="booleanEquals",Q="stringEquals",Bj="getAttr",Jj="us-east-1",Hj="sigv4",bj="sts",Pj="https://sts.{Region}.{PartitionResult#dnsSuffix}",Ij={[T]:"Endpoint"},X={[T]:"Region"},Ej={[T]:Wj},R={},hj=[X],fj={conditions:[[Uj,[Ij]],[Uj,hj],["aws.partition",hj,Wj],[C,[{[T]:"UseFIPS"},q]],[C,[{[T]:"UseDualStack"},q]],[Q,[X,"aws-global"]],[C,[{[T]:"UseGlobalEndpoint"},q]],[Q,[X,"eu-central-1"]],[C,[{fn:Bj,argv:[Ej,"supportsDualStack"]},q]],[C,[{fn:Bj,argv:[Ej,"supportsFIPS"]},q]],[Q,[X,"ap-south-1"]],[Q,[X,"eu-north-1"]],[Q,[X,"eu-west-1"]],[Q,[X,"eu-west-2"]],[Q,[X,"eu-west-3"]],[Q,[X,"sa-east-1"]],[Q,[X,Jj]],[Q,[X,"us-east-2"]],[Q,[X,"us-west-2"]],[Q,[X,"us-west-1"]],[Q,[X,"ca-central-1"]],[Q,[X,"ap-southeast-1"]],[Q,[X,"ap-northeast-1"]],[Q,[X,"ap-southeast-2"]],[Q,[{fn:Bj,argv:[Ej,"name"]},"aws-us-gov"]]],results:[[h],["https://sts.amazonaws.com",{authSchemes:[{name:Hj,signingName:bj,signingRegion:Jj}]}],[Pj,{authSchemes:[{name:Hj,signingName:bj,signingRegion:"{Region}"}]}],[h,"Invalid Configuration: FIPS and custom endpoint are not supported"],[h,"Invalid Configuration: Dualstack and custom endpoint are not supported"],[Ij,R],["https://sts-fips.{Region}.{PartitionResult#dualStackDnsSuffix}",R],[h,"FIPS and DualStack are enabled, but this partition does not support one or both"],["https://sts.{Region}.amazonaws.com",R],["https://sts-fips.{Region}.{PartitionResult#dnsSuffix}",R],[h,"FIPS is enabled but this partition does not support FIPS"],["https://sts.{Region}.{PartitionResult#dualStackDnsSuffix}",R],[h,"DualStack is enabled but this partition does not support DualStack"],[Pj,R],[h,"Invalid Configuration: Missing Region"]]},Vw=2,F=1e8,Rw=new Int32Array([-1,1,-1,0,30,3,1,4,F+14,2,5,F+14,3,25,6,4,24,7,5,F+1,8,6,9,F+13,7,F+1,10,10,F+1,11,11,F+1,12,12,F+1,13,13,F+1,14,14,F+1,15,15,F+1,16,16,F+1,17,17,F+1,18,18,F+1,19,19,F+1,20,20,F+1,21,21,F+1,22,22,F+1,23,23,F+1,F+2,8,F+11,F+12,4,28,26,9,27,F+10,24,F+8,F+9,8,29,F+7,9,F+6,F+7,3,F+3,31,4,F+4,F+5]),Ow=b.BinaryDecisionDiagram.from(Rw,Vw,fj.conditions,fj.results),Tw=new b.EndpointCache({size:50,params:["Endpoint","Region","UseDualStack","UseFIPS","UseGlobalEndpoint"]}),Aj=(j,w={})=>{return Tw.get(j,()=>b.decideEndpoint(Ow,{endpointParams:j,logger:w.logger}))};b.customEndpointFunctions.aws=Y.awsEndpointFunctions;var mw=(j)=>async(w,x,E)=>{if(!E)throw Error("Could not find `input` for `defaultEndpointRuleSetHttpAuthSchemeParametersProvider`");let B=await j(w,x,E),N=Z.getSmithyContext(x)?.commandInstance?.constructor?.getEndpointParameterInstructions;if(!N)throw Error(`getEndpointParameterInstructions() is not defined on '${x.commandName}'`);let G=await b.resolveParams(E,{getEndpointParameterInstructions:N},w);return Object.assign(B,G)},qw=async(j,w,x)=>{return{operation:Z.getSmithyContext(w).operation,region:await Z.normalizeProvider(j.region)()||(()=>{throw Error("expected `region` to be configured for `aws.auth#sigv4`")})()}},Cw=mw(qw);function vj(j){return{schemeId:"aws.auth#sigv4",signingProperties:{name:"sts",region:j.region},propertiesExtractor:(w,x)=>({signingProperties:{config:w,context:x}})}}function Fj(j){return{schemeId:"aws.auth#sigv4a",signingProperties:{name:"sts",region:j.region},propertiesExtractor:(w,x)=>({signingProperties:{config:w,context:x}})}}function Vj(j){return{schemeId:"smithy.api#noAuth"}}var Sw=(j,w,x)=>{return(B)=>{let G=j(B).properties?.authSchemes;if(!G)return w(B);let M=[];for(let z of G){let{name:D,properties:k={},...I}=z,U=D.toLowerCase();if(D!==U)console.warn(`HttpAuthScheme has been normalized with lowercasing: '${D}' to '${U}'`);let L;if(U==="sigv4a"){L="aws.auth#sigv4a";let s=G.find((e)=>{let $j=e.name.toLowerCase();return $j!=="sigv4a"&&$j.startsWith("sigv4")});if(_j.SignatureV4MultiRegion.sigv4aDependency()==="none"&&s)continue}else if(U.startsWith("sigv4"))L="aws.auth#sigv4";else throw Error(`Unknown HttpAuthScheme found in '@smithy.rules#endpointRuleSet': '${U}'`);let V=x[L];if(!V)throw Error(`Could not find HttpAuthOption create function for '${L}'`);let J=V(B);J.schemeId=L,J.signingProperties={...J.signingProperties||{},...I,...k},M.push(J)}return M}},cw=(j)=>{let w=[];switch(j.operation){case"AssumeRoleWithWebIdentity":{w.push(Vj()),w.push(Fj(j));break}default:w.push(vj(j)),w.push(Fj(j))}return w},uw=Sw(Aj,cw,{"aws.auth#sigv4":vj,"aws.auth#sigv4a":Fj,"smithy.api#noAuth":Vj}),dw=(j)=>{let w=H.resolveAwsSdkSigV4Config(j),x=H.resolveAwsSdkSigV4AConfig(w);return Object.assign(x,{authSchemePreference:Z.normalizeProvider(j.authSchemePreference??[])})},pw=(j)=>{return Object.assign(j,{useDualstackEndpoint:j.useDualstackEndpoint??!1,useFipsEndpoint:j.useFipsEndpoint??!1,useGlobalEndpoint:j.useGlobalEndpoint??!1,defaultSigningName:"sts"})},Rj={UseGlobalEndpoint:{type:"builtInParams",name:"useGlobalEndpoint"},UseFIPS:{type:"builtInParams",name:"useFipsEndpoint"},Endpoint:{type:"builtInParams",name:"endpoint"},Region:{type:"builtInParams",name:"region"},UseDualStack:{type:"builtInParams",name:"useDualstackEndpoint"}},lw="3.997.14",gw={version:lw};class y extends Z.ServiceException{constructor(j){super(j);Object.setPrototypeOf(this,y.prototype)}}class p extends y{name="ExpiredTokenException";$fault="client";constructor(j){super({name:"ExpiredTokenException",$fault:"client",...j});Object.setPrototypeOf(this,p.prototype)}}class l extends y{name="MalformedPolicyDocumentException";$fault="client";constructor(j){super({name:"MalformedPolicyDocumentException",$fault:"client",...j});Object.setPrototypeOf(this,l.prototype)}}class g extends y{name="PackedPolicyTooLargeException";$fault="client";constructor(j){super({name:"PackedPolicyTooLargeException",$fault:"client",...j});Object.setPrototypeOf(this,g.prototype)}}class a extends y{name="RegionDisabledException";$fault="client";constructor(j){super({name:"RegionDisabledException",$fault:"client",...j});Object.setPrototypeOf(this,a.prototype)}}class r extends y{name="IDPRejectedClaimException";$fault="client";constructor(j){super({name:"IDPRejectedClaimException",$fault:"client",...j});Object.setPrototypeOf(this,r.prototype)}}class o extends y{name="InvalidIdentityTokenException";$fault="client";constructor(j){super({name:"InvalidIdentityTokenException",$fault:"client",...j});Object.setPrototypeOf(this,o.prototype)}}class n extends y{name="IDPCommunicationErrorException";$fault="client";$retryable={};constructor(j){super({name:"IDPCommunicationErrorException",$fault:"client",...j});Object.setPrototypeOf(this,n.prototype)}}var aw="Arn",rw="AccessKeyId",ow="AssumeRole",nw="AssumedRoleId",iw="AssumeRoleRequest",tw="AssumeRoleResponse",Kj="AssumedRoleUser",sw="AssumeRoleWithWebIdentity",ew="AssumeRoleWithWebIdentityRequest",jx="AssumeRoleWithWebIdentityResponse",wx="Audience",Nj="Credentials",xx="ContextAssertion",Oj="DurationSeconds",Bx="Expiration",Ex="ExternalId",Fx="ExpiredTokenException",Gx="IDPCommunicationErrorException",Kx="IDPRejectedClaimException",Nx="InvalidIdentityTokenException",Qx="Key",Xx="MalformedPolicyDocumentException",Tj="Policy",mj="PolicyArns",Yx="ProviderArn",Zx="ProvidedContexts",$x="ProvidedContextsListType",Mx="ProvidedContext",Dx="PolicyDescriptorType",yx="ProviderId",qj="PackedPolicySize",Lx="PackedPolicyTooLargeException",zx="Provider",Cj="RoleArn",kx="RegionDisabledException",Sj="RoleSessionName",Ux="SecretAccessKey",Jx="SubjectFromWebIdentityToken",Qj="SourceIdentity",Hx="SerialNumber",bx="SessionToken",Px="Tags",Ix="TokenCode",hx="TransitiveTagKeys",fx="Tag",_x="Value",Wx="WebIdentityToken",Ax="arn",vx="accessKeySecretType",f="awsQueryError",_="client",Vx="clientTokenType",W="error",A="httpError",v="message",Rx="policyDescriptorListType",cj="smithy.ts.sdk.synthetic.com.amazonaws.sts",Ox="tagListType",K="com.amazonaws.sts",uj=Gj.TypeRegistry.for(cj),dj=[-3,cj,"STSServiceException",0,[],[]];uj.registerError(dj,y);var P=Gj.TypeRegistry.for(K),pj=[-3,K,Fx,{[f]:["ExpiredTokenException",400],[W]:_,[A]:400},[v],[0]];P.registerError(pj,p);var lj=[-3,K,Gx,{[f]:["IDPCommunicationError",400],[W]:_,[A]:400},[v],[0]];P.registerError(lj,n);var gj=[-3,K,Kx,{[f]:["IDPRejectedClaim",403],[W]:_,[A]:403},[v],[0]];P.registerError(gj,r);var aj=[-3,K,Nx,{[f]:["InvalidIdentityToken",400],[W]:_,[A]:400},[v],[0]];P.registerError(aj,o);var rj=[-3,K,Xx,{[f]:["MalformedPolicyDocument",400],[W]:_,[A]:400},[v],[0]];P.registerError(rj,l);var oj=[-3,K,Lx,{[f]:["PackedPolicyTooLarge",400],[W]:_,[A]:400},[v],[0]];P.registerError(oj,g);var nj=[-3,K,kx,{[f]:["RegionDisabledException",403],[W]:_,[A]:403},[v],[0]];P.registerError(nj,a);var ij=[uj,P],Tx=[0,K,vx,8,0],mx=[0,K,Vx,8,0],Xj=[3,K,Kj,0,[nw,aw],[0,0],2],tj=[3,K,iw,0,[Cj,Sj,mj,Tj,Oj,Px,hx,Ex,Hx,Ix,Qj,Zx],[0,0,()=>Ew,0,1,()=>Cx,64,0,0,0,0,()=>qx],2],sj=[3,K,tw,0,[Nj,Kj,qj,Qj],[[()=>Yj,0],()=>Xj,1,0]],ej=[3,K,ew,0,[Cj,Sj,Wx,yx,mj,Tj,Oj],[0,0,[()=>mx,0],0,()=>Ew,0,1],3],jw=[3,K,jx,0,[Nj,Jx,Kj,qj,zx,wx,Qj],[[()=>Yj,0],0,()=>Xj,1,0,0,0]],Yj=[3,K,Nj,0,[rw,Ux,bx,Bx],[0,[()=>Tx,0],0,4],4],ww=[3,K,Dx,0,[Ax],[0]],xw=[3,K,Mx,0,[Yx,xx],[0,0]],Bw=[3,K,fx,0,[Qx,_x],[0,0],2],Ew=[1,K,Rx,0,()=>ww],qx=[1,K,$x,0,()=>xw],Cx=[1,K,Ox,0,()=>Bw],Fw=[9,K,ow,0,()=>tj,()=>sj],Gw=[9,K,sw,0,()=>ej,()=>jw],Sx=(j)=>{return{apiVersion:"2011-06-15",base64Decoder:j?.base64Decoder??O.fromBase64,base64Encoder:j?.base64Encoder??O.toBase64,disableHostPrefix:j?.disableHostPrefix??!1,endpointProvider:j?.endpointProvider??Aj,extensions:j?.extensions??[],httpAuthSchemeProvider:j?.httpAuthSchemeProvider??uw,httpAuthSchemes:j?.httpAuthSchemes??[{schemeId:"aws.auth#sigv4",identityProvider:(w)=>w.getIdentityProvider("aws.auth#sigv4"),signer:new H.AwsSdkSigV4Signer},{schemeId:"aws.auth#sigv4a",identityProvider:(w)=>w.getIdentityProvider("aws.auth#sigv4a"),signer:new H.AwsSdkSigV4ASigner},{schemeId:"smithy.api#noAuth",identityProvider:(w)=>w.getIdentityProvider("smithy.api#noAuth")||(async()=>({})),signer:new S.NoAuthSigner}],logger:j?.logger??new Z.NoOpLogger,protocol:j?.protocol??vw.AwsQueryProtocol,protocolSettings:j?.protocolSettings??{defaultNamespace:"com.amazonaws.sts",errorTypeRegistries:ij,xmlNamespace:"https://sts.amazonaws.com/doc/2011-06-15/",version:"2011-06-15",serviceTarget:"AWSSecurityTokenServiceV20110615"},serviceId:j?.serviceId??"STS",signerConstructor:j?.signerConstructor??_j.SignatureV4MultiRegion,urlParser:j?.urlParser??d.parseUrl,utf8Decoder:j?.utf8Decoder??O.fromUtf8,utf8Encoder:j?.utf8Encoder??O.toUtf8}},cx=(j)=>{Z.emitWarningIfUnsupportedVersion(process.version);let w=$.resolveDefaultsModeConfig(j),x=()=>w().then(Z.loadConfigsForDefaultMode),E=Sx(j);Y.emitWarningIfUnsupportedVersion(process.version);let B={profile:j?.profile,logger:E.logger};return{...E,...j,runtime:"node",defaultsMode:w,authSchemePreference:j?.authSchemePreference??$.loadConfig(H.NODE_AUTH_SCHEME_PREFERENCE_OPTIONS,B),bodyLengthChecker:j?.bodyLengthChecker??O.calculateBodyLength,defaultUserAgentProvider:j?.defaultUserAgentProvider??Y.createDefaultUserAgentProvider({serviceId:E.serviceId,clientVersion:gw.version}),httpAuthSchemes:j?.httpAuthSchemes??[{schemeId:"aws.auth#sigv4",identityProvider:(N)=>N.getIdentityProvider("aws.auth#sigv4")||(async(G)=>await j.credentialDefaultProvider(G?.__config||{})()),signer:new H.AwsSdkSigV4Signer},{schemeId:"aws.auth#sigv4a",identityProvider:(N)=>N.getIdentityProvider("aws.auth#sigv4a"),signer:new H.AwsSdkSigV4ASigner},{schemeId:"smithy.api#noAuth",identityProvider:(N)=>N.getIdentityProvider("smithy.api#noAuth")||(async()=>({})),signer:new S.NoAuthSigner}],maxAttempts:j?.maxAttempts??$.loadConfig(c.NODE_MAX_ATTEMPT_CONFIG_OPTIONS,j),region:j?.region??$.loadConfig($.NODE_REGION_CONFIG_OPTIONS,{...$.NODE_REGION_CONFIG_FILE_OPTIONS,...B}),requestHandler:kj.NodeHttpHandler.create(j?.requestHandler??x),retryMode:j?.retryMode??$.loadConfig({...c.NODE_RETRY_MODE_CONFIG_OPTIONS,default:async()=>(await x()).retryMode||c.DEFAULT_RETRY_MODE},j),sha256:j?.sha256??O.Hash.bind(null,"sha256"),sigv4aSigningRegionSet:j?.sigv4aSigningRegionSet??$.loadConfig(H.NODE_SIGV4A_CONFIG_OPTIONS,B),streamCollector:j?.streamCollector??kj.streamCollector,useDualstackEndpoint:j?.useDualstackEndpoint??$.loadConfig($.NODE_USE_DUALSTACK_ENDPOINT_CONFIG_OPTIONS,B),useFipsEndpoint:j?.useFipsEndpoint??$.loadConfig($.NODE_USE_FIPS_ENDPOINT_CONFIG_OPTIONS,B),userAgentAppId:j?.userAgentAppId??$.loadConfig(Y.NODE_APP_ID_CONFIG_OPTIONS,B)}},ux=(j)=>{let{httpAuthSchemes:w,httpAuthSchemeProvider:x,credentials:E}=j;return{setHttpAuthScheme(B){let N=w.findIndex((G)=>G.schemeId===B.schemeId);if(N===-1)w.push(B);else w.splice(N,1,B)},httpAuthSchemes(){return w},setHttpAuthSchemeProvider(B){x=B},httpAuthSchemeProvider(){return x},setCredentials(B){E=B},credentials(){return E}}},dx=(j)=>{return{httpAuthSchemes:j.httpAuthSchemes(),httpAuthSchemeProvider:j.httpAuthSchemeProvider(),credentials:j.credentials()}},px=(j,w)=>{let x=Object.assign(Y.getAwsRegionExtensionConfiguration(j),Z.getDefaultExtensionConfiguration(j),d.getHttpHandlerExtensionConfiguration(j),ux(j));return w.forEach((E)=>E.configure(x)),Object.assign(j,Y.resolveAwsRegionExtensionConfiguration(x),Z.resolveDefaultRuntimeConfig(x),d.resolveHttpHandlerRuntimeConfig(x),dx(x))};class u extends Z.Client{config;constructor(...[j]){let w=cx(j||{});super(w);this.initConfig=w;let x=pw(w),E=Y.resolveUserAgentConfig(x),B=c.resolveRetryConfig(E),N=$.resolveRegionConfig(B),G=Y.resolveHostHeaderConfig(N),M=b.resolveEndpointConfig(G),z=dw(M),D=px(z,j?.extensions||[]);this.config=D,this.middlewareStack.use(Gj.getSchemaSerdePlugin(this.config)),this.middlewareStack.use(Y.getUserAgentPlugin(this.config)),this.middlewareStack.use(c.getRetryPlugin(this.config)),this.middlewareStack.use(d.getContentLengthPlugin(this.config)),this.middlewareStack.use(Y.getHostHeaderPlugin(this.config)),this.middlewareStack.use(Y.getLoggerPlugin(this.config)),this.middlewareStack.use(Y.getRecursionDetectionPlugin(this.config)),this.middlewareStack.use(S.getHttpAuthSchemeEndpointRuleSetPlugin(this.config,{httpAuthSchemeParametersProvider:Cw,identityProviderConfigProvider:async(k)=>new S.DefaultIdentityProviderConfig({"aws.auth#sigv4":k.credentials,"aws.auth#sigv4a":k.credentials})})),this.middlewareStack.use(S.getHttpSigningPlugin(this.config))}destroy(){super.destroy()}}class i extends Z.Command.classBuilder().ep(Rj).m(function(j,w,x,E){return[b.getEndpointPlugin(x,j.getEndpointParameterInstructions())]}).s("AWSSecurityTokenServiceV20110615","AssumeRole",{}).n("STSClient","AssumeRoleCommand").sc(Fw).build(){}class t extends Z.Command.classBuilder().ep(Rj).m(function(j,w,x,E){return[b.getEndpointPlugin(x,j.getEndpointParameterInstructions())]}).s("AWSSecurityTokenServiceV20110615","AssumeRoleWithWebIdentity",{}).n("STSClient","AssumeRoleWithWebIdentityCommand").sc(Gw).build(){}var lx={AssumeRoleCommand:i,AssumeRoleWithWebIdentityCommand:t};class Zj extends u{}Z.createAggregatedClient(lx,Zj);var Kw=(j)=>{if(typeof j?.Arn==="string"){let w=j.Arn.split(":");if(w.length>4&&w[4]!=="")return w[4]}return},Nw=async(j,w,x,E={})=>{let B=typeof j==="function"?await j():j,N=typeof w==="function"?await w():w,G="",M=B??N??(G=await Y.stsRegionDefaultResolver(E)());return x?.debug?.("@aws-sdk/client-sts::resolveRegion","accepting first of:",`${B} (credential provider clientConfig)`,`${N} (contextual client)`,`${G} (STS default: AWS_REGION, profile region, or us-east-1)`),M},gx=(j,w)=>{let x,E;return async(B,N)=>{if(E=B,!x){let{logger:k=j?.parentClientConfig?.logger,profile:I=j?.parentClientConfig?.profile,region:U,requestHandler:L=j?.parentClientConfig?.requestHandler,credentialProviderLogger:V,userAgentAppId:J=j?.parentClientConfig?.userAgentAppId}=j,s=await Nw(U,j?.parentClientConfig?.region,V,{logger:k,profile:I}),e=!Qw(L);x=new w({...j,userAgentAppId:J,profile:I,credentialDefaultProvider:()=>async()=>E,region:s,requestHandler:e?L:void 0,logger:k})}let{Credentials:G,AssumedRoleUser:M}=await x.send(new i(N));if(!G||!G.AccessKeyId||!G.SecretAccessKey)throw Error(`Invalid response from STS.assumeRole call with role ${N.RoleArn}`);let z=Kw(M),D={accessKeyId:G.AccessKeyId,secretAccessKey:G.SecretAccessKey,sessionToken:G.SessionToken,expiration:G.Expiration,...G.CredentialScope&&{credentialScope:G.CredentialScope},...z&&{accountId:z}};return Y.setCredentialFeature(D,"CREDENTIALS_STS_ASSUME_ROLE","i"),D}},ax=(j,w)=>{let x;return async(E)=>{if(!x){let{logger:z=j?.parentClientConfig?.logger,profile:D=j?.parentClientConfig?.profile,region:k,requestHandler:I=j?.parentClientConfig?.requestHandler,credentialProviderLogger:U,userAgentAppId:L=j?.parentClientConfig?.userAgentAppId}=j,V=await Nw(k,j?.parentClientConfig?.region,U,{logger:z,profile:D}),J=!Qw(I);x=new w({...j,userAgentAppId:L,profile:D,region:V,requestHandler:J?I:void 0,logger:z})}let{Credentials:B,AssumedRoleUser:N}=await x.send(new t(E));if(!B||!B.AccessKeyId||!B.SecretAccessKey)throw Error(`Invalid response from STS.assumeRoleWithWebIdentity call with role ${E.RoleArn}`);let G=Kw(N),M={accessKeyId:B.AccessKeyId,secretAccessKey:B.SecretAccessKey,sessionToken:B.SessionToken,expiration:B.Expiration,...B.CredentialScope&&{credentialScope:B.CredentialScope},...G&&{accountId:G}};if(G)Y.setCredentialFeature(M,"RESOLVED_ACCOUNT_ID","T");return Y.setCredentialFeature(M,"CREDENTIALS_STS_ASSUME_ROLE_WEB_ID","k"),M}},Qw=(j)=>{return j?.metadata?.handlerProtocol==="h2"},Xw=(j,w)=>{if(!w)return j;else return class extends j{constructor(E){super(E);for(let B of w)this.middlewareStack.use(B)}}},Yw=(j={},w)=>gx(j,Xw(u,w)),Zw=(j={},w)=>ax(j,Xw(u,w)),rx=(j)=>(w)=>j({roleAssumer:Yw(w),roleAssumerWithWebIdentity:Zw(w),...w});var{Command:ox,Client:nx}=Z,ix=Fw,tx=i,sx=tj,ex=sj,jB=Gw,wB=t,xB=ej,BB=jw,EB=Xj,FB=Yj,GB=p,KB=pj,NB=n,QB=lj,XB=r,YB=gj,ZB=o,$B=aj,MB=l,DB=rj,yB=g,LB=oj,zB=ww,kB=xw,UB=a,JB=nj,HB=Zj,bB=u,PB=y,IB=dj,hB=Bw,fB=rx,_B=ij,WB=Yw,AB=Zw;export{AB as getDefaultRoleAssumerWithWebIdentity,WB as getDefaultRoleAssumer,_B as errorTypeRegistries,fB as decorateDefaultCredentialProvider,nx as __Client,hB as Tag$,IB as STSServiceException$,PB as STSServiceException,bB as STSClient,HB as STS,JB as RegionDisabledException$,UB as RegionDisabledException,kB as ProvidedContext$,zB as PolicyDescriptorType$,LB as PackedPolicyTooLargeException$,yB as PackedPolicyTooLargeException,DB as MalformedPolicyDocumentException$,MB as MalformedPolicyDocumentException,$B as InvalidIdentityTokenException$,ZB as InvalidIdentityTokenException,YB as IDPRejectedClaimException$,XB as IDPRejectedClaimException,QB as IDPCommunicationErrorException$,NB as IDPCommunicationErrorException,KB as ExpiredTokenException$,GB as ExpiredTokenException,FB as Credentials$,EB as AssumedRoleUser$,BB as AssumeRoleWithWebIdentityResponse$,xB as AssumeRoleWithWebIdentityRequest$,wB as AssumeRoleWithWebIdentityCommand,jB as AssumeRoleWithWebIdentity$,ex as AssumeRoleResponse$,sx as AssumeRoleRequest$,tx as AssumeRoleCommand,ix as AssumeRole$,ox as $Command};export default {get getDefaultRoleAssumerWithWebIdentity(){return AB},get getDefaultRoleAssumer(){return WB},get errorTypeRegistries(){return _B},get decorateDefaultCredentialProvider(){return fB},get __Client(){return nx},get Tag$(){return hB},get STSServiceException$(){return IB},get STSServiceException(){return PB},get STSClient(){return bB},get STS(){return HB},get RegionDisabledException$(){return JB},get RegionDisabledException(){return UB},get ProvidedContext$(){return kB},get PolicyDescriptorType$(){return zB},get PackedPolicyTooLargeException$(){return LB},get PackedPolicyTooLargeException(){return yB},get MalformedPolicyDocumentException$(){return DB},get MalformedPolicyDocumentException(){return MB},get InvalidIdentityTokenException$(){return $B},get InvalidIdentityTokenException(){return ZB},get IDPRejectedClaimException$(){return YB},get IDPRejectedClaimException(){return XB},get IDPCommunicationErrorException$(){return QB},get IDPCommunicationErrorException(){return NB},get ExpiredTokenException$(){return KB},get ExpiredTokenException(){return GB},get Credentials$(){return FB},get AssumedRoleUser$(){return EB},get AssumeRoleWithWebIdentityResponse$(){return BB},get AssumeRoleWithWebIdentityRequest$(){return xB},get AssumeRoleWithWebIdentityCommand(){return wB},get AssumeRoleWithWebIdentity$(){return jB},get AssumeRoleResponse$(){return ex},get AssumeRoleRequest$(){return sx},get AssumeRoleCommand(){return tx},get AssumeRole$(){return ix},get $Command(){return ox}};
2
+ import{re as _w}from"./chunk-hgsykghj.js";import{se as Mw,ve as Aw}from"./chunk-jts0dma5.js";import{we as Ww}from"./chunk-vgaxv70x.js";import{xe as Iw,ye as hw,ze as fw}from"./chunk-t01bhw5h.js";import{Ae as Pw}from"./chunk-8yr682pv.js";import{sf as kw,tf as Uw,uf as Jw,vf as Hw,wf as bw}from"./chunk-v3x5nrc4.js";import{hQ as $w}from"./chunk-4sazy0nq.js";var zj=$w((Dw)=>{var jj=Mw(),m={CrtSignerV4:null},wj="X-Amz-S3session-Token",Mj=wj.toLowerCase();class xj extends jj.SignatureV4{async signWithCredentials(j,w,x){let E=Dj(w);j.headers[Mj]=w.sessionToken;let B=this;return yj(B,E),B.signRequest(j,x??{})}async presignWithCredentials(j,w,x){let E=Dj(w);return delete j.headers[Mj],j.headers[wj]=w.sessionToken,j.query=j.query??{},j.query[wj]=w.sessionToken,yj(this,E),this.presign(j,x)}}function Dj(j){return{accessKeyId:j.accessKeyId,secretAccessKey:j.secretAccessKey,expiration:j.expiration}}function yj(j,w){let x=j.credentialProvider;j.credentialProvider=()=>{return j.credentialProvider=x,Promise.resolve(w)}}class Lj{sigv4aSigner;sigv4Signer;signerOptions;static sigv4aDependency(){if(typeof m.CrtSignerV4==="function")return"crt";else if(typeof jj.signatureV4aContainer.SignatureV4a==="function")return"js";return"none"}constructor(j){this.sigv4Signer=new xj(j),this.signerOptions=j}async sign(j,w={}){if(w.signingRegion==="*")return this.getSigv4aSigner().sign(j,w);return this.sigv4Signer.sign(j,w)}async signWithCredentials(j,w,x={}){if(x.signingRegion==="*"){let E=this.getSigv4aSigner(),B=m.CrtSignerV4;if(B&&E instanceof B)return E.signWithCredentials(j,w,x);else throw Error(`signWithCredentials with signingRegion '*' is only supported when using the CRT dependency @aws-sdk/signature-v4-crt. Please check whether you have installed the "@aws-sdk/signature-v4-crt" package explicitly. You must also register the package by calling [require("@aws-sdk/signature-v4-crt");] or an ESM equivalent such as [import "@aws-sdk/signature-v4-crt";]. For more information please go to https://github.com/aws/aws-sdk-js-v3#functionality-requiring-aws-common-runtime-crt`)}return this.sigv4Signer.signWithCredentials(j,w,x)}async presign(j,w={}){if(w.signingRegion==="*"){let x=this.getSigv4aSigner(),E=m.CrtSignerV4;if(E&&x instanceof E)return x.presign(j,w);else throw Error(`presign with signingRegion '*' is only supported when using the CRT dependency @aws-sdk/signature-v4-crt. Please check whether you have installed the "@aws-sdk/signature-v4-crt" package explicitly. You must also register the package by calling [require("@aws-sdk/signature-v4-crt");] or an ESM equivalent such as [import "@aws-sdk/signature-v4-crt";]. For more information please go to https://github.com/aws/aws-sdk-js-v3#functionality-requiring-aws-common-runtime-crt`)}return this.sigv4Signer.presign(j,w)}async presignWithCredentials(j,w,x={}){if(x.signingRegion==="*")throw Error("Method presignWithCredentials is not supported for [signingRegion=*].");return this.sigv4Signer.presignWithCredentials(j,w,x)}getSigv4aSigner(){if(!this.sigv4aSigner){let j=m.CrtSignerV4,w=jj.signatureV4aContainer.SignatureV4a;if(this.signerOptions.runtime==="node"){if(!j&&!w)throw Error("Neither CRT nor JS SigV4a implementation is available. Please load either @aws-sdk/signature-v4-crt or @aws-sdk/signature-v4a. For more information please go to https://github.com/aws/aws-sdk-js-v3#functionality-requiring-aws-common-runtime-crt");if(j&&typeof j==="function")this.sigv4aSigner=new j({...this.signerOptions,signingAlgorithm:1});else if(w&&typeof w==="function")this.sigv4aSigner=new w({...this.signerOptions});else throw Error("Available SigV4a implementation is not a valid constructor. Please ensure you've properly imported @aws-sdk/signature-v4-crt or @aws-sdk/signature-v4a.For more information please go to https://github.com/aws/aws-sdk-js-v3#functionality-requiring-aws-common-runtime-crt")}else{if(!w||typeof w!=="function")throw Error("JS SigV4a implementation is not available or not a valid constructor. Please check whether you have installed the @aws-sdk/signature-v4a package explicitly. The CRT implementation is not available for browsers. You must also register the package by calling [require('@aws-sdk/signature-v4a');] or an ESM equivalent such as [import '@aws-sdk/signature-v4a';]. For more information please go to https://github.com/aws/aws-sdk-js-v3#using-javascript-non-crt-implementation-of-sigv4a");this.sigv4aSigner=new w({...this.signerOptions})}}return this.sigv4aSigner}}Dw.SignatureV4MultiRegion=Lj;Dw.SignatureV4SignWithCredentials=xj;Dw.signatureV4CrtContainer=m});var Y=fw(),S=hw(),Z=Uw(),$=Jw(),b=Hw(),d=Pw(),c=Iw(),Gj=kw(),H=_w(),_j=zj(),O=bw(),kj=Ww(),vw=Aw(),T="ref",h=-1,q=!0,Uj="isSet",Wj="PartitionResult",C="booleanEquals",Q="stringEquals",Bj="getAttr",Jj="us-east-1",Hj="sigv4",bj="sts",Pj="https://sts.{Region}.{PartitionResult#dnsSuffix}",Ij={[T]:"Endpoint"},X={[T]:"Region"},Ej={[T]:Wj},R={},hj=[X],fj={conditions:[[Uj,[Ij]],[Uj,hj],["aws.partition",hj,Wj],[C,[{[T]:"UseFIPS"},q]],[C,[{[T]:"UseDualStack"},q]],[Q,[X,"aws-global"]],[C,[{[T]:"UseGlobalEndpoint"},q]],[Q,[X,"eu-central-1"]],[C,[{fn:Bj,argv:[Ej,"supportsDualStack"]},q]],[C,[{fn:Bj,argv:[Ej,"supportsFIPS"]},q]],[Q,[X,"ap-south-1"]],[Q,[X,"eu-north-1"]],[Q,[X,"eu-west-1"]],[Q,[X,"eu-west-2"]],[Q,[X,"eu-west-3"]],[Q,[X,"sa-east-1"]],[Q,[X,Jj]],[Q,[X,"us-east-2"]],[Q,[X,"us-west-2"]],[Q,[X,"us-west-1"]],[Q,[X,"ca-central-1"]],[Q,[X,"ap-southeast-1"]],[Q,[X,"ap-northeast-1"]],[Q,[X,"ap-southeast-2"]],[Q,[{fn:Bj,argv:[Ej,"name"]},"aws-us-gov"]]],results:[[h],["https://sts.amazonaws.com",{authSchemes:[{name:Hj,signingName:bj,signingRegion:Jj}]}],[Pj,{authSchemes:[{name:Hj,signingName:bj,signingRegion:"{Region}"}]}],[h,"Invalid Configuration: FIPS and custom endpoint are not supported"],[h,"Invalid Configuration: Dualstack and custom endpoint are not supported"],[Ij,R],["https://sts-fips.{Region}.{PartitionResult#dualStackDnsSuffix}",R],[h,"FIPS and DualStack are enabled, but this partition does not support one or both"],["https://sts.{Region}.amazonaws.com",R],["https://sts-fips.{Region}.{PartitionResult#dnsSuffix}",R],[h,"FIPS is enabled but this partition does not support FIPS"],["https://sts.{Region}.{PartitionResult#dualStackDnsSuffix}",R],[h,"DualStack is enabled but this partition does not support DualStack"],[Pj,R],[h,"Invalid Configuration: Missing Region"]]},Vw=2,F=1e8,Rw=new Int32Array([-1,1,-1,0,30,3,1,4,F+14,2,5,F+14,3,25,6,4,24,7,5,F+1,8,6,9,F+13,7,F+1,10,10,F+1,11,11,F+1,12,12,F+1,13,13,F+1,14,14,F+1,15,15,F+1,16,16,F+1,17,17,F+1,18,18,F+1,19,19,F+1,20,20,F+1,21,21,F+1,22,22,F+1,23,23,F+1,F+2,8,F+11,F+12,4,28,26,9,27,F+10,24,F+8,F+9,8,29,F+7,9,F+6,F+7,3,F+3,31,4,F+4,F+5]),Ow=b.BinaryDecisionDiagram.from(Rw,Vw,fj.conditions,fj.results),Tw=new b.EndpointCache({size:50,params:["Endpoint","Region","UseDualStack","UseFIPS","UseGlobalEndpoint"]}),Aj=(j,w={})=>{return Tw.get(j,()=>b.decideEndpoint(Ow,{endpointParams:j,logger:w.logger}))};b.customEndpointFunctions.aws=Y.awsEndpointFunctions;var mw=(j)=>async(w,x,E)=>{if(!E)throw Error("Could not find `input` for `defaultEndpointRuleSetHttpAuthSchemeParametersProvider`");let B=await j(w,x,E),N=Z.getSmithyContext(x)?.commandInstance?.constructor?.getEndpointParameterInstructions;if(!N)throw Error(`getEndpointParameterInstructions() is not defined on '${x.commandName}'`);let G=await b.resolveParams(E,{getEndpointParameterInstructions:N},w);return Object.assign(B,G)},qw=async(j,w,x)=>{return{operation:Z.getSmithyContext(w).operation,region:await Z.normalizeProvider(j.region)()||(()=>{throw Error("expected `region` to be configured for `aws.auth#sigv4`")})()}},Cw=mw(qw);function vj(j){return{schemeId:"aws.auth#sigv4",signingProperties:{name:"sts",region:j.region},propertiesExtractor:(w,x)=>({signingProperties:{config:w,context:x}})}}function Fj(j){return{schemeId:"aws.auth#sigv4a",signingProperties:{name:"sts",region:j.region},propertiesExtractor:(w,x)=>({signingProperties:{config:w,context:x}})}}function Vj(j){return{schemeId:"smithy.api#noAuth"}}var Sw=(j,w,x)=>{return(B)=>{let G=j(B).properties?.authSchemes;if(!G)return w(B);let M=[];for(let z of G){let{name:D,properties:k={},...I}=z,U=D.toLowerCase();if(D!==U)console.warn(`HttpAuthScheme has been normalized with lowercasing: '${D}' to '${U}'`);let L;if(U==="sigv4a"){L="aws.auth#sigv4a";let s=G.find((e)=>{let $j=e.name.toLowerCase();return $j!=="sigv4a"&&$j.startsWith("sigv4")});if(_j.SignatureV4MultiRegion.sigv4aDependency()==="none"&&s)continue}else if(U.startsWith("sigv4"))L="aws.auth#sigv4";else throw Error(`Unknown HttpAuthScheme found in '@smithy.rules#endpointRuleSet': '${U}'`);let V=x[L];if(!V)throw Error(`Could not find HttpAuthOption create function for '${L}'`);let J=V(B);J.schemeId=L,J.signingProperties={...J.signingProperties||{},...I,...k},M.push(J)}return M}},cw=(j)=>{let w=[];switch(j.operation){case"AssumeRoleWithWebIdentity":{w.push(Vj()),w.push(Fj(j));break}default:w.push(vj(j)),w.push(Fj(j))}return w},uw=Sw(Aj,cw,{"aws.auth#sigv4":vj,"aws.auth#sigv4a":Fj,"smithy.api#noAuth":Vj}),dw=(j)=>{let w=H.resolveAwsSdkSigV4Config(j),x=H.resolveAwsSdkSigV4AConfig(w);return Object.assign(x,{authSchemePreference:Z.normalizeProvider(j.authSchemePreference??[])})},pw=(j)=>{return Object.assign(j,{useDualstackEndpoint:j.useDualstackEndpoint??!1,useFipsEndpoint:j.useFipsEndpoint??!1,useGlobalEndpoint:j.useGlobalEndpoint??!1,defaultSigningName:"sts"})},Rj={UseGlobalEndpoint:{type:"builtInParams",name:"useGlobalEndpoint"},UseFIPS:{type:"builtInParams",name:"useFipsEndpoint"},Endpoint:{type:"builtInParams",name:"endpoint"},Region:{type:"builtInParams",name:"region"},UseDualStack:{type:"builtInParams",name:"useDualstackEndpoint"}},lw="3.997.14",gw={version:lw};class y extends Z.ServiceException{constructor(j){super(j);Object.setPrototypeOf(this,y.prototype)}}class p extends y{name="ExpiredTokenException";$fault="client";constructor(j){super({name:"ExpiredTokenException",$fault:"client",...j});Object.setPrototypeOf(this,p.prototype)}}class l extends y{name="MalformedPolicyDocumentException";$fault="client";constructor(j){super({name:"MalformedPolicyDocumentException",$fault:"client",...j});Object.setPrototypeOf(this,l.prototype)}}class g extends y{name="PackedPolicyTooLargeException";$fault="client";constructor(j){super({name:"PackedPolicyTooLargeException",$fault:"client",...j});Object.setPrototypeOf(this,g.prototype)}}class a extends y{name="RegionDisabledException";$fault="client";constructor(j){super({name:"RegionDisabledException",$fault:"client",...j});Object.setPrototypeOf(this,a.prototype)}}class r extends y{name="IDPRejectedClaimException";$fault="client";constructor(j){super({name:"IDPRejectedClaimException",$fault:"client",...j});Object.setPrototypeOf(this,r.prototype)}}class o extends y{name="InvalidIdentityTokenException";$fault="client";constructor(j){super({name:"InvalidIdentityTokenException",$fault:"client",...j});Object.setPrototypeOf(this,o.prototype)}}class n extends y{name="IDPCommunicationErrorException";$fault="client";$retryable={};constructor(j){super({name:"IDPCommunicationErrorException",$fault:"client",...j});Object.setPrototypeOf(this,n.prototype)}}var aw="Arn",rw="AccessKeyId",ow="AssumeRole",nw="AssumedRoleId",iw="AssumeRoleRequest",tw="AssumeRoleResponse",Kj="AssumedRoleUser",sw="AssumeRoleWithWebIdentity",ew="AssumeRoleWithWebIdentityRequest",jx="AssumeRoleWithWebIdentityResponse",wx="Audience",Nj="Credentials",xx="ContextAssertion",Oj="DurationSeconds",Bx="Expiration",Ex="ExternalId",Fx="ExpiredTokenException",Gx="IDPCommunicationErrorException",Kx="IDPRejectedClaimException",Nx="InvalidIdentityTokenException",Qx="Key",Xx="MalformedPolicyDocumentException",Tj="Policy",mj="PolicyArns",Yx="ProviderArn",Zx="ProvidedContexts",$x="ProvidedContextsListType",Mx="ProvidedContext",Dx="PolicyDescriptorType",yx="ProviderId",qj="PackedPolicySize",Lx="PackedPolicyTooLargeException",zx="Provider",Cj="RoleArn",kx="RegionDisabledException",Sj="RoleSessionName",Ux="SecretAccessKey",Jx="SubjectFromWebIdentityToken",Qj="SourceIdentity",Hx="SerialNumber",bx="SessionToken",Px="Tags",Ix="TokenCode",hx="TransitiveTagKeys",fx="Tag",_x="Value",Wx="WebIdentityToken",Ax="arn",vx="accessKeySecretType",f="awsQueryError",_="client",Vx="clientTokenType",W="error",A="httpError",v="message",Rx="policyDescriptorListType",cj="smithy.ts.sdk.synthetic.com.amazonaws.sts",Ox="tagListType",K="com.amazonaws.sts",uj=Gj.TypeRegistry.for(cj),dj=[-3,cj,"STSServiceException",0,[],[]];uj.registerError(dj,y);var P=Gj.TypeRegistry.for(K),pj=[-3,K,Fx,{[f]:["ExpiredTokenException",400],[W]:_,[A]:400},[v],[0]];P.registerError(pj,p);var lj=[-3,K,Gx,{[f]:["IDPCommunicationError",400],[W]:_,[A]:400},[v],[0]];P.registerError(lj,n);var gj=[-3,K,Kx,{[f]:["IDPRejectedClaim",403],[W]:_,[A]:403},[v],[0]];P.registerError(gj,r);var aj=[-3,K,Nx,{[f]:["InvalidIdentityToken",400],[W]:_,[A]:400},[v],[0]];P.registerError(aj,o);var rj=[-3,K,Xx,{[f]:["MalformedPolicyDocument",400],[W]:_,[A]:400},[v],[0]];P.registerError(rj,l);var oj=[-3,K,Lx,{[f]:["PackedPolicyTooLarge",400],[W]:_,[A]:400},[v],[0]];P.registerError(oj,g);var nj=[-3,K,kx,{[f]:["RegionDisabledException",403],[W]:_,[A]:403},[v],[0]];P.registerError(nj,a);var ij=[uj,P],Tx=[0,K,vx,8,0],mx=[0,K,Vx,8,0],Xj=[3,K,Kj,0,[nw,aw],[0,0],2],tj=[3,K,iw,0,[Cj,Sj,mj,Tj,Oj,Px,hx,Ex,Hx,Ix,Qj,Zx],[0,0,()=>Ew,0,1,()=>Cx,64,0,0,0,0,()=>qx],2],sj=[3,K,tw,0,[Nj,Kj,qj,Qj],[[()=>Yj,0],()=>Xj,1,0]],ej=[3,K,ew,0,[Cj,Sj,Wx,yx,mj,Tj,Oj],[0,0,[()=>mx,0],0,()=>Ew,0,1],3],jw=[3,K,jx,0,[Nj,Jx,Kj,qj,zx,wx,Qj],[[()=>Yj,0],0,()=>Xj,1,0,0,0]],Yj=[3,K,Nj,0,[rw,Ux,bx,Bx],[0,[()=>Tx,0],0,4],4],ww=[3,K,Dx,0,[Ax],[0]],xw=[3,K,Mx,0,[Yx,xx],[0,0]],Bw=[3,K,fx,0,[Qx,_x],[0,0],2],Ew=[1,K,Rx,0,()=>ww],qx=[1,K,$x,0,()=>xw],Cx=[1,K,Ox,0,()=>Bw],Fw=[9,K,ow,0,()=>tj,()=>sj],Gw=[9,K,sw,0,()=>ej,()=>jw],Sx=(j)=>{return{apiVersion:"2011-06-15",base64Decoder:j?.base64Decoder??O.fromBase64,base64Encoder:j?.base64Encoder??O.toBase64,disableHostPrefix:j?.disableHostPrefix??!1,endpointProvider:j?.endpointProvider??Aj,extensions:j?.extensions??[],httpAuthSchemeProvider:j?.httpAuthSchemeProvider??uw,httpAuthSchemes:j?.httpAuthSchemes??[{schemeId:"aws.auth#sigv4",identityProvider:(w)=>w.getIdentityProvider("aws.auth#sigv4"),signer:new H.AwsSdkSigV4Signer},{schemeId:"aws.auth#sigv4a",identityProvider:(w)=>w.getIdentityProvider("aws.auth#sigv4a"),signer:new H.AwsSdkSigV4ASigner},{schemeId:"smithy.api#noAuth",identityProvider:(w)=>w.getIdentityProvider("smithy.api#noAuth")||(async()=>({})),signer:new S.NoAuthSigner}],logger:j?.logger??new Z.NoOpLogger,protocol:j?.protocol??vw.AwsQueryProtocol,protocolSettings:j?.protocolSettings??{defaultNamespace:"com.amazonaws.sts",errorTypeRegistries:ij,xmlNamespace:"https://sts.amazonaws.com/doc/2011-06-15/",version:"2011-06-15",serviceTarget:"AWSSecurityTokenServiceV20110615"},serviceId:j?.serviceId??"STS",signerConstructor:j?.signerConstructor??_j.SignatureV4MultiRegion,urlParser:j?.urlParser??d.parseUrl,utf8Decoder:j?.utf8Decoder??O.fromUtf8,utf8Encoder:j?.utf8Encoder??O.toUtf8}},cx=(j)=>{Z.emitWarningIfUnsupportedVersion(process.version);let w=$.resolveDefaultsModeConfig(j),x=()=>w().then(Z.loadConfigsForDefaultMode),E=Sx(j);Y.emitWarningIfUnsupportedVersion(process.version);let B={profile:j?.profile,logger:E.logger};return{...E,...j,runtime:"node",defaultsMode:w,authSchemePreference:j?.authSchemePreference??$.loadConfig(H.NODE_AUTH_SCHEME_PREFERENCE_OPTIONS,B),bodyLengthChecker:j?.bodyLengthChecker??O.calculateBodyLength,defaultUserAgentProvider:j?.defaultUserAgentProvider??Y.createDefaultUserAgentProvider({serviceId:E.serviceId,clientVersion:gw.version}),httpAuthSchemes:j?.httpAuthSchemes??[{schemeId:"aws.auth#sigv4",identityProvider:(N)=>N.getIdentityProvider("aws.auth#sigv4")||(async(G)=>await j.credentialDefaultProvider(G?.__config||{})()),signer:new H.AwsSdkSigV4Signer},{schemeId:"aws.auth#sigv4a",identityProvider:(N)=>N.getIdentityProvider("aws.auth#sigv4a"),signer:new H.AwsSdkSigV4ASigner},{schemeId:"smithy.api#noAuth",identityProvider:(N)=>N.getIdentityProvider("smithy.api#noAuth")||(async()=>({})),signer:new S.NoAuthSigner}],maxAttempts:j?.maxAttempts??$.loadConfig(c.NODE_MAX_ATTEMPT_CONFIG_OPTIONS,j),region:j?.region??$.loadConfig($.NODE_REGION_CONFIG_OPTIONS,{...$.NODE_REGION_CONFIG_FILE_OPTIONS,...B}),requestHandler:kj.NodeHttpHandler.create(j?.requestHandler??x),retryMode:j?.retryMode??$.loadConfig({...c.NODE_RETRY_MODE_CONFIG_OPTIONS,default:async()=>(await x()).retryMode||c.DEFAULT_RETRY_MODE},j),sha256:j?.sha256??O.Hash.bind(null,"sha256"),sigv4aSigningRegionSet:j?.sigv4aSigningRegionSet??$.loadConfig(H.NODE_SIGV4A_CONFIG_OPTIONS,B),streamCollector:j?.streamCollector??kj.streamCollector,useDualstackEndpoint:j?.useDualstackEndpoint??$.loadConfig($.NODE_USE_DUALSTACK_ENDPOINT_CONFIG_OPTIONS,B),useFipsEndpoint:j?.useFipsEndpoint??$.loadConfig($.NODE_USE_FIPS_ENDPOINT_CONFIG_OPTIONS,B),userAgentAppId:j?.userAgentAppId??$.loadConfig(Y.NODE_APP_ID_CONFIG_OPTIONS,B)}},ux=(j)=>{let{httpAuthSchemes:w,httpAuthSchemeProvider:x,credentials:E}=j;return{setHttpAuthScheme(B){let N=w.findIndex((G)=>G.schemeId===B.schemeId);if(N===-1)w.push(B);else w.splice(N,1,B)},httpAuthSchemes(){return w},setHttpAuthSchemeProvider(B){x=B},httpAuthSchemeProvider(){return x},setCredentials(B){E=B},credentials(){return E}}},dx=(j)=>{return{httpAuthSchemes:j.httpAuthSchemes(),httpAuthSchemeProvider:j.httpAuthSchemeProvider(),credentials:j.credentials()}},px=(j,w)=>{let x=Object.assign(Y.getAwsRegionExtensionConfiguration(j),Z.getDefaultExtensionConfiguration(j),d.getHttpHandlerExtensionConfiguration(j),ux(j));return w.forEach((E)=>E.configure(x)),Object.assign(j,Y.resolveAwsRegionExtensionConfiguration(x),Z.resolveDefaultRuntimeConfig(x),d.resolveHttpHandlerRuntimeConfig(x),dx(x))};class u extends Z.Client{config;constructor(...[j]){let w=cx(j||{});super(w);this.initConfig=w;let x=pw(w),E=Y.resolveUserAgentConfig(x),B=c.resolveRetryConfig(E),N=$.resolveRegionConfig(B),G=Y.resolveHostHeaderConfig(N),M=b.resolveEndpointConfig(G),z=dw(M),D=px(z,j?.extensions||[]);this.config=D,this.middlewareStack.use(Gj.getSchemaSerdePlugin(this.config)),this.middlewareStack.use(Y.getUserAgentPlugin(this.config)),this.middlewareStack.use(c.getRetryPlugin(this.config)),this.middlewareStack.use(d.getContentLengthPlugin(this.config)),this.middlewareStack.use(Y.getHostHeaderPlugin(this.config)),this.middlewareStack.use(Y.getLoggerPlugin(this.config)),this.middlewareStack.use(Y.getRecursionDetectionPlugin(this.config)),this.middlewareStack.use(S.getHttpAuthSchemeEndpointRuleSetPlugin(this.config,{httpAuthSchemeParametersProvider:Cw,identityProviderConfigProvider:async(k)=>new S.DefaultIdentityProviderConfig({"aws.auth#sigv4":k.credentials,"aws.auth#sigv4a":k.credentials})})),this.middlewareStack.use(S.getHttpSigningPlugin(this.config))}destroy(){super.destroy()}}class i extends Z.Command.classBuilder().ep(Rj).m(function(j,w,x,E){return[b.getEndpointPlugin(x,j.getEndpointParameterInstructions())]}).s("AWSSecurityTokenServiceV20110615","AssumeRole",{}).n("STSClient","AssumeRoleCommand").sc(Fw).build(){}class t extends Z.Command.classBuilder().ep(Rj).m(function(j,w,x,E){return[b.getEndpointPlugin(x,j.getEndpointParameterInstructions())]}).s("AWSSecurityTokenServiceV20110615","AssumeRoleWithWebIdentity",{}).n("STSClient","AssumeRoleWithWebIdentityCommand").sc(Gw).build(){}var lx={AssumeRoleCommand:i,AssumeRoleWithWebIdentityCommand:t};class Zj extends u{}Z.createAggregatedClient(lx,Zj);var Kw=(j)=>{if(typeof j?.Arn==="string"){let w=j.Arn.split(":");if(w.length>4&&w[4]!=="")return w[4]}return},Nw=async(j,w,x,E={})=>{let B=typeof j==="function"?await j():j,N=typeof w==="function"?await w():w,G="",M=B??N??(G=await Y.stsRegionDefaultResolver(E)());return x?.debug?.("@aws-sdk/client-sts::resolveRegion","accepting first of:",`${B} (credential provider clientConfig)`,`${N} (contextual client)`,`${G} (STS default: AWS_REGION, profile region, or us-east-1)`),M},gx=(j,w)=>{let x,E;return async(B,N)=>{if(E=B,!x){let{logger:k=j?.parentClientConfig?.logger,profile:I=j?.parentClientConfig?.profile,region:U,requestHandler:L=j?.parentClientConfig?.requestHandler,credentialProviderLogger:V,userAgentAppId:J=j?.parentClientConfig?.userAgentAppId}=j,s=await Nw(U,j?.parentClientConfig?.region,V,{logger:k,profile:I}),e=!Qw(L);x=new w({...j,userAgentAppId:J,profile:I,credentialDefaultProvider:()=>async()=>E,region:s,requestHandler:e?L:void 0,logger:k})}let{Credentials:G,AssumedRoleUser:M}=await x.send(new i(N));if(!G||!G.AccessKeyId||!G.SecretAccessKey)throw Error(`Invalid response from STS.assumeRole call with role ${N.RoleArn}`);let z=Kw(M),D={accessKeyId:G.AccessKeyId,secretAccessKey:G.SecretAccessKey,sessionToken:G.SessionToken,expiration:G.Expiration,...G.CredentialScope&&{credentialScope:G.CredentialScope},...z&&{accountId:z}};return Y.setCredentialFeature(D,"CREDENTIALS_STS_ASSUME_ROLE","i"),D}},ax=(j,w)=>{let x;return async(E)=>{if(!x){let{logger:z=j?.parentClientConfig?.logger,profile:D=j?.parentClientConfig?.profile,region:k,requestHandler:I=j?.parentClientConfig?.requestHandler,credentialProviderLogger:U,userAgentAppId:L=j?.parentClientConfig?.userAgentAppId}=j,V=await Nw(k,j?.parentClientConfig?.region,U,{logger:z,profile:D}),J=!Qw(I);x=new w({...j,userAgentAppId:L,profile:D,region:V,requestHandler:J?I:void 0,logger:z})}let{Credentials:B,AssumedRoleUser:N}=await x.send(new t(E));if(!B||!B.AccessKeyId||!B.SecretAccessKey)throw Error(`Invalid response from STS.assumeRoleWithWebIdentity call with role ${E.RoleArn}`);let G=Kw(N),M={accessKeyId:B.AccessKeyId,secretAccessKey:B.SecretAccessKey,sessionToken:B.SessionToken,expiration:B.Expiration,...B.CredentialScope&&{credentialScope:B.CredentialScope},...G&&{accountId:G}};if(G)Y.setCredentialFeature(M,"RESOLVED_ACCOUNT_ID","T");return Y.setCredentialFeature(M,"CREDENTIALS_STS_ASSUME_ROLE_WEB_ID","k"),M}},Qw=(j)=>{return j?.metadata?.handlerProtocol==="h2"},Xw=(j,w)=>{if(!w)return j;else return class extends j{constructor(E){super(E);for(let B of w)this.middlewareStack.use(B)}}},Yw=(j={},w)=>gx(j,Xw(u,w)),Zw=(j={},w)=>ax(j,Xw(u,w)),rx=(j)=>(w)=>j({roleAssumer:Yw(w),roleAssumerWithWebIdentity:Zw(w),...w});var{Command:ox,Client:nx}=Z,ix=Fw,tx=i,sx=tj,ex=sj,jB=Gw,wB=t,xB=ej,BB=jw,EB=Xj,FB=Yj,GB=p,KB=pj,NB=n,QB=lj,XB=r,YB=gj,ZB=o,$B=aj,MB=l,DB=rj,yB=g,LB=oj,zB=ww,kB=xw,UB=a,JB=nj,HB=Zj,bB=u,PB=y,IB=dj,hB=Bw,fB=rx,_B=ij,WB=Yw,AB=Zw;export{AB as getDefaultRoleAssumerWithWebIdentity,WB as getDefaultRoleAssumer,_B as errorTypeRegistries,fB as decorateDefaultCredentialProvider,nx as __Client,hB as Tag$,IB as STSServiceException$,PB as STSServiceException,bB as STSClient,HB as STS,JB as RegionDisabledException$,UB as RegionDisabledException,kB as ProvidedContext$,zB as PolicyDescriptorType$,LB as PackedPolicyTooLargeException$,yB as PackedPolicyTooLargeException,DB as MalformedPolicyDocumentException$,MB as MalformedPolicyDocumentException,$B as InvalidIdentityTokenException$,ZB as InvalidIdentityTokenException,YB as IDPRejectedClaimException$,XB as IDPRejectedClaimException,QB as IDPCommunicationErrorException$,NB as IDPCommunicationErrorException,KB as ExpiredTokenException$,GB as ExpiredTokenException,FB as Credentials$,EB as AssumedRoleUser$,BB as AssumeRoleWithWebIdentityResponse$,xB as AssumeRoleWithWebIdentityRequest$,wB as AssumeRoleWithWebIdentityCommand,jB as AssumeRoleWithWebIdentity$,ex as AssumeRoleResponse$,sx as AssumeRoleRequest$,tx as AssumeRoleCommand,ix as AssumeRole$,ox as $Command};export default {get getDefaultRoleAssumerWithWebIdentity(){return AB},get getDefaultRoleAssumer(){return WB},get errorTypeRegistries(){return _B},get decorateDefaultCredentialProvider(){return fB},get __Client(){return nx},get Tag$(){return hB},get STSServiceException$(){return IB},get STSServiceException(){return PB},get STSClient(){return bB},get STS(){return HB},get RegionDisabledException$(){return JB},get RegionDisabledException(){return UB},get ProvidedContext$(){return kB},get PolicyDescriptorType$(){return zB},get PackedPolicyTooLargeException$(){return LB},get PackedPolicyTooLargeException(){return yB},get MalformedPolicyDocumentException$(){return DB},get MalformedPolicyDocumentException(){return MB},get InvalidIdentityTokenException$(){return $B},get InvalidIdentityTokenException(){return ZB},get IDPRejectedClaimException$(){return YB},get IDPRejectedClaimException(){return XB},get IDPCommunicationErrorException$(){return QB},get IDPCommunicationErrorException(){return NB},get ExpiredTokenException$(){return KB},get ExpiredTokenException(){return GB},get Credentials$(){return FB},get AssumedRoleUser$(){return EB},get AssumeRoleWithWebIdentityResponse$(){return BB},get AssumeRoleWithWebIdentityRequest$(){return xB},get AssumeRoleWithWebIdentityCommand(){return wB},get AssumeRoleWithWebIdentity$(){return jB},get AssumeRoleResponse$(){return ex},get AssumeRoleRequest$(){return sx},get AssumeRoleCommand(){return tx},get AssumeRole$(){return ix},get $Command(){return ox}};
@@ -0,0 +1,3 @@
1
+ // @bun
2
+ import{M as o}from"./chunk-vftqwdpg.js";import{N as i}from"./chunk-qpzspr9z.js";import{Cd as p}from"./chunk-w8d9srv7.js";import{Pd as n}from"./chunk-9xvctnjr.js";import{Sf as B}from"./chunk-9s4whpg1.js";import{Zf as l}from"./chunk-s2xdf6qh.js";import"./chunk-m0xsvzyd.js";import"./chunk-ws3p9cya.js";import"./chunk-qq2rcxv2.js";import"./chunk-ebabnv33.js";import"./chunk-nfg7nt13.js";import"./chunk-yj6rbe9p.js";import"./chunk-m6zxr0j8.js";import{Xg as g}from"./chunk-sv1s1qxd.js";import{Jh as d}from"./chunk-n7d9eemn.js";import"./chunk-pxx2hz0g.js";import"./chunk-rexdr63q.js";import"./chunk-kqhh2pm9.js";import"./chunk-7fawtcnn.js";import"./chunk-mdzzcrf9.js";import"./chunk-wev34grp.js";import{gl as f}from"./chunk-rtdym35y.js";import"./chunk-5myxjxae.js";import"./chunk-sp8ek94w.js";import"./chunk-gnt982jr.js";import"./chunk-1bx2sjn6.js";import"./chunk-17pxm5d3.js";import"./chunk-n38h109k.js";import"./chunk-25bp7pcm.js";import"./chunk-qdcf1ay5.js";import"./chunk-45mjcxqk.js";import"./chunk-qqne79vp.js";import"./chunk-64s7vfj7.js";import{Op as D}from"./chunk-xjhezxft.js";import"./chunk-gwfx7tx7.js";import"./chunk-1wpjmwnh.js";import"./chunk-cqtkxwd8.js";import"./chunk-ymtcm4xd.js";import"./chunk-yykjvt7f.js";import"./chunk-3mepk08v.js";import"./chunk-atpzz901.js";import"./chunk-0g25z230.js";import"./chunk-w9pdvcf9.js";import"./chunk-4gs87ghj.js";import"./chunk-kb6v5hhm.js";import"./chunk-qyjt0qnq.js";import"./chunk-xdjwapwy.js";import{qt as I}from"./chunk-cxtxvt43.js";import"./chunk-871f8x99.js";import"./chunk-cx7p4ezk.js";import"./chunk-tgd5ctnt.js";import"./chunk-p8kpqyxb.js";import"./chunk-3sz6gw10.js";import"./chunk-twhavv1m.js";import"./chunk-v0yxkq99.js";import"./chunk-2pzvcpv4.js";import{Bu as u,Ku as x}from"./chunk-kmtfdky8.js";import{Vu as y}from"./chunk-vc4e6xc4.js";import"./chunk-hnz570f9.js";import"./chunk-tdmn21z0.js";import"./chunk-s8mghr5a.js";import"./chunk-pqnbdygz.js";import"./chunk-ydc6ypjt.js";import"./chunk-ev3a2sxv.js";import"./chunk-pnq1h5az.js";import"./chunk-4sazy0nq.js";import Q from"path";import{pathToFileURL as a}from"url";import{EOL as O}from"os";function $(j){let K=j.state;return{input:K.input,metadata:"metadata"in K?K.metadata:{},part:j}}function C(j){let K=j.description?B.Style.TEXT_DIM+` ${j.description}`+B.Style.TEXT_NORMAL:"";B.println(B.Style.TEXT_NORMAL+j.icon,B.Style.TEXT_NORMAL+j.title+K)}function b(j,K){if(B.empty(),C(j),!K?.trim())return;B.println(K),B.empty()}function c(j){let K=j.state,V="input"in K?K.input:void 0,Y=("title"in K&&K.title?K.title:void 0)||(V&&typeof V==="object"&&Object.keys(V).length>0?JSON.stringify(V):"Unknown");C({icon:"\u2699",title:`${j.tool} ${Y}`})}function t(j){let K=j.path??"",V=`${j.kind} "${j.pattern}"`,Y=K?`in ${T(K)}`:"",H=j.count===void 0?Y:`${Y}${Y?" \xB7 ":""}${j.count} ${j.count===1?"match":"matches"}`;C({icon:"\u2731",title:V,...H&&{description:H}})}function r(j){t({kind:"Glob",pattern:j.input.pattern,path:j.input.path,count:j.metadata.count})}function jj(j){t({kind:"Grep",pattern:j.input.pattern,path:j.input.path,count:j.metadata.matches})}function Bj(j){let K=T(j.input.filePath),V=Object.entries(j.input).filter(([H,S])=>{if(H==="filePath")return!1;return typeof S==="string"||typeof S==="number"||typeof S==="boolean"}),Y=V.length?`[${V.map(([H,S])=>`${H}=${S}`).join(", ")}]`:void 0;C({icon:"\u2192",title:`Read ${K}`,...Y&&{description:Y}})}function Gj(j){b({icon:"\u2190",title:`Write ${T(j.input.filePath)}`},j.part.state.status==="completed"?j.part.state.output:void 0)}function Jj(j){C({icon:"%",title:`WebFetch ${j.input.url}`})}function Kj(j){let K=T(j.input.filePath),V=j.metadata.diff;b({icon:"\u2190",title:`Edit ${K}`},V)}function Mj(j){C({icon:"\u25C7",title:`Exa Code Search "${j.input.query}"`})}function Nj(j){C({icon:"\u25C8",title:`Web Search "${j.input.query}"`})}function k(j){let K=j.part.state.input?.operation??j.part.state.input,V=j.part.state.status,Y=typeof K?.subagent_type==="string"&&K.subagent_type.trim().length>0?K.subagent_type:"unknown",H=I.titlecase(Y),S=typeof K?.description==="string"&&K.description.trim().length>0?K.description:void 0,w=V==="error"?"\u2717":V==="running"?"\u2022":"\u2713",L=S??`${H} Task`;C({icon:w,title:L,description:S?`${H} Agent`:void 0})}function Vj(j){C({icon:"\u2192",title:`Skill "${j.input.name}"`})}function Xj(j){let K=j.part.state.status==="completed"?j.part.state.output?.trim():void 0;b({icon:"$",title:`${j.input.command}`},K)}function T(j){if(!j)return"";if(Q.isAbsolute(j))return Q.relative(process.cwd(),j)||".";return j}var Tj=n({command:"run [message..]",describe:"run qitqode with a message",builder:(j)=>{return j.positional("message",{describe:"message to send",type:"string",array:!0,default:[]}).option("command",{describe:"the command to run, use message for args",type:"string"}).option("continue",{alias:["c"],describe:"continue the last session",type:"boolean"}).option("session",{alias:["s"],describe:"session id to continue",type:"string"}).option("fork",{describe:"fork the session before continuing (requires --continue or --session)",type:"boolean"}).option("share",{type:"boolean",describe:"share the session"}).option("model",{type:"string",alias:["m"],describe:"model to use in the format of provider/model"}).option("agent",{type:"string",describe:"agent to use"}).option("format",{type:"string",choices:["default","json"],default:"default",describe:"format: default (formatted) or json (raw JSON events)"}).option("file",{alias:["f"],type:"string",array:!0,describe:"file(s) to attach to message"}).option("title",{type:"string",describe:"title for the session (uses truncated prompt if no value provided)"}).option("attach",{type:"string",describe:"attach to a running qitqode server (e.g., http://localhost:4096)"}).option("password",{alias:["p"],type:"string",describe:"basic auth password (defaults to QITQODE_SERVER_PASSWORD)"}).option("dir",{type:"string",describe:"directory to run in, path on remote server if attaching"}).option("port",{type:"number",describe:"port for the local server (defaults to random port if no value provided)"}).option("variant",{type:"string",describe:"model variant (provider-specific reasoning effort, e.g., high, max, minimal)"}).option("thinking",{type:"boolean",describe:"show thinking blocks",default:!1}).option("dangerously-skip-permissions",{type:"boolean",describe:"auto-approve permissions that are not explicitly denied (dangerous!)",default:!1})},handler:async(j)=>{let K=[...j.message,...j["--"]||[]].join(" "),V=(()=>{if(!j.dir)return;if(j.attach)return j.dir;try{return process.chdir(j.dir),process.cwd()}catch{B.error("Failed to change directory to "+j.dir),process.exit(1)}})(),Y=[];if(j.file){let M=Array.isArray(j.file)?j.file:[j.file];for(let X of M){let N=Q.resolve(process.cwd(),X);if(!await y.exists(N))B.error(`File not found: ${X}`),process.exit(1);let W=await y.isDir(N)?"application/x-directory":"text/plain";Y.push({type:"file",url:a(N).href,filename:Q.basename(N),mime:W})}}if(!process.stdin.isTTY)K+=`
3
+ `+await Bun.stdin.text();if(K.trim().length===0&&!j.command)B.error("You must provide a message or a command"),process.exit(1);if(j.fork&&!j.continue&&!j.session)B.error("--fork requires --continue or --session"),process.exit(1);let H=[{permission:"question",action:"deny",pattern:"*"},{permission:"plan_enter",action:"deny",pattern:"*"},{permission:"plan_exit",action:"deny",pattern:"*"}];function S(){if(j.title===void 0)return;if(j.title!=="")return j.title;return K.slice(0,50)+(K.length>50?"...":"")}async function w(M){let X=j.continue?(await M.session.list()).data?.find((Z)=>!Z.parentID)?.id:j.session;if(X&&j.fork)return(await M.session.fork({sessionID:X})).data?.id;if(X)return X;let N=S();return(await M.session.create({title:N,permission:H})).data?.id}async function L(M,X){let N=await M.config.get();if(!N.data)return;if(N.data.share!=="auto"&&!u.QITQODE_AUTO_SHARE&&!j.share)return;let W=await M.session.share({sessionID:X}).catch((Z)=>{if(Z instanceof Error&&Z.message.includes("disabled"))B.println(B.Style.TEXT_DANGER_BOLD+"! "+Z.message);return{error:Z}});if(!W.error&&"data"in W&&W.data?.share?.url)B.println(B.Style.TEXT_INFO_BOLD+"~ "+W.data.share.url)}async function h(M){function X(G){try{if(G.tool==="bash")return Xj($(G));if(G.tool==="glob")return r($(G));if(G.tool==="grep")return jj($(G));if(G.tool==="read")return Bj($(G));if(G.tool==="write")return Gj($(G));if(G.tool==="webfetch")return Jj($(G));if(G.tool==="edit")return Kj($(G));if(G.tool==="codesearch")return Mj($(G));if(G.tool==="websearch")return Nj($(G));if(G.tool==="actor")return k($(G));if(G.tool==="skill")return Vj($(G));return c(G)}catch{return c(G)}}function N(G,q){if(j.format==="json")return process.stdout.write(JSON.stringify({type:G,timestamp:Date.now(),sessionID:A,...q})+O),!0;return!1}let W=await M.event.subscribe(),Z;async function e(G){let q=new Map,z=x.create({service:"cli.run"}),E=W.stream[Symbol.asyncIterator](),F=G.completion.then(()=>"DONE");try{while(!0){let P=await Promise.race([E.next(),F]);if(P==="DONE")break;if(P.done)break;let _=P.value;if(G.onEvent(_),z.debug("event received",{type:_.type}),_.type==="message.updated"&&_.properties.info.role==="assistant"&&j.format!=="json"&&q.get("start")!==!0)B.empty(),B.println(`> ${_.properties.info.agent} \xB7 ${_.properties.info.modelID}`),B.empty(),q.set("start",!0);if(_.type==="message.part.updated"){let J=_.properties.part;if(J.sessionID!==A)continue;if(J.type==="tool"&&(J.state.status==="completed"||J.state.status==="error")){if(N("tool_use",{part:J}))continue;if(J.state.status==="completed"){X(J);continue}C({icon:"\u2717",title:`${J.tool} failed`}),B.error(J.state.error)}if(J.type==="tool"&&J.tool==="actor"&&J.state.status==="running"&&j.format!=="json"){if(q.get(J.id)===!0)continue;k($(J)),q.set(J.id,!0)}if(J.type==="step-start"){if(N("step_start",{part:J}))continue}if(J.type==="step-finish"){if(N("step_finish",{part:J}))continue}if(J.type==="text"&&J.time?.end){if(N("text",{part:J}))continue;let R=J.text.trim();if(!R)continue;if(!process.stdout.isTTY){process.stdout.write(R+O);continue}B.empty(),B.println(R),B.empty()}if(J.type==="reasoning"&&J.time?.end&&j.thinking){if(N("reasoning",{part:J}))continue;let R=J.text.trim();if(!R)continue;let U=`Thinking: ${R}`;if(process.stdout.isTTY){B.empty(),B.println(`${B.Style.TEXT_DIM}\x1B[3m${U}\x1B[0m${B.Style.TEXT_NORMAL}`),B.empty();continue}process.stdout.write(U+O)}}if(_.type==="session.error"){let J=_.properties;if(J.sessionID!==A||!J.error)continue;let R=String(J.error.name);if("data"in J.error&&J.error.data&&"message"in J.error.data)R=String(J.error.data.message);if(Z=Z?Z+O+R:R,N("error",{error:J.error}))continue;B.error(R)}if(_.type==="permission.asked"){let J=_.properties;if(J.sessionID!==A)continue;if(j["dangerously-skip-permissions"])await M.permission.reply({requestID:J.id,reply:"once"});else B.println(B.Style.TEXT_WARNING_BOLD+"!",B.Style.TEXT_NORMAL+`permission requested: ${J.permission} (${J.patterns.join(", ")}); auto-rejecting`),await M.permission.reply({requestID:J.id,reply:"reject"})}}}finally{G.stop(),await E.return?.(void 0).catch(()=>{})}}let v=await(async()=>{if(!j.agent)return;let G=j.agent;if(j.attach){let z=await M.app.agents(void 0,{throwOnError:!0}).then((F)=>F.data??[]).catch(()=>{return});if(!z){B.println(B.Style.TEXT_WARNING_BOLD+"!",B.Style.TEXT_NORMAL,`failed to list agents from ${j.attach}. Falling back to default agent`);return}let E=z.find((F)=>F.name===G);if(!E){B.println(B.Style.TEXT_WARNING_BOLD+"!",B.Style.TEXT_NORMAL,`agent "${G}" not found. Falling back to default agent`);return}if(E.mode==="subagent"){B.println(B.Style.TEXT_WARNING_BOLD+"!",B.Style.TEXT_NORMAL,`agent "${G}" is a subagent, not a primary agent. Falling back to default agent`);return}return G}let q=await g.runPromise(d.Service.use((z)=>z.get(G)));if(!q){B.println(B.Style.TEXT_WARNING_BOLD+"!",B.Style.TEXT_NORMAL,`agent "${G}" not found. Falling back to default agent`);return}if(q.mode==="subagent"){B.println(B.Style.TEXT_WARNING_BOLD+"!",B.Style.TEXT_NORMAL,`agent "${G}" is a subagent, not a primary agent. Falling back to default agent`);return}return G})(),A=await w(M);if(!A)B.error("Session not found"),process.exit(1);await L(M,A);let s=x.create({service:"cli.run.poll"}),m=o({sessionID:A,query:async()=>{try{return(await M.session.status()).data?.[A]}catch(G){throw s.debug("session.status query failed",{error:G}),G}}});if(e(m).catch((G)=>{console.error(G),process.exit(1)}),j.command)await M.session.command({sessionID:A,agent:v,model:j.model,command:j.command,arguments:K,variant:j.variant});else{let G=j.model?f.parseModel(j.model):void 0;await M.session.prompt({sessionID:A,agent:v,model:G,variant:j.variant,parts:[...Y,{type:"text",text:K}]})}m.markStarted()}if(j.attach){let M=i({password:j.password}),X=D({baseUrl:j.attach,directory:V,headers:M});return await h(X)}await p(process.cwd(),async()=>{let X=D({baseUrl:"http://qitqode.internal",fetch:async(N,W)=>{let Z=new Request(N,W);return l.Default().app.fetch(Z)}});await h(X)})}});export{Tj as RunCommand};
@@ -0,0 +1,2 @@
1
+ // @bun
2
+ import{Pr as a}from"./chunk-yykjvt7f.js";import"./chunk-4sazy0nq.js";export default a();
@@ -1,3 +1,3 @@
1
1
  // @bun
2
- import{st as X}from"./chunk-tns5x4w0.js";function D(j){return j.parserConfiguration({"populate--":!0}).scriptName("qitqode").wrap(100).help("help","show help").alias("help","h").version("version","show version number",X).alias("version","v").option("print-logs",{describe:"print logs to stderr",type:"boolean"}).option("log-level",{describe:"log level",type:"string",choices:["DEBUG","INFO","WARN","ERROR"]}).option("pure",{describe:"run without external plugins",type:"boolean"})}var H={port:{type:"number",describe:"port to listen on",default:0},hostname:{type:"string",describe:"hostname to listen on",default:"127.0.0.1"},mdns:{type:"boolean",describe:"enable mDNS service discovery (defaults hostname to 0.0.0.0)",default:!1},"mdns-domain":{type:"string",describe:"custom domain name for mDNS service (default: qitqode.local)",default:"qitqode.local"},cors:{type:"string",array:!0,describe:"additional domains to allow for CORS",default:[]},"no-auth":{type:"boolean",describe:"allow starting without authentication on non-loopback addresses (DANGEROUS)",default:!1}};function u(j){return j.options(H)}function F(j,z=process.argv){return z.some((B)=>B===j||B.startsWith(`${j}=`))}function P(j,z=process.argv){return F("--port",z)||F("--hostname",z)||F("--mdns",z)||!!j.mdns||j.port!==0||j.hostname!=="127.0.0.1"}function _(j,z,B=process.argv){let J=F("--port",B),Z=F("--hostname",B),$=F("--mdns",B),q=F("--mdns-domain",B),K=$?j.mdns:z?.server?.mdns??j.mdns,M=q?j["mdns-domain"]:z?.server?.mdnsDomain??j["mdns-domain"],N=J?j.port:z?.server?.port??j.port,U=Z?j.hostname:K&&!z?.server?.hostname?"0.0.0.0":z?.server?.hostname??j.hostname,V=z?.server?.cors??[],Y=Array.isArray(j.cors)?j.cors:j.cors?[j.cors]:[],b=[...V,...Y],A=j["no-auth"];return{hostname:U,port:N,mdns:K,mdnsDomain:M,cors:b,noAuth:A}}var k={model:{type:"string",alias:["m"],describe:"model to use in the format of provider/model"},continue:{alias:["c"],describe:"continue the last session",type:"boolean"},session:{alias:["s"],type:"string",describe:"session id to continue"},fork:{type:"boolean",describe:"fork the session when continuing (use with --continue or --session)"},prompt:{type:"string",describe:"prompt to use"},agent:{type:"string",describe:"agent to use"},dark:{type:"boolean",describe:"start in dark theme (overrides saved theme preference for this launch)"},light:{type:"boolean",describe:"start in light theme (overrides saved theme preference for this launch)"},monochrome:{type:"boolean",describe:"start in monochrome accessible rendering \u2014 no color, plain terminal, screen-reader friendly"},headless:{type:"boolean",describe:"headless permissionless mode for AI subagent use \u2014 auto-approves all tool permissions, implies --never-ask"},fullauto:{type:"boolean",describe:"full-auto mode for the interactive TUI \u2014 never asks: starts in build mode, auto-decides questions and auto-approves every tool permission that is not explicitly denied by your config (dangerous!)"},"api-key":{type:"string",describe:"Qortex API key for non-interactive authentication in headless mode (can also be set via $QLEX_API_KEY)"},sso:{type:"boolean",describe:"sign in via SSO device-code flow before starting a headless session \u2014 prints a URL and code, waits for browser approval (requires --headless)"},free:{type:"boolean",describe:"start in Free tier (no cost) \u2014 shorthand for the Free model tier"},default:{type:"boolean",describe:"start in Default tier \u2014 shorthand for the Default model tier"},fast:{type:"boolean",describe:"start in Fast tier \u2014 shorthand for the Fast model tier"},economy:{type:"boolean",describe:"start in Economy tier \u2014 shorthand for the Economy model tier"},power:{type:"boolean",describe:"start in Power tier \u2014 shorthand for the Power model tier"},orchestrated:{type:"boolean",describe:"start in Orchestrated tier \u2014 shorthand for the Orchestrated model tier"}},L=36,W="\x1B[38;5;214m",I="\x1B[0;2m",Q="\x1B[0m";function G(j,z){let B=Math.round(j/100*L),J=`${"\u25A0".repeat(B)}${"\uFF65".repeat(L-B)}`;return`\r${W}${J} ${j.toString().padStart(3)}%${Q} ${I}${z}${Q}`}
3
- export{D as Mf,H as Nf,u as Of,P as Pf,_ as Qf,k as Rf,G as Sf};
2
+ import{Rt as X}from"./chunk-v0yxkq99.js";function D(j){return j.parserConfiguration({"populate--":!0}).scriptName("qitqode").wrap(100).help("help","show help").alias("help","h").version("version","show version number",X).alias("version","v").option("print-logs",{describe:"print logs to stderr",type:"boolean"}).option("log-level",{describe:"log level",type:"string",choices:["DEBUG","INFO","WARN","ERROR"]}).option("pure",{describe:"run without external plugins",type:"boolean"})}var H={port:{type:"number",describe:"port to listen on",default:0},hostname:{type:"string",describe:"hostname to listen on",default:"127.0.0.1"},mdns:{type:"boolean",describe:"enable mDNS service discovery (defaults hostname to 0.0.0.0)",default:!1},"mdns-domain":{type:"string",describe:"custom domain name for mDNS service (default: qitqode.local)",default:"qitqode.local"},cors:{type:"string",array:!0,describe:"additional domains to allow for CORS",default:[]},"no-auth":{type:"boolean",describe:"allow starting without authentication on non-loopback addresses (DANGEROUS)",default:!1}};function u(j){return j.options(H)}function F(j,z=process.argv){return z.some((B)=>B===j||B.startsWith(`${j}=`))}function P(j,z=process.argv){return F("--port",z)||F("--hostname",z)||F("--mdns",z)||!!j.mdns||j.port!==0||j.hostname!=="127.0.0.1"}function _(j,z,B=process.argv){let J=F("--port",B),Z=F("--hostname",B),$=F("--mdns",B),q=F("--mdns-domain",B),K=$?j.mdns:z?.server?.mdns??j.mdns,M=q?j["mdns-domain"]:z?.server?.mdnsDomain??j["mdns-domain"],N=J?j.port:z?.server?.port??j.port,U=Z?j.hostname:K&&!z?.server?.hostname?"0.0.0.0":z?.server?.hostname??j.hostname,V=z?.server?.cors??[],Y=Array.isArray(j.cors)?j.cors:j.cors?[j.cors]:[],b=[...V,...Y],A=j["no-auth"];return{hostname:U,port:N,mdns:K,mdnsDomain:M,cors:b,noAuth:A}}var k={model:{type:"string",alias:["m"],describe:"model to use in the format of provider/model"},continue:{alias:["c"],describe:"continue the last session",type:"boolean"},session:{alias:["s"],type:"string",describe:"session id to continue"},fork:{type:"boolean",describe:"fork the session when continuing (use with --continue or --session)"},prompt:{type:"string",describe:"prompt to use"},agent:{type:"string",describe:"agent to use"},dark:{type:"boolean",describe:"start in dark theme (overrides saved theme preference for this launch)"},light:{type:"boolean",describe:"start in light theme (overrides saved theme preference for this launch)"},monochrome:{type:"boolean",describe:"start in monochrome accessible rendering \u2014 no color, plain terminal, screen-reader friendly"},headless:{type:"boolean",describe:"headless permissionless mode for AI subagent use \u2014 auto-approves all tool permissions, implies --never-ask"},fullauto:{type:"boolean",describe:"full-auto mode for the interactive TUI \u2014 never asks: starts in build mode, auto-decides questions and auto-approves every tool permission that is not explicitly denied by your config (dangerous!)"},"api-key":{type:"string",describe:"Qortex API key for non-interactive authentication in headless mode (can also be set via $QLEX_API_KEY)"},sso:{type:"boolean",describe:"sign in via SSO device-code flow before starting a headless session \u2014 prints a URL and code, waits for browser approval (requires --headless)"},free:{type:"boolean",describe:"start in Free tier (no cost) \u2014 shorthand for the Free model tier"},default:{type:"boolean",describe:"start in Default tier \u2014 shorthand for the Default model tier"},fast:{type:"boolean",describe:"start in Fast tier \u2014 shorthand for the Fast model tier"},economy:{type:"boolean",describe:"start in Economy tier \u2014 shorthand for the Economy model tier"},power:{type:"boolean",describe:"start in Power tier \u2014 shorthand for the Power model tier"},orchestrated:{type:"boolean",describe:"start in Orchestrated tier \u2014 shorthand for the Orchestrated model tier"}},L=36,W="\x1B[38;5;214m",I="\x1B[0;2m",Q="\x1B[0m";function G(j,z){let B=Math.round(j/100*L),J=`${"\u25A0".repeat(B)}${"\uFF65".repeat(L-B)}`;return`\r${W}${J} ${j.toString().padStart(3)}%${Q} ${I}${z}${Q}`}
3
+ export{D as Jf,H as Kf,u as Lf,P as Mf,_ as Nf,k as Of,G as Pf};
@@ -1,2 +1,2 @@
1
1
  // @bun
2
- import{ZP as q}from"./chunk-ee23d2nz.js";import{$P as k}from"./chunk-3k2b05fv.js";var z=k((b)=>{Object.defineProperty(b,"__esModule",{value:!0});b.getMachineId=void 0;var v=q();async function w(){v.diag.debug("could not read machine-id: unsupported platform");return}b.getMachineId=w});export default z();
2
+ import{fQ as q}from"./chunk-pnq1h5az.js";import{hQ as k}from"./chunk-4sazy0nq.js";var z=k((b)=>{Object.defineProperty(b,"__esModule",{value:!0});b.getMachineId=void 0;var v=q();async function w(){v.diag.debug("could not read machine-id: unsupported platform");return}b.getMachineId=w});export default z();
@@ -1,2 +1,2 @@
1
1
  // @bun
2
- import{$q as v,Eq as a,Jq as o,Kq as GG,Nq as JG,Rq as NG,Uq as QG,Zq as g,ar as k,gr as b,hr as R,ir as XG,jr as I,nr as d,oq as V,qq as l,uq as e,vq as t}from"./chunk-z8gdmvgg.js";import{Cr as O,pr as f,vr as C,zr as m}from"./chunk-kwx9ewe0.js";import"./chunk-cqtkxwd8.js";import"./chunk-c5pb87yf.js";import{pv as G}from"./chunk-gmzrvxnv.js";import"./chunk-mpygdb5a.js";import"./chunk-3k2b05fv.js";function c(J){var Q,$,K,j,z,q;if(J==null)return{inputTokens:{total:void 0,noCache:void 0,cacheRead:void 0,cacheWrite:void 0},outputTokens:{total:void 0,text:void 0,reasoning:void 0},raw:void 0};let A=(Q=J.prompt_tokens)!=null?Q:0,Z=($=J.completion_tokens)!=null?$:0,N=(j=(K=J.prompt_tokens_details)==null?void 0:K.cached_tokens)!=null?j:0,X=(q=(z=J.completion_tokens_details)==null?void 0:z.reasoning_tokens)!=null?q:0;return{inputTokens:{total:A,noCache:A-N,cacheRead:N,cacheWrite:void 0},outputTokens:{total:Z,text:Z-X,reasoning:X},raw:J}}function _(J){switch(J){case"stop":return"stop";case"length":return"length";case"content_filter":return"content-filter";case"function_call":case"tool_calls":return"tool-calls";default:return"other"}}function u({id:J,model:Q,created:$}){return{id:J!=null?J:void 0,modelId:Q!=null?Q:void 0,timestamp:$!=null?new Date($*1000):void 0}}function i({tools:J,toolChoice:Q}){J=(J==null?void 0:J.length)?J:void 0;let $=[];if(J==null)return{tools:void 0,toolChoice:void 0,toolWarnings:$};let K=[];for(let z of J)if(z.type==="provider")$.push({type:"unsupported",feature:`provider-defined tool ${z.id}`});else K.push({type:"function",function:{name:z.name,description:z.description,parameters:z.inputSchema,...z.strict!=null?{strict:z.strict}:{}}});if(Q==null)return{tools:K,toolChoice:void 0,toolWarnings:$};let j=Q.type;switch(j){case"auto":case"none":case"required":return{tools:K,toolChoice:j,toolWarnings:$};case"tool":return{tools:K,toolChoice:{type:"function",function:{name:Q.toolName}},toolWarnings:$};default:throw new O({functionality:`tool choice type: ${j}`})}}var $G=G.object({enableThinking:G.boolean().optional(),thinkingBudget:G.number().positive().optional(),parallelToolCalls:G.boolean().optional()});function p(J){var Q,$,K,j;let z=c(J),q=($=(Q=J==null?void 0:J.prompt_tokens_details)==null?void 0:Q.cache_creation_input_tokens)!=null?$:0,A=((K=z.inputTokens.total)!=null?K:0)-((j=z.inputTokens.cacheRead)!=null?j:0)-q;return{...z,inputTokens:{...z.inputTokens,cacheWrite:q,noCache:A}}}function zG({data:J,mediaType:Q}){return J instanceof URL?J.toString():`data:${Q};base64,${t(J)}`}function BG({prompt:J,cacheControlValidator:Q}){var $,K;let j=[];for(let{role:z,content:q,...A}of J){let Z=Q==null?void 0:Q.getCacheControl(A.providerOptions);switch(z){case"system":{if(Z)j.push({role:"system",content:[{type:"text",text:q,cache_control:Z}]});else j.push({role:"system",content:q});break}case"user":{j.push({role:"user",content:q.map((N,X)=>{var E;let L=X===q.length-1,B=(E=Q==null?void 0:Q.getCacheControl(N.providerOptions))!=null?E:L?Z:void 0;switch(N.type){case"text":return{type:"text",text:N.text,...B?{cache_control:B}:{}};case"file":if(N.mediaType.startsWith("image/")){let U=N.mediaType==="image/*"?"image/jpeg":N.mediaType;return{type:"image_url",image_url:{url:zG({data:N.data,mediaType:U})},...B?{cache_control:B}:{}}}else throw new O({functionality:"Only image file parts are supported"})}})});break}case"assistant":{let N="",X=[];for(let E of q)switch(E.type){case"text":{N+=E.text;break}case"tool-call":{X.push({id:E.toolCallId,type:"function",function:{name:E.toolName,arguments:JSON.stringify(E.input)}});break}case"reasoning":{N+=E.text;break}}j.push({role:"assistant",content:Z?[{type:"text",text:N,cache_control:Z}]:N||null,tool_calls:X.length>0?X:void 0});break}case"tool":{let N=q.filter((X)=>X.type!=="tool-approval-response");for(let X=0;X<N.length;X++){let E=N[X],L=E.output,B=X===N.length-1,U=($=Q==null?void 0:Q.getCacheControl(E.providerOptions))!=null?$:B?Z:void 0,Y;switch(L.type){case"text":case"error-text":Y=L.value;break;case"execution-denied":Y=(K=L.reason)!=null?K:"Tool execution denied.";break;case"content":case"json":case"error-json":Y=JSON.stringify(L.value);break}j.push({role:"tool",tool_call_id:E.toolCallId,content:U?[{type:"text",text:Y,cache_control:U}]:Y})}break}default:throw Error(`Unsupported role: ${z}`)}}return j}var r=4;function EG(J){var Q;let $=J==null?void 0:J.alibaba;return(Q=$==null?void 0:$.cacheControl)!=null?Q:$==null?void 0:$.cache_control}var jG=class{constructor(){this.breakpointCount=0,this.warnings=[]}getCacheControl(J){let Q=EG(J);if(!Q)return;if(this.breakpointCount++,this.breakpointCount>r)this.warnings.push({type:"other",message:`Max breakpoint limit exceeded. Only the last ${r} cache markers will take effect.`});return Q}getWarnings(){return this.warnings}},KG=class{constructor(J,Q){this.specificationVersion="v3",this.supportedUrls={"image/*":[/^https?:\/\/.*$/]},this.modelId=J,this.config=Q}get provider(){return this.config.provider}async getArgs({prompt:J,maxOutputTokens:Q,temperature:$,topP:K,topK:j,frequencyPenalty:z,presencePenalty:q,stopSequences:A,responseFormat:Z,seed:N,providerOptions:X,tools:E,toolChoice:L}){var B;let U=[],Y=new jG,P=await v({provider:"alibaba",providerOptions:X,schema:$G});if(z!=null)U.push({type:"unsupported",feature:"frequencyPenalty"});let w={model:this.modelId,max_tokens:Q,temperature:$,top_p:K,top_k:j,presence_penalty:q,stop:A,seed:N,response_format:(Z==null?void 0:Z.type)==="json"?Z.schema!=null?{type:"json_schema",json_schema:{schema:Z.schema,name:(B=Z.name)!=null?B:"response",description:Z.description}}:{type:"json_object"}:void 0,...(P==null?void 0:P.enableThinking)!=null?{enable_thinking:P.enableThinking}:{},...(P==null?void 0:P.thinkingBudget)!=null?{thinking_budget:P.thinkingBudget}:{},messages:BG({prompt:J,cacheControlValidator:Y})},{tools:y,toolChoice:S,toolWarnings:F}=i({tools:E,toolChoice:L});return U.push(...Y.getWarnings()),{args:{...w,tools:y,tool_choice:S,...y!=null&&(P==null?void 0:P.parallelToolCalls)!==void 0?{parallel_tool_calls:P.parallelToolCalls}:{}},warnings:[...U,...F]}}async doGenerate(J){var Q;let{args:$,warnings:K}=await this.getArgs(J),{responseHeaders:j,value:z,rawValue:q}=await k({url:`${this.config.baseURL}/chat/completions`,headers:V(this.config.headers(),J.headers),body:$,failedResponseHandler:s,successfulResponseHandler:I(qG),abortSignal:J.abortSignal,fetch:this.config.fetch}),A=z.choices[0],Z=[],N=A.message.content;if(N!=null&&N.length>0)Z.push({type:"text",text:N});let X=A.message.reasoning_content;if(X!=null&&X.length>0)Z.push({type:"reasoning",text:X});if(A.message.tool_calls!=null)for(let E of A.message.tool_calls)Z.push({type:"tool-call",toolCallId:E.id,toolName:E.function.name,input:E.function.arguments});return{content:Z,finishReason:{unified:_(A.finish_reason),raw:(Q=A.finish_reason)!=null?Q:void 0},usage:p(z.usage),request:{body:JSON.stringify($)},response:{...u(z),headers:j,body:q},warnings:K}}async doStream(J){let{args:Q,warnings:$}=await this.getArgs(J),K={...Q,stream:!0,stream_options:this.config.includeUsage?{include_usage:!0}:void 0},{responseHeaders:j,value:z}=await k({url:`${this.config.baseURL}/chat/completions`,headers:V(this.config.headers(),J.headers),body:K,failedResponseHandler:s,successfulResponseHandler:XG(AG),abortSignal:J.abortSignal,fetch:this.config.fetch}),q={unified:"other",raw:void 0},A=void 0,Z=!0,N=!1,X=null,E=[];return{stream:z.pipeThrough(new TransformStream({start(L){L.enqueue({type:"stream-start",warnings:$})},transform(L,B){var U,Y,P,w;if(J.includeRawChunks)B.enqueue({type:"raw",rawValue:L.rawValue});if(!L.success){B.enqueue({type:"error",error:L.error});return}let y=L.value;if(Z)Z=!1,B.enqueue({type:"response-metadata",...u(y)});if(y.usage!=null)A=y.usage;if(y.choices.length===0)return;let S=y.choices[0],F=S.delta;if(F.reasoning_content!=null&&F.reasoning_content.length>0){if(X==null){if(N)B.enqueue({type:"text-end",id:"0"}),N=!1;X=a(),B.enqueue({type:"reasoning-start",id:X})}B.enqueue({type:"reasoning-delta",id:X,delta:F.reasoning_content})}if(F.content!=null&&F.content.length>0){if(X!=null)B.enqueue({type:"reasoning-end",id:X}),X=null;if(!N)B.enqueue({type:"text-start",id:"0"}),N=!0;B.enqueue({type:"text-delta",id:"0",delta:F.content})}if(F.tool_calls!=null){if(X!=null)B.enqueue({type:"reasoning-end",id:X}),X=null;if(N)B.enqueue({type:"text-end",id:"0"}),N=!1;for(let W of F.tool_calls){let M=(U=W.index)!=null?U:E.length;if(E[M]==null){if(W.id==null)throw new C({data:W,message:"Expected 'id' to be a string."});if(((Y=W.function)==null?void 0:Y.name)==null)throw new C({data:W,message:"Expected 'function.name' to be a string."});B.enqueue({type:"tool-input-start",id:W.id,toolName:W.function.name}),E[M]={id:W.id,type:"function",function:{name:W.function.name,arguments:(P=W.function.arguments)!=null?P:""},hasFinished:!1};let D=E[M];if(D.function.arguments.length>0)B.enqueue({type:"tool-input-delta",id:D.id,delta:D.function.arguments});if(g(D.function.arguments))B.enqueue({type:"tool-input-end",id:D.id}),B.enqueue({type:"tool-call",toolCallId:D.id,toolName:D.function.name,input:D.function.arguments}),D.hasFinished=!0;continue}let H=E[M];if(H.hasFinished)continue;if(((w=W.function)==null?void 0:w.arguments)!=null)H.function.arguments+=W.function.arguments,B.enqueue({type:"tool-input-delta",id:H.id,delta:W.function.arguments});if(g(H.function.arguments))B.enqueue({type:"tool-input-end",id:H.id}),B.enqueue({type:"tool-call",toolCallId:H.id,toolName:H.function.name,input:H.function.arguments}),H.hasFinished=!0}}if(S.finish_reason!=null)q={unified:_(S.finish_reason),raw:S.finish_reason}},flush(L){if(X!=null)L.enqueue({type:"reasoning-end",id:X});if(N)L.enqueue({type:"text-end",id:"0"});L.enqueue({type:"finish",finishReason:q,usage:p(A)})}})),request:{body:JSON.stringify(K)},response:{headers:j}}}},YG=G.object({prompt_tokens:G.number(),completion_tokens:G.number(),total_tokens:G.number(),prompt_tokens_details:G.object({cached_tokens:G.number().nullish(),cache_creation_input_tokens:G.number().nullish()}).nullish(),completion_tokens_details:G.object({reasoning_tokens:G.number().nullish()}).nullish()}),qG=G.object({id:G.string().nullish(),created:G.number().nullish(),model:G.string().nullish(),choices:G.array(G.object({message:G.object({role:G.literal("assistant").nullish(),content:G.string().nullish(),reasoning_content:G.string().nullish(),tool_calls:G.array(G.object({id:G.string(),type:G.literal("function"),function:G.object({name:G.string(),arguments:G.string()})})).nullish()}),finish_reason:G.string().nullish(),index:G.number()})),usage:YG.nullish()}),AG=G.object({id:G.string().nullish(),created:G.number().nullish(),model:G.string().nullish(),choices:G.array(G.object({delta:G.object({role:G.enum(["assistant"]).nullish(),content:G.string().nullish(),reasoning_content:G.string().nullish(),tool_calls:G.array(G.object({index:G.number().nullish(),id:G.string().nullish(),type:G.literal("function").nullish(),function:G.object({name:G.string().nullish(),arguments:G.string().nullish()}).nullish()})).nullish()}),finish_reason:G.string().nullish(),index:G.number()})),usage:YG.nullish()}),HG=NG(()=>QG(G.object({negativePrompt:G.string().nullish(),audioUrl:G.string().nullish(),promptExtend:G.boolean().nullish(),shotType:G.enum(["single","multi"]).nullish(),watermark:G.boolean().nullish(),audio:G.boolean().nullish(),referenceUrls:G.array(G.string()).nullish(),pollIntervalMs:G.number().positive().nullish(),pollTimeoutMs:G.number().positive().nullish()}).passthrough())),LG=G.object({code:G.string().nullish(),message:G.string(),request_id:G.string().nullish()}),n=R({errorSchema:LG,errorToMessage:(J)=>J.message}),PG=G.object({output:G.object({task_status:G.string(),task_id:G.string()}).nullish(),request_id:G.string().nullish()}),WG=G.object({output:G.object({task_id:G.string(),task_status:G.string(),video_url:G.string().nullish(),submit_time:G.string().nullish(),scheduled_time:G.string().nullish(),end_time:G.string().nullish(),orig_prompt:G.string().nullish(),actual_prompt:G.string().nullish(),code:G.string().nullish(),message:G.string().nullish()}).nullish(),usage:G.object({duration:G.number().nullish(),output_video_duration:G.number().nullish(),SR:G.number().nullish(),size:G.string().nullish()}).nullish(),request_id:G.string().nullish()});function UG(J){if(J.includes("-i2v"))return"i2v";if(J.includes("-r2v"))return"r2v";return"t2v"}var wG=class{constructor(J,Q){this.modelId=J,this.config=Q,this.specificationVersion="v3",this.maxVideosPerCall=1}get provider(){return this.config.provider}async doGenerate(J){var Q,$,K,j,z,q,A,Z,N,X,E;let L=(K=($=(Q=this.config._internal)==null?void 0:Q.currentDate)==null?void 0:$.call(Q))!=null?K:new Date,B=[],U=UG(this.modelId),Y=await v({provider:"alibaba",providerOptions:J.providerOptions,schema:HG}),P={};if(J.prompt!=null)P.prompt=J.prompt;if((Y==null?void 0:Y.negativePrompt)!=null)P.negative_prompt=Y.negativePrompt;if((Y==null?void 0:Y.audioUrl)!=null)P.audio_url=Y.audioUrl;if(U==="i2v"&&J.image!=null)if(J.image.type==="url")P.img_url=J.image.url;else{let x=typeof J.image.data==="string"?J.image.data:e(J.image.data);P.img_url=x}if(U==="r2v"&&(Y==null?void 0:Y.referenceUrls)!=null)P.reference_urls=Y.referenceUrls;let w={};if(J.duration!=null)w.duration=J.duration;if(J.seed!=null)w.seed=J.seed;if(J.resolution!=null)if(U==="i2v"){let x={"1280x720":"720P","720x1280":"720P","960x960":"720P","1088x832":"720P","832x1088":"720P","1920x1080":"1080P","1080x1920":"1080P","1440x1440":"1080P","1632x1248":"1080P","1248x1632":"1080P","832x480":"480P","480x832":"480P","624x624":"480P"};w.resolution=x[J.resolution]||J.resolution}else w.size=J.resolution.replace("x","*");if((Y==null?void 0:Y.promptExtend)!=null)w.prompt_extend=Y.promptExtend;if((Y==null?void 0:Y.shotType)!=null)w.shot_type=Y.shotType;if((Y==null?void 0:Y.watermark)!=null)w.watermark=Y.watermark;if((Y==null?void 0:Y.audio)!=null)w.audio=Y.audio;if(J.aspectRatio)B.push({type:"unsupported",feature:"aspectRatio",details:"Alibaba video models use explicit size/resolution dimensions. Use the resolution option or providerOptions.alibaba for size control."});if(J.fps)B.push({type:"unsupported",feature:"fps",details:"Alibaba video models do not support custom FPS."});if(J.n!=null&&J.n>1)B.push({type:"unsupported",feature:"n",details:"Alibaba video models only support generating 1 video per call."});let{value:y}=await k({url:`${this.config.baseURL}/api/v1/services/aigc/video-generation/video-synthesis`,headers:V(await b(this.config.headers),J.headers,{"X-DashScope-Async":"enable"}),body:{model:this.modelId,input:P,parameters:w},successfulResponseHandler:I(PG),failedResponseHandler:n,abortSignal:J.abortSignal,fetch:this.config.fetch}),S=(j=y.output)==null?void 0:j.task_id;if(!S)throw new f({name:"ALIBABA_VIDEO_GENERATION_ERROR",message:`No task_id returned from Alibaba API. Response: ${JSON.stringify(y)}`});let F=(z=Y==null?void 0:Y.pollIntervalMs)!=null?z:5000,W=(q=Y==null?void 0:Y.pollTimeoutMs)!=null?q:600000,M=Date.now(),H,D;while(!0){if(await l(F,{abortSignal:J.abortSignal}),Date.now()-M>W)throw new f({name:"ALIBABA_VIDEO_GENERATION_TIMEOUT",message:`Video generation timed out after ${W}ms`});let{value:x,responseHeaders:ZG}=await GG({url:`${this.config.baseURL}/api/v1/tasks/${S}`,headers:V(await b(this.config.headers),J.headers),successfulResponseHandler:I(WG),failedResponseHandler:n,abortSignal:J.abortSignal,fetch:this.config.fetch});D=ZG;let T=(A=x.output)==null?void 0:A.task_status;if(T==="SUCCEEDED"){H=x;break}if(T==="FAILED"||T==="CANCELED")throw new f({name:"ALIBABA_VIDEO_GENERATION_FAILED",message:`Video generation ${T.toLowerCase()}. Task ID: ${S}. ${(N=(Z=x.output)==null?void 0:Z.message)!=null?N:""}`})}let h=(X=H==null?void 0:H.output)==null?void 0:X.video_url;if(!h)throw new f({name:"ALIBABA_VIDEO_GENERATION_ERROR",message:`No video URL in response. Task ID: ${S}`});return{videos:[{type:"url",url:h,mediaType:"video/mp4"}],warnings:B,response:{timestamp:L,modelId:this.modelId,headers:D},providerMetadata:{alibaba:{taskId:S,videoUrl:h,...((E=H==null?void 0:H.output)==null?void 0:E.actual_prompt)?{actualPrompt:H.output.actual_prompt}:{},...(H==null?void 0:H.usage)?{usage:{duration:H.usage.duration,outputVideoDuration:H.usage.output_video_duration,resolution:H.usage.SR,size:H.usage.size}}:{}}}}}},SG="1.0.17",FG=G.object({error:G.object({message:G.string(),code:G.string().nullish(),type:G.string().nullish()})}),s=R({errorSchema:FG,errorToMessage:(J)=>J.error.message});function DG(J={}){var Q,$;let K=(Q=d(J.baseURL))!=null?Q:"https://dashscope-intl.aliyuncs.com/compatible-mode/v1",j=($=d(J.videoBaseURL))!=null?$:"https://dashscope-intl.aliyuncs.com",z=()=>o({Authorization:`Bearer ${JG({apiKey:J.apiKey,environmentVariableName:"ALIBABA_API_KEY",description:"Alibaba Cloud (DashScope)"})}`,...J.headers},`ai-sdk/alibaba/${SG}`),q=(N)=>{var X;return new KG(N,{provider:"alibaba.chat",baseURL:K,headers:z,fetch:J.fetch,includeUsage:(X=J.includeUsage)!=null?X:!0})},A=(N)=>new wG(N,{provider:"alibaba.video",baseURL:j,headers:z,fetch:J.fetch}),Z=function(N){if(new.target)throw Error("The Alibaba model function cannot be called with the new keyword.");return q(N)};return Z.specificationVersion="v3",Z.languageModel=q,Z.chatModel=q,Z.video=A,Z.videoModel=A,Z.imageModel=(N)=>{throw new m({modelId:N,modelType:"imageModel"})},Z.embeddingModel=(N)=>{throw new m({modelId:N,modelType:"embeddingModel"})},Z}var gG=DG();export{DG as createAlibaba,gG as alibaba,SG as VERSION};
2
+ import{Aq as t,Jq as a,Oq as o,Pq as GG,Sq as JG,Wq as NG,Zq as QG,cr as g,er as v,fr as k,lr as b,mr as R,nr as XG,or as I,sr as d,tq as V,vq as l,zq as e}from"./chunk-gwfx7tx7.js";import{Ar as C,Er as m,Hr as O,ur as f}from"./chunk-1wpjmwnh.js";import"./chunk-cqtkxwd8.js";import"./chunk-ymtcm4xd.js";import{xv as G}from"./chunk-tdmn21z0.js";import"./chunk-s8mghr5a.js";import"./chunk-4sazy0nq.js";function c(J){var Q,$,K,j,z,q;if(J==null)return{inputTokens:{total:void 0,noCache:void 0,cacheRead:void 0,cacheWrite:void 0},outputTokens:{total:void 0,text:void 0,reasoning:void 0},raw:void 0};let A=(Q=J.prompt_tokens)!=null?Q:0,Z=($=J.completion_tokens)!=null?$:0,N=(j=(K=J.prompt_tokens_details)==null?void 0:K.cached_tokens)!=null?j:0,X=(q=(z=J.completion_tokens_details)==null?void 0:z.reasoning_tokens)!=null?q:0;return{inputTokens:{total:A,noCache:A-N,cacheRead:N,cacheWrite:void 0},outputTokens:{total:Z,text:Z-X,reasoning:X},raw:J}}function _(J){switch(J){case"stop":return"stop";case"length":return"length";case"content_filter":return"content-filter";case"function_call":case"tool_calls":return"tool-calls";default:return"other"}}function u({id:J,model:Q,created:$}){return{id:J!=null?J:void 0,modelId:Q!=null?Q:void 0,timestamp:$!=null?new Date($*1000):void 0}}function i({tools:J,toolChoice:Q}){J=(J==null?void 0:J.length)?J:void 0;let $=[];if(J==null)return{tools:void 0,toolChoice:void 0,toolWarnings:$};let K=[];for(let z of J)if(z.type==="provider")$.push({type:"unsupported",feature:`provider-defined tool ${z.id}`});else K.push({type:"function",function:{name:z.name,description:z.description,parameters:z.inputSchema,...z.strict!=null?{strict:z.strict}:{}}});if(Q==null)return{tools:K,toolChoice:void 0,toolWarnings:$};let j=Q.type;switch(j){case"auto":case"none":case"required":return{tools:K,toolChoice:j,toolWarnings:$};case"tool":return{tools:K,toolChoice:{type:"function",function:{name:Q.toolName}},toolWarnings:$};default:throw new O({functionality:`tool choice type: ${j}`})}}var $G=G.object({enableThinking:G.boolean().optional(),thinkingBudget:G.number().positive().optional(),parallelToolCalls:G.boolean().optional()});function p(J){var Q,$,K,j;let z=c(J),q=($=(Q=J==null?void 0:J.prompt_tokens_details)==null?void 0:Q.cache_creation_input_tokens)!=null?$:0,A=((K=z.inputTokens.total)!=null?K:0)-((j=z.inputTokens.cacheRead)!=null?j:0)-q;return{...z,inputTokens:{...z.inputTokens,cacheWrite:q,noCache:A}}}function zG({data:J,mediaType:Q}){return J instanceof URL?J.toString():`data:${Q};base64,${t(J)}`}function BG({prompt:J,cacheControlValidator:Q}){var $,K;let j=[];for(let{role:z,content:q,...A}of J){let Z=Q==null?void 0:Q.getCacheControl(A.providerOptions);switch(z){case"system":{if(Z)j.push({role:"system",content:[{type:"text",text:q,cache_control:Z}]});else j.push({role:"system",content:q});break}case"user":{j.push({role:"user",content:q.map((N,X)=>{var E;let L=X===q.length-1,B=(E=Q==null?void 0:Q.getCacheControl(N.providerOptions))!=null?E:L?Z:void 0;switch(N.type){case"text":return{type:"text",text:N.text,...B?{cache_control:B}:{}};case"file":if(N.mediaType.startsWith("image/")){let U=N.mediaType==="image/*"?"image/jpeg":N.mediaType;return{type:"image_url",image_url:{url:zG({data:N.data,mediaType:U})},...B?{cache_control:B}:{}}}else throw new O({functionality:"Only image file parts are supported"})}})});break}case"assistant":{let N="",X=[];for(let E of q)switch(E.type){case"text":{N+=E.text;break}case"tool-call":{X.push({id:E.toolCallId,type:"function",function:{name:E.toolName,arguments:JSON.stringify(E.input)}});break}case"reasoning":{N+=E.text;break}}j.push({role:"assistant",content:Z?[{type:"text",text:N,cache_control:Z}]:N||null,tool_calls:X.length>0?X:void 0});break}case"tool":{let N=q.filter((X)=>X.type!=="tool-approval-response");for(let X=0;X<N.length;X++){let E=N[X],L=E.output,B=X===N.length-1,U=($=Q==null?void 0:Q.getCacheControl(E.providerOptions))!=null?$:B?Z:void 0,Y;switch(L.type){case"text":case"error-text":Y=L.value;break;case"execution-denied":Y=(K=L.reason)!=null?K:"Tool execution denied.";break;case"content":case"json":case"error-json":Y=JSON.stringify(L.value);break}j.push({role:"tool",tool_call_id:E.toolCallId,content:U?[{type:"text",text:Y,cache_control:U}]:Y})}break}default:throw Error(`Unsupported role: ${z}`)}}return j}var r=4;function EG(J){var Q;let $=J==null?void 0:J.alibaba;return(Q=$==null?void 0:$.cacheControl)!=null?Q:$==null?void 0:$.cache_control}var jG=class{constructor(){this.breakpointCount=0,this.warnings=[]}getCacheControl(J){let Q=EG(J);if(!Q)return;if(this.breakpointCount++,this.breakpointCount>r)this.warnings.push({type:"other",message:`Max breakpoint limit exceeded. Only the last ${r} cache markers will take effect.`});return Q}getWarnings(){return this.warnings}},KG=class{constructor(J,Q){this.specificationVersion="v3",this.supportedUrls={"image/*":[/^https?:\/\/.*$/]},this.modelId=J,this.config=Q}get provider(){return this.config.provider}async getArgs({prompt:J,maxOutputTokens:Q,temperature:$,topP:K,topK:j,frequencyPenalty:z,presencePenalty:q,stopSequences:A,responseFormat:Z,seed:N,providerOptions:X,tools:E,toolChoice:L}){var B;let U=[],Y=new jG,P=await v({provider:"alibaba",providerOptions:X,schema:$G});if(z!=null)U.push({type:"unsupported",feature:"frequencyPenalty"});let w={model:this.modelId,max_tokens:Q,temperature:$,top_p:K,top_k:j,presence_penalty:q,stop:A,seed:N,response_format:(Z==null?void 0:Z.type)==="json"?Z.schema!=null?{type:"json_schema",json_schema:{schema:Z.schema,name:(B=Z.name)!=null?B:"response",description:Z.description}}:{type:"json_object"}:void 0,...(P==null?void 0:P.enableThinking)!=null?{enable_thinking:P.enableThinking}:{},...(P==null?void 0:P.thinkingBudget)!=null?{thinking_budget:P.thinkingBudget}:{},messages:BG({prompt:J,cacheControlValidator:Y})},{tools:y,toolChoice:S,toolWarnings:F}=i({tools:E,toolChoice:L});return U.push(...Y.getWarnings()),{args:{...w,tools:y,tool_choice:S,...y!=null&&(P==null?void 0:P.parallelToolCalls)!==void 0?{parallel_tool_calls:P.parallelToolCalls}:{}},warnings:[...U,...F]}}async doGenerate(J){var Q;let{args:$,warnings:K}=await this.getArgs(J),{responseHeaders:j,value:z,rawValue:q}=await k({url:`${this.config.baseURL}/chat/completions`,headers:V(this.config.headers(),J.headers),body:$,failedResponseHandler:s,successfulResponseHandler:I(qG),abortSignal:J.abortSignal,fetch:this.config.fetch}),A=z.choices[0],Z=[],N=A.message.content;if(N!=null&&N.length>0)Z.push({type:"text",text:N});let X=A.message.reasoning_content;if(X!=null&&X.length>0)Z.push({type:"reasoning",text:X});if(A.message.tool_calls!=null)for(let E of A.message.tool_calls)Z.push({type:"tool-call",toolCallId:E.id,toolName:E.function.name,input:E.function.arguments});return{content:Z,finishReason:{unified:_(A.finish_reason),raw:(Q=A.finish_reason)!=null?Q:void 0},usage:p(z.usage),request:{body:JSON.stringify($)},response:{...u(z),headers:j,body:q},warnings:K}}async doStream(J){let{args:Q,warnings:$}=await this.getArgs(J),K={...Q,stream:!0,stream_options:this.config.includeUsage?{include_usage:!0}:void 0},{responseHeaders:j,value:z}=await k({url:`${this.config.baseURL}/chat/completions`,headers:V(this.config.headers(),J.headers),body:K,failedResponseHandler:s,successfulResponseHandler:XG(AG),abortSignal:J.abortSignal,fetch:this.config.fetch}),q={unified:"other",raw:void 0},A=void 0,Z=!0,N=!1,X=null,E=[];return{stream:z.pipeThrough(new TransformStream({start(L){L.enqueue({type:"stream-start",warnings:$})},transform(L,B){var U,Y,P,w;if(J.includeRawChunks)B.enqueue({type:"raw",rawValue:L.rawValue});if(!L.success){B.enqueue({type:"error",error:L.error});return}let y=L.value;if(Z)Z=!1,B.enqueue({type:"response-metadata",...u(y)});if(y.usage!=null)A=y.usage;if(y.choices.length===0)return;let S=y.choices[0],F=S.delta;if(F.reasoning_content!=null&&F.reasoning_content.length>0){if(X==null){if(N)B.enqueue({type:"text-end",id:"0"}),N=!1;X=a(),B.enqueue({type:"reasoning-start",id:X})}B.enqueue({type:"reasoning-delta",id:X,delta:F.reasoning_content})}if(F.content!=null&&F.content.length>0){if(X!=null)B.enqueue({type:"reasoning-end",id:X}),X=null;if(!N)B.enqueue({type:"text-start",id:"0"}),N=!0;B.enqueue({type:"text-delta",id:"0",delta:F.content})}if(F.tool_calls!=null){if(X!=null)B.enqueue({type:"reasoning-end",id:X}),X=null;if(N)B.enqueue({type:"text-end",id:"0"}),N=!1;for(let W of F.tool_calls){let M=(U=W.index)!=null?U:E.length;if(E[M]==null){if(W.id==null)throw new C({data:W,message:"Expected 'id' to be a string."});if(((Y=W.function)==null?void 0:Y.name)==null)throw new C({data:W,message:"Expected 'function.name' to be a string."});B.enqueue({type:"tool-input-start",id:W.id,toolName:W.function.name}),E[M]={id:W.id,type:"function",function:{name:W.function.name,arguments:(P=W.function.arguments)!=null?P:""},hasFinished:!1};let D=E[M];if(D.function.arguments.length>0)B.enqueue({type:"tool-input-delta",id:D.id,delta:D.function.arguments});if(g(D.function.arguments))B.enqueue({type:"tool-input-end",id:D.id}),B.enqueue({type:"tool-call",toolCallId:D.id,toolName:D.function.name,input:D.function.arguments}),D.hasFinished=!0;continue}let H=E[M];if(H.hasFinished)continue;if(((w=W.function)==null?void 0:w.arguments)!=null)H.function.arguments+=W.function.arguments,B.enqueue({type:"tool-input-delta",id:H.id,delta:W.function.arguments});if(g(H.function.arguments))B.enqueue({type:"tool-input-end",id:H.id}),B.enqueue({type:"tool-call",toolCallId:H.id,toolName:H.function.name,input:H.function.arguments}),H.hasFinished=!0}}if(S.finish_reason!=null)q={unified:_(S.finish_reason),raw:S.finish_reason}},flush(L){if(X!=null)L.enqueue({type:"reasoning-end",id:X});if(N)L.enqueue({type:"text-end",id:"0"});L.enqueue({type:"finish",finishReason:q,usage:p(A)})}})),request:{body:JSON.stringify(K)},response:{headers:j}}}},YG=G.object({prompt_tokens:G.number(),completion_tokens:G.number(),total_tokens:G.number(),prompt_tokens_details:G.object({cached_tokens:G.number().nullish(),cache_creation_input_tokens:G.number().nullish()}).nullish(),completion_tokens_details:G.object({reasoning_tokens:G.number().nullish()}).nullish()}),qG=G.object({id:G.string().nullish(),created:G.number().nullish(),model:G.string().nullish(),choices:G.array(G.object({message:G.object({role:G.literal("assistant").nullish(),content:G.string().nullish(),reasoning_content:G.string().nullish(),tool_calls:G.array(G.object({id:G.string(),type:G.literal("function"),function:G.object({name:G.string(),arguments:G.string()})})).nullish()}),finish_reason:G.string().nullish(),index:G.number()})),usage:YG.nullish()}),AG=G.object({id:G.string().nullish(),created:G.number().nullish(),model:G.string().nullish(),choices:G.array(G.object({delta:G.object({role:G.enum(["assistant"]).nullish(),content:G.string().nullish(),reasoning_content:G.string().nullish(),tool_calls:G.array(G.object({index:G.number().nullish(),id:G.string().nullish(),type:G.literal("function").nullish(),function:G.object({name:G.string().nullish(),arguments:G.string().nullish()}).nullish()})).nullish()}),finish_reason:G.string().nullish(),index:G.number()})),usage:YG.nullish()}),HG=NG(()=>QG(G.object({negativePrompt:G.string().nullish(),audioUrl:G.string().nullish(),promptExtend:G.boolean().nullish(),shotType:G.enum(["single","multi"]).nullish(),watermark:G.boolean().nullish(),audio:G.boolean().nullish(),referenceUrls:G.array(G.string()).nullish(),pollIntervalMs:G.number().positive().nullish(),pollTimeoutMs:G.number().positive().nullish()}).passthrough())),LG=G.object({code:G.string().nullish(),message:G.string(),request_id:G.string().nullish()}),n=R({errorSchema:LG,errorToMessage:(J)=>J.message}),PG=G.object({output:G.object({task_status:G.string(),task_id:G.string()}).nullish(),request_id:G.string().nullish()}),WG=G.object({output:G.object({task_id:G.string(),task_status:G.string(),video_url:G.string().nullish(),submit_time:G.string().nullish(),scheduled_time:G.string().nullish(),end_time:G.string().nullish(),orig_prompt:G.string().nullish(),actual_prompt:G.string().nullish(),code:G.string().nullish(),message:G.string().nullish()}).nullish(),usage:G.object({duration:G.number().nullish(),output_video_duration:G.number().nullish(),SR:G.number().nullish(),size:G.string().nullish()}).nullish(),request_id:G.string().nullish()});function UG(J){if(J.includes("-i2v"))return"i2v";if(J.includes("-r2v"))return"r2v";return"t2v"}var wG=class{constructor(J,Q){this.modelId=J,this.config=Q,this.specificationVersion="v3",this.maxVideosPerCall=1}get provider(){return this.config.provider}async doGenerate(J){var Q,$,K,j,z,q,A,Z,N,X,E;let L=(K=($=(Q=this.config._internal)==null?void 0:Q.currentDate)==null?void 0:$.call(Q))!=null?K:new Date,B=[],U=UG(this.modelId),Y=await v({provider:"alibaba",providerOptions:J.providerOptions,schema:HG}),P={};if(J.prompt!=null)P.prompt=J.prompt;if((Y==null?void 0:Y.negativePrompt)!=null)P.negative_prompt=Y.negativePrompt;if((Y==null?void 0:Y.audioUrl)!=null)P.audio_url=Y.audioUrl;if(U==="i2v"&&J.image!=null)if(J.image.type==="url")P.img_url=J.image.url;else{let x=typeof J.image.data==="string"?J.image.data:e(J.image.data);P.img_url=x}if(U==="r2v"&&(Y==null?void 0:Y.referenceUrls)!=null)P.reference_urls=Y.referenceUrls;let w={};if(J.duration!=null)w.duration=J.duration;if(J.seed!=null)w.seed=J.seed;if(J.resolution!=null)if(U==="i2v"){let x={"1280x720":"720P","720x1280":"720P","960x960":"720P","1088x832":"720P","832x1088":"720P","1920x1080":"1080P","1080x1920":"1080P","1440x1440":"1080P","1632x1248":"1080P","1248x1632":"1080P","832x480":"480P","480x832":"480P","624x624":"480P"};w.resolution=x[J.resolution]||J.resolution}else w.size=J.resolution.replace("x","*");if((Y==null?void 0:Y.promptExtend)!=null)w.prompt_extend=Y.promptExtend;if((Y==null?void 0:Y.shotType)!=null)w.shot_type=Y.shotType;if((Y==null?void 0:Y.watermark)!=null)w.watermark=Y.watermark;if((Y==null?void 0:Y.audio)!=null)w.audio=Y.audio;if(J.aspectRatio)B.push({type:"unsupported",feature:"aspectRatio",details:"Alibaba video models use explicit size/resolution dimensions. Use the resolution option or providerOptions.alibaba for size control."});if(J.fps)B.push({type:"unsupported",feature:"fps",details:"Alibaba video models do not support custom FPS."});if(J.n!=null&&J.n>1)B.push({type:"unsupported",feature:"n",details:"Alibaba video models only support generating 1 video per call."});let{value:y}=await k({url:`${this.config.baseURL}/api/v1/services/aigc/video-generation/video-synthesis`,headers:V(await b(this.config.headers),J.headers,{"X-DashScope-Async":"enable"}),body:{model:this.modelId,input:P,parameters:w},successfulResponseHandler:I(PG),failedResponseHandler:n,abortSignal:J.abortSignal,fetch:this.config.fetch}),S=(j=y.output)==null?void 0:j.task_id;if(!S)throw new f({name:"ALIBABA_VIDEO_GENERATION_ERROR",message:`No task_id returned from Alibaba API. Response: ${JSON.stringify(y)}`});let F=(z=Y==null?void 0:Y.pollIntervalMs)!=null?z:5000,W=(q=Y==null?void 0:Y.pollTimeoutMs)!=null?q:600000,M=Date.now(),H,D;while(!0){if(await l(F,{abortSignal:J.abortSignal}),Date.now()-M>W)throw new f({name:"ALIBABA_VIDEO_GENERATION_TIMEOUT",message:`Video generation timed out after ${W}ms`});let{value:x,responseHeaders:ZG}=await GG({url:`${this.config.baseURL}/api/v1/tasks/${S}`,headers:V(await b(this.config.headers),J.headers),successfulResponseHandler:I(WG),failedResponseHandler:n,abortSignal:J.abortSignal,fetch:this.config.fetch});D=ZG;let T=(A=x.output)==null?void 0:A.task_status;if(T==="SUCCEEDED"){H=x;break}if(T==="FAILED"||T==="CANCELED")throw new f({name:"ALIBABA_VIDEO_GENERATION_FAILED",message:`Video generation ${T.toLowerCase()}. Task ID: ${S}. ${(N=(Z=x.output)==null?void 0:Z.message)!=null?N:""}`})}let h=(X=H==null?void 0:H.output)==null?void 0:X.video_url;if(!h)throw new f({name:"ALIBABA_VIDEO_GENERATION_ERROR",message:`No video URL in response. Task ID: ${S}`});return{videos:[{type:"url",url:h,mediaType:"video/mp4"}],warnings:B,response:{timestamp:L,modelId:this.modelId,headers:D},providerMetadata:{alibaba:{taskId:S,videoUrl:h,...((E=H==null?void 0:H.output)==null?void 0:E.actual_prompt)?{actualPrompt:H.output.actual_prompt}:{},...(H==null?void 0:H.usage)?{usage:{duration:H.usage.duration,outputVideoDuration:H.usage.output_video_duration,resolution:H.usage.SR,size:H.usage.size}}:{}}}}}},SG="1.0.17",FG=G.object({error:G.object({message:G.string(),code:G.string().nullish(),type:G.string().nullish()})}),s=R({errorSchema:FG,errorToMessage:(J)=>J.error.message});function DG(J={}){var Q,$;let K=(Q=d(J.baseURL))!=null?Q:"https://dashscope-intl.aliyuncs.com/compatible-mode/v1",j=($=d(J.videoBaseURL))!=null?$:"https://dashscope-intl.aliyuncs.com",z=()=>o({Authorization:`Bearer ${JG({apiKey:J.apiKey,environmentVariableName:"ALIBABA_API_KEY",description:"Alibaba Cloud (DashScope)"})}`,...J.headers},`ai-sdk/alibaba/${SG}`),q=(N)=>{var X;return new KG(N,{provider:"alibaba.chat",baseURL:K,headers:z,fetch:J.fetch,includeUsage:(X=J.includeUsage)!=null?X:!0})},A=(N)=>new wG(N,{provider:"alibaba.video",baseURL:j,headers:z,fetch:J.fetch}),Z=function(N){if(new.target)throw Error("The Alibaba model function cannot be called with the new keyword.");return q(N)};return Z.specificationVersion="v3",Z.languageModel=q,Z.chatModel=q,Z.video=A,Z.videoModel=A,Z.imageModel=(N)=>{throw new m({modelId:N,modelType:"imageModel"})},Z.embeddingModel=(N)=>{throw new m({modelId:N,modelType:"embeddingModel"})},Z}var gG=DG();export{DG as createAlibaba,gG as alibaba,SG as VERSION};
@@ -1,5 +1,5 @@
1
1
  // @bun
2
- import"./chunk-3k2b05fv.js";var{create:Hn,defineProperty:rt,getOwnPropertyDescriptor:Gn,getOwnPropertyNames:Zn,getPrototypeOf:Xn}=Object,zn=Object.prototype.hasOwnProperty,Vt=(t)=>{throw TypeError(t)},er=(t,e,n)=>(e in t)?rt(t,e,{enumerable:!0,configurable:!0,writable:!0,value:n}):t[e]=n,Le=(t,e)=>()=>(e||t((e={exports:{}}).exports,e),e.exports),Qt=(t,e)=>{for(var n in e)rt(t,n,{get:e[n],enumerable:!0})},tr=(t,e,n,u)=>{if(e&&typeof e=="object"||typeof e=="function")for(let g of Zn(e))!zn.call(t,g)&&g!==n&&rt(t,g,{get:()=>e[g],enumerable:!(u=Gn(e,g))||u.enumerable});return t},bt=(t,e,n)=>(n=t!=null?Hn(Xn(t)):{},tr(e||!t||!t.__esModule?rt(n,"default",{value:t,enumerable:!0}):n,t)),Rt=(t,e,n)=>er(t,typeof e!="symbol"?e+"":e,n),wt=(t,e,n)=>e.has(t)||Vt("Cannot "+n),Ue=(t,e,n)=>(wt(t,e,"read from private field"),n?n.call(t):e.get(t)),lt=(t,e,n)=>e.has(t)?Vt("Cannot add the same private member more than once"):e instanceof WeakSet?e.add(t):e.set(t,n),Jt=(t,e,n,u)=>(wt(t,e,"write to private field"),u?u.call(t,n):e.set(t,n),n),Xe=(t,e,n)=>(wt(t,e,"access private method"),n),Ce=Le((t)=>{var e={ANCHOR:"&",COMMENT:"#",TAG:"!",DIRECTIVES_END:"-",DOCUMENT_END:"."},n={ALIAS:"ALIAS",BLANK_LINE:"BLANK_LINE",BLOCK_FOLDED:"BLOCK_FOLDED",BLOCK_LITERAL:"BLOCK_LITERAL",COMMENT:"COMMENT",DIRECTIVE:"DIRECTIVE",DOCUMENT:"DOCUMENT",FLOW_MAP:"FLOW_MAP",FLOW_SEQ:"FLOW_SEQ",MAP:"MAP",MAP_KEY:"MAP_KEY",MAP_VALUE:"MAP_VALUE",PLAIN:"PLAIN",QUOTE_DOUBLE:"QUOTE_DOUBLE",QUOTE_SINGLE:"QUOTE_SINGLE",SEQ:"SEQ",SEQ_ITEM:"SEQ_ITEM"},u="tag:yaml.org,2002:",g={MAP:"tag:yaml.org,2002:map",SEQ:"tag:yaml.org,2002:seq",STR:"tag:yaml.org,2002:str"};function E(l){let i=[0],r=l.indexOf(`
2
+ import"./chunk-4sazy0nq.js";var{create:Hn,defineProperty:rt,getOwnPropertyDescriptor:Gn,getOwnPropertyNames:Zn,getPrototypeOf:Xn}=Object,zn=Object.prototype.hasOwnProperty,Vt=(t)=>{throw TypeError(t)},er=(t,e,n)=>(e in t)?rt(t,e,{enumerable:!0,configurable:!0,writable:!0,value:n}):t[e]=n,Le=(t,e)=>()=>(e||t((e={exports:{}}).exports,e),e.exports),Qt=(t,e)=>{for(var n in e)rt(t,n,{get:e[n],enumerable:!0})},tr=(t,e,n,u)=>{if(e&&typeof e=="object"||typeof e=="function")for(let g of Zn(e))!zn.call(t,g)&&g!==n&&rt(t,g,{get:()=>e[g],enumerable:!(u=Gn(e,g))||u.enumerable});return t},bt=(t,e,n)=>(n=t!=null?Hn(Xn(t)):{},tr(e||!t||!t.__esModule?rt(n,"default",{value:t,enumerable:!0}):n,t)),Rt=(t,e,n)=>er(t,typeof e!="symbol"?e+"":e,n),wt=(t,e,n)=>e.has(t)||Vt("Cannot "+n),Ue=(t,e,n)=>(wt(t,e,"read from private field"),n?n.call(t):e.get(t)),lt=(t,e,n)=>e.has(t)?Vt("Cannot add the same private member more than once"):e instanceof WeakSet?e.add(t):e.set(t,n),Jt=(t,e,n,u)=>(wt(t,e,"write to private field"),u?u.call(t,n):e.set(t,n),n),Xe=(t,e,n)=>(wt(t,e,"access private method"),n),Ce=Le((t)=>{var e={ANCHOR:"&",COMMENT:"#",TAG:"!",DIRECTIVES_END:"-",DOCUMENT_END:"."},n={ALIAS:"ALIAS",BLANK_LINE:"BLANK_LINE",BLOCK_FOLDED:"BLOCK_FOLDED",BLOCK_LITERAL:"BLOCK_LITERAL",COMMENT:"COMMENT",DIRECTIVE:"DIRECTIVE",DOCUMENT:"DOCUMENT",FLOW_MAP:"FLOW_MAP",FLOW_SEQ:"FLOW_SEQ",MAP:"MAP",MAP_KEY:"MAP_KEY",MAP_VALUE:"MAP_VALUE",PLAIN:"PLAIN",QUOTE_DOUBLE:"QUOTE_DOUBLE",QUOTE_SINGLE:"QUOTE_SINGLE",SEQ:"SEQ",SEQ_ITEM:"SEQ_ITEM"},u="tag:yaml.org,2002:",g={MAP:"tag:yaml.org,2002:map",SEQ:"tag:yaml.org,2002:seq",STR:"tag:yaml.org,2002:str"};function E(l){let i=[0],r=l.indexOf(`
3
3
  `);for(;r!==-1;)r+=1,i.push(r),r=l.indexOf(`
4
4
  `,r);return i}function b(l){let i,r;return typeof l=="string"?(i=E(l),r=l):(Array.isArray(l)&&(l=l[0]),l&&l.context&&(l.lineStarts||(l.lineStarts=E(l.context.src)),i=l.lineStarts,r=l.context.src)),{lineStarts:i,src:r}}function T(l,i){if(typeof l!="number"||l<0)return null;let{lineStarts:r,src:s}=b(i);if(!r||!s||l>s.length)return null;for(let p=0;p<r.length;++p){let c=r[p];if(l<c)return{line:p,col:l-r[p-1]+1};if(l===c)return{line:p+1,col:1}}let o=r.length;return{line:o,col:l-r[o-1]+1}}function M(l,i){let{lineStarts:r,src:s}=b(i);if(!r||!(l>=1)||l>r.length)return null;let o=r[l-1],p=r[l];for(;p&&p>o&&s[p-1]===`
5
5
  `;)--p;return s.slice(o,p)}function I({start:l,end:i},r,s=80){let o=M(l.line,r);if(!o)return null;let{col:p}=l;if(o.length>s)if(p<=s-10)o=o.substr(0,s-1)+"\u2026";else{let C=Math.round(s/2);o.length>p+C&&(o=o.substr(0,p+C-1)+"\u2026"),p-=o.length-s,o="\u2026"+o.substr(1-s)}let c=1,h="";i&&(i.line===l.line&&p+(i.col-l.col)<=s+1?c=i.col-l.col:(c=Math.min(o.length+1,s)-p,h="\u2026"));let v=p>1?" ".repeat(p-1):"",O="^".repeat(c);return`${o}
@@ -1,2 +1,2 @@
1
1
  // @bun
2
- import{te as Qb}from"./chunk-6a7c7wnf.js";import{xe as Sb}from"./chunk-hj3ddt53.js";import{ye as Rb}from"./chunk-r0k21apr.js";import{Ae as Ob,Be as Pb,ze as Nb}from"./chunk-wgk7ynt3.js";import{Ce as Mb}from"./chunk-41v0x1jk.js";import{uf as Eb,vf as Hb,wf as Jb,xf as Kb,yf as Lb}from"./chunk-a3a1trap.js";import"./chunk-3k2b05fv.js";var x=Pb(),U=Ob(),u=Hb(),v=Jb(),L=Kb(),V=Mb(),P=Nb(),Z=Eb(),_=Qb(),M=Lb(),i=Rb(),Tb=Sb(),Ub=async(b,h,j)=>{return{operation:u.getSmithyContext(h).operation,region:await u.normalizeProvider(b.region)()||(()=>{throw Error("expected `region` to be configured for `aws.auth#sigv4`")})()}};function Vb(b){return{schemeId:"aws.auth#sigv4",signingProperties:{name:"cognito-identity",region:b.region},propertiesExtractor:(h,j)=>({signingProperties:{config:h,context:j}})}}function e(b){return{schemeId:"smithy.api#noAuth"}}var Wb=(b)=>{let h=[];switch(b.operation){case"GetCredentialsForIdentity":{h.push(e());break}case"GetId":{h.push(e());break}default:h.push(Vb(b))}return h},Xb=(b)=>{let h=_.resolveAwsSdkSigV4Config(b);return Object.assign(h,{authSchemePreference:u.normalizeProvider(b.authSchemePreference??[])})},Yb=(b)=>{return Object.assign(b,{useDualstackEndpoint:b.useDualstackEndpoint??!1,useFipsEndpoint:b.useFipsEndpoint??!1,defaultSigningName:"cognito-identity"})},n={UseFIPS:{type:"builtInParams",name:"useFipsEndpoint"},Endpoint:{type:"builtInParams",name:"endpoint"},Region:{type:"builtInParams",name:"region"},UseDualStack:{type:"builtInParams",name:"useDualstackEndpoint"}},Zb="3.997.14",_b={version:Zb},Q="ref",K=-1,S=!0,m="isSet",bb="PartitionResult",T="booleanEquals",X="getAttr",N="stringEquals",d={[Q]:"Endpoint"},Y={[Q]:bb},O={[Q]:"Region"},A={},o=[O],t={conditions:[[m,[d]],[m,o],["aws.partition",o,bb],[T,[{[Q]:"UseFIPS"},S]],[T,[{fn:X,argv:[Y,"supportsFIPS"]},S]],[T,[{[Q]:"UseDualStack"},S]],[T,[{fn:X,argv:[Y,"supportsDualStack"]},S]],[N,[{fn:X,argv:[Y,"name"]},"aws"]],[N,[O,"us-east-1"]],[N,[O,"us-east-2"]],[N,[O,"us-west-1"]],[N,[O,"us-west-2"]]],results:[[K],[K,"Invalid Configuration: FIPS and custom endpoint are not supported"],[K,"Invalid Configuration: Dualstack and custom endpoint are not supported"],[d,A],["https://cognito-identity-fips.us-east-1.amazonaws.com",A],["https://cognito-identity-fips.us-east-2.amazonaws.com",A],["https://cognito-identity-fips.us-west-1.amazonaws.com",A],["https://cognito-identity-fips.us-west-2.amazonaws.com",A],["https://cognito-identity-fips.{Region}.{PartitionResult#dualStackDnsSuffix}",A],[K,"FIPS and DualStack are enabled, but this partition does not support one or both"],["https://cognito-identity-fips.{Region}.{PartitionResult#dnsSuffix}",A],[K,"FIPS is enabled but this partition does not support FIPS"],["https://cognito-identity.{Region}.amazonaws.com",A],["https://cognito-identity.{Region}.{PartitionResult#dualStackDnsSuffix}",A],[K,"DualStack is enabled but this partition does not support DualStack"],["https://cognito-identity.{Region}.{PartitionResult#dnsSuffix}",A],[K,"Invalid Configuration: Missing Region"]]},$b=2,p=1e8,sb=new Int32Array([-1,1,-1,0,17,3,1,4,p+16,2,5,p+16,3,9,6,5,7,p+15,6,8,p+14,7,p+12,p+13,4,11,10,5,p+9,p+11,5,12,p+10,6,13,p+9,8,p+4,14,9,p+5,15,10,p+6,16,11,p+7,p+8,3,p+1,18,5,p+2,p+3]),Fb=L.BinaryDecisionDiagram.from(sb,$b,t.conditions,t.results),cb=new L.EndpointCache({size:50,params:["Endpoint","Region","UseDualStack","UseFIPS"]}),fb=(b,h={})=>{return cb.get(b,()=>L.decideEndpoint(Fb,{endpointParams:b,logger:h.logger}))};L.customEndpointFunctions.aws=x.awsEndpointFunctions;class z extends u.ServiceException{constructor(b){super(b);Object.setPrototypeOf(this,z.prototype)}}class $ extends z{name="ExternalServiceException";$fault="client";constructor(b){super({name:"ExternalServiceException",$fault:"client",...b});Object.setPrototypeOf(this,$.prototype)}}class s extends z{name="InternalErrorException";$fault="server";constructor(b){super({name:"InternalErrorException",$fault:"server",...b});Object.setPrototypeOf(this,s.prototype)}}class F extends z{name="InvalidIdentityPoolConfigurationException";$fault="client";constructor(b){super({name:"InvalidIdentityPoolConfigurationException",$fault:"client",...b});Object.setPrototypeOf(this,F.prototype)}}class c extends z{name="InvalidParameterException";$fault="client";constructor(b){super({name:"InvalidParameterException",$fault:"client",...b});Object.setPrototypeOf(this,c.prototype)}}class f extends z{name="NotAuthorizedException";$fault="client";constructor(b){super({name:"NotAuthorizedException",$fault:"client",...b});Object.setPrototypeOf(this,f.prototype)}}class l extends z{name="ResourceConflictException";$fault="client";constructor(b){super({name:"ResourceConflictException",$fault:"client",...b});Object.setPrototypeOf(this,l.prototype)}}class G extends z{name="ResourceNotFoundException";$fault="client";constructor(b){super({name:"ResourceNotFoundException",$fault:"client",...b});Object.setPrototypeOf(this,G.prototype)}}class r extends z{name="TooManyRequestsException";$fault="client";constructor(b){super({name:"TooManyRequestsException",$fault:"client",...b});Object.setPrototypeOf(this,r.prototype)}}class y extends z{name="LimitExceededException";$fault="client";constructor(b){super({name:"LimitExceededException",$fault:"client",...b});Object.setPrototypeOf(this,y.prototype)}}var lb="AccountId",Gb="AccessKeyId",hb="Credentials",rb="CustomRoleArn",yb="Expiration",gb="ExternalServiceException",Ib="GetCredentialsForIdentity",ab="GetCredentialsForIdentityInput",Cb="GetCredentialsForIdentityResponse",ib="GetId",eb="GetIdInput",mb="GetIdResponse",db="InternalErrorException",g="IdentityId",ob="InvalidIdentityPoolConfigurationException",tb="InvalidParameterException",nb="IdentityPoolId",bh="IdentityProviderToken",jb="Logins",hh="LimitExceededException",jh="LoginsMap",kh="NotAuthorizedException",ph="ResourceConflictException",qh="ResourceNotFoundException",uh="SecretKey",vh="SecretKeyString",wh="SessionToken",xh="TooManyRequestsException",H="client",D="error",J="httpError",E="message",kb="smithy.ts.sdk.synthetic.com.amazonaws.cognitoidentity",zh="server",k="com.amazonaws.cognitoidentity",pb=Z.TypeRegistry.for(kb),Ah=[-3,kb,"CognitoIdentityServiceException",0,[],[]];pb.registerError(Ah,z);var B=Z.TypeRegistry.for(k),Bh=[-3,k,gb,{[D]:H,[J]:400},[E],[0]];B.registerError(Bh,$);var Dh=[-3,k,db,{[D]:zh},[E],[0]];B.registerError(Dh,s);var Eh=[-3,k,ob,{[D]:H,[J]:400},[E],[0]];B.registerError(Eh,F);var Hh=[-3,k,tb,{[D]:H,[J]:400},[E],[0]];B.registerError(Hh,c);var Jh=[-3,k,hh,{[D]:H,[J]:400},[E],[0]];B.registerError(Jh,y);var Kh=[-3,k,kh,{[D]:H,[J]:403},[E],[0]];B.registerError(Kh,f);var Lh=[-3,k,ph,{[D]:H,[J]:409},[E],[0]];B.registerError(Lh,l);var Mh=[-3,k,qh,{[D]:H,[J]:404},[E],[0]];B.registerError(Mh,G);var Nh=[-3,k,xh,{[D]:H,[J]:429},[E],[0]];B.registerError(Nh,r);var Oh=[pb,B],Ph=[0,k,bh,8,0],Qh=[0,k,vh,8,0],Rh=[3,k,hb,0,[Gb,uh,wh,yb],[0,[()=>Qh,0],0,4]],Sh=[3,k,ab,0,[g,jb,rb],[0,[()=>qb,0],0],1],Th=[3,k,Cb,0,[g,hb],[0,[()=>Rh,0]]],Uh=[3,k,eb,0,[nb,lb,jb],[0,0,[()=>qb,0]],1],Vh=[3,k,mb,0,[g],[0]],qb=[2,k,jh,0,[0,0],[()=>Ph,0]],Wh=[9,k,Ib,0,()=>Sh,()=>Th],Xh=[9,k,ib,0,()=>Uh,()=>Vh],Yh=(b)=>{return{apiVersion:"2014-06-30",base64Decoder:b?.base64Decoder??M.fromBase64,base64Encoder:b?.base64Encoder??M.toBase64,disableHostPrefix:b?.disableHostPrefix??!1,endpointProvider:b?.endpointProvider??fb,extensions:b?.extensions??[],httpAuthSchemeProvider:b?.httpAuthSchemeProvider??Wb,httpAuthSchemes:b?.httpAuthSchemes??[{schemeId:"aws.auth#sigv4",identityProvider:(h)=>h.getIdentityProvider("aws.auth#sigv4"),signer:new _.AwsSdkSigV4Signer},{schemeId:"smithy.api#noAuth",identityProvider:(h)=>h.getIdentityProvider("smithy.api#noAuth")||(async()=>({})),signer:new U.NoAuthSigner}],logger:b?.logger??new u.NoOpLogger,protocol:b?.protocol??Tb.AwsJson1_1Protocol,protocolSettings:b?.protocolSettings??{defaultNamespace:"com.amazonaws.cognitoidentity",errorTypeRegistries:Oh,xmlNamespace:"http://cognito-identity.amazonaws.com/doc/2014-06-30/",version:"2014-06-30",serviceTarget:"AWSCognitoIdentityService"},serviceId:b?.serviceId??"Cognito Identity",urlParser:b?.urlParser??V.parseUrl,utf8Decoder:b?.utf8Decoder??M.fromUtf8,utf8Encoder:b?.utf8Encoder??M.toUtf8}},Zh=(b)=>{u.emitWarningIfUnsupportedVersion(process.version);let h=v.resolveDefaultsModeConfig(b),j=()=>h().then(u.loadConfigsForDefaultMode),w=Yh(b);x.emitWarningIfUnsupportedVersion(process.version);let q={profile:b?.profile,logger:w.logger};return{...w,...b,runtime:"node",defaultsMode:h,authSchemePreference:b?.authSchemePreference??v.loadConfig(_.NODE_AUTH_SCHEME_PREFERENCE_OPTIONS,q),bodyLengthChecker:b?.bodyLengthChecker??M.calculateBodyLength,defaultUserAgentProvider:b?.defaultUserAgentProvider??x.createDefaultUserAgentProvider({serviceId:w.serviceId,clientVersion:_b.version}),maxAttempts:b?.maxAttempts??v.loadConfig(P.NODE_MAX_ATTEMPT_CONFIG_OPTIONS,b),region:b?.region??v.loadConfig(v.NODE_REGION_CONFIG_OPTIONS,{...v.NODE_REGION_CONFIG_FILE_OPTIONS,...q}),requestHandler:i.NodeHttpHandler.create(b?.requestHandler??j),retryMode:b?.retryMode??v.loadConfig({...P.NODE_RETRY_MODE_CONFIG_OPTIONS,default:async()=>(await j()).retryMode||P.DEFAULT_RETRY_MODE},b),sha256:b?.sha256??M.Hash.bind(null,"sha256"),streamCollector:b?.streamCollector??i.streamCollector,useDualstackEndpoint:b?.useDualstackEndpoint??v.loadConfig(v.NODE_USE_DUALSTACK_ENDPOINT_CONFIG_OPTIONS,q),useFipsEndpoint:b?.useFipsEndpoint??v.loadConfig(v.NODE_USE_FIPS_ENDPOINT_CONFIG_OPTIONS,q),userAgentAppId:b?.userAgentAppId??v.loadConfig(x.NODE_APP_ID_CONFIG_OPTIONS,q)}},_h=(b)=>{let{httpAuthSchemes:h,httpAuthSchemeProvider:j,credentials:w}=b;return{setHttpAuthScheme(q){let R=h.findIndex((W)=>W.schemeId===q.schemeId);if(R===-1)h.push(q);else h.splice(R,1,q)},httpAuthSchemes(){return h},setHttpAuthSchemeProvider(q){j=q},httpAuthSchemeProvider(){return j},setCredentials(q){w=q},credentials(){return w}}},$h=(b)=>{return{httpAuthSchemes:b.httpAuthSchemes(),httpAuthSchemeProvider:b.httpAuthSchemeProvider(),credentials:b.credentials()}},sh=(b,h)=>{let j=Object.assign(x.getAwsRegionExtensionConfiguration(b),u.getDefaultExtensionConfiguration(b),V.getHttpHandlerExtensionConfiguration(b),_h(b));return h.forEach((w)=>w.configure(j)),Object.assign(b,x.resolveAwsRegionExtensionConfiguration(j),u.resolveDefaultRuntimeConfig(j),V.resolveHttpHandlerRuntimeConfig(j),$h(j))};class I extends u.Client{config;constructor(...[b]){let h=Zh(b||{});super(h);this.initConfig=h;let j=Yb(h),w=x.resolveUserAgentConfig(j),q=P.resolveRetryConfig(w),R=v.resolveRegionConfig(q),W=x.resolveHostHeaderConfig(R),zb=L.resolveEndpointConfig(W),Ab=Xb(zb),Bb=sh(Ab,b?.extensions||[]);this.config=Bb,this.middlewareStack.use(Z.getSchemaSerdePlugin(this.config)),this.middlewareStack.use(x.getUserAgentPlugin(this.config)),this.middlewareStack.use(P.getRetryPlugin(this.config)),this.middlewareStack.use(V.getContentLengthPlugin(this.config)),this.middlewareStack.use(x.getHostHeaderPlugin(this.config)),this.middlewareStack.use(x.getLoggerPlugin(this.config)),this.middlewareStack.use(x.getRecursionDetectionPlugin(this.config)),this.middlewareStack.use(U.getHttpAuthSchemeEndpointRuleSetPlugin(this.config,{httpAuthSchemeParametersProvider:Ub,identityProviderConfigProvider:async(Db)=>new U.DefaultIdentityProviderConfig({"aws.auth#sigv4":Db.credentials})})),this.middlewareStack.use(U.getHttpSigningPlugin(this.config))}destroy(){super.destroy()}}class a extends u.Command.classBuilder().ep(n).m(function(b,h,j,w){return[L.getEndpointPlugin(j,b.getEndpointParameterInstructions())]}).s("AWSCognitoIdentityService","GetCredentialsForIdentity",{}).n("CognitoIdentityClient","GetCredentialsForIdentityCommand").sc(Wh).build(){}class C extends u.Command.classBuilder().ep(n).m(function(b,h,j,w){return[L.getEndpointPlugin(j,b.getEndpointParameterInstructions())]}).s("AWSCognitoIdentityService","GetId",{}).n("CognitoIdentityClient","GetIdCommand").sc(Xh).build(){}var Fh={GetCredentialsForIdentityCommand:a,GetIdCommand:C};class ub extends I{}u.createAggregatedClient(Fh,ub);var{Command:ch,Client:fh}=u;var vb=I;var wb=a;var xb=C;export{xb as GetIdCommand,wb as GetCredentialsForIdentityCommand,vb as CognitoIdentityClient};
2
+ import{re as Qb}from"./chunk-hgsykghj.js";import{ve as Sb}from"./chunk-jts0dma5.js";import{we as Rb}from"./chunk-vgaxv70x.js";import{xe as Nb,ye as Ob,ze as Pb}from"./chunk-t01bhw5h.js";import{Ae as Mb}from"./chunk-8yr682pv.js";import{sf as Eb,tf as Hb,uf as Jb,vf as Kb,wf as Lb}from"./chunk-v3x5nrc4.js";import"./chunk-4sazy0nq.js";var x=Pb(),U=Ob(),u=Hb(),v=Jb(),L=Kb(),V=Mb(),P=Nb(),Z=Eb(),_=Qb(),M=Lb(),i=Rb(),Tb=Sb(),Ub=async(b,h,j)=>{return{operation:u.getSmithyContext(h).operation,region:await u.normalizeProvider(b.region)()||(()=>{throw Error("expected `region` to be configured for `aws.auth#sigv4`")})()}};function Vb(b){return{schemeId:"aws.auth#sigv4",signingProperties:{name:"cognito-identity",region:b.region},propertiesExtractor:(h,j)=>({signingProperties:{config:h,context:j}})}}function e(b){return{schemeId:"smithy.api#noAuth"}}var Wb=(b)=>{let h=[];switch(b.operation){case"GetCredentialsForIdentity":{h.push(e());break}case"GetId":{h.push(e());break}default:h.push(Vb(b))}return h},Xb=(b)=>{let h=_.resolveAwsSdkSigV4Config(b);return Object.assign(h,{authSchemePreference:u.normalizeProvider(b.authSchemePreference??[])})},Yb=(b)=>{return Object.assign(b,{useDualstackEndpoint:b.useDualstackEndpoint??!1,useFipsEndpoint:b.useFipsEndpoint??!1,defaultSigningName:"cognito-identity"})},n={UseFIPS:{type:"builtInParams",name:"useFipsEndpoint"},Endpoint:{type:"builtInParams",name:"endpoint"},Region:{type:"builtInParams",name:"region"},UseDualStack:{type:"builtInParams",name:"useDualstackEndpoint"}},Zb="3.997.14",_b={version:Zb},Q="ref",K=-1,S=!0,m="isSet",bb="PartitionResult",T="booleanEquals",X="getAttr",N="stringEquals",d={[Q]:"Endpoint"},Y={[Q]:bb},O={[Q]:"Region"},A={},o=[O],t={conditions:[[m,[d]],[m,o],["aws.partition",o,bb],[T,[{[Q]:"UseFIPS"},S]],[T,[{fn:X,argv:[Y,"supportsFIPS"]},S]],[T,[{[Q]:"UseDualStack"},S]],[T,[{fn:X,argv:[Y,"supportsDualStack"]},S]],[N,[{fn:X,argv:[Y,"name"]},"aws"]],[N,[O,"us-east-1"]],[N,[O,"us-east-2"]],[N,[O,"us-west-1"]],[N,[O,"us-west-2"]]],results:[[K],[K,"Invalid Configuration: FIPS and custom endpoint are not supported"],[K,"Invalid Configuration: Dualstack and custom endpoint are not supported"],[d,A],["https://cognito-identity-fips.us-east-1.amazonaws.com",A],["https://cognito-identity-fips.us-east-2.amazonaws.com",A],["https://cognito-identity-fips.us-west-1.amazonaws.com",A],["https://cognito-identity-fips.us-west-2.amazonaws.com",A],["https://cognito-identity-fips.{Region}.{PartitionResult#dualStackDnsSuffix}",A],[K,"FIPS and DualStack are enabled, but this partition does not support one or both"],["https://cognito-identity-fips.{Region}.{PartitionResult#dnsSuffix}",A],[K,"FIPS is enabled but this partition does not support FIPS"],["https://cognito-identity.{Region}.amazonaws.com",A],["https://cognito-identity.{Region}.{PartitionResult#dualStackDnsSuffix}",A],[K,"DualStack is enabled but this partition does not support DualStack"],["https://cognito-identity.{Region}.{PartitionResult#dnsSuffix}",A],[K,"Invalid Configuration: Missing Region"]]},$b=2,p=1e8,sb=new Int32Array([-1,1,-1,0,17,3,1,4,p+16,2,5,p+16,3,9,6,5,7,p+15,6,8,p+14,7,p+12,p+13,4,11,10,5,p+9,p+11,5,12,p+10,6,13,p+9,8,p+4,14,9,p+5,15,10,p+6,16,11,p+7,p+8,3,p+1,18,5,p+2,p+3]),Fb=L.BinaryDecisionDiagram.from(sb,$b,t.conditions,t.results),cb=new L.EndpointCache({size:50,params:["Endpoint","Region","UseDualStack","UseFIPS"]}),fb=(b,h={})=>{return cb.get(b,()=>L.decideEndpoint(Fb,{endpointParams:b,logger:h.logger}))};L.customEndpointFunctions.aws=x.awsEndpointFunctions;class z extends u.ServiceException{constructor(b){super(b);Object.setPrototypeOf(this,z.prototype)}}class $ extends z{name="ExternalServiceException";$fault="client";constructor(b){super({name:"ExternalServiceException",$fault:"client",...b});Object.setPrototypeOf(this,$.prototype)}}class s extends z{name="InternalErrorException";$fault="server";constructor(b){super({name:"InternalErrorException",$fault:"server",...b});Object.setPrototypeOf(this,s.prototype)}}class F extends z{name="InvalidIdentityPoolConfigurationException";$fault="client";constructor(b){super({name:"InvalidIdentityPoolConfigurationException",$fault:"client",...b});Object.setPrototypeOf(this,F.prototype)}}class c extends z{name="InvalidParameterException";$fault="client";constructor(b){super({name:"InvalidParameterException",$fault:"client",...b});Object.setPrototypeOf(this,c.prototype)}}class f extends z{name="NotAuthorizedException";$fault="client";constructor(b){super({name:"NotAuthorizedException",$fault:"client",...b});Object.setPrototypeOf(this,f.prototype)}}class l extends z{name="ResourceConflictException";$fault="client";constructor(b){super({name:"ResourceConflictException",$fault:"client",...b});Object.setPrototypeOf(this,l.prototype)}}class G extends z{name="ResourceNotFoundException";$fault="client";constructor(b){super({name:"ResourceNotFoundException",$fault:"client",...b});Object.setPrototypeOf(this,G.prototype)}}class r extends z{name="TooManyRequestsException";$fault="client";constructor(b){super({name:"TooManyRequestsException",$fault:"client",...b});Object.setPrototypeOf(this,r.prototype)}}class y extends z{name="LimitExceededException";$fault="client";constructor(b){super({name:"LimitExceededException",$fault:"client",...b});Object.setPrototypeOf(this,y.prototype)}}var lb="AccountId",Gb="AccessKeyId",hb="Credentials",rb="CustomRoleArn",yb="Expiration",gb="ExternalServiceException",Ib="GetCredentialsForIdentity",ab="GetCredentialsForIdentityInput",Cb="GetCredentialsForIdentityResponse",ib="GetId",eb="GetIdInput",mb="GetIdResponse",db="InternalErrorException",g="IdentityId",ob="InvalidIdentityPoolConfigurationException",tb="InvalidParameterException",nb="IdentityPoolId",bh="IdentityProviderToken",jb="Logins",hh="LimitExceededException",jh="LoginsMap",kh="NotAuthorizedException",ph="ResourceConflictException",qh="ResourceNotFoundException",uh="SecretKey",vh="SecretKeyString",wh="SessionToken",xh="TooManyRequestsException",H="client",D="error",J="httpError",E="message",kb="smithy.ts.sdk.synthetic.com.amazonaws.cognitoidentity",zh="server",k="com.amazonaws.cognitoidentity",pb=Z.TypeRegistry.for(kb),Ah=[-3,kb,"CognitoIdentityServiceException",0,[],[]];pb.registerError(Ah,z);var B=Z.TypeRegistry.for(k),Bh=[-3,k,gb,{[D]:H,[J]:400},[E],[0]];B.registerError(Bh,$);var Dh=[-3,k,db,{[D]:zh},[E],[0]];B.registerError(Dh,s);var Eh=[-3,k,ob,{[D]:H,[J]:400},[E],[0]];B.registerError(Eh,F);var Hh=[-3,k,tb,{[D]:H,[J]:400},[E],[0]];B.registerError(Hh,c);var Jh=[-3,k,hh,{[D]:H,[J]:400},[E],[0]];B.registerError(Jh,y);var Kh=[-3,k,kh,{[D]:H,[J]:403},[E],[0]];B.registerError(Kh,f);var Lh=[-3,k,ph,{[D]:H,[J]:409},[E],[0]];B.registerError(Lh,l);var Mh=[-3,k,qh,{[D]:H,[J]:404},[E],[0]];B.registerError(Mh,G);var Nh=[-3,k,xh,{[D]:H,[J]:429},[E],[0]];B.registerError(Nh,r);var Oh=[pb,B],Ph=[0,k,bh,8,0],Qh=[0,k,vh,8,0],Rh=[3,k,hb,0,[Gb,uh,wh,yb],[0,[()=>Qh,0],0,4]],Sh=[3,k,ab,0,[g,jb,rb],[0,[()=>qb,0],0],1],Th=[3,k,Cb,0,[g,hb],[0,[()=>Rh,0]]],Uh=[3,k,eb,0,[nb,lb,jb],[0,0,[()=>qb,0]],1],Vh=[3,k,mb,0,[g],[0]],qb=[2,k,jh,0,[0,0],[()=>Ph,0]],Wh=[9,k,Ib,0,()=>Sh,()=>Th],Xh=[9,k,ib,0,()=>Uh,()=>Vh],Yh=(b)=>{return{apiVersion:"2014-06-30",base64Decoder:b?.base64Decoder??M.fromBase64,base64Encoder:b?.base64Encoder??M.toBase64,disableHostPrefix:b?.disableHostPrefix??!1,endpointProvider:b?.endpointProvider??fb,extensions:b?.extensions??[],httpAuthSchemeProvider:b?.httpAuthSchemeProvider??Wb,httpAuthSchemes:b?.httpAuthSchemes??[{schemeId:"aws.auth#sigv4",identityProvider:(h)=>h.getIdentityProvider("aws.auth#sigv4"),signer:new _.AwsSdkSigV4Signer},{schemeId:"smithy.api#noAuth",identityProvider:(h)=>h.getIdentityProvider("smithy.api#noAuth")||(async()=>({})),signer:new U.NoAuthSigner}],logger:b?.logger??new u.NoOpLogger,protocol:b?.protocol??Tb.AwsJson1_1Protocol,protocolSettings:b?.protocolSettings??{defaultNamespace:"com.amazonaws.cognitoidentity",errorTypeRegistries:Oh,xmlNamespace:"http://cognito-identity.amazonaws.com/doc/2014-06-30/",version:"2014-06-30",serviceTarget:"AWSCognitoIdentityService"},serviceId:b?.serviceId??"Cognito Identity",urlParser:b?.urlParser??V.parseUrl,utf8Decoder:b?.utf8Decoder??M.fromUtf8,utf8Encoder:b?.utf8Encoder??M.toUtf8}},Zh=(b)=>{u.emitWarningIfUnsupportedVersion(process.version);let h=v.resolveDefaultsModeConfig(b),j=()=>h().then(u.loadConfigsForDefaultMode),w=Yh(b);x.emitWarningIfUnsupportedVersion(process.version);let q={profile:b?.profile,logger:w.logger};return{...w,...b,runtime:"node",defaultsMode:h,authSchemePreference:b?.authSchemePreference??v.loadConfig(_.NODE_AUTH_SCHEME_PREFERENCE_OPTIONS,q),bodyLengthChecker:b?.bodyLengthChecker??M.calculateBodyLength,defaultUserAgentProvider:b?.defaultUserAgentProvider??x.createDefaultUserAgentProvider({serviceId:w.serviceId,clientVersion:_b.version}),maxAttempts:b?.maxAttempts??v.loadConfig(P.NODE_MAX_ATTEMPT_CONFIG_OPTIONS,b),region:b?.region??v.loadConfig(v.NODE_REGION_CONFIG_OPTIONS,{...v.NODE_REGION_CONFIG_FILE_OPTIONS,...q}),requestHandler:i.NodeHttpHandler.create(b?.requestHandler??j),retryMode:b?.retryMode??v.loadConfig({...P.NODE_RETRY_MODE_CONFIG_OPTIONS,default:async()=>(await j()).retryMode||P.DEFAULT_RETRY_MODE},b),sha256:b?.sha256??M.Hash.bind(null,"sha256"),streamCollector:b?.streamCollector??i.streamCollector,useDualstackEndpoint:b?.useDualstackEndpoint??v.loadConfig(v.NODE_USE_DUALSTACK_ENDPOINT_CONFIG_OPTIONS,q),useFipsEndpoint:b?.useFipsEndpoint??v.loadConfig(v.NODE_USE_FIPS_ENDPOINT_CONFIG_OPTIONS,q),userAgentAppId:b?.userAgentAppId??v.loadConfig(x.NODE_APP_ID_CONFIG_OPTIONS,q)}},_h=(b)=>{let{httpAuthSchemes:h,httpAuthSchemeProvider:j,credentials:w}=b;return{setHttpAuthScheme(q){let R=h.findIndex((W)=>W.schemeId===q.schemeId);if(R===-1)h.push(q);else h.splice(R,1,q)},httpAuthSchemes(){return h},setHttpAuthSchemeProvider(q){j=q},httpAuthSchemeProvider(){return j},setCredentials(q){w=q},credentials(){return w}}},$h=(b)=>{return{httpAuthSchemes:b.httpAuthSchemes(),httpAuthSchemeProvider:b.httpAuthSchemeProvider(),credentials:b.credentials()}},sh=(b,h)=>{let j=Object.assign(x.getAwsRegionExtensionConfiguration(b),u.getDefaultExtensionConfiguration(b),V.getHttpHandlerExtensionConfiguration(b),_h(b));return h.forEach((w)=>w.configure(j)),Object.assign(b,x.resolveAwsRegionExtensionConfiguration(j),u.resolveDefaultRuntimeConfig(j),V.resolveHttpHandlerRuntimeConfig(j),$h(j))};class I extends u.Client{config;constructor(...[b]){let h=Zh(b||{});super(h);this.initConfig=h;let j=Yb(h),w=x.resolveUserAgentConfig(j),q=P.resolveRetryConfig(w),R=v.resolveRegionConfig(q),W=x.resolveHostHeaderConfig(R),zb=L.resolveEndpointConfig(W),Ab=Xb(zb),Bb=sh(Ab,b?.extensions||[]);this.config=Bb,this.middlewareStack.use(Z.getSchemaSerdePlugin(this.config)),this.middlewareStack.use(x.getUserAgentPlugin(this.config)),this.middlewareStack.use(P.getRetryPlugin(this.config)),this.middlewareStack.use(V.getContentLengthPlugin(this.config)),this.middlewareStack.use(x.getHostHeaderPlugin(this.config)),this.middlewareStack.use(x.getLoggerPlugin(this.config)),this.middlewareStack.use(x.getRecursionDetectionPlugin(this.config)),this.middlewareStack.use(U.getHttpAuthSchemeEndpointRuleSetPlugin(this.config,{httpAuthSchemeParametersProvider:Ub,identityProviderConfigProvider:async(Db)=>new U.DefaultIdentityProviderConfig({"aws.auth#sigv4":Db.credentials})})),this.middlewareStack.use(U.getHttpSigningPlugin(this.config))}destroy(){super.destroy()}}class a extends u.Command.classBuilder().ep(n).m(function(b,h,j,w){return[L.getEndpointPlugin(j,b.getEndpointParameterInstructions())]}).s("AWSCognitoIdentityService","GetCredentialsForIdentity",{}).n("CognitoIdentityClient","GetCredentialsForIdentityCommand").sc(Wh).build(){}class C extends u.Command.classBuilder().ep(n).m(function(b,h,j,w){return[L.getEndpointPlugin(j,b.getEndpointParameterInstructions())]}).s("AWSCognitoIdentityService","GetId",{}).n("CognitoIdentityClient","GetIdCommand").sc(Xh).build(){}var Fh={GetCredentialsForIdentityCommand:a,GetIdCommand:C};class ub extends I{}u.createAggregatedClient(Fh,ub);var{Command:ch,Client:fh}=u;var vb=I;var wb=a;var xb=C;export{xb as GetIdCommand,wb as GetCredentialsForIdentityCommand,vb as CognitoIdentityClient};
@@ -1,3 +1,3 @@
1
1
  // @bun
2
2
  function i(f,r){let e=JSON.parse(JSON.stringify(f));if("nullable"in e&&e.nullable===!0){if(e.type)if(Array.isArray(e.type)){if(!e.type.includes("null"))e.type.push("null")}else e.type=[e.type,"null"];else e.type=["null"];delete e.nullable}if(e.$schema)delete e.$schema;if(["properties","additionalProperties","items","additionalItems","allOf","anyOf","oneOf","not","if","then","else","definitions","$defs","patternProperties","propertyNames","contains"].forEach((s)=>{if(e[s]&&(typeof e[s]==="object"||Array.isArray(e[s])))if(s==="properties"||s==="definitions"||s==="$defs"||s==="patternProperties")for(let n in e[s])e[s][n]=i(e[s][n],r);else if(s==="allOf"||s==="anyOf"||s==="oneOf")e[s]=e[s].map((n)=>i(n,r));else if(s==="items")if(Array.isArray(e[s]))e[s]=e[s].map((n)=>i(n,r));else e[s]=i(e[s],r);else e[s]=i(e[s],r)}),e.ref||e.$id){let{ref:s,$id:n,...t}=e,a=s||n;return r.components.schemas={...r.components.schemas,[a]:t},{$ref:`#/components/schemas/${a}`}}else if(e.$ref){let{$ref:s,$defs:n,...t}=e;if(s.includes("://"))return Object.keys(t).length>0?t:{type:"string"};let a=s.split("/").pop();return r.components.schemas={...r.components.schemas,...n},{$ref:`#/components/schemas/${a}`}}return e}
3
- export{i as Df};
3
+ export{i as Bf};
@@ -0,0 +1,2 @@
1
+ // @bun
2
+ import{kQ as t}from"./chunk-4sazy0nq.js";var e=await import("./chunk-h36qec67.js",{with:{type:"file"}}),a=e.default;export{a as default};
@@ -1,5 +1,5 @@
1
1
  // @bun
2
- import"./chunk-3k2b05fv.js";var pr=Object.defineProperty,hr=(e)=>{throw TypeError(e)},cn=(e,t,r)=>(t in e)?pr(e,t,{enumerable:!0,configurable:!0,writable:!0,value:r}):e[t]=r,dr=(e,t)=>{for(var r in t)pr(e,r,{get:t[r],enumerable:!0})},kt=(e,t,r)=>cn(e,typeof t!="symbol"?t+"":t,r),mr=(e,t,r)=>t.has(e)||hr("Cannot "+r),F=(e,t,r)=>(mr(e,t,"read from private field"),r?r.call(e):t.get(e)),gr=(e,t,r)=>t.has(e)?hr("Cannot add the same private member more than once"):t instanceof WeakSet?t.add(e):t.set(e,r),pn=(e,t,r,n)=>(mr(e,t,"write to private field"),n?n.call(e,r):t.set(e,r),r),fr={};dr(fr,{languages:()=>ns,options:()=>is,parsers:()=>tn,printers:()=>mu});var hn=(e,t,r,n)=>{if(!(e&&t==null))return t.replaceAll?t.replaceAll(r,n):r.global?t.replace(r,n):t.split(r).join(n)},L=hn,vr="string",Cr="array",yr="cursor",rt="indent",nt="align",Sr="trim",at="group",it="fill",st="if-break",ut="indent-if-break",br="line-suffix",_r="line-suffix-boundary",Z="line",wr="label",ot="break-parent",Ar=new Set([yr,rt,nt,Sr,at,it,st,ut,br,_r,Z,wr,ot]),dn=(e,t,r)=>{if(!(e&&t==null))return Array.isArray(t)||typeof t=="string"?t[r<0?t.length+r:r]:t.at(r)},de=dn;function mn(e){if(typeof e=="string")return vr;if(Array.isArray(e))return Cr;if(!e)return;let{type:t}=e;if(Ar.has(t))return t}var kr=mn,gn=(e)=>new Intl.ListFormat("en-US",{type:"disjunction"}).format(e);function fn(e){let t=e===null?"null":typeof e;if(t!=="string"&&t!=="object")return`Unexpected doc '${t}',
2
+ import"./chunk-4sazy0nq.js";var pr=Object.defineProperty,hr=(e)=>{throw TypeError(e)},cn=(e,t,r)=>(t in e)?pr(e,t,{enumerable:!0,configurable:!0,writable:!0,value:r}):e[t]=r,dr=(e,t)=>{for(var r in t)pr(e,r,{get:t[r],enumerable:!0})},kt=(e,t,r)=>cn(e,typeof t!="symbol"?t+"":t,r),mr=(e,t,r)=>t.has(e)||hr("Cannot "+r),F=(e,t,r)=>(mr(e,t,"read from private field"),r?r.call(e):t.get(e)),gr=(e,t,r)=>t.has(e)?hr("Cannot add the same private member more than once"):t instanceof WeakSet?t.add(e):t.set(e,r),pn=(e,t,r,n)=>(mr(e,t,"write to private field"),n?n.call(e,r):t.set(e,r),r),fr={};dr(fr,{languages:()=>ns,options:()=>is,parsers:()=>tn,printers:()=>mu});var hn=(e,t,r,n)=>{if(!(e&&t==null))return t.replaceAll?t.replaceAll(r,n):r.global?t.replace(r,n):t.split(r).join(n)},L=hn,vr="string",Cr="array",yr="cursor",rt="indent",nt="align",Sr="trim",at="group",it="fill",st="if-break",ut="indent-if-break",br="line-suffix",_r="line-suffix-boundary",Z="line",wr="label",ot="break-parent",Ar=new Set([yr,rt,nt,Sr,at,it,st,ut,br,_r,Z,wr,ot]),dn=(e,t,r)=>{if(!(e&&t==null))return Array.isArray(t)||typeof t=="string"?t[r<0?t.length+r:r]:t.at(r)},de=dn;function mn(e){if(typeof e=="string")return vr;if(Array.isArray(e))return Cr;if(!e)return;let{type:t}=e;if(Ar.has(t))return t}var kr=mn,gn=(e)=>new Intl.ListFormat("en-US",{type:"disjunction"}).format(e);function fn(e){let t=e===null?"null":typeof e;if(t!=="string"&&t!=="object")return`Unexpected doc '${t}',
3
3
  Expected it to be 'string' or 'object'.`;if(kr(e))throw Error("doc is valid.");let r=Object.prototype.toString.call(e);if(r!=="[object Object]")return`Unexpected doc '${r}'.`;let n=gn([...Ar].map((a)=>`'${a}'`));return`Unexpected doc.type '${e.type}'.
4
4
  Expected it to be ${n}.`}var vn=class extends Error{name="InvalidDocError";constructor(e){super(fn(e)),this.doc=e}},Cn=vn;function Er(e,t){if(typeof e=="string")return t(e);let r=new Map;return n(e);function n(i){if(r.has(i))return r.get(i);let s=a(i);return r.set(i,s),s}function a(i){switch(kr(i)){case Cr:return t(i.map(n));case it:return t({...i,parts:i.parts.map(n)});case st:return t({...i,breakContents:n(i.breakContents),flatContents:n(i.flatContents)});case at:{let{expandedStates:s,contents:u}=i;return s?(s=s.map(n),u=s[0]):u=n(u),t({...i,contents:u,expandedStates:s})}case nt:case rt:case ut:case wr:case br:return t({...i,contents:n(i.contents)});case vr:case yr:case Sr:case _r:case Z:case ot:return t(i);default:throw new Cn(i)}}}function P(e,t=kn){return Er(e,(r)=>typeof r=="string"?ee(t,r.split(`
5
5
  `)):r)}var lt=()=>{},$=lt,xr=lt,yn=lt;function H(e){return $(e),{type:rt,contents:e}}function Dr(e,t){return $(t),{type:nt,contents:t,n:e}}function k(e,t={}){return $(e),xr(t.expandedStates,!0),{type:at,id:t.id,contents:e,break:!!t.shouldBreak,expandedStates:t.expandedStates}}function Sn(e){return Dr(Number.NEGATIVE_INFINITY,e)}function bn(e){return Dr({type:"root"},e)}function Tr(e){return yn(e),{type:it,parts:e}}function xe(e,t="",r={}){return $(e),t!==""&&$(t),{type:st,breakContents:e,flatContents:t,groupId:r.groupId}}function _n(e,t){return $(e),{type:ut,contents:e,groupId:t.groupId,negate:t.negate}}var me={type:ot},wn={type:Z,hard:!0},An={type:Z,hard:!0,literal:!0},_={type:Z},D={type:Z,soft:!0},y=[wn,me],kn=[An,me];function ee(e,t){$(e),xr(t);let r=[];for(let n=0;n<t.length;n++)n!==0&&r.push(e),r.push(t[n]);return r}var Se="'",Et='"';function En(e,t){let r=t===!0||t===Se?Se:Et,n=r===Se?Et:Se,a=0,i=0;for(let s of e)s===r?a++:s===n&&i++;return a>i?n:r}var xn=En;function Dn(e){if(typeof e!="string")throw TypeError("Expected a string");return e.replace(/[|\\{}()[\]^$+*?.]/g,"\\$&").replace(/-/g,"\\x2d")}var N,Tn=class{constructor(e){gr(this,N),pn(this,N,new Set(e))}getLeadingWhitespaceCount(e){let t=F(this,N),r=0;for(let n=0;n<e.length&&t.has(e.charAt(n));n++)r++;return r}getTrailingWhitespaceCount(e){let t=F(this,N),r=0;for(let n=e.length-1;n>=0&&t.has(e.charAt(n));n--)r++;return r}getLeadingWhitespace(e){let t=this.getLeadingWhitespaceCount(e);return e.slice(0,t)}getTrailingWhitespace(e){let t=this.getTrailingWhitespaceCount(e);return e.slice(e.length-t)}hasLeadingWhitespace(e){return F(this,N).has(e.charAt(0))}hasTrailingWhitespace(e){return F(this,N).has(de(!1,e,-1))}trimStart(e){let t=this.getLeadingWhitespaceCount(e);return e.slice(t)}trimEnd(e){let t=this.getTrailingWhitespaceCount(e);return e.slice(0,e.length-t)}trim(e){return this.trimEnd(this.trimStart(e))}split(e,t=!1){let r=`[${Dn([...F(this,N)].join(""))}]+`,n=new RegExp(t?`(${r})`:r,"u");return e.split(n)}hasWhitespaceCharacter(e){let t=F(this,N);return Array.prototype.some.call(e,(r)=>t.has(r))}hasNonWhitespaceCharacter(e){let t=F(this,N);return Array.prototype.some.call(e,(r)=>!t.has(r))}isWhitespaceOnly(e){let t=F(this,N);return Array.prototype.every.call(e,(r)=>t.has(r))}};N=new WeakMap;var Bn=Tn,Ln=["\t",`
@@ -0,0 +1,2 @@
1
+ // @bun
2
+ import{kQ as t}from"./chunk-4sazy0nq.js";var e=await import("./chunk-ps9p14y6.js",{with:{type:"file"}}),a=e.default;export{a as default};
@@ -0,0 +1,3 @@
1
+ // @bun
2
+ import{Pd as a}from"./chunk-9xvctnjr.js";import{Pf as d}from"./chunk-z7vv0ngm.js";import{Sf as i}from"./chunk-9s4whpg1.js";import{Ql as p,Sl as n}from"./chunk-sp8ek94w.js";import"./chunk-gnt982jr.js";import{Ro as f}from"./chunk-1bx2sjn6.js";import"./chunk-qdcf1ay5.js";import"./chunk-45mjcxqk.js";import"./chunk-qqne79vp.js";import"./chunk-kb6v5hhm.js";import"./chunk-qyjt0qnq.js";import"./chunk-xdjwapwy.js";import"./chunk-cxtxvt43.js";import"./chunk-871f8x99.js";import"./chunk-cx7p4ezk.js";import"./chunk-p8kpqyxb.js";import"./chunk-3sz6gw10.js";import"./chunk-v0yxkq99.js";import{tu as m}from"./chunk-2pzvcpv4.js";import"./chunk-kmtfdky8.js";import"./chunk-vc4e6xc4.js";import"./chunk-hnz570f9.js";import"./chunk-tdmn21z0.js";import"./chunk-s8mghr5a.js";import"./chunk-pqnbdygz.js";import"./chunk-ydc6ypjt.js";import"./chunk-4sazy0nq.js";import{spawn as y}from"child_process";import{Database as g}from"bun:sqlite";import{EOL as l}from"os";var b=a({command:"$0 [query]",describe:"open an interactive sqlite3 shell or run a query",builder:(t)=>{return t.positional("query",{type:"string",describe:"SQL query to execute"}).option("format",{type:"string",choices:["json","tsv"],default:"tsv",describe:"Output format"})},handler:async(t)=>{let o=t.query;if(o){let r=new g(n.Path,{readonly:!0});try{let e=r.query(o).all();if(t.format==="json")console.log(JSON.stringify(e,null,2));else if(e.length>0){let s=Object.keys(e[0]);console.log(s.join("\t"));for(let u of e)console.log(s.map((h)=>u[h]).join("\t"))}}catch(e){i.error(m(e)),process.exit(1)}r.close();return}let c=y("sqlite3",[n.Path],{stdio:"inherit"});await new Promise((r)=>c.on("close",r))}}),w=a({command:"path",describe:"print the database path",handler:()=>{console.log(n.Path)}}),q=a({command:"migrate",describe:"migrate JSON data to SQLite (merges with existing data)",handler:async()=>{let t=new g(n.Path),o=process.stderr.isTTY,c=-1;if(o)process.stderr.write("\x1B[?25l");try{let r=await p.run(f({client:t}),{progress:(e)=>{let s=Math.floor(e.current/e.total*100);if(s===c)return;if(c=s,o)process.stderr.write(d(s,`${e.current}/${e.total}`)+" ");else process.stderr.write(`sqlite-migration:${s}${l}`)}});if(o)process.stderr.write(`
3
+ `);if(o)process.stderr.write("\x1B[?25h");else process.stderr.write(`sqlite-migration:done${l}`);if(i.println(`Migration complete: ${r.projects} projects, ${r.sessions} sessions, ${r.messages} messages`),r.errors.length>0)i.println(`${r.errors.length} errors occurred during migration`)}catch(r){if(o)process.stderr.write("\x1B[?25h");i.error(`Migration failed: ${m(r)}`),process.exit(1)}finally{t.close()}}}),v=a({command:"db",describe:"database tools",builder:(t)=>{return t.command(b).command(w).command(q).demandCommand()},handler:()=>{}});export{v as DbCommand};
@@ -0,0 +1,2 @@
1
+ // @bun
2
+ import{Gd as q,Hd as K,Id as D,Ld as L,Md as N}from"./chunk-7jhrxzjx.js";import"./chunk-jcjaw7tk.js";import{Sf as B}from"./chunk-9s4whpg1.js";import{Xg as G}from"./chunk-sv1s1qxd.js";import"./chunk-n7d9eemn.js";import"./chunk-pxx2hz0g.js";import"./chunk-rexdr63q.js";import"./chunk-kqhh2pm9.js";import"./chunk-7fawtcnn.js";import"./chunk-mdzzcrf9.js";import"./chunk-wev34grp.js";import"./chunk-rtdym35y.js";import{ul as C}from"./chunk-5myxjxae.js";import"./chunk-sp8ek94w.js";import"./chunk-gnt982jr.js";import"./chunk-1bx2sjn6.js";import"./chunk-17pxm5d3.js";import"./chunk-n38h109k.js";import"./chunk-25bp7pcm.js";import"./chunk-qdcf1ay5.js";import"./chunk-45mjcxqk.js";import"./chunk-qqne79vp.js";import"./chunk-64s7vfj7.js";import"./chunk-xjhezxft.js";import"./chunk-gwfx7tx7.js";import"./chunk-1wpjmwnh.js";import"./chunk-cqtkxwd8.js";import"./chunk-ymtcm4xd.js";import"./chunk-yykjvt7f.js";import"./chunk-3mepk08v.js";import"./chunk-atpzz901.js";import"./chunk-0g25z230.js";import"./chunk-w9pdvcf9.js";import"./chunk-4gs87ghj.js";import"./chunk-kb6v5hhm.js";import"./chunk-qyjt0qnq.js";import"./chunk-xdjwapwy.js";import"./chunk-cxtxvt43.js";import"./chunk-871f8x99.js";import"./chunk-cx7p4ezk.js";import"./chunk-tgd5ctnt.js";import"./chunk-p8kpqyxb.js";import"./chunk-3sz6gw10.js";import"./chunk-twhavv1m.js";import{Rt as J}from"./chunk-v0yxkq99.js";import"./chunk-2pzvcpv4.js";import"./chunk-kmtfdky8.js";import"./chunk-vc4e6xc4.js";import"./chunk-hnz570f9.js";import"./chunk-tdmn21z0.js";import"./chunk-s8mghr5a.js";import"./chunk-pqnbdygz.js";import"./chunk-ydc6ypjt.js";import"./chunk-ev3a2sxv.js";import"./chunk-pnq1h5az.js";import"./chunk-4sazy0nq.js";var X={command:"upgrade [target]",describe:"upgrade qitqode to the latest or a specific version",builder:(z)=>{return z.positional("target",{describe:"version to upgrade to, for ex '0.1.48' or 'v0.1.48'",type:"string"}).option("method",{alias:"m",describe:"installation method to use",type:"string",choices:["curl","npm","pnpm","bun","brew","choco","scoop"]})},handler:async(z)=>{B.empty(),B.println(B.logo(" ")),B.empty(),K("Upgrade");let O=await G.runPromise(C.Service.use((j)=>j.method())),E=z.method??O;if(E==="unknown"){if(q.error(`qitqode is installed to ${process.execPath} and may be managed by a package manager`),!await N({message:"Install anyways?",options:[{label:"Yes",value:!0},{label:"No",value:!1}],initialValue:!1})){D("Done");return}}q.info("Using method: "+E);let F=z.target?z.target.replace(/^v/,""):await G.runPromise(C.Service.use((j)=>j.latest()));if(J===F){q.warn(`qitqode upgrade skipped: ${F} is already installed`),D("Done");return}q.info(`From ${J} \u2192 ${F}`);let H=L();H.start("Upgrading...");let x=await G.runPromise(C.Service.use((j)=>j.upgrade(E,F))).catch((j)=>j);if(x){if(H.stop("Upgrade failed",1),x instanceof C.UpgradeFailedError)if(E==="choco"&&x.stderr.includes("not running from an elevated command shell"))q.error("Please run the terminal as Administrator and try again");else q.error(x.stderr);else if(x instanceof Error)q.error(x.message);D("Done");return}H.stop("Upgrade complete"),D("Done")}};export{X as UpgradeCommand};
@@ -0,0 +1,2 @@
1
+ // @bun
2
+ import{gs as M}from"./chunk-4gs87ghj.js";import{fQ as B}from"./chunk-pnq1h5az.js";import{gQ as b,hQ as X,kQ as V}from"./chunk-4sazy0nq.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};