reactjs-tiptap-editor 1.0.10 → 1.0.12

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 (209) hide show
  1. package/lib/{ActionMenuButton-CKTxYtl7.js → ActionMenuButton-BKqin6Kz.js} +17 -13
  2. package/lib/ActionMenuButton-CPPHERbq.cjs +1 -0
  3. package/lib/Attachment.cjs +2 -2
  4. package/lib/Attachment.js +24 -21
  5. package/lib/Blockquote.cjs +2 -2
  6. package/lib/Blockquote.js +7 -5
  7. package/lib/Bold.cjs +1 -1
  8. package/lib/Bold.js +11 -9
  9. package/lib/BulletList.cjs +1 -1
  10. package/lib/BulletList.js +14 -12
  11. package/lib/Clear.cjs +1 -1
  12. package/lib/Clear.js +3 -3
  13. package/lib/Code.cjs +1 -1
  14. package/lib/Code.js +11 -9
  15. package/lib/CodeBlock.cjs +22 -22
  16. package/lib/CodeBlock.js +102 -100
  17. package/lib/CodeView.cjs +1 -1
  18. package/lib/CodeView.js +10 -8
  19. package/lib/Color.cjs +1 -1
  20. package/lib/Color.js +20 -18
  21. package/lib/Column.cjs +1 -1
  22. package/lib/Column.js +7 -5
  23. package/lib/{Drawer-Cfx115up.js → Drawer-DUPsBE0H.js} +10 -9
  24. package/lib/Drawer-fplzqNI6.cjs +1 -0
  25. package/lib/Drawer.cjs +1 -1
  26. package/lib/Drawer.js +3 -3
  27. package/lib/Emoji.cjs +1 -1
  28. package/lib/Emoji.js +11 -9
  29. package/lib/{Excalidraw-CO93Tsmb.js → Excalidraw-BEzpvRLx.js} +20 -19
  30. package/lib/Excalidraw-qjnQspLq.cjs +1 -0
  31. package/lib/Excalidraw.cjs +1 -1
  32. package/lib/Excalidraw.js +2 -2
  33. package/lib/ExportPdf.cjs +2 -2
  34. package/lib/ExportPdf.js +7 -5
  35. package/lib/ExportWord.cjs +1 -1
  36. package/lib/ExportWord.js +7 -5
  37. package/lib/FontFamily.cjs +1 -1
  38. package/lib/FontFamily.js +9 -8
  39. package/lib/FontSize.cjs +1 -1
  40. package/lib/FontSize.js +13 -12
  41. package/lib/Heading.cjs +1 -1
  42. package/lib/Heading.js +25 -24
  43. package/lib/Highlight.cjs +1 -1
  44. package/lib/Highlight.js +9 -7
  45. package/lib/History.cjs +1 -1
  46. package/lib/History.js +18 -15
  47. package/lib/HorizontalRule.cjs +1 -1
  48. package/lib/HorizontalRule.js +7 -5
  49. package/lib/Icon-CiR8RqdQ.cjs +1 -0
  50. package/lib/Icon-ONE1AwKo.js +12 -0
  51. package/lib/{Iframe-DwhclppJ.js → Iframe-CBTnv2mk.js} +41 -39
  52. package/lib/Iframe-DsUNJ2n2.cjs +1 -0
  53. package/lib/Iframe.cjs +1 -1
  54. package/lib/Iframe.js +2 -2
  55. package/lib/Image.cjs +1 -1
  56. package/lib/Image.js +25 -23
  57. package/lib/ImageGif.cjs +1 -1
  58. package/lib/ImageGif.js +53 -51
  59. package/lib/ImportWord.cjs +31 -31
  60. package/lib/ImportWord.js +8 -6
  61. package/lib/{Indent-BOsymiZ7.js → Indent-B00o0P0M.js} +26 -24
  62. package/lib/Indent-CaGP0qTp.cjs +1 -0
  63. package/lib/Indent.cjs +1 -1
  64. package/lib/Indent.js +2 -2
  65. package/lib/Italic.cjs +1 -1
  66. package/lib/Italic.js +12 -10
  67. package/lib/Katex-XsfpKgJU.cjs +4 -0
  68. package/lib/{Katex-BYK-b9X2.js → Katex-x370CSXZ.js} +12 -10
  69. package/lib/Katex.cjs +1 -1
  70. package/lib/Katex.js +2 -2
  71. package/lib/LineHeight.cjs +1 -1
  72. package/lib/LineHeight.js +10 -8
  73. package/lib/Link.cjs +1 -1
  74. package/lib/Link.js +2 -2
  75. package/lib/{LinkEditBlock-DgrLUMsJ.js → LinkEditBlock-C_ipl3EA.js} +23 -21
  76. package/lib/{LinkEditBlock-4-iRXH7m.cjs → LinkEditBlock-xt88G5fb.cjs} +2 -2
  77. package/lib/Mention.cjs +1 -1
  78. package/lib/Mention.js +3 -3
  79. package/lib/Mermaid.cjs +2 -2
  80. package/lib/Mermaid.js +18 -17
  81. package/lib/MoreMark.cjs +1 -1
  82. package/lib/MoreMark.js +25 -22
  83. package/lib/OrderedList.cjs +1 -1
  84. package/lib/OrderedList.js +10 -8
  85. package/lib/SearchAndReplace.cjs +1 -1
  86. package/lib/SearchAndReplace.js +43 -41
  87. package/lib/SlashCommand.cjs +1 -1
  88. package/lib/SlashCommand.js +6 -6
  89. package/lib/SlashCommandNodeView-BT5ystah.cjs +1 -0
  90. package/lib/{SlashCommandNodeView-BpNNU7Sm.js → SlashCommandNodeView-DX6axvLs.js} +75 -66
  91. package/lib/Strike.cjs +1 -1
  92. package/lib/Strike.js +7 -5
  93. package/lib/Table-DSRSwtXx.cjs +9 -0
  94. package/lib/{Table-CT9R9Sdq.js → Table-DidusYID.js} +10 -8
  95. package/lib/Table.cjs +1 -1
  96. package/lib/Table.js +1 -1
  97. package/lib/TaskList.cjs +1 -1
  98. package/lib/TaskList.js +15 -13
  99. package/lib/TextAlign.cjs +1 -1
  100. package/lib/TextAlign.js +20 -17
  101. package/lib/TextDirection.cjs +1 -1
  102. package/lib/TextDirection.js +20 -17
  103. package/lib/TextUnderline.cjs +1 -1
  104. package/lib/TextUnderline.js +7 -5
  105. package/lib/Twitter-CBuVBQM1.cjs +1 -0
  106. package/lib/{Twitter-mowilxRd.js → Twitter-D58T0Zt3.js} +51 -49
  107. package/lib/Twitter.cjs +1 -1
  108. package/lib/Twitter.js +2 -2
  109. package/lib/Video.cjs +1 -1
  110. package/lib/Video.js +13 -11
  111. package/lib/bubble.cjs +4 -4
  112. package/lib/bubble.js +403 -407
  113. package/lib/{button-CBO-WDXK.js → button-9_8t7ca7.js} +4 -3
  114. package/lib/button-Cs9TroWr.cjs +1 -0
  115. package/lib/{checkbox-DUcLSGZD.cjs → checkbox-BQRKTXXr.cjs} +1 -1
  116. package/lib/{checkbox-D1h32VWM.js → checkbox-DnkkV6qo.js} +1 -1
  117. package/lib/{index-BBNITgNi.cjs → clsx-CXbNJWDD.cjs} +13 -13
  118. package/lib/{index-sVScpCFG.js → clsx-DmuN0U_8.js} +228 -228
  119. package/lib/{dialog-DY868Uji.cjs → dialog-BS3zm-T9.cjs} +1 -1
  120. package/lib/{dialog-DSvgtlDI.js → dialog-DhayAPvV.js} +1 -1
  121. package/lib/{dropdown-menu-BripAeGB.cjs → dropdown-menu-CxwWX0yj.cjs} +1 -1
  122. package/lib/{dropdown-menu-B88Qn2KR.js → dropdown-menu-DQqKeZcx.js} +1 -1
  123. package/lib/events.constant-Dq21NPdV.cjs +1 -0
  124. package/lib/events.constant-do95b767.js +21 -0
  125. package/lib/{index-CApXPpjF.cjs → index-BCzvbrf5.cjs} +1 -1
  126. package/lib/{index-0OnGZkVF.js → index-BDX1uE62.js} +78 -312
  127. package/lib/index-CBFmXCcU.cjs +1 -0
  128. package/lib/{index-DmPwbBqm.js → index-CKmT9KAQ.js} +1 -1
  129. package/lib/index-CVFzP1Dc.cjs +1 -0
  130. package/lib/index-CX4pNJlH.cjs +1 -0
  131. package/lib/index-CjhjjJsN.cjs +1 -0
  132. package/lib/index-Cs6cp0Y6.cjs +1 -0
  133. package/lib/{index-9A6-kVBM.js → index-D1jd7elj.js} +1 -1
  134. package/lib/{index-BIqaogQg.js → index-D9JOHlso.js} +449 -1216
  135. package/lib/{index-DRHrDScg.js → index-DdEmgiAA.js} +1 -1
  136. package/lib/{index-DKt5wfAc.js → index-DvvwJvau.js} +23 -23
  137. package/lib/index-EAK64CCA.js +425 -0
  138. package/lib/{index--nUS7Y66.cjs → index-neeeY2o7.cjs} +3 -3
  139. package/lib/index.cjs +9 -2
  140. package/lib/index.js +142 -26
  141. package/lib/{input-BeD5GdMv.cjs → input-BJ7ihMq-.cjs} +1 -1
  142. package/lib/{input-Bx4uo4gO.js → input-YoheBL2D.js} +1 -1
  143. package/lib/{isNumber-Bv1Qhmw8.cjs → isNumber-BTYSVlKo.cjs} +1 -1
  144. package/lib/{isNumber-DF0fU3ob.js → isNumber-DmQXlKp3.js} +1 -1
  145. package/lib/label-C8PLcjFI.js +19 -0
  146. package/lib/label-Y7_hvqf2.cjs +1 -0
  147. package/lib/locale-bundle.cjs +1 -1
  148. package/lib/locale-bundle.js +6 -7
  149. package/lib/locales/index.d.ts +3 -4316
  150. package/lib/{popover-Csk538NC.cjs → popover-BiSrlM4j.cjs} +1 -1
  151. package/lib/{popover-BVX8otO9.js → popover-CWmTzHSy.js} +1 -1
  152. package/lib/react-BEoMZB61.cjs +1 -0
  153. package/lib/react-c9FSfB30.js +27 -0
  154. package/lib/separator-C-DKMYmg.js +329 -0
  155. package/lib/separator-CJ_adziN.cjs +1 -0
  156. package/lib/store/EditorEditableReactive.d.ts +1 -0
  157. package/lib/store/ThemeColorReactive.d.ts +1 -0
  158. package/lib/store/commandList.d.ts +1 -1
  159. package/lib/store/store.d.ts +6 -7
  160. package/lib/store-BKMaw1AW.cjs +1 -0
  161. package/lib/store-DG7cMfET.js +10 -0
  162. package/lib/style.css +1 -1
  163. package/lib/{tabs-DOasUMDU.cjs → tabs-DpHSMyF_.cjs} +1 -1
  164. package/lib/{tabs-BKpr0QQB.js → tabs-DxlKKM-N.js} +1 -1
  165. package/lib/{textarea-Ba9OOzba.js → textarea-D7m-apUh.js} +1 -1
  166. package/lib/{textarea-D9egO4qC.cjs → textarea-DU9RMi6u.cjs} +1 -1
  167. package/lib/theme/theme.d.ts +5 -0
  168. package/lib/theme.cjs +1 -1
  169. package/lib/theme.js +37 -8
  170. package/lib/{throttle-DsowOft0.js → throttle-BRtichEP.js} +1 -1
  171. package/lib/throttle-gTTvqDTW.cjs +1 -0
  172. package/lib/toggle-BYvLnjCL.cjs +1 -0
  173. package/lib/toggle-Bxwwb_Kp.js +99 -0
  174. package/lib/tooltip-BTy5CRrN.js +24 -0
  175. package/lib/tooltip-COvf4_R-.cjs +1 -0
  176. package/lib/{updatePosition-Bbd8ETMv.js → updatePosition-CUukgu-Q.js} +2 -2
  177. package/lib/updatePosition-Cjuj2E26.cjs +1 -0
  178. package/lib/{useButtonProps-C_bqxmHi.js → useButtonProps-CfYtuEnd.js} +48 -36
  179. package/lib/useButtonProps-CydzndG1.cjs +1 -0
  180. package/lib/utils/customEvents/events.constant.d.ts +0 -5
  181. package/package.json +3 -3
  182. package/lib/ActionMenuButton-BPdRqzDX.cjs +0 -1
  183. package/lib/Drawer-hHj4Opkg.cjs +0 -1
  184. package/lib/Excalidraw-8pWJ17Ye.cjs +0 -1
  185. package/lib/Icon-D7GJZzoa.js +0 -10
  186. package/lib/Icon-gtc3g-VK.cjs +0 -1
  187. package/lib/Iframe-BmXO2c65.cjs +0 -1
  188. package/lib/Indent-DPkMWfcv.cjs +0 -1
  189. package/lib/Katex-B1XbT8-X.cjs +0 -4
  190. package/lib/SlashCommandNodeView-CQvMTXys.cjs +0 -1
  191. package/lib/Table-LnWGm2m8.cjs +0 -9
  192. package/lib/Twitter-Bo4JkBTL.cjs +0 -1
  193. package/lib/button-wt49IYwP.cjs +0 -1
  194. package/lib/events.constant-DQYeJpu5.cjs +0 -1
  195. package/lib/events.constant-wrlJ_7JZ.js +0 -26
  196. package/lib/index-BZ6DfR2r.cjs +0 -1
  197. package/lib/index-BvIJKpX1.cjs +0 -8
  198. package/lib/index-Cv9Z6dyV.cjs +0 -1
  199. package/lib/index-FSRjMsxW.cjs +0 -1
  200. package/lib/label--161UPH6.cjs +0 -1
  201. package/lib/label-uKG7RzFU.js +0 -18
  202. package/lib/separator-DLRVddHS.cjs +0 -1
  203. package/lib/separator-DtrEdjAF.js +0 -241
  204. package/lib/store/ProviderUniqueId.d.ts +0 -6
  205. package/lib/store-B8IkVz1J.cjs +0 -1
  206. package/lib/store-CsIFDUKR.js +0 -10
  207. package/lib/throttle-BM3Bmbf_.cjs +0 -1
  208. package/lib/updatePosition-M2IyqkI1.cjs +0 -1
  209. package/lib/useButtonProps-DEtmDVPr.cjs +0 -1
