@intent-hq/web 2.378.0 → 2.379.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (326) hide show
  1. package/package.json +1 -1
  2. package/web/app/immutable/assets/{0.CntaSdOs.css → 0.CTPF0Qlx.css} +1 -1
  3. package/web/app/immutable/chunks/{CI7RbtEr.js → -WAhkWcN.js} +1 -1
  4. package/web/app/immutable/chunks/{DrJzqwYl.js → 3LDzw5hr.js} +1 -1
  5. package/web/app/immutable/chunks/{BqwJFhy0.js → 3gy7b498.js} +1 -1
  6. package/web/app/immutable/chunks/{DxRn1b69.js → 5JKCI89x.js} +1 -1
  7. package/web/app/immutable/chunks/{Cha0m9_p.js → 7xVzJhz9.js} +3 -3
  8. package/web/app/immutable/chunks/{H1XKoyU7.js → 95fFKc_B.js} +1 -1
  9. package/web/app/immutable/chunks/{BiyXqzpr.js → 99N6trPd.js} +1 -1
  10. package/web/app/immutable/chunks/{Ct7u3x4Z.js → 9Oy7dzP1.js} +1 -1
  11. package/web/app/immutable/chunks/{BOjnK0ib.js → 9Wfd5HgS.js} +1 -1
  12. package/web/app/immutable/chunks/{C9q9AVLE.js → ASj4zc4i.js} +1 -1
  13. package/web/app/immutable/chunks/{CDK1PUhb.js → AX9GlL7f.js} +1 -1
  14. package/web/app/immutable/chunks/{D7x-7T1z.js → B-VOV29o.js} +1 -1
  15. package/web/app/immutable/chunks/{Bzs3gWUn.js → B-qkLMcw.js} +1 -1
  16. package/web/app/immutable/chunks/{CWdPByc8.js → B08HT3WC.js} +1 -1
  17. package/web/app/immutable/chunks/{DhZiRE53.js → B09v4S72.js} +1 -1
  18. package/web/app/immutable/chunks/{bWHoQAZ0.js → B0xk6zYz.js} +1 -1
  19. package/web/app/immutable/chunks/{BR7wr0TX.js → B1sTTKq-.js} +1 -1
  20. package/web/app/immutable/chunks/{B8vdzcge.js → B23p8GKo.js} +1 -1
  21. package/web/app/immutable/chunks/{DuKUDTXp.js → B2kxgCpF.js} +4 -4
  22. package/web/app/immutable/chunks/{FJwOmaJn.js → B5OCsMya.js} +1 -1
  23. package/web/app/immutable/chunks/{DHOJXRBs.js → B5qu4FK-.js} +1 -1
  24. package/web/app/immutable/chunks/{YCbY89i6.js → B5x8b2Md.js} +1 -1
  25. package/web/app/immutable/chunks/{BFBac69t.js → B61Vm2jJ.js} +1 -1
  26. package/web/app/immutable/chunks/{CMRXj5iU.js → B6ARnCFm.js} +1 -1
  27. package/web/app/immutable/chunks/{CYF61-VE.js → B7Mft14L.js} +3 -3
  28. package/web/app/immutable/chunks/{DNg21Y1b.js → B7QvV8MS.js} +1 -1
  29. package/web/app/immutable/chunks/{C_iKPxuE.js → B7pJ0oQN.js} +3 -3
  30. package/web/app/immutable/chunks/{D7wqIX40.js → B90WO3Nw.js} +1 -1
  31. package/web/app/immutable/chunks/{CqsHYBSd.js → B9QnX69E.js} +1 -1
  32. package/web/app/immutable/chunks/{Bjpdj-Rz.js → BAaqzMEP.js} +1 -1
  33. package/web/app/immutable/chunks/{D3e1peXC.js → BBibLZN0.js} +1 -1
  34. package/web/app/immutable/chunks/{B6IP3G-s.js → BDciodIO.js} +1 -1
  35. package/web/app/immutable/chunks/{BRHA9tcr.js → BED17zwc.js} +2 -2
  36. package/web/app/immutable/chunks/BEKwCWB-.js +1 -0
  37. package/web/app/immutable/chunks/{DwpTtGo9.js → BFHz4Mic.js} +4 -4
  38. package/web/app/immutable/chunks/{BKSCrb1m.js → BGpvxEza.js} +1 -1
  39. package/web/app/immutable/chunks/{RKhqePYS.js → BHl8a9sq.js} +1 -1
  40. package/web/app/immutable/chunks/{Dn1azdNN.js → BI0xIaK5.js} +1 -1
  41. package/web/app/immutable/chunks/{D1DuB8m6.js → BIpZTv4V.js} +1 -1
  42. package/web/app/immutable/chunks/{NppR00xP.js → BLp3-Mdk.js} +2 -2
  43. package/web/app/immutable/chunks/{D5n4bmLW.js → BMz9z95U.js} +1 -1
  44. package/web/app/immutable/chunks/{DPVg7jvq.js → BOIa3b7l.js} +1 -1
  45. package/web/app/immutable/chunks/{BGsL8K0y.js → BOVF8j6B.js} +1 -1
  46. package/web/app/immutable/chunks/{Y8mQJY9P.js → BOlkYOOx.js} +1 -1
  47. package/web/app/immutable/chunks/{DkuxYFAh.js → BOrCm7f7.js} +1 -1
  48. package/web/app/immutable/chunks/{1RAMMSz2.js → BQiJMsZZ.js} +1 -1
  49. package/web/app/immutable/chunks/{D95TUop3.js → BSD-ntGx.js} +1 -1
  50. package/web/app/immutable/chunks/{CDLMG5g2.js → BT1eR3Bj.js} +1 -1
  51. package/web/app/immutable/chunks/{BMqjLC9C.js → BUOJIxHm.js} +1 -1
  52. package/web/app/immutable/chunks/{BupGSW0e.js → BVGm2-7m.js} +1 -1
  53. package/web/app/immutable/chunks/{DRCQRBOX.js → BVVYfWqp.js} +1 -1
  54. package/web/app/immutable/chunks/{nNR5liVx.js → BVdTA_y5.js} +1 -1
  55. package/web/app/immutable/chunks/{DNxs15P5.js → BVhmKG23.js} +1 -1
  56. package/web/app/immutable/chunks/{CH6hoQCh.js → BWP_R2MA.js} +1 -1
  57. package/web/app/immutable/chunks/{Dl5T14-N.js → BXA0q2RP.js} +1 -1
  58. package/web/app/immutable/chunks/{BDWzwjAw.js → BXEhOBKy.js} +1 -1
  59. package/web/app/immutable/chunks/{CMITzGAq.js → BXWV2GsM.js} +1 -1
  60. package/web/app/immutable/chunks/{DNAYSx3o.js → BZD36hSJ.js} +1 -1
  61. package/web/app/immutable/chunks/{dC4Ouk4t.js → BZi270zL.js} +1 -1
  62. package/web/app/immutable/chunks/{DXvCGoHo.js → B_7rDlJA.js} +1 -1
  63. package/web/app/immutable/chunks/{C9XPvdvP.js → B_SqXKMX.js} +1 -1
  64. package/web/app/immutable/chunks/{C1-QjOg0.js → B_rj1oI3.js} +1 -1
  65. package/web/app/immutable/chunks/{D4BcrleY.js → BblUoKwU.js} +1 -1
  66. package/web/app/immutable/chunks/{DXxnoOGg.js → BhP2yLip.js} +1 -1
  67. package/web/app/immutable/chunks/{CC73Ord3.js → Bjc6stZr.js} +1 -1
  68. package/web/app/immutable/chunks/{AHKUBHmH.js → BkE4ThRL.js} +2 -2
  69. package/web/app/immutable/chunks/{DpwIptaI.js → BkK6L2aU.js} +1 -1
  70. package/web/app/immutable/chunks/{DAkxD-CW.js → Bln5N5gf.js} +1 -1
  71. package/web/app/immutable/chunks/{B16ZhAkF.js → Bm1YRNX5.js} +1 -1
  72. package/web/app/immutable/chunks/{BRyCucnb.js → BmMxtG34.js} +1 -1
  73. package/web/app/immutable/chunks/{CQco45Cg.js → BmusT0yN.js} +3 -3
  74. package/web/app/immutable/chunks/{C5Zy1enh.js → BncYKhak.js} +1 -1
  75. package/web/app/immutable/chunks/{ChB7enBh.js → BpUidpA4.js} +1 -1
  76. package/web/app/immutable/chunks/{DLE3vveN.js → BpzZdAGA.js} +1 -1
  77. package/web/app/immutable/chunks/{CuWqPurf.js → BpznkfWn.js} +1 -1
  78. package/web/app/immutable/chunks/{Bf_h69U3.js → Bqdjarag.js} +1 -1
  79. package/web/app/immutable/chunks/{yYqgfv9t.js → BqnC5jpg.js} +1 -1
  80. package/web/app/immutable/chunks/{IclfFZoe.js → Bqvx2p-8.js} +1 -1
  81. package/web/app/immutable/chunks/{DEsbP_jO.js → BrF70gz7.js} +1 -1
  82. package/web/app/immutable/chunks/{qdAkw__e.js → Bs9C3yw5.js} +1 -1
  83. package/web/app/immutable/chunks/{yTn_UE0E.js → BtupVFyT.js} +1 -1
  84. package/web/app/immutable/chunks/{BOW58NW5.js → Bue8rt91.js} +1 -1
  85. package/web/app/immutable/chunks/{a3l5znCa.js → BwJyU0G0.js} +2 -2
  86. package/web/app/immutable/chunks/{DzEfixuL.js → Bwe4xLDo.js} +1 -1
  87. package/web/app/immutable/chunks/{BTiEQBIg.js → Bx1sm-W9.js} +1 -1
  88. package/web/app/immutable/chunks/{DTPgmjai.js → Bx3lRAzK.js} +1 -1
  89. package/web/app/immutable/chunks/{BFxBQddb.js → Byz3i90Q.js} +1 -1
  90. package/web/app/immutable/chunks/{DdNx-LMu.js → Bz1UdUMu.js} +1 -1
  91. package/web/app/immutable/chunks/{Cr0HizBS.js → Bz43dY69.js} +1 -1
  92. package/web/app/immutable/chunks/{Dv-DK4ZQ.js → C-662HWr.js} +1 -1
  93. package/web/app/immutable/chunks/{8ScDICwb.js → C-6kZjgn.js} +1 -1
  94. package/web/app/immutable/chunks/{250ka2gI.js → C-QdzJwG.js} +1 -1
  95. package/web/app/immutable/chunks/{C4F64iPQ.js → C-jJNcMR.js} +1 -1
  96. package/web/app/immutable/chunks/{B1Weu8fb.js → C-nHSAUo.js} +3 -3
  97. package/web/app/immutable/chunks/{BPRCBm84.js → C0EhdYGV.js} +1 -1
  98. package/web/app/immutable/chunks/{Brh3GO3O.js → C3puOFC3.js} +1 -1
  99. package/web/app/immutable/chunks/{JIE_7jo4.js → C6CbeYqw.js} +1 -1
  100. package/web/app/immutable/chunks/{C7FWeTQP.js → C6Xyba22.js} +1 -1
  101. package/web/app/immutable/chunks/{Di1597mK.js → C6w4HIHS.js} +4 -4
  102. package/web/app/immutable/chunks/{DhPOXvW2.js → C8VLUX_C.js} +1 -1
  103. package/web/app/immutable/chunks/{DWx-rRFl.js → C99ttMY5.js} +1 -1
  104. package/web/app/immutable/chunks/{CGwoBkMN.js → C9BFhP02.js} +1 -1
  105. package/web/app/immutable/chunks/{Crl5h76T.js → C9of0fiN.js} +1 -1
  106. package/web/app/immutable/chunks/{0KXDpLHs.js → CAMYapEA.js} +1 -1
  107. package/web/app/immutable/chunks/{TE5M669U.js → CB6JpnWC.js} +1 -1
  108. package/web/app/immutable/chunks/{DAFCfCw4.js → CBcFUe2n.js} +1 -1
  109. package/web/app/immutable/chunks/{B1cgGcI0.js → CBm8wTeU.js} +1 -1
  110. package/web/app/immutable/chunks/{CtssBApV.js → CBoDYG4N.js} +1 -1
  111. package/web/app/immutable/chunks/{ER2tmGzm.js → CC4qGxb7.js} +1 -1
  112. package/web/app/immutable/chunks/{Kl08LBTM.js → CCZp7LCQ.js} +1 -1
  113. package/web/app/immutable/chunks/{DzRCnjNV.js → CDYyrBGY.js} +1 -1
  114. package/web/app/immutable/chunks/{PbmSZkiX.js → CEAmSotY.js} +1 -1
  115. package/web/app/immutable/chunks/{SORTQVEW.js → CEeEOvCL.js} +1 -1
  116. package/web/app/immutable/chunks/{u_aTJYPF.js → CFLU9fq8.js} +1 -1
  117. package/web/app/immutable/chunks/{D5TWWYRb.js → CFTAk3la.js} +1 -1
  118. package/web/app/immutable/chunks/{Cc2CqLcV.js → CFg7iVIZ.js} +1 -1
  119. package/web/app/immutable/chunks/{DsALDj-G.js → CFxNovSS.js} +1 -1
  120. package/web/app/immutable/chunks/{C7hiMHci.js → CGFkplEn.js} +1 -1
  121. package/web/app/immutable/chunks/{DufyJpiq.js → CGnn93LH.js} +1 -1
  122. package/web/app/immutable/chunks/{Mvzzws-D.js → CGuufzS0.js} +1 -1
  123. package/web/app/immutable/chunks/{Bb3DLwd-.js → CHKsRESt.js} +1 -1
  124. package/web/app/immutable/chunks/CHWIPzMj.js +1 -0
  125. package/web/app/immutable/chunks/{CG1uBvn1.js → CI1ntq87.js} +1 -1
  126. package/web/app/immutable/chunks/{CqB0bCAG.js → CJ3l-lGj.js} +2 -2
  127. package/web/app/immutable/chunks/{BIx2KRjJ.js → CKC2M8j1.js} +1 -1
  128. package/web/app/immutable/chunks/{D2Vwu3SP.js → CKhPlHZj.js} +1 -1
  129. package/web/app/immutable/chunks/{fs3EIvPV.js → CPE--RtJ.js} +1 -1
  130. package/web/app/immutable/chunks/{DuNaiyu-.js → CPp2qH2q.js} +1 -1
  131. package/web/app/immutable/chunks/{BSJqN5vZ.js → CRSdOrSC.js} +1 -1
  132. package/web/app/immutable/chunks/{DaOZBaPJ.js → CR_d2Ton.js} +1 -1
  133. package/web/app/immutable/chunks/{C_AcfC1L.js → CSCM9u80.js} +4 -4
  134. package/web/app/immutable/chunks/{CDuekMJZ.js → CUV6PvQK.js} +1 -1
  135. package/web/app/immutable/chunks/{uh7Y9z2F.js → CWVqIb-d.js} +1 -1
  136. package/web/app/immutable/chunks/{DPL73Y_l.js → CWcntBOg.js} +1 -1
  137. package/web/app/immutable/chunks/{UZmeM7G7.js → CWgzsPKB.js} +1 -1
  138. package/web/app/immutable/chunks/{Cdn6MckB.js → CYv_coXk.js} +1 -1
  139. package/web/app/immutable/chunks/{Ck_gSwZK.js → CZ4sJNRy.js} +1 -1
  140. package/web/app/immutable/chunks/{egYaebOi.js → C_T3jbC9.js} +1 -1
  141. package/web/app/immutable/chunks/{CON-zxWG.js → C_VUI8Os.js} +1 -1
  142. package/web/app/immutable/chunks/{D22DhEZM.js → C_a7D1qz.js} +1 -1
  143. package/web/app/immutable/chunks/{D9x2HEXw.js → CeGIZnmi.js} +2 -2
  144. package/web/app/immutable/chunks/{Gw1t2Srm.js → CeOa9B5I.js} +1 -1
  145. package/web/app/immutable/chunks/{BturI3jj.js → CezXhCS3.js} +1 -1
  146. package/web/app/immutable/chunks/{Bl3WKtdy.js → CfiSkM8N.js} +1 -1
  147. package/web/app/immutable/chunks/{C-4lCpez.js → Cg7Nu4Va.js} +1 -1
  148. package/web/app/immutable/chunks/{CcC3AMEc.js → CkCYZCke.js} +1 -1
  149. package/web/app/immutable/chunks/{WZfEgods.js → Cl2rjjSj.js} +1 -1
  150. package/web/app/immutable/chunks/{CcBZUrE6.js → Cl7-Lh5E.js} +1 -1
  151. package/web/app/immutable/chunks/{CpL_C-GJ.js → Clz72PsI.js} +1 -1
  152. package/web/app/immutable/chunks/{CpRRerrb.js → CmE98hO-.js} +1 -1
  153. package/web/app/immutable/chunks/{BgXHwBod.js → CoCpxnqY.js} +6 -6
  154. package/web/app/immutable/chunks/{B9ibu-4g.js → CpK9Zfzc.js} +1 -1
  155. package/web/app/immutable/chunks/{Du66vBdT.js → CpasQsOr.js} +1 -1
  156. package/web/app/immutable/chunks/{BcG7yxE2.js → CprGZ_vQ.js} +1 -1
  157. package/web/app/immutable/chunks/{CZ6S_xft.js → Cq8HYngI.js} +1 -1
  158. package/web/app/immutable/chunks/{DBX7lh1O.js → CsXyRQ8j.js} +55 -55
  159. package/web/app/immutable/chunks/{Dal4fUVD.js → CtJv8xMf.js} +1 -1
  160. package/web/app/immutable/chunks/{BH0cA3lf.js → CuKET43j.js} +2 -2
  161. package/web/app/immutable/chunks/{B12Be-IL.js → Cum-TdZd.js} +1 -1
  162. package/web/app/immutable/chunks/{q7CfEA0Z.js → CwSTmJL9.js} +1 -1
  163. package/web/app/immutable/chunks/{ypTw5Sl1.js → CxWH-8GW.js} +1 -1
  164. package/web/app/immutable/chunks/{D_zFSOgZ.js → CxdlCefM.js} +1 -1
  165. package/web/app/immutable/chunks/{C_yzewkM.js → Cy7afLsK.js} +1 -1
  166. package/web/app/immutable/chunks/{CfrT9tcw.js → CzU9DzbS.js} +2 -2
  167. package/web/app/immutable/chunks/{N88c9xuK.js → D-Cja9EW.js} +1 -1
  168. package/web/app/immutable/chunks/{XUs6uy3h.js → D-vbvcep.js} +1 -1
  169. package/web/app/immutable/chunks/{Dollk5ZG.js → D0LnBaLt.js} +1 -1
  170. package/web/app/immutable/chunks/{BR2JfJtY.js → D2KpwJIq.js} +1 -1
  171. package/web/app/immutable/chunks/{C7zasWUf.js → D3OvqZhX.js} +2 -2
  172. package/web/app/immutable/chunks/{C6oWsXP5.js → D3hR-AME.js} +1 -1
  173. package/web/app/immutable/chunks/{CEswnMLF.js → D4EK6U-m.js} +1 -1
  174. package/web/app/immutable/chunks/{BP3qefPW.js → D5uBa-Ne.js} +1 -1
  175. package/web/app/immutable/chunks/{BQaHhd4d.js → D5yaIVD5.js} +1 -1
  176. package/web/app/immutable/chunks/{B3PM4xsG.js → D7IJPBQY.js} +2 -2
  177. package/web/app/immutable/chunks/{C-Rjcf-U.js → D8DBejPV.js} +1 -1
  178. package/web/app/immutable/chunks/{D2h8OBcY.js → DA2RRspt.js} +1 -1
  179. package/web/app/immutable/chunks/{BhxN6u9j.js → DBsXclsv.js} +1 -1
  180. package/web/app/immutable/chunks/{BGa2D4m6.js → DC1aoXyY.js} +1 -1
  181. package/web/app/immutable/chunks/{CSfG5Ybw.js → DCpFqaYA.js} +3 -3
  182. package/web/app/immutable/chunks/{DumVye9M.js → DD2BajRb.js} +1 -1
  183. package/web/app/immutable/chunks/{jRZT2QjD.js → DDfMifm6.js} +1 -1
  184. package/web/app/immutable/chunks/{ByjFf28U.js → DDtBtnNz.js} +1 -1
  185. package/web/app/immutable/chunks/{CHWbLwXf.js → DED90qCG.js} +1 -1
  186. package/web/app/immutable/chunks/{B0m0-2MI.js → DF8x1-0S.js} +1 -1
  187. package/web/app/immutable/chunks/{83xTN5fk.js → DFztsOdi.js} +1 -1
  188. package/web/app/immutable/chunks/{GAJ0U6Fj.js → DGfmWFo_.js} +1 -1
  189. package/web/app/immutable/chunks/{D1mB9_6q.js → DH2vm-1i.js} +1 -1
  190. package/web/app/immutable/chunks/{ha_PYGcR.js → DIZhZiBE.js} +1 -1
  191. package/web/app/immutable/chunks/{DK4nL43d.js → DInAnkwK.js} +1 -1
  192. package/web/app/immutable/chunks/{DJrPi4os.js → DJ6GAsDd.js} +1 -1
  193. package/web/app/immutable/chunks/{eqIwOdFV.js → DJM-jC4D.js} +1 -1
  194. package/web/app/immutable/chunks/{BmET8lGk.js → DKpBQuZo.js} +1 -1
  195. package/web/app/immutable/chunks/{DFMLCzQx.js → DMkatOMg.js} +1 -1
  196. package/web/app/immutable/chunks/{DZ6X6WRI.js → DNhGGhpW.js} +1 -1
  197. package/web/app/immutable/chunks/{DIweBffD.js → DOPKn6Qc.js} +1 -1
  198. package/web/app/immutable/chunks/{BK9wcqQr.js → DPWIkUJh.js} +1 -1
  199. package/web/app/immutable/chunks/{DzCaG8dx.js → DPbAP8qP.js} +1 -1
  200. package/web/app/immutable/chunks/DS9Nses5.js +1 -0
  201. package/web/app/immutable/chunks/{BvR4li8f.js → DSQXi-HI.js} +1 -1
  202. package/web/app/immutable/chunks/{CN5rDbbI.js → DVBcpomn.js} +3 -3
  203. package/web/app/immutable/chunks/{CQaQS_9E.js → DW6LpaLb.js} +1 -1
  204. package/web/app/immutable/chunks/{B50wbSca.js → DXujHnPt.js} +1 -1
  205. package/web/app/immutable/chunks/{BT9wsXKO.js → DZBWbkQT.js} +1 -1
  206. package/web/app/immutable/chunks/{DsNGTbSH.js → D_gp0b_i.js} +1 -1
  207. package/web/app/immutable/chunks/{Brv29rn8.js → D_p0cMgQ.js} +1 -1
  208. package/web/app/immutable/chunks/{1ppucs3B.js → DaHFtoCa.js} +1 -1
  209. package/web/app/immutable/chunks/{Cweq-0-O.js → DaNzos5O.js} +1 -1
  210. package/web/app/immutable/chunks/{B4CGkc2Z.js → DaauQgcE.js} +1 -1
  211. package/web/app/immutable/chunks/{2bm1-WPv.js → DavOW4Pn.js} +1 -1
  212. package/web/app/immutable/chunks/{CWOgcDNw.js → DbYmdzfs.js} +1 -1
  213. package/web/app/immutable/chunks/{BaifPKCC.js → Dc7HNZUt.js} +1 -1
  214. package/web/app/immutable/chunks/{BhaVZ25C.js → DdAvLI3S.js} +1 -1
  215. package/web/app/immutable/chunks/{B_kNlUD-.js → Dg1VUJOX.js} +1 -1
  216. package/web/app/immutable/chunks/{BB-o-_x6.js → DhbIivmf.js} +1 -1
  217. package/web/app/immutable/chunks/{Qetkvafr.js → DlGq0K29.js} +1 -1
  218. package/web/app/immutable/chunks/{BIcRvrKV.js → Dlhp692a.js} +1 -1
  219. package/web/app/immutable/chunks/{CtXwHt_m.js → Dm5sb2T9.js} +1 -1
  220. package/web/app/immutable/chunks/{BHWU1Psx.js → DmzyDWxY.js} +1 -1
  221. package/web/app/immutable/chunks/{rS28LQlr.js → DnPj8kAJ.js} +1 -1
  222. package/web/app/immutable/chunks/{DZMdKpsk.js → DnuPDvKn.js} +1 -1
  223. package/web/app/immutable/chunks/{BWIk2_6S.js → DoQcVvIo.js} +1 -1
  224. package/web/app/immutable/chunks/{Dnhf6K_4.js → DpOnLCwB.js} +1 -1
  225. package/web/app/immutable/chunks/{1FvEkC51.js → DrJBkQ-6.js} +1 -1
  226. package/web/app/immutable/chunks/{CUkvXPuX.js → Drf7hLVf.js} +1 -1
  227. package/web/app/immutable/chunks/{CBcz8VK6.js → Ds2ZtSdQ.js} +1 -1
  228. package/web/app/immutable/chunks/{DyvHB1Xe.js → DsOeQrzx.js} +1 -1
  229. package/web/app/immutable/chunks/{BLB-tbz2.js → DtR7mmzX.js} +1 -1
  230. package/web/app/immutable/chunks/{u_ejDIBY.js → DtgMvDnf.js} +1 -1
  231. package/web/app/immutable/chunks/{CbKyR6Kf.js → DvRDNe8t.js} +2 -2
  232. package/web/app/immutable/chunks/{7FbFoR5r.js → Dw3sD88n.js} +1 -1
  233. package/web/app/immutable/chunks/{DQg0oSRW.js → Dwv8zw-4.js} +1 -1
  234. package/web/app/immutable/chunks/{BAduOJD2.js → DxTOze69.js} +1 -1
  235. package/web/app/immutable/chunks/{CL61Lx-U.js → DyRcp3T7.js} +1 -1
  236. package/web/app/immutable/chunks/{CcIA3l7Z.js → Dym3QysO.js} +1 -1
  237. package/web/app/immutable/chunks/{BuvlavTl.js → DzUGhIyX.js} +1 -1
  238. package/web/app/immutable/chunks/{CJPgBxaF.js → DzyqDyL5.js} +1 -1
  239. package/web/app/immutable/chunks/{Dof5KDCr.js → EVnmmycb.js} +1 -1
  240. package/web/app/immutable/chunks/EyifK0YY.js +1 -0
  241. package/web/app/immutable/chunks/{CuTVPcxo.js → JtSO6K6S.js} +1 -1
  242. package/web/app/immutable/chunks/{DK-gr9PF.js → Jy2VtQ-j.js} +1 -1
  243. package/web/app/immutable/chunks/{DaNk_UZD.js → LqqBQeq2.js} +1 -1
  244. package/web/app/immutable/chunks/M46vYfPG.js +1 -0
  245. package/web/app/immutable/chunks/{CxfjSsAX.js → MpQYVCAl.js} +1 -1
  246. package/web/app/immutable/chunks/{D0boXdmz.js → P8ajY_OC.js} +1 -1
  247. package/web/app/immutable/chunks/{O62vZaBr.js → Q-AtJOxP.js} +1 -1
  248. package/web/app/immutable/chunks/{Bn7ZmTkF.js → QgUSWdkO.js} +2 -2
  249. package/web/app/immutable/chunks/{CVvdpvXK.js → R5mMERAP.js} +3 -3
  250. package/web/app/immutable/chunks/{4nEMohmP.js → Rx9iChBc.js} +1 -1
  251. package/web/app/immutable/chunks/{h37VgGKw.js → T8wSaQKw.js} +1 -1
  252. package/web/app/immutable/chunks/{DYg3sgSl.js → U_nfJe6p.js} +1 -1
  253. package/web/app/immutable/chunks/{D1u6MWVh.js → VpUwDjJ_.js} +1 -1
  254. package/web/app/immutable/chunks/{DP0ovMwg.js → XMeuZ35b.js} +1 -1
  255. package/web/app/immutable/chunks/XslshjYv.js +1 -0
  256. package/web/app/immutable/chunks/{D2524wRl.js → Yqp_UZB_.js} +1 -1
  257. package/web/app/immutable/chunks/{8jMj1OGX.js → ZANjZw72.js} +1 -1
  258. package/web/app/immutable/chunks/{D1mEn0KC.js → ZEAS6srh.js} +1 -1
  259. package/web/app/immutable/chunks/{Be253aOc.js → ZUA6bo0t.js} +1 -1
  260. package/web/app/immutable/chunks/{Bd1sW9PE.js → _H8LGW4O.js} +1 -1
  261. package/web/app/immutable/chunks/{AF10H5eK.js → a3c0uoAC.js} +1 -1
  262. package/web/app/immutable/chunks/{DRG3CbTe.js → asAq0Q4G.js} +1 -1
  263. package/web/app/immutable/chunks/{BxsHp3SH.js → d-SabBb_.js} +1 -1
  264. package/web/app/immutable/chunks/{GIg9PMOU.js → dlAoKLi8.js} +1 -1
  265. package/web/app/immutable/chunks/{Ci7no3-D.js → ePwjer8w.js} +1 -1
  266. package/web/app/immutable/chunks/{jBPLh4Hv.js → eapM1N3E.js} +1 -1
  267. package/web/app/immutable/chunks/{BO7alE7_.js → g4xg1V0H.js} +4 -4
  268. package/web/app/immutable/chunks/{DUtR3SZU.js → gFHNPMAw.js} +1 -1
  269. package/web/app/immutable/chunks/{DWoxVXOI.js → icAEjhzY.js} +1 -1
  270. package/web/app/immutable/chunks/{CVmi7DTf.js → jCrYQ4Ri.js} +2 -2
  271. package/web/app/immutable/chunks/{PxI72ehJ.js → lJ4MSEIh.js} +1 -1
  272. package/web/app/immutable/chunks/{oZTI_u9n.js → lWlirZMs.js} +1 -1
  273. package/web/app/immutable/chunks/{DyyOhufN.js → o551VboC.js} +1 -1
  274. package/web/app/immutable/chunks/{CtZ-vglf.js → ohZ0BtRB.js} +1 -1
  275. package/web/app/immutable/chunks/{BHSnSmbO.js → ouMJlHY1.js} +1 -1
  276. package/web/app/immutable/chunks/{CPZGjCPW.js → pElsZ4dt.js} +1 -1
  277. package/web/app/immutable/chunks/{Dx1gCWLU.js → pV_14PeY.js} +1 -1
  278. package/web/app/immutable/chunks/{DmQDTavV.js → rCQAZGb3.js} +2 -2
  279. package/web/app/immutable/chunks/{BYge7mVb.js → sASsqJNT.js} +1 -1
  280. package/web/app/immutable/chunks/{C62iVnTg.js → s_zHQBKW.js} +1 -1
  281. package/web/app/immutable/chunks/{Cn-uVT14.js → tOpgiK5L.js} +1 -1
  282. package/web/app/immutable/chunks/{1wWPoJ5Q.js → tp06XFI7.js} +1 -1
  283. package/web/app/immutable/chunks/{D4SYJpS6.js → tsVy-iyH.js} +1 -1
  284. package/web/app/immutable/chunks/{BL9pxyXQ.js → uN_eK4W9.js} +1 -1
  285. package/web/app/immutable/chunks/{Btv0cBol.js → uod76J5c.js} +1 -1
  286. package/web/app/immutable/chunks/{Ddfl3sUZ.js → v1zTkmPU.js} +1 -1
  287. package/web/app/immutable/chunks/{4K9ZZSJu.js → w4-ZULNa.js} +1 -1
  288. package/web/app/immutable/chunks/{7CEHC6fO.js → wOi8eNbH.js} +1 -1
  289. package/web/app/immutable/chunks/{D-GPCP_y.js → waJ4nm9k.js} +1 -1
  290. package/web/app/immutable/chunks/{Dm98AfRw.js → wwOYCksJ.js} +1 -1
  291. package/web/app/immutable/chunks/{DjBfsgFx.js → yQuAS-d_.js} +1 -1
  292. package/web/app/immutable/chunks/{DzQEubr_.js → z2dT_sfg.js} +1 -1
  293. package/web/app/immutable/entry/{app.DnvWkWuC.js → app.Bg9ukl2W.js} +3 -3
  294. package/web/app/immutable/entry/start.DrKu0acT.js +1 -0
  295. package/web/app/immutable/nodes/{0.BHNsHbq6.js → 0.w7cQ0D88.js} +1 -1
  296. package/web/app/immutable/nodes/{1.CxKhOECT.js → 1.4ql_JuYe.js} +1 -1
  297. package/web/app/immutable/nodes/{10.mSXX1b86.js → 10.Db5zVRj1.js} +5 -5
  298. package/web/app/immutable/nodes/{11.LQ-kpfGf.js → 11.5Xli6dPl.js} +1 -1
  299. package/web/app/immutable/nodes/{12.moZNbeME.js → 12.Dmc_y_qK.js} +1 -1
  300. package/web/app/immutable/nodes/{13.B9ngkS9V.js → 13.DZTGM0cb.js} +1 -1
  301. package/web/app/immutable/nodes/{14.BvKaKKlx.js → 14.BJwsFDEF.js} +3 -3
  302. package/web/app/immutable/nodes/{15.VPLfb8v_.js → 15.DMW9u33y.js} +1 -1
  303. package/web/app/immutable/nodes/{16.Bfi41nCp.js → 16.BcrbQLum.js} +1 -1
  304. package/web/app/immutable/nodes/{17.BaloRRSg.js → 17.8JKljX5l.js} +1 -1
  305. package/web/app/immutable/nodes/{18.DPo7p8bY.js → 18.YeTMHnFS.js} +1 -1
  306. package/web/app/immutable/nodes/{19.CavDiJik.js → 19.CTmJfPwB.js} +2 -2
  307. package/web/app/immutable/nodes/{2.kzpobJJm.js → 2.bsXLvGyt.js} +4 -4
  308. package/web/app/immutable/nodes/{20.EaJ-UneM.js → 20.C1sgyqm8.js} +1 -1
  309. package/web/app/immutable/nodes/{3.DZFV57al.js → 3.JBWvrxuJ.js} +1 -1
  310. package/web/app/immutable/nodes/{4.Dfre4p0n.js → 4.D6e8o0bC.js} +1 -1
  311. package/web/app/immutable/nodes/{5.BnBSTXSN.js → 5.BiCuWA6k.js} +1 -1
  312. package/web/app/immutable/nodes/{6.BYj21cDV.js → 6.IF1PmeP7.js} +1 -1
  313. package/web/app/immutable/nodes/{7.CvDxUVa8.js → 7.BlK4mw1L.js} +1 -1
  314. package/web/app/immutable/nodes/{8.CTVkGhmt.js → 8.CUVVZTwf.js} +1 -1
  315. package/web/app/immutable/nodes/9.JkDekIr4.js +12 -0
  316. package/web/app/version.json +1 -1
  317. package/web/generated/paraglide.js +49 -49
  318. package/web/index.html +19 -19
  319. package/web/app/immutable/chunks/2CFsxajB.js +0 -1
  320. package/web/app/immutable/chunks/2CQlphfn.js +0 -1
  321. package/web/app/immutable/chunks/6QXvr4x0.js +0 -1
  322. package/web/app/immutable/chunks/BOaPEJcS.js +0 -1
  323. package/web/app/immutable/chunks/CXjastM3.js +0 -1
  324. package/web/app/immutable/chunks/Cr_KTPcL.js +0 -1
  325. package/web/app/immutable/entry/start.D5h2aGMe.js +0 -1
  326. package/web/app/immutable/nodes/9.Dq4n-Ddo.js +0 -12
