@dialpad/dialtone-vue 3.93.1 → 3.94.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (54) hide show
  1. package/CHANGELOG.json +1 -1
  2. package/CHANGELOG.md +32 -0
  3. package/dist/component-documentation.json +1 -1
  4. package/dist/dialtone-vue.cjs +5 -5
  5. package/dist/dialtone-vue.js +1126 -1059
  6. package/dist/directives.cjs +1 -1
  7. package/dist/directives.js +1 -1
  8. package/dist/{emoji-ee056efb.js → emoji-322f7836.js} +1079 -17037
  9. package/dist/emoji-d2bf66f9.cjs +1 -0
  10. package/dist/emoji.cjs +1 -1
  11. package/dist/emoji.js +3 -3
  12. package/dist/{message_input-2f040a4e.cjs → message_input-5dca1218.cjs} +15 -15
  13. package/dist/{message_input-97a05856.js → message_input-d05b8cc1.js} +260 -247
  14. package/dist/message_input.cjs +1 -1
  15. package/dist/message_input.js +5 -4
  16. package/dist/style.css +1 -1
  17. package/dist/{tooltip-02b802bc.js → tooltip-4136a819.js} +19 -21
  18. package/dist/{tooltip-3390fc3b.cjs → tooltip-4736031b.cjs} +6 -6
  19. package/dist/types/common/storybook_utils.d.ts +1 -1
  20. package/dist/types/common/storybook_utils.d.ts.map +1 -1
  21. package/dist/types/components/avatar/avatar.vue.d.ts +1 -1
  22. package/dist/types/components/button/button.vue.d.ts +1 -1
  23. package/dist/types/components/chip/chip.vue.d.ts +1 -1
  24. package/dist/types/components/combobox/combobox.vue.d.ts +1 -1
  25. package/dist/types/components/datepicker/modules/month-year-picker.vue.d.ts +1 -1
  26. package/dist/types/components/description_list/description_list.vue.d.ts +98 -0
  27. package/dist/types/components/description_list/description_list.vue.d.ts.map +1 -0
  28. package/dist/types/components/description_list/description_list_constants.d.ts +2 -0
  29. package/dist/types/components/description_list/description_list_constants.d.ts.map +1 -0
  30. package/dist/types/components/description_list/description_list_validators.d.ts +2 -0
  31. package/dist/types/components/description_list/description_list_validators.d.ts.map +1 -0
  32. package/dist/types/components/description_list/index.d.ts +3 -0
  33. package/dist/types/components/description_list/index.d.ts.map +1 -0
  34. package/dist/types/components/icon/icon.vue.d.ts +16 -2
  35. package/dist/types/components/icon/icon.vue.d.ts.map +1 -1
  36. package/dist/types/components/icon/icon_constants.d.ts +0 -2
  37. package/dist/types/components/icon/icon_constants.d.ts.map +1 -1
  38. package/dist/types/components/input/input.vue.d.ts +1 -1
  39. package/dist/types/components/modal/modal.vue.d.ts +1 -1
  40. package/dist/types/components/notice/notice.vue.d.ts +1 -1
  41. package/dist/types/components/radio/radio.vue.d.ts +1 -1
  42. package/dist/types/components/root_layout/root_layout.vue.d.ts +2 -2
  43. package/dist/types/components/scroller/modules/core_scroller.vue.d.ts +1 -1
  44. package/dist/types/components/scroller/modules/scroller_item.vue.d.ts +1 -1
  45. package/dist/types/components/tabs/tab.vue.d.ts +1 -1
  46. package/dist/types/components/toast/toast.vue.d.ts +2 -2
  47. package/dist/types/components/tooltip/tooltip.vue.d.ts +1 -1
  48. package/dist/types/index.d.ts +1 -0
  49. package/dist/types/recipes/comboboxes/combobox_multi_select/combobox_multi_select.vue.d.ts +1 -1
  50. package/dist/types/recipes/comboboxes/combobox_with_popover/combobox_with_popover.vue.d.ts +1 -1
  51. package/dist/types/recipes/conversation_view/message_input/message_input.vue.d.ts +17 -0
  52. package/dist/types/recipes/conversation_view/message_input/message_input.vue.d.ts.map +1 -1
  53. package/package.json +8 -4
  54. package/dist/emoji-125c2250.cjs +0 -1
