@intent-hq/web 2.393.0 → 2.393.2

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 (230) hide show
  1. package/package.json +1 -1
  2. package/web/app/immutable/chunks/{0Pskylmi.js → 0Lodvm7U.js} +1 -1
  3. package/web/app/immutable/chunks/{D_YdQJM4.js → 1hUesUcr.js} +1 -1
  4. package/web/app/immutable/chunks/{FzsqLvWW.js → 1p87nGiH.js} +1 -1
  5. package/web/app/immutable/chunks/{DCzxlgBs.js → 2XTpu-pp.js} +1 -1
  6. package/web/app/immutable/chunks/{OrDYwyck.js → 3EQPKXoI.js} +2 -2
  7. package/web/app/immutable/chunks/54ZDusyh.js +6 -0
  8. package/web/app/immutable/chunks/{DM_PIf-5.js → 5NKE7nx3.js} +1 -1
  9. package/web/app/immutable/chunks/{w6C2OuF7.js → 5Nvv2Lts.js} +1 -1
  10. package/web/app/immutable/chunks/{u2ZzqP0a.js → 5SDFNZiZ.js} +1 -1
  11. package/web/app/immutable/chunks/{B8m3-qrW.js → 5uPsOw59.js} +1 -1
  12. package/web/app/immutable/chunks/{BK7FmI7K.js → 9N5egcma.js} +1 -1
  13. package/web/app/immutable/chunks/{DRpk7IAR.js → 9hLDyNKW.js} +1 -1
  14. package/web/app/immutable/chunks/{aQkb4saz.js → AX1GDLPb.js} +1 -1
  15. package/web/app/immutable/chunks/{BI6MUuoX.js → B1P2_A-D.js} +1 -1
  16. package/web/app/immutable/chunks/{BABLhp9e.js → B25DCKCp.js} +1 -1
  17. package/web/app/immutable/chunks/{CDCAMh6o.js → B3G_nhPo.js} +1 -1
  18. package/web/app/immutable/chunks/{3Z-66JFK.js → B3_pG997.js} +1 -1
  19. package/web/app/immutable/chunks/{COmspkQo.js → B5rWFERE.js} +1 -1
  20. package/web/app/immutable/chunks/{DFh2QzKR.js → B7nYGmHN.js} +1 -1
  21. package/web/app/immutable/chunks/{6_Ki4zfU.js → B8hXRSlI.js} +1 -1
  22. package/web/app/immutable/chunks/{dEp87wve.js → B8sPKQVl.js} +1 -1
  23. package/web/app/immutable/chunks/{Bttih9ri.js → B92LVVZl.js} +1 -1
  24. package/web/app/immutable/chunks/{DDa6EINl.js → B941PH3R.js} +1 -1
  25. package/web/app/immutable/chunks/{BeZe2Rt-.js → BBuvJMq5.js} +1 -1
  26. package/web/app/immutable/chunks/{yKdlMKAe.js → BET9_6zk.js} +2 -2
  27. package/web/app/immutable/chunks/{CTkkv_Ih.js → BHkRlfpj.js} +1 -1
  28. package/web/app/immutable/chunks/{Cxm3e0CO.js → BI4cZZX-.js} +1 -1
  29. package/web/app/immutable/chunks/{CEfljVcs.js → BIDLT3JB.js} +1 -1
  30. package/web/app/immutable/chunks/{Ch9YoFhc.js → BLoR6-fV.js} +1 -1
  31. package/web/app/immutable/chunks/{PWNFccPv.js → BOE0lXBq.js} +1 -1
  32. package/web/app/immutable/chunks/{0biFhMxb.js → BOOf6vKl.js} +1 -1
  33. package/web/app/immutable/chunks/{DP31pjuo.js → BOcncMTK.js} +3 -3
  34. package/web/app/immutable/chunks/{XAL8NtHj.js → BPoTi_yl.js} +1 -1
  35. package/web/app/immutable/chunks/{DfApjOPM.js → BPphEAV1.js} +1 -1
  36. package/web/app/immutable/chunks/{Bt1-7rTQ.js → BQ9Nf0IV.js} +1 -1
  37. package/web/app/immutable/chunks/{CBKDJPOp.js → BSMKf5nA.js} +1 -1
  38. package/web/app/immutable/chunks/{X66bh60j.js → BSVwkJI3.js} +1 -1
  39. package/web/app/immutable/chunks/{BDYqZy5l.js → BTQZ2eSY.js} +1 -1
  40. package/web/app/immutable/chunks/{DU4Vhr-0.js → BV9rfWFj.js} +1 -1
  41. package/web/app/immutable/chunks/{BGIAis8Q.js → BWH6q8SG.js} +3 -3
  42. package/web/app/immutable/chunks/{GCJgqmLv.js → BXnNAEju.js} +1 -1
  43. package/web/app/immutable/chunks/{BI9u_QTd.js → BZpl1Y6O.js} +1 -1
  44. package/web/app/immutable/chunks/{CtX9AjBD.js → BcKhVYNw.js} +1 -1
  45. package/web/app/immutable/chunks/{D1nkWdsN.js → Bf8oyM9s.js} +1 -1
  46. package/web/app/immutable/chunks/{DM5kqQ1V.js → BhsjECB4.js} +1 -1
  47. package/web/app/immutable/chunks/{RGi81mvu.js → BiBCqvj8.js} +1 -1
  48. package/web/app/immutable/chunks/{BpFxCD0b.js → BjfJvx5N.js} +1 -1
  49. package/web/app/immutable/chunks/{D5ocbEo-.js → BkD1B-t7.js} +1 -1
  50. package/web/app/immutable/chunks/{HcCqNlKh.js → BmkQwoP6.js} +1 -1
  51. package/web/app/immutable/chunks/{jphlY6bT.js → Bmw5RheL.js} +1 -1
  52. package/web/app/immutable/chunks/{B2NCDWQj.js → Bo0ZNhTd.js} +1 -1
  53. package/web/app/immutable/chunks/{CCAtqaSn.js → Bo8Bzt_n.js} +1 -1
  54. package/web/app/immutable/chunks/{CRm25OCR.js → Bv-YmUA0.js} +1 -1
  55. package/web/app/immutable/chunks/{Bxf_-54V.js → BvpvfHPp.js} +1 -1
  56. package/web/app/immutable/chunks/{BS5e_kKu.js → BxScfaS2.js} +1 -1
  57. package/web/app/immutable/chunks/{XSkFT3M0.js → ByXyOGzc.js} +1 -1
  58. package/web/app/immutable/chunks/{DCgY039R.js → C-vJzBpf.js} +54 -54
  59. package/web/app/immutable/chunks/{v7NJYdhp.js → C0ZUrdOo.js} +1 -1
  60. package/web/app/immutable/chunks/{DVhkgoDW.js → C3A6Etjq.js} +1 -1
  61. package/web/app/immutable/chunks/{CbBvi-vT.js → C3ldfPpK.js} +2 -2
  62. package/web/app/immutable/chunks/{BDY2Kajf.js → C45mDBrU.js} +1 -1
  63. package/web/app/immutable/chunks/{D_EFP2qU.js → C4qoqU0x.js} +1 -1
  64. package/web/app/immutable/chunks/{D7KhILhs.js → CBbhUF1U.js} +1 -1
  65. package/web/app/immutable/chunks/{uzIA17NN.js → CBdW99Fh.js} +3 -3
  66. package/web/app/immutable/chunks/{IGNO0qoE.js → CCi081IH.js} +1 -1
  67. package/web/app/immutable/chunks/{FXLHv4s7.js → CEH2NAZ8.js} +1 -1
  68. package/web/app/immutable/chunks/{D179JMBI.js → CFDesZJP.js} +1 -1
  69. package/web/app/immutable/chunks/{fr4AMTgg.js → CFa8sUgf.js} +1 -1
  70. package/web/app/immutable/chunks/{BdWMbiFk.js → CFflosJs.js} +1 -1
  71. package/web/app/immutable/chunks/{BHFbn3A9.js → CFyhHTwc.js} +1 -1
  72. package/web/app/immutable/chunks/{r0vRtx-T.js → CG6G-VtV.js} +1 -1
  73. package/web/app/immutable/chunks/{nnHDE1dd.js → CGYM6R_d.js} +1 -1
  74. package/web/app/immutable/chunks/{Cev7VHoN.js → CH1Bpd5B.js} +1 -1
  75. package/web/app/immutable/chunks/{C8OXQeb2.js → CHovwbAO.js} +1 -1
  76. package/web/app/immutable/chunks/{BnnKw3Va.js → CITlaKmU.js} +1 -1
  77. package/web/app/immutable/chunks/{nrSh0aC8.js → CJUKJKPV.js} +1 -1
  78. package/web/app/immutable/chunks/{W0kxgN1W.js → CJtBv95U.js} +1 -1
  79. package/web/app/immutable/chunks/CK3fpDUl.js +1 -0
  80. package/web/app/immutable/chunks/{DOK_g7vV.js → CL5OTeL_.js} +1 -1
  81. package/web/app/immutable/chunks/{BKGQPtRi.js → CLW1n4w7.js} +1 -1
  82. package/web/app/immutable/chunks/{CippTVu3.js → CM3rEc3H.js} +1 -1
  83. package/web/app/immutable/chunks/{B2-ooCTr.js → CMUWVW8A.js} +1 -1
  84. package/web/app/immutable/chunks/{DcrCEeFN.js → CNfD8BpN.js} +1 -1
  85. package/web/app/immutable/chunks/{CJL-iSZe.js → CNm0He-Z.js} +2 -2
  86. package/web/app/immutable/chunks/{u_H5ILVa.js → CP-NTf2-.js} +1 -1
  87. package/web/app/immutable/chunks/{CPsAdpQg.js → CPCJiIPK.js} +1 -1
  88. package/web/app/immutable/chunks/{D6eyCbi1.js → CPTHRAYg.js} +1 -1
  89. package/web/app/immutable/chunks/{Ds7d6UPo.js → CPy0rCmw.js} +4 -4
  90. package/web/app/immutable/chunks/{DXBE2Tld.js → CR6bxzBv.js} +1 -1
  91. package/web/app/immutable/chunks/{BAlN6xXV.js → CVgSN9ZH.js} +2 -2
  92. package/web/app/immutable/chunks/{CKOT06_N.js → CVhLsbHu.js} +1 -1
  93. package/web/app/immutable/chunks/{WWDClKTE.js → CXuN4JFH.js} +1 -1
  94. package/web/app/immutable/chunks/{BEeu6Jyo.js → C_rsaO5o.js} +1 -1
  95. package/web/app/immutable/chunks/{BOpa3JL5.js → CbGGQnE9.js} +1 -1
  96. package/web/app/immutable/chunks/Ccf5U4O_.js +1 -0
  97. package/web/app/immutable/chunks/{CkbdUYUB.js → CdXM6BQL.js} +1 -1
  98. package/web/app/immutable/chunks/{DabFMHr_.js → Cdwy3-nO.js} +4 -4
  99. package/web/app/immutable/chunks/{B_dB55pf.js → Ce5Cs6SN.js} +3 -3
  100. package/web/app/immutable/chunks/{BxpgiWm2.js → Cj36CQXD.js} +1 -1
  101. package/web/app/immutable/chunks/{C-86kNuI.js → Cj92J6fP.js} +3 -3
  102. package/web/app/immutable/chunks/{Cim9mWY1.js → Ckq6aQDS.js} +1 -1
  103. package/web/app/immutable/chunks/{DepS1LOg.js → CksNKSJb.js} +1 -1
  104. package/web/app/immutable/chunks/{B6Qz5J1y.js → Cmct_Ic1.js} +1 -1
  105. package/web/app/immutable/chunks/{DjD2npnM.js → CnnBx7yl.js} +1 -1
  106. package/web/app/immutable/chunks/{Cad-FQZw.js → Cnvb2S0V.js} +1 -1
  107. package/web/app/immutable/chunks/{7Ovc5F1W.js → Cohy0Z-x.js} +1 -1
  108. package/web/app/immutable/chunks/{Cz3WzTlQ.js → CpIcQB5T.js} +1 -1
  109. package/web/app/immutable/chunks/{GFF7xfJq.js → CpwZYDHS.js} +1 -1
  110. package/web/app/immutable/chunks/{cD292w1o.js → Cq6hdiVw.js} +1 -1
  111. package/web/app/immutable/chunks/{DWjpzYNk.js → CqVeTPQI.js} +1 -1
  112. package/web/app/immutable/chunks/{QEpqKBee.js → CqnoveI8.js} +1 -1
  113. package/web/app/immutable/chunks/{BezqW82L.js → CtemMU54.js} +2 -2
  114. package/web/app/immutable/chunks/{BZ5plXZy.js → CuvONknh.js} +3 -3
  115. package/web/app/immutable/chunks/{BT6sDnDt.js → CvYS01IZ.js} +1 -1
  116. package/web/app/immutable/chunks/{CXygwMkb.js → Cxf7GnmV.js} +1 -1
  117. package/web/app/immutable/chunks/{CDtaIFAl.js → CyZe9Esu.js} +1 -1
  118. package/web/app/immutable/chunks/{DO2zAKv0.js → Cym4zMqt.js} +3 -3
  119. package/web/app/immutable/chunks/{Beq_QLuz.js → D-lOH49i.js} +1 -1
  120. package/web/app/immutable/chunks/{YWPnOD4T.js → D1CYQTLS.js} +1 -1
  121. package/web/app/immutable/chunks/{BWtzEUuh.js → D4VyuyJv.js} +1 -1
  122. package/web/app/immutable/chunks/{9gZxSRYR.js → D7rcwg4U.js} +2 -2
  123. package/web/app/immutable/chunks/{B3M7htfw.js → D7tp4A5_.js} +1 -1
  124. package/web/app/immutable/chunks/{BKFA3yUf.js → D8dc4uEZ.js} +1 -1
  125. package/web/app/immutable/chunks/{3eHuEsL0.js → D9_9Xrbm.js} +1 -1
  126. package/web/app/immutable/chunks/{OqslD7bF.js → DBy_x3yG.js} +1 -1
  127. package/web/app/immutable/chunks/{CWtyXmQ4.js → DGrUr-ze.js} +1 -1
  128. package/web/app/immutable/chunks/{BJIUXUAo.js → DJx-btvr.js} +1 -1
  129. package/web/app/immutable/chunks/{U5o8u-di.js → DKxUsLaS.js} +1 -1
  130. package/web/app/immutable/chunks/{C35-tQAa.js → DLTvtu0r.js} +1 -1
  131. package/web/app/immutable/chunks/{Bb6_ZpFm.js → DOjRTGtD.js} +1 -1
  132. package/web/app/immutable/chunks/{C1SGWBXH.js → DOvLLu-_.js} +1 -1
  133. package/web/app/immutable/chunks/{Pc52abky.js → DQMGgT_X.js} +1 -1
  134. package/web/app/immutable/chunks/{YnYoZ2NK.js → DR2A4Ob1.js} +1 -1
  135. package/web/app/immutable/chunks/{BgKsHej9.js → DRNQWF5u.js} +2 -2
  136. package/web/app/immutable/chunks/{C3KgmGxd.js → DReNFETs.js} +1 -1
  137. package/web/app/immutable/chunks/{vA_m-Yoy.js → DRgsIn-1.js} +1 -1
  138. package/web/app/immutable/chunks/{DvEcqVUt.js → DSNCn1aQ.js} +1 -1
  139. package/web/app/immutable/chunks/{CjrqEuvI.js → DTPQbia0.js} +1 -1
  140. package/web/app/immutable/chunks/{iViWtmHm.js → DTSonUt7.js} +1 -1
  141. package/web/app/immutable/chunks/{DoFGyuPK.js → DVA-DTbs.js} +1 -1
  142. package/web/app/immutable/chunks/{BVRxvAzz.js → DW3UcPIr.js} +1 -1
  143. package/web/app/immutable/chunks/{D2Q6mppm.js → DY9oFeIm.js} +1 -1
  144. package/web/app/immutable/chunks/{0IudVN8T.js → DYA10vhI.js} +2 -2
  145. package/web/app/immutable/chunks/{CJvysCNo.js → DYo8C3ZI.js} +4 -4
  146. package/web/app/immutable/chunks/{BieWjGd7.js → Da3dWtR7.js} +1 -1
  147. package/web/app/immutable/chunks/{BMHxxfP4.js → Db6ExzGF.js} +1 -1
  148. package/web/app/immutable/chunks/{AJU0I4QP.js → DcU97JoW.js} +1 -1
  149. package/web/app/immutable/chunks/{7bKjKvMj.js → Dd4ehheI.js} +1 -1
  150. package/web/app/immutable/chunks/{bX4FGmNr.js → DeeBlDPG.js} +1 -1
  151. package/web/app/immutable/chunks/{DGGucQxs.js → DfrPaMm3.js} +2 -2
  152. package/web/app/immutable/chunks/{DzeUh63h.js → DgClg_4p.js} +2 -2
  153. package/web/app/immutable/chunks/{DfINI0LK.js → DgkHABKY.js} +1 -1
  154. package/web/app/immutable/chunks/{Bu0K6ujo.js → DiaqLwTf.js} +1 -1
  155. package/web/app/immutable/chunks/{BYanH6N9.js → DkAmJv1y.js} +1 -1
  156. package/web/app/immutable/chunks/{8ysnd5N8.js → Dm529rkq.js} +4 -4
  157. package/web/app/immutable/chunks/{DcJ9XwiY.js → DmmU2UYb.js} +1 -1
  158. package/web/app/immutable/chunks/{CQzFriMx.js → Dnfzkj4w.js} +1 -1
  159. package/web/app/immutable/chunks/{ng4mcU_-.js → DqVocOV1.js} +1 -1
  160. package/web/app/immutable/chunks/{DcGK_0d9.js → DsMWDyON.js} +1 -1
  161. package/web/app/immutable/chunks/{CF6Vxctv.js → DtyYBAfX.js} +1 -1
  162. package/web/app/immutable/chunks/{DhBBsVaP.js → DuEeb8Mn.js} +1 -1
  163. package/web/app/immutable/chunks/{B1jwNspC.js → Dv4Vym3G.js} +1 -1
  164. package/web/app/immutable/chunks/{CXnXrUsE.js → Dv9iFv_x.js} +1 -1
  165. package/web/app/immutable/chunks/{CUllgFqe.js → G0vgahzI.js} +1 -1
  166. package/web/app/immutable/chunks/{UWtWVoQE.js → GLk8gkMl.js} +1 -1
  167. package/web/app/immutable/chunks/{zdzlwKoA.js → LEN-2k09.js} +1 -1
  168. package/web/app/immutable/chunks/{RsYrgUiV.js → M7sb2vsG.js} +1 -1
  169. package/web/app/immutable/chunks/{DLGucGdD.js → MdOlpTpG.js} +3 -3
  170. package/web/app/immutable/chunks/{BAWHRd64.js → MnHzHyX4.js} +1 -1
  171. package/web/app/immutable/chunks/{DU59Vdu3.js → OSt17igW.js} +1 -1
  172. package/web/app/immutable/chunks/{l_KiA0-X.js → OYbzRQNh.js} +1 -1
  173. package/web/app/immutable/chunks/{DF6LaFyj.js → PbtuJhxQ.js} +2 -2
  174. package/web/app/immutable/chunks/{Bh3yfjRP.js → Q3ibTFFO.js} +1 -1
  175. package/web/app/immutable/chunks/{oHufBZXQ.js → Qkw5r8H6.js} +1 -1
  176. package/web/app/immutable/chunks/{DT_y9FGD.js → RRXFJL92.js} +1 -1
  177. package/web/app/immutable/chunks/{DuiDeolO.js → TzUDDwaI.js} +1 -1
  178. package/web/app/immutable/chunks/{B9R2bql6.js → U7IKFepx.js} +1 -1
  179. package/web/app/immutable/chunks/{DzR2lw_C.js → UroPxNaS.js} +1 -1
  180. package/web/app/immutable/chunks/{CzoSrhdL.js → WrCMkepk.js} +2 -2
  181. package/web/app/immutable/chunks/{Dbqo6rfT.js → XMoRU8a7.js} +1 -1
  182. package/web/app/immutable/chunks/{DSXyr_Fr.js → XXp2dlP1.js} +1 -1
  183. package/web/app/immutable/chunks/{C2RnxEnO.js → XdXjguTz.js} +1 -1
  184. package/web/app/immutable/chunks/{BQ5x_RaT.js → YAuWnPYv.js} +1 -1
  185. package/web/app/immutable/chunks/{DHwN0lRn.js → _bESm04T.js} +1 -1
  186. package/web/app/immutable/chunks/{DZlDxCgn.js → bNKugVDK.js} +1 -1
  187. package/web/app/immutable/chunks/{T6UBEOFc.js → c5wypyPV.js} +1 -1
  188. package/web/app/immutable/chunks/{BVab-LI7.js → ch6_GOZD.js} +1 -1
  189. package/web/app/immutable/chunks/{b45PQ8TG.js → czWUw-OT.js} +1 -1
  190. package/web/app/immutable/chunks/{Ct8a2yek.js → dYI-d1qe.js} +1 -1
  191. package/web/app/immutable/chunks/{f5b-J-bi.js → ehKOKrdg.js} +1 -1
  192. package/web/app/immutable/chunks/{BroDUcjq.js → grZaDfdl.js} +1 -1
  193. package/web/app/immutable/chunks/{gNR_yDDX.js → l8tGTVLl.js} +1 -1
  194. package/web/app/immutable/chunks/{BV3fep4W.js → m2E3nD0f.js} +1 -1
  195. package/web/app/immutable/chunks/{koUs6Gjt.js → mmpnpFjh.js} +1 -1
  196. package/web/app/immutable/chunks/pYdPYEfN.js +11 -0
  197. package/web/app/immutable/chunks/{DkQdSPDN.js → qB07BmZl.js} +1 -1
  198. package/web/app/immutable/chunks/{DEOVFEjx.js → rO66Jyk4.js} +1 -1
  199. package/web/app/immutable/chunks/{52kdRKiP.js → sB9jFfB2.js} +1 -1
  200. package/web/app/immutable/chunks/{DujlAAuA.js → vXXIq-lQ.js} +1 -1
  201. package/web/app/immutable/chunks/{DEQnE_KB.js → wKT6CuL7.js} +1 -1
  202. package/web/app/immutable/entry/{app.CiyeQuxv.js → app.O58wkIN2.js} +3 -3
  203. package/web/app/immutable/entry/start.Qg9AYZsG.js +1 -0
  204. package/web/app/immutable/nodes/{0.CRbxkcM2.js → 0.TrE3RPnJ.js} +1 -1
  205. package/web/app/immutable/nodes/{1.DqX6QaPm.js → 1.BIksphyt.js} +1 -1
  206. package/web/app/immutable/nodes/{10.BCKuK60u.js → 10.D2OvSkOf.js} +4 -4
  207. package/web/app/immutable/nodes/{11.DfT5UkBP.js → 11.fZEErUb-.js} +4 -4
  208. package/web/app/immutable/nodes/{13.J8EpPA9A.js → 13.JtKFcm-e.js} +1 -1
  209. package/web/app/immutable/nodes/{14.C5TLXVit.js → 14.DYuGWO_d.js} +1 -1
  210. package/web/app/immutable/nodes/{15.D7dZwhi4.js → 15.m6bg6xQe.js} +1 -1
  211. package/web/app/immutable/nodes/{16.T0PyvW1V.js → 16.PoO6JTXS.js} +1 -1
  212. package/web/app/immutable/nodes/{17.pi-yfOoM.js → 17.bczfYiNy.js} +1 -1
  213. package/web/app/immutable/nodes/{18.CTVha2lA.js → 18.D70W-aYB.js} +1 -1
  214. package/web/app/immutable/nodes/{19.Bp3Vf5X-.js → 19.CjtjBk01.js} +2 -2
  215. package/web/app/immutable/nodes/{2.COUI43GN.js → 2.DxHlcx2L.js} +4 -4
  216. package/web/app/immutable/nodes/{20.gu-VpWFh.js → 20.7n3s-oUO.js} +1 -1
  217. package/web/app/immutable/nodes/{3.Ch8C_wLR.js → 3.BDHxIm-0.js} +1 -1
  218. package/web/app/immutable/nodes/{4.DNtyFj6E.js → 4.BNQKhByt.js} +1 -1
  219. package/web/app/immutable/nodes/{5.DibkYULx.js → 5.gaULhB1l.js} +1 -1
  220. package/web/app/immutable/nodes/{6.Cpj-A029.js → 6.ZtFGqTn7.js} +1 -1
  221. package/web/app/immutable/nodes/{7.CecRnFtb.js → 7.CTMwqxha.js} +1 -1
  222. package/web/app/immutable/nodes/{8.BbuGaD-H.js → 8.DgeODsFV.js} +1 -1
  223. package/web/app/immutable/nodes/{9.BMl85hfy.js → 9.BPdyHPQC.js} +4 -4
  224. package/web/app/version.json +1 -1
  225. package/web/index.html +9 -9
  226. package/web/app/immutable/chunks/B0SSzYpD.js +0 -6
  227. package/web/app/immutable/chunks/BAtAwQ72.js +0 -11
  228. package/web/app/immutable/chunks/BGSmaq6H.js +0 -1
  229. package/web/app/immutable/chunks/TdGvVwuC.js +0 -1
  230. package/web/app/immutable/entry/start.D87x7VCJ.js +0 -1