@@ -1,4 +1,4 @@
1
- var $s=Object.defineProperty;var Fs=(f,r,l)=>r in f?$s(f,r,{enumerable:!0,configurable:!0,writable:!0,value:l}):f[r]=l;var q=(f,r,l)=>Fs(f,typeof r!="symbol"?r+"":r,l);import{t as dn,bo as x,bm as P,bw as un,bq as On,b as hn,bs as je}from"./2CQlphfn.js";import{ai as Cr,bs as gn,ca as Be,aD as e,bH as m,a5 as N,bA as H,b_ as z,aw as sn,aj as ln,W as w,bn as fn,bV as J,aA as C,ay as ne,bS as y,bl as de,bO as K,aB as T,c9 as u,a7 as nt,br as tt,bj as sr,c5 as gt,c0 as Ln,a as Us,be as Tt,b$ as ft,bf as or}from"./3SdAC2_C.js";import{i as M}from"./ByjFf28U.js";import{g as Pt,i as Hn,I as ir,e as ar}from"./Bf_h69U3.js";import{n as cn,l as Ws,c as Bs}from"./DsNGTbSH.js";import{f as En,s as Ve,g as lr}from"./DhZiRE53.js";import{b as on}from"./Dn334wJv.js";import{Jt as Me,eS as Vs,eJ as Ks,eK as js,o_ as qs,nO as Vt,nS as cr,nR as In,eM as Gs,vF as Qs,vG as Xs,vI as Js,Hx as Ys,Jy as Zs,rX as eo,eR as to}from"./eqIwOdFV.js";import{c as no}from"./6QXvr4x0.js";import{F as Ne,a1 as ro,a8 as An,aw as dr,ax as ur,bS as so,aP as oo,cd as hr,bZ as gr,cq as fr}from"./B16ZhAkF.js";import{dG as io,br as ao,X as lo,aO as mr,p as co}from"./TE5M669U.js";import{L as pr}from"./8ScDICwb.js";import{C as an}from"./DypB-Dwi.js";import{b8 as kr,bN as uo,bT as ho}from"./DWx-rRFl.js";import{q as $e,d as go,g as fo}from"./1RAMMSz2.js";import"./DTPgmjai.js";import"./Bn7ZmTkF.js";/* empty css */import{T as Pr}from"./Cdn6MckB.js";import{g as Nn}from"./RKhqePYS.js";import{A as mo}from"./C_yzewkM.js";import{f as ke}from"./BvR4li8f.js";import{C as po}from"./DK4nL43d.js";import{C as vo}from"./jRZT2QjD.js";import{s as vr}from"./BRyCucnb.js";import{S as Dt}from"./BKSCrb1m.js";import{l as Rt}from"./Be253aOc.js";import{G as _r}from"./CcBZUrE6.js";import{P as _o}from"./CDLMG5g2.js";import{g as wo}from"./Dn1azdNN.js";import{a8 as bo,Y as So}from"./D9x2HEXw.js";import{ap as yo}from"./BO7alE7_.js";import{L as wr}from"./C_AcfC1L.js";import{ae as xo,ad as Co,af as ko}from"./DBX7lh1O.js";function br({scrollTop:f,scrollHeight:r,height:l,fitPerfectly:a=!1,fitPerfectlyOverscroll:c=0,overscrollSize:p}){const b=l+p*2,S=a?l+c*2:b;if(r=Math.max(r,S),b>=r||a){const G=Math.max(f-c,0),h=Math.min(f+S,r);return{top:G,bottom:Math.max(h,G)}}let A=f+l/2-b/2,F=A+b;return A<0&&(A=0),F>r&&(F=r),A=Math.floor(Math.max(A,0)),{top:A,bottom:Math.ceil(Math.max(Math.min(F,r),A))}}function Po(f,r){return f==null||r==null?f===r:f.top===r.top&&f.bottom===r.bottom}const Rr=1e3,Ro=Rr*4,Lo=[0,1e-6,.99999,1],Ho={overscrollSize:Rr,intersectionObserverMargin:Ro,resizeDebugging:!1};let rn=0,Io=-1;var Pe,Ao=(Pe=class{constructor(r){q(this,"__id",`virtualizer-${++Io}`);q(this,"config");q(this,"type","simple");q(this,"intersectionObserver");q(this,"scrollTop",0);q(this,"height",0);q(this,"scrollHeight",0);q(this,"windowSpecs",{top:0,bottom:0});q(this,"root");q(this,"contentContainer");q(this,"resizeObserver");q(this,"observers",new Map);q(this,"visibleInstances",new Map);q(this,"visibleInstancesDirty",!1);q(this,"instancesChanged",new Set);q(this,"reconcileQueue",new Set);q(this,"scrollDirty",!0);q(this,"heightDirty",!0);q(this,"scrollHeightDirty",!0);q(this,"renderedObservers",0);q(this,"connectQueue",new Map);q(this,"handleContainerResize",r=>{if(this.root==null)return;let l=!1;for(const a of r){const c=a.borderBoxSize[0].blockSize;this.root instanceof Document?c!==this.scrollHeight&&(this.scrollHeightDirty=!0,l=!0,this.config.resizeDebugging&&(console.log("Virtualizer: content size change",this.__id,{sizeChange:c-rn,newSize:c}),rn=c)):a.target===this.root?c!==this.height&&(this.heightDirty=!0,l=!0):a.target===this.contentContainer&&(this.scrollHeightDirty=!0,l=!0,this.config.resizeDebugging&&(console.log("Virtualizer: scroller size change",this.__id,{sizeChange:c-rn,newSize:c}),rn=c))}l&&$e(this.computeRenderRangeAndEmit)});q(this,"handleWindowResize",()=>{Pe.__STOP||window.innerHeight===this.height||(this.heightDirty=!0,$e(this.computeRenderRangeAndEmit))});q(this,"handleWindowScroll",()=>{Pe.__STOP||this.root==null||!(this.root instanceof Document)||(this.scrollDirty=!0,$e(this.computeRenderRangeAndEmit))});q(this,"handleElementScroll",()=>{Pe.__STOP||this.root==null||this.root instanceof Document||(this.scrollDirty=!0,$e(this.computeRenderRangeAndEmit))});q(this,"computeRenderRangeAndEmit",()=>{if(Pe.__STOP)return;const r=this.heightDirty||this.scrollHeightDirty;let l=this.instancesChanged.size>0;if(this.instancesChanged.size===0){const p=br({scrollTop:this.getScrollTop(),height:this.getHeight(),scrollHeight:this.getScrollHeight(),overscrollSize:this.config.overscrollSize});if(!r&&Po(this.windowSpecs,p)&&this.renderedObservers===this.observers.size&&!this.visibleInstancesDirty&&this.reconcileQueue.size===0)return;this.windowSpecs=p}this.visibleInstancesDirty=!1,this.renderedObservers=this.observers.size;const a=this.getScrollAnchor(this.height),c=new Set;for(const p of r?this.observers.values():this.visibleInstances.values())p.onRender(r)&&c.add(p);for(const p of this.instancesChanged)c.has(p)||p.onRender(r)&&c.add(p);this.scrollFix(a);for(const p of c)this.reconcileQueue.delete(p),p.reconcileHeights();for(const p of this.reconcileQueue)p.reconcileHeights()&&(l=!0);this.reconcileQueue.clear(),l||=this.instancesChanged.size>0,l&&this.markDOMDirty(),(l||r)&&$e(this.computeRenderRangeAndEmit),c.clear(),this.instancesChanged.clear()});q(this,"handleIntersectionChange",r=>{this.scrollDirty=!0;for(const{target:l,isIntersecting:a}of r){if(!(l instanceof HTMLElement))throw new Error("Virtualizer.handleIntersectionChange: target not an HTMLElement");const c=this.observers.get(l);c!=null&&(a&&!this.visibleInstances.has(l)?(c.setVisibility(!0),this.visibleInstances.set(l,c),this.visibleInstancesDirty=!0):!a&&this.visibleInstances.has(l)&&(c.setVisibility(!1),this.visibleInstances.delete(l),this.visibleInstancesDirty=!0))}this.visibleInstancesDirty&&$e(this.computeRenderRangeAndEmit)});this.config={...Ho,...r}}setup(r,l){if(this.root==null){this.root=r,this.resizeObserver=new ResizeObserver(this.handleContainerResize),this.intersectionObserver=new IntersectionObserver(this.handleIntersectionChange,{root:this.root,threshold:Lo,rootMargin:`${this.config.intersectionObserverMargin}px 0px ${this.config.intersectionObserverMargin}px 0px`}),r instanceof Document?this.setupWindow():this.setupElement(l),window.__INSTANCE=this,window.__TOGGLE=()=>{Pe.__STOP?(Pe.__STOP=!1,(this.getScrollContainerElement()??window).scrollTo({top:Pe.__lastScrollPosition}),$e(this.computeRenderRangeAndEmit)):(Pe.__lastScrollPosition=this.getScrollTop(),Pe.__STOP=!0)};for(const[a,c]of this.connectQueue.entries())this.connect(a,c);this.connectQueue.clear(),this.markDOMDirty(),$e(this.computeRenderRangeAndEmit)}}instanceChanged(r,l){this.instancesChanged.add(r),l&&this.markDOMDirty(),$e(this.computeRenderRangeAndEmit)}requestHeightReconcile(r){this.reconcileQueue.add(r),$e(this.computeRenderRangeAndEmit)}getWindowSpecs(){return this.windowSpecs.top===0&&this.windowSpecs.bottom===0&&(this.windowSpecs=br({scrollTop:this.getScrollTop(),height:this.getHeight(),scrollHeight:this.getScrollHeight(),overscrollSize:this.config.overscrollSize})),this.windowSpecs}getRoot(){return this.root}isInstanceVisible(r,l){const a=this.getScrollTop(),c=this.getHeight(),p=this.config.intersectionObserverMargin,b=a-p,S=a+c+p;return!(r<b-l||r>S)}setupWindow(){if(this.root==null||!(this.root instanceof Document))throw new Error("Virtualizer.setupWindow: Invalid setup method");window.addEventListener("scroll",this.handleWindowScroll,{passive:!0}),window.addEventListener("resize",this.handleWindowResize,{passive:!0}),this.resizeObserver?.observe(this.root.documentElement)}setupElement(r){if(this.root==null||this.root instanceof Document)throw new Error("Virtualizer.setupElement: Invalid setup method");this.root.addEventListener("scroll",this.handleElementScroll,{passive:!0}),this.resizeObserver?.observe(this.root),r??=this.root.firstElementChild??void 0,r instanceof HTMLElement&&(this.contentContainer=r,this.resizeObserver?.observe(r))}cleanUp(){go(this.computeRenderRangeAndEmit),this.resizeObserver?.disconnect(),this.resizeObserver=void 0,this.intersectionObserver?.disconnect(),this.intersectionObserver=void 0,this.root?.removeEventListener("scroll",this.handleElementScroll),window.removeEventListener("scroll",this.handleWindowScroll),window.removeEventListener("resize",this.handleWindowResize),this.root=void 0,this.contentContainer=void 0,this.observers.clear(),this.visibleInstances.clear(),this.instancesChanged.clear(),this.reconcileQueue.clear(),this.connectQueue.clear(),this.visibleInstancesDirty=!1,this.windowSpecs={top:0,bottom:0},this.scrollTop=0,this.height=0,this.scrollHeight=0,this.scrollDirty=!0,this.heightDirty=!0,this.scrollHeightDirty=!0}getOffsetInScrollContainer(r){return this.getScrollTop()+Kt(r,this.getScrollContainerElement())}connect(r,l){if(this.observers.has(r))throw new Error("Virtualizer.connect: instance is already connected...");return this.intersectionObserver==null?this.connectQueue.set(r,l):(this.intersectionObserver.observe(r),this.observers.set(r,l),this.instancesChanged.add(l),this.markDOMDirty(),$e(this.computeRenderRangeAndEmit)),()=>this.disconnect(r)}disconnect(r){const l=this.observers.get(r);this.connectQueue.delete(r),l!=null&&(this.intersectionObserver?.unobserve(r),this.observers.delete(r),this.instancesChanged.delete(l),this.reconcileQueue.delete(l),this.visibleInstances.delete(r)&&(this.visibleInstancesDirty=!0),this.markDOMDirty(),$e(this.computeRenderRangeAndEmit))}scrollFix(r){if(r==null)return;const l=this.getScrollContainerElement(),{lineIndex:a,lineOffset:c,fileElement:p,fileOffset:b,fileTypeOffset:S}=r;if(a!=null&&c!=null){const F=p.shadowRoot?.querySelector(`[data-line][data-line-index="${a}"]`);if(F instanceof HTMLElement){const G=Kt(F,l);if(G!==c){const h=G-c;this.applyScrollFix(h)}return}}const A=Kt(p,l);if(S==="top")A!==b&&this.applyScrollFix(A-b);else{const F=A+p.getBoundingClientRect().height;F!==b&&this.applyScrollFix(F-b)}}applyScrollFix(r){this.root==null||this.root instanceof Document?window.scrollTo({top:window.scrollY+r,behavior:"instant"}):this.root.scrollTo({top:this.root.scrollTop+r,behavior:"instant"}),this.markDOMDirty()}getScrollAnchor(r){const l=this.getScrollContainerElement();let a;for(const[c]of this.visibleInstances.entries()){const p=Kt(c,l),b=p+c.offsetHeight;let S,A;b<=0?(S=b,A="bottom"):(S=p,A="top");let F,G;if(b>0&&p<r)for(const oe of c.shadowRoot?.querySelectorAll("[data-line][data-line-index]")??[]){if(!(oe instanceof HTMLElement))continue;const Te=oe.dataset.lineIndex;if(Te==null)continue;const ue=Kt(oe,l);if(!(ue<0)){F=Te,G=ue;break}}if(a?.lineOffset!=null&&G==null)continue;let h=!1;(a==null||G!=null&&(a.lineOffset==null||G<a.lineOffset)||G==null&&a.lineOffset==null&&(S>=0&&(a.fileOffset<0||S<a.fileOffset)||S<0&&a.fileOffset<0&&S>a.fileOffset))&&(h=!0),h&&(a={fileElement:c,fileTypeOffset:A,fileOffset:S,lineIndex:F,lineOffset:G})}return a}getScrollTop(){if(!this.scrollDirty)return this.scrollTop;this.scrollDirty=!1;let r=this.root==null?0:this.root instanceof Document?window.scrollY:this.root.scrollTop;return r=this.clampScrollTop(r),this.scrollTop=r,r}scrollTo({top:r,behavior:l="auto"}){const{root:a}=this;if(a==null)return;const c=this.clampScrollTop(r);a instanceof Document?window.scrollTo({top:c,behavior:l}):a.scrollTo({top:c,behavior:l}),this.scrollDirty=!0,$e(this.computeRenderRangeAndEmit)}clampScrollTop(r){return Math.max(0,Math.min(r,this.getScrollHeight()-this.getHeight()))}getScrollHeight(){return this.scrollHeightDirty?(this.scrollHeightDirty=!1,this.scrollHeight=this.root==null?0:this.root instanceof Document?this.root.documentElement.scrollHeight:this.root.scrollHeight,this.scrollHeight):this.scrollHeight}getHeight(){return this.heightDirty?(this.heightDirty=!1,this.height=this.root==null?0:this.root instanceof Document?globalThis.innerHeight:this.root.getBoundingClientRect().height,this.height):this.height}markDOMDirty(){this.scrollDirty=!0,this.scrollHeightDirty=!0,this.heightDirty=!0}getScrollContainerElement(){return this.root==null||this.root instanceof Document?void 0:this.root}},q(Pe,"__STOP",!1),q(Pe,"__lastScrollPosition",0),Pe);function Kt(f,r){const l=f.getBoundingClientRect(),a=r?.getBoundingClientRect().top??0;return l.top-a}var Eo=T('<div class="absolute inset-0 flex items-center justify-center rounded-lg bg-background/60 backdrop-blur-[2px] transition-opacity duration-spring-moderate ease-spring-moderate motion-reduce:transition-none z-10 pointer-events-none"><div class="flex items-center gap-2 rounded-lg border border-border bg-card px-3 py-2 text-xs font-medium text-subtle shadow-lg"><!> </div></div>'),Oo=T("<!> <!>",1),No=T('<div class="flex h-24 items-center justify-start text-left text-subtle"> </div>'),To=T('<div role="region"><!></div>');function Lr(f,r){if(new.target)return dn({component:Lr,...f});gn(r,!0);const l=()=>je(ve,"$sideBySide",a),[a,c]=On(),p=Nn()?.workspaceId??void 0;let b=x(r,"change",7),S=x(r,"foldUnchanged",7,!0),A=x(r,"allowHeadReads",7,!0),F=x(r,"canReadHeadFiles",7),G=x(r,"lineWrapping",7,!1),h=x(r,"scrollToLine",7),oe=x(r,"isAggregate",7,!1),Te=x(r,"showScrollHint",7,!1),ue=x(r,"onStageHunk",7),Q=x(r,"onUnstageHunk",7),at=x(r,"onOpenCommit",7),pt=x(r,"virtualizer",7),vt=x(r,"gitRootId",7,void 0),_t=x(r,"gitRootPath",7,void 0);const ve=kr();let Re=J(!1),Se=J(!1),Fe=J(!1),Ue=J(0),qe=J(void 0);const $=80;function ie(){m(Se,!0)}function De(){m(Se,!1),m(Fe,!1),m(Ue,0)}function Le(v){!e(Se)||e(Re)||(m(Ue,e(Ue)+Math.abs(v.deltaY)),e(Ue)>=$&&!e(Fe)&&m(Fe,!0))}function jt(){m(Re,!0),m(Fe,!1),m(Ue,0)}function qt(v){e(qe)&&!e(qe).contains(v.relatedTarget)&&m(Re,!1)}Be(()=>{(e(Re)||!e(Se))&&(m(Fe,!1),m(Ue,0))});let Lt=u(()=>{const{toolCallId:v,filePath:_e,additions:Qe,deletions:St,oldContent:re,newContent:Xe}=b(),rt="staged"in b()&&b().staged===!0,Ke="category"in b()?b().category:void 0,At="commitHash"in b()?b().commitHash:void 0,zt="gitlink"in b()?b().gitlink:void 0,Mt="isFullFileContent"in b()?b().isFullFileContent:!1;let yt;return Ke==="committed"?yt=an.Committed:rt?yt=an.Staged:yt=an.Unstaged,{id:v,file:_e,relativePath:_e,stage:yt,commitHash:At,gitlink:zt,stats:{additions:Qe,deletions:St},attribution:{timestamp:0},content:re!==void 0||Xe!==void 0?{oldContent:re??"",newContent:Xe??"",isFullFileContent:Mt}:void 0}});const D=u(()=>b().isFullFileContent?1:("chunks"in b()?b().chunks?.[0]?.newStart:void 0)??b().startLineNumber??1);var Ht={get change(){return b()},set change(v){b(v),C()},get foldUnchanged(){return S()},set foldUnchanged(v=!0){S(v),C()},get allowHeadReads(){return A()},set allowHeadReads(v=!0){A(v),C()},get canReadHeadFiles(){return F()},set canReadHeadFiles(v){F(v),C()},get lineWrapping(){return G()},set lineWrapping(v=!1){G(v),C()},get scrollToLine(){return h()},set scrollToLine(v){h(v),C()},get isAggregate(){return oe()},set isAggregate(v=!1){oe(v),C()},get showScrollHint(){return Te()},set showScrollHint(v=!1){Te(v),C()},get onStageHunk(){return ue()},set onStageHunk(v){ue(v),C()},get onUnstageHunk(){return Q()},set onUnstageHunk(v){Q(v),C()},get onOpenCommit(){return at()},set onOpenCommit(v){at(v),C()},get virtualizer(){return pt()},set virtualizer(v){pt(v),C()},get gitRootId(){return vt()},set gitRootId(v=void 0){vt(v),C()},get gitRootPath(){return _t()},set gitRootPath(v=void 0){_t(v),C()},$set:un,$on:(v,_e)=>hn(r,v,_e)},He=To();let wt;var It=N(He);{var Ge=v=>{var _e=Oo(),Qe=ne(_e);{let Xe=u(()=>l()?"split":"unified");Pr(Qe,{get change(){return e(Lt)},get workspaceId(){return p},get viewMode(){return e(Xe)},get foldUnchanged(){return S()},get lineWrapping(){return G()},get onStageHunk(){return ue()},get onUnstageHunk(){return Q()},useProvidedContent:!0,get allowHeadReads(){return A()},get canReadHeadFiles(){return F()},get lineOffset(){return e(D)},get virtualizer(){return pt()},get gitRootId(){return vt()},get gitRootPath(){return _t()}})}var St=y(Qe,2);{var re=Xe=>{var rt=Eo(),Ke=N(rt),At=N(Ke);Ne(At,{get icon(){return ro},class:"w-3 h-3"});var zt=y(At);H(Ke),H(rt),z(Mt=>K(zt,` ${Mt??""}`),[()=>P.chat_inlineDiffItem_clickToScroll_label()]),cn(1,rt,()=>Ws,()=>({tier:"fast",y:0,scale:1})),cn(2,rt,()=>Bs,()=>({tier:"fast"})),w(Xe,rt)};M(St,Xe=>{Te()&&e(Fe)&&Xe(re)})}w(v,_e)},bt=v=>{var _e=No(),Qe=de(_e,!0);z(St=>K(Qe,St),[()=>P.chat_inlineDiffItem_noWorkspace_label()]),w(v,_e)};M(It,v=>{p?v(Ge):v(bt,-1)})}H(He),on(He,v=>m(qe,v),()=>e(qe)),z(v=>{wt=En(He,1,"inline-diff-container relative",null,wt,{focused:e(Re)}),Ve(He,"aria-label",v)},[()=>P.chat_inlineDiffItem_viewer_ariaLabel()]),sn("mouseenter",He,ie),sn("mouseleave",He,De),sn("wheel",He,Le),ln("focusin",He,jt),ln("focusout",He,qt),w(f,He);var mn=fn(Ht);return c(),mn}Cr(["focusin","focusout"]);function Sr(f){return[f.stage,f.type,f.oldLineNumber??"",f.newLineNumber??"",f.content].join("\0")}function Do(f){let r=f.oldStart,l=f.newStart;return f.lines.map(a=>{const c={...a,oldLineNumber:a.oldLineNumber??a.oldNumber,newLineNumber:a.newLineNumber??a.newNumber};return c.oldLineNumber===void 0&&c.newLineNumber===void 0?a.type==="Context"?(c.oldLineNumber=r++,c.newLineNumber=l++):a.type==="Deletion"?c.oldLineNumber=r++:a.type==="Addition"&&(c.newLineNumber=l++):a.type==="Context"?(r=(c.oldLineNumber??r)+1,l=(c.newLineNumber??l)+1):a.type==="Deletion"?r=(c.oldLineNumber??r)+1:a.type==="Addition"&&(l=(c.newLineNumber??l)+1),c})}function zo(f,r){const l=f?f.split(`
1
+ var $s=Object.defineProperty;var Fs=(f,r,l)=>r in f?$s(f,r,{enumerable:!0,configurable:!0,writable:!0,value:l}):f[r]=l;var q=(f,r,l)=>Fs(f,typeof r!="symbol"?r+"":r,l);import{t as dn,bo as x,bm as P,bw as un,bq as On,b as hn,bs as je}from"./CHWIPzMj.js";import{ai as Cr,bs as gn,ca as Be,aD as e,bH as m,a5 as N,bA as H,b_ as z,aw as sn,aj as ln,W as w,bn as fn,bV as J,aA as C,ay as ne,bS as y,bl as de,bO as K,aB as T,c9 as u,a7 as nt,br as tt,bj as sr,c5 as gt,c0 as Ln,a as Us,be as Tt,b$ as ft,bf as or}from"./3SdAC2_C.js";import{i as M}from"./DDtBtnNz.js";import{g as Pt,i as Hn,I as ir,e as ar}from"./Bqdjarag.js";import{n as cn,l as Ws,c as Bs}from"./D_gp0b_i.js";import{f as En,s as Ve,g as lr}from"./B09v4S72.js";import{b as on}from"./Dn334wJv.js";import{Jt as Me,eS as Vs,eJ as Ks,eK as js,o_ as qs,nO as Vt,nS as cr,nR as In,eM as Gs,vF as Qs,vG as Xs,vI as Js,Hx as Ys,Jy as Zs,rX as eo,eR as to}from"./DJM-jC4D.js";import{c as no}from"./M46vYfPG.js";import{F as Ne,a1 as ro,a8 as An,aw as dr,ax as ur,bS as so,aP as oo,cd as hr,bZ as gr,cq as fr}from"./Bm1YRNX5.js";import{dG as io,br as ao,X as lo,aO as mr,p as co}from"./CB6JpnWC.js";import{L as pr}from"./C-6kZjgn.js";import{C as an}from"./DypB-Dwi.js";import{b8 as kr,bN as uo,bT as ho}from"./C99ttMY5.js";import{q as $e,d as go,g as fo}from"./BQiJMsZZ.js";import"./Bx3lRAzK.js";import"./QgUSWdkO.js";/* empty css */import{T as Pr}from"./CYv_coXk.js";import{g as Nn}from"./BHl8a9sq.js";import{A as mo}from"./Cy7afLsK.js";import{f as ke}from"./DSQXi-HI.js";import{C as po}from"./DInAnkwK.js";import{C as vo}from"./DDfMifm6.js";import{s as vr}from"./BmMxtG34.js";import{S as Dt}from"./BGpvxEza.js";import{l as Rt}from"./ZUA6bo0t.js";import{G as _r}from"./Cl7-Lh5E.js";import{P as _o}from"./BT1eR3Bj.js";import{g as wo}from"./BI0xIaK5.js";import{a8 as bo,Y as So}from"./CeGIZnmi.js";import{ap as yo}from"./g4xg1V0H.js";import{L as wr}from"./CSCM9u80.js";import{ae as xo,ad as Co,af as ko}from"./CsXyRQ8j.js";function br({scrollTop:f,scrollHeight:r,height:l,fitPerfectly:a=!1,fitPerfectlyOverscroll:c=0,overscrollSize:p}){const b=l+p*2,S=a?l+c*2:b;if(r=Math.max(r,S),b>=r||a){const G=Math.max(f-c,0),h=Math.min(f+S,r);return{top:G,bottom:Math.max(h,G)}}let A=f+l/2-b/2,F=A+b;return A<0&&(A=0),F>r&&(F=r),A=Math.floor(Math.max(A,0)),{top:A,bottom:Math.ceil(Math.max(Math.min(F,r),A))}}function Po(f,r){return f==null||r==null?f===r:f.top===r.top&&f.bottom===r.bottom}const Rr=1e3,Ro=Rr*4,Lo=[0,1e-6,.99999,1],Ho={overscrollSize:Rr,intersectionObserverMargin:Ro,resizeDebugging:!1};let rn=0,Io=-1;var Pe,Ao=(Pe=class{constructor(r){q(this,"__id",`virtualizer-${++Io}`);q(this,"config");q(this,"type","simple");q(this,"intersectionObserver");q(this,"scrollTop",0);q(this,"height",0);q(this,"scrollHeight",0);q(this,"windowSpecs",{top:0,bottom:0});q(this,"root");q(this,"contentContainer");q(this,"resizeObserver");q(this,"observers",new Map);q(this,"visibleInstances",new Map);q(this,"visibleInstancesDirty",!1);q(this,"instancesChanged",new Set);q(this,"reconcileQueue",new Set);q(this,"scrollDirty",!0);q(this,"heightDirty",!0);q(this,"scrollHeightDirty",!0);q(this,"renderedObservers",0);q(this,"connectQueue",new Map);q(this,"handleContainerResize",r=>{if(this.root==null)return;let l=!1;for(const a of r){const c=a.borderBoxSize[0].blockSize;this.root instanceof Document?c!==this.scrollHeight&&(this.scrollHeightDirty=!0,l=!0,this.config.resizeDebugging&&(console.log("Virtualizer: content size change",this.__id,{sizeChange:c-rn,newSize:c}),rn=c)):a.target===this.root?c!==this.height&&(this.heightDirty=!0,l=!0):a.target===this.contentContainer&&(this.scrollHeightDirty=!0,l=!0,this.config.resizeDebugging&&(console.log("Virtualizer: scroller size change",this.__id,{sizeChange:c-rn,newSize:c}),rn=c))}l&&$e(this.computeRenderRangeAndEmit)});q(this,"handleWindowResize",()=>{Pe.__STOP||window.innerHeight===this.height||(this.heightDirty=!0,$e(this.computeRenderRangeAndEmit))});q(this,"handleWindowScroll",()=>{Pe.__STOP||this.root==null||!(this.root instanceof Document)||(this.scrollDirty=!0,$e(this.computeRenderRangeAndEmit))});q(this,"handleElementScroll",()=>{Pe.__STOP||this.root==null||this.root instanceof Document||(this.scrollDirty=!0,$e(this.computeRenderRangeAndEmit))});q(this,"computeRenderRangeAndEmit",()=>{if(Pe.__STOP)return;const r=this.heightDirty||this.scrollHeightDirty;let l=this.instancesChanged.size>0;if(this.instancesChanged.size===0){const p=br({scrollTop:this.getScrollTop(),height:this.getHeight(),scrollHeight:this.getScrollHeight(),overscrollSize:this.config.overscrollSize});if(!r&&Po(this.windowSpecs,p)&&this.renderedObservers===this.observers.size&&!this.visibleInstancesDirty&&this.reconcileQueue.size===0)return;this.windowSpecs=p}this.visibleInstancesDirty=!1,this.renderedObservers=this.observers.size;const a=this.getScrollAnchor(this.height),c=new Set;for(const p of r?this.observers.values():this.visibleInstances.values())p.onRender(r)&&c.add(p);for(const p of this.instancesChanged)c.has(p)||p.onRender(r)&&c.add(p);this.scrollFix(a);for(const p of c)this.reconcileQueue.delete(p),p.reconcileHeights();for(const p of this.reconcileQueue)p.reconcileHeights()&&(l=!0);this.reconcileQueue.clear(),l||=this.instancesChanged.size>0,l&&this.markDOMDirty(),(l||r)&&$e(this.computeRenderRangeAndEmit),c.clear(),this.instancesChanged.clear()});q(this,"handleIntersectionChange",r=>{this.scrollDirty=!0;for(const{target:l,isIntersecting:a}of r){if(!(l instanceof HTMLElement))throw new Error("Virtualizer.handleIntersectionChange: target not an HTMLElement");const c=this.observers.get(l);c!=null&&(a&&!this.visibleInstances.has(l)?(c.setVisibility(!0),this.visibleInstances.set(l,c),this.visibleInstancesDirty=!0):!a&&this.visibleInstances.has(l)&&(c.setVisibility(!1),this.visibleInstances.delete(l),this.visibleInstancesDirty=!0))}this.visibleInstancesDirty&&$e(this.computeRenderRangeAndEmit)});this.config={...Ho,...r}}setup(r,l){if(this.root==null){this.root=r,this.resizeObserver=new ResizeObserver(this.handleContainerResize),this.intersectionObserver=new IntersectionObserver(this.handleIntersectionChange,{root:this.root,threshold:Lo,rootMargin:`${this.config.intersectionObserverMargin}px 0px ${this.config.intersectionObserverMargin}px 0px`}),r instanceof Document?this.setupWindow():this.setupElement(l),window.__INSTANCE=this,window.__TOGGLE=()=>{Pe.__STOP?(Pe.__STOP=!1,(this.getScrollContainerElement()??window).scrollTo({top:Pe.__lastScrollPosition}),$e(this.computeRenderRangeAndEmit)):(Pe.__lastScrollPosition=this.getScrollTop(),Pe.__STOP=!0)};for(const[a,c]of this.connectQueue.entries())this.connect(a,c);this.connectQueue.clear(),this.markDOMDirty(),$e(this.computeRenderRangeAndEmit)}}instanceChanged(r,l){this.instancesChanged.add(r),l&&this.markDOMDirty(),$e(this.computeRenderRangeAndEmit)}requestHeightReconcile(r){this.reconcileQueue.add(r),$e(this.computeRenderRangeAndEmit)}getWindowSpecs(){return this.windowSpecs.top===0&&this.windowSpecs.bottom===0&&(this.windowSpecs=br({scrollTop:this.getScrollTop(),height:this.getHeight(),scrollHeight:this.getScrollHeight(),overscrollSize:this.config.overscrollSize})),this.windowSpecs}getRoot(){return this.root}isInstanceVisible(r,l){const a=this.getScrollTop(),c=this.getHeight(),p=this.config.intersectionObserverMargin,b=a-p,S=a+c+p;return!(r<b-l||r>S)}setupWindow(){if(this.root==null||!(this.root instanceof Document))throw new Error("Virtualizer.setupWindow: Invalid setup method");window.addEventListener("scroll",this.handleWindowScroll,{passive:!0}),window.addEventListener("resize",this.handleWindowResize,{passive:!0}),this.resizeObserver?.observe(this.root.documentElement)}setupElement(r){if(this.root==null||this.root instanceof Document)throw new Error("Virtualizer.setupElement: Invalid setup method");this.root.addEventListener("scroll",this.handleElementScroll,{passive:!0}),this.resizeObserver?.observe(this.root),r??=this.root.firstElementChild??void 0,r instanceof HTMLElement&&(this.contentContainer=r,this.resizeObserver?.observe(r))}cleanUp(){go(this.computeRenderRangeAndEmit),this.resizeObserver?.disconnect(),this.resizeObserver=void 0,this.intersectionObserver?.disconnect(),this.intersectionObserver=void 0,this.root?.removeEventListener("scroll",this.handleElementScroll),window.removeEventListener("scroll",this.handleWindowScroll),window.removeEventListener("resize",this.handleWindowResize),this.root=void 0,this.contentContainer=void 0,this.observers.clear(),this.visibleInstances.clear(),this.instancesChanged.clear(),this.reconcileQueue.clear(),this.connectQueue.clear(),this.visibleInstancesDirty=!1,this.windowSpecs={top:0,bottom:0},this.scrollTop=0,this.height=0,this.scrollHeight=0,this.scrollDirty=!0,this.heightDirty=!0,this.scrollHeightDirty=!0}getOffsetInScrollContainer(r){return this.getScrollTop()+Kt(r,this.getScrollContainerElement())}connect(r,l){if(this.observers.has(r))throw new Error("Virtualizer.connect: instance is already connected...");return this.intersectionObserver==null?this.connectQueue.set(r,l):(this.intersectionObserver.observe(r),this.observers.set(r,l),this.instancesChanged.add(l),this.markDOMDirty(),$e(this.computeRenderRangeAndEmit)),()=>this.disconnect(r)}disconnect(r){const l=this.observers.get(r);this.connectQueue.delete(r),l!=null&&(this.intersectionObserver?.unobserve(r),this.observers.delete(r),this.instancesChanged.delete(l),this.reconcileQueue.delete(l),this.visibleInstances.delete(r)&&(this.visibleInstancesDirty=!0),this.markDOMDirty(),$e(this.computeRenderRangeAndEmit))}scrollFix(r){if(r==null)return;const l=this.getScrollContainerElement(),{lineIndex:a,lineOffset:c,fileElement:p,fileOffset:b,fileTypeOffset:S}=r;if(a!=null&&c!=null){const F=p.shadowRoot?.querySelector(`[data-line][data-line-index="${a}"]`);if(F instanceof HTMLElement){const G=Kt(F,l);if(G!==c){const h=G-c;this.applyScrollFix(h)}return}}const A=Kt(p,l);if(S==="top")A!==b&&this.applyScrollFix(A-b);else{const F=A+p.getBoundingClientRect().height;F!==b&&this.applyScrollFix(F-b)}}applyScrollFix(r){this.root==null||this.root instanceof Document?window.scrollTo({top:window.scrollY+r,behavior:"instant"}):this.root.scrollTo({top:this.root.scrollTop+r,behavior:"instant"}),this.markDOMDirty()}getScrollAnchor(r){const l=this.getScrollContainerElement();let a;for(const[c]of this.visibleInstances.entries()){const p=Kt(c,l),b=p+c.offsetHeight;let S,A;b<=0?(S=b,A="bottom"):(S=p,A="top");let F,G;if(b>0&&p<r)for(const oe of c.shadowRoot?.querySelectorAll("[data-line][data-line-index]")??[]){if(!(oe instanceof HTMLElement))continue;const Te=oe.dataset.lineIndex;if(Te==null)continue;const ue=Kt(oe,l);if(!(ue<0)){F=Te,G=ue;break}}if(a?.lineOffset!=null&&G==null)continue;let h=!1;(a==null||G!=null&&(a.lineOffset==null||G<a.lineOffset)||G==null&&a.lineOffset==null&&(S>=0&&(a.fileOffset<0||S<a.fileOffset)||S<0&&a.fileOffset<0&&S>a.fileOffset))&&(h=!0),h&&(a={fileElement:c,fileTypeOffset:A,fileOffset:S,lineIndex:F,lineOffset:G})}return a}getScrollTop(){if(!this.scrollDirty)return this.scrollTop;this.scrollDirty=!1;let r=this.root==null?0:this.root instanceof Document?window.scrollY:this.root.scrollTop;return r=this.clampScrollTop(r),this.scrollTop=r,r}scrollTo({top:r,behavior:l="auto"}){const{root:a}=this;if(a==null)return;const c=this.clampScrollTop(r);a instanceof Document?window.scrollTo({top:c,behavior:l}):a.scrollTo({top:c,behavior:l}),this.scrollDirty=!0,$e(this.computeRenderRangeAndEmit)}clampScrollTop(r){return Math.max(0,Math.min(r,this.getScrollHeight()-this.getHeight()))}getScrollHeight(){return this.scrollHeightDirty?(this.scrollHeightDirty=!1,this.scrollHeight=this.root==null?0:this.root instanceof Document?this.root.documentElement.scrollHeight:this.root.scrollHeight,this.scrollHeight):this.scrollHeight}getHeight(){return this.heightDirty?(this.heightDirty=!1,this.height=this.root==null?0:this.root instanceof Document?globalThis.innerHeight:this.root.getBoundingClientRect().height,this.height):this.height}markDOMDirty(){this.scrollDirty=!0,this.scrollHeightDirty=!0,this.heightDirty=!0}getScrollContainerElement(){return this.root==null||this.root instanceof Document?void 0:this.root}},q(Pe,"__STOP",!1),q(Pe,"__lastScrollPosition",0),Pe);function Kt(f,r){const l=f.getBoundingClientRect(),a=r?.getBoundingClientRect().top??0;return l.top-a}var Eo=T('<div class="absolute inset-0 flex items-center justify-center rounded-lg bg-background/60 backdrop-blur-[2px] transition-opacity duration-spring-moderate ease-spring-moderate motion-reduce:transition-none z-10 pointer-events-none"><div class="flex items-center gap-2 rounded-lg border border-border bg-card px-3 py-2 text-xs font-medium text-subtle shadow-lg"><!> </div></div>'),Oo=T("<!> <!>",1),No=T('<div class="flex h-24 items-center justify-start text-left text-subtle"> </div>'),To=T('<div role="region"><!></div>');function Lr(f,r){if(new.target)return dn({component:Lr,...f});gn(r,!0);const l=()=>je(ve,"$sideBySide",a),[a,c]=On(),p=Nn()?.workspaceId??void 0;let b=x(r,"change",7),S=x(r,"foldUnchanged",7,!0),A=x(r,"allowHeadReads",7,!0),F=x(r,"canReadHeadFiles",7),G=x(r,"lineWrapping",7,!1),h=x(r,"scrollToLine",7),oe=x(r,"isAggregate",7,!1),Te=x(r,"showScrollHint",7,!1),ue=x(r,"onStageHunk",7),Q=x(r,"onUnstageHunk",7),at=x(r,"onOpenCommit",7),pt=x(r,"virtualizer",7),vt=x(r,"gitRootId",7,void 0),_t=x(r,"gitRootPath",7,void 0);const ve=kr();let Re=J(!1),Se=J(!1),Fe=J(!1),Ue=J(0),qe=J(void 0);const $=80;function ie(){m(Se,!0)}function De(){m(Se,!1),m(Fe,!1),m(Ue,0)}function Le(v){!e(Se)||e(Re)||(m(Ue,e(Ue)+Math.abs(v.deltaY)),e(Ue)>=$&&!e(Fe)&&m(Fe,!0))}function jt(){m(Re,!0),m(Fe,!1),m(Ue,0)}function qt(v){e(qe)&&!e(qe).contains(v.relatedTarget)&&m(Re,!1)}Be(()=>{(e(Re)||!e(Se))&&(m(Fe,!1),m(Ue,0))});let Lt=u(()=>{const{toolCallId:v,filePath:_e,additions:Qe,deletions:St,oldContent:re,newContent:Xe}=b(),rt="staged"in b()&&b().staged===!0,Ke="category"in b()?b().category:void 0,At="commitHash"in b()?b().commitHash:void 0,zt="gitlink"in b()?b().gitlink:void 0,Mt="isFullFileContent"in b()?b().isFullFileContent:!1;let yt;return Ke==="committed"?yt=an.Committed:rt?yt=an.Staged:yt=an.Unstaged,{id:v,file:_e,relativePath:_e,stage:yt,commitHash:At,gitlink:zt,stats:{additions:Qe,deletions:St},attribution:{timestamp:0},content:re!==void 0||Xe!==void 0?{oldContent:re??"",newContent:Xe??"",isFullFileContent:Mt}:void 0}});const D=u(()=>b().isFullFileContent?1:("chunks"in b()?b().chunks?.[0]?.newStart:void 0)??b().startLineNumber??1);var Ht={get change(){return b()},set change(v){b(v),C()},get foldUnchanged(){return S()},set foldUnchanged(v=!0){S(v),C()},get allowHeadReads(){return A()},set allowHeadReads(v=!0){A(v),C()},get canReadHeadFiles(){return F()},set canReadHeadFiles(v){F(v),C()},get lineWrapping(){return G()},set lineWrapping(v=!1){G(v),C()},get scrollToLine(){return h()},set scrollToLine(v){h(v),C()},get isAggregate(){return oe()},set isAggregate(v=!1){oe(v),C()},get showScrollHint(){return Te()},set showScrollHint(v=!1){Te(v),C()},get onStageHunk(){return ue()},set onStageHunk(v){ue(v),C()},get onUnstageHunk(){return Q()},set onUnstageHunk(v){Q(v),C()},get onOpenCommit(){return at()},set onOpenCommit(v){at(v),C()},get virtualizer(){return pt()},set virtualizer(v){pt(v),C()},get gitRootId(){return vt()},set gitRootId(v=void 0){vt(v),C()},get gitRootPath(){return _t()},set gitRootPath(v=void 0){_t(v),C()},$set:un,$on:(v,_e)=>hn(r,v,_e)},He=To();let wt;var It=N(He);{var Ge=v=>{var _e=Oo(),Qe=ne(_e);{let Xe=u(()=>l()?"split":"unified");Pr(Qe,{get change(){return e(Lt)},get workspaceId(){return p},get viewMode(){return e(Xe)},get foldUnchanged(){return S()},get lineWrapping(){return G()},get onStageHunk(){return ue()},get onUnstageHunk(){return Q()},useProvidedContent:!0,get allowHeadReads(){return A()},get canReadHeadFiles(){return F()},get lineOffset(){return e(D)},get virtualizer(){return pt()},get gitRootId(){return vt()},get gitRootPath(){return _t()}})}var St=y(Qe,2);{var re=Xe=>{var rt=Eo(),Ke=N(rt),At=N(Ke);Ne(At,{get icon(){return ro},class:"w-3 h-3"});var zt=y(At);H(Ke),H(rt),z(Mt=>K(zt,` ${Mt??""}`),[()=>P.chat_inlineDiffItem_clickToScroll_label()]),cn(1,rt,()=>Ws,()=>({tier:"fast",y:0,scale:1})),cn(2,rt,()=>Bs,()=>({tier:"fast"})),w(Xe,rt)};M(St,Xe=>{Te()&&e(Fe)&&Xe(re)})}w(v,_e)},bt=v=>{var _e=No(),Qe=de(_e,!0);z(St=>K(Qe,St),[()=>P.chat_inlineDiffItem_noWorkspace_label()]),w(v,_e)};M(It,v=>{p?v(Ge):v(bt,-1)})}H(He),on(He,v=>m(qe,v),()=>e(qe)),z(v=>{wt=En(He,1,"inline-diff-container relative",null,wt,{focused:e(Re)}),Ve(He,"aria-label",v)},[()=>P.chat_inlineDiffItem_viewer_ariaLabel()]),sn("mouseenter",He,ie),sn("mouseleave",He,De),sn("wheel",He,Le),ln("focusin",He,jt),ln("focusout",He,qt),w(f,He);var mn=fn(Ht);return c(),mn}Cr(["focusin","focusout"]);function Sr(f){return[f.stage,f.type,f.oldLineNumber??"",f.newLineNumber??"",f.content].join("\0")}function Do(f){let r=f.oldStart,l=f.newStart;return f.lines.map(a=>{const c={...a,oldLineNumber:a.oldLineNumber??a.oldNumber,newLineNumber:a.newLineNumber??a.newNumber};return c.oldLineNumber===void 0&&c.newLineNumber===void 0?a.type==="Context"?(c.oldLineNumber=r++,c.newLineNumber=l++):a.type==="Deletion"?c.oldLineNumber=r++:a.type==="Addition"&&(c.newLineNumber=l++):a.type==="Context"?(r=(c.oldLineNumber??r)+1,l=(c.newLineNumber??l)+1):a.type==="Deletion"?r=(c.oldLineNumber??r)+1:a.type==="Addition"&&(l=(c.newLineNumber??l)+1),c})}function zo(f,r){const l=f?f.split(`
2
2
  `):[],a=r?r.split(`
3
3
  `):[];if(l.length===0&&a.length===0)return[];const c=[];for(const p of l)c.push({type:"Deletion",content:p});for(const p of a)c.push({type:"Addition",content:p});return[{oldStart:1,oldLines:l.length,newStart:1,newLines:a.length,lines:c}]}function Mo(f){if(!f||f.length===0)return[];const r=[];for(const a of f){let c=a.change.chunks||[];c.length===0&&(a.change.oldContent!=null||a.change.newContent!=null)&&(c=zo(a.change.oldContent??"",a.change.newContent??"")),c.forEach((p,b)=>{r.push({hunk:p,stage:a.category,part:a,hunkIndex:b})})}if(r.length===0)return[];r.sort((a,c)=>a.hunk.newStart-c.hunk.newStart);const l=[];for(const{hunk:a,stage:c,hunkIndex:p}of r){const S=Do(a).map(A=>({type:A.type,content:A.content,oldLineNumber:A.oldLineNumber,newLineNumber:A.newLineNumber,stage:c,hunkIndex:p}));l.push({headStart:a.oldStart,headLines:a.oldLines,wtStart:a.newStart,wtLines:a.newLines,lines:S,stages:new Set([c])})}return $o(l)}function $o(f){if(f.length<=1)return f;const r=[];let l=f[0];for(let a=1;a<f.length;a++){const c=f[a],p=l.wtStart+l.wtLines;c.wtStart<=p+3?l=Fo(l,c):(r.push(l),l=c)}return r.push(l),r}function Fo(f,r){const l=new Map,a=new Map,c=new Set;for(const h of f.lines)c.add(Sr(h)),h.newLineNumber!==void 0&&l.set(h.newLineNumber,h),h.oldLineNumber!==void 0&&h.type!=="Addition"&&a.set(h.oldLineNumber,h);const p=[...f.lines];for(const h of r.lines){const oe=Sr(h);if(!c.has(oe)){if(h.type==="Context"){const Te=h.newLineNumber!==void 0?l.get(h.newLineNumber):void 0,ue=h.oldLineNumber!==void 0?a.get(h.oldLineNumber):void 0;if(Te?.type==="Context"||ue?.type==="Context"){c.add(oe);continue}}p.push(h),c.add(oe),h.newLineNumber!==void 0&&l.set(h.newLineNumber,h),h.oldLineNumber!==void 0&&h.type!=="Addition"&&a.set(h.oldLineNumber,h)}}p.sort((h,oe)=>{const Te=h.newLineNumber??h.oldLineNumber??0,ue=oe.newLineNumber??oe.oldLineNumber??0;return Te-ue});const b=new Set([...f.stages,...r.stages]),S=Math.min(f.headStart,r.headStart),A=Math.min(f.wtStart,r.wtStart),F=Math.max(f.headStart+f.headLines,r.headStart+r.headLines),G=Math.max(f.wtStart+f.wtLines,r.wtStart+r.wtLines);return{headStart:S,headLines:F-S,wtStart:A,wtLines:G-A,lines:p,stages:b}}function Uo(f){const r=[],l=[];let a=f[0]?.headStart??1,c=f[0]?.wtStart??1;const p=(b,S,A)=>{let F=S;for(;F<A;)b.push(""),F++;return F};for(const b of f){a=p(r,a,b.headStart),c=p(l,c,b.wtStart);for(const S of b.lines)S.type==="Context"?(S.oldLineNumber!==void 0&&(a=p(r,a,S.oldLineNumber)),S.newLineNumber!==void 0&&(c=p(l,c,S.newLineNumber)),r.push(S.content),l.push(S.content),a++,c++):S.type==="Deletion"?(S.oldLineNumber!==void 0&&(a=p(r,a,S.oldLineNumber)),r.push(S.content),a++):S.type==="Addition"&&(S.newLineNumber!==void 0&&(c=p(l,c,S.newLineNumber)),l.push(S.content),c++)}return{oldContent:r.join(`
4
4
  `),newContent:l.join(`
@@ -1,4 +1,4 @@
1
- var Ul=Object.defineProperty;var jl=(r,t,a)=>t in r?Ul(r,t,{enumerable:!0,configurable:!0,writable:!0,value:a}):r[t]=a;var pa=(r,t,a)=>jl(r,typeof t!="symbol"?t+"":t,a);import{t as pt,bo as g,bw as vt,b as ht,bm as d,bq as Ea,bs as tr,br as Vl,bp as vn}from"./2CQlphfn.js";import{ai as Ga,bs as _t,ca as Xt,aD as e,bH as D,ay as fe,bS as A,a7 as St,W as c,a5 as V,bA as F,bn as bt,c9 as n,bV as ue,aA as m,b_ as $,aj as xr,aB as I,be as Cr,b$ as Pr,bO as Q,bf as rr,c0 as Ia,bl as oe,bj as ja,c6 as Gl,bo as nn,br as Zr,am as Da,ax as Ba,bk as as,aw as pn,bz as ns,cb as Fn,c5 as Mn,aC as Ir,cd as vo,bv as Kl}from"./3SdAC2_C.js";import{i as O}from"./ByjFf28U.js";import{g as kr,e as sa,p as ms,i as Ha,I as Zl,h as eo,X as pi,o as Ql}from"./Bf_h69U3.js";import{n as Kt,l as On,c as Ya,g as rn,s as ks,k as ss,S as Xl}from"./DsNGTbSH.js";import{s as J,f as Fe,g as hn,c as It,e as Qt,b as _n,p as Yl,S as Jl,C as ed}from"./DhZiRE53.js";import{b as ea}from"./Dn334wJv.js";import{f as st,ae as to,a_ as td}from"./BvR4li8f.js";import{J as rd,O as ad,Q as Is}from"./Bn7ZmTkF.js";import"./DkuxYFAh.js";import"./D1mB9_6q.js";import"./h37VgGKw.js";import{s as Ma,k as vi}from"./DTPgmjai.js";import{F as Bt,a4 as zs,bg as ka,cK as ps,au as hi,aZ as _i,aK as nd,c9 as sd,a6 as os,aN as od,cN as id,cM as ld,a3 as vs,aC as is,aw as hs,I as ho,aj as dd,bu as cd,aS as ud,aX as fd,bJ as gd,ao as md,bk as bi,cC as pd,aP as _o,c0 as Ss,aI as Hn,cW as vd,cb as hd,bn as _d,b as bd,cp as yd,ag as wd,ba as Ts,cr as wn,cF as xd,az as kd,c6 as Id,d3 as Sd}from"./B16ZhAkF.js";import{C as yi,A as Td,o as Cd}from"./BKSCrb1m.js";import{b as Cs,V as bo}from"./DUtR3SZU.js";import{A as wi,I as Md,R as Ad,q as Pd}from"./CSfG5Ybw.js";import{bZ as xi,aj as Rd,j as Kn,a4 as Ws,al as ls,E as Nd,au as Zn,aP as Ed,aS as yo}from"./DWx-rRFl.js";import{t as an,o as $d}from"./DAsc1V4f.js";import{cg as Qn,aO as qn,d1 as ki,d3 as Va,c5 as _s,q as Ld,cW as Ii,d0 as bs,c$ as Si,cZ as Ti,n as Ca,al as Od,am as qd,aJ as Dd,z as Bd,V as Fd,a3 as wo,D as Ci,e3 as zd,aF as Wd,ak as Hd,r as Ud,C as Ms,ag as jd,U as xn,e1 as Vd,ab as Gd,k as xo,u as Kd,Z as Zd,v as Qd,i as Xd,g as As,f as ko,a0 as Yd,$ as Jd,a9 as ec,x as Mi,y as Ai,l as Pi,j as tc,s as rc,a as ac,d4 as nc,ae as sc,e2 as oc,L as ic,F as lc,a2 as Io,bp as dc,av as cc}from"./TE5M669U.js";import{Jt as mt,o_ as uc,tP as Xn,nP as So,vI as Ri,vK as Ni,s0 as fc,yH as ds,u$ as Ei,nK as $i,bq as En,nX as gc,nY as mc,yI as pc,qy as vc,tj as hc,vB as Li,nJ as _c,mO as bc,m as yc,z9 as wc,z6 as xc,z8 as kc}from"./eqIwOdFV.js";import{a3 as Ic,y as Ps,a1 as Sc,O as Rs,W as Tc,$ as Cc,k as Mc,p as kn,P as un,q as Ac,G as Pc,v as Rc,t as Nc,M as Ns,K as Ec,z as $c,L as Lc,_ as An,U as Un,N as To,n as Co,E as Oc,c as Es,F as Mo,B as qc,w as Ao,J as Pn,Q as Dc,H as Bc,j as Fc,R as zc,T as Wc,A as Hc,g as Uc,b as jc,D as Vc,f as Gc,e as Kc,a as Zc,C as Qc,i as Xc,d as Hs,V as Oi,a4 as Yc,u as Jc,l as eu}from"./B1Weu8fb.js";import{i as tu,e as ru}from"./CH6hoQCh.js";import{g as $s}from"./B5aYN90J.js";import{M as In,C as Rn}from"./Cha0m9_p.js";import{C as Po}from"./Dv-DK4ZQ.js";import"./1RAMMSz2.js";import{P as au}from"./BMqjLC9C.js";import"./DzQEubr_.js";import{c as qi}from"./ChTqQfQN.js";import{S as nu}from"./D95TUop3.js";import{D as Ro,M as su}from"./Di1597mK.js";import{b as ou,s as en,c as cs}from"./BRyCucnb.js";import{O as Yn,y as Ls,E as Os,B as qs,N as iu,m as lu,l as du,k as cu,d as Dn,C as No,f as uu,e as fu,g as gu}from"./83xTN5fk.js";import{a as Di,s as Eo}from"./BsieX9dN.js";import{f as mu}from"./BdWqymET.js";import{c as na}from"./6QXvr4x0.js";import{a as pu,k as Bi,h as ro,q as Fi,l as wr}from"./Be253aOc.js";import{P as vu}from"./DNxs15P5.js";import{r as Ds,q as Bs,B as $o,i as hu}from"./D9x2HEXw.js";import{R as zi,C as ys,m as _u,h as bu,g as yu,i as Lo,P as wu}from"./jRZT2QjD.js";import"./Gw1t2Srm.js";import{c as xu,s as ku}from"./CYF61-VE.js";import{h as gn}from"./a3l5znCa.js";import{b as Iu,a as Wi}from"./BxsHp3SH.js";import{P as Hi}from"./BIx2KRjJ.js";import{B as Su}from"./DYg3sgSl.js";import{o as Ui,r as Tu,e as Cu}from"./u_aTJYPF.js";import{o as ji}from"./CqB0bCAG.js";import{A as Jn,b as Vi}from"./C62iVnTg.js";import{g as ao}from"./RKhqePYS.js";import{a as Mu,M as Au}from"./BAduOJD2.js";import{a as Gi}from"./D4SYJpS6.js";import{E as Pu,n as Ru}from"./uh7Y9z2F.js";import{t as Tr}from"./C-BsEdGZ.js";import{c as Sn}from"./CON-zxWG.js";import{A as Nu}from"./CpRRerrb.js";import{f as Eu,d as $u}from"./Bjpdj-Rz.js";import{ac as Lu,N as Ou,Y as qu,K as Oo,X as Du,v as Bu,$ as Ki,_ as Zi}from"./C_AcfC1L.js";import{a as Fu}from"./CC7to1B5.js";import{k as zu}from"./DzCaG8dx.js";import{S as Wu}from"./N88c9xuK.js";import{u as Hu,a as Uu,c as qo,S as ju}from"./D9tVylVS.js";import{T as us}from"./CPZGjCPW.js";import"./ChB7enBh.js";import{g as Vu,a as Gu}from"./DjBfsgFx.js";import{b as Qi}from"./BFxBQddb.js";import{b as Do}from"./goTpbPhD.js";import{ah as Ua,n as Ku}from"./BhaVZ25C.js";import{c as Zu}from"./BgXHwBod.js";import{r as Bo}from"./BHSnSmbO.js";function Qu(r){if(!r||typeof r!="object")return null;const t=r;if(t.type!=="script_monitor_wake"||t.source!=="system")return null;const{scriptName:a,scriptId:s,runId:o,monitorId:i,workspaceId:l,reason:u}=t;if(typeof a!="string"||typeof s!="string"||!s||typeof o!="string"||!o||typeof i!="string"||!i||typeof l!="string"||!l||u!=="finished"&&u!=="ttl-expired"&&u!=="output-match"&&u!=="line-count")return null;const h=t.trigger;return{scriptName:a,scriptId:s,runId:o,monitorId:i,workspaceId:l,reason:u,...u==="output-match"&&typeof h?.matchedLine=="string"?{matchedLine:h.matchedLine}:{}}}function Xu(r){return r?.type==="script_monitor_wake"&&!("remoteAgentId"in r)}function Yu(r,t,a,s=!1){if(!r||!t)return{edit:!1,remove:!1,sendNow:!1};const o=r.messageMetadata?.fromPrincipalId??r.author?.principalId,i=Lu(r)&&r.author?.principalId!==null&&o===t;return{edit:i,remove:i||t===a||s,sendNow:(i||s)&&!Xi(r)}}function Tn(r,t){if(t)return r.find(a=>a.editing&&a.editingMessageId?a.editingMessageId===t:a.id===t)}function Xi(r){return Xu(r.messageMetadata)&&typeof r.messageMetadata?.monitorId=="string"}function Fo(r,t=Date.now()){const a=r.messageMetadata,s=a?.fromPrincipalId,o=a&&Object.hasOwn(a,"humanAuthor")&&!(typeof s=="string"&&s.length>0),i=r.holdKind!==void 0&&Date.parse(r.holdUntil??"")>t;return!r.editing&&!i&&!o&&!Xi(r)}const Tb="pl-3.5! pr-2!";var Ju=I('<span class="tile-remove-slot svelte-d8pwpf"><!></span>'),zo=I('<span class="attachment-status svelte-d8pwpf"> </span>'),ef=I('<div class="file-image tile svelte-d8pwpf" data-kind="file"><!> <!> <div class="tile-actions svelte-d8pwpf"><!> <!></div></div>'),tf=I("<!><span> </span>",1),rf=I('<img alt="" draggable="false"/>'),af=I('<span class="summary svelte-d8pwpf" data-clip-summary=""> </span>'),nf=I('<span class="clip svelte-d8pwpf"><span class="record-dot svelte-d8pwpf" aria-hidden="true"></span><span class="duration svelte-d8pwpf"> </span><!></span>'),sf=I('<div class="tile svelte-d8pwpf"><!> <!> <div class="tile-actions svelte-d8pwpf"><!> <!></div></div>'),of=I('<div class="attachment-row svelte-d8pwpf" role="group" data-dock-media-attachments=""></div>'),lf=I("<!> <!> <!>",1),df=I('<img draggable="false" class="svelte-d8pwpf"/>'),cf=I('<video controls="" playsinline="" class="svelte-d8pwpf"></video>',2),uf=I('<div class="media-viewer svelte-d8pwpf"><!></div>'),ff=I("<!> <!>",1);function gf(r,t){if(new.target)return pt({component:gf,...r});_t(t,!0);const a=(T,me=rr,le=rr)=>{var N=Ju(),ve=V(N);st(ve,{variant:"secondary",size:"icon-sm",class:"tile-action tile-remove",get disabled(){return i()},get"aria-label"(){return le()},tooltipContentClass:"dock-chrome-tooltip",get tooltip(){return le()},onclick:()=>z(me()),children:(Le,Ae)=>{Cs(Le,{glyph:"x"})},$$slots:{default:!0}}),F(N),c(T,N)};let s=g(t,"items",7),o=g(t,"labels",7),i=g(t,"disabled",7,!1),l=g(t,"onMarkUp",7),u=g(t,"onEdit",7),h=g(t,"onRemove",7),v=g(t,"onRetry",7),x=g(t,"onCopy",7),M=g(t,"onMenu",7);const B=T=>T.owner==="attachment"?2:{image:0,clip:1,file:2}[T.kind],U=n(()=>[...s()].sort((T,me)=>B(T)-B(me)));let w=ue(null),C=ue(!1),re=ue(null),G=null;const S=n(()=>s().find(T=>T.id===e(re)));Xt(()=>{(!e(S)||e(S).kind==="image"&&!j(e(S)))&&D(C,!1)});function j(T){return T.kind==="image"&&T.status!=="placing"&&T.status!=="failed"&&T.url.trim().length>0}function L(T){return T.kind==="image"?o().image(T.markCount):T.kind==="clip"?T.summary?`${o().clip(T.duration)} ${T.summary}`:o().clip(T.duration):T.name}function ne(T,me){if(!(i()||T.kind==="file"||T.kind==="image"&&!j(T)||T.kind==="clip"&&(!T.url||T.recording))){if((T.kind==="clip"||T.kind==="image")&&u()){u()(T.id);return}G=me,D(re,T.id,!0),D(C,!0)}}async function z(T){i()||(e(re)===T&&D(C,!1),h()(T),await Ia(),(!document.activeElement||document.activeElement===document.body)&&e(w)?.querySelector("button:not(:disabled)")?.focus())}function q(T){const me=s().find(le=>le.id===T);i()||!me||!j(me)||(D(C,!1),u()?u()(T):l()(T))}function ee(T,me){T.key!=="Delete"||i()||(T.preventDefault(),T.stopPropagation(),z(me))}function R(T){return T.status==="placing"||T.status==="failed"?!1:T.kind==="image"?!!T.file||j(T):T.kind==="clip"&&!T.recording&&!!T.url}function X(T,me){const le=rd()?T.metaKey:T.ctrlKey,N=T.key.toLowerCase();if(le&&!T.shiftKey&&!T.altKey&&(N==="c"||N==="x")){if(!x()||!R(me)||(T.preventDefault(),T.stopPropagation(),N==="x"&&i()))return;x()(me.id,N==="x");return}ee(T,me.id)}function te(T,me){!M()||!R(me)||(T.preventDefault(),M()(me.id))}var _e={get items(){return s()},set items(T){s(T),m()},get labels(){return o()},set labels(T){o(T),m()},get disabled(){return i()},set disabled(T=!1){i(T),m()},get onMarkUp(){return l()},set onMarkUp(T){l(T),m()},get onEdit(){return u()},set onEdit(T){u(T),m()},get onRemove(){return h()},set onRemove(T){h(T),m()},get onRetry(){return v()},set onRetry(T){v(T),m()},get onCopy(){return x()},set onCopy(T){x(T),m()},get onMenu(){return M()},set onMenu(T){M(T),m()},$set:vt,$on:(T,me)=>ht(t,T,me)},de=ff(),ge=fe(de);{var Pe=T=>{var me=of();kr(me,21,()=>e(U),le=>le.id,(le,N)=>{var ve=St(),Le=fe(ve);{var Ae=xe=>{var P=ef(),Y=V(P);{let W=n(()=>i()||e(N).status==="placing");wi(Y,{get id(){return e(N).id},get name(){return e(N).file.name},get type(){return e(N).file.imageMimeType},get imageData(){return e(N).file.imageData},get imageMimeType(){return e(N).file.imageMimeType},variant:"thumbnail",thumbnailClass:"size-full",class:"size-full",get disabled(){return e(W)},get placementStatus(){return e(N).status},get placementError(){return e(N).error}})}var ae=A(Y,2);{var we=W=>{var be=zo(),Re=oe(be,!0);$(()=>{J(be,"data-failed",e(N).status==="failed"||void 0),J(be,"role",e(N).status==="failed"?"alert":"status"),J(be,"title",e(N).error),Q(Re,e(N).status==="failed"?e(N).error??o().attachmentFailed:o().attachmentPending)}),c(W,be)};O(ae,W=>{e(N).status&&W(we)})}var _=A(ae,2),Se=V(_);{var Ce=W=>{st(W,{variant:"primary",size:"icon-sm",class:"tile-action",get disabled(){return i()},get"aria-label"(){return o().retry},tooltipContentClass:"dock-chrome-tooltip",get tooltip(){return o().retry},onclick:()=>v()?.(e(N).id),children:(be,Re)=>{Bt(be,{get icon(){return zs},size:16})},$$slots:{default:!0}})};O(Se,W=>{e(N).status==="failed"&&v()&&W(Ce)})}var E=A(Se,2);{let W=n(()=>d.chat_attachmentPreview_remove_ariaLabel({name:e(N).file.name}));a(E,()=>e(N).id,()=>e(W))}F(_),F(P),$(()=>J(P,"data-attachment-id",e(N).id)),xr("keydown",P,W=>X(W,e(N))),xr("contextmenu",P,W=>te(W,e(N))),Kt(1,P,()=>On,()=>({tier:"fast",y:3,scale:.98})),Kt(2,P,()=>Ya,()=>({tier:"fast"})),c(xe,P)},Ee=xe=>{const P=n(()=>e(N).kind==="image"&&!j(e(N))&&e(N).status!=="failed");var Y=sf(),ae=V(Y);{var we=ke=>{st(ke,{type:"button",variant:"ghost",wrapContent:!1,class:"open-tile file",get"aria-label"(){return e(N).name},get disabled(){return i()},onkeydown:$e=>ee($e,e(N).id),children:($e,Oe)=>{var Ue=tf(),se=fe(Ue);Bt(se,{get icon(){return ka},size:20});var Ge=A(se),yt=oe(Ge,!0);$(()=>Q(yt,e(N).name)),c($e,Ue)},$$slots:{default:!0}})},_=ke=>{{let $e=n(()=>L(e(N))),Oe=n(()=>i()||e(N).kind==="clip"&&(e(N).recording||!e(N).url));st(ke,{type:"button",variant:"ghost",wrapContent:!1,class:"open-tile",get"aria-label"(){return e($e)},get disabled(){return e(Oe)},onkeydown:Ue=>X(Ue,e(N)),onclick:Ue=>{Ue.currentTarget instanceof HTMLElement&&ne(e(N),Ue.currentTarget)},children:(Ue,se)=>{var Ge=St(),yt=fe(Ge);{var Ft=et=>{var Ke=rf();$(()=>J(Ke,"src",e(N).url)),c(et,Ke)},er=et=>{var Ke=nf(),$t=A(V(Ke)),Tt=oe($t,!0),ut=A($t);{var ze=K=>{var y=af(),pe=oe(y,!0);$(()=>Q(pe,e(N).summary)),c(K,y)};O(ut,K=>{e(N).summary&&K(ze)})}F(Ke),$(()=>Q(Tt,e(N).duration)),c(et,Ke)};O(yt,et=>{e(N).kind==="image"?et(Ft):et(er,-1)})}c(Ue,Ge)},$$slots:{default:!0}})}},Se=n(()=>e(N).kind!=="image"||j(e(N)));O(ae,ke=>{e(N).kind==="file"?ke(we):e(Se)&&ke(_,1)})}var Ce=A(ae,2);{var E=ke=>{var $e=zo(),Oe=oe($e,!0);$(()=>{J($e,"data-failed",e(N).status==="failed"||void 0),J($e,"role",e(N).status==="failed"?"alert":"status"),J($e,"title",e(N).error),Q(Oe,e(N).status==="failed"?e(N).error??o().attachmentFailed:o().attachmentPending)}),c(ke,$e)};O(Ce,ke=>{(e(N).status||e(P))&&ke(E)})}var W=A(Ce,2),be=V(W);{var Re=ke=>{st(ke,{variant:"primary",size:"icon-sm",class:"tile-action",get disabled(){return i()},get"aria-label"(){return o().retry},tooltipContentClass:"dock-chrome-tooltip",get tooltip(){return o().retry},onclick:()=>v()?.(e(N).id),children:($e,Oe)=>{Bt($e,{get icon(){return zs},size:16})},$$slots:{default:!0}})},Ve=ke=>{{let $e=n(()=>u()?o().edit:o().markUp),Oe=n(()=>u()?o().edit:o().markUp);st(ke,{variant:"primary",size:"icon-sm",class:"tile-action",get disabled(){return i()},get"aria-label"(){return e($e)},tooltipContentClass:"dock-chrome-tooltip",get tooltip(){return e(Oe)},onclick:()=>q(e(N).id),children:(Ue,se)=>{Cs(Ue,{glyph:"pencil"})},$$slots:{default:!0}})}},De=n(()=>j(e(N))),Et=ke=>{{let $e=n(()=>u()?o().edit:o().play),Oe=n(()=>u()?o().edit:o().play);st(ke,{variant:"primary",size:"icon-sm",class:"tile-action",get disabled(){return i()},get"aria-label"(){return e($e)},tooltipContentClass:"dock-chrome-tooltip",get tooltip(){return e(Oe)},onclick:Ue=>{Ue.currentTarget instanceof HTMLElement&&ne(e(N),Ue.currentTarget)},children:(Ue,se)=>{{let Ge=n(()=>u()?"pencil":"play");Cs(Ue,{get glyph(){return e(Ge)}})}},$$slots:{default:!0}})}};O(be,ke=>{e(N).status==="failed"&&v()?ke(Re):e(De)?ke(Ve,1):e(N).kind==="clip"&&!e(N).recording&&e(N).url&&ke(Et,2)})}var ye=A(be,2);a(ye,()=>e(N).id,()=>o().remove),F(W),F(Y),$(()=>{J(Y,"data-kind",e(N).kind),J(Y,"data-attachment-id",e(N).id),J(Y,"aria-busy",e(P)||void 0)}),xr("contextmenu",Y,ke=>te(ke,e(N))),Kt(1,Y,()=>On,()=>({tier:"fast",y:3,scale:.98})),Kt(2,Y,()=>Ya,()=>({tier:"fast"})),c(xe,Y)};O(Le,xe=>{e(N).kind==="image"&&e(N).file?xe(Ae):xe(Ee,-1)})}c(le,ve)}),F(me),ea(me,le=>D(w,le),()=>e(w)),$(()=>J(me,"aria-label",o().attachments)),c(T,me)};O(ge,T=>{e(U).length&&T(Pe)})}var Ie=A(ge,2);{const T=le=>{var N=St(),ve=fe(N);{var Le=Ae=>{var Ee=lf(),xe=fe(Ee);{var P=_=>{st(_,{variant:"primary",get disabled(){return i()},onclick:()=>e(S)&&q(e(S).id),children:(Se,Ce)=>{Cr();var E=Pr();$(()=>Q(E,o().markUp)),c(Se,E)},$$slots:{default:!0}})},Y=n(()=>j(e(S)));O(xe,_=>{e(Y)&&_(P)})}var ae=A(xe,2);st(ae,{variant:"secondary",get disabled(){return i()},onclick:()=>e(S)&&z(e(S).id),children:(_,Se)=>{Cr();var Ce=Pr();$(()=>Q(Ce,o().remove)),c(_,Ce)},$$slots:{default:!0}});var we=A(ae,2);st(we,{variant:"ghost-light",onclick:()=>{D(C,!1)},children:(_,Se)=>{Cr();var Ce=Pr();$(()=>Q(Ce,o().done)),c(_,Ce)},$$slots:{default:!0}}),c(Ae,Ee)};O(ve,Ae=>{e(S)&&e(S).kind!=="file"&&Ae(Le)})}c(le,N)};let me=n(()=>e(S)?L(e(S)):o().attachments);yi(Ie,{get title(){return e(me)},size:"wide",showCloseButton:!1,onCloseAutoFocus:le=>{le.preventDefault(),G?.isConnected?G.focus():e(w)?.querySelector("button:not(:disabled)")?.focus()},get open(){return e(C)},set open(le){D(C,le,!0)},footer:T,children:(le,N)=>{var ve=St(),Le=fe(ve);{var Ae=Ee=>{var xe=uf(),P=V(xe);{var Y=_=>{var Se=df();$(Ce=>{J(Se,"src",e(S).url),J(Se,"alt",Ce)},[()=>L(e(S))]),c(_,Se)},ae=n(()=>e(S).kind==="image"&&j(e(S))),we=_=>{var Se=cf();$(Ce=>{J(Se,"src",e(S).url),J(Se,"aria-label",Ce)},[()=>L(e(S))]),c(_,Se)};O(P,_=>{e(ae)?_(Y):e(S).kind==="clip"&&e(S).url&&_(we,1)})}F(xe),c(Ee,xe)};O(Le,Ee=>{e(S)&&e(S).kind!=="file"&&Ee(Ae)})}c(le,ve)},$$slots:{footer:!0,default:!0}})}return c(r,de),bt(_e)}Ga(["keydown","contextmenu"]);var mf=I("<!> ",1),pf=I('<div class="flex flex-col gap-2 px-4 py-3 bg-muted/30 border border-border rounded-lg my-4"><div class="flex items-center justify-between gap-2"><div class="flex items-center gap-2"><div class="shrink-0 text-subtle"><!></div> <div class="font-medium text-sm"> </div></div> <div class="flex items-center gap-1"><!> <!></div></div> <div class="text-xs text-subtle"> </div> <pre class="text-xs bg-background/50 rounded p-2 overflow-x-auto max-h-40 overflow-y-auto font-mono"> </pre></div>');function Yi(r,t){if(new.target)return pt({component:Yi,...r});_t(t,!0);let a=g(t,"name",7),s=g(t,"description",7),o=g(t,"content",7),i=g(t,"onUseScript",7),l=ue(!1);function u(){navigator.clipboard.writeText(o()),D(l,!0),setTimeout(()=>{D(l,!1)},2e3)}function h(){i()?.({name:a(),description:s(),content:o()})}var v={get name(){return a()},set name(R){a(R),m()},get description(){return s()},set description(R){s(R),m()},get content(){return o()},set content(R){o(R),m()},get onUseScript(){return i()},set onUseScript(R){i(R),m()},$set:vt,$on:(R,X)=>ht(t,R,X)},x=pf(),M=V(x),B=V(M),U=V(B),w=V(U);Bt(w,{get icon(){return ps},size:"sm"}),F(U);var C=A(U,2),re=oe(C,!0);F(B);var G=A(B,2),S=V(G);st(S,{variant:"ghost-light",size:"sm",onclick:u,class:"h-7 px-2",children:(R,X)=>{var te=mf(),_e=fe(te);{let ge=n(()=>e(l)?hi:_i);Bt(_e,{get icon(){return e(ge)},class:"mr-1"})}var de=A(_e);$(ge=>Q(de,` ${ge??""}`),[()=>e(l)?d.chat_shared_copied_label():d.chat_shared_copy_label()]),c(R,te)},$$slots:{default:!0}});var j=A(S,2);{var L=R=>{st(R,{variant:"ghost-light",size:"sm",onclick:h,class:"h-7 px-2",children:(X,te)=>{Cr();var _e=Pr();$(de=>Q(_e,de),[()=>d.chat_setupScriptCard_useScript_label()]),c(X,_e)},$$slots:{default:!0}})};O(j,R=>{i()&&R(L)})}F(G),F(M);var ne=A(M,2),z=oe(ne,!0),q=A(ne,2),ee=oe(q,!0);return F(x),$(()=>{Q(re,a()),Q(z,s()),Q(ee,o())}),c(r,x),bt(v)}const yr={toolStart:/(?:\x1B\[\d+m)?🔧\s+(?:Tool call:\s+)?(.+?)(?:\x1B\[0m)?$/,toolDetail:/(?:[└├]─\s+(.+)$|^\s{3,}(.+)$)/,toolResult:/(?:\x1B\[\d+m)?📋\s+Tool result:\s+(.+?)(?:\x1B\[0m)?$/,toolSuccess:/[✓✔✅]\s+(.+)$/,toolError:/[❌✗❎]\s+(.+)$/,sessionInfo:/[Ss]ession:\s*([a-f0-9-]+)/,resumedSession:/📂?\s*Resumed session/i,assistantMarker:/🤖/,systemMarker:/💻/,userMarker:/👤/,thinkingMarker:/🤔\s*Thinking/i,waitingMarker:/^⏳\s+Running/i,indexingProgress:/^Indexing:\s*\[.*\]\s*\d+%/,agentDigest:/<agent_digest>([\s\S]*?)<\/agent_digest>/,setupScript:/<setup_script\s+name="([^"]+)"\s+description="([^"]+)">([\s\S]*?)<\/setup_script>/};class vf{constructor(){pa(this,"buffer","");pa(this,"currentToolName",null);pa(this,"currentToolId",null);pa(this,"lastToolId",null);pa(this,"currentToolParams",[]);pa(this,"currentToolResultContent",[]);pa(this,"inToolResult",!1);pa(this,"inCodeBlock",!1);pa(this,"codeBlockLanguage","");pa(this,"codeBlockContent","");pa(this,"characterBuffer","");pa(this,"inCharacterMode",!1);pa(this,"emittedToolIds",new Set)}parseChunk(t){if(this.isMarkerLine(t.trim())){const o=[];if(this.inToolResult&&this.currentToolResultContent.length>0){const u=this.currentToolResultContent.some(v=>v.startsWith("❌")||v.startsWith("Error:")),h=this.currentToolResultContent.map(v=>v.replace(/^❌\s*/,"").replace(/^Error:\s*/,"")).join(`
1
+ var Ul=Object.defineProperty;var jl=(r,t,a)=>t in r?Ul(r,t,{enumerable:!0,configurable:!0,writable:!0,value:a}):r[t]=a;var pa=(r,t,a)=>jl(r,typeof t!="symbol"?t+"":t,a);import{t as pt,bo as g,bw as vt,b as ht,bm as d,bq as Ea,bs as tr,br as Vl,bp as vn}from"./CHWIPzMj.js";import{ai as Ga,bs as _t,ca as Xt,aD as e,bH as D,ay as fe,bS as A,a7 as St,W as c,a5 as V,bA as F,bn as bt,c9 as n,bV as ue,aA as m,b_ as $,aj as xr,aB as I,be as Cr,b$ as Pr,bO as Q,bf as rr,c0 as Ia,bl as oe,bj as ja,c6 as Gl,bo as nn,br as Zr,am as Da,ax as Ba,bk as as,aw as pn,bz as ns,cb as Fn,c5 as Mn,aC as Ir,cd as vo,bv as Kl}from"./3SdAC2_C.js";import{i as O}from"./DDtBtnNz.js";import{g as kr,e as sa,p as ms,i as Ha,I as Zl,h as eo,X as pi,o as Ql}from"./Bqdjarag.js";import{n as Kt,l as On,c as Ya,g as rn,s as ks,k as ss,S as Xl}from"./D_gp0b_i.js";import{s as J,f as Fe,g as hn,c as It,e as Qt,b as _n,p as Yl,S as Jl,C as ed}from"./B09v4S72.js";import{b as ea}from"./Dn334wJv.js";import{f as st,ae as to,a_ as td}from"./DSQXi-HI.js";import{J as rd,O as ad,Q as Is}from"./QgUSWdkO.js";import"./BOrCm7f7.js";import"./DH2vm-1i.js";import"./T8wSaQKw.js";import{s as Ma,k as vi}from"./Bx3lRAzK.js";import{F as Bt,a4 as zs,bg as ka,cK as ps,au as hi,aZ as _i,aK as nd,c9 as sd,a6 as os,aN as od,cN as id,cM as ld,a3 as vs,aC as is,aw as hs,I as ho,aj as dd,bu as cd,aS as ud,aX as fd,bJ as gd,ao as md,bk as bi,cC as pd,aP as _o,c0 as Ss,aI as Hn,cW as vd,cb as hd,bn as _d,b as bd,cp as yd,ag as wd,ba as Ts,cr as wn,cF as xd,az as kd,c6 as Id,d3 as Sd}from"./Bm1YRNX5.js";import{C as yi,A as Td,o as Cd}from"./BGpvxEza.js";import{b as Cs,V as bo}from"./gFHNPMAw.js";import{A as wi,I as Md,R as Ad,q as Pd}from"./DCpFqaYA.js";import{bZ as xi,aj as Rd,j as Kn,a4 as Ws,al as ls,E as Nd,au as Zn,aP as Ed,aS as yo}from"./C99ttMY5.js";import{t as an,o as $d}from"./DAsc1V4f.js";import{cg as Qn,aO as qn,d1 as ki,d3 as Va,c5 as _s,q as Ld,cW as Ii,d0 as bs,c$ as Si,cZ as Ti,n as Ca,al as Od,am as qd,aJ as Dd,z as Bd,V as Fd,a3 as wo,D as Ci,e3 as zd,aF as Wd,ak as Hd,r as Ud,C as Ms,ag as jd,U as xn,e1 as Vd,ab as Gd,k as xo,u as Kd,Z as Zd,v as Qd,i as Xd,g as As,f as ko,a0 as Yd,$ as Jd,a9 as ec,x as Mi,y as Ai,l as Pi,j as tc,s as rc,a as ac,d4 as nc,ae as sc,e2 as oc,L as ic,F as lc,a2 as Io,bp as dc,av as cc}from"./CB6JpnWC.js";import{Jt as mt,o_ as uc,tP as Xn,nP as So,vI as Ri,vK as Ni,s0 as fc,yH as ds,u$ as Ei,nK as $i,bq as En,nX as gc,nY as mc,yI as pc,qy as vc,tj as hc,vB as Li,nJ as _c,mO as bc,m as yc,z9 as wc,z6 as xc,z8 as kc}from"./DJM-jC4D.js";import{a3 as Ic,y as Ps,a1 as Sc,O as Rs,W as Tc,$ as Cc,k as Mc,p as kn,P as un,q as Ac,G as Pc,v as Rc,t as Nc,M as Ns,K as Ec,z as $c,L as Lc,_ as An,U as Un,N as To,n as Co,E as Oc,c as Es,F as Mo,B as qc,w as Ao,J as Pn,Q as Dc,H as Bc,j as Fc,R as zc,T as Wc,A as Hc,g as Uc,b as jc,D as Vc,f as Gc,e as Kc,a as Zc,C as Qc,i as Xc,d as Hs,V as Oi,a4 as Yc,u as Jc,l as eu}from"./C-nHSAUo.js";import{i as tu,e as ru}from"./BWP_R2MA.js";import{g as $s}from"./B5aYN90J.js";import{M as In,C as Rn}from"./7xVzJhz9.js";import{C as Po}from"./C-662HWr.js";import"./BQiJMsZZ.js";import{P as au}from"./BUOJIxHm.js";import"./z2dT_sfg.js";import{c as qi}from"./ChTqQfQN.js";import{S as nu}from"./BSD-ntGx.js";import{D as Ro,M as su}from"./C6w4HIHS.js";import{b as ou,s as en,c as cs}from"./BmMxtG34.js";import{O as Yn,y as Ls,E as Os,B as qs,N as iu,m as lu,l as du,k as cu,d as Dn,C as No,f as uu,e as fu,g as gu}from"./DFztsOdi.js";import{a as Di,s as Eo}from"./BsieX9dN.js";import{f as mu}from"./BdWqymET.js";import{c as na}from"./M46vYfPG.js";import{a as pu,k as Bi,h as ro,q as Fi,l as wr}from"./ZUA6bo0t.js";import{P as vu}from"./BVhmKG23.js";import{r as Ds,q as Bs,B as $o,i as hu}from"./CeGIZnmi.js";import{R as zi,C as ys,m as _u,h as bu,g as yu,i as Lo,P as wu}from"./DDfMifm6.js";import"./CeOa9B5I.js";import{c as xu,s as ku}from"./B7Mft14L.js";import{h as gn}from"./BwJyU0G0.js";import{b as Iu,a as Wi}from"./d-SabBb_.js";import{P as Hi}from"./CKC2M8j1.js";import{B as Su}from"./U_nfJe6p.js";import{o as Ui,r as Tu,e as Cu}from"./CFLU9fq8.js";import{o as ji}from"./CJ3l-lGj.js";import{A as Jn,b as Vi}from"./s_zHQBKW.js";import{g as ao}from"./BHl8a9sq.js";import{a as Mu,M as Au}from"./DxTOze69.js";import{a as Gi}from"./tsVy-iyH.js";import{E as Pu,n as Ru}from"./CWVqIb-d.js";import{t as Tr}from"./C-BsEdGZ.js";import{c as Sn}from"./C_VUI8Os.js";import{A as Nu}from"./CmE98hO-.js";import{f as Eu,d as $u}from"./BAaqzMEP.js";import{ac as Lu,N as Ou,Y as qu,K as Oo,X as Du,v as Bu,$ as Ki,_ as Zi}from"./CSCM9u80.js";import{a as Fu}from"./CC7to1B5.js";import{k as zu}from"./DPbAP8qP.js";import{S as Wu}from"./D-Cja9EW.js";import{u as Hu,a as Uu,c as qo,S as ju}from"./D9tVylVS.js";import{T as us}from"./pElsZ4dt.js";import"./BpUidpA4.js";import{g as Vu,a as Gu}from"./yQuAS-d_.js";import{b as Qi}from"./Byz3i90Q.js";import{b as Do}from"./goTpbPhD.js";import{ah as Ua,n as Ku}from"./DdAvLI3S.js";import{c as Zu}from"./CoCpxnqY.js";import{r as Bo}from"./ouMJlHY1.js";function Qu(r){if(!r||typeof r!="object")return null;const t=r;if(t.type!=="script_monitor_wake"||t.source!=="system")return null;const{scriptName:a,scriptId:s,runId:o,monitorId:i,workspaceId:l,reason:u}=t;if(typeof a!="string"||typeof s!="string"||!s||typeof o!="string"||!o||typeof i!="string"||!i||typeof l!="string"||!l||u!=="finished"&&u!=="ttl-expired"&&u!=="output-match"&&u!=="line-count")return null;const h=t.trigger;return{scriptName:a,scriptId:s,runId:o,monitorId:i,workspaceId:l,reason:u,...u==="output-match"&&typeof h?.matchedLine=="string"?{matchedLine:h.matchedLine}:{}}}function Xu(r){return r?.type==="script_monitor_wake"&&!("remoteAgentId"in r)}function Yu(r,t,a,s=!1){if(!r||!t)return{edit:!1,remove:!1,sendNow:!1};const o=r.messageMetadata?.fromPrincipalId??r.author?.principalId,i=Lu(r)&&r.author?.principalId!==null&&o===t;return{edit:i,remove:i||t===a||s,sendNow:(i||s)&&!Xi(r)}}function Tn(r,t){if(t)return r.find(a=>a.editing&&a.editingMessageId?a.editingMessageId===t:a.id===t)}function Xi(r){return Xu(r.messageMetadata)&&typeof r.messageMetadata?.monitorId=="string"}function Fo(r,t=Date.now()){const a=r.messageMetadata,s=a?.fromPrincipalId,o=a&&Object.hasOwn(a,"humanAuthor")&&!(typeof s=="string"&&s.length>0),i=r.holdKind!==void 0&&Date.parse(r.holdUntil??"")>t;return!r.editing&&!i&&!o&&!Xi(r)}const Tb="pl-3.5! pr-2!";var Ju=I('<span class="tile-remove-slot svelte-d8pwpf"><!></span>'),zo=I('<span class="attachment-status svelte-d8pwpf"> </span>'),ef=I('<div class="file-image tile svelte-d8pwpf" data-kind="file"><!> <!> <div class="tile-actions svelte-d8pwpf"><!> <!></div></div>'),tf=I("<!><span> </span>",1),rf=I('<img alt="" draggable="false"/>'),af=I('<span class="summary svelte-d8pwpf" data-clip-summary=""> </span>'),nf=I('<span class="clip svelte-d8pwpf"><span class="record-dot svelte-d8pwpf" aria-hidden="true"></span><span class="duration svelte-d8pwpf"> </span><!></span>'),sf=I('<div class="tile svelte-d8pwpf"><!> <!> <div class="tile-actions svelte-d8pwpf"><!> <!></div></div>'),of=I('<div class="attachment-row svelte-d8pwpf" role="group" data-dock-media-attachments=""></div>'),lf=I("<!> <!> <!>",1),df=I('<img draggable="false" class="svelte-d8pwpf"/>'),cf=I('<video controls="" playsinline="" class="svelte-d8pwpf"></video>',2),uf=I('<div class="media-viewer svelte-d8pwpf"><!></div>'),ff=I("<!> <!>",1);function gf(r,t){if(new.target)return pt({component:gf,...r});_t(t,!0);const a=(T,me=rr,le=rr)=>{var N=Ju(),ve=V(N);st(ve,{variant:"secondary",size:"icon-sm",class:"tile-action tile-remove",get disabled(){return i()},get"aria-label"(){return le()},tooltipContentClass:"dock-chrome-tooltip",get tooltip(){return le()},onclick:()=>z(me()),children:(Le,Ae)=>{Cs(Le,{glyph:"x"})},$$slots:{default:!0}}),F(N),c(T,N)};let s=g(t,"items",7),o=g(t,"labels",7),i=g(t,"disabled",7,!1),l=g(t,"onMarkUp",7),u=g(t,"onEdit",7),h=g(t,"onRemove",7),v=g(t,"onRetry",7),x=g(t,"onCopy",7),M=g(t,"onMenu",7);const B=T=>T.owner==="attachment"?2:{image:0,clip:1,file:2}[T.kind],U=n(()=>[...s()].sort((T,me)=>B(T)-B(me)));let w=ue(null),C=ue(!1),re=ue(null),G=null;const S=n(()=>s().find(T=>T.id===e(re)));Xt(()=>{(!e(S)||e(S).kind==="image"&&!j(e(S)))&&D(C,!1)});function j(T){return T.kind==="image"&&T.status!=="placing"&&T.status!=="failed"&&T.url.trim().length>0}function L(T){return T.kind==="image"?o().image(T.markCount):T.kind==="clip"?T.summary?`${o().clip(T.duration)} ${T.summary}`:o().clip(T.duration):T.name}function ne(T,me){if(!(i()||T.kind==="file"||T.kind==="image"&&!j(T)||T.kind==="clip"&&(!T.url||T.recording))){if((T.kind==="clip"||T.kind==="image")&&u()){u()(T.id);return}G=me,D(re,T.id,!0),D(C,!0)}}async function z(T){i()||(e(re)===T&&D(C,!1),h()(T),await Ia(),(!document.activeElement||document.activeElement===document.body)&&e(w)?.querySelector("button:not(:disabled)")?.focus())}function q(T){const me=s().find(le=>le.id===T);i()||!me||!j(me)||(D(C,!1),u()?u()(T):l()(T))}function ee(T,me){T.key!=="Delete"||i()||(T.preventDefault(),T.stopPropagation(),z(me))}function R(T){return T.status==="placing"||T.status==="failed"?!1:T.kind==="image"?!!T.file||j(T):T.kind==="clip"&&!T.recording&&!!T.url}function X(T,me){const le=rd()?T.metaKey:T.ctrlKey,N=T.key.toLowerCase();if(le&&!T.shiftKey&&!T.altKey&&(N==="c"||N==="x")){if(!x()||!R(me)||(T.preventDefault(),T.stopPropagation(),N==="x"&&i()))return;x()(me.id,N==="x");return}ee(T,me.id)}function te(T,me){!M()||!R(me)||(T.preventDefault(),M()(me.id))}var _e={get items(){return s()},set items(T){s(T),m()},get labels(){return o()},set labels(T){o(T),m()},get disabled(){return i()},set disabled(T=!1){i(T),m()},get onMarkUp(){return l()},set onMarkUp(T){l(T),m()},get onEdit(){return u()},set onEdit(T){u(T),m()},get onRemove(){return h()},set onRemove(T){h(T),m()},get onRetry(){return v()},set onRetry(T){v(T),m()},get onCopy(){return x()},set onCopy(T){x(T),m()},get onMenu(){return M()},set onMenu(T){M(T),m()},$set:vt,$on:(T,me)=>ht(t,T,me)},de=ff(),ge=fe(de);{var Pe=T=>{var me=of();kr(me,21,()=>e(U),le=>le.id,(le,N)=>{var ve=St(),Le=fe(ve);{var Ae=xe=>{var P=ef(),Y=V(P);{let W=n(()=>i()||e(N).status==="placing");wi(Y,{get id(){return e(N).id},get name(){return e(N).file.name},get type(){return e(N).file.imageMimeType},get imageData(){return e(N).file.imageData},get imageMimeType(){return e(N).file.imageMimeType},variant:"thumbnail",thumbnailClass:"size-full",class:"size-full",get disabled(){return e(W)},get placementStatus(){return e(N).status},get placementError(){return e(N).error}})}var ae=A(Y,2);{var we=W=>{var be=zo(),Re=oe(be,!0);$(()=>{J(be,"data-failed",e(N).status==="failed"||void 0),J(be,"role",e(N).status==="failed"?"alert":"status"),J(be,"title",e(N).error),Q(Re,e(N).status==="failed"?e(N).error??o().attachmentFailed:o().attachmentPending)}),c(W,be)};O(ae,W=>{e(N).status&&W(we)})}var _=A(ae,2),Se=V(_);{var Ce=W=>{st(W,{variant:"primary",size:"icon-sm",class:"tile-action",get disabled(){return i()},get"aria-label"(){return o().retry},tooltipContentClass:"dock-chrome-tooltip",get tooltip(){return o().retry},onclick:()=>v()?.(e(N).id),children:(be,Re)=>{Bt(be,{get icon(){return zs},size:16})},$$slots:{default:!0}})};O(Se,W=>{e(N).status==="failed"&&v()&&W(Ce)})}var E=A(Se,2);{let W=n(()=>d.chat_attachmentPreview_remove_ariaLabel({name:e(N).file.name}));a(E,()=>e(N).id,()=>e(W))}F(_),F(P),$(()=>J(P,"data-attachment-id",e(N).id)),xr("keydown",P,W=>X(W,e(N))),xr("contextmenu",P,W=>te(W,e(N))),Kt(1,P,()=>On,()=>({tier:"fast",y:3,scale:.98})),Kt(2,P,()=>Ya,()=>({tier:"fast"})),c(xe,P)},Ee=xe=>{const P=n(()=>e(N).kind==="image"&&!j(e(N))&&e(N).status!=="failed");var Y=sf(),ae=V(Y);{var we=ke=>{st(ke,{type:"button",variant:"ghost",wrapContent:!1,class:"open-tile file",get"aria-label"(){return e(N).name},get disabled(){return i()},onkeydown:$e=>ee($e,e(N).id),children:($e,Oe)=>{var Ue=tf(),se=fe(Ue);Bt(se,{get icon(){return ka},size:20});var Ge=A(se),yt=oe(Ge,!0);$(()=>Q(yt,e(N).name)),c($e,Ue)},$$slots:{default:!0}})},_=ke=>{{let $e=n(()=>L(e(N))),Oe=n(()=>i()||e(N).kind==="clip"&&(e(N).recording||!e(N).url));st(ke,{type:"button",variant:"ghost",wrapContent:!1,class:"open-tile",get"aria-label"(){return e($e)},get disabled(){return e(Oe)},onkeydown:Ue=>X(Ue,e(N)),onclick:Ue=>{Ue.currentTarget instanceof HTMLElement&&ne(e(N),Ue.currentTarget)},children:(Ue,se)=>{var Ge=St(),yt=fe(Ge);{var Ft=et=>{var Ke=rf();$(()=>J(Ke,"src",e(N).url)),c(et,Ke)},er=et=>{var Ke=nf(),$t=A(V(Ke)),Tt=oe($t,!0),ut=A($t);{var ze=K=>{var y=af(),pe=oe(y,!0);$(()=>Q(pe,e(N).summary)),c(K,y)};O(ut,K=>{e(N).summary&&K(ze)})}F(Ke),$(()=>Q(Tt,e(N).duration)),c(et,Ke)};O(yt,et=>{e(N).kind==="image"?et(Ft):et(er,-1)})}c(Ue,Ge)},$$slots:{default:!0}})}},Se=n(()=>e(N).kind!=="image"||j(e(N)));O(ae,ke=>{e(N).kind==="file"?ke(we):e(Se)&&ke(_,1)})}var Ce=A(ae,2);{var E=ke=>{var $e=zo(),Oe=oe($e,!0);$(()=>{J($e,"data-failed",e(N).status==="failed"||void 0),J($e,"role",e(N).status==="failed"?"alert":"status"),J($e,"title",e(N).error),Q(Oe,e(N).status==="failed"?e(N).error??o().attachmentFailed:o().attachmentPending)}),c(ke,$e)};O(Ce,ke=>{(e(N).status||e(P))&&ke(E)})}var W=A(Ce,2),be=V(W);{var Re=ke=>{st(ke,{variant:"primary",size:"icon-sm",class:"tile-action",get disabled(){return i()},get"aria-label"(){return o().retry},tooltipContentClass:"dock-chrome-tooltip",get tooltip(){return o().retry},onclick:()=>v()?.(e(N).id),children:($e,Oe)=>{Bt($e,{get icon(){return zs},size:16})},$$slots:{default:!0}})},Ve=ke=>{{let $e=n(()=>u()?o().edit:o().markUp),Oe=n(()=>u()?o().edit:o().markUp);st(ke,{variant:"primary",size:"icon-sm",class:"tile-action",get disabled(){return i()},get"aria-label"(){return e($e)},tooltipContentClass:"dock-chrome-tooltip",get tooltip(){return e(Oe)},onclick:()=>q(e(N).id),children:(Ue,se)=>{Cs(Ue,{glyph:"pencil"})},$$slots:{default:!0}})}},De=n(()=>j(e(N))),Et=ke=>{{let $e=n(()=>u()?o().edit:o().play),Oe=n(()=>u()?o().edit:o().play);st(ke,{variant:"primary",size:"icon-sm",class:"tile-action",get disabled(){return i()},get"aria-label"(){return e($e)},tooltipContentClass:"dock-chrome-tooltip",get tooltip(){return e(Oe)},onclick:Ue=>{Ue.currentTarget instanceof HTMLElement&&ne(e(N),Ue.currentTarget)},children:(Ue,se)=>{{let Ge=n(()=>u()?"pencil":"play");Cs(Ue,{get glyph(){return e(Ge)}})}},$$slots:{default:!0}})}};O(be,ke=>{e(N).status==="failed"&&v()?ke(Re):e(De)?ke(Ve,1):e(N).kind==="clip"&&!e(N).recording&&e(N).url&&ke(Et,2)})}var ye=A(be,2);a(ye,()=>e(N).id,()=>o().remove),F(W),F(Y),$(()=>{J(Y,"data-kind",e(N).kind),J(Y,"data-attachment-id",e(N).id),J(Y,"aria-busy",e(P)||void 0)}),xr("contextmenu",Y,ke=>te(ke,e(N))),Kt(1,Y,()=>On,()=>({tier:"fast",y:3,scale:.98})),Kt(2,Y,()=>Ya,()=>({tier:"fast"})),c(xe,Y)};O(Le,xe=>{e(N).kind==="image"&&e(N).file?xe(Ae):xe(Ee,-1)})}c(le,ve)}),F(me),ea(me,le=>D(w,le),()=>e(w)),$(()=>J(me,"aria-label",o().attachments)),c(T,me)};O(ge,T=>{e(U).length&&T(Pe)})}var Ie=A(ge,2);{const T=le=>{var N=St(),ve=fe(N);{var Le=Ae=>{var Ee=lf(),xe=fe(Ee);{var P=_=>{st(_,{variant:"primary",get disabled(){return i()},onclick:()=>e(S)&&q(e(S).id),children:(Se,Ce)=>{Cr();var E=Pr();$(()=>Q(E,o().markUp)),c(Se,E)},$$slots:{default:!0}})},Y=n(()=>j(e(S)));O(xe,_=>{e(Y)&&_(P)})}var ae=A(xe,2);st(ae,{variant:"secondary",get disabled(){return i()},onclick:()=>e(S)&&z(e(S).id),children:(_,Se)=>{Cr();var Ce=Pr();$(()=>Q(Ce,o().remove)),c(_,Ce)},$$slots:{default:!0}});var we=A(ae,2);st(we,{variant:"ghost-light",onclick:()=>{D(C,!1)},children:(_,Se)=>{Cr();var Ce=Pr();$(()=>Q(Ce,o().done)),c(_,Ce)},$$slots:{default:!0}}),c(Ae,Ee)};O(ve,Ae=>{e(S)&&e(S).kind!=="file"&&Ae(Le)})}c(le,N)};let me=n(()=>e(S)?L(e(S)):o().attachments);yi(Ie,{get title(){return e(me)},size:"wide",showCloseButton:!1,onCloseAutoFocus:le=>{le.preventDefault(),G?.isConnected?G.focus():e(w)?.querySelector("button:not(:disabled)")?.focus()},get open(){return e(C)},set open(le){D(C,le,!0)},footer:T,children:(le,N)=>{var ve=St(),Le=fe(ve);{var Ae=Ee=>{var xe=uf(),P=V(xe);{var Y=_=>{var Se=df();$(Ce=>{J(Se,"src",e(S).url),J(Se,"alt",Ce)},[()=>L(e(S))]),c(_,Se)},ae=n(()=>e(S).kind==="image"&&j(e(S))),we=_=>{var Se=cf();$(Ce=>{J(Se,"src",e(S).url),J(Se,"aria-label",Ce)},[()=>L(e(S))]),c(_,Se)};O(P,_=>{e(ae)?_(Y):e(S).kind==="clip"&&e(S).url&&_(we,1)})}F(xe),c(Ee,xe)};O(Le,Ee=>{e(S)&&e(S).kind!=="file"&&Ee(Ae)})}c(le,ve)},$$slots:{footer:!0,default:!0}})}return c(r,de),bt(_e)}Ga(["keydown","contextmenu"]);var mf=I("<!> ",1),pf=I('<div class="flex flex-col gap-2 px-4 py-3 bg-muted/30 border border-border rounded-lg my-4"><div class="flex items-center justify-between gap-2"><div class="flex items-center gap-2"><div class="shrink-0 text-subtle"><!></div> <div class="font-medium text-sm"> </div></div> <div class="flex items-center gap-1"><!> <!></div></div> <div class="text-xs text-subtle"> </div> <pre class="text-xs bg-background/50 rounded p-2 overflow-x-auto max-h-40 overflow-y-auto font-mono"> </pre></div>');function Yi(r,t){if(new.target)return pt({component:Yi,...r});_t(t,!0);let a=g(t,"name",7),s=g(t,"description",7),o=g(t,"content",7),i=g(t,"onUseScript",7),l=ue(!1);function u(){navigator.clipboard.writeText(o()),D(l,!0),setTimeout(()=>{D(l,!1)},2e3)}function h(){i()?.({name:a(),description:s(),content:o()})}var v={get name(){return a()},set name(R){a(R),m()},get description(){return s()},set description(R){s(R),m()},get content(){return o()},set content(R){o(R),m()},get onUseScript(){return i()},set onUseScript(R){i(R),m()},$set:vt,$on:(R,X)=>ht(t,R,X)},x=pf(),M=V(x),B=V(M),U=V(B),w=V(U);Bt(w,{get icon(){return ps},size:"sm"}),F(U);var C=A(U,2),re=oe(C,!0);F(B);var G=A(B,2),S=V(G);st(S,{variant:"ghost-light",size:"sm",onclick:u,class:"h-7 px-2",children:(R,X)=>{var te=mf(),_e=fe(te);{let ge=n(()=>e(l)?hi:_i);Bt(_e,{get icon(){return e(ge)},class:"mr-1"})}var de=A(_e);$(ge=>Q(de,` ${ge??""}`),[()=>e(l)?d.chat_shared_copied_label():d.chat_shared_copy_label()]),c(R,te)},$$slots:{default:!0}});var j=A(S,2);{var L=R=>{st(R,{variant:"ghost-light",size:"sm",onclick:h,class:"h-7 px-2",children:(X,te)=>{Cr();var _e=Pr();$(de=>Q(_e,de),[()=>d.chat_setupScriptCard_useScript_label()]),c(X,_e)},$$slots:{default:!0}})};O(j,R=>{i()&&R(L)})}F(G),F(M);var ne=A(M,2),z=oe(ne,!0),q=A(ne,2),ee=oe(q,!0);return F(x),$(()=>{Q(re,a()),Q(z,s()),Q(ee,o())}),c(r,x),bt(v)}const yr={toolStart:/(?:\x1B\[\d+m)?🔧\s+(?:Tool call:\s+)?(.+?)(?:\x1B\[0m)?$/,toolDetail:/(?:[└├]─\s+(.+)$|^\s{3,}(.+)$)/,toolResult:/(?:\x1B\[\d+m)?📋\s+Tool result:\s+(.+?)(?:\x1B\[0m)?$/,toolSuccess:/[✓✔✅]\s+(.+)$/,toolError:/[❌✗❎]\s+(.+)$/,sessionInfo:/[Ss]ession:\s*([a-f0-9-]+)/,resumedSession:/📂?\s*Resumed session/i,assistantMarker:/🤖/,systemMarker:/💻/,userMarker:/👤/,thinkingMarker:/🤔\s*Thinking/i,waitingMarker:/^⏳\s+Running/i,indexingProgress:/^Indexing:\s*\[.*\]\s*\d+%/,agentDigest:/<agent_digest>([\s\S]*?)<\/agent_digest>/,setupScript:/<setup_script\s+name="([^"]+)"\s+description="([^"]+)">([\s\S]*?)<\/setup_script>/};class vf{constructor(){pa(this,"buffer","");pa(this,"currentToolName",null);pa(this,"currentToolId",null);pa(this,"lastToolId",null);pa(this,"currentToolParams",[]);pa(this,"currentToolResultContent",[]);pa(this,"inToolResult",!1);pa(this,"inCodeBlock",!1);pa(this,"codeBlockLanguage","");pa(this,"codeBlockContent","");pa(this,"characterBuffer","");pa(this,"inCharacterMode",!1);pa(this,"emittedToolIds",new Set)}parseChunk(t){if(this.isMarkerLine(t.trim())){const o=[];if(this.inToolResult&&this.currentToolResultContent.length>0){const u=this.currentToolResultContent.some(v=>v.startsWith("❌")||v.startsWith("Error:")),h=this.currentToolResultContent.map(v=>v.replace(/^❌\s*/,"").replace(/^Error:\s*/,"")).join(`
2
2
  `);o.push({type:"tool_result",content:h,metadata:{toolId:this.currentToolId,isError:u}}),this.lastToolId=this.currentToolId,this.currentToolId=null,this.inToolResult=!1,this.currentToolResultContent=[]}const i=t.indexOf("🤖"),l=t.substring(i+2);if(this.inCharacterMode=!0,this.characterBuffer="",l&&l.trim()&&l!==`
3
3
  `){const u=l.replace(/^\n/,"");u&&(this.characterBuffer=u)}return o}if(this.inCharacterMode){if(t.trim()===""&&this.characterBuffer==="")return[];if(t.includes(`
4
4
  `)&&this.characterBuffer.length>0){const o=t.substring(0,t.indexOf(`
@@ -1 +1 @@
1
- import{h7 as O,gP as J,JH as P,Kv as U,Du as q,u4 as K,v1 as N,AZ as V,A_ as j,JF as z,JG as Q,A$ as Z}from"./eqIwOdFV.js";import{selectWorkspaceTabOrder as f,selectCurrentWorkspaceTabId as S,selectLastClosedWorkspaceTab as X}from"./DK-gr9PF.js";import{i as Y,q as M,b as ee,j as te,l as ae}from"./BturI3jj.js";import{g as ne}from"./Bjpdj-Rz.js";import{bm as l}from"./2CQlphfn.js";import{z as oe,S as y}from"./Bn7ZmTkF.js";import{B as h,S as C,Q as ce}from"./Bqd7fdCF.js";import{ad as le,ab as E}from"./BRHA9tcr.js";import{g as se}from"./CZ6S_xft.js";function A(e,a){const n=f.select(e.state),o=S.select(e.state);if(!o)return null;const c=n.indexOf(o),s=c+(a==="left"?-1:1),p=n[s];return c<0||!p?null:(e.dispatch(K(o,p,a==="left"?"before":"after")),o)}function B(e){const a=S.select(e);return a&&f.select(e).includes(a)?a:null}function m(e,a,n){const o=B(e.state),c=o?`/workspace/${o}`:ne(e.state);return a!==c&&n(c),o}function ie(e,a,n,o){return e.dispatch(O(a)),m(e,n,o),a}function I(e,a){const o=a.match(/^\/workspace\/([^/]+)/)?.[1];return o?o==="new"?null:o:null}function R(e,a,n,o){if(n==="/")return D(e,a==="next"?0:"last",n,o);e.dispatch(a==="next"?z():Q());const c=S.select(e.state);if(!c)return null;const s=`/workspace/${c}`;return n!==s&&o(s),c}function re(e,a,n){const o=I(e,a);return o?ie(e,o,a,n):null}function pe(e,a,n){const o=I(e,a);if(!o)return null;const c=Y.select(e.state,o);if(!c)return null;const s=c.tabs.find(v=>v.id===c.activeTabId),p=c.tabs.length===0&&c.activeTabId===null,g=M.select(e.state,o)>1&&(p||c.tabs.length===1&&s!==void 0&&s.closable!==!1);if((!s||s.closable===!1)&&!g)return null;const T=n??se(o)?.availableCanvasWidth??void 0;return e.dispatch(J(o,void 0,T)),s?.id??c.id}function ue(e,a){const n=e.state.panelLayout.byWorkspaceId[a];return!n||n.restoreStatus==="pending"?!1:ee.select(e.state,a).length===0}function de(e,a,n){B(e.state)||e.dispatch(P(0)),m(e,a,n)}function L(e,a,{navigate:n,closeWindow:o}){return o?(o(),"window"):(m(e,a,n),null)}function be(e,a,n){const o=I(e,a);return o?pe(e,a,n.availableCanvasWidth)!==null?"panel":ue(e,o)?(e.dispatch(O(o)),f.select(e.state).length>0?(de(e,a,n.navigate),"workspace"):L(e,a,n)??"workspace"):null:f.select(e.state).length>0?null:L(e,a,n)}function fe(e,a,n){return e.dispatch(Z()),m(e,a,n)}function ke(e,a,n){const o=a.match(/^\/workspace\/([^/]+)/),c=o&&o[1]!=="new"?o[1]:null,s=X.select(e.state),p=c?ae.select(e.state,c):null;return c&&p&&(!s||p.closedAt>=s.closedAt)?p.kind==="column"?(e.dispatch(V(c)),"column"):(e.dispatch(j(c)),p.kind):s?(fe(e,a,n),"workspace"):null}function _e(e,a){const n=a.match(/^\/workspace\/([^/]+)/),o=n&&n[1]!=="new"?n[1]:null;if(!o)return null;const c=N(o);return e.dispatch(c),te.select(e.state,o)}function D(e,a,n,o){const c=f.select(e.state),s=a==="last"?c.length-1:a;return s<0||s>=c.length?null:(e.dispatch(P(s)),m(e,n,o))}function We({isMac:e,register:a,store:n,getCurrentPath:o,navigate:c,openNewWorkspace:s,getRailMachineIds:p,onCreateAgent:g,onCreateNote:T,onCreateTerminal:v,onCreateBrowser:F,onWorkspaceTabMoved:W,closeWindow:G,resolveBinding:w}){const r=e?{meta:!0}:{ctrl:!0},$=oe("TOGGLE_SIDEBAR",e),k=t=>()=>t(o()),H=t=>()=>{const i=o().match(/^\/workspace\/([^/]+)/);i?.[1]&&i[1]!=="new"&&t(i[1])},u=t=>w?{binding:()=>w(t)}:{},_=t=>w?.(t)??ce(t);a({...u("global.new-space"),...r,key:"n",global:!0,description:l.workspace_shortcuts_newSpace_description(),action:s}),a({...u("panel.toggle-sidebar"),...$,global:!0,description:y.TOGGLE_SIDEBAR.label,action:()=>n.dispatch(U())}),a({...u("navigation.new-tab"),...r,key:"t",global:!0,description:l.workspace_shortcuts_newPanel_description(),action:k(t=>_e(n,t))});for(const[t,i,b,d]of[["workspace.new-agent","a",l.ui_shortcuts_newAgent_label(),g],["workspace.new-note","n",l.layout_panelEmptyState_newItem_tooltip({label:l.layout_panelEmptyState_note_label()}),T],["workspace.new-terminal","t",l.layout_panelEmptyState_newItem_tooltip({label:l.layout_panelEmptyState_terminal_label()}),v],["workspace.new-browser","b",l.layout_panelEmptyState_newItem_tooltip({label:l.layout_panelEmptyState_browser_label()}),F]])d&&a({...u(t),...r,key:i,alt:!0,global:!0,allowInTerminal:!0,description:b,action:H(d)});a({...u("navigation.close-tab"),...r,key:"w",global:!0,description:l.workspace_shortcuts_closePanelTab_description(),action:k(t=>be(n,t,{navigate:c,closeWindow:G}))}),a({...u("navigation.close-space-tab"),...r,key:"w",shift:!0,global:!0,description:l.workspace_shortcuts_closeSpaceTab_description(),action:k(t=>re(n,t,c))}),a({...u("navigation.reopen-tab"),...r,key:"t",shift:!0,global:!0,description:l.workspace_shortcuts_reopenClosedTabOrSpace_description(),action:k(t=>ke(n,t,c))}),a({...u("navigation.move-space-tab-left"),...r,key:"ArrowLeft",alt:!0,shift:!0,global:!0,description:y.MOVE_SPACE_TAB_LEFT.label,action:()=>{const t=A(n,"left");t&&W?.({workspaceId:t,position:f.select(n.state).indexOf(t)+1})}}),a({...u("navigation.move-space-tab-right"),...r,key:"ArrowRight",alt:!0,shift:!0,global:!0,description:y.MOVE_SPACE_TAB_RIGHT.label,action:()=>{const t=A(n,"right");t&&W?.({workspaceId:t,position:f.select(n.state).indexOf(t)+1})}});for(const[t,i]of[["next",!1],["previous",!0]]){a({...u(t==="next"?"global.next-space":"global.previous-space"),key:"Tab",ctrl:!0,shift:i,global:!0,description:t==="next"?l.workspace_shortcuts_nextSpaceTab_description():l.workspace_shortcuts_previousSpaceTab_description(),action:k(d=>R(n,t,d,c))});const b=t==="next"?"global.next-space-alt":"global.previous-space-alt";a({...u(b),...r,key:t==="next"?"}":"{",shift:!0,global:!0,allowInTerminal:!0,preferLocal:!0,enabled:d=>!w||!h(b,d,w,e),description:t==="next"?l.workspace_shortcuts_nextSpaceTab_description():l.workspace_shortcuts_previousSpaceTab_description(),action:k(d=>R(n,t,d,c))})}const x=t=>{t===1?c("/"):D(n,t===9?"last":t-2,o(),c)};for(let t=1;t<=9;t++)a({...r,key:String(t),binding:()=>_("navigation.go-to-device").replace(/([1-8])-9$/,String(t)),global:!0,allowInTerminal:!0,enabled:i=>E.select(n.state)&&!h("navigation.go-to-device",i,_,e),description:l.machineRail_nav_ariaLabel(),action:()=>{const i=p?.()??le.select(n.state).map(d=>d.id),b=i[t===9?i.length-1:t-1];b&&n.dispatch(q(b))}});for(let t=1;t<=9;t++)a({...r,key:String(t),binding:()=>C["navigation.go-to-device"].replace(/([1-8])-9$/,String(t)),global:!0,allowInTerminal:!0,enabled:i=>!E.select(n.state)&&_("navigation.go-to-tab")===C["navigation.go-to-tab"]&&!h("navigation.go-to-device",i,_,e),description:l.ui_shortcuts_goToTab_label(),action:()=>x(t)});for(let t=1;t<=9;t++)a({binding:()=>_("navigation.go-to-tab").replace(/([1-8])-9$/,String(t)),...r,alt:!0,key:String(t),global:!0,allowInTerminal:!0,enabled:i=>!h("navigation.go-to-tab",i,_,e),description:t===1?l.home_navigation_description():t===9?l.workspace_shortcuts_selectLastSpaceTab_description():l.workspace_shortcuts_selectSpaceTab_description({digit:t}),action:()=>x(t)})}export{be as c,We as r};
1
+ import{h7 as O,gP as J,JH as P,Kv as U,Du as q,u4 as K,v1 as N,AZ as V,A_ as j,JF as z,JG as Q,A$ as Z}from"./DJM-jC4D.js";import{selectWorkspaceTabOrder as f,selectCurrentWorkspaceTabId as S,selectLastClosedWorkspaceTab as X}from"./Jy2VtQ-j.js";import{i as Y,q as M,b as ee,j as te,l as ae}from"./CezXhCS3.js";import{g as ne}from"./BAaqzMEP.js";import{bm as l}from"./CHWIPzMj.js";import{z as oe,S as y}from"./QgUSWdkO.js";import{B as h,S as C,Q as ce}from"./Bqd7fdCF.js";import{ad as le,ab as E}from"./BED17zwc.js";import{g as se}from"./Cq8HYngI.js";function A(e,a){const n=f.select(e.state),o=S.select(e.state);if(!o)return null;const c=n.indexOf(o),s=c+(a==="left"?-1:1),p=n[s];return c<0||!p?null:(e.dispatch(K(o,p,a==="left"?"before":"after")),o)}function B(e){const a=S.select(e);return a&&f.select(e).includes(a)?a:null}function m(e,a,n){const o=B(e.state),c=o?`/workspace/${o}`:ne(e.state);return a!==c&&n(c),o}function ie(e,a,n,o){return e.dispatch(O(a)),m(e,n,o),a}function I(e,a){const o=a.match(/^\/workspace\/([^/]+)/)?.[1];return o?o==="new"?null:o:null}function R(e,a,n,o){if(n==="/")return D(e,a==="next"?0:"last",n,o);e.dispatch(a==="next"?z():Q());const c=S.select(e.state);if(!c)return null;const s=`/workspace/${c}`;return n!==s&&o(s),c}function re(e,a,n){const o=I(e,a);return o?ie(e,o,a,n):null}function pe(e,a,n){const o=I(e,a);if(!o)return null;const c=Y.select(e.state,o);if(!c)return null;const s=c.tabs.find(v=>v.id===c.activeTabId),p=c.tabs.length===0&&c.activeTabId===null,g=M.select(e.state,o)>1&&(p||c.tabs.length===1&&s!==void 0&&s.closable!==!1);if((!s||s.closable===!1)&&!g)return null;const T=n??se(o)?.availableCanvasWidth??void 0;return e.dispatch(J(o,void 0,T)),s?.id??c.id}function ue(e,a){const n=e.state.panelLayout.byWorkspaceId[a];return!n||n.restoreStatus==="pending"?!1:ee.select(e.state,a).length===0}function de(e,a,n){B(e.state)||e.dispatch(P(0)),m(e,a,n)}function L(e,a,{navigate:n,closeWindow:o}){return o?(o(),"window"):(m(e,a,n),null)}function be(e,a,n){const o=I(e,a);return o?pe(e,a,n.availableCanvasWidth)!==null?"panel":ue(e,o)?(e.dispatch(O(o)),f.select(e.state).length>0?(de(e,a,n.navigate),"workspace"):L(e,a,n)??"workspace"):null:f.select(e.state).length>0?null:L(e,a,n)}function fe(e,a,n){return e.dispatch(Z()),m(e,a,n)}function ke(e,a,n){const o=a.match(/^\/workspace\/([^/]+)/),c=o&&o[1]!=="new"?o[1]:null,s=X.select(e.state),p=c?ae.select(e.state,c):null;return c&&p&&(!s||p.closedAt>=s.closedAt)?p.kind==="column"?(e.dispatch(V(c)),"column"):(e.dispatch(j(c)),p.kind):s?(fe(e,a,n),"workspace"):null}function _e(e,a){const n=a.match(/^\/workspace\/([^/]+)/),o=n&&n[1]!=="new"?n[1]:null;if(!o)return null;const c=N(o);return e.dispatch(c),te.select(e.state,o)}function D(e,a,n,o){const c=f.select(e.state),s=a==="last"?c.length-1:a;return s<0||s>=c.length?null:(e.dispatch(P(s)),m(e,n,o))}function We({isMac:e,register:a,store:n,getCurrentPath:o,navigate:c,openNewWorkspace:s,getRailMachineIds:p,onCreateAgent:g,onCreateNote:T,onCreateTerminal:v,onCreateBrowser:F,onWorkspaceTabMoved:W,closeWindow:G,resolveBinding:w}){const r=e?{meta:!0}:{ctrl:!0},$=oe("TOGGLE_SIDEBAR",e),k=t=>()=>t(o()),H=t=>()=>{const i=o().match(/^\/workspace\/([^/]+)/);i?.[1]&&i[1]!=="new"&&t(i[1])},u=t=>w?{binding:()=>w(t)}:{},_=t=>w?.(t)??ce(t);a({...u("global.new-space"),...r,key:"n",global:!0,description:l.workspace_shortcuts_newSpace_description(),action:s}),a({...u("panel.toggle-sidebar"),...$,global:!0,description:y.TOGGLE_SIDEBAR.label,action:()=>n.dispatch(U())}),a({...u("navigation.new-tab"),...r,key:"t",global:!0,description:l.workspace_shortcuts_newPanel_description(),action:k(t=>_e(n,t))});for(const[t,i,b,d]of[["workspace.new-agent","a",l.ui_shortcuts_newAgent_label(),g],["workspace.new-note","n",l.layout_panelEmptyState_newItem_tooltip({label:l.layout_panelEmptyState_note_label()}),T],["workspace.new-terminal","t",l.layout_panelEmptyState_newItem_tooltip({label:l.layout_panelEmptyState_terminal_label()}),v],["workspace.new-browser","b",l.layout_panelEmptyState_newItem_tooltip({label:l.layout_panelEmptyState_browser_label()}),F]])d&&a({...u(t),...r,key:i,alt:!0,global:!0,allowInTerminal:!0,description:b,action:H(d)});a({...u("navigation.close-tab"),...r,key:"w",global:!0,description:l.workspace_shortcuts_closePanelTab_description(),action:k(t=>be(n,t,{navigate:c,closeWindow:G}))}),a({...u("navigation.close-space-tab"),...r,key:"w",shift:!0,global:!0,description:l.workspace_shortcuts_closeSpaceTab_description(),action:k(t=>re(n,t,c))}),a({...u("navigation.reopen-tab"),...r,key:"t",shift:!0,global:!0,description:l.workspace_shortcuts_reopenClosedTabOrSpace_description(),action:k(t=>ke(n,t,c))}),a({...u("navigation.move-space-tab-left"),...r,key:"ArrowLeft",alt:!0,shift:!0,global:!0,description:y.MOVE_SPACE_TAB_LEFT.label,action:()=>{const t=A(n,"left");t&&W?.({workspaceId:t,position:f.select(n.state).indexOf(t)+1})}}),a({...u("navigation.move-space-tab-right"),...r,key:"ArrowRight",alt:!0,shift:!0,global:!0,description:y.MOVE_SPACE_TAB_RIGHT.label,action:()=>{const t=A(n,"right");t&&W?.({workspaceId:t,position:f.select(n.state).indexOf(t)+1})}});for(const[t,i]of[["next",!1],["previous",!0]]){a({...u(t==="next"?"global.next-space":"global.previous-space"),key:"Tab",ctrl:!0,shift:i,global:!0,description:t==="next"?l.workspace_shortcuts_nextSpaceTab_description():l.workspace_shortcuts_previousSpaceTab_description(),action:k(d=>R(n,t,d,c))});const b=t==="next"?"global.next-space-alt":"global.previous-space-alt";a({...u(b),...r,key:t==="next"?"}":"{",shift:!0,global:!0,allowInTerminal:!0,preferLocal:!0,enabled:d=>!w||!h(b,d,w,e),description:t==="next"?l.workspace_shortcuts_nextSpaceTab_description():l.workspace_shortcuts_previousSpaceTab_description(),action:k(d=>R(n,t,d,c))})}const x=t=>{t===1?c("/"):D(n,t===9?"last":t-2,o(),c)};for(let t=1;t<=9;t++)a({...r,key:String(t),binding:()=>_("navigation.go-to-device").replace(/([1-8])-9$/,String(t)),global:!0,allowInTerminal:!0,enabled:i=>E.select(n.state)&&!h("navigation.go-to-device",i,_,e),description:l.machineRail_nav_ariaLabel(),action:()=>{const i=p?.()??le.select(n.state).map(d=>d.id),b=i[t===9?i.length-1:t-1];b&&n.dispatch(q(b))}});for(let t=1;t<=9;t++)a({...r,key:String(t),binding:()=>C["navigation.go-to-device"].replace(/([1-8])-9$/,String(t)),global:!0,allowInTerminal:!0,enabled:i=>!E.select(n.state)&&_("navigation.go-to-tab")===C["navigation.go-to-tab"]&&!h("navigation.go-to-device",i,_,e),description:l.ui_shortcuts_goToTab_label(),action:()=>x(t)});for(let t=1;t<=9;t++)a({binding:()=>_("navigation.go-to-tab").replace(/([1-8])-9$/,String(t)),...r,alt:!0,key:String(t),global:!0,allowInTerminal:!0,enabled:i=>!h("navigation.go-to-tab",i,_,e),description:t===1?l.home_navigation_description():t===9?l.workspace_shortcuts_selectLastSpaceTab_description():l.workspace_shortcuts_selectSpaceTab_description({digit:t}),action:()=>x(t)})}export{be as c,We as r};
@@ -1 +1 @@
1
- import{t as H,bo as x,bw as U,b as W}from"./2CQlphfn.js";import{bV as j,br as q,bH as A,aD as y,bs as X,ca as z,a5 as J,b_ as C,W as N,bS as K,a7 as Q,ay as Z,bA as $,bn as ee,c9 as te,at as ae,aA as _,aB as M,bI as re,aG as se}from"./3SdAC2_C.js";import{k as oe}from"./DzCaG8dx.js";import{g as D,e as L,o as ne,p as ie}from"./Bf_h69U3.js";import{n as V,g as F,S}from"./DsNGTbSH.js";import{c as T,e as O,f as P}from"./DhZiRE53.js";import{_ as G}from"./Bn7ZmTkF.js";import{c as de}from"./DjBfsgFx.js";function ce(r,a){const i=[...a].filter(t=>Number.isInteger(t)&&t>=0&&r[t]!==void 0).sort((t,o)=>t-o),u=[];for(const t of i){const o=u.at(-1);!o||t>o.endIndex+1?u.push({startIndex:t,endIndex:t}):t>o.endIndex&&(o.endIndex=t)}return u.map(({startIndex:t,endIndex:o})=>{let c=Number.POSITIVE_INFINITY,d=Number.POSITIVE_INFINITY,g=Number.NEGATIVE_INFINITY,m=Number.NEGATIVE_INFINITY;for(let l=t;l<=o;l+=1){const n=r[l];n&&(c=Math.min(c,n.top),d=Math.min(d,n.left),g=Math.max(g,n.left+n.width),m=Math.max(m,n.top+n.height))}return{startIndex:t,endIndex:o,rect:{top:c,left:d,width:g-d,height:m-c}}})}function E(r,a){return Math.max(0,Math.min(r.endIndex,a.endIndex)-Math.max(r.startIndex,a.startIndex)+1)}function le(){let r=j(q([])),a=[],i=1;return{get groups(){return y(r)},update(u,t){const o=new Set,c=ce(u,t).map(d=>{const m=a.filter(l=>!o.has(l.id)&&E(l,d)>0).sort((l,n)=>E(n,d)-E(l,d)||l.id-n.id)[0]?.id??i++;return o.add(m),{id:m,...d}});a=c,A(r,c,!0)},reset(){a=[],A(r,[],!0),i=1}}}var ue=M('<div data-proximity-highlight="selected" style="border-radius: var(--radius-row)"></div>'),me=M('<div data-proximity-highlight="hover" style="border-radius: var(--radius-row)"></div>'),pe=M('<div aria-hidden="true"><!> <!></div>');function fe(r,a){if(new.target)return H({component:fe,...r});X(a,!0);let i=x(a,"store",7),u=x(a,"selectedIndexes",23,()=>[]),t=x(a,"selectedClass",7,"bg-selected"),o=x(a,"hoverClass",7,"bg-hover"),c=x(a,"class",7);const d=le(),g=te(()=>i().activeIndex===null?void 0:i().itemRects[i().activeIndex]);z(()=>{d.update(i().itemRects,u())});const m=(e,s)=>{const p=new S(s.rect.top,s.tier),f=new S(s.rect.left,s.tier),b=new S(s.rect.width,s.tier),v=new S(s.rect.height,s.tier),I=ae(()=>{z(()=>{e.style.transform=`translate3d(${f.current}px, ${p.current}px, 0)`,e.style.width=`${b.current}px`,e.style.height=`${v.current}px`})}),w=h=>{p.set(h.rect.top),f.set(h.rect.left),b.set(h.rect.width),v.set(h.rect.height)},B=ne(()=>ie()&&w(s));return{update(h){s=h,w(h)},destroy(){B(),I()}}};var l={get store(){return i()},set store(e){i(e),_()},get selectedIndexes(){return u()},set selectedIndexes(e=[]){u(e),_()},get selectedClass(){return t()},set selectedClass(e="bg-selected"){t(e),_()},get hoverClass(){return o()},set hoverClass(e="bg-hover"){o(e),_()},get class(){return c()},set class(e){c(e),_()},$set:U,$on:(e,s)=>W(a,e,s)},n=pe(),R=J(n);D(R,17,()=>d.groups,e=>e.id,(e,s)=>{var p=ue();L(p,(f,b)=>m?.(f,b),()=>({rect:y(s).rect,tier:"moderate"})),C(f=>P(p,1,f),[()=>T(O("absolute",t()))]),V(2,p,()=>F,()=>({tier:"moderate"})),N(e,p)});var k=K(R,2);return oe(k,()=>i().sessionId,e=>{var s=Q(),p=Z(s);D(p,17,()=>y(g)?[y(g)]:[],f=>0,(f,b)=>{var v=me();L(v,(I,w)=>m?.(I,w),()=>({rect:y(b),tier:"moderate"})),C(I=>P(v,1,I),[()=>T(O("absolute",o()))]),V(2,v,()=>F,()=>({tier:"fast"})),N(f,v)}),N(e,s)}),$(n),C(e=>P(n,1,e),[()=>T(O("pointer-events-none absolute inset-0",c()))]),N(r,n),ee(l)}const Se=G({base:`${de} menu-row group/menu-item relative z-10 flex w-full min-w-0 cursor-default select-none items-start gap-2.5 border-none bg-transparent px-2.5 py-1.5 transition-colors duration-spring-fast ease-spring-fast focus:text-foreground focus-visible:outline-none data-[menu-item]:font-medium data-[disabled]:pointer-events-none data-[disabled]:opacity-50 aria-disabled:pointer-events-none aria-disabled:opacity-50 motion-reduce:transition-none`,variants:{inset:{true:"pl-8"}}}),Ce=G({base:"menu-overlay type-caption relative isolate z-(--layer-popover) overflow-hidden rounded-(--radius-medium) border border-border bg-popover shadow-(--elevation-overlay) [--menu-icon-size:calc(var(--space-3)+var(--space-1)/2)] [--radius-row:calc(var(--radius-small)-var(--space-1)/2)] focus-visible:border-input focus-visible:outline focus-visible:-outline-offset-1 data-[side=bottom]:origin-top data-[side=top]:origin-bottom data-[side=left]:origin-right data-[side=right]:origin-left data-[state=open]:animate-in data-[state=open]:fade-in-0 data-[state=open]:zoom-in-95 data-[state=open]:duration-spring-moderate data-[state=open]:ease-spring-moderate data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=closed]:duration-spring-moderate-exit data-[state=closed]:ease-spring-exit motion-reduce:animate-none motion-reduce:transition-none"}),Te="text-shortcut-foreground",Oe=-5,Pe={enter:{tier:"moderate",y:4,scale:.95},exit:{tier:"moderate"}},Y=Symbol("dialog-portal-target");function Ee(r){re(Y,r)}function Me(){const r=se(Y);return()=>r?.()??void 0}const ge=["[data-bits-floating-content-wrapper]",'[role="combobox"][aria-expanded="true"]','[aria-haspopup]:not([aria-haspopup="false"])[aria-expanded="true"]'].join(", ");function Re(r,a){return r?.querySelector(":scope > [data-bits-floating-content-wrapper]")?!0:a.target instanceof Element&&a.target.closest(ge)!==null}export{fe as P,Se as a,Ce as b,Pe as c,Oe as d,Re as e,Te as m,Ee as p,Me as u};
1
+ import{t as H,bo as x,bw as U,b as W}from"./CHWIPzMj.js";import{bV as j,br as q,bH as A,aD as y,bs as X,ca as z,a5 as J,b_ as C,W as N,bS as K,a7 as Q,ay as Z,bA as $,bn as ee,c9 as te,at as ae,aA as _,aB as M,bI as re,aG as se}from"./3SdAC2_C.js";import{k as oe}from"./DPbAP8qP.js";import{g as D,e as L,o as ne,p as ie}from"./Bqdjarag.js";import{n as V,g as F,S}from"./D_gp0b_i.js";import{c as T,e as O,f as P}from"./B09v4S72.js";import{_ as G}from"./QgUSWdkO.js";import{c as de}from"./yQuAS-d_.js";function ce(r,a){const i=[...a].filter(t=>Number.isInteger(t)&&t>=0&&r[t]!==void 0).sort((t,o)=>t-o),u=[];for(const t of i){const o=u.at(-1);!o||t>o.endIndex+1?u.push({startIndex:t,endIndex:t}):t>o.endIndex&&(o.endIndex=t)}return u.map(({startIndex:t,endIndex:o})=>{let c=Number.POSITIVE_INFINITY,d=Number.POSITIVE_INFINITY,g=Number.NEGATIVE_INFINITY,m=Number.NEGATIVE_INFINITY;for(let l=t;l<=o;l+=1){const n=r[l];n&&(c=Math.min(c,n.top),d=Math.min(d,n.left),g=Math.max(g,n.left+n.width),m=Math.max(m,n.top+n.height))}return{startIndex:t,endIndex:o,rect:{top:c,left:d,width:g-d,height:m-c}}})}function E(r,a){return Math.max(0,Math.min(r.endIndex,a.endIndex)-Math.max(r.startIndex,a.startIndex)+1)}function le(){let r=j(q([])),a=[],i=1;return{get groups(){return y(r)},update(u,t){const o=new Set,c=ce(u,t).map(d=>{const m=a.filter(l=>!o.has(l.id)&&E(l,d)>0).sort((l,n)=>E(n,d)-E(l,d)||l.id-n.id)[0]?.id??i++;return o.add(m),{id:m,...d}});a=c,A(r,c,!0)},reset(){a=[],A(r,[],!0),i=1}}}var ue=M('<div data-proximity-highlight="selected" style="border-radius: var(--radius-row)"></div>'),me=M('<div data-proximity-highlight="hover" style="border-radius: var(--radius-row)"></div>'),pe=M('<div aria-hidden="true"><!> <!></div>');function fe(r,a){if(new.target)return H({component:fe,...r});X(a,!0);let i=x(a,"store",7),u=x(a,"selectedIndexes",23,()=>[]),t=x(a,"selectedClass",7,"bg-selected"),o=x(a,"hoverClass",7,"bg-hover"),c=x(a,"class",7);const d=le(),g=te(()=>i().activeIndex===null?void 0:i().itemRects[i().activeIndex]);z(()=>{d.update(i().itemRects,u())});const m=(e,s)=>{const p=new S(s.rect.top,s.tier),f=new S(s.rect.left,s.tier),b=new S(s.rect.width,s.tier),v=new S(s.rect.height,s.tier),I=ae(()=>{z(()=>{e.style.transform=`translate3d(${f.current}px, ${p.current}px, 0)`,e.style.width=`${b.current}px`,e.style.height=`${v.current}px`})}),w=h=>{p.set(h.rect.top),f.set(h.rect.left),b.set(h.rect.width),v.set(h.rect.height)},B=ne(()=>ie()&&w(s));return{update(h){s=h,w(h)},destroy(){B(),I()}}};var l={get store(){return i()},set store(e){i(e),_()},get selectedIndexes(){return u()},set selectedIndexes(e=[]){u(e),_()},get selectedClass(){return t()},set selectedClass(e="bg-selected"){t(e),_()},get hoverClass(){return o()},set hoverClass(e="bg-hover"){o(e),_()},get class(){return c()},set class(e){c(e),_()},$set:U,$on:(e,s)=>W(a,e,s)},n=pe(),R=J(n);D(R,17,()=>d.groups,e=>e.id,(e,s)=>{var p=ue();L(p,(f,b)=>m?.(f,b),()=>({rect:y(s).rect,tier:"moderate"})),C(f=>P(p,1,f),[()=>T(O("absolute",t()))]),V(2,p,()=>F,()=>({tier:"moderate"})),N(e,p)});var k=K(R,2);return oe(k,()=>i().sessionId,e=>{var s=Q(),p=Z(s);D(p,17,()=>y(g)?[y(g)]:[],f=>0,(f,b)=>{var v=me();L(v,(I,w)=>m?.(I,w),()=>({rect:y(b),tier:"moderate"})),C(I=>P(v,1,I),[()=>T(O("absolute",o()))]),V(2,v,()=>F,()=>({tier:"fast"})),N(f,v)}),N(e,s)}),$(n),C(e=>P(n,1,e),[()=>T(O("pointer-events-none absolute inset-0",c()))]),N(r,n),ee(l)}const Se=G({base:`${de} menu-row group/menu-item relative z-10 flex w-full min-w-0 cursor-default select-none items-start gap-2.5 border-none bg-transparent px-2.5 py-1.5 transition-colors duration-spring-fast ease-spring-fast focus:text-foreground focus-visible:outline-none data-[menu-item]:font-medium data-[disabled]:pointer-events-none data-[disabled]:opacity-50 aria-disabled:pointer-events-none aria-disabled:opacity-50 motion-reduce:transition-none`,variants:{inset:{true:"pl-8"}}}),Ce=G({base:"menu-overlay type-caption relative isolate z-(--layer-popover) overflow-hidden rounded-(--radius-medium) border border-border bg-popover shadow-(--elevation-overlay) [--menu-icon-size:calc(var(--space-3)+var(--space-1)/2)] [--radius-row:calc(var(--radius-small)-var(--space-1)/2)] focus-visible:border-input focus-visible:outline focus-visible:-outline-offset-1 data-[side=bottom]:origin-top data-[side=top]:origin-bottom data-[side=left]:origin-right data-[side=right]:origin-left data-[state=open]:animate-in data-[state=open]:fade-in-0 data-[state=open]:zoom-in-95 data-[state=open]:duration-spring-moderate data-[state=open]:ease-spring-moderate data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=closed]:duration-spring-moderate-exit data-[state=closed]:ease-spring-exit motion-reduce:animate-none motion-reduce:transition-none"}),Te="text-shortcut-foreground",Oe=-5,Pe={enter:{tier:"moderate",y:4,scale:.95},exit:{tier:"moderate"}},Y=Symbol("dialog-portal-target");function Ee(r){re(Y,r)}function Me(){const r=se(Y);return()=>r?.()??void 0}const ge=["[data-bits-floating-content-wrapper]",'[role="combobox"][aria-expanded="true"]','[aria-haspopup]:not([aria-haspopup="false"])[aria-expanded="true"]'].join(", ");function Re(r,a){return r?.querySelector(":scope > [data-bits-floating-content-wrapper]")?!0:a.target instanceof Element&&a.target.closest(ge)!==null}export{fe as P,Se as a,Ce as b,Pe as c,Oe as d,Re as e,Te as m,Ee as p,Me as u};
@@ -1 +1 @@
1
- import{Jt as r,b5 as n}from"./eqIwOdFV.js";import{r as a}from"./DTPgmjai.js";import{bm as o}from"./2CQlphfn.js";const l=r.createSelector(e=>e.userPreferences.agentRulesEditor),S=r.createSelector(e=>{const t=l.select(e);return t.content.trim()!==t.originalContent.trim()}),d=r.createSelector(e=>e.userPreferences.agentFontStyle);r.createSelector(e=>{switch(e.userPreferences.agentFontStyle){case"sans":return"Sans-serif";case"monospace":return"Monospace";default:return"Sans-serif"}});const P=r.createSelector(e=>e.userPreferences.agentFontStyle==="monospace"),h=r.createSelector(e=>e.userPreferences.updateChannel),p=r.createSelector(e=>e.userPreferences.spellcheckEnabled),b=r.createSelector(e=>e.userPreferences.zoomFactor),m=r.createSelector(e=>e.userPreferences.showArchived),y=r.createSelector(e=>e.userPreferences.groupByRepo),g=r.createSelector(e=>e.userPreferences.hasCompletedProviderSetup),E=r.createSelector(e=>e.userPreferences?.showReasoningBlocks??!1),F=r.createSelector(e=>e.userPreferences?.chatAuroraEnabled??!0),k=r.createSelector(e=>e.userPreferences?.chatContentWidth??"full"),v=r.createSelector(e=>e.userPreferences?.collapseToolRuns??!0),A=r.createSelector(e=>e.userPreferences?.shellTransparencyEnabled??!0),C=r.createSelector(e=>e.userPreferences?.menuBarAutoHide??!1),R=r.createSelector(e=>e.userPreferences?.reduceMotionOnBattery??!1),L=r.createSelector(e=>e.userPreferences?.pauseAnimationsWhenUnfocused??!1),M=r.createSelector(e=>e.userPreferences?.labsSettingsVisible??!1),T=r.createSelector(e=>e.userPreferences?.labsMultiplayerEnabled??!0),w=r.createSelector(e=>e.userPreferences?.preferencesHydrated===!0),D=r.createSelector(e=>e.userPreferences?.nativeReviewEnabled===!0),B=r.createSelector(e=>e.userPreferences?.labsRemoteAgentsEnabled===!0),N=r.createSelector(e=>e.userPreferences?.labsPlainFolderWorkspacesEnabled===!0),O=r.createSelector(e=>e.userPreferences?.labsTabGroupsEnabled===!0),W=r.createSelector(e=>e.userPreferences?.labsSshMachineSetupEnabled===!0),H=r.createSelector(e=>1/e.userPreferences.zoomFactor),_=r.createSelector(e=>e.userPreferences.noteFontStyle);r.createSelector(e=>{switch(e.userPreferences.noteFontStyle){case"sans":return"Sans-serif";case"serif":return"Serif";case"monospace":return"Monospace";default:return"Sans-serif"}});const U=r.createSelector(e=>e.userPreferences.noteFontStyle==="monospace"),V=r.createSelector(e=>e.userPreferences.codeFontFamily),G=r.createSelector(e=>{const{codeFontFamily:t}=e.userPreferences;return t==="system-default"?n:`'${t}', monospace`});r.createSelector(e=>{const{codeFontFamily:t}=e.userPreferences;return t==="system-default"?o.settings_fonts_systemDefault_label():t});const I=r.createSelector(e=>{const{systemFonts:t}=e.userPreferences,c=[{value:"system-default",get label(){return o.settings_fonts_systemDefault_label()},fontFamily:n}];for(const s of t)c.push({value:s,label:s,fontFamily:`'${s}', monospace`});return c}),z=r.createSelector(e=>e.userPreferences.enabled),x=r.createSelector(e=>e.userPreferences.soundEnabled),J=r.createSelector(e=>e.userPreferences.soundOnlyWhenUnfocused),$=r.createSelector(e=>e.userPreferences.volume),j=r.createSelector(e=>({editId:e.userPreferences.pendingNotificationVolumeEditId,hydrationEpoch:e.userPreferences.notificationVolumeHydrationEpoch})),q=r.createSelector(e=>e.userPreferences.activityLogPresets),K=r.createSelector(e=>e.userPreferences.languagePreference),Q=r.createSelector(e=>e.userPreferences?.githubLinkDefaultAction??"show-choices"),Y=r.createSelector(e=>e.userPreferences.shortcutOverrides),Z=r.createSelector(e=>a(e.userPreferences.languagePreference)),X=r.createSelector(e=>e.userPreferences.dockShortcuts??null),ee=r.createSelector(e=>e.userPreferences.dockShortcutPending??!1),re=r.createSelector(e=>e.userPreferences.dockShortcutCaptureToken??null),te=r.createSelector(e=>e.userPreferences.dockShortcutError??null);export{K as A,C as B,D as C,_ as D,z as E,$ as F,j as G,L as H,R as I,Z as J,A as K,Y as L,m as M,E as N,x as O,J as P,p as Q,h as R,w as S,b as T,d as a,l as b,S as c,F as d,k as e,V as f,G as g,I as h,v as i,H as j,re as k,te as l,ee as m,X as n,Q as o,y as p,g as q,P as r,q as s,U as t,T as u,N as v,B as w,M as x,W as y,O as z};
1
+ import{Jt as r,b5 as n}from"./DJM-jC4D.js";import{r as a}from"./Bx3lRAzK.js";import{bm as o}from"./CHWIPzMj.js";const l=r.createSelector(e=>e.userPreferences.agentRulesEditor),S=r.createSelector(e=>{const t=l.select(e);return t.content.trim()!==t.originalContent.trim()}),d=r.createSelector(e=>e.userPreferences.agentFontStyle);r.createSelector(e=>{switch(e.userPreferences.agentFontStyle){case"sans":return"Sans-serif";case"monospace":return"Monospace";default:return"Sans-serif"}});const P=r.createSelector(e=>e.userPreferences.agentFontStyle==="monospace"),h=r.createSelector(e=>e.userPreferences.updateChannel),p=r.createSelector(e=>e.userPreferences.spellcheckEnabled),b=r.createSelector(e=>e.userPreferences.zoomFactor),m=r.createSelector(e=>e.userPreferences.showArchived),y=r.createSelector(e=>e.userPreferences.groupByRepo),g=r.createSelector(e=>e.userPreferences.hasCompletedProviderSetup),E=r.createSelector(e=>e.userPreferences?.showReasoningBlocks??!1),F=r.createSelector(e=>e.userPreferences?.chatAuroraEnabled??!0),k=r.createSelector(e=>e.userPreferences?.chatContentWidth??"full"),v=r.createSelector(e=>e.userPreferences?.collapseToolRuns??!0),A=r.createSelector(e=>e.userPreferences?.shellTransparencyEnabled??!0),C=r.createSelector(e=>e.userPreferences?.menuBarAutoHide??!1),R=r.createSelector(e=>e.userPreferences?.reduceMotionOnBattery??!1),L=r.createSelector(e=>e.userPreferences?.pauseAnimationsWhenUnfocused??!1),M=r.createSelector(e=>e.userPreferences?.labsSettingsVisible??!1),T=r.createSelector(e=>e.userPreferences?.labsMultiplayerEnabled??!0),w=r.createSelector(e=>e.userPreferences?.preferencesHydrated===!0),D=r.createSelector(e=>e.userPreferences?.nativeReviewEnabled===!0),B=r.createSelector(e=>e.userPreferences?.labsRemoteAgentsEnabled===!0),N=r.createSelector(e=>e.userPreferences?.labsPlainFolderWorkspacesEnabled===!0),O=r.createSelector(e=>e.userPreferences?.labsTabGroupsEnabled===!0),W=r.createSelector(e=>e.userPreferences?.labsSshMachineSetupEnabled===!0),H=r.createSelector(e=>1/e.userPreferences.zoomFactor),_=r.createSelector(e=>e.userPreferences.noteFontStyle);r.createSelector(e=>{switch(e.userPreferences.noteFontStyle){case"sans":return"Sans-serif";case"serif":return"Serif";case"monospace":return"Monospace";default:return"Sans-serif"}});const U=r.createSelector(e=>e.userPreferences.noteFontStyle==="monospace"),V=r.createSelector(e=>e.userPreferences.codeFontFamily),G=r.createSelector(e=>{const{codeFontFamily:t}=e.userPreferences;return t==="system-default"?n:`'${t}', monospace`});r.createSelector(e=>{const{codeFontFamily:t}=e.userPreferences;return t==="system-default"?o.settings_fonts_systemDefault_label():t});const I=r.createSelector(e=>{const{systemFonts:t}=e.userPreferences,c=[{value:"system-default",get label(){return o.settings_fonts_systemDefault_label()},fontFamily:n}];for(const s of t)c.push({value:s,label:s,fontFamily:`'${s}', monospace`});return c}),z=r.createSelector(e=>e.userPreferences.enabled),x=r.createSelector(e=>e.userPreferences.soundEnabled),J=r.createSelector(e=>e.userPreferences.soundOnlyWhenUnfocused),$=r.createSelector(e=>e.userPreferences.volume),j=r.createSelector(e=>({editId:e.userPreferences.pendingNotificationVolumeEditId,hydrationEpoch:e.userPreferences.notificationVolumeHydrationEpoch})),q=r.createSelector(e=>e.userPreferences.activityLogPresets),K=r.createSelector(e=>e.userPreferences.languagePreference),Q=r.createSelector(e=>e.userPreferences?.githubLinkDefaultAction??"show-choices"),Y=r.createSelector(e=>e.userPreferences.shortcutOverrides),Z=r.createSelector(e=>a(e.userPreferences.languagePreference)),X=r.createSelector(e=>e.userPreferences.dockShortcuts??null),ee=r.createSelector(e=>e.userPreferences.dockShortcutPending??!1),re=r.createSelector(e=>e.userPreferences.dockShortcutCaptureToken??null),te=r.createSelector(e=>e.userPreferences.dockShortcutError??null);export{K as A,C as B,D as C,_ as D,z as E,$ as F,j as G,L as H,R as I,Z as J,A as K,Y as L,m as M,E as N,x as O,J as P,p as Q,h as R,w as S,b as T,d as a,l as b,S as c,F as d,k as e,V as f,G as g,I as h,v as i,H as j,re as k,te as l,ee as m,X as n,Q as o,y as p,g as q,P as r,q as s,U as t,T as u,N as v,B as w,M as x,W as y,O as z};
@@ -1 +1 @@
1
- import{t as g,bo as n,br as v,bw as b,bp as h,b as x}from"./2CQlphfn.js";import{bs as w,a7 as S,ay as y,aD as _,W as k,bn as z,aA as i,c9 as C}from"./3SdAC2_C.js";import{c as A}from"./CON-zxWG.js";import{e as I,p as M}from"./DhZiRE53.js";import{S as P}from"./bWHoQAZ0.js";var W=new Set(["$$slots","$$events","$$legacy","ref","class","data-slot"]);function D(l,t){if(new.target)return g({component:D,...l});w(t,!0);let a=n(t,"ref",15,null),r=n(t,"class",7),s=n(t,"data-slot",7,"separator"),c=h(t,W);var m={get ref(){return a()},set ref(e=null){a(e),i()},get class(){return r()},set class(e){r(e),i()},get"data-slot"(){return s()},set"data-slot"(e="separator"){s(e),i()},$set:b,$on:(e,o)=>x(t,e,o)},p=S(),d=y(p);{let e=C(()=>I("shrink-0 bg-border data-[orientation=horizontal]:h-px data-[orientation=horizontal]:w-full data-[orientation=vertical]:h-full data-[orientation=vertical]:w-px",r()));A(d,()=>P,(o,u)=>{u(o,v({get"data-slot"(){return s()},get class(){return _(e)}},()=>c,{get ref(){return a()},set ref(f){a(f)}}))})}return k(l,p),z(m)}const F=[{id:"separator-state-matrix",title:"Separator states",states:["horizontal","vertical","decorative","semantic","compact","zoom-200","light","dark"],themes:["light","dark","high-contrast"],viewport:"both"}];M({id:"separator",source:"src/lib/components/ui/separator/separator.svelte",publicImport:"$lib/components/ui/separator",legacyImports:["$lib/components/ui/separator/index.js"],exports:["Root","Separator","separatorMetadata"],category:"primitive",owner:"design-system",callers:["src/features/discussions/components/DiscussionMentionPicker.svelte","src/features/home/HomeAssistantThreads.svelte","src/features/workspace-sharing/components/WorkspaceSharingSetup.svelte","src/lib/component-catalog/renderers/ContentFieldCatalogPreview.svelte","src/lib/components/file-explorer/file-explorer-layout.svelte","src/lib/components/ui/sidebar/sidebar-separator.svelte","src/lib/components/workspace/WorkspaceAgentsList.svelte"],replacement:null,characterizationTest:"src/lib/components/ui/separator/separator.test.ts",removalGate:"Retain while exported and orientation, semantic, and fixture tests pass.",dynamicImports:[],fixtures:F});export{D as S};
1
+ import{t as g,bo as n,br as v,bw as b,bp as h,b as x}from"./CHWIPzMj.js";import{bs as w,a7 as S,ay as y,aD as _,W as k,bn as z,aA as i,c9 as C}from"./3SdAC2_C.js";import{c as A}from"./C_VUI8Os.js";import{e as I,p as M}from"./B09v4S72.js";import{S as P}from"./B0xk6zYz.js";var W=new Set(["$$slots","$$events","$$legacy","ref","class","data-slot"]);function D(l,t){if(new.target)return g({component:D,...l});w(t,!0);let a=n(t,"ref",15,null),r=n(t,"class",7),s=n(t,"data-slot",7,"separator"),c=h(t,W);var m={get ref(){return a()},set ref(e=null){a(e),i()},get class(){return r()},set class(e){r(e),i()},get"data-slot"(){return s()},set"data-slot"(e="separator"){s(e),i()},$set:b,$on:(e,o)=>x(t,e,o)},p=S(),d=y(p);{let e=C(()=>I("shrink-0 bg-border data-[orientation=horizontal]:h-px data-[orientation=horizontal]:w-full data-[orientation=vertical]:h-full data-[orientation=vertical]:w-px",r()));A(d,()=>P,(o,u)=>{u(o,v({get"data-slot"(){return s()},get class(){return _(e)}},()=>c,{get ref(){return a()},set ref(f){a(f)}}))})}return k(l,p),z(m)}const F=[{id:"separator-state-matrix",title:"Separator states",states:["horizontal","vertical","decorative","semantic","compact","zoom-200","light","dark"],themes:["light","dark","high-contrast"],viewport:"both"}];M({id:"separator",source:"src/lib/components/ui/separator/separator.svelte",publicImport:"$lib/components/ui/separator",legacyImports:["$lib/components/ui/separator/index.js"],exports:["Root","Separator","separatorMetadata"],category:"primitive",owner:"design-system",callers:["src/features/discussions/components/DiscussionMentionPicker.svelte","src/features/home/HomeAssistantThreads.svelte","src/features/workspace-sharing/components/WorkspaceSharingSetup.svelte","src/lib/component-catalog/renderers/ContentFieldCatalogPreview.svelte","src/lib/components/file-explorer/file-explorer-layout.svelte","src/lib/components/ui/sidebar/sidebar-separator.svelte","src/lib/components/workspace/WorkspaceAgentsList.svelte"],replacement:null,characterizationTest:"src/lib/components/ui/separator/separator.test.ts",removalGate:"Retain while exported and orientation, semantic, and fixture tests pass.",dynamicImports:[],fixtures:F});export{D as S};
@@ -1 +1 @@
1
- import{t as bt,bo as x,bw as Rt,bq as wt,b as Pt,bs as g}from"./2CQlphfn.js";import{bs as It,ca as P,aD as t,c9 as s,bn as kt,bH as N,bV as E,aA as F}from"./3SdAC2_C.js";import{b as vt}from"./Dn334wJv.js";import{Jt as l,eJ as Ut,eK as At,t4 as Bt,on as xt,oo as Ft,K1 as Tt,Kg as _t,K6 as Dt,os as T}from"./eqIwOdFV.js";import{t as Lt}from"./C-BsEdGZ.js";import{g as Wt}from"./DWGXN6Nr.js";import{dG as Gt,bN as Mt,bP as Nt,bM as Et,bR as Vt,dc as Ht,m as Kt}from"./TE5M669U.js";import{C as zt}from"./BupGSW0e.js";import{V as qt}from"./Dm98AfRw.js";import{bT as Jt,bN as jt,b8 as Ot}from"./DWx-rRFl.js";import{i as _,n as V}from"./H2jLkRRS.js";import{af as Qt}from"./BO7alE7_.js";function Xt(D,$){if(new.target)return bt({component:Xt,...D});It($,!0);const H=()=>g(at,"$gitRoots$",c),y=()=>g(ot,"$workspace",c),K=()=>g(nt,"$ftCommits$",c),z=()=>g(lt,"$rootGitRoots$",c),S=()=>g(st,"$ftChanges$",c),q=()=>g(tt,"$foldUnchanged",c),J=()=>g(Z,"$lineWrapping",c),j=()=>g(et,"$diffSideBySide",c),O=()=>g(rt,"$ftLoading$",c),Q=()=>g(it,"$ftBoundarySha$",c),[c,X]=wt(),Y=o=>{qt(o,{embedded:!0,showExpand:!0,get expanded(){return t(R)},onToggleExpand:()=>{N(R,!t(R)),t(R)?t(w)?.expandAll():t(w)?.collapseAll()},get foldEnabled(){return q()},onToggleFold:()=>l.dispatch(Dt()),get wrapEnabled(){return J()},onToggleWrap:()=>l.dispatch(_t()),get splitEnabled(){return j()},onToggleSplit:()=>l.dispatch(Tt())})},Z=Jt(),tt=jt(),et=Ot();let I=x($,"tab",7),m=x($,"workspaceId",7),C=x($,"isActive",7);const L=Wt(),p=Lt(()=>m()),ot=Gt(p);P(()=>{const o=m();if(!(!C()||!o||t(n)))return l.dispatch(Ut(o,"all")),()=>l.dispatch(At(o,"all"))});const n=s(()=>I().data?.gitRootId||""),at=Qt(p),b=s(()=>H().find(o=>o.id===t(n))),h=s(()=>y()?.worktreePath||y()?.repositoryPath||""),k=s(()=>t(b)?.path||t(h)),st=Mt(p),nt=Nt(p),it=Et(p),rt=Vt(p),dt=s(()=>K()||[]),lt=Ht(p),f=s(()=>z()[t(n)]??Kt),ct=s(()=>t(f).status),gt=s(()=>t(f).loading),mt=s(()=>t(f).commitFiles),ut=s(()=>{const o=t(b)?.registeredCommitSha,i=o?t(f).commits.findIndex(e=>e.hash===o):-1;return i>=0?t(f).commits.slice(0,i):t(f).commits});P(()=>{const o=m(),i=t(n);o&&i&&l.dispatch(Bt(o,i,t(b)?.registeredCommitSha,100))});let R=E(!0),w=E(null);const pt=s(()=>{if(t(n))return[...(t(ct)?.files??[]).map(e=>({filePath:`${t(k)}/${e.path}`,action:"modify",additions:e.additions??0,deletions:e.deletions??0,toolName:"local",toolCallId:`root-${t(n)}-${e.staged}-${e.path}`,staged:e.staged,category:e.staged?"staged":"unstaged"})),...t(ut).flatMap(e=>(t(mt)[e.hash]??[]).map(a=>({filePath:`${t(k)}/${a.path}`,action:"modify",additions:a.additions??0,deletions:a.deletions??0,toolName:"local",toolCallId:`root-commit-${e.hash}-${a.path}`,staged:!1,category:"committed",commitHash:e.hash,commitMessage:e.message})))];const o=S().filter(e=>e.stage==="unstaged"),i=S().filter(e=>e.stage==="staged");return[...o.map(e=>{const a=e.file||e.relativePath,r=a&&_(a)?a:`${t(h)}/${a}`;return{filePath:r,action:"modify",additions:e.stats?.additions||0,deletions:e.stats?.deletions||0,toolName:"local",toolCallId:`local-unstaged-${r}`,staged:!1,category:"unstaged",oldContent:e.content?.oldContent,newContent:e.content?.newContent,gitlink:e.gitlink}}),...i.map(e=>{const a=e.file||e.relativePath,r=a&&_(a)?a:`${t(h)}/${a}`;return{filePath:r,action:"modify",additions:e.stats?.additions||0,deletions:e.stats?.deletions||0,toolName:"local",toolCallId:`local-staged-${r}`,staged:!0,category:"staged",oldContent:e.content?.oldContent,newContent:e.content?.newContent,gitlink:e.gitlink}}),...t(dt).flatMap(e=>(e.files||[]).map(a=>{const r=typeof a=="string"?a:a.path||"",U=r&&_(r)?r:`${t(h)}/${r}`,A=typeof a=="string"?0:a.additions||0,B=typeof a=="string"?0:a.deletions||0;return{filePath:U,action:"modify",additions:A,deletions:B,toolName:"local",toolCallId:`commit-${e.hash}-${r}`,staged:!1,category:"committed",commitHash:e.hash,commitMessage:e.message}}))]});function v(o){if(!t(h))return o;const i=V(o),e=V(t(h));return i.startsWith(`${e}/`)?i.slice(e.length+1):o}function W(o){l.dispatch(T(m(),crypto.randomUUID(),{kind:"stage",paths:o.map(v),source:"localChanges"}))}function G(o){l.dispatch(T(m(),crypto.randomUUID(),{kind:"unstage",paths:o.map(v),source:"localChanges"}))}function ht(o){l.dispatch(T(m(),crypto.randomUUID(),{kind:"discard",paths:o.map(v),source:"localChanges"}))}P(()=>{!L||!C()||L.registerActions({display:Y})});const M=crypto.randomUUID();P(()=>{const o=m();if(!(!(C()&&t(n))||!o))return l.dispatch(xt(o,M)),()=>l.dispatch(Ft(o,M))});var ft={get tab(){return I()},set tab(o){I(o),F()},get workspaceId(){return m()},set workspaceId(o){m(o),F()},get isActive(){return C()},set isActive(o){C(o),F()},$set:Rt,$on:(o,i)=>Pt($,o,i)};{let o=s(()=>t(n)?t(gt):O()),i=s(()=>t(n)||void 0),e=s(()=>t(n)?t(k):void 0),a=s(()=>y()?.baseRef??null),r=s(()=>t(n)?t(b)?.registeredCommitSha||null:Q()||y()?.baseCommitSha||null),U=s(()=>!t(n)),A=s(()=>t(n)?void 0:d=>void W([d])),B=s(()=>t(n)?void 0:d=>void G([d])),Ct=s(()=>t(n)?void 0:d=>void ht([d])),yt=s(()=>t(n)?void 0:()=>{const d=S().filter(u=>u.stage==="unstaged");W(d.map(u=>u.relativePath||u.file))}),St=s(()=>t(n)?void 0:()=>{const d=S().filter(u=>u.stage==="staged");G(d.map(u=>u.relativePath||u.file))});vt(zt(D,{get isLoading(){return t(o)},get changes(){return t(pt)},get gitRootId(){return t(i)},get gitRootPath(){return t(e)},get branchBaseRef(){return t(a)},get branchBaseCommitSha(){return t(r)},get showStagingControls(){return t(U)},showCategoryFilter:!0,get onStage(){return t(A)},get onUnstage(){return t(B)},get onRevert(){return t(Ct)},get onStageAll(){return t(yt)},get onUnstageAll(){return t(St)}}),d=>N(w,d,!0),()=>t(w))}var $t=kt(ft);return X(),$t}export{Xt as default};
1
+ import{t as bt,bo as x,bw as Rt,bq as wt,b as Pt,bs as g}from"./CHWIPzMj.js";import{bs as It,ca as P,aD as t,c9 as s,bn as kt,bH as N,bV as E,aA as F}from"./3SdAC2_C.js";import{b as vt}from"./Dn334wJv.js";import{Jt as l,eJ as Ut,eK as At,t4 as Bt,on as xt,oo as Ft,K1 as Tt,Kg as _t,K6 as Dt,os as T}from"./DJM-jC4D.js";import{t as Lt}from"./C-BsEdGZ.js";import{g as Wt}from"./DWGXN6Nr.js";import{dG as Gt,bN as Mt,bP as Nt,bM as Et,bR as Vt,dc as Ht,m as Kt}from"./CB6JpnWC.js";import{C as zt}from"./BVGm2-7m.js";import{V as qt}from"./wwOYCksJ.js";import{bT as Jt,bN as jt,b8 as Ot}from"./C99ttMY5.js";import{i as _,n as V}from"./H2jLkRRS.js";import{af as Qt}from"./g4xg1V0H.js";function Xt(D,$){if(new.target)return bt({component:Xt,...D});It($,!0);const H=()=>g(at,"$gitRoots$",c),y=()=>g(ot,"$workspace",c),K=()=>g(nt,"$ftCommits$",c),z=()=>g(lt,"$rootGitRoots$",c),S=()=>g(st,"$ftChanges$",c),q=()=>g(tt,"$foldUnchanged",c),J=()=>g(Z,"$lineWrapping",c),j=()=>g(et,"$diffSideBySide",c),O=()=>g(rt,"$ftLoading$",c),Q=()=>g(it,"$ftBoundarySha$",c),[c,X]=wt(),Y=o=>{qt(o,{embedded:!0,showExpand:!0,get expanded(){return t(R)},onToggleExpand:()=>{N(R,!t(R)),t(R)?t(w)?.expandAll():t(w)?.collapseAll()},get foldEnabled(){return q()},onToggleFold:()=>l.dispatch(Dt()),get wrapEnabled(){return J()},onToggleWrap:()=>l.dispatch(_t()),get splitEnabled(){return j()},onToggleSplit:()=>l.dispatch(Tt())})},Z=Jt(),tt=jt(),et=Ot();let I=x($,"tab",7),m=x($,"workspaceId",7),C=x($,"isActive",7);const L=Wt(),p=Lt(()=>m()),ot=Gt(p);P(()=>{const o=m();if(!(!C()||!o||t(n)))return l.dispatch(Ut(o,"all")),()=>l.dispatch(At(o,"all"))});const n=s(()=>I().data?.gitRootId||""),at=Qt(p),b=s(()=>H().find(o=>o.id===t(n))),h=s(()=>y()?.worktreePath||y()?.repositoryPath||""),k=s(()=>t(b)?.path||t(h)),st=Mt(p),nt=Nt(p),it=Et(p),rt=Vt(p),dt=s(()=>K()||[]),lt=Ht(p),f=s(()=>z()[t(n)]??Kt),ct=s(()=>t(f).status),gt=s(()=>t(f).loading),mt=s(()=>t(f).commitFiles),ut=s(()=>{const o=t(b)?.registeredCommitSha,i=o?t(f).commits.findIndex(e=>e.hash===o):-1;return i>=0?t(f).commits.slice(0,i):t(f).commits});P(()=>{const o=m(),i=t(n);o&&i&&l.dispatch(Bt(o,i,t(b)?.registeredCommitSha,100))});let R=E(!0),w=E(null);const pt=s(()=>{if(t(n))return[...(t(ct)?.files??[]).map(e=>({filePath:`${t(k)}/${e.path}`,action:"modify",additions:e.additions??0,deletions:e.deletions??0,toolName:"local",toolCallId:`root-${t(n)}-${e.staged}-${e.path}`,staged:e.staged,category:e.staged?"staged":"unstaged"})),...t(ut).flatMap(e=>(t(mt)[e.hash]??[]).map(a=>({filePath:`${t(k)}/${a.path}`,action:"modify",additions:a.additions??0,deletions:a.deletions??0,toolName:"local",toolCallId:`root-commit-${e.hash}-${a.path}`,staged:!1,category:"committed",commitHash:e.hash,commitMessage:e.message})))];const o=S().filter(e=>e.stage==="unstaged"),i=S().filter(e=>e.stage==="staged");return[...o.map(e=>{const a=e.file||e.relativePath,r=a&&_(a)?a:`${t(h)}/${a}`;return{filePath:r,action:"modify",additions:e.stats?.additions||0,deletions:e.stats?.deletions||0,toolName:"local",toolCallId:`local-unstaged-${r}`,staged:!1,category:"unstaged",oldContent:e.content?.oldContent,newContent:e.content?.newContent,gitlink:e.gitlink}}),...i.map(e=>{const a=e.file||e.relativePath,r=a&&_(a)?a:`${t(h)}/${a}`;return{filePath:r,action:"modify",additions:e.stats?.additions||0,deletions:e.stats?.deletions||0,toolName:"local",toolCallId:`local-staged-${r}`,staged:!0,category:"staged",oldContent:e.content?.oldContent,newContent:e.content?.newContent,gitlink:e.gitlink}}),...t(dt).flatMap(e=>(e.files||[]).map(a=>{const r=typeof a=="string"?a:a.path||"",U=r&&_(r)?r:`${t(h)}/${r}`,A=typeof a=="string"?0:a.additions||0,B=typeof a=="string"?0:a.deletions||0;return{filePath:U,action:"modify",additions:A,deletions:B,toolName:"local",toolCallId:`commit-${e.hash}-${r}`,staged:!1,category:"committed",commitHash:e.hash,commitMessage:e.message}}))]});function v(o){if(!t(h))return o;const i=V(o),e=V(t(h));return i.startsWith(`${e}/`)?i.slice(e.length+1):o}function W(o){l.dispatch(T(m(),crypto.randomUUID(),{kind:"stage",paths:o.map(v),source:"localChanges"}))}function G(o){l.dispatch(T(m(),crypto.randomUUID(),{kind:"unstage",paths:o.map(v),source:"localChanges"}))}function ht(o){l.dispatch(T(m(),crypto.randomUUID(),{kind:"discard",paths:o.map(v),source:"localChanges"}))}P(()=>{!L||!C()||L.registerActions({display:Y})});const M=crypto.randomUUID();P(()=>{const o=m();if(!(!(C()&&t(n))||!o))return l.dispatch(xt(o,M)),()=>l.dispatch(Ft(o,M))});var ft={get tab(){return I()},set tab(o){I(o),F()},get workspaceId(){return m()},set workspaceId(o){m(o),F()},get isActive(){return C()},set isActive(o){C(o),F()},$set:Rt,$on:(o,i)=>Pt($,o,i)};{let o=s(()=>t(n)?t(gt):O()),i=s(()=>t(n)||void 0),e=s(()=>t(n)?t(k):void 0),a=s(()=>y()?.baseRef??null),r=s(()=>t(n)?t(b)?.registeredCommitSha||null:Q()||y()?.baseCommitSha||null),U=s(()=>!t(n)),A=s(()=>t(n)?void 0:d=>void W([d])),B=s(()=>t(n)?void 0:d=>void G([d])),Ct=s(()=>t(n)?void 0:d=>void ht([d])),yt=s(()=>t(n)?void 0:()=>{const d=S().filter(u=>u.stage==="unstaged");W(d.map(u=>u.relativePath||u.file))}),St=s(()=>t(n)?void 0:()=>{const d=S().filter(u=>u.stage==="staged");G(d.map(u=>u.relativePath||u.file))});vt(zt(D,{get isLoading(){return t(o)},get changes(){return t(pt)},get gitRootId(){return t(i)},get gitRootPath(){return t(e)},get branchBaseRef(){return t(a)},get branchBaseCommitSha(){return t(r)},get showStagingControls(){return t(U)},showCategoryFilter:!0,get onStage(){return t(A)},get onUnstage(){return t(B)},get onRevert(){return t(Ct)},get onStageAll(){return t(yt)},get onUnstageAll(){return t(St)}}),d=>N(w,d,!0),()=>t(w))}var $t=kt(ft);return X(),$t}export{Xt as default};
@@ -1 +1 @@
1
- import{b as a,aW as o}from"./Di1597mK.js";var g=a((t,e)=>{let n;return e==="sandbox"&&(n=o("#i"+t)),(e==="sandbox"?o(n.nodes()[0].contentDocument.body):o("body")).select(`[id="${t}"]`)},"getDiagramElement");export{g};
1
+ import{b as a,aW as o}from"./C6w4HIHS.js";var g=a((t,e)=>{let n;return e==="sandbox"&&(n=o("#i"+t)),(e==="sandbox"?o(n.nodes()[0].contentDocument.body):o("body")).select(`[id="${t}"]`)},"getDiagramElement");export{g};
@@ -1 +1 @@
1
- import{t as B,bo as f,bw as T,bq as W,b as j,bm as q,bs as z}from"./2CQlphfn.js";import{bs as D,cd as G,ca as L,a7 as O,ay as E,W as d,bn as F,aA as h,aD as t,c9 as r,a5 as H,bl as J,bA as K,b_ as M,bO as N,aB as Q}from"./3SdAC2_C.js";import{i as R}from"./ByjFf28U.js";import{C as U}from"./BupGSW0e.js";import{dG as V}from"./TE5M669U.js";import{i as X}from"./H2jLkRRS.js";var Y=Q('<div class="flex flex-col items-center justify-center h-full text-subtle gap-4"><p class="text-sm"> </p></div>');function Z(c,o){if(new.target)return B({component:Z,...c});D(o,!0);const l=()=>z(b,"$workspace",m),[m,u]=W();let s=f(o,"tab",7),n=f(o,"workspaceId",7);const i=G(n());L(()=>{i.set(n())});const b=V(i),_=r(()=>l()?.worktreePath||l()?.repositoryPath||""),g=r(()=>s().data?.changes||[]),v=r(()=>s().data?.isAggregate||!1),w=r(()=>s().data?.agentId),k=r(()=>t(g).map(e=>{const a=e.filePath&&X(e.filePath)?e.filePath:`${t(_)}/${e.filePath}`;return{...e,filePath:a}}));var C={get tab(){return s()},set tab(e){s(e),h()},get workspaceId(){return n()},set workspaceId(e){n(e),h()},$set:T,$on:(e,a)=>j(o,e,a)},p=O(),y=E(p);{var P=e=>{U(e,{isLoading:!1,get changes(){return t(k)},get isAggregate(){return t(v)},get agentId(){return t(w)},showStagingControls:!0})},I=e=>{var a=Y(),A=H(a),$=J(A,!0);K(a),M(S=>N($,S),[()=>q.layout_chatChanges_noChanges_label()]),d(e,a)};R(y,e=>{t(g).length>0?e(P):e(I,-1)})}d(c,p);var x=F(C);return u(),x}export{Z as default};
1
+ import{t as B,bo as f,bw as T,bq as W,b as j,bm as q,bs as z}from"./CHWIPzMj.js";import{bs as D,cd as G,ca as L,a7 as O,ay as E,W as d,bn as F,aA as h,aD as t,c9 as r,a5 as H,bl as J,bA as K,b_ as M,bO as N,aB as Q}from"./3SdAC2_C.js";import{i as R}from"./DDtBtnNz.js";import{C as U}from"./BVGm2-7m.js";import{dG as V}from"./CB6JpnWC.js";import{i as X}from"./H2jLkRRS.js";var Y=Q('<div class="flex flex-col items-center justify-center h-full text-subtle gap-4"><p class="text-sm"> </p></div>');function Z(c,o){if(new.target)return B({component:Z,...c});D(o,!0);const l=()=>z(b,"$workspace",m),[m,u]=W();let s=f(o,"tab",7),n=f(o,"workspaceId",7);const i=G(n());L(()=>{i.set(n())});const b=V(i),_=r(()=>l()?.worktreePath||l()?.repositoryPath||""),g=r(()=>s().data?.changes||[]),v=r(()=>s().data?.isAggregate||!1),w=r(()=>s().data?.agentId),k=r(()=>t(g).map(e=>{const a=e.filePath&&X(e.filePath)?e.filePath:`${t(_)}/${e.filePath}`;return{...e,filePath:a}}));var C={get tab(){return s()},set tab(e){s(e),h()},get workspaceId(){return n()},set workspaceId(e){n(e),h()},$set:T,$on:(e,a)=>j(o,e,a)},p=O(),y=E(p);{var P=e=>{U(e,{isLoading:!1,get changes(){return t(k)},get isAggregate(){return t(v)},get agentId(){return t(w)},showStagingControls:!0})},I=e=>{var a=Y(),A=H(a),$=J(A,!0);K(a),M(S=>N($,S),[()=>q.layout_chatChanges_noChanges_label()]),d(e,a)};R(y,e=>{t(g).length>0?e(P):e(I,-1)})}d(c,p);var x=F(C);return u(),x}export{Z as default};
@@ -1 +1 @@
1
- import{t as Y,bo as a,bw as J,b as X,bp as _e,br as fe,bm as me}from"./2CQlphfn.js";import{bs as Z,bH as le,aD as d,ay as T,a7 as F,bf as re,W as b,bS as de,bn as $,bV as se,aA as n,c9 as y,aB as M,bo as we,a5 as j,bA as Q,bI as Ae,aG as ve,c5 as De,ca as ce,bl as qe,b_ as Ee,bO as Fe,c0 as Le}from"./3SdAC2_C.js";import{s as H}from"./DTPgmjai.js";import{c as G}from"./CON-zxWG.js";import{s as Re,i as Ue,f as We}from"./DjBfsgFx.js";import{i as te}from"./ByjFf28U.js";import{g as Be,e as pe}from"./Bf_h69U3.js";import{aS as ee,a$ as Me,av as B,H as Ne,az as he,aQ as ze,f as Ge,a1 as He}from"./BvR4li8f.js";import{c as Ke,g as ge,d as je,f as Qe,e as Ye,i as Je,h as Xe}from"./D1DuB8m6.js";import{F as Ze,aw as $e}from"./B16ZhAkF.js";import{b as oe,e as ie,f as et}from"./DhZiRE53.js";import"./Bn7ZmTkF.js";import{F as tt,O as rt,a as at,M as nt}from"./DsALDj-G.js";import{u as ot,b as be,a as lt}from"./DNxs15P5.js";import{c as st,u as it,s as dt}from"./D9tVylVS.js";import"./h37VgGKw.js";var ut=M("<!> <!>",1);function xe(S,e){if(new.target)return Y({component:xe,...S});Z(e,!0);let m=a(e,"value",15),p=a(e,"onValueChange",7,ee),_=a(e,"name",7,""),c=a(e,"disabled",7,!1),g=a(e,"type",7),v=a(e,"open",15,!1),w=a(e,"onOpenChange",7,ee),C=a(e,"onOpenChangeComplete",7,ee),s=a(e,"loop",7,!1),f=a(e,"scrollAlignment",7,"nearest"),O=a(e,"required",7,!1),L=a(e,"items",23,()=>[]),i=a(e,"allowDeselect",7,!1),x=a(e,"autocomplete",7),k=a(e,"children",7);function W(){m()===void 0&&m(g()==="single"?"":[])}W(),Me.pre(()=>m(),()=>{W()});let A=se("");const R=Ke.create({type:g(),value:B(()=>m(),t=>{m(t),p()(t)}),disabled:B(()=>c()),required:B(()=>O()),open:B(()=>v(),t=>{v(t),w()(t)}),loop:B(()=>s()),scrollAlignment:B(()=>f()),name:B(()=>_()),isCombobox:!1,items:B(()=>L()),allowDeselect:B(()=>i()),inputValue:B(()=>d(A),t=>le(A,t,!0)),onOpenChangeComplete:B(()=>C())});var o={get value(){return m()},set value(t){m(t),n()},get onValueChange(){return p()},set onValueChange(t=ee){p(t),n()},get name(){return _()},set name(t=""){_(t),n()},get disabled(){return c()},set disabled(t=!1){c(t),n()},get type(){return g()},set type(t){g(t),n()},get open(){return v()},set open(t=!1){v(t),n()},get onOpenChange(){return w()},set onOpenChange(t=ee){w(t),n()},get onOpenChangeComplete(){return C()},set onOpenChangeComplete(t=ee){C(t),n()},get loop(){return s()},set loop(t=!1){s(t),n()},get scrollAlignment(){return f()},set scrollAlignment(t="nearest"){f(t),n()},get required(){return O()},set required(t=!1){O(t),n()},get items(){return L()},set items(t=[]){L(t),n()},get allowDeselect(){return i()},set allowDeselect(t=!1){i(t),n()},get autocomplete(){return x()},set autocomplete(t){x(t),n()},get children(){return k()},set children(t){k(t),n()},$set:J,$on:(t,h)=>X(e,t,h)},U=ut(),V=T(U);Ne(V,{children:(t,h)=>{var P=F(),E=T(P);H(E,()=>k()??re),b(t,P)},$$slots:{default:!0}});var l=de(V,2);{var r=t=>{var h=F(),P=T(h);{var E=D=>{ge(D,{get autocomplete(){return x()}})},q=D=>{var N=F(),K=T(N);Be(K,16,()=>R.opts.value.current,z=>z,(z,ae)=>{ge(z,{get value(){return ae},get autocomplete(){return x()}})}),b(D,N)};te(P,D=>{R.opts.value.current.length===0?D(E):D(q,-1)})}b(t,h)},u=y(()=>Array.isArray(R.opts.value.current)),I=t=>{ge(t,{get autocomplete(){return x()},get value(){return R.opts.value.current},set value(h){R.opts.value.current=h}})};te(l,t=>{d(u)?t(r):t(I,-1)})}return b(S,U),$(o)}var ct=new Set(["$$slots","$$events","$$legacy","id","ref","child","children","type"]),gt=M("<button><!></button>");function ye(S,e){const m=we();if(new.target)return Y({component:ye,...S});Z(e,!0);let p=a(e,"id",23,()=>he(m)),_=a(e,"ref",15,null),c=a(e,"child",7),g=a(e,"children",7),v=a(e,"type",7,"button"),w=_e(e,ct);const C=je.create({id:B(()=>p()),ref:B(()=>_(),i=>_(i))}),s=y(()=>ze(w,C.props,{type:v()}));var f={get id(){return p()},set id(i=he(m)){p(i),n()},get ref(){return _()},set ref(i=null){_(i),n()},get child(){return c()},set child(i){c(i),n()},get children(){return g()},set children(i){g(i),n()},get type(){return v()},set type(i="button"){v(i),n()},$set:J,$on:(i,x)=>X(e,i,x)},O=F(),L=T(O);return G(L,()=>tt,(i,x)=>{x(i,{get id(){return p()},get ref(){return C.opts.ref},children:(k,W)=>{var A=F(),R=T(A);{var o=V=>{var l=F(),r=T(l);H(r,c,()=>({props:d(s)})),b(V,l)},U=V=>{var l=gt();oe(l,()=>({...d(s)}));var r=j(l);H(r,()=>g()??re),Q(l),b(V,l)};te(R,V=>{c()?V(o):V(U,-1)})}b(k,A)},$$slots:{default:!0}})}),b(S,O),$(f)}var vt=M('<div data-slot="select-root" class="relative min-w-0 w-full"><!></div>');function Ce(S,e){const m=we();if(new.target)return Y({component:Ce,...S});Z(e,!0);const p=`${m}-trigger`;let _=se(p),c=a(e,"value",15,""),g=a(e,"open",15,!1),v=a(e,"items",23,()=>[]),w=a(e,"disabled",7,!1),C=a(e,"invalid",7,!1),s=a(e,"required",7,!1),f=a(e,"name",7),O=a(e,"loop",7,!0),L=a(e,"onchange",7),i=a(e,"onopenchange",7),x=a(e,"children",7),k=a(e,"staticPosition",7,!1);Re(()=>{g(!1),i()?.(!1)}),Ae("canonical-select",{get triggerId(){return d(_)},registerTriggerId(o){le(_,o??p,!0)},listboxId:`${m}-listbox`,get value(){return c()},get displayValue(){return v().find(o=>o.value===c())?.label??c()},get invalid(){return C()},get open(){return g()},get staticPosition(){return k()},set open(o){g(o)}});var W={get value(){return c()},set value(o=""){c(o),n()},get open(){return g()},set open(o=!1){g(o),n()},get items(){return v()},set items(o=[]){v(o),n()},get disabled(){return w()},set disabled(o=!1){w(o),n()},get invalid(){return C()},set invalid(o=!1){C(o),n()},get required(){return s()},set required(o=!1){s(o),n()},get name(){return f()},set name(o){f(o),n()},get loop(){return O()},set loop(o=!0){O(o),n()},get onchange(){return L()},set onchange(o){L(o),n()},get onopenchange(){return i()},set onopenchange(o){i(o),n()},get children(){return x()},set children(o){x(o),n()},get staticPosition(){return k()},set staticPosition(o=!1){k(o),n()},$set:J,$on:(o,U)=>X(e,o,U)},A=vt(),R=j(A);return G(R,()=>xe,(o,U)=>{U(o,{type:"single",get items(){return v()},get disabled(){return w()},get required(){return s()},get name(){return f()},get loop(){return O()},get onValueChange(){return L()},get onOpenChange(){return i()},get value(){return c()},set value(V){c(V)},get open(){return g()},set open(V){g(V)},children:(V,l)=>{var r=F(),u=T(r);H(u,()=>x()??re),b(V,r)},$$slots:{default:!0}})}),Q(A),b(S,A),$(W)}var ft=new Set(["$$slots","$$events","$$legacy","variant","class","children","child","onclick","id","ref"]),mt=M("<!> <!>",1);function Pe(S,e){if(new.target)return Y({component:Pe,...S});Z(e,!0);const m=(l,r)=>{let u=()=>(r?.()).props;const I=y(()=>R(u()));var t=F(),h=T(t);{var P=q=>{var D=F(),N=T(D);H(N,g,()=>({props:d(I)})),b(q,D)},E=q=>{Ge(q,fe(()=>d(I),{get variant(){return d(k)},get active(){return f.open},get class(){return d(W)},children:(D,N)=>{var K=mt(),z=T(K);H(z,()=>c()??re);var ae=de(z,2);{var ue=ne=>{Ze(ne,{get icon(){return $e},class:"size-3 shrink-0 text-muted-foreground transition-transform duration-spring-fast group-data-[state=open]:rotate-180 motion-reduce:transition-none"})};te(ae,ne=>{p()==="default"&&ne(ue)})}b(D,K)},$$slots:{default:!0}}))};te(h,q=>{g()?q(P):q(E,-1)})}b(l,t)};let p=a(e,"variant",7,"default"),_=a(e,"class",7,""),c=a(e,"children",7),g=a(e,"child",7),v=a(e,"onclick",7),w=a(e,"id",7),C=a(e,"ref",15,null),s=_e(e,ft);const f=ve("canonical-select");De(()=>f.registerTriggerId(w())),ce(()=>f.registerTriggerId(w()));let O=se(!1);ce(()=>{const l=f.triggerId;le(O,Array.from(document.querySelectorAll("label[for]")).some(r=>r.htmlFor===l),!0)});const L=y(()=>!s["aria-label"]&&!s["aria-labelledby"]&&!d(O));let i=se(void 0);ce(()=>{const l=C();if(!d(L)||!l){le(i,void 0);return}const r=()=>{le(i,l.textContent?.trim()||void 0,!0)};r();const u=new MutationObserver(r);return u.observe(l,{childList:!0,characterData:!0,subtree:!0}),()=>u.disconnect()});const x={default:"border border-border bg-transparent shadow-none hover:border-input hover:bg-hover px-3",underline:"border-0 bg-transparent underline underline-offset-3 decoration-muted-foreground/30 px-3",ghost:"border-0 bg-transparent shadow-none hover:border-transparent hover:bg-hover px-3",secondary:"border border-border bg-secondary text-secondary-foreground shadow-(--elevation-raised) hover:border-input hover:bg-hover px-3"},k=y(()=>p()==="default"?"outline":p()==="secondary"?"secondary":"ghost"),W=y(()=>ie("group type-caption text-foreground flex h-(--control-height-medium) w-full min-w-0 cursor-pointer items-center justify-between gap-2 rounded-(--radius-medium) font-medium transition-[border-color,background-color,box-shadow] duration-spring-fast aria-invalid:border-danger aria-invalid:ring-1 aria-invalid:ring-danger/25 disabled:cursor-not-allowed disabled:bg-transparent disabled:opacity-50 disabled:hover:border-border disabled:hover:bg-transparent motion-reduce:transition-none",x[p()],_()));function A(l){l.detail===0&&!f.open&&(f.open=!0),v()?.(l)}function R(l){const{"aria-activedescendant":r,"aria-label":u,...I}=l;return{...I,role:"combobox","aria-label":typeof u=="string"?u:d(i),"aria-activedescendant":f.open&&typeof r=="string"?r:void 0}}var o={get variant(){return p()},set variant(l="default"){p(l),n()},get class(){return _()},set class(l=""){_(l),n()},get children(){return c()},set children(l){c(l),n()},get child(){return g()},set child(l){g(l),n()},get onclick(){return v()},set onclick(l){v(l),n()},get id(){return w()},set id(l){w(l),n()},get ref(){return C()},set ref(l=null){C(l),n()},$set:J,$on:(l,r)=>X(e,l,r)},U=F(),V=T(U);{let l=y(()=>f.open?f.listboxId:void 0),r=y(()=>f.invalid||void 0);G(V,()=>ye,(u,I)=>{I(u,fe(()=>s,{get id(){return f.triggerId},get"aria-controls"(){return d(l)},get class(){return d(W)},get"aria-invalid"(){return d(r)},onclick:A,get child(){return m},get ref(){return C()},set ref(t){C(t)}}))})}return b(S,U),$(o)}var pt=M("<span> </span>");function Se(S,e){if(new.target)return Y({component:Se,...S});Z(e,!0);let m=a(e,"placeholder",23,()=>me.ui_select_value_placeholder());const p=ve("canonical-select");var _={get placeholder(){return m()},set placeholder(v=me.ui_select_value_placeholder()){m(v),n()},$set:J,$on:(v,w)=>X(e,v,w)},c=pt(),g=qe(c,!0);return Ee(()=>{et(c,1,`min-w-0 flex-1 truncate text-left ${p.value?"text-foreground":"text-muted-foreground"}`),Fe(g,p.displayValue||m())}),b(S,c),$(_)}var ht=M("<div><!> <!></div>"),bt=M("<div><!></div>"),_t=M("<div><div><!></div></div>");function Ie(S,e){if(new.target)return Y({component:Ie,...S});Z(e,!0);const m=r=>{var u=F(),I=T(u);{const t=(h,P)=>{let E=()=>(P?.()).props;var q=ht();oe(q,()=>({...E(),id:k.listboxId,role:"listbox","aria-labelledby":k.triggerId,tabindex:"-1"}));var D=j(q);at(D,{});var N=de(D,2);H(N,()=>O()??re),Q(q),b(h,q)};G(I,()=>Je,(h,P)=>{P(h,{get class(){return`relative min-h-0 flex-1 overflow-y-auto p-1.5 ${C()??""}`},child:t,$$slots:{child:!0}})})}b(r,u)},p=(r,u)=>{let I=()=>(u?.()).props;const t=y(()=>A(I()));var h=bt();oe(h,()=>({...d(t),...v()?{id:v()}:{}}));var P=j(h);m(P),Q(h),pe(h,E=>g?.(E)),b(r,h)},_=(r,u)=>{let I=()=>(u?.()).props,t=()=>(u?.()).wrapperProps;const h=y(()=>A(I()));var P=_t();oe(P,()=>({...t(),...v()?{id:v()}:{}}));var E=j(P);oe(E,()=>({...d(h)}));var q=j(E);m(q),Q(E),pe(E,D=>g?.(D)),Q(P),b(r,P)},c=Ue(),g=We();let v=a(e,"wrapperId",7),w=a(e,"class",7,""),C=a(e,"wrapperClass",7,""),s=a(e,"dropUp",7,!1),f=a(e,"portal",7),O=a(e,"children",7);const L=y(()=>s()||f()===!0),i=ot(),x=st(it()+2);dt(x);const k=ve("canonical-select");async function W(){const r=document.getElementById(k.triggerId);await Le(),!k.open&&r?.isConnected&&r.focus({preventScroll:!0})}function A(r){const{role:u,tabindex:I,...t}=r;return t}var R={get wrapperId(){return v()},set wrapperId(r){v(r),n()},get class(){return w()},set class(r=""){w(r),n()},get wrapperClass(){return C()},set wrapperClass(r=""){C(r),n()},get dropUp(){return s()},set dropUp(r=!1){s(r),n()},get portal(){return f()},set portal(r){f(r),n()},get children(){return O()},set children(r){O(r),n()},$set:J,$on:(r,u)=>X(e,r,u)},o=F(),U=T(o);{var V=r=>{var u=F(),I=T(u);{let t=y(()=>ie(be(),"w-full max-h-60",w()));G(I,()=>Qe,(h,P)=>{P(h,{preventScroll:!1,onEscapeKeydown:W,"data-slot":"select-content","data-static-position":!0,get"data-surface-level"(){return x},get class(){return d(t)},style:"max-width: calc(100vw - var(--space-4));",get child(){return p}})})}b(r,u)},l=r=>{const u=y(()=>f()===void 0&&!s()?i():void 0);var I=F(),t=T(I);{let h=y(()=>!d(L)&&!d(u)),P=y(()=>d(u)??c?.target());G(t,()=>He,(E,q)=>{q(E,{get disabled(){return d(h)},get to(){return d(P)},children:(D,N)=>{var K=F(),z=T(K);{let ae=y(()=>d(u)?"absolute":"fixed"),ue=y(()=>d(u)!==void 0),ne=y(()=>s()?"top":"bottom"),ke=y(()=>ie(be(),"w-(--bits-select-anchor-width) max-h-60",w()));G(z,()=>Ye,(Ve,Te)=>{Te(Ve,{get strategy(){return d(ae)},get hideWhenDetached(){return d(ue)},onEscapeKeydown:W,"data-slot":"select-content",get"data-surface-level"(){return x},get side(){return d(ne)},sideOffset:4,get collisionPadding(){return rt},get class(){return d(ke)},style:"max-width: calc(100vw - var(--space-4));",get child(){return _}})})}b(D,K)},$$slots:{default:!0}})})}b(r,I)};te(U,r=>{k.staticPosition?r(V):r(l,-1)})}return b(S,o),$(R)}var wt=M('<div class="min-w-0 flex-1 truncate"><!></div> <!>',1);function Oe(S,e){if(new.target)return Y({component:Oe,...S});Z(e,!0);let m=a(e,"value",7),p=a(e,"label",7),_=a(e,"disabled",7,!1),c=a(e,"children",7),g=a(e,"class",7,"");var v={get value(){return m()},set value(s){m(s),n()},get label(){return p()},set label(s){p(s),n()},get disabled(){return _()},set disabled(s=!1){_(s),n()},get children(){return c()},set children(s){c(s),n()},get class(){return g()},set class(s=""){g(s),n()},$set:J,$on:(s,f)=>X(e,s,f)},w=F(),C=T(w);{const s=(i,x)=>{let k=()=>(x?.()).selected;var W=wt(),A=T(W),R=j(A);H(R,()=>c()??re),Q(A);var o=de(A,2);{let U=y(()=>k()?"checked":"empty");nt(o,{get state(){return d(U)},"data-slot":"select-item-check"})}b(i,W)};let f=y(()=>p()??m()),O=y(()=>_()||void 0),L=y(()=>ie(lt(),g()));G(C,()=>Xe,(i,x)=>{x(i,{get value(){return m()},get label(){return d(f)},get disabled(){return _()},get"aria-disabled"(){return d(O)},"data-menu-item":!0,get class(){return d(L)},children:s,$$slots:{default:!0}})})}return b(S,w),$(v)}const Rt={Root:Ce,Trigger:Pe,Value:Se,Content:Ie,Item:Oe};export{Rt as S};
1
+ import{t as Y,bo as a,bw as J,b as X,bp as _e,br as fe,bm as me}from"./CHWIPzMj.js";import{bs as Z,bH as le,aD as d,ay as T,a7 as F,bf as re,W as b,bS as de,bn as $,bV as se,aA as n,c9 as y,aB as M,bo as we,a5 as j,bA as Q,bI as Ae,aG as ve,c5 as De,ca as ce,bl as qe,b_ as Ee,bO as Fe,c0 as Le}from"./3SdAC2_C.js";import{s as H}from"./Bx3lRAzK.js";import{c as G}from"./C_VUI8Os.js";import{s as Re,i as Ue,f as We}from"./yQuAS-d_.js";import{i as te}from"./DDtBtnNz.js";import{g as Be,e as pe}from"./Bqdjarag.js";import{aS as ee,a$ as Me,av as B,H as Ne,az as he,aQ as ze,f as Ge,a1 as He}from"./DSQXi-HI.js";import{c as Ke,g as ge,d as je,f as Qe,e as Ye,i as Je,h as Xe}from"./BIpZTv4V.js";import{F as Ze,aw as $e}from"./Bm1YRNX5.js";import{b as oe,e as ie,f as et}from"./B09v4S72.js";import"./QgUSWdkO.js";import{F as tt,O as rt,a as at,M as nt}from"./CFxNovSS.js";import{u as ot,b as be,a as lt}from"./BVhmKG23.js";import{c as st,u as it,s as dt}from"./D9tVylVS.js";import"./T8wSaQKw.js";var ut=M("<!> <!>",1);function xe(S,e){if(new.target)return Y({component:xe,...S});Z(e,!0);let m=a(e,"value",15),p=a(e,"onValueChange",7,ee),_=a(e,"name",7,""),c=a(e,"disabled",7,!1),g=a(e,"type",7),v=a(e,"open",15,!1),w=a(e,"onOpenChange",7,ee),C=a(e,"onOpenChangeComplete",7,ee),s=a(e,"loop",7,!1),f=a(e,"scrollAlignment",7,"nearest"),O=a(e,"required",7,!1),L=a(e,"items",23,()=>[]),i=a(e,"allowDeselect",7,!1),x=a(e,"autocomplete",7),k=a(e,"children",7);function W(){m()===void 0&&m(g()==="single"?"":[])}W(),Me.pre(()=>m(),()=>{W()});let A=se("");const R=Ke.create({type:g(),value:B(()=>m(),t=>{m(t),p()(t)}),disabled:B(()=>c()),required:B(()=>O()),open:B(()=>v(),t=>{v(t),w()(t)}),loop:B(()=>s()),scrollAlignment:B(()=>f()),name:B(()=>_()),isCombobox:!1,items:B(()=>L()),allowDeselect:B(()=>i()),inputValue:B(()=>d(A),t=>le(A,t,!0)),onOpenChangeComplete:B(()=>C())});var o={get value(){return m()},set value(t){m(t),n()},get onValueChange(){return p()},set onValueChange(t=ee){p(t),n()},get name(){return _()},set name(t=""){_(t),n()},get disabled(){return c()},set disabled(t=!1){c(t),n()},get type(){return g()},set type(t){g(t),n()},get open(){return v()},set open(t=!1){v(t),n()},get onOpenChange(){return w()},set onOpenChange(t=ee){w(t),n()},get onOpenChangeComplete(){return C()},set onOpenChangeComplete(t=ee){C(t),n()},get loop(){return s()},set loop(t=!1){s(t),n()},get scrollAlignment(){return f()},set scrollAlignment(t="nearest"){f(t),n()},get required(){return O()},set required(t=!1){O(t),n()},get items(){return L()},set items(t=[]){L(t),n()},get allowDeselect(){return i()},set allowDeselect(t=!1){i(t),n()},get autocomplete(){return x()},set autocomplete(t){x(t),n()},get children(){return k()},set children(t){k(t),n()},$set:J,$on:(t,h)=>X(e,t,h)},U=ut(),V=T(U);Ne(V,{children:(t,h)=>{var P=F(),E=T(P);H(E,()=>k()??re),b(t,P)},$$slots:{default:!0}});var l=de(V,2);{var r=t=>{var h=F(),P=T(h);{var E=D=>{ge(D,{get autocomplete(){return x()}})},q=D=>{var N=F(),K=T(N);Be(K,16,()=>R.opts.value.current,z=>z,(z,ae)=>{ge(z,{get value(){return ae},get autocomplete(){return x()}})}),b(D,N)};te(P,D=>{R.opts.value.current.length===0?D(E):D(q,-1)})}b(t,h)},u=y(()=>Array.isArray(R.opts.value.current)),I=t=>{ge(t,{get autocomplete(){return x()},get value(){return R.opts.value.current},set value(h){R.opts.value.current=h}})};te(l,t=>{d(u)?t(r):t(I,-1)})}return b(S,U),$(o)}var ct=new Set(["$$slots","$$events","$$legacy","id","ref","child","children","type"]),gt=M("<button><!></button>");function ye(S,e){const m=we();if(new.target)return Y({component:ye,...S});Z(e,!0);let p=a(e,"id",23,()=>he(m)),_=a(e,"ref",15,null),c=a(e,"child",7),g=a(e,"children",7),v=a(e,"type",7,"button"),w=_e(e,ct);const C=je.create({id:B(()=>p()),ref:B(()=>_(),i=>_(i))}),s=y(()=>ze(w,C.props,{type:v()}));var f={get id(){return p()},set id(i=he(m)){p(i),n()},get ref(){return _()},set ref(i=null){_(i),n()},get child(){return c()},set child(i){c(i),n()},get children(){return g()},set children(i){g(i),n()},get type(){return v()},set type(i="button"){v(i),n()},$set:J,$on:(i,x)=>X(e,i,x)},O=F(),L=T(O);return G(L,()=>tt,(i,x)=>{x(i,{get id(){return p()},get ref(){return C.opts.ref},children:(k,W)=>{var A=F(),R=T(A);{var o=V=>{var l=F(),r=T(l);H(r,c,()=>({props:d(s)})),b(V,l)},U=V=>{var l=gt();oe(l,()=>({...d(s)}));var r=j(l);H(r,()=>g()??re),Q(l),b(V,l)};te(R,V=>{c()?V(o):V(U,-1)})}b(k,A)},$$slots:{default:!0}})}),b(S,O),$(f)}var vt=M('<div data-slot="select-root" class="relative min-w-0 w-full"><!></div>');function Ce(S,e){const m=we();if(new.target)return Y({component:Ce,...S});Z(e,!0);const p=`${m}-trigger`;let _=se(p),c=a(e,"value",15,""),g=a(e,"open",15,!1),v=a(e,"items",23,()=>[]),w=a(e,"disabled",7,!1),C=a(e,"invalid",7,!1),s=a(e,"required",7,!1),f=a(e,"name",7),O=a(e,"loop",7,!0),L=a(e,"onchange",7),i=a(e,"onopenchange",7),x=a(e,"children",7),k=a(e,"staticPosition",7,!1);Re(()=>{g(!1),i()?.(!1)}),Ae("canonical-select",{get triggerId(){return d(_)},registerTriggerId(o){le(_,o??p,!0)},listboxId:`${m}-listbox`,get value(){return c()},get displayValue(){return v().find(o=>o.value===c())?.label??c()},get invalid(){return C()},get open(){return g()},get staticPosition(){return k()},set open(o){g(o)}});var W={get value(){return c()},set value(o=""){c(o),n()},get open(){return g()},set open(o=!1){g(o),n()},get items(){return v()},set items(o=[]){v(o),n()},get disabled(){return w()},set disabled(o=!1){w(o),n()},get invalid(){return C()},set invalid(o=!1){C(o),n()},get required(){return s()},set required(o=!1){s(o),n()},get name(){return f()},set name(o){f(o),n()},get loop(){return O()},set loop(o=!0){O(o),n()},get onchange(){return L()},set onchange(o){L(o),n()},get onopenchange(){return i()},set onopenchange(o){i(o),n()},get children(){return x()},set children(o){x(o),n()},get staticPosition(){return k()},set staticPosition(o=!1){k(o),n()},$set:J,$on:(o,U)=>X(e,o,U)},A=vt(),R=j(A);return G(R,()=>xe,(o,U)=>{U(o,{type:"single",get items(){return v()},get disabled(){return w()},get required(){return s()},get name(){return f()},get loop(){return O()},get onValueChange(){return L()},get onOpenChange(){return i()},get value(){return c()},set value(V){c(V)},get open(){return g()},set open(V){g(V)},children:(V,l)=>{var r=F(),u=T(r);H(u,()=>x()??re),b(V,r)},$$slots:{default:!0}})}),Q(A),b(S,A),$(W)}var ft=new Set(["$$slots","$$events","$$legacy","variant","class","children","child","onclick","id","ref"]),mt=M("<!> <!>",1);function Pe(S,e){if(new.target)return Y({component:Pe,...S});Z(e,!0);const m=(l,r)=>{let u=()=>(r?.()).props;const I=y(()=>R(u()));var t=F(),h=T(t);{var P=q=>{var D=F(),N=T(D);H(N,g,()=>({props:d(I)})),b(q,D)},E=q=>{Ge(q,fe(()=>d(I),{get variant(){return d(k)},get active(){return f.open},get class(){return d(W)},children:(D,N)=>{var K=mt(),z=T(K);H(z,()=>c()??re);var ae=de(z,2);{var ue=ne=>{Ze(ne,{get icon(){return $e},class:"size-3 shrink-0 text-muted-foreground transition-transform duration-spring-fast group-data-[state=open]:rotate-180 motion-reduce:transition-none"})};te(ae,ne=>{p()==="default"&&ne(ue)})}b(D,K)},$$slots:{default:!0}}))};te(h,q=>{g()?q(P):q(E,-1)})}b(l,t)};let p=a(e,"variant",7,"default"),_=a(e,"class",7,""),c=a(e,"children",7),g=a(e,"child",7),v=a(e,"onclick",7),w=a(e,"id",7),C=a(e,"ref",15,null),s=_e(e,ft);const f=ve("canonical-select");De(()=>f.registerTriggerId(w())),ce(()=>f.registerTriggerId(w()));let O=se(!1);ce(()=>{const l=f.triggerId;le(O,Array.from(document.querySelectorAll("label[for]")).some(r=>r.htmlFor===l),!0)});const L=y(()=>!s["aria-label"]&&!s["aria-labelledby"]&&!d(O));let i=se(void 0);ce(()=>{const l=C();if(!d(L)||!l){le(i,void 0);return}const r=()=>{le(i,l.textContent?.trim()||void 0,!0)};r();const u=new MutationObserver(r);return u.observe(l,{childList:!0,characterData:!0,subtree:!0}),()=>u.disconnect()});const x={default:"border border-border bg-transparent shadow-none hover:border-input hover:bg-hover px-3",underline:"border-0 bg-transparent underline underline-offset-3 decoration-muted-foreground/30 px-3",ghost:"border-0 bg-transparent shadow-none hover:border-transparent hover:bg-hover px-3",secondary:"border border-border bg-secondary text-secondary-foreground shadow-(--elevation-raised) hover:border-input hover:bg-hover px-3"},k=y(()=>p()==="default"?"outline":p()==="secondary"?"secondary":"ghost"),W=y(()=>ie("group type-caption text-foreground flex h-(--control-height-medium) w-full min-w-0 cursor-pointer items-center justify-between gap-2 rounded-(--radius-medium) font-medium transition-[border-color,background-color,box-shadow] duration-spring-fast aria-invalid:border-danger aria-invalid:ring-1 aria-invalid:ring-danger/25 disabled:cursor-not-allowed disabled:bg-transparent disabled:opacity-50 disabled:hover:border-border disabled:hover:bg-transparent motion-reduce:transition-none",x[p()],_()));function A(l){l.detail===0&&!f.open&&(f.open=!0),v()?.(l)}function R(l){const{"aria-activedescendant":r,"aria-label":u,...I}=l;return{...I,role:"combobox","aria-label":typeof u=="string"?u:d(i),"aria-activedescendant":f.open&&typeof r=="string"?r:void 0}}var o={get variant(){return p()},set variant(l="default"){p(l),n()},get class(){return _()},set class(l=""){_(l),n()},get children(){return c()},set children(l){c(l),n()},get child(){return g()},set child(l){g(l),n()},get onclick(){return v()},set onclick(l){v(l),n()},get id(){return w()},set id(l){w(l),n()},get ref(){return C()},set ref(l=null){C(l),n()},$set:J,$on:(l,r)=>X(e,l,r)},U=F(),V=T(U);{let l=y(()=>f.open?f.listboxId:void 0),r=y(()=>f.invalid||void 0);G(V,()=>ye,(u,I)=>{I(u,fe(()=>s,{get id(){return f.triggerId},get"aria-controls"(){return d(l)},get class(){return d(W)},get"aria-invalid"(){return d(r)},onclick:A,get child(){return m},get ref(){return C()},set ref(t){C(t)}}))})}return b(S,U),$(o)}var pt=M("<span> </span>");function Se(S,e){if(new.target)return Y({component:Se,...S});Z(e,!0);let m=a(e,"placeholder",23,()=>me.ui_select_value_placeholder());const p=ve("canonical-select");var _={get placeholder(){return m()},set placeholder(v=me.ui_select_value_placeholder()){m(v),n()},$set:J,$on:(v,w)=>X(e,v,w)},c=pt(),g=qe(c,!0);return Ee(()=>{et(c,1,`min-w-0 flex-1 truncate text-left ${p.value?"text-foreground":"text-muted-foreground"}`),Fe(g,p.displayValue||m())}),b(S,c),$(_)}var ht=M("<div><!> <!></div>"),bt=M("<div><!></div>"),_t=M("<div><div><!></div></div>");function Ie(S,e){if(new.target)return Y({component:Ie,...S});Z(e,!0);const m=r=>{var u=F(),I=T(u);{const t=(h,P)=>{let E=()=>(P?.()).props;var q=ht();oe(q,()=>({...E(),id:k.listboxId,role:"listbox","aria-labelledby":k.triggerId,tabindex:"-1"}));var D=j(q);at(D,{});var N=de(D,2);H(N,()=>O()??re),Q(q),b(h,q)};G(I,()=>Je,(h,P)=>{P(h,{get class(){return`relative min-h-0 flex-1 overflow-y-auto p-1.5 ${C()??""}`},child:t,$$slots:{child:!0}})})}b(r,u)},p=(r,u)=>{let I=()=>(u?.()).props;const t=y(()=>A(I()));var h=bt();oe(h,()=>({...d(t),...v()?{id:v()}:{}}));var P=j(h);m(P),Q(h),pe(h,E=>g?.(E)),b(r,h)},_=(r,u)=>{let I=()=>(u?.()).props,t=()=>(u?.()).wrapperProps;const h=y(()=>A(I()));var P=_t();oe(P,()=>({...t(),...v()?{id:v()}:{}}));var E=j(P);oe(E,()=>({...d(h)}));var q=j(E);m(q),Q(E),pe(E,D=>g?.(D)),Q(P),b(r,P)},c=Ue(),g=We();let v=a(e,"wrapperId",7),w=a(e,"class",7,""),C=a(e,"wrapperClass",7,""),s=a(e,"dropUp",7,!1),f=a(e,"portal",7),O=a(e,"children",7);const L=y(()=>s()||f()===!0),i=ot(),x=st(it()+2);dt(x);const k=ve("canonical-select");async function W(){const r=document.getElementById(k.triggerId);await Le(),!k.open&&r?.isConnected&&r.focus({preventScroll:!0})}function A(r){const{role:u,tabindex:I,...t}=r;return t}var R={get wrapperId(){return v()},set wrapperId(r){v(r),n()},get class(){return w()},set class(r=""){w(r),n()},get wrapperClass(){return C()},set wrapperClass(r=""){C(r),n()},get dropUp(){return s()},set dropUp(r=!1){s(r),n()},get portal(){return f()},set portal(r){f(r),n()},get children(){return O()},set children(r){O(r),n()},$set:J,$on:(r,u)=>X(e,r,u)},o=F(),U=T(o);{var V=r=>{var u=F(),I=T(u);{let t=y(()=>ie(be(),"w-full max-h-60",w()));G(I,()=>Qe,(h,P)=>{P(h,{preventScroll:!1,onEscapeKeydown:W,"data-slot":"select-content","data-static-position":!0,get"data-surface-level"(){return x},get class(){return d(t)},style:"max-width: calc(100vw - var(--space-4));",get child(){return p}})})}b(r,u)},l=r=>{const u=y(()=>f()===void 0&&!s()?i():void 0);var I=F(),t=T(I);{let h=y(()=>!d(L)&&!d(u)),P=y(()=>d(u)??c?.target());G(t,()=>He,(E,q)=>{q(E,{get disabled(){return d(h)},get to(){return d(P)},children:(D,N)=>{var K=F(),z=T(K);{let ae=y(()=>d(u)?"absolute":"fixed"),ue=y(()=>d(u)!==void 0),ne=y(()=>s()?"top":"bottom"),ke=y(()=>ie(be(),"w-(--bits-select-anchor-width) max-h-60",w()));G(z,()=>Ye,(Ve,Te)=>{Te(Ve,{get strategy(){return d(ae)},get hideWhenDetached(){return d(ue)},onEscapeKeydown:W,"data-slot":"select-content",get"data-surface-level"(){return x},get side(){return d(ne)},sideOffset:4,get collisionPadding(){return rt},get class(){return d(ke)},style:"max-width: calc(100vw - var(--space-4));",get child(){return _}})})}b(D,K)},$$slots:{default:!0}})})}b(r,I)};te(U,r=>{k.staticPosition?r(V):r(l,-1)})}return b(S,o),$(R)}var wt=M('<div class="min-w-0 flex-1 truncate"><!></div> <!>',1);function Oe(S,e){if(new.target)return Y({component:Oe,...S});Z(e,!0);let m=a(e,"value",7),p=a(e,"label",7),_=a(e,"disabled",7,!1),c=a(e,"children",7),g=a(e,"class",7,"");var v={get value(){return m()},set value(s){m(s),n()},get label(){return p()},set label(s){p(s),n()},get disabled(){return _()},set disabled(s=!1){_(s),n()},get children(){return c()},set children(s){c(s),n()},get class(){return g()},set class(s=""){g(s),n()},$set:J,$on:(s,f)=>X(e,s,f)},w=F(),C=T(w);{const s=(i,x)=>{let k=()=>(x?.()).selected;var W=wt(),A=T(W),R=j(A);H(R,()=>c()??re),Q(A);var o=de(A,2);{let U=y(()=>k()?"checked":"empty");nt(o,{get state(){return d(U)},"data-slot":"select-item-check"})}b(i,W)};let f=y(()=>p()??m()),O=y(()=>_()||void 0),L=y(()=>ie(lt(),g()));G(C,()=>Xe,(i,x)=>{x(i,{get value(){return m()},get label(){return d(f)},get disabled(){return _()},get"aria-disabled"(){return d(O)},"data-menu-item":!0,get class(){return d(L)},children:s,$$slots:{default:!0}})})}return b(S,w),$(v)}const Rt={Root:Ce,Trigger:Pe,Value:Se,Content:Ie,Item:Oe};export{Rt as S};
@@ -1 +1 @@
1
- import{D as O,a as V,d as z}from"./CQcEqK4G.js";import{K as G,T as F,_ as J,d as X,f as Q,X as Y,Q as Z,a0 as q,n as P,e as tt,c as et,m as U,h as N,l as E}from"./D22DhEZM.js";import{o as u,b as _,s as r,n as h,l as M,_ as x,c as B,u as nt}from"./CIyUrgF0.js";import{I as it}from"./Bqd7fdCF.js";const at="/app/immutable/assets/PatrickHand-Regular.CyLOmwMC.ttf";let D=null,R=null;const W=O.badgeFontFamily;function K(){return R??W}function L(){return D||(D=(async()=>{let t;try{const i=typeof document<"u"?document.fonts:globalThis.fonts;if(!i||typeof FontFace>"u")throw new Error("font-api-unavailable");const a=await Promise.race([new FontFace("Intent Annotation Hand",`url("${at}")`,{style:"normal",weight:"400",display:"block"}).load(),new Promise((l,o)=>{t=setTimeout(()=>o(new Error("font-load-timeout")),2e3)})]);i.add(a),R=O.fontFamily}catch{R=W}finally{clearTimeout(t)}})(),D)}let k=null;function ot(t){const i=G(t);if(t.kind!=="text"||t.style==="sticky"||(k||(k=typeof OffscreenCanvas<"u"?new OffscreenCanvas(1,1).getContext("2d"):typeof document<"u"?document.createElement("canvas").getContext("2d"):null),!k))return i;k.font=`${t.fontSize}px ${K()}`,k.textAlign="left",k.textBaseline="top",k.letterSpacing="0px",k.wordSpacing="0px";let a=1/0,l=1/0,o=-1/0,e=-1/0;const{lines:f,lineHeight:c}=F(t);for(const[s,p]of f.entries()){if(!p.trim())continue;const g=k.measureText(p),b=s*c,m=[-g.actualBoundingBoxLeft,b-g.actualBoundingBoxAscent,g.actualBoundingBoxRight,b+g.actualBoundingBoxDescent];if(!m.every(Number.isFinite))return i;a=Math.min(a,m[0]),l=Math.min(l,m[1]),o=Math.max(o,m[2]),e=Math.max(e,m[3])}if(!(o>a&&e>l))return i;const n=Math.max(1,t.fontSize/24);return{x:t.x+a-n,y:t.y+l-n,w:o-a+2*n,h:e-l+2*n}}const C=16e3;function rt(t,i){const l=t.length*2,o=new ArrayBuffer(44+l),e=new DataView(o),f=(n,s)=>{for(let p=0;p<s.length;p+=1)e.setUint8(n+p,s.charCodeAt(p))};f(0,"RIFF"),e.setUint32(4,36+l,!0),f(8,"WAVE"),f(12,"fmt "),e.setUint32(16,16,!0),e.setUint16(20,1,!0),e.setUint16(22,1,!0),e.setUint32(24,i,!0),e.setUint32(28,i*2,!0),e.setUint16(32,2,!0),e.setUint16(34,16,!0),f(36,"data"),e.setUint32(40,l,!0);let c=44;for(let n=0;n<t.length;n+=1){const s=Math.max(-1,Math.min(1,t[n]));e.setInt16(c,s<0?s*32768:s*32767,!0),c+=2}return o}function st(t){const i=new Float32Array(t.length);for(let a=0;a<t.numberOfChannels;a+=1){const l=t.getChannelData(a);for(let o=0;o<l.length;o+=1)i[o]+=l[o]/t.numberOfChannels}return i}async function gt(t){const i=new AudioContext;try{const a=await i.decodeAudioData(await t.arrayBuffer()),l=Math.max(1,Math.ceil(a.length*C/a.sampleRate)),o=new OfflineAudioContext(1,l,C),e=o.createBufferSource();e.buffer=a,e.connect(o.destination),e.start();const f=await o.startRendering();return rt(st(f),C)}finally{await i.close().catch(()=>{})}}function $(t){const i=new Uint8Array(t),a=32768;let l="";for(let o=0;o<i.length;o+=a)l+=String.fromCharCode(...i.subarray(o,o+a));return btoa(l)}const d={...O,get fontFamily(){return K()},blurRadius:X};function H(t,i,a=0,l){const o=t.crop??{x:0,y:0,w:i.width,h:i.height},e=Math.max(1,Math.max(i.width,i.height)/1440),f=Math.min(d.badgeRadius*e,o.w/2,o.h/2);return Y(t,i).filter(c=>i.kind==="screenshot"||a>=c.mark.atMs&&a<c.visibleUntilMs).flatMap(({n:c,mark:n})=>{const s=i.kind==="recording"?Z(n.geometry,q(i,n),a):n.geometry;if(!s)return[];const p=ot(s),g=z(p,o,e,f);return[...n.id===l&&s.kind==="text"?[]:[{kind:"geometry",geometry:s,unit:e}],...d.showNumbers?[{kind:"badge",...g,radius:f,label:String(c),unit:e}]:[]]})}function j(t,i){t.save(),t.letterSpacing="0px",t.wordSpacing="0px",t.strokeStyle=d.accent,t.fillStyle=d.accent,t.lineCap="round",t.lineJoin="round";for(const a of i){const l=a.unit??1,o=(c,n)=>{t.strokeStyle=d.halo,t.lineWidth=c+d.haloWidth*l,n?t.stroke(n):t.stroke(),t.strokeStyle=d.accent,t.lineWidth=c,n?t.stroke(n):t.stroke()};if(a.kind==="badge"){t.fillStyle=d.paper,t.beginPath(),t.arc(a.x,a.y,a.radius,0,Math.PI*2),t.fill(),t.strokeStyle=d.accent,t.lineWidth=d.badgeOutline*l,t.stroke(),t.fillStyle=d.ink,t.font=`600 ${a.radius*d.badgeTextScale}px ${d.badgeFontFamily}`,t.textAlign="center",t.textBaseline="middle",t.fillText(a.label,a.x,a.y);continue}const e=a.geometry;t.fillStyle=d.accent;const f=(e.kind==="path"?d.pen:d.stroke)*l;if(e.kind==="rect")t.beginPath(),t.rect(e.x,e.y,e.w,e.h),o(f);else if(e.kind==="text"){const c=F(e);t.fillStyle=d.accent,t.textAlign="left",t.textBaseline="top",t.font=`${e.fontSize}px ${d.fontFamily}`,c.lines.forEach((n,s)=>{const p=e.x+c.padding,g=e.y+c.padding+s*c.lineHeight;t.strokeStyle=d.halo,t.lineWidth=d.haloWidth*l;const b=e.style==="sticky"?c.width-2*c.padding:void 0;t.strokeText(n,p,g,b),t.fillText(n,p,g,b)})}else if(e.kind==="point")t.beginPath(),t.arc(e.x,e.y,Q,0,Math.PI*2),o(f);else if(e.kind==="path")o(f,new Path2D(V(e.points)));else{const c=[e.from,e.to];if(t.beginPath(),c.forEach((n,s)=>s?t.lineTo(n.x,n.y):t.moveTo(n.x,n.y)),e.kind==="arrow"){const n=Math.atan2(e.to.y-e.from.y,e.to.x-e.from.x),s=d.arrowHead*l;t.moveTo(e.to.x-s*Math.cos(n-d.arrowSpread),e.to.y-s*Math.sin(n-d.arrowSpread)),t.lineTo(e.to.x,e.to.y),t.lineTo(e.to.x-s*Math.cos(n+d.arrowSpread),e.to.y-s*Math.sin(n+d.arrowSpread))}o(f)}}t.restore()}function v(t,i){const a=new OffscreenCanvas(Math.max(1,Math.round(t)),Math.max(1,Math.round(i))),l=a.getContext("2d");if(!l)throw new Error("capture-render-unavailable");return{image:a,context:l}}async function pt(t,i,a){if(t.visuals!=="clean")throw new Error("legacy-baked-marks");await L();const{image:l,context:o}=v(t.width,t.height);return j(o,H(i,t,a)),$(await(await l.convertToBlob({type:"image/png"})).arrayBuffer())}async function yt(t,i,a,l){const o=J(i,t,null);if(t.kind!=="screenshot"||o.errors.length)throw new Error(o.errors[0]??"not-a-screenshot");if(t.visuals!=="clean")throw new Error("legacy-baked-marks");await L();const e=Uint8Array.from(atob(a.base64),c=>c.charCodeAt(0)),f=await createImageBitmap(new Blob([e],{type:a.mimeType}));try{if(f.width!==t.width||f.height!==t.height)throw new Error("stale-source-pixels");const c=v(t.width,t.height);if(c.context.drawImage(f,0,0),i.blurRegions.length||i.blurStrokes?.length){const g=v(t.width,t.height);g.context.fillStyle="#000000",g.context.fillRect(0,0,t.width,t.height);const b=`blur(${d.blurRadius}px)`;if(g.context.filter=b,g.context.filter!==b)throw new Error("capture-blur-unavailable");g.context.drawImage(f,0,0);const m=v(t.width,t.height);m.context.fillStyle="#ffffff",m.context.strokeStyle="#ffffff",m.context.lineCap="round",m.context.lineJoin="round";for(const y of i.blurRegions)m.context.fillRect(y.x,y.y,y.w,y.h);for(const y of i.blurStrokes??[]){const S=y.points.filter((I,A)=>A===0||I.x!==y.points[A-1].x||I.y!==y.points[A-1].y);if(m.context.beginPath(),S.length===1){const I=S[0];m.context.arc(I.x,I.y,y.radius,0,Math.PI*2),m.context.fill()}else{m.context.lineWidth=y.radius*2,m.context.moveTo(S[0].x,S[0].y);for(const I of S.slice(1))m.context.lineTo(I.x,I.y);m.context.stroke()}}const T=v(t.width,t.height);T.context.drawImage(g.image,0,0),T.context.globalCompositeOperation="destination-in",T.context.drawImage(m.image,0,0),c.context.drawImage(T.image,0,0)}const n=i.crop??{x:0,y:0,w:t.width,h:t.height},s=v(n.w,n.h);s.context.drawImage(c.image,n.x,n.y,n.w,n.h,0,0,s.image.width,s.image.height),s.context.scale(s.image.width/n.w,s.image.height/n.h),s.context.translate(-n.x,-n.y),j(s.context,H(i,t,0,l?.hiddenTextMarkId));const p=await s.image.convertToBlob({type:"image/png"});return{data:$(await p.arrayBuffer()),mimeType:"image/png",width:s.image.width,height:s.image.height}}finally{f.close()}}const kt=u({outputVersion:M(tt),jobId:r().uuid(),media:P,layers:_(u({atMs:h().finite().nonnegative(),endMs:h().finite().nonnegative(),png:r().min(1).max(48*1024*1024)}).strict()).max(1e4)}).strict(),wt=u({jobId:r().uuid(),media:P,locale:r().min(1).max(80).optional()}).strict(),lt=u({sourceId:r().min(1),sourceRevision:h().int().nonnegative(),durationMs:h().finite().positive().max(120001),intervalMs:M(50),peaks:_(h().finite().min(0).max(1)).max(2401)}).strict().refine(t=>t.peaks.length===Math.ceil(t.durationMs/t.intervalMs),"Incomplete waveform");u({jobId:r().uuid(),media:P}).strict();u({sourceId:r().min(1),sourceRevision:h().int().nonnegative(),trackCount:h().int().nonnegative().max(128),populatedTrackCount:h().int().nonnegative().max(128)}).strict().refine(t=>t.populatedTrackCount<=t.trackCount);const xt=it.DOCK_CAPTURE_EDITOR,w=r().min(1).max(200),ct=u({id:w,tool:x(et),atMs:h().finite().min(0).max(1440*60*1e3).nullable(),label:r().max(200).optional()}).strict();u({kind:x(["recording","screenshot"]),workspaceId:w,agentId:w,attachmentId:w,sourceRevision:r().min(1).max(512),attachmentPath:r().min(1).max(1024),title:r().max(200),durationMs:h().finite().min(0).max(1440*60*1e3).optional(),width:h().int().positive().max(32768).optional(),height:h().int().positive().max(32768).optional(),marks:_(ct).max(500),provenance:u({captureApi:r().max(100).optional(),hasMicAudio:B().optional(),visuals:x(["clean","baked-marks"])}).strict(),source:E.optional(),originalSource:E.optional(),saved:N.nullable().optional(),transcript:U.nullable().optional(),holdToken:r().uuid().optional()}).strict().refine(t=>!t.source||t.source.path===t.attachmentPath&&t.source.attachmentId===t.attachmentId&&t.source.kind===t.kind,"Source does not match the attachment").refine(t=>!t.saved||!!t.source&&t.saved.sourceId===t.source.id&&t.saved.sourceRevision===t.source.revision,"Edit does not match the source").refine(t=>!t.originalSource||t.source?.kind==="screenshot"&&t.originalSource.kind==="screenshot"&&t.originalSource.id!==t.source.id,"Original source does not precede this source");u({openId:r().uuid(),intent:M("attach").optional()}).strict();u({openId:r().uuid(),accept:B()}).strict();u({token:r().uuid(),hide:M(!0).optional()}).strict();u({openId:r().uuid(),requestId:r().uuid()}).strict();u({requestId:r().uuid(),result:x(["saved","stale-source","revision-conflict","failed"]),saved:N.optional()}).strict().refine(t=>t.result==="saved"==!!t.saved,"Saved edit missing");u({pair:u({workspaceId:r().min(1).max(200),agentId:r().min(1).max(200)}).strict(),sourceId:r().min(1).max(512),sourceRevision:h().int().nonnegative(),transcript:U}).strict();nt([u({requestId:r().uuid(),ok:M(!0),source:E}).strict(),u({requestId:r().uuid(),ok:M(!1),error:x(["cancelled","permission","failed"])}).strict()]);const dt=2e4;u({openId:r().uuid(),markId:r().min(1).max(512),generation:h().int().nonnegative(),phase:x(["start","stop"])}).strict();u({requestId:r().uuid(),generation:h().int().nonnegative(),text:r().max(dt),final:B(),error:x(["busy","unavailable","failed","permission"]).optional()}).strict().refine(t=>!t.error||t.final,"An error is final");u({pair:u({workspaceId:r().min(1).max(200),agentId:r().min(1).max(200)}).strict(),sourceId:r().min(1).max(512),sourceRevision:h().int().nonnegative(),waveform:lt}).strict();const bt=u({requestId:r().uuid(),openId:w,pair:u({workspaceId:w,agentId:w}).strict(),kind:x(["screenshot","recording"]),attachmentId:w,sourceId:w.optional(),sourceRevision:h().int().nonnegative().optional(),expectedEditRevision:h().int().nonnegative().optional()}).strict();u({requestId:r().uuid(),result:x(["deleted","stale-source","failed"])}).strict();const It=u({endedOpenId:r().uuid()}).strict();export{xt as D,d as a,dt as b,bt as c,It as d,kt as e,wt as f,$ as g,gt as h,ot as i,K as j,L as k,H as l,pt as m,j as p,yt as r};
1
+ import{D as O,a as V,d as z}from"./CQcEqK4G.js";import{K as G,T as F,_ as J,d as X,f as Q,X as Y,Q as Z,a0 as q,n as P,e as tt,c as et,m as U,h as N,l as E}from"./C_a7D1qz.js";import{o as u,b as _,s as r,n as h,l as M,_ as x,c as B,u as nt}from"./CIyUrgF0.js";import{I as it}from"./Bqd7fdCF.js";const at="/app/immutable/assets/PatrickHand-Regular.CyLOmwMC.ttf";let D=null,R=null;const W=O.badgeFontFamily;function K(){return R??W}function L(){return D||(D=(async()=>{let t;try{const i=typeof document<"u"?document.fonts:globalThis.fonts;if(!i||typeof FontFace>"u")throw new Error("font-api-unavailable");const a=await Promise.race([new FontFace("Intent Annotation Hand",`url("${at}")`,{style:"normal",weight:"400",display:"block"}).load(),new Promise((l,o)=>{t=setTimeout(()=>o(new Error("font-load-timeout")),2e3)})]);i.add(a),R=O.fontFamily}catch{R=W}finally{clearTimeout(t)}})(),D)}let k=null;function ot(t){const i=G(t);if(t.kind!=="text"||t.style==="sticky"||(k||(k=typeof OffscreenCanvas<"u"?new OffscreenCanvas(1,1).getContext("2d"):typeof document<"u"?document.createElement("canvas").getContext("2d"):null),!k))return i;k.font=`${t.fontSize}px ${K()}`,k.textAlign="left",k.textBaseline="top",k.letterSpacing="0px",k.wordSpacing="0px";let a=1/0,l=1/0,o=-1/0,e=-1/0;const{lines:f,lineHeight:c}=F(t);for(const[s,p]of f.entries()){if(!p.trim())continue;const g=k.measureText(p),b=s*c,m=[-g.actualBoundingBoxLeft,b-g.actualBoundingBoxAscent,g.actualBoundingBoxRight,b+g.actualBoundingBoxDescent];if(!m.every(Number.isFinite))return i;a=Math.min(a,m[0]),l=Math.min(l,m[1]),o=Math.max(o,m[2]),e=Math.max(e,m[3])}if(!(o>a&&e>l))return i;const n=Math.max(1,t.fontSize/24);return{x:t.x+a-n,y:t.y+l-n,w:o-a+2*n,h:e-l+2*n}}const C=16e3;function rt(t,i){const l=t.length*2,o=new ArrayBuffer(44+l),e=new DataView(o),f=(n,s)=>{for(let p=0;p<s.length;p+=1)e.setUint8(n+p,s.charCodeAt(p))};f(0,"RIFF"),e.setUint32(4,36+l,!0),f(8,"WAVE"),f(12,"fmt "),e.setUint32(16,16,!0),e.setUint16(20,1,!0),e.setUint16(22,1,!0),e.setUint32(24,i,!0),e.setUint32(28,i*2,!0),e.setUint16(32,2,!0),e.setUint16(34,16,!0),f(36,"data"),e.setUint32(40,l,!0);let c=44;for(let n=0;n<t.length;n+=1){const s=Math.max(-1,Math.min(1,t[n]));e.setInt16(c,s<0?s*32768:s*32767,!0),c+=2}return o}function st(t){const i=new Float32Array(t.length);for(let a=0;a<t.numberOfChannels;a+=1){const l=t.getChannelData(a);for(let o=0;o<l.length;o+=1)i[o]+=l[o]/t.numberOfChannels}return i}async function gt(t){const i=new AudioContext;try{const a=await i.decodeAudioData(await t.arrayBuffer()),l=Math.max(1,Math.ceil(a.length*C/a.sampleRate)),o=new OfflineAudioContext(1,l,C),e=o.createBufferSource();e.buffer=a,e.connect(o.destination),e.start();const f=await o.startRendering();return rt(st(f),C)}finally{await i.close().catch(()=>{})}}function $(t){const i=new Uint8Array(t),a=32768;let l="";for(let o=0;o<i.length;o+=a)l+=String.fromCharCode(...i.subarray(o,o+a));return btoa(l)}const d={...O,get fontFamily(){return K()},blurRadius:X};function H(t,i,a=0,l){const o=t.crop??{x:0,y:0,w:i.width,h:i.height},e=Math.max(1,Math.max(i.width,i.height)/1440),f=Math.min(d.badgeRadius*e,o.w/2,o.h/2);return Y(t,i).filter(c=>i.kind==="screenshot"||a>=c.mark.atMs&&a<c.visibleUntilMs).flatMap(({n:c,mark:n})=>{const s=i.kind==="recording"?Z(n.geometry,q(i,n),a):n.geometry;if(!s)return[];const p=ot(s),g=z(p,o,e,f);return[...n.id===l&&s.kind==="text"?[]:[{kind:"geometry",geometry:s,unit:e}],...d.showNumbers?[{kind:"badge",...g,radius:f,label:String(c),unit:e}]:[]]})}function j(t,i){t.save(),t.letterSpacing="0px",t.wordSpacing="0px",t.strokeStyle=d.accent,t.fillStyle=d.accent,t.lineCap="round",t.lineJoin="round";for(const a of i){const l=a.unit??1,o=(c,n)=>{t.strokeStyle=d.halo,t.lineWidth=c+d.haloWidth*l,n?t.stroke(n):t.stroke(),t.strokeStyle=d.accent,t.lineWidth=c,n?t.stroke(n):t.stroke()};if(a.kind==="badge"){t.fillStyle=d.paper,t.beginPath(),t.arc(a.x,a.y,a.radius,0,Math.PI*2),t.fill(),t.strokeStyle=d.accent,t.lineWidth=d.badgeOutline*l,t.stroke(),t.fillStyle=d.ink,t.font=`600 ${a.radius*d.badgeTextScale}px ${d.badgeFontFamily}`,t.textAlign="center",t.textBaseline="middle",t.fillText(a.label,a.x,a.y);continue}const e=a.geometry;t.fillStyle=d.accent;const f=(e.kind==="path"?d.pen:d.stroke)*l;if(e.kind==="rect")t.beginPath(),t.rect(e.x,e.y,e.w,e.h),o(f);else if(e.kind==="text"){const c=F(e);t.fillStyle=d.accent,t.textAlign="left",t.textBaseline="top",t.font=`${e.fontSize}px ${d.fontFamily}`,c.lines.forEach((n,s)=>{const p=e.x+c.padding,g=e.y+c.padding+s*c.lineHeight;t.strokeStyle=d.halo,t.lineWidth=d.haloWidth*l;const b=e.style==="sticky"?c.width-2*c.padding:void 0;t.strokeText(n,p,g,b),t.fillText(n,p,g,b)})}else if(e.kind==="point")t.beginPath(),t.arc(e.x,e.y,Q,0,Math.PI*2),o(f);else if(e.kind==="path")o(f,new Path2D(V(e.points)));else{const c=[e.from,e.to];if(t.beginPath(),c.forEach((n,s)=>s?t.lineTo(n.x,n.y):t.moveTo(n.x,n.y)),e.kind==="arrow"){const n=Math.atan2(e.to.y-e.from.y,e.to.x-e.from.x),s=d.arrowHead*l;t.moveTo(e.to.x-s*Math.cos(n-d.arrowSpread),e.to.y-s*Math.sin(n-d.arrowSpread)),t.lineTo(e.to.x,e.to.y),t.lineTo(e.to.x-s*Math.cos(n+d.arrowSpread),e.to.y-s*Math.sin(n+d.arrowSpread))}o(f)}}t.restore()}function v(t,i){const a=new OffscreenCanvas(Math.max(1,Math.round(t)),Math.max(1,Math.round(i))),l=a.getContext("2d");if(!l)throw new Error("capture-render-unavailable");return{image:a,context:l}}async function pt(t,i,a){if(t.visuals!=="clean")throw new Error("legacy-baked-marks");await L();const{image:l,context:o}=v(t.width,t.height);return j(o,H(i,t,a)),$(await(await l.convertToBlob({type:"image/png"})).arrayBuffer())}async function yt(t,i,a,l){const o=J(i,t,null);if(t.kind!=="screenshot"||o.errors.length)throw new Error(o.errors[0]??"not-a-screenshot");if(t.visuals!=="clean")throw new Error("legacy-baked-marks");await L();const e=Uint8Array.from(atob(a.base64),c=>c.charCodeAt(0)),f=await createImageBitmap(new Blob([e],{type:a.mimeType}));try{if(f.width!==t.width||f.height!==t.height)throw new Error("stale-source-pixels");const c=v(t.width,t.height);if(c.context.drawImage(f,0,0),i.blurRegions.length||i.blurStrokes?.length){const g=v(t.width,t.height);g.context.fillStyle="#000000",g.context.fillRect(0,0,t.width,t.height);const b=`blur(${d.blurRadius}px)`;if(g.context.filter=b,g.context.filter!==b)throw new Error("capture-blur-unavailable");g.context.drawImage(f,0,0);const m=v(t.width,t.height);m.context.fillStyle="#ffffff",m.context.strokeStyle="#ffffff",m.context.lineCap="round",m.context.lineJoin="round";for(const y of i.blurRegions)m.context.fillRect(y.x,y.y,y.w,y.h);for(const y of i.blurStrokes??[]){const S=y.points.filter((I,A)=>A===0||I.x!==y.points[A-1].x||I.y!==y.points[A-1].y);if(m.context.beginPath(),S.length===1){const I=S[0];m.context.arc(I.x,I.y,y.radius,0,Math.PI*2),m.context.fill()}else{m.context.lineWidth=y.radius*2,m.context.moveTo(S[0].x,S[0].y);for(const I of S.slice(1))m.context.lineTo(I.x,I.y);m.context.stroke()}}const T=v(t.width,t.height);T.context.drawImage(g.image,0,0),T.context.globalCompositeOperation="destination-in",T.context.drawImage(m.image,0,0),c.context.drawImage(T.image,0,0)}const n=i.crop??{x:0,y:0,w:t.width,h:t.height},s=v(n.w,n.h);s.context.drawImage(c.image,n.x,n.y,n.w,n.h,0,0,s.image.width,s.image.height),s.context.scale(s.image.width/n.w,s.image.height/n.h),s.context.translate(-n.x,-n.y),j(s.context,H(i,t,0,l?.hiddenTextMarkId));const p=await s.image.convertToBlob({type:"image/png"});return{data:$(await p.arrayBuffer()),mimeType:"image/png",width:s.image.width,height:s.image.height}}finally{f.close()}}const kt=u({outputVersion:M(tt),jobId:r().uuid(),media:P,layers:_(u({atMs:h().finite().nonnegative(),endMs:h().finite().nonnegative(),png:r().min(1).max(48*1024*1024)}).strict()).max(1e4)}).strict(),wt=u({jobId:r().uuid(),media:P,locale:r().min(1).max(80).optional()}).strict(),lt=u({sourceId:r().min(1),sourceRevision:h().int().nonnegative(),durationMs:h().finite().positive().max(120001),intervalMs:M(50),peaks:_(h().finite().min(0).max(1)).max(2401)}).strict().refine(t=>t.peaks.length===Math.ceil(t.durationMs/t.intervalMs),"Incomplete waveform");u({jobId:r().uuid(),media:P}).strict();u({sourceId:r().min(1),sourceRevision:h().int().nonnegative(),trackCount:h().int().nonnegative().max(128),populatedTrackCount:h().int().nonnegative().max(128)}).strict().refine(t=>t.populatedTrackCount<=t.trackCount);const xt=it.DOCK_CAPTURE_EDITOR,w=r().min(1).max(200),ct=u({id:w,tool:x(et),atMs:h().finite().min(0).max(1440*60*1e3).nullable(),label:r().max(200).optional()}).strict();u({kind:x(["recording","screenshot"]),workspaceId:w,agentId:w,attachmentId:w,sourceRevision:r().min(1).max(512),attachmentPath:r().min(1).max(1024),title:r().max(200),durationMs:h().finite().min(0).max(1440*60*1e3).optional(),width:h().int().positive().max(32768).optional(),height:h().int().positive().max(32768).optional(),marks:_(ct).max(500),provenance:u({captureApi:r().max(100).optional(),hasMicAudio:B().optional(),visuals:x(["clean","baked-marks"])}).strict(),source:E.optional(),originalSource:E.optional(),saved:N.nullable().optional(),transcript:U.nullable().optional(),holdToken:r().uuid().optional()}).strict().refine(t=>!t.source||t.source.path===t.attachmentPath&&t.source.attachmentId===t.attachmentId&&t.source.kind===t.kind,"Source does not match the attachment").refine(t=>!t.saved||!!t.source&&t.saved.sourceId===t.source.id&&t.saved.sourceRevision===t.source.revision,"Edit does not match the source").refine(t=>!t.originalSource||t.source?.kind==="screenshot"&&t.originalSource.kind==="screenshot"&&t.originalSource.id!==t.source.id,"Original source does not precede this source");u({openId:r().uuid(),intent:M("attach").optional()}).strict();u({openId:r().uuid(),accept:B()}).strict();u({token:r().uuid(),hide:M(!0).optional()}).strict();u({openId:r().uuid(),requestId:r().uuid()}).strict();u({requestId:r().uuid(),result:x(["saved","stale-source","revision-conflict","failed"]),saved:N.optional()}).strict().refine(t=>t.result==="saved"==!!t.saved,"Saved edit missing");u({pair:u({workspaceId:r().min(1).max(200),agentId:r().min(1).max(200)}).strict(),sourceId:r().min(1).max(512),sourceRevision:h().int().nonnegative(),transcript:U}).strict();nt([u({requestId:r().uuid(),ok:M(!0),source:E}).strict(),u({requestId:r().uuid(),ok:M(!1),error:x(["cancelled","permission","failed"])}).strict()]);const dt=2e4;u({openId:r().uuid(),markId:r().min(1).max(512),generation:h().int().nonnegative(),phase:x(["start","stop"])}).strict();u({requestId:r().uuid(),generation:h().int().nonnegative(),text:r().max(dt),final:B(),error:x(["busy","unavailable","failed","permission"]).optional()}).strict().refine(t=>!t.error||t.final,"An error is final");u({pair:u({workspaceId:r().min(1).max(200),agentId:r().min(1).max(200)}).strict(),sourceId:r().min(1).max(512),sourceRevision:h().int().nonnegative(),waveform:lt}).strict();const bt=u({requestId:r().uuid(),openId:w,pair:u({workspaceId:w,agentId:w}).strict(),kind:x(["screenshot","recording"]),attachmentId:w,sourceId:w.optional(),sourceRevision:h().int().nonnegative().optional(),expectedEditRevision:h().int().nonnegative().optional()}).strict();u({requestId:r().uuid(),result:x(["deleted","stale-source","failed"])}).strict();const It=u({endedOpenId:r().uuid()}).strict();export{xt as D,d as a,dt as b,bt as c,It as d,kt as e,wt as f,$ as g,gt as h,ot as i,K as j,L as k,H as l,pt as m,j as p,yt as r};