@intent-hq/web 2.369.0 → 2.369.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (143) hide show
  1. package/package.json +1 -1
  2. package/web/app/immutable/chunks/{C-dUgTvj.js → 3kQ-PiCp.js} +1 -1
  3. package/web/app/immutable/chunks/{BswUVSRu.js → 4GHsM2YX.js} +1 -1
  4. package/web/app/immutable/chunks/{CxmJEenA.js → 6CAGpBb_.js} +1 -1
  5. package/web/app/immutable/chunks/{CDqnAH9U.js → 7mowE2Gg.js} +2 -2
  6. package/web/app/immutable/chunks/{Qnx8Hmfg.js → 8bw9vP4h.js} +1 -1
  7. package/web/app/immutable/chunks/{BTYfh5fW.js → A2MGRlHV.js} +1 -1
  8. package/web/app/immutable/chunks/{CZTVb5IB.js → A9EcmNK3.js} +1 -1
  9. package/web/app/immutable/chunks/{P4OctF9m.js → B-F2f_Hq.js} +1 -1
  10. package/web/app/immutable/chunks/{DOi8NPXE.js → B1sp_kEH.js} +1 -1
  11. package/web/app/immutable/chunks/{Q8rtHwbz.js → B2FXFK8l.js} +1 -1
  12. package/web/app/immutable/chunks/{DWLnWMNZ.js → B6jI9-V_.js} +1 -1
  13. package/web/app/immutable/chunks/{tVHyNPqL.js → B9EhZrTN.js} +1 -1
  14. package/web/app/immutable/chunks/{CS3R6Yuh.js → B9I2hDG-.js} +1 -1
  15. package/web/app/immutable/chunks/{CcNIw4Px.js → BBMzDN3i.js} +1 -1
  16. package/web/app/immutable/chunks/{S5vPfW1A.js → BCSEMQfF.js} +1 -1
  17. package/web/app/immutable/chunks/{BW6PhteS.js → BDP3Y6aK.js} +1 -1
  18. package/web/app/immutable/chunks/{DNieQhK8.js → BEqf00Je.js} +3 -3
  19. package/web/app/immutable/chunks/{B2CG0f08.js → BHfEypjS.js} +1 -1
  20. package/web/app/immutable/chunks/{B6P0nIFd.js → BKuhcLZN.js} +1 -1
  21. package/web/app/immutable/chunks/{DCrqv4Go.js → BLlLxRVW.js} +1 -1
  22. package/web/app/immutable/chunks/{CeBDdapO.js → BNp3_sz0.js} +1 -1
  23. package/web/app/immutable/chunks/{DrBi0w5G.js → BOCp5eAe.js} +4 -4
  24. package/web/app/immutable/chunks/{oZkhvgMl.js → BPCO02B5.js} +1 -1
  25. package/web/app/immutable/chunks/{CMRXUPn9.js → BUrTAEns.js} +1 -1
  26. package/web/app/immutable/chunks/{D8BdISor.js → BXkyhXuK.js} +1 -1
  27. package/web/app/immutable/chunks/{Druyrynh.js → BZ5fAc9N.js} +1 -1
  28. package/web/app/immutable/chunks/{Bi5_2qbB.js → BbQfjn7f.js} +2 -2
  29. package/web/app/immutable/chunks/{DupNtpYi.js → Bd_VEON_.js} +1 -1
  30. package/web/app/immutable/chunks/{DF0Pm5yp.js → BigChyTJ.js} +2 -2
  31. package/web/app/immutable/chunks/{C7H74phM.js → Bl3mtXZn.js} +1 -1
  32. package/web/app/immutable/chunks/{CpL3Nqus.js → BlIreYOW.js} +1 -1
  33. package/web/app/immutable/chunks/{BgJ-6yg0.js → Bo-8pH0P.js} +1 -1
  34. package/web/app/immutable/chunks/{BVVyDeyd.js → Boh_rcCH.js} +1 -1
  35. package/web/app/immutable/chunks/{B3Zt92Gh.js → BpwdP8dq.js} +1 -1
  36. package/web/app/immutable/chunks/{Ch30XVIS.js → BrAu7eNn.js} +1 -1
  37. package/web/app/immutable/chunks/{DzFkUqsC.js → BxbMMWzz.js} +1 -1
  38. package/web/app/immutable/chunks/{DcmaumPg.js → ByDB1X4D.js} +1 -1
  39. package/web/app/immutable/chunks/{U3137Ii1.js → ByN-IDvR.js} +1 -1
  40. package/web/app/immutable/chunks/{CJj_lU-4.js → C1VlgusM.js} +1 -1
  41. package/web/app/immutable/chunks/{gcij4Gee.js → C1ZHQc4S.js} +1 -1
  42. package/web/app/immutable/chunks/{CLg2G62j.js → C5X1QcI7.js} +3 -3
  43. package/web/app/immutable/chunks/{Bq_CYpxm.js → C6MAELkY.js} +1 -1
  44. package/web/app/immutable/chunks/{CnM1-KSC.js → C6T3ggVX.js} +1 -1
  45. package/web/app/immutable/chunks/{CiyIhnuP.js → C7Ed4dxf.js} +3 -3
  46. package/web/app/immutable/chunks/{Bf02lG8Y.js → C7kFrL62.js} +1 -1
  47. package/web/app/immutable/chunks/{3IxT-Mrl.js → C8APJtmo.js} +1 -1
  48. package/web/app/immutable/chunks/{k3tEZZCe.js → CB0sfbT7.js} +1 -1
  49. package/web/app/immutable/chunks/{D4q8ggLU.js → CBZ4KqrB.js} +2 -2
  50. package/web/app/immutable/chunks/{D5sw7nR1.js → CJHs_ufb.js} +1 -1
  51. package/web/app/immutable/chunks/{C7RXZVwZ.js → CKkGJ_p-.js} +3 -3
  52. package/web/app/immutable/chunks/{DMjF7NYG.js → CNn7flY0.js} +2 -2
  53. package/web/app/immutable/chunks/{CgeBiXYG.js → CPatK7EU.js} +1 -1
  54. package/web/app/immutable/chunks/{BJTl-SyI.js → CRwqTV0i.js} +1 -1
  55. package/web/app/immutable/chunks/{BipEZFvA.js → CUH5IR0E.js} +1 -1
  56. package/web/app/immutable/chunks/{C6yPb5D8.js → CWybLnJv.js} +1 -1
  57. package/web/app/immutable/chunks/{Dbpb1w7S.js → CXaVTV1g.js} +3 -3
  58. package/web/app/immutable/chunks/{D9d8HfDB.js → C_A_Ikb5.js} +1 -1
  59. package/web/app/immutable/chunks/{CLalkdxk.js → Cl71oYkB.js} +1 -1
  60. package/web/app/immutable/chunks/{C1FbWx7h.js → ClHV2gp3.js} +1 -1
  61. package/web/app/immutable/chunks/{CMh2xRIF.js → Cnwc7RZW.js} +1 -1
  62. package/web/app/immutable/chunks/{DA4getmI.js → CoNmDxYv.js} +1 -1
  63. package/web/app/immutable/chunks/{lVHjTAAb.js → CtxaFpQJ.js} +1 -1
  64. package/web/app/immutable/chunks/{ykNMRL6H.js → Cu3YXFZW.js} +1 -1
  65. package/web/app/immutable/chunks/{a34jwGLW.js → CxXkuVq5.js} +1 -1
  66. package/web/app/immutable/chunks/{DRLOB6Gw.js → CzmcyLb_.js} +1 -1
  67. package/web/app/immutable/chunks/{BTIkMWVv.js → D1E6y9eQ.js} +1 -1
  68. package/web/app/immutable/chunks/{BxOfEPjL.js → D321NUNJ.js} +1 -1
  69. package/web/app/immutable/chunks/{CC08YY4X.js → D547g0l5.js} +2 -2
  70. package/web/app/immutable/chunks/{DZTT1V6G.js → D7slXRL_.js} +1 -1
  71. package/web/app/immutable/chunks/{uWDJKH9B.js → D9NDL9ta.js} +1 -1
  72. package/web/app/immutable/chunks/{DPLuga0X.js → DAjaV_xN.js} +3 -3
  73. package/web/app/immutable/chunks/{Dy_4BU07.js → DCJDf3gb.js} +3 -3
  74. package/web/app/immutable/chunks/{E_jRuW-b.js → DEMmGTfr.js} +2 -2
  75. package/web/app/immutable/chunks/{v2EYTTpI.js → DH6z3AzB.js} +3 -3
  76. package/web/app/immutable/chunks/{DaXgwzm7.js → DK2Pie4F.js} +1 -1
  77. package/web/app/immutable/chunks/{BkrPhcBU.js → DKyvRWc2.js} +1 -1
  78. package/web/app/immutable/chunks/{C6vnD-WG.js → DR7bEdZk.js} +1 -1
  79. package/web/app/immutable/chunks/{C3SM2b7L.js → DSqj6mlv.js} +2 -2
  80. package/web/app/immutable/chunks/{8TQkfju3.js → Da2tbXc-.js} +1 -1
  81. package/web/app/immutable/chunks/{CNAilJvj.js → Danvn_nL.js} +1 -1
  82. package/web/app/immutable/chunks/{DdkBNH3W.js → DdH7Q5ij.js} +1 -1
  83. package/web/app/immutable/chunks/{dx9b_0TP.js → DdKIjYo_.js} +2 -2
  84. package/web/app/immutable/chunks/{C3CJZFT3.js → Dd_WBgru.js} +1 -1
  85. package/web/app/immutable/chunks/{Deg_SlHr.js → DgFinDjM.js} +2 -2
  86. package/web/app/immutable/chunks/{DeVwq4Xj.js → DllP5msd.js} +1 -1
  87. package/web/app/immutable/chunks/{BVUXyHGH.js → DpFiDNG-.js} +1 -1
  88. package/web/app/immutable/chunks/{B3rtR-T9.js → DsI0RDZ2.js} +1 -1
  89. package/web/app/immutable/chunks/{CSFyiYHp.js → DuPd2TLf.js} +1 -1
  90. package/web/app/immutable/chunks/{iI6LFAGI.js → DvPSMnYw.js} +1 -1
  91. package/web/app/immutable/chunks/{DlqetqWw.js → DvYo8gAP.js} +1 -1
  92. package/web/app/immutable/chunks/{C3YB0zcV.js → DvdPJ4VE.js} +1 -1
  93. package/web/app/immutable/chunks/{BgVn7-pK.js → DxejgjNm.js} +1 -1
  94. package/web/app/immutable/chunks/{COmDhl6S.js → Dxjy2MWO.js} +1 -1
  95. package/web/app/immutable/chunks/{Cmm2Uwq6.js → Dxs2medA.js} +1 -1
  96. package/web/app/immutable/chunks/{p8jwzOYN.js → Dz2wxoQy.js} +1 -1
  97. package/web/app/immutable/chunks/{Cstrfm23.js → Dz5OBP4z.js} +4 -4
  98. package/web/app/immutable/chunks/{Cp81xhuN.js → FavPgSsK.js} +1 -1
  99. package/web/app/immutable/chunks/{BXHaIh_f.js → N5wpZAwp.js} +1 -1
  100. package/web/app/immutable/chunks/{5E3JQYey.js → OcJyMtNk.js} +1 -1
  101. package/web/app/immutable/chunks/{DZCGZjzG.js → PxI10rWs.js} +1 -1
  102. package/web/app/immutable/chunks/{4pFiTcXi.js → QpGjdleN.js} +1 -1
  103. package/web/app/immutable/chunks/{B5ht1e3g.js → RifCGV3x.js} +1 -1
  104. package/web/app/immutable/chunks/{DzMdBKPh.js → Wv5_ui4s.js} +1 -1
  105. package/web/app/immutable/chunks/{CvC_PTf7.js → Z73Hn0_g.js} +1 -1
  106. package/web/app/immutable/chunks/{RsJMsDHX.js → ZYL8cEBi.js} +1 -1
  107. package/web/app/immutable/chunks/{CQt5NIo9.js → eLOMf9Vt.js} +1 -1
  108. package/web/app/immutable/chunks/{D1FzC71c.js → fK0I75t-.js} +1 -1
  109. package/web/app/immutable/chunks/{Cu0mADIg.js → fRGswTf6.js} +1 -1
  110. package/web/app/immutable/chunks/{_UNYBFXm.js → fXS7JPx0.js} +1 -1
  111. package/web/app/immutable/chunks/{C_qOm4aX.js → fd1DS8nx.js} +13 -13
  112. package/web/app/immutable/chunks/{AIQuxhpV.js → iTSQ9YOi.js} +1 -1
  113. package/web/app/immutable/chunks/{CuHlAB4d.js → ie53yFct.js} +1 -1
  114. package/web/app/immutable/chunks/{D3SYIfTl.js → jRFO7UbE.js} +3 -3
  115. package/web/app/immutable/chunks/{Ckp5O1pb.js → msw9XRLE.js} +1 -1
  116. package/web/app/immutable/chunks/{DLEm9Cyg.js → nIQsF0QH.js} +1 -1
  117. package/web/app/immutable/chunks/{0jRiL-di.js → ocWSyOIA.js} +1 -1
  118. package/web/app/immutable/chunks/{B5L5kFMu.js → s3nd6_cp.js} +1 -1
  119. package/web/app/immutable/chunks/{CF2xUnmW.js → s97D1nrA.js} +1 -1
  120. package/web/app/immutable/chunks/{CFybzafc.js → sJt4gu2x.js} +1 -1
  121. package/web/app/immutable/chunks/{Bn5goMn4.js → u8OBGcNi.js} +1 -1
  122. package/web/app/immutable/chunks/{CxVedbHg.js → wJewnowK.js} +6 -6
  123. package/web/app/immutable/chunks/{DdkDv5Sd.js → x-XvE_CJ.js} +1 -1
  124. package/web/app/immutable/chunks/{DpSi4PLY.js → xqJuIupR.js} +1 -1
  125. package/web/app/immutable/entry/{app.AtsW0EhM.js → app.OFNFrEIR.js} +2 -2
  126. package/web/app/immutable/entry/start.CHpPu02l.js +1 -0
  127. package/web/app/immutable/nodes/{0.CegL6Bfc.js → 0.BPB4y4Pk.js} +1 -1
  128. package/web/app/immutable/nodes/{1.B6-BTMS1.js → 1.CBbBqNOx.js} +1 -1
  129. package/web/app/immutable/nodes/{10.qlZM4NPl.js → 10.B-rk3kEM.js} +4 -4
  130. package/web/app/immutable/nodes/{11.BR5ZtLjn.js → 11.P0HocOtE.js} +1 -1
  131. package/web/app/immutable/nodes/{15.Bitx8r2v.js → 15.DhLBijej.js} +1 -1
  132. package/web/app/immutable/nodes/{19.BRj21xes.js → 19.bgAqepNt.js} +2 -2
  133. package/web/app/immutable/nodes/{2.BBHXaN8p.js → 2.DU7oYEtS.js} +4 -4
  134. package/web/app/immutable/nodes/{3.JJmMGjhS.js → 3.B4hrIG7P.js} +1 -1
  135. package/web/app/immutable/nodes/{4.C3VD-4KP.js → 4.J3HSWI_f.js} +1 -1
  136. package/web/app/immutable/nodes/{5.DIJ6nzqY.js → 5.CS5w-vHI.js} +1 -1
  137. package/web/app/immutable/nodes/{6.DIzZZwt4.js → 6.Bf53uJQ1.js} +1 -1
  138. package/web/app/immutable/nodes/{7.Xo0EbJUd.js → 7.q-WiNda-.js} +1 -1
  139. package/web/app/immutable/nodes/{8.xZANL-qg.js → 8.eHanxjw-.js} +1 -1
  140. package/web/app/immutable/nodes/{9.BVBQgdJj.js → 9.BMShc48l.js} +4 -4
  141. package/web/app/version.json +1 -1
  142. package/web/index.html +9 -9
  143. package/web/app/immutable/entry/start.DHsRk6-P.js +0 -1
