@intent-hq/web 2.375.1 → 2.376.1

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 (324) hide show
  1. package/package.json +1 -1
  2. package/web/app/immutable/chunks/{Dn-hGN0g.js → -Hb5Lymn.js} +1 -1
  3. package/web/app/immutable/chunks/{CQ6jYKtE.js → -bihBnD_.js} +1 -1
  4. package/web/app/immutable/chunks/{DKUOdUyV.js → 0rEEjvhW.js} +1 -1
  5. package/web/app/immutable/chunks/1KDVFF23.js +1 -0
  6. package/web/app/immutable/chunks/{Xgzrv-dN.js → 1wMLd-77.js} +1 -1
  7. package/web/app/immutable/chunks/{BX9IoE2d.js → 26zQgwyJ.js} +1 -1
  8. package/web/app/immutable/chunks/{DSiF4FpM.js → 2WaF6vs_.js} +1 -1
  9. package/web/app/immutable/chunks/{C7Uh4cHO.js → 2tp4E25F.js} +1 -1
  10. package/web/app/immutable/chunks/{Bd6SODL5.js → 471Fgn_p.js} +1 -1
  11. package/web/app/immutable/chunks/{Cpr2SOSC.js → 6FXzbKIf.js} +1 -1
  12. package/web/app/immutable/chunks/{CYYyuCBb.js → 6GF_gyTS.js} +1 -1
  13. package/web/app/immutable/chunks/{DQiheiDa.js → 6HwVA3Xi.js} +48 -48
  14. package/web/app/immutable/chunks/{DODG7FHv.js → 6NqQpMgA.js} +1 -1
  15. package/web/app/immutable/chunks/{DY61j2wq.js → 7n3mxV6t.js} +1 -1
  16. package/web/app/immutable/chunks/{B_jbAa0I.js → 8PIbpdJu.js} +1 -1
  17. package/web/app/immutable/chunks/{C-7W2F0B.js → 8UE1B61A.js} +1 -1
  18. package/web/app/immutable/chunks/{B4SJ0wZk.js → 8VOCP3Xx.js} +1 -1
  19. package/web/app/immutable/chunks/{B4n9OEnJ.js → B4wiFjXK.js} +1 -1
  20. package/web/app/immutable/chunks/{CUXVMwZ6.js → B5n1Er-h.js} +1 -1
  21. package/web/app/immutable/chunks/B61tWwOC.js +1 -0
  22. package/web/app/immutable/chunks/{BDsVnMYl.js → B6ZbCtHN.js} +1 -1
  23. package/web/app/immutable/chunks/{CM4xaytB.js → B6Zf-ZTX.js} +1 -1
  24. package/web/app/immutable/chunks/{YfYAjqUM.js → B77YOXDU.js} +1 -1
  25. package/web/app/immutable/chunks/{BTKPx9nP.js → B85xL2lt.js} +3 -3
  26. package/web/app/immutable/chunks/{D3HVFnZe.js → B8tcC_lC.js} +1 -1
  27. package/web/app/immutable/chunks/{67uMgcnU.js → B9F4r5fH.js} +1 -1
  28. package/web/app/immutable/chunks/{CtX28OJm.js → BA7mfVzm.js} +1 -1
  29. package/web/app/immutable/chunks/{kFANwwYX.js → BEbBWmo4.js} +1 -1
  30. package/web/app/immutable/chunks/{C7TJE1vk.js → BEv4fIdD.js} +1 -1
  31. package/web/app/immutable/chunks/{C9EedYBu.js → BFT4wQs3.js} +1 -1
  32. package/web/app/immutable/chunks/{DNozBV3M.js → BGql-rAX.js} +1 -1
  33. package/web/app/immutable/chunks/{iykV4pvb.js → BHsQzwHt.js} +1 -1
  34. package/web/app/immutable/chunks/{Ds6Uj2aI.js → BIGkxv6Q.js} +1 -1
  35. package/web/app/immutable/chunks/{BWtq4mC4.js → BIwMjRQQ.js} +1 -1
  36. package/web/app/immutable/chunks/{CzEqpD5b.js → BLNcc2k4.js} +1 -1
  37. package/web/app/immutable/chunks/{BbzFLKZE.js → BMScw2DS.js} +1 -1
  38. package/web/app/immutable/chunks/{gsUgKMwT.js → BMfUzLG6.js} +1 -1
  39. package/web/app/immutable/chunks/{DD_c8x6U.js → BOZ6hjJI.js} +2 -2
  40. package/web/app/immutable/chunks/{mM-wy2h5.js → BP7XtCsE.js} +1 -1
  41. package/web/app/immutable/chunks/{NgEAPl8f.js → BPo1GPk4.js} +2 -2
  42. package/web/app/immutable/chunks/{CF0098kp.js → BPqKxoH8.js} +1 -1
  43. package/web/app/immutable/chunks/{BKPOvbtV.js → BPx3dFHu.js} +1 -1
  44. package/web/app/immutable/chunks/{DuPkRrZF.js → BSyKFBWd.js} +1 -1
  45. package/web/app/immutable/chunks/{DaUQbJQJ.js → BWBQA0E0.js} +1 -1
  46. package/web/app/immutable/chunks/{dqvdjjXR.js → BWIYTJ4a.js} +3 -3
  47. package/web/app/immutable/chunks/{BDXSQt10.js → BWyPNph7.js} +2 -2
  48. package/web/app/immutable/chunks/{MBA6k0j3.js → BYBN65Dm.js} +1 -1
  49. package/web/app/immutable/chunks/{CiD4x8Gl.js → BZytk_HL.js} +1 -1
  50. package/web/app/immutable/chunks/{ChbTF48b.js → BaO0hXxI.js} +1 -1
  51. package/web/app/immutable/chunks/{-18XT1CI.js → BblwdMxR.js} +1 -1
  52. package/web/app/immutable/chunks/{DIylOQL5.js → BcEldzTj.js} +1 -1
  53. package/web/app/immutable/chunks/{D_o67XD6.js → BcliNPZw.js} +2 -2
  54. package/web/app/immutable/chunks/{CRl6sOjh.js → Bco7_wmI.js} +1 -1
  55. package/web/app/immutable/chunks/{B_3JIPw3.js → BdBn1UvT.js} +1 -1
  56. package/web/app/immutable/chunks/{SMT1sep4.js → BdNdGDSe.js} +1 -1
  57. package/web/app/immutable/chunks/{DppdhMsn.js → BdaN2XXm.js} +1 -1
  58. package/web/app/immutable/chunks/{CMFbZICM.js → Bdn-RKqv.js} +2 -2
  59. package/web/app/immutable/chunks/{MyWfy8xc.js → BePTHsT0.js} +1 -1
  60. package/web/app/immutable/chunks/{PZRS5x7m.js → Bek4Es60.js} +1 -1
  61. package/web/app/immutable/chunks/{H3ekn9Mt.js → BjRLyMd2.js} +1 -1
  62. package/web/app/immutable/chunks/{5mmUTVhd.js → BjYingUt.js} +1 -1
  63. package/web/app/immutable/chunks/{DZ8q1fkg.js → BkcFLgQ7.js} +1 -1
  64. package/web/app/immutable/chunks/{C1m4pSe1.js → BkmrZjpE.js} +1 -1
  65. package/web/app/immutable/chunks/{ClkC2csJ.js → BlXvVwTG.js} +1 -1
  66. package/web/app/immutable/chunks/{DqujvsHK.js → BntFPxwt.js} +1 -1
  67. package/web/app/immutable/chunks/{CZJDTQJi.js → Bo5PTszQ.js} +1 -1
  68. package/web/app/immutable/chunks/{CkRR8JwL.js → BoLBqPln.js} +1 -1
  69. package/web/app/immutable/chunks/{CSbK1_CV.js → BpT_ybtH.js} +2 -2
  70. package/web/app/immutable/chunks/{BOsHJKjO.js → BpimY2Bn.js} +2 -2
  71. package/web/app/immutable/chunks/{eGxC9Zfx.js → Br9RT7xb.js} +1 -1
  72. package/web/app/immutable/chunks/{BsknvdQb.js → Bs1CY0TU.js} +1 -1
  73. package/web/app/immutable/chunks/{DV_Q2hiQ.js → Bt2C0fwl.js} +2 -2
  74. package/web/app/immutable/chunks/{DgOwYCT0.js → BtT-JO5g.js} +1 -1
  75. package/web/app/immutable/chunks/{Dgn5Otg4.js → Bu4YAtNq.js} +1 -1
  76. package/web/app/immutable/chunks/{BCKmKE5y.js → BuFlry2f.js} +1 -1
  77. package/web/app/immutable/chunks/{Bk5eDkyv.js → BuXc_maR.js} +1 -1
  78. package/web/app/immutable/chunks/{DvOdp8Jx.js → Bv5YjDej.js} +1 -1
  79. package/web/app/immutable/chunks/{ChoM6f6w.js → BvjVhe2e.js} +1 -1
  80. package/web/app/immutable/chunks/{Bu7GfLOK.js → BvvCJG4x.js} +1 -1
  81. package/web/app/immutable/chunks/{BSroN1Rt.js → ByJyX5qZ.js} +1 -1
  82. package/web/app/immutable/chunks/{C_GpcLP2.js → BzwPeFzF.js} +1 -1
  83. package/web/app/immutable/chunks/{Q5HWwxnx.js → C0kzahSL.js} +1 -1
  84. package/web/app/immutable/chunks/{vXh-PQQZ.js → C0nXBDlv.js} +1 -1
  85. package/web/app/immutable/chunks/{COIbDYtT.js → C22LcJ65.js} +3 -3
  86. package/web/app/immutable/chunks/{U6kzE96u.js → C3beNZjc.js} +1 -1
  87. package/web/app/immutable/chunks/{DINI7WNX.js → C3iIVLbv.js} +1 -1
  88. package/web/app/immutable/chunks/{tnfQ532f.js → C4cfJuJM.js} +1 -1
  89. package/web/app/immutable/chunks/{iwQqOlmN.js → C7Ibt0hX.js} +1 -1
  90. package/web/app/immutable/chunks/{fXti0RCR.js → C7hm9bSX.js} +1 -1
  91. package/web/app/immutable/chunks/{CiJWG6bO.js → C82gBCX8.js} +1 -1
  92. package/web/app/immutable/chunks/{CXjIzVpl.js → C9x6kmJK.js} +1 -1
  93. package/web/app/immutable/chunks/{BmC0p6X8.js → CALsJq65.js} +1 -1
  94. package/web/app/immutable/chunks/{CnMgdwKG.js → CBLFNmYJ.js} +1 -1
  95. package/web/app/immutable/chunks/{DaysnCXK.js → CBmGf0Ke.js} +1 -1
  96. package/web/app/immutable/chunks/{gcpLbmeh.js → CCEqDzPP.js} +1 -1
  97. package/web/app/immutable/chunks/{DgH7yAy-.js → CCWqLSpV.js} +1 -1
  98. package/web/app/immutable/chunks/{C5l6D9GX.js → CClsvy7n.js} +1 -1
  99. package/web/app/immutable/chunks/{CFqcGY4P.js → CEgHOs22.js} +1 -1
  100. package/web/app/immutable/chunks/{GlvfRTgI.js → CEqmtghP.js} +1 -1
  101. package/web/app/immutable/chunks/{RLFGU-s6.js → CFLXlno6.js} +1 -1
  102. package/web/app/immutable/chunks/{E0KBz4I2.js → CGx1Vpie.js} +1 -1
  103. package/web/app/immutable/chunks/{Zw1KxEm0.js → CIzlkLuu.js} +1 -1
  104. package/web/app/immutable/chunks/{D806p2LW.js → CJBG3N9y.js} +3 -3
  105. package/web/app/immutable/chunks/{D5HhSqbc.js → CJJ2D2db.js} +1 -1
  106. package/web/app/immutable/chunks/{LAC4SG96.js → CJfYXtXQ.js} +1 -1
  107. package/web/app/immutable/chunks/{C0JDt0nm.js → CKGNYRrS.js} +2 -2
  108. package/web/app/immutable/chunks/{P3O1Bi5N.js → CKKDDlBT.js} +1 -1
  109. package/web/app/immutable/chunks/{Cy9qAjIU.js → CL6yJ0UM.js} +1 -1
  110. package/web/app/immutable/chunks/{DGlNRMU1.js → CLG1DPRT.js} +2 -2
  111. package/web/app/immutable/chunks/{qPYbzgcC.js → CMgAi196.js} +1 -1
  112. package/web/app/immutable/chunks/{zjXa9LeK.js → CMn7jvlN.js} +1 -1
  113. package/web/app/immutable/chunks/{LGfIT3MS.js → CN0Csvus.js} +3 -3
  114. package/web/app/immutable/chunks/{Ctusnxiu.js → CN9rXc7J.js} +1 -1
  115. package/web/app/immutable/chunks/{DfdqseMI.js → COK2QQN9.js} +1 -1
  116. package/web/app/immutable/chunks/{LDe4IsYZ.js → COZ3dQ_A.js} +1 -1
  117. package/web/app/immutable/chunks/{IVk1JAtP.js → CPEu2Vil.js} +1 -1
  118. package/web/app/immutable/chunks/{DSiZ9qTg.js → CQQvsDes.js} +1 -1
  119. package/web/app/immutable/chunks/{Cq76BY90.js → CQww8mRz.js} +1 -1
  120. package/web/app/immutable/chunks/{CberoJl6.js → CQx3pm4t.js} +1 -1
  121. package/web/app/immutable/chunks/{uE6SDSU_.js → CSepGuJ-.js} +1 -1
  122. package/web/app/immutable/chunks/CT6GHk2v.js +1 -0
  123. package/web/app/immutable/chunks/{BxVNHcGR.js → CTDEoCzv.js} +1 -1
  124. package/web/app/immutable/chunks/{oJ_ZL_ms.js → CToFQRbb.js} +1 -1
  125. package/web/app/immutable/chunks/{alEgYZuT.js → CUUAtNdA.js} +1 -1
  126. package/web/app/immutable/chunks/CW7lfTzm.js +177 -0
  127. package/web/app/immutable/chunks/{C58p8xFm.js → CWFWI1JB.js} +1 -1
  128. package/web/app/immutable/chunks/{S7_elIn6.js → CX4bqTrJ.js} +1 -1
  129. package/web/app/immutable/chunks/{y-lOZYhA.js → CXfim-2t.js} +1 -1
  130. package/web/app/immutable/chunks/{D9JbOH_S.js → CXgy6Mbb.js} +1 -1
  131. package/web/app/immutable/chunks/{D1JjMDax.js → CYCawVEx.js} +1 -1
  132. package/web/app/immutable/chunks/{BlyKuyB7.js → CZw2t1gL.js} +1 -1
  133. package/web/app/immutable/chunks/{kuwy0JZA.js → C_0xgdqY.js} +1 -1
  134. package/web/app/immutable/chunks/{DzVqblgy.js → C_BHeuK7.js} +1 -1
  135. package/web/app/immutable/chunks/{DuDStABj.js → Ca9qLvAG.js} +1 -1
  136. package/web/app/immutable/chunks/{6JKrky9_.js → CbnYiL9b.js} +1 -1
  137. package/web/app/immutable/chunks/{CHUCX9T6.js → CdgNuFkc.js} +1 -1
  138. package/web/app/immutable/chunks/{DZCvTRBp.js → CdpTO1ew.js} +1 -1
  139. package/web/app/immutable/chunks/{CHLHWub0.js → CfCk_l9B.js} +1 -1
  140. package/web/app/immutable/chunks/{DoIr8Q2r.js → Ch-pFfsN.js} +1 -1
  141. package/web/app/immutable/chunks/{xS3xfMki.js → Cihg5T05.js} +1 -1
  142. package/web/app/immutable/chunks/{fXwGuYzr.js → CihneiLA.js} +1 -1
  143. package/web/app/immutable/chunks/{DgaiTQpw.js → CjK2zm52.js} +1 -1
  144. package/web/app/immutable/chunks/{BJuNVIII.js → CkrblKaH.js} +1 -1
  145. package/web/app/immutable/chunks/{gSg6l32T.js → CmdE1AJL.js} +1 -1
  146. package/web/app/immutable/chunks/{C44hzh9R.js → CntPxeXh.js} +1 -1
  147. package/web/app/immutable/chunks/{1KCpY35B.js → Co4Bm5eY.js} +1 -1
  148. package/web/app/immutable/chunks/{BjWOzuMm.js → CpIVKWwx.js} +4 -4
  149. package/web/app/immutable/chunks/{D_Y9WK2x.js → CqM0ozU7.js} +1 -1
  150. package/web/app/immutable/chunks/{B4mmdCiF.js → CqsFOLCu.js} +1 -1
  151. package/web/app/immutable/chunks/{l4TJFOXC.js → CrNPV-Vp.js} +1 -1
  152. package/web/app/immutable/chunks/{DgIh2Fs6.js → CrgJwS7n.js} +1 -1
  153. package/web/app/immutable/chunks/{CFhbo3o1.js → Cs85XoQa.js} +1 -1
  154. package/web/app/immutable/chunks/{DZmV2kHY.js → CtECFAby.js} +1 -1
  155. package/web/app/immutable/chunks/{D6GBnYDv.js → CtguhKZB.js} +1 -1
  156. package/web/app/immutable/chunks/{C-JwFHXS.js → CuAAvi1f.js} +1 -1
  157. package/web/app/immutable/chunks/{DHqMqA41.js → CvZrEuUX.js} +1 -1
  158. package/web/app/immutable/chunks/{m8gDbIPC.js → Cvp_IOBl.js} +2 -2
  159. package/web/app/immutable/chunks/{D6hUzfgH.js → Cw3skelK.js} +1 -1
  160. package/web/app/immutable/chunks/{CGG7txTQ.js → CwBMToxu.js} +1 -1
  161. package/web/app/immutable/chunks/{B3fU6XQp.js → D-rGNJzU.js} +1 -1
  162. package/web/app/immutable/chunks/{TodMLsNs.js → D1DNtybi.js} +1 -1
  163. package/web/app/immutable/chunks/{grQh-L5q.js → D2eaIIb4.js} +2 -2
  164. package/web/app/immutable/chunks/{DJ2vnC9G.js → D4EwlENg.js} +1 -1
  165. package/web/app/immutable/chunks/{CFUDIGea.js → D4gtBVLN.js} +1 -1
  166. package/web/app/immutable/chunks/{BepABSAk.js → D4lP_X71.js} +1 -1
  167. package/web/app/immutable/chunks/{o1gxvTJU.js → D5bd-ecJ.js} +1 -1
  168. package/web/app/immutable/chunks/{CpYW1yE7.js → D5raGlU7.js} +2 -2
  169. package/web/app/immutable/chunks/{B5CW3gDe.js → D6W9Whdp.js} +3 -3
  170. package/web/app/immutable/chunks/{Byjmi-8z.js → D7u67tV0.js} +2 -2
  171. package/web/app/immutable/chunks/{BkLJnbD1.js → D7vAVIvz.js} +1 -1
  172. package/web/app/immutable/chunks/{D85P44Dj.js → D8B7qxXm.js} +1 -1
  173. package/web/app/immutable/chunks/{Db_i0IkD.js → D8XqXEXt.js} +1 -1
  174. package/web/app/immutable/chunks/{DoQnqQZn.js → DCibR4Jk.js} +1 -1
  175. package/web/app/immutable/chunks/{BowQ7sBM.js → DDFAsI-l.js} +1 -1
  176. package/web/app/immutable/chunks/{LNZr9DCJ.js → DHSWOw-U.js} +1 -1
  177. package/web/app/immutable/chunks/{C6GJZLOP.js → DHbv9I-C.js} +1 -1
  178. package/web/app/immutable/chunks/{jG67l4Uo.js → DIDOx8hd.js} +2 -2
  179. package/web/app/immutable/chunks/{D_otNUZh.js → DJk5np0g.js} +1 -1
  180. package/web/app/immutable/chunks/{CBl7oWeN.js → DKHSbBis.js} +1 -1
  181. package/web/app/immutable/chunks/{D-ls8znw.js → DKIi_opT.js} +1 -1
  182. package/web/app/immutable/chunks/{5uDsFopc.js → DM4cCUDd.js} +1 -1
  183. package/web/app/immutable/chunks/{B6CxzJhM.js → DOEOrBL9.js} +1 -1
  184. package/web/app/immutable/chunks/{CyyqjEBc.js → DOMMuuHJ.js} +1 -1
  185. package/web/app/immutable/chunks/{kFRDyP-N.js → DPF9_zKV.js} +1 -1
  186. package/web/app/immutable/chunks/{C6jYe9up.js → DPLDRqMC.js} +1 -1
  187. package/web/app/immutable/chunks/{BO3WriTy.js → DPbnmxjX.js} +1 -1
  188. package/web/app/immutable/chunks/{CBtQnhwT.js → DPztwkUP.js} +1 -1
  189. package/web/app/immutable/chunks/{DinWeICM.js → DQGdnFBd.js} +1 -1
  190. package/web/app/immutable/chunks/{mdoDOmuU.js → DQmW4_9G.js} +1 -1
  191. package/web/app/immutable/chunks/{DzfHkSZF.js → DS5B84mn.js} +1 -1
  192. package/web/app/immutable/chunks/{P-zm4ktU.js → DSvyONiq.js} +1 -1
  193. package/web/app/immutable/chunks/{jaSHlZjt.js → DT8FaJbg.js} +1 -1
  194. package/web/app/immutable/chunks/{BIo9gpGl.js → DUT4xhYi.js} +1 -1
  195. package/web/app/immutable/chunks/{D6YX_GFv.js → DVok8lSR.js} +1 -1
  196. package/web/app/immutable/chunks/{CdvXSvOC.js → DX_ZPiRZ.js} +1 -1
  197. package/web/app/immutable/chunks/{BmEIQ8E-.js → DY-U3TFa.js} +1 -1
  198. package/web/app/immutable/chunks/{COUB9dHY.js → DYGC3eZn.js} +1 -1
  199. package/web/app/immutable/chunks/{Jcrj5YZi.js → DZEGFjPx.js} +1 -1
  200. package/web/app/immutable/chunks/{BrFnR1vI.js → DZbKPa1t.js} +1 -1
  201. package/web/app/immutable/chunks/{PCtwJJ25.js → D_xvUCUD.js} +1 -1
  202. package/web/app/immutable/chunks/{DoA3JmdK.js → DbSttgXv.js} +1 -1
  203. package/web/app/immutable/chunks/{3rxHCGTW.js → DcZr-m_l.js} +1 -1
  204. package/web/app/immutable/chunks/{DK-vph3Z.js → DdJ4cD_u.js} +1 -1
  205. package/web/app/immutable/chunks/{Dtveg46I.js → DeDQhZv5.js} +1 -1
  206. package/web/app/immutable/chunks/{pZsrsFnW.js → Deoe5X7L.js} +1 -1
  207. package/web/app/immutable/chunks/{B7ydANq7.js → Dfq_rEeO.js} +1 -1
  208. package/web/app/immutable/chunks/{BE5ZU7pI.js → DhW_HWBK.js} +1 -1
  209. package/web/app/immutable/chunks/{CYWgGrsf.js → Dh_eorhd.js} +1 -1
  210. package/web/app/immutable/chunks/{ChJ4msi3.js → Dhj-Oo-y.js} +1 -1
  211. package/web/app/immutable/chunks/{CBHXSekd.js → DiEy7mCR.js} +1 -1
  212. package/web/app/immutable/chunks/{F-NRzkEu.js → DiLFzwi3.js} +1 -1
  213. package/web/app/immutable/chunks/{BZSs3eKh.js → DiP5BH15.js} +1 -1
  214. package/web/app/immutable/chunks/{Bb_mQye1.js → Div7CQPf.js} +1 -1
  215. package/web/app/immutable/chunks/{DK3AlKip.js → DjBxG6q0.js} +3 -3
  216. package/web/app/immutable/chunks/{BifXEk-G.js → Dk0afiu6.js} +1 -1
  217. package/web/app/immutable/chunks/{CpV-ehZ5.js → DkYquFOp.js} +1 -1
  218. package/web/app/immutable/chunks/DmnStjtN.js +1 -0
  219. package/web/app/immutable/chunks/{DZBnfhEV.js → Dmy603At.js} +1 -1
  220. package/web/app/immutable/chunks/{DJuFWuFo.js → Dn7Cyi1s.js} +1 -1
  221. package/web/app/immutable/chunks/{CBRC7st2.js → Domj4ONg.js} +2 -2
  222. package/web/app/immutable/chunks/{CQxAYjD7.js → DpMsJtM0.js} +1 -1
  223. package/web/app/immutable/chunks/{kZanyiqf.js → DpSAF6fh.js} +1 -1
  224. package/web/app/immutable/chunks/{XyC5Phh7.js → DpgIqMGp.js} +1 -1
  225. package/web/app/immutable/chunks/{aToNeEMa.js → DqPe5uyz.js} +1 -1
  226. package/web/app/immutable/chunks/{DmQm2Dw6.js → DtEw_Okh.js} +1 -1
  227. package/web/app/immutable/chunks/{Di9CSB6H.js → DtYDlbcb.js} +1 -1
  228. package/web/app/immutable/chunks/{Bw0E8D92.js → Dv6PZjTW.js} +1 -1
  229. package/web/app/immutable/chunks/{yqs-hTyP.js → DvwOszqf.js} +1 -1
  230. package/web/app/immutable/chunks/{DTutiDCZ.js → DzTe1W0Z.js} +1 -1
  231. package/web/app/immutable/chunks/{CFtfWLBC.js → Dzl5aoA8.js} +1 -1
  232. package/web/app/immutable/chunks/{DyiA0AJU.js → DzsC5hAQ.js} +1 -1
  233. package/web/app/immutable/chunks/{Dv3EtVHJ.js → EmfdzzTF.js} +1 -1
  234. package/web/app/immutable/chunks/{K7F-rH-C.js → IB26d-_M.js} +4 -4
  235. package/web/app/immutable/chunks/{BL39LNxU.js → IdqO6uHC.js} +1 -1
  236. package/web/app/immutable/chunks/{B5bnHhgO.js → J9vGyyn3.js} +1 -1
  237. package/web/app/immutable/chunks/{a-OtAcF_.js → K0CA4l_-.js} +3 -3
  238. package/web/app/immutable/chunks/{DbCeN0Lt.js → KImhPY_I.js} +1 -1
  239. package/web/app/immutable/chunks/{DUXVcIKV.js → KS10KUQ4.js} +1 -1
  240. package/web/app/immutable/chunks/{DVcCnfZH.js → KaHKnBKn.js} +1 -1
  241. package/web/app/immutable/chunks/{C-nutp9J.js → L0PmMCK6.js} +1 -1
  242. package/web/app/immutable/chunks/{YbP7yBkb.js → LFlj1pUW.js} +1 -1
  243. package/web/app/immutable/chunks/{4r36FIB7.js → MujvTDgv.js} +1 -1
  244. package/web/app/immutable/chunks/{QjNLPDal.js → Mw2Z7eLx.js} +1 -1
  245. package/web/app/immutable/chunks/{DtBx3nLm.js → NEcXJ8Qo.js} +1 -1
  246. package/web/app/immutable/chunks/{CJZ6Gu1k.js → Ow3KARwj.js} +1 -1
  247. package/web/app/immutable/chunks/{CCEQVSjx.js → P27dN3C7.js} +1 -1
  248. package/web/app/immutable/chunks/{BK0rB8kZ.js → Pqx84Da9.js} +1 -1
  249. package/web/app/immutable/chunks/{8TUe2kcz.js → PtMxuYy8.js} +1 -1
  250. package/web/app/immutable/chunks/Q-Hp56ht.js +6 -0
  251. package/web/app/immutable/chunks/{zrdFYBgX.js → Qzhec1TY.js} +1 -1
  252. package/web/app/immutable/chunks/{Cr9glZDh.js → RyWl3sPF.js} +1 -1
  253. package/web/app/immutable/chunks/{BReER1n3.js → THm8CnE2.js} +1 -1
  254. package/web/app/immutable/chunks/{C-zY3GF-.js → UHs-xfbd.js} +1 -1
  255. package/web/app/immutable/chunks/{CqJcYBUx.js → UaQjBP_O.js} +1 -1
  256. package/web/app/immutable/chunks/{D0Ayz4Dm.js → Ug7t_gUQ.js} +1 -1
  257. package/web/app/immutable/chunks/{DXwcjaPR.js → Ydj2ePK_.js} +2 -2
  258. package/web/app/immutable/chunks/{1Wzdy1K8.js → YopO0YfH.js} +6 -6
  259. package/web/app/immutable/chunks/{DgiJ63hc.js → ZWIGjqdM.js} +3 -3
  260. package/web/app/immutable/chunks/{BQg4hK6W.js → Zg9SWWIQ.js} +1 -1
  261. package/web/app/immutable/chunks/{Cwvt_P5T.js → a0CN3en2.js} +1 -1
  262. package/web/app/immutable/chunks/{njprJ3WZ.js → aqQCGQpk.js} +1 -1
  263. package/web/app/immutable/chunks/{BYC0ucSR.js → bcfKuKQn.js} +1 -1
  264. package/web/app/immutable/chunks/{BHni5QqW.js → cP-p0FYL.js} +1 -1
  265. package/web/app/immutable/chunks/{DMqmqAT4.js → dIyiVmNx.js} +1 -1
  266. package/web/app/immutable/chunks/{DcNvIFJV.js → ebxZ5PPm.js} +1 -1
  267. package/web/app/immutable/chunks/{DVNEvaXi.js → fFnyP4ej.js} +1 -1
  268. package/web/app/immutable/chunks/{eZSKfAFO.js → gY6D1J3N.js} +1 -1
  269. package/web/app/immutable/chunks/{B9-EoZ1p.js → iNDSBgu7.js} +1 -1
  270. package/web/app/immutable/chunks/{BLYFfqzj.js → jUAybD8G.js} +1 -1
  271. package/web/app/immutable/chunks/{ChGLvrw4.js → kZL4nf_J.js} +4 -4
  272. package/web/app/immutable/chunks/{B0O5mhBM.js → mnnjJoDI.js} +1 -1
  273. package/web/app/immutable/chunks/{DyT0mOdr.js → my69Ox9w.js} +4 -4
  274. package/web/app/immutable/chunks/{DQAJLaJ3.js → nHwpsxWy.js} +1 -1
  275. package/web/app/immutable/chunks/{Dqtmunn7.js → pIjvEfMB.js} +5 -5
  276. package/web/app/immutable/chunks/{BY16_RoT.js → q9cUG1dc.js} +1 -1
  277. package/web/app/immutable/chunks/{DRPKvmfX.js → qg2KHuAY.js} +1 -1
  278. package/web/app/immutable/chunks/{D1HPSWvP.js → qyBT4DY2.js} +1 -1
  279. package/web/app/immutable/chunks/{Cn8hCY5y.js → rCkv5VsR.js} +2 -2
  280. package/web/app/immutable/chunks/{hK5d1dQ0.js → rHK6sLv4.js} +1 -1
  281. package/web/app/immutable/chunks/{BevEoYEw.js → sEj9k2KM.js} +1 -1
  282. package/web/app/immutable/chunks/{qkmjEtXH.js → sZBOVpM6.js} +3 -3
  283. package/web/app/immutable/chunks/{CyaIe0jD.js → tGL9OSFf.js} +1 -1
  284. package/web/app/immutable/chunks/{mF8ZdCMN.js → thdnIk1K.js} +1 -1
  285. package/web/app/immutable/chunks/{t4bVJhrn.js → ucKP4cAm.js} +4 -4
  286. package/web/app/immutable/chunks/{BBiqqybB.js → wfSdTH77.js} +1 -1
  287. package/web/app/immutable/chunks/{Ilt_8E2i.js → x8bssjcx.js} +1 -1
  288. package/web/app/immutable/chunks/{Cin575hV.js → xFC1lhKl.js} +1 -1
  289. package/web/app/immutable/chunks/{Bl8fHOk-.js → xIoxAtek.js} +1 -1
  290. package/web/app/immutable/chunks/{DCTwUEO7.js → xJBWkpxc.js} +1 -1
  291. package/web/app/immutable/chunks/{DkkEizQf.js → zzl2tBQf.js} +1 -1
  292. package/web/app/immutable/entry/{app.B-3yrq60.js → app.YY31OTuo.js} +3 -3
  293. package/web/app/immutable/entry/start.DBl7cnaM.js +1 -0
  294. package/web/app/immutable/nodes/{0.Dr7z-ndg.js → 0.I2U7Nyeq.js} +1 -1
  295. package/web/app/immutable/nodes/{1.DszvgcVt.js → 1.CgZVKAf9.js} +1 -1
  296. package/web/app/immutable/nodes/{10.mpjVYgcT.js → 10.CsryZO2H.js} +5 -5
  297. package/web/app/immutable/nodes/{11.d9OIWvmS.js → 11.BTowiakT.js} +1 -1
  298. package/web/app/immutable/nodes/{12.hNKUSgvY.js → 12.S6PrlAwz.js} +1 -1
  299. package/web/app/immutable/nodes/{13.NTcuwB8X.js → 13.Bs_o-uwb.js} +1 -1
  300. package/web/app/immutable/nodes/{14.C4hEzDzc.js → 14.CIZDoMeA.js} +3 -3
  301. package/web/app/immutable/nodes/{15.BGv16BME.js → 15.CzU59iiE.js} +1 -1
  302. package/web/app/immutable/nodes/{16.BLKEYdtz.js → 16.BgJmXimX.js} +1 -1
  303. package/web/app/immutable/nodes/{17.Cw1VnAlL.js → 17.BWRlIYI7.js} +1 -1
  304. package/web/app/immutable/nodes/{18.BC2tc74_.js → 18.BV2orlA1.js} +1 -1
  305. package/web/app/immutable/nodes/{19.BLf_cCOa.js → 19.vtvcgUzO.js} +2 -2
  306. package/web/app/immutable/nodes/{2.DT49t-u_.js → 2.xEZtPl1l.js} +4 -4
  307. package/web/app/immutable/nodes/{20.CAN0HPlm.js → 20.DLg8hCzP.js} +1 -1
  308. package/web/app/immutable/nodes/{3.CHLlivF3.js → 3.hyVEcKKo.js} +1 -1
  309. package/web/app/immutable/nodes/{4.D2tKSs2v.js → 4.CdWgO8Xv.js} +1 -1
  310. package/web/app/immutable/nodes/{5.B9Lx7aa1.js → 5.BhLUauX8.js} +1 -1
  311. package/web/app/immutable/nodes/{6.BXEdmXk5.js → 6.B3Vi01S1.js} +1 -1
  312. package/web/app/immutable/nodes/{7.Cg1blkaN.js → 7.DW7p588B.js} +1 -1
  313. package/web/app/immutable/nodes/{8.B5g4h2T5.js → 8.Bt8gdMyu.js} +1 -1
  314. package/web/app/immutable/nodes/{9.CQeYWw6-.js → 9.BSZ1-MKZ.js} +4 -4
  315. package/web/app/version.json +1 -1
  316. package/web/generated/paraglide.js +49 -49
  317. package/web/index.html +18 -18
  318. package/web/app/immutable/chunks/B6sO6A0G.js +0 -1
  319. package/web/app/immutable/chunks/BSev9KPj.js +0 -1
  320. package/web/app/immutable/chunks/Bv8Gaorn.js +0 -1
  321. package/web/app/immutable/chunks/CAEqRKhy.js +0 -1
  322. package/web/app/immutable/chunks/Dr4PDf9D.js +0 -6
  323. package/web/app/immutable/chunks/EZ4dI6hS.js +0 -177
  324. package/web/app/immutable/entry/start.DZZRsHd3.js +0 -1
