@intent-hq/web 2.368.0 → 2.369.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (318) hide show
  1. package/package.json +1 -1
  2. package/web/app/immutable/chunks/{LWpzAIb1.js → -QpfKAxD.js} +1 -1
  3. package/web/app/immutable/chunks/{CuGp4iiZ.js → -cLO88ax.js} +1 -1
  4. package/web/app/immutable/chunks/{Dv8qmtiG.js → 0NGflniG.js} +1 -1
  5. package/web/app/immutable/chunks/{D3-X6DuB.js → 0jRiL-di.js} +2 -2
  6. package/web/app/immutable/chunks/{DuH3Z8Tj.js → 3IxT-Mrl.js} +1 -1
  7. package/web/app/immutable/chunks/{WpDLfp8g.js → 3_UV1UgL.js} +1 -1
  8. package/web/app/immutable/chunks/{DV8MrQzP.js → 4pFiTcXi.js} +1 -1
  9. package/web/app/immutable/chunks/51_h0jm2.js +1 -0
  10. package/web/app/immutable/chunks/{D_4E2Vkl.js → 5E3JQYey.js} +1 -1
  11. package/web/app/immutable/chunks/{BqnLfjrK.js → 5NOp7PNZ.js} +1 -1
  12. package/web/app/immutable/chunks/{BM7pSBH1.js → 6GNWsakm.js} +1 -1
  13. package/web/app/immutable/chunks/{C-WGoO9q.js → 6i_wfV3v.js} +1 -1
  14. package/web/app/immutable/chunks/{DZs8iANO.js → 7Uk2VvOl.js} +1 -1
  15. package/web/app/immutable/chunks/{CX6lA3D1.js → 8TQkfju3.js} +1 -1
  16. package/web/app/immutable/chunks/{DSxt_T6i.js → 93RUSyHg.js} +1 -1
  17. package/web/app/immutable/chunks/{Dag-yjBl.js → 9wk-Hes5.js} +1 -1
  18. package/web/app/immutable/chunks/{H5EFGbef.js → AIQuxhpV.js} +1 -1
  19. package/web/app/immutable/chunks/{Ct-FgWRq.js → B0v5Qiob.js} +1 -1
  20. package/web/app/immutable/chunks/{qHf9sK0w.js → B2CG0f08.js} +1 -1
  21. package/web/app/immutable/chunks/{Cx_kU_DV.js → B3Zt92Gh.js} +1 -1
  22. package/web/app/immutable/chunks/{yKB3We_R.js → B3rtR-T9.js} +1 -1
  23. package/web/app/immutable/chunks/{CWlx9AQE.js → B5L5kFMu.js} +1 -1
  24. package/web/app/immutable/chunks/{ByCbrCKe.js → B5ht1e3g.js} +1 -1
  25. package/web/app/immutable/chunks/{DVE3gCYm.js → B6P0nIFd.js} +1 -1
  26. package/web/app/immutable/chunks/{BCr3FDPI.js → B9XvejAu.js} +1 -1
  27. package/web/app/immutable/chunks/{BRMZvcr_.js → BBRNc6Tk.js} +1 -1
  28. package/web/app/immutable/chunks/{BrzSX242.js → BCBNqT5t.js} +1 -1
  29. package/web/app/immutable/chunks/{BA1W84cz.js → BDbtK9be.js} +1 -1
  30. package/web/app/immutable/chunks/{B4XVQGzR.js → BE2y8JEQ.js} +1 -1
  31. package/web/app/immutable/chunks/{Dn9uXxwQ.js → BEjEPSxp.js} +1 -1
  32. package/web/app/immutable/chunks/{_Lq6xDqz.js → BEklUrxK.js} +1 -1
  33. package/web/app/immutable/chunks/{DdXuLwef.js → BGP1lrgu.js} +1 -1
  34. package/web/app/immutable/chunks/{DbTuLky4.js → BJPhI2lA.js} +1 -1
  35. package/web/app/immutable/chunks/{CVkfqdxF.js → BJTl-SyI.js} +1 -1
  36. package/web/app/immutable/chunks/{Bjdl3Bcn.js → BLzqYDED.js} +1 -1
  37. package/web/app/immutable/chunks/{3uTmxU9o.js → BQDGTBxC.js} +1 -1
  38. package/web/app/immutable/chunks/{C-Avcz-L.js → BQGSaBlM.js} +1 -1
  39. package/web/app/immutable/chunks/{BvM1EUuh.js → BR5vKj6f.js} +1 -1
  40. package/web/app/immutable/chunks/{ChB1u5oS.js → BR9s3igW.js} +1 -1
  41. package/web/app/immutable/chunks/{CL7J7j2D.js → BTIkMWVv.js} +1 -1
  42. package/web/app/immutable/chunks/{DwPVMoTd.js → BTYfh5fW.js} +1 -1
  43. package/web/app/immutable/chunks/{La7uvQeM.js → BUHAwVs7.js} +1 -1
  44. package/web/app/immutable/chunks/{OnFCkRZq.js → BUNNt_Jr.js} +1 -1
  45. package/web/app/immutable/chunks/{CYYIfm0c.js → BUtBz-tz.js} +1 -1
  46. package/web/app/immutable/chunks/BVUXyHGH.js +4 -0
  47. package/web/app/immutable/chunks/{DzoN41_6.js → BVVyDeyd.js} +1 -1
  48. package/web/app/immutable/chunks/{Dqg0f2LJ.js → BW6PhteS.js} +1 -1
  49. package/web/app/immutable/chunks/{C5lXC3sE.js → BW94gUhQ.js} +1 -1
  50. package/web/app/immutable/chunks/{-S-Y5qpw.js → BX9VoS92.js} +1 -1
  51. package/web/app/immutable/chunks/{DWo9ssuo.js → BXHaIh_f.js} +1 -1
  52. package/web/app/immutable/chunks/{BFg7EHUJ.js → BZpSGd8O.js} +1 -1
  53. package/web/app/immutable/chunks/{CdT83fDm.js → B_QtiZYt.js} +1 -1
  54. package/web/app/immutable/chunks/{C_xbtvYu.js → BbugAQ9t.js} +1 -1
  55. package/web/app/immutable/chunks/{DX7k4FhP.js → Bf02lG8Y.js} +1 -1
  56. package/web/app/immutable/chunks/{uz9wJ9h7.js → BgDYQZ_0.js} +1 -1
  57. package/web/app/immutable/chunks/{CgszRxao.js → BgJ-6yg0.js} +1 -1
  58. package/web/app/immutable/chunks/{BAZnizpv.js → BgLPrJ77.js} +1 -1
  59. package/web/app/immutable/chunks/{CJZrFy0z.js → BgVn7-pK.js} +1 -1
  60. package/web/app/immutable/chunks/{DdgRFvxI.js → Bi5_2qbB.js} +2 -2
  61. package/web/app/immutable/chunks/{BYQyF1EV.js → BipEZFvA.js} +1 -1
  62. package/web/app/immutable/chunks/{DEaLADF0.js → Bjy4ygfJ.js} +1 -1
  63. package/web/app/immutable/chunks/{C6baGIHW.js → BkrPhcBU.js} +1 -1
  64. package/web/app/immutable/chunks/{Bhf5PYkX.js → Bn5goMn4.js} +2 -2
  65. package/web/app/immutable/chunks/{CN68o0Xe.js → BnRltR11.js} +1 -1
  66. package/web/app/immutable/chunks/{4ZHcc7E6.js → BoAG71Ap.js} +1 -1
  67. package/web/app/immutable/chunks/{9uaxSDjR.js → BpKFGHfS.js} +1 -1
  68. package/web/app/immutable/chunks/{CVuIJUI6.js → Bq_CYpxm.js} +1 -1
  69. package/web/app/immutable/chunks/{BmBBmxeN.js → BqkCNgyL.js} +1 -1
  70. package/web/app/immutable/chunks/{qkupoeeB.js → Bs9TCQJX.js} +1 -1
  71. package/web/app/immutable/chunks/{Cg_iMZyA.js → BsE4jMhr.js} +1 -1
  72. package/web/app/immutable/chunks/{tKPL2CZA.js → BsKhFZ0Q.js} +1 -1
  73. package/web/app/immutable/chunks/{C7p6fkNW.js → BsjFeGOg.js} +1 -1
  74. package/web/app/immutable/chunks/{UdBW3xHf.js → BswUVSRu.js} +1 -1
  75. package/web/app/immutable/chunks/{sRuST45k.js → BuLzqNKd.js} +1 -1
  76. package/web/app/immutable/chunks/{DjtlNmSp.js → BuveYyQe.js} +1 -1
  77. package/web/app/immutable/chunks/{BIuwYO0J.js → BxOfEPjL.js} +1 -1
  78. package/web/app/immutable/chunks/BxTyo7yU.js +1 -0
  79. package/web/app/immutable/chunks/{Bpab3i1i.js → BxvIWx6J.js} +1 -1
  80. package/web/app/immutable/chunks/{CoC9Ux29.js → BxwkoIbZ.js} +1 -1
  81. package/web/app/immutable/chunks/{DehqEruM.js → ByCxDC-R.js} +1 -1
  82. package/web/app/immutable/chunks/{D3f6Bdno.js → ByfLGh4b.js} +1 -1
  83. package/web/app/immutable/chunks/{DVqASrmW.js → Bz9mgUtY.js} +1 -1
  84. package/web/app/immutable/chunks/{D3NQrju5.js → BzlXwMsq.js} +1 -1
  85. package/web/app/immutable/chunks/{CwpJKby0.js → C-dUgTvj.js} +1 -1
  86. package/web/app/immutable/chunks/{9L9c83oG.js → C0gEyGJV.js} +1 -1
  87. package/web/app/immutable/chunks/{CT1kjHng.js → C1FbWx7h.js} +1 -1
  88. package/web/app/immutable/chunks/{C-3HGS81.js → C1McR-sz.js} +1 -1
  89. package/web/app/immutable/chunks/{DH9Hqtuz.js → C2jA6pM8.js} +1 -1
  90. package/web/app/immutable/chunks/{DqvOMJZD.js → C3-0e__R.js} +1 -1
  91. package/web/app/immutable/chunks/{wlvXh-zp.js → C3CJZFT3.js} +1 -1
  92. package/web/app/immutable/chunks/{BFNcUqqi.js → C3SM2b7L.js} +2 -2
  93. package/web/app/immutable/chunks/{CrfRec8x.js → C3YB0zcV.js} +1 -1
  94. package/web/app/immutable/chunks/{BeSpo5mj.js → C5Tw8y-2.js} +1 -1
  95. package/web/app/immutable/chunks/{BS7XLnm3.js → C5rcw_c7.js} +1 -1
  96. package/web/app/immutable/chunks/{fu-5SwkC.js → C6vnD-WG.js} +1 -1
  97. package/web/app/immutable/chunks/{DzuDuJfn.js → C6yPb5D8.js} +1 -1
  98. package/web/app/immutable/chunks/{DtKQhjG0.js → C7H74phM.js} +1 -1
  99. package/web/app/immutable/chunks/{BpCl78z6.js → C7RXZVwZ.js} +3 -3
  100. package/web/app/immutable/chunks/{ag06q4LL.js → C9UsZ4re.js} +1 -1
  101. package/web/app/immutable/chunks/{C4IUEZO8.js → C9r0mVfa.js} +1 -1
  102. package/web/app/immutable/chunks/{BNXfTFgg.js → CASKMy_V.js} +1 -1
  103. package/web/app/immutable/chunks/{CddeEUaW.js → CC08YY4X.js} +2 -2
  104. package/web/app/immutable/chunks/{DMXV603W.js → CCYJSy4Y.js} +1 -1
  105. package/web/app/immutable/chunks/{ChcqjzlK.js → CDqnAH9U.js} +2 -2
  106. package/web/app/immutable/chunks/{BguHhtk8.js → CF1Tu_8c.js} +2 -2
  107. package/web/app/immutable/chunks/{DyTX_flC.js → CF2xUnmW.js} +1 -1
  108. package/web/app/immutable/chunks/{DTmuScj1.js → CFvGekuw.js} +1 -1
  109. package/web/app/immutable/chunks/{CgoEfH57.js → CFybzafc.js} +1 -1
  110. package/web/app/immutable/chunks/{CIg56hlz.js → CJCoBdox.js} +1 -1
  111. package/web/app/immutable/chunks/{B5xVgX0B.js → CJb9CQqu.js} +1 -1
  112. package/web/app/immutable/chunks/{DCaHyJVf.js → CJj_lU-4.js} +1 -1
  113. package/web/app/immutable/chunks/{mA-tbLJW.js → CLZkKjaI.js} +1 -1
  114. package/web/app/immutable/chunks/{Cl19iNDm.js → CLalkdxk.js} +1 -1
  115. package/web/app/immutable/chunks/{z7hpXipJ.js → CLg2G62j.js} +3 -3
  116. package/web/app/immutable/chunks/{Dbb9v9Pu.js → CMMep18j.js} +1 -1
  117. package/web/app/immutable/chunks/{ydU_XNBS.js → CMRXUPn9.js} +1 -1
  118. package/web/app/immutable/chunks/{Dkb27FfT.js → CMZHakZZ.js} +1 -1
  119. package/web/app/immutable/chunks/{BXFt_M3j.js → CMh2xRIF.js} +1 -1
  120. package/web/app/immutable/chunks/{a78XW9b7.js → CMqhKAKf.js} +1 -1
  121. package/web/app/immutable/chunks/{CB3yJRaj.js → CN-6Tr26.js} +1 -1
  122. package/web/app/immutable/chunks/{CIxVnrKO.js → CNAilJvj.js} +1 -1
  123. package/web/app/immutable/chunks/{XOY5jtOQ.js → COmDhl6S.js} +1 -1
  124. package/web/app/immutable/chunks/{BjNVk8U6.js → CQkTODWA.js} +1 -1
  125. package/web/app/immutable/chunks/{Q6h5kaDA.js → CQt5NIo9.js} +1 -1
  126. package/web/app/immutable/chunks/{DOgidnWF.js → CQw_RyF_.js} +1 -1
  127. package/web/app/immutable/chunks/{AnCzW8pd.js → CRJc1pCT.js} +1 -1
  128. package/web/app/immutable/chunks/{CJbKgJCP.js → CS3R6Yuh.js} +1 -1
  129. package/web/app/immutable/chunks/{C8EYdSF9.js → CSFyiYHp.js} +1 -1
  130. package/web/app/immutable/chunks/{CuaxAbnk.js → CV10cSI4.js} +1 -1
  131. package/web/app/immutable/chunks/{IOCQV0lc.js → CWc2lAUi.js} +1 -1
  132. package/web/app/immutable/chunks/{CD0f9RqX.js → CXXbDkir.js} +1 -1
  133. package/web/app/immutable/chunks/{DxC9rNFj.js → CYgFnKoL.js} +1 -1
  134. package/web/app/immutable/chunks/{BvvwHzHR.js → CZTVb5IB.js} +1 -1
  135. package/web/app/immutable/chunks/{DQKQnxx2.js → CZ_Dk1nz.js} +1 -1
  136. package/web/app/immutable/chunks/{Cdgpg8n7.js → C_qOm4aX.js} +49 -49
  137. package/web/app/immutable/chunks/{CLSuLceq.js → CatLGfTW.js} +1 -1
  138. package/web/app/immutable/chunks/{BSaMlrt7.js → Cc2FSrQK.js} +1 -1
  139. package/web/app/immutable/chunks/CcNIw4Px.js +1 -0
  140. package/web/app/immutable/chunks/{ClSKdYXV.js → Cdhrdfve.js} +1 -1
  141. package/web/app/immutable/chunks/{CszTaYPw.js → Cdw_CIdg.js} +1 -1
  142. package/web/app/immutable/chunks/{BfV-m33h.js → CeBDdapO.js} +1 -1
  143. package/web/app/immutable/chunks/{qN9kzcwL.js → CgXGPBF5.js} +1 -1
  144. package/web/app/immutable/chunks/{8xzOjoUV.js → CgeBiXYG.js} +1 -1
  145. package/web/app/immutable/chunks/{KJbU5Jwf.js → Ch30XVIS.js} +1 -1
  146. package/web/app/immutable/chunks/{DZtsu62T.js → CiyIhnuP.js} +3 -3
  147. package/web/app/immutable/chunks/{DDgv92vT.js → CjswKKTa.js} +1 -1
  148. package/web/app/immutable/chunks/{6gX3p-t6.js → Ck5xuk0H.js} +1 -1
  149. package/web/app/immutable/chunks/{CdO0EKIb.js → Ckp5O1pb.js} +1 -1
  150. package/web/app/immutable/chunks/{BG9eCPIt.js → Cl7NoY6M.js} +1 -1
  151. package/web/app/immutable/chunks/{DB4BdY3-.js → ClSUFCtq.js} +1 -1
  152. package/web/app/immutable/chunks/{DdswlFJs.js → Cmm2Uwq6.js} +1 -1
  153. package/web/app/immutable/chunks/{Bx5mj_-o.js → CnM1-KSC.js} +1 -1
  154. package/web/app/immutable/chunks/{LjCq2zYR.js → Cp81xhuN.js} +1 -1
  155. package/web/app/immutable/chunks/{C6Mf7wiS.js → CpL3Nqus.js} +1 -1
  156. package/web/app/immutable/chunks/{ysr2ZeEL.js → CpPNoOk-.js} +1 -1
  157. package/web/app/immutable/chunks/{CeVUwFpS.js → CqesqBNM.js} +1 -1
  158. package/web/app/immutable/chunks/{Bnfzeolk.js → Cs_DX3BC.js} +1 -1
  159. package/web/app/immutable/chunks/{DiyE6ez1.js → Cstrfm23.js} +4 -4
  160. package/web/app/immutable/chunks/{BG_ZjTnQ.js → Csxq8_TN.js} +1 -1
  161. package/web/app/immutable/chunks/{Bzw5kiqv.js → CtFSFfLz.js} +1 -1
  162. package/web/app/immutable/chunks/{cNJtArdZ.js → Ct_Zx4ru.js} +1 -1
  163. package/web/app/immutable/chunks/{BpmaKyHV.js → Cu0mADIg.js} +1 -1
  164. package/web/app/immutable/chunks/{fhbq8NBN.js → Cu91VTQn.js} +1 -1
  165. package/web/app/immutable/chunks/{BGhL-M7S.js → CuHlAB4d.js} +2 -2
  166. package/web/app/immutable/chunks/{DcyITQk4.js → CvC_PTf7.js} +1 -1
  167. package/web/app/immutable/chunks/{CHo30JVh.js → CxF8L5mw.js} +1 -1
  168. package/web/app/immutable/chunks/{XokPPDRt.js → CxVedbHg.js} +2 -2
  169. package/web/app/immutable/chunks/{aFmAoxnK.js → CxmJEenA.js} +1 -1
  170. package/web/app/immutable/chunks/{Da6oWcTC.js → D0Z6csIX.js} +1 -1
  171. package/web/app/immutable/chunks/{BBrZXpSP.js → D1FzC71c.js} +1 -1
  172. package/web/app/immutable/chunks/{CTrJXNY9.js → D1cY0pVs.js} +1 -1
  173. package/web/app/immutable/chunks/{C3o6TrCe.js → D1rvT9Od.js} +1 -1
  174. package/web/app/immutable/chunks/{BWCENrjZ.js → D3SYIfTl.js} +4 -4
  175. package/web/app/immutable/chunks/{BAua3HYa.js → D4q8ggLU.js} +2 -2
  176. package/web/app/immutable/chunks/{CPjshegW.js → D5sw7nR1.js} +1 -1
  177. package/web/app/immutable/chunks/{CAA5Pjlt.js → D8BdISor.js} +1 -1
  178. package/web/app/immutable/chunks/{UfQa_CM-.js → D9d8HfDB.js} +1 -1
  179. package/web/app/immutable/chunks/{BmZ-YX2h.js → DA4getmI.js} +1 -1
  180. package/web/app/immutable/chunks/{fh3WedHa.js → DCrqv4Go.js} +1 -1
  181. package/web/app/immutable/chunks/{CEODt5qB.js → DCv0ZqUq.js} +1 -1
  182. package/web/app/immutable/chunks/{my3EnaTa.js → DF0Pm5yp.js} +2 -2
  183. package/web/app/immutable/chunks/{B5t5yFV1.js → DGmOjLYi.js} +1 -1
  184. package/web/app/immutable/chunks/{BtNhR2qx.js → DKn1sQ32.js} +1 -1
  185. package/web/app/immutable/chunks/{CFUCukqN.js → DLEm9Cyg.js} +1 -1
  186. package/web/app/immutable/chunks/{uCE5nFj2.js → DMjF7NYG.js} +2 -2
  187. package/web/app/immutable/chunks/{BE8dgLGn.js → DNieQhK8.js} +3 -3
  188. package/web/app/immutable/chunks/{DPMWmOe5.js → DOi8NPXE.js} +1 -1
  189. package/web/app/immutable/chunks/{BU4XngZf.js → DPLuga0X.js} +3 -3
  190. package/web/app/immutable/chunks/{DwOsWxyQ.js → DPPtpHwn.js} +1 -1
  191. package/web/app/immutable/chunks/{DGt036ot.js → DQUvqa9o.js} +1 -1
  192. package/web/app/immutable/chunks/{Bo79geKp.js → DRLOB6Gw.js} +2 -2
  193. package/web/app/immutable/chunks/{prHJOEnU.js → DSQT151l.js} +1 -1
  194. package/web/app/immutable/chunks/{B3nJy--T.js → DUItrdZb.js} +1 -1
  195. package/web/app/immutable/chunks/{Bg5Fp4BA.js → DUctnn_k.js} +1 -1
  196. package/web/app/immutable/chunks/DVy6H5Ng.js +1 -0
  197. package/web/app/immutable/chunks/DW3gkA_F.js +1 -0
  198. package/web/app/immutable/chunks/{CDKjl22x.js → DWLnWMNZ.js} +1 -1
  199. package/web/app/immutable/chunks/{BWWmYtvo.js → DWjKA8Pm.js} +1 -1
  200. package/web/app/immutable/chunks/{nIerXkD8.js → DWsHBNeU.js} +1 -1
  201. package/web/app/immutable/chunks/{CW0tWbke.js → DYmzWBEk.js} +1 -1
  202. package/web/app/immutable/chunks/{Nbro-b-6.js → DZCGZjzG.js} +1 -1
  203. package/web/app/immutable/chunks/{DSBtJS15.js → DZTT1V6G.js} +1 -1
  204. package/web/app/immutable/chunks/{Cu63TBX_.js → D_MzuSit.js} +1 -1
  205. package/web/app/immutable/chunks/{CoxEQ1x9.js → DaXgwzm7.js} +1 -1
  206. package/web/app/immutable/chunks/{D-W7KYqw.js → Dbpb1w7S.js} +4 -4
  207. package/web/app/immutable/chunks/{Ce7ti2I7.js → DcmaumPg.js} +1 -1
  208. package/web/app/immutable/chunks/{CIasIl91.js → DcvxsgOZ.js} +1 -1
  209. package/web/app/immutable/chunks/{D5sOpT26.js → DdkBNH3W.js} +1 -1
  210. package/web/app/immutable/chunks/{v9gH-HNO.js → DdkDv5Sd.js} +1 -1
  211. package/web/app/immutable/chunks/{CXaxJbgG.js → DeVwq4Xj.js} +1 -1
  212. package/web/app/immutable/chunks/{DEJSVazL.js → Deg_SlHr.js} +2 -2
  213. package/web/app/immutable/chunks/{VvgtSbK2.js → DfSzfqox.js} +1 -1
  214. package/web/app/immutable/chunks/{DYOMUc5B.js → DlqetqWw.js} +1 -1
  215. package/web/app/immutable/chunks/{DOdlo-4T.js → DmhHEMPi.js} +1 -1
  216. package/web/app/immutable/chunks/{PRAJ9M9Y.js → DodshHwq.js} +1 -1
  217. package/web/app/immutable/chunks/{y_07dpNl.js → DpSi4PLY.js} +1 -1
  218. package/web/app/immutable/chunks/{Cg6uFDit.js → DqFWZ_g1.js} +1 -1
  219. package/web/app/immutable/chunks/{CB1L2aum.js → DqgCp5ae.js} +1 -1
  220. package/web/app/immutable/chunks/{Bu3w6q3q.js → DrBi0w5G.js} +4 -4
  221. package/web/app/immutable/chunks/{CSd0whCN.js → Druyrynh.js} +1 -1
  222. package/web/app/immutable/chunks/{Dyrz4mgu.js → DtnAdLQg.js} +1 -1
  223. package/web/app/immutable/chunks/{D2dQD04-.js → Dukt1CUc.js} +1 -1
  224. package/web/app/immutable/chunks/{9RBVjd2X.js → DumeSIrz.js} +1 -1
  225. package/web/app/immutable/chunks/{DfmIEc34.js → DupNtpYi.js} +1 -1
  226. package/web/app/immutable/chunks/{D9DtZ5bO.js → DxvSggY5.js} +1 -1
  227. package/web/app/immutable/chunks/{9XOJk36Z.js → DyBkeTEM.js} +1 -1
  228. package/web/app/immutable/chunks/{CIHmUaya.js → DyHCBf0T.js} +3 -3
  229. package/web/app/immutable/chunks/{D_84YASo.js → Dy_4BU07.js} +3 -3
  230. package/web/app/immutable/chunks/{DmLYqjCG.js → Dz5-AChV.js} +1 -1
  231. package/web/app/immutable/chunks/{CZmtskyb.js → DzFkUqsC.js} +1 -1
  232. package/web/app/immutable/chunks/{WbKTM-AY.js → DzMdBKPh.js} +1 -1
  233. package/web/app/immutable/chunks/{nR9NDXxc.js → E_jRuW-b.js} +2 -2
  234. package/web/app/immutable/chunks/{lnjs8g9M.js → FLNU8xuu.js} +1 -1
  235. package/web/app/immutable/chunks/{D635gi5P.js → FmBB5PWm.js} +1 -1
  236. package/web/app/immutable/chunks/{CbcqSAiT.js → Gr7b8MIr.js} +1 -1
  237. package/web/app/immutable/chunks/{DUk9Psab.js → JKboQXkL.js} +1 -1
  238. package/web/app/immutable/chunks/{BBuuu82x.js → KAO5AtPr.js} +1 -1
  239. package/web/app/immutable/chunks/{DFAg4YQw.js → KykWEhyB.js} +1 -1
  240. package/web/app/immutable/chunks/{Ch__d3EK.js → L3AlUw84.js} +1 -1
  241. package/web/app/immutable/chunks/{CFWjNNDI.js → LKW_Bid7.js} +1 -1
  242. package/web/app/immutable/chunks/{bMVl-_uo.js → M18r7swD.js} +1 -1
  243. package/web/app/immutable/chunks/{BJbXiNfd.js → P4OctF9m.js} +1 -1
  244. package/web/app/immutable/chunks/{Dr-hGtz9.js → PXCFrn2V.js} +1 -1
  245. package/web/app/immutable/chunks/{yyKL9m5q.js → Q8rtHwbz.js} +1 -1
  246. package/web/app/immutable/chunks/{DmaI9gJG.js → Qnx8Hmfg.js} +1 -1
  247. package/web/app/immutable/chunks/{OC9upl2Z.js → RsJMsDHX.js} +1 -1
  248. package/web/app/immutable/chunks/{2LHboW99.js → S5vPfW1A.js} +1 -1
  249. package/web/app/immutable/chunks/{PJHVK1jp.js → SX1khnGy.js} +1 -1
  250. package/web/app/immutable/chunks/{Bl1aiNRC.js → TrRXD94r.js} +1 -1
  251. package/web/app/immutable/chunks/{D6WnG3O5.js → U3137Ii1.js} +1 -1
  252. package/web/app/immutable/chunks/{DaX_ruGd.js → V6SVTu37.js} +1 -1
  253. package/web/app/immutable/chunks/{Dr2MCeHs.js → WABToc6b.js} +1 -1
  254. package/web/app/immutable/chunks/{DLpH_zOx.js → WHfdsTrE.js} +1 -1
  255. package/web/app/immutable/chunks/{DVXtNvCM.js → XJqoy2ap.js} +1 -1
  256. package/web/app/immutable/chunks/{CoKTpqDU.js → XPs8BW44.js} +1 -1
  257. package/web/app/immutable/chunks/{DIz708WA.js → Zldsekdv.js} +4 -4
  258. package/web/app/immutable/chunks/{DmPmT0eG.js → _UNYBFXm.js} +1 -1
  259. package/web/app/immutable/chunks/{BUc9vg7U.js → a34jwGLW.js} +1 -1
  260. package/web/app/immutable/chunks/{DCkjGG3P.js → aHO4L7kg.js} +1 -1
  261. package/web/app/immutable/chunks/{DjoTibfo.js → b-bXytVF.js} +1 -1
  262. package/web/app/immutable/chunks/{Bf_VKlmw.js → dP7u_sPF.js} +1 -1
  263. package/web/app/immutable/chunks/{BagTxwLt.js → dSvJdwG_.js} +3 -3
  264. package/web/app/immutable/chunks/{DTNUR8M2.js → dx9b_0TP.js} +2 -2
  265. package/web/app/immutable/chunks/{CPjCX26i.js → eln8hjjQ.js} +1 -1
  266. package/web/app/immutable/chunks/{CufGMblq.js → gcij4Gee.js} +1 -1
  267. package/web/app/immutable/chunks/{CFWrNsuZ.js → ge7HDe-3.js} +1 -1
  268. package/web/app/immutable/chunks/{ByhyupnT.js → hHeBjODU.js} +1 -1
  269. package/web/app/immutable/chunks/{M4mXlBrP.js → iI6LFAGI.js} +1 -1
  270. package/web/app/immutable/chunks/{PMgbVYrU.js → k3tEZZCe.js} +1 -1
  271. package/web/app/immutable/chunks/{BWlKpZE8.js → lVHjTAAb.js} +1 -1
  272. package/web/app/immutable/chunks/{Bm7IJJUE.js → nRmTo2Eh.js} +1 -1
  273. package/web/app/immutable/chunks/{rJd0G3JA.js → oOuL5l8A.js} +1 -1
  274. package/web/app/immutable/chunks/{BQEAmAsx.js → oSmiRYki.js} +1 -1
  275. package/web/app/immutable/chunks/{BWk-f4jj.js → oZkhvgMl.js} +1 -1
  276. package/web/app/immutable/chunks/{rvFYnBJj.js → p8jwzOYN.js} +1 -1
  277. package/web/app/immutable/chunks/{BGccgsYG.js → plFW1-kq.js} +1 -1
  278. package/web/app/immutable/chunks/{DrUo0N9I.js → s1m3ujOc.js} +1 -1
  279. package/web/app/immutable/chunks/{Dji1u83Z.js → sG8VksRm.js} +1 -1
  280. package/web/app/immutable/chunks/{3VXSKzWd.js → tVHyNPqL.js} +1 -1
  281. package/web/app/immutable/chunks/{BdvDDr3c.js → uWDJKH9B.js} +1 -1
  282. package/web/app/immutable/chunks/{DDhwf79f.js → v2EYTTpI.js} +3 -3
  283. package/web/app/immutable/chunks/{DSibel_X.js → ykNMRL6H.js} +1 -1
  284. package/web/app/immutable/chunks/{Ca9VfQ3Z.js → zhSFUcJz.js} +1 -1
  285. package/web/app/immutable/entry/{app.g9i4Hhee.js → app.AtsW0EhM.js} +3 -3
  286. package/web/app/immutable/entry/start.DHsRk6-P.js +1 -0
  287. package/web/app/immutable/nodes/{0.CDHHvjqw.js → 0.CegL6Bfc.js} +1 -1
  288. package/web/app/immutable/nodes/{1.D5xy2MCO.js → 1.B6-BTMS1.js} +1 -1
  289. package/web/app/immutable/nodes/{10.1IhdAEgn.js → 10.qlZM4NPl.js} +5 -5
  290. package/web/app/immutable/nodes/{11.BW_yfjel.js → 11.BR5ZtLjn.js} +1 -1
  291. package/web/app/immutable/nodes/{12.QDjrsyFI.js → 12.31R3OdO3.js} +1 -1
  292. package/web/app/immutable/nodes/{13.6cP3XOKB.js → 13.DYH2a5Wx.js} +1 -1
  293. package/web/app/immutable/nodes/{14.Bb8pZCFr.js → 14.B6MrEg8x.js} +3 -3
  294. package/web/app/immutable/nodes/{15.DTRK9Vyb.js → 15.Bitx8r2v.js} +1 -1
  295. package/web/app/immutable/nodes/{16.pYdajVyy.js → 16.CKbY5VRM.js} +1 -1
  296. package/web/app/immutable/nodes/{17.C6_qDHdP.js → 17.DPSU7Eqq.js} +1 -1
  297. package/web/app/immutable/nodes/{18.p2wClcpG.js → 18.BlD6ustd.js} +1 -1
  298. package/web/app/immutable/nodes/{19.DQGgWYsX.js → 19.BRj21xes.js} +2 -2
  299. package/web/app/immutable/nodes/{2.DLEjVhJq.js → 2.BBHXaN8p.js} +4 -4
  300. package/web/app/immutable/nodes/{20.Dzdd3lna.js → 20.Cj4TGw20.js} +1 -1
  301. package/web/app/immutable/nodes/{3.Do589hpw.js → 3.JJmMGjhS.js} +1 -1
  302. package/web/app/immutable/nodes/{4.BW-YS0Mv.js → 4.C3VD-4KP.js} +1 -1
  303. package/web/app/immutable/nodes/{5.0hjt7wvZ.js → 5.DIJ6nzqY.js} +1 -1
  304. package/web/app/immutable/nodes/{6.C6f4TtQ8.js → 6.DIzZZwt4.js} +1 -1
  305. package/web/app/immutable/nodes/{7.C1c9oJF2.js → 7.Xo0EbJUd.js} +1 -1
  306. package/web/app/immutable/nodes/{8.B6Vwx2Ni.js → 8.xZANL-qg.js} +1 -1
  307. package/web/app/immutable/nodes/9.BVBQgdJj.js +12 -0
  308. package/web/app/version.json +1 -1
  309. package/web/generated/paraglide.js +49 -49
  310. package/web/index.html +18 -18
  311. package/web/app/immutable/chunks/3TUSwkgT.js +0 -1
  312. package/web/app/immutable/chunks/7f-RK74P.js +0 -4
  313. package/web/app/immutable/chunks/BN8kP7XZ.js +0 -1
  314. package/web/app/immutable/chunks/BZhnh0KQ.js +0 -1
  315. package/web/app/immutable/chunks/CPDeRaia.js +0 -1
  316. package/web/app/immutable/chunks/a1kG0lDg.js +0 -1
  317. package/web/app/immutable/entry/start.DJAvowHl.js +0 -1
  318. package/web/app/immutable/nodes/9.BhguuCYy.js +0 -12