@@ -1,5 +1,5 @@
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(`
1
+ const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["/app/immutable/chunks/7mowE2Gg.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/4GHsM2YX.js","/app/immutable/chunks/BdWqymET.js","/app/immutable/chunks/wJewnowK.js","/app/immutable/chunks/Dd_WBgru.js","/app/immutable/chunks/B0Z-1lwJ.js","/app/immutable/chunks/BbQfjn7f.js","/app/immutable/chunks/DKwAaLwd.js","/app/immutable/chunks/6CAGpBb_.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"./D9NDL9ta.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"./C6T3ggVX.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"./D547g0l5.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"./DdKIjYo_.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("./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};
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("./7mowE2Gg.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("./7mowE2Gg.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("./4GHsM2YX.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("./4GHsM2YX.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};
@@ -1 +1 @@
1
- import{b as i,aW as l,aw as d,P as o}from"./DrBi0w5G.js";var x=i((r,t)=>{const e=r.append("rect");if(e.attr("x",t.x),e.attr("y",t.y),e.attr("fill",t.fill),e.attr("stroke",t.stroke),e.attr("width",t.width),e.attr("height",t.height),t.name&&e.attr("name",t.name),t.rx&&e.attr("rx",t.rx),t.ry&&e.attr("ry",t.ry),t.attrs!==void 0)for(const s in t.attrs)e.attr(s,t.attrs[s]);return t.class&&e.attr("class",t.class),e},"drawRect"),p=i((r,t)=>{const e={x:t.startx,y:t.starty,width:t.stopx-t.startx,height:t.stopy-t.starty,fill:t.fill,stroke:t.stroke,class:"rect"};x(r,e).lower()},"drawBackgroundRect"),y=i((r,t)=>{const e=t.text.replace(d," "),s=r.append("text");s.attr("x",t.x),s.attr("y",t.y),s.attr("class","legend"),s.style("text-anchor",t.anchor),t.class&&s.attr("class",t.class);const a=s.append("tspan");return a.attr("x",t.x+t.textMargin*2),a.text(e),s},"drawText"),m=i((r,t,e,s)=>{const a=r.append("image");a.attr("x",t),a.attr("y",e);const n=o.sanitizeUrl(s);a.attr("xlink:href",n)},"drawImage"),g=i((r,t,e,s)=>{const a=r.append("use");a.attr("x",t),a.attr("y",e);const n=o.sanitizeUrl(s);a.attr("xlink:href",`#${n}`)},"drawEmbeddedImage"),h=i(()=>({x:0,y:0,width:100,height:100,fill:"#EDF2AE",stroke:"#666",anchor:"start",rx:0,ry:0}),"getNoteRect"),f=i(()=>({x:0,y:0,width:100,height:100,"text-anchor":"start",style:"#666",textMargin:0,rx:0,ry:0,tspan:!0}),"getTextObj"),w=i(()=>{let r=l(".mermaidTooltip");return r.empty()&&(r=l("body").append("div").attr("class","mermaidTooltip").style("opacity",0).style("position","absolute").style("text-align","center").style("max-width","200px").style("padding","2px").style("font-size","12px").style("background","#ffffde").style("border","1px solid #333").style("border-radius","2px").style("pointer-events","none").style("z-index","100")),r},"createTooltip");export{g as a,m as b,w as c,p as d,x as e,y as f,h as g,f as h};
1
+ import{b as i,aW as l,aw as d,P as o}from"./BOCp5eAe.js";var x=i((r,t)=>{const e=r.append("rect");if(e.attr("x",t.x),e.attr("y",t.y),e.attr("fill",t.fill),e.attr("stroke",t.stroke),e.attr("width",t.width),e.attr("height",t.height),t.name&&e.attr("name",t.name),t.rx&&e.attr("rx",t.rx),t.ry&&e.attr("ry",t.ry),t.attrs!==void 0)for(const s in t.attrs)e.attr(s,t.attrs[s]);return t.class&&e.attr("class",t.class),e},"drawRect"),p=i((r,t)=>{const e={x:t.startx,y:t.starty,width:t.stopx-t.startx,height:t.stopy-t.starty,fill:t.fill,stroke:t.stroke,class:"rect"};x(r,e).lower()},"drawBackgroundRect"),y=i((r,t)=>{const e=t.text.replace(d," "),s=r.append("text");s.attr("x",t.x),s.attr("y",t.y),s.attr("class","legend"),s.style("text-anchor",t.anchor),t.class&&s.attr("class",t.class);const a=s.append("tspan");return a.attr("x",t.x+t.textMargin*2),a.text(e),s},"drawText"),m=i((r,t,e,s)=>{const a=r.append("image");a.attr("x",t),a.attr("y",e);const n=o.sanitizeUrl(s);a.attr("xlink:href",n)},"drawImage"),g=i((r,t,e,s)=>{const a=r.append("use");a.attr("x",t),a.attr("y",e);const n=o.sanitizeUrl(s);a.attr("xlink:href",`#${n}`)},"drawEmbeddedImage"),h=i(()=>({x:0,y:0,width:100,height:100,fill:"#EDF2AE",stroke:"#666",anchor:"start",rx:0,ry:0}),"getNoteRect"),f=i(()=>({x:0,y:0,width:100,height:100,"text-anchor":"start",style:"#666",textMargin:0,rx:0,ry:0,tspan:!0}),"getTextObj"),w=i(()=>{let r=l(".mermaidTooltip");return r.empty()&&(r=l("body").append("div").attr("class","mermaidTooltip").style("opacity",0).style("position","absolute").style("text-align","center").style("max-width","200px").style("padding","2px").style("font-size","12px").style("background","#ffffde").style("border","1px solid #333").style("border-radius","2px").style("pointer-events","none").style("z-index","100")),r},"createTooltip");export{g as a,m as b,w as c,p as d,x as e,y as f,h as g,f as h};
@@ -1 +1 @@
1
- import{t as Qe,bo as h,bw as Ye,b as $e,bq as nt,bm as w,bs as Ve}from"./51_h0jm2.js";import{bo as st,bs as et,a7 as L,ay as y,aD as e,bS as U,W as c,a5 as Pe,bA as De,bH as V,bl as _e,b_ as oe,bO as de,bn as tt,bf as je,bV as Ee,aA as v,c9 as k,aB as X,be as it,b$ as lt,bj as dt,cd as ct,ca as Je,bk as ut}from"./CJxGDkBm.js";import{i as G}from"./DCOxMTSf.js";import{J4 as Le,n4 as pt,u$ as ft}from"./Zldsekdv.js";import{aN as ht}from"./DWLnWMNZ.js";import{cy as vt}from"./XJqoy2ap.js";import{c as gt}from"./ChTqQfQN.js";import{i as Ue,t as Xe}from"./H2jLkRRS.js";import{w as _t}from"./CqJQ3ikU.js";import{d as mt}from"./B0Z-1lwJ.js";import{F as Re,aw as bt,ax as wt,cV as He,aZ as qe,bg as kt,ao as yt,an as At,cS as Ge}from"./DSQT151l.js";import{m as K,w as Ft}from"./SX1khnGy.js";import{s as Ne,f as xe,c as Wt}from"./CpPNoOk-.js";import{s as Ct}from"./DxvSggY5.js";import{w as xt}from"./CF1Tu_8c.js";import"./JKboQXkL.js";import{i as M}from"./PXCFrn2V.js";import{g as It,e as Te}from"./Bjy4ygfJ.js";import{c as Z}from"./DGmOjLYi.js";import{a as Pt,r as Dt}from"./CF2xUnmW.js";import{f as Mt,aa as Et}from"./Cdw_CIdg.js";import{t as Be}from"./DAsc1V4f.js";import{h as Ke,k as Ot,j as St,R as Rt,i as Nt,g as Tt,c as Bt,e as zt}from"./M18r7swD.js";import{M as Vt}from"./C1McR-sz.js";import{m as ze}from"./DmhHEMPi.js";var jt=X('<img alt="" class="size-4"/>'),Jt=X('<span class="min-w-0 flex-1 text-left"><span class="block truncate"> </span> <span class="block text-muted-foreground" aria-hidden="true" data-menu-action-reason=""> </span></span>'),Lt=X("<span> </span>"),Ut=X('<span data-menu-action-detail=""> </span>'),Xt=X('<span aria-hidden="true"><!></span>'),Ze=X("<!> <!> <!>",1),Ht=X('<div class="my-1 h-px bg-border" role="separator"></div>'),Me=X("<!> <!>",1),qt=X('<!> <p data-menu-action-note=""> </p>',1),Gt=X('<span class="flex size-4 shrink-0 items-center justify-center" aria-hidden="true"><!></span> <!> <!>',1),Kt=X('<p data-menu-action-note=""> </p>'),Zt=X('<div class="pl-4"><!> <!></div>'),Qt=X('<span class="sr-only"> </span>');function me(be,d){const we=st();if(new.target)return Qe({component:me,...be});et(d,!0);const Ie=(p,r=je)=>{var O=L(),S=y(O);{var j=W=>{const x=k(()=>Pt(r().editor));var J=L(),m=y(J);{var f=s=>{var i=jt();oe(()=>Ne(i,"src",`data:image/png;base64,${r().editor.iconBase64??""}`)),c(s,i)},o=s=>{var i=L(),b=y(i);Z(b,()=>e(x),(T,ae)=>{ae(T,{size:16})}),c(s,i)},N=s=>{{let i=k(()=>Dt(r().editor.category));Re(s,{get icon(){return e(i)},size:16})}};M(m,s=>{r().editor.iconBase64?s(f):e(x)?s(o,1):s(N,-1)})}c(W,J)},R=W=>{var x=L(),J=y(x);Ct(J,()=>r().iconSnippet),c(W,x)},q=W=>{{let x=k(()=>r().variant==="destructive"?"text-current":"text-muted-foreground");Re(W,{get icon(){return r().icon},get weight(){return H()},size:16,get class(){return e(x)}})}};M(S,W=>{r().editor?W(j):r().iconSnippet?W(R,1):r().icon&&W(q,2)})}c(p,O)},ne=(p,r=je)=>{var O=Ze(),S=y(O);{var j=m=>{var f=Jt(),o=Pe(f),N=_e(o,!0);Te(o,(b,T)=>Be?.(b,T),()=>r().label);var s=U(o,2),i=_e(s,!0);De(f),oe(()=>{de(N,r().label),de(i,r().disabledReason)}),c(m,f)},R=m=>{var f=Lt(),o=_e(f,!0);Te(f,(N,s)=>Be?.(N,s),()=>r().label),oe(()=>{xe(f,1,`min-w-0 truncate text-left ${r().detail?"flex-[1_0_auto]":"flex-1"}`),de(o,r().label)}),c(m,f)};M(S,m=>{r().disabledReason?m(j):m(R,-1)})}var q=U(S,2);{var W=m=>{var f=Ut(),o=_e(f,!0);Te(f,(N,s)=>Be?.(N,s),()=>r().detail),oe(()=>{xe(f,1,`ml-4 min-w-0 truncate ${(r().detailTone==="danger"?"text-danger":ze)??""}`),de(o,r().detail)}),c(m,f)};M(q,m=>{r().detail&&m(W)})}var x=U(q,2);{var J=m=>{var f=Xt(),o=Pe(f);Et(o,{children:(N,s)=>{it();var i=lt();oe(b=>de(i,b),[()=>xt(r().shortcut)]),c(N,i)},$$slots:{default:!0}}),De(f),oe(()=>xe(f,1,Wt(E()?"ml-4 flex h-lh shrink-0 items-center":"ml-4"))),c(m,f)};M(x,m=>{r().shortcut&&m(J)})}c(p,O)};let ke=h(d,"actions",7),E=h(d,"menu",7),H=h(d,"iconWeight",7),u=h(d,"onClose",7),A=h(d,"selection",7),F=Ee(null);function Q(p){p.disabled||p.disabledReason!==void 0||(p.onClick(),u()?.())}var ce={get actions(){return ke()},set actions(p){ke(p),v()},get menu(){return E()},set menu(p){E(p),v()},get iconWeight(){return H()},set iconWeight(p){H(p),v()},get onClose(){return u()},set onClose(p){u(p),v()},get selection(){return A()},set selection(p){A(p),v()},$set:Ye,$on:(p,r)=>$e(d,p,r)},se=L(),ie=y(se);return It(ie,17,ke,p=>p.id,(p,r)=>{const O=i=>{Ie(i,()=>e(r))},S=k(()=>!!(e(r).editor||e(r).iconSnippet||e(r).icon)),j=k(()=>e(r).disabled||e(r).disabledReason!==void 0),R=k(()=>e(r).disabledReason?`${we}-${e(r).id}-reason`:void 0);var q=Ze(),W=y(q);{var x=i=>{var b=L(),T=y(b);{var ae=a=>{var n=L(),g=y(n);Z(g,()=>Ke,(C,P)=>{P(C,{})}),c(a,n)},ue=a=>{var n=Ht();c(a,n)};M(T,a=>{E()?a(ae):a(ue,-1)})}c(i,b)};M(W,i=>{e(r).dividerBefore&&i(x)})}var J=U(W,2);{var m=i=>{var b=L(),T=y(b);{var ae=g=>{var C=L(),P=y(C);Z(P,()=>Nt,(I,D)=>{D(I,{children:(B,Y)=>{var $=Me(),pe=y($);{let te=k(()=>e(S)?O:void 0);Z(pe,()=>Ot,(fe,he)=>{he(fe,{get leading(){return e(te)},get disabled(){return e(j)},get"aria-describedby"(){return e(R)},get"data-action-id"(){return e(r).id},children:(ve,ye)=>{ne(ve,()=>e(r))},$$slots:{default:!0}})})}var ee=U(pe,2);{let te=k(()=>e(r).note?`${we}-${e(r).id}-note`:void 0);Z(ee,()=>St,(fe,he)=>{he(fe,{class:"w-60",get"aria-describedby"(){return e(te)},children:(ve,ye)=>{var t=Me(),l=y(t);{var _=re=>{var Ae=Me(),Fe=y(Ae);{let Ce=k(()=>e(r).submenu.find(ge=>ge.checked)?.id??"");Z(Fe,()=>Rt,(ge,Se)=>{Se(ge,{get value(){return e(Ce)},get"aria-label"(){return e(r).label},children:(rt,$t)=>{{let at=k(()=>e(r).submenu.filter(ot=>ot.checked!==void 0));me(rt,{get actions(){return e(at)},selection:"single",get menu(){return E()},get iconWeight(){return H()},get onClose(){return u()}})}},$$slots:{default:!0}})})}var We=U(Fe,2);{let Ce=k(()=>e(r).submenu.filter(ge=>ge.checked===void 0));me(We,{get actions(){return e(Ce)},get menu(){return E()},get iconWeight(){return H()},get onClose(){return u()}})}c(re,Ae)},z=re=>{me(re,{get actions(){return e(r).submenu},get menu(){return E()},get iconWeight(){return H()},get onClose(){return u()}})};M(l,re=>{e(r).selection==="single"?re(_):re(z,-1)})}var le=U(l,2);{var Oe=re=>{var Ae=qt(),Fe=y(Ae);Z(Fe,()=>Ke,(ge,Se)=>{Se(ge,{})});var We=U(Fe,2),Ce=_e(We,!0);oe(()=>{Ne(We,"id",`${we}-${e(r).id}-note`),xe(We,1,`type-caption px-2 py-1 ${ze}`),de(Ce,e(r).note)}),c(re,Ae)};M(le,re=>{e(r).note&&re(Oe)})}c(ve,t)},$$slots:{default:!0}})})}c(B,$)},$$slots:{default:!0}})}),c(g,C)},ue=g=>{var C=L(),P=y(C);{let I=k(()=>e(S)?O:void 0);Z(P,()=>Tt,(D,B)=>{B(D,{get leading(){return e(I)},get value(){return e(r).id},get disabled(){return e(j)},get"aria-describedby"(){return e(R)},closeOnSelect:!0,onSelect:()=>Q(e(r)),get"data-action-id"(){return e(r).id},children:(Y,$)=>{ne(Y,()=>e(r))},$$slots:{default:!0}})})}c(g,C)},a=g=>{var C=L(),P=y(C);{let I=k(()=>e(S)?O:void 0);Z(P,()=>Bt,(D,B)=>{B(D,{get leading(){return e(I)},get checked(){return e(r).checked},get disabled(){return e(j)},get"aria-describedby"(){return e(R)},closeOnSelect:!0,onSelect:()=>Q(e(r)),get"data-action-id"(){return e(r).id},children:(Y,$)=>{ne(Y,()=>e(r))},$$slots:{default:!0}})})}c(g,C)},n=g=>{var C=L(),P=y(C);{let I=k(()=>e(S)?O:void 0),D=k(()=>e(r).variant==="destructive");Z(P,()=>zt,(B,Y)=>{Y(B,{get leading(){return e(I)},get destructive(){return e(D)},get disabled(){return e(j)},get"aria-describedby"(){return e(R)},onSelect:()=>Q(e(r)),get"data-action-id"(){return e(r).id},children:($,pe)=>{ne($,()=>e(r))},$$slots:{default:!0}})})}c(g,C)};M(T,g=>{e(r).submenu?g(ae):A()==="single"&&e(r).checked!==void 0?g(ue,1):e(r).checked!==void 0?g(a,2):g(n,-1)})}c(i,b)},f=i=>{me(i,{get actions(){return e(r).submenu},get menu(){return E()},get iconWeight(){return H()},get onClose(){return u()}})},o=i=>{var b=Me(),T=y(b);{let a=k(()=>e(r).variant==="destructive"?"text-danger hover:text-danger":""),n=k(()=>e(r).submenu?e(F)===e(r).id:void 0);Mt(T,{variant:"ghost",size:"sm",get class(){return`w-full justify-start gap-2 ${e(a)??""}`},get disabled(){return e(j)},get"aria-describedby"(){return e(R)},get"aria-expanded"(){return e(n)},onclick:()=>e(r).submenu?V(F,e(F)===e(r).id?null:e(r).id,!0):Q(e(r)),children:(g,C)=>{var P=Gt(),I=y(P),D=Pe(I);Ie(D,()=>e(r)),De(I);var B=U(I,2);ne(B,()=>e(r));var Y=U(B,2);{var $=ee=>{{let te=k(()=>e(F)===e(r).id?bt:wt);Re(ee,{get icon(){return e(te)},size:12})}},pe=ee=>{var te=L(),fe=y(te);{let he=k(()=>e(r).checked?"checked":"empty");Z(fe,()=>Vt,(ve,ye)=>{ye(ve,{get state(){return e(he)}})})}c(ee,te)};M(Y,ee=>{e(r).submenu?ee($):e(r).checked!==void 0&&ee(pe,1)})}c(g,P)},$$slots:{default:!0}})}var ae=U(T,2);{var ue=a=>{var n=Zt(),g=Pe(n);me(g,{get actions(){return e(r).submenu},get menu(){return E()},get iconWeight(){return H()},get onClose(){return u()}});var C=U(g,2);{var P=I=>{var D=Kt(),B=_e(D,!0);oe(()=>{xe(D,1,`type-caption px-2 py-1 ${ze}`),de(B,e(r).note)}),c(I,D)};M(C,I=>{e(r).note&&I(P)})}De(n),c(a,n)};M(ae,a=>{e(r).submenu&&e(F)===e(r).id&&a(ue)})}c(i,b)};M(J,i=>{E()?i(m):e(r).id==="open-in"&&e(r).submenu?i(f,1):i(o,-1)})}var N=U(J,2);{var s=i=>{var b=Qt(),T=_e(b,!0);oe(()=>{Ne(b,"id",e(R)),de(T,e(r).disabledReason)}),c(i,b)};M(N,i=>{e(r).disabledReason&&i(s)})}c(p,q)}),c(be,se),tt(ce)}function Yt(be,d){if(new.target)return Qe({component:Yt,...be});et(d,!0);const we=()=>Ve(T,"$installedEditors$",ne),Ie=()=>Ve(ue,"$isWorkspaceHostLocal$",ne),[ne,ke]=nt();let E=h(d,"layout",7,"list"),H=h(d,"iconWeight",7),u=h(d,"filePath",7,""),A=h(d,"workspaceId",7,""),F=h(d,"isDirectory",7,!0),Q=h(d,"onDelete",7,void 0),ce=h(d,"onArchive",7,void 0),se=h(d,"onUnarchive",7,void 0),ie=h(d,"isArchived",7,!1),p=h(d,"onClose",7,void 0),r=h(d,"showDeleteOption",7,!0),O=h(d,"showArchiveOption",7,!1),S=h(d,"showPathCopy",7,!0),j=h(d,"showFileNameCopy",7,!1),R=h(d,"showFileActions",7,!0),q=h(d,"workspaceFolderPath",7,""),W=h(d,"isDiff",7,!1),x=h(d,"isWorkspaceRoot",7,!1),J=h(d,"additionalActions",23,()=>[]),m=h(d,"showDeleteFileOption",7,!1),f=h(d,"onFileDeleted",7,void 0);const o=gt("WorkspaceActionsMenu");let N=!1;dt(()=>{N=!0});function s(){N||p()?.()}const i=_t("externalEditors"),b=ct(A());Je(()=>{b.set(A())});const T=ht(b),ae=k(we),ue=vt(b);let a=Ee(""),n=Ee(""),g=Ee(!1);ut(()=>{Le.dispatch(pt())}),Je(()=>{u()&&A()?G("workspace:get",{id:A()}).then(t=>{if(t&&t.success&&t.data){const l=t.data,_=l.worktreePath||l.repositoryPath||l.path,z=q()==="__WORKSPACE_ROOT__"?_:q()||_;if(z){const le=z.replace(/\\/g,"/");x()?V(a,le,!0):Ue(u())?V(a,u().replace(/\\/g,"/"),!0):V(a,`${le}/${u()}`.replace(/\/+/g,"/"),!0),V(n,le,!0),o.info("[WorkspaceActionsMenu] Resolved file path:",{filePath:u(),workspacePath:z,resolvedPath:e(a)})}else V(a,u()),V(n,""),l.status!=="archived"&&l.status!=="deleted"&&o.warn("[WorkspaceActionsMenu] No workspace path found:",l)}else V(a,u()),V(n,""),t?.error&&!t.error.includes("not found")&&o.warn("[WorkspaceActionsMenu] Workspace not available:",t)}).catch(t=>{V(a,u()),V(n,""),t?.message?.includes("not found")||o.error("[WorkspaceActionsMenu] Failed to resolve path:",t)}):(V(a,u()),o.info("[WorkspaceActionsMenu] Using filePath directly:",{filePath:u(),workspaceId:A()}))});async function C(){if(!e(a)){o.warn("[WorkspaceActionsMenu] No resolved path for VSCode");return}try{if(W()&&!F()){o.info("[WorkspaceActionsMenu] Opening diff in VSCode:",{resolvedPath:e(a)}),await G("vscode:open-git-diff",{filePath:e(a),workspacePath:e(n)||void 0}),s();return}let t=e(a);if(e(n))!F()&&!x()?t={folder:e(n),file:e(a)}:t=e(n);else if(!F()){const l=e(a).includes("\\")?"\\":"/",_=e(a).split(l);_.length>1&&(t={folder:_.slice(0,-1).join(l),file:e(a)})}await G("vscode:open",t),s()}catch(t){o.error("Failed to open in VSCode:",t),K.error(t instanceof Error?t.message:w.ui_workspaceActions_openFailed_error({name:"VS Code"}))}}async function P(){if(!e(a)){o.warn("[WorkspaceActionsMenu] No resolved path for JetBrains");return}try{let t=e(a);e(n)&&!F()?t={folder:e(n),file:e(a)}:e(n)&&(t=e(n)),await G("jetbrains:open",t),s()}catch(t){o.error("Failed to open in JetBrains:",t),K.error(t instanceof Error?t.message:w.ui_workspaceActions_openFailed_error({name:"JetBrains"}))}}async function I(){if(!e(a)){o.warn("[WorkspaceActionsMenu] No resolved path for Xcode");return}try{if(A()&&e(n)){Le.dispatch(ft(A(),e(n),F()?void 0:e(a))),s();return}let t=e(a);e(n)&&!F()?t={folder:e(n),file:e(a)}:e(n)&&(t={folder:e(n)}),await G("xcode:open",t),s()}catch(t){o.error("Failed to open in Xcode:",t),K.error(t instanceof Error?t.message:w.ui_workspaceActions_openFailed_error({name:"Xcode"}))}}async function D(t){if(o.info("[WorkspaceActionsMenu] openInEditor called",{editorId:t.id,appName:t.appName,handlerType:t.handlerType,resolvedPath:e(a),isDirectory:F()}),!e(a)){o.warn("[WorkspaceActionsMenu] openInEditor: No resolved path, aborting");return}const l=F()?e(a):e(a).substring(0,e(a).lastIndexOf("/"));o.info(`[WorkspaceActionsMenu] openInEditor: targetPath=${l}, handlerType=${t.handlerType}`);try{switch(t.handlerType){case"finder":o.info("[WorkspaceActionsMenu] openInEditor: Invoking shell:showItemInFolder"),await G("shell:showItemInFolder",{path:l});break;case"vscode":o.info("[WorkspaceActionsMenu] openInEditor: Delegating to openInVSCode"),await C();return;case"jetbrains":o.info("[WorkspaceActionsMenu] openInEditor: Delegating to openInJetBrains"),await P();return;case"xcode":o.info("[WorkspaceActionsMenu] openInEditor: Delegating to openInXcode"),await I();return;case"generic":default:{o.info(`[WorkspaceActionsMenu] openInEditor: Invoking external-editors:open for ${t.id}`);const _=await G("external-editors:open",{editorId:t.id,path:l});o.info("[WorkspaceActionsMenu] openInEditor: external-editors:open result",_);break}}s()}catch(_){o.error(`[WorkspaceActionsMenu] Failed to open in ${t.appName}:`,_),K.error(_ instanceof Error?_.message:w.ui_workspaceActions_openFailed_error({name:t.appName}))}}async function B(){if(!e(a)){o.warn("No resolved path for openWithOther");return}try{let t=e(a);F()&&e(n)&&(t=e(n));const l=await G("external-editors:open-with-other",{path:t});if(!l?.success){l?.error!=="No application selected"&&(o.error("Failed to open with other app:",l?.error),K.error(l?.error||w.ui_workspaceActions_openOtherFailed_error()));return}s()}catch(t){o.error("Failed to open with other app:",t),K.error(t instanceof Error?t.message:w.ui_workspaceActions_openOtherFailed_error())}}async function Y(){if(e(a))try{await navigator.clipboard.writeText(Xe(e(a))),s()}catch(t){o.error("Failed to copy path:",t)}}async function $(){if(u())try{let t=u().replace(/\\/g,"/");if(Ue(u())&&e(n)){const l=e(n).endsWith("/")?e(n):e(n)+"/";t.startsWith(l)&&(t=t.slice(l.length))}await navigator.clipboard.writeText(Xe(t)),s()}catch(t){o.error("Failed to copy workspace path:",t)}}async function pe(){if(u())try{const t=u().split(/[/\\]/).pop()||"";await navigator.clipboard.writeText(t),s()}catch(t){o.error("Failed to copy file name:",t)}}function ee(){Q()&&(Q()(),s())}async function te(){if(!(!A()||!e(a)||e(g))){V(g,!0);try{const t=u().split(/[/\\]/).pop()||"file",l=e(a);let _="";try{_=(await G("file:read",{path:l,workspaceId:A()}))?.data?.content??""}catch{}const z=await G("file:delete",{path:l,workspaceId:A()});if(z?.success){f()?.(),s();const le=K.warning(w.ui_workspaceActions_deletedFile_label({name:t}),Ft({duration:15e3,action:{label:w.ui_workspaceActions_undo_label(),onClick:async()=>{try{await G("file:write",{path:l,content:_,workspaceId:A()}),mt("file:changed",{workspaceId:A(),type:"create",filePath:l}),K.dismiss(le)}catch(Oe){o.error("[WorkspaceActionsMenu] Failed to restore file",Oe),K.error(w.ui_workspaceActions_restoreFileFailed_error())}}}}))}else K.error(w.ui_workspaceActions_deleteFileFailedDetail_error({error:z?.error||w.ui_workspaceActions_unknown_error()}))}catch(t){o.error("[WorkspaceActionsMenu] Error deleting file",t),K.error(w.ui_workspaceActions_deleteFileFailed_error())}finally{V(g,!1)}}}function fe(){ie()&&se()?(se()(),s()):!ie()&&ce()&&(ce()(),s())}const he=k(()=>{const t=[];R()&&(i&&Ie()&&t.push({id:"open-in",label:w.ui_openCombo_openInApp_tooltip(),icon:He,onClick:()=>{},submenu:[...e(ae).map(_=>({id:`editor:${_.id}`,label:w.ui_workspaceActions_openIn_label({name:_.name}),editor:_,onClick:()=>{D(_)}})),{id:"choose-app",label:w.ui_workspaceActions_chooseApp_label(),icon:He,onClick:()=>{B()}}]}),S()&&t.push({id:"copy-absolute-path",label:w.ui_workspaceActions_copyAbsolutePath_label(),icon:qe,disabled:!e(a),dividerBefore:t.length>0,onClick:()=>{Y()}}),S()&&!x()&&t.push({id:"copy-relative-path",label:w.ui_workspaceActions_copyRelativePath_label(),icon:qe,disabled:!u(),onClick:()=>{$()}}),j()&&!F()&&t.push({id:"copy-file-name",label:w.ui_workspaceActions_copyFileName_label(),icon:kt,disabled:!u(),onClick:()=>{pe()}}));const l=_=>_.map(z=>({...z,submenu:z.submenu?l(z.submenu):void 0,onClick:()=>{z.onClick(),s()}}));return t.push(...l(J())),O()&&(ce()||se())&&t.push({id:"archive-workspace",label:ie()?w.ui_workspaceActions_unarchiveSpace_label():w.ui_workspaceActions_archiveSpace_label(),icon:ie()?yt:At,dividerBefore:t.length>0,onClick:fe}),r()&&Q()&&t.push({id:"delete-workspace",label:w.ui_workspaceActions_deleteSpace_label(),icon:Ge,variant:"destructive",dividerBefore:t.length>0&&t.at(-1)?.id!=="archive-workspace",onClick:ee}),m()&&!F()&&t.push({id:"delete-file",label:w.ui_workspaceActions_deleteFile_label(),icon:Ge,variant:"destructive",disabled:e(g)||!e(a)||!A(),dividerBefore:t.length>0,onClick:()=>{te()}}),t});var ve={get layout(){return E()},set layout(t="list"){E(t),v()},get iconWeight(){return H()},set iconWeight(t){H(t),v()},get filePath(){return u()},set filePath(t=""){u(t),v()},get workspaceId(){return A()},set workspaceId(t=""){A(t),v()},get isDirectory(){return F()},set isDirectory(t=!0){F(t),v()},get onDelete(){return Q()},set onDelete(t=void 0){Q(t),v()},get onArchive(){return ce()},set onArchive(t=void 0){ce(t),v()},get onUnarchive(){return se()},set onUnarchive(t=void 0){se(t),v()},get isArchived(){return ie()},set isArchived(t=!1){ie(t),v()},get onClose(){return p()},set onClose(t=void 0){p(t),v()},get showDeleteOption(){return r()},set showDeleteOption(t=!0){r(t),v()},get showArchiveOption(){return O()},set showArchiveOption(t=!1){O(t),v()},get showPathCopy(){return S()},set showPathCopy(t=!0){S(t),v()},get showFileNameCopy(){return j()},set showFileNameCopy(t=!1){j(t),v()},get showFileActions(){return R()},set showFileActions(t=!0){R(t),v()},get workspaceFolderPath(){return q()},set workspaceFolderPath(t=""){q(t),v()},get isDiff(){return W()},set isDiff(t=!1){W(t),v()},get isWorkspaceRoot(){return x()},set isWorkspaceRoot(t=!1){x(t),v()},get additionalActions(){return J()},set additionalActions(t=[]){J(t),v()},get showDeleteFileOption(){return m()},set showDeleteFileOption(t=!1){m(t),v()},get onFileDeleted(){return f()},set onFileDeleted(t=void 0){f(t),v()},$set:Ye,$on:(t,l)=>$e(d,t,l)};{let t=k(()=>E()!=="list");me(be,{get actions(){return e(he)},get menu(){return e(t)},get iconWeight(){return H()}})}var ye=tt(ve);return ke(),ye}export{Yt as default};
1
+ import{t as Qe,bo as h,bw as Ye,b as $e,bq as nt,bm as w,bs as Ve}from"./51_h0jm2.js";import{bo as st,bs as et,a7 as L,ay as y,aD as e,bS as U,W as c,a5 as Pe,bA as De,bH as V,bl as _e,b_ as oe,bO as de,bn as tt,bf as je,bV as Ee,aA as v,c9 as k,aB as X,be as it,b$ as lt,bj as dt,cd as ct,ca as Je,bk as ut}from"./CJxGDkBm.js";import{i as G}from"./DCOxMTSf.js";import{J4 as Le,n4 as pt,u$ as ft}from"./Zldsekdv.js";import{aN as ht}from"./B6jI9-V_.js";import{cy as vt}from"./XJqoy2ap.js";import{c as gt}from"./ChTqQfQN.js";import{i as Ue,t as Xe}from"./H2jLkRRS.js";import{w as _t}from"./CqJQ3ikU.js";import{d as mt}from"./B0Z-1lwJ.js";import{F as Re,aw as bt,ax as wt,cV as He,aZ as qe,bg as kt,ao as yt,an as At,cS as Ge}from"./DSQT151l.js";import{m as K,w as Ft}from"./SX1khnGy.js";import{s as Ne,f as xe,c as Wt}from"./CpPNoOk-.js";import{s as Ct}from"./DxvSggY5.js";import{w as xt}from"./CF1Tu_8c.js";import"./JKboQXkL.js";import{i as M}from"./PXCFrn2V.js";import{g as It,e as Te}from"./Bjy4ygfJ.js";import{c as Z}from"./DGmOjLYi.js";import{a as Pt,r as Dt}from"./s97D1nrA.js";import{f as Mt,aa as Et}from"./Cdw_CIdg.js";import{t as Be}from"./DAsc1V4f.js";import{h as Ke,k as Ot,j as St,R as Rt,i as Nt,g as Tt,c as Bt,e as zt}from"./M18r7swD.js";import{M as Vt}from"./C1McR-sz.js";import{m as ze}from"./DmhHEMPi.js";var jt=X('<img alt="" class="size-4"/>'),Jt=X('<span class="min-w-0 flex-1 text-left"><span class="block truncate"> </span> <span class="block text-muted-foreground" aria-hidden="true" data-menu-action-reason=""> </span></span>'),Lt=X("<span> </span>"),Ut=X('<span data-menu-action-detail=""> </span>'),Xt=X('<span aria-hidden="true"><!></span>'),Ze=X("<!> <!> <!>",1),Ht=X('<div class="my-1 h-px bg-border" role="separator"></div>'),Me=X("<!> <!>",1),qt=X('<!> <p data-menu-action-note=""> </p>',1),Gt=X('<span class="flex size-4 shrink-0 items-center justify-center" aria-hidden="true"><!></span> <!> <!>',1),Kt=X('<p data-menu-action-note=""> </p>'),Zt=X('<div class="pl-4"><!> <!></div>'),Qt=X('<span class="sr-only"> </span>');function me(be,d){const we=st();if(new.target)return Qe({component:me,...be});et(d,!0);const Ie=(p,r=je)=>{var O=L(),S=y(O);{var j=W=>{const x=k(()=>Pt(r().editor));var J=L(),m=y(J);{var f=s=>{var i=jt();oe(()=>Ne(i,"src",`data:image/png;base64,${r().editor.iconBase64??""}`)),c(s,i)},o=s=>{var i=L(),b=y(i);Z(b,()=>e(x),(T,ae)=>{ae(T,{size:16})}),c(s,i)},N=s=>{{let i=k(()=>Dt(r().editor.category));Re(s,{get icon(){return e(i)},size:16})}};M(m,s=>{r().editor.iconBase64?s(f):e(x)?s(o,1):s(N,-1)})}c(W,J)},R=W=>{var x=L(),J=y(x);Ct(J,()=>r().iconSnippet),c(W,x)},q=W=>{{let x=k(()=>r().variant==="destructive"?"text-current":"text-muted-foreground");Re(W,{get icon(){return r().icon},get weight(){return H()},size:16,get class(){return e(x)}})}};M(S,W=>{r().editor?W(j):r().iconSnippet?W(R,1):r().icon&&W(q,2)})}c(p,O)},ne=(p,r=je)=>{var O=Ze(),S=y(O);{var j=m=>{var f=Jt(),o=Pe(f),N=_e(o,!0);Te(o,(b,T)=>Be?.(b,T),()=>r().label);var s=U(o,2),i=_e(s,!0);De(f),oe(()=>{de(N,r().label),de(i,r().disabledReason)}),c(m,f)},R=m=>{var f=Lt(),o=_e(f,!0);Te(f,(N,s)=>Be?.(N,s),()=>r().label),oe(()=>{xe(f,1,`min-w-0 truncate text-left ${r().detail?"flex-[1_0_auto]":"flex-1"}`),de(o,r().label)}),c(m,f)};M(S,m=>{r().disabledReason?m(j):m(R,-1)})}var q=U(S,2);{var W=m=>{var f=Ut(),o=_e(f,!0);Te(f,(N,s)=>Be?.(N,s),()=>r().detail),oe(()=>{xe(f,1,`ml-4 min-w-0 truncate ${(r().detailTone==="danger"?"text-danger":ze)??""}`),de(o,r().detail)}),c(m,f)};M(q,m=>{r().detail&&m(W)})}var x=U(q,2);{var J=m=>{var f=Xt(),o=Pe(f);Et(o,{children:(N,s)=>{it();var i=lt();oe(b=>de(i,b),[()=>xt(r().shortcut)]),c(N,i)},$$slots:{default:!0}}),De(f),oe(()=>xe(f,1,Wt(E()?"ml-4 flex h-lh shrink-0 items-center":"ml-4"))),c(m,f)};M(x,m=>{r().shortcut&&m(J)})}c(p,O)};let ke=h(d,"actions",7),E=h(d,"menu",7),H=h(d,"iconWeight",7),u=h(d,"onClose",7),A=h(d,"selection",7),F=Ee(null);function Q(p){p.disabled||p.disabledReason!==void 0||(p.onClick(),u()?.())}var ce={get actions(){return ke()},set actions(p){ke(p),v()},get menu(){return E()},set menu(p){E(p),v()},get iconWeight(){return H()},set iconWeight(p){H(p),v()},get onClose(){return u()},set onClose(p){u(p),v()},get selection(){return A()},set selection(p){A(p),v()},$set:Ye,$on:(p,r)=>$e(d,p,r)},se=L(),ie=y(se);return It(ie,17,ke,p=>p.id,(p,r)=>{const O=i=>{Ie(i,()=>e(r))},S=k(()=>!!(e(r).editor||e(r).iconSnippet||e(r).icon)),j=k(()=>e(r).disabled||e(r).disabledReason!==void 0),R=k(()=>e(r).disabledReason?`${we}-${e(r).id}-reason`:void 0);var q=Ze(),W=y(q);{var x=i=>{var b=L(),T=y(b);{var ae=a=>{var n=L(),g=y(n);Z(g,()=>Ke,(C,P)=>{P(C,{})}),c(a,n)},ue=a=>{var n=Ht();c(a,n)};M(T,a=>{E()?a(ae):a(ue,-1)})}c(i,b)};M(W,i=>{e(r).dividerBefore&&i(x)})}var J=U(W,2);{var m=i=>{var b=L(),T=y(b);{var ae=g=>{var C=L(),P=y(C);Z(P,()=>Nt,(I,D)=>{D(I,{children:(B,Y)=>{var $=Me(),pe=y($);{let te=k(()=>e(S)?O:void 0);Z(pe,()=>Ot,(fe,he)=>{he(fe,{get leading(){return e(te)},get disabled(){return e(j)},get"aria-describedby"(){return e(R)},get"data-action-id"(){return e(r).id},children:(ve,ye)=>{ne(ve,()=>e(r))},$$slots:{default:!0}})})}var ee=U(pe,2);{let te=k(()=>e(r).note?`${we}-${e(r).id}-note`:void 0);Z(ee,()=>St,(fe,he)=>{he(fe,{class:"w-60",get"aria-describedby"(){return e(te)},children:(ve,ye)=>{var t=Me(),l=y(t);{var _=re=>{var Ae=Me(),Fe=y(Ae);{let Ce=k(()=>e(r).submenu.find(ge=>ge.checked)?.id??"");Z(Fe,()=>Rt,(ge,Se)=>{Se(ge,{get value(){return e(Ce)},get"aria-label"(){return e(r).label},children:(rt,$t)=>{{let at=k(()=>e(r).submenu.filter(ot=>ot.checked!==void 0));me(rt,{get actions(){return e(at)},selection:"single",get menu(){return E()},get iconWeight(){return H()},get onClose(){return u()}})}},$$slots:{default:!0}})})}var We=U(Fe,2);{let Ce=k(()=>e(r).submenu.filter(ge=>ge.checked===void 0));me(We,{get actions(){return e(Ce)},get menu(){return E()},get iconWeight(){return H()},get onClose(){return u()}})}c(re,Ae)},z=re=>{me(re,{get actions(){return e(r).submenu},get menu(){return E()},get iconWeight(){return H()},get onClose(){return u()}})};M(l,re=>{e(r).selection==="single"?re(_):re(z,-1)})}var le=U(l,2);{var Oe=re=>{var Ae=qt(),Fe=y(Ae);Z(Fe,()=>Ke,(ge,Se)=>{Se(ge,{})});var We=U(Fe,2),Ce=_e(We,!0);oe(()=>{Ne(We,"id",`${we}-${e(r).id}-note`),xe(We,1,`type-caption px-2 py-1 ${ze}`),de(Ce,e(r).note)}),c(re,Ae)};M(le,re=>{e(r).note&&re(Oe)})}c(ve,t)},$$slots:{default:!0}})})}c(B,$)},$$slots:{default:!0}})}),c(g,C)},ue=g=>{var C=L(),P=y(C);{let I=k(()=>e(S)?O:void 0);Z(P,()=>Tt,(D,B)=>{B(D,{get leading(){return e(I)},get value(){return e(r).id},get disabled(){return e(j)},get"aria-describedby"(){return e(R)},closeOnSelect:!0,onSelect:()=>Q(e(r)),get"data-action-id"(){return e(r).id},children:(Y,$)=>{ne(Y,()=>e(r))},$$slots:{default:!0}})})}c(g,C)},a=g=>{var C=L(),P=y(C);{let I=k(()=>e(S)?O:void 0);Z(P,()=>Bt,(D,B)=>{B(D,{get leading(){return e(I)},get checked(){return e(r).checked},get disabled(){return e(j)},get"aria-describedby"(){return e(R)},closeOnSelect:!0,onSelect:()=>Q(e(r)),get"data-action-id"(){return e(r).id},children:(Y,$)=>{ne(Y,()=>e(r))},$$slots:{default:!0}})})}c(g,C)},n=g=>{var C=L(),P=y(C);{let I=k(()=>e(S)?O:void 0),D=k(()=>e(r).variant==="destructive");Z(P,()=>zt,(B,Y)=>{Y(B,{get leading(){return e(I)},get destructive(){return e(D)},get disabled(){return e(j)},get"aria-describedby"(){return e(R)},onSelect:()=>Q(e(r)),get"data-action-id"(){return e(r).id},children:($,pe)=>{ne($,()=>e(r))},$$slots:{default:!0}})})}c(g,C)};M(T,g=>{e(r).submenu?g(ae):A()==="single"&&e(r).checked!==void 0?g(ue,1):e(r).checked!==void 0?g(a,2):g(n,-1)})}c(i,b)},f=i=>{me(i,{get actions(){return e(r).submenu},get menu(){return E()},get iconWeight(){return H()},get onClose(){return u()}})},o=i=>{var b=Me(),T=y(b);{let a=k(()=>e(r).variant==="destructive"?"text-danger hover:text-danger":""),n=k(()=>e(r).submenu?e(F)===e(r).id:void 0);Mt(T,{variant:"ghost",size:"sm",get class(){return`w-full justify-start gap-2 ${e(a)??""}`},get disabled(){return e(j)},get"aria-describedby"(){return e(R)},get"aria-expanded"(){return e(n)},onclick:()=>e(r).submenu?V(F,e(F)===e(r).id?null:e(r).id,!0):Q(e(r)),children:(g,C)=>{var P=Gt(),I=y(P),D=Pe(I);Ie(D,()=>e(r)),De(I);var B=U(I,2);ne(B,()=>e(r));var Y=U(B,2);{var $=ee=>{{let te=k(()=>e(F)===e(r).id?bt:wt);Re(ee,{get icon(){return e(te)},size:12})}},pe=ee=>{var te=L(),fe=y(te);{let he=k(()=>e(r).checked?"checked":"empty");Z(fe,()=>Vt,(ve,ye)=>{ye(ve,{get state(){return e(he)}})})}c(ee,te)};M(Y,ee=>{e(r).submenu?ee($):e(r).checked!==void 0&&ee(pe,1)})}c(g,P)},$$slots:{default:!0}})}var ae=U(T,2);{var ue=a=>{var n=Zt(),g=Pe(n);me(g,{get actions(){return e(r).submenu},get menu(){return E()},get iconWeight(){return H()},get onClose(){return u()}});var C=U(g,2);{var P=I=>{var D=Kt(),B=_e(D,!0);oe(()=>{xe(D,1,`type-caption px-2 py-1 ${ze}`),de(B,e(r).note)}),c(I,D)};M(C,I=>{e(r).note&&I(P)})}De(n),c(a,n)};M(ae,a=>{e(r).submenu&&e(F)===e(r).id&&a(ue)})}c(i,b)};M(J,i=>{E()?i(m):e(r).id==="open-in"&&e(r).submenu?i(f,1):i(o,-1)})}var N=U(J,2);{var s=i=>{var b=Qt(),T=_e(b,!0);oe(()=>{Ne(b,"id",e(R)),de(T,e(r).disabledReason)}),c(i,b)};M(N,i=>{e(r).disabledReason&&i(s)})}c(p,q)}),c(be,se),tt(ce)}function Yt(be,d){if(new.target)return Qe({component:Yt,...be});et(d,!0);const we=()=>Ve(T,"$installedEditors$",ne),Ie=()=>Ve(ue,"$isWorkspaceHostLocal$",ne),[ne,ke]=nt();let E=h(d,"layout",7,"list"),H=h(d,"iconWeight",7),u=h(d,"filePath",7,""),A=h(d,"workspaceId",7,""),F=h(d,"isDirectory",7,!0),Q=h(d,"onDelete",7,void 0),ce=h(d,"onArchive",7,void 0),se=h(d,"onUnarchive",7,void 0),ie=h(d,"isArchived",7,!1),p=h(d,"onClose",7,void 0),r=h(d,"showDeleteOption",7,!0),O=h(d,"showArchiveOption",7,!1),S=h(d,"showPathCopy",7,!0),j=h(d,"showFileNameCopy",7,!1),R=h(d,"showFileActions",7,!0),q=h(d,"workspaceFolderPath",7,""),W=h(d,"isDiff",7,!1),x=h(d,"isWorkspaceRoot",7,!1),J=h(d,"additionalActions",23,()=>[]),m=h(d,"showDeleteFileOption",7,!1),f=h(d,"onFileDeleted",7,void 0);const o=gt("WorkspaceActionsMenu");let N=!1;dt(()=>{N=!0});function s(){N||p()?.()}const i=_t("externalEditors"),b=ct(A());Je(()=>{b.set(A())});const T=ht(b),ae=k(we),ue=vt(b);let a=Ee(""),n=Ee(""),g=Ee(!1);ut(()=>{Le.dispatch(pt())}),Je(()=>{u()&&A()?G("workspace:get",{id:A()}).then(t=>{if(t&&t.success&&t.data){const l=t.data,_=l.worktreePath||l.repositoryPath||l.path,z=q()==="__WORKSPACE_ROOT__"?_:q()||_;if(z){const le=z.replace(/\\/g,"/");x()?V(a,le,!0):Ue(u())?V(a,u().replace(/\\/g,"/"),!0):V(a,`${le}/${u()}`.replace(/\/+/g,"/"),!0),V(n,le,!0),o.info("[WorkspaceActionsMenu] Resolved file path:",{filePath:u(),workspacePath:z,resolvedPath:e(a)})}else V(a,u()),V(n,""),l.status!=="archived"&&l.status!=="deleted"&&o.warn("[WorkspaceActionsMenu] No workspace path found:",l)}else V(a,u()),V(n,""),t?.error&&!t.error.includes("not found")&&o.warn("[WorkspaceActionsMenu] Workspace not available:",t)}).catch(t=>{V(a,u()),V(n,""),t?.message?.includes("not found")||o.error("[WorkspaceActionsMenu] Failed to resolve path:",t)}):(V(a,u()),o.info("[WorkspaceActionsMenu] Using filePath directly:",{filePath:u(),workspaceId:A()}))});async function C(){if(!e(a)){o.warn("[WorkspaceActionsMenu] No resolved path for VSCode");return}try{if(W()&&!F()){o.info("[WorkspaceActionsMenu] Opening diff in VSCode:",{resolvedPath:e(a)}),await G("vscode:open-git-diff",{filePath:e(a),workspacePath:e(n)||void 0}),s();return}let t=e(a);if(e(n))!F()&&!x()?t={folder:e(n),file:e(a)}:t=e(n);else if(!F()){const l=e(a).includes("\\")?"\\":"/",_=e(a).split(l);_.length>1&&(t={folder:_.slice(0,-1).join(l),file:e(a)})}await G("vscode:open",t),s()}catch(t){o.error("Failed to open in VSCode:",t),K.error(t instanceof Error?t.message:w.ui_workspaceActions_openFailed_error({name:"VS Code"}))}}async function P(){if(!e(a)){o.warn("[WorkspaceActionsMenu] No resolved path for JetBrains");return}try{let t=e(a);e(n)&&!F()?t={folder:e(n),file:e(a)}:e(n)&&(t=e(n)),await G("jetbrains:open",t),s()}catch(t){o.error("Failed to open in JetBrains:",t),K.error(t instanceof Error?t.message:w.ui_workspaceActions_openFailed_error({name:"JetBrains"}))}}async function I(){if(!e(a)){o.warn("[WorkspaceActionsMenu] No resolved path for Xcode");return}try{if(A()&&e(n)){Le.dispatch(ft(A(),e(n),F()?void 0:e(a))),s();return}let t=e(a);e(n)&&!F()?t={folder:e(n),file:e(a)}:e(n)&&(t={folder:e(n)}),await G("xcode:open",t),s()}catch(t){o.error("Failed to open in Xcode:",t),K.error(t instanceof Error?t.message:w.ui_workspaceActions_openFailed_error({name:"Xcode"}))}}async function D(t){if(o.info("[WorkspaceActionsMenu] openInEditor called",{editorId:t.id,appName:t.appName,handlerType:t.handlerType,resolvedPath:e(a),isDirectory:F()}),!e(a)){o.warn("[WorkspaceActionsMenu] openInEditor: No resolved path, aborting");return}const l=F()?e(a):e(a).substring(0,e(a).lastIndexOf("/"));o.info(`[WorkspaceActionsMenu] openInEditor: targetPath=${l}, handlerType=${t.handlerType}`);try{switch(t.handlerType){case"finder":o.info("[WorkspaceActionsMenu] openInEditor: Invoking shell:showItemInFolder"),await G("shell:showItemInFolder",{path:l});break;case"vscode":o.info("[WorkspaceActionsMenu] openInEditor: Delegating to openInVSCode"),await C();return;case"jetbrains":o.info("[WorkspaceActionsMenu] openInEditor: Delegating to openInJetBrains"),await P();return;case"xcode":o.info("[WorkspaceActionsMenu] openInEditor: Delegating to openInXcode"),await I();return;case"generic":default:{o.info(`[WorkspaceActionsMenu] openInEditor: Invoking external-editors:open for ${t.id}`);const _=await G("external-editors:open",{editorId:t.id,path:l});o.info("[WorkspaceActionsMenu] openInEditor: external-editors:open result",_);break}}s()}catch(_){o.error(`[WorkspaceActionsMenu] Failed to open in ${t.appName}:`,_),K.error(_ instanceof Error?_.message:w.ui_workspaceActions_openFailed_error({name:t.appName}))}}async function B(){if(!e(a)){o.warn("No resolved path for openWithOther");return}try{let t=e(a);F()&&e(n)&&(t=e(n));const l=await G("external-editors:open-with-other",{path:t});if(!l?.success){l?.error!=="No application selected"&&(o.error("Failed to open with other app:",l?.error),K.error(l?.error||w.ui_workspaceActions_openOtherFailed_error()));return}s()}catch(t){o.error("Failed to open with other app:",t),K.error(t instanceof Error?t.message:w.ui_workspaceActions_openOtherFailed_error())}}async function Y(){if(e(a))try{await navigator.clipboard.writeText(Xe(e(a))),s()}catch(t){o.error("Failed to copy path:",t)}}async function $(){if(u())try{let t=u().replace(/\\/g,"/");if(Ue(u())&&e(n)){const l=e(n).endsWith("/")?e(n):e(n)+"/";t.startsWith(l)&&(t=t.slice(l.length))}await navigator.clipboard.writeText(Xe(t)),s()}catch(t){o.error("Failed to copy workspace path:",t)}}async function pe(){if(u())try{const t=u().split(/[/\\]/).pop()||"";await navigator.clipboard.writeText(t),s()}catch(t){o.error("Failed to copy file name:",t)}}function ee(){Q()&&(Q()(),s())}async function te(){if(!(!A()||!e(a)||e(g))){V(g,!0);try{const t=u().split(/[/\\]/).pop()||"file",l=e(a);let _="";try{_=(await G("file:read",{path:l,workspaceId:A()}))?.data?.content??""}catch{}const z=await G("file:delete",{path:l,workspaceId:A()});if(z?.success){f()?.(),s();const le=K.warning(w.ui_workspaceActions_deletedFile_label({name:t}),Ft({duration:15e3,action:{label:w.ui_workspaceActions_undo_label(),onClick:async()=>{try{await G("file:write",{path:l,content:_,workspaceId:A()}),mt("file:changed",{workspaceId:A(),type:"create",filePath:l}),K.dismiss(le)}catch(Oe){o.error("[WorkspaceActionsMenu] Failed to restore file",Oe),K.error(w.ui_workspaceActions_restoreFileFailed_error())}}}}))}else K.error(w.ui_workspaceActions_deleteFileFailedDetail_error({error:z?.error||w.ui_workspaceActions_unknown_error()}))}catch(t){o.error("[WorkspaceActionsMenu] Error deleting file",t),K.error(w.ui_workspaceActions_deleteFileFailed_error())}finally{V(g,!1)}}}function fe(){ie()&&se()?(se()(),s()):!ie()&&ce()&&(ce()(),s())}const he=k(()=>{const t=[];R()&&(i&&Ie()&&t.push({id:"open-in",label:w.ui_openCombo_openInApp_tooltip(),icon:He,onClick:()=>{},submenu:[...e(ae).map(_=>({id:`editor:${_.id}`,label:w.ui_workspaceActions_openIn_label({name:_.name}),editor:_,onClick:()=>{D(_)}})),{id:"choose-app",label:w.ui_workspaceActions_chooseApp_label(),icon:He,onClick:()=>{B()}}]}),S()&&t.push({id:"copy-absolute-path",label:w.ui_workspaceActions_copyAbsolutePath_label(),icon:qe,disabled:!e(a),dividerBefore:t.length>0,onClick:()=>{Y()}}),S()&&!x()&&t.push({id:"copy-relative-path",label:w.ui_workspaceActions_copyRelativePath_label(),icon:qe,disabled:!u(),onClick:()=>{$()}}),j()&&!F()&&t.push({id:"copy-file-name",label:w.ui_workspaceActions_copyFileName_label(),icon:kt,disabled:!u(),onClick:()=>{pe()}}));const l=_=>_.map(z=>({...z,submenu:z.submenu?l(z.submenu):void 0,onClick:()=>{z.onClick(),s()}}));return t.push(...l(J())),O()&&(ce()||se())&&t.push({id:"archive-workspace",label:ie()?w.ui_workspaceActions_unarchiveSpace_label():w.ui_workspaceActions_archiveSpace_label(),icon:ie()?yt:At,dividerBefore:t.length>0,onClick:fe}),r()&&Q()&&t.push({id:"delete-workspace",label:w.ui_workspaceActions_deleteSpace_label(),icon:Ge,variant:"destructive",dividerBefore:t.length>0&&t.at(-1)?.id!=="archive-workspace",onClick:ee}),m()&&!F()&&t.push({id:"delete-file",label:w.ui_workspaceActions_deleteFile_label(),icon:Ge,variant:"destructive",disabled:e(g)||!e(a)||!A(),dividerBefore:t.length>0,onClick:()=>{te()}}),t});var ve={get layout(){return E()},set layout(t="list"){E(t),v()},get iconWeight(){return H()},set iconWeight(t){H(t),v()},get filePath(){return u()},set filePath(t=""){u(t),v()},get workspaceId(){return A()},set workspaceId(t=""){A(t),v()},get isDirectory(){return F()},set isDirectory(t=!0){F(t),v()},get onDelete(){return Q()},set onDelete(t=void 0){Q(t),v()},get onArchive(){return ce()},set onArchive(t=void 0){ce(t),v()},get onUnarchive(){return se()},set onUnarchive(t=void 0){se(t),v()},get isArchived(){return ie()},set isArchived(t=!1){ie(t),v()},get onClose(){return p()},set onClose(t=void 0){p(t),v()},get showDeleteOption(){return r()},set showDeleteOption(t=!0){r(t),v()},get showArchiveOption(){return O()},set showArchiveOption(t=!1){O(t),v()},get showPathCopy(){return S()},set showPathCopy(t=!0){S(t),v()},get showFileNameCopy(){return j()},set showFileNameCopy(t=!1){j(t),v()},get showFileActions(){return R()},set showFileActions(t=!0){R(t),v()},get workspaceFolderPath(){return q()},set workspaceFolderPath(t=""){q(t),v()},get isDiff(){return W()},set isDiff(t=!1){W(t),v()},get isWorkspaceRoot(){return x()},set isWorkspaceRoot(t=!1){x(t),v()},get additionalActions(){return J()},set additionalActions(t=[]){J(t),v()},get showDeleteFileOption(){return m()},set showDeleteFileOption(t=!1){m(t),v()},get onFileDeleted(){return f()},set onFileDeleted(t=void 0){f(t),v()},$set:Ye,$on:(t,l)=>$e(d,t,l)};{let t=k(()=>E()!=="list");me(be,{get actions(){return e(he)},get menu(){return e(t)},get iconWeight(){return H()}})}var ye=tt(ve);return ke(),ye}export{Yt as default};