@@ -4,19 +4,6 @@ import { jsx as ae, jsxs as Mr, Fragment as un } from "react/jsx-runtime";
4
4
  import { NodeSelection as le, TextSelection as F, Plugin as X, PluginKey as Y, Selection as ie, AllSelection as Cr } from "@tiptap/pm/state";
5
5
  import { Fragment as se, Slice as Ar, Node as Rr, Schema as Tr, DOMParser as je } from "@tiptap/pm/model";
6
6
  import "@tiptap/pm/view";
7
- function fn(n) {
8
- var e, t, r = "";
9
- if (typeof n == "string" || typeof n == "number") r += n;
10
- else if (typeof n == "object") if (Array.isArray(n)) {
11
- var i = n.length;
12
- for (e = 0; e < i; e++) n[e] && (t = fn(n[e])) && (r && (r += " "), r += t);
13
- } else for (t in n) n[t] && (r && (r += " "), r += t);
14
- return r;
15
- }
16
- function Fa() {
17
- for (var n, e, t = 0, r = "", i = arguments.length; t < i; t++) (n = arguments[t]) && (e = fn(n)) && (r && (r += " "), r += e);
18
- return r;
19
- }
20
7
  var xe = { exports: {} }, We = {};
21
8
  /**
22
9
  * @license React
@@ -136,7 +123,7 @@ function ut() {
136
123
  return Ot || (Ot = 1, process.env.NODE_ENV === "production" ? xe.exports = Or() : xe.exports = Nr()), xe.exports;
137
124
  }
138
125
  var Ir = ut();
139
- function dn(n, e, t) {
126
+ function fn(n, e, t) {
140
127
  for (let r = 0; ; r++) {
141
128
  if (r == n.childCount || r == e.childCount)
142
129
  return n.childCount == e.childCount ? null : t;
@@ -153,14 +140,14 @@ function dn(n, e, t) {
153
140
  return t;
154
141
  }
155
142
  if (i.content.size || s.content.size) {
156
- let o = dn(i.content, s.content, t + 1);
143
+ let o = fn(i.content, s.content, t + 1);
157
144
  if (o != null)
158
145
  return o;
159
146
  }
160
147
  t += i.nodeSize;
161
148
  }
162
149
  }
163
- function hn(n, e, t, r) {
150
+ function dn(n, e, t, r) {
164
151
  for (let i = n.childCount, s = e.childCount; ; ) {
165
152
  if (i == 0 || s == 0)
166
153
  return i == s ? null : { a: t, b: r };
@@ -178,7 +165,7 @@ function hn(n, e, t, r) {
178
165
  return { a: t, b: r };
179
166
  }
180
167
  if (o.content.size || a.content.size) {
181
- let c = hn(o.content, a.content, t - 1, r - 1);
168
+ let c = dn(o.content, a.content, t - 1, r - 1);
182
169
  if (c)
183
170
  return c;
184
171
  }
@@ -347,7 +334,7 @@ class v {
347
334
  fragment differ, or `null` if they are the same.
348
335
  */
349
336
  findDiffStart(e, t = 0) {
350
- return dn(this, e, t);
337
+ return fn(this, e, t);
351
338
  }
352
339
  /**
353
340
  Find the first position, searching from the end, at which this
@@ -356,7 +343,7 @@ class v {
356
343
  nodes, an object with two separate positions is returned.
357
344
  */
358
345
  findDiffEnd(e, t = this.size, r = e.size) {
359
- return hn(this, e, t, r);
346
+ return dn(this, e, t, r);
360
347
  }
361
348
  /**
362
349
  Find the index and inner offset corresponding to a given relative
@@ -600,14 +587,14 @@ class w {
600
587
  @internal
601
588
  */
602
589
  insertAt(e, t) {
603
- let r = mn(this.content, e + this.openStart, t);
590
+ let r = pn(this.content, e + this.openStart, t);
604
591
  return r && new w(r, this.openStart, this.openEnd);
605
592
  }
606
593
  /**
607
594
  @internal
608
595
  */
609
596
  removeBetween(e, t) {
610
- return new w(pn(this.content, e + this.openStart, t + this.openStart), this.openStart, this.openEnd);
597
+ return new w(hn(this.content, e + this.openStart, t + this.openStart), this.openStart, this.openEnd);
611
598
  }
612
599
  /**
613
600
  Tests whether this slice is equal to another slice.
@@ -655,7 +642,7 @@ class w {
655
642
  }
656
643
  }
657
644
  w.empty = new w(v.empty, 0, 0);
658
- function pn(n, e, t) {
645
+ function hn(n, e, t) {
659
646
  let { index: r, offset: i } = n.findIndex(e), s = n.maybeChild(r), { index: o, offset: a } = n.findIndex(t);
660
647
  if (i == e || s.isText) {
661
648
  if (a != t && !n.child(o).isText)
@@ -664,13 +651,13 @@ function pn(n, e, t) {
664
651
  }
665
652
  if (r != o)
666
653
  throw new RangeError("Removing non-flat range");
667
- return n.replaceChild(r, s.copy(pn(s.content, e - i - 1, t - i - 1)));
654
+ return n.replaceChild(r, s.copy(hn(s.content, e - i - 1, t - i - 1)));
668
655
  }
669
- function mn(n, e, t, r) {
656
+ function pn(n, e, t, r) {
670
657
  let { index: i, offset: s } = n.findIndex(e), o = n.maybeChild(i);
671
658
  if (s == e || o.isText)
672
659
  return r && !r.canReplace(i, i, t) ? null : n.cut(0, e).append(t).append(n.cut(e));
673
- let a = mn(o.content, e - s - 1, t, o);
660
+ let a = pn(o.content, e - s - 1, t, o);
674
661
  return a && n.replaceChild(i, o.copy(a));
675
662
  }
676
663
  class it {
@@ -946,7 +933,7 @@ class st {
946
933
  return e.cached.domParser || (e.cached.domParser = new st(e, st.schemaRules(e)));
947
934
  }
948
935
  }
949
- const yn = {
936
+ const mn = {
950
937
  address: !0,
951
938
  article: !0,
952
939
  aside: !0,
@@ -986,7 +973,7 @@ const yn = {
986
973
  script: !0,
987
974
  style: !0,
988
975
  title: !0
989
- }, gn = { ol: !0, ul: !0 }, ye = 1, ot = 2, me = 4;
976
+ }, yn = { ol: !0, ul: !0 }, ye = 1, ot = 2, me = 4;
990
977
  function Nt(n, e, t) {
991
978
  return e != null ? (e ? ye : 0) | (e === "full" ? ot : 0) : n && n.whitespace == "pre" ? ye | ot : t & ~me;
992
979
  }
@@ -1020,7 +1007,7 @@ class Ee {
1020
1007
  return !e && this.match && (t = t.append(this.match.fillBefore(v.empty, !0))), this.type ? this.type.create(this.attrs, t, this.marks) : t;
1021
1008
  }
1022
1009
  inlineContext(e) {
1023
- return this.type ? this.type.inlineContent : this.content.length ? this.content[0].isInline : e.parentNode && !yn.hasOwnProperty(e.parentNode.nodeName.toLowerCase());
1010
+ return this.type ? this.type.inlineContent : this.content.length ? this.content[0].isInline : e.parentNode && !mn.hasOwnProperty(e.parentNode.nodeName.toLowerCase());
1024
1011
  }
1025
1012
  }
1026
1013
  class It {
@@ -1066,14 +1053,14 @@ class It {
1066
1053
  let i = this.localPreserveWS, s = this.top;
1067
1054
  (e.tagName == "PRE" || /pre/.test(e.style && e.style.whiteSpace)) && (this.localPreserveWS = !0);
1068
1055
  let o = e.nodeName.toLowerCase(), a;
1069
- gn.hasOwnProperty(o) && this.parser.normalizeLists && Wr(e);
1056
+ yn.hasOwnProperty(o) && this.parser.normalizeLists && Wr(e);
1070
1057
  let l = this.options.ruleFromNode && this.options.ruleFromNode(e) || (a = this.parser.matchTag(e, this, r));
1071
1058
  e: if (l ? l.ignore : jr.hasOwnProperty(o))
1072
1059
  this.findInside(e), this.ignoreFallback(e, t);
1073
1060
  else if (!l || l.skip || l.closeParent) {
1074
1061
  l && l.closeParent ? this.open = Math.max(0, this.open - 1) : l && l.skip.nodeType && (e = l.skip);
1075
1062
  let c, u = this.needsBlock;
1076
- if (yn.hasOwnProperty(o))
1063
+ if (mn.hasOwnProperty(o))
1077
1064
  s.content.length && s.content[0].isInline && this.open && (this.open--, s = this.top), c = !0, s.type || (this.needsBlock = !0);
1078
1065
  else if (!e.firstChild) {
1079
1066
  this.leafFallback(e, t);
@@ -1308,7 +1295,7 @@ class It {
1308
1295
  function Wr(n) {
1309
1296
  for (let e = n.firstChild, t = null; e; e = e.nextSibling) {
1310
1297
  let r = e.nodeType == 1 ? e.nodeName.toLowerCase() : null;
1311
- r && gn.hasOwnProperty(r) && t ? (t.appendChild(e), e = t) : r == "li" ? t = e : r && (t = null);
1298
+ r && yn.hasOwnProperty(r) && t ? (t.appendChild(e), e = t) : r == "li" ? t = e : r && (t = null);
1312
1299
  }
1313
1300
  }
1314
1301
  function Vr(n, e) {
@@ -1338,7 +1325,7 @@ function $t(n, e) {
1338
1325
  return !0;
1339
1326
  }
1340
1327
  }
1341
- class vn {
1328
+ class gn {
1342
1329
  /**
1343
1330
  Create a serializer. `nodes` should map node names to functions
1344
1331
  that take a node and return a description of the corresponding
@@ -1425,7 +1412,7 @@ class vn {
1425
1412
  properties in a schema's node and mark specs.
1426
1413
  */