@@ -1 +1 @@
1
- import{p as e}from"./D85P44Dj.js";import{p as t}from"./XJv96NUg.js";const o=[{id:"label-state-matrix",title:"Label states",states:["default","rest","hover","focus","error","required","optional","disabled","long-content","compact","zoom-200","light","dark"],themes:["light","dark","high-contrast"],viewport:"both"}];e({id:"label",source:"src/lib/components/ui/label/label.svelte",publicImport:"$lib/components/ui/label",legacyImports:[],exports:["Label","labelMetadata"],category:"primitive",owner:"007-B2",callers:["src/features/collaboration-auth/renderer/CollaborationSignInModal.svelte","src/features/host-membership/HostInvitationDialog.svelte","src/lib/component-catalog/renderers/ContentFieldCatalogPreview.svelte","src/lib/component-catalog/renderers/FieldPreviewCell.svelte","src/lib/component-catalog/renderers/ModalCatalogPreview.svelte","src/lib/components/GitLabConnectForm.svelte","src/lib/components/chat/secrets/SecretRequestCard.svelte","src/lib/components/debug/DebugPanel.svelte","src/lib/components/modals/InputDialog.svelte","src/lib/components/modals/ShareWorkspaceDialog.svelte","src/lib/components/modals/modal-polish.preview.svelte","src/lib/components/patterns/confirm/ConfirmRequestView.svelte","src/lib/components/patterns/form/FormField.svelte","src/lib/components/patterns/settings/SettingsFieldRow.svelte","src/lib/components/patterns/settings/custom-controls.ts","src/lib/components/workspace/initializer/AddRemoteSetupModal.svelte","src/lib/components/workspace/initializer/SetupScriptTrigger.svelte","src/lib/components/workspace/sidebar/context-picker/BrowserUrlPicker.svelte"],replacement:null,characterizationTest:"src/lib/components/ui/label/label.test.ts",removalGate:"Retain while exported and association and fixture tests pass.",dynamicImports:[],fixtures:o});const s=[{id:"content-dialog",title:"Content dialog",states:["reading","progress","error","long-content"],themes:["light","dark"],viewport:"both"},{id:"confirm-service",title:"Confirm service",states:["confirm","prompt","alert","queued","busy","reduced-motion"],themes:["light","dark","high-contrast"],viewport:"both",reducedMotion:!0},{id:"form-dialog",title:"Form dialog",states:["default","busy","invalid"],themes:["light","dark"],viewport:"both"},{id:"destructive-confirm",title:"Destructive confirm",states:["default","busy"],themes:["light","dark"],viewport:"both"}];t({id:"confirm",source:"src/lib/components/patterns/confirm/index.ts",publicImport:"$lib/components/patterns/confirm",exports:["ConfirmHost","ConfirmRequestView","DestructiveConfirm","FormDialog","ContentDialog","alert","confirm","prompt"],owner:"design-system",fixtures:s,useWhen:["Blocking an action until the user confirms, enters one value, or acknowledges a message.","Building a dialog whose content is a form with standard actions.","Showing a selection, progress/result, or reading dialog with shared layout and focus ownership."],dontUseWhen:["Reporting non-blocking status; use the notification service instead.","Building a multi-step flow; use a dedicated screen or wizard composition."],replaces:["Browser confirm, prompt, and alert APIs.","InputDialog, MessageDialog, and one-off destructive confirmation markup."]});
1
+ import{p as e}from"./D8B7qxXm.js";import{p as t}from"./XJv96NUg.js";const o=[{id:"label-state-matrix",title:"Label states",states:["default","rest","hover","focus","error","required","optional","disabled","long-content","compact","zoom-200","light","dark"],themes:["light","dark","high-contrast"],viewport:"both"}];e({id:"label",source:"src/lib/components/ui/label/label.svelte",publicImport:"$lib/components/ui/label",legacyImports:[],exports:["Label","labelMetadata"],category:"primitive",owner:"007-B2",callers:["src/features/collaboration-auth/renderer/CollaborationSignInModal.svelte","src/features/host-membership/HostInvitationDialog.svelte","src/lib/component-catalog/renderers/ContentFieldCatalogPreview.svelte","src/lib/component-catalog/renderers/FieldPreviewCell.svelte","src/lib/component-catalog/renderers/ModalCatalogPreview.svelte","src/lib/components/GitLabConnectForm.svelte","src/lib/components/chat/secrets/SecretRequestCard.svelte","src/lib/components/debug/DebugPanel.svelte","src/lib/components/modals/InputDialog.svelte","src/lib/components/modals/ShareWorkspaceDialog.svelte","src/lib/components/modals/modal-polish.preview.svelte","src/lib/components/patterns/confirm/ConfirmRequestView.svelte","src/lib/components/patterns/form/FormField.svelte","src/lib/components/patterns/settings/SettingsFieldRow.svelte","src/lib/components/patterns/settings/custom-controls.ts","src/lib/components/workspace/initializer/AddRemoteSetupModal.svelte","src/lib/components/workspace/initializer/SetupScriptTrigger.svelte","src/lib/components/workspace/sidebar/context-picker/BrowserUrlPicker.svelte"],replacement:null,characterizationTest:"src/lib/components/ui/label/label.test.ts",removalGate:"Retain while exported and association and fixture tests pass.",dynamicImports:[],fixtures:o});const s=[{id:"content-dialog",title:"Content dialog",states:["reading","progress","error","long-content"],themes:["light","dark"],viewport:"both"},{id:"confirm-service",title:"Confirm service",states:["confirm","prompt","alert","queued","busy","reduced-motion"],themes:["light","dark","high-contrast"],viewport:"both",reducedMotion:!0},{id:"form-dialog",title:"Form dialog",states:["default","busy","invalid"],themes:["light","dark"],viewport:"both"},{id:"destructive-confirm",title:"Destructive confirm",states:["default","busy"],themes:["light","dark"],viewport:"both"}];t({id:"confirm",source:"src/lib/components/patterns/confirm/index.ts",publicImport:"$lib/components/patterns/confirm",exports:["ConfirmHost","ConfirmRequestView","DestructiveConfirm","FormDialog","ContentDialog","alert","confirm","prompt"],owner:"design-system",fixtures:s,useWhen:["Blocking an action until the user confirms, enters one value, or acknowledges a message.","Building a dialog whose content is a form with standard actions.","Showing a selection, progress/result, or reading dialog with shared layout and focus ownership."],dontUseWhen:["Reporting non-blocking status; use the notification service instead.","Building a multi-step flow; use a dedicated screen or wizard composition."],replaces:["Browser confirm, prompt, and alert APIs.","InputDialog, MessageDialog, and one-off destructive confirmation markup."]});
@@ -1 +1 @@
1
- var j=Object.defineProperty;var V=(s,e,t)=>e in s?j(s,e,{enumerable:!0,configurable:!0,writable:!0,value:t}):s[e]=t;var n=(s,e,t)=>V(s,typeof e!="symbol"?e+"":e,t);import{f as x,j as G,p as z}from"./uXuxG9cN.js";import{u as J,o as T,_ as C,s as b,l as _,n as U}from"./CIyUrgF0.js";import{bm as $}from"./Bv8Gaorn.js";class u extends Error{constructor(t){super(t.message);n(this,"code");n(this,"data");n(this,"rpcCode");this.name="BackendError",this.code=t.code,this.data=t.data,this.rpcCode=t.rpcCode}}function Ee(s){return!s||typeof s!="object"?!1:typeof s.rpcCode=="number"}const K=-32003;function Ce(s){return!s||typeof s!="object"?!1:s.rpcCode===K}const Ae=x.refine(s=>s.repository.provider==="github"&&s.kind==="pull-request"||s.repository.provider==="gitlab"&&s.kind==="merge-request"),Oe=J([T({state:C(["available","pending","reconnect-required","restricted","disabled","unsupported","unavailable","unknown"])}),T({state:_("backoff"),retryAt:b()}),T({state:_("unresolved"),reason:C(["missing-provenance","unverified-import","invalid-target","missing-authority","unknown"]).catch("unknown")})]).catch({state:"unknown"}),_e=T({backendId:b().min(1),sessionId:b().min(1),workspaceId:b().min(1)}).strict();function v(s){return typeof s=="number"&&Number.isSafeInteger(s)&&s>=1}function Ne(s){if(s.resource||s.monitorAvailability||s.title===null||s.url===null||s.lastSnapshot===null)return!1;const e=s.lastSnapshot;return!e||!e.availability&&e.isDraft!==null&&e.hasConflicts!==null&&e.isBehind!==null&&Object.values(e.checks).every(t=>t!==null)&&e.approvals.decision!==null&&e.approvals.have!==null&&e.approvals.changesRequested!==null}const Ie=new Set(["agent.getConversation","agent.listUserMessages","agent.getMessageBlock","chat.subscribe","chat.unsubscribe"]);class Y{constructor(e,t,i,o,a,d,R){n(this,"ready");n(this,"acknowledged",!1);n(this,"closed",!1);n(this,"id",0);n(this,"pending",new Map);n(this,"listeners",new Set);n(this,"rejectReady");n(this,"timer");this.socket=e,this.currentSource=o,this.timeoutMs=a,this.onFailure=R,this.ready=new Promise((m,r)=>{this.rejectReady=r,e.onopen=()=>{if(!this.current())return this.fail();this.send("client.hello",{clientId:t,connectionRole:"review-monitor",capabilities:{reviewMonitoring:i}}).then(f=>{const c=f;if(!this.current()||c?.clientId!==t||c?.connectionRole!=="review-monitor"||!v(c?.server?.capabilities?.reviewMonitoring))return this.fail();this.acknowledged=!0,clearTimeout(this.timer),m()},()=>this.fail())}}),this.timer=setTimeout(()=>this.fail(),d),e.onerror=()=>this.fail(),e.onclose=()=>this.fail(),e.onmessage=({data:m})=>{if(!this.current()||typeof m!="string")return;let r;try{r=JSON.parse(m)}catch{return}if(!r||typeof r!="object")return;if(typeof r.method=="string"){if(r.id!=null){try{e.send(JSON.stringify({jsonrpc:"2.0",id:r.id,error:{code:-32601,message:"Method not found"}}))}catch{this.fail()}return}if(this.acknowledged)for(const c of[...this.listeners])c({method:r.method,params:r.params});return}if(typeof r.id!="number")return;const f=this.pending.get(r.id);if(f)if(this.pending.delete(r.id),clearTimeout(f.timer),r.error){const c=r.error.data,g=c&&typeof c=="object"&&"code"in c&&typeof c.code=="string"?c.code:"SERVER_ERROR";f.reject(new u({code:g,message:typeof r.error.message=="string"?r.error.message:"Monitor request failed",data:c,rpcCode:typeof r.error.code=="number"?r.error.code:void 0}))}else f.resolve(r.result)}}current(){return!this.closed&&this.currentSource()}onNotification(e){return this.listeners.add(e),()=>this.listeners.delete(e)}request(e,t){return!this.acknowledged||e==="client.hello"?Promise.reject(this.unavailable()):this.send(e,t)}close(){if(this.closed)return;this.closed=!0,this.acknowledged=!1,clearTimeout(this.timer);const e=this.unavailable();this.rejectReady(e);for(const t of this.pending.values())clearTimeout(t.timer),t.reject(e);this.pending.clear(),this.listeners.clear(),this.socket.onopen=this.socket.onmessage=this.socket.onerror=this.socket.onclose=null;try{this.socket.close()}catch{}}fail(){this.closed||(this.close(),this.onFailure())}unavailable(){return new u({code:"PR_MONITOR_SESSION_RETIRED",message:"Monitor attachment unavailable"})}send(e,t){if(!this.current())return Promise.reject(this.unavailable());const i=++this.id;return new Promise((o,a)=>{const d=setTimeout(()=>{this.pending.delete(i),a(new u({code:"TIMEOUT",message:`JSON-RPC request timed out: ${e}`}))},this.timeoutMs);this.pending.set(i,{resolve:o,reject:a,timer:d});try{this.socket.send(JSON.stringify({jsonrpc:"2.0",id:i,method:e,params:t}))}catch{this.fail()}})}}const X=["agentNodes","localNodeIsolation","agentPlatformRouting","workspaceMembershipEvents","rawScreenshotRetention","chiefAttachments","noteTruncatedRead","remoteMachines","remoteInitialAgent","remoteMachineClaim","machineOrder","remoteLinkTraffic","cloudMachines","cloudMachineEntries","cloudMachineProviders"];function Q(s){return Object.freeze(Object.fromEntries(X.map(e=>[e,s?.[e]===1?1:0])))}function Z(s){if(!G(s,11,1))throw new Error($.files_secondaryRoot_unsupported_error())}function ee(s,e,t){te(s,e)&&Z(t)}function te(s,e){if(s!=="file.read"&&s!=="file.readChunk")return!1;const t=e?.gitRootId;return typeof t=="string"&&!!t.trim()}const N=-32012,se="system.startupStatus",ne=1e3,L=1e3,F=3e4,w=U().int().nonnegative().max(Number.MAX_SAFE_INTEGER),ie=T({completedNotes:w,totalNotes:w,processedSourceBytes:w,totalSourceBytes:w}).refine(s=>s.completedNotes<=s.totalNotes&&s.processedSourceBytes<=s.totalSourceBytes),oe=T({startupStatus:_(1),daemonVersion:b().min(1).optional(),attemptId:b().min(1),phase:C(["preparing","indexing","finalizing","ready","failed"]),elapsedMs:w,phaseElapsedMs:w,progressAgeMs:w,retryAfterMs:U().int().min(L).max(F).optional(),progress:ie.optional(),estimatedRemainingMs:w.optional(),finalizingStep:C(["anchors","committing","services"]).optional(),failure:T({code:b().min(1),message:b().min(1)}).optional()}).refine(s=>(s.phase==="ready"||s.phase==="failed"?s.retryAfterMs===void 0:s.retryAfterMs!==void 0)&&(s.phase==="finalizing"?s.finalizingStep!==void 0:s.finalizingStep===void 0)&&(s.phase==="failed"?s.failure!==void 0:s.failure===void 0)&&(s.estimatedRemainingMs===void 0||s.phase==="indexing"));function B(s){const e=oe.safeParse(s);return e.success?e.data:null}function P(s){const e=typeof s=="number"&&Number.isFinite(s)?s:ne;return Math.min(F,Math.max(L,e))}function re(s){const e=s;return typeof e.rpcCode=="number"?e.rpcCode:typeof e.code=="number"?e.code:void 0}function q(s){if(!s||typeof s!="object"||re(s)!==N)return;const e=s.data??{},t=B(e.startup);if(e.code==="daemon-startup-failed"){const i=e.startup?.failure?.message,o=s.message;return{kind:"failed",message:typeof i=="string"&&i.trim()?i:typeof o=="string"?o:"",snapshot:t}}if(!(e.code!=="daemon-not-ready"||e.retryable!==!0))return{kind:"not-ready",retryAfterMs:P(e.retryAfterMs),snapshot:t}}function D(s){const e=s.snapshot??void 0;return s.state==="failed"?{code:N,message:"Daemon startup failed",data:{code:"daemon-startup-failed",retryable:!1,startup:e}}:{code:N,message:"Daemon not ready",data:{code:"daemon-not-ready",retryable:!0,retryAfterMs:P(e?.retryAfterMs),startup:e}}}const ae=5e3,ce=5e3,le=3e4;function he(s){const e=s.snapshot;return JSON.stringify([s.state,s.available,e?.attemptId,e?.phase,e?.finalizingStep,e?.progress?.completedNotes,e?.progress?.totalNotes,e?.estimatedRemainingMs===void 0,(e?.progressAgeMs??0)>=le])}class ue{constructor(e){n(this,"generation",0);n(this,"timer",null);n(this,"snapshot",null);n(this,"lastKey",null);n(this,"lastPublishedAt",0);this.host=e}start(e){this.stop(),this.snapshot=e.snapshot??this.snapshot,this.publish({state:"starting",snapshot:this.snapshot,available:e.snapshot!==null},!0),this.schedule(e.retryAfterMs)}stop(){this.generation++,this.timer&&(clearTimeout(this.timer),this.timer=null)}reset(){this.stop(),this.snapshot=null,this.lastKey=null,this.lastPublishedAt=0}publish(e,t=!1){const i=he(e),o=Date.now();!t&&i===this.lastKey&&o-this.lastPublishedAt<ce||(this.lastKey=i,this.lastPublishedAt=o,this.host.publish(e))}schedule(e){const t=this.generation;this.timer=setTimeout(()=>{if(this.timer=null,t!==this.generation)return;const i=()=>this.poll(t);this.host.track?this.host.track(i):i()},e)}async poll(e){let t;try{t=B(await this.host.request())}catch(i){if(e!==this.generation)return;const o=q(i);if(o?.kind==="failed"){this.stop(),this.host.fail(o.message,o.snapshot);return}if(o?.kind==="not-ready"){this.snapshot=o.snapshot??this.snapshot,this.publish({state:"starting",snapshot:this.snapshot,available:o.snapshot!==null}),this.schedule(o.retryAfterMs);return}this.unavailable();return}if(e===this.generation){if(t===null){this.unavailable();return}if(this.snapshot=t,t.phase==="failed"){this.stop(),this.host.fail(t.failure?.message??"",t);return}if(t.phase==="ready"){this.stop(),this.publish({state:"starting",snapshot:t,available:!0},!0),this.host.handoff(!0);return}this.publish({state:"starting",snapshot:t,available:!0}),this.schedule(P(t.retryAfterMs))}}unavailable(){this.stop(),this.publish({state:"starting",snapshot:this.snapshot,available:!1},!0),this.host.handoff(!1)}}function Pe(s=(()=>{const e=globalThis.__INTENT_RUNTIME_CONFIG__;return e?.intentdWsUrl!==void 0?e.intentdWsUrl:typeof process>"u"?void 0:""})()){if(typeof s!="string")return;const e=s.trim();if(!e)return;if(e.startsWith("/")&&!e.startsWith("//")&&!e.includes("\\")){const o=globalThis.location;if(o?.host&&(o.protocol==="http:"||o.protocol==="https:"))return`${o.protocol==="https:"?"wss:":"ws:"}//${o.host}${e}`;console.warn("[browser-websocket-transport] Ignoring same-origin WebSocket path without an HTTP page origin");return}let t;try{t=new URL(e)}catch{console.warn("[browser-websocket-transport] Ignoring browser WebSocket URL: expected ws:// or wss://");return}if(t.protocol!=="ws:"&&t.protocol!=="wss:"){console.warn("[browser-websocket-transport] Ignoring browser WebSocket URL: expected ws:// or wss://");return}const i=t.hostname==="localhost"||t.hostname==="127.0.0.1"||t.hostname==="[::1]";if(t.protocol==="ws:"&&!i){console.warn("[browser-websocket-transport] Ignoring insecure remote WebSocket URL: use wss://");return}return e}function de(s){try{const e=new URL(s);return e.username="",e.password="",e.search="",e.hash="",e.toString()}catch{return s.replace(/[?#].*$/,"").replace(/^([a-z][a-z0-9+.-]*:\/\/)[^/]*@/i,"$1")}}const fe={[-32700]:"PARSE_ERROR",[-32600]:"INVALID_REQUEST",[-32601]:"METHOD_NOT_FOUND",[-32602]:"INVALID_PARAMS",[-32603]:"INTERNAL_ERROR"};function pe(s){const e=fe[s];return e||(s<=-32e3&&s>=-32099?"SERVER_ERROR":"UNKNOWN_ERROR")}function me(s){if(s&&typeof s=="object"&&"code"in s){const e=s.code;if(typeof e=="string"&&e.length>0)return e}}function O(s){const e=me(s.data)??pe(s.code),t=s.data&&typeof s.data=="object"?{...s.data,code:e}:typeof s.data=="string"&&s.data.length>0?{code:e,detail:s.data}:{code:e};return{code:e,message:s.message,data:t,rpcCode:s.code}}function E(s){if(s instanceof u)return s;const e=s instanceof Error?s.message:String(s);return new u({code:"TRANSPORT_ERROR",message:e,data:{code:"TRANSPORT_ERROR"}})}const ge=3e4,Re=1e3,ye=3e4,Se=1e4,be=5e3;class we{constructor(e){n(this,"url");n(this,"webSocketFactory");n(this,"requestTimeoutMs");n(this,"reconnectDelayMs");n(this,"maxReconnectDelayMs");n(this,"connectTimeoutMs");n(this,"socket",null);n(this,"connected",!1);n(this,"connecting",!1);n(this,"disposed",!1);n(this,"requestId",0);n(this,"currentReconnectDelay");n(this,"reconnectTimer",null);n(this,"connectTimer",null);n(this,"connectWaiters",[]);n(this,"clientId");n(this,"helloConfirmed",!1);n(this,"acknowledgedHello",null);n(this,"nodeCapabilities",null);n(this,"capabilityHelloGeneration",0);n(this,"reviewMonitoring");n(this,"reviewMonitoringRecipient");n(this,"reviewMonitoringEnabled",!1);n(this,"ordinaryHello",!1);n(this,"monitorRetry",null);n(this,"monitorRetirements",new Set);n(this,"monitorReady",new Set);n(this,"protocolVersion",null);n(this,"helloError",new u({code:"UNAVAILABLE",message:"client.hello has not completed on this connection"}));n(this,"pending",new Map);n(this,"hasBeenConnected",!1);n(this,"hasConnectionFailed",!1);n(this,"notificationHandlers",new Set);n(this,"reconnectedHandlers",new Set);n(this,"statusHandlers",new Set);n(this,"lastNotifiedStatus","disconnected");n(this,"startupState",null);n(this,"startupSocket",null);n(this,"startupPoller",new ue({request:()=>{const e=this.startupSocket;return e?this.requestOnSocket(se,void 0,{timeoutMs:ae},e):Promise.reject(this.startupRefusal())},publish:e=>this.updateStartup(e),handoff:e=>this.startupHandoff(e),fail:(e,t)=>this.failStartup(e,t)}));n(this,"startupHandlers",new Set);this.reviewMonitoringEnabled=v(e.reviewMonitoring),this.reviewMonitoringRecipient=v(e.reviewMonitoring)?e.reviewMonitoring:void 0,this.url=e.url,this.webSocketFactory=e.webSocketFactory??(t=>new WebSocket(t)),this.requestTimeoutMs=e.requestTimeoutMs??ge,this.reconnectDelayMs=e.reconnectDelayMs??Re,this.maxReconnectDelayMs=e.maxReconnectDelayMs??ye,this.connectTimeoutMs=e.connectTimeoutMs??Se,this.currentReconnectDelay=this.reconnectDelayMs}isAvailable(){return!this.disposed}async readPrincipal(){if(this.disposed)throw new u({code:"UNAVAILABLE",message:"Backend transport disposed"});const e=await this.ensureConnected(),t=this.capabilityHelloGeneration,i=structuredClone(this.acknowledgedHello),o=()=>!this.disposed&&this.connected&&this.socket===e&&this.capabilityHelloGeneration===t&&this.acknowledgedHello!==null;if(!o())throw this.helloError;const a=await this.requestOnSocket("principal.me",{},void 0,e);if(!o())throw new u({code:"UNAVAILABLE",message:"Principal discovery connection changed"});return{hello:i,principal:a}}async observeNodeCapabilities(){if(this.disposed)throw new u({code:"UNAVAILABLE",message:"Backend transport disposed"});const e=await this.ensureConnected();if(this.disposed||!this.connected||this.socket!==e)throw new u({code:"UNAVAILABLE",message:"Backend connection changed"});return{server:{capabilities:this.nodeCapabilities}}}onMonitorReconnected(e){this.monitorReady.add(e);const t=this.onReconnected(e);return()=>{this.monitorReady.delete(e),t()}}prMonitorBackendId(){return de(this.url)}async capturePrMonitorSession(e){const t=await this.ensureConnected(),i=this.capabilityHelloGeneration,o=()=>new u({code:"PR_MONITOR_SESSION_RETIRED",message:"Monitor connection unavailable"});let a,d=!1;const R=new Set,m=new Set,r=()=>{if(!d){d=!0,this.monitorRetirements.delete(r),a?.close();for(const l of R)l();R.clear()}},f=()=>!d&&!this.disposed&&this.connected&&this.helloConfirmed&&this.socket===t&&i===this.capabilityHelloGeneration,c=()=>f()&&(!a||a.current());if(!c())throw o();this.monitorRetirements.add(r);const g=v(this.reviewMonitoring);let M=g?"consumer-pending":"unsupported";if(g&&this.reviewMonitoringEnabled&&this.ordinaryHello&&this.clientId)try{if(a=new Y(this.webSocketFactory(this.url),this.clientId,Math.min(this.reviewMonitoringRecipient,this.reviewMonitoring),f,this.requestTimeoutMs,this.connectTimeoutMs,()=>{const l=f();r(),l&&this.scheduleMonitorRecovery(t,i)}),await a.ready,!c())throw o();M="supported"}catch(l){const p=f();throw r(),p&&this.scheduleMonitorRecovery(t,i),l}const y=(l,p)=>a?a.request(l,p):this.requestOnSocket(l,p,void 0,t);return{origin:{backendId:this.prMonitorBackendId(),sessionId:crypto.randomUUID(),workspaceId:e},support:M,onRetired(l){return c()?(R.add(l),()=>{R.delete(l)}):(l(),()=>{})},onNotification:l=>(a??this).onNotification(p=>{c()&&l(p)}),request:async(l,p)=>{if(!c()||M==="consumer-pending"||p.workspaceId!==e)throw o();const k=await y(l,p),h=l==="events.subscribe"?k?.subscriptionId:void 0;if(!c())throw h&&this.socket===t&&this.connected&&i===this.capabilityHelloGeneration&&y("events.unsubscribe",{workspaceId:e,subscriptionId:h}).catch(()=>{}),o();return h&&m.add(h),l==="events.unsubscribe"&&m.delete(String(p.subscriptionId)),k},release:async()=>{const l=c();r(),l&&!a&&await Promise.all([...m].map(p=>this.requestOnSocket("events.unsubscribe",{workspaceId:e,subscriptionId:p},void 0,t).catch(()=>{})))}}}request(e,t,i){return this.requestOnSocket(e,t,i)}requestOnSocket(e,t,i,o){if(i?.localMachine)return Promise.reject(new u({code:"UNAVAILABLE",message:"Local machine requests require the desktop bridge"}));if(this.disposed)return Promise.reject(new u({code:"UNAVAILABLE",message:"Backend transport disposed"}));if(!o&&this.startupState?.state==="starting")return Promise.reject(new u(O(D(this.startupState))));const a=++this.requestId,d=i?.timeoutMs,R=typeof d=="number"&&Number.isFinite(d)&&d>0?d:this.requestTimeoutMs;return new Promise((m,r)=>{let f=!1;const c=setTimeout(()=>{f=!0,this.pending.delete(a),r(new u({code:"TIMEOUT",message:`JSON-RPC request timed out: ${e}`,data:{code:"TIMEOUT"}}))},R),g=y=>{clearTimeout(c),r(E(y))},M=y=>{if(f)return;if(this.disposed||this.socket!==y){g(new u({code:"TRANSPORT_ERROR",message:"Connection replaced"}));return}if(e==="presence.update"&&!this.helloConfirmed){g(this.helloError);return}try{ee(e,t,this.protocolVersion)}catch(h){g(h);return}let l=e==="client.hello"&&this.clientId?{clientId:this.clientId,...t}:t;if(e==="client.hello"){const h={...l},S={...h.capabilities};Object.prototype.hasOwnProperty.call(S,"reviewMonitoring")&&(this.reviewMonitoringEnabled=this.reviewMonitoringRecipient!==void 0&&v(S.reviewMonitoring)),delete S.reviewMonitoring,delete h.connectionRole,h.capabilities!==void 0&&(h.capabilities=S),l=h}const p=JSON.stringify({jsonrpc:"2.0",id:a,method:e,params:l}),k=e==="client.hello"?++this.capabilityHelloGeneration:0;if(e==="client.hello"){this.helloConfirmed=!1,this.ordinaryHello=!1,this.clearMonitorRecovery(),this.nodeCapabilities=null,this.reviewMonitoring=void 0;for(const h of[...this.monitorRetirements])h();this.acknowledgedHello=null}this.pending.set(a,{method:e,timeout:c,resolve:h=>{if(e==="client.hello"&&this.socket===y&&k===this.capabilityHelloGeneration){const S=h?.clientId;if(typeof S=="string"&&S.length>0){const H=h.server?.capabilities;if(this.clientId=S,this.reviewMonitoring=H?.reviewMonitoring,this.ordinaryHello=h.connectionRole===void 0,this.acknowledgedHello=structuredClone(h),this.nodeCapabilities=Q(H),this.protocolVersion=z(h.protocolVersion),this.helloConfirmed=!0,this.connected)for(const W of this.monitorReady)W()}}m(h)},reject:r});try{y.send(p)}catch(h){clearTimeout(c),this.pending.delete(a),r(E(h))}};o?M(o):this.connected&&this.socket?M(this.socket):this.ensureConnected().then(M,g)})}async subscribe(e){return this.request("events.subscribe",e)}async unsubscribe(e,t){try{await this.request("events.unsubscribe",{subscriptionId:e,...t!==void 0?{workspaceId:t}:{}})}catch{}}onNotification(e){return this.notificationHandlers.add(e),()=>this.notificationHandlers.delete(e)}onReconnected(e){return this.reconnectedHandlers.add(e),()=>this.reconnectedHandlers.delete(e)}getConnectionStatus(){return this.connected?"connected":this.connecting?"connecting":"disconnected"}getStartupState(){return this.startupState}onStartupChange(e){return this.startupHandlers.add(e),()=>this.startupHandlers.delete(e)}onConnectionStatusChange(e){return this.statusHandlers.add(e),()=>this.statusHandlers.delete(e)}dispose(){if(this.disposed)return;this.disposed=!0,this.clearReconnect(),this.clearConnectTimer();const e=new u({code:"UNAVAILABLE",message:"Backend transport disposed"});this.failPending(e),this.failWaiters(e),this.teardownSocket(),this.connected=!1,this.connecting=!1,this.notifyStatusChange(),this.notificationHandlers.clear(),this.reconnectedHandlers.clear(),this.statusHandlers.clear(),this.startupHandlers.clear()}ensureConnected(){return this.connected&&this.socket?Promise.resolve(this.socket):new Promise((e,t)=>{this.connectWaiters.push({resolve:e,reject:t}),this.start()})}start(){this.disposed||this.socket||this.connecting||this.reconnectTimer||this.connect()}connect(){this.clearReconnect(),this.connecting=!0,this.notifyStatusChange();let e;try{e=this.webSocketFactory(this.url)}catch(t){this.connecting=!1,this.onConnectionFailure(E(t));return}this.socket=e,this.helloConfirmed=!1,this.connectTimer=setTimeout(()=>{this.connectTimer=null,!(this.socket!==e||this.connected)&&(this.connecting=!1,this.onConnectionFailure(new u({code:"TRANSPORT_ERROR",message:`WebSocket connect attempt timed out after ${this.connectTimeoutMs}ms`})))},this.connectTimeoutMs),e.onopen=()=>{this.socket===e&&this.onConnected(e)},e.onmessage=t=>{this.socket===e&&this.onMessage(t.data)},e.onerror=null,e.onclose=()=>{this.socket===e&&(this.connecting=!1,this.onConnectionFailure(new u({code:"TRANSPORT_ERROR",message:"WebSocket connection closed"})))}}onConnected(e){this.clearConnectTimer(),this.performHelloHandshake(e)}async performHelloHandshake(e){try{await this.requestOnSocket("client.hello",{},{timeoutMs:Math.min(this.requestTimeoutMs,be)},e)}catch(o){if(this.disposed||this.socket!==e)return;const a=q(o);if(a){this.enterStartup(e,a);return}this.helloError=E(o)}if(this.disposed||this.socket!==e)return;this.startupPoller.reset(),this.startupSocket=null;const t=this.startupState!==null;this.startupState=null,this.connecting=!1,this.connected=!0,this.currentReconnectDelay=this.reconnectDelayMs;const i=this.hasBeenConnected||this.hasConnectionFailed;if(this.hasBeenConnected=!0,this.hasConnectionFailed=!1,this.notifyStatusChange(),t)for(const o of[...this.startupHandlers])o(null);if(this.flushWaiters(e),i)for(const o of[...this.reconnectedHandlers])o()}onConnectionFailure(e){if(this.clearConnectTimer(),!this.disposed){if(this.startupSocket!==null&&this.startupSocket===this.socket){this.startupHandoff(!0);return}this.startupState?.state==="starting"&&(this.startupPoller.reset(),this.updateStartup(null)),this.hasConnectionFailed=!0,this.connected=!1,this.notifyStatusChange(),this.teardownSocket(),this.failPending(e),this.failWaiters(e),this.scheduleReconnect()}}notifyStatusChange(){const e=this.getConnectionStatus();if(e!==this.lastNotifiedStatus){this.lastNotifiedStatus=e;for(const t of[...this.statusHandlers])t(e)}}onMessage(e){if(typeof e!="string")return;let t;try{t=JSON.parse(e)}catch{console.warn("[browser-websocket-transport] Dropping unparseable frame");return}if(!t||typeof t!="object")return;const i=typeof t.method=="string",o=t.id!=null;if(i&&o){this.sendFrame({jsonrpc:"2.0",id:t.id,error:{code:-32601,message:`Method not found: ${String(t.method)}`}});return}if(o){const a=Number(t.id),d=this.pending.get(a);if(!d)return;this.pending.delete(a),clearTimeout(d.timeout),t.error?d.reject(new u(O(t.error))):d.resolve(t.result);return}if(i){const a={method:t.method,params:t.params};for(const d of[...this.notificationHandlers])d(a)}}sendFrame(e){try{this.socket?.send(JSON.stringify(e))}catch{}}scheduleReconnect(){if(this.disposed||this.reconnectTimer)return;const e=this.currentReconnectDelay;this.reconnectTimer=setTimeout(()=>{this.reconnectTimer=null,this.currentReconnectDelay=Math.min(e*2,this.maxReconnectDelayMs),this.disposed||this.connect()},e)}clearReconnect(){this.reconnectTimer&&(clearTimeout(this.reconnectTimer),this.reconnectTimer=null)}clearConnectTimer(){this.connectTimer&&(clearTimeout(this.connectTimer),this.connectTimer=null)}scheduleMonitorRecovery(e,t){this.monitorRetry||this.disposed||(this.monitorRetry=setTimeout(()=>{if(this.monitorRetry=null,!this.disposed&&this.connected&&this.socket===e&&this.capabilityHelloGeneration===t)for(const i of[...this.monitorReady])i()},this.reconnectDelayMs))}clearMonitorRecovery(){this.monitorRetry&&clearTimeout(this.monitorRetry),this.monitorRetry=null}teardownSocket(){this.startupPoller.stop(),this.startupSocket=null,this.reviewMonitoring=void 0,this.clearMonitorRecovery();for(const t of[...this.monitorRetirements])t();if(this.acknowledgedHello=null,this.nodeCapabilities=null,this.capabilityHelloGeneration+=1,this.protocolVersion=null,!this.socket)return;const e=this.socket;this.socket=null,e.onopen=null,e.onmessage=null,e.onerror=null,e.onclose=null;try{e.close()}catch{}}updateStartup(e){this.startupState=e?Object.freeze({...e}):null;for(const t of[...this.startupHandlers])t(this.startupState)}startupRefusal(){return this.startupState?new u(O(D(this.startupState))):new u({code:"TRANSPORT_ERROR",message:"WebSocket connection closed"})}enterStartup(e,t){if(this.hasConnectionFailed=!0,t.kind==="failed"){this.failStartup(t.message,t.snapshot);return}this.startupSocket=e,this.startupPoller.start(t),this.failWaiters(this.startupRefusal())}startupHandoff(e){const t=this.startupRefusal();if(this.teardownSocket(),this.failPending(t),this.disposed)return;this.connecting=!0,this.notifyStatusChange(),this.clearReconnect();let i=this.reconnectDelayMs;e?this.currentReconnectDelay=this.reconnectDelayMs:(i=this.currentReconnectDelay,this.currentReconnectDelay=Math.min(i*2,this.maxReconnectDelayMs)),this.reconnectTimer=setTimeout(()=>{this.reconnectTimer=null,this.disposed||this.connect()},i)}failStartup(e,t){this.startupPoller.stop(),this.startupSocket=null,this.hasConnectionFailed=!0,this.updateStartup({state:"failed",snapshot:t,available:t!==null,message:e}),this.connecting=!1,this.onConnectionFailure(this.startupRefusal())}failPending(e){for(const t of this.pending.values())clearTimeout(t.timeout),t.reject(e);this.pending.clear()}flushWaiters(e){const t=this.connectWaiters;this.connectWaiters=[];for(const i of t)i.resolve(e)}failWaiters(e){const t=this.connectWaiters;this.connectWaiters=[];for(const i of t)i.reject(e)}}function He(s){return new we(s)}let A=null;const I=new Set;function De(s){A=s;for(const e of[...I])e(s)}function Ue(){return A}function Le(s){return I.add(s),A&&s(A),()=>I.delete(s)}export{u as B,Oe as M,_e as P,Ie as R,Ae as a,Ce as b,He as c,Ne as d,Pe as e,v as f,Ue as g,Ee as i,Le as o,De as r,de as s};
1
+ var j=Object.defineProperty;var V=(s,e,t)=>e in s?j(s,e,{enumerable:!0,configurable:!0,writable:!0,value:t}):s[e]=t;var n=(s,e,t)=>V(s,typeof e!="symbol"?e+"":e,t);import{f as x,j as G,p as z}from"./uXuxG9cN.js";import{u as J,o as T,_ as C,s as b,l as _,n as U}from"./CIyUrgF0.js";import{bm as $}from"./1KDVFF23.js";class u extends Error{constructor(t){super(t.message);n(this,"code");n(this,"data");n(this,"rpcCode");this.name="BackendError",this.code=t.code,this.data=t.data,this.rpcCode=t.rpcCode}}function Ee(s){return!s||typeof s!="object"?!1:typeof s.rpcCode=="number"}const K=-32003;function Ce(s){return!s||typeof s!="object"?!1:s.rpcCode===K}const Ae=x.refine(s=>s.repository.provider==="github"&&s.kind==="pull-request"||s.repository.provider==="gitlab"&&s.kind==="merge-request"),Oe=J([T({state:C(["available","pending","reconnect-required","restricted","disabled","unsupported","unavailable","unknown"])}),T({state:_("backoff"),retryAt:b()}),T({state:_("unresolved"),reason:C(["missing-provenance","unverified-import","invalid-target","missing-authority","unknown"]).catch("unknown")})]).catch({state:"unknown"}),_e=T({backendId:b().min(1),sessionId:b().min(1),workspaceId:b().min(1)}).strict();function v(s){return typeof s=="number"&&Number.isSafeInteger(s)&&s>=1}function Ne(s){if(s.resource||s.monitorAvailability||s.title===null||s.url===null||s.lastSnapshot===null)return!1;const e=s.lastSnapshot;return!e||!e.availability&&e.isDraft!==null&&e.hasConflicts!==null&&e.isBehind!==null&&Object.values(e.checks).every(t=>t!==null)&&e.approvals.decision!==null&&e.approvals.have!==null&&e.approvals.changesRequested!==null}const Ie=new Set(["agent.getConversation","agent.listUserMessages","agent.getMessageBlock","chat.subscribe","chat.unsubscribe"]);class Y{constructor(e,t,i,o,a,d,R){n(this,"ready");n(this,"acknowledged",!1);n(this,"closed",!1);n(this,"id",0);n(this,"pending",new Map);n(this,"listeners",new Set);n(this,"rejectReady");n(this,"timer");this.socket=e,this.currentSource=o,this.timeoutMs=a,this.onFailure=R,this.ready=new Promise((m,r)=>{this.rejectReady=r,e.onopen=()=>{if(!this.current())return this.fail();this.send("client.hello",{clientId:t,connectionRole:"review-monitor",capabilities:{reviewMonitoring:i}}).then(f=>{const c=f;if(!this.current()||c?.clientId!==t||c?.connectionRole!=="review-monitor"||!v(c?.server?.capabilities?.reviewMonitoring))return this.fail();this.acknowledged=!0,clearTimeout(this.timer),m()},()=>this.fail())}}),this.timer=setTimeout(()=>this.fail(),d),e.onerror=()=>this.fail(),e.onclose=()=>this.fail(),e.onmessage=({data:m})=>{if(!this.current()||typeof m!="string")return;let r;try{r=JSON.parse(m)}catch{return}if(!r||typeof r!="object")return;if(typeof r.method=="string"){if(r.id!=null){try{e.send(JSON.stringify({jsonrpc:"2.0",id:r.id,error:{code:-32601,message:"Method not found"}}))}catch{this.fail()}return}if(this.acknowledged)for(const c of[...this.listeners])c({method:r.method,params:r.params});return}if(typeof r.id!="number")return;const f=this.pending.get(r.id);if(f)if(this.pending.delete(r.id),clearTimeout(f.timer),r.error){const c=r.error.data,g=c&&typeof c=="object"&&"code"in c&&typeof c.code=="string"?c.code:"SERVER_ERROR";f.reject(new u({code:g,message:typeof r.error.message=="string"?r.error.message:"Monitor request failed",data:c,rpcCode:typeof r.error.code=="number"?r.error.code:void 0}))}else f.resolve(r.result)}}current(){return!this.closed&&this.currentSource()}onNotification(e){return this.listeners.add(e),()=>this.listeners.delete(e)}request(e,t){return!this.acknowledged||e==="client.hello"?Promise.reject(this.unavailable()):this.send(e,t)}close(){if(this.closed)return;this.closed=!0,this.acknowledged=!1,clearTimeout(this.timer);const e=this.unavailable();this.rejectReady(e);for(const t of this.pending.values())clearTimeout(t.timer),t.reject(e);this.pending.clear(),this.listeners.clear(),this.socket.onopen=this.socket.onmessage=this.socket.onerror=this.socket.onclose=null;try{this.socket.close()}catch{}}fail(){this.closed||(this.close(),this.onFailure())}unavailable(){return new u({code:"PR_MONITOR_SESSION_RETIRED",message:"Monitor attachment unavailable"})}send(e,t){if(!this.current())return Promise.reject(this.unavailable());const i=++this.id;return new Promise((o,a)=>{const d=setTimeout(()=>{this.pending.delete(i),a(new u({code:"TIMEOUT",message:`JSON-RPC request timed out: ${e}`}))},this.timeoutMs);this.pending.set(i,{resolve:o,reject:a,timer:d});try{this.socket.send(JSON.stringify({jsonrpc:"2.0",id:i,method:e,params:t}))}catch{this.fail()}})}}const X=["agentNodes","localNodeIsolation","agentPlatformRouting","workspaceMembershipEvents","rawScreenshotRetention","chiefAttachments","noteTruncatedRead","remoteMachines","remoteInitialAgent","remoteMachineClaim","machineOrder","remoteLinkTraffic","cloudMachines","cloudMachineEntries","cloudMachineProviders"];function Q(s){return Object.freeze(Object.fromEntries(X.map(e=>[e,s?.[e]===1?1:0])))}function Z(s){if(!G(s,11,1))throw new Error($.files_secondaryRoot_unsupported_error())}function ee(s,e,t){te(s,e)&&Z(t)}function te(s,e){if(s!=="file.read"&&s!=="file.readChunk")return!1;const t=e?.gitRootId;return typeof t=="string"&&!!t.trim()}const N=-32012,se="system.startupStatus",ne=1e3,L=1e3,F=3e4,w=U().int().nonnegative().max(Number.MAX_SAFE_INTEGER),ie=T({completedNotes:w,totalNotes:w,processedSourceBytes:w,totalSourceBytes:w}).refine(s=>s.completedNotes<=s.totalNotes&&s.processedSourceBytes<=s.totalSourceBytes),oe=T({startupStatus:_(1),daemonVersion:b().min(1).optional(),attemptId:b().min(1),phase:C(["preparing","indexing","finalizing","ready","failed"]),elapsedMs:w,phaseElapsedMs:w,progressAgeMs:w,retryAfterMs:U().int().min(L).max(F).optional(),progress:ie.optional(),estimatedRemainingMs:w.optional(),finalizingStep:C(["anchors","committing","services"]).optional(),failure:T({code:b().min(1),message:b().min(1)}).optional()}).refine(s=>(s.phase==="ready"||s.phase==="failed"?s.retryAfterMs===void 0:s.retryAfterMs!==void 0)&&(s.phase==="finalizing"?s.finalizingStep!==void 0:s.finalizingStep===void 0)&&(s.phase==="failed"?s.failure!==void 0:s.failure===void 0)&&(s.estimatedRemainingMs===void 0||s.phase==="indexing"));function B(s){const e=oe.safeParse(s);return e.success?e.data:null}function P(s){const e=typeof s=="number"&&Number.isFinite(s)?s:ne;return Math.min(F,Math.max(L,e))}function re(s){const e=s;return typeof e.rpcCode=="number"?e.rpcCode:typeof e.code=="number"?e.code:void 0}function q(s){if(!s||typeof s!="object"||re(s)!==N)return;const e=s.data??{},t=B(e.startup);if(e.code==="daemon-startup-failed"){const i=e.startup?.failure?.message,o=s.message;return{kind:"failed",message:typeof i=="string"&&i.trim()?i:typeof o=="string"?o:"",snapshot:t}}if(!(e.code!=="daemon-not-ready"||e.retryable!==!0))return{kind:"not-ready",retryAfterMs:P(e.retryAfterMs),snapshot:t}}function D(s){const e=s.snapshot??void 0;return s.state==="failed"?{code:N,message:"Daemon startup failed",data:{code:"daemon-startup-failed",retryable:!1,startup:e}}:{code:N,message:"Daemon not ready",data:{code:"daemon-not-ready",retryable:!0,retryAfterMs:P(e?.retryAfterMs),startup:e}}}const ae=5e3,ce=5e3,le=3e4;function he(s){const e=s.snapshot;return JSON.stringify([s.state,s.available,e?.attemptId,e?.phase,e?.finalizingStep,e?.progress?.completedNotes,e?.progress?.totalNotes,e?.estimatedRemainingMs===void 0,(e?.progressAgeMs??0)>=le])}class ue{constructor(e){n(this,"generation",0);n(this,"timer",null);n(this,"snapshot",null);n(this,"lastKey",null);n(this,"lastPublishedAt",0);this.host=e}start(e){this.stop(),this.snapshot=e.snapshot??this.snapshot,this.publish({state:"starting",snapshot:this.snapshot,available:e.snapshot!==null},!0),this.schedule(e.retryAfterMs)}stop(){this.generation++,this.timer&&(clearTimeout(this.timer),this.timer=null)}reset(){this.stop(),this.snapshot=null,this.lastKey=null,this.lastPublishedAt=0}publish(e,t=!1){const i=he(e),o=Date.now();!t&&i===this.lastKey&&o-this.lastPublishedAt<ce||(this.lastKey=i,this.lastPublishedAt=o,this.host.publish(e))}schedule(e){const t=this.generation;this.timer=setTimeout(()=>{if(this.timer=null,t!==this.generation)return;const i=()=>this.poll(t);this.host.track?this.host.track(i):i()},e)}async poll(e){let t;try{t=B(await this.host.request())}catch(i){if(e!==this.generation)return;const o=q(i);if(o?.kind==="failed"){this.stop(),this.host.fail(o.message,o.snapshot);return}if(o?.kind==="not-ready"){this.snapshot=o.snapshot??this.snapshot,this.publish({state:"starting",snapshot:this.snapshot,available:o.snapshot!==null}),this.schedule(o.retryAfterMs);return}this.unavailable();return}if(e===this.generation){if(t===null){this.unavailable();return}if(this.snapshot=t,t.phase==="failed"){this.stop(),this.host.fail(t.failure?.message??"",t);return}if(t.phase==="ready"){this.stop(),this.publish({state:"starting",snapshot:t,available:!0},!0),this.host.handoff(!0);return}this.publish({state:"starting",snapshot:t,available:!0}),this.schedule(P(t.retryAfterMs))}}unavailable(){this.stop(),this.publish({state:"starting",snapshot:this.snapshot,available:!1},!0),this.host.handoff(!1)}}function Pe(s=(()=>{const e=globalThis.__INTENT_RUNTIME_CONFIG__;return e?.intentdWsUrl!==void 0?e.intentdWsUrl:typeof process>"u"?void 0:""})()){if(typeof s!="string")return;const e=s.trim();if(!e)return;if(e.startsWith("/")&&!e.startsWith("//")&&!e.includes("\\")){const o=globalThis.location;if(o?.host&&(o.protocol==="http:"||o.protocol==="https:"))return`${o.protocol==="https:"?"wss:":"ws:"}//${o.host}${e}`;console.warn("[browser-websocket-transport] Ignoring same-origin WebSocket path without an HTTP page origin");return}let t;try{t=new URL(e)}catch{console.warn("[browser-websocket-transport] Ignoring browser WebSocket URL: expected ws:// or wss://");return}if(t.protocol!=="ws:"&&t.protocol!=="wss:"){console.warn("[browser-websocket-transport] Ignoring browser WebSocket URL: expected ws:// or wss://");return}const i=t.hostname==="localhost"||t.hostname==="127.0.0.1"||t.hostname==="[::1]";if(t.protocol==="ws:"&&!i){console.warn("[browser-websocket-transport] Ignoring insecure remote WebSocket URL: use wss://");return}return e}function de(s){try{const e=new URL(s);return e.username="",e.password="",e.search="",e.hash="",e.toString()}catch{return s.replace(/[?#].*$/,"").replace(/^([a-z][a-z0-9+.-]*:\/\/)[^/]*@/i,"$1")}}const fe={[-32700]:"PARSE_ERROR",[-32600]:"INVALID_REQUEST",[-32601]:"METHOD_NOT_FOUND",[-32602]:"INVALID_PARAMS",[-32603]:"INTERNAL_ERROR"};function pe(s){const e=fe[s];return e||(s<=-32e3&&s>=-32099?"SERVER_ERROR":"UNKNOWN_ERROR")}function me(s){if(s&&typeof s=="object"&&"code"in s){const e=s.code;if(typeof e=="string"&&e.length>0)return e}}function O(s){const e=me(s.data)??pe(s.code),t=s.data&&typeof s.data=="object"?{...s.data,code:e}:typeof s.data=="string"&&s.data.length>0?{code:e,detail:s.data}:{code:e};return{code:e,message:s.message,data:t,rpcCode:s.code}}function E(s){if(s instanceof u)return s;const e=s instanceof Error?s.message:String(s);return new u({code:"TRANSPORT_ERROR",message:e,data:{code:"TRANSPORT_ERROR"}})}const ge=3e4,Re=1e3,ye=3e4,Se=1e4,be=5e3;class we{constructor(e){n(this,"url");n(this,"webSocketFactory");n(this,"requestTimeoutMs");n(this,"reconnectDelayMs");n(this,"maxReconnectDelayMs");n(this,"connectTimeoutMs");n(this,"socket",null);n(this,"connected",!1);n(this,"connecting",!1);n(this,"disposed",!1);n(this,"requestId",0);n(this,"currentReconnectDelay");n(this,"reconnectTimer",null);n(this,"connectTimer",null);n(this,"connectWaiters",[]);n(this,"clientId");n(this,"helloConfirmed",!1);n(this,"acknowledgedHello",null);n(this,"nodeCapabilities",null);n(this,"capabilityHelloGeneration",0);n(this,"reviewMonitoring");n(this,"reviewMonitoringRecipient");n(this,"reviewMonitoringEnabled",!1);n(this,"ordinaryHello",!1);n(this,"monitorRetry",null);n(this,"monitorRetirements",new Set);n(this,"monitorReady",new Set);n(this,"protocolVersion",null);n(this,"helloError",new u({code:"UNAVAILABLE",message:"client.hello has not completed on this connection"}));n(this,"pending",new Map);n(this,"hasBeenConnected",!1);n(this,"hasConnectionFailed",!1);n(this,"notificationHandlers",new Set);n(this,"reconnectedHandlers",new Set);n(this,"statusHandlers",new Set);n(this,"lastNotifiedStatus","disconnected");n(this,"startupState",null);n(this,"startupSocket",null);n(this,"startupPoller",new ue({request:()=>{const e=this.startupSocket;return e?this.requestOnSocket(se,void 0,{timeoutMs:ae},e):Promise.reject(this.startupRefusal())},publish:e=>this.updateStartup(e),handoff:e=>this.startupHandoff(e),fail:(e,t)=>this.failStartup(e,t)}));n(this,"startupHandlers",new Set);this.reviewMonitoringEnabled=v(e.reviewMonitoring),this.reviewMonitoringRecipient=v(e.reviewMonitoring)?e.reviewMonitoring:void 0,this.url=e.url,this.webSocketFactory=e.webSocketFactory??(t=>new WebSocket(t)),this.requestTimeoutMs=e.requestTimeoutMs??ge,this.reconnectDelayMs=e.reconnectDelayMs??Re,this.maxReconnectDelayMs=e.maxReconnectDelayMs??ye,this.connectTimeoutMs=e.connectTimeoutMs??Se,this.currentReconnectDelay=this.reconnectDelayMs}isAvailable(){return!this.disposed}async readPrincipal(){if(this.disposed)throw new u({code:"UNAVAILABLE",message:"Backend transport disposed"});const e=await this.ensureConnected(),t=this.capabilityHelloGeneration,i=structuredClone(this.acknowledgedHello),o=()=>!this.disposed&&this.connected&&this.socket===e&&this.capabilityHelloGeneration===t&&this.acknowledgedHello!==null;if(!o())throw this.helloError;const a=await this.requestOnSocket("principal.me",{},void 0,e);if(!o())throw new u({code:"UNAVAILABLE",message:"Principal discovery connection changed"});return{hello:i,principal:a}}async observeNodeCapabilities(){if(this.disposed)throw new u({code:"UNAVAILABLE",message:"Backend transport disposed"});const e=await this.ensureConnected();if(this.disposed||!this.connected||this.socket!==e)throw new u({code:"UNAVAILABLE",message:"Backend connection changed"});return{server:{capabilities:this.nodeCapabilities}}}onMonitorReconnected(e){this.monitorReady.add(e);const t=this.onReconnected(e);return()=>{this.monitorReady.delete(e),t()}}prMonitorBackendId(){return de(this.url)}async capturePrMonitorSession(e){const t=await this.ensureConnected(),i=this.capabilityHelloGeneration,o=()=>new u({code:"PR_MONITOR_SESSION_RETIRED",message:"Monitor connection unavailable"});let a,d=!1;const R=new Set,m=new Set,r=()=>{if(!d){d=!0,this.monitorRetirements.delete(r),a?.close();for(const l of R)l();R.clear()}},f=()=>!d&&!this.disposed&&this.connected&&this.helloConfirmed&&this.socket===t&&i===this.capabilityHelloGeneration,c=()=>f()&&(!a||a.current());if(!c())throw o();this.monitorRetirements.add(r);const g=v(this.reviewMonitoring);let M=g?"consumer-pending":"unsupported";if(g&&this.reviewMonitoringEnabled&&this.ordinaryHello&&this.clientId)try{if(a=new Y(this.webSocketFactory(this.url),this.clientId,Math.min(this.reviewMonitoringRecipient,this.reviewMonitoring),f,this.requestTimeoutMs,this.connectTimeoutMs,()=>{const l=f();r(),l&&this.scheduleMonitorRecovery(t,i)}),await a.ready,!c())throw o();M="supported"}catch(l){const p=f();throw r(),p&&this.scheduleMonitorRecovery(t,i),l}const y=(l,p)=>a?a.request(l,p):this.requestOnSocket(l,p,void 0,t);return{origin:{backendId:this.prMonitorBackendId(),sessionId:crypto.randomUUID(),workspaceId:e},support:M,onRetired(l){return c()?(R.add(l),()=>{R.delete(l)}):(l(),()=>{})},onNotification:l=>(a??this).onNotification(p=>{c()&&l(p)}),request:async(l,p)=>{if(!c()||M==="consumer-pending"||p.workspaceId!==e)throw o();const k=await y(l,p),h=l==="events.subscribe"?k?.subscriptionId:void 0;if(!c())throw h&&this.socket===t&&this.connected&&i===this.capabilityHelloGeneration&&y("events.unsubscribe",{workspaceId:e,subscriptionId:h}).catch(()=>{}),o();return h&&m.add(h),l==="events.unsubscribe"&&m.delete(String(p.subscriptionId)),k},release:async()=>{const l=c();r(),l&&!a&&await Promise.all([...m].map(p=>this.requestOnSocket("events.unsubscribe",{workspaceId:e,subscriptionId:p},void 0,t).catch(()=>{})))}}}request(e,t,i){return this.requestOnSocket(e,t,i)}requestOnSocket(e,t,i,o){if(i?.localMachine)return Promise.reject(new u({code:"UNAVAILABLE",message:"Local machine requests require the desktop bridge"}));if(this.disposed)return Promise.reject(new u({code:"UNAVAILABLE",message:"Backend transport disposed"}));if(!o&&this.startupState?.state==="starting")return Promise.reject(new u(O(D(this.startupState))));const a=++this.requestId,d=i?.timeoutMs,R=typeof d=="number"&&Number.isFinite(d)&&d>0?d:this.requestTimeoutMs;return new Promise((m,r)=>{let f=!1;const c=setTimeout(()=>{f=!0,this.pending.delete(a),r(new u({code:"TIMEOUT",message:`JSON-RPC request timed out: ${e}`,data:{code:"TIMEOUT"}}))},R),g=y=>{clearTimeout(c),r(E(y))},M=y=>{if(f)return;if(this.disposed||this.socket!==y){g(new u({code:"TRANSPORT_ERROR",message:"Connection replaced"}));return}if(e==="presence.update"&&!this.helloConfirmed){g(this.helloError);return}try{ee(e,t,this.protocolVersion)}catch(h){g(h);return}let l=e==="client.hello"&&this.clientId?{clientId:this.clientId,...t}:t;if(e==="client.hello"){const h={...l},S={...h.capabilities};Object.prototype.hasOwnProperty.call(S,"reviewMonitoring")&&(this.reviewMonitoringEnabled=this.reviewMonitoringRecipient!==void 0&&v(S.reviewMonitoring)),delete S.reviewMonitoring,delete h.connectionRole,h.capabilities!==void 0&&(h.capabilities=S),l=h}const p=JSON.stringify({jsonrpc:"2.0",id:a,method:e,params:l}),k=e==="client.hello"?++this.capabilityHelloGeneration:0;if(e==="client.hello"){this.helloConfirmed=!1,this.ordinaryHello=!1,this.clearMonitorRecovery(),this.nodeCapabilities=null,this.reviewMonitoring=void 0;for(const h of[...this.monitorRetirements])h();this.acknowledgedHello=null}this.pending.set(a,{method:e,timeout:c,resolve:h=>{if(e==="client.hello"&&this.socket===y&&k===this.capabilityHelloGeneration){const S=h?.clientId;if(typeof S=="string"&&S.length>0){const H=h.server?.capabilities;if(this.clientId=S,this.reviewMonitoring=H?.reviewMonitoring,this.ordinaryHello=h.connectionRole===void 0,this.acknowledgedHello=structuredClone(h),this.nodeCapabilities=Q(H),this.protocolVersion=z(h.protocolVersion),this.helloConfirmed=!0,this.connected)for(const W of this.monitorReady)W()}}m(h)},reject:r});try{y.send(p)}catch(h){clearTimeout(c),this.pending.delete(a),r(E(h))}};o?M(o):this.connected&&this.socket?M(this.socket):this.ensureConnected().then(M,g)})}async subscribe(e){return this.request("events.subscribe",e)}async unsubscribe(e,t){try{await this.request("events.unsubscribe",{subscriptionId:e,...t!==void 0?{workspaceId:t}:{}})}catch{}}onNotification(e){return this.notificationHandlers.add(e),()=>this.notificationHandlers.delete(e)}onReconnected(e){return this.reconnectedHandlers.add(e),()=>this.reconnectedHandlers.delete(e)}getConnectionStatus(){return this.connected?"connected":this.connecting?"connecting":"disconnected"}getStartupState(){return this.startupState}onStartupChange(e){return this.startupHandlers.add(e),()=>this.startupHandlers.delete(e)}onConnectionStatusChange(e){return this.statusHandlers.add(e),()=>this.statusHandlers.delete(e)}dispose(){if(this.disposed)return;this.disposed=!0,this.clearReconnect(),this.clearConnectTimer();const e=new u({code:"UNAVAILABLE",message:"Backend transport disposed"});this.failPending(e),this.failWaiters(e),this.teardownSocket(),this.connected=!1,this.connecting=!1,this.notifyStatusChange(),this.notificationHandlers.clear(),this.reconnectedHandlers.clear(),this.statusHandlers.clear(),this.startupHandlers.clear()}ensureConnected(){return this.connected&&this.socket?Promise.resolve(this.socket):new Promise((e,t)=>{this.connectWaiters.push({resolve:e,reject:t}),this.start()})}start(){this.disposed||this.socket||this.connecting||this.reconnectTimer||this.connect()}connect(){this.clearReconnect(),this.connecting=!0,this.notifyStatusChange();let e;try{e=this.webSocketFactory(this.url)}catch(t){this.connecting=!1,this.onConnectionFailure(E(t));return}this.socket=e,this.helloConfirmed=!1,this.connectTimer=setTimeout(()=>{this.connectTimer=null,!(this.socket!==e||this.connected)&&(this.connecting=!1,this.onConnectionFailure(new u({code:"TRANSPORT_ERROR",message:`WebSocket connect attempt timed out after ${this.connectTimeoutMs}ms`})))},this.connectTimeoutMs),e.onopen=()=>{this.socket===e&&this.onConnected(e)},e.onmessage=t=>{this.socket===e&&this.onMessage(t.data)},e.onerror=null,e.onclose=()=>{this.socket===e&&(this.connecting=!1,this.onConnectionFailure(new u({code:"TRANSPORT_ERROR",message:"WebSocket connection closed"})))}}onConnected(e){this.clearConnectTimer(),this.performHelloHandshake(e)}async performHelloHandshake(e){try{await this.requestOnSocket("client.hello",{},{timeoutMs:Math.min(this.requestTimeoutMs,be)},e)}catch(o){if(this.disposed||this.socket!==e)return;const a=q(o);if(a){this.enterStartup(e,a);return}this.helloError=E(o)}if(this.disposed||this.socket!==e)return;this.startupPoller.reset(),this.startupSocket=null;const t=this.startupState!==null;this.startupState=null,this.connecting=!1,this.connected=!0,this.currentReconnectDelay=this.reconnectDelayMs;const i=this.hasBeenConnected||this.hasConnectionFailed;if(this.hasBeenConnected=!0,this.hasConnectionFailed=!1,this.notifyStatusChange(),t)for(const o of[...this.startupHandlers])o(null);if(this.flushWaiters(e),i)for(const o of[...this.reconnectedHandlers])o()}onConnectionFailure(e){if(this.clearConnectTimer(),!this.disposed){if(this.startupSocket!==null&&this.startupSocket===this.socket){this.startupHandoff(!0);return}this.startupState?.state==="starting"&&(this.startupPoller.reset(),this.updateStartup(null)),this.hasConnectionFailed=!0,this.connected=!1,this.notifyStatusChange(),this.teardownSocket(),this.failPending(e),this.failWaiters(e),this.scheduleReconnect()}}notifyStatusChange(){const e=this.getConnectionStatus();if(e!==this.lastNotifiedStatus){this.lastNotifiedStatus=e;for(const t of[...this.statusHandlers])t(e)}}onMessage(e){if(typeof e!="string")return;let t;try{t=JSON.parse(e)}catch{console.warn("[browser-websocket-transport] Dropping unparseable frame");return}if(!t||typeof t!="object")return;const i=typeof t.method=="string",o=t.id!=null;if(i&&o){this.sendFrame({jsonrpc:"2.0",id:t.id,error:{code:-32601,message:`Method not found: ${String(t.method)}`}});return}if(o){const a=Number(t.id),d=this.pending.get(a);if(!d)return;this.pending.delete(a),clearTimeout(d.timeout),t.error?d.reject(new u(O(t.error))):d.resolve(t.result);return}if(i){const a={method:t.method,params:t.params};for(const d of[...this.notificationHandlers])d(a)}}sendFrame(e){try{this.socket?.send(JSON.stringify(e))}catch{}}scheduleReconnect(){if(this.disposed||this.reconnectTimer)return;const e=this.currentReconnectDelay;this.reconnectTimer=setTimeout(()=>{this.reconnectTimer=null,this.currentReconnectDelay=Math.min(e*2,this.maxReconnectDelayMs),this.disposed||this.connect()},e)}clearReconnect(){this.reconnectTimer&&(clearTimeout(this.reconnectTimer),this.reconnectTimer=null)}clearConnectTimer(){this.connectTimer&&(clearTimeout(this.connectTimer),this.connectTimer=null)}scheduleMonitorRecovery(e,t){this.monitorRetry||this.disposed||(this.monitorRetry=setTimeout(()=>{if(this.monitorRetry=null,!this.disposed&&this.connected&&this.socket===e&&this.capabilityHelloGeneration===t)for(const i of[...this.monitorReady])i()},this.reconnectDelayMs))}clearMonitorRecovery(){this.monitorRetry&&clearTimeout(this.monitorRetry),this.monitorRetry=null}teardownSocket(){this.startupPoller.stop(),this.startupSocket=null,this.reviewMonitoring=void 0,this.clearMonitorRecovery();for(const t of[...this.monitorRetirements])t();if(this.acknowledgedHello=null,this.nodeCapabilities=null,this.capabilityHelloGeneration+=1,this.protocolVersion=null,!this.socket)return;const e=this.socket;this.socket=null,e.onopen=null,e.onmessage=null,e.onerror=null,e.onclose=null;try{e.close()}catch{}}updateStartup(e){this.startupState=e?Object.freeze({...e}):null;for(const t of[...this.startupHandlers])t(this.startupState)}startupRefusal(){return this.startupState?new u(O(D(this.startupState))):new u({code:"TRANSPORT_ERROR",message:"WebSocket connection closed"})}enterStartup(e,t){if(this.hasConnectionFailed=!0,t.kind==="failed"){this.failStartup(t.message,t.snapshot);return}this.startupSocket=e,this.startupPoller.start(t),this.failWaiters(this.startupRefusal())}startupHandoff(e){const t=this.startupRefusal();if(this.teardownSocket(),this.failPending(t),this.disposed)return;this.connecting=!0,this.notifyStatusChange(),this.clearReconnect();let i=this.reconnectDelayMs;e?this.currentReconnectDelay=this.reconnectDelayMs:(i=this.currentReconnectDelay,this.currentReconnectDelay=Math.min(i*2,this.maxReconnectDelayMs)),this.reconnectTimer=setTimeout(()=>{this.reconnectTimer=null,this.disposed||this.connect()},i)}failStartup(e,t){this.startupPoller.stop(),this.startupSocket=null,this.hasConnectionFailed=!0,this.updateStartup({state:"failed",snapshot:t,available:t!==null,message:e}),this.connecting=!1,this.onConnectionFailure(this.startupRefusal())}failPending(e){for(const t of this.pending.values())clearTimeout(t.timeout),t.reject(e);this.pending.clear()}flushWaiters(e){const t=this.connectWaiters;this.connectWaiters=[];for(const i of t)i.resolve(e)}failWaiters(e){const t=this.connectWaiters;this.connectWaiters=[];for(const i of t)i.reject(e)}}function He(s){return new we(s)}let A=null;const I=new Set;function De(s){A=s;for(const e of[...I])e(s)}function Ue(){return A}function Le(s){return I.add(s),A&&s(A),()=>I.delete(s)}export{u as B,Oe as M,_e as P,Ie as R,Ae as a,Ce as b,He as c,Ne as d,Pe as e,v as f,Ue as g,Ee as i,Le as o,De as r,de as s};