@@ -1,2 +1,2 @@
1
- import{K as jt}from"./BE8dgLGn.js";import{V as Ut}from"./DDhwf79f.js";import{bI as Mt,aD as s,aG as zt,bH as Ie,bV as Me,bs as dt,ca as _t,c0 as Ht,a5 as j,bS as u,bl as F,bA as U,b_ as v,bO as l,aw as Kt,W as n,bn as pt,c9 as y,aA as T,aB as N,b$ as L,bf as ee,a7 as $,ay as w,be as De,am as Fe,ax as Ee}from"./CJxGDkBm.js";import{t as vt,bo as O,bm as _,bw as ut,b as ct,bs as Ze,bq as qt}from"./a1kG0lDg.js";import{i as I}from"./Dr-hGtz9.js";import{s as je,f as Ue,g as Be}from"./ysr2ZeEL.js";import{b as Yt}from"./NtFyWdpR.js";import{A as Gt,c as Vt}from"./BGhL-M7S.js";import{k as et}from"./ag06q4LL.js";import{s as tt}from"./D9DtZ5bO.js";import{n as se,b as at,j as ge}from"./CoC9Ux29.js";import{F as $t,bo as Xt,aN as Jt,cK as Qt,cn as Zt}from"./prHJOEnU.js";import{m as ea}from"./PJHVK1jp.js";import{f as Le}from"./CszTaYPw.js";import"./BguHhtk8.js";import{T as rt}from"./Bm7IJJUE.js";import"./ChTqQfQN.js";import"./DUk9Psab.js";import"./DIz708WA.js";import{q as ta,h as aa,S as ra}from"./DV8MrQzP.js";import{O as We}from"./DyTX_flC.js";import{be as na,D as sa,q as oa}from"./CDKjl22x.js";import{d as ia}from"./UdBW3xHf.js";import{s as la,f as da,c as nt}from"./OnFCkRZq.js";function ar(M){let b=0,E=!1;function Q(x){E!==x&&(E=x,M.onDragChange(x))}function Z(){b=0,Q(!1)}function X(x){return M.isEnabled&&!M.isEnabled()?!1:jt(x)}return{handleDragEnter(x){X(x)&&(x.preventDefault(),b++,Q(!0))},handleDragLeave(x){X(x)&&(x.preventDefault(),b=Math.max(0,b-1),b===0&&Q(!1))},handleDragOver(x){X(x)&&x.preventDefault()},handleDrop(x){if(!X(x))return;x.preventDefault(),Z();const G=Ut(x.dataTransfer);(G.files.length>0||G.folderFiles.length>0)&&M.onDrop(G)},reset:Z}}const gt=Symbol("panel-file-drop-context");function rr(){let M=Me(null);const b={register(E){Ie(M,E)},unregister(E){s(M)===E&&Ie(M,null)}};return Mt(gt,b),{context:b,handler:{get current(){return s(M)}}}}function nr(){return zt(gt)??null}var _a=N('<p class="type-caption text-subtle"> </p>'),pa=N('<div class="space-y-1" data-remote-setup-log=""><!> <pre role="log" tabindex="0"> </pre></div>');function va(M,b){if(new.target)return vt({component:va,...M});dt(b,!0);let E=O(b,"machine",7),Q=O(b,"output",7),Z=O(b,"truncated",7,!1);const X=y(()=>Gt({chunks:[{text:Q()??"",timestamp:""}]}).join(`
1
+ import{K as jt}from"./DNieQhK8.js";import{V as Ut}from"./v2EYTTpI.js";import{bI as Mt,aD as s,aG as zt,bH as Ie,bV as Me,bs as dt,ca as _t,c0 as Ht,a5 as j,bS as u,bl as F,bA as U,b_ as v,bO as l,aw as Kt,W as n,bn as pt,c9 as y,aA as T,aB as N,b$ as L,bf as ee,a7 as $,ay as w,be as De,am as Fe,ax as Ee}from"./CJxGDkBm.js";import{t as vt,bo as O,bm as _,bw as ut,b as ct,bs as Ze,bq as qt}from"./51_h0jm2.js";import{i as I}from"./PXCFrn2V.js";import{s as je,f as Ue,g as Be}from"./CpPNoOk-.js";import{b as Yt}from"./NtFyWdpR.js";import{A as Gt,c as Vt}from"./CuHlAB4d.js";import{k as et}from"./C9UsZ4re.js";import{s as tt}from"./DxvSggY5.js";import{n as se,b as at,j as ge}from"./BxwkoIbZ.js";import{F as $t,bo as Xt,aN as Jt,cK as Qt,cn as Zt}from"./DSQT151l.js";import{m as ea}from"./SX1khnGy.js";import{f as Le}from"./Cdw_CIdg.js";import"./CF1Tu_8c.js";import{T as rt}from"./nRmTo2Eh.js";import"./ChTqQfQN.js";import"./JKboQXkL.js";import"./Zldsekdv.js";import{q as ta,h as aa,S as ra}from"./4pFiTcXi.js";import{O as We}from"./CF2xUnmW.js";import{be as na,D as sa,q as oa}from"./DWLnWMNZ.js";import{d as ia}from"./BswUVSRu.js";import{s as la,f as da,c as nt}from"./BUNNt_Jr.js";function ar(M){let b=0,E=!1;function Q(x){E!==x&&(E=x,M.onDragChange(x))}function Z(){b=0,Q(!1)}function X(x){return M.isEnabled&&!M.isEnabled()?!1:jt(x)}return{handleDragEnter(x){X(x)&&(x.preventDefault(),b++,Q(!0))},handleDragLeave(x){X(x)&&(x.preventDefault(),b=Math.max(0,b-1),b===0&&Q(!1))},handleDragOver(x){X(x)&&x.preventDefault()},handleDrop(x){if(!X(x))return;x.preventDefault(),Z();const G=Ut(x.dataTransfer);(G.files.length>0||G.folderFiles.length>0)&&M.onDrop(G)},reset:Z}}const gt=Symbol("panel-file-drop-context");function rr(){let M=Me(null);const b={register(E){Ie(M,E)},unregister(E){s(M)===E&&Ie(M,null)}};return Mt(gt,b),{context:b,handler:{get current(){return s(M)}}}}function nr(){return zt(gt)??null}var _a=N('<p class="type-caption text-subtle"> </p>'),pa=N('<div class="space-y-1" data-remote-setup-log=""><!> <pre role="log" tabindex="0"> </pre></div>');function va(M,b){if(new.target)return vt({component:va,...M});dt(b,!0);let E=O(b,"machine",7),Q=O(b,"output",7),Z=O(b,"truncated",7,!1);const X=y(()=>Gt({chunks:[{text:Q()??"",timestamp:""}]}).join(`
2
2
  `));let x=Me(null),G=!0;function V(){s(x)&&(G=s(x).scrollHeight-s(x).scrollTop-s(x).clientHeight<8)}_t(()=>{s(X),!(!s(x)||!G)&&Ht().then(()=>{s(x)&&(s(x).scrollTop=s(x).scrollHeight)})});var oe={get machine(){return E()},set machine(R){E(R),T()},get output(){return Q()},set output(R){Q(R),T()},get truncated(){return Z()},set truncated(R=!1){Z(R),T()},$set:ut,$on:(R,J)=>ct(b,R,J)},H=pa(),te=j(H);{var ae=R=>{var J=_a(),W=F(J,!0);v(re=>l(W,re),[()=>_.remoteAgent_setup_outputTruncated()]),n(R,J)};I(te,R=>{Z()&&R(ae)})}var q=u(te,2),pe=F(q,!0);return Yt(q,R=>Ie(x,R),()=>s(x)),U(H),v((R,J)=>{je(q,"aria-label",R),Ue(q,1,`max-h-60 overflow-auto whitespace-pre-wrap break-words rounded-md bg-muted/60 px-3 py-2 font-mono text-xs ${s(X)?"text-foreground":"text-subtle"} focus-visible:outline-none focus-visible:ring-1 focus-visible:ring-ring`),l(pe,J)},[()=>_.remoteAgent_setup_outputLabel({machine:E()}),()=>s(X)||_.remoteAgent_setup_noOutput()]),Kt("scroll",q,V),n(M,H),pt(oe)}var ua=N('<span class="inline-flex items-center gap-1.5 svelte-enden2"> </span>'),ca=N('<h3 class="text-lg font-semibold tracking-[-0.016em] transition-colors duration-spring-slow ease-spring-slow motion-reduce:transition-none svelte-enden2"><!></h3>'),ga=N('<span class="inline-block col-span-1 row-span-1 svelte-enden2"> </span>'),fa=N('<span class="text-sm font-mono text-muted-foreground tabular-nums svelte-enden2"><span class="inline-grid *:[grid-area:1/1] svelte-enden2"><!></span> </span>'),ma=N('<div class="absolute inset-0 left-5 svelte-enden2"><!></div>'),st=N('<div class="svelte-enden2"><!></div>'),ba=N('<div class="relative flex items-start overflow-hidden rounded-md py-0.75 text-base leading-relaxed svelte-enden2"><!> <span data-testid="workspace-setup-step-icon"><!></span> <div class="setup-step-content min-w-0 text-muted-foreground font-normal leading-snug relative z-10 svelte-enden2" data-testid="workspace-setup-step-content"><!></div></div>'),xa=N('<div class="mt-1 text-xs tabular-nums svelte-enden2" data-testid="setup-card-progress-transfer"> </div>'),ha=N('<span data-testid="setup-card-progress-label" class="svelte-enden2"> </span> <div class="mt-1 h-[2px] w-full max-w-64 rounded-full bg-secondary overflow-hidden svelte-enden2"><div class="h-full bg-foreground/60 transition-[width] duration-spring-slow ease-spring-slow motion-reduce:transition-none svelte-enden2" role="progressbar" aria-valuemin="0" aria-valuemax="100" data-testid="setup-card-progress-bar"></div></div> <!>',1),fe=N(" <!>",1),Ca=N('<span data-testid="setup-card-plain-folder" class="svelte-enden2"> <!> </span>'),wa=N(' <code class="text-sm bg-secondary py-1 px-1.5 svelte-enden2"> </code> <!>',1),ot=N(" <!> <!>",1),Sa=N(' <span class="svelte-enden2"> </span> ',1),ya=N(' <span class="svelte-enden2"> </span> <!>',1),ka=N('<span class="underline underline-offset-2 svelte-enden2"> </span><span class="whitespace-nowrap svelte-enden2"><span class="underline underline-offset-2 svelte-enden2"> </span><span class="setup-reference-punctuation svelte-enden2" aria-hidden="true"> </span></span>',1),Pa=N("<!> ",1),it=N('<span class="svelte-enden2"> </span>'),_e=N(" <!> ",1),Da=N('<pre class="text-xs text-muted-foreground font-mono leading-snug line-clamp-2 whitespace-pre-wrap svelte-enden2"> </pre>'),lt=N('<span class="text-xs text-muted-foreground opacity-50 svelte-enden2"> </span>'),Ia=N(" <!> <!> ",1),Na=N('<p class="text-xs text-muted-foreground leading-snug svelte-enden2"> </p>'),Ta=N('<div><div class="flex items-baseline gap-2.5 pt-3 pb-2 svelte-enden2"><div class="inline-grid *:[grid-area:1/1] svelte-enden2"><!></div> <!></div> <div class="space-y-0.5 pb-4 svelte-enden2"><!> <!> <!> <!></div></div>');function Oa(M,b){if(new.target)return vt({component:Oa,...M});dt(b,!0);const E=()=>Ze(ft,"$progressEntry$",Z),Q=()=>Ze(mt,"$specialists$",Z),[Z,X]=qt();let x=O(b,"repoName",7),G=O(b,"repoPath",7),V=O(b,"worktreePath",7),oe=O(b,"workspaceId",7),H=O(b,"branch",7),te=O(b,"baseRef",7,"origin/main"),ae=O(b,"projectType",7),q=O(b,"setupScriptStatus",7),pe=O(b,"setupScriptContent",7),R=O(b,"onFocusSetupTerminal",7),J=O(b,"specialistName",7),W=O(b,"specialistId",7),re=O(b,"hasPrompt",7,!0),ve=O(b,"repoStatus",7,"pending"),me=O(b,"branchStatus",7,"pending"),be=O(b,"agentStatus",7,"pending"),ie=O(b,"skipIsolation",7,!1),ue=O(b,"plainFolder",7,!1),Ne=O(b,"progressId",7);const ft=la(Ne()??""),mt=na();let xe=Me(0);_t(()=>{const d=Math.min(E()?.percent??0,100);d>s(xe)&&Ie(xe,d,!0)});const bt=y(()=>E()?.sawFrame===!0),ze=y(()=>E()?.transfer?Vt(E().transfer):null),xt=y(()=>te().replace(/^[^/]+\//,"")),Te=y(()=>W()?oa(W()):void 0),ht=y(()=>W()?Q().find(d=>d.id===W()):void 0),Ct=y(()=>s(ht)?.name||s(Te)?.name||J()),He=y(()=>W()==="spec-writer"||W()===sa),Ke=y(()=>{const d=ue()?[ve()]:[ve(),me()];return q()&&d.push(q()),d.push(be()),d}),Oe=y(()=>s(Ke).length),qe=y(()=>s(Ke).filter(d=>d==="done").length),Ye=y(()=>Math.min(s(qe)+1,s(Oe))),ye=y(()=>s(qe)===s(Oe)),Ge=y(()=>s(ye)?_.onboarding_setupCard_ready_title():_.onboarding_setupCard_settingUp_title());function wt(d,B){navigator.clipboard.writeText(d),ea.success(_.onboarding_setupCard_copied_label({label:B}))}function Ae(d){return d.replace(/^\/Users\/[^/]+/,"~")}function St(){W()&&ia({specialist:W(),hash:"specialists"})}var yt={get repoName(){return x()},set repoName(d){x(d),T()},get repoPath(){return G()},set repoPath(d){G(d),T()},get worktreePath(){return V()},set worktreePath(d){V(d),T()},get workspaceId(){return oe()},set workspaceId(d){oe(d),T()},get branch(){return H()},set branch(d){H(d),T()},get baseRef(){return te()},set baseRef(d="origin/main"){te(d),T()},get projectType(){return ae()},set projectType(d){ae(d),T()},get setupScriptStatus(){return q()},set setupScriptStatus(d){q(d),T()},get setupScriptContent(){return pe()},set setupScriptContent(d){pe(d),T()},get onFocusSetupTerminal(){return R()},set onFocusSetupTerminal(d){R(d),T()},get specialistName(){return J()},set specialistName(d){J(d),T()},get specialistId(){return W()},set specialistId(d){W(d),T()},get hasPrompt(){return re()},set hasPrompt(d=!0){re(d),T()},get repoStatus(){return ve()},set repoStatus(d="pending"){ve(d),T()},get branchStatus(){return me()},set branchStatus(d="pending"){me(d),T()},get agentStatus(){return be()},set agentStatus(d="pending"){be(d),T()},get skipIsolation(){return ie()},set skipIsolation(d=!1){ie(d),T()},get plainFolder(){return ue()},set plainFolder(d=!1){ue(d),T()},get progressId(){return Ne()},set progressId(d){Ne(d),T()},$set:ut,$on:(d,B)=>ct(b,d,B)},ke=Ta(),Pe=j(ke);Be(Pe,"",{},{"padding-inline":"var(--operational-row-inline-padding)"});var Re=j(Pe),kt=j(Re);et(kt,()=>s(ye),d=>{var B=ca(),le=j(B);{var he=Y=>{var z=ua(),we=F(z,!0);v(()=>l(we,s(Ge))),n(Y,z)},Ce=Y=>{var z=L();v(()=>l(z,s(Ge))),n(Y,z)};I(le,Y=>{s(ye)?Y(he):Y(Ce,-1)})}U(B),se(1,B,()=>at,()=>({tier:"slow",distance:3})),se(2,B,()=>at,()=>({tier:"slow",distance:3})),n(d,B)}),U(Re);var Pt=u(Re,2);{var Dt=d=>{var B=fa(),le=j(B),he=j(le);et(he,()=>s(Ye),Y=>{var z=ga(),we=F(z,!0);v(()=>l(we,s(Ye))),se(1,z,()=>ge,()=>({axis:"y",tier:"slow"})),n(Y,z)}),U(le);var Ce=u(le);U(B),v(()=>l(Ce,`/${s(Oe)??""}`)),n(d,B)};I(Pt,d=>{s(ye)||d(Dt)})}U(Pe);var Ve=u(Pe,2);{const d=(f,h=ee,P=ee,D=ee,S=ee,C=ee)=>{var o=ba();Be(o,"",{},{gap:"0.25rem","padding-inline":"var(--operational-row-inline-padding)"});var t=j(o);{var e=m=>{var k=ma(),A=j(k);ra(A,{}),U(k),n(m,k)};I(t,m=>{h()==="active"&&m(e)})}var a=u(t,2),r=j(a);$t(r,{get icon(){return P()},size:14,get class(){return D()}}),U(a);var i=u(a,2),c=j(i);{var g=m=>{var k=st(),A=j(k);tt(A,S),U(k),se(1,k,()=>ge,()=>({axis:"y",tier:"moderate"})),se(2,k,()=>ge,()=>({axis:"y",tier:"moderate"})),n(m,k)},p=m=>{var k=st(),A=j(k);tt(A,C),U(k),se(1,k,()=>ge,()=>({axis:"y",tier:"moderate"})),se(2,k,()=>ge,()=>({axis:"y",tier:"moderate"})),n(m,k)};I(c,m=>{h()==="active"?m(g):m(p,-1)})}U(i),U(o),v(()=>Ue(a,1,`${aa} relative z-10 mt-1 flex size-4 shrink-0 items-center justify-start`,"svelte-enden2")),se(3,o,()=>ge,()=>({tier:"slow"})),n(f,o)},B=(f,h)=>{let P=Fe(()=>Ee(h?.(),""));var D=$(),S=w(D);{var C=t=>{{let e=y(()=>_.onboarding_setupCard_originalFolder_label());z(t,x,()=>s(e),G,()=>s(P))}},o=t=>{var e=L();v(()=>l(e,`${x()??""}${s(P)??""}`)),n(t,e)};I(S,t=>{G()?t(C):t(o,-1)})}n(f,D)},le=f=>{var h=$(),P=w(h);{var D=o=>{var t=ha(),e=w(t),a=F(e,!0),r=u(e,2),i=F(r),c=u(r,2);{var g=p=>{var m=xa(),k=F(m,!0);v(()=>l(k,s(ze))),n(p,m)};I(c,p=>{s(ze)&&p(g)})}v((p,m)=>{l(a,p),Be(i,`width: ${s(xe)??""}%`),je(i,"aria-label",m),je(i,"aria-valuenow",s(xe))},[()=>_.workspace_compactInitializer_progressWithPercent_label({label:nt(E()),percent:da(s(xe))}),()=>nt(E())]),n(o,t)},S=o=>{var t=fe(),e=w(t),a=u(e);{let r=y(()=>_.onboarding_setupCard_opening_after());B(a,()=>s(r))}v(r=>l(e,`${r??""} `),[()=>_.onboarding_setupCard_opening_before()]),n(o,t)},C=o=>{var t=fe(),e=w(t),a=u(e);B(a),v(r=>l(e,`${r??""} `),[()=>_.onboarding_setupCard_creatingIsolatedCopy_before()]),n(o,t)};I(P,o=>{s(bt)&&E()?o(D):ie()||ue()?o(S,1):o(C,-1)})}n(f,h)},he=f=>{var h=$(),P=w(h);{var D=o=>{const t=y(()=>V()||G());var e=Ca(),a=j(e),r=u(a);{var i=p=>{We(p,{get filePath(){return s(t)},get workspaceId(){return oe()},isDirectory:!0,variant:"sidebar",compact:!0,inline:!0,class:"setup-path",children:(m,k)=>{{let A=y(()=>Ae(s(t)));Y(m,()=>s(A),()=>".")}},$$slots:{default:!0}})},c=p=>{var m=L();v(()=>l(m,`${x()??""}.`)),n(p,m)};I(r,p=>{s(t)?p(i):p(c,-1)})}var g=u(r);U(e),v((p,m)=>{l(a,`${p??""} `),l(g,` ${m??""}`)},[()=>_.onboarding_setupCard_workingInFolder_before(),()=>_.onboarding_setupCard_plainFolderInPlace_label()]),n(o,e)},S=o=>{var t=wa(),e=w(t),a=u(e),r=F(a,!0),i=u(a,2);{var c=p=>{var m=fe(),k=w(m),A=u(k);We(A,{get filePath(){return V()},get workspaceId(){return oe()},isDirectory:!0,variant:"sidebar",compact:!0,inline:!0,class:"setup-path",children:(K,de)=>{{let ne=y(()=>Ae(V()));Y(K,()=>s(ne),()=>".")}},$$slots:{default:!0}}),v(K=>l(k,` ${K??""} `),[()=>_.onboarding_setupCard_at_label()]),n(p,m)},g=p=>{var m=L(".");n(p,m)};I(i,p=>{V()?p(c):p(g,-1)})}v(p=>{l(e,`${p??""} `),l(r,s(xt))},[()=>_.onboarding_setupCard_workingDirectlyOn_before()]),n(o,t)},C=o=>{var t=ot(),e=w(t),a=u(e);B(a);var r=u(a,2);{var i=g=>{var p=fe(),m=w(p),k=u(m);We(k,{get filePath(){return V()},get workspaceId(){return oe()},isDirectory:!0,variant:"sidebar",compact:!0,inline:!0,class:"setup-path",children:(A,K)=>{{let de=y(()=>Ae(V()));Y(A,()=>s(de),()=>".")}},$$slots:{default:!0}}),v(A=>l(m,` ${A??""} `),[()=>_.onboarding_setupCard_at_label()]),n(g,p)},c=g=>{var p=L(".");n(g,p)};I(r,g=>{V()?g(i):g(c,-1)})}v(g=>l(e,`${g??""} `),[()=>_.onboarding_setupCard_createdIsolatedCopy_before()]),n(o,t)};I(P,o=>{ue()?o(D):ie()?o(S,1):o(C,-1)})}n(f,h)},Ce=f=>{var h=$(),P=w(h);{var D=o=>{var t=$(),e=w(t);{var a=i=>{var c=Sa(),g=w(c),p=u(g),m=F(p,!0),k=u(p,1,!0);v((A,K)=>{l(g,`${A??""} `),l(m,H()),l(k,K)},[()=>_.onboarding_setupCard_workingOnBranchNamed_before(),()=>_.onboarding_setupCard_workingOnBranchActive_after()]),n(i,c)},r=i=>{var c=L();v(g=>l(c,g),[()=>_.onboarding_setupCard_workingOnBranch_label()]),n(i,c)};I(e,i=>{H()?i(a):i(r,-1)})}n(o,t)},S=o=>{var t=ya(),e=w(t),a=u(e),r=F(a,!0),i=u(a),c=u(i);{let g=y(()=>_.onboarding_setupCard_baseRef_label()),p=y(()=>_.onboarding_setupCard_creatingBranch_after());z(c,te,()=>s(g),()=>{},()=>s(p))}v((g,p)=>{l(e,`${g??""} `),l(r,H()),l(i,` ${p??""} `)},[()=>_.onboarding_setupCard_creatingBranch_before(),()=>_.onboarding_setupCard_creatingBranch_middle()]),n(o,t)},C=o=>{var t=L();v(e=>l(t,e),[()=>_.onboarding_setupCard_creatingBranchNoName_label()]),n(o,t)};I(P,o=>{ie()?o(D):H()?o(S,1):o(C,-1)})}n(f,h)},Y=(f,h=ee,P)=>{let D=Fe(()=>Ee(P?.(),""));const S=y(()=>Array.from(h()));var C=ka(),o=w(C),t=F(o,!0),e=u(o),a=j(e),r=F(a,!0),i=u(a),c=F(i,!0);U(e),v((g,p)=>{l(t,g),l(r,p),l(c,s(D))},[()=>s(S).slice(0,-1).join(""),()=>s(S).at(-1)??""]),n(f,C)},z=(f,h=ee,P=ee,D=ee,S)=>{let C=Fe(()=>Ee(S?.(),""));const o=y(()=>s(C).match(/^\p{P}+/u)?.[0]??"");var t=Pa(),e=w(t);Le(e,{variant:"plain",wrapContent:!1,class:"setup-inline-link cursor-pointer hover:text-foreground transition-colors",onclick:()=>wt(D()??h(),P()),children:(r,i)=>{Y(r,h,()=>s(o))},$$slots:{default:!0}});var a=u(e,1,!0);v(r=>l(a,r),[()=>s(C).slice(s(o).length)]),n(f,t)},we=f=>{var h=$(),P=w(h);{var D=o=>{var t=$(),e=w(t);{var a=i=>{var c=fe(),g=w(c),p=u(g);{let m=y(()=>_.onboarding_setupCard_branchName_label()),k=y(()=>_.onboarding_setupCard_workingOnBranchDone_after());z(p,H,()=>s(m),()=>{},()=>s(k))}v(m=>l(g,`${m??""} `),[()=>_.onboarding_setupCard_workingOnBranchNamed_before()]),n(i,c)},r=i=>{var c=L();v(g=>l(c,g),[()=>_.onboarding_setupCard_workingDirectlyOnBranch_label()]),n(i,c)};I(e,i=>{H()?i(a):i(r,-1)})}n(o,t)},S=o=>{var t=ot(),e=w(t),a=u(e);{let i=y(()=>_.onboarding_setupCard_branchName_label()),c=y(()=>_.onboarding_setupCard_workingInNewBranch_middle());z(a,H,()=>s(i),()=>{},()=>s(c))}var r=u(a,2);{let i=y(()=>_.onboarding_setupCard_baseRef_label()),c=y(()=>_.onboarding_setupCard_workingInNewBranch_after());z(r,te,()=>s(i),()=>{},()=>s(c))}v(i=>l(e,`${i??""} `),[()=>_.onboarding_setupCard_workingInNewBranch_before()]),n(o,t)},C=o=>{var t=L();v(e=>l(t,e),[()=>_.onboarding_setupCard_branchCreated_label()]),n(o,t)};I(P,o=>{ie()?o(D):H()?o(S,1):o(C,-1)})}n(f,h)},Ft=f=>{De();var h=_e(),P=w(h),D=u(P);{var S=t=>{var e=it(),a=F(e,!0);v(()=>l(a,ae())),n(t,e)},C=t=>{var e=L();v(a=>l(e,a),[()=>_.onboarding_setupCard_project_label()]),n(t,e)};I(D,t=>{ae()?t(S):t(C,-1)})}var o=u(D);v((t,e)=>{l(P,`${t??""} `),l(o,` ${e??""}`)},[()=>_.onboarding_setupCard_runningSetup_before(),()=>_.onboarding_setupCard_runningSetup_after()]),n(f,h)},Et=f=>{De();var h=Ia(),P=w(h),D=u(P);{var S=r=>{var i=it(),c=F(i,!0);v(()=>l(c,ae())),n(r,i)},C=r=>{var i=L();v(c=>l(i,c),[()=>_.onboarding_setupCard_project_label()]),n(r,i)};I(D,r=>{ae()?r(S):r(C,-1)})}var o=u(D),t=u(o);{var e=r=>{var i=fe(),c=w(i),g=u(c);rt(g,{class:"inline",side:"bottom",align:"start",interactive:!0,maxWidth:"22rem",delayDuration:300,trigger:A=>{Le(A,{variant:"plain",wrapContent:!1,class:"setup-inline-link underline underline-offset-2 cursor-pointer hover:text-foreground transition-colors",get onclick(){return R()},children:(K,de)=>{De();var ne=L();v(Se=>l(ne,Se),[()=>_.onboarding_setupCard_terminalTab_label()]),n(K,ne)},$$slots:{default:!0}})},content:A=>{var K=$(),de=w(K);{var ne=Se=>{var Qe=Da(),Wt=F(Qe,!0);v(()=>l(Wt,pe())),n(Se,Qe)};I(de,Se=>{pe()&&Se(ne)})}n(A,K)},footer:A=>{var K=lt(),de=F(K,!0);v(ne=>l(de,ne),[()=>_.onboarding_setupCard_openTerminal_footer()]),n(A,K)},$$slots:{trigger:!0,content:!0,footer:!0}}),v(p=>l(c,` ${p??""} `),[()=>_.onboarding_setupCard_ranSetupIn_middle()]),n(r,i)};I(t,r=>{R()&&r(e)})}var a=u(t,1,!0);v((r,i,c)=>{l(P,`${r??""} `),l(o,` ${i??""}`),l(a,c)},[()=>_.onboarding_setupCard_ranSetup_before(),()=>_.onboarding_setupCard_ranSetup_middle(),()=>_.onboarding_setupCard_ranSetup_after()]),n(f,h)},ce=f=>{rt(f,{class:"inline",side:"bottom",align:"start",interactive:!0,maxWidth:"22rem",delayDuration:300,trigger:S=>{Le(S,{variant:"plain",wrapContent:!1,class:"setup-inline-link underline underline-offset-2 cursor-pointer hover:text-foreground transition-colors",onclick:St,children:(C,o)=>{De();var t=L();v(()=>l(t,s(Ct))),n(C,t)},$$slots:{default:!0}})},content:S=>{var C=$(),o=w(C);{var t=e=>{var a=Na(),r=F(a,!0);v(()=>l(r,s(Te).description)),n(e,a)};I(o,e=>{s(Te)&&e(t)})}n(S,C)},footer:S=>{var C=lt(),o=F(C,!0);v(t=>l(o,t),[()=>_.onboarding_setupCard_editInSettings_footer()]),n(S,C)},$$slots:{trigger:!0,content:!0,footer:!0}})},Bt=f=>{var h=$(),P=w(h);{var D=e=>{var a=_e(),r=w(a),i=u(r);ce(i);var c=u(i);v((g,p)=>{l(r,`${g??""} `),l(c,` ${p??""}`)},[()=>_.onboarding_setupCard_agentReadyNamed_before(),()=>_.onboarding_setupCard_agentReadyNamed_after()]),n(e,a)},S=e=>{var a=L();v(r=>l(a,r),[()=>_.onboarding_setupCard_agentReady_label()]),n(e,a)},C=e=>{var a=_e(),r=w(a),i=u(r);ce(i);var c=u(i);v((g,p)=>{l(r,`${g??""} `),l(c,` ${p??""}`)},[()=>_.onboarding_setupCard_specStartingUp_before(),()=>_.onboarding_setupCard_specStartingUp_after()]),n(e,a)},o=e=>{var a=_e(),r=w(a),i=u(r);ce(i);var c=u(i);v((g,p)=>{l(r,`${g??""} `),l(c,` ${p??""}`)},[()=>_.onboarding_setupCard_startingUpNamed_before(),()=>_.onboarding_setupCard_startingUpNamed_after()]),n(e,a)},t=e=>{var a=L();v(r=>l(a,r),[()=>_.onboarding_setupCard_startingUp_label()]),n(e,a)};I(P,e=>{!re()&&W()?e(D):re()?s(He)?e(C,2):W()?e(o,3):e(t,-1):e(S,1)})}n(f,h)},Lt=f=>{var h=$(),P=w(h);{var D=e=>{var a=_e(),r=w(a),i=u(r);ce(i);var c=u(i);v((g,p)=>{l(r,`${g??""} `),l(c,` ${p??""}`)},[()=>_.onboarding_setupCard_agentReadyNamed_before(),()=>_.onboarding_setupCard_agentReadyNamed_after()]),n(e,a)},S=e=>{var a=L();v(r=>l(a,r),[()=>_.onboarding_setupCard_agentReady_label()]),n(e,a)},C=e=>{var a=_e(),r=w(a),i=u(r);ce(i);var c=u(i);v((g,p)=>{l(r,`${g??""} `),l(c,` ${p??""}`)},[()=>_.onboarding_setupCard_specDone_before(),()=>_.onboarding_setupCard_specDone_after()]),n(e,a)},o=e=>{var a=_e(),r=w(a),i=u(r);ce(i);var c=u(i);v((g,p)=>{l(r,`${g??""} `),l(c,` ${p??""}`)},[()=>_.onboarding_setupCard_agentDoneNamed_before(),()=>_.onboarding_setupCard_agentDoneNamed_after()]),n(e,a)},t=e=>{var a=L();v(r=>l(a,r),[()=>_.onboarding_setupCard_agentOrienting_label()]),n(e,a)};I(P,e=>{!re()&&W()?e(D):re()?s(He)?e(C,2):W()?e(o,3):e(t,-1):e(S,1)})}n(f,h)};var $e=j(Ve);{var It=f=>{d(f,ve,()=>Xt,()=>"-ml-px transform scale-[0.98]",()=>le,()=>he)};I($e,f=>{ve()!=="pending"&&f(It)})}var Xe=u($e,2);{var Nt=f=>{d(f,me,()=>Jt,()=>"",()=>Ce,()=>we)};I(Xe,f=>{me()!=="pending"&&!ie()&&!ue()&&f(Nt)})}var Je=u(Xe,2);{var Tt=f=>{d(f,q,()=>Qt,()=>"ml-[0.5px]",()=>Ft,()=>Et)};I(Je,f=>{q()&&q()!=="pending"&&f(Tt)})}var Ot=u(Je,2);{var At=f=>{d(f,be,()=>Zt,()=>"ml-[-0.5px]",()=>Bt,()=>Lt)};I(Ot,f=>{be()!=="pending"&&f(At)})}U(Ve)}U(ke),v(()=>Ue(ke,1,`${ta} w-full overflow-hidden transition-all duration-spring-slow ease-spring-slow motion-reduce:transition-none`,"svelte-enden2")),n(M,ke);var Rt=pt(yt);return X(),Rt}export{va as R,Oa as W,rr as a,ar as c,nr as g};
@@ -1,2 +1,2 @@
1
- const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["/app/immutable/chunks/CdO0EKIb.js","/app/immutable/chunks/Bu3w6q3q.js","/app/immutable/chunks/a1kG0lDg.js","/app/immutable/chunks/CJxGDkBm.js","/app/immutable/chunks/BdWqymET.js","/app/immutable/chunks/BdvDDr3c.js","/app/immutable/chunks/DVXtNvCM.js","/app/immutable/chunks/uXuxG9cN.js","/app/immutable/chunks/CIyUrgF0.js","/app/immutable/chunks/DIz708WA.js","/app/immutable/chunks/PVXvIyE8.js","/app/immutable/chunks/ChTqQfQN.js","/app/immutable/chunks/_Lq6xDqz.js","/app/immutable/chunks/D9DtZ5bO.js","/app/immutable/chunks/DxwfiAWm.js","/app/immutable/chunks/CqJQ3ikU.js","/app/immutable/chunks/prHJOEnU.js","/app/immutable/chunks/B5t5yFV1.js","/app/immutable/chunks/Dr-hGtz9.js","/app/immutable/chunks/ysr2ZeEL.js","/app/immutable/assets/spinner.D_TRo5Hy.css","/app/immutable/chunks/DEaLADF0.js","/app/immutable/chunks/DypB-Dwi.js","/app/immutable/chunks/BguHhtk8.js","/app/immutable/chunks/3uTmxU9o.js","/app/immutable/assets/button.-yaUNjRS.css","/app/immutable/chunks/CFWjNNDI.js","/app/immutable/chunks/Cg6uFDit.js","/app/immutable/chunks/CDKjl22x.js","/app/immutable/chunks/PJHVK1jp.js","/app/immutable/chunks/CszTaYPw.js","/app/immutable/chunks/NtFyWdpR.js","/app/immutable/chunks/ag06q4LL.js","/app/immutable/chunks/DUk9Psab.js","/app/immutable/chunks/DJfJ5NWH.js","/app/immutable/chunks/CoC9Ux29.js","/app/immutable/chunks/BoIfXiRv.js","/app/immutable/chunks/XJv96NUg.js","/app/immutable/assets/notify.B1j5oT2y.css","/app/immutable/chunks/DCOxMTSf.js","/app/immutable/chunks/DMl4Z5o_.js","/app/immutable/chunks/DdgRFvxI.js","/app/immutable/chunks/DKwAaLwd.js","/app/immutable/chunks/qkupoeeB.js","/app/immutable/chunks/DjtlNmSp.js","/app/immutable/chunks/rJd0G3JA.js","/app/immutable/chunks/B3nJy--T.js","/app/immutable/chunks/3TUSwkgT.js","/app/immutable/chunks/B5aYN90J.js","/app/immutable/chunks/Bnfzeolk.js","/app/immutable/chunks/D-2bQKif.js","/app/immutable/chunks/BigcqNWS.js","/app/immutable/chunks/Bx5mj_-o.js","/app/immutable/chunks/CMiilI_P.js","/app/immutable/chunks/bMVl-_uo.js","/app/immutable/chunks/ClSKdYXV.js","/app/immutable/chunks/uz9wJ9h7.js","/app/immutable/chunks/BtNhR2qx.js","/app/immutable/chunks/Bjdl3Bcn.js","/app/immutable/chunks/DOdlo-4T.js","/app/immutable/assets/menu-footer.Ck5GCpgU.css","/app/immutable/chunks/CB3yJRaj.js","/app/immutable/assets/dialog.BtQTVchw.css","/app/immutable/chunks/DdXuLwef.js","/app/immutable/assets/confirm.UE5obH5A.css","/app/immutable/chunks/CdT83fDm.js","/app/immutable/chunks/BrzSX242.js","/app/immutable/chunks/C-3HGS81.js","/app/immutable/chunks/CC7to1B5.js","/app/immutable/chunks/BAZnizpv.js","/app/immutable/assets/slider.kL-wkHnx.css","/app/immutable/chunks/BBuuu82x.js","/app/immutable/chunks/CddeEUaW.js","/app/immutable/chunks/DAsc1V4f.js","/app/immutable/chunks/BsieX9dN.js","/app/immutable/chunks/BbIcudMY.js","/app/immutable/chunks/D2dQD04-.js","/app/immutable/chunks/Ct-FgWRq.js","/app/immutable/assets/DiagramPresentation.C2GLYoBN.css"])))=>i.map(i=>d[i]);
2
- import{_ as Z}from"./a1kG0lDg.js";import{b as u,ay as o,aD as I,ah as ee,s as te,t as ne,u as se,aL as L,ad as re,ae as ie,a9 as D,Q as S,af as R,X as ae,W as oe,a4 as ce,aR as le,ba as ue,at as de,bh as fe}from"./Bu3w6q3q.js";import{G as k}from"./-xK_vQQs.js";function P(e,{edgePathsClass:n="edges edgePaths"}={}){const t=e.insert("g").attr("class","root"),r=t.insert("g").attr("class","clusters"),s=t.insert("g").attr("class",n),i=t.insert("g").attr("class","edgeLabels"),c=t.insert("g").attr("class","nodes");return{clusters:r,edgePaths:s,edgeLabels:i,nodes:c,rootGroups:t}}u(P,"createLayoutElementGroups");async function T(e,n,t){if(n.label){const{shapeSvg:r,bbox:s}=await de(e,t===void 0?n:{...n,width:t});n.labelBBox={width:s.width,height:s.height},r.remove()}else n.labelBBox={width:0,height:0}}u(T,"measureGroupLabel");async function _(e,n,t){const r=await ee(e,n,t),s=r.node()?.getBBox()??{width:0,height:0};return n.width=s.width,n.height=s.height,r}u(_,"insertMeasuredNode");function B(e,n,t){let r=e;const s=new Set;for(;r;){if(r.dir)return r.dir;if(!r.parentId||s.has(r.parentId))break;s.add(r.parentId),r=n.get(r.parentId)}return t}u(B,"resolveNodeDir");async function M(e,n,t={}){const r=new k({multigraph:!0,compound:!0}),s=[...n.edges],i=ae(),c=P(e),{edgeLabels:f,nodes:a}=c,g=new Map,m=new Map(n.nodes.map(d=>[d.id,d])),C=n.direction,w=e.node()!=null;await Promise.all(n.nodes.map(async d=>{if(d.isGroup){if(w){const b=t.unwrapGroupLabels&&d.labelType!=="markdown";await T(a,d,b?Number.POSITIVE_INFINITY:void 0)}r.setNode(d.id,{...d})}else{if(w){const b=await _(a,d,{config:i,dir:B(d,m,C)});g.set(d.id,b)}r.setNode(d.id,{...d})}}));for(const d of s)w&&D(d)&&await R(f,d),r.setEdge(d.start,d.end,{...d},d.id),n.edges.some(E=>E.id===d.id)||n.edges.push(d);if(globalThis.mermaidCaptureSizes){const{captureNodeSizes:d}=await Z(async()=>{const{captureNodeSizes:b}=await import("./CdO0EKIb.js");return{captureNodeSizes:b}},__vite__mapDeps([0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20,21,22,23,24,25,26,27,28,29,30,31,32,33,34,35,36,37,38,39,40,41,42,43,44,45,46,47,48,49,50,51,52,53,54,55,56,57,58,59,60,61,62,63,64,65,66,67,68,69,70,71,72,73,74,75,76,77,78]),import.meta.url);d(e,n)}return{graph:r,groups:c,nodeElements:g}}u(M,"createGraphWithElements");var l=new Map,h=new Map,A=new Map,ge=u(()=>{h.clear(),A.clear(),l.clear()},"clear"),v=u((e,n)=>{const t=h.get(n)||[];return o.trace("In isDescendant",n," ",e," = ",t.includes(e)),t.includes(e)},"isDescendant"),be=u((e,n)=>{const t=h.get(n)||[];return o.info("Descendants of ",n," is ",t),o.info("Edge is ",e),e.v===n||e.w===n?!1:t?t.includes(e.v)||v(e.v,n)||v(e.w,n)||t.includes(e.w):(o.debug("Tilt, ",n,",not in descendants"),!1)},"edgeInCluster"),X=u((e,n,t,r)=>{o.debug("Copying children of ",e,"root",r,"data",n.node(e),r);const s=n.children(e)||[];e!==r&&s.push(e),o.debug("Copying (nodes) clusterId",e,"nodes",s),s.forEach(i=>{if(n.children(i).length>0)X(i,n,t,r);else{const c=n.node(i);o.info("cp ",i," to ",r," with parent ",e),t.setNode(i,c),r!==n.parent(i)&&(o.debug("Setting parent",i,n.parent(i)),t.setParent(i,n.parent(i))),e!==r&&i!==e?(o.debug("Setting parent",i,e),t.setParent(i,e)):(o.info("In copy ",e,"root",r,"data",n.node(e),r),o.debug("Not Setting parent for node=",i,"cluster!==rootId",e!==r,"node!==clusterId",i!==e));const f=n.edges(i);o.debug("Copying Edges",f),f.forEach(a=>{o.info("Edge",a);const g=n.edge(a.v,a.w,a.name);o.info("Edge data",g,r);try{be(a,r)?(o.info("Copying as ",a.v,a.w,g,a.name),t.setEdge(a.v,a.w,g,a.name),o.info("newGraph edges ",t.edges(),t.edge(t.edges()[0]))):o.info("Skipping copy of edge ",a.v,"-->",a.w," rootId: ",r," clusterId:",e)}catch(m){o.error(m)}})}o.debug("Removing node",i),n.removeNode(i)})},"copy"),G=u((e,n)=>{const t=n.children(e);let r=[...t];for(const s of t)A.set(s,e),r=[...r,...G(s,n)];return r},"extractDescendants"),he=u((e,n,t)=>{const r=e.edges().filter(a=>a.v===n||a.w===n),s=e.edges().filter(a=>a.v===t||a.w===t),i=r.map(a=>({v:a.v===n?t:a.v,w:a.w===n?n:a.w})),c=s.map(a=>({v:a.v,w:a.w}));return i.filter(a=>c.some(g=>a.v===g.v&&a.w===g.w))},"findCommonEdges"),p=u((e,n,t)=>{const r=n.children(e);if(o.trace("Searching children of id ",e,r),r.length<1)return e;let s;for(const i of r){const c=p(i,n,t),f=he(n,t,c);if(c)if(f.length>0)s=c;else return c}return s},"findNonClusterChild"),x=u(e=>!l.has(e)||!l.get(e).externalConnections?e:l.has(e)?l.get(e).id:e,"getAnchorId"),Ne=u((e,n)=>{if(!e||n>10){o.debug("Opting out, no graph ");return}else o.debug("Opting in, graph ");e.nodes().forEach(function(t){e.children(t).length>0&&(o.debug("Cluster identified",t," Replacement id in edges: ",p(t,e,t)),h.set(t,G(t,e)),l.set(t,{id:p(t,e,t),clusterData:e.node(t)}))}),e.nodes().forEach(function(t){const r=e.children(t),s=e.edges();r.length>0?(o.debug("Cluster identified",t,h),s.forEach(i=>{const c=v(i.v,t),f=v(i.w,t);c^f&&(o.debug("Edge: ",i," leaves cluster ",t),o.debug("Descendants of XXX ",t,": ",h.get(t)),l.get(t).externalConnections=!0)})):o.debug("Not a cluster ",t,h)});for(let t of l.keys()){const r=l.get(t).id,s=e.parent(r);s!==t&&l.has(s)&&!l.get(s).externalConnections&&(l.get(t).id=s);const i=e.edges().some(c=>c.v===t);if(r&&l.get(t)?.externalConnections&&i&&$(e,r,t)){const c=me(e,t,e.parent(r));c&&(l.get(t).id=c)}}e.edges().forEach(function(t){const r=e.edge(t);o.debug("Edge "+t.v+" -> "+t.w+": "+JSON.stringify(t)),o.debug("Edge "+t.v+" -> "+t.w+": "+JSON.stringify(e.edge(t)));let s=t.v,i=t.w;if(o.debug("Fix XXX",l,"ids:",t.v,t.w,"Translating: ",l.get(t.v)," --- ",l.get(t.w)),l.get(t.v)||l.get(t.w)){if(o.debug("Fixing and trying - removing XXX",t.v,t.w,t.name),s=x(t.v),i=x(t.w),e.removeEdge(t.v,t.w,t.name),s!==t.v){const c=e.parent(s);l.get(c).externalConnections=!0,r.fromCluster=t.v}if(i!==t.w){const c=e.parent(i);l.get(c).externalConnections=!0,r.toCluster=t.w}o.debug("Fix Replacing with XXX",s,i,t.name),e.setEdge(s,i,r,t.name)}}),O(e,0),o.trace(l)},"adjustClustersAndEdges"),O=u((e,n)=>{if(n>10){o.error("Bailing out");return}let t=e.nodes(),r=!1;for(const s of t){const i=e.children(s);r=r||i.length>0}if(!r){o.debug("Done, no node has children",e.nodes());return}o.debug("Nodes = ",t,n);for(const s of t)if(o.debug("Extracting node",s,l,l.has(s)&&!l.get(s).externalConnections,!e.parent(s),e.node(s),e.children("D")," Depth ",n),!l.has(s))o.debug("Not a cluster",s,n);else if(!l.get(s).externalConnections&&e.children(s)&&e.children(s).length>0){o.debug("Cluster without external connections, without a parent and with children",s,n);let c=e.graph().rankdir==="TB"?"LR":"TB";l.get(s)?.clusterData?.dir&&(c=l.get(s).clusterData.dir,o.debug("Fixing dir",l.get(s).clusterData.dir,c));const f=new k({multigraph:!0,compound:!0}).setGraph({rankdir:c,nodesep:50,ranksep:50,marginx:8,marginy:8}).setDefaultEdgeLabel(function(){return{}});X(s,e,f,s),e.setNode(s,{clusterNode:!0,id:s,clusterData:l.get(s).clusterData,label:l.get(s).label,graph:f})}else o.debug("Cluster ** ",s," **not meeting the criteria !externalConnections:",!l.get(s).externalConnections," no parent: ",!e.parent(s)," children ",e.children(s)&&e.children(s).length>0,e.children("D"),n),o.debug(l);t=e.nodes(),o.debug("New list of nodes",t);for(const s of t){const i=e.node(s);o.debug(" Now next level",s,i),i?.clusterNode&&O(i.graph,n+1)}},"extractor"),F=u((e,n)=>{if(n.length===0)return[];let t=Object.assign([],n);return n.forEach(r=>{const s=e.children(r),i=F(e,s);t=[...t,...i]}),t},"sorter"),ye=u(e=>F(e,e.children()),"sortNodesByHierarchy"),$=u((e,n,t)=>{let r=e.parent(n);for(;r&&r!==t;){const s=l.get(r);if(s&&!s.externalConnections)return!0;r=e.parent(r)}return!1},"isNodeInExtractableCluster"),me=u((e,n,t)=>{const r=e.children(n)??[];for(const s of r){if(s===t||v(s,t))continue;const i=p(s,e,n);if(i&&!$(e,i,n))return i}return null},"findSafeAnchorNode");function we({prepareLayout:e,measureLayout:n,runLayoutCore:t,paintLayout:r,afterPaint:s,paintOptions:i}){const c=n??z;return u(async function(a,g,m,C){const w=g.select("g");(m?.insertMarkers??I)(w,a.markers,a.type,a.diagramId),j();const d={element:w,helpers:m,options:C};d.preparedLayout=await e?.(a,d);const b=await c(a,d),E=await t(a,d),N={...d,measure:b};r?await r(a,N,E):await H(a,N,i),await s?.(a,N,E)},"render")}u(we,"createCommonLayoutRenderer");function j(){te(),ne(),se(),ge()}u(j,"clearLayoutRenderState");async function z(e,{element:n},t){return await M(n,e,t)}u(z,"defaultMeasureLayout");async function H(e,n,t={}){const{measure:r}=n,{groups:s}=r;for(const c of t.getNodes?.(e,n)??e.nodes)t.skipNode?.(c,n)||await W(s,c,n,t);const i=V(e.nodes);for(const c of e.edges)Q(c,t)||await Y(s,c,i,e,t,n)}u(H,"paintLayoutData");async function W(e,n,t,r){n.clusterNode?L(n):J(n,t,r)?await re(e.clusters,n):L(n)}u(W,"paintLayoutNode");function J(e,n,t){return e.isGroup===!0&&(t.isCluster?.(e,n)??!0)}u(J,"shouldPaintAsCluster");function V(e){const n=new Map;for(const t of e)t?.id&&n.set(t.id,t);return n}u(V,"buildNodeLookup");function Q(e,n){return e.isLayoutOnly||!!n.skipEdge?.(e)}u(Q,"shouldSkipPaintEdge");async function Y(e,n,t,r,s,i){const c=ie(e.edgePaths,{...n},s.clusterDb??new Map,r.type,y(n.start,n,t,i,s),y(n.end,n,t,i,s),r.diagramId,q(n,s),r.layoutAlgorithm);D(n)&&(S.has(n.id)||await R(e.edgeLabels,n),K(n,c))}u(Y,"paintLayoutEdge");function y(e,n,t,r,s){return s.getEdgeNode?.(e,n,r)??(e?t.get(e)??{}:{})}u(y,"getRenderedNode");function q(e,n){return typeof n.skipIntersect=="function"?n.skipIntersect(e):n.skipIntersect??!1}u(q,"shouldSkipIntersect");function K(e,n){const t=n?.updatedPath??n?.originalPath,r=oe(),{subGraphTitleTotalMargin:s}=ce({flowchart:r.flowchart??{}});if(e.label){const i=S.get(e.id),{x:c,y:f}=le(e,n);i.attr("transform",`translate(${c}, ${f+s/2})`)}for(const[i,c]of[["startLeft",e.startLabelLeft],["startRight",e.startLabelRight],["endLeft",e.endLabelLeft],["endRight",e.endLabelRight]])if(c){const{x:f,y:a}=U(e,i,t);ue.get(e.id)[i].attr("transform",`translate(${f}, ${a})`)}}u(K,"positionRenderedEdgeLabel");var ve={startLeft:"start_left",startRight:"start_right",endLeft:"end_left",endRight:"end_right"};function U(e,n,t){const r=e.terminalLabelCenters?.[n];if(r)return{...r};if(!t)return{x:e.x,y:e.y};const s=n.startsWith("start")?e.arrowTypeStart:e.arrowTypeEnd;return fe.calcTerminalLabelPosition(s?10:0,ve[n],t)}u(U,"terminalLabelTranslate");export{Ne as a,we as b,l as c,P as d,z as e,p as f,_ as i,ye as s};
1
+ const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["/app/immutable/chunks/Ckp5O1pb.js","/app/immutable/chunks/DrBi0w5G.js","/app/immutable/chunks/51_h0jm2.js","/app/immutable/chunks/CJxGDkBm.js","/app/immutable/chunks/BdWqymET.js","/app/immutable/chunks/uWDJKH9B.js","/app/immutable/chunks/XJqoy2ap.js","/app/immutable/chunks/uXuxG9cN.js","/app/immutable/chunks/CIyUrgF0.js","/app/immutable/chunks/Zldsekdv.js","/app/immutable/chunks/PVXvIyE8.js","/app/immutable/chunks/ChTqQfQN.js","/app/immutable/chunks/BEklUrxK.js","/app/immutable/chunks/DxvSggY5.js","/app/immutable/chunks/DxwfiAWm.js","/app/immutable/chunks/CqJQ3ikU.js","/app/immutable/chunks/DSQT151l.js","/app/immutable/chunks/DGmOjLYi.js","/app/immutable/chunks/PXCFrn2V.js","/app/immutable/chunks/CpPNoOk-.js","/app/immutable/assets/spinner.D_TRo5Hy.css","/app/immutable/chunks/Bjy4ygfJ.js","/app/immutable/chunks/DypB-Dwi.js","/app/immutable/chunks/CF1Tu_8c.js","/app/immutable/chunks/BQDGTBxC.js","/app/immutable/assets/button.-yaUNjRS.css","/app/immutable/chunks/LKW_Bid7.js","/app/immutable/chunks/DqFWZ_g1.js","/app/immutable/chunks/DWLnWMNZ.js","/app/immutable/chunks/SX1khnGy.js","/app/immutable/chunks/Cdw_CIdg.js","/app/immutable/chunks/NtFyWdpR.js","/app/immutable/chunks/C9UsZ4re.js","/app/immutable/chunks/JKboQXkL.js","/app/immutable/chunks/DJfJ5NWH.js","/app/immutable/chunks/BxwkoIbZ.js","/app/immutable/chunks/BoIfXiRv.js","/app/immutable/chunks/XJv96NUg.js","/app/immutable/assets/notify.B1j5oT2y.css","/app/immutable/chunks/DCOxMTSf.js","/app/immutable/chunks/DMl4Z5o_.js","/app/immutable/chunks/Bi5_2qbB.js","/app/immutable/chunks/DKwAaLwd.js","/app/immutable/chunks/Bs9TCQJX.js","/app/immutable/chunks/BuveYyQe.js","/app/immutable/chunks/oOuL5l8A.js","/app/immutable/chunks/DUItrdZb.js","/app/immutable/chunks/DVy6H5Ng.js","/app/immutable/chunks/B5aYN90J.js","/app/immutable/chunks/Cs_DX3BC.js","/app/immutable/chunks/D-2bQKif.js","/app/immutable/chunks/BigcqNWS.js","/app/immutable/chunks/CnM1-KSC.js","/app/immutable/chunks/CMiilI_P.js","/app/immutable/chunks/M18r7swD.js","/app/immutable/chunks/Cdhrdfve.js","/app/immutable/chunks/BgDYQZ_0.js","/app/immutable/chunks/DKn1sQ32.js","/app/immutable/chunks/BLzqYDED.js","/app/immutable/chunks/DmhHEMPi.js","/app/immutable/assets/menu-footer.Ck5GCpgU.css","/app/immutable/chunks/CN-6Tr26.js","/app/immutable/assets/dialog.BtQTVchw.css","/app/immutable/chunks/BGP1lrgu.js","/app/immutable/assets/confirm.UE5obH5A.css","/app/immutable/chunks/B_QtiZYt.js","/app/immutable/chunks/BCBNqT5t.js","/app/immutable/chunks/C1McR-sz.js","/app/immutable/chunks/CC7to1B5.js","/app/immutable/chunks/BgLPrJ77.js","/app/immutable/assets/slider.kL-wkHnx.css","/app/immutable/chunks/KAO5AtPr.js","/app/immutable/chunks/CC08YY4X.js","/app/immutable/chunks/DAsc1V4f.js","/app/immutable/chunks/BsieX9dN.js","/app/immutable/chunks/BbIcudMY.js","/app/immutable/chunks/Dukt1CUc.js","/app/immutable/chunks/B0v5Qiob.js","/app/immutable/assets/DiagramPresentation.C2GLYoBN.css"])))=>i.map(i=>d[i]);
2
+ import{_ as Z}from"./51_h0jm2.js";import{b as u,ay as o,aD as I,ah as ee,s as te,t as ne,u as se,aL as L,ad as re,ae as ie,a9 as D,Q as S,af as R,X as ae,W as oe,a4 as ce,aR as le,ba as ue,at as de,bh as fe}from"./DrBi0w5G.js";import{G as k}from"./-xK_vQQs.js";function P(e,{edgePathsClass:n="edges edgePaths"}={}){const t=e.insert("g").attr("class","root"),r=t.insert("g").attr("class","clusters"),s=t.insert("g").attr("class",n),i=t.insert("g").attr("class","edgeLabels"),c=t.insert("g").attr("class","nodes");return{clusters:r,edgePaths:s,edgeLabels:i,nodes:c,rootGroups:t}}u(P,"createLayoutElementGroups");async function T(e,n,t){if(n.label){const{shapeSvg:r,bbox:s}=await de(e,t===void 0?n:{...n,width:t});n.labelBBox={width:s.width,height:s.height},r.remove()}else n.labelBBox={width:0,height:0}}u(T,"measureGroupLabel");async function _(e,n,t){const r=await ee(e,n,t),s=r.node()?.getBBox()??{width:0,height:0};return n.width=s.width,n.height=s.height,r}u(_,"insertMeasuredNode");function B(e,n,t){let r=e;const s=new Set;for(;r;){if(r.dir)return r.dir;if(!r.parentId||s.has(r.parentId))break;s.add(r.parentId),r=n.get(r.parentId)}return t}u(B,"resolveNodeDir");async function M(e,n,t={}){const r=new k({multigraph:!0,compound:!0}),s=[...n.edges],i=ae(),c=P(e),{edgeLabels:f,nodes:a}=c,g=new Map,m=new Map(n.nodes.map(d=>[d.id,d])),C=n.direction,w=e.node()!=null;await Promise.all(n.nodes.map(async d=>{if(d.isGroup){if(w){const b=t.unwrapGroupLabels&&d.labelType!=="markdown";await T(a,d,b?Number.POSITIVE_INFINITY:void 0)}r.setNode(d.id,{...d})}else{if(w){const b=await _(a,d,{config:i,dir:B(d,m,C)});g.set(d.id,b)}r.setNode(d.id,{...d})}}));for(const d of s)w&&D(d)&&await R(f,d),r.setEdge(d.start,d.end,{...d},d.id),n.edges.some(E=>E.id===d.id)||n.edges.push(d);if(globalThis.mermaidCaptureSizes){const{captureNodeSizes:d}=await Z(async()=>{const{captureNodeSizes:b}=await import("./Ckp5O1pb.js");return{captureNodeSizes:b}},__vite__mapDeps([0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20,21,22,23,24,25,26,27,28,29,30,31,32,33,34,35,36,37,38,39,40,41,42,43,44,45,46,47,48,49,50,51,52,53,54,55,56,57,58,59,60,61,62,63,64,65,66,67,68,69,70,71,72,73,74,75,76,77,78]),import.meta.url);d(e,n)}return{graph:r,groups:c,nodeElements:g}}u(M,"createGraphWithElements");var l=new Map,h=new Map,A=new Map,ge=u(()=>{h.clear(),A.clear(),l.clear()},"clear"),v=u((e,n)=>{const t=h.get(n)||[];return o.trace("In isDescendant",n," ",e," = ",t.includes(e)),t.includes(e)},"isDescendant"),be=u((e,n)=>{const t=h.get(n)||[];return o.info("Descendants of ",n," is ",t),o.info("Edge is ",e),e.v===n||e.w===n?!1:t?t.includes(e.v)||v(e.v,n)||v(e.w,n)||t.includes(e.w):(o.debug("Tilt, ",n,",not in descendants"),!1)},"edgeInCluster"),X=u((e,n,t,r)=>{o.debug("Copying children of ",e,"root",r,"data",n.node(e),r);const s=n.children(e)||[];e!==r&&s.push(e),o.debug("Copying (nodes) clusterId",e,"nodes",s),s.forEach(i=>{if(n.children(i).length>0)X(i,n,t,r);else{const c=n.node(i);o.info("cp ",i," to ",r," with parent ",e),t.setNode(i,c),r!==n.parent(i)&&(o.debug("Setting parent",i,n.parent(i)),t.setParent(i,n.parent(i))),e!==r&&i!==e?(o.debug("Setting parent",i,e),t.setParent(i,e)):(o.info("In copy ",e,"root",r,"data",n.node(e),r),o.debug("Not Setting parent for node=",i,"cluster!==rootId",e!==r,"node!==clusterId",i!==e));const f=n.edges(i);o.debug("Copying Edges",f),f.forEach(a=>{o.info("Edge",a);const g=n.edge(a.v,a.w,a.name);o.info("Edge data",g,r);try{be(a,r)?(o.info("Copying as ",a.v,a.w,g,a.name),t.setEdge(a.v,a.w,g,a.name),o.info("newGraph edges ",t.edges(),t.edge(t.edges()[0]))):o.info("Skipping copy of edge ",a.v,"-->",a.w," rootId: ",r," clusterId:",e)}catch(m){o.error(m)}})}o.debug("Removing node",i),n.removeNode(i)})},"copy"),G=u((e,n)=>{const t=n.children(e);let r=[...t];for(const s of t)A.set(s,e),r=[...r,...G(s,n)];return r},"extractDescendants"),he=u((e,n,t)=>{const r=e.edges().filter(a=>a.v===n||a.w===n),s=e.edges().filter(a=>a.v===t||a.w===t),i=r.map(a=>({v:a.v===n?t:a.v,w:a.w===n?n:a.w})),c=s.map(a=>({v:a.v,w:a.w}));return i.filter(a=>c.some(g=>a.v===g.v&&a.w===g.w))},"findCommonEdges"),p=u((e,n,t)=>{const r=n.children(e);if(o.trace("Searching children of id ",e,r),r.length<1)return e;let s;for(const i of r){const c=p(i,n,t),f=he(n,t,c);if(c)if(f.length>0)s=c;else return c}return s},"findNonClusterChild"),x=u(e=>!l.has(e)||!l.get(e).externalConnections?e:l.has(e)?l.get(e).id:e,"getAnchorId"),Ne=u((e,n)=>{if(!e||n>10){o.debug("Opting out, no graph ");return}else o.debug("Opting in, graph ");e.nodes().forEach(function(t){e.children(t).length>0&&(o.debug("Cluster identified",t," Replacement id in edges: ",p(t,e,t)),h.set(t,G(t,e)),l.set(t,{id:p(t,e,t),clusterData:e.node(t)}))}),e.nodes().forEach(function(t){const r=e.children(t),s=e.edges();r.length>0?(o.debug("Cluster identified",t,h),s.forEach(i=>{const c=v(i.v,t),f=v(i.w,t);c^f&&(o.debug("Edge: ",i," leaves cluster ",t),o.debug("Descendants of XXX ",t,": ",h.get(t)),l.get(t).externalConnections=!0)})):o.debug("Not a cluster ",t,h)});for(let t of l.keys()){const r=l.get(t).id,s=e.parent(r);s!==t&&l.has(s)&&!l.get(s).externalConnections&&(l.get(t).id=s);const i=e.edges().some(c=>c.v===t);if(r&&l.get(t)?.externalConnections&&i&&$(e,r,t)){const c=me(e,t,e.parent(r));c&&(l.get(t).id=c)}}e.edges().forEach(function(t){const r=e.edge(t);o.debug("Edge "+t.v+" -> "+t.w+": "+JSON.stringify(t)),o.debug("Edge "+t.v+" -> "+t.w+": "+JSON.stringify(e.edge(t)));let s=t.v,i=t.w;if(o.debug("Fix XXX",l,"ids:",t.v,t.w,"Translating: ",l.get(t.v)," --- ",l.get(t.w)),l.get(t.v)||l.get(t.w)){if(o.debug("Fixing and trying - removing XXX",t.v,t.w,t.name),s=x(t.v),i=x(t.w),e.removeEdge(t.v,t.w,t.name),s!==t.v){const c=e.parent(s);l.get(c).externalConnections=!0,r.fromCluster=t.v}if(i!==t.w){const c=e.parent(i);l.get(c).externalConnections=!0,r.toCluster=t.w}o.debug("Fix Replacing with XXX",s,i,t.name),e.setEdge(s,i,r,t.name)}}),O(e,0),o.trace(l)},"adjustClustersAndEdges"),O=u((e,n)=>{if(n>10){o.error("Bailing out");return}let t=e.nodes(),r=!1;for(const s of t){const i=e.children(s);r=r||i.length>0}if(!r){o.debug("Done, no node has children",e.nodes());return}o.debug("Nodes = ",t,n);for(const s of t)if(o.debug("Extracting node",s,l,l.has(s)&&!l.get(s).externalConnections,!e.parent(s),e.node(s),e.children("D")," Depth ",n),!l.has(s))o.debug("Not a cluster",s,n);else if(!l.get(s).externalConnections&&e.children(s)&&e.children(s).length>0){o.debug("Cluster without external connections, without a parent and with children",s,n);let c=e.graph().rankdir==="TB"?"LR":"TB";l.get(s)?.clusterData?.dir&&(c=l.get(s).clusterData.dir,o.debug("Fixing dir",l.get(s).clusterData.dir,c));const f=new k({multigraph:!0,compound:!0}).setGraph({rankdir:c,nodesep:50,ranksep:50,marginx:8,marginy:8}).setDefaultEdgeLabel(function(){return{}});X(s,e,f,s),e.setNode(s,{clusterNode:!0,id:s,clusterData:l.get(s).clusterData,label:l.get(s).label,graph:f})}else o.debug("Cluster ** ",s," **not meeting the criteria !externalConnections:",!l.get(s).externalConnections," no parent: ",!e.parent(s)," children ",e.children(s)&&e.children(s).length>0,e.children("D"),n),o.debug(l);t=e.nodes(),o.debug("New list of nodes",t);for(const s of t){const i=e.node(s);o.debug(" Now next level",s,i),i?.clusterNode&&O(i.graph,n+1)}},"extractor"),F=u((e,n)=>{if(n.length===0)return[];let t=Object.assign([],n);return n.forEach(r=>{const s=e.children(r),i=F(e,s);t=[...t,...i]}),t},"sorter"),ye=u(e=>F(e,e.children()),"sortNodesByHierarchy"),$=u((e,n,t)=>{let r=e.parent(n);for(;r&&r!==t;){const s=l.get(r);if(s&&!s.externalConnections)return!0;r=e.parent(r)}return!1},"isNodeInExtractableCluster"),me=u((e,n,t)=>{const r=e.children(n)??[];for(const s of r){if(s===t||v(s,t))continue;const i=p(s,e,n);if(i&&!$(e,i,n))return i}return null},"findSafeAnchorNode");function we({prepareLayout:e,measureLayout:n,runLayoutCore:t,paintLayout:r,afterPaint:s,paintOptions:i}){const c=n??z;return u(async function(a,g,m,C){const w=g.select("g");(m?.insertMarkers??I)(w,a.markers,a.type,a.diagramId),j();const d={element:w,helpers:m,options:C};d.preparedLayout=await e?.(a,d);const b=await c(a,d),E=await t(a,d),N={...d,measure:b};r?await r(a,N,E):await H(a,N,i),await s?.(a,N,E)},"render")}u(we,"createCommonLayoutRenderer");function j(){te(),ne(),se(),ge()}u(j,"clearLayoutRenderState");async function z(e,{element:n},t){return await M(n,e,t)}u(z,"defaultMeasureLayout");async function H(e,n,t={}){const{measure:r}=n,{groups:s}=r;for(const c of t.getNodes?.(e,n)??e.nodes)t.skipNode?.(c,n)||await W(s,c,n,t);const i=V(e.nodes);for(const c of e.edges)Q(c,t)||await Y(s,c,i,e,t,n)}u(H,"paintLayoutData");async function W(e,n,t,r){n.clusterNode?L(n):J(n,t,r)?await re(e.clusters,n):L(n)}u(W,"paintLayoutNode");function J(e,n,t){return e.isGroup===!0&&(t.isCluster?.(e,n)??!0)}u(J,"shouldPaintAsCluster");function V(e){const n=new Map;for(const t of e)t?.id&&n.set(t.id,t);return n}u(V,"buildNodeLookup");function Q(e,n){return e.isLayoutOnly||!!n.skipEdge?.(e)}u(Q,"shouldSkipPaintEdge");async function Y(e,n,t,r,s,i){const c=ie(e.edgePaths,{...n},s.clusterDb??new Map,r.type,y(n.start,n,t,i,s),y(n.end,n,t,i,s),r.diagramId,q(n,s),r.layoutAlgorithm);D(n)&&(S.has(n.id)||await R(e.edgeLabels,n),K(n,c))}u(Y,"paintLayoutEdge");function y(e,n,t,r,s){return s.getEdgeNode?.(e,n,r)??(e?t.get(e)??{}:{})}u(y,"getRenderedNode");function q(e,n){return typeof n.skipIntersect=="function"?n.skipIntersect(e):n.skipIntersect??!1}u(q,"shouldSkipIntersect");function K(e,n){const t=n?.updatedPath??n?.originalPath,r=oe(),{subGraphTitleTotalMargin:s}=ce({flowchart:r.flowchart??{}});if(e.label){const i=S.get(e.id),{x:c,y:f}=le(e,n);i.attr("transform",`translate(${c}, ${f+s/2})`)}for(const[i,c]of[["startLeft",e.startLabelLeft],["startRight",e.startLabelRight],["endLeft",e.endLabelLeft],["endRight",e.endLabelRight]])if(c){const{x:f,y:a}=U(e,i,t);ue.get(e.id)[i].attr("transform",`translate(${f}, ${a})`)}}u(K,"positionRenderedEdgeLabel");var ve={startLeft:"start_left",startRight:"start_right",endLeft:"end_left",endRight:"end_right"};function U(e,n,t){const r=e.terminalLabelCenters?.[n];if(r)return{...r};if(!t)return{x:e.x,y:e.y};const s=n.startsWith("start")?e.arrowTypeStart:e.arrowTypeEnd;return fe.calcTerminalLabelPosition(s?10:0,ve[n],t)}u(U,"terminalLabelTranslate");export{Ne as a,we as b,l as c,P as d,z as e,p as f,_ as i,ye as s};
@@ -1,5 +1,5 @@
1
- const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["/app/immutable/chunks/ChcqjzlK.js","/app/immutable/chunks/a1kG0lDg.js","/app/immutable/chunks/CJxGDkBm.js","/app/immutable/chunks/PJHVK1jp.js","/app/immutable/chunks/CqJQ3ikU.js","/app/immutable/chunks/CIyUrgF0.js","/app/immutable/chunks/Dr-hGtz9.js","/app/immutable/chunks/ysr2ZeEL.js","/app/immutable/chunks/D9DtZ5bO.js","/app/immutable/assets/spinner.D_TRo5Hy.css","/app/immutable/chunks/CszTaYPw.js","/app/immutable/chunks/NtFyWdpR.js","/app/immutable/chunks/DEaLADF0.js","/app/immutable/chunks/BguHhtk8.js","/app/immutable/chunks/3uTmxU9o.js","/app/immutable/chunks/uXuxG9cN.js","/app/immutable/assets/button.-yaUNjRS.css","/app/immutable/chunks/B5t5yFV1.js","/app/immutable/chunks/ag06q4LL.js","/app/immutable/chunks/Cg6uFDit.js","/app/immutable/chunks/DUk9Psab.js","/app/immutable/chunks/DIz708WA.js","/app/immutable/chunks/PVXvIyE8.js","/app/immutable/chunks/ChTqQfQN.js","/app/immutable/chunks/_Lq6xDqz.js","/app/immutable/chunks/DxwfiAWm.js","/app/immutable/chunks/DJfJ5NWH.js","/app/immutable/chunks/prHJOEnU.js","/app/immutable/chunks/CoC9Ux29.js","/app/immutable/chunks/BoIfXiRv.js","/app/immutable/chunks/XJv96NUg.js","/app/immutable/assets/notify.B1j5oT2y.css","/app/immutable/chunks/DVXtNvCM.js","/app/immutable/chunks/DypB-Dwi.js","/app/immutable/chunks/CFWjNNDI.js","/app/immutable/chunks/DjtlNmSp.js","/app/immutable/chunks/rJd0G3JA.js","/app/immutable/chunks/UdBW3xHf.js","/app/immutable/chunks/BdWqymET.js","/app/immutable/chunks/XokPPDRt.js","/app/immutable/chunks/wlvXh-zp.js","/app/immutable/chunks/B0Z-1lwJ.js","/app/immutable/chunks/DdgRFvxI.js","/app/immutable/chunks/DKwAaLwd.js","/app/immutable/chunks/aFmAoxnK.js"])))=>i.map(i=>d[i]);
2
- var Rp=Object.defineProperty;var Rl=n=>{throw TypeError(n)};var Lp=(n,e,t)=>e in n?Rp(n,e,{enumerable:!0,configurable:!0,writable:!0,value:t}):n[e]=t;var ut=(n,e,t)=>Lp(n,typeof e!="symbol"?e+"":e,t),Pp=(n,e,t)=>e.has(n)||Rl("Cannot "+t);var jn=(n,e,t)=>(Pp(n,e,"read from private field"),t?t.call(n):e.get(n)),_i=(n,e,t)=>e.has(n)?Rl("Cannot add the same private member more than once"):e instanceof WeakSet?e.add(n):e.set(n,t);import{t as Wt,bo as L,bw as jt,b as Kt,bp as _p,bm as re,bq as zp,bs as $p,_ as zi}from"./a1kG0lDg.js";import{bs as Ut,b_ as ne,W as K,bn as qt,aA as P,aC as zu,br as Zo,bb as Zr,c3 as Mn,aG as Bp,bk as $u,a7 as Er,ay as Dt,c0 as Bu,a5 as he,aD as m,bA as ae,bS as ie,aw as Hp,bH as fe,c9 as B,bV as Ue,aB as ee,ai as Zs,ca as kt,aj as Jn,bl as xe,bO as de,bo as _a,bj as Hu,be as Fu,b$ as Vu,bf as Fp,c5 as Kn}from"./CJxGDkBm.js";import{c as Eo}from"./B5t5yFV1.js";import{s as wt,f as bn,c as ea,b as Vp,g as pi,e as Wp}from"./ysr2ZeEL.js";import{b as Or}from"./NtFyWdpR.js";import{i as jp}from"./uz9wJ9h7.js";import{d1 as Kp,aF as Up,aT as Ll}from"./BdvDDr3c.js";import{a as qp}from"./CC7to1B5.js";import{aT as Jp,aB as Gp,ao as Xp,aw as Yp,ab as Qp,f as sn,ae as Wu,a1 as Zp}from"./CszTaYPw.js";import{i as ve}from"./Dr-hGtz9.js";import{F as rn,bb as em,bv as za,bh as ju,v as tm,bE as nm,d3 as rm,aI as Pl,bg as Cr,bn as Tr,cZ as Ku,cW as im,cn as Uu,cK as qu,ak as sm,av as Ju,ay as _l,ap as om,aj as am,as as lm,cX as cm,aZ as um,aN as To,co as dm,bx as fm,cb as hm,cy as zl,Y as pm,cH as mm,at as gm,bU as ym,aq as bm,c7 as vm,bN as km,c_ as xm,al as wm,bl as Sm,bF as Cm,a$ as Mm,d2 as Em,am as Tm,bS as Am,aT as Nm,b0 as Om,c1 as Dm,bd as Im,cx as Rm,cD as Lm,bR as Pm,bo as _m,bi as $l}from"./prHJOEnU.js";import{s as zm}from"./D9DtZ5bO.js";import{e as $m}from"./D2dQD04-.js";import{b as Bm,V as Bl,c as Hm,p as Fm,m as Vm,s as Wm}from"./Bx5mj_-o.js";import"./BguHhtk8.js";import{g as Mr,i as jm}from"./DEaLADF0.js";import{L as Km,S as Um,T as Gu}from"./Bm7IJJUE.js";import{n as qm,l as us}from"./Cg6uFDit.js";import{h as Jm}from"./CddeEUaW.js";import{bl as Gm}from"./DIz708WA.js";import{g as Xm}from"./Da6oWcTC.js";import{c as Xu,l as ue}from"./ChTqQfQN.js";import{n as Hl,l as Ym,c as Qm}from"./CoC9Ux29.js";import{$ as Yu,a0 as Zm,p as ta,aN as eg,am as tg,a1 as ng,e5 as rg,a9 as ig}from"./DVXtNvCM.js";import{i as fn,M as sg,D as og,s as Ao,a as ag,p as hr}from"./DTNUR8M2.js";import{A as lg,b as cg}from"./CTrJXNY9.js";import{P as ug}from"./Bg5Fp4BA.js";import{a as Qu}from"./DOdlo-4T.js";import{g as Fl}from"./B4XVQGzR.js";import{G as dg}from"./CqJQ3ikU.js";import{q as fg}from"./bMVl-_uo.js";import{b as hg,P as pg}from"./DOgidnWF.js";var mg=zu('<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" fill="currentColor"><path d="M12 0C5.37 0 0 5.37 0 12c0 5.31 3.435 9.795 8.205 11.385.6.105.825-.255.825-.57 0-.285-.015-1.23-.015-2.235-3.015.555-3.795-.735-4.035-1.41-.135-.345-.72-1.41-1.23-1.695-.42-.225-1.02-.78-.015-.795.945-.015 1.62.87 1.845 1.23 1.08 1.815 2.805 1.305 3.495.99.105-.78.42-1.305.765-1.605-2.67-.3-5.46-1.335-5.46-5.925 0-1.305.465-2.385 1.23-3.225-.12-.3-.54-1.53.12-3.18 0 0 1.005-.315 3.3 1.23.96-.27 1.98-.405 3-.405s2.04.135 3 .405c2.295-1.56 3.3-1.23 3.3-1.23.66 1.65.24 2.88.12 3.18.765.84 1.23 1.905 1.23 3.225 0 4.605-2.805 5.625-5.475 5.925.435.375.81 1.095.81 2.22 0 1.605-.015 2.895-.015 3.3 0 .315.225.69.825.57A12.02 12.02 0 0024 12c0-6.63-5.37-12-12-12z"></path></svg>');function Zu(n,e){if(new.target)return Wt({component:Zu,...n});Ut(e,!0);let t=L(e,"size",7,16),r=L(e,"class",7,"");var i={get size(){return t()},set size(o=16){t(o),P()},get class(){return r()},set class(o=""){r(o),P()},$set:jt,$on:(o,a)=>Kt(e,o,a)},s=mg();return ne(()=>{wt(s,"width",t()),wt(s,"height",t()),bn(s,0,ea(r()))}),K(n,s),qt(i)}var Vl=Object.defineProperty,gg=(n,e)=>{let t={};for(var r in n)Vl(t,r,{get:n[r],enumerable:!0});return Vl(t,Symbol.toStringTag,{value:"Module"}),t};function mt(n){this.content=n}mt.prototype={constructor:mt,find:function(n){for(var e=0;e<this.content.length;e+=2)if(this.content[e]===n)return e;return-1},get:function(n){var e=this.find(n);return e==-1?void 0:this.content[e+1]},update:function(n,e,t){var r=t&&t!=n?this.remove(t):this,i=r.find(n),s=r.content.slice();return i==-1?s.push(t||n,e):(s[i+1]=e,t&&(s[i]=t)),new mt(s)},remove:function(n){var e=this.find(n);if(e==-1)return this;var t=this.content.slice();return t.splice(e,2),new mt(t)},addToStart:function(n,e){return new mt([n,e].concat(this.remove(n).content))},addToEnd:function(n,e){var t=this.remove(n).content.slice();return t.push(n,e),new mt(t)},addBefore:function(n,e,t){var r=this.remove(e),i=r.content.slice(),s=r.find(n);return i.splice(s==-1?i.length:s,0,e,t),new mt(i)},forEach:function(n){for(var e=0;e<this.content.length;e+=2)n(this.content[e],this.content[e+1])},prepend:function(n){return n=mt.from(n),n.size?new mt(n.content.concat(this.subtract(n).content)):this},append:function(n){return n=mt.from(n),n.size?new mt(this.subtract(n).content.concat(n.content)):this},subtract:function(n){var e=this;n=mt.from(n);for(var t=0;t<n.content.length;t+=2)e=e.remove(n.content[t]);return e},toObject:function(){var n={};return this.forEach(function(e,t){n[e]=t}),n},get size(){return this.content.length>>1}};mt.from=function(n){if(n instanceof mt)return n;var e=[];if(n)for(var t in n)e.push(t,n[t]);return new mt(e)};function ed(n,e,t){for(let r=0;;r++){if(r==n.childCount||r==e.childCount)return n.childCount==e.childCount?null:t;let i=n.child(r),s=e.child(r);if(i==s){t+=i.nodeSize;continue}if(!i.sameMarkup(s))return t;if(i.isText&&i.text!=s.text){let o=i.text,a=s.text,l=0;for(;o[l]==a[l];l++)t++;return l&&l<o.length&&l<a.length&&rd(o.charCodeAt(l-1))&&nd(o.charCodeAt(l))&&t--,t}if(i.content.size||s.content.size){let o=ed(i.content,s.content,t+1);if(o!=null)return o}t+=i.nodeSize}}function td(n,e,t,r){for(let i=n.childCount,s=e.childCount;;){if(i==0||s==0)return i==s?null:{a:t,b:r};let o=n.child(--i),a=e.child(--s),l=o.nodeSize;if(o==a){t-=l,r-=l;continue}if(!o.sameMarkup(a))return{a:t,b:r};if(o.isText&&o.text!=a.text){let c=o.text,u=a.text,d=c.length,f=u.length;for(;d>0&&f>0&&c[d-1]==u[f-1];)d--,f--,t--,r--;return d&&f&&d<c.length&&rd(c.charCodeAt(d-1))&&nd(c.charCodeAt(d))&&(t++,r++),{a:t,b:r}}if(o.content.size||a.content.size){let c=td(o.content,a.content,t-1,r-1);if(c)return c}t-=l,r-=l}}function nd(n){return n>=56320&&n<57344}function rd(n){return n>=55296&&n<56320}class M{constructor(e,t){if(this.content=e,this.size=t||0,t==null)for(let r=0;r<e.length;r++)this.size+=e[r].nodeSize}nodesBetween(e,t,r,i=0,s){for(let o=0,a=0;a<t;o++){let l=this.content[o],c=a+l.nodeSize;if(c>e&&r(l,i+a,s||null,o)!==!1&&l.content.size){let u=a+1;l.nodesBetween(Math.max(0,e-u),Math.min(l.content.size,t-u),r,i+u)}a=c}}descendants(e){this.nodesBetween(0,this.size,e)}textBetween(e,t,r,i){let s="",o=!0;return this.nodesBetween(e,t,(a,l)=>{let c=a.isText?a.text.slice(Math.max(e,l)-l,t-l):a.isLeaf?i?typeof i=="function"?i(a):i:a.type.spec.leafText?a.type.spec.leafText(a):"":"";a.isBlock&&(a.isLeaf&&c||a.isTextblock)&&r&&(o?o=!1:s+=r),s+=c},0),s}append(e){if(!e.size)return this;if(!this.size)return e;let t=this.lastChild,r=e.firstChild,i=this.content.slice(),s=0;for(t.isText&&t.sameMarkup(r)&&(i[i.length-1]=t.withText(t.text+r.text),s=1);s<e.content.length;s++)i.push(e.content[s]);return new M(i,this.size+e.size)}cut(e,t=this.size){if(e==0&&t==this.size)return this;let r=[],i=0;if(t>e)for(let s=0,o=0;o<t;s++){let a=this.content[s],l=o+a.nodeSize;l>e&&((o<e||l>t)&&(a.isText?a=a.cut(Math.max(0,e-o),Math.min(a.text.length,t-o)):a=a.cut(Math.max(0,e-o-1),Math.min(a.content.size,t-o-1))),r.push(a),i+=a.nodeSize),o=l}return new M(r,i)}cutByIndex(e,t){return e==t?M.empty:e==0&&t==this.content.length?this:new M(this.content.slice(e,t))}replaceChild(e,t){let r=this.content[e];if(r==t)return this;let i=this.content.slice(),s=this.size+t.nodeSize-r.nodeSize;return i[e]=t,new M(i,s)}addToStart(e){return new M([e].concat(this.content),this.size+e.nodeSize)}addToEnd(e){return new M(this.content.concat(e),this.size+e.nodeSize)}eq(e){if(this.content.length!=e.content.length)return!1;for(let t=0;t<this.content.length;t++)if(!this.content[t].eq(e.content[t]))return!1;return!0}get firstChild(){return this.content.length?this.content[0]:null}get lastChild(){return this.content.length?this.content[this.content.length-1]:null}get childCount(){return this.content.length}child(e){let t=this.content[e];if(!t)throw new RangeError("Index "+e+" out of range for "+this);return t}maybeChild(e){return this.content[e]||null}forEach(e){for(let t=0,r=0;t<this.content.length;t++){let i=this.content[t];e(i,r,t),r+=i.nodeSize}}findDiffStart(e,t=0){return ed(this,e,t)}findDiffEnd(e,t=this.size,r=e.size){return td(this,e,t,r)}findIndex(e){if(e==0)return $i(0,e);if(e==this.size)return $i(this.content.length,e);if(e>this.size||e<0)throw new RangeError(`Position ${e} outside of fragment (${this})`);for(let t=0,r=0;;t++){let i=this.child(t),s=r+i.nodeSize;if(s>=e)return s==e?$i(t+1,s):$i(t,r);r=s}}toString(){return"<"+this.toStringInner()+">"}toStringInner(){return this.content.join(", ")}toJSON(){return this.content.length?this.content.map(e=>e.toJSON()):null}static fromJSON(e,t){if(!t)return M.empty;if(!Array.isArray(t))throw new RangeError("Invalid input for Fragment.fromJSON");return M.fromArray(t.map(e.nodeFromJSON))}static fromArray(e){if(!e.length)return M.empty;let t,r=0;for(let i=0;i<e.length;i++){let s=e[i];r+=s.nodeSize,i&&s.isText&&e[i-1].sameMarkup(s)?(t||(t=e.slice(0,i)),t[t.length-1]=s.withText(t[t.length-1].text+s.text)):t&&t.push(s)}return new M(t||e,r)}static from(e){if(!e)return M.empty;if(e instanceof M)return e;if(Array.isArray(e))return this.fromArray(e);if(e.attrs)return new M([e],e.nodeSize);throw new RangeError("Can not convert "+e+" to a Fragment"+(e.nodesBetween?" (looks like multiple versions of prosemirror-model were loaded)":""))}}M.empty=new M([],0);const No={index:0,offset:0};function $i(n,e){return No.index=n,No.offset=e,No}function ds(n,e){if(n===e)return!0;if(!(n&&typeof n=="object")||!(e&&typeof e=="object"))return!1;let t=Array.isArray(n);if(Array.isArray(e)!=t)return!1;if(t){if(n.length!=e.length)return!1;for(let r=0;r<n.length;r++)if(!ds(n[r],e[r]))return!1}else{for(let r in n)if(!(r in e)||!ds(n[r],e[r]))return!1;for(let r in e)if(!(r in n))return!1}return!0}let _e=class na{constructor(e,t){this.type=e,this.attrs=t}addToSet(e){let t,r=!1;for(let i=0;i<e.length;i++){let s=e[i];if(this.eq(s))return e;if(this.type.excludes(s.type))t||(t=e.slice(0,i));else{if(s.type.excludes(this.type))return e;!r&&s.type.rank>this.type.rank&&(t||(t=e.slice(0,i)),t.push(this),r=!0),t&&t.push(s)}}return t||(t=e.slice()),r||t.push(this),t}removeFromSet(e){for(let t=0;t<e.length;t++)if(this.eq(e[t]))return e.slice(0,t).concat(e.slice(t+1));return e}isInSet(e){for(let t=0;t<e.length;t++)if(this.eq(e[t]))return!0;return!1}eq(e){return this==e||this.type==e.type&&ds(this.attrs,e.attrs)}toJSON(){let e={type:this.type.name};for(let t in this.attrs){e.attrs=this.attrs;break}return e}static fromJSON(e,t){if(!t)throw new RangeError("Invalid input for Mark.fromJSON");let r=e.marks[t.type];if(!r)throw new RangeError(`There is no mark type ${t.type} in this schema`);return r.create(t.attrs)}static sameSet(e,t){if(e==t)return!0;if(e.length!=t.length)return!1;for(let r=0;r<e.length;r++)if(!e[r].eq(t[r]))return!1;return!0}static setFrom(e){if(!e||Array.isArray(e)&&e.length==0)return na.none;if(e instanceof na)return[e];let t=e.slice();return t.sort((r,i)=>r.type.rank-i.type.rank),t}};_e.none=[];class mi extends Error{}class H{constructor(e,t,r){this.content=e,this.openStart=t,this.openEnd=r}get size(){return this.content.size-this.openStart-this.openEnd}insertAt(e,t){let r=sd(this.content,e+this.openStart,t,this.openStart+1,this.openEnd+1);return r&&new H(r,this.openStart,this.openEnd)}removeBetween(e,t){return new H(id(this.content,e+this.openStart,t+this.openStart),this.openStart,this.openEnd)}eq(e){return this.content.eq(e.content)&&this.openStart==e.openStart&&this.openEnd==e.openEnd}toString(){return this.content+"("+this.openStart+","+this.openEnd+")"}toJSON(){if(!this.content.size)return null;let e={content:this.content.toJSON()};return this.openStart>0&&(e.openStart=this.openStart),this.openEnd>0&&(e.openEnd=this.openEnd),e}static fromJSON(e,t){if(!t)return H.empty;let r=t.openStart||0,i=t.openEnd||0;if(typeof r!="number"||typeof i!="number")throw new RangeError("Invalid input for Slice.fromJSON");return new H(M.fromJSON(e,t.content),r,i)}static maxOpen(e,t=!0){let r=0,i=0;for(let s=e.firstChild;s&&!s.isLeaf&&(t||!s.type.spec.isolating);s=s.firstChild)r++;for(let s=e.lastChild;s&&!s.isLeaf&&(t||!s.type.spec.isolating);s=s.lastChild)i++;return new H(e,r,i)}}H.empty=new H(M.empty,0,0);function id(n,e,t){let{index:r,offset:i}=n.findIndex(e),s=n.maybeChild(r),{index:o,offset:a}=n.findIndex(t);if(i==e||s.isText){if(a!=t&&!n.child(o).isText)throw new RangeError("Removing non-flat range");return n.cut(0,e).append(n.cut(t))}if(r!=o)throw new RangeError("Removing non-flat range");return n.replaceChild(r,s.copy(id(s.content,e-i-1,t-i-1)))}function sd(n,e,t,r,i,s){let{index:o,offset:a}=n.findIndex(e),l=n.maybeChild(o);if(a==e||l.isText)return s&&r<=0&&i<=0&&!s.canReplace(o,o,t)?null:n.cut(0,e).append(t).append(n.cut(e));let c=sd(l.content,e-a-1,t,o==0?r-1:0,o==n.childCount-1?i-1:0,l);return c&&n.replaceChild(o,l.copy(c))}function yg(n,e,t){if(t.openStart>n.depth)throw new mi("Inserted content deeper than insertion position");if(n.depth-t.openStart!=e.depth-t.openEnd)throw new mi("Inconsistent open depths");return od(n,e,t,0)}function od(n,e,t,r){let i=n.index(r),s=n.node(r);if(i==e.index(r)&&r<n.depth-t.openStart){let o=od(n,e,t,r+1);return s.copy(s.content.replaceChild(i,o))}else if(t.content.size)if(!t.openStart&&!t.openEnd&&n.depth==r&&e.depth==r){let o=n.parent,a=o.content;return tr(o,a.cut(0,n.parentOffset).append(t.content).append(a.cut(e.parentOffset)))}else{let{start:o,end:a}=bg(t,n);return tr(s,ld(n,o,a,e,r))}else return tr(s,fs(n,e,r))}function ad(n,e){if(!e.type.compatibleContent(n.type))throw new mi("Cannot join "+e.type.name+" onto "+n.type.name)}function ra(n,e,t){let r=n.node(t);return ad(r,e.node(t)),r}function er(n,e){let t=e.length-1;t>=0&&n.isText&&n.sameMarkup(e[t])?e[t]=n.withText(e[t].text+n.text):e.push(n)}function ei(n,e,t,r){let i=(e||n).node(t),s=0,o=e?e.index(t):i.childCount;n&&(s=n.index(t),n.depth>t?s++:n.textOffset&&(er(n.nodeAfter,r),s++));for(let a=s;a<o;a++)er(i.child(a),r);e&&e.depth==t&&e.textOffset&&er(e.nodeBefore,r)}function tr(n,e){if(!n.type.validContent(e))throw new mi("Invalid content for node "+n.type.name);return n.copy(e)}function ld(n,e,t,r,i){let s=n.depth>i&&ra(n,e,i+1),o=r.depth>i&&ra(t,r,i+1),a=[];return ei(null,n,i,a),s&&o&&e.index(i)==t.index(i)?(ad(s,o),er(tr(s,ld(n,e,t,r,i+1)),a)):(s&&er(tr(s,fs(n,e,i+1)),a),ei(e,t,i,a),o&&er(tr(o,fs(t,r,i+1)),a)),ei(r,null,i,a),new M(a)}function fs(n,e,t){let r=[];if(ei(null,n,t,r),n.depth>t){let i=ra(n,e,t+1);er(tr(i,fs(n,e,t+1)),r)}return ei(e,null,t,r),new M(r)}function bg(n,e){let t=e.depth-n.openStart,i=e.node(t).copy(n.content);for(let s=t-1;s>=0;s--)i=e.node(s).copy(M.from(i));return{start:i.resolveNoCache(n.openStart+t),end:i.resolveNoCache(i.content.size-n.openEnd-t)}}class gi{constructor(e,t,r){this.pos=e,this.path=t,this.parentOffset=r,this.depth=t.length/3-1}resolveDepth(e){return e==null?this.depth:e<0?this.depth+e:e}get parent(){return this.node(this.depth)}get doc(){return this.node(0)}node(e){return this.path[this.resolveDepth(e)*3]}index(e){return this.path[this.resolveDepth(e)*3+1]}indexAfter(e){return e=this.resolveDepth(e),this.index(e)+(e==this.depth&&!this.textOffset?0:1)}start(e){return e=this.resolveDepth(e),e==0?0:this.path[e*3-1]+1}end(e){return e=this.resolveDepth(e),this.start(e)+this.node(e).content.size}before(e){if(e=this.resolveDepth(e),!e)throw new RangeError("There is no position before the top-level node");return e==this.depth+1?this.pos:this.path[e*3-1]}after(e){if(e=this.resolveDepth(e),!e)throw new RangeError("There is no position after the top-level node");return e==this.depth+1?this.pos:this.path[e*3-1]+this.path[e*3].nodeSize}get textOffset(){return this.pos-this.path[this.path.length-1]}get nodeAfter(){let e=this.parent,t=this.index(this.depth);if(t==e.childCount)return null;let r=this.pos-this.path[this.path.length-1],i=e.child(t);return r?e.child(t).cut(r):i}get nodeBefore(){let e=this.index(this.depth),t=this.pos-this.path[this.path.length-1];return t?this.parent.child(e).cut(0,t):e==0?null:this.parent.child(e-1)}posAtIndex(e,t){t=this.resolveDepth(t);let r=this.path[t*3],i=t==0?0:this.path[t*3-1]+1;for(let s=0;s<e;s++)i+=r.child(s).nodeSize;return i}marks(){let e=this.parent,t=this.index();if(e.content.size==0)return _e.none;if(this.textOffset)return e.child(t).marks;let r=e.maybeChild(t-1),i=e.maybeChild(t);if(!r){let a=r;r=i,i=a}let s=r.marks;for(var o=0;o<s.length;o++)s[o].type.spec.inclusive===!1&&(!i||!s[o].isInSet(i.marks))&&(s=s[o--].removeFromSet(s));return s}marksAcross(e){let t=this.parent.maybeChild(this.index());if(!t||!t.isInline)return null;let r=t.marks,i=e.parent.maybeChild(e.index());for(var s=0;s<r.length;s++)r[s].type.spec.inclusive===!1&&(!i||!r[s].isInSet(i.marks))&&(r=r[s--].removeFromSet(r));return r}sharedDepth(e){for(let t=this.depth;t>0;t--)if(this.start(t)<=e&&this.end(t)>=e)return t;return 0}blockRange(e=this,t){if(e.pos<this.pos)return e.blockRange(this);for(let r=this.depth-(this.parent.inlineContent||this.pos==e.pos?1:0);r>=0;r--)if(e.pos<=this.end(r)&&(!t||t(this.node(r))))return new hs(this,e,r);return null}sameParent(e){return this.pos-this.parentOffset==e.pos-e.parentOffset}max(e){return e.pos>this.pos?e:this}min(e){return e.pos<this.pos?e:this}toString(){let e="";for(let t=1;t<=this.depth;t++)e+=(e?"/":"")+this.node(t).type.name+"_"+this.index(t-1);return e+":"+this.parentOffset}static resolve(e,t){if(!(t>=0&&t<=e.content.size))throw new RangeError("Position "+t+" out of range");let r=[],i=0,s=t;for(let o=e;;){let{index:a,offset:l}=o.content.findIndex(s),c=s-l;if(r.push(o,a,i+l),!c||(o=o.child(a),o.isText))break;s=c-1,i+=l+1}return new gi(t,r,s)}static resolveCached(e,t){let r=Wl.get(e);if(r)for(let s=0;s<r.elts.length;s++){let o=r.elts[s];if(o.pos==t)return o}else Wl.set(e,r=new vg);let i=r.elts[r.i]=gi.resolve(e,t);return r.i=(r.i+1)%kg,i}}class vg{constructor(){this.elts=[],this.i=0}}const kg=12,Wl=new WeakMap;class hs{constructor(e,t,r){this.$from=e,this.$to=t,this.depth=r}get start(){return this.$from.before(this.depth+1)}get end(){return this.$to.after(this.depth+1)}get parent(){return this.$from.node(this.depth)}get startIndex(){return this.$from.index(this.depth)}get endIndex(){return this.$to.indexAfter(this.depth)}}const xg=Object.create(null);let Rn=class ia{constructor(e,t,r,i=_e.none){this.type=e,this.attrs=t,this.marks=i,this.content=r||M.empty}get children(){return this.content.content}get nodeSize(){return this.isLeaf?1:2+this.content.size}get childCount(){return this.content.childCount}child(e){return this.content.child(e)}maybeChild(e){return this.content.maybeChild(e)}forEach(e){this.content.forEach(e)}nodesBetween(e,t,r,i=0){this.content.nodesBetween(e,t,r,i,this)}descendants(e){this.nodesBetween(0,this.content.size,e)}get textContent(){return this.isLeaf&&this.type.spec.leafText?this.type.spec.leafText(this):this.textBetween(0,this.content.size,"")}textBetween(e,t,r,i){return this.content.textBetween(e,t,r,i)}get firstChild(){return this.content.firstChild}get lastChild(){return this.content.lastChild}eq(e){return this==e||this.sameMarkup(e)&&this.content.eq(e.content)}sameMarkup(e){return this.hasMarkup(e.type,e.attrs,e.marks)}hasMarkup(e,t,r){return this.type==e&&ds(this.attrs,t||e.defaultAttrs||xg)&&_e.sameSet(this.marks,r||_e.none)}copy(e=null){return e==this.content?this:new ia(this.type,this.attrs,e,this.marks)}mark(e){return e==this.marks?this:new ia(this.type,this.attrs,this.content,e)}cut(e,t=this.content.size){return e==0&&t==this.content.size?this:this.copy(this.content.cut(e,t))}slice(e,t=this.content.size,r=!1){if(e==t)return H.empty;let i=this.resolve(e),s=this.resolve(t),o=r?0:i.sharedDepth(t),a=i.start(o),c=i.node(o).content.cut(i.pos-a,s.pos-a);return new H(c,i.depth-o,s.depth-o)}replace(e,t,r){return yg(this.resolve(e),this.resolve(t),r)}nodeAt(e){for(let t=this;;){let{index:r,offset:i}=t.content.findIndex(e);if(t=t.maybeChild(r),!t)return null;if(i==e||t.isText)return t;e-=i+1}}childAfter(e){let{index:t,offset:r}=this.content.findIndex(e);return{node:this.content.maybeChild(t),index:t,offset:r}}childBefore(e){if(e==0)return{node:null,index:0,offset:0};let{index:t,offset:r}=this.content.findIndex(e);if(r<e)return{node:this.content.child(t),index:t,offset:r};let i=this.content.child(t-1);return{node:i,index:t-1,offset:r-i.nodeSize}}resolve(e){return gi.resolveCached(this,e)}resolveNoCache(e){return gi.resolve(this,e)}rangeHasMark(e,t,r){let i=!1;return t>e&&this.nodesBetween(e,t,s=>(r.isInSet(s.marks)&&(i=!0),!i)),i}get isBlock(){return this.type.isBlock}get isTextblock(){return this.type.isTextblock}get inlineContent(){return this.type.inlineContent}get isInline(){return this.type.isInline}get isText(){return this.type.isText}get isLeaf(){return this.type.isLeaf}get isAtom(){return this.type.isAtom}toString(){if(this.type.spec.toDebugString)return this.type.spec.toDebugString(this);let e=this.type.name;return this.content.size&&(e+="("+this.content.toStringInner()+")"),cd(this.marks,e)}contentMatchAt(e){let t=this.type.contentMatch.matchFragment(this.content,0,e);if(!t)throw new Error("Called contentMatchAt on a node with invalid content");return t}canReplace(e,t,r=M.empty,i=0,s=r.childCount){let o=this.contentMatchAt(e).matchFragment(r,i,s),a=o&&o.matchFragment(this.content,t);if(!a||!a.validEnd)return!1;for(let l=i;l<s;l++)if(!this.type.allowsMarks(r.child(l).marks))return!1;return!0}canReplaceWith(e,t,r,i){if(i&&!this.type.allowsMarks(i))return!1;let s=this.contentMatchAt(e).matchType(r),o=s&&s.matchFragment(this.content,t);return o?o.validEnd:!1}canAppend(e){return e.content.size?this.canReplace(this.childCount,this.childCount,e.content):this.type.compatibleContent(e.type)}check(){this.type.checkContent(this.content),jl(this.type.attrs,this.attrs,"node",this.type.name);let e=_e.none;for(let t=0;t<this.marks.length;t++){let r=this.marks[t];jl(r.type.attrs,r.attrs,"mark",r.type.name),e=r.addToSet(e)}if(!_e.sameSet(e,this.marks))throw new RangeError(`Invalid collection of marks for node ${this.type.name}: ${this.marks.map(t=>t.type.name)}`);this.content.forEach(t=>t.check())}toJSON(){let e={type:this.type.name};for(let t in this.attrs){e.attrs=this.attrs;break}return this.content.size&&(e.content=this.content.toJSON()),this.marks.length&&(e.marks=this.marks.map(t=>t.toJSON())),e}static fromJSON(e,t){if(!t)throw new RangeError("Invalid input for Node.fromJSON");let r;if(t.marks){if(!Array.isArray(t.marks))throw new RangeError("Invalid mark data for Node.fromJSON");r=t.marks.map(e.markFromJSON)}if(t.type=="text"){if(typeof t.text!="string")throw new RangeError("Invalid text node in JSON");return e.text(t.text,r)}let i=M.fromJSON(e,t.content);return e.nodeType(t.type).create(t.attrs,i,r)}};Rn.prototype.text=void 0;class ps extends Rn{constructor(e,t,r,i){if(super(e,t,null,i),!r)throw new RangeError("Empty text nodes are not allowed");this.text=r}toString(){return this.type.spec.toDebugString?this.type.spec.toDebugString(this):cd(this.marks,JSON.stringify(this.text))}get textContent(){return this.text}textBetween(e,t){return this.text.slice(e,t)}get nodeSize(){return this.text.length}mark(e){return e==this.marks?this:new ps(this.type,this.attrs,this.text,e)}withText(e){return e==this.text?this:new ps(this.type,this.attrs,e,this.marks)}cut(e=0,t=this.text.length){return e==0&&t==this.text.length?this:this.withText(this.text.slice(e,t))}eq(e){return this.sameMarkup(e)&&this.text==e.text}toJSON(){let e=super.toJSON();return e.text=this.text,e}}function cd(n,e){for(let t=n.length-1;t>=0;t--)e=n[t].type.name+"("+e+")";return e}function jl(n,e,t,r){for(let i in e)if(!(i in n))throw new RangeError(`Unsupported attribute ${i} for ${t} of type ${r}`);for(let i in n)n[i].validate&&n[i].validate(e[i])}class ir{constructor(e){this.validEnd=e,this.next=[],this.wrapCache=[]}static parse(e,t){let r=new wg(e,t);if(r.next==null)return ir.empty;let i=ud(r);r.next&&r.err("Unexpected trailing text");let s=Ng(Ag(i));return Og(s,r),s}matchType(e){for(let t=0;t<this.next.length;t++)if(this.next[t].type==e)return this.next[t].next;return null}matchFragment(e,t=0,r=e.childCount){let i=this;for(let s=t;i&&s<r;s++)i=i.matchType(e.child(s).type);return i}get inlineContent(){return this.next.length!=0&&this.next[0].type.isInline}get defaultType(){for(let e=0;e<this.next.length;e++){let{type:t}=this.next[e];if(!(t.isText||t.hasRequiredAttrs()))return t}return null}compatible(e){for(let t=0;t<this.next.length;t++)for(let r=0;r<e.next.length;r++)if(this.next[t].type==e.next[r].type)return!0;return!1}fillBefore(e,t=!1,r=0){let i=[this];function s(o,a){let l=o.matchFragment(e,r);if(l&&(!t||l.validEnd))return M.from(a.map(c=>c.createAndFill()));for(let c=0;c<o.next.length;c++){let{type:u,next:d}=o.next[c];if(!(u.isText||u.hasRequiredAttrs())&&i.indexOf(d)==-1){i.push(d);let f=s(d,a.concat(u));if(f)return f}}return null}return s(this,[])}findWrapping(e){for(let r=0;r<this.wrapCache.length;r+=2)if(this.wrapCache[r]==e)return this.wrapCache[r+1];let t=this.computeWrapping(e);return this.wrapCache.push(e,t),t}computeWrapping(e){let t=Object.create(null),r=[{match:this,type:null,via:null}];for(;r.length;){let i=r.shift(),s=i.match;if(s.matchType(e)){let o=[];for(let a=i;a.type;a=a.via)o.push(a.type);return o.reverse()}for(let o=0;o<s.next.length;o++){let{type:a,next:l}=s.next[o];!a.isLeaf&&!a.hasRequiredAttrs()&&!(a.name in t)&&(!i.type||l.validEnd)&&(r.push({match:a.contentMatch,type:a,via:i}),t[a.name]=!0)}}return null}get edgeCount(){return this.next.length}edge(e){if(e>=this.next.length)throw new RangeError(`There's no ${e}th edge in this content match`);return this.next[e]}toString(){let e=[];function t(r){e.push(r);for(let i=0;i<r.next.length;i++)e.indexOf(r.next[i].next)==-1&&t(r.next[i].next)}return t(this),e.map((r,i)=>{let s=i+(r.validEnd?"*":" ")+" ";for(let o=0;o<r.next.length;o++)s+=(o?", ":"")+r.next[o].type.name+"->"+e.indexOf(r.next[o].next);return s}).join(`
1
+ const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["/app/immutable/chunks/CDqnAH9U.js","/app/immutable/chunks/51_h0jm2.js","/app/immutable/chunks/CJxGDkBm.js","/app/immutable/chunks/SX1khnGy.js","/app/immutable/chunks/CqJQ3ikU.js","/app/immutable/chunks/CIyUrgF0.js","/app/immutable/chunks/PXCFrn2V.js","/app/immutable/chunks/CpPNoOk-.js","/app/immutable/chunks/DxvSggY5.js","/app/immutable/assets/spinner.D_TRo5Hy.css","/app/immutable/chunks/Cdw_CIdg.js","/app/immutable/chunks/NtFyWdpR.js","/app/immutable/chunks/Bjy4ygfJ.js","/app/immutable/chunks/CF1Tu_8c.js","/app/immutable/chunks/BQDGTBxC.js","/app/immutable/chunks/uXuxG9cN.js","/app/immutable/assets/button.-yaUNjRS.css","/app/immutable/chunks/DGmOjLYi.js","/app/immutable/chunks/C9UsZ4re.js","/app/immutable/chunks/DqFWZ_g1.js","/app/immutable/chunks/JKboQXkL.js","/app/immutable/chunks/Zldsekdv.js","/app/immutable/chunks/PVXvIyE8.js","/app/immutable/chunks/ChTqQfQN.js","/app/immutable/chunks/BEklUrxK.js","/app/immutable/chunks/DxwfiAWm.js","/app/immutable/chunks/DJfJ5NWH.js","/app/immutable/chunks/DSQT151l.js","/app/immutable/chunks/BxwkoIbZ.js","/app/immutable/chunks/BoIfXiRv.js","/app/immutable/chunks/XJv96NUg.js","/app/immutable/assets/notify.B1j5oT2y.css","/app/immutable/chunks/XJqoy2ap.js","/app/immutable/chunks/DypB-Dwi.js","/app/immutable/chunks/LKW_Bid7.js","/app/immutable/chunks/BuveYyQe.js","/app/immutable/chunks/oOuL5l8A.js","/app/immutable/chunks/BswUVSRu.js","/app/immutable/chunks/BdWqymET.js","/app/immutable/chunks/CxVedbHg.js","/app/immutable/chunks/C3CJZFT3.js","/app/immutable/chunks/B0Z-1lwJ.js","/app/immutable/chunks/Bi5_2qbB.js","/app/immutable/chunks/DKwAaLwd.js","/app/immutable/chunks/CxmJEenA.js"])))=>i.map(i=>d[i]);
2
+ var Rp=Object.defineProperty;var Rl=n=>{throw TypeError(n)};var Lp=(n,e,t)=>e in n?Rp(n,e,{enumerable:!0,configurable:!0,writable:!0,value:t}):n[e]=t;var ut=(n,e,t)=>Lp(n,typeof e!="symbol"?e+"":e,t),Pp=(n,e,t)=>e.has(n)||Rl("Cannot "+t);var jn=(n,e,t)=>(Pp(n,e,"read from private field"),t?t.call(n):e.get(n)),_i=(n,e,t)=>e.has(n)?Rl("Cannot add the same private member more than once"):e instanceof WeakSet?e.add(n):e.set(n,t);import{t as Wt,bo as L,bw as jt,b as Kt,bp as _p,bm as re,bq as zp,bs as $p,_ as zi}from"./51_h0jm2.js";import{bs as Ut,b_ as ne,W as K,bn as qt,aA as P,aC as zu,br as Zo,bb as Zr,c3 as Mn,aG as Bp,bk as $u,a7 as Er,ay as Dt,c0 as Bu,a5 as he,aD as m,bA as ae,bS as ie,aw as Hp,bH as fe,c9 as B,bV as Ue,aB as ee,ai as Zs,ca as kt,aj as Jn,bl as xe,bO as de,bo as _a,bj as Hu,be as Fu,b$ as Vu,bf as Fp,c5 as Kn}from"./CJxGDkBm.js";import{c as Eo}from"./DGmOjLYi.js";import{s as wt,f as bn,c as ea,b as Vp,g as pi,e as Wp}from"./CpPNoOk-.js";import{b as Or}from"./NtFyWdpR.js";import{i as jp}from"./BgDYQZ_0.js";import{d1 as Kp,aF as Up,aT as Ll}from"./uWDJKH9B.js";import{a as qp}from"./CC7to1B5.js";import{aT as Jp,aB as Gp,ao as Xp,aw as Yp,ab as Qp,f as sn,ae as Wu,a1 as Zp}from"./Cdw_CIdg.js";import{i as ve}from"./PXCFrn2V.js";import{F as rn,bb as em,bv as za,bh as ju,v as tm,bE as nm,d3 as rm,aI as Pl,bg as Cr,bn as Tr,cZ as Ku,cW as im,cn as Uu,cK as qu,ak as sm,av as Ju,ay as _l,ap as om,aj as am,as as lm,cX as cm,aZ as um,aN as To,co as dm,bx as fm,cb as hm,cy as zl,Y as pm,cH as mm,at as gm,bU as ym,aq as bm,c7 as vm,bN as km,c_ as xm,al as wm,bl as Sm,bF as Cm,a$ as Mm,d2 as Em,am as Tm,bS as Am,aT as Nm,b0 as Om,c1 as Dm,bd as Im,cx as Rm,cD as Lm,bR as Pm,bo as _m,bi as $l}from"./DSQT151l.js";import{s as zm}from"./DxvSggY5.js";import{e as $m}from"./Dukt1CUc.js";import{b as Bm,V as Bl,c as Hm,p as Fm,m as Vm,s as Wm}from"./CnM1-KSC.js";import"./CF1Tu_8c.js";import{g as Mr,i as jm}from"./Bjy4ygfJ.js";import{L as Km,S as Um,T as Gu}from"./nRmTo2Eh.js";import{n as qm,l as us}from"./DqFWZ_g1.js";import{h as Jm}from"./CC08YY4X.js";import{bl as Gm}from"./Zldsekdv.js";import{g as Xm}from"./D0Z6csIX.js";import{c as Xu,l as ue}from"./ChTqQfQN.js";import{n as Hl,l as Ym,c as Qm}from"./BxwkoIbZ.js";import{$ as Yu,a0 as Zm,p as ta,aN as eg,am as tg,a1 as ng,e5 as rg,a9 as ig}from"./XJqoy2ap.js";import{i as fn,M as sg,D as og,s as Ao,a as ag,p as hr}from"./dx9b_0TP.js";import{A as lg,b as cg}from"./D1cY0pVs.js";import{P as ug}from"./DUctnn_k.js";import{a as Qu}from"./DmhHEMPi.js";import{g as Fl}from"./BE2y8JEQ.js";import{G as dg}from"./CqJQ3ikU.js";import{q as fg}from"./M18r7swD.js";import{b as hg,P as pg}from"./CQw_RyF_.js";var mg=zu('<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" fill="currentColor"><path d="M12 0C5.37 0 0 5.37 0 12c0 5.31 3.435 9.795 8.205 11.385.6.105.825-.255.825-.57 0-.285-.015-1.23-.015-2.235-3.015.555-3.795-.735-4.035-1.41-.135-.345-.72-1.41-1.23-1.695-.42-.225-1.02-.78-.015-.795.945-.015 1.62.87 1.845 1.23 1.08 1.815 2.805 1.305 3.495.99.105-.78.42-1.305.765-1.605-2.67-.3-5.46-1.335-5.46-5.925 0-1.305.465-2.385 1.23-3.225-.12-.3-.54-1.53.12-3.18 0 0 1.005-.315 3.3 1.23.96-.27 1.98-.405 3-.405s2.04.135 3 .405c2.295-1.56 3.3-1.23 3.3-1.23.66 1.65.24 2.88.12 3.18.765.84 1.23 1.905 1.23 3.225 0 4.605-2.805 5.625-5.475 5.925.435.375.81 1.095.81 2.22 0 1.605-.015 2.895-.015 3.3 0 .315.225.69.825.57A12.02 12.02 0 0024 12c0-6.63-5.37-12-12-12z"></path></svg>');function Zu(n,e){if(new.target)return Wt({component:Zu,...n});Ut(e,!0);let t=L(e,"size",7,16),r=L(e,"class",7,"");var i={get size(){return t()},set size(o=16){t(o),P()},get class(){return r()},set class(o=""){r(o),P()},$set:jt,$on:(o,a)=>Kt(e,o,a)},s=mg();return ne(()=>{wt(s,"width",t()),wt(s,"height",t()),bn(s,0,ea(r()))}),K(n,s),qt(i)}var Vl=Object.defineProperty,gg=(n,e)=>{let t={};for(var r in n)Vl(t,r,{get:n[r],enumerable:!0});return Vl(t,Symbol.toStringTag,{value:"Module"}),t};function mt(n){this.content=n}mt.prototype={constructor:mt,find:function(n){for(var e=0;e<this.content.length;e+=2)if(this.content[e]===n)return e;return-1},get:function(n){var e=this.find(n);return e==-1?void 0:this.content[e+1]},update:function(n,e,t){var r=t&&t!=n?this.remove(t):this,i=r.find(n),s=r.content.slice();return i==-1?s.push(t||n,e):(s[i+1]=e,t&&(s[i]=t)),new mt(s)},remove:function(n){var e=this.find(n);if(e==-1)return this;var t=this.content.slice();return t.splice(e,2),new mt(t)},addToStart:function(n,e){return new mt([n,e].concat(this.remove(n).content))},addToEnd:function(n,e){var t=this.remove(n).content.slice();return t.push(n,e),new mt(t)},addBefore:function(n,e,t){var r=this.remove(e),i=r.content.slice(),s=r.find(n);return i.splice(s==-1?i.length:s,0,e,t),new mt(i)},forEach:function(n){for(var e=0;e<this.content.length;e+=2)n(this.content[e],this.content[e+1])},prepend:function(n){return n=mt.from(n),n.size?new mt(n.content.concat(this.subtract(n).content)):this},append:function(n){return n=mt.from(n),n.size?new mt(this.subtract(n).content.concat(n.content)):this},subtract:function(n){var e=this;n=mt.from(n);for(var t=0;t<n.content.length;t+=2)e=e.remove(n.content[t]);return e},toObject:function(){var n={};return this.forEach(function(e,t){n[e]=t}),n},get size(){return this.content.length>>1}};mt.from=function(n){if(n instanceof mt)return n;var e=[];if(n)for(var t in n)e.push(t,n[t]);return new mt(e)};function ed(n,e,t){for(let r=0;;r++){if(r==n.childCount||r==e.childCount)return n.childCount==e.childCount?null:t;let i=n.child(r),s=e.child(r);if(i==s){t+=i.nodeSize;continue}if(!i.sameMarkup(s))return t;if(i.isText&&i.text!=s.text){let o=i.text,a=s.text,l=0;for(;o[l]==a[l];l++)t++;return l&&l<o.length&&l<a.length&&rd(o.charCodeAt(l-1))&&nd(o.charCodeAt(l))&&t--,t}if(i.content.size||s.content.size){let o=ed(i.content,s.content,t+1);if(o!=null)return o}t+=i.nodeSize}}function td(n,e,t,r){for(let i=n.childCount,s=e.childCount;;){if(i==0||s==0)return i==s?null:{a:t,b:r};let o=n.child(--i),a=e.child(--s),l=o.nodeSize;if(o==a){t-=l,r-=l;continue}if(!o.sameMarkup(a))return{a:t,b:r};if(o.isText&&o.text!=a.text){let c=o.text,u=a.text,d=c.length,f=u.length;for(;d>0&&f>0&&c[d-1]==u[f-1];)d--,f--,t--,r--;return d&&f&&d<c.length&&rd(c.charCodeAt(d-1))&&nd(c.charCodeAt(d))&&(t++,r++),{a:t,b:r}}if(o.content.size||a.content.size){let c=td(o.content,a.content,t-1,r-1);if(c)return c}t-=l,r-=l}}function nd(n){return n>=56320&&n<57344}function rd(n){return n>=55296&&n<56320}class M{constructor(e,t){if(this.content=e,this.size=t||0,t==null)for(let r=0;r<e.length;r++)this.size+=e[r].nodeSize}nodesBetween(e,t,r,i=0,s){for(let o=0,a=0;a<t;o++){let l=this.content[o],c=a+l.nodeSize;if(c>e&&r(l,i+a,s||null,o)!==!1&&l.content.size){let u=a+1;l.nodesBetween(Math.max(0,e-u),Math.min(l.content.size,t-u),r,i+u)}a=c}}descendants(e){this.nodesBetween(0,this.size,e)}textBetween(e,t,r,i){let s="",o=!0;return this.nodesBetween(e,t,(a,l)=>{let c=a.isText?a.text.slice(Math.max(e,l)-l,t-l):a.isLeaf?i?typeof i=="function"?i(a):i:a.type.spec.leafText?a.type.spec.leafText(a):"":"";a.isBlock&&(a.isLeaf&&c||a.isTextblock)&&r&&(o?o=!1:s+=r),s+=c},0),s}append(e){if(!e.size)return this;if(!this.size)return e;let t=this.lastChild,r=e.firstChild,i=this.content.slice(),s=0;for(t.isText&&t.sameMarkup(r)&&(i[i.length-1]=t.withText(t.text+r.text),s=1);s<e.content.length;s++)i.push(e.content[s]);return new M(i,this.size+e.size)}cut(e,t=this.size){if(e==0&&t==this.size)return this;let r=[],i=0;if(t>e)for(let s=0,o=0;o<t;s++){let a=this.content[s],l=o+a.nodeSize;l>e&&((o<e||l>t)&&(a.isText?a=a.cut(Math.max(0,e-o),Math.min(a.text.length,t-o)):a=a.cut(Math.max(0,e-o-1),Math.min(a.content.size,t-o-1))),r.push(a),i+=a.nodeSize),o=l}return new M(r,i)}cutByIndex(e,t){return e==t?M.empty:e==0&&t==this.content.length?this:new M(this.content.slice(e,t))}replaceChild(e,t){let r=this.content[e];if(r==t)return this;let i=this.content.slice(),s=this.size+t.nodeSize-r.nodeSize;return i[e]=t,new M(i,s)}addToStart(e){return new M([e].concat(this.content),this.size+e.nodeSize)}addToEnd(e){return new M(this.content.concat(e),this.size+e.nodeSize)}eq(e){if(this.content.length!=e.content.length)return!1;for(let t=0;t<this.content.length;t++)if(!this.content[t].eq(e.content[t]))return!1;return!0}get firstChild(){return this.content.length?this.content[0]:null}get lastChild(){return this.content.length?this.content[this.content.length-1]:null}get childCount(){return this.content.length}child(e){let t=this.content[e];if(!t)throw new RangeError("Index "+e+" out of range for "+this);return t}maybeChild(e){return this.content[e]||null}forEach(e){for(let t=0,r=0;t<this.content.length;t++){let i=this.content[t];e(i,r,t),r+=i.nodeSize}}findDiffStart(e,t=0){return ed(this,e,t)}findDiffEnd(e,t=this.size,r=e.size){return td(this,e,t,r)}findIndex(e){if(e==0)return $i(0,e);if(e==this.size)return $i(this.content.length,e);if(e>this.size||e<0)throw new RangeError(`Position ${e} outside of fragment (${this})`);for(let t=0,r=0;;t++){let i=this.child(t),s=r+i.nodeSize;if(s>=e)return s==e?$i(t+1,s):$i(t,r);r=s}}toString(){return"<"+this.toStringInner()+">"}toStringInner(){return this.content.join(", ")}toJSON(){return this.content.length?this.content.map(e=>e.toJSON()):null}static fromJSON(e,t){if(!t)return M.empty;if(!Array.isArray(t))throw new RangeError("Invalid input for Fragment.fromJSON");return M.fromArray(t.map(e.nodeFromJSON))}static fromArray(e){if(!e.length)return M.empty;let t,r=0;for(let i=0;i<e.length;i++){let s=e[i];r+=s.nodeSize,i&&s.isText&&e[i-1].sameMarkup(s)?(t||(t=e.slice(0,i)),t[t.length-1]=s.withText(t[t.length-1].text+s.text)):t&&t.push(s)}return new M(t||e,r)}static from(e){if(!e)return M.empty;if(e instanceof M)return e;if(Array.isArray(e))return this.fromArray(e);if(e.attrs)return new M([e],e.nodeSize);throw new RangeError("Can not convert "+e+" to a Fragment"+(e.nodesBetween?" (looks like multiple versions of prosemirror-model were loaded)":""))}}M.empty=new M([],0);const No={index:0,offset:0};function $i(n,e){return No.index=n,No.offset=e,No}function ds(n,e){if(n===e)return!0;if(!(n&&typeof n=="object")||!(e&&typeof e=="object"))return!1;let t=Array.isArray(n);if(Array.isArray(e)!=t)return!1;if(t){if(n.length!=e.length)return!1;for(let r=0;r<n.length;r++)if(!ds(n[r],e[r]))return!1}else{for(let r in n)if(!(r in e)||!ds(n[r],e[r]))return!1;for(let r in e)if(!(r in n))return!1}return!0}let _e=class na{constructor(e,t){this.type=e,this.attrs=t}addToSet(e){let t,r=!1;for(let i=0;i<e.length;i++){let s=e[i];if(this.eq(s))return e;if(this.type.excludes(s.type))t||(t=e.slice(0,i));else{if(s.type.excludes(this.type))return e;!r&&s.type.rank>this.type.rank&&(t||(t=e.slice(0,i)),t.push(this),r=!0),t&&t.push(s)}}return t||(t=e.slice()),r||t.push(this),t}removeFromSet(e){for(let t=0;t<e.length;t++)if(this.eq(e[t]))return e.slice(0,t).concat(e.slice(t+1));return e}isInSet(e){for(let t=0;t<e.length;t++)if(this.eq(e[t]))return!0;return!1}eq(e){return this==e||this.type==e.type&&ds(this.attrs,e.attrs)}toJSON(){let e={type:this.type.name};for(let t in this.attrs){e.attrs=this.attrs;break}return e}static fromJSON(e,t){if(!t)throw new RangeError("Invalid input for Mark.fromJSON");let r=e.marks[t.type];if(!r)throw new RangeError(`There is no mark type ${t.type} in this schema`);return r.create(t.attrs)}static sameSet(e,t){if(e==t)return!0;if(e.length!=t.length)return!1;for(let r=0;r<e.length;r++)if(!e[r].eq(t[r]))return!1;return!0}static setFrom(e){if(!e||Array.isArray(e)&&e.length==0)return na.none;if(e instanceof na)return[e];let t=e.slice();return t.sort((r,i)=>r.type.rank-i.type.rank),t}};_e.none=[];class mi extends Error{}class H{constructor(e,t,r){this.content=e,this.openStart=t,this.openEnd=r}get size(){return this.content.size-this.openStart-this.openEnd}insertAt(e,t){let r=sd(this.content,e+this.openStart,t,this.openStart+1,this.openEnd+1);return r&&new H(r,this.openStart,this.openEnd)}removeBetween(e,t){return new H(id(this.content,e+this.openStart,t+this.openStart),this.openStart,this.openEnd)}eq(e){return this.content.eq(e.content)&&this.openStart==e.openStart&&this.openEnd==e.openEnd}toString(){return this.content+"("+this.openStart+","+this.openEnd+")"}toJSON(){if(!this.content.size)return null;let e={content:this.content.toJSON()};return this.openStart>0&&(e.openStart=this.openStart),this.openEnd>0&&(e.openEnd=this.openEnd),e}static fromJSON(e,t){if(!t)return H.empty;let r=t.openStart||0,i=t.openEnd||0;if(typeof r!="number"||typeof i!="number")throw new RangeError("Invalid input for Slice.fromJSON");return new H(M.fromJSON(e,t.content),r,i)}static maxOpen(e,t=!0){let r=0,i=0;for(let s=e.firstChild;s&&!s.isLeaf&&(t||!s.type.spec.isolating);s=s.firstChild)r++;for(let s=e.lastChild;s&&!s.isLeaf&&(t||!s.type.spec.isolating);s=s.lastChild)i++;return new H(e,r,i)}}H.empty=new H(M.empty,0,0);function id(n,e,t){let{index:r,offset:i}=n.findIndex(e),s=n.maybeChild(r),{index:o,offset:a}=n.findIndex(t);if(i==e||s.isText){if(a!=t&&!n.child(o).isText)throw new RangeError("Removing non-flat range");return n.cut(0,e).append(n.cut(t))}if(r!=o)throw new RangeError("Removing non-flat range");return n.replaceChild(r,s.copy(id(s.content,e-i-1,t-i-1)))}function sd(n,e,t,r,i,s){let{index:o,offset:a}=n.findIndex(e),l=n.maybeChild(o);if(a==e||l.isText)return s&&r<=0&&i<=0&&!s.canReplace(o,o,t)?null:n.cut(0,e).append(t).append(n.cut(e));let c=sd(l.content,e-a-1,t,o==0?r-1:0,o==n.childCount-1?i-1:0,l);return c&&n.replaceChild(o,l.copy(c))}function yg(n,e,t){if(t.openStart>n.depth)throw new mi("Inserted content deeper than insertion position");if(n.depth-t.openStart!=e.depth-t.openEnd)throw new mi("Inconsistent open depths");return od(n,e,t,0)}function od(n,e,t,r){let i=n.index(r),s=n.node(r);if(i==e.index(r)&&r<n.depth-t.openStart){let o=od(n,e,t,r+1);return s.copy(s.content.replaceChild(i,o))}else if(t.content.size)if(!t.openStart&&!t.openEnd&&n.depth==r&&e.depth==r){let o=n.parent,a=o.content;return tr(o,a.cut(0,n.parentOffset).append(t.content).append(a.cut(e.parentOffset)))}else{let{start:o,end:a}=bg(t,n);return tr(s,ld(n,o,a,e,r))}else return tr(s,fs(n,e,r))}function ad(n,e){if(!e.type.compatibleContent(n.type))throw new mi("Cannot join "+e.type.name+" onto "+n.type.name)}function ra(n,e,t){let r=n.node(t);return ad(r,e.node(t)),r}function er(n,e){let t=e.length-1;t>=0&&n.isText&&n.sameMarkup(e[t])?e[t]=n.withText(e[t].text+n.text):e.push(n)}function ei(n,e,t,r){let i=(e||n).node(t),s=0,o=e?e.index(t):i.childCount;n&&(s=n.index(t),n.depth>t?s++:n.textOffset&&(er(n.nodeAfter,r),s++));for(let a=s;a<o;a++)er(i.child(a),r);e&&e.depth==t&&e.textOffset&&er(e.nodeBefore,r)}function tr(n,e){if(!n.type.validContent(e))throw new mi("Invalid content for node "+n.type.name);return n.copy(e)}function ld(n,e,t,r,i){let s=n.depth>i&&ra(n,e,i+1),o=r.depth>i&&ra(t,r,i+1),a=[];return ei(null,n,i,a),s&&o&&e.index(i)==t.index(i)?(ad(s,o),er(tr(s,ld(n,e,t,r,i+1)),a)):(s&&er(tr(s,fs(n,e,i+1)),a),ei(e,t,i,a),o&&er(tr(o,fs(t,r,i+1)),a)),ei(r,null,i,a),new M(a)}function fs(n,e,t){let r=[];if(ei(null,n,t,r),n.depth>t){let i=ra(n,e,t+1);er(tr(i,fs(n,e,t+1)),r)}return ei(e,null,t,r),new M(r)}function bg(n,e){let t=e.depth-n.openStart,i=e.node(t).copy(n.content);for(let s=t-1;s>=0;s--)i=e.node(s).copy(M.from(i));return{start:i.resolveNoCache(n.openStart+t),end:i.resolveNoCache(i.content.size-n.openEnd-t)}}class gi{constructor(e,t,r){this.pos=e,this.path=t,this.parentOffset=r,this.depth=t.length/3-1}resolveDepth(e){return e==null?this.depth:e<0?this.depth+e:e}get parent(){return this.node(this.depth)}get doc(){return this.node(0)}node(e){return this.path[this.resolveDepth(e)*3]}index(e){return this.path[this.resolveDepth(e)*3+1]}indexAfter(e){return e=this.resolveDepth(e),this.index(e)+(e==this.depth&&!this.textOffset?0:1)}start(e){return e=this.resolveDepth(e),e==0?0:this.path[e*3-1]+1}end(e){return e=this.resolveDepth(e),this.start(e)+this.node(e).content.size}before(e){if(e=this.resolveDepth(e),!e)throw new RangeError("There is no position before the top-level node");return e==this.depth+1?this.pos:this.path[e*3-1]}after(e){if(e=this.resolveDepth(e),!e)throw new RangeError("There is no position after the top-level node");return e==this.depth+1?this.pos:this.path[e*3-1]+this.path[e*3].nodeSize}get textOffset(){return this.pos-this.path[this.path.length-1]}get nodeAfter(){let e=this.parent,t=this.index(this.depth);if(t==e.childCount)return null;let r=this.pos-this.path[this.path.length-1],i=e.child(t);return r?e.child(t).cut(r):i}get nodeBefore(){let e=this.index(this.depth),t=this.pos-this.path[this.path.length-1];return t?this.parent.child(e).cut(0,t):e==0?null:this.parent.child(e-1)}posAtIndex(e,t){t=this.resolveDepth(t);let r=this.path[t*3],i=t==0?0:this.path[t*3-1]+1;for(let s=0;s<e;s++)i+=r.child(s).nodeSize;return i}marks(){let e=this.parent,t=this.index();if(e.content.size==0)return _e.none;if(this.textOffset)return e.child(t).marks;let r=e.maybeChild(t-1),i=e.maybeChild(t);if(!r){let a=r;r=i,i=a}let s=r.marks;for(var o=0;o<s.length;o++)s[o].type.spec.inclusive===!1&&(!i||!s[o].isInSet(i.marks))&&(s=s[o--].removeFromSet(s));return s}marksAcross(e){let t=this.parent.maybeChild(this.index());if(!t||!t.isInline)return null;let r=t.marks,i=e.parent.maybeChild(e.index());for(var s=0;s<r.length;s++)r[s].type.spec.inclusive===!1&&(!i||!r[s].isInSet(i.marks))&&(r=r[s--].removeFromSet(r));return r}sharedDepth(e){for(let t=this.depth;t>0;t--)if(this.start(t)<=e&&this.end(t)>=e)return t;return 0}blockRange(e=this,t){if(e.pos<this.pos)return e.blockRange(this);for(let r=this.depth-(this.parent.inlineContent||this.pos==e.pos?1:0);r>=0;r--)if(e.pos<=this.end(r)&&(!t||t(this.node(r))))return new hs(this,e,r);return null}sameParent(e){return this.pos-this.parentOffset==e.pos-e.parentOffset}max(e){return e.pos>this.pos?e:this}min(e){return e.pos<this.pos?e:this}toString(){let e="";for(let t=1;t<=this.depth;t++)e+=(e?"/":"")+this.node(t).type.name+"_"+this.index(t-1);return e+":"+this.parentOffset}static resolve(e,t){if(!(t>=0&&t<=e.content.size))throw new RangeError("Position "+t+" out of range");let r=[],i=0,s=t;for(let o=e;;){let{index:a,offset:l}=o.content.findIndex(s),c=s-l;if(r.push(o,a,i+l),!c||(o=o.child(a),o.isText))break;s=c-1,i+=l+1}return new gi(t,r,s)}static resolveCached(e,t){let r=Wl.get(e);if(r)for(let s=0;s<r.elts.length;s++){let o=r.elts[s];if(o.pos==t)return o}else Wl.set(e,r=new vg);let i=r.elts[r.i]=gi.resolve(e,t);return r.i=(r.i+1)%kg,i}}class vg{constructor(){this.elts=[],this.i=0}}const kg=12,Wl=new WeakMap;class hs{constructor(e,t,r){this.$from=e,this.$to=t,this.depth=r}get start(){return this.$from.before(this.depth+1)}get end(){return this.$to.after(this.depth+1)}get parent(){return this.$from.node(this.depth)}get startIndex(){return this.$from.index(this.depth)}get endIndex(){return this.$to.indexAfter(this.depth)}}const xg=Object.create(null);let Rn=class ia{constructor(e,t,r,i=_e.none){this.type=e,this.attrs=t,this.marks=i,this.content=r||M.empty}get children(){return this.content.content}get nodeSize(){return this.isLeaf?1:2+this.content.size}get childCount(){return this.content.childCount}child(e){return this.content.child(e)}maybeChild(e){return this.content.maybeChild(e)}forEach(e){this.content.forEach(e)}nodesBetween(e,t,r,i=0){this.content.nodesBetween(e,t,r,i,this)}descendants(e){this.nodesBetween(0,this.content.size,e)}get textContent(){return this.isLeaf&&this.type.spec.leafText?this.type.spec.leafText(this):this.textBetween(0,this.content.size,"")}textBetween(e,t,r,i){return this.content.textBetween(e,t,r,i)}get firstChild(){return this.content.firstChild}get lastChild(){return this.content.lastChild}eq(e){return this==e||this.sameMarkup(e)&&this.content.eq(e.content)}sameMarkup(e){return this.hasMarkup(e.type,e.attrs,e.marks)}hasMarkup(e,t,r){return this.type==e&&ds(this.attrs,t||e.defaultAttrs||xg)&&_e.sameSet(this.marks,r||_e.none)}copy(e=null){return e==this.content?this:new ia(this.type,this.attrs,e,this.marks)}mark(e){return e==this.marks?this:new ia(this.type,this.attrs,this.content,e)}cut(e,t=this.content.size){return e==0&&t==this.content.size?this:this.copy(this.content.cut(e,t))}slice(e,t=this.content.size,r=!1){if(e==t)return H.empty;let i=this.resolve(e),s=this.resolve(t),o=r?0:i.sharedDepth(t),a=i.start(o),c=i.node(o).content.cut(i.pos-a,s.pos-a);return new H(c,i.depth-o,s.depth-o)}replace(e,t,r){return yg(this.resolve(e),this.resolve(t),r)}nodeAt(e){for(let t=this;;){let{index:r,offset:i}=t.content.findIndex(e);if(t=t.maybeChild(r),!t)return null;if(i==e||t.isText)return t;e-=i+1}}childAfter(e){let{index:t,offset:r}=this.content.findIndex(e);return{node:this.content.maybeChild(t),index:t,offset:r}}childBefore(e){if(e==0)return{node:null,index:0,offset:0};let{index:t,offset:r}=this.content.findIndex(e);if(r<e)return{node:this.content.child(t),index:t,offset:r};let i=this.content.child(t-1);return{node:i,index:t-1,offset:r-i.nodeSize}}resolve(e){return gi.resolveCached(this,e)}resolveNoCache(e){return gi.resolve(this,e)}rangeHasMark(e,t,r){let i=!1;return t>e&&this.nodesBetween(e,t,s=>(r.isInSet(s.marks)&&(i=!0),!i)),i}get isBlock(){return this.type.isBlock}get isTextblock(){return this.type.isTextblock}get inlineContent(){return this.type.inlineContent}get isInline(){return this.type.isInline}get isText(){return this.type.isText}get isLeaf(){return this.type.isLeaf}get isAtom(){return this.type.isAtom}toString(){if(this.type.spec.toDebugString)return this.type.spec.toDebugString(this);let e=this.type.name;return this.content.size&&(e+="("+this.content.toStringInner()+")"),cd(this.marks,e)}contentMatchAt(e){let t=this.type.contentMatch.matchFragment(this.content,0,e);if(!t)throw new Error("Called contentMatchAt on a node with invalid content");return t}canReplace(e,t,r=M.empty,i=0,s=r.childCount){let o=this.contentMatchAt(e).matchFragment(r,i,s),a=o&&o.matchFragment(this.content,t);if(!a||!a.validEnd)return!1;for(let l=i;l<s;l++)if(!this.type.allowsMarks(r.child(l).marks))return!1;return!0}canReplaceWith(e,t,r,i){if(i&&!this.type.allowsMarks(i))return!1;let s=this.contentMatchAt(e).matchType(r),o=s&&s.matchFragment(this.content,t);return o?o.validEnd:!1}canAppend(e){return e.content.size?this.canReplace(this.childCount,this.childCount,e.content):this.type.compatibleContent(e.type)}check(){this.type.checkContent(this.content),jl(this.type.attrs,this.attrs,"node",this.type.name);let e=_e.none;for(let t=0;t<this.marks.length;t++){let r=this.marks[t];jl(r.type.attrs,r.attrs,"mark",r.type.name),e=r.addToSet(e)}if(!_e.sameSet(e,this.marks))throw new RangeError(`Invalid collection of marks for node ${this.type.name}: ${this.marks.map(t=>t.type.name)}`);this.content.forEach(t=>t.check())}toJSON(){let e={type:this.type.name};for(let t in this.attrs){e.attrs=this.attrs;break}return this.content.size&&(e.content=this.content.toJSON()),this.marks.length&&(e.marks=this.marks.map(t=>t.toJSON())),e}static fromJSON(e,t){if(!t)throw new RangeError("Invalid input for Node.fromJSON");let r;if(t.marks){if(!Array.isArray(t.marks))throw new RangeError("Invalid mark data for Node.fromJSON");r=t.marks.map(e.markFromJSON)}if(t.type=="text"){if(typeof t.text!="string")throw new RangeError("Invalid text node in JSON");return e.text(t.text,r)}let i=M.fromJSON(e,t.content);return e.nodeType(t.type).create(t.attrs,i,r)}};Rn.prototype.text=void 0;class ps extends Rn{constructor(e,t,r,i){if(super(e,t,null,i),!r)throw new RangeError("Empty text nodes are not allowed");this.text=r}toString(){return this.type.spec.toDebugString?this.type.spec.toDebugString(this):cd(this.marks,JSON.stringify(this.text))}get textContent(){return this.text}textBetween(e,t){return this.text.slice(e,t)}get nodeSize(){return this.text.length}mark(e){return e==this.marks?this:new ps(this.type,this.attrs,this.text,e)}withText(e){return e==this.text?this:new ps(this.type,this.attrs,e,this.marks)}cut(e=0,t=this.text.length){return e==0&&t==this.text.length?this:this.withText(this.text.slice(e,t))}eq(e){return this.sameMarkup(e)&&this.text==e.text}toJSON(){let e=super.toJSON();return e.text=this.text,e}}function cd(n,e){for(let t=n.length-1;t>=0;t--)e=n[t].type.name+"("+e+")";return e}function jl(n,e,t,r){for(let i in e)if(!(i in n))throw new RangeError(`Unsupported attribute ${i} for ${t} of type ${r}`);for(let i in n)n[i].validate&&n[i].validate(e[i])}class ir{constructor(e){this.validEnd=e,this.next=[],this.wrapCache=[]}static parse(e,t){let r=new wg(e,t);if(r.next==null)return ir.empty;let i=ud(r);r.next&&r.err("Unexpected trailing text");let s=Ng(Ag(i));return Og(s,r),s}matchType(e){for(let t=0;t<this.next.length;t++)if(this.next[t].type==e)return this.next[t].next;return null}matchFragment(e,t=0,r=e.childCount){let i=this;for(let s=t;i&&s<r;s++)i=i.matchType(e.child(s).type);return i}get inlineContent(){return this.next.length!=0&&this.next[0].type.isInline}get defaultType(){for(let e=0;e<this.next.length;e++){let{type:t}=this.next[e];if(!(t.isText||t.hasRequiredAttrs()))return t}return null}compatible(e){for(let t=0;t<this.next.length;t++)for(let r=0;r<e.next.length;r++)if(this.next[t].type==e.next[r].type)return!0;return!1}fillBefore(e,t=!1,r=0){let i=[this];function s(o,a){let l=o.matchFragment(e,r);if(l&&(!t||l.validEnd))return M.from(a.map(c=>c.createAndFill()));for(let c=0;c<o.next.length;c++){let{type:u,next:d}=o.next[c];if(!(u.isText||u.hasRequiredAttrs())&&i.indexOf(d)==-1){i.push(d);let f=s(d,a.concat(u));if(f)return f}}return null}return s(this,[])}findWrapping(e){for(let r=0;r<this.wrapCache.length;r+=2)if(this.wrapCache[r]==e)return this.wrapCache[r+1];let t=this.computeWrapping(e);return this.wrapCache.push(e,t),t}computeWrapping(e){let t=Object.create(null),r=[{match:this,type:null,via:null}];for(;r.length;){let i=r.shift(),s=i.match;if(s.matchType(e)){let o=[];for(let a=i;a.type;a=a.via)o.push(a.type);return o.reverse()}for(let o=0;o<s.next.length;o++){let{type:a,next:l}=s.next[o];!a.isLeaf&&!a.hasRequiredAttrs()&&!(a.name in t)&&(!i.type||l.validEnd)&&(r.push({match:a.contentMatch,type:a,via:i}),t[a.name]=!0)}}return null}get edgeCount(){return this.next.length}edge(e){if(e>=this.next.length)throw new RangeError(`There's no ${e}th edge in this content match`);return this.next[e]}toString(){let e=[];function t(r){e.push(r);for(let i=0;i<r.next.length;i++)e.indexOf(r.next[i].next)==-1&&t(r.next[i].next)}return t(this),e.map((r,i)=>{let s=i+(r.validEnd?"*":" ")+" ";for(let o=0;o<r.next.length;o++)s+=(o?", ":"")+r.next[o].type.name+"->"+e.indexOf(r.next[o].next);return s}).join(`
3
3
  `)}}ir.empty=new ir(!0);class wg{constructor(e,t){this.string=e,this.nodeTypes=t,this.inline=null,this.pos=0,this.tokens=e.split(/\s*(?=\b|\W|$)/),this.tokens[this.tokens.length-1]==""&&this.tokens.pop(),this.tokens[0]==""&&this.tokens.shift()}get next(){return this.tokens[this.pos]}eat(e){return this.next==e&&(this.pos++||!0)}err(e){throw new SyntaxError(e+" (in content expression '"+this.string+"')")}}function ud(n){let e=[];do e.push(Sg(n));while(n.eat("|"));return e.length==1?e[0]:{type:"choice",exprs:e}}function Sg(n){let e=[];do e.push(Cg(n));while(n.next&&n.next!=")"&&n.next!="|");return e.length==1?e[0]:{type:"seq",exprs:e}}function Cg(n){let e=Tg(n);for(;;)if(n.eat("+"))e={type:"plus",expr:e};else if(n.eat("*"))e={type:"star",expr:e};else if(n.eat("?"))e={type:"opt",expr:e};else if(n.eat("{"))e=Mg(n,e);else break;return e}function Kl(n){/\D/.test(n.next)&&n.err("Expected number, got '"+n.next+"'");let e=Number(n.next);return n.pos++,e}function Mg(n,e){let t=Kl(n),r=t;return n.eat(",")&&(n.next!="}"?r=Kl(n):r=-1),n.eat("}")||n.err("Unclosed braced range"),{type:"range",min:t,max:r,expr:e}}function Eg(n,e){let t=n.nodeTypes,r=t[e];if(r)return[r];let i=[];for(let s in t){let o=t[s];o.isInGroup(e)&&i.push(o)}return i.length==0&&n.err("No node type or group '"+e+"' found"),i}function Tg(n){if(n.eat("(")){let e=ud(n);return n.eat(")")||n.err("Missing closing paren"),e}else if(/\W/.test(n.next))n.err("Unexpected token '"+n.next+"'");else{let e=Eg(n,n.next).map(t=>(n.inline==null?n.inline=t.isInline:n.inline!=t.isInline&&n.err("Mixing inline and block content"),{type:"name",value:t}));return n.pos++,e.length==1?e[0]:{type:"choice",exprs:e}}}function Ag(n){let e=[[]];return i(s(n,0),t()),e;function t(){return e.push([])-1}function r(o,a,l){let c={term:l,to:a};return e[o].push(c),c}function i(o,a){o.forEach(l=>l.to=a)}function s(o,a){if(o.type=="choice")return o.exprs.reduce((l,c)=>l.concat(s(c,a)),[]);if(o.type=="seq")for(let l=0;;l++){let c=s(o.exprs[l],a);if(l==o.exprs.length-1)return c;i(c,a=t())}else if(o.type=="star"){let l=t();return r(a,l),i(s(o.expr,l),l),[r(l)]}else if(o.type=="plus"){let l=t();return i(s(o.expr,a),l),i(s(o.expr,l),l),[r(l)]}else{if(o.type=="opt")return[r(a)].concat(s(o.expr,a));if(o.type=="range"){let l=a;for(let c=0;c<o.min;c++){let u=t();i(s(o.expr,l),u),l=u}if(o.max==-1)i(s(o.expr,l),l);else for(let c=o.min;c<o.max;c++){let u=t();r(l,u),i(s(o.expr,l),u),l=u}return[r(l)]}else{if(o.type=="name")return[r(a,void 0,o.value)];throw new Error("Unknown expr type")}}}}function dd(n,e){return e-n}function Ul(n,e){let t=[];return r(e),t.sort(dd);function r(i){let s=n[i];if(s.length==1&&!s[0].term)return r(s[0].to);t.push(i);for(let o=0;o<s.length;o++){let{term:a,to:l}=s[o];!a&&t.indexOf(l)==-1&&r(l)}}}function Ng(n){let e=Object.create(null);return t(Ul(n,0));function t(r){let i=[];r.forEach(o=>{n[o].forEach(({term:a,to:l})=>{if(!a)return;let c;for(let u=0;u<i.length;u++)i[u][0]==a&&(c=i[u][1]);Ul(n,l).forEach(u=>{c||i.push([a,c=[]]),c.indexOf(u)==-1&&c.push(u)})})});let s=e[r.join(",")]=new ir(r.indexOf(n.length-1)>-1);for(let o=0;o<i.length;o++){let a=i[o][1].sort(dd);s.next.push({type:i[o][0],next:e[a.join(",")]||t(a)})}return s}}function Og(n,e){for(let t=0,r=[n];t<r.length;t++){let i=r[t],s=!i.validEnd,o=[];for(let a=0;a<i.next.length;a++){let{type:l,next:c}=i.next[a];o.push(l.name),s&&!(l.isText||l.hasRequiredAttrs())&&(s=!1),r.indexOf(c)==-1&&r.push(c)}s&&e.err("Only non-generatable nodes ("+o.join(", ")+") in a required position (see https://prosemirror.net/docs/guide/#generatable)")}}function fd(n){let e=Object.create(null);for(let t in n){let r=n[t];if(!r.hasDefault)return null;e[t]=r.default}return e}function hd(n,e){let t=Object.create(null);for(let r in n){let i=n[r],s=e&&e[r];if(s===void 0)if(i.hasDefault)s=i.default;else throw new RangeError("No value supplied for attribute "+r);else i.validate&&i.validate(s);t[r]=s}return t}function pd(n,e){let t=Object.create(null);if(e)for(let r in e)t[r]=new Ig(n,r,e[r]);return t}let ql=class md{constructor(e,t,r){this.name=e,this.schema=t,this.spec=r,this.markSet=null,this.groups=r.group?r.group.split(" "):[],this.attrs=pd(e,r.attrs),this.defaultAttrs=fd(this.attrs),this.contentMatch=null,this.inlineContent=null,this.isBlock=!(r.inline||e=="text"),this.isText=e=="text"}get isInline(){return!this.isBlock}get isTextblock(){return this.isBlock&&this.inlineContent}get isLeaf(){return this.contentMatch==ir.empty}get isAtom(){return this.isLeaf||!!this.spec.atom}isInGroup(e){return this.groups.indexOf(e)>-1}get whitespace(){return this.spec.whitespace||(this.spec.code?"pre":"normal")}hasRequiredAttrs(){for(let e in this.attrs)if(this.attrs[e].isRequired)return!0;return!1}compatibleContent(e){return this==e||this.contentMatch.compatible(e.contentMatch)}computeAttrs(e){return!e&&this.defaultAttrs?this.defaultAttrs:hd(this.attrs,e)}create(e=null,t,r){if(this.isText)throw new Error("NodeType.create can't construct text nodes");return new Rn(this,this.computeAttrs(e),M.from(t),_e.setFrom(r))}createChecked(e=null,t,r){return t=M.from(t),this.checkContent(t),new Rn(this,this.computeAttrs(e),t,_e.setFrom(r))}createAndFill(e=null,t,r){if(e=this.computeAttrs(e),t=M.from(t),t.size){let o=this.contentMatch.fillBefore(t);if(!o)return null;t=o.append(t)}let i=this.contentMatch.matchFragment(t),s=i&&i.fillBefore(M.empty,!0);return s?new Rn(this,e,t.append(s),_e.setFrom(r)):null}validContent(e){let t=this.contentMatch.matchFragment(e);if(!t||!t.validEnd)return!1;for(let r=0;r<e.childCount;r++)if(!this.allowsMarks(e.child(r).marks))return!1;return!0}checkContent(e){if(!this.validContent(e))throw new RangeError(`Invalid content for node ${this.name}: ${e.toString().slice(0,50)}`)}checkAttrs(e){}allowsMarkType(e){return this.markSet==null||this.markSet.indexOf(e)>-1}allowsMarks(e){if(this.markSet==null)return!0;for(let t=0;t<e.length;t++)if(!this.allowsMarkType(e[t].type))return!1;return!0}allowedMarks(e){if(this.markSet==null)return e;let t;for(let r=0;r<e.length;r++)this.allowsMarkType(e[r].type)?t&&t.push(e[r]):t||(t=e.slice(0,r));return t?t.length?t:_e.none:e}static compile(e,t){let r=Object.create(null);e.forEach((s,o)=>r[s]=new md(s,t,o));let i=t.spec.topNode||"doc";if(!r[i])throw new RangeError("Schema is missing its top node type ('"+i+"')");if(!r.text)throw new RangeError("Every schema needs a 'text' type");for(let s in r.text.attrs)throw new RangeError("The text node type should not have attributes");return r}};function Dg(n,e,t){let r=t.split("|");return i=>{let s=i===null?"null":typeof i;if(r.indexOf(s)<0)throw new RangeError(`Expected value of type ${r} for attribute ${e} on type ${n}, got ${s}`)}}class Ig{constructor(e,t,r){this.hasDefault=Object.prototype.hasOwnProperty.call(r,"default"),this.default=r.default,this.validate=typeof r.validate=="string"?Dg(e,t,r.validate):r.validate}get isRequired(){return!this.hasDefault}}class eo{constructor(e,t,r,i){this.name=e,this.rank=t,this.schema=r,this.spec=i,this.attrs=pd(e,i.attrs),this.excluded=null;let s=fd(this.attrs);this.instance=s?new _e(this,s):null}create(e=null){return!e&&this.instance?this.instance:new _e(this,hd(this.attrs,e))}static compile(e,t){let r=Object.create(null),i=0;return e.forEach((s,o)=>r[s]=new eo(s,i++,t,o)),r}removeFromSet(e){for(var t=0;t<e.length;t++)e[t].type==this&&(e=e.slice(0,t).concat(e.slice(t+1)),t--);return e}isInSet(e){for(let t=0;t<e.length;t++)if(e[t].type==this)return e[t]}excludes(e){return this.excluded.indexOf(e)>-1}}class ns{constructor(e){this.linebreakReplacement=null,this.cached=Object.create(null);let t=this.spec={};for(let i in e)t[i]=e[i];t.nodes=mt.from(e.nodes),t.marks=mt.from(e.marks||{}),this.nodes=ql.compile(this.spec.nodes,this),this.marks=eo.compile(this.spec.marks,this);let r=Object.create(null);for(let i in this.nodes){if(i in this.marks)throw new RangeError(i+" can not be both a node and a mark");let s=this.nodes[i],o=s.spec.content||"",a=s.spec.marks;if(s.contentMatch=r[o]||(r[o]=ir.parse(o,this.nodes)),s.inlineContent=s.contentMatch.inlineContent,s.spec.linebreakReplacement){if(this.linebreakReplacement)throw new RangeError("Multiple linebreak nodes defined");if(!s.isInline||!s.isLeaf)throw new RangeError("Linebreak replacement nodes must be inline leaf nodes");this.linebreakReplacement=s}s.markSet=a=="_"?null:a?Jl(this,a.split(" ")):a==""||!s.inlineContent?[]:null}for(let i in this.marks){let s=this.marks[i],o=s.spec.excludes;s.excluded=o==null?[s]:o==""?[]:Jl(this,o.split(" "))}this.nodeFromJSON=i=>Rn.fromJSON(this,i),this.markFromJSON=i=>_e.fromJSON(this,i),this.topNodeType=this.nodes[this.spec.topNode||"doc"],this.cached.wrappings=Object.create(null)}node(e,t=null,r,i){if(typeof e=="string")e=this.nodeType(e);else if(e instanceof ql){if(e.schema!=this)throw new RangeError("Node type from different schema used ("+e.name+")")}else throw new RangeError("Invalid node type: "+e);return e.createChecked(t,r,i)}text(e,t){let r=this.nodes.text;return new ps(r,r.defaultAttrs,e,_e.setFrom(t))}mark(e,t){return typeof e=="string"&&(e=this.marks[e]),e.create(t)}nodeType(e){let t=this.nodes[e];if(!t)throw new RangeError("Unknown node type: "+e);return t}}function Jl(n,e){let t=[];for(let r=0;r<e.length;r++){let i=e[r],s=n.marks[i],o=s;if(s)t.push(s);else for(let a in n.marks){let l=n.marks[a];(i=="_"||l.spec.group&&l.spec.group.split(" ").indexOf(i)>-1)&&t.push(o=l)}if(!o)throw new SyntaxError("Unknown mark type: '"+e[r]+"'")}return t}function Rg(n){return n.tag!=null}function Lg(n){return n.style!=null}let ti=class sa{constructor(e,t){this.schema=e,this.rules=t,this.tags=[],this.styles=[];let r=this.matchedStyles=[];t.forEach(i=>{if(Rg(i))this.tags.push(i);else if(Lg(i)){let s=/[^=]*/.exec(i.style)[0];r.indexOf(s)<0&&r.push(s),this.styles.push(i)}}),this.normalizeLists=!this.tags.some(i=>{if(!/^(ul|ol)\b/.test(i.tag)||!i.node)return!1;let s=e.nodes[i.node];return s.contentMatch.matchType(s)})}parse(e,t={}){let r=new Xl(this,t,!1);return r.addAll(e,_e.none,t.from,t.to),r.finish()}parseSlice(e,t={}){let r=new Xl(this,t,!0);return r.addAll(e,_e.none,t.from,t.to),H.maxOpen(r.finish())}matchTag(e,t,r){for(let i=r?this.tags.indexOf(r)+1:0;i<this.tags.length;i++){let s=this.tags[i];if(zg(e,s.tag)&&(s.namespace===void 0||e.namespaceURI==s.namespace)&&(!s.context||t.matchesContext(s.context))){if(s.getAttrs){let o=s.getAttrs(e);if(o===!1)continue;s.attrs=o||void 0}return s}}}matchStyle(e,t,r,i){for(let s=i?this.styles.indexOf(i)+1:0;s<this.styles.length;s++){let o=this.styles[s],a=o.style;if(!(a.indexOf(e)!=0||o.context&&!r.matchesContext(o.context)||a.length>e.length&&(a.charCodeAt(e.length)!=61||a.slice(e.length+1)!=t))){if(o.getAttrs){let l=o.getAttrs(t);if(l===!1)continue;o.attrs=l||void 0}return o}}}static schemaRules(e){let t=[];function r(i){let s=i.priority==null?50:i.priority,o=0;for(;o<t.length;o++){let a=t[o];if((a.priority==null?50:a.priority)<s)break}t.splice(o,0,i)}for(let i in e.marks){let s=e.marks[i].spec.parseDOM;s&&s.forEach(o=>{r(o=Yl(o)),o.mark||o.ignore||o.clearMark||(o.mark=i)})}for(let i in e.nodes){let s=e.nodes[i].spec.parseDOM;s&&s.forEach(o=>{r(o=Yl(o)),o.node||o.ignore||o.mark||(o.node=i)})}return t}static fromSchema(e){return e.cached.domParser||(e.cached.domParser=new sa(e,sa.schemaRules(e)))}};const gd={address:!0,article:!0,aside:!0,blockquote:!0,body:!0,canvas:!0,dd:!0,div:!0,dl:!0,fieldset:!0,figcaption:!0,figure:!0,footer:!0,form:!0,h1:!0,h2:!0,h3:!0,h4:!0,h5:!0,h6:!0,header:!0,hgroup:!0,hr:!0,li:!0,noscript:!0,ol:!0,output:!0,p:!0,pre:!0,section:!0,table:!0,tfoot:!0,ul:!0},Pg={head:!0,noscript:!0,object:!0,script:!0,style:!0,title:!0},yd={ol:!0,ul:!0},yi=1,oa=2,ni=4;function Gl(n,e,t){return e!=null?(e?yi:0)|(e==="full"?oa:0):n&&n.whitespace=="pre"?yi|oa:t&~ni}class Bi{constructor(e,t,r,i,s,o){this.type=e,this.attrs=t,this.marks=r,this.solid=i,this.options=o,this.content=[],this.activeMarks=_e.none,this.match=s||(o&ni?null:e.contentMatch)}findWrapping(e){if(!this.match){if(!this.type)return[];let t=this.type.contentMatch.fillBefore(M.from(e));if(t)this.match=this.type.contentMatch.matchFragment(t);else{let r=this.type.contentMatch,i;return(i=r.findWrapping(e.type))?(this.match=r,i):null}}return this.match.findWrapping(e.type)}finish(e){if(!(this.options&yi)){let r=this.content[this.content.length-1],i;if(r&&r.isText&&(i=/[ \t\r\n\u000c]+$/.exec(r.text))){let s=r;r.text.length==i[0].length?this.content.pop():this.content[this.content.length-1]=s.withText(s.text.slice(0,s.text.length-i[0].length))}}let t=M.from(this.content);return!e&&this.match&&(t=t.append(this.match.fillBefore(M.empty,!0))),this.type?this.type.create(this.attrs,t,this.marks):t}inlineContext(e){return this.type?this.type.inlineContent:this.content.length?this.content[0].isInline:e.parentNode&&!gd.hasOwnProperty(e.parentNode.nodeName.toLowerCase())}}class Xl{constructor(e,t,r){this.parser=e,this.options=t,this.isOpen=r,this.open=0,this.localPreserveWS=!1;let i=t.topNode,s,o=Gl(null,t.preserveWhitespace,0)|(r?ni:0);i?s=new Bi(i.type,i.attrs,_e.none,!0,t.topMatch||i.type.contentMatch,o):r?s=new Bi(null,null,_e.none,!0,null,o):s=new Bi(e.schema.topNodeType,null,_e.none,!0,null,o),this.nodes=[s],this.find=t.findPositions,this.needsBlock=!1}get top(){return this.nodes[this.open]}addDOM(e,t){e.nodeType==3?this.addTextNode(e,t):e.nodeType==1&&this.addElement(e,t)}addTextNode(e,t){let r=e.nodeValue,i=this.top,s=i.options&oa?"full":this.localPreserveWS||(i.options&yi)>0,{schema:o}=this.parser;if(s==="full"||i.inlineContext(e)||/[^ \t\r\n\u000c]/.test(r)){if(s)if(s==="full")r=r.replace(/\r\n?/g,`
4
4
  `);else if(o.linebreakReplacement&&/[\r\n]/.test(r)&&this.top.findWrapping(o.linebreakReplacement.create())){let a=r.split(/\r?\n|\r/);for(let l=0;l<a.length;l++)l&&this.insertNode(o.linebreakReplacement.create(),t,!0),a[l]&&this.insertNode(o.text(a[l]),t,!/\S/.test(a[l]));r=""}else r=r.replace(/\r?\n|\r/g," ");else if(r=r.replace(/[ \t\r\n\u000c]+/g," "),/^[ \t\r\n\u000c]/.test(r)&&this.open==this.nodes.length-1){let a=i.content[i.content.length-1],l=e.previousSibling;(!a||l&&l.nodeName=="BR"||a.isText&&/[ \t\r\n\u000c]$/.test(a.text))&&(r=r.slice(1))}r&&this.insertNode(o.text(r),t,!/\S/.test(r)),this.findInText(e)}else this.findInside(e)}addElement(e,t,r){let i=this.localPreserveWS,s=this.top;(e.tagName=="PRE"||/pre/.test(e.style&&e.style.whiteSpace))&&(this.localPreserveWS=!0);let o=e.nodeName.toLowerCase(),a;yd.hasOwnProperty(o)&&this.parser.normalizeLists&&_g(e);let l=this.options.ruleFromNode&&this.options.ruleFromNode(e)||(a=this.parser.matchTag(e,this,r));e:if(l?l.ignore:Pg.hasOwnProperty(o))this.findInside(e),this.ignoreFallback(e,t);else if(!l||l.skip||l.closeParent){l&&l.closeParent?this.open=Math.max(0,this.open-1):l&&l.skip.nodeType&&(e=l.skip);let c,u=this.needsBlock;if(gd.hasOwnProperty(o))s.content.length&&s.content[0].isInline&&this.open&&(this.open--,s=this.top),c=!0,s.type||(this.needsBlock=!0);else if(!e.firstChild){this.leafFallback(e,t);break e}let d=l&&l.skip?t:this.readStyles(e,t);d&&this.addAll(e,d),c&&this.sync(s),this.needsBlock=u}else{let c=this.readStyles(e,t);c&&this.addElementByRule(e,l,c,l.consuming===!1?a:void 0)}this.localPreserveWS=i}leafFallback(e,t){e.nodeName=="BR"&&this.top.type&&this.top.type.inlineContent&&this.addTextNode(e.ownerDocument.createTextNode(`
5
5
  `),t)}ignoreFallback(e,t){e.nodeName=="BR"&&(!this.top.type||!this.top.type.inlineContent)&&this.findPlace(this.parser.schema.text("-"),t,!0)}readStyles(e,t){let r=e.style;if(r&&r.length)for(let i=0;i<this.parser.matchedStyles.length;i++){let s=this.parser.matchedStyles[i],o=r.getPropertyValue(s);if(o)for(let a=void 0;;){let l=this.parser.matchStyle(s,o,this,a);if(!l)break;if(l.ignore)return null;if(l.clearMark?t=t.filter(c=>!l.clearMark(c)):t=t.concat(this.parser.schema.marks[l.mark].create(l.attrs)),l.consuming===!1)a=l;else break}}return t}addElementByRule(e,t,r,i){let s,o;if(t.node)if(o=this.parser.schema.nodes[t.node],o.isLeaf)this.insertNode(o.create(t.attrs),r,e.nodeName=="BR")||this.leafFallback(e,r);else{let l=this.enter(o,t.attrs||null,r,t.preserveWhitespace);l&&(s=!0,r=l)}else{let l=this.parser.schema.marks[t.mark];r=r.concat(l.create(t.attrs))}let a=this.top;if(o&&o.isLeaf)this.findInside(e);else if(i)this.addElement(e,r,i);else if(t.getContent)this.findInside(e),t.getContent(e,this.parser.schema).forEach(l=>this.insertNode(l,r,!1));else{let l=e;typeof t.contentElement=="string"?l=e.querySelector(t.contentElement):typeof t.contentElement=="function"?l=t.contentElement(e):t.contentElement&&(l=t.contentElement),this.findAround(e,l,!0),this.addAll(l,r),this.findAround(e,l,!1)}s&&this.sync(a)&&this.open--}addAll(e,t,r,i){let s=r||0;for(let o=r?e.childNodes[r]:e.firstChild,a=i==null?null:e.childNodes[i];o!=a;o=o.nextSibling,++s)this.findAtPoint(e,s),this.addDOM(o,t);this.findAtPoint(e,s)}findPlace(e,t,r){let i,s;for(let o=this.open,a=0;o>=0;o--){let l=this.nodes[o],c=l.findWrapping(e);if(c&&(!i||i.length>c.length+a)&&(i=c,s=l,!c.length))break;if(l.solid){if(r)break;a+=2}}if(!i)return null;this.sync(s);for(let o=0;o<i.length;o++)t=this.enterInner(i[o],null,t,!1);return t}insertNode(e,t,r){if(e.isInline&&this.needsBlock&&!this.top.type){let s=this.textblockFromContext();s&&(t=this.enterInner(s,null,t))}let i=this.findPlace(e,t,r);if(i){this.closeExtra();let s=this.top;s.match&&(s.match=s.match.matchType(e.type));let o=_e.none;for(let a of i.concat(e.marks))(s.type?s.type.allowsMarkType(a.type):Ql(a.type,e.type))&&(o=a.addToSet(o));return s.content.push(e.mark(o)),!0}return!1}enter(e,t,r,i){let s=this.findPlace(e.create(t),r,!1);return s&&(s=this.enterInner(e,t,r,!0,i)),s}enterInner(e,t,r,i=!1,s){this.closeExtra();let o=this.top;o.match=o.match&&o.match.matchType(e);let a=Gl(e,s,o.options);o.options&ni&&o.content.length==0&&(a|=ni);let l=_e.none;return r=r.filter(c=>(o.type?o.type.allowsMarkType(c.type):Ql(c.type,e))?(l=c.addToSet(l),!1):!0),this.nodes.push(new Bi(e,t,l,i,null,a)),this.open++,r}closeExtra(e=!1){let t=this.nodes.length-1;if(t>this.open){for(;t>this.open;t--)this.nodes[t-1].content.push(this.nodes[t].finish(e));this.nodes.length=this.open+1}}finish(){return this.open=0,this.closeExtra(this.isOpen),this.nodes[0].finish(!!(this.isOpen||this.options.topOpen))}sync(e){for(let t=this.open;t>=0;t--){if(this.nodes[t]==e)return this.open=t,!0;this.localPreserveWS&&(this.nodes[t].options|=yi)}return!1}get currentPos(){this.closeExtra();let e=0;for(let t=this.open;t>=0;t--){let r=this.nodes[t].content;for(let i=r.length-1;i>=0;i--)e+=r[i].nodeSize;t&&e++}return e}findAtPoint(e,t){if(this.find)for(let r=0;r<this.find.length;r++)this.find[r].node==e&&this.find[r].offset==t&&(this.find[r].pos=this.currentPos)}findInside(e){if(this.find)for(let t=0;t<this.find.length;t++)this.find[t].pos==null&&e.nodeType==1&&e.contains(this.find[t].node)&&(this.find[t].pos=this.currentPos)}findAround(e,t,r){if(e!=t&&this.find)for(let i=0;i<this.find.length;i++)this.find[i].pos==null&&e.nodeType==1&&e.contains(this.find[i].node)&&t.compareDocumentPosition(this.find[i].node)&(r?2:4)&&(this.find[i].pos=this.currentPos)}findInText(e){if(this.find)for(let t=0;t<this.find.length;t++)this.find[t].node==e&&(this.find[t].pos=this.currentPos-(e.nodeValue.length-this.find[t].offset))}matchesContext(e){if(e.indexOf("|")>-1)return e.split(/\s*\|\s*/).some(this.matchesContext,this);let t=e.split("/"),r=this.options.context,i=!this.isOpen&&(!r||r.parent.type==this.nodes[0].type),s=-(r?r.depth+1:0)+(i?0:1),o=(a,l)=>{for(;a>=0;a--){let c=t[a];if(c==""){if(a==t.length-1||a==0)continue;for(;l>=s;l--)if(o(a-1,l))return!0;return!1}else{let u=l>0||l==0&&i?this.nodes[l].type:r&&l>=s?r.node(l-s).type:null;if(!u||u.name!=c&&!u.isInGroup(c))return!1;l--}}return!0};return o(t.length-1,this.open)}textblockFromContext(){let e=this.options.context;if(e)for(let t=e.depth;t>=0;t--){let r=e.node(t).contentMatchAt(e.indexAfter(t)).defaultType;if(r&&r.isTextblock&&r.defaultAttrs)return r}for(let t in this.parser.schema.nodes){let r=this.parser.schema.nodes[t];if(r.isTextblock&&r.defaultAttrs)return r}}}function _g(n){for(let e=n.firstChild,t=null;e;e=e.nextSibling){let r=e.nodeType==1?e.nodeName.toLowerCase():null;r&&yd.hasOwnProperty(r)&&t?(t.appendChild(e),e=t):r=="li"?t=e:r&&(t=null)}}function zg(n,e){return(n.matches||n.msMatchesSelector||n.webkitMatchesSelector||n.mozMatchesSelector).call(n,e)}function Yl(n){let e={};for(let t in n)e[t]=n[t];return e}function Ql(n,e){let t=e.schema.nodes;for(let r in t){let i=t[r];if(!i.allowsMarkType(n))continue;let s=[],o=a=>{s.push(a);for(let l=0;l<a.edgeCount;l++){let{type:c,next:u}=a.edge(l);if(c==e||s.indexOf(u)<0&&o(u))return!0}};if(o(i.contentMatch))return!0}}class ur{constructor(e,t){this.nodes=e,this.marks=t}serializeFragment(e,t={},r){r||(r=Hi(t).createDocumentFragment());let i=r,s=[];return e.forEach(o=>{if(s.length||o.marks.length){let a=0,l=0;for(;a<s.length&&l<o.marks.length;){let c=o.marks[l];if(!this.marks[c.type.name]){l++;continue}if(!c.eq(s[a][0])||c.type.spec.spanning===!1)break;a++,l++}for(;a<s.length;)i=s.pop()[1];for(;l<o.marks.length;){let c=o.marks[l++],u=this.serializeMark(c,o.isInline,t);u&&(s.push([c,i]),i.appendChild(u.dom),i=u.contentDOM||u.dom)}}i.appendChild(this.serializeNodeInner(o,t))}),r}serializeNodeInner(e,t){if(e.isText)return Hi(t).createTextNode(e.text);let{dom:r,contentDOM:i}=rs(Hi(t),this.nodes[e.type.name](e),null,e.attrs);if(i){if(e.isLeaf)throw new RangeError("Content hole not allowed in a leaf node spec");this.serializeFragment(e.content,t,i)}return r}serializeNode(e,t={}){let r=this.serializeNodeInner(e,t);for(let i=e.marks.length-1;i>=0;i--){let s=this.serializeMark(e.marks[i],e.isInline,t);s&&((s.contentDOM||s.dom).appendChild(r),r=s.dom)}return r}serializeMark(e,t,r={}){let i=this.marks[e.type.name];return i&&rs(Hi(r),i(e,t),null,e.attrs)}static renderSpec(e,t,r=null,i){return typeof t=="string"?{dom:e.createTextNode(t)}:rs(e,t,r,i)}static fromSchema(e){return e.cached.domSerializer||(e.cached.domSerializer=new ur(this.nodesFromSchema(e),this.marksFromSchema(e)))}static nodesFromSchema(e){let t=Zl(e.nodes);return t.text||(t.text=r=>r.text),t}static marksFromSchema(e){return Zl(e.marks)}}function Zl(n){let e={};for(let t in n){let r=n[t].spec.toDOM;r&&(e[t]=r)}return e}function Hi(n){return n.document||window.document}const ec=new WeakMap;function $g(n){let e=ec.get(n);return e===void 0&&ec.set(n,e=Bg(n)),e}function Bg(n){let e=null;function t(r){if(r&&typeof r=="object")if(Array.isArray(r))if(typeof r[0]=="string")e||(e=[]),e.push(r);else for(let i=0;i<r.length;i++)t(r[i]);else for(let i in r)t(r[i])}return t(n),e}function rs(n,e,t,r){if(e.nodeType==1)return{dom:e};if(e.dom&&e.dom.nodeType==1)return e;let i=e[0],s;if(typeof i!="string")throw new RangeError("Invalid array passed to renderSpec");if(r&&(s=$g(r))&&s.indexOf(e)>-1)throw new RangeError("Using an array from an attribute object as a DOM spec. This may be an attempted cross site scripting attack.");let o=i.indexOf(" ");o>0&&(t=i.slice(0,o),i=i.slice(o+1));let a,l=t?n.createElementNS(t,i):n.createElement(i),c=e[1],u=1;if(c&&typeof c=="object"&&c.nodeType==null&&!Array.isArray(c)){u=2;for(let d in c)if(c[d]!=null){let f=d.indexOf(" ");f>0?l.setAttributeNS(d.slice(0,f),d.slice(f+1),c[d]):d=="style"&&l.style?l.style.cssText=c[d]:l.setAttribute(d,c[d])}}for(let d=u;d<e.length;d++){let f=e[d];if(f===0){if(d<e.length-1||d>u)throw new RangeError("Content hole must be the only child of its parent node");return{dom:l,contentDOM:l}}else if(typeof f=="string")l.appendChild(n.createTextNode(f));else{let{dom:h,contentDOM:p}=rs(n,f,t,r);if(l.appendChild(h),p){if(a)throw new RangeError("Multiple content holes");a=p}}}return{dom:l,contentDOM:a}}const bd=65535,vd=Math.pow(2,16);function Hg(n,e){return n+e*vd}function tc(n){return n&bd}function Fg(n){return(n-(n&bd))/vd}const kd=1,xd=2,is=4,wd=8;class aa{constructor(e,t,r){this.pos=e,this.delInfo=t,this.recover=r}get deleted(){return(this.delInfo&wd)>0}get deletedBefore(){return(this.delInfo&(kd|is))>0}get deletedAfter(){return(this.delInfo&(xd|is))>0}get deletedAcross(){return(this.delInfo&is)>0}}class Lt{constructor(e,t=!1){if(this.ranges=e,this.inverted=t,!e.length&&Lt.empty)return Lt.empty}recover(e){let t=0,r=tc(e);if(!this.inverted)for(let i=0;i<r;i++)t+=this.ranges[i*3+2]-this.ranges[i*3+1];return this.ranges[r*3]+t+Fg(e)}mapResult(e,t=1){return this._map(e,t,!1)}map(e,t=1){return this._map(e,t,!0)}_map(e,t,r){let i=0,s=this.inverted?2:1,o=this.inverted?1:2;for(let a=0;a<this.ranges.length;a+=3){let l=this.ranges[a]-(this.inverted?i:0);if(l>e)break;let c=this.ranges[a+s],u=this.ranges[a+o],d=l+c;if(e<=d){let f=c?e==l?-1:e==d?1:t:t,h=l+i+(f<0?0:u);if(r)return h;let p=e==(t<0?l:d)?null:Hg(a/3,e-l),g=0;return c&&(g|=e==l?xd:e==d?kd:is,(t<0?e!=l:e!=d)&&(g|=wd)),new aa(h,g,p)}i+=u-c}return r?e+i:new aa(e+i,0,null)}touches(e,t){let r=0,i=tc(t),s=this.inverted?2:1,o=this.inverted?1:2;for(let a=0;a<this.ranges.length;a+=3){let l=this.ranges[a]-(this.inverted?r:0);if(l>e)break;let c=this.ranges[a+s],u=l+c;if(e<=u&&a==i*3)return!0;r+=this.ranges[a+o]-c}return!1}forEach(e){let t=this.inverted?2:1,r=this.inverted?1:2;for(let i=0,s=0;i<this.ranges.length;i+=3){let o=this.ranges[i],a=o-(this.inverted?s:0),l=o+(this.inverted?0:s),c=this.ranges[i+t],u=this.ranges[i+r];e(a,a+c,l,l+u),s+=u-c}}invert(){return new Lt(this.ranges,!this.inverted)}toString(){return(this.inverted?"-":"")+JSON.stringify(this.ranges)}static offset(e){return e==0?Lt.empty:new Lt(e<0?[0,-e,0]:[0,0,e])}}Lt.empty=new Lt([]);class bi{constructor(e,t,r=0,i=e?e.length:0){this.mirror=t,this.from=r,this.to=i,this._maps=e||[],this.ownData=!(e||t)}get maps(){return this._maps}slice(e=0,t=this.maps.length){return new bi(this._maps,this.mirror,e,t)}appendMap(e,t){this.ownData||(this._maps=this._maps.slice(),this.mirror=this.mirror&&this.mirror.slice(),this.ownData=!0),this.to=this._maps.push(e),t!=null&&this.setMirror(this._maps.length-1,t)}appendMapping(e){for(let t=0,r=this._maps.length;t<e._maps.length;t++){let i=e.getMirror(t);this.appendMap(e._maps[t],i!=null&&i<t?r+i:void 0)}}getMirror(e){if(this.mirror){for(let t=0;t<this.mirror.length;t++)if(this.mirror[t]==e)return this.mirror[t+(t%2?-1:1)]}}setMirror(e,t){this.mirror||(this.mirror=[]),this.mirror.push(e,t)}appendMappingInverted(e){for(let t=e.maps.length-1,r=this._maps.length+e._maps.length;t>=0;t--){let i=e.getMirror(t);this.appendMap(e._maps[t].invert(),i!=null&&i>t?r-i-1:void 0)}}invert(){let e=new bi;return e.appendMappingInverted(this),e}map(e,t=1){if(this.mirror)return this._map(e,t,!0);for(let r=this.from;r<this.to;r++)e=this._maps[r].map(e,t);return e}mapResult(e,t=1){return this._map(e,t,!1)}_map(e,t,r){let i=0;for(let s=this.from;s<this.to;s++){let o=this._maps[s],a=o.mapResult(e,t);if(a.recover!=null){let l=this.getMirror(s);if(l!=null&&l>s&&l<this.to){s=l,e=this._maps[l].recover(a.recover);continue}}i|=a.delInfo,e=a.pos}return r?e:new aa(e,i,null)}}const Oo=Object.create(null);class Mt{getMap(){return Lt.empty}merge(e){return null}static fromJSON(e,t){if(!t||!t.stepType)throw new RangeError("Invalid input for Step.fromJSON");let r=Oo[t.stepType];if(!r)throw new RangeError(`No step type ${t.stepType} defined`);return r.fromJSON(e,t)}static jsonID(e,t){if(e in Oo)throw new RangeError("Duplicate use of step JSON ID "+e);return Oo[e]=t,t.prototype.jsonID=e,t}}class rt{constructor(e,t){this.doc=e,this.failed=t}static ok(e){return new rt(e,null)}static fail(e){return new rt(null,e)}static fromReplace(e,t,r,i){try{return rt.ok(e.replace(t,r,i))}catch(s){if(s instanceof mi)return rt.fail(s.message);throw s}}}function $a(n,e,t){let r=[];for(let i=0;i<n.childCount;i++){let s=n.child(i);s.content.size&&(s=s.copy($a(s.content,e,s))),s.isInline&&(s=e(s,t,i)),r.push(s)}return M.fromArray(r)}class Dn extends Mt{constructor(e,t,r){super(),this.from=e,this.to=t,this.mark=r}apply(e){let t=e.slice(this.from,this.to),r=e.resolve(this.from),i=r.node(r.sharedDepth(this.to)),s=new H($a(t.content,(o,a)=>!o.isAtom||!a.type.allowsMarkType(this.mark.type)?o:o.mark(this.mark.addToSet(o.marks)),i),t.openStart,t.openEnd);return rt.fromReplace(e,this.from,this.to,s)}invert(){return new Gt(this.from,this.to,this.mark)}map(e){let t=e.mapResult(this.from,1),r=e.mapResult(this.to,-1);return t.deleted&&r.deleted||t.pos>=r.pos?null:new Dn(t.pos,r.pos,this.mark)}merge(e){return e instanceof Dn&&e.mark.eq(this.mark)&&this.from<=e.to&&this.to>=e.from?new Dn(Math.min(this.from,e.from),Math.max(this.to,e.to),this.mark):null}toJSON(){return{stepType:"addMark",mark:this.mark.toJSON(),from:this.from,to:this.to}}static fromJSON(e,t){if(typeof t.from!="number"||typeof t.to!="number")throw new RangeError("Invalid input for AddMarkStep.fromJSON");return new Dn(t.from,t.to,e.markFromJSON(t.mark))}}Mt.jsonID("addMark",Dn);class Gt extends Mt{constructor(e,t,r){super(),this.from=e,this.to=t,this.mark=r}apply(e){let t=e.slice(this.from,this.to),r=new H($a(t.content,i=>i.mark(this.mark.removeFromSet(i.marks)),e),t.openStart,t.openEnd);return rt.fromReplace(e,this.from,this.to,r)}invert(){return new Dn(this.from,this.to,this.mark)}map(e){let t=e.mapResult(this.from,1),r=e.mapResult(this.to,-1);return t.deleted&&r.deleted||t.pos>=r.pos?null:new Gt(t.pos,r.pos,this.mark)}merge(e){return e instanceof Gt&&e.mark.eq(this.mark)&&this.from<=e.to&&this.to>=e.from?new Gt(Math.min(this.from,e.from),Math.max(this.to,e.to),this.mark):null}toJSON(){return{stepType:"removeMark",mark:this.mark.toJSON(),from:this.from,to:this.to}}static fromJSON(e,t){if(typeof t.from!="number"||typeof t.to!="number")throw new RangeError("Invalid input for RemoveMarkStep.fromJSON");return new Gt(t.from,t.to,e.markFromJSON(t.mark))}}Mt.jsonID("removeMark",Gt);class In extends Mt{constructor(e,t){super(),this.pos=e,this.mark=t}apply(e){let t=e.nodeAt(this.pos);if(!t)return rt.fail("No node at mark step's position");let r=t.type.create(t.attrs,null,this.mark.addToSet(t.marks));return rt.fromReplace(e,this.pos,this.pos+1,new H(M.from(r),0,t.isLeaf?0:1))}invert(e){let t=e.nodeAt(this.pos);if(t){let r=this.mark.addToSet(t.marks);if(r.length==t.marks.length){for(let i=0;i<t.marks.length;i++)if(!t.marks[i].isInSet(r))return new In(this.pos,t.marks[i]);return new In(this.pos,this.mark)}}return new sr(this.pos,this.mark)}map(e){let t=e.mapResult(this.pos,1);return t.deletedAfter?null:new In(t.pos,this.mark)}toJSON(){return{stepType:"addNodeMark",pos:this.pos,mark:this.mark.toJSON()}}static fromJSON(e,t){if(typeof t.pos!="number")throw new RangeError("Invalid input for AddNodeMarkStep.fromJSON");return new In(t.pos,e.markFromJSON(t.mark))}}Mt.jsonID("addNodeMark",In);class sr extends Mt{constructor(e,t){super(),this.pos=e,this.mark=t}apply(e){let t=e.nodeAt(this.pos);if(!t)return rt.fail("No node at mark step's position");let r=t.type.create(t.attrs,null,this.mark.removeFromSet(t.marks));return rt.fromReplace(e,this.pos,this.pos+1,new H(M.from(r),0,t.isLeaf?0:1))}invert(e){let t=e.nodeAt(this.pos);return!t||!this.mark.isInSet(t.marks)?this:new In(this.pos,this.mark)}map(e){let t=e.mapResult(this.pos,1);return t.deletedAfter?null:new sr(t.pos,this.mark)}toJSON(){return{stepType:"removeNodeMark",pos:this.pos,mark:this.mark.toJSON()}}static fromJSON(e,t){if(typeof t.pos!="number")throw new RangeError("Invalid input for RemoveNodeMarkStep.fromJSON");return new sr(t.pos,e.markFromJSON(t.mark))}}Mt.jsonID("removeNodeMark",sr);class Qe extends Mt{constructor(e,t,r,i=!1){super(),this.from=e,this.to=t,this.slice=r,this.structure=i}apply(e){return this.structure&&la(e,this.from,this.to)?rt.fail("Structure replace would overwrite content"):rt.fromReplace(e,this.from,this.to,this.slice)}getMap(){return new Lt([this.from,this.to-this.from,this.slice.size])}invert(e){return new Qe(this.from,this.from+this.slice.size,e.slice(this.from,this.to))}map(e){let t=e.mapResult(this.to,-1),r=this.from==this.to&&Qe.MAP_BIAS<0?t:e.mapResult(this.from,1);return r.deletedAcross&&t.deletedAcross?null:new Qe(r.pos,Math.max(r.pos,t.pos),this.slice,this.structure)}merge(e){if(!(e instanceof Qe)||e.structure||this.structure)return null;if(this.from+this.slice.size==e.from&&!this.slice.openEnd&&!e.slice.openStart){let t=this.slice.size+e.slice.size==0?H.empty:new H(this.slice.content.append(e.slice.content),this.slice.openStart,e.slice.openEnd);return new Qe(this.from,this.to+(e.to-e.from),t,this.structure)}else if(e.to==this.from&&!this.slice.openStart&&!e.slice.openEnd){let t=this.slice.size+e.slice.size==0?H.empty:new H(e.slice.content.append(this.slice.content),e.slice.openStart,this.slice.openEnd);return new Qe(e.from,this.to,t,this.structure)}else return null}toJSON(){let e={stepType:"replace",from:this.from,to:this.to};return this.slice.size&&(e.slice=this.slice.toJSON()),this.structure&&(e.structure=!0),e}static fromJSON(e,t){if(typeof t.from!="number"||typeof t.to!="number")throw new RangeError("Invalid input for ReplaceStep.fromJSON");return new Qe(t.from,t.to,H.fromJSON(e,t.slice),!!t.structure)}}Qe.MAP_BIAS=1;Mt.jsonID("replace",Qe);class ft extends Mt{constructor(e,t,r,i,s,o,a=!1){super(),this.from=e,this.to=t,this.gapFrom=r,this.gapTo=i,this.slice=s,this.insert=o,this.structure=a}apply(e){if(this.structure&&(la(e,this.from,this.gapFrom)||la(e,this.gapTo,this.to)))return rt.fail("Structure gap-replace would overwrite content");let t=e.slice(this.gapFrom,this.gapTo);if(t.openStart||t.openEnd)return rt.fail("Gap is not a flat range");let r=this.slice.insertAt(this.insert,t.content);return r?rt.fromReplace(e,this.from,this.to,r):rt.fail("Content does not fit in gap")}getMap(){return new Lt([this.from,this.gapFrom-this.from,this.insert,this.gapTo,this.to-this.gapTo,this.slice.size-this.insert])}invert(e){let t=this.gapTo-this.gapFrom;return new ft(this.from,this.from+this.slice.size+t,this.from+this.insert,this.from+this.insert+t,e.slice(this.from,this.to).removeBetween(this.gapFrom-this.from,this.gapTo-this.from),this.gapFrom-this.from,this.structure)}map(e){let t=e.mapResult(this.from,1),r=e.mapResult(this.to,-1),i=this.from==this.gapFrom?t.pos:e.map(this.gapFrom,-1),s=this.to==this.gapTo?r.pos:e.map(this.gapTo,1);return t.deletedAcross&&r.deletedAcross||i<t.pos||s>r.pos?null:new ft(t.pos,r.pos,i,s,this.slice,this.insert,this.structure)}toJSON(){let e={stepType:"replaceAround",from:this.from,to:this.to,gapFrom:this.gapFrom,gapTo:this.gapTo,insert:this.insert};return this.slice.size&&(e.slice=this.slice.toJSON()),this.structure&&(e.structure=!0),e}static fromJSON(e,t){if(typeof t.from!="number"||typeof t.to!="number"||typeof t.gapFrom!="number"||typeof t.gapTo!="number"||typeof t.insert!="number")throw new RangeError("Invalid input for ReplaceAroundStep.fromJSON");return new ft(t.from,t.to,t.gapFrom,t.gapTo,H.fromJSON(e,t.slice),t.insert,!!t.structure)}}Mt.jsonID("replaceAround",ft);function la(n,e,t){let r=n.resolve(e),i=t-e,s=r.depth;for(;i>0&&s>0&&r.indexAfter(s)==r.node(s).childCount;)s--,i--;if(i>0){let o=r.node(s).maybeChild(r.indexAfter(s));for(;i>0;){if(!o||o.isLeaf)return!0;o=o.firstChild,i--}}return!1}function Vg(n,e,t,r){let i=[],s=[],o,a;n.doc.nodesBetween(e,t,(l,c,u)=>{if(!l.isInline)return;let d=l.marks;if(!r.isInSet(d)&&u.type.allowsMarkType(r.type)){let f=Math.max(c,e),h=Math.min(c+l.nodeSize,t),p=r.addToSet(d);for(let g=0;g<d.length;g++)d[g].isInSet(p)||(o&&o.to==f&&o.mark.eq(d[g])?o.to=h:i.push(o=new Gt(f,h,d[g])));a&&a.to==f?a.to=h:s.push(a=new Dn(f,h,r))}}),i.forEach(l=>n.step(l)),s.forEach(l=>n.step(l))}function Wg(n,e,t,r){let i=[],s=0;n.doc.nodesBetween(e,t,(o,a)=>{if(!o.isInline)return;s++;let l=null;if(r instanceof eo){let c=o.marks,u;for(;u=r.isInSet(c);)(l||(l=[])).push(u),c=u.removeFromSet(c)}else r?r.isInSet(o.marks)&&(l=[r]):l=o.marks;if(l&&l.length){let c=Math.min(a+o.nodeSize,t);for(let u=0;u<l.length;u++){let d=l[u],f;for(let h=0;h<i.length;h++){let p=i[h];p.step==s-1&&d.eq(i[h].style)&&(f=p)}f?(f.to=c,f.step=s):i.push({style:d,from:Math.max(a,e),to:c,step:s})}}}),i.forEach(o=>n.step(new Gt(o.from,o.to,o.style)))}function Ba(n,e,t,r=t.contentMatch,i=!0){let s=n.doc.nodeAt(e),o=[],a=e+1;for(let l=0;l<s.childCount;l++){let c=s.child(l),u=a+c.nodeSize,d=r.matchType(c.type);if(!d)o.push(new Qe(a,u,H.empty));else{r=d;for(let f=0;f<c.marks.length;f++)t.allowsMarkType(c.marks[f].type)||n.step(new Gt(a,u,c.marks[f]));if(i&&c.isText&&t.whitespace!="pre"){let f,h=/\r?\n|\r/g,p;for(;f=h.exec(c.text);)p||(p=new H(M.from(t.schema.text(" ",t.allowedMarks(c.marks))),0,0)),o.push(new Qe(a+f.index,a+f.index+f[0].length,p))}}a=u}if(!r.validEnd){let l=r.fillBefore(M.empty,!0);n.replace(a,a,new H(l,0,0))}for(let l=o.length-1;l>=0;l--)n.step(o[l])}function jg(n,e,t){return(e==0||n.canReplace(e,n.childCount))&&(t==n.childCount||n.canReplace(0,t))}function $r(n){let t=n.parent.content.cutByIndex(n.startIndex,n.endIndex);for(let r=n.depth,i=0,s=0;;--r){let o=n.$from.node(r),a=n.$from.index(r)+i,l=n.$to.indexAfter(r)-s;if(r<n.depth&&o.canReplace(a,l,t))return r;if(r==0||o.type.spec.isolating||!jg(o,a,l))break;a&&(i=1),l<o.childCount&&(s=1)}return null}function Kg(n,e,t){let{$from:r,$to:i,depth:s}=e,o=r.before(s+1),a=i.after(s+1),l=o,c=a,u=M.empty,d=0;for(let p=s,g=!1;p>t;p--)g||r.index(p)>0?(g=!0,u=M.from(r.node(p).copy(u)),d++):l--;let f=M.empty,h=0;for(let p=s,g=!1;p>t;p--)g||i.after(p+1)<i.end(p)?(g=!0,f=M.from(i.node(p).copy(f)),h++):c++;n.step(new ft(l,c,o,a,new H(u.append(f),d,h),u.size-d,!0))}function Ha(n,e,t=null,r=n){let i=Ug(n,e),s=i&&qg(r,e);return s?i.map(nc).concat({type:e,attrs:t}).concat(s.map(nc)):null}function nc(n){return{type:n,attrs:null}}function Ug(n,e){let{parent:t,startIndex:r,endIndex:i}=n,s=t.contentMatchAt(r).findWrapping(e);if(!s)return null;let o=s.length?s[0]:e;return t.canReplaceWith(r,i,o)?s:null}function qg(n,e){let{parent:t,startIndex:r,endIndex:i}=n,s=t.child(r),o=e.contentMatch.findWrapping(s.type);if(!o)return null;let l=(o.length?o[o.length-1]:e).contentMatch;for(let c=r;l&&c<i;c++)l=l.matchType(t.child(c).type);return!l||!l.validEnd?null:o}function Jg(n,e,t){let r=M.empty;for(let o=t.length-1;o>=0;o--){if(r.size){let a=t[o].type.contentMatch.matchFragment(r);if(!a||!a.validEnd)throw new RangeError("Wrapper type given to Transform.wrap does not form valid content of its parent wrapper")}r=M.from(t[o].type.create(t[o].attrs,r))}let i=e.start,s=e.end;n.step(new ft(i,s,i,s,new H(r,0,0),t.length,!0))}function Gg(n,e,t,r,i){if(!r.isTextblock)throw new RangeError("Type given to setBlockType should be a textblock");let s=n.steps.length;n.doc.nodesBetween(e,t,(o,a)=>{let l=typeof i=="function"?i(o):i;if(o.isTextblock&&!o.hasMarkup(r,l)&&Xg(n.doc,n.mapping.slice(s).map(a),r)){let c=null;if(r.schema.linebreakReplacement){let h=r.whitespace=="pre",p=!!r.contentMatch.matchType(r.schema.linebreakReplacement);h&&!p?c=!1:!h&&p&&(c=!0)}c===!1&&Cd(n,o,a,s),Ba(n,n.mapping.slice(s).map(a,1),r,void 0,c===null);let u=n.mapping.slice(s),d=u.map(a,1),f=u.map(a+o.nodeSize,1);return n.step(new ft(d,f,d+1,f-1,new H(M.from(r.create(l,null,o.marks)),0,0),1,!0)),c===!0&&Sd(n,o,a,s),!1}})}function Sd(n,e,t,r){e.forEach((i,s)=>{if(i.isText){let o,a=/\r?\n|\r/g;for(;o=a.exec(i.text);){let l=n.mapping.slice(r).map(t+1+s+o.index);n.replaceWith(l,l+1,e.type.schema.linebreakReplacement.create())}}})}function Cd(n,e,t,r){e.forEach((i,s)=>{if(i.type==i.type.schema.linebreakReplacement){let o=n.mapping.slice(r).map(t+1+s);n.replaceWith(o,o+1,e.type.schema.text(`
@@ -170,4 +170,4 @@ ${t}
170
170
  `,pasteChip:()=>" "}}function ze(b,E){return ol(b.state.doc,{from:0,to:E},{blockSeparator:`
171
171
 
172
172
  `,textSerializers:Ge(b)}).replace(/\u00A0/g," ")}function ce(b){return ze(b,b.state.doc.content.size)}function Re(b){return ze(b,b.state.selection.from)}function pt(b,E){const R=ce(b),Z=iM(R,Re(b).length);(!Z||Z.from!==m(te)?.from)&&(fe(ke,null),fe($e,null)),fe(te,Z,!0),Z&&E?.dismissNewContext&&fe(ke,m(ot),!0)}function fr(){fe($e,m(te)?.from??null,!0)}function Ml(b){b.preventDefault()}function fp(b){if(!m(T)||!m(te))return;const E=ce(m(T)),R=Re(m(T)).length,Z={from:m(T).state.selection.from-m(te).query.length-1,to:m(T).state.selection.from+m(te).to-R},z=m(te).to===E.length||!/^\s/u.test(E.slice(m(te).to)),A=[{type:"skillCommand",attrs:{name:b.name}},...z?[{type:"text",text:" "}]:[]];m(T).chain().focus().insertContentAt(Z,A).setTextSelection(Z.from+2).run()}function Br(b){const E=VC(b,w().map(R=>R.name));return ye()?KS(E,ye()):E}function hp(b){if(!m(Ae)||!m(vt))return!1;const E=!b.shiftKey&&!b.metaKey&&!b.ctrlKey&&!b.altKey&&["ArrowUp","ArrowDown","Enter"].includes(b.key);return b.key!=="Escape"&&!E?!1:m(vt).onKeyDown({event:b})?!0:b.key==="Enter"?(b.preventDefault(),!0):!1}function pp(){m(T)&&m(T).view&&m(T).chain().focus().insertContent("@").run()}function mp(b){return m(T)&&m(T).view?(m(T).chain().focus().insertContent(b).run(),!0):!1}function gp(){if(f())return!1;if(m(T)&&m(T).view)try{if(m(T).view.hasFocus())return!0;const b=m(T),E=document.activeElement;return requestAnimationFrame(()=>{if(m(T)!==b||b.isDestroyed||f()||b.view.hasFocus())return;const R=document.activeElement;R!==E&&R instanceof HTMLElement&&qp(R)&&!b.view.dom.contains(R)||(b.view.focus(),b.commands.scrollIntoView())}),typeof m(T).view.hasFocus=="function"?m(T).view.hasFocus():!0}catch(b){i.debug("[TipTapEditor] Editor not ready for focus:",b)}return!1}function yp(){if(f())return!1;if(m(T)&&m(T).view)try{return m(T).chain().focus("end").run(),!0}catch(b){i.debug("[TipTapEditor] Editor not ready for focusEnd:",b)}return!1}function bp(){if(f())return!1;if(m(T)&&m(T).view)try{return m(T).chain().focus().selectAll().run(),!0}catch(b){i.debug("[TipTapEditor] Editor not ready for focusAndSelectAll:",b)}return!1}function vp(){try{return m(T)?.getHTML?.()??""}catch(b){return i.error("[TipTapEditor] Error getting HTML:",b),m(T)?.getText?.()??""}}function kp(){m(T)&&(Zt=!0,m(T).commands.clearContent(!0),Zt=!1)}async function xp(b){if(!m(T))return;const E=Br(b||"");ws(E,m(T).schema).eq(m(T).state.doc)||m(T).chain().command(({tr:R})=>(R.setMeta("external-update",!0),!0)).setContent(E).run()}function wp(b,E){m(T)&&m(T).view&&m(T).chain().focus().setImage({src:b,alt:E||""}).createParagraphNear().focus().run()}function Sp(){if(!m(T))return i.warn("TipTapEditor: getInlineImages called but editor is not initialized"),[];const b=[];return m(T).state.doc.descendants(E=>{if(E.type.name==="image"){const R=E.attrs.src;R&&R.startsWith("data:")&&b.push({src:R,alt:E.attrs.alt||void 0})}return!0}),i.debug("TipTapEditor: Extracted inline images",{imageCount:b.length,imageSources:b.map(E=>({alt:E.alt,srcLength:E.src?.length||0}))}),b}function Cp(){return br(m(T))}function Mp(b){if(i.debug("TipTapEditor: insertContextMention called",{hasEditor:!!m(T),hasEditorView:!!m(T)?.view,attrs:{itemType:b.itemType,identifier:b.identifier,title:b.title}}),m(T)&&m(T).view){const E=m(T).chain().focus().insertContextMention(b).run();return i.debug("TipTapEditor: insertContextMention result",{result:E}),E}return i.warn("TipTapEditor: insertContextMention failed - no editor"),!1}function Ep(b){if(!m(T)||!m(T).view)return i.warn("TipTapEditor: insertMention called but editor is not initialized"),!1;try{return m(T).chain().focus().insertContent({type:"mention",attrs:{id:b.id,label:b.label,type:b.type,uri:b.uri,meta:b.meta||{}}}).insertContent(" ").run(),!0}catch(E){return i.error("TipTapEditor: insertMention failed",E),!1}}function Tp(){if(!m(T))return i.warn("TipTapEditor: getMentions called but editor is not initialized"),[];const b=[];return m(T).state.doc.descendants(E=>(E.type.name==="mention"&&b.push({id:E.attrs.id,label:E.attrs.label,type:E.attrs.type||"file",uri:E.attrs.uri||"",meta:E.attrs.meta||{}}),!0)),i.debug("TipTapEditor: Extracted mentions",{mentionCount:b.length,types:b.map(E=>E.type)}),b}function Ap(){if(!m(T))return i.warn("TipTapEditor: getContextMentions called but editor is not initialized"),[];const b=[];return m(T).state.doc.descendants(E=>{if(E.type.name==="contextMention"){const R=E.attrs;b.push({itemType:R.itemType,provider:R.provider,title:R.title,url:R.url,identifier:R.identifier,contextId:R.contextId,description:R.description,metadata:R.metadata})}return!0}),i.debug("TipTapEditor: Extracted context mentions",{mentionCount:b.length}),b}const Pi={char:"@",pluginKey:new Fe("mention"),items:async({query:b})=>{if(i.debug("Mention query:",b),_()?.(b),!g()&&y()){i.debug("No workspace but repoPath available, using async search:",y());const R={workspaceId:void 0,repoPath:y(),currentFile:void 0,currentNote:void 0,recentFiles:[]};try{const Z=await s.search(b,R);return i.debug("Mention search results from repoPath:",Z.length),Z}catch(Z){i.error("Failed to search mentions with repoPath:",Z);const z=s.searchSync(b,R);return i.debug("Fallback sync search results:",z.length),z}}if(!g())return i.debug("No workspace and no repoPath - returning empty results"),[];const E={workspaceId:g().id,currentFile:void 0,currentNote:void 0,recentFiles:[]};try{const R=await s.search(b,E);return i.debug("Mention search results:",R.length),R}catch(R){return i.error("Failed to search mentions:",R),[]}},render:()=>xC(Ie),command:({editor:b,range:E,props:R})=>{const Z={id:R.id,label:R.label,type:R.type,uri:R.uri,meta:R.meta||{}};b.view&&b.chain().focus().deleteRange(E).insertContent({type:"mention",attrs:Z}).run(),V()?.(R)}};$u(()=>{let b=!1;return(async()=>{const E=Br(o()||"");if(b)return;const R=m(Je);if(!R)return;fe(T,new k1({element:R,extensions:[...ye()?[WS.configure({references:()=>ye()??[]}),jS]:[],Kw.configure({heading:!1,codeBlock:!1,horizontalRule:!1,link:!1,bulletList:!1,orderedList:!1,listItem:!1,code:!1,bold:!1,italic:!1,strike:!1,blockquote:!1,dropcursor:!1}),up({openOnClick:!1,linkOnPaste:!0,shouldAutoLink:z=>/^https?:\/\//.test(z)||z.startsWith("intent://"),HTMLAttributes:{class:"text-primary-ink underline"}}),Uw.configure({placeholder:c()?({editor:z})=>On.getState(z.state)?.parts.length?"":l():l(),emptyEditorClass:"is-editor-empty text-subtle",showOnlyWhenEditable:!1}),hS.configure({inline:!1,allowBase64:!0,HTMLAttributes:{class:"chat-inline-image"}}),xS.configure({workspaceId:g()?.id}),r.configure({HTMLAttributes:{class:"mention-chip"},suggestion:Pi,renderHTML({node:z}){const A=Vm(z.attrs,g()?.id,Wm);return["span",{"data-mention":"true","data-type":z.attrs.type||"file","data-uri":z.attrs.uri||"","data-meta":JSON.stringify(z.attrs.meta||{}),"data-id":z.attrs.id,"data-label":z.attrs.label,class:"mention-chip",tabindex:"0"},A]},renderText:({node:z})=>{const A=z.attrs||{};try{return rg({type:A.type,id:A.id,label:A.label,meta:A.meta})}catch{return`@${A?.meta?.fullPath||A?.meta?.path||A?.label||A?.id||"item"}`}}}),$S.extend({renderText:({node:z})=>{const A=z.attrs||{},Ne=JSON.stringify({provider:A.provider||"browser",identifier:A.identifier||"",title:A.title||"",url:A.url||"",description:A.description||"",metadata:A.metadata||"",itemType:A.itemType||""});return`@context[${btoa(unescape(encodeURIComponent(Ne)))}]`}}),VS,XS,XC],content:E,editable:m(je),enableCoreExtensions:{delete:!1},onCreate:({editor:z})=>{pt(z),v()&&requestAnimationFrame(()=>{if(z.isDestroyed)return;z.view.dom?.focus({preventScroll:!0})})},onTransaction:({transaction:z})=>{z.docChanged&&Se&&Te&&(Mn(Se),tt?.(),tt=void 0,Te.remove(),Se=null,Te=null)},onUpdate:({editor:z,transaction:A})=>{if(A.getMeta("external-update")||A.getMeta(Cl)||Zt)return;const Ne=O()?GS(A):null;Ne&&O()?.(Ne);const Ke=br(z);pt(z,{dismissNewContext:A.getMeta("uiEvent")==="paste"}),A.getMeta(ko)?x()?.(Ke,{programmatic:!0}):x()?.(Ke)},onSelectionUpdate:({editor:z,transaction:A})=>{pt(z,{dismissNewContext:A.getMeta("uiEvent")==="paste"});const{from:Ne,to:Ke,empty:q}=z.state.selection;if(q)F()?.(null);else{const Le=z.state.doc.textBetween(Ne,Ke," ");F()?.(Le.trim()||null)}},onFocus:({editor:z})=>{Kn(()=>{fe(an,!0),pt(z)})},onBlur:()=>{Kn(()=>{fe(an,!1)})},editorProps:{handleDOMEvents:{compositionstart:()=>(Kn(()=>{fe(st,!0)}),qe()?.(!0),!1),compositionend:()=>(queueMicrotask(()=>{queueMicrotask(()=>{!m(T)||m(T).isDestroyed||(Kn(()=>{fe(st,!1)}),qe()?.(!1),zt())})}),!1),beforeinput:()=>(nt()?.(),!1)},attributes:{class:`tiptap-editor ${p()}`,role:"textbox","aria-multiline":"true","aria-label":a(),autocomplete:"off",spellcheck:"false",autocorrect:"off",autocapitalize:"off"},handlePaste:(z,A)=>{if(QS(A))return!0;const Ne=A.clipboardData?.getData("text/plain");if(Ne){const Ke=Ne.split(`
173
- `);if(Ke.length>=5){const{state:Le,dispatch:at}=z,Xe=Le.schema.nodes.pasteChip.create({content:Ne,lineCount:Ke.length}),$t=Le.tr.replaceSelectionWith(Xe).setMeta("uiEvent","paste");return at($t),!0}const q=A.clipboardData?.getData("text/html");if(q&&KC(q,Ne))return z.dispatch(z.state.tr.insertText(Ne).scrollIntoView().setMeta("uiEvent","paste")),!0;if(/\r|\n/.test(Ne)){const{state:Le,dispatch:at}=z,Xe=WC(Le.schema,Ne);if(Xe.length>0){const $t=new H(M.from(Xe),1,1);return at(Le.tr.replaceSelection($t).scrollIntoView().setMeta("uiEvent","paste")),!0}}}return!1},handleDrop:(z,A)=>YS(A),handleKeyDown:(z,A)=>{if(z.composing||A.isComposing||A.keyCode===229)return!1;if(hp(A))return!0;if(A.key==="Escape"&&$())return A.preventDefault(),$()(),!0;const Ne=typeof navigator<"u"&&navigator.platform.toUpperCase().includes("MAC"),Ke=q=>dg(A,Fl(q),Ne);if(Ke("chat.mention-context")&&Fl("chat.mention-context")!=="@")return A.preventDefault(),m(T)?.chain().focus().insertContent("@").run(),!0;if(Ne&&A.ctrlKey&&!A.metaKey){if(A.key==="a"){A.preventDefault();const{state:q,dispatch:Le}=z,Xe=q.selection.$head.start();return Le(q.tr.setSelection(W.create(q.doc,Xe))),!0}if(A.key==="e"){A.preventDefault();const{state:q,dispatch:Le}=z,Xe=q.selection.$head.end();return Le(q.tr.setSelection(W.create(q.doc,Xe))),!0}if(A.key==="k"){A.preventDefault();const{state:q,dispatch:Le}=z,at=q.selection.$head,Xe=at.pos,$t=at.end();return Xe<$t&&Le(q.tr.delete(Xe,$t)),!0}if(A.key==="p"){A.preventDefault();const q=window.getSelection();return q&&q.rangeCount>0&&q.modify("move","backward","line"),!0}if(A.key==="n"){A.preventDefault();const q=window.getSelection();return q&&q.rangeCount>0&&q.modify("move","forward","line"),!0}if(A.key==="f"){A.preventDefault();const q=window.getSelection();return q&&q.rangeCount>0&&q.modify("move","forward","character"),!0}if(A.key==="b"){A.preventDefault();const q=window.getSelection();return q&&q.rangeCount>0&&q.modify("move","backward","character"),!0}}if(A.metaKey&&!A.ctrlKey&&!A.altKey){if(A.key==="ArrowLeft"){A.preventDefault();const q=window.getSelection();return q&&q.rangeCount>0&&q.modify(A.shiftKey?"extend":"move","backward","lineboundary"),!0}if(A.key==="ArrowRight"){A.preventDefault();const q=window.getSelection();return q&&q.rangeCount>0&&q.modify(A.shiftKey?"extend":"move","forward","lineboundary"),!0}if(A.key==="ArrowUp"){A.preventDefault();const{state:q,dispatch:Le}=z,at=1;if(A.shiftKey){const{from:Xe}=q.selection;Le(q.tr.setSelection(W.create(q.doc,at,Xe)))}else Le(q.tr.setSelection(W.create(q.doc,at)));return!0}if(A.key==="ArrowDown"){A.preventDefault();const{state:q,dispatch:Le}=z,at=q.doc.content.size-1;if(A.shiftKey){const{to:Xe}=q.selection;Le(q.tr.setSelection(W.create(q.doc,Xe,at)))}else Le(q.tr.setSelection(W.create(q.doc,at)));return!0}}if(Ke("chat.force-send"))return A.preventDefault(),k()?.(),!0;if(Ke("chat.new-line"))return A.preventDefault(),m(T)?.chain().setHardBreak().scrollIntoView().run(),!0;if(A.key==="ArrowUp"&&I()&&!A.shiftKey&&!A.metaKey&&!A.ctrlKey){if(Pi.pluginKey.getState(z.state)?.active)return!1;const{state:Le}=z,{from:at}=Le.selection,Xe=at<=1,$t=Le.doc.textContent.length===0;if(Xe||$t){const Wn=I()();if(Wn!==null)return A.preventDefault(),m(T)?.chain().setContent(Br(Wn)).focus("end").run(),x()?.(Wn),!0}}if(A.key==="ArrowDown"&&C()&&!A.shiftKey&&!A.metaKey&&!A.ctrlKey){if(Pi.pluginKey.getState(z.state)?.active)return!1;const{state:Le}=z,{to:at}=Le.selection,Xe=Le.doc.content.size-1,$t=at>=Xe,Wn=Le.doc.textContent.length===0;if($t||Wn){const Hr=C()();if(Hr!==null)return A.preventDefault(),m(T)?.chain().setContent(Br(Hr)).focus("end").run(),x()?.(Hr),!0}}return Ke("chat.send")?Pi.pluginKey.getState(z.state)?.active?!1:S()?(A.preventDefault(),S()(),!0):!1:!1}}}),!0),R.addEventListener("mouseover",El),R.addEventListener("mouseout",Tl),R.addEventListener("click",Nl),m(T).view.dom.addEventListener("keydown",Ol)})(),()=>{b=!0}});function El(b){const E=b.target,R=Ll(E);if(R){const Z=E.getBoundingClientRect();if(!Te){Te=document.createElement("div"),(Ie?.target()??document.body).appendChild(Te);const z=R.type||"file",A=R.label||E.textContent||"",Ne={file:"📄",folder:"📁",note:"📝",rule:"⚙️",personality:"🎭",command:"⌘",terminal:"💻",member:"👤"};Se=Zr(op,{target:Te,props:{mention:{id:R.id,type:z,label:A,uri:R.uri,meta:R.meta,icon:Ne[z]||"📄"},position:{x:Z.left,y:Z.bottom+5},onClose:()=>{Se&&Te&&(Mn(Se),tt?.(),tt=void 0,Te.remove(),Se=null,Te=null)}}});const Ke=Te.firstElementChild;Ke instanceof HTMLElement&&(tt=Ie?.register(Ke,Qt)),Te.addEventListener("mouseout",Al)}}}function Tl(b){const E=b.target;b.relatedTarget?.closest(".mention-hover-preview")||E.hasAttribute("data-mention")&&Se&&Te&&(Mn(Se),tt?.(),tt=void 0,Te.remove(),Se=null,Te=null)}function Al(b){b.relatedTarget?.closest("[data-mention]")||Se&&Te&&(Mn(Se),tt?.(),tt=void 0,Te.remove(),Se=null,Te=null)}async function Nl(b){const E=Ll(b.target);if(E&&E.type!=="member"){if(E.intentUrl){b.preventDefault(),b.stopPropagation();const{handleIntentLink:R}=await zi(async()=>{const{handleIntentLink:Z}=await import("./ChcqjzlK.js");return{handleIntentLink:Z}},__vite__mapDeps([0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20,21,22,23,24,25,26,27,28,29,30,31,32,33,34,35,36]),import.meta.url);await R(E.intentUrl);return}if(E.type==="note"&&E.note){if(b.preventDefault(),b.stopPropagation(),E.note.workspaceId){const{handleIntentLink:R}=await zi(async()=>{const{handleIntentLink:Z}=await import("./ChcqjzlK.js");return{handleIntentLink:Z}},__vite__mapDeps([0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20,21,22,23,24,25,26,27,28,29,30,31,32,33,34,35,36]),import.meta.url);await R(ig(E.note.id,E.note.workspaceId))}else{const{navigateToNote:R}=await zi(async()=>{const{navigateToNote:Z}=await import("./UdBW3xHf.js").then(z=>z.h);return{navigateToNote:Z}},__vite__mapDeps([37,38,2,39,40,41,32,15,5,1,21,22,23,24,8,25,4,27,17,6,7,9,12,33,13,14,16,34,19,36,42,43,44]),import.meta.url);await R(E.note.id)}return}if(E.type==="file"&&E.filePath){b.preventDefault(),b.stopPropagation();const{navigateToFile:R}=await zi(async()=>{const{navigateToFile:Z}=await import("./UdBW3xHf.js").then(z=>z.h);return{navigateToFile:Z}},__vite__mapDeps([37,38,2,39,40,41,32,15,5,1,21,22,23,24,8,25,4,27,17,6,7,9,12,33,13,14,16,34,19,36,42,43,44]),import.meta.url);await R(E.filePath);return}}}function Ol(b){if(!b.metaKey||b.ctrlKey||b.altKey||!["ArrowUp","ArrowDown","ArrowLeft","ArrowRight"].includes(b.key)||!m(T))return;const{state:E,dispatch:R}=m(T).view;if(b.key==="ArrowLeft"){b.preventDefault(),b.stopPropagation();const Z=window.getSelection();Z&&Z.rangeCount>0&&Z.modify(b.shiftKey?"extend":"move","backward","lineboundary")}else if(b.key==="ArrowRight"){b.preventDefault(),b.stopPropagation();const Z=window.getSelection();Z&&Z.rangeCount>0&&Z.modify(b.shiftKey?"extend":"move","forward","lineboundary")}else if(b.key==="ArrowUp"){b.preventDefault(),b.stopPropagation();const Z=1;if(b.shiftKey){const{from:z}=E.selection;R(E.tr.setSelection(W.create(E.doc,Z,z)).scrollIntoView())}else R(E.tr.setSelection(W.create(E.doc,Z)).scrollIntoView())}else if(b.key==="ArrowDown"){b.preventDefault(),b.stopPropagation();const Z=E.doc.content.size-1;if(b.shiftKey){const{to:z}=E.selection;R(E.tr.setSelection(W.create(E.doc,z,Z)).scrollIntoView())}else R(E.tr.setSelection(W.create(E.doc,Z)).scrollIntoView())}}Hu(()=>{m(T)&&(m(T).view.dom.removeEventListener("keydown",Ol),m(T).destroy()),m(Je)&&(m(Je).removeEventListener("mouseover",El),m(Je).removeEventListener("mouseout",Tl),m(Je).removeEventListener("click",Nl)),Te&&Te.removeEventListener("mouseout",Al),Se&&Te&&(Mn(Se),tt?.(),tt=void 0,Te.remove())});let xo=0;kt(()=>{if(!m(T))return;const b=br(m(T));if(o()===b)return;if(m(T).view.hasFocus()){xo+=1;return}const E=m(T).view.hasFocus(),{from:R}=m(T).state.selection,Z=++xo;(async()=>{const z=Br(o()||"");!m(T)||Z!==xo||br(m(T))===b&&m(T).chain().command(({tr:A})=>(A.setMeta("external-update",!0),!0)).setContent(z).command(({tr:A,state:Ne})=>{if(E)try{const Ke=Ne.doc.content.size,q=Math.min(R,Ke);A.setSelection(W.create(Ne.doc,q,q))}catch{}return!0}).run()})()}),kt(()=>{m(T)&&m(T).setEditable(m(je),!1)}),kt(()=>{!m(T)||m(T).isDestroyed||m(T).view.dispatch(m(T).state.tr.setMeta(Qr,be()))}),kt(()=>{const b=m(T)?.view.dom;b&&(b.setAttribute("aria-haspopup","listbox"),m(Ae)&&m(Rt)?(b.setAttribute("aria-controls",Nt),b.setAttribute("aria-activedescendant",m(Rt))):(b.removeAttribute("aria-controls"),b.removeAttribute("aria-activedescendant")))});var Np={flushScreenEvidence:zt,insertAtSymbol:pp,insertText:mp,focus:gp,focusEnd:yp,focusAndSelectAll:bp,getHTML:vp,clear:kp,setContent:xp,insertImage:wp,getInlineImages:Sp,getTextContent:Cp,insertContextMention:Mp,insertMention:Ep,getMentions:Tp,getContextMentions:Ap,get value(){return o()},set value(b=""){o(b),P()},get ariaLabel(){return a()},set ariaLabel(b=re.chat_richInput_editor_ariaLabel()){a(b),P()},get placeholder(){return l()},set placeholder(b=re.chat_richInput_askAnything_placeholder()){l(b),P()},get reactivePlaceholder(){return c()},set reactivePlaceholder(b=!1){c(b),P()},get disabled(){return u()},set disabled(b=!1){u(b),P()},get editableWhileDisabled(){return d()},set editableWhileDisabled(b=!1){d(b),P()},get inputLocked(){return f()},set inputLocked(b=!1){f(b),P()},get class(){return h()},set class(b=""){h(b),P()},get editorClassName(){return p()},set editorClassName(b=""){p(b),P()},get workspace(){return g()},set workspace(b){g(b),P()},get repoPath(){return y()},set repoPath(b){y(b),P()},get autoFocus(){return v()},set autoFocus(b=!1){v(b),P()},get onUpdate(){return x()},set onUpdate(b){x(b),P()},get onSubmit(){return S()},set onSubmit(b){S(b),P()},get onForceSubmit(){return k()},set onForceSubmit(b){k(b),P()},get onEscape(){return $()},set onEscape(b){$(b),P()},get onHistoryPrev(){return I()},set onHistoryPrev(b){I(b),P()},get onHistoryNext(){return C()},set onHistoryNext(b){C(b),P()},get onMentionStart(){return _()},set onMentionStart(b){_(b),P()},get onMentionSelect(){return V()},set onMentionSelect(b){V(b),P()},get onSelectionChange(){return F()},set onSelectionChange(b){F(b),P()},get contextItems(){return me()},set contextItems(b=[]){me(b),P()},get trailingHint(){return be()},set trailingHint(b=null){be(b),P()},get skills(){return w()},set skills(b=[]){w(b),P()},get skillsLoading(){return N()},set skillsLoading(b=!1){N(b),P()},get skillsError(){return j()},set skillsError(b=null){j(b),P()},get onSkillsRetry(){return Q()},set onSkillsRetry(b){Q(b),P()},get slashEmptyLabel(){return Ee()},set slashEmptyLabel(b){Ee(b),P()},get slashNotice(){return le()},set slashNotice(b){le(b),P()},get unavailableSkillTitle(){return Oe()},set unavailableSkillTitle(b){Oe(b),P()},get screenReferences(){return ye()},set screenReferences(b){ye(b),P()},get screenInsertions(){return De()},set screenInsertions(b=[]){De(b),P()},get screenInterim(){return et()},set screenInterim(b=[]){et(b),P()},get screenSpeechActive(){return Ve()},set screenSpeechActive(b=!1){Ve(b),P()},get onScreenInsertionApplied(){return X()},set onScreenInsertionApplied(b){X(b),P()},get onCompositionChange(){return qe()},set onCompositionChange(b){qe(b),P()},get onUserTextInput(){return nt()},set onUserTextInput(b){nt(b),P()},get onScreenReferencesEdited(){return O()},set onScreenReferencesEdited(b){O(b),P()},get minHeight(){return U()},set minHeight(b=80){U(b),P()},get maxHeight(){return ge()},set maxHeight(b=300){ge(b),P()},$set:jt,$on:(b,E)=>Kt(e,b,E)},wo=aM(),Dl=he(wo),Op=()=>m(Ae),Dp=b=>!b&&fr();Eo(Dl,()=>pg,(b,E)=>{E(b,{get open(){return Op()},set open(R){Dp(R)},children:(R,Z)=>{var z=Er(),A=Dt(z);{let Ne=B(()=>Ie?.target());Eo(A,()=>Zp,(Ke,q)=>{q(Ke,{get to(){return m(Ne)},children:(Le,at)=>{var Xe=Er(),$t=Dt(Xe);{let Wn=B(()=>m(Je)??null);Eo($t,()=>hg,(Hr,Ip)=>{Ip(Hr,{get customAnchor(){return m(Wn)},side:"top",align:"start",sideOffset:4,trapFocus:!1,onOpenAutoFocus:Ml,onCloseAutoFocus:Ml,class:"z-(--layer-popover) w-72 max-w-full","data-testid":"slash-skill-menu",get ref(){return m(we)},set ref(Co){fe(we,Co,!0)},children:(Co,cM)=>{Or(dp(Co,{get listboxId(){return Nt},get items(){return m(Be)},get loading(){return N()},get error(){return j()},get emptyLabel(){return Ee()},get notice(){return le()},get onRetry(){return Q()},onSelect:fp,onDismiss:fr,onActiveOptionChange:Mo=>fe(Rt,Mo,!0)}),Mo=>fe(vt,Mo,!0),()=>m(vt))},$$slots:{default:!0}})})}K(Le,Xe)},$$slots:{default:!0}})})}K(R,z)},$$slots:{default:!0}})});var So=ie(Dl,2);let Il;return Or(So,b=>fe(Je,b),()=>m(Je)),ae(wo),ne(()=>{Il=bn(So,1,`tiptap-container ${h()??""}`,"svelte-bv9i3d",Il,{"placeholder-suppressed":m(Et)}),pi(So,`--tt-min-height:${U()}px;--tt-max-height:${ge()}px`)}),K(n,wo),qt(Np)}export{IC as A,lr as B,_1 as C,ur as D,k1 as E,M as F,tp as G,ol as H,Li as I,al as J,YS as K,jM as L,dr as M,Zh as N,Rf as O,Pe as P,Me as Q,hS as R,se as S,uw as T,uS as U,Kw as V,Uw as W,zr as X,B1 as a,$S as b,Pa as c,dt as d,pe as e,We as f,Zu as g,it as h,G as i,S1 as j,vo as k,xS as l,Fe as m,ly as n,H as o,Sl as p,dw as q,W as r,lM as s,Dd as t,Ce as u,xC as v,UM as w,WM as x,Sv as y,J as z};
173
+ `);if(Ke.length>=5){const{state:Le,dispatch:at}=z,Xe=Le.schema.nodes.pasteChip.create({content:Ne,lineCount:Ke.length}),$t=Le.tr.replaceSelectionWith(Xe).setMeta("uiEvent","paste");return at($t),!0}const q=A.clipboardData?.getData("text/html");if(q&&KC(q,Ne))return z.dispatch(z.state.tr.insertText(Ne).scrollIntoView().setMeta("uiEvent","paste")),!0;if(/\r|\n/.test(Ne)){const{state:Le,dispatch:at}=z,Xe=WC(Le.schema,Ne);if(Xe.length>0){const $t=new H(M.from(Xe),1,1);return at(Le.tr.replaceSelection($t).scrollIntoView().setMeta("uiEvent","paste")),!0}}}return!1},handleDrop:(z,A)=>YS(A),handleKeyDown:(z,A)=>{if(z.composing||A.isComposing||A.keyCode===229)return!1;if(hp(A))return!0;if(A.key==="Escape"&&$())return A.preventDefault(),$()(),!0;const Ne=typeof navigator<"u"&&navigator.platform.toUpperCase().includes("MAC"),Ke=q=>dg(A,Fl(q),Ne);if(Ke("chat.mention-context")&&Fl("chat.mention-context")!=="@")return A.preventDefault(),m(T)?.chain().focus().insertContent("@").run(),!0;if(Ne&&A.ctrlKey&&!A.metaKey){if(A.key==="a"){A.preventDefault();const{state:q,dispatch:Le}=z,Xe=q.selection.$head.start();return Le(q.tr.setSelection(W.create(q.doc,Xe))),!0}if(A.key==="e"){A.preventDefault();const{state:q,dispatch:Le}=z,Xe=q.selection.$head.end();return Le(q.tr.setSelection(W.create(q.doc,Xe))),!0}if(A.key==="k"){A.preventDefault();const{state:q,dispatch:Le}=z,at=q.selection.$head,Xe=at.pos,$t=at.end();return Xe<$t&&Le(q.tr.delete(Xe,$t)),!0}if(A.key==="p"){A.preventDefault();const q=window.getSelection();return q&&q.rangeCount>0&&q.modify("move","backward","line"),!0}if(A.key==="n"){A.preventDefault();const q=window.getSelection();return q&&q.rangeCount>0&&q.modify("move","forward","line"),!0}if(A.key==="f"){A.preventDefault();const q=window.getSelection();return q&&q.rangeCount>0&&q.modify("move","forward","character"),!0}if(A.key==="b"){A.preventDefault();const q=window.getSelection();return q&&q.rangeCount>0&&q.modify("move","backward","character"),!0}}if(A.metaKey&&!A.ctrlKey&&!A.altKey){if(A.key==="ArrowLeft"){A.preventDefault();const q=window.getSelection();return q&&q.rangeCount>0&&q.modify(A.shiftKey?"extend":"move","backward","lineboundary"),!0}if(A.key==="ArrowRight"){A.preventDefault();const q=window.getSelection();return q&&q.rangeCount>0&&q.modify(A.shiftKey?"extend":"move","forward","lineboundary"),!0}if(A.key==="ArrowUp"){A.preventDefault();const{state:q,dispatch:Le}=z,at=1;if(A.shiftKey){const{from:Xe}=q.selection;Le(q.tr.setSelection(W.create(q.doc,at,Xe)))}else Le(q.tr.setSelection(W.create(q.doc,at)));return!0}if(A.key==="ArrowDown"){A.preventDefault();const{state:q,dispatch:Le}=z,at=q.doc.content.size-1;if(A.shiftKey){const{to:Xe}=q.selection;Le(q.tr.setSelection(W.create(q.doc,Xe,at)))}else Le(q.tr.setSelection(W.create(q.doc,at)));return!0}}if(Ke("chat.force-send"))return A.preventDefault(),k()?.(),!0;if(Ke("chat.new-line"))return A.preventDefault(),m(T)?.chain().setHardBreak().scrollIntoView().run(),!0;if(A.key==="ArrowUp"&&I()&&!A.shiftKey&&!A.metaKey&&!A.ctrlKey){if(Pi.pluginKey.getState(z.state)?.active)return!1;const{state:Le}=z,{from:at}=Le.selection,Xe=at<=1,$t=Le.doc.textContent.length===0;if(Xe||$t){const Wn=I()();if(Wn!==null)return A.preventDefault(),m(T)?.chain().setContent(Br(Wn)).focus("end").run(),x()?.(Wn),!0}}if(A.key==="ArrowDown"&&C()&&!A.shiftKey&&!A.metaKey&&!A.ctrlKey){if(Pi.pluginKey.getState(z.state)?.active)return!1;const{state:Le}=z,{to:at}=Le.selection,Xe=Le.doc.content.size-1,$t=at>=Xe,Wn=Le.doc.textContent.length===0;if($t||Wn){const Hr=C()();if(Hr!==null)return A.preventDefault(),m(T)?.chain().setContent(Br(Hr)).focus("end").run(),x()?.(Hr),!0}}return Ke("chat.send")?Pi.pluginKey.getState(z.state)?.active?!1:S()?(A.preventDefault(),S()(),!0):!1:!1}}}),!0),R.addEventListener("mouseover",El),R.addEventListener("mouseout",Tl),R.addEventListener("click",Nl),m(T).view.dom.addEventListener("keydown",Ol)})(),()=>{b=!0}});function El(b){const E=b.target,R=Ll(E);if(R){const Z=E.getBoundingClientRect();if(!Te){Te=document.createElement("div"),(Ie?.target()??document.body).appendChild(Te);const z=R.type||"file",A=R.label||E.textContent||"",Ne={file:"📄",folder:"📁",note:"📝",rule:"⚙️",personality:"🎭",command:"⌘",terminal:"💻",member:"👤"};Se=Zr(op,{target:Te,props:{mention:{id:R.id,type:z,label:A,uri:R.uri,meta:R.meta,icon:Ne[z]||"📄"},position:{x:Z.left,y:Z.bottom+5},onClose:()=>{Se&&Te&&(Mn(Se),tt?.(),tt=void 0,Te.remove(),Se=null,Te=null)}}});const Ke=Te.firstElementChild;Ke instanceof HTMLElement&&(tt=Ie?.register(Ke,Qt)),Te.addEventListener("mouseout",Al)}}}function Tl(b){const E=b.target;b.relatedTarget?.closest(".mention-hover-preview")||E.hasAttribute("data-mention")&&Se&&Te&&(Mn(Se),tt?.(),tt=void 0,Te.remove(),Se=null,Te=null)}function Al(b){b.relatedTarget?.closest("[data-mention]")||Se&&Te&&(Mn(Se),tt?.(),tt=void 0,Te.remove(),Se=null,Te=null)}async function Nl(b){const E=Ll(b.target);if(E&&E.type!=="member"){if(E.intentUrl){b.preventDefault(),b.stopPropagation();const{handleIntentLink:R}=await zi(async()=>{const{handleIntentLink:Z}=await import("./CDqnAH9U.js");return{handleIntentLink:Z}},__vite__mapDeps([0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20,21,22,23,24,25,26,27,28,29,30,31,32,33,34,35,36]),import.meta.url);await R(E.intentUrl);return}if(E.type==="note"&&E.note){if(b.preventDefault(),b.stopPropagation(),E.note.workspaceId){const{handleIntentLink:R}=await zi(async()=>{const{handleIntentLink:Z}=await import("./CDqnAH9U.js");return{handleIntentLink:Z}},__vite__mapDeps([0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20,21,22,23,24,25,26,27,28,29,30,31,32,33,34,35,36]),import.meta.url);await R(ig(E.note.id,E.note.workspaceId))}else{const{navigateToNote:R}=await zi(async()=>{const{navigateToNote:Z}=await import("./BswUVSRu.js").then(z=>z.h);return{navigateToNote:Z}},__vite__mapDeps([37,38,2,39,40,41,32,15,5,1,21,22,23,24,8,25,4,27,17,6,7,9,12,33,13,14,16,34,19,36,42,43,44]),import.meta.url);await R(E.note.id)}return}if(E.type==="file"&&E.filePath){b.preventDefault(),b.stopPropagation();const{navigateToFile:R}=await zi(async()=>{const{navigateToFile:Z}=await import("./BswUVSRu.js").then(z=>z.h);return{navigateToFile:Z}},__vite__mapDeps([37,38,2,39,40,41,32,15,5,1,21,22,23,24,8,25,4,27,17,6,7,9,12,33,13,14,16,34,19,36,42,43,44]),import.meta.url);await R(E.filePath);return}}}function Ol(b){if(!b.metaKey||b.ctrlKey||b.altKey||!["ArrowUp","ArrowDown","ArrowLeft","ArrowRight"].includes(b.key)||!m(T))return;const{state:E,dispatch:R}=m(T).view;if(b.key==="ArrowLeft"){b.preventDefault(),b.stopPropagation();const Z=window.getSelection();Z&&Z.rangeCount>0&&Z.modify(b.shiftKey?"extend":"move","backward","lineboundary")}else if(b.key==="ArrowRight"){b.preventDefault(),b.stopPropagation();const Z=window.getSelection();Z&&Z.rangeCount>0&&Z.modify(b.shiftKey?"extend":"move","forward","lineboundary")}else if(b.key==="ArrowUp"){b.preventDefault(),b.stopPropagation();const Z=1;if(b.shiftKey){const{from:z}=E.selection;R(E.tr.setSelection(W.create(E.doc,Z,z)).scrollIntoView())}else R(E.tr.setSelection(W.create(E.doc,Z)).scrollIntoView())}else if(b.key==="ArrowDown"){b.preventDefault(),b.stopPropagation();const Z=E.doc.content.size-1;if(b.shiftKey){const{to:z}=E.selection;R(E.tr.setSelection(W.create(E.doc,z,Z)).scrollIntoView())}else R(E.tr.setSelection(W.create(E.doc,Z)).scrollIntoView())}}Hu(()=>{m(T)&&(m(T).view.dom.removeEventListener("keydown",Ol),m(T).destroy()),m(Je)&&(m(Je).removeEventListener("mouseover",El),m(Je).removeEventListener("mouseout",Tl),m(Je).removeEventListener("click",Nl)),Te&&Te.removeEventListener("mouseout",Al),Se&&Te&&(Mn(Se),tt?.(),tt=void 0,Te.remove())});let xo=0;kt(()=>{if(!m(T))return;const b=br(m(T));if(o()===b)return;if(m(T).view.hasFocus()){xo+=1;return}const E=m(T).view.hasFocus(),{from:R}=m(T).state.selection,Z=++xo;(async()=>{const z=Br(o()||"");!m(T)||Z!==xo||br(m(T))===b&&m(T).chain().command(({tr:A})=>(A.setMeta("external-update",!0),!0)).setContent(z).command(({tr:A,state:Ne})=>{if(E)try{const Ke=Ne.doc.content.size,q=Math.min(R,Ke);A.setSelection(W.create(Ne.doc,q,q))}catch{}return!0}).run()})()}),kt(()=>{m(T)&&m(T).setEditable(m(je),!1)}),kt(()=>{!m(T)||m(T).isDestroyed||m(T).view.dispatch(m(T).state.tr.setMeta(Qr,be()))}),kt(()=>{const b=m(T)?.view.dom;b&&(b.setAttribute("aria-haspopup","listbox"),m(Ae)&&m(Rt)?(b.setAttribute("aria-controls",Nt),b.setAttribute("aria-activedescendant",m(Rt))):(b.removeAttribute("aria-controls"),b.removeAttribute("aria-activedescendant")))});var Np={flushScreenEvidence:zt,insertAtSymbol:pp,insertText:mp,focus:gp,focusEnd:yp,focusAndSelectAll:bp,getHTML:vp,clear:kp,setContent:xp,insertImage:wp,getInlineImages:Sp,getTextContent:Cp,insertContextMention:Mp,insertMention:Ep,getMentions:Tp,getContextMentions:Ap,get value(){return o()},set value(b=""){o(b),P()},get ariaLabel(){return a()},set ariaLabel(b=re.chat_richInput_editor_ariaLabel()){a(b),P()},get placeholder(){return l()},set placeholder(b=re.chat_richInput_askAnything_placeholder()){l(b),P()},get reactivePlaceholder(){return c()},set reactivePlaceholder(b=!1){c(b),P()},get disabled(){return u()},set disabled(b=!1){u(b),P()},get editableWhileDisabled(){return d()},set editableWhileDisabled(b=!1){d(b),P()},get inputLocked(){return f()},set inputLocked(b=!1){f(b),P()},get class(){return h()},set class(b=""){h(b),P()},get editorClassName(){return p()},set editorClassName(b=""){p(b),P()},get workspace(){return g()},set workspace(b){g(b),P()},get repoPath(){return y()},set repoPath(b){y(b),P()},get autoFocus(){return v()},set autoFocus(b=!1){v(b),P()},get onUpdate(){return x()},set onUpdate(b){x(b),P()},get onSubmit(){return S()},set onSubmit(b){S(b),P()},get onForceSubmit(){return k()},set onForceSubmit(b){k(b),P()},get onEscape(){return $()},set onEscape(b){$(b),P()},get onHistoryPrev(){return I()},set onHistoryPrev(b){I(b),P()},get onHistoryNext(){return C()},set onHistoryNext(b){C(b),P()},get onMentionStart(){return _()},set onMentionStart(b){_(b),P()},get onMentionSelect(){return V()},set onMentionSelect(b){V(b),P()},get onSelectionChange(){return F()},set onSelectionChange(b){F(b),P()},get contextItems(){return me()},set contextItems(b=[]){me(b),P()},get trailingHint(){return be()},set trailingHint(b=null){be(b),P()},get skills(){return w()},set skills(b=[]){w(b),P()},get skillsLoading(){return N()},set skillsLoading(b=!1){N(b),P()},get skillsError(){return j()},set skillsError(b=null){j(b),P()},get onSkillsRetry(){return Q()},set onSkillsRetry(b){Q(b),P()},get slashEmptyLabel(){return Ee()},set slashEmptyLabel(b){Ee(b),P()},get slashNotice(){return le()},set slashNotice(b){le(b),P()},get unavailableSkillTitle(){return Oe()},set unavailableSkillTitle(b){Oe(b),P()},get screenReferences(){return ye()},set screenReferences(b){ye(b),P()},get screenInsertions(){return De()},set screenInsertions(b=[]){De(b),P()},get screenInterim(){return et()},set screenInterim(b=[]){et(b),P()},get screenSpeechActive(){return Ve()},set screenSpeechActive(b=!1){Ve(b),P()},get onScreenInsertionApplied(){return X()},set onScreenInsertionApplied(b){X(b),P()},get onCompositionChange(){return qe()},set onCompositionChange(b){qe(b),P()},get onUserTextInput(){return nt()},set onUserTextInput(b){nt(b),P()},get onScreenReferencesEdited(){return O()},set onScreenReferencesEdited(b){O(b),P()},get minHeight(){return U()},set minHeight(b=80){U(b),P()},get maxHeight(){return ge()},set maxHeight(b=300){ge(b),P()},$set:jt,$on:(b,E)=>Kt(e,b,E)},wo=aM(),Dl=he(wo),Op=()=>m(Ae),Dp=b=>!b&&fr();Eo(Dl,()=>pg,(b,E)=>{E(b,{get open(){return Op()},set open(R){Dp(R)},children:(R,Z)=>{var z=Er(),A=Dt(z);{let Ne=B(()=>Ie?.target());Eo(A,()=>Zp,(Ke,q)=>{q(Ke,{get to(){return m(Ne)},children:(Le,at)=>{var Xe=Er(),$t=Dt(Xe);{let Wn=B(()=>m(Je)??null);Eo($t,()=>hg,(Hr,Ip)=>{Ip(Hr,{get customAnchor(){return m(Wn)},side:"top",align:"start",sideOffset:4,trapFocus:!1,onOpenAutoFocus:Ml,onCloseAutoFocus:Ml,class:"z-(--layer-popover) w-72 max-w-full","data-testid":"slash-skill-menu",get ref(){return m(we)},set ref(Co){fe(we,Co,!0)},children:(Co,cM)=>{Or(dp(Co,{get listboxId(){return Nt},get items(){return m(Be)},get loading(){return N()},get error(){return j()},get emptyLabel(){return Ee()},get notice(){return le()},get onRetry(){return Q()},onSelect:fp,onDismiss:fr,onActiveOptionChange:Mo=>fe(Rt,Mo,!0)}),Mo=>fe(vt,Mo,!0),()=>m(vt))},$$slots:{default:!0}})})}K(Le,Xe)},$$slots:{default:!0}})})}K(R,z)},$$slots:{default:!0}})});var So=ie(Dl,2);let Il;return Or(So,b=>fe(Je,b),()=>m(Je)),ae(wo),ne(()=>{Il=bn(So,1,`tiptap-container ${h()??""}`,"svelte-bv9i3d",Il,{"placeholder-suppressed":m(Et)}),pi(So,`--tt-min-height:${U()}px;--tt-max-height:${ge()}px`)}),K(n,wo),qt(Np)}export{IC as A,lr as B,_1 as C,ur as D,k1 as E,M as F,tp as G,ol as H,Li as I,al as J,YS as K,jM as L,dr as M,Zh as N,Rf as O,Pe as P,Me as Q,hS as R,se as S,uw as T,uS as U,Kw as V,Uw as W,zr as X,B1 as a,$S as b,Pa as c,dt as d,pe as e,We as f,Zu as g,it as h,G as i,S1 as j,vo as k,xS as l,Fe as m,ly as n,H as o,Sl as p,dw as q,W as r,lM as s,Dd as t,Ce as u,xC as v,UM as w,WM as x,Sv as y,J as z};