1427
1414
  static fromSchema(e) {
1428
- return e.cached.domSerializer || (e.cached.domSerializer = new vn(this.nodesFromSchema(e), this.marksFromSchema(e)));
1415
+ return e.cached.domSerializer || (e.cached.domSerializer = new gn(this.nodesFromSchema(e), this.marksFromSchema(e)));
1429
1416
  }
1430
1417
  /**
1431
1418
  Gather the serializers in a schema's node specs into an object.
@@ -1514,17 +1501,17 @@ function Oe(n, e, t, r) {
1514
1501
  }
1515
1502
  return { dom: l, contentDOM: a };
1516
1503
  }
1517
- const wn = 65535, Sn = Math.pow(2, 16);
1504
+ const vn = 65535, wn = Math.pow(2, 16);
1518
1505
  function Ur(n, e) {
1519
- return n + e * Sn;
1506
+ return n + e * wn;
1520
1507
  }
1521
1508
  function Bt(n) {
1522
- return n & wn;
1509
+ return n & vn;
1523
1510
  }
1524
1511
  function Kr(n) {
1525
- return (n - (n & wn)) / Sn;
1512
+ return (n - (n & vn)) / wn;
1526
1513
  }
1527
- const kn = 1, xn = 2, Ne = 4, bn = 8;
1514
+ const Sn = 1, kn = 2, Ne = 4, xn = 8;
1528
1515
  class at {
1529
1516
  /**
1530
1517
  @internal
@@ -1538,19 +1525,19 @@ class at {
1538
1525
  argument from the document.
1539
1526
  */
1540
1527
  get deleted() {
1541
- return (this.delInfo & bn) > 0;
1528
+ return (this.delInfo & xn) > 0;
1542
1529
  }
1543
1530
  /**
1544
1531
  Tells you whether the token before the mapped position was deleted.
1545
1532
  */
1546
1533
  get deletedBefore() {
1547
- return (this.delInfo & (kn | Ne)) > 0;
1534
+ return (this.delInfo & (Sn | Ne)) > 0;
1548
1535
  }
1549
1536
  /**
1550
1537
  True when the token after the mapped position was deleted.
1551
1538
  */
1552
1539
  get deletedAfter() {
1553
- return (this.delInfo & (xn | Ne)) > 0;
1540
+ return (this.delInfo & (kn | Ne)) > 0;
1554
1541
  }
1555
1542
  /**
1556
1543
  Tells whether any of the steps mapped through deletes across the
@@ -1601,8 +1588,8 @@ class P {
1601
1588
  let h = c ? e == l ? -1 : e == f ? 1 : t : t, d = l + i + (h < 0 ? 0 : u);
1602
1589
  if (r)
1603
1590
  return d;
1604
- let m = e == (t < 0 ? l : f) ? null : Ur(a / 3, e - l), p = e == l ? xn : e == f ? kn : Ne;
1605
- return (t < 0 ? e != l : e != f) && (p |= bn), new at(d, p, m);
1591
+ let m = e == (t < 0 ? l : f) ? null : Ur(a / 3, e - l), p = e == l ? kn : e == f ? Sn : Ne;
1592
+ return (t < 0 ? e != l : e != f) && (p |= xn), new at(d, p, m);
1606
1593
  }
1607
1594
  i += u - c;
1608
1595
  }
@@ -2266,13 +2253,13 @@ function ni(n, e, t, r, i) {
2266
2253
  let d = r.whitespace == "pre", m = !!r.contentMatch.matchType(r.schema.linebreakReplacement);
2267
2254
  d && !m ? c = !1 : !d && m && (c = !0);
2268
2255
  }
2269
- c === !1 && Mn(n, o, a, s), ht(n, n.mapping.slice(s).map(a, 1), r, void 0, c === null);
2256
+ c === !1 && En(n, o, a, s), ht(n, n.mapping.slice(s).map(a, 1), r, void 0, c === null);
2270
2257
  let u = n.mapping.slice(s), f = u.map(a, 1), h = u.map(a + o.nodeSize, 1);
2271
- return n.step(new N(f, h, f + 1, h - 1, new w(v.from(r.create(l, null, o.marks)), 0, 0), 1, !0)), c === !0 && En(n, o, a, s), !1;
2258
+ return n.step(new N(f, h, f + 1, h - 1, new w(v.from(r.create(l, null, o.marks)), 0, 0), 1, !0)), c === !0 && bn(n, o, a, s), !1;
2272
2259
  }
2273
2260
  });
2274
2261
  }
2275
- function En(n, e, t, r) {
2262
+ function bn(n, e, t, r) {
2276
2263
  e.forEach((i, s) => {
2277
2264
  if (i.isText) {
2278
2265
  let o, a = /\r?\n|\r/g;
@@ -2283,7 +2270,7 @@ function En(n, e, t, r) {
2283
2270
  }
2284
2271
  });
2285
2272
  }
2286
- function Mn(n, e, t, r) {
2273
+ function En(n, e, t, r) {
2287
2274
  e.forEach((i, s) => {
2288
2275
  if (i.type == i.type.schema.linebreakReplacement) {
2289
2276
  let o = n.mapping.slice(r).map(t + 1 + s);
@@ -2336,7 +2323,7 @@ function si(n, e, t = 1, r) {
2336
2323
  }
2337
2324
  function Z(n, e) {
2338
2325
  let t = n.resolve(e), r = t.index();
2339
- return Cn(t.nodeBefore, t.nodeAfter) && t.parent.canReplace(r, r + 1);
2326
+ return Mn(t.nodeBefore, t.nodeAfter) && t.parent.canReplace(r, r + 1);
2340
2327
  }
2341
2328
  function oi(n, e) {
2342
2329
  e.content.size || n.type.compatibleContent(e.type);
@@ -2348,14 +2335,14 @@ function oi(n, e) {
2348
2335
  }
2349
2336
  return t.validEnd;
2350
2337
  }
2351
- function Cn(n, e) {
2338
+ function Mn(n, e) {
2352
2339
  return !!(n && e && !n.isLeaf && oi(n, e));
2353
2340
  }
2354
2341
  function Pe(n, e, t = -1) {
2355
2342
  let r = n.resolve(e);
2356
2343
  for (let i = r.depth; ; i--) {
2357
2344
  let s, o, a = r.index(i);
2358
- if (i == r.depth ? (s = r.nodeBefore, o = r.nodeAfter) : t > 0 ? (s = r.node(i + 1), a++, o = r.node(i).maybeChild(a)) : (s = r.node(i).maybeChild(a - 1), o = r.node(i + 1)), s && !s.isTextblock && Cn(s, o) && r.node(i).canReplace(a, a + 1))
2345
+ if (i == r.depth ? (s = r.nodeBefore, o = r.nodeAfter) : t > 0 ? (s = r.node(i + 1), a++, o = r.node(i).maybeChild(a)) : (s = r.node(i).maybeChild(a - 1), o = r.node(i + 1)), s && !s.isTextblock && Mn(s, o) && r.node(i).canReplace(a, a + 1))
2359
2346
  return e;
2360
2347
  if (i == 0)
2361
2348
  break;
@@ -2371,13 +2358,13 @@ function ai(n, e, t) {
2371
2358
  let a = n.steps.length;
2372
2359
  if (r === !1) {
2373
2360
  let u = n.doc.resolve(e + t);
2374
- Mn(n, u.node(), u.before(), a);
2361
+ En(n, u.node(), u.before(), a);
2375
2362
  }
2376
2363
  o.inlineContent && ht(n, e + t - 1, o, s.node().contentMatchAt(s.index()), r == null);
2377
2364
  let l = n.mapping.slice(a), c = l.map(e - t);
2378
2365
  if (n.step(new O(c, l.map(e + t, -1), w.empty, !0)), r === !0) {
2379
2366
  let u = n.doc.resolve(c);
2380
- En(n, u.node(), u.before(), n.steps.length);
2367
+ bn(n, u.node(), u.before(), n.steps.length);
2381
2368
  }
2382
2369
  return n;
2383
2370
  }
@@ -2403,7 +2390,7 @@ function li(n, e, t) {
2403
2390
  }
2404
2391
  return null;
2405
2392
  }
2406
- function qa(n, e, t) {
2393
+ function Fa(n, e, t) {
2407
2394
  let r = n.resolve(e);
2408
2395
  if (!t.content.size)
2409
2396
  return e;
@@ -2428,9 +2415,9 @@ function De(n, e, t = e, r = w.empty) {
2428
2415
  if (e == t && !r.size)
2429
2416
  return null;
2430
2417
  let i = n.resolve(e), s = n.resolve(t);
2431
- return An(i, s, r) ? new O(e, t, r) : new ci(i, s, r).fit();
2418
+ return Cn(i, s, r) ? new O(e, t, r) : new ci(i, s, r).fit();
2432
2419
  }
2433
- function An(n, e, t) {
2420
+ function Cn(n, e, t) {
2434
2421
  return !t.openStart && !t.openEnd && n.start() == e.start() && n.parent.canReplace(n.index(), e.index(), t.content);
2435
2422
  }
2436
2423
  class ci {
@@ -2524,7 +2511,7 @@ class ci {
2524
2511
  let p = a.child(c), y = f.matchType(p.type);
2525
2512
  if (!y)
2526
2513
  break;
2527
- c++, (c > 1 || l == 0 || p.content.size) && (f = y, u.push(Rn(p.mark(h.allowedMarks(p.marks)), c == 1 ? l : 0, c == a.childCount ? d : -1)));
2514
+ c++, (c > 1 || l == 0 || p.content.size) && (f = y, u.push(An(p.mark(h.allowedMarks(p.marks)), c == 1 ? l : 0, c == a.childCount ? d : -1)));
2528
2515
  }
2529
2516
  let m = c == a.childCount;
2530
2517
  m || (d = -1), this.placed = pe(this.placed, t, v.from(u)), this.frontier[t].match = f, m && d < 0 && r && r.type == this.frontier[this.depth].type && this.frontier.length > 1 && this.closeFrontierNode();
@@ -2591,11 +2578,11 @@ function Ke(n, e) {
2591
2578
  n = n.firstChild.content;
2592
2579
  return n;
2593
2580
  }
2594
- function Rn(n, e, t) {
2581
+ function An(n, e, t) {
2595
2582
  if (e <= 0)
2596
2583
  return n;
2597
2584
  let r = n.content;
2598
- return e > 1 && (r = r.replaceChild(0, Rn(r.firstChild, e - 1, r.childCount == 1 ? t - 1 : 0))), e > 0 && (r = n.type.contentMatch.fillBefore(r).append(r), t <= 0 && (r = r.append(n.type.contentMatch.matchFragment(r).fillBefore(v.empty, !0)))), n.copy(r);
2585
+ return e > 1 && (r = r.replaceChild(0, An(r.firstChild, e - 1, r.childCount == 1 ? t - 1 : 0))), e > 0 && (r = n.type.contentMatch.fillBefore(r).append(r), t <= 0 && (r = r.append(n.type.contentMatch.matchFragment(r).fillBefore(v.empty, !0)))), n.copy(r);
2599
2586
  }
2600
2587
  function Ge(n, e, t, r, i) {
2601
2588
  let s = n.node(e), o = i ? n.indexAfter(e) : n.index(e);
@@ -2617,9 +2604,9 @@ function di(n, e, t, r) {
2617
2604
  if (!r.size)
2618
2605
  return n.deleteRange(e, t);
2619
2606
  let i = n.doc.resolve(e), s = n.doc.resolve(t);
2620
- if (An(i, s, r))
2607
+ if (Cn(i, s, r))
2621
2608
  return n.step(new O(e, t, r));
2622
- let o = On(i, s);
2609
+ let o = Tn(i, s);
2623
2610
  o[o.length - 1] == 0 && o.pop();
2624
2611
  let a = -(i.depth + 1);
2625
2612
  o.unshift(a);
@@ -2651,7 +2638,7 @@ function di(n, e, t, r) {
2651
2638
  y < 0 && (g = !1, y = -y);
2652
2639
  let S = i.node(y - 1), x = i.index(y - 1);
2653
2640
  if (S.canReplaceWith(x, x, m.type, m.marks))
2654
- return n.replace(i.before(y), g ? s.after(y) : t, new w(Tn(r.content, 0, r.openStart, d), d, r.openEnd));
2641
+ return n.replace(i.before(y), g ? s.after(y) : t, new w(Rn(r.content, 0, r.openStart, d), d, r.openEnd));
2655
2642
  }
2656
2643
  }
2657
2644
  let f = n.steps.length;
@@ -2660,10 +2647,10 @@ function di(n, e, t, r) {
2660
2647
  d < 0 || (e = i.before(d), t = s.after(d));
2661
2648
  }
2662
2649
  }
2663
- function Tn(n, e, t, r, i) {
2650
+ function Rn(n, e, t, r, i) {
2664
2651
  if (e < t) {
2665
2652
  let s = n.firstChild;
2666
- n = n.replaceChild(0, s.copy(Tn(s.content, e + 1, t, r, s)));
2653
+ n = n.replaceChild(0, s.copy(Rn(s.content, e + 1, t, r, s)));
2667
2654
  }
2668
2655
  if (e > r) {
2669
2656
  let s = i.contentMatchAt(0), o = s.fillBefore(n).append(n);
@@ -2679,7 +2666,7 @@ function hi(n, e, t, r) {
2679
2666
  n.replaceRange(e, t, new w(v.from(r), 0, 0));
2680
2667
  }
2681
2668
  function pi(n, e, t) {
2682
- let r = n.doc.resolve(e), i = n.doc.resolve(t), s = On(r, i);
2669
+ let r = n.doc.resolve(e), i = n.doc.resolve(t), s = Tn(r, i);
2683
2670
  for (let o = 0; o < s.length; o++) {
2684
2671
  let a = s[o], l = o == s.length - 1;
2685
2672
  if (l && a == 0 || r.node(a).type.contentMatch.validEnd)
@@ -2692,7 +2679,7 @@ function pi(n, e, t) {
2692
2679
  return n.delete(r.before(o), t);
2693
2680
  n.delete(e, t);
2694
2681
  }
2695
- function On(n, e) {
2682
+ function Tn(n, e) {
2696
2683
  let t = [], r = Math.min(n.depth, e.depth);
2697
2684
  for (let i = r; i >= 0; i--) {
2698
2685
  let s = n.start(i);
@@ -3440,19 +3427,19 @@ new Me("doc", {
3440
3427
  return n.scrolledIntoView ? e + 1 : e;
3441
3428
  }
3442
3429
  });
3443
- function Nn(n, e, t) {
3430
+ function On(n, e, t) {
3444
3431
  for (let r in n) {
3445
3432
  let i = n[r];
3446
- i instanceof Function ? i = i.bind(e) : r == "handleDOMEvents" && (i = Nn(i, e, {})), t[r] = i;
3433
+ i instanceof Function ? i = i.bind(e) : r == "handleDOMEvents" && (i = On(i, e, {})), t[r] = i;
3447
3434
  }
3448
3435
  return t;
3449
3436
  }
3450
- class ja {
3437
+ class qa {
3451
3438
  /**
3452
3439
  Create a plugin.
3453
3440
  */
