@scbt-ecom/ui 0.24.1 → 0.25.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/ui.js CHANGED
@@ -27948,10 +27948,10 @@ function QW(t, e = null) {
27948
27948
  if (!a)
27949
27949
  return !1;
27950
27950
  let s = r ? n.tr : null;
27951
- return eH(s, a, t, e) ? (r && r(s.scrollIntoView()), !0) : !1;
27951
+ return e9(s, a, t, e) ? (r && r(s.scrollIntoView()), !0) : !1;
27952
27952
  };
27953
27953
  }
27954
- function eH(t, e, n, r = null) {
27954
+ function e9(t, e, n, r = null) {
27955
27955
  let i = !1, o = e, a = e.$from.doc;
27956
27956
  if (e.depth >= 2 && e.$from.node(e.depth - 1).type.compatibleContent(n) && e.startIndex == 0) {
27957
27957
  if (e.$from.index(e.depth - 1) == 0)
@@ -27960,9 +27960,9 @@ function eH(t, e, n, r = null) {
27960
27960
  o = new Gl(l, l, e.depth), e.endIndex < e.parent.childCount && (e = new Gl(e.$from, a.resolve(e.$to.end(e.depth)), e.depth)), i = !0;
27961
27961
  }
27962
27962
  let s = Zh(o, n, r, e);
27963
- return s ? (t && tH(t, e, s, i, n), !0) : !1;
27963
+ return s ? (t && t9(t, e, s, i, n), !0) : !1;
27964
27964
  }
27965
- function tH(t, e, n, r, i) {
27965
+ function t9(t, e, n, r, i) {
27966
27966
  let o = se.empty;
27967
27967
  for (let c = n.length - 1; c >= 0; c--)
27968
27968
  o = se.from(n[c].type.create(n[c].attrs, o));
@@ -27975,13 +27975,13 @@ function tH(t, e, n, r, i) {
27975
27975
  !f && Co(t.doc, l, s) && (t.split(l, s), l += 2 * s), l += u.child(c).nodeSize;
27976
27976
  return t;
27977
27977
  }
27978
- function nH(t) {
27978
+ function n9(t) {
27979
27979
  return function(e, n) {
27980
27980
  let { $from: r, $to: i } = e.selection, o = r.blockRange(i, (a) => a.childCount > 0 && a.firstChild.type == t);
27981
- return o ? n ? r.node(o.depth - 1).type == t ? rH(e, n, t, o) : iH(e, n, o) : !0 : !1;
27981
+ return o ? n ? r.node(o.depth - 1).type == t ? r9(e, n, t, o) : i9(e, n, o) : !0 : !1;
27982
27982
  };
27983
27983
  }
27984
- function rH(t, e, n, r) {
27984
+ function r9(t, e, n, r) {
27985
27985
  let i = t.tr, o = r.end, a = r.$to.end(r.depth);
27986
27986
  o < a && (i.step(new Mt(o - 1, a, o, a, new me(se.from(n.create(null, r.parent.copy())), 1, 0), 1, !0)), r = new Gl(i.doc.resolve(r.$from.pos), i.doc.resolve(a), r.depth));
27987
27987
  const s = qo(r);
@@ -27991,7 +27991,7 @@ function rH(t, e, n, r) {
27991
27991
  let l = i.mapping.map(o, -1) - 1;
27992
27992
  return ti(i.doc, l) && i.join(l), e(i.scrollIntoView()), !0;
27993
27993
  }
27994
- function iH(t, e, n) {
27994
+ function i9(t, e, n) {
27995
27995
  let r = t.tr, i = n.parent;
27996
27996
  for (let p = n.end, h = n.endIndex - 1, m = n.startIndex; h > m; h--)
27997
27997
  p -= i.child(h).nodeSize, r.delete(p - 1, p + 1);
@@ -28004,7 +28004,7 @@ function iH(t, e, n) {
28004
28004
  let d = o.pos, f = d + a.nodeSize;
28005
28005
  return r.step(new Mt(d - (s ? 1 : 0), f + (l ? 1 : 0), d + 1, f - 1, new me((s ? se.empty : se.from(i.copy(se.empty))).append(l ? se.empty : se.from(i.copy(se.empty))), s ? 0 : 1, l ? 0 : 1), s ? 0 : 1)), e(r.scrollIntoView()), !0;
28006
28006
  }
28007
- function oH(t) {
28007
+ function o9(t) {
28008
28008
  return function(e, n) {
28009
28009
  let { $from: r, $to: i } = e.selection, o = r.blockRange(i, (u) => u.childCount > 0 && u.firstChild.type == t);
28010
28010
  if (!o)
@@ -28107,7 +28107,7 @@ class fc {
28107
28107
  return s;
28108
28108
  }
28109
28109
  }
28110
- class aH {
28110
+ class a9 {
28111
28111
  constructor() {
28112
28112
  this.callbacks = {};
28113
28113
  }
@@ -28244,10 +28244,10 @@ function Ak(t) {
28244
28244
  function Ge(t, e = void 0, ...n) {
28245
28245
  return Ak(t) ? e ? t.bind(e)(...n) : t(...n) : t;
28246
28246
  }
28247
- function sH(t = {}) {
28247
+ function s9(t = {}) {
28248
28248
  return Object.keys(t).length === 0 && t.constructor === Object;
28249
28249
  }
28250
- function lH(t) {
28250
+ function l9(t) {
28251
28251
  return typeof t != "string" ? t : t.match(/^[+-]?(?:\d*\.)?\d+$/) ? Number(t) : t === "true" ? !0 : t === "false" ? !1 : t;
28252
28252
  }
28253
28253
  function gy(t, e) {
@@ -28258,7 +28258,7 @@ function gy(t, e) {
28258
28258
  if (r === !1)
28259
28259
  return !1;
28260
28260
  const i = e.reduce((o, a) => {
28261
- const s = a.attribute.parseHTML ? a.attribute.parseHTML(n) : lH(n.getAttribute(a.name));
28261
+ const s = a.attribute.parseHTML ? a.attribute.parseHTML(n) : l9(n.getAttribute(a.name));
28262
28262
  return s == null ? o : {
28263
28263
  ...o,
28264
28264
  [a.name]: s
@@ -28271,10 +28271,10 @@ function gy(t, e) {
28271
28271
  function by(t) {
28272
28272
  return Object.fromEntries(
28273
28273
  // @ts-ignore
28274
- Object.entries(t).filter(([e, n]) => e === "attrs" && sH(n) ? !1 : n != null)
28274
+ Object.entries(t).filter(([e, n]) => e === "attrs" && s9(n) ? !1 : n != null)
28275
28275
  );
28276
28276
  }
28277
- function uH(t, e) {
28277
+ function u9(t, e) {
28278
28278
  var n;
28279
28279
  const r = Tk(t), { nodeExtensions: i, markExtensions: o } = pc(t), a = (n = i.find((u) => ye(u, "topNode"))) === null || n === void 0 ? void 0 : n.name, s = Object.fromEntries(i.map((u) => {
28280
28280
  const c = r.filter((b) => b.type === u.name), d = {
@@ -28362,7 +28362,7 @@ function am(t, e) {
28362
28362
  const n = eo.fromSchema(e).serializeFragment(t), i = document.implementation.createHTMLDocument().createElement("div");
28363
28363
  return i.appendChild(n), i.innerHTML;
28364
28364
  }
28365
- const cH = (t, e = 500) => {
28365
+ const c9 = (t, e = 500) => {
28366
28366
  let n = "";
28367
28367
  const r = t.parentOffset;
28368
28368
  return t.parent.nodesBetween(Math.max(0, r - e), r, (i, o, a, s) => {
@@ -28384,7 +28384,7 @@ class hc {
28384
28384
  this.find = e.find, this.handler = e.handler;
28385
28385
  }
28386
28386
  }
28387
- const dH = (t, e) => {
28387
+ const d9 = (t, e) => {
28388
28388
  if (sm(e))
28389
28389
  return e.exec(t);
28390
28390
  const n = e(t);
@@ -28405,11 +28405,11 @@ function Xs(t) {
28405
28405
  )
28406
28406
  return !1;
28407
28407
  let c = !1;
28408
- const d = cH(u) + o;
28408
+ const d = c9(u) + o;
28409
28409
  return a.forEach((f) => {
28410
28410
  if (c)
28411
28411
  return;
28412
- const p = dH(d, f.find);
28412
+ const p = d9(d, f.find);
28413
28413
  if (!p)
28414
28414
  return;
28415
28415
  const h = l.state.tr, m = dc({
@@ -28437,7 +28437,7 @@ function Xs(t) {
28437
28437
  }), l.dispatch(h), c = !0);
28438
28438
  }), c;
28439
28439
  }
28440
- function fH(t) {
28440
+ function f9(t) {
28441
28441
  const { editor: e, rules: n } = t, r = new Lt({
28442
28442
  state: {
28443
28443
  init() {
@@ -28509,11 +28509,11 @@ function fH(t) {
28509
28509
  });
28510
28510
  return r;
28511
28511
  }
28512
- function pH(t) {
28512
+ function p9(t) {
28513
28513
  return Object.prototype.toString.call(t).slice(8, -1);
28514
28514
  }
28515
28515
  function Ys(t) {
28516
- return pH(t) !== "Object" ? !1 : t.constructor === Object && Object.getPrototypeOf(t) === Object.prototype;
28516
+ return p9(t) !== "Object" ? !1 : t.constructor === Object && Object.getPrototypeOf(t) === Object.prototype;
28517
28517
  }
28518
28518
  function mc(t, e) {
28519
28519
  const n = { ...t };
@@ -28567,15 +28567,15 @@ class Fn {
28567
28567
  return !1;
28568
28568
  }
28569
28569
  }
28570
- function hH(t) {
28570
+ function h9(t) {
28571
28571
  return typeof t == "number";
28572
28572
  }
28573
- class mH {
28573
+ class m9 {
28574
28574
  constructor(e) {
28575
28575
  this.find = e.find, this.handler = e.handler;
28576
28576
  }
28577
28577
  }
28578
- const gH = (t, e, n) => {
28578
+ const g9 = (t, e, n) => {
28579
28579
  if (sm(e))
28580
28580
  return [...t.matchAll(e)];
28581
28581
  const r = e(t, n);
@@ -28584,7 +28584,7 @@ const gH = (t, e, n) => {
28584
28584
  return o.index = i.index, o.input = t, o.data = i.data, i.replaceWith && (i.text.includes(i.replaceWith) || console.warn('[tiptap warn]: "pasteRuleMatch.replaceWith" must be part of "pasteRuleMatch.text".'), o.push(i.replaceWith)), o;
28585
28585
  }) : [];
28586
28586
  };
28587
- function bH(t) {
28587
+ function b9(t) {
28588
28588
  const { editor: e, state: n, from: r, to: i, rule: o, pasteEvent: a, dropEvent: s } = t, { commands: l, chain: u, can: c } = new fc({
28589
28589
  editor: e,
28590
28590
  state: n
@@ -28593,7 +28593,7 @@ function bH(t) {
28593
28593
  if (!p.isTextblock || p.type.spec.code)
28594
28594
  return;
28595
28595
  const m = Math.max(r, h), g = Math.min(i, h + p.content.size), b = p.textBetween(m - h, g - h, void 0, "");
28596
- gH(b, o.find, a).forEach((w) => {
28596
+ g9(b, o.find, a).forEach((w) => {
28597
28597
  if (w.index === void 0)
28598
28598
  return;
28599
28599
  const v = m + w.index + 1, y = v + w[0].length, C = {
@@ -28614,14 +28614,14 @@ function bH(t) {
28614
28614
  }), d.every((p) => p !== null);
28615
28615
  }
28616
28616
  let Zs = null;
28617
- const vH = (t) => {
28617
+ const v9 = (t) => {
28618
28618
  var e;
28619
28619
  const n = new ClipboardEvent("paste", {
28620
28620
  clipboardData: new DataTransfer()
28621
28621
  });
28622
28622
  return (e = n.clipboardData) === null || e === void 0 || e.setData("text/html", t), n;
28623
28623
  };
28624
- function yH(t) {
28624
+ function y9(t) {
28625
28625
  const { editor: e, rules: n } = t;
28626
28626
  let r = null, i = !1, o = !1, a = typeof ClipboardEvent < "u" ? new ClipboardEvent("paste") : null, s;
28627
28627
  try {
@@ -28634,7 +28634,7 @@ function yH(t) {
28634
28634
  state: c,
28635
28635
  transaction: m
28636
28636
  });
28637
- if (!(!bH({
28637
+ if (!(!b9({
28638
28638
  editor: e,
28639
28639
  state: g,
28640
28640
  from: Math.max(d - 1, 0),
@@ -28692,7 +28692,7 @@ function yH(t) {
28692
28692
  if (x) {
28693
28693
  let { text: y } = b;
28694
28694
  typeof y == "string" ? y = y : y = am(se.from(y), p.schema);
28695
- const { from: C } = b, E = C + y.length, S = vH(y);
28695
+ const { from: C } = b, E = C + y.length, S = v9(y);
28696
28696
  return l({
28697
28697
  rule: c,
28698
28698
  state: p,
@@ -28702,7 +28702,7 @@ function yH(t) {
28702
28702
  });
28703
28703
  }
28704
28704
  const w = f.doc.content.findDiffStart(p.doc.content), v = f.doc.content.findDiffEnd(p.doc.content);
28705
- if (!(!hH(w) || !v || w === v.b))
28705
+ if (!(!h9(w) || !v || w === v.b))
28706
28706
  return l({
28707
28707
  rule: c,
28708
28708
  state: p,
@@ -28713,13 +28713,13 @@ function yH(t) {
28713
28713
  }
28714
28714
  }));
28715
28715
  }
28716
- function xH(t) {
28716
+ function x9(t) {
28717
28717
  const e = t.filter((n, r) => t.indexOf(n) !== r);
28718
28718
  return Array.from(new Set(e));
28719
28719
  }
28720
28720
  class vo {
28721
28721
  constructor(e, n) {
28722
- this.splittableMarks = [], this.editor = n, this.extensions = vo.resolve(e), this.schema = uH(this.extensions, n), this.setupExtensions();
28722
+ this.splittableMarks = [], this.editor = n, this.extensions = vo.resolve(e), this.schema = u9(this.extensions, n), this.setupExtensions();
28723
28723
  }
28724
28724
  /**
28725
28725
  * Returns a flattened and sorted extension list while
@@ -28728,7 +28728,7 @@ class vo {
28728
28728
  * @returns An flattened and sorted array of Tiptap extensions
28729
28729
  */
28730
28730
  static resolve(e) {
28731
- const n = vo.sort(vo.flatten(e)), r = xH(n.map((i) => i.name));
28731
+ const n = vo.sort(vo.flatten(e)), r = x9(n.map((i) => i.name));
28732
28732
  return r.length && console.warn(`[tiptap warn]: Duplicate extension names found: [${r.map((i) => `'${i}'`).join(", ")}]. This can lead to issues.`), n;
28733
28733
  }
28734
28734
  /**
@@ -28808,11 +28808,11 @@ class vo {
28808
28808
  return l;
28809
28809
  }).flat();
28810
28810
  return [
28811
- fH({
28811
+ f9({
28812
28812
  editor: e,
28813
28813
  rules: r
28814
28814
  }),
28815
- ...yH({
28815
+ ...y9({
28816
28816
  editor: e,
28817
28817
  rules: i
28818
28818
  }),
@@ -28939,7 +28939,7 @@ function Mk(t, e, n) {
28939
28939
  function Ok(t) {
28940
28940
  return Object.fromEntries(Object.entries(t.nodes).filter(([, e]) => e.spec.toText).map(([e, n]) => [e, n.spec.toText]));
28941
28941
  }
28942
- const CH = Yt.create({
28942
+ const C9 = Yt.create({
28943
28943
  name: "clipboardTextSerializer",
28944
28944
  addOptions() {
28945
28945
  return {
@@ -28962,10 +28962,10 @@ const CH = Yt.create({
28962
28962
  })
28963
28963
  ];
28964
28964
  }
28965
- }), wH = () => ({ editor: t, view: e }) => (requestAnimationFrame(() => {
28965
+ }), w9 = () => ({ editor: t, view: e }) => (requestAnimationFrame(() => {
28966
28966
  var n;
28967
28967
  t.isDestroyed || (e.dom.blur(), (n = window == null ? void 0 : window.getSelection()) === null || n === void 0 || n.removeAllRanges());
28968
- }), !0), SH = (t = !1) => ({ commands: e }) => e.setContent("", t), kH = () => ({ state: t, tr: e, dispatch: n }) => {
28968
+ }), !0), S9 = (t = !1) => ({ commands: e }) => e.setContent("", t), k9 = () => ({ state: t, tr: e, dispatch: n }) => {
28969
28969
  const { selection: r } = e, { ranges: i } = r;
28970
28970
  return n && i.forEach(({ $from: o, $to: a }) => {
28971
28971
  t.doc.nodesBetween(o.pos, a.pos, (s, l) => {
@@ -28982,12 +28982,12 @@ const CH = Yt.create({
28982
28982
  (h || h === 0) && e.lift(p, h);
28983
28983
  });
28984
28984
  }), !0;
28985
- }, EH = (t) => (e) => t(e), IH = () => ({ state: t, dispatch: e }) => XW(t, e), TH = (t, e) => ({ editor: n, tr: r }) => {
28985
+ }, E9 = (t) => (e) => t(e), I9 = () => ({ state: t, dispatch: e }) => XW(t, e), T9 = (t, e) => ({ editor: n, tr: r }) => {
28986
28986
  const { state: i } = n, o = i.doc.slice(t.from, t.to);
28987
28987
  r.deleteRange(t.from, t.to);
28988
28988
  const a = r.mapping.map(e);
28989
28989
  return r.insert(a, o.content), r.setSelection(new Re(r.doc.resolve(a - 1))), !0;
28990
- }, AH = () => ({ tr: t, dispatch: e }) => {
28990
+ }, A9 = () => ({ tr: t, dispatch: e }) => {
28991
28991
  const { selection: n } = t, r = n.$anchor.node();
28992
28992
  if (r.content.size > 0)
28993
28993
  return !1;
@@ -29001,7 +29001,7 @@ const CH = Yt.create({
29001
29001
  return !0;
29002
29002
  }
29003
29003
  return !1;
29004
- }, MH = (t) => ({ tr: e, state: n, dispatch: r }) => {
29004
+ }, M9 = (t) => ({ tr: e, state: n, dispatch: r }) => {
29005
29005
  const i = Pt(t, n.schema), o = e.selection.$anchor;
29006
29006
  for (let a = o.depth; a > 0; a -= 1)
29007
29007
  if (o.node(a).type === i) {
@@ -29012,10 +29012,10 @@ const CH = Yt.create({
29012
29012
  return !0;
29013
29013
  }
29014
29014
  return !1;
29015
- }, OH = (t) => ({ tr: e, dispatch: n }) => {
29015
+ }, O9 = (t) => ({ tr: e, dispatch: n }) => {
29016
29016
  const { from: r, to: i } = t;
29017
29017
  return n && e.delete(r, i), !0;
29018
- }, PH = () => ({ state: t, dispatch: e }) => NW(t, e), DH = () => ({ commands: t }) => t.keyboardShortcut("Enter"), RH = () => ({ state: t, dispatch: e }) => $W(t, e);
29018
+ }, P9 = () => ({ state: t, dispatch: e }) => NW(t, e), D9 = () => ({ commands: t }) => t.keyboardShortcut("Enter"), R9 = () => ({ state: t, dispatch: e }) => $W(t, e);
29019
29019
  function Zl(t, e, n = { strict: !0 }) {
29020
29020
  const r = Object.keys(e);
29021
29021
  return r.length ? r.every((i) => n.strict ? e[i] === t[i] : sm(e[i]) ? e[i].test(t[i]) : e[i] === t[i]) : !0;
@@ -29055,7 +29055,7 @@ function ri(t, e) {
29055
29055
  }
29056
29056
  return t;
29057
29057
  }
29058
- const NH = (t, e = {}) => ({ tr: n, state: r, dispatch: i }) => {
29058
+ const N9 = (t, e = {}) => ({ tr: n, state: r, dispatch: i }) => {
29059
29059
  const o = ri(t, r.schema), { doc: a, selection: s } = n, { $from: l, from: u, to: c } = s;
29060
29060
  if (i) {
29061
29061
  const d = lm(l, o, e);
@@ -29065,7 +29065,7 @@ const NH = (t, e = {}) => ({ tr: n, state: r, dispatch: i }) => {
29065
29065
  }
29066
29066
  }
29067
29067
  return !0;
29068
- }, FH = (t) => (e) => {
29068
+ }, F9 = (t) => (e) => {
29069
29069
  const n = typeof t == "function" ? t(e) : t;
29070
29070
  for (let r = 0; r < n.length; r += 1)
29071
29071
  if (n[r](e))
@@ -29089,7 +29089,7 @@ function Rk(t, e = null) {
29089
29089
  const i = n.from, o = r.to;
29090
29090
  return e === "all" ? Re.create(t, wi(0, i, o), wi(t.content.size, i, o)) : Re.create(t, wi(e, i, o), wi(e, i, o));
29091
29091
  }
29092
- const jH = (t = null, e = {}) => ({ editor: n, view: r, tr: i, dispatch: o }) => {
29092
+ const j9 = (t = null, e = {}) => ({ editor: n, view: r, tr: i, dispatch: o }) => {
29093
29093
  e = {
29094
29094
  scrollIntoView: !0,
29095
29095
  ...e
@@ -29105,7 +29105,7 @@ const jH = (t = null, e = {}) => ({ editor: n, view: r, tr: i, dispatch: o }) =>
29105
29105
  return a(), !0;
29106
29106
  const s = Rk(i.doc, t) || n.state.selection, l = n.state.selection.eq(s);
29107
29107
  return o && (l || i.setSelection(s), l && i.storedMarks && i.setStoredMarks(i.storedMarks), a()), !0;
29108
- }, BH = (t, e) => (n) => t.every((r, i) => e(r, { ...n, index: i })), VH = (t, e) => ({ tr: n, commands: r }) => r.insertContentAt({ from: n.selection.from, to: n.selection.to }, t, e), Nk = (t) => {
29108
+ }, B9 = (t, e) => (n) => t.every((r, i) => e(r, { ...n, index: i })), V9 = (t, e) => ({ tr: n, commands: r }) => r.insertContentAt({ from: n.selection.from, to: n.selection.to }, t, e), Nk = (t) => {
29109
29109
  const e = t.childNodes;
29110
29110
  for (let n = e.length - 1; n >= 0; n -= 1) {
29111
29111
  const r = e[n];
@@ -29166,7 +29166,7 @@ function Ul(t, e, n) {
29166
29166
  }
29167
29167
  return Ul("", e, n);
29168
29168
  }
29169
- function LH(t, e, n) {
29169
+ function L9(t, e, n) {
29170
29170
  const r = t.steps.length - 1;
29171
29171
  if (r < e)
29172
29172
  return;
@@ -29179,7 +29179,7 @@ function LH(t, e, n) {
29179
29179
  a === 0 && (a = c);
29180
29180
  }), t.setSelection(Fe.near(t.doc.resolve(a), n));
29181
29181
  }
29182
- const GH = (t) => !("type" in t), _H = (t, e, n) => ({ tr: r, dispatch: i, editor: o }) => {
29182
+ const G9 = (t) => !("type" in t), _9 = (t, e, n) => ({ tr: r, dispatch: i, editor: o }) => {
29183
29183
  var a;
29184
29184
  if (i) {
29185
29185
  n = {
@@ -29208,7 +29208,7 @@ const GH = (t) => !("type" in t), _H = (t, e, n) => ({ tr: r, dispatch: i, edito
29208
29208
  }), !1;
29209
29209
  }
29210
29210
  let { from: l, to: u } = typeof t == "number" ? { from: t, to: t } : { from: t.from, to: t.to }, c = !0, d = !0;
29211
- if ((GH(s) ? s : [s]).forEach((h) => {
29211
+ if ((G9(s) ? s : [s]).forEach((h) => {
29212
29212
  h.check(), c = c ? h.isText && h.marks.length === 0 : !1, d = d ? h.isBlock : !1;
29213
29213
  }), l === u && d) {
29214
29214
  const { parent: h } = r.doc.resolve(l);
@@ -29227,24 +29227,24 @@ const GH = (t) => !("type" in t), _H = (t, e, n) => ({ tr: r, dispatch: i, edito
29227
29227
  r.insertText(p, l, u);
29228
29228
  } else
29229
29229
  p = s, r.replaceWith(l, u, p);
29230
- n.updateSelection && LH(r, r.steps.length - 1, -1), n.applyInputRules && r.setMeta("applyInputRules", { from: l, text: p }), n.applyPasteRules && r.setMeta("applyPasteRules", { from: l, text: p });
29230
+ n.updateSelection && L9(r, r.steps.length - 1, -1), n.applyInputRules && r.setMeta("applyInputRules", { from: l, text: p }), n.applyPasteRules && r.setMeta("applyPasteRules", { from: l, text: p });
29231
29231
  }
29232
29232
  return !0;
29233
- }, zH = () => ({ state: t, dispatch: e }) => _W(t, e), WH = () => ({ state: t, dispatch: e }) => zW(t, e), HH = () => ({ state: t, dispatch: e }) => FW(t, e), $H = () => ({ state: t, dispatch: e }) => LW(t, e), XH = () => ({ state: t, dispatch: e, tr: n }) => {
29233
+ }, z9 = () => ({ state: t, dispatch: e }) => _W(t, e), W9 = () => ({ state: t, dispatch: e }) => zW(t, e), H9 = () => ({ state: t, dispatch: e }) => FW(t, e), $9 = () => ({ state: t, dispatch: e }) => LW(t, e), X9 = () => ({ state: t, dispatch: e, tr: n }) => {
29234
29234
  try {
29235
29235
  const r = oc(t.doc, t.selection.$from.pos, -1);
29236
29236
  return r == null ? !1 : (n.join(r, 2), e && e(n), !0);
29237
29237
  } catch {
29238
29238
  return !1;
29239
29239
  }
29240
- }, YH = () => ({ state: t, dispatch: e, tr: n }) => {
29240
+ }, Y9 = () => ({ state: t, dispatch: e, tr: n }) => {
29241
29241
  try {
29242
29242
  const r = oc(t.doc, t.selection.$from.pos, 1);
29243
29243
  return r == null ? !1 : (n.join(r, 2), e && e(n), !0);
29244
29244
  } catch {
29245
29245
  return !1;
29246
29246
  }
29247
- }, ZH = () => ({ state: t, dispatch: e }) => jW(t, e), UH = () => ({ state: t, dispatch: e }) => BW(t, e);
29247
+ }, Z9 = () => ({ state: t, dispatch: e }) => jW(t, e), U9 = () => ({ state: t, dispatch: e }) => BW(t, e);
29248
29248
  function Fk() {
29249
29249
  return [
29250
29250
  "iPad Simulator",
@@ -29258,7 +29258,7 @@ function Fk() {
29258
29258
  function jk() {
29259
29259
  return typeof navigator < "u" ? /Mac/.test(navigator.platform) : !1;
29260
29260
  }
29261
- function JH(t) {
29261
+ function J9(t) {
29262
29262
  const e = t.split(/-(?!$)/);
29263
29263
  let n = e[e.length - 1];
29264
29264
  n === "Space" && (n = " ");
@@ -29280,8 +29280,8 @@ function JH(t) {
29280
29280
  }
29281
29281
  return r && (n = `Alt-${n}`), i && (n = `Ctrl-${n}`), a && (n = `Meta-${n}`), o && (n = `Shift-${n}`), n;
29282
29282
  }
29283
- const KH = (t) => ({ editor: e, view: n, tr: r, dispatch: i }) => {
29284
- const o = JH(t).split(/-(?!$)/), a = o.find((u) => !["Alt", "Ctrl", "Meta", "Shift"].includes(u)), s = new KeyboardEvent("keydown", {
29283
+ const K9 = (t) => ({ editor: e, view: n, tr: r, dispatch: i }) => {
29284
+ const o = J9(t).split(/-(?!$)/), a = o.find((u) => !["Alt", "Ctrl", "Meta", "Shift"].includes(u)), s = new KeyboardEvent("keydown", {
29285
29285
  key: a === "Space" ? " " : a,
29286
29286
  altKey: o.includes("Alt"),
29287
29287
  ctrlKey: o.includes("Ctrl"),
@@ -29312,13 +29312,13 @@ function ls(t, e, n = {}) {
29312
29312
  const l = i - r, u = s.filter((d) => a ? a.name === d.node.type.name : !0).filter((d) => Zl(d.node.attrs, n, { strict: !1 }));
29313
29313
  return o ? !!u.length : u.reduce((d, f) => d + f.to - f.from, 0) >= l;
29314
29314
  }
29315
- const qH = (t, e = {}) => ({ state: n, dispatch: r }) => {
29315
+ const q9 = (t, e = {}) => ({ state: n, dispatch: r }) => {
29316
29316
  const i = Pt(t, n.schema);
29317
29317
  return ls(n, i, e) ? WW(n, r) : !1;
29318
- }, QH = () => ({ state: t, dispatch: e }) => YW(t, e), e9 = (t) => ({ state: e, dispatch: n }) => {
29318
+ }, Q9 = () => ({ state: t, dispatch: e }) => YW(t, e), eH = (t) => ({ state: e, dispatch: n }) => {
29319
29319
  const r = Pt(t, e.schema);
29320
- return nH(r)(e, n);
29321
- }, t9 = () => ({ state: t, dispatch: e }) => HW(t, e);
29320
+ return n9(r)(e, n);
29321
+ }, tH = () => ({ state: t, dispatch: e }) => HW(t, e);
29322
29322
  function gc(t, e) {
29323
29323
  return e.nodes[t] ? "node" : e.marks[t] ? "mark" : null;
29324
29324
  }
@@ -29326,7 +29326,7 @@ function xy(t, e) {
29326
29326
  const n = typeof e == "string" ? [e] : e;
29327
29327
  return Object.keys(t).reduce((r, i) => (n.includes(i) || (r[i] = t[i]), r), {});
29328
29328
  }
29329
- const n9 = (t, e) => ({ tr: n, state: r, dispatch: i }) => {
29329
+ const nH = (t, e) => ({ tr: n, state: r, dispatch: i }) => {
29330
29330
  let o = null, a = null;
29331
29331
  const s = gc(typeof t == "string" ? t : t.name, r.schema);
29332
29332
  return s ? (s === "node" && (o = Pt(t, r.schema)), s === "mark" && (a = ri(t, r.schema)), i && n.selection.ranges.forEach((l) => {
@@ -29336,13 +29336,13 @@ const n9 = (t, e) => ({ tr: n, state: r, dispatch: i }) => {
29336
29336
  });
29337
29337
  });
29338
29338
  }), !0) : !1;
29339
- }, r9 = () => ({ tr: t, dispatch: e }) => (e && t.scrollIntoView(), !0), i9 = () => ({ tr: t, dispatch: e }) => {
29339
+ }, rH = () => ({ tr: t, dispatch: e }) => (e && t.scrollIntoView(), !0), iH = () => ({ tr: t, dispatch: e }) => {
29340
29340
  if (e) {
29341
29341
  const n = new En(t.doc);
29342
29342
  t.setSelection(n);
29343
29343
  }
29344
29344
  return !0;
29345
- }, o9 = () => ({ state: t, dispatch: e }) => VW(t, e), a9 = () => ({ state: t, dispatch: e }) => GW(t, e), s9 = () => ({ state: t, dispatch: e }) => ZW(t, e), l9 = () => ({ state: t, dispatch: e }) => KW(t, e), u9 = () => ({ state: t, dispatch: e }) => JW(t, e);
29345
+ }, oH = () => ({ state: t, dispatch: e }) => VW(t, e), aH = () => ({ state: t, dispatch: e }) => GW(t, e), sH = () => ({ state: t, dispatch: e }) => ZW(t, e), lH = () => ({ state: t, dispatch: e }) => KW(t, e), uH = () => ({ state: t, dispatch: e }) => JW(t, e);
29346
29346
  function op(t, e, n = {}, r = {}) {
29347
29347
  return Ul(t, e, {
29348
29348
  slice: !1,
@@ -29350,7 +29350,7 @@ function op(t, e, n = {}, r = {}) {
29350
29350
  errorOnInvalidContent: r.errorOnInvalidContent
29351
29351
  });
29352
29352
  }
29353
- const c9 = (t, e = !1, n = {}, r = {}) => ({ editor: i, tr: o, dispatch: a, commands: s }) => {
29353
+ const cH = (t, e = !1, n = {}, r = {}) => ({ editor: i, tr: o, dispatch: a, commands: s }) => {
29354
29354
  var l, u;
29355
29355
  const { doc: c } = o;
29356
29356
  if (n.preserveWhitespace !== "full") {
@@ -29372,7 +29372,7 @@ function Bk(t, e) {
29372
29372
  const s = a.find((l) => l.type.name === n.name);
29373
29373
  return s ? { ...s.attrs } : {};
29374
29374
  }
29375
- function d9(t, e) {
29375
+ function dH(t, e) {
29376
29376
  const n = new BS(t);
29377
29377
  return e.forEach((r) => {
29378
29378
  r.steps.forEach((i) => {
@@ -29380,7 +29380,7 @@ function d9(t, e) {
29380
29380
  });
29381
29381
  }), n;
29382
29382
  }
29383
- function f9(t) {
29383
+ function fH(t) {
29384
29384
  for (let e = 0; e < t.edgeCount; e += 1) {
29385
29385
  const { type: n } = t.edge(e);
29386
29386
  if (n.isTextblock && !n.hasRequiredAttrs())
@@ -29388,7 +29388,7 @@ function f9(t) {
29388
29388
  }
29389
29389
  return null;
29390
29390
  }
29391
- function p9(t, e, n) {
29391
+ function pH(t, e, n) {
29392
29392
  const r = [];
29393
29393
  return t.nodesBetween(e.from, e.to, (i, o) => {
29394
29394
  n(i) && r.push({
@@ -29397,7 +29397,7 @@ function p9(t, e, n) {
29397
29397
  });
29398
29398
  }), r;
29399
29399
  }
29400
- function h9(t, e) {
29400
+ function hH(t, e) {
29401
29401
  for (let n = t.depth; n > 0; n -= 1) {
29402
29402
  const r = t.node(n);
29403
29403
  if (e(r))
@@ -29410,16 +29410,16 @@ function h9(t, e) {
29410
29410
  }
29411
29411
  }
29412
29412
  function um(t) {
29413
- return (e) => h9(e.$from, t);
29413
+ return (e) => hH(e.$from, t);
29414
29414
  }
29415
- function m9(t, e) {
29415
+ function mH(t, e) {
29416
29416
  const n = {
29417
29417
  from: 0,
29418
29418
  to: t.content.size
29419
29419
  };
29420
29420
  return Mk(t, n, e);
29421
29421
  }
29422
- function g9(t, e) {
29422
+ function gH(t, e) {
29423
29423
  const n = Pt(e, t.schema), { from: r, to: i } = t.selection, o = [];
29424
29424
  t.doc.nodesBetween(r, i, (s) => {
29425
29425
  o.push(s);
@@ -29429,20 +29429,20 @@ function g9(t, e) {
29429
29429
  }
29430
29430
  function Vk(t, e) {
29431
29431
  const n = gc(typeof e == "string" ? e : e.name, t.schema);
29432
- return n === "node" ? g9(t, e) : n === "mark" ? Bk(t, e) : {};
29432
+ return n === "node" ? gH(t, e) : n === "mark" ? Bk(t, e) : {};
29433
29433
  }
29434
- function b9(t, e = JSON.stringify) {
29434
+ function bH(t, e = JSON.stringify) {
29435
29435
  const n = {};
29436
29436
  return t.filter((r) => {
29437
29437
  const i = e(r);
29438
29438
  return Object.prototype.hasOwnProperty.call(n, i) ? !1 : n[i] = !0;
29439
29439
  });
29440
29440
  }
29441
- function v9(t) {
29442
- const e = b9(t);
29441
+ function vH(t) {
29442
+ const e = bH(t);
29443
29443
  return e.length === 1 ? e : e.filter((n, r) => !e.filter((o, a) => a !== r).some((o) => n.oldRange.from >= o.oldRange.from && n.oldRange.to <= o.oldRange.to && n.newRange.from >= o.newRange.from && n.newRange.to <= o.newRange.to));
29444
29444
  }
29445
- function y9(t) {
29445
+ function yH(t) {
29446
29446
  const { mapping: e, steps: n } = t, r = [];
29447
29447
  return e.maps.forEach((i, o) => {
29448
29448
  const a = [];
@@ -29469,7 +29469,7 @@ function y9(t) {
29469
29469
  }
29470
29470
  });
29471
29471
  });
29472
- }), v9(r);
29472
+ }), vH(r);
29473
29473
  }
29474
29474
  function cm(t, e, n) {
29475
29475
  const r = [];
@@ -29516,7 +29516,7 @@ function ap(t, e, n = {}) {
29516
29516
  const l = s.filter((d) => o ? o.name === d.mark.type.name : !0).filter((d) => Zl(d.mark.attrs, n, { strict: !1 })).reduce((d, f) => d + f.to - f.from, 0), u = s.filter((d) => o ? d.mark.type !== o && d.mark.type.excludes(o) : !0).reduce((d, f) => d + f.to - f.from, 0);
29517
29517
  return (l > 0 ? l + u : l) >= a;
29518
29518
  }
29519
- function x9(t, e, n = {}) {
29519
+ function xH(t, e, n = {}) {
29520
29520
  if (!e)
29521
29521
  return ls(t, null, n) || ap(t, null, n);
29522
29522
  const r = gc(e, t.schema);
@@ -29555,10 +29555,10 @@ function dm(t, { checkChildren: e = !0, ignoreWhitespace: n = !1 } = {}) {
29555
29555
  }
29556
29556
  return !1;
29557
29557
  }
29558
- function C9(t) {
29558
+ function CH(t) {
29559
29559
  return t instanceof Ee;
29560
29560
  }
29561
- function w9(t, e, n) {
29561
+ function wH(t, e, n) {
29562
29562
  var r;
29563
29563
  const { selection: i } = e;
29564
29564
  let o = null;
@@ -29580,7 +29580,7 @@ function w9(t, e, n) {
29580
29580
  }), u;
29581
29581
  });
29582
29582
  }
29583
- const S9 = (t, e = {}) => ({ tr: n, state: r, dispatch: i }) => {
29583
+ const SH = (t, e = {}) => ({ tr: n, state: r, dispatch: i }) => {
29584
29584
  const { selection: o } = n, { empty: a, ranges: s } = o, l = ri(t, r.schema);
29585
29585
  if (i)
29586
29586
  if (a) {
@@ -29602,26 +29602,26 @@ const S9 = (t, e = {}) => ({ tr: n, state: r, dispatch: i }) => {
29602
29602
  }) : n.addMark(h, m, l.create(e));
29603
29603
  });
29604
29604
  });
29605
- return w9(r, n, l);
29606
- }, k9 = (t, e) => ({ tr: n }) => (n.setMeta(t, e), !0), E9 = (t, e = {}) => ({ state: n, dispatch: r, chain: i }) => {
29605
+ return wH(r, n, l);
29606
+ }, kH = (t, e) => ({ tr: n }) => (n.setMeta(t, e), !0), EH = (t, e = {}) => ({ state: n, dispatch: r, chain: i }) => {
29607
29607
  const o = Pt(t, n.schema);
29608
29608
  let a;
29609
29609
  return n.selection.$anchor.sameParent(n.selection.$head) && (a = n.selection.$anchor.parent.attrs), o.isTextblock ? i().command(({ commands: s }) => my(o, { ...a, ...e })(n) ? !0 : s.clearNodes()).command(({ state: s }) => my(o, { ...a, ...e })(s, r)).run() : (console.warn('[tiptap warn]: Currently "setNode()" only supports text block nodes.'), !1);
29610
- }, I9 = (t) => ({ tr: e, dispatch: n }) => {
29610
+ }, IH = (t) => ({ tr: e, dispatch: n }) => {
29611
29611
  if (n) {
29612
29612
  const { doc: r } = e, i = wi(t, 0, r.content.size), o = Ee.create(r, i);
29613
29613
  e.setSelection(o);
29614
29614
  }
29615
29615
  return !0;
29616
- }, T9 = (t) => ({ tr: e, dispatch: n }) => {
29616
+ }, TH = (t) => ({ tr: e, dispatch: n }) => {
29617
29617
  if (n) {
29618
29618
  const { doc: r } = e, { from: i, to: o } = typeof t == "number" ? { from: t, to: t } : t, a = Re.atStart(r).from, s = Re.atEnd(r).to, l = wi(i, a, s), u = wi(o, a, s), c = Re.create(r, l, u);
29619
29619
  e.setSelection(c);
29620
29620
  }
29621
29621
  return !0;
29622
- }, A9 = (t) => ({ state: e, dispatch: n }) => {
29622
+ }, AH = (t) => ({ state: e, dispatch: n }) => {
29623
29623
  const r = Pt(t, e.schema);
29624
- return oH(r)(e, n);
29624
+ return o9(r)(e, n);
29625
29625
  };
29626
29626
  function wy(t, e) {
29627
29627
  const n = t.storedMarks || t.selection.$to.parentOffset && t.selection.$from.marks();
@@ -29630,13 +29630,13 @@ function wy(t, e) {
29630
29630
  t.tr.ensureMarks(r);
29631
29631
  }
29632
29632
  }
29633
- const M9 = ({ keepMarks: t = !0 } = {}) => ({ tr: e, state: n, dispatch: r, editor: i }) => {
29633
+ const MH = ({ keepMarks: t = !0 } = {}) => ({ tr: e, state: n, dispatch: r, editor: i }) => {
29634
29634
  const { selection: o, doc: a } = e, { $from: s, $to: l } = o, u = i.extensionManager.attributes, c = ml(u, s.node().type.name, s.node().attrs);
29635
29635
  if (o instanceof Ee && o.node.isBlock)
29636
29636
  return !s.parentOffset || !Co(a, s.pos) ? !1 : (r && (t && wy(n, i.extensionManager.splittableMarks), e.split(s.pos).scrollIntoView()), !0);
29637
29637
  if (!s.parent.isBlock)
29638
29638
  return !1;
29639
- const d = l.parentOffset === l.parent.content.size, f = s.depth === 0 ? void 0 : f9(s.node(-1).contentMatchAt(s.indexAfter(-1)));
29639
+ const d = l.parentOffset === l.parent.content.size, f = s.depth === 0 ? void 0 : fH(s.node(-1).contentMatchAt(s.indexAfter(-1)));
29640
29640
  let p = d && f ? [
29641
29641
  {
29642
29642
  type: f,
@@ -29656,7 +29656,7 @@ const M9 = ({ keepMarks: t = !0 } = {}) => ({ tr: e, state: n, dispatch: r, edit
29656
29656
  t && wy(n, i.extensionManager.splittableMarks), e.scrollIntoView();
29657
29657
  }
29658
29658
  return h;
29659
- }, O9 = (t, e = {}) => ({ tr: n, state: r, dispatch: i, editor: o }) => {
29659
+ }, OH = (t, e = {}) => ({ tr: n, state: r, dispatch: i, editor: o }) => {
29660
29660
  var a;
29661
29661
  const s = Pt(t, r.schema), { $from: l, $to: u } = r.selection, c = r.selection.node;
29662
29662
  if (c && c.isBlock || l.depth < 2 || !l.sameParent(u))
@@ -29729,7 +29729,7 @@ const M9 = ({ keepMarks: t = !0 } = {}) => ({ tr: e, state: n, dispatch: r, edit
29729
29729
  return !0;
29730
29730
  const i = t.doc.nodeAt(r);
29731
29731
  return n.node.type === (i == null ? void 0 : i.type) && ti(t.doc, r) && t.join(r), !0;
29732
- }, P9 = (t, e, n, r = {}) => ({ editor: i, tr: o, state: a, dispatch: s, chain: l, commands: u, can: c }) => {
29732
+ }, PH = (t, e, n, r = {}) => ({ editor: i, tr: o, state: a, dispatch: s, chain: l, commands: u, can: c }) => {
29733
29733
  const { extensions: d, splittableMarks: f } = i.extensionManager, p = Pt(t, a.schema), h = Pt(e, a.schema), { selection: m, storedMarks: g } = a, { $from: b, $to: x } = m, w = b.blockRange(x), v = g || m.$to.parentOffset && m.$from.marks();
29734
29734
  if (!w)
29735
29735
  return !1;
@@ -29744,17 +29744,17 @@ const M9 = ({ keepMarks: t = !0 } = {}) => ({ tr: e, state: n, dispatch: r, edit
29744
29744
  const C = c().wrapInList(p, r), E = v.filter((S) => f.includes(S.type.name));
29745
29745
  return o.ensureMarks(E), C ? !0 : u.clearNodes();
29746
29746
  }).wrapInList(p, r).command(() => bd(o, p)).command(() => vd(o, p)).run();
29747
- }, D9 = (t, e = {}, n = {}) => ({ state: r, commands: i }) => {
29747
+ }, DH = (t, e = {}, n = {}) => ({ state: r, commands: i }) => {
29748
29748
  const { extendEmptyMarkRange: o = !1 } = n, a = ri(t, r.schema);
29749
29749
  return ap(r, a, e) ? i.unsetMark(a, { extendEmptyMarkRange: o }) : i.setMark(a, e);
29750
- }, R9 = (t, e, n = {}) => ({ state: r, commands: i }) => {
29750
+ }, RH = (t, e, n = {}) => ({ state: r, commands: i }) => {
29751
29751
  const o = Pt(t, r.schema), a = Pt(e, r.schema), s = ls(r, o, n);
29752
29752
  let l;
29753
29753
  return r.selection.$anchor.sameParent(r.selection.$head) && (l = r.selection.$anchor.parent.attrs), s ? i.setNode(a, l) : i.setNode(o, { ...l, ...n });
29754
- }, N9 = (t, e = {}) => ({ state: n, commands: r }) => {
29754
+ }, NH = (t, e = {}) => ({ state: n, commands: r }) => {
29755
29755
  const i = Pt(t, n.schema);
29756
29756
  return ls(n, i, e) ? r.lift(i) : r.wrapIn(i, e);
29757
- }, F9 = () => ({ state: t, dispatch: e }) => {
29757
+ }, FH = () => ({ state: t, dispatch: e }) => {
29758
29758
  const n = t.plugins;
29759
29759
  for (let r = 0; r < n.length; r += 1) {
29760
29760
  const i = n[r];
@@ -29774,12 +29774,12 @@ const M9 = ({ keepMarks: t = !0 } = {}) => ({ tr: e, state: n, dispatch: r, edit
29774
29774
  }
29775
29775
  }
29776
29776
  return !1;
29777
- }, j9 = () => ({ tr: t, dispatch: e }) => {
29777
+ }, jH = () => ({ tr: t, dispatch: e }) => {
29778
29778
  const { selection: n } = t, { empty: r, ranges: i } = n;
29779
29779
  return r || e && i.forEach((o) => {
29780
29780
  t.removeMark(o.$from.pos, o.$to.pos);
29781
29781
  }), !0;
29782
- }, B9 = (t, e = {}) => ({ tr: n, state: r, dispatch: i }) => {
29782
+ }, BH = (t, e = {}) => ({ tr: n, state: r, dispatch: i }) => {
29783
29783
  var o;
29784
29784
  const { extendEmptyMarkRange: a = !1 } = e, { selection: s } = n, l = ri(t, r.schema), { $from: u, empty: c, ranges: d } = s;
29785
29785
  if (!i)
@@ -29793,7 +29793,7 @@ const M9 = ({ keepMarks: t = !0 } = {}) => ({ tr: e, state: n, dispatch: r, edit
29793
29793
  n.removeMark(f.$from.pos, f.$to.pos, l);
29794
29794
  });
29795
29795
  return n.removeStoredMark(l), !0;
29796
- }, V9 = (t, e = {}) => ({ tr: n, state: r, dispatch: i }) => {
29796
+ }, VH = (t, e = {}) => ({ tr: n, state: r, dispatch: i }) => {
29797
29797
  let o = null, a = null;
29798
29798
  const s = gc(typeof t == "string" ? t : t.name, r.schema);
29799
29799
  return s ? (s === "node" && (o = Pt(t, r.schema)), s === "mark" && (a = ri(t, r.schema)), i && n.selection.ranges.forEach((l) => {
@@ -29824,82 +29824,82 @@ const M9 = ({ keepMarks: t = !0 } = {}) => ({ tr: e, state: n, dispatch: r, edit
29824
29824
  }));
29825
29825
  }));
29826
29826
  }), !0) : !1;
29827
- }, L9 = (t, e = {}) => ({ state: n, dispatch: r }) => {
29827
+ }, LH = (t, e = {}) => ({ state: n, dispatch: r }) => {
29828
29828
  const i = Pt(t, n.schema);
29829
29829
  return qW(i, e)(n, r);
29830
- }, G9 = (t, e = {}) => ({ state: n, dispatch: r }) => {
29830
+ }, GH = (t, e = {}) => ({ state: n, dispatch: r }) => {
29831
29831
  const i = Pt(t, n.schema);
29832
29832
  return QW(i, e)(n, r);
29833
29833
  };
29834
- var _9 = /* @__PURE__ */ Object.freeze({
29834
+ var _H = /* @__PURE__ */ Object.freeze({
29835
29835
  __proto__: null,
29836
- blur: wH,
29837
- clearContent: SH,
29838
- clearNodes: kH,
29839
- command: EH,
29840
- createParagraphNear: IH,
29841
- cut: TH,
29842
- deleteCurrentNode: AH,
29843
- deleteNode: MH,
29844
- deleteRange: OH,
29845
- deleteSelection: PH,
29846
- enter: DH,
29847
- exitCode: RH,
29848
- extendMarkRange: NH,
29849
- first: FH,
29850
- focus: jH,
29851
- forEach: BH,
29852
- insertContent: VH,
29853
- insertContentAt: _H,
29854
- joinBackward: HH,
29855
- joinDown: WH,
29856
- joinForward: $H,
29857
- joinItemBackward: XH,
29858
- joinItemForward: YH,
29859
- joinTextblockBackward: ZH,
29860
- joinTextblockForward: UH,
29861
- joinUp: zH,
29862
- keyboardShortcut: KH,
29863
- lift: qH,
29864
- liftEmptyBlock: QH,
29865
- liftListItem: e9,
29866
- newlineInCode: t9,
29867
- resetAttributes: n9,
29868
- scrollIntoView: r9,
29869
- selectAll: i9,
29870
- selectNodeBackward: o9,
29871
- selectNodeForward: a9,
29872
- selectParentNode: s9,
29873
- selectTextblockEnd: l9,
29874
- selectTextblockStart: u9,
29875
- setContent: c9,
29876
- setMark: S9,
29877
- setMeta: k9,
29878
- setNode: E9,
29879
- setNodeSelection: I9,
29880
- setTextSelection: T9,
29881
- sinkListItem: A9,
29882
- splitBlock: M9,
29883
- splitListItem: O9,
29884
- toggleList: P9,
29885
- toggleMark: D9,
29886
- toggleNode: R9,
29887
- toggleWrap: N9,
29888
- undoInputRule: F9,
29889
- unsetAllMarks: j9,
29890
- unsetMark: B9,
29891
- updateAttributes: V9,
29892
- wrapIn: L9,
29893
- wrapInList: G9
29836
+ blur: w9,
29837
+ clearContent: S9,
29838
+ clearNodes: k9,
29839
+ command: E9,
29840
+ createParagraphNear: I9,
29841
+ cut: T9,
29842
+ deleteCurrentNode: A9,
29843
+ deleteNode: M9,
29844
+ deleteRange: O9,
29845
+ deleteSelection: P9,
29846
+ enter: D9,
29847
+ exitCode: R9,
29848
+ extendMarkRange: N9,
29849
+ first: F9,
29850
+ focus: j9,
29851
+ forEach: B9,
29852
+ insertContent: V9,
29853
+ insertContentAt: _9,
29854
+ joinBackward: H9,
29855
+ joinDown: W9,
29856
+ joinForward: $9,
29857
+ joinItemBackward: X9,
29858
+ joinItemForward: Y9,
29859
+ joinTextblockBackward: Z9,
29860
+ joinTextblockForward: U9,
29861
+ joinUp: z9,
29862
+ keyboardShortcut: K9,
29863
+ lift: q9,
29864
+ liftEmptyBlock: Q9,
29865
+ liftListItem: eH,
29866
+ newlineInCode: tH,
29867
+ resetAttributes: nH,
29868
+ scrollIntoView: rH,
29869
+ selectAll: iH,
29870
+ selectNodeBackward: oH,
29871
+ selectNodeForward: aH,
29872
+ selectParentNode: sH,
29873
+ selectTextblockEnd: lH,
29874
+ selectTextblockStart: uH,
29875
+ setContent: cH,
29876
+ setMark: SH,
29877
+ setMeta: kH,
29878
+ setNode: EH,
29879
+ setNodeSelection: IH,
29880
+ setTextSelection: TH,
29881
+ sinkListItem: AH,
29882
+ splitBlock: MH,
29883
+ splitListItem: OH,
29884
+ toggleList: PH,
29885
+ toggleMark: DH,
29886
+ toggleNode: RH,
29887
+ toggleWrap: NH,
29888
+ undoInputRule: FH,
29889
+ unsetAllMarks: jH,
29890
+ unsetMark: BH,
29891
+ updateAttributes: VH,
29892
+ wrapIn: LH,
29893
+ wrapInList: GH
29894
29894
  });
29895
- const z9 = Yt.create({
29895
+ const zH = Yt.create({
29896
29896
  name: "commands",
29897
29897
  addCommands() {
29898
29898
  return {
29899
- ..._9
29899
+ ..._H
29900
29900
  };
29901
29901
  }
29902
- }), W9 = Yt.create({
29902
+ }), WH = Yt.create({
29903
29903
  name: "drop",
29904
29904
  addProseMirrorPlugins() {
29905
29905
  return [
@@ -29918,7 +29918,7 @@ const z9 = Yt.create({
29918
29918
  })
29919
29919
  ];
29920
29920
  }
29921
- }), H9 = Yt.create({
29921
+ }), HH = Yt.create({
29922
29922
  name: "editable",
29923
29923
  addProseMirrorPlugins() {
29924
29924
  return [
@@ -29930,7 +29930,7 @@ const z9 = Yt.create({
29930
29930
  })
29931
29931
  ];
29932
29932
  }
29933
- }), $9 = Yt.create({
29933
+ }), $H = Yt.create({
29934
29934
  name: "focusEvents",
29935
29935
  addProseMirrorPlugins() {
29936
29936
  const { editor: t } = this;
@@ -29954,7 +29954,7 @@ const z9 = Yt.create({
29954
29954
  })
29955
29955
  ];
29956
29956
  }
29957
- }), X9 = Yt.create({
29957
+ }), XH = Yt.create({
29958
29958
  name: "keymap",
29959
29959
  addKeyboardShortcuts() {
29960
29960
  const t = () => this.editor.commands.first(({ commands: a }) => [
@@ -30030,7 +30030,7 @@ const z9 = Yt.create({
30030
30030
  })
30031
30031
  ];
30032
30032
  }
30033
- }), Y9 = Yt.create({
30033
+ }), YH = Yt.create({
30034
30034
  name: "paste",
30035
30035
  addProseMirrorPlugins() {
30036
30036
  return [
@@ -30048,7 +30048,7 @@ const z9 = Yt.create({
30048
30048
  })
30049
30049
  ];
30050
30050
  }
30051
- }), Z9 = Yt.create({
30051
+ }), ZH = Yt.create({
30052
30052
  name: "tabindex",
30053
30053
  addProseMirrorPlugins() {
30054
30054
  return [
@@ -30184,7 +30184,7 @@ class pi {
30184
30184
  }), this.editor.view.dispatch(n);
30185
30185
  }
30186
30186
  }
30187
- const U9 = `.ProseMirror {
30187
+ const UH = `.ProseMirror {
30188
30188
  position: relative;
30189
30189
  }
30190
30190
 
@@ -30259,14 +30259,14 @@ img.ProseMirror-separator {
30259
30259
  .tippy-box[data-animation=fade][data-state=hidden] {
30260
30260
  opacity: 0
30261
30261
  }`;
30262
- function J9(t, e, n) {
30262
+ function JH(t, e, n) {
30263
30263
  const r = document.querySelector("style[data-tiptap-style]");
30264
30264
  if (r !== null)
30265
30265
  return r;
30266
30266
  const i = document.createElement("style");
30267
30267
  return e && i.setAttribute("nonce", e), i.setAttribute("data-tiptap-style", ""), i.innerHTML = t, document.getElementsByTagName("head")[0].appendChild(i), i;
30268
30268
  }
30269
- let K9 = class extends aH {
30269
+ let KH = class extends a9 {
30270
30270
  constructor(e = {}) {
30271
30271
  super(), this.isFocused = !1, this.isInitialized = !1, this.extensionStorage = {}, this.options = {
30272
30272
  element: document.createElement("div"),
@@ -30328,7 +30328,7 @@ let K9 = class extends aH {
30328
30328
  * Inject CSS styles.
30329
30329
  */
30330
30330
  injectCSS() {
30331
- this.options.injectCSS && document && (this.css = J9(U9, this.options.injectNonce));
30331
+ this.options.injectCSS && document && (this.css = JH(UH, this.options.injectNonce));
30332
30332
  }
30333
30333
  /**
30334
30334
  * Update editor options.
@@ -30397,16 +30397,16 @@ let K9 = class extends aH {
30397
30397
  createExtensionManager() {
30398
30398
  var e, n;
30399
30399
  const i = [...this.options.enableCoreExtensions ? [
30400
- H9,
30401
- CH.configure({
30400
+ HH,
30401
+ C9.configure({
30402
30402
  blockSeparator: (n = (e = this.options.coreExtensionOptions) === null || e === void 0 ? void 0 : e.clipboardTextSerializer) === null || n === void 0 ? void 0 : n.blockSeparator
30403
30403
  }),
30404
- z9,
30405
- $9,
30406
- X9,
30407
- Z9,
30408
- W9,
30409
- Y9
30404
+ zH,
30405
+ $H,
30406
+ XH,
30407
+ ZH,
30408
+ WH,
30409
+ YH
30410
30410
  ].filter((o) => typeof this.options.enableCoreExtensions == "object" ? this.options.enableCoreExtensions[o.name] !== !1 : !0) : [], ...this.options.extensions].filter((o) => ["extension", "node", "mark"].includes(o == null ? void 0 : o.type));
30411
30411
  this.extensionManager = new vo(i, this);
30412
30412
  }
@@ -30536,7 +30536,7 @@ let K9 = class extends aH {
30536
30536
  }
30537
30537
  isActive(e, n) {
30538
30538
  const r = typeof e == "string" ? e : null, i = typeof e == "string" ? n : e;
30539
- return x9(this.state, r, i);
30539
+ return xH(this.state, r, i);
30540
30540
  }
30541
30541
  /**
30542
30542
  * Get the document as JSON.
@@ -30557,7 +30557,7 @@ let K9 = class extends aH {
30557
30557
  const { blockSeparator: n = `
30558
30558
 
30559
30559
  `, textSerializers: r = {} } = e || {};
30560
- return m9(this.state.doc, {
30560
+ return mH(this.state.doc, {
30561
30561
  blockSeparator: n,
30562
30562
  textSerializers: {
30563
30563
  ...Ok(this.schema),
@@ -30631,7 +30631,7 @@ function Go(t) {
30631
30631
  }
30632
30632
  });
30633
30633
  }
30634
- function q9(t) {
30634
+ function qH(t) {
30635
30635
  return new hc({
30636
30636
  find: t.find,
30637
30637
  handler: ({ state: e, range: n, match: r }) => {
@@ -30722,7 +30722,7 @@ let Vn = class lp {
30722
30722
  }
30723
30723
  };
30724
30724
  function Wi(t) {
30725
- return new mH({
30725
+ return new m9({
30726
30726
  find: t.find,
30727
30727
  handler: ({ state: e, range: n, match: r, pasteEvent: i }) => {
30728
30728
  const o = Ge(t.getAttributes, void 0, r, i);
@@ -30739,7 +30739,7 @@ function Wi(t) {
30739
30739
  }
30740
30740
  });
30741
30741
  }
30742
- function Q9(t) {
30742
+ function QH(t) {
30743
30743
  return t.__esModule && Object.prototype.hasOwnProperty.call(t, "default") ? t.default : t;
30744
30744
  }
30745
30745
  var up = { exports: {} }, yd = {};
@@ -31016,7 +31016,7 @@ var l5 = function t(e, n) {
31016
31016
  return !0;
31017
31017
  }
31018
31018
  return e !== e && n !== n;
31019
- }, u5 = /* @__PURE__ */ Q9(l5), cp = { exports: {} }, Cd = {};
31019
+ }, u5 = /* @__PURE__ */ QH(l5), cp = { exports: {} }, Cd = {};
31020
31020
  /**
31021
31021
  * @license React
31022
31022
  * use-sync-external-store-shim/with-selector.production.min.js
@@ -31236,7 +31236,7 @@ class b5 {
31236
31236
  return (o = (i = this.options.current).onPaste) === null || o === void 0 ? void 0 : o.call(i, ...r);
31237
31237
  }
31238
31238
  };
31239
- return new K9(e);
31239
+ return new KH(e);
31240
31240
  }
31241
31241
  /**
31242
31242
  * Get the current editor instance.
@@ -32208,9 +32208,9 @@ function W5(t) {
32208
32208
  const i = e.some((u) => u.docChanged) && !n.doc.eq(r.doc), o = e.some((u) => u.getMeta("preventAutolink"));
32209
32209
  if (!i || o)
32210
32210
  return;
32211
- const { tr: a } = r, s = d9(n.doc, [...e]);
32212
- if (y9(s).forEach(({ newRange: u }) => {
32213
- const c = p9(r.doc, u, (p) => p.isTextblock);
32211
+ const { tr: a } = r, s = dH(n.doc, [...e]);
32212
+ if (yH(s).forEach(({ newRange: u }) => {
32213
+ const c = pH(r.doc, u, (p) => p.isTextblock);
32214
32214
  let d, f;
32215
32215
  if (c.length > 1 ? (d = c[0], f = r.doc.textBetween(d.pos, d.pos + d.node.nodeSize, void 0, " ")) : c.length && r.doc.textBetween(u.from, u.to, " ", " ").endsWith(" ") && (d = c[0], f = r.doc.textBetween(d.pos, u.to, void 0, " ")), d && f) {
32216
32216
  const p = f.split(" ").filter((b) => b !== "");
@@ -33512,7 +33512,7 @@ const qk = Kk(!1, !0), Qk = Kk(!0, !0), P$ = Yt.create({
33512
33512
  to: i.pos
33513
33513
  }, {
33514
33514
  type: this.name
33515
- }) : C9(n) ? o.insertContentAt(i.pos, {
33515
+ }) : CH(n) ? o.insertContentAt(i.pos, {
33516
33516
  type: this.name
33517
33517
  }) : o.insertContent({ type: this.name }), o.command(({ tr: a, dispatch: s }) => {
33518
33518
  var l;
@@ -33533,7 +33533,7 @@ const qk = Kk(!1, !0), Qk = Kk(!0, !0), P$ = Yt.create({
33533
33533
  },
33534
33534
  addInputRules() {
33535
33535
  return [
33536
- q9({
33536
+ qH({
33537
33537
  find: /^(?:---|—-|___\s|\*\*\*\s)$/,
33538
33538
  type: this.type
33539
33539
  })
@@ -41500,28 +41500,29 @@ const JY = ({
41500
41500
  onChange: r,
41501
41501
  filterDisabled: i,
41502
41502
  externalInputValue: o,
41503
- externalOnInputChange: a
41503
+ externalOnInputChange: a,
41504
+ externalHandlers: s
41504
41505
  }) => {
41505
- const [s, l] = De(""), u = (m) => e ? e(m) : m.label, c = (m) => {
41506
- const { value: g } = m.target;
41507
- l(g);
41508
- }, d = Pe(() => i || !n ? t : t.filter(
41509
- (m) => u(m).toLowerCase().includes(o ? o.toLowerCase() : s.toLowerCase())
41510
- ), [n, t, u, s, o, i]), f = (m) => {
41511
- if (m) {
41512
- if (!Array.isArray(m)) {
41513
- const g = u(m);
41514
- l(g), a && a(g);
41515
- }
41516
- r && r(m);
41506
+ const [l, u] = De(""), c = (g) => e ? e(g) : g.label, d = (g) => {
41507
+ const { value: b } = g.target;
41508
+ u(b);
41509
+ }, f = Pe(() => i || !n ? t : t.filter(
41510
+ (g) => c(g).toLowerCase().includes(o ? o.toLowerCase() : l.toLowerCase())
41511
+ ), [n, t, c, l, o, i]), p = (g) => {
41512
+ if (g) {
41513
+ if (!Array.isArray(g)) {
41514
+ const b = c(g);
41515
+ u(b), a && a(b), s != null && s.onInputChange && (s == null || s.onInputChange(b));
41516
+ }
41517
+ r && r(g), s != null && s.onChange && (s == null || s.onChange(g));
41517
41518
  }
41518
41519
  };
41519
- return { options: d, inputValue: s, onInputValueChange: c, onValueChange: f, onDeleteItem: (m, g) => {
41520
- const b = Array.isArray(m) && m.filter((x) => x.value !== g.value) || [];
41521
- f(b);
41522
- }, selectDisplayValue: (m) => {
41523
- if (m)
41524
- return Array.isArray(m) ? m.map((g) => u(g)).join(", ") : u(m);
41520
+ return { options: f, inputValue: l, onInputValueChange: d, onValueChange: p, onDeleteItem: (g, b) => {
41521
+ const x = Array.isArray(g) && g.filter((w) => w.value !== b.value) || [];
41522
+ p(x);
41523
+ }, selectDisplayValue: (g) => {
41524
+ if (g)
41525
+ return Array.isArray(g) ? g.map((b) => c(b)).join(", ") : c(g);
41525
41526
  } };
41526
41527
  }, KY = ({ option: t, classes: e, displayValue: n, isMulti: r, motionProps: i, ...o }) => {
41527
41528
  const a = n ? n(t) : t.label, { item: s, helperText: l } = e || {}, u = r || t.attachment || t.helperText ? "div" : Bt;
@@ -41576,9 +41577,10 @@ const JY = ({
41576
41577
  filterDisabled: c = !1,
41577
41578
  inputValue: d,
41578
41579
  onInputChange: f,
41579
- ...p
41580
- }, h) => {
41581
- const { root: m, list: g, ...b } = o || {}, { options: x, inputValue: w, onValueChange: v, onInputValueChange: y, selectDisplayValue: C } = JY({
41580
+ externalHandlers: p,
41581
+ ...h
41582
+ }, m) => {
41583
+ const { root: g, list: b, ...x } = o || {}, { options: w, inputValue: v, onValueChange: y, onInputValueChange: C, selectDisplayValue: E } = JY({
41582
41584
  options: i,
41583
41585
  isSearchable: r,
41584
41586
  isMulti: n,
@@ -41586,74 +41588,88 @@ const JY = ({
41586
41588
  onChange: l,
41587
41589
  filterDisabled: c,
41588
41590
  externalInputValue: d,
41589
- externalOnInputChange: f
41590
- }), E = r ? Bt : xf, S = r ? xf : Bt;
41591
- return /* @__PURE__ */ T.jsx(rw, { ref: h, ...p, value: s ?? null, onChange: v, multiple: n, children: ({ disabled: k, open: I, value: A }) => {
41592
- const O = () => n && r ? C(A) : r ? w : C(A);
41593
- return /* @__PURE__ */ T.jsxs("div", { className: z("relative w-full", m), children: [
41594
- /* @__PURE__ */ T.jsx(E, { children: /* @__PURE__ */ T.jsx(
41595
- Ph,
41596
- {
41597
- as: An.InputBase,
41598
- label: t,
41599
- disabled: k,
41600
- readOnly: !r,
41601
- value: (d || O()) ?? "",
41602
- autoComplete: "off",
41603
- onChange: (P) => {
41604
- const { value: R } = P.target;
41605
- r && (f && f(R), y && y(P));
41606
- },
41607
- invalid: e,
41608
- classes: {
41609
- input: n || !r ? "cursor-pointer" : void 0
41610
- },
41611
- attachmentProps: {
41612
- icon: /* @__PURE__ */ T.jsx(S, { children: /* @__PURE__ */ T.jsx(
41613
- Be,
41614
- {
41615
- name: "arrows/arrowRight",
41616
- className: z("size-6 rotate-90 text-color-blue-grey-600 duration-100", {
41617
- "-rotate-90": I
41618
- })
41619
- }
41620
- ) }),
41621
- ...u
41622
- }
41623
- }
41624
- ) }),
41625
- /* @__PURE__ */ T.jsx(
41626
- Dh,
41627
- {
41628
- as: ji.ul,
41629
- className: z(
41630
- "customScrollbar-y absolute left-0 top-full z-10 mt-1",
41631
- "max-h-[264px] w-full overflow-y-auto bg-color-white",
41632
- "rounded-md p-1 shadow-[0_8px_20px_0px_rgba(41,41,41,0.08)]",
41633
- g
41634
- ),
41635
- initial: { opacity: 0, translateY: 10 },
41636
- animate: { opacity: 1, translateY: 0 },
41637
- exit: { opacity: 0, translateY: 10 },
41638
- children: x.length ? x.map((P, R) => /* @__PURE__ */ T.jsx(
41639
- KY,
41591
+ externalOnInputChange: f,
41592
+ externalHandlers: p
41593
+ }), S = r ? Bt : xf, k = r ? xf : Bt;
41594
+ return /* @__PURE__ */ T.jsx(
41595
+ rw,
41596
+ {
41597
+ ref: m,
41598
+ ...h,
41599
+ onBlur: p == null ? void 0 : p.onBlur,
41600
+ onFocus: p == null ? void 0 : p.onFocus,
41601
+ onClick: p == null ? void 0 : p.onClick,
41602
+ value: s ?? null,
41603
+ onChange: y,
41604
+ multiple: n,
41605
+ children: ({ disabled: I, open: A, value: O }) => {
41606
+ const P = () => n && r ? E(O) : r ? v : E(O);
41607
+ return /* @__PURE__ */ T.jsxs("div", { className: z("relative w-full", g), children: [
41608
+ /* @__PURE__ */ T.jsx(S, { children: /* @__PURE__ */ T.jsx(
41609
+ Ph,
41640
41610
  {
41641
- option: P,
41642
- isMulti: n,
41643
- classes: b,
41644
- displayValue: a,
41645
- motionProps: {
41646
- initial: { opacity: 0 },
41647
- animate: { opacity: 1 },
41648
- transition: { delay: R / 25 }
41611
+ as: An.InputBase,
41612
+ label: t,
41613
+ disabled: I,
41614
+ readOnly: !r,
41615
+ value: (d || P()) ?? "",
41616
+ autoComplete: "off",
41617
+ onChange: (R) => {
41618
+ const { value: V } = R.target;
41619
+ r && (f && f(V), p != null && p.onInputChange && p.onInputChange(V), C && C(R));
41620
+ },
41621
+ invalid: e,
41622
+ classes: {
41623
+ input: n || !r ? "cursor-pointer" : void 0
41624
+ },
41625
+ attachmentProps: {
41626
+ icon: /* @__PURE__ */ T.jsx(k, { children: /* @__PURE__ */ T.jsx(
41627
+ Be,
41628
+ {
41629
+ name: "arrows/arrowRight",
41630
+ className: z("size-6 rotate-90 text-color-blue-grey-600 duration-100", {
41631
+ "-rotate-90": A
41632
+ })
41633
+ }
41634
+ ) }),
41635
+ ...u
41649
41636
  }
41650
- },
41651
- P.value
41652
- )) : /* @__PURE__ */ T.jsx("p", { className: "py-4 text-center align-middle", children: "Ничего не найдено" })
41653
- }
41654
- )
41655
- ] });
41656
- } });
41637
+ }
41638
+ ) }),
41639
+ /* @__PURE__ */ T.jsx(
41640
+ Dh,
41641
+ {
41642
+ as: ji.ul,
41643
+ className: z(
41644
+ "customScrollbar-y absolute left-0 top-full z-10 mt-1",
41645
+ "max-h-[264px] w-full overflow-y-auto bg-color-white",
41646
+ "rounded-md p-1 shadow-[0_8px_20px_0px_rgba(41,41,41,0.08)]",
41647
+ b
41648
+ ),
41649
+ initial: { opacity: 0, translateY: 10 },
41650
+ animate: { opacity: 1, translateY: 0 },
41651
+ exit: { opacity: 0, translateY: 10 },
41652
+ children: w.length ? w.map((R, V) => /* @__PURE__ */ T.jsx(
41653
+ KY,
41654
+ {
41655
+ option: R,
41656
+ isMulti: n,
41657
+ classes: x,
41658
+ displayValue: a,
41659
+ motionProps: {
41660
+ initial: { opacity: 0 },
41661
+ animate: { opacity: 1 },
41662
+ transition: { delay: V / 25 }
41663
+ }
41664
+ },
41665
+ R.value
41666
+ )) : /* @__PURE__ */ T.jsx("p", { className: "py-4 text-center align-middle", children: "Ничего не найдено" })
41667
+ }
41668
+ )
41669
+ ] });
41670
+ }
41671
+ }
41672
+ );
41657
41673
  }
41658
41674
  ), jE = Vt(
41659
41675
  ({ classes: t, className: e, invalid: n, disabled: r, ...i }, o) => /* @__PURE__ */ T.jsx(