@intent-hq/web 2.390.1 → 2.391.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 (326) hide show
  1. package/package.json +1 -1
  2. package/web/app/immutable/chunks/{caKZ9Z4U.js → -CpNnXIW.js} +1 -1
  3. package/web/app/immutable/chunks/{DRDYIFn4.js → 0R5VEpaM.js} +4 -4
  4. package/web/app/immutable/chunks/{Cp5royN1.js → 1-MeqddK.js} +1 -1
  5. package/web/app/immutable/chunks/{BYpep93f.js → 23FyIn6O.js} +1 -1
  6. package/web/app/immutable/chunks/{xfg66reS.js → 5az3n8fR.js} +1 -1
  7. package/web/app/immutable/chunks/{DCLLUF6K.js → 6JlgfFWd.js} +1 -1
  8. package/web/app/immutable/chunks/{BOmWUtDJ.js → 7-WRRruG.js} +1 -1
  9. package/web/app/immutable/chunks/{Cfr2GX8P.js → 9GL-RXJZ.js} +1 -1
  10. package/web/app/immutable/chunks/{DxyD9o0t.js → 9eqoPT_C.js} +1 -1
  11. package/web/app/immutable/chunks/{DvNAieWn.js → 9qqz3Jr0.js} +1 -1
  12. package/web/app/immutable/chunks/{D672CX3Y.js → Ao0jjYj2.js} +1 -1
  13. package/web/app/immutable/chunks/{_UjuBCOJ.js → B1lpukIv.js} +1 -1
  14. package/web/app/immutable/chunks/{CcJmuwXr.js → B26ZHg3s.js} +1 -1
  15. package/web/app/immutable/chunks/{CrpG0ldr.js → B28HQLvX.js} +1 -1
  16. package/web/app/immutable/chunks/{BIFBPuAO.js → B2Ny2uiy.js} +1 -1
  17. package/web/app/immutable/chunks/{DC_9qNLq.js → B2Q_FC4n.js} +3 -3
  18. package/web/app/immutable/chunks/{DfheqyY9.js → B2awO10u.js} +1 -1
  19. package/web/app/immutable/chunks/{C4jSaPCg.js → B3T1oiJl.js} +1 -1
  20. package/web/app/immutable/chunks/{BtmHyUSg.js → B4Yz29Q3.js} +1 -1
  21. package/web/app/immutable/chunks/{BxmKCIlL.js → B5-Plsom.js} +1 -1
  22. package/web/app/immutable/chunks/{CZfxrP3m.js → B6m0Dypi.js} +1 -1
  23. package/web/app/immutable/chunks/{BEP4JwDJ.js → B7hGbqIM.js} +1 -1
  24. package/web/app/immutable/chunks/{DxKtLuP2.js → B7hWIBzm.js} +1 -1
  25. package/web/app/immutable/chunks/{9YT9B_ti.js → B7pblHOt.js} +1 -1
  26. package/web/app/immutable/chunks/B9Nn4kQr.js +3 -0
  27. package/web/app/immutable/chunks/{CXP7dPfG.js → BAMJ8Hnj.js} +1 -1
  28. package/web/app/immutable/chunks/{DrA_ZV1y.js → BB2vaoZ2.js} +3 -3
  29. package/web/app/immutable/chunks/{BhiYNovM.js → BBcnUEuQ.js} +1 -1
  30. package/web/app/immutable/chunks/{CkmDctRH.js → BCLYeYwk.js} +1 -1
  31. package/web/app/immutable/chunks/{CLJCnlVH.js → BDeGl6ee.js} +1 -1
  32. package/web/app/immutable/chunks/{BPcIfv-A.js → BFHmbbvG.js} +2 -2
  33. package/web/app/immutable/chunks/{BbYWP3Ow.js → BFfRQORP.js} +1 -1
  34. package/web/app/immutable/chunks/{BrMDTgLg.js → BGeImWEk.js} +1 -1
  35. package/web/app/immutable/chunks/{BksTLNI4.js → BHgSQJqT.js} +1 -1
  36. package/web/app/immutable/chunks/{BJEoqPJ5.js → BJCm9MUD.js} +1 -1
  37. package/web/app/immutable/chunks/{BBPVt-9A.js → BKKCpqXK.js} +2 -2
  38. package/web/app/immutable/chunks/{CHW1UVsO.js → BLfqsc2a.js} +1 -1
  39. package/web/app/immutable/chunks/{Dc4V5sMu.js → BLtLj2yz.js} +1 -1
  40. package/web/app/immutable/chunks/{958SNXkw.js → BM2ubpAw.js} +1 -1
  41. package/web/app/immutable/chunks/{D36C5UHH.js → BM39k1x6.js} +1 -1
  42. package/web/app/immutable/chunks/{CjPEI4fg.js → BMTanQ2Z.js} +1 -1
  43. package/web/app/immutable/chunks/{BtNlG0Qg.js → BNYZa6GV.js} +1 -1
  44. package/web/app/immutable/chunks/{Cn4A9AjR.js → BOPrepKH.js} +1 -1
  45. package/web/app/immutable/chunks/{BB9aoG-e.js → BOVldAsb.js} +1 -1
  46. package/web/app/immutable/chunks/{BNs9wOFa.js → BQCtWEZ2.js} +1 -1
  47. package/web/app/immutable/chunks/{Dp8b1GoU.js → BRScUzfU.js} +1 -1
  48. package/web/app/immutable/chunks/{CgrVbtN0.js → BS9WBIBb.js} +1 -1
  49. package/web/app/immutable/chunks/{DuaPhBil.js → BSKVcPN7.js} +1 -1
  50. package/web/app/immutable/chunks/{s6kPQOkv.js → BSZu3BUb.js} +1 -1
  51. package/web/app/immutable/chunks/{D7b2VLAz.js → BT5iyspK.js} +1 -1
  52. package/web/app/immutable/chunks/{CJsEZbta.js → BT8mEFV6.js} +1 -1
  53. package/web/app/immutable/chunks/{DBAONTYG.js → BTXzEcFX.js} +2 -2
  54. package/web/app/immutable/chunks/{DZzwt3PA.js → BTvJ4T_4.js} +1 -1
  55. package/web/app/immutable/chunks/{aZdb_rCN.js → BU3y3Xes.js} +1 -1
  56. package/web/app/immutable/chunks/{BYpFXq6h.js → BU9me3Pg.js} +1 -1
  57. package/web/app/immutable/chunks/{DCs992HX.js → BUSErGiB.js} +1 -1
  58. package/web/app/immutable/chunks/{B557jpav.js → BVUW22uN.js} +1 -1
  59. package/web/app/immutable/chunks/{CXz-0Ag_.js → BVwQph9_.js} +1 -1
  60. package/web/app/immutable/chunks/{p1zR6qAw.js → BWQPB65O.js} +1 -1
  61. package/web/app/immutable/chunks/{DzDSM2LC.js → BXwdb0J5.js} +3 -3
  62. package/web/app/immutable/chunks/{BwH4Bvte.js → BZ27qIg1.js} +1 -1
  63. package/web/app/immutable/chunks/{C4iFTj8I.js → BZCcX8wj.js} +2 -2
  64. package/web/app/immutable/chunks/{CDwhmkPo.js → B_JGVEqN.js} +1 -1
  65. package/web/app/immutable/chunks/BaXq2aUL.js +411 -0
  66. package/web/app/immutable/chunks/{BNCKMxAC.js → Bb-kpHQF.js} +1 -1
  67. package/web/app/immutable/chunks/{BObTlShq.js → BcdTbj6d.js} +1 -1
  68. package/web/app/immutable/chunks/{k55njABd.js → BczcQRsN.js} +1 -1
  69. package/web/app/immutable/chunks/{B5N8LmEF.js → BdhKX9ZN.js} +1 -1
  70. package/web/app/immutable/chunks/Bheykcr9.js +1 -0
  71. package/web/app/immutable/chunks/{uvhZkGDU.js → Bhq56Jsu.js} +1 -1
  72. package/web/app/immutable/chunks/{Bviyt-Xy.js → Bhyo7hBL.js} +1 -1
  73. package/web/app/immutable/chunks/{DdNhEgdc.js → BjGqF2I6.js} +1 -1
  74. package/web/app/immutable/chunks/{BPQFiQQc.js → BkcCJyDK.js} +1 -1
  75. package/web/app/immutable/chunks/{Bq2Q6gce.js → BlzuDW6O.js} +1 -1
  76. package/web/app/immutable/chunks/{BqMJVUEP.js → BmaG8vdR.js} +1 -1
  77. package/web/app/immutable/chunks/{UTM5G-w-.js → BpezAJRw.js} +1 -1
  78. package/web/app/immutable/chunks/{Dcy1uNRG.js → Bpi8OSTE.js} +1 -1
  79. package/web/app/immutable/chunks/{goTVlBLf.js → BrL12o40.js} +1 -1
  80. package/web/app/immutable/chunks/{D8xPzBy1.js → BuyrOC4V.js} +1 -1
  81. package/web/app/immutable/chunks/{CfNIzRu8.js → Bx1P9uW7.js} +1 -1
  82. package/web/app/immutable/chunks/{BhCMc9G0.js → By2YlE-l.js} +1 -1
  83. package/web/app/immutable/chunks/{BB3L0Ahp.js → ByP-EusE.js} +1 -1
  84. package/web/app/immutable/chunks/{CSjV3uYy.js → Byobtdo1.js} +1 -1
  85. package/web/app/immutable/chunks/{CEE0831H.js → Bz80vYvX.js} +1 -1
  86. package/web/app/immutable/chunks/{pfX_M-aK.js → C-nTKxY9.js} +1 -1
  87. package/web/app/immutable/chunks/{CwxM4cLW.js → C00PRSTi.js} +1 -1
  88. package/web/app/immutable/chunks/{CiCk9_hF.js → C1MYTxgW.js} +1 -1
  89. package/web/app/immutable/chunks/{CVWwz1Ss.js → C22cBcHz.js} +1 -1
  90. package/web/app/immutable/chunks/{CpIiMADc.js → C2tSFTTb.js} +1 -1
  91. package/web/app/immutable/chunks/{D9CNxngf.js → C3JJkOFb.js} +1 -1
  92. package/web/app/immutable/chunks/{96V4v2iI.js → C3jMXj_V.js} +1 -1
  93. package/web/app/immutable/chunks/{DRND1Lha.js → C4l6men1.js} +1 -1
  94. package/web/app/immutable/chunks/{9mJbO8Tf.js → C5fxud9g.js} +1 -1
  95. package/web/app/immutable/chunks/{llldKyz-.js → C5tJUrGJ.js} +1 -1
  96. package/web/app/immutable/chunks/C8E14ldW.js +1 -0
  97. package/web/app/immutable/chunks/{mfOfLDEg.js → C9N7yhqm.js} +1 -1
  98. package/web/app/immutable/chunks/{CEpPVlB6.js → C9wxB2bb.js} +2 -2
  99. package/web/app/immutable/chunks/{CgwVRyOb.js → CA-b7pAY.js} +2 -2
  100. package/web/app/immutable/chunks/{BId1zNus.js → CAGrRNbp.js} +1 -1
  101. package/web/app/immutable/chunks/{BOVEEbKv.js → CAUJiTuz.js} +1 -1
  102. package/web/app/immutable/chunks/{CyBTM61A.js → CAUle5iU.js} +1 -1
  103. package/web/app/immutable/chunks/{BEQVnLdV.js → CCzPC_cB.js} +1 -1
  104. package/web/app/immutable/chunks/{BR1TNOav.js → CDUYzZ2W.js} +1 -1
  105. package/web/app/immutable/chunks/CDVPwJHE.js +1 -0
  106. package/web/app/immutable/chunks/{CiRuCsUo.js → CDh2mZdS.js} +1 -1
  107. package/web/app/immutable/chunks/{DpCic98X.js → CEA7jD1C.js} +1 -1
  108. package/web/app/immutable/chunks/{Dp7Hm0g0.js → CEyWnfg4.js} +1 -1
  109. package/web/app/immutable/chunks/{BwNrQXlF.js → CGmYraIa.js} +1 -1
  110. package/web/app/immutable/chunks/{yofTuS8P.js → CH6Im5iM.js} +1 -1
  111. package/web/app/immutable/chunks/{BBFoj-dS.js → CHIxjTWu.js} +1 -1
  112. package/web/app/immutable/chunks/{BQh5T3Ji.js → CHUYHKuh.js} +1 -1
  113. package/web/app/immutable/chunks/{DuiDS_zT.js → CIxnaBAb.js} +2 -2
  114. package/web/app/immutable/chunks/{UuRFnpzE.js → CK543FRe.js} +1 -1
  115. package/web/app/immutable/chunks/{D2YgP7DB.js → CKTB5KRw.js} +1 -1
  116. package/web/app/immutable/chunks/{M9xgh-VN.js → CLMwPQBQ.js} +1 -1
  117. package/web/app/immutable/chunks/{TyAuxp07.js → CLvqghA8.js} +1 -1
  118. package/web/app/immutable/chunks/{D9y3xvsP.js → COo5pTrI.js} +1 -1
  119. package/web/app/immutable/chunks/{DPttSllj.js → COofQgO0.js} +1 -1
  120. package/web/app/immutable/chunks/{Bub6uL1r.js → CPnqf2bo.js} +1 -1
  121. package/web/app/immutable/chunks/{Bcb_9iMJ.js → CR5XXYcE.js} +1 -1
  122. package/web/app/immutable/chunks/{Lai6pqjy.js → CREbzS7Z.js} +1 -1
  123. package/web/app/immutable/chunks/{DtXgUHCj.js → CRXlvdEs.js} +1 -1
  124. package/web/app/immutable/chunks/{TB9r2XJy.js → CT8vPg_p.js} +2 -2
  125. package/web/app/immutable/chunks/{hkJYqn41.js → CTgYTdXw.js} +1 -1
  126. package/web/app/immutable/chunks/{o0-ObNWE.js → CU15H7o_.js} +1 -1
  127. package/web/app/immutable/chunks/{C3dytrTL.js → CUZpLDKB.js} +1 -1
  128. package/web/app/immutable/chunks/{2q3SGbtI.js → CUgl7USU.js} +1 -1
  129. package/web/app/immutable/chunks/{DMrzeQEi.js → CV17KbhT.js} +1 -1
  130. package/web/app/immutable/chunks/{BbhtQrkZ.js → CVtLV3_x.js} +1 -1
  131. package/web/app/immutable/chunks/{etz9IKpr.js → CWXVdpgZ.js} +1 -1
  132. package/web/app/immutable/chunks/{BZYS48ON.js → CaX8Mme7.js} +1 -1
  133. package/web/app/immutable/chunks/{BNJ3edFz.js → CbB6SI0i.js} +1 -1
  134. package/web/app/immutable/chunks/{B1bJpz3G.js → Cd-qmx8U.js} +1 -1
  135. package/web/app/immutable/chunks/{zGyI6qOq.js → CdTSfppl.js} +1 -1
  136. package/web/app/immutable/chunks/{B6U9KgKY.js → CedswVQA.js} +1 -1
  137. package/web/app/immutable/chunks/{B6dUCFoz.js → CeoBhFo7.js} +1 -1
  138. package/web/app/immutable/chunks/{BJ_X8eP6.js → CfDqTHT1.js} +1 -1
  139. package/web/app/immutable/chunks/{CwEjDuJ3.js → Cgz4dZpP.js} +1 -1
  140. package/web/app/immutable/chunks/{BGniv2IE.js → ChYLETZB.js} +1 -1
  141. package/web/app/immutable/chunks/{vj8NdGWd.js → Chbrtg19.js} +1 -1
  142. package/web/app/immutable/chunks/{D54MIPdF.js → Ci6PI5sn.js} +1 -1
  143. package/web/app/immutable/chunks/{TBtn8giw.js → CiHhUIjb.js} +1 -1
  144. package/web/app/immutable/chunks/{B9vHutcJ.js → CiKoEJ2m.js} +1 -1
  145. package/web/app/immutable/chunks/{D8rVwrWL.js → CiRkFhK8.js} +1 -1
  146. package/web/app/immutable/chunks/{D4ytz2EC.js → CjpWOZGa.js} +1 -1
  147. package/web/app/immutable/chunks/{CfQcMKZg.js → CktgkomQ.js} +1 -1
  148. package/web/app/immutable/chunks/{D99jSct3.js → ClaP_sir.js} +1 -1
  149. package/web/app/immutable/chunks/{KZwZoyIt.js → Cn-Afla1.js} +1 -1
  150. package/web/app/immutable/chunks/{C3L0F6Xc.js → Cn4-Fvkn.js} +1 -1
  151. package/web/app/immutable/chunks/{z3SZgGAK.js → CnDgS0vt.js} +1 -1
  152. package/web/app/immutable/chunks/{B1CKzIA2.js → CnFZbWXv.js} +1 -1
  153. package/web/app/immutable/chunks/{GgbLp4i9.js → Cnkux63v.js} +1 -1
  154. package/web/app/immutable/chunks/{DrgHk1UN.js → CoSEZL3s.js} +1 -1
  155. package/web/app/immutable/chunks/{BB6LoQke.js → Cp-4w4r1.js} +1 -1
  156. package/web/app/immutable/chunks/{hk_M7mFx.js → CpwS8V1F.js} +1 -1
  157. package/web/app/immutable/chunks/{FXkLEPTk.js → Cq8_4net.js} +1 -1
  158. package/web/app/immutable/chunks/{C9_ZEBkB.js → Cr5mKkdD.js} +1 -1
  159. package/web/app/immutable/chunks/{VTkMkEPR.js → Cr9C4VDu.js} +1 -1
  160. package/web/app/immutable/chunks/{D7QZQ0zf.js → Crey45Oa.js} +1 -1
  161. package/web/app/immutable/chunks/{DJ9ILql1.js → Csqi0oV3.js} +1 -1
  162. package/web/app/immutable/chunks/CtfEuoOH.js +1 -0
  163. package/web/app/immutable/chunks/{ClxyT-Se.js → CwCvyVGi.js} +1 -1
  164. package/web/app/immutable/chunks/{iOLvSy8g.js → CwOdvmTo.js} +3 -3
  165. package/web/app/immutable/chunks/{BIU3Z0JX.js → CwqJ7uz4.js} +1 -1
  166. package/web/app/immutable/chunks/{Ctp-YfoS.js → CwqyVbqi.js} +3 -3
  167. package/web/app/immutable/chunks/{B_vpadVO.js → Cxc8q3rR.js} +1 -1
  168. package/web/app/immutable/chunks/{vpQRVk8F.js → Cxmepjfl.js} +1 -1
  169. package/web/app/immutable/chunks/{CzJm3Kxa.js → CyinuwPx.js} +1 -1
  170. package/web/app/immutable/chunks/{C4fj9uDh.js → CyvzL5p8.js} +3 -3
  171. package/web/app/immutable/chunks/{X0RLj3lE.js → CzxEKNiF.js} +1 -1
  172. package/web/app/immutable/chunks/{GnUYJfg_.js → D3JNbQ4D.js} +1 -1
  173. package/web/app/immutable/chunks/{TsuJPtsq.js → D3pRyooW.js} +1 -1
  174. package/web/app/immutable/chunks/{Dfp6ssYD.js → D3tqOSzT.js} +1 -1
  175. package/web/app/immutable/chunks/{Ch_2itxw.js → D49mWFig.js} +1 -1
  176. package/web/app/immutable/chunks/{CMdo0m6e.js → D59tCG3q.js} +2 -2
  177. package/web/app/immutable/chunks/{D8EcsS7V.js → D5Jk5CWk.js} +2 -2
  178. package/web/app/immutable/chunks/{BNu1GhJn.js → D5al-p9o.js} +1 -1
  179. package/web/app/immutable/chunks/{BzWT_wQw.js → D5tDAzIo.js} +1 -1
  180. package/web/app/immutable/chunks/{Jg5r77fy.js → D7QFmXLb.js} +1 -1
  181. package/web/app/immutable/chunks/{nxtepGjE.js → D9R5fzn8.js} +1 -1
  182. package/web/app/immutable/chunks/{pTmKTjdu.js → D9T_0Eev.js} +3 -3
  183. package/web/app/immutable/chunks/{DhSY0ZEq.js → DBYe3Dcp.js} +2 -2
  184. package/web/app/immutable/chunks/{Cio-rWcY.js → DDvFH8QS.js} +1 -1
  185. package/web/app/immutable/chunks/{BRaBCoIn.js → DE8II0cx.js} +1 -1
  186. package/web/app/immutable/chunks/{BVXKWrt4.js → DEr2A_-h.js} +2 -2
  187. package/web/app/immutable/chunks/{BT9lzXEu.js → DF15jnSX.js} +1 -1
  188. package/web/app/immutable/chunks/{CXEn_RGs.js → DF54qNJU.js} +1 -1
  189. package/web/app/immutable/chunks/{CIbfGsF-.js → DFKhOU69.js} +1 -1
  190. package/web/app/immutable/chunks/{BpMXdC4H.js → DG3-me8H.js} +1 -1
  191. package/web/app/immutable/chunks/{nIshZjK_.js → DGU9U1O6.js} +1 -1
  192. package/web/app/immutable/chunks/{Ll0WtNFW.js → DHkcvVzr.js} +1 -1
  193. package/web/app/immutable/chunks/{da_tvSiq.js → DHvVAxAW.js} +1 -1
  194. package/web/app/immutable/chunks/{tCg_s90g.js → DIIj7EWA.js} +1 -1
  195. package/web/app/immutable/chunks/{BI0SpAnv.js → DISm8kek.js} +1 -1
  196. package/web/app/immutable/chunks/{DZOkhMcO.js → DJSvqrCI.js} +1 -1
  197. package/web/app/immutable/chunks/{D0qNo7Oy.js → DJcR4XQR.js} +1 -1
  198. package/web/app/immutable/chunks/{BYHw69-J.js → DJqiMUht.js} +1 -1
  199. package/web/app/immutable/chunks/{i5FUlYpy.js → DLqZuVvj.js} +1 -1
  200. package/web/app/immutable/chunks/{KqqODIKw.js → DLt9OoMP.js} +1 -1
  201. package/web/app/immutable/chunks/{Cu5e4npY.js → DMEIbJII.js} +1 -1
  202. package/web/app/immutable/chunks/{BgXuXJpo.js → DMudvlKI.js} +4 -4
  203. package/web/app/immutable/chunks/{D1BvOU2l.js → DOhHP999.js} +1 -1
  204. package/web/app/immutable/chunks/{BniyCzQ9.js → DPk2fLxi.js} +1 -1
  205. package/web/app/immutable/chunks/{Dj-KLToz.js → DQNtbVVY.js} +3 -3
  206. package/web/app/immutable/chunks/{BnV9CBUH.js → DQpGArF7.js} +1 -1
  207. package/web/app/immutable/chunks/{OyqO3fO-.js → DR_b4dt8.js} +1 -1
  208. package/web/app/immutable/chunks/{R-UFG3MB.js → DRuLniWc.js} +1 -1
  209. package/web/app/immutable/chunks/{z5FcOXD5.js → DSZbBNDD.js} +1 -1
  210. package/web/app/immutable/chunks/{DFFA_QTd.js → DSs6r6NG.js} +1 -1
  211. package/web/app/immutable/chunks/{DtzJzV-4.js → DUTvR2si.js} +1 -1
  212. package/web/app/immutable/chunks/{D2YDfFKv.js → DW8fwVBf.js} +1 -1
  213. package/web/app/immutable/chunks/{CpTvA0xC.js → DWBUvNGh.js} +1 -1
  214. package/web/app/immutable/chunks/{MakwazGY.js → DWRtOXBU.js} +1 -1
  215. package/web/app/immutable/chunks/{u4iPyMwH.js → DXCHCOFX.js} +1 -1
  216. package/web/app/immutable/chunks/{Bq7odTLd.js → DXXFBdjF.js} +1 -1
  217. package/web/app/immutable/chunks/{Cn9MHQyc.js → D__sU8Ug.js} +1 -1
  218. package/web/app/immutable/chunks/{CvLVVi8w.js → DcPZfWKB.js} +1 -1
  219. package/web/app/immutable/chunks/{WoMkq5ac.js → DcU8bi_n.js} +2 -2
  220. package/web/app/immutable/chunks/{DaWmj23r.js → DcraaizU.js} +1 -1
  221. package/web/app/immutable/chunks/{C6RhewOE.js → Dd_KPYBw.js} +1 -1
  222. package/web/app/immutable/chunks/{BAAIhuts.js → DeFlL2nh.js} +1 -1
  223. package/web/app/immutable/chunks/{CWsj4Hb7.js → Dgo57zmq.js} +1 -1
  224. package/web/app/immutable/chunks/{C8tk9ZQ3.js → Dh-DCh2Y.js} +1 -1
  225. package/web/app/immutable/chunks/{CvorDgLi.js → Dh1j4V0b.js} +1 -1
  226. package/web/app/immutable/chunks/{29xygHrF.js → DhTLwmro.js} +1 -1
  227. package/web/app/immutable/chunks/{CkkpCaXs.js → Di3gErxh.js} +1 -1
  228. package/web/app/immutable/chunks/{WdSh5fl1.js → DidHgSQp.js} +2 -2
  229. package/web/app/immutable/chunks/{DogIXhAJ.js → Dk7Kxi97.js} +1 -1
  230. package/web/app/immutable/chunks/{BESb5QC3.js → Dl1AOLZu.js} +1 -1
  231. package/web/app/immutable/chunks/{CZr8f1ch.js → DlljGo_I.js} +1 -1
  232. package/web/app/immutable/chunks/{BOwgyiCF.js → DmQ5G_6J.js} +1 -1
  233. package/web/app/immutable/chunks/{7pl09QeT.js → DnzDw_9l.js} +1 -1
  234. package/web/app/immutable/chunks/{ByyFoG6W.js → DoB-G8kB.js} +1 -1
  235. package/web/app/immutable/chunks/{Dqi2LMpO.js → DoJ49Zrl.js} +1 -1
  236. package/web/app/immutable/chunks/{CFs3R4lt.js → DqtLBCnq.js} +1 -1
  237. package/web/app/immutable/chunks/{DpIgdPs7.js → Dr6-g-BO.js} +1 -1
  238. package/web/app/immutable/chunks/{Crz8kvLc.js → Drn9m8Tp.js} +1 -1
  239. package/web/app/immutable/chunks/{BWmW9W02.js → Dt_7lHy8.js} +1 -1
  240. package/web/app/immutable/chunks/{kjO__HeE.js → DuZtgB5V.js} +1 -1
  241. package/web/app/immutable/chunks/{xvadpoNC.js → DupTZXsI.js} +1 -1
  242. package/web/app/immutable/chunks/{Tt-VDGAY.js → DvUsJK3H.js} +1 -1
  243. package/web/app/immutable/chunks/{CbTbQhqy.js → DxmPtFKv.js} +1 -1
  244. package/web/app/immutable/chunks/{BFgvMDua.js → DynUeYUu.js} +1 -1
  245. package/web/app/immutable/chunks/{BjE6fvlI.js → DyreqWqr.js} +1 -1
  246. package/web/app/immutable/chunks/{vIaOEmEw.js → Em5CdgqH.js} +4 -4
  247. package/web/app/immutable/chunks/{DQ75EkSY.js → FM3MDwzB.js} +1 -1
  248. package/web/app/immutable/chunks/{B8lliwzm.js → GwtGeFMJ.js} +1 -1
  249. package/web/app/immutable/chunks/{DWH71rGR.js → HiIoMspb.js} +1 -1
  250. package/web/app/immutable/chunks/{Drl447ub.js → IxxdIKNN.js} +1 -1
  251. package/web/app/immutable/chunks/{DX2vfFPI.js → JiW1DfLK.js} +1 -1
  252. package/web/app/immutable/chunks/{DQw0Iiac.js → JvFe2B29.js} +1 -1
  253. package/web/app/immutable/chunks/{DmrchYzR.js → K0WiFC8Y.js} +1 -1
  254. package/web/app/immutable/chunks/{C3EKiijc.js → KWtYfwVq.js} +1 -1
  255. package/web/app/immutable/chunks/{CYxt6gzD.js → KaOLys0u.js} +1 -1
  256. package/web/app/immutable/chunks/{1rpeT4f8.js → OsJD3pkm.js} +1 -1
  257. package/web/app/immutable/chunks/{CfYmMj5F.js → P7zPRuFC.js} +1 -1
  258. package/web/app/immutable/chunks/{CqKjG3GQ.js → Q1bO23Hj.js} +1 -1
  259. package/web/app/immutable/chunks/{BRc67QBD.js → QeZhJHLb.js} +1 -1
  260. package/web/app/immutable/chunks/{BGrimfDs.js → QzxpbvSo.js} +1 -1
  261. package/web/app/immutable/chunks/{qhd9g-fv.js → RV6uszBL.js} +1 -1
  262. package/web/app/immutable/chunks/{LXflBOtX.js → S3jMTv3a.js} +1 -1
  263. package/web/app/immutable/chunks/{Bh9phZlQ.js → SdVpHK7d.js} +1 -1
  264. package/web/app/immutable/chunks/{l0vFyEGM.js → T9rMC0YB.js} +1 -1
  265. package/web/app/immutable/chunks/{D4d1iyeR.js → TPru2I57.js} +1 -1
  266. package/web/app/immutable/chunks/{Rzyk45bZ.js → WYNXUtt9.js} +1 -1
  267. package/web/app/immutable/chunks/{Chj-azz7.js → Xgzr3BTD.js} +1 -1
  268. package/web/app/immutable/chunks/{1B7vLvp_.js → YQwkPi_0.js} +1 -1
  269. package/web/app/immutable/chunks/{Cm0Qloca.js → ZX798KkU.js} +1 -1
  270. package/web/app/immutable/chunks/{Dd-LQrG1.js → aWBSU8IQ.js} +1 -1
  271. package/web/app/immutable/chunks/{CgGsxeG7.js → axwUS21u.js} +1 -1
  272. package/web/app/immutable/chunks/{F__rjLBg.js → bJK6npyT.js} +1 -1
  273. package/web/app/immutable/chunks/{iXPhOXJa.js → fCtMtGYt.js} +1 -1
  274. package/web/app/immutable/chunks/{C-HR_nje.js → g5QqP-QE.js} +1 -1
  275. package/web/app/immutable/chunks/{BTaBiqZj.js → gQ8VFuWN.js} +2 -2
  276. package/web/app/immutable/chunks/{C2UL5Ler.js → iQDlfKDR.js} +1 -1
  277. package/web/app/immutable/chunks/jlu1ZSD8.js +1 -0
  278. package/web/app/immutable/chunks/{CnN8HXjd.js → jyQWudgn.js} +1 -1
  279. package/web/app/immutable/chunks/{BWfc0sSK.js → k48f0Jn8.js} +1 -1
  280. package/web/app/immutable/chunks/{BiYZcl7D.js → kkKMJ9w9.js} +1 -1
  281. package/web/app/immutable/chunks/{BHy9cRzo.js → l7sDKa65.js} +1 -1
  282. package/web/app/immutable/chunks/{D7AN7xLp.js → mFWmuyR-.js} +1 -1
  283. package/web/app/immutable/chunks/{CdGOAvU7.js → n0_jgWL7.js} +1 -1
  284. package/web/app/immutable/chunks/{IXIWcEcs.js → pXrAh3i2.js} +1 -1
  285. package/web/app/immutable/chunks/{DWF5uerC.js → qWgJ-CUF.js} +2 -2
  286. package/web/app/immutable/chunks/{BsY6roFy.js → rwibDzZr.js} +1 -1
  287. package/web/app/immutable/chunks/{BtmBRuf6.js → sFief-xo.js} +1 -1
  288. package/web/app/immutable/chunks/{D6txwX4Y.js → uyQciu7h.js} +4 -4
  289. package/web/app/immutable/chunks/{Bw9XtMey.js → z0xDttNV.js} +3 -3
  290. package/web/app/immutable/chunks/{CZ9ViN3z.js → z4O7yNZ6.js} +1 -1
  291. package/web/app/immutable/chunks/zXLHCuiE.js +1 -0
  292. package/web/app/immutable/entry/{app.qraxYAYk.js → app.B0HiWR5T.js} +3 -3
  293. package/web/app/immutable/entry/start.BFcXwo9Y.js +1 -0
  294. package/web/app/immutable/nodes/{0.DJcM2RkQ.js → 0.5oa9JC3V.js} +1 -1
  295. package/web/app/immutable/nodes/{1.Jq1-N2Pd.js → 1.dLY473QL.js} +1 -1
  296. package/web/app/immutable/nodes/{10.C_zzc0gt.js → 10.Dg3iEVmH.js} +6 -6
  297. package/web/app/immutable/nodes/{11.6gj6bfPq.js → 11.PFTrUEsb.js} +1 -1
  298. package/web/app/immutable/nodes/{12.Dwdqbt9T.js → 12.DUMat2GN.js} +1 -1
  299. package/web/app/immutable/nodes/{13.jK1i4wo4.js → 13.BEiznOPk.js} +1 -1
  300. package/web/app/immutable/nodes/{14.DdHtnE9x.js → 14.DFolVj6c.js} +3 -3
  301. package/web/app/immutable/nodes/{15.DzaMQCp_.js → 15.CGEsAjgd.js} +1 -1
  302. package/web/app/immutable/nodes/{16.DFPLVaTv.js → 16.cptOJ-f9.js} +1 -1
  303. package/web/app/immutable/nodes/{17.Dylz7DBe.js → 17.BVn1LtfR.js} +1 -1
  304. package/web/app/immutable/nodes/{18.CxblUMg0.js → 18.BLC8YWHJ.js} +1 -1
  305. package/web/app/immutable/nodes/{19.cFDk8lfW.js → 19.CqJycQsd.js} +2 -2
  306. package/web/app/immutable/nodes/{2.ByMlaGl6.js → 2.BaR1WF3o.js} +4 -4
  307. package/web/app/immutable/nodes/{20.CXw8Twm7.js → 20.g9As4rvG.js} +1 -1
  308. package/web/app/immutable/nodes/{3.9JGSdcGo.js → 3.DwF_25Xt.js} +1 -1
  309. package/web/app/immutable/nodes/{4.CBjeaWO7.js → 4.ttOSy2Tq.js} +1 -1
  310. package/web/app/immutable/nodes/{5.rzCmecJm.js → 5.BVpoghsD.js} +1 -1
  311. package/web/app/immutable/nodes/{6.ltNDZwKc.js → 6.D6pOrTxH.js} +1 -1
  312. package/web/app/immutable/nodes/{7.KOkYCHHg.js → 7.BO56ByN2.js} +1 -1
  313. package/web/app/immutable/nodes/{8.DAi8MaAi.js → 8.CPtVgnSI.js} +1 -1
  314. package/web/app/immutable/nodes/{9.BzVFDUkR.js → 9.cl9L6J-I.js} +5 -5
  315. package/web/app/version.json +1 -1
  316. package/web/generated/paraglide.js +45 -45
  317. package/web/index.html +18 -18
  318. package/web/app/immutable/chunks/C8rJ090F.js +0 -1
  319. package/web/app/immutable/chunks/CL3wj1V-.js +0 -1
  320. package/web/app/immutable/chunks/CLAmm_T1.js +0 -1
  321. package/web/app/immutable/chunks/CRSiOiSR.js +0 -1
  322. package/web/app/immutable/chunks/DFh0CfhB.js +0 -1
  323. package/web/app/immutable/chunks/DmapvbAr.js +0 -3
  324. package/web/app/immutable/chunks/KnkAG0HD.js +0 -1
  325. package/web/app/immutable/chunks/fAzcgPHK.js +0 -411
  326. package/web/app/immutable/entry/start.BWAelo_H.js +0 -1
