@intent-hq/web 2.381.2 → 2.383.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 (334) hide show
  1. package/package.json +1 -1
  2. package/web/app/immutable/assets/0.BmwjvpSF.css +1 -0
  3. package/web/app/immutable/chunks/{BeKKPzED.js → -K3ARgq0.js} +1 -1
  4. package/web/app/immutable/chunks/{DlZ4XLhX.js → 0HRWclfL.js} +1 -1
  5. package/web/app/immutable/chunks/{B1TqZZyd.js → 1WR8MecL.js} +3 -3
  6. package/web/app/immutable/chunks/{BROVaoRF.js → 1mf839wD.js} +1 -1
  7. package/web/app/immutable/chunks/{zFOAQ-fV.js → 3xK9OOJy.js} +1 -1
  8. package/web/app/immutable/chunks/{e9FnhdhA.js → 4BrIaRe_.js} +1 -1
  9. package/web/app/immutable/chunks/{C9RagC2N.js → 518Fef2L.js} +1 -1
  10. package/web/app/immutable/chunks/{zOXOu59X.js → 6-uYidyP.js} +3 -3
  11. package/web/app/immutable/chunks/{E-ElQTlm.js → 68Tuqjp3.js} +1 -1
  12. package/web/app/immutable/chunks/{CuMJ0LCw.js → 6Bqipt1r.js} +1 -1
  13. package/web/app/immutable/chunks/{CyczJyMt.js → 7UPrdiE9.js} +1 -1
  14. package/web/app/immutable/chunks/{Cywj8P1v.js → 8r75D0ru.js} +1 -1
  15. package/web/app/immutable/chunks/{gtC5KXEz.js → 9bukzQMK.js} +1 -1
  16. package/web/app/immutable/chunks/{H_09C3Qv.js → 9gSjzhYc.js} +1 -1
  17. package/web/app/immutable/chunks/A9niI_uA.js +1 -0
  18. package/web/app/immutable/chunks/{CEUJ2SOA.js → AlEhxd2n.js} +1 -1
  19. package/web/app/immutable/chunks/{B4Uud3OJ.js → B-ef1MlI.js} +1 -1
  20. package/web/app/immutable/chunks/{DN6qgMae.js → B2Ym4lhl.js} +1 -1
  21. package/web/app/immutable/chunks/{CDnYwtBR.js → B2f9w8eB.js} +1 -1
  22. package/web/app/immutable/chunks/{DVHfIJ_U.js → B2kb4xeF.js} +1 -1
  23. package/web/app/immutable/chunks/{CkEbA_As.js → B2nCyo89.js} +1 -1
  24. package/web/app/immutable/chunks/{D2MSvsFH.js → B3Bfek34.js} +1 -1
  25. package/web/app/immutable/chunks/{BmQQcH5z.js → B4SiDSWP.js} +1 -1
  26. package/web/app/immutable/chunks/{Dq39ODex.js → B4WuQori.js} +1 -1
  27. package/web/app/immutable/chunks/{B4K17hnI.js → B4xSB_Hx.js} +1 -1
  28. package/web/app/immutable/chunks/{DRdEaij1.js → B5M0SkuR.js} +1 -1
  29. package/web/app/immutable/chunks/{BZKoidWB.js → B6S6VNu7.js} +1 -1
  30. package/web/app/immutable/chunks/{Bg4SPgrZ.js → B6STvYyK.js} +1 -1
  31. package/web/app/immutable/chunks/{qE-X6VV1.js → B8-Q1tED.js} +1 -1
  32. package/web/app/immutable/chunks/{BIIYZtt3.js → B9oKJyXc.js} +1 -1
  33. package/web/app/immutable/chunks/{C-931TJ0.js → BA-rwlhs.js} +1 -1
  34. package/web/app/immutable/chunks/{BX63FB9x.js → BAKPnd3w.js} +1 -1
  35. package/web/app/immutable/chunks/{Bt_5d6KS.js → BAOaoX22.js} +1 -1
  36. package/web/app/immutable/chunks/{D5Rd8qkd.js → BE6Cp7Qp.js} +1 -1
  37. package/web/app/immutable/chunks/{Ue-wYmxq.js → BETzmOvF.js} +1 -1
  38. package/web/app/immutable/chunks/{Bmt71DMB.js → BFEzojY2.js} +1 -1
  39. package/web/app/immutable/chunks/{9mNi8996.js → BFIcslMA.js} +2 -2
  40. package/web/app/immutable/chunks/{CKFaA258.js → BFeEPayU.js} +1 -1
  41. package/web/app/immutable/chunks/{BOzF_1jP.js → BG9tvqwj.js} +1 -1
  42. package/web/app/immutable/chunks/{CVuT-llE.js → BGTRTFMR.js} +1 -1
  43. package/web/app/immutable/chunks/BIVeXMBl.js +1 -0
  44. package/web/app/immutable/chunks/{DMhc83bo.js → BJWt3PU_.js} +1 -1
  45. package/web/app/immutable/chunks/{CL_Wu5hL.js → BJ_CKcUH.js} +1 -1
  46. package/web/app/immutable/chunks/{bT3v1QYj.js → BO_DS0RP.js} +1 -1
  47. package/web/app/immutable/chunks/{B3TTR8D_.js → BP3Sccje.js} +1 -1
  48. package/web/app/immutable/chunks/{DAY78LgA.js → BP4Hm_tD.js} +2 -2
  49. package/web/app/immutable/chunks/{xlIh55VB.js → BP5uGGO_.js} +1 -1
  50. package/web/app/immutable/chunks/{BavAnT42.js → BPL5Fo2b.js} +1 -1
  51. package/web/app/immutable/chunks/{DnbNqDYS.js → BSKFIBj2.js} +1 -1
  52. package/web/app/immutable/chunks/{BJGbabcl.js → BSKf8bnG.js} +1 -1
  53. package/web/app/immutable/chunks/{CkyY-zEo.js → BTrqJIJZ.js} +1 -1
  54. package/web/app/immutable/chunks/{DPCjIvYy.js → BUGeL7WE.js} +1 -1
  55. package/web/app/immutable/chunks/{vnEDE6VU.js → BUQUek8g.js} +1 -1
  56. package/web/app/immutable/chunks/{CoHtEoLb.js → BURZJh0r.js} +1 -1
  57. package/web/app/immutable/chunks/{CgbisBm3.js → BWGnuS1v.js} +1 -1
  58. package/web/app/immutable/chunks/{Besc4d7d.js → BWYuMy_r.js} +1 -1
  59. package/web/app/immutable/chunks/{dzRbajCR.js → BX-0SVP7.js} +1 -1
  60. package/web/app/immutable/chunks/{DZTelE6-.js → BX-LCSle.js} +1 -1
  61. package/web/app/immutable/chunks/{Bkn9MGZb.js → BYq9VtBF.js} +1 -1
  62. package/web/app/immutable/chunks/{7Co-pRoL.js → B_LcgbLl.js} +1 -1
  63. package/web/app/immutable/chunks/{B-wL6Wzy.js → Ba8ctcpl.js} +1 -1
  64. package/web/app/immutable/chunks/{DQdDAxOz.js → BaujsV9k.js} +1 -1
  65. package/web/app/immutable/chunks/{s7AiPAor.js → BcpfdNy8.js} +1 -1
  66. package/web/app/immutable/chunks/{BQyGe_6f.js → BeNn_MBw.js} +1 -1
  67. package/web/app/immutable/chunks/{BB82Eb4D.js → BeOwB_6G.js} +1 -1
  68. package/web/app/immutable/chunks/{DDHXn0gy.js → BfojStRz.js} +1 -1
  69. package/web/app/immutable/chunks/{DtV42LL1.js → BfvZe-kN.js} +6 -6
  70. package/web/app/immutable/chunks/{jExJ4qw0.js → Bir0Y4gf.js} +2 -2
  71. package/web/app/immutable/chunks/{pGhuLhmB.js → BlDljC9y.js} +1 -1
  72. package/web/app/immutable/chunks/{Ah-onPNG.js → BmTMWrby.js} +1 -1
  73. package/web/app/immutable/chunks/{CLbTxOfk.js → BmUPAQa9.js} +1 -1
  74. package/web/app/immutable/chunks/{BCl5zPXa.js → Bn880vDO.js} +1 -1
  75. package/web/app/immutable/chunks/{De9e0mT0.js → Bs2WE18g.js} +1 -1
  76. package/web/app/immutable/chunks/{D5zGpim8.js → Bs9K_x5H.js} +1 -1
  77. package/web/app/immutable/chunks/{oLeo92vY.js → BsN2abqQ.js} +1 -1
  78. package/web/app/immutable/chunks/{HWtwQJMe.js → Bsh6nUhU.js} +1 -1
  79. package/web/app/immutable/chunks/{CTzwWQun.js → BsrrIQeo.js} +1 -1
  80. package/web/app/immutable/chunks/{CE-ONoWm.js → BtTA7CNV.js} +1 -1
  81. package/web/app/immutable/chunks/{BWLItowS.js → Bty1UglO.js} +1 -1
  82. package/web/app/immutable/chunks/{BORX4QsI.js → Bu7LYnzn.js} +1 -1
  83. package/web/app/immutable/chunks/{DwzqUxIw.js → Bvi-fRGz.js} +1 -1
  84. package/web/app/immutable/chunks/{Dpd18D9E.js → BwG2vfja.js} +1 -1
  85. package/web/app/immutable/chunks/{DLs0Gu12.js → BxEf7uwl.js} +1 -1
  86. package/web/app/immutable/chunks/{D1BWZmii.js → BxJ6X-Sl.js} +1 -1
  87. package/web/app/immutable/chunks/{BzWnUeNO.js → BypvqIQM.js} +1 -1
  88. package/web/app/immutable/chunks/{BEGsYnq4.js → Bz7R1ahj.js} +4 -4
  89. package/web/app/immutable/chunks/{D2KaVfIR.js → C0I_aIej.js} +2 -2
  90. package/web/app/immutable/chunks/C0QTy0Sy.js +1 -0
  91. package/web/app/immutable/chunks/{Bz7B58eG.js → C1EvfTg-.js} +1 -1
  92. package/web/app/immutable/chunks/{CtJr8Pwg.js → C45U06qp.js} +1 -1
  93. package/web/app/immutable/chunks/{DVkTXE2a.js → C4JXGtw1.js} +1 -1
  94. package/web/app/immutable/chunks/{C1hbmGxM.js → C4JbSg3f.js} +1 -1
  95. package/web/app/immutable/chunks/{Fh9R4BHC.js → C4QKwtCH.js} +1 -1
  96. package/web/app/immutable/chunks/{BgdV71H8.js → C5yhcKTW.js} +1 -1
  97. package/web/app/immutable/chunks/{CsY5Dftt.js → C6mS8uZB.js} +1 -1
  98. package/web/app/immutable/chunks/{B3Muoj7H.js → C7LIHk5_.js} +1 -1
  99. package/web/app/immutable/chunks/{Cr-iZ9Tf.js → C8HkqBCb.js} +1 -1
  100. package/web/app/immutable/chunks/{Da_Z6CgM.js → C8y9EItt.js} +1 -1
  101. package/web/app/immutable/chunks/{B6jOBMKj.js → CAgnBDaV.js} +3 -3
  102. package/web/app/immutable/chunks/{BE66F_G_.js → CAvYeStH.js} +1 -1
  103. package/web/app/immutable/chunks/{Dy2ZTySC.js → CCqqosml.js} +1 -1
  104. package/web/app/immutable/chunks/{KWmquGlL.js → CDK_hSiv.js} +1 -1
  105. package/web/app/immutable/chunks/{CXCeVP0_.js → CDjpuJh0.js} +1 -1
  106. package/web/app/immutable/chunks/{3Tv2tBbo.js → CE7VCun2.js} +3 -3
  107. package/web/app/immutable/chunks/{Yy6hnibL.js → CE7dsja4.js} +1 -1
  108. package/web/app/immutable/chunks/{CPvBbiM1.js → CEgeN2ws.js} +1 -1
  109. package/web/app/immutable/chunks/{RNoFqjp6.js → CFny5dMa.js} +1 -1
  110. package/web/app/immutable/chunks/{DaYz5Oxb.js → CFvBUo4R.js} +3 -3
  111. package/web/app/immutable/chunks/{C9K8tC7J.js → CHLX1QZz.js} +1 -1
  112. package/web/app/immutable/chunks/{Bwqr9iPo.js → CJ4Z96pe.js} +1 -1
  113. package/web/app/immutable/chunks/{CngHTAnD.js → CMrw-y4l.js} +13 -13
  114. package/web/app/immutable/chunks/{B828qkf6.js → CMu-09q3.js} +1 -1
  115. package/web/app/immutable/chunks/{CYDXSK8a.js → CNAgTnv2.js} +1 -1
  116. package/web/app/immutable/chunks/{I_40sZHA.js → CO5zWp8I.js} +1 -1
  117. package/web/app/immutable/chunks/{b16NDDfn.js → COhRCR9P.js} +2 -2
  118. package/web/app/immutable/chunks/CPQ-kfy2.js +1 -0
  119. package/web/app/immutable/chunks/{lEWu7gpF.js → CPTZJWC9.js} +1 -1
  120. package/web/app/immutable/chunks/{BQzm8t-k.js → CRZZ_hOy.js} +1 -1
  121. package/web/app/immutable/chunks/{Cy0xJYMG.js → CRs9zG2A.js} +1 -1
  122. package/web/app/immutable/chunks/{BFjAz9so.js → CSRYV6LQ.js} +1 -1
  123. package/web/app/immutable/chunks/{C7vw9rpc.js → CSVgdt55.js} +1 -1
  124. package/web/app/immutable/chunks/{F6tZeezN.js → CU5jKGma.js} +1 -1
  125. package/web/app/immutable/chunks/{BIGXb0qV.js → CUkDMZwP.js} +1 -1
  126. package/web/app/immutable/chunks/{B_L3BWUb.js → CXS2Ba3S.js} +1 -1
  127. package/web/app/immutable/chunks/{wQP9H0b5.js → CY4fyoCV.js} +1 -1
  128. package/web/app/immutable/chunks/{B_9Y0vrL.js → CYtPXqgK.js} +1 -1
  129. package/web/app/immutable/chunks/C_1hI7HP.js +1 -0
  130. package/web/app/immutable/chunks/{CN0TD23u.js → C_78iNNC.js} +1 -1
  131. package/web/app/immutable/chunks/{B2JbncL-.js → C_KuQ05a.js} +1 -1
  132. package/web/app/immutable/chunks/{C4Fxj3Dv.js → CbqxWBi7.js} +1 -1
  133. package/web/app/immutable/chunks/{C9qmiGPA.js → Cf4fmkfL.js} +1 -1
  134. package/web/app/immutable/chunks/{Cy1eIaf4.js → ChTVnFH2.js} +1 -1
  135. package/web/app/immutable/chunks/{P-6iyz0U.js → CiMmbOsB.js} +1 -1
  136. package/web/app/immutable/chunks/{CHDBPeiu.js → CjTo2K46.js} +1 -1
  137. package/web/app/immutable/chunks/{76a0x163.js → CkA2ItLw.js} +1 -1
  138. package/web/app/immutable/chunks/{oxrHj9WB.js → Cmq0pZIQ.js} +2 -2
  139. package/web/app/immutable/chunks/{hOsZO8to.js → CmrjfWYI.js} +1 -1
  140. package/web/app/immutable/chunks/{CvmogvXF.js → Co4vj0dC.js} +1 -1
  141. package/web/app/immutable/chunks/{BzpQRjDP.js → Cqa6LF3b.js} +1 -1
  142. package/web/app/immutable/chunks/CqcqWJoa.js +1 -0
  143. package/web/app/immutable/chunks/CrD0jtXE.js +1 -0
  144. package/web/app/immutable/chunks/{CHiOQIO1.js → CrkMZYjb.js} +1 -1
  145. package/web/app/immutable/chunks/{CVQJ3G9r.js → Cs2lHsyA.js} +1 -1
  146. package/web/app/immutable/chunks/{B_TGsMEB.js → Csc9ETIC.js} +1 -1
  147. package/web/app/immutable/chunks/{nMcdiCb6.js → CtNkh9GR.js} +1 -1
  148. package/web/app/immutable/chunks/{Cgjp6r06.js → Ct_q9q1G.js} +1 -1
  149. package/web/app/immutable/chunks/{DLncssSx.js → Ctbo6mXV.js} +1 -1
  150. package/web/app/immutable/chunks/{8OEJW7fY.js → CuW3cq2w.js} +1 -1
  151. package/web/app/immutable/chunks/{wJF9cAcZ.js → CuewocoW.js} +1 -1
  152. package/web/app/immutable/chunks/{D_2nAvGE.js → CxOmNieJ.js} +1 -1
  153. package/web/app/immutable/chunks/D-zjf2Af.js +1 -0
  154. package/web/app/immutable/chunks/{DhkuGmLb.js → D37getya.js} +1 -1
  155. package/web/app/immutable/chunks/{BtCfKiJI.js → D3O8Vtuw.js} +1 -1
  156. package/web/app/immutable/chunks/{BgfkQ05m.js → D3p_bZm7.js} +1 -1
  157. package/web/app/immutable/chunks/{B6v6locT.js → D51XIZYq.js} +1 -1
  158. package/web/app/immutable/chunks/{BGr1zUsV.js → D5tDp1i8.js} +1 -1
  159. package/web/app/immutable/chunks/{SCoe-XeJ.js → D5xMHmv3.js} +1 -1
  160. package/web/app/immutable/chunks/{DT_2ysGq.js → D6dlPeEM.js} +1 -1
  161. package/web/app/immutable/chunks/{CMzQ5CXp.js → D73nBZuu.js} +1 -1
  162. package/web/app/immutable/chunks/{Do7ouyXz.js → D8ohaX19.js} +1 -1
  163. package/web/app/immutable/chunks/{dnTowHeA.js → D9XKwVJX.js} +3 -3
  164. package/web/app/immutable/chunks/{B4GJOofT.js → DA5opfEp.js} +1 -1
  165. package/web/app/immutable/chunks/{BOSZ-Hrc.js → DB7RVYiL.js} +1 -1
  166. package/web/app/immutable/chunks/{CfRm3l5p.js → DC8keNAk.js} +1 -1
  167. package/web/app/immutable/chunks/{C8SLclsn.js → DCK8dPAL.js} +1 -1
  168. package/web/app/immutable/chunks/{Bl3Cuor0.js → DCRuihKm.js} +2 -2
  169. package/web/app/immutable/chunks/{CxSmnqpJ.js → DE7dSDHO.js} +1 -1
  170. package/web/app/immutable/chunks/{D2ZHHwj-.js → DEVX5wOm.js} +2 -2
  171. package/web/app/immutable/chunks/{ByhEuqgY.js → DF2_1gr9.js} +1 -1
  172. package/web/app/immutable/chunks/{zdyRQTcF.js → DFcppVBl.js} +1 -1
  173. package/web/app/immutable/chunks/{EW9Oxsda.js → DGa13zF2.js} +1 -1
  174. package/web/app/immutable/chunks/{CfHaUU8C.js → DIFhl0he.js} +1 -1
  175. package/web/app/immutable/chunks/{6eBy--fo.js → DIG1mTAN.js} +2 -2
  176. package/web/app/immutable/chunks/{mg5SY1J3.js → DIKTPgAK.js} +1 -1
  177. package/web/app/immutable/chunks/{BiKalUOw.js → DK-ttWlY.js} +1 -1
  178. package/web/app/immutable/chunks/{CnT7X_Ka.js → DKHY8q_S.js} +1 -1
  179. package/web/app/immutable/chunks/{DJS9lO4g.js → DLbcryNV.js} +1 -1
  180. package/web/app/immutable/chunks/{C4_TlGj0.js → DLwWVKiF.js} +1 -1
  181. package/web/app/immutable/chunks/{Bw803iNn.js → DMDFfHqn.js} +3 -3
  182. package/web/app/immutable/chunks/{3BCA27_7.js → DMQmPhTl.js} +1 -1
  183. package/web/app/immutable/chunks/{CmLRC7-r.js → DN6OUhsP.js} +1 -1
  184. package/web/app/immutable/chunks/{BUfNfMkk.js → DO19lrhU.js} +1 -1
  185. package/web/app/immutable/chunks/{CHyLxrMv.js → DOEI9gYY.js} +1 -1
  186. package/web/app/immutable/chunks/{CJotcdQg.js → DPA45OJk.js} +1 -1
  187. package/web/app/immutable/chunks/{tFT894m3.js → DPYlDye0.js} +1 -1
  188. package/web/app/immutable/chunks/{BLCYnNxp.js → DQ_mNIfK.js} +1 -1
  189. package/web/app/immutable/chunks/{CZpxXUzD.js → DR4Kh2SL.js} +1 -1
  190. package/web/app/immutable/chunks/{CpCzAUi8.js → DSbNJBwA.js} +1 -1
  191. package/web/app/immutable/chunks/{CrtOf2Rt.js → DTuql3Rj.js} +1 -1
  192. package/web/app/immutable/chunks/{Ckr4n1ss.js → DUIwUF5m.js} +1 -1
  193. package/web/app/immutable/chunks/{CpxnRRai.js → DVROSXw1.js} +1 -1
  194. package/web/app/immutable/chunks/{Dk_2gwLu.js → DWWC1JsA.js} +1 -1
  195. package/web/app/immutable/chunks/{BG_RlrpY.js → DWiU4388.js} +1 -1
  196. package/web/app/immutable/chunks/{CplGIhI5.js → DX-Wrapd.js} +1 -1
  197. package/web/app/immutable/chunks/{C1Zw9RUp.js → DXBEIeJu.js} +1 -1
  198. package/web/app/immutable/chunks/{BKMwkk7g.js → DY0qeQe8.js} +1 -1
  199. package/web/app/immutable/chunks/{CaBTNP9L.js → D_Xpj-6r.js} +1 -1
  200. package/web/app/immutable/chunks/{o9vqVVAE.js → D_ovLyyd.js} +1 -1
  201. package/web/app/immutable/chunks/{CbUxbw3N.js → Db3Wob9h.js} +1 -1
  202. package/web/app/immutable/chunks/{BD4C_b2Z.js → DdXBqrnq.js} +1 -1
  203. package/web/app/immutable/chunks/{C__OzIly.js → DeHvIzqj.js} +2 -2
  204. package/web/app/immutable/chunks/{aDC6CW-9.js → Dfg3lB2h.js} +1 -1
  205. package/web/app/immutable/chunks/{DqfOHbUh.js → Djp7mdlG.js} +1 -1
  206. package/web/app/immutable/chunks/{DgQzilAi.js → DjxLojU4.js} +1 -1
  207. package/web/app/immutable/chunks/{3ozr1vad.js → DlJZrxef.js} +2 -2
  208. package/web/app/immutable/chunks/{IPb2sVOc.js → DliHiH6M.js} +4 -4
  209. package/web/app/immutable/chunks/{BZRdDiLW.js → Dlk4BhFg.js} +1 -1
  210. package/web/app/immutable/chunks/{DCfPUdw9.js → DlliJA4a.js} +3 -3
  211. package/web/app/immutable/chunks/{D6uQnPIb.js → DnJ4jlPB.js} +1 -1
  212. package/web/app/immutable/chunks/{gWn9PDXZ.js → DpHn84BV.js} +1 -1
  213. package/web/app/immutable/chunks/{Cg1tTx8i.js → DpMOdl0E.js} +1 -1
  214. package/web/app/immutable/chunks/{Bz8C2v0s.js → DpyfxjgC.js} +1 -1
  215. package/web/app/immutable/chunks/{ko5zX9YA.js → Dqdvt4Zr.js} +1 -1
  216. package/web/app/immutable/chunks/{CKt7lvPP.js → DrIA1Azf.js} +1 -1
  217. package/web/app/immutable/chunks/{BX43DT22.js → DrxfcnSy.js} +1 -1
  218. package/web/app/immutable/chunks/{CE095mBY.js → DsGUBv3k.js} +1 -1
  219. package/web/app/immutable/chunks/{DtqWU30y.js → Dsr4GELp.js} +1 -1
  220. package/web/app/immutable/chunks/DtF9DVpp.js +1 -0
  221. package/web/app/immutable/chunks/{BkliVAqJ.js → DvSURWC2.js} +4 -4
  222. package/web/app/immutable/chunks/{Gi8kzv-V.js → DvUGkiYP.js} +1 -1
  223. package/web/app/immutable/chunks/{CLiKsUcS.js → DvYUfzNR.js} +1 -1
  224. package/web/app/immutable/chunks/{BIon5kwa.js → Dw8wIAFi.js} +1 -1
  225. package/web/app/immutable/chunks/{D4XZeMXl.js → DwL1A1su.js} +1 -1
  226. package/web/app/immutable/chunks/{B-4Cm2na.js → DzWZGIya.js} +1 -1
  227. package/web/app/immutable/chunks/{D81Tox6K.js → EK6zOAHM.js} +1 -1
  228. package/web/app/immutable/chunks/{CESUeVmp.js → FzlZUztb.js} +1 -1
  229. package/web/app/immutable/chunks/{rdao0YQj.js → IQ13JH5A.js} +1 -1
  230. package/web/app/immutable/chunks/{DgW5R9bn.js → J8_M56d9.js} +1 -1
  231. package/web/app/immutable/chunks/{y7Ugu8WS.js → KHteWVFN.js} +1 -1
  232. package/web/app/immutable/chunks/{CxRJqvXa.js → KYuLFpkq.js} +1 -1
  233. package/web/app/immutable/chunks/{5DxHNwZe.js → L4HdMFBq.js} +1 -1
  234. package/web/app/immutable/chunks/{c5MBfH9F.js → L7j-Q29w.js} +1 -1
  235. package/web/app/immutable/chunks/{DvQWx7ZN.js → L_tYoUCb.js} +1 -1
  236. package/web/app/immutable/chunks/{BFqSYY_K.js → M5Dwuu-X.js} +1 -1
  237. package/web/app/immutable/chunks/{BNrkXLIB.js → No1eCFy3.js} +1 -1
  238. package/web/app/immutable/chunks/{DEelt7b0.js → OFhgRaUm.js} +1 -1
  239. package/web/app/immutable/chunks/{Q7XiOE5T.js → OtomGvb3.js} +1 -1
  240. package/web/app/immutable/chunks/{DIQ23RZn.js → PIgqsYsQ.js} +1 -1
  241. package/web/app/immutable/chunks/{CV9F7g3O.js → PO_5m99x.js} +1 -1
  242. package/web/app/immutable/chunks/{BCx2RJGr.js → QeBH-DWE.js} +1 -1
  243. package/web/app/immutable/chunks/{D7kKwL53.js → RFsxwSsB.js} +1 -1
  244. package/web/app/immutable/chunks/{Be5foFms.js → S845NCb3.js} +1 -1
  245. package/web/app/immutable/chunks/{BzJwOhb5.js → S8ugWfAx.js} +1 -1
  246. package/web/app/immutable/chunks/{DQEQvBuM.js → U9jJmfYa.js} +1 -1
  247. package/web/app/immutable/chunks/{CfC-LCr9.js → U_OQY9n3.js} +1 -1
  248. package/web/app/immutable/chunks/{BR1_dE35.js → UhL0ohiG.js} +1 -1
  249. package/web/app/immutable/chunks/{DkPs4gWX.js → W2WLehNu.js} +1 -1
  250. package/web/app/immutable/chunks/{DYTNWFlt.js → XCWZeNYo.js} +1 -1
  251. package/web/app/immutable/chunks/{xAGiw113.js → Y5Ky10uA.js} +1 -1
  252. package/web/app/immutable/chunks/{Do1K3fjZ.js → _SYFiE9N.js} +1 -1
  253. package/web/app/immutable/chunks/{DdtN-mI9.js → a3TFelkn.js} +1 -1
  254. package/web/app/immutable/chunks/{Bxk8XeS_.js → baWz1QxB.js} +1 -1
  255. package/web/app/immutable/chunks/{Gpf-ce3t.js → bhKPSdq4.js} +1 -1
  256. package/web/app/immutable/chunks/{CcrFwPvM.js → c5QZsH9t.js} +1 -1
  257. package/web/app/immutable/chunks/{DYXQ0DvL.js → cebxNJuC.js} +4 -4
  258. package/web/app/immutable/chunks/{CYodIWBo.js → chjnSxvZ.js} +1 -1
  259. package/web/app/immutable/chunks/{DYltC5LY.js → duDdSCAT.js} +1 -1
  260. package/web/app/immutable/chunks/{Bfi3_8Hc.js → eElW3aeh.js} +1 -1
  261. package/web/app/immutable/chunks/{BdSrsYxv.js → eQVXRlbn.js} +1 -1
  262. package/web/app/immutable/chunks/{_Juvw-ie.js → eTsHzcIE.js} +3 -3
  263. package/web/app/immutable/chunks/{CNXu44c3.js → ebbVP0tp.js} +1 -1
  264. package/web/app/immutable/chunks/{0chz2rsS.js → f24VwgrA.js} +1 -1
  265. package/web/app/immutable/chunks/{BGozEqB2.js → fiz8N_zQ.js} +1 -1
  266. package/web/app/immutable/chunks/{Cr4NRN2o.js → hHMYoFyG.js} +1 -1
  267. package/web/app/immutable/chunks/{Ba-gJiCF.js → haN7a3Sc.js} +1 -1
  268. package/web/app/immutable/chunks/{J4xkCilS.js → hb4NYXGo.js} +1 -1
  269. package/web/app/immutable/chunks/{DsbDY3sD.js → jcl0zObl.js} +2 -2
  270. package/web/app/immutable/chunks/{Dxv5pbru.js → jn4zbMQy.js} +1 -1
  271. package/web/app/immutable/chunks/k0JmlCVk.js +2 -0
  272. package/web/app/immutable/chunks/{Cc08a9kX.js → kS6Z7jzP.js} +1 -1
  273. package/web/app/immutable/chunks/{D5CeMpEM.js → kjxbkPQZ.js} +1 -1
  274. package/web/app/immutable/chunks/{DwgOf6Jh.js → lJeex2Gh.js} +1 -1
  275. package/web/app/immutable/chunks/{BTQKLXYi.js → lVh2oAeQ.js} +1 -1
  276. package/web/app/immutable/chunks/{DVIpt_-b.js → lwlI9u_5.js} +1 -1
  277. package/web/app/immutable/chunks/{DQzjOLwV.js → nXfD7jHz.js} +2 -2
  278. package/web/app/immutable/chunks/{C5BT0KwE.js → ozVAo4aX.js} +1 -1
  279. package/web/app/immutable/chunks/{EfOpqeLT.js → p9X2tUBM.js} +1 -1
  280. package/web/app/immutable/chunks/{COWdAscC.js → pYQh_Bw_.js} +1 -1
  281. package/web/app/immutable/chunks/{CDGdQPZ3.js → puJFvQs5.js} +1 -1
  282. package/web/app/immutable/chunks/{DwlFFy2U.js → pwJelZzH.js} +1 -1
  283. package/web/app/immutable/chunks/{Bf8Z3F34.js → sdV4t8T0.js} +1 -1
  284. package/web/app/immutable/chunks/{VtSYBFwm.js → tZyAiGvb.js} +1 -1
  285. package/web/app/immutable/chunks/{9xo585Vy.js → tr-2J8Mf.js} +1 -1
  286. package/web/app/immutable/chunks/{DhKLQ_6L.js → ujhgjK1k.js} +1 -1
  287. package/web/app/immutable/chunks/{CCHulQ4M.js → v0ybYtGc.js} +1 -1
  288. package/web/app/immutable/chunks/{Cf9FKQ2t.js → viB2mzAd.js} +1 -1
  289. package/web/app/immutable/chunks/{CFhJzMqD.js → wIMcEpgB.js} +1 -1
  290. package/web/app/immutable/chunks/{BnV5imkg.js → wUSGg9l9.js} +1 -1
  291. package/web/app/immutable/chunks/{DQGxxGZP.js → wl2qP2wF.js} +1 -1
  292. package/web/app/immutable/chunks/{DZldOwzL.js → yFcbscNn.js} +1 -1
  293. package/web/app/immutable/entry/app.PfV9Bd5g.js +4 -0
  294. package/web/app/immutable/entry/start.kviRYMjm.js +1 -0
  295. package/web/app/immutable/nodes/{0.XjTeJo8S.js → 0.N3QFhxpx.js} +1 -1
  296. package/web/app/immutable/nodes/{1.WAn52SGO.js → 1.Cuki-Q-c.js} +1 -1
  297. package/web/app/immutable/nodes/{10.BCt95gGF.js → 10.CzZBTiyD.js} +5 -5
  298. package/web/app/immutable/nodes/{11.D9nZjMrf.js → 11.Cc53X5P2.js} +1 -1
  299. package/web/app/immutable/nodes/{12.J0j9wF8Z.js → 12.BpXDHhXi.js} +1 -1
  300. package/web/app/immutable/nodes/{13.BGHXM182.js → 13.CCKyw-_o.js} +1 -1
  301. package/web/app/immutable/nodes/{14.BpDGhzOE.js → 14.BD92xFv4.js} +3 -3
  302. package/web/app/immutable/nodes/{15.DTHSLR65.js → 15.D2GMHiSb.js} +1 -1
  303. package/web/app/immutable/nodes/{16.WKc2P4l3.js → 16.CVCm-nfj.js} +1 -1
  304. package/web/app/immutable/nodes/{17.f0RTyi1E.js → 17.CjKvJw8X.js} +1 -1
  305. package/web/app/immutable/nodes/{18.BCr1DqlF.js → 18.DDY8Eqsn.js} +1 -1
  306. package/web/app/immutable/nodes/{19.kyknfcua.js → 19.DvFJngD4.js} +2 -2
  307. package/web/app/immutable/nodes/{2.BhjQOmpc.js → 2.B94-26jU.js} +4 -4
  308. package/web/app/immutable/nodes/{20.DJSk2vW3.js → 20.CLsq1QLL.js} +1 -1
  309. package/web/app/immutable/nodes/{3.B5ONUR90.js → 3.D7lbuuWp.js} +1 -1
  310. package/web/app/immutable/nodes/{4.9E3WAn5x.js → 4.YSZzuDIT.js} +1 -1
  311. package/web/app/immutable/nodes/5.ymicNL_Y.js +1 -0
  312. package/web/app/immutable/nodes/{6.DC2CoHu2.js → 6.CtS0PFqR.js} +1 -1
  313. package/web/app/immutable/nodes/{7.ipL23qll.js → 7.BVAyauMB.js} +1 -1
  314. package/web/app/immutable/nodes/{8.H6jtZ1r2.js → 8.CHlBOO6u.js} +1 -1
  315. package/web/app/immutable/nodes/9.CNAqB0x1.js +14 -0
  316. package/web/app/immutable/workers/html-file-preview.worker-BfFljPK-.js +1 -0
  317. package/web/app/version.json +1 -1
  318. package/web/generated/paraglide.js +46 -46
  319. package/web/index.html +19 -19
  320. package/web/app/immutable/assets/0.MRSSdFvi.css +0 -1
  321. package/web/app/immutable/chunks/B8JLAqaa.js +0 -1
  322. package/web/app/immutable/chunks/BEwMx-58.js +0 -1
  323. package/web/app/immutable/chunks/ChxY4HYP.js +0 -1
  324. package/web/app/immutable/chunks/DRhX_2TI.js +0 -1
  325. package/web/app/immutable/chunks/DWOJ689M.js +0 -1
  326. package/web/app/immutable/chunks/LCTocMEs.js +0 -1
  327. package/web/app/immutable/chunks/LNBns0B-.js +0 -1
  328. package/web/app/immutable/chunks/RXLk0Kpm.js +0 -1
  329. package/web/app/immutable/chunks/_FHZ2hc1.js +0 -2
  330. package/web/app/immutable/chunks/lZXQR9AV.js +0 -1
  331. package/web/app/immutable/entry/app.C9XhrjLK.js +0 -4
  332. package/web/app/immutable/entry/start.CkQDADa5.js +0 -1
  333. package/web/app/immutable/nodes/5.51b5Mc5a.js +0 -1
  334. package/web/app/immutable/nodes/9.qiIDO-mm.js +0 -12