3454
3441
  constructor(e) {
3455
- this.spec = e, this.props = {}, e.props && Nn(e.props, this, this.props), this.key = e.key ? e.key.key : In("plugin");
3442
+ this.spec = e, this.props = {}, e.props && On(e.props, this, this.props), this.key = e.key ? e.key.key : Nn("plugin");
3456
3443
  }
3457
3444
  /**
3458
3445
  Extract the plugin's state field from an editor state.
@@ -3462,15 +3449,15 @@ class ja {
3462
3449
  }
3463
3450
  }
3464
3451
  const Ye = /* @__PURE__ */ Object.create(null);
3465
- function In(n) {
3452
+ function Nn(n) {
3466
3453
  return n in Ye ? n + "$" + ++Ye[n] : (Ye[n] = 0, n + "$");
3467
3454
  }
3468
- class Wa {
3455
+ class ja {
3469
3456
  /**
3470
3457
  Create a plugin key.
3471
3458
  */
3472
3459
  constructor(e = "key") {
3473
- this.key = In(e);
3460
+ this.key = Nn(e);
3474
3461
  }
3475
3462
  /**
3476
3463
  Get the active plugin with this key, if any, from an editor
@@ -3487,12 +3474,12 @@ class Wa {
3487
3474
  }
3488
3475
  }
3489
3476
  const yt = (n, e) => n.selection.empty ? !1 : (e && e(n.tr.deleteSelection().scrollIntoView()), !0);
3490
- function zn(n, e) {
3477
+ function In(n, e) {
3491
3478
  let { $cursor: t } = n.selection;
3492
3479
  return !t || (e ? !e.endOfTextblock("backward", n) : t.parentOffset > 0) ? null : t;
3493
3480
  }
3494
- const $n = (n, e, t) => {
3495
- let r = zn(n, t);
3481
+ const zn = (n, e, t) => {
3482
+ let r = In(n, t);
3496
3483
  if (!r)
3497
3484
  return !1;
3498
3485
  let i = gt(r);
@@ -3501,7 +3488,7 @@ const $n = (n, e, t) => {
3501
3488
  return a == null ? !1 : (e && e(n.tr.lift(o, a).scrollIntoView()), !0);
3502
3489
  }
3503
3490
  let s = i.nodeBefore;
3504
- if (Wn(n, i, e, -1))
3491
+ if (jn(n, i, e, -1))
3505
3492
  return !0;
3506
3493
  if (r.parent.content.size == 0 && (ue(s, "end") || C.isSelectable(s)))
3507
3494
  for (let o = r.depth; ; o--) {
@@ -3518,19 +3505,19 @@ const $n = (n, e, t) => {
3518
3505
  }
3519
3506
  return s.isAtom && i.depth == r.depth - 1 ? (e && e(n.tr.delete(i.pos - s.nodeSize, i.pos).scrollIntoView()), !0) : !1;
3520
3507
  }, vi = (n, e, t) => {
3521
- let r = zn(n, t);
3508
+ let r = In(n, t);
3522
3509
  if (!r)
3523
3510
  return !1;
3524
3511
  let i = gt(r);
3525
- return i ? Pn(n, i, e) : !1;
3512
+ return i ? $n(n, i, e) : !1;
3526
3513
  }, wi = (n, e, t) => {
3527
- let r = Bn(n, t);
3514
+ let r = Dn(n, t);
3528
3515
  if (!r)
3529
3516
  return !1;
3530
3517
  let i = vt(r);
3531
- return i ? Pn(n, i, e) : !1;
3518
+ return i ? $n(n, i, e) : !1;
3532
3519
  };
3533
- function Pn(n, e, t) {
3520
+ function $n(n, e, t) {
3534
3521
  let r = e.nodeBefore, i = r, s = e.pos - 1;
3535
3522
  for (; !i.isTextblock; s--) {
3536
3523
  if (i.type.spec.isolating)
@@ -3567,7 +3554,7 @@ function ue(n, e, t = !1) {
3567
3554
  }
3568
3555
  return !1;
3569
3556
  }
3570
- const Dn = (n, e, t) => {
3557
+ const Pn = (n, e, t) => {
3571
3558
  let { $head: r, empty: i } = n.selection, s = r;
3572
3559
  if (!i)
3573
3560
  return !1;
@@ -3589,19 +3576,19 @@ function gt(n) {
3589
3576
  }
3590
3577
  return null;
3591
3578
  }
3592
- function Bn(n, e) {
3579
+ function Dn(n, e) {
3593
3580
  let { $cursor: t } = n.selection;
3594
3581
  return !t || (e ? !e.endOfTextblock("forward", n) : t.parentOffset < t.parent.content.size) ? null : t;
3595
3582
  }
3596
- const _n = (n, e, t) => {
3597
- let r = Bn(n, t);
3583
+ const Bn = (n, e, t) => {
3584
+ let r = Dn(n, t);
3598
3585
  if (!r)
3599
3586
  return !1;
3600
3587
  let i = vt(r);
3601
3588
  if (!i)
3602
3589
  return !1;
3603
3590
  let s = i.nodeAfter;
3604
- if (Wn(n, i, e, 1))
3591
+ if (jn(n, i, e, 1))
3605
3592
  return !0;
3606
3593
  if (r.parent.content.size == 0 && (ue(s, "start") || C.isSelectable(s))) {
3607
3594
  let o = De(n.doc, r.before(), r.after(), w.empty);
@@ -3614,7 +3601,7 @@ const _n = (n, e, t) => {
3614
3601
  }
3615
3602
  }
3616
3603
  return s.isAtom && i.depth == r.depth - 1 ? (e && e(n.tr.delete(i.pos, i.pos + s.nodeSize).scrollIntoView()), !0) : !1;
3617
- }, Ln = (n, e, t) => {
3604
+ }, _n = (n, e, t) => {
3618
3605
  let { $head: r, empty: i } = n.selection, s = r;
3619
3606
  if (!i)
3620
3607
  return !1;
@@ -3662,7 +3649,7 @@ const Si = (n, e) => {
3662
3649
  }, xi = (n, e) => {
3663
3650
  let { $from: t, $to: r } = n.selection, i = t.blockRange(r), s = i && fe(i);
3664
3651
  return s == null ? !1 : (e && e(n.tr.lift(i, s).scrollIntoView()), !0);
3665
- }, Fn = (n, e) => {
3652
+ }, Ln = (n, e) => {
3666
3653
  let { $head: t, $anchor: r } = n.selection;
3667
3654
  return !t.parent.type.spec.code || !t.sameParent(r) ? !1 : (e && e(n.tr.insertText(`
3668
3655
  `).scrollIntoView()), !0);
@@ -3687,7 +3674,7 @@ const bi = (n, e) => {
3687
3674
  l.setSelection(A.near(l.doc.resolve(a), 1)), e(l.scrollIntoView());
3688
3675
  }
3689
3676
  return !0;
3690
- }, qn = (n, e) => {
3677
+ }, Fn = (n, e) => {
3691
3678
  let t = n.selection, { $from: r, $to: i } = t;
3692
3679
  if (t instanceof _ || r.parent.inlineContent || i.parent.inlineContent)
3693
3680
  return !1;
@@ -3699,7 +3686,7 @@ const bi = (n, e) => {
3699
3686
  a.setSelection($.create(a.doc, o + 1)), e(a.scrollIntoView());
3700
3687
  }
3701
3688
  return !0;
3702
- }, jn = (n, e) => {
3689
+ }, qn = (n, e) => {
3703
3690
  let { $cursor: t } = n.selection;
3704
3691
  if (!t || t.parent.content.size)
3705
3692
  return !1;
@@ -3748,7 +3735,7 @@ function Ai(n, e, t) {
3748
3735
  let r = e.nodeBefore, i = e.nodeAfter, s = e.index();
3749
3736
  return !r || !i || !r.type.compatibleContent(i.type) ? !1 : !r.content.size && e.parent.canReplace(s - 1, s) ? (t && t(n.tr.delete(e.pos - r.nodeSize, e.pos).scrollIntoView()), !0) : !e.parent.canReplace(s, s + 1) || !(i.isTextblock || Z(n.doc, e.pos)) ? !1 : (t && t(n.tr.join(e.pos).scrollIntoView()), !0);
3750
3737
  }
3751
- function Wn(n, e, t, r) {
3738
+ function jn(n, e, t, r) {
3752
3739
  let i = e.nodeBefore, s = e.nodeAfter, o, a, l = i.type.spec.isolating || s.type.spec.isolating;
3753
3740
  if (!l && Ai(n, e, t))
3754
3741
  return !0;
@@ -3787,7 +3774,7 @@ function Wn(n, e, t, r) {
3787
3774
  }
3788
3775
  return !1;
3789
3776
  }
3790
- function Vn(n) {
3777
+ function Wn(n) {
3791
3778
  return function(e, t) {
3792
3779
  let r = e.selection, i = n < 0 ? r.$from : r.$to, s = i.depth;
3793
3780
  for (; i.node(s).isInline; ) {
@@ -3798,7 +3785,7 @@ function Vn(n) {
3798
3785
  return i.node(s).isTextblock ? (t && t(e.tr.setSelection($.create(e.doc, n < 0 ? i.start(s) : i.end(s)))), !0) : !1;
3799
3786
  };
3800
3787
  }
3801
- const Ri = Vn(-1), Ti = Vn(1);
3788
+ const Ri = Wn(-1), Ti = Wn(1);
3802
3789
  function Oi(n, e = null) {
3803
3790
  return function(t, r) {
3804
3791
  let { $from: i, $to: s } = t.selection, o = i.blockRange(s), a = o && pt(o, n, e);
@@ -3843,9 +3830,9 @@ function St(...n) {
3843
3830
  return !1;
3844
3831
  };
3845
3832
  }
3846
- St(yt, $n, Dn);
3847
- St(yt, _n, Ln);
3848
- St(Fn, qn, jn, Mi);
3833
+ St(yt, zn, Pn);
3834
+ St(yt, Bn, _n);
3835
+ St(Ln, Fn, qn, Mi);
3849
3836
  typeof navigator < "u" ? /Mac|iP(hone|[oa]d)/.test(navigator.platform) : typeof os < "u" && os.platform && os.platform() == "darwin";
3850
3837
  function Ni(n, e = null) {
3851
3838
  return function(t, r) {
@@ -3931,7 +3918,7 @@ var _i = Object.defineProperty, kt = (n, e) => {
3931
3918
  for (var t in e)
3932
3919
  _i(n, t, { get: e[t], enumerable: !0 });
3933
3920
  };
3934
- function Jn(n) {
3921
+ function Vn(n) {
3935
3922
  const { state: e, transaction: t } = n;
3936
3923
  let { selection: r } = t, { doc: i } = t, { storedMarks: s } = t;
3937
3924
  return {
@@ -4007,7 +3994,7 @@ var Li = class {
4007
3994
  tr: n,
4008
3995
  editor: r,
4009
3996
  view: s,
4010
- state: Jn({
3997
+ state: Vn({
4011
3998
  state: i,
4012
3999
  transaction: n
4013
4000
  }),
@@ -4023,8 +4010,8 @@ var Li = class {
4023
4010
  };
4024
4011
  return o;
4025
4012
  }
4026
- }, Hn = {};
4027
- kt(Hn, {
4013
+ }, Jn = {};
4014
+ kt(Jn, {
4028
4015
  blur: () => Fi,
4029
4016
  clearContent: () => qi,
4030
4017
  clearNodes: () => ji,
@@ -4106,7 +4093,7 @@ var Fi = () => ({ editor: n, view: e }) => (requestAnimationFrame(() => {
4106
4093
  (m || m === 0) && e.lift(d, m);
4107
4094
  });
4108
4095
  }), !0;
4109
- }, Wi = (n) => (e) => n(e), Vi = () => ({ state: n, dispatch: e }) => qn(n, e), Ji = (n, e) => ({ editor: t, tr: r }) => {
4096
+ }, Wi = (n) => (e) => n(e), Vi = () => ({ state: n, dispatch: e }) => Fn(n, e), Ji = (n, e) => ({ editor: t, tr: r }) => {
4110
4097
  const { state: i } = t, s = i.doc.slice(n.from, n.to);
4111
4098
  r.deleteRange(n.from, n.to);
4112
4099
  const o = r.mapping.map(e);
@@ -4156,7 +4143,7 @@ function $e(n, e, t = { strict: !0 }) {
4156
4143
  const r = Object.keys(e);
4157
4144
  return r.length ? r.every((i) => t.strict ? e[i] === n[i] : Zi(e[i]) ? e[i].test(n[i]) : e[i] === n[i]) : !0;
4158
4145
  }
4159
- function Un(n, e, t = {}) {
4146
+ function Hn(n, e, t = {}) {
4160
4147
  return n.find((r) => r.type === e && $e(
4161
4148
  // Only check equality for the attributes that are provided
4162
4149
  Object.fromEntries(Object.keys(t).map((i) => [i, r.attrs[i]])),
@@ -4164,14 +4151,14 @@ function Un(n, e, t = {}) {
4164
4151
  ));
4165
4152
  }
4166
4153
  function Vt(n, e, t = {}) {
4167
- return !!Un(n, e, t);
4154
+ return !!Hn(n, e, t);
4168
4155
  }
4169
4156
  function xt(n, e, t) {
4170
4157
  var r;
4171
4158
  if (!n || !e)
4172
4159
  return;
4173
4160
  let i = n.parent.childAfter(n.parentOffset);
4174
- if ((!i.node || !i.node.marks.some((u) => u.type === e)) && (i = n.parent.childBefore(n.parentOffset)), !i.node || !i.node.marks.some((u) => u.type === e) || (t = t || ((r = i.node.marks[0]) == null ? void 0 : r.attrs), !Un([...i.node.marks], e, t)))
4161
+ if ((!i.node || !i.node.marks.some((u) => u.type === e)) && (i = n.parent.childBefore(n.parentOffset)), !i.node || !i.node.marks.some((u) => u.type === e) || (t = t || ((r = i.node.marks[0]) == null ? void 0 : r.attrs), !Hn([...i.node.marks], e, t)))
4175
4162
  return;
4176
4163
  let o = i.index, a = n.start() + i.offset, l = o + 1, c = a + i.node.nodeSize;
4177
4164
  for (; o > 0 && Vt([...n.parent.child(o - 1).marks], e, t); )
@@ -4208,7 +4195,7 @@ var Qi = (n, e = {}) => ({ tr: t, state: r, dispatch: i }) => {
4208
4195
  return !0;
4209
4196
  return !1;
4210
4197
  };
4211
- function Kn(n) {
4198
+ function Un(n) {
4212
4199
  return n instanceof F;
4213
4200
  }
4214
4201
  function V(n = 0, e = 0, t = 0) {
@@ -4225,7 +4212,7 @@ function ts(n, e = null) {
4225
4212
  const i = t.from, s = r.to;
4226
4213
  return e === "all" ? F.create(n, V(0, i, s), V(n.content.size, i, s)) : F.create(n, V(e, i, s), V(e, i, s));
4227
4214
  }
4228
- function Gn() {
4215
+ function Kn() {
4229
4216
  return navigator.platform === "Android" || /android/i.test(navigator.userAgent);
4230
4217
  }
4231
4218
  function _e() {
@@ -4238,21 +4225,21 @@ var ns = (n = null, e = {}) => ({ editor: t, view: r, tr: i, dispatch: s }) => {
4238
4225
  ...e
4239
4226
  };
4240
4227
  const o = () => {
4241
- (_e() || Gn()) && r.dom.focus(), requestAnimationFrame(() => {
4228
+ (_e() || Kn()) && r.dom.focus(), requestAnimationFrame(() => {
4242
4229
  t.isDestroyed || (r.focus(), e != null && e.scrollIntoView && t.commands.scrollIntoView());
4243
4230
  });
4244
4231
  };
4245
4232
  if (r.hasFocus() && n === null || n === !1)
4246
4233
  return !0;
4247
- if (s && n === null && !Kn(t.state.selection))
4234
+ if (s && n === null && !Un(t.state.selection))
4248
4235
  return o(), !0;
4249
4236
  const a = ts(i.doc, n) || t.state.selection, l = t.state.selection.eq(a);
4250
4237
  return s && (l || i.setSelection(a), l && i.storedMarks && i.setStoredMarks(i.storedMarks), o()), !0;
4251
- }, rs = (n, e) => (t) => n.every((r, i) => e(r, { ...t, index: i })), is = (n, e) => ({ tr: t, commands: r }) => r.insertContentAt({ from: t.selection.from, to: t.selection.to }, n, e), Xn = (n) => {
4238
+ }, rs = (n, e) => (t) => n.every((r, i) => e(r, { ...t, index: i })), is = (n, e) => ({ tr: t, commands: r }) => r.insertContentAt({ from: t.selection.from, to: t.selection.to }, n, e), Gn = (n) => {
4252
4239
  const e = n.childNodes;
4253
4240
  for (let t = e.length - 1; t >= 0; t -= 1) {
4254
4241
  const r = e[t];
4255
- r.nodeType === 3 && r.nodeValue && /^(\n\s\s|\n)$/.test(r.nodeValue) ? n.removeChild(r) : r.nodeType === 1 && Xn(r);
4242
+ r.nodeType === 3 && r.nodeValue && /^(\n\s\s|\n)$/.test(r.nodeValue) ? n.removeChild(r) : r.nodeType === 1 && Gn(r);
4256
4243
  }
4257
4244
  return n;
4258
4245
  };
@@ -4260,7 +4247,7 @@ function Ce(n) {
4260
4247
  if (typeof window > "u")
4261
4248
  throw new Error("[tiptap error]: there is no window object available, so this function cannot be used");
4262
4249
  const e = `<body>${n}</body>`, t = new window.DOMParser().parseFromString(e, "text/html").body;
4263
- return Xn(t);
4250
+ return Gn(t);
4264
4251
  }
4265
4252
  function ve(n, e, t) {
4266
4253
  if (n instanceof Rr || n instanceof se)
@@ -4392,7 +4379,7 @@ var as = (n) => !("type" in n), ls = (n, e, t) => ({ tr: r, dispatch: i, editor:
4392
4379
  t.updateSelection && ss(r, r.steps.length - 1, -1), t.applyInputRules && r.setMeta("applyInputRules", { from: u, text: p }), t.applyPasteRules && r.setMeta("applyPasteRules", { from: u, text: p });
4393
4380
  }
4394
4381
  return !0;
4395
- }, cs = () => ({ state: n, dispatch: e }) => Si(n, e), us = () => ({ state: n, dispatch: e }) => ki(n, e), fs = () => ({ state: n, dispatch: e }) => $n(n, e), ds = () => ({ state: n, dispatch: e }) => _n(n, e), hs = () => ({ state: n, dispatch: e, tr: t }) => {
4382
+ }, cs = () => ({ state: n, dispatch: e }) => Si(n, e), us = () => ({ state: n, dispatch: e }) => ki(n, e), fs = () => ({ state: n, dispatch: e }) => zn(n, e), ds = () => ({ state: n, dispatch: e }) => Bn(n, e), hs = () => ({ state: n, dispatch: e, tr: t }) => {
4396
4383
  try {
4397
4384
  const r = Pe(n.doc, n.selection.$from.pos, -1);
4398
4385
  return r == null ? !1 : (t.join(r, 2), e && e(t), !0);
@@ -4407,7 +4394,7 @@ var as = (n) => !("type" in n), ls = (n, e, t) => ({ tr: r, dispatch: i, editor:
4407
4394
  return !1;
4408
4395
  }
4409
4396
  }, ms = () => ({ state: n, dispatch: e }) => vi(n, e), ys = () => ({ state: n, dispatch: e }) => wi(n, e);
4410
- function Yn() {
4397
+ function Xn() {
4411
4398
  return typeof navigator < "u" ? /Mac/.test(navigator.platform) : !1;
4412
4399
  }
4413
4400
  function gs(n) {
@@ -4426,7 +4413,7 @@ function gs(n) {
4426
4413
  else if (/^s(hift)?$/i.test(l))
4427
4414
  s = !0;
4428
4415
  else if (/^mod$/i.test(l))
4429
- _e() || Yn() ? o = !0 : i = !0;
4416
+ _e() || Xn() ? o = !0 : i = !0;
4430
4417
  else
4431
4418
  throw new Error(`Unrecognized modifier name: ${l}`);
4432
4419
  }
@@ -4467,10 +4454,10 @@ function we(n, e, t = {}) {
4467
4454
  var ws = (n, e = {}) => ({ state: t, dispatch: r }) => {
4468
4455
  const i = I(n, t.schema);
4469
4456
  return we(t, i, e) ? xi(t, r) : !1;
4470
- }, Ss = () => ({ state: n, dispatch: e }) => jn(n, e), ks = (n) => ({ state: e, dispatch: t }) => {
4457
+ }, Ss = () => ({ state: n, dispatch: e }) => qn(n, e), ks = (n) => ({ state: e, dispatch: t }) => {
4471
4458
  const r = I(n, e.schema);
4472
4459
  return $i(r)(e, t);
4473
- }, xs = () => ({ state: n, dispatch: e }) => Fn(n, e);
4460
+ }, xs = () => ({ state: n, dispatch: e }) => Ln(n, e);
4474
4461
  function Le(n, e) {
4475
4462
  return e.nodes[n] ? "node" : e.marks[n] ? "mark" : null;
4476
4463
  }
@@ -4501,7 +4488,7 @@ var bs = (n, e) => ({ tr: t, state: r, dispatch: i }) => {
4501
4488
  n.setSelection(t);
4502
4489
  }
4503
4490
  return !0;
4504
- }, Cs = () => ({ state: n, dispatch: e }) => Dn(n, e), As = () => ({ state: n, dispatch: e }) => Ln(n, e), Rs = () => ({ state: n, dispatch: e }) => Ci(n, e), Ts = () => ({ state: n, dispatch: e }) => Ti(n, e), Os = () => ({ state: n, dispatch: e }) => Ri(n, e);
4491
+ }, Cs = () => ({ state: n, dispatch: e }) => Pn(n, e), As = () => ({ state: n, dispatch: e }) => _n(n, e), Rs = () => ({ state: n, dispatch: e }) => Ci(n, e), Ts = () => ({ state: n, dispatch: e }) => Ti(n, e), Os = () => ({ state: n, dispatch: e }) => Ri(n, e);
4505
4492
  function Ns(n, e, t = {}, r = {}) {
4506
4493
  return ve(n, e, {
4507
4494
  slice: !1,
@@ -4522,7 +4509,7 @@ var Is = (n, { errorOnInvalidContent: e, emitUpdate: t = !0, parseOptions: r = {
4522
4509
  errorOnInvalidContent: e ?? i.options.enableContentCheck
4523
4510
  });
4524
4511
  };
4525
- function Zn(n, e) {
4512
+ function Yn(n, e) {
4526
4513
  const t = Q(e, n.schema), { from: r, to: i, empty: s } = n.selection, o = [];
4527
4514
  s ? (n.storedMarks && o.push(...n.storedMarks), o.push(...n.selection.$head.marks())) : n.doc.nodesBetween(r, i, (l) => {
4528
4515
  o.push(...l.marks);
@@ -4546,7 +4533,7 @@ function $s(n) {
4546
4533
  }
4547
4534
  return null;
4548
4535
  }
4549
- function Va(n, e, t) {
4536
+ function Wa(n, e, t) {
4550
4537
  const r = [];
4551
4538
  return n.nodesBetween(e.from, e.to, (i, s) => {
4552
4539
  t(i) && r.push({
@@ -4582,7 +4569,7 @@ function Ds(n) {
4582
4569
  function q(n, e = void 0, ...t) {
4583
4570
  return Ds(n) ? e ? n.bind(e)(...t) : n(...t) : n;
4584
4571
  }
4585
- function Qn(n) {
4572
+ function Zn(n) {
4586
4573
  const e = n.filter((i) => i.type === "extension"), t = n.filter((i) => i.type === "node"), r = n.filter((i) => i.type === "mark");
4587
4574
  return {
4588
4575
  baseExtensions: e,
@@ -4620,7 +4607,7 @@ function _s(n, e) {
4620
4607
  [t.name]: n.attrs[t.name]
4621
4608
  }).reduce((t, r) => Bs(t, r), {});
4622
4609
  }
4623
- function er(n, e, t) {
4610
+ function Qn(n, e, t) {
4624
4611
  const { from: r, to: i } = e, { blockSeparator: s = `
4625
4612
 
4626
4613
  `, textSerializers: o = {} } = t || {};
@@ -4640,12 +4627,12 @@ function er(n, e, t) {
4640
4627
  l.isText && (a += (h = l == null ? void 0 : l.text) == null ? void 0 : h.slice(Math.max(r, c) - c, i - c));
4641
4628
  }), a;
4642
4629
  }
4643
- function Ja(n, e) {
4630
+ function Va(n, e) {
4644
4631
  const t = {
4645
4632
  from: 0,
4646
4633
  to: n.content.size
4647
4634
  };
4648
- return er(n, t, e);
4635
+ return Qn(n, t, e);
4649
4636
  }
4650
4637
  function Ls(n) {
4651
4638
  return Object.fromEntries(
@@ -4660,12 +4647,12 @@ function Fs(n, e) {
4660
4647
  const o = s.reverse().find((a) => a.type.name === t.name);
4661
4648
  return o ? { ...o.attrs } : {};
4662
4649
  }
4663
- function Ha(n, e) {
4650
+ function Ja(n, e) {
4664
4651
  const t = Le(
4665
4652
  typeof e == "string" ? e : e.name,
4666
4653
  n.schema
4667
4654
  );
4668
- return t === "node" ? Fs(n, e) : t === "mark" ? Zn(n, e) : {};
4655
+ return t === "node" ? Fs(n, e) : t === "mark" ? Yn(n, e) : {};
4669
4656
  }
4670
4657
  function qs(n, e = JSON.stringify) {
4671
4658
  const t = {};
@@ -4707,7 +4694,7 @@ function Ws(n) {
4707
4694
  });
4708
4695
  }), js(r);
4709
4696
  }
4710
- function tr(n, e, t) {
4697
+ function er(n, e, t) {
4711
4698
  const r = [];
4712
4699
  return n === e ? t.resolve(n).marks().forEach((i) => {
4713
4700
  const s = t.resolve(n), o = xt(s, i.type);
@@ -4725,7 +4712,7 @@ function tr(n, e, t) {
4725
4712
  );
4726
4713
  }), r;
4727
4714
  }
4728
- var Ua = (n, e, t, r = 20) => {
4715
+ var Ha = (n, e, t, r = 20) => {
4729
4716
  const i = n.doc.resolve(t);
4730
4717
  let s = r, o = null;
4731
4718
  for (; s > 0 && o === null; ) {
@@ -4767,13 +4754,13 @@ function ct(n, e, t = {}) {
4767
4754
  const l = a.filter((f) => s ? s.name === f.mark.type.name : !0).filter((f) => $e(f.mark.attrs, t, { strict: !1 })).reduce((f, h) => f + h.to - h.from, 0), c = a.filter((f) => s ? f.mark.type !== s && f.mark.type.excludes(s) : !0).reduce((f, h) => f + h.to - h.from, 0);
4768
4755
  return (l > 0 ? l + c : l) >= o;
4769
4756
  }
4770
- function Ka(n, e, t = {}) {
4757
+ function Ua(n, e, t = {}) {
4771
4758
  if (!e)
4772
4759
  return we(n, null, t) || ct(n, null, t);
4773
4760
  const r = Le(e, n.schema);
4774
4761
  return r === "node" ? we(n, e, t) : r === "mark" ? ct(n, e, t) : !1;
4775
4762
  }
4776
- var Ga = (n, e) => {
4763
+ var Ka = (n, e) => {
4777
4764
  const { $from: t, $to: r, $anchor: i } = n.selection;
4778
4765
  if (e) {
4779
4766
  const s = Fe((a) => a.type.name === e)(n.selection);
@@ -4783,12 +4770,12 @@ var Ga = (n, e) => {
4783
4770
  return i.pos + 1 === o.end();
4784
4771
  }
4785
4772
  return !(r.parentOffset < r.parent.nodeSize - 2 || t.pos !== r.pos);
4786
- }, Xa = (n) => {
4773
+ }, Ga = (n) => {
4787
4774
  const { $from: e, $to: t } = n.selection;
4788
4775
  return !(e.parentOffset > 0 || e.pos !== t.pos);
4789
4776
  };
4790
4777
  function Ht(n, e) {
4791
- const { nodeExtensions: t } = Qn(e), r = t.find((o) => o.name === n);
4778
+ const { nodeExtensions: t } = Zn(e), r = t.find((o) => o.name === n);
4792
4779
  if (!r)
4793
4780
  return !1;
4794
4781
  const i = {
@@ -4798,7 +4785,7 @@ function Ht(n, e) {
4798
4785
  }, s = q(Se(r, "group", i));
4799
4786
  return typeof s != "string" ? !1 : s.split(" ").includes("list");
4800
4787
  }
4801
- function nr(n, {
4788
+ function tr(n, {
4802
4789
  checkChildren: e = !0,
4803
4790
  ignoreWhitespace: t = !1
4804
4791
  } = {}) {
@@ -4818,15 +4805,15 @@ function nr(n, {
4818
4805
  if (e) {
4819
4806
  let i = !0;
4820
4807
  return n.content.forEach((s) => {
4821
- i !== !1 && (nr(s, { ignoreWhitespace: t, checkChildren: e }) || (i = !1));
4808
+ i !== !1 && (tr(s, { ignoreWhitespace: t, checkChildren: e }) || (i = !1));
4822
4809
  }), i;
4823
4810
  }
4824
4811
  return !1;
4825
4812
  }
4826
- function Ya(n) {
4813
+ function Xa(n) {
4827
4814
  return n instanceof le;
4828
4815
  }
4829
- var Vs = class rr {
4816
+ var Vs = class nr {
4830
4817
  constructor(e) {
4831
4818
  this.position = e;
4832
4819
  }
@@ -4834,7 +4821,7 @@ var Vs = class rr {
4834
4821
  * Creates a MappablePosition from a JSON object.
4835
4822
  */
4836
4823
  static fromJSON(e) {
4837
- return new rr(e.position);
4824
+ return new nr(e.position);
4838
4825
  }
4839
4826
  /**
4840
4827
  * Converts the MappablePosition to a JSON object.
@@ -4845,14 +4832,14 @@ var Vs = class rr {
4845
4832
  };
4846
4833
  }
4847
4834
  };
4848
- function Za(n, e) {
4835
+ function Ya(n, e) {
4849
4836
  const t = e.mapping.mapResult(n.position);
4850
4837
  return {
4851
4838
  position: new Vs(t.pos),
4852
4839
  mapResult: t
4853
4840
  };
4854
4841
  }
4855
- function Qa(n, e, t) {
4842
+ function Za(n, e, t) {
4856
4843
  const i = n.state.doc.content.size, s = V(e, 0, i), o = V(t, 0, i), a = n.coordsAtPos(s), l = n.coordsAtPos(o, -1), c = Math.min(a.top, l.top), u = Math.max(a.bottom, l.bottom), f = Math.min(a.left, l.left), h = Math.max(a.right, l.right), d = h - f, m = u - c, g = {
4857
4844
  top: c,
4858
4845
  bottom: u,
@@ -4872,7 +4859,7 @@ function Js(n, e, t) {
4872
4859
  var r;
4873
4860
  const { selection: i } = e;
4874
4861
  let s = null;
4875
- if (Kn(i) && (s = i.$cursor), s) {
4862
+ if (Un(i) && (s = i.$cursor), s) {
4876
4863
  const a = (r = n.storedMarks) != null ? r : s.marks();
4877
4864
  return s.parent.type.allowsMarkType(t) && (!!t.isInSet(a) || !a.some((c) => c.type.excludes(t)));
4878
4865
  }
@@ -4894,7 +4881,7 @@ var Hs = (n, e = {}) => ({ tr: t, state: r, dispatch: i }) => {
4894
4881
  const { selection: s } = t, { empty: o, ranges: a } = s, l = Q(n, r.schema);
4895
4882
  if (i)
4896
4883
  if (o) {
4897
- const c = Zn(r, l);
4884
+ const c = Yn(r, l);
4898
4885
  t.addStoredMark(
4899
4886
  l.create({
4900
4887
  ...c,
@@ -5194,10 +5181,10 @@ function ho(n) {
5194
5181
  function Ae(n) {
5195
5182
  return ho(n) !== "Object" ? !1 : n.constructor === Object && Object.getPrototypeOf(n) === Object.prototype;
5196
5183
  }
5197
- function ir(n, e) {
5184
+ function rr(n, e) {
5198
5185
  const t = { ...n };
5199
5186
  return Ae(n) && Ae(e) && Object.keys(e).forEach((r) => {
5200
- Ae(e[r]) && Ae(n[r]) ? t[r] = ir(n[r], e[r]) : t[r] = e[r];
5187
+ Ae(e[r]) && Ae(n[r]) ? t[r] = rr(n[r], e[r]) : t[r] = e[r];
5201
5188
  }), t;
5202
5189
  }
5203
5190
  var bt = class {
@@ -5231,7 +5218,7 @@ var bt = class {
5231
5218
  configure(n = {}) {
5232
5219
  const e = this.extend({
5233
5220
  ...this.config,
5234
- addOptions: () => ir(this.options, n)
5221
+ addOptions: () => rr(this.options, n)
5235
5222
  });
5236
5223
  return e.name = this.name, e.parent = this.parent, e;
5237
5224
  }
@@ -5239,7 +5226,7 @@ var bt = class {
5239
5226
  const e = new this.constructor({ ...this.config, ...n });
5240
5227
  return e.parent = this, this.child = e, e.name = "name" in n ? n.name : e.parent.name, e;
5241
5228
  }
5242
- }, el = class sr extends bt {
5229
+ }, Qa = class ir extends bt {
5243
5230
  constructor() {
5244
5231
  super(...arguments), this.type = "mark";
5245
5232
  }
@@ -5249,7 +5236,7 @@ var bt = class {
5249
5236
  */
5250
5237
  static create(e = {}) {
5251
5238
  const t = typeof e == "function" ? e() : e;
5252
- return new sr(t);
5239
+ return new ir(t);
5253
5240
  }
5254
5241
  static handleExit({ editor: e, mark: t }) {
5255
5242
  const { tr: r } = e.state, i = e.state.selection.$from;
@@ -5270,10 +5257,10 @@ var bt = class {
5270
5257
  return super.extend(t);
5271
5258
  }
5272
5259
  };
5273
- function tl(n) {
5260
+ function el(n) {
5274
5261
  return typeof n == "number";
5275
5262
  }
5276
- var or = class {
5263
+ var sr = class {
5277
5264
  constructor(n) {
5278
5265
  this.find = n.find, this.handler = n.handler;
5279
5266
  }
@@ -5289,9 +5276,9 @@ kt(po, {
5289
5276
  Paste: () => xo,
5290
5277
  Tabindex: () => bo,
5291
5278
  TextDirection: () => Eo,
5292
- focusEventsPluginKey: () => lr
5279
+ focusEventsPluginKey: () => ar
5293
5280
  });
5294
- var j = class ar extends bt {
5281
+ var j = class or extends bt {
5295
5282
  constructor() {
5296
5283
  super(...arguments), this.type = "extension";
5297
5284
  }
@@ -5301,7 +5288,7 @@ var j = class ar extends bt {
5301
5288
  */
5302
5289
  static create(e = {}) {
5303
5290
  const t = typeof e == "function" ? e() : e;
5304
- return new ar(t);
5291
+ return new or(t);
5305
5292
  }
5306
5293
  configure(e) {
5307
5294
  return super.configure(e);
@@ -5324,7 +5311,7 @@ var j = class ar extends bt {
5324
5311
  props: {
5325
5312
  clipboardTextSerializer: () => {
5326
5313
  const { editor: n } = this, { state: e, schema: t } = n, { doc: r, selection: i } = e, { ranges: s } = i, o = Math.min(...s.map((u) => u.$from.pos)), a = Math.max(...s.map((u) => u.$to.pos)), l = Ls(t);
5327
- return er(r, { from: o, to: a }, {
5314
+ return Qn(r, { from: o, to: a }, {
5328
5315
  ...this.options.blockSeparator !== void 0 ? { blockSeparator: this.options.blockSeparator } : {},
5329
5316
  textSerializers: l
5330
5317
  });
@@ -5337,7 +5324,7 @@ var j = class ar extends bt {
5337
5324
  name: "commands",
5338
5325
  addCommands() {
5339
5326
  return {
5340
- ...Hn
5327
+ ...Jn
5341
5328
  };
5342
5329
  }
5343
5330
  }), go = j.create({
@@ -5427,13 +5414,13 @@ var j = class ar extends bt {
5427
5414
  })
5428
5415
  ];
5429
5416
  }
5430
- }), lr = new Y("focusEvents"), So = j.create({
5417
+ }), ar = new Y("focusEvents"), So = j.create({
5431
5418
  name: "focusEvents",
5432
5419
  addProseMirrorPlugins() {
5433
5420
  const { editor: n } = this;
5434
5421
  return [
5435
5422
  new X({
5436
- key: lr,
5423
+ key: ar,
5437
5424
  props: {
5438
5425
  handleDOMEvents: {
5439
5426
  focus: (e, t) => {
@@ -5496,7 +5483,7 @@ var j = class ar extends bt {
5496
5483
  "Ctrl-a": () => this.editor.commands.selectTextblockStart(),
5497
5484
  "Ctrl-e": () => this.editor.commands.selectTextblockEnd()
5498
5485
  };
5499
- return _e() || Yn() ? s : i;
5486
+ return _e() || Xn() ? s : i;
5500
5487
  },
5501
5488
  addProseMirrorPlugins() {
5502
5489
  return [
@@ -5514,9 +5501,9 @@ var j = class ar extends bt {
5514
5501
  if (!r || i)
5515
5502
  return;
5516
5503
  const { empty: s, from: o, to: a } = e.selection, l = ie.atStart(e.doc).from, c = ie.atEnd(e.doc).to;
5517
- if (s || !(o === l && a === c) || !nr(t.doc))
5504
+ if (s || !(o === l && a === c) || !tr(t.doc))
5518
5505
  return;
5519
- const h = t.tr, d = Jn({
5506
+ const h = t.tr, d = Vn({
5520
5507
  state: t,
5521
5508
  transaction: h
5522
5509
  }), { commands: m } = new Li({
@@ -5569,7 +5556,7 @@ var j = class ar extends bt {
5569
5556
  addGlobalAttributes() {
5570
5557
  if (!this.options.direction)
5571
5558
  return [];
5572
- const { nodeExtensions: n } = Qn(this.extensions);
5559
+ const { nodeExtensions: n } = Zn(this.extensions);
5573
5560
  return [
5574
5561
  {
5575
5562
  types: n.filter((e) => e.name !== "text").map((e) => e.name),
@@ -5604,7 +5591,7 @@ var j = class ar extends bt {
5604
5591
  ];
5605
5592
  }
5606
5593
  });
5607
- function nl(n) {
5594
+ function tl(n) {
5608
5595
  return new qe({
5609
5596
  find: n.find,
5610
5597
  handler: ({ state: e, range: t, match: r }) => {
@@ -5614,7 +5601,7 @@ function nl(n) {
5614
5601
  const { tr: s } = e, o = r[r.length - 1], a = r[0];
5615
5602
  if (o) {
5616
5603
  const l = a.search(/\S/), c = t.from + a.indexOf(o), u = c + o.length;
5617
- if (tr(t.from, t.to, e.doc).filter((d) => d.mark.type.excluded.find((p) => p === n.type && p !== d.mark.type)).filter((d) => d.to > c).length)
5604
+ if (er(t.from, t.to, e.doc).filter((d) => d.mark.type.excluded.find((p) => p === n.type && p !== d.mark.type)).filter((d) => d.to > c).length)
5618
5605
  return null;
5619
5606
  u < t.to && s.delete(u, t.to), c > t.from && s.delete(t.from + l, c);
5620
5607
  const h = t.from + l + o.length;
@@ -5624,7 +5611,7 @@ function nl(n) {
5624
5611
  undoable: n.undoable
5625
5612
  });
5626
5613
  }
5627
- function rl(n) {
5614
+ function nl(n) {
5628
5615
  return new qe({
5629
5616
  find: n.find,
5630
5617
  handler: ({ state: e, range: t, match: r }) => {
@@ -5646,7 +5633,7 @@ function rl(n) {
5646
5633
  undoable: n.undoable
5647
5634
  });
5648
5635
  }
5649
- function il(n) {
5636
+ function rl(n) {
5650
5637
  return new qe({
5651
5638
  find: n.find,
5652
5639
  handler: ({ state: e, range: t, match: r }) => {
@@ -5658,7 +5645,7 @@ function il(n) {
5658
5645
  undoable: n.undoable
5659
5646
  });
5660
5647
  }
5661
- function sl(n) {
5648
+ function il(n) {
5662
5649
  return new qe({
5663
5650
  find: n.find,
5664
5651
  handler: ({ state: e, range: t, match: r, chain: i }) => {
@@ -5682,7 +5669,7 @@ function sl(n) {
5682
5669
  undoable: n.undoable
5683
5670
  });
5684
5671
  }
5685
- var Mo = (n) => "touches" in n, ol = class {
5672
+ var Mo = (n) => "touches" in n, sl = class {
5686
5673
  /**
5687
5674
  * Creates a new ResizableNodeView instance.
5688
5675
  *
@@ -5949,7 +5936,7 @@ var Mo = (n) => "touches" in n, ol = class {
5949
5936
  };
5950
5937
  }
5951
5938
  };
5952
- function al(n, e) {
5939
+ function ol(n, e) {
5953
5940
  const { selection: t } = n, { $from: r } = t;
5954
5941
  if (t instanceof le) {
5955
5942
  const s = r.index();
@@ -5964,7 +5951,7 @@ function al(n, e) {
5964
5951
  }
5965
5952
  return !1;
5966
5953
  }
5967
- function ll(n) {
5954
+ function al(n) {
5968
5955
  return n.replace(/[-/\\^$*+?.()|[\]{}]/g, "\\$&");
5969
5956
  }
5970
5957
  var Co = {};
@@ -6305,7 +6292,7 @@ function zo(n, e, t, r) {
6305
6292
  }), l.join(`
6306
6293
  `);
6307
6294
  }
6308
- var cl = class cr extends bt {
6295
+ var ll = class lr extends bt {
6309
6296
  constructor() {
6310
6297
  super(...arguments), this.type = "node";
6311
6298
  }
@@ -6315,7 +6302,7 @@ var cl = class cr extends bt {
6315
6302
  */
6316
6303
  static create(e = {}) {
6317
6304
  const t = typeof e == "function" ? e() : e;
6318
- return new cr(t);
6305
+ return new lr(t);
6319
6306
  }
6320
6307
  configure(e) {
6321
6308
  return super.configure(e);
@@ -6418,7 +6405,7 @@ var cl = class cr extends bt {
6418
6405
  * @return `true` if it can safely be ignored.
6419
6406
  */
6420
6407
  ignoreMutation(n) {
6421
- return !this.dom || !this.contentDOM ? !0 : typeof this.options.ignoreMutation == "function" ? this.options.ignoreMutation({ mutation: n }) : this.node.isLeaf || this.node.isAtom ? !0 : n.type === "selection" || this.dom.contains(n.target) && n.type === "childList" && (_e() || Gn()) && this.editor.isFocused && [...Array.from(n.addedNodes), ...Array.from(n.removedNodes)].every((t) => t.isContentEditable) ? !1 : this.contentDOM === n.target && n.type === "attributes" ? !0 : !this.contentDOM.contains(n.target);
6408
+ return !this.dom || !this.contentDOM ? !0 : typeof this.options.ignoreMutation == "function" ? this.options.ignoreMutation({ mutation: n }) : this.node.isLeaf || this.node.isAtom ? !0 : n.type === "selection" || this.dom.contains(n.target) && n.type === "childList" && (_e() || Kn()) && this.editor.isFocused && [...Array.from(n.addedNodes), ...Array.from(n.removedNodes)].every((t) => t.isContentEditable) ? !1 : this.contentDOM === n.target && n.type === "attributes" ? !0 : !this.contentDOM.contains(n.target);
6422
6409
  }
6423
6410
  /**
6424
6411
  * Update the attributes of the prosemirror node.
@@ -6443,8 +6430,8 @@ var cl = class cr extends bt {
6443
6430
  this.editor.commands.deleteRange({ from: n, to: e });
6444
6431
  }
6445
6432
  };
6446
- function ul(n) {
6447
- return new or({
6433
+ function cl(n) {
6434
+ return new sr({
6448
6435
  find: n.find,
6449
6436
  handler: ({ state: e, range: t, match: r, pasteEvent: i }) => {
6450
6437
  const s = q(n.getAttributes, void 0, r, i);
@@ -6454,15 +6441,15 @@ function ul(n) {
6454
6441
  let c = t.to;
6455
6442
  if (a) {
6456
6443
  const u = l.search(/\S/), f = t.from + l.indexOf(a), h = f + a.length;
6457
- if (tr(t.from, t.to, e.doc).filter((m) => m.mark.type.excluded.find((y) => y === n.type && y !== m.mark.type)).filter((m) => m.to > f).length)
6444
+ if (er(t.from, t.to, e.doc).filter((m) => m.mark.type.excluded.find((y) => y === n.type && y !== m.mark.type)).filter((m) => m.to > f).length)
6458
6445
  return null;
6459
6446
  h < t.to && o.delete(h, t.to), f > t.from && o.delete(t.from + u, f), c = t.from + u + a.length, o.addMark(t.from + u, c, n.type.create(s || {})), o.removeStoredMark(n.type);
6460
6447
  }
6461
6448
  }
6462
6449
  });
6463
6450
  }
6464
- function fl(n) {
6465
- return new or({
6451
+ function ul(n) {
6452
+ return new sr({
6466
6453
  find: n.find,
6467
6454
  handler({ match: e, chain: t, range: r, pasteEvent: i }) {
6468
6455
  const s = q(n.getAttributes, void 0, e, i), o = q(n.getContent, void 0, s);
@@ -6556,7 +6543,7 @@ function Ko(n, e, t) {
6556
6543
  if (Yt(e).length !== i)
6557
6544
  return !1;
6558
6545
  for (; i-- > 0; )
6559
- if (!ur(n, e, t, r[i]))
6546
+ if (!cr(n, e, t, r[i]))
6560
6547
  return !1;
6561
6548
  return !0;
6562
6549
  }
@@ -6565,7 +6552,7 @@ function de(n, e, t) {
6565
6552
  if (Gt(e).length !== i)
6566
6553
  return !1;
6567
6554
  for (var s, o, a; i-- > 0; )
6568
- if (s = r[i], !ur(n, e, t, s) || (o = Xt(n, s), a = Xt(e, s), (o || a) && (!o || !a || o.configurable !== a.configurable || o.enumerable !== a.enumerable || o.writable !== a.writable)))
6555
+ if (s = r[i], !cr(n, e, t, s) || (o = Xt(n, s), a = Xt(e, s), (o || a) && (!o || !a || o.configurable !== a.configurable || o.enumerable !== a.enumerable || o.writable !== a.writable)))
6569
6556
  return !1;
6570
6557
  return !0;
6571
6558
  }
@@ -6606,7 +6593,7 @@ function Yo(n, e) {
6606
6593
  function Zo(n, e) {
6607
6594
  return n.hostname === e.hostname && n.pathname === e.pathname && n.protocol === e.protocol && n.port === e.port && n.hash === e.hash && n.username === e.username && n.password === e.password;
6608
6595
  }
6609
- function ur(n, e, t, r) {
6596
+ function cr(n, e, t, r) {
6610
6597
  return (r === jo || r === qo || r === Fo) && (n.$$typeof || e.$$typeof) ? !0 : Lo(e, r) && t.equals(n[r], e[r], r, r, n, e, t);
6611
6598
  }
6612
6599
  var Qo = "[object Arguments]", ea = "[object Boolean]", ta = "[object Date]", na = "[object Error]", ra = "[object Map]", ia = "[object Number]", sa = "[object Object]", oa = "[object RegExp]", aa = "[object Set]", la = "[object String]", ca = "[object URL]", ua = Array.isArray, en = typeof ArrayBuffer < "u" && typeof ArrayBuffer.isView == "function" ? ArrayBuffer.isView : null, tn = Object.assign, fa = Object.prototype.toString.call.bind(Object.prototype.toString);
@@ -7047,7 +7034,7 @@ var Ca = typeof window < "u" ? wr : Sr, Aa = class {
7047
7034
  }
7048
7035
  }
7049
7036
  };
7050
- function dl(n) {
7037
+ function fl(n) {
7051
7038
  var e;
7052
7039
  const [t] = vr(() => new Aa(n.editor)), r = Sa.useSyncExternalStoreWithSelector(
7053
7040
  t.subscribe,
@@ -7059,17 +7046,17 @@ function dl(n) {
7059
7046
  return Ca(() => t.watch(n.editor), [n.editor, t]), kr(r), r;
7060
7047
  }
7061
7048
  process.env.NODE_ENV;
7062
- var fr = ln({
7049
+ var ur = ln({
7063
7050
  editor: null
7064
7051
  });
7065
- fr.Consumer;
7066
- var hl = () => cn(fr), dr = ln({
7052
+ ur.Consumer;
7053
+ var dl = () => cn(ur), fr = ln({
7067
7054
  onDragStart: () => {
7068
7055
  },
7069
7056
  nodeViewContentChildren: void 0,
7070
7057
  nodeViewContentRef: () => {
7071
7058
  }
7072
- }), Ra = () => cn(dr), pl = L.forwardRef((n, e) => {
7059
+ }), Ra = () => cn(fr), hl = L.forwardRef((n, e) => {
7073
7060
  const { onDragStart: t } = Ra(), r = n.as || "div";
7074
7061
  return (
7075
7062
  // @ts-ignore
@@ -7205,7 +7192,7 @@ var za = class extends $o {
7205
7192
  }
7206
7193
  const r = { onDragStart: this.onDragStart.bind(this), nodeViewContentRef: (l) => {
7207
7194
  l && this.contentDOMElement && l.firstChild !== this.contentDOMElement && (l.hasAttribute("data-node-view-wrapper") && l.removeAttribute("data-node-view-wrapper"), l.appendChild(this.contentDOMElement));
7208
- } }, i = this.component, s = yr((l) => /* @__PURE__ */ ae(dr.Provider, { value: r, children: gr(i, l) }));
7195
+ } }, i = this.component, s = yr((l) => /* @__PURE__ */ ae(fr.Provider, { value: r, children: gr(i, l) }));
7209
7196
  s.displayName = "ReactNodeView";
7210
7197
  let o = this.node.isInline ? "span" : "div";
7211
7198
  this.options.as && (o = this.options.as);
@@ -7318,74 +7305,87 @@ var za = class extends $o {
7318
7305
  }
7319
7306
  }
7320
7307
  };
7321
- function ml(n, e) {
7308
+ function pl(n, e) {
7322
7309
  return (t) => t.editor.contentComponent ? new za(n, t, e) : {};
7323
7310
  }
7311
+ function dr(n) {
7312
+ var e, t, r = "";
7313
+ if (typeof n == "string" || typeof n == "number") r += n;
7314
+ else if (typeof n == "object") if (Array.isArray(n)) {
7315
+ var i = n.length;
7316
+ for (e = 0; e < i; e++) n[e] && (t = dr(n[e])) && (r && (r += " "), r += t);
7317
+ } else for (t in n) n[t] && (r && (r += " "), r += t);
7318
+ return r;
7319
+ }
7320
+ function ml() {
7321
+ for (var n, e, t = 0, r = "", i = arguments.length; t < i; t++) (n = arguments[t]) && (e = dr(n)) && (r && (r += " "), r += e);
7322
+ return r;
7323
+ }
7324
7324
  export {
7325
7325
  Ps as $,
7326
7326
  _ as A,
7327
- No as B,
7328
- Fa as C,
7329
- vn as D,
7327
+ ml as B,
7328
+ ur as C,
7329
+ gn as D,
7330
7330
  j as E,
7331
7331
  v as F,
7332
- hl as G,
7333
- dl as H,
7334
- zs as I,
7335
- Ws as J,
7336
- Va as K,
7337
- tr as L,
7338
- el as M,
7339
- cl as N,
7340
- Ha as O,
7341
- ll as P,
7342
- ja as Q,
7332
+ zs as G,
7333
+ Ws as H,
7334
+ Wa as I,
7335
+ er as J,
7336
+ Ja as K,
7337
+ al as L,
7338
+ Qa as M,
7339
+ ll as N,
7340
+ dl as O,
7341
+ fl as P,
7342
+ qa as Q,
7343
7343
  Ia as R,
7344
7344
  A as S,
7345
7345
  $ as T,
7346
- Wa as U,
7346
+ ja as U,
7347
7347
  ze as V,
7348
7348
  q as W,
7349
7349
  Se as X,
7350
- nr as Y,
7350
+ tr as Y,
7351
7351
  yi as Z,
7352
7352
  mi as _,
7353
- Xa as a,
7354
- or as a0,
7353
+ Ga as a,
7354
+ sr as a0,
7355
7355
  qe as a1,
7356
- ol as a2,
7357
- Kn as a3,
7358
- Ja as a4,
7356
+ sl as a2,
7357
+ Un as a3,
7358
+ Va as a4,
7359
7359
  Ls as a5,
7360
7360
  yt as a6,
7361
- Ka as a7,
7362
- Za as a8,
7361
+ Ua as a7,
7362
+ Ya as a8,
7363
7363
  Vs as a9,
7364
7364
  Ir as aa,
7365
- fl as ab,
7366
- Ga as b,
7367
- Ua as c,
7368
- Qa as d,
7369
- fr as e,
7370
- ul as f,
7365
+ ul as ab,
7366
+ Ka as b,
7367
+ Ha as c,
7368
+ Za as d,
7369
+ cl as e,
7370
+ tl as f,
7371
7371
  I as g,
7372
- nl as h,
7372
+ Fe as h,
7373
7373
  we as i,
7374
- Fe as j,
7375
- al as k,
7376
- Ya as l,
7374
+ ol as j,
7375
+ Xa as k,
7376
+ Ht as l,
7377
7377
  Bs as m,
7378
- rl as n,
7379
- Ht as o,
7378
+ nl as n,
7379
+ hl as o,
7380
7380
  Io as p,
7381
- pl as q,
7381
+ el as q,
7382
7382
  zo as r,
7383
- tl as s,
7384
- il as t,
7385
- ml as u,
7386
- C as v,
7387
- sl as w,
7388
- w as x,
7389
- qa as y,
7390
- st as z
7383
+ pl as s,
7384
+ rl as t,
7385
+ C as u,
7386
+ w as v,
7387
+ il as w,
7388
+ Fa as x,
7389
+ st as y,
7390
+ No as z
7391
7391
  };