@dialpad/dialtone 9.15.1 → 9.15.2

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (51) hide show
  1. package/dist/css/CHANGELOG.json +1 -1
  2. package/dist/css/dialtone.css +8 -3
  3. package/dist/css/dialtone.min.css +1 -1
  4. package/dist/tokens/android/java/tokens-dark.kt +1 -1
  5. package/dist/tokens/android/java/tokens-light.kt +1 -1
  6. package/dist/tokens/android/res/values/colors-dark.xml +1 -1
  7. package/dist/tokens/android/res/values/colors-light.xml +1 -1
  8. package/dist/tokens/android/res/values/dimens.xml +1 -1
  9. package/dist/tokens/css/variables-dark.css +1 -1
  10. package/dist/tokens/css/variables-light.css +1 -1
  11. package/dist/tokens/ios/tokens-dark.swift +1 -1
  12. package/dist/tokens/ios/tokens-light.swift +1 -1
  13. package/dist/tokens/less/variables-dark.less +1 -1
  14. package/dist/tokens/less/variables-light.less +1 -1
  15. package/dist/vue2/component-documentation.json +1 -1
  16. package/dist/vue2/dialtone-vue.cjs +2 -2
  17. package/dist/vue2/dialtone-vue.js +21 -28
  18. package/dist/vue2/message_input.cjs +1 -1
  19. package/dist/vue2/message_input.js +1 -1
  20. package/dist/vue2/{rich_text_editor-VIRykWIa.cjs → rich_text_editor-MzdHNizj.cjs} +17 -17
  21. package/dist/vue2/{rich_text_editor-eFa_UQsN.js → rich_text_editor-trHmm1VD.js} +1363 -1357
  22. package/dist/vue2/style.css +1 -1
  23. package/dist/vue2/types/components/avatar/avatar.vue.d.ts +27 -9
  24. package/dist/vue2/types/components/avatar/avatar.vue.d.ts.map +1 -1
  25. package/dist/vue2/types/components/list_item/list_item.vue.d.ts +2 -0
  26. package/dist/vue2/types/components/list_item/list_item.vue.d.ts.map +1 -1
  27. package/dist/vue2/types/recipes/conversation_view/feed_item_row/feed_item_row.vue.d.ts +4 -2
  28. package/dist/vue2/types/recipes/conversation_view/feed_item_row/feed_item_row.vue.d.ts.map +1 -1
  29. package/dist/vue2/types/recipes/item_layout/contact_info/contact_info.vue.d.ts +11 -11
  30. package/dist/vue2/types/recipes/leftbar/callbox/callbox.vue.d.ts +4 -4
  31. package/dist/vue2/types/recipes/leftbar/contact_row/contact_row.vue.d.ts +0 -17
  32. package/dist/vue2/types/recipes/leftbar/contact_row/contact_row.vue.d.ts.map +1 -1
  33. package/dist/vue3/component-documentation.json +1 -1
  34. package/dist/vue3/dialtone-vue.cjs +2 -2
  35. package/dist/vue3/dialtone-vue.js +22 -25
  36. package/dist/vue3/message_input.cjs +1 -1
  37. package/dist/vue3/message_input.js +1 -1
  38. package/dist/vue3/{rich_text_editor--3JpdmJ2.cjs → rich_text_editor-2jqjuGrZ.cjs} +17 -17
  39. package/dist/vue3/{rich_text_editor-_GiT5AG_.js → rich_text_editor-NWAFxCaY.js} +708 -690
  40. package/dist/vue3/style.css +1 -1
  41. package/dist/vue3/types/components/avatar/avatar.vue.d.ts +29 -11
  42. package/dist/vue3/types/components/avatar/avatar.vue.d.ts.map +1 -1
  43. package/dist/vue3/types/components/list_item/list_item.vue.d.ts +2 -0
  44. package/dist/vue3/types/components/list_item/list_item.vue.d.ts.map +1 -1
  45. package/dist/vue3/types/recipes/conversation_view/feed_item_row/feed_item_row.vue.d.ts +4 -2
  46. package/dist/vue3/types/recipes/conversation_view/feed_item_row/feed_item_row.vue.d.ts.map +1 -1
  47. package/dist/vue3/types/recipes/item_layout/contact_info/contact_info.vue.d.ts +11 -11
  48. package/dist/vue3/types/recipes/leftbar/callbox/callbox.vue.d.ts +4 -4
  49. package/dist/vue3/types/recipes/leftbar/contact_row/contact_row.vue.d.ts +0 -17
  50. package/dist/vue3/types/recipes/leftbar/contact_row/contact_row.vue.d.ts.map +1 -1
  51. package/package.json +1 -1
@@ -227,12 +227,13 @@ const Dc = (n) => {
227
227
  default: ""
228
228
  },
229
229
  /**
230
- * Alt attribute of the image, by default
231
- * it'd be the full name
230
+ * Alt attribute of the image, required if imageSrc is provided.
231
+ * Can be set to '' (empty string) if the image is described
232
+ * in text nearby
232
233
  */
233
234
  imageAlt: {
234
235
  type: String,
235
- default: ""
236
+ default: void 0
236
237
  },
237
238
  /**
238
239
  * Icon name to be displayed on the avatar
@@ -252,7 +253,7 @@ const Dc = (n) => {
252
253
  validator: (n) => !n || Object.keys(oc).includes(n)
253
254
  },
254
255
  /**
255
- * Full name used to extract initials and set alt attribute.
256
+ * Full name used to extract initials.
256
257
  */
257
258
  fullName: {
258
259
  type: String,
@@ -265,6 +266,14 @@ const Dc = (n) => {
265
266
  clickable: {
266
267
  type: Boolean,
267
268
  default: !1
269
+ },
270
+ /**
271
+ * Descriptive label for the icon.
272
+ * To avoid a11y issues, set this prop if clickable and iconName are set.
273
+ */
274
+ iconAriaLabel: {
275
+ type: String,
276
+ default: void 0
268
277
  }
269
278
  },
270
279
  emits: [
@@ -320,17 +329,25 @@ const Dc = (n) => {
320
329
  },
321
330
  showImage() {
322
331
  return this.imageLoadedSuccessfully !== !1 && this.imageSrc;
323
- },
324
- buttonAriaLabel() {
325
- if (this.clickable)
326
- return this.fullName || this.imageAlt || this.$attrs["aria-label"];
327
332
  }
328
333
  },
329
334
  watch: {
330
335
  fullName: {
331
336
  immediate: !0,
332
- handler(n) {
333
- this.formatInitials(n);
337
+ handler() {
338
+ this.formatInitials();
339
+ }
340
+ },
341
+ size: {
342
+ immediate: !0,
343
+ handler() {
344
+ this.formatInitials();
345
+ }
346
+ },
347
+ group: {
348
+ immediate: !0,
349
+ handler() {
350
+ this.formatInitials();
334
351
  }
335
352
  },
336
353
  imageSrc(n) {
@@ -346,9 +363,9 @@ const Dc = (n) => {
346
363
  const n = this.$refs.avatarImage;
347
364
  n && (n.addEventListener("load", () => this._loadedImageEventHandler(n), { once: !0 }), n.addEventListener("error", () => this._erroredImageEventHandler(n), { once: !0 }));
348
365
  },
349
- formatInitials(n) {
350
- const e = Dc(n);
351
- this.validatedSize === "xs" ? this.formattedInitials = "" : this.validatedSize === "sm" ? this.formattedInitials = e[0] : this.formattedInitials = e;
366
+ formatInitials() {
367
+ const n = Dc(this.fullName);
368
+ this.validatedSize === "xs" ? this.formattedInitials = "" : this.validatedSize === "sm" ? this.formattedInitials = n[0] : this.formattedInitials = n;
352
369
  },
353
370
  getColor() {
354
371
  return this.color ?? Ga(Ac, this.seed);
@@ -360,7 +377,7 @@ const Dc = (n) => {
360
377
  this.imageLoadedSuccessfully = !1, n.classList.add("d-d-none");
361
378
  },
362
379
  validateProps() {
363
- if (this.imageSrc && !(this.fullName || this.imageAlt))
380
+ if (this.imageSrc && this.imageAlt === void 0)
364
381
  throw new Error("full-name or image-alt must be set if image-src is provided");
365
382
  },
366
383
  handleClick(n) {
@@ -381,7 +398,6 @@ function _c(n, e, t, r, i, s) {
381
398
  id: t.id,
382
399
  class: X(s.avatarClasses),
383
400
  "data-qa": "dt-avatar",
384
- "aria-label": s.buttonAriaLabel,
385
401
  onClick: s.handleClick
386
402
  }, {
387
403
  default: q(() => [
@@ -399,14 +415,15 @@ function _c(n, e, t, r, i, s) {
399
415
  class: "d-avatar__image",
400
416
  "data-qa": "dt-avatar-image",
401
417
  src: t.imageSrc,
402
- alt: t.imageAlt || t.fullName
418
+ alt: t.imageAlt
403
419
  }, null, 8, Pc)) : t.iconName ? (O(), z(o, {
404
420
  key: 1,
405
421
  name: t.iconName,
422
+ "aria-label": t.iconAriaLabel,
406
423
  size: t.iconSize || i.AVATAR_ICON_SIZES[t.size],
407
424
  class: X([t.iconClass, i.AVATAR_KIND_MODIFIERS.icon]),
408
425
  "data-qa": "dt-avatar-icon"
409
- }, null, 8, ["name", "size", "class"])) : (O(), j("span", {
426
+ }, null, 8, ["name", "aria-label", "size", "class"])) : (O(), j("span", {
410
427
  key: 2,
411
428
  class: X([i.AVATAR_KIND_MODIFIERS.initials])
412
429
  }, ut(i.formattedInitials), 3))
@@ -432,7 +449,7 @@ function _c(n, e, t, r, i, s) {
432
449
  }, t.presenceProps, { "data-qa": "dt-presence" }), null, 16, ["presence", "class"])) : J("", !0)
433
450
  ]),
434
451
  _: 1
435
- }, 8, ["id", "class", "aria-label", "onClick"]);
452
+ }, 8, ["id", "class", "onClick"]);
436
453
  }
437
454
  const Fc = /* @__PURE__ */ de(Rc, [["render", _c]]), zc = {
438
455
  name: "DtLink",
@@ -696,7 +713,7 @@ function rd(n, e, t, r, i, s) {
696
713
  _: 3
697
714
  }, 8, ["class"]);
698
715
  }
