@intent-hq/web 2.345.0 → 2.346.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 (364) hide show
  1. package/package.json +1 -1
  2. package/web/app/immutable/assets/{0.BtTQsuHZ.css → 0.C6uvaa87.css} +1 -1
  3. package/web/app/immutable/chunks/-UJlOg-6.js +1 -0
  4. package/web/app/immutable/chunks/-Wo302Zr.js +9 -0
  5. package/web/app/immutable/chunks/0qEvU7Aj.js +8 -0
  6. package/web/app/immutable/chunks/1_fC7X8z.js +1 -0
  7. package/web/app/immutable/chunks/2V4-p70U.js +408 -0
  8. package/web/app/immutable/chunks/{D3mUsAm9.js → 3DAIKGff.js} +1 -1
  9. package/web/app/immutable/chunks/{6Zmm5CZL.js → 3as4gwP9.js} +7 -7
  10. package/web/app/immutable/chunks/{BqRoJfH0.js → 3h5ZjEwa.js} +1 -1
  11. package/web/app/immutable/chunks/{Dz4sFk1c.js → 4sUGQp1u.js} +1 -1
  12. package/web/app/immutable/chunks/{fZqvRnJh.js → 5Ixgq0WC.js} +1 -1
  13. package/web/app/immutable/chunks/{CgQ2Q_uI.js → 71L4lHBq.js} +1 -1
  14. package/web/app/immutable/chunks/7eL9Pgig.js +1 -0
  15. package/web/app/immutable/chunks/{CWE4oREl.js → 9XVQ1GVX.js} +1 -1
  16. package/web/app/immutable/chunks/{C8dU7SM3.js → A8_BT67P.js} +1 -1
  17. package/web/app/immutable/chunks/ACNn9MHT.js +2 -0
  18. package/web/app/immutable/chunks/{Cv_J2c72.js → B-7vt8Nv.js} +1 -1
  19. package/web/app/immutable/chunks/B0-4rCYZ.js +2 -0
  20. package/web/app/immutable/chunks/{Chj7QpdD.js → B0WVH3Hg.js} +1 -1
  21. package/web/app/immutable/chunks/B0mNIdOb.js +1 -0
  22. package/web/app/immutable/chunks/{CWQrbZgx.js → B1HPKTBI.js} +1 -1
  23. package/web/app/immutable/chunks/{s_GzTTEG.js → B1U_DCBw.js} +1 -1
  24. package/web/app/immutable/chunks/{VyOfhH-C.js → B3D9gAmi.js} +1 -1
  25. package/web/app/immutable/chunks/{C-M7eh_Z.js → B4XZNQ4a.js} +1 -1
  26. package/web/app/immutable/chunks/{BqqN40AD.js → B4gIvcP2.js} +1 -1
  27. package/web/app/immutable/chunks/{C4dCVzfY.js → B55-cQLT.js} +1 -1
  28. package/web/app/immutable/chunks/B5HeJKYE.js +1 -0
  29. package/web/app/immutable/chunks/{Dlag9Uxb.js → B79pUPc3.js} +9 -9
  30. package/web/app/immutable/chunks/{34C5M9lk.js → B7dTLx8u.js} +1 -1
  31. package/web/app/immutable/chunks/B83M2_sj.js +1 -0
  32. package/web/app/immutable/chunks/BAGVOK-j.js +4 -0
  33. package/web/app/immutable/chunks/{DXDMhDlS.js → BBlTlRXR.js} +1 -1
  34. package/web/app/immutable/chunks/{D3I0DcnM.js → BDDEv5gU.js} +1 -1
  35. package/web/app/immutable/chunks/BDPAYMJ1.js +4 -0
  36. package/web/app/immutable/chunks/BDPqCRJm.js +2 -0
  37. package/web/app/immutable/chunks/{B0a-wzQr.js → BDZoh7yg.js} +1 -1
  38. package/web/app/immutable/chunks/{oilydQC6.js → BDtb6AfX.js} +1 -1
  39. package/web/app/immutable/chunks/{oxLL7zSC.js → BDzYiKUH.js} +3 -3
  40. package/web/app/immutable/chunks/{PwvNS9aJ.js → BJZ04Dji.js} +1 -1
  41. package/web/app/immutable/chunks/{A34-FDia.js → BK2lpqz4.js} +1 -1
  42. package/web/app/immutable/chunks/{BC2xxkKo.js → BK64B_Ic.js} +7 -7
  43. package/web/app/immutable/chunks/{8XhHIJcn.js → BKw5KoGy.js} +1 -1
  44. package/web/app/immutable/chunks/{1MWULgfl.js → BLaIjbEF.js} +1 -1
  45. package/web/app/immutable/chunks/{BkbQGifa.js → BLl22NdQ.js} +1 -1
  46. package/web/app/immutable/chunks/{ByTOmivs.js → BM7oCSp5.js} +1 -1
  47. package/web/app/immutable/chunks/{C8BVjzNA.js → BMKkyPLo.js} +1 -1
  48. package/web/app/immutable/chunks/BO8NImWp.js +1 -0
  49. package/web/app/immutable/chunks/BOxkenyY.js +1 -0
  50. package/web/app/immutable/chunks/{CW_fORnH.js → BOyF7pe9.js} +1 -1
  51. package/web/app/immutable/chunks/BQ5F0iVp.js +1 -0
  52. package/web/app/immutable/chunks/BQbcEQz0.js +1 -0
  53. package/web/app/immutable/chunks/{DW36BCXj.js → BTNEDHav.js} +1 -1
  54. package/web/app/immutable/chunks/{zN8eBYty.js → BVURea8L.js} +1 -1
  55. package/web/app/immutable/chunks/{C6WI65lc.js → BW9EApvt.js} +10 -10
  56. package/web/app/immutable/chunks/BWAGtvpD.js +1 -0
  57. package/web/app/immutable/chunks/BWTugGQ8.js +1 -0
  58. package/web/app/immutable/chunks/{D_2_kcuU.js → BWZmCaEW.js} +1 -1
  59. package/web/app/immutable/chunks/{Bj3n1RUK.js → BY3nRRgO.js} +3 -3
  60. package/web/app/immutable/chunks/{DZxSFexp.js → BYDvuR-h.js} +1 -1
  61. package/web/app/immutable/chunks/{CaGwo1Kh.js → BZYeogxf.js} +1 -1
  62. package/web/app/immutable/chunks/{RvvsGyv8.js → Ba1C4iSG.js} +1 -1
  63. package/web/app/immutable/chunks/{DSf8k2cE.js → BaYeKXL3.js} +1 -1
  64. package/web/app/immutable/chunks/{BZLRqiW7.js → BaYzTmbw.js} +1 -1
  65. package/web/app/immutable/chunks/Bbkml6DP.js +1 -0
  66. package/web/app/immutable/chunks/{9HNwwiNt.js → BcbQZUsh.js} +1 -1
  67. package/web/app/immutable/chunks/BcgSXbtK.js +1 -0
  68. package/web/app/immutable/chunks/{DLJVFWjT.js → BeJ5WWx4.js} +22 -22
  69. package/web/app/immutable/chunks/{A0r9TbR7.js → BfbZn9QX.js} +1 -1
  70. package/web/app/immutable/chunks/BgKhYgm8.js +1 -0
  71. package/web/app/immutable/chunks/Bgi2L8Br.js +1 -0
  72. package/web/app/immutable/chunks/Bgw3O9rE.js +1 -0
  73. package/web/app/immutable/chunks/Big_dnEI.js +1 -0
  74. package/web/app/immutable/chunks/{D6yqDOhs.js → BjURBDIt.js} +5 -5
  75. package/web/app/immutable/chunks/{CJ58g2zu.js → BlEwAz4v.js} +1 -1
  76. package/web/app/immutable/chunks/{BUGXi07N.js → BmEcZoA2.js} +1 -1
  77. package/web/app/immutable/chunks/{Bb-m1QhD.js → BnkmaA34.js} +1 -1
  78. package/web/app/immutable/chunks/BpYNQf9o.js +1 -0
  79. package/web/app/immutable/chunks/{m3ndyWcI.js → BqBqZaGQ.js} +1 -1
  80. package/web/app/immutable/chunks/{D419Hgek.js → BqyYlCY3.js} +1 -1
  81. package/web/app/immutable/chunks/BrIsEZwT.js +1 -0
  82. package/web/app/immutable/chunks/Brqq8vhd.js +6 -0
  83. package/web/app/immutable/chunks/{Dx41gQiN.js → Bxnf75xq.js} +1 -1
  84. package/web/app/immutable/chunks/ByLCbaqp.js +1 -0
  85. package/web/app/immutable/chunks/{xOJeCqJf.js → C-OtpXcF.js} +1 -1
  86. package/web/app/immutable/chunks/{B7w_8Qom.js → C1CDOGnh.js} +2 -2
  87. package/web/app/immutable/chunks/C1osWUn_.js +1 -0
  88. package/web/app/immutable/chunks/{BI7MYBTt.js → C33Dw59E.js} +1 -1
  89. package/web/app/immutable/chunks/{BMm9sGZ6.js → C3NeTp2u.js} +1 -1
  90. package/web/app/immutable/chunks/{DdSX2jjJ.js → C3VPe7p1.js} +1 -1
  91. package/web/app/immutable/chunks/{BYMNRS4c.js → C3oF1SK5.js} +1 -1
  92. package/web/app/immutable/chunks/{CW13jkE8.js → C4HHXGmJ.js} +1 -1
  93. package/web/app/immutable/chunks/{ByCIOkhM.js → C59or46M.js} +1 -1
  94. package/web/app/immutable/chunks/{CL2hu5s-.js → C5SissXF.js} +1 -1
  95. package/web/app/immutable/chunks/{C-ZPZDJB.js → C8XrM-qb.js} +1 -1
  96. package/web/app/immutable/chunks/CA6TS0WC.js +1 -0
  97. package/web/app/immutable/chunks/CAUaU8Wh.js +1 -0
  98. package/web/app/immutable/chunks/CAdgzoaK.js +1 -0
  99. package/web/app/immutable/chunks/{BrRRz1w6.js → CCm1BgPl.js} +1 -1
  100. package/web/app/immutable/chunks/CDbQwqu1.js +1 -0
  101. package/web/app/immutable/chunks/CEsW1euQ.js +1 -0
  102. package/web/app/immutable/chunks/{CYEd8dKU.js → CFs6uWH2.js} +1 -1
  103. package/web/app/immutable/chunks/{D6YDmdhV.js → CGcQAX9W.js} +1 -1
  104. package/web/app/immutable/chunks/{CVYjvOCP.js → CHfmHJ17.js} +1 -1
  105. package/web/app/immutable/chunks/{DwKUz42C.js → CJ_dtcmM.js} +1 -1
  106. package/web/app/immutable/chunks/{DqvXXMrh.js → CNT1n9YR.js} +1 -1
  107. package/web/app/immutable/chunks/CP8WYBBE.js +1 -0
  108. package/web/app/immutable/chunks/{DtKh4Q6Q.js → CQB76zlc.js} +1 -1
  109. package/web/app/immutable/chunks/{DpMTpLDQ.js → CQbtnalz.js} +1 -1
  110. package/web/app/immutable/chunks/{CNIUwMPp.js → CQyjMIYw.js} +1 -1
  111. package/web/app/immutable/chunks/CSQXURhP.js +1 -0
  112. package/web/app/immutable/chunks/{DnpnDt-B.js → CSg3z6A2.js} +1 -1
  113. package/web/app/immutable/chunks/{m18NZZRr.js → CVa6MqnK.js} +1 -1
  114. package/web/app/immutable/chunks/{DInreQbI.js → CXVUfxHv.js} +2 -2
  115. package/web/app/immutable/chunks/{C0p8rhDn.js → CXpFRnSj.js} +1 -1
  116. package/web/app/immutable/chunks/C_EpV6jU.js +2 -0
  117. package/web/app/immutable/chunks/Cb0zVN4i.js +1 -0
  118. package/web/app/immutable/chunks/{BP7CI4Qx.js → CbZEAbX5.js} +1 -1
  119. package/web/app/immutable/chunks/{BqQiAH0O.js → CcaAQlGA.js} +1 -1
  120. package/web/app/immutable/chunks/CgLoJgPR.js +1 -0
  121. package/web/app/immutable/chunks/{B4ilKCwe.js → CguBowm8.js} +1 -1
  122. package/web/app/immutable/chunks/{Ds3Wirif.js → ChNPgGKQ.js} +1 -1
  123. package/web/app/immutable/chunks/{B203wRvP.js → Chpqmkx4.js} +1 -1
  124. package/web/app/immutable/chunks/{DbK3CxeL.js → CiIELmgj.js} +1 -1
  125. package/web/app/immutable/chunks/CiKocWhX.js +1 -0
  126. package/web/app/immutable/chunks/{BYtSPAAW.js → CjbCpI18.js} +1 -1
  127. package/web/app/immutable/chunks/{BvZrnx87.js → Ckp5dOHW.js} +1 -1
  128. package/web/app/immutable/chunks/{BfZCAeqU.js → ClMg3ew2.js} +1 -1
  129. package/web/app/immutable/chunks/{A8JjhnEv.js → Clhk_Z-l.js} +1 -1
  130. package/web/app/immutable/chunks/{CXNfY5OA.js → CmoBwSCp.js} +1 -1
  131. package/web/app/immutable/chunks/{B5tGFpkq.js → CpHzYkzi.js} +1 -1
  132. package/web/app/immutable/chunks/{p3fN-Vr3.js → Cq2aackv.js} +1 -1
  133. package/web/app/immutable/chunks/Cq8oeEXe.js +1 -0
  134. package/web/app/immutable/chunks/CrHk5l6X.js +1 -0
  135. package/web/app/immutable/chunks/{BUdcKH65.js → CrjpdU4V.js} +1 -1
  136. package/web/app/immutable/chunks/CswFIiBb.js +1 -0
  137. package/web/app/immutable/chunks/{BA3fud46.js → CtDj7gZD.js} +1 -1
  138. package/web/app/immutable/chunks/{CaXjFtDt.js → CvGEpOsC.js} +1 -1
  139. package/web/app/immutable/chunks/CvHwMug-.js +2 -0
  140. package/web/app/immutable/chunks/{CaxyE6o_.js → Cx31i8ng.js} +1 -1
  141. package/web/app/immutable/chunks/CzcD2H5U.js +2 -0
  142. package/web/app/immutable/chunks/CzdMU9Bu.js +2 -0
  143. package/web/app/immutable/chunks/{CKzqOQI8.js → D-TVq_rK.js} +1 -1
  144. package/web/app/immutable/chunks/{ChY17Glq.js → D-i7C44m.js} +2 -2
  145. package/web/app/immutable/chunks/{DDfvytcD.js → D0I9E6A0.js} +1 -1
  146. package/web/app/immutable/chunks/{DYk0s6f0.js → D1CYDv8t.js} +1 -1
  147. package/web/app/immutable/chunks/{BuTNFoR8.js → D31IcU1_.js} +1 -1
  148. package/web/app/immutable/chunks/{DDMEgpvU.js → D3toWTag.js} +8 -8
  149. package/web/app/immutable/chunks/{Bywuf0q4.js → D492HRYt.js} +1 -1
  150. package/web/app/immutable/chunks/{BkNc2eFX.js → D7NdkRF-.js} +4 -4
  151. package/web/app/immutable/chunks/{GETqdV-9.js → D7dPbXji.js} +1 -1
  152. package/web/app/immutable/chunks/D9jYN6_J.js +1 -0
  153. package/web/app/immutable/chunks/{n58mTCVv.js → D9jvlcNy.js} +1 -1
  154. package/web/app/immutable/chunks/{BabPi6C5.js → DByMRbHr.js} +1 -1
  155. package/web/app/immutable/chunks/{aETzmnsD.js → DDySjsub.js} +1 -1
  156. package/web/app/immutable/chunks/{B9Hetctu.js → DE8QOEZV.js} +1 -1
  157. package/web/app/immutable/chunks/{DCDhq2rq.js → DF1uIj8u.js} +1 -1
  158. package/web/app/immutable/chunks/{BYFJ74nm.js → DFs6FJS8.js} +1 -1
  159. package/web/app/immutable/chunks/{CgW9XFcu.js → DGmRhalF.js} +1 -1
  160. package/web/app/immutable/chunks/DH-29Rs_.js +11 -0
  161. package/web/app/immutable/chunks/{B3kzQQLK.js → DHGSAfCZ.js} +1 -1
  162. package/web/app/immutable/chunks/DHROL4K5.js +1 -0
  163. package/web/app/immutable/chunks/DKKFIb2l.js +1 -0
  164. package/web/app/immutable/chunks/DKTqwHrN.js +1 -0
  165. package/web/app/immutable/chunks/DMYKSC8W.js +2 -0
  166. package/web/app/immutable/chunks/{-7ARPWgR.js → DMjNjha0.js} +1 -1
  167. package/web/app/immutable/chunks/{C1nHAGLu.js → DNWBkvFP.js} +1 -1
  168. package/web/app/immutable/chunks/DNjgs7AU.js +1 -0
  169. package/web/app/immutable/chunks/{DkQ7I_3J.js → DOB2ATTF.js} +5 -5
  170. package/web/app/immutable/chunks/{BTWq1_ry.js → DOCWMdWU.js} +1 -1
  171. package/web/app/immutable/chunks/{Bc6DihnT.js → DOKxXiSI.js} +18 -18
  172. package/web/app/immutable/chunks/DOPeTAKk.js +13 -0
  173. package/web/app/immutable/chunks/{PrJr0a2j.js → DPUWJyjX.js} +1 -1
  174. package/web/app/immutable/chunks/{_xNtAuSN.js → DQlH_Wce.js} +1 -1
  175. package/web/app/immutable/chunks/{BIEvH8pu.js → DRZKWEq3.js} +1 -1
  176. package/web/app/immutable/chunks/DTSEdINd.js +2 -0
  177. package/web/app/immutable/chunks/{j5aoAM0N.js → DUQV_xq3.js} +1 -1
  178. package/web/app/immutable/chunks/{Dsmvkh8d.js → DW9MEQey.js} +1 -1
  179. package/web/app/immutable/chunks/{BL8tUtYB.js → DXnd4CJZ.js} +1 -1
  180. package/web/app/immutable/chunks/DYnCJwSs.js +1 -0
  181. package/web/app/immutable/chunks/DZ3SUe8R.js +1 -0
  182. package/web/app/immutable/chunks/{BmP1Wws6.js → DZyAzxxC.js} +1 -1
  183. package/web/app/immutable/chunks/D_SZXZdx.js +1 -0
  184. package/web/app/immutable/chunks/{BhMsVKL2.js → DcZKw8cP.js} +2 -2
  185. package/web/app/immutable/chunks/{B9x-giji.js → DccrGg38.js} +22 -22
  186. package/web/app/immutable/chunks/DcwC09tE.js +1 -0
  187. package/web/app/immutable/chunks/{Bvc8qRhk.js → DdVIXVso.js} +1 -1
  188. package/web/app/immutable/chunks/DeCAcSD9.js +19 -0
  189. package/web/app/immutable/chunks/DfjJilaB.js +2 -0
  190. package/web/app/immutable/chunks/{XzMpMF29.js → DgHZa_R5.js} +1 -1
  191. package/web/app/immutable/chunks/{ZI2UcNVx.js → DgwMMJRI.js} +1 -1
  192. package/web/app/immutable/chunks/{CVoXekIe.js → DhHSeQsG.js} +3 -3
  193. package/web/app/immutable/chunks/{CG3imlyr.js → Dj8J0eqI.js} +1 -1
  194. package/web/app/immutable/chunks/DjdPlKc4.js +2 -0
  195. package/web/app/immutable/chunks/{finAdq6c.js → DknPpgEW.js} +1 -1
  196. package/web/app/immutable/chunks/Dkr_RXdV.js +1 -0
  197. package/web/app/immutable/chunks/Dkva_evl.js +11 -0
  198. package/web/app/immutable/chunks/{7teYU7wH.js → Do80Vc58.js} +1 -1
  199. package/web/app/immutable/chunks/{X8W_BfF4.js → Dr45ln4z.js} +1 -1
  200. package/web/app/immutable/chunks/DryyHkNv.js +1 -0
  201. package/web/app/immutable/chunks/{BdkEw9JP.js → DtAyUyC0.js} +1 -1
  202. package/web/app/immutable/chunks/Dto-4yb7.js +1 -0
  203. package/web/app/immutable/chunks/{CSdIXJpO.js → DukmxKgk.js} +1 -1
  204. package/web/app/immutable/chunks/{BwSA3fCS.js → DwA_Z_f6.js} +1 -1
  205. package/web/app/immutable/chunks/{Drt5qRI8.js → Dx3sZmi8.js} +1 -1
  206. package/web/app/immutable/chunks/{CcXuSxXv.js → DxBGs1BP.js} +1 -1
  207. package/web/app/immutable/chunks/{CeswpNyE.js → DzGNgfrZ.js} +1 -1
  208. package/web/app/immutable/chunks/DzKYjnRy.js +2 -0
  209. package/web/app/immutable/chunks/{HvBMlLJP.js → DzejiLWr.js} +3 -3
  210. package/web/app/immutable/chunks/{CBqGKeYg.js → G_wYaln-.js} +1 -1
  211. package/web/app/immutable/chunks/GzTl4Sb0.js +1 -0
  212. package/web/app/immutable/chunks/IRbjhecv.js +8 -0
  213. package/web/app/immutable/chunks/OPvMR-5p.js +1 -0
  214. package/web/app/immutable/chunks/{gURPJ1oX.js → SVZRr24P.js} +1 -1
  215. package/web/app/immutable/chunks/{DYmPPjiq.js → T9tywf_e.js} +1 -1
  216. package/web/app/immutable/chunks/TL85KYB9.js +1 -0
  217. package/web/app/immutable/chunks/{BgX4ALX_.js → U6cHmbYS.js} +3 -3
  218. package/web/app/immutable/chunks/{DLqztIqC.js → V9qci_dz.js} +1 -1
  219. package/web/app/immutable/chunks/{CpLvDQcH.js → W7sv3DY6.js} +1 -1
  220. package/web/app/immutable/chunks/{CrfXhNNb.js → WbTmlouE.js} +1 -1
  221. package/web/app/immutable/chunks/{BAxqzRwc.js → Y4VeEPHl.js} +1 -1
  222. package/web/app/immutable/chunks/{BVviSubD.js → YYacqJ9a.js} +1 -1
  223. package/web/app/immutable/chunks/{BdCclrfD.js → Zl17pAXX.js} +1 -1
  224. package/web/app/immutable/chunks/{BVt_T8ao.js → aQy6qVNs.js} +1 -1
  225. package/web/app/immutable/chunks/{C3SYquhf.js → ahX1JzRb.js} +1 -1
  226. package/web/app/immutable/chunks/{B0biUQQF.js → asQ_ruFQ.js} +1 -1
  227. package/web/app/immutable/chunks/{BGX6W-wu.js → bKyElw3h.js} +1 -1
  228. package/web/app/immutable/chunks/cATI0wnI.js +1 -0
  229. package/web/app/immutable/chunks/ciTxbtqU.js +1 -0
  230. package/web/app/immutable/chunks/d-Ep-sfP.js +1 -0
  231. package/web/app/immutable/chunks/dBZS3-kp.js +3 -0
  232. package/web/app/immutable/chunks/{Bk2z5Cd0.js → eNHX5lds.js} +1 -1
  233. package/web/app/immutable/chunks/etVaBLxV.js +6 -0
  234. package/web/app/immutable/chunks/euZ22sAu.js +1 -0
  235. package/web/app/immutable/chunks/{COrK0goa.js → ftma9Ybn.js} +1 -1
  236. package/web/app/immutable/chunks/fzs92dqr.js +1 -0
  237. package/web/app/immutable/chunks/i2sZiDEq.js +1 -0
  238. package/web/app/immutable/chunks/iKgBWWl-.js +2 -0
  239. package/web/app/immutable/chunks/{BXTuZcZW.js → jlJQSpH6.js} +1 -1
  240. package/web/app/immutable/chunks/{t_3vjEsA.js → ouMKS3MA.js} +1 -1
  241. package/web/app/immutable/chunks/{DpsFFL7J.js → s0TWEExr.js} +1 -1
  242. package/web/app/immutable/chunks/{XIXbmV8F.js → txy0Txom.js} +1 -1
  243. package/web/app/immutable/chunks/{CYf2hryc.js → wTgWcOy1.js} +1 -1
  244. package/web/app/immutable/chunks/{BIlaJXMS.js → z-RLr2Z1.js} +1 -1
  245. package/web/app/immutable/chunks/zGl9gaL0.js +1 -0
  246. package/web/app/immutable/chunks/{DXCE75Ih.js → z_Tdw9N5.js} +1 -1
  247. package/web/app/immutable/entry/app.BXnRxWvG.js +4 -0
  248. package/web/app/immutable/entry/start.BX3EKd8C.js +1 -0
  249. package/web/app/immutable/nodes/0.CFk1FXLg.js +1 -0
  250. package/web/app/immutable/nodes/1.Bd67D1tA.js +1 -0
  251. package/web/app/immutable/nodes/10.CTZ0L3wZ.js +41 -0
  252. package/web/app/immutable/nodes/11.CH_h0WbH.js +1 -0
  253. package/web/app/immutable/nodes/12.DhihsAtw.js +1 -0
  254. package/web/app/immutable/nodes/{13.CscEwLVK.js → 13.B727xJXs.js} +5 -5
  255. package/web/app/immutable/nodes/14.CgITgBOZ.js +3 -0
  256. package/web/app/immutable/nodes/15.CCzIPJGf.js +1 -0
  257. package/web/app/immutable/nodes/{16.Cfgb0nOQ.js → 16.CbtJfPHZ.js} +2 -2
  258. package/web/app/immutable/nodes/17.CelzCwXF.js +1 -0
  259. package/web/app/immutable/nodes/{17.yV85i6g8.js → 18.fqvApY-g.js} +2 -2
  260. package/web/app/immutable/nodes/2.t-1b60vK.js +13 -0
  261. package/web/app/immutable/nodes/3.4L0YPvZL.js +2 -0
  262. package/web/app/immutable/nodes/4.BLQgcpcU.js +1 -0
  263. package/web/app/immutable/nodes/5.Bp_OiOTI.js +5 -0
  264. package/web/app/immutable/nodes/6.CcuwCBp4.js +1 -0
  265. package/web/app/immutable/nodes/7.B-TRUT7o.js +1 -0
  266. package/web/app/immutable/nodes/{8.omc6d3jg.js → 8.CaG5gby5.js} +9 -9
  267. package/web/app/immutable/nodes/{9._4FUjrca.js → 9.DosMxTmg.js} +17 -17
  268. package/web/app/version.json +1 -1
  269. package/web/index.html +28 -21
  270. package/web/app/immutable/chunks/-6JGlnE4.js +0 -1
  271. package/web/app/immutable/chunks/-SwunqO3.js +0 -1
  272. package/web/app/immutable/chunks/2xvAjJNs.js +0 -1
  273. package/web/app/immutable/chunks/5MLUIYhU.js +0 -1
  274. package/web/app/immutable/chunks/B3lXnLB8.js +0 -2
  275. package/web/app/immutable/chunks/BBL1FO1t.js +0 -1
  276. package/web/app/immutable/chunks/BCASO_bV.js +0 -1
  277. package/web/app/immutable/chunks/BF-IM3Qf.js +0 -1
  278. package/web/app/immutable/chunks/BKYCO_49.js +0 -4
  279. package/web/app/immutable/chunks/BMMoYJAn.js +0 -1
  280. package/web/app/immutable/chunks/BP5uyQTv.js +0 -18
  281. package/web/app/immutable/chunks/BVPvh88-.js +0 -1
  282. package/web/app/immutable/chunks/BX3QD7rd.js +0 -1
  283. package/web/app/immutable/chunks/BXeiKdwz.js +0 -1
  284. package/web/app/immutable/chunks/BYU1cTbO.js +0 -2
  285. package/web/app/immutable/chunks/BZcpShp8.js +0 -9
  286. package/web/app/immutable/chunks/BbNk8c_P.js +0 -1
  287. package/web/app/immutable/chunks/Bba6So1V.js +0 -1
  288. package/web/app/immutable/chunks/Bc5_gcpq.js +0 -1
  289. package/web/app/immutable/chunks/BdD2ADMz.js +0 -1
  290. package/web/app/immutable/chunks/BlZYlbA9.js +0 -1
  291. package/web/app/immutable/chunks/BoCZH6mk.js +0 -1
  292. package/web/app/immutable/chunks/Bs26_0Q5.js +0 -2
  293. package/web/app/immutable/chunks/ByuX26Ym.js +0 -6
  294. package/web/app/immutable/chunks/C-MmtmWQ.js +0 -1
  295. package/web/app/immutable/chunks/C52Qm4vO.js +0 -1
  296. package/web/app/immutable/chunks/C5AlgdZ0.js +0 -1
  297. package/web/app/immutable/chunks/C8AARFCw.js +0 -2
  298. package/web/app/immutable/chunks/CAOA5kev.js +0 -2
  299. package/web/app/immutable/chunks/CEQZVenN.js +0 -6
  300. package/web/app/immutable/chunks/CN-2rfdx.js +0 -1
  301. package/web/app/immutable/chunks/CRQGIXhv.js +0 -1
  302. package/web/app/immutable/chunks/CWT4x6lB.js +0 -2
  303. package/web/app/immutable/chunks/CbCgON3R.js +0 -1
  304. package/web/app/immutable/chunks/CeT1zT46.js +0 -1
  305. package/web/app/immutable/chunks/Cfj3Lc6y.js +0 -1
  306. package/web/app/immutable/chunks/Cjpu4SJA.js +0 -1
  307. package/web/app/immutable/chunks/Ck9ZyE1n.js +0 -2
  308. package/web/app/immutable/chunks/CkSjvO0_.js +0 -1
  309. package/web/app/immutable/chunks/CoLl8pQb.js +0 -1
  310. package/web/app/immutable/chunks/CpadbTI2.js +0 -408
  311. package/web/app/immutable/chunks/CsxVJm8Y.js +0 -1
  312. package/web/app/immutable/chunks/CteSc0c_.js +0 -1
  313. package/web/app/immutable/chunks/CuhrgDBI.js +0 -1
  314. package/web/app/immutable/chunks/CvWyDJGm.js +0 -1
  315. package/web/app/immutable/chunks/CzVyzyWv.js +0 -2
  316. package/web/app/immutable/chunks/D6Wx8h-l.js +0 -11
  317. package/web/app/immutable/chunks/D8Ohjkn4.js +0 -3
  318. package/web/app/immutable/chunks/DATvyyct.js +0 -1
  319. package/web/app/immutable/chunks/DAoagkbK.js +0 -2
  320. package/web/app/immutable/chunks/DEjP-x_s.js +0 -1
  321. package/web/app/immutable/chunks/DFF9daPQ.js +0 -13
  322. package/web/app/immutable/chunks/DIP3ex32.js +0 -1
  323. package/web/app/immutable/chunks/DPDCu-py.js +0 -1
  324. package/web/app/immutable/chunks/DPR3VaPZ.js +0 -2
  325. package/web/app/immutable/chunks/DTQYcznv.js +0 -1
  326. package/web/app/immutable/chunks/DU8kuP6M.js +0 -1
  327. package/web/app/immutable/chunks/DZmwTozc.js +0 -1
  328. package/web/app/immutable/chunks/Dc64E_SR.js +0 -1
  329. package/web/app/immutable/chunks/Ddw98WmY.js +0 -8
  330. package/web/app/immutable/chunks/De4z9gHo.js +0 -1
  331. package/web/app/immutable/chunks/Dk6iNNLu.js +0 -1
  332. package/web/app/immutable/chunks/DlHB0ULA.js +0 -2
  333. package/web/app/immutable/chunks/DpHl7r8K.js +0 -1
  334. package/web/app/immutable/chunks/Dq3RHtWu.js +0 -1
  335. package/web/app/immutable/chunks/Dq3leYTy.js +0 -19
  336. package/web/app/immutable/chunks/Dq6CuXZE.js +0 -1
  337. package/web/app/immutable/chunks/DqJ-M21G.js +0 -1
  338. package/web/app/immutable/chunks/Dwyq6WEC.js +0 -1
  339. package/web/app/immutable/chunks/DxNbgJ8X.js +0 -2
  340. package/web/app/immutable/chunks/DzHHkfB1.js +0 -1
  341. package/web/app/immutable/chunks/EbDWf2Y-.js +0 -1
  342. package/web/app/immutable/chunks/Ek5W6pp5.js +0 -1
  343. package/web/app/immutable/chunks/H60Tbroe.js +0 -1
  344. package/web/app/immutable/chunks/JzAjTSJP.js +0 -1
  345. package/web/app/immutable/chunks/PPmweWGv.js +0 -2
  346. package/web/app/immutable/chunks/UYKGMt9K.js +0 -1
  347. package/web/app/immutable/chunks/X_y6HQmR.js +0 -1
  348. package/web/app/immutable/chunks/YNoNxkXn.js +0 -4
  349. package/web/app/immutable/entry/app.Ci0fqF_i.js +0 -4
  350. package/web/app/immutable/entry/start.DzDtsQrC.js +0 -1
  351. package/web/app/immutable/nodes/0.BJcKF537.js +0 -1
  352. package/web/app/immutable/nodes/1.Dj_1C4wl.js +0 -1
  353. package/web/app/immutable/nodes/10.DTBkzFBQ.js +0 -41
  354. package/web/app/immutable/nodes/11.C9N9_Xb9.js +0 -1
  355. package/web/app/immutable/nodes/12.CqRfopX4.js +0 -1
  356. package/web/app/immutable/nodes/14.BDOAvRMB.js +0 -3
  357. package/web/app/immutable/nodes/15.BWtoiI44.js +0 -1
  358. package/web/app/immutable/nodes/2.B_fHdNW9.js +0 -13
  359. package/web/app/immutable/nodes/3.CzW2JK5A.js +0 -2
  360. package/web/app/immutable/nodes/4.DP65YvXF.js +0 -1
  361. package/web/app/immutable/nodes/5.ivE-5gZP.js +0 -5
  362. package/web/app/immutable/nodes/6.58wOdki0.js +0 -1
  363. package/web/app/immutable/nodes/7.9Khb1Buc.js +0 -1
  364. /package/web/app/immutable/assets/{17.Cznk2DRv.css → 18.Cznk2DRv.css} +0 -0
