@intent-hq/web 2.368.0 → 2.369.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 (318) hide show
  1. package/package.json +1 -1
  2. package/web/app/immutable/chunks/{LWpzAIb1.js → -QpfKAxD.js} +1 -1
  3. package/web/app/immutable/chunks/{CuGp4iiZ.js → -cLO88ax.js} +1 -1
  4. package/web/app/immutable/chunks/{Dv8qmtiG.js → 0NGflniG.js} +1 -1
  5. package/web/app/immutable/chunks/{WpDLfp8g.js → 3_UV1UgL.js} +1 -1
  6. package/web/app/immutable/chunks/{CwpJKby0.js → 3kQ-PiCp.js} +1 -1
  7. package/web/app/immutable/chunks/{UdBW3xHf.js → 4GHsM2YX.js} +1 -1
  8. package/web/app/immutable/chunks/51_h0jm2.js +1 -0
  9. package/web/app/immutable/chunks/{BqnLfjrK.js → 5NOp7PNZ.js} +1 -1
  10. package/web/app/immutable/chunks/{aFmAoxnK.js → 6CAGpBb_.js} +1 -1
  11. package/web/app/immutable/chunks/{BM7pSBH1.js → 6GNWsakm.js} +1 -1
  12. package/web/app/immutable/chunks/{C-WGoO9q.js → 6i_wfV3v.js} +1 -1
  13. package/web/app/immutable/chunks/{DZs8iANO.js → 7Uk2VvOl.js} +1 -1
  14. package/web/app/immutable/chunks/{ChcqjzlK.js → 7mowE2Gg.js} +2 -2
  15. package/web/app/immutable/chunks/{DmaI9gJG.js → 8bw9vP4h.js} +1 -1
  16. package/web/app/immutable/chunks/{DSxt_T6i.js → 93RUSyHg.js} +1 -1
  17. package/web/app/immutable/chunks/{Dag-yjBl.js → 9wk-Hes5.js} +1 -1
  18. package/web/app/immutable/chunks/{DwPVMoTd.js → A2MGRlHV.js} +1 -1
  19. package/web/app/immutable/chunks/{BvvwHzHR.js → A9EcmNK3.js} +1 -1
  20. package/web/app/immutable/chunks/{BJbXiNfd.js → B-F2f_Hq.js} +1 -1
  21. package/web/app/immutable/chunks/{Ct-FgWRq.js → B0v5Qiob.js} +1 -1
  22. package/web/app/immutable/chunks/{DPMWmOe5.js → B1sp_kEH.js} +1 -1
  23. package/web/app/immutable/chunks/{yyKL9m5q.js → B2FXFK8l.js} +1 -1
  24. package/web/app/immutable/chunks/{CDKjl22x.js → B6jI9-V_.js} +1 -1
  25. package/web/app/immutable/chunks/{3VXSKzWd.js → B9EhZrTN.js} +1 -1
  26. package/web/app/immutable/chunks/{CJbKgJCP.js → B9I2hDG-.js} +1 -1
  27. package/web/app/immutable/chunks/{BCr3FDPI.js → B9XvejAu.js} +1 -1
  28. package/web/app/immutable/chunks/BBMzDN3i.js +1 -0
  29. package/web/app/immutable/chunks/{BRMZvcr_.js → BBRNc6Tk.js} +1 -1
  30. package/web/app/immutable/chunks/{BrzSX242.js → BCBNqT5t.js} +1 -1
  31. package/web/app/immutable/chunks/{2LHboW99.js → BCSEMQfF.js} +1 -1
  32. package/web/app/immutable/chunks/{Dqg0f2LJ.js → BDP3Y6aK.js} +1 -1
  33. package/web/app/immutable/chunks/{BA1W84cz.js → BDbtK9be.js} +1 -1
  34. package/web/app/immutable/chunks/{B4XVQGzR.js → BE2y8JEQ.js} +1 -1
  35. package/web/app/immutable/chunks/{Dn9uXxwQ.js → BEjEPSxp.js} +1 -1
  36. package/web/app/immutable/chunks/{_Lq6xDqz.js → BEklUrxK.js} +1 -1
  37. package/web/app/immutable/chunks/{BE8dgLGn.js → BEqf00Je.js} +3 -3
  38. package/web/app/immutable/chunks/{DdXuLwef.js → BGP1lrgu.js} +1 -1
  39. package/web/app/immutable/chunks/{qHf9sK0w.js → BHfEypjS.js} +1 -1
  40. package/web/app/immutable/chunks/{DbTuLky4.js → BJPhI2lA.js} +1 -1
  41. package/web/app/immutable/chunks/{DVE3gCYm.js → BKuhcLZN.js} +1 -1
  42. package/web/app/immutable/chunks/{fh3WedHa.js → BLlLxRVW.js} +1 -1
  43. package/web/app/immutable/chunks/{Bjdl3Bcn.js → BLzqYDED.js} +1 -1
  44. package/web/app/immutable/chunks/{BfV-m33h.js → BNp3_sz0.js} +1 -1
  45. package/web/app/immutable/chunks/{Bu3w6q3q.js → BOCp5eAe.js} +4 -4
  46. package/web/app/immutable/chunks/{BWk-f4jj.js → BPCO02B5.js} +1 -1
  47. package/web/app/immutable/chunks/{3uTmxU9o.js → BQDGTBxC.js} +1 -1
  48. package/web/app/immutable/chunks/{C-Avcz-L.js → BQGSaBlM.js} +1 -1
  49. package/web/app/immutable/chunks/{BvM1EUuh.js → BR5vKj6f.js} +1 -1
  50. package/web/app/immutable/chunks/{ChB1u5oS.js → BR9s3igW.js} +1 -1
  51. package/web/app/immutable/chunks/{La7uvQeM.js → BUHAwVs7.js} +1 -1
  52. package/web/app/immutable/chunks/{OnFCkRZq.js → BUNNt_Jr.js} +1 -1
  53. package/web/app/immutable/chunks/{ydU_XNBS.js → BUrTAEns.js} +1 -1
  54. package/web/app/immutable/chunks/{CYYIfm0c.js → BUtBz-tz.js} +1 -1
  55. package/web/app/immutable/chunks/{C5lXC3sE.js → BW94gUhQ.js} +1 -1
  56. package/web/app/immutable/chunks/{-S-Y5qpw.js → BX9VoS92.js} +1 -1
  57. package/web/app/immutable/chunks/{CAA5Pjlt.js → BXkyhXuK.js} +1 -1
  58. package/web/app/immutable/chunks/{CSd0whCN.js → BZ5fAc9N.js} +1 -1
  59. package/web/app/immutable/chunks/{BFg7EHUJ.js → BZpSGd8O.js} +1 -1
  60. package/web/app/immutable/chunks/{CdT83fDm.js → B_QtiZYt.js} +1 -1
  61. package/web/app/immutable/chunks/{DdgRFvxI.js → BbQfjn7f.js} +2 -2
  62. package/web/app/immutable/chunks/{C_xbtvYu.js → BbugAQ9t.js} +1 -1
  63. package/web/app/immutable/chunks/{DfmIEc34.js → Bd_VEON_.js} +1 -1
  64. package/web/app/immutable/chunks/{uz9wJ9h7.js → BgDYQZ_0.js} +1 -1
  65. package/web/app/immutable/chunks/{BAZnizpv.js → BgLPrJ77.js} +1 -1
  66. package/web/app/immutable/chunks/{my3EnaTa.js → BigChyTJ.js} +2 -2
  67. package/web/app/immutable/chunks/{DEaLADF0.js → Bjy4ygfJ.js} +1 -1
  68. package/web/app/immutable/chunks/{DtKQhjG0.js → Bl3mtXZn.js} +1 -1
  69. package/web/app/immutable/chunks/{C6Mf7wiS.js → BlIreYOW.js} +1 -1
  70. package/web/app/immutable/chunks/{CN68o0Xe.js → BnRltR11.js} +1 -1
  71. package/web/app/immutable/chunks/{CgszRxao.js → Bo-8pH0P.js} +1 -1
  72. package/web/app/immutable/chunks/{4ZHcc7E6.js → BoAG71Ap.js} +1 -1
  73. package/web/app/immutable/chunks/{DzoN41_6.js → Boh_rcCH.js} +1 -1
  74. package/web/app/immutable/chunks/{9uaxSDjR.js → BpKFGHfS.js} +1 -1
  75. package/web/app/immutable/chunks/{Cx_kU_DV.js → BpwdP8dq.js} +1 -1
  76. package/web/app/immutable/chunks/{BmBBmxeN.js → BqkCNgyL.js} +1 -1
  77. package/web/app/immutable/chunks/{KJbU5Jwf.js → BrAu7eNn.js} +1 -1
  78. package/web/app/immutable/chunks/{qkupoeeB.js → Bs9TCQJX.js} +1 -1
  79. package/web/app/immutable/chunks/{Cg_iMZyA.js → BsE4jMhr.js} +1 -1
  80. package/web/app/immutable/chunks/{tKPL2CZA.js → BsKhFZ0Q.js} +1 -1
  81. package/web/app/immutable/chunks/{C7p6fkNW.js → BsjFeGOg.js} +1 -1
  82. package/web/app/immutable/chunks/{sRuST45k.js → BuLzqNKd.js} +1 -1
  83. package/web/app/immutable/chunks/{DjtlNmSp.js → BuveYyQe.js} +1 -1
  84. package/web/app/immutable/chunks/BxTyo7yU.js +1 -0
  85. package/web/app/immutable/chunks/{CZmtskyb.js → BxbMMWzz.js} +1 -1
  86. package/web/app/immutable/chunks/{Bpab3i1i.js → BxvIWx6J.js} +1 -1
  87. package/web/app/immutable/chunks/{CoC9Ux29.js → BxwkoIbZ.js} +1 -1
  88. package/web/app/immutable/chunks/{DehqEruM.js → ByCxDC-R.js} +1 -1
  89. package/web/app/immutable/chunks/{Ce7ti2I7.js → ByDB1X4D.js} +1 -1
  90. package/web/app/immutable/chunks/{D6WnG3O5.js → ByN-IDvR.js} +1 -1
  91. package/web/app/immutable/chunks/{D3f6Bdno.js → ByfLGh4b.js} +1 -1
  92. package/web/app/immutable/chunks/{DVqASrmW.js → Bz9mgUtY.js} +1 -1
  93. package/web/app/immutable/chunks/{D3NQrju5.js → BzlXwMsq.js} +1 -1
  94. package/web/app/immutable/chunks/{9L9c83oG.js → C0gEyGJV.js} +1 -1
  95. package/web/app/immutable/chunks/{C-3HGS81.js → C1McR-sz.js} +1 -1
  96. package/web/app/immutable/chunks/{DCaHyJVf.js → C1VlgusM.js} +1 -1
  97. package/web/app/immutable/chunks/{CufGMblq.js → C1ZHQc4S.js} +1 -1
  98. package/web/app/immutable/chunks/{DH9Hqtuz.js → C2jA6pM8.js} +1 -1
  99. package/web/app/immutable/chunks/{DqvOMJZD.js → C3-0e__R.js} +1 -1
  100. package/web/app/immutable/chunks/{BeSpo5mj.js → C5Tw8y-2.js} +1 -1
  101. package/web/app/immutable/chunks/{z7hpXipJ.js → C5X1QcI7.js} +3 -3
  102. package/web/app/immutable/chunks/{BS7XLnm3.js → C5rcw_c7.js} +1 -1
  103. package/web/app/immutable/chunks/{CVuIJUI6.js → C6MAELkY.js} +1 -1
  104. package/web/app/immutable/chunks/{Bx5mj_-o.js → C6T3ggVX.js} +1 -1
  105. package/web/app/immutable/chunks/{DZtsu62T.js → C7Ed4dxf.js} +3 -3
  106. package/web/app/immutable/chunks/{DX7k4FhP.js → C7kFrL62.js} +1 -1
  107. package/web/app/immutable/chunks/{DuH3Z8Tj.js → C8APJtmo.js} +1 -1
  108. package/web/app/immutable/chunks/{ag06q4LL.js → C9UsZ4re.js} +1 -1
  109. package/web/app/immutable/chunks/{C4IUEZO8.js → C9r0mVfa.js} +1 -1
  110. package/web/app/immutable/chunks/{BNXfTFgg.js → CASKMy_V.js} +1 -1
  111. package/web/app/immutable/chunks/{PMgbVYrU.js → CB0sfbT7.js} +1 -1
  112. package/web/app/immutable/chunks/{BAua3HYa.js → CBZ4KqrB.js} +2 -2
  113. package/web/app/immutable/chunks/{DMXV603W.js → CCYJSy4Y.js} +1 -1
  114. package/web/app/immutable/chunks/{BguHhtk8.js → CF1Tu_8c.js} +2 -2
  115. package/web/app/immutable/chunks/{DTmuScj1.js → CFvGekuw.js} +1 -1
  116. package/web/app/immutable/chunks/{CIg56hlz.js → CJCoBdox.js} +1 -1
  117. package/web/app/immutable/chunks/{CPjshegW.js → CJHs_ufb.js} +1 -1
  118. package/web/app/immutable/chunks/{B5xVgX0B.js → CJb9CQqu.js} +1 -1
  119. package/web/app/immutable/chunks/{BpCl78z6.js → CKkGJ_p-.js} +3 -3
  120. package/web/app/immutable/chunks/{mA-tbLJW.js → CLZkKjaI.js} +1 -1
  121. package/web/app/immutable/chunks/{Dbb9v9Pu.js → CMMep18j.js} +1 -1
  122. package/web/app/immutable/chunks/{Dkb27FfT.js → CMZHakZZ.js} +1 -1
  123. package/web/app/immutable/chunks/{a78XW9b7.js → CMqhKAKf.js} +1 -1
  124. package/web/app/immutable/chunks/{CB3yJRaj.js → CN-6Tr26.js} +1 -1
  125. package/web/app/immutable/chunks/{uCE5nFj2.js → CNn7flY0.js} +2 -2
  126. package/web/app/immutable/chunks/{8xzOjoUV.js → CPatK7EU.js} +1 -1
  127. package/web/app/immutable/chunks/{BjNVk8U6.js → CQkTODWA.js} +1 -1
  128. package/web/app/immutable/chunks/{DOgidnWF.js → CQw_RyF_.js} +1 -1
  129. package/web/app/immutable/chunks/{AnCzW8pd.js → CRJc1pCT.js} +1 -1
  130. package/web/app/immutable/chunks/{CVkfqdxF.js → CRwqTV0i.js} +1 -1
  131. package/web/app/immutable/chunks/{BYQyF1EV.js → CUH5IR0E.js} +1 -1
  132. package/web/app/immutable/chunks/{CuaxAbnk.js → CV10cSI4.js} +1 -1
  133. package/web/app/immutable/chunks/{IOCQV0lc.js → CWc2lAUi.js} +1 -1
  134. package/web/app/immutable/chunks/{DzuDuJfn.js → CWybLnJv.js} +1 -1
  135. package/web/app/immutable/chunks/{CD0f9RqX.js → CXXbDkir.js} +1 -1
  136. package/web/app/immutable/chunks/{D-W7KYqw.js → CXaVTV1g.js} +4 -4
  137. package/web/app/immutable/chunks/{DxC9rNFj.js → CYgFnKoL.js} +1 -1
  138. package/web/app/immutable/chunks/{DQKQnxx2.js → CZ_Dk1nz.js} +1 -1
  139. package/web/app/immutable/chunks/{UfQa_CM-.js → C_A_Ikb5.js} +1 -1
  140. package/web/app/immutable/chunks/{CLSuLceq.js → CatLGfTW.js} +1 -1
  141. package/web/app/immutable/chunks/{BSaMlrt7.js → Cc2FSrQK.js} +1 -1
  142. package/web/app/immutable/chunks/{ClSKdYXV.js → Cdhrdfve.js} +1 -1
  143. package/web/app/immutable/chunks/{CszTaYPw.js → Cdw_CIdg.js} +1 -1
  144. package/web/app/immutable/chunks/{qN9kzcwL.js → CgXGPBF5.js} +1 -1
  145. package/web/app/immutable/chunks/{DDgv92vT.js → CjswKKTa.js} +1 -1
  146. package/web/app/immutable/chunks/{6gX3p-t6.js → Ck5xuk0H.js} +1 -1
  147. package/web/app/immutable/chunks/{Cl19iNDm.js → Cl71oYkB.js} +1 -1
  148. package/web/app/immutable/chunks/{BG9eCPIt.js → Cl7NoY6M.js} +1 -1
  149. package/web/app/immutable/chunks/{CT1kjHng.js → ClHV2gp3.js} +1 -1
  150. package/web/app/immutable/chunks/{DB4BdY3-.js → ClSUFCtq.js} +1 -1
  151. package/web/app/immutable/chunks/{BXFt_M3j.js → Cnwc7RZW.js} +1 -1
  152. package/web/app/immutable/chunks/{BmZ-YX2h.js → CoNmDxYv.js} +1 -1
  153. package/web/app/immutable/chunks/{ysr2ZeEL.js → CpPNoOk-.js} +1 -1
  154. package/web/app/immutable/chunks/{CeVUwFpS.js → CqesqBNM.js} +1 -1
  155. package/web/app/immutable/chunks/{Bnfzeolk.js → Cs_DX3BC.js} +1 -1
  156. package/web/app/immutable/chunks/{BG_ZjTnQ.js → Csxq8_TN.js} +1 -1
  157. package/web/app/immutable/chunks/{Bzw5kiqv.js → CtFSFfLz.js} +1 -1
  158. package/web/app/immutable/chunks/{cNJtArdZ.js → Ct_Zx4ru.js} +1 -1
  159. package/web/app/immutable/chunks/{BWlKpZE8.js → CtxaFpQJ.js} +1 -1
  160. package/web/app/immutable/chunks/{DSibel_X.js → Cu3YXFZW.js} +1 -1
  161. package/web/app/immutable/chunks/{fhbq8NBN.js → Cu91VTQn.js} +1 -1
  162. package/web/app/immutable/chunks/{CHo30JVh.js → CxF8L5mw.js} +1 -1
  163. package/web/app/immutable/chunks/{BUc9vg7U.js → CxXkuVq5.js} +1 -1
  164. package/web/app/immutable/chunks/{Bo79geKp.js → CzmcyLb_.js} +2 -2
  165. package/web/app/immutable/chunks/{Da6oWcTC.js → D0Z6csIX.js} +1 -1
  166. package/web/app/immutable/chunks/{CL7J7j2D.js → D1E6y9eQ.js} +1 -1
  167. package/web/app/immutable/chunks/{CTrJXNY9.js → D1cY0pVs.js} +1 -1
  168. package/web/app/immutable/chunks/{C3o6TrCe.js → D1rvT9Od.js} +1 -1
  169. package/web/app/immutable/chunks/{BIuwYO0J.js → D321NUNJ.js} +1 -1
  170. package/web/app/immutable/chunks/{CddeEUaW.js → D547g0l5.js} +2 -2
  171. package/web/app/immutable/chunks/{DSBtJS15.js → D7slXRL_.js} +1 -1
  172. package/web/app/immutable/chunks/{BdvDDr3c.js → D9NDL9ta.js} +1 -1
  173. package/web/app/immutable/chunks/{BU4XngZf.js → DAjaV_xN.js} +3 -3
  174. package/web/app/immutable/chunks/{D_84YASo.js → DCJDf3gb.js} +3 -3
  175. package/web/app/immutable/chunks/{CEODt5qB.js → DCv0ZqUq.js} +1 -1
  176. package/web/app/immutable/chunks/{nR9NDXxc.js → DEMmGTfr.js} +2 -2
  177. package/web/app/immutable/chunks/{B5t5yFV1.js → DGmOjLYi.js} +1 -1
  178. package/web/app/immutable/chunks/{DDhwf79f.js → DH6z3AzB.js} +3 -3
  179. package/web/app/immutable/chunks/{CoxEQ1x9.js → DK2Pie4F.js} +1 -1
  180. package/web/app/immutable/chunks/{BtNhR2qx.js → DKn1sQ32.js} +1 -1
  181. package/web/app/immutable/chunks/{C6baGIHW.js → DKyvRWc2.js} +1 -1
  182. package/web/app/immutable/chunks/{DwOsWxyQ.js → DPPtpHwn.js} +1 -1
  183. package/web/app/immutable/chunks/{DGt036ot.js → DQUvqa9o.js} +1 -1
  184. package/web/app/immutable/chunks/{fu-5SwkC.js → DR7bEdZk.js} +1 -1
  185. package/web/app/immutable/chunks/{prHJOEnU.js → DSQT151l.js} +1 -1
  186. package/web/app/immutable/chunks/{BFNcUqqi.js → DSqj6mlv.js} +2 -2
  187. package/web/app/immutable/chunks/{B3nJy--T.js → DUItrdZb.js} +1 -1
  188. package/web/app/immutable/chunks/{Bg5Fp4BA.js → DUctnn_k.js} +1 -1
  189. package/web/app/immutable/chunks/DVy6H5Ng.js +1 -0
  190. package/web/app/immutable/chunks/DW3gkA_F.js +1 -0
  191. package/web/app/immutable/chunks/{BWWmYtvo.js → DWjKA8Pm.js} +1 -1
  192. package/web/app/immutable/chunks/{nIerXkD8.js → DWsHBNeU.js} +1 -1
  193. package/web/app/immutable/chunks/{CW0tWbke.js → DYmzWBEk.js} +1 -1
  194. package/web/app/immutable/chunks/{Cu63TBX_.js → D_MzuSit.js} +1 -1
  195. package/web/app/immutable/chunks/{CX6lA3D1.js → Da2tbXc-.js} +1 -1
  196. package/web/app/immutable/chunks/{CIxVnrKO.js → Danvn_nL.js} +1 -1
  197. package/web/app/immutable/chunks/{CIasIl91.js → DcvxsgOZ.js} +1 -1
  198. package/web/app/immutable/chunks/{D5sOpT26.js → DdH7Q5ij.js} +1 -1
  199. package/web/app/immutable/chunks/{DTNUR8M2.js → DdKIjYo_.js} +2 -2
  200. package/web/app/immutable/chunks/{wlvXh-zp.js → Dd_WBgru.js} +1 -1
  201. package/web/app/immutable/chunks/{VvgtSbK2.js → DfSzfqox.js} +1 -1
  202. package/web/app/immutable/chunks/{DEJSVazL.js → DgFinDjM.js} +2 -2
  203. package/web/app/immutable/chunks/{CXaxJbgG.js → DllP5msd.js} +1 -1
  204. package/web/app/immutable/chunks/{DOdlo-4T.js → DmhHEMPi.js} +1 -1
  205. package/web/app/immutable/chunks/{PRAJ9M9Y.js → DodshHwq.js} +1 -1
  206. package/web/app/immutable/chunks/DpFiDNG-.js +4 -0
  207. package/web/app/immutable/chunks/{Cg6uFDit.js → DqFWZ_g1.js} +1 -1
  208. package/web/app/immutable/chunks/{CB1L2aum.js → DqgCp5ae.js} +1 -1
  209. package/web/app/immutable/chunks/{yKB3We_R.js → DsI0RDZ2.js} +1 -1
  210. package/web/app/immutable/chunks/{Dyrz4mgu.js → DtnAdLQg.js} +1 -1
  211. package/web/app/immutable/chunks/{C8EYdSF9.js → DuPd2TLf.js} +1 -1
  212. package/web/app/immutable/chunks/{D2dQD04-.js → Dukt1CUc.js} +1 -1
  213. package/web/app/immutable/chunks/{9RBVjd2X.js → DumeSIrz.js} +1 -1
  214. package/web/app/immutable/chunks/{M4mXlBrP.js → DvPSMnYw.js} +1 -1
  215. package/web/app/immutable/chunks/{DYOMUc5B.js → DvYo8gAP.js} +1 -1
  216. package/web/app/immutable/chunks/{CrfRec8x.js → DvdPJ4VE.js} +1 -1
  217. package/web/app/immutable/chunks/{CJZrFy0z.js → DxejgjNm.js} +1 -1
  218. package/web/app/immutable/chunks/{XOY5jtOQ.js → Dxjy2MWO.js} +1 -1
  219. package/web/app/immutable/chunks/{DdswlFJs.js → Dxs2medA.js} +1 -1
  220. package/web/app/immutable/chunks/{D9DtZ5bO.js → DxvSggY5.js} +1 -1
  221. package/web/app/immutable/chunks/{9XOJk36Z.js → DyBkeTEM.js} +1 -1
  222. package/web/app/immutable/chunks/{CIHmUaya.js → DyHCBf0T.js} +3 -3
  223. package/web/app/immutable/chunks/{rvFYnBJj.js → Dz2wxoQy.js} +1 -1
  224. package/web/app/immutable/chunks/{DmLYqjCG.js → Dz5-AChV.js} +1 -1
  225. package/web/app/immutable/chunks/{DiyE6ez1.js → Dz5OBP4z.js} +4 -4
  226. package/web/app/immutable/chunks/{lnjs8g9M.js → FLNU8xuu.js} +1 -1
  227. package/web/app/immutable/chunks/{LjCq2zYR.js → FavPgSsK.js} +1 -1
  228. package/web/app/immutable/chunks/{D635gi5P.js → FmBB5PWm.js} +1 -1
  229. package/web/app/immutable/chunks/{CbcqSAiT.js → Gr7b8MIr.js} +1 -1
  230. package/web/app/immutable/chunks/{DUk9Psab.js → JKboQXkL.js} +1 -1
  231. package/web/app/immutable/chunks/{BBuuu82x.js → KAO5AtPr.js} +1 -1
  232. package/web/app/immutable/chunks/{DFAg4YQw.js → KykWEhyB.js} +1 -1
  233. package/web/app/immutable/chunks/{Ch__d3EK.js → L3AlUw84.js} +1 -1
  234. package/web/app/immutable/chunks/{CFWjNNDI.js → LKW_Bid7.js} +1 -1
  235. package/web/app/immutable/chunks/{bMVl-_uo.js → M18r7swD.js} +1 -1
  236. package/web/app/immutable/chunks/{DWo9ssuo.js → N5wpZAwp.js} +1 -1
  237. package/web/app/immutable/chunks/{D_4E2Vkl.js → OcJyMtNk.js} +1 -1
  238. package/web/app/immutable/chunks/{Dr-hGtz9.js → PXCFrn2V.js} +1 -1
  239. package/web/app/immutable/chunks/{Nbro-b-6.js → PxI10rWs.js} +1 -1
  240. package/web/app/immutable/chunks/{DV8MrQzP.js → QpGjdleN.js} +1 -1
  241. package/web/app/immutable/chunks/{ByCbrCKe.js → RifCGV3x.js} +1 -1
  242. package/web/app/immutable/chunks/{PJHVK1jp.js → SX1khnGy.js} +1 -1
  243. package/web/app/immutable/chunks/{Bl1aiNRC.js → TrRXD94r.js} +1 -1
  244. package/web/app/immutable/chunks/{DaX_ruGd.js → V6SVTu37.js} +1 -1
  245. package/web/app/immutable/chunks/{Dr2MCeHs.js → WABToc6b.js} +1 -1
  246. package/web/app/immutable/chunks/{DLpH_zOx.js → WHfdsTrE.js} +1 -1
  247. package/web/app/immutable/chunks/{WbKTM-AY.js → Wv5_ui4s.js} +1 -1
  248. package/web/app/immutable/chunks/{DVXtNvCM.js → XJqoy2ap.js} +1 -1
  249. package/web/app/immutable/chunks/{CoKTpqDU.js → XPs8BW44.js} +1 -1
  250. package/web/app/immutable/chunks/{DcyITQk4.js → Z73Hn0_g.js} +1 -1
  251. package/web/app/immutable/chunks/{OC9upl2Z.js → ZYL8cEBi.js} +1 -1
  252. package/web/app/immutable/chunks/{DIz708WA.js → Zldsekdv.js} +4 -4
  253. package/web/app/immutable/chunks/{DCkjGG3P.js → aHO4L7kg.js} +1 -1
  254. package/web/app/immutable/chunks/{DjoTibfo.js → b-bXytVF.js} +1 -1
  255. package/web/app/immutable/chunks/{Bf_VKlmw.js → dP7u_sPF.js} +1 -1
  256. package/web/app/immutable/chunks/{BagTxwLt.js → dSvJdwG_.js} +3 -3
  257. package/web/app/immutable/chunks/{Q6h5kaDA.js → eLOMf9Vt.js} +1 -1
  258. package/web/app/immutable/chunks/{CPjCX26i.js → eln8hjjQ.js} +1 -1
  259. package/web/app/immutable/chunks/{BBrZXpSP.js → fK0I75t-.js} +1 -1
  260. package/web/app/immutable/chunks/{BpmaKyHV.js → fRGswTf6.js} +1 -1
  261. package/web/app/immutable/chunks/{DmPmT0eG.js → fXS7JPx0.js} +1 -1
  262. package/web/app/immutable/chunks/{Cdgpg8n7.js → fd1DS8nx.js} +49 -49
  263. package/web/app/immutable/chunks/{CFWrNsuZ.js → ge7HDe-3.js} +1 -1
  264. package/web/app/immutable/chunks/{ByhyupnT.js → hHeBjODU.js} +1 -1
  265. package/web/app/immutable/chunks/{H5EFGbef.js → iTSQ9YOi.js} +1 -1
  266. package/web/app/immutable/chunks/{BGhL-M7S.js → ie53yFct.js} +2 -2
  267. package/web/app/immutable/chunks/{BWCENrjZ.js → jRFO7UbE.js} +4 -4
  268. package/web/app/immutable/chunks/{CdO0EKIb.js → msw9XRLE.js} +1 -1
  269. package/web/app/immutable/chunks/{CFUCukqN.js → nIQsF0QH.js} +1 -1
  270. package/web/app/immutable/chunks/{Bm7IJJUE.js → nRmTo2Eh.js} +1 -1
  271. package/web/app/immutable/chunks/{rJd0G3JA.js → oOuL5l8A.js} +1 -1
  272. package/web/app/immutable/chunks/{BQEAmAsx.js → oSmiRYki.js} +1 -1
  273. package/web/app/immutable/chunks/{D3-X6DuB.js → ocWSyOIA.js} +2 -2
  274. package/web/app/immutable/chunks/{BGccgsYG.js → plFW1-kq.js} +1 -1
  275. package/web/app/immutable/chunks/{DrUo0N9I.js → s1m3ujOc.js} +1 -1
  276. package/web/app/immutable/chunks/{CWlx9AQE.js → s3nd6_cp.js} +1 -1
  277. package/web/app/immutable/chunks/{DyTX_flC.js → s97D1nrA.js} +1 -1
  278. package/web/app/immutable/chunks/{Dji1u83Z.js → sG8VksRm.js} +1 -1
  279. package/web/app/immutable/chunks/{CgoEfH57.js → sJt4gu2x.js} +1 -1
  280. package/web/app/immutable/chunks/{Bhf5PYkX.js → u8OBGcNi.js} +2 -2
  281. package/web/app/immutable/chunks/{XokPPDRt.js → wJewnowK.js} +6 -6
  282. package/web/app/immutable/chunks/{v9gH-HNO.js → x-XvE_CJ.js} +1 -1
  283. package/web/app/immutable/chunks/{y_07dpNl.js → xqJuIupR.js} +1 -1
  284. package/web/app/immutable/chunks/{Ca9VfQ3Z.js → zhSFUcJz.js} +1 -1
  285. package/web/app/immutable/entry/{app.g9i4Hhee.js → app.OFNFrEIR.js} +3 -3
  286. package/web/app/immutable/entry/start.CHpPu02l.js +1 -0
  287. package/web/app/immutable/nodes/{0.CDHHvjqw.js → 0.BPB4y4Pk.js} +1 -1
  288. package/web/app/immutable/nodes/{1.D5xy2MCO.js → 1.CBbBqNOx.js} +1 -1
  289. package/web/app/immutable/nodes/{10.1IhdAEgn.js → 10.B-rk3kEM.js} +5 -5
  290. package/web/app/immutable/nodes/{11.BW_yfjel.js → 11.P0HocOtE.js} +1 -1
  291. package/web/app/immutable/nodes/{12.QDjrsyFI.js → 12.31R3OdO3.js} +1 -1
  292. package/web/app/immutable/nodes/{13.6cP3XOKB.js → 13.DYH2a5Wx.js} +1 -1
  293. package/web/app/immutable/nodes/{14.Bb8pZCFr.js → 14.B6MrEg8x.js} +3 -3
  294. package/web/app/immutable/nodes/{15.DTRK9Vyb.js → 15.DhLBijej.js} +1 -1
  295. package/web/app/immutable/nodes/{16.pYdajVyy.js → 16.CKbY5VRM.js} +1 -1
  296. package/web/app/immutable/nodes/{17.C6_qDHdP.js → 17.DPSU7Eqq.js} +1 -1
  297. package/web/app/immutable/nodes/{18.p2wClcpG.js → 18.BlD6ustd.js} +1 -1
  298. package/web/app/immutable/nodes/{19.DQGgWYsX.js → 19.bgAqepNt.js} +2 -2
  299. package/web/app/immutable/nodes/{2.DLEjVhJq.js → 2.DU7oYEtS.js} +4 -4
  300. package/web/app/immutable/nodes/{20.Dzdd3lna.js → 20.Cj4TGw20.js} +1 -1
  301. package/web/app/immutable/nodes/{3.Do589hpw.js → 3.B4hrIG7P.js} +1 -1
  302. package/web/app/immutable/nodes/{4.BW-YS0Mv.js → 4.J3HSWI_f.js} +1 -1
  303. package/web/app/immutable/nodes/{5.0hjt7wvZ.js → 5.CS5w-vHI.js} +1 -1
  304. package/web/app/immutable/nodes/{6.C6f4TtQ8.js → 6.Bf53uJQ1.js} +1 -1
  305. package/web/app/immutable/nodes/{7.C1c9oJF2.js → 7.q-WiNda-.js} +1 -1
  306. package/web/app/immutable/nodes/{8.B6Vwx2Ni.js → 8.eHanxjw-.js} +1 -1
  307. package/web/app/immutable/nodes/9.BMShc48l.js +12 -0
  308. package/web/app/version.json +1 -1
  309. package/web/generated/paraglide.js +49 -49
  310. package/web/index.html +18 -18
  311. package/web/app/immutable/chunks/3TUSwkgT.js +0 -1
  312. package/web/app/immutable/chunks/7f-RK74P.js +0 -4
  313. package/web/app/immutable/chunks/BN8kP7XZ.js +0 -1
  314. package/web/app/immutable/chunks/BZhnh0KQ.js +0 -1
  315. package/web/app/immutable/chunks/CPDeRaia.js +0 -1
  316. package/web/app/immutable/chunks/a1kG0lDg.js +0 -1
  317. package/web/app/immutable/entry/start.DJAvowHl.js +0 -1
  318. package/web/app/immutable/nodes/9.BhguuCYy.js +0 -12