699
- const Os = /* @__PURE__ */ de(Yc, [["render", rd]]), id = {
716
+ const Os = /* @__PURE__ */ de(Yc, [["render", rd]]), id = ["listitem", "option"], sd = {
700
717
  name: "DtListItem",
701
718
  components: {
702
719
  DtItemLayout: Os,
@@ -723,7 +740,8 @@ const Os = /* @__PURE__ */ de(Yc, [["render", rd]]), id = {
723
740
  */
724
741
  role: {
725
742
  type: String,
726
- default: "listitem"
743
+ default: "listitem",
744
+ validator: (n) => id.includes(n)
727
745
  },
728
746
  /**
729
747
  * HTML element type (tag name) of the content wrapper element.
@@ -847,7 +865,7 @@ const Os = /* @__PURE__ */ de(Yc, [["render", rd]]), id = {
847
865
  }
848
866
  }
849
867
  };
850
- function sd(n, e, t, r, i, s) {
868
+ function od(n, e, t, r, i, s) {
851
869
  const o = $("dt-icon");
852
870
  return O(), z(kt(t.elementType), Tr({
853
871
  id: t.id,
@@ -858,7 +876,7 @@ function sd(n, e, t, r, i, s) {
858
876
  }],
859
877
  tabindex: s.isFocusable ? 0 : -1,
860
878
  role: t.role,
861
- "aria-selected": s.isHighlighted
879
+ "aria-selected": t.role === "option" ? s.isHighlighted : void 0
862
880
  }, rl(s.listItemListeners)), {
863
881
  default: q(() => [
864
882
  s.listItemType ? (O(), z(kt(s.listItemType), { key: 0 }, uc({ _: 2 }, [
@@ -884,7 +902,7 @@ function sd(n, e, t, r, i, s) {
884
902
  _: 3
885
903
  }, 16, ["id", "class", "tabindex", "role", "aria-selected"]);
886
904
  }
887
- const od = /* @__PURE__ */ de(id, [["render", sd]]), St = {
905
+ const ld = /* @__PURE__ */ de(sd, [["render", od]]), St = {
888
906
  default: "column",
889
907
  column: "column",
890
908
  row: "row",
@@ -895,16 +913,16 @@ const od = /* @__PURE__ */ de(id, [["render", sd]]), St = {
895
913
  small: "d-p4",
896
914
  medium: "d-p8",
897
915
  large: "d-p16"
898
- }, ld = {
916
+ }, ad = {
899
917
  none: void 0,
900
918
  small: "d-pl4",
901
919
  medium: "d-pl8",
902
920
  large: "d-pl16"
903
- }, ad = ["dialog", "menu", "listbox", "tree", "grid"], cd = ["", "anchor"], dd = ["none", "dialog", "first"], ud = ["parent", "body"], hd = [
921
+ }, cd = ["dialog", "menu", "listbox", "tree", "grid"], dd = ["", "anchor"], ud = ["none", "dialog", "first"], hd = ["parent", "body"], fd = [
904
922
  ...Xa
905
- ], my = [
923
+ ], gy = [
906
924
  ...Qa
907
- ], fd = {
925
+ ], pd = {
908
926
  name: "PopoverHeaderFooter",
909
927
  components: {
910
928
  DtButton: el,
@@ -965,7 +983,7 @@ const od = /* @__PURE__ */ de(id, [["render", sd]]), St = {
965
983
  }
966
984
  }
967
985
  };
968
- function pd(n, e, t, r, i, s) {
986
+ function md(n, e, t, r, i, s) {
969
987
  const o = $("dt-icon"), l = $("dt-button");
970
988
  return O(), j("div", {
971
989
  "data-qa": "dt-popover-header-footer",
@@ -1008,7 +1026,7 @@ function pd(n, e, t, r, i, s) {
1008
1026
  }, 16, ["class"])) : J("", !0)
1009
1027
  ], 2);
1010
1028
  }
1011
- const md = /* @__PURE__ */ de(fd, [["render", pd]]), gd = {
1029
+ const gd = /* @__PURE__ */ de(pd, [["render", md]]), yd = {
1012
1030
  name: "DtPopover",
1013
1031
  /********************
1014
1032
  * CHILD COMPONENTS *
@@ -1016,7 +1034,7 @@ const md = /* @__PURE__ */ de(fd, [["render", pd]]), gd = {
1016
1034
  components: {
1017
1035
  SrOnlyCloseButton: Wc,
1018
1036
  DtLazyShow: Za,
1019
- PopoverHeaderFooter: md
1037
+ PopoverHeaderFooter: gd
1020
1038
  },
1021
1039
  mixins: [Gc, jc],
1022
1040
  props: {
@@ -1061,7 +1079,7 @@ const md = /* @__PURE__ */ de(fd, [["render", pd]]), gd = {
1061
1079
  role: {
1062
1080
  type: String,
1063
1081
  default: "dialog",
1064
- validator: (n) => ad.includes(n)
1082
+ validator: (n) => cd.includes(n)
1065
1083
  },
1066
1084
  /**
1067
1085
  * ID of the element that serves as the label for the popover content.
@@ -1114,7 +1132,7 @@ const md = /* @__PURE__ */ de(fd, [["render", pd]]), gd = {
1114
1132
  contentWidth: {
1115
1133
  type: String,
1116
1134
  default: "",
1117
- validator: (n) => cd.includes(n)
1135
+ validator: (n) => dd.includes(n)
1118
1136
  },
1119
1137
  /**
1120
1138
  * Whether to apply transition on initial render in the content lazy show component.
@@ -1248,7 +1266,7 @@ const md = /* @__PURE__ */ de(fd, [["render", pd]]), gd = {
1248
1266
  sticky: {
1249
1267
  type: [Boolean, String],
1250
1268
  default: !1,
1251
- validator: (n) => hd.includes(n)
1269
+ validator: (n) => fd.includes(n)
1252
1270
  },
1253
1271
  /**
1254
1272
  * Determines maximum height for the popover before overflow.
@@ -1306,7 +1324,7 @@ const md = /* @__PURE__ */ de(fd, [["render", pd]]), gd = {
1306
1324
  initialFocusElement: {
1307
1325
  type: [String, HTMLElement],
1308
1326
  default: "first",
1309
- validator: (n) => dd.includes(n) || n instanceof HTMLElement || n.startsWith("#")
1327
+ validator: (n) => ud.includes(n) || n instanceof HTMLElement || n.startsWith("#")
1310
1328
  },
1311
1329
  /**
1312
1330
  * If the popover should open pressing up or down arrow key on the anchor element.
@@ -1325,7 +1343,7 @@ const md = /* @__PURE__ */ de(fd, [["render", pd]]), gd = {
1325
1343
  appendTo: {
1326
1344
  type: [HTMLElement, String],
1327
1345
  default: "body",
1328
- validator: (n) => ud.includes(n) || n instanceof HTMLElement
1346
+ validator: (n) => hd.includes(n) || n instanceof HTMLElement
1329
1347
  },
1330
1348
  /**
1331
1349
  * Set this prop to true and popover component will support hovercard behaviour
@@ -1371,7 +1389,7 @@ const md = /* @__PURE__ */ de(fd, [["render", pd]]), gd = {
1371
1389
  data() {
1372
1390
  return {
1373
1391
  POPOVER_PADDING_CLASSES: vs,
1374
- POPOVER_HEADER_FOOTER_PADDING_CLASSES: ld,
1392
+ POPOVER_HEADER_FOOTER_PADDING_CLASSES: ad,
1375
1393
  intersectionObserver: null,
1376
1394
  isOutsideViewport: !1,
1377
1395
  isOpen: !1,
@@ -1656,8 +1674,8 @@ const md = /* @__PURE__ */ de(fd, [["render", pd]]), gd = {
1656
1674
  // $ HOVERCARD
1657
1675
  // ----------------------------------------------------------------------------
1658
1676
  }
1659
- }, yd = ["aria-hidden"], bd = ["id", "data-qa", "tabindex"], kd = ["data-qa"];
1660
- function Sd(n, e, t, r, i, s) {
1677
+ }, bd = ["aria-hidden"], kd = ["id", "data-qa", "tabindex"], Sd = ["data-qa"];
1678
+ function xd(n, e, t, r, i, s) {
1661
1679
  const o = $("popover-header-footer"), l = $("sr-only-close-button"), a = $("dt-lazy-show");
1662
1680
  return O(), j("div", null, [
1663
1681
  t.modal && i.isOpen ? (O(), z(sl, {
@@ -1669,7 +1687,7 @@ function Sd(n, e, t, r, i, s) {
1669
1687
  "aria-hidden": t.modal && i.isOpen ? "false" : "true",
1670
1688
  onClick: e[0] || (e[0] = Xt(() => {
1671
1689
  }, ["prevent", "stop"]))
1672
- }, null, 8, yd)
1690
+ }, null, 8, bd)
1673
1691
  ])) : J("", !0),
1674
1692
  (O(), z(kt(t.elementType), {
1675
1693
  ref: "popover",
@@ -1701,7 +1719,7 @@ function Sd(n, e, t, r, i, s) {
1701
1719
  "aria-haspopup": t.role
1702
1720
  }
1703
1721
  })
1704
- ], 40, bd),
1722
+ ], 40, kd),
1705
1723
  nt(a, Tr({
1706
1724
  id: t.id,
1707
1725
  ref: "content",
@@ -1751,7 +1769,7 @@ function Sd(n, e, t, r, i, s) {
1751
1769
  ])
1752
1770
  }, [
1753
1771
  se(n.$slots, "content", { close: s.closePopover })
1754
- ], 10, kd),
1772
+ ], 10, Sd),
1755
1773
  i.hasSlotContent(n.$slots.footerContent) ? (O(), z(o, {
1756
1774
  key: 1,
1757
1775
  ref: "popover__footer",
@@ -1777,7 +1795,7 @@ function Sd(n, e, t, r, i, s) {
1777
1795
  }, 8, ["class"]))
1778
1796
  ]);
1779
1797
  }
1780
- const gy = /* @__PURE__ */ de(gd, [["render", Sd]]);
1798
+ const yy = /* @__PURE__ */ de(yd, [["render", xd]]);
1781
1799
  function As(n) {
1782
1800
  return n === St.default;
1783
1801
  }
@@ -1793,18 +1811,18 @@ function Ns(n) {
1793
1811
  function ln(n) {
1794
1812
  return typeof n;
1795
1813
  }
1796
- function xd(n) {
1814
+ function Cd(n) {
1797
1815
  return Ns(n) ? `d-stack--${St[Ns(n)]}` : null;
1798
1816
  }
1799
- function Cd(n) {
1817
+ function Ed(n) {
1800
1818
  return ln(n) === "object" ? [
1801
1819
  ...cl.map((e) => n[e] ? `d-stack--${e}--${n[e]}` : null)
1802
1820
  ] : null;
1803
1821
  }
1804
- function Ed(n) {
1822
+ function Td(n) {
1805
1823
  return Ui.includes(n) ? `d-stack--gap-${n}` : null;
1806
1824
  }
1807
- function Td(n) {
1825
+ function Md(n) {
1808
1826
  if (ln(n) === "string")
1809
1827
  return Object.keys(St).includes(n);
1810
1828
  if (ln(n) === "object") {
@@ -1813,10 +1831,10 @@ function Td(n) {
1813
1831
  } else
1814
1832
  return null;
1815
1833
  }
1816
- function Md(n) {
1834
+ function wd(n) {
1817
1835
  return Ui.includes(n);
1818
1836
  }
1819
- const wd = {
1837
+ const Od = {
1820
1838
  name: "DtStack",
1821
1839
  props: {
1822
1840
  /**
@@ -1830,7 +1848,7 @@ const wd = {
1830
1848
  direction: {
1831
1849
  type: [String, Object],
1832
1850
  default: "column",
1833
- validator: (n) => Td(n)
1851
+ validator: (n) => Md(n)
1834
1852
  },
1835
1853
  /**
1836
1854
  * Set this prop to render stack as a specific HTML element.
@@ -1846,7 +1864,7 @@ const wd = {
1846
1864
  gap: {
1847
1865
  type: String,
1848
1866
  default: "0",
1849
- validator: (n) => Md(n)
1867
+ validator: (n) => wd(n)
1850
1868
  }
1851
1869
  },
1852
1870
  data() {
@@ -1858,17 +1876,17 @@ const wd = {
1858
1876
  },
1859
1877
  computed: {
1860
1878
  stackGap() {
1861
- return Ed(this.gap);
1879
+ return Td(this.gap);
1862
1880
  },
1863
1881
  defaultDirection() {
1864
- return xd(this.direction);
1882
+ return Cd(this.direction);
1865
1883
  },
1866
1884
  stackResponsive() {
1867
- return Cd(this.direction);
1885
+ return Ed(this.direction);
1868
1886
  }
1869
1887
  }
1870
1888
  };
1871
- function Od(n, e, t, r, i, s) {
1889
+ function vd(n, e, t, r, i, s) {
1872
1890
  return O(), z(kt(t.as), {
1873
1891
  class: X([
1874
1892
  "d-stack",
@@ -1883,7 +1901,7 @@ function Od(n, e, t, r, i, s) {
1883
1901
  _: 3
1884
1902
  }, 8, ["class"]);
1885
1903
  }
1886
- const dl = /* @__PURE__ */ de(wd, [["render", Od]]);
1904
+ const dl = /* @__PURE__ */ de(Od, [["render", vd]]);
1887
1905
  function U(n) {
1888
1906
  this.content = n;
1889
1907
  }
@@ -2524,7 +2542,7 @@ function pl(n, e, t, r) {
2524
2542
  let l = pl(o.content, e - s - 1, t);
2525
2543
  return l && n.replaceChild(i, o.copy(l));
2526
2544
  }
2527
- function vd(n, e, t) {
2545
+ function Ad(n, e, t) {
2528
2546
  if (t.openStart > n.depth)
2529
2547
  throw new Pn("Inserted content deeper than insertion position");
2530
2548
  if (n.depth - t.openStart != e.depth - t.openEnd)
@@ -2541,7 +2559,7 @@ function ml(n, e, t, r) {
2541
2559
  let o = n.parent, l = o.content;
2542
2560
  return mt(o, l.cut(0, n.parentOffset).append(t.content).append(l.cut(e.parentOffset)));
2543
2561
  } else {
2544
- let { start: o, end: l } = Ad(t, n);
2562
+ let { start: o, end: l } = Nd(t, n);
2545
2563
  return mt(s, yl(n, o, l, e, r));
2546
2564
  }
2547
2565
  else
@@ -2581,7 +2599,7 @@ function Ln(n, e, t) {
2581
2599
  }
2582
2600
  return Qt(e, null, t, r), new b(r);
2583
2601
  }
2584
- function Ad(n, e) {
2602
+ function Nd(n, e) {
2585
2603
  let t = e.depth - n.openStart, i = e.node(t).copy(n.content);
2586
2604
  for (let s = t - 1; s >= 0; s--)
2587
2605
  i = e.node(s).copy(b.from(i));
@@ -2830,10 +2848,10 @@ class an {
2830
2848
  return s;
2831
2849
  }
2832
2850
  let r = Wr[Ur] = an.resolve(e, t);
2833
- return Ur = (Ur + 1) % Nd, r;
2851
+ return Ur = (Ur + 1) % Dd, r;
2834
2852
  }
2835
2853
  }
2836
- let Wr = [], Ur = 0, Nd = 12;
2854
+ let Wr = [], Ur = 0, Dd = 12;
2837
2855
  class Bn {
2838
2856
  /**
2839
2857
  Construct a node range. `$from` and `$to` should point into the
@@ -2874,7 +2892,7 @@ class Bn {
2874
2892
  return this.$to.indexAfter(this.depth);
2875
2893
  }
2876
2894
  }
2877
- const Dd = /* @__PURE__ */ Object.create(null);
2895
+ const Id = /* @__PURE__ */ Object.create(null);
2878
2896
  let gt = class ki {
2879
2897
  /**
2880
2898
  @internal
@@ -2987,7 +3005,7 @@ let gt = class ki {
2987
3005
  attributes, and marks.
2988
3006
  */
2989
3007
  hasMarkup(e, t, r) {
2990
- return this.type == e && Rn(this.attrs, t || e.defaultAttrs || Dd) && B.sameSet(this.marks, r || B.none);
3008
+ return this.type == e && Rn(this.attrs, t || e.defaultAttrs || Id) && B.sameSet(this.marks, r || B.none);
2991
3009
  }
2992
3010
  /**
2993
3011
  Create a new node with the same markup as this node, containing
@@ -3030,7 +3048,7 @@ let gt = class ki {
3030
3048
  [`ReplaceError`](https://prosemirror.net/docs/ref/#model.ReplaceError) is thrown.
3031
3049
  */
3032
3050
  replace(e, t, r) {
3033
- return vd(this.resolve(e), this.resolve(t), r);
3051
+ return Ad(this.resolve(e), this.resolve(t), r);
3034
3052
  }
3035
3053
  /**
3036
3054
  Find the node directly after the given position.
@@ -3291,13 +3309,13 @@ class xt {
3291
3309
  @internal
3292
3310
  */
3293
3311
  static parse(e, t) {
3294
- let r = new Id(e, t);
3312
+ let r = new Rd(e, t);
3295
3313
  if (r.next == null)
3296
3314
  return xt.empty;
3297
3315
  let i = kl(r);
3298
3316
  r.next && r.err("Unexpected trailing text");
3299
- let s = zd(Fd(i));
3300
- return Hd(s, r), s;
3317
+ let s = Hd(zd(i));
3318
+ return Vd(s, r), s;
3301
3319
  }
3302
3320
  /**
3303
3321
  Match a node type, returning a match after that node if
@@ -3443,7 +3461,7 @@ class xt {
3443
3461
  }
3444
3462
  }
3445
3463
  xt.empty = new xt(!0);
3446
- class Id {
3464
+ class Rd {
3447
3465
  constructor(e, t) {
3448
3466
  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();
3449
3467
  }
@@ -3460,19 +3478,19 @@ class Id {
3460
3478
  function kl(n) {
3461
3479
  let e = [];
3462
3480
  do
3463
- e.push(Rd(n));
3481
+ e.push(Pd(n));
3464
3482
  while (n.eat("|"));
3465
3483
  return e.length == 1 ? e[0] : { type: "choice", exprs: e };
3466
3484
  }
3467
- function Rd(n) {
3485
+ function Pd(n) {
3468
3486
  let e = [];
3469
3487
  do
3470
- e.push(Pd(n));
3488
+ e.push(Ld(n));
3471
3489
  while (n.next && n.next != ")" && n.next != "|");
3472
3490
  return e.length == 1 ? e[0] : { type: "seq", exprs: e };
3473
3491
  }
3474
- function Pd(n) {
3475
- let e = _d(n);
3492
+ function Ld(n) {
3493
+ let e = Fd(n);
3476
3494
  for (; ; )
3477
3495
  if (n.eat("+"))
3478
3496
  e = { type: "plus", expr: e };
@@ -3481,7 +3499,7 @@ function Pd(n) {
3481
3499
  else if (n.eat("?"))
3482
3500
  e = { type: "opt", expr: e };
3483
3501
  else if (n.eat("{"))
3484
- e = Ld(n, e);
3502
+ e = Bd(n, e);
3485
3503
  else
3486
3504
  break;
3487
3505
  return e;
@@ -3491,11 +3509,11 @@ function Ds(n) {
3491
3509
  let e = Number(n.next);
3492
3510
  return n.pos++, e;
3493
3511
  }
3494
- function Ld(n, e) {
3512
+ function Bd(n, e) {
3495
3513
  let t = Ds(n), r = t;
3496
3514
  return n.eat(",") && (n.next != "}" ? r = Ds(n) : r = -1), n.eat("}") || n.err("Unclosed braced range"), { type: "range", min: t, max: r, expr: e };
3497
3515
  }
3498
- function Bd(n, e) {
3516
+ function _d(n, e) {
3499
3517
  let t = n.nodeTypes, r = t[e];
3500
3518
  if (r)
3501
3519
  return [r];
@@ -3506,18 +3524,18 @@ function Bd(n, e) {
3506
3524
  }
3507
3525
  return i.length == 0 && n.err("No node type or group '" + e + "' found"), i;
3508
3526
  }
3509
- function _d(n) {
3527
+ function Fd(n) {
3510
3528
  if (n.eat("(")) {
3511
3529
  let e = kl(n);
3512
3530
  return n.eat(")") || n.err("Missing closing paren"), e;
3513
3531
  } else if (/\W/.test(n.next))
3514
3532
  n.err("Unexpected token '" + n.next + "'");
3515
3533
  else {
3516
- let e = Bd(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 }));
3534
+ let e = _d(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 }));
3517
3535
  return n.pos++, e.length == 1 ? e[0] : { type: "choice", exprs: e };
3518
3536
  }
3519
3537
  }
3520
- function Fd(n) {
3538
+ function zd(n) {
3521
3539
  let e = [[]];
3522
3540
  return i(s(n, 0), t()), e;
3523
3541
  function t() {
@@ -3588,7 +3606,7 @@ function Is(n, e) {
3588
3606
  }
3589
3607
  }
3590
3608
  }
3591
- function zd(n) {
3609
+ function Hd(n) {
3592
3610
  let e = /* @__PURE__ */ Object.create(null);
3593
3611
  return t(Is(n, 0));
3594
3612
  function t(r) {
@@ -3613,7 +3631,7 @@ function zd(n) {
3613
3631
  return s;
3614
3632
  }
3615
3633
  }
3616
- function Hd(n, e) {
3634
+ function Vd(n, e) {
3617
3635
  for (let t = 0, r = [n]; t < r.length; t++) {
3618
3636
  let i = r[t], s = !i.validEnd, o = [];
3619
3637
  for (let l = 0; l < i.next.length; l++) {
@@ -3652,7 +3670,7 @@ function El(n) {
3652
3670
  let e = /* @__PURE__ */ Object.create(null);
3653
3671
  if (n)
3654
3672
  for (let t in n)
3655
- e[t] = new Vd(n[t]);
3673
+ e[t] = new $d(n[t]);
3656
3674
  return e;
3657
3675
  }
3658
3676
  let Rs = class Tl {
@@ -3821,7 +3839,7 @@ let Rs = class Tl {
3821
3839
  return r;
3822
3840
  }
3823
3841
  };
3824
- class Vd {
3842
+ class $d {
3825
3843
  constructor(e) {
3826
3844
  this.hasDefault = Object.prototype.hasOwnProperty.call(e, "default"), this.default = e.default;
3827
3845
  }
@@ -3878,7 +3896,7 @@ class Or {
3878
3896
  return this.excluded.indexOf(e) > -1;
3879
3897
  }
3880
3898
  }
3881
- class $d {
3899
+ class jd {
3882
3900
  /**
3883
3901
  Construct a schema from a schema [specification](https://prosemirror.net/docs/ref/#model.SchemaSpec).
3884
3902
  */
@@ -4011,7 +4029,7 @@ let Ji = class Si {
4011
4029
  matchTag(e, t, r) {
4012
4030
  for (let i = r ? this.tags.indexOf(r) + 1 : 0; i < this.tags.length; i++) {
4013
4031
  let s = this.tags[i];
4014
- if (Kd(e, s.tag) && (s.namespace === void 0 || e.namespaceURI == s.namespace) && (!s.context || t.matchesContext(s.context))) {
4032
+ if (Wd(e, s.tag) && (s.namespace === void 0 || e.namespaceURI == s.namespace) && (!s.context || t.matchesContext(s.context))) {
4015
4033
  if (s.getAttrs) {
4016
4034
  let o = s.getAttrs(e);
4017
4035
  if (o === !1)
@@ -4112,7 +4130,7 @@ const Ml = {
4112
4130
  table: !0,
4113
4131
  tfoot: !0,
4114
4132
  ul: !0
4115
- }, jd = {
4133
+ }, qd = {
4116
4134
  head: !0,
4117
4135
  noscript: !0,
4118
4136
  object: !0,
@@ -4160,7 +4178,7 @@ class En {
4160
4178
  applyPending(e) {
4161
4179
  for (let t = 0, r = this.pendingMarks; t < r.length; t++) {
4162
4180
  let i = r[t];
4163
- (this.type ? this.type.allowsMarkType(i.type) : Ud(i.type, e)) && !i.isInSet(this.activeMarks) && (this.activeMarks = i.addToSet(this.activeMarks), this.pendingMarks = i.removeFromSet(this.pendingMarks));
4181
+ (this.type ? this.type.allowsMarkType(i.type) : Jd(i.type, e)) && !i.isInSet(this.activeMarks) && (this.activeMarks = i.addToSet(this.activeMarks), this.pendingMarks = i.removeFromSet(this.pendingMarks));
4164
4182
  }
4165
4183
  }
4166
4184
  inlineContext(e) {
@@ -4186,7 +4204,7 @@ class Bs {
4186
4204
  let r = e.getAttribute("style");
4187
4205
  if (!r)
4188
4206
  return t();
4189
- let i = this.readStyles(Wd(r));
4207
+ let i = this.readStyles(Ud(r));
4190
4208
  if (!i)
4191
4209
  return;
4192
4210
  let [s, o] = i, l = this.top;
@@ -4218,9 +4236,9 @@ class Bs {
4218
4236
  // none is found, the element's content nodes are added directly.
4219
4237
  addElement(e, t) {
4220
4238
  let r = e.nodeName.toLowerCase(), i;
4221
- wl.hasOwnProperty(r) && this.parser.normalizeLists && qd(e);
4239
+ wl.hasOwnProperty(r) && this.parser.normalizeLists && Kd(e);
4222
4240
  let s = this.options.ruleFromNode && this.options.ruleFromNode(e) || (i = this.parser.matchTag(e, this, t));
4223
- if (s ? s.ignore : jd.hasOwnProperty(r))
4241
+ if (s ? s.ignore : qd.hasOwnProperty(r))
4224
4242
  this.findInside(e), this.ignoreFallback(e);
4225
4243
  else if (!s || s.skip || s.closeParent) {
4226
4244
  s && s.closeParent ? this.open = Math.max(0, this.open - 1) : s && s.skip.nodeType && (e = s.skip);
@@ -4433,7 +4451,7 @@ class Bs {
4433
4451
  }
4434
4452
  }
4435
4453
  addPendingMark(e) {
4436
- let t = Jd(e, this.top.pendingMarks);
4454
+ let t = Gd(e, this.top.pendingMarks);
4437
4455
  t && this.top.stashMarks.push(t), this.top.pendingMarks = e.addToSet(this.top.pendingMarks);
4438
4456
  }
4439
4457
  removePendingMark(e, t) {
@@ -4451,16 +4469,16 @@ class Bs {
4451
4469
  }
4452
4470
  }
4453
4471
  }
4454
- function qd(n) {
4472
+ function Kd(n) {
4455
4473
  for (let e = n.firstChild, t = null; e; e = e.nextSibling) {
4456
4474
  let r = e.nodeType == 1 ? e.nodeName.toLowerCase() : null;
4457
4475
  r && wl.hasOwnProperty(r) && t ? (t.appendChild(e), e = t) : r == "li" ? t = e : r && (t = null);
4458
4476
  }
4459
4477
  }
4460
- function Kd(n, e) {
4478
+ function Wd(n, e) {
4461
4479
  return (n.matches || n.msMatchesSelector || n.webkitMatchesSelector || n.mozMatchesSelector).call(n, e);
4462
4480
  }
4463
- function Wd(n) {
4481
+ function Ud(n) {
4464
4482
  let e = /\s*([\w-]+)\s*:\s*([^;]+)/g, t, r = [];
4465
4483
  for (; t = e.exec(n); )
4466
4484
  r.push(t[1], t[2].trim());
@@ -4472,7 +4490,7 @@ function _s(n) {
4472
4490
  e[t] = n[t];
4473
4491
  return e;
4474
4492
  }
4475
- function Ud(n, e) {
4493
+ function Jd(n, e) {
4476
4494
  let t = e.schema.nodes;
4477
4495
  for (let r in t) {
4478
4496
  let i = t[r];
@@ -4490,7 +4508,7 @@ function Ud(n, e) {
4490
4508
  return !0;
4491
4509
  }
4492
4510
  }
4493
- function Jd(n, e) {
4511
+ function Gd(n, e) {
4494
4512
  for (let t = 0; t < e.length; t++)
4495
4513
  if (n.eq(e[t]))
4496
4514
  return e[t];
@@ -4648,13 +4666,13 @@ function Jr(n) {
4648
4666
  return n.document || window.document;
4649
4667
  }
4650
4668
  const Ol = 65535, vl = Math.pow(2, 16);
4651
- function Gd(n, e) {
4669
+ function Yd(n, e) {
4652
4670
  return n + e * vl;
4653
4671
  }
4654
4672
  function zs(n) {
4655
4673
  return n & Ol;
4656
4674
  }
4657
- function Yd(n) {
4675
+ function Xd(n) {
4658
4676
  return (n - (n & Ol)) / vl;
4659
4677
  }
4660
4678
  const Al = 1, Nl = 2, An = 4, Dl = 8;
@@ -4712,7 +4730,7 @@ class pe {
4712
4730
  if (!this.inverted)
4713
4731
  for (let i = 0; i < r; i++)
4714
4732
  t += this.ranges[i * 3 + 2] - this.ranges[i * 3 + 1];
4715
- return this.ranges[r * 3] + t + Yd(e);
4733
+ return this.ranges[r * 3] + t + Xd(e);
4716
4734
  }
4717
4735
  mapResult(e, t = 1) {
4718
4736
  return this._map(e, t, !1);
@@ -4734,7 +4752,7 @@ class pe {
4734
4752
  let h = c ? e == a ? -1 : e == u ? 1 : t : t, f = a + i + (h < 0 ? 0 : d);
4735
4753
  if (r)
4736
4754
  return f;
4737
- let p = e == (t < 0 ? a : u) ? null : Gd(l / 3, e - a), m = e == a ? Nl : e == u ? Al : An;
4755
+ let p = e == (t < 0 ? a : u) ? null : Yd(l / 3, e - a), m = e == a ? Nl : e == u ? Al : An;
4738
4756
  return (t < 0 ? e != a : e != u) && (m |= Dl), new xi(f, m, p);
4739
4757
  }
4740
4758
  i += d - c;
@@ -5263,7 +5281,7 @@ function Ci(n, e, t) {
5263
5281
  }
5264
5282
  return !1;
5265
5283
  }
5266
- function Xd(n, e, t, r) {
5284
+ function Qd(n, e, t, r) {
5267
5285
  let i = [], s = [], o, l;
5268
5286
  n.doc.nodesBetween(e, t, (a, c, d) => {
5269
5287
  if (!a.isInline)
@@ -5277,7 +5295,7 @@ function Xd(n, e, t, r) {
5277
5295
  }
5278
5296
  }), i.forEach((a) => n.step(a)), s.forEach((a) => n.step(a));
5279
5297
  }
5280
- function Qd(n, e, t, r) {
5298
+ function Zd(n, e, t, r) {
5281
5299
  let i = [], s = 0;
5282
5300
  n.doc.nodesBetween(e, t, (o, l) => {
5283
5301
  if (!o.isInline)
@@ -5303,7 +5321,7 @@ function Qd(n, e, t, r) {
5303
5321
  }
5304
5322
  }), i.forEach((o) => n.step(new De(o.from, o.to, o.style)));
5305
5323
  }
5306
- function Zd(n, e, t, r = t.contentMatch) {
5324
+ function eu(n, e, t, r = t.contentMatch) {
5307
5325
  let i = n.doc.nodeAt(e), s = [], o = e + 1;
5308
5326
  for (let l = 0; l < i.childCount; l++) {
5309
5327
  let a = i.child(l), c = o + a.nodeSize, d = r.matchType(a.type);
@@ -5328,7 +5346,7 @@ function Zd(n, e, t, r = t.contentMatch) {
5328
5346
  for (let l = s.length - 1; l >= 0; l--)
5329
5347
  n.step(s[l]);
5330
5348
  }
5331
- function eu(n, e, t) {
5349
+ function tu(n, e, t) {
5332
5350
  return (e == 0 || n.canReplace(e, n.childCount)) && (t == n.childCount || n.canReplace(0, t));
5333
5351
  }
5334
5352
  function jt(n) {
@@ -5337,12 +5355,12 @@ function jt(n) {
5337
5355
  let i = n.$from.node(r), s = n.$from.index(r), o = n.$to.indexAfter(r);
5338
5356
  if (r < n.depth && i.canReplace(s, o, t))
5339
5357
  return r;
5340
- if (r == 0 || i.type.spec.isolating || !eu(i, s, o))
5358
+ if (r == 0 || i.type.spec.isolating || !tu(i, s, o))
5341
5359
  break;
5342
5360
  }
5343
5361
  return null;
5344
5362
  }
5345
- function tu(n, e, t) {
5363
+ function nu(n, e, t) {
5346
5364
  let { $from: r, $to: i, depth: s } = e, o = r.before(s + 1), l = i.after(s + 1), a = o, c = l, d = b.empty, u = 0;
5347
5365
  for (let p = s, m = !1; p > t; p--)
5348
5366
  m || r.index(p) > 0 ? (m = !0, d = b.from(r.node(p).copy(d)), u++) : a--;
@@ -5352,20 +5370,20 @@ function tu(n, e, t) {
5352
5370
  n.step(new K(a, c, o, l, new S(d.append(h), u, f), d.size - u, !0));
5353
5371
  }
5354
5372
  function Yi(n, e, t = null, r = n) {
5355
- let i = nu(n, e), s = i && ru(r, e);
5373
+ let i = ru(n, e), s = i && iu(r, e);
5356
5374
  return s ? i.map(Hs).concat({ type: e, attrs: t }).concat(s.map(Hs)) : null;
5357
5375
  }
5358
5376
  function Hs(n) {
5359
5377
  return { type: n, attrs: null };
5360
5378
  }
5361
- function nu(n, e) {
5379
+ function ru(n, e) {
5362
5380
  let { parent: t, startIndex: r, endIndex: i } = n, s = t.contentMatchAt(r).findWrapping(e);
5363
5381
  if (!s)
5364
5382
  return null;
5365
5383
  let o = s.length ? s[0] : e;
5366
5384
  return t.canReplaceWith(r, i, o) ? s : null;
5367
5385
  }
5368
- function ru(n, e) {
5386
+ function iu(n, e) {
5369
5387
  let { parent: t, startIndex: r, endIndex: i } = n, s = t.child(r), o = e.contentMatch.findWrapping(s.type);
5370
5388
  if (!o)
5371
5389
  return null;
@@ -5374,7 +5392,7 @@ function ru(n, e) {
5374
5392
  a = a.matchType(t.child(c).type);
5375
5393
  return !a || !a.validEnd ? null : o;
5376
5394
  }
5377
- function iu(n, e, t) {
5395
+ function su(n, e, t) {
5378
5396
  let r = b.empty;
5379
5397
  for (let o = t.length - 1; o >= 0; o--) {
5380
5398
  if (r.size) {
@@ -5387,23 +5405,23 @@ function iu(n, e, t) {
5387
5405
  let i = e.start, s = e.end;
5388
5406
  n.step(new K(i, s, i, s, new S(r, 0, 0), t.length, !0));
5389
5407
  }
5390
- function su(n, e, t, r, i) {
5408
+ function ou(n, e, t, r, i) {
5391
5409
  if (!r.isTextblock)
5392
5410
  throw new RangeError("Type given to setBlockType should be a textblock");
5393
5411
  let s = n.steps.length;
5394
5412
  n.doc.nodesBetween(e, t, (o, l) => {
5395
- if (o.isTextblock && !o.hasMarkup(r, i) && ou(n.doc, n.mapping.slice(s).map(l), r)) {
5413
+ if (o.isTextblock && !o.hasMarkup(r, i) && lu(n.doc, n.mapping.slice(s).map(l), r)) {
5396
5414
  n.clearIncompatible(n.mapping.slice(s).map(l, 1), r);
5397
5415
  let a = n.mapping.slice(s), c = a.map(l, 1), d = a.map(l + o.nodeSize, 1);
5398
5416
  return n.step(new K(c, d, c + 1, d - 1, new S(b.from(r.create(i, null, o.marks)), 0, 0), 1, !0)), !1;
5399
5417
  }
5400
5418
  });
5401
5419
  }
5402
- function ou(n, e, t) {
5420
+ function lu(n, e, t) {
5403
5421
  let r = n.resolve(e), i = r.index();
5404
5422
  return r.parent.canReplaceWith(i, i + 1, t);
5405
5423
  }
5406
- function lu(n, e, t, r, i) {
5424
+ function au(n, e, t, r, i) {
5407
5425
  let s = n.doc.nodeAt(e);
5408
5426
  if (!s)
5409
5427
  throw new RangeError("No node at given position");
@@ -5432,7 +5450,7 @@ function Rt(n, e, t = 1, r) {
5432
5450
  let l = i.indexAfter(s), a = r && r[0];
5433
5451
  return i.node(s).canReplaceWith(l, l, a ? a.type : i.node(s + 1).type);
5434
5452
  }
5435
- function au(n, e, t = 1, r) {
5453
+ function cu(n, e, t = 1, r) {
5436
5454
  let i = n.doc.resolve(e), s = b.empty, o = b.empty;
5437
5455
  for (let l = i.depth, a = i.depth - t, c = t - 1; l > a; l--, c--) {
5438
5456
  s = b.from(i.node(l).copy(s));
@@ -5459,11 +5477,11 @@ function Rl(n, e, t = -1) {
5459
5477
  e = t < 0 ? r.before(i) : r.after(i);
5460
5478
  }
5461
5479
  }
5462
- function cu(n, e, t) {
5480
+ function du(n, e, t) {
5463
5481
  let r = new G(e - t, e + t, S.empty, !0);
5464
5482
  n.step(r);
5465
5483
  }
5466
- function du(n, e, t) {
5484
+ function uu(n, e, t) {
5467
5485
  let r = n.resolve(e);
5468
5486
  if (r.parent.canReplaceWith(r.index(), r.index(), t))
5469
5487
  return e;
@@ -5485,7 +5503,7 @@ function du(n, e, t) {
5485
5503
  }
5486
5504
  return null;
5487
5505
  }
5488
- function uu(n, e, t) {
5506
+ function hu(n, e, t) {
5489
5507
  let r = n.resolve(e);
5490
5508
  if (!t.content.size)
5491
5509
  return e;
@@ -5510,12 +5528,12 @@ function Xi(n, e, t = e, r = S.empty) {
5510
5528
  if (e == t && !r.size)
5511
5529
  return null;
5512
5530
  let i = n.resolve(e), s = n.resolve(t);
5513
- return Pl(i, s, r) ? new G(e, t, r) : new hu(i, s, r).fit();
5531
+ return Pl(i, s, r) ? new G(e, t, r) : new fu(i, s, r).fit();
5514
5532
  }
5515
5533
  function Pl(n, e, t) {
5516
5534
  return !t.openStart && !t.openEnd && n.start() == e.start() && n.parent.canReplace(n.index(), e.index(), t.content);
5517
5535
  }
5518
- class hu {
5536
+ class fu {
5519
5537
  constructor(e, t, r) {
5520
5538
  this.$from = e, this.$to = t, this.unplaced = r, this.frontier = [], this.placed = b.empty;
5521
5539
  for (let i = 0; i <= e.depth; i++) {
@@ -5685,18 +5703,18 @@ function Xr(n, e, t, r, i) {
5685
5703
  if (o == s.childCount && !t.compatibleContent(s.type))
5686
5704
  return null;
5687
5705
  let l = r.fillBefore(s.content, !0, o);
5688
- return l && !fu(t, s.content, o) ? l : null;
5706
+ return l && !pu(t, s.content, o) ? l : null;
5689
5707
  }
5690
- function fu(n, e, t) {
5708
+ function pu(n, e, t) {
5691
5709
  for (let r = t; r < e.childCount; r++)
5692
5710
  if (!n.allowsMarks(e.child(r).marks))
5693
5711
  return !0;
5694
5712
  return !1;
5695
5713
  }
5696
- function pu(n) {
5714
+ function mu(n) {
5697
5715
  return n.spec.defining || n.spec.definingForContent;
5698
5716
  }
5699
- function mu(n, e, t, r) {
5717
+ function gu(n, e, t, r) {
5700
5718
  if (!r.size)
5701
5719
  return n.deleteRange(e, t);
5702
5720
  let i = n.doc.resolve(e), s = n.doc.resolve(t);
@@ -5720,7 +5738,7 @@ function mu(n, e, t, r) {
5720
5738
  h = p.content;
5721
5739
  }
5722
5740
  for (let h = d - 1; h >= 0; h--) {
5723
- let f = c[h], p = pu(f.type);
5741
+ let f = c[h], p = mu(f.type);
5724
5742
  if (p && !f.sameMarkup(i.node(Math.abs(l) - 1)))
5725
5743
  d = h;
5726
5744
  else if (p || !f.type.isTextblock)
@@ -5754,14 +5772,14 @@ function Bl(n, e, t, r, i) {
5754
5772
  }
5755
5773
  return n;
5756
5774
  }
5757
- function gu(n, e, t, r) {
5775
+ function yu(n, e, t, r) {
5758
5776
  if (!r.isInline && e == t && n.doc.resolve(e).parent.content.size) {
5759
- let i = du(n.doc, e, r.type);
5777
+ let i = uu(n.doc, e, r.type);
5760
5778
  i != null && (e = t = i);
5761
5779
  }
5762
5780
  n.replaceRange(e, t, new S(b.from(r), 0, 0));
5763
5781
  }
5764
- function yu(n, e, t) {
5782
+ function bu(n, e, t) {
5765
5783
  let r = n.doc.resolve(e), i = n.doc.resolve(t), s = _l(r, i);
5766
5784
  for (let o = 0; o < s.length; o++) {
5767
5785
  let l = s[o], a = o == s.length - 1;
@@ -5957,7 +5975,7 @@ class Fl {
5957
5975
  control over what happens.
5958
5976
  */
5959
5977
  replaceRange(e, t, r) {
5960
- return mu(this, e, t, r), this;
5978
+ return gu(this, e, t, r), this;
5961
5979
  }
5962
5980
  /**
5963
5981
  Replace the given range with a node, but use `from` and `to` as
@@ -5969,14 +5987,14 @@ class Fl {
5969
5987
  that parent node.
5970
5988
  */
5971
5989
  replaceRangeWith(e, t, r) {
5972
- return gu(this, e, t, r), this;
5990
+ return yu(this, e, t, r), this;
5973
5991
  }
5974
5992
  /**
5975
5993
  Delete the given range, expanding it to cover fully covered
5976
5994
  parent nodes until a valid replace is found.
5977
5995
  */
5978
5996
  deleteRange(e, t) {
5979
- return yu(this, e, t), this;
5997
+ return bu(this, e, t), this;
5980
5998
  }
5981
5999
  /**
5982
6000
  Split the content in the given range off from its parent, if there
@@ -5986,14 +6004,14 @@ class Fl {
5986
6004
  sure the lift is valid.
5987
6005
  */
5988
6006
  lift(e, t) {
5989
- return tu(this, e, t), this;
6007
+ return nu(this, e, t), this;
5990
6008
  }
5991
6009
  /**
5992
6010
  Join the blocks around the given position. If depth is 2, their
5993
6011
  last and first siblings are also joined, and so on.
5994
6012
  */
5995
6013
  join(e, t = 1) {
5996
- return cu(this, e, t), this;
6014
+ return du(this, e, t), this;
5997
6015
  }
5998
6016
  /**
5999
6017
  Wrap the given [range](https://prosemirror.net/docs/ref/#model.NodeRange) in the given set of wrappers.
@@ -6001,21 +6019,21 @@ class Fl {
6001
6019
  probably be computed with [`findWrapping`](https://prosemirror.net/docs/ref/#transform.findWrapping).
6002
6020
  */
6003
6021
  wrap(e, t) {
6004
- return iu(this, e, t), this;
6022
+ return su(this, e, t), this;
6005
6023
  }
6006
6024
  /**
6007
6025
  Set the type of all textblocks (partly) between `from` and `to` to
6008
6026
  the given node type with the given attributes.
6009
6027
  */
6010
6028
  setBlockType(e, t = e, r, i = null) {
6011
- return su(this, e, t, r, i), this;
6029
+ return ou(this, e, t, r, i), this;
6012
6030
  }
6013
6031
  /**
6014
6032
  Change the type, attributes, and/or marks of the node at `pos`.
6015
6033
  When `type` isn't given, the existing node type is preserved,
6016
6034
  */
6017
6035
  setNodeMarkup(e, t, r = null, i) {
6018
- return lu(this, e, t, r, i), this;
6036
+ return au(this, e, t, r, i), this;
6019
6037
  }
6020
6038
  /**
6021
6039
  Set a single attribute on a given node to a new value.
@@ -6059,13 +6077,13 @@ class Fl {
6059
6077
  use after the split.
6060
6078
  */
6061
6079
  split(e, t = 1, r) {
6062
- return au(this, e, t, r), this;
6080
+ return cu(this, e, t, r), this;
6063
6081
  }
6064
6082
  /**
6065
6083
  Add the given mark to the inline content between `from` and `to`.
6066
6084
  */
6067
6085
  addMark(e, t, r) {
6068
- return Xd(this, e, t, r), this;
6086
+ return Qd(this, e, t, r), this;
6069
6087
  }
6070
6088
  /**
6071
6089
  Remove marks from inline nodes between `from` and `to`. When
@@ -6074,7 +6092,7 @@ class Fl {
6074
6092
  remove all marks of any type.
6075
6093
  */
6076
6094
  removeMark(e, t, r) {
6077
- return Qd(this, e, t, r), this;
6095
+ return Zd(this, e, t, r), this;
6078
6096
  }
6079
6097
  /**
6080
6098
  Removes all marks and nodes from the content of the node at
@@ -6083,7 +6101,7 @@ class Fl {
6083
6101
  third argument.
6084
6102
  */
6085
6103
  clearIncompatible(e, t, r) {
6086
- return Zd(this, e, t, r), this;
6104
+ return eu(this, e, t, r), this;
6087
6105
  }
6088
6106
  }
6089
6107
  const Qr = /* @__PURE__ */ Object.create(null);
@@ -6094,7 +6112,7 @@ class N {
6094
6112
  `$head`.
6095
6113
  */
6096
6114
  constructor(e, t, r) {
6097
- this.$anchor = e, this.$head = t, this.ranges = r || [new bu(e.min(t), e.max(t))];
6115
+ this.$anchor = e, this.$head = t, this.ranges = r || [new ku(e.min(t), e.max(t))];
6098
6116
  }
6099
6117
  /**
6100
6118
  The selection's anchor, as an unresolved position.
@@ -6252,7 +6270,7 @@ class N {
6252
6270
  }
6253
6271
  }
6254
6272
  N.prototype.visible = !0;
6255
- class bu {
6273
+ class ku {
6256
6274
  /**
6257
6275
  Create a range.
6258
6276
  */
@@ -6440,11 +6458,11 @@ class Te extends N {
6440
6458
  return e instanceof Te;
6441
6459
  }
6442
6460
  getBookmark() {
6443
- return ku;
6461
+ return Su;
6444
6462
  }
6445
6463
  }
6446
6464
  N.jsonID("all", Te);
6447
- const ku = {
6465
+ const Su = {
6448
6466
  map() {
6449
6467
  return this;
6450
6468
  },
@@ -6482,7 +6500,7 @@ function js(n, e, t) {
6482
6500
  }), n.setSelection(N.near(n.doc.resolve(o), t));
6483
6501
  }
6484
6502
  const qs = 1, Tn = 2, Ks = 4;
6485
- class Su extends Fl {
6503
+ class xu extends Fl {
6486
6504
  /**
6487
6505
  @internal
6488
6506
  */
@@ -6641,7 +6659,7 @@ class Yt {
6641
6659
  this.name = e, this.init = Ws(t.init, r), this.apply = Ws(t.apply, r);
6642
6660
  }
6643
6661
  }
6644
- const xu = [
6662
+ const Cu = [
6645
6663
  new Yt("doc", {
6646
6664
  init(n) {
6647
6665
  return n.doc || n.schema.topNodeType.createAndFill();
@@ -6677,7 +6695,7 @@ const xu = [
6677
6695
  ];
6678
6696
  class Zr {
6679
6697
  constructor(e, t) {
6680
- this.schema = e, this.plugins = [], this.pluginsByKey = /* @__PURE__ */ Object.create(null), this.fields = xu.slice(), t && t.forEach((r) => {
6698
+ this.schema = e, this.plugins = [], this.pluginsByKey = /* @__PURE__ */ Object.create(null), this.fields = Cu.slice(), t && t.forEach((r) => {
6681
6699
  if (this.pluginsByKey[r.key])
6682
6700
  throw new RangeError("Adding different instances of a keyed plugin (" + r.key + ")");
6683
6701
  this.plugins.push(r), this.pluginsByKey[r.key] = r, r.spec.state && this.fields.push(new Yt(r.key, r.spec.state, r));
@@ -6770,7 +6788,7 @@ class Dt {
6770
6788
  Start a [transaction](https://prosemirror.net/docs/ref/#state.Transaction) from this state.
6771
6789
  */
6772
6790
  get tr() {
6773
- return new Su(this);
6791
+ return new xu(this);
6774
6792
  }
6775
6793
  /**
6776
6794
  Create a new state.
@@ -6909,14 +6927,14 @@ const Be = function(n, e, t) {
6909
6927
  return r.setEnd(n, t ?? n.nodeValue.length), r.setStart(n, e || 0), r;
6910
6928
  }, Ct = function(n, e, t, r) {
6911
6929
  return t && (Js(n, e, t, r, -1) || Js(n, e, t, r, 1));
6912
- }, Cu = /^(img|br|input|textarea|hr)$/i;
6930
+ }, Eu = /^(img|br|input|textarea|hr)$/i;
6913
6931
  function Js(n, e, t, r, i) {
6914
6932
  for (; ; ) {
6915
6933
  if (n == t && e == r)
6916
6934
  return !0;
6917
6935
  if (e == (i < 0 ? 0 : Ae(n))) {
6918
6936
  let s = n.parentNode;
6919
- if (!s || s.nodeType != 1 || Zi(n) || Cu.test(n.nodeName) || n.contentEditable == "false")
6937
+ if (!s || s.nodeType != 1 || Zi(n) || Eu.test(n.nodeName) || n.contentEditable == "false")
6920
6938
  return !1;
6921
6939
  e = oe(n) + (i < 0 ? 0 : 1), n = s;
6922
6940
  } else if (n.nodeType == 1) {
@@ -6930,7 +6948,7 @@ function Js(n, e, t, r, i) {
6930
6948
  function Ae(n) {
6931
6949
  return n.nodeType == 3 ? n.nodeValue.length : n.childNodes.length;
6932
6950
  }
6933
- function Eu(n, e, t) {
6951
+ function Tu(n, e, t) {
6934
6952
  for (let r = e == 0, i = e == Ae(n); r || i; ) {
6935
6953
  if (n == t)
6936
6954
  return !0;
@@ -6953,13 +6971,13 @@ function lt(n, e) {
6953
6971
  let t = document.createEvent("Event");
6954
6972
  return t.initEvent("keydown", !0, !0), t.keyCode = n, t.key = t.code = e, t;
6955
6973
  }
6956
- function Tu(n) {
6974
+ function Mu(n) {
6957
6975
  let e = n.activeElement;
6958
6976
  for (; e && e.shadowRoot; )
6959
6977
  e = e.shadowRoot.activeElement;
6960
6978
  return e;
6961
6979
  }
6962
- function Mu(n, e, t) {
6980
+ function wu(n, e, t) {
6963
6981
  if (n.caretPositionFromPoint)
6964
6982
  try {
6965
6983
  let r = n.caretPositionFromPoint(e, t);
@@ -6975,8 +6993,8 @@ function Mu(n, e, t) {
6975
6993
  }
6976
6994
  const Ie = typeof navigator < "u" ? navigator : null, Gs = typeof document < "u" ? document : null, it = Ie && Ie.userAgent || "", Ei = /Edge\/(\d+)/.exec(it), Vl = /MSIE \d/.exec(it), Ti = /Trident\/(?:[7-9]|\d{2,})\..*rv:(\d+)/.exec(it), he = !!(Vl || Ti || Ei), Qe = Vl ? document.documentMode : Ti ? +Ti[1] : Ei ? +Ei[1] : 0, Me = !he && /gecko\/(\d+)/i.test(it);
6977
6995
  Me && +(/Firefox\/(\d+)/.exec(it) || [0, 0])[1];
6978
- const Mi = !he && /Chrome\/(\d+)/.exec(it), te = !!Mi, wu = Mi ? +Mi[1] : 0, le = !he && !!Ie && /Apple Computer/.test(Ie.vendor), Ft = le && (/Mobile\/\w+/.test(it) || !!Ie && Ie.maxTouchPoints > 2), ke = Ft || (Ie ? /Mac/.test(Ie.platform) : !1), Ou = Ie ? /Win/.test(Ie.platform) : !1, Ee = /Android \d/.test(it), kn = !!Gs && "webkitFontSmoothing" in Gs.documentElement.style, vu = kn ? +(/\bAppleWebKit\/(\d+)/.exec(navigator.userAgent) || [0, 0])[1] : 0;
6979
- function Au(n) {
6996
+ const Mi = !he && /Chrome\/(\d+)/.exec(it), te = !!Mi, Ou = Mi ? +Mi[1] : 0, le = !he && !!Ie && /Apple Computer/.test(Ie.vendor), Ft = le && (/Mobile\/\w+/.test(it) || !!Ie && Ie.maxTouchPoints > 2), ke = Ft || (Ie ? /Mac/.test(Ie.platform) : !1), vu = Ie ? /Win/.test(Ie.platform) : !1, Ee = /Android \d/.test(it), kn = !!Gs && "webkitFontSmoothing" in Gs.documentElement.style, Au = kn ? +(/\bAppleWebKit\/(\d+)/.exec(navigator.userAgent) || [0, 0])[1] : 0;
6997
+ function Nu(n) {
6980
6998
  return {
6981
6999
  left: 0,
6982
7000
  right: n.documentElement.clientWidth,
@@ -6987,7 +7005,7 @@ function Au(n) {
6987
7005
  function Pe(n, e) {
6988
7006
  return typeof n == "number" ? n : n[e];
6989
7007
  }
6990
- function Nu(n) {
7008
+ function Du(n) {
6991
7009
  let e = n.getBoundingClientRect(), t = e.width / n.offsetWidth || 1, r = e.height / n.offsetHeight || 1;
6992
7010
  return {
6993
7011
  left: e.left,
@@ -7001,7 +7019,7 @@ function Ys(n, e, t) {
7001
7019
  for (let o = t || n.dom; o; o = dn(o)) {
7002
7020
  if (o.nodeType != 1)
7003
7021
  continue;
7004
- let l = o, a = l == s.body, c = a ? Au(s) : Nu(l), d = 0, u = 0;
7022
+ let l = o, a = l == s.body, c = a ? Nu(s) : Du(l), d = 0, u = 0;
7005
7023
  if (e.top < c.top + Pe(r, "top") ? u = -(c.top - e.top + Pe(i, "top")) : e.bottom > c.bottom - Pe(r, "bottom") && (u = e.bottom - e.top > c.bottom - c.top ? e.top + Pe(i, "top") - c.top : e.bottom - c.bottom + Pe(i, "bottom")), e.left < c.left + Pe(r, "left") ? d = -(c.left - e.left + Pe(i, "left")) : e.right > c.right - Pe(r, "right") && (d = e.right - c.right + Pe(i, "right")), d || u)
7006
7024
  if (a)
7007
7025
  s.defaultView.scrollBy(d, u);
@@ -7015,7 +7033,7 @@ function Ys(n, e, t) {
7015
7033
  break;
7016
7034
  }
7017
7035
  }
7018
- function Du(n) {
7036
+ function Iu(n) {
7019
7037
  let e = n.dom.getBoundingClientRect(), t = Math.max(0, e.top), r, i;
7020
7038
  for (let s = (e.left + e.right) / 2, o = t + 1; o < Math.min(innerHeight, e.bottom); o += 5) {
7021
7039
  let l = n.root.elementFromPoint(s, o);
@@ -7035,7 +7053,7 @@ function $l(n) {
7035
7053
  ;
7036
7054
  return e;
7037
7055
  }
7038
- function Iu({ refDOM: n, refTop: e, stack: t }) {
7056
+ function Ru({ refDOM: n, refTop: e, stack: t }) {
7039
7057
  let r = n ? n.getBoundingClientRect().top : 0;
7040
7058
  jl(t, r == 0 ? 0 : r - e);
7041
7059
  }
@@ -7046,7 +7064,7 @@ function jl(n, e) {
7046
7064
  }
7047
7065
  }
7048
7066
  let Tt = null;
7049
- function Ru(n) {
7067
+ function Pu(n) {
7050
7068
  if (n.setActive)
7051
7069
  return n.setActive();
7052
7070
  if (Tt)
@@ -7085,9 +7103,9 @@ function ql(n, e) {
7085
7103
  !t && (e.left >= p.right && e.top >= p.top || e.left >= p.left && e.top >= p.bottom) && (s = u + 1);
7086
7104
  }
7087
7105
  }
7088
- return !t && a && (t = a, i = c, r = 0), t && t.nodeType == 3 ? Pu(t, i) : !t || r && t.nodeType == 1 ? { node: n, offset: s } : ql(t, i);
7106
+ return !t && a && (t = a, i = c, r = 0), t && t.nodeType == 3 ? Lu(t, i) : !t || r && t.nodeType == 1 ? { node: n, offset: s } : ql(t, i);
7089
7107
  }
7090
- function Pu(n, e) {
7108
+ function Lu(n, e) {
7091
7109
  let t = n.nodeValue.length, r = document.createRange();
7092
7110
  for (let i = 0; i < t; i++) {
7093
7111
  r.setEnd(n, i + 1), r.setStart(n, i);
@@ -7100,11 +7118,11 @@ function Pu(n, e) {
7100
7118
  function es(n, e) {
7101
7119
  return n.left >= e.left - 1 && n.left <= e.right + 1 && n.top >= e.top - 1 && n.top <= e.bottom + 1;
7102
7120
  }
7103
- function Lu(n, e) {
7121
+ function Bu(n, e) {
7104
7122
  let t = n.parentNode;
7105
7123
  return t && /^li$/i.test(t.nodeName) && e.left < n.getBoundingClientRect().left ? t : n;
7106
7124
  }
7107
- function Bu(n, e, t) {
7125
+ function _u(n, e, t) {
7108
7126
  let { node: r, offset: i } = ql(e, t), s = -1;
7109
7127
  if (r.nodeType == 1 && !r.firstChild) {
7110
7128
  let o = r.getBoundingClientRect();
@@ -7112,7 +7130,7 @@ function Bu(n, e, t) {
7112
7130
  }
7113
7131
  return n.docView.posFromDOM(r, i, s);
7114
7132
  }
7115
- function _u(n, e, t, r) {
7133
+ function Fu(n, e, t, r) {
7116
7134
  let i = -1;
7117
7135
  for (let s = e, o = !1; s != n.dom; ) {
7118
7136
  let l = n.docView.nearestDesc(s, !0);
@@ -7145,8 +7163,8 @@ function Kl(n, e, t) {
7145
7163
  }
7146
7164
  return n;
7147
7165
  }
7148
- function Fu(n, e) {
7149
- let t = n.dom.ownerDocument, r, i = 0, s = Mu(t, e.left, e.top);
7166
+ function zu(n, e) {
7167
+ let t = n.dom.ownerDocument, r, i = 0, s = wu(t, e.left, e.top);
7150
7168
  s && ({ node: r, offset: i } = s);
7151
7169
  let o = (n.root.elementFromPoint ? n.root : t).elementFromPoint(e.left, e.top), l;
7152
7170
  if (!o || !n.dom.contains(o.nodeType != 1 ? o.parentNode : o)) {
@@ -7157,15 +7175,15 @@ function Fu(n, e) {
7157
7175
  if (le)
7158
7176
  for (let c = o; r && c; c = dn(c))
7159
7177
  c.draggable && (r = void 0);
7160
- if (o = Lu(o, e), r) {
7178
+ if (o = Bu(o, e), r) {
7161
7179
  if (Me && r.nodeType == 1 && (i = Math.min(i, r.childNodes.length), i < r.childNodes.length)) {
7162
7180
  let d = r.childNodes[i], u;
7163
7181
  d.nodeName == "IMG" && (u = d.getBoundingClientRect()).right <= e.left && u.bottom > e.top && i++;
7164
7182
  }
7165
7183
  let c;
7166
- kn && i && r.nodeType == 1 && (c = r.childNodes[i - 1]).nodeType == 1 && c.contentEditable == "false" && c.getBoundingClientRect().top >= e.top && i--, r == n.dom && i == r.childNodes.length - 1 && r.lastChild.nodeType == 1 && e.top > r.lastChild.getBoundingClientRect().bottom ? l = n.state.doc.content.size : (i == 0 || r.nodeType != 1 || r.childNodes[i - 1].nodeName != "BR") && (l = _u(n, r, i, e));
7184
+ kn && i && r.nodeType == 1 && (c = r.childNodes[i - 1]).nodeType == 1 && c.contentEditable == "false" && c.getBoundingClientRect().top >= e.top && i--, r == n.dom && i == r.childNodes.length - 1 && r.lastChild.nodeType == 1 && e.top > r.lastChild.getBoundingClientRect().bottom ? l = n.state.doc.content.size : (i == 0 || r.nodeType != 1 || r.childNodes[i - 1].nodeName != "BR") && (l = Fu(n, r, i, e));
7167
7185
  }
7168
- l == null && (l = Bu(n, o, e));
7186
+ l == null && (l = _u(n, o, e));
7169
7187
  let a = n.docView.nearestDesc(o, !0);
7170
7188
  return { pos: l, inside: a ? a.posAtStart - a.border : -1 };
7171
7189
  }
@@ -7181,11 +7199,11 @@ function qe(n, e) {
7181
7199
  }
7182
7200
  return Array.prototype.find.call(t, Xs) || n.getBoundingClientRect();
7183
7201
  }
7184
- const zu = /[\u0590-\u05f4\u0600-\u06ff\u0700-\u08ac]/;
7202
+ const Hu = /[\u0590-\u05f4\u0600-\u06ff\u0700-\u08ac]/;
7185
7203
  function Wl(n, e, t) {
7186
7204
  let { node: r, offset: i, atom: s } = n.docView.domFromPos(e, t < 0 ? -1 : 1), o = kn || Me;
7187
7205
  if (r.nodeType == 3)
7188
- if (o && (zu.test(r.nodeValue) || (t < 0 ? !i : i == r.nodeValue.length))) {
7206
+ if (o && (Hu.test(r.nodeValue) || (t < 0 ? !i : i == r.nodeValue.length))) {
7189
7207
  let a = qe(Be(r, i, i), t);
7190
7208
  if (Me && i && /\s/.test(r.nodeValue[i - 1]) && i < r.nodeValue.length) {
7191
7209
  let c = qe(Be(r, i - 1, i - 1), -1);
@@ -7249,7 +7267,7 @@ function Ul(n, e, t) {
7249
7267
  r != e && n.updateState(r), i != n.dom && i && i.focus();
7250
7268
  }
7251
7269
  }
7252
- function Hu(n, e, t) {
7270
+ function Vu(n, e, t) {
7253
7271
  let r = e.selection, i = t == "up" ? r.$from : r.$to;
7254
7272
  return Ul(n, e, () => {
7255
7273
  let { node: s } = n.docView.domFromPos(i.pos, t == "up" ? -1 : 1);
@@ -7281,13 +7299,13 @@ function Hu(n, e, t) {
7281
7299
  return !0;
7282
7300
  });
7283
7301
  }
7284
- const Vu = /[\u0590-\u08ac]/;
7285
- function $u(n, e, t) {
7302
+ const $u = /[\u0590-\u08ac]/;
7303
+ function ju(n, e, t) {
7286
7304
  let { $head: r } = e.selection;
7287
7305
  if (!r.parent.isTextblock)
7288
7306
  return !1;
7289
7307
  let i = r.parentOffset, s = !i, o = i == r.parent.content.size, l = n.domSelection();
7290
- return !Vu.test(r.parent.textContent) || !l.modify ? t == "left" || t == "backward" ? s : o : Ul(n, e, () => {
7308
+ return !$u.test(r.parent.textContent) || !l.modify ? t == "left" || t == "backward" ? s : o : Ul(n, e, () => {
7291
7309
  let { focusNode: a, focusOffset: c, anchorNode: d, anchorOffset: u } = n.domSelectionRange(), h = l.caretBidiLevel;
7292
7310
  l.modify("move", t, "character");
7293
7311
  let f = r.depth ? n.docView.domAfterPos(r.before()) : n.dom, { focusNode: p, focusOffset: m } = n.domSelectionRange(), g = p && !f.contains(p.nodeType == 1 ? p : p.parentNode) || a == p && c == m;
@@ -7299,8 +7317,8 @@ function $u(n, e, t) {
7299
7317
  });
7300
7318
  }
7301
7319
  let Qs = null, Zs = null, eo = !1;
7302
- function ju(n, e, t) {
7303
- return Qs == e && Zs == t ? eo : (Qs = e, Zs = t, eo = t == "up" || t == "down" ? Hu(n, e, t) : $u(n, e, t));
7320
+ function qu(n, e, t) {
7321
+ return Qs == e && Zs == t ? eo : (Qs = e, Zs = t, eo = t == "up" || t == "down" ? Vu(n, e, t) : ju(n, e, t));
7304
7322
  }
7305
7323
  const Se = 0, to = 1, at = 2, Re = 3;
7306
7324
  class Sn {
@@ -7675,7 +7693,7 @@ class Jl extends Sn {
7675
7693
  return this.widget.type.side;
7676
7694
  }
7677
7695
  }
7678
- class qu extends Sn {
7696
+ class Ku extends Sn {
7679
7697
  constructor(e, t, r, i) {
7680
7698
  super(e, [], t, null), this.textDOM = r, this.text = i;
7681
7699
  }
@@ -7751,7 +7769,7 @@ class Ze extends Sn {
7751
7769
  d || ({ dom: d, contentDOM: u } = Ne.renderSpec(document, t.type.spec.toDOM(t)));
7752
7770
  !u && !t.isText && d.nodeName != "BR" && (d.hasAttribute("contenteditable") || (d.contentEditable = "false"), t.type.spec.draggable && (d.draggable = !0));
7753
7771
  let h = d;
7754
- return d = Ql(d, r, t), c ? a = new Ku(e, t, r, i, d, u || null, h, c, s, o + 1) : t.isText ? new Nr(e, t, r, i, d, h, s) : new Ze(e, t, r, i, d, u || null, h, s, o + 1);
7772
+ return d = Ql(d, r, t), c ? a = new Wu(e, t, r, i, d, u || null, h, c, s, o + 1) : t.isText ? new Nr(e, t, r, i, d, h, s) : new Ze(e, t, r, i, d, u || null, h, s, o + 1);
7755
7773
  }
7756
7774
  parseRule() {
7757
7775
  if (this.node.type.spec.reparseInView)
@@ -7787,24 +7805,24 @@ class Ze extends Sn {
7787
7805
  // separate step, syncs the DOM inside `this.contentDOM` to
7788
7806
  // `this.children`.
7789
7807
  updateChildren(e, t) {
7790
- let r = this.node.inlineContent, i = t, s = e.composing ? this.localCompositionInfo(e, t) : null, o = s && s.pos > -1 ? s : null, l = s && s.pos < 0, a = new Uu(this, o && o.node, e);
7791
- Yu(this.node, this.innerDeco, (c, d, u) => {
7808
+ let r = this.node.inlineContent, i = t, s = e.composing ? this.localCompositionInfo(e, t) : null, o = s && s.pos > -1 ? s : null, l = s && s.pos < 0, a = new Ju(this, o && o.node, e);
7809
+ Xu(this.node, this.innerDeco, (c, d, u) => {
7792
7810
  c.spec.marks ? a.syncToMarks(c.spec.marks, r, e) : c.type.side >= 0 && !u && a.syncToMarks(d == this.node.childCount ? B.none : this.node.child(d).marks, r, e), a.placeWidget(c, e, i);
7793
7811
  }, (c, d, u, h) => {
7794
7812
  a.syncToMarks(c.marks, r, e);
7795
7813
  let f;
7796
7814
  a.findNodeMatch(c, d, u, h) || l && e.state.selection.from > i && e.state.selection.to < i + c.nodeSize && (f = a.findIndexWithChild(s.node)) > -1 && a.updateNodeAt(c, d, u, f, e) || a.updateNextNode(c, d, u, e, h, i) || a.addNode(c, d, u, e, i), i += c.nodeSize;
7797
- }), a.syncToMarks([], r, e), this.node.isTextblock && a.addTextblockHacks(), a.destroyRest(), (a.changed || this.dirty == at) && (o && this.protectLocalComposition(e, o), Yl(this.contentDOM, this.children, e), Ft && Xu(this.dom));
7815
+ }), a.syncToMarks([], r, e), this.node.isTextblock && a.addTextblockHacks(), a.destroyRest(), (a.changed || this.dirty == at) && (o && this.protectLocalComposition(e, o), Yl(this.contentDOM, this.children, e), Ft && Qu(this.dom));
7798
7816
  }
7799
7817
  localCompositionInfo(e, t) {
7800
7818
  let { from: r, to: i } = e.state.selection;
7801
7819
  if (!(e.state.selection instanceof D) || r < t || i > t + this.node.content.size)
7802
7820
  return null;
7803
- let s = e.domSelectionRange(), o = Qu(s.focusNode, s.focusOffset);
7821
+ let s = e.domSelectionRange(), o = Zu(s.focusNode, s.focusOffset);
7804
7822
  if (!o || !this.dom.contains(o.parentNode))
7805
7823
  return null;
7806
7824
  if (this.node.inlineContent) {
7807
- let l = o.nodeValue, a = Zu(this.node.content, l, r - t, i - t);
7825
+ let l = o.nodeValue, a = eh(this.node.content, l, r - t, i - t);
7808
7826
  return a < 0 ? null : { node: o, pos: a, text: l };
7809
7827
  } else
7810
7828
  return { node: o, pos: -1, text: "" };
@@ -7820,7 +7838,7 @@ class Ze extends Sn {
7820
7838
  s.parentNode.removeChild(s.nextSibling);
7821
7839
  s.pmViewDesc && (s.pmViewDesc = void 0);
7822
7840
  }
7823
- let o = new qu(this, s, t, i);
7841
+ let o = new Ku(this, s, t, i);
7824
7842
  e.input.compositionNodes.push(o), this.children = vi(this.children, r, r + i.length, e, o);
7825
7843
  }
7826
7844
  // If this desc must be updated to match the given node decoration,
@@ -7908,7 +7926,7 @@ class Gl extends Sn {
7908
7926
  return this.dom.nodeName == "IMG";
7909
7927
  }
7910
7928
  }
7911
- class Ku extends Ze {
7929
+ class Wu extends Ze {
7912
7930
  constructor(e, t, r, i, s, o, l, a, c, d) {
7913
7931
  super(e, t, r, i, s, o, l, c, d), this.spec = a;
7914
7932
  }
@@ -7993,11 +8011,11 @@ function Xl(n, e, t, r) {
7993
8011
  let a;
7994
8012
  l && l.nodeName == o.nodeName && i != n && (a = i.parentNode) && a.nodeName.toLowerCase() == o.nodeName || (a = document.createElement(o.nodeName), a.pmIsDeco = !0, a.appendChild(i), l = ct[0]), i = a;
7995
8013
  }
7996
- Wu(i, l || ct[0], o);
8014
+ Uu(i, l || ct[0], o);
7997
8015
  }
7998
8016
  return i;
7999
8017
  }
8000
- function Wu(n, e, t) {
8018
+ function Uu(n, e, t) {
8001
8019
  for (let r in e)
8002
8020
  r != "class" && r != "style" && r != "nodeName" && !(r in t) && n.removeAttribute(r);
8003
8021
  for (let r in t)
@@ -8034,9 +8052,9 @@ function ro(n) {
8034
8052
  let e = n.nextSibling;
8035
8053
  return n.parentNode.removeChild(n), e;
8036
8054
  }
8037
- class Uu {
8055
+ class Ju {
8038
8056
  constructor(e, t, r) {
8039
- this.lock = t, this.view = r, this.index = 0, this.stack = [], this.changed = !1, this.top = e, this.preMatch = Ju(e.node.content, e);
8057
+ this.lock = t, this.view = r, this.index = 0, this.stack = [], this.changed = !1, this.top = e, this.preMatch = Gu(e.node.content, e);
8040
8058
  }
8041
8059
  // Destroy and remove the children between the given indices in
8042
8060
  // `this.top`.
@@ -8184,7 +8202,7 @@ class Uu {
8184
8202
  return this.lock && (e == this.lock || e.nodeType == 1 && e.contains(this.lock.parentNode));
8185
8203
  }
8186
8204
  }
8187
- function Ju(n, e) {
8205
+ function Gu(n, e) {
8188
8206
  let t = e, r = t.children.length, i = n.childCount, s = /* @__PURE__ */ new Map(), o = [];
8189
8207
  e:
8190
8208
  for (; i > 0; ) {
@@ -8212,10 +8230,10 @@ function Ju(n, e) {
8212
8230
  }
8213
8231
  return { index: i, matched: s, matches: o.reverse() };
8214
8232
  }
8215
- function Gu(n, e) {
8233
+ function Yu(n, e) {
8216
8234
  return n.type.side - e.type.side;
8217
8235
  }
8218
- function Yu(n, e, t, r) {
8236
+ function Xu(n, e, t, r) {
8219
8237
  let i = e.locals(n), s = 0;
8220
8238
  if (i.length == 0) {
8221
8239
  for (let c = 0; c < n.childCount; c++) {
@@ -8233,7 +8251,7 @@ function Yu(n, e, t, r) {
8233
8251
  }
8234
8252
  if (d)
8235
8253
  if (u) {
8236
- u.sort(Gu);
8254
+ u.sort(Yu);
8237
8255
  for (let g = 0; g < u.length; g++)
8238
8256
  t(u[g], c, !!a);
8239
8257
  } else
@@ -8261,13 +8279,13 @@ function Yu(n, e, t, r) {
8261
8279
  r(h, m, e.forChild(s, h), f), s = p;
8262
8280
  }
8263
8281
  }
8264
- function Xu(n) {
8282
+ function Qu(n) {
8265
8283
  if (n.nodeName == "UL" || n.nodeName == "OL") {
8266
8284
  let e = n.style.cssText;
8267
8285
  n.style.cssText = e + "; list-style: square !important", window.getComputedStyle(n).listStyle, n.style.cssText = e;
8268
8286
  }
8269
8287
  }
8270
- function Qu(n, e) {
8288
+ function Zu(n, e) {
8271
8289
  for (; ; ) {
8272
8290
  if (n.nodeType == 3)
8273
8291
  return n;
@@ -8281,7 +8299,7 @@ function Qu(n, e) {
8281
8299
  return null;
8282
8300
  }
8283
8301
  }
8284
- function Zu(n, e, t, r) {
8302
+ function eh(n, e, t, r) {
8285
8303
  for (let i = 0, s = 0; i < n.childCount && s <= r; ) {
8286
8304
  let o = n.child(i++), l = s;
8287
8305
  if (s += o.nodeSize, !o.isText)
@@ -8325,7 +8343,7 @@ function ts(n, e = null) {
8325
8343
  for (a = l; i && !i.node; )
8326
8344
  i = i.parent;
8327
8345
  let d = i.node;
8328
- if (i && d.isAtom && w.isSelectable(d) && i.parent && !(d.isInline && Eu(t.focusNode, t.focusOffset, i.dom))) {
8346
+ if (i && d.isAtom && w.isSelectable(d) && i.parent && !(d.isInline && Tu(t.focusNode, t.focusOffset, i.dom))) {
8329
8347
  let u = i.posBefore;
8330
8348
  c = new w(o == u ? l : r.resolve(u));
8331
8349
  }
@@ -8355,15 +8373,15 @@ function Fe(n, e = !1) {
8355
8373
  }
8356
8374
  }
8357
8375
  if (n.domObserver.disconnectSelection(), n.cursorWrapper)
8358
- th(n);
8376
+ nh(n);
8359
8377
  else {
8360
8378
  let { anchor: r, head: i } = t, s, o;
8361
- io && !(t instanceof D) && (t.$from.parent.inlineContent || (s = so(n, t.from)), !t.empty && !t.$from.parent.inlineContent && (o = so(n, t.to))), n.docView.setSelection(r, i, n.root, e), io && (s && oo(s), o && oo(o)), t.visible ? n.dom.classList.remove("ProseMirror-hideselection") : (n.dom.classList.add("ProseMirror-hideselection"), "onselectionchange" in document && eh(n));
8379
+ io && !(t instanceof D) && (t.$from.parent.inlineContent || (s = so(n, t.from)), !t.empty && !t.$from.parent.inlineContent && (o = so(n, t.to))), n.docView.setSelection(r, i, n.root, e), io && (s && oo(s), o && oo(o)), t.visible ? n.dom.classList.remove("ProseMirror-hideselection") : (n.dom.classList.add("ProseMirror-hideselection"), "onselectionchange" in document && th(n));
8362
8380
  }
8363
8381
  n.domObserver.setCurSelection(), n.domObserver.connectSelection();
8364
8382
  }
8365
8383
  }
8366
- const io = le || te && wu < 63;
8384
+ const io = le || te && Ou < 63;
8367
8385
  function so(n, e) {
8368
8386
  let { node: t, offset: r } = n.docView.domFromPos(e, 0), i = r < t.childNodes.length ? t.childNodes[r] : null, s = r ? t.childNodes[r - 1] : null;
8369
8387
  if (le && i && i.contentEditable == "false")
@@ -8381,7 +8399,7 @@ function ni(n) {
8381
8399
  function oo(n) {
8382
8400
  n.contentEditable = "false", n.wasDraggable && (n.draggable = !0, n.wasDraggable = null);
8383
8401
  }
8384
- function eh(n) {
8402
+ function th(n) {
8385
8403
  let e = n.dom.ownerDocument;
8386
8404
  e.removeEventListener("selectionchange", n.input.hideSelectionGuard);
8387
8405
  let t = n.domSelectionRange(), r = t.anchorNode, i = t.anchorOffset;
@@ -8391,7 +8409,7 @@ function eh(n) {
8391
8409
  }, 20));
8392
8410
  });
8393
8411
  }
8394
- function th(n) {
8412
+ function nh(n) {
8395
8413
  let e = n.domSelection(), t = document.createRange(), r = n.cursorWrapper.dom, i = r.nodeName == "IMG";
8396
8414
  i ? t.setEnd(r.parentNode, oe(r) + 1) : t.setEnd(r, 0), t.collapse(!1), e.removeAllRanges(), e.addRange(t), !i && !n.state.selection.visible && he && Qe <= 11 && (r.disabled = !0, r.disabled = !1);
8397
8415
  }
@@ -8421,7 +8439,7 @@ function ta(n) {
8421
8439
  return !1;
8422
8440
  }
8423
8441
  }
8424
- function nh(n) {
8442
+ function rh(n) {
8425
8443
  let e = n.docView.domFromPos(n.state.selection.anchor, 0), t = n.domSelectionRange();
8426
8444
  return Ct(e.node, e.offset, t.anchorNode, t.anchorOffset);
8427
8445
  }
@@ -8471,9 +8489,9 @@ function nn(n, e) {
8471
8489
  return t && t.size == 0 && (e < 0 || n.nextSibling || n.nodeName != "BR");
8472
8490
  }
8473
8491
  function Mt(n, e) {
8474
- return e < 0 ? rh(n) : ih(n);
8492
+ return e < 0 ? ih(n) : sh(n);
8475
8493
  }
8476
- function rh(n) {
8494
+ function ih(n) {
8477
8495
  let e = n.domSelectionRange(), t = e.focusNode, r = e.focusOffset;
8478
8496
  if (!t)
8479
8497
  return;
@@ -8509,7 +8527,7 @@ function rh(n) {
8509
8527
  }
8510
8528
  o ? Ni(n, t, r) : i && Ni(n, i, s);
8511
8529
  }
8512
- function ih(n) {
8530
+ function sh(n) {
8513
8531
  let e = n.domSelectionRange(), t = e.focusNode, r = e.focusOffset;
8514
8532
  if (!t)
8515
8533
  return;
@@ -8545,7 +8563,7 @@ function na(n) {
8545
8563
  let e = n.pmViewDesc;
8546
8564
  return e && e.node && e.node.isBlock;
8547
8565
  }
8548
- function sh(n, e) {
8566
+ function oh(n, e) {
8549
8567
  for (; n && e == n.childNodes.length && !Zi(n); )
8550
8568
  e = oe(n) + 1, n = n.parentNode;
8551
8569
  for (; n && e < n.childNodes.length; ) {
@@ -8557,7 +8575,7 @@ function sh(n, e) {
8557
8575
  n = t, e = 0;
8558
8576
  }
8559
8577
  }
8560
- function oh(n, e) {
8578
+ function lh(n, e) {
8561
8579
  for (; n && !e && !Zi(n); )
8562
8580
  e = oe(n), n = n.parentNode;
8563
8581
  for (; n && e; ) {
@@ -8572,7 +8590,7 @@ function oh(n, e) {
8572
8590
  function Ni(n, e, t) {
8573
8591
  if (e.nodeType != 3) {
8574
8592
  let s, o;
8575
- (o = sh(e, t)) ? (e = o, t = 0) : (s = oh(e, t)) && (e = s, t = s.nodeValue.length);
8593
+ (o = oh(e, t)) ? (e = o, t = 0) : (s = lh(e, t)) && (e = s, t = s.nodeValue.length);
8576
8594
  }
8577
8595
  let r = n.domSelection();
8578
8596
  if (Ar(r)) {
@@ -8588,7 +8606,7 @@ function Ni(n, e, t) {
8588
8606
  }
8589
8607
  function uo(n, e) {
8590
8608
  let t = n.state.doc.resolve(e);
8591
- if (!(te || Ou) && t.parent.inlineContent) {
8609
+ if (!(te || vu) && t.parent.inlineContent) {
8592
8610
  let i = n.coordsAtPos(e);
8593
8611
  if (e > t.start()) {
8594
8612
  let s = n.coordsAtPos(e - 1), o = (s.top + s.bottom) / 2;
@@ -8639,7 +8657,7 @@ function fo(n, e) {
8639
8657
  function po(n, e, t) {
8640
8658
  n.domObserver.stop(), e.contentEditable = t, n.domObserver.start();
8641
8659
  }
8642
- function lh(n) {
8660
+ function ah(n) {
8643
8661
  if (!le || n.state.selection.$head.parentOffset > 0)
8644
8662
  return !1;
8645
8663
  let { focusNode: e, focusOffset: t } = n.domSelectionRange();
@@ -8649,12 +8667,12 @@ function lh(n) {
8649
8667
  }
8650
8668
  return !1;
8651
8669
  }
8652
- function ah(n) {
8670
+ function ch(n) {
8653
8671
  let e = "";
8654
8672
  return n.ctrlKey && (e += "c"), n.metaKey && (e += "m"), n.altKey && (e += "a"), n.shiftKey && (e += "s"), e;
8655
8673
  }
8656
- function ch(n, e) {
8657
- let t = e.keyCode, r = ah(e);
8674
+ function dh(n, e) {
8675
+ let t = e.keyCode, r = ch(e);
8658
8676
  if (t == 8 || ke && t == 72 && r == "c")
8659
8677
  return fo(n, -1) || Mt(n, -1);
8660
8678
  if (t == 46 && !e.shiftKey || ke && t == 68 && r == "c")
@@ -8671,7 +8689,7 @@ function ch(n, e) {
8671
8689
  if (t == 38 || ke && t == 80 && r == "c")
8672
8690
  return ho(n, -1, r) || Mt(n, -1);
8673
8691
  if (t == 40 || ke && t == 78 && r == "c")
8674
- return lh(n) || ho(n, 1, r) || Mt(n, 1);
8692
+ return ah(n) || ho(n, 1, r) || Mt(n, 1);
8675
8693
  if (r == (ke ? "m" : "c") && (t == 66 || t == 73 || t == 89 || t == 90))
8676
8694
  return !0;
8677
8695
  }
@@ -8729,7 +8747,7 @@ function ia(n, e, t, r, i) {
8729
8747
  } else
8730
8748
  n.someProp("transformPastedHTML", (u) => {
8731
8749
  t = u(t, n);
8732
- }), o = hh(t), kn && fh(o);
8750
+ }), o = fh(t), kn && ph(o);
8733
8751
  let c = o && o.querySelector("[data-pm-slice]"), d = c && /^(\d+) (\d+)(?: -(\d+))? (.*)/.exec(c.getAttribute("data-pm-slice") || "");
8734
8752
  if (d && d[3])
8735
8753
  for (let u = +d[3]; u > 0; u--) {
@@ -8744,11 +8762,11 @@ function ia(n, e, t, r, i) {
8744
8762
  preserveWhitespace: !!(a || d),
8745
8763
  context: i,
8746
8764
  ruleFromNode(h) {
8747
- return h.nodeName == "BR" && !h.nextSibling && h.parentNode && !dh.test(h.parentNode.nodeName) ? { ignore: !0 } : null;
8765
+ return h.nodeName == "BR" && !h.nextSibling && h.parentNode && !uh.test(h.parentNode.nodeName) ? { ignore: !0 } : null;
8748
8766
  }
8749
8767
  })), d)
8750
- l = ph(mo(l, +d[1], +d[2]), d[4]);
8751
- else if (l = S.maxOpen(uh(l.content, i), !0), l.openStart || l.openEnd) {
8768
+ l = mh(mo(l, +d[1], +d[2]), d[4]);
8769
+ else if (l = S.maxOpen(hh(l.content, i), !0), l.openStart || l.openEnd) {
8752
8770
  let u = 0, h = 0;
8753
8771
  for (let f = l.content.firstChild; u < l.openStart && !f.type.spec.isolating; u++, f = f.firstChild)
8754
8772
  ;
@@ -8760,8 +8778,8 @@ function ia(n, e, t, r, i) {
8760
8778
  l = u(l, n);
8761
8779
  }), l;
8762
8780
  }
8763
- const dh = /^(a|abbr|acronym|b|cite|code|del|em|i|ins|kbd|label|output|q|ruby|s|samp|span|strong|sub|sup|time|u|tt|var)$/i;
8764
- function uh(n, e) {
8781
+ const uh = /^(a|abbr|acronym|b|cite|code|del|em|i|ins|kbd|label|output|q|ruby|s|samp|span|strong|sub|sup|time|u|tt|var)$/i;
8782
+ function hh(n, e) {
8765
8783
  if (n.childCount < 2)
8766
8784
  return n;
8767
8785
  for (let t = e.depth; t >= 0; t--) {
@@ -8826,7 +8844,7 @@ let go = null;
8826
8844
  function ca() {
8827
8845
  return go || (go = document.implementation.createHTMLDocument("title"));
8828
8846
  }
8829
- function hh(n) {
8847
+ function fh(n) {
8830
8848
  let e = /^(\s*<meta [^>]*>)*/.exec(n);
8831
8849
  e && (n = n.slice(e[0].length));
8832
8850
  let t = ca().createElement("div"), r = /<([a-z][^>\s]+)/i.exec(n), i;
@@ -8835,14 +8853,14 @@ function hh(n) {
8835
8853
  t = t.querySelector(i[s]) || t;
8836
8854
  return t;
8837
8855
  }
8838
- function fh(n) {
8856
+ function ph(n) {
8839
8857
  let e = n.querySelectorAll(te ? "span:not([class]):not([style])" : "span.Apple-converted-space");
8840
8858
  for (let t = 0; t < e.length; t++) {
8841
8859
  let r = e[t];
8842
8860
  r.childNodes.length == 1 && r.textContent == " " && r.parentNode && r.parentNode.replaceChild(n.ownerDocument.createTextNode(" "), r);
8843
8861
  }
8844
8862
  }
8845
- function ph(n, e) {
8863
+ function mh(n, e) {
8846
8864
  if (!n.size)
8847
8865
  return n;
8848
8866
  let t = n.content.firstChild.type.schema, r;
@@ -8860,25 +8878,25 @@ function ph(n, e) {
8860
8878
  }
8861
8879
  return new S(i, s, o);
8862
8880
  }
8863
- const ae = {}, ce = {}, mh = { touchstart: !0, touchmove: !0 };
8864
- class gh {
8881
+ const ae = {}, ce = {}, gh = { touchstart: !0, touchmove: !0 };
8882
+ class yh {
8865
8883
  constructor() {
8866
8884
  this.shiftKey = !1, this.mouseDown = null, this.lastKeyCode = null, this.lastKeyCodeTime = 0, this.lastClick = { time: 0, x: 0, y: 0, type: "" }, this.lastSelectionOrigin = null, this.lastSelectionTime = 0, this.lastIOSEnter = 0, this.lastIOSEnterFallbackTimeout = -1, this.lastFocus = 0, this.lastTouch = 0, this.lastAndroidDelete = 0, this.composing = !1, this.composingTimeout = -1, this.compositionNodes = [], this.compositionEndedAt = -2e8, this.compositionID = 1, this.compositionPendingChanges = 0, this.domChangeCount = 0, this.eventHandlers = /* @__PURE__ */ Object.create(null), this.hideSelectionGuard = null;
8867
8885
  }
8868
8886
  }
8869
- function yh(n) {
8887
+ function bh(n) {
8870
8888
  for (let e in ae) {
8871
8889
  let t = ae[e];
8872
8890
  n.dom.addEventListener(e, n.input.eventHandlers[e] = (r) => {
8873
- kh(n, r) && !rs(n, r) && (n.editable || !(r.type in ce)) && t(n, r);
8874
- }, mh[e] ? { passive: !0 } : void 0);
8891
+ Sh(n, r) && !rs(n, r) && (n.editable || !(r.type in ce)) && t(n, r);
8892
+ }, gh[e] ? { passive: !0 } : void 0);
8875
8893
  }
8876
8894
  le && n.dom.addEventListener("input", () => null), Ii(n);
8877
8895
  }
8878
8896
  function Xe(n, e) {
8879
8897
  n.input.lastSelectionOrigin = e, n.input.lastSelectionTime = Date.now();
8880
8898
  }
8881
- function bh(n) {
8899
+ function kh(n) {
8882
8900
  n.domObserver.stop();
8883
8901
  for (let e in n.input.eventHandlers)
8884
8902
  n.dom.removeEventListener(e, n.input.eventHandlers[e]);
@@ -8896,7 +8914,7 @@ function rs(n, e) {
8896
8914
  return r ? r(n, e) || e.defaultPrevented : !1;
8897
8915
  });
8898
8916
  }
8899
- function kh(n, e) {
8917
+ function Sh(n, e) {
8900
8918
  if (!e.bubbles)
8901
8919
  return !0;
8902
8920
  if (e.defaultPrevented)
@@ -8906,7 +8924,7 @@ function kh(n, e) {
8906
8924
  return !1;
8907
8925
  return !0;
8908
8926
  }
8909
- function Sh(n, e) {
8927
+ function xh(n, e) {
8910
8928
  !rs(n, e) && ae[e.type] && (n.editable || !(e.type in ce)) && ae[e.type](n, e);
8911
8929
  }
8912
8930
  ce.keydown = (n, e) => {
@@ -8918,7 +8936,7 @@ ce.keydown = (n, e) => {
8918
8936
  n.input.lastIOSEnter == r && (n.someProp("handleKeyDown", (i) => i(n, lt(13, "Enter"))), n.input.lastIOSEnter = 0);
8919
8937
  }, 200);
8920
8938
  } else
8921
- n.someProp("handleKeyDown", (r) => r(n, t)) || ch(n, t) ? t.preventDefault() : Xe(n, "key");
8939
+ n.someProp("handleKeyDown", (r) => r(n, t)) || dh(n, t) ? t.preventDefault() : Xe(n, "key");
8922
8940
  };
8923
8941
  ce.keyup = (n, e) => {
8924
8942
  e.keyCode == 16 && (n.input.shiftKey = !1);
@@ -8940,7 +8958,7 @@ ce.keypress = (n, e) => {
8940
8958
  function Dr(n) {
8941
8959
  return { left: n.clientX, top: n.clientY };
8942
8960
  }
8943
- function xh(n, e) {
8961
+ function Ch(n, e) {
8944
8962
  let t = e.x - n.clientX, r = e.y - n.clientY;
8945
8963
  return t * t + r * r < 100;
8946
8964
  }
@@ -8958,13 +8976,13 @@ function Lt(n, e, t) {
8958
8976
  let r = n.state.tr.setSelection(e);
8959
8977
  t == "pointer" && r.setMeta("pointer", !0), n.dispatch(r);
8960
8978
  }
8961
- function Ch(n, e) {
8979
+ function Eh(n, e) {
8962
8980
  if (e == -1)
8963
8981
  return !1;
8964
8982
  let t = n.state.doc.resolve(e), r = t.nodeAfter;
8965
8983
  return r && r.isAtom && w.isSelectable(r) ? (Lt(n, new w(t), "pointer"), !0) : !1;
8966
8984
  }
8967
- function Eh(n, e) {
8985
+ function Th(n, e) {
8968
8986
  if (e == -1)
8969
8987
  return !1;
8970
8988
  let t = n.state.selection, r, i;
@@ -8979,16 +8997,16 @@ function Eh(n, e) {
8979
8997
  }
8980
8998
  return i != null ? (Lt(n, w.create(n.state.doc, i), "pointer"), !0) : !1;
8981
8999
  }
8982
- function Th(n, e, t, r, i) {
8983
- return is(n, "handleClickOn", e, t, r) || n.someProp("handleClick", (s) => s(n, e, r)) || (i ? Eh(n, t) : Ch(n, t));
9000
+ function Mh(n, e, t, r, i) {
9001
+ return is(n, "handleClickOn", e, t, r) || n.someProp("handleClick", (s) => s(n, e, r)) || (i ? Th(n, t) : Eh(n, t));
8984
9002
  }
8985
- function Mh(n, e, t, r) {
9003
+ function wh(n, e, t, r) {
8986
9004
  return is(n, "handleDoubleClickOn", e, t, r) || n.someProp("handleDoubleClick", (i) => i(n, e, r));
8987
9005
  }
8988
- function wh(n, e, t, r) {
8989
- return is(n, "handleTripleClickOn", e, t, r) || n.someProp("handleTripleClick", (i) => i(n, e, r)) || Oh(n, t, r);
9006
+ function Oh(n, e, t, r) {
9007
+ return is(n, "handleTripleClickOn", e, t, r) || n.someProp("handleTripleClick", (i) => i(n, e, r)) || vh(n, t, r);
8990
9008
  }
8991
- function Oh(n, e, t) {
9009
+ function vh(n, e, t) {
8992
9010
  if (t.button != 0)
8993
9011
  return !1;
8994
9012
  let r = n.state.doc;
@@ -9014,11 +9032,11 @@ ae.mousedown = (n, e) => {
9014
9032
  let t = e;
9015
9033
  n.input.shiftKey = t.shiftKey;
9016
9034
  let r = ss(n), i = Date.now(), s = "singleClick";
9017
- i - n.input.lastClick.time < 500 && xh(t, n.input.lastClick) && !t[da] && (n.input.lastClick.type == "singleClick" ? s = "doubleClick" : n.input.lastClick.type == "doubleClick" && (s = "tripleClick")), n.input.lastClick = { time: i, x: t.clientX, y: t.clientY, type: s };
9035
+ i - n.input.lastClick.time < 500 && Ch(t, n.input.lastClick) && !t[da] && (n.input.lastClick.type == "singleClick" ? s = "doubleClick" : n.input.lastClick.type == "doubleClick" && (s = "tripleClick")), n.input.lastClick = { time: i, x: t.clientX, y: t.clientY, type: s };
9018
9036
  let o = n.posAtCoords(Dr(t));
9019
- o && (s == "singleClick" ? (n.input.mouseDown && n.input.mouseDown.done(), n.input.mouseDown = new vh(n, o, t, !!r)) : (s == "doubleClick" ? Mh : wh)(n, o.pos, o.inside, t) ? t.preventDefault() : Xe(n, "pointer"));
9037
+ o && (s == "singleClick" ? (n.input.mouseDown && n.input.mouseDown.done(), n.input.mouseDown = new Ah(n, o, t, !!r)) : (s == "doubleClick" ? wh : Oh)(n, o.pos, o.inside, t) ? t.preventDefault() : Xe(n, "pointer"));
9020
9038
  };
9021
- class vh {
9039
+ class Ah {
9022
9040
  constructor(e, t, r, i) {
9023
9041
  this.view = e, this.pos = t, this.event = r, this.flushed = i, this.delayedSelectionSync = !1, this.mightDrag = null, this.startDoc = e.state.doc, this.selectNode = !!r[da], this.allowDefault = r.shiftKey;
9024
9042
  let s, o;
@@ -9047,7 +9065,7 @@ class vh {
9047
9065
  if (this.done(), !this.view.dom.contains(e.target))
9048
9066
  return;
9049
9067
  let t = this.pos;
9050
- this.view.state.doc != this.startDoc && (t = this.view.posAtCoords(Dr(e))), this.updateAllowDefault(e), this.allowDefault || !t ? Xe(this.view, "pointer") : Th(this.view, t.pos, t.inside, e, this.selectNode) ? e.preventDefault() : e.button == 0 && (this.flushed || // Safari ignores clicks on draggable elements
9068
+ this.view.state.doc != this.startDoc && (t = this.view.posAtCoords(Dr(e))), this.updateAllowDefault(e), this.allowDefault || !t ? Xe(this.view, "pointer") : Mh(this.view, t.pos, t.inside, e, this.selectNode) ? e.preventDefault() : e.button == 0 && (this.flushed || // Safari ignores clicks on draggable elements
9051
9069
  le && this.mightDrag && !this.mightDrag.node.isAtom || // Chrome will sometimes treat a node selection as a
9052
9070
  // cursor, but still report that the node is selected
9053
9071
  // when asked through getSelection. You'll then get a
@@ -9074,7 +9092,7 @@ ae.contextmenu = (n) => ss(n);
9074
9092
  function ua(n, e) {
9075
9093
  return n.composing ? !0 : le && Math.abs(e.timeStamp - n.input.compositionEndedAt) < 500 ? (n.input.compositionEndedAt = -2e8, !0) : !1;
9076
9094
  }
9077
- const Ah = Ee ? 5e3 : -1;
9095
+ const Nh = Ee ? 5e3 : -1;
9078
9096
  ce.compositionstart = ce.compositionupdate = (n) => {
9079
9097
  if (!n.composing) {
9080
9098
  n.domObserver.flush();
@@ -9096,7 +9114,7 @@ ce.compositionstart = ce.compositionupdate = (n) => {
9096
9114
  }
9097
9115
  n.input.composing = !0;
9098
9116
  }
9099
- ha(n, Ah);
9117
+ ha(n, Nh);
9100
9118
  };
9101
9119
  ce.compositionend = (n, e) => {
9102
9120
  n.composing && (n.input.composing = !1, n.input.compositionEndedAt = e.timeStamp, n.input.compositionPendingChanges = n.domObserver.pendingRecords().length ? n.input.compositionID : 0, n.input.compositionPendingChanges && Promise.resolve().then(() => n.domObserver.flush()), n.input.compositionID++, ha(n, 20));
@@ -9105,10 +9123,10 @@ function ha(n, e) {
9105
9123
  clearTimeout(n.input.composingTimeout), e > -1 && (n.input.composingTimeout = setTimeout(() => Vn(n), e));
9106
9124
  }
9107
9125
  function fa(n) {
9108
- for (n.composing && (n.input.composing = !1, n.input.compositionEndedAt = Nh()); n.input.compositionNodes.length > 0; )
9126
+ for (n.composing && (n.input.composing = !1, n.input.compositionEndedAt = Dh()); n.input.compositionNodes.length > 0; )
9109
9127
  n.input.compositionNodes.pop().markParentsDirty();
9110
9128
  }
9111
- function Nh() {
9129
+ function Dh() {
9112
9130
  let n = document.createEvent("Event");
9113
9131
  return n.initEvent("event", !0, !0), n.timeStamp;
9114
9132
  }
@@ -9121,7 +9139,7 @@ function Vn(n, e = !1) {
9121
9139
  return !1;
9122
9140
  }
9123
9141
  }
9124
- function Dh(n, e) {
9142
+ function Ih(n, e) {
9125
9143
  if (!n.dom.parentNode)
9126
9144
  return;
9127
9145
  let t = n.dom.parentNode.appendChild(document.createElement("div"));
@@ -9131,18 +9149,18 @@ function Dh(n, e) {
9131
9149
  t.parentNode && t.parentNode.removeChild(t), n.focus();
9132
9150
  }, 50);
9133
9151
  }
9134
- const un = he && Qe < 15 || Ft && vu < 604;
9152
+ const un = he && Qe < 15 || Ft && Au < 604;
9135
9153
  ae.copy = ce.cut = (n, e) => {
9136
9154
  let t = e, r = n.state.selection, i = t.type == "cut";
9137
9155
  if (r.empty)
9138
9156
  return;
9139
9157
  let s = un ? null : t.clipboardData, o = r.content(), { dom: l, text: a } = ra(n, o);
9140
- s ? (t.preventDefault(), s.clearData(), s.setData("text/html", l.innerHTML), s.setData("text/plain", a)) : Dh(n, l), i && n.dispatch(n.state.tr.deleteSelection().scrollIntoView().setMeta("uiEvent", "cut"));
9158
+ s ? (t.preventDefault(), s.clearData(), s.setData("text/html", l.innerHTML), s.setData("text/plain", a)) : Ih(n, l), i && n.dispatch(n.state.tr.deleteSelection().scrollIntoView().setMeta("uiEvent", "cut"));
9141
9159
  };
9142
- function Ih(n) {
9160
+ function Rh(n) {
9143
9161
  return n.openStart == 0 && n.openEnd == 0 && n.content.childCount == 1 ? n.content.firstChild : null;
9144
9162
  }
9145
- function Rh(n, e) {
9163
+ function Ph(n, e) {
9146
9164
  if (!n.dom.parentNode)
9147
9165
  return;
9148
9166
  let t = n.input.shiftKey || n.state.selection.$from.parent.type.spec.code, r = n.dom.parentNode.appendChild(document.createElement(t ? "textarea" : "div"));
@@ -9158,7 +9176,7 @@ function hn(n, e, t, r, i) {
9158
9176
  return !0;
9159
9177
  if (!s)
9160
9178
  return !1;
9161
- let o = Ih(s), l = o ? n.state.tr.replaceSelectionWith(o, r) : n.state.tr.replaceSelection(s);
9179
+ let o = Rh(s), l = o ? n.state.tr.replaceSelectionWith(o, r) : n.state.tr.replaceSelection(s);
9162
9180
  return n.dispatch(l.scrollIntoView().setMeta("paste", !0).setMeta("uiEvent", "paste")), !0;
9163
9181
  }
9164
9182
  function pa(n) {
@@ -9173,9 +9191,9 @@ ce.paste = (n, e) => {
9173
9191
  if (n.composing && !Ee)
9174
9192
  return;
9175
9193
  let r = un ? null : t.clipboardData, i = n.input.shiftKey && n.input.lastKeyCode != 45;
9176
- r && hn(n, pa(r), r.getData("text/html"), i, t) ? t.preventDefault() : Rh(n, t);
9194
+ r && hn(n, pa(r), r.getData("text/html"), i, t) ? t.preventDefault() : Ph(n, t);
9177
9195
  };
9178
- class Ph {
9196
+ class Lh {
9179
9197
  constructor(e, t) {
9180
9198
  this.slice = e, this.move = t;
9181
9199
  }
@@ -9195,7 +9213,7 @@ ae.dragstart = (n, e) => {
9195
9213
  }
9196
9214
  }
9197
9215
  let o = n.state.selection.content(), { dom: l, text: a } = ra(n, o);
9198
- t.dataTransfer.clearData(), t.dataTransfer.setData(un ? "Text" : "text/html", l.innerHTML), t.dataTransfer.effectAllowed = "copyMove", un || t.dataTransfer.setData("text/plain", a), n.dragging = new Ph(o, !t[ma]);
9216
+ t.dataTransfer.clearData(), t.dataTransfer.setData(un ? "Text" : "text/html", l.innerHTML), t.dataTransfer.effectAllowed = "copyMove", un || t.dataTransfer.setData("text/plain", a), n.dragging = new Lh(o, !t[ma]);
9199
9217
  };
9200
9218
  ae.dragend = (n) => {
9201
9219
  let e = n.dragging;
@@ -9223,7 +9241,7 @@ ce.drop = (n, e) => {
9223
9241
  if (!o)
9224
9242
  return;
9225
9243
  t.preventDefault();
9226
- let a = o ? uu(n.state.doc, s.pos, o) : s.pos;
9244
+ let a = o ? hu(n.state.doc, s.pos, o) : s.pos;
9227
9245
  a == null && (a = s.pos);
9228
9246
  let c = n.state.tr;
9229
9247
  l && c.deleteSelection();
@@ -9458,7 +9476,7 @@ class H {
9458
9476
  let a = this.local[l].map(e, r, i);
9459
9477
  a && a.type.valid(t, a) ? (o || (o = [])).push(a) : s.onRemove && s.onRemove(this.local[l].spec);
9460
9478
  }
9461
- return this.children.length ? Lh(this.children, o || [], e, t, r, i, s) : o ? new H(o.sort(bt), At) : ee;
9479
+ return this.children.length ? Bh(this.children, o || [], e, t, r, i, s) : o ? new H(o.sort(bt), At) : ee;
9462
9480
  }
9463
9481
  /**
9464
9482
  Add the given array of decorations to the ones in the set,
@@ -9632,7 +9650,7 @@ class Ue {
9632
9650
  }
9633
9651
  }
9634
9652
  }
9635
- function Lh(n, e, t, r, i, s, o) {
9653
+ function Bh(n, e, t, r, i, s, o) {
9636
9654
  let l = n.slice();
9637
9655
  for (let c = 0, d = s; c < t.maps.length; c++) {
9638
9656
  let u = 0;
@@ -9668,7 +9686,7 @@ function Lh(n, e, t, r, i, s, o) {
9668
9686
  a = !0;
9669
9687
  }
9670
9688
  if (a) {
9671
- let c = Bh(l, n, e, t, i, s, o), d = jn(c, r, 0, o);
9689
+ let c = _h(l, n, e, t, i, s, o), d = jn(c, r, 0, o);
9672
9690
  e = d.local;
9673
9691
  for (let u = 0; u < l.length; u += 3)
9674
9692
  l[u + 1] < 0 && (l.splice(u, 3), u -= 3);
@@ -9691,7 +9709,7 @@ function ga(n, e) {
9691
9709
  }
9692
9710
  return t;
9693
9711
  }
9694
- function Bh(n, e, t, r, i, s, o) {
9712
+ function _h(n, e, t, r, i, s, o) {
9695
9713
  function l(a, c) {
9696
9714
  for (let d = 0; d < a.local.length; d++) {
9697
9715
  let u = a.local[d].map(r, i, c);
@@ -9766,15 +9784,15 @@ function ri(n) {
9766
9784
  r && r != ee && e.push(r);
9767
9785
  }), n.cursorWrapper && e.push(H.create(n.state.doc, [n.cursorWrapper.deco])), Ue.from(e);
9768
9786
  }
9769
- const _h = {
9787
+ const Fh = {
9770
9788
  childList: !0,
9771
9789
  characterData: !0,
9772
9790
  characterDataOldValue: !0,
9773
9791
  attributes: !0,
9774
9792
  attributeOldValue: !0,
9775
9793
  subtree: !0
9776
- }, Fh = he && Qe <= 11;
9777
- class zh {
9794
+ }, zh = he && Qe <= 11;
9795
+ class Hh {
9778
9796
  constructor() {
9779
9797
  this.anchorNode = null, this.anchorOffset = 0, this.focusNode = null, this.focusOffset = 0;
9780
9798
  }
@@ -9788,13 +9806,13 @@ class zh {
9788
9806
  return e.anchorNode == this.anchorNode && e.anchorOffset == this.anchorOffset && e.focusNode == this.focusNode && e.focusOffset == this.focusOffset;
9789
9807
  }
9790
9808
  }
9791
- class Hh {
9809
+ class Vh {
9792
9810
  constructor(e, t) {
9793
- this.view = e, this.handleDOMChange = t, this.queue = [], this.flushingSoon = -1, this.observer = null, this.currentSelection = new zh(), this.onCharData = null, this.suppressingSelectionUpdates = !1, this.observer = window.MutationObserver && new window.MutationObserver((r) => {
9811
+ this.view = e, this.handleDOMChange = t, this.queue = [], this.flushingSoon = -1, this.observer = null, this.currentSelection = new Hh(), this.onCharData = null, this.suppressingSelectionUpdates = !1, this.observer = window.MutationObserver && new window.MutationObserver((r) => {
9794
9812
  for (let i = 0; i < r.length; i++)
9795
9813
  this.queue.push(r[i]);
9796
9814
  he && Qe <= 11 && r.some((i) => i.type == "childList" && i.removedNodes.length || i.type == "characterData" && i.oldValue.length > i.target.nodeValue.length) ? this.flushSoon() : this.flush();
9797
- }), Fh && (this.onCharData = (r) => {
9815
+ }), zh && (this.onCharData = (r) => {
9798
9816
  this.queue.push({ target: r.target, type: "characterData", oldValue: r.prevValue }), this.flushSoon();
9799
9817
  }), this.onSelectionChange = this.onSelectionChange.bind(this);
9800
9818
  }
@@ -9807,7 +9825,7 @@ class Hh {
9807
9825
  this.flushingSoon > -1 && (window.clearTimeout(this.flushingSoon), this.flushingSoon = -1, this.flush());
9808
9826
  }
9809
9827
  start() {
9810
- this.observer && (this.observer.takeRecords(), this.observer.observe(this.view.dom, _h)), this.onCharData && this.view.dom.addEventListener("DOMCharacterDataModified", this.onCharData), this.connectSelection();
9828
+ this.observer && (this.observer.takeRecords(), this.observer.observe(this.view.dom, Fh)), this.onCharData && this.view.dom.addEventListener("DOMCharacterDataModified", this.onCharData), this.connectSelection();
9811
9829
  }
9812
9830
  stop() {
9813
9831
  if (this.observer) {
@@ -9889,7 +9907,7 @@ class Hh {
9889
9907
  }
9890
9908
  }
9891
9909
  let c = null;
9892
- s < 0 && i && e.input.lastFocus > Date.now() - 200 && Math.max(e.input.lastTouch, e.input.lastClick.time) < Date.now() - 300 && Ar(r) && (c = ts(e)) && c.eq(N.near(e.state.doc.resolve(0), 1)) ? (e.input.lastFocus = 0, Fe(e), this.currentSelection.set(r), e.scrollToSelection()) : (s > -1 || i) && (s > -1 && (e.docView.markDirty(s, o), Vh(e)), this.handleDOMChange(s, o, l, a), e.docView && e.docView.dirty ? e.updateState(e.state) : this.currentSelection.eq(r) || Fe(e), this.currentSelection.set(r));
9910
+ s < 0 && i && e.input.lastFocus > Date.now() - 200 && Math.max(e.input.lastTouch, e.input.lastClick.time) < Date.now() - 300 && Ar(r) && (c = ts(e)) && c.eq(N.near(e.state.doc.resolve(0), 1)) ? (e.input.lastFocus = 0, Fe(e), this.currentSelection.set(r), e.scrollToSelection()) : (s > -1 || i) && (s > -1 && (e.docView.markDirty(s, o), $h(e)), this.handleDOMChange(s, o, l, a), e.docView && e.docView.dirty ? e.updateState(e.state) : this.currentSelection.eq(r) || Fe(e), this.currentSelection.set(r));
9893
9911
  }
9894
9912
  registerMutation(e, t) {
9895
9913
  if (t.indexOf(e.target) > -1)
@@ -9924,14 +9942,14 @@ class Hh {
9924
9942
  }
9925
9943
  }
9926
9944
  let bo = /* @__PURE__ */ new WeakMap(), ko = !1;
9927
- function Vh(n) {
9945
+ function $h(n) {
9928
9946
  if (!bo.has(n) && (bo.set(n, null), ["normal", "nowrap", "pre-line"].indexOf(getComputedStyle(n.dom).whiteSpace) !== -1)) {
9929
9947
  if (n.requiresGeckoHackNode = Me, ko)
9930
9948
  return;
9931
9949
  console.warn("ProseMirror expects the CSS white-space property to be set, preferably to 'pre-wrap'. It is recommended to load style/prosemirror.css from the prosemirror-view package."), ko = !0;
9932
9950
  }
9933
9951
  }
9934
- function $h(n) {
9952
+ function jh(n) {
9935
9953
  let e;
9936
9954
  function t(a) {
9937
9955
  a.preventDefault(), a.stopImmediatePropagation(), e = a.getTargetRanges()[0];
@@ -9940,7 +9958,7 @@ function $h(n) {
9940
9958
  let r = e.startContainer, i = e.startOffset, s = e.endContainer, o = e.endOffset, l = n.domAtPos(n.state.selection.anchor);
9941
9959
  return Ct(l.node, l.offset, s, o) && ([r, i, s, o] = [s, o, r, i]), { anchorNode: r, anchorOffset: i, focusNode: s, focusOffset: o };
9942
9960
  }
9943
- function jh(n, e, t) {
9961
+ function qh(n, e, t) {
9944
9962
  let { node: r, fromOffset: i, toOffset: s, from: o, to: l } = n.docView.parseRange(e, t), a = n.domSelectionRange(), c, d = a.anchorNode;
9945
9963
  if (d && n.dom.contains(d.nodeType == 1 ? d : d.parentNode) && (c = [{ node: d, offset: a.anchorOffset }], Ar(a) || c.push({ node: a.focusNode, offset: a.focusOffset })), te && n.input.lastKeyCode === 8)
9946
9964
  for (let g = s; g > i; g--) {
@@ -9960,7 +9978,7 @@ function jh(n, e, t) {
9960
9978
  to: s,
9961
9979
  preserveWhitespace: f.parent.type.whitespace == "pre" ? "full" : !0,
9962
9980
  findPositions: c,
9963
- ruleFromNode: qh,
9981
+ ruleFromNode: Kh,
9964
9982
  context: f
9965
9983
  });
9966
9984
  if (c && c[0].pos != null) {
@@ -9969,7 +9987,7 @@ function jh(n, e, t) {
9969
9987
  }
9970
9988
  return { doc: m, sel: p, from: o, to: l };
9971
9989
  }
9972
- function qh(n) {
9990
+ function Kh(n) {
9973
9991
  let e = n.pmViewDesc;
9974
9992
  if (e)
9975
9993
  return e.parseRule();
@@ -9983,8 +10001,8 @@ function qh(n) {
9983
10001
  return { ignore: !0 };
9984
10002
  return null;
9985
10003
  }
9986
- const Kh = /^(a|abbr|acronym|b|bd[io]|big|br|button|cite|code|data(list)?|del|dfn|em|i|ins|kbd|label|map|mark|meter|output|q|ruby|s|samp|small|span|strong|su[bp]|time|u|tt|var)$/i;
9987
- function Wh(n, e, t, r, i) {
10004
+ const Wh = /^(a|abbr|acronym|b|bd[io]|big|br|button|cite|code|data(list)?|del|dfn|em|i|ins|kbd|label|map|mark|meter|output|q|ruby|s|samp|small|span|strong|su[bp]|time|u|tt|var)$/i;
10005
+ function Uh(n, e, t, r, i) {
9988
10006
  let s = n.input.compositionPendingChanges || (n.composing ? n.input.compositionID : 0);
9989
10007
  if (n.input.compositionPendingChanges = 0, e < 0) {
9990
10008
  let M = n.input.lastSelectionTime > Date.now() - 50 ? n.input.lastSelectionOrigin : null, Z = ts(n, M);
@@ -9998,10 +10016,10 @@ function Wh(n, e, t, r, i) {
9998
10016
  }
9999
10017
  let o = n.state.doc.resolve(e), l = o.sharedDepth(t);
10000
10018
  e = o.before(l + 1), t = n.state.doc.resolve(t).after(l + 1);
10001
- let a = n.state.selection, c = jh(n, e, t), d = n.state.doc, u = d.slice(c.from, c.to), h, f;
10019
+ let a = n.state.selection, c = qh(n, e, t), d = n.state.doc, u = d.slice(c.from, c.to), h, f;
10002
10020
  n.input.lastKeyCode === 8 && Date.now() - 100 < n.input.lastKeyCodeTime ? (h = n.state.selection.to, f = "end") : (h = n.state.selection.from, f = "start"), n.input.lastKeyCode = null;
10003
- let p = Gh(u.content, c.doc.content, c.from, h, f);
10004
- if ((Ft && n.input.lastIOSEnter > Date.now() - 225 || Ee) && i.some((M) => M.nodeType == 1 && !Kh.test(M.nodeName)) && (!p || p.endA >= p.endB) && n.someProp("handleKeyDown", (M) => M(n, lt(13, "Enter")))) {
10021
+ let p = Yh(u.content, c.doc.content, c.from, h, f);
10022
+ if ((Ft && n.input.lastIOSEnter > Date.now() - 225 || Ee) && i.some((M) => M.nodeType == 1 && !Wh.test(M.nodeName)) && (!p || p.endA >= p.endB) && n.someProp("handleKeyDown", (M) => M(n, lt(13, "Enter")))) {
10005
10023
  n.input.lastIOSEnter = 0;
10006
10024
  return;
10007
10025
  }
@@ -10028,7 +10046,7 @@ function Wh(n, e, t, r, i) {
10028
10046
  n.input.lastIOSEnter = 0;
10029
10047
  return;
10030
10048
  }
10031
- if (n.state.selection.anchor > p.start && Jh(d, p.start, p.endA, m, g) && n.someProp("handleKeyDown", (M) => M(n, lt(8, "Backspace")))) {
10049
+ if (n.state.selection.anchor > p.start && Gh(d, p.start, p.endA, m, g) && n.someProp("handleKeyDown", (M) => M(n, lt(8, "Backspace")))) {
10032
10050
  Ee && te && n.domObserver.suppressSelectionUpdates();
10033
10051
  return;
10034
10052
  }
@@ -10043,7 +10061,7 @@ function Wh(n, e, t, r, i) {
10043
10061
  he && Qe <= 11 && m.parentOffset == 0 && (n.domObserver.suppressSelectionUpdates(), setTimeout(() => Fe(n), 20)), E = n.state.tr.delete(R, P), L = d.resolve(p.start).marksAcross(d.resolve(p.endA));
10044
10062
  else if (
10045
10063
  // Adding or removing a mark
10046
- p.endA == p.endB && (I = Uh(m.parent.content.cut(m.parentOffset, g.parentOffset), y.parent.content.cut(y.parentOffset, p.endA - y.start())))
10064
+ p.endA == p.endB && (I = Jh(m.parent.content.cut(m.parentOffset, g.parentOffset), y.parent.content.cut(y.parentOffset, p.endA - y.start())))
10047
10065
  )
10048
10066
  E = n.state.tr, I.type == "add" ? E.addMark(R, P, I.mark) : E.removeMark(R, P, I.mark);
10049
10067
  else if (m.parent.child(m.index()).isText && m.index() == g.index() - (g.textOffset ? 0 : 1)) {
@@ -10062,7 +10080,7 @@ function Wh(n, e, t, r, i) {
10062
10080
  function So(n, e, t) {
10063
10081
  return Math.max(t.anchor, t.head) > e.content.size ? null : ns(n, e.resolve(t.anchor), e.resolve(t.head));
10064
10082
  }
10065
- function Uh(n, e) {
10083
+ function Jh(n, e) {
10066
10084
  let t = n.firstChild.marks, r = e.firstChild.marks, i = t, s = r, o, l, a;
10067
10085
  for (let d = 0; d < r.length; d++)
10068
10086
  i = r[d].removeFromSet(i);
@@ -10080,7 +10098,7 @@ function Uh(n, e) {
10080
10098
  if (b.from(c).eq(n))
10081
10099
  return { mark: l, type: o };
10082
10100
  }
10083
- function Jh(n, e, t, r, i) {
10101
+ function Gh(n, e, t, r, i) {
10084
10102
  if (!r.parent.isTextblock || // The content must have shrunk
10085
10103
  t - e <= i.pos - r.pos || // newEnd must point directly at or after the end of the block that newStart points into
10086
10104
  ii(r, !0, !1) < i.pos)
@@ -10102,7 +10120,7 @@ function ii(n, e, t) {
10102
10120
  }
10103
10121
  return i;
10104
10122
  }
10105
- function Gh(n, e, t, r, i) {
10123
+ function Yh(n, e, t, r, i) {
10106
10124
  let s = n.findDiffStart(e, t);
10107
10125
  if (s == null)
10108
10126
  return null;
@@ -10120,7 +10138,7 @@ function Gh(n, e, t, r, i) {
10120
10138
  }
10121
10139
  return { start: s, endA: o, endB: l };
10122
10140
  }
10123
- class Yh {
10141
+ class Xh {
10124
10142
  /**
10125
10143
  Create a view. `place` may be a DOM node that the editor should
10126
10144
  be appended to, a function that will place it into the document,
@@ -10129,7 +10147,7 @@ class Yh {
10129
10147
  added to the document.
10130
10148
  */
10131
10149
  constructor(e, t) {
10132
- this._root = null, this.focused = !1, this.trackWrites = null, this.mounted = !1, this.markCursor = null, this.cursorWrapper = null, this.lastSelectedViewDesc = void 0, this.input = new gh(), this.prevDirectPlugins = [], this.pluginViews = [], this.requiresGeckoHackNode = !1, this.dragging = null, this._props = t, this.state = t.state, this.directPlugins = t.plugins || [], this.directPlugins.forEach(Mo), this.dispatch = this.dispatch.bind(this), this.dom = e && e.mount || document.createElement("div"), e && (e.appendChild ? e.appendChild(this.dom) : typeof e == "function" ? e(this.dom) : e.mount && (this.mounted = !0)), this.editable = Eo(this), Co(this), this.nodeViews = To(this), this.docView = no(this.state.doc, xo(this), ri(this), this.dom, this), this.domObserver = new Hh(this, (r, i, s, o) => Wh(this, r, i, s, o)), this.domObserver.start(), yh(this), this.updatePluginViews();
10150
+ this._root = null, this.focused = !1, this.trackWrites = null, this.mounted = !1, this.markCursor = null, this.cursorWrapper = null, this.lastSelectedViewDesc = void 0, this.input = new yh(), this.prevDirectPlugins = [], this.pluginViews = [], this.requiresGeckoHackNode = !1, this.dragging = null, this._props = t, this.state = t.state, this.directPlugins = t.plugins || [], this.directPlugins.forEach(Mo), this.dispatch = this.dispatch.bind(this), this.dom = e && e.mount || document.createElement("div"), e && (e.appendChild ? e.appendChild(this.dom) : typeof e == "function" ? e(this.dom) : e.mount && (this.mounted = !0)), this.editable = Eo(this), Co(this), this.nodeViews = To(this), this.docView = no(this.state.doc, xo(this), ri(this), this.dom, this), this.domObserver = new Vh(this, (r, i, s, o) => Uh(this, r, i, s, o)), this.domObserver.start(), bh(this), this.updatePluginViews();
10133
10151
  }
10134
10152
  /**
10135
10153
  Holds `true` when a
@@ -10188,22 +10206,22 @@ class Yh {
10188
10206
  let o = r.plugins != e.plugins || this._props.plugins != t.plugins;
10189
10207
  if (o || this._props.plugins != t.plugins || this._props.nodeViews != t.nodeViews) {
10190
10208
  let h = To(this);
10191
- Qh(h, this.nodeViews) && (this.nodeViews = h, i = !0);
10209
+ Zh(h, this.nodeViews) && (this.nodeViews = h, i = !0);
10192
10210
  }
10193
10211
  (o || t.handleDOMEvents != this._props.handleDOMEvents) && Ii(this), this.editable = Eo(this), Co(this);
10194
10212
  let l = ri(this), a = xo(this), c = r.plugins != e.plugins && !r.doc.eq(e.doc) ? "reset" : e.scrollToSelection > r.scrollToSelection ? "to selection" : "preserve", d = i || !this.docView.matchesNode(e.doc, a, l);
10195
10213
  (d || !e.selection.eq(r.selection)) && (s = !0);
10196
- let u = c == "preserve" && s && this.dom.style.overflowAnchor == null && Du(this);
10214
+ let u = c == "preserve" && s && this.dom.style.overflowAnchor == null && Iu(this);
10197
10215
  if (s) {
10198
10216
  this.domObserver.stop();
10199
- let h = d && (he || te) && !this.composing && !r.selection.empty && !e.selection.empty && Xh(r.selection, e.selection);
10217
+ let h = d && (he || te) && !this.composing && !r.selection.empty && !e.selection.empty && Qh(r.selection, e.selection);
10200
10218
  if (d) {
10201
10219
  let f = te ? this.trackWrites = this.domSelectionRange().focusNode : null;
10202
10220
  (i || !this.docView.update(e.doc, a, l, this)) && (this.docView.updateOuterDeco([]), this.docView.destroy(), this.docView = no(e.doc, a, l, this.dom, this)), f && !this.trackWrites && (h = !0);
10203
10221
  }
10204
- h || !(this.input.mouseDown && this.domObserver.currentSelection.eq(this.domSelectionRange()) && nh(this)) ? Fe(this, h) : (ea(this, e.selection), this.domObserver.setCurSelection()), this.domObserver.start();
10222
+ h || !(this.input.mouseDown && this.domObserver.currentSelection.eq(this.domSelectionRange()) && rh(this)) ? Fe(this, h) : (ea(this, e.selection), this.domObserver.setCurSelection()), this.domObserver.start();
10205
10223
  }
10206
- this.updatePluginViews(r), c == "reset" ? this.dom.scrollTop = 0 : c == "to selection" ? this.scrollToSelection() : u && Iu(u);
10224
+ this.updatePluginViews(r), c == "reset" ? this.dom.scrollTop = 0 : c == "to selection" ? this.scrollToSelection() : u && Ru(u);
10207
10225
  }
10208
10226
  /**
10209
10227
  @internal
@@ -10279,7 +10297,7 @@ class Yh {
10279
10297
  Focus the editor.
10280
10298
  */
10281
10299
  focus() {
10282
- this.domObserver.stop(), this.editable && Ru(this.dom), Fe(this), this.domObserver.start();
10300
+ this.domObserver.stop(), this.editable && Pu(this.dom), Fe(this), this.domObserver.start();
10283
10301
  }
10284
10302
  /**
10285
10303
  Get the document root in which the editor exists. This will
@@ -10313,7 +10331,7 @@ class Yh {
10313
10331
  the top level, not in any node.
10314
10332
  */
10315
10333
  posAtCoords(e) {
10316
- return Fu(this, e);
10334
+ return zu(this, e);
10317
10335
  }
10318
10336
  /**
10319
10337
  Returns the viewport rectangle at a given document position.
@@ -10378,7 +10396,7 @@ class Yh {
10378
10396
  pass a different state.
10379
10397
  */
10380
10398
  endOfTextblock(e, t) {
10381
- return ju(this, t || this.state, e);
10399
+ return qu(this, t || this.state, e);
10382
10400
  }
10383
10401
  /**
10384
10402
  Run the editor's paste logic with the given HTML string. The
@@ -10399,7 +10417,7 @@ class Yh {
10399
10417
  views](https://prosemirror.net/docs/ref/#view.NodeView).
10400
10418
  */
10401
10419
  destroy() {
10402
- this.docView && (bh(this), this.destroyPluginViews(), this.mounted ? (this.docView.update(this.state.doc, [], ri(this), this), this.dom.textContent = "") : this.dom.parentNode && this.dom.parentNode.removeChild(this.dom), this.docView.destroy(), this.docView = null);
10420
+ this.docView && (kh(this), this.destroyPluginViews(), this.mounted ? (this.docView.update(this.state.doc, [], ri(this), this), this.dom.textContent = "") : this.dom.parentNode && this.dom.parentNode.removeChild(this.dom), this.docView.destroy(), this.docView = null);
10403
10421
  }
10404
10422
  /**
10405
10423
  This is true when the view has been
@@ -10413,7 +10431,7 @@ class Yh {
10413
10431
  Used for testing.
10414
10432
  */
10415
10433
  dispatchEvent(e) {
10416
- return Sh(this, e);
10434
+ return xh(this, e);
10417
10435
  }
10418
10436
  /**
10419
10437
  Dispatch a transaction. Will call
@@ -10432,7 +10450,7 @@ class Yh {
10432
10450
  @internal
10433
10451
  */
10434
10452
  domSelectionRange() {
10435
- return le && this.root.nodeType === 11 && Tu(this.dom.ownerDocument) == this.dom ? $h(this) : this.domSelection();
10453
+ return le && this.root.nodeType === 11 && Mu(this.dom.ownerDocument) == this.dom ? jh(this) : this.domSelection();
10436
10454
  }
10437
10455
  /**
10438
10456
  @internal
@@ -10459,7 +10477,7 @@ function Co(n) {
10459
10477
  function Eo(n) {
10460
10478
  return !n.someProp("editable", (e) => e(n.state) === !1);
10461
10479
  }
10462
- function Xh(n, e) {
10480
+ function Qh(n, e) {
10463
10481
  let t = Math.min(n.$anchor.sharedDepth(n.head), e.$anchor.sharedDepth(e.head));
10464
10482
  return n.$anchor.start(t) != e.$anchor.start(t);
10465
10483
  }
@@ -10471,7 +10489,7 @@ function To(n) {
10471
10489
  }
10472
10490
  return n.someProp("nodeViews", t), n.someProp("markViews", t), e;
10473
10491
  }
10474
- function Qh(n, e) {
10492
+ function Zh(n, e) {
10475
10493
  let t = 0, r = 0;
10476
10494
  for (let i in n) {
10477
10495
  if (n[i] != e[i])
@@ -10564,7 +10582,7 @@ var tt = {
10564
10582
  220: "|",
10565
10583
  221: "}",
10566
10584
  222: '"'
10567
- }, Zh = typeof navigator < "u" && /Mac/.test(navigator.platform), ef = typeof navigator < "u" && /MSIE \d|Trident\/(?:[7-9]|\d{2,})\..*rv:(\d+)/.exec(navigator.userAgent);
10585
+ }, ef = typeof navigator < "u" && /Mac/.test(navigator.platform), tf = typeof navigator < "u" && /MSIE \d|Trident\/(?:[7-9]|\d{2,})\..*rv:(\d+)/.exec(navigator.userAgent);
10568
10586
  for (var Y = 0; Y < 10; Y++)
10569
10587
  tt[48 + Y] = tt[96 + Y] = String(Y);
10570
10588
  for (var Y = 1; Y <= 24; Y++)
@@ -10573,12 +10591,12 @@ for (var Y = 65; Y <= 90; Y++)
10573
10591
  tt[Y] = String.fromCharCode(Y + 32), qn[Y] = String.fromCharCode(Y);
10574
10592
  for (var si in tt)
10575
10593
  qn.hasOwnProperty(si) || (qn[si] = tt[si]);
10576
- function tf(n) {
10577
- var e = Zh && n.metaKey && n.shiftKey && !n.ctrlKey && !n.altKey || ef && n.shiftKey && n.key && n.key.length == 1 || n.key == "Unidentified", t = !e && n.key || (n.shiftKey ? qn : tt)[n.keyCode] || n.key || "Unidentified";
10594
+ function nf(n) {
10595
+ var e = ef && n.metaKey && n.shiftKey && !n.ctrlKey && !n.altKey || tf && n.shiftKey && n.key && n.key.length == 1 || n.key == "Unidentified", t = !e && n.key || (n.shiftKey ? qn : tt)[n.keyCode] || n.key || "Unidentified";
10578
10596
  return t == "Esc" && (t = "Escape"), t == "Del" && (t = "Delete"), t == "Left" && (t = "ArrowLeft"), t == "Up" && (t = "ArrowUp"), t == "Right" && (t = "ArrowRight"), t == "Down" && (t = "ArrowDown"), t;
10579
10597
  }
10580
- const nf = typeof navigator < "u" ? /Mac|iP(hone|[oa]d)/.test(navigator.platform) : !1;
10581
- function rf(n) {
10598
+ const rf = typeof navigator < "u" ? /Mac|iP(hone|[oa]d)/.test(navigator.platform) : !1;
10599
+ function sf(n) {
10582
10600
  let e = n.split(/-(?!$)/), t = e[e.length - 1];
10583
10601
  t == "Space" && (t = " ");
10584
10602
  let r, i, s, o;
@@ -10593,28 +10611,28 @@ function rf(n) {
10593
10611
  else if (/^s(hift)?$/i.test(a))
10594
10612
  s = !0;
10595
10613
  else if (/^mod$/i.test(a))
10596
- nf ? o = !0 : i = !0;
10614
+ rf ? o = !0 : i = !0;
10597
10615
  else
10598
10616
  throw new Error("Unrecognized modifier name: " + a);
10599
10617
  }
10600
10618
  return r && (t = "Alt-" + t), i && (t = "Ctrl-" + t), o && (t = "Meta-" + t), s && (t = "Shift-" + t), t;
10601
10619
  }
10602
- function sf(n) {
10620
+ function of(n) {
10603
10621
  let e = /* @__PURE__ */ Object.create(null);
10604
10622
  for (let t in n)
10605
- e[rf(t)] = n[t];
10623
+ e[sf(t)] = n[t];
10606
10624
  return e;
10607
10625
  }
10608
10626
  function oi(n, e, t = !0) {
10609
10627
  return e.altKey && (n = "Alt-" + n), e.ctrlKey && (n = "Ctrl-" + n), e.metaKey && (n = "Meta-" + n), t && e.shiftKey && (n = "Shift-" + n), n;
10610
10628
  }
10611
- function of(n) {
10612
- return new Q({ props: { handleKeyDown: lf(n) } });
10613
- }
10614
10629
  function lf(n) {
10615
- let e = sf(n);
10630
+ return new Q({ props: { handleKeyDown: af(n) } });
10631
+ }
10632
+ function af(n) {
10633
+ let e = of(n);
10616
10634
  return function(t, r) {
10617
- let i = tf(r), s, o = e[oi(i, r)];
10635
+ let i = nf(r), s, o = e[oi(i, r)];
10618
10636
  if (o && o(t.state, t.dispatch, t))
10619
10637
  return !0;
10620
10638
  if (i.length == 1 && i != " ") {
@@ -10632,13 +10650,13 @@ function lf(n) {
10632
10650
  return !1;
10633
10651
  };
10634
10652
  }
10635
- const af = (n, e) => n.selection.empty ? !1 : (e && e(n.tr.deleteSelection().scrollIntoView()), !0);
10636
- function cf(n, e) {
10653
+ const cf = (n, e) => n.selection.empty ? !1 : (e && e(n.tr.deleteSelection().scrollIntoView()), !0);
10654
+ function df(n, e) {
10637
10655
  let { $cursor: t } = n.selection;
10638
10656
  return !t || (e ? !e.endOfTextblock("backward", n) : t.parentOffset > 0) ? null : t;
10639
10657
  }
10640
- const df = (n, e, t) => {
10641
- let r = cf(n, t);
10658
+ const uf = (n, e, t) => {
10659
+ let r = df(n, t);
10642
10660
  if (!r)
10643
10661
  return !1;
10644
10662
  let i = ka(r);
@@ -10670,7 +10688,7 @@ function zt(n, e, t = !1) {
10670
10688
  }
10671
10689
  return !1;
10672
10690
  }
10673
- const uf = (n, e, t) => {
10691
+ const hf = (n, e, t) => {
10674
10692
  let { $head: r, empty: i } = n.selection, s = r;
10675
10693
  if (!i)
10676
10694
  return !1;
@@ -10692,12 +10710,12 @@ function ka(n) {
10692
10710
  }
10693
10711
  return null;
10694
10712
  }
10695
- function hf(n, e) {
10713
+ function ff(n, e) {
10696
10714
  let { $cursor: t } = n.selection;
10697
10715
  return !t || (e ? !e.endOfTextblock("forward", n) : t.parentOffset < t.parent.content.size) ? null : t;
10698
10716
  }
10699
- const ff = (n, e, t) => {
10700
- let r = hf(n, t);
10717
+ const pf = (n, e, t) => {
10718
+ let r = ff(n, t);
10701
10719
  if (!r)
10702
10720
  return !1;
10703
10721
  let i = Sa(r);
@@ -10717,7 +10735,7 @@ const ff = (n, e, t) => {
10717
10735
  }
10718
10736
  }
10719
10737
  return s.isAtom && i.depth == r.depth - 1 ? (e && e(n.tr.delete(i.pos, i.pos + s.nodeSize).scrollIntoView()), !0) : !1;
10720
- }, pf = (n, e, t) => {
10738
+ }, mf = (n, e, t) => {
10721
10739
  let { $head: r, empty: i } = n.selection, s = r;
10722
10740
  if (!i)
10723
10741
  return !1;
@@ -10740,7 +10758,7 @@ function Sa(n) {
10740
10758
  }
10741
10759
  return null;
10742
10760
  }
10743
- const mf = (n, e) => {
10761
+ const gf = (n, e) => {
10744
10762
  let t = n.selection, r = t instanceof w, i;
10745
10763
  if (r) {
10746
10764
  if (t.node.isTextblock || !rt(n.doc, t.from))
@@ -10753,7 +10771,7 @@ const mf = (n, e) => {
10753
10771
  r && s.setSelection(w.create(s.doc, i - n.doc.resolve(i).nodeBefore.nodeSize)), e(s.scrollIntoView());
10754
10772
  }
10755
10773
  return !0;
10756
- }, gf = (n, e) => {
10774
+ }, yf = (n, e) => {
10757
10775
  let t = n.selection, r;
10758
10776
  if (t instanceof w) {
10759
10777
  if (t.node.isTextblock || !rt(n.doc, t.to))
@@ -10762,10 +10780,10 @@ const mf = (n, e) => {
10762
10780
  } else if (r = Rl(n.doc, t.to, 1), r == null)
10763
10781
  return !1;
10764
10782
  return e && e(n.tr.join(r).scrollIntoView()), !0;
10765
- }, yf = (n, e) => {
10783
+ }, bf = (n, e) => {
10766
10784
  let { $from: t, $to: r } = n.selection, i = t.blockRange(r), s = i && jt(i);
10767
10785
  return s == null ? !1 : (e && e(n.tr.lift(i, s).scrollIntoView()), !0);
10768
- }, bf = (n, e) => {
10786
+ }, kf = (n, e) => {
10769
10787
  let { $head: t, $anchor: r } = n.selection;
10770
10788
  return !t.parent.type.spec.code || !t.sameParent(r) ? !1 : (e && e(n.tr.insertText(`
10771
10789
  `).scrollIntoView()), !0);
@@ -10778,7 +10796,7 @@ function xa(n) {
10778
10796
  }
10779
10797
  return null;
10780
10798
  }
10781
- const kf = (n, e) => {
10799
+ const Sf = (n, e) => {
10782
10800
  let { $head: t, $anchor: r } = n.selection;
10783
10801
  if (!t.parent.type.spec.code || !t.sameParent(r))
10784
10802
  return !1;
@@ -10790,7 +10808,7 @@ const kf = (n, e) => {
10790
10808
  a.setSelection(N.near(a.doc.resolve(l), 1)), e(a.scrollIntoView());
10791
10809
  }
10792
10810
  return !0;
10793
- }, Sf = (n, e) => {
10811
+ }, xf = (n, e) => {
10794
10812
  let t = n.selection, { $from: r, $to: i } = t;
10795
10813
  if (t instanceof Te || r.parent.inlineContent || i.parent.inlineContent)
10796
10814
  return !1;
@@ -10802,7 +10820,7 @@ const kf = (n, e) => {
10802
10820
  l.setSelection(D.create(l.doc, o + 1)), e(l.scrollIntoView());
10803
10821
  }
10804
10822
  return !0;
10805
- }, xf = (n, e) => {
10823
+ }, Cf = (n, e) => {
10806
10824
  let { $cursor: t } = n.selection;
10807
10825
  if (!t || t.parent.content.size)
10808
10826
  return !1;
@@ -10813,11 +10831,11 @@ const kf = (n, e) => {
10813
10831
  }
10814
10832
  let r = t.blockRange(), i = r && jt(r);
10815
10833
  return i == null ? !1 : (e && e(n.tr.lift(r, i).scrollIntoView()), !0);
10816
- }, Cf = (n, e) => {
10834
+ }, Ef = (n, e) => {
10817
10835
  let { $from: t, to: r } = n.selection, i, s = t.sharedDepth(r);
10818
10836
  return s == 0 ? !1 : (i = t.before(s), e && e(n.tr.setSelection(w.create(n.doc, i))), !0);
10819
10837
  };
10820
- function Ef(n, e, t) {
10838
+ function Tf(n, e, t) {
10821
10839
  let r = e.nodeBefore, i = e.nodeAfter, s = e.index();
10822
10840
  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 || rt(n.doc, e.pos)) ? !1 : (t && t(n.tr.clearIncompatible(e.pos, r.type, r.contentMatchAt(r.childCount)).join(e.pos).scrollIntoView()), !0);
10823
10841
  }
@@ -10825,7 +10843,7 @@ function Ca(n, e, t) {
10825
10843
  let r = e.nodeBefore, i = e.nodeAfter, s, o;
10826
10844
  if (r.type.spec.isolating || i.type.spec.isolating)
10827
10845
  return !1;
10828
- if (Ef(n, e, t))
10846
+ if (Tf(n, e, t))
10829
10847
  return !0;
10830
10848
  let l = e.parent.canReplace(e.index(), e.index() + 1);
10831
10849
  if (l && (s = (o = r.contentMatchAt(r.childCount)).findWrapping(i.type)) && o.matchType(s[0] || i.type).validEnd) {
@@ -10873,8 +10891,8 @@ function Ea(n) {
10873
10891
  return i.node(s).isTextblock ? (t && t(e.tr.setSelection(D.create(e.doc, n < 0 ? i.start(s) : i.end(s)))), !0) : !1;
10874
10892
  };
10875
10893
  }
10876
- const Tf = Ea(-1), Mf = Ea(1);
10877
- function wf(n, e = null) {
10894
+ const Mf = Ea(-1), wf = Ea(1);
10895
+ function Of(n, e = null) {
10878
10896
  return function(t, r) {
10879
10897
  let { $from: i, $to: s } = t.selection, o = i.blockRange(s), l = o && Yi(o, n, e);
10880
10898
  return l ? (r && r(t.tr.wrap(o, l).scrollIntoView()), !0) : !1;
@@ -10911,7 +10929,7 @@ function wo(n, e = null) {
10911
10929
  };
10912
10930
  }
10913
10931
  typeof navigator < "u" ? /Mac|iP(hone|[oa]d)/.test(navigator.platform) : typeof os < "u" && os.platform && os.platform() == "darwin";
10914
- function Of(n, e = null) {
10932
+ function vf(n, e = null) {
10915
10933
  return function(t, r) {
10916
10934
  let { $from: i, $to: s } = t.selection, o = i.blockRange(s), l = !1, a = o;
10917
10935
  if (!o)
@@ -10923,10 +10941,10 @@ function Of(n, e = null) {
10923
10941
  a = new Bn(d, d, o.depth), o.endIndex < o.parent.childCount && (o = new Bn(i, t.doc.resolve(s.end(o.depth)), o.depth)), l = !0;
10924
10942
  }
10925
10943
  let c = Yi(a, n, e, o);
10926
- return c ? (r && r(vf(t.tr, o, c, l, n).scrollIntoView()), !0) : !1;
10944
+ return c ? (r && r(Af(t.tr, o, c, l, n).scrollIntoView()), !0) : !1;
10927
10945
  };
10928
10946
  }
10929
- function vf(n, e, t, r, i) {
10947
+ function Af(n, e, t, r, i) {
10930
10948
  let s = b.empty;
10931
10949
  for (let d = t.length - 1; d >= 0; d--)
10932
10950
  s = b.from(t[d].type.create(t[d].attrs, s));
@@ -10939,13 +10957,13 @@ function vf(n, e, t, r, i) {
10939
10957
  !h && Rt(n.doc, a, l) && (n.split(a, l), a += 2 * l), a += c.child(d).nodeSize;
10940
10958
  return n;
10941
10959
  }
10942
- function Af(n) {
10960
+ function Nf(n) {
10943
10961
  return function(e, t) {
10944
10962
  let { $from: r, $to: i } = e.selection, s = r.blockRange(i, (o) => o.childCount > 0 && o.firstChild.type == n);
10945
- return s ? t ? r.node(s.depth - 1).type == n ? Nf(e, t, n, s) : Df(e, t, s) : !0 : !1;
10963
+ return s ? t ? r.node(s.depth - 1).type == n ? Df(e, t, n, s) : If(e, t, s) : !0 : !1;
10946
10964
  };
10947
10965
  }
10948
- function Nf(n, e, t, r) {
10966
+ function Df(n, e, t, r) {
10949
10967
  let i = n.tr, s = r.end, o = r.$to.end(r.depth);
10950
10968
  s < o && (i.step(new K(s - 1, o, s, o, new S(b.from(t.create(null, r.parent.copy())), 1, 0), 1, !0)), r = new Bn(i.doc.resolve(r.$from.pos), i.doc.resolve(o), r.depth));
10951
10969
  const l = jt(r);
@@ -10955,7 +10973,7 @@ function Nf(n, e, t, r) {
10955
10973
  let a = i.mapping.map(s, -1) - 1;
10956
10974
  return rt(i.doc, a) && i.join(a), e(i.scrollIntoView()), !0;
10957
10975
  }
10958
- function Df(n, e, t) {
10976
+ function If(n, e, t) {
10959
10977
  let r = n.tr, i = t.parent;
10960
10978
  for (let f = t.end, p = t.endIndex - 1, m = t.startIndex; p > m; p--)
10961
10979
  f -= i.child(p).nodeSize, r.delete(f - 1, f + 1);
@@ -10968,7 +10986,7 @@ function Df(n, e, t) {
10968
10986
  let u = s.pos, h = u + o.nodeSize;
10969
10987
  return r.step(new K(u - (l ? 1 : 0), h + (a ? 1 : 0), u + 1, h - 1, new S((l ? b.empty : b.from(i.copy(b.empty))).append(a ? b.empty : b.from(i.copy(b.empty))), l ? 0 : 1, a ? 0 : 1), l ? 0 : 1)), e(r.scrollIntoView()), !0;
10970
10988
  }
10971
- function If(n) {
10989
+ function Rf(n) {
10972
10990
  return function(e, t) {
10973
10991
  let { $from: r, $to: i } = e.selection, s = r.blockRange(i, (c) => c.childCount > 0 && c.firstChild.type == n);
10974
10992
  if (!s)
@@ -11074,7 +11092,7 @@ class Rr {
11074
11092
  return l;
11075
11093
  }
11076
11094
  }
11077
- class Rf {
11095
+ class Pf {
11078
11096
  constructor() {
11079
11097
  this.callbacks = {};
11080
11098
  }
@@ -11191,10 +11209,10 @@ function Ma(n) {
11191
11209
  function A(n, e = void 0, ...t) {
11192
11210
  return Ma(n) ? e ? n.bind(e)(...t) : n(...t) : n;
11193
11211
  }
11194
- function Pf(n = {}) {
11212
+ function Lf(n = {}) {
11195
11213
  return Object.keys(n).length === 0 && n.constructor === Object;
11196
11214
  }
11197
- function Lf(n) {
11215
+ function Bf(n) {
11198
11216
  return typeof n != "string" ? n : n.match(/^[+-]?(?:\d*\.)?\d+$/) ? Number(n) : n === "true" ? !0 : n === "false" ? !1 : n;
11199
11217
  }
11200
11218
  function Oo(n, e) {
@@ -11205,7 +11223,7 @@ function Oo(n, e) {
11205
11223
  if (r === !1)
11206
11224
  return !1;
11207
11225
  const i = e.reduce((s, o) => {
11208
- const l = o.attribute.parseHTML ? o.attribute.parseHTML(t) : Lf(t.getAttribute(o.name));
11226
+ const l = o.attribute.parseHTML ? o.attribute.parseHTML(t) : Bf(t.getAttribute(o.name));
11209
11227
  return l == null ? s : {
11210
11228
  ...s,
11211
11229
  [o.name]: l
@@ -11218,10 +11236,10 @@ function Oo(n, e) {
11218
11236
  function vo(n) {
11219
11237
  return Object.fromEntries(
11220
11238
  // @ts-ignore
11221
- Object.entries(n).filter(([e, t]) => e === "attrs" && Pf(t) ? !1 : t != null)
11239
+ Object.entries(n).filter(([e, t]) => e === "attrs" && Lf(t) ? !1 : t != null)
11222
11240
  );
11223
11241
  }
11224
- function Bf(n, e) {
11242
+ function _f(n, e) {
11225
11243
  var t;
11226
11244
  const r = Ta(n), { nodeExtensions: i, markExtensions: s } = Pr(n), o = (t = i.find((c) => C(c, "topNode"))) === null || t === void 0 ? void 0 : t.name, l = Object.fromEntries(i.map((c) => {
11227
11245
  const d = r.filter((y) => y.type === c.name), u = {
@@ -11291,7 +11309,7 @@ function Bf(n, e) {
11291
11309
  HTMLAttributes: Ri(g, d)
11292
11310
  })), [c.name, f];
11293
11311
  }));
11294
- return new $d({
11312
+ return new jd({
11295
11313
  topNode: o,
11296
11314
  nodes: l,
11297
11315
  marks: a
@@ -11303,7 +11321,7 @@ function li(n, e) {
11303
11321
  function Ao(n, e) {
11304
11322
  return Array.isArray(e) ? e.some((t) => (typeof t == "string" ? t : t.name) === n.name) : e;
11305
11323
  }
11306
- const _f = (n, e = 500) => {
11324
+ const Ff = (n, e = 500) => {
11307
11325
  let t = "";
11308
11326
  const r = n.parentOffset;
11309
11327
  return n.parent.nodesBetween(Math.max(0, r - e), r, (i, s, o, l) => {
@@ -11325,7 +11343,7 @@ class Lr {
11325
11343
  this.find = e.find, this.handler = e.handler;
11326
11344
  }
11327
11345
  }
11328
- const Ff = (n, e) => {
11346
+ const zf = (n, e) => {
11329
11347
  if (cs(e))
11330
11348
  return e.exec(n);
11331
11349
  const t = e(n);
@@ -11346,11 +11364,11 @@ function ai(n) {
11346
11364
  )
11347
11365
  return !1;
11348
11366
  let d = !1;
11349
- const u = _f(c) + s;
11367
+ const u = Ff(c) + s;
11350
11368
  return o.forEach((h) => {
11351
11369
  if (d)
11352
11370
  return;
11353
- const f = Ff(u, h.find);
11371
+ const f = zf(u, h.find);
11354
11372
  if (!f)
11355
11373
  return;
11356
11374
  const p = a.state.tr, m = Ir({
@@ -11378,7 +11396,7 @@ function ai(n) {
11378
11396
  }), a.dispatch(p), d = !0);
11379
11397
  }), d;
11380
11398
  }
11381
- function zf(n) {
11399
+ function Hf(n) {
11382
11400
  const { editor: e, rules: t } = n, r = new Q({
11383
11401
  state: {
11384
11402
  init() {
@@ -11435,7 +11453,7 @@ function zf(n) {
11435
11453
  });
11436
11454
  return r;
11437
11455
  }
11438
- function Hf(n) {
11456
+ function Vf(n) {
11439
11457
  return typeof n == "number";
11440
11458
  }
11441
11459
  class wa {
@@ -11443,7 +11461,7 @@ class wa {
11443
11461
  this.find = e.find, this.handler = e.handler;
11444
11462
  }
11445
11463
  }
11446
- const Vf = (n, e) => {
11464
+ const $f = (n, e) => {
11447
11465
  if (cs(e))
11448
11466
  return [...n.matchAll(e)];
11449
11467
  const t = e(n);
@@ -11452,7 +11470,7 @@ const Vf = (n, e) => {
11452
11470
  return i.index = r.index, i.input = n, i.data = r.data, r.replaceWith && (r.text.includes(r.replaceWith) || console.warn('[tiptap warn]: "pasteRuleMatch.replaceWith" must be part of "pasteRuleMatch.text".'), i.push(r.replaceWith)), i;
11453
11471
  }) : [];
11454
11472
  };
11455
- function $f(n) {
11473
+ function jf(n) {
11456
11474
  const { editor: e, state: t, from: r, to: i, rule: s } = n, { commands: o, chain: l, can: a } = new Rr({
11457
11475
  editor: e,
11458
11476
  state: t
@@ -11461,7 +11479,7 @@ function $f(n) {
11461
11479
  if (!u.isTextblock || u.type.spec.code)
11462
11480
  return;
11463
11481
  const f = Math.max(r, h), p = Math.min(i, h + u.content.size), m = u.textBetween(f - h, p - h, void 0, "");
11464
- Vf(m, s.find).forEach((y) => {
11482
+ $f(m, s.find).forEach((y) => {
11465
11483
  if (y.index === void 0)
11466
11484
  return;
11467
11485
  const x = f + y.index + 1, T = x + y[0].length, R = {
@@ -11479,7 +11497,7 @@ function $f(n) {
11479
11497
  });
11480
11498
  }), c.every((u) => u !== null);
11481
11499
  }
11482
- function jf(n) {
11500
+ function qf(n) {
11483
11501
  const { editor: e, rules: t } = n;
11484
11502
  let r = null, i = !1, s = !1;
11485
11503
  return t.map((l) => new Q({
@@ -11510,13 +11528,13 @@ function jf(n) {
11510
11528
  if (!h && !f)
11511
11529
  return;
11512
11530
  const p = c.doc.content.findDiffStart(d.doc.content), m = c.doc.content.findDiffEnd(d.doc.content);
11513
- if (!Hf(p) || !m || p === m.b)
11531
+ if (!Vf(p) || !m || p === m.b)
11514
11532
  return;
11515
11533
  const g = d.tr, y = Ir({
11516
11534
  state: d,
11517
11535
  transaction: g
11518
11536
  });
11519
- if (!(!$f({
11537
+ if (!(!jf({
11520
11538
  editor: e,
11521
11539
  state: y,
11522
11540
  from: Math.max(p - 1, 0),
@@ -11527,13 +11545,13 @@ function jf(n) {
11527
11545
  }
11528
11546
  }));
11529
11547
  }
11530
- function qf(n) {
11548
+ function Kf(n) {
11531
11549
  const e = n.filter((t, r) => n.indexOf(t) !== r);
11532
11550
  return [...new Set(e)];
11533
11551
  }
11534
11552
  class It {
11535
11553
  constructor(e, t) {
11536
- this.splittableMarks = [], this.editor = t, this.extensions = It.resolve(e), this.schema = Bf(this.extensions, t), this.extensions.forEach((r) => {
11554
+ this.splittableMarks = [], this.editor = t, this.extensions = It.resolve(e), this.schema = _f(this.extensions, t), this.extensions.forEach((r) => {
11537
11555
  var i;
11538
11556
  this.editor.extensionStorage[r.name] = r.storage;
11539
11557
  const s = {
@@ -11563,7 +11581,7 @@ class It {
11563
11581
  });
11564
11582
  }
11565
11583
  static resolve(e) {
11566
- const t = It.sort(It.flatten(e)), r = qf(t.map((i) => i.name));
11584
+ const t = It.sort(It.flatten(e)), r = Kf(t.map((i) => i.name));
11567
11585
  return r.length && console.warn(`[tiptap warn]: Duplicate extension names found: [${r.map((i) => `'${i}'`).join(", ")}]. This can lead to issues.`), t;
11568
11586
  }
11569
11587
  static flatten(e) {
@@ -11611,7 +11629,7 @@ class It {
11611
11629
  const m = Object.fromEntries(Object.entries(c()).map(([g, y]) => [g, () => y({ editor: e })]));
11612
11630
  d = { ...d, ...m };
11613
11631
  }
11614
- const u = of(d);
11632
+ const u = lf(d);
11615
11633
  a.push(u);
11616
11634
  const h = C(o, "addInputRules", l);
11617
11635
  Ao(o, e.options.enableInputRules) && h && r.push(...h());
@@ -11625,11 +11643,11 @@ class It {
11625
11643
  return a;
11626
11644
  }).flat();
11627
11645
  return [
11628
- zf({
11646
+ Hf({
11629
11647
  editor: e,
11630
11648
  rules: r
11631
11649
  }),
11632
- ...jf({
11650
+ ...qf({
11633
11651
  editor: e,
11634
11652
  rules: i
11635
11653
  }),
@@ -11666,11 +11684,11 @@ class It {
11666
11684
  }));
11667
11685
  }
11668
11686
  }
11669
- function Kf(n) {
11687
+ function Wf(n) {
11670
11688
  return Object.prototype.toString.call(n).slice(8, -1);
11671
11689
  }
11672
11690
  function ci(n) {
11673
- return Kf(n) !== "Object" ? !1 : n.constructor === Object && Object.getPrototypeOf(n) === Object.prototype;
11691
+ return Wf(n) !== "Object" ? !1 : n.constructor === Object && Object.getPrototypeOf(n) === Object.prototype;
11674
11692
  }
11675
11693
  function Br(n, e) {
11676
11694
  const t = { ...n };
@@ -11733,7 +11751,7 @@ function Oa(n, e, t) {
11733
11751
  function va(n) {
11734
11752
  return Object.fromEntries(Object.entries(n.nodes).filter(([, e]) => e.spec.toText).map(([e, t]) => [e, t.spec.toText]));
11735
11753
  }
11736
- const Wf = ge.create({
11754
+ const Uf = ge.create({
11737
11755
  name: "clipboardTextSerializer",
11738
11756
  addProseMirrorPlugins() {
11739
11757
  return [
@@ -11750,10 +11768,10 @@ const Wf = ge.create({
11750
11768
  })
11751
11769
  ];
11752
11770
  }
11753
- }), Uf = () => ({ editor: n, view: e }) => (requestAnimationFrame(() => {
11771
+ }), Jf = () => ({ editor: n, view: e }) => (requestAnimationFrame(() => {
11754
11772
  var t;
11755
11773
  n.isDestroyed || (e.dom.blur(), (t = window == null ? void 0 : window.getSelection()) === null || t === void 0 || t.removeAllRanges());
11756
- }), !0), Jf = (n = !1) => ({ commands: e }) => e.setContent("", n), Gf = () => ({ state: n, tr: e, dispatch: t }) => {
11774
+ }), !0), Gf = (n = !1) => ({ commands: e }) => e.setContent("", n), Yf = () => ({ state: n, tr: e, dispatch: t }) => {
11757
11775
  const { selection: r } = e, { ranges: i } = r;
11758
11776
  return t && i.forEach(({ $from: s, $to: o }) => {
11759
11777
  n.doc.nodesBetween(s.pos, o.pos, (l, a) => {
@@ -11770,7 +11788,7 @@ const Wf = ge.create({
11770
11788
  (p || p === 0) && e.lift(f, p);
11771
11789
  });
11772
11790
  }), !0;
11773
- }, Yf = (n) => (e) => n(e), Xf = () => ({ state: n, dispatch: e }) => Sf(n, e), Qf = () => ({ tr: n, dispatch: e }) => {
11791
+ }, Xf = (n) => (e) => n(e), Qf = () => ({ state: n, dispatch: e }) => xf(n, e), Zf = () => ({ tr: n, dispatch: e }) => {
11774
11792
  const { selection: t } = n, r = t.$anchor.node();
11775
11793
  if (r.content.size > 0)
11776
11794
  return !1;
@@ -11784,7 +11802,7 @@ const Wf = ge.create({
11784
11802
  return !0;
11785
11803
  }
11786
11804
  return !1;
11787
- }, Zf = (n) => ({ tr: e, state: t, dispatch: r }) => {
11805
+ }, ep = (n) => ({ tr: e, state: t, dispatch: r }) => {
11788
11806
  const i = W(n, t.schema), s = e.selection.$anchor;
11789
11807
  for (let o = s.depth; o > 0; o -= 1)
11790
11808
  if (s.node(o).type === i) {
@@ -11795,10 +11813,10 @@ const Wf = ge.create({
11795
11813
  return !0;
11796
11814
  }
11797
11815
  return !1;
11798
- }, ep = (n) => ({ tr: e, dispatch: t }) => {
11816
+ }, tp = (n) => ({ tr: e, dispatch: t }) => {
11799
11817
  const { from: r, to: i } = n;
11800
11818
  return t && e.delete(r, i), !0;
11801
- }, tp = () => ({ state: n, dispatch: e }) => af(n, e), np = () => ({ commands: n }) => n.keyboardShortcut("Enter"), rp = () => ({ state: n, dispatch: e }) => kf(n, e);
11819
+ }, np = () => ({ state: n, dispatch: e }) => cf(n, e), rp = () => ({ commands: n }) => n.keyboardShortcut("Enter"), ip = () => ({ state: n, dispatch: e }) => Sf(n, e);
11802
11820
  function Kn(n, e, t = { strict: !0 }) {
11803
11821
  const r = Object.keys(e);
11804
11822
  return r.length ? r.every((i) => t.strict ? e[i] === n[i] : cs(e[i]) ? e[i].test(n[i]) : e[i] === n[i]) : !0;
@@ -11806,7 +11824,7 @@ function Kn(n, e, t = { strict: !0 }) {
11806
11824
  function Pi(n, e, t = {}) {
11807
11825
  return n.find((r) => r.type === e && Kn(r.attrs, t));
11808
11826
  }
11809
- function ip(n, e, t = {}) {
11827
+ function sp(n, e, t = {}) {
11810
11828
  return !!Pi(n, e, t);
11811
11829
  }
11812
11830
  function ds(n, e, t = {}) {
@@ -11821,7 +11839,7 @@ function ds(n, e, t = {}) {
11821
11839
  let s = r.index, o = n.start() + r.offset, l = s + 1, a = o + r.node.nodeSize;
11822
11840
  for (Pi([...r.node.marks], e, t); s > 0 && i.isInSet(n.parent.child(s - 1).marks); )
11823
11841
  s -= 1, o -= n.parent.child(s).nodeSize;
11824
- for (; l < n.parent.childCount && ip([...n.parent.child(l).marks], e, t); )
11842
+ for (; l < n.parent.childCount && sp([...n.parent.child(l).marks], e, t); )
11825
11843
  a += n.parent.child(l).nodeSize, l += 1;
11826
11844
  return {
11827
11845
  from: o,
@@ -11836,7 +11854,7 @@ function st(n, e) {
11836
11854
  }
11837
11855
  return n;
11838
11856
  }
11839
- const sp = (n, e = {}) => ({ tr: t, state: r, dispatch: i }) => {
11857
+ const op = (n, e = {}) => ({ tr: t, state: r, dispatch: i }) => {
11840
11858
  const s = st(n, r.schema), { doc: o, selection: l } = t, { $from: a, from: c, to: d } = l;
11841
11859
  if (i) {
11842
11860
  const u = ds(a, s, e);
@@ -11846,7 +11864,7 @@ const sp = (n, e = {}) => ({ tr: t, state: r, dispatch: i }) => {
11846
11864
  }
11847
11865
  }
11848
11866
  return !0;
11849
- }, op = (n) => (e) => {
11867
+ }, lp = (n) => (e) => {
11850
11868
  const t = typeof n == "function" ? n(e) : n;
11851
11869
  for (let r = 0; r < t.length; r += 1)
11852
11870
  if (t[r](e))
@@ -11880,7 +11898,7 @@ function _r() {
11880
11898
  "iPod"
11881
11899
  ].includes(navigator.platform) || navigator.userAgent.includes("Mac") && "ontouchend" in document;
11882
11900
  }
11883
- const lp = (n = null, e = {}) => ({ editor: t, view: r, tr: i, dispatch: s }) => {
11901
+ const ap = (n = null, e = {}) => ({ editor: t, view: r, tr: i, dispatch: s }) => {
11884
11902
  e = {
11885
11903
  scrollIntoView: !0,
11886
11904
  ...e
@@ -11896,7 +11914,7 @@ const lp = (n = null, e = {}) => ({ editor: t, view: r, tr: i, dispatch: s }) =>
11896
11914
  return o(), !0;
11897
11915
  const l = Aa(i.doc, n) || t.state.selection, a = t.state.selection.eq(l);
11898
11916
  return s && (a || i.setSelection(l), a && i.storedMarks && i.setStoredMarks(i.storedMarks), o()), !0;
11899
- }, ap = (n, e) => (t) => n.every((r, i) => e(r, { ...t, index: i })), cp = (n, e) => ({ tr: t, commands: r }) => r.insertContentAt({ from: t.selection.from, to: t.selection.to }, n, e);
11917
+ }, cp = (n, e) => (t) => n.every((r, i) => e(r, { ...t, index: i })), dp = (n, e) => ({ tr: t, commands: r }) => r.insertContentAt({ from: t.selection.from, to: t.selection.to }, n, e);
11900
11918
  function No(n) {
11901
11919
  const e = `<body>${n}</body>`;
11902
11920
  return new window.DOMParser().parseFromString(e, "text/html").body;
@@ -11918,7 +11936,7 @@ function Wn(n, e, t) {
11918
11936
  }
11919
11937
  return Wn("", e, t);
11920
11938
  }
11921
- function dp(n, e, t) {
11939
+ function up(n, e, t) {
11922
11940
  const r = n.steps.length - 1;
11923
11941
  if (r < e)
11924
11942
  return;
@@ -11931,7 +11949,7 @@ function dp(n, e, t) {
11931
11949
  o === 0 && (o = d);
11932
11950
  }), n.setSelection(N.near(n.doc.resolve(o), t));
11933
11951
  }
11934
- const up = (n) => n.toString().startsWith("<"), hp = (n, e, t) => ({ tr: r, dispatch: i, editor: s }) => {
11952
+ const hp = (n) => n.toString().startsWith("<"), fp = (n, e, t) => ({ tr: r, dispatch: i, editor: s }) => {
11935
11953
  if (i) {
11936
11954
  t = {
11937
11955
  parseOptions: {},
@@ -11947,20 +11965,20 @@ const up = (n) => n.toString().startsWith("<"), hp = (n, e, t) => ({ tr: r, disp
11947
11965
  if (o.toString() === "<>")
11948
11966
  return !0;
11949
11967
  let { from: l, to: a } = typeof n == "number" ? { from: n, to: n } : n, c = !0, d = !0;
11950
- if ((up(o) ? o : [o]).forEach((h) => {
11968
+ if ((hp(o) ? o : [o]).forEach((h) => {
11951
11969
  h.check(), c = c ? h.isText && h.marks.length === 0 : !1, d = d ? h.isBlock : !1;
11952
11970
  }), l === a && d) {
11953
11971
  const { parent: h } = r.doc.resolve(l);
11954
11972
  h.isTextblock && !h.type.spec.code && !h.childCount && (l -= 1, a += 1);
11955
11973
  }
11956
- c ? Array.isArray(e) ? r.insertText(e.map((h) => h.text || "").join(""), l, a) : typeof e == "object" && e && e.text ? r.insertText(e.text, l, a) : r.insertText(e, l, a) : r.replaceWith(l, a, o), t.updateSelection && dp(r, r.steps.length - 1, -1);
11974
+ c ? Array.isArray(e) ? r.insertText(e.map((h) => h.text || "").join(""), l, a) : typeof e == "object" && e && e.text ? r.insertText(e.text, l, a) : r.insertText(e, l, a) : r.replaceWith(l, a, o), t.updateSelection && up(r, r.steps.length - 1, -1);
11957
11975
  }
11958
11976
  return !0;
11959
- }, fp = () => ({ state: n, dispatch: e }) => mf(n, e), pp = () => ({ state: n, dispatch: e }) => gf(n, e), mp = () => ({ state: n, dispatch: e }) => df(n, e), gp = () => ({ state: n, dispatch: e }) => ff(n, e);
11977
+ }, pp = () => ({ state: n, dispatch: e }) => gf(n, e), mp = () => ({ state: n, dispatch: e }) => yf(n, e), gp = () => ({ state: n, dispatch: e }) => uf(n, e), yp = () => ({ state: n, dispatch: e }) => pf(n, e);
11960
11978
  function hs() {
11961
11979
  return typeof navigator < "u" ? /Mac/.test(navigator.platform) : !1;
11962
11980
  }
11963
- function yp(n) {
11981
+ function bp(n) {
11964
11982
  const e = n.split(/-(?!$)/);
11965
11983
  let t = e[e.length - 1];
11966
11984
  t === "Space" && (t = " ");
@@ -11982,8 +12000,8 @@ function yp(n) {
11982
12000
  }
11983
12001
  return r && (t = `Alt-${t}`), i && (t = `Ctrl-${t}`), o && (t = `Meta-${t}`), s && (t = `Shift-${t}`), t;
11984
12002
  }
11985
- const bp = (n) => ({ editor: e, view: t, tr: r, dispatch: i }) => {
11986
- const s = yp(n).split(/-(?!$)/), o = s.find((c) => !["Alt", "Ctrl", "Meta", "Shift"].includes(c)), l = new KeyboardEvent("keydown", {
12003
+ const kp = (n) => ({ editor: e, view: t, tr: r, dispatch: i }) => {
12004
+ const s = bp(n).split(/-(?!$)/), o = s.find((c) => !["Alt", "Ctrl", "Meta", "Shift"].includes(c)), l = new KeyboardEvent("keydown", {
11987
12005
  key: o === "Space" ? " " : o,
11988
12006
  altKey: s.includes("Alt"),
11989
12007
  ctrlKey: s.includes("Ctrl"),
@@ -12014,13 +12032,13 @@ function pn(n, e, t = {}) {
12014
12032
  const a = i - r, c = l.filter((u) => o ? o.name === u.node.type.name : !0).filter((u) => Kn(u.node.attrs, t, { strict: !1 }));
12015
12033
  return s ? !!c.length : c.reduce((u, h) => u + h.to - h.from, 0) >= a;
12016
12034
  }
12017
- const kp = (n, e = {}) => ({ state: t, dispatch: r }) => {
12035
+ const Sp = (n, e = {}) => ({ state: t, dispatch: r }) => {
12018
12036
  const i = W(n, t.schema);
12019
- return pn(t, i, e) ? yf(t, r) : !1;
12020
- }, Sp = () => ({ state: n, dispatch: e }) => xf(n, e), xp = (n) => ({ state: e, dispatch: t }) => {
12037
+ return pn(t, i, e) ? bf(t, r) : !1;
12038
+ }, xp = () => ({ state: n, dispatch: e }) => Cf(n, e), Cp = (n) => ({ state: e, dispatch: t }) => {
12021
12039
  const r = W(n, e.schema);
12022
- return Af(r)(e, t);
12023
- }, Cp = () => ({ state: n, dispatch: e }) => bf(n, e);
12040
+ return Nf(r)(e, t);
12041
+ }, Ep = () => ({ state: n, dispatch: e }) => kf(n, e);
12024
12042
  function Fr(n, e) {
12025
12043
  return e.nodes[n] ? "node" : e.marks[n] ? "mark" : null;
12026
12044
  }
@@ -12028,7 +12046,7 @@ function Do(n, e) {
12028
12046
  const t = typeof e == "string" ? [e] : e;
12029
12047
  return Object.keys(n).reduce((r, i) => (t.includes(i) || (r[i] = n[i]), r), {});
12030
12048
  }
12031
- const Ep = (n, e) => ({ tr: t, state: r, dispatch: i }) => {
12049
+ const Tp = (n, e) => ({ tr: t, state: r, dispatch: i }) => {
12032
12050
  let s = null, o = null;
12033
12051
  const l = Fr(typeof n == "string" ? n : n.name, r.schema);
12034
12052
  return l ? (l === "node" && (s = W(n, r.schema)), l === "mark" && (o = st(n, r.schema)), i && t.selection.ranges.forEach((a) => {
@@ -12038,14 +12056,14 @@ const Ep = (n, e) => ({ tr: t, state: r, dispatch: i }) => {
12038
12056
  });
12039
12057
  });
12040
12058
  }), !0) : !1;
12041
- }, Tp = () => ({ tr: n, dispatch: e }) => (e && n.scrollIntoView(), !0), Mp = () => ({ tr: n, commands: e }) => e.setTextSelection({
12059
+ }, Mp = () => ({ tr: n, dispatch: e }) => (e && n.scrollIntoView(), !0), wp = () => ({ tr: n, commands: e }) => e.setTextSelection({
12042
12060
  from: 0,
12043
12061
  to: n.doc.content.size
12044
- }), wp = () => ({ state: n, dispatch: e }) => uf(n, e), Op = () => ({ state: n, dispatch: e }) => pf(n, e), vp = () => ({ state: n, dispatch: e }) => Cf(n, e), Ap = () => ({ state: n, dispatch: e }) => Mf(n, e), Np = () => ({ state: n, dispatch: e }) => Tf(n, e);
12062
+ }), Op = () => ({ state: n, dispatch: e }) => hf(n, e), vp = () => ({ state: n, dispatch: e }) => mf(n, e), Ap = () => ({ state: n, dispatch: e }) => Ef(n, e), Np = () => ({ state: n, dispatch: e }) => wf(n, e), Dp = () => ({ state: n, dispatch: e }) => Mf(n, e);
12045
12063
  function Na(n, e, t = {}) {
12046
12064
  return Wn(n, e, { slice: !1, parseOptions: t });
12047
12065
  }
12048
- const Dp = (n, e = !1, t = {}) => ({ tr: r, editor: i, dispatch: s }) => {
12066
+ const Ip = (n, e = !1, t = {}) => ({ tr: r, editor: i, dispatch: s }) => {
12049
12067
  const { doc: o } = r, l = Na(n, i.schema, t);
12050
12068
  return s && r.replaceWith(0, o.content.size, l).setMeta("preventUpdate", !e), !0;
12051
12069
  };
@@ -12057,7 +12075,7 @@ function Da(n, e) {
12057
12075
  });
12058
12076
  }), t;
12059
12077
  }
12060
- function Ip(n) {
12078
+ function Rp(n) {
12061
12079
  for (let e = 0; e < n.edgeCount; e += 1) {
12062
12080
  const { type: t } = n.edge(e);
12063
12081
  if (t.isTextblock && !t.hasRequiredAttrs())
@@ -12074,7 +12092,7 @@ function Ia(n, e, t) {
12074
12092
  });
12075
12093
  }), r;
12076
12094
  }
12077
- function Rp(n, e) {
12095
+ function Pp(n, e) {
12078
12096
  for (let t = n.depth; t > 0; t -= 1) {
12079
12097
  const r = n.node(t);
12080
12098
  if (e(r))
@@ -12087,13 +12105,13 @@ function Rp(n, e) {
12087
12105
  }
12088
12106
  }
12089
12107
  function fs(n) {
12090
- return (e) => Rp(e.$from, n);
12108
+ return (e) => Pp(e.$from, n);
12091
12109
  }
12092
- function Pp(n, e) {
12110
+ function Lp(n, e) {
12093
12111
  const t = Ne.fromSchema(e).serializeFragment(n), i = document.implementation.createHTMLDocument().createElement("div");
12094
12112
  return i.appendChild(t), i.innerHTML;
12095
12113
  }
12096
- function Lp(n, e) {
12114
+ function Bp(n, e) {
12097
12115
  const t = {
12098
12116
  from: 0,
12099
12117
  to: n.content.size
@@ -12108,7 +12126,7 @@ function zr(n, e) {
12108
12126
  const l = o.find((a) => a.type.name === t.name);
12109
12127
  return l ? { ...l.attrs } : {};
12110
12128
  }
12111
- function Bp(n, e) {
12129
+ function _p(n, e) {
12112
12130
  const t = W(e, n.schema), { from: r, to: i } = n.selection, s = [];
12113
12131
  n.doc.nodesBetween(r, i, (l) => {
12114
12132
  s.push(l);
@@ -12118,17 +12136,17 @@ function Bp(n, e) {
12118
12136
  }
12119
12137
  function Ra(n, e) {
12120
12138
  const t = Fr(typeof e == "string" ? e : e.name, n.schema);
12121
- return t === "node" ? Bp(n, e) : t === "mark" ? zr(n, e) : {};
12139
+ return t === "node" ? _p(n, e) : t === "mark" ? zr(n, e) : {};
12122
12140
  }
12123
- function _p(n, e = JSON.stringify) {
12141
+ function Fp(n, e = JSON.stringify) {
12124
12142
  const t = {};
12125
12143
  return n.filter((r) => {
12126
12144
  const i = e(r);
12127
12145
  return Object.prototype.hasOwnProperty.call(t, i) ? !1 : t[i] = !0;
12128
12146
  });
12129
12147
  }
12130
- function Fp(n) {
12131
- const e = _p(n);
12148
+ function zp(n) {
12149
+ const e = Fp(n);
12132
12150
  return e.length === 1 ? e : e.filter((t, r) => !e.filter((s, o) => o !== r).some((s) => t.oldRange.from >= s.oldRange.from && t.oldRange.to <= s.oldRange.to && t.newRange.from >= s.newRange.from && t.newRange.to <= s.newRange.to));
12133
12151
  }
12134
12152
  function Pa(n) {
@@ -12158,7 +12176,7 @@ function Pa(n) {
12158
12176
  }
12159
12177
  });
12160
12178
  });
12161
- }), Fp(r);
12179
+ }), zp(r);
12162
12180
  }
12163
12181
  function Hr(n, e, t) {
12164
12182
  const r = [];
@@ -12205,7 +12223,7 @@ function Li(n, e, t = {}) {
12205
12223
  const a = l.filter((u) => s ? s.name === u.mark.type.name : !0).filter((u) => Kn(u.mark.attrs, t, { strict: !1 })).reduce((u, h) => u + h.to - h.from, 0), c = l.filter((u) => s ? u.mark.type !== s && u.mark.type.excludes(s) : !0).reduce((u, h) => u + h.to - h.from, 0);
12206
12224
  return (a > 0 ? a + c : a) >= o;
12207
12225
  }
12208
- function zp(n, e, t = {}) {
12226
+ function Hp(n, e, t = {}) {
12209
12227
  if (!e)
12210
12228
  return pn(n, null, t) || Li(n, null, t);
12211
12229
  const r = Fr(e, n.schema);
@@ -12222,12 +12240,12 @@ function Io(n, e) {
12222
12240
  }, s = A(C(r, "group", i));
12223
12241
  return typeof s != "string" ? !1 : s.split(" ").includes("list");
12224
12242
  }
12225
- function Hp(n) {
12243
+ function Vp(n) {
12226
12244
  var e;
12227
12245
  const t = (e = n.type.createAndFill()) === null || e === void 0 ? void 0 : e.toJSON(), r = n.toJSON();
12228
12246
  return JSON.stringify(t) === JSON.stringify(r);
12229
12247
  }
12230
- function Vp(n) {
12248
+ function $p(n) {
12231
12249
  return n instanceof w;
12232
12250
  }
12233
12251
  function La(n, e, t) {
@@ -12246,7 +12264,7 @@ function La(n, e, t) {
12246
12264
  toJSON: () => y
12247
12265
  };
12248
12266
  }
12249
- function $p(n, e, t) {
12267
+ function jp(n, e, t) {
12250
12268
  var r;
12251
12269
  const { selection: i } = e;
12252
12270
  let s = null;
@@ -12268,7 +12286,7 @@ function $p(n, e, t) {
12268
12286
  }), c;
12269
12287
  });
12270
12288
  }
12271
- const jp = (n, e = {}) => ({ tr: t, state: r, dispatch: i }) => {
12289
+ const qp = (n, e = {}) => ({ tr: t, state: r, dispatch: i }) => {
12272
12290
  const { selection: s } = t, { empty: o, ranges: l } = s, a = st(n, r.schema);
12273
12291
  if (i)
12274
12292
  if (o) {
@@ -12290,25 +12308,25 @@ const jp = (n, e = {}) => ({ tr: t, state: r, dispatch: i }) => {
12290
12308
  }) : t.addMark(p, m, a.create(e));
12291
12309
  });
12292
12310
  });
12293
- return $p(r, t, a);
12294
- }, qp = (n, e) => ({ tr: t }) => (t.setMeta(n, e), !0), Kp = (n, e = {}) => ({ state: t, dispatch: r, chain: i }) => {
12311
+ return jp(r, t, a);
12312
+ }, Kp = (n, e) => ({ tr: t }) => (t.setMeta(n, e), !0), Wp = (n, e = {}) => ({ state: t, dispatch: r, chain: i }) => {
12295
12313
  const s = W(n, t.schema);
12296
12314
  return s.isTextblock ? i().command(({ commands: o }) => wo(s, e)(t) ? !0 : o.clearNodes()).command(({ state: o }) => wo(s, e)(o, r)).run() : (console.warn('[tiptap warn]: Currently "setNode()" only supports text block nodes.'), !1);
12297
- }, Wp = (n) => ({ tr: e, dispatch: t }) => {
12315
+ }, Up = (n) => ({ tr: e, dispatch: t }) => {
12298
12316
  if (t) {
12299
12317
  const { doc: r } = e, i = _e(n, 0, r.content.size), s = w.create(r, i);
12300
12318
  e.setSelection(s);
12301
12319
  }
12302
12320
  return !0;
12303
- }, Up = (n) => ({ tr: e, dispatch: t }) => {
12321
+ }, Jp = (n) => ({ tr: e, dispatch: t }) => {
12304
12322
  if (t) {
12305
12323
  const { doc: r } = e, { from: i, to: s } = typeof n == "number" ? { from: n, to: n } : n, o = D.atStart(r).from, l = D.atEnd(r).to, a = _e(i, o, l), c = _e(s, o, l), d = D.create(r, a, c);
12306
12324
  e.setSelection(d);
12307
12325
  }
12308
12326
  return !0;
12309
- }, Jp = (n) => ({ state: e, dispatch: t }) => {
12327
+ }, Gp = (n) => ({ state: e, dispatch: t }) => {
12310
12328
  const r = W(n, e.schema);
12311
- return If(r)(e, t);
12329
+ return Rf(r)(e, t);
12312
12330
  };
12313
12331
  function Ro(n, e) {
12314
12332
  const t = n.storedMarks || n.selection.$to.parentOffset && n.selection.$from.marks();
@@ -12317,7 +12335,7 @@ function Ro(n, e) {
12317
12335
  n.tr.ensureMarks(r);
12318
12336
  }
12319
12337
  }
12320
- const Gp = ({ keepMarks: n = !0 } = {}) => ({ tr: e, state: t, dispatch: r, editor: i }) => {
12338
+ const Yp = ({ keepMarks: n = !0 } = {}) => ({ tr: e, state: t, dispatch: r, editor: i }) => {
12321
12339
  const { selection: s, doc: o } = e, { $from: l, $to: a } = s, c = i.extensionManager.attributes, d = Nn(c, l.node().type.name, l.node().attrs);
12322
12340
  if (s instanceof w && s.node.isBlock)
12323
12341
  return !l.parentOffset || !Rt(o, l.pos) ? !1 : (r && (n && Ro(t, i.extensionManager.splittableMarks), e.split(l.pos).scrollIntoView()), !0);
@@ -12326,7 +12344,7 @@ const Gp = ({ keepMarks: n = !0 } = {}) => ({ tr: e, state: t, dispatch: r, edit
12326
12344
  if (r) {
12327
12345
  const u = a.parentOffset === a.parent.content.size;
12328
12346
  s instanceof D && e.deleteSelection();
12329
- const h = l.depth === 0 ? void 0 : Ip(l.node(-1).contentMatchAt(l.indexAfter(-1)));
12347
+ const h = l.depth === 0 ? void 0 : Rp(l.node(-1).contentMatchAt(l.indexAfter(-1)));
12330
12348
  let f = u && h ? [
12331
12349
  {
12332
12350
  type: h,
@@ -12345,7 +12363,7 @@ const Gp = ({ keepMarks: n = !0 } = {}) => ({ tr: e, state: t, dispatch: r, edit
12345
12363
  n && Ro(t, i.extensionManager.splittableMarks), e.scrollIntoView();
12346
12364
  }
12347
12365
  return !0;
12348
- }, Yp = (n) => ({ tr: e, state: t, dispatch: r, editor: i }) => {
12366
+ }, Xp = (n) => ({ tr: e, state: t, dispatch: r, editor: i }) => {
12349
12367
  var s;
12350
12368
  const o = W(n, t.schema), { $from: l, $to: a } = t.selection, c = t.selection.node;
12351
12369
  if (c && c.isBlock || l.depth < 2 || !l.sameParent(a))
@@ -12409,7 +12427,7 @@ const Gp = ({ keepMarks: n = !0 } = {}) => ({ tr: e, state: t, dispatch: r, edit
12409
12427
  return !0;
12410
12428
  const i = n.doc.nodeAt(r);
12411
12429
  return t.node.type === (i == null ? void 0 : i.type) && rt(n.doc, r) && n.join(r), !0;
12412
- }, Xp = (n, e, t, r = {}) => ({ editor: i, tr: s, state: o, dispatch: l, chain: a, commands: c, can: d }) => {
12430
+ }, Qp = (n, e, t, r = {}) => ({ editor: i, tr: s, state: o, dispatch: l, chain: a, commands: c, can: d }) => {
12413
12431
  const { extensions: u, splittableMarks: h } = i.extensionManager, f = W(n, o.schema), p = W(e, o.schema), { selection: m, storedMarks: g } = o, { $from: y, $to: x } = m, T = y.blockRange(x), R = g || m.$to.parentOffset && m.$from.marks();
12414
12432
  if (!T)
12415
12433
  return !1;
@@ -12424,16 +12442,16 @@ const Gp = ({ keepMarks: n = !0 } = {}) => ({ tr: e, state: t, dispatch: r, edit
12424
12442
  const E = d().wrapInList(f, r), L = R.filter((I) => h.includes(I.type.name));
12425
12443
  return s.ensureMarks(L), E ? !0 : c.clearNodes();
12426
12444
  }).wrapInList(f, r).command(() => di(s, f)).command(() => ui(s, f)).run();
12427
- }, Qp = (n, e = {}, t = {}) => ({ state: r, commands: i }) => {
12445
+ }, Zp = (n, e = {}, t = {}) => ({ state: r, commands: i }) => {
12428
12446
  const { extendEmptyMarkRange: s = !1 } = t, o = st(n, r.schema);
12429
12447
  return Li(r, o, e) ? i.unsetMark(o, { extendEmptyMarkRange: s }) : i.setMark(o, e);
12430
- }, Zp = (n, e, t = {}) => ({ state: r, commands: i }) => {
12448
+ }, em = (n, e, t = {}) => ({ state: r, commands: i }) => {
12431
12449
  const s = W(n, r.schema), o = W(e, r.schema);
12432
12450
  return pn(r, s, t) ? i.setNode(o) : i.setNode(s, t);
12433
- }, em = (n, e = {}) => ({ state: t, commands: r }) => {
12451
+ }, tm = (n, e = {}) => ({ state: t, commands: r }) => {
12434
12452
  const i = W(n, t.schema);
12435
12453
  return pn(t, i, e) ? r.lift(i) : r.wrapIn(i, e);
12436
- }, tm = () => ({ state: n, dispatch: e }) => {
12454
+ }, nm = () => ({ state: n, dispatch: e }) => {
12437
12455
  const t = n.plugins;
12438
12456
  for (let r = 0; r < t.length; r += 1) {
12439
12457
  const i = t[r];
@@ -12453,12 +12471,12 @@ const Gp = ({ keepMarks: n = !0 } = {}) => ({ tr: e, state: t, dispatch: r, edit
12453
12471
  }
12454
12472
  }
12455
12473
  return !1;
12456
- }, nm = () => ({ tr: n, dispatch: e }) => {
12474
+ }, rm = () => ({ tr: n, dispatch: e }) => {
12457
12475
  const { selection: t } = n, { empty: r, ranges: i } = t;
12458
12476
  return r || e && i.forEach((s) => {
12459
12477
  n.removeMark(s.$from.pos, s.$to.pos);
12460
12478
  }), !0;
12461
- }, rm = (n, e = {}) => ({ tr: t, state: r, dispatch: i }) => {
12479
+ }, im = (n, e = {}) => ({ tr: t, state: r, dispatch: i }) => {
12462
12480
  var s;
12463
12481
  const { extendEmptyMarkRange: o = !1 } = e, { selection: l } = t, a = st(n, r.schema), { $from: c, empty: d, ranges: u } = l;
12464
12482
  if (!i)
@@ -12472,7 +12490,7 @@ const Gp = ({ keepMarks: n = !0 } = {}) => ({ tr: e, state: t, dispatch: r, edit
12472
12490
  t.removeMark(h.$from.pos, h.$to.pos, a);
12473
12491
  });
12474
12492
  return t.removeStoredMark(a), !0;
12475
- }, im = (n, e = {}) => ({ tr: t, state: r, dispatch: i }) => {
12493
+ }, sm = (n, e = {}) => ({ tr: t, state: r, dispatch: i }) => {
12476
12494
  let s = null, o = null;
12477
12495
  const l = Fr(typeof n == "string" ? n : n.name, r.schema);
12478
12496
  return l ? (l === "node" && (s = W(n, r.schema)), l === "mark" && (o = st(n, r.schema)), i && t.selection.ranges.forEach((a) => {
@@ -12492,77 +12510,77 @@ const Gp = ({ keepMarks: n = !0 } = {}) => ({ tr: e, state: t, dispatch: r, edit
12492
12510
  });
12493
12511
  });
12494
12512
  }), !0) : !1;
12495
- }, sm = (n, e = {}) => ({ state: t, dispatch: r }) => {
12496
- const i = W(n, t.schema);
12497
- return wf(i, e)(t, r);
12498
12513
  }, om = (n, e = {}) => ({ state: t, dispatch: r }) => {
12499
12514
  const i = W(n, t.schema);
12500
12515
  return Of(i, e)(t, r);
12516
+ }, lm = (n, e = {}) => ({ state: t, dispatch: r }) => {
12517
+ const i = W(n, t.schema);
12518
+ return vf(i, e)(t, r);
12501
12519
  };
12502
- var lm = /* @__PURE__ */ Object.freeze({
12520
+ var am = /* @__PURE__ */ Object.freeze({
12503
12521
  __proto__: null,
12504
- blur: Uf,
12505
- clearContent: Jf,
12506
- clearNodes: Gf,
12507
- command: Yf,
12508
- createParagraphNear: Xf,
12509
- deleteCurrentNode: Qf,
12510
- deleteNode: Zf,
12511
- deleteRange: ep,
12512
- deleteSelection: tp,
12513
- enter: np,
12514
- exitCode: rp,
12515
- extendMarkRange: sp,
12516
- first: op,
12517
- focus: lp,
12518
- forEach: ap,
12519
- insertContent: cp,
12520
- insertContentAt: hp,
12521
- joinUp: fp,
12522
- joinDown: pp,
12523
- joinBackward: mp,
12524
- joinForward: gp,
12525
- keyboardShortcut: bp,
12526
- lift: kp,
12527
- liftEmptyBlock: Sp,
12528
- liftListItem: xp,
12529
- newlineInCode: Cp,
12530
- resetAttributes: Ep,
12531
- scrollIntoView: Tp,
12532
- selectAll: Mp,
12533
- selectNodeBackward: wp,
12534
- selectNodeForward: Op,
12535
- selectParentNode: vp,
12536
- selectTextblockEnd: Ap,
12537
- selectTextblockStart: Np,
12538
- setContent: Dp,
12539
- setMark: jp,
12540
- setMeta: qp,
12541
- setNode: Kp,
12542
- setNodeSelection: Wp,
12543
- setTextSelection: Up,
12544
- sinkListItem: Jp,
12545
- splitBlock: Gp,
12546
- splitListItem: Yp,
12547
- toggleList: Xp,
12548
- toggleMark: Qp,
12549
- toggleNode: Zp,
12550
- toggleWrap: em,
12551
- undoInputRule: tm,
12552
- unsetAllMarks: nm,
12553
- unsetMark: rm,
12554
- updateAttributes: im,
12555
- wrapIn: sm,
12556
- wrapInList: om
12522
+ blur: Jf,
12523
+ clearContent: Gf,
12524
+ clearNodes: Yf,
12525
+ command: Xf,
12526
+ createParagraphNear: Qf,
12527
+ deleteCurrentNode: Zf,
12528
+ deleteNode: ep,
12529
+ deleteRange: tp,
12530
+ deleteSelection: np,
12531
+ enter: rp,
12532
+ exitCode: ip,
12533
+ extendMarkRange: op,
12534
+ first: lp,
12535
+ focus: ap,
12536
+ forEach: cp,
12537
+ insertContent: dp,
12538
+ insertContentAt: fp,
12539
+ joinUp: pp,
12540
+ joinDown: mp,
12541
+ joinBackward: gp,
12542
+ joinForward: yp,
12543
+ keyboardShortcut: kp,
12544
+ lift: Sp,
12545
+ liftEmptyBlock: xp,
12546
+ liftListItem: Cp,
12547
+ newlineInCode: Ep,
12548
+ resetAttributes: Tp,
12549
+ scrollIntoView: Mp,
12550
+ selectAll: wp,
12551
+ selectNodeBackward: Op,
12552
+ selectNodeForward: vp,
12553
+ selectParentNode: Ap,
12554
+ selectTextblockEnd: Np,
12555
+ selectTextblockStart: Dp,
12556
+ setContent: Ip,
12557
+ setMark: qp,
12558
+ setMeta: Kp,
12559
+ setNode: Wp,
12560
+ setNodeSelection: Up,
12561
+ setTextSelection: Jp,
12562
+ sinkListItem: Gp,
12563
+ splitBlock: Yp,
12564
+ splitListItem: Xp,
12565
+ toggleList: Qp,
12566
+ toggleMark: Zp,
12567
+ toggleNode: em,
12568
+ toggleWrap: tm,
12569
+ undoInputRule: nm,
12570
+ unsetAllMarks: rm,
12571
+ unsetMark: im,
12572
+ updateAttributes: sm,
12573
+ wrapIn: om,
12574
+ wrapInList: lm
12557
12575
  });
12558
- const am = ge.create({
12576
+ const cm = ge.create({
12559
12577
  name: "commands",
12560
12578
  addCommands() {
12561
12579
  return {
12562
- ...lm
12580
+ ...am
12563
12581
  };
12564
12582
  }
12565
- }), cm = ge.create({
12583
+ }), dm = ge.create({
12566
12584
  name: "editable",
12567
12585
  addProseMirrorPlugins() {
12568
12586
  return [
@@ -12574,7 +12592,7 @@ const am = ge.create({
12574
12592
  })
12575
12593
  ];
12576
12594
  }
12577
- }), dm = ge.create({
12595
+ }), um = ge.create({
12578
12596
  name: "focusEvents",
12579
12597
  addProseMirrorPlugins() {
12580
12598
  const { editor: n } = this;
@@ -12598,7 +12616,7 @@ const am = ge.create({
12598
12616
  })
12599
12617
  ];
12600
12618
  }
12601
- }), um = ge.create({
12619
+ }), hm = ge.create({
12602
12620
  name: "keymap",
12603
12621
  addKeyboardShortcuts() {
12604
12622
  const n = () => this.editor.commands.first(({ commands: o }) => [
@@ -12673,7 +12691,7 @@ const am = ge.create({
12673
12691
  })
12674
12692
  ];
12675
12693
  }
12676
- }), hm = ge.create({
12694
+ }), fm = ge.create({
12677
12695
  name: "tabindex",
12678
12696
  addProseMirrorPlugins() {
12679
12697
  return [
@@ -12686,16 +12704,16 @@ const am = ge.create({
12686
12704
  ];
12687
12705
  }
12688
12706
  });
12689
- var fm = /* @__PURE__ */ Object.freeze({
12707
+ var pm = /* @__PURE__ */ Object.freeze({
12690
12708
  __proto__: null,
12691
- ClipboardTextSerializer: Wf,
12692
- Commands: am,
12693
- Editable: cm,
12694
- FocusEvents: dm,
12695
- Keymap: um,
12696
- Tabindex: hm
12709
+ ClipboardTextSerializer: Uf,
12710
+ Commands: cm,
12711
+ Editable: dm,
12712
+ FocusEvents: um,
12713
+ Keymap: hm,
12714
+ Tabindex: fm
12697
12715
  });
12698
- const pm = `.ProseMirror {
12716
+ const mm = `.ProseMirror {
12699
12717
  position: relative;
12700
12718
  }
12701
12719
 
@@ -12770,14 +12788,14 @@ img.ProseMirror-separator {
12770
12788
  .tippy-box[data-animation=fade][data-state=hidden] {
12771
12789
  opacity: 0
12772
12790
  }`;
12773
- function mm(n, e) {
12791
+ function gm(n, e) {
12774
12792
  const t = document.querySelector("style[data-tiptap-style]");
12775
12793
  if (t !== null)
12776
12794
  return t;
12777
12795
  const r = document.createElement("style");
12778
12796
  return e && r.setAttribute("nonce", e), r.setAttribute("data-tiptap-style", ""), r.innerHTML = n, document.getElementsByTagName("head")[0].appendChild(r), r;
12779
12797
  }
12780
- let gm = class extends Rf {
12798
+ let ym = class extends Pf {
12781
12799
  constructor(e = {}) {
12782
12800
  super(), this.isFocused = !1, this.extensionStorage = {}, this.options = {
12783
12801
  element: document.createElement("div"),
@@ -12832,7 +12850,7 @@ let gm = class extends Rf {
12832
12850
  * Inject CSS styles.
12833
12851
  */
12834
12852
  injectCSS() {
12835
- this.options.injectCSS && document && (this.css = mm(pm, this.options.injectNonce));
12853
+ this.options.injectCSS && document && (this.css = gm(mm, this.options.injectNonce));
12836
12854
  }
12837
12855
  /**
12838
12856
  * Update editor options.
@@ -12891,7 +12909,7 @@ let gm = class extends Rf {
12891
12909
  * Creates an extension manager.
12892
12910
  */
12893
12911
  createExtensionManager() {
12894
- const t = [...this.options.enableCoreExtensions ? Object.values(fm) : [], ...this.options.extensions].filter((r) => ["extension", "node", "mark"].includes(r == null ? void 0 : r.type));
12912
+ const t = [...this.options.enableCoreExtensions ? Object.values(pm) : [], ...this.options.extensions].filter((r) => ["extension", "node", "mark"].includes(r == null ? void 0 : r.type));
12895
12913
  this.extensionManager = new It(t, this);
12896
12914
  }
12897
12915
  /**
@@ -12913,7 +12931,7 @@ let gm = class extends Rf {
12913
12931
  */
12914
12932
  createView() {
12915
12933
  const e = Na(this.options.content, this.schema, this.options.parseOptions), t = Aa(e, this.options.autofocus);
12916
- this.view = new Yh(this.options.element, {
12934
+ this.view = new Xh(this.options.element, {
12917
12935
  ...this.options.editorProps,
12918
12936
  dispatchTransaction: this.dispatchTransaction.bind(this),
12919
12937
  state: Dt.create({
@@ -12990,7 +13008,7 @@ let gm = class extends Rf {
12990
13008
  }
12991
13009
  isActive(e, t) {
12992
13010
  const r = typeof e == "string" ? e : null, i = typeof e == "string" ? t : e;
12993
- return zp(this.state, r, i);
13011
+ return Hp(this.state, r, i);
12994
13012
  }
12995
13013
  /**
12996
13014
  * Get the document as JSON.
@@ -13002,7 +13020,7 @@ let gm = class extends Rf {
13002
13020
  * Get the document as HTML.
13003
13021
  */
13004
13022
  getHTML() {
13005
- return Pp(this.state.doc.content, this.schema);
13023
+ return Lp(this.state.doc.content, this.schema);
13006
13024
  }
13007
13025
  /**
13008
13026
  * Get the document as text.
@@ -13011,7 +13029,7 @@ let gm = class extends Rf {
13011
13029
  const { blockSeparator: t = `
13012
13030
 
13013
13031
  `, textSerializers: r = {} } = e || {};
13014
- return Lp(this.state.doc, {
13032
+ return Bp(this.state.doc, {
13015
13033
  blockSeparator: t,
13016
13034
  textSerializers: {
13017
13035
  ...va(this.schema),
@@ -13023,7 +13041,7 @@ let gm = class extends Rf {
13023
13041
  * Check if there is no content.
13024
13042
  */
13025
13043
  get isEmpty() {
13026
- return Hp(this.state.doc);
13044
+ return Vp(this.state.doc);
13027
13045
  }
13028
13046
  /**
13029
13047
  * Get the number of characters for the current document.
@@ -13197,7 +13215,7 @@ class ne {
13197
13215
  })), t;
13198
13216
  }
13199
13217
  }
13200
- class ym {
13218
+ class bm {
13201
13219
  constructor(e, t, r) {
13202
13220
  this.isDragging = !1, this.component = e, this.editor = t.editor, this.options = {
13203
13221
  stopEvent: null,
@@ -13292,7 +13310,7 @@ function Ht(n) {
13292
13310
  }
13293
13311
  });
13294
13312
  }
13295
- function bm(n) {
13313
+ function km(n) {
13296
13314
  return n.replace(/[-/\\^$*+?.()|[\]{}]/g, "\\$&");
13297
13315
  }
13298
13316
  function Bo(n) {
@@ -13309,7 +13327,7 @@ function Bo(n) {
13309
13327
  }
13310
13328
  });
13311
13329
  }
13312
- class km {
13330
+ class Sm {
13313
13331
  constructor({ editor: e, element: t, view: r, tippyOptions: i = {}, updateDelay: s = 250, shouldShow: o }) {
13314
13332
  this.preventHide = !1, this.shouldShow = ({ view: l, state: a, from: c, to: d }) => {
13315
13333
  const { doc: u, selection: h } = a, { empty: f } = h, p = !u.textBetween(c, d).length && us(a.selection), m = this.element.contains(document.activeElement);
@@ -13354,7 +13372,7 @@ class km {
13354
13372
  }
13355
13373
  (h = this.tippy) === null || h === void 0 || h.setProps({
13356
13374
  getReferenceClientRect: ((f = this.tippyOptions) === null || f === void 0 ? void 0 : f.getReferenceClientRect) || (() => {
13357
- if (Vp(p.selection)) {
13375
+ if ($p(p.selection)) {
13358
13376
  let E = l.nodeDOM(T);
13359
13377
  const L = E.dataset.nodeViewWrapper ? E : E.querySelector("[data-node-view-wrapper]");
13360
13378
  if (L && (E = L.firstChild), E)
@@ -13402,7 +13420,7 @@ class km {
13402
13420
  }
13403
13421
  const Ba = (n) => new Q({
13404
13422
  key: typeof n.pluginKey == "string" ? new ie(n.pluginKey) : n.pluginKey,
13405
- view: (e) => new km({ view: e, ...n })
13423
+ view: (e) => new Sm({ view: e, ...n })
13406
13424
  });
13407
13425
  ge.create({
13408
13426
  name: "bubbleMenu",
@@ -13428,7 +13446,7 @@ ge.create({
13428
13446
  ] : [];
13429
13447
  }
13430
13448
  });
13431
- class Sm {
13449
+ class xm {
13432
13450
  constructor({ editor: e, element: t, view: r, tippyOptions: i = {}, shouldShow: s }) {
13433
13451
  this.preventHide = !1, this.shouldShow = ({ view: o, state: l }) => {
13434
13452
  const { selection: a } = l, { $anchor: c, empty: d } = a, u = c.depth === 1, h = c.parent.isTextblock && !c.parent.type.spec.code && !c.parent.textContent;
@@ -13494,7 +13512,7 @@ class Sm {
13494
13512
  }
13495
13513
  const _a = (n) => new Q({
13496
13514
  key: typeof n.pluginKey == "string" ? new ie(n.pluginKey) : n.pluginKey,
13497
- view: (e) => new Sm({ view: e, ...n })
13515
+ view: (e) => new xm({ view: e, ...n })
13498
13516
  });
13499
13517
  ge.create({
13500
13518
  name: "floatingMenu",
@@ -13577,7 +13595,7 @@ function _o(n) {
13577
13595
  }
13578
13596
  }));
13579
13597
  }
13580
- class xm extends gm {
13598
+ class Cm extends ym {
13581
13599
  constructor(e = {}) {
13582
13600
  return super(e), this.vueRenderers = ll(/* @__PURE__ */ new Map()), this.contentComponent = null, this.reactiveState = _o(this.view.state), this.reactiveExtensionStorage = _o(this.extensionStorage), this.on("transaction", () => {
13583
13601
  this.reactiveState.value = this.view.state, this.reactiveExtensionStorage.value = this.extensionStorage;
@@ -13602,7 +13620,7 @@ class xm extends gm {
13602
13620
  super.unregisterPlugin(e), this.reactiveState.value = this.view.state;
13603
13621
  }
13604
13622
  }
13605
- const Cm = $t({
13623
+ const Em = $t({
13606
13624
  name: "EditorContent",
13607
13625
  props: {
13608
13626
  editor: {
@@ -13789,7 +13807,7 @@ const za = {
13789
13807
  required: !0
13790
13808
  }
13791
13809
  };
13792
- class Em extends ym {
13810
+ class Tm extends bm {
13793
13811
  mount() {
13794
13812
  const e = {
13795
13813
  editor: this.editor,
@@ -13876,9 +13894,9 @@ class Em extends ym {
13876
13894
  }
13877
13895
  }
13878
13896
  function Ha(n, e) {
13879
- return (t) => t.editor.contentComponent ? new Em(n, t, e) : {};
13897
+ return (t) => t.editor.contentComponent ? new Tm(n, t, e) : {};
13880
13898
  }
13881
- const Tm = /^\s*>\s$/, Mm = ne.create({
13899
+ const Mm = /^\s*>\s$/, wm = ne.create({
13882
13900
  name: "blockquote",
13883
13901
  addOptions() {
13884
13902
  return {
@@ -13911,12 +13929,12 @@ const Tm = /^\s*>\s$/, Mm = ne.create({
13911
13929
  addInputRules() {
13912
13930
  return [
13913
13931
  gn({
13914
- find: Tm,
13932
+ find: Mm,
13915
13933
  type: this.type
13916
13934
  })
13917
13935
  ];
13918
13936
  }
13919
- }), wm = /^```([a-z]+)?[\s\n]$/, Om = /^~~~([a-z]+)?[\s\n]$/, vm = ne.create({
13937
+ }), Om = /^```([a-z]+)?[\s\n]$/, vm = /^~~~([a-z]+)?[\s\n]$/, Am = ne.create({
13920
13938
  name: "codeBlock",
13921
13939
  addOptions() {
13922
13940
  return {
@@ -14006,14 +14024,14 @@ const Tm = /^\s*>\s$/, Mm = ne.create({
14006
14024
  addInputRules() {
14007
14025
  return [
14008
14026
  Lo({
14009
- find: wm,
14027
+ find: Om,
14010
14028
  type: this.type,
14011
14029
  getAttributes: (n) => ({
14012
14030
  language: n[1]
14013
14031
  })
14014
14032
  }),
14015
14033
  Lo({
14016
- find: Om,
14034
+ find: vm,
14017
14035
  type: this.type,
14018
14036
  getAttributes: (n) => ({
14019
14037
  language: n[1]
@@ -14042,11 +14060,11 @@ const Tm = /^\s*>\s$/, Mm = ne.create({
14042
14060
  })
14043
14061
  ];
14044
14062
  }
14045
- }), Am = ne.create({
14063
+ }), Nm = ne.create({
14046
14064
  name: "doc",
14047
14065
  topNode: !0,
14048
14066
  content: "block+"
14049
- }), Nm = ne.create({
14067
+ }), Dm = ne.create({
14050
14068
  name: "hardBreak",
14051
14069
  addOptions() {
14052
14070
  return {
@@ -14095,7 +14113,7 @@ const Tm = /^\s*>\s$/, Mm = ne.create({
14095
14113
  "Shift-Enter": () => this.editor.commands.setHardBreak()
14096
14114
  };
14097
14115
  }
14098
- }), Dm = ne.create({
14116
+ }), Im = ne.create({
14099
14117
  name: "paragraph",
14100
14118
  priority: 1e3,
14101
14119
  addOptions() {
@@ -14123,7 +14141,7 @@ const Tm = /^\s*>\s$/, Mm = ne.create({
14123
14141
  "Mod-Alt-0": () => this.editor.commands.setParagraph()
14124
14142
  };
14125
14143
  }
14126
- }), Im = ge.create({
14144
+ }), Rm = ge.create({
14127
14145
  name: "placeholder",
14128
14146
  addOptions() {
14129
14147
  return {
@@ -14168,7 +14186,7 @@ const Tm = /^\s*>\s$/, Mm = ne.create({
14168
14186
  })
14169
14187
  ];
14170
14188
  }
14171
- }), Rm = /(?:^|\s)((?:\*\*)((?:[^*]+))(?:\*\*))$/, Pm = /(?:^|\s)((?:\*\*)((?:[^*]+))(?:\*\*))/g, Lm = /(?:^|\s)((?:__)((?:[^__]+))(?:__))$/, Bm = /(?:^|\s)((?:__)((?:[^__]+))(?:__))/g, _m = xe.create({
14189
+ }), Pm = /(?:^|\s)((?:\*\*)((?:[^*]+))(?:\*\*))$/, Lm = /(?:^|\s)((?:\*\*)((?:[^*]+))(?:\*\*))/g, Bm = /(?:^|\s)((?:__)((?:[^__]+))(?:__))$/, _m = /(?:^|\s)((?:__)((?:[^__]+))(?:__))/g, Fm = xe.create({
14172
14190
  name: "bold",
14173
14191
  addOptions() {
14174
14192
  return {
@@ -14209,11 +14227,11 @@ const Tm = /^\s*>\s$/, Mm = ne.create({
14209
14227
  addInputRules() {
14210
14228
  return [
14211
14229
  mn({
14212
- find: Rm,
14230
+ find: Pm,
14213
14231
  type: this.type
14214
14232
  }),
14215
14233
  mn({
14216
- find: Lm,
14234
+ find: Bm,
14217
14235
  type: this.type
14218
14236
  })
14219
14237
  ];
@@ -14221,16 +14239,16 @@ const Tm = /^\s*>\s$/, Mm = ne.create({
14221
14239
  addPasteRules() {
14222
14240
  return [
14223
14241
  Ht({
14224
- find: Pm,
14242
+ find: Lm,
14225
14243
  type: this.type
14226
14244
  }),
14227
14245
  Ht({
14228
- find: Bm,
14246
+ find: _m,
14229
14247
  type: this.type
14230
14248
  })
14231
14249
  ];
14232
14250
  }
14233
- }), Fm = ne.create({
14251
+ }), zm = ne.create({
14234
14252
  name: "listItem",
14235
14253
  addOptions() {
14236
14254
  return {
@@ -14284,7 +14302,7 @@ const Tm = /^\s*>\s$/, Mm = ne.create({
14284
14302
  }
14285
14303
  };
14286
14304
  }
14287
- }), zo = /^\s*([-+*])\s$/, zm = ne.create({
14305
+ }), zo = /^\s*([-+*])\s$/, Hm = ne.create({
14288
14306
  name: "bulletList",
14289
14307
  addOptions() {
14290
14308
  return {
@@ -14308,7 +14326,7 @@ const Tm = /^\s*>\s$/, Mm = ne.create({
14308
14326
  },
14309
14327
  addCommands() {
14310
14328
  return {
14311
- toggleBulletList: () => ({ commands: n, chain: e }) => this.options.keepAttributes ? e().toggleList(this.name, this.options.itemTypeName, this.options.keepMarks).updateAttributes(Fm.name, this.editor.getAttributes(Fo.name)).run() : n.toggleList(this.name, this.options.itemTypeName, this.options.keepMarks)
14329
+ toggleBulletList: () => ({ commands: n, chain: e }) => this.options.keepAttributes ? e().toggleList(this.name, this.options.itemTypeName, this.options.keepMarks).updateAttributes(zm.name, this.editor.getAttributes(Fo.name)).run() : n.toggleList(this.name, this.options.itemTypeName, this.options.keepMarks)
14312
14330
  };
14313
14331
  },
14314
14332
  addKeyboardShortcuts() {
@@ -14332,7 +14350,7 @@ const Tm = /^\s*>\s$/, Mm = ne.create({
14332
14350
  n
14333
14351
  ];
14334
14352
  }
14335
- }), Hm = /(?:^|\s)((?:\*)((?:[^*]+))(?:\*))$/, Vm = /(?:^|\s)((?:\*)((?:[^*]+))(?:\*))/g, $m = /(?:^|\s)((?:_)((?:[^_]+))(?:_))$/, jm = /(?:^|\s)((?:_)((?:[^_]+))(?:_))/g, qm = xe.create({
14353
+ }), Vm = /(?:^|\s)((?:\*)((?:[^*]+))(?:\*))$/, $m = /(?:^|\s)((?:\*)((?:[^*]+))(?:\*))/g, jm = /(?:^|\s)((?:_)((?:[^_]+))(?:_))$/, qm = /(?:^|\s)((?:_)((?:[^_]+))(?:_))/g, Km = xe.create({
14336
14354
  name: "italic",
14337
14355
  addOptions() {
14338
14356
  return {
@@ -14372,11 +14390,11 @@ const Tm = /^\s*>\s$/, Mm = ne.create({
14372
14390
  addInputRules() {
14373
14391
  return [
14374
14392
  mn({
14375
- find: Hm,
14393
+ find: Vm,
14376
14394
  type: this.type
14377
14395
  }),
14378
14396
  mn({
14379
- find: $m,
14397
+ find: jm,
14380
14398
  type: this.type
14381
14399
  })
14382
14400
  ];
@@ -14384,31 +14402,31 @@ const Tm = /^\s*>\s$/, Mm = ne.create({
14384
14402
  addPasteRules() {
14385
14403
  return [
14386
14404
  Ht({
14387
- find: Vm,
14405
+ find: $m,
14388
14406
  type: this.type
14389
14407
  }),
14390
14408
  Ht({
14391
- find: jm,
14409
+ find: qm,
14392
14410
  type: this.type
14393
14411
  })
14394
14412
  ];
14395
14413
  }
14396
- }), Km = "aaa1rp3bb0ott3vie4c1le2ogado5udhabi7c0ademy5centure6ountant0s9o1tor4d0s1ult4e0g1ro2tna4f0l1rica5g0akhan5ency5i0g1rbus3force5tel5kdn3l0ibaba4pay4lfinanz6state5y2sace3tom5m0azon4ericanexpress7family11x2fam3ica3sterdam8nalytics7droid5quan4z2o0l2partments8p0le4q0uarelle8r0ab1mco4chi3my2pa2t0e3s0da2ia2sociates9t0hleta5torney7u0ction5di0ble3o3spost5thor3o0s4vianca6w0s2x0a2z0ure5ba0by2idu3namex3narepublic11d1k2r0celona5laycard4s5efoot5gains6seball5ketball8uhaus5yern5b0c1t1va3cg1n2d1e0ats2uty4er2ntley5rlin4st0buy5t2f1g1h0arti5i0ble3d1ke2ng0o3o1z2j1lack0friday9ockbuster8g1omberg7ue3m0s1w2n0pparibas9o0ats3ehringer8fa2m1nd2o0k0ing5sch2tik2on4t1utique6x2r0adesco6idgestone9oadway5ker3ther5ussels7s1t1uild0ers6siness6y1zz3v1w1y1z0h3ca0b1fe2l0l1vinklein9m0era3p2non3petown5ital0one8r0avan4ds2e0er0s4s2sa1e1h1ino4t0ering5holic7ba1n1re3c1d1enter4o1rn3f0a1d2g1h0anel2nel4rity4se2t2eap3intai5ristmas6ome4urch5i0priani6rcle4sco3tadel4i0c2y3k1l0aims4eaning6ick2nic1que6othing5ud3ub0med6m1n1o0ach3des3ffee4llege4ogne5m0cast4mbank4unity6pany2re3uter5sec4ndos3struction8ulting7tact3ractors9oking4l1p2rsica5untry4pon0s4rses6pa2r0edit0card4union9icket5own3s1uise0s6u0isinella9v1w1x1y0mru3ou3z2dabur3d1nce3ta1e1ing3sun4y2clk3ds2e0al0er2s3gree4livery5l1oitte5ta3mocrat6ntal2ist5si0gn4v2hl2iamonds6et2gital5rect0ory7scount3ver5h2y2j1k1m1np2o0cs1tor4g1mains5t1wnload7rive4tv2ubai3nlop4pont4rban5vag2r2z2earth3t2c0o2deka3u0cation8e1g1mail3erck5nergy4gineer0ing9terprises10pson4quipment8r0icsson6ni3s0q1tate5t1u0rovision8s2vents5xchange6pert3osed4ress5traspace10fage2il1rwinds6th3mily4n0s2rm0ers5shion4t3edex3edback6rrari3ero6i0delity5o2lm2nal1nce1ial7re0stone6mdale6sh0ing5t0ness6j1k1lickr3ghts4r2orist4wers5y2m1o0o0d1tball6rd1ex2sale4um3undation8x2r0ee1senius7l1ogans4ntier7tr2ujitsu5n0d2rniture7tbol5yi3ga0l0lery3o1up4me0s3p1rden4y2b0iz3d0n2e0a1nt0ing5orge5f1g0ee3h1i0ft0s3ves2ing5l0ass3e1obal2o4m0ail3bh2o1x2n1odaddy5ld0point6f2o0dyear5g0le4p1t1v2p1q1r0ainger5phics5tis4een3ipe3ocery4up4s1t1u0ardian6cci3ge2ide2tars5ru3w1y2hair2mburg5ngout5us3bo2dfc0bank7ealth0care8lp1sinki6re1mes5iphop4samitsu7tachi5v2k0t2m1n1ockey4ldings5iday5medepot5goods5s0ense7nda3rse3spital5t0ing5t0els3mail5use3w2r1sbc3t1u0ghes5yatt3undai7ibm2cbc2e1u2d1e0ee3fm2kano4l1m0amat4db2mo0bilien9n0c1dustries8finiti5o2g1k1stitute6urance4e4t0ernational10uit4vestments10o1piranga7q1r0ish4s0maili5t0anbul7t0au2v3jaguar4va3cb2e0ep2tzt3welry6io2ll2m0p2nj2o0bs1urg4t1y2p0morgan6rs3uegos4niper7kaufen5ddi3e0rryhotels6logistics9properties14fh2g1h1i0a1ds2m1ndle4tchen5wi3m1n1oeln3matsu5sher5p0mg2n2r0d1ed3uokgroup8w1y0oto4z2la0caixa5mborghini8er3ncaster6d0rover6xess5salle5t0ino3robe5w0yer5b1c1ds2ease3clerc5frak4gal2o2xus4gbt3i0dl2fe0insurance9style7ghting6ke2lly3mited4o2ncoln4k2psy3ve1ing5k1lc1p2oan0s3cker3us3l1ndon4tte1o3ve3pl0financial11r1s1t0d0a3u0ndbeck6xe1ury5v1y2ma0drid4if1son4keup4n0agement7go3p1rket0ing3s4riott5shalls7ttel5ba2c0kinsey7d1e0d0ia3et2lbourne7me1orial6n0u2rckmsd7g1h1iami3crosoft7l1ni1t2t0subishi9k1l0b1s2m0a2n1o0bi0le4da2e1i1m1nash3ey2ster5rmon3tgage6scow4to0rcycles9v0ie4p1q1r1s0d2t0n1r2u0seum3ic4v1w1x1y1z2na0b1goya4me2tura4vy3ba2c1e0c1t0bank4flix4work5ustar5w0s2xt0direct7us4f0l2g0o2hk2i0co2ke1on3nja3ssan1y5l1o0kia3rton4w0ruz3tv4p1r0a1w2tt2u1yc2z2obi1server7ffice5kinawa6layan0group9dnavy5lo3m0ega4ne1g1l0ine5oo2pen3racle3nge4g0anic5igins6saka4tsuka4t2vh3pa0ge2nasonic7ris2s1tners4s1y3y2ccw3e0t2f0izer5g1h0armacy6d1ilips5one2to0graphy6s4ysio5ics1tet2ures6d1n0g1k2oneer5zza4k1l0ace2y0station9umbing5s3m1n0c2ohl2ker3litie5rn2st3r0america6xi3ess3ime3o0d0uctions8f1gressive8mo2perties3y5tection8u0dential9s1t1ub2w0c2y2qa1pon3uebec3st5racing4dio4e0ad1lestate6tor2y4cipes5d0stone5umbrella9hab3ise0n3t2liance6n0t0als5pair3ort3ublican8st0aurant8view0s5xroth6ich0ardli6oh3l1o1p2o0cks3deo3gers4om3s0vp3u0gby3hr2n2w0e2yukyu6sa0arland6fe0ty4kura4le1on3msclub4ung5ndvik0coromant12ofi4p1rl2s1ve2xo3b0i1s2c0a1b1haeffler7midt4olarships8ol3ule3warz5ience5ot3d1e0arch3t2cure1ity6ek2lect4ner3rvices6ven3w1x0y3fr2g1h0angrila6rp2w2ell3ia1ksha5oes2p0ping5uji3w3i0lk2na1gles5te3j1k0i0n2y0pe4l0ing4m0art3ile4n0cf3o0ccer3ial4ftbank4ware6hu2lar2utions7ng1y2y2pa0ce3ort2t3r0l2s1t0ada2ples4r1tebank4farm7c0group6ockholm6rage3e3ream4udio2y3yle4u0cks3pplies3y2ort5rf1gery5zuki5v1watch4iss4x1y0dney4stems6z2tab1ipei4lk2obao4rget4tamotors6r2too4x0i3c0i2d0k2eam2ch0nology8l1masek5nnis4va3f1g1h0d1eater2re6iaa2ckets5enda4ps2res2ol4j0maxx4x2k0maxx5l1m0all4n1o0day3kyo3ols3p1ray3shiba5tal3urs3wn2yota3s3r0ade1ing4ining5vel0ers0insurance16ust3v2t1ube2i1nes3shu4v0s2w1z2ua1bank3s2g1k1nicom3versity8o2ol2ps2s1y1z2va0cations7na1guard7c1e0gas3ntures6risign5mögensberater2ung14sicherung10t2g1i0ajes4deo3g1king4llas4n1p1rgin4sa1ion4va1o3laanderen9n1odka3lvo3te1ing3o2yage5u2wales2mart4ter4ng0gou5tch0es6eather0channel12bcam3er2site5d0ding5ibo2r3f1hoswho6ien2ki2lliamhill9n0dows4e1ners6me2olterskluwer11odside6rk0s2ld3w2s1tc1f3xbox3erox4finity6ihuan4n2xx2yz3yachts4hoo3maxun5ndex5e1odobashi7ga2kohama6u0tube6t1un3za0ppos4ra3ero3ip2m1one3uerich6w2", Wm = "ελ1υ2бг1ел3дети4ею2католик6ом3мкд2он1сква6онлайн5рг3рус2ф2сайт3рб3укр3қаз3հայ3ישראל5קום3ابوظبي5رامكو5لاردن4بحرين5جزائر5سعودية6عليان5مغرب5مارات5یران5بارت2زار4يتك3ھارت5تونس4سودان3رية5شبكة4عراق2ب2مان4فلسطين6قطر3كاثوليك6وم3مصر2ليسيا5وريتانيا7قع4همراه5پاکستان7ڀارت4कॉम3नेट3भारत0म्3ोत5संगठन5বাংলা5ভারত2ৰত4ਭਾਰਤ4ભારત4ଭାରତ4இந்தியா6லங்கை6சிங்கப்பூர்11భారత్5ಭಾರತ4ഭാരതം5ලංකා4คอม3ไทย3ລາວ3გე2みんな3アマゾン4クラウド4グーグル4コム2ストア3セール3ファッション6ポイント4世界2中信1国1國1文网3亚马逊3企业2佛山2信息2健康2八卦2公司1益2台湾1灣2商城1店1标2嘉里0大酒店5在线2大拿2天主教3娱乐2家電2广东2微博2慈善2我爱你3手机2招聘2政务1府2新加坡2闻2时尚2書籍2机构2淡马锡3游戏2澳門2点看2移动2组织机构4网址1店1站1络2联通2谷歌2购物2通販2集团2電訊盈科4飞利浦3食品2餐厅2香格里拉3港2닷넷1컴2삼성2한국2", Vt = (n, e) => {
14414
+ }), Wm = "aaa1rp3bb0ott3vie4c1le2ogado5udhabi7c0ademy5centure6ountant0s9o1tor4d0s1ult4e0g1ro2tna4f0l1rica5g0akhan5ency5i0g1rbus3force5tel5kdn3l0ibaba4pay4lfinanz6state5y2sace3tom5m0azon4ericanexpress7family11x2fam3ica3sterdam8nalytics7droid5quan4z2o0l2partments8p0le4q0uarelle8r0ab1mco4chi3my2pa2t0e3s0da2ia2sociates9t0hleta5torney7u0ction5di0ble3o3spost5thor3o0s4vianca6w0s2x0a2z0ure5ba0by2idu3namex3narepublic11d1k2r0celona5laycard4s5efoot5gains6seball5ketball8uhaus5yern5b0c1t1va3cg1n2d1e0ats2uty4er2ntley5rlin4st0buy5t2f1g1h0arti5i0ble3d1ke2ng0o3o1z2j1lack0friday9ockbuster8g1omberg7ue3m0s1w2n0pparibas9o0ats3ehringer8fa2m1nd2o0k0ing5sch2tik2on4t1utique6x2r0adesco6idgestone9oadway5ker3ther5ussels7s1t1uild0ers6siness6y1zz3v1w1y1z0h3ca0b1fe2l0l1vinklein9m0era3p2non3petown5ital0one8r0avan4ds2e0er0s4s2sa1e1h1ino4t0ering5holic7ba1n1re3c1d1enter4o1rn3f0a1d2g1h0anel2nel4rity4se2t2eap3intai5ristmas6ome4urch5i0priani6rcle4sco3tadel4i0c2y3k1l0aims4eaning6ick2nic1que6othing5ud3ub0med6m1n1o0ach3des3ffee4llege4ogne5m0cast4mbank4unity6pany2re3uter5sec4ndos3struction8ulting7tact3ractors9oking4l1p2rsica5untry4pon0s4rses6pa2r0edit0card4union9icket5own3s1uise0s6u0isinella9v1w1x1y0mru3ou3z2dabur3d1nce3ta1e1ing3sun4y2clk3ds2e0al0er2s3gree4livery5l1oitte5ta3mocrat6ntal2ist5si0gn4v2hl2iamonds6et2gital5rect0ory7scount3ver5h2y2j1k1m1np2o0cs1tor4g1mains5t1wnload7rive4tv2ubai3nlop4pont4rban5vag2r2z2earth3t2c0o2deka3u0cation8e1g1mail3erck5nergy4gineer0ing9terprises10pson4quipment8r0icsson6ni3s0q1tate5t1u0rovision8s2vents5xchange6pert3osed4ress5traspace10fage2il1rwinds6th3mily4n0s2rm0ers5shion4t3edex3edback6rrari3ero6i0delity5o2lm2nal1nce1ial7re0stone6mdale6sh0ing5t0ness6j1k1lickr3ghts4r2orist4wers5y2m1o0o0d1tball6rd1ex2sale4um3undation8x2r0ee1senius7l1ogans4ntier7tr2ujitsu5n0d2rniture7tbol5yi3ga0l0lery3o1up4me0s3p1rden4y2b0iz3d0n2e0a1nt0ing5orge5f1g0ee3h1i0ft0s3ves2ing5l0ass3e1obal2o4m0ail3bh2o1x2n1odaddy5ld0point6f2o0dyear5g0le4p1t1v2p1q1r0ainger5phics5tis4een3ipe3ocery4up4s1t1u0ardian6cci3ge2ide2tars5ru3w1y2hair2mburg5ngout5us3bo2dfc0bank7ealth0care8lp1sinki6re1mes5iphop4samitsu7tachi5v2k0t2m1n1ockey4ldings5iday5medepot5goods5s0ense7nda3rse3spital5t0ing5t0els3mail5use3w2r1sbc3t1u0ghes5yatt3undai7ibm2cbc2e1u2d1e0ee3fm2kano4l1m0amat4db2mo0bilien9n0c1dustries8finiti5o2g1k1stitute6urance4e4t0ernational10uit4vestments10o1piranga7q1r0ish4s0maili5t0anbul7t0au2v3jaguar4va3cb2e0ep2tzt3welry6io2ll2m0p2nj2o0bs1urg4t1y2p0morgan6rs3uegos4niper7kaufen5ddi3e0rryhotels6logistics9properties14fh2g1h1i0a1ds2m1ndle4tchen5wi3m1n1oeln3matsu5sher5p0mg2n2r0d1ed3uokgroup8w1y0oto4z2la0caixa5mborghini8er3ncaster6d0rover6xess5salle5t0ino3robe5w0yer5b1c1ds2ease3clerc5frak4gal2o2xus4gbt3i0dl2fe0insurance9style7ghting6ke2lly3mited4o2ncoln4k2psy3ve1ing5k1lc1p2oan0s3cker3us3l1ndon4tte1o3ve3pl0financial11r1s1t0d0a3u0ndbeck6xe1ury5v1y2ma0drid4if1son4keup4n0agement7go3p1rket0ing3s4riott5shalls7ttel5ba2c0kinsey7d1e0d0ia3et2lbourne7me1orial6n0u2rckmsd7g1h1iami3crosoft7l1ni1t2t0subishi9k1l0b1s2m0a2n1o0bi0le4da2e1i1m1nash3ey2ster5rmon3tgage6scow4to0rcycles9v0ie4p1q1r1s0d2t0n1r2u0seum3ic4v1w1x1y1z2na0b1goya4me2tura4vy3ba2c1e0c1t0bank4flix4work5ustar5w0s2xt0direct7us4f0l2g0o2hk2i0co2ke1on3nja3ssan1y5l1o0kia3rton4w0ruz3tv4p1r0a1w2tt2u1yc2z2obi1server7ffice5kinawa6layan0group9dnavy5lo3m0ega4ne1g1l0ine5oo2pen3racle3nge4g0anic5igins6saka4tsuka4t2vh3pa0ge2nasonic7ris2s1tners4s1y3y2ccw3e0t2f0izer5g1h0armacy6d1ilips5one2to0graphy6s4ysio5ics1tet2ures6d1n0g1k2oneer5zza4k1l0ace2y0station9umbing5s3m1n0c2ohl2ker3litie5rn2st3r0america6xi3ess3ime3o0d0uctions8f1gressive8mo2perties3y5tection8u0dential9s1t1ub2w0c2y2qa1pon3uebec3st5racing4dio4e0ad1lestate6tor2y4cipes5d0stone5umbrella9hab3ise0n3t2liance6n0t0als5pair3ort3ublican8st0aurant8view0s5xroth6ich0ardli6oh3l1o1p2o0cks3deo3gers4om3s0vp3u0gby3hr2n2w0e2yukyu6sa0arland6fe0ty4kura4le1on3msclub4ung5ndvik0coromant12ofi4p1rl2s1ve2xo3b0i1s2c0a1b1haeffler7midt4olarships8ol3ule3warz5ience5ot3d1e0arch3t2cure1ity6ek2lect4ner3rvices6ven3w1x0y3fr2g1h0angrila6rp2w2ell3ia1ksha5oes2p0ping5uji3w3i0lk2na1gles5te3j1k0i0n2y0pe4l0ing4m0art3ile4n0cf3o0ccer3ial4ftbank4ware6hu2lar2utions7ng1y2y2pa0ce3ort2t3r0l2s1t0ada2ples4r1tebank4farm7c0group6ockholm6rage3e3ream4udio2y3yle4u0cks3pplies3y2ort5rf1gery5zuki5v1watch4iss4x1y0dney4stems6z2tab1ipei4lk2obao4rget4tamotors6r2too4x0i3c0i2d0k2eam2ch0nology8l1masek5nnis4va3f1g1h0d1eater2re6iaa2ckets5enda4ps2res2ol4j0maxx4x2k0maxx5l1m0all4n1o0day3kyo3ols3p1ray3shiba5tal3urs3wn2yota3s3r0ade1ing4ining5vel0ers0insurance16ust3v2t1ube2i1nes3shu4v0s2w1z2ua1bank3s2g1k1nicom3versity8o2ol2ps2s1y1z2va0cations7na1guard7c1e0gas3ntures6risign5mögensberater2ung14sicherung10t2g1i0ajes4deo3g1king4llas4n1p1rgin4sa1ion4va1o3laanderen9n1odka3lvo3te1ing3o2yage5u2wales2mart4ter4ng0gou5tch0es6eather0channel12bcam3er2site5d0ding5ibo2r3f1hoswho6ien2ki2lliamhill9n0dows4e1ners6me2olterskluwer11odside6rk0s2ld3w2s1tc1f3xbox3erox4finity6ihuan4n2xx2yz3yachts4hoo3maxun5ndex5e1odobashi7ga2kohama6u0tube6t1un3za0ppos4ra3ero3ip2m1one3uerich6w2", Um = "ελ1υ2бг1ел3дети4ею2католик6ом3мкд2он1сква6онлайн5рг3рус2ф2сайт3рб3укр3қаз3հայ3ישראל5קום3ابوظبي5رامكو5لاردن4بحرين5جزائر5سعودية6عليان5مغرب5مارات5یران5بارت2زار4يتك3ھارت5تونس4سودان3رية5شبكة4عراق2ب2مان4فلسطين6قطر3كاثوليك6وم3مصر2ليسيا5وريتانيا7قع4همراه5پاکستان7ڀارت4कॉम3नेट3भारत0म्3ोत5संगठन5বাংলা5ভারত2ৰত4ਭਾਰਤ4ભારત4ଭାରତ4இந்தியா6லங்கை6சிங்கப்பூர்11భారత్5ಭಾರತ4ഭാരതം5ලංකා4คอม3ไทย3ລາວ3გე2みんな3アマゾン4クラウド4グーグル4コム2ストア3セール3ファッション6ポイント4世界2中信1国1國1文网3亚马逊3企业2佛山2信息2健康2八卦2公司1益2台湾1灣2商城1店1标2嘉里0大酒店5在线2大拿2天主教3娱乐2家電2广东2微博2慈善2我爱你3手机2招聘2政务1府2新加坡2闻2时尚2書籍2机构2淡马锡3游戏2澳門2点看2移动2组织机构4网址1店1站1络2联通2谷歌2购物2通販2集团2電訊盈科4飞利浦3食品2餐厅2香格里拉3港2닷넷1컴2삼성2한국2", Vt = (n, e) => {
14397
14415
  for (const t in e)
14398
14416
  n[t] = e[t];
14399
14417
  return n;
14400
- }, Bi = "numeric", _i = "ascii", Fi = "alpha", Dn = "asciinumeric", Mn = "alphanumeric", zi = "domain", Va = "emoji", Um = "scheme", Jm = "slashscheme", Ho = "whitespace";
14401
- function Gm(n, e) {
14418
+ }, Bi = "numeric", _i = "ascii", Fi = "alpha", Dn = "asciinumeric", Mn = "alphanumeric", zi = "domain", Va = "emoji", Jm = "scheme", Gm = "slashscheme", Ho = "whitespace";
14419
+ function Ym(n, e) {
14402
14420
  return n in e || (e[n] = []), e[n];
14403
14421
  }
14404
14422
  function dt(n, e, t) {
14405
14423
  e[Bi] && (e[Dn] = !0, e[Mn] = !0), e[_i] && (e[Dn] = !0, e[Fi] = !0), e[Dn] && (e[Mn] = !0), e[Fi] && (e[Mn] = !0), e[Mn] && (e[zi] = !0), e[Va] && (e[zi] = !0);
14406
14424
  for (const r in e) {
14407
- const i = Gm(r, t);
14425
+ const i = Ym(r, t);
14408
14426
  i.indexOf(n) < 0 && i.push(n);
14409
14427
  }
14410
14428
  }
14411
- function Ym(n, e) {
14429
+ function Xm(n, e) {
14412
14430
  const t = {};
14413
14431
  for (const r in e)
14414
14432
  e[r].indexOf(n) >= 0 && (t[r] = !0);
@@ -14530,7 +14548,7 @@ ue.prototype = {
14530
14548
  if (l ? (o = new ue(), Vt(o.j, l.j), o.jr.push.apply(o.jr, l.jr), o.jd = l.jd, o.t = l.t) : o = new ue(), s) {
14531
14549
  if (r)
14532
14550
  if (o.t && typeof o.t == "string") {
14533
- const a = Vt(Ym(o.t, r), t);
14551
+ const a = Vt(Xm(o.t, r), t);
14534
14552
  dt(s, a, r);
14535
14553
  } else
14536
14554
  t && dt(s, t, r);
@@ -14596,14 +14614,14 @@ var qa = /* @__PURE__ */ Object.freeze({
14596
14614
  SYM: xr
14597
14615
  });
14598
14616
  const wt = /[a-z]/, hi = new RegExp("\\p{L}", "u"), fi = new RegExp("\\p{Emoji}", "u"), pi = /\d/, $o = /\s/, jo = `
14599
- `, Xm = "️", Qm = "‍";
14617
+ `, Qm = "️", Zm = "‍";
14600
14618
  let wn = null, On = null;
14601
- function Zm(n) {
14619
+ function eg(n) {
14602
14620
  n === void 0 && (n = []);
14603
14621
  const e = {};
14604
14622
  ue.groups = e;
14605
14623
  const t = new ue();
14606
- wn == null && (wn = qo(Km)), On == null && (On = qo(Wm)), k(t, "'", ar), k(t, "{", rn), k(t, "}", sn), k(t, "[", Un), k(t, "]", Jn), k(t, "(", Gn), k(t, ")", Yn), k(t, "<", Xn), k(t, ">", Qn), k(t, "(", Zn), k(t, ")", er), k(t, "「", tr), k(t, "」", nr), k(t, "『", rr), k(t, "』", ir), k(t, "<", sr), k(t, ">", or), k(t, "&", lr), k(t, "*", cr), k(t, "@", We), k(t, "`", ur), k(t, "^", hr), k(t, ":", Je), k(t, ",", ys), k(t, "$", fr), k(t, ".", we), k(t, "=", pr), k(t, "!", bs), k(t, "-", Oe), k(t, "%", mr), k(t, "|", gr), k(t, "+", yr), k(t, "#", br), k(t, "?", kr), k(t, '"', ks), k(t, "/", ve), k(t, ";", Ss), k(t, "~", on), k(t, "_", Sr), k(t, "\\", dr);
14624
+ wn == null && (wn = qo(Wm)), On == null && (On = qo(Um)), k(t, "'", ar), k(t, "{", rn), k(t, "}", sn), k(t, "[", Un), k(t, "]", Jn), k(t, "(", Gn), k(t, ")", Yn), k(t, "<", Xn), k(t, ">", Qn), k(t, "(", Zn), k(t, ")", er), k(t, "「", tr), k(t, "」", nr), k(t, "『", rr), k(t, "』", ir), k(t, "<", sr), k(t, ">", or), k(t, "&", lr), k(t, "*", cr), k(t, "@", We), k(t, "`", ur), k(t, "^", hr), k(t, ":", Je), k(t, ",", ys), k(t, "$", fr), k(t, ".", we), k(t, "=", pr), k(t, "!", bs), k(t, "-", Oe), k(t, "%", mr), k(t, "|", gr), k(t, "+", yr), k(t, "#", br), k(t, "?", kr), k(t, '"', ks), k(t, "/", ve), k(t, ";", Ss), k(t, "~", on), k(t, "_", Sr), k(t, "\\", dr);
14607
14625
  const r = ye(t, pi, ms, {
14608
14626
  [Bi]: !0
14609
14627
  });
@@ -14625,8 +14643,8 @@ function Zm(n) {
14625
14643
  const l = ye(t, fi, ja, {
14626
14644
  [Va]: !0
14627
14645
  });
14628
- ye(l, fi, l), k(l, Xm, l);
14629
- const a = k(l, Qm);
14646
+ ye(l, fi, l), k(l, Qm, l);
14647
+ const a = k(l, Zm);
14630
14648
  ye(a, fi, l);
14631
14649
  const c = [[wt, i]], d = [[wt, null], [hi, s]];
14632
14650
  for (let u = 0; u < wn.length; u++)
@@ -14648,9 +14666,9 @@ function Zm(n) {
14648
14666
  }, e), n = n.sort((u, h) => u[0] > h[0] ? 1 : -1);
14649
14667
  for (let u = 0; u < n.length; u++) {
14650
14668
  const h = n[u][0], p = n[u][1] ? {
14651
- [Um]: !0
14652
- } : {
14653
14669
  [Jm]: !0
14670
+ } : {
14671
+ [Gm]: !0
14654
14672
  };
14655
14673
  h.indexOf("-") >= 0 ? p[zi] = !0 : wt.test(h) ? pi.test(h) ? p[Dn] = !0 : p[_i] = !0 : p[Bi] = !0, Vo(t, h, h, p);
14656
14674
  }
@@ -14663,8 +14681,8 @@ function Zm(n) {
14663
14681
  }, qa)
14664
14682
  };
14665
14683
  }
14666
- function eg(n, e) {
14667
- const t = tg(e.replace(/[A-Z]/g, (l) => l.toLowerCase())), r = t.length, i = [];
14684
+ function tg(n, e) {
14685
+ const t = ng(e.replace(/[A-Z]/g, (l) => l.toLowerCase())), r = t.length, i = [];
14668
14686
  let s = 0, o = 0;
14669
14687
  for (; o < r; ) {
14670
14688
  let l = n, a = null, c = 0, d = null, u = -1, h = -1;
@@ -14683,7 +14701,7 @@ function eg(n, e) {
14683
14701
  }
14684
14702
  return i;
14685
14703
  }
14686
- function tg(n) {
14704
+ function ng(n) {
14687
14705
  const e = [], t = n.length;
14688
14706
  let r = 0;
14689
14707
  for (; r < t; ) {
@@ -14930,7 +14948,7 @@ const Wo = Vr("email", {
14930
14948
  toHref() {
14931
14949
  return "mailto:" + this.toString();
14932
14950
  }
14933
- }), Uo = Vr("text"), ng = Vr("nl"), vn = Vr("url", {
14951
+ }), Uo = Vr("text"), rg = Vr("nl"), vn = Vr("url", {
14934
14952
  isLink: !0,
14935
14953
  /**
14936
14954
  Lowercases relevant parts of the domain and adds the protocol if
@@ -14951,7 +14969,7 @@ const Wo = Vr("email", {
14951
14969
  return n.length >= 2 && n[0].t !== yn && n[1].t === Je;
14952
14970
  }
14953
14971
  }), be = (n) => new ue(n);
14954
- function rg(n) {
14972
+ function ig(n) {
14955
14973
  let {
14956
14974
  groups: e
14957
14975
  } = n;
@@ -15009,12 +15027,12 @@ function rg(n) {
15009
15027
  const $e = be();
15010
15028
  v(Ve, r), v(fe, t, fe), v(fe, r, $e), v($e, t, fe), v($e, r, $e), k(fe, He, E), k($e, He, E);
15011
15029
  }
15012
- return k(s, yn, T), k(s, gs, ng), {
15030
+ return k(s, yn, T), k(s, gs, rg), {
15013
15031
  start: s,
15014
15032
  tokens: qa
15015
15033
  };
15016
15034
  }
15017
- function ig(n, e, t) {
15035
+ function sg(n, e, t) {
15018
15036
  let r = t.length, i = 0, s = [], o = [];
15019
15037
  for (; i < r; ) {
15020
15038
  let l = n, a = null, c = null, d = 0, u = null, h = -1;
@@ -15036,8 +15054,8 @@ function mi(n, e, t) {
15036
15054
  const r = t[0].s, i = t[t.length - 1].e, s = e.slice(r, i);
15037
15055
  return new n(s, t);
15038
15056
  }
15039
- const sg = typeof console < "u" && console && console.warn || (() => {
15040
- }), og = "until manual call of linkify.init(). Register all schemes and plugins before invoking linkify the first time.", _ = {
15057
+ const og = typeof console < "u" && console && console.warn || (() => {
15058
+ }), lg = "until manual call of linkify.init(). Register all schemes and plugins before invoking linkify the first time.", _ = {
15041
15059
  scanner: null,
15042
15060
  parser: null,
15043
15061
  tokenQueue: [],
@@ -15045,24 +15063,24 @@ const sg = typeof console < "u" && console && console.warn || (() => {
15045
15063
  customSchemes: [],
15046
15064
  initialized: !1
15047
15065
  };
15048
- function lg() {
15066
+ function ag() {
15049
15067
  ue.groups = {}, _.scanner = null, _.parser = null, _.tokenQueue = [], _.pluginQueue = [], _.customSchemes = [], _.initialized = !1;
15050
15068
  }
15051
15069
  function Jo(n, e) {
15052
- if (e === void 0 && (e = !1), _.initialized && sg(`linkifyjs: already initialized - will not register custom scheme "${n}" ${og}`), !/^[0-9a-z]+(-[0-9a-z]+)*$/.test(n))
15070
+ if (e === void 0 && (e = !1), _.initialized && og(`linkifyjs: already initialized - will not register custom scheme "${n}" ${lg}`), !/^[0-9a-z]+(-[0-9a-z]+)*$/.test(n))
15053
15071
  throw new Error(`linkifyjs: incorrect scheme format.
15054
15072
  1. Must only contain digits, lowercase ASCII letters or "-"
15055
15073
  2. Cannot start or end with "-"
15056
15074
  3. "-" cannot repeat`);
15057
15075
  _.customSchemes.push([n, e]);
15058
15076
  }
15059
- function ag() {
15060
- _.scanner = Zm(_.customSchemes);
15077
+ function cg() {
15078
+ _.scanner = eg(_.customSchemes);
15061
15079
  for (let n = 0; n < _.tokenQueue.length; n++)
15062
15080
  _.tokenQueue[n][1]({
15063
15081
  scanner: _.scanner
15064
15082
  });
15065
- _.parser = rg(_.scanner.tokens);
15083
+ _.parser = ig(_.scanner.tokens);
15066
15084
  for (let n = 0; n < _.pluginQueue.length; n++)
15067
15085
  _.pluginQueue[n][1]({
15068
15086
  scanner: _.scanner,
@@ -15070,8 +15088,8 @@ function ag() {
15070
15088
  });
15071
15089
  _.initialized = !0;
15072
15090
  }
15073
- function cg(n) {
15074
- return _.initialized || ag(), ig(_.parser.start, n, eg(_.scanner.start, n));
15091
+ function dg(n) {
15092
+ return _.initialized || cg(), sg(_.parser.start, n, tg(_.scanner.start, n));
15075
15093
  }
15076
15094
  function Cs(n, e, t) {
15077
15095
  if (e === void 0 && (e = null), t === void 0 && (t = null), e && typeof e == "object") {
@@ -15079,14 +15097,14 @@ function Cs(n, e, t) {
15079
15097
  throw Error(`linkifyjs: Invalid link type ${e}; must be a string`);
15080
15098
  t = e, e = null;
15081
15099
  }
15082
- const r = new xs(t), i = cg(n), s = [];
15100
+ const r = new xs(t), i = dg(n), s = [];
15083
15101
  for (let o = 0; o < i.length; o++) {
15084
15102
  const l = i[o];
15085
15103
  l.isLink && (!e || l.t === e) && r.check(l) && s.push(l.toFormattedObject(r));
15086
15104
  }
15087
15105
  return s;
15088
15106
  }
15089
- function dg(n) {
15107
+ function ug(n) {
15090
15108
  return new Q({
15091
15109
  key: new ie("autolink"),
15092
15110
  appendTransaction: (e, t, r) => {
@@ -15119,7 +15137,7 @@ function dg(n) {
15119
15137
  }
15120
15138
  });
15121
15139
  }
15122
- function ug(n) {
15140
+ function hg(n) {
15123
15141
  return new Q({
15124
15142
  key: new ie("handleClickLink"),
15125
15143
  props: {
@@ -15133,7 +15151,7 @@ function ug(n) {
15133
15151
  }
15134
15152
  });
15135
15153
  }
15136
- function hg(n) {
15154
+ function fg(n) {
15137
15155
  return new Q({
15138
15156
  key: new ie("handlePasteLink"),
15139
15157
  props: {
@@ -15153,7 +15171,7 @@ function hg(n) {
15153
15171
  }
15154
15172
  });
15155
15173
  }
15156
- const fg = xe.create({
15174
+ const pg = xe.create({
15157
15175
  name: "link",
15158
15176
  priority: 1e3,
15159
15177
  keepOnSplit: !1,
@@ -15167,7 +15185,7 @@ const fg = xe.create({
15167
15185
  });
15168
15186
  },
15169
15187
  onDestroy() {
15170
- lg();
15188
+ ag();
15171
15189
  },
15172
15190
  inclusive() {
15173
15191
  return this.options.autolink;
@@ -15258,17 +15276,17 @@ const fg = xe.create({
15258
15276
  },
15259
15277
  addProseMirrorPlugins() {
15260
15278
  const n = [];
15261
- return this.options.autolink && n.push(dg({
15279
+ return this.options.autolink && n.push(ug({
15262
15280
  type: this.type,
15263
15281
  validate: this.options.validate
15264
- })), this.options.openOnClick && n.push(ug({
15282
+ })), this.options.openOnClick && n.push(hg({
15265
15283
  type: this.type
15266
- })), this.options.linkOnPaste && n.push(hg({
15284
+ })), this.options.linkOnPaste && n.push(fg({
15267
15285
  editor: this.editor,
15268
15286
  type: this.type
15269
15287
  })), n;
15270
15288
  }
15271
- }), pg = ne.create({
15289
+ }), mg = ne.create({
15272
15290
  name: "listItem",
15273
15291
  addOptions() {
15274
15292
  return {
@@ -15296,7 +15314,7 @@ const fg = xe.create({
15296
15314
  "Shift-Tab": () => this.editor.commands.liftListItem(this.name)
15297
15315
  };
15298
15316
  }
15299
- }), mg = ne.create({
15317
+ }), gg = ne.create({
15300
15318
  name: "listItem",
15301
15319
  addOptions() {
15302
15320
  return {
@@ -15350,7 +15368,7 @@ const fg = xe.create({
15350
15368
  }
15351
15369
  };
15352
15370
  }
15353
- }), Yo = /^(\d+)\.\s$/, gg = ne.create({
15371
+ }), Yo = /^(\d+)\.\s$/, yg = ne.create({
15354
15372
  name: "orderedList",
15355
15373
  addOptions() {
15356
15374
  return {
@@ -15385,7 +15403,7 @@ const fg = xe.create({
15385
15403
  },
15386
15404
  addCommands() {
15387
15405
  return {
15388
- toggleOrderedList: () => ({ commands: n, chain: e }) => this.options.keepAttributes ? e().toggleList(this.name, this.options.itemTypeName, this.options.keepMarks).updateAttributes(mg.name, this.editor.getAttributes(Go.name)).run() : n.toggleList(this.name, this.options.itemTypeName, this.options.keepMarks)
15406
+ toggleOrderedList: () => ({ commands: n, chain: e }) => this.options.keepAttributes ? e().toggleList(this.name, this.options.itemTypeName, this.options.keepMarks).updateAttributes(gg.name, this.editor.getAttributes(Go.name)).run() : n.toggleList(this.name, this.options.itemTypeName, this.options.keepMarks)
15389
15407
  };
15390
15408
  },
15391
15409
  addKeyboardShortcuts() {
@@ -15412,7 +15430,7 @@ const fg = xe.create({
15412
15430
  n
15413
15431
  ];
15414
15432
  }
15415
- }), yg = /(?:^|\s)((?:~~)((?:[^~]+))(?:~~))$/, bg = /(?:^|\s)((?:~~)((?:[^~]+))(?:~~))/g, kg = xe.create({
15433
+ }), bg = /(?:^|\s)((?:~~)((?:[^~]+))(?:~~))$/, kg = /(?:^|\s)((?:~~)((?:[^~]+))(?:~~))/g, Sg = xe.create({
15416
15434
  name: "strike",
15417
15435
  addOptions() {
15418
15436
  return {
@@ -15454,7 +15472,7 @@ const fg = xe.create({
15454
15472
  addInputRules() {
15455
15473
  return [
15456
15474
  mn({
15457
- find: yg,
15475
+ find: bg,
15458
15476
  type: this.type
15459
15477
  })
15460
15478
  ];
@@ -15462,12 +15480,12 @@ const fg = xe.create({
15462
15480
  addPasteRules() {
15463
15481
  return [
15464
15482
  Ht({
15465
- find: bg,
15483
+ find: kg,
15466
15484
  type: this.type
15467
15485
  })
15468
15486
  ];
15469
15487
  }
15470
- }), Sg = xe.create({
15488
+ }), xg = xe.create({
15471
15489
  name: "underline",
15472
15490
  addOptions() {
15473
15491
  return {
@@ -15502,10 +15520,10 @@ const fg = xe.create({
15502
15520
  "Mod-U": () => this.editor.commands.toggleUnderline()
15503
15521
  };
15504
15522
  }
15505
- }), xg = ne.create({
15523
+ }), Cg = ne.create({
15506
15524
  name: "text",
15507
15525
  group: "inline"
15508
- }), Cg = ge.create({
15526
+ }), Eg = ge.create({
15509
15527
  name: "textAlign",
15510
15528
  addOptions() {
15511
15529
  return {
@@ -15542,7 +15560,7 @@ const fg = xe.create({
15542
15560
  "Mod-Shift-j": () => this.editor.commands.setTextAlign("justify")
15543
15561
  };
15544
15562
  }
15545
- }), Eg = {
15563
+ }), Tg = {
15546
15564
  name: "EmojiComponent",
15547
15565
  components: {
15548
15566
  NodeViewWrapper: Fa,
@@ -15550,7 +15568,7 @@ const fg = xe.create({
15550
15568
  },
15551
15569
  props: za
15552
15570
  };
15553
- function Tg(n, e, t, r, i, s) {
15571
+ function Mg(n, e, t, r, i, s) {
15554
15572
  const o = $("dt-emoji"), l = $("node-view-wrapper");
15555
15573
  return O(), z(l, { class: "d-d-inline-block d-va-bottom d-lh0" }, {
15556
15574
  default: q(() => [
@@ -15562,10 +15580,10 @@ function Tg(n, e, t, r, i, s) {
15562
15580
  _: 1
15563
15581
  });
15564
15582
  }
15565
- const Mg = /* @__PURE__ */ de(Eg, [["render", Tg]]);
15566
- function wg(n) {
15583
+ const wg = /* @__PURE__ */ de(Tg, [["render", Mg]]);
15584
+ function Og(n) {
15567
15585
  var e;
15568
- const { char: t, allowSpaces: r, allowedPrefixes: i, startOfLine: s, $position: o } = n, l = bm(t), a = new RegExp(`\\s${l}$`), c = s ? "^" : "", d = r ? new RegExp(`${c}${l}.*?(?=\\s${l}|$)`, "gm") : new RegExp(`${c}(?:^)?${l}[^\\s${l}]*`, "gm"), u = ((e = o.nodeBefore) === null || e === void 0 ? void 0 : e.isText) && o.nodeBefore.text;
15586
+ const { char: t, allowSpaces: r, allowedPrefixes: i, startOfLine: s, $position: o } = n, l = km(t), a = new RegExp(`\\s${l}$`), c = s ? "^" : "", d = r ? new RegExp(`${c}${l}.*?(?=\\s${l}|$)`, "gm") : new RegExp(`${c}(?:^)?${l}[^\\s${l}]*`, "gm"), u = ((e = o.nodeBefore) === null || e === void 0 ? void 0 : e.isText) && o.nodeBefore.text;
15569
15587
  if (!u)
15570
15588
  return null;
15571
15589
  const h = o.pos - u.length, f = Array.from(u.matchAll(d)).pop();
@@ -15585,8 +15603,8 @@ function wg(n) {
15585
15603
  text: f[0]
15586
15604
  } : null;
15587
15605
  }
15588
- const Og = new ie("suggestion");
15589
- function Wa({ pluginKey: n = Og, editor: e, char: t = "@", allowSpaces: r = !1, allowedPrefixes: i = [" "], startOfLine: s = !1, decorationTag: o = "span", decorationClass: l = "suggestion", command: a = () => null, items: c = () => [], render: d = () => ({}), allow: u = () => !0 }) {
15606
+ const vg = new ie("suggestion");
15607
+ function Wa({ pluginKey: n = vg, editor: e, char: t = "@", allowSpaces: r = !1, allowedPrefixes: i = [" "], startOfLine: s = !1, decorationTag: o = "span", decorationClass: l = "suggestion", command: a = () => null, items: c = () => [], render: d = () => ({}), allow: u = () => !0 }) {
15590
15608
  let h;
15591
15609
  const f = d == null ? void 0 : d(), p = new Q({
15592
15610
  key: n,
@@ -15649,7 +15667,7 @@ function Wa({ pluginKey: n = Og, editor: e, char: t = "@", allowSpaces: r = !1,
15649
15667
  const { isEditable: T } = e, { composing: R } = e.view, { selection: P } = m, { empty: E, from: L } = P, I = { ...g };
15650
15668
  if (I.composing = R, T && (E || e.view.composing)) {
15651
15669
  (L < g.range.from || L > g.range.to) && !R && !g.composing && (I.active = !1);
15652
- const M = wg({
15670
+ const M = Og({
15653
15671
  char: t,
15654
15672
  allowSpaces: r,
15655
15673
  allowedPrefixes: i,
@@ -15684,10 +15702,10 @@ function Wa({ pluginKey: n = Og, editor: e, char: t = "@", allowSpaces: r = !1,
15684
15702
  });
15685
15703
  return p;
15686
15704
  }
15687
- const vg = {
15705
+ const Ag = {
15688
15706
  name: "SuggestionList",
15689
15707
  components: {
15690
- DtListItem: od
15708
+ DtListItem: ld
15691
15709
  },
15692
15710
  props: {
15693
15711
  items: {
@@ -15749,14 +15767,14 @@ const vg = {
15749
15767
  }
15750
15768
  }
15751
15769
  }
15752
- }, Ag = { class: "d-popover__dialog" }, Ng = {
15770
+ }, Ng = { class: "d-popover__dialog" }, Dg = {
15753
15771
  ref: "suggestionList",
15754
15772
  class: "dt-suggestion-list"
15755
15773
  };
15756
- function Dg(n, e, t, r, i, s) {
15774
+ function Ig(n, e, t, r, i, s) {
15757
15775
  const o = $("dt-list-item");
15758
- return O(), j("div", Ag, [
15759
- yc(ht("ul", Ng, [
15776
+ return O(), j("div", Ng, [
15777
+ yc(ht("ul", Dg, [
15760
15778
  (O(!0), j(bc, null, il(t.items, (l, a) => (O(), z(o, {
15761
15779
  key: l.id,
15762
15780
  class: X([
@@ -15777,7 +15795,7 @@ function Dg(n, e, t, r, i, s) {
15777
15795
  ])
15778
15796
  ]);
15779
15797
  }
15780
- const Ua = /* @__PURE__ */ de(vg, [["render", Dg]]), Ig = {
15798
+ const Ua = /* @__PURE__ */ de(Ag, [["render", Ig]]), Rg = {
15781
15799
  name: "EmojiSuggestion",
15782
15800
  components: {
15783
15801
  DtEmoji: tl,
@@ -15790,7 +15808,7 @@ const Ua = /* @__PURE__ */ de(vg, [["render", Dg]]), Ig = {
15790
15808
  }
15791
15809
  }
15792
15810
  };
15793
- function Rg(n, e, t, r, i, s) {
15811
+ function Pg(n, e, t, r, i, s) {
15794
15812
  const o = $("dt-emoji"), l = $("dt-stack");
15795
15813
  return O(), z(l, {
15796
15814
  direction: "row",
@@ -15806,7 +15824,7 @@ function Rg(n, e, t, r, i, s) {
15806
15824
  _: 1
15807
15825
  });
15808
15826
  }
15809
- const Pg = /* @__PURE__ */ de(Ig, [["render", Rg]]), Lg = {
15827
+ const Lg = /* @__PURE__ */ de(Rg, [["render", Pg]]), Bg = {
15810
15828
  items: ({ query: n }) => n.length < 2 ? [] : Object.values(cc).filter(function(r) {
15811
15829
  return !!r.shortname.substring(1, r.shortname.length - 1).startsWith(n.toLowerCase());
15812
15830
  }).map((r) => ({ id: r.unicode_character, code: r.shortname })),
@@ -15830,7 +15848,7 @@ const Pg = /* @__PURE__ */ de(Ig, [["render", Rg]]), Lg = {
15830
15848
  onStart: (t) => {
15831
15849
  n = new ps(Ua, {
15832
15850
  props: {
15833
- itemComponent: wr(Pg),
15851
+ itemComponent: wr(Lg),
15834
15852
  itemType: "emoji",
15835
15853
  ...t
15836
15854
  },
@@ -15861,24 +15879,24 @@ const Pg = /* @__PURE__ */ de(Ig, [["render", Rg]]), Lg = {
15861
15879
  }
15862
15880
  };
15863
15881
  }
15864
- }, Bg = new ie("emoji"), _g = /:\w+:$/, Fg = /:\w+:/g, zg = /(\u00a9|\u00ae|[\u2000-\u3300]|\ud83c[\ud000-\udfff]|\ud83d[\ud000-\udfff]|\ud83e[\ud000-\udfff])$/, Hg = /(\u00a9|\u00ae|[\u2000-\u3300]|\ud83c[\ud000-\udfff]|\ud83d[\ud000-\udfff]|\ud83e[\ud000-\udfff])/g, Xo = (n) => {
15882
+ }, _g = new ie("emoji"), Fg = /:\w+:$/, zg = /:\w+:/g, Hg = /(\u00a9|\u00ae|[\u2000-\u3300]|\ud83c[\ud000-\udfff]|\ud83d[\ud000-\udfff]|\ud83e[\ud000-\udfff])$/, Vg = /(\u00a9|\u00ae|[\u2000-\u3300]|\ud83c[\ud000-\udfff]|\ud83d[\ud000-\udfff]|\ud83e[\ud000-\udfff])/g, Xo = (n) => {
15865
15883
  if (n && nl(n[0]))
15866
15884
  return {
15867
15885
  index: n.index,
15868
15886
  text: n[0],
15869
15887
  match: n
15870
15888
  };
15871
- }, Vg = (n) => [...n.matchAll(Fg)].filter((t) => nl(t[0])).map((t) => ({
15889
+ }, $g = (n) => [...n.matchAll(zg)].filter((t) => nl(t[0])).map((t) => ({
15872
15890
  index: t.index,
15873
15891
  text: t[0],
15874
15892
  match: t
15875
- })), $g = ne.create({
15893
+ })), jg = ne.create({
15876
15894
  addOptions() {
15877
15895
  return {
15878
15896
  HTMLAttributes: {},
15879
15897
  suggestion: {
15880
15898
  char: ":",
15881
- pluginKey: Bg
15899
+ pluginKey: _g
15882
15900
  }
15883
15901
  };
15884
15902
  },
@@ -15887,7 +15905,7 @@ const Pg = /* @__PURE__ */ de(Ig, [["render", Rg]]), Lg = {
15887
15905
  inline: !0,
15888
15906
  selectable: !0,
15889
15907
  addNodeView() {
15890
- return Ha(Mg);
15908
+ return Ha(wg);
15891
15909
  },
15892
15910
  addAttributes() {
15893
15911
  return {
@@ -15917,7 +15935,7 @@ const Pg = /* @__PURE__ */ de(Ig, [["render", Rg]]), Lg = {
15917
15935
  // shortcode input
15918
15936
  Po({
15919
15937
  find: (n) => {
15920
- const e = n.match(_g);
15938
+ const e = n.match(Fg);
15921
15939
  return Xo(e);
15922
15940
  },
15923
15941
  type: this.type,
@@ -15929,7 +15947,7 @@ const Pg = /* @__PURE__ */ de(Ig, [["render", Rg]]), Lg = {
15929
15947
  }),
15930
15948
  Po({
15931
15949
  find: (n) => {
15932
- const e = n.match(zg);
15950
+ const e = n.match(Hg);
15933
15951
  return Xo(e);
15934
15952
  },
15935
15953
  type: this.type,
@@ -15946,7 +15964,7 @@ const Pg = /* @__PURE__ */ de(Ig, [["render", Rg]]), Lg = {
15946
15964
  addPasteRules() {
15947
15965
  return [
15948
15966
  Bo({
15949
- find: Vg,
15967
+ find: $g,
15950
15968
  type: this.type,
15951
15969
  getAttributes(n) {
15952
15970
  return {
@@ -15955,7 +15973,7 @@ const Pg = /* @__PURE__ */ de(Ig, [["render", Rg]]), Lg = {
15955
15973
  }
15956
15974
  }),
15957
15975
  Bo({
15958
- find: Hg,
15976
+ find: Vg,
15959
15977
  type: this.type,
15960
15978
  getAttributes(n) {
15961
15979
  return {
@@ -15970,12 +15988,12 @@ const Pg = /* @__PURE__ */ de(Ig, [["render", Rg]]), Lg = {
15970
15988
  Wa({
15971
15989
  editor: this.editor,
15972
15990
  ...this.options.suggestion,
15973
- ...Lg
15991
+ ...Bg
15974
15992
  })
15975
15993
  ];
15976
15994
  }
15977
15995
  });
15978
- function jg(n, e, t = () => !0) {
15996
+ function qg(n, e, t = () => !0) {
15979
15997
  const r = [];
15980
15998
  e.lastIndex = 0;
15981
15999
  let i;
@@ -15983,10 +16001,10 @@ function jg(n, e, t = () => !0) {
15983
16001
  t(n, i) && r.push(i);
15984
16002
  return r;
15985
16003
  }
15986
- function qg(n, e) {
16004
+ function Kg(n, e) {
15987
16005
  return !["#", "@"].includes(n.charAt(e.index)) && !["#", "@"].includes(n.charAt(e.index - 1));
15988
16006
  }
15989
- function Kg(n) {
16007
+ function Wg(n) {
15990
16008
  const e = new RegExp(
15991
16009
  "(?:" + [
15992
16010
  `[!?.,:;'"]`,
@@ -15996,7 +16014,7 @@ function Kg(n) {
15996
16014
  );
15997
16015
  return n.replace(e, "");
15998
16016
  }
15999
- function Wg(n, e) {
16017
+ function Ug(n, e) {
16000
16018
  const t = n.slice(0, e + 1).search(/\S+\s*$/), r = n.slice(e).search(/\s/);
16001
16019
  if (r < 0) {
16002
16020
  const i = n.slice(t);
@@ -16013,13 +16031,13 @@ function Wg(n, e) {
16013
16031
  };
16014
16032
  }
16015
16033
  function ji(n, e, t, r) {
16016
- const i = Wg(n, e);
16034
+ const i = Ug(n, e);
16017
16035
  if (r.lastIndex = 0, !r.test(i.text))
16018
16036
  return i;
16019
16037
  const s = t === "left" ? i.from - 1 : i.to + 1;
16020
16038
  return s <= 0 || s >= n.length || s === e ? i : ji(n, s, t, r);
16021
16039
  }
16022
- function Ug(n, e, t, r) {
16040
+ function Jg(n, e, t, r) {
16023
16041
  const i = Math.max(n.from - 1, 0), s = Math.min(n.to + 1, e.content.size), o = Hr(i, s, e);
16024
16042
  for (const l of o)
16025
16043
  l.mark.type === r && t.removeMark(l.from, l.to, r);
@@ -16041,12 +16059,12 @@ function Zo(n, e, t, r, i, s) {
16041
16059
  "right",
16042
16060
  Qo
16043
16061
  ), d = n.slice(a.from, c.to);
16044
- jg(d, ic, qg).forEach((h) => {
16045
- const f = Kg(h[0]), p = e + a.from + h.index + 1, m = p + f.length;
16062
+ qg(d, ic, Kg).forEach((h) => {
16063
+ const f = Wg(h[0]), p = e + a.from + h.index + 1, m = p + f.length;
16046
16064
  i.addMark(p, m, s.create());
16047
16065
  });
16048
16066
  }
16049
- function Jg(n) {
16067
+ function Gg(n) {
16050
16068
  let e = !1;
16051
16069
  return new Q({
16052
16070
  key: new ie("autolink"),
@@ -16061,7 +16079,7 @@ function Jg(n) {
16061
16079
  [...t]
16062
16080
  );
16063
16081
  return Pa(a).forEach(({ oldRange: d, newRange: u }) => {
16064
- Ug(u, i.doc, o, n.type), Ia(
16082
+ Jg(u, i.doc, o, n.type), Ia(
16065
16083
  i.doc,
16066
16084
  u,
16067
16085
  (f) => f.isTextblock
@@ -16079,10 +16097,10 @@ function Jg(n) {
16079
16097
  }
16080
16098
  });
16081
16099
  }
16082
- const Gg = {
16100
+ const Yg = {
16083
16101
  class: "d-link d-c-text d-d-inline-block",
16084
16102
  rel: "noopener noreferrer nofollow"
16085
- }, Yg = xe.create({
16103
+ }, Xg = xe.create({
16086
16104
  name: "Link",
16087
16105
  renderHTML({ HTMLAttributes: n }) {
16088
16106
  return [
@@ -16090,7 +16108,7 @@ const Gg = {
16090
16108
  F(
16091
16109
  this.options.HTMLAttributes,
16092
16110
  n,
16093
- Gg
16111
+ Yg
16094
16112
  ),
16095
16113
  0
16096
16114
  ];
@@ -16100,10 +16118,10 @@ const Gg = {
16100
16118
  },
16101
16119
  addProseMirrorPlugins() {
16102
16120
  return [
16103
- Jg({ type: this.type })
16121
+ Gg({ type: this.type })
16104
16122
  ];
16105
16123
  }
16106
- }), Xg = new ie("mention"), Qg = ne.create({
16124
+ }), Qg = new ie("mention"), Zg = ne.create({
16107
16125
  name: "mention",
16108
16126
  addOptions() {
16109
16127
  return {
@@ -16114,7 +16132,7 @@ const Gg = {
16114
16132
  },
16115
16133
  suggestion: {
16116
16134
  char: "@",
16117
- pluginKey: Xg,
16135
+ pluginKey: Qg,
16118
16136
  command: ({ editor: n, range: e, props: t }) => {
16119
16137
  var r, i;
16120
16138
  const s = n.view.state.selection.$to.nodeAfter;
@@ -16201,7 +16219,7 @@ const Gg = {
16201
16219
  })
16202
16220
  ];
16203
16221
  }
16204
- }), Zg = {
16222
+ }), ey = {
16205
16223
  name: "MentionComponent",
16206
16224
  components: {
16207
16225
  NodeViewWrapper: Fa,
@@ -16214,7 +16232,7 @@ const Gg = {
16214
16232
  }
16215
16233
  }
16216
16234
  };
16217
- function ey(n, e, t, r, i, s) {
16235
+ function ty(n, e, t, r, i, s) {
16218
16236
  const o = $("dt-link"), l = $("node-view-wrapper");
16219
16237
  return O(), z(l, { class: "d-d-inline-block" }, {
16220
16238
  default: q(() => [
@@ -16232,9 +16250,9 @@ function ey(n, e, t, r, i, s) {
16232
16250
  _: 1
16233
16251
  });
16234
16252
  }
16235
- const ty = /* @__PURE__ */ de(Zg, [["render", ey]]), ny = Qg.extend({
16253
+ const ny = /* @__PURE__ */ de(ey, [["render", ty]]), ry = Zg.extend({
16236
16254
  addNodeView() {
16237
- return Ha(ty);
16255
+ return Ha(ny);
16238
16256
  },
16239
16257
  parseHTML() {
16240
16258
  return [
@@ -16262,22 +16280,22 @@ const ty = /* @__PURE__ */ de(Zg, [["render", ey]]), ny = Qg.extend({
16262
16280
  renderHTML({ HTMLAttributes: n }) {
16263
16281
  return ["mention-component", F(this.options.HTMLAttributes, n), 0];
16264
16282
  }
16265
- }), ry = [
16283
+ }), iy = [
16266
16284
  "text",
16267
16285
  "json",
16268
16286
  "html"
16269
- ], iy = [
16287
+ ], sy = [
16270
16288
  "start",
16271
16289
  "end",
16272
16290
  "all"
16273
- ], sy = [
16291
+ ], oy = [
16274
16292
  "https",
16275
16293
  "http",
16276
16294
  "ftp",
16277
16295
  "ftps",
16278
16296
  "sftp",
16279
16297
  "mailto"
16280
- ], oy = {
16298
+ ], ly = {
16281
16299
  name: "MentionSuggestion",
16282
16300
  components: {
16283
16301
  DtAvatar: Fc,
@@ -16298,7 +16316,7 @@ const ty = /* @__PURE__ */ de(Zg, [["render", ey]]), ny = Qg.extend({
16298
16316
  }
16299
16317
  }
16300
16318
  };
16301
- function ly(n, e, t, r, i, s) {
16319
+ function ay(n, e, t, r, i, s) {
16302
16320
  const o = $("dt-avatar"), l = $("dt-stack");
16303
16321
  return O(), z(l, {
16304
16322
  direction: "row",
@@ -16315,7 +16333,7 @@ function ly(n, e, t, r, i, s) {
16315
16333
  _: 1
16316
16334
  });
16317
16335
  }
16318
- const ay = /* @__PURE__ */ de(oy, [["render", ly]]), cy = {
16336
+ const cy = /* @__PURE__ */ de(ly, [["render", ay]]), dy = {
16319
16337
  // This function comes from the user and passed to the editor directly.
16320
16338
  // This will also activate the mention plugin on the editor
16321
16339
  // items: ({ query }) => { return [] },
@@ -16325,7 +16343,7 @@ const ay = /* @__PURE__ */ de(oy, [["render", ly]]), cy = {
16325
16343
  onStart: (t) => {
16326
16344
  n = new ps(Ua, {
16327
16345
  props: {
16328
- itemComponent: wr(ay),
16346
+ itemComponent: wr(cy),
16329
16347
  itemType: "mention",
16330
16348
  ...t
16331
16349
  },
@@ -16354,10 +16372,10 @@ const ay = /* @__PURE__ */ de(oy, [["render", ly]]), cy = {
16354
16372
  }
16355
16373
  };
16356
16374
  }
16357
- }, dy = {
16375
+ }, uy = {
16358
16376
  name: "DtRichTextEditor",
16359
16377
  components: {
16360
- EditorContent: Cm
16378
+ EditorContent: Em
16361
16379
  },
16362
16380
  props: {
16363
16381
  /**
@@ -16413,7 +16431,7 @@ const ay = /* @__PURE__ */ de(oy, [["render", ly]]), cy = {
16413
16431
  type: [Boolean, String, Number],
16414
16432
  default: !1,
16415
16433
  validator(n) {
16416
- return typeof n == "string" ? iy.includes(n) : !0;
16434
+ return typeof n == "string" ? sy.includes(n) : !0;
16417
16435
  }
16418
16436
  },
16419
16437
  /**
@@ -16426,7 +16444,7 @@ const ay = /* @__PURE__ */ de(oy, [["render", ly]]), cy = {
16426
16444
  type: String,
16427
16445
  default: "text",
16428
16446
  validator(n) {
16429
- return ry.includes(n);
16447
+ return iy.includes(n);
16430
16448
  }
16431
16449
  },
16432
16450
  /**
@@ -16494,21 +16512,21 @@ const ay = /* @__PURE__ */ de(oy, [["render", ly]]), cy = {
16494
16512
  computed: {
16495
16513
  extensions() {
16496
16514
  const n = [
16497
- Mm,
16498
- _m,
16499
- zm,
16500
- Am,
16501
- qm,
16502
- pg,
16503
- Dm,
16504
- kg,
16505
- xg,
16506
- Sg
16515
+ wm,
16516
+ Fm,
16517
+ Hm,
16518
+ Nm,
16519
+ Km,
16520
+ mg,
16521
+ Im,
16522
+ Sg,
16523
+ Cg,
16524
+ xg
16507
16525
  ];
16508
- if (this.link && n.push(this.getExtension(Yg, this.link)), n.push(
16509
- Im.configure({ placeholder: this.placeholder })
16526
+ if (this.link && n.push(this.getExtension(Xg, this.link)), n.push(
16527
+ Rm.configure({ placeholder: this.placeholder })
16510
16528
  ), this.allowLineBreaks || n.push(
16511
- Nm.extend({
16529
+ Dm.extend({
16512
16530
  addKeyboardShortcuts() {
16513
16531
  return {
16514
16532
  Enter: () => !0,
@@ -16521,21 +16539,21 @@ const ay = /* @__PURE__ */ de(oy, [["render", ly]]), cy = {
16521
16539
  };
16522
16540
  }
16523
16541
  })
16524
- ), n.push(fg.extend({ inclusive: !1 }).configure({
16542
+ ), n.push(pg.extend({ inclusive: !1 }).configure({
16525
16543
  autolink: !0,
16526
- protocols: sy
16544
+ protocols: oy
16527
16545
  })), this.mentionSuggestion) {
16528
- const e = { ...this.mentionSuggestion, ...cy };
16529
- n.push(ny.configure({ suggestion: e }));
16546
+ const e = { ...this.mentionSuggestion, ...dy };
16547
+ n.push(ry.configure({ suggestion: e }));
16530
16548
  }
16531
- return n.push($g), n.push(Cg.configure({
16549
+ return n.push(jg), n.push(Eg.configure({
16532
16550
  types: ["paragraph"],
16533
16551
  defaultAlignment: "left"
16534
- })), n.push(vm.configure({
16552
+ })), n.push(Am.configure({
16535
16553
  HTMLAttributes: {
16536
16554
  class: "dt-rich-text-editor--code-block"
16537
16555
  }
16538
- })), n.push(gg.configure({
16556
+ })), n.push(yg.configure({
16539
16557
  itemTypeName: "listItem"
16540
16558
  })), n;
16541
16559
  },
@@ -16579,7 +16597,7 @@ const ay = /* @__PURE__ */ de(oy, [["render", ly]]), cy = {
16579
16597
  },
16580
16598
  methods: {
16581
16599
  createEditor() {
16582
- this.editor = new xm({
16600
+ this.editor = new Cm({
16583
16601
  autofocus: this.autoFocus,
16584
16602
  content: this.modelValue,
16585
16603
  editable: this.editable,
@@ -16632,33 +16650,33 @@ const ay = /* @__PURE__ */ de(oy, [["render", ly]]), cy = {
16632
16650
  }
16633
16651
  }
16634
16652
  };
16635
- function uy(n, e, t, r, i, s) {
16653
+ function hy(n, e, t, r, i, s) {
16636
16654
  const o = $("editor-content");
16637
16655
  return O(), z(o, {
16638
16656
  editor: i.editor,
16639
16657
  "data-qa": "dt-rich-text-editor"
16640
16658
  }, null, 8, ["editor"]);
16641
16659
  }
16642
- const by = /* @__PURE__ */ de(dy, [["render", uy]]);
16660
+ const ky = /* @__PURE__ */ de(uy, [["render", hy]]);
16643
16661
  export {
16644
16662
  jr as A,
16645
16663
  St as B,
16646
16664
  cl as C,
16647
- gy as D,
16665
+ yy as D,
16648
16666
  xn as L,
16649
16667
  Gc as M,
16650
- ud as P,
16651
- iy as R,
16668
+ hd as P,
16669
+ sy as R,
16652
16670
  Wc as S,
16653
- by as a,
16654
- ry as b,
16671
+ ky as a,
16672
+ iy as b,
16655
16673
  jc as c,
16656
16674
  $c as d,
16657
- od as e,
16675
+ ld as e,
16658
16676
  Ui as f,
16659
16677
  vs as g,
16660
16678
  dl as h,
16661
- cd as i,
16679
+ dd as i,
16662
16680
  Fc as j,
16663
16681
  Os as k,
16664
16682
  wc as l,
@@ -16668,11 +16686,11 @@ export {
16668
16686
  Ac as p,
16669
16687
  ws as q,
16670
16688
  qr as r,
16671
- ld as s,
16672
- ad as t,
16673
- dd as u,
16674
- hd as v,
16675
- my as w,
16689
+ ad as s,
16690
+ cd as t,
16691
+ ud as u,
16692
+ fd as v,
16693
+ gy as w,
16676
16694
  Mc as x,
16677
16695
  Ut as y,
16678
16696
  Sc as z