@@ -0,0 +1 @@
1
+ var Me=Object.defineProperty;var De=(i,s,e)=>s in i?Me(i,s,{enumerable:!0,configurable:!0,writable:!0,value:e}):i[s]=e;var m=(i,s,e)=>De(i,typeof s!="symbol"?s+"":s,e);import{x as Ne,J as oe,Z as ce,ai as q,ar as Ce}from"./DhHSeQsG.js";import{bY as Le,cX as le,co as ue,cn as ve}from"./ChNPgGKQ.js";import{Iz as p,Be as we,bv as be,c as Fe,KD as de,i7 as me,bH as ke,D9 as z,BD as Ge,f4 as Pe,zI as xe,dR as Ee,f0 as fe,dQ as _e,Ab as Ve,Kh as Ue,vQ as Be}from"./BfbZn9QX.js";import{aC as Ae,dG as he,A as H,P as Re,ay as K}from"./asQ_ruFQ.js";import{h as $e}from"./Dkva_evl.js";import{c as W}from"./ChTqQfQN.js";import{a as Xe}from"./BdWqymET.js";import{k as Q}from"./BWAGtvpD.js";import"./DYhIMPy1.js";import{bo as n}from"./D9jYN6_J.js";import"./C_EpV6jU.js";import"./Cx31i8ng.js";import"./CQbtnalz.js";import{R as ge}from"./BvFAWM27.js";import{L as Ye}from"./CSiaiLHL.js";function We(i,s){return i.some(e=>e.id===s.id)?i.map(e=>e.id===s.id?{...s,...s.author==null&&e.author!==void 0?{author:e.author}:{}}:e):[...i,s]}const Z=typeof performance<"u"?performance:{now:()=>Date.now()},V=new Xe("PerformanceOptimizer"),w=class w{constructor(){m(this,"metricsBuffer");m(this,"metricsIndex",0);m(this,"metricsCount",0);m(this,"MAX_METRICS",500);m(this,"TARGET_RESPONSE_TIME",100);m(this,"memoCache",new Map);m(this,"MEMO_TTL",6e4);m(this,"MAX_CACHE_SIZE",100);m(this,"cacheHits",0);m(this,"cacheMisses",0);m(this,"pendingRequests",new Map);m(this,"requestQueue",[]);m(this,"cleanupInterval",null);this.metricsBuffer=new Array(this.MAX_METRICS).fill(null),this.startCacheCleanup(),V.info("PerformanceOptimizer initialized")}static getInstance(){return w.instance||(w.instance=new w),w.instance}reset(){this.metricsBuffer=new Array(this.MAX_METRICS).fill(null),this.metricsIndex=0,this.metricsCount=0,this.memoCache.clear(),this.pendingRequests.clear(),this.requestQueue=[],this.cacheHits=0,this.cacheMisses=0}clearCache(){this.memoCache.clear(),this.cacheHits=0,this.cacheMisses=0}async processBatch(s,e,t={}){const{batchSize:r=10,concurrency:a=4}=t,l=[];for(let c=0;c<s.length;c+=r){const f=s.slice(c,c+r).map((o,g)=>{const R=Math.floor(g/a)*10;return new Promise(d=>{setTimeout(async()=>{const k=await e(o);d(k)},R)})}),u=await Promise.all(f);l.push(...u)}return l}startCacheCleanup(){this.cleanupInterval=setInterval(()=>{this.cleanupCache()},3e4)}stopCacheCleanup(){this.cleanupInterval&&(clearInterval(this.cleanupInterval),this.cleanupInterval=null)}cleanupCache(){const s=Date.now(),e=[];this.memoCache.forEach((t,r)=>{s-t.timestamp>this.MEMO_TTL&&e.push(r)}),e.forEach(t=>this.memoCache.delete(t)),this.memoCache.size>this.MAX_CACHE_SIZE&&Array.from(this.memoCache.entries()).sort((a,l)=>a[1].hits-l[1].hits||a[1].timestamp-l[1].timestamp).slice(0,this.memoCache.size-this.MAX_CACHE_SIZE).forEach(([a])=>this.memoCache.delete(a))}async track(s,e,t={}){const r=Z.now();try{const a=t.cacheKey||s;if(t.memoize){const f=this.getMemoized(a);if(f!==void 0)return this.cacheHits++,V.debug("Memoized result used",{operation:s,cacheKey:a,hits:this.cacheHits}),f;this.cacheMisses++}if(t.coalesce){const f=this.pendingRequests.get(s);if(f)return V.debug("Request coalesced",{operation:s}),f}let l;t.coalesce?(l=t.timeout?this.withTimeout(e(),t.timeout):e(),this.pendingRequests.set(s,l)):l=t.timeout?this.withTimeout(e(),t.timeout):e();const c=await l;t.memoize&&this.memoize(a,c);const E=Z.now()-r;return this.recordMetric(s,E,!0,{strategy:t.priority||"normal",memoized:t.memoize||!1,coalesced:t.coalesce||!1}),E>this.TARGET_RESPONSE_TIME&&V.warn("Operation exceeded target time",{operation:s,duration:Math.round(E),target:this.TARGET_RESPONSE_TIME}),c}catch(a){const l=Z.now()-r;throw this.recordMetric(s,l,!1,{error:a instanceof Error?a.message:"Unknown error"}),a}finally{t.coalesce&&this.pendingRequests.delete(s)}}getStats(){if(this.metricsCount===0)return{avgResponseTime:0,p95ResponseTime:0,p99ResponseTime:0,successRate:100,slowOperations:[]};const s=[],e=this.metricsCount<this.MAX_METRICS?0:this.metricsIndex;for(let u=0;u<this.metricsCount;u++){const o=this.metricsBuffer[(e+u)%this.MAX_METRICS];o&&s.push(o)}if(s.length===0)return{avgResponseTime:0,p95ResponseTime:0,p99ResponseTime:0,successRate:100,slowOperations:[]};const t=s.sort((u,o)=>u.duration-o.duration);let r=0,a=0;const l=new Set;for(const u of s)a+=u.duration,u.success&&r++,u.duration>this.TARGET_RESPONSE_TIME&&l.add(u.operation);const c=a/s.length,E=Math.floor(t.length*.95),f=Math.floor(t.length*.99);return{avgResponseTime:Math.round(c),p95ResponseTime:Math.round(t[E]?.duration||0),p99ResponseTime:Math.round(t[f]?.duration||0),successRate:r/s.length*100,slowOperations:Array.from(l)}}getCacheStats(){const s=this.cacheHits+this.cacheMisses;return{size:this.memoCache.size,hitRate:s>0?this.cacheHits/s*100:0,hits:this.cacheHits,misses:this.cacheMisses}}getMemoized(s){const e=this.memoCache.get(s);if(e){if(Date.now()-e.timestamp>this.MEMO_TTL){this.memoCache.delete(s);return}return e.hits++,e.value}}memoize(s,e){const t=JSON.stringify(e).length;this.memoCache.set(s,{value:e,timestamp:Date.now(),hits:0,size:t}),this.memoCache.size>this.MAX_CACHE_SIZE&&this.cleanupCache()}async withTimeout(s,e){return Promise.race([s,new Promise((t,r)=>setTimeout(()=>r(new Error(`Operation timed out after ${e}ms`)),e))])}recordMetric(s,e,t,r){this.metricsBuffer[this.metricsIndex]={operation:s,duration:e,timestamp:Date.now(),success:t,metadata:r},this.metricsIndex=(this.metricsIndex+1)%this.MAX_METRICS,this.metricsCount<this.MAX_METRICS&&this.metricsCount++,e>this.TARGET_RESPONSE_TIME&&V.warn("Slow operation detected",{operation:s,duration:`${e.toFixed(2)}ms`,target:`${this.TARGET_RESPONSE_TIME}ms`,metadata:r})}};m(w,"instance");let ee=w;const qe=ee.getInstance(),pe={AGENT_CREATION:"https://docs.example.com/agent-creation",STREAMING:"https://docs.example.com/streaming-issues",STORAGE:"https://docs.example.com/storage-troubleshooting",MEMORY:"https://docs.example.com/memory-management",PROVIDER:"https://docs.example.com/provider-setup",GENERAL:"https://docs.example.com/help"},j={get AGENT_CREATION_FAILED(){return n.errors_catalog_agentCreationFailed_template({agentName:"{agentName}",details:"{details}"})},get AGENT_ALREADY_EXISTS(){return n.errors_catalog_agentAlreadyExists_template({agentName:"{agentName}"})},get INVALID_AGENT_CONFIG(){return n.errors_catalog_invalidAgentConfig_template({details:"{details}"})},get INVALID_CONFIG(){return n.errors_catalog_invalidConfig_template({details:"{details}"})},get SESSION_NOT_FOUND(){return n.errors_catalog_sessionNotFound_template({sessionId:"{sessionId}"})},get SESSION_ALREADY_ACTIVE(){return n.errors_catalog_sessionAlreadyActive_template()},get SESSION_INITIALIZATION_FAILED(){return n.errors_catalog_sessionInitializationFailed_template({details:"{details}"})},get STREAM_CONNECTION_FAILED(){return n.errors_catalog_streamConnectionFailed_template({details:"{details}"})},get STREAM_TIMEOUT(){return n.errors_catalog_streamTimeout_template({timeout:"{timeout}"})},get STREAM_INTERRUPTED(){return n.errors_catalog_streamInterrupted_template({attempt:"{attempt}",maxAttempts:"{maxAttempts}"})},get STREAM_RECOVERY_FAILED(){return n.errors_catalog_streamRecoveryFailed_template({attempts:"{attempts}"})},get MESSAGE_SEND_FAILED(){return n.errors_catalog_messageSendFailed_template({details:"{details}"})},get MESSAGE_VALIDATION_FAILED(){return n.errors_catalog_messageValidationFailed_template({details:"{details}"})},get MESSAGE_TOO_LONG(){return n.errors_catalog_messageTooLong_template({maxLength:"{maxLength}",currentLength:"{currentLength}"})},get PROVIDER_NOT_FOUND(){return n.errors_catalog_providerNotFound_template({provider:"{provider}"})},get PROVIDER_CONNECTION_FAILED(){return n.errors_catalog_providerConnectionFailed_template({provider:"{provider}",details:"{details}"})},get PROVIDER_PROCESS_DIED(){return n.errors_catalog_providerProcessDied_template({provider:"{provider}"})},get STORAGE_READ_FAILED(){return n.errors_catalog_storageReadFailed_template({details:"{details}"})},get STORAGE_WRITE_FAILED(){return n.errors_catalog_storageWriteFailed_template({details:"{details}"})},get STORAGE_CORRUPTED(){return n.errors_catalog_storageCorrupted_template({lastBackup:"{lastBackup}"})},get MEMORY_LIMIT_EXCEEDED(){return n.errors_catalog_memoryLimitExceeded_template({currentUsage:"{currentUsage}",limit:"{limit}"})},get RATE_LIMIT_EXCEEDED(){return n.errors_catalog_rateLimitExceeded_template({count:"{count}",window:"{window}"})},get CONCURRENT_LIMIT_EXCEEDED(){return n.errors_catalog_concurrentLimitExceeded_template({current:"{current}",max:"{max}"})}},ze={get AGENT_CREATION_FAILED(){return n.errors_catalog_agentCreationFailed_friendly()},get AGENT_ALREADY_EXISTS(){return n.errors_catalog_agentAlreadyExists_friendly()},get INVALID_AGENT_CONFIG(){return n.errors_catalog_invalidAgentConfig_friendly()},get INVALID_CONFIG(){return n.errors_catalog_invalidConfig_friendly()},get SESSION_NOT_FOUND(){return n.errors_catalog_sessionNotFound_friendly()},get SESSION_ALREADY_ACTIVE(){return n.errors_catalog_sessionAlreadyActive_friendly()},get SESSION_INITIALIZATION_FAILED(){return n.errors_catalog_sessionInitializationFailed_friendly()},get STREAM_CONNECTION_FAILED(){return n.errors_catalog_streamConnectionFailed_friendly()},get STREAM_TIMEOUT(){return n.errors_catalog_streamTimeout_friendly()},get STREAM_INTERRUPTED(){return n.errors_catalog_streamInterrupted_friendly()},get STREAM_RECOVERY_FAILED(){return n.errors_catalog_streamRecoveryFailed_friendly()},get MESSAGE_SEND_FAILED(){return n.errors_catalog_messageSendFailed_friendly()},get MESSAGE_VALIDATION_FAILED(){return n.errors_catalog_messageValidationFailed_friendly()},get MESSAGE_TOO_LONG(){return n.errors_catalog_messageTooLong_friendly()},get PROVIDER_NOT_FOUND(){return n.errors_catalog_providerNotFound_friendly()},get PROVIDER_CONNECTION_FAILED(){return n.errors_catalog_providerConnectionFailed_friendly()},get PROVIDER_PROCESS_DIED(){return n.errors_catalog_providerProcessDied_friendly()},get STORAGE_READ_FAILED(){return n.errors_catalog_storageReadFailed_friendly()},get STORAGE_WRITE_FAILED(){return n.errors_catalog_storageWriteFailed_friendly()},get STORAGE_CORRUPTED(){return n.errors_catalog_storageCorrupted_friendly()},get MEMORY_LIMIT_EXCEEDED(){return n.errors_catalog_memoryLimitExceeded_friendly()},get RATE_LIMIT_EXCEEDED(){return n.errors_catalog_rateLimitExceeded_friendly()},get CONCURRENT_LIMIT_EXCEEDED(){return n.errors_catalog_concurrentLimitExceeded_friendly()}};function He(i){return(i.match(/{(\w+)}/g)||[]).map(e=>e.slice(1,-1))}function Ke(i,s){return He(i).every(t=>t in s)}function Ie(i,s={}){return i.replace(/{(\w+)}/g,(e,t)=>String(s[t]??e))}function J(i){const s=n.errors_cleanMessage_fallback_error();if(!i)return s;let e=i;return e=e.replace(/^.*?failed(?:\s+to\s+.*?)?\s+after\s+\d+\s+attempts:\s*/i,""),e=e.replace(/^Error invoking remote method '[^']+':(\s*Error:)?\s*/i,""),e=e.replace(/^(Error:\s*)+/i,""),e=e.replace(/\n\s*at .+/g,""),e=e.replace(/\s+/g," ").trim(),e||s}function Qe(i,s){return s&&j[i]&&Ke(j[i],s)?Ie(j[i],s):ze[i]||n.errors_userFriendly_fallback_error()}function Ze(i){const e={AGENT_CREATION_FAILED:"AGENT_CREATION",AGENT_ALREADY_EXISTS:"AGENT_CREATION",INVALID_AGENT_CONFIG:"AGENT_CREATION",STREAM_CONNECTION_FAILED:"STREAMING",STREAM_TIMEOUT:"STREAMING",STREAM_INTERRUPTED:"STREAMING",STREAM_RECOVERY_FAILED:"STREAMING",STORAGE_READ_FAILED:"STORAGE",STORAGE_WRITE_FAILED:"STORAGE",STORAGE_CORRUPTED:"STORAGE",MEMORY_LIMIT_EXCEEDED:"MEMORY",RATE_LIMIT_EXCEEDED:"MEMORY",CONCURRENT_LIMIT_EXCEEDED:"MEMORY",PROVIDER_NOT_FOUND:"PROVIDER",PROVIDER_CONNECTION_FAILED:"PROVIDER",PROVIDER_PROCESS_DIED:"PROVIDER"}[i];return e?pe[e]:pe.GENERAL}const je={AGENT_CREATION_FAILED:[{action:"retry",description:"Try creating the agent again",automatic:!1,priority:"high"},{action:"check-config",description:"Verify agent configuration in settings",automatic:!1,priority:"high"},{action:"check-resources",description:"Ensure sufficient memory and disk space",automatic:!1,priority:"medium"}],AGENT_ALREADY_EXISTS:[{action:"rename",description:"Choose a different name for the agent",automatic:!1,priority:"high"},{action:"delete-existing",description:"Delete the existing agent first",automatic:!1,priority:"medium"}],INVALID_AGENT_CONFIG:[{action:"review-config",description:"Review and correct the configuration",automatic:!1,priority:"high"},{action:"use-defaults",description:"Reset to default configuration",automatic:!1,priority:"medium"}],INVALID_CONFIG:[{action:"review-config",description:"Review and correct the configuration",automatic:!1,priority:"high"},{action:"use-defaults",description:"Reset to default configuration",automatic:!1,priority:"medium"}],SESSION_NOT_FOUND:[{action:"start-new",description:"Start a new agent session",automatic:!1,priority:"high"},{action:"check-history",description:"Check session history for recent sessions",automatic:!1,priority:"medium"}],SESSION_ALREADY_ACTIVE:[{action:"wait",description:"Wait for the current session to complete",automatic:!1,priority:"high"},{action:"cancel",description:"Cancel the active session first",automatic:!1,priority:"high"}],SESSION_INITIALIZATION_FAILED:[{action:"retry",description:"Try initializing the session again",automatic:!1,priority:"high"},{action:"check-resources",description:"Ensure sufficient resources are available",automatic:!1,priority:"medium"}],MESSAGE_SEND_FAILED:[{action:"retry",description:"Try sending the message again",automatic:!1,priority:"high"},{action:"check-connection",description:"Check your network connection",automatic:!1,priority:"high"}],MESSAGE_VALIDATION_FAILED:[{action:"review-config",description:"Review and correct the message format",automatic:!1,priority:"high"},{action:"check-config",description:"Check configuration for valid message format",automatic:!1,priority:"medium"}],MESSAGE_TOO_LONG:[{action:"retry",description:"Shorten the message and try again",automatic:!1,priority:"high"},{action:"batch",description:"Split the message into multiple parts",automatic:!1,priority:"medium"}],PROVIDER_NOT_FOUND:[{action:"check-config",description:"Verify provider is properly configured",automatic:!1,priority:"high"},{action:"recreate",description:"Install or reinstall the provider",automatic:!1,priority:"high"}],PROVIDER_CONNECTION_FAILED:[{action:"retry",description:"Try connecting to the provider again",automatic:!1,priority:"high"},{action:"check-config",description:"Verify provider configuration",automatic:!1,priority:"high"}],STORAGE_READ_FAILED:[{action:"retry",description:"Try reading the data again",automatic:!1,priority:"high"},{action:"restore",description:"Restore from a recent backup",automatic:!1,priority:"medium"}],STORAGE_WRITE_FAILED:[{action:"retry",description:"Try saving again",automatic:!1,priority:"high"},{action:"check-resources",description:"Check available disk space",automatic:!1,priority:"high"}],STREAM_CONNECTION_FAILED:[{action:"retry",description:"Try connecting again",automatic:!1,priority:"high"},{action:"check-connection",description:"Check your network connection",automatic:!1,priority:"high"}],STREAM_RECOVERY_FAILED:[{action:"restart",description:"Restart the agent",automatic:!1,priority:"high"},{action:"check-config",description:"Check error logs for more details",automatic:!1,priority:"medium"}],STREAM_INTERRUPTED:[{action:"reconnect",description:"Attempting automatic reconnection",automatic:!0,priority:"high"},{action:"retry",description:"Retry sending the message",automatic:!1,priority:"high"},{action:"check-connection",description:"Check your internet connection",automatic:!1,priority:"medium"}],STREAM_TIMEOUT:[{action:"wait",description:"Wait for agent to complete processing",automatic:!1,priority:"high"},{action:"cancel",description:"Cancel current operation",automatic:!1,priority:"medium"},{action:"increase-timeout",description:"Increase timeout in settings",automatic:!1,priority:"low"}],PROVIDER_PROCESS_DIED:[{action:"restart",description:"Restart agent process",automatic:!0,priority:"high"},{action:"recreate",description:"Create new agent session",automatic:!1,priority:"high"}],STORAGE_CORRUPTED:[{action:"restore",description:"Restore from backup",automatic:!1,priority:"high"},{action:"reset",description:"Reset agent data",automatic:!1,priority:"medium"}],MEMORY_LIMIT_EXCEEDED:[{action:"cleanup",description:"Close unused agents",automatic:!1,priority:"high"},{action:"increase-limit",description:"Increase memory limit in settings",automatic:!1,priority:"medium"}],RATE_LIMIT_EXCEEDED:[{action:"wait",description:"Wait before making more requests",automatic:!1,priority:"high"},{action:"batch",description:"Batch requests together",automatic:!1,priority:"medium"}],CONCURRENT_LIMIT_EXCEEDED:[{action:"close-agents",description:"Close some running agents",automatic:!1,priority:"high"},{action:"queue",description:"Queue operation for later",automatic:!1,priority:"medium"}]};function Je(i){return je[i]||[{action:"retry",description:"Try the operation again",automatic:!1,priority:"high"}]}var D=(i=>(i.AGENT_CREATION_FAILED="AGENT_CREATION_FAILED",i.AGENT_ALREADY_EXISTS="AGENT_ALREADY_EXISTS",i.INVALID_AGENT_CONFIG="INVALID_AGENT_CONFIG",i.INVALID_CONFIG="INVALID_CONFIG",i.SESSION_NOT_FOUND="SESSION_NOT_FOUND",i.SESSION_ALREADY_ACTIVE="SESSION_ALREADY_ACTIVE",i.SESSION_INITIALIZATION_FAILED="SESSION_INITIALIZATION_FAILED",i.STREAM_CONNECTION_FAILED="STREAM_CONNECTION_FAILED",i.STREAM_TIMEOUT="STREAM_TIMEOUT",i.STREAM_INTERRUPTED="STREAM_INTERRUPTED",i.STREAM_RECOVERY_FAILED="STREAM_RECOVERY_FAILED",i.MESSAGE_SEND_FAILED="MESSAGE_SEND_FAILED",i.MESSAGE_VALIDATION_FAILED="MESSAGE_VALIDATION_FAILED",i.MESSAGE_TOO_LONG="MESSAGE_TOO_LONG",i.PROVIDER_NOT_FOUND="PROVIDER_NOT_FOUND",i.PROVIDER_CONNECTION_FAILED="PROVIDER_CONNECTION_FAILED",i.PROVIDER_PROCESS_DIED="PROVIDER_PROCESS_DIED",i.PROVIDER_UNAVAILABLE="PROVIDER_UNAVAILABLE",i.PROVIDER_ERROR="PROVIDER_ERROR",i.STORAGE_READ_FAILED="STORAGE_READ_FAILED",i.STORAGE_WRITE_FAILED="STORAGE_WRITE_FAILED",i.STORAGE_CORRUPTED="STORAGE_CORRUPTED",i.STORAGE_ERROR="STORAGE_ERROR",i.STORAGE_QUOTA_EXCEEDED="STORAGE_QUOTA_EXCEEDED",i.MEMORY_LIMIT_EXCEEDED="MEMORY_LIMIT_EXCEEDED",i.RATE_LIMIT_EXCEEDED="RATE_LIMIT_EXCEEDED",i.CONCURRENT_LIMIT_EXCEEDED="CONCURRENT_LIMIT_EXCEEDED",i.RESOURCE_NOT_FOUND="RESOURCE_NOT_FOUND",i.RESOURCE_EXHAUSTED="RESOURCE_EXHAUSTED",i.NETWORK_ERROR="NETWORK_ERROR",i.PERMISSION_DENIED="PERMISSION_DENIED",i.OPERATION_FAILED="OPERATION_FAILED",i.VALIDATION_ERROR="VALIDATION_ERROR",i.INVALID_RESPONSE="INVALID_RESPONSE",i.STATE_CORRUPTION="STATE_CORRUPTION",i.CONTEXT_OVERFLOW="CONTEXT_OVERFLOW",i))(D||{});class Y extends Error{constructor(e,t,r={},a){super(e);m(this,"code");m(this,"context");m(this,"recoverySuggestions");m(this,"userMessage");m(this,"isRecoverable");m(this,"cause");this.name="AgentError",this.code=t,this.context={...r,timestamp:new Date,stackTrace:this.stack},this.userMessage=a?.userMessage||this.getDefaultUserMessage(t),this.recoverySuggestions=a?.recoverySuggestions||this.getDefaultRecoverySuggestions(t),this.isRecoverable=a?.isRecoverable??this.isErrorRecoverable(t),a?.cause&&(this.cause=a.cause)}getDefaultUserMessage(e){return Qe(e,this.context)}getDefaultRecoverySuggestions(e){return Je(e)}isErrorRecoverable(e){return["STREAM_INTERRUPTED","STREAM_TIMEOUT","MESSAGE_SEND_FAILED","PROVIDER_PROCESS_DIED","STORAGE_READ_FAILED","STORAGE_WRITE_FAILED"].includes(e)}getHelpLink(){return Ze(this.code)}formatMessage(e){return Ie(e,this.context)}toJSON(){return{name:this.name,code:this.code,message:this.message,userMessage:this.userMessage,context:this.context,recoverySuggestions:this.recoverySuggestions,isRecoverable:this.isRecoverable,helpLink:this.getHelpLink(),stack:this.stack}}}const et={NON_RETRYABLE_ERRORS:["EACCES","EPERM","ENOSPC","EMFILE","permission","memory","fatal","process died","not available on your current plan","agent binary","rate limit","too many requests","hit your limit","you've hit your limit","quota exceeded"]};function ie(i){const s=i.toLowerCase();for(const e of et.NON_RETRYABLE_ERRORS)if(s.includes(e.toLowerCase()))return!0;return!1}const tt="Agent already has an in-flight prompt. Message was not delivered.",v=W("ErrorBoundary"),b=class b{constructor(){}static getInstance(){return b.instance||(b.instance=new b),b.instance}async wrap(s,e,t={}){const{retries:r=ge.DEFAULT_ATTEMPTS,retryDelay:a=ge.BASE_DELAY,exponentialBackoff:l=!0,notify:c=!1,notifyOnRetry:E=!1,context:f={},onError:u,onRetry:o,shouldRetry:g=this.defaultShouldRetry}=t;let R=null,d=0;for(d=1;d<=r+1;d++)try{v.debug(`[${e}] Attempt ${d}/${r+1}`);const h=await s();return d>1&&v.info(`[${e}] Succeeded after ${d} attempts`),h}catch(h){if(R=h,v.error(`[${e}] Attempt ${d} failed`,{error:R.message,attempt:d,maxAttempts:r+1,context:f}),u?.(R,d),d<=r&&g(R)){const C=l?a*Math.pow(2,d-1):a;E&&Q.warning(n.agent_errorBoundary_retrying_message({seconds:C/1e3})),o?.(d),v.info(`[${e}] Retrying in ${C}ms`),await this.sleep(C)}else break}const k=`${e} failed after ${d} attempt${d===1?"":"s"}: ${R?.message}`,P=J(R?.message||n.agent_errorBoundary_generic_error()),N=R?.message?.toLowerCase()||"",$=N.includes("no available models")||N.includes("all models exhausted")||N.includes("all models unavailable");throw c&&!$&&Q.error(P),new Y(P,D.OPERATION_FAILED,{originalError:R?.message,detailedMessage:k,attempts:d,context:f})}async wrapVoid(s,e,t={}){await this.wrap(s,e,t)}wrapSync(s,e,t={}){try{return s()}catch(r){const a=r;throw v.error(`[${e}] Failed`,{error:a.message,context:t.context}),t.notify&&Q.error(J(a.message)),new Y(J(a.message),D.OPERATION_FAILED,t.context)}}defaultShouldRetry(s){const e=s.message.toLowerCase();return ie(s.message)?!1:e.includes("network")||e.includes("timeout")?!0:s instanceof Y?[D.NETWORK_ERROR,D.STREAM_TIMEOUT,D.STREAM_CONNECTION_FAILED,D.PROVIDER_CONNECTION_FAILED,D.PROVIDER_UNAVAILABLE].includes(s.code):!(e.includes("invalid")||e.includes("interrupted")||e.includes("cancel")||e.includes("not found")||e.includes("not available")||e.includes("404")||e.includes("no available models")||e.includes("all models exhausted")||e.includes("all models unavailable")||e.includes("413")||e.includes("too long for the agent")||e.includes("request entity too large")||e.includes("payload too large")||e.includes("content too large")||e.includes("body too large")||e.includes("unauthorized")||e.includes("forbidden")||e.includes("401")||e.includes("403"))}sleep(s){return new Promise(e=>setTimeout(e,s))}async withTimeout(s,e,t){return Promise.race([s(),new Promise((r,a)=>setTimeout(()=>a(new Y(`${t} timed out after ${e}ms`,D.STREAM_TIMEOUT)),e))])}async batchOperations(s,e,t={}){const{concurrency:r=5,continueOnError:a=!0,operationName:l="batch operation"}=t,c=[],E=[];for(let f=0;f<s.length;f+=r){const u=s.slice(f,f+r);(await Promise.allSettled(u.map(g=>e(g)))).forEach((g,R)=>{if(g.status==="fulfilled")c.push(g.value);else{const d=g.reason;if(E.push({item:u[R],error:d}),v.error(`[${l}] Batch item failed`,{item:u[R],error:d.message}),!a)throw d}})}return E.length>0&&v.warn(`[${l}] Completed with ${E.length} errors`),{results:c,errors:E}}};m(b,"instance");let te=b;const st=te.getInstance(),se=W("browser/index"),F=new Map,B=new Map;let U;function it(i,s,e){for(const t of s)try{t(e)}catch(r){se.error("Error in agent subscriber callback",{agentId:i,error:r})}}function rt(){if(U)return;let i=!1;U=p.createSelector(e=>e.agentSessions)().subscribe(()=>{if(!i){i=!0;return}if(F.size===0)return;const e=p.state;for(const[t,r]of F){const a=Ae.select(e,t);B.get(t)!==a&&(B.set(t,a),it(t,r,a))}})}function at(){F.size>0||!U||(U(),U=void 0,B.clear())}function Ct(i,s,e){let t=F.get(i);const r=!t;t||(t=new Set,F.set(i,t)),t.add(s),rt();const a=p.state,l=Ae.select(a,i);return r&&B.set(i,l),l?se.debug("[subscribeToAgent] Initial callback data",{agentId:i,workspaceId:e??"current",hasSession:!0}):se.debug("[subscribeToAgent] No session found",{agentId:i,workspaceId:e??"current"}),s(l),()=>{const c=F.get(i);c&&(c.delete(s),c.size===0&&(F.delete(i),B.delete(i))),at()}}const y=W("ErrorRecovery"),Se={network:{maxRetries:3,initialBackoffMs:1e3,maxBackoffMs:1e4,backoffMultiplier:2,shouldRetry:i=>{const s=i.message.toLowerCase();return s.includes("network")||s.includes("fetch")||s.includes("connection")||s.includes("timeout")}},streaming:{maxRetries:5,initialBackoffMs:500,maxBackoffMs:5e3,backoffMultiplier:1.5,shouldRetry:(i,s)=>{if(s>=5)return!1;const e=i.message.toLowerCase();return e.includes("no available models")||e.includes("all models exhausted")||e.includes("all models unavailable")||ie(i.message)?!1:e.includes("stream")||e.includes("chunk")||e.includes("incomplete")}},persistence:{maxRetries:2,initialBackoffMs:100,maxBackoffMs:1e3,backoffMultiplier:2,shouldRetry:i=>{const s=i.message.toLowerCase();return s.includes("save")||s.includes("write")||s.includes("persist")}},rateLimit:{maxRetries:3,initialBackoffMs:5e3,maxBackoffMs:3e4,backoffMultiplier:2,shouldRetry:i=>{const s=i.message.toLowerCase();return s.includes("rate")||s.includes("limit")||s.includes("429")}}};class nt{constructor(){m(this,"listeners",new Map)}on(s,e){let t=this.listeners.get(s);t||(t=new Set,this.listeners.set(s,t)),t.add(e)}off(s,e){this.listeners.get(s)?.delete(e)}emit(s,...e){this.listeners.get(s)?.forEach(t=>{try{t(...e)}catch(r){y.error(`Error in event listener for ${s}:`,r)}})}removeAllListeners(){this.listeners.clear()}}class ot extends nt{constructor(){super(...arguments);m(this,"activeRecoveries",new Map);m(this,"recoveryStats",new Map)}async executeWithRecovery(e,t=Se.network,r){const a=Date.now(),l=new AbortController;r&&(this.cancelRecovery(r),this.activeRecoveries.set(r,l));let c,E=t.initialBackoffMs,f=0;for(let u=1;u<=t.maxRetries;u++){if(f=u,l.signal.aborted){y.info(`Recovery cancelled for operation ${r}`);break}try{y.debug(`Attempting operation (attempt ${u}/${t.maxRetries})`,{operationId:r});const o=await e();return this.updateStats(r,!0),this.emit("recovery:success",{operationId:r,attempt:u,duration:Date.now()-a}),r&&this.activeRecoveries.delete(r),{success:!0,data:o,attempts:u,totalTime:Date.now()-a}}catch(o){c=o,y.warn(`Operation failed (attempt ${u}/${t.maxRetries})`,{operationId:r,error:c.message});const g=c.message.toLowerCase();if(g.includes("interrupted")||g.includes("cancelled")||g.includes("canceled")){y.debug("User-initiated interruption/cancellation, not retrying",{operationId:r,error:c.message});break}if(g.includes("no available models")||g.includes("all models exhausted")||g.includes("all models unavailable")){y.debug("All models exhausted, not retrying",{operationId:r,error:c.message});break}if(ie(c.message)){y.debug("Fatal error detected, not retrying",{operationId:r,error:c.message});break}if(!t.shouldRetry(c,u)){y.debug("Error not retryable, stopping recovery",{operationId:r,error:c.message});break}if(u<t.maxRetries){const R=Math.random()*.2*E,d=Math.min(E+R,t.maxBackoffMs);t.onRetry?.(u,d),this.emit("recovery:retry",{operationId:r,attempt:u,delay:d,error:c.message}),await this.delay(d,l.signal),E=Math.min(E*t.backoffMultiplier,t.maxBackoffMs)}}}return this.updateStats(r,!1),t.onFailure?.(c,f),this.emit("recovery:failure",{operationId:r,attempts:f,duration:Date.now()-a,error:c?.message}),r&&this.activeRecoveries.delete(r),{success:!1,error:c,attempts:f,totalTime:Date.now()-a}}cancelRecovery(e){const t=this.activeRecoveries.get(e);t&&(t.abort(),this.activeRecoveries.delete(e),y.info(`Cancelled recovery for operation ${e}`))}cancelAllRecoveries(){for(const[e,t]of this.activeRecoveries)t.abort(),y.info(`Cancelled recovery for operation ${e}`);this.activeRecoveries.clear()}getStats(e){if(e)return this.recoveryStats.get(e)||{successes:0,failures:0};const t={};for(const[r,a]of this.recoveryStats)t[r]=a;return t}clearStats(e){e?this.recoveryStats.delete(e):this.recoveryStats.clear()}isRetryable(e,t){const r=e.message.toLowerCase();if(t)switch(t){case"NETWORK":return r.includes("network")||r.includes("fetch");case"TIMEOUT":return r.includes("timeout")||r.includes("timed out");case"RATE_LIMIT":return r.includes("rate")||r.includes("limit")||r.includes("429");case"TEMPORARY":return r.includes("temporary")||r.includes("transient");case"CONFLICT":return r.includes("conflict")||r.includes("concurrent");default:return!1}return this.isRetryable(e,"NETWORK")||this.isRetryable(e,"TIMEOUT")||this.isRetryable(e,"RATE_LIMIT")||this.isRetryable(e,"TEMPORARY")||this.isRetryable(e,"CONFLICT")}delay(e,t){return new Promise((r,a)=>{const l=setTimeout(r,e);if(t){const c=()=>{clearTimeout(l),a(new Error("Delay aborted"))};t.addEventListener("abort",c);const E=r;r=()=>{t.removeEventListener("abort",c),E()}}})}updateStats(e,t){if(!e)return;const r=this.recoveryStats.get(e)||{successes:0,failures:0};t?r.successes++:r.failures++,this.recoveryStats.set(e,r)}dispose(){this.cancelAllRecoveries(),this.recoveryStats.clear(),this.removeAllListeners()}}const ct=new ot,O=new Ye({category:"WorkspaceMetrics"}),lt=100;class ut{constructor(){m(this,"metrics",new Map);m(this,"operations",new Map)}startWorkspaceCreation(s){const e=Date.now();for(this.metrics.delete(s),this.metrics.set(s,{workspaceId:s,creationStarted:e});this.metrics.size>lt;){const t=this.metrics.keys().next().value;if(t===void 0)break;this.metrics.delete(t)}O.info("Started tracking workspace creation",{workspaceId:s})}recordMilestone(s,e){const t=this.metrics.get(s);if(!t){O.warn("No metrics found for workspace",{workspaceId:s,milestone:e});return}const r=Date.now();switch(e){case"optimisticNavigation":t.optimisticNavigation=r;break;case"realWorkspaceCreated":t.realWorkspaceCreated=r;break;case"agentCreated":t.agentCreated=r;break;case"agentReady":t.agentReady=r;break;case"firstMessageSent":t.firstMessageSent=r;break;case"firstResponseReceived":t.firstResponseReceived=r;break;case"firstChunkReceived":t.firstChunkReceived=r;break;case"totalDuration":t.totalDuration=r;break;case"workspaceId":case"creationStarted":O.warn("Cannot update milestone",{milestone:e});return}const a=r-t.creationStarted;O.info(`Milestone: ${e}`,{workspaceId:s,elapsed:`${a}ms`,timestamp:r}),e==="firstResponseReceived"&&(t.totalDuration=r-t.creationStarted,this.logSummary(s))}startOperation(s,e){this.operations.set(s,{startTime:Date.now(),metadata:e})}endOperation(s,e){const t=this.operations.get(s);if(!t)return O.warn("Operation not found",{operationId:s}),null;const r=Date.now();return t.endTime=r,t.duration=r-t.startTime,e&&(t.metadata={...t.metadata,...e}),O.info("Operation completed",{operationId:s,duration:`${t.duration}ms`,metadata:t.metadata}),this.operations.delete(s),t.duration}getMetrics(s){return this.metrics.get(s)}logSummary(s){const e=this.metrics.get(s);if(!e)return;const t={workspaceId:s,totalDuration:`${e.totalDuration}ms`,stages:{optimisticNavigation:e.optimisticNavigation?`${e.optimisticNavigation-e.creationStarted}ms`:"N/A",realWorkspaceCreation:e.realWorkspaceCreated?`${e.realWorkspaceCreated-e.creationStarted}ms`:"N/A",agentCreation:e.agentCreated?`${e.agentCreated-e.creationStarted}ms`:"N/A",agentReady:e.agentReady?`${e.agentReady-e.creationStarted}ms`:"N/A",firstMessage:e.firstMessageSent?`${e.firstMessageSent-e.creationStarted}ms`:"N/A",firstResponse:e.firstResponseReceived?`${e.firstResponseReceived-e.creationStarted}ms`:"N/A"}};O.info("=== Workspace Creation Metrics Summary ===",t),O.info("Workspace Creation Metrics:",t)}clearMetrics(s){this.metrics.delete(s)}incrementAgentCreated(s){const e=this.metrics.get(s);e&&(e.agentCreated=Date.now(),O.info("Agent created",{workspaceId:s}))}incrementMessageSent(s){const e=this.metrics.get(s);e&&!e.firstMessageSent&&(e.firstMessageSent=Date.now(),O.info("First message sent",{workspaceId:s}))}}const dt=new ut,M=W("AgentSend");function A(i){p.dispatch(i)}function Te(i){return typeof i=="object"&&i!==null&&!Array.isArray(i)}function mt(i){const s=Te(i)&&i.success===!0&&"data"in i?i.data:i;return!Te(s)||s.success!==!1?!1:typeof s.error=="string"&&s.error.includes(tt)}async function Lt(i,s,e,t={}){const r=he.select(p.state,e.id);if(!r)return;const a=Ne(i,e.id),l=t.submission,c=!!l&&Le.select(p.state,l.scope)?.supported===!0,E=(o,g,R=!1)=>{l&&A(Be(l.scope,l.id,o,Date.now(),g,R))};let f=!1;const u=()=>(!l||f||ve.select(p.state,l))&&r===he.select(p.state,e.id)&&a.isCurrent(p.state.agentSessions?.byAgentId[i]?.workspaceId);return qe.track(`sendMessage:${a.key}:${i}:${l?.id??"legacy"}`,async()=>{if(!u())return;M.debug(`Sending message to agent ${i}`,{contentLength:s.length,hasContextReferences:!!t.contextReferences?.length,model:t.model});let o=await p.dispatch(we(e.id,i));if(u()){if(!o)throw new Error(n.agent_streamLifecycle_sessionNotFound_error({agentId:i}));o={...o,isStreaming:o.isStreaming??!1};{if(o&&(o.status==="pending"||!o.id)&&!o.backendSessionId&&o.activationState!==H.ACTIVE&&o.activationState!==H.ACTIVATING){const h=e.id.startsWith("optimistic-"),C=e.worktreePath||e.repositoryPath||e.path;if(!h&&C){M.info("Activating pending session in sendMessage",{agentId:i,status:o.status,activationState:o.activationState,hasBackendSessionId:!!o.backendSessionId});const x=await p.dispatch(be(e.id,i));if(!u())return;x&&(o=x)}else throw M.warn("Cannot activate agent - workspace not ready",{agentId:i,workspaceId:e.id,isOptimistic:h,hasWorktreePath:!!e.worktreePath,hasRepositoryPath:!!e.repositoryPath,hasPath:!!e.path}),new Error(n.agent_streamLifecycle_spaceNotReady_error())}else o&&o.status==="pending"&&o.backendSessionId&&(M.info("Fixing status for already-activated session",{agentId:i,backendSessionId:o.backendSessionId,activationState:o.activationState}),o={...o,status:Fe.Active,activationState:H.ACTIVE},A(de({...o,workspaceId:e.id})));if(!o)throw new Error(`Failed to get or create session for agent ${i}`);A(de({...o,workspaceId:e.id}));const R=[{type:"text",text:s}];if(t.imageBlocks)for(const h of t.imageBlocks)R.push({type:"image",...h.data!==void 0?{data:h.data}:{},...h.mimeType!==void 0?{mimeType:h.mimeType}:{},...h.attachmentId!==void 0?{attachmentId:h.attachmentId}:{}});if(t.fileBlocks)for(const h of t.fileBlocks)R.push({type:"file",attachmentId:h.attachmentId,fileName:h.fileName,...h.mimeType!==void 0?{mimeType:h.mimeType}:{},...h.size!==void 0?{size:h.size}:{}});const d=t.userAppMessageId??oe(),k=t.messageMetadata?.[Re],P={...t.contextReferences?.length?{contextReferences:t.contextReferences}:{},...k!==void 0?{[Re]:k}:{}},N={id:me(le()),appMessageId:d,role:"user",contentBlocks:R,timestamp:new Date().toISOString(),metadata:{...P,...t.messageMetadata??{}}};c||(l&&(E("rejected"),f=!0),A(ke(o.id,N))),A(z(o.id,!0));let $=!1;try{c||await p.dispatch(Ge(e.id,i,!0,{allowTruncation:t.resetHistory}));const h=me(`msg_${le()}`),C=oe(),x=async()=>st.wrap(async()=>{if(!u())return;M.info("Agent Service: Sending message to backend with image and file blocks",{agentId:i,sessionId:o.id,hasImageBlocks:!!t.imageBlocks,imageBlocksCount:t.imageBlocks?.length||0,imageBlockDetails:t.imageBlocks?.map(_=>({type:_.type,mimeType:_.mimeType,dataLength:_.data?.length||0}))||[],hasFileBlocks:!!t.fileBlocks,fileBlocksCount:t.fileBlocks?.length||0,fileBlockDetails:t.fileBlocks?.map(_=>({type:_.type,fileName:_.fileName,mimeType:_.mimeType,attachmentId:_.attachmentId,size:_.size}))||[]});const Oe=t.model??t.modelId??o.model??void 0;A(Pe(i));const ye=ce(i,e.id),ae=p.state.chatState?.byAgentId[i]?.attemptGeneration??0,T=await $e("agent.sendMessage",{agentId:i,...c&&l?{messageId:l.id}:{},workspaceId:e.id,content:s,model:Oe,contextReferences:t.contextReferences,imageBlocks:t.imageBlocks,fileBlocks:t.fileBlocks,noteIds:t.noteIds,stdinContext:t.stdinContext,assistantMessageId:h,userAppMessageId:d,assistantAppMessageId:C,priority:t.priority,...t.messageMetadata?{messageMetadata:t.messageMetadata}:{}}).catch(_=>{if(u())throw _});if(u()){if(mt(T)){M.info("Backend dropped duplicate in-flight prompt",{agentId:i,sessionId:o.id}),E("rejected");return}if(T&&typeof T=="object"&&"success"in T){if(!T.success){const _=T.error,I=typeof _=="string"?_:_?.message;throw $=!0,new Error(I||n.agent_streamLifecycle_sendToBackendFailed_error())}if("queued"in T&&T.queued===!0){if(M.info("sendMessage auto-queued by daemon (mid-turn or turn-startup race)",{agentId:i,sessionId:o.id,queuedMessageId:T.queuedMessage?.id}),(!c||!l||!ue.select(p.state,l))&&A(z(o.id,!1)),c||A(xe(o.id,N.id)),c){const I=T.queuedMessage,G=T.turnId,L=typeof G=="string"?G:I?.turnId;if(I&&typeof L=="string"){const S=Ee(s,t),X=K.select(p.state,i,e.id).find(ne=>ne.id===I.id||ne.turnId===L);A(fe(i,I.id,S,L,_e(X??I,S),!X&&!!l&&ue.select(p.state,l),ae))}E("accepted",I,!0),q(i,e.id);return}const _=T.queuedMessage;if(_){const I=T.turnId,G=typeof I=="string"?I:_.turnId;let L=_;if(u()&&ce(i,e.id)===ye){const S=K.select(p.state,i,e.id),X=We(S,_);A(Ve(i,X,e.id))}else u()&&(M.debug("queued-response queue seed superseded by an authoritative snapshot; reconciling via hydrate",{agentId:i,queuedMessageId:_.id}),await q(i,e.id).catch(()=>{}),L=K.select(p.state,i,e.id).find(S=>S.id===_.id||S.turnId===G));if(u()&&typeof G=="string"){const S=Ee(s,t);A(fe(i,_.id,S,G,_e(L??_,S),!L,ae))}else u()&&M.warn("auto-queued sendMessage response carried no turnId; retry record not parked",{agentId:i,queuedMessageId:_.id})}return}}c&&(E("accepted"),q(i,e.id),Ce(i,e.id)),dt.incrementMessageSent(e.id)}},"send message",{retries:c?0:2,notify:!1,context:{agentId:i,workspace:e.id}}),re=c?await x().then(()=>({success:!0,error:void 0})):await ct.executeWithRecovery(x,Se.streaming,`send-message-${i}`);if(!re.success)throw re.error||new Error(n.agent_streamLifecycle_sendFailed_error())}catch(h){if(!u())return;throw A(z(o.id,!1)),!c&&t.messageMetadata&&A(Ue(o.id,N.id,{metadata:P})),c&&E($?"rejected":"uncertain"),h}}}},{memoize:!1,coalesce:!0,priority:"high"})}export{Ct as a,J as c,We as r,Lt as s};
@@ -0,0 +1 @@
1
+ import{s as i,o as c,c as u,_ as T,n as k,l as N,u as z,r as Q,e as H,b as y,d as Z}from"./CIyUrgF0.js";const J="0.0.0-browser";function ee(e){const t=e?.electronAPI;return!t||t.versions?.electron===J?"web":"electron"}function K(){return typeof window>"u"?"web":ee(window)}function Ie(){return K()==="electron"}function te(e){const t=e==="electron";return{windowChrome:t,nativeDialogs:t,shellIntegration:t,externalEditors:t,browserPanel:t,autoUpdate:t,deeplinks:t,nativeNotifications:t,ssh:t}}function oe(){return te(K())}function he(e){return oe()[e]}const Ne={DEV_CONSOLE:{OPEN:"dev-console:open",CONNECT:"dev-console:connect",READ:"dev-console:read",RECORD:"dev-console:record",CLEAR:"dev-console:clear",SELECT:"dev-console:select",LINKS_STATUS:"dev-console:links-status",LINKS_START:"dev-console:links-start",LINKS_STOP:"dev-console:links-stop",LINKS_READ:"dev-console:links-read",LINKS_RECORD:"dev-console:links-record"},WORKSPACE:{LIST:"workspace:list",CREATE:"workspace:create",GET:"workspace:get",GET_CURRENT:"workspace:get-current",GET_BY_ID:"workspace:get-by-id",GET_ROOT:"workspace:get-root",OPEN:"workspace:open",CLOSE:"workspace:close",SAVE:"workspace:save",UPDATE:"workspace:update",DELETE:"workspace:delete",ACTIVATE:"workspace:activate",ARCHIVE:"workspace:archive",UNARCHIVE:"workspace:unarchive",CLEANUP:"workspace:cleanup",RENAME:"workspace:rename",EXPORT:"workspace:export",IMPORT:"workspace:import",GET_METADATA:"workspace:get-metadata",UPDATE_METADATA:"workspace:update-metadata",GET_RECENT:"workspace:get-recent",CLEAR_RECENT:"workspace:clear-recent",GET_STATS:"workspace:get-stats",VALIDATE:"workspace:validate",REPAIR:"workspace:repair",BACKUP:"workspace:backup",RESTORE:"workspace:restore",GET_SETTINGS:"workspace:get-settings",UPDATE_SETTINGS:"workspace:update-settings",TRIGGER_CHECK:"workspace:trigger-check",LIST_FILES:"workspace:list-files",TEST_WATCHER:"workspace:test-watcher",FIND_REPOSITORIES:"workspace:find-repositories",UPDATE_SPEC_WATCHER_TIMESTAMP:"workspace:update-spec-watcher-timestamp",UPDATE_CURRENT_CONTEXT:"workspace:update-current-context",SEARCH_IN_FILES:"workspace:search-in-files",GET_RECENT_REPOSITORIES:"workspace:get-recent-repositories",ADD_RECENT_REPOSITORY:"workspace:add-recent-repository",CLEAR_RECENT_REPOSITORIES:"workspace:clear-recent-repositories",REMOVE_RECENT_REPOSITORY:"workspace:remove-recent-repository",UPDATE_GIT_INFO:"workspace:update_git_info",GET_SETTINGS_ALT:"workspace:getSettings",UPDATE_SETTINGS_ALT:"workspace:updateSettings",LOAD_RULES:"workspace:load-rules",RENAME_BRANCH:"workspace:rename-branch",GET_HOVER_STATUS:"workspace:get-hover-status",GET_DIFF_SUMMARY:"workspace:get-diff-summary",GET_GIT_SUMMARY:"workspace:get-git-summary",GET_TASKS:"workspace:get-tasks"},AGENT:{LOAD_INITIAL_CONFIG:"agent:load-initial-config",AVAILABLE:"agent:available",RESUME:"agent:resume",CLEANUP:"agent:cleanup",GET_USER_RULES:"agent:get-user-rules",GET_SPECIALIZATION_RULES:"agent:get-specialization-rules",TRACK_STARTED:"agent:track-started",TRACK_COMPLETED:"agent:track-completed",TRACK_ERROR:"agent:track-error",CREATE:"agent:create",CIRCUIT_BREAKER_RESET:"agent:circuit-breaker:reset",SEND_MESSAGE:"agent:send-message",STOP:"agent:stop",SEND:"agent:send",GET_SESSION:"agent:get-session",LIST_SESSIONS:"agent:list-sessions",DELETE_SESSION:"agent:delete-session",RENAME:"agent:rename",SET_PRIORITY:"agent:set-priority",SUBSCRIBE_UPDATES:"agent:subscribe-updates",UNSUBSCRIBE_UPDATES:"agent:unsubscribe-updates",GET_SUGGESTIONS:"agent:get-suggestions",APPLY_SUGGESTION:"agent:apply-suggestion",GET_COMPLETIONS:"agent:get-completions",VALIDATE_INPUT:"agent:validate-input",FORMAT_OUTPUT:"agent:format-output",GET_SHORTCUTS:"agent:get-shortcuts",ADD_SHORTCUT:"agent:add-shortcut",REMOVE_SHORTCUT:"agent:remove-shortcut",EXECUTE_SHORTCUT:"agent:execute-shortcut",GET_PLUGINS:"agent:get-plugins",INSTALL_PLUGIN:"agent:install-plugin",UNINSTALL_PLUGIN:"agent:uninstall-plugin",ENABLE_PLUGIN:"agent:enable-plugin",DISABLE_PLUGIN:"agent:disable-plugin",GET_PLUGIN_SETTINGS:"agent:get-plugin-settings",UPDATE_PLUGIN_SETTINGS:"agent:update-plugin-settings",EXECUTE_PLUGIN_ACTION:"agent:execute-plugin-action",GET_WEBHOOKS:"agent:get-webhooks",ADD_WEBHOOK:"agent:add-webhook",REMOVE_WEBHOOK:"agent:remove-webhook",TEST_WEBHOOK:"agent:test-webhook",GET_INTEGRATIONS:"agent:get-integrations",CONNECT_INTEGRATION:"agent:connect-integration",DISCONNECT_INTEGRATION:"agent:disconnect-integration",SYNC_INTEGRATION:"agent:sync-integration",GET_INTEGRATION_STATUS:"agent:get-integration-status",GET_INTEGRATION_DATA:"agent:get-integration-data",UPDATE_INTEGRATION_SETTINGS:"agent:update-integration-settings",TEST_INTEGRATION:"agent:test-integration",GET_WORKFLOWS:"agent:get-workflows",CREATE_WORKFLOW:"agent:create-workflow",UPDATE_WORKFLOW:"agent:update-workflow",DELETE_WORKFLOW:"agent:delete-workflow",EXECUTE_WORKFLOW:"agent:execute-workflow",PAUSE_WORKFLOW:"agent:pause-workflow",RESUME_WORKFLOW:"agent:resume-workflow",CANCEL_WORKFLOW:"agent:cancel-workflow",GET_WORKFLOW_STATUS:"agent:get-workflow-status",GET_WORKFLOW_HISTORY:"agent:get-workflow-history",EXPORT_WORKFLOW:"agent:export-workflow",IMPORT_WORKFLOW:"agent:import-workflow",VALIDATE_WORKFLOW:"agent:validate-workflow",OPTIMIZE_WORKFLOW:"agent:optimize-workflow",GET_WORKFLOW_METRICS:"agent:get-workflow-metrics",GET_WORKFLOW_LOGS:"agent:get-workflow-logs",CLEAR_WORKFLOW_LOGS:"agent:clear-workflow-logs",SCHEDULE_WORKFLOW:"agent:schedule-workflow",UNSCHEDULE_WORKFLOW:"agent:unschedule-workflow",GET_SCHEDULED_WORKFLOWS:"agent:get-scheduled-workflows",GET_WORKFLOW_TRIGGERS:"agent:get-workflow-triggers",ADD_WORKFLOW_TRIGGER:"agent:add-workflow-trigger",REMOVE_WORKFLOW_TRIGGER:"agent:remove-workflow-trigger",TEST_WORKFLOW_TRIGGER:"agent:test-workflow-trigger",GET_WORKFLOW_VARIABLES:"agent:get-workflow-variables",SET_WORKFLOW_VARIABLES:"agent:set-workflow-variables",GET_WORKFLOW_DEPENDENCIES:"agent:get-workflow-dependencies",RESOLVE_WORKFLOW_DEPENDENCIES:"agent:resolve-workflow-dependencies",GET_WORKFLOW_PERMISSIONS:"agent:get-workflow-permissions",SET_WORKFLOW_PERMISSIONS:"agent:set-workflow-permissions",SHARE_WORKFLOW:"agent:share-workflow",UNSHARE_WORKFLOW:"agent:unshare-workflow",CLONE_WORKFLOW:"agent:clone-workflow",MERGE_WORKFLOWS:"agent:merge-workflows",DIFF_WORKFLOWS:"agent:diff-workflows",GET_WORKFLOW_VERSIONS:"agent:get-workflow-versions",RESTORE_WORKFLOW_VERSION:"agent:restore-workflow-version",TAG_WORKFLOW_VERSION:"agent:tag-workflow-version",GET_WORKFLOW_TAGS:"agent:get-workflow-tags",REMOVE_WORKFLOW_TAG:"agent:remove-workflow-tag",SET_MODEL:"agent:set-model"},EVENTS:{QUERY:"events:query",EMIT:"events:emit",GET_LAST_EVENT:"events:getLastEvent",GET_STATISTICS:"events:getStatistics",GET_AGENT_SUBSCRIPTIONS:"events:get-agent-subscriptions",UNSUBSCRIBE_AGENT:"events:unsubscribe-agent"},AUGGIE:{INSTALL:"auggie:install",AUTHENTICATE:"auggie:authenticate",GET_CONFIG:"auggie:get-config",UPDATE_CONFIG:"auggie:update-config",GET_LATEST_SESSION:"auggie:get-latest-session",EXTRACT_FILE_CHANGES:"auggie:extract-file-changes",GET_PATH:"auggie:get-path",GET_USER_INFO:"auggie:get-user-info",UNINSTALL_MCP_CLAUDE_CODE:"auggie:uninstall-mcp-claude-code",UNINSTALL_MCP_CODEX:"auggie:uninstall-mcp-codex",UNINSTALL_MCP_OPENCODE:"auggie:uninstall-mcp-opencode",UNINSTALL_MCP_CORTEX:"auggie:uninstall-mcp-cortex",UNINSTALL_MCP_PI:"auggie:uninstall-mcp-pi",UNINSTALL_MCP_DROID:"auggie:uninstall-mcp-droid"},PROVIDERS:{GET_MODELS:"providers:get-models",GET_AVAILABILITY:"providers:get-availability",PREPARE_ADAPTERS:"providers:prepare-adapters",GET_PATHS:"providers:get-paths",CHECK_SINGLE:"providers:check-single"},FILE:{READ:"file:read",READ_CHUNK:"file:read-chunk",HASH:"file:hash",WRITE:"file:write",DELETE:"file:delete",EXISTS:"file:exists",LIST:"file:list",COPY:"file:copy",MOVE:"file:move",GET_INFO:"file:get-info",READ_DIR_WITH_STATS:"file:readDirWithStats",GET_GITIGNORE_PATTERNS:"file:getGitignorePatterns",READ_BATCH:"file:read-batch",MKDIR:"file:mkdir",GET_GIT_STATUS:"file:getGitStatus",GET_TREE_WITH_SIZES:"file:getTreeWithSizes",GET_DIRECTORY_STATUS:"file:getDirectoryStatus",DOWNLOAD:"file:download",DOWNLOAD_ATTACHMENT:"file:download-attachment"},PRIMITIVES:{CODEBASE_SEARCH:"codebase:search",TERMINAL_RUN:"terminal:runCommand",TERMINAL_KILL:"terminal:killProcess",TERMINAL_SUBSCRIBE:"terminal:subscribeOutput",AGENT_RUN:"agent:runAction"},SYSTEM:{GET_INFO:"system:get-info",GET_RESOURCES:"system:get-resources",OPEN_EXTERNAL:"system:open-external",SHOW_ITEM_IN_FOLDER:"system:show-item-in-folder",WRITE_CLIPBOARD:"system:write-clipboard",BEEP:"system:beep",HOME_DIRECTORY:"system:home-directory",EXECUTE_COMMAND:"system:execute-command",EXECUTE_COMMAND_STREAMING:"system:execute-command-streaming",CHECK_GIT:"system:check-git",CHECK_NODE:"system:check-node",CHECK_GH:"system:check-gh",CHECK_RTK:"system:check-rtk",LIST_FONTS:"system:list-fonts"},APP:{SET_BADGE:"app:set-badge",SET_LANGUAGE_PREFERENCE:"app:set-language-preference",VERSION:"app:version",GET_VERSION:"app:get-version",NAME:"app:name",PATH:"app:path",ROOT:"app:root",UI_NAVIGATE:"app:ui:navigate",UI_HIGHLIGHT:"app:ui:highlight",HISTORY_NAVIGATE:"app:history-navigate"},QUIT_CONFIRMATION:{SHOW:"quit-confirmation:show",ACK:"quit-confirmation:ack",RESPONSE:"quit-confirmation:response",DISMISS:"quit-confirmation:dismiss"},COLLABORATION_AUTH:{POLICY:"collaboration-auth:policy",OPEN:"collaboration-auth:open",SHOW:"collaboration-auth:show",ACTION:"collaboration-auth:action",DISMISS:"collaboration-auth:dismiss"},INVITE_CONSENT:{SHOW:"invite-consent:show",ACK:"invite-consent:ack",RESPONSE:"invite-consent:response",DISMISS:"invite-consent:dismiss"},INVITE_PROGRESS:{SHOW:"invite-progress:show",UPDATE:"invite-progress:update",ACK:"invite-progress:ack",RESPONSE:"invite-progress:response",DISMISS:"invite-progress:dismiss"},INVITE_NOTICE:{SHOW:"invite-notice:show",ACK:"invite-notice:ack",RESPONSE:"invite-notice:response",DISMISS:"invite-notice:dismiss"},WINDOW:{RELOAD:"window:reload",TOGGLE_DEVTOOLS:"window:toggle-devtools",MINIMIZE:"window:minimize",MAXIMIZE:"window:maximize",CLOSE:"window:close",CREATE:"window:create",OPEN_NEW:"window:open-new",SET_THEME:"window:set-theme",SET_TRANSLUCENCY:"window:set-translucency",SET_MENU_BAR_AUTO_HIDE:"window:set-menu-bar-auto-hide",GET_ZOOM_FACTOR:"window:get-zoom-factor",SET_TITLE:"window:set-title",SET_IN_WORKSPACE:"window:set-in-workspace",SET_OPEN_WORKSPACE_TABS:"window:set-open-workspace-tabs",SET_BROWSER_FOCUSED:"window:set-browser-focused",SET_FULL_SCREEN:"window:set-full-screen",GET_FULL_SCREEN:"window:get-full-screen",SET_DOCK_POINTER_REGION:"window:set-dock-pointer-region",FOCUS_DOCK:"window:focus-dock",GET_DOCK_PLACEMENT:"window:get-dock-placement",UPDATE_DOCK_PLACEMENT:"window:update-dock-placement",SHOW_DOCK_MENU:"window:show-dock-menu",ACTIVATE_APP:"window:activate-app",SWITCH_DOCK_BACKEND:"window:switch-dock-backend",DOCK_BACKEND_SWITCH_FAILED:"window:dock-backend-switch-failed",DOCK_PLACEMENT_CHANGED:"window:dock-placement-changed",DOCK_POINTER_PRESENCE_CHANGED:"window:dock-pointer-presence-changed",DOCK_SHOWN:"window:dock-shown",DOCK_RENDERER_READY:"window:dock-renderer-ready",GET_DOCK_LAB:"window:get-dock-lab",SET_DOCK_LAB:"window:set-dock-lab",DOCK_LAB_CHANGED:"window:dock-lab-changed",CYCLE_FOCUS:"window:cycle-focus"},DOCK_CONTEXT:{GET:"dock-context:get",CHANGED:"dock-context:changed"},DOCK_SHORTCUTS:{GET:"dock-shortcuts:get",SET:"dock-shortcuts:set",CAPTURE:"dock-shortcuts:capture",CHANGED:"dock-shortcuts:changed"},CHAT_MEDIA:{BEGIN:"chat-media:begin",CONTROL:"chat-media:control",CLOSE:"chat-media:close"},DOCK_EVIDENCE:{BEGIN:"dock-evidence:begin",CAPTURE:"dock-evidence:capture",CANCEL:"dock-evidence:cancel",CONTROL:"dock-evidence:control",EVENT:"dock-evidence:event"},DOCK_ANNOTATION:{READY:"dock-annotation:ready",POINTER:"dock-annotation:pointer",GESTURE:"dock-annotation:gesture",GET_STILL:"dock-annotation:get-still",STATE:"dock-annotation:state",TOOLBAR:"dock-annotation:toolbar",SIGNAL:"dock-annotation:signal"},DOCK_CAPTURE_EDITOR:{OPEN:"dock-capture-editor:open",GET:"dock-capture-editor:get",CLOSE:"dock-capture-editor:close",DELETE:"dock-capture-editor:delete",DELETE_REQUESTED:"dock-capture-editor:delete-requested",DELETE_RESULT:"dock-capture-editor:delete-result",DISCARD:"dock-capture-editor:discard",KEEP:"dock-capture-editor:keep",CHANGED:"dock-capture-editor:changed",CONFIRM_DISCARD:"dock-capture-editor:confirm-discard",SAVE:"dock-capture-editor:save",SAVE_REQUESTED:"dock-capture-editor:save-requested",RETAKE:"dock-capture-editor:retake",RETAKE_REQUESTED:"dock-capture-editor:retake-requested",HOLD_BEGIN:"dock-capture-editor:hold-begin",HOLD_END:"dock-capture-editor:hold-end",HOLD_SHOW:"dock-capture-editor:hold-show",ATTACHED:"dock-capture-editor:attached",ATTACH_RETURN:"dock-capture-editor:attach-return",RETAKE_RESULT:"dock-capture-editor:retake-result",TRANSCRIPT_UPDATE:"dock-capture-editor:transcript-update",NOTE_DICTATION:"dock-capture-editor:note-dictation",NOTE_DICTATION_REQUESTED:"dock-capture-editor:note-dictation-requested",NOTE_DICTATION_TEXT:"dock-capture-editor:note-dictation-text",NOTE_DICTATION_UPDATE:"dock-capture-editor:note-dictation-update",WAVEFORM_UPDATE:"dock-capture-editor:waveform-update",SAVE_RESULT:"dock-capture-editor:save-result"},DOCK_MEDIA:{CLIPBOARD_WRITE:"dock-media:clipboard-write",CLIPBOARD_READ:"dock-media:clipboard-read",MENU:"dock-media:menu"},POWER:{GET_BATTERY_STATE:"power:get-battery-state",BATTERY_CHANGED:"power:battery-changed"},TERMINAL:{CREATE_WITH_COMMAND:"terminal:createWithCommand",PROFESSIONAL_CREATE:"terminal:professional:create",PROFESSIONAL_LIST:"terminal:professional:list",PROFESSIONAL_WRITE:"terminal:professional:write",PROFESSIONAL_RESIZE:"terminal:professional:resize",PROFESSIONAL_INFO:"terminal:professional:info",PROFESSIONAL_REFRESH:"terminal:professional:refresh",PROFESSIONAL_DISPOSE:"terminal:professional:dispose",PROFESSIONAL_GET_BUFFER:"terminal:professional:get-buffer"},GIT:{STATUS:"git:status",STATUS_CHANGED:"git:status-changed",AUTH_REQUIRED:"git:auth-required",KEYCHAIN_ACCESS_WARNING:"git:keychain-access-warning",KEYCHAIN_CONSENT_RESPOND:"git:keychain-consent-respond",CHECK_KEYCHAIN_RISK:"git:check-keychain-risk",DIFF:"git:diff",NUMSTAT:"git:numstat",COMMIT:"git:commit",COMMIT_DETAILS:"git:commit-details",PUSH:"git:push",PULL:"git:pull",BRANCH:"git:branch",CHECKOUT:"git:checkout",LOG:"git:log",HISTORY:"git:history",GET_BRANCHES:"git:getBranches",STAGE:"git:stage",UNSTAGE:"git:unstage",STAGE_HUNK:"git:stage-hunk",UNSTAGE_HUNK:"git:unstage-hunk",DISCARD:"git:discard",REMOVE_LOCK:"git:removeLock",SHOW_FILE:"git:show-file",FILE_HISTORY:"git:file-history",RENAME_BRANCH:"git:rename-branch",PULL_BRANCH:"git:pullBranch",GET_BRANCH_STATUS:"git:getBranchStatus",GET_REMOTES:"git:getRemotes",FETCH:"git:fetch"},CONFIG:{GET:"config:get",SET:"config:set",DELETE:"config:delete",GET_ALL:"config:get-all",RESET:"config:reset"},SETTINGS:{GET:"settings:get",SET:"settings:set",GET_ALL:"settings:getAll",UPDATE:"settings:update"},FEATURE_CODES:{ACTIVATE:"feature-codes:activate",GET_ACTIVE:"feature-codes:get-active",DEACTIVATE:"feature-codes:deactivate",RESTART_APP:"feature-codes:restart-app"},USER_MCP:{AUTHENTICATE:"user-mcp:authenticate",CHECK_AUTH:"user-mcp:check-auth",TEST_CONNECTION:"user-mcp:test-connection"},NOTIFICATION:{TEST:"notification:test",REQUEST_PERMISSION:"notification:requestPermission",SHOW:"notification:show"},DIALOG:{MESSAGE:"dialog:message",OPEN:"dialog:open"},VOICE:{LOCAL_AVAILABLE:"voice:local-available",TRANSCRIBE_LOCAL:"voice:transcribe-local",REQUEST_LOCAL_AUTHORIZATION:"voice:request-local-authorization"},SHELL:{OPEN:"shell:open",OPEN_PATH:"shell:openPath",OPEN_EXTERNAL:"shell:openExternal",TRASH_ITEM:"shell:trashItem",SHOW_ITEM_IN_FOLDER:"shell:showItemInFolder"},EDITOR:{GET_SELECTION:"editor:get-selection"},EXTERNAL_EDITORS:{DETECT_INSTALLED:"external-editors:detect-installed",OPEN:"external-editors:open",OPEN_WITH_OTHER:"external-editors:open-with-other"},FIRST_VISIT:{LOAD:"first-visit-state:load",SAVE:"first-visit-state:save",DELETE:"first-visit-state:delete",EXISTS:"first-visit-state:exists"},PANEL_LAYOUT:{LOAD:"panel-layout:load",SAVE:"panel-layout:save"},BROWSER:{REGISTER_TAB:"browser:register-tab",UNREGISTER_TAB:"browser:unregister-tab",REPORT_TAB_BOUNDS:"browser:report-tab-bounds",SET_TAB_VIEWPORT:"browser:set-tab-viewport",OPEN_DEVTOOLS_PANEL:"browser:open-devtools-panel",EXEC:"browser:exec",RESOLVE_URL:"browser:resolve-url",FOCUS_TAB:"browser:focus-tab",SHOW_TAB:"browser:show-tab",LIST_TABS_REQUEST:"browser:list-tabs-request",HOST_WORKSPACE:"browser:host-workspace",CAPTURE_DRAWING:"browser:capture-drawing",AGENT_DRAWING:"browser:agent-drawing",BACKGROUND_HOSTED_WORKSPACES:"browser:background-hosted-workspaces",LIST_TABS_RESPONSE:"browser:list-tabs-response",OPEN_TAB:"browser:open-tab",DIAGNOSE_TAB:"browser:diagnose-tab",CLOSE_TAB:"browser:close-tab",TAB_NAVIGATED:"browser:tab-navigated",TAB_OWNER_CHANGED:"browser:tab-owner-changed",CLEAR_AGENT_TABS:"browser:clear-agent-tabs"},FILE_TRACKING:{AGENT_FILE_CHANGED:"file-tracking:agent-file-changed"},STREAMING:{START:"streaming:start",STOP:"streaming:stop",PAUSE:"streaming:pause",RESUME:"streaming:resume",GET_STATS:"streaming:get-stats"},AGENT_CONFIG:{GET:"agent-config:get",UPDATE:"agent-config:update",RESET:"agent-config:reset"},LOG:{TRACK_FILE_CHANGE:"log:track-file-change",TRACK_AGENT_EVENT:"log:track-agent-event",TRACK_MCP_CALL:"log:track-mcp-call",PATHS:"log:paths",READ:"log:read",CLEAR:"log:clear",SUMMARY:"log:summary",EXPORT_DEBUG_BUNDLE:"log:export-debug-bundle",PERSIST_RENDERER_LOGS:"log:persist-renderer-logs"},USER_RULES:{GET:"user-rules:get",SET:"user-rules:set",DELETE:"user-rules:delete",GET_ALL:"user-rules:get-all",GET_FORMATTED:"user-rules:get-formatted",SET_ENABLED:"user-rules:set-enabled",EXPORT:"user-rules:export",IMPORT:"user-rules:import",GET_COMBINED_PROMPT:"user-rules:get-combined-prompt",UPDATE:"user-rules:update",GET_BY_TYPE:"user-rules:get-by-type",GET_FORMATTED_BY_TYPE:"user-rules:get-formatted-by-type",UPDATE_BY_TYPE:"user-rules:update-by-type",SET_ENABLED_BY_TYPE:"user-rules:set-enabled-by-type",DELETE_BY_TYPE:"user-rules:delete-by-type",EXPORT_BY_TYPE:"user-rules:export-by-type"},VSCODE:{OPEN:"vscode:open",OPEN_FILE:"vscode:openFile",OPEN_DIFF:"vscode:open-diff",OPEN_GIT_DIFF:"vscode:open-git-diff"},JETBRAINS:{OPEN:"jetbrains:open"},XCODE:{OPEN:"xcode:open"},DEEP_LINK:{HANDLE:"deep-link:handle",CONSUME_PENDING:"deep-link:consume-pending"},LEGACY:{GET_HOME_DIRECTORY:"get_home_directory"},RULES:{LIST:"rules:list",LOAD_WORKSPACE:"rules:load-workspace",GET_CONTEXT:"rules:get-context"},CONFIG_RULES:{GET_ALL:"config:getAll"},USER_ACTIVITY:{MARK_NOTE_READ:"user-activity:mark-note-read",GET_NOTE_READ_STATUS:"user-activity:get-note-read-status",GET_UNREAD_NOTE_IDS:"user-activity:get-unread-note-ids"},GIT_TRACKING:{GET_STATE:"git-tracking:get-state",GET_SYNC_STATUS:"git-tracking:get-sync-status",SYNC:"git-tracking:sync",GET_FILE_DIFF:"git-tracking:get-file-diff",IS_GITHUB_AUTHENTICATED:"git-tracking:is-github-authenticated",GET_GITHUB_BRANCHES:"git-tracking:get-github-branches",GET_PULL_REQUESTS:"git-tracking:get-pull-requests",SEARCH_PULL_REQUESTS:"git-tracking:search-pull-requests",GET_PULL_REQUEST:"git-tracking:get-pull-request",CREATE_PULL_REQUEST:"git-tracking:create-pull-request",GET_GITHUB_ISSUES:"git-tracking:get-github-issues",SEARCH_GITHUB_ISSUES:"git-tracking:search-github-issues",LIST_RELATED_REPOS:"git-tracking:list-related-repos",GET_REMOTE_URL:"git-tracking:get-remote-url",GET_CHECK_RUNS:"git-tracking:get-check-runs",GET_PR_REVIEWS:"git-tracking:get-pr-reviews"},GITHUB_AUTH:{IS_AUTHENTICATED:"github-auth:is-authenticated",GET_USER:"github-auth:get-user",START_AUTH:"github-auth:start",POLL_FOR_TOKEN:"github-auth:poll",CANCEL_AUTH:"github-auth:cancel",LOGOUT:"github-auth:logout",GET_AUTH_STATE:"github-auth:get-auth-state",GET_STATUS:"github-auth:get-status",LIST_REPOS:"github-auth:list-repos",SEARCH_REPOS:"github-auth:search-repos",SEARCH_USERS:"github-auth:search-users"},FORGE_AUTH:{GET_STATUS:"forge-auth:get-status",CONNECT:"forge-auth:connect",CANCEL_AUTH:"forge-auth:cancel",REVOKE:"forge-auth:revoke",GET_USER:"forge-auth:get-user"},LINEAR_AUTH:{IS_AUTHENTICATED:"linear-auth:is-authenticated",START_AUTH:"linear-auth:start-auth",CANCEL_AUTH:"linear-auth:cancel-auth",LOGOUT:"linear-auth:logout",GET_AUTH_STATE:"linear-auth:get-auth-state",GET_STATUS:"linear-auth:get-status",FETCH_MY_ISSUES:"linear-auth:fetch-my-issues",SEARCH_ISSUES:"linear-auth:search-issues"},SENTRY_AUTH:{IS_AUTHENTICATED:"sentry-auth:is-authenticated",SAVE_CONFIG:"sentry-auth:save-config",GET_AUTH_STATE:"sentry-auth:get-auth-state",LOGOUT:"sentry-auth:logout",FETCH_PROJECTS:"sentry-auth:fetch-projects",FETCH_ISSUES:"sentry-auth:fetch-issues",SEARCH_ISSUES:"sentry-auth:search-issues",GET_ISSUE:"sentry-auth:get-issue"},OBSERVABILITY_EXT:{},AGENT_TESTING:{RUN:"agent-testing:run",GET_REPORT:"agent-testing:get-report",GET_AGENT_REPORTS:"agent-testing:get-agent-reports",CLEANUP:"agent-testing:cleanup"},DEBUG:{TRIGGER_BACKEND_RESUME:"debug:trigger-backend-resume",LIST_AGENTS:"debug:list-agents"},SETUP_SCRIPTS:{GENERATE:"setup-scripts:generate",READ_REPO_CONFIG:"setup-scripts:read-repo-config",DETECT_TYPE:"setup-scripts:detect-type",GENERATE_WITH_AGENT:"setup-scripts:generate-with-agent",STOP_AGENT:"setup-scripts:stop-agent",STREAM_CHUNK:"setup-scripts:stream-chunk",STREAM_COMPLETE:"setup-scripts:stream-complete",STREAM_ERROR:"setup-scripts:stream-error"},GIT_EXT:{IS_REPOSITORY:"git:isRepository",GET_AUTO_COMMIT_STATUS:"git:get-auto-commit-status",GET_BACKGROUND_OPS_STATUS:"git:background-ops-status"},ACCEPT_CHANGES:{CHECK_PATH_HAS_CHANGES:"accept-changes:check-path-has-changes"},CHAT_EXPORT:{CHAT_TO_HTML:"export:chat-to-html"},FILE_EXT:{},COMMENTS_EXT:{},WORKSPACE_EXT:{},AGENT_LAUNCH:{},AGENT_CONTEXT:{GET:"agent-context:get"},RECOVERY:{NEEDS_RECOVERY:"recovery:needs-recovery",MARK_STREAMING:"recovery:mark-streaming",MARK_COMPLETE:"recovery:mark-complete",CLEAR_STREAMING:"recovery:clear-streaming",CHECK_NEEDS_RECOVERY:"recovery:check-needs-recovery",GET_STATUS:"recovery:get-status",CREATE_CHECKPOINT:"recovery:create-checkpoint",RESTORE_CHECKPOINT:"recovery:restore-checkpoint",RECOVER_SESSION:"recovery:recover-session",GET_STATS:"recovery:get-stats"},STORAGE:{SAVE:"storage:save",DELETE:"storage:delete"},AUTO_UPDATE:{CHECK_MANUAL:"auto-update:check-manual",DOWNLOAD:"auto-update:download",INSTALL:"auto-update:install",DISMISS_DOWNLOADED_TOAST:"auto-update:dismiss-downloaded-toast",GET_STATE:"auto-update:get-state",SET_CHANNEL:"auto-update:set-channel",SET_SHARE_STATISTICS:"auto-update:set-share-statistics",STATUS_CHANGED:"auto-update:status-changed",PROGRESS:"auto-update:progress",ERROR:"auto-update:error",UP_TO_DATE:"auto-update:up-to-date",SHOW_TOAST:"auto-update:show-toast"},RELEASE_NOTES:{GET:"release-notes:get",GET_PENDING:"release-notes:get-pending",DISMISS:"release-notes:dismiss",SHOW:"release-notes:show",CLOSE:"release-notes:close"},PIP:{OPEN:"pip:open",CLOSE:"pip:close",CLOSE_ALL_FOR_WORKSPACE:"pip:close-all-for-workspace"},BROWSER_ACCESS:{GET_STATE:"browser-access:get-state",SET_ENABLED:"browser-access:set-enabled",SET_PORT:"browser-access:set-port",RESET_KEY:"browser-access:reset-key",CREATE_SIGN_IN_CODE:"browser-access:create-sign-in-code"},WEBSOCKET_API:{GET_STATUS:"websocket-api:get-status",SET_ENABLED:"websocket-api:set-enabled",REGENERATE_TOKEN:"websocket-api:regenerate-token",SET_DISCOVERY:"websocket-api:set-discovery"},TOKEN_USAGE:{GET:"token-usage:get",CHANGED:"token-usage:changed"},BACKEND:{DESKTOP_PERMISSIONS:"backend:desktop-permissions",DESKTOP_OS_PERMISSIONS:"backend:desktop-os-permissions",REQUEST:"backend:request",PR_MONITOR:{READY:"backend:pr-monitor:ready",CAPTURE:"backend:pr-monitor:capture",REQUEST:"backend:pr-monitor:request",RELEASE:"backend:pr-monitor:release",RETIRED:"backend:pr-monitor:retired",NOTIFICATION:"backend:pr-monitor:notification"},NATIVE_REVIEW:{PREPARE:"backend:native-review:prepare",EXECUTE:"backend:native-review:execute",RECONCILE:"backend:native-review:reconcile",RELEASE:"backend:native-review:release",RETIRED:"backend:native-review:retired"},REPOSITORY_SELECTION:{CAPTURE:"backend:repository-selection:capture",CONFIRM:"backend:repository-selection:confirm",RECONCILE:"backend:repository-selection:reconcile",RELEASE:"backend:repository-selection:release",RETIRED:"backend:repository-selection:retired"},REPOSITORY_CHECKOUT:{CAPTURE:"backend:repository-checkout:capture",REQUEST:"backend:repository-checkout:request",RELEASE:"backend:repository-checkout:release",RETIRED:"backend:repository-checkout:retired"},REPOSITORY_RESOURCE:{CAPTURE:"backend:repository-resource:capture",DETAIL:"backend:repository-resource:detail",RELEASE:"backend:repository-resource:release",RETIRED:"backend:repository-resource:retired"},REPOSITORY:{CAPTURE:"backend:repository:capture",RETIRED:"backend:repository:retired",REQUEST:"backend:repository:request",RELEASE:"backend:repository:release"},SUBSCRIBE:"backend:subscribe",UNSUBSCRIBE:"backend:unsubscribe",GET_STATUS:"backend:get-status",NODE_CAPABILITIES:"backend:node-capabilities",READ_PRINCIPAL:"backend:read-principal",NOTIFICATION:"backend:notification",STATUS:"backend:status",SPAWN_SIDECAR:"backend:spawn-sidecar",OPEN_LOCAL_AND_SPAWN:"backend:open-local-and-spawn",GET_SIDECAR_RUN_LOG:"backend:get-sidecar-run-log",RESTART_ORPHANED_SIDECAR:"backend:restart-orphaned-sidecar"},CONNECTIONS:{LIST:"connections:list",CAPTURE_FINGERPRINT:"connections:capture-fingerprint",ADD:"connections:add",UPDATE:"connections:update",TEST:"connections:test",ROTATE_SECRET:"connections:rotate-secret",GET_TUNNEL:"connections:get-tunnel",SET_TUNNEL:"connections:set-tunnel",OPEN:"connections:open",FORGET:"connections:forget",PAIR_LINK_INSPECT:"connections:pair-link-inspect",PAIR_LINK_COMMIT:"connections:pair-link-commit",PAIR_LINK_DISCARD:"connections:pair-link-discard",UPDATE_BACKEND:"connections:update-backend",CHANGED:"connections:changed",CERT_MISMATCH:"connections:cert-mismatch",CERT_WARNINGS:"connections:cert-warnings",PROTOCOL_MISMATCH:"connections:protocol-mismatch",AUTH_REJECTED:"connections:auth-rejected",SYNC_GET_STATE:"connections:sync-get-state",SYNC_SET_ENABLED:"connections:sync-set-enabled",SYNC_STATUS_CHANGED:"connections:sync-status-changed",PUBLISH_SELF:"connections:publish-self",SELF_PUBLISHED_STATE:"connections:self-published-state",REFRESH_SELF:"connections:refresh-self",UNPUBLISH_SELF:"connections:unpublish-self"},GUEST_SESSIONS:{LIST:"guest-sessions:list",LEAVE:"guest-sessions:leave",LEAVE_WORKSPACE:"guest-sessions:leave-workspace",CHANGED:"guest-sessions:changed"},MACHINE_RAIL:{GET_STATE:"machine-rail:get-state",SELECT:"machine-rail:select",ADD:"machine-rail:add",REMOVE:"machine-rail:remove",REORDER:"machine-rail:reorder",SET_ENABLED:"machine-rail:set-enabled",CHANGED:"machine-rail:changed",FORWARD_TOAST:"machine-rail:forward-toast",TOAST:"machine-rail:toast",SHOWN:"machine-rail:shown",READY:"machine-rail:ready",HEALTH:"machine-rail:health",BACKDROP:"machine-rail:backdrop",GET_BACKDROP:"machine-rail:get-backdrop",BACKDROP_CHANGED:"machine-rail:backdrop-changed"},PRESENCE:{REPORT:"presence:report"},TRANSFER:{START:"transfer:start",FINALIZE:"transfer:finalize",CANCEL:"transfer:cancel",PROGRESS:"transfer:progress",IMPORT_START:"transfer:import-start",IMPORT_CANCEL:"transfer:import-cancel",IMPORT_PROGRESS:"transfer:import-progress"},REMOTE_MACHINES:{EXPOSE:"remote-machines:expose",UNEXPOSE:"remote-machines:unexpose",MACHINE_FINGERPRINT:"remote-machines:machine-fingerprint",INVITE_INSPECT:"remote-machines:invite-inspect",INVITE_CLAIM:"remote-machines:invite-claim",INVITE_DISCARD:"remote-machines:invite-discard"},MACHINE_SETUP:{SSH_DEFAULTS:"machine-setup:ssh-defaults",SSH_START:"machine-setup:ssh-start",SSH_TRUST:"machine-setup:ssh-trust",SSH_CANCEL:"machine-setup:ssh-cancel",SSH_EVENT:"machine-setup:ssh-event"},HARDWARE_CONSOLE:{CLEAR_LIGHTING:"hardware-console:clear-lighting",CLEAR_LIGHTING_DONE:"hardware-console:clear-lighting-done",GET_OWNER_STATUS:"hardware-console:get-owner-status",OWNER_CHANGED:"hardware-console:owner-changed"}},g={"global.command-palette":"mod+shift+p","global.settings":"mod+,","global.keyboard-shortcuts":"mod+?","global.command-palette-alt":"mod+k","global.toggle-spaces":"mod+o","global.new-space":"mod+n","global.search":"mod+f","global.next-space":"ctrl+tab","global.previous-space":"ctrl+shift+tab","global.next-space-alt":"mod+shift+]","global.previous-space-alt":"mod+shift+[","navigation.go-to-device":"mod+1-9","navigation.go-to-tab":"mod+alt+1-9","navigation.new-tab":"mod+t","navigation.close-tab":"mod+w","navigation.close-space-tab":"mod+shift+w","navigation.reopen-tab":"mod+shift+t","navigation.move-space-tab-left":"mod+alt+shift+left","navigation.move-space-tab-right":"mod+alt+shift+right","workspace.new-agent":"mod+alt+a","workspace.new-note":"mod+alt+n","workspace.new-terminal":"mod+alt+t","workspace.new-browser":"mod+alt+b","workspace.set-aside":"mod+shift+s","chat.send":"enter","chat.force-send":"mod+enter","chat.new-line":"shift+enter","chat.focus-input":"/","chat.mention-context":"@","editor.go-to-line":"mod+g","editor.save":"mod+s","editor.undo":"mod+z","editor.redo":"mod+shift+z","editor.toggle-task-list":"mod+shift+9","editor.toggle-word-wrap":"alt+z","editor.copy":"mod+c","editor.select-all":"mod+a","panel.toggle-sidebar":"mod+b","panel.create-column-right":"mod+\\","panel.focus-next-column":"mod+alt+right","panel.maximize":"mod+shift+m","panel.focus-previous-column":"mod+alt+left","panel.next-pane":"mod+]","panel.previous-pane":"mod+[","panel.move-pane-next-column":"mod+alt+pagedown","panel.move-pane-previous-column":"mod+alt+pageup","panel.copy-browser-url":"mod+shift+c","leader.navigate-panels":"h/j/k/l","leader.resize-panels":"H/J/K/L","leader.split-right":"%","leader.toggle-zoom":"z","leader.close-panel":"x","leader.next-previous-panel":"o/p","leader.equalize-sizes":"=","leader.jump-to-panel":"q + 1-9","leader.cycle-layout":"space","dock.focus":"ctrl+shift+d","dock.capture":"ctrl+shift+s","dock.record":"ctrl+shift+r"},L=["mod","ctrl","alt","shift"],G={mod:"mod",cmd:"mod",command:"mod",meta:"mod",control:"ctrl",ctrl:"ctrl",option:"alt",alt:"alt",shift:"shift"},M={escape:"esc",return:"enter",arrowup:"up",arrowdown:"down",arrowleft:"left",arrowright:"right",pgup:"pageup",pgdn:"pagedown"," ":"space"},ae=new Set(["backspace","delete","down","end","enter","esc","f1","f2","f3","f4","f5","f6","f7","f8","f9","f10","f11","f12","home","left","pagedown","pageup","right","space","tab","up"]),se=new Set(["alt","control","meta","shift"]),v={"~":"`","!":"1","@":"2","#":"3",$:"4","%":"5","^":"6","&":"7","*":"8","(":"9",")":"0",_:"-","+":"=","{":"[","}":"]","|":"\\",":":";",'"':"'","<":",",">":".","?":"/"},ne=Object.fromEntries(Object.entries(v).map(([e,t])=>[t,e]));function Ce(e,t){if(se.has(e.key.toLowerCase())||!t&&e.metaKey)return null;let a=e.key;e.altKey&&e.code?.startsWith("Key")?a=e.code.slice(3):e.altKey&&e.code?.startsWith("Digit")&&(a=e.code.slice(5));const o=[];return(t&&e.metaKey||!t&&e.ctrlKey)&&o.push("mod"),t&&e.ctrlKey&&o.push("ctrl"),e.altKey&&o.push("alt"),e.shiftKey&&o.push("shift"),o.push(a),w(o.join("+"))}function re(e){return Object.prototype.hasOwnProperty.call(g,e)}function m(e){const t=e.trim();if(!t||t.includes("/"))return null;const a=t.split("+").map(r=>r.trim()).filter(Boolean);if(a.length===0)return null;const o=new Set;for(const r of a.slice(0,-1)){const E=G[r.toLowerCase()];if(!E||o.has(E))return null;o.add(E)}const s=a.at(-1)??"";if(G[s.toLowerCase()])return null;const n=M[s.toLowerCase()]??s.toLowerCase();return n.length===1||ae.has(n)?{key:n,mod:o.has("mod"),ctrl:o.has("ctrl"),alt:o.has("alt"),shift:o.has("shift")}:null}function w(e){const t=e.trim();if(t.includes("/")){const r=t.split("/").map(d=>d.trim()),E=r[0]??"",l=E.includes("+")?`${E.slice(0,E.lastIndexOf("+"))}+`:"",p=r.map((d,I)=>{const _=I>0&&l&&!d.includes("+")?l+d:d,C=_.slice(_.lastIndexOf("+")+1),h=m(/^[A-Z]$/.test(C)?`${_.slice(0,-1)}shift+${C.toLowerCase()}`:_);return h?[...L.filter(j=>h[j]),h.key].join("+"):null});return p.some(d=>!d)?null:p.join("/")}const a=t.match(/^(.*\+)?([1-8])-9$/i);if(a){const r=m(`${a[1]??""}${a[2]}`);if(!r)return null;const E=L.filter(l=>r[l]);return`${E.length?`${E.join("+")}+`:""}${a[2]}-9`}const o=t.match(/^(.+?)\s+\+\s+([1-8]-9)$/);if(o){const r=w(o[1]);return r?`${r} + ${o[2]}`:null}const s=m(e);return s?[...L.filter(r=>s[r]),s.key].join("+"):null}function me(e,t){const a=g[e],o=t.includes("+")?`${t.slice(0,t.lastIndexOf("+"))}+`:"",s=a.match(/^(.+?)\s+\+\s+([1-8]-9)$/);if(s)return`${t} + ${s[2]}`;const n=a.match(/^(?:.*\+)?([1-8]-9)$/);return n?`${o}${n[1]}`:a.includes("/")?`${o}${a}`:t}function fe(e){return e.match(/^(.+?)\s+\+\s+[1-8]-9$/)?.[1]??null}function ie(e){const t=e.match(/^(.*\+)?([1-8])-9$/);if(t){const n=t[1]??"";return Array.from({length:10-Number(t[2])},(r,E)=>`${n}${Number(t[2])+E}`)}const a=e.split("/"),o=a[0]??"",s=o.includes("+")?`${o.slice(0,o.lastIndexOf("+"))}+`:"";return a.map((n,r)=>{const E=n.trim(),l=r>0&&s&&!E.includes("+")?s+E:E;return/^[A-Z]$/.test(l)?`shift+${l.toLowerCase()}`:l==="space"?"space":l})}function ce(e,t,a){return ie(t).findIndex(o=>Ee(e,o,a))}function Ee(e,t,a){const o=m(t);if(!o)return!1;const s=e.altKey&&e.code?.startsWith("Digit")?e.code.slice(5):e.key,n=M[s.toLowerCase()]??s.toLowerCase(),r=o.key.length===1&&'~!@#$%^&*()_+{}|:"<>?'.includes(o.key);return new Set([n,v[n],e.shiftKey?ne[n]:void 0]).has(o.key)&&e.metaKey===(o.mod&&a)&&e.ctrlKey===(o.ctrl||o.mod&&!a)&&e.altKey===o.alt&&e.shiftKey===(o.shift||r)}function Le(e){if(!e||typeof e!="object"||Array.isArray(e))return{};const t={};for(const[a,o]of Object.entries(e)){if(!re(a)||typeof o!="string")continue;const s=w(o);s&&s!==g[a]&&(t[a]=s)}return t}function ke(e,t){return t[e]??g[e]}function we(e,t,a,o){return a(e)!==g[e]?!1:Object.keys(g).some(s=>{if(s===e||s.startsWith("leader."))return!1;const n=a(s);return n===g[s]?!1:ce(t,n,o)>=0})}function R(e){if(/[\u0000-\u0020\u007f\\]/.test(e))return null;const t=/^https:\/\/([^/?#]+)([^?#]*)/i.exec(e);if(!t||/[@%]/.test(t[1]))return null;try{const a=new URL(e);if(a.protocol!=="https:"||a.username||a.password)return null;const o=t[2].replace(/\/$/,""),s=o?o.slice(1).split("/"):[];return s.some(n=>!/^[A-Za-z0-9_.-]+$/.test(n)||n==="."||n==="..")?null:{url:a,path:s}}catch{return null}}function D(e){const t=R(e);return!!t&&!t.url.search&&!t.url.hash&&e===t.url.origin+(t.path.length?`/${t.path.join("/")}`:"")}function De(e,t){if(!D(t))return null;const a=R(e),o=R(t);if(!a||!o||o.url.origin!==a.url.origin||!o.path.every((n,r)=>a.path[r]===n))return null;const s=a.path.slice(o.path.length);return s.length<2||s[0]==="groups"||s.includes("-")?null:{provider:"gitlab",instanceBaseUrl:t,projectPath:s.join("/")}}function Te(e,t){const a=R(e);if(!a)return null;let o=null;for(const s of t){if(s.provider!=="gitlab"||!D(s.instanceBaseUrl))continue;const n=R(s.instanceBaseUrl);if(!n||n.url.origin!==a.url.origin||!n.path.every((C,h)=>a.path[h]===C))continue;const r=a.path.slice(n.path.length),E=r.indexOf("-");if(E<2||r[0]==="groups")continue;const[l,p,...d]=r.slice(E+1),I=l==="merge_requests"?"merge-request":l==="issues"?"issue":null;if(!I||!/^[1-9]\d*$/.test(p??"")||!Number.isSafeInteger(Number(p))||d.length&&(I!=="merge-request"||d.length!==1||!["diffs","commits","pipelines"].includes(d[0])))continue;const _={repository:{provider:"gitlab",instanceBaseUrl:s.instanceBaseUrl,projectPath:r.slice(0,E).join("/")},kind:I,number:Number(p)};if(o&&JSON.stringify(o)!==JSON.stringify(_))return null;o=_}return o}function Ge(e){const t=R(e);return t?Te(e,[{provider:"gitlab",instanceBaseUrl:t.url.origin}])!==null:!1}const W="((\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-((0[13578]|1[02])-(0[1-9]|[12]\\d|3[01])|(0[469]|11)-(0[1-9]|[12]\\d|30)|(02)-(0[1-9]|1\\d|2[0-8])))",F="([01]\\d|2[0-3]):[0-5]\\d(:[0-5]\\d(\\.\\d+)?)?",le=new RegExp(`^${W}T${F}(Z)$`),de=new RegExp(`^${W}T${F}(Z|([+-]\\d{2}:?\\d{2}))$`);function P(e={}){return i().regex(e.offset?de:le,e.message??"Invalid datetime")}function B(e="Invalid url"){return i().refine(t=>URL.canParse(t),e)}const U=i().regex(/^(0|[1-9][0-9]*)$/).refine(e=>/^(0|[1-9][0-9]*)$/.test(e)&&BigInt(e)<=18446744073709551615n),Pe=c({target:T(["local","remote"]),checkout:T(["shared","worktree","isolated"]),os:T(["linux","macos"]).optional(),nodeId:i().min(1).optional(),exclusive:u().optional()}).strict().refine(e=>e.target!=="remote"||e.checkout==="isolated").refine(e=>!e.exclusive||e.target==="remote"&&e.checkout==="isolated");function b(e){return e==="e2b"||e==="cloud"}const x=c({target:T(["local","remote","e2b","cloud"]).optional(),checkout:T(["shared","worktree","isolated"]).optional(),os:T(["linux","macos"]).optional(),arch:T(["x86_64","aarch64"]).optional(),nodeId:i().min(1).refine(e=>new TextEncoder().encode(e).length<=128).optional(),exclusive:u().optional(),cloudMachineId:i().min(1).refine(e=>new TextEncoder().encode(e).length<=64).optional()}).strict(),Ue=x.refine(e=>e.target!=="remote"||(e.checkout??"isolated")==="isolated").refine(e=>e.cloudMachineId===void 0||b(e.target)).refine(e=>!b(e.target)||(e.checkout??"isolated")==="isolated"&&!e.os&&!e.arch&&!e.nodeId&&!e.exclusive).refine(e=>!e.exclusive||e.target!=="local"&&(e.checkout??"isolated")==="isolated"),Se=x.extend({target:T(["local","remote","e2b","cloud"]),checkout:T(["shared","worktree","isolated"])}).refine(e=>e.target!=="remote"||e.checkout==="isolated").refine(e=>!e.exclusive||e.target!=="local"&&e.checkout==="isolated"),ue=c({id:i().min(1),assignmentEpoch:U,captureRevision:U,capturedAt:P({offset:!0}),committedAt:P({offset:!0})}),_e=c({state:T(["pending","running","completed","failed","skipped"]),exitCode:k().int().optional(),error:i().optional(),startedAt:i().optional(),finishedAt:i().optional(),output:i().optional(),outputTruncated:u().optional()}),be=c({nodeId:i().min(1).optional(),leaseId:i().min(1).optional(),nodeName:i().min(1).optional(),placement:Se.optional(),effectiveIsolation:T(["pending","isolated","shared","worktree","direct","cow"]).optional(),nodeState:T(["ready","offline","incompatible","removed"]).optional(),checkpoint:ue.optional(),placementError:c({code:i(),detail:i()}).optional(),cloudStart:c({step:i().min(1)}).passthrough().optional().catch(void 0),setup:_e.optional().catch(void 0),nodePath:i().optional()}),S=i().min(1),A=B().refine(e=>{const t=new URL(e);return t.protocol==="https:"&&!t.username&&!t.password}),V=A.refine(e=>D(e)),Y=k().int().nonnegative().max(Number.MAX_SAFE_INTEGER),O=i().max(1024).regex(/^[A-Za-z0-9_.-]+(?:\/[A-Za-z0-9_.-]+)+$/).refine(e=>e.split("/").every(t=>t!=="."&&t!=="..")),f=i().regex(/^[0-9a-fA-F]{40}$/),$=c({checkoutId:S,revision:S}).strict(),He=c({provider:N("gitlab"),instanceBaseUrl:V.optional()}).strict(),ye=$.extend({provider:N("gitlab"),instanceBaseUrl:V,expiresAfterMs:Y}).strict(),X=c({projectPath:O,name:i(),namespace:i(),webUrl:A,cloneUrl:A,defaultBranch:S.optional(),ownerAvatarUrl:B().pipe(A).optional().catch(void 0)}).strict(),ge=c({name:S,commitSha:f,protected:u().optional()}).strict(),pe=c({query:i().trim().refine(e=>new TextEncoder().encode(e).length<=256&&!/[\u0000-\u001f\u007f]/.test(e)).optional(),cursor:S.optional(),limit:k().int().positive().max(100).optional()}).strict(),Ke=z([c({projectPath:O}).strict(),c({url:A}).strict()]),Me=pe.extend({projectPath:O,cached:u().optional()}).strict(),Ae=$.extend({projectPath:O,branch:S,commitSha:f,mode:T(["direct","cached"])}).strict(),ve=Ae.omit({mode:!0}).strict(),We=c({projectPath:O,branch:S,commitSha:f,config:Q(i(),H()).nullable(),exists:u()}).strict().refine(e=>e.exists===(e.config!==null)),Fe=c({items:y(X),nextCursor:S.optional()}).strict(),Be=c({project:X,contextUrl:A.optional()}).strict(),xe=c({items:y(ge),nextCursor:S.optional(),defaultBranch:S.optional(),cached:u()}).strict(),Ve=c({projectPath:O,branch:S,commitSha:f,cached:u()}).strict(),q=c({status:N("unavailable"),reason:T(["disabled","not-connected","access-denied","rate-limited","unreachable","retired","not-found","invalid-target","empty-repository","branch-changed"]),retryAfterMs:Y.optional()}).strict();function Ye(e){return Z("status",[c({status:N("ready"),value:e}).strict(),q])}function $e(e,t){if(c({status:T(["ready","unavailable"])}).passthrough().parse(t).status==="unavailable")return q.parse(t);const o=c({status:N("ready"),value:H()}).strict().parse(t);return{status:"ready",value:e.parse(o.value)}}export{ue as A,we as B,Me as C,Ge as D,re as E,P as F,Ee as G,ce as H,Ne as I,w as J,$e as K,De as L,Te as M,ke as N,Le as O,Ce as P,g as S,be as a,Ue as b,Pe as c,xe as d,He as e,ye as f,pe as g,Be as h,Ke as i,X as j,Fe as k,ve as l,We as m,Ae as n,Ve as o,me as p,te as q,Ye as r,ee as s,ie as t,K as u,fe as v,he as w,D as x,b as y,Ie as z};
@@ -1,4 +1,4 @@
1
- import{g as ae}from"./DDfvytcD.js";import{s as ce}from"./Bywuf0q4.js";import{b as l,ay as C,a1 as le,aP as he,W as de,O as G,X as B,aV as F,a8 as ge,an as ue,au as pe,H as fe}from"./Bc6DihnT.js";var Y=(function(){var n=l(function(x,s,i,o){for(i=i||{},o=x.length;o--;i[x[o]]=s);return i},"o"),e=[1,4],a=[1,13],d=[1,12],t=[1,15],h=[1,16],u=[1,20],m=[1,19],E=[6,7,8],_=[1,26],D=[1,24],w=[1,25],g=[6,7,11],R=[1,6,13,15,16,19,22],q=[1,33],J=[1,34],A=[1,6,7,11,13,15,16,19,22],j={trace:l(function(){},"trace"),yy:{},symbols_:{error:2,start:3,mindMap:4,spaceLines:5,SPACELINE:6,NL:7,MINDMAP:8,document:9,stop:10,EOF:11,statement:12,SPACELIST:13,node:14,ICON:15,CLASS:16,nodeWithId:17,nodeWithoutId:18,NODE_DSTART:19,NODE_DESCR:20,NODE_DEND:21,NODE_ID:22,$accept:0,$end:1},terminals_:{2:"error",6:"SPACELINE",7:"NL",8:"MINDMAP",11:"EOF",13:"SPACELIST",15:"ICON",16:"CLASS",19:"NODE_DSTART",20:"NODE_DESCR",21:"NODE_DEND",22:"NODE_ID"},productions_:[0,[3,1],[3,2],[5,1],[5,2],[5,2],[4,2],[4,3],[10,1],[10,1],[10,1],[10,2],[10,2],[9,3],[9,2],[12,2],[12,2],[12,2],[12,1],[12,1],[12,1],[12,1],[12,1],[14,1],[14,1],[18,3],[17,1],[17,4]],performAction:l(function(s,i,o,c,f,r,$){var p=r.length-1;switch(f){case 6:case 7:return c;case 8:c.getLogger().trace("Stop NL ");break;case 9:c.getLogger().trace("Stop EOF ");break;case 11:c.getLogger().trace("Stop NL2 ");break;case 12:c.getLogger().trace("Stop EOF2 ");break;case 15:c.getLogger().info("Node: ",r[p].id),c.addNode(r[p-1].length,r[p].id,r[p].descr,r[p].type);break;case 16:c.getLogger().trace("Icon: ",r[p]),c.decorateNode({icon:r[p]});break;case 17:case 21:c.decorateNode({class:r[p]});break;case 18:c.getLogger().trace("SPACELIST");break;case 19:c.getLogger().trace("Node: ",r[p].id),c.addNode(0,r[p].id,r[p].descr,r[p].type);break;case 20:c.decorateNode({icon:r[p]});break;case 25:c.getLogger().trace("node found ..",r[p-2]),this.$={id:r[p-1],descr:r[p-1],type:c.getType(r[p-2],r[p])};break;case 26:this.$={id:r[p],descr:r[p],type:c.nodeType.DEFAULT};break;case 27:c.getLogger().trace("node found ..",r[p-3]),this.$={id:r[p-3],descr:r[p-1],type:c.getType(r[p-2],r[p])};break}},"anonymous"),table:[{3:1,4:2,5:3,6:[1,5],8:e},{1:[3]},{1:[2,1]},{4:6,6:[1,7],7:[1,8],8:e},{6:a,7:[1,10],9:9,12:11,13:d,14:14,15:t,16:h,17:17,18:18,19:u,22:m},n(E,[2,3]),{1:[2,2]},n(E,[2,4]),n(E,[2,5]),{1:[2,6],6:a,12:21,13:d,14:14,15:t,16:h,17:17,18:18,19:u,22:m},{6:a,9:22,12:11,13:d,14:14,15:t,16:h,17:17,18:18,19:u,22:m},{6:_,7:D,10:23,11:w},n(g,[2,22],{17:17,18:18,14:27,15:[1,28],16:[1,29],19:u,22:m}),n(g,[2,18]),n(g,[2,19]),n(g,[2,20]),n(g,[2,21]),n(g,[2,23]),n(g,[2,24]),n(g,[2,26],{19:[1,30]}),{20:[1,31]},{6:_,7:D,10:32,11:w},{1:[2,7],6:a,12:21,13:d,14:14,15:t,16:h,17:17,18:18,19:u,22:m},n(R,[2,14],{7:q,11:J}),n(A,[2,8]),n(A,[2,9]),n(A,[2,10]),n(g,[2,15]),n(g,[2,16]),n(g,[2,17]),{20:[1,35]},{21:[1,36]},n(R,[2,13],{7:q,11:J}),n(A,[2,11]),n(A,[2,12]),{21:[1,37]},n(g,[2,25]),n(g,[2,27])],defaultActions:{2:[2,1],6:[2,2]},parseError:l(function(s,i){if(i.recoverable)this.trace(s);else{var o=new Error(s);throw o.hash=i,o}},"parseError"),parse:l(function(s){var i=this,o=[0],c=[],f=[null],r=[],$=this.table,p="",M=0,K=0,ie=2,Q=1,se=r.slice.call(arguments,1),y=Object.create(this.lexer),v={yy:{}};for(var H in this.yy)Object.prototype.hasOwnProperty.call(this.yy,H)&&(v.yy[H]=this.yy[H]);y.setInput(s,v.yy),v.yy.lexer=y,v.yy.parser=this,typeof y.yylloc>"u"&&(y.yylloc={});var W=y.yylloc;r.push(W);var re=y.options&&y.options.ranges;typeof v.yy.parseError=="function"?this.parseError=v.yy.parseError:this.parseError=Object.getPrototypeOf(this).parseError;function oe(b){o.length=o.length-2*b,f.length=f.length-b,r.length=r.length-b}l(oe,"popStack");function Z(){var b;return b=c.pop()||y.lex()||Q,typeof b!="number"&&(b instanceof Array&&(c=b,b=c.pop()),b=i.symbols_[b]||b),b}l(Z,"lex");for(var k,T,S,X,O={},U,N,ee,V;;){if(T=o[o.length-1],this.defaultActions[T]?S=this.defaultActions[T]:((k===null||typeof k>"u")&&(k=Z()),S=$[T]&&$[T][k]),typeof S>"u"||!S.length||!S[0]){var z="";V=[];for(U in $[T])this.terminals_[U]&&U>ie&&V.push("'"+this.terminals_[U]+"'");y.showPosition?z="Parse error on line "+(M+1)+`:
1
+ import{g as ae}from"./D0I9E6A0.js";import{s as ce}from"./D492HRYt.js";import{b as l,ay as C,a1 as le,aP as he,W as de,O as G,X as B,aV as F,a8 as ge,an as ue,au as pe,H as fe}from"./DOKxXiSI.js";var Y=(function(){var n=l(function(x,s,i,o){for(i=i||{},o=x.length;o--;i[x[o]]=s);return i},"o"),e=[1,4],a=[1,13],d=[1,12],t=[1,15],h=[1,16],u=[1,20],m=[1,19],E=[6,7,8],_=[1,26],D=[1,24],w=[1,25],g=[6,7,11],R=[1,6,13,15,16,19,22],q=[1,33],J=[1,34],A=[1,6,7,11,13,15,16,19,22],j={trace:l(function(){},"trace"),yy:{},symbols_:{error:2,start:3,mindMap:4,spaceLines:5,SPACELINE:6,NL:7,MINDMAP:8,document:9,stop:10,EOF:11,statement:12,SPACELIST:13,node:14,ICON:15,CLASS:16,nodeWithId:17,nodeWithoutId:18,NODE_DSTART:19,NODE_DESCR:20,NODE_DEND:21,NODE_ID:22,$accept:0,$end:1},terminals_:{2:"error",6:"SPACELINE",7:"NL",8:"MINDMAP",11:"EOF",13:"SPACELIST",15:"ICON",16:"CLASS",19:"NODE_DSTART",20:"NODE_DESCR",21:"NODE_DEND",22:"NODE_ID"},productions_:[0,[3,1],[3,2],[5,1],[5,2],[5,2],[4,2],[4,3],[10,1],[10,1],[10,1],[10,2],[10,2],[9,3],[9,2],[12,2],[12,2],[12,2],[12,1],[12,1],[12,1],[12,1],[12,1],[14,1],[14,1],[18,3],[17,1],[17,4]],performAction:l(function(s,i,o,c,f,r,$){var p=r.length-1;switch(f){case 6:case 7:return c;case 8:c.getLogger().trace("Stop NL ");break;case 9:c.getLogger().trace("Stop EOF ");break;case 11:c.getLogger().trace("Stop NL2 ");break;case 12:c.getLogger().trace("Stop EOF2 ");break;case 15:c.getLogger().info("Node: ",r[p].id),c.addNode(r[p-1].length,r[p].id,r[p].descr,r[p].type);break;case 16:c.getLogger().trace("Icon: ",r[p]),c.decorateNode({icon:r[p]});break;case 17:case 21:c.decorateNode({class:r[p]});break;case 18:c.getLogger().trace("SPACELIST");break;case 19:c.getLogger().trace("Node: ",r[p].id),c.addNode(0,r[p].id,r[p].descr,r[p].type);break;case 20:c.decorateNode({icon:r[p]});break;case 25:c.getLogger().trace("node found ..",r[p-2]),this.$={id:r[p-1],descr:r[p-1],type:c.getType(r[p-2],r[p])};break;case 26:this.$={id:r[p],descr:r[p],type:c.nodeType.DEFAULT};break;case 27:c.getLogger().trace("node found ..",r[p-3]),this.$={id:r[p-3],descr:r[p-1],type:c.getType(r[p-2],r[p])};break}},"anonymous"),table:[{3:1,4:2,5:3,6:[1,5],8:e},{1:[3]},{1:[2,1]},{4:6,6:[1,7],7:[1,8],8:e},{6:a,7:[1,10],9:9,12:11,13:d,14:14,15:t,16:h,17:17,18:18,19:u,22:m},n(E,[2,3]),{1:[2,2]},n(E,[2,4]),n(E,[2,5]),{1:[2,6],6:a,12:21,13:d,14:14,15:t,16:h,17:17,18:18,19:u,22:m},{6:a,9:22,12:11,13:d,14:14,15:t,16:h,17:17,18:18,19:u,22:m},{6:_,7:D,10:23,11:w},n(g,[2,22],{17:17,18:18,14:27,15:[1,28],16:[1,29],19:u,22:m}),n(g,[2,18]),n(g,[2,19]),n(g,[2,20]),n(g,[2,21]),n(g,[2,23]),n(g,[2,24]),n(g,[2,26],{19:[1,30]}),{20:[1,31]},{6:_,7:D,10:32,11:w},{1:[2,7],6:a,12:21,13:d,14:14,15:t,16:h,17:17,18:18,19:u,22:m},n(R,[2,14],{7:q,11:J}),n(A,[2,8]),n(A,[2,9]),n(A,[2,10]),n(g,[2,15]),n(g,[2,16]),n(g,[2,17]),{20:[1,35]},{21:[1,36]},n(R,[2,13],{7:q,11:J}),n(A,[2,11]),n(A,[2,12]),{21:[1,37]},n(g,[2,25]),n(g,[2,27])],defaultActions:{2:[2,1],6:[2,2]},parseError:l(function(s,i){if(i.recoverable)this.trace(s);else{var o=new Error(s);throw o.hash=i,o}},"parseError"),parse:l(function(s){var i=this,o=[0],c=[],f=[null],r=[],$=this.table,p="",M=0,K=0,ie=2,Q=1,se=r.slice.call(arguments,1),y=Object.create(this.lexer),v={yy:{}};for(var H in this.yy)Object.prototype.hasOwnProperty.call(this.yy,H)&&(v.yy[H]=this.yy[H]);y.setInput(s,v.yy),v.yy.lexer=y,v.yy.parser=this,typeof y.yylloc>"u"&&(y.yylloc={});var W=y.yylloc;r.push(W);var re=y.options&&y.options.ranges;typeof v.yy.parseError=="function"?this.parseError=v.yy.parseError:this.parseError=Object.getPrototypeOf(this).parseError;function oe(b){o.length=o.length-2*b,f.length=f.length-b,r.length=r.length-b}l(oe,"popStack");function Z(){var b;return b=c.pop()||y.lex()||Q,typeof b!="number"&&(b instanceof Array&&(c=b,b=c.pop()),b=i.symbols_[b]||b),b}l(Z,"lex");for(var k,T,S,X,O={},U,N,ee,V;;){if(T=o[o.length-1],this.defaultActions[T]?S=this.defaultActions[T]:((k===null||typeof k>"u")&&(k=Z()),S=$[T]&&$[T][k]),typeof S>"u"||!S.length||!S[0]){var z="";V=[];for(U in $[T])this.terminals_[U]&&U>ie&&V.push("'"+this.terminals_[U]+"'");y.showPosition?z="Parse error on line "+(M+1)+`:
2
2
  `+y.showPosition()+`
3
3
  Expecting `+V.join(", ")+", got '"+(this.terminals_[k]||k)+"'":z="Parse error on line "+(M+1)+": Unexpected "+(k==Q?"end of input":"'"+(this.terminals_[k]||k)+"'"),this.parseError(z,{text:y.match,token:this.terminals_[k]||k,line:y.yylineno,loc:W,expected:V})}if(S[0]instanceof Array&&S.length>1)throw new Error("Parse Error: multiple actions possible at state: "+T+", token: "+k);switch(S[0]){case 1:o.push(k),f.push(y.yytext),r.push(y.yylloc),o.push(S[1]),k=null,K=y.yyleng,p=y.yytext,M=y.yylineno,W=y.yylloc;break;case 2:if(N=this.productions_[S[1]][1],O.$=f[f.length-N],O._$={first_line:r[r.length-(N||1)].first_line,last_line:r[r.length-1].last_line,first_column:r[r.length-(N||1)].first_column,last_column:r[r.length-1].last_column},re&&(O._$.range=[r[r.length-(N||1)].range[0],r[r.length-1].range[1]]),X=this.performAction.apply(O,[p,K,M,v.yy,S[1],f,r].concat(se)),typeof X<"u")return X;N&&(o=o.slice(0,-1*N*2),f=f.slice(0,-1*N),r=r.slice(0,-1*N)),o.push(this.productions_[S[1]][0]),f.push(O.$),r.push(O._$),ee=$[o[o.length-2]][o[o.length-1]],o.push(ee);break;case 3:return!0}}return!0},"parse")},ne=(function(){var x={EOF:1,parseError:l(function(i,o){if(this.yy.parser)this.yy.parser.parseError(i,o);else throw new Error(i)},"parseError"),setInput:l(function(s,i){return this.yy=i||this.yy||{},this._input=s,this._more=this._backtrack=this.done=!1,this.yylineno=this.yyleng=0,this.yytext=this.matched=this.match="",this.conditionStack=["INITIAL"],this.yylloc={first_line:1,first_column:0,last_line:1,last_column:0},this.options.ranges&&(this.yylloc.range=[0,0]),this.offset=0,this},"setInput"),input:l(function(){var s=this._input[0];this.yytext+=s,this.yyleng++,this.offset++,this.match+=s,this.matched+=s;var i=s.match(/(?:\r\n?|\n).*/g);return i?(this.yylineno++,this.yylloc.last_line++):this.yylloc.last_column++,this.options.ranges&&this.yylloc.range[1]++,this._input=this._input.slice(1),s},"input"),unput:l(function(s){var i=s.length,o=s.split(/(?:\r\n?|\n)/g);this._input=s+this._input,this.yytext=this.yytext.substr(0,this.yytext.length-i),this.offset-=i;var c=this.match.split(/(?:\r\n?|\n)/g);this.match=this.match.substr(0,this.match.length-1),this.matched=this.matched.substr(0,this.matched.length-1),o.length-1&&(this.yylineno-=o.length-1);var f=this.yylloc.range;return this.yylloc={first_line:this.yylloc.first_line,last_line:this.yylineno+1,first_column:this.yylloc.first_column,last_column:o?(o.length===c.length?this.yylloc.first_column:0)+c[c.length-o.length].length-o[0].length:this.yylloc.first_column-i},this.options.ranges&&(this.yylloc.range=[f[0],f[0]+this.yyleng-i]),this.yyleng=this.yytext.length,this},"unput"),more:l(function(){return this._more=!0,this},"more"),reject:l(function(){if(this.options.backtrack_lexer)this._backtrack=!0;else return this.parseError("Lexical error on line "+(this.yylineno+1)+`. You can only invoke reject() in the lexer when the lexer is of the backtracking persuasion (options.backtrack_lexer = true).
4
4
  `+this.showPosition(),{text:"",token:null,line:this.yylineno});return this},"reject"),less:l(function(s){this.unput(this.match.slice(s))},"less"),pastInput:l(function(){var s=this.matched.substr(0,this.matched.length-this.match.length);return(s.length>20?"...":"")+s.substr(-20).replace(/\n/g,"")},"pastInput"),upcomingInput:l(function(){var s=this.match;return s.length<20&&(s+=this._input.substr(0,20-s.length)),(s.substr(0,20)+(s.length>20?"...":"")).replace(/\n/g,"")},"upcomingInput"),showPosition:l(function(){var s=this.pastInput(),i=new Array(s.length+1).join("-");return s+this.upcomingInput()+`
@@ -1,3 +1,3 @@
1
- import{fE as x,Iz as o,nx as U,l$ as F,lS as G,sX as K}from"./A0r9TbR7.js";import{g as q,G as j,dS as V,cG as N,dr as w,dC as E,dN as M,cB as $,aB as Y}from"./B0biUQQF.js";import{l as z,R as X,E as J}from"./BMm9sGZ6.js";function Q(e){return!e.retiredAt&&!e.pendingDeleteAt&&e.status!=="deleted"}function k(e){const t=new Date(e.lastActivity??e.updatedAt??e.createdAt).getTime()||0,s=e.messages.at(-1)?.timestamp,r=s&&new Date(s).getTime()||0;return Math.max(t,r)}function we(e){const t=e.filter(Q).map(s=>({agent:s,activity:k(s),created:new Date(s.createdAt).getTime()||0})).sort((s,r)=>r.activity-s.activity||r.created-s.created||String(s.agent.id).localeCompare(String(r.agent.id)));return t.find(({agent:s})=>x(s)==="topLevel")?.agent??t[0]?.agent??null}const p="__chief__",L="New chat";function Z(e){const t=e?.trim();return!t||t===L||t==="New chat with Assistant"||t==="New chat with Intent"||t==="Chief of Staff"||t.startsWith("New thread ")}function ee(e){const t=e.name?.trim();if(e.nameExplicitlySet&&t)return t;const r=e.messages.find(l=>l.role==="user")??e.messages[0],c=r?q(r).trim():"";return!t||Z(t)?c||L:c||t}const te="chief-of-staff",se=6,T="## Assistant Runtime Identity\n\nYou are Intent's built-in Assistant. Operate at the app level with `ws.app.*` tools: manage workspaces, settings, specialists, navigation, and cross-workspace agents. You are not a repository coding agent. Treat generic coding-agent, workspace, spec, task, and delegation instructions as subordinate to this role.\n\nWhen the user requests repository work, create or open the appropriate workspace and hand the work to the appropriate specialist. Once you have enough repository or PR information, act through the app-level proposal flow instead of merely promising to verify, prepare, or hand off the work.\n\nShow workspaces, notes, files, agent conversations and repository links beside your conversation when they help the user. Share ordinary Markdown links to notes (intent://local/note/<noteId> or intent://local/<workspaceId>/note/<noteId>) workspace links (intent://local/workspace/<workspaceId>), workspace file and agent links, and HTTPS repository URLs; clicking opens a closable content panel while keeping chat visible. To show content automatically, call `ws.app.ui.navigate` with the same link or /workspace/<workspaceId>. Calling `ws.app.workspaces.open` also shows that workspace beside chat unless the user requests a new window. Each conversation has its own panel history. Workspaces show the same detail and agent chat as Home’s Workspaces tab. Earlier content remains available in that conversation’s panel header picker. Creating a note alone does not open it: explicitly navigate when you want to show it.\n\nWhen the user asks to transfer a project between devices, find the source workspace with `ws.app.workspaces.list` and call `ws.app.workspaces.transfer(id, { destination })`. Pass the user's destination name as the hint, or omit it so they can choose a saved device in the inline card. The source is the device serving this assistant conversation. The tool only proposes the transfer: wait for approval or cancellation in the card, and report completion only after the proposal is applied.";function be(e){const t=e?.trim();return t?`${T}
1
+ import{fE as x,Iz as o,nx as U,l$ as F,lS as G,sX as K}from"./BfbZn9QX.js";import{g as q,G as j,dS as V,cG as N,dr as w,dC as E,dN as M,cB as $,aB as Y}from"./asQ_ruFQ.js";import{l as z,R as X,E as J}from"./C3NeTp2u.js";function Q(e){return!e.retiredAt&&!e.pendingDeleteAt&&e.status!=="deleted"}function k(e){const t=new Date(e.lastActivity??e.updatedAt??e.createdAt).getTime()||0,s=e.messages.at(-1)?.timestamp,r=s&&new Date(s).getTime()||0;return Math.max(t,r)}function we(e){const t=e.filter(Q).map(s=>({agent:s,activity:k(s),created:new Date(s.createdAt).getTime()||0})).sort((s,r)=>r.activity-s.activity||r.created-s.created||String(s.agent.id).localeCompare(String(r.agent.id)));return t.find(({agent:s})=>x(s)==="topLevel")?.agent??t[0]?.agent??null}const p="__chief__",L="New chat";function Z(e){const t=e?.trim();return!t||t===L||t==="New chat with Assistant"||t==="New chat with Intent"||t==="Chief of Staff"||t.startsWith("New thread ")}function ee(e){const t=e.name?.trim();if(e.nameExplicitlySet&&t)return t;const r=e.messages.find(l=>l.role==="user")??e.messages[0],c=r?q(r).trim():"";return!t||Z(t)?c||L:c||t}const te="chief-of-staff",se=6,T="## Assistant Runtime Identity\n\nYou are Intent's built-in Assistant. Operate at the app level with `ws.app.*` tools: manage workspaces, settings, specialists, navigation, and cross-workspace agents. You are not a repository coding agent. Treat generic coding-agent, workspace, spec, task, and delegation instructions as subordinate to this role.\n\nWhen the user requests repository work, create or open the appropriate workspace and hand the work to the appropriate specialist. Once you have enough repository or PR information, act through the app-level proposal flow instead of merely promising to verify, prepare, or hand off the work.\n\nShow workspaces, notes, files, agent conversations and repository links beside your conversation when they help the user. Share ordinary Markdown links to notes (intent://local/note/<noteId> or intent://local/<workspaceId>/note/<noteId>) workspace links (intent://local/workspace/<workspaceId>), workspace file and agent links, and HTTPS repository URLs; clicking opens a closable content panel while keeping chat visible. To show content automatically, call `ws.app.ui.navigate` with the same link or /workspace/<workspaceId>. Calling `ws.app.workspaces.open` also shows that workspace beside chat unless the user requests a new window. Each conversation has its own panel history. Workspaces show the same detail and agent chat as Home’s Workspaces tab. Earlier content remains available in that conversation’s panel header picker. Creating a note alone does not open it: explicitly navigate when you want to show it.\n\nWhen the user asks to transfer a project between devices, find the source workspace with `ws.app.workspaces.list` and call `ws.app.workspaces.transfer(id, { destination })`. Pass the user's destination name as the hint, or omit it so they can choose a saved device in the inline card. The source is the device serving this assistant conversation. The tool only proposes the transfer: wait for approval or cancellation in the card, and report completion only after the proposal is applied.";function be(e){const t=e?.trim();return t?`${T}
2
2
 
3
3
  ${t}`:T}const re=o.createSelector((e,t)=>{const s=e.backgroundHooks?.byWorkspaceId?.[t];return s?U(s.hooks):[]}),oe=o.createSelector((e,t)=>e.backgroundHooks?.byWorkspaceId?.[t]?.snapshotStatus??"loading"),O=o.createSelector((e,t)=>e.scriptMonitor?.byWorkspaceId[t]??F),Ae=o.createSelector((e,t,s)=>{const r=O.select(e,t);return r.status==="unsupported"?[]:r.monitors.filter(c=>c.agentId===s)}),u=o.createSelector((e,t,s)=>{const r=K(t,s);return e.agentSubscriptionUI.entries[r]??G}),ne=o.createSelector((e,t,s)=>u.select(e,t,s).subscriptions),ae=o.createSelector((e,t,s)=>u.select(e,t,s).eventSubscriptions??[]),ce=o.createSelector((e,t,s)=>u.select(e,t,s).delegationGroups),ve=o.createSelector((e,t,s)=>u.select(e,t,s).agentStatuses),ye=o.createSelector((e,t,s)=>u.select(e,t,s).waitingState),Ce=o.createSelector((e,t,s)=>u.select(e,t,s).wokenUpInfo);function ie(e){return[...new Set(e.filter(Boolean))]}const We=o.createSelector((e,t,s)=>{const r=u.select(e,t,s),c=[],l=new Set,i=n=>{for(const a of ie(n))l.has(a)||(l.add(a),c.push(a))},h=[...r.subscriptions].sort((n,a)=>n.createdAt.localeCompare(a.createdAt)||n.id.localeCompare(a.id));for(const n of h)n.delegationGroup?.awaitMode!=="all"&&i(n.actorIds);const g=new Map;for(const n of r.delegationGroups)n.awaitMode==="all"&&g.set(n.groupId,n);for(const n of g.values())i(n.expectedAgentIds);for(const n of h){const a=n.delegationGroup;a?.awaitMode==="all"&&!g.has(a.groupId)&&i(a.expectedAgentIds)}const d=new Set;for(const n of r.delegationGroups){for(const a of n.completedAgentIds)d.add(a);for(const a of n.deletedAgentIds)d.add(a);for(const[a,f]of Object.entries(n.agentStatuses))f==="completed"&&d.add(a)}for(const[n,a]of Object.entries(r.agentStatuses))a==="completed"&&d.add(n);const A=e.agentSessions?.byAgentId??{},v=new Set([...d].filter(n=>{const a=A[n];return!a||!j(V(a))})),y=new Map(c.map((n,a)=>[n,a])),C=n=>{const a=A[n];if(!a)return 2;if(a.attentionRequestKind==="blocker")return 0;if(a.attentionRequestKind==="discussion")return 1;if(v.has(n))return 4;const f=String(a.status).toLowerCase();return f==="responding"||f==="active"||f==="processing"?2:3},W=c.filter(n=>!v.has(n)).sort((n,a)=>C(n)-C(a)||(y.get(n)??0)-(y.get(a)??0));return{visible:r.snapshotStatus==="failed"||r.waitingState==="completed"||c.length>0||r.wokenUpInfo!==null,count:W.length,participantAgentIds:W}}),Te=o.createSelector((e,t,s)=>u.select(e,t,s).snapshotStatus),Ne=o.createSelector((e,t)=>{const s=`${t}:`,r=[];for(const c of Object.keys(e.agentSubscriptionUI.entries))c.startsWith(s)&&r.push(c.slice(s.length));return r});o.createSelector((e,t,s)=>{const r=ce.select(e,t,s);let c=0,l=0;for(const i of r)c+=i.expectedAgentIds.length,l+=i.completedAgentIds.length+i.deletedAgentIds.length;return{total:c,completed:l}});const Ee=o.createSelector(e=>{const t=z.select(e);if(!t||!X.select(e))return[];const s=new Set;for(const r of J.select(e,t)){const c=r.panes.find(l=>l.id===r.activePaneId);c?.type==="agent"&&c.agentId&&s.add(c.agentId)}return[...s].map(r=>({wsId:t,agentId:r}))}),P="pinned",le=64;function I(e){return e.trim().toLocaleLowerCase()}function R(e){return e===P}function Me(e,t){const s=e.trim();if(s.length===0)return{ok:!1,error:"empty"};if([...s].length>le)return{ok:!1,error:"tooLong"};const r=I(s);return r===P?{ok:!1,error:"reserved"}:t.some(c=>I(c)===r)?{ok:!1,error:"duplicate"}:{ok:!0,label:s}}function de(e){const t=new Map;for(const s of e){if(typeof s!="string"||R(s))continue;const r=s.trim();if(r.length===0)continue;const c=I(r);t.has(c)||t.set(c,s)}return[...t.values()].sort((s,r)=>s.localeCompare(r,void 0,{sensitivity:"base"}))}function _(e){const s=e.workspaceAgents?.byWorkspaceId?.[p]?.agentIds,r=s&&s.length>0?new Set(s.map(i=>String(i))):null,c=e.agentSessions?.agentIdsByWorkspace?.[p]??[],l=c.length>0?c.map(i=>e.agentSessions?.byAgentId?.[i]).filter(i=>!!i):Object.values(e.agentSessions?.byAgentId??{}).filter(i=>i.workspaceId===p);return r?l.filter(i=>r.has(String(i.id))):l}function D(e){return e.metadata?.specialist===te&&e.metadata?.chiefPromptVersion===se}function B(e){return Math.max(e.messages.length,e.messageCount??0)}function S(e){return{agentId:e.id,title:ee(e),isActive:e.isStreaming===!0||e.isProcessing===!0||e.isResponding===!0,messageCount:B(e),pinned:e.pinned===!0,retired:!!e.retiredAt}}function b(e){return _(e).filter(t=>!t.retiredAt)}function m(e,t){return k(t)-k(e)}const Le=o.createSelector(e=>e.sidebarNav.panelItem),Oe=o.createSelector(e=>e.sidebarNav.onboardingActive),Pe=o.createSelector(e=>e.sidebarNav.showCreateModal),Re=o.createSelector(e=>e.sidebarNav.createModalUsesHomeRepository),_e=o.createSelector(e=>e.sidebarNav.createModalPrefillRequest),H=o.createSelector(e=>N.select(e)?.capabilities.workspaceLabels===1),De=o.createSelector((e,t)=>w.select(e,t)?.label??null),Be=o.createSelector(e=>de(E.select(e).map(t=>t.label))),pe=["id","label"],He=o.createSelector((e,t)=>H.select(e)&&M.select(e,t,pe)!==null),ue=o.createSelector(e=>N.select(e)?.capabilities.workspaceAutoArchiveOptOut===1),ge=o.createSelector(e=>(e.sidebarNav.autoArchiveIdleAfterDays??0)>0),xe=o.createSelector((e,t)=>w.select(e,t)?.autoArchiveDisabled===!0),fe=["id","autoArchiveDisabled"],Ue=o.createSelector((e,t)=>{if(!ue.select(e)||!ge.select(e))return!1;const s=w.select(e,t);return!s||s.isRemote===!0||s.environmentConfig?.type==="remote"?!1:M.select(e,t,fe)!==null}),Fe=o.createSelector(e=>e.sidebarNav.pinnedWorkspaceIds),Ge=o.createSelector(e=>H.select(e)?E.select(e).filter(t=>R(t.label)).map(t=>t.id):e.sidebarNav.pinnedWorkspaceIds),Ke=o.createSelector((e,t)=>e.sidebarNav.multiSelectSelectedTabIdsByWorkspaceId[t]??["overview"]),qe=o.createSelector((e,t)=>e.sidebarNav.noteOrderByWorkspaceId[t]??[]),je=o.createSelector((e,t)=>e.sidebarNav.collapsedNoteIdsByWorkspaceId[t]??[]),Ve=o.createSelector((e,t)=>e.sidebarNav.expandedNoteIdsByWorkspaceId?.[t]??[]),$e=o.createSelector(e=>e.sidebarNav.chiefActiveAgentId),Ye=o.createSelector((e,t)=>{const s=e.agentSessions.byAgentId[t];if(s?.workspaceId!==p)return{hooks:0,monitors:0,subscriptions:0};const r=oe.select(e,p)==="ready"?re.select(e,p).filter(d=>d.agentId===t&&(d.state==="scheduled"||d.state==="running")).length:s.waitingOnHooks?.length??0,c=$.select(e,p)==="ready"?Y.select(e,p,t).filter(d=>d.state==="active").length:s.waitingOnPrMonitors?.length??0,l=O.select(e,p),i=l.status==="unsupported"?0:l.status==="ready"?l.monitors.filter(d=>d.agentId===t&&d.state==="active").length:s.waitingOnScriptMonitors?.length??0,h=s.isWaitingForOtherAgents===!1?0:s.waitingForAgentIds?.length??(ne.select(e,p,t).length||(s.isWaitingForOtherAgents?1:0)),g=ae.select(e,p,t).filter(d=>d.subscriberAgentId===t).length;return{hooks:r,monitors:c+i,subscriptions:h+g}}),ze=o.createSelector(e=>e.sidebarNav.statsOverlayOpen),he=o.createSelector(e=>b(e).sort((t,s)=>+(s.pinned===!0)-+(t.pinned===!0)||m(t,s)).map(S)),Se=o.createSelector(e=>_(e).filter(t=>!!t.retiredAt).sort(m).map(S)),Xe=o.createSelector(e=>[...he.select(e),...Se.select(e)]),Je=o.createSelector(e=>{const t=b(e).filter(D).sort(m)[0];return t?S(t):null}),Qe=o.createSelector(e=>{const t=b(e).filter(s=>B(s)===0&&!s.lastMessageId&&D(s)).sort(m)[0];return t?S(t):null});export{Oe as A,Le as B,se as C,L as D,Ge as E,Se as F,Qe as G,O as H,Pe as I,ze as J,Te as K,Ne as L,ye as M,Ce as N,xe as O,P,je as Q,Ve as R,De as S,Be as T,qe as U,Me as V,le as W,te as a,p as b,be as c,Q as d,We as e,ve as f,ne as g,Xe as h,R as i,Ye as j,re as k,oe as l,Ue as m,He as n,$e as o,he as p,_e as q,we as r,Ae as s,Re as t,Je as u,ce as v,Ee as w,H as x,Fe as y,Ke as z};
@@ -1,4 +1,4 @@
1
- import{R as Ge,l as x,g as w,U as Je,M as R}from"./BgX4ALX_.js";var T;(function(e){function n(i){return typeof i=="string"}e.is=n})(T||(T={}));var O;(function(e){function n(i){return typeof i=="string"}e.is=n})(O||(O={}));var K;(function(e){e.MIN_VALUE=-2147483648,e.MAX_VALUE=2147483647;function n(i){return typeof i=="number"&&e.MIN_VALUE<=i&&i<=e.MAX_VALUE}e.is=n})(K||(K={}));var j;(function(e){e.MIN_VALUE=0,e.MAX_VALUE=2147483647;function n(i){return typeof i=="number"&&e.MIN_VALUE<=i&&i<=e.MAX_VALUE}e.is=n})(j||(j={}));var _;(function(e){function n(r,t){return r===Number.MAX_VALUE&&(r=j.MAX_VALUE),t===Number.MAX_VALUE&&(t=j.MAX_VALUE),{line:r,character:t}}e.create=n;function i(r){let t=r;return o.objectLiteral(t)&&o.uinteger(t.line)&&o.uinteger(t.character)}e.is=i})(_||(_={}));var h;(function(e){function n(r,t,a,u){if(o.uinteger(r)&&o.uinteger(t)&&o.uinteger(a)&&o.uinteger(u))return{start:_.create(r,t),end:_.create(a,u)};if(_.is(r)&&_.is(t))return{start:r,end:t};throw new Error(`Range#create called with invalid arguments[${r}, ${t}, ${a}, ${u}]`)}e.create=n;function i(r){let t=r;return o.objectLiteral(t)&&_.is(t.start)&&_.is(t.end)}e.is=i})(h||(h={}));var N;(function(e){function n(r,t){return{uri:r,range:t}}e.create=n;function i(r){let t=r;return o.objectLiteral(t)&&h.is(t.range)&&(o.string(t.uri)||o.undefined(t.uri))}e.is=i})(N||(N={}));var ee;(function(e){function n(r,t,a,u){return{targetUri:r,targetRange:t,targetSelectionRange:a,originSelectionRange:u}}e.create=n;function i(r){let t=r;return o.objectLiteral(t)&&h.is(t.targetRange)&&o.string(t.targetUri)&&h.is(t.targetSelectionRange)&&(h.is(t.originSelectionRange)||o.undefined(t.originSelectionRange))}e.is=i})(ee||(ee={}));var S;(function(e){function n(r,t,a,u){return{red:r,green:t,blue:a,alpha:u}}e.create=n;function i(r){const t=r;return o.objectLiteral(t)&&o.numberRange(t.red,0,1)&&o.numberRange(t.green,0,1)&&o.numberRange(t.blue,0,1)&&o.numberRange(t.alpha,0,1)}e.is=i})(S||(S={}));var te;(function(e){function n(r,t){return{range:r,color:t}}e.create=n;function i(r){const t=r;return o.objectLiteral(t)&&h.is(t.range)&&S.is(t.color)}e.is=i})(te||(te={}));var ne;(function(e){function n(r,t,a){return{label:r,textEdit:t,additionalTextEdits:a}}e.create=n;function i(r){const t=r;return o.objectLiteral(t)&&o.string(t.label)&&(o.undefined(t.textEdit)||L.is(t))&&(o.undefined(t.additionalTextEdits)||o.typedArray(t.additionalTextEdits,L.is))}e.is=i})(ne||(ne={}));var M;(function(e){e.Comment="comment",e.Imports="imports",e.Region="region"})(M||(M={}));var re;(function(e){function n(r,t,a,u,s,f){const l={startLine:r,endLine:t};return o.defined(a)&&(l.startCharacter=a),o.defined(u)&&(l.endCharacter=u),o.defined(s)&&(l.kind=s),o.defined(f)&&(l.collapsedText=f),l}e.create=n;function i(r){const t=r;return o.objectLiteral(t)&&o.uinteger(t.startLine)&&o.uinteger(t.startLine)&&(o.undefined(t.startCharacter)||o.uinteger(t.startCharacter))&&(o.undefined(t.endCharacter)||o.uinteger(t.endCharacter))&&(o.undefined(t.kind)||o.string(t.kind))}e.is=i})(re||(re={}));var H;(function(e){function n(r,t){return{location:r,message:t}}e.create=n;function i(r){let t=r;return o.defined(t)&&N.is(t.location)&&o.string(t.message)}e.is=i})(H||(H={}));var A;(function(e){e.Error=1,e.Warning=2,e.Information=3,e.Hint=4})(A||(A={}));var ie;(function(e){e.Unnecessary=1,e.Deprecated=2})(ie||(ie={}));var ae;(function(e){function n(i){const r=i;return o.objectLiteral(r)&&o.string(r.href)}e.is=n})(ae||(ae={}));var P;(function(e){function n(r,t,a,u,s,f){let l={range:r,message:t};return o.defined(a)&&(l.severity=a),o.defined(u)&&(l.code=u),o.defined(s)&&(l.source=s),o.defined(f)&&(l.relatedInformation=f),l}e.create=n;function i(r){var t;let a=r;return o.defined(a)&&h.is(a.range)&&o.string(a.message)&&(o.number(a.severity)||o.undefined(a.severity))&&(o.integer(a.code)||o.string(a.code)||o.undefined(a.code))&&(o.undefined(a.codeDescription)||o.string((t=a.codeDescription)===null||t===void 0?void 0:t.href))&&(o.string(a.source)||o.undefined(a.source))&&(o.undefined(a.relatedInformation)||o.typedArray(a.relatedInformation,H.is))}e.is=i})(P||(P={}));var E;(function(e){function n(r,t,...a){let u={title:r,command:t};return o.defined(a)&&a.length>0&&(u.arguments=a),u}e.create=n;function i(r){let t=r;return o.defined(t)&&o.string(t.title)&&o.string(t.command)}e.is=i})(E||(E={}));var L;(function(e){function n(a,u){return{range:a,newText:u}}e.replace=n;function i(a,u){return{range:{start:a,end:a},newText:u}}e.insert=i;function r(a){return{range:a,newText:""}}e.del=r;function t(a){const u=a;return o.objectLiteral(u)&&o.string(u.newText)&&h.is(u.range)}e.is=t})(L||(L={}));var W;(function(e){function n(r,t,a){const u={label:r};return t!==void 0&&(u.needsConfirmation=t),a!==void 0&&(u.description=a),u}e.create=n;function i(r){const t=r;return o.objectLiteral(t)&&o.string(t.label)&&(o.boolean(t.needsConfirmation)||t.needsConfirmation===void 0)&&(o.string(t.description)||t.description===void 0)}e.is=i})(W||(W={}));var I;(function(e){function n(i){const r=i;return o.string(r)}e.is=n})(I||(I={}));var oe;(function(e){function n(a,u,s){return{range:a,newText:u,annotationId:s}}e.replace=n;function i(a,u,s){return{range:{start:a,end:a},newText:u,annotationId:s}}e.insert=i;function r(a,u){return{range:a,newText:"",annotationId:u}}e.del=r;function t(a){const u=a;return L.is(u)&&(W.is(u.annotationId)||I.is(u.annotationId))}e.is=t})(oe||(oe={}));var X;(function(e){function n(r,t){return{textDocument:r,edits:t}}e.create=n;function i(r){let t=r;return o.defined(t)&&Q.is(t.textDocument)&&Array.isArray(t.edits)}e.is=i})(X||(X={}));var $;(function(e){function n(r,t,a){let u={kind:"create",uri:r};return t!==void 0&&(t.overwrite!==void 0||t.ignoreIfExists!==void 0)&&(u.options=t),a!==void 0&&(u.annotationId=a),u}e.create=n;function i(r){let t=r;return t&&t.kind==="create"&&o.string(t.uri)&&(t.options===void 0||(t.options.overwrite===void 0||o.boolean(t.options.overwrite))&&(t.options.ignoreIfExists===void 0||o.boolean(t.options.ignoreIfExists)))&&(t.annotationId===void 0||I.is(t.annotationId))}e.is=i})($||($={}));var z;(function(e){function n(r,t,a,u){let s={kind:"rename",oldUri:r,newUri:t};return a!==void 0&&(a.overwrite!==void 0||a.ignoreIfExists!==void 0)&&(s.options=a),u!==void 0&&(s.annotationId=u),s}e.create=n;function i(r){let t=r;return t&&t.kind==="rename"&&o.string(t.oldUri)&&o.string(t.newUri)&&(t.options===void 0||(t.options.overwrite===void 0||o.boolean(t.options.overwrite))&&(t.options.ignoreIfExists===void 0||o.boolean(t.options.ignoreIfExists)))&&(t.annotationId===void 0||I.is(t.annotationId))}e.is=i})(z||(z={}));var B;(function(e){function n(r,t,a){let u={kind:"delete",uri:r};return t!==void 0&&(t.recursive!==void 0||t.ignoreIfNotExists!==void 0)&&(u.options=t),a!==void 0&&(u.annotationId=a),u}e.create=n;function i(r){let t=r;return t&&t.kind==="delete"&&o.string(t.uri)&&(t.options===void 0||(t.options.recursive===void 0||o.boolean(t.options.recursive))&&(t.options.ignoreIfNotExists===void 0||o.boolean(t.options.ignoreIfNotExists)))&&(t.annotationId===void 0||I.is(t.annotationId))}e.is=i})(B||(B={}));var q;(function(e){function n(i){let r=i;return r&&(r.changes!==void 0||r.documentChanges!==void 0)&&(r.documentChanges===void 0||r.documentChanges.every(t=>o.string(t.kind)?$.is(t)||z.is(t)||B.is(t):X.is(t)))}e.is=n})(q||(q={}));var ue;(function(e){function n(r){return{uri:r}}e.create=n;function i(r){let t=r;return o.defined(t)&&o.string(t.uri)}e.is=i})(ue||(ue={}));var se;(function(e){function n(r,t){return{uri:r,version:t}}e.create=n;function i(r){let t=r;return o.defined(t)&&o.string(t.uri)&&o.integer(t.version)}e.is=i})(se||(se={}));var Q;(function(e){function n(r,t){return{uri:r,version:t}}e.create=n;function i(r){let t=r;return o.defined(t)&&o.string(t.uri)&&(t.version===null||o.integer(t.version))}e.is=i})(Q||(Q={}));var ce;(function(e){function n(r,t,a,u){return{uri:r,languageId:t,version:a,text:u}}e.create=n;function i(r){let t=r;return o.defined(t)&&o.string(t.uri)&&o.string(t.languageId)&&o.integer(t.version)&&o.string(t.text)}e.is=i})(ce||(ce={}));var G;(function(e){e.PlainText="plaintext",e.Markdown="markdown";function n(i){const r=i;return r===e.PlainText||r===e.Markdown}e.is=n})(G||(G={}));var F;(function(e){function n(i){const r=i;return o.objectLiteral(i)&&G.is(r.kind)&&o.string(r.value)}e.is=n})(F||(F={}));var p;(function(e){e.Text=1,e.Method=2,e.Function=3,e.Constructor=4,e.Field=5,e.Variable=6,e.Class=7,e.Interface=8,e.Module=9,e.Property=10,e.Unit=11,e.Value=12,e.Enum=13,e.Keyword=14,e.Snippet=15,e.Color=16,e.File=17,e.Reference=18,e.Folder=19,e.EnumMember=20,e.Constant=21,e.Struct=22,e.Event=23,e.Operator=24,e.TypeParameter=25})(p||(p={}));var J;(function(e){e.PlainText=1,e.Snippet=2})(J||(J={}));var de;(function(e){e.Deprecated=1})(de||(de={}));var fe;(function(e){function n(r,t,a){return{newText:r,insert:t,replace:a}}e.create=n;function i(r){const t=r;return t&&o.string(t.newText)&&h.is(t.insert)&&h.is(t.replace)}e.is=i})(fe||(fe={}));var le;(function(e){e.asIs=1,e.adjustIndentation=2})(le||(le={}));var ge;(function(e){function n(i){const r=i;return r&&(o.string(r.detail)||r.detail===void 0)&&(o.string(r.description)||r.description===void 0)}e.is=n})(ge||(ge={}));var he;(function(e){function n(i){return{label:i}}e.create=n})(he||(he={}));var pe;(function(e){function n(i,r){return{items:i||[],isIncomplete:!!r}}e.create=n})(pe||(pe={}));var y;(function(e){function n(r){return r.replace(/[\\`*_{}[\]()#+\-.!]/g,"\\$&")}e.fromPlainText=n;function i(r){const t=r;return o.string(t)||o.objectLiteral(t)&&o.string(t.language)&&o.string(t.value)}e.is=i})(y||(y={}));var me;(function(e){function n(i){let r=i;return!!r&&o.objectLiteral(r)&&(F.is(r.contents)||y.is(r.contents)||o.typedArray(r.contents,y.is))&&(i.range===void 0||h.is(i.range))}e.is=n})(me||(me={}));var ve;(function(e){function n(i,r){return r?{label:i,documentation:r}:{label:i}}e.create=n})(ve||(ve={}));var be;(function(e){function n(i,r,...t){let a={label:i};return o.defined(r)&&(a.documentation=r),o.defined(t)?a.parameters=t:a.parameters=[],a}e.create=n})(be||(be={}));var D;(function(e){e.Text=1,e.Read=2,e.Write=3})(D||(D={}));var _e;(function(e){function n(i,r){let t={range:i};return o.number(r)&&(t.kind=r),t}e.create=n})(_e||(_e={}));var m;(function(e){e.File=1,e.Module=2,e.Namespace=3,e.Package=4,e.Class=5,e.Method=6,e.Property=7,e.Field=8,e.Constructor=9,e.Enum=10,e.Interface=11,e.Function=12,e.Variable=13,e.Constant=14,e.String=15,e.Number=16,e.Boolean=17,e.Array=18,e.Object=19,e.Key=20,e.Null=21,e.EnumMember=22,e.Struct=23,e.Event=24,e.Operator=25,e.TypeParameter=26})(m||(m={}));var xe;(function(e){e.Deprecated=1})(xe||(xe={}));var we;(function(e){function n(i,r,t,a,u){let s={name:i,kind:r,location:{uri:a,range:t}};return u&&(s.containerName=u),s}e.create=n})(we||(we={}));var ke;(function(e){function n(i,r,t,a){return a!==void 0?{name:i,kind:r,location:{uri:t,range:a}}:{name:i,kind:r,location:{uri:t}}}e.create=n})(ke||(ke={}));var Ae;(function(e){function n(r,t,a,u,s,f){let l={name:r,detail:t,kind:a,range:u,selectionRange:s};return f!==void 0&&(l.children=f),l}e.create=n;function i(r){let t=r;return t&&o.string(t.name)&&o.number(t.kind)&&h.is(t.range)&&h.is(t.selectionRange)&&(t.detail===void 0||o.string(t.detail))&&(t.deprecated===void 0||o.boolean(t.deprecated))&&(t.children===void 0||Array.isArray(t.children))&&(t.tags===void 0||Array.isArray(t.tags))}e.is=i})(Ae||(Ae={}));var Ee;(function(e){e.Empty="",e.QuickFix="quickfix",e.Refactor="refactor",e.RefactorExtract="refactor.extract",e.RefactorInline="refactor.inline",e.RefactorRewrite="refactor.rewrite",e.Source="source",e.SourceOrganizeImports="source.organizeImports",e.SourceFixAll="source.fixAll"})(Ee||(Ee={}));var V;(function(e){e.Invoked=1,e.Automatic=2})(V||(V={}));var Le;(function(e){function n(r,t,a){let u={diagnostics:r};return t!=null&&(u.only=t),a!=null&&(u.triggerKind=a),u}e.create=n;function i(r){let t=r;return o.defined(t)&&o.typedArray(t.diagnostics,P.is)&&(t.only===void 0||o.typedArray(t.only,o.string))&&(t.triggerKind===void 0||t.triggerKind===V.Invoked||t.triggerKind===V.Automatic)}e.is=i})(Le||(Le={}));var Ie;(function(e){function n(r,t,a){let u={title:r},s=!0;return typeof t=="string"?(s=!1,u.kind=t):E.is(t)?u.command=t:u.edit=t,s&&a!==void 0&&(u.kind=a),u}e.create=n;function i(r){let t=r;return t&&o.string(t.title)&&(t.diagnostics===void 0||o.typedArray(t.diagnostics,P.is))&&(t.kind===void 0||o.string(t.kind))&&(t.edit!==void 0||t.command!==void 0)&&(t.command===void 0||E.is(t.command))&&(t.isPreferred===void 0||o.boolean(t.isPreferred))&&(t.edit===void 0||q.is(t.edit))}e.is=i})(Ie||(Ie={}));var Re;(function(e){function n(r,t){let a={range:r};return o.defined(t)&&(a.data=t),a}e.create=n;function i(r){let t=r;return o.defined(t)&&h.is(t.range)&&(o.undefined(t.command)||E.is(t.command))}e.is=i})(Re||(Re={}));var Me;(function(e){function n(r,t){return{tabSize:r,insertSpaces:t}}e.create=n;function i(r){let t=r;return o.defined(t)&&o.uinteger(t.tabSize)&&o.boolean(t.insertSpaces)}e.is=i})(Me||(Me={}));var De;(function(e){function n(r,t,a){return{range:r,target:t,data:a}}e.create=n;function i(r){let t=r;return o.defined(t)&&h.is(t.range)&&(o.undefined(t.target)||o.string(t.target))}e.is=i})(De||(De={}));var Fe;(function(e){function n(r,t){return{range:r,parent:t}}e.create=n;function i(r){let t=r;return o.objectLiteral(t)&&h.is(t.range)&&(t.parent===void 0||e.is(t.parent))}e.is=i})(Fe||(Fe={}));var Ce;(function(e){e.namespace="namespace",e.type="type",e.class="class",e.enum="enum",e.interface="interface",e.struct="struct",e.typeParameter="typeParameter",e.parameter="parameter",e.variable="variable",e.property="property",e.enumMember="enumMember",e.event="event",e.function="function",e.method="method",e.macro="macro",e.keyword="keyword",e.modifier="modifier",e.comment="comment",e.string="string",e.number="number",e.regexp="regexp",e.operator="operator",e.decorator="decorator"})(Ce||(Ce={}));var je;(function(e){e.declaration="declaration",e.definition="definition",e.readonly="readonly",e.static="static",e.deprecated="deprecated",e.abstract="abstract",e.async="async",e.modification="modification",e.documentation="documentation",e.defaultLibrary="defaultLibrary"})(je||(je={}));var Ne;(function(e){function n(i){const r=i;return o.objectLiteral(r)&&(r.resultId===void 0||typeof r.resultId=="string")&&Array.isArray(r.data)&&(r.data.length===0||typeof r.data[0]=="number")}e.is=n})(Ne||(Ne={}));var Pe;(function(e){function n(r,t){return{range:r,text:t}}e.create=n;function i(r){const t=r;return t!=null&&h.is(t.range)&&o.string(t.text)}e.is=i})(Pe||(Pe={}));var ye;(function(e){function n(r,t,a){return{range:r,variableName:t,caseSensitiveLookup:a}}e.create=n;function i(r){const t=r;return t!=null&&h.is(t.range)&&o.boolean(t.caseSensitiveLookup)&&(o.string(t.variableName)||t.variableName===void 0)}e.is=i})(ye||(ye={}));var Ve;(function(e){function n(r,t){return{range:r,expression:t}}e.create=n;function i(r){const t=r;return t!=null&&h.is(t.range)&&(o.string(t.expression)||t.expression===void 0)}e.is=i})(Ve||(Ve={}));var Ue;(function(e){function n(r,t){return{frameId:r,stoppedLocation:t}}e.create=n;function i(r){const t=r;return o.defined(t)&&h.is(r.stoppedLocation)}e.is=i})(Ue||(Ue={}));var Y;(function(e){e.Type=1,e.Parameter=2;function n(i){return i===1||i===2}e.is=n})(Y||(Y={}));var Z;(function(e){function n(r){return{value:r}}e.create=n;function i(r){const t=r;return o.objectLiteral(t)&&(t.tooltip===void 0||o.string(t.tooltip)||F.is(t.tooltip))&&(t.location===void 0||N.is(t.location))&&(t.command===void 0||E.is(t.command))}e.is=i})(Z||(Z={}));var Oe;(function(e){function n(r,t,a){const u={position:r,label:t};return a!==void 0&&(u.kind=a),u}e.create=n;function i(r){const t=r;return o.objectLiteral(t)&&_.is(t.position)&&(o.string(t.label)||o.typedArray(t.label,Z.is))&&(t.kind===void 0||Y.is(t.kind))&&t.textEdits===void 0||o.typedArray(t.textEdits,L.is)&&(t.tooltip===void 0||o.string(t.tooltip)||F.is(t.tooltip))&&(t.paddingLeft===void 0||o.boolean(t.paddingLeft))&&(t.paddingRight===void 0||o.boolean(t.paddingRight))}e.is=i})(Oe||(Oe={}));var Se;(function(e){function n(i){return{kind:"snippet",value:i}}e.createSnippet=n})(Se||(Se={}));var He;(function(e){function n(i,r,t,a){return{insertText:i,filterText:r,range:t,command:a}}e.create=n})(He||(He={}));var We;(function(e){function n(i){return{items:i}}e.create=n})(We||(We={}));var Xe;(function(e){e.Invoked=0,e.Automatic=1})(Xe||(Xe={}));var $e;(function(e){function n(i,r){return{range:i,text:r}}e.create=n})($e||($e={}));var ze;(function(e){function n(i,r){return{triggerKind:i,selectedCompletionInfo:r}}e.create=n})(ze||(ze={}));var Be;(function(e){function n(i){const r=i;return o.objectLiteral(r)&&O.is(r.uri)&&o.string(r.name)}e.is=n})(Be||(Be={}));var qe;(function(e){function n(a,u,s,f){return new nt(a,u,s,f)}e.create=n;function i(a){let u=a;return!!(o.defined(u)&&o.string(u.uri)&&(o.undefined(u.languageId)||o.string(u.languageId))&&o.uinteger(u.lineCount)&&o.func(u.getText)&&o.func(u.positionAt)&&o.func(u.offsetAt))}e.is=i;function r(a,u){let s=a.getText(),f=t(u,(d,g)=>{let b=d.range.start.line-g.range.start.line;return b===0?d.range.start.character-g.range.start.character:b}),l=s.length;for(let d=f.length-1;d>=0;d--){let g=f[d],b=a.offsetAt(g.range.start),c=a.offsetAt(g.range.end);if(c<=l)s=s.substring(0,b)+g.newText+s.substring(c,s.length);else throw new Error("Overlapping edit");l=b}return s}e.applyEdits=r;function t(a,u){if(a.length<=1)return a;const s=a.length/2|0,f=a.slice(0,s),l=a.slice(s);t(f,u),t(l,u);let d=0,g=0,b=0;for(;d<f.length&&g<l.length;)u(f[d],l[g])<=0?a[b++]=f[d++]:a[b++]=l[g++];for(;d<f.length;)a[b++]=f[d++];for(;g<l.length;)a[b++]=l[g++];return a}})(qe||(qe={}));class nt{constructor(n,i,r,t){this._uri=n,this._languageId=i,this._version=r,this._content=t,this._lineOffsets=void 0}get uri(){return this._uri}get languageId(){return this._languageId}get version(){return this._version}getText(n){if(n){let i=this.offsetAt(n.start),r=this.offsetAt(n.end);return this._content.substring(i,r)}return this._content}update(n,i){this._content=n.text,this._version=i,this._lineOffsets=void 0}getLineOffsets(){if(this._lineOffsets===void 0){let n=[],i=this._content,r=!0;for(let t=0;t<i.length;t++){r&&(n.push(t),r=!1);let a=i.charAt(t);r=a==="\r"||a===`
1
+ import{R as Ge,l as x,g as w,U as Je,M as R}from"./U6cHmbYS.js";var T;(function(e){function n(i){return typeof i=="string"}e.is=n})(T||(T={}));var O;(function(e){function n(i){return typeof i=="string"}e.is=n})(O||(O={}));var K;(function(e){e.MIN_VALUE=-2147483648,e.MAX_VALUE=2147483647;function n(i){return typeof i=="number"&&e.MIN_VALUE<=i&&i<=e.MAX_VALUE}e.is=n})(K||(K={}));var j;(function(e){e.MIN_VALUE=0,e.MAX_VALUE=2147483647;function n(i){return typeof i=="number"&&e.MIN_VALUE<=i&&i<=e.MAX_VALUE}e.is=n})(j||(j={}));var _;(function(e){function n(r,t){return r===Number.MAX_VALUE&&(r=j.MAX_VALUE),t===Number.MAX_VALUE&&(t=j.MAX_VALUE),{line:r,character:t}}e.create=n;function i(r){let t=r;return o.objectLiteral(t)&&o.uinteger(t.line)&&o.uinteger(t.character)}e.is=i})(_||(_={}));var h;(function(e){function n(r,t,a,u){if(o.uinteger(r)&&o.uinteger(t)&&o.uinteger(a)&&o.uinteger(u))return{start:_.create(r,t),end:_.create(a,u)};if(_.is(r)&&_.is(t))return{start:r,end:t};throw new Error(`Range#create called with invalid arguments[${r}, ${t}, ${a}, ${u}]`)}e.create=n;function i(r){let t=r;return o.objectLiteral(t)&&_.is(t.start)&&_.is(t.end)}e.is=i})(h||(h={}));var N;(function(e){function n(r,t){return{uri:r,range:t}}e.create=n;function i(r){let t=r;return o.objectLiteral(t)&&h.is(t.range)&&(o.string(t.uri)||o.undefined(t.uri))}e.is=i})(N||(N={}));var ee;(function(e){function n(r,t,a,u){return{targetUri:r,targetRange:t,targetSelectionRange:a,originSelectionRange:u}}e.create=n;function i(r){let t=r;return o.objectLiteral(t)&&h.is(t.targetRange)&&o.string(t.targetUri)&&h.is(t.targetSelectionRange)&&(h.is(t.originSelectionRange)||o.undefined(t.originSelectionRange))}e.is=i})(ee||(ee={}));var S;(function(e){function n(r,t,a,u){return{red:r,green:t,blue:a,alpha:u}}e.create=n;function i(r){const t=r;return o.objectLiteral(t)&&o.numberRange(t.red,0,1)&&o.numberRange(t.green,0,1)&&o.numberRange(t.blue,0,1)&&o.numberRange(t.alpha,0,1)}e.is=i})(S||(S={}));var te;(function(e){function n(r,t){return{range:r,color:t}}e.create=n;function i(r){const t=r;return o.objectLiteral(t)&&h.is(t.range)&&S.is(t.color)}e.is=i})(te||(te={}));var ne;(function(e){function n(r,t,a){return{label:r,textEdit:t,additionalTextEdits:a}}e.create=n;function i(r){const t=r;return o.objectLiteral(t)&&o.string(t.label)&&(o.undefined(t.textEdit)||L.is(t))&&(o.undefined(t.additionalTextEdits)||o.typedArray(t.additionalTextEdits,L.is))}e.is=i})(ne||(ne={}));var M;(function(e){e.Comment="comment",e.Imports="imports",e.Region="region"})(M||(M={}));var re;(function(e){function n(r,t,a,u,s,f){const l={startLine:r,endLine:t};return o.defined(a)&&(l.startCharacter=a),o.defined(u)&&(l.endCharacter=u),o.defined(s)&&(l.kind=s),o.defined(f)&&(l.collapsedText=f),l}e.create=n;function i(r){const t=r;return o.objectLiteral(t)&&o.uinteger(t.startLine)&&o.uinteger(t.startLine)&&(o.undefined(t.startCharacter)||o.uinteger(t.startCharacter))&&(o.undefined(t.endCharacter)||o.uinteger(t.endCharacter))&&(o.undefined(t.kind)||o.string(t.kind))}e.is=i})(re||(re={}));var H;(function(e){function n(r,t){return{location:r,message:t}}e.create=n;function i(r){let t=r;return o.defined(t)&&N.is(t.location)&&o.string(t.message)}e.is=i})(H||(H={}));var A;(function(e){e.Error=1,e.Warning=2,e.Information=3,e.Hint=4})(A||(A={}));var ie;(function(e){e.Unnecessary=1,e.Deprecated=2})(ie||(ie={}));var ae;(function(e){function n(i){const r=i;return o.objectLiteral(r)&&o.string(r.href)}e.is=n})(ae||(ae={}));var P;(function(e){function n(r,t,a,u,s,f){let l={range:r,message:t};return o.defined(a)&&(l.severity=a),o.defined(u)&&(l.code=u),o.defined(s)&&(l.source=s),o.defined(f)&&(l.relatedInformation=f),l}e.create=n;function i(r){var t;let a=r;return o.defined(a)&&h.is(a.range)&&o.string(a.message)&&(o.number(a.severity)||o.undefined(a.severity))&&(o.integer(a.code)||o.string(a.code)||o.undefined(a.code))&&(o.undefined(a.codeDescription)||o.string((t=a.codeDescription)===null||t===void 0?void 0:t.href))&&(o.string(a.source)||o.undefined(a.source))&&(o.undefined(a.relatedInformation)||o.typedArray(a.relatedInformation,H.is))}e.is=i})(P||(P={}));var E;(function(e){function n(r,t,...a){let u={title:r,command:t};return o.defined(a)&&a.length>0&&(u.arguments=a),u}e.create=n;function i(r){let t=r;return o.defined(t)&&o.string(t.title)&&o.string(t.command)}e.is=i})(E||(E={}));var L;(function(e){function n(a,u){return{range:a,newText:u}}e.replace=n;function i(a,u){return{range:{start:a,end:a},newText:u}}e.insert=i;function r(a){return{range:a,newText:""}}e.del=r;function t(a){const u=a;return o.objectLiteral(u)&&o.string(u.newText)&&h.is(u.range)}e.is=t})(L||(L={}));var W;(function(e){function n(r,t,a){const u={label:r};return t!==void 0&&(u.needsConfirmation=t),a!==void 0&&(u.description=a),u}e.create=n;function i(r){const t=r;return o.objectLiteral(t)&&o.string(t.label)&&(o.boolean(t.needsConfirmation)||t.needsConfirmation===void 0)&&(o.string(t.description)||t.description===void 0)}e.is=i})(W||(W={}));var I;(function(e){function n(i){const r=i;return o.string(r)}e.is=n})(I||(I={}));var oe;(function(e){function n(a,u,s){return{range:a,newText:u,annotationId:s}}e.replace=n;function i(a,u,s){return{range:{start:a,end:a},newText:u,annotationId:s}}e.insert=i;function r(a,u){return{range:a,newText:"",annotationId:u}}e.del=r;function t(a){const u=a;return L.is(u)&&(W.is(u.annotationId)||I.is(u.annotationId))}e.is=t})(oe||(oe={}));var X;(function(e){function n(r,t){return{textDocument:r,edits:t}}e.create=n;function i(r){let t=r;return o.defined(t)&&Q.is(t.textDocument)&&Array.isArray(t.edits)}e.is=i})(X||(X={}));var $;(function(e){function n(r,t,a){let u={kind:"create",uri:r};return t!==void 0&&(t.overwrite!==void 0||t.ignoreIfExists!==void 0)&&(u.options=t),a!==void 0&&(u.annotationId=a),u}e.create=n;function i(r){let t=r;return t&&t.kind==="create"&&o.string(t.uri)&&(t.options===void 0||(t.options.overwrite===void 0||o.boolean(t.options.overwrite))&&(t.options.ignoreIfExists===void 0||o.boolean(t.options.ignoreIfExists)))&&(t.annotationId===void 0||I.is(t.annotationId))}e.is=i})($||($={}));var z;(function(e){function n(r,t,a,u){let s={kind:"rename",oldUri:r,newUri:t};return a!==void 0&&(a.overwrite!==void 0||a.ignoreIfExists!==void 0)&&(s.options=a),u!==void 0&&(s.annotationId=u),s}e.create=n;function i(r){let t=r;return t&&t.kind==="rename"&&o.string(t.oldUri)&&o.string(t.newUri)&&(t.options===void 0||(t.options.overwrite===void 0||o.boolean(t.options.overwrite))&&(t.options.ignoreIfExists===void 0||o.boolean(t.options.ignoreIfExists)))&&(t.annotationId===void 0||I.is(t.annotationId))}e.is=i})(z||(z={}));var B;(function(e){function n(r,t,a){let u={kind:"delete",uri:r};return t!==void 0&&(t.recursive!==void 0||t.ignoreIfNotExists!==void 0)&&(u.options=t),a!==void 0&&(u.annotationId=a),u}e.create=n;function i(r){let t=r;return t&&t.kind==="delete"&&o.string(t.uri)&&(t.options===void 0||(t.options.recursive===void 0||o.boolean(t.options.recursive))&&(t.options.ignoreIfNotExists===void 0||o.boolean(t.options.ignoreIfNotExists)))&&(t.annotationId===void 0||I.is(t.annotationId))}e.is=i})(B||(B={}));var q;(function(e){function n(i){let r=i;return r&&(r.changes!==void 0||r.documentChanges!==void 0)&&(r.documentChanges===void 0||r.documentChanges.every(t=>o.string(t.kind)?$.is(t)||z.is(t)||B.is(t):X.is(t)))}e.is=n})(q||(q={}));var ue;(function(e){function n(r){return{uri:r}}e.create=n;function i(r){let t=r;return o.defined(t)&&o.string(t.uri)}e.is=i})(ue||(ue={}));var se;(function(e){function n(r,t){return{uri:r,version:t}}e.create=n;function i(r){let t=r;return o.defined(t)&&o.string(t.uri)&&o.integer(t.version)}e.is=i})(se||(se={}));var Q;(function(e){function n(r,t){return{uri:r,version:t}}e.create=n;function i(r){let t=r;return o.defined(t)&&o.string(t.uri)&&(t.version===null||o.integer(t.version))}e.is=i})(Q||(Q={}));var ce;(function(e){function n(r,t,a,u){return{uri:r,languageId:t,version:a,text:u}}e.create=n;function i(r){let t=r;return o.defined(t)&&o.string(t.uri)&&o.string(t.languageId)&&o.integer(t.version)&&o.string(t.text)}e.is=i})(ce||(ce={}));var G;(function(e){e.PlainText="plaintext",e.Markdown="markdown";function n(i){const r=i;return r===e.PlainText||r===e.Markdown}e.is=n})(G||(G={}));var F;(function(e){function n(i){const r=i;return o.objectLiteral(i)&&G.is(r.kind)&&o.string(r.value)}e.is=n})(F||(F={}));var p;(function(e){e.Text=1,e.Method=2,e.Function=3,e.Constructor=4,e.Field=5,e.Variable=6,e.Class=7,e.Interface=8,e.Module=9,e.Property=10,e.Unit=11,e.Value=12,e.Enum=13,e.Keyword=14,e.Snippet=15,e.Color=16,e.File=17,e.Reference=18,e.Folder=19,e.EnumMember=20,e.Constant=21,e.Struct=22,e.Event=23,e.Operator=24,e.TypeParameter=25})(p||(p={}));var J;(function(e){e.PlainText=1,e.Snippet=2})(J||(J={}));var de;(function(e){e.Deprecated=1})(de||(de={}));var fe;(function(e){function n(r,t,a){return{newText:r,insert:t,replace:a}}e.create=n;function i(r){const t=r;return t&&o.string(t.newText)&&h.is(t.insert)&&h.is(t.replace)}e.is=i})(fe||(fe={}));var le;(function(e){e.asIs=1,e.adjustIndentation=2})(le||(le={}));var ge;(function(e){function n(i){const r=i;return r&&(o.string(r.detail)||r.detail===void 0)&&(o.string(r.description)||r.description===void 0)}e.is=n})(ge||(ge={}));var he;(function(e){function n(i){return{label:i}}e.create=n})(he||(he={}));var pe;(function(e){function n(i,r){return{items:i||[],isIncomplete:!!r}}e.create=n})(pe||(pe={}));var y;(function(e){function n(r){return r.replace(/[\\`*_{}[\]()#+\-.!]/g,"\\$&")}e.fromPlainText=n;function i(r){const t=r;return o.string(t)||o.objectLiteral(t)&&o.string(t.language)&&o.string(t.value)}e.is=i})(y||(y={}));var me;(function(e){function n(i){let r=i;return!!r&&o.objectLiteral(r)&&(F.is(r.contents)||y.is(r.contents)||o.typedArray(r.contents,y.is))&&(i.range===void 0||h.is(i.range))}e.is=n})(me||(me={}));var ve;(function(e){function n(i,r){return r?{label:i,documentation:r}:{label:i}}e.create=n})(ve||(ve={}));var be;(function(e){function n(i,r,...t){let a={label:i};return o.defined(r)&&(a.documentation=r),o.defined(t)?a.parameters=t:a.parameters=[],a}e.create=n})(be||(be={}));var D;(function(e){e.Text=1,e.Read=2,e.Write=3})(D||(D={}));var _e;(function(e){function n(i,r){let t={range:i};return o.number(r)&&(t.kind=r),t}e.create=n})(_e||(_e={}));var m;(function(e){e.File=1,e.Module=2,e.Namespace=3,e.Package=4,e.Class=5,e.Method=6,e.Property=7,e.Field=8,e.Constructor=9,e.Enum=10,e.Interface=11,e.Function=12,e.Variable=13,e.Constant=14,e.String=15,e.Number=16,e.Boolean=17,e.Array=18,e.Object=19,e.Key=20,e.Null=21,e.EnumMember=22,e.Struct=23,e.Event=24,e.Operator=25,e.TypeParameter=26})(m||(m={}));var xe;(function(e){e.Deprecated=1})(xe||(xe={}));var we;(function(e){function n(i,r,t,a,u){let s={name:i,kind:r,location:{uri:a,range:t}};return u&&(s.containerName=u),s}e.create=n})(we||(we={}));var ke;(function(e){function n(i,r,t,a){return a!==void 0?{name:i,kind:r,location:{uri:t,range:a}}:{name:i,kind:r,location:{uri:t}}}e.create=n})(ke||(ke={}));var Ae;(function(e){function n(r,t,a,u,s,f){let l={name:r,detail:t,kind:a,range:u,selectionRange:s};return f!==void 0&&(l.children=f),l}e.create=n;function i(r){let t=r;return t&&o.string(t.name)&&o.number(t.kind)&&h.is(t.range)&&h.is(t.selectionRange)&&(t.detail===void 0||o.string(t.detail))&&(t.deprecated===void 0||o.boolean(t.deprecated))&&(t.children===void 0||Array.isArray(t.children))&&(t.tags===void 0||Array.isArray(t.tags))}e.is=i})(Ae||(Ae={}));var Ee;(function(e){e.Empty="",e.QuickFix="quickfix",e.Refactor="refactor",e.RefactorExtract="refactor.extract",e.RefactorInline="refactor.inline",e.RefactorRewrite="refactor.rewrite",e.Source="source",e.SourceOrganizeImports="source.organizeImports",e.SourceFixAll="source.fixAll"})(Ee||(Ee={}));var V;(function(e){e.Invoked=1,e.Automatic=2})(V||(V={}));var Le;(function(e){function n(r,t,a){let u={diagnostics:r};return t!=null&&(u.only=t),a!=null&&(u.triggerKind=a),u}e.create=n;function i(r){let t=r;return o.defined(t)&&o.typedArray(t.diagnostics,P.is)&&(t.only===void 0||o.typedArray(t.only,o.string))&&(t.triggerKind===void 0||t.triggerKind===V.Invoked||t.triggerKind===V.Automatic)}e.is=i})(Le||(Le={}));var Ie;(function(e){function n(r,t,a){let u={title:r},s=!0;return typeof t=="string"?(s=!1,u.kind=t):E.is(t)?u.command=t:u.edit=t,s&&a!==void 0&&(u.kind=a),u}e.create=n;function i(r){let t=r;return t&&o.string(t.title)&&(t.diagnostics===void 0||o.typedArray(t.diagnostics,P.is))&&(t.kind===void 0||o.string(t.kind))&&(t.edit!==void 0||t.command!==void 0)&&(t.command===void 0||E.is(t.command))&&(t.isPreferred===void 0||o.boolean(t.isPreferred))&&(t.edit===void 0||q.is(t.edit))}e.is=i})(Ie||(Ie={}));var Re;(function(e){function n(r,t){let a={range:r};return o.defined(t)&&(a.data=t),a}e.create=n;function i(r){let t=r;return o.defined(t)&&h.is(t.range)&&(o.undefined(t.command)||E.is(t.command))}e.is=i})(Re||(Re={}));var Me;(function(e){function n(r,t){return{tabSize:r,insertSpaces:t}}e.create=n;function i(r){let t=r;return o.defined(t)&&o.uinteger(t.tabSize)&&o.boolean(t.insertSpaces)}e.is=i})(Me||(Me={}));var De;(function(e){function n(r,t,a){return{range:r,target:t,data:a}}e.create=n;function i(r){let t=r;return o.defined(t)&&h.is(t.range)&&(o.undefined(t.target)||o.string(t.target))}e.is=i})(De||(De={}));var Fe;(function(e){function n(r,t){return{range:r,parent:t}}e.create=n;function i(r){let t=r;return o.objectLiteral(t)&&h.is(t.range)&&(t.parent===void 0||e.is(t.parent))}e.is=i})(Fe||(Fe={}));var Ce;(function(e){e.namespace="namespace",e.type="type",e.class="class",e.enum="enum",e.interface="interface",e.struct="struct",e.typeParameter="typeParameter",e.parameter="parameter",e.variable="variable",e.property="property",e.enumMember="enumMember",e.event="event",e.function="function",e.method="method",e.macro="macro",e.keyword="keyword",e.modifier="modifier",e.comment="comment",e.string="string",e.number="number",e.regexp="regexp",e.operator="operator",e.decorator="decorator"})(Ce||(Ce={}));var je;(function(e){e.declaration="declaration",e.definition="definition",e.readonly="readonly",e.static="static",e.deprecated="deprecated",e.abstract="abstract",e.async="async",e.modification="modification",e.documentation="documentation",e.defaultLibrary="defaultLibrary"})(je||(je={}));var Ne;(function(e){function n(i){const r=i;return o.objectLiteral(r)&&(r.resultId===void 0||typeof r.resultId=="string")&&Array.isArray(r.data)&&(r.data.length===0||typeof r.data[0]=="number")}e.is=n})(Ne||(Ne={}));var Pe;(function(e){function n(r,t){return{range:r,text:t}}e.create=n;function i(r){const t=r;return t!=null&&h.is(t.range)&&o.string(t.text)}e.is=i})(Pe||(Pe={}));var ye;(function(e){function n(r,t,a){return{range:r,variableName:t,caseSensitiveLookup:a}}e.create=n;function i(r){const t=r;return t!=null&&h.is(t.range)&&o.boolean(t.caseSensitiveLookup)&&(o.string(t.variableName)||t.variableName===void 0)}e.is=i})(ye||(ye={}));var Ve;(function(e){function n(r,t){return{range:r,expression:t}}e.create=n;function i(r){const t=r;return t!=null&&h.is(t.range)&&(o.string(t.expression)||t.expression===void 0)}e.is=i})(Ve||(Ve={}));var Ue;(function(e){function n(r,t){return{frameId:r,stoppedLocation:t}}e.create=n;function i(r){const t=r;return o.defined(t)&&h.is(r.stoppedLocation)}e.is=i})(Ue||(Ue={}));var Y;(function(e){e.Type=1,e.Parameter=2;function n(i){return i===1||i===2}e.is=n})(Y||(Y={}));var Z;(function(e){function n(r){return{value:r}}e.create=n;function i(r){const t=r;return o.objectLiteral(t)&&(t.tooltip===void 0||o.string(t.tooltip)||F.is(t.tooltip))&&(t.location===void 0||N.is(t.location))&&(t.command===void 0||E.is(t.command))}e.is=i})(Z||(Z={}));var Oe;(function(e){function n(r,t,a){const u={position:r,label:t};return a!==void 0&&(u.kind=a),u}e.create=n;function i(r){const t=r;return o.objectLiteral(t)&&_.is(t.position)&&(o.string(t.label)||o.typedArray(t.label,Z.is))&&(t.kind===void 0||Y.is(t.kind))&&t.textEdits===void 0||o.typedArray(t.textEdits,L.is)&&(t.tooltip===void 0||o.string(t.tooltip)||F.is(t.tooltip))&&(t.paddingLeft===void 0||o.boolean(t.paddingLeft))&&(t.paddingRight===void 0||o.boolean(t.paddingRight))}e.is=i})(Oe||(Oe={}));var Se;(function(e){function n(i){return{kind:"snippet",value:i}}e.createSnippet=n})(Se||(Se={}));var He;(function(e){function n(i,r,t,a){return{insertText:i,filterText:r,range:t,command:a}}e.create=n})(He||(He={}));var We;(function(e){function n(i){return{items:i}}e.create=n})(We||(We={}));var Xe;(function(e){e.Invoked=0,e.Automatic=1})(Xe||(Xe={}));var $e;(function(e){function n(i,r){return{range:i,text:r}}e.create=n})($e||($e={}));var ze;(function(e){function n(i,r){return{triggerKind:i,selectedCompletionInfo:r}}e.create=n})(ze||(ze={}));var Be;(function(e){function n(i){const r=i;return o.objectLiteral(r)&&O.is(r.uri)&&o.string(r.name)}e.is=n})(Be||(Be={}));var qe;(function(e){function n(a,u,s,f){return new nt(a,u,s,f)}e.create=n;function i(a){let u=a;return!!(o.defined(u)&&o.string(u.uri)&&(o.undefined(u.languageId)||o.string(u.languageId))&&o.uinteger(u.lineCount)&&o.func(u.getText)&&o.func(u.positionAt)&&o.func(u.offsetAt))}e.is=i;function r(a,u){let s=a.getText(),f=t(u,(d,g)=>{let b=d.range.start.line-g.range.start.line;return b===0?d.range.start.character-g.range.start.character:b}),l=s.length;for(let d=f.length-1;d>=0;d--){let g=f[d],b=a.offsetAt(g.range.start),c=a.offsetAt(g.range.end);if(c<=l)s=s.substring(0,b)+g.newText+s.substring(c,s.length);else throw new Error("Overlapping edit");l=b}return s}e.applyEdits=r;function t(a,u){if(a.length<=1)return a;const s=a.length/2|0,f=a.slice(0,s),l=a.slice(s);t(f,u),t(l,u);let d=0,g=0,b=0;for(;d<f.length&&g<l.length;)u(f[d],l[g])<=0?a[b++]=f[d++]:a[b++]=l[g++];for(;d<f.length;)a[b++]=f[d++];for(;g<l.length;)a[b++]=l[g++];return a}})(qe||(qe={}));class nt{constructor(n,i,r,t){this._uri=n,this._languageId=i,this._version=r,this._content=t,this._lineOffsets=void 0}get uri(){return this._uri}get languageId(){return this._languageId}get version(){return this._version}getText(n){if(n){let i=this.offsetAt(n.start),r=this.offsetAt(n.end);return this._content.substring(i,r)}return this._content}update(n,i){this._content=n.text,this._version=i,this._lineOffsets=void 0}getLineOffsets(){if(this._lineOffsets===void 0){let n=[],i=this._content,r=!0;for(let t=0;t<i.length;t++){r&&(n.push(t),r=!1);let a=i.charAt(t);r=a==="\r"||a===`
2
2
  `,a==="\r"&&t+1<i.length&&i.charAt(t+1)===`
3
3
  `&&t++}r&&i.length>0&&n.push(i.length),this._lineOffsets=n}return this._lineOffsets}positionAt(n){n=Math.max(Math.min(n,this._content.length),0);let i=this.getLineOffsets(),r=0,t=i.length;if(t===0)return _.create(0,n);for(;r<t;){let u=Math.floor((r+t)/2);i[u]>n?t=u:r=u+1}let a=r-1;return _.create(a,n-i[a])}offsetAt(n){let i=this.getLineOffsets();if(n.line>=i.length)return this._content.length;if(n.line<0)return 0;let r=i[n.line],t=n.line+1<i.length?i[n.line+1]:this._content.length;return Math.max(Math.min(r+n.character,t),r)}get lineCount(){return this.getLineOffsets().length}}var o;(function(e){const n=Object.prototype.toString;function i(c){return typeof c<"u"}e.defined=i;function r(c){return typeof c>"u"}e.undefined=r;function t(c){return c===!0||c===!1}e.boolean=t;function a(c){return n.call(c)==="[object String]"}e.string=a;function u(c){return n.call(c)==="[object Number]"}e.number=u;function s(c,U,tt){return n.call(c)==="[object Number]"&&U<=c&&c<=tt}e.numberRange=s;function f(c){return n.call(c)==="[object Number]"&&-2147483648<=c&&c<=2147483647}e.integer=f;function l(c){return n.call(c)==="[object Number]"&&0<=c&&c<=2147483647}e.uinteger=l;function d(c){return n.call(c)==="[object Function]"}e.func=d;function g(c){return c!==null&&typeof c=="object"}e.objectLiteral=g;function b(c,U){return Array.isArray(c)&&c.every(U)}e.typedArray=b})(o||(o={}));class pt{constructor(n,i,r){this._languageId=n,this._worker=i,this._disposables=[],this._listener=Object.create(null);const t=u=>{let s=u.getLanguageId();if(s!==this._languageId)return;let f;this._listener[u.uri.toString()]=u.onDidChangeContent(()=>{window.clearTimeout(f),f=window.setTimeout(()=>this._doValidate(u.uri,s),500)}),this._doValidate(u.uri,s)},a=u=>{w.setModelMarkers(u,this._languageId,[]);let s=u.uri.toString(),f=this._listener[s];f&&(f.dispose(),delete this._listener[s])};this._disposables.push(w.onDidCreateModel(t)),this._disposables.push(w.onWillDisposeModel(a)),this._disposables.push(w.onDidChangeModelLanguage(u=>{a(u.model),t(u.model)})),this._disposables.push(r(u=>{w.getModels().forEach(s=>{s.getLanguageId()===this._languageId&&(a(s),t(s))})})),this._disposables.push({dispose:()=>{w.getModels().forEach(a);for(let u in this._listener)this._listener[u].dispose()}}),w.getModels().forEach(t)}dispose(){this._disposables.forEach(n=>n&&n.dispose()),this._disposables.length=0}_doValidate(n,i){this._worker(n).then(r=>r.doValidation(n.toString())).then(r=>{const t=r.map(u=>it(n,u));let a=w.getModel(n);a&&a.getLanguageId()===i&&w.setModelMarkers(a,i,t)}).then(void 0,r=>{console.error(r)})}}function rt(e){switch(e){case A.Error:return R.Error;case A.Warning:return R.Warning;case A.Information:return R.Info;case A.Hint:return R.Hint;default:return R.Info}}function it(e,n){let i=typeof n.code=="number"?String(n.code):n.code;return{severity:rt(n.severity),startLineNumber:n.range.start.line+1,startColumn:n.range.start.character+1,endLineNumber:n.range.end.line+1,endColumn:n.range.end.character+1,message:n.message,code:i,source:n.source}}class mt{constructor(n,i){this._worker=n,this._triggerCharacters=i}get triggerCharacters(){return this._triggerCharacters}provideCompletionItems(n,i,r,t){const a=n.uri;return this._worker(a).then(u=>u.doComplete(a.toString(),k(i))).then(u=>{if(!u)return;const s=n.getWordUntilPosition(i),f=new Ge(i.lineNumber,s.startColumn,i.lineNumber,s.endColumn),l=u.items.map(d=>{const g={label:d.label,insertText:d.insertText||d.label,sortText:d.sortText,filterText:d.filterText,documentation:d.documentation,detail:d.detail,command:ut(d.command),range:f,kind:ot(d.kind)};return d.textEdit&&(at(d.textEdit)?g.range={insert:v(d.textEdit.insert),replace:v(d.textEdit.replace)}:g.range=v(d.textEdit.range),g.insertText=d.textEdit.newText),d.additionalTextEdits&&(g.additionalTextEdits=d.additionalTextEdits.map(C)),d.insertTextFormat===J.Snippet&&(g.insertTextRules=x.CompletionItemInsertTextRule.InsertAsSnippet),g});return{isIncomplete:u.isIncomplete,suggestions:l}})}}function k(e){if(e)return{character:e.column-1,line:e.lineNumber-1}}function Ye(e){if(e)return{start:{line:e.startLineNumber-1,character:e.startColumn-1},end:{line:e.endLineNumber-1,character:e.endColumn-1}}}function v(e){if(e)return new Ge(e.start.line+1,e.start.character+1,e.end.line+1,e.end.character+1)}function at(e){return typeof e.insert<"u"&&typeof e.replace<"u"}function ot(e){const n=x.CompletionItemKind;switch(e){case p.Text:return n.Text;case p.Method:return n.Method;case p.Function:return n.Function;case p.Constructor:return n.Constructor;case p.Field:return n.Field;case p.Variable:return n.Variable;case p.Class:return n.Class;case p.Interface:return n.Interface;case p.Module:return n.Module;case p.Property:return n.Property;case p.Unit:return n.Unit;case p.Value:return n.Value;case p.Enum:return n.Enum;case p.Keyword:return n.Keyword;case p.Snippet:return n.Snippet;case p.Color:return n.Color;case p.File:return n.File;case p.Reference:return n.Reference}return n.Property}function C(e){if(e)return{range:v(e.range),text:e.newText}}function ut(e){return e&&e.command==="editor.action.triggerSuggest"?{id:e.command,title:e.title,arguments:e.arguments}:void 0}class vt{constructor(n){this._worker=n}provideHover(n,i,r){let t=n.uri;return this._worker(t).then(a=>a.doHover(t.toString(),k(i))).then(a=>{if(a)return{range:v(a.range),contents:ct(a.contents)}})}}function st(e){return e&&typeof e=="object"&&typeof e.kind=="string"}function Qe(e){return typeof e=="string"?{value:e}:st(e)?e.kind==="plaintext"?{value:e.value.replace(/[\\`*_{}[\]()#+\-.!]/g,"\\$&")}:{value:e.value}:{value:"```"+e.language+`
4
4
  `+e.value+"\n```\n"}}function ct(e){if(e)return Array.isArray(e)?e.map(Qe):[Qe(e)]}class bt{constructor(n){this._worker=n}provideDocumentHighlights(n,i,r){const t=n.uri;return this._worker(t).then(a=>a.findDocumentHighlights(t.toString(),k(i))).then(a=>{if(a)return a.map(u=>({range:v(u.range),kind:dt(u.kind)}))})}}function dt(e){switch(e){case D.Read:return x.DocumentHighlightKind.Read;case D.Write:return x.DocumentHighlightKind.Write;case D.Text:return x.DocumentHighlightKind.Text}return x.DocumentHighlightKind.Text}class _t{constructor(n){this._worker=n}provideDefinition(n,i,r){const t=n.uri;return this._worker(t).then(a=>a.findDefinition(t.toString(),k(i))).then(a=>{if(a)return[Ze(a)]})}}function Ze(e){return{uri:Je.parse(e.uri),range:v(e.range)}}class xt{constructor(n){this._worker=n}provideReferences(n,i,r,t){const a=n.uri;return this._worker(a).then(u=>u.findReferences(a.toString(),k(i))).then(u=>{if(u)return u.map(Ze)})}}class wt{constructor(n){this._worker=n}provideRenameEdits(n,i,r,t){const a=n.uri;return this._worker(a).then(u=>u.doRename(a.toString(),k(i),r)).then(u=>ft(u))}}function ft(e){if(!e||!e.changes)return;let n=[];for(let i in e.changes){const r=Je.parse(i);for(let t of e.changes[i])n.push({resource:r,versionId:void 0,textEdit:{range:v(t.range),text:t.newText}})}return{edits:n}}class kt{constructor(n){this._worker=n}provideDocumentSymbols(n,i){const r=n.uri;return this._worker(r).then(t=>t.findDocumentSymbols(r.toString())).then(t=>{if(t)return t.map(a=>lt(a)?Te(a):{name:a.name,detail:"",containerName:a.containerName,kind:Ke(a.kind),range:v(a.location.range),selectionRange:v(a.location.range),tags:[]})})}}function lt(e){return"children"in e}function Te(e){return{name:e.name,detail:e.detail??"",kind:Ke(e.kind),range:v(e.range),selectionRange:v(e.selectionRange),tags:e.tags??[],children:(e.children??[]).map(n=>Te(n))}}function Ke(e){let n=x.SymbolKind;switch(e){case m.File:return n.File;case m.Module:return n.Module;case m.Namespace:return n.Namespace;case m.Package:return n.Package;case m.Class:return n.Class;case m.Method:return n.Method;case m.Property:return n.Property;case m.Field:return n.Field;case m.Constructor:return n.Constructor;case m.Enum:return n.Enum;case m.Interface:return n.Interface;case m.Function:return n.Function;case m.Variable:return n.Variable;case m.Constant:return n.Constant;case m.String:return n.String;case m.Number:return n.Number;case m.Boolean:return n.Boolean;case m.Array:return n.Array}return n.Function}class At{constructor(n){this._worker=n}provideLinks(n,i){const r=n.uri;return this._worker(r).then(t=>t.findDocumentLinks(r.toString())).then(t=>{if(t)return{links:t.map(a=>({range:v(a.range),url:a.target}))}})}}class Et{constructor(n){this._worker=n}provideDocumentFormattingEdits(n,i,r){const t=n.uri;return this._worker(t).then(a=>a.format(t.toString(),null,et(i)).then(u=>{if(!(!u||u.length===0))return u.map(C)}))}}class Lt{constructor(n){this._worker=n,this.canFormatMultipleRanges=!1}provideDocumentRangeFormattingEdits(n,i,r,t){const a=n.uri;return this._worker(a).then(u=>u.format(a.toString(),Ye(i),et(r)).then(s=>{if(!(!s||s.length===0))return s.map(C)}))}}function et(e){return{tabSize:e.tabSize,insertSpaces:e.insertSpaces}}class It{constructor(n){this._worker=n}provideDocumentColors(n,i){const r=n.uri;return this._worker(r).then(t=>t.findDocumentColors(r.toString())).then(t=>{if(t)return t.map(a=>({color:a.color,range:v(a.range)}))})}provideColorPresentations(n,i,r){const t=n.uri;return this._worker(t).then(a=>a.getColorPresentations(t.toString(),i.color,Ye(i.range))).then(a=>{if(a)return a.map(u=>{let s={label:u.label};return u.textEdit&&(s.textEdit=C(u.textEdit)),u.additionalTextEdits&&(s.additionalTextEdits=u.additionalTextEdits.map(C)),s})})}}class Rt{constructor(n){this._worker=n}provideFoldingRanges(n,i,r){const t=n.uri;return this._worker(t).then(a=>a.getFoldingRanges(t.toString(),i)).then(a=>{if(a)return a.map(u=>{const s={start:u.startLine+1,end:u.endLine+1};return typeof u.kind<"u"&&(s.kind=gt(u.kind)),s})})}}function gt(e){switch(e){case M.Comment:return x.FoldingRangeKind.Comment;case M.Imports:return x.FoldingRangeKind.Imports;case M.Region:return x.FoldingRangeKind.Region}}class Mt{constructor(n){this._worker=n}provideSelectionRanges(n,i,r){const t=n.uri;return this._worker(t).then(a=>a.getSelectionRanges(t.toString(),i.map(k))).then(a=>{if(a)return a.map(u=>{const s=[];for(;u;)s.push({range:v(u.range)}),u=u.parent;return s})})}}export{mt as C,_t as D,Rt as F,vt as H,xt as R,Mt as S,pt as a,It as b,Et as c,bt as d,At as e,Lt as f,kt as g,wt as h,k as i,Ye as j,C as k,v as t};
@@ -1,4 +1,4 @@
1
- import{I as le}from"./BGX6W-wu.js";import{p as he}from"./GETqdV-9.js";import{Y as $e,b0 as fe,aZ as ge,U as ue,V as ye,a_ as xe,b as h,W as J,ay as w,aW as me,X as P,bh as pe,b4 as be,r as we,z as B,q as ke,O as ve,aM as Ce}from"./Bc6DihnT.js";import{p as Ee}from"./Cv_J2c72.js";var m={NORMAL:0,REVERSE:1,HIGHLIGHT:2,MERGE:3,CHERRY_PICK:4},Be=ve.gitGraph,S=h(()=>ke({...Be,...J().gitGraph}),"getConfig"),d=new le(()=>{const e=S(),r=e.mainBranchName,t=e.mainBranchOrder;return{mainBranchName:r,commits:new Map,head:null,branchConfig:new Map([[r,{name:r,order:t}]]),branches:new Map([[r,null]]),currBranch:r,direction:"LR",seq:0,options:{}}});function Y(){return Ce({length:7})}h(Y,"getID");function te(e,r){const t=Object.create(null);return e.reduce((s,o)=>{const i=r(o);return t[i]||(t[i]=!0,s.push(o)),s},[])}h(te,"uniqBy");var Te=h(function(e){d.records.direction=e},"setDirection"),Le=h(function(e){w.debug("options str",e),e=e?.trim(),e=e||"{}";try{d.records.options=JSON.parse(e)}catch(r){w.error("error while parsing gitGraph options",r.message)}},"setOptions"),Me=h(function(){return d.records.options},"getOptions"),Re=h(function(e){let r=e.msg,t=e.id;const s=e.type;let o=e.tags;w.info("commit",r,t,s,o),w.debug("Entering commit:",r,t,s,o);const i=S();t=B.sanitizeText(t,i),r=B.sanitizeText(r,i),o=o?.map(a=>B.sanitizeText(a,i));const n={id:t||d.records.seq+"-"+Y(),message:r,seq:d.records.seq++,type:s??m.NORMAL,tags:o??[],parents:d.records.head==null?[]:[d.records.head.id],branch:d.records.currBranch};d.records.head=n,w.info("main branch",i.mainBranchName),d.records.commits.has(n.id)&&w.warn(`Commit ID ${n.id} already exists`),d.records.commits.set(n.id,n),d.records.branches.set(d.records.currBranch,n.id),w.debug("in pushCommit "+n.id)},"commit"),Ie=h(function(e){let r=e.name;const t=e.order;if(r=B.sanitizeText(r,S()),d.records.branches.has(r))throw new Error(`Trying to create an existing branch. (Help: Either use a new name if you want create a new branch or try using "checkout ${r}")`);d.records.branches.set(r,d.records.head!=null?d.records.head.id:null),d.records.branchConfig.set(r,{name:r,order:t}),ae(r),w.debug("in createBranch")},"branch"),Oe=h(e=>{let r=e.branch,t=e.id;const s=e.type,o=e.tags,i=S();r=B.sanitizeText(r,i),t&&(t=B.sanitizeText(t,i));const n=d.records.branches.get(d.records.currBranch),a=d.records.branches.get(r),l=n?d.records.commits.get(n):void 0,f=a?d.records.commits.get(a):void 0;if(l&&f&&l.branch===r)throw new Error(`Cannot merge branch '${r}' into itself.`);if(d.records.currBranch===r){const c=new Error('Incorrect usage of "merge". Cannot merge a branch to itself');throw c.hash={text:`merge ${r}`,token:`merge ${r}`,expected:["branch abc"]},c}if(l===void 0||!l){const c=new Error(`Incorrect usage of "merge". Current branch (${d.records.currBranch})has no commits`);throw c.hash={text:`merge ${r}`,token:`merge ${r}`,expected:["commit"]},c}if(!d.records.branches.has(r)){const c=new Error('Incorrect usage of "merge". Branch to be merged ('+r+") does not exist");throw c.hash={text:`merge ${r}`,token:`merge ${r}`,expected:[`branch ${r}`]},c}if(f===void 0||!f){const c=new Error('Incorrect usage of "merge". Branch to be merged ('+r+") has no commits");throw c.hash={text:`merge ${r}`,token:`merge ${r}`,expected:['"commit"']},c}if(l===f){const c=new Error('Incorrect usage of "merge". Both branches have same head');throw c.hash={text:`merge ${r}`,token:`merge ${r}`,expected:["branch abc"]},c}if(t&&d.records.commits.has(t)){const c=new Error('Incorrect usage of "merge". Commit with id:'+t+" already exists, use different custom id");throw c.hash={text:`merge ${r} ${t} ${s} ${o?.join(" ")}`,token:`merge ${r} ${t} ${s} ${o?.join(" ")}`,expected:[`merge ${r} ${t}_UNIQUE ${s} ${o?.join(" ")}`]},c}const g=a||"",$={id:t||`${d.records.seq}-${Y()}`,message:`merged branch ${r} into ${d.records.currBranch}`,seq:d.records.seq++,parents:d.records.head==null?[]:[d.records.head.id,g],branch:d.records.currBranch,type:m.MERGE,customType:s,customId:!!t,tags:o??[]};d.records.head=$,d.records.commits.set($.id,$),d.records.branches.set(d.records.currBranch,$.id),w.debug(d.records.branches),w.debug("in mergeBranch")},"merge"),_e=h(function(e){let r=e.id,t=e.targetId,s=e.tags,o=e.parent;w.debug("Entering cherryPick:",r,t,s);const i=S();if(r=B.sanitizeText(r,i),t=B.sanitizeText(t,i),s=s?.map(l=>B.sanitizeText(l,i)),o=B.sanitizeText(o,i),!r||!d.records.commits.has(r)){const l=new Error('Incorrect usage of "cherryPick". Source commit id should exist and provided');throw l.hash={text:`cherryPick ${r} ${t}`,token:`cherryPick ${r} ${t}`,expected:["cherry-pick abc"]},l}const n=d.records.commits.get(r);if(n===void 0||!n)throw new Error('Incorrect usage of "cherryPick". Source commit id should exist and provided');if(o&&!(Array.isArray(n.parents)&&n.parents.includes(o)))throw new Error("Invalid operation: The specified parent commit is not an immediate parent of the cherry-picked commit.");const a=n.branch;if(n.type===m.MERGE&&!o)throw new Error("Incorrect usage of cherry-pick: If the source commit is a merge commit, an immediate parent commit must be specified.");if(!t||!d.records.commits.has(t)){if(a===d.records.currBranch){const $=new Error('Incorrect usage of "cherryPick". Source commit is already on current branch');throw $.hash={text:`cherryPick ${r} ${t}`,token:`cherryPick ${r} ${t}`,expected:["cherry-pick abc"]},$}const l=d.records.branches.get(d.records.currBranch);if(l===void 0||!l){const $=new Error(`Incorrect usage of "cherry-pick". Current branch (${d.records.currBranch})has no commits`);throw $.hash={text:`cherryPick ${r} ${t}`,token:`cherryPick ${r} ${t}`,expected:["cherry-pick abc"]},$}const f=d.records.commits.get(l);if(f===void 0||!f){const $=new Error(`Incorrect usage of "cherry-pick". Current branch (${d.records.currBranch})has no commits`);throw $.hash={text:`cherryPick ${r} ${t}`,token:`cherryPick ${r} ${t}`,expected:["cherry-pick abc"]},$}const g={id:d.records.seq+"-"+Y(),message:`cherry-picked ${n?.message} into ${d.records.currBranch}`,seq:d.records.seq++,parents:d.records.head==null?[]:[d.records.head.id,n.id],branch:d.records.currBranch,type:m.CHERRY_PICK,tags:s?s.filter(Boolean):[`cherry-pick:${n.id}${n.type===m.MERGE?`|parent:${o}`:""}`]};d.records.head=g,d.records.commits.set(g.id,g),d.records.branches.set(d.records.currBranch,g.id),w.debug(d.records.branches),w.debug("in cherryPick")}},"cherryPick"),ae=h(function(e){if(e=B.sanitizeText(e,S()),d.records.branches.has(e)){d.records.currBranch=e;const r=d.records.branches.get(d.records.currBranch);r===void 0||!r?d.records.head=null:d.records.head=d.records.commits.get(r)??null}else{const r=new Error(`Trying to checkout branch which is not yet created. (Help try using "branch ${e}")`);throw r.hash={text:`checkout ${e}`,token:`checkout ${e}`,expected:[`branch ${e}`]},r}},"checkout");function V(e,r,t){const s=e.indexOf(r);s===-1?e.push(t):e.splice(s,1,t)}h(V,"upsert");function Q(e){const r=e.reduce((o,i)=>o.seq>i.seq?o:i,e[0]);let t="";e.forEach(function(o){o===r?t+=" *":t+=" |"});const s=[t,r.id,r.seq];for(const o in d.records.branches)d.records.branches.get(o)===r.id&&s.push(o);if(w.debug(s.join(" ")),r.parents&&r.parents.length==2&&r.parents[0]&&r.parents[1]){const o=d.records.commits.get(r.parents[0]);V(e,r,o),r.parents[1]&&e.push(d.records.commits.get(r.parents[1]))}else{if(r.parents.length==0)return;if(r.parents[0]){const o=d.records.commits.get(r.parents[0]);V(e,r,o)}}e=te(e,o=>o.id),Q(e)}h(Q,"prettyPrintCommitHistory");var Ge=h(function(){w.debug(d.records.commits);const e=ne()[0];Q([e])},"prettyPrint"),He=h(function(){d.reset(),we()},"clear"),Se=h(function(){return[...d.records.branchConfig.values()].map((r,t)=>r.order!==null&&r.order!==void 0?r:{...r,order:parseFloat(`0.${t}`)}).sort((r,t)=>(r.order??0)-(t.order??0)).map(({name:r})=>({name:r}))},"getBranchesAsObjArray"),Ae=h(function(){return d.records.branches},"getBranches"),We=h(function(){return d.records.commits},"getCommits"),ne=h(function(){const e=[...d.records.commits.values()];return e.forEach(function(r){w.debug(r.id)}),e.sort((r,t)=>r.seq-t.seq),e},"getCommitsArray"),De=h(function(){return d.records.currBranch},"getCurrentBranch"),qe=h(function(){return d.records.direction},"getDirection"),Pe=h(function(){return d.records.head},"getHead"),se={commitType:m,getConfig:S,setDirection:Te,setOptions:Le,getOptions:Me,commit:Re,branch:Ie,merge:Oe,cherryPick:_e,checkout:ae,prettyPrint:Ge,clear:He,getBranchesAsObjArray:Se,getBranches:Ae,getCommits:We,getCommitsArray:ne,getCurrentBranch:De,getDirection:qe,getHead:Pe,setAccTitle:xe,getAccTitle:ye,getAccDescription:ue,setAccDescription:ge,setDiagramTitle:fe,getDiagramTitle:$e},Ne=h((e,r)=>{he(e,r),e.dir&&r.setDirection(e.dir);for(const t of e.statements)Fe(t,r)},"populate"),Fe=h((e,r)=>{const s={Commit:h(o=>r.commit(ze(o)),"Commit"),Branch:h(o=>r.branch(Ye(o)),"Branch"),Merge:h(o=>r.merge(je(o)),"Merge"),Checkout:h(o=>r.checkout(Ue(o)),"Checkout"),CherryPicking:h(o=>r.cherryPick(Ke(o)),"CherryPicking")}[e.$type];s?s(e):w.error(`Unknown statement type: ${e.$type}`)},"parseStatement"),ze=h(e=>({id:e.id,msg:e.message??"",type:e.type!==void 0?m[e.type]:m.NORMAL,tags:e.tags??void 0}),"parseCommit"),Ye=h(e=>({name:e.name,order:e.order??0}),"parseBranch"),je=h(e=>({branch:e.branch,id:e.id??"",type:e.type!==void 0?m[e.type]:void 0,tags:e.tags??void 0}),"parseMerge"),Ue=h(e=>e.branch,"parseCheckout"),Ke=h(e=>({id:e.id,targetId:"",tags:e.tags?.length===0?void 0:e.tags,parent:e.parent}),"parseCherryPicking"),Ve={parse:h(async e=>{const r=await Ee("gitGraph",e);w.debug(r),Ne(r,se)},"parse")},O=10,_=40,L=4,R=2,G=8,j=new Set(["redux","redux-dark","redux-color","redux-dark-color"]),X=12,Z=new Set(["redux-color","redux-dark-color"]),Xe=new Set(["dark","redux-dark","redux-dark-color","neo-dark"]),H=h((e,r,t=!1)=>t&&e>0?(e-1)%(r-1)+1:e%r,"calcColorIndex"),C=new Map,E=new Map,F=30,D=new Map,z=[],I=0,y="LR",Je=h(()=>{C.clear(),E.clear(),D.clear(),I=0,z=[],y="LR"},"clear"),oe=h(e=>{const r=document.createElementNS("http://www.w3.org/2000/svg","text");return(typeof e=="string"?e.split(/\\n|\n|<br\s*\/?>/gi):e).forEach(s=>{const o=document.createElementNS("http://www.w3.org/2000/svg","tspan");o.setAttributeNS("http://www.w3.org/XML/1998/namespace","xml:space","preserve"),o.setAttribute("dy","1em"),o.setAttribute("x","0"),o.setAttribute("class","row"),o.textContent=s.trim(),r.appendChild(o)}),r},"drawText"),ce=h(e=>{let r,t,s;return y==="BT"?(t=h((o,i)=>o<=i,"comparisonFunc"),s=1/0):(t=h((o,i)=>o>=i,"comparisonFunc"),s=0),e.forEach(o=>{const i=y==="TB"||y=="BT"?E.get(o)?.y:E.get(o)?.x;i!==void 0&&t(i,s)&&(r=o,s=i)}),r},"findClosestParent"),Qe=h(e=>{let r="",t=1/0;return e.forEach(s=>{const o=E.get(s).y;o<=t&&(r=s,t=o)}),r||void 0},"findClosestParentBT"),Ze=h((e,r,t)=>{let s=t,o=t;const i=[];e.forEach(n=>{const a=r.get(n);if(!a)throw new Error(`Commit not found for key ${n}`);a.parents.length?(s=rr(a),o=Math.max(s,o)):i.push(a),tr(a,s)}),s=o,i.forEach(n=>{ar(n,s,t)}),e.forEach(n=>{const a=r.get(n);if(a?.parents.length){const l=Qe(a.parents);s=E.get(l).y-_,s<=o&&(o=s);const f=C.get(a.branch).pos,g=s-O;E.set(a.id,{x:f,y:g})}})},"setParallelBTPos"),er=h(e=>{const r=ce(e.parents.filter(s=>s!==null));if(!r)throw new Error(`Closest parent not found for commit ${e.id}`);const t=E.get(r)?.y;if(t===void 0)throw new Error(`Closest parent position not found for commit ${e.id}`);return t},"findClosestParentPos"),rr=h(e=>er(e)+_,"calculateCommitPosition"),tr=h((e,r)=>{const t=C.get(e.branch);if(!t)throw new Error(`Branch not found for commit ${e.id}`);const s=t.pos,o=r+O;return E.set(e.id,{x:s,y:o}),{x:s,y:o}},"setCommitPosition"),ar=h((e,r,t)=>{const s=C.get(e.branch);if(!s)throw new Error(`Branch not found for commit ${e.id}`);const o=r+t,i=s.pos;E.set(e.id,{x:i,y:o})},"setRootPosition"),nr=h((e,r,t,s,o,i)=>{const{theme:n}=P(),a=j.has(n??""),l=Z.has(n??""),f=Xe.has(n??"");if(i===m.HIGHLIGHT)e.append("rect").attr("x",t.x-10+(a?3:0)).attr("y",t.y-10+(a?3:0)).attr("width",a?14:20).attr("height",a?14:20).attr("class",`commit ${r.id} commit-highlight${H(o,G,l)} ${s}-outer`),e.append("rect").attr("x",t.x-6+(a?2:0)).attr("y",t.y-6+(a?2:0)).attr("width",a?8:12).attr("height",a?8:12).attr("class",`commit ${r.id} commit${H(o,G,l)} ${s}-inner`);else if(i===m.CHERRY_PICK)e.append("circle").attr("cx",t.x).attr("cy",t.y).attr("r",a?7:10).attr("class",`commit ${r.id} ${s}`),e.append("circle").attr("cx",t.x-3).attr("cy",t.y+2).attr("r",a?2.5:2.75).attr("fill",f?"#000000":"#fff").attr("class",`commit ${r.id} ${s}`),e.append("circle").attr("cx",t.x+3).attr("cy",t.y+2).attr("r",a?2.5:2.75).attr("fill",f?"#000000":"#fff").attr("class",`commit ${r.id} ${s}`),e.append("line").attr("x1",t.x+3).attr("y1",t.y+1).attr("x2",t.x).attr("y2",t.y-5).attr("stroke",f?"#000000":"#fff").attr("class",`commit ${r.id} ${s}`),e.append("line").attr("x1",t.x-3).attr("y1",t.y+1).attr("x2",t.x).attr("y2",t.y-5).attr("stroke",f?"#000000":"#fff").attr("class",`commit ${r.id} ${s}`);else{const g=e.append("circle");if(g.attr("cx",t.x),g.attr("cy",t.y),g.attr("r",a?7:10),g.attr("class",`commit ${r.id} commit${H(o,G,l)}`),i===m.MERGE){const $=e.append("circle");$.attr("cx",t.x),$.attr("cy",t.y),$.attr("r",a?5:6),$.attr("class",`commit ${s} ${r.id} commit${H(o,G,l)}`)}if(i===m.REVERSE){const $=e.append("path"),c=a?4:5;$.attr("d",`M ${t.x-c},${t.y-c}L${t.x+c},${t.y+c}M${t.x-c},${t.y+c}L${t.x+c},${t.y-c}`).attr("class",`commit ${s} ${r.id} commit${H(o,G,l)}`)}}},"drawCommitBullet"),sr=h((e,r,t,s,o)=>{if(r.type!==m.CHERRY_PICK&&(r.customId&&r.type===m.MERGE||r.type!==m.MERGE)&&o.showCommitLabel){const i=e.append("g"),n=i.insert("rect").attr("class","commit-label-bkg"),a=i.append("text").attr("x",s).attr("y",t.y+25).attr("class","commit-label").text(r.id),l=a.node()?.getBBox();if(l&&(n.attr("x",t.posWithOffset-l.width/2-R).attr("y",t.y+13.5).attr("width",l.width+2*R).attr("height",l.height+2*R),y==="TB"||y==="BT"?(n.attr("x",t.x-(l.width+4*L+5)).attr("y",t.y-12),a.attr("x",t.x-(l.width+4*L)).attr("y",t.y+l.height-12)):a.attr("x",t.posWithOffset-l.width/2),o.rotateCommitLabel))if(y==="TB"||y==="BT")a.attr("transform","rotate(-45, "+t.x+", "+t.y+")"),n.attr("transform","rotate(-45, "+t.x+", "+t.y+")");else{const f=-7.5-(l.width+10)/25*9.5,g=10+l.width/25*8.5;i.attr("transform","translate("+f+", "+g+") rotate(-45, "+s+", "+t.y+")")}}},"drawCommitLabel"),or=h((e,r,t,s)=>{if(r.tags.length>0){let o=0,i=0,n=0;const a=[];for(const l of r.tags.reverse()){const f=e.insert("polygon"),g=e.append("circle"),$=e.append("text").attr("y",t.y-16-o).attr("class","tag-label").text(l),c=$.node()?.getBBox();if(!c)throw new Error("Tag bbox not found");i=Math.max(i,c.width),n=Math.max(n,c.height),$.attr("x",t.posWithOffset-c.width/2),a.push({tag:$,hole:g,rect:f,yOffset:o}),o+=20}for(const{tag:l,hole:f,rect:g,yOffset:$}of a){const c=n/2,x=t.y-19.2-$;if(g.attr("class","tag-label-bkg").attr("points",`
1
+ import{I as le}from"./bKyElw3h.js";import{p as he}from"./D7dPbXji.js";import{Y as $e,b0 as fe,aZ as ge,U as ue,V as ye,a_ as xe,b as h,W as J,ay as w,aW as me,X as P,bh as pe,b4 as be,r as we,z as B,q as ke,O as ve,aM as Ce}from"./DOKxXiSI.js";import{p as Ee}from"./B-7vt8Nv.js";var m={NORMAL:0,REVERSE:1,HIGHLIGHT:2,MERGE:3,CHERRY_PICK:4},Be=ve.gitGraph,S=h(()=>ke({...Be,...J().gitGraph}),"getConfig"),d=new le(()=>{const e=S(),r=e.mainBranchName,t=e.mainBranchOrder;return{mainBranchName:r,commits:new Map,head:null,branchConfig:new Map([[r,{name:r,order:t}]]),branches:new Map([[r,null]]),currBranch:r,direction:"LR",seq:0,options:{}}});function Y(){return Ce({length:7})}h(Y,"getID");function te(e,r){const t=Object.create(null);return e.reduce((s,o)=>{const i=r(o);return t[i]||(t[i]=!0,s.push(o)),s},[])}h(te,"uniqBy");var Te=h(function(e){d.records.direction=e},"setDirection"),Le=h(function(e){w.debug("options str",e),e=e?.trim(),e=e||"{}";try{d.records.options=JSON.parse(e)}catch(r){w.error("error while parsing gitGraph options",r.message)}},"setOptions"),Me=h(function(){return d.records.options},"getOptions"),Re=h(function(e){let r=e.msg,t=e.id;const s=e.type;let o=e.tags;w.info("commit",r,t,s,o),w.debug("Entering commit:",r,t,s,o);const i=S();t=B.sanitizeText(t,i),r=B.sanitizeText(r,i),o=o?.map(a=>B.sanitizeText(a,i));const n={id:t||d.records.seq+"-"+Y(),message:r,seq:d.records.seq++,type:s??m.NORMAL,tags:o??[],parents:d.records.head==null?[]:[d.records.head.id],branch:d.records.currBranch};d.records.head=n,w.info("main branch",i.mainBranchName),d.records.commits.has(n.id)&&w.warn(`Commit ID ${n.id} already exists`),d.records.commits.set(n.id,n),d.records.branches.set(d.records.currBranch,n.id),w.debug("in pushCommit "+n.id)},"commit"),Ie=h(function(e){let r=e.name;const t=e.order;if(r=B.sanitizeText(r,S()),d.records.branches.has(r))throw new Error(`Trying to create an existing branch. (Help: Either use a new name if you want create a new branch or try using "checkout ${r}")`);d.records.branches.set(r,d.records.head!=null?d.records.head.id:null),d.records.branchConfig.set(r,{name:r,order:t}),ae(r),w.debug("in createBranch")},"branch"),Oe=h(e=>{let r=e.branch,t=e.id;const s=e.type,o=e.tags,i=S();r=B.sanitizeText(r,i),t&&(t=B.sanitizeText(t,i));const n=d.records.branches.get(d.records.currBranch),a=d.records.branches.get(r),l=n?d.records.commits.get(n):void 0,f=a?d.records.commits.get(a):void 0;if(l&&f&&l.branch===r)throw new Error(`Cannot merge branch '${r}' into itself.`);if(d.records.currBranch===r){const c=new Error('Incorrect usage of "merge". Cannot merge a branch to itself');throw c.hash={text:`merge ${r}`,token:`merge ${r}`,expected:["branch abc"]},c}if(l===void 0||!l){const c=new Error(`Incorrect usage of "merge". Current branch (${d.records.currBranch})has no commits`);throw c.hash={text:`merge ${r}`,token:`merge ${r}`,expected:["commit"]},c}if(!d.records.branches.has(r)){const c=new Error('Incorrect usage of "merge". Branch to be merged ('+r+") does not exist");throw c.hash={text:`merge ${r}`,token:`merge ${r}`,expected:[`branch ${r}`]},c}if(f===void 0||!f){const c=new Error('Incorrect usage of "merge". Branch to be merged ('+r+") has no commits");throw c.hash={text:`merge ${r}`,token:`merge ${r}`,expected:['"commit"']},c}if(l===f){const c=new Error('Incorrect usage of "merge". Both branches have same head');throw c.hash={text:`merge ${r}`,token:`merge ${r}`,expected:["branch abc"]},c}if(t&&d.records.commits.has(t)){const c=new Error('Incorrect usage of "merge". Commit with id:'+t+" already exists, use different custom id");throw c.hash={text:`merge ${r} ${t} ${s} ${o?.join(" ")}`,token:`merge ${r} ${t} ${s} ${o?.join(" ")}`,expected:[`merge ${r} ${t}_UNIQUE ${s} ${o?.join(" ")}`]},c}const g=a||"",$={id:t||`${d.records.seq}-${Y()}`,message:`merged branch ${r} into ${d.records.currBranch}`,seq:d.records.seq++,parents:d.records.head==null?[]:[d.records.head.id,g],branch:d.records.currBranch,type:m.MERGE,customType:s,customId:!!t,tags:o??[]};d.records.head=$,d.records.commits.set($.id,$),d.records.branches.set(d.records.currBranch,$.id),w.debug(d.records.branches),w.debug("in mergeBranch")},"merge"),_e=h(function(e){let r=e.id,t=e.targetId,s=e.tags,o=e.parent;w.debug("Entering cherryPick:",r,t,s);const i=S();if(r=B.sanitizeText(r,i),t=B.sanitizeText(t,i),s=s?.map(l=>B.sanitizeText(l,i)),o=B.sanitizeText(o,i),!r||!d.records.commits.has(r)){const l=new Error('Incorrect usage of "cherryPick". Source commit id should exist and provided');throw l.hash={text:`cherryPick ${r} ${t}`,token:`cherryPick ${r} ${t}`,expected:["cherry-pick abc"]},l}const n=d.records.commits.get(r);if(n===void 0||!n)throw new Error('Incorrect usage of "cherryPick". Source commit id should exist and provided');if(o&&!(Array.isArray(n.parents)&&n.parents.includes(o)))throw new Error("Invalid operation: The specified parent commit is not an immediate parent of the cherry-picked commit.");const a=n.branch;if(n.type===m.MERGE&&!o)throw new Error("Incorrect usage of cherry-pick: If the source commit is a merge commit, an immediate parent commit must be specified.");if(!t||!d.records.commits.has(t)){if(a===d.records.currBranch){const $=new Error('Incorrect usage of "cherryPick". Source commit is already on current branch');throw $.hash={text:`cherryPick ${r} ${t}`,token:`cherryPick ${r} ${t}`,expected:["cherry-pick abc"]},$}const l=d.records.branches.get(d.records.currBranch);if(l===void 0||!l){const $=new Error(`Incorrect usage of "cherry-pick". Current branch (${d.records.currBranch})has no commits`);throw $.hash={text:`cherryPick ${r} ${t}`,token:`cherryPick ${r} ${t}`,expected:["cherry-pick abc"]},$}const f=d.records.commits.get(l);if(f===void 0||!f){const $=new Error(`Incorrect usage of "cherry-pick". Current branch (${d.records.currBranch})has no commits`);throw $.hash={text:`cherryPick ${r} ${t}`,token:`cherryPick ${r} ${t}`,expected:["cherry-pick abc"]},$}const g={id:d.records.seq+"-"+Y(),message:`cherry-picked ${n?.message} into ${d.records.currBranch}`,seq:d.records.seq++,parents:d.records.head==null?[]:[d.records.head.id,n.id],branch:d.records.currBranch,type:m.CHERRY_PICK,tags:s?s.filter(Boolean):[`cherry-pick:${n.id}${n.type===m.MERGE?`|parent:${o}`:""}`]};d.records.head=g,d.records.commits.set(g.id,g),d.records.branches.set(d.records.currBranch,g.id),w.debug(d.records.branches),w.debug("in cherryPick")}},"cherryPick"),ae=h(function(e){if(e=B.sanitizeText(e,S()),d.records.branches.has(e)){d.records.currBranch=e;const r=d.records.branches.get(d.records.currBranch);r===void 0||!r?d.records.head=null:d.records.head=d.records.commits.get(r)??null}else{const r=new Error(`Trying to checkout branch which is not yet created. (Help try using "branch ${e}")`);throw r.hash={text:`checkout ${e}`,token:`checkout ${e}`,expected:[`branch ${e}`]},r}},"checkout");function V(e,r,t){const s=e.indexOf(r);s===-1?e.push(t):e.splice(s,1,t)}h(V,"upsert");function Q(e){const r=e.reduce((o,i)=>o.seq>i.seq?o:i,e[0]);let t="";e.forEach(function(o){o===r?t+=" *":t+=" |"});const s=[t,r.id,r.seq];for(const o in d.records.branches)d.records.branches.get(o)===r.id&&s.push(o);if(w.debug(s.join(" ")),r.parents&&r.parents.length==2&&r.parents[0]&&r.parents[1]){const o=d.records.commits.get(r.parents[0]);V(e,r,o),r.parents[1]&&e.push(d.records.commits.get(r.parents[1]))}else{if(r.parents.length==0)return;if(r.parents[0]){const o=d.records.commits.get(r.parents[0]);V(e,r,o)}}e=te(e,o=>o.id),Q(e)}h(Q,"prettyPrintCommitHistory");var Ge=h(function(){w.debug(d.records.commits);const e=ne()[0];Q([e])},"prettyPrint"),He=h(function(){d.reset(),we()},"clear"),Se=h(function(){return[...d.records.branchConfig.values()].map((r,t)=>r.order!==null&&r.order!==void 0?r:{...r,order:parseFloat(`0.${t}`)}).sort((r,t)=>(r.order??0)-(t.order??0)).map(({name:r})=>({name:r}))},"getBranchesAsObjArray"),Ae=h(function(){return d.records.branches},"getBranches"),We=h(function(){return d.records.commits},"getCommits"),ne=h(function(){const e=[...d.records.commits.values()];return e.forEach(function(r){w.debug(r.id)}),e.sort((r,t)=>r.seq-t.seq),e},"getCommitsArray"),De=h(function(){return d.records.currBranch},"getCurrentBranch"),qe=h(function(){return d.records.direction},"getDirection"),Pe=h(function(){return d.records.head},"getHead"),se={commitType:m,getConfig:S,setDirection:Te,setOptions:Le,getOptions:Me,commit:Re,branch:Ie,merge:Oe,cherryPick:_e,checkout:ae,prettyPrint:Ge,clear:He,getBranchesAsObjArray:Se,getBranches:Ae,getCommits:We,getCommitsArray:ne,getCurrentBranch:De,getDirection:qe,getHead:Pe,setAccTitle:xe,getAccTitle:ye,getAccDescription:ue,setAccDescription:ge,setDiagramTitle:fe,getDiagramTitle:$e},Ne=h((e,r)=>{he(e,r),e.dir&&r.setDirection(e.dir);for(const t of e.statements)Fe(t,r)},"populate"),Fe=h((e,r)=>{const s={Commit:h(o=>r.commit(ze(o)),"Commit"),Branch:h(o=>r.branch(Ye(o)),"Branch"),Merge:h(o=>r.merge(je(o)),"Merge"),Checkout:h(o=>r.checkout(Ue(o)),"Checkout"),CherryPicking:h(o=>r.cherryPick(Ke(o)),"CherryPicking")}[e.$type];s?s(e):w.error(`Unknown statement type: ${e.$type}`)},"parseStatement"),ze=h(e=>({id:e.id,msg:e.message??"",type:e.type!==void 0?m[e.type]:m.NORMAL,tags:e.tags??void 0}),"parseCommit"),Ye=h(e=>({name:e.name,order:e.order??0}),"parseBranch"),je=h(e=>({branch:e.branch,id:e.id??"",type:e.type!==void 0?m[e.type]:void 0,tags:e.tags??void 0}),"parseMerge"),Ue=h(e=>e.branch,"parseCheckout"),Ke=h(e=>({id:e.id,targetId:"",tags:e.tags?.length===0?void 0:e.tags,parent:e.parent}),"parseCherryPicking"),Ve={parse:h(async e=>{const r=await Ee("gitGraph",e);w.debug(r),Ne(r,se)},"parse")},O=10,_=40,L=4,R=2,G=8,j=new Set(["redux","redux-dark","redux-color","redux-dark-color"]),X=12,Z=new Set(["redux-color","redux-dark-color"]),Xe=new Set(["dark","redux-dark","redux-dark-color","neo-dark"]),H=h((e,r,t=!1)=>t&&e>0?(e-1)%(r-1)+1:e%r,"calcColorIndex"),C=new Map,E=new Map,F=30,D=new Map,z=[],I=0,y="LR",Je=h(()=>{C.clear(),E.clear(),D.clear(),I=0,z=[],y="LR"},"clear"),oe=h(e=>{const r=document.createElementNS("http://www.w3.org/2000/svg","text");return(typeof e=="string"?e.split(/\\n|\n|<br\s*\/?>/gi):e).forEach(s=>{const o=document.createElementNS("http://www.w3.org/2000/svg","tspan");o.setAttributeNS("http://www.w3.org/XML/1998/namespace","xml:space","preserve"),o.setAttribute("dy","1em"),o.setAttribute("x","0"),o.setAttribute("class","row"),o.textContent=s.trim(),r.appendChild(o)}),r},"drawText"),ce=h(e=>{let r,t,s;return y==="BT"?(t=h((o,i)=>o<=i,"comparisonFunc"),s=1/0):(t=h((o,i)=>o>=i,"comparisonFunc"),s=0),e.forEach(o=>{const i=y==="TB"||y=="BT"?E.get(o)?.y:E.get(o)?.x;i!==void 0&&t(i,s)&&(r=o,s=i)}),r},"findClosestParent"),Qe=h(e=>{let r="",t=1/0;return e.forEach(s=>{const o=E.get(s).y;o<=t&&(r=s,t=o)}),r||void 0},"findClosestParentBT"),Ze=h((e,r,t)=>{let s=t,o=t;const i=[];e.forEach(n=>{const a=r.get(n);if(!a)throw new Error(`Commit not found for key ${n}`);a.parents.length?(s=rr(a),o=Math.max(s,o)):i.push(a),tr(a,s)}),s=o,i.forEach(n=>{ar(n,s,t)}),e.forEach(n=>{const a=r.get(n);if(a?.parents.length){const l=Qe(a.parents);s=E.get(l).y-_,s<=o&&(o=s);const f=C.get(a.branch).pos,g=s-O;E.set(a.id,{x:f,y:g})}})},"setParallelBTPos"),er=h(e=>{const r=ce(e.parents.filter(s=>s!==null));if(!r)throw new Error(`Closest parent not found for commit ${e.id}`);const t=E.get(r)?.y;if(t===void 0)throw new Error(`Closest parent position not found for commit ${e.id}`);return t},"findClosestParentPos"),rr=h(e=>er(e)+_,"calculateCommitPosition"),tr=h((e,r)=>{const t=C.get(e.branch);if(!t)throw new Error(`Branch not found for commit ${e.id}`);const s=t.pos,o=r+O;return E.set(e.id,{x:s,y:o}),{x:s,y:o}},"setCommitPosition"),ar=h((e,r,t)=>{const s=C.get(e.branch);if(!s)throw new Error(`Branch not found for commit ${e.id}`);const o=r+t,i=s.pos;E.set(e.id,{x:i,y:o})},"setRootPosition"),nr=h((e,r,t,s,o,i)=>{const{theme:n}=P(),a=j.has(n??""),l=Z.has(n??""),f=Xe.has(n??"");if(i===m.HIGHLIGHT)e.append("rect").attr("x",t.x-10+(a?3:0)).attr("y",t.y-10+(a?3:0)).attr("width",a?14:20).attr("height",a?14:20).attr("class",`commit ${r.id} commit-highlight${H(o,G,l)} ${s}-outer`),e.append("rect").attr("x",t.x-6+(a?2:0)).attr("y",t.y-6+(a?2:0)).attr("width",a?8:12).attr("height",a?8:12).attr("class",`commit ${r.id} commit${H(o,G,l)} ${s}-inner`);else if(i===m.CHERRY_PICK)e.append("circle").attr("cx",t.x).attr("cy",t.y).attr("r",a?7:10).attr("class",`commit ${r.id} ${s}`),e.append("circle").attr("cx",t.x-3).attr("cy",t.y+2).attr("r",a?2.5:2.75).attr("fill",f?"#000000":"#fff").attr("class",`commit ${r.id} ${s}`),e.append("circle").attr("cx",t.x+3).attr("cy",t.y+2).attr("r",a?2.5:2.75).attr("fill",f?"#000000":"#fff").attr("class",`commit ${r.id} ${s}`),e.append("line").attr("x1",t.x+3).attr("y1",t.y+1).attr("x2",t.x).attr("y2",t.y-5).attr("stroke",f?"#000000":"#fff").attr("class",`commit ${r.id} ${s}`),e.append("line").attr("x1",t.x-3).attr("y1",t.y+1).attr("x2",t.x).attr("y2",t.y-5).attr("stroke",f?"#000000":"#fff").attr("class",`commit ${r.id} ${s}`);else{const g=e.append("circle");if(g.attr("cx",t.x),g.attr("cy",t.y),g.attr("r",a?7:10),g.attr("class",`commit ${r.id} commit${H(o,G,l)}`),i===m.MERGE){const $=e.append("circle");$.attr("cx",t.x),$.attr("cy",t.y),$.attr("r",a?5:6),$.attr("class",`commit ${s} ${r.id} commit${H(o,G,l)}`)}if(i===m.REVERSE){const $=e.append("path"),c=a?4:5;$.attr("d",`M ${t.x-c},${t.y-c}L${t.x+c},${t.y+c}M${t.x-c},${t.y+c}L${t.x+c},${t.y-c}`).attr("class",`commit ${s} ${r.id} commit${H(o,G,l)}`)}}},"drawCommitBullet"),sr=h((e,r,t,s,o)=>{if(r.type!==m.CHERRY_PICK&&(r.customId&&r.type===m.MERGE||r.type!==m.MERGE)&&o.showCommitLabel){const i=e.append("g"),n=i.insert("rect").attr("class","commit-label-bkg"),a=i.append("text").attr("x",s).attr("y",t.y+25).attr("class","commit-label").text(r.id),l=a.node()?.getBBox();if(l&&(n.attr("x",t.posWithOffset-l.width/2-R).attr("y",t.y+13.5).attr("width",l.width+2*R).attr("height",l.height+2*R),y==="TB"||y==="BT"?(n.attr("x",t.x-(l.width+4*L+5)).attr("y",t.y-12),a.attr("x",t.x-(l.width+4*L)).attr("y",t.y+l.height-12)):a.attr("x",t.posWithOffset-l.width/2),o.rotateCommitLabel))if(y==="TB"||y==="BT")a.attr("transform","rotate(-45, "+t.x+", "+t.y+")"),n.attr("transform","rotate(-45, "+t.x+", "+t.y+")");else{const f=-7.5-(l.width+10)/25*9.5,g=10+l.width/25*8.5;i.attr("transform","translate("+f+", "+g+") rotate(-45, "+s+", "+t.y+")")}}},"drawCommitLabel"),or=h((e,r,t,s)=>{if(r.tags.length>0){let o=0,i=0,n=0;const a=[];for(const l of r.tags.reverse()){const f=e.insert("polygon"),g=e.append("circle"),$=e.append("text").attr("y",t.y-16-o).attr("class","tag-label").text(l),c=$.node()?.getBBox();if(!c)throw new Error("Tag bbox not found");i=Math.max(i,c.width),n=Math.max(n,c.height),$.attr("x",t.posWithOffset-c.width/2),a.push({tag:$,hole:g,rect:f,yOffset:o}),o+=20}for(const{tag:l,hole:f,rect:g,yOffset:$}of a){const c=n/2,x=t.y-19.2-$;if(g.attr("class","tag-label-bkg").attr("points",`
2
2
  ${s-i/2-L/2},${x+R}
3
3
  ${s-i/2-L/2},${x-R}
4
4
  ${t.posWithOffset-i/2-L},${x-c-R}
@@ -1,4 +1,4 @@
1
- import{c as t,s as r}from"./CJ58g2zu.js";import{b as a}from"./Bc6DihnT.js";var s=a(e=>`${r(e)}
1
+ import{c as t,s as r}from"./BlEwAz4v.js";import{b as a}from"./DOKxXiSI.js";var s=a(e=>`${r(e)}
2
2
  .swimlane.cluster:not([data-color-id]) rect {
3
3
  stroke: ${e.clusterBorder} !important;
4
4
  }
@@ -0,0 +1 @@
1
+ import{t as lt,bq as u,by as ct,b as dt}from"./D9jYN6_J.js";import{bs as vt,ca as ft,aD as t,a5 as H,bS as ut,bA as D,bH as K,b_ as S,W as T,bn as gt,bV as P,c9 as x,aA as g,a7 as mt,ay as ht,bl as pt,bO as bt,aB as F}from"./DYhIMPy1.js";import{i as L}from"./7eL9Pgig.js";import{g as _t}from"./Bgw3O9rE.js";import{s as kt}from"./Cx31i8ng.js";import{f as X,s as c,g as R}from"./C_EpV6jU.js";import{b as wt}from"./BaIAhI85.js";import{t as j}from"./B4gIvcP2.js";import{A as xt}from"./B79pUPc3.js";import{s as Wt}from"./BAGVOK-j.js";function yt(W){const{itemCount:a,maxVisible:d,availableWidth:n,surface:s,overlap:b,overflowOverlap:v}=W;if(n<=0)return 0;const _=s-b,m=Math.min(a,Math.max(0,d)),I=i=>i===0?0:s+(i-1)*_;if(a<=m&&I(a)<=n)return a;for(let i=m;i>=0;i-=1){const A=a-i;if(I(i)+(A>0?W.measureOverflowText(A)-(i>0?v:0):0)<=n)return i}return 0}function It(W,a=n=>requestAnimationFrame(n),d=n=>cancelAnimationFrame(n)){let n,s;return{set(b){if(n=b,s!==void 0)return;let v=!1;const _=a(()=>{v=!0,s=void 0;const m=n;n=void 0,W(m)});v||(s=_)},cancel(){s!==void 0&&(d(s),s=void 0),n=void 0}}}const At=20,Ct=12;let O,J;const Q=new Map;var Tt=F('<span data-agent-avatar-stack-item=""><!></span>'),Ot=F('<span class="agent-avatar-stack-track svelte-1nk9fhe"></span>'),Vt=F('<span class="agent-avatar-stack-overflow svelte-1nk9fhe" data-agent-avatar-overflow=""> </span>'),Mt=F('<span data-agent-avatar-stack="" data-agent-avatar-stack-overlap="later-on-top"><!> <!></span>');function St(W,a){if(new.target)return lt({component:St,...W});vt(a,!0);let d=u(a,"items",7),n=u(a,"maxVisible",7,3),s=u(a,"adaptive",7,!1),b=u(a,"align",7,"end"),v=u(a,"variant",7,"card-stack"),_=u(a,"interactive",7,!1),m=u(a,"overflowId",7),I=u(a,"overflowTestId",7),i=u(a,"itemContent",7),A=u(a,"class",7,""),y=P(void 0),z=P(void 0);const h=x(()=>Wt[v()]),U=x(()=>s()&&t(z)!==void 0?yt({itemCount:d().length,maxVisible:n(),availableWidth:t(z),surface:t(h).surface,overlap:t(h).overlap,overflowOverlap:t(h).overlap,measureOverflowText:e=>Math.max(t(h).surface,$(e)+Ct)}):void 0),Y=x(()=>Math.min(d().length,Math.max(0,s()?t(U)??n():n()))),k=x(()=>d().slice(0,t(Y))),E=x(()=>Math.max(0,d().length-t(k).length)),q=x(()=>t(h).surface-t(h).overlap),Z=x(()=>t(k).length===0?0:t(h).surface+(t(k).length-1)*t(q));function $(e){const r=`+${j(e)}`,o=Q.get(r);if(o!==void 0)return o;if(O===void 0&&(O=document.createElement("canvas").getContext("2d")),!O||!t(y))return At;J??=`500 12px ${getComputedStyle(t(y)).fontFamily}`,O.font=J;const l=O.measureText(r).width;return Q.set(r,l),l}ft(()=>{if(!s()||!t(y)||typeof ResizeObserver>"u")return;const e=It(o=>{K(z,o,!0)}),r=new ResizeObserver(o=>{const l=o[o.length-1];e.set(l.borderBoxSize?.[0]?.inlineSize??l.contentRect.width)});return r.observe(t(y)),()=>{r.disconnect(),e.cancel()}});var tt={get items(){return d()},set items(e){d(e),g()},get maxVisible(){return n()},set maxVisible(e=3){n(e),g()},get adaptive(){return s()},set adaptive(e=!1){s(e),g()},get align(){return b()},set align(e="end"){b(e),g()},get variant(){return v()},set variant(e="card-stack"){v(e),g()},get interactive(){return _()},set interactive(e=!1){_(e),g()},get overflowId(){return m()},set overflowId(e){m(e),g()},get overflowTestId(){return I()},set overflowTestId(e){I(e),g()},get itemContent(){return i()},set itemContent(e){i(e),g()},get class(){return A()},set class(e=""){A(e),g()},$set:ct,$on:(e,r)=>dt(a,e,r)},p=Mt();let N;var B=H(p);{var et=e=>{var r=Ot();let o;_t(r,23,()=>t(k),l=>l.key,(l,w,V)=>{var f=Tt();let G;var nt=H(f);{var st=C=>{var M=mt(),ot=ht(M);kt(ot,i,()=>t(w)),T(C,M)},it=C=>{{let M=x(()=>t(w).state??"idle");xt(C,{get agentId(){return t(w).agentId},get specialist(){return t(w).specialist},get icon(){return t(w).icon},get state(){return t(M)},get variant(){return v()},class:"agent-avatar-stack-surface"})}};L(nt,C=>{i()?C(st):C(it,-1)})}D(f),S(()=>{G=X(f,1,"agent-avatar-stack-item svelte-1nk9fhe",null,G,{"agent-avatar-stack-item--before-overflow":t(E)>0&&t(V)===t(k).length-1}),R(f,`inset-inline-start: ${t(V)*t(q)}px; z-index: ${t(V)+1};`),c(f,"data-agent-avatar-stack-index",t(V)),c(f,"data-agent-avatar-stack-key",t(w).key),c(f,"data-agent-avatar-stack-agent-id",t(w).agentId),c(f,"data-agent-avatar-stack-specialist",t(w).specialist??void 0),c(f,"aria-hidden",_()?void 0:"true")}),T(l,f)}),D(r),S(()=>o=R(r,"",o,{width:`${t(Z)}px`})),T(e,r)};L(B,e=>{t(k).length>0&&e(et)})}var at=ut(B,2);{var rt=e=>{var r=Vt(),o=pt(r);S(l=>{c(r,"id",m()),R(r,`margin-inline-start: ${t(k).length>0?-t(h).overlap:0}px; z-index: ${t(k).length+1};`),c(r,"data-testid",I()),bt(o,`+${l??""}`)},[()=>j(t(E))]),T(e,r)};L(at,e=>{t(E)>0&&e(rt)})}return D(p),wt(p,e=>K(y,e),()=>t(y)),S(()=>{N=X(p,1,`agent-avatar-stack ${A()??""}`,"svelte-1nk9fhe",N,{"agent-avatar-stack--adaptive":s(),"agent-avatar-stack--start":b()==="start"}),c(p,"data-agent-avatar-stack-align",b()),c(p,"data-avatar-variant",v()),c(p,"data-agent-avatar-stack-clear-space",t(h).ring),c(p,"aria-hidden",!_()&&!m()?"true":void 0)}),T(W,p),gt(tt)}export{St as A};