@@ -1 +1 @@
1
- import"./3SdAC2_C.js";import{p as De}from"./B1CKzIA2.js";import"./CcJmuwXr.js";import{j as Oe,k as we,c as We,l as ke}from"./CfNIzRu8.js";import{s as qe}from"./DBAONTYG.js";import{i as _e}from"./Bu13V5mO.js";function Ze(t,i={}){const l=(i.axis??"y")==="y"?"height":"width",o=parseFloat(getComputedStyle(t)[l]);if(!Number.isFinite(o))return{duration:0};const v=i.duration??160,y=v<=80?"fast":v<=160?"moderate":"slow";return Oe(t,{axis:i.axis,tier:y},{direction:"in"})}function $e(){return qe.get("enableComponentTransitions")}const Ae={request(){},settle(){}},O=new WeakMap,He=2,ze=2e3,re=2,Pe=1e3,Ve=3e3;function et(t,i){let l=i.enabled??!0,o=i.follow,v=i.onFollowChange,y=i.onScrollStateChange,T=i.threshold??100,w=!1,h=null,u=null,m=null,x=null,d=null,b=null,M=null,F=null,S=0,R=null,g=!1,$=null;const L=new Set,W=new Map,P=new WeakSet,k=new Map,A=document.createElement("div");A.dataset.followBottomAnchor="",A.setAttribute("aria-hidden","true"),A.style.cssText=`height:1px;${i.layoutNeutralBottomAnchor?"margin-top:-1px;":""}overflow-anchor:auto;pointer-events:none;flex:0 0 auto;`;function G(e){e===A||k.has(e)||(k.set(e,e.style.overflowAnchor),e.style.overflowAnchor="none")}function V(e){const n=k.get(e);n!==void 0&&(e.style.overflowAnchor=n,k.delete(e))}function I(e){if(e)for(const r of t.children)r instanceof HTMLElement&&G(r);else for(const r of k.keys())V(r);const n=e?"auto":"none";A.style.overflowAnchor!==n&&(A.style.overflowAnchor=n),e?(A.parentElement!==t||A.nextSibling)&&t.append(A):A.remove()}function H(){I(o)}function C(){A.remove();for(const e of k.keys())V(e)}function Y(e){P.add(e),x?.observe(e)}function j(){d!==null&&cancelAnimationFrame(d),F!==null&&cancelAnimationFrame(F),d=null,F=null,S=0,R=null}function c(){return Math.max(0,t.scrollHeight-t.clientHeight)}function D(){return $??=getComputedStyle(t).overflowAnchor!=="none",$}function q(){const e=c(),n=t.scrollTop,r=h??void 0;h={maximum:e,scrollTop:n};const f={maximum:e,scrollTop:n,previous:r};return p.observe(f),f}function U(e=q()){return e.scrollTop!==e.maximum&&(t.scrollTop=e.maximum),h={maximum:e.maximum,scrollTop:e.maximum},{maximum:e.maximum,scrollTop:e.maximum}}function N(e=q()){const n=Math.max(0,e.maximum-e.scrollTop),r=n<=T;u?.distanceFromBottom===n&&u.isAtBottom===r&&u.isFollowing===o||(u={distanceFromBottom:n,isAtBottom:r,isFollowing:o},y?.({distanceFromBottom:n,isAtBottom:r,isFollowing:o}))}function _(e,n=!0){if(p.cancel(),!l){o=e;return}const r=o!==e;r&&(o=e,I(e)),r&&n&&v?.(e),e||j(),N()}function ee(e,n=!0){if(!L.delete(e))return;const r=(W.get(e.element)??1)-1;r>0?W.set(e.element,r):(W.delete(e.element),P.has(e.element)||x?.unobserve?.(e.element)),S=0,n&&X()}function te(e=!0){if(L.size===0)return;const n=performance.now();for(const r of L)(!t.contains(r.element)||n>=r.expiresAt)&&ee(r,e)}function oe(){if(d=null,g||!l||!o)return;if(te(!1),L.size>0){d=requestAnimationFrame(oe);return}const e=U(),{maximum:n}=e;N(e),n===R?S+=1:(S=0,R=n),S<He&&(d=requestAnimationFrame(oe))}function X(){g||!l||!o||d!==null||(d=requestAnimationFrame(oe))}function z(e=!0){if(g||!l||!o)return;const n=U(),{maximum:r}=n;N(n),S=0,R=r,e&&X()}function ne(){M===null&&(M=requestAnimationFrame(()=>{M=null,!(g||!l)&&N()}))}function Te(){if(F=null,g||!l)return;let e=q();const n=e.scrollTop!==e.maximum;e=U(e),(n||e.maximum!==R||L.size>0)&&(S=0,R=e.maximum,X()),N(e)}function Fe(){if(!(g||!l)){if(o){if(d!==null||F!==null)return;F=requestAnimationFrame(Te);return}ne()}}function Se(){if(!(g||!l)){if(o){z(F===null);return}ne()}}const K={followAndScroll(){_(!0),z()},isFollowing:()=>o,isNativeScrollAnchoringActive:()=>!o&&getComputedStyle(t).overflowAnchor!=="none",hasActiveMutation:()=>o?(te(),L.size>0):!1,beforeMutation(e,n){if(g||!l||!o)return Ae;const r={element:e,expiresAt:performance.now()+(n.maxHoldMs??ze)};L.add(r);const f=W.get(e)??0;return W.set(e,f+1),f===0&&!P.has(e)&&x?.observe(e),S=0,X(),{request(){!L.has(r)||g||(D()?X():z())},settle(){if(!(g||!L.has(r))){if(D()){ee(r);return}ee(r,!1),z()}}}}};function Le(){let e=null,n=null,r=null,f;function Q(s){return!e||s&&e.wheel!==s?!1:!e.wheel?.defaultPrevented&&performance.now()<e.expiresAt}function Me(s,a){if(s.maximum-s.scrollTop<=re)return!0;const B=s.previous;return a&&B!==void 0&&B.maximum<s.maximum&&B.maximum-s.scrollTop<=re}function Z(s,a){return Me(s,a)?(K.followAndScroll(),!0):!1}function ge(s){const a=q();return Q(s)&&Z(a,!0)}function Re(s){f=s,r===null&&(r=requestAnimationFrame(()=>{r=null;const a=f;f=void 0,!(g||!l||!Q(a))&&(ge(a)||N())}))}function Ne(s,a){const B=Math.max(0,a.maximum-a.scrollTop);if(a.maximum!==s.maximum)return s.maximum=a.maximum,s.distance=B,s.movedTowardBottom=!1,!1;const ve=B-s.distance;return s.distance=B,ve>0?(s.movedTowardBottom=!1,_(!1),!0):ve===0?!1:(s.movedTowardBottom=!0,Z(a,!1))}function Ce(s){if(o||!e)return!1;const a=s.previous;return a&&s.scrollTop<a.scrollTop?(e=null,!1):(!a||s.scrollTop>a.scrollTop)&&Q()&&Z(s,!0)}return{isDragging:()=>n!==null,start(s,a){const B=s==="touch"?Ve:Pe;e={wheel:a,expiresAt:performance.now()+B}},grab(s){if(e=null,!s){n=null;return}const a=c();n={maximum:a,distance:Math.max(0,a-t.scrollTop),movedTowardBottom:!1}},move(s){return n?Ne(n,s):Ce(s)},land(s,a){if(s==="frame"){Re(a);return}if(s==="scrollend"){Q()&&ge(),e=null;return}if(!n)return;const{movedTowardBottom:B}=n;n=null,B&&Z(q(),!1)||N()},observe(s){const a=s.previous;e&&a!==void 0&&s.maximum<a.maximum&&s.maximum-s.scrollTop<=re&&(e=null)},cancel(){e=null},requestBottom(){K.followAndScroll()},reset(){e=null,n=null,f=void 0,r!==null&&cancelAnimationFrame(r),r=null}}}const p=Le();function ie(e){e.deltaY<0?_(!1):e.deltaY>0&&(p.start("wheel",e),p.land("frame",e))}function le(e){e.target===t?p.land("scrollend"):p.cancel()}let se=0;function ae(e){p.cancel(),w=!1,se=e.touches[0]?.clientY??0}function ue(e){const n=e.touches[0]?.clientY??0,r=se-n;w=r>0,r<0&&_(!1)}function ce(){w&&p.start("touch"),p.land("frame")}function fe(e){if(p.cancel(),["ArrowUp","PageUp","Home"].includes(e.key))_(!1);else if(["ArrowDown","PageDown","End"].includes(e.key)){if(e.target instanceof Element&&_e(e.target))return;if(e.key==="End"){p.requestBottom();return}p.start("keyboard"),p.land("frame")}}function Be(e){if(e.button!==0||e.target!==t)return!1;const n=Math.max(0,t.offsetWidth-t.clientWidth);if(n===0)return!1;const r=t.getBoundingClientRect(),f=t.offsetWidth>0?n*(r.width/t.offsetWidth):n;return getComputedStyle(t).direction==="rtl"?e.clientX<=r.left+f:e.clientX>=r.right-f}function me(){const e=p.isDragging();if(!e&&o&&d!==null)return;let n=q();p.move(n)||(o&&!e&&(n=U(n)),N(n))}function de(e){p.grab(Be(e))}function J(){p.land("release")}function Ee(){if(!m){m=new MutationObserver(e=>{let n=!1;for(const r of e)if(r.type==="childList"){for(const f of r.removedNodes)n=!0,f instanceof HTMLElement&&V(f);for(const f of r.addedNodes)f instanceof HTMLElement&&f!==A&&x&&(Y(f),o&&f.parentElement===t&&G(f))}n&&te(),I(o),Fe()}),m.observe(t,{attributes:!0,childList:!0,subtree:!0,characterData:!0}),x=new ResizeObserver(Se),Y(t);for(const e of t.children)e instanceof HTMLElement&&e!==A&&Y(e)}}function be(){m?.disconnect(),m=null,x?.disconnect(),x=null}function pe(e=!1){if(!l||g)return;if(O.set(t,K),t.addEventListener("scroll",me,{passive:!0}),t.addEventListener("scrollend",le,{passive:!0,capture:!0}),t.addEventListener("wheel",ie,{passive:!0}),t.addEventListener("touchstart",ae,{passive:!0}),t.addEventListener("touchmove",ue,{passive:!0}),t.addEventListener("touchend",ce,{passive:!0}),t.addEventListener("keydown",fe),t.addEventListener("pointerdown",de,{passive:!0}),window.addEventListener("pointerup",J,{passive:!0}),window.addEventListener("pointercancel",J,{passive:!0}),H(),Ee(),e){b=requestAnimationFrame(()=>{b=null,!(g||!l)&&(D(),o?z():N())});return}D();let n=q();o&&(n=U(n),R=n.maximum),N(n)}function he(){p.reset(),w=!1,h=null,L.clear(),W.clear(),j(),b!==null&&cancelAnimationFrame(b),b=null,M!==null&&cancelAnimationFrame(M),M=null,u=null,$=null,O.get(t)===K&&O.delete(t),be(),C(),t.removeEventListener("scroll",me),t.removeEventListener("scrollend",le,!0),t.removeEventListener("wheel",ie),t.removeEventListener("touchstart",ae),t.removeEventListener("touchmove",ue),t.removeEventListener("touchend",ce),t.removeEventListener("keydown",fe),t.removeEventListener("pointerdown",de),window.removeEventListener("pointerup",J),window.removeEventListener("pointercancel",J)}return pe(!0),{update(e){v=e.onFollowChange,y=e.onScrollStateChange,T=e.threshold??100;const n=e.enabled??!0;if(l!==n&&(n||he(),l=n,l)){o=e.follow,pe(!0);return}l?e.follow&&!o?(_(!0,!1),z()):!e.follow&&o?_(!1,!1):b===null&&ne():o=e.follow},destroy(){g=!0,he()}}}function tt(t){return O.get(t)?.isFollowing()??!1}function ot(t){return O.get(t)?.isNativeScrollAnchoringActive()??!1}function nt(t){return O.get(t)?.hasActiveMutation()??!1}function xe(t,i={}){let l=t;for(;l;){const o=O.get(l);if(o)return o.beforeMutation(t,i);l=l.parentElement}return Ae}function Ie(t){const{scrollTop:i,scrollHeight:l,clientHeight:o}=t;return l-i-o}function Ye(t,i=100){return Ie(t)<=i}function Ue(t,i=!1){t.scrollTo({top:t.scrollHeight,behavior:i?"smooth":"auto"})}function rt(t){const i=O.get(t);if(i){i.followAndScroll();return}Ue(t)}function it(t,i,l=150,o){const v=t();if(!v)return;const y=v.scrollTop,T=performance.now();function w(u){return 1-Math.pow(1-u,3)}function h(u){const m=t();if(!m)return;const x=u-T,d=Math.min(x/l,1),b=typeof i=="function"?i(m):i;m.scrollTop=y+(b-y)*w(d),d<1?requestAnimationFrame(h):o?.(m)}requestAnimationFrame(h)}function lt(t,i="[data-message-id], [data-lazy-turn-key]"){const l=t.scrollTop,o=t.getBoundingClientRect(),v=Ye(t,100);if(v&&O.get(t)?.isFollowing()!==!1)return{element:null,offsetFromViewport:0,scrollTop:l,isNearBottom:v};const y=t.querySelectorAll(i);let T=null,w=0,h;for(const u of y){const m=u.getBoundingClientRect();if(m.top>=o.bottom)break;if(m.top>=o.top){T||(T=u,w=m.top-o.top);const x=u.getAttribute("data-message-id");if(x){h={id:x,offsetFromViewport:m.top-o.top};break}}}return{element:T,offsetFromViewport:w,scrollTop:l,isNearBottom:v,...h?{message:h}:{}}}function ye(t,i){if(i.message){const l=t.querySelector(`[data-message-id="${CSS.escape(i.message.id)}"]`);if(l)return{element:l,offsetFromViewport:i.message.offsetFromViewport}}return i.element?.isConnected?{element:i.element,offsetFromViewport:i.offsetFromViewport}:null}function st(t,i){return ye(t,i)!==null}function at(t,i){const l=ye(t,i);if(l){const{element:o,offsetFromViewport:v}=l,y=t.getBoundingClientRect(),h=o.getBoundingClientRect().top-y.top-v;Math.abs(h)>5&&(t.scrollTop+=h)}}function E(t,i){const l=Number.parseFloat(String(t[i]));return Number.isFinite(l)?l:0}function ut(t,i={},l={}){const o=t,y={maxHoldMs:we[i.tier??"moderate"].settleMs*2+500};let T=xe(o,y);const w=()=>{T?.settle(),T=null},h=()=>{T??=xe(o,y)};if(!$e()||De())return w(),{duration:0};const u=getComputedStyle(o),m=i.axis??"y",x=o.getBoundingClientRect(),d=m==="y"?E(u,"height")||x.height:E(u,"width")||x.width;if(!Number.isFinite(d)||d<=0)return w(),{duration:0};const b=E(u,"opacity")||1,M=i.tier??"moderate",F=we[M],S=l.direction==="out",R=typeof u.getPropertyValue=="function"?S?We(o,{tier:M}):ke(o,{tier:M}):{duration:S?F.exit.duration:F.settleMs,easing:F.exit.easing},g=R.duration??(S?F.exit.duration:F.settleMs),$=i.y??-4,L=E(u,"paddingTop"),W=E(u,"paddingBottom"),P=E(u,"marginTop"),k=E(u,"marginBottom"),A=E(u,"paddingLeft"),G=E(u,"paddingRight"),V=E(u,"marginLeft"),I=E(u,"marginRight");let H=null,C=l.direction==="out"?"outro":l.direction==="in"?"intro":"idle";const Y=(c,D)=>{o.style.overflow="hidden",m==="y"?(o.style.height=`${c*d}px`,o.style.paddingTop=`${c*L}px`,o.style.paddingBottom=`${c*W}px`,o.style.marginTop=`${c*P}px`,o.style.marginBottom=`${c*k}px`):(o.style.width=`${c*d}px`,o.style.paddingLeft=`${c*A}px`,o.style.paddingRight=`${c*G}px`,o.style.marginLeft=`${c*V}px`,o.style.marginRight=`${c*I}px`),o.style.opacity=`${c*b}`,o.style.transform=m==="y"?`translateY(${$*D}px)`:`translateX(${$*D}px)`},j=()=>{o.style.overflow="",o.style.height="",o.style.width="",o.style.paddingTop="",o.style.paddingBottom="",o.style.marginTop="",o.style.marginBottom="",o.style.paddingLeft="",o.style.paddingRight="",o.style.marginLeft="",o.style.marginRight="",o.style.opacity="",o.style.transform=""};return{duration:g,easing:R.easing,tick:(c,D)=>{if(l.direction==="both"&&(H===null?c<1&&(C="outro"):c<H?(h(),C="outro"):c>H&&(h(),C="intro")),H=c,c===1&&C!=="outro"){j(),w(),C="idle";return}Y(c,D),T?.request(),c===0&&C==="outro"&&(w(),C="idle")}}}export{it as a,$e as b,xe as c,st as d,lt as e,et as f,rt as g,nt as h,tt as i,ot as j,Ze as k,Ue as l,at as r,ut as s};
1
+ import"./3SdAC2_C.js";import{p as De}from"./CnFZbWXv.js";import"./B26ZHg3s.js";import{j as Oe,k as we,c as We,l as ke}from"./Bx1P9uW7.js";import{s as qe}from"./BTXzEcFX.js";import{i as _e}from"./Bu13V5mO.js";function Ze(t,i={}){const l=(i.axis??"y")==="y"?"height":"width",o=parseFloat(getComputedStyle(t)[l]);if(!Number.isFinite(o))return{duration:0};const v=i.duration??160,y=v<=80?"fast":v<=160?"moderate":"slow";return Oe(t,{axis:i.axis,tier:y},{direction:"in"})}function $e(){return qe.get("enableComponentTransitions")}const Ae={request(){},settle(){}},O=new WeakMap,He=2,ze=2e3,re=2,Pe=1e3,Ve=3e3;function et(t,i){let l=i.enabled??!0,o=i.follow,v=i.onFollowChange,y=i.onScrollStateChange,T=i.threshold??100,w=!1,h=null,u=null,m=null,x=null,d=null,b=null,M=null,F=null,S=0,R=null,g=!1,$=null;const L=new Set,W=new Map,P=new WeakSet,k=new Map,A=document.createElement("div");A.dataset.followBottomAnchor="",A.setAttribute("aria-hidden","true"),A.style.cssText=`height:1px;${i.layoutNeutralBottomAnchor?"margin-top:-1px;":""}overflow-anchor:auto;pointer-events:none;flex:0 0 auto;`;function G(e){e===A||k.has(e)||(k.set(e,e.style.overflowAnchor),e.style.overflowAnchor="none")}function V(e){const n=k.get(e);n!==void 0&&(e.style.overflowAnchor=n,k.delete(e))}function I(e){if(e)for(const r of t.children)r instanceof HTMLElement&&G(r);else for(const r of k.keys())V(r);const n=e?"auto":"none";A.style.overflowAnchor!==n&&(A.style.overflowAnchor=n),e?(A.parentElement!==t||A.nextSibling)&&t.append(A):A.remove()}function H(){I(o)}function C(){A.remove();for(const e of k.keys())V(e)}function Y(e){P.add(e),x?.observe(e)}function j(){d!==null&&cancelAnimationFrame(d),F!==null&&cancelAnimationFrame(F),d=null,F=null,S=0,R=null}function c(){return Math.max(0,t.scrollHeight-t.clientHeight)}function D(){return $??=getComputedStyle(t).overflowAnchor!=="none",$}function q(){const e=c(),n=t.scrollTop,r=h??void 0;h={maximum:e,scrollTop:n};const f={maximum:e,scrollTop:n,previous:r};return p.observe(f),f}function U(e=q()){return e.scrollTop!==e.maximum&&(t.scrollTop=e.maximum),h={maximum:e.maximum,scrollTop:e.maximum},{maximum:e.maximum,scrollTop:e.maximum}}function N(e=q()){const n=Math.max(0,e.maximum-e.scrollTop),r=n<=T;u?.distanceFromBottom===n&&u.isAtBottom===r&&u.isFollowing===o||(u={distanceFromBottom:n,isAtBottom:r,isFollowing:o},y?.({distanceFromBottom:n,isAtBottom:r,isFollowing:o}))}function _(e,n=!0){if(p.cancel(),!l){o=e;return}const r=o!==e;r&&(o=e,I(e)),r&&n&&v?.(e),e||j(),N()}function ee(e,n=!0){if(!L.delete(e))return;const r=(W.get(e.element)??1)-1;r>0?W.set(e.element,r):(W.delete(e.element),P.has(e.element)||x?.unobserve?.(e.element)),S=0,n&&X()}function te(e=!0){if(L.size===0)return;const n=performance.now();for(const r of L)(!t.contains(r.element)||n>=r.expiresAt)&&ee(r,e)}function oe(){if(d=null,g||!l||!o)return;if(te(!1),L.size>0){d=requestAnimationFrame(oe);return}const e=U(),{maximum:n}=e;N(e),n===R?S+=1:(S=0,R=n),S<He&&(d=requestAnimationFrame(oe))}function X(){g||!l||!o||d!==null||(d=requestAnimationFrame(oe))}function z(e=!0){if(g||!l||!o)return;const n=U(),{maximum:r}=n;N(n),S=0,R=r,e&&X()}function ne(){M===null&&(M=requestAnimationFrame(()=>{M=null,!(g||!l)&&N()}))}function Te(){if(F=null,g||!l)return;let e=q();const n=e.scrollTop!==e.maximum;e=U(e),(n||e.maximum!==R||L.size>0)&&(S=0,R=e.maximum,X()),N(e)}function Fe(){if(!(g||!l)){if(o){if(d!==null||F!==null)return;F=requestAnimationFrame(Te);return}ne()}}function Se(){if(!(g||!l)){if(o){z(F===null);return}ne()}}const K={followAndScroll(){_(!0),z()},isFollowing:()=>o,isNativeScrollAnchoringActive:()=>!o&&getComputedStyle(t).overflowAnchor!=="none",hasActiveMutation:()=>o?(te(),L.size>0):!1,beforeMutation(e,n){if(g||!l||!o)return Ae;const r={element:e,expiresAt:performance.now()+(n.maxHoldMs??ze)};L.add(r);const f=W.get(e)??0;return W.set(e,f+1),f===0&&!P.has(e)&&x?.observe(e),S=0,X(),{request(){!L.has(r)||g||(D()?X():z())},settle(){if(!(g||!L.has(r))){if(D()){ee(r);return}ee(r,!1),z()}}}}};function Le(){let e=null,n=null,r=null,f;function Q(s){return!e||s&&e.wheel!==s?!1:!e.wheel?.defaultPrevented&&performance.now()<e.expiresAt}function Me(s,a){if(s.maximum-s.scrollTop<=re)return!0;const B=s.previous;return a&&B!==void 0&&B.maximum<s.maximum&&B.maximum-s.scrollTop<=re}function Z(s,a){return Me(s,a)?(K.followAndScroll(),!0):!1}function ge(s){const a=q();return Q(s)&&Z(a,!0)}function Re(s){f=s,r===null&&(r=requestAnimationFrame(()=>{r=null;const a=f;f=void 0,!(g||!l||!Q(a))&&(ge(a)||N())}))}function Ne(s,a){const B=Math.max(0,a.maximum-a.scrollTop);if(a.maximum!==s.maximum)return s.maximum=a.maximum,s.distance=B,s.movedTowardBottom=!1,!1;const ve=B-s.distance;return s.distance=B,ve>0?(s.movedTowardBottom=!1,_(!1),!0):ve===0?!1:(s.movedTowardBottom=!0,Z(a,!1))}function Ce(s){if(o||!e)return!1;const a=s.previous;return a&&s.scrollTop<a.scrollTop?(e=null,!1):(!a||s.scrollTop>a.scrollTop)&&Q()&&Z(s,!0)}return{isDragging:()=>n!==null,start(s,a){const B=s==="touch"?Ve:Pe;e={wheel:a,expiresAt:performance.now()+B}},grab(s){if(e=null,!s){n=null;return}const a=c();n={maximum:a,distance:Math.max(0,a-t.scrollTop),movedTowardBottom:!1}},move(s){return n?Ne(n,s):Ce(s)},land(s,a){if(s==="frame"){Re(a);return}if(s==="scrollend"){Q()&&ge(),e=null;return}if(!n)return;const{movedTowardBottom:B}=n;n=null,B&&Z(q(),!1)||N()},observe(s){const a=s.previous;e&&a!==void 0&&s.maximum<a.maximum&&s.maximum-s.scrollTop<=re&&(e=null)},cancel(){e=null},requestBottom(){K.followAndScroll()},reset(){e=null,n=null,f=void 0,r!==null&&cancelAnimationFrame(r),r=null}}}const p=Le();function ie(e){e.deltaY<0?_(!1):e.deltaY>0&&(p.start("wheel",e),p.land("frame",e))}function le(e){e.target===t?p.land("scrollend"):p.cancel()}let se=0;function ae(e){p.cancel(),w=!1,se=e.touches[0]?.clientY??0}function ue(e){const n=e.touches[0]?.clientY??0,r=se-n;w=r>0,r<0&&_(!1)}function ce(){w&&p.start("touch"),p.land("frame")}function fe(e){if(p.cancel(),["ArrowUp","PageUp","Home"].includes(e.key))_(!1);else if(["ArrowDown","PageDown","End"].includes(e.key)){if(e.target instanceof Element&&_e(e.target))return;if(e.key==="End"){p.requestBottom();return}p.start("keyboard"),p.land("frame")}}function Be(e){if(e.button!==0||e.target!==t)return!1;const n=Math.max(0,t.offsetWidth-t.clientWidth);if(n===0)return!1;const r=t.getBoundingClientRect(),f=t.offsetWidth>0?n*(r.width/t.offsetWidth):n;return getComputedStyle(t).direction==="rtl"?e.clientX<=r.left+f:e.clientX>=r.right-f}function me(){const e=p.isDragging();if(!e&&o&&d!==null)return;let n=q();p.move(n)||(o&&!e&&(n=U(n)),N(n))}function de(e){p.grab(Be(e))}function J(){p.land("release")}function Ee(){if(!m){m=new MutationObserver(e=>{let n=!1;for(const r of e)if(r.type==="childList"){for(const f of r.removedNodes)n=!0,f instanceof HTMLElement&&V(f);for(const f of r.addedNodes)f instanceof HTMLElement&&f!==A&&x&&(Y(f),o&&f.parentElement===t&&G(f))}n&&te(),I(o),Fe()}),m.observe(t,{attributes:!0,childList:!0,subtree:!0,characterData:!0}),x=new ResizeObserver(Se),Y(t);for(const e of t.children)e instanceof HTMLElement&&e!==A&&Y(e)}}function be(){m?.disconnect(),m=null,x?.disconnect(),x=null}function pe(e=!1){if(!l||g)return;if(O.set(t,K),t.addEventListener("scroll",me,{passive:!0}),t.addEventListener("scrollend",le,{passive:!0,capture:!0}),t.addEventListener("wheel",ie,{passive:!0}),t.addEventListener("touchstart",ae,{passive:!0}),t.addEventListener("touchmove",ue,{passive:!0}),t.addEventListener("touchend",ce,{passive:!0}),t.addEventListener("keydown",fe),t.addEventListener("pointerdown",de,{passive:!0}),window.addEventListener("pointerup",J,{passive:!0}),window.addEventListener("pointercancel",J,{passive:!0}),H(),Ee(),e){b=requestAnimationFrame(()=>{b=null,!(g||!l)&&(D(),o?z():N())});return}D();let n=q();o&&(n=U(n),R=n.maximum),N(n)}function he(){p.reset(),w=!1,h=null,L.clear(),W.clear(),j(),b!==null&&cancelAnimationFrame(b),b=null,M!==null&&cancelAnimationFrame(M),M=null,u=null,$=null,O.get(t)===K&&O.delete(t),be(),C(),t.removeEventListener("scroll",me),t.removeEventListener("scrollend",le,!0),t.removeEventListener("wheel",ie),t.removeEventListener("touchstart",ae),t.removeEventListener("touchmove",ue),t.removeEventListener("touchend",ce),t.removeEventListener("keydown",fe),t.removeEventListener("pointerdown",de),window.removeEventListener("pointerup",J),window.removeEventListener("pointercancel",J)}return pe(!0),{update(e){v=e.onFollowChange,y=e.onScrollStateChange,T=e.threshold??100;const n=e.enabled??!0;if(l!==n&&(n||he(),l=n,l)){o=e.follow,pe(!0);return}l?e.follow&&!o?(_(!0,!1),z()):!e.follow&&o?_(!1,!1):b===null&&ne():o=e.follow},destroy(){g=!0,he()}}}function tt(t){return O.get(t)?.isFollowing()??!1}function ot(t){return O.get(t)?.isNativeScrollAnchoringActive()??!1}function nt(t){return O.get(t)?.hasActiveMutation()??!1}function xe(t,i={}){let l=t;for(;l;){const o=O.get(l);if(o)return o.beforeMutation(t,i);l=l.parentElement}return Ae}function Ie(t){const{scrollTop:i,scrollHeight:l,clientHeight:o}=t;return l-i-o}function Ye(t,i=100){return Ie(t)<=i}function Ue(t,i=!1){t.scrollTo({top:t.scrollHeight,behavior:i?"smooth":"auto"})}function rt(t){const i=O.get(t);if(i){i.followAndScroll();return}Ue(t)}function it(t,i,l=150,o){const v=t();if(!v)return;const y=v.scrollTop,T=performance.now();function w(u){return 1-Math.pow(1-u,3)}function h(u){const m=t();if(!m)return;const x=u-T,d=Math.min(x/l,1),b=typeof i=="function"?i(m):i;m.scrollTop=y+(b-y)*w(d),d<1?requestAnimationFrame(h):o?.(m)}requestAnimationFrame(h)}function lt(t,i="[data-message-id], [data-lazy-turn-key]"){const l=t.scrollTop,o=t.getBoundingClientRect(),v=Ye(t,100);if(v&&O.get(t)?.isFollowing()!==!1)return{element:null,offsetFromViewport:0,scrollTop:l,isNearBottom:v};const y=t.querySelectorAll(i);let T=null,w=0,h;for(const u of y){const m=u.getBoundingClientRect();if(m.top>=o.bottom)break;if(m.top>=o.top){T||(T=u,w=m.top-o.top);const x=u.getAttribute("data-message-id");if(x){h={id:x,offsetFromViewport:m.top-o.top};break}}}return{element:T,offsetFromViewport:w,scrollTop:l,isNearBottom:v,...h?{message:h}:{}}}function ye(t,i){if(i.message){const l=t.querySelector(`[data-message-id="${CSS.escape(i.message.id)}"]`);if(l)return{element:l,offsetFromViewport:i.message.offsetFromViewport}}return i.element?.isConnected?{element:i.element,offsetFromViewport:i.offsetFromViewport}:null}function st(t,i){return ye(t,i)!==null}function at(t,i){const l=ye(t,i);if(l){const{element:o,offsetFromViewport:v}=l,y=t.getBoundingClientRect(),h=o.getBoundingClientRect().top-y.top-v;Math.abs(h)>5&&(t.scrollTop+=h)}}function E(t,i){const l=Number.parseFloat(String(t[i]));return Number.isFinite(l)?l:0}function ut(t,i={},l={}){const o=t,y={maxHoldMs:we[i.tier??"moderate"].settleMs*2+500};let T=xe(o,y);const w=()=>{T?.settle(),T=null},h=()=>{T??=xe(o,y)};if(!$e()||De())return w(),{duration:0};const u=getComputedStyle(o),m=i.axis??"y",x=o.getBoundingClientRect(),d=m==="y"?E(u,"height")||x.height:E(u,"width")||x.width;if(!Number.isFinite(d)||d<=0)return w(),{duration:0};const b=E(u,"opacity")||1,M=i.tier??"moderate",F=we[M],S=l.direction==="out",R=typeof u.getPropertyValue=="function"?S?We(o,{tier:M}):ke(o,{tier:M}):{duration:S?F.exit.duration:F.settleMs,easing:F.exit.easing},g=R.duration??(S?F.exit.duration:F.settleMs),$=i.y??-4,L=E(u,"paddingTop"),W=E(u,"paddingBottom"),P=E(u,"marginTop"),k=E(u,"marginBottom"),A=E(u,"paddingLeft"),G=E(u,"paddingRight"),V=E(u,"marginLeft"),I=E(u,"marginRight");let H=null,C=l.direction==="out"?"outro":l.direction==="in"?"intro":"idle";const Y=(c,D)=>{o.style.overflow="hidden",m==="y"?(o.style.height=`${c*d}px`,o.style.paddingTop=`${c*L}px`,o.style.paddingBottom=`${c*W}px`,o.style.marginTop=`${c*P}px`,o.style.marginBottom=`${c*k}px`):(o.style.width=`${c*d}px`,o.style.paddingLeft=`${c*A}px`,o.style.paddingRight=`${c*G}px`,o.style.marginLeft=`${c*V}px`,o.style.marginRight=`${c*I}px`),o.style.opacity=`${c*b}`,o.style.transform=m==="y"?`translateY(${$*D}px)`:`translateX(${$*D}px)`},j=()=>{o.style.overflow="",o.style.height="",o.style.width="",o.style.paddingTop="",o.style.paddingBottom="",o.style.marginTop="",o.style.marginBottom="",o.style.paddingLeft="",o.style.paddingRight="",o.style.marginLeft="",o.style.marginRight="",o.style.opacity="",o.style.transform=""};return{duration:g,easing:R.easing,tick:(c,D)=>{if(l.direction==="both"&&(H===null?c<1&&(C="outro"):c<H?(h(),C="outro"):c>H&&(h(),C="intro")),H=c,c===1&&C!=="outro"){j(),w(),C="idle";return}Y(c,D),T?.request(),c===0&&C==="outro"&&(w(),C="idle")}}}export{it as a,$e as b,xe as c,st as d,lt as e,et as f,rt as g,nt as h,tt as i,ot as j,Ze as k,Ue as l,at as r,ut as s};
@@ -1 +1 @@
1
- import{JH as t,dT as d,dS as i}from"./B9vHutcJ.js";function c(u,s){const e=crypto.randomUUID();let r;function o(n){n!==r&&(r&&t.dispatch(d(r,e)),r=n,r&&t.dispatch(i(r,e)))}return o(s),{update:o,destroy:()=>o(void 0)}}export{c as b};
1
+ import{JH as t,dT as d,dS as i}from"./CiKoEJ2m.js";function c(u,s){const e=crypto.randomUUID();let r;function o(n){n!==r&&(r&&t.dispatch(d(r,e)),r=n,r&&t.dispatch(i(r,e)))}return o(s),{update:o,destroy:()=>o(void 0)}}export{c as b};
@@ -1 +1 @@
1
- import{conf as t,language as e}from"./CSjV3uYy.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"./Byobtdo1.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
- var z1=Object.defineProperty;var js=t=>{throw TypeError(t)};var R1=(t,e,r)=>e in t?z1(t,e,{enumerable:!0,configurable:!0,writable:!0,value:r}):t[e]=r;var le=(t,e,r)=>R1(t,typeof e!="symbol"?e+"":e,r),D1=(t,e,r)=>e.has(t)||js("Cannot "+r);var Vs=(t,e,r)=>e.has(t)?js("Cannot add the same private member more than once"):e instanceof WeakSet?e.add(t):e.set(t,r);var tn=(t,e,r)=>(D1(t,e,"access private method"),r);import{cR as Vt,b4 as N1,dJ as Xl,a7 as _n,a5 as Ia,a6 as P1,a4 as _1,aa as L1,am as O1,a1 as $1,ea as B1,X as q1,bn as Yl,cU as qr,dI as Zl,b3 as F1,b8 as H1,cC as U1,cS as W1,cn as G1,dD as si,e2 as j1,dX as V1,aK as X0,ax as K1,aF as _i,dH as Ql,ee as Jl,dV as X1,ed as Y1}from"./C2UL5Ler.js";import{D as Ks,b3 as Z1,bd as Q1,aB as J1}from"./BVXKWrt4.js";import{M as eh,G as hn,I as th}from"./Bqd7fdCF.js";import{zz as y0,JH as E,n_ as ve,nZ as xe,aU as rh,m as ec,I as De,br as gn,kf as Li,mf as w0,ar as Xt,me as Xs,mo as Ys,ml as Zs,jO as tc,gA as oi,I2 as nh,tK as ah,B1 as ih,p1 as sh,n3 as k0,CB as oh,iO as lh,my as ch,m9 as uh}from"./B9vHutcJ.js";import{bm as ie}from"./CLAmm_T1.js";import{l as rt}from"./Cu5e4npY.js";import{m as hh,f as Tr}from"./BbhtQrkZ.js";import{a as vn}from"./BdWqymET.js";import{o as pe,r as Kt,e as bn,s as V,_ as Je,l as yn,g as dh,n as Le,c as dr,b as Ve,u as ph,d as mh}from"./CIyUrgF0.js";import{j as rc}from"./uXuxG9cN.js";import{u as fh}from"./BGrimfDs.js";import{selectActiveWorkspaceIds as gh}from"./aZdb_rCN.js";import{i as je}from"./CL3a4Hm1.js";import{l as za,c as Oi}from"./ChTqQfQN.js";import"./KnkAG0HD.js";import{e as vh,h as Er}from"./DONrLvvt.js";import{h as wn}from"./TB9r2XJy.js";import{i as Qs}from"./BBWuirRW.js";import{f as $i,o as nc,p as ac,h as bh,m as ic,i as yh,k as wh}from"./DQw0Iiac.js";const Ze=[];for(let t=0;t<256;++t)Ze.push((t+256).toString(16).slice(1));function kh(t,e=0){return(Ze[t[e+0]]+Ze[t[e+1]]+Ze[t[e+2]]+Ze[t[e+3]]+"-"+Ze[t[e+4]]+Ze[t[e+5]]+"-"+Ze[t[e+6]]+Ze[t[e+7]]+"-"+Ze[t[e+8]]+Ze[t[e+9]]+"-"+Ze[t[e+10]]+Ze[t[e+11]]+Ze[t[e+12]]+Ze[t[e+13]]+Ze[t[e+14]]+Ze[t[e+15]]).toLowerCase()}const xh=new Uint8Array(16);function Sh(){return crypto.getRandomValues(xh)}function Bi(t,e,r){return crypto.randomUUID?crypto.randomUUID():Ah(t)}function Ah(t,e,r){t=t||{};const n=t.random??t.rng?.()??Sh();if(n.length<16)throw new Error("Random bytes length must be >= 16");return n[6]=n[6]&15|64,n[8]=n[8]&63|128,kh(n)}function qi(t,e){if(t.repositoryIdentity===null)return null;if(t.repositoryIdentity){const{provider:a,instanceBaseUrl:i,projectPath:s}=t.repositoryIdentity,o=qi({...t,repositoryIdentity:void 0,githubUrl:`${i}/${s}`},a==="gitlab"?i:void 0);return o?.provider===a?o:null}const r=t.githubUrl;if(!r)return null;const n=/^(?:https:\/\/github\.com\/|git@github\.com:)([A-Za-z0-9_.-]+)\/([A-Za-z0-9_.-]+?)(?:\.git)?\/?$/i.exec(r);return n&&!n.slice(1).some(a=>a==="."||a==="..")?{provider:"github",instanceBaseUrl:"https://github.com",projectPath:`${n[1]}/${n[2]}`}:e?eh(r.replace(/\.git\/?$/,""),e):null}function f3(t,e){return t.type==="local"?t.plainFolder?"folder":"local":qi(t,e)?.provider==="gitlab"?"gitlab":"github"}function sc(t){const e=t.split(/[\\/]/).filter(Boolean);return e[e.length-1]??""}function g3(t){if(t.type!=="local")return{ownerPrefix:t.owner,primary:t.name};const e=sc(t.path)||t.name,r=t.owner?`${t.owner}/${t.name}`:void 0;return{primary:e,suffix:r}}function v3(t){return t.type==="local"&&t.path?t.path:void 0}const Th=["/.clones/","/.repo-cache/"];function b3(t){const e=t.replaceAll("\\","/");return Th.some(r=>e.includes(r))}function y3(t){const e=new Set;for(const r of t){const{repositoryPath:n,worktreePath:a}=r;n&&a&&n===a&&e.add(n)}return e}function Eh(t){return t.includes("\\")||t.includes(":")||t.startsWith("/")?void 0:/^([^/]+)\/[^/]+$/.exec(t)?.[1]}function w3(t,e){const{selectedValue:r,selectedRepoType:n,confirmedGithubUrl:a}=t;if(!(n!=="github"||!r)){if(a){const i=e(a)?.owner;if(i)return i}return e(r)?.owner??Eh(r)}}function k3(t,e){const r=e.trim().toLowerCase();return r===""?!0:[t.name,t.path,sc(t.path),t.owner,t.owner?`${t.owner}/${t.name}`:void 0].some(a=>a?.toLowerCase().includes(r)??!1)}const Ch="known-repos",Mh=6e4;function Ih({saved:t,source:e,dismissed:r,mode:n}){if(!e)return[...t];const a=new Map;if(n==="all")for(const s of[...e.repos,...t]){const o=y0(s);a.has(o)||a.set(o,s)}else{for(const s of t)a.set(y0(s),s);for(const s of e.repos)a.set(y0(s),s)}const i=[...a.values()].filter(s=>!r[y0(s)]);return n==="all"?i:i.slice(0,9)}function x3(t){const e=t.lastUsedAt?Date.parse(t.lastUsedAt):NaN;return Number.isFinite(e)?e:0}function S3({visible:t,admission:e,entry:r,readyAt:n,now:a}){return!t||!e?"skip":!r||r.admission!==e?"load":r.status==="pending"?"reuse":r.status==="ready"&&n?.requestId===r.requestId&&a-n.at<Mh?"skip":"load"}function A3(t,e){if(t.type==="local")return t.plainFolder?{repoPath:t.path,plainFolder:!0}:{repoPath:t.path};const r=qi(t,e);return r?.provider==="gitlab"?{repositoryCheckoutDraft:{instanceBaseUrl:r.instanceBaseUrl,projectPath:r.projectPath}}:r?{githubUrl:`https://github.com/${r.projectPath}`,exactRemote:!0}:{githubUrl:t.githubUrl||`https://github.com/${t.path}`,exactRemote:!0}}function zh({compactFormState:t,lastSubmittedAgent:e,specialists:r,orchestratorId:n}){if(t?.isTeamMode??e?.isTeamMode??!1)return n;const i=o=>r.some(c=>c.id===o),s=t?.selectedSpecialist!==void 0?t.selectedSpecialist:e?.selectedSpecialist!==void 0?e.selectedSpecialist:i(Ks)?Ks:null;return s===null||!i(s)?null:s}const T3=E.createSelector(t=>t.workspaceInitializer.hydrated),E3=E.createSelector(t=>t.workspaceInitializer.compactFormState),C3=E.createSelector(t=>t.workspaceInitializer.onboardingFormState),M3=E.createSelector(t=>t.workspaceInitializer.lastSelectedRepo),I3=E.createSelector(t=>t.workspaceInitializer.branchByRepo),z3=E.createSelector(t=>t.workspaceInitializer.defaultParentPath),R3=E.createSelector(t=>ve(t.workspaceInitializer.recentRepos)),D3=E.createSelector((t,e)=>xe(t.workspaceInitializer.recentRepoRefreshes,e)),N3=E.createSelector((t,e)=>xe(t.workspaceInitializer.directoryStatusChecks,e)),P3=E.createSelector(t=>t.workspaceInitializer.dismissedRecentRepoKeys),_3=E.createSelector(t=>ve(t.workspaceInitializer.remoteSetups)),L3=E.createSelector(t=>t.workspaceInitializer.lastSubmittedAgent),O3=E.createSelector(t=>t.workspaceInitializer.agentByRepo),$3=E.createSelector(t=>t.workspaceInitializer.recentSpecialistIds),B3=E.createSelector((t,e)=>t.workspaceInitializer.agentByRepo[e]??null),q3=E.createSelector(t=>t.workspaceInitializer.pendingGitHubPrefill),F3=E.createSelector((t,e)=>({restore:xe(t.workspaceInitializer.draftRestores,e),clear:xe(t.workspaceInitializer.draftClears,e)})),H3=E.createSelector((t,e,r)=>{const n=xe(t.workspaceInitializer.initializationOutcomes,e);return n?.resourceId===r?n:void 0}),U3=E.createSelector((t,e)=>xe(t.workspaceInitializer.initializationOutcomes,e)),W3=E.createSelector((t,e)=>xe(t.workspaceInitializer.initializationResumes,e)),G3=E.createSelector(t=>zh({compactFormState:t.workspaceInitializer.compactFormState,lastSubmittedAgent:t.workspaceInitializer.lastSubmittedAgent,specialists:Q1.select(t),orchestratorId:Z1.select(t)?.id??null})),Rh=E.createSelector(t=>{const e=t.workspaceInitializer.gitCheckRequest,r=Vt.select(t);return e&&r&&N1.select(t)?JSON.stringify([r,e]):null}),j3=E.createSelector(t=>{const e=Rh.select(t),r=t.workspaceInitializer.gitCheck;return e&&r?.context===e?r.available:null}),Dh=E.createSelector(t=>{const e=xe(t.workspaceInitializer.recentRepoRefreshes,Ch),r=Vt.select(t);return Ih({saved:ve(t.workspaceInitializer.recentRepos),source:e&&r&&e.admission===r?e:null,dismissed:t.workspaceInitializer.dismissedRecentRepoKeys,mode:"all"})}),V3=E.createSelector(t=>Xl.select(t)?Dh.select(t):[]),K3=E.createSelector(t=>J1.select(t)||void 0),Js="workspace-debug-flags",x0={enableCreationAnimation:!0,animationDuration:300,enablePageTransitions:!0,enableComponentTransitions:!0,showDebugInfo:!1,showPerformanceMetrics:!1,logStateChanges:!1,enableAutofocus:!0,enableBranchCaching:!0,enableFormPersistence:!0,simulateSlowNetwork:!1,simulateErrors:!1,networkDelay:0};class Nh{constructor(){le(this,"flags");le(this,"listeners",new Set);this.flags=this.loadFlags()}loadFlags(){if(typeof localStorage>"u")return x0;try{const e=localStorage.getItem(Js);if(e)return{...x0,...JSON.parse(e)}}catch(e){za.error("Failed to load debug flags:",e)}return x0}saveFlags(){if(!(typeof localStorage>"u")){try{localStorage.setItem(Js,JSON.stringify(this.flags))}catch(e){za.error("Failed to save debug flags:",e)}this.listeners.forEach(e=>e(this.flags))}}get(e){return this.flags[e]}set(e,r){this.flags[e]=r,this.saveFlags()}toggle(e){typeof this.flags[e]=="boolean"&&(this.flags[e]=!this.flags[e],this.saveFlags())}reset(){this.flags={...x0},this.saveFlags()}getAll(){return{...this.flags}}subscribe(e){return this.listeners.add(e),()=>this.listeners.delete(e)}toggleDebugPanel(){this.toggle("showDebugInfo"),za.info("Debug panel:",this.flags.showDebugInfo?"ON":"OFF")}async simulateDelay(e){return this.flags.simulateSlowNetwork&&this.flags.networkDelay>0&&await new Promise(r=>setTimeout(r,this.flags.networkDelay)),e}}const Ra=new Nh;function X3(t){if(!t)return"";let e=t;return e=e.replace(/\*\*(.+?)\*\*/g,"$1"),e=e.replace(/__(.+?)__/g,"$1"),e=e.replace(/(?<!\*)\*(?!\*)(.+?)(?<!\*)\*(?!\*)/g,"$1"),e=e.replace(/(?<!_)_(?!_)(.+?)(?<!_)_(?!_)/g,"$1"),e=e.replace(/~~(.+?)~~/g,"$1"),e=e.replace(/`([^`]+)`/g,"$1"),e=e.replace(/\[([^\]]+)\]\([^)]+\)/g,"$1"),e=e.replace(/^#{1,6}\s+/gm,""),e=e.replace(/^\*+\s*/gm,""),e=e.replace(/\s*\*+$/gm,""),e.trim()}function Ph(t){return t.charAt(0).toUpperCase()+t.slice(1)}function Y3(t){if(!t||t.trim().length===0)return ie.workspace_sidebarHeader_branchEmpty_error();if(/[\s~^:\\?*\[\\]/.test(t))return ie.workspace_sidebarHeader_branchInvalidChars_error();if(t.includes("@{"))return ie.workspace_sidebarChanges_branchAtBrace_error({seq:"@{"});if(t==="@")return ie.workspace_sidebarChanges_branchAt_error({symbol:"@"});if(t.startsWith("."))return ie.workspace_sidebarHeader_branchStartsDot_error();if(t.endsWith(".lock"))return ie.workspace_sidebarHeader_branchEndsLock_error();if(t.includes(".."))return ie.workspace_sidebarHeader_branchDoubleDot_error();if(t.startsWith("/")||t.endsWith("/"))return ie.workspace_sidebarHeader_branchSlashEnds_error();if(t.includes("//"))return ie.workspace_sidebarHeader_branchDoubleSlash_error();if(t.startsWith("-"))return ie.workspace_sidebarHeader_branchStartsDash_error();if(t.endsWith("."))return ie.workspace_sidebarChanges_branchEndsPeriod_error();const e=t.split("/");for(const r of e){if(r.startsWith("."))return ie.workspace_sidebarChanges_branchComponentStartsDot_error();if(r.endsWith(".lock"))return ie.workspace_sidebarChanges_branchComponentEndsLock_error()}if(t.length>250)return ie.workspace_sidebarHeader_branchTooLong_error()}function Z3(t,e,r,n){return e&&r?`https://github.com/${e}/${r}/pull/${t}`:n||""}function li(t){return t==="Open"?"open":t==="Merged"?"merged":t==="Draft"?"draft":"closed"}function Q3(t,e){return`${e}:${t.agentId??"manual"}`}function _h(t,e){if(t.length===0||e>=t.length)return 0;const r=Math.max(0,e);let n=0;for(let a=r;a<t.length;a++)t[a].isPushed||n++;return n}function Lh(t,e){if(t.length===0||e<0)return 0;const r=Math.min(e,t.length-1);let n=0;for(let a=0;a<=r;a++)t[a].isPushed&&n++;return n}function Oh(t,e){if(t.length===0||e<0)return 0;const r=Math.min(e,t.length-1);let n=0;for(let a=0;a<=r;a++)t[a].isPushed||n++;return n}function J3(t,e,r,n){const a=_h(t,e),i=n?` (origin/${n})`:"";return r?a===1?ie.workspace_sidebarChanges_addToPr_one({suffix:i}):ie.workspace_sidebarChanges_addToPr_many({count:rt(a),suffix:i}):a===1?ie.workspace_sidebarChanges_pushToRemote_one({suffix:i}):ie.workspace_sidebarChanges_pushToRemote_many({count:rt(a),suffix:i})}function e6(t,e,r){const n=Lh(t,e),a=r?` (origin/${r})`:"";return n===1?ie.workspace_sidebarChanges_undoPush_one({suffix:a}):ie.workspace_sidebarChanges_undoPush_many({count:rt(n),suffix:a})}function t6(t,e){const r=Oh(t,e);return r===1?ie.workspace_sidebarChanges_undoCommit_one():ie.workspace_sidebarChanges_undoCommit_many({count:rt(r)})}function r6(t,e){return e===0&&t.length>0}function n6(t,e,r,n){return!r||n==null?!1:t===r&&e===n}function a6(t,e,r){const n=`${e?"staged":"unstaged"}:${t}`;return r.has(n)}function i6(t,e,r){return r?.path===t&&r?.staged===e}function s6(t){if(t.length===0)return[];const e=new Map,r=[...t].sort((n,a)=>n.timestamp-a.timestamp);for(const n of r)for(const a of n.files??[]){const i=e.get(a.path);i?e.set(a.path,{additions:i.additions+(a.additions||0),deletions:i.deletions+(a.deletions||0)}):e.set(a.path,{additions:a.additions||0,deletions:a.deletions||0})}return Array.from(e.entries()).map(([n,a])=>({path:n,additions:a.additions,deletions:a.deletions,staged:!1}))}function o6(t,e,r){const n=new Set;let a=0,i=0;for(const s of t)n.add(s.relativePath),a+=s.stats?.additions||0,i+=s.stats?.deletions||0;for(const s of e)n.add(s.relativePath),a+=s.stats?.additions||0,i+=s.stats?.deletions||0;for(const s of r)for(const o of s.files||[])n.add(o.path),a+=o.additions||0,i+=o.deletions||0;return{totalFilesChanged:n.size,totalAdditions:a,totalDeletions:i}}function $h(t){const e=t?.match(/^https?:\/\/github\.com\/([^/]+)\/([^/]+)\/pull\/\d+/i);return e?`${e[1]}/${e[2]}`:void 0}function l6(t,e,r,n,a){if(t&&t.length>0){const i=a?.split("/")[0];return t.map(s=>{const o=s.url||r(s.number),c=$h(s.url),h=c!==void 0&&c.toLowerCase()!==a?.toLowerCase()?c:void 0;return{number:s.number,title:n(s),url:o,htmlUrl:o,status:li(s.status),createdAt:s.createdAt,updatedAt:s.updatedAt,isInMergeQueue:s.isDraft?void 0:s.isInMergeQueue,crossRepo:h,crossRepoDisplay:h?Fi(h,i):void 0}})}return e?[{number:e.number,title:n(e),url:r(e.number,e.url),htmlUrl:r(e.number,e.url),status:li(e.status),createdAt:e.createdAt,updatedAt:e.updatedAt,isInMergeQueue:e.isDraft?void 0:e.isInMergeQueue}]:[]}function c6(t){const{prNumber:e,prUrl:r}=t;return e==null||!r?null:{id:`legacy-pr-${e}`,number:e,url:r,title:"",status:t.prStatus??rh.Open,createdAt:t.updatedAt,updatedAt:t.updatedAt}}function Bh(t){const e=t.lastSnapshot?.state?.toLowerCase();return e==="merged"?"merged":e==="closed"?"closed":t.lastSnapshot?.isDraft?"draft":t.state==="completed"?"closed":"open"}function Da(t,e,r){if(e.length===0)return t;const n=r?.split("/")[0],a=t.map(i=>({...i}));for(const i of e){const s=!i.resource&&!i.monitorAvailability&&(!r||i.repo===r),o=_n(i),c=o.toLowerCase(),h=a.find(d=>!!o&&d.url.toLowerCase()===c||(i.resource||i.monitorAvailability?d.monitorIdentity===Ia(i):!d.resource&&!d.monitorAvailability&&(s?!d.crossRepo&&d.number===i.prNumber:d.crossRepo===i.repo&&d.number===i.prNumber)));if(h){h.monitorAgentId=i.agentId,h.resource=i.resource,h.monitorAvailability=i.monitorAvailability,h.monitorIdentity=i.resource||i.monitorAvailability?Ia(i):void 0,h.monitorSnapshot=i.lastSnapshot??h.monitorSnapshot;continue}a.push({number:i.prNumber,title:i.title??`${i.repo}${P1(i,i.prNumber)}`,resource:i.resource,monitorAvailability:i.monitorAvailability,monitorIdentity:i.resource||i.monitorAvailability?Ia(i):void 0,url:o,htmlUrl:o,status:Bh(i),createdAt:i.createdAt,updatedAt:i.updatedAt,monitorAgentId:i.agentId,crossRepo:s?void 0:i.repo,crossRepoDisplay:s?void 0:Fi(i.repo,n),monitorSnapshot:i.lastSnapshot,monitorOnly:!0})}return a}function Fi(t,e){return e&&t.toLowerCase().startsWith(`${e.toLowerCase()}/`)?t.slice(e.length+1):t}function u6(t,e,r,n,a){const i=r?.toLowerCase(),s=new Set;for(const k of n)k.repoOwner&&k.repoName&&s.add(`${k.repoOwner}/${k.repoName}`.toLowerCase());let o=t;const c=[],h=[];if(t.some(k=>k.crossRepo)){o=[];for(const k of t)k.crossRepo?s.has(k.crossRepo.toLowerCase())?c.push(k):h.push(k):o.push(k)}const d=[],v=[],m=[];for(const k of e){const I=k.repo.toLowerCase();_n(k)&&o.some(R=>R.url===_n(k))||!k.resource&&!k.monitorAvailability&&(!i||I===i)?d.push(k):_n(k)&&c.some(R=>R.url===_n(k))||!k.resource&&!k.monitorAvailability&&s.has(I)?v.push(k):m.push(k)}const w=Da(o,d,r),A=r?.split("/")[0],C=new Set([...w,...c,...h].map(k=>`${(k.crossRepo??r??"").toLowerCase()}#${k.number}`)),M=[...c];for(const k of n){if(!k.repoOwner||!k.repoName)continue;const I=`${k.repoOwner}/${k.repoName}`;for(const R of k.pullRequests??[]){const Z=`${I.toLowerCase()}#${R.number}`;if(C.has(Z))continue;C.add(Z);const K=R.url||`https://github.com/${I}/pull/${R.number}`,ee=i!==void 0&&I.toLowerCase()===i;M.push({number:R.number,title:a(R),url:K,htmlUrl:K,status:li(R.status),createdAt:R.createdAt,updatedAt:R.updatedAt,crossRepo:ee?void 0:I,crossRepoDisplay:ee?void 0:Fi(I,A)})}}return{own:w,otherRoots:Da(M,v,r),otherTracked:Da(h,m,r)}}function eo(t){return t.status!=="open"?!1:t.monitorSnapshot?t.monitorSnapshot.isInMergeQueue===!0:t.isInMergeQueue===!0}function h6(t){const e=t.status==="merged"?ie.workspace_prSection_merged_label():t.status==="closed"?ie.workspace_prSection_closed_label():t.status==="draft"?ie.workspace_prSection_statusDraft_label():eo(t)?ie.workspace_prSection_statusQueued_label():ie.workspace_prSection_statusOpen_label(),r=[_1(t)??e],n=eo(t)?hh(t.monitorSnapshot?.mergeQueue):null;n&&r.push(n);const a=t.status==="merged"||t.status==="closed"?void 0:t.monitorSnapshot;return a&&(a.checks.total===null||a.checks.passed===null||a.checks.failed===null||a.checks.pending===null||a.availability&&a.availability.checks!=="available"?r.push(ie.chat_monitoredPrs_hover_checksUnknown_label()):a.checks.total>0&&r.push(ie.workspace_prSection_statusChecks_tooltip({passed:rt(a.checks.passed),failed:rt(a.checks.failed),pending:rt(a.checks.pending)})),r.push(a.approvals.have===null||a.availability&&a.availability.approvals!=="available"?ie.chat_monitoredPrs_hover_approvalsUnknown_label():a.approvals.needed!=null?ie.workspace_prSection_statusApprovalsOfNeeded_tooltip({count:rt(a.approvals.have),needed:rt(a.approvals.needed)}):ie.workspace_prSection_statusApprovals_tooltip({count:rt(a.approvals.have)})),a.approvals.changesRequested!==null&&a.approvals.changesRequested>0&&r.push(ie.workspace_prSection_statusChangesRequested_tooltip({count:rt(a.approvals.changesRequested)})),a.availability&&a.availability.discussions!=="available"?r.push(ie.workspace_prSection_statusUnresolvedThreadsUnknown_tooltip()):typeof a.threads.unresolved=="number"?a.threads.unresolved>0&&r.push(ie.workspace_prSection_statusUnresolvedThreads_tooltip({count:rt(a.threads.unresolved)})):a.threads.resolutionRequired&&r.push(ie.workspace_prSection_statusUnresolvedThreadsUnknown_tooltip()),a.mergeBlockedReason&&r.push(Ph(a.mergeBlockedReason))),r.join(`
1
+ var z1=Object.defineProperty;var js=t=>{throw TypeError(t)};var R1=(t,e,r)=>e in t?z1(t,e,{enumerable:!0,configurable:!0,writable:!0,value:r}):t[e]=r;var le=(t,e,r)=>R1(t,typeof e!="symbol"?e+"":e,r),D1=(t,e,r)=>e.has(t)||js("Cannot "+r);var Vs=(t,e,r)=>e.has(t)?js("Cannot add the same private member more than once"):e instanceof WeakSet?e.add(t):e.set(t,r);var tn=(t,e,r)=>(D1(t,e,"access private method"),r);import{cR as Vt,b4 as N1,dJ as Xl,a7 as _n,a5 as Ia,a6 as P1,a4 as _1,aa as L1,am as O1,a1 as $1,ea as B1,X as q1,bn as Yl,cU as qr,dI as Zl,b3 as F1,b8 as H1,cC as U1,cS as W1,cn as G1,dD as si,e2 as j1,dX as V1,aK as X0,ax as K1,aF as _i,dH as Ql,ee as Jl,dV as X1,ed as Y1}from"./iQDlfKDR.js";import{D as Ks,b3 as Z1,bd as Q1,aB as J1}from"./DEr2A_-h.js";import{M as eh,G as hn,I as th}from"./Bqd7fdCF.js";import{zz as y0,JH as E,n_ as ve,nZ as xe,aU as rh,m as ec,I as De,br as gn,kf as Li,mf as w0,ar as Xt,me as Xs,mo as Ys,ml as Zs,jO as tc,gA as oi,I2 as nh,tK as ah,B1 as ih,p1 as sh,n3 as k0,CB as oh,iO as lh,my as ch,m9 as uh}from"./CiKoEJ2m.js";import{bm as ie}from"./CtfEuoOH.js";import{l as rt}from"./DMEIbJII.js";import{m as hh,f as Tr}from"./CVtLV3_x.js";import{a as vn}from"./BdWqymET.js";import{o as pe,r as Kt,e as bn,s as V,_ as Je,l as yn,g as dh,n as Le,c as dr,b as Ve,u as ph,d as mh}from"./CIyUrgF0.js";import{j as rc}from"./uXuxG9cN.js";import{u as fh}from"./QzxpbvSo.js";import{selectActiveWorkspaceIds as gh}from"./BU3y3Xes.js";import{i as je}from"./CL3a4Hm1.js";import{l as za,c as Oi}from"./ChTqQfQN.js";import"./C8E14ldW.js";import{e as vh,h as Er}from"./DONrLvvt.js";import{h as wn}from"./CT8vPg_p.js";import{i as Qs}from"./BBWuirRW.js";import{f as $i,o as nc,p as ac,h as bh,m as ic,i as yh,k as wh}from"./JvFe2B29.js";const Ze=[];for(let t=0;t<256;++t)Ze.push((t+256).toString(16).slice(1));function kh(t,e=0){return(Ze[t[e+0]]+Ze[t[e+1]]+Ze[t[e+2]]+Ze[t[e+3]]+"-"+Ze[t[e+4]]+Ze[t[e+5]]+"-"+Ze[t[e+6]]+Ze[t[e+7]]+"-"+Ze[t[e+8]]+Ze[t[e+9]]+"-"+Ze[t[e+10]]+Ze[t[e+11]]+Ze[t[e+12]]+Ze[t[e+13]]+Ze[t[e+14]]+Ze[t[e+15]]).toLowerCase()}const xh=new Uint8Array(16);function Sh(){return crypto.getRandomValues(xh)}function Bi(t,e,r){return crypto.randomUUID?crypto.randomUUID():Ah(t)}function Ah(t,e,r){t=t||{};const n=t.random??t.rng?.()??Sh();if(n.length<16)throw new Error("Random bytes length must be >= 16");return n[6]=n[6]&15|64,n[8]=n[8]&63|128,kh(n)}function qi(t,e){if(t.repositoryIdentity===null)return null;if(t.repositoryIdentity){const{provider:a,instanceBaseUrl:i,projectPath:s}=t.repositoryIdentity,o=qi({...t,repositoryIdentity:void 0,githubUrl:`${i}/${s}`},a==="gitlab"?i:void 0);return o?.provider===a?o:null}const r=t.githubUrl;if(!r)return null;const n=/^(?:https:\/\/github\.com\/|git@github\.com:)([A-Za-z0-9_.-]+)\/([A-Za-z0-9_.-]+?)(?:\.git)?\/?$/i.exec(r);return n&&!n.slice(1).some(a=>a==="."||a==="..")?{provider:"github",instanceBaseUrl:"https://github.com",projectPath:`${n[1]}/${n[2]}`}:e?eh(r.replace(/\.git\/?$/,""),e):null}function f3(t,e){return t.type==="local"?t.plainFolder?"folder":"local":qi(t,e)?.provider==="gitlab"?"gitlab":"github"}function sc(t){const e=t.split(/[\\/]/).filter(Boolean);return e[e.length-1]??""}function g3(t){if(t.type!=="local")return{ownerPrefix:t.owner,primary:t.name};const e=sc(t.path)||t.name,r=t.owner?`${t.owner}/${t.name}`:void 0;return{primary:e,suffix:r}}function v3(t){return t.type==="local"&&t.path?t.path:void 0}const Th=["/.clones/","/.repo-cache/"];function b3(t){const e=t.replaceAll("\\","/");return Th.some(r=>e.includes(r))}function y3(t){const e=new Set;for(const r of t){const{repositoryPath:n,worktreePath:a}=r;n&&a&&n===a&&e.add(n)}return e}function Eh(t){return t.includes("\\")||t.includes(":")||t.startsWith("/")?void 0:/^([^/]+)\/[^/]+$/.exec(t)?.[1]}function w3(t,e){const{selectedValue:r,selectedRepoType:n,confirmedGithubUrl:a}=t;if(!(n!=="github"||!r)){if(a){const i=e(a)?.owner;if(i)return i}return e(r)?.owner??Eh(r)}}function k3(t,e){const r=e.trim().toLowerCase();return r===""?!0:[t.name,t.path,sc(t.path),t.owner,t.owner?`${t.owner}/${t.name}`:void 0].some(a=>a?.toLowerCase().includes(r)??!1)}const Ch="known-repos",Mh=6e4;function Ih({saved:t,source:e,dismissed:r,mode:n}){if(!e)return[...t];const a=new Map;if(n==="all")for(const s of[...e.repos,...t]){const o=y0(s);a.has(o)||a.set(o,s)}else{for(const s of t)a.set(y0(s),s);for(const s of e.repos)a.set(y0(s),s)}const i=[...a.values()].filter(s=>!r[y0(s)]);return n==="all"?i:i.slice(0,9)}function x3(t){const e=t.lastUsedAt?Date.parse(t.lastUsedAt):NaN;return Number.isFinite(e)?e:0}function S3({visible:t,admission:e,entry:r,readyAt:n,now:a}){return!t||!e?"skip":!r||r.admission!==e?"load":r.status==="pending"?"reuse":r.status==="ready"&&n?.requestId===r.requestId&&a-n.at<Mh?"skip":"load"}function A3(t,e){if(t.type==="local")return t.plainFolder?{repoPath:t.path,plainFolder:!0}:{repoPath:t.path};const r=qi(t,e);return r?.provider==="gitlab"?{repositoryCheckoutDraft:{instanceBaseUrl:r.instanceBaseUrl,projectPath:r.projectPath}}:r?{githubUrl:`https://github.com/${r.projectPath}`,exactRemote:!0}:{githubUrl:t.githubUrl||`https://github.com/${t.path}`,exactRemote:!0}}function zh({compactFormState:t,lastSubmittedAgent:e,specialists:r,orchestratorId:n}){if(t?.isTeamMode??e?.isTeamMode??!1)return n;const i=o=>r.some(c=>c.id===o),s=t?.selectedSpecialist!==void 0?t.selectedSpecialist:e?.selectedSpecialist!==void 0?e.selectedSpecialist:i(Ks)?Ks:null;return s===null||!i(s)?null:s}const T3=E.createSelector(t=>t.workspaceInitializer.hydrated),E3=E.createSelector(t=>t.workspaceInitializer.compactFormState),C3=E.createSelector(t=>t.workspaceInitializer.onboardingFormState),M3=E.createSelector(t=>t.workspaceInitializer.lastSelectedRepo),I3=E.createSelector(t=>t.workspaceInitializer.branchByRepo),z3=E.createSelector(t=>t.workspaceInitializer.defaultParentPath),R3=E.createSelector(t=>ve(t.workspaceInitializer.recentRepos)),D3=E.createSelector((t,e)=>xe(t.workspaceInitializer.recentRepoRefreshes,e)),N3=E.createSelector((t,e)=>xe(t.workspaceInitializer.directoryStatusChecks,e)),P3=E.createSelector(t=>t.workspaceInitializer.dismissedRecentRepoKeys),_3=E.createSelector(t=>ve(t.workspaceInitializer.remoteSetups)),L3=E.createSelector(t=>t.workspaceInitializer.lastSubmittedAgent),O3=E.createSelector(t=>t.workspaceInitializer.agentByRepo),$3=E.createSelector(t=>t.workspaceInitializer.recentSpecialistIds),B3=E.createSelector((t,e)=>t.workspaceInitializer.agentByRepo[e]??null),q3=E.createSelector(t=>t.workspaceInitializer.pendingGitHubPrefill),F3=E.createSelector((t,e)=>({restore:xe(t.workspaceInitializer.draftRestores,e),clear:xe(t.workspaceInitializer.draftClears,e)})),H3=E.createSelector((t,e,r)=>{const n=xe(t.workspaceInitializer.initializationOutcomes,e);return n?.resourceId===r?n:void 0}),U3=E.createSelector((t,e)=>xe(t.workspaceInitializer.initializationOutcomes,e)),W3=E.createSelector((t,e)=>xe(t.workspaceInitializer.initializationResumes,e)),G3=E.createSelector(t=>zh({compactFormState:t.workspaceInitializer.compactFormState,lastSubmittedAgent:t.workspaceInitializer.lastSubmittedAgent,specialists:Q1.select(t),orchestratorId:Z1.select(t)?.id??null})),Rh=E.createSelector(t=>{const e=t.workspaceInitializer.gitCheckRequest,r=Vt.select(t);return e&&r&&N1.select(t)?JSON.stringify([r,e]):null}),j3=E.createSelector(t=>{const e=Rh.select(t),r=t.workspaceInitializer.gitCheck;return e&&r?.context===e?r.available:null}),Dh=E.createSelector(t=>{const e=xe(t.workspaceInitializer.recentRepoRefreshes,Ch),r=Vt.select(t);return Ih({saved:ve(t.workspaceInitializer.recentRepos),source:e&&r&&e.admission===r?e:null,dismissed:t.workspaceInitializer.dismissedRecentRepoKeys,mode:"all"})}),V3=E.createSelector(t=>Xl.select(t)?Dh.select(t):[]),K3=E.createSelector(t=>J1.select(t)||void 0),Js="workspace-debug-flags",x0={enableCreationAnimation:!0,animationDuration:300,enablePageTransitions:!0,enableComponentTransitions:!0,showDebugInfo:!1,showPerformanceMetrics:!1,logStateChanges:!1,enableAutofocus:!0,enableBranchCaching:!0,enableFormPersistence:!0,simulateSlowNetwork:!1,simulateErrors:!1,networkDelay:0};class Nh{constructor(){le(this,"flags");le(this,"listeners",new Set);this.flags=this.loadFlags()}loadFlags(){if(typeof localStorage>"u")return x0;try{const e=localStorage.getItem(Js);if(e)return{...x0,...JSON.parse(e)}}catch(e){za.error("Failed to load debug flags:",e)}return x0}saveFlags(){if(!(typeof localStorage>"u")){try{localStorage.setItem(Js,JSON.stringify(this.flags))}catch(e){za.error("Failed to save debug flags:",e)}this.listeners.forEach(e=>e(this.flags))}}get(e){return this.flags[e]}set(e,r){this.flags[e]=r,this.saveFlags()}toggle(e){typeof this.flags[e]=="boolean"&&(this.flags[e]=!this.flags[e],this.saveFlags())}reset(){this.flags={...x0},this.saveFlags()}getAll(){return{...this.flags}}subscribe(e){return this.listeners.add(e),()=>this.listeners.delete(e)}toggleDebugPanel(){this.toggle("showDebugInfo"),za.info("Debug panel:",this.flags.showDebugInfo?"ON":"OFF")}async simulateDelay(e){return this.flags.simulateSlowNetwork&&this.flags.networkDelay>0&&await new Promise(r=>setTimeout(r,this.flags.networkDelay)),e}}const Ra=new Nh;function X3(t){if(!t)return"";let e=t;return e=e.replace(/\*\*(.+?)\*\*/g,"$1"),e=e.replace(/__(.+?)__/g,"$1"),e=e.replace(/(?<!\*)\*(?!\*)(.+?)(?<!\*)\*(?!\*)/g,"$1"),e=e.replace(/(?<!_)_(?!_)(.+?)(?<!_)_(?!_)/g,"$1"),e=e.replace(/~~(.+?)~~/g,"$1"),e=e.replace(/`([^`]+)`/g,"$1"),e=e.replace(/\[([^\]]+)\]\([^)]+\)/g,"$1"),e=e.replace(/^#{1,6}\s+/gm,""),e=e.replace(/^\*+\s*/gm,""),e=e.replace(/\s*\*+$/gm,""),e.trim()}function Ph(t){return t.charAt(0).toUpperCase()+t.slice(1)}function Y3(t){if(!t||t.trim().length===0)return ie.workspace_sidebarHeader_branchEmpty_error();if(/[\s~^:\\?*\[\\]/.test(t))return ie.workspace_sidebarHeader_branchInvalidChars_error();if(t.includes("@{"))return ie.workspace_sidebarChanges_branchAtBrace_error({seq:"@{"});if(t==="@")return ie.workspace_sidebarChanges_branchAt_error({symbol:"@"});if(t.startsWith("."))return ie.workspace_sidebarHeader_branchStartsDot_error();if(t.endsWith(".lock"))return ie.workspace_sidebarHeader_branchEndsLock_error();if(t.includes(".."))return ie.workspace_sidebarHeader_branchDoubleDot_error();if(t.startsWith("/")||t.endsWith("/"))return ie.workspace_sidebarHeader_branchSlashEnds_error();if(t.includes("//"))return ie.workspace_sidebarHeader_branchDoubleSlash_error();if(t.startsWith("-"))return ie.workspace_sidebarHeader_branchStartsDash_error();if(t.endsWith("."))return ie.workspace_sidebarChanges_branchEndsPeriod_error();const e=t.split("/");for(const r of e){if(r.startsWith("."))return ie.workspace_sidebarChanges_branchComponentStartsDot_error();if(r.endsWith(".lock"))return ie.workspace_sidebarChanges_branchComponentEndsLock_error()}if(t.length>250)return ie.workspace_sidebarHeader_branchTooLong_error()}function Z3(t,e,r,n){return e&&r?`https://github.com/${e}/${r}/pull/${t}`:n||""}function li(t){return t==="Open"?"open":t==="Merged"?"merged":t==="Draft"?"draft":"closed"}function Q3(t,e){return`${e}:${t.agentId??"manual"}`}function _h(t,e){if(t.length===0||e>=t.length)return 0;const r=Math.max(0,e);let n=0;for(let a=r;a<t.length;a++)t[a].isPushed||n++;return n}function Lh(t,e){if(t.length===0||e<0)return 0;const r=Math.min(e,t.length-1);let n=0;for(let a=0;a<=r;a++)t[a].isPushed&&n++;return n}function Oh(t,e){if(t.length===0||e<0)return 0;const r=Math.min(e,t.length-1);let n=0;for(let a=0;a<=r;a++)t[a].isPushed||n++;return n}function J3(t,e,r,n){const a=_h(t,e),i=n?` (origin/${n})`:"";return r?a===1?ie.workspace_sidebarChanges_addToPr_one({suffix:i}):ie.workspace_sidebarChanges_addToPr_many({count:rt(a),suffix:i}):a===1?ie.workspace_sidebarChanges_pushToRemote_one({suffix:i}):ie.workspace_sidebarChanges_pushToRemote_many({count:rt(a),suffix:i})}function e6(t,e,r){const n=Lh(t,e),a=r?` (origin/${r})`:"";return n===1?ie.workspace_sidebarChanges_undoPush_one({suffix:a}):ie.workspace_sidebarChanges_undoPush_many({count:rt(n),suffix:a})}function t6(t,e){const r=Oh(t,e);return r===1?ie.workspace_sidebarChanges_undoCommit_one():ie.workspace_sidebarChanges_undoCommit_many({count:rt(r)})}function r6(t,e){return e===0&&t.length>0}function n6(t,e,r,n){return!r||n==null?!1:t===r&&e===n}function a6(t,e,r){const n=`${e?"staged":"unstaged"}:${t}`;return r.has(n)}function i6(t,e,r){return r?.path===t&&r?.staged===e}function s6(t){if(t.length===0)return[];const e=new Map,r=[...t].sort((n,a)=>n.timestamp-a.timestamp);for(const n of r)for(const a of n.files??[]){const i=e.get(a.path);i?e.set(a.path,{additions:i.additions+(a.additions||0),deletions:i.deletions+(a.deletions||0)}):e.set(a.path,{additions:a.additions||0,deletions:a.deletions||0})}return Array.from(e.entries()).map(([n,a])=>({path:n,additions:a.additions,deletions:a.deletions,staged:!1}))}function o6(t,e,r){const n=new Set;let a=0,i=0;for(const s of t)n.add(s.relativePath),a+=s.stats?.additions||0,i+=s.stats?.deletions||0;for(const s of e)n.add(s.relativePath),a+=s.stats?.additions||0,i+=s.stats?.deletions||0;for(const s of r)for(const o of s.files||[])n.add(o.path),a+=o.additions||0,i+=o.deletions||0;return{totalFilesChanged:n.size,totalAdditions:a,totalDeletions:i}}function $h(t){const e=t?.match(/^https?:\/\/github\.com\/([^/]+)\/([^/]+)\/pull\/\d+/i);return e?`${e[1]}/${e[2]}`:void 0}function l6(t,e,r,n,a){if(t&&t.length>0){const i=a?.split("/")[0];return t.map(s=>{const o=s.url||r(s.number),c=$h(s.url),h=c!==void 0&&c.toLowerCase()!==a?.toLowerCase()?c:void 0;return{number:s.number,title:n(s),url:o,htmlUrl:o,status:li(s.status),createdAt:s.createdAt,updatedAt:s.updatedAt,isInMergeQueue:s.isDraft?void 0:s.isInMergeQueue,crossRepo:h,crossRepoDisplay:h?Fi(h,i):void 0}})}return e?[{number:e.number,title:n(e),url:r(e.number,e.url),htmlUrl:r(e.number,e.url),status:li(e.status),createdAt:e.createdAt,updatedAt:e.updatedAt,isInMergeQueue:e.isDraft?void 0:e.isInMergeQueue}]:[]}function c6(t){const{prNumber:e,prUrl:r}=t;return e==null||!r?null:{id:`legacy-pr-${e}`,number:e,url:r,title:"",status:t.prStatus??rh.Open,createdAt:t.updatedAt,updatedAt:t.updatedAt}}function Bh(t){const e=t.lastSnapshot?.state?.toLowerCase();return e==="merged"?"merged":e==="closed"?"closed":t.lastSnapshot?.isDraft?"draft":t.state==="completed"?"closed":"open"}function Da(t,e,r){if(e.length===0)return t;const n=r?.split("/")[0],a=t.map(i=>({...i}));for(const i of e){const s=!i.resource&&!i.monitorAvailability&&(!r||i.repo===r),o=_n(i),c=o.toLowerCase(),h=a.find(d=>!!o&&d.url.toLowerCase()===c||(i.resource||i.monitorAvailability?d.monitorIdentity===Ia(i):!d.resource&&!d.monitorAvailability&&(s?!d.crossRepo&&d.number===i.prNumber:d.crossRepo===i.repo&&d.number===i.prNumber)));if(h){h.monitorAgentId=i.agentId,h.resource=i.resource,h.monitorAvailability=i.monitorAvailability,h.monitorIdentity=i.resource||i.monitorAvailability?Ia(i):void 0,h.monitorSnapshot=i.lastSnapshot??h.monitorSnapshot;continue}a.push({number:i.prNumber,title:i.title??`${i.repo}${P1(i,i.prNumber)}`,resource:i.resource,monitorAvailability:i.monitorAvailability,monitorIdentity:i.resource||i.monitorAvailability?Ia(i):void 0,url:o,htmlUrl:o,status:Bh(i),createdAt:i.createdAt,updatedAt:i.updatedAt,monitorAgentId:i.agentId,crossRepo:s?void 0:i.repo,crossRepoDisplay:s?void 0:Fi(i.repo,n),monitorSnapshot:i.lastSnapshot,monitorOnly:!0})}return a}function Fi(t,e){return e&&t.toLowerCase().startsWith(`${e.toLowerCase()}/`)?t.slice(e.length+1):t}function u6(t,e,r,n,a){const i=r?.toLowerCase(),s=new Set;for(const k of n)k.repoOwner&&k.repoName&&s.add(`${k.repoOwner}/${k.repoName}`.toLowerCase());let o=t;const c=[],h=[];if(t.some(k=>k.crossRepo)){o=[];for(const k of t)k.crossRepo?s.has(k.crossRepo.toLowerCase())?c.push(k):h.push(k):o.push(k)}const d=[],v=[],m=[];for(const k of e){const I=k.repo.toLowerCase();_n(k)&&o.some(R=>R.url===_n(k))||!k.resource&&!k.monitorAvailability&&(!i||I===i)?d.push(k):_n(k)&&c.some(R=>R.url===_n(k))||!k.resource&&!k.monitorAvailability&&s.has(I)?v.push(k):m.push(k)}const w=Da(o,d,r),A=r?.split("/")[0],C=new Set([...w,...c,...h].map(k=>`${(k.crossRepo??r??"").toLowerCase()}#${k.number}`)),M=[...c];for(const k of n){if(!k.repoOwner||!k.repoName)continue;const I=`${k.repoOwner}/${k.repoName}`;for(const R of k.pullRequests??[]){const Z=`${I.toLowerCase()}#${R.number}`;if(C.has(Z))continue;C.add(Z);const K=R.url||`https://github.com/${I}/pull/${R.number}`,ee=i!==void 0&&I.toLowerCase()===i;M.push({number:R.number,title:a(R),url:K,htmlUrl:K,status:li(R.status),createdAt:R.createdAt,updatedAt:R.updatedAt,crossRepo:ee?void 0:I,crossRepoDisplay:ee?void 0:Fi(I,A)})}}return{own:w,otherRoots:Da(M,v,r),otherTracked:Da(h,m,r)}}function eo(t){return t.status!=="open"?!1:t.monitorSnapshot?t.monitorSnapshot.isInMergeQueue===!0:t.isInMergeQueue===!0}function h6(t){const e=t.status==="merged"?ie.workspace_prSection_merged_label():t.status==="closed"?ie.workspace_prSection_closed_label():t.status==="draft"?ie.workspace_prSection_statusDraft_label():eo(t)?ie.workspace_prSection_statusQueued_label():ie.workspace_prSection_statusOpen_label(),r=[_1(t)??e],n=eo(t)?hh(t.monitorSnapshot?.mergeQueue):null;n&&r.push(n);const a=t.status==="merged"||t.status==="closed"?void 0:t.monitorSnapshot;return a&&(a.checks.total===null||a.checks.passed===null||a.checks.failed===null||a.checks.pending===null||a.availability&&a.availability.checks!=="available"?r.push(ie.chat_monitoredPrs_hover_checksUnknown_label()):a.checks.total>0&&r.push(ie.workspace_prSection_statusChecks_tooltip({passed:rt(a.checks.passed),failed:rt(a.checks.failed),pending:rt(a.checks.pending)})),r.push(a.approvals.have===null||a.availability&&a.availability.approvals!=="available"?ie.chat_monitoredPrs_hover_approvalsUnknown_label():a.approvals.needed!=null?ie.workspace_prSection_statusApprovalsOfNeeded_tooltip({count:rt(a.approvals.have),needed:rt(a.approvals.needed)}):ie.workspace_prSection_statusApprovals_tooltip({count:rt(a.approvals.have)})),a.approvals.changesRequested!==null&&a.approvals.changesRequested>0&&r.push(ie.workspace_prSection_statusChangesRequested_tooltip({count:rt(a.approvals.changesRequested)})),a.availability&&a.availability.discussions!=="available"?r.push(ie.workspace_prSection_statusUnresolvedThreadsUnknown_tooltip()):typeof a.threads.unresolved=="number"?a.threads.unresolved>0&&r.push(ie.workspace_prSection_statusUnresolvedThreads_tooltip({count:rt(a.threads.unresolved)})):a.threads.resolutionRequired&&r.push(ie.workspace_prSection_statusUnresolvedThreadsUnknown_tooltip()),a.mergeBlockedReason&&r.push(Ph(a.mergeBlockedReason))),r.join(`
2
2
  `)}function d6(t,e){return e.has(t??"manual")}function p6(t,e){return{path:t.relativePath,additions:t.stats.additions,deletions:t.stats.deletions,staged:e,status:t.status,attribution:t.attribution?.agent?{agentId:t.attribution.agent.agentId,agentName:t.attribution.agent.agentName,sessionId:t.attribution.agent.sessionId,turnNumber:t.attribution.agent.turnNumber,timestamp:t.attribution.timestamp}:void 0}}const oc=500;function m6(t,e=oc){const r=Math.max(0,Math.floor(e));return t.length<=r?{visible:t,shown:t.length,hiddenCount:0}:{visible:t.slice(0,r),shown:r,hiddenCount:t.length-r}}function f6(t,e,r=oc){let n=Math.max(0,Math.floor(r)),a=0,i=0;return{groups:t.map(o=>{if(e(o))return{group:o,visibleFiles:[]};const c=Math.min(n,o.files.length);return n-=c,a+=c,i+=o.files.length-c,{group:o,visibleFiles:c===o.files.length?o.files:o.files.slice(0,c)}}),shown:a,hiddenCount:i}}function g6(t){if(t.hiddenCount<=0)return"";const e=rt(t.shown),r=rt(t.shown+t.hiddenCount);return t.hiddenCount===1?ie.workspace_fileChanges_hiddenFiles_one({shown:e,total:r}):ie.workspace_fileChanges_hiddenFiles_many({shown:e,total:r,count:rt(t.hiddenCount)})}function qh(t){if(!t)return{};try{const e=JSON.parse(t);return e&&typeof e=="object"?e:{}}catch{return{}}}function ci(t){return t.startsWith("@")?t.slice(1):t}function Fh(t,e,r,n){const a=t.fullPath||t.path||t.filename;if(a)return ci(String(a));const i=[r,e,n.trim()].map(ci).filter(Boolean),s=i.find(o=>o.includes("/"))??i[0];return s?L1(s).path:void 0}function Hh(t){const e=t.line??t.startLine??t.range?.start;return typeof e=="number"&&Number.isFinite(e)?e:void 0}function Uh(t){if(!t||t.getAttribute("data-mention")===null)return null;const e=t.getAttribute("data-type")||"",r=t.getAttribute("data-id")||"",n=t.getAttribute("data-label")||"",a=t.getAttribute("data-uri")||"",i=qh(t.getAttribute("data-meta")),s={type:e,id:r,label:n,uri:a,meta:i},o=a.startsWith("intent://")?a:typeof i.fullUrl=="string"&&i.fullUrl.startsWith("intent://")?i.fullUrl:void 0;if(o&&(s.intentUrl=o),e==="file"||e==="file-range"){const c=Fh(i,n,r,t.textContent||"");c&&(s.filePath=c);const h=Hh(i);h!==void 0&&(s.line=h)}else if(e==="folder"||e==="source-folder"){const c=i.fullPath||i.path||r||n,h=c?ci(String(c)).replace(/\/+$/,""):"";h&&(s.folderPath=h)}else if(e==="note"||e==="note-range"){const c=i.noteId||r;c&&(s.note=i.isExternalLink&&i.workspaceId?{id:c,workspaceId:String(i.workspaceId)}:{id:c})}return s}function v6(t){return{sidebarTabId:"files",type:"file",filePath:`${t}/`}}function Hi(){return{async:!1,breaks:!1,extensions:null,gfm:!0,hooks:null,pedantic:!1,renderer:null,silent:!1,tokenizer:null,walkTokens:null}}var Fr=Hi();function lc(t){Fr=t}var Nr={exec:()=>null};function Cr(t){let e=[];return r=>{let n=Math.max(0,Math.min(3,r-1)),a=e[n];return a||(a=t(n),e[n]=a),a}}function oe(t,e=""){let r=typeof t=="string"?t:t.source,n={replace:(a,i)=>{let s=typeof i=="string"?i:i.source;return s=s.replace(Ue.caret,"$1"),r=r.replace(a,s),n},getRegex:()=>new RegExp(r,e)};return n}var cc=((t="")=>{try{return!!new RegExp("(?<=1)(?<!1)"+t)}catch{return!1}})(),Ue={codeRemoveIndent:/^(?: {0,3}\t| {1,4})/gm,listInterruptsParagraph:/^ {0,3}(?:[*+-]|1[.)])[ \t]+[^ \t\n]/,outputLinkReplace:/\\([\[\]])/g,indentCodeCompensation:/^(\s+)(?:```)/,beginningSpace:/^\s+/,endingHash:/#$/,startingSpaceChar:/^ /,endingSpaceChar:/ $/,endingSpaceTabChar:/[ \t]$/,nonSpaceChar:/[^ ]/,newLineCharGlobal:/\n/g,tabCharGlobal:/\t/g,leadingSpaceTab:/^[ \t]+/,multipleSpaceGlobal:/\s+/g,blankLine:/^[ \t]*$/,doubleBlankLine:/\n[ \t]*\n[ \t]*$/,blockquoteStart:/^ {0,3}>/,blockquoteSetextReplace:/\n {0,3}((?:=+|-+)[ \t]*)(?=\n|$)/g,blockquoteSetextReplace2:/^ {0,3}>[ \t]?/gm,blockquoteMarkerWhitespace:/^( {0,3}>)(\t[ \t]*)/gm,nestedBlockMarker:/^ {0,3}(?:(?:[*+-]|\d{1,9}[.)])(?: |$)|> ?)/,listReplaceNesting:/^ {1,4}(?=( {4})*[^ ])/g,listIsTask:/^\[[ xX]\][ \t]+\S/,listReplaceTask:/^\[[ xX]\][ \t]+/,listTaskCheckbox:/\[[ xX]\]/,anyLine:/\n.*\n/,hrefBrackets:/^<(.*)>$/,tableDelimiter:/[:|]/,tableAlignChars:/^\||\| *$/g,tableRowBlankLine:/\n[ \t]*$/,tableAlignRight:/^ *-+: *$/,tableAlignCenter:/^ *:-+: *$/,tableAlignLeft:/^ *:-+ *$/,startATag:/^<a /i,endATag:/^<\/a>/i,startPreScriptTag:/^<(pre|code|kbd|script)(\s|>)/i,endPreScriptTag:/^<\/(pre|code|kbd|script)(\s|>)/i,startAngleBracket:/^</,endAngleBracket:/>$/,pedanticHrefTitle:/^([^'"]*[^\s])\s+(['"])(.*)\2/,unicodeAlphaNumeric:/[\p{L}\p{N}]/u,numericCharacterReference:/&#(?:(\d{1,7})|[Xx]([A-Fa-f0-9]{1,6}));/,numericCharacterReferenceOrAmpersand:/&#(?:(\d{1,7})|[Xx]([A-Fa-f0-9]{1,6}));|&(?!(#\d{1,7}|#[Xx][a-fA-F0-9]{1,6}|\w+);)/g,escapeTest:/[&<>"']/,escapeReplace:/[&<>"']/g,escapeTestNoEncode:/[<>"']|&(?!(#\d{1,7}|#[Xx][a-fA-F0-9]{1,6}|\w+);)/,escapeReplaceNoEncode:/[<>"']|&(?!(#\d{1,7}|#[Xx][a-fA-F0-9]{1,6}|\w+);)/g,caret:/(^|[^\[])\^/g,percentDecode:/%25/g,findPipe:/\|/g,splitPipe:/ \|/,slashPipe:/\\\|/g,carriageReturn:/\r\n|\r/g,spaceLine:/^ +$/gm,notSpaceStart:/^\S*/,endingNewline:/\n$/,listItemRegex:t=>new RegExp(`^( {0,3}${t})((?:[ ][^\\n]*)?(?:\\n|$))`),nextBulletRegex:Cr(t=>new RegExp(`^ {0,${t}}(?:[*+-]|\\d{1,9}[.)])((?:[ ][^\\n]*)?(?:\\n|$))`)),hrRegex:Cr(t=>new RegExp(`^ {0,${t}}((?:-[ ]*){3,}|(?:_[ ]*){3,}|(?:\\*[ ]*){3,})(?:\\n+|$)`)),fencesBeginRegex:Cr(t=>new RegExp(`^ {0,${t}}(?:\`\`\`|~~~)`)),headingBeginRegex:Cr(t=>new RegExp(`^ {0,${t}}#{1,6}(?:\\s|$)`)),pedanticHeadingBeginRegex:Cr(t=>new RegExp(`^ {0,${t}}#`)),htmlBeginRegex:Cr(t=>new RegExp(`^ {0,${t}}(?:</?(?:${Wi})(?:[ \\t]+|$|/?>)|<(?:(?:script|pre|style|textarea)(?:[\\s>]|$)|!--)|<\\?|<![A-Za-z]|<!\\[CDATA\\[)`,"i")),blockquoteBeginRegex:Cr(t=>new RegExp(`^ {0,${t}}>`)),nestedContainerMarkers:/^(?: {0,3}(?:(?:[*+-]|\d{1,9}[.)])[ \t]+|>[ \t]?))+/},Wh=/^(?:[ \t]*(?:\n|$))+/,Gh=/^((?: {4}| {0,3}\t)[^\n]+(?:\n(?:[ \t]*(?:\n|$))*)?)+/,jh=/^ {0,3}(`{3,}(?=[^`\n]*(?:\n|$))|~{3,})([^\n]*)(?:\n|$)(?:|([\s\S]*?)(?:\n|$))(?: {0,3}(?:(?=`)\1`*|(?=~)\1~*) *(?=\n|$)|$)/,Kn=/^ {0,3}((?:-[\t ]*){3,}|(?:_[ \t]*){3,}|(?:\*[ \t]*){3,})(?:\n+|$)/,Vh=/^ {0,3}(#{1,6})(?=\s|$)(.*)(?:\n+|$)/,Ui=/ {0,3}(?:[*+-]|\d{1,9}[.)])/,Wi="address|article|aside|base|basefont|blockquote|body|caption|center|col|colgroup|dd|details|dialog|dir|div|dl|dt|fieldset|figcaption|figure|footer|form|frame|frameset|h[1-6]|head|header|hr|html|iframe|legend|li|link|main|menu|menuitem|meta|nav|noframes|ol|optgroup|option|p|param|search|section|summary|table|tbody|td|tfoot|th|thead|title|tr|track|ul",Xn=oe(" {0,3}(?:</?(?:tag)(?:[ \\t]+|\\n|/?>)|<(?:(?:script|pre|style|textarea)(?:[\\s>]|$)|!--)|<\\?|<![A-Za-z]|<!\\[CDATA\\[)").replace("tag",Wi).getRegex(),uc=/^(?!bull |blockCode|fences|blockquote|heading|html|table)((?:.|\n(?!\s*?\n|bull |fences|blockquote|heading|hr|html|table))+?)\n {0,3}(=+|-+)[ \t]*(?:\n+|$)/,hc=oe(uc).replace(/bull/g,Ui).replace(/blockCode/g,/(?: {4}| {0,3}\t)/).replace(/fences/g,/ {0,3}(?:`{3,}|~{3,})/).replace(/blockquote/g,/ {0,3}>/).replace(/heading/g,/ {0,3}#{1,6}(?:\s|$)/).replace(/hr/g,/ {0,3}(?:(?:-[\t ]*){3,}|(?:_[ \t]*){3,}|(?:\*[ \t]*){3,})(?:\n+|$)/).replace(/\|table/g,"").replace(/html/g,Xn).getRegex(),Kh=oe(uc).replace(/bull/g,Ui).replace(/blockCode/g,/(?: {4}| {0,3}\t)/).replace(/fences/g,/ {0,3}(?:`{3,}|~{3,})/).replace(/blockquote/g,/ {0,3}>/).replace(/heading/g,/ {0,3}#{1,6}(?:\s|$)/).replace(/hr/g,/ {0,3}(?:(?:-[\t ]*){3,}|(?:_[ \t]*){3,}|(?:\*[ \t]*){3,})(?:\n+|$)/).replace(/table/g,/ {0,3}\|?(?:[:\- ]*\|)+[\:\- ]*\n/).replace(/html/g,Xn).getRegex(),Gi=/^([^\n]+(?:\n(?!hr|heading|lheading|blockquote|fences|list|html|table|[ \t]+\n)[^\n]+)*)/,Xh=/^[^\n]+/,ji=/(?!\s*\])(?:\\[\s\S]|[^\[\]\\\n]|\n(?![ \t]*\n))+/,Yh=oe(/^ {0,3}\[(label)\]: *(?:\n[ \t]*)?([^<\s][^\s]*|<(?:\\.|[^\n<>\\])*>)(?:(?: +(?:\n[ \t]*)?| *\n[ \t]*)(title))? *(?:\n+|$)/).replace("label",ji).replace("title",/(?:"(?:\\[\s\S]|[^"\\])*"|'(?:\\[\s\S]|[^'\\\n]|\n(?!\n))*'|\((?:\\[\s\S]|[^()\\])*\))/).getRegex(),Zh=oe(/^(bull)([ \t][^\n]*?)?(?:\n|$)/).replace(/bull/g,Ui).getRegex(),Vi=/<!--(?:-?>|[\s\S]*?(?:-->|$))/,Qh=oe("^ {0,3}(?:<(script|pre|style|textarea)[\\s>][\\s\\S]*?(?:</\\1>[^\\n]*\\n*|$)|comment[^\\n]*(\\n+|$)|<\\?[\\s\\S]*?(?:\\?>[^\\n]*\\n*|$)|<![A-Z][\\s\\S]*?(?:>[^\\n]*\\n*|$)|<!\\[CDATA\\[[\\s\\S]*?(?:\\]\\]>[^\\n]*\\n*|$)|</?(tag)(?:[ \\t]+|\\n|/?>|$)[\\s\\S]*?(?:(?:\\n[ ]*)+\\n|$)|<(?!(?:script|pre|style|textarea)(?![a-z0-9-]))([a-z][a-z0-9-]*)(?:attribute)*?[ \\t]*/?>(?=[ \\t]*(?:\\n|$))[\\s\\S]*?(?:(?:\\n[ ]*)+\\n|$)|</[a-z][a-z0-9-]*\\s*>(?=[ \\t]*(?:\\n|$))[\\s\\S]*?(?:(?:\\n[ ]*)+\\n|$))","i").replace("comment",Vi).replace("tag",Wi).replace("attribute",/[ \t]+[a-zA-Z:_][\w.:-]*(?:[ \t]*=[ \t]*"[^"\n]*"|[ \t]*=[ \t]*'[^'\n]*'|[ \t]*=[ \t]*[^\s"'=<>`]+)?/).getRegex(),dc=t=>oe(Gi).replace("hr",Kn).replace("heading"," {0,3}#{1,6}(?:\\s|$)").replace("|lheading","").replace("|table","").replace("blockquote"," {0,3}>").replace("fences"," {0,3}(?:`{3,}(?=[^`\\n]*(?:\\n|$))|~~~)[^\\n]*(?:\\n|$)").replace("list",t).replace("html",Xn).getRegex(),Jh=dc(/ {0,3}(?:[*+-]|1[.)])[ \t]+[^ \t\n]/),ed=dc(/ {0,3}(?:[*+-]|\d{1,9}[.)])(?:[ \t]|\n|$)/),td=oe(/^( {0,3}> ?(?:(?![ \t]*(?:\n|$))(paragraph)|[^\n]*)(?:\n|$))+/).replace("paragraph",ed).getRegex(),Ki={blockquote:td,code:Gh,def:Yh,fences:jh,heading:Vh,hr:Kn,html:Qh,lheading:hc,list:Zh,newline:Wh,paragraph:Jh,table:Nr,text:Xh},to=oe("^ *([^\\n ].*)\\n {0,3}((?:\\| *)?:?-+:? *(?:\\| *:?-+:? *)*(?:\\| *)?)(?:\\n((?:(?! *\\n|hr|heading|blockquote|code|fences|list|html).*(?:\\n|$))*)\\n*|$)").replace("hr",Kn).replace("heading"," {0,3}#{1,6}(?:\\s|$)").replace("blockquote"," {0,3}>").replace("code","(?: {4}| {0,3} )[^\\n]").replace("fences"," {0,3}(?:`{3,}(?=[^`\\n]*(?:\\n|$))|~~~)[^\\n]*(?:\\n|$)").replace("list"," {0,3}(?:[*+-]|1[.)])[ \\t]").replace("html",Xn).getRegex(),rd={...Ki,lheading:Kh,table:to,paragraph:oe(Gi).replace("hr",Kn).replace("heading"," {0,3}#{1,6}(?:\\s|$)").replace("|lheading","").replace("table",to).replace("blockquote"," {0,3}>").replace("fences"," {0,3}(?:`{3,}(?=[^`\\n]*(?:\\n|$))|~~~)[^\\n]*(?:\\n|$)").replace("list"," {0,3}(?:[*+-]|1[.)])[ \\t]+[^ \\t\\n]").replace("html",Xn).getRegex()},nd={...Ki,html:oe(`^ *(?:comment(?: *\\n|\\s*$)|<(tag)[\\s\\S]+?</\\1>(?: *\\n{2,}|\\s*$)|<tag(?:"[^"]*"|'[^']*'|\\s[^'"/>\\s]*)*?/?>(?: *\\n{2,}|\\s*$))`).replace("comment",Vi).replace(/tag/g,"(?!(?:a|em|strong|small|s|cite|q|dfn|abbr|data|time|code|var|samp|kbd|sub|sup|i|b|u|mark|ruby|rt|rp|bdi|bdo|span|br|wbr|ins|del|img)\\b)\\w+(?!:|[^\\w\\s@]*@)\\b").getRegex(),def:/^ *\[([^\]]+)\]: *<?([^\s>]+)>?(?: +(["(][^\n]+[")]))? *(?:\n+|$)/,heading:/^(#{1,6})(.*)(?:\n+|$)/,fences:Nr,lheading:/^(.+?)\n {0,3}(=+|-+) *(?:\n+|$)/,paragraph:oe(Gi).replace("hr",Kn).replace("heading",` *#{1,6} *[^