@@ -1 +1 @@
1
- var ne=Object.defineProperty;var oe=(e,t,r)=>t in e?ne(e,t,{enumerable:!0,configurable:!0,writable:!0,value:r}):e[t]=r;var d=(e,t,r)=>oe(e,typeof t!="symbol"?t+"":t,r);import{m as ce,N as le,T as de,d as ue,o as pe,w as ge}from"./PJHVK1jp.js";import"./CJxGDkBm.js";import{bm as n,_ as he}from"./a1kG0lDg.js";import"./ysr2ZeEL.js";import"./D9DtZ5bO.js";import"./BguHhtk8.js";import{c as V}from"./ChTqQfQN.js";import"./DUk9Psab.js";import{J4 as a,uk as fe,nM as y,nL as k,me as Se,yG as C,yH as N,yE as be,yD as me,yF as ve,rD as _e,c3 as Ae,c2 as ye,ch as ke,cg as we,nO as w}from"./DIz708WA.js";import{cR as Ee,cG as Ce,bG as Pe,ci as Re,cy as Me,ck as Te,cP as Q,aI as Ie,c0 as Fe,cX as De}from"./DVXtNvCM.js";import{a as Le,i as Oe}from"./DCOxMTSf.js";import{i as D}from"./DMl4Z5o_.js";import{n as xe}from"./DdgRFvxI.js";import{x as We,aO as Ne,c as Ge,aD as Be,B as Ve,y as Ue,z as He}from"./qkupoeeB.js";import{Z as qe,I as Y,_ as $e,av as U,W as ze,a0 as je,J as Ke,Y as Ze,ax as Qe,v as Ye}from"./3TUSwkgT.js";const Je=5,L=120,Xe=4e3,j=.2,et=.8;function tt(e,t,r=Je){const s=e.length>0?t/(2*e.length):0,i=Xe/L;return Array.from({length:r},(o,l)=>{if(s<=0)return 0;const c=L*i**(l/r),g=L*i**((l+1)/r),f=Math.min(e.length-1,Math.floor(c/s)),b=Math.min(e.length,Math.max(f+1,Math.ceil(g/s)));let $=0;for(let F=f;F<b;F+=1)$+=e[F]??0;const z=($/(b-f)/255-j)/(et-j);return Number.isFinite(z)?Math.min(1,Math.max(0,z)):0})}const rt=Object.freeze(Object.defineProperty({__proto__:null,NOTIFY_DURATION:le,TOAST_COUNTDOWN_CLASS:de,TOAST_COUNTDOWN_NO_HOVER_PAUSE_CLASS:ue,notify:ce,notifyMetadata:pe,withToastCountdown:ge},Symbol.toStringTag,{value:"Module"})),Dr=a.createSelector(e=>Ee.select(e)?.capabilities.gitlabCheckout===!0),Lr=a.createSelector(e=>e.gitlabAuth.host),Or=a.createSelector(e=>e.gitlabAuth.instanceBaseUrl??e.gitlabAuth.host),xr=a.createSelector(e=>fe(e.gitlabAuth.instanceBaseUrl??e.gitlabAuth.host)??""),Wr=a.createSelector(e=>e.gitlabAuth.isCancelling),Nr=a.createSelector(e=>e.gitlabAuth.cancelOutcome),Gr=a.createSelector(e=>e.gitlabAuth.isConfigured),Br=a.createSelector(e=>e.gitlabAuth.isAuthenticating),Vr=a.createSelector(e=>e.gitlabAuth.deviceFlow),Ur=a.createSelector(e=>e.gitlabAuth.deviceGrantSupported),Hr=a.createSelector(e=>e.gitlabAuth.user),qr=a.createSelector(e=>e.gitlabAuth.error);a.createSelector(e=>e.gitlabAuth.method);const $r=a.createSelector(e=>e.gitlabAuth.statusReady===!0),A=[{id:"pr-reviewer",icon:"pr-reviewer",get name(){return n.specialists_builtin_prReviewer_name()},get description(){return n.specialists_builtin_prReviewer_description()},defaultBehaviorPrompt:"",promptUnavailable:!0},{id:"ui-designer",icon:"ui-designer",get name(){return n.specialists_builtin_uiDesigner_name()},get description(){return n.specialists_builtin_uiDesigner_description()},defaultBehaviorPrompt:"",promptUnavailable:!0},{id:"vulnerability-scanner",icon:"pr-reviewer",get name(){return n.specialists_builtin_vulnerabilityScanner_name()},get description(){return n.specialists_builtin_vulnerabilityScanner_description()},defaultBehaviorPrompt:"",promptUnavailable:!0},{id:"developer",icon:"verifier",get name(){return n.specialists_builtin_developer_name()},get description(){return n.specialists_builtin_developer_description()},defaultBehaviorPrompt:"",promptUnavailable:!0},{id:"product-manager",icon:"coordinator",get name(){return n.specialists_builtin_productManager_name()},get description(){return n.specialists_builtin_productManager_description()},defaultBehaviorPrompt:"",promptUnavailable:!0},{id:"maintenance-coordinator",icon:"ralph",get name(){return n.specialists_builtin_maintenanceCoordinator_name()},get description(){return n.specialists_builtin_maintenanceCoordinator_description()},defaultBehaviorPrompt:"",promptUnavailable:!0},{id:"chief-of-staff",icon:"chief-of-staff",get name(){return n.specialists_builtin_chiefOfStaff_name()},get description(){return n.specialists_builtin_chiefOfStaff_description()},hidden:!0,defaultBehaviorPrompt:"",promptUnavailable:!0}],J=new Set(["pr-reviewer"]),zr="developer";function jr(e){return A.find(t=>t.id===e)}const st=a.createSelector(e=>e.githubAuth.mutationRequestId),it=a.createSelector(e=>e.githubAuth.callbacksCancelled),at=a.createSelector(e=>e.githubAuth.isDisconnecting),X=a.createSelector(e=>e.githubAuth.isAuthenticated),nt=a.createSelector(e=>e.githubAuth.statusSettled===!0),ot=a.createSelector(e=>e.githubAuth.requiresDaemonAuth),ct=a.createSelector(e=>e.githubAuth.user),lt=a.createSelector(e=>e.githubAuth.isAuthenticating),dt=a.createSelector(e=>e.githubAuth.deviceFlow),ut=a.createSelector(e=>e.githubAuth.error),Kr=Object.freeze(Object.defineProperty({__proto__:null,selectGitHubAuthCallbacksCancelled:it,selectGitHubAuthDeviceFlow:dt,selectGitHubAuthError:ut,selectGitHubAuthIsAuthenticated:X,selectGitHubAuthIsAuthenticating:lt,selectGitHubAuthIsDisconnecting:at,selectGitHubAuthMutationRequestId:st,selectGitHubAuthRequiresDaemonAuth:ot,selectGitHubAuthStatusSettled:nt,selectGitHubAuthUser:ct},Symbol.toStringTag,{value:"Module"}));function u(e){return e??""}function pt(e,t){const r=e??[],s=t??[];return r.length===s.length&&r.every((i,o)=>u(i.provider)===u(s[o].provider)&&i.model===s[o].model&&i.hint===s[o].hint&&u(i.reasoningEffort)===u(s[o].reasoningEffort))}function K(e,t){if(e.source!=="user"||!t?.ignoreModelPin&&(e.model||e.codingAgent))return!1;const r=e.bundled;return r?u(e.name)===u(r.name)&&u(e.description)===u(r.description)&&u(e.behaviorPrompt)===u(r.behaviorPrompt)&&u(e.roleReminder)===u(r.roleReminder)&&u(e.reasoningEffort)===u(r.reasoningEffort)&&pt(e.modelOptions,r.modelOptions):!1}const Zr=a.createSelector(e=>e.specialists.bundledSpecialists),gt=a.createSelector(e=>e.specialists.fileSpecialists),Qr=a.createSelector(e=>y(gt.select(e))),Yr=a.createSelector(e=>e.specialists.userOverrides);a.createSelector(e=>e.specialists.overridesLoaded);const Jr=a.createSelector(e=>e.specialists.customSpecialistsLoaded),Xr=a.createSelector(e=>e.specialists.fileSpecialistsLoaded),es=a.createSelector(e=>e.specialists.bundledSpecialistsLoaded),ts=a.createSelector(e=>e.specialists.specialistsFolderPath),rs=a.createSelector((e,t)=>{if(!t)return e.specialists.defaultSpecialistId??"";const r=e.providerCatalog?.byWorkspaceId?.[t]?.settings.find(s=>s.path==="specialists.default")?.value;return typeof r=="string"?r:""});a.createSelector(e=>e.specialists.providerModelOverrides);const O=a.createSelector((e,t)=>!(J.has(t)&&!X.select(e)));function ht(e,t){return t?e:e.filter(r=>!J.has(r.id))}function ft(e,t){return ht(e,t).filter(r=>!r.hidden)}function ss(e,t){return ft(e,t).filter(r=>r.role!=="internal")}const v=a.createSelector((e,t)=>{if(t)return(e.providerCatalog?.byWorkspaceId?.[t]?.specialists??[]).map(c=>({...c,defaultModel:c.model,defaultBehaviorPrompt:c.behaviorPrompt??c.prompt??"",defaultAgentType:c.agentType}));const r=y(e.specialists.fileSpecialists),s=e.specialists.bundledSpecialists,i=new Set,o=[];for(const c of r)!i.has(c.id)&&O.select(e,c.id)&&(i.add(c.id),o.push({id:c.id,name:c.name,description:c.description,codingAgent:c.codingAgent,defaultModel:c.model||void 0,defaultBehaviorPrompt:c.behaviorPrompt,roleReminder:c.roleReminder,source:c.source,importedFrom:c.importedFrom,unsupportedFields:c.unsupportedFields,requiredSkills:c.requiredSkills,missingSkills:c.missingSkills,hidden:c.hidden,resolvedModel:c.resolvedModel,resolvedProvider:c.resolvedProvider,modelOptions:c.modelOptions,reasoningEffort:c.reasoningEffort,role:c.role,teamAgents:c.teamAgents,icon:c.icon}));for(const c of s)!i.has(c.id)&&O.select(e,c.id)&&(i.add(c.id),o.push(c));if(!e.specialists.bundledSpecialistsLoaded&&r.length===0&&s.length===0)for(const c of A)!i.has(c.id)&&O.select(e,c.id)&&(i.add(c.id),o.push(c));const l=new Map;for(const c of A)l.has(c.id)||l.set(c.id,l.size);for(const c of s)l.has(c.id)||l.set(c.id,l.size);return o.sort((c,g)=>{const f=l.has(c.id),b=l.has(g.id);return f&&b?(l.get(c.id)??0)-(l.get(g.id)??0):f&&!b?-1:!f&&b?1:c.name.localeCompare(g.name)}),o}),is=a.createSelector(e=>{const t=v.select(e).filter(s=>s.role==="orchestrator");if(t.length===0)return null;const r=new Set([...A.map(({id:s})=>s),...e.specialists.bundledSpecialists.map(({id:s})=>s)]);return t.sort((s,i)=>+!r.has(s.id)-+!r.has(i.id)||s.id.localeCompare(i.id)),t[0]}),St=a.createSelector((e,t)=>{const r=k(e.specialists.fileSpecialists,t);if(r)return{id:r.id,name:r.name,description:r.description,source:r.source};const s=e.specialists.bundledSpecialists.find(i=>i.id===t);if(s)return{id:s.id,name:s.name,description:s.description,source:"builtin"};if(!e.specialists.bundledSpecialistsLoaded&&y(e.specialists.fileSpecialists).length===0&&e.specialists.bundledSpecialists.length===0){const i=A.find(o=>o.id===t);if(i)return{id:i.id,name:i.name,description:i.description,source:"builtin"}}return null}),as=a.createSelector((e,t)=>St.select(e,t)?.name??null),ns=a.createSelector((e,t,r)=>{const i=v.select(e,r).find(o=>o.id===t);return i?i.defaultModel?i.defaultModel:i.resolvedModel??"":""}),os=a.createSelector((e,t,r)=>v.select(e,r).find(o=>o.id===t)?.defaultModel||void 0),cs=a.createSelector((e,t,r)=>v.select(e,r).find(o=>o.id===t)?.reasoningEffort||void 0),ls=a.createSelector((e,t,r)=>{const i=v.select(e,r).find(o=>o.id===t);return i?i.defaultBehaviorPrompt:""});function P(e,t){return t.some(r=>r.id===e)||A.some(r=>r.id===e)}const ds=a.createSelector((e,t,r)=>{if(r){const s=e.providerCatalog?.byWorkspaceId?.[r]?.specialists.find(i=>i.id===t);return!s||s.importedFrom?!1:s.source==="bundled"||s.source==="user"&&P(t,e.specialists.bundledSpecialists)}return P(t,e.specialists.bundledSpecialists)}),us=a.createSelector((e,t,r)=>r?!!H.select(e,t,r):!!k(e.specialists.fileSpecialists,t)),ps=a.createSelector((e,t,r)=>{if(r){const o=H.select(e,t,r);return!o||o.importedFrom||o.source==="project"?!1:P(t,e.specialists.bundledSpecialists)&&!K(o)}if(!P(t,e.specialists.bundledSpecialists))return!1;const i=k(e.specialists.fileSpecialists,t);return!i||i.source!=="user"?!1:!K(i)}),H=a.createSelector((e,t,r)=>{if(r){const s=e.providerCatalog?.byWorkspaceId?.[r]?.specialists.find(i=>i.id===t);return!s||s.source==="bundled"?void 0:{...s,source:s.source,model:s.model??"",behaviorPrompt:s.behaviorPrompt??s.prompt??"",filePath:s.path??""}}return k(e.specialists.fileSpecialists,t)}),gs=a.createSelector((e,t,r)=>{const s=H.select(e,t,r);return r&&!s?e.providerCatalog?.byWorkspaceId?.[r]?.specialists.some(i=>i.id===t)?"Built-in":null:s?.source==="project"?"Project":s?.source==="user"?"User":e.specialists.bundledSpecialists.some(i=>i.id===t)?"Built-in":null}),hs=a.createSelector((e,t,r)=>{if(r)return e.providerCatalog?.byWorkspaceId?.[r]?.specialists.find(o=>o.id===t)?.path;const s=k(e.specialists.fileSpecialists,t);if(s)return s.filePath;const i=e.specialists.bundledSpecialists.find(o=>o.id===t);if(i&&"filePath"in i)return i.filePath}),fs=a.createSelector((e,t,r)=>{if(r){const i=v.select(e,r).find(c=>c.id===t),o=i?.codingAgent||i?.resolvedProvider;if(o)return Ce.select(e,o,r);const l=Pe.select(e,r);return e.providerCatalog?.byWorkspaceId?.[r]?.readiness[l]?.available?l:""}const s=k(e.specialists.fileSpecialists,t);return s?.codingAgent?s.codingAgent:bt.select(e,t)}),bt=a.createSelector((e,t)=>{const s=v.select(e).find(i=>i.id===t);return s?.codingAgent?s.codingAgent:qe.select(e)?Y.select(e):""}),Ss=a.createSelector((e,t)=>{if(t)return e.providerCatalog?.byWorkspaceId?.[t]?.importDiagnostics??[];const r=e.specialists.importDiagnostics;return r?y(r):[]}),bs=a.createSelector((e,t)=>e.specialists.creationByContext?.[t]??Se),ms=a.createSelector(e=>Object.values(e.specialists.creationByContext??{}).flatMap(t=>t.specialistId?[t.specialistId]:[])),x=V("Clipboard");async function vs(e){let t;if(Le())try{const r=await Oe("system:write-clipboard",{text:e});if(r?.success===!1)throw new Error(r.error||"Electron clipboard write failed");return}catch(r){t=r,x.warn("Electron clipboard write failed; falling back to browser clipboard",{error:r})}if(typeof navigator<"u"&&navigator.clipboard?.writeText)try{await navigator.clipboard.writeText(e);return}catch(r){throw x.error("Browser clipboard write failed",r,{electronError:t}),r}throw x.error("No clipboard write API is available",void 0,{electronError:t}),t instanceof Error?t:new Error("Clipboard write API unavailable")}const _s=a.createSelector(e=>e.directoryPicker.source??"daemon"),As=a.createSelector(e=>e.directoryPicker.listing),ys=a.createSelector(e=>e.directoryPicker.loading),ks=a.createSelector(e=>e.directoryPicker.error),ws=a.createSelector(e=>e.directoryPicker.pathError),Es=a.createSelector(e=>e.directoryPicker.createError),mt=V("WorkspaceValidation");async function Cs(e,t=!1,r=!1){if(!e||e.trim().length===0)return{valid:!1,error:n.workspace_validation_repoPathRequired_error(),suggestion:n.workspace_validation_repoPathRequired_suggestion()};const s=e.trim();return vt(s)?At(s):yt(s,t,r)}function vt(e){return[/^https?:\/\/github\.com\//i,/^git@github\.com:/i,/^github\.com\//i,/^([a-zA-Z0-9\-_]+)\/([a-zA-Z0-9\-_\.]+)$/].some(r=>r.test(e.trim()))}function _t(e){const t=e.trim(),r=[/^https?:\/\/github\.com\/([^\/]+)\/([^\/]+)$/i,/^git@github\.com:([^\/]+)\/([^\/]+)$/i,/^github\.com\/([^\/]+)\/([^\/]+)$/i];for(const i of r){const o=t.match(i);if(o){const l=o[2].replace(/\.git$/,"");return l?{owner:o[1],repo:l}:null}}const s=t.match(/^([a-zA-Z0-9\-_]+)\/([a-zA-Z0-9\-_\.]+)$/);if(s&&!t.includes("\\")&&!t.includes(":")){const i=s[2].replace(/\.git$/,"");return i?{owner:s[1],repo:i}:null}return null}async function At(e){return _t(e)?{valid:!0,warning:n.workspace_validation_githubCloneLocally_warning()}:{valid:!1,error:n.workspace_validation_invalidGithubUrl_error(),suggestion:n.workspace_validation_invalidGithubUrl_suggestion()}}async function yt(e,t=!1,r=!1){if(e.includes("\0"))return{valid:!1,error:n.workspace_validation_nullCharacters_error()};if(!e.startsWith("/")&&!e.startsWith("~")&&!e.startsWith(".")&&!e.includes(":\\")&&!/^[a-zA-Z]:\//.test(e))return{valid:!1,error:n.workspace_validation_pathNotAbsolute_error(),suggestion:n.workspace_validation_pathNotAbsolute_suggestion()};if(typeof window<"u"&&window.electronAPI)try{const s=await D("file:getDirectoryStatus",{path:e});if(s.success&&s.data){const l=s.data;return l.exists?l.isDirectory?l.isGitRepo?{valid:!0,isNewRepo:!1,directoryStatus:l}:l.isSubdirectoryOfGitRepo?{valid:!0,isNewRepo:!1,directoryStatus:l,warning:n.workspace_validation_insideParentRepo_warning({path:l.parentGitRoot??""})}:r?{valid:!0,isNewRepo:!1,directoryStatus:l}:t?l.isEmpty?{valid:!0,isNewRepo:!0,directoryStatus:l,warning:n.workspace_validation_emptyDirInit_warning()}:{valid:!0,isNewRepo:!0,directoryStatus:l,warning:n.workspace_validation_nonGitDirInit_warning()}:{valid:!1,error:n.workspace_repoSelector_notGitRepository_label(),directoryStatus:l}:{valid:!1,error:n.workspace_validation_notDirectory_error(),suggestion:n.workspace_validation_notDirectory_suggestion(),directoryStatus:l}:t?{valid:!0,isNewRepo:!0,directoryStatus:l,warning:n.workspace_validation_willCreateRepo_warning()}:{valid:!1,error:n.workspace_validation_dirNotExist_error(),suggestion:n.workspace_validation_dirNotExist_suggestion(),directoryStatus:l}}if(!(await D("file:exists",{path:e})).exists)return t?{valid:!0,isNewRepo:!0,warning:n.workspace_validation_willCreateRepo_warning()}:{valid:!1,error:n.workspace_validation_dirNotExist_error(),suggestion:n.workspace_validation_dirNotExistLegacy_suggestion()};const o=await D("git:isRepository",{path:e});if(!t&&o?.isRepository!==!0)return{valid:!1,error:o?.isRepository===!1?n.workspace_repoSelector_notGitRepository_label():n.workspace_compactInitializer_gitCheckUnknown_label()};if(!o.isRepository)return{valid:!0,isNewRepo:!0,warning:n.workspace_validation_nonGitInit_warning()}}catch(s){if(mt.warn("Could not validate path existence",s),!t)return{valid:!1,error:n.workspace_compactInitializer_gitCheckUnknown_label()}}return{valid:!0,isNewRepo:!1}}function Ps(e){if(!e||e.trim().length===0)return{valid:!0};const t=e.trim();return/[\s~^:?*\[\]\\]/.test(t)?{valid:!1,error:n.workspace_validation_branchPrefixInvalidChars_error(),suggestion:n.workspace_validation_branchChars_suggestion()}:t==="."||t===".."||t.startsWith(".")?{valid:!1,error:n.workspace_validation_branchPrefixDot_error()}:t.includes("..")||t.includes("//")?{valid:!1,error:n.workspace_validation_branchPrefixConsecutive_error()}:t.startsWith("/")?{valid:!1,error:n.workspace_validation_branchPrefixSlash_error()}:t.endsWith(".lock")?{valid:!1,error:n.workspace_validation_branchPrefixLock_error()}:t.length>50?{valid:!1,error:n.workspace_validation_branchPrefixTooLong_error()}:{valid:!0}}function Rs(e){if(!e||e.trim().length===0)return"";let t=e.trim().replace(/^[./]+/,"").replace(/[\s~^:?*\[\]\\]/g,"-").replace(/\.{2,}/g,"-").replace(/\/{2,}/g,"/").replace(/-{2,}/g,"-").replace(/^-+/,"").replace(/\.lock$/,"").toLowerCase();return t.length>0&&!t.endsWith("/")&&!t.endsWith("-")&&(t=t.includes("/")?`${t}/`:`${t}/`),t}function Ms(e){if(!e||e.trim().length===0)return{valid:!1,error:n.workspace_validation_branchNameRequired_error()};const t=e.trim();return/[\s~^:?*\[\]\\]/.test(t)?{valid:!1,error:n.workspace_validation_branchNameInvalidChars_error(),suggestion:n.workspace_validation_branchChars_suggestion()}:["HEAD",".",".."].includes(t)?{valid:!1,error:n.workspace_validation_branchNameReserved_error()}:t.includes("..")||t.includes("//")?{valid:!1,error:n.workspace_validation_branchNameConsecutive_error()}:t.startsWith("/")||t.endsWith("/")?{valid:!1,error:n.workspace_validation_branchNameSlash_error()}:t.endsWith(".lock")?{valid:!1,error:n.workspace_validation_branchNameLock_error()}:{valid:!0}}function Ts(e){return!e||e.trim().length===0?{valid:!0}:e.trim().length>1e5?{valid:!1,error:n.workspace_validation_promptTooLong_error(),suggestion:n.workspace_validation_promptTooLong_suggestion()}:{valid:!0}}function Is(e){const t=e.toLowerCase();return t.includes("maxbuffer")?n.workspace_gitError_maxBuffer():t.includes("clone")&&t.includes("timed out")?n.workspace_gitError_cloneTimeout():t.includes("json-rpc request timed out: workspace.create")?n.workspace_gitError_createTimeout():t.includes("timed out")&&["git","clone","fetch","worktree","pull","push","rebase","merge"].some(r=>t.includes(r))?n.workspace_gitError_gitTimeout():t.includes("git clone failed")?t.includes("could not read from remote")?n.workspace_gitError_cloneRemote():t.includes("authentication")||t.includes("permission denied")||t.includes("access denied")?n.workspace_gitError_cloneAuth():n.workspace_gitError_cloneFailed():t.includes("could not resolve any ref to create worktree")?n.workspace_gitError_worktreeRef():t.includes("failed to write file")?t.includes("eacces")||t.includes("permission denied")?n.workspace_gitError_writePermission():t.includes("enospc")||t.includes("disk space")?n.workspace_gitError_diskSpaceFree():t.includes("enoent")||t.includes("no such file")?n.workspace_gitError_writeNoEnt():e:t.includes("failed to read file")?t.includes("enoent")||t.includes("no such file")?n.workspace_gitError_readNotFound():t.includes("eacces")||t.includes("permission denied")?n.workspace_gitError_readPermission():e:t.includes("permission denied")?n.workspace_gitError_permissionDenied():t.includes("not found")||t.includes("enoent")?n.workspace_gitError_notFound():t.includes("already exists")?n.workspace_gitError_alreadyExists():t.includes("network")||t.includes("etimedout")?n.workspace_gitError_network():t.includes("authentication")||t.includes("401")?t.includes("private repositor")?e:n.workspace_gitError_authFailed():t.includes("rate limit")||t.includes("403")?n.workspace_gitError_rateLimit():t.includes("disk space")||t.includes("enospc")?n.workspace_gitError_diskSpace():e}const kt=["idle","exited"];function wt(e){return e===void 0||!kt.includes(e)}function Fs(e){return e.status==="restarting"?"restarting":wt(e.status)?"running":e.status==="idle"?"idle":e.exitCode===0?"succeeded":e.exitCode===null||e.exitCode===void 0?"exited":e.exitCode>=128?"stopped":"failed"}function Et(e){return e.engine==="os"?"os":e.isLoading||e.keyConfigured[e.provider]===!0?"daemon":e.osEngineAvailable?"os":"unavailable"}const Ds=a.createSelector(e=>e.voiceSettings.isLoading),Ls=a.createSelector(e=>e.voiceSettings.available),Os=a.createSelector(e=>e.voiceSettings.provider),xs=a.createSelector(e=>e.voiceSettings.engine),Ws=a.createSelector(e=>e.voiceSettings.osEngineAvailable),Ns=a.createSelector(e=>e.voiceSettings.keyConfigured),Gs=a.createSelector(e=>e.voiceSettings.vocabulary),Bs=a.createSelector(e=>e.voiceSettings.openaiModel),Vs=a.createSelector(e=>e.voiceSettings.language),Us=a.createSelector(e=>e.voiceSettings.workspaceVocabularyMaxTerms),Hs=a.createSelector(e=>e.voiceSettings.inputDeviceId),qs=a.createSelector(e=>e.voiceSettings.inputDevices),$s=a.createSelector(e=>e.voiceSettings.busyProvider),zs=a.createSelector(e=>e.voiceSettings.error),js=a.createSelector(e=>Re.select(e)?"unavailable":Et(e.voiceSettings)),G="intent.voice.inputDevice";let B;function Ct(){if(B!==void 0)return B;try{const e=localStorage.getItem(G);return typeof e=="string"&&e!==""?e:null}catch{return null}}function Ks(e){B=e;try{e===null?localStorage.removeItem(G):localStorage.setItem(G,e)}catch{}}let R=null;function Zs(e){R=e}function Qs(){const e=R;return R=null,e}function Pt(){R=null}const Rt=300,Mt=300;class Tt{constructor(t){d(this,"holdThresholdMs");d(this,"doublePressWindowMs");d(this,"onRecordStart");d(this,"onRecordStop");d(this,"currentState","idle");d(this,"timer",null);this.holdThresholdMs=t.holdThresholdMs??Rt,this.doublePressWindowMs=t.doublePressWindowMs??Mt,this.onRecordStart=t.onRecordStart,this.onRecordStop=t.onRecordStop}get state(){return this.currentState}keyDown(){switch(this.currentState){case"idle":this.currentState="first-press",this.armTimer(this.holdThresholdMs,()=>{this.currentState="holding"}),this.onRecordStart();break;case"await-second-press":this.clearTimer(),this.currentState="second-press",this.armTimer(this.holdThresholdMs,()=>{this.currentState="holding-send"});break;case"latched":this.currentState="latched-press";break;case"latched-await-second":this.clearTimer(),this.currentState="draining",this.onRecordStop({stopReason:"double-press",autoSend:!0});break}}keyUp(){switch(this.currentState){case"first-press":this.clearTimer(),this.currentState="await-second-press",this.armTimer(this.doublePressWindowMs,()=>{this.currentState="latched"});break;case"holding":this.currentState="idle",this.onRecordStop({stopReason:"hold-release",autoSend:!1});break;case"second-press":this.clearTimer(),this.currentState="idle",this.onRecordStop({stopReason:"double-press",autoSend:!0});break;case"holding-send":this.currentState="idle",this.onRecordStop({stopReason:"double-hold-release",autoSend:!0});break;case"latched-press":this.currentState="latched-await-second",this.armTimer(this.doublePressWindowMs,()=>{this.currentState="idle",this.onRecordStop({stopReason:"latch-stop",autoSend:!1})});break;case"draining":this.currentState="idle";break}}reset(){this.clearTimer(),this.currentState="idle"}armTimer(t,r){this.clearTimer(),this.timer=setTimeout(()=>{this.timer=null,r()},t)}clearTimer(){this.timer!==null&&clearTimeout(this.timer),this.timer=null}}let M=null;function Ys(e){M=e}function Js(){const e=M;return M=null,e}function It(){M=null}const Ft=66;function Dt(e,t){const r=globalThis.AudioContext;if(typeof r!="function")return()=>{};let s,i,o;try{s=new r,i=s.createMediaStreamSource(e),o=s.createAnalyser(),o.fftSize=1024,o.smoothingTimeConstant=.5,o.minDecibels=-85,o.maxDecibels=-25,i.connect(o)}catch{return i?.disconnect(),s?.close().catch(()=>{}),()=>{}}if(!s||!i)return()=>{};const l=s,c=i,g=new Uint8Array(o.frequencyBinCount),f=setInterval(()=>{o.getByteFrequencyData(g),t(tt(g,l.sampleRate))},Ft);let b=!1;return()=>{b||(b=!0,clearInterval(f),c.disconnect(),l.close().catch(()=>{}))}}const Lt=12e4,Ot=["audio/webm;codecs=opus","audio/webm"];function Xs(){return typeof navigator<"u"&&typeof navigator.mediaDevices?.getUserMedia=="function"&&typeof MediaRecorder<"u"}function xt(e){return e?{audio:{deviceId:{ideal:e}}}:{audio:!0}}function Wt(){if(!(typeof MediaRecorder>"u"||typeof MediaRecorder.isTypeSupported!="function"))return Ot.find(e=>MediaRecorder.isTypeSupported(e))}class Nt{constructor(t){d(this,"maxDurationMs");d(this,"now");d(this,"callbacks");d(this,"deviceId");d(this,"onLevels");d(this,"stopMeter",null);d(this,"currentState","idle");d(this,"recorder",null);d(this,"stream",null);d(this,"chunks",[]);d(this,"startedAt",0);d(this,"maxTimer",null);d(this,"discardRequested",!1);d(this,"cancelRequested",!1);this.maxDurationMs=t.maxDurationMs??Lt,this.now=t.now??Date.now,this.callbacks={onFinished:t.onFinished,onError:t.onError},this.deviceId=t.deviceId??null,this.onLevels=t.onLevels}get state(){return this.currentState}async start(){if(this.currentState!=="idle")return"discarded";this.currentState="starting";let t;try{t=await navigator.mediaDevices.getUserMedia(xt(this.deviceId))}catch(i){const o=this.discardRequested;return this.currentState="stopped",o||this.callbacks.onError(i),o?"discarded":"error"}if(this.discardRequested){for(const i of t.getTracks())i.stop();return this.currentState="stopped","discarded"}this.stream=t;const r=Wt(),s=r?new MediaRecorder(t,{mimeType:r}):new MediaRecorder(t);return this.recorder=s,s.ondataavailable=i=>{i.data&&i.data.size>0&&this.chunks.push(i.data)},s.onstop=()=>this.handleRecorderStop(),s.onerror=i=>this.handleRecorderError(i),s.start(),this.startedAt=this.now(),this.currentState="recording",this.maxTimer=setTimeout(()=>this.stop(),this.maxDurationMs),this.onLevels&&(this.stopMeter=Dt(t,this.onLevels)),"recording"}stop(){if(this.currentState==="starting"){this.discardRequested=!0;return}this.currentState==="recording"&&this.recorder?.stop()}cancel(){if(this.currentState==="starting"){this.discardRequested=!0;return}this.currentState==="recording"&&(this.cancelRequested=!0,this.recorder?.stop())}handleRecorderStop(){const t=this.now()-this.startedAt,r=this.recorder?.mimeType||"audio/webm",s=this.chunks,i=this.cancelRequested;this.teardown(),!i&&this.callbacks.onFinished({blob:new Blob(s,{type:r}),durationMs:t,mimeType:r})}handleRecorderError(t){const r=t?.error??t;this.teardown(),this.callbacks.onError(r)}teardown(){this.maxTimer!==null&&clearTimeout(this.maxTimer),this.maxTimer=null,this.stopMeter?.(),this.stopMeter=null,this.recorder&&(this.recorder.ondataavailable=null,this.recorder.onstop=null,this.recorder.onerror=null),this.recorder=null;for(const t of this.stream?.getTracks()??[])t.stop();this.stream=null,this.chunks=[],this.currentState="stopped"}}const Gt=300;function Bt(e){const t=e?.name;return t==="NotAllowedError"||t==="SecurityError"}const Vt={stopReason:"manual",autoSend:!1};let p=null,m=null,_=0,E=null;const I=new Tt({onRecordStart:()=>{E&&Ut(E)},onRecordStop:e=>{ee(E,e)}});function ei(){return p!==null}function ti(){return p}function ri(e){E=e,_+=1,_===1&&I.keyDown()}function si(e){E=e,_!==0&&(_-=1,_===0&&I.keyUp())}function Ut(e,t="key"){if(p!==null)return;It(),Pt();const r=new Nt({deviceId:Ct(),onLevels:s=>{p===r&&e.dispatch(me(s))},onFinished:s=>{p===r&&(p=null);const i=m??{stopReason:"auto-stop",autoSend:!1},o=m!==null;if(m=null,e.dispatch(C()),o||I.reset(),s.durationMs<Gt){i.autoSend&&e.dispatch(N());return}e.dispatch(be({...s,stopReason:i.stopReason,autoSend:i.autoSend}))},onError:s=>{p===r&&(p=null),m=null,e.dispatch(C()),e.showHint(Bt(s)?n.hardwareConsole_ptt_micDenied_message():n.hardwareConsole_ptt_recordingFailed_message())}});p=r,e.dispatch(ve({source:t,startedAt:Date.now()})),r.start().then(s=>{if(s!=="recording"&&(p===r&&(p=null),s==="discarded")){const i=m?.autoSend===!0;m=null,e.dispatch(C()),i&&e.dispatch(N())}})}function ee(e,t){const r=p;if(r===null){t.autoSend&&e?.dispatch(N());return}m=t,r.stop()}function ii(){ee(null,Vt)}function ai(e){I.reset(),_=0,m=null;const t=p;t!==null&&(p=null,t.cancel(),e.dispatch(C()))}const Ht=V("HardwareConsoleVoiceSetupToast"),qt="hardware-console-voice-setup";let W=null;function $t(){return W||(W=he(()=>Promise.resolve().then(()=>rt),void 0,import.meta.url).then(e=>e.notify)),W}function zt(){xe("/settings?tab=connections#voice").catch(e=>{Ht.error("Failed to open voice settings from setup toast",e)})}function jt(){return{label:n.hardwareConsole_voice_openSettings_label(),onClick:()=>zt()}}function ni(){$t().then(e=>{e.error(n.hardwareConsole_voice_noKey_error(),{id:qt,action:jt()})})}const oi=a.createSelector(e=>e.externalEditors.selectedAction),Kt=a.createSelector(e=>e.externalEditors.editors),Zt=a.createSelector(e=>{const t=y(Kt.select(e)),r=e.externalEditors.editorOrder??[];if(!r.length)return t;const s=new Map(t.map(l=>[l.id,l])),i=r.flatMap(l=>{const c=s.get(l);return c?[c]:[]}),o=new Set(r);return[...i,...t.filter(({id:l})=>!o.has(l))]}),ci=a.createSelector(e=>e.externalEditors.editorOrder??[]),li=a.createSelector(e=>e.externalEditors.loading),di=a.createSelector(e=>e.externalEditors.lastFetched),Qt=a.createSelector(e=>e.externalEditors.hiddenEditorIds),ui=a.createSelector((e,t)=>{if(!(t?Me.select(e,t):Te.select(e))||_e())return[];const s=Qt.select(e);return Zt.select(e).filter(i=>i.installed&&!s.includes(i.id))});function pi(e,t){if(!e||!t||t===e.providerId)return!1;const r=e.providerSettings[t];return!!(r&&[r.defaultModel,...Object.values(r.typeOverrides??{})].some(s=>typeof s=="string"&&s.includes(":")))}let Yt=0;function Jt(e,t){const r=++Yt;return a.dispatch(ye(e,t,r)),r}function gi(e,t,r){a.dispatch(Ae(e,t,r))}async function te(e,t,r,s){const i=crypto.randomUUID(),o=s?.source??"control";try{return(await a.dispatch(ke({requestId:i,consumerId:o,agentId:e,workspaceId:t,operation:r,connection:Q.select(a.state)},{...s,intent:s?.intent??Jt(e,t)}))).status==="success"}finally{a.dispatch(we(i,o))}}async function hi(e,t,r,s,i){return te(e,t,{kind:"effort",effort:r,previous:s},i)}async function fi(e,t,r,s,i){return te(e,t,{kind:"reconcile",current:r??null,levels:s},i)}const Xt=a.createSelector((e,t)=>y(e.agentModel.mutations).filter(r=>r.consumerId===t)),Si=a.createSelector((e,t)=>Xt.select(e,t).some(r=>r.status==="pending")),bi=a.createSelector((e,t,r)=>{const s=e.agentSessions.byAgentId[t],i=Ie.select(e,t),o=We.select(e,t),l=e.daemonHealth.stats?.protocolVersion,c=Ne(l),g=c?Ge(s?.model,null,o):s?.model;return{session:s,providerId:i,levels:o,legacy:c,identity:JSON.stringify([g,i]),connection:Q.select(e),canWrite:!!s&&s.workspaceId===r&&!Fe.select(e,r)}});function er(e,t,r=!1){const s=t?.available===!0&&t.viaNpx!==!0;return e!=="auggie"||s||r}const mi=a.createSelector(e=>$e.select(e)?null:U.select(e)),tr=a.createSelector(e=>e.providerCatalog?.workspaceEpoch??0),S=a.createSelector((e,t)=>t?e.providerCatalog?.byWorkspaceId?.[t]:void 0),vi=a.createSelector(e=>Object.keys(e.providerCatalog?.byWorkspaceId??{})),_i=a.createSelector((e,t)=>!!S.select(e,t)&&e.providerCatalog.workspaceSnapshotEpochs?.[t]===tr.select(e)),re=a.createSelector((e,t)=>t?S.select(e,t)?.catalog.providers??[]:De.select(e)),se=a.createSelector((e,t)=>{if(!t)return Y.select(e);const r=S.select(e,t)?.settings.find(s=>s.path==="model.defaultProvider")?.value;return typeof r=="string"?r:""}),q=a.createSelector((e,t)=>{if(!t)return ze.select(e);const r=S.select(e,t)?.settings.find(s=>s.path==="providers.enabled")?.value;return r&&typeof r=="object"?r:{}}),ie=a.createSelector((e,t)=>{if(!t)return je.select(e);const r=q.select(e,t),s=se.select(e,t),i=S.select(e,t)?.readiness??{};return re.select(e,t).filter(o=>o.visible&&(!o.canBeDisabled||r[o.id]||o.id===s)&&i[o.id]?.available).map(o=>o.id)}),Ai=a.createSelector((e,t)=>{const r=q.select(e,t),s=t?S.select(e,t)?.readiness??{}:U.select(e);return re.select(e,t).filter(i=>er(i.id,s[i.id],r[i.id]===!0)).map(i=>i.id)}),yi=a.createSelector((e,t)=>t?ie.select(e,t):Ke.select(e)),ki=a.createSelector((e,t)=>v.select(e,t)),wi=a.createSelector((e,t)=>t?!!S.select(e,t):Ze.select(e)),Ei=a.createSelector((e,t)=>{if(!t)return Be.select(e);const r=S.select(e,t)?.settings??[],s=se.select(e,t),i=r.find(c=>c.path==="model.providerDefaults")?.value,o=i&&typeof i=="object"?i[s]:void 0;if(typeof o=="string")return o;const l=r.find(c=>c.path==="model.default")?.value;return typeof l=="string"?l:""}),Ci=a.createSelector((e,t)=>t?Object.fromEntries(Object.entries(e.providerModels?.byWorkspaceId?.[t]??{}).flatMap(([r,s])=>s.warning?[[r,s.warning]]:[])):Ve.select(e)),Pi=a.createSelector((e,t)=>t?Object.fromEntries(Object.entries(e.providerModels?.byWorkspaceId?.[t]??{}).map(([r,s])=>[r,s.stale===!0])):Ue.select(e)),Ri=a.createSelector((e,t)=>t?Object.fromEntries(Object.entries(e.providerModels?.byWorkspaceId?.[t]??{}).flatMap(([r,s])=>s.warning&&s.warningKind?[[r,s.warningKind]]:[])):He.select(e)),Mi=a.createSelector((e,t,r)=>{if(!r)return Qe.select(e,t);const s=q.select(e,r),i=S.select(e,r);return ie.select(e,r).filter(o=>o!==t&&(s[o]||i?.catalog.providers.find(l=>l.id===o)?.canBeDisabled===!1)&&Ye(o,i?.readiness[o]?.authenticated))}),Ti=a.createSelector((e,t)=>t?S.select(e,t)?.readiness??{}:U.select(e)),rr={},Ii=a.createSelector(e=>e.providerSettings?.profiles?.status??rr),Z={},sr=a.createSelector((e,t)=>t?e.providerCatalog?.byWorkspaceId?.[t]?.mcpServers??[]:e.mcpSettings.servers),Fi=a.createSelector((e,t,r)=>{const s=e.providerCatalog?.byWorkspaceId?.[t];return s?s.mcpServers?.find(i=>i.id===r)?.name:e.providerCatalog?.mcpServerNamesByWorkspaceId?.[t]?.[r]}),Di=a.createSelector(e=>e.mcpSettings.loading),Li=a.createSelector(e=>e.mcpSettings.error),Oi=a.createSelector(e=>e.mcpSettings.mutationError??null),xi=a.createSelector(e=>e.mcpSettings.enabled),ir=a.createSelector(e=>e.mcpSettings.disabledServers),ar=a.createSelector(e=>e.mcpSettings.statusMap),nr=a.createSelector(e=>e.mcpSettings.toolsMap),or=a.createSelector((e,t)=>{if(!t)return e.mcpSettings.errorMessages;const r=e.providerCatalog?.byWorkspaceId?.[t],s=new Map(r?.mcpServers?.map(i=>[i.id,w(i)])??[]);return Object.fromEntries((r?.mcpStatuses??[]).flatMap(i=>{const o=s.get(i.serverId);return o&&i.lastError?[[o,i.lastError]]:[]}))}),cr=a.createSelector((e,t)=>t?e.mcpSettings.byWorkspaceId[t]?.disabledServers??Z:Z),Wi=a.createSelector((e,t)=>Object.keys(cr.select(e,t))),Ni=a.createSelector(e=>{const t=sr.select(e),r=ar.select(e),s=nr.select(e),i=ir.select(e),o=or.select(e);return t.map(l=>{const c=w(l)in i,g=s[w(l)]||[];let f=r[w(l)]||"disconnected";return c&&(f="disabled"),{...l,disabled:c,status:f,tools:g,toolCount:g.length,errorMessage:o[w(l)]}})});a.createSelector((e,t)=>e.mcpSettings.errorMessages[t]);const Gi=a.createSelector(e=>e.mcpSettings.lastImportedCount),Bi=a.createSelector(e=>e.mcpSettings.advancedSaveStatus),Vi=a.createSelector(e=>e.mcpSettings.advancedSaveError);function h(e){return{category:"settings",...e}}const T=[{id:"new-workspace",tab:"",label:"New workspace",route:"/workspace/new",category:"navigation",description:"Create-workspace flow."},h({id:"utility-default-model",tab:"providers",hashAliases:["utility-default-model","default-model","quickActions.defaultModel","backgroundAgents.defaultModel"],scrollSelector:"#utility-default-model",highlightSelector:'[data-highlight-id="utility-default-model"]',label:"Settings: Default model",route:"/settings?tab=providers#utility-default-model",description:"Default AI behavior model selection."}),h({id:"global-instructions",tab:"agent-behavior",hashAliases:["global-instructions","agents","specialists","all-agents"],scrollSelector:"#global-instructions",highlightSelector:'[data-highlight-id="global-instructions"]',label:"Settings: Agent Behavior",route:"/settings?tab=agent-behavior#global-instructions",description:"Global agent instructions and defaults."}),h({id:"create-specialist",tab:"specialists",hashAliases:["create-specialist"],scrollSelector:"#create-specialist",highlightSelector:'[data-highlight-id="create-specialist"]',label:"Settings: Create specialist",route:"/settings?tab=specialists&view=create-specialist#create-specialist",description:"Create-specialist entry point."}),h({id:"providers",tab:"providers",hashAliases:["providers"],scrollSelector:"#providers",highlightSelector:'[data-highlight-id="providers"]',label:"Settings: AI coding CLIs",route:"/settings?tab=providers#providers",description:"Provider/account selector settings."}),h({id:"integrations",tab:"connections",hashAliases:["integrations"],scrollSelector:"#integrations",highlightSelector:'[data-highlight-id="integrations"]',label:"Settings: Connections",route:"/settings?tab=connections#integrations",description:"Connected integrations settings."}),h({id:"devices",tab:"devices",hashAliases:["devices","machines"],scrollSelector:"#devices",highlightSelector:"#devices",label:"Settings: Machines",route:"/settings?tab=devices#devices",description:"Saved remote machine settings."}),h({id:"mobile",tab:"mobile",hashAliases:["mobile"],scrollSelector:"#mobile",highlightSelector:'[data-highlight-id="mobile"]',label:"Settings: Mobile",route:"/settings?tab=mobile#mobile",description:"Remote access and Intent Mobile pairing."}),h({id:"guest-sessions",tab:"collaboration",hashAliases:["collaboration","guest-sessions","sharing"],scrollSelector:"#collaboration",highlightSelector:"#collaboration",label:"Settings: Collaboration",route:"/settings?tab=collaboration#collaboration",description:"Host membership, workspace guests and joined hosts."}),h({id:"websocket-api",tab:"mobile",hashAliases:["websocket-api","remote-access"],scrollSelector:"#websocket-api",highlightSelector:'[data-highlight-id="websocket-api"]',label:"Settings: Remote Access",route:"/settings?tab=mobile#websocket-api",description:"Remote access (WebSocket API) settings."}),...[["voice","Voice Dictation","Voice dictation settings.","input"],["keyboard-shortcuts","Keyboard Shortcuts","Keyboard shortcuts reference.","input"],["autocomplete","Autocomplete","Suggest as you type: service, model and API keys.","input"],["mcp-servers","MCP Servers","MCP server configuration.","connections"],["plugins","Plugins","App-wide Agent Plugins.","connections"],["git-workspace","Git & Workspace","Git and workspace defaults.","setup"],["git","Git","Git defaults.","setup"],["shell","Shell","Shell settings.","setup"],["workspace","Workspace","Workspace defaults.","setup"],["cli-optimization","CLI Optimization","RTK/CLI optimization settings.","token-savings"],["workspace-api","Tool Output & Retention","Tool output size and retention settings.","advanced"],["notifications","Notifications","Notification preferences.","app-behavior"],["updates","Updates","Application update preferences.","app-behavior"],["open-in","Open In","External editor/app launch preferences.","app-behavior"],["github-link-action","GitHub Links","GitHub issue and pull request link behavior.","app-behavior"],["agent-features","Agent Features","Agent feature settings.","token-savings"],["font-style","Font style","Font style settings.","display"],["language","Language","Application language settings.","display"],["labs","Labs","Experimental feature switches.","advanced"],["agent-backend","Agent Backend","Agent backend settings.","performance"],["connection","Connection","Daemon connection details.","advanced"],["hardware","Hardware","Hardware integration settings.","input"],["developer","Developer","Development-only settings.","advanced"]].map(([e,t,r,s])=>h({id:e,tab:s,hashAliases:[e],scrollSelector:`#${e}`,highlightSelector:`[data-highlight-id="${e}"]`,label:`Settings: ${t}`,route:`/settings?tab=${s}#${e}`,description:r})),h({id:"appearance",tab:"display",hashAliases:["appearance","theme"],scrollSelector:"#theme",highlightSelector:'[data-highlight-id="appearance"]',label:"Settings: Appearance",route:"/settings?tab=display#theme",description:"Theme mode controls."}),...[["color-theme","Color theme","Color theme selection."],["note-font","Notes font","Notes/spec font style."],["agent-chat-font","Agent chat font","Agent chat font style."],["code-font","Code font","Code editor and diff font."]].map(([e,t,r])=>h({id:e,tab:"display",hashAliases:[e],scrollSelector:`#${e}`,highlightSelector:`[data-highlight-id="${e}"]`,label:`Settings: ${t}`,route:`/settings?tab=display#${e}`,description:r})),h({id:"general",tab:"advanced",hashAliases:["general","reset"],scrollSelector:"#reset",highlightSelector:'[data-highlight-id="general"]',label:"Settings: Advanced",route:"/settings?tab=advanced#reset",description:"Advanced settings and reset controls."}),{id:"workspace-card",tab:"",hashAliases:["workspace-card"],highlightSelector:'[data-highlight-id^="workspace-"]',label:"Workspace card",category:"workspace",description:"A workspace card on workspace list surfaces.",dynamic:!0,idPattern:"workspace-{workspaceId}"},{id:"specialist-entry",tab:"specialists",highlightSelector:'[data-highlight-id^="specialist-"]',label:"Specialist entry",route:"/settings?tab=specialists&specialist={specialistId}#specialist-{specialistId}",category:"specialist",description:"A specific specialist row in settings.",dynamic:!0,idPattern:"specialist-{specialistId}"}];function ae(e){const t=e.indexOf("#"),r=t>=0?e.slice(t+1):e;return decodeURIComponent(r.replace(/^#/,"")).trim()}function lr(e){return e.replace(/[.*+?^${}()|[\]\\]/g,"\\$&")}function dr(e,t){if(!t.match(/\{[^}]+\}/g)?.length)return e===t;const s=t.split(/\{[^}]+\}/g).map(lr).join("[^/]+");return new RegExp(`^${s}$`).test(e)}function ur(e){const t=ae(e);if(!t)return;const r=T.find(i=>i.id===t||i.hashAliases?.includes(t));if(r)return r;const s=T.find(i=>i.route&&i.dynamic&&i.idPattern&&dr(t,i.idPattern));return s?{...s,id:t}:void 0}function Ui(){return T.map(e=>({...e,hashAliases:e.hashAliases?[...e.hashAliases]:void 0}))}function pr(e){try{return new URL(e,"app://intent").pathname||"/"}catch{const t=e.indexOf("?"),r=e.indexOf("#");let s=e.length;return t>=0&&(s=Math.min(s,t)),r>=0&&(s=Math.min(s,r)),e.slice(0,s)||"/"}}const gr=new Set(T.flatMap(e=>e.route?[pr(e.route)]:[])),hr=[/^\/workspace\/[^/]+$/,/^\/agent\/[^/]+$/];function Hi(e){if(typeof e!="string")return!1;const t=e.trim();if(!t)return!1;if(t.startsWith("intent://"))return!0;let r,s;try{const i=new URL(t,"app://intent");if(i.protocol!=="app:")return!1;r=i.pathname||"/",s=ae(i.hash)}catch{return!1}return gr.has(r)?s?!!ur(s):!0:hr.some(i=>i.test(r))}const qi=["agentFeatures.backgroundHooks","agentFeatures.hostExec","agentFeatures.secretRequests","agentFeatures.scripts","agentFeatures.terminalAccess","agentFeatures.browserAutomation","agentFeatures.desktopControl","agentFeatures.richChatBlocks","agentFeatures.structuredQuestions","agentFeatures.attentionRequests","agentFeatures.stateSnapshot","agentFeatures.prMonitor","agentFeatures.taskGraph","agentFeatures.peerAgents","agentFeatures.mcpTools"],fr=[{path:"agentFeatures.backgroundHooks",label:()=>n.settings_agentFeatures_backgroundHooks_label(),description:()=>n.settings_agentFeatures_backgroundHooks_description(),defaultValue:!0},{path:"agentFeatures.hostExec",label:()=>n.settings_agentFeatures_hostExec_label(),description:()=>n.settings_agentFeatures_hostExec_description(),defaultValue:!0},{path:"agentFeatures.secretRequests",label:()=>n.settings_agentFeatures_secretRequests_label(),description:()=>n.settings_agentFeatures_secretRequests_description(),defaultValue:!1},{path:"agentFeatures.scripts",label:()=>n.settings_agentFeatures_scripts_label(),description:()=>n.settings_agentFeatures_scripts_description(),defaultValue:!0},{path:"agentFeatures.terminalAccess",label:()=>n.settings_agentFeatures_terminalAccess_label(),description:()=>n.settings_agentFeatures_terminalAccess_description(),defaultValue:!0},{path:"agentFeatures.browserAutomation",label:()=>n.settings_agentFeatures_browserAutomation_label(),description:()=>n.settings_agentFeatures_browserAutomation_description(),defaultValue:!0},{path:"agentFeatures.desktopControl",label:()=>n.settings_agentFeatures_desktopControl_label(),description:()=>n.settings_agentFeatures_desktopControl_description(),info:()=>n.settings_agentFeatures_desktopControl_info(),defaultValue:!0},{path:"agentFeatures.richChatBlocks",label:()=>n.settings_agentFeatures_richChatBlocks_label(),description:()=>n.settings_agentFeatures_richChatBlocks_description(),defaultValue:!0},{path:"agentFeatures.structuredQuestions",label:()=>n.settings_agentFeatures_structuredQuestions_label(),description:()=>n.settings_agentFeatures_structuredQuestions_description(),defaultValue:!0},{path:"agentFeatures.attentionRequests",label:()=>n.settings_agentFeatures_attentionRequests_label(),description:()=>n.settings_agentFeatures_attentionRequests_description(),defaultValue:!0},{path:"agentFeatures.stateSnapshot",label:()=>n.settings_agentFeatures_stateSnapshot_label(),description:()=>n.settings_agentFeatures_stateSnapshot_description(),defaultValue:!0},{path:"agentFeatures.prMonitor",label:()=>n.settings_agentFeatures_prMonitor_label(),description:()=>n.settings_agentFeatures_prMonitor_description(),defaultValue:!0},{path:"agentFeatures.taskGraph",label:()=>n.settings_agentFeatures_taskGraph_label(),description:()=>n.settings_agentFeatures_taskGraph_description(),defaultValue:!0},{path:"agentFeatures.peerAgents",label:()=>n.settings_agentFeatures_peerAgents_label(),description:()=>n.settings_agentFeatures_peerAgents_description(),defaultValue:!0},{path:"agentFeatures.mcpTools",label:()=>n.settings_agentFeatures_mcpTools_label(),description:()=>n.settings_agentFeatures_mcpTools_description(),defaultValue:!0}],$i=Object.fromEntries(fr.map(e=>[e.path,e.defaultValue]));export{Ri as $,Hi as A,Xs as B,Ct as C,zr as D,Jt as E,fr as F,J as G,_t as H,fi as I,gi as J,Et as K,ur as L,Rs as M,Ks as N,Si as O,Xt as P,bi as Q,Zr as R,A as S,es as T,yi as U,se as V,q as W,Ai as X,ie as Y,re as Z,Pi as _,Je as a,sr as a$,Ci as a0,Mi as a1,Ti as a2,wi as a3,Ei as a4,ki as a5,Jr as a6,rs as a7,Es as a8,ks as a9,qr as aA,Lr as aB,xr as aC,Br as aD,Wr as aE,Gr as aF,Or as aG,Hr as aH,Dr as aI,$r as aJ,ps as aK,Qt as aL,Zt as aM,ui as aN,li as aO,ds as aP,us as aQ,di as aR,Vi as aS,Bi as aT,ir as aU,xi as aV,Li as aW,or as aX,Gi as aY,Di as aZ,Oi as a_,As as aa,ys as ab,ws as ac,_s as ad,ci as ae,ls as af,fs as ag,ns as ah,js as ai,os as aj,cs as ak,Qr as al,Xr as am,H as an,it as ao,dt as ap,ut as aq,X as ar,lt as as,at,st as au,ot as av,ct as aw,Nr as ax,Vr as ay,Ur as az,$i as b,Ni as b0,ar as b1,nr as b2,oi as b3,is as b4,Ii as b5,mi as b6,St as b7,bs as b8,ms as b9,Fi as bA,Zs as bB,Ys as bC,ni as bD,Ut as bE,ii as bF,Ms as bG,Ps as bH,Ts as bI,Cs as bJ,jt as bK,vs as bL,hs as ba,Ss as bb,as as bc,gs as bd,v as be,ts as bf,Yr as bg,$s as bh,xs as bi,Hs as bj,qs as bk,Ns as bl,Vs as bm,Bs as bn,Ws as bo,Os as bp,Ls as bq,zs as br,Ds as bs,Gs as bt,Us as bu,S as bv,tr as bw,_i as bx,vi as by,Wi as bz,qi as c,hi as d,ai as e,Pt as f,It as g,Qs as h,Js as i,ss as j,ft as k,ht as l,ti as m,Ui as n,Is as o,Fs as p,jr as q,Kr as r,ri as s,si as t,rt as u,wt as v,er as w,ei as x,pi as y,K as z};
1
+ var ne=Object.defineProperty;var oe=(e,t,r)=>t in e?ne(e,t,{enumerable:!0,configurable:!0,writable:!0,value:r}):e[t]=r;var d=(e,t,r)=>oe(e,typeof t!="symbol"?t+"":t,r);import{m as ce,N as le,T as de,d as ue,o as pe,w as ge}from"./SX1khnGy.js";import"./CJxGDkBm.js";import{bm as n,_ as he}from"./51_h0jm2.js";import"./CpPNoOk-.js";import"./DxvSggY5.js";import"./CF1Tu_8c.js";import{c as V}from"./ChTqQfQN.js";import"./JKboQXkL.js";import{J4 as a,uk as fe,nM as y,nL as k,me as Se,yG as C,yH as N,yE as be,yD as me,yF as ve,rD as _e,c3 as Ae,c2 as ye,ch as ke,cg as we,nO as w}from"./Zldsekdv.js";import{cR as Ee,cG as Ce,bG as Pe,ci as Re,cy as Me,ck as Te,cP as Q,aI as Ie,c0 as Fe,cX as De}from"./XJqoy2ap.js";import{a as Le,i as Oe}from"./DCOxMTSf.js";import{i as D}from"./DMl4Z5o_.js";import{n as xe}from"./BbQfjn7f.js";import{x as We,aO as Ne,c as Ge,aD as Be,B as Ve,y as Ue,z as He}from"./Bs9TCQJX.js";import{_ as qe,J as Y,$ as $e,aw as U,X as ze,a1 as je,K as Ke,Z as Ze,ay as Qe,w as Ye}from"./DVy6H5Ng.js";const Je=5,L=120,Xe=4e3,j=.2,et=.8;function tt(e,t,r=Je){const s=e.length>0?t/(2*e.length):0,i=Xe/L;return Array.from({length:r},(o,l)=>{if(s<=0)return 0;const c=L*i**(l/r),g=L*i**((l+1)/r),f=Math.min(e.length-1,Math.floor(c/s)),b=Math.min(e.length,Math.max(f+1,Math.ceil(g/s)));let $=0;for(let F=f;F<b;F+=1)$+=e[F]??0;const z=($/(b-f)/255-j)/(et-j);return Number.isFinite(z)?Math.min(1,Math.max(0,z)):0})}const rt=Object.freeze(Object.defineProperty({__proto__:null,NOTIFY_DURATION:le,TOAST_COUNTDOWN_CLASS:de,TOAST_COUNTDOWN_NO_HOVER_PAUSE_CLASS:ue,notify:ce,notifyMetadata:pe,withToastCountdown:ge},Symbol.toStringTag,{value:"Module"})),Dr=a.createSelector(e=>Ee.select(e)?.capabilities.gitlabCheckout===!0),Lr=a.createSelector(e=>e.gitlabAuth.host),Or=a.createSelector(e=>e.gitlabAuth.instanceBaseUrl??e.gitlabAuth.host),xr=a.createSelector(e=>fe(e.gitlabAuth.instanceBaseUrl??e.gitlabAuth.host)??""),Wr=a.createSelector(e=>e.gitlabAuth.isCancelling),Nr=a.createSelector(e=>e.gitlabAuth.cancelOutcome),Gr=a.createSelector(e=>e.gitlabAuth.isConfigured),Br=a.createSelector(e=>e.gitlabAuth.isAuthenticating),Vr=a.createSelector(e=>e.gitlabAuth.deviceFlow),Ur=a.createSelector(e=>e.gitlabAuth.deviceGrantSupported),Hr=a.createSelector(e=>e.gitlabAuth.user),qr=a.createSelector(e=>e.gitlabAuth.error);a.createSelector(e=>e.gitlabAuth.method);const $r=a.createSelector(e=>e.gitlabAuth.statusReady===!0),A=[{id:"pr-reviewer",icon:"pr-reviewer",get name(){return n.specialists_builtin_prReviewer_name()},get description(){return n.specialists_builtin_prReviewer_description()},defaultBehaviorPrompt:"",promptUnavailable:!0},{id:"ui-designer",icon:"ui-designer",get name(){return n.specialists_builtin_uiDesigner_name()},get description(){return n.specialists_builtin_uiDesigner_description()},defaultBehaviorPrompt:"",promptUnavailable:!0},{id:"vulnerability-scanner",icon:"pr-reviewer",get name(){return n.specialists_builtin_vulnerabilityScanner_name()},get description(){return n.specialists_builtin_vulnerabilityScanner_description()},defaultBehaviorPrompt:"",promptUnavailable:!0},{id:"developer",icon:"verifier",get name(){return n.specialists_builtin_developer_name()},get description(){return n.specialists_builtin_developer_description()},defaultBehaviorPrompt:"",promptUnavailable:!0},{id:"product-manager",icon:"coordinator",get name(){return n.specialists_builtin_productManager_name()},get description(){return n.specialists_builtin_productManager_description()},defaultBehaviorPrompt:"",promptUnavailable:!0},{id:"maintenance-coordinator",icon:"ralph",get name(){return n.specialists_builtin_maintenanceCoordinator_name()},get description(){return n.specialists_builtin_maintenanceCoordinator_description()},defaultBehaviorPrompt:"",promptUnavailable:!0},{id:"chief-of-staff",icon:"chief-of-staff",get name(){return n.specialists_builtin_chiefOfStaff_name()},get description(){return n.specialists_builtin_chiefOfStaff_description()},hidden:!0,defaultBehaviorPrompt:"",promptUnavailable:!0}],J=new Set(["pr-reviewer"]),zr="developer";function jr(e){return A.find(t=>t.id===e)}const st=a.createSelector(e=>e.githubAuth.mutationRequestId),it=a.createSelector(e=>e.githubAuth.callbacksCancelled),at=a.createSelector(e=>e.githubAuth.isDisconnecting),X=a.createSelector(e=>e.githubAuth.isAuthenticated),nt=a.createSelector(e=>e.githubAuth.statusSettled===!0),ot=a.createSelector(e=>e.githubAuth.requiresDaemonAuth),ct=a.createSelector(e=>e.githubAuth.user),lt=a.createSelector(e=>e.githubAuth.isAuthenticating),dt=a.createSelector(e=>e.githubAuth.deviceFlow),ut=a.createSelector(e=>e.githubAuth.error),Kr=Object.freeze(Object.defineProperty({__proto__:null,selectGitHubAuthCallbacksCancelled:it,selectGitHubAuthDeviceFlow:dt,selectGitHubAuthError:ut,selectGitHubAuthIsAuthenticated:X,selectGitHubAuthIsAuthenticating:lt,selectGitHubAuthIsDisconnecting:at,selectGitHubAuthMutationRequestId:st,selectGitHubAuthRequiresDaemonAuth:ot,selectGitHubAuthStatusSettled:nt,selectGitHubAuthUser:ct},Symbol.toStringTag,{value:"Module"}));function u(e){return e??""}function pt(e,t){const r=e??[],s=t??[];return r.length===s.length&&r.every((i,o)=>u(i.provider)===u(s[o].provider)&&i.model===s[o].model&&i.hint===s[o].hint&&u(i.reasoningEffort)===u(s[o].reasoningEffort))}function K(e,t){if(e.source!=="user"||!t?.ignoreModelPin&&(e.model||e.codingAgent))return!1;const r=e.bundled;return r?u(e.name)===u(r.name)&&u(e.description)===u(r.description)&&u(e.behaviorPrompt)===u(r.behaviorPrompt)&&u(e.roleReminder)===u(r.roleReminder)&&u(e.reasoningEffort)===u(r.reasoningEffort)&&pt(e.modelOptions,r.modelOptions):!1}const Zr=a.createSelector(e=>e.specialists.bundledSpecialists),gt=a.createSelector(e=>e.specialists.fileSpecialists),Qr=a.createSelector(e=>y(gt.select(e))),Yr=a.createSelector(e=>e.specialists.userOverrides);a.createSelector(e=>e.specialists.overridesLoaded);const Jr=a.createSelector(e=>e.specialists.customSpecialistsLoaded),Xr=a.createSelector(e=>e.specialists.fileSpecialistsLoaded),es=a.createSelector(e=>e.specialists.bundledSpecialistsLoaded),ts=a.createSelector(e=>e.specialists.specialistsFolderPath),rs=a.createSelector((e,t)=>{if(!t)return e.specialists.defaultSpecialistId??"";const r=e.providerCatalog?.byWorkspaceId?.[t]?.settings.find(s=>s.path==="specialists.default")?.value;return typeof r=="string"?r:""});a.createSelector(e=>e.specialists.providerModelOverrides);const O=a.createSelector((e,t)=>!(J.has(t)&&!X.select(e)));function ht(e,t){return t?e:e.filter(r=>!J.has(r.id))}function ft(e,t){return ht(e,t).filter(r=>!r.hidden)}function ss(e,t){return ft(e,t).filter(r=>r.role!=="internal")}const v=a.createSelector((e,t)=>{if(t)return(e.providerCatalog?.byWorkspaceId?.[t]?.specialists??[]).map(c=>({...c,defaultModel:c.model,defaultBehaviorPrompt:c.behaviorPrompt??c.prompt??"",defaultAgentType:c.agentType}));const r=y(e.specialists.fileSpecialists),s=e.specialists.bundledSpecialists,i=new Set,o=[];for(const c of r)!i.has(c.id)&&O.select(e,c.id)&&(i.add(c.id),o.push({id:c.id,name:c.name,description:c.description,codingAgent:c.codingAgent,defaultModel:c.model||void 0,defaultBehaviorPrompt:c.behaviorPrompt,roleReminder:c.roleReminder,source:c.source,importedFrom:c.importedFrom,unsupportedFields:c.unsupportedFields,requiredSkills:c.requiredSkills,missingSkills:c.missingSkills,hidden:c.hidden,resolvedModel:c.resolvedModel,resolvedProvider:c.resolvedProvider,modelOptions:c.modelOptions,reasoningEffort:c.reasoningEffort,role:c.role,teamAgents:c.teamAgents,icon:c.icon}));for(const c of s)!i.has(c.id)&&O.select(e,c.id)&&(i.add(c.id),o.push(c));if(!e.specialists.bundledSpecialistsLoaded&&r.length===0&&s.length===0)for(const c of A)!i.has(c.id)&&O.select(e,c.id)&&(i.add(c.id),o.push(c));const l=new Map;for(const c of A)l.has(c.id)||l.set(c.id,l.size);for(const c of s)l.has(c.id)||l.set(c.id,l.size);return o.sort((c,g)=>{const f=l.has(c.id),b=l.has(g.id);return f&&b?(l.get(c.id)??0)-(l.get(g.id)??0):f&&!b?-1:!f&&b?1:c.name.localeCompare(g.name)}),o}),is=a.createSelector(e=>{const t=v.select(e).filter(s=>s.role==="orchestrator");if(t.length===0)return null;const r=new Set([...A.map(({id:s})=>s),...e.specialists.bundledSpecialists.map(({id:s})=>s)]);return t.sort((s,i)=>+!r.has(s.id)-+!r.has(i.id)||s.id.localeCompare(i.id)),t[0]}),St=a.createSelector((e,t)=>{const r=k(e.specialists.fileSpecialists,t);if(r)return{id:r.id,name:r.name,description:r.description,source:r.source};const s=e.specialists.bundledSpecialists.find(i=>i.id===t);if(s)return{id:s.id,name:s.name,description:s.description,source:"builtin"};if(!e.specialists.bundledSpecialistsLoaded&&y(e.specialists.fileSpecialists).length===0&&e.specialists.bundledSpecialists.length===0){const i=A.find(o=>o.id===t);if(i)return{id:i.id,name:i.name,description:i.description,source:"builtin"}}return null}),as=a.createSelector((e,t)=>St.select(e,t)?.name??null),ns=a.createSelector((e,t,r)=>{const i=v.select(e,r).find(o=>o.id===t);return i?i.defaultModel?i.defaultModel:i.resolvedModel??"":""}),os=a.createSelector((e,t,r)=>v.select(e,r).find(o=>o.id===t)?.defaultModel||void 0),cs=a.createSelector((e,t,r)=>v.select(e,r).find(o=>o.id===t)?.reasoningEffort||void 0),ls=a.createSelector((e,t,r)=>{const i=v.select(e,r).find(o=>o.id===t);return i?i.defaultBehaviorPrompt:""});function P(e,t){return t.some(r=>r.id===e)||A.some(r=>r.id===e)}const ds=a.createSelector((e,t,r)=>{if(r){const s=e.providerCatalog?.byWorkspaceId?.[r]?.specialists.find(i=>i.id===t);return!s||s.importedFrom?!1:s.source==="bundled"||s.source==="user"&&P(t,e.specialists.bundledSpecialists)}return P(t,e.specialists.bundledSpecialists)}),us=a.createSelector((e,t,r)=>r?!!H.select(e,t,r):!!k(e.specialists.fileSpecialists,t)),ps=a.createSelector((e,t,r)=>{if(r){const o=H.select(e,t,r);return!o||o.importedFrom||o.source==="project"?!1:P(t,e.specialists.bundledSpecialists)&&!K(o)}if(!P(t,e.specialists.bundledSpecialists))return!1;const i=k(e.specialists.fileSpecialists,t);return!i||i.source!=="user"?!1:!K(i)}),H=a.createSelector((e,t,r)=>{if(r){const s=e.providerCatalog?.byWorkspaceId?.[r]?.specialists.find(i=>i.id===t);return!s||s.source==="bundled"?void 0:{...s,source:s.source,model:s.model??"",behaviorPrompt:s.behaviorPrompt??s.prompt??"",filePath:s.path??""}}return k(e.specialists.fileSpecialists,t)}),gs=a.createSelector((e,t,r)=>{const s=H.select(e,t,r);return r&&!s?e.providerCatalog?.byWorkspaceId?.[r]?.specialists.some(i=>i.id===t)?"Built-in":null:s?.source==="project"?"Project":s?.source==="user"?"User":e.specialists.bundledSpecialists.some(i=>i.id===t)?"Built-in":null}),hs=a.createSelector((e,t,r)=>{if(r)return e.providerCatalog?.byWorkspaceId?.[r]?.specialists.find(o=>o.id===t)?.path;const s=k(e.specialists.fileSpecialists,t);if(s)return s.filePath;const i=e.specialists.bundledSpecialists.find(o=>o.id===t);if(i&&"filePath"in i)return i.filePath}),fs=a.createSelector((e,t,r)=>{if(r){const i=v.select(e,r).find(c=>c.id===t),o=i?.codingAgent||i?.resolvedProvider;if(o)return Ce.select(e,o,r);const l=Pe.select(e,r);return e.providerCatalog?.byWorkspaceId?.[r]?.readiness[l]?.available?l:""}const s=k(e.specialists.fileSpecialists,t);return s?.codingAgent?s.codingAgent:bt.select(e,t)}),bt=a.createSelector((e,t)=>{const s=v.select(e).find(i=>i.id===t);return s?.codingAgent?s.codingAgent:qe.select(e)?Y.select(e):""}),Ss=a.createSelector((e,t)=>{if(t)return e.providerCatalog?.byWorkspaceId?.[t]?.importDiagnostics??[];const r=e.specialists.importDiagnostics;return r?y(r):[]}),bs=a.createSelector((e,t)=>e.specialists.creationByContext?.[t]??Se),ms=a.createSelector(e=>Object.values(e.specialists.creationByContext??{}).flatMap(t=>t.specialistId?[t.specialistId]:[])),x=V("Clipboard");async function vs(e){let t;if(Le())try{const r=await Oe("system:write-clipboard",{text:e});if(r?.success===!1)throw new Error(r.error||"Electron clipboard write failed");return}catch(r){t=r,x.warn("Electron clipboard write failed; falling back to browser clipboard",{error:r})}if(typeof navigator<"u"&&navigator.clipboard?.writeText)try{await navigator.clipboard.writeText(e);return}catch(r){throw x.error("Browser clipboard write failed",r,{electronError:t}),r}throw x.error("No clipboard write API is available",void 0,{electronError:t}),t instanceof Error?t:new Error("Clipboard write API unavailable")}const _s=a.createSelector(e=>e.directoryPicker.source??"daemon"),As=a.createSelector(e=>e.directoryPicker.listing),ys=a.createSelector(e=>e.directoryPicker.loading),ks=a.createSelector(e=>e.directoryPicker.error),ws=a.createSelector(e=>e.directoryPicker.pathError),Es=a.createSelector(e=>e.directoryPicker.createError),mt=V("WorkspaceValidation");async function Cs(e,t=!1,r=!1){if(!e||e.trim().length===0)return{valid:!1,error:n.workspace_validation_repoPathRequired_error(),suggestion:n.workspace_validation_repoPathRequired_suggestion()};const s=e.trim();return vt(s)?At(s):yt(s,t,r)}function vt(e){return[/^https?:\/\/github\.com\//i,/^git@github\.com:/i,/^github\.com\//i,/^([a-zA-Z0-9\-_]+)\/([a-zA-Z0-9\-_\.]+)$/].some(r=>r.test(e.trim()))}function _t(e){const t=e.trim(),r=[/^https?:\/\/github\.com\/([^\/]+)\/([^\/]+)$/i,/^git@github\.com:([^\/]+)\/([^\/]+)$/i,/^github\.com\/([^\/]+)\/([^\/]+)$/i];for(const i of r){const o=t.match(i);if(o){const l=o[2].replace(/\.git$/,"");return l?{owner:o[1],repo:l}:null}}const s=t.match(/^([a-zA-Z0-9\-_]+)\/([a-zA-Z0-9\-_\.]+)$/);if(s&&!t.includes("\\")&&!t.includes(":")){const i=s[2].replace(/\.git$/,"");return i?{owner:s[1],repo:i}:null}return null}async function At(e){return _t(e)?{valid:!0,warning:n.workspace_validation_githubCloneLocally_warning()}:{valid:!1,error:n.workspace_validation_invalidGithubUrl_error(),suggestion:n.workspace_validation_invalidGithubUrl_suggestion()}}async function yt(e,t=!1,r=!1){if(e.includes("\0"))return{valid:!1,error:n.workspace_validation_nullCharacters_error()};if(!e.startsWith("/")&&!e.startsWith("~")&&!e.startsWith(".")&&!e.includes(":\\")&&!/^[a-zA-Z]:\//.test(e))return{valid:!1,error:n.workspace_validation_pathNotAbsolute_error(),suggestion:n.workspace_validation_pathNotAbsolute_suggestion()};if(typeof window<"u"&&window.electronAPI)try{const s=await D("file:getDirectoryStatus",{path:e});if(s.success&&s.data){const l=s.data;return l.exists?l.isDirectory?l.isGitRepo?{valid:!0,isNewRepo:!1,directoryStatus:l}:l.isSubdirectoryOfGitRepo?{valid:!0,isNewRepo:!1,directoryStatus:l,warning:n.workspace_validation_insideParentRepo_warning({path:l.parentGitRoot??""})}:r?{valid:!0,isNewRepo:!1,directoryStatus:l}:t?l.isEmpty?{valid:!0,isNewRepo:!0,directoryStatus:l,warning:n.workspace_validation_emptyDirInit_warning()}:{valid:!0,isNewRepo:!0,directoryStatus:l,warning:n.workspace_validation_nonGitDirInit_warning()}:{valid:!1,error:n.workspace_repoSelector_notGitRepository_label(),directoryStatus:l}:{valid:!1,error:n.workspace_validation_notDirectory_error(),suggestion:n.workspace_validation_notDirectory_suggestion(),directoryStatus:l}:t?{valid:!0,isNewRepo:!0,directoryStatus:l,warning:n.workspace_validation_willCreateRepo_warning()}:{valid:!1,error:n.workspace_validation_dirNotExist_error(),suggestion:n.workspace_validation_dirNotExist_suggestion(),directoryStatus:l}}if(!(await D("file:exists",{path:e})).exists)return t?{valid:!0,isNewRepo:!0,warning:n.workspace_validation_willCreateRepo_warning()}:{valid:!1,error:n.workspace_validation_dirNotExist_error(),suggestion:n.workspace_validation_dirNotExistLegacy_suggestion()};const o=await D("git:isRepository",{path:e});if(!t&&o?.isRepository!==!0)return{valid:!1,error:o?.isRepository===!1?n.workspace_repoSelector_notGitRepository_label():n.workspace_compactInitializer_gitCheckUnknown_label()};if(!o.isRepository)return{valid:!0,isNewRepo:!0,warning:n.workspace_validation_nonGitInit_warning()}}catch(s){if(mt.warn("Could not validate path existence",s),!t)return{valid:!1,error:n.workspace_compactInitializer_gitCheckUnknown_label()}}return{valid:!0,isNewRepo:!1}}function Ps(e){if(!e||e.trim().length===0)return{valid:!0};const t=e.trim();return/[\s~^:?*\[\]\\]/.test(t)?{valid:!1,error:n.workspace_validation_branchPrefixInvalidChars_error(),suggestion:n.workspace_validation_branchChars_suggestion()}:t==="."||t===".."||t.startsWith(".")?{valid:!1,error:n.workspace_validation_branchPrefixDot_error()}:t.includes("..")||t.includes("//")?{valid:!1,error:n.workspace_validation_branchPrefixConsecutive_error()}:t.startsWith("/")?{valid:!1,error:n.workspace_validation_branchPrefixSlash_error()}:t.endsWith(".lock")?{valid:!1,error:n.workspace_validation_branchPrefixLock_error()}:t.length>50?{valid:!1,error:n.workspace_validation_branchPrefixTooLong_error()}:{valid:!0}}function Rs(e){if(!e||e.trim().length===0)return"";let t=e.trim().replace(/^[./]+/,"").replace(/[\s~^:?*\[\]\\]/g,"-").replace(/\.{2,}/g,"-").replace(/\/{2,}/g,"/").replace(/-{2,}/g,"-").replace(/^-+/,"").replace(/\.lock$/,"").toLowerCase();return t.length>0&&!t.endsWith("/")&&!t.endsWith("-")&&(t=t.includes("/")?`${t}/`:`${t}/`),t}function Ms(e){if(!e||e.trim().length===0)return{valid:!1,error:n.workspace_validation_branchNameRequired_error()};const t=e.trim();return/[\s~^:?*\[\]\\]/.test(t)?{valid:!1,error:n.workspace_validation_branchNameInvalidChars_error(),suggestion:n.workspace_validation_branchChars_suggestion()}:["HEAD",".",".."].includes(t)?{valid:!1,error:n.workspace_validation_branchNameReserved_error()}:t.includes("..")||t.includes("//")?{valid:!1,error:n.workspace_validation_branchNameConsecutive_error()}:t.startsWith("/")||t.endsWith("/")?{valid:!1,error:n.workspace_validation_branchNameSlash_error()}:t.endsWith(".lock")?{valid:!1,error:n.workspace_validation_branchNameLock_error()}:{valid:!0}}function Ts(e){return!e||e.trim().length===0?{valid:!0}:e.trim().length>1e5?{valid:!1,error:n.workspace_validation_promptTooLong_error(),suggestion:n.workspace_validation_promptTooLong_suggestion()}:{valid:!0}}function Is(e){const t=e.toLowerCase();return t.includes("maxbuffer")?n.workspace_gitError_maxBuffer():t.includes("clone")&&t.includes("timed out")?n.workspace_gitError_cloneTimeout():t.includes("json-rpc request timed out: workspace.create")?n.workspace_gitError_createTimeout():t.includes("timed out")&&["git","clone","fetch","worktree","pull","push","rebase","merge"].some(r=>t.includes(r))?n.workspace_gitError_gitTimeout():t.includes("git clone failed")?t.includes("could not read from remote")?n.workspace_gitError_cloneRemote():t.includes("authentication")||t.includes("permission denied")||t.includes("access denied")?n.workspace_gitError_cloneAuth():n.workspace_gitError_cloneFailed():t.includes("could not resolve any ref to create worktree")?n.workspace_gitError_worktreeRef():t.includes("failed to write file")?t.includes("eacces")||t.includes("permission denied")?n.workspace_gitError_writePermission():t.includes("enospc")||t.includes("disk space")?n.workspace_gitError_diskSpaceFree():t.includes("enoent")||t.includes("no such file")?n.workspace_gitError_writeNoEnt():e:t.includes("failed to read file")?t.includes("enoent")||t.includes("no such file")?n.workspace_gitError_readNotFound():t.includes("eacces")||t.includes("permission denied")?n.workspace_gitError_readPermission():e:t.includes("permission denied")?n.workspace_gitError_permissionDenied():t.includes("not found")||t.includes("enoent")?n.workspace_gitError_notFound():t.includes("already exists")?n.workspace_gitError_alreadyExists():t.includes("network")||t.includes("etimedout")?n.workspace_gitError_network():t.includes("authentication")||t.includes("401")?t.includes("private repositor")?e:n.workspace_gitError_authFailed():t.includes("rate limit")||t.includes("403")?n.workspace_gitError_rateLimit():t.includes("disk space")||t.includes("enospc")?n.workspace_gitError_diskSpace():e}const kt=["idle","exited"];function wt(e){return e===void 0||!kt.includes(e)}function Fs(e){return e.status==="restarting"?"restarting":wt(e.status)?"running":e.status==="idle"?"idle":e.exitCode===0?"succeeded":e.exitCode===null||e.exitCode===void 0?"exited":e.exitCode>=128?"stopped":"failed"}function Et(e){return e.engine==="os"?"os":e.isLoading||e.keyConfigured[e.provider]===!0?"daemon":e.osEngineAvailable?"os":"unavailable"}const Ds=a.createSelector(e=>e.voiceSettings.isLoading),Ls=a.createSelector(e=>e.voiceSettings.available),Os=a.createSelector(e=>e.voiceSettings.provider),xs=a.createSelector(e=>e.voiceSettings.engine),Ws=a.createSelector(e=>e.voiceSettings.osEngineAvailable),Ns=a.createSelector(e=>e.voiceSettings.keyConfigured),Gs=a.createSelector(e=>e.voiceSettings.vocabulary),Bs=a.createSelector(e=>e.voiceSettings.openaiModel),Vs=a.createSelector(e=>e.voiceSettings.language),Us=a.createSelector(e=>e.voiceSettings.workspaceVocabularyMaxTerms),Hs=a.createSelector(e=>e.voiceSettings.inputDeviceId),qs=a.createSelector(e=>e.voiceSettings.inputDevices),$s=a.createSelector(e=>e.voiceSettings.busyProvider),zs=a.createSelector(e=>e.voiceSettings.error),js=a.createSelector(e=>Re.select(e)?"unavailable":Et(e.voiceSettings)),G="intent.voice.inputDevice";let B;function Ct(){if(B!==void 0)return B;try{const e=localStorage.getItem(G);return typeof e=="string"&&e!==""?e:null}catch{return null}}function Ks(e){B=e;try{e===null?localStorage.removeItem(G):localStorage.setItem(G,e)}catch{}}let R=null;function Zs(e){R=e}function Qs(){const e=R;return R=null,e}function Pt(){R=null}const Rt=300,Mt=300;class Tt{constructor(t){d(this,"holdThresholdMs");d(this,"doublePressWindowMs");d(this,"onRecordStart");d(this,"onRecordStop");d(this,"currentState","idle");d(this,"timer",null);this.holdThresholdMs=t.holdThresholdMs??Rt,this.doublePressWindowMs=t.doublePressWindowMs??Mt,this.onRecordStart=t.onRecordStart,this.onRecordStop=t.onRecordStop}get state(){return this.currentState}keyDown(){switch(this.currentState){case"idle":this.currentState="first-press",this.armTimer(this.holdThresholdMs,()=>{this.currentState="holding"}),this.onRecordStart();break;case"await-second-press":this.clearTimer(),this.currentState="second-press",this.armTimer(this.holdThresholdMs,()=>{this.currentState="holding-send"});break;case"latched":this.currentState="latched-press";break;case"latched-await-second":this.clearTimer(),this.currentState="draining",this.onRecordStop({stopReason:"double-press",autoSend:!0});break}}keyUp(){switch(this.currentState){case"first-press":this.clearTimer(),this.currentState="await-second-press",this.armTimer(this.doublePressWindowMs,()=>{this.currentState="latched"});break;case"holding":this.currentState="idle",this.onRecordStop({stopReason:"hold-release",autoSend:!1});break;case"second-press":this.clearTimer(),this.currentState="idle",this.onRecordStop({stopReason:"double-press",autoSend:!0});break;case"holding-send":this.currentState="idle",this.onRecordStop({stopReason:"double-hold-release",autoSend:!0});break;case"latched-press":this.currentState="latched-await-second",this.armTimer(this.doublePressWindowMs,()=>{this.currentState="idle",this.onRecordStop({stopReason:"latch-stop",autoSend:!1})});break;case"draining":this.currentState="idle";break}}reset(){this.clearTimer(),this.currentState="idle"}armTimer(t,r){this.clearTimer(),this.timer=setTimeout(()=>{this.timer=null,r()},t)}clearTimer(){this.timer!==null&&clearTimeout(this.timer),this.timer=null}}let M=null;function Ys(e){M=e}function Js(){const e=M;return M=null,e}function It(){M=null}const Ft=66;function Dt(e,t){const r=globalThis.AudioContext;if(typeof r!="function")return()=>{};let s,i,o;try{s=new r,i=s.createMediaStreamSource(e),o=s.createAnalyser(),o.fftSize=1024,o.smoothingTimeConstant=.5,o.minDecibels=-85,o.maxDecibels=-25,i.connect(o)}catch{return i?.disconnect(),s?.close().catch(()=>{}),()=>{}}if(!s||!i)return()=>{};const l=s,c=i,g=new Uint8Array(o.frequencyBinCount),f=setInterval(()=>{o.getByteFrequencyData(g),t(tt(g,l.sampleRate))},Ft);let b=!1;return()=>{b||(b=!0,clearInterval(f),c.disconnect(),l.close().catch(()=>{}))}}const Lt=12e4,Ot=["audio/webm;codecs=opus","audio/webm"];function Xs(){return typeof navigator<"u"&&typeof navigator.mediaDevices?.getUserMedia=="function"&&typeof MediaRecorder<"u"}function xt(e){return e?{audio:{deviceId:{ideal:e}}}:{audio:!0}}function Wt(){if(!(typeof MediaRecorder>"u"||typeof MediaRecorder.isTypeSupported!="function"))return Ot.find(e=>MediaRecorder.isTypeSupported(e))}class Nt{constructor(t){d(this,"maxDurationMs");d(this,"now");d(this,"callbacks");d(this,"deviceId");d(this,"onLevels");d(this,"stopMeter",null);d(this,"currentState","idle");d(this,"recorder",null);d(this,"stream",null);d(this,"chunks",[]);d(this,"startedAt",0);d(this,"maxTimer",null);d(this,"discardRequested",!1);d(this,"cancelRequested",!1);this.maxDurationMs=t.maxDurationMs??Lt,this.now=t.now??Date.now,this.callbacks={onFinished:t.onFinished,onError:t.onError},this.deviceId=t.deviceId??null,this.onLevels=t.onLevels}get state(){return this.currentState}async start(){if(this.currentState!=="idle")return"discarded";this.currentState="starting";let t;try{t=await navigator.mediaDevices.getUserMedia(xt(this.deviceId))}catch(i){const o=this.discardRequested;return this.currentState="stopped",o||this.callbacks.onError(i),o?"discarded":"error"}if(this.discardRequested){for(const i of t.getTracks())i.stop();return this.currentState="stopped","discarded"}this.stream=t;const r=Wt(),s=r?new MediaRecorder(t,{mimeType:r}):new MediaRecorder(t);return this.recorder=s,s.ondataavailable=i=>{i.data&&i.data.size>0&&this.chunks.push(i.data)},s.onstop=()=>this.handleRecorderStop(),s.onerror=i=>this.handleRecorderError(i),s.start(),this.startedAt=this.now(),this.currentState="recording",this.maxTimer=setTimeout(()=>this.stop(),this.maxDurationMs),this.onLevels&&(this.stopMeter=Dt(t,this.onLevels)),"recording"}stop(){if(this.currentState==="starting"){this.discardRequested=!0;return}this.currentState==="recording"&&this.recorder?.stop()}cancel(){if(this.currentState==="starting"){this.discardRequested=!0;return}this.currentState==="recording"&&(this.cancelRequested=!0,this.recorder?.stop())}handleRecorderStop(){const t=this.now()-this.startedAt,r=this.recorder?.mimeType||"audio/webm",s=this.chunks,i=this.cancelRequested;this.teardown(),!i&&this.callbacks.onFinished({blob:new Blob(s,{type:r}),durationMs:t,mimeType:r})}handleRecorderError(t){const r=t?.error??t;this.teardown(),this.callbacks.onError(r)}teardown(){this.maxTimer!==null&&clearTimeout(this.maxTimer),this.maxTimer=null,this.stopMeter?.(),this.stopMeter=null,this.recorder&&(this.recorder.ondataavailable=null,this.recorder.onstop=null,this.recorder.onerror=null),this.recorder=null;for(const t of this.stream?.getTracks()??[])t.stop();this.stream=null,this.chunks=[],this.currentState="stopped"}}const Gt=300;function Bt(e){const t=e?.name;return t==="NotAllowedError"||t==="SecurityError"}const Vt={stopReason:"manual",autoSend:!1};let p=null,m=null,_=0,E=null;const I=new Tt({onRecordStart:()=>{E&&Ut(E)},onRecordStop:e=>{ee(E,e)}});function ei(){return p!==null}function ti(){return p}function ri(e){E=e,_+=1,_===1&&I.keyDown()}function si(e){E=e,_!==0&&(_-=1,_===0&&I.keyUp())}function Ut(e,t="key"){if(p!==null)return;It(),Pt();const r=new Nt({deviceId:Ct(),onLevels:s=>{p===r&&e.dispatch(me(s))},onFinished:s=>{p===r&&(p=null);const i=m??{stopReason:"auto-stop",autoSend:!1},o=m!==null;if(m=null,e.dispatch(C()),o||I.reset(),s.durationMs<Gt){i.autoSend&&e.dispatch(N());return}e.dispatch(be({...s,stopReason:i.stopReason,autoSend:i.autoSend}))},onError:s=>{p===r&&(p=null),m=null,e.dispatch(C()),e.showHint(Bt(s)?n.hardwareConsole_ptt_micDenied_message():n.hardwareConsole_ptt_recordingFailed_message())}});p=r,e.dispatch(ve({source:t,startedAt:Date.now()})),r.start().then(s=>{if(s!=="recording"&&(p===r&&(p=null),s==="discarded")){const i=m?.autoSend===!0;m=null,e.dispatch(C()),i&&e.dispatch(N())}})}function ee(e,t){const r=p;if(r===null){t.autoSend&&e?.dispatch(N());return}m=t,r.stop()}function ii(){ee(null,Vt)}function ai(e){I.reset(),_=0,m=null;const t=p;t!==null&&(p=null,t.cancel(),e.dispatch(C()))}const Ht=V("HardwareConsoleVoiceSetupToast"),qt="hardware-console-voice-setup";let W=null;function $t(){return W||(W=he(()=>Promise.resolve().then(()=>rt),void 0,import.meta.url).then(e=>e.notify)),W}function zt(){xe("/settings?tab=connections#voice").catch(e=>{Ht.error("Failed to open voice settings from setup toast",e)})}function jt(){return{label:n.hardwareConsole_voice_openSettings_label(),onClick:()=>zt()}}function ni(){$t().then(e=>{e.error(n.hardwareConsole_voice_noKey_error(),{id:qt,action:jt()})})}const oi=a.createSelector(e=>e.externalEditors.selectedAction),Kt=a.createSelector(e=>e.externalEditors.editors),Zt=a.createSelector(e=>{const t=y(Kt.select(e)),r=e.externalEditors.editorOrder??[];if(!r.length)return t;const s=new Map(t.map(l=>[l.id,l])),i=r.flatMap(l=>{const c=s.get(l);return c?[c]:[]}),o=new Set(r);return[...i,...t.filter(({id:l})=>!o.has(l))]}),ci=a.createSelector(e=>e.externalEditors.editorOrder??[]),li=a.createSelector(e=>e.externalEditors.loading),di=a.createSelector(e=>e.externalEditors.lastFetched),Qt=a.createSelector(e=>e.externalEditors.hiddenEditorIds),ui=a.createSelector((e,t)=>{if(!(t?Me.select(e,t):Te.select(e))||_e())return[];const s=Qt.select(e);return Zt.select(e).filter(i=>i.installed&&!s.includes(i.id))});function pi(e,t){if(!e||!t||t===e.providerId)return!1;const r=e.providerSettings[t];return!!(r&&[r.defaultModel,...Object.values(r.typeOverrides??{})].some(s=>typeof s=="string"&&s.includes(":")))}let Yt=0;function Jt(e,t){const r=++Yt;return a.dispatch(ye(e,t,r)),r}function gi(e,t,r){a.dispatch(Ae(e,t,r))}async function te(e,t,r,s){const i=crypto.randomUUID(),o=s?.source??"control";try{return(await a.dispatch(ke({requestId:i,consumerId:o,agentId:e,workspaceId:t,operation:r,connection:Q.select(a.state)},{...s,intent:s?.intent??Jt(e,t)}))).status==="success"}finally{a.dispatch(we(i,o))}}async function hi(e,t,r,s,i){return te(e,t,{kind:"effort",effort:r,previous:s},i)}async function fi(e,t,r,s,i){return te(e,t,{kind:"reconcile",current:r??null,levels:s},i)}const Xt=a.createSelector((e,t)=>y(e.agentModel.mutations).filter(r=>r.consumerId===t)),Si=a.createSelector((e,t)=>Xt.select(e,t).some(r=>r.status==="pending")),bi=a.createSelector((e,t,r)=>{const s=e.agentSessions.byAgentId[t],i=Ie.select(e,t),o=We.select(e,t),l=e.daemonHealth.stats?.protocolVersion,c=Ne(l),g=c?Ge(s?.model,null,o):s?.model;return{session:s,providerId:i,levels:o,legacy:c,identity:JSON.stringify([g,i]),connection:Q.select(e),canWrite:!!s&&s.workspaceId===r&&!Fe.select(e,r)}});function er(e,t,r=!1){const s=t?.available===!0&&t.viaNpx!==!0;return e!=="auggie"||s||r}const mi=a.createSelector(e=>$e.select(e)?null:U.select(e)),tr=a.createSelector(e=>e.providerCatalog?.workspaceEpoch??0),S=a.createSelector((e,t)=>t?e.providerCatalog?.byWorkspaceId?.[t]:void 0),vi=a.createSelector(e=>Object.keys(e.providerCatalog?.byWorkspaceId??{})),_i=a.createSelector((e,t)=>!!S.select(e,t)&&e.providerCatalog.workspaceSnapshotEpochs?.[t]===tr.select(e)),re=a.createSelector((e,t)=>t?S.select(e,t)?.catalog.providers??[]:De.select(e)),se=a.createSelector((e,t)=>{if(!t)return Y.select(e);const r=S.select(e,t)?.settings.find(s=>s.path==="model.defaultProvider")?.value;return typeof r=="string"?r:""}),q=a.createSelector((e,t)=>{if(!t)return ze.select(e);const r=S.select(e,t)?.settings.find(s=>s.path==="providers.enabled")?.value;return r&&typeof r=="object"?r:{}}),ie=a.createSelector((e,t)=>{if(!t)return je.select(e);const r=q.select(e,t),s=se.select(e,t),i=S.select(e,t)?.readiness??{};return re.select(e,t).filter(o=>o.visible&&(!o.canBeDisabled||r[o.id]||o.id===s)&&i[o.id]?.available).map(o=>o.id)}),Ai=a.createSelector((e,t)=>{const r=q.select(e,t),s=t?S.select(e,t)?.readiness??{}:U.select(e);return re.select(e,t).filter(i=>er(i.id,s[i.id],r[i.id]===!0)).map(i=>i.id)}),yi=a.createSelector((e,t)=>t?ie.select(e,t):Ke.select(e)),ki=a.createSelector((e,t)=>v.select(e,t)),wi=a.createSelector((e,t)=>t?!!S.select(e,t):Ze.select(e)),Ei=a.createSelector((e,t)=>{if(!t)return Be.select(e);const r=S.select(e,t)?.settings??[],s=se.select(e,t),i=r.find(c=>c.path==="model.providerDefaults")?.value,o=i&&typeof i=="object"?i[s]:void 0;if(typeof o=="string")return o;const l=r.find(c=>c.path==="model.default")?.value;return typeof l=="string"?l:""}),Ci=a.createSelector((e,t)=>t?Object.fromEntries(Object.entries(e.providerModels?.byWorkspaceId?.[t]??{}).flatMap(([r,s])=>s.warning?[[r,s.warning]]:[])):Ve.select(e)),Pi=a.createSelector((e,t)=>t?Object.fromEntries(Object.entries(e.providerModels?.byWorkspaceId?.[t]??{}).map(([r,s])=>[r,s.stale===!0])):Ue.select(e)),Ri=a.createSelector((e,t)=>t?Object.fromEntries(Object.entries(e.providerModels?.byWorkspaceId?.[t]??{}).flatMap(([r,s])=>s.warning&&s.warningKind?[[r,s.warningKind]]:[])):He.select(e)),Mi=a.createSelector((e,t,r)=>{if(!r)return Qe.select(e,t);const s=q.select(e,r),i=S.select(e,r);return ie.select(e,r).filter(o=>o!==t&&(s[o]||i?.catalog.providers.find(l=>l.id===o)?.canBeDisabled===!1)&&Ye(o,i?.readiness[o]?.authenticated))}),Ti=a.createSelector((e,t)=>t?S.select(e,t)?.readiness??{}:U.select(e)),rr={},Ii=a.createSelector(e=>e.providerSettings?.profiles?.status??rr),Z={},sr=a.createSelector((e,t)=>t?e.providerCatalog?.byWorkspaceId?.[t]?.mcpServers??[]:e.mcpSettings.servers),Fi=a.createSelector((e,t,r)=>{const s=e.providerCatalog?.byWorkspaceId?.[t];return s?s.mcpServers?.find(i=>i.id===r)?.name:e.providerCatalog?.mcpServerNamesByWorkspaceId?.[t]?.[r]}),Di=a.createSelector(e=>e.mcpSettings.loading),Li=a.createSelector(e=>e.mcpSettings.error),Oi=a.createSelector(e=>e.mcpSettings.mutationError??null),xi=a.createSelector(e=>e.mcpSettings.enabled),ir=a.createSelector(e=>e.mcpSettings.disabledServers),ar=a.createSelector(e=>e.mcpSettings.statusMap),nr=a.createSelector(e=>e.mcpSettings.toolsMap),or=a.createSelector((e,t)=>{if(!t)return e.mcpSettings.errorMessages;const r=e.providerCatalog?.byWorkspaceId?.[t],s=new Map(r?.mcpServers?.map(i=>[i.id,w(i)])??[]);return Object.fromEntries((r?.mcpStatuses??[]).flatMap(i=>{const o=s.get(i.serverId);return o&&i.lastError?[[o,i.lastError]]:[]}))}),cr=a.createSelector((e,t)=>t?e.mcpSettings.byWorkspaceId[t]?.disabledServers??Z:Z),Wi=a.createSelector((e,t)=>Object.keys(cr.select(e,t))),Ni=a.createSelector(e=>{const t=sr.select(e),r=ar.select(e),s=nr.select(e),i=ir.select(e),o=or.select(e);return t.map(l=>{const c=w(l)in i,g=s[w(l)]||[];let f=r[w(l)]||"disconnected";return c&&(f="disabled"),{...l,disabled:c,status:f,tools:g,toolCount:g.length,errorMessage:o[w(l)]}})});a.createSelector((e,t)=>e.mcpSettings.errorMessages[t]);const Gi=a.createSelector(e=>e.mcpSettings.lastImportedCount),Bi=a.createSelector(e=>e.mcpSettings.advancedSaveStatus),Vi=a.createSelector(e=>e.mcpSettings.advancedSaveError);function h(e){return{category:"settings",...e}}const T=[{id:"new-workspace",tab:"",label:"New workspace",route:"/workspace/new",category:"navigation",description:"Create-workspace flow."},h({id:"utility-default-model",tab:"providers",hashAliases:["utility-default-model","default-model","quickActions.defaultModel","backgroundAgents.defaultModel"],scrollSelector:"#utility-default-model",highlightSelector:'[data-highlight-id="utility-default-model"]',label:"Settings: Default model",route:"/settings?tab=providers#utility-default-model",description:"Default AI behavior model selection."}),h({id:"global-instructions",tab:"agent-behavior",hashAliases:["global-instructions","agents","specialists","all-agents"],scrollSelector:"#global-instructions",highlightSelector:'[data-highlight-id="global-instructions"]',label:"Settings: Agent Behavior",route:"/settings?tab=agent-behavior#global-instructions",description:"Global agent instructions and defaults."}),h({id:"create-specialist",tab:"specialists",hashAliases:["create-specialist"],scrollSelector:"#create-specialist",highlightSelector:'[data-highlight-id="create-specialist"]',label:"Settings: Create specialist",route:"/settings?tab=specialists&view=create-specialist#create-specialist",description:"Create-specialist entry point."}),h({id:"providers",tab:"providers",hashAliases:["providers"],scrollSelector:"#providers",highlightSelector:'[data-highlight-id="providers"]',label:"Settings: AI coding CLIs",route:"/settings?tab=providers#providers",description:"Provider/account selector settings."}),h({id:"integrations",tab:"connections",hashAliases:["integrations"],scrollSelector:"#integrations",highlightSelector:'[data-highlight-id="integrations"]',label:"Settings: Connections",route:"/settings?tab=connections#integrations",description:"Connected integrations settings."}),h({id:"devices",tab:"devices",hashAliases:["devices","machines"],scrollSelector:"#devices",highlightSelector:"#devices",label:"Settings: Machines",route:"/settings?tab=devices#devices",description:"Saved remote machine settings."}),h({id:"mobile",tab:"mobile",hashAliases:["mobile"],scrollSelector:"#mobile",highlightSelector:'[data-highlight-id="mobile"]',label:"Settings: Mobile",route:"/settings?tab=mobile#mobile",description:"Remote access and Intent Mobile pairing."}),h({id:"guest-sessions",tab:"collaboration",hashAliases:["collaboration","guest-sessions","sharing"],scrollSelector:"#collaboration",highlightSelector:"#collaboration",label:"Settings: Collaboration",route:"/settings?tab=collaboration#collaboration",description:"Host membership, workspace guests and joined hosts."}),h({id:"websocket-api",tab:"mobile",hashAliases:["websocket-api","remote-access"],scrollSelector:"#websocket-api",highlightSelector:'[data-highlight-id="websocket-api"]',label:"Settings: Remote Access",route:"/settings?tab=mobile#websocket-api",description:"Remote access (WebSocket API) settings."}),...[["voice","Voice Dictation","Voice dictation settings.","input"],["keyboard-shortcuts","Keyboard Shortcuts","Keyboard shortcuts reference.","input"],["autocomplete","Autocomplete","Suggest as you type: service, model and API keys.","input"],["mcp-servers","MCP Servers","MCP server configuration.","connections"],["plugins","Plugins","App-wide Agent Plugins.","connections"],["git-workspace","Git & Workspace","Git and workspace defaults.","setup"],["git","Git","Git defaults.","setup"],["shell","Shell","Shell settings.","setup"],["workspace","Workspace","Workspace defaults.","setup"],["cli-optimization","CLI Optimization","RTK/CLI optimization settings.","token-savings"],["workspace-api","Tool Output & Retention","Tool output size and retention settings.","advanced"],["notifications","Notifications","Notification preferences.","app-behavior"],["updates","Updates","Application update preferences.","app-behavior"],["open-in","Open In","External editor/app launch preferences.","app-behavior"],["github-link-action","GitHub Links","GitHub issue and pull request link behavior.","app-behavior"],["agent-features","Agent Features","Agent feature settings.","token-savings"],["font-style","Font style","Font style settings.","display"],["language","Language","Application language settings.","display"],["labs","Labs","Experimental feature switches.","advanced"],["agent-backend","Agent Backend","Agent backend settings.","performance"],["connection","Connection","Daemon connection details.","advanced"],["hardware","Hardware","Hardware integration settings.","input"],["developer","Developer","Development-only settings.","advanced"]].map(([e,t,r,s])=>h({id:e,tab:s,hashAliases:[e],scrollSelector:`#${e}`,highlightSelector:`[data-highlight-id="${e}"]`,label:`Settings: ${t}`,route:`/settings?tab=${s}#${e}`,description:r})),h({id:"appearance",tab:"display",hashAliases:["appearance","theme"],scrollSelector:"#theme",highlightSelector:'[data-highlight-id="appearance"]',label:"Settings: Appearance",route:"/settings?tab=display#theme",description:"Theme mode controls."}),...[["color-theme","Color theme","Color theme selection."],["note-font","Notes font","Notes/spec font style."],["agent-chat-font","Agent chat font","Agent chat font style."],["code-font","Code font","Code editor and diff font."]].map(([e,t,r])=>h({id:e,tab:"display",hashAliases:[e],scrollSelector:`#${e}`,highlightSelector:`[data-highlight-id="${e}"]`,label:`Settings: ${t}`,route:`/settings?tab=display#${e}`,description:r})),h({id:"general",tab:"advanced",hashAliases:["general","reset"],scrollSelector:"#reset",highlightSelector:'[data-highlight-id="general"]',label:"Settings: Advanced",route:"/settings?tab=advanced#reset",description:"Advanced settings and reset controls."}),{id:"workspace-card",tab:"",hashAliases:["workspace-card"],highlightSelector:'[data-highlight-id^="workspace-"]',label:"Workspace card",category:"workspace",description:"A workspace card on workspace list surfaces.",dynamic:!0,idPattern:"workspace-{workspaceId}"},{id:"specialist-entry",tab:"specialists",highlightSelector:'[data-highlight-id^="specialist-"]',label:"Specialist entry",route:"/settings?tab=specialists&specialist={specialistId}#specialist-{specialistId}",category:"specialist",description:"A specific specialist row in settings.",dynamic:!0,idPattern:"specialist-{specialistId}"}];function ae(e){const t=e.indexOf("#"),r=t>=0?e.slice(t+1):e;return decodeURIComponent(r.replace(/^#/,"")).trim()}function lr(e){return e.replace(/[.*+?^${}()|[\]\\]/g,"\\$&")}function dr(e,t){if(!t.match(/\{[^}]+\}/g)?.length)return e===t;const s=t.split(/\{[^}]+\}/g).map(lr).join("[^/]+");return new RegExp(`^${s}$`).test(e)}function ur(e){const t=ae(e);if(!t)return;const r=T.find(i=>i.id===t||i.hashAliases?.includes(t));if(r)return r;const s=T.find(i=>i.route&&i.dynamic&&i.idPattern&&dr(t,i.idPattern));return s?{...s,id:t}:void 0}function Ui(){return T.map(e=>({...e,hashAliases:e.hashAliases?[...e.hashAliases]:void 0}))}function pr(e){try{return new URL(e,"app://intent").pathname||"/"}catch{const t=e.indexOf("?"),r=e.indexOf("#");let s=e.length;return t>=0&&(s=Math.min(s,t)),r>=0&&(s=Math.min(s,r)),e.slice(0,s)||"/"}}const gr=new Set(T.flatMap(e=>e.route?[pr(e.route)]:[])),hr=[/^\/workspace\/[^/]+$/,/^\/agent\/[^/]+$/];function Hi(e){if(typeof e!="string")return!1;const t=e.trim();if(!t)return!1;if(t.startsWith("intent://"))return!0;let r,s;try{const i=new URL(t,"app://intent");if(i.protocol!=="app:")return!1;r=i.pathname||"/",s=ae(i.hash)}catch{return!1}return gr.has(r)?s?!!ur(s):!0:hr.some(i=>i.test(r))}const qi=["agentFeatures.backgroundHooks","agentFeatures.hostExec","agentFeatures.secretRequests","agentFeatures.scripts","agentFeatures.terminalAccess","agentFeatures.browserAutomation","agentFeatures.desktopControl","agentFeatures.richChatBlocks","agentFeatures.structuredQuestions","agentFeatures.attentionRequests","agentFeatures.stateSnapshot","agentFeatures.prMonitor","agentFeatures.taskGraph","agentFeatures.peerAgents","agentFeatures.mcpTools"],fr=[{path:"agentFeatures.backgroundHooks",label:()=>n.settings_agentFeatures_backgroundHooks_label(),description:()=>n.settings_agentFeatures_backgroundHooks_description(),defaultValue:!0},{path:"agentFeatures.hostExec",label:()=>n.settings_agentFeatures_hostExec_label(),description:()=>n.settings_agentFeatures_hostExec_description(),defaultValue:!0},{path:"agentFeatures.secretRequests",label:()=>n.settings_agentFeatures_secretRequests_label(),description:()=>n.settings_agentFeatures_secretRequests_description(),defaultValue:!1},{path:"agentFeatures.scripts",label:()=>n.settings_agentFeatures_scripts_label(),description:()=>n.settings_agentFeatures_scripts_description(),defaultValue:!0},{path:"agentFeatures.terminalAccess",label:()=>n.settings_agentFeatures_terminalAccess_label(),description:()=>n.settings_agentFeatures_terminalAccess_description(),defaultValue:!0},{path:"agentFeatures.browserAutomation",label:()=>n.settings_agentFeatures_browserAutomation_label(),description:()=>n.settings_agentFeatures_browserAutomation_description(),defaultValue:!0},{path:"agentFeatures.desktopControl",label:()=>n.settings_agentFeatures_desktopControl_label(),description:()=>n.settings_agentFeatures_desktopControl_description(),info:()=>n.settings_agentFeatures_desktopControl_info(),defaultValue:!0},{path:"agentFeatures.richChatBlocks",label:()=>n.settings_agentFeatures_richChatBlocks_label(),description:()=>n.settings_agentFeatures_richChatBlocks_description(),defaultValue:!0},{path:"agentFeatures.structuredQuestions",label:()=>n.settings_agentFeatures_structuredQuestions_label(),description:()=>n.settings_agentFeatures_structuredQuestions_description(),defaultValue:!0},{path:"agentFeatures.attentionRequests",label:()=>n.settings_agentFeatures_attentionRequests_label(),description:()=>n.settings_agentFeatures_attentionRequests_description(),defaultValue:!0},{path:"agentFeatures.stateSnapshot",label:()=>n.settings_agentFeatures_stateSnapshot_label(),description:()=>n.settings_agentFeatures_stateSnapshot_description(),defaultValue:!0},{path:"agentFeatures.prMonitor",label:()=>n.settings_agentFeatures_prMonitor_label(),description:()=>n.settings_agentFeatures_prMonitor_description(),defaultValue:!0},{path:"agentFeatures.taskGraph",label:()=>n.settings_agentFeatures_taskGraph_label(),description:()=>n.settings_agentFeatures_taskGraph_description(),defaultValue:!0},{path:"agentFeatures.peerAgents",label:()=>n.settings_agentFeatures_peerAgents_label(),description:()=>n.settings_agentFeatures_peerAgents_description(),defaultValue:!0},{path:"agentFeatures.mcpTools",label:()=>n.settings_agentFeatures_mcpTools_label(),description:()=>n.settings_agentFeatures_mcpTools_description(),defaultValue:!0}],$i=Object.fromEntries(fr.map(e=>[e.path,e.defaultValue]));export{Ri as $,Hi as A,Xs as B,Ct as C,zr as D,Jt as E,fr as F,J as G,_t as H,fi as I,gi as J,Et as K,ur as L,Rs as M,Ks as N,Si as O,Xt as P,bi as Q,Zr as R,A as S,es as T,yi as U,se as V,q as W,Ai as X,ie as Y,re as Z,Pi as _,Je as a,sr as a$,Ci as a0,Mi as a1,Ti as a2,wi as a3,Ei as a4,ki as a5,Jr as a6,rs as a7,Es as a8,ks as a9,qr as aA,Lr as aB,xr as aC,Br as aD,Wr as aE,Gr as aF,Or as aG,Hr as aH,Dr as aI,$r as aJ,ps as aK,Qt as aL,Zt as aM,ui as aN,li as aO,ds as aP,us as aQ,di as aR,Vi as aS,Bi as aT,ir as aU,xi as aV,Li as aW,or as aX,Gi as aY,Di as aZ,Oi as a_,As as aa,ys as ab,ws as ac,_s as ad,ci as ae,ls as af,fs as ag,ns as ah,js as ai,os as aj,cs as ak,Qr as al,Xr as am,H as an,it as ao,dt as ap,ut as aq,X as ar,lt as as,at,st as au,ot as av,ct as aw,Nr as ax,Vr as ay,Ur as az,$i as b,Ni as b0,ar as b1,nr as b2,oi as b3,is as b4,Ii as b5,mi as b6,St as b7,bs as b8,ms as b9,Fi as bA,Zs as bB,Ys as bC,ni as bD,Ut as bE,ii as bF,Ms as bG,Ps as bH,Ts as bI,Cs as bJ,jt as bK,vs as bL,hs as ba,Ss as bb,as as bc,gs as bd,v as be,ts as bf,Yr as bg,$s as bh,xs as bi,Hs as bj,qs as bk,Ns as bl,Vs as bm,Bs as bn,Ws as bo,Os as bp,Ls as bq,zs as br,Ds as bs,Gs as bt,Us as bu,S as bv,tr as bw,_i as bx,vi as by,Wi as bz,qi as c,hi as d,ai as e,Pt as f,It as g,Qs as h,Js as i,ss as j,ft as k,ht as l,ti as m,Ui as n,Is as o,Fs as p,jr as q,Kr as r,ri as s,si as t,rt as u,wt as v,er as w,ei as x,pi as y,K as z};
@@ -1 +1 @@
1
- import{t as ht,bo as S,bw as $t,bq as bt,b as It,bs as d}from"./a1kG0lDg.js";import{bs as yt,ca as k,aD as t,c9 as s,a7 as Ct,ay as Rt,W as kt,bn as wt,bH as q,bV as v,aA as U}from"./CJxGDkBm.js";import{k as At}from"./ag06q4LL.js";import{b as Pt}from"./NtFyWdpR.js";import{J4 as a,eB as Dt,eC as Et,o7 as St,zN as Ut,ob as Tt,oc as _t,JE as Ft,JT as xt,JJ as Nt,vu as Wt,uL as Lt}from"./DIz708WA.js";import{t as qt}from"./D2MmXC4A.js";import{g as vt}from"./BrMXrCxP.js";import{dE as Bt,bY as Ht,bN as Ot,bR as Jt,bP as Mt}from"./DVXtNvCM.js";import{af as Kt}from"./D-W7KYqw.js";import{C as Gt}from"./DtKQhjG0.js";import{V as Vt}from"./Dji1u83Z.js";import{bT as jt,bN as zt,b8 as Yt}from"./BdvDDr3c.js";import{i as Qt}from"./H2jLkRRS.js";function Xt(T,f){if(new.target)return ht({component:Xt,...T});yt(f,!0);const B=()=>d(Z,"$gitRoots$",n),_=()=>d(X,"$workspace",n),H=()=>d(st,"$ftCommits$",n),O=()=>d(ot,"$ftOlderCommits$",n),y=()=>d(tt,"$commitRead$",n),J=()=>d(Y,"$foldUnchanged",n),M=()=>d(z,"$lineWrapping",n),K=()=>d(Q,"$diffSideBySide",n),G=()=>d(at,"$ftLoading$",n),[n,V]=bt(),j=e=>{Vt(e,{embedded:!0,showExpand:!0,get expanded(){return t(C)},onToggleExpand:()=>{q(C,!t(C)),t(C)?t(R)?.expandAll():t(R)?.collapseAll()},get foldEnabled(){return J()},onToggleFold:()=>a.dispatch(Nt()),get wrapEnabled(){return M()},onToggleWrap:()=>a.dispatch(xt()),get splitEnabled(){return K()},onToggleSplit:()=>a.dispatch(Ft())})},z=jt(),Y=zt(),Q=Yt();let h=S(f,"tab",7),i=S(f,"workspaceId",7),$=S(f,"isActive",7);const F=vt(),g=qt(()=>i()),X=Bt(g),Z=Kt(g),w=crypto.randomUUID(),tt=Ht(g,w),c=s(()=>h().data?.commitHash||""),x=s(()=>h().data?.commitMessage||"");k(()=>{const e=i();if(!(!$()||!e||t(r)))return a.dispatch(Dt(e,"history")),()=>a.dispatch(Et(e,"history"))});const r=s(()=>h().data?.gitRootId||""),N=s(()=>t(r)&&B().find(e=>e.id===t(r))?.path||""),et=s(()=>t(N)||_()?.worktreePath||_()?.repositoryPath||""),st=Ot(g),ot=Jt(g),at=Mt(g),nt=s(()=>H()||[]),it=s(()=>O()||[]),p=s(()=>t(r)?void 0:t(nt).find(e=>e.hash===t(c))||t(it).find(e=>e.hash===t(c))),A=s(()=>t(p)?.files||[]),P=s(()=>y()?.request.kind==="commitDetails"&&y().request.commitHash===t(c)&&(y().request.gitRootId??"")===t(r)?y():void 0),l=s(()=>t(P)?.result?.kind==="commitDetails"?t(P).result.details:null),rt=s(()=>t(l)?t(l).fileDetails.length>0?t(l).fileDetails:t(l).files.map(e=>({path:e,additions:0,deletions:0})):[]),dt=s(()=>t(P)?.loading??!1);k(()=>{const e=t(c),o=i(),b=t(r);if(!e||!o||t(A).length>0)return;const u=crypto.randomUUID();return a.dispatch(St(o,w,u,{kind:"commitDetails",commitHash:e,gitRootId:b||void 0})),()=>a.dispatch(Ut(o,w,u))});const ct=s(()=>t(A).length>0?t(A):t(rt));let C=v(!0),R=v(null);const lt=s(()=>t(ct).map(e=>{const o=typeof e=="string"?e:e.path||"",b=typeof e=="string"?0:e.additions||0,u=typeof e=="string"?0:e.deletions||0;return{filePath:Qt(o)?o:`${t(et)}/${o}`,action:"modify",additions:b,deletions:u,toolName:"local",toolCallId:`commit-${t(c)}-${o}`,staged:!1,category:"committed",commitHash:t(c),commitMessage:t(x)}}));k(()=>{!F||!$()||F.registerActions({display:j})});const W=crypto.randomUUID();k(()=>{const e=i();if(!(!($()&&t(r))||!e))return a.dispatch(Tt(e,W)),()=>a.dispatch(_t(e,W))});var mt={get tab(){return h()},set tab(e){h(e),U()},get workspaceId(){return i()},set workspaceId(e){i(e),U()},get isActive(){return $()},set isActive(e){$(e),U()},$set:$t,$on:(e,o)=>It(f,e,o)},L=Ct(),gt=Rt(L);At(gt,()=>JSON.stringify([i(),t(r),t(c)]),e=>{{let o=s(()=>G()||t(dt)),b=s(()=>t(r)||void 0),u=s(()=>t(N)||void 0),ut=s(()=>({hash:t(c),message:t(x),author:t(p)?.author||t(l)?.author,authorEmail:t(p)?.authorEmail||t(l)?.authorEmail,date:t(p)?.date||t(l)?.date,agentId:t(p)?.agentId,linkedNoteId:t(p)?.linkedNoteId}));Pt(Gt(e,{get isLoading(){return t(o)},get changes(){return t(lt)},get gitRootId(){return t(b)},get gitRootPath(){return t(u)},get commitInfo(){return t(ut)},onOpenAgent:(I,m)=>{const D=m?.metaKey||m?.ctrlKey||!1,E=m?.target?.closest("[data-panel-id]")?.getAttribute("data-panel-id")??void 0;a.dispatch(Lt(i(),{agentId:I,openInAdjacentPanel:D,sourcePanelId:E}))},onOpenNote:(I,m)=>{const D=m?.metaKey||m?.ctrlKey||!1,E=m?.target?.closest("[data-panel-id]")?.getAttribute("data-panel-id")??void 0;a.dispatch(Wt(i(),I,{openInAdjacentPanel:D,sourcePanelId:E}))}}),I=>q(R,I,!0),()=>t(R))}}),kt(T,L);var pt=wt(mt);return V(),pt}export{Xt as default};
1
+ import{t as ht,bo as S,bw as $t,bq as bt,b as It,bs as d}from"./51_h0jm2.js";import{bs as yt,ca as k,aD as t,c9 as s,a7 as Ct,ay as Rt,W as kt,bn as wt,bH as q,bV as v,aA as U}from"./CJxGDkBm.js";import{k as At}from"./C9UsZ4re.js";import{b as Pt}from"./NtFyWdpR.js";import{J4 as a,eB as Dt,eC as Et,o7 as St,zN as Ut,ob as Tt,oc as _t,JE as Ft,JT as xt,JJ as Nt,vu as Wt,uL as Lt}from"./Zldsekdv.js";import{t as qt}from"./D2MmXC4A.js";import{g as vt}from"./BrMXrCxP.js";import{dE as Bt,bY as Ht,bN as Ot,bR as Jt,bP as Mt}from"./XJqoy2ap.js";import{af as Kt}from"./CXaVTV1g.js";import{C as Gt}from"./Bl3mtXZn.js";import{V as Vt}from"./sG8VksRm.js";import{bT as jt,bN as zt,b8 as Yt}from"./D9NDL9ta.js";import{i as Qt}from"./H2jLkRRS.js";function Xt(T,f){if(new.target)return ht({component:Xt,...T});yt(f,!0);const B=()=>d(Z,"$gitRoots$",n),_=()=>d(X,"$workspace",n),H=()=>d(st,"$ftCommits$",n),O=()=>d(ot,"$ftOlderCommits$",n),y=()=>d(tt,"$commitRead$",n),J=()=>d(Y,"$foldUnchanged",n),M=()=>d(z,"$lineWrapping",n),K=()=>d(Q,"$diffSideBySide",n),G=()=>d(at,"$ftLoading$",n),[n,V]=bt(),j=e=>{Vt(e,{embedded:!0,showExpand:!0,get expanded(){return t(C)},onToggleExpand:()=>{q(C,!t(C)),t(C)?t(R)?.expandAll():t(R)?.collapseAll()},get foldEnabled(){return J()},onToggleFold:()=>a.dispatch(Nt()),get wrapEnabled(){return M()},onToggleWrap:()=>a.dispatch(xt()),get splitEnabled(){return K()},onToggleSplit:()=>a.dispatch(Ft())})},z=jt(),Y=zt(),Q=Yt();let h=S(f,"tab",7),i=S(f,"workspaceId",7),$=S(f,"isActive",7);const F=vt(),g=qt(()=>i()),X=Bt(g),Z=Kt(g),w=crypto.randomUUID(),tt=Ht(g,w),c=s(()=>h().data?.commitHash||""),x=s(()=>h().data?.commitMessage||"");k(()=>{const e=i();if(!(!$()||!e||t(r)))return a.dispatch(Dt(e,"history")),()=>a.dispatch(Et(e,"history"))});const r=s(()=>h().data?.gitRootId||""),N=s(()=>t(r)&&B().find(e=>e.id===t(r))?.path||""),et=s(()=>t(N)||_()?.worktreePath||_()?.repositoryPath||""),st=Ot(g),ot=Jt(g),at=Mt(g),nt=s(()=>H()||[]),it=s(()=>O()||[]),p=s(()=>t(r)?void 0:t(nt).find(e=>e.hash===t(c))||t(it).find(e=>e.hash===t(c))),A=s(()=>t(p)?.files||[]),P=s(()=>y()?.request.kind==="commitDetails"&&y().request.commitHash===t(c)&&(y().request.gitRootId??"")===t(r)?y():void 0),l=s(()=>t(P)?.result?.kind==="commitDetails"?t(P).result.details:null),rt=s(()=>t(l)?t(l).fileDetails.length>0?t(l).fileDetails:t(l).files.map(e=>({path:e,additions:0,deletions:0})):[]),dt=s(()=>t(P)?.loading??!1);k(()=>{const e=t(c),o=i(),b=t(r);if(!e||!o||t(A).length>0)return;const u=crypto.randomUUID();return a.dispatch(St(o,w,u,{kind:"commitDetails",commitHash:e,gitRootId:b||void 0})),()=>a.dispatch(Ut(o,w,u))});const ct=s(()=>t(A).length>0?t(A):t(rt));let C=v(!0),R=v(null);const lt=s(()=>t(ct).map(e=>{const o=typeof e=="string"?e:e.path||"",b=typeof e=="string"?0:e.additions||0,u=typeof e=="string"?0:e.deletions||0;return{filePath:Qt(o)?o:`${t(et)}/${o}`,action:"modify",additions:b,deletions:u,toolName:"local",toolCallId:`commit-${t(c)}-${o}`,staged:!1,category:"committed",commitHash:t(c),commitMessage:t(x)}}));k(()=>{!F||!$()||F.registerActions({display:j})});const W=crypto.randomUUID();k(()=>{const e=i();if(!(!($()&&t(r))||!e))return a.dispatch(Tt(e,W)),()=>a.dispatch(_t(e,W))});var mt={get tab(){return h()},set tab(e){h(e),U()},get workspaceId(){return i()},set workspaceId(e){i(e),U()},get isActive(){return $()},set isActive(e){$(e),U()},$set:$t,$on:(e,o)=>It(f,e,o)},L=Ct(),gt=Rt(L);At(gt,()=>JSON.stringify([i(),t(r),t(c)]),e=>{{let o=s(()=>G()||t(dt)),b=s(()=>t(r)||void 0),u=s(()=>t(N)||void 0),ut=s(()=>({hash:t(c),message:t(x),author:t(p)?.author||t(l)?.author,authorEmail:t(p)?.authorEmail||t(l)?.authorEmail,date:t(p)?.date||t(l)?.date,agentId:t(p)?.agentId,linkedNoteId:t(p)?.linkedNoteId}));Pt(Gt(e,{get isLoading(){return t(o)},get changes(){return t(lt)},get gitRootId(){return t(b)},get gitRootPath(){return t(u)},get commitInfo(){return t(ut)},onOpenAgent:(I,m)=>{const D=m?.metaKey||m?.ctrlKey||!1,E=m?.target?.closest("[data-panel-id]")?.getAttribute("data-panel-id")??void 0;a.dispatch(Lt(i(),{agentId:I,openInAdjacentPanel:D,sourcePanelId:E}))},onOpenNote:(I,m)=>{const D=m?.metaKey||m?.ctrlKey||!1,E=m?.target?.closest("[data-panel-id]")?.getAttribute("data-panel-id")??void 0;a.dispatch(Wt(i(),I,{openInAdjacentPanel:D,sourcePanelId:E}))}}),I=>q(R,I,!0),()=>t(R))}}),kt(T,L);var pt=wt(mt);return V(),pt}export{Xt as default};
@@ -1,4 +1,4 @@
1
- import{p as Mt}from"./DWo9ssuo.js";import{aZ as Nt,U as zt,Y as Lt,b0 as Tt,V as Xt,a_ as At,b as u,a6 as Et,W as Yt,q as J,ay as Q,aX as It,B as Bt,r as Ft,X as V}from"./Bu3w6q3q.js";import{p as Rt}from"./9L9c83oG.js";var G=u((o,r)=>{const e=o<=1?o*100:o;if(e<0||e>100)throw new Error(`${r} must be between 0-1 (decimal) or 0-100 (percentage). Received: ${o}`);return e},"toPercent"),X=u((o,r,e)=>({x:G(r,`${e} evolution`),y:G(o,`${e} visibility`)}),"toCoordinates"),K=u(o=>{if(o){if(o==="+<>")return"bidirectional";if(o==="+<")return"backward";if(o==="+>")return"forward"}},"getFlowFromPort"),Ot=u(o=>{if(!o?.startsWith("+"))return{};const e=/^\+'([^']*)'/.exec(o)?.[1];return o.includes("<>")?{flow:"bidirectional",label:e}:o.includes("<")?{flow:"backward",label:e}:o.includes(">")?{flow:"forward",label:e}:{label:e}},"extractFlowFromArrow"),Wt=u((o,r)=>{if(Mt(o,r),o.size&&r.setSize(o.size.width,o.size.height),o.evolution){const e=o.evolution.stages.map(a=>a.secondName?`${a.name.trim()} / ${a.secondName.trim()}`:a.name.trim()),h=o.evolution.stages.filter(a=>a.boundary!==void 0).map(a=>a.boundary);r.updateAxes({stages:e,stageBoundaries:h})}if(o.anchors.forEach(e=>{const h=X(e.visibility,e.evolution,`Anchor "${e.name}"`);r.addNode(e.name,e.name,h.x,h.y,"anchor")}),o.components.forEach(e=>{const h=X(e.visibility,e.evolution,`Component "${e.name}"`),a=e.label?(e.label.negX?-1:1)*e.label.offsetX:void 0,d=e.label?(e.label.negY?-1:1)*e.label.offsetY:void 0,w=e.decorator?.strategy;r.addNode(e.name,e.name,h.x,h.y,"component",a,d,e.inertia,w)}),o.notes.forEach(e=>{const h=X(e.visibility,e.evolution,`Note "${e.text}"`);r.addNote(e.text,h.x,h.y)}),o.pipelines.forEach(e=>{const h=r.getNode(e.parent);if(!h||typeof h.y!="number")throw new Error(`Pipeline "${e.parent}" must reference an existing component with coordinates.`);const a=h.y;r.startPipeline(e.parent),e.components.forEach(d=>{const w=`${e.parent}_${d.name}`,C=d.label?(d.label.negX?-1:1)*d.label.offsetX:void 0,g=d.label?(d.label.negY?-1:1)*d.label.offsetY:void 0,R=G(d.evolution,`Pipeline component "${d.name}" evolution`);r.addNode(w,d.name,R,a,"pipeline-component",C,g),r.addPipelineComponent(e.parent,w)})}),o.links.forEach(e=>{const h=!!e.arrow&&(e.arrow.includes("-.->")||e.arrow.includes(".-."));let a=K(e.fromPort)??K(e.toPort);const{flow:d,label:w}=Ot(e.arrow);!a&&d&&(a=d);const C=e.linkLabel,g=w??C;r.addLink(r.resolveNodeId(e.from),r.resolveNodeId(e.to),h,g,a)}),o.evolves.forEach(e=>{const h=r.getNode(e.component);if(h?.y!==void 0){const a=G(e.target,`Evolve target for "${e.component}"`);r.addTrend(e.component,a,h.y)}}),o.annotations.length>0){const e=o.annotations[0],h=X(e.x,e.y,"Annotations box");r.setAnnotationsBox(h.x,h.y)}o.annotation.forEach(e=>{const h=X(e.x,e.y,`Annotation ${e.number}`);r.addAnnotation(e.number,[{x:h.x,y:h.y}],e.text)}),o.accelerators.forEach(e=>{const h=X(e.x,e.y,`Accelerator "${e.name}"`);r.addAccelerator(e.name,h.x,h.y)}),o.deaccelerators.forEach(e=>{const h=X(e.x,e.y,`Deaccelerator "${e.name}"`);r.addDeaccelerator(e.name,h.x,h.y)})},"populateDb"),tt={parser:{yy:void 0},parse:u(async o=>{const r=await Rt("wardley",o);Q.debug(r);const e=tt.parser?.yy;if(!e||typeof e.addNode!="function")throw new Error("parser.parser?.yy was not a WardleyDB. This is due to a bug within Mermaid, please report this issue at https://github.com/mermaid-js/mermaid/issues.");Wt(r,e)},"parse")},E,Dt=(E=class{constructor(){this.nodes=new Map,this.links=[],this.trends=new Map,this.pipelines=new Map,this.annotations=[],this.notes=[],this.accelerators=[],this.deaccelerators=[],this.axes={}}addNode(r){const e=this.nodes.get(r.id)??{id:r.id,label:r.label},h={...e,...r,className:r.className??e.className,labelOffsetX:r.labelOffsetX??e.labelOffsetX,labelOffsetY:r.labelOffsetY??e.labelOffsetY};this.nodes.set(r.id,h)}addLink(r){this.links.push(r)}addTrend(r){this.trends.set(r.nodeId,r)}startPipeline(r){this.pipelines.set(r,{nodeId:r,componentIds:[]});const e=this.nodes.get(r);e&&(e.isPipelineParent=!0)}addPipelineComponent(r,e){const h=this.pipelines.get(r);h&&h.componentIds.push(e);const a=this.nodes.get(e);a&&(a.inPipeline=!0)}addAnnotation(r){this.annotations.push(r)}addNote(r){this.notes.push(r)}addAccelerator(r){this.accelerators.push(r)}addDeaccelerator(r){this.deaccelerators.push(r)}setAnnotationsBox(r,e){this.annotationsBox={x:r,y:e}}setAxes(r){this.axes={...this.axes,...r}}setSize(r,e){this.size={width:r,height:e}}getNode(r){return this.nodes.get(r)}resolveNodeId(r){if(this.nodes.has(r))return r;for(const[e,h]of this.nodes)if(h.label===r)return e;return r}build(){const r=[];for(const e of this.nodes.values()){if(typeof e.x!="number"||typeof e.y!="number")throw new Error(`Node "${e.label}" is missing coordinates`);r.push(e)}return{nodes:r,links:[...this.links],trends:[...this.trends.values()],pipelines:[...this.pipelines.values()],annotations:[...this.annotations],notes:[...this.notes],accelerators:[...this.accelerators],deaccelerators:[...this.deaccelerators],annotationsBox:this.annotationsBox,axes:{...this.axes},size:this.size}}clear(){this.nodes.clear(),this.links=[],this.trends.clear(),this.pipelines.clear(),this.annotations=[],this.notes=[],this.accelerators=[],this.deaccelerators=[],this.annotationsBox=void 0,this.axes={},this.size=void 0}},u(E,"WardleyBuilder"),E),k=new Dt;function et(){return V()["wardley-beta"]}u(et,"getConfig");function at(o,r,e,h,a,d,w,C,g){k.addNode({id:o,label:r,x:e,y:h,className:a,labelOffsetX:d,labelOffsetY:w,inertia:C,sourceStrategy:g})}u(at,"addNode");function rt(o,r,e=!1,h,a){k.addLink({source:o,target:r,dashed:e,label:h,flow:a})}u(rt,"addLink");function ot(o,r,e){k.addTrend({nodeId:o,targetX:r,targetY:e})}u(ot,"addTrend");function nt(o,r,e){k.addAnnotation({number:o,coordinates:r,text:e})}u(nt,"addAnnotation");function st(o,r,e){k.addNote({text:o,x:r,y:e})}u(st,"addNote");function it(o,r,e){k.addAccelerator({name:o,x:r,y:e})}u(it,"addAccelerator");function dt(o,r,e){k.addDeaccelerator({name:o,x:r,y:e})}u(dt,"addDeaccelerator");function lt(o,r){k.setAnnotationsBox(o,r)}u(lt,"setAnnotationsBox");function ct(o,r){k.setSize(o,r)}u(ct,"setSize");function pt(o){k.startPipeline(o)}u(pt,"startPipeline");function ft(o,r){k.addPipelineComponent(o,r)}u(ft,"addPipelineComponent");function ht(o){k.setAxes(o)}u(ht,"updateAxes");function xt(o){return k.getNode(o)}u(xt,"getNode");function gt(o){return k.resolveNodeId(o)}u(gt,"resolveNodeId");function yt(){return k.build()}u(yt,"getWardleyData");function ut(){k.clear(),Ft()}u(ut,"clear");var Gt={getConfig:et,addNode:at,addLink:rt,addTrend:ot,addAnnotation:nt,addNote:st,addAccelerator:it,addDeaccelerator:dt,setAnnotationsBox:lt,setSize:ct,startPipeline:pt,addPipelineComponent:ft,updateAxes:ht,getNode:xt,resolveNodeId:gt,getWardleyData:yt,clear:ut,setAccTitle:At,getAccTitle:Xt,setDiagramTitle:Tt,getDiagramTitle:Lt,getAccDescription:zt,setAccDescription:Nt},qt=["Genesis","Custom Built","Product","Commodity"],Ht=u(()=>{const{themeVariables:o}=V();return{backgroundColor:o.wardley?.backgroundColor??o.background??"#fff",axisColor:o.wardley?.axisColor??"#000",axisTextColor:o.wardley?.axisTextColor??o.primaryTextColor??"#222",gridColor:o.wardley?.gridColor??"rgba(100, 100, 100, 0.2)",componentFill:o.wardley?.componentFill??"#fff",componentStroke:o.wardley?.componentStroke??"#000",componentLabelColor:o.wardley?.componentLabelColor??o.primaryTextColor??"#222",linkStroke:o.wardley?.linkStroke??"#000",evolutionStroke:o.wardley?.evolutionStroke??"#dc3545",annotationStroke:o.wardley?.annotationStroke??"#000",annotationTextColor:o.wardley?.annotationTextColor??o.primaryTextColor??"#222",annotationFill:o.wardley?.annotationFill??o.background??"#fff"}},"getTheme"),jt=u(()=>{const o=V()["wardley-beta"];return{width:o?.width??900,height:o?.height??600,padding:o?.padding??48,nodeRadius:o?.nodeRadius??6,nodeLabelOffset:o?.nodeLabelOffset??8,axisFontSize:o?.axisFontSize??12,labelFontSize:o?.labelFontSize??10,showGrid:o?.showGrid??!1,useMaxWidth:o?.useMaxWidth??!0}},"getConfigValues"),Vt=u((o,r,e,h)=>{Q.debug(`Rendering Wardley map
1
+ import{p as Mt}from"./N5wpZAwp.js";import{aZ as Nt,U as zt,Y as Lt,b0 as Tt,V as Xt,a_ as At,b as u,a6 as Et,W as Yt,q as J,ay as Q,aX as It,B as Bt,r as Ft,X as V}from"./BOCp5eAe.js";import{p as Rt}from"./C0gEyGJV.js";var G=u((o,r)=>{const e=o<=1?o*100:o;if(e<0||e>100)throw new Error(`${r} must be between 0-1 (decimal) or 0-100 (percentage). Received: ${o}`);return e},"toPercent"),X=u((o,r,e)=>({x:G(r,`${e} evolution`),y:G(o,`${e} visibility`)}),"toCoordinates"),K=u(o=>{if(o){if(o==="+<>")return"bidirectional";if(o==="+<")return"backward";if(o==="+>")return"forward"}},"getFlowFromPort"),Ot=u(o=>{if(!o?.startsWith("+"))return{};const e=/^\+'([^']*)'/.exec(o)?.[1];return o.includes("<>")?{flow:"bidirectional",label:e}:o.includes("<")?{flow:"backward",label:e}:o.includes(">")?{flow:"forward",label:e}:{label:e}},"extractFlowFromArrow"),Wt=u((o,r)=>{if(Mt(o,r),o.size&&r.setSize(o.size.width,o.size.height),o.evolution){const e=o.evolution.stages.map(a=>a.secondName?`${a.name.trim()} / ${a.secondName.trim()}`:a.name.trim()),h=o.evolution.stages.filter(a=>a.boundary!==void 0).map(a=>a.boundary);r.updateAxes({stages:e,stageBoundaries:h})}if(o.anchors.forEach(e=>{const h=X(e.visibility,e.evolution,`Anchor "${e.name}"`);r.addNode(e.name,e.name,h.x,h.y,"anchor")}),o.components.forEach(e=>{const h=X(e.visibility,e.evolution,`Component "${e.name}"`),a=e.label?(e.label.negX?-1:1)*e.label.offsetX:void 0,d=e.label?(e.label.negY?-1:1)*e.label.offsetY:void 0,w=e.decorator?.strategy;r.addNode(e.name,e.name,h.x,h.y,"component",a,d,e.inertia,w)}),o.notes.forEach(e=>{const h=X(e.visibility,e.evolution,`Note "${e.text}"`);r.addNote(e.text,h.x,h.y)}),o.pipelines.forEach(e=>{const h=r.getNode(e.parent);if(!h||typeof h.y!="number")throw new Error(`Pipeline "${e.parent}" must reference an existing component with coordinates.`);const a=h.y;r.startPipeline(e.parent),e.components.forEach(d=>{const w=`${e.parent}_${d.name}`,C=d.label?(d.label.negX?-1:1)*d.label.offsetX:void 0,g=d.label?(d.label.negY?-1:1)*d.label.offsetY:void 0,R=G(d.evolution,`Pipeline component "${d.name}" evolution`);r.addNode(w,d.name,R,a,"pipeline-component",C,g),r.addPipelineComponent(e.parent,w)})}),o.links.forEach(e=>{const h=!!e.arrow&&(e.arrow.includes("-.->")||e.arrow.includes(".-."));let a=K(e.fromPort)??K(e.toPort);const{flow:d,label:w}=Ot(e.arrow);!a&&d&&(a=d);const C=e.linkLabel,g=w??C;r.addLink(r.resolveNodeId(e.from),r.resolveNodeId(e.to),h,g,a)}),o.evolves.forEach(e=>{const h=r.getNode(e.component);if(h?.y!==void 0){const a=G(e.target,`Evolve target for "${e.component}"`);r.addTrend(e.component,a,h.y)}}),o.annotations.length>0){const e=o.annotations[0],h=X(e.x,e.y,"Annotations box");r.setAnnotationsBox(h.x,h.y)}o.annotation.forEach(e=>{const h=X(e.x,e.y,`Annotation ${e.number}`);r.addAnnotation(e.number,[{x:h.x,y:h.y}],e.text)}),o.accelerators.forEach(e=>{const h=X(e.x,e.y,`Accelerator "${e.name}"`);r.addAccelerator(e.name,h.x,h.y)}),o.deaccelerators.forEach(e=>{const h=X(e.x,e.y,`Deaccelerator "${e.name}"`);r.addDeaccelerator(e.name,h.x,h.y)})},"populateDb"),tt={parser:{yy:void 0},parse:u(async o=>{const r=await Rt("wardley",o);Q.debug(r);const e=tt.parser?.yy;if(!e||typeof e.addNode!="function")throw new Error("parser.parser?.yy was not a WardleyDB. This is due to a bug within Mermaid, please report this issue at https://github.com/mermaid-js/mermaid/issues.");Wt(r,e)},"parse")},E,Dt=(E=class{constructor(){this.nodes=new Map,this.links=[],this.trends=new Map,this.pipelines=new Map,this.annotations=[],this.notes=[],this.accelerators=[],this.deaccelerators=[],this.axes={}}addNode(r){const e=this.nodes.get(r.id)??{id:r.id,label:r.label},h={...e,...r,className:r.className??e.className,labelOffsetX:r.labelOffsetX??e.labelOffsetX,labelOffsetY:r.labelOffsetY??e.labelOffsetY};this.nodes.set(r.id,h)}addLink(r){this.links.push(r)}addTrend(r){this.trends.set(r.nodeId,r)}startPipeline(r){this.pipelines.set(r,{nodeId:r,componentIds:[]});const e=this.nodes.get(r);e&&(e.isPipelineParent=!0)}addPipelineComponent(r,e){const h=this.pipelines.get(r);h&&h.componentIds.push(e);const a=this.nodes.get(e);a&&(a.inPipeline=!0)}addAnnotation(r){this.annotations.push(r)}addNote(r){this.notes.push(r)}addAccelerator(r){this.accelerators.push(r)}addDeaccelerator(r){this.deaccelerators.push(r)}setAnnotationsBox(r,e){this.annotationsBox={x:r,y:e}}setAxes(r){this.axes={...this.axes,...r}}setSize(r,e){this.size={width:r,height:e}}getNode(r){return this.nodes.get(r)}resolveNodeId(r){if(this.nodes.has(r))return r;for(const[e,h]of this.nodes)if(h.label===r)return e;return r}build(){const r=[];for(const e of this.nodes.values()){if(typeof e.x!="number"||typeof e.y!="number")throw new Error(`Node "${e.label}" is missing coordinates`);r.push(e)}return{nodes:r,links:[...this.links],trends:[...this.trends.values()],pipelines:[...this.pipelines.values()],annotations:[...this.annotations],notes:[...this.notes],accelerators:[...this.accelerators],deaccelerators:[...this.deaccelerators],annotationsBox:this.annotationsBox,axes:{...this.axes},size:this.size}}clear(){this.nodes.clear(),this.links=[],this.trends.clear(),this.pipelines.clear(),this.annotations=[],this.notes=[],this.accelerators=[],this.deaccelerators=[],this.annotationsBox=void 0,this.axes={},this.size=void 0}},u(E,"WardleyBuilder"),E),k=new Dt;function et(){return V()["wardley-beta"]}u(et,"getConfig");function at(o,r,e,h,a,d,w,C,g){k.addNode({id:o,label:r,x:e,y:h,className:a,labelOffsetX:d,labelOffsetY:w,inertia:C,sourceStrategy:g})}u(at,"addNode");function rt(o,r,e=!1,h,a){k.addLink({source:o,target:r,dashed:e,label:h,flow:a})}u(rt,"addLink");function ot(o,r,e){k.addTrend({nodeId:o,targetX:r,targetY:e})}u(ot,"addTrend");function nt(o,r,e){k.addAnnotation({number:o,coordinates:r,text:e})}u(nt,"addAnnotation");function st(o,r,e){k.addNote({text:o,x:r,y:e})}u(st,"addNote");function it(o,r,e){k.addAccelerator({name:o,x:r,y:e})}u(it,"addAccelerator");function dt(o,r,e){k.addDeaccelerator({name:o,x:r,y:e})}u(dt,"addDeaccelerator");function lt(o,r){k.setAnnotationsBox(o,r)}u(lt,"setAnnotationsBox");function ct(o,r){k.setSize(o,r)}u(ct,"setSize");function pt(o){k.startPipeline(o)}u(pt,"startPipeline");function ft(o,r){k.addPipelineComponent(o,r)}u(ft,"addPipelineComponent");function ht(o){k.setAxes(o)}u(ht,"updateAxes");function xt(o){return k.getNode(o)}u(xt,"getNode");function gt(o){return k.resolveNodeId(o)}u(gt,"resolveNodeId");function yt(){return k.build()}u(yt,"getWardleyData");function ut(){k.clear(),Ft()}u(ut,"clear");var Gt={getConfig:et,addNode:at,addLink:rt,addTrend:ot,addAnnotation:nt,addNote:st,addAccelerator:it,addDeaccelerator:dt,setAnnotationsBox:lt,setSize:ct,startPipeline:pt,addPipelineComponent:ft,updateAxes:ht,getNode:xt,resolveNodeId:gt,getWardleyData:yt,clear:ut,setAccTitle:At,getAccTitle:Xt,setDiagramTitle:Tt,getDiagramTitle:Lt,getAccDescription:zt,setAccDescription:Nt},qt=["Genesis","Custom Built","Product","Commodity"],Ht=u(()=>{const{themeVariables:o}=V();return{backgroundColor:o.wardley?.backgroundColor??o.background??"#fff",axisColor:o.wardley?.axisColor??"#000",axisTextColor:o.wardley?.axisTextColor??o.primaryTextColor??"#222",gridColor:o.wardley?.gridColor??"rgba(100, 100, 100, 0.2)",componentFill:o.wardley?.componentFill??"#fff",componentStroke:o.wardley?.componentStroke??"#000",componentLabelColor:o.wardley?.componentLabelColor??o.primaryTextColor??"#222",linkStroke:o.wardley?.linkStroke??"#000",evolutionStroke:o.wardley?.evolutionStroke??"#dc3545",annotationStroke:o.wardley?.annotationStroke??"#000",annotationTextColor:o.wardley?.annotationTextColor??o.primaryTextColor??"#222",annotationFill:o.wardley?.annotationFill??o.background??"#fff"}},"getTheme"),jt=u(()=>{const o=V()["wardley-beta"];return{width:o?.width??900,height:o?.height??600,padding:o?.padding??48,nodeRadius:o?.nodeRadius??6,nodeLabelOffset:o?.nodeLabelOffset??8,axisFontSize:o?.axisFontSize??12,labelFontSize:o?.labelFontSize??10,showGrid:o?.showGrid??!1,useMaxWidth:o?.useMaxWidth??!0}},"getConfigValues"),Vt=u((o,r,e,h)=>{Q.debug(`Rendering Wardley map
2
2
  `+o);const a=jt(),d=Ht(),w=a.nodeRadius*1.6,C=h.db,g=C.getWardleyData(),R=C.getDiagramTitle(),S=g.size?.width??a.width,b=g.size?.height??a.height,Y=It(r);Y.selectAll("*").remove(),Bt(Y,b,S,a.useMaxWidth),Y.attr("viewBox",`0 0 ${S} ${b}`);const v=Y.append("g").attr("class","wardley-map"),q=Y.append("defs");q.append("marker").attr("id",`arrow-${r}`).attr("viewBox","0 0 10 10").attr("refX",9).attr("refY",5).attr("markerWidth",6).attr("markerHeight",6).attr("orient","auto-start-reverse").append("path").attr("d","M 0 0 L 10 5 L 0 10 z").attr("fill",d.evolutionStroke).attr("stroke","none"),q.append("marker").attr("id",`link-arrow-end-${r}`).attr("viewBox","0 0 10 10").attr("refX",9).attr("refY",5).attr("markerWidth",5).attr("markerHeight",5).attr("orient","auto").append("path").attr("d","M 0 0 L 10 5 L 0 10 z").attr("fill",d.linkStroke).attr("stroke","none"),q.append("marker").attr("id",`link-arrow-start-${r}`).attr("viewBox","0 0 10 10").attr("refX",1).attr("refY",5).attr("markerWidth",5).attr("markerHeight",5).attr("orient","auto").append("path").attr("d","M 10 0 L 0 5 L 10 10 z").attr("fill",d.linkStroke).attr("stroke","none"),v.append("rect").attr("class","wardley-background").attr("width",S).attr("height",b).attr("fill",d.backgroundColor);const I=S-a.padding*2,B=b-a.padding*2;R&&v.append("text").attr("class","wardley-title").attr("x",S/2).attr("y",a.padding/2).attr("fill",d.axisTextColor).attr("font-size",a.axisFontSize*1.05).attr("font-weight","bold").attr("text-anchor","middle").attr("dominant-baseline","middle").text(R);const z=u(t=>a.padding+t/100*I,"projectX"),L=u(t=>b-a.padding-t/100*B,"projectY"),O=v.append("g").attr("class","wardley-axes");O.append("line").attr("x1",a.padding).attr("x2",S-a.padding).attr("y1",b-a.padding).attr("y2",b-a.padding).attr("stroke",d.axisColor).attr("stroke-width",1),O.append("line").attr("x1",a.padding).attr("x2",a.padding).attr("y1",a.padding).attr("y2",b-a.padding).attr("stroke",d.axisColor).attr("stroke-width",1);const wt=g.axes.xLabel??"Evolution",mt=g.axes.yLabel??"Visibility";O.append("text").attr("class","wardley-axis-label wardley-axis-label-x").attr("x",a.padding+I/2).attr("y",b-a.padding/4).attr("fill",d.axisTextColor).attr("font-size",a.axisFontSize).attr("font-weight","bold").attr("text-anchor","middle").text(wt),O.append("text").attr("class","wardley-axis-label wardley-axis-label-y").attr("x",a.padding/3).attr("y",a.padding+B/2).attr("fill",d.axisTextColor).attr("font-size",a.axisFontSize).attr("font-weight","bold").attr("text-anchor","middle").attr("transform",`rotate(-90 ${a.padding/3} ${a.padding+B/2})`).text(mt);const F=g.axes.stages&&g.axes.stages.length>0?g.axes.stages:qt;if(F.length>0){const t=v.append("g").attr("class","wardley-stages"),s=g.axes.stageBoundaries,n=[];if(s&&s.length===F.length){let i=0;s.forEach(p=>{n.push({start:i,end:p}),i=p})}else{const i=1/F.length;F.forEach((p,l)=>{n.push({start:l*i,end:(l+1)*i})})}F.forEach((i,p)=>{const l=n[p],f=a.padding+l.start*I,x=a.padding+l.end*I,y=(f+x)/2;p>0&&t.append("line").attr("x1",f).attr("x2",f).attr("y1",a.padding).attr("y2",b-a.padding).attr("stroke","#000").attr("stroke-width",1).attr("stroke-dasharray","5 5").attr("opacity",.8),t.append("text").attr("class","wardley-stage-label").attr("x",y).attr("y",b-a.padding/1.5).attr("fill",d.axisTextColor).attr("font-size",a.axisFontSize-2).attr("text-anchor","middle").text(i)})}if(a.showGrid){const t=v.append("g").attr("class","wardley-grid");for(let s=1;s<4;s++){const n=s/4,i=a.padding+I*n;t.append("line").attr("x1",i).attr("x2",i).attr("y1",a.padding).attr("y2",b-a.padding).attr("stroke",d.gridColor).attr("stroke-dasharray","2 6"),t.append("line").attr("x1",a.padding).attr("x2",S-a.padding).attr("y1",b-a.padding-B*n).attr("y2",b-a.padding-B*n).attr("stroke",d.gridColor).attr("stroke-dasharray","2 6")}}const c=new Map;if(g.nodes.forEach(t=>{c.set(t.id,{x:z(t.x),y:L(t.y),node:t})}),g.pipelines.length>0){const t=v.append("g").attr("class","wardley-pipelines"),s=v.append("g").attr("class","wardley-pipeline-links");g.pipelines.forEach(n=>{if(n.componentIds.length===0)return;const i=n.componentIds.map(x=>({id:x,pos:c.get(x),node:g.nodes.find(y=>y.id===x)})).filter(x=>x.pos&&x.node).sort((x,y)=>x.node.x-y.node.x);for(let x=0;x<i.length-1;x++){const y=i[x],m=i[x+1];s.append("line").attr("class","wardley-pipeline-evolution-link").attr("x1",y.pos.x).attr("y1",y.pos.y).attr("x2",m.pos.x).attr("y2",m.pos.y).attr("stroke",d.linkStroke).attr("stroke-width",1).attr("stroke-dasharray","4 4")}let p=1/0,l=-1/0,f=0;if(n.componentIds.forEach(x=>{const y=c.get(x);y&&(p=Math.min(p,y.x),l=Math.max(l,y.x),f=y.y)}),p!==1/0&&l!==-1/0){const y=a.nodeRadius*4,m=f-y/2,P=c.get(n.nodeId);if(P){const N=(p+l)/2;P.x=N,P.y=m-w/6}t.append("rect").attr("class","wardley-pipeline-box").attr("x",p-15).attr("y",m).attr("width",l-p+30).attr("height",y).attr("fill","none").attr("stroke",d.axisColor).attr("stroke-width",1.5).attr("rx",4).attr("ry",4)}})}const _=v.append("g").attr("class","wardley-links"),Z=new Map;g.pipelines.forEach(t=>{Z.set(t.nodeId,new Set(t.componentIds))});const U=g.links.filter(t=>!(!c.has(t.source)||!c.has(t.target)||Z.get(t.target)?.has(t.source)));_.selectAll("line").data(U).enter().append("line").attr("class",t=>`wardley-link${t.dashed?" wardley-link--dashed":""}`).attr("x1",t=>{const s=c.get(t.source),n=c.get(t.target),p=g.nodes.find(y=>y.id===t.source).isPipelineParent?w/Math.sqrt(2):a.nodeRadius,l=n.x-s.x,f=n.y-s.y,x=Math.sqrt(l*l+f*f);return s.x+l/x*p}).attr("y1",t=>{const s=c.get(t.source),n=c.get(t.target),p=g.nodes.find(y=>y.id===t.source).isPipelineParent?w/Math.sqrt(2):a.nodeRadius,l=n.x-s.x,f=n.y-s.y,x=Math.sqrt(l*l+f*f);return s.y+f/x*p}).attr("x2",t=>{const s=c.get(t.source),n=c.get(t.target),p=g.nodes.find(y=>y.id===t.target).isPipelineParent?w/Math.sqrt(2):a.nodeRadius,l=s.x-n.x,f=s.y-n.y,x=Math.sqrt(l*l+f*f);return n.x+l/x*p}).attr("y2",t=>{const s=c.get(t.source),n=c.get(t.target),p=g.nodes.find(y=>y.id===t.target).isPipelineParent?w/Math.sqrt(2):a.nodeRadius,l=s.x-n.x,f=s.y-n.y,x=Math.sqrt(l*l+f*f);return n.y+f/x*p}).attr("stroke",d.linkStroke).attr("stroke-width",1).attr("stroke-dasharray",t=>t.dashed?"6 6":null).attr("marker-end",t=>t.flow==="forward"||t.flow==="bidirectional"?`url(#link-arrow-end-${r})`:null).attr("marker-start",t=>t.flow==="backward"||t.flow==="bidirectional"?`url(#link-arrow-start-${r})`:null),_.selectAll("text").data(U.filter(t=>t.label)).enter().append("text").attr("class","wardley-link-label").attr("x",t=>{const s=c.get(t.source),n=c.get(t.target),i=(s.x+n.x)/2,p=n.y-s.y,l=n.x-s.x,f=Math.sqrt(l*l+p*p),x=8,y=p/f;return i+y*x}).attr("y",t=>{const s=c.get(t.source),n=c.get(t.target),i=(s.y+n.y)/2,p=n.x-s.x,l=n.y-s.y,f=Math.sqrt(p*p+l*l),x=8,y=-p/f;return i+y*x}).attr("fill",d.axisTextColor).attr("font-size",a.labelFontSize).attr("text-anchor","middle").attr("dominant-baseline","middle").attr("transform",t=>{const s=c.get(t.source),n=c.get(t.target),i=(s.x+n.x)/2,p=(s.y+n.y)/2,l=n.x-s.x,f=n.y-s.y,x=Math.sqrt(l*l+f*f),y=8,m=f/x,P=-l/x,N=i+m*y,W=p+P*y;let A=Math.atan2(f,l)*180/Math.PI;return(A>90||A<-90)&&(A+=180),`rotate(${A} ${N} ${W})`}).text(t=>t.label);const kt=v.append("g").attr("class","wardley-trends"),bt=g.trends.map(t=>{const s=c.get(t.nodeId);if(!s)return null;const n=z(t.targetX),i=L(t.targetY),p=n-s.x,l=i-s.y,f=Math.sqrt(p*p+l*l),x=a.nodeRadius+2,y=f>x?n-p/f*x:n,m=f>x?i-l/f*x:i;return{origin:s,targetX:n,targetY:i,adjustedX2:y,adjustedY2:m}}).filter(t=>t!==null);kt.selectAll("line").data(bt).enter().append("line").attr("class","wardley-trend").attr("x1",t=>t.origin.x).attr("y1",t=>t.origin.y).attr("x2",t=>t.adjustedX2).attr("y2",t=>t.adjustedY2).attr("stroke",d.evolutionStroke).attr("stroke-width",1).attr("stroke-dasharray","4 4").attr("marker-end",`url(#arrow-${r})`);const M=v.append("g").attr("class","wardley-nodes").selectAll("g").data(g.nodes).enter().append("g").attr("class",t=>["wardley-node",t.className?`wardley-node--${t.className}`:""].filter(Boolean).join(" "));M.filter(t=>t.sourceStrategy==="outsource").append("circle").attr("class","wardley-outsource-overlay").attr("cx",t=>c.get(t.id).x).attr("cy",t=>c.get(t.id).y).attr("r",a.nodeRadius*2).attr("fill","#666").attr("stroke",d.componentStroke).attr("stroke-width",1),M.filter(t=>t.sourceStrategy==="buy").append("circle").attr("class","wardley-buy-overlay").attr("cx",t=>c.get(t.id).x).attr("cy",t=>c.get(t.id).y).attr("r",a.nodeRadius*2).attr("fill","#ccc").attr("stroke",d.componentStroke).attr("stroke-width",1),M.filter(t=>t.sourceStrategy==="build").append("circle").attr("class","wardley-build-overlay").attr("cx",t=>c.get(t.id).x).attr("cy",t=>c.get(t.id).y).attr("r",a.nodeRadius*2).attr("fill","#eee").attr("stroke","#000").attr("stroke-width",1);const T=M.filter(t=>t.sourceStrategy==="market");T.append("circle").attr("class","wardley-market-overlay").attr("cx",t=>c.get(t.id).x).attr("cy",t=>c.get(t.id).y).attr("r",a.nodeRadius*2).attr("fill","white").attr("stroke",d.componentStroke).attr("stroke-width",1),M.filter(t=>!t.isPipelineParent&&t.sourceStrategy!=="market"&&t.className!=="anchor").append("circle").attr("cx",t=>c.get(t.id).x).attr("cy",t=>c.get(t.id).y).attr("r",a.nodeRadius).attr("fill",d.componentFill).attr("stroke",d.componentStroke).attr("stroke-width",1);const H=a.nodeRadius*.7,$=a.nodeRadius*1.2;if(T.append("line").attr("class","wardley-market-line").attr("x1",t=>c.get(t.id).x).attr("y1",t=>c.get(t.id).y-$).attr("x2",t=>c.get(t.id).x-$*Math.cos(Math.PI/6)).attr("y2",t=>c.get(t.id).y+$*Math.sin(Math.PI/6)).attr("stroke",d.componentStroke).attr("stroke-width",1),T.append("line").attr("class","wardley-market-line").attr("x1",t=>c.get(t.id).x-$*Math.cos(Math.PI/6)).attr("y1",t=>c.get(t.id).y+$*Math.sin(Math.PI/6)).attr("x2",t=>c.get(t.id).x+$*Math.cos(Math.PI/6)).attr("y2",t=>c.get(t.id).y+$*Math.sin(Math.PI/6)).attr("stroke",d.componentStroke).attr("stroke-width",1),T.append("line").attr("class","wardley-market-line").attr("x1",t=>c.get(t.id).x+$*Math.cos(Math.PI/6)).attr("y1",t=>c.get(t.id).y+$*Math.sin(Math.PI/6)).attr("x2",t=>c.get(t.id).x).attr("y2",t=>c.get(t.id).y-$).attr("stroke",d.componentStroke).attr("stroke-width",1),T.append("circle").attr("class","wardley-market-dot").attr("cx",t=>c.get(t.id).x).attr("cy",t=>c.get(t.id).y-$).attr("r",H).attr("fill","white").attr("stroke",d.componentStroke).attr("stroke-width",2),T.append("circle").attr("class","wardley-market-dot").attr("cx",t=>c.get(t.id).x-$*Math.cos(Math.PI/6)).attr("cy",t=>c.get(t.id).y+$*Math.sin(Math.PI/6)).attr("r",H).attr("fill","white").attr("stroke",d.componentStroke).attr("stroke-width",2),T.append("circle").attr("class","wardley-market-dot").attr("cx",t=>c.get(t.id).x+$*Math.cos(Math.PI/6)).attr("cy",t=>c.get(t.id).y+$*Math.sin(Math.PI/6)).attr("r",H).attr("fill","white").attr("stroke",d.componentStroke).attr("stroke-width",2),M.filter(t=>t.isPipelineParent===!0).append("rect").attr("x",t=>c.get(t.id).x-w/2).attr("y",t=>c.get(t.id).y-w/2).attr("width",w).attr("height",w).attr("fill",d.componentFill).attr("stroke",d.componentStroke).attr("stroke-width",1),M.filter(t=>t.inertia===!0).append("line").attr("class","wardley-inertia").attr("x1",t=>{const s=c.get(t.id);let n=t.isPipelineParent?w/2+15:a.nodeRadius+15;return t.sourceStrategy&&(n+=a.nodeRadius+10),s.x+n}).attr("y1",t=>{const s=c.get(t.id),n=t.isPipelineParent?w:a.nodeRadius*2;return s.y-n/2}).attr("x2",t=>{const s=c.get(t.id);let n=t.isPipelineParent?w/2+15:a.nodeRadius+15;return t.sourceStrategy&&(n+=a.nodeRadius+10),s.x+n}).attr("y2",t=>{const s=c.get(t.id),n=t.isPipelineParent?w:a.nodeRadius*2;return s.y+n/2}).attr("stroke",d.componentStroke).attr("stroke-width",6),M.append("text").attr("x",t=>{const s=c.get(t.id);if(t.className==="anchor")return t.labelOffsetX!==void 0?s.x+t.labelOffsetX:s.x;let n=a.nodeLabelOffset;t.sourceStrategy&&t.labelOffsetX===void 0&&(n+=10);const i=t.labelOffsetX??n;return s.x+i}).attr("y",t=>{const s=c.get(t.id);if(t.className==="anchor")return t.labelOffsetY!==void 0?s.y+t.labelOffsetY:s.y-3;let n=-a.nodeLabelOffset;t.sourceStrategy&&t.labelOffsetY===void 0&&(n-=10);const i=t.labelOffsetY??n;return s.y+i}).attr("class","wardley-node-label").attr("fill",t=>t.className==="evolved"?d.evolutionStroke:t.className==="anchor"?"#000":d.componentLabelColor).attr("font-size",a.labelFontSize).attr("font-weight",t=>t.className==="anchor"?"bold":"normal").attr("text-anchor",t=>t.className==="anchor"?"middle":"start").attr("dominant-baseline",t=>t.className==="anchor"?"middle":"auto").text(t=>t.label),g.annotations.length>0){const t=v.append("g").attr("class","wardley-annotations");if(g.annotations.forEach(s=>{const n=s.coordinates.map(i=>({x:z(i.x),y:L(i.y)}));if(n.length>1)for(let i=0;i<n.length-1;i++)t.append("line").attr("class","wardley-annotation-line").attr("x1",n[i].x).attr("y1",n[i].y).attr("x2",n[i+1].x).attr("y2",n[i+1].y).attr("stroke",d.axisColor).attr("stroke-width",1.5).attr("stroke-dasharray","4 4");n.forEach(i=>{const p=t.append("g").attr("class","wardley-annotation");p.append("circle").attr("cx",i.x).attr("cy",i.y).attr("r",10).attr("fill","white").attr("stroke",d.axisColor).attr("stroke-width",1.5),p.append("text").attr("x",i.x).attr("y",i.y).attr("text-anchor","middle").attr("dominant-baseline","central").attr("font-size",10).attr("fill",d.axisTextColor).attr("font-weight","bold").text(s.number)})}),g.annotationsBox){let s=z(g.annotationsBox.x),n=L(g.annotationsBox.y);const i=10,p=16,l=11,f=t.append("g").attr("class","wardley-annotations-box"),x=[...g.annotations].filter(m=>m.text).sort((m,P)=>m.number-P.number),y=[];if(x.forEach((m,P)=>{const N=f.append("text").attr("x",s+i).attr("y",n+i+(P+1)*p).attr("font-size",l).attr("fill",d.axisTextColor).attr("text-anchor","start").attr("dominant-baseline","middle").text(`${m.number}. ${m.text}`);y.push(N)}),y.length>0){let m=0,P=0;y.forEach(j=>{const D=j.node(),Ct=D.getComputedTextLength();m=Math.max(m,Ct);const St=D.getBBox();P=Math.max(P,St.height)});const N=m+i*2+105,W=x.length*p+i*2+P/2,A=a.padding,$t=S-a.padding-N,vt=a.padding,Pt=b-a.padding-W;s=Math.max(A,Math.min(s,$t)),n=Math.max(vt,Math.min(n,Pt)),y.forEach((j,D)=>{j.attr("x",s+i).attr("y",n+i+(D+1)*p)}),f.insert("rect","text").attr("x",s).attr("y",n).attr("width",N).attr("height",W).attr("fill","white").attr("stroke",d.axisColor).attr("stroke-width",1.5).attr("rx",4).attr("ry",4)}}}if(g.notes.length>0){const t=v.append("g").attr("class","wardley-notes");g.notes.forEach(s=>{const n=z(s.x),i=L(s.y);t.append("text").attr("x",n).attr("y",i).attr("text-anchor","start").attr("font-size",11).attr("fill",d.axisTextColor).attr("font-weight","bold").text(s.text)})}if(g.accelerators.length>0){const t=v.append("g").attr("class","wardley-accelerators");g.accelerators.forEach(s=>{const n=z(s.x),i=L(s.y),p=60,l=30,f=20,x=`
3
3
  M ${n} ${i-l/2}
4
4
  L ${n+p-f} ${i-l/2}
@@ -1,4 +1,4 @@
1
- var Oe=Object.defineProperty;var ve=t=>{throw TypeError(t)};var Be=(t,e,s)=>e in t?Oe(t,e,{enumerable:!0,configurable:!0,writable:!0,value:s}):t[e]=s;var O=(t,e,s)=>Be(t,typeof e!="symbol"?e+"":e,s),ye=(t,e,s)=>e.has(t)||ve("Cannot "+s);var l=(t,e,s)=>(ye(t,e,"read from private field"),s?s.call(t):e.get(t)),v=(t,e,s)=>e.has(t)?ve("Cannot add the same private member more than once"):e instanceof WeakSet?e.add(t):e.set(t,s);var Y=(t,e,s)=>(ye(t,e,"access private method"),s);import{t as oe,bw as ue,b as de,br as De,bo as i,bp as Re}from"./a1kG0lDg.js";import{ao as N,aZ as He,aL as Je,bh as je,c9 as m,aD as b,bH as w,bs as ce,a7 as le,ay as ee,W as R,bn as he,bo as Ge,bS as Ve,aA as o,a5 as Se,bf as We,bA as Pe,aB as Le,b_ as Qe,aC as fe}from"./CJxGDkBm.js";import{i as ge}from"./Dr-hGtz9.js";import{c as Ue}from"./B5t5yFV1.js";import{b as Ze,f as Fe,e as Ke}from"./ysr2ZeEL.js";/* empty css */import{s as Ce}from"./D9DtZ5bO.js";import{h as Ie,an as Xe,a$ as se,l as Ye,a6 as $e,aq as _e,ar as we,aD as et,aM as tt,ay as rt,az as xe,av as C,aQ as nt}from"./CszTaYPw.js";import"./BoIfXiRv.js";import{i as st}from"./D-g0wh54.js";import{H as at}from"./Cg_iMZyA.js";var it="font-weight: bold",ot="font-weight: normal";function qe(t){N?console.warn(`%c[svelte] state_snapshot_uncloneable
1
+ var Oe=Object.defineProperty;var ve=t=>{throw TypeError(t)};var Be=(t,e,s)=>e in t?Oe(t,e,{enumerable:!0,configurable:!0,writable:!0,value:s}):t[e]=s;var O=(t,e,s)=>Be(t,typeof e!="symbol"?e+"":e,s),ye=(t,e,s)=>e.has(t)||ve("Cannot "+s);var l=(t,e,s)=>(ye(t,e,"read from private field"),s?s.call(t):e.get(t)),v=(t,e,s)=>e.has(t)?ve("Cannot add the same private member more than once"):e instanceof WeakSet?e.add(t):e.set(t,s);var Y=(t,e,s)=>(ye(t,e,"access private method"),s);import{t as oe,bw as ue,b as de,br as De,bo as i,bp as Re}from"./51_h0jm2.js";import{ao as N,aZ as He,aL as Je,bh as je,c9 as m,aD as b,bH as w,bs as ce,a7 as le,ay as ee,W as R,bn as he,bo as Ge,bS as Ve,aA as o,a5 as Se,bf as We,bA as Pe,aB as Le,b_ as Qe,aC as fe}from"./CJxGDkBm.js";import{i as ge}from"./PXCFrn2V.js";import{c as Ue}from"./DGmOjLYi.js";import{b as Ze,f as Fe,e as Ke}from"./CpPNoOk-.js";/* empty css */import{s as Ce}from"./DxvSggY5.js";import{h as Ie,an as Xe,a$ as se,l as Ye,a6 as $e,aq as _e,ar as we,aD as et,aM as tt,ay as rt,az as xe,av as C,aQ as nt}from"./Cdw_CIdg.js";import"./BoIfXiRv.js";import{i as st}from"./D-g0wh54.js";import{H as at}from"./BsE4jMhr.js";var it="font-weight: bold",ot="font-weight: normal";function qe(t){N?console.warn(`%c[svelte] state_snapshot_uncloneable
2
2
  %c${t?`The following properties cannot be cloned with \`$state.snapshot\` — the return value contains the originals:
3
3
 
4
4
  ${t}`:"Value cannot be cloned with `$state.snapshot` — the original value was returned"}
@@ -0,0 +1 @@
1
+ import{n as i}from"./BbQfjn7f.js";import{o as n}from"./6CAGpBb_.js";import{i as o,J4 as a,E0 as s,v9 as r,uL as f}from"./Zldsekdv.js";async function m(t,e){if(!(!t||!e)){if(t===o){await i("/"),a.dispatch(s(e)),a.dispatch(r("chief"));return}await n(t)&&a.dispatch(f(t,{agentId:e}))}}export{m as n};
@@ -1 +1 @@
1
- import{conf as t,language as e}from"./LWpzAIb1.js";const i=t,o={defaultToken:"invalid",tokenPostfix:".js",keywords:["break","case","catch","class","continue","const","constructor","debugger","default","delete","do","else","export","extends","false","finally","for","from","function","get","if","import","in","instanceof","let","new","null","return","set","static","super","switch","symbol","this","throw","true","try","typeof","undefined","var","void","while","with","yield","async","await","of"],typeKeywords:[],operators:e.operators,symbols:e.symbols,escapes:e.escapes,digits:e.digits,octaldigits:e.octaldigits,binarydigits:e.binarydigits,hexdigits:e.hexdigits,regexpctl:e.regexpctl,regexpesc:e.regexpesc,tokenizer:e.tokenizer};export{i as conf,o as language};
1
+ import{conf as t,language as e}from"./-QpfKAxD.js";const i=t,o={defaultToken:"invalid",tokenPostfix:".js",keywords:["break","case","catch","class","continue","const","constructor","debugger","default","delete","do","else","export","extends","false","finally","for","from","function","get","if","import","in","instanceof","let","new","null","return","set","static","super","switch","symbol","this","throw","true","try","typeof","undefined","var","void","while","with","yield","async","await","of"],typeKeywords:[],operators:e.operators,symbols:e.symbols,escapes:e.escapes,digits:e.digits,octaldigits:e.octaldigits,binarydigits:e.binarydigits,hexdigits:e.hexdigits,regexpctl:e.regexpctl,regexpesc:e.regexpesc,tokenizer:e.tokenizer};export{i as conf,o as language};
@@ -1,4 +1,4 @@
1
- import{p as e}from"./ysr2ZeEL.js";const t=[{id:"editorial-card",title:"Editorial card states",states:["default","group","inline","outlined","separated","selected","fluid-hover","header","flush-content","interactive","pressed","empty","long-content","compact","zoom-200","inert","light","dark","reduced-motion"],themes:["light","dark"],viewport:"both",reducedMotion:!0}];e({id:"card",source:"src/lib/components/ui/card/card.svelte",publicImport:"$lib/components/ui/card",legacyImports:[],exports:["Action","CARD_CONTENT_INSET_CLASS","CARD_ROW_GUTTER_CLASS","Card","CardAction","CardContent","CardDescription","CardFooter","CardGroup","CardHeader","CardTitle","Content","Description","Footer","Group","Header","Root","Title","cardMetadata"],usage:`<script lang="ts">
1
+ import{p as e}from"./CpPNoOk-.js";const t=[{id:"editorial-card",title:"Editorial card states",states:["default","group","inline","outlined","separated","selected","fluid-hover","header","flush-content","interactive","pressed","empty","long-content","compact","zoom-200","inert","light","dark","reduced-motion"],themes:["light","dark"],viewport:"both",reducedMotion:!0}];e({id:"card",source:"src/lib/components/ui/card/card.svelte",publicImport:"$lib/components/ui/card",legacyImports:[],exports:["Action","CARD_CONTENT_INSET_CLASS","CARD_ROW_GUTTER_CLASS","Card","CardAction","CardContent","CardDescription","CardFooter","CardGroup","CardHeader","CardTitle","Content","Description","Footer","Group","Header","Root","Title","cardMetadata"],usage:`<script lang="ts">
2
2
  import * as Card from '$lib/components/ui/card';
3
3
  <\/script>
4
4
 
@@ -1 +1 @@
1
- import{b as a,aW as o}from"./Bu3w6q3q.js";var g=a((t,e)=>{let n;return e==="sandbox"&&(n=o("#i"+t)),(e==="sandbox"?o(n.nodes()[0].contentDocument.body):o("body")).select(`[id="${t}"]`)},"getDiagramElement");export{g};
1
+ import{b as a,aW as o}from"./BOCp5eAe.js";var g=a((t,e)=>{let n;return e==="sandbox"&&(n=o("#i"+t)),(e==="sandbox"?o(n.nodes()[0].contentDocument.body):o("body")).select(`[id="${t}"]`)},"getDiagramElement");export{g};
@@ -1,2 +1,2 @@
1
- import{t as ht,bo as _,bm as g,bw as bt,b as xt}from"./a1kG0lDg.js";import{bs as yt,a7 as kt,ay as Q,W as p,bn as At,aA as h,a5 as q,bS as u,bl as S,bA as W,aD as e,b_ as L,bO as x,aB as k,bH as et,c9 as y,bV as at,be as wt,b$ as It}from"./CJxGDkBm.js";import{i as f}from"./Dr-hGtz9.js";import{I as Bt,g as Ct}from"./DEaLADF0.js";import{n as Pt,j as zt}from"./CoC9Ux29.js";import{f as F}from"./CszTaYPw.js";import"./BguHhtk8.js";import"./ysr2ZeEL.js";import"./D9DtZ5bO.js";import{F as rt,ce as Rt,cq as St,au as Wt}from"./prHJOEnU.js";import{A as Lt}from"./D635gi5P.js";import{D as Dt}from"./D5sOpT26.js";import{J4 as $t,uL as Ht}from"./DIz708WA.js";import{g as Nt}from"./D0H3cACA.js";var jt=k('<span class="type-caption shrink-0 font-medium text-success"> </span>'),qt=k('<!> <span class="type-body flex-1 truncate text-left font-medium text-foreground"> </span> <span class="type-caption shrink-0 tabular-nums"><span class="text-success"> </span> <span class="ml-1 text-danger"> </span></span> <!>',1),Ft=k("<!> ",1),Mt=k('<div class="mb-2 flex gap-1"></div>'),Ot=k('<div class="border-t border-border p-2"><!> <!></div>'),Vt=k('<div class="ws-block-widget type-body my-2 overflow-hidden rounded-md border border-border bg-card text-foreground shadow-(--elevation-raised)"><div class="flex min-h-9 items-center gap-2 px-3 py-1.5"><!> <!> <!></div> <!></div>'),Et=k('<div class="ws-block-widget type-caption my-2 text-muted-foreground"> </div>');function Jt(U,n){if(new.target)return ht({component:Jt,...U});yt(n,!0);let A=_(n,"patches",7),M=_(n,"label",23,()=>g.ui_patchBlock_label()),O=_(n,"lastApply",7),w=_(n,"linkedAgentId",7),D=_(n,"workspaceId",7),P=_(n,"applying",7,!1),$=_(n,"onApply",7),H=_(n,"onRevert",7),V=at(!1),E=at(0),z=y(()=>A()?.[e(E)]),J=y(()=>O()?.status==="success");function st(t){const o=t.split(`
1
+ import{t as ht,bo as _,bm as g,bw as bt,b as xt}from"./51_h0jm2.js";import{bs as yt,a7 as kt,ay as Q,W as p,bn as At,aA as h,a5 as q,bS as u,bl as S,bA as W,aD as e,b_ as L,bO as x,aB as k,bH as et,c9 as y,bV as at,be as wt,b$ as It}from"./CJxGDkBm.js";import{i as f}from"./PXCFrn2V.js";import{I as Bt,g as Ct}from"./Bjy4ygfJ.js";import{n as Pt,j as zt}from"./BxwkoIbZ.js";import{f as F}from"./Cdw_CIdg.js";import"./CF1Tu_8c.js";import"./CpPNoOk-.js";import"./DxvSggY5.js";import{F as rt,ce as Rt,cq as St,au as Wt}from"./DSQT151l.js";import{A as Lt}from"./FmBB5PWm.js";import{D as Dt}from"./DdH7Q5ij.js";import{J4 as $t,uL as Ht}from"./Zldsekdv.js";import{g as Nt}from"./D0H3cACA.js";var jt=k('<span class="type-caption shrink-0 font-medium text-success"> </span>'),qt=k('<!> <span class="type-body flex-1 truncate text-left font-medium text-foreground"> </span> <span class="type-caption shrink-0 tabular-nums"><span class="text-success"> </span> <span class="ml-1 text-danger"> </span></span> <!>',1),Ft=k("<!> ",1),Mt=k('<div class="mb-2 flex gap-1"></div>'),Ot=k('<div class="border-t border-border p-2"><!> <!></div>'),Vt=k('<div class="ws-block-widget type-body my-2 overflow-hidden rounded-md border border-border bg-card text-foreground shadow-(--elevation-raised)"><div class="flex min-h-9 items-center gap-2 px-3 py-1.5"><!> <!> <!></div> <!></div>'),Et=k('<div class="ws-block-widget type-caption my-2 text-muted-foreground"> </div>');function Jt(U,n){if(new.target)return ht({component:Jt,...U});yt(n,!0);let A=_(n,"patches",7),M=_(n,"label",23,()=>g.ui_patchBlock_label()),O=_(n,"lastApply",7),w=_(n,"linkedAgentId",7),D=_(n,"workspaceId",7),P=_(n,"applying",7,!1),$=_(n,"onApply",7),H=_(n,"onRevert",7),V=at(!1),E=at(0),z=y(()=>A()?.[e(E)]),J=y(()=>O()?.status==="success");function st(t){const o=t.split(`
2
2
  `);let v=0,b=0;for(const I of o)I.startsWith("+")&&!I.startsWith("+++")?v++:I.startsWith("-")&&!I.startsWith("---")&&b++;return{addCount:v,removeCount:b}}let X=y(()=>e(z)?st(e(z).diff):{addCount:0,removeCount:0}),T=y(()=>P()?{label:g.ui_patchBlock_applying_label(),icon:null}:e(J)?{label:g.ui_patchBlock_revert_label(),icon:St}:{label:g.ui_patchBlock_apply_label(),icon:Wt}),nt=y(()=>!!($()||H()));function ot(){et(V,!e(V))}function it(){e(J)?H()?.():$()?.()}var lt={get patches(){return A()},set patches(t){A(t),h()},get label(){return M()},set label(t=g.ui_patchBlock_label()){M(t),h()},get lastApply(){return O()},set lastApply(t){O(t),h()},get linkedAgentId(){return w()},set linkedAgentId(t){w(t),h()},get workspaceId(){return D()},set workspaceId(t){D(t),h()},get applying(){return P()},set applying(t=!1){P(t),h()},get onApply(){return $()},set onApply(t){$(t),h()},get onRevert(){return H()},set onRevert(t){H(t),h()},$set:bt,$on:(t,o)=>xt(n,t,o)},Y=kt(),ct=Q(Y);{var dt=t=>{var o=Vt(),v=q(o),b=q(v);{var I=a=>{{let c=y(()=>g.ui_patchBlock_viewAgent_tooltip());F(a,{variant:"plain",size:"icon-compact",iconOnly:!0,class:"size-4! shrink-0 rounded-sm! transition-opacity hover:opacity-80",onclick:i=>{D()&&$t.dispatch(Ht(D(),{agentId:w(),...Nt(i)}))},get title(){return e(c)},children:(i,m)=>{Lt(i,{get agentId(){return w()},variant:"compact"})},$$slots:{default:!0}})}};f(b,a=>{w()&&a(I)})}var Z=u(b,2);F(Z,{variant:"plain",size:"compact",class:"h-auto! min-w-0 flex-1 shrink items-center justify-start gap-2 px-0! py-0! text-muted-foreground transition-colors hover:text-foreground",truncateLabel:!1,labelClass:"flex min-w-0 flex-1 items-center gap-2",onclick:ot,children:(a,c)=>{var i=qt(),m=Q(i);{var B=l=>{rt(l,{get icon(){return Rt},size:10,class:"text-muted-foreground"})};f(m,l=>{w()||l(B)})}var C=u(m,2),s=S(C,!0),d=u(C,2),r=q(d),R=S(r),N=u(r,2),G=S(N);W(d);var K=u(d,2);{var tt=l=>{var j=jt(),_t=S(j,!0);L(gt=>x(_t,gt),[()=>g.ui_patchBlock_applied_label()]),p(l,j)};f(K,l=>{e(J)&&l(tt)})}L(()=>{x(s,M()),x(R,`+${e(X).addCount??""}`),x(G,`-${e(X).removeCount??""}`)}),p(a,i)},$$slots:{default:!0}});var ut=u(Z,2);{var ft=a=>{F(a,{variant:"ghost-light",size:"sm",class:"type-caption shrink-0",onclick:it,get disabled(){return P()},children:(c,i)=>{var m=Ft(),B=Q(m);{var C=r=>{Bt(r,{size:12})},s=r=>{rt(r,{get icon(){return e(T).icon},size:"xs"})};f(B,r=>{P()?r(C):e(T).icon&&r(s,1)})}var d=u(B);L(()=>x(d,` ${e(T).label??""}`)),p(c,m)},$$slots:{default:!0}})};f(ut,a=>{e(nt)&&a(ft)})}W(v);var vt=u(v,2);{var mt=a=>{var c=Ot(),i=q(c);{var m=s=>{var d=Mt();Ct(d,23,A,(r,R)=>`patch-${R}-${r.filePath}`,(r,R,N)=>{{let G=y(()=>e(N)===e(E)?"default":"ghost-light");F(r,{get variant(){return e(G)},size:"sm",class:"type-caption",onclick:()=>et(E,e(N),!0),children:(K,tt)=>{wt();var l=It();L(j=>x(l,j),[()=>e(R).filePath.split("/").pop()]),p(K,l)},$$slots:{default:!0}})}}),W(d),p(s,d)};f(i,s=>{A().length>1&&s(m)})}var B=u(i,2);{var C=s=>{Dt(s,{get patch(){return e(z).diff},get fileName(){return e(z).filePath},showHeader:!0,showStats:!0,showLineNumbers:!0,maxHeight:"300px",collapsible:!1,class:"overflow-hidden rounded-sm border border-border"})};f(B,s=>{e(z)&&s(C)})}W(c),Pt(3,c,()=>zt,()=>({tier:"moderate"})),p(a,c)};f(vt,a=>{e(V)&&a(mt)})}W(o),p(t,o)},pt=t=>{var o=Et(),v=S(o,!0);L(b=>x(v,b),[()=>g.ui_patchBlock_invalid_error()]),p(t,o)};f(ct,t=>{A()?.length?t(dt):t(pt,-1)})}return p(U,Y),At(lt)}export{Jt as P};
@@ -1 +1 @@
1
- import{m as t}from"./PJHVK1jp.js";import"./CJxGDkBm.js";import{bm as n}from"./a1kG0lDg.js";import"./ysr2ZeEL.js";import"./D9DtZ5bO.js";import"./BguHhtk8.js";import"./ChTqQfQN.js";import"./DUk9Psab.js";import"./DIz708WA.js";function L(e){try{const r=new URL(e).hostname.toLowerCase();return r==="daemon.localhost"||r==="client.localhost"}catch{return!1}}const s="browser:resolve-url";function a(e){return typeof e=="object"&&e!==null&&typeof e.url=="string"&&typeof e.rewritten=="boolean"}async function l(e,r){const o={url:e,rewritten:!1};if(!r)return o;try{const i=await r(s,{url:e});return a(i)?i:o}catch{return o}}async function g(e,r){if(!r)return e;try{const o=await r(s,{url:e,mode:"rewrite-only"});return a(o)?o.url:e}catch{return e}}async function c(e){const r=await l(e,typeof window<"u"?window.electronAPI?.invoke:void 0);return r.error&&r.rewritten?r.forbidden?t.error(n.browser_linkOpen_ownerOnlyForward_error()):t.error(n.browser_embedded_resolveFailed_error(),{description:r.error}):r.warning&&t.warning(n.browser_linkOpen_loopbackAmbiguity_warning(),{description:r.warning}),{url:r.url,...r.rewritten&&r.requestedUrl!==void 0?{requestedUrl:r.requestedUrl}:{}}}const h=Object.freeze(Object.defineProperty({__proto__:null,resolveBrowserLinkForOpen:c},Symbol.toStringTag,{value:"Module"}));export{l as a,h as b,g as c,L as i,c as r};
1
+ import{m as t}from"./SX1khnGy.js";import"./CJxGDkBm.js";import{bm as n}from"./51_h0jm2.js";import"./CpPNoOk-.js";import"./DxvSggY5.js";import"./CF1Tu_8c.js";import"./ChTqQfQN.js";import"./JKboQXkL.js";import"./Zldsekdv.js";function L(e){try{const r=new URL(e).hostname.toLowerCase();return r==="daemon.localhost"||r==="client.localhost"}catch{return!1}}const s="browser:resolve-url";function a(e){return typeof e=="object"&&e!==null&&typeof e.url=="string"&&typeof e.rewritten=="boolean"}async function l(e,r){const o={url:e,rewritten:!1};if(!r)return o;try{const i=await r(s,{url:e});return a(i)?i:o}catch{return o}}async function g(e,r){if(!r)return e;try{const o=await r(s,{url:e,mode:"rewrite-only"});return a(o)?o.url:e}catch{return e}}async function c(e){const r=await l(e,typeof window<"u"?window.electronAPI?.invoke:void 0);return r.error&&r.rewritten?r.forbidden?t.error(n.browser_linkOpen_ownerOnlyForward_error()):t.error(n.browser_embedded_resolveFailed_error(),{description:r.error}):r.warning&&t.warning(n.browser_linkOpen_loopbackAmbiguity_warning(),{description:r.warning}),{url:r.url,...r.rewritten&&r.requestedUrl!==void 0?{requestedUrl:r.requestedUrl}:{}}}const h=Object.freeze(Object.defineProperty({__proto__:null,resolveBrowserLinkForOpen:c},Symbol.toStringTag,{value:"Module"}));export{l as a,h as b,g as c,L as i,c as r};
@@ -1 +1 @@
1
- import{bv as t,ak as c}from"./CJxGDkBm.js";import{N as o}from"./CqJQ3ikU.js";import{J4 as r}from"./DIz708WA.js";function u(){try{return r.state.userPreferences?.shortcutOverrides??{}}catch{return{}}}function a(e){return o(e,u())}function h(e){if(typeof r.getReadableState!="function")return t(a(e));try{return c(r.getReadableState(),s=>o(e,s.userPreferences?.shortcutOverrides??{}))}catch{return t(a(e))}}export{h as e,a as g};
1
+ import{bv as t,ak as c}from"./CJxGDkBm.js";import{N as o}from"./CqJQ3ikU.js";import{J4 as r}from"./Zldsekdv.js";function u(){try{return r.state.userPreferences?.shortcutOverrides??{}}catch{return{}}}function a(e){return o(e,u())}function h(e){if(typeof r.getReadableState!="function")return t(a(e));try{return c(r.getReadableState(),s=>o(e,s.userPreferences?.shortcutOverrides??{}))}catch{return t(a(e))}}export{h as e,a as g};
@@ -1 +1 @@
1
- import{bo as z,bs as I,a7 as O,ay as x,W as y,aD as S,a5 as Q,bf as j,bA as q,bn as E,c9 as G,aA as r,aB as J}from"./CJxGDkBm.js";import{t as K,bo as a,bw as L,b as M,bp as N}from"./a1kG0lDg.js";import{b as R}from"./ysr2ZeEL.js";import"./DOdlo-4T.js";import{i as U}from"./Dr-hGtz9.js";import{s as w}from"./D9DtZ5bO.js";import{a as V}from"./DOgidnWF.js";import{az as T,av as n,aQ as X}from"./CszTaYPw.js";import{F as Y}from"./C-3HGS81.js";var Z=new Set(["$$slots","$$events","$$legacy","children","child","id","ref","type","disabled","openOnHover","openDelay","closeDelay"]),$=J("<button><!></button>");function A(v,t){const _=z();if(new.target)return K({component:A,...v});I(t,!0);let p=a(t,"children",7),l=a(t,"child",7),i=a(t,"id",23,()=>T(_)),d=a(t,"ref",15,null),c=a(t,"type",7,"button"),f=a(t,"disabled",7,!1),u=a(t,"openOnHover",7,!1),g=a(t,"openDelay",7,700),m=a(t,"closeDelay",7,300),B=N(t,Z);const h=V.create({id:n(()=>i()),ref:n(()=>d(),e=>d(e)),disabled:n(()=>!!f()),openOnHover:n(()=>u()),openDelay:n(()=>g()),closeDelay:n(()=>m())}),D=G(()=>X(B,h.props,{type:c()}));var C={get children(){return p()},set children(e){p(e),r()},get child(){return l()},set child(e){l(e),r()},get id(){return i()},set id(e=T(_)){i(e),r()},get ref(){return d()},set ref(e=null){d(e),r()},get type(){return c()},set type(e="button"){c(e),r()},get disabled(){return f()},set disabled(e=!1){f(e),r()},get openOnHover(){return u()},set openOnHover(e=!1){u(e),r()},get openDelay(){return g()},set openDelay(e=700){g(e),r()},get closeDelay(){return m()},set closeDelay(e=300){m(e),r()},$set:L,$on:(e,P)=>M(t,e,P)};return Y(v,{get id(){return i()},get ref(){return h.opts.ref},children:(e,P)=>{var H=O(),F=x(H);{var W=s=>{var o=O(),b=x(o);w(b,l,()=>({props:S(D)})),y(s,o)},k=s=>{var o=$();R(o,()=>({...S(D)}));var b=Q(o);w(b,()=>p()??j),q(o),y(s,o)};U(F,s=>{l()?s(W):s(k,-1)})}y(e,H)},$$slots:{default:!0}}),E(C)}const de=A;export{A as P,de as T};
1
+ import{bo as z,bs as I,a7 as O,ay as x,W as y,aD as S,a5 as Q,bf as j,bA as q,bn as E,c9 as G,aA as r,aB as J}from"./CJxGDkBm.js";import{t as K,bo as a,bw as L,b as M,bp as N}from"./51_h0jm2.js";import{b as R}from"./CpPNoOk-.js";import"./DmhHEMPi.js";import{i as U}from"./PXCFrn2V.js";import{s as w}from"./DxvSggY5.js";import{a as V}from"./CQw_RyF_.js";import{az as T,av as n,aQ as X}from"./Cdw_CIdg.js";import{F as Y}from"./C1McR-sz.js";var Z=new Set(["$$slots","$$events","$$legacy","children","child","id","ref","type","disabled","openOnHover","openDelay","closeDelay"]),$=J("<button><!></button>");function A(v,t){const _=z();if(new.target)return K({component:A,...v});I(t,!0);let p=a(t,"children",7),l=a(t,"child",7),i=a(t,"id",23,()=>T(_)),d=a(t,"ref",15,null),c=a(t,"type",7,"button"),f=a(t,"disabled",7,!1),u=a(t,"openOnHover",7,!1),g=a(t,"openDelay",7,700),m=a(t,"closeDelay",7,300),B=N(t,Z);const h=V.create({id:n(()=>i()),ref:n(()=>d(),e=>d(e)),disabled:n(()=>!!f()),openOnHover:n(()=>u()),openDelay:n(()=>g()),closeDelay:n(()=>m())}),D=G(()=>X(B,h.props,{type:c()}));var C={get children(){return p()},set children(e){p(e),r()},get child(){return l()},set child(e){l(e),r()},get id(){return i()},set id(e=T(_)){i(e),r()},get ref(){return d()},set ref(e=null){d(e),r()},get type(){return c()},set type(e="button"){c(e),r()},get disabled(){return f()},set disabled(e=!1){f(e),r()},get openOnHover(){return u()},set openOnHover(e=!1){u(e),r()},get openDelay(){return g()},set openDelay(e=700){g(e),r()},get closeDelay(){return m()},set closeDelay(e=300){m(e),r()},$set:L,$on:(e,P)=>M(t,e,P)};return Y(v,{get id(){return i()},get ref(){return h.opts.ref},children:(e,P)=>{var H=O(),F=x(H);{var W=s=>{var o=O(),b=x(o);w(b,l,()=>({props:S(D)})),y(s,o)},k=s=>{var o=$();R(o,()=>({...S(D)}));var b=Q(o);w(b,()=>p()??j),q(o),y(s,o)};U(F,s=>{l()?s(W):s(k,-1)})}y(e,H)},$$slots:{default:!0}}),E(C)}const de=A;export{A as P,de as T};
@@ -1,4 +1,4 @@
1
- import{n as E,o as l,b,s as x,d as dt,l as S,c as ct,_ as M,r as ut}from"./CIyUrgF0.js";import{Z as _}from"./D9DtZ5bO.js";import{c as lt,a as mt}from"./DxwfiAWm.js";const L=E().finite().nonnegative(),Q=l({completedAtMs:L,samples:b(l({atMs:L,pointCount:E().int().min(0).max(2048),end:l({x:E().finite(),y:E().finite()}).strict()}).strict()).min(1).max(64)}).strict().refine(t=>t.samples.every((s,n)=>s.atMs<=t.completedAtMs&&(!n||s.atMs>=t.samples[n-1].atMs)),"Invalid gesture clock");function Vt(t,s,n){if(!s||n>=s.completedAtMs)return t;const i=[...s.samples].reverse().find(e=>e.atMs<=n);if(!i)return null;if(t.kind==="path")return i.pointCount?{kind:"path",points:t.points.slice(0,i.pointCount)}:null;if(t.kind==="arrow")return{kind:"arrow",from:t.from,to:i.end};if(t.kind==="rect"){const e=s.samples[0].end,a=Math.abs(i.end.x-e.x),r=Math.abs(i.end.y-e.y);return a>0&&r>0?{kind:"rect",x:Math.min(e.x,i.end.x),y:Math.min(e.y,i.end.y),w:a,h:r}:null}return t}const f=E().finite(),A=f.nonnegative(),R=E().int().nonnegative(),h=x().min(1).max(512),V=l({startMs:A,endMs:A}).strict().refine(t=>t.endMs>=t.startMs,"Reversed range"),z=l({x:f,y:f}).strict(),$=l({x:f,y:f,w:f.positive(),h:f.positive()}).strict(),ft=$.extend({id:h}),Wt=16,W=2,q=l({id:h,radius:f.positive().max(4096),points:b(z).min(1).max(4096)}).strict();function Zt(t){const s=t.points.map(a=>a.x),n=t.points.map(a=>a.y),i=Math.min(...s)-t.radius,e=Math.min(...n)-t.radius;return{x:i,y:e,w:Math.max(...s)+t.radius-i,h:Math.max(...n)+t.radius-e}}function Qt(t,s){return q.parse({...t,radius:t.radius*Math.max(Math.abs(s.scaleX),Math.abs(s.scaleY)),points:t.points.map(n=>({x:n.x*s.scaleX+s.offsetX,y:n.y*s.scaleY+s.offsetY}))})}const tt=dt("kind",[$.extend({kind:S("rect")}),l({kind:S("point"),x:f,y:f}).strict(),l({kind:S("path"),points:b(z).min(1).max(4096)}).strict(),l({kind:S("arrow"),from:z,to:z}).strict(),l({kind:S("text"),x:f,y:f,text:x().max(1e4),fontSize:f.positive(),style:S("sticky").optional(),width:f.positive().max(4096).optional(),padding:f.nonnegative().max(1024).optional()}).strict()]);function st(t){const s=t.fontSize*1.4,n=t.style==="sticky"?t.padding??8:0;if(t.style!=="sticky"){const r=t.text.split(`
1
+ import{n as E,o as l,b,s as x,d as dt,l as S,c as ct,_ as M,r as ut}from"./CIyUrgF0.js";import{Z as _}from"./DxvSggY5.js";import{c as lt,a as mt}from"./DxwfiAWm.js";const L=E().finite().nonnegative(),Q=l({completedAtMs:L,samples:b(l({atMs:L,pointCount:E().int().min(0).max(2048),end:l({x:E().finite(),y:E().finite()}).strict()}).strict()).min(1).max(64)}).strict().refine(t=>t.samples.every((s,n)=>s.atMs<=t.completedAtMs&&(!n||s.atMs>=t.samples[n-1].atMs)),"Invalid gesture clock");function Vt(t,s,n){if(!s||n>=s.completedAtMs)return t;const i=[...s.samples].reverse().find(e=>e.atMs<=n);if(!i)return null;if(t.kind==="path")return i.pointCount?{kind:"path",points:t.points.slice(0,i.pointCount)}:null;if(t.kind==="arrow")return{kind:"arrow",from:t.from,to:i.end};if(t.kind==="rect"){const e=s.samples[0].end,a=Math.abs(i.end.x-e.x),r=Math.abs(i.end.y-e.y);return a>0&&r>0?{kind:"rect",x:Math.min(e.x,i.end.x),y:Math.min(e.y,i.end.y),w:a,h:r}:null}return t}const f=E().finite(),A=f.nonnegative(),R=E().int().nonnegative(),h=x().min(1).max(512),V=l({startMs:A,endMs:A}).strict().refine(t=>t.endMs>=t.startMs,"Reversed range"),z=l({x:f,y:f}).strict(),$=l({x:f,y:f,w:f.positive(),h:f.positive()}).strict(),ft=$.extend({id:h}),Wt=16,W=2,q=l({id:h,radius:f.positive().max(4096),points:b(z).min(1).max(4096)}).strict();function Zt(t){const s=t.points.map(a=>a.x),n=t.points.map(a=>a.y),i=Math.min(...s)-t.radius,e=Math.min(...n)-t.radius;return{x:i,y:e,w:Math.max(...s)+t.radius-i,h:Math.max(...n)+t.radius-e}}function Qt(t,s){return q.parse({...t,radius:t.radius*Math.max(Math.abs(s.scaleX),Math.abs(s.scaleY)),points:t.points.map(n=>({x:n.x*s.scaleX+s.offsetX,y:n.y*s.scaleY+s.offsetY}))})}const tt=dt("kind",[$.extend({kind:S("rect")}),l({kind:S("point"),x:f,y:f}).strict(),l({kind:S("path"),points:b(z).min(1).max(4096)}).strict(),l({kind:S("arrow"),from:z,to:z}).strict(),l({kind:S("text"),x:f,y:f,text:x().max(1e4),fontSize:f.positive(),style:S("sticky").optional(),width:f.positive().max(4096).optional(),padding:f.nonnegative().max(1024).optional()}).strict()]);function st(t){const s=t.fontSize*1.4,n=t.style==="sticky"?t.padding??8:0;if(t.style!=="sticky"){const r=t.text.split(`
2
2
  `);return{lines:r,width:Math.max(1,...r.map(d=>d.length))*t.fontSize*.65,height:r.length*s,padding:n,lineHeight:s}}const i=Math.max(n*2+1,t.width??240),e=Math.max(1,Math.floor((i-n*2)/(t.fontSize*.65))),a=[];for(const r of t.text.split(`
3
3
  `)){let d=r;for(;d.length>e;){const c=d.lastIndexOf(" ",e),u=c>0?c:e;a.push(d.slice(0,u).trimEnd()),d=d.slice(u).trimStart()}a.push(d)}return{lines:a,width:i,height:a.length*s+n*2,padding:n,lineHeight:s}}function qt(t,s){const n=st(t),i=tt.parse({...t,x:t.x*s.scaleX+s.offsetX,y:t.y*s.scaleY+s.offsetY,fontSize:t.fontSize*Math.abs(s.scaleY),...t.style==="sticky"?{width:n.width*Math.abs(s.scaleX),padding:n.padding*Math.min(Math.abs(s.scaleX),Math.abs(s.scaleY))}:{}});if(i.kind!=="text")throw new Error("invalid-text-transform");return i}const U=l({gestureProgress:Q.optional(),id:h,atMs:A,batchId:h,source:M(["recording","editor"]),kind:M(["click","box","draw","arrow","element","text"]),included:ct(),geometry:tt,label:x().max(2048),note:x().max(2e4),context:l({selector:x().max(8192).nullable(),text:x().max(2e4).nullable(),url:x().max(8192).nullable()}).strict()}).strict(),pt=l({id:h,atMs:A,clearAtMs:A.nullable()}).strict().refine(t=>t.clearAtMs===null||t.clearAtMs>=t.atMs,"Reversed batch"),ht=l({mode:M(["fullscreen","window","region"]),frame:l({displayId:E().int(),rect:$,coordinateSpace:S("screen-points-top-left")}).strict().nullable()}).strict(),j=l({id:h,revision:R,kind:M(["recording","screenshot"]),capture:ht.optional(),attachmentId:h,path:x().refine(t=>t.startsWith(".intent/attachments/")&&!/[\\\x00]/.test(t)&&!t.split("/").some(s=>!s||s==="."||s===".."),"Invalid attachment path"),durationMs:A,width:f.positive(),height:f.positive(),audio:M(["available","none","unknown"]),batches:b(pt).max(1e4),visuals:M(["clean","baked-marks"]),capturedMarks:b(U).max(1e4).optional(),bakedMarks:b(U).max(1e4).optional()}).strict().superRefine((t,s)=>{for(const n of t.capturedMarks??[]){const i=n.gestureProgress;i&&(t.kind!=="recording"||i.completedAtMs>t.durationMs||i.samples.some(e=>e.atMs<n.atMs||n.geometry.kind==="path"&&e.pointCount>n.geometry.points.length))&&s.addIssue({code:_.custom,path:["capturedMarks"],message:"Gesture timing does not match the recording"})}t.kind==="recording"&&t.durationMs<=0&&s.addIssue({code:_.custom,path:["durationMs"],message:"Recording duration is missing"})}),Mt=l({status:M(["pending","ready","no-speech","unavailable","failed"]),revision:R,words:b(l({id:h,text:x().max(2e4),startMs:A.nullable(),endMs:A.nullable(),alignment:M(["word","segment","untimed"])}).strict().superRefine((t,s)=>{(t.startMs===null!=(t.endMs===null)||t.startMs!==null&&t.endMs!==null&&t.endMs<t.startMs)&&s.addIssue({code:_.custom,message:"Incomplete or reversed recognition timing"}),t.alignment!=="untimed"&&(t.startMs===null||t.endMs===null)&&s.addIssue({code:_.custom,message:"Timed recognition units require genuine timestamps"}),t.alignment==="untimed"&&t.startMs!==null&&s.addIssue({code:_.custom,message:"Untimed text cannot claim timestamps"})})).max(2e5),error:x().max(2048).optional()}).strict();l({video:M(["full","highlights"]),voice:M(["audio","transcript","off"])}).strict();const G=l({version:S(1),kind:M(["recording","screenshot"]),sourceId:h,sourceRevision:R,revision:R,trim:V,cuts:b(V).max(1e4),marks:b(U).max(1e4),blurRegions:b(ft).max(1e3),blurStrokes:b(q).max(1e3).optional(),crop:$.nullable(),video:M(["full","highlights"]),voice:M(["audio","transcript","off"]),wordEdits:ut(x(),x().max(2e4))}).strict().superRefine((t,s)=>{const n=new Set;for(const i of t.marks)n.has(i.id)&&s.addIssue({code:_.custom,path:["marks"],message:"Duplicate mark identity"}),n.add(i.id)}),kt=l({openId:h,outputVersion:S(W).optional(),sourceId:h,sourceRevision:R,pair:l({workspaceId:h,agentId:h}).strict(),expectedEditRevision:R,edit:G,replacement:l({candidateToken:h,source:j}).strict().optional()}).strict().refine(t=>!(t.edit.blurStrokes?.length||t.edit.marks.some(s=>s.geometry.kind==="text"&&s.geometry.style==="sticky"))||t.outputVersion===W,"This edit requires an admitted output version");function X(t){const s=t.filter(i=>Number.isFinite(i.startMs)&&Number.isFinite(i.endMs)&&i.endMs>i.startMs).map(i=>({...i})).sort((i,e)=>i.startMs-e.startMs),n=[];for(const i of s){const e=n.at(-1);e&&i.startMs<=e.endMs?e.endMs=Math.max(e.endMs,i.endMs):n.push(i)}return n}function K(t,s){let n=X(t);for(const i of X(s))n=n.flatMap(e=>i.endMs<=e.startMs||i.startMs>=e.endMs?[e]:[...i.startMs>e.startMs?[{startMs:e.startMs,endMs:i.startMs}]:[],...i.endMs<e.endMs?[{startMs:i.endMs,endMs:e.endMs}]:[]]);return n}function Y(t,s,n){const i=t===n?Math.max(0,t-.001):t;return s.some(e=>i>=e.startMs&&i<e.endMs)}const N=6;function xt(t){if(t.kind==="point")return{x:t.x-N,y:t.y-N,w:N*2,h:N*2};if(t.kind==="rect")return{x:t.x,y:t.y,w:t.w,h:t.h};if(t.kind==="text"){const e=st(t);return{x:t.x,y:t.y,w:e.width,h:e.height}}const s=t.kind==="path"?t.points:[t.from,t.to],n=Math.min(...s.map(e=>e.x)),i=Math.min(...s.map(e=>e.y));return{x:n,y:i,w:Math.max(1,Math.max(...s.map(e=>e.x))-n),h:Math.max(1,Math.max(...s.map(e=>e.y))-i)}}function gt(t,s){if(!s)return!1;const n=xt(t.geometry);return n.x+n.w<s.x||n.x>s.x+s.w||n.y+n.h<s.y||n.y>s.y+s.h}function It(t){const s=K([t.trim],t.cuts);return t.marks.some(n=>n.included&&Y(n.atMs,s,t.trim.endMs))}function ts(t){return t.visuals==="clean"}function ss(t,s){const n=t.kind==="recording",i=s?.status==="ready";return{audio:{enabled:n&&t.audio==="available",reason:t.audio==="available"?null:"audio-unavailable"},transcript:{enabled:n&&i,reason:i?null:s?.status==="pending"?"transcript-pending":"transcript-unavailable"},off:{enabled:!0,reason:null}}}function ns(t,s,n,i=null){const e={version:1,kind:t.kind,sourceId:t.id,sourceRevision:t.revision,revision:0,trim:{startMs:0,endMs:t.durationMs},cuts:[],marks:structuredClone([...s]),blurRegions:[],blurStrokes:[],crop:null,video:i?.video??"highlights",voice:i?.voice??"transcript",wordEdits:{}};return t.kind==="screenshot"?(e.video="full",e.voice="off",e):(It(e)||(e.video="full"),(t.audio==="none"||n?.status==="no-speech"||e.voice==="audio"&&t.audio!=="available")&&(e.voice="off"),e)}function yt(t,s,n,i,e){const a=[],r=t.cuts.length>0||t.trim.startMs>0||t.trim.endMs<s.durationMs;if(!r&&n.words.some(o=>{const m=t.wordEdits[o.id]??o.text;return/^[\s\p{P}]*$/u.test(m)&&/^[\s\p{P}]*$/u.test(o.text)?!1:o.startMs===null||o.endMs===null||o.startMs<s.durationMs&&o.endMs>s.durationMs})){const o=[];let m=!1;for(const y of n.words){const D=t.wordEdits[y.id]??y.text;if(!D.trim()){y.text.trim()&&(m=!1);continue}/^[\s\p{P}]*$/u.test(D)?m&&(o[o.length-1]+=D.trim()):(o.push(D.trim()),m=!0)}const v=[...i].sort((y,D)=>y.mark.atMs-D.mark.atMs||y.n-D.n).map(({n:y,mark:D})=>`[mark ${y}: ${D.label||D.kind}]`).join(`
4
4
  `);return{text:[o.join(" ").replace(/[^\S\n]+/g," ").trim(),v].filter(Boolean).join(`