@@ -1,6 +1,7 @@
1
- import { _ as q, q as nl, g as tr, r as rl, h as hn, u as il, t as sl, d as ol, v as ll, w as al, x as cl, y as pn, z as dl, A as ul, D as fl } from "./tooltip-02b802bc.js";
2
- import { openBlock as w, createElementBlock as B, toDisplayString as Se, createCommentVNode as z, createElementVNode as G, normalizeClass as $, resolveComponent as N, createBlock as F, resolveDynamicComponent as Xe, withCtx as D, mergeProps as St, renderSlot as L, createVNode as _, createTextVNode as $t, withKeys as Ve, withModifiers as dt, toHandlers as as, createSlots as hl, renderList as cs, Teleport as ds, defineComponent as xt, ref as mn, onMounted as us, onBeforeUnmount as xr, h as Ke, getCurrentInstance as pl, watchEffect as ml, nextTick as gl, unref as yl, markRaw as gn, reactive as fs, provide as qr, customRef as bl, withDirectives as kl, Fragment as hs, vShow as Sl } from "vue";
3
- import { a5 as xl, D as nt, y as Cl, b as yn, L as wl, j as vl, g as ps, a6 as El, a0 as Ml, a3 as ms, _ as Ol, f as Tl } from "./emoji-ee056efb.js";
1
+ import { _ as q, g as tr, p as nl, h as hn, u as rl, q as il, d as sl, r as ol, t as ll, v as al, w as pn, x as cl, y as dl, D as ul } from "./tooltip-4136a819.js";
2
+ import { openBlock as w, createElementBlock as B, toDisplayString as ke, createCommentVNode as z, createElementVNode as G, normalizeClass as $, resolveComponent as N, createBlock as F, resolveDynamicComponent as Xe, withCtx as D, mergeProps as kt, renderSlot as L, createVNode as _, createTextVNode as $t, withKeys as Ve, withModifiers as dt, toHandlers as as, createSlots as fl, renderList as cs, Teleport as ds, defineComponent as xt, ref as mn, onMounted as us, onBeforeUnmount as xr, h as Ke, getCurrentInstance as hl, watchEffect as pl, nextTick as ml, unref as gl, markRaw as gn, reactive as fs, provide as qr, customRef as yl, withDirectives as bl, Fragment as hs, vShow as Sl, normalizeStyle as kl } from "vue";
3
+ import { D as nt, y as xl, b as yn, L as Cl, j as wl, g as ps, a5 as vl, a0 as El, a3 as ms, _ as Ml, f as Ol } from "./emoji-322f7836.js";
4
+ import Tl from "@dialpad/dialtone-icons/dist/icons.json";
4
5
  const Ot = {
5
6
  BUSY: "busy",
6
7
  AWAY: "away",
@@ -46,7 +47,7 @@ function Pl(n, e, t, r, i, s) {
46
47
  role: "status",
47
48
  "aria-live": n.$attrs.ariaLive || "off"
48
49
  }, [
49
- t.srText ? (w(), B("span", Il, Se(t.srText), 1)) : z("", !0),
50
+ t.srText ? (w(), B("span", Il, ke(t.srText), 1)) : z("", !0),
50
51
  G("div", {
51
52
  class: $(["d-presence__inner", {
52
53
  "d-presence__inner--active": t.presence === "active",
@@ -103,7 +104,7 @@ const Rl = /* @__PURE__ */ q(Al, [["render", Pl]]), In = {
103
104
  "1800"
104
105
  ], Wr = (n) => n > 1;
105
106
  function zl() {
106
- return [void 0, ...Object.keys(xl).map((n) => nl(n))];
107
+ return [void 0, ...Tl];
107
108
  }
108
109
  const Vl = (n) => {
109
110
  if (typeof n != "string" || !n.trim())
@@ -250,7 +251,7 @@ const jl = zl(), Hl = {
250
251
  iconSize: {
251
252
  type: String,
252
253
  default: "",
253
- validator: (n) => !n || Object.keys(Cl).includes(n)
254
+ validator: (n) => !n || Object.keys(xl).includes(n)
254
255
  },
255
256
  /**
256
257
  * Full name used to extract initials and set alt attribute.
@@ -352,7 +353,7 @@ const jl = zl(), Hl = {
352
353
  this.validatedSize === "xs" ? this.formattedInitials = "" : this.validatedSize === "sm" ? this.formattedInitials = e[0] : this.formattedInitials = e;
353
354
  },
354
355
  getColor() {
355
- return this.color ?? rl(Fl, this.seed);
356
+ return this.color ?? nl(Fl, this.seed);
356
357
  },
357
358
  _loadedImageEventHandler(n) {
358
359
  this.imageLoadedSuccessfully = !0, n.classList.remove("d-d-none");
@@ -410,7 +411,7 @@ function Wl(n, e, t, r, i, s) {
410
411
  }, null, 8, ["name", "size", "class"])) : (w(), B("span", {
411
412
  key: 2,
412
413
  class: $([i.AVATAR_KIND_MODIFIERS.initials, "d-ps-absolute d-zi-base d-us-none"])
413
- }, Se(i.formattedInitials), 3))
414
+ }, ke(i.formattedInitials), 3))
414
415
  ], 2),
415
416
  t.overlayIcon || t.overlayText ? (w(), B("div", {
416
417
  key: 0,
@@ -420,10 +421,10 @@ function Wl(n, e, t, r, i, s) {
420
421
  key: 0,
421
422
  class: "d-avatar__overlay-icon",
422
423
  name: t.overlayIcon
423
- }, null, 8, ["name"])) : t.overlayText ? (w(), B("p", ql, Se(t.overlayText), 1)) : z("", !0)
424
+ }, null, 8, ["name"])) : t.overlayText ? (w(), B("p", ql, ke(t.overlayText), 1)) : z("", !0)
424
425
  ], 2)) : z("", !0),
425
- s.showGroup ? (w(), B("span", Kl, Se(s.formattedGroup), 1)) : z("", !0),
426
- t.presence && !s.showGroup ? (w(), F(l, St({
426
+ s.showGroup ? (w(), B("span", Kl, ke(s.formattedGroup), 1)) : z("", !0),
427
+ t.presence && !s.showGroup ? (w(), F(l, kt({
427
428
  key: 2,
428
429
  presence: t.presence,
429
430
  class: [
@@ -530,7 +531,7 @@ function ia(n, e, t, r, i, s) {
530
531
  "data-qa": "notice-content-title"
531
532
  }, [
532
533
  L(n.$slots, "titleOverride", {}, () => [
533
- $t(Se(t.title), 1)
534
+ $t(ke(t.title), 1)
534
535
  ])
535
536
  ], 8, na)) : z("", !0),
536
537
  G("p", {
@@ -676,7 +677,7 @@ function da(n, e, t, r, i, s) {
676
677
  const o = N("dt-icon"), l = N("dt-button"), a = N("sr-only-close-button");
677
678
  return w(), B("div", ca, [
678
679
  L(n.$slots, "default"),
679
- t.hideClose ? z("", !0) : (w(), F(l, St({
680
+ t.hideClose ? z("", !0) : (w(), F(l, kt({
680
681
  key: 0,
681
682
  ref: "closeButton",
682
683
  "data-qa": "dt-notice-action-close-button",
@@ -778,13 +779,13 @@ const ua = /* @__PURE__ */ q(aa, [["render", da]]), ys = ':not(:disabled):not([a
778
779
  type: String,
779
780
  default: "",
780
781
  validator(n) {
781
- return wl.includes(n);
782
+ return Cl.includes(n);
782
783
  }
783
784
  }
784
785
  },
785
786
  data() {
786
787
  return {
787
- LINK_KIND_MODIFIERS: vl
788
+ LINK_KIND_MODIFIERS: wl
788
789
  };
789
790
  }
790
791
  }, ga = ["href"];
@@ -808,7 +809,7 @@ const ba = /* @__PURE__ */ q(ma, [["render", ya]]), Pn = {
808
809
  TAB: "tab",
809
810
  NONE: "none"
810
811
  };
811
- const ka = {
812
+ const Sa = {
812
813
  name: "DtItemLayout",
813
814
  props: {
814
815
  /**
@@ -819,7 +820,7 @@ const ka = {
819
820
  default: "div"
820
821
  }
821
822
  }
822
- }, Sa = {
823
+ }, ka = {
823
824
  key: 0,
824
825
  "data-qa": "dt-item-layout-left-wrapper",
825
826
  class: "dt-item-layout--left"
@@ -846,7 +847,7 @@ const ka = {
846
847
  function Ma(n, e, t, r, i, s) {
847
848
  return w(), F(Xe(t.as), { class: "dt-item-layout" }, {
848
849
  default: D(() => [
849
- n.$slots.left ? (w(), B("section", Sa, [
850
+ n.$slots.left ? (w(), B("section", ka, [
850
851
  L(n.$slots, "left", {}, void 0, !0)
851
852
  ])) : z("", !0),
852
853
  G("section", xa, [
@@ -874,7 +875,7 @@ function Ma(n, e, t, r, i, s) {
874
875
  _: 3
875
876
  });
876
877
  }
877
- const Jr = /* @__PURE__ */ q(ka, [["render", Ma], ["__scopeId", "data-v-9afad3c4"]]);
878
+ const Jr = /* @__PURE__ */ q(Sa, [["render", Ma], ["__scopeId", "data-v-9afad3c4"]]);
878
879
  const Oa = {
879
880
  name: "DtListItem",
880
881
  components: {
@@ -894,7 +895,7 @@ const Oa = {
894
895
  id: {
895
896
  type: String,
896
897
  default() {
897
- return il.getUniqueString();
898
+ return rl.getUniqueString();
898
899
  }
899
900
  },
900
901
  /**
@@ -1028,7 +1029,7 @@ const Oa = {
1028
1029
  };
1029
1030
  function Ta(n, e, t, r, i, s) {
1030
1031
  const o = N("dt-icon");
1031
- return w(), F(Xe(t.elementType), St({
1032
+ return w(), F(Xe(t.elementType), kt({
1032
1033
  id: t.id,
1033
1034
  class: ["dt-list-item", {
1034
1035
  "dt-list-item--focusable": s.isFocusable,
@@ -1040,7 +1041,7 @@ function Ta(n, e, t, r, i, s) {
1040
1041
  "aria-selected": s.isHighlighted
1041
1042
  }, as(s.listItemListeners)), {
1042
1043
  default: D(() => [
1043
- s.listItemType ? (w(), F(Xe(s.listItemType), { key: 0 }, hl({ _: 2 }, [
1044
+ s.listItemType ? (w(), F(Xe(s.listItemType), { key: 0 }, fl({ _: 2 }, [
1044
1045
  cs(n.$slots, (l, a) => ({
1045
1046
  name: a,
1046
1047
  fn: D(() => [
@@ -1063,7 +1064,13 @@ function Ta(n, e, t, r, i, s) {
1063
1064
  _: 3
1064
1065
  }, 16, ["id", "class", "tabindex", "role", "aria-selected"]);
1065
1066
  }
1066
- const Na = /* @__PURE__ */ q(Oa, [["render", Ta]]), Ur = {
1067
+ const Na = /* @__PURE__ */ q(Oa, [["render", Ta]]), Ze = {
1068
+ default: "column",
1069
+ column: "column",
1070
+ row: "row",
1071
+ "row-reverse": "row-reverse",
1072
+ "column-reverse": "column-reverse"
1073
+ }, bs = ["sm", "md", "lg", "xl"], vr = ["0", "100", "200", "300", "400", "500", "600"], Ur = {
1067
1074
  none: void 0,
1068
1075
  small: "d-p4",
1069
1076
  medium: "d-p8",
@@ -1074,7 +1081,7 @@ const Na = /* @__PURE__ */ q(Oa, [["render", Ta]]), Ur = {
1074
1081
  medium: "d-pl8",
1075
1082
  large: "d-pl16"
1076
1083
  }, Da = ["dialog", "menu", "listbox", "tree", "grid"], Ia = ["", "anchor"], Pa = ["none", "dialog", "first"], Ra = ["parent", "body"], _a = [
1077
- ...sl
1084
+ ...il
1078
1085
  ], Ba = {
1079
1086
  name: "PopoverHeaderFooter",
1080
1087
  components: {
@@ -1152,7 +1159,7 @@ function La(n, e, t, r, i, s) {
1152
1159
  }, [
1153
1160
  L(n.$slots, "content")
1154
1161
  ], 2)) : z("", !0),
1155
- t.showCloseButton ? (w(), F(l, St({
1162
+ t.showCloseButton ? (w(), F(l, kt({
1156
1163
  key: 1,
1157
1164
  ref: "popover__close-button",
1158
1165
  "data-qa": "dt-popover-close",
@@ -1181,7 +1188,7 @@ const za = {
1181
1188
  ********************/
1182
1189
  components: {
1183
1190
  SrOnlyCloseButton: gs,
1184
- DtLazyShow: ol,
1191
+ DtLazyShow: sl,
1185
1192
  PopoverHeaderFooter: Fa
1186
1193
  },
1187
1194
  mixins: [pa, wr],
@@ -1625,11 +1632,11 @@ const za = {
1625
1632
  const e = (r = n == null ? void 0 : n[0]) == null ? void 0 : r.target;
1626
1633
  if (!e)
1627
1634
  return;
1628
- const t = ll(e);
1635
+ const t = ol(e);
1629
1636
  this.isOutsideViewport = t.bottom || t.top;
1630
1637
  },
1631
1638
  popperOptions() {
1632
- return al({
1639
+ return ll({
1633
1640
  fallbackPlacements: this.fallbackPlacements,
1634
1641
  tether: this.tether,
1635
1642
  hasHideModifierEnabled: !0
@@ -1744,7 +1751,7 @@ const za = {
1744
1751
  },
1745
1752
  initTippyInstance() {
1746
1753
  var n, e;
1747
- this.tip = cl(this.anchorEl, {
1754
+ this.tip = al(this.anchorEl, {
1748
1755
  popperOptions: this.popperOptions(),
1749
1756
  contentElement: this.popoverContentEl,
1750
1757
  placement: this.placement,
@@ -1806,7 +1813,7 @@ function Ha(n, e, t, r, i, s) {
1806
1813
  }
1807
1814
  })
1808
1815
  ], 40, ja),
1809
- _(a, St({
1816
+ _(a, kt({
1810
1817
  id: t.id,
1811
1818
  ref: "content",
1812
1819
  role: t.role,
@@ -2030,13 +2037,7 @@ function Ka(n, e, t, r, i, s) {
2030
2037
  }, 8, ["hide-close", "close-button-props", "visually-hidden-close", "visually-hidden-close-label"])
2031
2038
  ], 2);
2032
2039
  }
2033
- const Wa = /* @__PURE__ */ q(qa, [["render", Ka]]), Ze = {
2034
- default: "column",
2035
- column: "column",
2036
- row: "row",
2037
- "row-reverse": "row-reverse",
2038
- "column-reverse": "column-reverse"
2039
- }, bs = ["sm", "md", "lg", "xl"], vr = ["0", "100", "200", "300", "400", "500", "600"];
2040
+ const Wa = /* @__PURE__ */ q(qa, [["render", Ka]]);
2040
2041
  function Gr(n) {
2041
2042
  return n === Ze.default;
2042
2043
  }
@@ -2142,7 +2143,7 @@ function Qa(n, e, t, r, i, s) {
2142
2143
  _: 3
2143
2144
  }, 8, ["class"]);
2144
2145
  }
2145
- const ks = /* @__PURE__ */ q(Za, [["render", Qa]]);
2146
+ const Ss = /* @__PURE__ */ q(Za, [["render", Qa]]);
2146
2147
  function U(n) {
2147
2148
  this.content = n;
2148
2149
  }
@@ -2248,7 +2249,7 @@ U.from = function(n) {
2248
2249
  e.push(t, n[t]);
2249
2250
  return new U(e);
2250
2251
  };
2251
- function Ss(n, e, t) {
2252
+ function ks(n, e, t) {
2252
2253
  for (let r = 0; ; r++) {
2253
2254
  if (r == n.childCount || r == e.childCount)
2254
2255
  return n.childCount == e.childCount ? null : t;
@@ -2265,7 +2266,7 @@ function Ss(n, e, t) {
2265
2266
  return t;
2266
2267
  }
2267
2268
  if (i.content.size || s.content.size) {
2268
- let o = Ss(i.content, s.content, t + 1);
2269
+ let o = ks(i.content, s.content, t + 1);
2269
2270
  if (o != null)
2270
2271
  return o;
2271
2272
  }
@@ -2458,7 +2459,7 @@ class b {
2458
2459
  fragment differ, or `null` if they are the same.
2459
2460
  */
2460
2461
  findDiffStart(e, t = 0) {
2461
- return Ss(this, e, t);
2462
+ return ks(this, e, t);
2462
2463
  }
2463
2464
  /**
2464
2465
  Find the first position, searching from the end, at which this
@@ -2684,7 +2685,7 @@ let R = class nr {
2684
2685
  R.none = [];
2685
2686
  class en extends Error {
2686
2687
  }
2687
- class k {
2688
+ class S {
2688
2689
  /**
2689
2690
  Create a slice. When specifying a non-zero open depth, you must
2690
2691
  make sure that there are nodes of at least that depth at the
@@ -2711,13 +2712,13 @@ class k {
2711
2712
  */
2712
2713
  insertAt(e, t) {
2713
2714
  let r = ws(this.content, e + this.openStart, t);
2714
- return r && new k(r, this.openStart, this.openEnd);
2715
+ return r && new S(r, this.openStart, this.openEnd);
2715
2716
  }
2716
2717
  /**
2717
2718
  @internal
2718
2719
  */
2719
2720
  removeBetween(e, t) {
2720
- return new k(Cs(this.content, e + this.openStart, t + this.openStart), this.openStart, this.openEnd);
2721
+ return new S(Cs(this.content, e + this.openStart, t + this.openStart), this.openStart, this.openEnd);
2721
2722
  }
2722
2723
  /**
2723
2724
  Tests whether this slice is equal to another slice.
@@ -2745,11 +2746,11 @@ class k {
2745
2746
  */
2746
2747
  static fromJSON(e, t) {
2747
2748
  if (!t)
2748
- return k.empty;
2749
+ return S.empty;
2749
2750
  let r = t.openStart || 0, i = t.openEnd || 0;
2750
2751
  if (typeof r != "number" || typeof i != "number")
2751
2752
  throw new RangeError("Invalid input for Slice.fromJSON");
2752
- return new k(b.fromJSON(e, t.content), r, i);
2753
+ return new S(b.fromJSON(e, t.content), r, i);
2753
2754
  }
2754
2755
  /**
2755
2756
  Create a slice from a fragment by taking the maximum possible
@@ -2761,10 +2762,10 @@ class k {
2761
2762
  r++;
2762
2763
  for (let s = e.lastChild; s && !s.isLeaf && (t || !s.type.spec.isolating); s = s.lastChild)
2763
2764
  i++;
2764
- return new k(e, r, i);
2765
+ return new S(e, r, i);
2765
2766
  }
2766
2767
  }
2767
- k.empty = new k(b.empty, 0, 0);
2768
+ S.empty = new S(b.empty, 0, 0);
2768
2769
  function Cs(n, e, t) {
2769
2770
  let { index: r, offset: i } = n.findIndex(e), s = n.maybeChild(r), { index: o, offset: l } = n.findIndex(t);
2770
2771
  if (i == e || s.isText) {
@@ -3275,9 +3276,9 @@ let Ue = class ir {
3275
3276
  */
3276
3277
  slice(e, t = this.content.size, r = !1) {
3277
3278
  if (e == t)
3278
- return k.empty;
3279
+ return S.empty;
3279
3280
  let i = this.resolve(e), s = this.resolve(t), o = r ? 0 : i.sharedDepth(t), l = i.start(o), c = i.node(o).content.cut(i.pos - l, s.pos - l);
3280
- return new k(c, i.depth - o, s.depth - o);
3281
+ return new S(c, i.depth - o, s.depth - o);
3281
3282
  }
3282
3283
  /**
3283
3284
  Replace the part of the document between the given positions with
@@ -4261,7 +4262,7 @@ class pt {
4261
4262
  */
4262
4263
  parseSlice(e, t = {}) {
4263
4264
  let r = new ni(this, t, !0);
4264
- return r.addAll(e, t.from, t.to), k.maxOpen(r.finish());
4265
+ return r.addAll(e, t.from, t.to), S.maxOpen(r.finish());
4265
4266
  }
4266
4267
  /**
4267
4268
  @internal
@@ -4418,7 +4419,7 @@ class Gt {
4418
4419
  applyPending(e) {
4419
4420
  for (let t = 0, r = this.pendingMarks; t < r.length; t++) {
4420
4421
  let i = r[t];
4421
- (this.type ? this.type.allowsMarkType(i.type) : kc(i.type, e)) && !i.isInSet(this.activeMarks) && (this.activeMarks = i.addToSet(this.activeMarks), this.pendingMarks = i.removeFromSet(this.pendingMarks));
4422
+ (this.type ? this.type.allowsMarkType(i.type) : Sc(i.type, e)) && !i.isInSet(this.activeMarks) && (this.activeMarks = i.addToSet(this.activeMarks), this.pendingMarks = i.removeFromSet(this.pendingMarks));
4422
4423
  }
4423
4424
  }
4424
4425
  inlineContext(e) {
@@ -4693,7 +4694,7 @@ class ni {
4693
4694
  }
4694
4695
  }
4695
4696
  addPendingMark(e) {
4696
- let t = Sc(e, this.top.pendingMarks);
4697
+ let t = kc(e, this.top.pendingMarks);
4697
4698
  t && this.top.stashMarks.push(t), this.top.pendingMarks = e.addToSet(this.top.pendingMarks);
4698
4699
  }
4699
4700
  removePendingMark(e, t) {
@@ -4732,7 +4733,7 @@ function ri(n) {
4732
4733
  e[t] = n[t];
4733
4734
  return e;
4734
4735
  }
4735
- function kc(n, e) {
4736
+ function Sc(n, e) {
4736
4737
  let t = e.schema.nodes;
4737
4738
  for (let r in t) {
4738
4739
  let i = t[r];
@@ -4750,7 +4751,7 @@ function kc(n, e) {
4750
4751
  return !0;
4751
4752
  }
4752
4753
  }
4753
- function Sc(n, e) {
4754
+ function kc(n, e) {
4754
4755
  for (let t = 0; t < e.length; t++)
4755
4756
  if (n.eq(e[t]))
4756
4757
  return e[t];
@@ -5250,11 +5251,11 @@ class Ae extends ie {
5250
5251
  super(), this.from = e, this.to = t, this.mark = r;
5251
5252
  }
5252
5253
  apply(e) {
5253
- let t = e.slice(this.from, this.to), r = e.resolve(this.from), i = r.node(r.sharedDepth(this.to)), s = new k(Er(t.content, (o, l) => !o.isAtom || !l.type.allowsMarkType(this.mark.type) ? o : o.mark(this.mark.addToSet(o.marks)), i), t.openStart, t.openEnd);
5254
+ let t = e.slice(this.from, this.to), r = e.resolve(this.from), i = r.node(r.sharedDepth(this.to)), s = new S(Er(t.content, (o, l) => !o.isAtom || !l.type.allowsMarkType(this.mark.type) ? o : o.mark(this.mark.addToSet(o.marks)), i), t.openStart, t.openEnd);
5254
5255
  return K.fromReplace(e, this.from, this.to, s);
5255
5256
  }
5256
5257
  invert() {
5257
- return new ke(this.from, this.to, this.mark);
5258
+ return new Se(this.from, this.to, this.mark);
5258
5259
  }
5259
5260
  map(e) {
5260
5261
  let t = e.mapResult(this.from, 1), r = e.mapResult(this.to, -1);
@@ -5281,7 +5282,7 @@ class Ae extends ie {
5281
5282
  }
5282
5283
  }
5283
5284
  ie.jsonID("addMark", Ae);
5284
- class ke extends ie {
5285
+ class Se extends ie {
5285
5286
  /**
5286
5287
  Create a mark-removing step.
5287
5288
  */
@@ -5289,7 +5290,7 @@ class ke extends ie {
5289
5290
  super(), this.from = e, this.to = t, this.mark = r;
5290
5291
  }
5291
5292
  apply(e) {
5292
- let t = e.slice(this.from, this.to), r = new k(Er(t.content, (i) => i.mark(this.mark.removeFromSet(i.marks)), e), t.openStart, t.openEnd);
5293
+ let t = e.slice(this.from, this.to), r = new S(Er(t.content, (i) => i.mark(this.mark.removeFromSet(i.marks)), e), t.openStart, t.openEnd);
5293
5294
  return K.fromReplace(e, this.from, this.to, r);
5294
5295
  }
5295
5296
  invert() {
@@ -5297,10 +5298,10 @@ class ke extends ie {
5297
5298
  }
5298
5299
  map(e) {
5299
5300
  let t = e.mapResult(this.from, 1), r = e.mapResult(this.to, -1);
5300
- return t.deleted && r.deleted || t.pos >= r.pos ? null : new ke(t.pos, r.pos, this.mark);
5301
+ return t.deleted && r.deleted || t.pos >= r.pos ? null : new Se(t.pos, r.pos, this.mark);
5301
5302
  }
5302
5303
  merge(e) {
5303
- return e instanceof ke && e.mark.eq(this.mark) && this.from <= e.to && this.to >= e.from ? new ke(Math.min(this.from, e.from), Math.max(this.to, e.to), this.mark) : null;
5304
+ return e instanceof Se && e.mark.eq(this.mark) && this.from <= e.to && this.to >= e.from ? new Se(Math.min(this.from, e.from), Math.max(this.to, e.to), this.mark) : null;
5304
5305
  }
5305
5306
  toJSON() {
5306
5307
  return {
@@ -5316,10 +5317,10 @@ class ke extends ie {
5316
5317
  static fromJSON(e, t) {
5317
5318
  if (typeof t.from != "number" || typeof t.to != "number")
5318
5319
  throw new RangeError("Invalid input for RemoveMarkStep.fromJSON");
5319
- return new ke(t.from, t.to, e.markFromJSON(t.mark));
5320
+ return new Se(t.from, t.to, e.markFromJSON(t.mark));
5320
5321
  }
5321
5322
  }
5322
- ie.jsonID("removeMark", ke);
5323
+ ie.jsonID("removeMark", Se);
5323
5324
  class De extends ie {
5324
5325
  /**
5325
5326
  Create a node mark step.
@@ -5332,7 +5333,7 @@ class De extends ie {
5332
5333
  if (!t)
5333
5334
  return K.fail("No node at mark step's position");
5334
5335
  let r = t.type.create(t.attrs, null, this.mark.addToSet(t.marks));
5335
- return K.fromReplace(e, this.pos, this.pos + 1, new k(b.from(r), 0, t.isLeaf ? 0 : 1));
5336
+ return K.fromReplace(e, this.pos, this.pos + 1, new S(b.from(r), 0, t.isLeaf ? 0 : 1));
5336
5337
  }
5337
5338
  invert(e) {
5338
5339
  let t = e.nodeAt(this.pos);
@@ -5376,7 +5377,7 @@ class mt extends ie {
5376
5377
  if (!t)
5377
5378
  return K.fail("No node at mark step's position");
5378
5379
  let r = t.type.create(t.attrs, null, this.mark.removeFromSet(t.marks));
5379
- return K.fromReplace(e, this.pos, this.pos + 1, new k(b.from(r), 0, t.isLeaf ? 0 : 1));
5380
+ return K.fromReplace(e, this.pos, this.pos + 1, new S(b.from(r), 0, t.isLeaf ? 0 : 1));
5380
5381
  }
5381
5382
  invert(e) {
5382
5383
  let t = e.nodeAt(this.pos);
@@ -5429,10 +5430,10 @@ class Z extends ie {
5429
5430
  if (!(e instanceof Z) || e.structure || this.structure)
5430
5431
  return null;
5431
5432
  if (this.from + this.slice.size == e.from && !this.slice.openEnd && !e.slice.openStart) {
5432
- let t = this.slice.size + e.slice.size == 0 ? k.empty : new k(this.slice.content.append(e.slice.content), this.slice.openStart, e.slice.openEnd);
5433
+ let t = this.slice.size + e.slice.size == 0 ? S.empty : new S(this.slice.content.append(e.slice.content), this.slice.openStart, e.slice.openEnd);
5433
5434
  return new Z(this.from, this.to + (e.to - e.from), t, this.structure);
5434
5435
  } else if (e.to == this.from && !this.slice.openStart && !e.slice.openEnd) {
5435
- let t = this.slice.size + e.slice.size == 0 ? k.empty : new k(e.slice.content.append(this.slice.content), e.slice.openStart, this.slice.openEnd);
5436
+ let t = this.slice.size + e.slice.size == 0 ? S.empty : new S(e.slice.content.append(this.slice.content), e.slice.openStart, this.slice.openEnd);
5436
5437
  return new Z(e.from, this.to, t, this.structure);
5437
5438
  } else
5438
5439
  return null;
@@ -5447,7 +5448,7 @@ class Z extends ie {
5447
5448
  static fromJSON(e, t) {
5448
5449
  if (typeof t.from != "number" || typeof t.to != "number")
5449
5450
  throw new RangeError("Invalid input for ReplaceStep.fromJSON");
5450
- return new Z(t.from, t.to, k.fromJSON(e, t.slice), !!t.structure);
5451
+ return new Z(t.from, t.to, S.fromJSON(e, t.slice), !!t.structure);
5451
5452
  }
5452
5453
  }
5453
5454
  ie.jsonID("replace", Z);
@@ -5505,7 +5506,7 @@ class W extends ie {
5505
5506
  static fromJSON(e, t) {
5506
5507
  if (typeof t.from != "number" || typeof t.to != "number" || typeof t.gapFrom != "number" || typeof t.gapTo != "number" || typeof t.insert != "number")
5507
5508
  throw new RangeError("Invalid input for ReplaceAroundStep.fromJSON");
5508
- return new W(t.from, t.to, t.gapFrom, t.gapTo, k.fromJSON(e, t.slice), t.insert, !!t.structure);
5509
+ return new W(t.from, t.to, t.gapFrom, t.gapTo, S.fromJSON(e, t.slice), t.insert, !!t.structure);
5509
5510
  }
5510
5511
  }
5511
5512
  ie.jsonID("replaceAround", W);
@@ -5532,7 +5533,7 @@ function wc(n, e, t, r) {
5532
5533
  if (!r.isInSet(u) && d.type.allowsMarkType(r.type)) {
5533
5534
  let f = Math.max(c, e), h = Math.min(c + a.nodeSize, t), p = r.addToSet(u);
5534
5535
  for (let m = 0; m < u.length; m++)
5535
- u[m].isInSet(p) || (o && o.to == f && o.mark.eq(u[m]) ? o.to = h : i.push(o = new ke(f, h, u[m])));
5536
+ u[m].isInSet(p) || (o && o.to == f && o.mark.eq(u[m]) ? o.to = h : i.push(o = new Se(f, h, u[m])));
5536
5537
  l && l.to == f ? l.to = h : s.push(l = new Ae(f, h, r));
5537
5538
  }
5538
5539
  }), i.forEach((a) => n.step(a)), s.forEach((a) => n.step(a));
@@ -5561,24 +5562,24 @@ function vc(n, e, t, r) {
5561
5562
  f ? (f.to = c, f.step = s) : i.push({ style: u, from: Math.max(l, e), to: c, step: s });
5562
5563
  }
5563
5564
  }
5564
- }), i.forEach((o) => n.step(new ke(o.from, o.to, o.style)));
5565
+ }), i.forEach((o) => n.step(new Se(o.from, o.to, o.style)));
5565
5566
  }
5566
5567
  function Ec(n, e, t, r = t.contentMatch) {
5567
5568
  let i = n.doc.nodeAt(e), s = [], o = e + 1;
5568
5569
  for (let l = 0; l < i.childCount; l++) {
5569
5570
  let a = i.child(l), c = o + a.nodeSize, d = r.matchType(a.type);
5570
5571
  if (!d)
5571
- s.push(new Z(o, c, k.empty));
5572
+ s.push(new Z(o, c, S.empty));
5572
5573
  else {
5573
5574
  r = d;
5574
5575
  for (let u = 0; u < a.marks.length; u++)
5575
- t.allowsMarkType(a.marks[u].type) || n.step(new ke(o, c, a.marks[u]));
5576
+ t.allowsMarkType(a.marks[u].type) || n.step(new Se(o, c, a.marks[u]));
5576
5577
  }
5577
5578
  o = c;
5578
5579
  }
5579
5580
  if (!r.validEnd) {
5580
5581
  let l = r.fillBefore(b.empty, !0);
5581
- n.replace(o, o, new k(l, 0, 0));
5582
+ n.replace(o, o, new S(l, 0, 0));
5582
5583
  }
5583
5584
  for (let l = s.length - 1; l >= 0; l--)
5584
5585
  n.step(s[l]);
@@ -5604,7 +5605,7 @@ function Oc(n, e, t) {
5604
5605
  let f = b.empty, h = 0;
5605
5606
  for (let p = s, m = !1; p > t; p--)
5606
5607
  m || i.after(p + 1) < i.end(p) ? (m = !0, f = b.from(i.node(p).copy(f)), h++) : c++;
5607
- n.step(new W(a, c, o, l, new k(d.append(f), u, h), d.size - u, !0));
5608
+ n.step(new W(a, c, o, l, new S(d.append(f), u, h), d.size - u, !0));
5608
5609
  }
5609
5610
  function js(n, e, t = null, r = n) {
5610
5611
  let i = Tc(n, e), s = i && Nc(r, e);
@@ -5640,7 +5641,7 @@ function Ac(n, e, t) {
5640
5641
  r = b.from(t[o].type.create(t[o].attrs, r));
5641
5642
  }
5642
5643
  let i = e.start, s = e.end;
5643
- n.step(new W(i, s, i, s, new k(r, 0, 0), t.length, !0));
5644
+ n.step(new W(i, s, i, s, new S(r, 0, 0), t.length, !0));
5644
5645
  }
5645
5646
  function Dc(n, e, t, r, i) {
5646
5647
  if (!r.isTextblock)
@@ -5650,7 +5651,7 @@ function Dc(n, e, t, r, i) {
5650
5651
  if (o.isTextblock && !o.hasMarkup(r, i) && Ic(n.doc, n.mapping.slice(s).map(l), r)) {
5651
5652
  n.clearIncompatible(n.mapping.slice(s).map(l, 1), r);
5652
5653
  let a = n.mapping.slice(s), c = a.map(l, 1), d = a.map(l + o.nodeSize, 1);
5653
- return n.step(new W(c, d, c + 1, d - 1, new k(b.from(r.create(i, null, o.marks)), 0, 0), 1, !0)), !1;
5654
+ return n.step(new W(c, d, c + 1, d - 1, new S(b.from(r.create(i, null, o.marks)), 0, 0), 1, !0)), !1;
5654
5655
  }
5655
5656
  });
5656
5657
  }
@@ -5668,7 +5669,7 @@ function Pc(n, e, t, r, i) {
5668
5669
  return n.replaceWith(e, e + s.nodeSize, o);
5669
5670
  if (!t.validContent(s.content))
5670
5671
  throw new RangeError("Invalid content for node type " + t.name);
5671
- n.step(new W(e, e + s.nodeSize, e + 1, e + s.nodeSize - 1, new k(b.from(o), 0, 0), 1, !0));
5672
+ n.step(new W(e, e + s.nodeSize, e + 1, e + s.nodeSize - 1, new S(b.from(o), 0, 0), 1, !0));
5672
5673
  }
5673
5674
  function ut(n, e, t = 1, r) {
5674
5675
  let i = n.resolve(e), s = i.depth - t, o = r && r[r.length - 1] || i.parent;
@@ -5692,7 +5693,7 @@ function Rc(n, e, t = 1, r) {
5692
5693
  let d = r && r[c];
5693
5694
  o = b.from(d ? d.type.create(d.attrs, o) : i.node(l).copy(o));
5694
5695
  }
5695
- n.step(new Z(e, e, new k(s.append(o), t, t), !0));
5696
+ n.step(new Z(e, e, new S(s.append(o), t, t), !0));
5696
5697
  }
5697
5698
  function rt(n, e) {
5698
5699
  let t = n.resolve(e), r = t.index();
@@ -5713,7 +5714,7 @@ function $s(n, e, t = -1) {
5713
5714
  }
5714
5715
  }
5715
5716
  function _c(n, e, t) {
5716
- let r = new Z(e - t, e + t, k.empty, !0);
5717
+ let r = new Z(e - t, e + t, S.empty, !0);
5717
5718
  n.step(r);
5718
5719
  }
5719
5720
  function Bc(n, e, t) {
@@ -5759,7 +5760,7 @@ function Lc(n, e, t) {
5759
5760
  }
5760
5761
  return null;
5761
5762
  }
5762
- function Mr(n, e, t = e, r = k.empty) {
5763
+ function Mr(n, e, t = e, r = S.empty) {
5763
5764
  if (e == t && !r.size)
5764
5765
  return null;
5765
5766
  let i = n.resolve(e), s = n.resolve(t);
@@ -5795,7 +5796,7 @@ class Fc {
5795
5796
  let s = this.placed, o = r.depth, l = i.depth;
5796
5797
  for (; o && l && s.childCount == 1; )
5797
5798
  s = s.firstChild.content, o--, l--;
5798
- let a = new k(s, o, l);
5799
+ let a = new S(s, o, l);
5799
5800
  return e > -1 ? new W(r.pos, e, this.$to.pos, this.$to.end(), a, t) : a.size || r.pos != this.$to.pos ? new Z(r.pos, i.pos, a) : null;
5800
5801
  }
5801
5802
  // Find a position on the start spine of `this.unplaced` that has
@@ -5829,15 +5830,15 @@ class Fc {
5829
5830
  }
5830
5831
  openMore() {
5831
5832
  let { content: e, openStart: t, openEnd: r } = this.unplaced, i = zn(e, t);
5832
- return !i.childCount || i.firstChild.isLeaf ? !1 : (this.unplaced = new k(e, t + 1, Math.max(r, i.size + t >= e.size - r ? t + 1 : 0)), !0);
5833
+ return !i.childCount || i.firstChild.isLeaf ? !1 : (this.unplaced = new S(e, t + 1, Math.max(r, i.size + t >= e.size - r ? t + 1 : 0)), !0);
5833
5834
  }
5834
5835
  dropNode() {
5835
5836
  let { content: e, openStart: t, openEnd: r } = this.unplaced, i = zn(e, t);
5836
5837
  if (i.childCount <= 1 && t > 0) {
5837
5838
  let s = e.size - t <= t + i.size;
5838
- this.unplaced = new k(Tt(e, t - 1, 1), t - 1, s ? t - 1 : r);
5839
+ this.unplaced = new S(Tt(e, t - 1, 1), t - 1, s ? t - 1 : r);
5839
5840
  } else
5840
- this.unplaced = new k(Tt(e, t, 1), t, r);
5841
+ this.unplaced = new S(Tt(e, t, 1), t, r);
5841
5842
  }
5842
5843
  // Move content from the unplaced slice at `sliceDepth` to the
5843
5844
  // frontier node at `frontierDepth`. Close that frontier node when
@@ -5867,7 +5868,7 @@ class Fc {
5867
5868
  let y = g.lastChild;
5868
5869
  this.frontier.push({ type: y.type, match: y.contentMatchAt(y.childCount) }), g = y.content;
5869
5870
  }
5870
- this.unplaced = p ? e == 0 ? k.empty : new k(Tt(o.content, e - 1, 1), e - 1, h < 0 ? o.openEnd : e - 1) : new k(Tt(o.content, e, c), o.openStart, o.openEnd);
5871
+ this.unplaced = p ? e == 0 ? S.empty : new S(Tt(o.content, e - 1, 1), e - 1, h < 0 ? o.openEnd : e - 1) : new S(Tt(o.content, e, c), o.openStart, o.openEnd);
5871
5872
  }
5872
5873
  mustMoveInline() {
5873
5874
  if (!this.$to.parent.isTextblock)
@@ -5987,7 +5988,7 @@ function jc(n, e, t, r) {
5987
5988
  g < 0 && (y = !1, g = -g);
5988
5989
  let C = i.node(g - 1), E = i.index(g - 1);
5989
5990
  if (C.canReplaceWith(E, E, p.type, p.marks))
5990
- return n.replace(i.before(g), y ? s.after(g) : t, new k(Ws(r.content, 0, r.openStart, h), h, r.openEnd));
5991
+ return n.replace(i.before(g), y ? s.after(g) : t, new S(Ws(r.content, 0, r.openStart, h), h, r.openEnd));
5991
5992
  }
5992
5993
  }
5993
5994
  let u = n.steps.length;
@@ -6012,7 +6013,7 @@ function Hc(n, e, t, r) {
6012
6013
  let i = Bc(n.doc, e, r.type);
6013
6014
  i != null && (e = t = i);
6014
6015
  }
6015
- n.replaceRange(e, t, new k(b.from(r), 0, 0));
6016
+ n.replaceRange(e, t, new S(b.from(r), 0, 0));
6016
6017
  }
6017
6018
  function $c(n, e, t) {
6018
6019
  let r = n.doc.resolve(e), i = n.doc.resolve(t), s = Js(r, i);
@@ -6054,7 +6055,7 @@ class ft extends ie {
6054
6055
  r[s] = t.attrs[s];
6055
6056
  r[this.attr] = this.value;
6056
6057
  let i = t.type.create(r, null, t.marks);
6057
- return K.fromReplace(e, this.pos, this.pos + 1, new k(b.from(i), 0, t.isLeaf ? 0 : 1));
6058
+ return K.fromReplace(e, this.pos, this.pos + 1, new S(b.from(i), 0, t.isLeaf ? 0 : 1));
6058
6059
  }
6059
6060
  getMap() {
6060
6061
  return de.empty;
@@ -6133,7 +6134,7 @@ class Us {
6133
6134
  Replace the part of the document between `from` and `to` with the
6134
6135
  given `slice`.
6135
6136
  */
6136
- replace(e, t = e, r = k.empty) {
6137
+ replace(e, t = e, r = S.empty) {
6137
6138
  let i = Mr(this.doc, e, t, r);
6138
6139
  return i && this.step(i), this;
6139
6140
  }
@@ -6142,13 +6143,13 @@ class Us {
6142
6143
  fragment, node, or array of nodes.
6143
6144
  */
6144
6145
  replaceWith(e, t, r) {
6145
- return this.replace(e, t, new k(b.from(r), 0, 0));
6146
+ return this.replace(e, t, new S(b.from(r), 0, 0));
6146
6147
  }
6147
6148
  /**
6148
6149
  Delete the content between the given positions.
6149
6150
  */
6150
6151
  delete(e, t) {
6151
- return this.replace(e, t, k.empty);
6152
+ return this.replace(e, t, S.empty);
6152
6153
  }
6153
6154
  /**
6154
6155
  Insert the given content at the given position.
@@ -6363,14 +6364,14 @@ class O {
6363
6364
  Replace the selection with a slice or, if no slice is given,
6364
6365
  delete the selection. Will append to the given transaction.
6365
6366
  */
6366
- replace(e, t = k.empty) {
6367
+ replace(e, t = S.empty) {
6367
6368
  let r = t.content.lastChild, i = null;
6368
6369
  for (let l = 0; l < t.openEnd; l++)
6369
6370
  i = r, r = r.lastChild;
6370
6371
  let s = e.steps.length, o = this.ranges;
6371
6372
  for (let l = 0; l < o.length; l++) {
6372
6373
  let { $from: a, $to: c } = o[l], d = e.mapping.slice(s);
6373
- e.replaceRange(d.map(a.pos), d.map(c.pos), l ? k.empty : t), l == 0 && ci(e, s, (r ? r.isInline : i && i.isTextblock) ? -1 : 1);
6374
+ e.replaceRange(d.map(a.pos), d.map(c.pos), l ? S.empty : t), l == 0 && ci(e, s, (r ? r.isInline : i && i.isTextblock) ? -1 : 1);
6374
6375
  }
6375
6376
  }
6376
6377
  /**
@@ -6496,8 +6497,8 @@ class A extends O {
6496
6497
  let i = e.resolve(t.map(this.anchor));
6497
6498
  return new A(i.parent.inlineContent ? i : r, r);
6498
6499
  }
6499
- replace(e, t = k.empty) {
6500
- if (super.replace(e, t), t == k.empty) {
6500
+ replace(e, t = S.empty) {
6501
+ if (super.replace(e, t), t == S.empty) {
6501
6502
  let r = this.$from.marksAcross(this.$to);
6502
6503
  r && e.ensureMarks(r);
6503
6504
  }
@@ -6506,7 +6507,7 @@ class A extends O {
6506
6507
  return e instanceof A && e.anchor == this.anchor && e.head == this.head;
6507
6508
  }
6508
6509
  getBookmark() {
6509
- return new kn(this.anchor, this.head);
6510
+ return new Sn(this.anchor, this.head);
6510
6511
  }
6511
6512
  toJSON() {
6512
6513
  return { type: "text", anchor: this.anchor, head: this.head };
@@ -6547,12 +6548,12 @@ class A extends O {
6547
6548
  }
6548
6549
  }
6549
6550
  O.jsonID("text", A);
6550
- class kn {
6551
+ class Sn {
6551
6552
  constructor(e, t) {
6552
6553
  this.anchor = e, this.head = t;
6553
6554
  }
6554
6555
  map(e) {
6555
- return new kn(e.map(this.anchor), e.map(this.head));
6556
+ return new Sn(e.map(this.anchor), e.map(this.head));
6556
6557
  }
6557
6558
  resolve(e) {
6558
6559
  return A.between(e.resolve(this.anchor), e.resolve(this.head));
@@ -6572,7 +6573,7 @@ class v extends O {
6572
6573
  return r ? O.near(s) : new v(s);
6573
6574
  }
6574
6575
  content() {
6575
- return new k(b.from(this.node), 0, 0);
6576
+ return new S(b.from(this.node), 0, 0);
6576
6577
  }
6577
6578
  eq(e) {
6578
6579
  return e instanceof v && e.anchor == this.anchor;
@@ -6613,7 +6614,7 @@ class Or {
6613
6614
  }
6614
6615
  map(e) {
6615
6616
  let { deleted: t, pos: r } = e.mapResult(this.anchor);
6616
- return t ? new kn(r, r) : new Or(r);
6617
+ return t ? new Sn(r, r) : new Or(r);
6617
6618
  }
6618
6619
  resolve(e) {
6619
6620
  let t = e.resolve(this.anchor), r = t.nodeAfter;
@@ -6627,8 +6628,8 @@ class pe extends O {
6627
6628
  constructor(e) {
6628
6629
  super(e.resolve(0), e.resolve(e.content.size));
6629
6630
  }
6630
- replace(e, t = k.empty) {
6631
- if (t == k.empty) {
6631
+ replace(e, t = S.empty) {
6632
+ if (t == S.empty) {
6632
6633
  e.delete(0, e.doc.content.size);
6633
6634
  let r = O.atStart(e.doc);
6634
6635
  r.eq(e.selection) || e.setSelection(r);
@@ -7157,7 +7158,7 @@ function Yc(n) {
7157
7158
  ;
7158
7159
  return e && e.node && e.node.isBlock && (e.dom == n || e.contentDOM == n);
7159
7160
  }
7160
- const Sn = function(n) {
7161
+ const kn = function(n) {
7161
7162
  return n.focusNode && et(n.focusNode, n.focusOffset, n.anchorNode, n.anchorOffset);
7162
7163
  };
7163
7164
  function je(n, e) {
@@ -7508,9 +7509,9 @@ function md(n, e, t) {
7508
7509
  return f != null && (l.caretBidiLevel = f), g;
7509
7510
  });
7510
7511
  }
7511
- let bi = null, ki = null, Si = !1;
7512
+ let bi = null, Si = null, ki = !1;
7512
7513
  function gd(n, e, t) {
7513
- return bi == e && ki == t ? Si : (bi = e, ki = t, Si = t == "up" || t == "down" ? hd(n, e, t) : md(n, e, t));
7514
+ return bi == e && Si == t ? ki : (bi = e, Si = t, ki = t == "up" || t == "down" ? hd(n, e, t) : md(n, e, t));
7514
7515
  }
7515
7516
  const ue = 0, xi = 1, $e = 2, Ce = 3;
7516
7517
  class qt {
@@ -7997,7 +7998,7 @@ class Re extends qt {
7997
7998
  // separate step, syncs the DOM inside `this.contentDOM` to
7998
7999
  // `this.children`.
7999
8000
  updateChildren(e, t) {
8000
- 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 Sd(this, o && o.node, e);
8001
+ 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 kd(this, o && o.node, e);
8001
8002
  wd(this.node, this.innerDeco, (c, d, u) => {
8002
8003
  c.spec.marks ? a.syncToMarks(c.spec.marks, r, e) : c.type.side >= 0 && !u && a.syncToMarks(d == this.node.childCount ? R.none : this.node.child(d).marks, r, e), a.placeWidget(c, e, i);
8003
8004
  }, (c, d, u, f) => {
@@ -8203,11 +8204,11 @@ function lo(n, e, t, r) {
8203
8204
  let a;
8204
8205
  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 = qe[0]), i = a;
8205
8206
  }
8206
- kd(i, l || qe[0], o);
8207
+ Sd(i, l || qe[0], o);
8207
8208
  }
8208
8209
  return i;
8209
8210
  }
8210
- function kd(n, e, t) {
8211
+ function Sd(n, e, t) {
8211
8212
  for (let r in e)
8212
8213
  r != "class" && r != "style" && r != "nodeName" && !(r in t) && n.removeAttribute(r);
8213
8214
  for (let r in t)
@@ -8244,7 +8245,7 @@ function wi(n) {
8244
8245
  let e = n.nextSibling;
8245
8246
  return n.parentNode.removeChild(n), e;
8246
8247
  }
8247
- class Sd {
8248
+ class kd {
8248
8249
  constructor(e, t, r) {
8249
8250
  this.lock = t, this.view = r, this.index = 0, this.stack = [], this.changed = !1, this.top = e, this.preMatch = xd(e.node.content, e);
8250
8251
  }
@@ -8528,7 +8529,7 @@ function Nr(n, e = null) {
8528
8529
  if (o < 0)
8529
8530
  return null;
8530
8531
  let l = r.resolve(o), a, c;
8531
- if (Sn(t)) {
8532
+ if (kn(t)) {
8532
8533
  for (a = l; i && !i.node; )
8533
8534
  i = i.parent;
8534
8535
  let d = i.node;
@@ -8747,7 +8748,7 @@ function po(n) {
8747
8748
  }
8748
8749
  function pr(n, e, t) {
8749
8750
  let r = n.domSelection();
8750
- if (Sn(r)) {
8751
+ if (kn(r)) {
8751
8752
  let s = document.createRange();
8752
8753
  s.setEnd(e, t), s.setStart(e, t), r.removeAllRanges(), r.addRange(s);
8753
8754
  } else
@@ -8862,7 +8863,7 @@ function mo(n, e) {
8862
8863
  let o = n.someProp("clipboardSerializer") || be.fromSchema(n.state.schema), l = xo(), a = l.createElement("div");
8863
8864
  a.appendChild(o.serializeFragment(r, { document: l }));
8864
8865
  let c = a.firstChild, d, u = 0;
8865
- for (; c && c.nodeType == 1 && (d = So[c.nodeName.toLowerCase()]); ) {
8866
+ for (; c && c.nodeType == 1 && (d = ko[c.nodeName.toLowerCase()]); ) {
8866
8867
  for (let h = d.length - 1; h >= 0; h--) {
8867
8868
  let p = l.createElement(d[h]);
8868
8869
  for (; a.firstChild; )
@@ -8886,8 +8887,8 @@ function go(n, e, t, r, i) {
8886
8887
  if (n.someProp("transformPastedText", (f) => {
8887
8888
  e = f(e, s || r, n);
8888
8889
  }), s)
8889
- return e ? new k(b.from(n.state.schema.text(e.replace(/\r\n?/g, `
8890
- `))), 0, 0) : k.empty;
8890
+ return e ? new S(b.from(n.state.schema.text(e.replace(/\r\n?/g, `
8891
+ `))), 0, 0) : S.empty;
8891
8892
  let u = n.someProp("clipboardTextParser", (f) => f(e, i, r, n));
8892
8893
  if (u)
8893
8894
  l = u;
@@ -8920,7 +8921,7 @@ function go(n, e, t, r, i) {
8920
8921
  }
8921
8922
  })), d)
8922
8923
  l = Fd(Ri(l, +d[1], +d[2]), d[4]);
8923
- else if (l = k.maxOpen(_d(l.content, i), !0), l.openStart || l.openEnd) {
8924
+ else if (l = S.maxOpen(_d(l.content, i), !0), l.openStart || l.openEnd) {
8924
8925
  let u = 0, f = 0;
8925
8926
  for (let h = l.content.firstChild; u < l.openStart && !h.type.spec.isolating; u++, h = h.firstChild)
8926
8927
  ;
@@ -8947,7 +8948,7 @@ function _d(n, e) {
8947
8948
  if (c = o.length && s.length && bo(a, s, l, o[o.length - 1], 0))
8948
8949
  o[o.length - 1] = c;
8949
8950
  else {
8950
- o.length && (o[o.length - 1] = ko(o[o.length - 1], s.length));
8951
+ o.length && (o[o.length - 1] = So(o[o.length - 1], s.length));
8951
8952
  let d = yo(l, a);
8952
8953
  o.push(d), i = i.matchType(d.type), s = a;
8953
8954
  }
@@ -8970,10 +8971,10 @@ function bo(n, e, t, r, i) {
8970
8971
  return r.copy(r.content.append(b.from(yo(t, n, i + 1))));
8971
8972
  }
8972
8973
  }
8973
- function ko(n, e) {
8974
+ function So(n, e) {
8974
8975
  if (e == 0)
8975
8976
  return n;
8976
- let t = n.content.replaceChild(n.childCount - 1, ko(n.lastChild, e - 1)), r = n.contentMatchAt(n.childCount).fillBefore(b.empty, !0);
8977
+ let t = n.content.replaceChild(n.childCount - 1, So(n.lastChild, e - 1)), r = n.contentMatchAt(n.childCount).fillBefore(b.empty, !0);
8977
8978
  return n.copy(t.append(r));
8978
8979
  }
8979
8980
  function mr(n, e, t, r, i, s) {
@@ -8981,9 +8982,9 @@ function mr(n, e, t, r, i, s) {
8981
8982
  return i < r - 1 && (l = mr(l, e, t, r, i + 1, s)), i >= t && (l = e < 0 ? o.contentMatchAt(0).fillBefore(l, n.childCount > 1 || s <= i).append(l) : l.append(o.contentMatchAt(o.childCount).fillBefore(b.empty, !0))), n.replaceChild(e < 0 ? 0 : n.childCount - 1, o.copy(l));
8982
8983
  }
8983
8984
  function Ri(n, e, t) {
8984
- return e < n.openStart && (n = new k(mr(n.content, -1, e, n.openStart, 0, n.openEnd), e, n.openEnd)), t < n.openEnd && (n = new k(mr(n.content, 1, t, n.openEnd, 0, 0), n.openStart, t)), n;
8985
+ return e < n.openStart && (n = new S(mr(n.content, -1, e, n.openStart, 0, n.openEnd), e, n.openEnd)), t < n.openEnd && (n = new S(mr(n.content, 1, t, n.openEnd, 0, 0), n.openStart, t)), n;
8985
8986
  }
8986
- const So = {
8987
+ const ko = {
8987
8988
  thead: ["table"],
8988
8989
  tbody: ["table"],
8989
8990
  tfoot: ["table"],
@@ -9002,7 +9003,7 @@ function Bd(n) {
9002
9003
  let e = /^(\s*<meta [^>]*>)*/.exec(n);
9003
9004
  e && (n = n.slice(e[0].length));
9004
9005
  let t = xo().createElement("div"), r = /<([a-z][^>\s]+)/i.exec(n), i;
9005
- if ((i = r && So[r[1].toLowerCase()]) && (n = i.map((s) => "<" + s + ">").join("") + n + i.map((s) => "</" + s + ">").reverse().join("")), t.innerHTML = n, i)
9006
+ if ((i = r && ko[r[1].toLowerCase()]) && (n = i.map((s) => "<" + s + ">").join("") + n + i.map((s) => "</" + s + ">").reverse().join("")), t.innerHTML = n, i)
9006
9007
  for (let s = 0; s < i.length; s++)
9007
9008
  t = t.querySelector(i[s]) || t;
9008
9009
  return t;
@@ -9030,7 +9031,7 @@ function Fd(n, e) {
9030
9031
  break;
9031
9032
  i = b.from(a.create(r[l + 1], i)), s++, o++;
9032
9033
  }
9033
- return new k(i, s, o);
9034
+ return new S(i, s, o);
9034
9035
  }
9035
9036
  const te = {}, ne = {}, zd = { touchstart: !0, touchmove: !0 };
9036
9037
  class Vd {
@@ -9324,7 +9325,7 @@ function ru(n, e) {
9324
9325
  }
9325
9326
  function zt(n, e, t, r, i) {
9326
9327
  let s = go(n, e, t, r, n.state.selection.$from);
9327
- if (n.someProp("handlePaste", (a) => a(n, i, s || k.empty)))
9328
+ if (n.someProp("handlePaste", (a) => a(n, i, s || S.empty)))
9328
9329
  return !0;
9329
9330
  if (!s)
9330
9331
  return !1;
@@ -9379,7 +9380,7 @@ ne.drop = (n, e) => {
9379
9380
  o = p(o, n);
9380
9381
  }) : o = go(n, t.dataTransfer.getData(bt ? "Text" : "text/plain"), bt ? null : t.dataTransfer.getData("text/html"), !1, s);
9381
9382
  let l = !!(r && !t[Mo]);
9382
- if (n.someProp("handleDrop", (p) => p(n, t, o || k.empty, l))) {
9383
+ if (n.someProp("handleDrop", (p) => p(n, t, o || S.empty, l))) {
9383
9384
  t.preventDefault();
9384
9385
  return;
9385
9386
  }
@@ -10038,7 +10039,7 @@ class du {
10038
10039
  }
10039
10040
  }
10040
10041
  let c = null;
10041
- s < 0 && i && e.input.lastFocus > Date.now() - 200 && Math.max(e.input.lastTouch, e.input.lastClick.time) < Date.now() - 300 && Sn(r) && (c = Nr(e)) && c.eq(O.near(e.state.doc.resolve(0), 1)) ? (e.input.lastFocus = 0, Me(e), this.currentSelection.set(r), e.scrollToSelection()) : (s > -1 || i) && (s > -1 && (e.docView.markDirty(s, o), uu(e)), this.handleDOMChange(s, o, l, a), e.docView && e.docView.dirty ? e.updateState(e.state) : this.currentSelection.eq(r) || Me(e), this.currentSelection.set(r));
10042
+ s < 0 && i && e.input.lastFocus > Date.now() - 200 && Math.max(e.input.lastTouch, e.input.lastClick.time) < Date.now() - 300 && kn(r) && (c = Nr(e)) && c.eq(O.near(e.state.doc.resolve(0), 1)) ? (e.input.lastFocus = 0, Me(e), this.currentSelection.set(r), e.scrollToSelection()) : (s > -1 || i) && (s > -1 && (e.docView.markDirty(s, o), uu(e)), this.handleDOMChange(s, o, l, a), e.docView && e.docView.dirty ? e.updateState(e.state) : this.currentSelection.eq(r) || Me(e), this.currentSelection.set(r));
10042
10043
  }
10043
10044
  registerMutation(e, t) {
10044
10045
  if (t.indexOf(e.target) > -1)
@@ -10091,7 +10092,7 @@ function fu(n) {
10091
10092
  }
10092
10093
  function hu(n, e, t) {
10093
10094
  let { node: r, fromOffset: i, toOffset: s, from: o, to: l } = n.docView.parseRange(e, t), a = n.domSelectionRange(), c, d = a.anchorNode;
10094
- if (d && n.dom.contains(d.nodeType == 1 ? d : d.parentNode) && (c = [{ node: d, offset: a.anchorOffset }], Sn(a) || c.push({ node: a.focusNode, offset: a.focusOffset })), Q && n.input.lastKeyCode === 8)
10095
+ if (d && n.dom.contains(d.nodeType == 1 ? d : d.parentNode) && (c = [{ node: d, offset: a.anchorOffset }], kn(a) || c.push({ node: a.focusNode, offset: a.focusOffset })), Q && n.input.lastKeyCode === 8)
10095
10096
  for (let g = s; g > i; g--) {
10096
10097
  let y = r.childNodes[g - 1], C = y.pmViewDesc;
10097
10098
  if (y.nodeName == "BR" && !C) {
@@ -10135,12 +10136,12 @@ function pu(n) {
10135
10136
  const mu = /^(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;
10136
10137
  function gu(n, e, t, r, i) {
10137
10138
  if (e < 0) {
10138
- let S = n.input.lastSelectionTime > Date.now() - 50 ? n.input.lastSelectionOrigin : null, j = Nr(n, S);
10139
+ let k = n.input.lastSelectionTime > Date.now() - 50 ? n.input.lastSelectionOrigin : null, j = Nr(n, k);
10139
10140
  if (j && !n.state.selection.eq(j)) {
10140
10141
  if (Q && he && n.input.lastKeyCode === 13 && Date.now() - 100 < n.input.lastKeyCodeTime && n.someProp("handleKeyDown", (Kt) => Kt(n, je(13, "Enter"))))
10141
10142
  return;
10142
10143
  let ge = n.state.tr.setSelection(j);
10143
- S == "pointer" ? ge.setMeta("pointer", !0) : S == "key" && ge.scrollIntoView(), n.composing && ge.setMeta("composition", n.input.compositionID), n.dispatch(ge);
10144
+ k == "pointer" ? ge.setMeta("pointer", !0) : k == "key" && ge.scrollIntoView(), n.composing && ge.setMeta("composition", n.input.compositionID), n.dispatch(ge);
10144
10145
  }
10145
10146
  return;
10146
10147
  }
@@ -10148,8 +10149,8 @@ function gu(n, e, t, r, i) {
10148
10149
  e = s.before(o + 1), t = n.state.doc.resolve(t).after(o + 1);
10149
10150
  let l = n.state.selection, a = hu(n, e, t), c = n.state.doc, d = c.slice(a.from, a.to), u, f;
10150
10151
  n.input.lastKeyCode === 8 && Date.now() - 100 < n.input.lastKeyCodeTime ? (u = n.state.selection.to, f = "end") : (u = n.state.selection.from, f = "start"), n.input.lastKeyCode = null;
10151
- let h = ku(d.content, a.doc.content, a.from, u, f);
10152
- if ((yt && n.input.lastIOSEnter > Date.now() - 225 || he) && i.some((S) => S.nodeType == 1 && !mu.test(S.nodeName)) && (!h || h.endA >= h.endB) && n.someProp("handleKeyDown", (S) => S(n, je(13, "Enter")))) {
10152
+ let h = Su(d.content, a.doc.content, a.from, u, f);
10153
+ if ((yt && n.input.lastIOSEnter > Date.now() - 225 || he) && i.some((k) => k.nodeType == 1 && !mu.test(k.nodeName)) && (!h || h.endA >= h.endB) && n.someProp("handleKeyDown", (k) => k(n, je(13, "Enter")))) {
10153
10154
  n.input.lastIOSEnter = 0;
10154
10155
  return;
10155
10156
  }
@@ -10158,31 +10159,31 @@ function gu(n, e, t, r, i) {
10158
10159
  h = { start: l.from, endA: l.to, endB: l.to };
10159
10160
  else {
10160
10161
  if (a.sel) {
10161
- let S = zi(n, n.state.doc, a.sel);
10162
- if (S && !S.eq(n.state.selection)) {
10163
- let j = n.state.tr.setSelection(S);
10162
+ let k = zi(n, n.state.doc, a.sel);
10163
+ if (k && !k.eq(n.state.selection)) {
10164
+ let j = n.state.tr.setSelection(k);
10164
10165
  n.composing && j.setMeta("composition", n.input.compositionID), n.dispatch(j);
10165
10166
  }
10166
10167
  }
10167
10168
  return;
10168
10169
  }
10169
10170
  if (Q && n.cursorWrapper && a.sel && a.sel.anchor == n.cursorWrapper.deco.from && a.sel.head == a.sel.anchor) {
10170
- let S = h.endB - h.start;
10171
- a.sel = { anchor: a.sel.anchor + S, head: a.sel.anchor + S };
10171
+ let k = h.endB - h.start;
10172
+ a.sel = { anchor: a.sel.anchor + k, head: a.sel.anchor + k };
10172
10173
  }
10173
10174
  n.input.domChangeCount++, n.state.selection.from < n.state.selection.to && h.start == h.endB && n.state.selection instanceof A && (h.start > n.state.selection.from && h.start <= n.state.selection.from + 2 && n.state.selection.from >= a.from ? h.start = n.state.selection.from : h.endA < n.state.selection.to && h.endA >= n.state.selection.to - 2 && n.state.selection.to <= a.to && (h.endB += n.state.selection.to - h.endA, h.endA = n.state.selection.to)), re && Pe <= 11 && h.endB == h.start + 1 && h.endA == h.start && h.start > a.from && a.doc.textBetween(h.start - a.from - 1, h.start - a.from + 1) == "  " && (h.start--, h.endA--, h.endB--);
10174
10175
  let p = a.doc.resolveNoCache(h.start - a.from), m = a.doc.resolveNoCache(h.endB - a.from), g = c.resolve(h.start), y = p.sameParent(m) && p.parent.inlineContent && g.end() >= h.endA, C;
10175
- if ((yt && n.input.lastIOSEnter > Date.now() - 225 && (!y || i.some((S) => S.nodeName == "DIV" || S.nodeName == "P")) || !y && p.pos < a.doc.content.size && (C = O.findFrom(a.doc.resolve(p.pos + 1), 1, !0)) && C.head == m.pos) && n.someProp("handleKeyDown", (S) => S(n, je(13, "Enter")))) {
10176
+ if ((yt && n.input.lastIOSEnter > Date.now() - 225 && (!y || i.some((k) => k.nodeName == "DIV" || k.nodeName == "P")) || !y && p.pos < a.doc.content.size && (C = O.findFrom(a.doc.resolve(p.pos + 1), 1, !0)) && C.head == m.pos) && n.someProp("handleKeyDown", (k) => k(n, je(13, "Enter")))) {
10176
10177
  n.input.lastIOSEnter = 0;
10177
10178
  return;
10178
10179
  }
10179
- if (n.state.selection.anchor > h.start && bu(c, h.start, h.endA, p, m) && n.someProp("handleKeyDown", (S) => S(n, je(8, "Backspace")))) {
10180
+ if (n.state.selection.anchor > h.start && bu(c, h.start, h.endA, p, m) && n.someProp("handleKeyDown", (k) => k(n, je(8, "Backspace")))) {
10180
10181
  he && Q && n.domObserver.suppressSelectionUpdates();
10181
10182
  return;
10182
10183
  }
10183
10184
  Q && he && h.endB == h.start && (n.input.lastAndroidDelete = Date.now()), he && !y && p.start() != m.start() && m.parentOffset == 0 && p.depth == m.depth && a.sel && a.sel.anchor == a.sel.head && a.sel.head == h.endA && (h.endB -= 2, m = a.doc.resolveNoCache(h.endB - a.from), setTimeout(() => {
10184
- n.someProp("handleKeyDown", function(S) {
10185
- return S(n, je(13, "Enter"));
10185
+ n.someProp("handleKeyDown", function(k) {
10186
+ return k(n, je(13, "Enter"));
10186
10187
  });
10187
10188
  }, 20));
10188
10189
  let E = h.start, P = h.endA, T, I, V;
@@ -10195,15 +10196,15 @@ function gu(n, e, t, r, i) {
10195
10196
  )
10196
10197
  T = n.state.tr, V.type == "add" ? T.addMark(E, P, V.mark) : T.removeMark(E, P, V.mark);
10197
10198
  else if (p.parent.child(p.index()).isText && p.index() == m.index() - (m.textOffset ? 0 : 1)) {
10198
- let S = p.parent.textBetween(p.parentOffset, m.parentOffset);
10199
- if (n.someProp("handleTextInput", (j) => j(n, E, P, S)))
10199
+ let k = p.parent.textBetween(p.parentOffset, m.parentOffset);
10200
+ if (n.someProp("handleTextInput", (j) => j(n, E, P, k)))
10200
10201
  return;
10201
- T = n.state.tr.insertText(S, E, P);
10202
+ T = n.state.tr.insertText(k, E, P);
10202
10203
  }
10203
10204
  }
10204
10205
  if (T || (T = n.state.tr.replace(E, P, a.doc.slice(h.start - a.from, h.endB - a.from))), a.sel) {
10205
- let S = zi(n, T.doc, a.sel);
10206
- S && !(Q && he && n.composing && S.empty && (h.start != h.endB || n.input.lastAndroidDelete < Date.now() - 100) && (S.head == E || S.head == T.mapping.map(P) - 1) || re && S.empty && S.head == E) && T.setSelection(S);
10206
+ let k = zi(n, T.doc, a.sel);
10207
+ k && !(Q && he && n.composing && k.empty && (h.start != h.endB || n.input.lastAndroidDelete < Date.now() - 100) && (k.head == E || k.head == T.mapping.map(P) - 1) || re && k.empty && k.head == E) && T.setSelection(k);
10207
10208
  }
10208
10209
  I && T.ensureMarks(I), n.composing && T.setMeta("composition", n.input.compositionID), n.dispatch(T.scrollIntoView());
10209
10210
  }
@@ -10250,7 +10251,7 @@ function Jn(n, e, t) {
10250
10251
  }
10251
10252
  return i;
10252
10253
  }
10253
- function ku(n, e, t, r, i) {
10254
+ function Su(n, e, t, r, i) {
10254
10255
  let s = n.findDiffStart(e, t);
10255
10256
  if (s == null)
10256
10257
  return null;
@@ -10268,7 +10269,7 @@ function ku(n, e, t, r, i) {
10268
10269
  }
10269
10270
  return { start: s, endA: o, endB: l };
10270
10271
  }
10271
- class Su {
10272
+ class ku {
10272
10273
  /**
10273
10274
  Create a view. `place` may be a DOM node that the editor should
10274
10275
  be appended to, a function that will place it into the document,
@@ -10790,19 +10791,19 @@ const Ru = (n, e, t) => {
10790
10791
  let s = i.nodeBefore;
10791
10792
  if (!s.type.spec.isolating && Po(n, i, e))
10792
10793
  return !0;
10793
- if (r.parent.content.size == 0 && (kt(s, "end") || v.isSelectable(s))) {
10794
- let o = Mr(n.doc, r.before(), r.after(), k.empty);
10794
+ if (r.parent.content.size == 0 && (St(s, "end") || v.isSelectable(s))) {
10795
+ let o = Mr(n.doc, r.before(), r.after(), S.empty);
10795
10796
  if (o && o.slice.size < o.to - o.from) {
10796
10797
  if (e) {
10797
10798
  let l = n.tr.step(o);
10798
- l.setSelection(kt(s, "end") ? O.findFrom(l.doc.resolve(l.mapping.map(i.pos, -1)), -1) : v.create(l.doc, i.pos - s.nodeSize)), e(l.scrollIntoView());
10799
+ l.setSelection(St(s, "end") ? O.findFrom(l.doc.resolve(l.mapping.map(i.pos, -1)), -1) : v.create(l.doc, i.pos - s.nodeSize)), e(l.scrollIntoView());
10799
10800
  }
10800
10801
  return !0;
10801
10802
  }
10802
10803
  }
10803
10804
  return s.isAtom && i.depth == r.depth - 1 ? (e && e(n.tr.delete(i.pos - s.nodeSize, i.pos).scrollIntoView()), !0) : !1;
10804
10805
  };
10805
- function kt(n, e, t = !1) {
10806
+ function St(n, e, t = !1) {
10806
10807
  for (let r = n; r; r = e == "start" ? r.firstChild : r.lastChild) {
10807
10808
  if (r.isTextblock)
10808
10809
  return !0;
@@ -10847,12 +10848,12 @@ const Lu = (n, e, t) => {
10847
10848
  let s = i.nodeAfter;
10848
10849
  if (Po(n, i, e))
10849
10850
  return !0;
10850
- if (r.parent.content.size == 0 && (kt(s, "start") || v.isSelectable(s))) {
10851
- let o = Mr(n.doc, r.before(), r.after(), k.empty);
10851
+ if (r.parent.content.size == 0 && (St(s, "start") || v.isSelectable(s))) {
10852
+ let o = Mr(n.doc, r.before(), r.after(), S.empty);
10852
10853
  if (o && o.slice.size < o.to - o.from) {
10853
10854
  if (e) {
10854
10855
  let l = n.tr.step(o);
10855
- l.setSelection(kt(s, "start") ? O.findFrom(l.doc.resolve(l.mapping.map(i.pos)), 1) : v.create(l.doc, l.mapping.map(i.pos))), e(l.scrollIntoView());
10856
+ l.setSelection(St(s, "start") ? O.findFrom(l.doc.resolve(l.mapping.map(i.pos)), 1) : v.create(l.doc, l.mapping.map(i.pos))), e(l.scrollIntoView());
10856
10857
  }
10857
10858
  return !0;
10858
10859
  }
@@ -10975,7 +10976,7 @@ function Po(n, e, t) {
10975
10976
  for (let m = s.length - 1; m >= 0; m--)
10976
10977
  f = b.from(s[m].create(null, f));
10977
10978
  f = b.from(r.copy(f));
10978
- let h = n.tr.step(new W(e.pos - 1, u, e.pos, u, new k(f, 1, 0), s.length, !0)), p = u + 2 * s.length;
10979
+ let h = n.tr.step(new W(e.pos - 1, u, e.pos, u, new S(f, 1, 0), s.length, !0)), p = u + 2 * s.length;
10979
10980
  rt(h.doc, p) && h.join(p), t(h.scrollIntoView());
10980
10981
  }
10981
10982
  return !0;
@@ -10983,7 +10984,7 @@ function Po(n, e, t) {
10983
10984
  let a = O.findFrom(e, 1), c = a && a.$from.blockRange(a.$to), d = c && Ct(c);
10984
10985
  if (d != null && d >= e.depth)
10985
10986
  return t && t(n.tr.lift(c, d).scrollIntoView()), !0;
10986
- if (l && kt(i, "start", !0) && kt(r, "end")) {
10987
+ if (l && St(i, "start", !0) && St(r, "end")) {
10987
10988
  let u = r, f = [];
10988
10989
  for (; f.push(u), !u.isTextblock; )
10989
10990
  u = u.lastChild;
@@ -10995,7 +10996,7 @@ function Po(n, e, t) {
10995
10996
  let m = b.empty;
10996
10997
  for (let y = f.length - 1; y >= 0; y--)
10997
10998
  m = b.from(f[y].copy(m));
10998
- let g = n.tr.step(new W(e.pos - f.length, e.pos + i.nodeSize, e.pos + p, e.pos + i.nodeSize - p, new k(m, f.length, 0), 0, !0));
10999
+ let g = n.tr.step(new W(e.pos - f.length, e.pos + i.nodeSize, e.pos + p, e.pos + i.nodeSize - p, new S(m, f.length, 0), 0, !0));
10999
11000
  t(g.scrollIntoView());
11000
11001
  }
11001
11002
  return !0;
@@ -11071,7 +11072,7 @@ function Zu(n, e, t, r, i) {
11071
11072
  let s = b.empty;
11072
11073
  for (let d = t.length - 1; d >= 0; d--)
11073
11074
  s = b.from(t[d].type.create(t[d].attrs, s));
11074
- n.step(new W(e.start - (r ? 2 : 0), e.end, e.start, e.end, new k(s, 0, 0), t.length, !0));
11075
+ n.step(new W(e.start - (r ? 2 : 0), e.end, e.start, e.end, new S(s, 0, 0), t.length, !0));
11075
11076
  let o = 0;
11076
11077
  for (let d = 0; d < t.length; d++)
11077
11078
  t[d].type == i && (o = d + 1);
@@ -11088,7 +11089,7 @@ function Qu(n) {
11088
11089
  }
11089
11090
  function ef(n, e, t, r) {
11090
11091
  let i = n.tr, s = r.end, o = r.$to.end(r.depth);
11091
- s < o && (i.step(new W(s - 1, o, s, o, new k(b.from(t.create(null, r.parent.copy())), 1, 0), 1, !0)), r = new nn(i.doc.resolve(r.$from.pos), i.doc.resolve(o), r.depth));
11092
+ s < o && (i.step(new W(s - 1, o, s, o, new S(b.from(t.create(null, r.parent.copy())), 1, 0), 1, !0)), r = new nn(i.doc.resolve(r.$from.pos), i.doc.resolve(o), r.depth));
11092
11093
  const l = Ct(r);
11093
11094
  if (l == null)
11094
11095
  return !1;
@@ -11107,7 +11108,7 @@ function tf(n, e, t) {
11107
11108
  if (!c.canReplace(d + (l ? 0 : 1), d + 1, o.content.append(a ? b.empty : b.from(i))))
11108
11109
  return !1;
11109
11110
  let u = s.pos, f = u + o.nodeSize;
11110
- return r.step(new W(u - (l ? 1 : 0), f + (a ? 1 : 0), u + 1, f - 1, new k((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;
11111
+ return r.step(new W(u - (l ? 1 : 0), f + (a ? 1 : 0), u + 1, f - 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;
11111
11112
  }
11112
11113
  function nf(n) {
11113
11114
  return function(e, t) {
@@ -11121,7 +11122,7 @@ function nf(n) {
11121
11122
  if (a.type != n)
11122
11123
  return !1;
11123
11124
  if (t) {
11124
- let c = a.lastChild && a.lastChild.type == l.type, d = b.from(c ? n.create() : null), u = new k(b.from(n.create(null, b.from(l.type.create(null, d)))), c ? 3 : 1, 0), f = s.start, h = s.end;
11125
+ let c = a.lastChild && a.lastChild.type == l.type, d = b.from(c ? n.create() : null), u = new S(b.from(n.create(null, b.from(l.type.create(null, d)))), c ? 3 : 1, 0), f = s.start, h = s.end;
11125
11126
  t(e.tr.step(new W(f - (c ? 3 : 1), h, f, h, u, 1, !0)).scrollIntoView());
11126
11127
  }
11127
11128
  return !0;
@@ -11891,10 +11892,10 @@ const bf = fe.create({
11891
11892
  })
11892
11893
  ];
11893
11894
  }
11894
- }), kf = () => ({ editor: n, view: e }) => (requestAnimationFrame(() => {
11895
+ }), Sf = () => ({ editor: n, view: e }) => (requestAnimationFrame(() => {
11895
11896
  var t;
11896
11897
  n.isDestroyed || (e.dom.blur(), (t = window == null ? void 0 : window.getSelection()) === null || t === void 0 || t.removeAllRanges());
11897
- }), !0), Sf = (n = !1) => ({ commands: e }) => e.setContent("", n), xf = () => ({ state: n, tr: e, dispatch: t }) => {
11898
+ }), !0), kf = (n = !1) => ({ commands: e }) => e.setContent("", n), xf = () => ({ state: n, tr: e, dispatch: t }) => {
11898
11899
  const { selection: r } = e, { ranges: i } = r;
11899
11900
  return t && i.forEach(({ $from: s, $to: o }) => {
11900
11901
  n.doc.nodesBetween(s.pos, o.pos, (l, a) => {
@@ -12323,7 +12324,7 @@ function Zt(n, e, t) {
12323
12324
  return i ? i.attribute.keepOnSplit : !1;
12324
12325
  }));
12325
12326
  }
12326
- function kr(n, e, t = {}) {
12327
+ function Sr(n, e, t = {}) {
12327
12328
  const { empty: r, ranges: i } = n.selection, s = e ? ze(e, n.schema) : null;
12328
12329
  if (r)
12329
12330
  return !!(n.storedMarks || n.selection.$from.marks()).filter((u) => s ? s.name === u.type.name : !0).find((u) => un(u.attrs, t, { strict: !1 }));
@@ -12348,9 +12349,9 @@ function kr(n, e, t = {}) {
12348
12349
  }
12349
12350
  function gh(n, e, t = {}) {
12350
12351
  if (!e)
12351
- return jt(n, null, t) || kr(n, null, t);
12352
+ return jt(n, null, t) || Sr(n, null, t);
12352
12353
  const r = Nn(e, n.schema);
12353
- return r === "node" ? jt(n, e, t) : r === "mark" ? kr(n, e, t) : !1;
12354
+ return r === "node" ? jt(n, e, t) : r === "mark" ? Sr(n, e, t) : !1;
12354
12355
  }
12355
12356
  function Zi(n, e) {
12356
12357
  const { nodeExtensions: t } = Mn(e), r = t.find((o) => o.name === n);
@@ -12387,7 +12388,7 @@ function qo(n, e, t) {
12387
12388
  toJSON: () => y
12388
12389
  };
12389
12390
  }
12390
- function kh(n, e, t) {
12391
+ function Sh(n, e, t) {
12391
12392
  var r;
12392
12393
  const { selection: i } = e;
12393
12394
  let s = null;
@@ -12409,7 +12410,7 @@ function kh(n, e, t) {
12409
12410
  }), c;
12410
12411
  });
12411
12412
  }
12412
- const Sh = (n, e = {}) => ({ tr: t, state: r, dispatch: i }) => {
12413
+ const kh = (n, e = {}) => ({ tr: t, state: r, dispatch: i }) => {
12413
12414
  const { selection: s } = t, { empty: o, ranges: l } = s, a = ze(n, r.schema);
12414
12415
  if (i)
12415
12416
  if (o) {
@@ -12431,7 +12432,7 @@ const Sh = (n, e = {}) => ({ tr: t, state: r, dispatch: i }) => {
12431
12432
  }) : t.addMark(p, m, a.create(e));
12432
12433
  });
12433
12434
  });
12434
- return kh(r, t, a);
12435
+ return Sh(r, t, a);
12435
12436
  }, xh = (n, e) => ({ tr: t }) => (t.setMeta(n, e), !0), Ch = (n, e = {}) => ({ state: t, dispatch: r, chain: i }) => {
12436
12437
  const s = J(n, t.schema);
12437
12438
  return s.isTextblock ? i().command(({ commands: o }) => Wi(s, e)(t) ? !0 : o.clearNodes()).command(({ state: o }) => Wi(s, e)(o, r)).run() : (console.warn('[tiptap warn]: Currently "setNode()" only supports text block nodes.'), !1);
@@ -12506,12 +12507,12 @@ const Mh = ({ keepMarks: n = !0 } = {}) => ({ tr: e, state: t, dispatch: r, edit
12506
12507
  const C = l.indexAfter(-1) < l.node(-2).childCount ? 1 : l.indexAfter(-2) < l.node(-3).childCount ? 2 : 3, E = Zt(u, l.node().type.name, l.node().attrs), P = ((s = o.contentMatch.defaultType) === null || s === void 0 ? void 0 : s.createAndFill(E)) || void 0;
12507
12508
  g = g.append(b.from(o.createAndFill(null, P) || void 0));
12508
12509
  const T = l.before(l.depth - (y - 1));
12509
- e.replace(T, l.after(-C), new k(g, 4 - y, 0));
12510
+ e.replace(T, l.after(-C), new S(g, 4 - y, 0));
12510
12511
  let I = -1;
12511
- e.doc.nodesBetween(T, e.doc.content.size, (V, S) => {
12512
+ e.doc.nodesBetween(T, e.doc.content.size, (V, k) => {
12512
12513
  if (I > -1)
12513
12514
  return !1;
12514
- V.isTextblock && V.content.size === 0 && (I = S + 1);
12515
+ V.isTextblock && V.content.size === 0 && (I = k + 1);
12515
12516
  }), I > -1 && e.setSelection(A.near(e.doc.resolve(I))), e.scrollIntoView();
12516
12517
  }
12517
12518
  return !0;
@@ -12562,12 +12563,12 @@ const Mh = ({ keepMarks: n = !0 } = {}) => ({ tr: e, state: t, dispatch: r, edit
12562
12563
  return a().command(() => (s.setNodeMarkup(T.pos, h), !0)).command(() => Qn(s, h)).command(() => er(s, h)).run();
12563
12564
  }
12564
12565
  return !t || !P || !l ? a().command(() => d().wrapInList(h, r) ? !0 : c.clearNodes()).wrapInList(h, r).command(() => Qn(s, h)).command(() => er(s, h)).run() : a().command(() => {
12565
- const I = d().wrapInList(h, r), V = P.filter((S) => f.includes(S.type.name));
12566
+ const I = d().wrapInList(h, r), V = P.filter((k) => f.includes(k.type.name));
12566
12567
  return s.ensureMarks(V), I ? !0 : c.clearNodes();
12567
12568
  }).wrapInList(h, r).command(() => Qn(s, h)).command(() => er(s, h)).run();
12568
12569
  }, Nh = (n, e = {}, t = {}) => ({ state: r, commands: i }) => {
12569
12570
  const { extendEmptyMarkRange: s = !1 } = t, o = ze(n, r.schema);
12570
- return kr(r, o, e) ? i.unsetMark(o, { extendEmptyMarkRange: s }) : i.setMark(o, e);
12571
+ return Sr(r, o, e) ? i.unsetMark(o, { extendEmptyMarkRange: s }) : i.setMark(o, e);
12571
12572
  }, Ah = (n, e, t = {}) => ({ state: r, commands: i }) => {
12572
12573
  const s = J(n, r.schema), o = J(e, r.schema);
12573
12574
  return jt(r, s, t) ? i.setNode(o) : i.setNode(s, t);
@@ -12642,8 +12643,8 @@ const Mh = ({ keepMarks: n = !0 } = {}) => ({ tr: e, state: t, dispatch: r, edit
12642
12643
  };
12643
12644
  var Fh = /* @__PURE__ */ Object.freeze({
12644
12645
  __proto__: null,
12645
- blur: kf,
12646
- clearContent: Sf,
12646
+ blur: Sf,
12647
+ clearContent: kf,
12647
12648
  clearNodes: xf,
12648
12649
  command: Cf,
12649
12650
  createParagraphNear: wf,
@@ -12677,7 +12678,7 @@ var Fh = /* @__PURE__ */ Object.freeze({
12677
12678
  selectTextblockEnd: th,
12678
12679
  selectTextblockStart: nh,
12679
12680
  setContent: rh,
12680
- setMark: Sh,
12681
+ setMark: kh,
12681
12682
  setMeta: xh,
12682
12683
  setNode: Ch,
12683
12684
  setNodeSelection: wh,
@@ -13054,7 +13055,7 @@ let Jh = class extends rf {
13054
13055
  */
13055
13056
  createView() {
13056
13057
  const e = Ho(this.options.content, this.schema, this.options.parseOptions), t = Vo(e, this.options.autofocus);
13057
- this.view = new Su(this.options.element, {
13058
+ this.view = new ku(this.options.element, {
13058
13059
  ...this.options.editorProps,
13059
13060
  dispatchTransaction: this.dispatchTransaction.bind(this),
13060
13061
  state: at.create({
@@ -13646,7 +13647,7 @@ xt({
13646
13647
  }
13647
13648
  });
13648
13649
  function rs(n) {
13649
- return bl((e, t) => ({
13650
+ return yl((e, t) => ({
13650
13651
  get() {
13651
13652
  return e(), n;
13652
13653
  },
@@ -13693,13 +13694,13 @@ const Qh = xt({
13693
13694
  }
13694
13695
  },
13695
13696
  setup(n) {
13696
- const e = mn(), t = pl();
13697
- return ml(() => {
13697
+ const e = mn(), t = hl();
13698
+ return pl(() => {
13698
13699
  const r = n.editor;
13699
- r && r.options.element && e.value && gl(() => {
13700
+ r && r.options.element && e.value && ml(() => {
13700
13701
  if (!e.value || !r.options.element.firstChild)
13701
13702
  return;
13702
- const i = yl(e.value);
13703
+ const i = gl(e.value);
13703
13704
  e.value.append(...r.options.element.childNodes), r.contentComponent = t.ctx._, r.setOptions({
13704
13705
  element: i
13705
13706
  }), r.createNodeViews();
@@ -14258,10 +14259,10 @@ function Yo({ pluginKey: n = hp, editor: e, char: t = "@", allowSpaces: r = !1,
14258
14259
  return {
14259
14260
  update: async (m, g) => {
14260
14261
  var y, C, E, P, T, I, V;
14261
- const S = (y = this.key) === null || y === void 0 ? void 0 : y.getState(g), j = (C = this.key) === null || C === void 0 ? void 0 : C.getState(m.state), ge = S.active && j.active && S.range.from !== j.range.from, Kt = !S.active && j.active, Hr = S.active && !j.active, el = !Kt && !Hr && S.query !== j.query, wt = Kt || ge, Wt = el && !ge, An = Hr || ge;
14262
+ const k = (y = this.key) === null || y === void 0 ? void 0 : y.getState(g), j = (C = this.key) === null || C === void 0 ? void 0 : C.getState(m.state), ge = k.active && j.active && k.range.from !== j.range.from, Kt = !k.active && j.active, Hr = k.active && !j.active, el = !Kt && !Hr && k.query !== j.query, wt = Kt || ge, Wt = el && !ge, An = Hr || ge;
14262
14263
  if (!wt && !Wt && !An)
14263
14264
  return;
14264
- const it = An && !wt ? S : j, $r = m.dom.querySelector(`[data-decoration-id="${it.decorationId}"]`);
14265
+ const it = An && !wt ? k : j, $r = m.dom.querySelector(`[data-decoration-id="${it.decorationId}"]`);
14265
14266
  f = {
14266
14267
  editor: e,
14267
14268
  range: it.range,
@@ -14310,9 +14311,9 @@ function Yo({ pluginKey: n = hp, editor: e, char: t = "@", allowSpaces: r = !1,
14310
14311
  },
14311
14312
  // Apply changes to the plugin state from a view transaction.
14312
14313
  apply(m, g, y, C) {
14313
- const { isEditable: E } = e, { composing: P } = e.view, { selection: T } = m, { empty: I, from: V } = T, S = { ...g };
14314
- if (S.composing = P, E && (I || e.view.composing)) {
14315
- (V < g.range.from || V > g.range.to) && !P && !g.composing && (S.active = !1);
14314
+ const { isEditable: E } = e, { composing: P } = e.view, { selection: T } = m, { empty: I, from: V } = T, k = { ...g };
14315
+ if (k.composing = P, E && (I || e.view.composing)) {
14316
+ (V < g.range.from || V > g.range.to) && !P && !g.composing && (k.active = !1);
14316
14317
  const j = fp({
14317
14318
  char: t,
14318
14319
  allowSpaces: r,
@@ -14320,10 +14321,10 @@ function Yo({ pluginKey: n = hp, editor: e, char: t = "@", allowSpaces: r = !1,
14320
14321
  startOfLine: s,
14321
14322
  $position: T.$from
14322
14323
  }), ge = `id_${Math.floor(Math.random() * 4294967295)}`;
14323
- j && u({ editor: e, state: C, range: j.range }) ? (S.active = !0, S.decorationId = g.decorationId ? g.decorationId : ge, S.range = j.range, S.query = j.query, S.text = j.text) : S.active = !1;
14324
+ j && u({ editor: e, state: C, range: j.range }) ? (k.active = !0, k.decorationId = g.decorationId ? g.decorationId : ge, k.range = j.range, k.query = j.query, k.text = j.text) : k.active = !1;
14324
14325
  } else
14325
- S.active = !1;
14326
- return S.active || (S.decorationId = null, S.range = { from: 0, to: 0 }, S.query = null, S.text = null), S;
14326
+ k.active = !1;
14327
+ return k.active || (k.decorationId = null, k.range = { from: 0, to: 0 }, k.query = null, k.text = null), k;
14327
14328
  }
14328
14329
  },
14329
14330
  props: {
@@ -14420,7 +14421,7 @@ const pp = {
14420
14421
  function yp(n, e, t, r, i, s) {
14421
14422
  const o = N("dt-list-item");
14422
14423
  return w(), B("div", mp, [
14423
- kl(G("ul", gp, [
14424
+ bl(G("ul", gp, [
14424
14425
  (w(!0), B(hs, null, cs(t.items, (l, a) => (w(), F(o, {
14425
14426
  key: l.id,
14426
14427
  class: $([
@@ -14445,7 +14446,7 @@ const Xo = /* @__PURE__ */ q(pp, [["render", yp]]), bp = {
14445
14446
  name: "EmojiSuggestion",
14446
14447
  components: {
14447
14448
  DtEmoji: ps,
14448
- DtStack: ks
14449
+ DtStack: Ss
14449
14450
  },
14450
14451
  props: {
14451
14452
  item: {
@@ -14454,7 +14455,7 @@ const Xo = /* @__PURE__ */ q(pp, [["render", yp]]), bp = {
14454
14455
  }
14455
14456
  }
14456
14457
  };
14457
- function kp(n, e, t, r, i, s) {
14458
+ function Sp(n, e, t, r, i, s) {
14458
14459
  const o = N("dt-emoji"), l = N("dt-stack");
14459
14460
  return w(), F(l, {
14460
14461
  direction: "row",
@@ -14465,13 +14466,13 @@ function kp(n, e, t, r, i, s) {
14465
14466
  size: "200",
14466
14467
  code: t.item.code
14467
14468
  }, null, 8, ["code"]),
14468
- $t(" " + Se(t.item.code), 1)
14469
+ $t(" " + ke(t.item.code), 1)
14469
14470
  ]),
14470
14471
  _: 1
14471
14472
  });
14472
14473
  }
14473
- const Sp = /* @__PURE__ */ q(bp, [["render", kp]]), xp = {
14474
- items: ({ query: n }) => n.length < 2 ? [] : Object.values(El).filter(function(r) {
14474
+ const kp = /* @__PURE__ */ q(bp, [["render", Sp]]), xp = {
14475
+ items: ({ query: n }) => n.length < 2 ? [] : Object.values(vl).filter(function(r) {
14475
14476
  return !!r.shortname.substring(1, r.shortname.length - 1).startsWith(n.toLowerCase());
14476
14477
  }).map((r) => ({ id: r.unicode_character, code: r.shortname })),
14477
14478
  command: ({ editor: n, range: e, props: t }) => {
@@ -14494,7 +14495,7 @@ const Sp = /* @__PURE__ */ q(bp, [["render", kp]]), xp = {
14494
14495
  onStart: (t) => {
14495
14496
  n = new jr(Xo, {
14496
14497
  props: {
14497
- itemComponent: gn(Sp),
14498
+ itemComponent: gn(kp),
14498
14499
  itemType: "emoji",
14499
14500
  ...t
14500
14501
  },
@@ -14598,7 +14599,7 @@ const Sp = /* @__PURE__ */ q(bp, [["render", kp]]), xp = {
14598
14599
  },
14599
14600
  type: this.type,
14600
14601
  getAttributes(n) {
14601
- const e = Ml(n[0]).unicode_output;
14602
+ const e = El(n[0]).unicode_output;
14602
14603
  return {
14603
14604
  code: String.fromCodePoint(parseInt(e, 16)),
14604
14605
  label: "emoji"
@@ -14676,36 +14677,36 @@ function Ip(n, e) {
14676
14677
  to: r + e
14677
14678
  };
14678
14679
  }
14679
- function Sr(n, e, t, r) {
14680
+ function kr(n, e, t, r) {
14680
14681
  const i = Ip(n, e);
14681
14682
  if (r.lastIndex = 0, !r.test(i.text))
14682
14683
  return i;
14683
14684
  const s = t === "left" ? i.from - 1 : i.to + 1;
14684
- return s <= 0 || s >= n.length || s === e ? i : Sr(n, s, t, r);
14685
+ return s <= 0 || s >= n.length || s === e ? i : kr(n, s, t, r);
14685
14686
  }
14686
14687
  function Pp(n, e, t, r) {
14687
14688
  const i = Math.max(n.from - 1, 0), s = Math.min(n.to + 1, e.content.size), o = mh(i, s, e);
14688
14689
  for (const l of o)
14689
14690
  l.mark.type === r && t.removeMark(l.from, l.to, r);
14690
14691
  }
14691
- const ss = dl(1, 15);
14692
+ const ss = cl(1, 15);
14692
14693
  function ls(n, e, t, r, i, s) {
14693
14694
  if (!n)
14694
14695
  return;
14695
14696
  let o = t - e - 1;
14696
14697
  o = o < 0 ? 0 : o;
14697
- const l = r - e, a = Sr(
14698
+ const l = r - e, a = kr(
14698
14699
  n,
14699
14700
  o,
14700
14701
  "left",
14701
14702
  ss
14702
- ), c = Sr(
14703
+ ), c = kr(
14703
14704
  n,
14704
14705
  l,
14705
14706
  "right",
14706
14707
  ss
14707
14708
  ), d = n.slice(a.from, c.to);
14708
- Np(d, ul, Ap).forEach((f) => {
14709
+ Np(d, dl, Ap).forEach((f) => {
14709
14710
  const h = Dp(f[0]), p = e + a.from + f.index + 1, m = p + h.length;
14710
14711
  i.addMark(p, m, s.create());
14711
14712
  });
@@ -14889,7 +14890,7 @@ function Vp(n, e, t, r, i, s) {
14889
14890
  href: null
14890
14891
  }, {
14891
14892
  default: D(() => [
14892
- $t(Se(s.text), 1)
14893
+ $t(ke(s.text), 1)
14893
14894
  ]),
14894
14895
  _: 1
14895
14896
  })
@@ -14939,7 +14940,7 @@ const jp = /* @__PURE__ */ q(zp, [["render", Vp]]), Hp = Fp.extend({
14939
14940
  name: "MentionSuggestion",
14940
14941
  components: {
14941
14942
  DtAvatar: Jl,
14942
- DtStack: ks
14943
+ DtStack: Ss
14943
14944
  },
14944
14945
  props: {
14945
14946
  item: {
@@ -14968,7 +14969,7 @@ function qp(n, e, t, r, i, s) {
14968
14969
  "image-src": s.avatarSrc,
14969
14970
  size: "xs"
14970
14971
  }, null, 8, ["full-name", "image-src"]),
14971
- $t(" " + Se(s.name), 1)
14972
+ $t(" " + ke(s.name), 1)
14972
14973
  ]),
14973
14974
  _: 1
14974
14975
  });
@@ -15277,13 +15278,13 @@ const Yp = {
15277
15278
  name: "DtRecipeMessageInput",
15278
15279
  components: {
15279
15280
  DtButton: yn,
15280
- DtEmojiPicker: Ol,
15281
+ DtEmojiPicker: Ml,
15281
15282
  DtIcon: nt,
15282
- DtInput: Tl,
15283
+ DtInput: Ol,
15283
15284
  DtNotice: Wa,
15284
15285
  DtPopover: $a,
15285
15286
  DtRichTextEditor: Gp,
15286
- DtTooltip: fl
15287
+ DtTooltip: ul
15287
15288
  },
15288
15289
  mixins: [],
15289
15290
  inheritAttrs: !1,
@@ -15428,6 +15429,14 @@ const Yp = {
15428
15429
  return Cr.includes(n);
15429
15430
  }
15430
15431
  },
15432
+ /**
15433
+ * Content area needs to dynamically adjust height based on the conversation area height.
15434
+ * can be vh|px|rem|em|%
15435
+ */
15436
+ maxHeight: {
15437
+ type: String,
15438
+ default: "unset"
15439
+ },
15431
15440
  // Emoji picker props
15432
15441
  /**
15433
15442
  * tab labels for emoji
@@ -15622,12 +15631,12 @@ const Yp = {
15622
15631
  this.$refs.richTextEditor.focusEditor(), this.hasFocus = !0;
15623
15632
  }
15624
15633
  }
15625
- }, Xp = { class: "d-ps-relative d-bar8 d-bgc-white" }, Zp = { class: "d-of-auto d-mx16 d-mt8 d-mb4 d-hmx40p" }, Qp = { class: "d-d-flex d-jc-space-between d-mx8 d-my4" }, em = { class: "d-d-flex" }, tm = { class: "d-d-flex" }, nm = {
15634
+ }, Xp = { class: "d-ps-relative d-bar8 d-bgc-white" }, Zp = { class: "d-d-flex d-jc-space-between d-mx8 d-my4" }, Qp = { class: "d-d-flex" }, em = { class: "d-d-flex" }, tm = {
15626
15635
  key: 0,
15627
15636
  class: "d-fc-error d-mr16 d-as-center dt-message-input--remaining-char",
15628
15637
  "data-qa": "dt-message-input-character-limit"
15629
- }, rm = { class: "d-d-flex d-jc-space-between d-h24 d-ai-center" }, im = { "data-qa": "dt-message-input-footer-left" }, sm = { "data-qa": "dt-message-input-footer-right" };
15630
- function om(n, e, t, r, i, s) {
15638
+ }, nm = { class: "d-d-flex d-jc-space-between d-h24 d-ai-center" }, rm = { "data-qa": "dt-message-input-footer-left" }, im = { "data-qa": "dt-message-input-footer-right" };
15639
+ function sm(n, e, t, r, i, s) {
15631
15640
  const o = N("dt-icon"), l = N("dt-notice"), a = N("dt-rich-text-editor"), c = N("dt-button"), d = N("dt-input"), u = N("dt-tooltip"), f = N("dt-emoji-picker"), h = N("dt-popover");
15632
15641
  return w(), B(hs, null, [
15633
15642
  t.showNotice ? (w(), F(l, {
@@ -15645,7 +15654,7 @@ function om(n, e, t, r, i, s) {
15645
15654
  })
15646
15655
  ]),
15647
15656
  default: D(() => [
15648
- $t(Se(t.noticeMessage) + " ", 1)
15657
+ $t(ke(t.noticeMessage) + " ", 1)
15649
15658
  ]),
15650
15659
  _: 1
15651
15660
  }, 8, ["class", "kind", "close-button-props", "onClose"])) : z("", !0),
@@ -15662,8 +15671,11 @@ function om(n, e, t, r, i, s) {
15662
15671
  onFocusin: e[22] || (e[22] = (p) => i.hasFocus = !0),
15663
15672
  onFocusout: e[23] || (e[23] = (p) => i.hasFocus = !1)
15664
15673
  }, [
15665
- G("div", Zp, [
15666
- _(a, St({
15674
+ G("div", {
15675
+ class: "d-of-auto d-mx16 d-mt8 d-mb4",
15676
+ style: kl({ "max-height": t.maxHeight })
15677
+ }, [
15678
+ _(a, kt({
15667
15679
  ref: "richTextEditor",
15668
15680
  modelValue: i.internalInputValue,
15669
15681
  "onUpdate:modelValue": e[0] || (e[0] = (p) => i.internalInputValue = p),
@@ -15678,10 +15690,10 @@ function om(n, e, t, r, i, s) {
15678
15690
  onFocus: e[1] || (e[1] = (p) => i.hasFocus = !0),
15679
15691
  onBlur: e[2] || (e[2] = (p) => i.hasFocus = !1)
15680
15692
  }), null, 16, ["modelValue", "editable", "input-aria-label", "input-class", "output-format", "auto-focus", "link", "placeholder"])
15681
- ]),
15693
+ ], 4),
15682
15694
  L(n.$slots, "middle"),
15683
- G("section", Qp, [
15684
- G("div", em, [
15695
+ G("section", Zp, [
15696
+ G("div", Qp, [
15685
15697
  _(u, {
15686
15698
  placement: "top-start",
15687
15699
  message: t.imageTooltipLabel,
@@ -15777,7 +15789,7 @@ function om(n, e, t, r, i, s) {
15777
15789
  _: 1
15778
15790
  }, 8, ["open"])
15779
15791
  ]),
15780
- G("div", tm, [
15792
+ G("div", em, [
15781
15793
  s.displayCharacterLimitWarning ? (w(), F(u, {
15782
15794
  key: 0,
15783
15795
  enabled: t.characterLimitWarningMessage && t.characterLimitCount - s.inputLength < 0,
@@ -15786,7 +15798,7 @@ function om(n, e, t, r, i, s) {
15786
15798
  offset: [10, -8]
15787
15799
  }, {
15788
15800
  anchor: D(() => [
15789
- s.displayCharacterLimitWarning ? (w(), B("p", nm, Se(t.characterLimitCount - s.inputLength), 1)) : z("", !0)
15801
+ s.displayCharacterLimitWarning ? (w(), B("p", tm, ke(t.characterLimitCount - s.inputLength), 1)) : z("", !0)
15790
15802
  ]),
15791
15803
  _: 1
15792
15804
  }, 8, ["enabled", "message"])) : z("", !0),
@@ -15828,18 +15840,18 @@ function om(n, e, t, r, i, s) {
15828
15840
  ])
15829
15841
  ])
15830
15842
  ], 34),
15831
- G("section", rm, [
15832
- G("div", im, [
15843
+ G("section", nm, [
15844
+ G("div", rm, [
15833
15845
  L(n.$slots, "footerLeft")
15834
15846
  ]),
15835
- G("div", sm, [
15847
+ G("div", im, [
15836
15848
  L(n.$slots, "footerRight")
15837
15849
  ])
15838
15850
  ])
15839
15851
  ])
15840
15852
  ], 64);
15841
15853
  }
15842
- const um = /* @__PURE__ */ q(Yp, [["render", om]]);
15854
+ const um = /* @__PURE__ */ q(Yp, [["render", sm]]);
15843
15855
  export {
15844
15856
  In as A,
15845
15857
  Ql as D,
@@ -15852,25 +15864,26 @@ export {
15852
15864
  ua as b,
15853
15865
  ba as c,
15854
15866
  Na as d,
15855
- $a as e,
15856
- gs as f,
15857
- Ia as g,
15858
- Jl as h,
15859
- Jr as i,
15860
- _l as j,
15861
- Bl as k,
15862
- Kr as l,
15863
- Ll as m,
15864
- Fl as n,
15865
- Wr as o,
15866
- Wa as p,
15867
- Ur as q,
15868
- Aa as r,
15869
- Da as s,
15870
- Pa as t,
15871
- Rl as u,
15872
- Ot as v,
15873
- Nl as w,
15874
- ks as x,
15875
- um as y
15867
+ vr as e,
15868
+ $a as f,
15869
+ gs as g,
15870
+ Ia as h,
15871
+ Jl as i,
15872
+ Jr as j,
15873
+ _l as k,
15874
+ Bl as l,
15875
+ Kr as m,
15876
+ Ll as n,
15877
+ Fl as o,
15878
+ Wr as p,
15879
+ Wa as q,
15880
+ Ur as r,
15881
+ Aa as s,
15882
+ Da as t,
15883
+ Pa as u,
15884
+ Rl as v,
15885
+ Ot as w,
15886
+ Nl as x,
15887
+ Ss as y,
15888
+ um as z
15876
15889
  };