3
3
  ]`).replace("|table","").replace("blockquote"," {0,3}>").replace("|fences","").replace("|list","").replace("|html","").replace("|tag","").replace("lheading",hc).getRegex()},ad=/^\\([!"#$%&'()*+,\-./:;<=>?@\[\]\\^_`{|}~])/,id=/^(`+)([^`]|[^`][\s\S]*?[^`])\1(?!`)/,pc=/^( {2,}|\\)\n(?!\s*$)[ \t]*/,sd=/^(`+|[^`])(?:(?= {2,}\n)|[\s\S]*?(?:(?=[\\<!\[`*_]|\b_|$)|[^ ](?= {2,}\n)))/,Pt=/[\p{P}\p{S}]/u,kn=/[\s\p{P}\p{S}]/u,Yn=/[^\s\p{P}\p{S}]/u,od=oe(/^((?![*_])punctSpace)/,"u").replace(/punctSpace/g,kn).getRegex(),ld=/[\p{Pi}\p{Ps}"']/u,mc=/(?!~)[\p{P}\p{S}]/u,cd=/(?!~)[\s\p{P}\p{S}]/u,ud=/(?:[^\s\p{P}\p{S}]|~)/u,hd=oe(/link|precode-code|html/,"g").replace("link",/\[(?:[^\[\]`]|(?<a>`+)[^`]+\k<a>(?!`))*?\]\((?:\\[\s\S]|[^\\\(\)]|\((?:\\[\s\S]|[^\\\(\)])*\))*\)/).replace("precode-",cc?"(?<!`)()":"(^^|[^`])").replace("code",/(?<b>`+)[^`]+\k<b>(?!`)/).replace("html",/<(?! )[^<>]*?>/).getRegex(),fc=/^(?:\*+(?:((?!\*)punct)|([^\s*]))?)|^_+(?:((?!_)punct)|([^\s_]))?/,dd=oe(fc,"u").replace(/punct/g,Pt).getRegex(),pd=oe(fc,"u").replace(/punct/g,mc).getRegex(),md=/^(?:\*+(?:((?!\*)(?!openQuote)punct)|([^\s*]))?)|^_+(?:((?!_)(?!openQuote)punct)|([^\s_]))?/,fd=oe(md,"u").replace(/openQuote/g,ld).replace(/punct/g,Pt).getRegex(),gc="^[^_*]*?__[^_*]*?\\*[^_*]*?(?=__)|[^*]+(?=[^*])|(?!\\*)punct(\\*+)(?=[\\s]|$)|notPunctSpace(\\*+)(?!\\*)(?=punctSpace|$)|(?!\\*)punctSpace(\\*+)(?=notPunctSpace)|[\\s](\\*+)(?!\\*)(?=punct)|(?!\\*)punct(\\*+)(?!\\*)(?=punct)|notPunctSpace(\\*+)(?=notPunctSpace)",gd=oe(gc,"gu").replace(/notPunctSpace/g,Yn).replace(/punctSpace/g,kn).replace(/punct/g,Pt).getRegex(),vd=oe(gc,"gu").replace(/notPunctSpace/g,ud).replace(/punctSpace/g,cd).replace(/punct/g,mc).getRegex(),bd="^[^_*]*?__[^_*]*?\\*[^_*]*?(?=__)|[^*]+(?=[^*])|(?!\\*)punct(\\*+)(?=[\\s]|$)|notPunctSpace(\\*+)(?!\\*)(?=punctSpace|$)|(?!\\*)[\\s](\\*+)(?=notPunctSpace)|[\\s](\\*+)(?!\\*)(?=punct)|(?!\\*)punct(\\*+)(?!\\*)(?=punct)|(?:(?!\\*)punct|notPunctSpace)(\\*+)(?!\\*)(?=notPunctSpace)",yd=oe(bd,"gu").replace(/notPunctSpace/g,Yn).replace(/punctSpace/g,kn).replace(/punct/g,Pt).getRegex(),wd=oe("^[^_*]*?\\*\\*[^_*]*?_[^_*]*?(?=\\*\\*)|[^_]+(?=[^_])|(?!_)punct(_+)(?=[\\s]|$)|notPunctSpace(_+)(?!_)(?=punctSpace|$)|(?!_)punctSpace(_+)(?=notPunctSpace)|[\\s](_+)(?!_)(?=punct)|(?!_)punct(_+)(?!_)(?=punct)","gu").replace(/notPunctSpace/g,Yn).replace(/punctSpace/g,kn).replace(/punct/g,Pt).getRegex(),kd="^[^_*]*?\\*\\*[^_*]*?_[^_*]*?(?=\\*\\*)|[^_]+(?=[^_])|(?!_)punct(_+)(?=[\\s]|$)|notPunctSpace(_+)(?!_)(?=punctSpace|$)|(?!_)[\\s](_+)(?=notPunctSpace)|[\\s](_+)(?!_)(?=punct)|(?!_)punct(_+)(?!_)(?=punct)|(?:(?!_)punct|notPunctSpace)(_+)(?!_)(?=notPunctSpace)",xd=oe(kd,"gu").replace(/notPunctSpace/g,Yn).replace(/punctSpace/g,kn).replace(/punct/g,Pt).getRegex(),Sd=oe(/^~~?(?:((?!~)punct)|[^\s~])/,"u").replace(/punct/g,Pt).getRegex(),Ad="^[^~]+(?=[^~])|(?!~)punct(~~?)(?=[\\s]|$)|notPunctSpace(~~?)(?!~)(?=punctSpace|$)|(?!~)punctSpace(~~?)(?=notPunctSpace)|[\\s](~~?)(?!~)(?=punct)|(?!~)punct(~~?)(?!~)(?=punct)|notPunctSpace(~~?)(?=notPunctSpace)",Td=oe(Ad,"gu").replace(/notPunctSpace/g,Yn).replace(/punctSpace/g,kn).replace(/punct/g,Pt).getRegex(),Ed=oe(/\\(punct)/,"gu").replace(/punct/g,Pt).getRegex(),Cd=oe(/(`+)(?:[^`]|[^`][\s\S]*?[^`])\1(?!`)|`+|\\(punct)/,"gu").replace(/punct/g,Pt).getRegex(),Md=oe(/^<(scheme:[^\s\x00-\x1f<>]*|email)>/).replace("scheme",/[a-zA-Z][a-zA-Z0-9+.-]{1,31}/).replace("email",/[a-zA-Z0-9.!#$%&'*+/=?^_`{|}~-]+(@)[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?(?:\.[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?)+(?![-_])/).getRegex(),Id=oe(Vi).replace("(?:-->|$)","-->").getRegex(),zd=oe("^comment|^</[a-zA-Z][a-zA-Z0-9-]*\\s*>|^<[a-zA-Z][a-zA-Z0-9-]*(?:attribute)*?\\s*/?>|^<\\?[\\s\\S]*?\\?>|^<![a-zA-Z]+\\s[\\s\\S]*?>|^<!\\[CDATA\\[[\\s\\S]*?\\]\\]>").replace("comment",Id).replace("attribute",/\s+[a-zA-Z:_][\w.:-]*(?:\s*=\s*"[^"]*"|\s*=\s*'[^']*'|\s*=\s*[^\s"'=<>`]+)?/).getRegex(),vc=/\[(?:\\[\s\S]|[^\[\]\\])*\]/,q0=oe(/(?:\[(?:brackets|\\[\s\S]|[^\[\]\\])*\]|\\[\s\S]|`+(?!`)[^`]*?`+(?!`)|``+(?=\])|[^\[\]\\`])*?/).replace("brackets",vc).getRegex(),Rd=oe(/^!?\[(label)\]\([ \t\n]*(href)(?:(?:[ \t]+(?:\n[ \t]*)?|\n[ \t]*)(title))?[ \t\n]*\)/).replace("label",q0).replace("href",/<(?:\\.|[^\n<>\\])*>|(?!<)[^ \t\n\x00-\x1f]+|(?=\))/).replace("title",/"(?:\\[\s\S]|[^"\\])*"|'(?:\\[\s\S]|[^'\\])*'|\((?:\\[\s\S]|[^)\\])*\)/).getRegex(),Dd=oe(/^!?\[(label)\]\[(ref)\]/).replace("label",q0).replace("ref",ji).getRegex(),Nd=oe(/^!?\[(ref)\](?:\[\])?/).replace("ref",ji).getRegex(),ro=/(?!\s*\])(?:\\[\s\S]|[^\[\]\\]){1,999}/,Pd=oe(/(?:[^\[\]\\`]*(?:\[(?:brackets|\\[\s\S]|[^\[\]\\])*\]|\\[\s\S]|`+(?!`)[^`]*?`+(?!`)|``+(?=\]))){0,999}?[^\[\]\\`]*?/).replace("brackets",vc).getRegex(),_d=oe("reflink|nolink(?!\\()","g").replace("reflink",oe(/^!?\[(label)\]\[(ref)\]/).replace("label",Pd).replace("ref",ro).getRegex()).replace("nolink",oe(/^!?\[(ref)\](?:\[\])?/).replace("ref",ro).getRegex()).getRegex(),no=/[hH][tT][tT][pP][sS]?|[fF][tT][pP]/,Ld=/[A-Za-z0-9._+-]+@[a-zA-Z0-9-_]+(?:\.[a-zA-Z0-9-_]*[a-zA-Z0-9])+(?![\w-])/,Od=oe(/(?:mailto:email|xmpp:email(?:\/[A-Za-z0-9@.]+)?)/).replace(/email/g,Ld).getRegex(),Xi={_backpedal:Nr,anyPunctuation:Ed,anyPunctuationOutsideCode:Cd,autolink:Md,blockSkip:hd,br:pc,code:id,del:Nr,delLDelim:Nr,delRDelim:Nr,emStrongLDelim:dd,emStrongRDelimAst:gd,emStrongRDelimUnd:wd,escape:ad,link:Rd,nolink:Nd,punctuation:od,reflink:Dd,reflinkSearch:_d,tag:zd,text:sd,url:Nr},$d={...Xi,emStrongLDelim:fd,emStrongRDelimAst:yd,emStrongRDelimUnd:xd,link:oe(/^!?\[(label)\]\((.*?)\)/).replace("label",q0).getRegex(),reflink:oe(/^!?\[(label)\]\s*\[([^\]]*)\]/).replace("label",q0).getRegex()},ui={...Xi,emStrongRDelimAst:vd,emStrongLDelim:pd,delLDelim:Sd,delRDelim:Td,url:oe(/^emailProtocol|^((?:protocol):\/\/|www\.)(?:[a-zA-Z0-9\-]+\.?)+[^\s<]*|^email/).replace("emailProtocol",Od).replace("protocol",no).replace("email",/[A-Za-z0-9._+-]+(@)[a-zA-Z0-9-_]+(?:\.[a-zA-Z0-9-_]*[a-zA-Z0-9])+(?![\w-])/).getRegex(),_backpedal:/(?:[^?!.,:;*_'"~()&]+|\([^)]*\)|&(?![a-zA-Z0-9]+;$)|[?!.,:;*_'"~)]+(?!$))+/,del:/^(~~?)(?=[^\s~])((?:\\[\s\S]|[^\\])*?(?:\\[\s\S]|[^\s~\\]))\1(?=[^~]|$)/,text:oe(/^(?:[^a-zA-Z0-9](?=emailProtocol)|(`+|~+|[^`~])(?:(?=[`~])|(?= {2,}\n)|(?=[a-zA-Z0-9.!#$%&'*+\/=?_`{\|}~-]+@)|[\s\S]*?(?:(?=[\\<!\[`*~_]|\b_|protocol:\/\/|wwwStart|$)|[^ ](?= {2,}\n)|[^a-zA-Z0-9](?=emailProtocol)|[^a-zA-Z0-9.!#$%&'*+\/=?_`{\|}~-](?=[a-zA-Z0-9.!#$%&'*+\/=?_`{\|}~-]+@))))/).replace("protocol",no).replace(/emailProtocol/g,/(?:mailto|xmpp):/).replace("wwwStart",cc?"(?<![^\\s*_~(])www\\.":"www\\.").getRegex()},Bd={...ui,br:oe(pc).replace("{2,}","*").getRegex(),text:oe(ui.text).replace("\\b_","\\b_| {2,}\\n").replace(/\{2,\}/g,"*").getRegex()},S0={normal:Ki,gfm:rd,pedantic:nd},Mn={normal:Xi,gfm:ui,breaks:Bd,pedantic:$d},qd={"&":"&amp;","<":"&lt;",">":"&gt;",'"':"&quot;","'":"&#39;"},ao=t=>qd[t];function mt(t,e){if(e){if(Ue.escapeTest.test(t))return t.replace(Ue.escapeReplace,ao)}else if(Ue.escapeTestNoEncode.test(t))return t.replace(Ue.escapeReplaceNoEncode,ao);return t}function Fd(t){return Ue.numericCharacterReference.test(t)?t.replace(Ue.numericCharacterReferenceOrAmpersand,(e,r,n)=>{if(r===void 0&&n===void 0)return"&amp;";let a=r===void 0?Number.parseInt(n,16):Number.parseInt(r,10);return a===0||a>1114111||a>=55296&&a<=57343?"�":a===38?"&amp;":String.fromCodePoint(a)}):t}function io(t){try{t=encodeURI(t).replace(Ue.percentDecode,"%")}catch{return null}return t}function so(t,e){let r=t.replace(Ue.findPipe,(i,s,o)=>{let c=!1,h=s;for(;--h>=0&&o[h]==="\\";)c=!c;return c?"|":" |"}),n=r.split(Ue.splitPipe),a=0;if(n[0].trim()||n.shift(),n.length>0&&!n.at(-1)?.trim()&&n.pop(),e)if(n.length>e)n.splice(e);else for(;n.length<e;)n.push("");for(;a<n.length;a++)n[a]=n[a].trim().replace(Ue.slashPipe,"|");return n}function qt(t,e,r){let n=t.length;if(n===0)return"";let a=0;for(;a<n&&t.charAt(n-a-1)===e;)a++;return t.slice(0,n-a)}function oo(t){let e=t.split(`
4
4
  `),r=e.length-1;for(;r>=0&&Ue.blankLine.test(e[r]);)r--;return e.length-r<=2?t:e.slice(0,r+1).join(`
@@ -475,6 +475,6 @@ ${JSON.stringify(Q,null,2)}
475
475
 
476
476
  `).trim().replace(z2,`
477
477
  `),de.debug("[markdown-processor] processHTMLToMarkdown OUTPUT:",{markdownLength:R.length,preservedAnchors:r}),R}typeof window<"u"&&(window.__clearMarkdownCache=T2);const Pl={major:15,minor:3},Ou="workspace-create:initializeGit",B2="~/Documents",_l="~/Developer";function q2(t){return rc(t,Pl.major,Pl.minor)}function C6(t){return t.some(e=>!q1(e))}function M6(t){return t.rememberedChoice!==null?t.rememberedChoice:t.hasGitWorkspace||t.githubConnected||t.gitlabConnected||t.githubFailed||t.gitlabFailed?!0:!t.workspacesLoaded||!t.githubSettled||!t.gitlabSettled?null:!1}function I6(t,e){switch(t){case"git-repo":return!e;case"new-repo":return!0;case"clone":return!1;default:return null}}function z6(t){try{const e=t?.getItem(Ou);if(e==="true")return!0;if(e==="false")return!1}catch{}return null}function R6(t,e){try{t?.setItem(Ou,String(e))}catch{}}function D6(t,e){return t&&t!==_l?t:e?B2:_l}function F2(t,e){const r=n=>n.replace(/[\\/]+$/,"");return r(t)===r(e)}function N6(t,e){return e?t.filter(r=>[r.repositoryPath,r.worktreePath,r.path].some(n=>typeof n=="string"&&n.length>0&&F2(n,e))):[]}function P6(t){const e=t.contextLinks?.filter(r=>r.kind!=="pr");return{title:t.title??"",repositoryPath:t.repositoryPath,plainFolder:!0,...e&&e.length>0?{contextLinks:e}:{},...t.linearIssue?{linearIssue:t.linearIssue}:{},...t.sentryIssue?{sentryIssue:t.sentryIssue}:{},...t.initialAgent?{initialAgent:t.initialAgent}:{}}}function _6(t,e){return!t||t.isGitRepo||t.isSubdirectoryOfGitRepo?null:t.exists?t.isDirectory?"existing":null:e===!1?"new":null}function L6(t){return t.labsEnabled&&q2(t.protocolVersion)&&t.githubSettled&&t.gitlabSettled&&!t.githubFailed&&!t.gitlabFailed&&!t.githubConnected&&!t.gitlabConnected}function O6(t,e){return!!t&&!t.plainFolder&&e.checked&&!e.available}const $t=E.createSelector(t=>Yl.select(t)?Vt.select(t):null),H2=E.createSelector(t=>{const e=qr.select(t)?.principal;return e?JSON.stringify([t.connections.windowBackendId,e.id]):null}),$6=E.createSelector(t=>ve(t.workspace.workspaces).map(e=>String(e.id))),B6=E.createSelector((t,e,r=De)=>{const n=$t.select(t),a=xe(t.workspace.workspaces,gn(e)),i=Li(t.workspaceDiscussion,e,r);return n&&t.workspaceDiscussion.context===n&&a&&t.workspaceDiscussion.workspaceIds.includes(e)&&i?{context:n,workspaceId:e,conversationId:r,epoch:i.epoch}:null}),sa=E.createSelector(t=>{const e=t.workspaceDiscussion.owner;if(!e||!fh.select(t)||t.principal.status==="revoked"||t.principal.error==="incompatible-response"||t.connections.authRejected?.id===t.connections.windowBackendId)return!1;const r=H2.select(t);if(r)return r===e;try{const[n,a]=JSON.parse(e),i=t.principal.boundPrincipalId??t.principal.snapshot?.principal.id;return n===t.connections.windowBackendId&&(i==null||i===a)}catch{return!1}}),Nt=E.createSelector((t,e,r=De)=>{if(!xe(t.workspace.workspaces,gn(e))||!sa.select(t))return w0;const a=Li(t.workspaceDiscussion,e,r)??w0;return r!==De&&r!==Xt&&(!a.authorized||!a.initialized&&t.workspaceDiscussion.conversationsSupported!==!0)?{...a,draft:"",agentMentions:[],principalMentions:[],messages:w0.messages,pending:w0.pending}:a}),U2=E.createSelector((t,e,r=De)=>Nt.select(t,e,r).authorized?ve(Nt.select(t,e,r).messages):[]),q6=E.createSelector((t,e,r=De)=>Nt.select(t,e,r).authorized?ve(Nt.select(t,e,r).pending):[]),W2=E.createSelector((t,e,r=De)=>{const n=xe(t.workspace.workspaces,gn(e)),a=Nt.select(t,e,r);return!!$t.select(t)&&!!n&&!t.workspaceDiscussion.deletedKeys.includes(JSON.stringify([e,r]))&&(r===De||(r===Xt?t.workspaceDiscussion.managementSupported===!0:(t.workspaceDiscussion.conversationsSupported===!0||t.workspaceDiscussion.managementSupported===!0)&&a.authorized))&&!a.unsupported&&a.error!=="forbidden"}),F6=E.createSelector(t=>t.workspaceDiscussion.requestedIds),H6=E.createSelector(t=>t.workspaceDiscussion.requestedIds.filter(e=>{const[r,n]=JSON.parse(e);return!Li(t.workspaceDiscussion,r,n)})),$u=E.createSelector((t,e)=>qu.select(t)===!0&&!!$t.select(t)&&!!Zl.select(t,e)),G2=E.createSelector((t,e)=>$u.select(t,e)&&!Bu.select(t)),r0=E.createSelector((t,e)=>sa.select(t)&&(t.workspaceDiscussion.conversationsSupported===!0||t.workspaceDiscussion.managementSupported===!0)?t.workspaceDiscussion.directories[e]??Xs:Xs),U6=E.createSelector((t,e)=>ve(r0.select(t,e).conversations)),W6=E.createSelector((t,e)=>{if(sa.select(t)&&t.workspaceDiscussion.deletedKeys.includes(JSON.stringify([e,De])))return!1;if(t.workspaceDiscussion.managementSupported!==!0)return!0;const r=r0.select(t,e);return!!xe(r.conversations,De)||r.status!=="ready"||r.hasMore}),G6=E.createSelector((t,e)=>{const r=sa.select(t)?t.workspaceDiscussion.recipients[e]??Ys:Ys,n=Nt.select(t,e,Xt).recipientPrincipalIds;return{status:r.status,query:r.query,members:ve(r.members),selectedMembers:ve(r.knownMembers).filter(a=>n.includes(a.principalId)),hasMore:r.hasMore,error:r.error}});E.createSelector((t,e)=>Nt.select(t,e,Xt).createdConversationId);const j6=E.createSelector(t=>t.workspaceDiscussion.conversationsSupported),V6=E.createSelector(t=>t.workspaceDiscussion.directoryRequestedIds),K6=E.createSelector((t,e)=>t.workspaceDiscussion.recipients[e]),j2=E.createSelector(t=>{const e=qr.select(t)?.principal;return e?{principalId:e.id,login:e.login??null,displayName:e.displayName??null,avatarUrl:e.avatarUrl??null}:null}),X6=E.createSelector((t,e,r=De)=>{const n=Nt.select(t,e,r),a=t.workspaceDiscussion.owner,i=j2.select(t)?.principalId??(a?JSON.parse(a)[1]:null),s=n.readSequence??0,o=U2.select(t,e,r).filter(c=>c.sequence>s&&(c.author.agentId!==void 0||c.author.principalId!==i));return{count:o.length,firstSequence:o[0]?.sequence??null}}),Bu=E.createSelector(t=>t.workspaceDiscussion.context===$t.select(t)&&t.workspaceDiscussion.sharingEnabled===!1),n0=E.createSelector((t,e,r=De)=>(r!==Xt||G2.select(t,e))&&W2.select(t,e,r)&&!Bu.select(t)&&!Z2.select(t,e,r)),Y6=E.createSelector((t,e)=>F1.select(t)&&H1.select(t,e)),Z6=E.createSelector(t=>t.workspaceDiscussion.messageActionsSupported),Q6=E.createSelector((t,e,r=De)=>r!==Xt&&t.workspaceDiscussion.messageActionsSupported===!0&&n0.select(t,e,r)),J6=E.createSelector((t,e,r=De)=>{const n=Nt.select(t,e,r);return n.replyToMessageId&&n.authorized?xe(n.messages,n.replyToMessageId)??null:null}),V2=E.createSelector(t=>t.workspaceDiscussion.context===$t.select(t)?t.workspaceDiscussion.agentMessagingSupported:null),K2=E.createSelector(t=>t.workspaceDiscussion.context===$t.select(t)?t.workspaceDiscussion.agentActivitySupported:null),e7=E.createSelector(t=>t.workspaceDiscussion.context===$t.select(t)?t.workspaceDiscussion.principalMentionsSupported:null),t7=E.createSelector((t,e,r=De)=>r!==Xt&&Q2.select(t,e,r)&&K2.select(t)===!0&&n0.select(t,e,r)),r7=E.createSelector((t,e,r=De)=>ve(Nt.select(t,e,r).agentControls).map(n=>n.key)),n7=E.createSelector(t=>t.workspaceDiscussion.context===$t.select(t)?t.workspaceDiscussion.reactionsSupported:null),qu=E.createSelector(t=>t.workspaceDiscussion.context===$t.select(t)?t.workspaceDiscussion.managementSupported:null),X2=E.createSelector((t,e)=>$t.select(t)===t.workspaceDiscussion.context?t.workspaceDiscussion.management[e]??Zs:Zs),Y2=E.createSelector((t,e,r=De)=>{const n=Zl.select(t,e);return $u.select(t,e)&&(n?.myRole==="owner"||n?.myRole==="manager")&&!t.workspaceDiscussion.deletedKeys.includes(JSON.stringify([e,r]))&&xe(r0.select(t,e).conversations,r)?.kind==="workspace"}),a7=E.createSelector((t,e,r=De)=>Y2.select(t,e,r)&&U1.select(t,e)),i7=E.createSelector((t,e,r)=>{const n=X2.select(t,e);return n.pending!==null&&(r===void 0||n.conversationId===r)}),Z2=E.createSelector((t,e,r=De)=>{const n=xe(r0.select(t,e).conversations,r);return!!n&&n.kind!=="workspace"}),Q2=E.createSelector((t,e,r=De)=>V2.select(t)===!0&&n0.select(t,e,r)&&(r===De||qu.select(t)===!0&&(r===Xt||xe(r0.select(t,e).conversations,r)?.kind==="workspace"))),s7=E.createSelector(t=>t.presence.profileRevision),o7=E.createSelector(t=>t.presence.windowVisible),l7=E.createSelector(t=>t.presence.captureDrawingActive),J2=E.createSelector(t=>Yl.select(t)?Vt.select(t):null),Fu=t=>{const e=J2.select(t);return e!==null&&t.presence.context===e},c7=E.createSelector(t=>gh.select(t).filter(e=>!!xe(t.workspace.workspaces,gn(e)))),cn=[],un=[],Ll=[],e5=(t,e)=>{const r=t.rosters[e];return r?ve(r):cn},Ur=(t,e)=>{const r=xe(t.workspace.workspaces,gn(e));return Fu(t)&&r&&(r.memberCount??1)>1?r:void 0},u7=E.createSelector((t,e)=>{const r=t.presence.ownPrincipalId;if(r===null||!Ur(t,e))return Ll;const n=t.presence.members[e];return n?ve(n).filter(a=>a.principalId!==r&&!!a.login?.trim()):Ll}),bs=(t,e)=>({principalId:t.principalId,login:t.login,displayName:t.displayName,avatarUrl:t.avatarUrl,...t.identity?{identity:t.identity}:{},...t.hostRole?{hostRole:t.hostRole}:{},...e}),t5=t=>t.some(e=>e.online&&!e.self),K0=t=>t.owner?0:t.online?1:2,Hu=E.createSelector((t,e)=>{const r=t.presence.ownPrincipalId;if(r===null||!Ur(t,e))return un;const n=t.presence.members[e];if(!n)return un;const a=t.presence.rosters[e],i=ve(n).filter(s=>s.principalId!==r).map(s=>{const o=a?xe(a,s.principalId):void 0,c=o?{...s,...o}:s;return bs(c,{owner:c.hostRole?c.hostRole==="owner":s.role==="owner",online:o!==void 0,viewing:o?.focus.some(h=>h.workspaceId===e)??!1,self:!1})}).sort((s,o)=>K0(s)-K0(o));return i.length>0?i:un}),h7=E.createSelector((t,e)=>{const r=qr.select(t)?.capabilities.hostMembership;return Hu.select(t,e).filter(n=>r&&!n.hostRole?!1:!n.hostRole||n.hostRole==="guest"||n.online)}),r5=E.createSelector((t,e)=>{if(!Ur(t,e))return un;const r=t.presence.members[e],n=t.presence.rosters[e],a=new Map;for(const s of r?ve(r):[])a.set(s.principalId,s);for(const s of n?ve(n):[])a.set(s.principalId,{...a.get(s.principalId),...s});const i=qr.select(t)?.principal;return i&&i.id===t.presence.ownPrincipalId&&!a.has(i.id)&&a.set(i.id,{...i,principalId:i.id}),[...a.values()]}),d7=E.createSelector((t,e)=>{const r=Hu.select(t,e),n=t.presence.ownPrincipalId,a=r5.select(t,e).find(s=>s.principalId===n);if(!a)return r;const i=Ur(t,e);return[bs(a,{owner:a.hostRole?a.hostRole==="owner":i?.ownerPrincipalId===n,online:!0,viewing:!0,self:!0}),...r]}),p7=E.createSelector((t,e,r)=>{const n=t.presence.ownPrincipalId,a=Ur(t,e);if(n===null||!a)return un;const i=e5(t.presence,e).filter(s=>s.principalId!==n&&s.focus.some(o=>o.workspaceId===e&&o.agentId===r)).map(s=>bs(s,{owner:s.principalId===a.ownerPrincipalId,online:!0,viewing:!0,self:!1})).sort((s,o)=>K0(s)-K0(o));return t5(i)?i:un}),m7=E.createSelector((t,e,r)=>{const n=t.presence.liveTyping[e],a=t.presence.rosters[e];if(!n||!a)return cn;const i=new Set;for(const s of Object.keys(n)){const o=n[s];o.expired||o.agentId!==r||s===t.presence.ownTypingSource||xe(a,o.principalId)&&i.add(o.principalId)}return i.size===0?cn:ve(a).filter(s=>i.has(s.principalId))}),n5=E.createSelector(t=>{const e=t.presence.discussionComposerWorkspaceId;return e&&Fu(t)&&Ur(t,e)&&t.presence.windowVisible&&t.tabState.currentTabId===e&&t.presence.discussionComposerConversationId!==Xt&&n0.select(t,e,t.presence.discussionComposerConversationId)?e:null}),a5=E.createSelector(t=>{const e=n5.select(t);return e?tc(e,t.presence.discussionComposerConversationId):null}),f7=E.createSelector((t,e,r=De)=>{if(r!==De&&!n0.select(t,e,r)||!Ur(t,e)||t.presence.ownPrincipalId===null)return cn;const n=t.presence.liveDiscussionTyping[e],a=t.presence.rosters[e];if(!n||!a)return cn;const i=new Set(Object.entries(n).filter(([s,o])=>!o.expired&&o.conversationId===r&&s!==t.presence.ownTypingSource&&o.principalId!==t.presence.ownPrincipalId).map(([,s])=>s.principalId));return i.size?ve(a).filter(s=>i.has(s.principalId)):cn}),g7=E.createSelector(t=>t.presence.liveDiscussionTyping),i5=E.createSelector(t=>{if(!t.presence.windowVisible)return{focus:[],typing:null};const e=t.tabState.currentTabId;if(!e)return{focus:[],typing:null};const r=[{workspaceId:e}],n=t.panelLayout.byWorkspaceId[e]?.panels??{};for(const i of Object.keys(n).sort()){const s=n[i],o=s.activeTabId?s.tabs.find(c=>c.id===s.activeTabId):void 0;o&&(o.type==="agent"&&o.agentId?r.push({workspaceId:e,agentId:o.agentId}):o.type==="note"&&o.noteId&&r.push({workspaceId:e,noteId:o.noteId}))}const a=t.presence.ownDiscussionTyping;return{focus:r,typing:t.presence.ownTyping,...a&&tc(a.workspaceId,a.conversationId)===a5.select(t)?{discussionTyping:a}:{}}}),v7=E.createSelector(t=>JSON.stringify(i5.select(t))),b7=E.createSelector(t=>t.presence.liveTyping),y7=E.createSelector(t=>t.presence.ownPrincipalId),w7=E.createSelector(t=>{const e=[];for(const r of Object.keys(t.tabState.openTabs)){if(t.tabState.openTabs[r]!==!0)continue;const n=xe(t.workspace.workspaces,gn(r))?.memberCount??1;n>1&&e.push(`${r}:${n}`)}return e.sort()});let mr=null;function k7(t){const e={};return mr={token:e,onCancel:t},e}function x7(t){return mr?.token===t}function S7(t){mr?.token===t&&(mr=null)}function A7(){return mr!==null}function T7(){if(mr===null)return!1;const{onCancel:t}=mr;return mr=null,t(),!0}const P0=Oi("ProviderAvailabilityClient");let nn=null;async function E7(){if(typeof window>"u")return P0.debug("Skipping provider availability check - not in browser environment"),Ol();const t=W1.select(E.state);if(nn&&nn.connection===t)return P0.debug("Joining in-flight provider availability request"),nn.promise;const e={},r=(async()=>{try{P0.debug("Checking provider availability via IPC");const n=await je(vh.GET_AVAILABILITY);if(!n.success)throw new Error(n.error||"Failed to get provider availability");const a=n.data??Ol();return P0.debug("Provider availability fetched",{hasAnyProvider:a.hasAnyProvider,auggie:a.providers.auggie.available,claudeCode:a.providers.claudeCode.available,codex:a.providers.codex.available,cortex:a.providers.cortex.available,mock:a.providers.mock?.available??!1,opencode:a.providers.opencode.available,droid:a.providers.droid?.available??!1,grok:a.providers.grok?.available??!1,unsloth:a.providers.unsloth?.available??!1}),a}finally{nn?.token===e&&(nn=null)}})();return nn={connection:t,token:e,promise:r},r}function Ol(){return{hasAnyProvider:!1,providers:{auggie:{available:!1},claudeCode:{available:!1},codex:{available:!1},cortex:{available:!1},mock:{available:!1},opencode:{available:!1},pi:{available:!1},droid:{available:!1},grok:{available:!1},unsloth:{available:!1}}}}const pt={IS_AUTHENTICATED:"github-auth:is-authenticated",GET_USER:"github-auth:get-user",START_AUTH:"github-auth:start",POLL_FOR_TOKEN:"github-auth:poll",CANCEL_AUTH:"github-auth:cancel",LOGOUT:"github-auth:logout",GET_AUTH_STATE:"github-auth:get-auth-state",GET_STATUS:"github-auth:get-status",LIST_REPOS:"github-auth:list-repos",SEARCH_REPOS:"github-auth:search-repos",SEARCH_USERS:"github-auth:search-users"},C7={async isAuthenticated(t){try{return await je(pt.IS_AUTHENTICATED,...t===void 0?[]:[{workspaceId:t}])}catch{return!1}},async getUser(t){try{return await je(pt.GET_USER,...t===void 0?[]:[{workspaceId:t}])}catch{return null}},async startAuth(t){return t?await je(pt.START_AUTH,t):await je(pt.START_AUTH)},async checkAuthComplete(){return await je(pt.POLL_FOR_TOKEN)},async cancelAuth(t){return t?je(pt.CANCEL_AUTH,t):je(pt.CANCEL_AUTH)},async logout(){return je(pt.LOGOUT)},async getAuthState(t){try{return await je(pt.GET_AUTH_STATE,...t===void 0?[]:[{workspaceId:t}])}catch{return{isAuthenticated:!1,requiresDaemonAuth:!0,user:null}}},async getStatus(t){try{return await je(pt.GET_STATUS,...t===void 0?[]:[{workspaceId:t}])}catch{return{isConfigured:!1,oauthUrl:"",configuredButNeedsUpdate:!1,updatedScopes:""}}},async listRepos(t,e){const r=await je(pt.LIST_REPOS,{page:t,...e===void 0?{}:{workspaceId:e}});if(!r.success)throw new Error(r.error||"Repository discovery failed");return r.data??[]},async searchRepos(t,e){try{return await je(pt.SEARCH_REPOS,{query:t,...e===void 0?{}:{workspaceId:e}})}catch(r){return{success:!1,error:r instanceof Error?r.message:String(r)}}},async searchUsers(t,e){try{return await je(pt.SEARCH_USERS,{query:t,...e===void 0?{}:{workspaceId:e}})}catch(r){return{success:!1,error:r instanceof Error?r.message:String(r)}}}};class s5{constructor(){le(this,"metrics",new Map);le(this,"completedMetrics",[]);le(this,"maxCompletedMetrics",100)}start(e,r){Ra.get("showPerformanceMetrics")&&this.metrics.set(e,{name:e,startTime:performance.now(),metadata:r})}end(e){if(!Ra.get("showPerformanceMetrics"))return null;const r=this.metrics.get(e);return r?(r.endTime=performance.now(),r.duration=r.endTime-r.startTime,this.metrics.delete(e),this.completedMetrics.push(r),this.completedMetrics.length>this.maxCompletedMetrics&&this.completedMetrics.shift(),Ra.get("logStateChanges")&&$l.info(`[Performance] ${e}: ${r.duration.toFixed(2)}ms`,r.metadata),r.duration):($l.warn(`Performance metric "${e}" was not started`),null)}async measure(e,r,n){this.start(e,n);try{const a=await r();return this.end(e),a}catch(a){throw this.end(e),a}}getMetrics(){return[...this.completedMetrics]}clear(){this.metrics.clear(),this.completedMetrics=[]}}const M7=new s5,$l=new vn("Performance"),Bl=t=>{t=1831565813+(t|=0)|0;let e=Math.imul(t^t>>>15,1|t);return e=e+Math.imul(e^e>>>7,61|e)^e,((e^e>>>14)>>>0)/4294967296};class o5{constructor(e){this.dictionaries=void 0,this.length=void 0,this.separator=void 0,this.style=void 0,this.seed=void 0;const{length:r,separator:n,dictionaries:a,style:i,seed:s}=e;this.dictionaries=a,this.separator=n,this.length=r,this.style=i,this.seed=s}generate(){if(!this.dictionaries)throw new Error('Cannot find any dictionary. Please provide at least one, or leave the "dictionary" field empty in the config object');if(this.length<=0)throw new Error("Invalid length provided");if(this.length>this.dictionaries.length)throw new Error(`The length cannot be bigger than the number of dictionaries.
478
- Length provided: ${this.length}. Number of dictionaries provided: ${this.dictionaries.length}`);let e=this.seed;return this.dictionaries.slice(0,this.length).reduce((r,n)=>{let a;e?(a=(s=>{if(typeof s=="string"){const o=s.split("").map(h=>h.charCodeAt(0)).reduce((h,d)=>h+d,1),c=Math.floor(Number(o));return Bl(c)}return Bl(s)})(e),e=4294967296*a):a=Math.random();let i=n[Math.floor(a*n.length)]||"";if(this.style==="lowerCase")i=i.toLowerCase();else if(this.style==="capital"){const[s,...o]=i.split("");i=s.toUpperCase()+o.join("")}else this.style==="upperCase"&&(i=i.toUpperCase());return r?`${r}${this.separator}${i}`:`${i}`},"")}}const ql={separator:"_",dictionaries:[]},l5=t=>{const e=[...t&&t.dictionaries||ql.dictionaries],r={...ql,...t,length:t&&t.length||e.length,dictionaries:e};if(!t||!t.dictionaries||!t.dictionaries.length)throw new Error('A "dictionaries" array must be provided. This is a breaking change introduced starting from Unique Name Generator v4. Read more about the breaking change here: https://github.com/andreasonny83/unique-names-generator#migration-guide');return new o5(r).generate()};var c5=["able","above","absent","absolute","abstract","abundant","academic","acceptable","accepted","accessible","accurate","accused","active","actual","acute","added","additional","adequate","adjacent","administrative","adorable","advanced","adverse","advisory","aesthetic","afraid","aggregate","aggressive","agreeable","agreed","agricultural","alert","alive","alleged","allied","alone","alright","alternative","amateur","amazing","ambitious","amused","ancient","angry","annoyed","annual","anonymous","anxious","appalling","apparent","applicable","appropriate","arbitrary","architectural","armed","arrogant","artificial","artistic","ashamed","asleep","assistant","associated","atomic","attractive","automatic","autonomous","available","average","awake","aware","awful","awkward","back","bad","balanced","bare","basic","beautiful","beneficial","better","bewildered","big","binding","biological","bitter","bizarre","blank","blind","blonde","bloody","blushing","boiling","bold","bored","boring","bottom","brainy","brave","breakable","breezy","brief","bright","brilliant","broad","broken","bumpy","burning","busy","calm","capable","capitalist","careful","casual","causal","cautious","central","certain","changing","characteristic","charming","cheap","cheerful","chemical","chief","chilly","chosen","christian","chronic","chubby","circular","civic","civil","civilian","classic","classical","clean","clear","clever","clinical","close","closed","cloudy","clumsy","coastal","cognitive","coherent","cold","collective","colonial","colorful","colossal","coloured","colourful","combative","combined","comfortable","coming","commercial","common","communist","compact","comparable","comparative","compatible","competent","competitive","complete","complex","complicated","comprehensive","compulsory","conceptual","concerned","concrete","condemned","confident","confidential","confused","conscious","conservation","conservative","considerable","consistent","constant","constitutional","contemporary","content","continental","continued","continuing","continuous","controlled","controversial","convenient","conventional","convinced","convincing","cooing","cool","cooperative","corporate","correct","corresponding","costly","courageous","crazy","creative","creepy","criminal","critical","crooked","crowded","crucial","crude","cruel","cuddly","cultural","curious","curly","current","curved","cute","daily","damaged","damp","dangerous","dark","dead","deaf","deafening","dear","decent","decisive","deep","defeated","defensive","defiant","definite","deliberate","delicate","delicious","delighted","delightful","democratic","dependent","depressed","desirable","desperate","detailed","determined","developed","developing","devoted","different","difficult","digital","diplomatic","direct","dirty","disabled","disappointed","disastrous","disciplinary","disgusted","distant","distinct","distinctive","distinguished","disturbed","disturbing","diverse","divine","dizzy","domestic","dominant","double","doubtful","drab","dramatic","dreadful","driving","drunk","dry","dual","due","dull","dusty","dutch","dying","dynamic","eager","early","eastern","easy","economic","educational","eerie","effective","efficient","elaborate","elated","elderly","eldest","electoral","electric","electrical","electronic","elegant","eligible","embarrassed","embarrassing","emotional","empirical","empty","enchanting","encouraging","endless","energetic","enormous","enthusiastic","entire","entitled","envious","environmental","equal","equivalent","essential","established","estimated","ethical","ethnic","eventual","everyday","evident","evil","evolutionary","exact","excellent","exceptional","excess","excessive","excited","exciting","exclusive","existing","exotic","expected","expensive","experienced","experimental","explicit","extended","extensive","external","extra","extraordinary","extreme","exuberant","faint","fair","faithful","familiar","famous","fancy","fantastic","far","fascinating","fashionable","fast","fat","fatal","favourable","favourite","federal","fellow","female","feminist","few","fierce","filthy","final","financial","fine","firm","fiscal","fit","fixed","flaky","flat","flexible","fluffy","fluttering","flying","following","fond","foolish","foreign","formal","formidable","forthcoming","fortunate","forward","fragile","frail","frantic","free","frequent","fresh","friendly","frightened","front","frozen","full","fun","functional","fundamental","funny","furious","future","fuzzy","gastric","gay","general","generous","genetic","gentle","genuine","geographical","giant","gigantic","given","glad","glamorous","gleaming","global","glorious","golden","good","gorgeous","gothic","governing","graceful","gradual","grand","grateful","greasy","great","grieving","grim","gross","grotesque","growing","grubby","grumpy","guilty","handicapped","handsome","happy","hard","harsh","head","healthy","heavy","helpful","helpless","hidden","high","hilarious","hissing","historic","historical","hollow","holy","homeless","homely","hon","honest","horizontal","horrible","hostile","hot","huge","human","hungry","hurt","hushed","husky","icy","ideal","identical","ideological","ill","illegal","imaginative","immediate","immense","imperial","implicit","important","impossible","impressed","impressive","improved","inadequate","inappropriate","inc","inclined","increased","increasing","incredible","independent","indirect","individual","industrial","inevitable","influential","informal","inherent","initial","injured","inland","inner","innocent","innovative","inquisitive","instant","institutional","insufficient","intact","integral","integrated","intellectual","intelligent","intense","intensive","interested","interesting","interim","interior","intermediate","internal","international","intimate","invisible","involved","irrelevant","isolated","itchy","jealous","jittery","joint","jolly","joyous","judicial","juicy","junior","just","keen","key","kind","known","labour","large","late","latin","lazy","leading","left","legal","legislative","legitimate","lengthy","lesser","level","lexical","liable","liberal","light","like","likely","limited","linear","linguistic","liquid","literary","little","live","lively","living","local","logical","lonely","long","loose","lost","loud","lovely","low","loyal","ltd","lucky","mad","magic","magnetic","magnificent","main","major","male","mammoth","managerial","managing","manual","many","marginal","marine","marked","married","marvellous","marxist","mass","massive","mathematical","mature","maximum","mean","meaningful","mechanical","medical","medieval","melodic","melted","mental","mere","metropolitan","mid","middle","mighty","mild","military","miniature","minimal","minimum","ministerial","minor","miserable","misleading","missing","misty","mixed","moaning","mobile","moderate","modern","modest","molecular","monetary","monthly","moral","motionless","muddy","multiple","mushy","musical","mute","mutual","mysterious","naked","narrow","nasty","national","native","natural","naughty","naval","near","nearby","neat","necessary","negative","neighbouring","nervous","net","neutral","new","nice","noble","noisy","normal","northern","nosy","notable","novel","nuclear","numerous","nursing","nutritious","nutty","obedient","objective","obliged","obnoxious","obvious","occasional","occupational","odd","official","ok","okay","old","olympic","only","open","operational","opposite","optimistic","oral","ordinary","organic","organisational","original","orthodox","other","outdoor","outer","outrageous","outside","outstanding","overall","overseas","overwhelming","painful","pale","panicky","parallel","parental","parliamentary","partial","particular","passing","passive","past","patient","payable","peaceful","peculiar","perfect","permanent","persistent","personal","petite","philosophical","physical","plain","planned","plastic","pleasant","pleased","poised","polite","political","poor","popular","positive","possible","potential","powerful","practical","precious","precise","preferred","pregnant","preliminary","premier","prepared","present","presidential","pretty","previous","prickly","primary","prime","primitive","principal","printed","prior","private","probable","productive","professional","profitable","profound","progressive","prominent","promising","proper","proposed","prospective","protective","protestant","proud","provincial","psychiatric","psychological","public","puny","pure","purring","puzzled","quaint","qualified","quarrelsome","querulous","quick","quickest","quiet","quintessential","quixotic","racial","radical","rainy","random","rapid","rare","raspy","rational","ratty","raw","ready","real","realistic","rear","reasonable","recent","reduced","redundant","regional","registered","regular","regulatory","related","relative","relaxed","relevant","reliable","relieved","religious","reluctant","remaining","remarkable","remote","renewed","representative","repulsive","required","resident","residential","resonant","respectable","respective","responsible","resulting","retail","retired","revolutionary","rich","ridiculous","right","rigid","ripe","rising","rival","roasted","robust","rolling","romantic","rotten","rough","round","royal","rubber","rude","ruling","running","rural","sacred","sad","safe","salty","satisfactory","satisfied","scared","scary","scattered","scientific","scornful","scrawny","screeching","secondary","secret","secure","select","selected","selective","selfish","semantic","senior","sensible","sensitive","separate","serious","severe","sexual","shaggy","shaky","shallow","shared","sharp","sheer","shiny","shivering","shocked","short","shrill","shy","sick","significant","silent","silky","silly","similar","simple","single","skilled","skinny","sleepy","slight","slim","slimy","slippery","slow","small","smart","smiling","smoggy","smooth","social","socialist","soft","solar","sole","solid","sophisticated","sore","sorry","sound","sour","southern","soviet","spare","sparkling","spatial","special","specific","specified","spectacular","spicy","spiritual","splendid","spontaneous","sporting","spotless","spotty","square","squealing","stable","stale","standard","static","statistical","statutory","steady","steep","sticky","stiff","still","stingy","stormy","straight","straightforward","strange","strategic","strict","striking","striped","strong","structural","stuck","stupid","subjective","subsequent","substantial","subtle","successful","successive","sudden","sufficient","suitable","sunny","super","superb","superior","supporting","supposed","supreme","sure","surprised","surprising","surrounding","surviving","suspicious","sweet","swift","symbolic","sympathetic","systematic","tall","tame","tart","tasteless","tasty","technical","technological","teenage","temporary","tender","tense","terrible","territorial","testy","then","theoretical","thick","thin","thirsty","thorough","thoughtful","thoughtless","thundering","tight","tiny","tired","top","tory","total","tough","toxic","traditional","tragic","tremendous","tricky","tropical","troubled","typical","ugliest","ugly","ultimate","unable","unacceptable","unaware","uncertain","unchanged","uncomfortable","unconscious","underground","underlying","unemployed","uneven","unexpected","unfair","unfortunate","unhappy","uniform","uninterested","unique","united","universal","unknown","unlikely","unnecessary","unpleasant","unsightly","unusual","unwilling","upper","upset","uptight","urban","urgent","used","useful","useless","usual","vague","valid","valuable","variable","varied","various","varying","vast","verbal","vertical","very","vicarious","vicious","victorious","violent","visible","visiting","visual","vital","vitreous","vivacious","vivid","vocal","vocational","voiceless","voluminous","voluntary","vulnerable","wandering","warm","wasteful","watery","weak","wealthy","weary","wee","weekly","weird","welcome","well","western","wet","whispering","whole","wicked","wide","widespread","wild","wilful","willing","willowy","wily","wise","wispy","wittering","witty","wonderful","wooden","working","worldwide","worried","worrying","worthwhile","worthy","written","wrong","xenacious","xenial","xenogeneic","xenophobic","xeric","xerothermic","yabbering","yammering","yappiest","yappy","yawning","yearling","yearning","yeasty","yelling","yelping","yielding","yodelling","young","youngest","youthful","ytterbic","yucky","yummy","zany","zealous","zeroth","zestful","zesty","zippy","zonal","zoophagous","zygomorphic","zygotic"],u5=["aardvark","aardwolf","albatross","alligator","alpaca","amphibian","anaconda","angelfish","anglerfish","ant","anteater","antelope","antlion","ape","aphid","armadillo","asp","baboon","badger","bandicoot","barnacle","barracuda","basilisk","bass","bat","bear","beaver","bedbug","bee","beetle","bird","bison","blackbird","boa","boar","bobcat","bobolink","bonobo","booby","bovid","bug","butterfly","buzzard","camel","canid","canidae","capybara","cardinal","caribou","carp","cat","caterpillar","catfish","catshark","cattle","centipede","cephalopod","chameleon","cheetah","chickadee","chicken","chimpanzee","chinchilla","chipmunk","cicada","clam","clownfish","cobra","cockroach","cod","condor","constrictor","coral","cougar","cow","coyote","crab","crane","crawdad","crayfish","cricket","crocodile","crow","cuckoo","damselfly","deer","dingo","dinosaur","dog","dolphin","donkey","dormouse","dove","dragon","dragonfly","duck","eagle","earthworm","earwig","echidna","eel","egret","elephant","elk","emu","ermine","falcon","felidae","ferret","finch","firefly","fish","flamingo","flea","fly","flyingfish","fowl","fox","frog","galliform","gamefowl","gayal","gazelle","gecko","gerbil","gibbon","giraffe","goat","goldfish","goose","gopher","gorilla","grasshopper","grouse","guan","guanaco","guineafowl","gull","guppy","haddock","halibut","hamster","hare","harrier","hawk","hedgehog","heron","herring","hippopotamus","hookworm","hornet","horse","hoverfly","hummingbird","hyena","iguana","impala","jackal","jaguar","jay","jellyfish","junglefowl","kangaroo","kingfisher","kite","kiwi","koala","koi","krill","ladybug","lamprey","landfowl","lark","leech","lemming","lemur","leopard","leopon","limpet","lion","lizard","llama","lobster","locust","loon","louse","lungfish","lynx","macaw","mackerel","magpie","mammal","manatee","mandrill","marlin","marmoset","marmot","marsupial","marten","mastodon","meadowlark","meerkat","mink","minnow","mite","mockingbird","mole","mollusk","mongoose","monkey","moose","mosquito","moth","mouse","mule","muskox","narwhal","newt","nightingale","ocelot","octopus","opossum","orangutan","orca","ostrich","otter","owl","ox","panda","panther","parakeet","parrot","parrotfish","partridge","peacock","peafowl","pelican","penguin","perch","pheasant","pig","pigeon","pike","pinniped","piranha","planarian","platypus","pony","porcupine","porpoise","possum","prawn","primate","ptarmigan","puffin","puma","python","quail","quelea","quokka","rabbit","raccoon","rat","rattlesnake","raven","reindeer","reptile","rhinoceros","roadrunner","rodent","rook","rooster","roundworm","sailfish","salamander","salmon","sawfish","scallop","scorpion","seahorse","shark","sheep","shrew","shrimp","silkworm","silverfish","skink","skunk","sloth","slug","smelt","snail","snake","snipe","sole","sparrow","spider","spoonbill","squid","squirrel","starfish","stingray","stoat","stork","sturgeon","swallow","swan","swift","swordfish","swordtail","tahr","takin","tapir","tarantula","tarsier","termite","tern","thrush","tick","tiger","tiglon","toad","tortoise","toucan","trout","tuna","turkey","turtle","tyrannosaurus","unicorn","urial","vicuna","viper","vole","vulture","wallaby","walrus","warbler","wasp","weasel","whale","whippet","whitefish","wildcat","wildebeest","wildfowl","wolf","wolverine","wombat","woodpecker","worm","wren","xerinae","yak","zebra"];const Uu=/^[a-z]{2,15}-[a-z]{2,15}(-[0-9]+)?$/,Wu=/^[a-z]{2,15}$/,Gu=c5.filter(t=>Wu.test(t)),ju=u5.filter(t=>Wu.test(t));function I7(){return l5({dictionaries:[Gu,ju],separator:"-",style:"lowerCase",length:2})}function z7(t,e){return`${t}-${e}`}function h5(t){const e=t.match(/^([a-z]{2,15}-[a-z]{2,15})(?:-[0-9]+)?$/);return e?e[1]:t}const Fl=new Set(Gu),Hl=new Set(ju),d5=new Set;function R7(t){return!t||typeof t!="string"?!1:Uu.test(t)||/^[a-z]{2,15}-[a-z]{2,15}-[a-z0-9]{4}$/.test(t)?!0:/^[a-f0-9]{8}-[a-f0-9]{4}-[a-f0-9]{4}-[a-f0-9]{4}-[a-f0-9]{12}$/i.test(t)}function D7(t){if(!t||typeof t!="string")return!1;if(d5.has(t))return!0;if(Uu.test(t)){const n=h5(t).split("-");if(n.length===2){const[a,i]=n;if(Fl.has(a)&&Hl.has(i))return!0}}if(/^[a-z]{2,15}-[a-z]{2,15}-[a-z0-9]{4}$/.test(t)){const r=t.split("-");if(r.length===3){const[n,a]=r;if(Fl.has(n)&&Hl.has(a))return!0}}return!1}const N7=E.createSelector(t=>qr.select(t)?.capabilities.sessionImport===1),P7=E.createSelector(t=>{const e=t.importableSessions?.sessions;return e?ve(e):[]}),_7=E.createSelector(t=>{const e=t.importableSessions?.providers;return e?ve(e):[]}),L7=E.createSelector(t=>t.importableSessions?.status??"idle"),p5=Oi("ContextAPI");function O7(t){return t.some(e=>e.placementStatus==="placing"||e.placementStatus==="failed")}async function Ul(t,e,r){return p5.debug("Placing attachment",{workspaceId:t,fileName:e,viaSourcePath:r.sourcePath!==void 0,keyed:r.idempotencyKey!==void 0}),await wn("file.placeAttachment",{workspaceId:t,fileName:e,...r.data!==void 0?{data:r.data}:{},...r.sourcePath!==void 0?{sourcePath:r.sourcePath}:{},...r.mimeType!==void 0&&r.mimeType!==""?{mimeType:r.mimeType}:{},...r.idempotencyKey!==void 0?{idempotencyKey:r.idempotencyKey}:{},...r.rawScreenshot!==void 0?{rawScreenshot:r.rawScreenshot}:{}})}async function m5(t,e,r,n,a={}){return await wn("file.attachmentUpload.begin",{workspaceId:t,fileName:e,sizeBytes:r,sha256:n,...a.mimeType!==void 0&&a.mimeType!==""?{mimeType:a.mimeType}:{},...a.idempotencyKey!==void 0?{idempotencyKey:a.idempotencyKey}:{},...a.rawScreenshot!==void 0?{rawScreenshot:a.rawScreenshot}:{}})}const Vu=300*1e3;async function f5(t,e,r,n){return await wn("file.attachmentUpload.chunk",{uploadId:t,seq:e,data:r,...n!==void 0?{workspaceId:n}:{}},{timeoutMs:Vu})}async function g5(t,e){return await wn("file.attachmentUpload.commit",{uploadId:t,...e!==void 0?{workspaceId:e}:{}},{timeoutMs:Vu})}async function v5(t,e){return await wn("file.attachmentUpload.abort",{uploadId:t,...e!==void 0?{workspaceId:e}:{}})}async function b5(t){const e=typeof t=="string"?{attachmentId:t}:t.attachmentId!==void 0?{workspaceId:t.workspaceId,attachmentId:t.attachmentId}:{workspaceId:t.workspaceId,idempotencyKey:t.idempotencyKey};return await wn("file.getAttachmentInfo",e)}async function $7(t,e,r){return await je("file:download-attachment",{workspaceId:t,path:e,fileName:r})}const Ku=25*1024*1024,Wl=1024*1024*1024,y5=16*1024*1024,Xu="attachment upload cancelled";function w5(t,e){return e?.aborted===!0||t instanceof Error&&t.message===Xu}function B0(t){if(t?.aborted)throw new Error(Xu)}function k5(){return!G1.select(E.state)}function x5(t){return rc(t,9,13)}function Yu(){return x5(E.state?.daemonHealth?.stats?.protocolVersion)}function B7(t){if(Yu())return t??crypto.randomUUID()}function Zu(t){if(!t||typeof t!="object")return!1;const{rpcCode:e,code:r}=t;return e===-32602||r==="INVALID_PARAMS"}function S5(t){return Zu(t)&&/already committed/i.test(String(t.message??""))}function A5(t){return{ok:!0,path:t.path,fileName:t.fileName,size:t.size,attachmentId:t.attachmentId,...t.mimeType!==void 0?{mimeType:t.mimeType}:{},uploadedAt:t.uploadedAt,replayed:!0,...t.rawScreenshot!==void 0?{rawScreenshot:t.rawScreenshot}:{}}}async function Pi(t,e,r=b5){try{return A5(await r({workspaceId:t,idempotencyKey:e}))}catch{return}}function Qu(t,e,r){return e!==void 0&&!Zu(t)&&!w5(t,r)}async function Gl(t,e,r,n,a=()=>!0){try{return lt(a),await n()}catch(i){if(lt(a),Qu(i,e,r)){const s=await Pi(t,e);if(s)return s}throw i}}const Ju="file:read returned an unexpected response",ys="file:read failed";function ws(t){if(!t||typeof t!="object"||!("success"in t))throw new Error(Ju);if(!t.success||t.data===void 0)throw new Error(t.error?.message??ys);return t.data}async function T5(t){const e=await je("file:read",{path:t,encoding:"base64",maxSize:Ku,truncateIfLarge:!1}),r=ws(e);if(r.content===void 0)throw new Error(e.error?.message??ys);return r.content}async function e1(t,e,r){const n=await je("file:read-chunk",{path:t,offset:e,length:r});return ws(n)}async function E5(t){const{size:e}=await e1(t,0,1);return e}async function C5(t){const e=await je("file:hash",{path:t});return ws(e).sha256}const M5=new Set(["Internal error","Backend request failed",Ju,ys]);async function q7(t,e,r,n,a,i=()=>!0){lt(i);const s=Yu()?r.idempotencyKey:void 0,o=s!==void 0?{idempotencyKey:s}:{};if(!k5())return Gl(t,s,a,()=>Ul(t,e,{sourcePath:r.sourcePath,mimeType:r.mimeType,...o}),i);const c=await E5(r.sourcePath);if(lt(i),c>Wl)throw new Error(ie.chat_attachmentPlacement_tooLargeRemote_error({name:e,maxGb:Math.round(Wl/(1024*1024*1024))}));if(c>Ku)return I5(t,e,{...r,idempotencyKey:s},c,n,a,i);const h=await T5(r.sourcePath);return lt(i),B0(a),Gl(t,s,a,()=>Ul(t,e,{data:h,mimeType:r.mimeType,...o}),i)}async function I5(t,e,r,n,a,i,s=()=>!0){lt(s);const o=await C5(r.sourcePath);lt(s),B0(i);let c,h;try{({uploadId:c,maxChunkBytes:h}=await m5(t,e,n,o,{mimeType:r.mimeType,...r.idempotencyKey!==void 0?{idempotencyKey:r.idempotencyKey}:{}}))}catch(w){if(lt(s),r.idempotencyKey!==void 0&&S5(w)){const A=await Pi(t,r.idempotencyKey);if(A)return A}throw w}const d=Math.min(y5,h),v=Math.ceil(n/d);let m=!1;try{for(let w=0;w<v;w++){lt(s),B0(i);const{content:A}=await e1(r.sourcePath,w*d,d);lt(s),await f5(c,w,A,t),lt(s),a?.((w+1)/v)}return B0(i),lt(s),m=!0,await g5(c,t)}catch(w){if(lt(s),m&&Qu(w,r.idempotencyKey,i)){const A=await Pi(t,r.idempotencyKey);if(A)return A}throw lt(s),await v5(c,t).catch(()=>{}),w}}function F7(t){if(!t||typeof t!="object")return;const e=t.data;if(e&&typeof e=="object"){const n=e.detail;if(typeof n=="string"&&n.trim().length>0)return n.trim()}const r=t.message;if(typeof r=="string"&&r.trim().length>0&&!M5.has(r.trim()))return r.trim()}function lt(t){if(!t())throw new DOMException("Obsolete attachment submission","AbortError")}function t1(t){const e=t?.split(";")[0].trim().toLowerCase()??"";return e==="image/jpg"?"image/jpeg":e}function H7(t){return["image/png","image/jpeg","image/gif","image/webp"].includes(t1(t))}const z5={"image/png":"png","image/jpeg":"jpg","image/gif":"gif","image/webp":"webp","image/svg+xml":"svg","image/avif":"avif","image/bmp":"bmp","image/tiff":"tiff","image/x-icon":"ico","image/vnd.microsoft.icon":"ico","image/heic":"heic","image/heif":"heif","image/jxl":"jxl"};function U7(t,e){const r=z5[t1(t)]??"bin";return`${e}.${r}`}const R5=Oi("InAppFileInputs");function D5(t=globalThis.window){return t?.electronAPI?.preferInAppPicker===!0}function N5(t){return typeof HTMLInputElement<"u"&&t instanceof HTMLInputElement&&t.type==="file"}const r1=new WeakMap;function W7(t,e=globalThis.window){let r="";try{r=e?.electronAPI?.getPathForFile?.(t)??""}catch{r=""}return r||r1.get(t)||""}function P5(t){const e=new DataTransfer;for(const r of t)e.items.add(new File([r.data],r.name,{type:r.type}));return e.files}async function _5(t,e){const r={accept:t.accept||void 0,multiple:t.multiple},n=await e.invoke(th.IN_APP_FILE_DIALOG.PICK_FILES,r);return!Array.isArray(n)||n.length===0?(t.dispatchEvent(new Event("cancel",{bubbles:!0})),!1):(t.files=P5(n),Array.from(t.files??[],(a,i)=>{const s=n[i]?.path;s&&r1.set(a,s)}),t.dispatchEvent(new Event("input",{bubbles:!0})),t.dispatchEvent(new Event("change",{bubbles:!0})),!0)}function G7(t=globalThis.window){if(!t||!D5(t))return()=>{};const e=t.electronAPI;let r=!1;const n=a=>{const i=a.target;!N5(i)||i.disabled||(a.preventDefault(),!r&&(r=!0,_5(i,e).catch(s=>{R5.warn("in-app picker failed",{error:s instanceof Error?s.message:String(s)})}).finally(()=>{r=!1})))};return t.addEventListener("click",n,!0),()=>t.removeEventListener("click",n,!0)}let L5=0;const ks=new WeakSet;function j7(t){const e=E.dispatch,r=E.state.connections.windowBackendId,n=si.select(E.state,t.id);if(!n||E.state.workspace.pendingDeletions[t.id])return null;const a=`operation-${++L5}`;let i=!1;const s=()=>{try{return E.dispatch===e&&E.state.connections.windowBackendId===r}catch{return!1}},o=()=>s()&&E.state.workspace.deletionTokens[t.id]===a,c=()=>s()&&Vt.select(E.state)===n&&(i?o()&&E.state.workspace.invalidatedDeletions[t.id]!==a&&E.state.workspace.terminalDeletions[t.id]!==a:si.select(E.state,t.id)===n),h={workspaceId:t.id,current:c,terminal(){return!i||!o()||Vt.select(E.state)!==n||E.state.workspace.terminalDeletions[t.id]!==a?null:E.state.workspace.invalidatedDeletions[t.id]===a?"denied":"removed"},begin(d=!0){return i||!c()||E.state.workspace.pendingDeletions[t.id]?!1:(e(ah(t.id,a)),d&&e(ih(t.id)),i=!0,c())},restore(){c()&&(e(oi(t.id,a)),e(nh(t)))},expire(){o()&&e(oi(t.id,a))}};return ks.add(h),h}function jl(t,e){return ks.has(t)&&t.workspaceId===e&&t.current()}function O5(t,e){return ks.has(t)&&t.workspaceId===e&&t.terminal()==="removed"}function V7(t){const e=E.dispatch,r=E.state.connections.windowBackendId,n=E.state.workspace.deletionTokens[t];return()=>{try{n&&E.dispatch===e&&E.state.connections.windowBackendId===r&&e(oi(t,n))}catch{}}}function zr(t,e){const r=()=>t===void 0?Xl.select(E.state)?Vt.select(E.state):null:e?j1.select(E.state,t,e):si.select(E.state,t),n=E.dispatch,a=r();return()=>{try{return E.dispatch===n&&a!==null&&a===r()}catch{return!1}}}const ot=()=>({ok:!1,error:ie.workspace_client_accessChanged_error()}),lr=new vn("WorkspaceClient"),$5=100;function Pn(t){return{...t,path:t.path?.replaceAll("\\","/"),repositoryPath:t.repositoryPath?.replaceAll("\\","/"),worktreePath:t.worktreePath?.replaceAll("\\","/")}}class B5{constructor(){le(this,"pendingRequests",new Map);le(this,"cache",new Map);le(this,"CACHE_TTL",5e3);le(this,"mutationCounter",0)}getCacheKey(e,r){return`${e}:${JSON.stringify(r||{})}`}pruneExpiredCacheEntries(e=Date.now()){for(const[r,n]of this.cache)e-n.timestamp>=this.CACHE_TTL&&this.cache.delete(r)}setCacheEntry(e,r){for(this.pruneExpiredCacheEntries(),this.cache.delete(e),this.cache.set(e,{data:r,timestamp:Date.now()});this.cache.size>$5;){const n=this.cache.keys().next().value;if(n===void 0)break;this.cache.delete(n)}}shouldCacheResponse(e){return e!==Er.LIST&&(e.includes(":get")||e.includes(":list"))}async invoke(e,r){try{const n=this.mutationCounter,a=this.getCacheKey(e,r)+(e===Er.LIST?JSON.stringify([E.state.connections.windowBackendId,Vt.select(E.state)]):"");this.pruneExpiredCacheEntries();const i=this.pendingRequests.get(a);if(i)return lr.debug(`[WorkspaceClient] Reusing pending request for ${e}`),i;if(this.shouldCacheResponse(e)){const o=this.cache.get(a);if(o&&Date.now()-o.timestamp<this.CACHE_TTL)return lr.debug(`[WorkspaceClient] Using cached response for ${e}`),{ok:!0,data:o.data};o&&this.cache.delete(a)}const s=(async()=>{if(typeof window<"u"&&window.electronAPI){let o=r;if(r!==void 0)try{o=JSON.parse(JSON.stringify(r))}catch(d){if(lr.error(`[WorkspaceClient] Data serialization failed for ${e}:`,{error:d,dataKeys:r?Object.keys(r):[]}),r&&typeof r=="object")for(const[v,m]of Object.entries(r))try{JSON.stringify(m)}catch{lr.error(`[WorkspaceClient] Non-serializable field: ${v}`,{type:typeof m,constructor:m?.constructor?.name})}throw new Error(`Data serialization failed: ${d instanceof Error?d.message:"Unknown error"}`)}const c=await Qs(e,o),h=this.normalizeResponse(c);return h.ok&&this.shouldCacheResponse(e)&&n===this.mutationCounter&&this.setCacheEntry(a,h.data),h}return{ok:!1,error:"IPC not available"}})();this.pendingRequests.set(a,s);try{return await s}finally{this.pendingRequests.delete(a)}}catch(n){return lr.error(`[WorkspaceClient] IPC error for ${e}:`,n),{ok:!1,error:n instanceof Error?n.message:"IPC call failed"}}}clearCache(e){if(this.mutationCounter++,e){for(const[r]of this.cache)r.includes(e)&&this.cache.delete(r);for(const[r]of this.pendingRequests)r.includes(e)&&this.pendingRequests.delete(r)}else this.cache.clear(),this.pendingRequests.clear()}normalizeResponse(e){return e==null?{ok:!1,error:"No response received"}:"ok"in e?e.ok?{ok:!0,data:e.data}:{ok:!1,error:e.error||"Unknown error"}:"success"in e?e.success?{ok:!0,data:e.data}:{ok:!1,error:e.error||"Unknown error"}:{ok:!1,error:"Invalid response format"}}async list(e){const r=await this.invoke(Er.LIST,{lite:e?.lite});return r.ok?r.data&&"workspaces"in r.data?{ok:!0,data:r.data.workspaces.map(Pn)}:{ok:!0,data:r.data.map(Pn),complete:!0}:r}async create(e){const r=e.initialAgent;lr.info(`[WorkspaceClient] create called: title=${e.title}, hasInitialAgent=${!!r}, specialist=${r?.specialist}, model=${r?.model}, keys=${r?Object.keys(r).join(","):"none"}`);const n=zr();if(!n())return ot();const a=await Tr.workspaces.create(e);if(!n())return ot();if(lr.info("[WorkspaceClient] create result",{success:a.success,scope:e.scope,initialAgentId:a.success?a.initialAgent?.id:void 0,error:a.success?void 0:a.error}),a.success&&a.workspace)return this.clearCache(),{ok:!0,data:{workspace:Pn(a.workspace),initialAgent:a.initialAgent,...a.proposalOrigin?{proposalOrigin:a.proposalOrigin}:{}}};const i=a.error||ie.workspace_client_createFailed_error();return a.errorCode?{ok:!1,error:i,errorCode:a.errorCode,...a.launchFailure?{launchFailure:a.launchFailure}:{},...a.baseRefreshFailure?{baseRefreshFailure:a.baseRefreshFailure}:{}}:{ok:!1,error:i}}async open(e){const r=await this.invoke(Er.OPEN,{id:e});return r.ok?{ok:!0,data:Pn(r.data)}:r}async update(e){const r=zr(e.id,Object.keys(e));if(!r())return ot();const n=await Tr.workspaces.update(e);return r()?n.success&&n.workspace?(this.clearCache(e.id),this.clearCache(),{ok:!0,data:Pn(n.workspace)}):{ok:!1,error:n.error||ie.workspace_client_updateFailed_error()}:ot()}async delete(e,r,n){const a=n?()=>jl(n,e):zr(e);if(!a())return{...ot(),obsolete:!0};const i=await Tr.workspaces.delete(e,r);return!a()&&!(n&&O5(n,e))?{...ot(),obsolete:!0}:i.success?(this.clearCache(e),this.clearCache(),i.scheduled&&i.deleteAt?{ok:!0,data:{scheduled:!0,deleteAt:i.deleteAt}}:{ok:!0,data:void 0}):{ok:!1,error:i.error||ie.workspace_client_deleteFailed_error()}}async cancelDelete(e,r){const n=r?()=>jl(r,e):zr(e);if(!n())return{...ot(),obsolete:!0};const a=await Tr.workspaces.cancelDelete(e);return n()?a.success?(this.clearCache(e),this.clearCache(),{ok:!0,data:{cancelled:a.cancelled===!0}}):{ok:!1,error:a.error||ie.workspace_client_cancelDeleteFailed_error()}:{...ot(),obsolete:!0}}async archive(e){const r=zr(e);if(!r())return ot();const n=await Tr.workspaces.archive(e);return r()?n.success?(this.clearCache(e),this.clearCache(),{ok:!0,data:void 0}):{ok:!1,error:n.error||ie.workspace_client_archiveFailed_error()}:ot()}async unarchive(e){const r=zr(e);if(!r())return ot();const n=await Tr.workspaces.unarchive(e);return r()?n.success?(this.clearCache(e),this.clearCache(),{ok:!0,data:void 0}):{ok:!1,error:n.error||ie.workspace_client_unarchiveFailed_error()}:ot()}async retire(e){const r=zr(e);if(!r())return ot();const n=await Tr.workspaces.retire(e);return r()?n.success?(this.clearCache(e),this.clearCache(),{ok:!0,data:n.workspace}):{ok:!1,error:n.error||ie.workspace_ops_purgeFailed_error(),...n.errorCode?{errorCode:n.errorCode}:{}}:ot()}async invokeFresh(e,r){try{if(typeof window<"u"&&window.electronAPI){const n=await Qs(e,r);return this.normalizeResponse(n)}return{ok:!1,error:"IPC not available"}}catch(n){return lr.error(`[WorkspaceClient] IPC error for ${e}:`,n),{ok:!1,error:n instanceof Error?n.message:"IPC call failed"}}}async getDiffSummary(e){return this.invokeFresh(Er.GET_DIFF_SUMMARY,{workspaceId:e})}async getGitSummary(e){return this.invokeFresh(Er.GET_GIT_SUMMARY,{workspaceId:e})}async getTasks(e){return this.invokeFresh(Er.GET_TASKS,{workspaceId:e})}}const K7=new B5;function Vl(t,e){return{key:t.id,confirmedId:t.id,confirmed:t,content:t.content,messageMetadata:t.messageMetadata,imageBlocks:[...t.imageBlocks??[]],fileBlocks:[...t.fileBlocks??[]],deliveryGroups:t.deliveryGroups,contextItems:[...t.contextItems??[]],contributions:[],blocksMutations:e}}function Kl(t){return!t.imageBlocks?.length&&!t.fileBlocks?.length}function n1(t,e){const r=t?.supported===!0,n=r&&(t.refreshNeeded||sh(t)),a=e.map(k=>Vl(k,n));if(!t)return{conversation:[],processing:[],queue:a};const i=new Set(ve(t.seeds).flatMap(k=>k0(k,t.scope.principalId))),s=ve(t.submissions).filter(k=>!i.has(k.id)),o=new Set(e.flatMap(k=>k0(k,t.scope.principalId))),c=ve(t.processing).filter(k=>!k0(k,t.scope.principalId).some(I=>o.has(I))),h=s.filter(k=>k.destination==="conversation");if(!r)return{conversation:h,processing:c,queue:a};for(const k of ve(t.seeds)){const I=a.findIndex(K=>K.confirmedId===k.id),R=Vl(k,!0),Z=k0(k,t.scope.principalId);R.contributions=ve(t.submissions).filter(K=>Z.includes(K.id)),I>=0?(R.confirmed=a[I].confirmed,a[I]=R):(R.confirmedId=void 0,R.confirmed=void 0,a.push(R))}const d=e.filter(k=>k.mergeEligible===!0),v=!n&&d.length===1&&d[0].author?.principalId===t.scope.principalId&&d[0].submissionIds?.length&&!d[0].recoverySources?d[0].id:void 0;let m=v?a.find(k=>k.confirmedId===v):void 0;for(const k of s.filter(I=>I.destination==="queue")){const I=m&&Kl(m)&&Kl(k)?m:void 0;if(I)I.content=[I.content,k.content].filter(Boolean).join(`
478
+ Length provided: ${this.length}. Number of dictionaries provided: ${this.dictionaries.length}`);let e=this.seed;return this.dictionaries.slice(0,this.length).reduce((r,n)=>{let a;e?(a=(s=>{if(typeof s=="string"){const o=s.split("").map(h=>h.charCodeAt(0)).reduce((h,d)=>h+d,1),c=Math.floor(Number(o));return Bl(c)}return Bl(s)})(e),e=4294967296*a):a=Math.random();let i=n[Math.floor(a*n.length)]||"";if(this.style==="lowerCase")i=i.toLowerCase();else if(this.style==="capital"){const[s,...o]=i.split("");i=s.toUpperCase()+o.join("")}else this.style==="upperCase"&&(i=i.toUpperCase());return r?`${r}${this.separator}${i}`:`${i}`},"")}}const ql={separator:"_",dictionaries:[]},l5=t=>{const e=[...t&&t.dictionaries||ql.dictionaries],r={...ql,...t,length:t&&t.length||e.length,dictionaries:e};if(!t||!t.dictionaries||!t.dictionaries.length)throw new Error('A "dictionaries" array must be provided. This is a breaking change introduced starting from Unique Name Generator v4. Read more about the breaking change here: https://github.com/andreasonny83/unique-names-generator#migration-guide');return new o5(r).generate()};var c5=["able","above","absent","absolute","abstract","abundant","academic","acceptable","accepted","accessible","accurate","accused","active","actual","acute","added","additional","adequate","adjacent","administrative","adorable","advanced","adverse","advisory","aesthetic","afraid","aggregate","aggressive","agreeable","agreed","agricultural","alert","alive","alleged","allied","alone","alright","alternative","amateur","amazing","ambitious","amused","ancient","angry","annoyed","annual","anonymous","anxious","appalling","apparent","applicable","appropriate","arbitrary","architectural","armed","arrogant","artificial","artistic","ashamed","asleep","assistant","associated","atomic","attractive","automatic","autonomous","available","average","awake","aware","awful","awkward","back","bad","balanced","bare","basic","beautiful","beneficial","better","bewildered","big","binding","biological","bitter","bizarre","blank","blind","blonde","bloody","blushing","boiling","bold","bored","boring","bottom","brainy","brave","breakable","breezy","brief","bright","brilliant","broad","broken","bumpy","burning","busy","calm","capable","capitalist","careful","casual","causal","cautious","central","certain","changing","characteristic","charming","cheap","cheerful","chemical","chief","chilly","chosen","christian","chronic","chubby","circular","civic","civil","civilian","classic","classical","clean","clear","clever","clinical","close","closed","cloudy","clumsy","coastal","cognitive","coherent","cold","collective","colonial","colorful","colossal","coloured","colourful","combative","combined","comfortable","coming","commercial","common","communist","compact","comparable","comparative","compatible","competent","competitive","complete","complex","complicated","comprehensive","compulsory","conceptual","concerned","concrete","condemned","confident","confidential","confused","conscious","conservation","conservative","considerable","consistent","constant","constitutional","contemporary","content","continental","continued","continuing","continuous","controlled","controversial","convenient","conventional","convinced","convincing","cooing","cool","cooperative","corporate","correct","corresponding","costly","courageous","crazy","creative","creepy","criminal","critical","crooked","crowded","crucial","crude","cruel","cuddly","cultural","curious","curly","current","curved","cute","daily","damaged","damp","dangerous","dark","dead","deaf","deafening","dear","decent","decisive","deep","defeated","defensive","defiant","definite","deliberate","delicate","delicious","delighted","delightful","democratic","dependent","depressed","desirable","desperate","detailed","determined","developed","developing","devoted","different","difficult","digital","diplomatic","direct","dirty","disabled","disappointed","disastrous","disciplinary","disgusted","distant","distinct","distinctive","distinguished","disturbed","disturbing","diverse","divine","dizzy","domestic","dominant","double","doubtful","drab","dramatic","dreadful","driving","drunk","dry","dual","due","dull","dusty","dutch","dying","dynamic","eager","early","eastern","easy","economic","educational","eerie","effective","efficient","elaborate","elated","elderly","eldest","electoral","electric","electrical","electronic","elegant","eligible","embarrassed","embarrassing","emotional","empirical","empty","enchanting","encouraging","endless","energetic","enormous","enthusiastic","entire","entitled","envious","environmental","equal","equivalent","essential","established","estimated","ethical","ethnic","eventual","everyday","evident","evil","evolutionary","exact","excellent","exceptional","excess","excessive","excited","exciting","exclusive","existing","exotic","expected","expensive","experienced","experimental","explicit","extended","extensive","external","extra","extraordinary","extreme","exuberant","faint","fair","faithful","familiar","famous","fancy","fantastic","far","fascinating","fashionable","fast","fat","fatal","favourable","favourite","federal","fellow","female","feminist","few","fierce","filthy","final","financial","fine","firm","fiscal","fit","fixed","flaky","flat","flexible","fluffy","fluttering","flying","following","fond","foolish","foreign","formal","formidable","forthcoming","fortunate","forward","fragile","frail","frantic","free","frequent","fresh","friendly","frightened","front","frozen","full","fun","functional","fundamental","funny","furious","future","fuzzy","gastric","gay","general","generous","genetic","gentle","genuine","geographical","giant","gigantic","given","glad","glamorous","gleaming","global","glorious","golden","good","gorgeous","gothic","governing","graceful","gradual","grand","grateful","greasy","great","grieving","grim","gross","grotesque","growing","grubby","grumpy","guilty","handicapped","handsome","happy","hard","harsh","head","healthy","heavy","helpful","helpless","hidden","high","hilarious","hissing","historic","historical","hollow","holy","homeless","homely","hon","honest","horizontal","horrible","hostile","hot","huge","human","hungry","hurt","hushed","husky","icy","ideal","identical","ideological","ill","illegal","imaginative","immediate","immense","imperial","implicit","important","impossible","impressed","impressive","improved","inadequate","inappropriate","inc","inclined","increased","increasing","incredible","independent","indirect","individual","industrial","inevitable","influential","informal","inherent","initial","injured","inland","inner","innocent","innovative","inquisitive","instant","institutional","insufficient","intact","integral","integrated","intellectual","intelligent","intense","intensive","interested","interesting","interim","interior","intermediate","internal","international","intimate","invisible","involved","irrelevant","isolated","itchy","jealous","jittery","joint","jolly","joyous","judicial","juicy","junior","just","keen","key","kind","known","labour","large","late","latin","lazy","leading","left","legal","legislative","legitimate","lengthy","lesser","level","lexical","liable","liberal","light","like","likely","limited","linear","linguistic","liquid","literary","little","live","lively","living","local","logical","lonely","long","loose","lost","loud","lovely","low","loyal","ltd","lucky","mad","magic","magnetic","magnificent","main","major","male","mammoth","managerial","managing","manual","many","marginal","marine","marked","married","marvellous","marxist","mass","massive","mathematical","mature","maximum","mean","meaningful","mechanical","medical","medieval","melodic","melted","mental","mere","metropolitan","mid","middle","mighty","mild","military","miniature","minimal","minimum","ministerial","minor","miserable","misleading","missing","misty","mixed","moaning","mobile","moderate","modern","modest","molecular","monetary","monthly","moral","motionless","muddy","multiple","mushy","musical","mute","mutual","mysterious","naked","narrow","nasty","national","native","natural","naughty","naval","near","nearby","neat","necessary","negative","neighbouring","nervous","net","neutral","new","nice","noble","noisy","normal","northern","nosy","notable","novel","nuclear","numerous","nursing","nutritious","nutty","obedient","objective","obliged","obnoxious","obvious","occasional","occupational","odd","official","ok","okay","old","olympic","only","open","operational","opposite","optimistic","oral","ordinary","organic","organisational","original","orthodox","other","outdoor","outer","outrageous","outside","outstanding","overall","overseas","overwhelming","painful","pale","panicky","parallel","parental","parliamentary","partial","particular","passing","passive","past","patient","payable","peaceful","peculiar","perfect","permanent","persistent","personal","petite","philosophical","physical","plain","planned","plastic","pleasant","pleased","poised","polite","political","poor","popular","positive","possible","potential","powerful","practical","precious","precise","preferred","pregnant","preliminary","premier","prepared","present","presidential","pretty","previous","prickly","primary","prime","primitive","principal","printed","prior","private","probable","productive","professional","profitable","profound","progressive","prominent","promising","proper","proposed","prospective","protective","protestant","proud","provincial","psychiatric","psychological","public","puny","pure","purring","puzzled","quaint","qualified","quarrelsome","querulous","quick","quickest","quiet","quintessential","quixotic","racial","radical","rainy","random","rapid","rare","raspy","rational","ratty","raw","ready","real","realistic","rear","reasonable","recent","reduced","redundant","regional","registered","regular","regulatory","related","relative","relaxed","relevant","reliable","relieved","religious","reluctant","remaining","remarkable","remote","renewed","representative","repulsive","required","resident","residential","resonant","respectable","respective","responsible","resulting","retail","retired","revolutionary","rich","ridiculous","right","rigid","ripe","rising","rival","roasted","robust","rolling","romantic","rotten","rough","round","royal","rubber","rude","ruling","running","rural","sacred","sad","safe","salty","satisfactory","satisfied","scared","scary","scattered","scientific","scornful","scrawny","screeching","secondary","secret","secure","select","selected","selective","selfish","semantic","senior","sensible","sensitive","separate","serious","severe","sexual","shaggy","shaky","shallow","shared","sharp","sheer","shiny","shivering","shocked","short","shrill","shy","sick","significant","silent","silky","silly","similar","simple","single","skilled","skinny","sleepy","slight","slim","slimy","slippery","slow","small","smart","smiling","smoggy","smooth","social","socialist","soft","solar","sole","solid","sophisticated","sore","sorry","sound","sour","southern","soviet","spare","sparkling","spatial","special","specific","specified","spectacular","spicy","spiritual","splendid","spontaneous","sporting","spotless","spotty","square","squealing","stable","stale","standard","static","statistical","statutory","steady","steep","sticky","stiff","still","stingy","stormy","straight","straightforward","strange","strategic","strict","striking","striped","strong","structural","stuck","stupid","subjective","subsequent","substantial","subtle","successful","successive","sudden","sufficient","suitable","sunny","super","superb","superior","supporting","supposed","supreme","sure","surprised","surprising","surrounding","surviving","suspicious","sweet","swift","symbolic","sympathetic","systematic","tall","tame","tart","tasteless","tasty","technical","technological","teenage","temporary","tender","tense","terrible","territorial","testy","then","theoretical","thick","thin","thirsty","thorough","thoughtful","thoughtless","thundering","tight","tiny","tired","top","tory","total","tough","toxic","traditional","tragic","tremendous","tricky","tropical","troubled","typical","ugliest","ugly","ultimate","unable","unacceptable","unaware","uncertain","unchanged","uncomfortable","unconscious","underground","underlying","unemployed","uneven","unexpected","unfair","unfortunate","unhappy","uniform","uninterested","unique","united","universal","unknown","unlikely","unnecessary","unpleasant","unsightly","unusual","unwilling","upper","upset","uptight","urban","urgent","used","useful","useless","usual","vague","valid","valuable","variable","varied","various","varying","vast","verbal","vertical","very","vicarious","vicious","victorious","violent","visible","visiting","visual","vital","vitreous","vivacious","vivid","vocal","vocational","voiceless","voluminous","voluntary","vulnerable","wandering","warm","wasteful","watery","weak","wealthy","weary","wee","weekly","weird","welcome","well","western","wet","whispering","whole","wicked","wide","widespread","wild","wilful","willing","willowy","wily","wise","wispy","wittering","witty","wonderful","wooden","working","worldwide","worried","worrying","worthwhile","worthy","written","wrong","xenacious","xenial","xenogeneic","xenophobic","xeric","xerothermic","yabbering","yammering","yappiest","yappy","yawning","yearling","yearning","yeasty","yelling","yelping","yielding","yodelling","young","youngest","youthful","ytterbic","yucky","yummy","zany","zealous","zeroth","zestful","zesty","zippy","zonal","zoophagous","zygomorphic","zygotic"],u5=["aardvark","aardwolf","albatross","alligator","alpaca","amphibian","anaconda","angelfish","anglerfish","ant","anteater","antelope","antlion","ape","aphid","armadillo","asp","baboon","badger","bandicoot","barnacle","barracuda","basilisk","bass","bat","bear","beaver","bedbug","bee","beetle","bird","bison","blackbird","boa","boar","bobcat","bobolink","bonobo","booby","bovid","bug","butterfly","buzzard","camel","canid","canidae","capybara","cardinal","caribou","carp","cat","caterpillar","catfish","catshark","cattle","centipede","cephalopod","chameleon","cheetah","chickadee","chicken","chimpanzee","chinchilla","chipmunk","cicada","clam","clownfish","cobra","cockroach","cod","condor","constrictor","coral","cougar","cow","coyote","crab","crane","crawdad","crayfish","cricket","crocodile","crow","cuckoo","damselfly","deer","dingo","dinosaur","dog","dolphin","donkey","dormouse","dove","dragon","dragonfly","duck","eagle","earthworm","earwig","echidna","eel","egret","elephant","elk","emu","ermine","falcon","felidae","ferret","finch","firefly","fish","flamingo","flea","fly","flyingfish","fowl","fox","frog","galliform","gamefowl","gayal","gazelle","gecko","gerbil","gibbon","giraffe","goat","goldfish","goose","gopher","gorilla","grasshopper","grouse","guan","guanaco","guineafowl","gull","guppy","haddock","halibut","hamster","hare","harrier","hawk","hedgehog","heron","herring","hippopotamus","hookworm","hornet","horse","hoverfly","hummingbird","hyena","iguana","impala","jackal","jaguar","jay","jellyfish","junglefowl","kangaroo","kingfisher","kite","kiwi","koala","koi","krill","ladybug","lamprey","landfowl","lark","leech","lemming","lemur","leopard","leopon","limpet","lion","lizard","llama","lobster","locust","loon","louse","lungfish","lynx","macaw","mackerel","magpie","mammal","manatee","mandrill","marlin","marmoset","marmot","marsupial","marten","mastodon","meadowlark","meerkat","mink","minnow","mite","mockingbird","mole","mollusk","mongoose","monkey","moose","mosquito","moth","mouse","mule","muskox","narwhal","newt","nightingale","ocelot","octopus","opossum","orangutan","orca","ostrich","otter","owl","ox","panda","panther","parakeet","parrot","parrotfish","partridge","peacock","peafowl","pelican","penguin","perch","pheasant","pig","pigeon","pike","pinniped","piranha","planarian","platypus","pony","porcupine","porpoise","possum","prawn","primate","ptarmigan","puffin","puma","python","quail","quelea","quokka","rabbit","raccoon","rat","rattlesnake","raven","reindeer","reptile","rhinoceros","roadrunner","rodent","rook","rooster","roundworm","sailfish","salamander","salmon","sawfish","scallop","scorpion","seahorse","shark","sheep","shrew","shrimp","silkworm","silverfish","skink","skunk","sloth","slug","smelt","snail","snake","snipe","sole","sparrow","spider","spoonbill","squid","squirrel","starfish","stingray","stoat","stork","sturgeon","swallow","swan","swift","swordfish","swordtail","tahr","takin","tapir","tarantula","tarsier","termite","tern","thrush","tick","tiger","tiglon","toad","tortoise","toucan","trout","tuna","turkey","turtle","tyrannosaurus","unicorn","urial","vicuna","viper","vole","vulture","wallaby","walrus","warbler","wasp","weasel","whale","whippet","whitefish","wildcat","wildebeest","wildfowl","wolf","wolverine","wombat","woodpecker","worm","wren","xerinae","yak","zebra"];const Uu=/^[a-z]{2,15}-[a-z]{2,15}(-[0-9]+)?$/,Wu=/^[a-z]{2,15}$/,Gu=c5.filter(t=>Wu.test(t)),ju=u5.filter(t=>Wu.test(t));function I7(){return l5({dictionaries:[Gu,ju],separator:"-",style:"lowerCase",length:2})}function z7(t,e){return`${t}-${e}`}function h5(t){const e=t.match(/^([a-z]{2,15}-[a-z]{2,15})(?:-[0-9]+)?$/);return e?e[1]:t}const Fl=new Set(Gu),Hl=new Set(ju),d5=new Set;function R7(t){return!t||typeof t!="string"?!1:Uu.test(t)||/^[a-z]{2,15}-[a-z]{2,15}-[a-z0-9]{4}$/.test(t)?!0:/^[a-f0-9]{8}-[a-f0-9]{4}-[a-f0-9]{4}-[a-f0-9]{4}-[a-f0-9]{12}$/i.test(t)}function D7(t){if(!t||typeof t!="string")return!1;if(d5.has(t))return!0;if(Uu.test(t)){const n=h5(t).split("-");if(n.length===2){const[a,i]=n;if(Fl.has(a)&&Hl.has(i))return!0}}if(/^[a-z]{2,15}-[a-z]{2,15}-[a-z0-9]{4}$/.test(t)){const r=t.split("-");if(r.length===3){const[n,a]=r;if(Fl.has(n)&&Hl.has(a))return!0}}return!1}const N7=E.createSelector(t=>qr.select(t)?.capabilities.sessionImport===1),P7=E.createSelector(t=>{const e=t.importableSessions?.sessions;return e?ve(e):[]}),_7=E.createSelector(t=>{const e=t.importableSessions?.providers;return e?ve(e):[]}),L7=E.createSelector(t=>t.importableSessions?.status??"idle"),p5=Oi("ContextAPI");function O7(t){return t.some(e=>e.placementStatus==="placing"||e.placementStatus==="failed")}async function Ul(t,e,r){return p5.debug("Placing attachment",{workspaceId:t,fileName:e,viaSourcePath:r.sourcePath!==void 0,keyed:r.idempotencyKey!==void 0}),await wn("file.placeAttachment",{workspaceId:t,fileName:e,...r.data!==void 0?{data:r.data}:{},...r.sourcePath!==void 0?{sourcePath:r.sourcePath}:{},...r.mimeType!==void 0&&r.mimeType!==""?{mimeType:r.mimeType}:{},...r.idempotencyKey!==void 0?{idempotencyKey:r.idempotencyKey}:{},...r.rawScreenshot!==void 0?{rawScreenshot:r.rawScreenshot}:{}})}async function m5(t,e,r,n,a={}){return await wn("file.attachmentUpload.begin",{workspaceId:t,fileName:e,sizeBytes:r,sha256:n,...a.mimeType!==void 0&&a.mimeType!==""?{mimeType:a.mimeType}:{},...a.idempotencyKey!==void 0?{idempotencyKey:a.idempotencyKey}:{},...a.rawScreenshot!==void 0?{rawScreenshot:a.rawScreenshot}:{}})}const Vu=300*1e3;async function f5(t,e,r,n){return await wn("file.attachmentUpload.chunk",{uploadId:t,seq:e,data:r,...n!==void 0?{workspaceId:n}:{}},{timeoutMs:Vu})}async function g5(t,e){return await wn("file.attachmentUpload.commit",{uploadId:t,...e!==void 0?{workspaceId:e}:{}},{timeoutMs:Vu})}async function v5(t,e){return await wn("file.attachmentUpload.abort",{uploadId:t,...e!==void 0?{workspaceId:e}:{}})}async function b5(t){const e=typeof t=="string"?{attachmentId:t}:t.attachmentId!==void 0?{workspaceId:t.workspaceId,attachmentId:t.attachmentId}:{workspaceId:t.workspaceId,idempotencyKey:t.idempotencyKey};return await wn("file.getAttachmentInfo",e)}async function $7(t,e,r){return await je("file:download-attachment",{workspaceId:t,path:e,fileName:r})}const Ku=25*1024*1024,Wl=1024*1024*1024,y5=16*1024*1024,Xu="attachment upload cancelled";function w5(t,e){return e?.aborted===!0||t instanceof Error&&t.message===Xu}function B0(t){if(t?.aborted)throw new Error(Xu)}function k5(){return!G1.select(E.state)}function x5(t){return rc(t,9,13)}function Yu(){return x5(E.state?.daemonHealth?.stats?.protocolVersion)}function B7(t){if(Yu())return t??crypto.randomUUID()}function Zu(t){if(!t||typeof t!="object")return!1;const{rpcCode:e,code:r}=t;return e===-32602||r==="INVALID_PARAMS"}function S5(t){return Zu(t)&&/already committed/i.test(String(t.message??""))}function A5(t){return{ok:!0,path:t.path,fileName:t.fileName,size:t.size,attachmentId:t.attachmentId,...t.mimeType!==void 0?{mimeType:t.mimeType}:{},uploadedAt:t.uploadedAt,replayed:!0,...t.rawScreenshot!==void 0?{rawScreenshot:t.rawScreenshot}:{}}}async function Pi(t,e,r=b5){try{return A5(await r({workspaceId:t,idempotencyKey:e}))}catch{return}}function Qu(t,e,r){return e!==void 0&&!Zu(t)&&!w5(t,r)}async function Gl(t,e,r,n,a=()=>!0){try{return lt(a),await n()}catch(i){if(lt(a),Qu(i,e,r)){const s=await Pi(t,e);if(s)return s}throw i}}const Ju="file:read returned an unexpected response",ys="file:read failed";function ws(t){if(!t||typeof t!="object"||!("success"in t))throw new Error(Ju);if(!t.success||t.data===void 0)throw new Error(t.error?.message??ys);return t.data}async function T5(t){const e=await je("file:read",{path:t,encoding:"base64",maxSize:Ku,truncateIfLarge:!1}),r=ws(e);if(r.content===void 0)throw new Error(e.error?.message??ys);return r.content}async function e1(t,e,r){const n=await je("file:read-chunk",{path:t,offset:e,length:r});return ws(n)}async function E5(t){const{size:e}=await e1(t,0,1);return e}async function C5(t){const e=await je("file:hash",{path:t});return ws(e).sha256}const M5=new Set(["Internal error","Backend request failed",Ju,ys]);async function q7(t,e,r,n,a,i=()=>!0){lt(i);const s=Yu()?r.idempotencyKey:void 0,o=s!==void 0?{idempotencyKey:s}:{};if(!k5())return Gl(t,s,a,()=>Ul(t,e,{sourcePath:r.sourcePath,mimeType:r.mimeType,...o}),i);const c=await E5(r.sourcePath);if(lt(i),c>Wl)throw new Error(ie.chat_attachmentPlacement_tooLargeRemote_error({name:e,maxGb:Math.round(Wl/(1024*1024*1024))}));if(c>Ku)return I5(t,e,{...r,idempotencyKey:s},c,n,a,i);const h=await T5(r.sourcePath);return lt(i),B0(a),Gl(t,s,a,()=>Ul(t,e,{data:h,mimeType:r.mimeType,...o}),i)}async function I5(t,e,r,n,a,i,s=()=>!0){lt(s);const o=await C5(r.sourcePath);lt(s),B0(i);let c,h;try{({uploadId:c,maxChunkBytes:h}=await m5(t,e,n,o,{mimeType:r.mimeType,...r.idempotencyKey!==void 0?{idempotencyKey:r.idempotencyKey}:{}}))}catch(w){if(lt(s),r.idempotencyKey!==void 0&&S5(w)){const A=await Pi(t,r.idempotencyKey);if(A)return A}throw w}const d=Math.min(y5,h),v=Math.ceil(n/d);let m=!1;try{for(let w=0;w<v;w++){lt(s),B0(i);const{content:A}=await e1(r.sourcePath,w*d,d);lt(s),await f5(c,w,A,t),lt(s),a?.((w+1)/v)}return B0(i),lt(s),m=!0,await g5(c,t)}catch(w){if(lt(s),m&&Qu(w,r.idempotencyKey,i)){const A=await Pi(t,r.idempotencyKey);if(A)return A}throw lt(s),await v5(c,t).catch(()=>{}),w}}function F7(t){if(!t||typeof t!="object")return;const e=t.data;if(e&&typeof e=="object"){const n=e.detail;if(typeof n=="string"&&n.trim().length>0)return n.trim()}const r=t.message;if(typeof r=="string"&&r.trim().length>0&&!M5.has(r.trim()))return r.trim()}function lt(t){if(!t())throw new DOMException("Obsolete attachment submission","AbortError")}function t1(t){const e=t?.split(";")[0].trim().toLowerCase()??"";return e==="image/jpg"?"image/jpeg":e}function H7(t){return["image/png","image/jpeg","image/gif","image/webp"].includes(t1(t))}const z5={"image/png":"png","image/jpeg":"jpg","image/gif":"gif","image/webp":"webp","image/svg+xml":"svg","image/avif":"avif","image/bmp":"bmp","image/tiff":"tiff","image/x-icon":"ico","image/vnd.microsoft.icon":"ico","image/heic":"heic","image/heif":"heif","image/jxl":"jxl"};function U7(t,e){const r=z5[t1(t)]??"bin";return`${e}.${r}`}const R5=Oi("InAppFileInputs");function D5(t=globalThis.window){return t?.electronAPI?.preferInAppPicker===!0}function N5(t){return typeof HTMLInputElement<"u"&&t instanceof HTMLInputElement&&t.type==="file"}const r1=new WeakMap;function W7(t,e=globalThis.window){let r="";try{r=e?.electronAPI?.getPathForFile?.(t)??""}catch{r=""}return r||r1.get(t)||""}function P5(t){const e=new DataTransfer;for(const r of t)e.items.add(new File([r.data],r.name,{type:r.type}));return e.files}async function _5(t,e){const r={accept:t.accept||void 0,multiple:t.multiple},n=await e.invoke(th.IN_APP_FILE_DIALOG.PICK_FILES,r);return!Array.isArray(n)||n.length===0?(t.dispatchEvent(new Event("cancel",{bubbles:!0})),!1):(t.files=P5(n),Array.from(t.files??[],(a,i)=>{const s=n[i]?.path;s&&r1.set(a,s)}),t.dispatchEvent(new Event("input",{bubbles:!0})),t.dispatchEvent(new Event("change",{bubbles:!0})),!0)}function G7(t=globalThis.window){if(!t||!D5(t))return()=>{};const e=t.electronAPI;let r=!1;const n=a=>{const i=a.target;!N5(i)||i.disabled||(a.preventDefault(),!r&&(r=!0,_5(i,e).catch(s=>{R5.warn("in-app picker failed",{error:s instanceof Error?s.message:String(s)})}).finally(()=>{r=!1})))};return t.addEventListener("click",n,!0),()=>t.removeEventListener("click",n,!0)}let L5=0;const ks=new WeakSet;function j7(t){const e=E.dispatch,r=E.state.connections.windowBackendId,n=si.select(E.state,t.id);if(!n||E.state.workspace.pendingDeletions[t.id])return null;const a=`operation-${++L5}`;let i=!1;const s=()=>{try{return E.dispatch===e&&E.state.connections.windowBackendId===r}catch{return!1}},o=()=>s()&&E.state.workspace.deletionTokens[t.id]===a,c=()=>s()&&Vt.select(E.state)===n&&(i?o()&&E.state.workspace.invalidatedDeletions[t.id]!==a&&E.state.workspace.terminalDeletions[t.id]!==a:si.select(E.state,t.id)===n),h={workspaceId:t.id,current:c,terminal(){return!i||!o()||Vt.select(E.state)!==n||E.state.workspace.terminalDeletions[t.id]!==a?null:E.state.workspace.invalidatedDeletions[t.id]===a?"denied":"removed"},begin(d=!0){return i||!c()||E.state.workspace.pendingDeletions[t.id]?!1:(e(ah(t.id,a)),d&&e(ih(t.id)),i=!0,c())},restore(){c()&&(e(oi(t.id,a)),e(nh(t)))},expire(){o()&&e(oi(t.id,a))}};return ks.add(h),h}function jl(t,e){return ks.has(t)&&t.workspaceId===e&&t.current()}function O5(t,e){return ks.has(t)&&t.workspaceId===e&&t.terminal()==="removed"}function V7(t){const e=E.dispatch,r=E.state.connections.windowBackendId,n=E.state.workspace.deletionTokens[t];return()=>{try{n&&E.dispatch===e&&E.state.connections.windowBackendId===r&&e(oi(t,n))}catch{}}}function zr(t,e){const r=()=>t===void 0?Xl.select(E.state)?Vt.select(E.state):null:e?j1.select(E.state,t,e):si.select(E.state,t),n=E.dispatch,a=r();return()=>{try{return E.dispatch===n&&a!==null&&a===r()}catch{return!1}}}const ot=()=>({ok:!1,error:ie.workspace_client_accessChanged_error()}),lr=new vn("WorkspaceClient"),$5=100;function Pn(t){return{...t,path:t.path?.replaceAll("\\","/"),repositoryPath:t.repositoryPath?.replaceAll("\\","/"),worktreePath:t.worktreePath?.replaceAll("\\","/")}}class B5{constructor(){le(this,"pendingRequests",new Map);le(this,"cache",new Map);le(this,"CACHE_TTL",5e3);le(this,"mutationCounter",0)}getCacheKey(e,r){return`${e}:${JSON.stringify(r||{})}`}pruneExpiredCacheEntries(e=Date.now()){for(const[r,n]of this.cache)e-n.timestamp>=this.CACHE_TTL&&this.cache.delete(r)}setCacheEntry(e,r){for(this.pruneExpiredCacheEntries(),this.cache.delete(e),this.cache.set(e,{data:r,timestamp:Date.now()});this.cache.size>$5;){const n=this.cache.keys().next().value;if(n===void 0)break;this.cache.delete(n)}}shouldCacheResponse(e){return e!==Er.LIST&&(e.includes(":get")||e.includes(":list"))}async invoke(e,r){try{const n=this.mutationCounter,a=this.getCacheKey(e,r)+(e===Er.LIST?JSON.stringify([E.state.connections.windowBackendId,Vt.select(E.state)]):"");this.pruneExpiredCacheEntries();const i=this.pendingRequests.get(a);if(i)return lr.debug(`[WorkspaceClient] Reusing pending request for ${e}`),i;if(this.shouldCacheResponse(e)){const o=this.cache.get(a);if(o&&Date.now()-o.timestamp<this.CACHE_TTL)return lr.debug(`[WorkspaceClient] Using cached response for ${e}`),{ok:!0,data:o.data};o&&this.cache.delete(a)}const s=(async()=>{if(typeof window<"u"&&window.electronAPI){let o=r;if(r!==void 0)try{o=JSON.parse(JSON.stringify(r))}catch(d){if(lr.error(`[WorkspaceClient] Data serialization failed for ${e}:`,{error:d,dataKeys:r?Object.keys(r):[]}),r&&typeof r=="object")for(const[v,m]of Object.entries(r))try{JSON.stringify(m)}catch{lr.error(`[WorkspaceClient] Non-serializable field: ${v}`,{type:typeof m,constructor:m?.constructor?.name})}throw new Error(`Data serialization failed: ${d instanceof Error?d.message:"Unknown error"}`)}const c=await Qs(e,o),h=this.normalizeResponse(c);return h.ok&&this.shouldCacheResponse(e)&&n===this.mutationCounter&&this.setCacheEntry(a,h.data),h}return{ok:!1,error:"IPC not available"}})();this.pendingRequests.set(a,s);try{return await s}finally{this.pendingRequests.delete(a)}}catch(n){return lr.error(`[WorkspaceClient] IPC error for ${e}:`,n),{ok:!1,error:n instanceof Error?n.message:"IPC call failed"}}}clearCache(e){if(this.mutationCounter++,e){for(const[r]of this.cache)r.includes(e)&&this.cache.delete(r);for(const[r]of this.pendingRequests)r.includes(e)&&this.pendingRequests.delete(r)}else this.cache.clear(),this.pendingRequests.clear()}normalizeResponse(e){return e==null?{ok:!1,error:"No response received"}:"ok"in e?e.ok?{ok:!0,data:e.data}:{ok:!1,error:e.error||"Unknown error"}:"success"in e?e.success?{ok:!0,data:e.data}:{ok:!1,error:e.error||"Unknown error"}:{ok:!1,error:"Invalid response format"}}async list(){const e=await this.invoke(Er.LIST);return e.ok?e.data&&"workspaces"in e.data?{ok:!0,data:e.data.workspaces.map(Pn)}:{ok:!0,data:e.data.map(Pn),complete:!0}:e}async create(e){const r=e.initialAgent;lr.info(`[WorkspaceClient] create called: title=${e.title}, hasInitialAgent=${!!r}, specialist=${r?.specialist}, model=${r?.model}, keys=${r?Object.keys(r).join(","):"none"}`);const n=zr();if(!n())return ot();const a=await Tr.workspaces.create(e);if(!n())return ot();if(lr.info("[WorkspaceClient] create result",{success:a.success,scope:e.scope,initialAgentId:a.success?a.initialAgent?.id:void 0,error:a.success?void 0:a.error}),a.success&&a.workspace)return this.clearCache(),{ok:!0,data:{workspace:Pn(a.workspace),initialAgent:a.initialAgent,...a.proposalOrigin?{proposalOrigin:a.proposalOrigin}:{}}};const i=a.error||ie.workspace_client_createFailed_error();return a.errorCode?{ok:!1,error:i,errorCode:a.errorCode,...a.launchFailure?{launchFailure:a.launchFailure}:{},...a.baseRefreshFailure?{baseRefreshFailure:a.baseRefreshFailure}:{}}:{ok:!1,error:i}}async open(e){const r=await this.invoke(Er.OPEN,{id:e});return r.ok?{ok:!0,data:Pn(r.data)}:r}async update(e){const r=zr(e.id,Object.keys(e));if(!r())return ot();const n=await Tr.workspaces.update(e);return r()?n.success&&n.workspace?(this.clearCache(e.id),this.clearCache(),{ok:!0,data:Pn(n.workspace)}):{ok:!1,error:n.error||ie.workspace_client_updateFailed_error()}:ot()}async delete(e,r,n){const a=n?()=>jl(n,e):zr(e);if(!a())return{...ot(),obsolete:!0};const i=await Tr.workspaces.delete(e,r);return!a()&&!(n&&O5(n,e))?{...ot(),obsolete:!0}:i.success?(this.clearCache(e),this.clearCache(),i.scheduled&&i.deleteAt?{ok:!0,data:{scheduled:!0,deleteAt:i.deleteAt}}:{ok:!0,data:void 0}):{ok:!1,error:i.error||ie.workspace_client_deleteFailed_error()}}async cancelDelete(e,r){const n=r?()=>jl(r,e):zr(e);if(!n())return{...ot(),obsolete:!0};const a=await Tr.workspaces.cancelDelete(e);return n()?a.success?(this.clearCache(e),this.clearCache(),{ok:!0,data:{cancelled:a.cancelled===!0}}):{ok:!1,error:a.error||ie.workspace_client_cancelDeleteFailed_error()}:{...ot(),obsolete:!0}}async archive(e){const r=zr(e);if(!r())return ot();const n=await Tr.workspaces.archive(e);return r()?n.success?(this.clearCache(e),this.clearCache(),{ok:!0,data:void 0}):{ok:!1,error:n.error||ie.workspace_client_archiveFailed_error()}:ot()}async unarchive(e){const r=zr(e);if(!r())return ot();const n=await Tr.workspaces.unarchive(e);return r()?n.success?(this.clearCache(e),this.clearCache(),{ok:!0,data:void 0}):{ok:!1,error:n.error||ie.workspace_client_unarchiveFailed_error()}:ot()}async retire(e){const r=zr(e);if(!r())return ot();const n=await Tr.workspaces.retire(e);return r()?n.success?(this.clearCache(e),this.clearCache(),{ok:!0,data:n.workspace}):{ok:!1,error:n.error||ie.workspace_ops_purgeFailed_error(),...n.errorCode?{errorCode:n.errorCode}:{}}:ot()}async invokeFresh(e,r){try{if(typeof window<"u"&&window.electronAPI){const n=await Qs(e,r);return this.normalizeResponse(n)}return{ok:!1,error:"IPC not available"}}catch(n){return lr.error(`[WorkspaceClient] IPC error for ${e}:`,n),{ok:!1,error:n instanceof Error?n.message:"IPC call failed"}}}async getDiffSummary(e){return this.invokeFresh(Er.GET_DIFF_SUMMARY,{workspaceId:e})}async getGitSummary(e){return this.invokeFresh(Er.GET_GIT_SUMMARY,{workspaceId:e})}async getTasks(e){return this.invokeFresh(Er.GET_TASKS,{workspaceId:e})}}const K7=new B5;function Vl(t,e){return{key:t.id,confirmedId:t.id,confirmed:t,content:t.content,messageMetadata:t.messageMetadata,imageBlocks:[...t.imageBlocks??[]],fileBlocks:[...t.fileBlocks??[]],deliveryGroups:t.deliveryGroups,contextItems:[...t.contextItems??[]],contributions:[],blocksMutations:e}}function Kl(t){return!t.imageBlocks?.length&&!t.fileBlocks?.length}function n1(t,e){const r=t?.supported===!0,n=r&&(t.refreshNeeded||sh(t)),a=e.map(k=>Vl(k,n));if(!t)return{conversation:[],processing:[],queue:a};const i=new Set(ve(t.seeds).flatMap(k=>k0(k,t.scope.principalId))),s=ve(t.submissions).filter(k=>!i.has(k.id)),o=new Set(e.flatMap(k=>k0(k,t.scope.principalId))),c=ve(t.processing).filter(k=>!k0(k,t.scope.principalId).some(I=>o.has(I))),h=s.filter(k=>k.destination==="conversation");if(!r)return{conversation:h,processing:c,queue:a};for(const k of ve(t.seeds)){const I=a.findIndex(K=>K.confirmedId===k.id),R=Vl(k,!0),Z=k0(k,t.scope.principalId);R.contributions=ve(t.submissions).filter(K=>Z.includes(K.id)),I>=0?(R.confirmed=a[I].confirmed,a[I]=R):(R.confirmedId=void 0,R.confirmed=void 0,a.push(R))}const d=e.filter(k=>k.mergeEligible===!0),v=!n&&d.length===1&&d[0].author?.principalId===t.scope.principalId&&d[0].submissionIds?.length&&!d[0].recoverySources?d[0].id:void 0;let m=v?a.find(k=>k.confirmedId===v):void 0;for(const k of s.filter(I=>I.destination==="queue")){const I=m&&Kl(m)&&Kl(k)?m:void 0;if(I)I.content=[I.content,k.content].filter(Boolean).join(`
479
479
 
480
480
  `),I.imageBlocks.push(...k.imageBlocks??[]),I.fileBlocks.push(...k.fileBlocks??[]),I.contextItems.push(...k.contextItems??[]),I.contributions.push(k),I.blocksMutations=!0,m=I;else{const R={key:k.id,content:k.content,messageMetadata:k.messageMetadata,imageBlocks:[...k.imageBlocks??[]],fileBlocks:[...k.fileBlocks??[]],contextItems:[...k.contextItems??[]],contributions:[k],blocksMutations:!0};a.push(R),n||(m=R)}}const w=new Map(ve(t.submissions).map((k,I)=>[k.id,I])),A=k=>Math.min(...k.contributions.map(I=>w.get(I.id)??1/0)),C=a.filter(k=>!k.confirmedId).sort((k,I)=>A(k)-A(I));let M=0;for(let k=0;k<a.length;k+=1)a[k].confirmedId||(a[k]=C[M++]);return{conversation:h,processing:c,queue:a}}function q5(t,e){return t.some(r=>r.blocksMutations&&(!r.confirmedId||e===void 0||e===r.confirmedId||!!r.confirmed?.editingMessageId&&e===r.confirmed.editingMessageId))}const oa=E.createSelector((t,e)=>{const r=t.pendingSubmissions?.byAgentId[e.agentId];if(!r||!oh(r.scope,e)||V1.select(t,e.workspaceId)!==e.participation||qr.select(t)?.principal.id!==e.principalId)return;const n=t.agentSessions?.byAgentId[e.agentId]?.workspaceId;return n!==void 0&&n!==e.workspaceId?void 0:r}),F5=E.createSelector((t,e)=>n1(oa.select(t,e),X0.select(t,e.agentId,e.workspaceId))),X7=E.createSelector(t=>t.pendingSubmissions),Y7=E.createSelector((t,e)=>{const r=oa.select(t,e.scope);return!!r&&(!!xe(r.operations,e.id)||!!xe(r.submissions,e.id))}),H5=E.createSelector((t,e,r)=>{const n=t.pendingSubmissions?.byAgentId[e]?.scope;return n?.workspaceId===r?F5.select(t,n):n1(void 0,X0.select(t,e,r))}),Z7=E.createSelector((t,e)=>{const r=oa.select(t,e.scope);return!!r&&xe(r.operations,e.id)?.observed===!0}),Q7=E.createSelector((t,e,r,n)=>q5(H5.select(t,e,r).queue,n));function xs(t,e,r){const n=t.pendingSubmissions?.byAgentId[e]?.scope,a=n?oa.select(t,n):void 0;return a?[...ve(a.submissions),...ve(a.processing),...ve(a.tombstones).filter(i=>i.reason==="history"||i.reason==="processing")].some(i=>yh({metadata:i.messageMetadata}).includes(r)):!1}function U5(t,e,r,n=!1){const a=K1.select(t,e),i=X0.select(t,e),s=t.agentSessions?.byAgentId[e],o=$i(s?.metadata?.pendingQuestionsMessageId),c=o.kind==="set"?r.find(w=>w.id===o.messageId)??_i.select(t,e,o.messageId):void 0,h=t.chatState?.byAgentId[e]?.pendingQuestionRecovery,d=o.kind==="set"&&!c&&h?.messageId===o.messageId&&h.status==="found"&&h.questions&&h.questions.length>0?{messageId:o.messageId,questions:h.questions}:null,v=o.kind==="set"&&c&&!r.includes(c)?[c,...r]:r,m=d?n||nc(r,d.messageId)||ac(i,d.messageId)?null:d:bh(v,a,n,o.kind==="set"?o.messageId:o.kind==="cleared"?"":void 0,i);return!m||xs(t,e,m.messageId)||ic(s?.metadata,m.messageId)?null:m}function W5(t){return t.role==="assistant"&&t.provisional!==!0&&t.isStreaming!==!0&&(t.contentBlocks??[]).some(e=>wh(e)!==null)}function J7(t,e,r){if(U5(t,e,r))return!0;const n=t.agentSessions?.byAgentId[e],a=$i(n?.metadata?.pendingQuestionsMessageId);if(a.kind!=="set"||xs(t,e,a.messageId)||ic(n?.metadata,a.messageId)||nc(r,a.messageId))return!1;const i=X0.select(t,e);if(ac(i,a.messageId))return!1;const s=r.find(h=>h.id===a.messageId)??_i.select(t,e,a.messageId);if(s)return!W5(s);const o=t.chatState?.byAgentId[e]?.pendingQuestionRecovery;return!(o?.messageId===a.messageId&&o.status==="found"&&!!o.questions&&o.questions.length>0)}function eg(t,e){const r=$i(t.agentSessions?.byAgentId[e]?.metadata?.pendingQuestionsMessageId);if(r.kind!=="set"||xs(t,e,r.messageId)||_i.select(t,e,r.messageId))return null;const n=t.chatState?.byAgentId[e]?.pendingQuestionRecovery;if(n?.messageId===r.messageId){const a=n.status==="found"&&!!n.questions&&n.questions.length>0;return{messageId:r.messageId,shouldRequest:!1,loading:!a}}return{messageId:r.messageId,shouldRequest:!0,loading:!0}}const G5=E.createSelector(t=>t.permission.requests),j5=E.createSelector(t=>ve(G5.select(t))),V5=E.createSelector((t,e)=>j5.select(t).filter(r=>r.sessionId===e)),tg=E.createSelector((t,e)=>V5.select(t,e).length),a1=t=>X1.select(t,t.connections.windowBackendId),rg=E.createSelector(t=>{const e=Vt.select(t);return e&&a1(t)?e:null}),ng=E.createSelector(t=>{const e=Ql.select(t),r=e.actionContext;if(!r||!a1(t))return null;const n=ve(t.workspace.workspaces).filter(a=>Jl(e,a.id,()=>a)!==null).map(a=>a.id).sort();return JSON.stringify([r,n])}),ag=E.createSelector(t=>{const e=Ql.select(t),r=new Map,n=a=>{let i=r.get(a);if(!i){const s=()=>xe(t.workspace.workspaces,a);i=[Jl(e,a,s),Y1(e,a,s)],r.set(a,i)}return i};return JSON.stringify(Object.values(t.agentSessions.byAgentId).flatMap(a=>a.workspaceId?[[a.id,a.workspaceId,...n(a.workspaceId)]]:[]).sort((a,i)=>a[0].localeCompare(i[0])))}),ig=E.createSelector((t,e,r)=>{const n=t.agentMutationUi.byWorkspaceId[e],a=n?xe(n.consumers,r):void 0;return a&&!a.consumed?{...a,workspaceId:e}:void 0});function sg(t){if(!t)return!0;const e=t.trim().toLowerCase();return e==="new agent"||e==="orchestrator"||e==="assistant"||e.startsWith("thread ")||e.startsWith("workspace agent")||/^chat \d{1,2}-\d{2} (am|pm)$/i.test(e)}function og(t){return/^agent-[a-f0-9-]{36}$/i.test(t)}const lg=E.createSelector(t=>t.uiLayout.lineWrapping),cg=E.createSelector(t=>t.uiLayout.foldUnchanged),ug=E.createSelector(t=>t.uiLayout.diffSideBySide),hg=E.createSelector(t=>t.uiLayout.diffIndicators),dg=E.createSelector(t=>t.uiLayout.sidebarWidth),pg=E.createSelector(t=>t.uiLayout.sidebarExpandedWidth),mg=E.createSelector(t=>t.uiLayout.sidebarCollapsed),fg=E.createSelector((t,e,r)=>{const n=t.uiLayout.panelVisibility.byWorkspaceId[e];return n?n[r]:lh[r]}),gg=E.createSelector(t=>t.uiLayout.spacesSidebarWidth),vg=E.createSelector(t=>t.uiLayout.spacesSidebarCollapsed),bg=E.createSelector(t=>t.uiLayout.tabbedSidebarPinned),yg=E.createSelector(t=>t.uiLayout.sidebarSide),wg=E.createSelector((t,e)=>t.uiLayout.resizablePanelSizes[e]),kg=E.createSelector((t,e)=>t.uiLayout.hydratedResizablePanelSizes[e]===!0),Ss=E.createSelector((t,e)=>t.skills.byWorkspaceId[e]??ch),xg=E.createSelector((t,e)=>Ss.select(t,e).skills),Sg=E.createSelector((t,e)=>Ss.select(t,e).loading),Ag=E.createSelector((t,e)=>Ss.select(t,e).error),Tg=E.createSelector((t,e)=>t.skills.byAgentId?.[e]??uh),Eg=E.createSelector((t,e)=>!!t.skills.byAgentId?.[e]),K5=E.createSelector(t=>qr.select(t)?.capabilities.remoteAgentSkills===1),Cg=E.createSelector((t,e)=>{if(!e||!K5.select(t))return;const r=t.agentSessions?.byAgentId[e];if(r?.nodeId)return r.nodeName??ie.chat_slashSkillSuggestionList_unnamedMachine_label()}),Mg=E.createSelector((t,e)=>t.agentSessions?.byAgentId[e]?.nodeState);export{y3 as $,C2 as A,h5 as B,F7 as C,Yf as D,v6 as E,g6 as F,pt as G,I7 as H,b5 as I,Y3 as J,Ch as K,w3 as L,Ku as M,Qf as N,Q3 as O,h6 as P,E7 as Q,J3 as R,qi as S,g3 as T,y5 as U,f3 as V,v3 as W,sc as X,S6 as Y,t6 as Z,e6 as _,v5 as a,p7 as a$,C7 as a0,A7 as a1,O7 as a2,C6 as a3,U7 as a4,w6 as a5,G7 as a6,y6 as a7,nf as a8,d6 as a9,B7 as aA,Sc as aB,O6 as aC,D6 as aD,bu as aE,Cu as aF,x6 as aG,M7 as aH,Ul as aI,q7 as aJ,$h as aK,D5 as aL,A3 as aM,E6 as aN,T6 as aO,n1 as aP,m4 as aQ,ps as aR,q5 as aS,Uh as aT,z6 as aU,Pi as aV,M6 as aW,sf as aX,Hn as aY,u6 as aZ,ig as a_,S5 as aa,b3 as ab,n6 as ac,i6 as ad,a6 as ae,sg as af,L6 as ag,eo as ah,w5 as ai,Fu as aj,k5 as ak,H7 as al,x7 as am,R7 as an,rf as ao,D7 as ap,x3 as aq,c6 as ar,m6 as as,f6 as at,og as au,l6 as av,k6 as aw,k3 as ax,Ih as ay,Da as az,s6 as b,X7 as b$,Eg as b0,Cg as b1,Mg as b2,Tg as b3,H5 as b4,m7 as b5,E3 as b6,hg as b7,ug as b8,K2 as b9,Z2 as bA,W2 as bB,K6 as bC,G6 as bD,J6 as bE,F6 as bF,Bu as bG,B6 as bH,f7 as bI,a5 as bJ,H6 as bK,X6 as bL,$6 as bM,cg as bN,_7 as bO,P7 as bP,L7 as bQ,mg as bR,K3 as bS,lg as bT,G3 as bU,i5 as bV,v7 as bW,V3 as bX,fg as bY,tg as bZ,oa as b_,r7 as ba,V2 as bb,j2 as bc,t7 as bd,G2 as be,a7 as bf,Y6 as bg,Q6 as bh,Y2 as bi,n0 as bj,Q2 as bk,j6 as bl,$t as bm,U6 as bn,W6 as bo,r0 as bp,V6 as bq,X2 as br,i7 as bs,qu as bt,Z6 as bu,U2 as bv,H2 as bw,q6 as bx,e7 as by,n7 as bz,z7 as c,Bi as c$,rg as c0,ag as c1,ng as c2,j5 as c3,G5 as c4,l7 as c5,J2 as c6,g7 as c7,b7 as c8,w7 as c9,z3 as cA,N3 as cB,P3 as cC,F3 as cD,j3 as cE,Rh as cF,T3 as cG,M3 as cH,L3 as cI,C3 as cJ,q3 as cK,D3 as cL,R3 as cM,$3 as cN,_3 as cO,u7 as cP,r5 as cQ,d7 as cR,h7 as cS,f5 as cT,Qu as cU,I6 as cV,W7 as cW,Jd as cX,X3 as cY,q2 as cZ,p6 as c_,y7 as ca,s7 as cb,o7 as cc,c7 as cd,Q7 as ce,wg as cf,kg as cg,N7 as ch,pg as ci,yg as cj,dg as ck,xg as cl,Ag as cm,Sg as cn,vg as co,gg as cp,Y7 as cq,Z7 as cr,bg as cs,Nt as ct,H3 as cu,U3 as cv,W3 as cw,O3 as cx,B3 as cy,I3 as cz,lt as d,wt as d0,A6 as d1,b6 as d2,gs as d3,K7 as d4,kl as d5,N6 as d6,R6 as d7,ke as d8,m5 as e,k7 as f,P6 as g,r6 as h,T7 as i,t1 as j,V7 as k,j7 as l,_6 as m,g5 as n,o6 as o,Z3 as p,g4 as q,Mu as r,Ra as s,S3 as t,p2 as u,J7 as v,eg as w,U5 as x,$7 as y,S7 as z};
@@ -1 +1 @@
1
- import{p as e}from"./CcJmuwXr.js";const t=[{id:"textarea-state-matrix",title:"Textarea states",states:["default","rest","hover","focus","empty","placeholder","disabled","read-only","invalid","error","described","auto-expand","max-height-scroll","long-content","light","dark","zoom-200","keyboard-focus","compact","reduced-motion"],themes:["light","dark","high-contrast"],viewport:"both",reducedMotion:!0}];e({id:"textarea",source:"src/lib/components/ui/textarea/textarea.svelte",publicImport:"$lib/components/ui/textarea",legacyImports:["$lib/components/ui/textarea/textarea.svelte"],exports:["Textarea","textareaMetadata"],category:"primitive",owner:"007-B2",callers:["src/features/accept-changes/components/NativeReviewAttempt.svelte","src/features/accept-changes/components/NativeSidebarReview.svelte","src/features/conversation-goal/components/GoalEditorDialog.svelte","src/features/discussions/components/DiscussionThread.svelte","src/features/hud/components/dock-composer-media.preview.svelte","src/features/hud/media-editor/screenshot/ScreenshotCanvas.svelte","src/features/machine-rail/machine-rail.preview.svelte","src/lib/component-catalog/renderers/ContentFieldCatalogPreview.svelte","src/lib/component-catalog/renderers/FieldPreviewCell.svelte","src/lib/component-catalog/renderers/ModalCatalogPreview.svelte","src/lib/components/chat/QueuedMessageList.svelte","src/lib/components/chat/proposals/ProposalCard.svelte","src/lib/components/modals/ReplaceAgentModal.svelte","src/lib/components/patterns/settings/SettingsTextarea.svelte","src/lib/components/patterns/settings/settings-textarea.preview.svelte","src/lib/components/tiptap/CommentDialog.svelte","src/lib/components/tiptap/LaunchFromSelectionDialog.svelte","src/lib/components/tiptap/MermaidBlockNodeView.svelte","src/lib/components/ui/ask-user-questions/ask-user-questions.svelte","src/lib/components/ui/message-composer/message-composer.svelte","src/lib/components/ui/text-entry-focus.preview.svelte","src/lib/components/ui/tooltip/tooltip-audit.preview.svelte","src/lib/components/workspace/PullRequestCreator.svelte","src/lib/components/workspace/WorkspaceSidebarHeader.svelte","src/lib/components/workspace/sidebar-tabs.preview.svelte","src/lib/components/workspace/sidebar/CommitDrawer.svelte","src/lib/components/workspace/sidebar/MergePanel.svelte","src/lib/components/workspace/sidebar/PRSection.svelte","src/lib/components/workspace/sidebar/WorkspaceProgressCard.svelte"],replacement:null,characterizationTest:"src/lib/components/ui/textarea/textarea.test.ts",removalGate:"Retain while exported and binding, resize, validation, and fixture tests pass.",dynamicImports:[],fixtures:t});
1
+ import{p as e}from"./B26ZHg3s.js";const t=[{id:"textarea-state-matrix",title:"Textarea states",states:["default","rest","hover","focus","empty","placeholder","disabled","read-only","invalid","error","described","auto-expand","max-height-scroll","long-content","light","dark","zoom-200","keyboard-focus","compact","reduced-motion"],themes:["light","dark","high-contrast"],viewport:"both",reducedMotion:!0}];e({id:"textarea",source:"src/lib/components/ui/textarea/textarea.svelte",publicImport:"$lib/components/ui/textarea",legacyImports:["$lib/components/ui/textarea/textarea.svelte"],exports:["Textarea","textareaMetadata"],category:"primitive",owner:"007-B2",callers:["src/features/accept-changes/components/NativeReviewAttempt.svelte","src/features/accept-changes/components/NativeSidebarReview.svelte","src/features/conversation-goal/components/GoalEditorDialog.svelte","src/features/discussions/components/DiscussionThread.svelte","src/features/hud/components/dock-composer-media.preview.svelte","src/features/hud/media-editor/screenshot/ScreenshotCanvas.svelte","src/features/machine-rail/machine-rail.preview.svelte","src/lib/component-catalog/renderers/ContentFieldCatalogPreview.svelte","src/lib/component-catalog/renderers/FieldPreviewCell.svelte","src/lib/component-catalog/renderers/ModalCatalogPreview.svelte","src/lib/components/chat/QueuedMessageList.svelte","src/lib/components/chat/proposals/ProposalCard.svelte","src/lib/components/modals/ReplaceAgentModal.svelte","src/lib/components/patterns/settings/SettingsTextarea.svelte","src/lib/components/patterns/settings/settings-textarea.preview.svelte","src/lib/components/tiptap/CommentDialog.svelte","src/lib/components/tiptap/LaunchFromSelectionDialog.svelte","src/lib/components/tiptap/MermaidBlockNodeView.svelte","src/lib/components/ui/ask-user-questions/ask-user-questions.svelte","src/lib/components/ui/message-composer/message-composer.svelte","src/lib/components/ui/text-entry-focus.preview.svelte","src/lib/components/ui/tooltip/tooltip-audit.preview.svelte","src/lib/components/workspace/PullRequestCreator.svelte","src/lib/components/workspace/WorkspaceSidebarHeader.svelte","src/lib/components/workspace/sidebar-tabs.preview.svelte","src/lib/components/workspace/sidebar/CommitDrawer.svelte","src/lib/components/workspace/sidebar/MergePanel.svelte","src/lib/components/workspace/sidebar/PRSection.svelte","src/lib/components/workspace/sidebar/WorkspaceProgressCard.svelte"],replacement:null,characterizationTest:"src/lib/components/ui/textarea/textarea.test.ts",removalGate:"Retain while exported and binding, resize, validation, and fixture tests pass.",dynamicImports:[],fixtures:t});
@@ -1 +1 @@
1
- import{JH as r,Ca as p,oh as b,DS as d,nZ as S}from"./B9vHutcJ.js";import{g as u}from"./_UjuBCOJ.js";const g=r.createSelector(e=>e.tabState.isDragging),w=r.createSelector(e=>e.tabState.scrollPositions),I=r.createSelector(e=>e.tabState.currentTabId),W=r.createSelector((e,t)=>e.tabState.openTabs[t]===!0),B=r.createSelector(e=>e.tabState.mountedBrowserTabLeases),G=r.createSelector(e=>e.tabState.browserTabRecoveryRequests),O=r.createSelector(e=>e.tabState.browserTabNavigations),v=r.createSelector(e=>e.tabState.browserTabsAgentDrawing),L=r.createSelector(e=>e.connections?.hasReceivedList===!0&&e.tabState.hydratedBackendId===u(e)),h=r.createSelector(e=>e.tabState.workspaceStacks.flatMap(t=>t)),i=[],l=new WeakMap;function T(e){const t=e.tabGroups;if(!t)return i;let a=l.get(t);return a||(a=b(e),l.set(t,a)),a}const A=r.createSelector(e=>{if(e.userPreferences?.labsTabGroupsEnabled!==!0)return null;const{openTabGroupId:t,currentTabId:a}=e.tabState;return p(b(e.tabState),a,t)}),R=r.createSelector(e=>e.userPreferences?.labsTabGroupsEnabled===!0),y=r.createSelector(e=>e.userPreferences?.labsTabGroupsEnabled===!0?T(e.tabState):i),C=r.createSelector(e=>Object.keys(e.tabState.openTabs).filter(t=>e.tabState.openTabs[t]===!0)),m=r.createSelector(e=>{const{recentlyClosedTabIds:t,recentlyClosedTabAt:a,openTabs:s}=e.tabState;for(let o=t.length-1;o>=0;o--){const n=t[o];if(!s[n])return{workspaceId:n,closedAt:a[n]??0}}return null}),P=r.createSelector(e=>d(e.tabState)),c=[],D=r.createSelector(e=>{if(e.connections&&!e.connections.hasReceivedList)return c;const t=u(e);if(e.tabState.hydratedBackendId!==t||!e.workspace.hasLoaded||e.workspace.loadedBackendId!==t||e.workspace.workspaces.ids.length===0)return c;const a=e.tabState.workspaceStacks.flatMap(s=>s).filter(s=>e.tabState.optimisticTabs[s]||e.workspace.pendingCreations[s]||e.workspace.pendingDeletions[s]?!1:!S(e.workspace.workspaces,s));return a.length===0?c:a});export{C as selectActiveWorkspaceIds,w as selectAllScrollPositions,O as selectBrowserTabNavigations,G as selectBrowserTabRecoveryRequests,v as selectBrowserTabsAgentDrawing,I as selectCurrentWorkspaceTabId,g as selectIsDragging,W as selectIsWorkspaceTabOpen,m as selectLastClosedWorkspaceTab,B as selectMountedBrowserTabLeases,A as selectOpenWorkspaceTabGroupId,P as selectPersistedWorkspaceTabsState,y as selectWorkspaceTabGroups,R as selectWorkspaceTabGroupsEnabled,h as selectWorkspaceTabOrder,L as selectWorkspaceTabsHydrated,D as selectWorkspaceTabsToReconcile};
1
+ import{JH as r,Ca as p,oh as b,DS as d,nZ as S}from"./CiKoEJ2m.js";import{g as u}from"./B1lpukIv.js";const g=r.createSelector(e=>e.tabState.isDragging),w=r.createSelector(e=>e.tabState.scrollPositions),I=r.createSelector(e=>e.tabState.currentTabId),W=r.createSelector((e,t)=>e.tabState.openTabs[t]===!0),B=r.createSelector(e=>e.tabState.mountedBrowserTabLeases),G=r.createSelector(e=>e.tabState.browserTabRecoveryRequests),O=r.createSelector(e=>e.tabState.browserTabNavigations),v=r.createSelector(e=>e.tabState.browserTabsAgentDrawing),L=r.createSelector(e=>e.connections?.hasReceivedList===!0&&e.tabState.hydratedBackendId===u(e)),h=r.createSelector(e=>e.tabState.workspaceStacks.flatMap(t=>t)),i=[],l=new WeakMap;function T(e){const t=e.tabGroups;if(!t)return i;let a=l.get(t);return a||(a=b(e),l.set(t,a)),a}const A=r.createSelector(e=>{if(e.userPreferences?.labsTabGroupsEnabled!==!0)return null;const{openTabGroupId:t,currentTabId:a}=e.tabState;return p(b(e.tabState),a,t)}),R=r.createSelector(e=>e.userPreferences?.labsTabGroupsEnabled===!0),y=r.createSelector(e=>e.userPreferences?.labsTabGroupsEnabled===!0?T(e.tabState):i),C=r.createSelector(e=>Object.keys(e.tabState.openTabs).filter(t=>e.tabState.openTabs[t]===!0)),m=r.createSelector(e=>{const{recentlyClosedTabIds:t,recentlyClosedTabAt:a,openTabs:s}=e.tabState;for(let o=t.length-1;o>=0;o--){const n=t[o];if(!s[n])return{workspaceId:n,closedAt:a[n]??0}}return null}),P=r.createSelector(e=>d(e.tabState)),c=[],D=r.createSelector(e=>{if(e.connections&&!e.connections.hasReceivedList)return c;const t=u(e);if(e.tabState.hydratedBackendId!==t||!e.workspace.hasLoaded||e.workspace.loadedBackendId!==t||e.workspace.workspaces.ids.length===0)return c;const a=e.tabState.workspaceStacks.flatMap(s=>s).filter(s=>e.tabState.optimisticTabs[s]||e.workspace.pendingCreations[s]||e.workspace.pendingDeletions[s]?!1:!S(e.workspace.workspaces,s));return a.length===0?c:a});export{C as selectActiveWorkspaceIds,w as selectAllScrollPositions,O as selectBrowserTabNavigations,G as selectBrowserTabRecoveryRequests,v as selectBrowserTabsAgentDrawing,I as selectCurrentWorkspaceTabId,g as selectIsDragging,W as selectIsWorkspaceTabOpen,m as selectLastClosedWorkspaceTab,B as selectMountedBrowserTabLeases,A as selectOpenWorkspaceTabGroupId,P as selectPersistedWorkspaceTabsState,y as selectWorkspaceTabGroups,R as selectWorkspaceTabGroupsEnabled,h as selectWorkspaceTabOrder,L as selectWorkspaceTabsHydrated,D as selectWorkspaceTabsToReconcile};