@@ -1,2 +1,2 @@
1
- import{Z as Q,n as j,aA as J,ax as X,aI as z,w as Z,b as $}from"./cD292w1o.js";import{JH as l,nZ as m,n_ as _,JQ as q,bs as O,a4 as Y,nM as C,rR as P,sd as ee,kr as te,sb as W,K9 as M,rw as ne,fV as K,rS as F,a6 as se,bq as oe,m as ie}from"./D0qhIm1r.js";import{m as x,a1 as re,l as ae}from"./BeZe2Rt-.js";import{a as L}from"./CZfU7DE3.js";const ce=["[WORKSPACE EVENTS]","[TASK WAKE]","[AGENT MESSAGE]"];function de(e){const t=e.metadata;if(t&&typeof t=="object"){if(t.type==="question_answers")return!1;if(!Q(t))return!0}const n=j(e);return ce.some(s=>n.startsWith(s))}const U=1440*60*1e3;function le(e){let t=null;for(const n of e){if(de({id:n.id,timestamp:n.createdAt,metadata:n.metadata,contentBlocks:[{type:"text",text:n.preview.trimStart()}]}))continue;const s=Date.parse(n.createdAt);Number.isFinite(s)&&(t===null||s>t)&&(t=s)}return t}const ue=50,ge=20;function D(e,t){return e===null||t!==null&&t>e?t:e}async function De(e,t){let n,s=null;for(let i=0;i<ge;i++){const r=await e({limit:ue,nextToken:n});if(!r.ok)return null;const d=r.items;s===null&&d.length>0&&(s=d[d.length-1].id);const c=t?.newestId!=null?d.findIndex(a=>a.id===t.newestId):-1,o=le(c>=0?d.slice(c+1):d);if(c>=0)return{latest:D(o,t?.latest??null),newestId:s};if(o!==null)return{latest:D(o,t?.latest??null),newestId:s};if(typeof r.nextToken!="string")return{latest:null,newestId:s};n=r.nextToken}return{latest:t?.latest??null,newestId:s}}function E(e,t){return e!=null&&e<=t&&e>t-U}function fe(e,t){return e!=null&&Number.isFinite(e)&&e>0&&e<=t-U}function pe(e,t){const{workspaceId:n,agentId:s,authority:i,nativePairId:r,evidence:d}=e;if(!n||!s||!i||i!==t)return null;const c=JSON.stringify([n,s]);if(r!==c||d?.id!==c)return null;const o=d.clips.find(a=>a.status==="recording");return!o||o.discarding||!Number.isFinite(o.startedAt)||!Number.isFinite(o.pausedMs??0)||o.pausedAt!=null&&!Number.isFinite(o.pausedAt)?null:{workspaceId:n,agentId:s,clipId:o.id,startedAt:o.startedAt,pausedAt:o.pausedAt??null,pausedMs:o.pausedMs??0}}function Ee(e,t){return t!==void 0&&e!==t?"ignore":e?"stop":"start"}const Ne=l.createSelector(e=>{const t=e.dockConversation,n=t.workspaceId&&t.agentId?JSON.stringify([t.workspaceId,t.agentId]):null;return pe({workspaceId:t.workspaceId,agentId:t.agentId,authority:t.authority,nativePairId:t.nativeSpeech.pairId,evidence:n?m(t.evidence,n):null},L(e))});l.createSelector(e=>e.hud.active);l.createSelector(e=>e.hud.feed);l.createSelector(e=>e.hud.usage);l.createSelector(e=>e.hud.usageError);const He=l.createSelector(e=>e.hud.rateHistory),qe=l.createSelector(e=>_(e.workspace.workspaces)),Pe=l.createSelector(e=>{const t=e.hud.usage?.totals;return t?q(t):0}),Ke=l.createSelector(e=>e.hud.burnRatePerMin),Fe=l.createSelector(e=>e.hud.burnTrend),xe=l.createSelector(e=>{const{health:t,stats:n,lastUpdated:s,hostLocality:i}=e.daemonHealth,r=n?.hostname;return{online:t!=="down",uptimeSeconds:typeof n?.uptimeSeconds=="number"?n.uptimeSeconds:null,version:n?.version??null,fetchedAtMs:s?Date.parse(s):null,remoteHostname:i==="remote"&&r?r.split(".",1)[0]??r:null}}),Le=l.createSelector(e=>e.hud.gridFilter);l.createSelector(e=>e.hud.attentionByWorkspaceId);const Ue=l.createSelector((e,t)=>{const n=e.hud?.questionsByAgentId?.[t];if(!n)return!1;const s=e.agentSessions?.byAgentId[t]?.metadata??{};return!x(s,n.messageId)}),Ge=l.createSelector(e=>e.hud.takeoverRequestWorkspaceId);function ke(e,t){return t[String(e.id)]??e.displayStatus}const S=l.createSelector(e=>{const t=e.hud.displayStatusByWorkspaceId;return _(e.workspace.workspaces).filter(n=>n.status!==O.Archived&&n.status!==O.Retired&&n.status!==O.Deleted).map(n=>{const s=ke(n,t);return s&&s!==n.displayStatus?{...n,displayStatus:s}:n})});function w(e){const t=e.agentSummary;return!t||!Array.isArray(t.agents)?[]:t.agents.filter(n=>!!n&&typeof n=="object"&&typeof n.id=="string"&&n.status!=="deleted"&&!ae(n.id))}const Ve=l.createSelector(e=>{const t=Object.fromEntries(Y.map(n=>[n,0]));for(const n of S.select(e))for(const s of w(n))t[I(e,s).bucket]+=1;return t}),Qe=l.createSelector(e=>{const t={idle:0,unread:0,progress:0,attention:0,waiting:0,prOpen:0,prMerged:0,failed:0,completed:0,total:0};for(const n of B.select(e))switch(t.total+=1,n.isUnread&&(t.unread+=1),n.isWaiting&&(t.waiting+=1),n.stateKey){case"wait":case"blocked":t.attention+=1;break;case"failed":t.failed+=1;break;case"in_progress":t.progress+=1;break;case"complete":t.completed+=1;break;case"pr_open":case"pr_ready":case"pr_queued":t.prOpen+=1;break;case"pr_merged":t.prMerged+=1;break;default:t.idle+=1}return t}),Se=l.createSelector(e=>{const t={};for(const n of S.select(e))for(const s of w(n))typeof s.name=="string"&&s.name.length>0&&(t[s.id]=s.name);return t});function N(e){if(!e.sinceTs)return 0;const t=Date.parse(e.sinceTs);return Number.isFinite(t)?t:0}const je=l.createSelector(e=>{const t=e.hud.attentionByWorkspaceId,n=e.hud.questionsByAgentId,s=[];for(const i of S.select(e)){const r=String(i.id);let d=!1;for(const o of v(i,e)){const{bucket:a,attentionKind:u,hasQuestion:g}=o;if(a!=="needs-attention"&&a!=="failed"||!o.topLevel||o.isBackground||h(e,o.id))continue;const k=g?n[o.id]:void 0,f=u?C(e.agentSessions?.byAgentId[o.id])?.reason:void 0,p=k?"question":u??void 0;s.push({workspaceId:r,workspaceTitle:i.title,kind:a==="needs-attention"?"agent_waiting":"agent_failed",...a==="needs-attention"&&p?{signal:p}:{},agentName:o.name,message:k?.question??f??null,sinceTs:o.lastActivityTs}),d=!0}const c=t[r];c&&P(c.attention)&&(s.push({workspaceId:r,workspaceTitle:i.title,kind:"workspace_attention",attention:c.attention,message:null,sinceTs:c.raisedAtTs}),d=!0),G.has(b(i))&&!d&&s.push({workspaceId:r,workspaceTitle:i.title,kind:"workspace_attention",message:null,sinceTs:null})}return s.sort((i,r)=>N(r)-N(i))}),Je=l.createSelector(e=>{const t=Se.select(e);return e.hud.feed.map(n=>({...n,workspaceTitle:m(e.workspace.workspaces,n.source)?.title??null,resolvedAgentName:n.agentName??(n.agentId?t[n.agentId]??null:null)}))}),Ae={total:0,completed:0,inProgress:0};function b(e){const t=ee(e.displayStatus)?e.displayStatus:"not_started";return te(t)??"not_started"}const G=new Set(["wait","blocked","failed"]);function he(e,t,n){if(t==="failed"){const i=n.find(d=>d.bucket==="failed"&&!h(e,d.id)),r=i?e.agentSessions?.byAgentId[i.id]?.stopReason:null;return{kind:"failed",text:typeof r=="string"&&r.length>0?r:""}}if(t!=="wait"&&t!=="blocked")return null;const s=n.filter(i=>i.topLevel&&!i.isBackground&&!h(e,i.id));for(const i of s){if(!i.hasQuestion)continue;const r=e.hud.questionsByAgentId[i.id];if(r?.question)return{kind:"question",text:r.question}}for(const i of["blocker","discussion"])for(const r of s){if(r.attentionKind!==i)continue;const d=e.agentSessions?.byAgentId[r.id],c=C(d)?.reason;if(c)return{kind:i,text:c}}return{kind:"pending",text:""}}const y=new Set(["running","needs-attention","failed"]);function H(e){const t=typeof e.lastActivity=="string"?Date.parse(e.lastActivity):NaN;return Number.isFinite(t)?t:-1/0}function me(e){const t=n=>{const s=e.get(n.id)?.bucket;return s!==void 0&&y.has(s)?0:1};return(n,s)=>{const i=n.specialist==="spec-writer",r=s.specialist==="spec-writer";if(i!==r)return i?-1:1;const d=t(n)-t(s);if(d!==0)return d;const c=H(n),o=H(s);return c!==o?o-c:n.id<s.id?-1:n.id>s.id?1:0}}function ye(e,t){const n=new Set(e.map(o=>o.id)),s=new Map,i=[];for(const o of e){const a=typeof o.parentAgentId=="string"&&o.parentAgentId!==o.id&&n.has(o.parentAgentId)?o.parentAgentId:null;if(a){const u=s.get(a)??[];u.push(o),s.set(a,u)}else i.push(o)}i.sort(t);for(const o of s.values())o.sort(t);const r=[],d=new Set,c=(o,a,u)=>{if(!d.has(o.id)){d.add(o.id),r.push({info:o,depth:a,parentAgentId:u});for(const g of s.get(o.id)??[])c(g,a+1,o.id)}};for(const o of i)c(o,0,null);for(const o of e)c(o,0,null);return r}function I(e,t){const n=e.agentSessions?.byAgentId[t.id],s=n?.metadata??{},i=n?C(n)?.kind??null:null,r=n?J.select(e,t.id)||typeof n.status=="string"&&W(n.status):W(t.status),d=n?M(typeof n.status=="string"?n.status:t.status):null,c=!!n&&d!=="failed"&&d!=="done"&&(n.isWaitingForOtherAgents===!0||Array.isArray(n.waitingForAgentIds)&&n.waitingForAgentIds.length>0||Array.isArray(n.waitingOnHooks)&&n.waitingOnHooks.length>0||Array.isArray(n.waitingOnPrMonitors)&&n.waitingOnPrMonitors.length>0||Array.isArray(n.waitingOnScriptMonitors)&&n.waitingOnScriptMonitors.length>0),o=!!n&&(n.turnInFlight===!0||n.liveTurnOpen===!0);let a;n?c&&!o&&n.isStreaming!==!0&&n.isProcessing!==!0?a="idle":X.select(e,t.id)?a="running":r?a="idle":a=M(typeof n.status=="string"?n.status:t.status):a=t.isResponding===!0||t.isStreaming===!0?"running":M(t.status);const u=e.hud.questionsByAgentId[t.id],g=a!=="failed"&&!!u&&!x(s,u.messageId);return{bucket:a==="failed"?"failed":i!==null||g?"needs-attention":a,attentionKind:i,hasQuestion:g,isRunning:a==="running"}}function V(e,t){const n=i=>typeof i=="string"&&i!==e.id?i:null,s=i=>({isBackground:i?.isBackground,createdByAgentId:n(i?.createdByAgentId)});return{parentAgentId:n(e.parentAgentId)??n(t?.parentAgentId),isBackground:e.isBackground??t?.isBackground,metadata:s(t?.metadata),agentMetadata:s(t?.agentMetadata)}}function h(e,t){return e.agentSessions?.byAgentId[t]?.notificationsMuted===!0}function Ie(e){if(!e)return null;switch(e.kind){case"attention":return e.attention.reason??null;case"live-tool":case"last-tool":{const t=$(e.toolUse.name,e.toolUse.input||{});return t.hidden?null:[t.verb,t.subject,t.path].filter(Boolean).join(" ").trim()||null}default:{const t=e.text||"";return t?t.includes(`
1
+ import{Z as Q,n as j,aA as J,ax as X,aI as z,w as Z,b as $}from"./Cq6hdiVw.js";import{JH as l,nZ as m,n_ as _,JQ as q,bs as O,a4 as Y,nM as C,rR as P,sd as ee,kr as te,sb as W,K9 as M,rw as ne,fV as K,rS as F,a6 as se,bq as oe,m as ie}from"./D0qhIm1r.js";import{m as x,a1 as re,l as ae}from"./BBuvJMq5.js";import{a as L}from"./CZfU7DE3.js";const ce=["[WORKSPACE EVENTS]","[TASK WAKE]","[AGENT MESSAGE]"];function de(e){const t=e.metadata;if(t&&typeof t=="object"){if(t.type==="question_answers")return!1;if(!Q(t))return!0}const n=j(e);return ce.some(s=>n.startsWith(s))}const U=1440*60*1e3;function le(e){let t=null;for(const n of e){if(de({id:n.id,timestamp:n.createdAt,metadata:n.metadata,contentBlocks:[{type:"text",text:n.preview.trimStart()}]}))continue;const s=Date.parse(n.createdAt);Number.isFinite(s)&&(t===null||s>t)&&(t=s)}return t}const ue=50,ge=20;function D(e,t){return e===null||t!==null&&t>e?t:e}async function De(e,t){let n,s=null;for(let i=0;i<ge;i++){const r=await e({limit:ue,nextToken:n});if(!r.ok)return null;const d=r.items;s===null&&d.length>0&&(s=d[d.length-1].id);const c=t?.newestId!=null?d.findIndex(a=>a.id===t.newestId):-1,o=le(c>=0?d.slice(c+1):d);if(c>=0)return{latest:D(o,t?.latest??null),newestId:s};if(o!==null)return{latest:D(o,t?.latest??null),newestId:s};if(typeof r.nextToken!="string")return{latest:null,newestId:s};n=r.nextToken}return{latest:t?.latest??null,newestId:s}}function E(e,t){return e!=null&&e<=t&&e>t-U}function fe(e,t){return e!=null&&Number.isFinite(e)&&e>0&&e<=t-U}function pe(e,t){const{workspaceId:n,agentId:s,authority:i,nativePairId:r,evidence:d}=e;if(!n||!s||!i||i!==t)return null;const c=JSON.stringify([n,s]);if(r!==c||d?.id!==c)return null;const o=d.clips.find(a=>a.status==="recording");return!o||o.discarding||!Number.isFinite(o.startedAt)||!Number.isFinite(o.pausedMs??0)||o.pausedAt!=null&&!Number.isFinite(o.pausedAt)?null:{workspaceId:n,agentId:s,clipId:o.id,startedAt:o.startedAt,pausedAt:o.pausedAt??null,pausedMs:o.pausedMs??0}}function Ee(e,t){return t!==void 0&&e!==t?"ignore":e?"stop":"start"}const Ne=l.createSelector(e=>{const t=e.dockConversation,n=t.workspaceId&&t.agentId?JSON.stringify([t.workspaceId,t.agentId]):null;return pe({workspaceId:t.workspaceId,agentId:t.agentId,authority:t.authority,nativePairId:t.nativeSpeech.pairId,evidence:n?m(t.evidence,n):null},L(e))});l.createSelector(e=>e.hud.active);l.createSelector(e=>e.hud.feed);l.createSelector(e=>e.hud.usage);l.createSelector(e=>e.hud.usageError);const He=l.createSelector(e=>e.hud.rateHistory),qe=l.createSelector(e=>_(e.workspace.workspaces)),Pe=l.createSelector(e=>{const t=e.hud.usage?.totals;return t?q(t):0}),Ke=l.createSelector(e=>e.hud.burnRatePerMin),Fe=l.createSelector(e=>e.hud.burnTrend),xe=l.createSelector(e=>{const{health:t,stats:n,lastUpdated:s,hostLocality:i}=e.daemonHealth,r=n?.hostname;return{online:t!=="down",uptimeSeconds:typeof n?.uptimeSeconds=="number"?n.uptimeSeconds:null,version:n?.version??null,fetchedAtMs:s?Date.parse(s):null,remoteHostname:i==="remote"&&r?r.split(".",1)[0]??r:null}}),Le=l.createSelector(e=>e.hud.gridFilter);l.createSelector(e=>e.hud.attentionByWorkspaceId);const Ue=l.createSelector((e,t)=>{const n=e.hud?.questionsByAgentId?.[t];if(!n)return!1;const s=e.agentSessions?.byAgentId[t]?.metadata??{};return!x(s,n.messageId)}),Ge=l.createSelector(e=>e.hud.takeoverRequestWorkspaceId);function ke(e,t){return t[String(e.id)]??e.displayStatus}const S=l.createSelector(e=>{const t=e.hud.displayStatusByWorkspaceId;return _(e.workspace.workspaces).filter(n=>n.status!==O.Archived&&n.status!==O.Retired&&n.status!==O.Deleted).map(n=>{const s=ke(n,t);return s&&s!==n.displayStatus?{...n,displayStatus:s}:n})});function w(e){const t=e.agentSummary;return!t||!Array.isArray(t.agents)?[]:t.agents.filter(n=>!!n&&typeof n=="object"&&typeof n.id=="string"&&n.status!=="deleted"&&!ae(n.id))}const Ve=l.createSelector(e=>{const t=Object.fromEntries(Y.map(n=>[n,0]));for(const n of S.select(e))for(const s of w(n))t[I(e,s).bucket]+=1;return t}),Qe=l.createSelector(e=>{const t={idle:0,unread:0,progress:0,attention:0,waiting:0,prOpen:0,prMerged:0,failed:0,completed:0,total:0};for(const n of B.select(e))switch(t.total+=1,n.isUnread&&(t.unread+=1),n.isWaiting&&(t.waiting+=1),n.stateKey){case"wait":case"blocked":t.attention+=1;break;case"failed":t.failed+=1;break;case"in_progress":t.progress+=1;break;case"complete":t.completed+=1;break;case"pr_open":case"pr_ready":case"pr_queued":t.prOpen+=1;break;case"pr_merged":t.prMerged+=1;break;default:t.idle+=1}return t}),Se=l.createSelector(e=>{const t={};for(const n of S.select(e))for(const s of w(n))typeof s.name=="string"&&s.name.length>0&&(t[s.id]=s.name);return t});function N(e){if(!e.sinceTs)return 0;const t=Date.parse(e.sinceTs);return Number.isFinite(t)?t:0}const je=l.createSelector(e=>{const t=e.hud.attentionByWorkspaceId,n=e.hud.questionsByAgentId,s=[];for(const i of S.select(e)){const r=String(i.id);let d=!1;for(const o of v(i,e)){const{bucket:a,attentionKind:u,hasQuestion:g}=o;if(a!=="needs-attention"&&a!=="failed"||!o.topLevel||o.isBackground||h(e,o.id))continue;const k=g?n[o.id]:void 0,f=u?C(e.agentSessions?.byAgentId[o.id])?.reason:void 0,p=k?"question":u??void 0;s.push({workspaceId:r,workspaceTitle:i.title,kind:a==="needs-attention"?"agent_waiting":"agent_failed",...a==="needs-attention"&&p?{signal:p}:{},agentName:o.name,message:k?.question??f??null,sinceTs:o.lastActivityTs}),d=!0}const c=t[r];c&&P(c.attention)&&(s.push({workspaceId:r,workspaceTitle:i.title,kind:"workspace_attention",attention:c.attention,message:null,sinceTs:c.raisedAtTs}),d=!0),G.has(b(i))&&!d&&s.push({workspaceId:r,workspaceTitle:i.title,kind:"workspace_attention",message:null,sinceTs:null})}return s.sort((i,r)=>N(r)-N(i))}),Je=l.createSelector(e=>{const t=Se.select(e);return e.hud.feed.map(n=>({...n,workspaceTitle:m(e.workspace.workspaces,n.source)?.title??null,resolvedAgentName:n.agentName??(n.agentId?t[n.agentId]??null:null)}))}),Ae={total:0,completed:0,inProgress:0};function b(e){const t=ee(e.displayStatus)?e.displayStatus:"not_started";return te(t)??"not_started"}const G=new Set(["wait","blocked","failed"]);function he(e,t,n){if(t==="failed"){const i=n.find(d=>d.bucket==="failed"&&!h(e,d.id)),r=i?e.agentSessions?.byAgentId[i.id]?.stopReason:null;return{kind:"failed",text:typeof r=="string"&&r.length>0?r:""}}if(t!=="wait"&&t!=="blocked")return null;const s=n.filter(i=>i.topLevel&&!i.isBackground&&!h(e,i.id));for(const i of s){if(!i.hasQuestion)continue;const r=e.hud.questionsByAgentId[i.id];if(r?.question)return{kind:"question",text:r.question}}for(const i of["blocker","discussion"])for(const r of s){if(r.attentionKind!==i)continue;const d=e.agentSessions?.byAgentId[r.id],c=C(d)?.reason;if(c)return{kind:i,text:c}}return{kind:"pending",text:""}}const y=new Set(["running","needs-attention","failed"]);function H(e){const t=typeof e.lastActivity=="string"?Date.parse(e.lastActivity):NaN;return Number.isFinite(t)?t:-1/0}function me(e){const t=n=>{const s=e.get(n.id)?.bucket;return s!==void 0&&y.has(s)?0:1};return(n,s)=>{const i=n.specialist==="spec-writer",r=s.specialist==="spec-writer";if(i!==r)return i?-1:1;const d=t(n)-t(s);if(d!==0)return d;const c=H(n),o=H(s);return c!==o?o-c:n.id<s.id?-1:n.id>s.id?1:0}}function ye(e,t){const n=new Set(e.map(o=>o.id)),s=new Map,i=[];for(const o of e){const a=typeof o.parentAgentId=="string"&&o.parentAgentId!==o.id&&n.has(o.parentAgentId)?o.parentAgentId:null;if(a){const u=s.get(a)??[];u.push(o),s.set(a,u)}else i.push(o)}i.sort(t);for(const o of s.values())o.sort(t);const r=[],d=new Set,c=(o,a,u)=>{if(!d.has(o.id)){d.add(o.id),r.push({info:o,depth:a,parentAgentId:u});for(const g of s.get(o.id)??[])c(g,a+1,o.id)}};for(const o of i)c(o,0,null);for(const o of e)c(o,0,null);return r}function I(e,t){const n=e.agentSessions?.byAgentId[t.id],s=n?.metadata??{},i=n?C(n)?.kind??null:null,r=n?J.select(e,t.id)||typeof n.status=="string"&&W(n.status):W(t.status),d=n?M(typeof n.status=="string"?n.status:t.status):null,c=!!n&&d!=="failed"&&d!=="done"&&(n.isWaitingForOtherAgents===!0||Array.isArray(n.waitingForAgentIds)&&n.waitingForAgentIds.length>0||Array.isArray(n.waitingOnHooks)&&n.waitingOnHooks.length>0||Array.isArray(n.waitingOnPrMonitors)&&n.waitingOnPrMonitors.length>0||Array.isArray(n.waitingOnScriptMonitors)&&n.waitingOnScriptMonitors.length>0),o=!!n&&(n.turnInFlight===!0||n.liveTurnOpen===!0);let a;n?c&&!o&&n.isStreaming!==!0&&n.isProcessing!==!0?a="idle":X.select(e,t.id)?a="running":r?a="idle":a=M(typeof n.status=="string"?n.status:t.status):a=t.isResponding===!0||t.isStreaming===!0?"running":M(t.status);const u=e.hud.questionsByAgentId[t.id],g=a!=="failed"&&!!u&&!x(s,u.messageId);return{bucket:a==="failed"?"failed":i!==null||g?"needs-attention":a,attentionKind:i,hasQuestion:g,isRunning:a==="running"}}function V(e,t){const n=i=>typeof i=="string"&&i!==e.id?i:null,s=i=>({isBackground:i?.isBackground,createdByAgentId:n(i?.createdByAgentId)});return{parentAgentId:n(e.parentAgentId)??n(t?.parentAgentId),isBackground:e.isBackground??t?.isBackground,metadata:s(t?.metadata),agentMetadata:s(t?.agentMetadata)}}function h(e,t){return e.agentSessions?.byAgentId[t]?.notificationsMuted===!0}function Ie(e){if(!e)return null;switch(e.kind){case"attention":return e.attention.reason??null;case"live-tool":case"last-tool":{const t=$(e.toolUse.name,e.toolUse.input||{});return t.hidden?null:[t.verb,t.subject,t.path].filter(Boolean).join(" ").trim()||null}default:{const t=e.text||"";return t?t.includes(`
2
2
  `)?Z(t)||null:t:null}}}function v(e,t){const n=w(e),s=new Map(n.map(r=>[r.id,I(t,r)]));return ye(n,me(s)).map(({info:r,depth:d,parentAgentId:c})=>{const o=t.agentSessions?.byAgentId[r.id],a=V(r,o),{bucket:u,attentionKind:g,hasQuestion:k}=s.get(r.id)??I(t,r),f=Array.isArray(o?.waitingForAgentIds)?o.waitingForAgentIds.filter(p=>typeof p=="string"):[];return{id:r.id,name:r.name,bucket:u,lastActivityTs:r.lastActivity??null,line:Ie(z.select(t,r.id)),parentAgentId:c,depth:d,treePrefix:"",topLevel:K(a)==="topLevel",isBackground:ne(a),attentionKind:g,hasQuestion:k,isWaitingForAgents:o?.isWaitingForOtherAgents===!0||f.length>0||Array.isArray(o?.waitingOnHooks)&&o.waitingOnHooks.length>0||Array.isArray(o?.waitingOnPrMonitors)&&o.waitingOnPrMonitors.length>0||Array.isArray(o?.waitingOnScriptMonitors)&&o.waitingOnScriptMonitors.length>0,waitingForAgentIds:f}})}function we(e){const t=new Set;for(const i of e)for(const r of i.waitingForAgentIds)t.add(r);const n=i=>y.has(i.bucket)||i.isWaitingForAgents||t.has(i.id);return e.filter((i,r)=>{if(n(i))return!0;for(let d=r+1;d<e.length&&!(e[d].depth<=i.depth);d++)if(n(e[d]))return!0;return!1}).map((i,r,d)=>{if(i.depth===0)return{...i,treePrefix:""};let c=!0;for(let o=r+1;o<d.length&&!(d[o].depth<i.depth);o++)if(d[o].depth===i.depth){c=!1;break}return{...i,treePrefix:(i.depth>=2?"│ ":"")+(c?"└─":"├─")}})}const B=l.createSelector(e=>{const t=e.hud.attentionByWorkspaceId,n=re.select(e);return S.select(e).map(s=>{const i=String(s.id),r=n.indexOf(i),d=t[i]?.attention??(typeof s.attention=="string"&&F(s.attention)?s.attention:null),c=v(s,e),o=b(s),a=e.tokenUsage?.byWorkspaceId[i]?.totals,u=e.workspaceTasks?.byWorkspaceId[i]?.stats,g=typeof s.statusMessage=="string"&&s.statusMessage.trim().length>0?s.statusMessage:null;return{workspaceId:i,title:s.title,repoRef:s.repositoryName?`${s.repositoryOwner?`${s.repositoryOwner}/`:""}${s.repositoryName}`:s.branch,stateKey:o,attention:d,isUnread:d===se,isWaiting:s.waiting===!0,statusMessage:g,attentionSnippet:he(e,o,c),prNumber:typeof s.prNumber=="number"?s.prNumber:null,keySlot:r===-1?null:r,tasks:u?{total:u.total,completed:u.completed,inProgress:u.inProgress}:Ae,tokens:a?q(a):0,agents:we(c)}})}),R=4;function be(e,t,n){const s=e.agentSessions?.byAgentId[n.id];return!s||String(s.workspaceId)!==t||s.pendingDeleteAt||K(V(n,s))!=="topLevel"?!1:!h(e,n.id)}const ve=l.createSelector(e=>{const t={},n=e.hud.attentionByWorkspaceId;for(const s of S.select(e)){const i=String(s.id),r=new Map,d=(f,p)=>{const A=r.get(f)??[];A.includes(p)||A.push(p),r.set(f,A)},o=w(s).filter(f=>be(e,i,f));for(const f of o){const p=I(e,f);p.bucket==="failed"?d("failed",f.name):p.hasQuestion?d("question",f.name):p.attentionKind==="blocker"?d("blocker",f.name):p.attentionKind==="discussion"&&d("discussion",f.name),p.isRunning&&d("running",f.name)}const a=b(s);a==="failed"&&!r.has("failed")&&r.set("failed",[]),a==="blocked"&&!r.has("blocker")&&r.set("blocker",[]),a==="wait"&&!r.has("question")&&!r.has("blocker")&&!r.has("discussion")&&r.set("needs_input",[]);const u=n[i]?.attention??(typeof s.attention=="string"&&F(s.attention)?s.attention:null);u==="review_required"&&r.set("review",[]),u==="unread"&&r.set("unread",[]),s.activity==="agent_running"&&!r.has("running")&&r.set("running",[]);const g=oe.flatMap(f=>{const p=r.get(f);return p?[{category:f,count:Math.max(1,p.length),agentNames:p}]:[]});if(g.length===0)continue;const k=g.length>R;t[i]={agentCount:o.length,categories:g,visibleCategories:k?g.slice(0,R-1):g,hiddenCategoryCount:k?g.length-(R-1):0}}return t});l.createSelector(e=>{const t=e.hud.attentionByWorkspaceId;let n=0;for(const s of S.select(e)){let i=!1;for(const c of v(s,e))c.topLevel&&!c.isBackground&&!h(e,c.id)&&(c.bucket==="failed"||c.attentionKind!==null||c.hasQuestion)&&(n+=1,i=!0);const r=t[String(s.id)],d=r!==void 0&&P(r.attention);d&&(n+=1),G.has(b(s))&&!i&&!d&&(n+=1)}return n});function Te(e,t,n,s){const i=s.slice().sort((o,a)=>a.createdAt-o.createdAt);for(const o of i){const u=e.agentSessions?.byAgentId[o.agentId]?.metadata?.completionReport;if(typeof u=="string"&&u.trim().length>0)return u}const r=e.workspaceNotes?.byWorkspaceId[t]?.notes,d=r?m(r,n):void 0,c=d?.content||d?.contentPreview;return typeof c=="string"&&c.trim().length>0?c:null}const Xe=l.createSelector((e,t)=>{const n=B.select(e).find(a=>a.workspaceId===t);if(!n)return null;const s=m(e.workspace.workspaces,t),i=s?v(s,e):[],r=new Map(i.map(a=>[a.id,a])),d=e.taskAgentAssociations?.byWorkspaceId[t]?.byNoteId??{},c=e.workspaceTasks?.byWorkspaceId[t],o=c?_(c.tasks).filter(a=>a.status!=="cancelled").map(a=>{const u=Object.values(d[a.id]??{});return{id:a.id,title:a.title,status:a.status,agents:u.map(g=>r.get(g.agentId)).filter(g=>!!g),report:a.status==="complete"?Te(e,t,a.id,u):null,...a.specLinked!==void 0?{specLinked:a.specLinked}:{},...a.dependsOn?{dependsOn:a.dependsOn}:{},...a.conflictsWith?{conflictsWith:a.conflictsWith}:{},...a.unmetDependsOn?{unmetDependsOn:a.unmetDependsOn}:{}}}):[];return{workspaceId:t,title:n.title,repoRef:n.repoRef,statusMessage:n.statusMessage,keySlot:n.keySlot,stats:n.tasks,tasks:o,activeAgents:i.filter(a=>y.has(a.bucket)),idleAgents:i.filter(a=>!y.has(a.bucket))}}),Oe=new Set(["failed","blocker","question","discussion","needs_input","review"]);function Me(e){for(const t of e?.categories??[])switch(t.category){case"failed":return"failure";case"blocker":return"blocker";case"question":return"question";case"review":return"review"}return"none"}const Re=3,ze=l.createSelector((e,t="recent")=>{const n=B.select(e),s=ve.select(e),i=new Map(S.select(e).map(c=>[String(c.id),c])),r={action:[],unread:[],active:[]};for(const c of n){const o=i.get(c.workspaceId);if(!o||o.id===ie)continue;const a=e.hud.dockConversationAtByWorkspaceId[c.workspaceId];if(!E(a,e.hud.dockRecencyNow)&&!fe(a,e.hud.dockRecencyNow))continue;const u=s[c.workspaceId],g=u?.categories??[],k=g.some(T=>Oe.has(T.category)),f=c.isUnread,p=g.some(T=>T.category==="running"),A=k?"action":f?"unread":"active";r[A].push({workspace:o,badgeKind:Me(u),priorityGroup:A,isUnread:f,isRunning:p,isWaiting:c.isWaiting})}return[...r.action,...r.unread,...r.active].sort((c,o)=>e.hud.dockConversationAtByWorkspaceId[String(o.workspace.id)]-e.hud.dockConversationAtByWorkspaceId[String(c.workspace.id)]||String(c.workspace.id).localeCompare(String(o.workspace.id))).filter((c,o)=>{const a=o<Re||E(e.hud.dockConversationAtByWorkspaceId[String(c.workspace.id)],e.hud.dockRecencyNow);return t==="older"?!a:a})}),Ze=l.createSelector(e=>e.hud.dockPlacement),$e=l.createSelector(e=>e.hud.dockPlacementError),Ye=l.createSelector(e=>e.hud.dockFocusRequest),et=l.createSelector(e=>e.hud.dockCloseRequest),tt=l.createSelector(e=>e.hud.dockDragStartResult),nt=l.createSelector(e=>e.hud.dockResizeStartResult),st=l.createSelector(e=>({pending:e.hud.dockMachineSwitching,error:e.hud.dockMachineSwitchError})),ot=l.createSelector(e=>{const t=e.hud.dockEditorCompactRequest,n=e.dockConversation,s=n.workspaceId&&n.agentId?m(n.evidence,JSON.stringify([n.workspaceId,n.agentId])):null,i=!!n.nativeSpeech.activeId||!!s?.annotation||s?.clips.some(r=>r.status==="recording")||e.hardwareConsole.pttRecording||e.hardwareConsole.voiceTranscribing;return t&&!i&&e.hud.active&&t.conversationGeneration===n.generation&&t.authority===L(e)&&t.backendId===e.connections.windowBackendId&&t.workspaceId===e.dockConversation.workspaceId&&t.agentId===e.dockConversation.agentId?t:null});export{qe as A,Qe as B,ve as C,et as a,tt as b,ot as c,Ye as d,st as e,Ze as f,$e as g,Ne as h,de as i,nt as j,ze as k,Ue as l,Ve as m,je as n,Ke as o,Fe as p,Je as q,Ee as r,De as s,Le as t,He as u,xe as v,Ge as w,Xe as x,Pe as y,B as z};
@@ -1 +1 @@
1
- import{JH as o,n_ as d,nZ as n,oR as i,br as a,se as S,pG as p,oO as k}from"./D0qhIm1r.js";import{bn as g,b5 as m,dV as v,dH as W,c as h,cU as I,cf as R}from"./cD292w1o.js";const w={status:"loading",members:[]},u=o.createSelector(e=>d(e.guestSessions.sessions)),K=o.createSelector(e=>e.guestSessions.hasReceivedList),l=o.createSelector(e=>n(e.guestSessions.sessions,e.connections.windowBackendId)??null);o.createSelector(e=>l.select(e)!==null);const M=o.createSelector(e=>e.guestSessions.openIds),F=o.createSelector(e=>e.guestSessions.connectedIds),O=o.createSelector(e=>e.guestSessions.leavingIds),P=o.createSelector(e=>e.guestSessions.leavingWorkspaceKeys),x=o.createSelector(e=>u.select(e).filter(s=>e.guestSessions.failedLeaveIds.includes(s.id))),B=o.createSelector(e=>u.select(e).flatMap(s=>(s.workspaces??[]).filter(t=>e.guestSessions.failedLeaveWorkspaceKeys.includes(i(s.id,t.id))).map(t=>({session:s,workspace:t})))),A=o.createSelector(e=>e.guestSessions.failedLeaveIds),J=o.createSelector(e=>d(e.guestSessions.sweepReports)),N=o.createSelector((e,s)=>n(e.guestSessions.sweepReports,s)),U=o.createSelector(e=>e.guestSessions.clearingWorkspaceIds),_=o.createSelector((e,s)=>n(e.workspace.workspaces,a(s))!==void 0),L=o.createSelector((e,s)=>e.guestSessions.hostedRosters[s]?.status==="withheld"?!1:n(e.workspace.workspaces,a(s))!==void 0&&g.select(e)&&m.select(e,s)),b=o.createSelector((e,s)=>{const t=n(e.workspace.workspaces,a(s));if(t?.openInviteCount!=null)return t.openInviteCount;const c=e.guestSessions.hostedRosters[s];return c?.guestCount!=null?Math.max(0,c.guestCount-c.members.filter(S).length):null}),$=o.createSelector(e=>e.workspace.error?"error":v.select(e,e.connections.windowBackendId)?"loaded":"loading"),j=o.createSelector(e=>{const s=W.select(e);return d(e.workspace.workspaces).filter(t=>{if(!s.collaborationReady||!h(s,t.id,()=>t))return!1;const c=b.select(e,t.id);if((t.memberCount??1/0)<=1&&c===0)return!1;const r=e.guestSessions.hostedRosters[t.id];return!r||r.status!=="loaded"?!0:r.members.some(S)||c===null||c>0})}),f=o.createSelector(e=>{const s=l.select(e),t=I.select(e);return u.select(e).filter(c=>{const r=s?.id===c.id&&t?.principal.id===c.principalId?R.select(e):null;return r?r!=="guest":c.hostRole==="member"})}),E=o.createSelector(e=>{const s=new Set(f.select(e).map(t=>t.id));return u.select(e).filter(t=>!s.has(t.id))}),V=o.createSelector(e=>e.guestSessions.listUnavailable),y=o.createSelector((e,s)=>e.guestSessions.hostedRosters[s]??w),q=o.createSelector((e,s)=>y.select(e,s).members.filter(t=>e.guestSessions.failedMemberKeys.includes(p(s,t.principalId)))),C=[],z=o.createSelector((e,s)=>{const t=p(s,""),c=e.guestSessions.removingMemberKeys.filter(r=>r.startsWith(t)).map(r=>r.slice(t.length));return c.length===0?C:c}),D=o.createSelector((e,s)=>e.guestSessions.clearingWorkspaceIds.includes(s)),T=o.createSelector(e=>{const s=[];for(const[t,c]of Object.entries(e.guestSessions.hostedRosters)){if(c.status==="withheld")continue;const r=n(e.workspace.workspaces,a(t));!r||!L.select(e,t)||s.push(`${t}:${r.memberCount??0},${c.invalidation??0}`)}return s.sort()}),Z=o.createSelector(e=>e.guestSessions.inheritedWorkspaceKeys),Q=o.createSelector(e=>e.guestSessions.leaveConfirmations),X=o.createSelector((e,s)=>k(n(e.guestSessions.sessions,s))),Y=o.createSelector((e,s)=>{if(!s||!g.select(e))return!1;const t=l.select(e);return!t||!(t.workspaces??[]).some(c=>c.id===s)||f.select(e).some(c=>c.id===t.id)||e.guestSessions.inheritedWorkspaceKeys.includes(i(t.id,s))?!1:n(e.workspace.workspaces,a(s))?.myRole!=="owner"}),ee=o.createSelector((e,s)=>{const t=l.select(e);return!!t&&e.guestSessions.selfLeaveWorkspaceKeys.includes(i(t.id,s))}),se=o.createSelector((e,s)=>{const t=l.select(e);return!!t&&e.guestSessions.leavingWorkspaceKeys.includes(i(t.id,s))});export{_ as A,se as B,ee as C,f as D,E,l as F,L as a,x as b,B as c,Q as d,A as e,O as f,P as g,X as h,u as i,F as j,K as k,M as l,V as m,U as n,q as o,b as p,z as q,y as r,Y as s,T as t,$ as u,N as v,J as w,j as x,Z as y,D as z};
1
+ import{JH as o,n_ as d,nZ as n,oR as i,br as a,se as S,pG as p,oO as k}from"./D0qhIm1r.js";import{bn as g,b5 as m,dV as v,dH as W,c as h,cU as I,cf as R}from"./Cq6hdiVw.js";const w={status:"loading",members:[]},u=o.createSelector(e=>d(e.guestSessions.sessions)),K=o.createSelector(e=>e.guestSessions.hasReceivedList),l=o.createSelector(e=>n(e.guestSessions.sessions,e.connections.windowBackendId)??null);o.createSelector(e=>l.select(e)!==null);const M=o.createSelector(e=>e.guestSessions.openIds),F=o.createSelector(e=>e.guestSessions.connectedIds),O=o.createSelector(e=>e.guestSessions.leavingIds),P=o.createSelector(e=>e.guestSessions.leavingWorkspaceKeys),x=o.createSelector(e=>u.select(e).filter(s=>e.guestSessions.failedLeaveIds.includes(s.id))),B=o.createSelector(e=>u.select(e).flatMap(s=>(s.workspaces??[]).filter(t=>e.guestSessions.failedLeaveWorkspaceKeys.includes(i(s.id,t.id))).map(t=>({session:s,workspace:t})))),A=o.createSelector(e=>e.guestSessions.failedLeaveIds),J=o.createSelector(e=>d(e.guestSessions.sweepReports)),N=o.createSelector((e,s)=>n(e.guestSessions.sweepReports,s)),U=o.createSelector(e=>e.guestSessions.clearingWorkspaceIds),_=o.createSelector((e,s)=>n(e.workspace.workspaces,a(s))!==void 0),L=o.createSelector((e,s)=>e.guestSessions.hostedRosters[s]?.status==="withheld"?!1:n(e.workspace.workspaces,a(s))!==void 0&&g.select(e)&&m.select(e,s)),b=o.createSelector((e,s)=>{const t=n(e.workspace.workspaces,a(s));if(t?.openInviteCount!=null)return t.openInviteCount;const c=e.guestSessions.hostedRosters[s];return c?.guestCount!=null?Math.max(0,c.guestCount-c.members.filter(S).length):null}),$=o.createSelector(e=>e.workspace.error?"error":v.select(e,e.connections.windowBackendId)?"loaded":"loading"),j=o.createSelector(e=>{const s=W.select(e);return d(e.workspace.workspaces).filter(t=>{if(!s.collaborationReady||!h(s,t.id,()=>t))return!1;const c=b.select(e,t.id);if((t.memberCount??1/0)<=1&&c===0)return!1;const r=e.guestSessions.hostedRosters[t.id];return!r||r.status!=="loaded"?!0:r.members.some(S)||c===null||c>0})}),f=o.createSelector(e=>{const s=l.select(e),t=I.select(e);return u.select(e).filter(c=>{const r=s?.id===c.id&&t?.principal.id===c.principalId?R.select(e):null;return r?r!=="guest":c.hostRole==="member"})}),E=o.createSelector(e=>{const s=new Set(f.select(e).map(t=>t.id));return u.select(e).filter(t=>!s.has(t.id))}),V=o.createSelector(e=>e.guestSessions.listUnavailable),y=o.createSelector((e,s)=>e.guestSessions.hostedRosters[s]??w),q=o.createSelector((e,s)=>y.select(e,s).members.filter(t=>e.guestSessions.failedMemberKeys.includes(p(s,t.principalId)))),C=[],z=o.createSelector((e,s)=>{const t=p(s,""),c=e.guestSessions.removingMemberKeys.filter(r=>r.startsWith(t)).map(r=>r.slice(t.length));return c.length===0?C:c}),D=o.createSelector((e,s)=>e.guestSessions.clearingWorkspaceIds.includes(s)),T=o.createSelector(e=>{const s=[];for(const[t,c]of Object.entries(e.guestSessions.hostedRosters)){if(c.status==="withheld")continue;const r=n(e.workspace.workspaces,a(t));!r||!L.select(e,t)||s.push(`${t}:${r.memberCount??0},${c.invalidation??0}`)}return s.sort()}),Z=o.createSelector(e=>e.guestSessions.inheritedWorkspaceKeys),Q=o.createSelector(e=>e.guestSessions.leaveConfirmations),X=o.createSelector((e,s)=>k(n(e.guestSessions.sessions,s))),Y=o.createSelector((e,s)=>{if(!s||!g.select(e))return!1;const t=l.select(e);return!t||!(t.workspaces??[]).some(c=>c.id===s)||f.select(e).some(c=>c.id===t.id)||e.guestSessions.inheritedWorkspaceKeys.includes(i(t.id,s))?!1:n(e.workspace.workspaces,a(s))?.myRole!=="owner"}),ee=o.createSelector((e,s)=>{const t=l.select(e);return!!t&&e.guestSessions.selfLeaveWorkspaceKeys.includes(i(t.id,s))}),se=o.createSelector((e,s)=>{const t=l.select(e);return!!t&&e.guestSessions.leavingWorkspaceKeys.includes(i(t.id,s))});export{_ as A,se as B,ee as C,f as D,E,l as F,L as a,x as b,B as c,Q as d,A as e,O as f,P as g,X as h,u as i,F as j,K as k,M as l,V as m,U as n,q as o,b as p,z as q,y as r,Y as s,T as t,$ as u,N as v,J as w,j as x,Z as y,D as z};
@@ -1 +1 @@
1
- import{t as V,bo as q,bm as H,bw as F,bq as dt,b as G,bs as nt}from"./Fcr7AvC-.js";import{bs as K,cd as lt,ca as j,c5 as ct,a5 as C,be as z,b$ as J,b_ as h,bO as _,W as l,bH as M,aD as e,bS as B,bA as T,bn as N,bV as it,aA as R,c9 as u,aB as b,bl as S,ay as pt}from"./3SdAC2_C.js";import{i as L}from"./BhYXv0ZM.js";import{C as ut}from"./C1SGWBXH.js";import{f as U}from"./Beq_QLuz.js";import"./BAtAwQ72.js";import{l as bt}from"./CCAtqaSn.js";import{JH as P,dC as vt,dA as kt,dD as _t}from"./D0qhIm1r.js";var gt=b('<p class="p-2 text-xs text-subtle" data-testid="hook-script-content-too-large"> </p>'),mt=b('<div class="min-h-0 min-w-0 flex-1 overflow-auto" data-testid="hook-script-content-script"><!></div>'),ft=b('<span class="text-xs font-medium text-danger"> </span> <pre class="whitespace-pre-wrap break-all rounded bg-danger-background/10 p-2 font-mono text-xs text-danger"> </pre>',1),ht=b('<pre class="whitespace-pre-wrap break-all rounded bg-muted/40 p-2 font-mono text-xs text-subtle"> </pre>'),xt=b('<p class="text-xs text-subtle"> </p>'),wt=b('<div class="flex min-h-0 min-w-0 flex-1 flex-col gap-2 overflow-auto" data-testid="hook-script-content-logs"><!> <!></div>'),It=b('<div class="flex h-full min-h-0 min-w-0 flex-col gap-3 overflow-hidden" data-testid="hook-script-content"><div class="flex shrink-0 border-b border-border" role="tablist"><!> <!></div> <!></div>');function Q(x,c){if(new.target)return V({component:Q,...x});K(c,!0);const g=()=>nt($,"$hooks$",w),[w,A]=dt();let s=q(c,"workspaceId",7),I=q(c,"hookId",7);const d=lt(s());j(()=>d.set(s()));const $=bt(d),v=u(()=>g().find(t=>t.hookId===I()));j(()=>{if(!s())return;const t=s();return ct(()=>{P.dispatch(vt(t)),P.dispatch(kt(t))}),()=>P.dispatch(_t(t))});let k=it("script");var X={get workspaceId(){return s()},set workspaceId(t){s(t),R()},get hookId(){return I()},set hookId(t){I(t),R()},$set:F,$on:(t,r)=>G(c,t,r)},E=It(),D=C(E),W=C(D);{let t=u(()=>e(k)==="script"),r=u(()=>e(k)==="script"?"border-primary-ink text-primary-ink":"border-transparent text-subtle");U(W,{variant:"ghost",role:"tab",get"aria-selected"(){return e(t)},get class(){return`border-b-2 px-3 py-1.5 text-sm ${e(r)??""}`},onclick:()=>M(k,"script"),children:(p,y)=>{z();var i=J();h(a=>_(i,a),[()=>H.chat_backgroundHooks_modal_scriptTab_label()]),l(p,i)},$$slots:{default:!0}})}var Y=B(W,2);{let t=u(()=>e(k)==="logs"),r=u(()=>e(k)==="logs"?"border-primary-ink text-primary-ink":"border-transparent text-subtle");U(Y,{variant:"ghost",role:"tab",get"aria-selected"(){return e(t)},get class(){return`border-b-2 px-3 py-1.5 text-sm ${e(r)??""}`},onclick:()=>M(k,"logs"),children:(p,y)=>{z();var i=J();h(a=>_(i,a),[()=>H.chat_backgroundHooks_modal_logsTab_label()]),l(p,i)},$$slots:{default:!0}})}T(D);var Z=B(D,2);{var tt=t=>{var r=mt(),p=C(r);{var y=a=>{var m=gt(),o=S(m,!0);h(n=>_(o,n),[()=>H.chat_backgroundHooks_modal_codeTooLarge_description({size:(e(v).codeBytes??0).toLocaleString()})]),l(a,m)},i=a=>{{let m=u(()=>e(v)?.code??"");ut(a,{get code(){return e(m)},language:"javascript",noMargin:!0})}};L(p,a=>{e(v)?.codeOmitted?a(y):a(i,-1)})}T(r),l(t,r)},et=t=>{var r=wt(),p=C(r);{var y=o=>{var n=ft(),f=pt(n),O=S(f,!0),at=B(f,2),ot=S(at,!0);h(st=>{_(O,st),_(ot,e(v).lastError)},[()=>H.chat_backgroundHooks_modal_lastError_label()]),l(o,n)};L(p,o=>{e(v)?.lastError&&o(y)})}var i=B(p,2);{var a=o=>{var n=ht(),f=S(n,!0);h(()=>_(f,e(v).lastLogs)),l(o,n)},m=o=>{var n=xt(),f=S(n,!0);h(O=>_(f,O),[()=>H.chat_backgroundHooks_modal_noLogs_description()]),l(o,n)};L(i,o=>{e(v)?.lastLogs?o(a):o(m,-1)})}T(r),l(t,r)};L(Z,t=>{e(k)==="script"?t(tt):t(et,-1)})}T(E),l(x,E);var rt=N(X);return A(),rt}var $t=b('<div class="h-full min-h-0 min-w-0 max-w-full overflow-hidden p-4" data-testid="hook-script-panel"><!></div>');function yt(x,c){if(new.target)return V({component:yt,...x});K(c,!0);let g=q(c,"tab",7),w=q(c,"workspaceId",7);var A={get tab(){return g()},set tab(d){g(d),R()},get workspaceId(){return w()},set workspaceId(d){w(d),R()},$set:F,$on:(d,$)=>G(c,d,$)},s=$t(),I=C(s);{let d=u(()=>g().workspaceId??w()),$=u(()=>g().hookId??"");Q(I,{get workspaceId(){return e(d)},get hookId(){return e($)}})}return T(s),l(x,s),N(A)}export{yt as default};
1
+ import{t as V,bo as q,bm as H,bw as F,bq as dt,b as G,bs as nt}from"./Fcr7AvC-.js";import{bs as K,cd as lt,ca as j,c5 as ct,a5 as C,be as z,b$ as J,b_ as h,bO as _,W as l,bH as M,aD as e,bS as B,bA as T,bn as N,bV as it,aA as R,c9 as u,aB as b,bl as S,ay as pt}from"./3SdAC2_C.js";import{i as L}from"./BhYXv0ZM.js";import{C as ut}from"./DOvLLu-_.js";import{f as U}from"./D-lOH49i.js";import"./pYdPYEfN.js";import{l as bt}from"./Bo8Bzt_n.js";import{JH as P,dC as vt,dA as kt,dD as _t}from"./D0qhIm1r.js";var gt=b('<p class="p-2 text-xs text-subtle" data-testid="hook-script-content-too-large"> </p>'),mt=b('<div class="min-h-0 min-w-0 flex-1 overflow-auto" data-testid="hook-script-content-script"><!></div>'),ft=b('<span class="text-xs font-medium text-danger"> </span> <pre class="whitespace-pre-wrap break-all rounded bg-danger-background/10 p-2 font-mono text-xs text-danger"> </pre>',1),ht=b('<pre class="whitespace-pre-wrap break-all rounded bg-muted/40 p-2 font-mono text-xs text-subtle"> </pre>'),xt=b('<p class="text-xs text-subtle"> </p>'),wt=b('<div class="flex min-h-0 min-w-0 flex-1 flex-col gap-2 overflow-auto" data-testid="hook-script-content-logs"><!> <!></div>'),It=b('<div class="flex h-full min-h-0 min-w-0 flex-col gap-3 overflow-hidden" data-testid="hook-script-content"><div class="flex shrink-0 border-b border-border" role="tablist"><!> <!></div> <!></div>');function Q(x,c){if(new.target)return V({component:Q,...x});K(c,!0);const g=()=>nt($,"$hooks$",w),[w,A]=dt();let s=q(c,"workspaceId",7),I=q(c,"hookId",7);const d=lt(s());j(()=>d.set(s()));const $=bt(d),v=u(()=>g().find(t=>t.hookId===I()));j(()=>{if(!s())return;const t=s();return ct(()=>{P.dispatch(vt(t)),P.dispatch(kt(t))}),()=>P.dispatch(_t(t))});let k=it("script");var X={get workspaceId(){return s()},set workspaceId(t){s(t),R()},get hookId(){return I()},set hookId(t){I(t),R()},$set:F,$on:(t,r)=>G(c,t,r)},E=It(),D=C(E),W=C(D);{let t=u(()=>e(k)==="script"),r=u(()=>e(k)==="script"?"border-primary-ink text-primary-ink":"border-transparent text-subtle");U(W,{variant:"ghost",role:"tab",get"aria-selected"(){return e(t)},get class(){return`border-b-2 px-3 py-1.5 text-sm ${e(r)??""}`},onclick:()=>M(k,"script"),children:(p,y)=>{z();var i=J();h(a=>_(i,a),[()=>H.chat_backgroundHooks_modal_scriptTab_label()]),l(p,i)},$$slots:{default:!0}})}var Y=B(W,2);{let t=u(()=>e(k)==="logs"),r=u(()=>e(k)==="logs"?"border-primary-ink text-primary-ink":"border-transparent text-subtle");U(Y,{variant:"ghost",role:"tab",get"aria-selected"(){return e(t)},get class(){return`border-b-2 px-3 py-1.5 text-sm ${e(r)??""}`},onclick:()=>M(k,"logs"),children:(p,y)=>{z();var i=J();h(a=>_(i,a),[()=>H.chat_backgroundHooks_modal_logsTab_label()]),l(p,i)},$$slots:{default:!0}})}T(D);var Z=B(D,2);{var tt=t=>{var r=mt(),p=C(r);{var y=a=>{var m=gt(),o=S(m,!0);h(n=>_(o,n),[()=>H.chat_backgroundHooks_modal_codeTooLarge_description({size:(e(v).codeBytes??0).toLocaleString()})]),l(a,m)},i=a=>{{let m=u(()=>e(v)?.code??"");ut(a,{get code(){return e(m)},language:"javascript",noMargin:!0})}};L(p,a=>{e(v)?.codeOmitted?a(y):a(i,-1)})}T(r),l(t,r)},et=t=>{var r=wt(),p=C(r);{var y=o=>{var n=ft(),f=pt(n),O=S(f,!0),at=B(f,2),ot=S(at,!0);h(st=>{_(O,st),_(ot,e(v).lastError)},[()=>H.chat_backgroundHooks_modal_lastError_label()]),l(o,n)};L(p,o=>{e(v)?.lastError&&o(y)})}var i=B(p,2);{var a=o=>{var n=ht(),f=S(n,!0);h(()=>_(f,e(v).lastLogs)),l(o,n)},m=o=>{var n=xt(),f=S(n,!0);h(O=>_(f,O),[()=>H.chat_backgroundHooks_modal_noLogs_description()]),l(o,n)};L(i,o=>{e(v)?.lastLogs?o(a):o(m,-1)})}T(r),l(t,r)};L(Z,t=>{e(k)==="script"?t(tt):t(et,-1)})}T(E),l(x,E);var rt=N(X);return A(),rt}var $t=b('<div class="h-full min-h-0 min-w-0 max-w-full overflow-hidden p-4" data-testid="hook-script-panel"><!></div>');function yt(x,c){if(new.target)return V({component:yt,...x});K(c,!0);let g=q(c,"tab",7),w=q(c,"workspaceId",7);var A={get tab(){return g()},set tab(d){g(d),R()},get workspaceId(){return w()},set workspaceId(d){w(d),R()},$set:F,$on:(d,$)=>G(c,d,$)},s=$t(),I=C(s);{let d=u(()=>g().workspaceId??w()),$=u(()=>g().hookId??"");Q(I,{get workspaceId(){return e(d)},get hookId(){return e($)}})}return T(s),l(x,s),N(A)}export{yt as default};
@@ -1,4 +1,4 @@
1
- import{g as fe}from"./BK7FmI7K.js";import{b as o,ay as te,X as U,aX as ye,ad as be,ah as me,aL as ke,b3 as Ee,O as K,aV as F,ax as _e,J as Se,an as Ne,au as ce,H as le}from"./DabFMHr_.js";var $=(function(){var e=o(function(O,s,n,r){for(n=n||{},r=O.length;r--;n[O[r]]=s);return n},"o"),h=[1,4],p=[1,13],i=[1,12],d=[1,15],k=[1,16],m=[1,20],l=[1,19],D=[6,7,8],I=[1,26],g=[1,24],w=[1,25],E=[6,7,11],G=[1,31],N=[6,7,11,24],V=[1,6,13,16,17,20,23],f=[1,35],A=[1,36],L=[1,6,7,11,13,16,17,20,23],H=[1,38],T={trace:o(function(){},"trace"),yy:{},symbols_:{error:2,start:3,mindMap:4,spaceLines:5,SPACELINE:6,NL:7,KANBAN:8,document:9,stop:10,EOF:11,statement:12,SPACELIST:13,node:14,shapeData:15,ICON:16,CLASS:17,nodeWithId:18,nodeWithoutId:19,NODE_DSTART:20,NODE_DESCR:21,NODE_DEND:22,NODE_ID:23,SHAPE_DATA:24,$accept:0,$end:1},terminals_:{2:"error",6:"SPACELINE",7:"NL",8:"KANBAN",11:"EOF",13:"SPACELIST",16:"ICON",17:"CLASS",20:"NODE_DSTART",21:"NODE_DESCR",22:"NODE_DEND",23:"NODE_ID",24:"SHAPE_DATA"},productions_:[0,[3,1],[3,2],[5,1],[5,2],[5,2],[4,2],[4,3],[10,1],[10,1],[10,1],[10,2],[10,2],[9,3],[9,2],[12,3],[12,2],[12,2],[12,2],[12,1],[12,2],[12,1],[12,1],[12,1],[12,1],[14,1],[14,1],[19,3],[18,1],[18,4],[15,2],[15,1]],performAction:o(function(s,n,r,a,u,t,M){var c=t.length-1;switch(u){case 6:case 7:return a;case 8:a.getLogger().trace("Stop NL ");break;case 9:a.getLogger().trace("Stop EOF ");break;case 11:a.getLogger().trace("Stop NL2 ");break;case 12:a.getLogger().trace("Stop EOF2 ");break;case 15:a.getLogger().info("Node: ",t[c-1].id),a.addNode(t[c-2].length,t[c-1].id,t[c-1].descr,t[c-1].type,t[c]);break;case 16:a.getLogger().info("Node: ",t[c].id),a.addNode(t[c-1].length,t[c].id,t[c].descr,t[c].type);break;case 17:a.getLogger().trace("Icon: ",t[c]),a.decorateNode({icon:t[c]});break;case 18:case 23:a.decorateNode({class:t[c]});break;case 19:a.getLogger().trace("SPACELIST");break;case 20:a.getLogger().trace("Node: ",t[c-1].id),a.addNode(0,t[c-1].id,t[c-1].descr,t[c-1].type,t[c]);break;case 21:a.getLogger().trace("Node: ",t[c].id),a.addNode(0,t[c].id,t[c].descr,t[c].type);break;case 22:a.decorateNode({icon:t[c]});break;case 27:a.getLogger().trace("node found ..",t[c-2]),this.$={id:t[c-1],descr:t[c-1],type:a.getType(t[c-2],t[c])};break;case 28:this.$={id:t[c],descr:t[c],type:0};break;case 29:a.getLogger().trace("node found ..",t[c-3]),this.$={id:t[c-3],descr:t[c-1],type:a.getType(t[c-2],t[c])};break;case 30:this.$=t[c-1]+t[c];break;case 31:this.$=t[c];break}},"anonymous"),table:[{3:1,4:2,5:3,6:[1,5],8:h},{1:[3]},{1:[2,1]},{4:6,6:[1,7],7:[1,8],8:h},{6:p,7:[1,10],9:9,12:11,13:i,14:14,16:d,17:k,18:17,19:18,20:m,23:l},e(D,[2,3]),{1:[2,2]},e(D,[2,4]),e(D,[2,5]),{1:[2,6],6:p,12:21,13:i,14:14,16:d,17:k,18:17,19:18,20:m,23:l},{6:p,9:22,12:11,13:i,14:14,16:d,17:k,18:17,19:18,20:m,23:l},{6:I,7:g,10:23,11:w},e(E,[2,24],{18:17,19:18,14:27,16:[1,28],17:[1,29],20:m,23:l}),e(E,[2,19]),e(E,[2,21],{15:30,24:G}),e(E,[2,22]),e(E,[2,23]),e(N,[2,25]),e(N,[2,26]),e(N,[2,28],{20:[1,32]}),{21:[1,33]},{6:I,7:g,10:34,11:w},{1:[2,7],6:p,12:21,13:i,14:14,16:d,17:k,18:17,19:18,20:m,23:l},e(V,[2,14],{7:f,11:A}),e(L,[2,8]),e(L,[2,9]),e(L,[2,10]),e(E,[2,16],{15:37,24:G}),e(E,[2,17]),e(E,[2,18]),e(E,[2,20],{24:H}),e(N,[2,31]),{21:[1,39]},{22:[1,40]},e(V,[2,13],{7:f,11:A}),e(L,[2,11]),e(L,[2,12]),e(E,[2,15],{24:H}),e(N,[2,30]),{22:[1,41]},e(N,[2,27]),e(N,[2,29])],defaultActions:{2:[2,1],6:[2,2]},parseError:o(function(s,n){if(n.recoverable)this.trace(s);else{var r=new Error(s);throw r.hash=n,r}},"parseError"),parse:o(function(s){var n=this,r=[0],a=[],u=[null],t=[],M=this.table,c="",W=0,ie=0,ue=2,re=1,ge=t.slice.call(arguments,1),b=Object.create(this.lexer),R={yy:{}};for(var J in this.yy)Object.prototype.hasOwnProperty.call(this.yy,J)&&(R.yy[J]=this.yy[J]);b.setInput(s,R.yy),R.yy.lexer=b,R.yy.parser=this,typeof b.yylloc>"u"&&(b.yylloc={});var q=b.yylloc;t.push(q);var de=b.options&&b.options.ranges;typeof R.yy.parseError=="function"?this.parseError=R.yy.parseError:this.parseError=Object.getPrototypeOf(this).parseError;function pe(S){r.length=r.length-2*S,u.length=u.length-S,t.length=t.length-S}o(pe,"popStack");function ae(){var S;return S=a.pop()||b.lex()||re,typeof S!="number"&&(S instanceof Array&&(a=S,S=a.pop()),S=n.symbols_[S]||S),S}o(ae,"lex");for(var _,P,x,Q,j={},z,C,oe,X;;){if(P=r[r.length-1],this.defaultActions[P]?x=this.defaultActions[P]:((_===null||typeof _>"u")&&(_=ae()),x=M[P]&&M[P][_]),typeof x>"u"||!x.length||!x[0]){var Z="";X=[];for(z in M[P])this.terminals_[z]&&z>ue&&X.push("'"+this.terminals_[z]+"'");b.showPosition?Z="Parse error on line "+(W+1)+`:
1
+ import{g as fe}from"./9N5egcma.js";import{b as o,ay as te,X as U,aX as ye,ad as be,ah as me,aL as ke,b3 as Ee,O as K,aV as F,ax as _e,J as Se,an as Ne,au as ce,H as le}from"./Cdwy3-nO.js";var $=(function(){var e=o(function(O,s,n,r){for(n=n||{},r=O.length;r--;n[O[r]]=s);return n},"o"),h=[1,4],p=[1,13],i=[1,12],d=[1,15],k=[1,16],m=[1,20],l=[1,19],D=[6,7,8],I=[1,26],g=[1,24],w=[1,25],E=[6,7,11],G=[1,31],N=[6,7,11,24],V=[1,6,13,16,17,20,23],f=[1,35],A=[1,36],L=[1,6,7,11,13,16,17,20,23],H=[1,38],T={trace:o(function(){},"trace"),yy:{},symbols_:{error:2,start:3,mindMap:4,spaceLines:5,SPACELINE:6,NL:7,KANBAN:8,document:9,stop:10,EOF:11,statement:12,SPACELIST:13,node:14,shapeData:15,ICON:16,CLASS:17,nodeWithId:18,nodeWithoutId:19,NODE_DSTART:20,NODE_DESCR:21,NODE_DEND:22,NODE_ID:23,SHAPE_DATA:24,$accept:0,$end:1},terminals_:{2:"error",6:"SPACELINE",7:"NL",8:"KANBAN",11:"EOF",13:"SPACELIST",16:"ICON",17:"CLASS",20:"NODE_DSTART",21:"NODE_DESCR",22:"NODE_DEND",23:"NODE_ID",24:"SHAPE_DATA"},productions_:[0,[3,1],[3,2],[5,1],[5,2],[5,2],[4,2],[4,3],[10,1],[10,1],[10,1],[10,2],[10,2],[9,3],[9,2],[12,3],[12,2],[12,2],[12,2],[12,1],[12,2],[12,1],[12,1],[12,1],[12,1],[14,1],[14,1],[19,3],[18,1],[18,4],[15,2],[15,1]],performAction:o(function(s,n,r,a,u,t,M){var c=t.length-1;switch(u){case 6:case 7:return a;case 8:a.getLogger().trace("Stop NL ");break;case 9:a.getLogger().trace("Stop EOF ");break;case 11:a.getLogger().trace("Stop NL2 ");break;case 12:a.getLogger().trace("Stop EOF2 ");break;case 15:a.getLogger().info("Node: ",t[c-1].id),a.addNode(t[c-2].length,t[c-1].id,t[c-1].descr,t[c-1].type,t[c]);break;case 16:a.getLogger().info("Node: ",t[c].id),a.addNode(t[c-1].length,t[c].id,t[c].descr,t[c].type);break;case 17:a.getLogger().trace("Icon: ",t[c]),a.decorateNode({icon:t[c]});break;case 18:case 23:a.decorateNode({class:t[c]});break;case 19:a.getLogger().trace("SPACELIST");break;case 20:a.getLogger().trace("Node: ",t[c-1].id),a.addNode(0,t[c-1].id,t[c-1].descr,t[c-1].type,t[c]);break;case 21:a.getLogger().trace("Node: ",t[c].id),a.addNode(0,t[c].id,t[c].descr,t[c].type);break;case 22:a.decorateNode({icon:t[c]});break;case 27:a.getLogger().trace("node found ..",t[c-2]),this.$={id:t[c-1],descr:t[c-1],type:a.getType(t[c-2],t[c])};break;case 28:this.$={id:t[c],descr:t[c],type:0};break;case 29:a.getLogger().trace("node found ..",t[c-3]),this.$={id:t[c-3],descr:t[c-1],type:a.getType(t[c-2],t[c])};break;case 30:this.$=t[c-1]+t[c];break;case 31:this.$=t[c];break}},"anonymous"),table:[{3:1,4:2,5:3,6:[1,5],8:h},{1:[3]},{1:[2,1]},{4:6,6:[1,7],7:[1,8],8:h},{6:p,7:[1,10],9:9,12:11,13:i,14:14,16:d,17:k,18:17,19:18,20:m,23:l},e(D,[2,3]),{1:[2,2]},e(D,[2,4]),e(D,[2,5]),{1:[2,6],6:p,12:21,13:i,14:14,16:d,17:k,18:17,19:18,20:m,23:l},{6:p,9:22,12:11,13:i,14:14,16:d,17:k,18:17,19:18,20:m,23:l},{6:I,7:g,10:23,11:w},e(E,[2,24],{18:17,19:18,14:27,16:[1,28],17:[1,29],20:m,23:l}),e(E,[2,19]),e(E,[2,21],{15:30,24:G}),e(E,[2,22]),e(E,[2,23]),e(N,[2,25]),e(N,[2,26]),e(N,[2,28],{20:[1,32]}),{21:[1,33]},{6:I,7:g,10:34,11:w},{1:[2,7],6:p,12:21,13:i,14:14,16:d,17:k,18:17,19:18,20:m,23:l},e(V,[2,14],{7:f,11:A}),e(L,[2,8]),e(L,[2,9]),e(L,[2,10]),e(E,[2,16],{15:37,24:G}),e(E,[2,17]),e(E,[2,18]),e(E,[2,20],{24:H}),e(N,[2,31]),{21:[1,39]},{22:[1,40]},e(V,[2,13],{7:f,11:A}),e(L,[2,11]),e(L,[2,12]),e(E,[2,15],{24:H}),e(N,[2,30]),{22:[1,41]},e(N,[2,27]),e(N,[2,29])],defaultActions:{2:[2,1],6:[2,2]},parseError:o(function(s,n){if(n.recoverable)this.trace(s);else{var r=new Error(s);throw r.hash=n,r}},"parseError"),parse:o(function(s){var n=this,r=[0],a=[],u=[null],t=[],M=this.table,c="",W=0,ie=0,ue=2,re=1,ge=t.slice.call(arguments,1),b=Object.create(this.lexer),R={yy:{}};for(var J in this.yy)Object.prototype.hasOwnProperty.call(this.yy,J)&&(R.yy[J]=this.yy[J]);b.setInput(s,R.yy),R.yy.lexer=b,R.yy.parser=this,typeof b.yylloc>"u"&&(b.yylloc={});var q=b.yylloc;t.push(q);var de=b.options&&b.options.ranges;typeof R.yy.parseError=="function"?this.parseError=R.yy.parseError:this.parseError=Object.getPrototypeOf(this).parseError;function pe(S){r.length=r.length-2*S,u.length=u.length-S,t.length=t.length-S}o(pe,"popStack");function ae(){var S;return S=a.pop()||b.lex()||re,typeof S!="number"&&(S instanceof Array&&(a=S,S=a.pop()),S=n.symbols_[S]||S),S}o(ae,"lex");for(var _,P,x,Q,j={},z,C,oe,X;;){if(P=r[r.length-1],this.defaultActions[P]?x=this.defaultActions[P]:((_===null||typeof _>"u")&&(_=ae()),x=M[P]&&M[P][_]),typeof x>"u"||!x.length||!x[0]){var Z="";X=[];for(z in M[P])this.terminals_[z]&&z>ue&&X.push("'"+this.terminals_[z]+"'");b.showPosition?Z="Parse error on line "+(W+1)+`:
2
2
  `+b.showPosition()+`
3
3
  Expecting `+X.join(", ")+", got '"+(this.terminals_[_]||_)+"'":Z="Parse error on line "+(W+1)+": Unexpected "+(_==re?"end of input":"'"+(this.terminals_[_]||_)+"'"),this.parseError(Z,{text:b.match,token:this.terminals_[_]||_,line:b.yylineno,loc:q,expected:X})}if(x[0]instanceof Array&&x.length>1)throw new Error("Parse Error: multiple actions possible at state: "+P+", token: "+_);switch(x[0]){case 1:r.push(_),u.push(b.yytext),t.push(b.yylloc),r.push(x[1]),_=null,ie=b.yyleng,c=b.yytext,W=b.yylineno,q=b.yylloc;break;case 2:if(C=this.productions_[x[1]][1],j.$=u[u.length-C],j._$={first_line:t[t.length-(C||1)].first_line,last_line:t[t.length-1].last_line,first_column:t[t.length-(C||1)].first_column,last_column:t[t.length-1].last_column},de&&(j._$.range=[t[t.length-(C||1)].range[0],t[t.length-1].range[1]]),Q=this.performAction.apply(j,[c,ie,W,R.yy,x[1],u,t].concat(ge)),typeof Q<"u")return Q;C&&(r=r.slice(0,-1*C*2),u=u.slice(0,-1*C),t=t.slice(0,-1*C)),r.push(this.productions_[x[1]][0]),u.push(j.$),t.push(j._$),oe=M[r[r.length-2]][r[r.length-1]],r.push(oe);break;case 3:return!0}}return!0},"parse")},Y=(function(){var O={EOF:1,parseError:o(function(n,r){if(this.yy.parser)this.yy.parser.parseError(n,r);else throw new Error(n)},"parseError"),setInput:o(function(s,n){return this.yy=n||this.yy||{},this._input=s,this._more=this._backtrack=this.done=!1,this.yylineno=this.yyleng=0,this.yytext=this.matched=this.match="",this.conditionStack=["INITIAL"],this.yylloc={first_line:1,first_column:0,last_line:1,last_column:0},this.options.ranges&&(this.yylloc.range=[0,0]),this.offset=0,this},"setInput"),input:o(function(){var s=this._input[0];this.yytext+=s,this.yyleng++,this.offset++,this.match+=s,this.matched+=s;var n=s.match(/(?:\r\n?|\n).*/g);return n?(this.yylineno++,this.yylloc.last_line++):this.yylloc.last_column++,this.options.ranges&&this.yylloc.range[1]++,this._input=this._input.slice(1),s},"input"),unput:o(function(s){var n=s.length,r=s.split(/(?:\r\n?|\n)/g);this._input=s+this._input,this.yytext=this.yytext.substr(0,this.yytext.length-n),this.offset-=n;var a=this.match.split(/(?:\r\n?|\n)/g);this.match=this.match.substr(0,this.match.length-1),this.matched=this.matched.substr(0,this.matched.length-1),r.length-1&&(this.yylineno-=r.length-1);var u=this.yylloc.range;return this.yylloc={first_line:this.yylloc.first_line,last_line:this.yylineno+1,first_column:this.yylloc.first_column,last_column:r?(r.length===a.length?this.yylloc.first_column:0)+a[a.length-r.length].length-r[0].length:this.yylloc.first_column-n},this.options.ranges&&(this.yylloc.range=[u[0],u[0]+this.yyleng-n]),this.yyleng=this.yytext.length,this},"unput"),more:o(function(){return this._more=!0,this},"more"),reject:o(function(){if(this.options.backtrack_lexer)this._backtrack=!0;else return this.parseError("Lexical error on line "+(this.yylineno+1)+`. You can only invoke reject() in the lexer when the lexer is of the backtracking persuasion (options.backtrack_lexer = true).
4
4
  `+this.showPosition(),{text:"",token:null,line:this.yylineno});return this},"reject"),less:o(function(s){this.unput(this.match.slice(s))},"less"),pastInput:o(function(){var s=this.matched.substr(0,this.matched.length-this.match.length);return(s.length>20?"...":"")+s.substr(-20).replace(/\n/g,"")},"pastInput"),upcomingInput:o(function(){var s=this.match;return s.length<20&&(s+=this._input.substr(0,20-s.length)),(s.substr(0,20)+(s.length>20?"...":"")).replace(/\n/g,"")},"upcomingInput"),showPosition:o(function(){var s=this.pastInput(),n=new Array(s.length+1).join("-");return s+this.upcomingInput()+`
@@ -1,4 +1,4 @@
1
- var cQ=Object.defineProperty;var NB=Q=>{throw TypeError(Q)};var LQ=(Q,A,B)=>A in Q?cQ(Q,A,{enumerable:!0,configurable:!0,writable:!0,value:B}):Q[A]=B;var x=(Q,A,B)=>LQ(Q,typeof A!="symbol"?A+"":A,B),CB=(Q,A,B)=>A.has(Q)||NB("Cannot "+B);var g=(Q,A,B)=>(CB(Q,A,"read from private field"),B?B.call(Q):A.get(Q)),c=(Q,A,B)=>A.has(Q)?NB("Cannot add the same private member more than once"):A instanceof WeakSet?A.add(Q):A.set(Q,B),M=(Q,A,B,E)=>(CB(Q,A,"write to private field"),E?E.call(Q,B):A.set(Q,B),B),D=(Q,A,B)=>(CB(Q,A,"access private method"),B);var HB=(Q,A,B,E)=>({set _(I){M(Q,A,I,B)},get _(){return g(Q,A,E)}});import{a3 as tQ,r as hQ,Q as jQ}from"./8ysnd5N8.js";import{B as oQ,D as YQ}from"./CUllgFqe.js";const T=["none","attribute","attribute.jsx","boolean","comment","comment.doc","constant","constant.builtin","constructor","diff.minus","diff.plus","embedded","emphasis","emphasis.strong","function","function.definition","function.method","keyword","keyword.control","keyword.declaration","keyword.import","keyword.operator","label","namespace","number","operator","predictive","preproc","primary","property","property.json_key","punctuation","punctuation.bracket","punctuation.bracket.html","punctuation.bracket.jsx","punctuation.delimiter","punctuation.delimiter.html","punctuation.delimiter.jsx","punctuation.list_marker","punctuation.markup","punctuation.special","selector","selector.class","selector.id","string","string.escape","string.regex","string.special","string.special.symbol","tag","tag.doctype","tag.jsx","text.jsx","text.literal","title","type","type.builtin","type.class","variable","variable.parameter","variable.special","enum","hint","keyword.jsdoc","link_text","link_uri","selector.pseudo","tag.component.jsx","type.jsdoc","variable.jsdoc","variant","background","foreground"],aQ="--hls-",NQ=new TextEncoder,HQ=/^#([a-f0-9]{3,4}|[a-f0-9]{6}|[a-f0-9]{8})$/i,nQ=/^color\(display-p3\s+[+-]?(?:\d+(?:\.\d*)?|\.\d+)\s+[+-]?(?:\d+(?:\.\d*)?|\.\d+)\s+[+-]?(?:\d+(?:\.\d*)?|\.\d+)(?:\s*\/\s*[+-]?(?:\d+(?:\.\d*)?|\.\d+))?\s*\)$/i;function ZQ(Q){return typeof Q=="string"&&(HQ.test(Q.trim())||nQ.test(Q.trim()))}function FB(Q){return Q["editor.foreground"]??Q.text??Q.foreground}function uB(Q){return Q["editor.background"]??Q.background}const YB=["black","red","green","yellow","blue","magenta","cyan","white","bright_black","bright_red","bright_green","bright_yellow","bright_blue","bright_magenta","bright_cyan","bright_white"],eQ=["#000000","#cd3131","#0dbc79","#e5e510","#2472c8","#bc3fbc","#11a8cd","#e5e5e5","#666666","#f14c4c","#23d18b","#f5f543","#3b8eea","#d670d6","#29b8db","#ffffff"];function dQ(Q){return YB.map((A,B)=>zB({foreground:Q[`terminal.ansi.${A}`]},"foreground").color??eQ[B])}function OB(Q){return Q===null?"null":Q===void 0?"undefined":typeof Q=="string"?`the string ${JSON.stringify(Q)} (theme ids are not supported; import the theme object from "@pierre/highlights/themes")`:Array.isArray(Q)?"an array":typeof Q=="object"?"themes"in Q&&Array.isArray(Q.themes)?`a ThemeFamily whose first member is ${OB(Q.themes[0])}`:"an object without a `name`":`a ${typeof Q}`}function lQ(Q){return Q!=null&&typeof Q=="object"&&"name"in Q&&typeof Q.name=="string"&&Q.name!==""}function xQ(Q){const A=Q!=null&&typeof Q=="object"&&"themes"in Q&&Q.themes!=null?Q.themes[0]:Q;if(!lQ(A))throw new TypeError(`invalid theme: expected a Theme or ThemeFamily object, received ${OB(Q)}`);return A}function vB(Q,A){let B;for(let E=A;E!=="";){const I=Q[E];if(typeof I=="string")return{...B,color:I};if(I!=null&&typeof I=="object"&&(B??=I,I.color!=null))return{...B,color:I.color};const C=E.lastIndexOf(".");E=C<0?"":E.slice(0,C)}return B}function zB(Q,A){let B,E,I;return A==="background"?B=uB(Q):A==="foreground"?B=FB(Q):({color:B,font_style:E,font_weight:I}=vB(Q.syntax??{},A)??{},(E!=null||I!=null)&&(B??=FB(Q))),ZQ(B)?(B=B.trim().toLowerCase(),B.startsWith("#")&&(B.length<=5&&(B=B.replace(/[^#]/g,"$&$&")),B.length===9&&B.endsWith("ff")&&(B=B.slice(0,7)),B==="#00000000"&&(B=void 0))):B=void 0,{color:B,italic:E==="italic",weight:I!=null&&I>=100&&I<=900?Math.round(I/100)*100:0}}function zA(Q,A){return`var(${A}${Q.replace(/[._]/g,"-")})`}function gA(Q){return Q.replaceAll("&","&amp;").replaceAll('"',"&quot;").replaceAll("<","&lt;").replaceAll(">","&gt;")}function $B(Q){const A=Q.map(w=>NQ.encode(w));let B=4+8*A.length;const E=new Uint8Array(B+A.reduce((w,G)=>w+G.length,0)),I=new DataView(E.buffer);let C=32;for(let w=0;w<A.length;w++)I.setUint32(4+8*w,B,!0),I.setUint32(8+8*w,A[w].length,!0),E.set(A[w],B),B+=A[w].length,w!==0&&(C=Math.max(C,A[w].length+32));return I.setUint32(0,C,!0),E}const nB=new WeakMap;function SB(Q,A=aQ){const B=xQ(Q),E=B.cssVariables===!0?A:"";let I=nB.get(B);const C=I?.get(E);if(C!==void 0)return C;const w=B.cssVariables===!0?rQ(B.name,A):typeof B.cssVariables=="object"?bQ(B):WQ(B);return I===void 0&&(I=new Map,nB.set(B,I)),I.set(E,w),w}function bQ(Q){const A=Q.cssVariables;if(typeof A!="object")throw new Error("Expected CSS palette");const B=A.prefix??"--hls-",E=R=>{const i=A.defaults?.[R];return`var(${B}${R}${i?`, ${i}`:""})`},I=new Array(T.length).fill(null),C=Q.style.syntax??{};for(let R=1;R<T.length;R++){const i=vB(C,T[R]);I[R]={color:E(i?.color??"foreground"),italic:i?.font_style==="italic",weight:i?.font_weight===void 0?0:Math.round(i.font_weight/100)*100}}const w=E(FB(Q.style)??"foreground"),G=E(uB(Q.style)??"background");let k,S;return{name:Q.name,styles:I,fg:w,bg:G,table:void 0,get htmlOpeners(){return k??=_B(I,w,G)},get ansi(){return S??=YB.map(R=>{const i=Q.style[`terminal.ansi.${R}`];return E(typeof i=="string"?i:`terminal-ansi-${R.replace("_","-")}`)})}}}function rQ(Q,A){let B;const E=()=>B??=TQ(A);let I;return{name:Q,get styles(){return E().styles},get fg(){return E().fg},get bg(){return E().bg},table:void 0,htmlOpeners:void 0,get ansi(){return I??=YB.map(C=>zA(`terminal.ansi.${C}`,A))}}}function TQ(Q){const A=new Array(T.length).fill(null);for(let B=1;B<T.length;B++)A[B]={color:zA(T[B],Q),italic:!1,weight:0};return{styles:A,fg:zA("foreground",Q),bg:zA("background",Q)}}function WQ(Q){const A=Q.style??{},B=new Array(T.length).fill(null),E=new Uint8Array(T.length*5);let I,C,w=!1;for(let S=1;S<T.length;S++){const R=T[S],i=zB(A,R),{color:F,italic:s,weight:J}=i,t=S*5;if(F!==void 0)if(F.startsWith("#")){const a=parseInt(F.slice(1,7),16);E[t]=a>>16,E[t+1]=a>>8&255,E[t+2]=a&255,E[t+3]=F.length===9?parseInt(F.slice(7),16):255}else w=!0;E[t+4]=(s?16:0)|J/100,!(F===void 0&&!s&&J===0)&&(R==="foreground"?I=F:R==="background"?C=F:B[S]=i)}let G,k;return{name:Q.name,styles:B,fg:I,bg:C,table:w?void 0:E,get htmlOpeners(){if(w)return G??=_B(B,I,C)},get ansi(){return k??=dQ(A)}}}function _B(Q,A,B){const E=[`<pre class="highlights" style="${gA((B===void 0?"":`background-color:${B};`)+(A===void 0?"":`color:${A}`))}"><code>`];for(let I=1;I<T.length;I++){const C=Q[I],w=`color:${C?.color??"inherit"}`+(C?.italic===!0?";font-style:italic":"")+(C!=null&&C.weight!==0?`;font-weight:${C.weight}`:"");E.push(`<span style="${gA(w)}">`)}return $B(E)}const XQ=new TextEncoder,yA=new Uint8Array(T.length);for(let Q=0;Q<T.length;Q++){const A=T[Q];A==="string.regex"?yA[Q]=3:A==="comment"||A.startsWith("comment.")?yA[Q]=1:(A==="string"||A.startsWith("string."))&&(yA[Q]=2)}const ZB=new WeakMap,eB=new WeakMap;let fQ=1;const dB=new WeakMap,lB=new WeakMap,xB=new WeakMap;let KQ=0;function PQ(Q){let A=xB.get(Q);return A===void 0&&(A=KQ++,xB.set(Q,A)),A}function bB(Q,A,B){const{name:E,styles:I,fg:C,bg:w,table:G}=Q;return{color:A,role:B,name:E,styles:I,fg:C,bg:w,table:G,get ansi(){return Q.ansi}}}function lA(Q){const{cssVariablePrefix:A}=Q;if(Q.themes==null)return[bB(SB(Q.theme,A),null,"single")];const B=Object.entries(Q.themes).filter(([,R])=>R!=null).sort(([R],[i])=>R<i?-1:1);if(B.length===0)throw new TypeError("themes must not be empty");const E=Q.defaultColor??"light";let I;if(E==="light-dark()"){const R=B.find(([F])=>F==="light"),i=B.find(([F])=>F==="dark");if(R===void 0||i===void 0)throw new TypeError("`themes` must contain `light` and `dark` when defaultColor is 'light-dark()'");B.splice(0,B.length,R,i),I=["light-dark","light-dark"]}else{if(E!==!1){const R=B.findIndex(([i])=>i===E);if(R<0)throw new TypeError(`\`themes\` must contain the defaultColor key \`${E}\``);B.unshift(...B.splice(R,1))}I=B.map((R,i)=>E!==!1&&i===0?"default":"variable")}const C=B.map(([,R])=>SB(R,A)),w=JSON.stringify(B.map(([R],i)=>[PQ(C[i]),I[i],R]));let G=lB.get(C[0]);const k=G?.get(w);if(k!==void 0)return k;const S=B.map(([R],i)=>bB(C[i],R,I[i]));if(G===void 0&&(G=new Map,lB.set(C[0],G)),G.set(w,S),G.size>128){const R=G.keys().next().value;R!==void 0&&G.delete(R)}return S}function xA(Q,A,B,E,I,C,w=0){const G={content:Q.slice(A,B),offset:A+w};if(I[0].role==="single"){const{styles:S,fg:R}=I[0],i=S[E];G.color=i?.color??R;let F=0;i?.italic===!0&&(F|=1),(i?.weight??0)>=600&&(F|=2),G.fontStyle=F}else G.htmlStyle=aB(I,E,C);const k=yA[E];return k!==0&&(G.type=k),G}function AQ(Q,A){let B=ZB.get(Q);B===void 0&&(B=new Map,ZB.set(Q,B));let E=B.get(A);return E===void 0&&(E=[],B.set(A,E)),E}function aB(Q,A,B){const E=AQ(Q,B);let I=E[A];if(I===void 0){if(Q[0].role==="light-dark")I=pQ(Q,A,B);else{I={};for(const{color:C,role:w,styles:G,fg:k}of Q){const S=G[A],R=w==="default";I[R?"color":B+C]=S?.color??k??"inherit",S?.italic===!0&&(I[R?"font-style":`${B}${C}-font-style`]="italic"),S!=null&&S.weight!==0&&(I[R?"font-weight":`${B}${C}-font-weight`]=String(S.weight))}}E[A]=I}return I}function VQ(Q,A){let B=eB.get(Q);B===void 0&&(B=new Map,eB.set(Q,B));const E=B.get(A);if(E!==void 0)return E??void 0;const I=Q.length;if(!(I<=255&&Q.every(J=>J.table!==void 0))){B.set(A,null);return}const C=Q.map(J=>J.role==="default"?new Uint8Array(0):XQ.encode(gA(`${A}${J.color}`))),w=32+16*I,G=w+384*I;let k=64,S=128,R=0;for(const{length:J}of C)k+=64+3*J,S+=48+2*J,R+=J;const i=new Uint8Array(G+R),F=new DataView(i.buffer);i[0]=I,i[1]=Q[0].role==="light-dark"?1:0,F.setUint32(4,w,!0),F.setUint32(8,k,!0),F.setUint32(12,S,!0),F.setUint32(16,fQ++,!0);let s=G;for(let J=0;J<I;J++){const t=32+16*J;F.setUint32(t,s,!0),F.setUint32(t+4,C[J].length,!0),F.setUint32(t+8,Q[J].role==="default"?1:0,!0),i.set(Q[J].table,w+384*J),i.set(C[J],s),s+=C[J].length}return B.set(A,i),i}function mQ(Q,A){let B=dB.get(Q);B===void 0&&(B=new Map,dB.set(Q,B));const E=B.get(A);if(E!==void 0)return E;const{fg:I,bg:C,rootStyle:w}=kB(Q,A),G=[`<pre class="highlights" style="${gA(w??`background-color:${C};color:${I}`)}"><code>`];for(let S=1;S<T.length;S++){const R=aB(Q,S,A);let i="";for(const F in R)i+=`${i===""?"":";"}${F}:${R[F]}`;G.push(`<span style="${gA(i)}">`)}const k=$B(G);return B.set(A,k),k}function pQ(Q,A,B){const[E,I]=Q,C=E.styles[A],w=I.styles[A],G=C?.color??E.fg??"currentcolor",k=w?.color??I.fg??"currentcolor",S={color:G===k?G:`light-dark(${G}, ${k})`},R=C?.italic===!0,i=w?.italic===!0;R&&i?S["font-style"]="italic":(R&&(S[`${B}light-font-style`]="italic"),i&&(S[`${B}dark-font-style`]="italic"));const F=C?.weight??0,s=w?.weight??0;return F!==0&&F===s?S["font-weight"]=String(F):(F!==0&&(S[`${B}light-font-weight`]=String(F)),s!==0&&(S[`${B}dark-font-weight`]=String(s))),S}function BQ(Q,A,B,E,I,C=0){const w=[],G=I??0,{styles:k,fg:S,role:R}=B[0],i=R==="single"?void 0:AQ(B,E);let F=0;for(let s=0;;s+=2){const J=s;for(;s<A.length&&A[s+1]!==4294967295;)s+=2;const t=s===J?F:A[s-2];let a;if(G>0&&t-F>=G)a=[xA(Q,F,t,0,B,E,C)];else{a=new Array((s-J)/2);let o=0;for(let n=J;n<s;n+=2){const Z=A[n];if(Z>F){const h=A[n+1];let L;if(i===void 0){const H=k[h];L={content:Q.slice(F,Z),offset:F+C,color:H?.color??S,fontStyle:(H?.italic===!0?1:0)|((H?.weight??0)>=600?2:0)}}else L={content:Q.slice(F,Z),offset:F+C,htmlStyle:i[h]??aB(B,h,E)};const y=yA[h];y!==0&&(L.type=y),a[o++]=L,F=Z}}a.length=o}if(w.push(a),s===A.length)break;F=A[s]}return w}function kB(Q,A){if(Q[0].role==="single")return{fg:Q[0].fg,bg:Q[0].bg,themeName:Q[0].name};const B=`highlights-themes ${Q.map(C=>C.name).join(" ")}`;if(Q[0].role==="light-dark"){const C=(w,G,k)=>{const S=w??k,R=G??k;return S===R?S:`light-dark(${S}, ${R})`};return{fg:C(Q[0].fg,Q[1].fg,"currentcolor"),bg:C(Q[0].bg,Q[1].bg,"transparent"),themeName:B}}const E=Q.map(C=>C.role==="default"?C.fg??"inherit":`${A}${C.color}:${C.fg??"inherit"}`).join(";"),I=Q.map(C=>C.role==="default"?C.bg??"inherit":`${A}${C.color}-bg:${C.bg??"inherit"}`).join(";");return{fg:E,bg:I,themeName:B,rootStyle:Q[0].role==="default"?void 0:`${E};${I}`}}const sB=1,QQ=2,EQ=4,IQ=8,CQ=16,gQ=32,rB=[0,sB,QQ,EQ,IQ,0,0,CQ,0,gQ],gB=[0,95,135,175,215,255],wB=/\x1b(?:\[([0-?]*)[ -/]*([@-~])|\][^\x07\x1b\n]*(?:\x07|\x1b\\)|[ -/]*[0-~])/y;var wQ=class{constructor(){x(this,"fg",-1);x(this,"bg",-1);x(this,"flags",0);x(this,"styles",new Map)}};function bA(Q){return String(Q).toLowerCase()==="ansi"}function RB(Q,A){if(A<16)return Q.ansi[A];let B=A&16777215;if(A<232){const E=A-16;B=gB[E/36|0]<<16|gB[(E/6|0)%6]<<8|gB[E%6]}else A<256&&(B=(8+(A-232)*10)*65793);return`#${B.toString(16).padStart(6,"0")}`}function UB(Q,A,B,E,I=new wQ,C=0){const w=[],G=E??0;let k=[],S,R,i,F=Q.indexOf("\x1B"),s=0;for(;;){const J=Q.indexOf(`
1
+ var cQ=Object.defineProperty;var NB=Q=>{throw TypeError(Q)};var LQ=(Q,A,B)=>A in Q?cQ(Q,A,{enumerable:!0,configurable:!0,writable:!0,value:B}):Q[A]=B;var x=(Q,A,B)=>LQ(Q,typeof A!="symbol"?A+"":A,B),CB=(Q,A,B)=>A.has(Q)||NB("Cannot "+B);var g=(Q,A,B)=>(CB(Q,A,"read from private field"),B?B.call(Q):A.get(Q)),c=(Q,A,B)=>A.has(Q)?NB("Cannot add the same private member more than once"):A instanceof WeakSet?A.add(Q):A.set(Q,B),M=(Q,A,B,E)=>(CB(Q,A,"write to private field"),E?E.call(Q,B):A.set(Q,B),B),D=(Q,A,B)=>(CB(Q,A,"access private method"),B);var HB=(Q,A,B,E)=>({set _(I){M(Q,A,I,B)},get _(){return g(Q,A,E)}});import{a3 as tQ,r as hQ,Q as jQ}from"./Dm529rkq.js";import{B as oQ,D as YQ}from"./G0vgahzI.js";const T=["none","attribute","attribute.jsx","boolean","comment","comment.doc","constant","constant.builtin","constructor","diff.minus","diff.plus","embedded","emphasis","emphasis.strong","function","function.definition","function.method","keyword","keyword.control","keyword.declaration","keyword.import","keyword.operator","label","namespace","number","operator","predictive","preproc","primary","property","property.json_key","punctuation","punctuation.bracket","punctuation.bracket.html","punctuation.bracket.jsx","punctuation.delimiter","punctuation.delimiter.html","punctuation.delimiter.jsx","punctuation.list_marker","punctuation.markup","punctuation.special","selector","selector.class","selector.id","string","string.escape","string.regex","string.special","string.special.symbol","tag","tag.doctype","tag.jsx","text.jsx","text.literal","title","type","type.builtin","type.class","variable","variable.parameter","variable.special","enum","hint","keyword.jsdoc","link_text","link_uri","selector.pseudo","tag.component.jsx","type.jsdoc","variable.jsdoc","variant","background","foreground"],aQ="--hls-",NQ=new TextEncoder,HQ=/^#([a-f0-9]{3,4}|[a-f0-9]{6}|[a-f0-9]{8})$/i,nQ=/^color\(display-p3\s+[+-]?(?:\d+(?:\.\d*)?|\.\d+)\s+[+-]?(?:\d+(?:\.\d*)?|\.\d+)\s+[+-]?(?:\d+(?:\.\d*)?|\.\d+)(?:\s*\/\s*[+-]?(?:\d+(?:\.\d*)?|\.\d+))?\s*\)$/i;function ZQ(Q){return typeof Q=="string"&&(HQ.test(Q.trim())||nQ.test(Q.trim()))}function FB(Q){return Q["editor.foreground"]??Q.text??Q.foreground}function uB(Q){return Q["editor.background"]??Q.background}const YB=["black","red","green","yellow","blue","magenta","cyan","white","bright_black","bright_red","bright_green","bright_yellow","bright_blue","bright_magenta","bright_cyan","bright_white"],eQ=["#000000","#cd3131","#0dbc79","#e5e510","#2472c8","#bc3fbc","#11a8cd","#e5e5e5","#666666","#f14c4c","#23d18b","#f5f543","#3b8eea","#d670d6","#29b8db","#ffffff"];function dQ(Q){return YB.map((A,B)=>zB({foreground:Q[`terminal.ansi.${A}`]},"foreground").color??eQ[B])}function OB(Q){return Q===null?"null":Q===void 0?"undefined":typeof Q=="string"?`the string ${JSON.stringify(Q)} (theme ids are not supported; import the theme object from "@pierre/highlights/themes")`:Array.isArray(Q)?"an array":typeof Q=="object"?"themes"in Q&&Array.isArray(Q.themes)?`a ThemeFamily whose first member is ${OB(Q.themes[0])}`:"an object without a `name`":`a ${typeof Q}`}function lQ(Q){return Q!=null&&typeof Q=="object"&&"name"in Q&&typeof Q.name=="string"&&Q.name!==""}function xQ(Q){const A=Q!=null&&typeof Q=="object"&&"themes"in Q&&Q.themes!=null?Q.themes[0]:Q;if(!lQ(A))throw new TypeError(`invalid theme: expected a Theme or ThemeFamily object, received ${OB(Q)}`);return A}function vB(Q,A){let B;for(let E=A;E!=="";){const I=Q[E];if(typeof I=="string")return{...B,color:I};if(I!=null&&typeof I=="object"&&(B??=I,I.color!=null))return{...B,color:I.color};const C=E.lastIndexOf(".");E=C<0?"":E.slice(0,C)}return B}function zB(Q,A){let B,E,I;return A==="background"?B=uB(Q):A==="foreground"?B=FB(Q):({color:B,font_style:E,font_weight:I}=vB(Q.syntax??{},A)??{},(E!=null||I!=null)&&(B??=FB(Q))),ZQ(B)?(B=B.trim().toLowerCase(),B.startsWith("#")&&(B.length<=5&&(B=B.replace(/[^#]/g,"$&$&")),B.length===9&&B.endsWith("ff")&&(B=B.slice(0,7)),B==="#00000000"&&(B=void 0))):B=void 0,{color:B,italic:E==="italic",weight:I!=null&&I>=100&&I<=900?Math.round(I/100)*100:0}}function zA(Q,A){return`var(${A}${Q.replace(/[._]/g,"-")})`}function gA(Q){return Q.replaceAll("&","&amp;").replaceAll('"',"&quot;").replaceAll("<","&lt;").replaceAll(">","&gt;")}function $B(Q){const A=Q.map(w=>NQ.encode(w));let B=4+8*A.length;const E=new Uint8Array(B+A.reduce((w,G)=>w+G.length,0)),I=new DataView(E.buffer);let C=32;for(let w=0;w<A.length;w++)I.setUint32(4+8*w,B,!0),I.setUint32(8+8*w,A[w].length,!0),E.set(A[w],B),B+=A[w].length,w!==0&&(C=Math.max(C,A[w].length+32));return I.setUint32(0,C,!0),E}const nB=new WeakMap;function SB(Q,A=aQ){const B=xQ(Q),E=B.cssVariables===!0?A:"";let I=nB.get(B);const C=I?.get(E);if(C!==void 0)return C;const w=B.cssVariables===!0?rQ(B.name,A):typeof B.cssVariables=="object"?bQ(B):WQ(B);return I===void 0&&(I=new Map,nB.set(B,I)),I.set(E,w),w}function bQ(Q){const A=Q.cssVariables;if(typeof A!="object")throw new Error("Expected CSS palette");const B=A.prefix??"--hls-",E=R=>{const i=A.defaults?.[R];return`var(${B}${R}${i?`, ${i}`:""})`},I=new Array(T.length).fill(null),C=Q.style.syntax??{};for(let R=1;R<T.length;R++){const i=vB(C,T[R]);I[R]={color:E(i?.color??"foreground"),italic:i?.font_style==="italic",weight:i?.font_weight===void 0?0:Math.round(i.font_weight/100)*100}}const w=E(FB(Q.style)??"foreground"),G=E(uB(Q.style)??"background");let k,S;return{name:Q.name,styles:I,fg:w,bg:G,table:void 0,get htmlOpeners(){return k??=_B(I,w,G)},get ansi(){return S??=YB.map(R=>{const i=Q.style[`terminal.ansi.${R}`];return E(typeof i=="string"?i:`terminal-ansi-${R.replace("_","-")}`)})}}}function rQ(Q,A){let B;const E=()=>B??=TQ(A);let I;return{name:Q,get styles(){return E().styles},get fg(){return E().fg},get bg(){return E().bg},table:void 0,htmlOpeners:void 0,get ansi(){return I??=YB.map(C=>zA(`terminal.ansi.${C}`,A))}}}function TQ(Q){const A=new Array(T.length).fill(null);for(let B=1;B<T.length;B++)A[B]={color:zA(T[B],Q),italic:!1,weight:0};return{styles:A,fg:zA("foreground",Q),bg:zA("background",Q)}}function WQ(Q){const A=Q.style??{},B=new Array(T.length).fill(null),E=new Uint8Array(T.length*5);let I,C,w=!1;for(let S=1;S<T.length;S++){const R=T[S],i=zB(A,R),{color:F,italic:s,weight:J}=i,t=S*5;if(F!==void 0)if(F.startsWith("#")){const a=parseInt(F.slice(1,7),16);E[t]=a>>16,E[t+1]=a>>8&255,E[t+2]=a&255,E[t+3]=F.length===9?parseInt(F.slice(7),16):255}else w=!0;E[t+4]=(s?16:0)|J/100,!(F===void 0&&!s&&J===0)&&(R==="foreground"?I=F:R==="background"?C=F:B[S]=i)}let G,k;return{name:Q.name,styles:B,fg:I,bg:C,table:w?void 0:E,get htmlOpeners(){if(w)return G??=_B(B,I,C)},get ansi(){return k??=dQ(A)}}}function _B(Q,A,B){const E=[`<pre class="highlights" style="${gA((B===void 0?"":`background-color:${B};`)+(A===void 0?"":`color:${A}`))}"><code>`];for(let I=1;I<T.length;I++){const C=Q[I],w=`color:${C?.color??"inherit"}`+(C?.italic===!0?";font-style:italic":"")+(C!=null&&C.weight!==0?`;font-weight:${C.weight}`:"");E.push(`<span style="${gA(w)}">`)}return $B(E)}const XQ=new TextEncoder,yA=new Uint8Array(T.length);for(let Q=0;Q<T.length;Q++){const A=T[Q];A==="string.regex"?yA[Q]=3:A==="comment"||A.startsWith("comment.")?yA[Q]=1:(A==="string"||A.startsWith("string."))&&(yA[Q]=2)}const ZB=new WeakMap,eB=new WeakMap;let fQ=1;const dB=new WeakMap,lB=new WeakMap,xB=new WeakMap;let KQ=0;function PQ(Q){let A=xB.get(Q);return A===void 0&&(A=KQ++,xB.set(Q,A)),A}function bB(Q,A,B){const{name:E,styles:I,fg:C,bg:w,table:G}=Q;return{color:A,role:B,name:E,styles:I,fg:C,bg:w,table:G,get ansi(){return Q.ansi}}}function lA(Q){const{cssVariablePrefix:A}=Q;if(Q.themes==null)return[bB(SB(Q.theme,A),null,"single")];const B=Object.entries(Q.themes).filter(([,R])=>R!=null).sort(([R],[i])=>R<i?-1:1);if(B.length===0)throw new TypeError("themes must not be empty");const E=Q.defaultColor??"light";let I;if(E==="light-dark()"){const R=B.find(([F])=>F==="light"),i=B.find(([F])=>F==="dark");if(R===void 0||i===void 0)throw new TypeError("`themes` must contain `light` and `dark` when defaultColor is 'light-dark()'");B.splice(0,B.length,R,i),I=["light-dark","light-dark"]}else{if(E!==!1){const R=B.findIndex(([i])=>i===E);if(R<0)throw new TypeError(`\`themes\` must contain the defaultColor key \`${E}\``);B.unshift(...B.splice(R,1))}I=B.map((R,i)=>E!==!1&&i===0?"default":"variable")}const C=B.map(([,R])=>SB(R,A)),w=JSON.stringify(B.map(([R],i)=>[PQ(C[i]),I[i],R]));let G=lB.get(C[0]);const k=G?.get(w);if(k!==void 0)return k;const S=B.map(([R],i)=>bB(C[i],R,I[i]));if(G===void 0&&(G=new Map,lB.set(C[0],G)),G.set(w,S),G.size>128){const R=G.keys().next().value;R!==void 0&&G.delete(R)}return S}function xA(Q,A,B,E,I,C,w=0){const G={content:Q.slice(A,B),offset:A+w};if(I[0].role==="single"){const{styles:S,fg:R}=I[0],i=S[E];G.color=i?.color??R;let F=0;i?.italic===!0&&(F|=1),(i?.weight??0)>=600&&(F|=2),G.fontStyle=F}else G.htmlStyle=aB(I,E,C);const k=yA[E];return k!==0&&(G.type=k),G}function AQ(Q,A){let B=ZB.get(Q);B===void 0&&(B=new Map,ZB.set(Q,B));let E=B.get(A);return E===void 0&&(E=[],B.set(A,E)),E}function aB(Q,A,B){const E=AQ(Q,B);let I=E[A];if(I===void 0){if(Q[0].role==="light-dark")I=pQ(Q,A,B);else{I={};for(const{color:C,role:w,styles:G,fg:k}of Q){const S=G[A],R=w==="default";I[R?"color":B+C]=S?.color??k??"inherit",S?.italic===!0&&(I[R?"font-style":`${B}${C}-font-style`]="italic"),S!=null&&S.weight!==0&&(I[R?"font-weight":`${B}${C}-font-weight`]=String(S.weight))}}E[A]=I}return I}function VQ(Q,A){let B=eB.get(Q);B===void 0&&(B=new Map,eB.set(Q,B));const E=B.get(A);if(E!==void 0)return E??void 0;const I=Q.length;if(!(I<=255&&Q.every(J=>J.table!==void 0))){B.set(A,null);return}const C=Q.map(J=>J.role==="default"?new Uint8Array(0):XQ.encode(gA(`${A}${J.color}`))),w=32+16*I,G=w+384*I;let k=64,S=128,R=0;for(const{length:J}of C)k+=64+3*J,S+=48+2*J,R+=J;const i=new Uint8Array(G+R),F=new DataView(i.buffer);i[0]=I,i[1]=Q[0].role==="light-dark"?1:0,F.setUint32(4,w,!0),F.setUint32(8,k,!0),F.setUint32(12,S,!0),F.setUint32(16,fQ++,!0);let s=G;for(let J=0;J<I;J++){const t=32+16*J;F.setUint32(t,s,!0),F.setUint32(t+4,C[J].length,!0),F.setUint32(t+8,Q[J].role==="default"?1:0,!0),i.set(Q[J].table,w+384*J),i.set(C[J],s),s+=C[J].length}return B.set(A,i),i}function mQ(Q,A){let B=dB.get(Q);B===void 0&&(B=new Map,dB.set(Q,B));const E=B.get(A);if(E!==void 0)return E;const{fg:I,bg:C,rootStyle:w}=kB(Q,A),G=[`<pre class="highlights" style="${gA(w??`background-color:${C};color:${I}`)}"><code>`];for(let S=1;S<T.length;S++){const R=aB(Q,S,A);let i="";for(const F in R)i+=`${i===""?"":";"}${F}:${R[F]}`;G.push(`<span style="${gA(i)}">`)}const k=$B(G);return B.set(A,k),k}function pQ(Q,A,B){const[E,I]=Q,C=E.styles[A],w=I.styles[A],G=C?.color??E.fg??"currentcolor",k=w?.color??I.fg??"currentcolor",S={color:G===k?G:`light-dark(${G}, ${k})`},R=C?.italic===!0,i=w?.italic===!0;R&&i?S["font-style"]="italic":(R&&(S[`${B}light-font-style`]="italic"),i&&(S[`${B}dark-font-style`]="italic"));const F=C?.weight??0,s=w?.weight??0;return F!==0&&F===s?S["font-weight"]=String(F):(F!==0&&(S[`${B}light-font-weight`]=String(F)),s!==0&&(S[`${B}dark-font-weight`]=String(s))),S}function BQ(Q,A,B,E,I,C=0){const w=[],G=I??0,{styles:k,fg:S,role:R}=B[0],i=R==="single"?void 0:AQ(B,E);let F=0;for(let s=0;;s+=2){const J=s;for(;s<A.length&&A[s+1]!==4294967295;)s+=2;const t=s===J?F:A[s-2];let a;if(G>0&&t-F>=G)a=[xA(Q,F,t,0,B,E,C)];else{a=new Array((s-J)/2);let o=0;for(let n=J;n<s;n+=2){const Z=A[n];if(Z>F){const h=A[n+1];let L;if(i===void 0){const H=k[h];L={content:Q.slice(F,Z),offset:F+C,color:H?.color??S,fontStyle:(H?.italic===!0?1:0)|((H?.weight??0)>=600?2:0)}}else L={content:Q.slice(F,Z),offset:F+C,htmlStyle:i[h]??aB(B,h,E)};const y=yA[h];y!==0&&(L.type=y),a[o++]=L,F=Z}}a.length=o}if(w.push(a),s===A.length)break;F=A[s]}return w}function kB(Q,A){if(Q[0].role==="single")return{fg:Q[0].fg,bg:Q[0].bg,themeName:Q[0].name};const B=`highlights-themes ${Q.map(C=>C.name).join(" ")}`;if(Q[0].role==="light-dark"){const C=(w,G,k)=>{const S=w??k,R=G??k;return S===R?S:`light-dark(${S}, ${R})`};return{fg:C(Q[0].fg,Q[1].fg,"currentcolor"),bg:C(Q[0].bg,Q[1].bg,"transparent"),themeName:B}}const E=Q.map(C=>C.role==="default"?C.fg??"inherit":`${A}${C.color}:${C.fg??"inherit"}`).join(";"),I=Q.map(C=>C.role==="default"?C.bg??"inherit":`${A}${C.color}-bg:${C.bg??"inherit"}`).join(";");return{fg:E,bg:I,themeName:B,rootStyle:Q[0].role==="default"?void 0:`${E};${I}`}}const sB=1,QQ=2,EQ=4,IQ=8,CQ=16,gQ=32,rB=[0,sB,QQ,EQ,IQ,0,0,CQ,0,gQ],gB=[0,95,135,175,215,255],wB=/\x1b(?:\[([0-?]*)[ -/]*([@-~])|\][^\x07\x1b\n]*(?:\x07|\x1b\\)|[ -/]*[0-~])/y;var wQ=class{constructor(){x(this,"fg",-1);x(this,"bg",-1);x(this,"flags",0);x(this,"styles",new Map)}};function bA(Q){return String(Q).toLowerCase()==="ansi"}function RB(Q,A){if(A<16)return Q.ansi[A];let B=A&16777215;if(A<232){const E=A-16;B=gB[E/36|0]<<16|gB[(E/6|0)%6]<<8|gB[E%6]}else A<256&&(B=(8+(A-232)*10)*65793);return`#${B.toString(16).padStart(6,"0")}`}function UB(Q,A,B,E,I=new wQ,C=0){const w=[],G=E??0;let k=[],S,R,i,F=Q.indexOf("\x1B"),s=0;for(;;){const J=Q.indexOf(`
2
2
  `,s);let t=J<0?Q.length:J;J>s&&Q.charCodeAt(J-1)===13&&t--;const a=G>0&&t-s>=G;for(;s<t;){F>=0&&F<s&&(F=Q.indexOf("\x1B",s));let o=F>=0&&F<t?F:t,n=o,Z;if(o<t){wB.lastIndex=o;const h=wB.exec(Q);h===null?n=++o:(n=wB.lastIndex,h[2]==="m"&&!(h[1].charCodeAt(0)>=60)&&(Z=h[1]))}if(o>s&&a)R===void 0?(R=xA(Q,s,o,0,A,B,C),k.push(R)):R.content+=Q.slice(s,o);else if(o>s){if(S===void 0){const{fg:h,bg:L,flags:y}=I,H=`${h},${L},${y}`;if(S=I.styles.get(H),S===void 0){const m=((y&EQ)!==0?1:0)|((y&sB)!==0?2:0)|((y&IQ)!==0?4:0)|((y&gQ)!==0?8:0),z=A.map(e=>{let j=h<0?e.fg:RB(e,h),$=L<0?void 0:RB(e,L);return(y&CQ)!==0&&($=j,j=L<0?e.bg:RB(e,L)),(y&QQ)!==0&&j!==void 0&&(j=j.startsWith("#")?j.length===9?j.slice(0,7)+Math.round(parseInt(j.slice(7),16)/2).toString(16).padStart(2,"0"):`${j}80`:`color-mix(in srgb, ${j} 50%, transparent)`),[j,$]});if(A[0].role==="single"){const[e,j]=z[0];S=j===void 0?{color:e,fontStyle:m}:{color:e,bgColor:j,fontStyle:m}}else{const e=[];(m&1)!==0&&e.push(["font-style","italic"]),(m&2)!==0&&e.push(["font-weight","bold"]),(m&12)!==0&&e.push(["text-decoration",(m&12)===12?"underline line-through":(m&4)!==0?"underline":"line-through"]);const j={};if(A[0].role==="light-dark"){const[[$,pA],[qA,sA]]=z,wA=$??"currentcolor",HA=qA??"currentcolor";if(j.color=wA===HA?wA:`light-dark(${wA}, ${HA})`,pA!==void 0||sA!==void 0){const RA=pA??"transparent",uA=sA??"transparent";j["background-color"]=RA===uA?RA:`light-dark(${RA}, ${uA})`}for(const[RA,uA]of e)j[RA]=uA}else for(let $=0;$<A.length;$++){const[pA,qA]=z[$],sA=A[$].role==="default",wA=`${B}${A[$].color}`;j[sA?"color":wA]=pA??"inherit",qA!==void 0&&(j[sA?"background-color":`${wA}-bg`]=qA);for(const[HA,RA]of e)j[sA?HA:`${wA}-${HA}`]=RA}S={htmlStyle:j}}I.styles.set(H,S)}}R!==void 0&&i===S?R.content+=Q.slice(s,o):(R={content:Q.slice(s,o),offset:s+C,...S},i=S,k.push(R))}if(Z!==void 0){const h=Z.split(";");for(let L=0;L<h.length;L++){const y=Number(h[L]);if(y===0)I.fg=-1,I.bg=-1,I.flags=0;else if(y<10)I.flags|=rB[y]??0;else if(y>20&&y<30)I.flags&=~((rB[y-20]??0)|(y===22?sB:0));else if(y>=30&&y<38)I.fg=y-30;else if(y===39)I.fg=-1;else if(y>=40&&y<48)I.bg=y-40;else if(y===49)I.bg=-1;else if(y>=90&&y<98)I.fg=y-82;else if(y>=100&&y<108)I.bg=y-92;else if(y===38||y===48){const H=h[++L];let m=-1;if(H==="5"){const z=Number(h[++L]);Number.isInteger(z)&&z<256&&(m=z)}else if(H==="2"){const z=Number(h[L+1]),e=Number(h[L+2]),j=Number(h[L+3]);L+=3,z>=0&&e>=0&&j>=0&&(m=16777216|Math.min(z,255)<<16|Math.min(e,255)<<8|Math.min(j,255))}m>=0&&(y===38?I.fg=m:I.bg=m)}}S=void 0}s=n}if(w.push(k),J<0)return w;s=J+1,k=[],R=void 0}}const qQ={plain:0,plaintext:0,text:0,txt:0,abap:1,ada:2,adb:2,ads:2,"angular-html":3,apache:4,apacheconf:4,htaccess:4,apex:5,applescript:6,adoc:7,asciidoc:7,asm:8,assembly:8,mips:8,mipsasm:8,riscv:8,s:8,astro:9,awk:10,bash:11,sh:11,shell:11,shellscript:11,shellsession:11,zsh:11,bat:12,batch:12,batchfile:12,cmd:12,dos:12,bib:13,bibtex:13,bicep:14,blade:15,c:16,h:16,c3:17,clj:18,cljc:18,cljs:18,clojure:18,edn:18,cmake:19,cbl:20,cob:20,cobol:20,codeowners:21,codeql:22,ql:22,coffee:23,coffeescript:23,coq:24,rocq:24,"c++":25,cc:25,cpp:25,cxx:25,hh:25,hpp:25,hxx:25,"c#":26,cs:26,csharp:26,css:27,postcss:27,qss:27,csv:28,cu:29,cuda:29,cuh:29,cql:30,cypher:30,d:31,dart:32,dax:33,diff:34,"git-commit":34,"git-rebase":34,patch:34,containerfile:35,docker:35,dockerfile:35,dotenv:36,env:36,elixir:37,ex:37,exs:37,elm:38,erb:39,erl:40,erlang:40,hrl:40,fish:41,f03:42,f08:42,f90:42,f95:42,fortran:42,"fortran-free-form":42,f:43,f77:43,for:43,"fortran-fixed-form":43,"f#":44,fs:44,fsharp:44,fsi:44,fsx:44,gdresource:45,"godot-resource":45,tres:45,tscn:45,gd:46,gdscript:46,gdshader:47,gdshaderinc:47,"godot-shader":47,cucumber:48,feature:48,gherkin:48,gleam:49,comp:50,frag:50,geom:50,glsl:50,vert:50,gnuplot:51,gp:51,go:52,golang:52,gql:53,graphql:53,groq:54,gradle:55,groovy:55,gsh:55,gvy:55,gy:55,nextflow:55,"nextflow-groovy":55,nf:55,hack:56,haml:57,handlebars:58,hbs:58,mustache:58,haskell:59,hs:59,haxe:60,hx:60,hlsl:61,htm:62,html:62,"html-derivative":62,http:63,desktop:64,ini:64,properties:64,systemd:64,java:65,j2:66,jinja:66,jinja2:66,cjs:67,javascript:67,js:67,mjs:67,json:68,jsonc:68,json5:69,jsonl:70,jsonnet:71,libsonnet:71,jsx:72,jl:73,julia:73,just:74,justfile:74,kdl:75,kotlin:76,kt:76,kts:76,latex:77,tex:77,lean:78,lean4:78,less:79,liquid:80,cl:81,el:81,elisp:81,"emacs-lisp":81,lisp:81,lsp:81,racket:81,rkt:81,scheme:81,scm:81,llvm:82,log:83,lua:84,luau:85,make:86,makefile:86,mk:86,markdown:87,md:87,mdc:87,matlab:88,octave:88,mdx:89,mermaid:90,mmd:90,mbt:91,moonbit:91,nginx:92,nim:93,nix:94,m:95,mm:95,objc:95,objcpp:95,"objective-c":95,"objective-cpp":95,objectivec:95,ml:96,mli:96,ocaml:96,odin:97,openscad:98,scad:98,delphi:99,dpk:99,dpr:99,lpr:99,"object-pascal":99,objectpascal:99,pas:99,pascal:99,pp:99,perl:100,pl:100,pm:100,php:101,plsql:102,po:103,pot:103,potx:103,powerquery:104,pq:104,powershell:105,ps:105,ps1:105,psd1:105,psm1:105,pwsh:105,prisma:106,prolog:107,promql:108,proto:109,protobuf:109,jade:110,pug:110,puppet:111,py:112,python:112,qml:113,r:114,rscript:114,cshtml:115,razor:115,reg:116,rosmsg:117,restructuredtext:118,rst:118,rb:119,ruby:119,rs:120,rust:120,sas:121,sass:122,sbt:123,sc:123,scala:123,scss:124,shader:125,shaderlab:125,sol:126,solidity:126,sparql:127,sql:128,stata:129,styl:130,stylus:130,svelte:131,swift:132,tcl:133,hcl:134,terraform:134,tf:134,tfvars:134,toml:135,"angular-ts":136,cts:136,lit:136,mts:136,ts:136,"ts-tags":136,typescript:136,tsrx:137,tsv:138,tsx:139,ttl:140,turtle:140,twig:141,typ:142,typst:142,sv:143,svh:143,"system-verilog":143,systemverilog:143,verilog:143,vhd:144,vhdl:144,vim:145,viml:145,vimscript:145,vue:146,"vue-html":146,wasm:147,wat:147,wgsl:148,mathematica:149,wl:149,wolfram:149,svg:150,xml:150,xsd:150,xsl:150,xslt:150,yaml:151,yml:151,zig:152,zon:152},OA=new TextEncoder,RQ=new TextDecoder("utf-8",{ignoreBOM:!0}),$A=65536,TB=64,iA=81920,WB=[/^\p{ID_Start}$/u,/^[\u200C\u200D\p{ID_Continue}]$/u];let iB;const iQ=qQ;function QB(Q){const A=iQ[String(Q).toLowerCase()];if(typeof A!="number")throw new RangeError(`unknown lang: ${Q}`);return A}function uQ(Q){return typeof iQ[String(Q).toLowerCase()]=="number"||bA(Q)}var rA,TA,WA,XA,fA,P,DB,UA,JB,mB,IB=(mB=class{constructor(A){c(this,P);c(this,rA);c(this,TA);c(this,WA);c(this,XA);c(this,fA,new Uint8Array(0));x(this,"wasmModule");x(this,"instance");x(this,"memory");x(this,"buffer");x(this,"dv");x(this,"pageN");this.wasmModule=A;const B=new WebAssembly.Instance(A,{env:{is_id_start:(E,I)=>D(this,P,JB).call(this,E,I,0),is_id_continue:(E,I)=>D(this,P,JB).call(this,E,I,2)}});this.instance=B,this.memory=B.exports.memory,M(this,rA,B.exports.highlight),M(this,TA,B.exports.highlightStream),this.pageN=this.memory.buffer.byteLength/$A,this.buffer=new Uint8Array(this.memory.buffer),this.dv=new DataView(this.memory.buffer)}writeInput(A,B=0){if(typeof A=="string"){D(this,P,UA).call(this,B+A.length+96);let{read:E,written:I}=OA.encodeInto(A,this.buffer.subarray(iA+B,this.buffer.length-96));if(E<A.length){const C=A.slice(E);D(this,P,UA).call(this,B+I+C.length*3+96),I+=OA.encodeInto(C,this.buffer.subarray(iA+B+I,this.buffer.length-96)).written}return I}if(A instanceof ArrayBuffer&&(A=new Uint8Array(A)),!(A instanceof Uint8Array))throw new TypeError("input must be a string, Uint8Array, or ArrayBuffer");return D(this,P,UA).call(this,B+A.length+96),this.buffer.set(A,iA+B),A.length}codeToHtml(A,B){const E=B.cssVariablePrefix??"--hls-";if(bA(B.lang)){const i=lA(B),{fg:F,bg:s,rootStyle:J}=kB(i,E),t=yB(A),a=UB(t,i[0].role==="single"?[{...i[0],role:"default"}]:i,E);let o=`<pre class="highlights" style="${gA(J??(s===void 0?"":`background-color:${s};`)+(F===void 0?"":`color:${F}`))}"><code>`;for(let n=0,Z=-1;n<a.length;n++){n>0&&(Z=t.indexOf(`
3
3
  `,Z+1),o+=t.charCodeAt(Z-1)===13?`\r
4
4
  `:`
@@ -1 +1 @@
1
- import{d as l,v as h,t as k}from"./Dms_DO28.js";import{JH as s,vN as w}from"./D0qhIm1r.js";import{i as W,d as E,e as c,n as i,b as m}from"./CbBvi-vT.js";const A=new Set(["new","creating"]);function g(n){let t;try{t=decodeURIComponent(n)}catch{return null}return t.length===0||A.has(t)?null:t}function f(n){const t=/^\/workspace\/([^/?#]+)\/?(?:[?#].*)?$/.exec(n);return t?g(t[1]):null}function I(n){const t=/^\/workspace\/([^/?#]+)(?:[/?#].*)?$/.exec(n);return t?g(t[1]):null}function J(n,t){return t.length>0&&I(n)===t}function p(){return typeof window>"u"?null:window.location?.pathname??null}function d(n,t){const e=`/workspace/${encodeURIComponent(n)}`,a=t?new URLSearchParams(t).toString():"";return a?`${e}?${a}`:e}function R(n,t){const e=t?.presenceFollowRequestId;return e?w(n,e):w(n)}function P(n,t){return t?i(n,{state:t}):i(n)}function o(n){return n?.tabState?.currentTabId??null}async function S(n,t,e,a){m();const u=P(t,e),r={workspaceId:n,epoch:c(),startTabId:a};return await u,r}function b(n){return!n||W()||E()}function y(n,t){if(c()!==n.epoch||t!==n.startTabId&&t!==n.workspaceId)return!1;const e=p();return e===null||f(e)===n.workspaceId}async function v(n,t,e){if(b(n))return!1;const a=await S(n,t,e,o(s.state));return y(a,o(s.state))?(s.dispatch(R(n,e)),!0):!1}function*T(n,t,e){if(b(n))return!1;const a=o(yield*h(r=>r)),u=yield*l(S,n,t,e,a);return y(u,o(yield*h(r=>r)))?(yield*k(R(n,e)),!0):!1}function _(){m();const n=c(),t=o(s.state),e=p();return()=>c()===n&&o(s.state)===t&&p()===e}function O(n,t={}){return v(n,d(n,t.query),t.state)}function $(n,t={}){return T(n,d(n,t.query),t.state)}async function N(n){const t=f(n);t?await v(t,n,void 0):await i(n)}function*j(n){const t=f(n);t?yield*l(T,t,n,void 0):yield*l(i,n)}const U=Object.freeze(Object.defineProperty({__proto__:null,claimNavigation:_,navigateToAppRoute:N,navigateToAppRouteSaga:j,openAndShowWorkspace:O,showWorkspaceSaga:$,workspaceRoute:d},Symbol.toStringTag,{value:"Module"}));export{p as a,j as b,_ as c,$ as d,d as e,J as i,N as n,O as o,f as p,U as s,I as w};
1
+ import{d as l,v as h,t as k}from"./Dms_DO28.js";import{JH as s,vN as w}from"./D0qhIm1r.js";import{i as W,d as E,e as c,n as i,b as m}from"./C3ldfPpK.js";const A=new Set(["new","creating"]);function g(n){let t;try{t=decodeURIComponent(n)}catch{return null}return t.length===0||A.has(t)?null:t}function f(n){const t=/^\/workspace\/([^/?#]+)\/?(?:[?#].*)?$/.exec(n);return t?g(t[1]):null}function I(n){const t=/^\/workspace\/([^/?#]+)(?:[/?#].*)?$/.exec(n);return t?g(t[1]):null}function J(n,t){return t.length>0&&I(n)===t}function p(){return typeof window>"u"?null:window.location?.pathname??null}function d(n,t){const e=`/workspace/${encodeURIComponent(n)}`,a=t?new URLSearchParams(t).toString():"";return a?`${e}?${a}`:e}function R(n,t){const e=t?.presenceFollowRequestId;return e?w(n,e):w(n)}function P(n,t){return t?i(n,{state:t}):i(n)}function o(n){return n?.tabState?.currentTabId??null}async function S(n,t,e,a){m();const u=P(t,e),r={workspaceId:n,epoch:c(),startTabId:a};return await u,r}function b(n){return!n||W()||E()}function y(n,t){if(c()!==n.epoch||t!==n.startTabId&&t!==n.workspaceId)return!1;const e=p();return e===null||f(e)===n.workspaceId}async function v(n,t,e){if(b(n))return!1;const a=await S(n,t,e,o(s.state));return y(a,o(s.state))?(s.dispatch(R(n,e)),!0):!1}function*T(n,t,e){if(b(n))return!1;const a=o(yield*h(r=>r)),u=yield*l(S,n,t,e,a);return y(u,o(yield*h(r=>r)))?(yield*k(R(n,e)),!0):!1}function _(){m();const n=c(),t=o(s.state),e=p();return()=>c()===n&&o(s.state)===t&&p()===e}function O(n,t={}){return v(n,d(n,t.query),t.state)}function $(n,t={}){return T(n,d(n,t.query),t.state)}async function N(n){const t=f(n);t?await v(t,n,void 0):await i(n)}function*j(n){const t=f(n);t?yield*l(T,t,n,void 0):yield*l(i,n)}const U=Object.freeze(Object.defineProperty({__proto__:null,claimNavigation:_,navigateToAppRoute:N,navigateToAppRouteSaga:j,openAndShowWorkspace:O,showWorkspaceSaga:$,workspaceRoute:d},Symbol.toStringTag,{value:"Module"}));export{p as a,j as b,_ as c,$ as d,d as e,J as i,N as n,O as o,f as p,U as s,I as w};
@@ -1 +1 @@
1
- import{t as H,bo as x,bw as U,b as W}from"./Fcr7AvC-.js";import{bV as j,br as q,bH as A,aD as y,bs as X,ca as z,a5 as J,b_ as C,W as N,bS as K,a7 as Q,ay as Z,bA as $,bn as ee,c9 as te,at as ae,aA as _,aB as M,bI as re,aG as se}from"./3SdAC2_C.js";import{k as oe}from"./Cc0763mU.js";import{g as D,e as L,o as ne,p as ie}from"./CA6H1-bp.js";import{n as V,g as F,S}from"./CxR-pcVt.js";import{c as T,e as O,f as P}from"./BRCr02in.js";import{_ as G}from"./BAtAwQ72.js";import{c as de}from"./C3KgmGxd.js";function ce(r,a){const i=[...a].filter(t=>Number.isInteger(t)&&t>=0&&r[t]!==void 0).sort((t,o)=>t-o),u=[];for(const t of i){const o=u.at(-1);!o||t>o.endIndex+1?u.push({startIndex:t,endIndex:t}):t>o.endIndex&&(o.endIndex=t)}return u.map(({startIndex:t,endIndex:o})=>{let c=Number.POSITIVE_INFINITY,d=Number.POSITIVE_INFINITY,g=Number.NEGATIVE_INFINITY,m=Number.NEGATIVE_INFINITY;for(let l=t;l<=o;l+=1){const n=r[l];n&&(c=Math.min(c,n.top),d=Math.min(d,n.left),g=Math.max(g,n.left+n.width),m=Math.max(m,n.top+n.height))}return{startIndex:t,endIndex:o,rect:{top:c,left:d,width:g-d,height:m-c}}})}function E(r,a){return Math.max(0,Math.min(r.endIndex,a.endIndex)-Math.max(r.startIndex,a.startIndex)+1)}function le(){let r=j(q([])),a=[],i=1;return{get groups(){return y(r)},update(u,t){const o=new Set,c=ce(u,t).map(d=>{const m=a.filter(l=>!o.has(l.id)&&E(l,d)>0).sort((l,n)=>E(n,d)-E(l,d)||l.id-n.id)[0]?.id??i++;return o.add(m),{id:m,...d}});a=c,A(r,c,!0)},reset(){a=[],A(r,[],!0),i=1}}}var ue=M('<div data-proximity-highlight="selected" style="border-radius: var(--radius-row)"></div>'),me=M('<div data-proximity-highlight="hover" style="border-radius: var(--radius-row)"></div>'),pe=M('<div aria-hidden="true"><!> <!></div>');function fe(r,a){if(new.target)return H({component:fe,...r});X(a,!0);let i=x(a,"store",7),u=x(a,"selectedIndexes",23,()=>[]),t=x(a,"selectedClass",7,"bg-selected"),o=x(a,"hoverClass",7,"bg-hover"),c=x(a,"class",7);const d=le(),g=te(()=>i().activeIndex===null?void 0:i().itemRects[i().activeIndex]);z(()=>{d.update(i().itemRects,u())});const m=(e,s)=>{const p=new S(s.rect.top,s.tier),f=new S(s.rect.left,s.tier),b=new S(s.rect.width,s.tier),v=new S(s.rect.height,s.tier),I=ae(()=>{z(()=>{e.style.transform=`translate3d(${f.current}px, ${p.current}px, 0)`,e.style.width=`${b.current}px`,e.style.height=`${v.current}px`})}),w=h=>{p.set(h.rect.top),f.set(h.rect.left),b.set(h.rect.width),v.set(h.rect.height)},B=ne(()=>ie()&&w(s));return{update(h){s=h,w(h)},destroy(){B(),I()}}};var l={get store(){return i()},set store(e){i(e),_()},get selectedIndexes(){return u()},set selectedIndexes(e=[]){u(e),_()},get selectedClass(){return t()},set selectedClass(e="bg-selected"){t(e),_()},get hoverClass(){return o()},set hoverClass(e="bg-hover"){o(e),_()},get class(){return c()},set class(e){c(e),_()},$set:U,$on:(e,s)=>W(a,e,s)},n=pe(),R=J(n);D(R,17,()=>d.groups,e=>e.id,(e,s)=>{var p=ue();L(p,(f,b)=>m?.(f,b),()=>({rect:y(s).rect,tier:"moderate"})),C(f=>P(p,1,f),[()=>T(O("absolute",t()))]),V(2,p,()=>F,()=>({tier:"moderate"})),N(e,p)});var k=K(R,2);return oe(k,()=>i().sessionId,e=>{var s=Q(),p=Z(s);D(p,17,()=>y(g)?[y(g)]:[],f=>0,(f,b)=>{var v=me();L(v,(I,w)=>m?.(I,w),()=>({rect:y(b),tier:"moderate"})),C(I=>P(v,1,I),[()=>T(O("absolute",o()))]),V(2,v,()=>F,()=>({tier:"fast"})),N(f,v)}),N(e,s)}),$(n),C(e=>P(n,1,e),[()=>T(O("pointer-events-none absolute inset-0",c()))]),N(r,n),ee(l)}const Se=G({base:`${de} menu-row group/menu-item relative z-10 flex w-full min-w-0 cursor-default select-none items-start gap-2.5 border-none bg-transparent px-2.5 py-1.5 transition-colors duration-spring-fast ease-spring-fast focus:text-foreground focus-visible:outline-none data-[menu-item]:font-medium data-[disabled]:pointer-events-none data-[disabled]:opacity-50 aria-disabled:pointer-events-none aria-disabled:opacity-50 motion-reduce:transition-none`,variants:{inset:{true:"pl-8"}}}),Ce=G({base:"menu-overlay type-caption relative isolate z-(--layer-popover) overflow-hidden rounded-(--radius-medium) border border-border bg-popover shadow-(--elevation-overlay) [--menu-icon-size:calc(var(--space-3)+var(--space-1)/2)] [--radius-row:calc(var(--radius-small)-var(--space-1)/2)] focus-visible:border-input focus-visible:outline focus-visible:-outline-offset-1 data-[side=bottom]:origin-top data-[side=top]:origin-bottom data-[side=left]:origin-right data-[side=right]:origin-left data-[state=open]:animate-in data-[state=open]:fade-in-0 data-[state=open]:zoom-in-95 data-[state=open]:duration-spring-moderate data-[state=open]:ease-spring-moderate data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=closed]:duration-spring-moderate-exit data-[state=closed]:ease-spring-exit motion-reduce:animate-none motion-reduce:transition-none"}),Te="text-shortcut-foreground",Oe=-5,Pe={enter:{tier:"moderate",y:4,scale:.95},exit:{tier:"moderate"}},Y=Symbol("dialog-portal-target");function Ee(r){re(Y,r)}function Me(){const r=se(Y);return()=>r?.()??void 0}const ge=["[data-bits-floating-content-wrapper]",'[role="combobox"][aria-expanded="true"]','[aria-haspopup]:not([aria-haspopup="false"])[aria-expanded="true"]'].join(", ");function Re(r,a){return r?.querySelector(":scope > [data-bits-floating-content-wrapper]")?!0:a.target instanceof Element&&a.target.closest(ge)!==null}export{fe as P,Se as a,Ce as b,Pe as c,Oe as d,Re as e,Te as m,Ee as p,Me as u};
1
+ import{t as H,bo as x,bw as U,b as W}from"./Fcr7AvC-.js";import{bV as j,br as q,bH as A,aD as y,bs as X,ca as z,a5 as J,b_ as C,W as N,bS as K,a7 as Q,ay as Z,bA as $,bn as ee,c9 as te,at as ae,aA as _,aB as M,bI as re,aG as se}from"./3SdAC2_C.js";import{k as oe}from"./Cc0763mU.js";import{g as D,e as L,o as ne,p as ie}from"./CA6H1-bp.js";import{n as V,g as F,S}from"./CxR-pcVt.js";import{c as T,e as O,f as P}from"./BRCr02in.js";import{$ as G}from"./pYdPYEfN.js";import{c as de}from"./DReNFETs.js";function ce(r,a){const i=[...a].filter(t=>Number.isInteger(t)&&t>=0&&r[t]!==void 0).sort((t,o)=>t-o),u=[];for(const t of i){const o=u.at(-1);!o||t>o.endIndex+1?u.push({startIndex:t,endIndex:t}):t>o.endIndex&&(o.endIndex=t)}return u.map(({startIndex:t,endIndex:o})=>{let c=Number.POSITIVE_INFINITY,d=Number.POSITIVE_INFINITY,g=Number.NEGATIVE_INFINITY,m=Number.NEGATIVE_INFINITY;for(let l=t;l<=o;l+=1){const n=r[l];n&&(c=Math.min(c,n.top),d=Math.min(d,n.left),g=Math.max(g,n.left+n.width),m=Math.max(m,n.top+n.height))}return{startIndex:t,endIndex:o,rect:{top:c,left:d,width:g-d,height:m-c}}})}function E(r,a){return Math.max(0,Math.min(r.endIndex,a.endIndex)-Math.max(r.startIndex,a.startIndex)+1)}function le(){let r=j(q([])),a=[],i=1;return{get groups(){return y(r)},update(u,t){const o=new Set,c=ce(u,t).map(d=>{const m=a.filter(l=>!o.has(l.id)&&E(l,d)>0).sort((l,n)=>E(n,d)-E(l,d)||l.id-n.id)[0]?.id??i++;return o.add(m),{id:m,...d}});a=c,A(r,c,!0)},reset(){a=[],A(r,[],!0),i=1}}}var ue=M('<div data-proximity-highlight="selected" style="border-radius: var(--radius-row)"></div>'),me=M('<div data-proximity-highlight="hover" style="border-radius: var(--radius-row)"></div>'),pe=M('<div aria-hidden="true"><!> <!></div>');function fe(r,a){if(new.target)return H({component:fe,...r});X(a,!0);let i=x(a,"store",7),u=x(a,"selectedIndexes",23,()=>[]),t=x(a,"selectedClass",7,"bg-selected"),o=x(a,"hoverClass",7,"bg-hover"),c=x(a,"class",7);const d=le(),g=te(()=>i().activeIndex===null?void 0:i().itemRects[i().activeIndex]);z(()=>{d.update(i().itemRects,u())});const m=(e,s)=>{const p=new S(s.rect.top,s.tier),f=new S(s.rect.left,s.tier),b=new S(s.rect.width,s.tier),v=new S(s.rect.height,s.tier),I=ae(()=>{z(()=>{e.style.transform=`translate3d(${f.current}px, ${p.current}px, 0)`,e.style.width=`${b.current}px`,e.style.height=`${v.current}px`})}),w=h=>{p.set(h.rect.top),f.set(h.rect.left),b.set(h.rect.width),v.set(h.rect.height)},B=ne(()=>ie()&&w(s));return{update(h){s=h,w(h)},destroy(){B(),I()}}};var l={get store(){return i()},set store(e){i(e),_()},get selectedIndexes(){return u()},set selectedIndexes(e=[]){u(e),_()},get selectedClass(){return t()},set selectedClass(e="bg-selected"){t(e),_()},get hoverClass(){return o()},set hoverClass(e="bg-hover"){o(e),_()},get class(){return c()},set class(e){c(e),_()},$set:U,$on:(e,s)=>W(a,e,s)},n=pe(),R=J(n);D(R,17,()=>d.groups,e=>e.id,(e,s)=>{var p=ue();L(p,(f,b)=>m?.(f,b),()=>({rect:y(s).rect,tier:"moderate"})),C(f=>P(p,1,f),[()=>T(O("absolute",t()))]),V(2,p,()=>F,()=>({tier:"moderate"})),N(e,p)});var k=K(R,2);return oe(k,()=>i().sessionId,e=>{var s=Q(),p=Z(s);D(p,17,()=>y(g)?[y(g)]:[],f=>0,(f,b)=>{var v=me();L(v,(I,w)=>m?.(I,w),()=>({rect:y(b),tier:"moderate"})),C(I=>P(v,1,I),[()=>T(O("absolute",o()))]),V(2,v,()=>F,()=>({tier:"fast"})),N(f,v)}),N(e,s)}),$(n),C(e=>P(n,1,e),[()=>T(O("pointer-events-none absolute inset-0",c()))]),N(r,n),ee(l)}const Se=G({base:`${de} menu-row group/menu-item relative z-10 flex w-full min-w-0 cursor-default select-none items-start gap-2.5 border-none bg-transparent px-2.5 py-1.5 transition-colors duration-spring-fast ease-spring-fast focus:text-foreground focus-visible:outline-none data-[menu-item]:font-medium data-[disabled]:pointer-events-none data-[disabled]:opacity-50 aria-disabled:pointer-events-none aria-disabled:opacity-50 motion-reduce:transition-none`,variants:{inset:{true:"pl-8"}}}),Ce=G({base:"menu-overlay type-caption relative isolate z-(--layer-popover) overflow-hidden rounded-(--radius-medium) border border-border bg-popover shadow-(--elevation-overlay) [--menu-icon-size:calc(var(--space-3)+var(--space-1)/2)] [--radius-row:calc(var(--radius-small)-var(--space-1)/2)] focus-visible:border-input focus-visible:outline focus-visible:-outline-offset-1 data-[side=bottom]:origin-top data-[side=top]:origin-bottom data-[side=left]:origin-right data-[side=right]:origin-left data-[state=open]:animate-in data-[state=open]:fade-in-0 data-[state=open]:zoom-in-95 data-[state=open]:duration-spring-moderate data-[state=open]:ease-spring-moderate data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=closed]:duration-spring-moderate-exit data-[state=closed]:ease-spring-exit motion-reduce:animate-none motion-reduce:transition-none"}),Te="text-shortcut-foreground",Oe=-5,Pe={enter:{tier:"moderate",y:4,scale:.95},exit:{tier:"moderate"}},Y=Symbol("dialog-portal-target");function Ee(r){re(Y,r)}function Me(){const r=se(Y);return()=>r?.()??void 0}const ge=["[data-bits-floating-content-wrapper]",'[role="combobox"][aria-expanded="true"]','[aria-haspopup]:not([aria-haspopup="false"])[aria-expanded="true"]'].join(", ");function Re(r,a){return r?.querySelector(":scope > [data-bits-floating-content-wrapper]")?!0:a.target instanceof Element&&a.target.closest(ge)!==null}export{fe as P,Se as a,Ce as b,Pe as c,Oe as d,Re as e,Te as m,Ee as p,Me as u};
@@ -1,4 +1,4 @@
1
- import{I as W}from"./Pc52abky.js";import{p as X}from"./DuiDeolO.js";import{b0 as z,a_ as G,aZ as Y,Y as P,U as F,V as Z,b as g,q as N,ay as A,aX as q,B as U,W as E,r as j,aV as J,a0 as K,O as Q,aO as ee}from"./DabFMHr_.js";import{p as te}from"./BBfR26V0.js";var L=/[─━│┃└┗├┣]/,D=/[└┗├┣]/,ne=/[─━]/,V=/^[\s│┃]+$/,T=/^\s*(title[\t ]|accTitle[\t ]*:|accDescr[\t ]*[:{])/,$=/^\s*%%/,re=" ";function _(n){return n.some(t=>L.test(t))}g(_,"isBoxDrawingFormat");function M(n){for(const t of n){const e=D.exec(t);if(e?.index&&e.index>0)return e.index}return 4}g(M,"inferSegmentWidth");function S(n,t){return n.replace(/\bline\s+(\d+)\b/gi,(e,r)=>{const s=parseInt(r,10),i=t.get(s);return i?`line ${i}`:e})}g(S,"remapErrorLines");function R(n){const t=n.split(`
1
+ import{I as W}from"./DQMGgT_X.js";import{p as X}from"./TzUDDwaI.js";import{b0 as z,a_ as G,aZ as Y,Y as P,U as F,V as Z,b as g,q as N,ay as A,aX as q,B as U,W as E,r as j,aV as J,a0 as K,O as Q,aO as ee}from"./Cdwy3-nO.js";import{p as te}from"./BBfR26V0.js";var L=/[─━│┃└┗├┣]/,D=/[└┗├┣]/,ne=/[─━]/,V=/^[\s│┃]+$/,T=/^\s*(title[\t ]|accTitle[\t ]*:|accDescr[\t ]*[:{])/,$=/^\s*%%/,re=" ";function _(n){return n.some(t=>L.test(t))}g(_,"isBoxDrawingFormat");function M(n){for(const t of n){const e=D.exec(t);if(e?.index&&e.index>0)return e.index}return 4}g(M,"inferSegmentWidth");function S(n,t){return n.replace(/\bline\s+(\d+)\b/gi,(e,r)=>{const s=parseInt(r,10),i=t.get(s);return i?`line ${i}`:e})}g(S,"remapErrorLines");function R(n){const t=n.split(`
2
2
  `),e=new Map;let r=-1;for(const[p,c]of t.entries())if(c.trim()==="treeView-beta"){r=p;break}if(r===-1)return{text:n,lineMap:e};const s=[];for(let p=r+1;p<t.length;p++){const c=t[p];c.trim()===""||$.test(c)||T.test(c)||V.test(c)||s.push(c.replace(/\t/g," "))}if(!_(s))return{text:n,lineMap:e};const i=M(s),o=[];let a=0;for(let p=0;p<=r;p++)o.push(t[p]),a++,e.set(a,p+1);for(let p=r+1;p<t.length;p++){const c=t[p],d=c.trim(),h=p+1;if(d===""){o.push(c),a++,e.set(a,h);continue}if($.test(c)){o.push(c),a++,e.set(a,h);continue}if(T.test(c)){o.push(c),a++,e.set(a,h);continue}if(V.test(c))continue;const l=c.replace(/\t/g," "),w=D.exec(l);if(w?.index!==void 0){const f=w.index,m=Math.round(f/i)+1;let u=f+1;for(;u<l.length&&ne.test(l[u]);)u++;for(;u<l.length&&l[u]===" ";)u++;const v=l.slice(u).trimEnd();if(!v)throw new Error(`Line ${h}: Empty node — expected a filename or directory name after the box-drawing prefix`);const O=re.repeat(m);o.push(O+v),a++,e.set(a,h)}else{if(/^[\s─━│┃└┗├┣]+$/.test(l))continue;if(L.test(l))o.push(c),a++,e.set(a,h);else{if(/^\s+/.test(l))throw new Error(`Line ${h}: Unexpected indentation without box-drawing characters. In box-drawing format, use ├── or └── prefixes for indented nodes.`);o.push(c),a++,e.set(a,h)}}}return{text:o.join(`
3
3
  `),lineMap:e}}g(R,"preprocessBoxDrawing");var x=new W(()=>({cnt:1,stack:[{id:0,level:-1,name:"/",nodeType:"directory",children:[]}]})),ie=g(()=>{x.reset(),j()},"clear"),oe=g(()=>x.records.stack[0],"getRoot"),se=g(()=>x.records.cnt,"getCount"),ae=Q.treeView,ce=g(()=>N(ae,E().treeView),"getConfig"),le=g((n,t,e,r,s,i)=>{for(;n<=x.records.stack[x.records.stack.length-1].level;)x.records.stack.pop();const o={id:x.records.cnt++,level:n,name:t,nodeType:e,icon:s,cssClass:r,description:i,children:[]};x.records.stack[x.records.stack.length-1].children.push(o),x.records.stack.push(o)},"addNode"),de={clear:ie,addNode:le,getRoot:oe,getCount:se,getConfig:ce,getAccTitle:Z,getAccDescription:F,getDiagramTitle:P,setAccDescription:Y,setAccTitle:G,setDiagramTitle:z},I=de,he=g(n=>{X(n,I);for(const t of n.nodes){const e=typeof t.indent=="number"?t.indent:0;let r=t.name;const s=r.endsWith("/");s&&(r=r.slice(0,-1));const i=s?"directory":"file",o=t.classAnnotation||void 0,a=t.iconAnnotation,p=a!==void 0?a||"none":void 0,c=t.descAnnotation||void 0,d=c?J(c,E()):void 0;I.addNode(e,r,i,o,p,d)}},"populate"),pe={parse:g(async n=>{const{text:t,lineMap:e}=R(n);try{const r=await te("treeView",t);A.debug(r),he(r)}catch(r){throw e.size>0&&r instanceof Error&&(r.message=S(r.message,e)),r}},"parse")},b={prefix:"mermaid-treeview",height:24,width:24,icons:{folder:{body:'<path fill="currentColor" d="M10.59 4.59A2 2 0 0 0 9.17 4H4a2 2 0 0 0-2 2v12a2 2 0 0 0 2 2h16a2 2 0 0 0 2-2V8a2 2 0 0 0-2-2h-7.17z"/>'},file:{body:'<path fill="currentColor" fill-rule="evenodd" d="M6 2a2 2 0 0 0-2 2v16a2 2 0 0 0 2 2h12a2 2 0 0 0 2-2V8.83a2 2 0 0 0-.59-1.42l-4.82-4.82A2 2 0 0 0 13.17 2H6Zm7.5 1.9l4.6 4.6h-3.6a1 1 0 0 1-1-1V3.9Z" clip-rule="evenodd"/>'}}};function H(n,t){const e=t?.filenameIcons?.[n];if(e)return e;const r=n.lastIndexOf(".");if(r>0){const s=n.substring(r).toLowerCase(),i=t?.extensionIcons;return i?.[s]??i?.[s.slice(1)]}}g(H,"detectIcon");function C(n,t){return n.includes(":")?n:n in b.icons||!t?`${b.prefix}:${n}`:`${t}:${n}`}g(C,"qualifyIcon");function B(n,t){if(n.icon!=="none"){if(n.icon)return C(n.icon,t.defaultIconPack);if(t.showIcons){if(n.nodeType==="file"){const e=H(n.name,t);if(e==="none")return;if(e)return C(e,t.defaultIconPack)}return`${b.prefix}:${n.nodeType==="directory"?"folder":"file"}`}}}g(B,"getNodeIcon");ee([{name:b.prefix,icons:b}]);var y=14,ge=4,fe=16,ue=g(async(n,t)=>{const e=[],r=g(i=>{const o=B(i,t);o&&e.push({icon:o,node:i}),i.children.forEach(r)},"collect");r(n);const s=await Promise.all(e.map(async({icon:i,node:o})=>({id:o.id,svg:await K(i,{height:y,width:y})})));return new Map(s.map(({id:i,svg:o})=>[i,o]))},"resolveNodeIcons"),we=g((n,t,e,r,s,i)=>{const o=r.append("g");let a="treeView-node-label";e.nodeType==="directory"&&(a+=" treeView-node-dir"),e.cssClass&&(a+=` ${e.cssClass}`);const p=y+ge,c=B(e,s),d=c!==void 0;c&&o.append("g").attr("class","treeView-node-icon").attr("transform",`translate(${n+s.paddingX}, ${t+s.paddingY})`).html(i.get(e.id)??"");const h=o.append("text").text(e.name).attr("dominant-baseline","middle").attr("class",a),{height:l,width:w}=h.node().getBBox(),f=l+s.paddingY*2,m=n+s.paddingX+(d?p:0);h.attr("x",m),h.attr("y",t+f/2);const u=m+w,v=w+s.paddingX*2+(d?p:0);return e.BBox={x:n,y:t,width:v,height:f},e.cssClass?.split(/\s+/).includes("highlight")&&o.insert("rect",":first-child").attr("x",n).attr("y",t+1).attr("width",0).attr("height",f-2).attr("rx",3).attr("class","treeView-highlight-bg"),{node:e,nodeGroup:o,labelRightEdge:u,centerY:t+f/2}},"positionLabel"),k=g((n,t,e,r,s,i)=>n.append("line").attr("x1",t).attr("y1",e).attr("x2",r).attr("y2",s).attr("stroke-width",i).attr("class","treeView-node-line"),"positionLine"),me=g((n,t,e,r)=>{let s=0,i=0;const o=[],a=g((d,h,l,w)=>{const f=w*(l.rowIndent+l.paddingX),m=we(f,s,h,d,l,r);o.push(m);const{height:u,width:v}=h.BBox;k(d,f-l.rowIndent,s+u/2,f,s+u/2,l.lineThickness),i=Math.max(i,f+v),s+=u},"drawNode"),p=g((d,h=0)=>{a(n,d,e,h),d.children.forEach(m=>{p(m,h+1)});const{x:l,y:w,height:f}=d.BBox;if(d.children.length){const{y:m,height:u}=d.children[d.children.length-1].BBox;k(n,l+e.paddingX,w+f,l+e.paddingX,m+u/2+e.lineThickness/2,e.lineThickness)}},"processNode");p(t);const c=o.filter(d=>d.node.description);if(c.length>0){const h=Math.max(...o.map(l=>l.labelRightEdge))+fe;for(const l of c){const f=l.nodeGroup.append("text").text(l.node.description).attr("dominant-baseline","middle").attr("class","treeView-node-description").attr("x",h).attr("y",l.centerY).node().getBBox();i=Math.max(i,h+f.width+e.paddingX)}}for(const d of o)if(d.node.cssClass?.split(/\s+/).includes("highlight")){const h=d.nodeGroup.select(".treeView-highlight-bg");if(!h.empty()){const l=i-d.node.BBox.x+8;h.attr("width",l),i=Math.max(i,d.node.BBox.x+l+2)}}return{totalHeight:s,totalWidth:i}},"drawTree"),xe=g(async(n,t,e,r)=>{A.debug(`Rendering treeView diagram
4
4
  `+n);const s=r.db,i=s.getRoot(),o=s.getConfig(),a=q(t),p=a.append("g");p.attr("class","tree-view");const c=await ue(i,o),{totalHeight:d,totalWidth:h}=me(p,i,o,c);a.attr("viewBox",`-${o.lineThickness/2} 0 ${h} ${d}`),U(a,d,h,o.useMaxWidth)},"draw"),ve={draw:xe},be=ve,Ie={labelFontSize:"16px",labelColor:"black",lineColor:"black",iconColor:"#546e7a",descriptionColor:"#6a9955",highlightBg:"rgba(255, 193, 7, 0.15)",highlightStroke:"#ffc107"},Ce=g(({treeView:n})=>{const{labelFontSize:t,labelColor:e,lineColor:r,iconColor:s,descriptionColor:i,highlightBg:o,highlightStroke:a}=N(Ie,n);return`
@@ -1,4 +1,4 @@
1
- import{m as Ts,j as kt}from"./uXuxG9cN.js";import{bm as l}from"./Fcr7AvC-.js";import{Jk as Ct,JH as i,i as I,c7 as Es,m as F,ih as Rs,n_ as T,qA as xs,mc as Ps,yK as Ms,nZ as j,s2 as wt,yJ as vt,s1 as At,iK as Ns,nM as It,nR as $s,mr as Ls,fV as Tt,m8 as Os,mC as Ds,oe as $,iN as Ws,a$ as Ee,aU as ie}from"./D0qhIm1r.js";import{b as Us,a as js,c as Fs,i as Ce,C as fe,g as Hs}from"./CZfU7DE3.js";import{bV as Bs,d2 as qs,b2 as Gs,aJ as zs,cn as Zs,bN as Ks,bo as Vs,bv as Qs,ap as Ys,cK as Xs,cS as Js,c8 as er,bj as tr}from"./ChHRVjww.js";import{g as sr,i as rr,a as nr}from"./BS1zON0P.js";import{n as Ge,o as ze,b as q,s as Y,_ as be,e as ar}from"./CIyUrgF0.js";import{Q as or}from"./BAtAwQ72.js";import{u as ir}from"./BwweojP5.js";import{d as cr}from"./TdGvVwuC.js";import{l as w,m as lr}from"./C7b3vXLD.js";var we=(e=>(e.ACTIVATING="activating",e.ACTIVE="active",e.ERROR="error",e))(we||{});function ji(e){return e.isPending===!0||e.status==="pending"}function dr(e,t){const s=e.provider||e.metadata?.provider||e.config?.provider;if(s)return s;if(e.model)return(Ct(e.model).providerId??t)||void 0}function Fi(e){return e.messages.length>0}function ur(e){return e.filter(t=>t.type==="text").map(t=>t.text??"").join("")}function fr(e){return e.contentBlocks?ur(e.contentBlocks):""}const Hi=i.createSelector(e=>e.principal),te=i.createSelector(Us),E=i.createSelector(e=>{const t=e.principal;return t?.status==="ready"&&t.context!==null&&t.context===te.select(e)?t.snapshot:null}),gr=i.createSelector(e=>E.select(e)?.daemonMode??null),Bi=i.createSelector(e=>gr.select(e)==="orchestrator"),qi=i.createSelector(e=>E.select(e)?.capabilities.agentPlugins===1),Gi=i.createSelector(e=>E.select(e)?.capabilities.messageBlockPages===1),O=i.createSelector(e=>{const t=E.select(e);return t?t.capabilities.hostMembership?t.principal.hostRole??null:t.principal.isAdministrator?"owner":"guest":null}),Z=i.createSelector(e=>O.select(e)==="owner"),Et=i.createSelector(e=>e.principal?.status==="revoked"&&e.principal.context!==null&&e.principal.context===te.select(e)),zi=i.createSelector(e=>{const t=O.select(e);return t==="member"||t==="guest"||Et.select(e)}),Zi=i.createSelector(e=>Z.select(e)?te.select(e):null),pr=i.createSelector(e=>{const t=O.select(e);return t==="owner"||t==="member"}),ge=i.createSelector(e=>ir.select(e)===!0&&!!E.select(e)&&e.principal.refreshedPresentationVersion===e.principal.presentationVersion),Ki=i.createSelector(e=>{const t=ge.select(e),s=E.select(e)?.capabilities;return{hostMembership:t&&s?.hostMembership===!0,manageHostMembers:t&&s?.hostMembership===!0&&Z.select(e),personalPairing:t&&s?.personalPairing===!0,authenticatedDevices:t&&s?.authenticatedDevices===!0,collaborationIdentity:t&&s?.collaborationIdentity===!0}}),pe=i.createSelector(js),Vi=i.createSelector(Fs),Qi=i.createSelector(e=>pr.select(e)&&(Z.select(e)||ge.select(e))),Yi=i.createSelector(e=>E.select(e)?.capabilities.conversationGoal===1),hr=i.createSelector(e=>E.select(e)?.capabilities.remoteSetupRetry===1),Xi=i.createSelector(e=>hr.select(e)&&Z.select(e));function mr(e,t){const s=e.indexOf("/"),r=s===-1?void 0:e.slice(0,s),n=s===-1?e:e.slice(s+1),a=t?.indexOf("/")??-1,c=t&&a!==-1?t.slice(0,a):void 0;return r&&c&&r.toLowerCase()===c.toLowerCase()?n:e}function Rt(e,t,s){return`${mr(e,s)} #${t}`}function Re(e){return e.resource?.repository.provider==="gitlab"}function Ji(e,t){return`${Re(e)?"!":"#"}${t}`}function _r(e){return e.url??(e.resource||e.monitorAvailability||e.url===null?"":`https://github.com/${e.repo}/pull/${e.prNumber}`)}function br(e,t){return Re(e)?`${e.repo} !${e.prNumber}`:Rt(e.repo,e.prNumber,t)}function ec(e){return e.resource?Ts(e.resource):e.monitorAvailability?`unresolved:${e.monitorId}`:`${e.repo.toLowerCase()}#${e.prNumber}`}function tc(e){switch(e.monitorAvailability?.state){case void 0:case"available":return;case"pending":return l.chat_chatMessage_loading_label();case"reconnect-required":return l.chat_monitoredPrs_status_reconnect();case"restricted":return l.chat_monitoredPrs_status_restricted();case"unresolved":return l.chat_monitoredPrs_status_unresolved();default:return l.chat_monitoredPrs_status_unknown()}}function sc(e){return e.isDraft===null||e.hasConflicts===null||e.isBehind===null||Object.values(e.checks).some(t=>t===null)||e.approvals.have===null||e.approvals.changesRequested===null||e.availability!==void 0&&Object.values(e.availability).some(t=>t!=="available")}function rc(e,t){if(!Re(t)||!t.resource)return e;const s=new URL(t.resource.repository.instanceBaseUrl);return`${e} (${s.host}${s.pathname.replace(/\/$/,"")})`}function xt(e){return e===I.Halted||e===I.Completed||e===I.Error||e===I.Deleted||e==="completed"||e==="failed"||e==="error"||e==="deleted"}function Pt(e){return e.status===I.Halted?!1:!!(e.turnInFlight||e.liveTurnOpen||e.isStreaming||e.isProcessing||e.isResponding||e.isWaitingOnTool||e.lastToolUse?.status?.toLowerCase()==="running")}function Mt(e){return e.status===I.Resuming||xt(e.status)||Pt(e)?!1:!!(e.isWaitingForOtherAgents||e.status===I.Waiting||e.status==="waiting")}function yr(e){return xt(e.status)||Mt(e)?!1:!!(Pt(e)||e.activationState==="activating"||e.status===I.Resuming||e.status===I.Active||e.status===I.Processing||e.status==="active"||e.status==="processing"||e.status==="responding"||e.status==="streaming")}function nc(e){return{isStreaming:e.isStreaming,isProcessing:e.isProcessing,isResponding:e.isResponding,turnInFlight:e.turnInFlight,liveTurnOpen:e.liveTurnOpen,isWaitingOnTool:e.isWaitingOnTool,isWaitingForOtherAgents:e.isWaitingForOtherAgents,lastToolUse:e.lastToolUse,activationState:e.activationState,status:e.status}}function Sr(e){if(!e)return null;const t=e.lastUserMessage||"";let s=e.lastAgentResponse||"",r;const n=e.digest||void 0,a=e.lastMessageRole==="user"||e.lastMessageRole==="assistant"?e.lastMessageRole:void 0;e.isStreaming&&e.lastToolUse?.name?(r={type:"tool_use",id:`live-tool:${e.id}`,name:e.lastToolUse.name,input:{}},s=""):!s&&!e.isStreaming&&e.lastToolUse?.name&&(r={type:"tool_use",id:`wire-tool:${e.id}`,name:e.lastToolUse.name,input:e.lastToolUse.input??{}});const c=e.metadata?.completionReport||void 0,o=Es(e)??void 0;return{id:e.id,name:e.name||l.chat_chatHeader_newChat_fallback(),status:e.status,lastUserMessage:t,lastResponse:s,lastToolUse:r,fileChanges:(e.fileChanges||[]).map(d=>({path:d.path,action:d.type||d.action||"modify",timestamp:d.timestamp||new Date().toISOString()})),messages:e.messages||[],completionReport:c,digest:n,parentAgentId:o,lastMessageRole:a}}function ac(e,t){if(!e)return"";const s=e.split(`
1
+ import{m as Ts,j as kt}from"./uXuxG9cN.js";import{bm as l}from"./Fcr7AvC-.js";import{Jk as Ct,JH as i,i as I,c7 as Es,m as F,ih as Rs,n_ as T,qA as xs,mc as Ps,yK as Ms,nZ as j,s2 as wt,yJ as vt,s1 as At,iK as Ns,nM as It,nR as $s,mr as Ls,fV as Tt,m8 as Os,mC as Ds,oe as $,iN as Ws,a$ as Ee,aU as ie}from"./D0qhIm1r.js";import{b as Us,a as js,c as Fs,i as Ce,C as fe,g as Hs}from"./CZfU7DE3.js";import{bV as Bs,d2 as qs,b2 as Gs,aJ as zs,cn as Zs,bN as Ks,bo as Vs,bv as Qs,ap as Ys,cK as Xs,cS as Js,c8 as er,bj as tr}from"./ChHRVjww.js";import{g as sr,i as rr,a as nr}from"./BS1zON0P.js";import{n as Ge,o as ze,b as q,s as Y,_ as be,e as ar}from"./CIyUrgF0.js";import{Q as or}from"./pYdPYEfN.js";import{u as ir}from"./BwweojP5.js";import{d as cr}from"./Ccf5U4O_.js";import{l as w,m as lr}from"./C7b3vXLD.js";var we=(e=>(e.ACTIVATING="activating",e.ACTIVE="active",e.ERROR="error",e))(we||{});function ji(e){return e.isPending===!0||e.status==="pending"}function dr(e,t){const s=e.provider||e.metadata?.provider||e.config?.provider;if(s)return s;if(e.model)return(Ct(e.model).providerId??t)||void 0}function Fi(e){return e.messages.length>0}function ur(e){return e.filter(t=>t.type==="text").map(t=>t.text??"").join("")}function fr(e){return e.contentBlocks?ur(e.contentBlocks):""}const Hi=i.createSelector(e=>e.principal),te=i.createSelector(Us),E=i.createSelector(e=>{const t=e.principal;return t?.status==="ready"&&t.context!==null&&t.context===te.select(e)?t.snapshot:null}),gr=i.createSelector(e=>E.select(e)?.daemonMode??null),Bi=i.createSelector(e=>gr.select(e)==="orchestrator"),qi=i.createSelector(e=>E.select(e)?.capabilities.agentPlugins===1),Gi=i.createSelector(e=>E.select(e)?.capabilities.messageBlockPages===1),O=i.createSelector(e=>{const t=E.select(e);return t?t.capabilities.hostMembership?t.principal.hostRole??null:t.principal.isAdministrator?"owner":"guest":null}),Z=i.createSelector(e=>O.select(e)==="owner"),Et=i.createSelector(e=>e.principal?.status==="revoked"&&e.principal.context!==null&&e.principal.context===te.select(e)),zi=i.createSelector(e=>{const t=O.select(e);return t==="member"||t==="guest"||Et.select(e)}),Zi=i.createSelector(e=>Z.select(e)?te.select(e):null),pr=i.createSelector(e=>{const t=O.select(e);return t==="owner"||t==="member"}),ge=i.createSelector(e=>ir.select(e)===!0&&!!E.select(e)&&e.principal.refreshedPresentationVersion===e.principal.presentationVersion),Ki=i.createSelector(e=>{const t=ge.select(e),s=E.select(e)?.capabilities;return{hostMembership:t&&s?.hostMembership===!0,manageHostMembers:t&&s?.hostMembership===!0&&Z.select(e),personalPairing:t&&s?.personalPairing===!0,authenticatedDevices:t&&s?.authenticatedDevices===!0,collaborationIdentity:t&&s?.collaborationIdentity===!0}}),pe=i.createSelector(js),Vi=i.createSelector(Fs),Qi=i.createSelector(e=>pr.select(e)&&(Z.select(e)||ge.select(e))),Yi=i.createSelector(e=>E.select(e)?.capabilities.conversationGoal===1),hr=i.createSelector(e=>E.select(e)?.capabilities.remoteSetupRetry===1),Xi=i.createSelector(e=>hr.select(e)&&Z.select(e));function mr(e,t){const s=e.indexOf("/"),r=s===-1?void 0:e.slice(0,s),n=s===-1?e:e.slice(s+1),a=t?.indexOf("/")??-1,c=t&&a!==-1?t.slice(0,a):void 0;return r&&c&&r.toLowerCase()===c.toLowerCase()?n:e}function Rt(e,t,s){return`${mr(e,s)} #${t}`}function Re(e){return e.resource?.repository.provider==="gitlab"}function Ji(e,t){return`${Re(e)?"!":"#"}${t}`}function _r(e){return e.url??(e.resource||e.monitorAvailability||e.url===null?"":`https://github.com/${e.repo}/pull/${e.prNumber}`)}function br(e,t){return Re(e)?`${e.repo} !${e.prNumber}`:Rt(e.repo,e.prNumber,t)}function ec(e){return e.resource?Ts(e.resource):e.monitorAvailability?`unresolved:${e.monitorId}`:`${e.repo.toLowerCase()}#${e.prNumber}`}function tc(e){switch(e.monitorAvailability?.state){case void 0:case"available":return;case"pending":return l.chat_chatMessage_loading_label();case"reconnect-required":return l.chat_monitoredPrs_status_reconnect();case"restricted":return l.chat_monitoredPrs_status_restricted();case"unresolved":return l.chat_monitoredPrs_status_unresolved();default:return l.chat_monitoredPrs_status_unknown()}}function sc(e){return e.isDraft===null||e.hasConflicts===null||e.isBehind===null||Object.values(e.checks).some(t=>t===null)||e.approvals.have===null||e.approvals.changesRequested===null||e.availability!==void 0&&Object.values(e.availability).some(t=>t!=="available")}function rc(e,t){if(!Re(t)||!t.resource)return e;const s=new URL(t.resource.repository.instanceBaseUrl);return`${e} (${s.host}${s.pathname.replace(/\/$/,"")})`}function xt(e){return e===I.Halted||e===I.Completed||e===I.Error||e===I.Deleted||e==="completed"||e==="failed"||e==="error"||e==="deleted"}function Pt(e){return e.status===I.Halted?!1:!!(e.turnInFlight||e.liveTurnOpen||e.isStreaming||e.isProcessing||e.isResponding||e.isWaitingOnTool||e.lastToolUse?.status?.toLowerCase()==="running")}function Mt(e){return e.status===I.Resuming||xt(e.status)||Pt(e)?!1:!!(e.isWaitingForOtherAgents||e.status===I.Waiting||e.status==="waiting")}function yr(e){return xt(e.status)||Mt(e)?!1:!!(Pt(e)||e.activationState==="activating"||e.status===I.Resuming||e.status===I.Active||e.status===I.Processing||e.status==="active"||e.status==="processing"||e.status==="responding"||e.status==="streaming")}function nc(e){return{isStreaming:e.isStreaming,isProcessing:e.isProcessing,isResponding:e.isResponding,turnInFlight:e.turnInFlight,liveTurnOpen:e.liveTurnOpen,isWaitingOnTool:e.isWaitingOnTool,isWaitingForOtherAgents:e.isWaitingForOtherAgents,lastToolUse:e.lastToolUse,activationState:e.activationState,status:e.status}}function Sr(e){if(!e)return null;const t=e.lastUserMessage||"";let s=e.lastAgentResponse||"",r;const n=e.digest||void 0,a=e.lastMessageRole==="user"||e.lastMessageRole==="assistant"?e.lastMessageRole:void 0;e.isStreaming&&e.lastToolUse?.name?(r={type:"tool_use",id:`live-tool:${e.id}`,name:e.lastToolUse.name,input:{}},s=""):!s&&!e.isStreaming&&e.lastToolUse?.name&&(r={type:"tool_use",id:`wire-tool:${e.id}`,name:e.lastToolUse.name,input:e.lastToolUse.input??{}});const c=e.metadata?.completionReport||void 0,o=Es(e)??void 0;return{id:e.id,name:e.name||l.chat_chatHeader_newChat_fallback(),status:e.status,lastUserMessage:t,lastResponse:s,lastToolUse:r,fileChanges:(e.fileChanges||[]).map(d=>({path:d.path,action:d.type||d.action||"modify",timestamp:d.timestamp||new Date().toISOString()})),messages:e.messages||[],completionReport:c,digest:n,parentAgentId:o,lastMessageRole:a}}function ac(e,t){if(!e)return"";const s=e.split(`
2
2
  `);for(;s.length>0&&s[s.length-1].trim()==="";)s.pop();return s.length===0?"":s.length<=t?s.join(`
3
3
  `):`${s.slice(-t).join(`
4
4
  `)}...`}const kr={prefix:"fas",iconName:"note-sticky",icon:[16,16,[],"e002","M2 3.75A.75.75 0 0 1 2.75 3h10.5a.75.75 0 0 1 0 1.5H2.75A.75.75 0 0 1 2 3.75ZM2 8a.75.75 0 0 1 .75-.75h10.5a.75.75 0 0 1 0 1.5H2.75A.75.75 0 0 1 2 8Zm0 4.25a.75.75 0 0 1 .75-.75h4.5a.75.75 0 0 1 0 1.5h-4.5a.75.75 0 0 1-.75-.75Z"]},b={"file-read":tr,"file-write":er,"file-delete":Js,terminal:Xs,search:Bs,"context-engine":Ys,api:Qs,workspace:Vs,note:kr,meta:Ks,agent:Zs,task:zs,browser:Gs,generic:qs},Cr=["workspace-mcp_","workspace_mcp_","filesystem_","browser-mcp_","browser_mcp_"],wr=["_workspace-mcp","-workspace-mcp","_playwright","_browser_mcp","_context_7","_svelte","_npx","_sequential_thinking","_figma","_slack","_sentry","_github","_linear","_notion","_jira"];function Nt(e){return!!e&&/^(mcp__|mcp\.)/i.test(e)}const Ze=/select:\s*mcp(__|\.)/i,vr=/^select:\s*mcp(__|\.)/i;function Ar(e,t={}){if(z(e).toLowerCase()==="toolsearch"||typeof t.query=="string"&&vr.test(t.query))return!0;const s=typeof t._acpTitle=="string"?t._acpTitle:"";return Ze.test(e||"")||Ze.test(s)}function z(e){if(!e)return"";const t=e.match(/\/\/local\/mcp\/(.+)$/);t&&(e=t[1]),e=e.replace(/^mcp__[^_]+__/,""),e=e.replace(/^mcp\.[^.]+\./,"");const s=e.toLowerCase();for(const n of Cr)if(s.startsWith(n)){e=e.slice(n.length);break}let r=!0;for(;r;){r=!1;const n=e.toLowerCase();for(const a of wr)if(n.endsWith(a)){e=e.slice(0,-a.length),r=!0;break}}return e}function $t(e){const t=e.trim();return/\s/.test(t)?/^[A-Za-z0-9._-]+:\s/.test(t)?!0:t.split(/\s+/).length>=3:!1}function Lt(e){const t=e.trim().match(/^List\s+directory\s+\x60([^\x60]+)\x60$/i);if(!t)return null;const s=t[1].trim();return s.length===0?null:{category:"file-read",icon:b["file-read"],verb:l.chat_toolClassifier_listContents_label(),subject:x(s)||s,path:N(s)||null,filePath:s||null,isDirectory:!0}}function Ot(e){const t=e.toLowerCase(),s=t.includes("agent")?"agent":t.includes("note")?"note":t.includes("workspace")?"workspace":"generic";return{category:s,icon:b[s],verb:p(e.trim(),120),subject:null,path:null}}const Ir=[{suffix:"_workspace-mcp",source:"workspace-mcp"},{suffix:"-workspace-mcp",source:"workspace-mcp"},{suffix:"_browser_mcp",source:"browser-mcp"},{suffix:"_playwright",source:"playwright"},{suffix:"_sequential_thinking",source:"sequential-thinking"},{suffix:"_context_7",source:"context7"},{suffix:"_figma",source:"figma"},{suffix:"_sentry",source:"sentry"},{suffix:"_github",source:"github"},{suffix:"_linear",source:"linear"},{suffix:"_slack",source:"slack"},{suffix:"_notion",source:"notion"},{suffix:"_jira",source:"jira"},{suffix:"_svelte",source:"svelte"},{suffix:"_npx",source:"npx"}],Tr=[{prefix:"workspace-mcp_",source:"workspace-mcp"},{prefix:"workspace_mcp_",source:"workspace-mcp"},{prefix:"browser-mcp_",source:"browser-mcp"},{prefix:"browser_mcp_",source:"browser-mcp"},{prefix:"filesystem_",source:"filesystem"}],Ke={"github-api":"github",linear:"linear",glean:"glean"},Er=new Set(["view","codebase-retrieval","codebase_retrieval","launch-process","launch_process","read-process","read_process","write-process","write_process","kill-process","kill_process","list-processes","list_processes","str-replace-editor","str_replace_editor","save-file","save_file","remove-files","remove_files","web-search","web_search","web-fetch","web_fetch","conversation-retrieval","conversation_retrieval","git-commit-retrieval","git_commit_retrieval","bash","read","edit","run","find","grep"]);function Rr(e){if(!e)return;const t=e.match(/\/\/local\/mcp\/(.+)$/);t&&(e=t[1]);const s=e.match(/^mcp__([^_]+)__/);if(s)return s[1].toLowerCase();const r=e.match(/^mcp\.([^.]+)\./);if(r)return r[1].toLowerCase();const n=e.toLowerCase();for(const{prefix:a,source:c}of Tr)if(n.startsWith(a))return c;for(const{suffix:a,source:c}of Ir)if(n.endsWith(a))return c;if(Ke[n])return Ke[n];Er.has(n)}function A(e){return typeof e=="string"?e:e==null?"":String(e)}function p(e,t=50){const s=A(e);return s.length>t?`${s.substring(0,t)}...`:s}function xe(e){if(e==null)return null;if(typeof e=="string")return e;if(Array.isArray(e)){const t=e.filter(s=>s&&typeof s=="object"&&s.type==="text"&&s.text).map(s=>s.text);return t.length>0?t.join(`
@@ -1 +1 @@
1
- var U=Object.defineProperty;var S=r=>{throw TypeError(r)};var j=(r,t,a)=>t in r?U(r,t,{enumerable:!0,configurable:!0,writable:!0,value:a}):r[t]=a;var v=(r,t,a)=>j(r,typeof t!="symbol"?t+"":t,a),q=(r,t,a)=>t.has(r)||S("Cannot "+a);var g=(r,t,a)=>(q(r,t,"read from private field"),a?a.call(r):t.get(r)),z=(r,t,a)=>t.has(r)?S("Cannot add the same private member more than once"):t instanceof WeakSet?t.add(r):t.set(r,a);import{t as E,bo as s,bw as F,b as G,bp as J}from"./Fcr7AvC-.js";import{c9 as W,aD as _,bH as K,bo as L,bs as M,a7 as P,ay as B,W as b,bn as N,aA as i,a5 as R,bf as V,bA as X,aB as Y}from"./3SdAC2_C.js";import{i as Z}from"./BhYXv0ZM.js";import{t as C}from"./CWfjuhY2.js";import{b as $}from"./BRCr02in.js";import{an as tt,as as et,ay as rt,az as T,av as p,aQ as at}from"./Beq_QLuz.js";const ot=rt({component:"separator",parts:["root"]});var n;const w=class w{constructor(t){v(this,"opts");v(this,"attachment");z(this,n,W(()=>({id:this.opts.id.current,role:this.opts.decorative.current?"none":"separator","aria-orientation":this.opts.orientation.current,"aria-hidden":et(this.opts.decorative.current),"data-orientation":this.opts.orientation.current,[ot.root]:"",...this.attachment})));this.opts=t,this.attachment=tt(t.ref)}static create(t){return new w(t)}get props(){return _(g(this,n))}set props(t){K(g(this,n),t)}};n=new WeakMap;let y=w;var st=new Set(["$$slots","$$events","$$legacy","id","ref","child","children","decorative","orientation"]),it=Y("<div><!></div>");function nt(r,t){const a=L();if(new.target)return E({component:nt,...r});M(t,!0);let l=s(t,"id",23,()=>T(a)),c=s(t,"ref",15,null),d=s(t,"child",7),h=s(t,"children",7),f=s(t,"decorative",7,!1),u=s(t,"orientation",7,"horizontal"),k=J(t,st);const D=y.create({ref:p(()=>c(),e=>c(e)),id:p(()=>l()),decorative:p(()=>f()),orientation:p(()=>u())}),x=W(()=>at(k,D.props));var H={get id(){return l()},set id(e=T(a)){l(e),i()},get ref(){return c()},set ref(e=null){c(e),i()},get child(){return d()},set child(e){d(e),i()},get children(){return h()},set children(e){h(e),i()},get decorative(){return f()},set decorative(e=!1){f(e),i()},get orientation(){return u()},set orientation(e="horizontal"){u(e),i()},$set:F,$on:(e,o)=>G(t,e,o)},A=P(),I=B(A);{var O=e=>{var o=P(),m=B(o);C(m,d,()=>({props:_(x)})),b(e,o)},Q=e=>{var o=it();$(o,()=>({..._(x)}));var m=R(o);C(m,()=>h()??V),X(o),b(e,o)};Z(I,e=>{d()?e(O):e(Q,-1)})}return b(r,A),N(H)}export{nt as S};
1
+ var U=Object.defineProperty;var S=r=>{throw TypeError(r)};var j=(r,t,a)=>t in r?U(r,t,{enumerable:!0,configurable:!0,writable:!0,value:a}):r[t]=a;var v=(r,t,a)=>j(r,typeof t!="symbol"?t+"":t,a),q=(r,t,a)=>t.has(r)||S("Cannot "+a);var g=(r,t,a)=>(q(r,t,"read from private field"),a?a.call(r):t.get(r)),z=(r,t,a)=>t.has(r)?S("Cannot add the same private member more than once"):t instanceof WeakSet?t.add(r):t.set(r,a);import{t as E,bo as s,bw as F,b as G,bp as J}from"./Fcr7AvC-.js";import{c9 as W,aD as _,bH as K,bo as L,bs as M,a7 as P,ay as B,W as b,bn as N,aA as i,a5 as R,bf as V,bA as X,aB as Y}from"./3SdAC2_C.js";import{i as Z}from"./BhYXv0ZM.js";import{t as C}from"./CWfjuhY2.js";import{b as $}from"./BRCr02in.js";import{an as tt,as as et,ay as rt,az as T,av as p,aQ as at}from"./D-lOH49i.js";const ot=rt({component:"separator",parts:["root"]});var n;const w=class w{constructor(t){v(this,"opts");v(this,"attachment");z(this,n,W(()=>({id:this.opts.id.current,role:this.opts.decorative.current?"none":"separator","aria-orientation":this.opts.orientation.current,"aria-hidden":et(this.opts.decorative.current),"data-orientation":this.opts.orientation.current,[ot.root]:"",...this.attachment})));this.opts=t,this.attachment=tt(t.ref)}static create(t){return new w(t)}get props(){return _(g(this,n))}set props(t){K(g(this,n),t)}};n=new WeakMap;let y=w;var st=new Set(["$$slots","$$events","$$legacy","id","ref","child","children","decorative","orientation"]),it=Y("<div><!></div>");function nt(r,t){const a=L();if(new.target)return E({component:nt,...r});M(t,!0);let l=s(t,"id",23,()=>T(a)),c=s(t,"ref",15,null),d=s(t,"child",7),h=s(t,"children",7),f=s(t,"decorative",7,!1),u=s(t,"orientation",7,"horizontal"),k=J(t,st);const D=y.create({ref:p(()=>c(),e=>c(e)),id:p(()=>l()),decorative:p(()=>f()),orientation:p(()=>u())}),x=W(()=>at(k,D.props));var H={get id(){return l()},set id(e=T(a)){l(e),i()},get ref(){return c()},set ref(e=null){c(e),i()},get child(){return d()},set child(e){d(e),i()},get children(){return h()},set children(e){h(e),i()},get decorative(){return f()},set decorative(e=!1){f(e),i()},get orientation(){return u()},set orientation(e="horizontal"){u(e),i()},$set:F,$on:(e,o)=>G(t,e,o)},A=P(),I=B(A);{var O=e=>{var o=P(),m=B(o);C(m,d,()=>({props:_(x)})),b(e,o)},Q=e=>{var o=it();$(o,()=>({..._(x)}));var m=R(o);C(m,()=>h()??V),X(o),b(e,o)};Z(I,e=>{d()?e(O):e(Q,-1)})}return b(r,A),N(H)}export{nt as S};
@@ -1 +1 @@
1
- var Vt=Object.defineProperty;var yt=e=>{throw TypeError(e)};var jt=(e,i,s)=>i in e?Vt(e,i,{enumerable:!0,configurable:!0,writable:!0,value:s}):e[i]=s;var J=(e,i,s)=>jt(e,typeof i!="symbol"?i+"":i,s),bt=(e,i,s)=>i.has(e)||yt("Cannot "+s);var t=(e,i,s)=>(bt(e,i,"read from private field"),s?s.call(e):i.get(e)),g=(e,i,s)=>i.has(e)?yt("Cannot add the same private member more than once"):i instanceof WeakSet?i.add(e):i.set(e,s),a=(e,i,s,n)=>(bt(e,i,"write to private field"),n?n.call(e,s):i.set(e,s),s),o=(e,i,s)=>(bt(e,i,"access private method"),s);var vt=(e,i,s,n)=>({set _(r){a(e,i,r,s)},get _(){return t(e,i,n)}});import{_ as wt}from"./Fcr7AvC-.js";import{m as xt,A as qt,r as Ht,Q as Nt,aX as Gt,R as Jt}from"./8ysnd5N8.js";import{B as Ft,D as Kt}from"./CUllgFqe.js";import{I as F,E as Ct,b as Qt,a as Ut}from"./DICr2Lvd.js";function Xt(e,i){for(const s of Array.isArray(e)?e:[e]){let n=xt.get(s.name);n==null&&(n=s,xt.set(s.name,n)),i.attachLanguages([n]),qt.add(n.name)}}function Zt(e,i){let s;return function(...n){clearTimeout(s),s=setTimeout(()=>e.apply(this,n),i)}}const Dt=0;let Wt=0;var H,T,P,Q,L,st,it,C,U,nt,u,D,_,A,O,b,v,z,dt,E,B,X,N,R,Z,Tt,ft,h,K,ut,zt,Et,Y,pt,It,ct,tt,Ot,gt,et,Bt,Pt,At,Yt=(At=class{constructor(e,i,s){g(this,h);J(this,"backend");g(this,H);g(this,T);g(this,P);g(this,Q);g(this,L);g(this,st);g(this,it);g(this,C);g(this,U);g(this,nt,!1);g(this,u,[F]);g(this,D,[]);g(this,_,0);g(this,A,[]);g(this,O,-1);g(this,b,!0);g(this,v,!1);g(this,z,0);g(this,dt,++Wt);g(this,E,-1);g(this,B,-1);g(this,X);g(this,N,0);g(this,R,[]);g(this,Z,!1);g(this,Tt,Zt(async e=>{if(t(this,nt))return;const{startingLine:i=0,totalLines:s=1/0}=e??{},n=Math.min(s===1/0?1/0:i+s,t(this,L).lineCount);if(t(this,T)==null&&!Lt(t(this,L).languageId)){if(await this.backend?.loadLanguages([t(this,L).languageId]),t(this,nt))return;a(this,T,t(this,H).getLanguage(t(this,L).languageId))}o(this,h,K).call(this),o(this,h,It).call(this,n)},500));g(this,ft,({data:e})=>{if(typeof e!="object"||e===null)return;const{type:i,tokenizerId:s,jobId:n}=e;i==="tokenize"&&s===t(this,dt)&&typeof n=="number"&&n===t(this,z)&&(t(this,E)>=0?o(this,h,Bt).call(this,n):o(this,h,Pt).call(this,n))});this.backend=s,a(this,H,e),a(this,L,i.textDocument),a(this,P,i.theme),a(this,Q,[]),a(this,st,i.tokenizeMaxLineLength??1e3),a(this,it,i.onDeferTokenize),a(this,C,i.matchBrackets!==!1),a(this,U,i.__debug??!1),o(this,h,ut).call(this),o(this,h,K).call(this)}getStringCommentRegexpRangesInLine(e){if(!t(this,C)||e<0||e>=t(this,L).lineCount||(o(this,h,ut).call(this),t(this,T)==null))return null;if(t(this,R)[e]===void 0){o(this,h,et).call(this,e);const i=t(this,u)[e]??F,s=o(this,h,ct).call(this,e,i);t(this,u)[e+1]=s.state}return t(this,R)[e]??null}setTheme(e){t(this,P)!==e&&(a(this,P,e),o(this,h,K).call(this),this.stopBackgroundTokenize(),a(this,u,[F]),a(this,D,[]),a(this,_,0),a(this,A,[]),t(this,T)!=null&&t(this,L).lineCount>0&&o(this,h,pt).call(this,0))}dispose(){a(this,nt,!0),this.stopBackgroundTokenize(),o(this,h,Et).call(this)}tokenize(e,i,s=!1){if(o(this,h,ut).call(this),o(this,h,K).call(this),t(this,T)==null&&!Lt(t(this,L).languageId))throw new Error(`Grammar for language "${t(this,L).languageId}" not loaded`);const{lineCount:n}=t(this,L),{startingLine:r=0,totalLines:l=1/0}=i??{},d=l===1/0?n:Math.min(r+l,n),c=e.startLine,f=Math.max(r,c),I=i!=null&&l!==1/0&&e.lineDelta>0&&c<d&&e.endLine>=d,m=e.lineDelta===0&&(e.changedLineChanges?.every(([,,p])=>p===0)??!0);t(this,C)&&!m&&(t(this,R).length=Math.min(t(this,R).length,e.startLine));const M=s&&e.lineDelta!==0&&c>=r,S=m||i==null||c>=f,y=e.changedLineRanges??[[c,e.endLine]];a(this,D,[]),a(this,_,0),a(this,A,[]);let V=-1;if(c<f)for(const[p,w]of y)p<f&&(V=Math.max(V,Math.min(w,f-1)));const mt=V>=c&&(m||e.lineDelta<0);m?o(this,h,et).call(this,c):(o(this,h,Ot).call(this,e),(i==null||c>=f)&&o(this,h,et).call(this,f));let j=0,St=y[j][1],ht,Rt=0,k=m?y[j][0]:f,rt=!1;const Mt=new Map,W=mt?new Map:void 0;if(W!=null&&!m){const p=Math.min(V+1,f,d);if(p>c){o(this,h,et).call(this,p);let w=c,ot=t(this,u)[w]??F;for(;w<p;w++){const x=o(this,h,ct).call(this,w,ot);ot=x.state,W.set(w,x.resolvedTokens)}t(this,u)[p]=ot}}let q=t(this,u)[k]??F;for(;k<d;){const p=m?t(this,u)[k+1]:M?o(this,h,gt).call(this,k+1):void 0;S&&(t(this,u)[k]=q);const{resolvedTokens:w,state:ot}=o(this,h,ct).call(this,k,q);if(q=ot,k>=f?Mt.set(k,w):W?.set(k,w),S&&(t(this,u)[k+1]=q),rt=k>=St&&(m||M)&&p!=null&&q.equals(p),rt){j++;const x=y[j];if(x==null)break;if(x[0]>=d){ht=x[0],Rt=j;break}let lt=t(this,u)[x[0]];if(M)for(let kt=k+2;kt<=x[0]&&(lt=o(this,h,gt).call(this,kt),lt!=null);kt++)t(this,u)[kt]=lt;lt==null?(St=x[1],k++):(k=x[0],q=lt,St=x[1]),rt=!1;continue}k++}if(S&&(k<d?t(this,u)[k+1]=q:t(this,u)[k]=q),rt&&M&&ht==null){for(let p=k+2;p<=n;p++){const w=o(this,h,gt).call(this,p);if(w==null)break;t(this,u)[p]=w}a(this,D,[]),a(this,_,0),a(this,A,[])}if(W!=null&&W.size>0&&t(this,it).call(this,W),ht!=null)t(this,C)&&m&&(t(this,R).length=Math.min(t(this,R).length,ht)),o(this,h,pt).call(this,ht,y,Rt);else if(!rt&&k<n){const p=I&&c>=f?d:c<f&&!m?c:k;t(this,C)&&m&&(t(this,R).length=Math.min(t(this,R).length,p)),o(this,h,pt).call(this,p,y,j)}return Mt}prebuildStateStack(e){o(this,h,ut).call(this),t(this,Tt).call(this,e)}stopBackgroundTokenize(){a(this,B,-1),!t(this,b)&&(a(this,b,!0),a(this,v,!1),a(this,O,-1),a(this,E,-1),a(this,X,void 0),a(this,N,0),a(this,D,[]),a(this,_,0),a(this,A,[]),o(this,h,Et).call(this))}pauseBackgroundTokenize(){t(this,b)||t(this,v)||(t(this,U)&&console.log("[diffs/editor] background tokenization paused",{jobId:t(this,z)}),a(this,v,!0))}resumeBackgroundTokenize(){t(this,b)||!t(this,v)||t(this,T)==null||t(this,O)<0||(t(this,U)&&console.log("[diffs/editor] background tokenization resumed",{jobId:t(this,z)}),a(this,v,!1),o(this,h,Y).call(this,t(this,z)))}},H=new WeakMap,T=new WeakMap,P=new WeakMap,Q=new WeakMap,L=new WeakMap,st=new WeakMap,it=new WeakMap,C=new WeakMap,U=new WeakMap,nt=new WeakMap,u=new WeakMap,D=new WeakMap,_=new WeakMap,A=new WeakMap,O=new WeakMap,b=new WeakMap,v=new WeakMap,z=new WeakMap,dt=new WeakMap,E=new WeakMap,B=new WeakMap,X=new WeakMap,N=new WeakMap,R=new WeakMap,Z=new WeakMap,Tt=new WeakMap,ft=new WeakMap,h=new WeakSet,K=function(){if(t(this,P)==="")return;this.backend?.getTheme(t(this,P));const{colorMap:e}=t(this,H).setTheme(t(this,P));a(this,Q,e)},ut=function(){t(this,T)==null&&!Lt(t(this,L).languageId)&&t(this,H).getLoadedLanguages().includes(t(this,L).languageId)&&a(this,T,t(this,H).getLanguage(t(this,L).languageId))},zt=function(){t(this,Z)||(globalThis.addEventListener("message",t(this,ft)),a(this,Z,!0))},Et=function(){t(this,Z)&&(globalThis.removeEventListener("message",t(this,ft)),a(this,Z,!1))},Y=function(e){globalThis.postMessage({type:"tokenize",tokenizerId:t(this,dt),jobId:e})},pt=function(e,i,s=0){if(Lt(t(this,L).languageId))return;const n=++vt(this,z)._;t(this,U)&&console.log("[diffs/editor] background tokenization scheduled",{jobId:n,startLine:e,changedLineRanges:i,changedRangeIndex:s}),a(this,b,!1),a(this,v,!1),a(this,O,e),t(this,E)>=0&&a(this,B,Math.max(t(this,B),t(this,E))),a(this,E,-1),a(this,X,i),a(this,N,s),o(this,h,zt).call(this),o(this,h,Y).call(this,n)},It=function(e){if(t(this,T)==null||t(this,u).length>e)return;if(!t(this,b)){t(this,E)>=0?a(this,E,Math.max(t(this,E),e)):a(this,B,Math.max(t(this,B),e));return}const i=++vt(this,z)._;a(this,b,!1),a(this,v,!1),a(this,O,t(this,u).length-1),a(this,E,e),a(this,B,-1),a(this,X,void 0),a(this,N,0),o(this,h,zt).call(this),o(this,h,Y).call(this,i)},ct=function(e,i){const s=t(this,L).getLineText(e);if(s.length>=t(this,st))return console.warn(`[diffs] Line(${e}) too long to tokenize: ${s.length}`),o(this,h,tt).call(this,e,null),{resolvedTokens:[[0,"",s]],state:i};if(t(this,T)==null||s===""||s.trim()==="")return o(this,h,tt).call(this,e,null),{resolvedTokens:[[0,"",s]],state:i};const n=_t(t(this,T),t(this,Q),s,i,Dt,t(this,C));return o(this,h,tt).call(this,e,n.bracketIgnoredRanges),{resolvedTokens:n.resolvedTokens,state:n.ruleStack}},tt=function(e,i){t(this,C)&&(t(this,R)[e]=i)},Ot=function(e){const i=e.changedLineChanges??[[e.startLine,e.endLine,e.lineDelta]],s=e.startLine+1;s<=t(this,u).length-s?(a(this,D,t(this,u)),a(this,_,0),a(this,u,t(this,u).slice(0,s))):(a(this,_,s),a(this,D,t(this,u).slice(s)),t(this,u).length=Math.min(t(this,u).length,s)),a(this,A,i)},gt=function(e){let i=e;for(let s=t(this,A).length-1;s>=0;s--){const[n,r,l]=t(this,A)[s];if(l!==0){if(i>r)i-=l;else if(i>n)return t(this,u)[e]}}return t(this,D)[i-t(this,_)]??t(this,u)[e]},et=function(e,i){const s=Math.min(Math.max(0,e),t(this,L).lineCount);if(t(this,u).length>s||t(this,T)==null)return!0;const n=i==null?0:performance.now();let r=t(this,u).length-1,l=t(this,u)[r]??F;for(;r<s;){t(this,u)[r]=l;const d=t(this,L).getLineText(r);if(d.length<t(this,st)&&d!==""&&d.trim()!==""){const c=_t(t(this,T),t(this,Q),d,l,Dt,t(this,C),!1);o(this,h,tt).call(this,r,c.bracketIgnoredRanges),l=c.ruleStack}else o(this,h,tt).call(this,r,null);if(r++,t(this,u)[r]=l,i!=null&&performance.now()-n>i)break}return r>=s},Bt=function(e){if(t(this,b)||t(this,v)||t(this,T)==null||e!==t(this,z))return;o(this,h,K).call(this);const i=o(this,h,et).call(this,t(this,E),1);if(!(t(this,b)||t(this,v)||e!==t(this,z))){if(i){this.stopBackgroundTokenize();return}a(this,O,t(this,u).length-1),o(this,h,Y).call(this,e)}},Pt=function(e){if(t(this,b)||t(this,v)||t(this,T)==null||e!==t(this,z))return;o(this,h,K).call(this);const i=performance.now(),s=new Map,n=t(this,L).lineCount,r=t(this,X);let l=t(this,O),d=t(this,u)[l]??F,c=!1,f=t(this,N),I=r?.[f]?.[1];for(;l<n;){t(this,u)[l]=d;const m=I!=null?o(this,h,gt).call(this,l+1):void 0,M=o(this,h,ct).call(this,l,d);if(s.set(l,M.resolvedTokens),d=M.state,t(this,u)[l+1]=d,c=I!=null&&l>=I&&m!=null&&d.equals(m),l++,c){f++;const S=r?.[f];if(S==null)break;if(I=S[1],t(this,u)[S[0]]==null)c=!1;else{l=S[0],d=t(this,u)[l]??d,c=!1;continue}}if(performance.now()-i>1)break}if(t(this,it).call(this,s),!(t(this,b)||t(this,v)||e!==t(this,z))){if(c||l>=n){const m=t(this,B);this.stopBackgroundTokenize(),m>=0&&o(this,h,It).call(this,m);return}a(this,O,l),a(this,N,f),o(this,h,Y).call(this,e)}},At);function _t(e,i,s,n,r,l=!0,d=!0){const c=e.tokenizeLine2(s,n,r);c.stoppedEarly&&console.warn(`[diffs] Time limit reached when tokenizing line: ${s.substring(0,100)}`);const f=c.tokens,I=f.length/2,m=[],M=[];if(!d&&!l)return{ruleStack:c.ruleStack,resolvedTokens:m,bracketIgnoredRanges:M};for(let S=0;S<I;S++){const y=f[2*S],V=S+1<I?f[2*S+2]:s.length;if(y===V)continue;const mt=f[2*S+1];if(d){const j=Ct.getForeground(mt);m.push([y,i[j],s.slice(y,V)])}l&&Ct.getTokenType(mt)>0&&M.push([y,V])}return{ruleStack:c.ruleStack,resolvedTokens:m,bracketIgnoredRanges:M}}function Lt(e){return e==="text"||e==="ansi"}var $,G,at,te=(at=class extends Ft{constructor(s,n){super();J(this,"highlighter");J(this,"options");g(this,$,"");g(this,G);this.highlighter=s,this.options=n}tokenizeChunk(s,n){const r=(t(this,$)+s).split(/(\r\n|\r|\n)/);let l=[];for(let d=0;d<r.length;d+=2){const c=r[d],f=this.highlighter.codeToTokens(c,{...this.options,grammarState:t(this,G)}),I=f.tokens[0].map(m=>({...m,offset:m.offset+this.stableOffset}));d+1<r.length?(Ht(n,I),this.pushLineBreak(n,c.length,r[d+1]),a(this,G,f.grammarState)):(l=I,a(this,$,c))}return{unstable:l,tailLength:t(this,$).length}}clone(){this.assertActive();const s=new at(this.highlighter,this.options);return this.copyStateTo(s),a(s,$,t(this,$)),a(s,G,t(this,G)),s}resetSource(){a(this,$,""),a(this,G,void 0)}releaseSource(){this.resetSource()}},$=new WeakMap,G=new WeakMap,at),he=class $t extends Kt{constructor(s,n){super(s,Nt(s));J(this,"raw");J(this,"loadedThemes",new Map);J(this,"attachedLanguages",new Set(["text","ansi"]));this.raw=n}static async create(s){const n=s==="shiki-wasm"?(await wt(async()=>{const{createOnigurumaEngine:l}=await import("./fp9mRO0R.js");return{createOnigurumaEngine:l}},[],import.meta.url)).createOnigurumaEngine(wt(()=>import("./Cey7Y6ql.js"),[],import.meta.url)):(await wt(async()=>{const{createJavaScriptRegexEngine:l}=await import("./LU5PuYrD.js");return{createJavaScriptRegexEngine:l}},[],import.meta.url)).createJavaScriptRegexEngine(),r=await Qt({themes:[],langs:[],engine:n});return new $t(s,r)}getTheme(s){this.assertNotDisposed();const n=this.loadedThemes.get(s),r=this.themeResolver.getResolvedTheme(s)??n;if(r==null)throw new Error(`Theme "${s}" has not been resolved`);if(n!==r){const l=r.textmate??(r.cssVariables!=null?Ut(r.cssVariables):void 0);if(l==null)throw new Error(`Theme "${s}" does not support Shiki`);this.raw.setTheme({...l,name:s}),this.loadedThemes.set(s,r)}return r}codeToTokens(s,n){return this.raw.codeToTokens(s,this.resolveOptions(n))}createEditorTokenizer(s){return new Yt(this.raw,s,this)}createStreamTokenizer(s){return new te(this.raw,this.resolveOptions(s))}async loadLanguages(s){this.assertNotDisposed();const n=s.filter(r=>!this.attachedLanguages.has(r));Xt(await Gt(n),this)}hasLoadedLanguages(s){if(this.disposed)return!1;let n;return s.every(r=>this.attachedLanguages.has(r)?!0:Jt.has(r)?!1:(n??=this.raw.getLoadedLanguages(),n.includes(r)))}attachLanguages(s){this.assertNotDisposed();for(const n of s){if(this.attachedLanguages.has(n.name))continue;const r=n.data.find(l=>l.name===n.name||l.aliases?.includes(n.name)===!0);if(r==null)throw new Error(`attachResolvedLanguages: No returned grammar declares "${n.name}" as its name or an alias.`);this.raw.loadLanguageSync(n.data);try{this.raw.getLanguage(n.name)}catch{throw new Error(`attachResolvedLanguages: "${r.name}" is already loaded without alias "${n.name}". Load the alias first or give the grammar a unique name.`)}this.attachedLanguages.add(n.name)}}releaseResources(){this.loadedThemes.clear(),this.attachedLanguages.clear(),this.raw.dispose()}resolveOptions({theme:s,themes:n,...r}){if(this.assertNotDisposed(),s!=null)return this.getTheme(s),{...r,theme:s};if(n==null)throw new Error("A theme or themes option is required");for(const l of Object.values(n))this.getTheme(l);return{...r,themes:n}}};export{he as ShikiHighlighter};
1
+ var Vt=Object.defineProperty;var yt=e=>{throw TypeError(e)};var jt=(e,i,s)=>i in e?Vt(e,i,{enumerable:!0,configurable:!0,writable:!0,value:s}):e[i]=s;var J=(e,i,s)=>jt(e,typeof i!="symbol"?i+"":i,s),bt=(e,i,s)=>i.has(e)||yt("Cannot "+s);var t=(e,i,s)=>(bt(e,i,"read from private field"),s?s.call(e):i.get(e)),g=(e,i,s)=>i.has(e)?yt("Cannot add the same private member more than once"):i instanceof WeakSet?i.add(e):i.set(e,s),a=(e,i,s,n)=>(bt(e,i,"write to private field"),n?n.call(e,s):i.set(e,s),s),o=(e,i,s)=>(bt(e,i,"access private method"),s);var vt=(e,i,s,n)=>({set _(r){a(e,i,r,s)},get _(){return t(e,i,n)}});import{_ as wt}from"./Fcr7AvC-.js";import{m as xt,A as qt,r as Ht,Q as Nt,aX as Gt,R as Jt}from"./Dm529rkq.js";import{B as Ft,D as Kt}from"./G0vgahzI.js";import{I as F,E as Ct,b as Qt,a as Ut}from"./DICr2Lvd.js";function Xt(e,i){for(const s of Array.isArray(e)?e:[e]){let n=xt.get(s.name);n==null&&(n=s,xt.set(s.name,n)),i.attachLanguages([n]),qt.add(n.name)}}function Zt(e,i){let s;return function(...n){clearTimeout(s),s=setTimeout(()=>e.apply(this,n),i)}}const Dt=0;let Wt=0;var H,T,P,Q,L,st,it,C,U,nt,u,D,_,A,O,b,v,z,dt,E,B,X,N,R,Z,Tt,ft,h,K,ut,zt,Et,Y,pt,It,ct,tt,Ot,gt,et,Bt,Pt,At,Yt=(At=class{constructor(e,i,s){g(this,h);J(this,"backend");g(this,H);g(this,T);g(this,P);g(this,Q);g(this,L);g(this,st);g(this,it);g(this,C);g(this,U);g(this,nt,!1);g(this,u,[F]);g(this,D,[]);g(this,_,0);g(this,A,[]);g(this,O,-1);g(this,b,!0);g(this,v,!1);g(this,z,0);g(this,dt,++Wt);g(this,E,-1);g(this,B,-1);g(this,X);g(this,N,0);g(this,R,[]);g(this,Z,!1);g(this,Tt,Zt(async e=>{if(t(this,nt))return;const{startingLine:i=0,totalLines:s=1/0}=e??{},n=Math.min(s===1/0?1/0:i+s,t(this,L).lineCount);if(t(this,T)==null&&!Lt(t(this,L).languageId)){if(await this.backend?.loadLanguages([t(this,L).languageId]),t(this,nt))return;a(this,T,t(this,H).getLanguage(t(this,L).languageId))}o(this,h,K).call(this),o(this,h,It).call(this,n)},500));g(this,ft,({data:e})=>{if(typeof e!="object"||e===null)return;const{type:i,tokenizerId:s,jobId:n}=e;i==="tokenize"&&s===t(this,dt)&&typeof n=="number"&&n===t(this,z)&&(t(this,E)>=0?o(this,h,Bt).call(this,n):o(this,h,Pt).call(this,n))});this.backend=s,a(this,H,e),a(this,L,i.textDocument),a(this,P,i.theme),a(this,Q,[]),a(this,st,i.tokenizeMaxLineLength??1e3),a(this,it,i.onDeferTokenize),a(this,C,i.matchBrackets!==!1),a(this,U,i.__debug??!1),o(this,h,ut).call(this),o(this,h,K).call(this)}getStringCommentRegexpRangesInLine(e){if(!t(this,C)||e<0||e>=t(this,L).lineCount||(o(this,h,ut).call(this),t(this,T)==null))return null;if(t(this,R)[e]===void 0){o(this,h,et).call(this,e);const i=t(this,u)[e]??F,s=o(this,h,ct).call(this,e,i);t(this,u)[e+1]=s.state}return t(this,R)[e]??null}setTheme(e){t(this,P)!==e&&(a(this,P,e),o(this,h,K).call(this),this.stopBackgroundTokenize(),a(this,u,[F]),a(this,D,[]),a(this,_,0),a(this,A,[]),t(this,T)!=null&&t(this,L).lineCount>0&&o(this,h,pt).call(this,0))}dispose(){a(this,nt,!0),this.stopBackgroundTokenize(),o(this,h,Et).call(this)}tokenize(e,i,s=!1){if(o(this,h,ut).call(this),o(this,h,K).call(this),t(this,T)==null&&!Lt(t(this,L).languageId))throw new Error(`Grammar for language "${t(this,L).languageId}" not loaded`);const{lineCount:n}=t(this,L),{startingLine:r=0,totalLines:l=1/0}=i??{},d=l===1/0?n:Math.min(r+l,n),c=e.startLine,f=Math.max(r,c),I=i!=null&&l!==1/0&&e.lineDelta>0&&c<d&&e.endLine>=d,m=e.lineDelta===0&&(e.changedLineChanges?.every(([,,p])=>p===0)??!0);t(this,C)&&!m&&(t(this,R).length=Math.min(t(this,R).length,e.startLine));const M=s&&e.lineDelta!==0&&c>=r,S=m||i==null||c>=f,y=e.changedLineRanges??[[c,e.endLine]];a(this,D,[]),a(this,_,0),a(this,A,[]);let V=-1;if(c<f)for(const[p,w]of y)p<f&&(V=Math.max(V,Math.min(w,f-1)));const mt=V>=c&&(m||e.lineDelta<0);m?o(this,h,et).call(this,c):(o(this,h,Ot).call(this,e),(i==null||c>=f)&&o(this,h,et).call(this,f));let j=0,St=y[j][1],ht,Rt=0,k=m?y[j][0]:f,rt=!1;const Mt=new Map,W=mt?new Map:void 0;if(W!=null&&!m){const p=Math.min(V+1,f,d);if(p>c){o(this,h,et).call(this,p);let w=c,ot=t(this,u)[w]??F;for(;w<p;w++){const x=o(this,h,ct).call(this,w,ot);ot=x.state,W.set(w,x.resolvedTokens)}t(this,u)[p]=ot}}let q=t(this,u)[k]??F;for(;k<d;){const p=m?t(this,u)[k+1]:M?o(this,h,gt).call(this,k+1):void 0;S&&(t(this,u)[k]=q);const{resolvedTokens:w,state:ot}=o(this,h,ct).call(this,k,q);if(q=ot,k>=f?Mt.set(k,w):W?.set(k,w),S&&(t(this,u)[k+1]=q),rt=k>=St&&(m||M)&&p!=null&&q.equals(p),rt){j++;const x=y[j];if(x==null)break;if(x[0]>=d){ht=x[0],Rt=j;break}let lt=t(this,u)[x[0]];if(M)for(let kt=k+2;kt<=x[0]&&(lt=o(this,h,gt).call(this,kt),lt!=null);kt++)t(this,u)[kt]=lt;lt==null?(St=x[1],k++):(k=x[0],q=lt,St=x[1]),rt=!1;continue}k++}if(S&&(k<d?t(this,u)[k+1]=q:t(this,u)[k]=q),rt&&M&&ht==null){for(let p=k+2;p<=n;p++){const w=o(this,h,gt).call(this,p);if(w==null)break;t(this,u)[p]=w}a(this,D,[]),a(this,_,0),a(this,A,[])}if(W!=null&&W.size>0&&t(this,it).call(this,W),ht!=null)t(this,C)&&m&&(t(this,R).length=Math.min(t(this,R).length,ht)),o(this,h,pt).call(this,ht,y,Rt);else if(!rt&&k<n){const p=I&&c>=f?d:c<f&&!m?c:k;t(this,C)&&m&&(t(this,R).length=Math.min(t(this,R).length,p)),o(this,h,pt).call(this,p,y,j)}return Mt}prebuildStateStack(e){o(this,h,ut).call(this),t(this,Tt).call(this,e)}stopBackgroundTokenize(){a(this,B,-1),!t(this,b)&&(a(this,b,!0),a(this,v,!1),a(this,O,-1),a(this,E,-1),a(this,X,void 0),a(this,N,0),a(this,D,[]),a(this,_,0),a(this,A,[]),o(this,h,Et).call(this))}pauseBackgroundTokenize(){t(this,b)||t(this,v)||(t(this,U)&&console.log("[diffs/editor] background tokenization paused",{jobId:t(this,z)}),a(this,v,!0))}resumeBackgroundTokenize(){t(this,b)||!t(this,v)||t(this,T)==null||t(this,O)<0||(t(this,U)&&console.log("[diffs/editor] background tokenization resumed",{jobId:t(this,z)}),a(this,v,!1),o(this,h,Y).call(this,t(this,z)))}},H=new WeakMap,T=new WeakMap,P=new WeakMap,Q=new WeakMap,L=new WeakMap,st=new WeakMap,it=new WeakMap,C=new WeakMap,U=new WeakMap,nt=new WeakMap,u=new WeakMap,D=new WeakMap,_=new WeakMap,A=new WeakMap,O=new WeakMap,b=new WeakMap,v=new WeakMap,z=new WeakMap,dt=new WeakMap,E=new WeakMap,B=new WeakMap,X=new WeakMap,N=new WeakMap,R=new WeakMap,Z=new WeakMap,Tt=new WeakMap,ft=new WeakMap,h=new WeakSet,K=function(){if(t(this,P)==="")return;this.backend?.getTheme(t(this,P));const{colorMap:e}=t(this,H).setTheme(t(this,P));a(this,Q,e)},ut=function(){t(this,T)==null&&!Lt(t(this,L).languageId)&&t(this,H).getLoadedLanguages().includes(t(this,L).languageId)&&a(this,T,t(this,H).getLanguage(t(this,L).languageId))},zt=function(){t(this,Z)||(globalThis.addEventListener("message",t(this,ft)),a(this,Z,!0))},Et=function(){t(this,Z)&&(globalThis.removeEventListener("message",t(this,ft)),a(this,Z,!1))},Y=function(e){globalThis.postMessage({type:"tokenize",tokenizerId:t(this,dt),jobId:e})},pt=function(e,i,s=0){if(Lt(t(this,L).languageId))return;const n=++vt(this,z)._;t(this,U)&&console.log("[diffs/editor] background tokenization scheduled",{jobId:n,startLine:e,changedLineRanges:i,changedRangeIndex:s}),a(this,b,!1),a(this,v,!1),a(this,O,e),t(this,E)>=0&&a(this,B,Math.max(t(this,B),t(this,E))),a(this,E,-1),a(this,X,i),a(this,N,s),o(this,h,zt).call(this),o(this,h,Y).call(this,n)},It=function(e){if(t(this,T)==null||t(this,u).length>e)return;if(!t(this,b)){t(this,E)>=0?a(this,E,Math.max(t(this,E),e)):a(this,B,Math.max(t(this,B),e));return}const i=++vt(this,z)._;a(this,b,!1),a(this,v,!1),a(this,O,t(this,u).length-1),a(this,E,e),a(this,B,-1),a(this,X,void 0),a(this,N,0),o(this,h,zt).call(this),o(this,h,Y).call(this,i)},ct=function(e,i){const s=t(this,L).getLineText(e);if(s.length>=t(this,st))return console.warn(`[diffs] Line(${e}) too long to tokenize: ${s.length}`),o(this,h,tt).call(this,e,null),{resolvedTokens:[[0,"",s]],state:i};if(t(this,T)==null||s===""||s.trim()==="")return o(this,h,tt).call(this,e,null),{resolvedTokens:[[0,"",s]],state:i};const n=_t(t(this,T),t(this,Q),s,i,Dt,t(this,C));return o(this,h,tt).call(this,e,n.bracketIgnoredRanges),{resolvedTokens:n.resolvedTokens,state:n.ruleStack}},tt=function(e,i){t(this,C)&&(t(this,R)[e]=i)},Ot=function(e){const i=e.changedLineChanges??[[e.startLine,e.endLine,e.lineDelta]],s=e.startLine+1;s<=t(this,u).length-s?(a(this,D,t(this,u)),a(this,_,0),a(this,u,t(this,u).slice(0,s))):(a(this,_,s),a(this,D,t(this,u).slice(s)),t(this,u).length=Math.min(t(this,u).length,s)),a(this,A,i)},gt=function(e){let i=e;for(let s=t(this,A).length-1;s>=0;s--){const[n,r,l]=t(this,A)[s];if(l!==0){if(i>r)i-=l;else if(i>n)return t(this,u)[e]}}return t(this,D)[i-t(this,_)]??t(this,u)[e]},et=function(e,i){const s=Math.min(Math.max(0,e),t(this,L).lineCount);if(t(this,u).length>s||t(this,T)==null)return!0;const n=i==null?0:performance.now();let r=t(this,u).length-1,l=t(this,u)[r]??F;for(;r<s;){t(this,u)[r]=l;const d=t(this,L).getLineText(r);if(d.length<t(this,st)&&d!==""&&d.trim()!==""){const c=_t(t(this,T),t(this,Q),d,l,Dt,t(this,C),!1);o(this,h,tt).call(this,r,c.bracketIgnoredRanges),l=c.ruleStack}else o(this,h,tt).call(this,r,null);if(r++,t(this,u)[r]=l,i!=null&&performance.now()-n>i)break}return r>=s},Bt=function(e){if(t(this,b)||t(this,v)||t(this,T)==null||e!==t(this,z))return;o(this,h,K).call(this);const i=o(this,h,et).call(this,t(this,E),1);if(!(t(this,b)||t(this,v)||e!==t(this,z))){if(i){this.stopBackgroundTokenize();return}a(this,O,t(this,u).length-1),o(this,h,Y).call(this,e)}},Pt=function(e){if(t(this,b)||t(this,v)||t(this,T)==null||e!==t(this,z))return;o(this,h,K).call(this);const i=performance.now(),s=new Map,n=t(this,L).lineCount,r=t(this,X);let l=t(this,O),d=t(this,u)[l]??F,c=!1,f=t(this,N),I=r?.[f]?.[1];for(;l<n;){t(this,u)[l]=d;const m=I!=null?o(this,h,gt).call(this,l+1):void 0,M=o(this,h,ct).call(this,l,d);if(s.set(l,M.resolvedTokens),d=M.state,t(this,u)[l+1]=d,c=I!=null&&l>=I&&m!=null&&d.equals(m),l++,c){f++;const S=r?.[f];if(S==null)break;if(I=S[1],t(this,u)[S[0]]==null)c=!1;else{l=S[0],d=t(this,u)[l]??d,c=!1;continue}}if(performance.now()-i>1)break}if(t(this,it).call(this,s),!(t(this,b)||t(this,v)||e!==t(this,z))){if(c||l>=n){const m=t(this,B);this.stopBackgroundTokenize(),m>=0&&o(this,h,It).call(this,m);return}a(this,O,l),a(this,N,f),o(this,h,Y).call(this,e)}},At);function _t(e,i,s,n,r,l=!0,d=!0){const c=e.tokenizeLine2(s,n,r);c.stoppedEarly&&console.warn(`[diffs] Time limit reached when tokenizing line: ${s.substring(0,100)}`);const f=c.tokens,I=f.length/2,m=[],M=[];if(!d&&!l)return{ruleStack:c.ruleStack,resolvedTokens:m,bracketIgnoredRanges:M};for(let S=0;S<I;S++){const y=f[2*S],V=S+1<I?f[2*S+2]:s.length;if(y===V)continue;const mt=f[2*S+1];if(d){const j=Ct.getForeground(mt);m.push([y,i[j],s.slice(y,V)])}l&&Ct.getTokenType(mt)>0&&M.push([y,V])}return{ruleStack:c.ruleStack,resolvedTokens:m,bracketIgnoredRanges:M}}function Lt(e){return e==="text"||e==="ansi"}var $,G,at,te=(at=class extends Ft{constructor(s,n){super();J(this,"highlighter");J(this,"options");g(this,$,"");g(this,G);this.highlighter=s,this.options=n}tokenizeChunk(s,n){const r=(t(this,$)+s).split(/(\r\n|\r|\n)/);let l=[];for(let d=0;d<r.length;d+=2){const c=r[d],f=this.highlighter.codeToTokens(c,{...this.options,grammarState:t(this,G)}),I=f.tokens[0].map(m=>({...m,offset:m.offset+this.stableOffset}));d+1<r.length?(Ht(n,I),this.pushLineBreak(n,c.length,r[d+1]),a(this,G,f.grammarState)):(l=I,a(this,$,c))}return{unstable:l,tailLength:t(this,$).length}}clone(){this.assertActive();const s=new at(this.highlighter,this.options);return this.copyStateTo(s),a(s,$,t(this,$)),a(s,G,t(this,G)),s}resetSource(){a(this,$,""),a(this,G,void 0)}releaseSource(){this.resetSource()}},$=new WeakMap,G=new WeakMap,at),he=class $t extends Kt{constructor(s,n){super(s,Nt(s));J(this,"raw");J(this,"loadedThemes",new Map);J(this,"attachedLanguages",new Set(["text","ansi"]));this.raw=n}static async create(s){const n=s==="shiki-wasm"?(await wt(async()=>{const{createOnigurumaEngine:l}=await import("./fp9mRO0R.js");return{createOnigurumaEngine:l}},[],import.meta.url)).createOnigurumaEngine(wt(()=>import("./Cey7Y6ql.js"),[],import.meta.url)):(await wt(async()=>{const{createJavaScriptRegexEngine:l}=await import("./LU5PuYrD.js");return{createJavaScriptRegexEngine:l}},[],import.meta.url)).createJavaScriptRegexEngine(),r=await Qt({themes:[],langs:[],engine:n});return new $t(s,r)}getTheme(s){this.assertNotDisposed();const n=this.loadedThemes.get(s),r=this.themeResolver.getResolvedTheme(s)??n;if(r==null)throw new Error(`Theme "${s}" has not been resolved`);if(n!==r){const l=r.textmate??(r.cssVariables!=null?Ut(r.cssVariables):void 0);if(l==null)throw new Error(`Theme "${s}" does not support Shiki`);this.raw.setTheme({...l,name:s}),this.loadedThemes.set(s,r)}return r}codeToTokens(s,n){return this.raw.codeToTokens(s,this.resolveOptions(n))}createEditorTokenizer(s){return new Yt(this.raw,s,this)}createStreamTokenizer(s){return new te(this.raw,this.resolveOptions(s))}async loadLanguages(s){this.assertNotDisposed();const n=s.filter(r=>!this.attachedLanguages.has(r));Xt(await Gt(n),this)}hasLoadedLanguages(s){if(this.disposed)return!1;let n;return s.every(r=>this.attachedLanguages.has(r)?!0:Jt.has(r)?!1:(n??=this.raw.getLoadedLanguages(),n.includes(r)))}attachLanguages(s){this.assertNotDisposed();for(const n of s){if(this.attachedLanguages.has(n.name))continue;const r=n.data.find(l=>l.name===n.name||l.aliases?.includes(n.name)===!0);if(r==null)throw new Error(`attachResolvedLanguages: No returned grammar declares "${n.name}" as its name or an alias.`);this.raw.loadLanguageSync(n.data);try{this.raw.getLanguage(n.name)}catch{throw new Error(`attachResolvedLanguages: "${r.name}" is already loaded without alias "${n.name}". Load the alias first or give the grammar a unique name.`)}this.attachedLanguages.add(n.name)}}releaseResources(){this.loadedThemes.clear(),this.attachedLanguages.clear(),this.raw.dispose()}resolveOptions({theme:s,themes:n,...r}){if(this.assertNotDisposed(),s!=null)return this.getTheme(s),{...r,theme:s};if(n==null)throw new Error("A theme or themes option is required");for(const l of Object.values(n))this.getTheme(l);return{...r,themes:n}}};export{he as ShikiHighlighter};