@@ -1,5 +1,5 @@
1
- const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["/app/immutable/chunks/EfOpqeLT.js","/app/immutable/chunks/Ah-onPNG.js","/app/immutable/chunks/Bqd7fdCF.js","/app/immutable/chunks/CIyUrgF0.js","/app/immutable/chunks/BEwMx-58.js","/app/immutable/chunks/3SdAC2_C.js","/app/immutable/chunks/Gpf-ce3t.js","/app/immutable/chunks/CyczJyMt.js","/app/immutable/chunks/LNBns0B-.js","/app/immutable/assets/spinner.D_TRo5Hy.css","/app/immutable/chunks/CESUeVmp.js","/app/immutable/chunks/Dn334wJv.js","/app/immutable/chunks/BZKoidWB.js","/app/immutable/chunks/Bl3Cuor0.js","/app/immutable/chunks/B3Muoj7H.js","/app/immutable/chunks/uXuxG9cN.js","/app/immutable/assets/button.-yaUNjRS.css","/app/immutable/chunks/BIGXb0qV.js","/app/immutable/chunks/BeKKPzED.js","/app/immutable/chunks/Yy6hnibL.js","/app/immutable/chunks/BmQQcH5z.js","/app/immutable/chunks/9xo585Vy.js","/app/immutable/chunks/Dms_DO28.js","/app/immutable/chunks/ChTqQfQN.js","/app/immutable/chunks/CplGIhI5.js","/app/immutable/chunks/DxwfiAWm.js","/app/immutable/chunks/D9tVylVS.js","/app/immutable/chunks/DQEQvBuM.js","/app/immutable/chunks/C4_TlGj0.js","/app/immutable/chunks/DU3vNstz.js","/app/immutable/chunks/XJv96NUg.js","/app/immutable/assets/notify.B1j5oT2y.css","/app/immutable/chunks/DQdDAxOz.js","/app/immutable/chunks/DypB-Dwi.js","/app/immutable/chunks/DvQWx7ZN.js","/app/immutable/chunks/CL3a4Hm1.js","/app/immutable/chunks/BBWuirRW.js","/app/immutable/chunks/BdWqymET.js","/app/immutable/chunks/b16NDDfn.js","/app/immutable/chunks/DKwAaLwd.js","/app/immutable/chunks/CnT7X_Ka.js","/app/immutable/chunks/Be5foFms.js","/app/immutable/chunks/D4XZeMXl.js","/app/immutable/chunks/D81Tox6K.js","/app/immutable/chunks/C8SLclsn.js","/app/immutable/chunks/B5aYN90J.js","/app/immutable/chunks/CHDBPeiu.js","/app/immutable/chunks/CMiilI_P.js","/app/immutable/chunks/B_QPRXJ5.js","/app/immutable/chunks/CsY5Dftt.js","/app/immutable/chunks/DONrLvvt.js"])))=>i.map(i=>d[i]);
2
- var Rt=Object.defineProperty;var xt=(e,t,n)=>t in e?Rt(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n;var Pe=(e,t,n)=>xt(e,typeof t!="symbol"?t+"":t,n);import{Jv as M,m as be,nX as R,ws as Pt,Cq as Ge,wu as Bt,DE as Ye,cJ as Ot,cK as Lt,nY as Je,nK as Ut,i as ke,fU as $t,m9 as Nt,cR as Ht}from"./9xo585Vy.js";import{J as Ft,Z as Kt,dW as Be,cU as pe,dH as Wt,ax as qt,be as Xe,I as jt,e8 as Vt}from"./DQdDAxOz.js";import{e as zt,b as ae,F as Gt,y as re,_ as _e,G as Yt,C as Jt,W as Qe,v as Xt,u as Qt,M as Zt}from"./CplGIhI5.js";import{D as Oe,a as en,d as tn}from"./CQcEqK4G.js";import{m as nn,g as Ze,r as an,k as rn,D as sn}from"./Ba-gJiCF.js";import{e as on}from"./CL3a4Hm1.js";import{z as et,O as cn,R as ln}from"./Bqd7fdCF.js";import{a as dn}from"./CNXu44c3.js";import{f as un}from"./CYodIWBo.js";import{bm as h,_ as fe}from"./BEwMx-58.js";import{a8 as tt,aA as se,I as he,a as nt,n as at,cS as rt,e as st,aI as ot,M as mn,aa as pn,aV as Le,d as le,C as fn,cT as hn,U as gn,a4 as yn,aJ as wn,b_ as bn}from"./CpxnRRai.js";import{W as kn,L as _n,w as vn,R as Sn,h as it,M as An}from"./Bl3Cuor0.js";import{l as H,i as Mn,n as In}from"./Yy6hnibL.js";import{b as Tn}from"./CsY5Dftt.js";import{K as En,P as Cn,as as Dn,aC as Rn}from"./BEGsYnq4.js";import{a as Ue,b as xn,g as Pn}from"./DypB-Dwi.js";import{m as Bn}from"./CnT7X_Ka.js";import{m as On}from"./Ah-onPNG.js";import"./3SdAC2_C.js";import"./CyczJyMt.js";import"./LNBns0B-.js";import"./ChTqQfQN.js";import"./BmQQcH5z.js";import{i as ct}from"./Dms_DO28.js";import{C as Ln}from"./B5aYN90J.js";import{i as Un}from"./s7AiPAor.js";import{o as L,e as $n,l as z,s as E,n as ce,b as Nn,d as Hn,c as Fn}from"./CIyUrgF0.js";const Vr=M.createSelector((e,t)=>e.unreadTracking.dividerSessionByAgentId[t]??null),zr=M.createSelector(e=>e.unreadTracking.currentlyViewedAgentId),Gr=M.createSelector(e=>{const t=[];for(const s of Object.values(e.panelLayout.byWorkspaceId))for(const o of Object.values(s.panels))for(const i of o.tabs)i.type==="agent"&&i.agentId&&t.push(i.agentId);const n=Object.keys(e.unreadTracking.dividerSessionByAgentId),a=new Set(e.agentSessions.agentIdsByWorkspace[be]??[]);return{chiefCardVisible:e.sidebarNav.panelItem==="chief",chiefSessionAgentIds:n.filter(s=>a.has(s)),dividerSessionAgentIds:n,openAgentTabIds:t}});function Yr(e,t){if(e)return e.model}function Kn({messages:e,pendingInitialPrompt:t,pendingContextReferenceCount:n=0}){return e.length>0||!!t||n>0}function Jr({session:e,messages:t,pendingInitialPrompt:n,pendingContextReferenceCount:a=0}){return!(e?Ft(e):!1)&&!Kn({messages:t,pendingInitialPrompt:n,pendingContextReferenceCount:a})}function Xr(e){return Kt(e.messageMetadata)}function Wn(e){return{id:e.id,appMessageId:e.appMessageId,role:"user",timestamp:new Date(e.createdAt??0).toISOString(),contentBlocks:[...e.content?[{type:"text",text:e.content}]:[],...e.imageBlocks??[],...e.fileBlocks??[]],metadata:e.messageMetadata,...e.author!==void 0?{author:e.author}:{}}}function Qr(e){return Wn({...e,createdAt:Date.parse(e.queuedAt)})}const qn=8*1024*1024,jn=3*1024*1024;function Vn(e){return Math.ceil(Math.max(0,e)/3)*4}function zn(e){const t=e.promptBase64Bytes;return e.mimeType==="image/jpeg"&&Number.isSafeInteger(e.size)&&e.size>0&&e.size<=jn&&typeof t=="number"&&t===Vn(e.size)?t:null}async function lt(e,t,n,a,r=()=>{}){const s=()=>{if(!a())throw new Error("media-send-retired")};if(s(),r("overlay-render"),!n.exportMedia)throw new Error("media-export-unavailable");const o=dn(e.source,e.saved);if(o.length>1e4)throw new Error("media-animation-layer-limit");const i=[];for(const c of o)s(),i.push({...c,png:await nn(e.source,e.saved,c.atMs)});s(),r("export");const l=await n.exportMedia({outputVersion:zt,jobId:t,media:e,layers:i});if(s(),!l.ok)throw new Error(["media-export-failed",l.error].filter(Boolean).join(":"));return{jobId:t,value:l.value}}const ve={CLIPBOARD_WRITE:"dock-media:clipboard-write",CLIPBOARD_READ:"dock-media:clipboard-read",MENU:"dock-media:menu"};function $e(e,t){return Math.max(0,(e.pausedAt??t)-e.startedAt-(e.pausedMs??0))}function ge(e,t){if(!t?.startsWith(".intent/attachments/"))return;const n=t.split("/").map(encodeURIComponent).join("/"),a=tt(`intent://local/file/${n}`,e);return a?.kind==="video"?a.url:void 0}function Gn(e){const t=e.video==="full"?h.dock_captureEditor_videoFull_label():h.dock_captureEditor_videoHighlights_label(),n=e.voice==="audio"?h.dock_captureEditor_voiceAudio_label():e.voice==="transcript"?h.dock_captureEditor_voiceTranscript_label():h.dock_captureEditor_voiceOff_summary();return`${t} · ${n}`}function Yn(e,t,n,a){if(a?.error==="permission")return a.kind==="pick"?"accessibility":"screen";if(e==="permission"||t==="permission")return"screen";if(n?.startsWith("microphone-permission"))return"microphone";if(n?.startsWith("speech-permission"))return"speech"}const V=un;function Zr(e){const{view:t,items:n,local:a,labels:r,copy:s}=e,o=t.speech.error??t.speech.capability?.reason??null,i=Yn(t.captureError,t.clips.find(y=>y.status==="failed"&&y.error==="permission")?.error??null,o,t.annotationIssue),l=t.annotationIssue?.error==="unavailable"?s?.annotationUnavailable:void 0,c=t.annotationIssue,d=t.captureError==="permission",u=c?.error==="permission"&&c.kind!=="pick",g=c?.error==="permission"&&c.kind==="pick",p=o?.startsWith("speech-permission")?"speech":o?.startsWith("microphone-permission")||o==="permission"?"microphone":void 0,m={},w={},f=(y,D,$)=>{m[y]=D,$&&(w[y]=$)};s&&(d&&(f("capture",s.permission,"screen"),t.recording||f("record",s.permission,"screen")),u&&!t.annotating&&f("annotate",s.permission,"screen"),g&&(f("pick",s.accessibilityPermission,"accessibility"),t.tool==="pick"&&!t.annotating&&f("annotate",s.accessibilityPermission,"accessibility")),p&&!t.dictation&&f("mic",(o&&r.speechError?.(o))??s.speechPermission,p));const k=y=>{const D=w[y];D&&e.actions.onOpenSettings(D)},_=new Set(t.evidenceOwnedItemIds),I=t.clips.find(y=>y.status==="recording"),S=t.clips.length>=ae.clips,v=t.capabilities,B=t.speech.available,C=new Set(t.clips.filter(y=>y.status==="recording"||y.status==="placing"||!!y.media).flatMap(y=>y.captureHistory?.map(D=>D.image.id)??[])),P=[...t.tiles.filter(({image:y,marks:D})=>!!y.media||y.source!=="annotate"||!C.has(y.id)||D.some(({mark:$})=>!$.clipId)).map(({image:y,marks:D})=>({kind:"image",id:y.contextItemId,url:a.previews[y.id]??"",markCount:D.length,owner:"evidence",...a.previews[y.id]?{}:{status:"placing"}})),...t.clips.filter(y=>!y.discarding).map(y=>({kind:"clip",id:y.contextItemId??y.id,duration:V(y.status==="recording"?$e(y,a.now):y.durationMs),recording:y.status==="recording",...y.media?.saved?{summary:Gn(y.media.saved)}:{},...y.status==="ready"&&ge(e.workspaceId,y.path)?{url:ge(e.workspaceId,y.path)}:{},owner:"evidence",...y.status==="placing"?{status:"placing"}:{},...y.status==="failed"?{status:"failed",...y.error==="limit"?{error:h.dock_composer_clipTooLarge_error()}:{}}:{}})),...n.filter(y=>!_.has(y.id)).map(y=>({...y.imageData&&y.imageMimeType?{kind:"image",id:y.id,url:`data:${y.imageMimeType};base64,${y.imageData}`,markCount:0,file:{name:y.label,imageData:y.imageData,imageMimeType:y.imageMimeType}}:{kind:"file",id:y.id,name:y.label},owner:"attachment",...y.placementStatus==="placing"?{status:"placing"}:{},...y.placementStatus==="failed"?{status:"failed",error:y.placementError}:{}}))];return{mediaStatus:t.recording?{kind:"recording",label:r.recording}:t.annotating?{kind:"annotating",label:r.annotating}:void 0,...i?{settingsPane:i}:{},...l?{annotationNotice:l}:{},labels:r,attachments:P,...s?{placeholder:t.dictation?"":s.idle}:{},state:{captureRevision:t.captureAccepted,capturePending:t.capturePending,captureDisabled:!v.capture||t.captureDisabled,...t.captureDisabled?{captureTooltip:r.captureLimit}:{},captureMode:t.evidence?.annotation?"fullscreen":t.captureMode,captureModesAvailable:!!v.captureModes&&!t.evidence?.annotation,annotationActive:t.annotating,tool:t.tool,toolUsed:t.toolUsed,annotationDisabled:!v.annotate,recording:t.recording&&!I?.discarding,recordingDisabled:!!I?.discarding||!t.recording&&(!v.record||S),...S&&!t.recording?{recordingTooltip:r.clipLimit}:{},recordingTime:V(I?$e(I,a.now):0),dictating:!!t.dictation,dictationPending:t.speech.pending||t.dictation?.status==="transcribing",dictationDisabled:!B&&!t.dictation&&!m.mic,...t.speech.error&&r.speechError?{dictationTooltip:r.speechError(t.speech.error)}:{},dictationTime:t.dictation?V(a.now-t.dictation.startedAt):V(0),inputLevels:t.speech.levels,...Object.keys(m).length?{alerts:m}:{}},...e.actions,...t.fileAttachmentsEnabled===!1?{onEdit:void 0}:{},onAlert:k,beforeSubmit:e.beforeSubmit}}const Se=()=>globalThis.electronAPI,Jn=["image/png","image/jpeg","image/webp"],Ne=e=>Jn.includes(e??"")?e:null;function He(e){const t=atob(e),n=new Uint8Array(t.length);for(let a=0;a<t.length;a+=1)n[a]=t.charCodeAt(a);return n}async function es(e,t){const{view:n,items:a,previews:r}=t,s=n.tiles.find(({image:c})=>c.id===e||c.contextItemId===e);if(s){const c=a.find(p=>p.id===s.image.contextItemId),d=s.image.media;if(s.image.mediaError)return null;if(d?.saved){if(!t.createSavedPreviewUrl||!t.revokeUrl)return null;const p={...d,saved:d.saved},m=await t.createSavedPreviewUrl(t.workspaceId,p);try{const w=await t.fetchBytes(m),f=p.saved.crop;return{kind:"image",name:c?.label||"screenshot.png",mimeType:"image/png",bytes:w,intent:{pixels:{mimeType:"image/png",width:Math.max(1,Math.round(f?.w??p.source.width)),height:Math.max(1,Math.round(f?.h??p.source.height)),displayScale:s.image.displayScale,capturedAt:s.image.capturedAt},raw:w,marks:[]}}}finally{t.revokeUrl(m)}}const u=Ne(c?.imageMimeType),g=r[s.image.id];return!c?.imageData||!u||!g?null:{kind:"image",name:c.label||"screenshot.png",mimeType:"image/png",bytes:await t.fetchBytes(g),intent:{pixels:{mimeType:u,width:s.image.width,height:s.image.height,displayScale:s.image.displayScale,capturedAt:s.image.capturedAt,...s.image.hash?{hash:s.image.hash}:{}},raw:He(c.imageData),marks:s.marks.map(({mark:p})=>({tool:p.tool,geometry:p.geometry,bounds:p.bounds,element:p.element}))}}}const o=n.clips.find(c=>c.id===e||c.contextItemId===e);if(o){const c=o.status==="ready"?ge(t.workspaceId,o.path):null;if(!c)return null;const d=a.find(g=>g.id===o.contextItemId),u=await t.fetchBytes(c);if(!Qn(u))throw new Error("Not a recording file");return{kind:"clip",name:d?.label||`recording-${o.id.slice(0,8)}.mp4`,mimeType:d?.attachmentMimeType||"video/mp4",bytes:u,durationMs:o.durationMs,hasMicAudio:o.hasMicAudio}}const i=a.find(c=>c.id===e),l=Ne(i?.imageMimeType);return i?.imageData&&l?{kind:"image",name:i.label||"image",mimeType:l,bytes:He(i.imageData)}:null}async function Xn(e){const t=await fetch(e);if(!t.ok)throw new Error(`Media request failed (${t.status})`);const n=new Uint8Array(await t.arrayBuffer()),a=Number(t.headers.get("content-length")??Number.NaN);if(n.byteLength===0||Number.isFinite(a)&&a!==n.byteLength)throw new Error("Media response was incomplete");return n}function Qn(e){return e.byteLength>8&&String.fromCharCode(...e.subarray(4,8))==="ftyp"}async function ts(e){try{return(await Se()?.invoke(ve.CLIPBOARD_WRITE,e))?.ok===!0}catch{return!1}}async function Zn(){try{return await Se()?.invoke(ve.CLIPBOARD_READ,{})??null}catch{return null}}async function ns(e){try{const t=await Se()?.invoke(ve.MENU,{canCut:e});return t?.action==="copy"||t?.action==="cut"?t.action:null}catch{return null}}const Fe=new WeakSet;async function ea(e,t){const[n]=e;if(e.length!==1||!n||n.size!==t.size)return!1;try{const a=await crypto.subtle.digest("SHA-256",await n.arrayBuffer());return Array.from(new Uint8Array(a),s=>s.toString(16).padStart(2,"0")).join("")===t.sha256}catch{return!1}}function as(e,{onIntentMedia:t,isCurrent:n,read:a=Zn}){const r=e.clipboardData;if(Fe.has(e)||!r||r.files.length===0)return!1;const s=e.target,o=Array.from(r.files),i=r.types.filter(l=>l!=="Files").map(l=>[l,r.getData(l)]);return e.preventDefault(),e.stopImmediatePropagation(),a().catch(()=>null).then(async l=>{if(!n())return;if(l&&await ea(o,l)){n()&&t(l);return}if(!n()||!(s instanceof Node)||!s.isConnected)return;const c=new DataTransfer;for(const u of o)c.items.add(u);for(const[u,g]of i)c.setData(u,g);const d=new ClipboardEvent("paste",{clipboardData:c,bubbles:!0,cancelable:!0});Fe.add(d),s.dispatchEvent(d)}),!0}function ta(e){const t=atob(e),n=new Uint8Array(t.length);for(let a=0;a<t.length;a++)n[a]=t.charCodeAt(a);return n}function na(e){let t="";for(let a=0;a<e.length;a+=32768)t+=String.fromCharCode(...e.subarray(a,a+32768));return btoa(t)}function dt(e){let t=0;return e.endsWith("==")?t=2:e.endsWith("=")&&(t=1),Math.floor(e.length*3/4)-t}async function aa(e){const t=await crypto.subtle.digest("SHA-256",e.buffer.slice(e.byteOffset,e.byteOffset+e.byteLength));return Array.from(new Uint8Array(t)).map(n=>n.toString(16).padStart(2,"0")).join("")}const ut={placeAttachment:ot,beginAttachmentUpload:st,sendAttachmentUploadChunk:rt,commitAttachmentUpload:at,abortAttachmentUpload:nt,getAttachmentInfo:he,mintIdempotencyKey:se};async function Ae(e,t,n,a=ut){const{idempotencyKey:r}=n,s={...r!==void 0?{idempotencyKey:r}:{},...n.rawScreenshot!==void 0?{rawScreenshot:n.rawScreenshot}:{}},o=async m=>hn(m,r)?Le(e,r,a.getAttachmentInfo):void 0;if(dt(n.data)<=mn)try{return await a.placeAttachment(e,t,{data:n.data,mimeType:n.mimeType,...s})}catch(m){const w=await o(m);if(w)return w;throw m}const i=ta(n.data),l=await aa(i);let c,d;try{({uploadId:c,maxChunkBytes:d}=await a.beginAttachmentUpload(e,t,i.byteLength,l,{mimeType:n.mimeType,...s}))}catch(m){if(r!==void 0&&pn(m)){const w=await Le(e,r,a.getAttachmentInfo);if(w)return w}throw m}const u=Math.min(gn,d),g=Math.ceil(i.byteLength/u);let p=!1;try{for(let m=0;m<g;m++){const w=i.subarray(m*u,(m+1)*u);await a.sendAttachmentUploadChunk(c,m,na(w),e)}return p=!0,await a.commitAttachmentUpload(c,e)}catch(m){const w=p?await o(m):void 0;if(w)return w;throw await a.abortAttachmentUpload(c,e).catch(()=>{}),m}}function ra(e,t){return yn(e,`image-${Date.now()}-${t+1}`)}class Me extends Error{constructor(n,a){super(n);Pe(this,"retryBlocks");this.name="ImagePlacementError",this.retryBlocks=a}}function sa(e,t){return e instanceof Me?e.retryBlocks:t}async function oa(e,t,n=ut,a=()=>!0){const r=l=>(...c)=>(le(a),l(...c));n={placeAttachment:r(n.placeAttachment),beginAttachmentUpload:r(n.beginAttachmentUpload),sendAttachmentUploadChunk:r(n.sendAttachmentUploadChunk),commitAttachmentUpload:r(n.commitAttachmentUpload),abortAttachmentUpload:r(n.abortAttachmentUpload),getAttachmentInfo:r(n.getAttachmentInfo),mintIdempotencyKey:r(n.mintIdempotencyKey)};const s=[],o=[],i=[];for(let l=0;l<t.length;l++){le(a);const c=t[l];if("attachmentId"in c&&c.attachmentId){const p={type:"image",attachmentId:c.attachmentId,...c.mimeType?{mimeType:c.mimeType}:{}};s.push(p),o.push(p);continue}const d=c,u=d.placementFileName??ra(d.mimeType,l),g=n.mintIdempotencyKey(d.placementIdempotencyKey);try{const p=await Ae(e,u,{data:d.data,mimeType:d.mimeType,...g!==void 0?{idempotencyKey:g}:{}},n),m={type:"image",attachmentId:p.attachmentId,...p.mimeType??d.mimeType?{mimeType:p.mimeType??d.mimeType}:{}};s.push(m),o.push(m)}catch(p){const m=fn(p);i.push(m?`${u} (${m})`:u),o.push(g!==void 0?{...d,placementIdempotencyKey:g,placementFileName:u}:d)}}if(i.length>0)throw new Me(h.chat_imagePlacement_failed_error({names:i.join(", ")}),o);return le(a),s}const rs=Object.freeze(Object.defineProperty({__proto__:null,ImagePlacementError:Me,base64DecodedBytes:dt,imageRetryBlocks:sa,placeImageAttachment:Ae,toImageReferenceBlocks:oa},Symbol.toStringTag,{value:"Module"}));function mt(){try{return kn()}catch{return null}}function ia(){return{backendId:M.state.connections.windowBackendId??null,generation:M.state.daemonHealth.connectionGeneration,transport:mt()}}class Ie extends Error{constructor(){super("dock-evidence-backend-changed")}}function N(e,t){return async(...n)=>{e();const a=await t(...n);return e(),a}}const K={current:e=>mt()===e.transport&&M.state.daemonHealth.connectionGeneration===e.generation&&(M.state.connections.windowBackendId??null)===e.backendId,capabilities:()=>_n(),placeImage:(e,t,n,a)=>Ae(e,t,n,{placeAttachment:N(a,ot),beginAttachmentUpload:N(a,st),sendAttachmentUploadChunk:N(a,rt),commitAttachmentUpload:N(a,at),abortAttachmentUpload:N(a,nt),getAttachmentInfo:N(a,he),mintIdempotencyKey:se}),lookup:(e,t)=>he({workspaceId:e,idempotencyKey:t}),mintKey:se};function Y(e){return K.current(e)}function ca(e,t){const n=M.state.dockConversation;return{generation:n.generation,authority:n.authority,clearRevision:R(n.drafts,Gt(e,t))?.clearRevision??0,binding:ia()}}function ss(e,t,n){const a=ca(e,t);return a.generation===n.generation&&a.authority===n.authority&&a.clearRevision===n.clearRevision&&Y(n.binding)}function pt(e,t){return()=>{if(!e.current(t))throw new Ie}}const ft=Object.freeze({rawRetention:!1,chiefAttachments:!1});function os(e){return e!==ft}const de=new Map;function ht(e,t=K){const n=`${e.backendId}:${e.generation}`;let a=de.get(n);if(!a){const r=pt(t,e);a=(async()=>{r();const o=await t.capabilities();r();const i=o?.server?.capabilities;if(!i||typeof i!="object")throw new Error("unobserved");return{rawRetention:i.rawScreenshotRetention===1,chiefAttachments:i.chiefAttachments===1}})().catch(()=>(de.delete(n),ft)),de.set(n,a)}return a}class ee extends Error{constructor(t){super(`dock-raw-retention-contract:${t}`),this.reason=t}}function gt(e){const{rpcCode:t,code:n}=e??{};return t===-32602||n==="INVALID_PARAMS"}function la(e){const t=String(e?.message??"");return gt(e)&&(t.includes("rawScreenshotExpired:")||/expired at .*not renewable/i.test(t))}function da(e,t,n){const a=e.rawScreenshot;if(!a||a.compositeAttachmentId!==t)return null;const r=Date.parse(a.expiresAt);return Number.isFinite(r)?a.expired||r<=n?"expired":{attachmentId:e.attachmentId,expiresAt:a.expiresAt}:null}function Ke(e){return{ok:!0,path:e.path,fileName:e.fileName,size:e.size,attachmentId:e.attachmentId,...e.mimeType?{mimeType:e.mimeType}:{},uploadedAt:e.uploadedAt,replayed:!0,...e.rawScreenshot?{rawScreenshot:e.rawScreenshot}:{}}}class ua extends Error{constructor(t,n){super("dock-evidence-placement-failed"),this.imageId=t,this.failure=n}}const We=e=>e.split("/")[1]?.replace("jpeg","jpg")||"png";async function ma(e){const t=e.api??K,n=e.now??Date.now,a=pt(t,e.binding);a();const r=await ht(e.binding,t);a();const s=r.rawRetention&&(e.workspaceId!==be||r.chiefAttachments),o=[];for(const i of e.images){const l=e.records[i.image.id];let c=l&&l.signature===i.signature&&l.workspaceId===e.workspaceId&&l.backendId===e.binding.backendId?l:{imageId:i.image.id,signature:i.signature,workspaceId:e.workspaceId,backendId:e.binding.backendId,compositeKey:null,rawKey:null,composite:null,raw:null,rawSettled:!1};const d=u=>{c=u,e.onRecord(u)};try{if(!c.composite){const g=c.compositeKey,p=t.mintKey(g??void 0)??null;p!==c.compositeKey&&d({...c,compositeKey:p});let m;g&&p===g&&(a(),m=await t.lookup(e.workspaceId,p).then(Ke).catch(()=>{}),a()),m||(a(),m=await t.placeImage(e.workspaceId,`screenshot-${i.image.id.slice(0,8)}.${We(i.composite.mimeType)}`,{data:i.composite.base64,mimeType:i.composite.mimeType,...p?{idempotencyKey:p}:{}},a),a()),d({...c,composite:{attachmentId:m.attachmentId,mimeType:m.mimeType??i.composite.mimeType}})}const u=c.composite.attachmentId;if(s&&i.raw&&!c.raw&&!c.rawSettled){const g=c.rawKey,p=t.mintKey(g??void 0);if(p){p!==c.rawKey&&d({...c,rawKey:p});let m;g&&p===g&&(a(),m=await t.lookup(e.workspaceId,p).then(Ke).catch(()=>{}),a());try{m||(a(),m=await t.placeImage(e.workspaceId,`screenshot-${i.image.id.slice(0,8)}-original.${We(i.raw.mimeType)}`,{data:i.raw.base64,mimeType:i.raw.mimeType,idempotencyKey:p,rawScreenshot:{compositeAttachmentId:u}},a),a());const w=da(m,u,n());if(w==="expired")d({...c,rawSettled:!0});else if(w)d({...c,raw:w});else throw new ee("echo")}catch(w){if(la(w))d({...c,rawSettled:!0});else throw w instanceof ee?w:gt(w)?new ee("refused"):w}}else throw new ee("unkeyed")}}catch(u){throw u instanceof Ie?u:new ua(i.image.id,u)}o.push(c)}return o}async function is(e,t,n,a){const r=()=>{if(!K.current(a))throw new Ie};r();const s=await K.placeImage(e,t,{...n,idempotencyKey:K.mintKey()},r);return r(),s}const pa=new Set(["invalid-saved-edit","media-send-retired","transcript-unavailable","transcript-pending","invalid-edit","stale-source","legacy-baked-marks","timing-unavailable","audio-unavailable","media-source-unavailable","media-export-unavailable","media-animation-layer-limit","media-export-failed","legacy-original-unavailable","capture-render-unavailable","capture-blur-unavailable","stale-source-pixels","not-a-screenshot","not-admitted","unavailable","dock-evidence-missing-pixels","draft-restore-failed","image-budget-exceeded"]),fa=new Set(["unavailable","permission","failed","busy","cancelled","limit"]);class O extends Error{constructor(t,n){super(n),this.stage=t,this.code=n,this.name="DockSendError"}}function oe(e){const t=e instanceof Error?e.message:typeof e=="string"?e:"";if(t.length>64)return"unclassified";const[n,...a]=t.split(":");return!pa.has(n)||a.length>2?"unclassified":n!=="media-export-failed"?a.length?"unclassified":n:[n,...a.map(r=>fa.has(r)?r:"other")].join(":")}function cs(e,t){return e instanceof O?{stage:e.stage,code:oe(e.code)}:{stage:t,code:oe(e)}}function W(e){if(!e||e.source.kind!=="recording")return!1;const t=e.source,n=e.saved??re(t,t.capturedMarks??[],e.transcript);if(n.video!=="full"||n.voice!=="audio"||n.crop||n.blurRegions.length||n.blurStrokes?.length)return!1;const a=_e(n,t,e.transcript);return t.visuals==="clean"?!a.errors.length&&!a.muted&&n.cuts.length===0&&!n.marks.some(r=>r.included)&&a.marks.length===0&&a.transcript===null&&a.kept.length===1&&a.kept[0].startMs===0&&a.kept[0].endMs===t.durationMs&&a.clips.length===1&&a.clips[0].startMs===0&&a.clips[0].endMs===t.durationMs:!a.errors.length&&!a.muted&&a.clips.length===1&&a.clips[0].startMs===0&&a.clips[0].endMs>=t.durationMs}async function ha(e,t,n,a,r,s){const o={images:{},files:[],frames:[],framePromptBytes:[],metadata:[]};let i="validate";try{const l=()=>{if(!r()||!Y(n))throw new Error("media-send-retired")};for(const c of[...t.images,...t.clips]){if(i="validate",s?.stage(i),c.mediaError)throw new Error("invalid-saved-edit");if(!c.media||W(c.media))continue;l();const d=structuredClone(c.media),u=d.source;let g=d.saved??re(u,u.capturedMarks??[],d.transcript),p=crypto.randomUUID();try{if(u.kind==="recording"&&g.voice==="transcript"&&d.transcript?.status!=="ready"){if(i="transcribe",s?.stage(i),!a?.transcribeMedia)throw new Error("transcript-unavailable");const f=await a.transcribeMedia({jobId:p,media:d});if(l(),!f.ok)throw new Error("transcript-unavailable");d.transcript=f.value,d.saved||(g=re(u,u.capturedMarks??[],d.transcript))}i="plan",s?.stage(i);const m=_e(g,u,d.transcript);if(m.errors.length)throw new Error(m.errors[0]);const w={id:c.id,kind:u.kind,video:g.video,voice:g.voice,transcript:m.transcript,batches:u.batches,marks:m.marks.map(({n:f,mark:k,frameAtMs:_})=>({n:f,id:k.id,at_ms:_,kind:k.kind,label:k.label,note:k.note,context:k.context,geometry:k.geometry}))};if(u.kind==="screenshot"){i="screenshot-source",s?.stage(i);const f=u.path.split("/").map(encodeURIComponent).join("/"),k=tt(`intent://local/file/${f}`,e);if(!k||k.kind!=="image")throw new Error("media-source-unavailable");const _=await Xn(k.url);l();const I={base64:Ze(_.buffer.slice(_.byteOffset,_.byteOffset+_.byteLength)),mimeType:/\.jpe?g$/i.test(u.path)?"image/jpeg":/\.webp$/i.test(u.path)?"image/webp":"image/png"};i="screenshot-render",s?.stage(i),o.images[c.id]=await an(u,g,I),l()}else{if(!m.clips.length){w.video_attachment_id=null,w.frames=[],w.kept_ms=[],o.metadata.push(w);continue}const f={...d,saved:g};let k=await a?.takePreparedRecording?.(f);if(k&&(p=k.jobId),l(),!k){if(!a)throw new Error("media-export-unavailable");k=await lt(f,p,a,()=>r()&&Y(n),S=>{i=S,s?.stage(S),S==="export"&&s?.exportAttempt(p)})}p=k.jobId,i="placement",s?.stage(i);const _=[k.value.video,...k.value.frames],I=[];for(let S=0;S<_.length;S++){l();const v=_[S],B=`capture-${c.id.slice(0,12)}-${S}.${S===0?"mp4":v.mimeType==="image/jpeg"?"jpg":"png"}`,C=await wn(e,B,{sourcePath:v.sourcePath,mimeType:v.mimeType,idempotencyKey:se()},void 0,void 0,()=>r()&&Y(n));l(),S===0?o.files.push({type:"file",attachmentId:C.attachmentId,fileName:B,mimeType:C.mimeType??v.mimeType,size:C.size}):(o.frames.push({type:"image",attachmentId:C.attachmentId,mimeType:v.mimeType==="image/jpeg"?"image/jpeg":"image/png"}),o.framePromptBytes.push(zn(v))),I.push(C.attachmentId)}w.video_attachment_id=I[0],w.frames=k.value.frames.map((S,v)=>({mark_id:S.markId,attachment_id:I[v+1]})),w.kept_ms=m.clips}o.metadata.push(w)}finally{s?.stage("release"),await a?.releaseMediaJob?.(p).catch(()=>{})}}return o}catch(l){throw l instanceof O?l:new O(i,oe(l))}}const ue=1568,ga=.85;async function ya(e,t){const n=Math.round(e.length*3/4/1024),a=await wa(e,t),{width:r,height:s}=a,o=r>ue||s>ue;let i=r,l=s;if(o){const f=ue/Math.max(r,s);i=Math.round(r*f),l=Math.round(s*f)}const c=new OffscreenCanvas(i,l),d=c.getContext("2d");if(!d)throw new Error("Failed to get 2D canvas context for image resize");d.drawImage(a,0,0,i,l);let u=t;ba(d,i,l)||(u="image/jpeg");const g=await c.convertToBlob({type:u,quality:u==="image/jpeg"?ga:void 0}),p=g.type||u,m=await ka(g),w=Math.round(m.length*3/4/1024);return console.debug(`[image-resize] ${r}×${s} → ${i}×${l} | ${t} → ${p} | ${n} KB → ${w} KB`),{base64:m,mimeType:p}}async function wa(e,t){const n=atob(e),a=new Uint8Array(n.length);for(let s=0;s<n.length;s++)a[s]=n.charCodeAt(s);const r=new Blob([a],{type:t});return createImageBitmap(r)}function ba(e,t,n){const r=e.getImageData(0,0,t,n).data;for(let s=3;s<r.length;s+=4)if(r[s]<255)return!0;return!1}async function ka(e){const t=await e.arrayBuffer(),n=new Uint8Array(t);let a="";for(let r=0;r<n.length;r++)a+=String.fromCharCode(n[r]);return btoa(a)}const T={...Oe,badge:Oe.badgeRadius*2};function _a(e,t,n=1,a=0){const r=Math.max(1,e.displayScale)*n,s=[],o=i=>i*n;for(const{n:i,mark:l}of t){const c=l.geometry;if(c.kind==="rect")s.push({kind:"rect",x:o(c.x),y:o(c.y),w:o(c.w),h:o(c.h),width:T.stroke*r});else if(c.kind==="path")s.push({kind:"path",points:c.points.map(m=>({x:o(m.x),y:o(m.y)})),width:T.pen*r});else{const m={x:o(c.from.x),y:o(c.from.y)},w={x:o(c.to.x),y:o(c.to.y)};s.push({kind:"arrow",from:m,to:w,head:Ia(m,w,T.arrowHead*r),width:T.stroke*r})}if(!T.showNumbers)continue;const d=Math.max(a,T.badge/2*r),u=o(l.bounds.x+l.bounds.w),g=o(l.bounds.y),p=tn({x:o(l.bounds.x),y:g,w:u-o(l.bounds.x),h:o(l.bounds.h)},{x:0,y:0,w:o(e.width),h:o(e.height)},r,d);s.push({kind:"badge",...p,radius:d,label:String(i),font:d*T.badgeTextScale})}return s}function va(e,t){"letterSpacing"in e&&(e.letterSpacing="0px"),"wordSpacing"in e&&(e.wordSpacing="0px");const n=(a,r,s)=>{e.strokeStyle=T.halo,e.lineWidth=a+T.haloWidth*r,s(),e.strokeStyle=T.accent,e.lineWidth=a,s()};e.strokeStyle=T.accent,e.lineCap="round",e.lineJoin="round";for(const a of t)if(a.kind==="rect")n(a.width,a.width/T.stroke,()=>e.strokeRect(a.x,a.y,a.w,a.h));else if(a.kind==="path"||a.kind==="arrow"){e.lineWidth=a.width,e.beginPath();const r=a.kind==="path"?a.points:[a.from,a.to];a.kind==="arrow"&&r.forEach((o,i)=>i?e.lineTo(o.x,o.y):e.moveTo(o.x,o.y)),a.kind==="arrow"&&(e.moveTo(a.head.left.x,a.head.left.y),e.lineTo(a.to.x,a.to.y),e.lineTo(a.head.right.x,a.head.right.y));const s=a.kind==="path"?new Path2D(en(a.points)):null;n(a.width,a.width/(a.kind==="path"?T.pen:T.stroke),()=>s?e.stroke(s):e.stroke())}else e.fillStyle=T.paper,e.beginPath(),e.arc(a.x,a.y,a.radius,0,Math.PI*2),e.closePath(),e.fill(),e.strokeStyle=T.accent,e.lineWidth=T.badgeOutline*a.radius/T.badgeRadius,e.stroke(),e.fillStyle=T.ink,e.font=`600 ${a.font}px ${T.badgeFontFamily}`,e.textAlign="center",e.textBaseline="middle",e.fillText(a.label,a.x,a.y)}async function Sa(e,t){const n=Uint8Array.from(atob(e),a=>a.charCodeAt(0));return createImageBitmap(new Blob([n],{type:t}))}async function Aa(e){const t=await e.convertToBlob({type:"image/png"});return Ze(await t.arrayBuffer())}async function yt(e,t,n,a,r=0){await rn();const s=await Sa(e.base64,e.mimeType);try{const o=Math.min(1,a/Math.max(t.width,t.height)),i=new OffscreenCanvas(Math.max(1,Math.round(t.width*o)),Math.max(1,Math.round(t.height*o))),l=i.getContext("2d");if(!l)throw new Error("dock-evidence-canvas-unavailable");return l.drawImage(s,0,0,i.width,i.height),va(l,_a(t,n,o,r)),i}finally{s.close()}}async function Ma(e,t,n){const a=await yt(e,t,n,Math.max(t.width,t.height));return ya(await Aa(a),"image/png")}async function ls(e,t,n,a=384){const r=await yt(e,t,n,a,a/32);return URL.createObjectURL(await r.convertToBlob({type:"image/png"}))}function Ia(e,t,n=T.arrowHead){const a=Math.atan2(t.y-e.y,t.x-e.x),r=T.arrowSpread;return{left:{x:t.x-n*Math.cos(a-r),y:t.y-n*Math.sin(a-r)},right:{x:t.x-n*Math.cos(a+r),y:t.y-n*Math.sin(a+r)}}}function ds(e,t){const n=Yt(t??void 0),a=new Set(t?.clips.filter(r=>!!r.media&&!W(r.media)).map(r=>r.contextItemId));return e.filter(r=>!n.has(r.id)&&!a.has(r.id))}async function us({workspaceId:e,agentId:t,evidence:n,clickedItems:a,sendItems:r,clickedPayload:s,binding:o,service:i,current:l,onRecord:c,timing:d}){const u=()=>{if(!l()||!Y(o))throw new O("validate","media-send-retired")};if(u(),n?.images.some(b=>b.mediaError)||n?.clips.some(b=>b.mediaError))throw new O("validate","invalid-saved-edit");const g=b=>!!b.media&&!W(b.media),p=n?{workspaceId:e,agentId:t,appUrl:`intent://local/workspace/${encodeURIComponent(e)}`,clipAttachmentIds:Object.fromEntries(n.clips.map(b=>[b.id,a.find(A=>A.id===b.contextItemId)?.attachmentId??null]))}:null;for(const b of n?.clips??[]){if(!b.media||!W(b.media))continue;const A=a.find(Q=>Q.id===b.contextItemId);if(!A||A.attachmentId!==b.media.source.attachmentId||A.path!==b.media.source.path||A.placementStatus!==void 0&&A.placementStatus!=="placed")throw new O("validate","legacy-original-unavailable")}const m=n?await ha(e,n,o,i,l,d):{images:{},files:[],frames:[],framePromptBytes:[],metadata:[]},w=new Set(n?.clips.filter(b=>g(b)||!!b.media&&W(b.media)).map(b=>b.id)),f=new Set(n?.clips.filter(b=>w.has(b.id)).flatMap(b=>(b.captureHistory??[]).map(A=>A.image.id))),k=(n?.images??[]).filter(b=>b.source!=="annotate"||!!b.media||!f.has(b.id)||n.marks.some(A=>A.imageId===b.id&&!(A.clipId&&w.has(A.clipId))));d?.stage("burn");let _=[];try{_=n?await Ta({...n,images:k},a,m.images):[]}catch(b){throw new O("burn",oe(b))}if(m.framePromptBytes.reduce((b,A)=>b+(A??0),0)>qn)throw new O("validate","image-budget-exceeded");const S=new Set(n?.images.filter(b=>b.media).map(b=>b.id)),v=n?{...n,images:k.map(b=>m.images[b.id]?{...b,width:m.images[b.id].width,height:m.images[b.id].height}:b),clips:n.clips.filter(b=>!g(b)),marks:n.marks.filter(b=>!S.has(b.imageId)&&!n.clips.some(A=>g(A)&&A.id===b.clipId))}:null;u();const B=m.metadata.some(b=>typeof b.transcript=="string"&&b.transcript.trim());if(!s.text.trim()&&!r.length&&!s.workspaceContextStr?.trim()&&!_.length&&!m.files.length&&!m.frames.length&&!s.imageBlocks?.length&&!s.fileBlocks?.length&&!B)return null;let C=_,P=null;d?.stage("placement");const xe=n?await ht(o):null;if(u(),n&&(e!==be||xe?.chiefAttachments)){const b=await ma({workspaceId:e,binding:o,images:k.map((A,Q)=>{const Z=a.find(Dt=>Dt.id===A.contextItemId);return{image:A,signature:Jt(n,A.id),composite:{base64:_[Q].data,mimeType:_[Q].mimeType},raw:!A.media&&Z?.imageData&&Z.imageMimeType?{base64:Z.imageData,mimeType:Z.imageMimeType}:null}}),records:n?.placements??{},onRecord:c});u(),C=b.map(A=>({type:"image",attachmentId:A.composite.attachmentId,mimeType:A.composite.mimeType})),P=Object.fromEntries(b.map(A=>[A.imageId,{attachmentId:A.composite.attachmentId,raw:A.raw}]))}const y=new Map(n?Qe(n).map(({n:b,mark:A})=>[A.id,b]):[]),D=p&&P?{...p,imageAttachments:P,markNumbers:y}:p&&{...p,markNumbers:y},$=n&&D?{...s,imageBlocks:[...C,...m.frames,...s.imageBlocks??[]],fileBlocks:[...s.fileBlocks??[],...m.files],workspaceContextStr:[Qt(v,D),m.metadata.length?`[Edited capture outputs]
1
+ const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["/app/immutable/chunks/p9X2tUBM.js","/app/immutable/chunks/BmTMWrby.js","/app/immutable/chunks/Bqd7fdCF.js","/app/immutable/chunks/CIyUrgF0.js","/app/immutable/chunks/C0QTy0Sy.js","/app/immutable/chunks/3SdAC2_C.js","/app/immutable/chunks/bhKPSdq4.js","/app/immutable/chunks/7UPrdiE9.js","/app/immutable/chunks/CrD0jtXE.js","/app/immutable/assets/spinner.D_TRo5Hy.css","/app/immutable/chunks/FzlZUztb.js","/app/immutable/chunks/Dn334wJv.js","/app/immutable/chunks/B6S6VNu7.js","/app/immutable/chunks/DCRuihKm.js","/app/immutable/chunks/C7LIHk5_.js","/app/immutable/chunks/uXuxG9cN.js","/app/immutable/assets/button.-yaUNjRS.css","/app/immutable/chunks/CUkDMZwP.js","/app/immutable/chunks/-K3ARgq0.js","/app/immutable/chunks/CE7dsja4.js","/app/immutable/chunks/B4SiDSWP.js","/app/immutable/chunks/tr-2J8Mf.js","/app/immutable/chunks/Dms_DO28.js","/app/immutable/chunks/ChTqQfQN.js","/app/immutable/chunks/DX-Wrapd.js","/app/immutable/chunks/DxwfiAWm.js","/app/immutable/chunks/D9tVylVS.js","/app/immutable/chunks/U9jJmfYa.js","/app/immutable/chunks/DLwWVKiF.js","/app/immutable/chunks/DU3vNstz.js","/app/immutable/chunks/XJv96NUg.js","/app/immutable/assets/notify.B1j5oT2y.css","/app/immutable/chunks/BaujsV9k.js","/app/immutable/chunks/DypB-Dwi.js","/app/immutable/chunks/L_tYoUCb.js","/app/immutable/chunks/CL3a4Hm1.js","/app/immutable/chunks/BBWuirRW.js","/app/immutable/chunks/BdWqymET.js","/app/immutable/chunks/COhRCR9P.js","/app/immutable/chunks/DKwAaLwd.js","/app/immutable/chunks/DKHY8q_S.js","/app/immutable/chunks/S845NCb3.js","/app/immutable/chunks/DwL1A1su.js","/app/immutable/chunks/EK6zOAHM.js","/app/immutable/chunks/DCK8dPAL.js","/app/immutable/chunks/B5aYN90J.js","/app/immutable/chunks/CjTo2K46.js","/app/immutable/chunks/CMiilI_P.js","/app/immutable/chunks/B_QPRXJ5.js","/app/immutable/chunks/C6mS8uZB.js","/app/immutable/chunks/DONrLvvt.js"])))=>i.map(i=>d[i]);
2
+ var Rt=Object.defineProperty;var xt=(e,t,n)=>t in e?Rt(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n;var Pe=(e,t,n)=>xt(e,typeof t!="symbol"?t+"":t,n);import{Jv as M,m as be,nX as R,ws as Pt,Cq as Ge,wu as Bt,DE as Ye,cJ as Ot,cK as Lt,nY as Je,nK as Ut,i as ke,fU as $t,m9 as Nt,cR as Ht}from"./tr-2J8Mf.js";import{J as Ft,Z as Kt,dW as Be,cU as pe,dH as Wt,ax as qt,be as Xe,I as jt,e8 as Vt}from"./BaujsV9k.js";import{e as zt,b as ae,F as Gt,y as re,_ as _e,G as Yt,C as Jt,W as Qe,v as Xt,u as Qt,M as Zt}from"./DX-Wrapd.js";import{D as Oe,a as en,d as tn}from"./CQcEqK4G.js";import{m as nn,g as Ze,r as an,k as rn,D as sn}from"./haN7a3Sc.js";import{e as on}from"./CL3a4Hm1.js";import{z as et,O as cn,R as ln}from"./Bqd7fdCF.js";import{a as dn}from"./ebbVP0tp.js";import{f as un}from"./chjnSxvZ.js";import{bm as h,_ as fe}from"./C0QTy0Sy.js";import{a8 as tt,aA as se,I as he,a as nt,n as at,cS as rt,e as st,aI as ot,M as mn,aa as pn,aV as Le,d as le,C as fn,cT as hn,U as gn,a4 as yn,aJ as wn,b_ as bn}from"./DVROSXw1.js";import{W as kn,L as _n,w as vn,R as Sn,h as it,M as An}from"./DCRuihKm.js";import{l as H,i as Mn,n as In}from"./CE7dsja4.js";import{b as Tn}from"./C6mS8uZB.js";import{K as En,P as Cn,as as Dn,aC as Rn}from"./Bz7R1ahj.js";import{a as Ue,b as xn,g as Pn}from"./DypB-Dwi.js";import{m as Bn}from"./DKHY8q_S.js";import{m as On}from"./BmTMWrby.js";import"./3SdAC2_C.js";import"./7UPrdiE9.js";import"./CrD0jtXE.js";import"./ChTqQfQN.js";import"./B4SiDSWP.js";import{i as ct}from"./Dms_DO28.js";import{C as Ln}from"./B5aYN90J.js";import{i as Un}from"./BcpfdNy8.js";import{o as L,e as $n,l as z,s as E,n as ce,b as Nn,d as Hn,c as Fn}from"./CIyUrgF0.js";const Vr=M.createSelector((e,t)=>e.unreadTracking.dividerSessionByAgentId[t]??null),zr=M.createSelector(e=>e.unreadTracking.currentlyViewedAgentId),Gr=M.createSelector(e=>{const t=[];for(const s of Object.values(e.panelLayout.byWorkspaceId))for(const o of Object.values(s.panels))for(const i of o.tabs)i.type==="agent"&&i.agentId&&t.push(i.agentId);const n=Object.keys(e.unreadTracking.dividerSessionByAgentId),a=new Set(e.agentSessions.agentIdsByWorkspace[be]??[]);return{chiefCardVisible:e.sidebarNav.panelItem==="chief",chiefSessionAgentIds:n.filter(s=>a.has(s)),dividerSessionAgentIds:n,openAgentTabIds:t}});function Yr(e,t){if(e)return e.model}function Kn({messages:e,pendingInitialPrompt:t,pendingContextReferenceCount:n=0}){return e.length>0||!!t||n>0}function Jr({session:e,messages:t,pendingInitialPrompt:n,pendingContextReferenceCount:a=0}){return!(e?Ft(e):!1)&&!Kn({messages:t,pendingInitialPrompt:n,pendingContextReferenceCount:a})}function Xr(e){return Kt(e.messageMetadata)}function Wn(e){return{id:e.id,appMessageId:e.appMessageId,role:"user",timestamp:new Date(e.createdAt??0).toISOString(),contentBlocks:[...e.content?[{type:"text",text:e.content}]:[],...e.imageBlocks??[],...e.fileBlocks??[]],metadata:e.messageMetadata,...e.author!==void 0?{author:e.author}:{}}}function Qr(e){return Wn({...e,createdAt:Date.parse(e.queuedAt)})}const qn=8*1024*1024,jn=3*1024*1024;function Vn(e){return Math.ceil(Math.max(0,e)/3)*4}function zn(e){const t=e.promptBase64Bytes;return e.mimeType==="image/jpeg"&&Number.isSafeInteger(e.size)&&e.size>0&&e.size<=jn&&typeof t=="number"&&t===Vn(e.size)?t:null}async function lt(e,t,n,a,r=()=>{}){const s=()=>{if(!a())throw new Error("media-send-retired")};if(s(),r("overlay-render"),!n.exportMedia)throw new Error("media-export-unavailable");const o=dn(e.source,e.saved);if(o.length>1e4)throw new Error("media-animation-layer-limit");const i=[];for(const c of o)s(),i.push({...c,png:await nn(e.source,e.saved,c.atMs)});s(),r("export");const l=await n.exportMedia({outputVersion:zt,jobId:t,media:e,layers:i});if(s(),!l.ok)throw new Error(["media-export-failed",l.error].filter(Boolean).join(":"));return{jobId:t,value:l.value}}const ve={CLIPBOARD_WRITE:"dock-media:clipboard-write",CLIPBOARD_READ:"dock-media:clipboard-read",MENU:"dock-media:menu"};function $e(e,t){return Math.max(0,(e.pausedAt??t)-e.startedAt-(e.pausedMs??0))}function ge(e,t){if(!t?.startsWith(".intent/attachments/"))return;const n=t.split("/").map(encodeURIComponent).join("/"),a=tt(`intent://local/file/${n}`,e);return a?.kind==="video"?a.url:void 0}function Gn(e){const t=e.video==="full"?h.dock_captureEditor_videoFull_label():h.dock_captureEditor_videoHighlights_label(),n=e.voice==="audio"?h.dock_captureEditor_voiceAudio_label():e.voice==="transcript"?h.dock_captureEditor_voiceTranscript_label():h.dock_captureEditor_voiceOff_summary();return`${t} · ${n}`}function Yn(e,t,n,a){if(a?.error==="permission")return a.kind==="pick"?"accessibility":"screen";if(e==="permission"||t==="permission")return"screen";if(n?.startsWith("microphone-permission"))return"microphone";if(n?.startsWith("speech-permission"))return"speech"}const V=un;function Zr(e){const{view:t,items:n,local:a,labels:r,copy:s}=e,o=t.speech.error??t.speech.capability?.reason??null,i=Yn(t.captureError,t.clips.find(y=>y.status==="failed"&&y.error==="permission")?.error??null,o,t.annotationIssue),l=t.annotationIssue?.error==="unavailable"?s?.annotationUnavailable:void 0,c=t.annotationIssue,d=t.captureError==="permission",u=c?.error==="permission"&&c.kind!=="pick",g=c?.error==="permission"&&c.kind==="pick",p=o?.startsWith("speech-permission")?"speech":o?.startsWith("microphone-permission")||o==="permission"?"microphone":void 0,m={},w={},f=(y,D,$)=>{m[y]=D,$&&(w[y]=$)};s&&(d&&(f("capture",s.permission,"screen"),t.recording||f("record",s.permission,"screen")),u&&!t.annotating&&f("annotate",s.permission,"screen"),g&&(f("pick",s.accessibilityPermission,"accessibility"),t.tool==="pick"&&!t.annotating&&f("annotate",s.accessibilityPermission,"accessibility")),p&&!t.dictation&&f("mic",(o&&r.speechError?.(o))??s.speechPermission,p));const k=y=>{const D=w[y];D&&e.actions.onOpenSettings(D)},_=new Set(t.evidenceOwnedItemIds),I=t.clips.find(y=>y.status==="recording"),S=t.clips.length>=ae.clips,v=t.capabilities,B=t.speech.available,C=new Set(t.clips.filter(y=>y.status==="recording"||y.status==="placing"||!!y.media).flatMap(y=>y.captureHistory?.map(D=>D.image.id)??[])),P=[...t.tiles.filter(({image:y,marks:D})=>!!y.media||y.source!=="annotate"||!C.has(y.id)||D.some(({mark:$})=>!$.clipId)).map(({image:y,marks:D})=>({kind:"image",id:y.contextItemId,url:a.previews[y.id]??"",markCount:D.length,owner:"evidence",...a.previews[y.id]?{}:{status:"placing"}})),...t.clips.filter(y=>!y.discarding).map(y=>({kind:"clip",id:y.contextItemId??y.id,duration:V(y.status==="recording"?$e(y,a.now):y.durationMs),recording:y.status==="recording",...y.media?.saved?{summary:Gn(y.media.saved)}:{},...y.status==="ready"&&ge(e.workspaceId,y.path)?{url:ge(e.workspaceId,y.path)}:{},owner:"evidence",...y.status==="placing"?{status:"placing"}:{},...y.status==="failed"?{status:"failed",...y.error==="limit"?{error:h.dock_composer_clipTooLarge_error()}:{}}:{}})),...n.filter(y=>!_.has(y.id)).map(y=>({...y.imageData&&y.imageMimeType?{kind:"image",id:y.id,url:`data:${y.imageMimeType};base64,${y.imageData}`,markCount:0,file:{name:y.label,imageData:y.imageData,imageMimeType:y.imageMimeType}}:{kind:"file",id:y.id,name:y.label},owner:"attachment",...y.placementStatus==="placing"?{status:"placing"}:{},...y.placementStatus==="failed"?{status:"failed",error:y.placementError}:{}}))];return{mediaStatus:t.recording?{kind:"recording",label:r.recording}:t.annotating?{kind:"annotating",label:r.annotating}:void 0,...i?{settingsPane:i}:{},...l?{annotationNotice:l}:{},labels:r,attachments:P,...s?{placeholder:t.dictation?"":s.idle}:{},state:{captureRevision:t.captureAccepted,capturePending:t.capturePending,captureDisabled:!v.capture||t.captureDisabled,...t.captureDisabled?{captureTooltip:r.captureLimit}:{},captureMode:t.evidence?.annotation?"fullscreen":t.captureMode,captureModesAvailable:!!v.captureModes&&!t.evidence?.annotation,annotationActive:t.annotating,tool:t.tool,toolUsed:t.toolUsed,annotationDisabled:!v.annotate,recording:t.recording&&!I?.discarding,recordingDisabled:!!I?.discarding||!t.recording&&(!v.record||S),...S&&!t.recording?{recordingTooltip:r.clipLimit}:{},recordingTime:V(I?$e(I,a.now):0),dictating:!!t.dictation,dictationPending:t.speech.pending||t.dictation?.status==="transcribing",dictationDisabled:!B&&!t.dictation&&!m.mic,...t.speech.error&&r.speechError?{dictationTooltip:r.speechError(t.speech.error)}:{},dictationTime:t.dictation?V(a.now-t.dictation.startedAt):V(0),inputLevels:t.speech.levels,...Object.keys(m).length?{alerts:m}:{}},...e.actions,...t.fileAttachmentsEnabled===!1?{onEdit:void 0}:{},onAlert:k,beforeSubmit:e.beforeSubmit}}const Se=()=>globalThis.electronAPI,Jn=["image/png","image/jpeg","image/webp"],Ne=e=>Jn.includes(e??"")?e:null;function He(e){const t=atob(e),n=new Uint8Array(t.length);for(let a=0;a<t.length;a+=1)n[a]=t.charCodeAt(a);return n}async function es(e,t){const{view:n,items:a,previews:r}=t,s=n.tiles.find(({image:c})=>c.id===e||c.contextItemId===e);if(s){const c=a.find(p=>p.id===s.image.contextItemId),d=s.image.media;if(s.image.mediaError)return null;if(d?.saved){if(!t.createSavedPreviewUrl||!t.revokeUrl)return null;const p={...d,saved:d.saved},m=await t.createSavedPreviewUrl(t.workspaceId,p);try{const w=await t.fetchBytes(m),f=p.saved.crop;return{kind:"image",name:c?.label||"screenshot.png",mimeType:"image/png",bytes:w,intent:{pixels:{mimeType:"image/png",width:Math.max(1,Math.round(f?.w??p.source.width)),height:Math.max(1,Math.round(f?.h??p.source.height)),displayScale:s.image.displayScale,capturedAt:s.image.capturedAt},raw:w,marks:[]}}}finally{t.revokeUrl(m)}}const u=Ne(c?.imageMimeType),g=r[s.image.id];return!c?.imageData||!u||!g?null:{kind:"image",name:c.label||"screenshot.png",mimeType:"image/png",bytes:await t.fetchBytes(g),intent:{pixels:{mimeType:u,width:s.image.width,height:s.image.height,displayScale:s.image.displayScale,capturedAt:s.image.capturedAt,...s.image.hash?{hash:s.image.hash}:{}},raw:He(c.imageData),marks:s.marks.map(({mark:p})=>({tool:p.tool,geometry:p.geometry,bounds:p.bounds,element:p.element}))}}}const o=n.clips.find(c=>c.id===e||c.contextItemId===e);if(o){const c=o.status==="ready"?ge(t.workspaceId,o.path):null;if(!c)return null;const d=a.find(g=>g.id===o.contextItemId),u=await t.fetchBytes(c);if(!Qn(u))throw new Error("Not a recording file");return{kind:"clip",name:d?.label||`recording-${o.id.slice(0,8)}.mp4`,mimeType:d?.attachmentMimeType||"video/mp4",bytes:u,durationMs:o.durationMs,hasMicAudio:o.hasMicAudio}}const i=a.find(c=>c.id===e),l=Ne(i?.imageMimeType);return i?.imageData&&l?{kind:"image",name:i.label||"image",mimeType:l,bytes:He(i.imageData)}:null}async function Xn(e){const t=await fetch(e);if(!t.ok)throw new Error(`Media request failed (${t.status})`);const n=new Uint8Array(await t.arrayBuffer()),a=Number(t.headers.get("content-length")??Number.NaN);if(n.byteLength===0||Number.isFinite(a)&&a!==n.byteLength)throw new Error("Media response was incomplete");return n}function Qn(e){return e.byteLength>8&&String.fromCharCode(...e.subarray(4,8))==="ftyp"}async function ts(e){try{return(await Se()?.invoke(ve.CLIPBOARD_WRITE,e))?.ok===!0}catch{return!1}}async function Zn(){try{return await Se()?.invoke(ve.CLIPBOARD_READ,{})??null}catch{return null}}async function ns(e){try{const t=await Se()?.invoke(ve.MENU,{canCut:e});return t?.action==="copy"||t?.action==="cut"?t.action:null}catch{return null}}const Fe=new WeakSet;async function ea(e,t){const[n]=e;if(e.length!==1||!n||n.size!==t.size)return!1;try{const a=await crypto.subtle.digest("SHA-256",await n.arrayBuffer());return Array.from(new Uint8Array(a),s=>s.toString(16).padStart(2,"0")).join("")===t.sha256}catch{return!1}}function as(e,{onIntentMedia:t,isCurrent:n,read:a=Zn}){const r=e.clipboardData;if(Fe.has(e)||!r||r.files.length===0)return!1;const s=e.target,o=Array.from(r.files),i=r.types.filter(l=>l!=="Files").map(l=>[l,r.getData(l)]);return e.preventDefault(),e.stopImmediatePropagation(),a().catch(()=>null).then(async l=>{if(!n())return;if(l&&await ea(o,l)){n()&&t(l);return}if(!n()||!(s instanceof Node)||!s.isConnected)return;const c=new DataTransfer;for(const u of o)c.items.add(u);for(const[u,g]of i)c.setData(u,g);const d=new ClipboardEvent("paste",{clipboardData:c,bubbles:!0,cancelable:!0});Fe.add(d),s.dispatchEvent(d)}),!0}function ta(e){const t=atob(e),n=new Uint8Array(t.length);for(let a=0;a<t.length;a++)n[a]=t.charCodeAt(a);return n}function na(e){let t="";for(let a=0;a<e.length;a+=32768)t+=String.fromCharCode(...e.subarray(a,a+32768));return btoa(t)}function dt(e){let t=0;return e.endsWith("==")?t=2:e.endsWith("=")&&(t=1),Math.floor(e.length*3/4)-t}async function aa(e){const t=await crypto.subtle.digest("SHA-256",e.buffer.slice(e.byteOffset,e.byteOffset+e.byteLength));return Array.from(new Uint8Array(t)).map(n=>n.toString(16).padStart(2,"0")).join("")}const ut={placeAttachment:ot,beginAttachmentUpload:st,sendAttachmentUploadChunk:rt,commitAttachmentUpload:at,abortAttachmentUpload:nt,getAttachmentInfo:he,mintIdempotencyKey:se};async function Ae(e,t,n,a=ut){const{idempotencyKey:r}=n,s={...r!==void 0?{idempotencyKey:r}:{},...n.rawScreenshot!==void 0?{rawScreenshot:n.rawScreenshot}:{}},o=async m=>hn(m,r)?Le(e,r,a.getAttachmentInfo):void 0;if(dt(n.data)<=mn)try{return await a.placeAttachment(e,t,{data:n.data,mimeType:n.mimeType,...s})}catch(m){const w=await o(m);if(w)return w;throw m}const i=ta(n.data),l=await aa(i);let c,d;try{({uploadId:c,maxChunkBytes:d}=await a.beginAttachmentUpload(e,t,i.byteLength,l,{mimeType:n.mimeType,...s}))}catch(m){if(r!==void 0&&pn(m)){const w=await Le(e,r,a.getAttachmentInfo);if(w)return w}throw m}const u=Math.min(gn,d),g=Math.ceil(i.byteLength/u);let p=!1;try{for(let m=0;m<g;m++){const w=i.subarray(m*u,(m+1)*u);await a.sendAttachmentUploadChunk(c,m,na(w),e)}return p=!0,await a.commitAttachmentUpload(c,e)}catch(m){const w=p?await o(m):void 0;if(w)return w;throw await a.abortAttachmentUpload(c,e).catch(()=>{}),m}}function ra(e,t){return yn(e,`image-${Date.now()}-${t+1}`)}class Me extends Error{constructor(n,a){super(n);Pe(this,"retryBlocks");this.name="ImagePlacementError",this.retryBlocks=a}}function sa(e,t){return e instanceof Me?e.retryBlocks:t}async function oa(e,t,n=ut,a=()=>!0){const r=l=>(...c)=>(le(a),l(...c));n={placeAttachment:r(n.placeAttachment),beginAttachmentUpload:r(n.beginAttachmentUpload),sendAttachmentUploadChunk:r(n.sendAttachmentUploadChunk),commitAttachmentUpload:r(n.commitAttachmentUpload),abortAttachmentUpload:r(n.abortAttachmentUpload),getAttachmentInfo:r(n.getAttachmentInfo),mintIdempotencyKey:r(n.mintIdempotencyKey)};const s=[],o=[],i=[];for(let l=0;l<t.length;l++){le(a);const c=t[l];if("attachmentId"in c&&c.attachmentId){const p={type:"image",attachmentId:c.attachmentId,...c.mimeType?{mimeType:c.mimeType}:{}};s.push(p),o.push(p);continue}const d=c,u=d.placementFileName??ra(d.mimeType,l),g=n.mintIdempotencyKey(d.placementIdempotencyKey);try{const p=await Ae(e,u,{data:d.data,mimeType:d.mimeType,...g!==void 0?{idempotencyKey:g}:{}},n),m={type:"image",attachmentId:p.attachmentId,...p.mimeType??d.mimeType?{mimeType:p.mimeType??d.mimeType}:{}};s.push(m),o.push(m)}catch(p){const m=fn(p);i.push(m?`${u} (${m})`:u),o.push(g!==void 0?{...d,placementIdempotencyKey:g,placementFileName:u}:d)}}if(i.length>0)throw new Me(h.chat_imagePlacement_failed_error({names:i.join(", ")}),o);return le(a),s}const rs=Object.freeze(Object.defineProperty({__proto__:null,ImagePlacementError:Me,base64DecodedBytes:dt,imageRetryBlocks:sa,placeImageAttachment:Ae,toImageReferenceBlocks:oa},Symbol.toStringTag,{value:"Module"}));function mt(){try{return kn()}catch{return null}}function ia(){return{backendId:M.state.connections.windowBackendId??null,generation:M.state.daemonHealth.connectionGeneration,transport:mt()}}class Ie extends Error{constructor(){super("dock-evidence-backend-changed")}}function N(e,t){return async(...n)=>{e();const a=await t(...n);return e(),a}}const K={current:e=>mt()===e.transport&&M.state.daemonHealth.connectionGeneration===e.generation&&(M.state.connections.windowBackendId??null)===e.backendId,capabilities:()=>_n(),placeImage:(e,t,n,a)=>Ae(e,t,n,{placeAttachment:N(a,ot),beginAttachmentUpload:N(a,st),sendAttachmentUploadChunk:N(a,rt),commitAttachmentUpload:N(a,at),abortAttachmentUpload:N(a,nt),getAttachmentInfo:N(a,he),mintIdempotencyKey:se}),lookup:(e,t)=>he({workspaceId:e,idempotencyKey:t}),mintKey:se};function Y(e){return K.current(e)}function ca(e,t){const n=M.state.dockConversation;return{generation:n.generation,authority:n.authority,clearRevision:R(n.drafts,Gt(e,t))?.clearRevision??0,binding:ia()}}function ss(e,t,n){const a=ca(e,t);return a.generation===n.generation&&a.authority===n.authority&&a.clearRevision===n.clearRevision&&Y(n.binding)}function pt(e,t){return()=>{if(!e.current(t))throw new Ie}}const ft=Object.freeze({rawRetention:!1,chiefAttachments:!1});function os(e){return e!==ft}const de=new Map;function ht(e,t=K){const n=`${e.backendId}:${e.generation}`;let a=de.get(n);if(!a){const r=pt(t,e);a=(async()=>{r();const o=await t.capabilities();r();const i=o?.server?.capabilities;if(!i||typeof i!="object")throw new Error("unobserved");return{rawRetention:i.rawScreenshotRetention===1,chiefAttachments:i.chiefAttachments===1}})().catch(()=>(de.delete(n),ft)),de.set(n,a)}return a}class ee extends Error{constructor(t){super(`dock-raw-retention-contract:${t}`),this.reason=t}}function gt(e){const{rpcCode:t,code:n}=e??{};return t===-32602||n==="INVALID_PARAMS"}function la(e){const t=String(e?.message??"");return gt(e)&&(t.includes("rawScreenshotExpired:")||/expired at .*not renewable/i.test(t))}function da(e,t,n){const a=e.rawScreenshot;if(!a||a.compositeAttachmentId!==t)return null;const r=Date.parse(a.expiresAt);return Number.isFinite(r)?a.expired||r<=n?"expired":{attachmentId:e.attachmentId,expiresAt:a.expiresAt}:null}function Ke(e){return{ok:!0,path:e.path,fileName:e.fileName,size:e.size,attachmentId:e.attachmentId,...e.mimeType?{mimeType:e.mimeType}:{},uploadedAt:e.uploadedAt,replayed:!0,...e.rawScreenshot?{rawScreenshot:e.rawScreenshot}:{}}}class ua extends Error{constructor(t,n){super("dock-evidence-placement-failed"),this.imageId=t,this.failure=n}}const We=e=>e.split("/")[1]?.replace("jpeg","jpg")||"png";async function ma(e){const t=e.api??K,n=e.now??Date.now,a=pt(t,e.binding);a();const r=await ht(e.binding,t);a();const s=r.rawRetention&&(e.workspaceId!==be||r.chiefAttachments),o=[];for(const i of e.images){const l=e.records[i.image.id];let c=l&&l.signature===i.signature&&l.workspaceId===e.workspaceId&&l.backendId===e.binding.backendId?l:{imageId:i.image.id,signature:i.signature,workspaceId:e.workspaceId,backendId:e.binding.backendId,compositeKey:null,rawKey:null,composite:null,raw:null,rawSettled:!1};const d=u=>{c=u,e.onRecord(u)};try{if(!c.composite){const g=c.compositeKey,p=t.mintKey(g??void 0)??null;p!==c.compositeKey&&d({...c,compositeKey:p});let m;g&&p===g&&(a(),m=await t.lookup(e.workspaceId,p).then(Ke).catch(()=>{}),a()),m||(a(),m=await t.placeImage(e.workspaceId,`screenshot-${i.image.id.slice(0,8)}.${We(i.composite.mimeType)}`,{data:i.composite.base64,mimeType:i.composite.mimeType,...p?{idempotencyKey:p}:{}},a),a()),d({...c,composite:{attachmentId:m.attachmentId,mimeType:m.mimeType??i.composite.mimeType}})}const u=c.composite.attachmentId;if(s&&i.raw&&!c.raw&&!c.rawSettled){const g=c.rawKey,p=t.mintKey(g??void 0);if(p){p!==c.rawKey&&d({...c,rawKey:p});let m;g&&p===g&&(a(),m=await t.lookup(e.workspaceId,p).then(Ke).catch(()=>{}),a());try{m||(a(),m=await t.placeImage(e.workspaceId,`screenshot-${i.image.id.slice(0,8)}-original.${We(i.raw.mimeType)}`,{data:i.raw.base64,mimeType:i.raw.mimeType,idempotencyKey:p,rawScreenshot:{compositeAttachmentId:u}},a),a());const w=da(m,u,n());if(w==="expired")d({...c,rawSettled:!0});else if(w)d({...c,raw:w});else throw new ee("echo")}catch(w){if(la(w))d({...c,rawSettled:!0});else throw w instanceof ee?w:gt(w)?new ee("refused"):w}}else throw new ee("unkeyed")}}catch(u){throw u instanceof Ie?u:new ua(i.image.id,u)}o.push(c)}return o}async function is(e,t,n,a){const r=()=>{if(!K.current(a))throw new Ie};r();const s=await K.placeImage(e,t,{...n,idempotencyKey:K.mintKey()},r);return r(),s}const pa=new Set(["invalid-saved-edit","media-send-retired","transcript-unavailable","transcript-pending","invalid-edit","stale-source","legacy-baked-marks","timing-unavailable","audio-unavailable","media-source-unavailable","media-export-unavailable","media-animation-layer-limit","media-export-failed","legacy-original-unavailable","capture-render-unavailable","capture-blur-unavailable","stale-source-pixels","not-a-screenshot","not-admitted","unavailable","dock-evidence-missing-pixels","draft-restore-failed","image-budget-exceeded"]),fa=new Set(["unavailable","permission","failed","busy","cancelled","limit"]);class O extends Error{constructor(t,n){super(n),this.stage=t,this.code=n,this.name="DockSendError"}}function oe(e){const t=e instanceof Error?e.message:typeof e=="string"?e:"";if(t.length>64)return"unclassified";const[n,...a]=t.split(":");return!pa.has(n)||a.length>2?"unclassified":n!=="media-export-failed"?a.length?"unclassified":n:[n,...a.map(r=>fa.has(r)?r:"other")].join(":")}function cs(e,t){return e instanceof O?{stage:e.stage,code:oe(e.code)}:{stage:t,code:oe(e)}}function W(e){if(!e||e.source.kind!=="recording")return!1;const t=e.source,n=e.saved??re(t,t.capturedMarks??[],e.transcript);if(n.video!=="full"||n.voice!=="audio"||n.crop||n.blurRegions.length||n.blurStrokes?.length)return!1;const a=_e(n,t,e.transcript);return t.visuals==="clean"?!a.errors.length&&!a.muted&&n.cuts.length===0&&!n.marks.some(r=>r.included)&&a.marks.length===0&&a.transcript===null&&a.kept.length===1&&a.kept[0].startMs===0&&a.kept[0].endMs===t.durationMs&&a.clips.length===1&&a.clips[0].startMs===0&&a.clips[0].endMs===t.durationMs:!a.errors.length&&!a.muted&&a.clips.length===1&&a.clips[0].startMs===0&&a.clips[0].endMs>=t.durationMs}async function ha(e,t,n,a,r,s){const o={images:{},files:[],frames:[],framePromptBytes:[],metadata:[]};let i="validate";try{const l=()=>{if(!r()||!Y(n))throw new Error("media-send-retired")};for(const c of[...t.images,...t.clips]){if(i="validate",s?.stage(i),c.mediaError)throw new Error("invalid-saved-edit");if(!c.media||W(c.media))continue;l();const d=structuredClone(c.media),u=d.source;let g=d.saved??re(u,u.capturedMarks??[],d.transcript),p=crypto.randomUUID();try{if(u.kind==="recording"&&g.voice==="transcript"&&d.transcript?.status!=="ready"){if(i="transcribe",s?.stage(i),!a?.transcribeMedia)throw new Error("transcript-unavailable");const f=await a.transcribeMedia({jobId:p,media:d});if(l(),!f.ok)throw new Error("transcript-unavailable");d.transcript=f.value,d.saved||(g=re(u,u.capturedMarks??[],d.transcript))}i="plan",s?.stage(i);const m=_e(g,u,d.transcript);if(m.errors.length)throw new Error(m.errors[0]);const w={id:c.id,kind:u.kind,video:g.video,voice:g.voice,transcript:m.transcript,batches:u.batches,marks:m.marks.map(({n:f,mark:k,frameAtMs:_})=>({n:f,id:k.id,at_ms:_,kind:k.kind,label:k.label,note:k.note,context:k.context,geometry:k.geometry}))};if(u.kind==="screenshot"){i="screenshot-source",s?.stage(i);const f=u.path.split("/").map(encodeURIComponent).join("/"),k=tt(`intent://local/file/${f}`,e);if(!k||k.kind!=="image")throw new Error("media-source-unavailable");const _=await Xn(k.url);l();const I={base64:Ze(_.buffer.slice(_.byteOffset,_.byteOffset+_.byteLength)),mimeType:/\.jpe?g$/i.test(u.path)?"image/jpeg":/\.webp$/i.test(u.path)?"image/webp":"image/png"};i="screenshot-render",s?.stage(i),o.images[c.id]=await an(u,g,I),l()}else{if(!m.clips.length){w.video_attachment_id=null,w.frames=[],w.kept_ms=[],o.metadata.push(w);continue}const f={...d,saved:g};let k=await a?.takePreparedRecording?.(f);if(k&&(p=k.jobId),l(),!k){if(!a)throw new Error("media-export-unavailable");k=await lt(f,p,a,()=>r()&&Y(n),S=>{i=S,s?.stage(S),S==="export"&&s?.exportAttempt(p)})}p=k.jobId,i="placement",s?.stage(i);const _=[k.value.video,...k.value.frames],I=[];for(let S=0;S<_.length;S++){l();const v=_[S],B=`capture-${c.id.slice(0,12)}-${S}.${S===0?"mp4":v.mimeType==="image/jpeg"?"jpg":"png"}`,C=await wn(e,B,{sourcePath:v.sourcePath,mimeType:v.mimeType,idempotencyKey:se()},void 0,void 0,()=>r()&&Y(n));l(),S===0?o.files.push({type:"file",attachmentId:C.attachmentId,fileName:B,mimeType:C.mimeType??v.mimeType,size:C.size}):(o.frames.push({type:"image",attachmentId:C.attachmentId,mimeType:v.mimeType==="image/jpeg"?"image/jpeg":"image/png"}),o.framePromptBytes.push(zn(v))),I.push(C.attachmentId)}w.video_attachment_id=I[0],w.frames=k.value.frames.map((S,v)=>({mark_id:S.markId,attachment_id:I[v+1]})),w.kept_ms=m.clips}o.metadata.push(w)}finally{s?.stage("release"),await a?.releaseMediaJob?.(p).catch(()=>{})}}return o}catch(l){throw l instanceof O?l:new O(i,oe(l))}}const ue=1568,ga=.85;async function ya(e,t){const n=Math.round(e.length*3/4/1024),a=await wa(e,t),{width:r,height:s}=a,o=r>ue||s>ue;let i=r,l=s;if(o){const f=ue/Math.max(r,s);i=Math.round(r*f),l=Math.round(s*f)}const c=new OffscreenCanvas(i,l),d=c.getContext("2d");if(!d)throw new Error("Failed to get 2D canvas context for image resize");d.drawImage(a,0,0,i,l);let u=t;ba(d,i,l)||(u="image/jpeg");const g=await c.convertToBlob({type:u,quality:u==="image/jpeg"?ga:void 0}),p=g.type||u,m=await ka(g),w=Math.round(m.length*3/4/1024);return console.debug(`[image-resize] ${r}×${s} → ${i}×${l} | ${t} → ${p} | ${n} KB → ${w} KB`),{base64:m,mimeType:p}}async function wa(e,t){const n=atob(e),a=new Uint8Array(n.length);for(let s=0;s<n.length;s++)a[s]=n.charCodeAt(s);const r=new Blob([a],{type:t});return createImageBitmap(r)}function ba(e,t,n){const r=e.getImageData(0,0,t,n).data;for(let s=3;s<r.length;s+=4)if(r[s]<255)return!0;return!1}async function ka(e){const t=await e.arrayBuffer(),n=new Uint8Array(t);let a="";for(let r=0;r<n.length;r++)a+=String.fromCharCode(n[r]);return btoa(a)}const T={...Oe,badge:Oe.badgeRadius*2};function _a(e,t,n=1,a=0){const r=Math.max(1,e.displayScale)*n,s=[],o=i=>i*n;for(const{n:i,mark:l}of t){const c=l.geometry;if(c.kind==="rect")s.push({kind:"rect",x:o(c.x),y:o(c.y),w:o(c.w),h:o(c.h),width:T.stroke*r});else if(c.kind==="path")s.push({kind:"path",points:c.points.map(m=>({x:o(m.x),y:o(m.y)})),width:T.pen*r});else{const m={x:o(c.from.x),y:o(c.from.y)},w={x:o(c.to.x),y:o(c.to.y)};s.push({kind:"arrow",from:m,to:w,head:Ia(m,w,T.arrowHead*r),width:T.stroke*r})}if(!T.showNumbers)continue;const d=Math.max(a,T.badge/2*r),u=o(l.bounds.x+l.bounds.w),g=o(l.bounds.y),p=tn({x:o(l.bounds.x),y:g,w:u-o(l.bounds.x),h:o(l.bounds.h)},{x:0,y:0,w:o(e.width),h:o(e.height)},r,d);s.push({kind:"badge",...p,radius:d,label:String(i),font:d*T.badgeTextScale})}return s}function va(e,t){"letterSpacing"in e&&(e.letterSpacing="0px"),"wordSpacing"in e&&(e.wordSpacing="0px");const n=(a,r,s)=>{e.strokeStyle=T.halo,e.lineWidth=a+T.haloWidth*r,s(),e.strokeStyle=T.accent,e.lineWidth=a,s()};e.strokeStyle=T.accent,e.lineCap="round",e.lineJoin="round";for(const a of t)if(a.kind==="rect")n(a.width,a.width/T.stroke,()=>e.strokeRect(a.x,a.y,a.w,a.h));else if(a.kind==="path"||a.kind==="arrow"){e.lineWidth=a.width,e.beginPath();const r=a.kind==="path"?a.points:[a.from,a.to];a.kind==="arrow"&&r.forEach((o,i)=>i?e.lineTo(o.x,o.y):e.moveTo(o.x,o.y)),a.kind==="arrow"&&(e.moveTo(a.head.left.x,a.head.left.y),e.lineTo(a.to.x,a.to.y),e.lineTo(a.head.right.x,a.head.right.y));const s=a.kind==="path"?new Path2D(en(a.points)):null;n(a.width,a.width/(a.kind==="path"?T.pen:T.stroke),()=>s?e.stroke(s):e.stroke())}else e.fillStyle=T.paper,e.beginPath(),e.arc(a.x,a.y,a.radius,0,Math.PI*2),e.closePath(),e.fill(),e.strokeStyle=T.accent,e.lineWidth=T.badgeOutline*a.radius/T.badgeRadius,e.stroke(),e.fillStyle=T.ink,e.font=`600 ${a.font}px ${T.badgeFontFamily}`,e.textAlign="center",e.textBaseline="middle",e.fillText(a.label,a.x,a.y)}async function Sa(e,t){const n=Uint8Array.from(atob(e),a=>a.charCodeAt(0));return createImageBitmap(new Blob([n],{type:t}))}async function Aa(e){const t=await e.convertToBlob({type:"image/png"});return Ze(await t.arrayBuffer())}async function yt(e,t,n,a,r=0){await rn();const s=await Sa(e.base64,e.mimeType);try{const o=Math.min(1,a/Math.max(t.width,t.height)),i=new OffscreenCanvas(Math.max(1,Math.round(t.width*o)),Math.max(1,Math.round(t.height*o))),l=i.getContext("2d");if(!l)throw new Error("dock-evidence-canvas-unavailable");return l.drawImage(s,0,0,i.width,i.height),va(l,_a(t,n,o,r)),i}finally{s.close()}}async function Ma(e,t,n){const a=await yt(e,t,n,Math.max(t.width,t.height));return ya(await Aa(a),"image/png")}async function ls(e,t,n,a=384){const r=await yt(e,t,n,a,a/32);return URL.createObjectURL(await r.convertToBlob({type:"image/png"}))}function Ia(e,t,n=T.arrowHead){const a=Math.atan2(t.y-e.y,t.x-e.x),r=T.arrowSpread;return{left:{x:t.x-n*Math.cos(a-r),y:t.y-n*Math.sin(a-r)},right:{x:t.x-n*Math.cos(a+r),y:t.y-n*Math.sin(a+r)}}}function ds(e,t){const n=Yt(t??void 0),a=new Set(t?.clips.filter(r=>!!r.media&&!W(r.media)).map(r=>r.contextItemId));return e.filter(r=>!n.has(r.id)&&!a.has(r.id))}async function us({workspaceId:e,agentId:t,evidence:n,clickedItems:a,sendItems:r,clickedPayload:s,binding:o,service:i,current:l,onRecord:c,timing:d}){const u=()=>{if(!l()||!Y(o))throw new O("validate","media-send-retired")};if(u(),n?.images.some(b=>b.mediaError)||n?.clips.some(b=>b.mediaError))throw new O("validate","invalid-saved-edit");const g=b=>!!b.media&&!W(b.media),p=n?{workspaceId:e,agentId:t,appUrl:`intent://local/workspace/${encodeURIComponent(e)}`,clipAttachmentIds:Object.fromEntries(n.clips.map(b=>[b.id,a.find(A=>A.id===b.contextItemId)?.attachmentId??null]))}:null;for(const b of n?.clips??[]){if(!b.media||!W(b.media))continue;const A=a.find(Q=>Q.id===b.contextItemId);if(!A||A.attachmentId!==b.media.source.attachmentId||A.path!==b.media.source.path||A.placementStatus!==void 0&&A.placementStatus!=="placed")throw new O("validate","legacy-original-unavailable")}const m=n?await ha(e,n,o,i,l,d):{images:{},files:[],frames:[],framePromptBytes:[],metadata:[]},w=new Set(n?.clips.filter(b=>g(b)||!!b.media&&W(b.media)).map(b=>b.id)),f=new Set(n?.clips.filter(b=>w.has(b.id)).flatMap(b=>(b.captureHistory??[]).map(A=>A.image.id))),k=(n?.images??[]).filter(b=>b.source!=="annotate"||!!b.media||!f.has(b.id)||n.marks.some(A=>A.imageId===b.id&&!(A.clipId&&w.has(A.clipId))));d?.stage("burn");let _=[];try{_=n?await Ta({...n,images:k},a,m.images):[]}catch(b){throw new O("burn",oe(b))}if(m.framePromptBytes.reduce((b,A)=>b+(A??0),0)>qn)throw new O("validate","image-budget-exceeded");const S=new Set(n?.images.filter(b=>b.media).map(b=>b.id)),v=n?{...n,images:k.map(b=>m.images[b.id]?{...b,width:m.images[b.id].width,height:m.images[b.id].height}:b),clips:n.clips.filter(b=>!g(b)),marks:n.marks.filter(b=>!S.has(b.imageId)&&!n.clips.some(A=>g(A)&&A.id===b.clipId))}:null;u();const B=m.metadata.some(b=>typeof b.transcript=="string"&&b.transcript.trim());if(!s.text.trim()&&!r.length&&!s.workspaceContextStr?.trim()&&!_.length&&!m.files.length&&!m.frames.length&&!s.imageBlocks?.length&&!s.fileBlocks?.length&&!B)return null;let C=_,P=null;d?.stage("placement");const xe=n?await ht(o):null;if(u(),n&&(e!==be||xe?.chiefAttachments)){const b=await ma({workspaceId:e,binding:o,images:k.map((A,Q)=>{const Z=a.find(Dt=>Dt.id===A.contextItemId);return{image:A,signature:Jt(n,A.id),composite:{base64:_[Q].data,mimeType:_[Q].mimeType},raw:!A.media&&Z?.imageData&&Z.imageMimeType?{base64:Z.imageData,mimeType:Z.imageMimeType}:null}}),records:n?.placements??{},onRecord:c});u(),C=b.map(A=>({type:"image",attachmentId:A.composite.attachmentId,mimeType:A.composite.mimeType})),P=Object.fromEntries(b.map(A=>[A.imageId,{attachmentId:A.composite.attachmentId,raw:A.raw}]))}const y=new Map(n?Qe(n).map(({n:b,mark:A})=>[A.id,b]):[]),D=p&&P?{...p,imageAttachments:P,markNumbers:y}:p&&{...p,markNumbers:y},$=n&&D?{...s,imageBlocks:[...C,...m.frames,...s.imageBlocks??[]],fileBlocks:[...s.fileBlocks??[],...m.files],workspaceContextStr:[Qt(v,D),m.metadata.length?`[Edited capture outputs]
3
3
  ${JSON.stringify(m.metadata)}`:"",s.workspaceContextStr].filter(Boolean).join(`
4
4
 
5
5
  `),messageMetadata:{...s.messageMetadata,...Xt(v,D),edited_captures:m.metadata}}:s;return u(),$}async function Ta(e,t,n={}){const a=Qe(e);return Promise.all(e.images.map(async r=>{if(n[r.id])return{type:"image",...n[r.id]};const s=t.find(i=>i.id===r.contextItemId);if(!s?.imageData||!s.imageMimeType)throw new Error("dock-evidence-missing-pixels");const o=await Ma({base64:s.imageData,mimeType:s.imageMimeType},r,a.filter(({mark:i})=>i.imageId===r.id));return{type:"image",data:o.base64,mimeType:o.mimeType}}))}function Ea(){return et()}function ms(e){const{clip:t}=e;if(t.status!=="ready"||!t.path)return null;const n=e.marks.filter(s=>s.clipId===t.id&&typeof s.clipMs=="number").sort((s,o)=>s.clipMs-o.clipMs).map(s=>({id:s.id,tool:s.tool,atMs:s.clipMs,...s.element?.name?{label:s.element.name.slice(0,200)}:{}})),a=Zt(e.evidence??void 0,t.id),r=a?t.media:void 0;return{kind:"recording",workspaceId:e.workspaceId,agentId:e.agentId,attachmentId:a?.attachmentId??t.id,sourceRevision:a?`${a.id}:${a.revision}`:t.path,attachmentPath:t.path,title:"",durationMs:t.durationMs,marks:n,provenance:a?{...a.audio==="unknown"?{}:{hasMicAudio:a.audio==="available"},visuals:a.visuals}:{hasMicAudio:t.hasMicAudio,visuals:n.length>0?"baked-marks":"clean"},...a&&r?{source:a,saved:r.saved??null,transcript:r.transcript??null}:{}}}async function ps(e){if(!Ea())return{ok:!1,error:"unavailable"};try{return await on().invoke(sn.OPEN,e)??{ok:!1,error:"unavailable"}}catch{return{ok:!1,error:"transport"}}}function fs(e){let t=null,n=null;const a=i=>e.releaseMediaJob?.(i).catch(()=>{});function r(){const i=t;t=null,!(!i||i.taken||i.stopped)&&(i.stopped=!0,clearTimeout(i.timer),a(i.id))}function s(i,l,c){if(t?.key===i||n===i||(r(),n=null,!e.adoptMediaJob||!e.exportMedia||!c()||W(l)))return;const d=structuredClone(l),u=d.saved??re(d.source,d.source.capturedMarks??[],d.transcript),g=_e(u,d.source,d.transcript);if(d.source.kind!=="recording"||d.source.visuals!=="clean"||g.errors.length||!g.clips.length||u.voice==="transcript"&&d.transcript?.status!=="ready")return;const p={...d,saved:u},m=crypto.randomUUID(),w={key:i,mediaKey:JSON.stringify(p),id:m,current:c,taken:!1,stopped:!1,settled:!1,failed:!1,timer:setTimeout(()=>{t===w&&(n=i,r())},3e4),result:Promise.resolve({error:new Error("not-started")})};t=w,w.result=lt(p,m,e,()=>!w.stopped&&w.current()).then(async f=>w.stopped||!w.current()?(await a(m),{error:new Error("media-send-retired")}):{value:f},async f=>(w.failed=!0,t===w&&(n=i),await a(m),{error:f})).finally(()=>{w.settled=!0})}async function o(i,l,c){const d=t;if(!d||d.key!==i||d.mediaKey!==JSON.stringify(l)||d.stopped||d.taken||!c())return null;if(d.failed&&d.settled)return r(),null;d.taken=!0,d.current=c,clearTimeout(d.timer),t=null;const u=await d.result;if("error"in u)throw u.error;try{if(!c())throw new Error("media-send-retired");const g=await e.adoptMediaJob?.(d.id);if(!c())throw new Error("media-send-retired");return!g?.ok||!g.value?(await a(d.id),null):u.value}catch(g){throw await a(d.id),g}}return{warm:s,take:o,cancel:r}}function hs(e={}){const t=a=>cn(a,typeof e=="function"?e():e),n=a=>vn(t(a));return{actionHints:{get capture(){return{label:h.dock_composer_screenshotAction_label(),shortcut:t("dock.capture")}},get record(){return{label:h.ui_shortcuts_dockRecord_label(),shortcut:t("dock.record")}},get dictate(){return{label:h.dock_shortcut_dictate_label()}}},get capture(){return h.dock_composer_capture_tooltip({shortcut:n("dock.capture")})},captureMode:{get window(){return h.dock_composer_captureWindow_tooltip({shortcut:n("dock.capture")})},get region(){return h.dock_composer_captureRegion_tooltip({shortcut:n("dock.capture")})}},captureModes:{fullscreen:h.dock_composer_captureFullscreen_label(),window:h.dock_composer_captureWindow_label(),region:h.dock_composer_captureRegion_label()},captureOptions:h.dock_composer_captureModes_ariaLabel(),captureLimit:h.dock_composer_captureLimit_tooltip(),clipLimit:h.dock_composer_clipLimit_tooltip({limit:H(ae.clips)}),get record(){return h.dock_composer_record_tooltip({shortcut:n("dock.record")})},stopRecording:h.dock_composer_stopRecording_tooltip(),annotationTools:h.annotation_toolbar_ariaLabel(),annotateCurrent:a=>h.dock_composer_annotate_ariaLabel({tool:a}),tools:{pick:h.dock_composer_pick_label(),box:h.dock_composer_box_label(),pen:h.dock_composer_pen_label(),arrow:h.annotation_arrow_label()},get dictate(){return h.dock_shortcut_dictate_label()},stopDictating:h.dock_composer_stopDictating_tooltip(),annotating:h.dock_composer_annotating_status(),recording:h.dock_composer_recording_status(),markUp:h.dock_composer_markUp_label(),remove:h.chat_contextChip_remove_label(),play:h.dock_composer_play_label(),edit:h.dock_composer_edit_label(),done:h.dock_composer_done_label(),attachments:h.context_attachments_title_label(),retry:h.chat_shared_retry_label(),attachmentPending:h.dock_composer_attachmentPending_status(),attachmentFailed:h.dock_composer_attachmentFailed_error(),image:a=>h.dock_composer_image_ariaLabel({n:H(a)}),clip:a=>h.dock_composer_clip_ariaLabel({duration:a}),recordingReference:(a,r)=>r?h.dock_composer_recordingEnd_chip({n:H(a)}):h.dock_composer_recordingStart_chip({n:H(a)}),speechError:a=>a.includes("permission")?h.dock_composer_speechPermission_error():["unsupported-platform","helper-missing","recognizer-unavailable","locale-unsupported","assets-unavailable","unavailable"].includes(a)?h.dock_composer_speechUnavailable_error():h.dock_composer_speechFailed_error()}}function gs(e,t){return{enabled:e,limit:ae.files,excludedIds:t,unavailableMessage:h.dock_composer_filesUnavailable_error(),limitMessage:h.dock_composer_fileLimit_error({limit:H(ae.files)})}}function Ca(e){try{return new URL(e.pageUrl).hostname||e.pageUrl}catch{return e.pageUrl}}function ys(e,t){return e.targetAgentId===t}function ws(e){const t=e.element,n=e.viewport,a=Ca(e),r=t?`<${t.tagName.toLowerCase()}> · ${a}`:e.title||a,s=["<browser-element-capture>",`Page URL: ${e.pageUrl}`,`Page title: ${e.title}`,...t?[`DOM path: ${t.domPath}`,`CSS selector: ${t.selector}`,`Text snippet: ${t.textSnippet}`,...t.sourceRef?[`Source ref: ${t.sourceRef}`]:[],...n?[`Viewport: ${n.width}×${n.height}`]:[],`Element bounds: ${t.rect.width}×${t.rect.height} at (${t.rect.x}, ${t.rect.y})`]:[],"</browser-element-capture>"].join(`
@@ -8,5 +8,5 @@ ${JSON.stringify(m.metadata)}`:"",s.workspaceContextStr].filter(Boolean).join(`
8
8
  \`\`\`
9
9
  ${o}
10
10
  \`\`\`]`)}return Da(a.join(`
11
- `),e)}function bs(e,t,n){if(e==="suggested-prompt")return{fields:{},hasAttachments:!1,cleanup:{clearInput:!1,followBottom:!0,historyText:null}};const a=n(),{imageBlocks:r,fileBlocks:s}=Ra(a.contextItems);return{fields:{contextItems:a.contextItems,workspaceContextStr:xa(a.contextItems,a.checkedPanels,a.checkedSelections),noteIds:a.noteIds,...r.length>0?{imageBlocks:r}:{},...s.length>0?{fileBlocks:s}:{},...a.pickedMentions?{messageMetadata:a.pickedMentions}:{}},hasAttachments:r.length>0||s.length>0,cleanup:{clearInput:!0,followBottom:!0,historyText:t}}}function ks(e){switch(e.kind){case"tooLong":return h.chat_goal_tooLong_error({max:H(Tn)});case"attachments":return h.chat_goal_attachments_error();case"retired":return h.chat_goal_retired_error();case"workspaceRetired":return h.chat_goal_workspaceRetired_error();case"invalid":case"failed":return h.chat_goal_failed_error()}}const Pa="chat-read:",q=new Map,ye=new Set;function _s(e,t){let n=q.get(e);n||(n=new Set,q.set(e,n)),n.add(t)}function vs(e,t){const n=q.get(e);if(!(!n||!n.delete(t))&&n.size===0){q.delete(e);for(const a of[...ye])a(e)}}function Ss(e){return ye.add(e),()=>ye.delete(e)}function As(e){return q.has(e)}function Ms(e){const t=q.get(e);if(!t)return!1;for(const n of t)if(!n.startsWith(Pa))return!0;return!1}function Ba(e,t,n){const a=e.state.pendingSubmissions.byAgentId[t.agentId];if(!a||!Ge(a.scope,t))return null;const r={...structuredClone(n),id:crypto.randomUUID(),createdAt:Date.now()};e.dispatch(Bt(t,r));const s=e.state.pendingSubmissions.byAgentId[t.agentId];return s&&R(s.submissions,r.id)?r:null}function Oa(e,t,n,a,r){const s=Be.select(e.state,n),o=pe.select(e.state)?.principal.id,i=Ue(e.state);if(!s||!o||!i)return null;const l=En(t,n),c={agentId:t,workspaceId:n,principalId:o,participation:s,authority:i,owner:l.key,lifetime:e.state.pendingSubmissions.byAgentId[t]?.scope.lifetime??crypto.randomUUID()},d=()=>l.isCurrent(e.state.agentSessions?.byAgentId[t]?.workspaceId)&&Be.select(e.state,n)===s&&pe.select(e.state)?.principal.id===o&&Ue(e.state)===i;if(!d())return null;e.dispatch(Pt(c,a,Wt.select(e.state,n)));const u=Ba(e,c,r);return u?{scope:c,submission:u,isCurrent:()=>{const g=e.state.pendingSubmissions.byAgentId[t];return d()&&!!g&&Ge(g.scope,c)&&(!!R(g.operations,u.id)||!!R(g.submissions,u.id))}}:null}function we(e,t,n){if(!n.text.trim()&&!n.imageBlocks?.length&&!n.fileBlocks?.length)return null;const a=n.userAppMessageId??Cn();return Oa(e,t,n.wsId,pe.select(e.state)?.capabilities.submissionCorrelation,{content:n.text.trim(),appMessageId:a,destination:!n.forceSubmit&&qt.select(e.state,t)?"queue":"conversation",contextItems:n.contextItems,imageBlocks:n.imageBlocks,fileBlocks:n.fileBlocks,messageMetadata:n.messageMetadata})}function La(e,t,n){const a=we(e,t,n);return a?(e.dispatch(Ye(t,{...n,userAppMessageId:a.submission.appMessageId,submission:{scope:a.scope,id:a.submission.id}})),!0):!1}async function Ua(e,t,n,a){const r=n.submission;if(!r)return"legacy";const s=r.reference,o=()=>s.scope.agentId===e&&s.scope.workspaceId===t&&Xe.select(M.state,e)===n?bn.select(M.state,s.scope):void 0,i=o();if(!i)return null;if(!i.supported)return"legacy";const l={wsId:t,text:n.text,imageBlocks:n.options?.imageBlocks,fileBlocks:n.options?.fileBlocks,noteIds:n.options?.noteIds,messageMetadata:n.options?.messageMetadata,model:a??n.options?.model};if(r.outcome==="rejected"){const p=R(i.tombstones,s.id);return R(i.submissions,s.id)||p&&p.reason!=="rejected"?null:we(M,e,l)}if(r.outcome==="accepted")return we(M,e,l);await Promise.all([Dn(e,t).catch(()=>{}),Rn(e,t).catch(()=>{})]);const c=o();if(!c||R(c.submissions,s.id)?.status!=="uncertain")return null;const{notify:d}=await fe(async()=>{const{notify:p}=await import("./EfOpqeLT.js").then(m=>m.u);return{notify:p}},__vite__mapDeps([0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20,21,22,23,24,25,26,27,28,29,30,31,32,33,34,35,36,37,38,39,40,41,42,43,44,45]),import.meta.url);if(o()!==c)return null;let u=!1;const g=()=>{u=!0};return d.warning(h.agent_chatSend_uncertainRetry_description(),{key:`submission-retry:${t}:${e}:${s.id}`,duration:Number.POSITIVE_INFINITY,action:{label:h.agent_chatSend_resend_label(),onClick:()=>{if(u)return;u=!0;const p=o();!p||p.generation!==c.generation||p.submissions!==c.submissions||p.observationVersion!==c.observationVersion||R(p.submissions,s.id)?.status!=="uncertain"||La(M,e,l)}},cancel:{label:h.chat_richInput_cancel_label(),onClick:g},onDismiss:g}),null}async function Is(e,t,n){const a=Xe.select(M.state,e),r=a?.submission?await Ua(e,t,a,n):"legacy";if(r){if(r==="legacy"){await M.dispatch(n===void 0?Ot(e,t):Lt(e,t,n));return}!r.isCurrent()||!a||M.dispatch(Ye(e,{wsId:t,text:a.text,imageBlocks:a.options?.imageBlocks,fileBlocks:a.options?.fileBlocks,noteIds:a.options?.noteIds,messageMetadata:a.options?.messageMetadata,model:n??a.options?.model,userAppMessageId:r.submission.appMessageId,submission:{scope:r.scope,id:r.submission.id}}))}}const Ts=M.createSelector((e,t)=>{const n=R(e.chatDrafts.owners,t);return n?{restore:n.restore,saves:Je(n.saves),shared:n.restore?e.chatDrafts.shared[JSON.stringify([n.restore.workspaceId,n.restore.agentId])]:void 0}:void 0});function $a(e,t){return t.workspaceId===e&&!t.retiredAt&&!t.pendingDeleteAt&&t.status!==ke.Deleted&&!t.notificationsMuted&&$t(t)==="topLevel"}function Na(e){const t=e.metadata?.pendingQuestionsMessageId;return typeof t=="string"&&t.length>0&&!Bn(e.metadata,t)?t:null}function Ha(e){return e.status===ke.Error&&!jt(Vt(e))}function Es(e,t){return t.filter(n=>$a(e,n)).flatMap(n=>{const a=Ut(n),r=Na(n),s=n.status===ke.Error;if(!a&&!r&&!s)return[];const o=a?.timestamp??(s?n.stopReasonTimestamp:void 0);return[{agentId:n.id,agentName:n.name,kind:a?.kind??(s?"failed":"question"),reason:a?.reason,timestamp:o&&Number.isFinite(Date.parse(o))?o:void 0,questionMessageId:r,canRetry:Ha(n)}]})}function Cs(e){return e.displayStatus==="failed"?"failed":e.displayStatus==="blocked"?"blocked":e.attention==="review_required"?"review":e.displayStatus==="needs_attention"?"question":e.activity==="agent_running"||e.displayStatus==="in_progress"?"running":e.scriptsRunning===!0?"scripts_running":e.backgroundTasksRunning===!0?"background_tasks_running":e.displayStatus==="pr_ready"?"pr_ready":e.displayStatus==="pr_merged"?"merged":e.displayStatus==="complete"?"complete":e.attention==="unread"?"unread":e.displayStatus==="pr_open"||e.displayStatus==="pr_queued"?e.displayStatus:"idle"}function Ds(e){const t=e.kind==="prs"?e.organization?.trim().toLowerCase():void 0;return{key:JSON.stringify([e.kind,e.workspaceId,t||null,[...new Set((t?[]:e.repositories).map(n=>JSON.stringify([n.key,n.owner,n.name])))].sort()]),hasGitHubRepositories:!!t||e.repositories.some(n=>!!n.owner),hasLocalRepositories:!t&&e.repositories.some(n=>!n.owner)}}function Te(e){const t=Sn(e);if(t?.kind!=="pr"||!Number.isSafeInteger(t.number)||t.number<=0)return null;const n=t.owner.toLowerCase(),a=t.repo.toLowerCase();return{owner:n,repo:a,number:t.number,id:`${n}/${a}#${t.number}`,url:`https://github.com/${n}/${a}/pull/${t.number}`}}function Rs(e,t,n,a){const r=e.filter(s=>a?a.includes(s.id):n?s.repositoryOwner?.toLowerCase()===n.toLowerCase():t.some(o=>o.owner?.toLowerCase()===s.repositoryOwner?.toLowerCase()&&o.name.toLowerCase()===s.repositoryName?.toLowerCase()));return[...new Map(r.flatMap(s=>[...(s.pullRequests??[]).map(o=>o.url),s.activePullRequest?.url,s.prUrl]).flatMap(s=>{const o=s?Te(s):null;return o?[[o.id,{owner:o.owner,repo:o.repo,number:o.number}]]:[]})).values()].sort((s,o)=>`${s.owner}/${s.repo}#${s.number}`.localeCompare(`${o.owner}/${o.repo}#${o.number}`))}function xs(e,t){const[n]=t;return t.length!==1||e.owner?.toLowerCase()!==n?.owner?.toLowerCase()||e.repo?.toLowerCase()!==n?.name.toLowerCase()}const Ps=M.createSelector(e=>e.homeIntegrations),Bs=M.createSelector(e=>{const t=e.homeIntegrations;return!t.linkedItems||!Object.keys(t.linkedItems).length?t:{...t,items:[...new Map([...Object.values(t.linkedItems),...t.items].map(n=>[n.id,n])).values()].sort((n,a)=>(a.updatedAt??"").localeCompare(n.updatedAt??""))}}),wt=M.createSelector(e=>Je(e.workspace.workspaces).flatMap(t=>[...(t.pullRequests??[]).map(n=>n.url),t.activePullRequest?.url,t.prUrl].filter(n=>!!n).map(n=>({url:Te(n)?.url??n.replace(/\/$/,"").toLowerCase(),workspaceId:t.id,name:t.title||t.id})))),Os=M.createSelector(e=>{const t=e.homeIntegrations.detail?.url,n=t?Te(t)?.url??t.replace(/\/$/,"").toLowerCase():void 0;return wt.select(e).find(a=>a.url===n)??null}),Ls=M.createSelector(e=>wt.select(e).map(t=>t.url)),Fa=["setup-retry-not-remote","setup-retry-not-failed","setup-retry-shared-checkout","setup-retry-no-script","agent-busy","agent-not-running","machine-update-required","machine-unreachable"];function Us(e,t){return e&&t?.state==="failed"}function Ka(e){const t=e??{},n=typeof t.message=="string"?t.message:"";if(t.rpcCode===-32601||t.code==="METHOD_NOT_FOUND")return{ok:!1,code:"unsupported",message:n};const a=typeof t.data?.code=="string"?t.data.code:t.code;return{ok:!1,code:Fa.find(s=>s===a)??"unknown",message:n}}async function $s(e,t=it){try{const n=await t("agent.retrySetup",{workspaceId:e.workspaceId,agentId:e.agentId}),a=ln.safeParse(n?.setup);return{ok:!0,setup:a.success?a.data:null}}catch(n){return Ka(n)}}function Wa(e){return e.code==="unsupported"?h.remoteAgent_setupRetry_unsupported_error():e.message.trim()||h.remoteAgent_setupRetry_generic_error()}function Ns(e,t){On.error(h.remoteAgent_setupRetry_failed_title({machine:e}),{description:Wa(t)})}let te=null;function Hs(e){return te=e,()=>{te===e&&(te=null)}}function Fs(){return te}function Ks(e){return[...e.groups.length>0?e.groups.filter(n=>n.expanded).flatMap(n=>n.items):e.workspaces,...e.asideExpanded?e.aside:[]].map(n=>n.id)}function Ws(e,t,n){if(e.length===0)return null;const a=t===null?-1:e.indexOf(t);return a===-1?e[0]:e[a+(n==="clockwise"?1:-1)]??null}let F=[];function qs(e,t={}){const n={source:e,fallback:t.fallback===!0};return F=[...F,n],()=>{F=F.filter(a=>a!==n)}}function js(){const e=F.findLast(n=>!n.fallback);return e?e.source:F.findLast(n=>n.fallback&&(n.source.available?.()??!0))?.source??null}function Vs(e){if(!e?.isConnected||e.closest("[inert]"))return!1;const t=e.ownerDocument.querySelectorAll('[aria-modal="true"]');return Array.from(t).every(n=>n.contains(e))}const zs=ct("conversationGoal/commandSend","conversationGoal/commandSendRequested"),Gs=ct("conversationGoal/set","conversationGoal/setRequested");function Ys(e){return In(e)}function qa(e){return Mn(e)}function ja(e,t){return!e||!t?!1:e.getFullYear()===t.getFullYear()&&e.getMonth()===t.getMonth()&&e.getDate()===t.getDate()}function me(e){if(e.length===0)return[];const t=[];let n=null;for(const a of e){const r=a.timestamp?typeof a.timestamp=="string"?new Date(a.timestamp):a.timestamp:new Date;(!n||!ja(n.date,r))&&(n={date:r,label:qa(r),messages:[]},t.push(n)),n.messages.push(a)}return t}function Js(e){const t=new Map;return e.map(({date:n})=>{const a=`${n.getFullYear()}-${n.getMonth()+1}-${n.getDate()}`,r=t.get(a)??0;return t.set(a,r+1),r===0?a:`${a}#${r}`})}function Xs(e,t){const n=new Map;let a=t?null:void 0;for(const r of e.groups)for(const s of r.messages)a!==void 0&&n.set(s.id,a),s.role==="user"&&!Un(s)&&(a=s);return n}function Va(e){return`${e.getFullYear()}-${e.getMonth()+1}-${e.getDate()}`}function qe(e,t){const n=new Map;return e.map(a=>{const r=`${t}-${Va(a.date)}`,s=(n.get(r)??0)+1;return n.set(r,s),{...a,groupKey:s===1?r:`${r}-${s}`}})}function za(e,t){if(e.length===0||t.length===0)return e;const n=new Set(t.map(s=>s.id)),a=new Set(t.map(s=>s.appMessageId).filter(s=>typeof s=="string"&&s.length>0)),r=e.filter(s=>!n.has(s.id)&&!(typeof s.appMessageId=="string"&&s.appMessageId.length>0&&a.has(s.appMessageId)));return r.length===e.length?e:r}function Qs(e,t,n){return e=za(e,t),e.length===0?{groups:me(t),detached:!1,hiddenTail:[]}:n?{groups:qe(me(e),"h"),detached:!0,hiddenTail:t}:{groups:qe(me([...e,...t]),"d"),detached:!1,hiddenTail:[]}}function Zs(e){const{scrollTop:t,threshold:n,fetching:a,exhausted:r,historyCount:s,tailCount:o,tailTruncated:i,totalMessages:l,spacerAbove:c=0}=e;return t>n+c||a||r?!1:s>0||i||l>o+s}const eo=300;function to(e){const{fetching:t,chainEvaluationPending:n,visible:a,hideArmed:r}=e;return t||n?a&&!r?"none":"show":a&&!r?"arm-hide":"none"}const je=24,Ga=320;function Ee(e){return Number.isFinite(e)?Math.min(Ga,Math.max(je,e)):je}const Ya=.2,Ja=.12;function Xa(e,t,n=Ya){const a=Ee(t);return e===null||!Number.isFinite(e)?a:e+n*(a-e)}function no(e,t){const n=Ee(t??Number.NaN);return{above:Math.round(Math.max(0,e.above)*n),below:Math.round(Math.max(0,e.below)*n)}}function ao(e){const{totalMessages:t,residentCount:n,exhausted:a,residentContentHeight:r,currentSpacerHeight:s,viewportHeight:o}=e;let i=e.rowHeightEma;n>0&&r>0&&(i=Xa(i,r/n));const l=e.unloadedRows??t-n,d=a||t<=0||n<=0||l<=0||i===null?0:Math.round(l*i),u=Math.abs(d-s);return u===0?{spacerHeight:s,rowHeightEma:i,applied:!1,scrollTopDelta:0}:d===0||s===0||u>s*Ja||o>0&&u>o?{spacerHeight:d,rowHeightEma:i,applied:!0,scrollTopDelta:d-s}:{spacerHeight:s,rowHeightEma:i,applied:!1,scrollTopDelta:0}}const Qa=Ln,Za=2;function ro(e){const{scrollTop:t,spacerAboveHeight:n,rowHeightEstimate:a,pageSize:r=Qa,nearPages:s=Za}=e;if(n<=0||t>=n)return"serial";const o=Ee(a??Number.NaN);return(n-Math.max(0,t))/o>s*r?"seek":"serial"}const bt=200,er=1;function so(e,t,n=bt){const a=t.timestamp-n;return[...e.filter(r=>r.timestamp>=a),t]}function oo(e){const{samples:t,viewportHeight:n,windowMs:a=bt,viewportFactor:r=er}=e;if(n<=0||t.length<2)return"gentle";const s=t[t.length-1].timestamp-a,o=t.filter(l=>l.timestamp>=s);if(o.length<2)return"gentle";let i=0;for(let l=1;l<o.length;l+=1)i+=Math.abs(o[l].scrollTop-o[l-1].scrollTop);return i>n*r?"rapid":"gentle"}function io(e){const{scrollTop:t,spacerAboveHeight:n,unloadedRowsAbove:a}=e;if(a<=0||n<=0)return 0;const r=Math.min(1,Math.max(0,t/n));return Math.min(a-1,Math.max(0,Math.floor(r*a)))}function co(e){const{totalMessages:t,residentCount:n,exhausted:a,startOrdinalEstimate:r,detachedFromTail:s}=e,o=Math.max(0,t-n);if(!s)return{above:a?0:o,below:0};const i=Math.max(0,e.hiddenTailCount??0);if(a)return{above:0,below:o+i};if(r!==null){const c=Math.min(o,Math.max(0,Math.round(r)));return{above:c,below:o-c+i}}const l=Math.min(o,Math.max(0,Math.round(e.holeRowsEstimate??0)));return{above:o-l,below:l+i}}function lo(e){const{exhausted:t,historyCount:n,tailCount:a,tailTruncated:r,totalMessages:s}=e;return t?!0:n>0?!1:!r&&s<=a}const tr="intent.drafts.sync",nr="intent.drafts.changed",ar=L({id:E(),type:E(),label:E(),description:E().optional(),content:E().optional(),path:E().optional(),imageData:E().optional(),imageMimeType:E().optional(),attachmentId:E().optional(),attachmentMimeType:E().optional(),attachmentSize:ce().optional(),sourcePath:E().optional(),placementStatus:z("failed").optional(),screen:$n().optional()}),kt=L({text:E(),attachments:Nn(ar)}),G={provenance:E().min(1),workspaceId:E().min(1),agentId:E().min(1)},ne={lifetime:E(),revision:ce().int().nonnegative()};Hn("kind",[L({...G,kind:z("read")}),L({...G,...ne,kind:z("edit"),origin:E().min(1),sequence:ce().int().positive(),snapshot:kt}),L({...G,...ne,kind:z("flush")}),L({...G,...ne,kind:z("clear"),origin:E().min(1)})]);const _t=L({...G,...ne,origin:E(),sequence:ce().int().nonnegative(),snapshot:kt}),rr=L({accepted:Fn(),draft:_t});function sr(e,t,n=t){const a=new Map,r=new Set,s=crypto.randomUUID();let o=0,i=!1;const l=()=>{const f=t();if(i||!f)throw new Error("draft-authority-unavailable");return f},c=()=>{const f=n();if(!f||i)throw new Error("draft-authority-unavailable");return()=>{if(i||n()!==f)throw new Error("draft-authority-changed")}},d=(f,k,_)=>{const I=JSON.stringify([f,k,_]);let S=a.get(I);return S||(S={dirty:0},a.set(I,S)),S},u=(f,k)=>{if(i||f.provenance!==t())return;const _=d(f.provenance,f.workspaceId,f.agentId);if(!(_.value?.lifetime===f.lifetime&&_.value.revision>f.revision)&&(_.value=f,k&&_.dirty===0))for(const I of r)I(f)},g=e.subscribe(f=>{const k=_t.safeParse(f);k.success&&u(k.data,!0)}),p=async(f,k)=>{k();const _=rr.parse(await e.request(f));if(k(),f.provenance!==l()||_.draft.provenance!==f.provenance)throw new Error("draft-authority-changed");if(!_.accepted)throw u(_.draft,!1),new Error("draft-changed-in-another-editor");return _.draft},m=async(f,k)=>{const _=l(),I=c(),S=d(_,f,k);S.tail&&await S.tail;const v=await p({kind:"read",provenance:_,workspaceId:f,agentId:k},I);return u(v,!1),v},w=(f,k,_)=>{const I=l(),S=c(),v=d(I,f,k),B=v.tail??(v.value?Promise.resolve(v.value):p({kind:"read",provenance:I,workspaceId:f,agentId:k},S));v.dirty+=1;const C=B.then(P=>p(_(P),S));return v.tail=C,C.then(P=>{v.dirty-=1,v.tail===C&&(v.tail=void 0),u(P,!0)},()=>{v.dirty-=1,v.tail===C&&(v.tail=void 0)}),C};return{authority:()=>i?null:n(),read:m,async edit(f,k,_,I){const S=++o;return w(k,_,v=>({kind:"edit",provenance:v.provenance,workspaceId:k,agentId:_,lifetime:v.lifetime,revision:v.revision,origin:f,sequence:S,snapshot:I}))},async flush(f,k){const _=l(),I=c(),S=d(_,f,k),v=await(S.tail??(S.value?Promise.resolve(S.value):m(f,k)));await p({kind:"flush",provenance:_,workspaceId:f,agentId:k,lifetime:v.lifetime,revision:v.revision},I)},async clear(f,k){await w(f,k,_=>({kind:"clear",provenance:_.provenance,workspaceId:f,agentId:k,lifetime:_.lifetime,revision:_.revision,origin:s}))},subscribe(f){return r.add(f),()=>{r.delete(f)}},dispose(){i=!0,g(),r.clear(),a.clear()}}}let U=null;async function uo(e,t,n,a,r){const s=U;if(!s)throw new Error("draft-shared-transport-unavailable");const o=()=>{if(U!==s||s.authority()!==r)throw new Error("draft-authority-changed")};o(),await s.edit(e,t,n,a),o(),await s.flush(t,n),o()}async function mo(e,t){await Promise.resolve(),U&&await U.flush(e,t)}function po(){if(!et())return null;const e=sr({request:n=>it(tr,n),subscribe:n=>An(a=>{a.method===nr&&n(a.params)})},()=>xn(M.state),()=>Pn(M.state));U=e;const t=e.dispose;return e.dispose=()=>{U===e&&(U=null),t()},e}const vt=new Map;function St(e,t){return`${e}\0${t}`}function fo(e,t){return vt.get(St(e,t))}function ho(e,t,n){vt.set(St(e,t),n)}const go=M.createSelector((e,t,n)=>{const a=e.chatPanelUi.byWorkspaceId[t];return a?R(a.userMessageIndexes,n):void 0}),yo=M.createSelector((e,t,n)=>{const a=e.chatPanelUi.byWorkspaceId[t];return a?R(a.retryAgents,n):void 0});function or(e){e=Math.max(0,e);const t=Math.floor(e/1e3);if(t<10){const s=e/1e3,o=s.toFixed(1);return o.endsWith(".0")?`${Math.round(s)}s`:`${o}s`}if(t<60)return`${t}s`;const n=Math.floor(t/3600),a=Math.floor(t%3600/60),r=t%60;return n>0?`${n}h ${a}m ${r}s`:`${a}m ${r}s`}function wo(e){return or(Math.max(1e3,Math.round(e/1e3)*1e3))}const ir=new Set(["launch","init","session-create","session-load","prompt"]),cr=new Set(["tool-call","tool-waiting"]);function lr(e){let t=null;for(const n of e)(!t||n.timestamp>=t.timestamp)&&(t=n);return t}function bo(e){return e&&ir.has(e)?"pulse":e&&cr.has(e)?"twist":"bloom"}const At="stalled";function ko(e,t){const n=lr(e);return!n||n.phase!==At||typeof t=="number"&&t>n.timestamp?null:n}function _o(e){let t=null;for(const n of e)n.phase!==At&&(!t||n.timestamp>=t.timestamp)&&(t=n);return t}const Ve={get title(){return h.chat_streamingStatus_sessionCorrupted_title()},get message(){return h.chat_streamingStatus_sessionCorrupted_message()}},dr=/^session\/[a-z_]+(?: failed)?:\s*/i;function ur(e){const n=(e.split(`
12
- `).map(a=>a.trim()).find(Boolean)??"").replace(dr,"");return n.charAt(0).toUpperCase()+n.slice(1)}function vo(e,t){return e?t===!0?{corrupted:!0,title:Ve.title,message:Ve.message,detail:e}:{corrupted:!1,title:h.chat_streamingStatus_responseFailed_label(),message:ur(e),detail:null}:null}const So=M.createSelector((e,t)=>R(e.questionUi.consumers,t)),mr=3e4,J=new Map;function Ao(e,t){const n=J.get(e);n&&clearTimeout(n.timer);const a=setTimeout(()=>J.delete(e),mr);J.set(e,{value:t,timer:a})}function Mo(e){const t=J.get(e);if(t)return clearTimeout(t.timer),J.delete(e),t.value}const Mt=M.createSelector((e,t,n)=>e.agentWorkers?.byKey[Ht(t,n)]??Nt),pr=M.createSelector((e,t,n)=>{const a=Mt.select(e,t,n);return a.status==="unsupported"?[]:(a.snapshot?.workers??[]).filter(r=>r.status==="running"||r.status==="unknown")}),Io=M.createSelector((e,t,n)=>{const a=Mt.select(e,t,n);return a.status==="failed"?!0:a.status!=="ready"||!a.snapshot?!1:a.snapshot.truncated?!0:a.snapshot.support.status!=="supported"&&pr.select(e,t,n).length>0}),fr=1e3,It={requireViewedAndFocused:!0,requireAssistantTail:!0},X=new Map,x=new Map;let j=null;function Ce(e){(e===void 0||j===e)&&(j=null)}const hr=200;function gr(e,t){if(x.delete(e),x.set(e,t),x.size>hr){const n=x.keys().next().value;n!==void 0&&x.delete(n)}}function Tt(e){for(let t=e.length-1;t>=0;t--){const n=e[t];if(!n.isStreaming&&typeof n.id=="string"&&n.id.length>0)return n}return null}function To(e){return Tt(e)?.id??null}function Eo(e){De(e,{requireViewedAndFocused:!0})}function Co(e){De(e,{requireViewedAndFocused:!1})}function Do(e){Ce(),De(e,It)}function Ro(e){j===e&&(X.has(e)||(j=null,Re(e,It)))}function xo(e){for(const t of e)typeof t!="string"||t.length===0||(Et(t),Ce(t),Re(t,{requireViewedAndFocused:!1}))}function Et(e){const t=X.get(e);t&&(clearTimeout(t.timer),X.delete(e))}function De(e,t){Et(e),Ce(e);const n=setTimeout(()=>{X.delete(e),Re(e,t)},fr);X.set(e,{timer:n,gates:t})}let ze=null;function yr(){return ze??=Promise.all([fe(()=>import("./CHDBPeiu.js"),__vite__mapDeps([46,21,22,5,23,24,3,8,4,25,15,2,47,48]),import.meta.url),fe(()=>import("./CsY5Dftt.js").then(e=>e.s),__vite__mapDeps([49,45,4,5,21,22,23,24,3,8,25,15,2,13,14,7,9,16,37,36,50,33,42]),import.meta.url)]).then(([e,t])=>({appStore:e.store,appClient:t.appClient})),ze}async function Re(e,t){let n=null;try{const{appStore:a,appClient:r}=await yr(),s=a.state;if(t.requireViewedAndFocused&&(s.unreadTracking?.currentlyViewedAgentId!==e||typeof document<"u"&&!document.hasFocus()))return;const o=s.agentSessions?.byAgentId[e];if(!o)return;const i=typeof o.workspaceId=="string"?o.workspaceId:"";if(i.length===0)return;if(t.requireAssistantTail&&s.chatState?.byAgentId[e]?.initialHistoryPending){j=e;return}const l=Tt(o.messages??[]);if(!l){t.requireAssistantTail&&(j=e);return}if(t.requireAssistantTail&&l.role!=="assistant")return;const c=l.id;if(x.get(e)===c)return;gr(e,c),n=c,!(await r.agents.markSeen({workspaceId:i,agentId:e,messageId:c})).success&&x.get(e)===n&&x.delete(e)}catch{n!==null&&x.get(e)===n&&x.delete(e)}}const ie=new Map;function Ct(e,t){return`${e}\0${t}`}function Po(e,t){return ie.get(Ct(e,t))}function Bo(e,t,n){ie.set(Ct(e,t),n)}function Oo(e){if(e.length===0)return;const t=new Set(e);for(const n of[...ie.keys()]){const a=n.slice(n.indexOf("\0")+1);t.has(a)&&ie.delete(n)}}export{ks as $,Gn as A,es as B,ms as C,O as D,cs as E,za as F,ds as G,Pa as H,Ra as I,Xn as J,mo as K,wo as L,fr as M,Ys as N,eo as O,ko as P,Po as Q,bt as R,fo as S,js as T,Es as U,je as V,Fs as W,Cs as X,_o as Y,bo as Z,zs as _,_s as a,Ao as a$,Gs as a0,As as a1,Ms as a2,Ks as a3,rs as a4,sa as a5,Xs as a6,as as a7,lo as a8,Y as a9,vs as aA,Ce as aB,Is as aC,Yr as aD,no as aE,$s as aF,pr as aG,Mt as aH,Io as aI,Ts as aJ,zr as aK,Gr as aL,Vr as aM,Ps as aN,Os as aO,Bs as aP,Ls as aQ,wt as aR,So as aS,yo as aT,go as aU,Bo as aV,ho as aW,Zs as aX,ns as aY,xs as aZ,co as a_,os as aa,ss as ab,Vs as ac,Xr as ad,io as ae,xo as af,Ro as ag,Eo as ah,Co as ai,Do as aj,To as ak,Ns as al,to as am,Ss as an,ps as ao,Wn as ap,uo as aq,is as ar,bs as as,us as at,Ua as au,ht as av,Qr as aw,qs as ax,ao as ay,Hs as az,we as b,Ws as b0,La as b1,Mo as b2,oa as b3,ts as b4,so as c,ys as d,ws as e,Js as f,Zr as g,xa as h,Jr as i,Us as j,ca as k,ia as l,oo as m,ro as n,Oo as o,Rs as p,Qs as q,gs as r,hs as s,ls as t,po as u,fs as v,vo as w,Ds as x,Ea as y,ge as z};
11
+ `),e)}function bs(e,t,n){if(e==="suggested-prompt")return{fields:{},hasAttachments:!1,cleanup:{clearInput:!1,followBottom:!0,historyText:null}};const a=n(),{imageBlocks:r,fileBlocks:s}=Ra(a.contextItems);return{fields:{contextItems:a.contextItems,workspaceContextStr:xa(a.contextItems,a.checkedPanels,a.checkedSelections),noteIds:a.noteIds,...r.length>0?{imageBlocks:r}:{},...s.length>0?{fileBlocks:s}:{},...a.pickedMentions?{messageMetadata:a.pickedMentions}:{}},hasAttachments:r.length>0||s.length>0,cleanup:{clearInput:!0,followBottom:!0,historyText:t}}}function ks(e){switch(e.kind){case"tooLong":return h.chat_goal_tooLong_error({max:H(Tn)});case"attachments":return h.chat_goal_attachments_error();case"retired":return h.chat_goal_retired_error();case"workspaceRetired":return h.chat_goal_workspaceRetired_error();case"invalid":case"failed":return h.chat_goal_failed_error()}}const Pa="chat-read:",q=new Map,ye=new Set;function _s(e,t){let n=q.get(e);n||(n=new Set,q.set(e,n)),n.add(t)}function vs(e,t){const n=q.get(e);if(!(!n||!n.delete(t))&&n.size===0){q.delete(e);for(const a of[...ye])a(e)}}function Ss(e){return ye.add(e),()=>ye.delete(e)}function As(e){return q.has(e)}function Ms(e){const t=q.get(e);if(!t)return!1;for(const n of t)if(!n.startsWith(Pa))return!0;return!1}function Ba(e,t,n){const a=e.state.pendingSubmissions.byAgentId[t.agentId];if(!a||!Ge(a.scope,t))return null;const r={...structuredClone(n),id:crypto.randomUUID(),createdAt:Date.now()};e.dispatch(Bt(t,r));const s=e.state.pendingSubmissions.byAgentId[t.agentId];return s&&R(s.submissions,r.id)?r:null}function Oa(e,t,n,a,r){const s=Be.select(e.state,n),o=pe.select(e.state)?.principal.id,i=Ue(e.state);if(!s||!o||!i)return null;const l=En(t,n),c={agentId:t,workspaceId:n,principalId:o,participation:s,authority:i,owner:l.key,lifetime:e.state.pendingSubmissions.byAgentId[t]?.scope.lifetime??crypto.randomUUID()},d=()=>l.isCurrent(e.state.agentSessions?.byAgentId[t]?.workspaceId)&&Be.select(e.state,n)===s&&pe.select(e.state)?.principal.id===o&&Ue(e.state)===i;if(!d())return null;e.dispatch(Pt(c,a,Wt.select(e.state,n)));const u=Ba(e,c,r);return u?{scope:c,submission:u,isCurrent:()=>{const g=e.state.pendingSubmissions.byAgentId[t];return d()&&!!g&&Ge(g.scope,c)&&(!!R(g.operations,u.id)||!!R(g.submissions,u.id))}}:null}function we(e,t,n){if(!n.text.trim()&&!n.imageBlocks?.length&&!n.fileBlocks?.length)return null;const a=n.userAppMessageId??Cn();return Oa(e,t,n.wsId,pe.select(e.state)?.capabilities.submissionCorrelation,{content:n.text.trim(),appMessageId:a,destination:!n.forceSubmit&&qt.select(e.state,t)?"queue":"conversation",contextItems:n.contextItems,imageBlocks:n.imageBlocks,fileBlocks:n.fileBlocks,messageMetadata:n.messageMetadata})}function La(e,t,n){const a=we(e,t,n);return a?(e.dispatch(Ye(t,{...n,userAppMessageId:a.submission.appMessageId,submission:{scope:a.scope,id:a.submission.id}})),!0):!1}async function Ua(e,t,n,a){const r=n.submission;if(!r)return"legacy";const s=r.reference,o=()=>s.scope.agentId===e&&s.scope.workspaceId===t&&Xe.select(M.state,e)===n?bn.select(M.state,s.scope):void 0,i=o();if(!i)return null;if(!i.supported)return"legacy";const l={wsId:t,text:n.text,imageBlocks:n.options?.imageBlocks,fileBlocks:n.options?.fileBlocks,noteIds:n.options?.noteIds,messageMetadata:n.options?.messageMetadata,model:a??n.options?.model};if(r.outcome==="rejected"){const p=R(i.tombstones,s.id);return R(i.submissions,s.id)||p&&p.reason!=="rejected"?null:we(M,e,l)}if(r.outcome==="accepted")return we(M,e,l);await Promise.all([Dn(e,t).catch(()=>{}),Rn(e,t).catch(()=>{})]);const c=o();if(!c||R(c.submissions,s.id)?.status!=="uncertain")return null;const{notify:d}=await fe(async()=>{const{notify:p}=await import("./p9X2tUBM.js").then(m=>m.u);return{notify:p}},__vite__mapDeps([0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20,21,22,23,24,25,26,27,28,29,30,31,32,33,34,35,36,37,38,39,40,41,42,43,44,45]),import.meta.url);if(o()!==c)return null;let u=!1;const g=()=>{u=!0};return d.warning(h.agent_chatSend_uncertainRetry_description(),{key:`submission-retry:${t}:${e}:${s.id}`,duration:Number.POSITIVE_INFINITY,action:{label:h.agent_chatSend_resend_label(),onClick:()=>{if(u)return;u=!0;const p=o();!p||p.generation!==c.generation||p.submissions!==c.submissions||p.observationVersion!==c.observationVersion||R(p.submissions,s.id)?.status!=="uncertain"||La(M,e,l)}},cancel:{label:h.chat_richInput_cancel_label(),onClick:g},onDismiss:g}),null}async function Is(e,t,n){const a=Xe.select(M.state,e),r=a?.submission?await Ua(e,t,a,n):"legacy";if(r){if(r==="legacy"){await M.dispatch(n===void 0?Ot(e,t):Lt(e,t,n));return}!r.isCurrent()||!a||M.dispatch(Ye(e,{wsId:t,text:a.text,imageBlocks:a.options?.imageBlocks,fileBlocks:a.options?.fileBlocks,noteIds:a.options?.noteIds,messageMetadata:a.options?.messageMetadata,model:n??a.options?.model,userAppMessageId:r.submission.appMessageId,submission:{scope:r.scope,id:r.submission.id}}))}}const Ts=M.createSelector((e,t)=>{const n=R(e.chatDrafts.owners,t);return n?{restore:n.restore,saves:Je(n.saves),shared:n.restore?e.chatDrafts.shared[JSON.stringify([n.restore.workspaceId,n.restore.agentId])]:void 0}:void 0});function $a(e,t){return t.workspaceId===e&&!t.retiredAt&&!t.pendingDeleteAt&&t.status!==ke.Deleted&&!t.notificationsMuted&&$t(t)==="topLevel"}function Na(e){const t=e.metadata?.pendingQuestionsMessageId;return typeof t=="string"&&t.length>0&&!Bn(e.metadata,t)?t:null}function Ha(e){return e.status===ke.Error&&!jt(Vt(e))}function Es(e,t){return t.filter(n=>$a(e,n)).flatMap(n=>{const a=Ut(n),r=Na(n),s=n.status===ke.Error;if(!a&&!r&&!s)return[];const o=a?.timestamp??(s?n.stopReasonTimestamp:void 0);return[{agentId:n.id,agentName:n.name,kind:a?.kind??(s?"failed":"question"),reason:a?.reason,timestamp:o&&Number.isFinite(Date.parse(o))?o:void 0,questionMessageId:r,canRetry:Ha(n)}]})}function Cs(e){return e.displayStatus==="failed"?"failed":e.displayStatus==="blocked"?"blocked":e.attention==="review_required"?"review":e.displayStatus==="needs_attention"?"question":e.activity==="agent_running"||e.displayStatus==="in_progress"?"running":e.scriptsRunning===!0?"scripts_running":e.backgroundTasksRunning===!0?"background_tasks_running":e.displayStatus==="pr_ready"?"pr_ready":e.displayStatus==="pr_merged"?"merged":e.displayStatus==="complete"?"complete":e.attention==="unread"?"unread":e.displayStatus==="pr_open"||e.displayStatus==="pr_queued"?e.displayStatus:"idle"}function Ds(e){const t=e.kind==="prs"?e.organization?.trim().toLowerCase():void 0;return{key:JSON.stringify([e.kind,e.workspaceId,t||null,[...new Set((t?[]:e.repositories).map(n=>JSON.stringify([n.key,n.owner,n.name])))].sort()]),hasGitHubRepositories:!!t||e.repositories.some(n=>!!n.owner),hasLocalRepositories:!t&&e.repositories.some(n=>!n.owner)}}function Te(e){const t=Sn(e);if(t?.kind!=="pr"||!Number.isSafeInteger(t.number)||t.number<=0)return null;const n=t.owner.toLowerCase(),a=t.repo.toLowerCase();return{owner:n,repo:a,number:t.number,id:`${n}/${a}#${t.number}`,url:`https://github.com/${n}/${a}/pull/${t.number}`}}function Rs(e,t,n,a){const r=e.filter(s=>a?a.includes(s.id):n?s.repositoryOwner?.toLowerCase()===n.toLowerCase():t.some(o=>o.owner?.toLowerCase()===s.repositoryOwner?.toLowerCase()&&o.name.toLowerCase()===s.repositoryName?.toLowerCase()));return[...new Map(r.flatMap(s=>[...(s.pullRequests??[]).map(o=>o.url),s.activePullRequest?.url,s.prUrl]).flatMap(s=>{const o=s?Te(s):null;return o?[[o.id,{owner:o.owner,repo:o.repo,number:o.number}]]:[]})).values()].sort((s,o)=>`${s.owner}/${s.repo}#${s.number}`.localeCompare(`${o.owner}/${o.repo}#${o.number}`))}function xs(e,t){const[n]=t;return t.length!==1||e.owner?.toLowerCase()!==n?.owner?.toLowerCase()||e.repo?.toLowerCase()!==n?.name.toLowerCase()}const Ps=M.createSelector(e=>e.homeIntegrations),Bs=M.createSelector(e=>{const t=e.homeIntegrations;return!t.linkedItems||!Object.keys(t.linkedItems).length?t:{...t,items:[...new Map([...Object.values(t.linkedItems),...t.items].map(n=>[n.id,n])).values()].sort((n,a)=>(a.updatedAt??"").localeCompare(n.updatedAt??""))}}),wt=M.createSelector(e=>Je(e.workspace.workspaces).flatMap(t=>[...(t.pullRequests??[]).map(n=>n.url),t.activePullRequest?.url,t.prUrl].filter(n=>!!n).map(n=>({url:Te(n)?.url??n.replace(/\/$/,"").toLowerCase(),workspaceId:t.id,name:t.title||t.id})))),Os=M.createSelector(e=>{const t=e.homeIntegrations.detail?.url,n=t?Te(t)?.url??t.replace(/\/$/,"").toLowerCase():void 0;return wt.select(e).find(a=>a.url===n)??null}),Ls=M.createSelector(e=>wt.select(e).map(t=>t.url)),Fa=["setup-retry-not-remote","setup-retry-not-failed","setup-retry-shared-checkout","setup-retry-no-script","agent-busy","agent-not-running","machine-update-required","machine-unreachable"];function Us(e,t){return e&&t?.state==="failed"}function Ka(e){const t=e??{},n=typeof t.message=="string"?t.message:"";if(t.rpcCode===-32601||t.code==="METHOD_NOT_FOUND")return{ok:!1,code:"unsupported",message:n};const a=typeof t.data?.code=="string"?t.data.code:t.code;return{ok:!1,code:Fa.find(s=>s===a)??"unknown",message:n}}async function $s(e,t=it){try{const n=await t("agent.retrySetup",{workspaceId:e.workspaceId,agentId:e.agentId}),a=ln.safeParse(n?.setup);return{ok:!0,setup:a.success?a.data:null}}catch(n){return Ka(n)}}function Wa(e){return e.code==="unsupported"?h.remoteAgent_setupRetry_unsupported_error():e.message.trim()||h.remoteAgent_setupRetry_generic_error()}function Ns(e,t){On.error(h.remoteAgent_setupRetry_failed_title({machine:e}),{description:Wa(t)})}let te=null;function Hs(e){return te=e,()=>{te===e&&(te=null)}}function Fs(){return te}function Ks(e){return[...e.groups.length>0?e.groups.filter(n=>n.expanded).flatMap(n=>n.items):e.workspaces,...e.asideExpanded?e.aside:[]].map(n=>n.id)}function Ws(e,t,n){if(e.length===0)return null;const a=t===null?-1:e.indexOf(t);return a===-1?e[0]:e[a+(n==="clockwise"?1:-1)]??null}let F=[];function qs(e,t={}){const n={source:e,fallback:t.fallback===!0};return F=[...F,n],()=>{F=F.filter(a=>a!==n)}}function js(){const e=F.findLast(n=>!n.fallback);return e?e.source:F.findLast(n=>n.fallback&&(n.source.available?.()??!0))?.source??null}function Vs(e){if(!e?.isConnected||e.closest("[inert]"))return!1;const t=e.ownerDocument.querySelectorAll('[aria-modal="true"]');return Array.from(t).every(n=>n.contains(e))}const zs=ct("conversationGoal/commandSend","conversationGoal/commandSendRequested"),Gs=ct("conversationGoal/set","conversationGoal/setRequested");function Ys(e){return In(e)}function qa(e){return Mn(e)}function ja(e,t){return!e||!t?!1:e.getFullYear()===t.getFullYear()&&e.getMonth()===t.getMonth()&&e.getDate()===t.getDate()}function me(e){if(e.length===0)return[];const t=[];let n=null;for(const a of e){const r=a.timestamp?typeof a.timestamp=="string"?new Date(a.timestamp):a.timestamp:new Date;(!n||!ja(n.date,r))&&(n={date:r,label:qa(r),messages:[]},t.push(n)),n.messages.push(a)}return t}function Js(e){const t=new Map;return e.map(({date:n})=>{const a=`${n.getFullYear()}-${n.getMonth()+1}-${n.getDate()}`,r=t.get(a)??0;return t.set(a,r+1),r===0?a:`${a}#${r}`})}function Xs(e,t){const n=new Map;let a=t?null:void 0;for(const r of e.groups)for(const s of r.messages)a!==void 0&&n.set(s.id,a),s.role==="user"&&!Un(s)&&(a=s);return n}function Va(e){return`${e.getFullYear()}-${e.getMonth()+1}-${e.getDate()}`}function qe(e,t){const n=new Map;return e.map(a=>{const r=`${t}-${Va(a.date)}`,s=(n.get(r)??0)+1;return n.set(r,s),{...a,groupKey:s===1?r:`${r}-${s}`}})}function za(e,t){if(e.length===0||t.length===0)return e;const n=new Set(t.map(s=>s.id)),a=new Set(t.map(s=>s.appMessageId).filter(s=>typeof s=="string"&&s.length>0)),r=e.filter(s=>!n.has(s.id)&&!(typeof s.appMessageId=="string"&&s.appMessageId.length>0&&a.has(s.appMessageId)));return r.length===e.length?e:r}function Qs(e,t,n){return e=za(e,t),e.length===0?{groups:me(t),detached:!1,hiddenTail:[]}:n?{groups:qe(me(e),"h"),detached:!0,hiddenTail:t}:{groups:qe(me([...e,...t]),"d"),detached:!1,hiddenTail:[]}}function Zs(e){const{scrollTop:t,threshold:n,fetching:a,exhausted:r,historyCount:s,tailCount:o,tailTruncated:i,totalMessages:l,spacerAbove:c=0}=e;return t>n+c||a||r?!1:s>0||i||l>o+s}const eo=300;function to(e){const{fetching:t,chainEvaluationPending:n,visible:a,hideArmed:r}=e;return t||n?a&&!r?"none":"show":a&&!r?"arm-hide":"none"}const je=24,Ga=320;function Ee(e){return Number.isFinite(e)?Math.min(Ga,Math.max(je,e)):je}const Ya=.2,Ja=.12;function Xa(e,t,n=Ya){const a=Ee(t);return e===null||!Number.isFinite(e)?a:e+n*(a-e)}function no(e,t){const n=Ee(t??Number.NaN);return{above:Math.round(Math.max(0,e.above)*n),below:Math.round(Math.max(0,e.below)*n)}}function ao(e){const{totalMessages:t,residentCount:n,exhausted:a,residentContentHeight:r,currentSpacerHeight:s,viewportHeight:o}=e;let i=e.rowHeightEma;n>0&&r>0&&(i=Xa(i,r/n));const l=e.unloadedRows??t-n,d=a||t<=0||n<=0||l<=0||i===null?0:Math.round(l*i),u=Math.abs(d-s);return u===0?{spacerHeight:s,rowHeightEma:i,applied:!1,scrollTopDelta:0}:d===0||s===0||u>s*Ja||o>0&&u>o?{spacerHeight:d,rowHeightEma:i,applied:!0,scrollTopDelta:d-s}:{spacerHeight:s,rowHeightEma:i,applied:!1,scrollTopDelta:0}}const Qa=Ln,Za=2;function ro(e){const{scrollTop:t,spacerAboveHeight:n,rowHeightEstimate:a,pageSize:r=Qa,nearPages:s=Za}=e;if(n<=0||t>=n)return"serial";const o=Ee(a??Number.NaN);return(n-Math.max(0,t))/o>s*r?"seek":"serial"}const bt=200,er=1;function so(e,t,n=bt){const a=t.timestamp-n;return[...e.filter(r=>r.timestamp>=a),t]}function oo(e){const{samples:t,viewportHeight:n,windowMs:a=bt,viewportFactor:r=er}=e;if(n<=0||t.length<2)return"gentle";const s=t[t.length-1].timestamp-a,o=t.filter(l=>l.timestamp>=s);if(o.length<2)return"gentle";let i=0;for(let l=1;l<o.length;l+=1)i+=Math.abs(o[l].scrollTop-o[l-1].scrollTop);return i>n*r?"rapid":"gentle"}function io(e){const{scrollTop:t,spacerAboveHeight:n,unloadedRowsAbove:a}=e;if(a<=0||n<=0)return 0;const r=Math.min(1,Math.max(0,t/n));return Math.min(a-1,Math.max(0,Math.floor(r*a)))}function co(e){const{totalMessages:t,residentCount:n,exhausted:a,startOrdinalEstimate:r,detachedFromTail:s}=e,o=Math.max(0,t-n);if(!s)return{above:a?0:o,below:0};const i=Math.max(0,e.hiddenTailCount??0);if(a)return{above:0,below:o+i};if(r!==null){const c=Math.min(o,Math.max(0,Math.round(r)));return{above:c,below:o-c+i}}const l=Math.min(o,Math.max(0,Math.round(e.holeRowsEstimate??0)));return{above:o-l,below:l+i}}function lo(e){const{exhausted:t,historyCount:n,tailCount:a,tailTruncated:r,totalMessages:s}=e;return t?!0:n>0?!1:!r&&s<=a}const tr="intent.drafts.sync",nr="intent.drafts.changed",ar=L({id:E(),type:E(),label:E(),description:E().optional(),content:E().optional(),path:E().optional(),imageData:E().optional(),imageMimeType:E().optional(),attachmentId:E().optional(),attachmentMimeType:E().optional(),attachmentSize:ce().optional(),sourcePath:E().optional(),placementStatus:z("failed").optional(),screen:$n().optional()}),kt=L({text:E(),attachments:Nn(ar)}),G={provenance:E().min(1),workspaceId:E().min(1),agentId:E().min(1)},ne={lifetime:E(),revision:ce().int().nonnegative()};Hn("kind",[L({...G,kind:z("read")}),L({...G,...ne,kind:z("edit"),origin:E().min(1),sequence:ce().int().positive(),snapshot:kt}),L({...G,...ne,kind:z("flush")}),L({...G,...ne,kind:z("clear"),origin:E().min(1)})]);const _t=L({...G,...ne,origin:E(),sequence:ce().int().nonnegative(),snapshot:kt}),rr=L({accepted:Fn(),draft:_t});function sr(e,t,n=t){const a=new Map,r=new Set,s=crypto.randomUUID();let o=0,i=!1;const l=()=>{const f=t();if(i||!f)throw new Error("draft-authority-unavailable");return f},c=()=>{const f=n();if(!f||i)throw new Error("draft-authority-unavailable");return()=>{if(i||n()!==f)throw new Error("draft-authority-changed")}},d=(f,k,_)=>{const I=JSON.stringify([f,k,_]);let S=a.get(I);return S||(S={dirty:0},a.set(I,S)),S},u=(f,k)=>{if(i||f.provenance!==t())return;const _=d(f.provenance,f.workspaceId,f.agentId);if(!(_.value?.lifetime===f.lifetime&&_.value.revision>f.revision)&&(_.value=f,k&&_.dirty===0))for(const I of r)I(f)},g=e.subscribe(f=>{const k=_t.safeParse(f);k.success&&u(k.data,!0)}),p=async(f,k)=>{k();const _=rr.parse(await e.request(f));if(k(),f.provenance!==l()||_.draft.provenance!==f.provenance)throw new Error("draft-authority-changed");if(!_.accepted)throw u(_.draft,!1),new Error("draft-changed-in-another-editor");return _.draft},m=async(f,k)=>{const _=l(),I=c(),S=d(_,f,k);S.tail&&await S.tail;const v=await p({kind:"read",provenance:_,workspaceId:f,agentId:k},I);return u(v,!1),v},w=(f,k,_)=>{const I=l(),S=c(),v=d(I,f,k),B=v.tail??(v.value?Promise.resolve(v.value):p({kind:"read",provenance:I,workspaceId:f,agentId:k},S));v.dirty+=1;const C=B.then(P=>p(_(P),S));return v.tail=C,C.then(P=>{v.dirty-=1,v.tail===C&&(v.tail=void 0),u(P,!0)},()=>{v.dirty-=1,v.tail===C&&(v.tail=void 0)}),C};return{authority:()=>i?null:n(),read:m,async edit(f,k,_,I){const S=++o;return w(k,_,v=>({kind:"edit",provenance:v.provenance,workspaceId:k,agentId:_,lifetime:v.lifetime,revision:v.revision,origin:f,sequence:S,snapshot:I}))},async flush(f,k){const _=l(),I=c(),S=d(_,f,k),v=await(S.tail??(S.value?Promise.resolve(S.value):m(f,k)));await p({kind:"flush",provenance:_,workspaceId:f,agentId:k,lifetime:v.lifetime,revision:v.revision},I)},async clear(f,k){await w(f,k,_=>({kind:"clear",provenance:_.provenance,workspaceId:f,agentId:k,lifetime:_.lifetime,revision:_.revision,origin:s}))},subscribe(f){return r.add(f),()=>{r.delete(f)}},dispose(){i=!0,g(),r.clear(),a.clear()}}}let U=null;async function uo(e,t,n,a,r){const s=U;if(!s)throw new Error("draft-shared-transport-unavailable");const o=()=>{if(U!==s||s.authority()!==r)throw new Error("draft-authority-changed")};o(),await s.edit(e,t,n,a),o(),await s.flush(t,n),o()}async function mo(e,t){await Promise.resolve(),U&&await U.flush(e,t)}function po(){if(!et())return null;const e=sr({request:n=>it(tr,n),subscribe:n=>An(a=>{a.method===nr&&n(a.params)})},()=>xn(M.state),()=>Pn(M.state));U=e;const t=e.dispose;return e.dispose=()=>{U===e&&(U=null),t()},e}const vt=new Map;function St(e,t){return`${e}\0${t}`}function fo(e,t){return vt.get(St(e,t))}function ho(e,t,n){vt.set(St(e,t),n)}const go=M.createSelector((e,t,n)=>{const a=e.chatPanelUi.byWorkspaceId[t];return a?R(a.userMessageIndexes,n):void 0}),yo=M.createSelector((e,t,n)=>{const a=e.chatPanelUi.byWorkspaceId[t];return a?R(a.retryAgents,n):void 0});function or(e){e=Math.max(0,e);const t=Math.floor(e/1e3);if(t<10){const s=e/1e3,o=s.toFixed(1);return o.endsWith(".0")?`${Math.round(s)}s`:`${o}s`}if(t<60)return`${t}s`;const n=Math.floor(t/3600),a=Math.floor(t%3600/60),r=t%60;return n>0?`${n}h ${a}m ${r}s`:`${a}m ${r}s`}function wo(e){return or(Math.max(1e3,Math.round(e/1e3)*1e3))}const ir=new Set(["launch","init","session-create","session-load","prompt"]),cr=new Set(["tool-call","tool-waiting"]);function lr(e){let t=null;for(const n of e)(!t||n.timestamp>=t.timestamp)&&(t=n);return t}function bo(e){return e&&ir.has(e)?"pulse":e&&cr.has(e)?"twist":"bloom"}const At="stalled";function ko(e,t){const n=lr(e);return!n||n.phase!==At||typeof t=="number"&&t>n.timestamp?null:n}function _o(e){let t=null;for(const n of e)n.phase!==At&&(!t||n.timestamp>=t.timestamp)&&(t=n);return t}const Ve={get title(){return h.chat_streamingStatus_sessionCorrupted_title()},get message(){return h.chat_streamingStatus_sessionCorrupted_message()}},dr=/^session\/[a-z_]+(?: failed)?:\s*/i;function ur(e){const n=(e.split(`
12
+ `).map(a=>a.trim()).find(Boolean)??"").replace(dr,"");return n.charAt(0).toUpperCase()+n.slice(1)}function vo(e,t){return e?t===!0?{corrupted:!0,title:Ve.title,message:Ve.message,detail:e}:{corrupted:!1,title:h.chat_streamingStatus_responseFailed_label(),message:ur(e),detail:null}:null}const So=M.createSelector((e,t)=>R(e.questionUi.consumers,t)),mr=3e4,J=new Map;function Ao(e,t){const n=J.get(e);n&&clearTimeout(n.timer);const a=setTimeout(()=>J.delete(e),mr);J.set(e,{value:t,timer:a})}function Mo(e){const t=J.get(e);if(t)return clearTimeout(t.timer),J.delete(e),t.value}const Mt=M.createSelector((e,t,n)=>e.agentWorkers?.byKey[Ht(t,n)]??Nt),pr=M.createSelector((e,t,n)=>{const a=Mt.select(e,t,n);return a.status==="unsupported"?[]:(a.snapshot?.workers??[]).filter(r=>r.status==="running"||r.status==="unknown")}),Io=M.createSelector((e,t,n)=>{const a=Mt.select(e,t,n);return a.status==="failed"?!0:a.status!=="ready"||!a.snapshot?!1:a.snapshot.truncated?!0:a.snapshot.support.status!=="supported"&&pr.select(e,t,n).length>0}),fr=1e3,It={requireViewedAndFocused:!0,requireAssistantTail:!0},X=new Map,x=new Map;let j=null;function Ce(e){(e===void 0||j===e)&&(j=null)}const hr=200;function gr(e,t){if(x.delete(e),x.set(e,t),x.size>hr){const n=x.keys().next().value;n!==void 0&&x.delete(n)}}function Tt(e){for(let t=e.length-1;t>=0;t--){const n=e[t];if(!n.isStreaming&&typeof n.id=="string"&&n.id.length>0)return n}return null}function To(e){return Tt(e)?.id??null}function Eo(e){De(e,{requireViewedAndFocused:!0})}function Co(e){De(e,{requireViewedAndFocused:!1})}function Do(e){Ce(),De(e,It)}function Ro(e){j===e&&(X.has(e)||(j=null,Re(e,It)))}function xo(e){for(const t of e)typeof t!="string"||t.length===0||(Et(t),Ce(t),Re(t,{requireViewedAndFocused:!1}))}function Et(e){const t=X.get(e);t&&(clearTimeout(t.timer),X.delete(e))}function De(e,t){Et(e),Ce(e);const n=setTimeout(()=>{X.delete(e),Re(e,t)},fr);X.set(e,{timer:n,gates:t})}let ze=null;function yr(){return ze??=Promise.all([fe(()=>import("./CjTo2K46.js"),__vite__mapDeps([46,21,22,5,23,24,3,8,4,25,15,2,47,48]),import.meta.url),fe(()=>import("./C6mS8uZB.js").then(e=>e.s),__vite__mapDeps([49,45,4,5,21,22,23,24,3,8,25,15,2,13,14,7,9,16,37,36,50,33,42]),import.meta.url)]).then(([e,t])=>({appStore:e.store,appClient:t.appClient})),ze}async function Re(e,t){let n=null;try{const{appStore:a,appClient:r}=await yr(),s=a.state;if(t.requireViewedAndFocused&&(s.unreadTracking?.currentlyViewedAgentId!==e||typeof document<"u"&&!document.hasFocus()))return;const o=s.agentSessions?.byAgentId[e];if(!o)return;const i=typeof o.workspaceId=="string"?o.workspaceId:"";if(i.length===0)return;if(t.requireAssistantTail&&s.chatState?.byAgentId[e]?.initialHistoryPending){j=e;return}const l=Tt(o.messages??[]);if(!l){t.requireAssistantTail&&(j=e);return}if(t.requireAssistantTail&&l.role!=="assistant")return;const c=l.id;if(x.get(e)===c)return;gr(e,c),n=c,!(await r.agents.markSeen({workspaceId:i,agentId:e,messageId:c})).success&&x.get(e)===n&&x.delete(e)}catch{n!==null&&x.get(e)===n&&x.delete(e)}}const ie=new Map;function Ct(e,t){return`${e}\0${t}`}function Po(e,t){return ie.get(Ct(e,t))}function Bo(e,t,n){ie.set(Ct(e,t),n)}function Oo(e){if(e.length===0)return;const t=new Set(e);for(const n of[...ie.keys()]){const a=n.slice(n.indexOf("\0")+1);t.has(a)&&ie.delete(n)}}export{ks as $,Gn as A,es as B,ms as C,O as D,cs as E,za as F,ds as G,Pa as H,Ra as I,Xn as J,mo as K,wo as L,fr as M,Ys as N,eo as O,ko as P,Po as Q,bt as R,fo as S,js as T,Es as U,je as V,Fs as W,Cs as X,_o as Y,bo as Z,zs as _,_s as a,Ao as a$,Gs as a0,As as a1,Ms as a2,Ks as a3,rs as a4,sa as a5,Xs as a6,as as a7,lo as a8,Y as a9,vs as aA,Ce as aB,Is as aC,Yr as aD,no as aE,$s as aF,pr as aG,Mt as aH,Io as aI,Ts as aJ,zr as aK,Gr as aL,Vr as aM,Ps as aN,Os as aO,Bs as aP,Ls as aQ,wt as aR,So as aS,yo as aT,go as aU,Bo as aV,ho as aW,Zs as aX,ns as aY,xs as aZ,co as a_,os as aa,ss as ab,Vs as ac,Xr as ad,io as ae,xo as af,Ro as ag,Eo as ah,Co as ai,Do as aj,To as ak,Ns as al,to as am,Ss as an,ps as ao,Wn as ap,uo as aq,is as ar,bs as as,us as at,Ua as au,ht as av,Qr as aw,qs as ax,ao as ay,Hs as az,we as b,Ws as b0,La as b1,Mo as b2,oa as b3,ts as b4,so as c,ys as d,ws as e,Js as f,Zr as g,xa as h,Jr as i,Us as j,ca as k,ia as l,oo as m,ro as n,Oo as o,Rs as p,Qs as q,gs as r,hs as s,ls as t,po as u,fs as v,vo as w,Ds as x,Ea as y,ge as z};
@@ -1 +1 @@
1
- import{d as O}from"./C4_TlGj0.js";function b(a,{from:t,to:r},p={}){var{delay:u=0,duration:n=i=>Math.sqrt(i)*120,easing:y=O}=p,s=getComputedStyle(a),d=s.transform==="none"?"":s.transform,[h,v]=s.transformOrigin.split(" ").map(parseFloat);h/=a.clientWidth,v/=a.clientHeight;var c=W(a),f=a.clientWidth/r.width/c,g=a.clientHeight/r.height/c,x=t.left+t.width*h,m=t.top+t.height*v,w=r.left+r.width*h,S=r.top+r.height*v,l=(x-w)*f,o=(m-S)*g,$=t.width/r.width,z=t.height/r.height;return{delay:u,duration:typeof n=="function"?n(Math.sqrt(l*l+o*o)):n,easing:y,css:(i,e)=>{var C=e*l,q=e*o,H=i+e*$,M=i+e*z;return`transform: ${d} translate(${C}px, ${q}px) scale(${H}, ${M});`}}}function W(a){if("currentCSSZoom"in a)return a.currentCSSZoom;for(var t=a,r=1;t!==null;)r*=+getComputedStyle(t).zoom,t=t.parentElement;return r}export{b as f};
1
+ import{d as O}from"./DLwWVKiF.js";function b(a,{from:t,to:r},p={}){var{delay:u=0,duration:n=i=>Math.sqrt(i)*120,easing:y=O}=p,s=getComputedStyle(a),d=s.transform==="none"?"":s.transform,[h,v]=s.transformOrigin.split(" ").map(parseFloat);h/=a.clientWidth,v/=a.clientHeight;var c=W(a),f=a.clientWidth/r.width/c,g=a.clientHeight/r.height/c,x=t.left+t.width*h,m=t.top+t.height*v,w=r.left+r.width*h,S=r.top+r.height*v,l=(x-w)*f,o=(m-S)*g,$=t.width/r.width,z=t.height/r.height;return{delay:u,duration:typeof n=="function"?n(Math.sqrt(l*l+o*o)):n,easing:y,css:(i,e)=>{var C=e*l,q=e*o,H=i+e*$,M=i+e*z;return`transform: ${d} translate(${C}px, ${q}px) scale(${H}, ${M});`}}}function W(a){if("currentCSSZoom"in a)return a.currentCSSZoom;for(var t=a,r=1;t!==null;)r*=+getComputedStyle(t).zoom,t=t.parentElement;return r}export{b as f};
@@ -1 +1 @@
1
- import{_ as r}from"./BEwMx-58.js";const _={andromeeda:()=>r(()=>import("./dzT1arR_.js"),[],import.meta.url),"aurora-x":()=>r(()=>import("./B7pmKBD2.js"),[],import.meta.url),"ayu-dark":()=>r(()=>import("./BBURKmLH.js"),[],import.meta.url),"ayu-light":()=>r(()=>import("./DwHC-by_.js"),[],import.meta.url),"ayu-mirage":()=>r(()=>import("./DKqT1wVu.js"),[],import.meta.url),"catppuccin-frappe":()=>r(()=>import("./B24fvTzB.js"),[],import.meta.url),"catppuccin-latte":()=>r(()=>import("./CdPbmwTc.js"),[],import.meta.url),"catppuccin-macchiato":()=>r(()=>import("./BDHlNkT6.js"),[],import.meta.url),"catppuccin-mocha":()=>r(()=>import("./Byn9ySyY.js"),[],import.meta.url),"dark-plus":()=>r(()=>import("./CvX4Ty3s.js"),[],import.meta.url),dracula:()=>r(()=>import("./DmZ-8HRb.js"),[],import.meta.url),"dracula-soft":()=>r(()=>import("./B2_S_wA_.js"),[],import.meta.url),"everforest-dark":()=>r(()=>import("./0rLcFJpw.js"),[],import.meta.url),"everforest-light":()=>r(()=>import("./BTfPW4aP.js"),[],import.meta.url),"github-dark":()=>r(()=>import("./BVmx9f8d.js"),[],import.meta.url),"github-dark-default":()=>r(()=>import("./Cobl_g8l.js"),[],import.meta.url),"github-dark-dimmed":()=>r(()=>import("./Bqq4Z-hR.js"),[],import.meta.url),"github-dark-high-contrast":()=>r(()=>import("./CC6_60ke.js"),[],import.meta.url),"github-light":()=>r(()=>import("./DJPhTNJ5.js"),[],import.meta.url),"github-light-default":()=>r(()=>import("./DqR1o2IW.js"),[],import.meta.url),"github-light-high-contrast":()=>r(()=>import("./D_1gu_AN.js"),[],import.meta.url),"gruvbox-dark-hard":()=>r(()=>import("./C9F1V87v.js"),[],import.meta.url),"gruvbox-dark-medium":()=>r(()=>import("./C1_GCade.js"),[],import.meta.url),"gruvbox-dark-soft":()=>r(()=>import("./D3ZqCmv2.js"),[],import.meta.url),"gruvbox-light-hard":()=>r(()=>import("./BRlNxIYS.js"),[],import.meta.url),"gruvbox-light-medium":()=>r(()=>import("./BHRQ01Wa.js"),[],import.meta.url),"gruvbox-light-soft":()=>r(()=>import("./CRV2jOqR.js"),[],import.meta.url),horizon:()=>r(()=>import("./4OJY8TlL.js"),[],import.meta.url),"horizon-bright":()=>r(()=>import("./DKG-69X0.js"),[],import.meta.url),houston:()=>r(()=>import("./DI9CDuY-.js"),[],import.meta.url),"kanagawa-dragon":()=>r(()=>import("./D-96pmLZ.js"),[],import.meta.url),"kanagawa-lotus":()=>r(()=>import("./Bh8QPcxh.js"),[],import.meta.url),"kanagawa-wave":()=>r(()=>import("./CtcU2r-L.js"),[],import.meta.url),laserwave:()=>r(()=>import("./CyPsI7TV.js"),[],import.meta.url),"light-plus":()=>r(()=>import("./DLxye2Gs.js"),[],import.meta.url),"material-theme":()=>r(()=>import("./CJcwlkxy.js"),[],import.meta.url),"material-theme-darker":()=>r(()=>import("./BGZ_5sXo.js"),[],import.meta.url),"material-theme-lighter":()=>r(()=>import("./CjcM5chE.js"),[],import.meta.url),"material-theme-ocean":()=>r(()=>import("./bB53CPUr.js"),[],import.meta.url),"material-theme-palenight":()=>r(()=>import("./CEO02sJ-.js"),[],import.meta.url),"min-dark":()=>r(()=>import("./BMCe6Sa9.js"),[],import.meta.url),"min-light":()=>r(()=>import("./Bm6kkJDi.js"),[],import.meta.url),monokai:()=>r(()=>import("./Dk2XPowy.js"),[],import.meta.url),"night-owl":()=>r(()=>import("./han1E7M5.js"),[],import.meta.url),"night-owl-light":()=>r(()=>import("./Cl1yPzT6.js"),[],import.meta.url),nord:()=>r(()=>import("./DDTeIukr.js"),[],import.meta.url),"one-dark-pro":()=>r(()=>import("./DF6Wh4HV.js"),[],import.meta.url),"one-light":()=>r(()=>import("./DtuA6F_V.js"),[],import.meta.url),"pierre-dark":()=>r(()=>import("./DF50kJRQ.js"),[],import.meta.url),"pierre-dark-protanopia-deuteranopia":()=>r(()=>import("./Cgqy1jHS.js"),[],import.meta.url),"pierre-dark-soft":()=>r(()=>import("./BCUYmEtF.js"),[],import.meta.url),"pierre-dark-tritanopia":()=>r(()=>import("./CncZof3Q.js"),[],import.meta.url),"pierre-dark-vibrant":()=>r(()=>import("./BI1wPMzu.js"),[],import.meta.url),"pierre-light":()=>r(()=>import("./DXZG9etP.js"),[],import.meta.url),"pierre-light-protanopia-deuteranopia":()=>r(()=>import("./BTq7x1tZ.js"),[],import.meta.url),"pierre-light-soft":()=>r(()=>import("./BwL5JwZL.js"),[],import.meta.url),"pierre-light-tritanopia":()=>r(()=>import("./sLHrbAeH.js"),[],import.meta.url),"pierre-light-vibrant":()=>r(()=>import("./D99YW89A.js"),[],import.meta.url),plastic:()=>r(()=>import("./BA_LeTlt.js"),[],import.meta.url),poimandres:()=>r(()=>import("./oP3Jw5ph.js"),[],import.meta.url),red:()=>r(()=>import("./C7ljw3yD.js"),[],import.meta.url),"rose-pine":()=>r(()=>import("./N6Nc_Qgp.js"),[],import.meta.url),"rose-pine-dawn":()=>r(()=>import("./CjcyLH22.js"),[],import.meta.url),"rose-pine-moon":()=>r(()=>import("./XvifxlJo.js"),[],import.meta.url),"slack-dark":()=>r(()=>import("./CXWcruur.js"),[],import.meta.url),"slack-ochin":()=>r(()=>import("./j9-5xOqG.js"),[],import.meta.url),"snazzy-light":()=>r(()=>import("./NrfPMqkH.js"),[],import.meta.url),"solarized-dark":()=>r(()=>import("./CYqaUSYq.js"),[],import.meta.url),"solarized-light":()=>r(()=>import("./Ws7Bvbxh.js"),[],import.meta.url),"synthwave-84":()=>r(()=>import("./ev3Pj0YU.js"),[],import.meta.url),"tokyo-night":()=>r(()=>import("./DcOUfspC.js"),[],import.meta.url),vesper:()=>r(()=>import("./XBdv8qqG.js"),[],import.meta.url),"vitesse-black":()=>r(()=>import("./Dax7f9LR.js"),[],import.meta.url),"vitesse-dark":()=>r(()=>import("./CC8sM7O4.js"),[],import.meta.url),"vitesse-light":()=>r(()=>import("./DngnB9Ap.js"),[],import.meta.url)};export{_ as themes};
1
+ import{_ as r}from"./C0QTy0Sy.js";const _={andromeeda:()=>r(()=>import("./dzT1arR_.js"),[],import.meta.url),"aurora-x":()=>r(()=>import("./B7pmKBD2.js"),[],import.meta.url),"ayu-dark":()=>r(()=>import("./BBURKmLH.js"),[],import.meta.url),"ayu-light":()=>r(()=>import("./DwHC-by_.js"),[],import.meta.url),"ayu-mirage":()=>r(()=>import("./DKqT1wVu.js"),[],import.meta.url),"catppuccin-frappe":()=>r(()=>import("./B24fvTzB.js"),[],import.meta.url),"catppuccin-latte":()=>r(()=>import("./CdPbmwTc.js"),[],import.meta.url),"catppuccin-macchiato":()=>r(()=>import("./BDHlNkT6.js"),[],import.meta.url),"catppuccin-mocha":()=>r(()=>import("./Byn9ySyY.js"),[],import.meta.url),"dark-plus":()=>r(()=>import("./CvX4Ty3s.js"),[],import.meta.url),dracula:()=>r(()=>import("./DmZ-8HRb.js"),[],import.meta.url),"dracula-soft":()=>r(()=>import("./B2_S_wA_.js"),[],import.meta.url),"everforest-dark":()=>r(()=>import("./0rLcFJpw.js"),[],import.meta.url),"everforest-light":()=>r(()=>import("./BTfPW4aP.js"),[],import.meta.url),"github-dark":()=>r(()=>import("./BVmx9f8d.js"),[],import.meta.url),"github-dark-default":()=>r(()=>import("./Cobl_g8l.js"),[],import.meta.url),"github-dark-dimmed":()=>r(()=>import("./Bqq4Z-hR.js"),[],import.meta.url),"github-dark-high-contrast":()=>r(()=>import("./CC6_60ke.js"),[],import.meta.url),"github-light":()=>r(()=>import("./DJPhTNJ5.js"),[],import.meta.url),"github-light-default":()=>r(()=>import("./DqR1o2IW.js"),[],import.meta.url),"github-light-high-contrast":()=>r(()=>import("./D_1gu_AN.js"),[],import.meta.url),"gruvbox-dark-hard":()=>r(()=>import("./C9F1V87v.js"),[],import.meta.url),"gruvbox-dark-medium":()=>r(()=>import("./C1_GCade.js"),[],import.meta.url),"gruvbox-dark-soft":()=>r(()=>import("./D3ZqCmv2.js"),[],import.meta.url),"gruvbox-light-hard":()=>r(()=>import("./BRlNxIYS.js"),[],import.meta.url),"gruvbox-light-medium":()=>r(()=>import("./BHRQ01Wa.js"),[],import.meta.url),"gruvbox-light-soft":()=>r(()=>import("./CRV2jOqR.js"),[],import.meta.url),horizon:()=>r(()=>import("./4OJY8TlL.js"),[],import.meta.url),"horizon-bright":()=>r(()=>import("./DKG-69X0.js"),[],import.meta.url),houston:()=>r(()=>import("./DI9CDuY-.js"),[],import.meta.url),"kanagawa-dragon":()=>r(()=>import("./D-96pmLZ.js"),[],import.meta.url),"kanagawa-lotus":()=>r(()=>import("./Bh8QPcxh.js"),[],import.meta.url),"kanagawa-wave":()=>r(()=>import("./CtcU2r-L.js"),[],import.meta.url),laserwave:()=>r(()=>import("./CyPsI7TV.js"),[],import.meta.url),"light-plus":()=>r(()=>import("./DLxye2Gs.js"),[],import.meta.url),"material-theme":()=>r(()=>import("./CJcwlkxy.js"),[],import.meta.url),"material-theme-darker":()=>r(()=>import("./BGZ_5sXo.js"),[],import.meta.url),"material-theme-lighter":()=>r(()=>import("./CjcM5chE.js"),[],import.meta.url),"material-theme-ocean":()=>r(()=>import("./bB53CPUr.js"),[],import.meta.url),"material-theme-palenight":()=>r(()=>import("./CEO02sJ-.js"),[],import.meta.url),"min-dark":()=>r(()=>import("./BMCe6Sa9.js"),[],import.meta.url),"min-light":()=>r(()=>import("./Bm6kkJDi.js"),[],import.meta.url),monokai:()=>r(()=>import("./Dk2XPowy.js"),[],import.meta.url),"night-owl":()=>r(()=>import("./han1E7M5.js"),[],import.meta.url),"night-owl-light":()=>r(()=>import("./Cl1yPzT6.js"),[],import.meta.url),nord:()=>r(()=>import("./DDTeIukr.js"),[],import.meta.url),"one-dark-pro":()=>r(()=>import("./DF6Wh4HV.js"),[],import.meta.url),"one-light":()=>r(()=>import("./DtuA6F_V.js"),[],import.meta.url),"pierre-dark":()=>r(()=>import("./DF50kJRQ.js"),[],import.meta.url),"pierre-dark-protanopia-deuteranopia":()=>r(()=>import("./Cgqy1jHS.js"),[],import.meta.url),"pierre-dark-soft":()=>r(()=>import("./BCUYmEtF.js"),[],import.meta.url),"pierre-dark-tritanopia":()=>r(()=>import("./CncZof3Q.js"),[],import.meta.url),"pierre-dark-vibrant":()=>r(()=>import("./BI1wPMzu.js"),[],import.meta.url),"pierre-light":()=>r(()=>import("./DXZG9etP.js"),[],import.meta.url),"pierre-light-protanopia-deuteranopia":()=>r(()=>import("./BTq7x1tZ.js"),[],import.meta.url),"pierre-light-soft":()=>r(()=>import("./BwL5JwZL.js"),[],import.meta.url),"pierre-light-tritanopia":()=>r(()=>import("./sLHrbAeH.js"),[],import.meta.url),"pierre-light-vibrant":()=>r(()=>import("./D99YW89A.js"),[],import.meta.url),plastic:()=>r(()=>import("./BA_LeTlt.js"),[],import.meta.url),poimandres:()=>r(()=>import("./oP3Jw5ph.js"),[],import.meta.url),red:()=>r(()=>import("./C7ljw3yD.js"),[],import.meta.url),"rose-pine":()=>r(()=>import("./N6Nc_Qgp.js"),[],import.meta.url),"rose-pine-dawn":()=>r(()=>import("./CjcyLH22.js"),[],import.meta.url),"rose-pine-moon":()=>r(()=>import("./XvifxlJo.js"),[],import.meta.url),"slack-dark":()=>r(()=>import("./CXWcruur.js"),[],import.meta.url),"slack-ochin":()=>r(()=>import("./j9-5xOqG.js"),[],import.meta.url),"snazzy-light":()=>r(()=>import("./NrfPMqkH.js"),[],import.meta.url),"solarized-dark":()=>r(()=>import("./CYqaUSYq.js"),[],import.meta.url),"solarized-light":()=>r(()=>import("./Ws7Bvbxh.js"),[],import.meta.url),"synthwave-84":()=>r(()=>import("./ev3Pj0YU.js"),[],import.meta.url),"tokyo-night":()=>r(()=>import("./DcOUfspC.js"),[],import.meta.url),vesper:()=>r(()=>import("./XBdv8qqG.js"),[],import.meta.url),"vitesse-black":()=>r(()=>import("./Dax7f9LR.js"),[],import.meta.url),"vitesse-dark":()=>r(()=>import("./CC8sM7O4.js"),[],import.meta.url),"vitesse-light":()=>r(()=>import("./DngnB9Ap.js"),[],import.meta.url)};export{_ as themes};
@@ -1 +1 @@
1
- import{aR as y,aP as M,b4 as S,ao as D,a0 as F,b2 as C,s as R,bL as W,bT as j,bM as E,bt as G,aW as T,ae as I,d as P,c4 as q,b0 as O,aA as g,bU as z,U as Y,bd as U,a4 as Z,bs as J,a5 as K,bS as Q,a7 as V,ay as X,W as k,b_ as A,aw as B,bz as $,bA as aa,bn as ea,aB as H}from"./3SdAC2_C.js";import{B as sa,t as ra,bo as w,bw as ta,b as na}from"./BEwMx-58.js";import{i as ia}from"./Gpf-ce3t.js";import{k as oa}from"./BeKKPzED.js";import{s as x,g as la}from"./CyczJyMt.js";import{F as ca,bv as ua}from"./DQEQvBuM.js";const L=0,N=1,fa=2;function Ta(b,i,t,s,o){y&&M();var v=S(),u=Y,l=v?z(u):U(u,!1,!1),r=v?z(u):U(u,!1,!1);D&&(l.label="{#await ...} value",r.label="{#await ...} error");var n=new sa(b);F(()=>{var d=I,a=i(),c=!1;let _=y&&C(a)===(b.data===R);if(_&&(W(j()),E(!1)),C(a)){var p=Z(),f=!1;const e=m=>{if(!c){f=!0,p(!1),I===d&&d.deactivate(),P.ensure();try{m()}finally{q(!1),O||g()}}};a.then(m=>{e(()=>{T(l,m),n.ensure(N,s&&(h=>s(h,l)))})},m=>{e(()=>{if(T(r,m),n.ensure(fa,o&&(h=>o(h,r))),!o)throw r.v})}),y?n.ensure(L,t):G(()=>{f||e(()=>{n.ensure(L,t)})})}else T(l,a),n.ensure(N,s&&(e=>s(e,l)));return _&&E(!0),()=>{c=!0}})}var ba=H('<img alt="" class="absolute inset-0 size-full rounded-sm object-contain opacity-0"/>'),ma=H('<span class="relative inline-flex shrink-0 items-center justify-center" aria-hidden="true"><!> <!></span>');function va(b,i){if(new.target)return ra({component:va,...b});J(i,!0);let t=w(i,"faviconUrl",7),s=w(i,"size",7,16),o=w(i,"fallbackClass",7,"text-muted-foreground");function v(a){a.currentTarget instanceof HTMLImageElement&&(a.currentTarget.style.opacity="1")}function u(a){a.currentTarget instanceof HTMLImageElement&&(a.currentTarget.style.opacity="0")}var l={get faviconUrl(){return t()},set faviconUrl(a){t(a),g()},get size(){return s()},set size(a=16){s(a),g()},get fallbackClass(){return o()},set fallbackClass(a="text-muted-foreground"){o(a),g()},$set:ta,$on:(a,c)=>na(i,a,c)},r=ma(),n=K(r);ca(n,{get icon(){return ua},get size(){return s()},get class(){return o()}});var d=Q(n,2);return oa(d,t,a=>{var c=V(),_=X(c);{var p=f=>{var e=ba();A(()=>{x(e,"src",t()),x(e,"width",s()),x(e,"height",s())}),B("load",e,v),B("error",e,u),$(e),k(f,e)};ia(_,f=>{t()&&f(p)})}k(a,c)}),aa(r),A(()=>la(r,`width: ${s()??""}px; height: ${s()??""}px;`)),k(b,r),ea(l)}export{va as B,Ta as a};
1
+ import{aR as y,aP as M,b4 as S,ao as D,a0 as F,b2 as C,s as R,bL as W,bT as j,bM as E,bt as G,aW as T,ae as I,d as P,c4 as q,b0 as O,aA as g,bU as z,U as Y,bd as U,a4 as Z,bs as J,a5 as K,bS as Q,a7 as V,ay as X,W as k,b_ as A,aw as B,bz as $,bA as aa,bn as ea,aB as H}from"./3SdAC2_C.js";import{B as sa,t as ra,bo as w,bw as ta,b as na}from"./C0QTy0Sy.js";import{i as ia}from"./bhKPSdq4.js";import{k as oa}from"./-K3ARgq0.js";import{s as x,g as la}from"./7UPrdiE9.js";import{F as ca,bv as ua}from"./U9jJmfYa.js";const L=0,N=1,fa=2;function Ta(b,i,t,s,o){y&&M();var v=S(),u=Y,l=v?z(u):U(u,!1,!1),r=v?z(u):U(u,!1,!1);D&&(l.label="{#await ...} value",r.label="{#await ...} error");var n=new sa(b);F(()=>{var d=I,a=i(),c=!1;let _=y&&C(a)===(b.data===R);if(_&&(W(j()),E(!1)),C(a)){var p=Z(),f=!1;const e=m=>{if(!c){f=!0,p(!1),I===d&&d.deactivate(),P.ensure();try{m()}finally{q(!1),O||g()}}};a.then(m=>{e(()=>{T(l,m),n.ensure(N,s&&(h=>s(h,l)))})},m=>{e(()=>{if(T(r,m),n.ensure(fa,o&&(h=>o(h,r))),!o)throw r.v})}),y?n.ensure(L,t):G(()=>{f||e(()=>{n.ensure(L,t)})})}else T(l,a),n.ensure(N,s&&(e=>s(e,l)));return _&&E(!0),()=>{c=!0}})}var ba=H('<img alt="" class="absolute inset-0 size-full rounded-sm object-contain opacity-0"/>'),ma=H('<span class="relative inline-flex shrink-0 items-center justify-center" aria-hidden="true"><!> <!></span>');function va(b,i){if(new.target)return ra({component:va,...b});J(i,!0);let t=w(i,"faviconUrl",7),s=w(i,"size",7,16),o=w(i,"fallbackClass",7,"text-muted-foreground");function v(a){a.currentTarget instanceof HTMLImageElement&&(a.currentTarget.style.opacity="1")}function u(a){a.currentTarget instanceof HTMLImageElement&&(a.currentTarget.style.opacity="0")}var l={get faviconUrl(){return t()},set faviconUrl(a){t(a),g()},get size(){return s()},set size(a=16){s(a),g()},get fallbackClass(){return o()},set fallbackClass(a="text-muted-foreground"){o(a),g()},$set:ta,$on:(a,c)=>na(i,a,c)},r=ma(),n=K(r);ca(n,{get icon(){return ua},get size(){return s()},get class(){return o()}});var d=Q(n,2);return oa(d,t,a=>{var c=V(),_=X(c);{var p=f=>{var e=ba();A(()=>{x(e,"src",t()),x(e,"width",s()),x(e,"height",s())}),B("load",e,v),B("error",e,u),$(e),k(f,e)};ia(_,f=>{t()&&f(p)})}k(a,c)}),aa(r),A(()=>la(r,`width: ${s()??""}px; height: ${s()??""}px;`)),k(b,r),ea(l)}export{va as B,Ta as a};
@@ -1 +1 @@
1
- import{v as c}from"./Dms_DO28.js";import{ab as t}from"./9xo585Vy.js";function a(n){return n.connections?.windowBackendId??t}function i(n,e){return e===t?n:`backend:${e}:${n}`}function*s(){return yield*c(a)}export{a as g,i as n,s};
1
+ import{v as c}from"./Dms_DO28.js";import{ab as t}from"./tr-2J8Mf.js";function a(n){return n.connections?.windowBackendId??t}function i(n,e){return e===t?n:`backend:${e}:${n}`}function*s(){return yield*c(a)}export{a as g,i as n,s};
@@ -1 +1 @@
1
- import{at as L,ca as T}from"./3SdAC2_C.js";import{a as C,s as E}from"./BsieX9dN.js";import{o as F,p as H}from"./BZKoidWB.js";import"./CyczJyMt.js";import{S as N}from"./C4_TlGj0.js";function b(e){return typeof e=="object"?{open:e.open??!0,tier:e.tier??"slow",onClosed:e.onClosed}:{open:e??!0,tier:"slow",onClosed:void 0}}function W(e){const l=e.querySelectorAll("[data-animated-height-target]"),t=l.item(l.length-1)||e.firstElementChild;if(!t)return e.scrollHeight;const n=getComputedStyle(t),c=Number.parseFloat(n.height);return Number.isFinite(c)?n.boxSizing==="border-box"?c:c+["paddingTop","paddingBottom","borderTopWidth","borderBottomWidth"].reduce((r,u)=>r+(Number.parseFloat(n[u])||0),0):t.offsetHeight}const P=(e,l=!0)=>{let{open:t,onClosed:n}=b(l);const{tier:c}=b(l),r=new N(0,c);let u=!t,v,i=!1,a,h,s;const O=e.style.overflow,S=e.style.height,m=()=>{e.style.overflow="clip",v=r.current,e.style.height=`${v}px`},M=L(()=>{T(()=>{const o=r.current;!u||i||o===v||(s?.(),s=C(()=>{s=void 0,i||m()}))})}),d=()=>{if(i)return;a?.(),h?.();const o=f=>{h=C(()=>{if(h=void 0,i)return;const z=r.set(f,{instant:!u||H()});u=!0,t||z.then(()=>{!i&&!t&&r.current===0&&n?.()}),s?.(),s=void 0,m()})};t?a=E(()=>{a=void 0,o(W(e))}):o(0)},R=()=>{H()&&d()},p=typeof ResizeObserver>"u"?void 0:new ResizeObserver(()=>{t&&d()});let g=null;const y=()=>{const o=e.querySelectorAll("[data-animated-height-target]"),f=o.item(o.length-1)||e.firstElementChild||e;f!==g&&(g&&p?.unobserve(g),g=f,p?.observe(f))};y();const w=typeof MutationObserver>"u"?void 0:new MutationObserver(()=>{i||(y(),t&&d())});w?.observe(e,{childList:!0,subtree:!0});const x=F(R);return d(),{update(o=!0){({open:t,onClosed:n}=b(o)),d()},destroy(){i=!0,a?.(),h?.(),s?.(),r.set(r.current,{instant:!0}),p?.disconnect(),w?.disconnect(),x(),M(),e.style.height=S,e.style.overflow=O}}};export{P as a};
1
+ import{at as L,ca as T}from"./3SdAC2_C.js";import{a as C,s as E}from"./BsieX9dN.js";import{o as F,p as H}from"./B6S6VNu7.js";import"./7UPrdiE9.js";import{S as N}from"./DLwWVKiF.js";function b(e){return typeof e=="object"?{open:e.open??!0,tier:e.tier??"slow",onClosed:e.onClosed}:{open:e??!0,tier:"slow",onClosed:void 0}}function W(e){const l=e.querySelectorAll("[data-animated-height-target]"),t=l.item(l.length-1)||e.firstElementChild;if(!t)return e.scrollHeight;const n=getComputedStyle(t),c=Number.parseFloat(n.height);return Number.isFinite(c)?n.boxSizing==="border-box"?c:c+["paddingTop","paddingBottom","borderTopWidth","borderBottomWidth"].reduce((r,u)=>r+(Number.parseFloat(n[u])||0),0):t.offsetHeight}const P=(e,l=!0)=>{let{open:t,onClosed:n}=b(l);const{tier:c}=b(l),r=new N(0,c);let u=!t,v,i=!1,a,h,s;const O=e.style.overflow,S=e.style.height,m=()=>{e.style.overflow="clip",v=r.current,e.style.height=`${v}px`},M=L(()=>{T(()=>{const o=r.current;!u||i||o===v||(s?.(),s=C(()=>{s=void 0,i||m()}))})}),d=()=>{if(i)return;a?.(),h?.();const o=f=>{h=C(()=>{if(h=void 0,i)return;const z=r.set(f,{instant:!u||H()});u=!0,t||z.then(()=>{!i&&!t&&r.current===0&&n?.()}),s?.(),s=void 0,m()})};t?a=E(()=>{a=void 0,o(W(e))}):o(0)},R=()=>{H()&&d()},p=typeof ResizeObserver>"u"?void 0:new ResizeObserver(()=>{t&&d()});let g=null;const y=()=>{const o=e.querySelectorAll("[data-animated-height-target]"),f=o.item(o.length-1)||e.firstElementChild||e;f!==g&&(g&&p?.unobserve(g),g=f,p?.observe(f))};y();const w=typeof MutationObserver>"u"?void 0:new MutationObserver(()=>{i||(y(),t&&d())});w?.observe(e,{childList:!0,subtree:!0});const x=F(R);return d(),{update(o=!0){({open:t,onClosed:n}=b(o)),d()},destroy(){i=!0,a?.(),h?.(),s?.(),r.set(r.current,{instant:!0}),p?.disconnect(),w?.disconnect(),x(),M(),e.style.height=S,e.style.overflow=O}}};export{P as a};
@@ -1,3 +1,3 @@
1
- import{Jv as n,mz as o,nY as u,i9 as W,nU as k,nN as P,o4 as b,ig as S,s1 as v,vW as y}from"./9xo585Vy.js";function L(e,t){return t?JSON.stringify(["git-root",t,e]):e}const p=[];function h(e){return!!e&&e!=="new"&&!e.startsWith("optimistic-")&&e!=="undefined"}const j=n.createSelector((e,t)=>e.panelLayout.byWorkspaceId[t]??o),A=n.createSelector((e,t)=>(e.panelLayout.byWorkspaceId[t]??o).pendingPanelReveal??null),f={count:0,isOpen:!1,isActive:!1,isOpenElsewhere:!1};function R(e,t,a,s){if(s.workspaceId&&s.workspaceId!==a)return f;const c=s,r=e.filter(l=>(!l.workspaceId||l.workspaceId===a)&&y(l,c));if(r.length===0)return f;const d=!!t&&(!t.workspaceId||t.workspaceId===a)&&y(t,c);return{count:r.length,isOpen:!0,isActive:d,isOpenElsewhere:!d}}const E=n.createSelector(e=>e.panelLayout.byWorkspaceId),F=n.createSelector((e,t)=>(e.panelLayout.byWorkspaceId[t]??o).root),H=n.createSelector((e,t)=>(e.panelLayout.byWorkspaceId[t]??o).expandedPanelId),M=n.createSelector((e,t)=>(e.panelLayout.byWorkspaceId[t]??o).panels),q=n.createSelector((e,t,a)=>(e.panelLayout.byWorkspaceId[t]??o).panels[a]),x=n.createSelector((e,t)=>(e.panelLayout.byWorkspaceId[t]??o).focusedPanelId),$=n.createSelector((e,t)=>{const a=e.panelLayout.byWorkspaceId[t]??o;return a.focusedPanelId?a.panels[a.focusedPanelId]:void 0});n.createSelector(e=>Object.fromEntries(Object.entries(e.panelLayout.byWorkspaceId).map(([t,a])=>{const s=a.focusedPanelId,c=s?a.panels[s]:void 0;return[t,{panelId:c?s:null,activeTabId:c?.activeTabId??null}]})));const z=n.createSelector((e,t)=>(e.panelLayout.byWorkspaceId[t]??o).restoreStatus),B=n.createSelector((e,t)=>{const a=e.panelLayout.byWorkspaceId[t]??o;if(!a.focusedPanelId)return;const s=a.panels[a.focusedPanelId];if(!(!s||!s.activeTabId))return s.tabs.find(c=>c.id===s.activeTabId)}),D=n.createSelector((e,t)=>{const a=e.panelLayout.byWorkspaceId[t]??o;for(let s=a.focusHistory.length-1;s>=0;s-=1){const c=a.focusHistory[s],r=a.panels[c.panelId]?.tabs.find(d=>d.id===c.tabId);if(r?.type==="agent")return r}}),N=n.createSelector((e,t,a)=>{const c=(e.panelLayout.byWorkspaceId[t]??o).panels[a];if(!(!c||!c.activeTabId))return c.tabs.find(r=>r.id===c.activeTabId)}),J=n.createSelector((e,t)=>{const a=e.panelLayout.byWorkspaceId[t]??o;return Object.values(a.panels).flatMap(s=>s.tabs)}),V=n.createSelector((e,t)=>{const a=e.panelLayout.byWorkspaceId[t]??o;return u(a.hiddenTabs??o.hiddenTabs)});function m(e){const t=[];for(const a of Object.values(e.panels))for(const s of a.tabs)s.type==="browser"&&t.push({tab:s,visibility:"visible",displayed:a.activeTabId===s.id});for(const a of u(e.hiddenTabs??o.hiddenTabs))a.type==="browser"&&t.push({tab:a,visibility:"hidden",displayed:!1});return t}const C=n.createSelector((e,t)=>{const a=e?.panelLayout?.byWorkspaceId[t]??o;return m(a).length>0}),K=n.createSelector(e=>Object.keys(e.panelLayout.byWorkspaceId).filter(t=>C.select(e,t)));n.createSelector(e=>Object.fromEntries(Object.entries(e.panelLayout.byWorkspaceId).map(([t,a])=>{const s=Object.values(a.panels).some(c=>c.tabs.length>0);return[t,s?W(a.root):0]})));const U=n.createSelector((e,t)=>{const a=e.panelLayout.byWorkspaceId[t]??o;return k(a.root,a.panels)});n.createSelector(e=>Object.fromEntries(Object.entries(e.panelLayout.byWorkspaceId).map(([t,a])=>[t,a.canvasWidth??P(a.root,a.panels,"content")])));const Y=n.createSelector((e,t)=>(e.panelLayout.byWorkspaceId[t]??o).canvasWidth),G=n.createSelector((e,t)=>(e.panelLayout.byWorkspaceId[t]??o).canvasWidthSource),Q=n.createSelector((e,t)=>(e.panelLayout.byWorkspaceId[t]??o).columnCount);n.createSelector(e=>Object.fromEntries(Object.entries(e.panelLayout.byWorkspaceId).map(([t,a])=>[t,a.restoreStatus])));const X=n.createSelector((e,t,a=!1)=>{if(!h(t))return p;const s=e.panelLayout.byWorkspaceId[t],c=e.files.byWorkspaceId[t];if(!c)return p;if(!s)return a?[...c.files.ids].sort((l,i)=>l.localeCompare(i)):p;const r=new Set;for(const l of Object.values(s.panels))for(const i of l.tabs)i.type==="file"&&typeof i.filePath=="string"&&i.filePath.length>0&&r.add(L(i.filePath,typeof i.data?.gitRootId=="string"?i.data.gitRootId:void 0));const d=[];for(const l of c.files.ids)r.has(l)||d.push(l);return d.length===0?p:(d.sort((l,i)=>l.localeCompare(i)),d)}),Z=n.createSelector((e,t)=>{const a=e.panelLayout.byWorkspaceId[t]??o;return b(a.root)});function I(e){return b(e.root).flatMap(t=>{const a=e.panels[t];return a?[{panelId:t,panes:a.tabs,activePaneId:a.activeTabId,attentionPaneIds:a.attentionTabIds??[]}]:[]})}const _=n.createSelector((e,t)=>I(e.panelLayout.byWorkspaceId[t]??o));n.createSelector((e,t,a)=>I(e.panelLayout.byWorkspaceId[t]??o).find(s=>s.panelId===a));function T(e){return b(e.root).flatMap(t=>{const a=e.panels[t];if(!a)return[];const c=a.tabs.find(r=>r.id===a.activeTabId)??a.tabs[0];return[{id:t,title:c?.title??"",type:c?.type}]})}n.createSelector((e,t)=>T(e.panelLayout.byWorkspaceId[t]??o));const g=n.createSelector((e,t)=>(e.panelLayout.byWorkspaceId[t]??o).recentlyClosed),w=n.createSelector((e,t)=>{const a=e.panelLayout.byWorkspaceId[t]??o;return u(a.recentlyClosedColumns??S("historyId")).find(s=>v(a,s))??null}),ee=n.createSelector((e,t)=>{const a=g.select(e,t)[0]??null,s=w.select(e,t);return s&&(!a||s.closedAt>=a.closedAt)?{kind:"column",closedAt:s.closedAt}:a?{kind:"tab",closedAt:a.closedAt}:null}),te=n.createSelector(e=>Object.entries(e.panelLayout.byWorkspaceId).flatMap(([t,a])=>a.tabWindowFocusRequest?[`${t}\0${a.tabWindowFocusRequest.seq}\0${a.tabWindowFocusRequest.tabWindowId}`]:[]).join(`
1
+ import{Jv as n,mz as o,nY as u,i9 as W,nU as k,nN as P,o4 as b,ig as S,s1 as v,vW as y}from"./tr-2J8Mf.js";function L(e,t){return t?JSON.stringify(["git-root",t,e]):e}const p=[];function h(e){return!!e&&e!=="new"&&!e.startsWith("optimistic-")&&e!=="undefined"}const j=n.createSelector((e,t)=>e.panelLayout.byWorkspaceId[t]??o),A=n.createSelector((e,t)=>(e.panelLayout.byWorkspaceId[t]??o).pendingPanelReveal??null),f={count:0,isOpen:!1,isActive:!1,isOpenElsewhere:!1};function R(e,t,a,s){if(s.workspaceId&&s.workspaceId!==a)return f;const c=s,r=e.filter(l=>(!l.workspaceId||l.workspaceId===a)&&y(l,c));if(r.length===0)return f;const d=!!t&&(!t.workspaceId||t.workspaceId===a)&&y(t,c);return{count:r.length,isOpen:!0,isActive:d,isOpenElsewhere:!d}}const E=n.createSelector(e=>e.panelLayout.byWorkspaceId),F=n.createSelector((e,t)=>(e.panelLayout.byWorkspaceId[t]??o).root),H=n.createSelector((e,t)=>(e.panelLayout.byWorkspaceId[t]??o).expandedPanelId),M=n.createSelector((e,t)=>(e.panelLayout.byWorkspaceId[t]??o).panels),q=n.createSelector((e,t,a)=>(e.panelLayout.byWorkspaceId[t]??o).panels[a]),x=n.createSelector((e,t)=>(e.panelLayout.byWorkspaceId[t]??o).focusedPanelId),$=n.createSelector((e,t)=>{const a=e.panelLayout.byWorkspaceId[t]??o;return a.focusedPanelId?a.panels[a.focusedPanelId]:void 0});n.createSelector(e=>Object.fromEntries(Object.entries(e.panelLayout.byWorkspaceId).map(([t,a])=>{const s=a.focusedPanelId,c=s?a.panels[s]:void 0;return[t,{panelId:c?s:null,activeTabId:c?.activeTabId??null}]})));const z=n.createSelector((e,t)=>(e.panelLayout.byWorkspaceId[t]??o).restoreStatus),B=n.createSelector((e,t)=>{const a=e.panelLayout.byWorkspaceId[t]??o;if(!a.focusedPanelId)return;const s=a.panels[a.focusedPanelId];if(!(!s||!s.activeTabId))return s.tabs.find(c=>c.id===s.activeTabId)}),D=n.createSelector((e,t)=>{const a=e.panelLayout.byWorkspaceId[t]??o;for(let s=a.focusHistory.length-1;s>=0;s-=1){const c=a.focusHistory[s],r=a.panels[c.panelId]?.tabs.find(d=>d.id===c.tabId);if(r?.type==="agent")return r}}),N=n.createSelector((e,t,a)=>{const c=(e.panelLayout.byWorkspaceId[t]??o).panels[a];if(!(!c||!c.activeTabId))return c.tabs.find(r=>r.id===c.activeTabId)}),J=n.createSelector((e,t)=>{const a=e.panelLayout.byWorkspaceId[t]??o;return Object.values(a.panels).flatMap(s=>s.tabs)}),V=n.createSelector((e,t)=>{const a=e.panelLayout.byWorkspaceId[t]??o;return u(a.hiddenTabs??o.hiddenTabs)});function m(e){const t=[];for(const a of Object.values(e.panels))for(const s of a.tabs)s.type==="browser"&&t.push({tab:s,visibility:"visible",displayed:a.activeTabId===s.id});for(const a of u(e.hiddenTabs??o.hiddenTabs))a.type==="browser"&&t.push({tab:a,visibility:"hidden",displayed:!1});return t}const C=n.createSelector((e,t)=>{const a=e?.panelLayout?.byWorkspaceId[t]??o;return m(a).length>0}),K=n.createSelector(e=>Object.keys(e.panelLayout.byWorkspaceId).filter(t=>C.select(e,t)));n.createSelector(e=>Object.fromEntries(Object.entries(e.panelLayout.byWorkspaceId).map(([t,a])=>{const s=Object.values(a.panels).some(c=>c.tabs.length>0);return[t,s?W(a.root):0]})));const U=n.createSelector((e,t)=>{const a=e.panelLayout.byWorkspaceId[t]??o;return k(a.root,a.panels)});n.createSelector(e=>Object.fromEntries(Object.entries(e.panelLayout.byWorkspaceId).map(([t,a])=>[t,a.canvasWidth??P(a.root,a.panels,"content")])));const Y=n.createSelector((e,t)=>(e.panelLayout.byWorkspaceId[t]??o).canvasWidth),G=n.createSelector((e,t)=>(e.panelLayout.byWorkspaceId[t]??o).canvasWidthSource),Q=n.createSelector((e,t)=>(e.panelLayout.byWorkspaceId[t]??o).columnCount);n.createSelector(e=>Object.fromEntries(Object.entries(e.panelLayout.byWorkspaceId).map(([t,a])=>[t,a.restoreStatus])));const X=n.createSelector((e,t,a=!1)=>{if(!h(t))return p;const s=e.panelLayout.byWorkspaceId[t],c=e.files.byWorkspaceId[t];if(!c)return p;if(!s)return a?[...c.files.ids].sort((l,i)=>l.localeCompare(i)):p;const r=new Set;for(const l of Object.values(s.panels))for(const i of l.tabs)i.type==="file"&&typeof i.filePath=="string"&&i.filePath.length>0&&r.add(L(i.filePath,typeof i.data?.gitRootId=="string"?i.data.gitRootId:void 0));const d=[];for(const l of c.files.ids)r.has(l)||d.push(l);return d.length===0?p:(d.sort((l,i)=>l.localeCompare(i)),d)}),Z=n.createSelector((e,t)=>{const a=e.panelLayout.byWorkspaceId[t]??o;return b(a.root)});function I(e){return b(e.root).flatMap(t=>{const a=e.panels[t];return a?[{panelId:t,panes:a.tabs,activePaneId:a.activeTabId,attentionPaneIds:a.attentionTabIds??[]}]:[]})}const _=n.createSelector((e,t)=>I(e.panelLayout.byWorkspaceId[t]??o));n.createSelector((e,t,a)=>I(e.panelLayout.byWorkspaceId[t]??o).find(s=>s.panelId===a));function T(e){return b(e.root).flatMap(t=>{const a=e.panels[t];if(!a)return[];const c=a.tabs.find(r=>r.id===a.activeTabId)??a.tabs[0];return[{id:t,title:c?.title??"",type:c?.type}]})}n.createSelector((e,t)=>T(e.panelLayout.byWorkspaceId[t]??o));const g=n.createSelector((e,t)=>(e.panelLayout.byWorkspaceId[t]??o).recentlyClosed),w=n.createSelector((e,t)=>{const a=e.panelLayout.byWorkspaceId[t]??o;return u(a.recentlyClosedColumns??S("historyId")).find(s=>v(a,s))??null}),ee=n.createSelector((e,t)=>{const a=g.select(e,t)[0]??null,s=w.select(e,t);return s&&(!a||s.closedAt>=a.closedAt)?{kind:"column",closedAt:s.closedAt}:a?{kind:"tab",closedAt:a.closedAt}:null}),te=n.createSelector(e=>Object.entries(e.panelLayout.byWorkspaceId).flatMap(([t,a])=>a.tabWindowFocusRequest?[`${t}\0${a.tabWindowFocusRequest.seq}\0${a.tabWindowFocusRequest.tabWindowId}`]:[]).join(`
2
2
  `)),ae=n.createSelector(e=>Object.entries(e.panelLayout.byWorkspaceId).flatMap(([t,a])=>a.restoreStatus==="restored"?u(a.hiddenTabs??o.hiddenTabs).filter(s=>s.tabWindowId).map(s=>`${t}\0${s.id}`):[]).join(`
3
3
  `));export{g as A,z as B,ae as C,te as D,C as E,N as a,J as b,m as c,K as d,H as e,L as f,R as g,X as h,$ as i,x as j,V as k,ee as l,D as m,q as n,Y as o,G as p,Q as q,U as r,B as s,_ as t,Z as u,F as v,j as w,E as x,M as y,A as z};
@@ -1,4 +1,4 @@
1
- var $c=Object.defineProperty;var td=Object.getPrototypeOf;var ed=Reflect.get;var Au=n=>{throw TypeError(n)};var nd=(n,t,e)=>t in n?$c(n,t,{enumerable:!0,configurable:!0,writable:!0,value:e}):n[t]=e;var C=(n,t,e)=>nd(n,typeof t!="symbol"?t+"":t,e),Xs=(n,t,e)=>t.has(n)||Au("Cannot "+e);var o=(n,t,e)=>(Xs(n,t,"read from private field"),e?e.call(n):t.get(n)),p=(n,t,e)=>t.has(n)?Au("Cannot add the same private member more than once"):t instanceof WeakSet?t.add(n):t.set(n,e),S=(n,t,e,r)=>(Xs(n,t,"write to private field"),r?r.call(n,e):t.set(n,e),e),E=(n,t,e)=>(Xs(n,t,"access private method"),e);var Pu=(n,t,e,r)=>({set _(i){S(n,t,i,e)},get _(){return o(n,t,r)}}),Eu=(n,t,e)=>ed(td(n),e,t);import{t as ct,bo as l,bw as dt,b as ht,br as Nr,bp as Rn}from"./BEwMx-58.js";import{A as rd,bV as Y,c8 as Iu,ao as Cn,bY as Un,bU as id,b5 as Oo,aD as f,bH as P,aV as Cr,c9 as M,br as Ln,aa as pl,bi as mt,aM as od,aG as na,bI as sd,cb as ad,ca as xt,c5 as _r,c0 as ud,bs as ft,a7 as tt,ay as J,bf as at,W as R,bn as gt,aA as c,aF as ld,bb as cd,c3 as dd,at as ml,bk as hd,bS as Re,aB as At,bo as Ha,a5 as St,bA as wt,b$ as vl,b_ as Wn,bO as ra,bl as fd,be as gd}from"./3SdAC2_C.js";import{i as bt}from"./Gpf-ce3t.js";import{s as ot}from"./LNBns0B-.js";import{d as Gs,b as Se,e as mn,c as Wo,f as Dr}from"./CyczJyMt.js";import{b as bl}from"./Dn334wJv.js";import{g as pd,I as md}from"./BZKoidWB.js";import{J as vd,f as bd,o as yd,g as wd,n as xd}from"./Bl3Cuor0.js";import{c as Or}from"./BIGXb0qV.js";import{k as Cd}from"./BeKKPzED.js";function Od(){return Symbol(rd)}var ve,re,be,Qo,de,Pr,Po;const su=class su extends Map{constructor(e){super();p(this,de);p(this,ve,new Map);p(this,re,Y(0));p(this,be,Y(0));p(this,Qo,Iu||-1);if(Cn&&(e=new Map(e),Un(o(this,re),"SvelteMap version"),Un(o(this,be),"SvelteMap.size")),e){for(var[r,i]of e)super.set(r,i);o(this,be).v=super.size}}has(e){var r=o(this,ve),i=r.get(e);if(i===void 0)if(super.has(e))i=E(this,de,Pr).call(this,0),Cn&&Un(i,`SvelteMap get(${Oo(e)})`),r.set(e,i);else return f(o(this,re)),!1;return f(i),!0}forEach(e,r){E(this,de,Po).call(this),super.forEach(e,r)}get(e){var r=o(this,ve),i=r.get(e);if(i===void 0)if(super.has(e))i=E(this,de,Pr).call(this,0),Cn&&Un(i,`SvelteMap get(${Oo(e)})`),r.set(e,i);else{f(o(this,re));return}return f(i),super.get(e)}getOrInsert(e,r){return super.has(e)||this.set(e,r),this.get(e)}getOrInsertComputed(e,r){return super.has(e)||this.set(e,r(e)),this.get(e)}set(e,r){var i=o(this,ve),s=i.get(e),a=super.get(e),u=super.set(e,r),d=o(this,re);if(s===void 0)s=E(this,de,Pr).call(this,0),Cn&&Un(s,`SvelteMap get(${Oo(e)})`),i.set(e,s),P(o(this,be),super.size),Cr(d);else if(a!==r){Cr(s);var g=d.reactions===null?null:new Set(d.reactions),m=g===null||!s.reactions?.every(h=>g.has(h));m&&Cr(d)}return u}delete(e){var r=o(this,ve),i=r.get(e),s=super.delete(e);return i!==void 0&&(r.delete(e),P(i,-1)),s&&(P(o(this,be),super.size),Cr(o(this,re))),s}clear(){if(super.size!==0){super.clear();var e=o(this,ve);P(o(this,be),0);for(var r of e.values())P(r,-1);Cr(o(this,re)),e.clear()}}keys(){return f(o(this,re)),super.keys()}values(){return E(this,de,Po).call(this),super.values()}entries(){return E(this,de,Po).call(this),super.entries()}[Symbol.iterator](){return this.entries()}get size(){return f(o(this,be)),super.size}};ve=new WeakMap,re=new WeakMap,be=new WeakMap,Qo=new WeakMap,de=new WeakSet,Pr=function(e){return Iu===o(this,Qo)?Y(e):id(e)},Po=function(){f(o(this,re));var e=o(this,ve);if(o(this,be).v!==e.size){for(var r of Eu(su.prototype,this,"keys").call(this))if(!e.has(r)){var i=E(this,de,Pr).call(this,0);Cn&&Un(i,`SvelteMap get(${Oo(r)})`),e.set(r,i)}}for([,i]of o(this,ve))f(i)};let ia=su;function Td(n){return typeof n=="function"}function vo(n){return n!==null&&typeof n=="object"}const Sd=["string","number","bigint","boolean"];function oa(n){return n==null||Sd.includes(typeof n)?!0:Array.isArray(n)?n.every(t=>oa(t)):typeof n=="object"?Object.getPrototypeOf(n)===Object.prototype:!1}const pr=Symbol("box"),_s=Symbol("is-writable");function W(n,t){const e=M(n);return t?{[pr]:!0,[_s]:!0,get current(){return f(e)},set current(r){t(r)}}:{[pr]:!0,get current(){return n()}}}function bo(n){return vo(n)&&pr in n}function Ra(n){return bo(n)&&_s in n}function yl(n){return bo(n)?n:Td(n)?W(n):Zt(n)}function Ad(n){return Object.entries(n).reduce((t,[e,r])=>bo(r)?(Ra(r)?Object.defineProperty(t,e,{get(){return r.current},set(i){r.current=i}}):Object.defineProperty(t,e,{get(){return r.current}}),t):Object.assign(t,{[e]:r}),{})}function Pd(n){return Ra(n)?{[pr]:!0,get current(){return n.current}}:n}function Zt(n){let t=Y(Ln(n));return{[pr]:!0,[_s]:!0,get current(){return f(t)},set current(e){P(t,e,!0)}}}function Vn(n){let t=Y(Ln(n));return{[pr]:!0,[_s]:!0,get current(){return f(t)},set current(e){P(t,e,!0)}}}Vn.from=yl;Vn.with=W;Vn.flatten=Ad;Vn.readonly=Pd;Vn.isBox=bo;Vn.isWritableBox=Ra;function wl(...n){return function(t){for(const e of n)if(e){if(t.defaultPrevented)return;typeof e=="function"?e.call(this,t):e.current?.call(this,t)}}}var Fu=/\/\*[^*]*\*+([^/*][^*]*\*+)*\//g,Ed=/\n/g,Id=/^\s*/,Fd=/^(\*?[-#/*\\\w]+(\[[0-9a-z_-]+\])?)\s*/,Dd=/^:\s*/,Md=/^((?:'(?:\\'|.)*?'|"(?:\\"|.)*?"|\([^)]*?\)|[^};])+)/,kd=/^[;\s]*/,Nd=/^\s+|\s+$/g,_d=`
1
+ var $c=Object.defineProperty;var td=Object.getPrototypeOf;var ed=Reflect.get;var Au=n=>{throw TypeError(n)};var nd=(n,t,e)=>t in n?$c(n,t,{enumerable:!0,configurable:!0,writable:!0,value:e}):n[t]=e;var C=(n,t,e)=>nd(n,typeof t!="symbol"?t+"":t,e),Xs=(n,t,e)=>t.has(n)||Au("Cannot "+e);var o=(n,t,e)=>(Xs(n,t,"read from private field"),e?e.call(n):t.get(n)),p=(n,t,e)=>t.has(n)?Au("Cannot add the same private member more than once"):t instanceof WeakSet?t.add(n):t.set(n,e),S=(n,t,e,r)=>(Xs(n,t,"write to private field"),r?r.call(n,e):t.set(n,e),e),E=(n,t,e)=>(Xs(n,t,"access private method"),e);var Pu=(n,t,e,r)=>({set _(i){S(n,t,i,e)},get _(){return o(n,t,r)}}),Eu=(n,t,e)=>ed(td(n),e,t);import{t as ct,bo as l,bw as dt,b as ht,br as Nr,bp as Rn}from"./C0QTy0Sy.js";import{A as rd,bV as Y,c8 as Iu,ao as Cn,bY as Un,bU as id,b5 as Oo,aD as f,bH as P,aV as Cr,c9 as M,br as Ln,aa as pl,bi as mt,aM as od,aG as na,bI as sd,cb as ad,ca as xt,c5 as _r,c0 as ud,bs as ft,a7 as tt,ay as J,bf as at,W as R,bn as gt,aA as c,aF as ld,bb as cd,c3 as dd,at as ml,bk as hd,bS as Re,aB as At,bo as Ha,a5 as St,bA as wt,b$ as vl,b_ as Wn,bO as ra,bl as fd,be as gd}from"./3SdAC2_C.js";import{i as bt}from"./bhKPSdq4.js";import{t as ot}from"./CrD0jtXE.js";import{d as Gs,b as Se,e as mn,c as Wo,f as Dr}from"./7UPrdiE9.js";import{b as bl}from"./Dn334wJv.js";import{g as pd,I as md}from"./B6S6VNu7.js";import{J as vd,f as bd,o as yd,g as wd,n as xd}from"./DCRuihKm.js";import{c as Or}from"./CUkDMZwP.js";import{k as Cd}from"./-K3ARgq0.js";function Od(){return Symbol(rd)}var ve,re,be,Qo,de,Pr,Po;const su=class su extends Map{constructor(e){super();p(this,de);p(this,ve,new Map);p(this,re,Y(0));p(this,be,Y(0));p(this,Qo,Iu||-1);if(Cn&&(e=new Map(e),Un(o(this,re),"SvelteMap version"),Un(o(this,be),"SvelteMap.size")),e){for(var[r,i]of e)super.set(r,i);o(this,be).v=super.size}}has(e){var r=o(this,ve),i=r.get(e);if(i===void 0)if(super.has(e))i=E(this,de,Pr).call(this,0),Cn&&Un(i,`SvelteMap get(${Oo(e)})`),r.set(e,i);else return f(o(this,re)),!1;return f(i),!0}forEach(e,r){E(this,de,Po).call(this),super.forEach(e,r)}get(e){var r=o(this,ve),i=r.get(e);if(i===void 0)if(super.has(e))i=E(this,de,Pr).call(this,0),Cn&&Un(i,`SvelteMap get(${Oo(e)})`),r.set(e,i);else{f(o(this,re));return}return f(i),super.get(e)}getOrInsert(e,r){return super.has(e)||this.set(e,r),this.get(e)}getOrInsertComputed(e,r){return super.has(e)||this.set(e,r(e)),this.get(e)}set(e,r){var i=o(this,ve),s=i.get(e),a=super.get(e),u=super.set(e,r),d=o(this,re);if(s===void 0)s=E(this,de,Pr).call(this,0),Cn&&Un(s,`SvelteMap get(${Oo(e)})`),i.set(e,s),P(o(this,be),super.size),Cr(d);else if(a!==r){Cr(s);var g=d.reactions===null?null:new Set(d.reactions),m=g===null||!s.reactions?.every(h=>g.has(h));m&&Cr(d)}return u}delete(e){var r=o(this,ve),i=r.get(e),s=super.delete(e);return i!==void 0&&(r.delete(e),P(i,-1)),s&&(P(o(this,be),super.size),Cr(o(this,re))),s}clear(){if(super.size!==0){super.clear();var e=o(this,ve);P(o(this,be),0);for(var r of e.values())P(r,-1);Cr(o(this,re)),e.clear()}}keys(){return f(o(this,re)),super.keys()}values(){return E(this,de,Po).call(this),super.values()}entries(){return E(this,de,Po).call(this),super.entries()}[Symbol.iterator](){return this.entries()}get size(){return f(o(this,be)),super.size}};ve=new WeakMap,re=new WeakMap,be=new WeakMap,Qo=new WeakMap,de=new WeakSet,Pr=function(e){return Iu===o(this,Qo)?Y(e):id(e)},Po=function(){f(o(this,re));var e=o(this,ve);if(o(this,be).v!==e.size){for(var r of Eu(su.prototype,this,"keys").call(this))if(!e.has(r)){var i=E(this,de,Pr).call(this,0);Cn&&Un(i,`SvelteMap get(${Oo(r)})`),e.set(r,i)}}for([,i]of o(this,ve))f(i)};let ia=su;function Td(n){return typeof n=="function"}function vo(n){return n!==null&&typeof n=="object"}const Sd=["string","number","bigint","boolean"];function oa(n){return n==null||Sd.includes(typeof n)?!0:Array.isArray(n)?n.every(t=>oa(t)):typeof n=="object"?Object.getPrototypeOf(n)===Object.prototype:!1}const pr=Symbol("box"),_s=Symbol("is-writable");function W(n,t){const e=M(n);return t?{[pr]:!0,[_s]:!0,get current(){return f(e)},set current(r){t(r)}}:{[pr]:!0,get current(){return n()}}}function bo(n){return vo(n)&&pr in n}function Ra(n){return bo(n)&&_s in n}function yl(n){return bo(n)?n:Td(n)?W(n):Zt(n)}function Ad(n){return Object.entries(n).reduce((t,[e,r])=>bo(r)?(Ra(r)?Object.defineProperty(t,e,{get(){return r.current},set(i){r.current=i}}):Object.defineProperty(t,e,{get(){return r.current}}),t):Object.assign(t,{[e]:r}),{})}function Pd(n){return Ra(n)?{[pr]:!0,get current(){return n.current}}:n}function Zt(n){let t=Y(Ln(n));return{[pr]:!0,[_s]:!0,get current(){return f(t)},set current(e){P(t,e,!0)}}}function Vn(n){let t=Y(Ln(n));return{[pr]:!0,[_s]:!0,get current(){return f(t)},set current(e){P(t,e,!0)}}}Vn.from=yl;Vn.with=W;Vn.flatten=Ad;Vn.readonly=Pd;Vn.isBox=bo;Vn.isWritableBox=Ra;function wl(...n){return function(t){for(const e of n)if(e){if(t.defaultPrevented)return;typeof e=="function"?e.call(this,t):e.current?.call(this,t)}}}var Fu=/\/\*[^*]*\*+([^/*][^*]*\*+)*\//g,Ed=/\n/g,Id=/^\s*/,Fd=/^(\*?[-#/*\\\w]+(\[[0-9a-z_-]+\])?)\s*/,Dd=/^:\s*/,Md=/^((?:'(?:\\'|.)*?'|"(?:\\"|.)*?"|\([^)]*?\)|[^};])+)/,kd=/^[;\s]*/,Nd=/^\s+|\s+$/g,_d=`
2
2
  `,Du="/",Mu="*",On="",Bd="comment",Ld="declaration";function Wd(n,t){if(typeof n!="string")throw new TypeError("First argument must be a string");if(!n)return[];t=t||{};var e=1,r=1;function i(x){var b=x.match(Ed);b&&(e+=b.length);var A=x.lastIndexOf(_d);r=~A?x.length-A:r+x.length}function s(){var x={line:e,column:r};return function(b){return b.position=new a(x),g(),b}}function a(x){this.start=x,this.end={line:e,column:r},this.source=t.source}a.prototype.content=n;function u(x){var b=new Error(t.source+":"+e+":"+r+": "+x);if(b.reason=x,b.filename=t.source,b.line=e,b.column=r,b.source=n,!t.silent)throw b}function d(x){var b=x.exec(n);if(b){var A=b[0];return i(A),n=n.slice(A.length),b}}function g(){d(Id)}function m(x){var b;for(x=x||[];b=h();)b!==!1&&x.push(b);return x}function h(){var x=s();if(!(Du!=n.charAt(0)||Mu!=n.charAt(1))){for(var b=2;On!=n.charAt(b)&&(Mu!=n.charAt(b)||Du!=n.charAt(b+1));)++b;if(b+=2,On===n.charAt(b-1))return u("End of comment missing");var A=n.slice(2,b-2);return r+=2,i(A),n=n.slice(b),r+=2,x({type:Bd,comment:A})}}function v(){var x=s(),b=d(Fd);if(b){if(h(),!d(Dd))return u("property missing ':'");var A=d(Md),D=x({type:Ld,property:ku(b[0].replace(Fu,On)),value:A?ku(A[0].replace(Fu,On)):On});return d(kd),D}}function y(){var x=[];m(x);for(var b;b=v();)b!==!1&&(x.push(b),m(x));return x}return g(),y()}function ku(n){return n?n.replace(Nd,On):On}function Kd(n,t){let e=null;if(!n||typeof n!="string")return e;const r=Wd(n),i=typeof t=="function";return r.forEach(s=>{if(s.type!=="declaration")return;const{property:a,value:u}=s;i?t(a,u,s):u&&(e=e||{},e[a]=u)}),e}const Hd=/\d/,Rd=["-","_","/","."];function Vd(n=""){if(!Hd.test(n))return n!==n.toLowerCase()}function zd(n){const t=[];let e="",r,i;for(const s of n){const a=Rd.includes(s);if(a===!0){t.push(e),e="",r=void 0;continue}const u=Vd(s);if(i===!1){if(r===!1&&u===!0){t.push(e),e=s,r=u;continue}if(r===!0&&u===!1&&e.length>1){const d=e.at(-1);t.push(e.slice(0,Math.max(0,e.length-1))),e=d+s,r=u;continue}}e+=s,r=u,i=a}return t.push(e),t}function xl(n){return n?zd(n).map(t=>jd(t)).join(""):""}function Ud(n){return Yd(xl(n||""))}function jd(n){return n?n[0].toUpperCase()+n.slice(1):""}function Yd(n){return n?n[0].toLowerCase()+n.slice(1):""}function Er(n){if(!n)return{};const t={};function e(r,i){if(r.startsWith("-moz-")||r.startsWith("-webkit-")||r.startsWith("-ms-")||r.startsWith("-o-")){t[xl(r)]=i;return}if(r.startsWith("--")){t[r]=i;return}t[Ud(r)]=i}return Kd(n,e),t}function Xn(...n){return(...t)=>{for(const e of n)typeof e=="function"&&e(...t)}}function Xd(n,t){const e=RegExp(n,"g");return r=>{if(typeof r!="string")throw new TypeError(`expected an argument of type string, but got ${typeof r}`);return r.match(e)?r.replace(e,t):r}}const Gd=Xd(/[A-Z]/,n=>`-${n.toLowerCase()}`);function qd(n){if(!n||typeof n!="object"||Array.isArray(n))throw new TypeError(`expected an argument of type object, but got ${typeof n}`);return Object.keys(n).map(t=>`${Gd(t)}: ${n[t]};`).join(`
3
3
  `)}function Cl(n={}){return qd(n).replace(`
4
4
  `," ")}const Zd=["onabort","onanimationcancel","onanimationend","onanimationiteration","onanimationstart","onauxclick","onbeforeinput","onbeforetoggle","onblur","oncancel","oncanplay","oncanplaythrough","onchange","onclick","onclose","oncompositionend","oncompositionstart","oncompositionupdate","oncontextlost","oncontextmenu","oncontextrestored","oncopy","oncuechange","oncut","ondblclick","ondrag","ondragend","ondragenter","ondragleave","ondragover","ondragstart","ondrop","ondurationchange","onemptied","onended","onerror","onfocus","onfocusin","onfocusout","onformdata","ongotpointercapture","oninput","oninvalid","onkeydown","onkeypress","onkeyup","onload","onloadeddata","onloadedmetadata","onloadstart","onlostpointercapture","onmousedown","onmouseenter","onmouseleave","onmousemove","onmouseout","onmouseover","onmouseup","onpaste","onpause","onplay","onplaying","onpointercancel","onpointerdown","onpointerenter","onpointerleave","onpointermove","onpointerout","onpointerover","onpointerup","onprogress","onratechange","onreset","onresize","onscroll","onscrollend","onsecuritypolicyviolation","onseeked","onseeking","onselect","onselectionchange","onselectstart","onslotchange","onstalled","onsubmit","onsuspend","ontimeupdate","ontoggle","ontouchcancel","ontouchend","ontouchmove","ontouchstart","ontransitioncancel","ontransitionend","ontransitionrun","ontransitionstart","onvolumechange","onwaiting","onwebkitanimationend","onwebkitanimationiteration","onwebkitanimationstart","onwebkittransitionend","onwheel"],Jd=new Set(Zd);function Qd(n){return Jd.has(n)}function Te(...n){const t={...n[0]};for(let e=1;e<n.length;e++){const r=n[e];if(r){for(const i of Object.keys(r)){const s=t[i],a=r[i],u=typeof s=="function",d=typeof a=="function";if(u&&Qd(i)){const g=s,m=a;t[i]=wl(g,m)}else if(u&&d)t[i]=Xn(s,a);else if(i==="class"){const g=oa(s),m=oa(a);g&&m?t[i]=Gs(s,a):g?t[i]=Gs(s):m&&(t[i]=Gs(a))}else if(i==="style"){const g=typeof s=="object",m=typeof a=="object",h=typeof s=="string",v=typeof a=="string";if(g&&m)t[i]={...s,...a};else if(g&&v){const y=Er(a);t[i]={...s,...y}}else if(h&&m){const y=Er(s);t[i]={...y,...a}}else if(h&&v){const y=Er(s),x=Er(a);t[i]={...y,...x}}else g?t[i]=s:m?t[i]=a:h?t[i]=s:v&&(t[i]=a)}else t[i]=a!==void 0?a:s}for(const i of Object.getOwnPropertySymbols(r)){const s=t[i],a=r[i];t[i]=a!==void 0?a:s}}}return typeof t.style=="object"&&(t.style=Cl(t.style).replaceAll(`
@@ -1,2 +1,2 @@
1
1
  const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["/app/immutable/chunks/DICr2Lvd.js","/app/immutable/chunks/lwn02icp.js"])))=>i.map(i=>d[i]);
2
- import{_ as r}from"./BEwMx-58.js";import{bn as L}from"./BEGsYnq4.js";function u(t){const m=[],p=new Set;for(const e of D(t.themes)){const i=s(e)?e.getThemes():[e];for(const o of i){if(p.has(o.name))throw new Error(`Theme collection already contains theme "${o.name}"`);p.add(o.name),m.push(o)}}const _=Object.freeze([...m]),l=Object.freeze(_.filter(e=>e.colorScheme==="light")),d=Object.freeze(_.filter(e=>e.colorScheme==="dark")),n=new Map(_.map(e=>[e.name,e])),I=Object.freeze(_.map(e=>e.name)),P=Object.freeze(l.map(e=>e.name)),R=Object.freeze(d.map(e=>e.name));function E(e){if(e==null)return _;const{colorScheme:i,collection:o}=e;return o==null?i==="light"?l:i==="dark"?d:_:_.filter(a=>a.collection!==o?!1:i==null||a.colorScheme===i)}return{getTheme(e){return n.get(e)},getThemes(e){return E(e)},getThemeNames(e){return e?.collection==null?e?.colorScheme==="light"?P:e?.colorScheme==="dark"?R:I:E(e).map(i=>i.name)},hasTheme(e){return n.has(e)},orderBy(e){return u({themes:_.map((i,o)=>({descriptor:i,index:o})).sort((i,o)=>{const a=e(i.descriptor,o.descriptor);return a!==0?a:i.index-o.index}).map(i=>i.descriptor)})},pick(e){const i=[],o=new Set;for(const a of e){if(o.has(a))throw new Error(`Theme collection pick already includes theme "${a}"`);o.add(a);const h=n.get(a);if(h==null)throw new Error(`Theme collection does not contain theme "${a}"`);i.push(h)}return u({themes:i})},registerInto(e){for(const i of _)e.registerThemeIfAbsent(i.name,i.load)}}}function D(t){return O(t)?[t]:t}function O(t){return s(t)||k(t)}function k(t){return typeof t.name=="string"&&typeof t.load=="function"}function s(t){return typeof t.getThemes=="function"}function T({name:t,load:m,colorScheme:p,collection:_,displayName:l}){return{name:t,colorScheme:p,collection:_,displayName:l,load:A(m)}}function A(t){return async()=>{const[m,{normalizeTheme:p}]=await Promise.all([t(),r(()=>import("./DICr2Lvd.js").then(_=>_.c),__vite__mapDeps([0,1]),import.meta.url)]);return p(L(m))}}const f="pierre",V=["pierre-dark","pierre-dark-soft","pierre-dark-vibrant","pierre-dark-protanopia-deuteranopia","pierre-dark-tritanopia"],g=["pierre-light","pierre-light-soft","pierre-light-vibrant","pierre-light-protanopia-deuteranopia","pierre-light-tritanopia"],b=[...g,...V],S=new Set(g);function w(t){return S.has(t)?"light":"dark"}const y={"pierre-dark":"Pierre Dark","pierre-dark-soft":"Pierre Dark Soft","pierre-dark-vibrant":"Pierre Dark Vibrant","pierre-dark-protanopia-deuteranopia":"Pierre Dark Protanopia & Deuteranopia","pierre-dark-tritanopia":"Pierre Dark Tritanopia","pierre-light":"Pierre Light","pierre-light-soft":"Pierre Light Soft","pierre-light-vibrant":"Pierre Light Vibrant","pierre-light-protanopia-deuteranopia":"Pierre Light Protanopia & Deuteranopia","pierre-light-tritanopia":"Pierre Light Tritanopia"},z={"pierre-dark":()=>r(()=>import("./CyvmCCZW.js"),[],import.meta.url),"pierre-dark-soft":()=>r(()=>import("./BHGpRqa4.js"),[],import.meta.url),"pierre-dark-vibrant":()=>r(()=>import("./BWBVywrn.js"),[],import.meta.url),"pierre-dark-protanopia-deuteranopia":()=>r(()=>import("./Rgc0TwpF.js"),[],import.meta.url),"pierre-dark-tritanopia":()=>r(()=>import("./Beq2gCRQ.js"),[],import.meta.url),"pierre-light":()=>r(()=>import("./480U9XYS.js"),[],import.meta.url),"pierre-light-soft":()=>r(()=>import("./CVdyfjmI.js"),[],import.meta.url),"pierre-light-vibrant":()=>r(()=>import("./DdTDNdfJ.js"),[],import.meta.url),"pierre-light-protanopia-deuteranopia":()=>r(()=>import("./CaVOBURG.js"),[],import.meta.url),"pierre-light-tritanopia":()=>r(()=>import("./B4_gpKOM.js"),[],import.meta.url)};function H(t){return T({name:t,collection:f,colorScheme:w(t),displayName:y[t],load:z[t]})}const x=u({themes:b.map(t=>H(t))}),M="shiki",v=["ayu-light","catppuccin-latte","everforest-light","github-light","github-light-default","github-light-high-contrast","gruvbox-light-hard","gruvbox-light-medium","gruvbox-light-soft","horizon-bright","kanagawa-lotus","light-plus","material-theme-lighter","min-light","night-owl-light","one-light","rose-pine-dawn","slack-ochin","snazzy-light","solarized-light","vitesse-light"],N=["andromeeda","aurora-x","ayu-dark","ayu-mirage","catppuccin-frappe","catppuccin-macchiato","catppuccin-mocha","dark-plus","dracula","dracula-soft","everforest-dark","github-dark","github-dark-default","github-dark-dimmed","github-dark-high-contrast","gruvbox-dark-hard","gruvbox-dark-medium","gruvbox-dark-soft","horizon","houston","kanagawa-dragon","kanagawa-wave","laserwave","material-theme","material-theme-darker","material-theme-ocean","material-theme-palenight","min-dark","monokai","night-owl","nord","one-dark-pro","plastic","poimandres","red","rose-pine","rose-pine-moon","slack-dark","solarized-dark","synthwave-84","tokyo-night","vesper","vitesse-black","vitesse-dark"],C=new Set(v);function K(t){return C.has(t)?"light":"dark"}const j={andromeeda:()=>r(()=>import("./C4gqWexZ.js"),[],import.meta.url),"aurora-x":()=>r(()=>import("./D-2ljcwZ.js"),[],import.meta.url),"ayu-dark":()=>r(()=>import("./DYE7WIF3.js"),[],import.meta.url),"ayu-light":()=>r(()=>import("./BA47KaF1.js"),[],import.meta.url),"ayu-mirage":()=>r(()=>import("./32ctXXKs.js"),[],import.meta.url),"catppuccin-frappe":()=>r(()=>import("./CZL1YF0i.js"),[],import.meta.url),"catppuccin-latte":()=>r(()=>import("./DH-8KZSZ.js"),[],import.meta.url),"catppuccin-macchiato":()=>r(()=>import("./B7yYVSCf.js"),[],import.meta.url),"catppuccin-mocha":()=>r(()=>import("./Ct7hS0mc.js"),[],import.meta.url),"dark-plus":()=>r(()=>import("./C3mMm8J8.js"),[],import.meta.url),dracula:()=>r(()=>import("./BzJJZx-M.js"),[],import.meta.url),"dracula-soft":()=>r(()=>import("./BXkSAIEj.js"),[],import.meta.url),"everforest-dark":()=>r(()=>import("./BgDCqdQA.js"),[],import.meta.url),"everforest-light":()=>r(()=>import("./C8M2exoo.js"),[],import.meta.url),"github-dark":()=>r(()=>import("./DHJKELXO.js"),[],import.meta.url),"github-dark-default":()=>r(()=>import("./Cuk6v7N8.js"),[],import.meta.url),"github-dark-dimmed":()=>r(()=>import("./DH5Ifo-i.js"),[],import.meta.url),"github-dark-high-contrast":()=>r(()=>import("./E3gJ1_iC.js"),[],import.meta.url),"github-light":()=>r(()=>import("./DAi9KRSo.js"),[],import.meta.url),"github-light-default":()=>r(()=>import("./D7oLnXFd.js"),[],import.meta.url),"github-light-high-contrast":()=>r(()=>import("./BfjtVDDH.js"),[],import.meta.url),"gruvbox-dark-hard":()=>r(()=>import("./CFHQjOhq.js"),[],import.meta.url),"gruvbox-dark-medium":()=>r(()=>import("./GsRaNv29.js"),[],import.meta.url),"gruvbox-dark-soft":()=>r(()=>import("./CVdnzihN.js"),[],import.meta.url),"gruvbox-light-hard":()=>r(()=>import("./CH1njM8p.js"),[],import.meta.url),"gruvbox-light-medium":()=>r(()=>import("./DRw_LuNl.js"),[],import.meta.url),"gruvbox-light-soft":()=>r(()=>import("./hJgmCMqR.js"),[],import.meta.url),horizon:()=>r(()=>import("./BUw7H-hv.js"),[],import.meta.url),"horizon-bright":()=>r(()=>import("./CUuTKBJd.js"),[],import.meta.url),houston:()=>r(()=>import("./DnULxvSX.js"),[],import.meta.url),"kanagawa-dragon":()=>r(()=>import("./BuwD2xS4.js"),[],import.meta.url),"kanagawa-lotus":()=>r(()=>import("./C3DzagqV.js"),[],import.meta.url),"kanagawa-wave":()=>r(()=>import("./DFGoQZhC.js"),[],import.meta.url),laserwave:()=>r(()=>import("./DUszq2jm.js"),[],import.meta.url),"light-plus":()=>r(()=>import("./B7mTdjB0.js"),[],import.meta.url),"material-theme":()=>r(()=>import("./D5KoaKCx.js"),[],import.meta.url),"material-theme-darker":()=>r(()=>import("./BfHTSMKl.js"),[],import.meta.url),"material-theme-lighter":()=>r(()=>import("./B0m2ddpp.js"),[],import.meta.url),"material-theme-ocean":()=>r(()=>import("./CyktbL80.js"),[],import.meta.url),"material-theme-palenight":()=>r(()=>import("./Csfq5Kiy.js"),[],import.meta.url),"min-dark":()=>r(()=>import("./CafNBF8u.js"),[],import.meta.url),"min-light":()=>r(()=>import("./CTRr51gU.js"),[],import.meta.url),monokai:()=>r(()=>import("./CR4piiQ-.js"),[],import.meta.url),"night-owl":()=>r(()=>import("./C39BiMTA.js"),[],import.meta.url),"night-owl-light":()=>r(()=>import("./CMTm3GFP.js"),[],import.meta.url),nord:()=>r(()=>import("./Ddv68eIx.js"),[],import.meta.url),"one-dark-pro":()=>r(()=>import("./CxGP3dtY.js"),[],import.meta.url),"one-light":()=>r(()=>import("./C3Wv6jpd.js"),[],import.meta.url),plastic:()=>r(()=>import("./3e1v2bzS.js"),[],import.meta.url),poimandres:()=>r(()=>import("./CS3Unz2-.js"),[],import.meta.url),red:()=>r(()=>import("./DMbB5_pp.js"),[],import.meta.url),"rose-pine":()=>r(()=>import("./5qJOZa0Y.js"),[],import.meta.url),"rose-pine-dawn":()=>r(()=>import("./zx0QlTCp.js"),[],import.meta.url),"rose-pine-moon":()=>r(()=>import("./C9pEdX9L.js"),[],import.meta.url),"slack-dark":()=>r(()=>import("./BthQWCQV.js"),[],import.meta.url),"slack-ochin":()=>r(()=>import("./DqwNpetd.js"),[],import.meta.url),"snazzy-light":()=>r(()=>import("./Bw305WKR.js"),[],import.meta.url),"solarized-dark":()=>r(()=>import("./UcubFVte.js"),[],import.meta.url),"solarized-light":()=>r(()=>import("./DCG28T6R.js"),[],import.meta.url),"synthwave-84":()=>r(()=>import("./CbfX1IO0.js"),[],import.meta.url),"tokyo-night":()=>r(()=>import("./hegEt444.js"),[],import.meta.url),vesper:()=>r(()=>import("./DRje8inN.js"),[],import.meta.url),"vitesse-black":()=>r(()=>import("./Bkuqu6BP.js"),[],import.meta.url),"vitesse-dark":()=>r(()=>import("./D0r3Knsf.js"),[],import.meta.url),"vitesse-light":()=>r(()=>import("./CVO1_9PV.js"),[],import.meta.url)};function c(t){return T({name:t,collection:M,colorScheme:K(t),load:j[t]})}const G=Object.freeze([...v.map(t=>c(t)),...N.map(t=>c(t))]),$=u({themes:G}),q=u({themes:[x,$]});export{T as createTheme,x as pierreThemes,$ as shikiThemes,q as themes};
2
+ import{_ as r}from"./C0QTy0Sy.js";import{bn as L}from"./Bz7R1ahj.js";function u(t){const m=[],p=new Set;for(const e of D(t.themes)){const i=s(e)?e.getThemes():[e];for(const o of i){if(p.has(o.name))throw new Error(`Theme collection already contains theme "${o.name}"`);p.add(o.name),m.push(o)}}const _=Object.freeze([...m]),l=Object.freeze(_.filter(e=>e.colorScheme==="light")),d=Object.freeze(_.filter(e=>e.colorScheme==="dark")),n=new Map(_.map(e=>[e.name,e])),I=Object.freeze(_.map(e=>e.name)),P=Object.freeze(l.map(e=>e.name)),R=Object.freeze(d.map(e=>e.name));function E(e){if(e==null)return _;const{colorScheme:i,collection:o}=e;return o==null?i==="light"?l:i==="dark"?d:_:_.filter(a=>a.collection!==o?!1:i==null||a.colorScheme===i)}return{getTheme(e){return n.get(e)},getThemes(e){return E(e)},getThemeNames(e){return e?.collection==null?e?.colorScheme==="light"?P:e?.colorScheme==="dark"?R:I:E(e).map(i=>i.name)},hasTheme(e){return n.has(e)},orderBy(e){return u({themes:_.map((i,o)=>({descriptor:i,index:o})).sort((i,o)=>{const a=e(i.descriptor,o.descriptor);return a!==0?a:i.index-o.index}).map(i=>i.descriptor)})},pick(e){const i=[],o=new Set;for(const a of e){if(o.has(a))throw new Error(`Theme collection pick already includes theme "${a}"`);o.add(a);const h=n.get(a);if(h==null)throw new Error(`Theme collection does not contain theme "${a}"`);i.push(h)}return u({themes:i})},registerInto(e){for(const i of _)e.registerThemeIfAbsent(i.name,i.load)}}}function D(t){return O(t)?[t]:t}function O(t){return s(t)||k(t)}function k(t){return typeof t.name=="string"&&typeof t.load=="function"}function s(t){return typeof t.getThemes=="function"}function T({name:t,load:m,colorScheme:p,collection:_,displayName:l}){return{name:t,colorScheme:p,collection:_,displayName:l,load:A(m)}}function A(t){return async()=>{const[m,{normalizeTheme:p}]=await Promise.all([t(),r(()=>import("./DICr2Lvd.js").then(_=>_.c),__vite__mapDeps([0,1]),import.meta.url)]);return p(L(m))}}const f="pierre",V=["pierre-dark","pierre-dark-soft","pierre-dark-vibrant","pierre-dark-protanopia-deuteranopia","pierre-dark-tritanopia"],g=["pierre-light","pierre-light-soft","pierre-light-vibrant","pierre-light-protanopia-deuteranopia","pierre-light-tritanopia"],b=[...g,...V],S=new Set(g);function w(t){return S.has(t)?"light":"dark"}const y={"pierre-dark":"Pierre Dark","pierre-dark-soft":"Pierre Dark Soft","pierre-dark-vibrant":"Pierre Dark Vibrant","pierre-dark-protanopia-deuteranopia":"Pierre Dark Protanopia & Deuteranopia","pierre-dark-tritanopia":"Pierre Dark Tritanopia","pierre-light":"Pierre Light","pierre-light-soft":"Pierre Light Soft","pierre-light-vibrant":"Pierre Light Vibrant","pierre-light-protanopia-deuteranopia":"Pierre Light Protanopia & Deuteranopia","pierre-light-tritanopia":"Pierre Light Tritanopia"},z={"pierre-dark":()=>r(()=>import("./CyvmCCZW.js"),[],import.meta.url),"pierre-dark-soft":()=>r(()=>import("./BHGpRqa4.js"),[],import.meta.url),"pierre-dark-vibrant":()=>r(()=>import("./BWBVywrn.js"),[],import.meta.url),"pierre-dark-protanopia-deuteranopia":()=>r(()=>import("./Rgc0TwpF.js"),[],import.meta.url),"pierre-dark-tritanopia":()=>r(()=>import("./Beq2gCRQ.js"),[],import.meta.url),"pierre-light":()=>r(()=>import("./480U9XYS.js"),[],import.meta.url),"pierre-light-soft":()=>r(()=>import("./CVdyfjmI.js"),[],import.meta.url),"pierre-light-vibrant":()=>r(()=>import("./DdTDNdfJ.js"),[],import.meta.url),"pierre-light-protanopia-deuteranopia":()=>r(()=>import("./CaVOBURG.js"),[],import.meta.url),"pierre-light-tritanopia":()=>r(()=>import("./B4_gpKOM.js"),[],import.meta.url)};function H(t){return T({name:t,collection:f,colorScheme:w(t),displayName:y[t],load:z[t]})}const x=u({themes:b.map(t=>H(t))}),M="shiki",v=["ayu-light","catppuccin-latte","everforest-light","github-light","github-light-default","github-light-high-contrast","gruvbox-light-hard","gruvbox-light-medium","gruvbox-light-soft","horizon-bright","kanagawa-lotus","light-plus","material-theme-lighter","min-light","night-owl-light","one-light","rose-pine-dawn","slack-ochin","snazzy-light","solarized-light","vitesse-light"],N=["andromeeda","aurora-x","ayu-dark","ayu-mirage","catppuccin-frappe","catppuccin-macchiato","catppuccin-mocha","dark-plus","dracula","dracula-soft","everforest-dark","github-dark","github-dark-default","github-dark-dimmed","github-dark-high-contrast","gruvbox-dark-hard","gruvbox-dark-medium","gruvbox-dark-soft","horizon","houston","kanagawa-dragon","kanagawa-wave","laserwave","material-theme","material-theme-darker","material-theme-ocean","material-theme-palenight","min-dark","monokai","night-owl","nord","one-dark-pro","plastic","poimandres","red","rose-pine","rose-pine-moon","slack-dark","solarized-dark","synthwave-84","tokyo-night","vesper","vitesse-black","vitesse-dark"],C=new Set(v);function K(t){return C.has(t)?"light":"dark"}const j={andromeeda:()=>r(()=>import("./C4gqWexZ.js"),[],import.meta.url),"aurora-x":()=>r(()=>import("./D-2ljcwZ.js"),[],import.meta.url),"ayu-dark":()=>r(()=>import("./DYE7WIF3.js"),[],import.meta.url),"ayu-light":()=>r(()=>import("./BA47KaF1.js"),[],import.meta.url),"ayu-mirage":()=>r(()=>import("./32ctXXKs.js"),[],import.meta.url),"catppuccin-frappe":()=>r(()=>import("./CZL1YF0i.js"),[],import.meta.url),"catppuccin-latte":()=>r(()=>import("./DH-8KZSZ.js"),[],import.meta.url),"catppuccin-macchiato":()=>r(()=>import("./B7yYVSCf.js"),[],import.meta.url),"catppuccin-mocha":()=>r(()=>import("./Ct7hS0mc.js"),[],import.meta.url),"dark-plus":()=>r(()=>import("./C3mMm8J8.js"),[],import.meta.url),dracula:()=>r(()=>import("./BzJJZx-M.js"),[],import.meta.url),"dracula-soft":()=>r(()=>import("./BXkSAIEj.js"),[],import.meta.url),"everforest-dark":()=>r(()=>import("./BgDCqdQA.js"),[],import.meta.url),"everforest-light":()=>r(()=>import("./C8M2exoo.js"),[],import.meta.url),"github-dark":()=>r(()=>import("./DHJKELXO.js"),[],import.meta.url),"github-dark-default":()=>r(()=>import("./Cuk6v7N8.js"),[],import.meta.url),"github-dark-dimmed":()=>r(()=>import("./DH5Ifo-i.js"),[],import.meta.url),"github-dark-high-contrast":()=>r(()=>import("./E3gJ1_iC.js"),[],import.meta.url),"github-light":()=>r(()=>import("./DAi9KRSo.js"),[],import.meta.url),"github-light-default":()=>r(()=>import("./D7oLnXFd.js"),[],import.meta.url),"github-light-high-contrast":()=>r(()=>import("./BfjtVDDH.js"),[],import.meta.url),"gruvbox-dark-hard":()=>r(()=>import("./CFHQjOhq.js"),[],import.meta.url),"gruvbox-dark-medium":()=>r(()=>import("./GsRaNv29.js"),[],import.meta.url),"gruvbox-dark-soft":()=>r(()=>import("./CVdnzihN.js"),[],import.meta.url),"gruvbox-light-hard":()=>r(()=>import("./CH1njM8p.js"),[],import.meta.url),"gruvbox-light-medium":()=>r(()=>import("./DRw_LuNl.js"),[],import.meta.url),"gruvbox-light-soft":()=>r(()=>import("./hJgmCMqR.js"),[],import.meta.url),horizon:()=>r(()=>import("./BUw7H-hv.js"),[],import.meta.url),"horizon-bright":()=>r(()=>import("./CUuTKBJd.js"),[],import.meta.url),houston:()=>r(()=>import("./DnULxvSX.js"),[],import.meta.url),"kanagawa-dragon":()=>r(()=>import("./BuwD2xS4.js"),[],import.meta.url),"kanagawa-lotus":()=>r(()=>import("./C3DzagqV.js"),[],import.meta.url),"kanagawa-wave":()=>r(()=>import("./DFGoQZhC.js"),[],import.meta.url),laserwave:()=>r(()=>import("./DUszq2jm.js"),[],import.meta.url),"light-plus":()=>r(()=>import("./B7mTdjB0.js"),[],import.meta.url),"material-theme":()=>r(()=>import("./D5KoaKCx.js"),[],import.meta.url),"material-theme-darker":()=>r(()=>import("./BfHTSMKl.js"),[],import.meta.url),"material-theme-lighter":()=>r(()=>import("./B0m2ddpp.js"),[],import.meta.url),"material-theme-ocean":()=>r(()=>import("./CyktbL80.js"),[],import.meta.url),"material-theme-palenight":()=>r(()=>import("./Csfq5Kiy.js"),[],import.meta.url),"min-dark":()=>r(()=>import("./CafNBF8u.js"),[],import.meta.url),"min-light":()=>r(()=>import("./CTRr51gU.js"),[],import.meta.url),monokai:()=>r(()=>import("./CR4piiQ-.js"),[],import.meta.url),"night-owl":()=>r(()=>import("./C39BiMTA.js"),[],import.meta.url),"night-owl-light":()=>r(()=>import("./CMTm3GFP.js"),[],import.meta.url),nord:()=>r(()=>import("./Ddv68eIx.js"),[],import.meta.url),"one-dark-pro":()=>r(()=>import("./CxGP3dtY.js"),[],import.meta.url),"one-light":()=>r(()=>import("./C3Wv6jpd.js"),[],import.meta.url),plastic:()=>r(()=>import("./3e1v2bzS.js"),[],import.meta.url),poimandres:()=>r(()=>import("./CS3Unz2-.js"),[],import.meta.url),red:()=>r(()=>import("./DMbB5_pp.js"),[],import.meta.url),"rose-pine":()=>r(()=>import("./5qJOZa0Y.js"),[],import.meta.url),"rose-pine-dawn":()=>r(()=>import("./zx0QlTCp.js"),[],import.meta.url),"rose-pine-moon":()=>r(()=>import("./C9pEdX9L.js"),[],import.meta.url),"slack-dark":()=>r(()=>import("./BthQWCQV.js"),[],import.meta.url),"slack-ochin":()=>r(()=>import("./DqwNpetd.js"),[],import.meta.url),"snazzy-light":()=>r(()=>import("./Bw305WKR.js"),[],import.meta.url),"solarized-dark":()=>r(()=>import("./UcubFVte.js"),[],import.meta.url),"solarized-light":()=>r(()=>import("./DCG28T6R.js"),[],import.meta.url),"synthwave-84":()=>r(()=>import("./CbfX1IO0.js"),[],import.meta.url),"tokyo-night":()=>r(()=>import("./hegEt444.js"),[],import.meta.url),vesper:()=>r(()=>import("./DRje8inN.js"),[],import.meta.url),"vitesse-black":()=>r(()=>import("./Bkuqu6BP.js"),[],import.meta.url),"vitesse-dark":()=>r(()=>import("./D0r3Knsf.js"),[],import.meta.url),"vitesse-light":()=>r(()=>import("./CVO1_9PV.js"),[],import.meta.url)};function c(t){return T({name:t,collection:M,colorScheme:K(t),load:j[t]})}const G=Object.freeze([...v.map(t=>c(t)),...N.map(t=>c(t))]),$=u({themes:G}),q=u({themes:[x,$]});export{T as createTheme,x as pierreThemes,$ as shikiThemes,q as themes};