@knime/jsonforms 1.15.24 → 1.15.25
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/CHANGELOG.md +10 -0
- package/dist/{AnyOfTwinlist-CMKMWHf1.js → AnyOfTwinlist-Gm_t7kw1.js} +1 -1
- package/dist/{Button-DaREikfo.js → Button-CJoiPpEJ.js} +1 -1
- package/dist/{CheckboxControl-BeVFzf2a.js → CheckboxControl-B7eHkoEe.js} +1 -1
- package/dist/{Checkboxes-CFrhOEzY.js → Checkboxes-Cw1tNIh9.js} +1 -1
- package/dist/{CheckboxesControl-DgJRbuoT.js → CheckboxesControl-DzQKHh3y.js} +3 -3
- package/dist/{ComboBoxControl-52ElpOn1.js → ComboBoxControl-DdkTWpEf.js} +2 -2
- package/dist/{DateControl-CAB01amR.js → DateControl-ntp3YN9f.js} +1 -1
- package/dist/{DateTimeControl-D-vlhUGy.js → DateTimeControl-C7bYSI5f.js} +1 -1
- package/dist/{DateTimeFormatInput-DB1gffFf.js → DateTimeFormatInput-FfdaaNwa.js} +3 -3
- package/dist/{DateTimeFormatPickerControl-DQnESU0B.js → DateTimeFormatPickerControl-BbSQhLWz.js} +2 -2
- package/dist/{DateTimeFormatPickerWithTypeControl-BX3nYI2_.js → DateTimeFormatPickerWithTypeControl-DtT9dqHv.js} +3 -3
- package/dist/{Dropdown-BqLnd_lz.js → Dropdown-L4o5qKtc.js} +2 -2
- package/dist/{DropdownControl-CExdaDa-.js → DropdownControl-BPU4yxgZ.js} +2 -2
- package/dist/{HorizontalLayout-C4k1b0gz.js → HorizontalLayout-Z_fgB8LB.js} +1 -1
- package/dist/{InputField-BTV9epwF.js → InputField-BBu8FQ7H.js} +1 -1
- package/dist/{IntegerControl-Cm-5VeQ8.js → IntegerControl-DSO5Rzci.js} +1 -1
- package/dist/{IntervalControl-LwPbNNfm.js → IntervalControl-Ctc_eqBO.js} +3 -3
- package/dist/{LoadingDropdown-genpEgt-.js → LoadingDropdown-CjpCcjTE.js} +3 -3
- package/dist/{LoadingIcon-kJJQIU2j.js → LoadingIcon-DYuH95pL.js} +1 -1
- package/dist/{ManualTwinlistControl-CfiF_8qi.js → ManualTwinlistControl-C-EWbAE_.js} +4 -4
- package/dist/{MultiSelectListBoxControl-oJK11Dx0.js → MultiSelectListBoxControl-agVYhCWD.js} +2 -2
- package/dist/{MultimodeTwinlistControl-0x4vb3cy.js → MultimodeTwinlistControl-CllQDNwC.js} +6 -6
- package/dist/{MultimodeTwinlistControl.vue_vue_type_style_index_0_scoped_a6fd4504_lang-BFtM6wf1.js → MultimodeTwinlistControl.vue_vue_type_style_index_0_scoped_a6fd4504_lang-99E_mWDC.js} +1 -1
- package/dist/{MultiselectListBox-BGl78vJT.js → MultiselectListBox-CXtDxyfO.js} +2 -2
- package/dist/{NameFilter-C_vzP7VV.js → NameFilter-luEN14Ff.js} +1 -1
- package/dist/{NumberControl-fGuGcxwv.js → NumberControl-cHsGdtqi.js} +1 -1
- package/dist/{NumberControlBase.vue_vue_type_script_setup_true_lang-Diyd7dQu.js → NumberControlBase.vue_vue_type_script_setup_true_lang-CRz7C0dF.js} +2 -2
- package/dist/{NumberInput-mZSEjX_O.js → NumberInput-Cv5sC8f0.js} +1 -1
- package/dist/{OneOfDropdown-BrBn2u00.js → OneOfDropdown-Fvmnbb2-.js} +1 -1
- package/dist/{RadioControl-DcnBIOWf.js → RadioControl-QSnj8Td3.js} +2 -2
- package/dist/{RadioControlBase.vue_vue_type_script_setup_true_lang-if4tNv6s.js → RadioControlBase.vue_vue_type_script_setup_true_lang-CGVGZyLo.js} +3 -3
- package/dist/{RichTextControl-dmZ7cuIT.js → RichTextControl-Bdu-4f0B.js} +740 -740
- package/dist/{SectionHeading-DaHsgslT.js → SectionHeading-CNrzJlsn.js} +1 -1
- package/dist/{SectionHeading.vue_vue_type_style_index_0_scoped_c541eb08_lang-D6vbe1qN.js → SectionHeading.vue_vue_type_style_index_0_scoped_c541eb08_lang-hztE66l7.js} +34 -34
- package/dist/{SectionLayout-NCpT7l3W.js → SectionLayout-Cz_-_Hcu.js} +3 -3
- package/dist/{SettingsSubPanel-bEqM0qaz.js → SettingsSubPanel-BuEfGSxe.js} +1 -1
- package/dist/{SettingsSubPanelLayout-BHPn0LW1.js → SettingsSubPanelLayout-D6GE7T6v.js} +4 -4
- package/dist/{SimpleButtonControl-CAo6Kdgf.js → SimpleButtonControl-wvEBlqUA.js} +2 -2
- package/dist/{SimpleTwinlistControl-CUyvDq9C.js → SimpleTwinlistControl-Ca5kDRI7.js} +2 -2
- package/dist/{SingleSelectControl-CO0hoQww.js → SingleSelectControl-B4CwfJ0V.js} +2 -2
- package/dist/{SingleSelectListBoxControl-DCaj_Tsq.js → SingleSelectListBoxControl-DBoicTUo.js} +3 -3
- package/dist/{SortListControl-BhqD3OMD.js → SortListControl-Dkg_kXLU.js} +6 -6
- package/dist/{StyledListItem-C0DMCQZ9.js → StyledListItem-CIiJanM7.js} +1 -1
- package/dist/{TextAreaControl-jwF6cbac.js → TextAreaControl-VO0cIlSB.js} +1 -1
- package/dist/{TextControl-C_qSgM2k.js → TextControl-GcKpiBaJ.js} +1 -1
- package/dist/{TextControl.vue_vue_type_script_setup_true_lang-C7C4wWm-.js → TextControl.vue_vue_type_script_setup_true_lang-DhTX1QxP.js} +3 -3
- package/dist/{TimeControl-C5yzuiZt.js → TimeControl-BQAax2py.js} +1 -1
- package/dist/{TwinlistControlBase-SqSM0dKn.js → TwinlistControlBase-BFVLZXbg.js} +3 -3
- package/dist/{TwinlistLoadingInfo-DEwYllQf.js → TwinlistLoadingInfo-Cl4wyTlU.js} +4 -4
- package/dist/{TypedStringFilter-qnyY_L0n.js → TypedStringFilter-EXsLxZ73.js} +1 -1
- package/dist/{ValueSwitch-cn00VyIu.js → ValueSwitch-D4Y3ZR-9.js} +1 -1
- package/dist/{ValueSwitchControl-1obKoWJo.js → ValueSwitchControl-qAh_pL2g.js} +1 -1
- package/dist/{VerticalLayout-B0FGwUVS.js → VerticalLayout-Ck6lR2q4.js} +2 -2
- package/dist/{VerticalLayoutBase-C9NeWJc3.js → VerticalLayoutBase-CZGbJrDI.js} +1 -1
- package/dist/{ZonedDateTimeControl-B1hZsqBj.js → ZonedDateTimeControl-DmvOVhwM.js} +3 -3
- package/dist/{_baseEach-MBjOYsne.js → _baseEach-CXYxAuw2.js} +2 -2
- package/dist/{_baseIteratee-Bjnw7b2_.js → _baseIteratee-KLFAE68I.js} +3 -3
- package/dist/{_getTag-Dz9sokuB.js → _getTag-BlzPF568.js} +1 -1
- package/dist/knime-jsonforms.js +7 -7
- package/dist/{localTimeUtils-hSkp77fS.js → localTimeUtils-DRvNBb_L.js} +6 -6
- package/dist/testing.js +2 -2
- package/dist/{toString-B9eKnlAr.js → toString-XROnhd6Z.js} +1 -1
- package/dist/{useBuiltinValidations-DHDd8bzx.js → useBuiltinValidations-flBVLDx7.js} +1 -1
- package/dist/{usePossibleValues-DZ0BX_DO.js → usePossibleValues-BsFUyv87.js} +1 -1
- package/package.json +5 -5
|
@@ -3,14 +3,14 @@ import { c as Id, a as Dd } from "./popper-LGjf7Wza.js";
|
|
|
3
3
|
import { g as $a } from "./hotkeys-rxnt4egK.js";
|
|
4
4
|
import { i as Ha } from "./navigator-e30QQMkl.js";
|
|
5
5
|
import { C as Rd } from "./close-DGt8x-x_.js";
|
|
6
|
-
import { _ as _e, v as Ys, C as Ld, y as Zo } from "./SectionHeading.vue_vue_type_style_index_0_scoped_c541eb08_lang-
|
|
6
|
+
import { _ as _e, v as Ys, C as Ld, y as Zo } from "./SectionHeading.vue_vue_type_style_index_0_scoped_c541eb08_lang-hztE66l7.js";
|
|
7
7
|
import { F as Pd, u as Bd } from "./useDropdownNavigation-BfCXUheD.js";
|
|
8
|
-
import { B as zi } from "./Button-
|
|
9
|
-
import { I as el } from "./InputField-
|
|
8
|
+
import { B as zi } from "./Button-CJoiPpEJ.js";
|
|
9
|
+
import { I as el } from "./InputField-BBu8FQ7H.js";
|
|
10
10
|
import { u as Va, a as ja, f as _a, s as Wa } from "./floating-ui.vue-CDo9Kas1.js";
|
|
11
11
|
import { o as Fd } from "./index-CpKfM262.js";
|
|
12
12
|
import { N as zd } from "./arrow-next-BQVCxGb8.js";
|
|
13
|
-
import { t as $d } from "./toString-
|
|
13
|
+
import { t as $d } from "./toString-XROnhd6Z.js";
|
|
14
14
|
const Hd = (n, e) => (n % e + e) % e, Vd = pe({
|
|
15
15
|
name: "BaseModal",
|
|
16
16
|
components: {
|
|
@@ -793,9 +793,23 @@ function kf(n, e, t, r, i, s) {
|
|
|
793
793
|
], 42, bf);
|
|
794
794
|
}
|
|
795
795
|
const vf = /* @__PURE__ */ _e(yf, [["render", kf], ["__scopeId", "data-v-6ab15d08"]]), xf = {
|
|
796
|
+
xmlns: "http://www.w3.org/2000/svg",
|
|
797
|
+
fill: "none",
|
|
798
|
+
stroke: "#000",
|
|
799
|
+
"stroke-linecap": "round",
|
|
800
|
+
viewBox: "0 0 32 32"
|
|
801
|
+
};
|
|
802
|
+
function wf(n, e) {
|
|
803
|
+
return N(), V("svg", xf, e[0] || (e[0] = [
|
|
804
|
+
L("line", { transform: "matrix(3 0 0 3 16 8)" }, null, -1),
|
|
805
|
+
L("line", { transform: "matrix(3 0 0 3 16 16)" }, null, -1),
|
|
806
|
+
L("line", { transform: "matrix(3 0 0 3 16 24)" }, null, -1)
|
|
807
|
+
]));
|
|
808
|
+
}
|
|
809
|
+
const Sf = { render: wf }, Cf = {
|
|
796
810
|
key: 0,
|
|
797
811
|
class: "item-error"
|
|
798
|
-
},
|
|
812
|
+
}, Mf = { class: "controls-apply-group" }, Tf = /* @__PURE__ */ pe({
|
|
799
813
|
__name: "CreateLinkModal",
|
|
800
814
|
props: {
|
|
801
815
|
text: {},
|
|
@@ -872,7 +886,7 @@ const vf = /* @__PURE__ */ _e(yf, [["render", kf], ["__scopeId", "data-v-6ab15d0
|
|
|
872
886
|
title: "URL",
|
|
873
887
|
onKeyup: d
|
|
874
888
|
}, null, 8, ["id", "modelValue"]),
|
|
875
|
-
c() ? re("", !0) : (N(), V("div",
|
|
889
|
+
c() ? re("", !0) : (N(), V("div", Cf, h[3] || (h[3] = [
|
|
876
890
|
L("span", null, "Invalid URL", -1)
|
|
877
891
|
])))
|
|
878
892
|
])
|
|
@@ -892,7 +906,7 @@ const vf = /* @__PURE__ */ _e(yf, [["render", kf], ["__scopeId", "data-v-6ab15d0
|
|
|
892
906
|
_: 1,
|
|
893
907
|
__: [4]
|
|
894
908
|
}),
|
|
895
|
-
L("div",
|
|
909
|
+
L("div", Mf, [
|
|
896
910
|
f.isEdit.value ? (N(), ie(H(zi), {
|
|
897
911
|
key: 0,
|
|
898
912
|
compact: "",
|
|
@@ -923,7 +937,7 @@ const vf = /* @__PURE__ */ _e(yf, [["render", kf], ["__scopeId", "data-v-6ab15d0
|
|
|
923
937
|
[Fa, f.isActive.value]
|
|
924
938
|
]);
|
|
925
939
|
}
|
|
926
|
-
}), Ua = /* @__PURE__ */ _e(
|
|
940
|
+
}), Ua = /* @__PURE__ */ _e(Tf, [["__scopeId", "data-v-5cf1f560"]]);
|
|
927
941
|
function de(n) {
|
|
928
942
|
this.content = n;
|
|
929
943
|
}
|
|
@@ -1561,7 +1575,7 @@ function Ya(n, e, t, r) {
|
|
|
1561
1575
|
let l = Ya(o.content, e - s - 1, t);
|
|
1562
1576
|
return l && n.replaceChild(i, o.copy(l));
|
|
1563
1577
|
}
|
|
1564
|
-
function
|
|
1578
|
+
function Ef(n, e, t) {
|
|
1565
1579
|
if (t.openStart > n.depth)
|
|
1566
1580
|
throw new Nr("Inserted content deeper than insertion position");
|
|
1567
1581
|
if (n.depth - t.openStart != e.depth - t.openEnd)
|
|
@@ -1578,7 +1592,7 @@ function Xa(n, e, t, r) {
|
|
|
1578
1592
|
let o = n.parent, l = o.content;
|
|
1579
1593
|
return Vt(o, l.cut(0, n.parentOffset).append(t.content).append(l.cut(e.parentOffset)));
|
|
1580
1594
|
} else {
|
|
1581
|
-
let { start: o, end: l } =
|
|
1595
|
+
let { start: o, end: l } = Of(t, n);
|
|
1582
1596
|
return Vt(s, Za(n, o, l, e, r));
|
|
1583
1597
|
}
|
|
1584
1598
|
else return Vt(s, Ir(n, e, r));
|
|
@@ -1617,7 +1631,7 @@ function Ir(n, e, t) {
|
|
|
1617
1631
|
}
|
|
1618
1632
|
return On(e, null, t, r), new x(r);
|
|
1619
1633
|
}
|
|
1620
|
-
function
|
|
1634
|
+
function Of(n, e) {
|
|
1621
1635
|
let t = e.depth - n.openStart, i = e.node(t).copy(n.content);
|
|
1622
1636
|
for (let s = t - 1; s >= 0; s--)
|
|
1623
1637
|
i = e.node(s).copy(x.from(i));
|
|
@@ -1868,17 +1882,17 @@ class Hn {
|
|
|
1868
1882
|
return o;
|
|
1869
1883
|
}
|
|
1870
1884
|
else
|
|
1871
|
-
nl.set(e, r = new
|
|
1885
|
+
nl.set(e, r = new Af());
|
|
1872
1886
|
let i = r.elts[r.i] = Hn.resolve(e, t);
|
|
1873
|
-
return r.i = (r.i + 1) %
|
|
1887
|
+
return r.i = (r.i + 1) % Nf, i;
|
|
1874
1888
|
}
|
|
1875
1889
|
}
|
|
1876
|
-
class
|
|
1890
|
+
class Af {
|
|
1877
1891
|
constructor() {
|
|
1878
1892
|
this.elts = [], this.i = 0;
|
|
1879
1893
|
}
|
|
1880
1894
|
}
|
|
1881
|
-
const
|
|
1895
|
+
const Nf = 12, nl = /* @__PURE__ */ new WeakMap();
|
|
1882
1896
|
class Dr {
|
|
1883
1897
|
/**
|
|
1884
1898
|
Construct a node range. `$from` and `$to` should point into the
|
|
@@ -1919,7 +1933,7 @@ class Dr {
|
|
|
1919
1933
|
return this.$to.indexAfter(this.depth);
|
|
1920
1934
|
}
|
|
1921
1935
|
}
|
|
1922
|
-
const
|
|
1936
|
+
const If = /* @__PURE__ */ Object.create(null);
|
|
1923
1937
|
let wt = class xs {
|
|
1924
1938
|
/**
|
|
1925
1939
|
@internal
|
|
@@ -2038,7 +2052,7 @@ let wt = class xs {
|
|
|
2038
2052
|
attributes, and marks.
|
|
2039
2053
|
*/
|
|
2040
2054
|
hasMarkup(e, t, r) {
|
|
2041
|
-
return this.type == e && Ar(this.attrs, t || e.defaultAttrs ||
|
|
2055
|
+
return this.type == e && Ar(this.attrs, t || e.defaultAttrs || If) && K.sameSet(this.marks, r || K.none);
|
|
2042
2056
|
}
|
|
2043
2057
|
/**
|
|
2044
2058
|
Create a new node with the same markup as this node, containing
|
|
@@ -2081,7 +2095,7 @@ let wt = class xs {
|
|
|
2081
2095
|
[`ReplaceError`](https://prosemirror.net/docs/ref/#model.ReplaceError) is thrown.
|
|
2082
2096
|
*/
|
|
2083
2097
|
replace(e, t, r) {
|
|
2084
|
-
return
|
|
2098
|
+
return Ef(this.resolve(e), this.resolve(t), r);
|
|
2085
2099
|
}
|
|
2086
2100
|
/**
|
|
2087
2101
|
Find the node directly after the given position.
|
|
@@ -2344,13 +2358,13 @@ class qt {
|
|
|
2344
2358
|
@internal
|
|
2345
2359
|
*/
|
|
2346
2360
|
static parse(e, t) {
|
|
2347
|
-
let r = new
|
|
2361
|
+
let r = new Df(e, t);
|
|
2348
2362
|
if (r.next == null)
|
|
2349
2363
|
return qt.empty;
|
|
2350
2364
|
let i = tc(r);
|
|
2351
2365
|
r.next && r.err("Unexpected trailing text");
|
|
2352
|
-
let s =
|
|
2353
|
-
return
|
|
2366
|
+
let s = $f(zf(i));
|
|
2367
|
+
return Hf(s, r), s;
|
|
2354
2368
|
}
|
|
2355
2369
|
/**
|
|
2356
2370
|
Match a node type, returning a match after that node if
|
|
@@ -2496,7 +2510,7 @@ class qt {
|
|
|
2496
2510
|
}
|
|
2497
2511
|
}
|
|
2498
2512
|
qt.empty = new qt(!0);
|
|
2499
|
-
class
|
|
2513
|
+
class Df {
|
|
2500
2514
|
constructor(e, t) {
|
|
2501
2515
|
this.string = e, this.nodeTypes = t, this.inline = null, this.pos = 0, this.tokens = e.split(/\s*(?=\b|\W|$)/), this.tokens[this.tokens.length - 1] == "" && this.tokens.pop(), this.tokens[0] == "" && this.tokens.shift();
|
|
2502
2516
|
}
|
|
@@ -2513,19 +2527,19 @@ class Af {
|
|
|
2513
2527
|
function tc(n) {
|
|
2514
2528
|
let e = [];
|
|
2515
2529
|
do
|
|
2516
|
-
e.push(
|
|
2530
|
+
e.push(Rf(n));
|
|
2517
2531
|
while (n.eat("|"));
|
|
2518
2532
|
return e.length == 1 ? e[0] : { type: "choice", exprs: e };
|
|
2519
2533
|
}
|
|
2520
|
-
function
|
|
2534
|
+
function Rf(n) {
|
|
2521
2535
|
let e = [];
|
|
2522
2536
|
do
|
|
2523
|
-
e.push(
|
|
2537
|
+
e.push(Lf(n));
|
|
2524
2538
|
while (n.next && n.next != ")" && n.next != "|");
|
|
2525
2539
|
return e.length == 1 ? e[0] : { type: "seq", exprs: e };
|
|
2526
2540
|
}
|
|
2527
|
-
function
|
|
2528
|
-
let e =
|
|
2541
|
+
function Lf(n) {
|
|
2542
|
+
let e = Ff(n);
|
|
2529
2543
|
for (; ; )
|
|
2530
2544
|
if (n.eat("+"))
|
|
2531
2545
|
e = { type: "plus", expr: e };
|
|
@@ -2534,7 +2548,7 @@ function If(n) {
|
|
|
2534
2548
|
else if (n.eat("?"))
|
|
2535
2549
|
e = { type: "opt", expr: e };
|
|
2536
2550
|
else if (n.eat("{"))
|
|
2537
|
-
e =
|
|
2551
|
+
e = Pf(n, e);
|
|
2538
2552
|
else
|
|
2539
2553
|
break;
|
|
2540
2554
|
return e;
|
|
@@ -2544,11 +2558,11 @@ function rl(n) {
|
|
|
2544
2558
|
let e = Number(n.next);
|
|
2545
2559
|
return n.pos++, e;
|
|
2546
2560
|
}
|
|
2547
|
-
function
|
|
2561
|
+
function Pf(n, e) {
|
|
2548
2562
|
let t = rl(n), r = t;
|
|
2549
2563
|
return n.eat(",") && (n.next != "}" ? r = rl(n) : r = -1), n.eat("}") || n.err("Unclosed braced range"), { type: "range", min: t, max: r, expr: e };
|
|
2550
2564
|
}
|
|
2551
|
-
function
|
|
2565
|
+
function Bf(n, e) {
|
|
2552
2566
|
let t = n.nodeTypes, r = t[e];
|
|
2553
2567
|
if (r)
|
|
2554
2568
|
return [r];
|
|
@@ -2559,18 +2573,18 @@ function Rf(n, e) {
|
|
|
2559
2573
|
}
|
|
2560
2574
|
return i.length == 0 && n.err("No node type or group '" + e + "' found"), i;
|
|
2561
2575
|
}
|
|
2562
|
-
function
|
|
2576
|
+
function Ff(n) {
|
|
2563
2577
|
if (n.eat("(")) {
|
|
2564
2578
|
let e = tc(n);
|
|
2565
2579
|
return n.eat(")") || n.err("Missing closing paren"), e;
|
|
2566
2580
|
} else if (/\W/.test(n.next))
|
|
2567
2581
|
n.err("Unexpected token '" + n.next + "'");
|
|
2568
2582
|
else {
|
|
2569
|
-
let e =
|
|
2583
|
+
let e = Bf(n, n.next).map((t) => (n.inline == null ? n.inline = t.isInline : n.inline != t.isInline && n.err("Mixing inline and block content"), { type: "name", value: t }));
|
|
2570
2584
|
return n.pos++, e.length == 1 ? e[0] : { type: "choice", exprs: e };
|
|
2571
2585
|
}
|
|
2572
2586
|
}
|
|
2573
|
-
function
|
|
2587
|
+
function zf(n) {
|
|
2574
2588
|
let e = [[]];
|
|
2575
2589
|
return i(s(n, 0), t()), e;
|
|
2576
2590
|
function t() {
|
|
@@ -2641,7 +2655,7 @@ function il(n, e) {
|
|
|
2641
2655
|
}
|
|
2642
2656
|
}
|
|
2643
2657
|
}
|
|
2644
|
-
function
|
|
2658
|
+
function $f(n) {
|
|
2645
2659
|
let e = /* @__PURE__ */ Object.create(null);
|
|
2646
2660
|
return t(il(n, 0));
|
|
2647
2661
|
function t(r) {
|
|
@@ -2666,7 +2680,7 @@ function Bf(n) {
|
|
|
2666
2680
|
return s;
|
|
2667
2681
|
}
|
|
2668
2682
|
}
|
|
2669
|
-
function
|
|
2683
|
+
function Hf(n, e) {
|
|
2670
2684
|
for (let t = 0, r = [n]; t < r.length; t++) {
|
|
2671
2685
|
let i = r[t], s = !i.validEnd, o = [];
|
|
2672
2686
|
for (let l = 0; l < i.next.length; l++) {
|
|
@@ -2714,7 +2728,7 @@ function oc(n, e) {
|
|
|
2714
2728
|
let t = /* @__PURE__ */ Object.create(null);
|
|
2715
2729
|
if (e)
|
|
2716
2730
|
for (let r in e)
|
|
2717
|
-
t[r] = new
|
|
2731
|
+
t[r] = new jf(n, r, e[r]);
|
|
2718
2732
|
return t;
|
|
2719
2733
|
}
|
|
2720
2734
|
let sl = class lc {
|
|
@@ -2896,7 +2910,7 @@ let sl = class lc {
|
|
|
2896
2910
|
return r;
|
|
2897
2911
|
}
|
|
2898
2912
|
};
|
|
2899
|
-
function
|
|
2913
|
+
function Vf(n, e, t) {
|
|
2900
2914
|
let r = t.split("|");
|
|
2901
2915
|
return (i) => {
|
|
2902
2916
|
let s = i === null ? "null" : typeof i;
|
|
@@ -2904,9 +2918,9 @@ function zf(n, e, t) {
|
|
|
2904
2918
|
throw new RangeError(`Expected value of type ${r} for attribute ${e} on type ${n}, got ${s}`);
|
|
2905
2919
|
};
|
|
2906
2920
|
}
|
|
2907
|
-
class
|
|
2921
|
+
class jf {
|
|
2908
2922
|
constructor(e, t, r) {
|
|
2909
|
-
this.hasDefault = Object.prototype.hasOwnProperty.call(r, "default"), this.default = r.default, this.validate = typeof r.validate == "string" ?
|
|
2923
|
+
this.hasDefault = Object.prototype.hasOwnProperty.call(r, "default"), this.default = r.default, this.validate = typeof r.validate == "string" ? Vf(e, t, r.validate) : r.validate;
|
|
2910
2924
|
}
|
|
2911
2925
|
get isRequired() {
|
|
2912
2926
|
return !this.hasDefault;
|
|
@@ -3052,10 +3066,10 @@ function ol(n, e) {
|
|
|
3052
3066
|
}
|
|
3053
3067
|
return t;
|
|
3054
3068
|
}
|
|
3055
|
-
function
|
|
3069
|
+
function _f(n) {
|
|
3056
3070
|
return n.tag != null;
|
|
3057
3071
|
}
|
|
3058
|
-
function
|
|
3072
|
+
function Wf(n) {
|
|
3059
3073
|
return n.style != null;
|
|
3060
3074
|
}
|
|
3061
3075
|
class St {
|
|
@@ -3067,9 +3081,9 @@ class St {
|
|
|
3067
3081
|
this.schema = e, this.rules = t, this.tags = [], this.styles = [];
|
|
3068
3082
|
let r = this.matchedStyles = [];
|
|
3069
3083
|
t.forEach((i) => {
|
|
3070
|
-
if (
|
|
3084
|
+
if (_f(i))
|
|
3071
3085
|
this.tags.push(i);
|
|
3072
|
-
else if (
|
|
3086
|
+
else if (Wf(i)) {
|
|
3073
3087
|
let s = /[^=]*/.exec(i.style)[0];
|
|
3074
3088
|
r.indexOf(s) < 0 && r.push(s), this.styles.push(i);
|
|
3075
3089
|
}
|
|
@@ -3105,7 +3119,7 @@ class St {
|
|
|
3105
3119
|
matchTag(e, t, r) {
|
|
3106
3120
|
for (let i = r ? this.tags.indexOf(r) + 1 : 0; i < this.tags.length; i++) {
|
|
3107
3121
|
let s = this.tags[i];
|
|
3108
|
-
if (
|
|
3122
|
+
if (qf(e, s.tag) && (s.namespace === void 0 || e.namespaceURI == s.namespace) && (!s.context || t.matchesContext(s.context))) {
|
|
3109
3123
|
if (s.getAttrs) {
|
|
3110
3124
|
let o = s.getAttrs(e);
|
|
3111
3125
|
if (o === !1)
|
|
@@ -3206,7 +3220,7 @@ const cc = {
|
|
|
3206
3220
|
table: !0,
|
|
3207
3221
|
tfoot: !0,
|
|
3208
3222
|
ul: !0
|
|
3209
|
-
},
|
|
3223
|
+
}, Kf = {
|
|
3210
3224
|
head: !0,
|
|
3211
3225
|
noscript: !0,
|
|
3212
3226
|
object: !0,
|
|
@@ -3285,9 +3299,9 @@ class al {
|
|
|
3285
3299
|
let i = this.localPreserveWS, s = this.top;
|
|
3286
3300
|
(e.tagName == "PRE" || /pre/.test(e.style && e.style.whiteSpace)) && (this.localPreserveWS = !0);
|
|
3287
3301
|
let o = e.nodeName.toLowerCase(), l;
|
|
3288
|
-
uc.hasOwnProperty(o) && this.parser.normalizeLists &&
|
|
3302
|
+
uc.hasOwnProperty(o) && this.parser.normalizeLists && Uf(e);
|
|
3289
3303
|
let a = this.options.ruleFromNode && this.options.ruleFromNode(e) || (l = this.parser.matchTag(e, this, r));
|
|
3290
|
-
e: if (a ? a.ignore :
|
|
3304
|
+
e: if (a ? a.ignore : Kf.hasOwnProperty(o))
|
|
3291
3305
|
this.findInside(e), this.ignoreFallback(e, t);
|
|
3292
3306
|
else if (!a || a.skip || a.closeParent) {
|
|
3293
3307
|
a && a.closeParent ? this.open = Math.max(0, this.open - 1) : a && a.skip.nodeType && (e = a.skip);
|
|
@@ -3524,13 +3538,13 @@ class al {
|
|
|
3524
3538
|
}
|
|
3525
3539
|
}
|
|
3526
3540
|
}
|
|
3527
|
-
function
|
|
3541
|
+
function Uf(n) {
|
|
3528
3542
|
for (let e = n.firstChild, t = null; e; e = e.nextSibling) {
|
|
3529
3543
|
let r = e.nodeType == 1 ? e.nodeName.toLowerCase() : null;
|
|
3530
3544
|
r && uc.hasOwnProperty(r) && t ? (t.appendChild(e), e = t) : r == "li" ? t = e : r && (t = null);
|
|
3531
3545
|
}
|
|
3532
3546
|
}
|
|
3533
|
-
function
|
|
3547
|
+
function qf(n, e) {
|
|
3534
3548
|
return (n.matches || n.msMatchesSelector || n.webkitMatchesSelector || n.mozMatchesSelector).call(n, e);
|
|
3535
3549
|
}
|
|
3536
3550
|
function cl(n) {
|
|
@@ -3673,11 +3687,11 @@ function Hi(n) {
|
|
|
3673
3687
|
return n.document || window.document;
|
|
3674
3688
|
}
|
|
3675
3689
|
const fl = /* @__PURE__ */ new WeakMap();
|
|
3676
|
-
function
|
|
3690
|
+
function Jf(n) {
|
|
3677
3691
|
let e = fl.get(n);
|
|
3678
|
-
return e === void 0 && fl.set(n, e =
|
|
3692
|
+
return e === void 0 && fl.set(n, e = Gf(n)), e;
|
|
3679
3693
|
}
|
|
3680
|
-
function
|
|
3694
|
+
function Gf(n) {
|
|
3681
3695
|
let e = null;
|
|
3682
3696
|
function t(r) {
|
|
3683
3697
|
if (r && typeof r == "object")
|
|
@@ -3703,7 +3717,7 @@ function Sr(n, e, t, r) {
|
|
|
3703
3717
|
let i = e[0], s;
|
|
3704
3718
|
if (typeof i != "string")
|
|
3705
3719
|
throw new RangeError("Invalid array passed to renderSpec");
|
|
3706
|
-
if (r && (s =
|
|
3720
|
+
if (r && (s = Jf(r)) && s.indexOf(e) > -1)
|
|
3707
3721
|
throw new RangeError("Using an array from an attribute object as a DOM spec. This may be an attempted cross site scripting attack.");
|
|
3708
3722
|
let o = i.indexOf(" ");
|
|
3709
3723
|
o > 0 && (t = i.slice(0, o), i = i.slice(o + 1));
|
|
@@ -3734,13 +3748,13 @@ function Sr(n, e, t, r) {
|
|
|
3734
3748
|
return { dom: a, contentDOM: l };
|
|
3735
3749
|
}
|
|
3736
3750
|
const dc = 65535, fc = Math.pow(2, 16);
|
|
3737
|
-
function
|
|
3751
|
+
function Yf(n, e) {
|
|
3738
3752
|
return n + e * fc;
|
|
3739
3753
|
}
|
|
3740
3754
|
function hl(n) {
|
|
3741
3755
|
return n & dc;
|
|
3742
3756
|
}
|
|
3743
|
-
function
|
|
3757
|
+
function Xf(n) {
|
|
3744
3758
|
return (n - (n & dc)) / fc;
|
|
3745
3759
|
}
|
|
3746
3760
|
const hc = 1, pc = 2, Cr = 4, mc = 8;
|
|
@@ -3798,7 +3812,7 @@ class Oe {
|
|
|
3798
3812
|
if (!this.inverted)
|
|
3799
3813
|
for (let i = 0; i < r; i++)
|
|
3800
3814
|
t += this.ranges[i * 3 + 2] - this.ranges[i * 3 + 1];
|
|
3801
|
-
return this.ranges[r * 3] + t +
|
|
3815
|
+
return this.ranges[r * 3] + t + Xf(e);
|
|
3802
3816
|
}
|
|
3803
3817
|
mapResult(e, t = 1) {
|
|
3804
3818
|
return this._map(e, t, !1);
|
|
@@ -3820,7 +3834,7 @@ class Oe {
|
|
|
3820
3834
|
let f = c ? e == a ? -1 : e == d ? 1 : t : t, h = a + i + (f < 0 ? 0 : u);
|
|
3821
3835
|
if (r)
|
|
3822
3836
|
return h;
|
|
3823
|
-
let p = e == (t < 0 ? a : d) ? null :
|
|
3837
|
+
let p = e == (t < 0 ? a : d) ? null : Yf(l / 3, e - a), m = e == a ? pc : e == d ? hc : Cr;
|
|
3824
3838
|
return (t < 0 ? e != a : e != d) && (m |= mc), new Ss(h, m, p);
|
|
3825
3839
|
}
|
|
3826
3840
|
i += u - c;
|
|
@@ -4349,7 +4363,7 @@ function Cs(n, e, t) {
|
|
|
4349
4363
|
}
|
|
4350
4364
|
return !1;
|
|
4351
4365
|
}
|
|
4352
|
-
function
|
|
4366
|
+
function Qf(n, e, t, r) {
|
|
4353
4367
|
let i = [], s = [], o, l;
|
|
4354
4368
|
n.doc.nodesBetween(e, t, (a, c, u) => {
|
|
4355
4369
|
if (!a.isInline)
|
|
@@ -4363,7 +4377,7 @@ function Gf(n, e, t, r) {
|
|
|
4363
4377
|
}
|
|
4364
4378
|
}), i.forEach((a) => n.step(a)), s.forEach((a) => n.step(a));
|
|
4365
4379
|
}
|
|
4366
|
-
function
|
|
4380
|
+
function Zf(n, e, t, r) {
|
|
4367
4381
|
let i = [], s = 0;
|
|
4368
4382
|
n.doc.nodesBetween(e, t, (o, l) => {
|
|
4369
4383
|
if (!o.isInline)
|
|
@@ -4413,7 +4427,7 @@ function Qs(n, e, t, r = t.contentMatch, i = !0) {
|
|
|
4413
4427
|
for (let a = o.length - 1; a >= 0; a--)
|
|
4414
4428
|
n.step(o[a]);
|
|
4415
4429
|
}
|
|
4416
|
-
function
|
|
4430
|
+
function eh(n, e, t) {
|
|
4417
4431
|
return (e == 0 || n.canReplace(e, n.childCount)) && (t == n.childCount || n.canReplace(0, t));
|
|
4418
4432
|
}
|
|
4419
4433
|
function kn(n) {
|
|
@@ -4422,12 +4436,12 @@ function kn(n) {
|
|
|
4422
4436
|
let i = n.$from.node(r), s = n.$from.index(r), o = n.$to.indexAfter(r);
|
|
4423
4437
|
if (r < n.depth && i.canReplace(s, o, t))
|
|
4424
4438
|
return r;
|
|
4425
|
-
if (r == 0 || i.type.spec.isolating || !
|
|
4439
|
+
if (r == 0 || i.type.spec.isolating || !eh(i, s, o))
|
|
4426
4440
|
break;
|
|
4427
4441
|
}
|
|
4428
4442
|
return null;
|
|
4429
4443
|
}
|
|
4430
|
-
function
|
|
4444
|
+
function th(n, e, t) {
|
|
4431
4445
|
let { $from: r, $to: i, depth: s } = e, o = r.before(s + 1), l = i.after(s + 1), a = o, c = l, u = x.empty, d = 0;
|
|
4432
4446
|
for (let p = s, m = !1; p > t; p--)
|
|
4433
4447
|
m || r.index(p) > 0 ? (m = !0, u = x.from(r.node(p).copy(u)), d++) : a--;
|
|
@@ -4437,20 +4451,20 @@ function Qf(n, e, t) {
|
|
|
4437
4451
|
n.step(new le(a, c, o, l, new E(u.append(f), d, h), u.size - d, !0));
|
|
4438
4452
|
}
|
|
4439
4453
|
function Zs(n, e, t = null, r = n) {
|
|
4440
|
-
let i =
|
|
4454
|
+
let i = nh(n, e), s = i && rh(r, e);
|
|
4441
4455
|
return s ? i.map(pl).concat({ type: e, attrs: t }).concat(s.map(pl)) : null;
|
|
4442
4456
|
}
|
|
4443
4457
|
function pl(n) {
|
|
4444
4458
|
return { type: n, attrs: null };
|
|
4445
4459
|
}
|
|
4446
|
-
function
|
|
4460
|
+
function nh(n, e) {
|
|
4447
4461
|
let { parent: t, startIndex: r, endIndex: i } = n, s = t.contentMatchAt(r).findWrapping(e);
|
|
4448
4462
|
if (!s)
|
|
4449
4463
|
return null;
|
|
4450
4464
|
let o = s.length ? s[0] : e;
|
|
4451
4465
|
return t.canReplaceWith(r, i, o) ? s : null;
|
|
4452
4466
|
}
|
|
4453
|
-
function
|
|
4467
|
+
function rh(n, e) {
|
|
4454
4468
|
let { parent: t, startIndex: r, endIndex: i } = n, s = t.child(r), o = e.contentMatch.findWrapping(s.type);
|
|
4455
4469
|
if (!o)
|
|
4456
4470
|
return null;
|
|
@@ -4459,7 +4473,7 @@ function eh(n, e) {
|
|
|
4459
4473
|
a = a.matchType(t.child(c).type);
|
|
4460
4474
|
return !a || !a.validEnd ? null : o;
|
|
4461
4475
|
}
|
|
4462
|
-
function
|
|
4476
|
+
function ih(n, e, t) {
|
|
4463
4477
|
let r = x.empty;
|
|
4464
4478
|
for (let o = t.length - 1; o >= 0; o--) {
|
|
4465
4479
|
if (r.size) {
|
|
@@ -4472,13 +4486,13 @@ function th(n, e, t) {
|
|
|
4472
4486
|
let i = e.start, s = e.end;
|
|
4473
4487
|
n.step(new le(i, s, i, s, new E(r, 0, 0), t.length, !0));
|
|
4474
4488
|
}
|
|
4475
|
-
function
|
|
4489
|
+
function sh(n, e, t, r, i) {
|
|
4476
4490
|
if (!r.isTextblock)
|
|
4477
4491
|
throw new RangeError("Type given to setBlockType should be a textblock");
|
|
4478
4492
|
let s = n.steps.length;
|
|
4479
4493
|
n.doc.nodesBetween(e, t, (o, l) => {
|
|
4480
4494
|
let a = typeof i == "function" ? i(o) : i;
|
|
4481
|
-
if (o.isTextblock && !o.hasMarkup(r, a) &&
|
|
4495
|
+
if (o.isTextblock && !o.hasMarkup(r, a) && oh(n.doc, n.mapping.slice(s).map(l), r)) {
|
|
4482
4496
|
let c = null;
|
|
4483
4497
|
if (r.schema.linebreakReplacement) {
|
|
4484
4498
|
let h = r.whitespace == "pre", p = !!r.contentMatch.matchType(r.schema.linebreakReplacement);
|
|
@@ -4510,11 +4524,11 @@ function yc(n, e, t, r) {
|
|
|
4510
4524
|
}
|
|
4511
4525
|
});
|
|
4512
4526
|
}
|
|
4513
|
-
function
|
|
4527
|
+
function oh(n, e, t) {
|
|
4514
4528
|
let r = n.resolve(e), i = r.index();
|
|
4515
4529
|
return r.parent.canReplaceWith(i, i + 1, t);
|
|
4516
4530
|
}
|
|
4517
|
-
function
|
|
4531
|
+
function lh(n, e, t, r, i) {
|
|
4518
4532
|
let s = n.doc.nodeAt(e);
|
|
4519
4533
|
if (!s)
|
|
4520
4534
|
throw new RangeError("No node at given position");
|
|
@@ -4543,7 +4557,7 @@ function ut(n, e, t = 1, r) {
|
|
|
4543
4557
|
let l = i.indexAfter(s), a = r && r[0];
|
|
4544
4558
|
return i.node(s).canReplaceWith(l, l, a ? a.type : i.node(s + 1).type);
|
|
4545
4559
|
}
|
|
4546
|
-
function
|
|
4560
|
+
function ah(n, e, t = 1, r) {
|
|
4547
4561
|
let i = n.doc.resolve(e), s = x.empty, o = x.empty;
|
|
4548
4562
|
for (let l = i.depth, a = i.depth - t, c = t - 1; l > a; l--, c--) {
|
|
4549
4563
|
s = x.from(i.node(l).copy(s));
|
|
@@ -4556,7 +4570,7 @@ function Ot(n, e) {
|
|
|
4556
4570
|
let t = n.resolve(e), r = t.index();
|
|
4557
4571
|
return bc(t.nodeBefore, t.nodeAfter) && t.parent.canReplace(r, r + 1);
|
|
4558
4572
|
}
|
|
4559
|
-
function
|
|
4573
|
+
function ch(n, e) {
|
|
4560
4574
|
e.content.size || n.type.compatibleContent(e.type);
|
|
4561
4575
|
let t = n.contentMatchAt(n.childCount), { linebreakReplacement: r } = n.type.schema;
|
|
4562
4576
|
for (let i = 0; i < e.childCount; i++) {
|
|
@@ -4567,7 +4581,7 @@ function oh(n, e) {
|
|
|
4567
4581
|
return t.validEnd;
|
|
4568
4582
|
}
|
|
4569
4583
|
function bc(n, e) {
|
|
4570
|
-
return !!(n && e && !n.isLeaf &&
|
|
4584
|
+
return !!(n && e && !n.isLeaf && ch(n, e));
|
|
4571
4585
|
}
|
|
4572
4586
|
function ki(n, e, t = -1) {
|
|
4573
4587
|
let r = n.resolve(e);
|
|
@@ -4580,7 +4594,7 @@ function ki(n, e, t = -1) {
|
|
|
4580
4594
|
e = t < 0 ? r.before(i) : r.after(i);
|
|
4581
4595
|
}
|
|
4582
4596
|
}
|
|
4583
|
-
function
|
|
4597
|
+
function uh(n, e, t) {
|
|
4584
4598
|
let r = null, { linebreakReplacement: i } = n.doc.type.schema, s = n.doc.resolve(e - t), o = s.node().type;
|
|
4585
4599
|
if (i && o.inlineContent) {
|
|
4586
4600
|
let u = o.whitespace == "pre", d = !!o.contentMatch.matchType(i);
|
|
@@ -4599,7 +4613,7 @@ function lh(n, e, t) {
|
|
|
4599
4613
|
}
|
|
4600
4614
|
return n;
|
|
4601
4615
|
}
|
|
4602
|
-
function
|
|
4616
|
+
function dh(n, e, t) {
|
|
4603
4617
|
let r = n.resolve(e);
|
|
4604
4618
|
if (r.parent.canReplaceWith(r.index(), r.index(), t))
|
|
4605
4619
|
return e;
|
|
@@ -4646,12 +4660,12 @@ function vi(n, e, t = e, r = E.empty) {
|
|
|
4646
4660
|
if (e == t && !r.size)
|
|
4647
4661
|
return null;
|
|
4648
4662
|
let i = n.resolve(e), s = n.resolve(t);
|
|
4649
|
-
return vc(i, s, r) ? new oe(e, t, r) : new
|
|
4663
|
+
return vc(i, s, r) ? new oe(e, t, r) : new fh(i, s, r).fit();
|
|
4650
4664
|
}
|
|
4651
4665
|
function vc(n, e, t) {
|
|
4652
4666
|
return !t.openStart && !t.openEnd && n.start() == e.start() && n.parent.canReplace(n.index(), e.index(), t.content);
|
|
4653
4667
|
}
|
|
4654
|
-
class
|
|
4668
|
+
class fh {
|
|
4655
4669
|
constructor(e, t, r) {
|
|
4656
4670
|
this.$from = e, this.$to = t, this.unplaced = r, this.frontier = [], this.placed = x.empty;
|
|
4657
4671
|
for (let i = 0; i <= e.depth; i++) {
|
|
@@ -4820,18 +4834,18 @@ function _i(n, e, t, r, i) {
|
|
|
4820
4834
|
if (o == s.childCount && !t.compatibleContent(s.type))
|
|
4821
4835
|
return null;
|
|
4822
4836
|
let l = r.fillBefore(s.content, !0, o);
|
|
4823
|
-
return l && !
|
|
4837
|
+
return l && !hh(t, s.content, o) ? l : null;
|
|
4824
4838
|
}
|
|
4825
|
-
function
|
|
4839
|
+
function hh(n, e, t) {
|
|
4826
4840
|
for (let r = t; r < e.childCount; r++)
|
|
4827
4841
|
if (!n.allowsMarks(e.child(r).marks))
|
|
4828
4842
|
return !0;
|
|
4829
4843
|
return !1;
|
|
4830
4844
|
}
|
|
4831
|
-
function
|
|
4845
|
+
function ph(n) {
|
|
4832
4846
|
return n.spec.defining || n.spec.definingForContent;
|
|
4833
4847
|
}
|
|
4834
|
-
function
|
|
4848
|
+
function mh(n, e, t, r) {
|
|
4835
4849
|
if (!r.size)
|
|
4836
4850
|
return n.deleteRange(e, t);
|
|
4837
4851
|
let i = n.doc.resolve(e), s = n.doc.resolve(t);
|
|
@@ -4855,7 +4869,7 @@ function fh(n, e, t, r) {
|
|
|
4855
4869
|
f = p.content;
|
|
4856
4870
|
}
|
|
4857
4871
|
for (let f = u - 1; f >= 0; f--) {
|
|
4858
|
-
let h = c[f], p =
|
|
4872
|
+
let h = c[f], p = ph(h.type);
|
|
4859
4873
|
if (p && !h.sameMarkup(i.node(Math.abs(l) - 1)))
|
|
4860
4874
|
u = f;
|
|
4861
4875
|
else if (p || !h.type.isTextblock)
|
|
@@ -4889,14 +4903,14 @@ function wc(n, e, t, r, i) {
|
|
|
4889
4903
|
}
|
|
4890
4904
|
return n;
|
|
4891
4905
|
}
|
|
4892
|
-
function
|
|
4906
|
+
function gh(n, e, t, r) {
|
|
4893
4907
|
if (!r.isInline && e == t && n.doc.resolve(e).parent.content.size) {
|
|
4894
|
-
let i =
|
|
4908
|
+
let i = dh(n.doc, e, r.type);
|
|
4895
4909
|
i != null && (e = t = i);
|
|
4896
4910
|
}
|
|
4897
4911
|
n.replaceRange(e, t, new E(x.from(r), 0, 0));
|
|
4898
4912
|
}
|
|
4899
|
-
function
|
|
4913
|
+
function yh(n, e, t) {
|
|
4900
4914
|
let r = n.doc.resolve(e), i = n.doc.resolve(t), s = Sc(r, i);
|
|
4901
4915
|
for (let o = 0; o < s.length; o++) {
|
|
4902
4916
|
let l = s[o], a = o == s.length - 1;
|
|
@@ -5092,7 +5106,7 @@ class Cc {
|
|
|
5092
5106
|
control over what happens.
|
|
5093
5107
|
*/
|
|
5094
5108
|
replaceRange(e, t, r) {
|
|
5095
|
-
return
|
|
5109
|
+
return mh(this, e, t, r), this;
|
|
5096
5110
|
}
|
|
5097
5111
|
/**
|
|
5098
5112
|
Replace the given range with a node, but use `from` and `to` as
|
|
@@ -5104,14 +5118,14 @@ class Cc {
|
|
|
5104
5118
|
that parent node.
|
|
5105
5119
|
*/
|
|
5106
5120
|
replaceRangeWith(e, t, r) {
|
|
5107
|
-
return
|
|
5121
|
+
return gh(this, e, t, r), this;
|
|
5108
5122
|
}
|
|
5109
5123
|
/**
|
|
5110
5124
|
Delete the given range, expanding it to cover fully covered
|
|
5111
5125
|
parent nodes until a valid replace is found.
|
|
5112
5126
|
*/
|
|
5113
5127
|
deleteRange(e, t) {
|
|
5114
|
-
return
|
|
5128
|
+
return yh(this, e, t), this;
|
|
5115
5129
|
}
|
|
5116
5130
|
/**
|
|
5117
5131
|
Split the content in the given range off from its parent, if there
|
|
@@ -5121,14 +5135,14 @@ class Cc {
|
|
|
5121
5135
|
sure the lift is valid.
|
|
5122
5136
|
*/
|
|
5123
5137
|
lift(e, t) {
|
|
5124
|
-
return
|
|
5138
|
+
return th(this, e, t), this;
|
|
5125
5139
|
}
|
|
5126
5140
|
/**
|
|
5127
5141
|
Join the blocks around the given position. If depth is 2, their
|
|
5128
5142
|
last and first siblings are also joined, and so on.
|
|
5129
5143
|
*/
|
|
5130
5144
|
join(e, t = 1) {
|
|
5131
|
-
return
|
|
5145
|
+
return uh(this, e, t), this;
|
|
5132
5146
|
}
|
|
5133
5147
|
/**
|
|
5134
5148
|
Wrap the given [range](https://prosemirror.net/docs/ref/#model.NodeRange) in the given set of wrappers.
|
|
@@ -5136,21 +5150,21 @@ class Cc {
|
|
|
5136
5150
|
probably be computed with [`findWrapping`](https://prosemirror.net/docs/ref/#transform.findWrapping).
|
|
5137
5151
|
*/
|
|
5138
5152
|
wrap(e, t) {
|
|
5139
|
-
return
|
|
5153
|
+
return ih(this, e, t), this;
|
|
5140
5154
|
}
|
|
5141
5155
|
/**
|
|
5142
5156
|
Set the type of all textblocks (partly) between `from` and `to` to
|
|
5143
5157
|
the given node type with the given attributes.
|
|
5144
5158
|
*/
|
|
5145
5159
|
setBlockType(e, t = e, r, i = null) {
|
|
5146
|
-
return
|
|
5160
|
+
return sh(this, e, t, r, i), this;
|
|
5147
5161
|
}
|
|
5148
5162
|
/**
|
|
5149
5163
|
Change the type, attributes, and/or marks of the node at `pos`.
|
|
5150
5164
|
When `type` isn't given, the existing node type is preserved,
|
|
5151
5165
|
*/
|
|
5152
5166
|
setNodeMarkup(e, t, r = null, i) {
|
|
5153
|
-
return
|
|
5167
|
+
return lh(this, e, t, r, i), this;
|
|
5154
5168
|
}
|
|
5155
5169
|
/**
|
|
5156
5170
|
Set a single attribute on a given node to a new value.
|
|
@@ -5199,13 +5213,13 @@ class Cc {
|
|
|
5199
5213
|
use after the split (with the outermost nodes coming first).
|
|
5200
5214
|
*/
|
|
5201
5215
|
split(e, t = 1, r) {
|
|
5202
|
-
return
|
|
5216
|
+
return ah(this, e, t, r), this;
|
|
5203
5217
|
}
|
|
5204
5218
|
/**
|
|
5205
5219
|
Add the given mark to the inline content between `from` and `to`.
|
|
5206
5220
|
*/
|
|
5207
5221
|
addMark(e, t, r) {
|
|
5208
|
-
return
|
|
5222
|
+
return Qf(this, e, t, r), this;
|
|
5209
5223
|
}
|
|
5210
5224
|
/**
|
|
5211
5225
|
Remove marks from inline nodes between `from` and `to`. When
|
|
@@ -5214,7 +5228,7 @@ class Cc {
|
|
|
5214
5228
|
remove all marks of any type.
|
|
5215
5229
|
*/
|
|
5216
5230
|
removeMark(e, t, r) {
|
|
5217
|
-
return
|
|
5231
|
+
return Zf(this, e, t, r), this;
|
|
5218
5232
|
}
|
|
5219
5233
|
/**
|
|
5220
5234
|
Removes all marks and nodes from the content of the node at
|
|
@@ -5234,7 +5248,7 @@ class B {
|
|
|
5234
5248
|
`$head`.
|
|
5235
5249
|
*/
|
|
5236
5250
|
constructor(e, t, r) {
|
|
5237
|
-
this.$anchor = e, this.$head = t, this.ranges = r || [new
|
|
5251
|
+
this.$anchor = e, this.$head = t, this.ranges = r || [new bh(e.min(t), e.max(t))];
|
|
5238
5252
|
}
|
|
5239
5253
|
/**
|
|
5240
5254
|
The selection's anchor, as an unresolved position.
|
|
@@ -5392,7 +5406,7 @@ class B {
|
|
|
5392
5406
|
}
|
|
5393
5407
|
}
|
|
5394
5408
|
B.prototype.visible = !0;
|
|
5395
|
-
class
|
|
5409
|
+
class bh {
|
|
5396
5410
|
/**
|
|
5397
5411
|
Create a range.
|
|
5398
5412
|
*/
|
|
@@ -5580,11 +5594,11 @@ class Ne extends B {
|
|
|
5580
5594
|
return e instanceof Ne;
|
|
5581
5595
|
}
|
|
5582
5596
|
getBookmark() {
|
|
5583
|
-
return
|
|
5597
|
+
return kh;
|
|
5584
5598
|
}
|
|
5585
5599
|
}
|
|
5586
5600
|
B.jsonID("all", Ne);
|
|
5587
|
-
const
|
|
5601
|
+
const kh = {
|
|
5588
5602
|
map() {
|
|
5589
5603
|
return this;
|
|
5590
5604
|
},
|
|
@@ -5622,7 +5636,7 @@ function yl(n, e, t) {
|
|
|
5622
5636
|
}), n.setSelection(B.near(n.doc.resolve(o), t));
|
|
5623
5637
|
}
|
|
5624
5638
|
const bl = 1, hr = 2, kl = 4;
|
|
5625
|
-
class
|
|
5639
|
+
class vh extends Cc {
|
|
5626
5640
|
/**
|
|
5627
5641
|
@internal
|
|
5628
5642
|
*/
|
|
@@ -5781,7 +5795,7 @@ class Tn {
|
|
|
5781
5795
|
this.name = e, this.init = vl(t.init, r), this.apply = vl(t.apply, r);
|
|
5782
5796
|
}
|
|
5783
5797
|
}
|
|
5784
|
-
const
|
|
5798
|
+
const xh = [
|
|
5785
5799
|
new Tn("doc", {
|
|
5786
5800
|
init(n) {
|
|
5787
5801
|
return n.doc || n.schema.topNodeType.createAndFill();
|
|
@@ -5817,7 +5831,7 @@ const bh = [
|
|
|
5817
5831
|
];
|
|
5818
5832
|
class Ki {
|
|
5819
5833
|
constructor(e, t) {
|
|
5820
|
-
this.schema = e, this.plugins = [], this.pluginsByKey = /* @__PURE__ */ Object.create(null), this.fields =
|
|
5834
|
+
this.schema = e, this.plugins = [], this.pluginsByKey = /* @__PURE__ */ Object.create(null), this.fields = xh.slice(), t && t.forEach((r) => {
|
|
5821
5835
|
if (this.pluginsByKey[r.key])
|
|
5822
5836
|
throw new RangeError("Adding different instances of a keyed plugin (" + r.key + ")");
|
|
5823
5837
|
this.plugins.push(r), this.pluginsByKey[r.key] = r, r.spec.state && this.fields.push(new Tn(r.key, r.spec.state, r));
|
|
@@ -5910,7 +5924,7 @@ class un {
|
|
|
5910
5924
|
Start a [transaction](https://prosemirror.net/docs/ref/#state.Transaction) from this state.
|
|
5911
5925
|
*/
|
|
5912
5926
|
get tr() {
|
|
5913
|
-
return new
|
|
5927
|
+
return new vh(this);
|
|
5914
5928
|
}
|
|
5915
5929
|
/**
|
|
5916
5930
|
Create a new state.
|
|
@@ -6047,18 +6061,18 @@ let Ms = null;
|
|
|
6047
6061
|
const ot = function(n, e, t) {
|
|
6048
6062
|
let r = Ms || (Ms = document.createRange());
|
|
6049
6063
|
return r.setEnd(n, t ?? n.nodeValue.length), r.setStart(n, e || 0), r;
|
|
6050
|
-
},
|
|
6064
|
+
}, wh = function() {
|
|
6051
6065
|
Ms = null;
|
|
6052
6066
|
}, Gt = function(n, e, t, r) {
|
|
6053
6067
|
return t && (xl(n, e, t, r, -1) || xl(n, e, t, r, 1));
|
|
6054
|
-
},
|
|
6068
|
+
}, Sh = /^(img|br|input|textarea|hr)$/i;
|
|
6055
6069
|
function xl(n, e, t, r, i) {
|
|
6056
6070
|
for (var s; ; ) {
|
|
6057
6071
|
if (n == t && e == r)
|
|
6058
6072
|
return !0;
|
|
6059
6073
|
if (e == (i < 0 ? 0 : Be(n))) {
|
|
6060
6074
|
let o = n.parentNode;
|
|
6061
|
-
if (!o || o.nodeType != 1 || ir(n) ||
|
|
6075
|
+
if (!o || o.nodeType != 1 || ir(n) || Sh.test(n.nodeName) || n.contentEditable == "false")
|
|
6062
6076
|
return !1;
|
|
6063
6077
|
e = fe(n) + (i < 0 ? 0 : 1), n = o;
|
|
6064
6078
|
} else if (n.nodeType == 1) {
|
|
@@ -6077,7 +6091,7 @@ function xl(n, e, t, r, i) {
|
|
|
6077
6091
|
function Be(n) {
|
|
6078
6092
|
return n.nodeType == 3 ? n.nodeValue.length : n.childNodes.length;
|
|
6079
6093
|
}
|
|
6080
|
-
function
|
|
6094
|
+
function Ch(n, e) {
|
|
6081
6095
|
for (; ; ) {
|
|
6082
6096
|
if (n.nodeType == 3 && e)
|
|
6083
6097
|
return n;
|
|
@@ -6091,7 +6105,7 @@ function xh(n, e) {
|
|
|
6091
6105
|
return null;
|
|
6092
6106
|
}
|
|
6093
6107
|
}
|
|
6094
|
-
function
|
|
6108
|
+
function Mh(n, e) {
|
|
6095
6109
|
for (; ; ) {
|
|
6096
6110
|
if (n.nodeType == 3 && e < n.nodeValue.length)
|
|
6097
6111
|
return n;
|
|
@@ -6105,7 +6119,7 @@ function wh(n, e) {
|
|
|
6105
6119
|
return null;
|
|
6106
6120
|
}
|
|
6107
6121
|
}
|
|
6108
|
-
function
|
|
6122
|
+
function Th(n, e, t) {
|
|
6109
6123
|
for (let r = e == 0, i = e == Be(n); r || i; ) {
|
|
6110
6124
|
if (n == t)
|
|
6111
6125
|
return !0;
|
|
@@ -6128,13 +6142,13 @@ function Lt(n, e) {
|
|
|
6128
6142
|
let t = document.createEvent("Event");
|
|
6129
6143
|
return t.initEvent("keydown", !0, !0), t.keyCode = n, t.key = t.code = e, t;
|
|
6130
6144
|
}
|
|
6131
|
-
function
|
|
6145
|
+
function Eh(n) {
|
|
6132
6146
|
let e = n.activeElement;
|
|
6133
6147
|
for (; e && e.shadowRoot; )
|
|
6134
6148
|
e = e.shadowRoot.activeElement;
|
|
6135
6149
|
return e;
|
|
6136
6150
|
}
|
|
6137
|
-
function
|
|
6151
|
+
function Oh(n, e, t) {
|
|
6138
6152
|
if (n.caretPositionFromPoint)
|
|
6139
6153
|
try {
|
|
6140
6154
|
let r = n.caretPositionFromPoint(e, t);
|
|
@@ -6150,8 +6164,8 @@ function Mh(n, e, t) {
|
|
|
6150
6164
|
}
|
|
6151
6165
|
const Xe = typeof navigator < "u" ? navigator : null, wl = typeof document < "u" ? document : null, At = Xe && Xe.userAgent || "", Ts = /Edge\/(\d+)/.exec(At), Ec = /MSIE \d/.exec(At), Es = /Trident\/(?:[7-9]|\d{2,})\..*rv:(\d+)/.exec(At), Me = !!(Ec || Es || Ts), Ct = Ec ? document.documentMode : Es ? +Es[1] : Ts ? +Ts[1] : 0, je = !Me && /gecko\/(\d+)/i.test(At);
|
|
6152
6166
|
je && +(/Firefox\/(\d+)/.exec(At) || [0, 0])[1];
|
|
6153
|
-
const Os = !Me && /Chrome\/(\d+)/.exec(At), be = !!Os, Oc = Os ? +Os[1] : 0, xe = !Me && !!Xe && /Apple Computer/.test(Xe.vendor), gn = xe && (/Mobile\/\w+/.test(At) || !!Xe && Xe.maxTouchPoints > 2), Pe = gn || (Xe ? /Mac/.test(Xe.platform) : !1),
|
|
6154
|
-
function
|
|
6167
|
+
const Os = !Me && /Chrome\/(\d+)/.exec(At), be = !!Os, Oc = Os ? +Os[1] : 0, xe = !Me && !!Xe && /Apple Computer/.test(Xe.vendor), gn = xe && (/Mobile\/\w+/.test(At) || !!Xe && Xe.maxTouchPoints > 2), Pe = gn || (Xe ? /Mac/.test(Xe.platform) : !1), Ah = Xe ? /Win/.test(Xe.platform) : !1, at = /Android \d/.test(At), sr = !!wl && "webkitFontSmoothing" in wl.documentElement.style, Nh = sr ? +(/\bAppleWebKit\/(\d+)/.exec(navigator.userAgent) || [0, 0])[1] : 0;
|
|
6168
|
+
function Ih(n) {
|
|
6155
6169
|
let e = n.defaultView && n.defaultView.visualViewport;
|
|
6156
6170
|
return e ? {
|
|
6157
6171
|
left: 0,
|
|
@@ -6168,7 +6182,7 @@ function Oh(n) {
|
|
|
6168
6182
|
function nt(n, e) {
|
|
6169
6183
|
return typeof n == "number" ? n : n[e];
|
|
6170
6184
|
}
|
|
6171
|
-
function
|
|
6185
|
+
function Dh(n) {
|
|
6172
6186
|
let e = n.getBoundingClientRect(), t = e.width / n.offsetWidth || 1, r = e.height / n.offsetHeight || 1;
|
|
6173
6187
|
return {
|
|
6174
6188
|
left: e.left,
|
|
@@ -6184,7 +6198,7 @@ function Sl(n, e, t) {
|
|
|
6184
6198
|
o = mn(o);
|
|
6185
6199
|
continue;
|
|
6186
6200
|
}
|
|
6187
|
-
let l = o, a = l == s.body, c = a ?
|
|
6201
|
+
let l = o, a = l == s.body, c = a ? Ih(s) : Dh(l), u = 0, d = 0;
|
|
6188
6202
|
if (e.top < c.top + nt(r, "top") ? d = -(c.top - e.top + nt(i, "top")) : e.bottom > c.bottom - nt(r, "bottom") && (d = e.bottom - e.top > c.bottom - c.top ? e.top + nt(i, "top") - c.top : e.bottom - c.bottom + nt(i, "bottom")), e.left < c.left + nt(r, "left") ? u = -(c.left - e.left + nt(i, "left")) : e.right > c.right - nt(r, "right") && (u = e.right - c.right + nt(i, "right")), u || d)
|
|
6189
6203
|
if (a)
|
|
6190
6204
|
s.defaultView.scrollBy(u, d);
|
|
@@ -6200,7 +6214,7 @@ function Sl(n, e, t) {
|
|
|
6200
6214
|
o = f == "absolute" ? o.offsetParent : mn(o);
|
|
6201
6215
|
}
|
|
6202
6216
|
}
|
|
6203
|
-
function
|
|
6217
|
+
function Rh(n) {
|
|
6204
6218
|
let e = n.dom.getBoundingClientRect(), t = Math.max(0, e.top), r, i;
|
|
6205
6219
|
for (let s = (e.left + e.right) / 2, o = t + 1; o < Math.min(innerHeight, e.bottom); o += 5) {
|
|
6206
6220
|
let l = n.root.elementFromPoint(s, o);
|
|
@@ -6220,7 +6234,7 @@ function Ac(n) {
|
|
|
6220
6234
|
;
|
|
6221
6235
|
return e;
|
|
6222
6236
|
}
|
|
6223
|
-
function
|
|
6237
|
+
function Lh({ refDOM: n, refTop: e, stack: t }) {
|
|
6224
6238
|
let r = n ? n.getBoundingClientRect().top : 0;
|
|
6225
6239
|
Nc(t, r == 0 ? 0 : r - e);
|
|
6226
6240
|
}
|
|
@@ -6231,7 +6245,7 @@ function Nc(n, e) {
|
|
|
6231
6245
|
}
|
|
6232
6246
|
}
|
|
6233
6247
|
let nn = null;
|
|
6234
|
-
function
|
|
6248
|
+
function Ph(n) {
|
|
6235
6249
|
if (n.setActive)
|
|
6236
6250
|
return n.setActive();
|
|
6237
6251
|
if (nn)
|
|
@@ -6269,9 +6283,9 @@ function Ic(n, e) {
|
|
|
6269
6283
|
!t && (e.left >= p.right && e.top >= p.top || e.left >= p.left && e.top >= p.bottom) && (s = d + 1);
|
|
6270
6284
|
}
|
|
6271
6285
|
}
|
|
6272
|
-
return !t && a && (t = a, i = c, r = 0), t && t.nodeType == 3 ?
|
|
6286
|
+
return !t && a && (t = a, i = c, r = 0), t && t.nodeType == 3 ? Bh(t, i) : !t || r && t.nodeType == 1 ? { node: n, offset: s } : Ic(t, i);
|
|
6273
6287
|
}
|
|
6274
|
-
function
|
|
6288
|
+
function Bh(n, e) {
|
|
6275
6289
|
let t = n.nodeValue.length, r = document.createRange();
|
|
6276
6290
|
for (let i = 0; i < t; i++) {
|
|
6277
6291
|
r.setEnd(n, i + 1), r.setStart(n, i);
|
|
@@ -6284,11 +6298,11 @@ function Rh(n, e) {
|
|
|
6284
6298
|
function to(n, e) {
|
|
6285
6299
|
return n.left >= e.left - 1 && n.left <= e.right + 1 && n.top >= e.top - 1 && n.top <= e.bottom + 1;
|
|
6286
6300
|
}
|
|
6287
|
-
function
|
|
6301
|
+
function Fh(n, e) {
|
|
6288
6302
|
let t = n.parentNode;
|
|
6289
6303
|
return t && /^li$/i.test(t.nodeName) && e.left < n.getBoundingClientRect().left ? t : n;
|
|
6290
6304
|
}
|
|
6291
|
-
function
|
|
6305
|
+
function zh(n, e, t) {
|
|
6292
6306
|
let { node: r, offset: i } = Ic(e, t), s = -1;
|
|
6293
6307
|
if (r.nodeType == 1 && !r.firstChild) {
|
|
6294
6308
|
let o = r.getBoundingClientRect();
|
|
@@ -6296,7 +6310,7 @@ function Ph(n, e, t) {
|
|
|
6296
6310
|
}
|
|
6297
6311
|
return n.docView.posFromDOM(r, i, s);
|
|
6298
6312
|
}
|
|
6299
|
-
function
|
|
6313
|
+
function $h(n, e, t, r) {
|
|
6300
6314
|
let i = -1;
|
|
6301
6315
|
for (let s = e, o = !1; s != n.dom; ) {
|
|
6302
6316
|
let l = n.docView.nearestDesc(s, !0), a;
|
|
@@ -6327,8 +6341,8 @@ function Dc(n, e, t) {
|
|
|
6327
6341
|
}
|
|
6328
6342
|
return n;
|
|
6329
6343
|
}
|
|
6330
|
-
function
|
|
6331
|
-
let t = n.dom.ownerDocument, r, i = 0, s =
|
|
6344
|
+
function Hh(n, e) {
|
|
6345
|
+
let t = n.dom.ownerDocument, r, i = 0, s = Oh(t, e.left, e.top);
|
|
6332
6346
|
s && ({ node: r, offset: i } = s);
|
|
6333
6347
|
let o = (n.root.elementFromPoint ? n.root : t).elementFromPoint(e.left, e.top), l;
|
|
6334
6348
|
if (!o || !n.dom.contains(o.nodeType != 1 ? o.parentNode : o)) {
|
|
@@ -6339,15 +6353,15 @@ function Fh(n, e) {
|
|
|
6339
6353
|
if (xe)
|
|
6340
6354
|
for (let c = o; r && c; c = mn(c))
|
|
6341
6355
|
c.draggable && (r = void 0);
|
|
6342
|
-
if (o =
|
|
6356
|
+
if (o = Fh(o, e), r) {
|
|
6343
6357
|
if (je && r.nodeType == 1 && (i = Math.min(i, r.childNodes.length), i < r.childNodes.length)) {
|
|
6344
6358
|
let u = r.childNodes[i], d;
|
|
6345
6359
|
u.nodeName == "IMG" && (d = u.getBoundingClientRect()).right <= e.left && d.bottom > e.top && i++;
|
|
6346
6360
|
}
|
|
6347
6361
|
let c;
|
|
6348
|
-
sr && i && r.nodeType == 1 && (c = r.childNodes[i - 1]).nodeType == 1 && c.contentEditable == "false" && c.getBoundingClientRect().top >= e.top && i--, r == n.dom && i == r.childNodes.length - 1 && r.lastChild.nodeType == 1 && e.top > r.lastChild.getBoundingClientRect().bottom ? l = n.state.doc.content.size : (i == 0 || r.nodeType != 1 || r.childNodes[i - 1].nodeName != "BR") && (l =
|
|
6362
|
+
sr && i && r.nodeType == 1 && (c = r.childNodes[i - 1]).nodeType == 1 && c.contentEditable == "false" && c.getBoundingClientRect().top >= e.top && i--, r == n.dom && i == r.childNodes.length - 1 && r.lastChild.nodeType == 1 && e.top > r.lastChild.getBoundingClientRect().bottom ? l = n.state.doc.content.size : (i == 0 || r.nodeType != 1 || r.childNodes[i - 1].nodeName != "BR") && (l = $h(n, r, i, e));
|
|
6349
6363
|
}
|
|
6350
|
-
l == null && (l =
|
|
6364
|
+
l == null && (l = zh(n, o, e));
|
|
6351
6365
|
let a = n.docView.nearestDesc(o, !0);
|
|
6352
6366
|
return { pos: l, inside: a ? a.posAtStart - a.border : -1 };
|
|
6353
6367
|
}
|
|
@@ -6363,11 +6377,11 @@ function ht(n, e) {
|
|
|
6363
6377
|
}
|
|
6364
6378
|
return Array.prototype.find.call(t, Cl) || n.getBoundingClientRect();
|
|
6365
6379
|
}
|
|
6366
|
-
const
|
|
6380
|
+
const Vh = /[\u0590-\u05f4\u0600-\u06ff\u0700-\u08ac]/;
|
|
6367
6381
|
function Rc(n, e, t) {
|
|
6368
6382
|
let { node: r, offset: i, atom: s } = n.docView.domFromPos(e, t < 0 ? -1 : 1), o = sr || je;
|
|
6369
6383
|
if (r.nodeType == 3)
|
|
6370
|
-
if (o && (
|
|
6384
|
+
if (o && (Vh.test(r.nodeValue) || (t < 0 ? !i : i == r.nodeValue.length))) {
|
|
6371
6385
|
let a = ht(ot(r, i, i), t);
|
|
6372
6386
|
if (je && i && /\s/.test(r.nodeValue[i - 1]) && i < r.nodeValue.length) {
|
|
6373
6387
|
let c = ht(ot(r, i - 1, i - 1), -1);
|
|
@@ -6431,7 +6445,7 @@ function Lc(n, e, t) {
|
|
|
6431
6445
|
r != e && n.updateState(r), i != n.dom && i && i.focus();
|
|
6432
6446
|
}
|
|
6433
6447
|
}
|
|
6434
|
-
function
|
|
6448
|
+
function jh(n, e, t) {
|
|
6435
6449
|
let r = e.selection, i = t == "up" ? r.$from : r.$to;
|
|
6436
6450
|
return Lc(n, e, () => {
|
|
6437
6451
|
let { node: s } = n.docView.domFromPos(i.pos, t == "up" ? -1 : 1);
|
|
@@ -6463,13 +6477,13 @@ function $h(n, e, t) {
|
|
|
6463
6477
|
return !0;
|
|
6464
6478
|
});
|
|
6465
6479
|
}
|
|
6466
|
-
const
|
|
6467
|
-
function
|
|
6480
|
+
const _h = /[\u0590-\u08ac]/;
|
|
6481
|
+
function Wh(n, e, t) {
|
|
6468
6482
|
let { $head: r } = e.selection;
|
|
6469
6483
|
if (!r.parent.isTextblock)
|
|
6470
6484
|
return !1;
|
|
6471
6485
|
let i = r.parentOffset, s = !i, o = i == r.parent.content.size, l = n.domSelection();
|
|
6472
|
-
return l ? !
|
|
6486
|
+
return l ? !_h.test(r.parent.textContent) || !l.modify ? t == "left" || t == "backward" ? s : o : Lc(n, e, () => {
|
|
6473
6487
|
let { focusNode: a, focusOffset: c, anchorNode: u, anchorOffset: d } = n.domSelectionRange(), f = l.caretBidiLevel;
|
|
6474
6488
|
l.modify("move", t, "character");
|
|
6475
6489
|
let h = r.depth ? n.docView.domAfterPos(r.before()) : n.dom, { focusNode: p, focusOffset: m } = n.domSelectionRange(), y = p && !h.contains(p.nodeType == 1 ? p : p.parentNode) || a == p && c == m;
|
|
@@ -6481,8 +6495,8 @@ function Vh(n, e, t) {
|
|
|
6481
6495
|
}) : r.pos == r.start() || r.pos == r.end();
|
|
6482
6496
|
}
|
|
6483
6497
|
let Ml = null, Tl = null, El = !1;
|
|
6484
|
-
function
|
|
6485
|
-
return Ml == e && Tl == t ? El : (Ml = e, Tl = t, El = t == "up" || t == "down" ?
|
|
6498
|
+
function Kh(n, e, t) {
|
|
6499
|
+
return Ml == e && Tl == t ? El : (Ml = e, Tl = t, El = t == "up" || t == "down" ? jh(n, e, t) : Wh(n, e, t));
|
|
6486
6500
|
}
|
|
6487
6501
|
const $e = 0, Ol = 1, Bt = 2, Qe = 3;
|
|
6488
6502
|
class or {
|
|
@@ -6872,7 +6886,7 @@ class Pc extends or {
|
|
|
6872
6886
|
return this.widget.type.side;
|
|
6873
6887
|
}
|
|
6874
6888
|
}
|
|
6875
|
-
class
|
|
6889
|
+
class Uh extends or {
|
|
6876
6890
|
constructor(e, t, r, i) {
|
|
6877
6891
|
super(e, [], t, null), this.textDOM = r, this.text = i;
|
|
6878
6892
|
}
|
|
@@ -6953,7 +6967,7 @@ class Mt extends or {
|
|
|
6953
6967
|
} else u || ({ dom: u, contentDOM: d } = Qt.renderSpec(document, t.type.spec.toDOM(t), null, t.attrs));
|
|
6954
6968
|
!d && !t.isText && u.nodeName != "BR" && (u.hasAttribute("contenteditable") || (u.contentEditable = "false"), t.type.spec.draggable && (u.draggable = !0));
|
|
6955
6969
|
let f = u;
|
|
6956
|
-
return u = $c(u, r, t), c ? a = new
|
|
6970
|
+
return u = $c(u, r, t), c ? a = new qh(e, t, r, i, u, d || null, f, c, s, o + 1) : t.isText ? new Si(e, t, r, i, u, f, s) : new Mt(e, t, r, i, u, d || null, f, s, o + 1);
|
|
6957
6971
|
}
|
|
6958
6972
|
parseRule() {
|
|
6959
6973
|
if (this.node.type.spec.reparseInView)
|
|
@@ -6989,14 +7003,14 @@ class Mt extends or {
|
|
|
6989
7003
|
// separate step, syncs the DOM inside `this.contentDOM` to
|
|
6990
7004
|
// `this.children`.
|
|
6991
7005
|
updateChildren(e, t) {
|
|
6992
|
-
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
|
|
6993
|
-
|
|
7006
|
+
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 Gh(this, o && o.node, e);
|
|
7007
|
+
Qh(this.node, this.innerDeco, (c, u, d) => {
|
|
6994
7008
|
c.spec.marks ? a.syncToMarks(c.spec.marks, r, e) : c.type.side >= 0 && !d && a.syncToMarks(u == this.node.childCount ? K.none : this.node.child(u).marks, r, e), a.placeWidget(c, e, i);
|
|
6995
7009
|
}, (c, u, d, f) => {
|
|
6996
7010
|
a.syncToMarks(c.marks, r, e);
|
|
6997
7011
|
let h;
|
|
6998
7012
|
a.findNodeMatch(c, u, d, f) || l && e.state.selection.from > i && e.state.selection.to < i + c.nodeSize && (h = a.findIndexWithChild(s.node)) > -1 && a.updateNodeAt(c, u, d, h, e) || a.updateNextNode(c, u, d, e, f, i) || a.addNode(c, u, d, e, i), i += c.nodeSize;
|
|
6999
|
-
}), a.syncToMarks([], r, e), this.node.isTextblock && a.addTextblockHacks(), a.destroyRest(), (a.changed || this.dirty == Bt) && (o && this.protectLocalComposition(e, o), Fc(this.contentDOM, this.children, e), gn &&
|
|
7013
|
+
}), a.syncToMarks([], r, e), this.node.isTextblock && a.addTextblockHacks(), a.destroyRest(), (a.changed || this.dirty == Bt) && (o && this.protectLocalComposition(e, o), Fc(this.contentDOM, this.children, e), gn && Zh(this.dom));
|
|
7000
7014
|
}
|
|
7001
7015
|
localCompositionInfo(e, t) {
|
|
7002
7016
|
let { from: r, to: i } = e.state.selection;
|
|
@@ -7006,7 +7020,7 @@ class Mt extends or {
|
|
|
7006
7020
|
if (!s || !this.dom.contains(s.parentNode))
|
|
7007
7021
|
return null;
|
|
7008
7022
|
if (this.node.inlineContent) {
|
|
7009
|
-
let o = s.nodeValue, l =
|
|
7023
|
+
let o = s.nodeValue, l = ep(this.node.content, o, r - t, i - t);
|
|
7010
7024
|
return l < 0 ? null : { node: s, pos: l, text: o };
|
|
7011
7025
|
} else
|
|
7012
7026
|
return { node: s, pos: -1, text: "" };
|
|
@@ -7022,7 +7036,7 @@ class Mt extends or {
|
|
|
7022
7036
|
s.parentNode.removeChild(s.nextSibling);
|
|
7023
7037
|
s.pmViewDesc && (s.pmViewDesc = void 0);
|
|
7024
7038
|
}
|
|
7025
|
-
let o = new
|
|
7039
|
+
let o = new Uh(this, s, t, i);
|
|
7026
7040
|
e.input.compositionNodes.push(o), this.children = Ns(this.children, r, r + i.length, e, o);
|
|
7027
7041
|
}
|
|
7028
7042
|
// If this desc must be updated to match the given node decoration,
|
|
@@ -7113,7 +7127,7 @@ class Bc extends or {
|
|
|
7113
7127
|
return this.dom.nodeName == "IMG";
|
|
7114
7128
|
}
|
|
7115
7129
|
}
|
|
7116
|
-
class
|
|
7130
|
+
class qh extends Mt {
|
|
7117
7131
|
constructor(e, t, r, i, s, o, l, a, c, u) {
|
|
7118
7132
|
super(e, t, r, i, s, o, l, c, u), this.spec = a;
|
|
7119
7133
|
}
|
|
@@ -7197,11 +7211,11 @@ function zc(n, e, t, r) {
|
|
|
7197
7211
|
let a;
|
|
7198
7212
|
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 = Ft[0]), i = a;
|
|
7199
7213
|
}
|
|
7200
|
-
|
|
7214
|
+
Jh(i, l || Ft[0], o);
|
|
7201
7215
|
}
|
|
7202
7216
|
return i;
|
|
7203
7217
|
}
|
|
7204
|
-
function
|
|
7218
|
+
function Jh(n, e, t) {
|
|
7205
7219
|
for (let r in e)
|
|
7206
7220
|
r != "class" && r != "style" && r != "nodeName" && !(r in t) && n.removeAttribute(r);
|
|
7207
7221
|
for (let r in t)
|
|
@@ -7238,9 +7252,9 @@ function Nl(n) {
|
|
|
7238
7252
|
let e = n.nextSibling;
|
|
7239
7253
|
return n.parentNode.removeChild(n), e;
|
|
7240
7254
|
}
|
|
7241
|
-
class
|
|
7255
|
+
class Gh {
|
|
7242
7256
|
constructor(e, t, r) {
|
|
7243
|
-
this.lock = t, this.view = r, this.index = 0, this.stack = [], this.changed = !1, this.top = e, this.preMatch =
|
|
7257
|
+
this.lock = t, this.view = r, this.index = 0, this.stack = [], this.changed = !1, this.top = e, this.preMatch = Yh(e.node.content, e);
|
|
7244
7258
|
}
|
|
7245
7259
|
// Destroy and remove the children between the given indices in
|
|
7246
7260
|
// `this.top`.
|
|
@@ -7388,7 +7402,7 @@ class Uh {
|
|
|
7388
7402
|
return this.lock && (e == this.lock || e.nodeType == 1 && e.contains(this.lock.parentNode));
|
|
7389
7403
|
}
|
|
7390
7404
|
}
|
|
7391
|
-
function
|
|
7405
|
+
function Yh(n, e) {
|
|
7392
7406
|
let t = e, r = t.children.length, i = n.childCount, s = /* @__PURE__ */ new Map(), o = [];
|
|
7393
7407
|
e: for (; i > 0; ) {
|
|
7394
7408
|
let l;
|
|
@@ -7415,10 +7429,10 @@ function qh(n, e) {
|
|
|
7415
7429
|
}
|
|
7416
7430
|
return { index: i, matched: s, matches: o.reverse() };
|
|
7417
7431
|
}
|
|
7418
|
-
function
|
|
7432
|
+
function Xh(n, e) {
|
|
7419
7433
|
return n.type.side - e.type.side;
|
|
7420
7434
|
}
|
|
7421
|
-
function
|
|
7435
|
+
function Qh(n, e, t, r) {
|
|
7422
7436
|
let i = e.locals(n), s = 0;
|
|
7423
7437
|
if (i.length == 0) {
|
|
7424
7438
|
for (let c = 0; c < n.childCount; c++) {
|
|
@@ -7436,7 +7450,7 @@ function Gh(n, e, t, r) {
|
|
|
7436
7450
|
}
|
|
7437
7451
|
if (u)
|
|
7438
7452
|
if (d) {
|
|
7439
|
-
d.sort(
|
|
7453
|
+
d.sort(Xh);
|
|
7440
7454
|
for (let y = 0; y < d.length; y++)
|
|
7441
7455
|
t(d[y], c, !!a);
|
|
7442
7456
|
} else
|
|
@@ -7466,13 +7480,13 @@ function Gh(n, e, t, r) {
|
|
|
7466
7480
|
r(f, m, e.forChild(s, f), h), s = p;
|
|
7467
7481
|
}
|
|
7468
7482
|
}
|
|
7469
|
-
function
|
|
7483
|
+
function Zh(n) {
|
|
7470
7484
|
if (n.nodeName == "UL" || n.nodeName == "OL") {
|
|
7471
7485
|
let e = n.style.cssText;
|
|
7472
7486
|
n.style.cssText = e + "; list-style: square !important", window.getComputedStyle(n).listStyle, n.style.cssText = e;
|
|
7473
7487
|
}
|
|
7474
7488
|
}
|
|
7475
|
-
function
|
|
7489
|
+
function ep(n, e, t, r) {
|
|
7476
7490
|
for (let i = 0, s = 0; i < n.childCount && s <= r; ) {
|
|
7477
7491
|
let o = n.child(i++), l = s;
|
|
7478
7492
|
if (s += o.nodeSize, !o.isText)
|
|
@@ -7516,7 +7530,7 @@ function no(n, e = null) {
|
|
|
7516
7530
|
for (a = o; i && !i.node; )
|
|
7517
7531
|
i = i.parent;
|
|
7518
7532
|
let d = i.node;
|
|
7519
|
-
if (i && d.isAtom && I.isSelectable(d) && i.parent && !(d.isInline &&
|
|
7533
|
+
if (i && d.isAtom && I.isSelectable(d) && i.parent && !(d.isInline && Th(t.focusNode, t.focusOffset, i.dom))) {
|
|
7520
7534
|
let f = i.posBefore;
|
|
7521
7535
|
c = new I(o == f ? l : r.resolve(f));
|
|
7522
7536
|
}
|
|
@@ -7556,10 +7570,10 @@ function dt(n, e = !1) {
|
|
|
7556
7570
|
}
|
|
7557
7571
|
}
|
|
7558
7572
|
if (n.domObserver.disconnectSelection(), n.cursorWrapper)
|
|
7559
|
-
|
|
7573
|
+
np(n);
|
|
7560
7574
|
else {
|
|
7561
7575
|
let { anchor: r, head: i } = t, s, o;
|
|
7562
|
-
Il && !(t instanceof R) && (t.$from.parent.inlineContent || (s = Dl(n, t.from)), !t.empty && !t.$from.parent.inlineContent && (o = Dl(n, t.to))), n.docView.setSelection(r, i, n, e), Il && (s && Rl(s), o && Rl(o)), t.visible ? n.dom.classList.remove("ProseMirror-hideselection") : (n.dom.classList.add("ProseMirror-hideselection"), "onselectionchange" in document &&
|
|
7576
|
+
Il && !(t instanceof R) && (t.$from.parent.inlineContent || (s = Dl(n, t.from)), !t.empty && !t.$from.parent.inlineContent && (o = Dl(n, t.to))), n.docView.setSelection(r, i, n, e), Il && (s && Rl(s), o && Rl(o)), t.visible ? n.dom.classList.remove("ProseMirror-hideselection") : (n.dom.classList.add("ProseMirror-hideselection"), "onselectionchange" in document && tp(n));
|
|
7563
7577
|
}
|
|
7564
7578
|
n.domObserver.setCurSelection(), n.domObserver.connectSelection();
|
|
7565
7579
|
}
|
|
@@ -7582,7 +7596,7 @@ function Ji(n) {
|
|
|
7582
7596
|
function Rl(n) {
|
|
7583
7597
|
n.contentEditable = "false", n.wasDraggable && (n.draggable = !0, n.wasDraggable = null);
|
|
7584
7598
|
}
|
|
7585
|
-
function
|
|
7599
|
+
function tp(n) {
|
|
7586
7600
|
let e = n.dom.ownerDocument;
|
|
7587
7601
|
e.removeEventListener("selectionchange", n.input.hideSelectionGuard);
|
|
7588
7602
|
let t = n.domSelectionRange(), r = t.anchorNode, i = t.anchorOffset;
|
|
@@ -7592,7 +7606,7 @@ function Qh(n) {
|
|
|
7592
7606
|
}, 20));
|
|
7593
7607
|
});
|
|
7594
7608
|
}
|
|
7595
|
-
function
|
|
7609
|
+
function np(n) {
|
|
7596
7610
|
let e = n.domSelection(), t = document.createRange();
|
|
7597
7611
|
if (!e)
|
|
7598
7612
|
return;
|
|
@@ -7625,7 +7639,7 @@ function jc(n) {
|
|
|
7625
7639
|
return !1;
|
|
7626
7640
|
}
|
|
7627
7641
|
}
|
|
7628
|
-
function
|
|
7642
|
+
function rp(n) {
|
|
7629
7643
|
let e = n.docView.domFromPos(n.state.selection.anchor, 0), t = n.domSelectionRange();
|
|
7630
7644
|
return Gt(e.node, e.offset, t.anchorNode, t.anchorOffset);
|
|
7631
7645
|
}
|
|
@@ -7674,9 +7688,9 @@ function In(n, e) {
|
|
|
7674
7688
|
return t && t.size == 0 && (e < 0 || n.nextSibling || n.nodeName != "BR");
|
|
7675
7689
|
}
|
|
7676
7690
|
function rn(n, e) {
|
|
7677
|
-
return e < 0 ?
|
|
7691
|
+
return e < 0 ? ip(n) : sp(n);
|
|
7678
7692
|
}
|
|
7679
|
-
function
|
|
7693
|
+
function ip(n) {
|
|
7680
7694
|
let e = n.domSelectionRange(), t = e.focusNode, r = e.focusOffset;
|
|
7681
7695
|
if (!t)
|
|
7682
7696
|
return;
|
|
@@ -7712,7 +7726,7 @@ function tp(n) {
|
|
|
7712
7726
|
}
|
|
7713
7727
|
o ? Ds(n, t, r) : i && Ds(n, i, s);
|
|
7714
7728
|
}
|
|
7715
|
-
function
|
|
7729
|
+
function sp(n) {
|
|
7716
7730
|
let e = n.domSelectionRange(), t = e.focusNode, r = e.focusOffset;
|
|
7717
7731
|
if (!t)
|
|
7718
7732
|
return;
|
|
@@ -7748,7 +7762,7 @@ function _c(n) {
|
|
|
7748
7762
|
let e = n.pmViewDesc;
|
|
7749
7763
|
return e && e.node && e.node.isBlock;
|
|
7750
7764
|
}
|
|
7751
|
-
function
|
|
7765
|
+
function op(n, e) {
|
|
7752
7766
|
for (; n && e == n.childNodes.length && !ir(n); )
|
|
7753
7767
|
e = fe(n) + 1, n = n.parentNode;
|
|
7754
7768
|
for (; n && e < n.childNodes.length; ) {
|
|
@@ -7760,7 +7774,7 @@ function rp(n, e) {
|
|
|
7760
7774
|
n = t, e = 0;
|
|
7761
7775
|
}
|
|
7762
7776
|
}
|
|
7763
|
-
function
|
|
7777
|
+
function lp(n, e) {
|
|
7764
7778
|
for (; n && !e && !ir(n); )
|
|
7765
7779
|
e = fe(n), n = n.parentNode;
|
|
7766
7780
|
for (; n && e; ) {
|
|
@@ -7775,7 +7789,7 @@ function ip(n, e) {
|
|
|
7775
7789
|
function Ds(n, e, t) {
|
|
7776
7790
|
if (e.nodeType != 3) {
|
|
7777
7791
|
let s, o;
|
|
7778
|
-
(o =
|
|
7792
|
+
(o = op(e, t)) ? (e = o, t = 0) : (s = lp(e, t)) && (e = s, t = s.nodeValue.length);
|
|
7779
7793
|
}
|
|
7780
7794
|
let r = n.domSelection();
|
|
7781
7795
|
if (!r)
|
|
@@ -7792,7 +7806,7 @@ function Ds(n, e, t) {
|
|
|
7792
7806
|
}
|
|
7793
7807
|
function Fl(n, e) {
|
|
7794
7808
|
let t = n.state.doc.resolve(e);
|
|
7795
|
-
if (!(be ||
|
|
7809
|
+
if (!(be || Ah) && t.parent.inlineContent) {
|
|
7796
7810
|
let i = n.coordsAtPos(e);
|
|
7797
7811
|
if (e > t.start()) {
|
|
7798
7812
|
let s = n.coordsAtPos(e - 1), o = (s.top + s.bottom) / 2;
|
|
@@ -7843,7 +7857,7 @@ function $l(n, e) {
|
|
|
7843
7857
|
function Hl(n, e, t) {
|
|
7844
7858
|
n.domObserver.stop(), e.contentEditable = t, n.domObserver.start();
|
|
7845
7859
|
}
|
|
7846
|
-
function
|
|
7860
|
+
function ap(n) {
|
|
7847
7861
|
if (!xe || n.state.selection.$head.parentOffset > 0)
|
|
7848
7862
|
return !1;
|
|
7849
7863
|
let { focusNode: e, focusOffset: t } = n.domSelectionRange();
|
|
@@ -7853,12 +7867,12 @@ function sp(n) {
|
|
|
7853
7867
|
}
|
|
7854
7868
|
return !1;
|
|
7855
7869
|
}
|
|
7856
|
-
function
|
|
7870
|
+
function cp(n) {
|
|
7857
7871
|
let e = "";
|
|
7858
7872
|
return n.ctrlKey && (e += "c"), n.metaKey && (e += "m"), n.altKey && (e += "a"), n.shiftKey && (e += "s"), e;
|
|
7859
7873
|
}
|
|
7860
|
-
function
|
|
7861
|
-
let t = e.keyCode, r =
|
|
7874
|
+
function up(n, e) {
|
|
7875
|
+
let t = e.keyCode, r = cp(e);
|
|
7862
7876
|
if (t == 8 || Pe && t == 72 && r == "c")
|
|
7863
7877
|
return $l(n, -1) || rn(n, -1);
|
|
7864
7878
|
if (t == 46 && !e.shiftKey || Pe && t == 68 && r == "c")
|
|
@@ -7875,7 +7889,7 @@ function lp(n, e) {
|
|
|
7875
7889
|
if (t == 38 || Pe && t == 80 && r == "c")
|
|
7876
7890
|
return zl(n, -1, r) || rn(n, -1);
|
|
7877
7891
|
if (t == 40 || Pe && t == 78 && r == "c")
|
|
7878
|
-
return
|
|
7892
|
+
return ap(n) || zl(n, 1, r) || rn(n, 1);
|
|
7879
7893
|
if (r == (Pe ? "m" : "c") && (t == 66 || t == 73 || t == 89 || t == 90))
|
|
7880
7894
|
return !0;
|
|
7881
7895
|
}
|
|
@@ -7933,7 +7947,7 @@ function Wc(n, e, t, r, i) {
|
|
|
7933
7947
|
} else
|
|
7934
7948
|
n.someProp("transformPastedHTML", (d) => {
|
|
7935
7949
|
t = d(t, n);
|
|
7936
|
-
}), o =
|
|
7950
|
+
}), o = pp(t), sr && mp(o);
|
|
7937
7951
|
let c = o && o.querySelector("[data-pm-slice]"), u = c && /^(\d+) (\d+)(?: -(\d+))? (.*)/.exec(c.getAttribute("data-pm-slice") || "");
|
|
7938
7952
|
if (u && u[3])
|
|
7939
7953
|
for (let d = +u[3]; d > 0; d--) {
|
|
@@ -7948,11 +7962,11 @@ function Wc(n, e, t, r, i) {
|
|
|
7948
7962
|
preserveWhitespace: !!(a || u),
|
|
7949
7963
|
context: i,
|
|
7950
7964
|
ruleFromNode(f) {
|
|
7951
|
-
return f.nodeName == "BR" && !f.nextSibling && f.parentNode && !
|
|
7965
|
+
return f.nodeName == "BR" && !f.nextSibling && f.parentNode && !dp.test(f.parentNode.nodeName) ? { ignore: !0 } : null;
|
|
7952
7966
|
}
|
|
7953
7967
|
})), u)
|
|
7954
|
-
l =
|
|
7955
|
-
else if (l = E.maxOpen(
|
|
7968
|
+
l = gp(Vl(l, +u[1], +u[2]), u[4]);
|
|
7969
|
+
else if (l = E.maxOpen(fp(l.content, i), !0), l.openStart || l.openEnd) {
|
|
7956
7970
|
let d = 0, f = 0;
|
|
7957
7971
|
for (let h = l.content.firstChild; d < l.openStart && !h.type.spec.isolating; d++, h = h.firstChild)
|
|
7958
7972
|
;
|
|
@@ -7964,8 +7978,8 @@ function Wc(n, e, t, r, i) {
|
|
|
7964
7978
|
l = d(l, n);
|
|
7965
7979
|
}), l;
|
|
7966
7980
|
}
|
|
7967
|
-
const
|
|
7968
|
-
function
|
|
7981
|
+
const dp = /^(a|abbr|acronym|b|cite|code|del|em|i|ins|kbd|label|output|q|ruby|s|samp|span|strong|sub|sup|time|u|tt|var)$/i;
|
|
7982
|
+
function fp(n, e) {
|
|
7969
7983
|
if (n.childCount < 2)
|
|
7970
7984
|
return n;
|
|
7971
7985
|
for (let t = e.depth; t >= 0; t--) {
|
|
@@ -8031,27 +8045,27 @@ function Gc() {
|
|
|
8031
8045
|
return jl || (jl = document.implementation.createHTMLDocument("title"));
|
|
8032
8046
|
}
|
|
8033
8047
|
let Gi = null;
|
|
8034
|
-
function
|
|
8048
|
+
function hp(n) {
|
|
8035
8049
|
let e = window.trustedTypes;
|
|
8036
8050
|
return e ? (Gi || (Gi = e.defaultPolicy || e.createPolicy("ProseMirrorClipboard", { createHTML: (t) => t })), Gi.createHTML(n)) : n;
|
|
8037
8051
|
}
|
|
8038
|
-
function
|
|
8052
|
+
function pp(n) {
|
|
8039
8053
|
let e = /^(\s*<meta [^>]*>)*/.exec(n);
|
|
8040
8054
|
e && (n = n.slice(e[0].length));
|
|
8041
8055
|
let t = Gc().createElement("div"), r = /<([a-z][^>\s]+)/i.exec(n), i;
|
|
8042
|
-
if ((i = r && Jc[r[1].toLowerCase()]) && (n = i.map((s) => "<" + s + ">").join("") + n + i.map((s) => "</" + s + ">").reverse().join("")), t.innerHTML =
|
|
8056
|
+
if ((i = r && Jc[r[1].toLowerCase()]) && (n = i.map((s) => "<" + s + ">").join("") + n + i.map((s) => "</" + s + ">").reverse().join("")), t.innerHTML = hp(n), i)
|
|
8043
8057
|
for (let s = 0; s < i.length; s++)
|
|
8044
8058
|
t = t.querySelector(i[s]) || t;
|
|
8045
8059
|
return t;
|
|
8046
8060
|
}
|
|
8047
|
-
function
|
|
8061
|
+
function mp(n) {
|
|
8048
8062
|
let e = n.querySelectorAll(be ? "span:not([class]):not([style])" : "span.Apple-converted-space");
|
|
8049
8063
|
for (let t = 0; t < e.length; t++) {
|
|
8050
8064
|
let r = e[t];
|
|
8051
8065
|
r.childNodes.length == 1 && r.textContent == " " && r.parentNode && r.parentNode.replaceChild(n.ownerDocument.createTextNode(" "), r);
|
|
8052
8066
|
}
|
|
8053
8067
|
}
|
|
8054
|
-
function
|
|
8068
|
+
function gp(n, e) {
|
|
8055
8069
|
if (!n.size)
|
|
8056
8070
|
return n;
|
|
8057
8071
|
let t = n.content.firstChild.type.schema, r;
|
|
@@ -8069,25 +8083,25 @@ function hp(n, e) {
|
|
|
8069
8083
|
}
|
|
8070
8084
|
return new E(i, s, o);
|
|
8071
8085
|
}
|
|
8072
|
-
const we = {}, Se = {},
|
|
8073
|
-
class
|
|
8086
|
+
const we = {}, Se = {}, yp = { touchstart: !0, touchmove: !0 };
|
|
8087
|
+
class bp {
|
|
8074
8088
|
constructor() {
|
|
8075
8089
|
this.shiftKey = !1, this.mouseDown = null, this.lastKeyCode = null, this.lastKeyCodeTime = 0, this.lastClick = { time: 0, x: 0, y: 0, type: "", button: 0 }, this.lastSelectionOrigin = null, this.lastSelectionTime = 0, this.lastIOSEnter = 0, this.lastIOSEnterFallbackTimeout = -1, this.lastFocus = 0, this.lastTouch = 0, this.lastChromeDelete = 0, this.composing = !1, this.compositionNode = null, this.composingTimeout = -1, this.compositionNodes = [], this.compositionEndedAt = -2e8, this.compositionID = 1, this.compositionPendingChanges = 0, this.domChangeCount = 0, this.eventHandlers = /* @__PURE__ */ Object.create(null), this.hideSelectionGuard = null;
|
|
8076
8090
|
}
|
|
8077
8091
|
}
|
|
8078
|
-
function
|
|
8092
|
+
function kp(n) {
|
|
8079
8093
|
for (let e in we) {
|
|
8080
8094
|
let t = we[e];
|
|
8081
8095
|
n.dom.addEventListener(e, n.input.eventHandlers[e] = (r) => {
|
|
8082
|
-
|
|
8083
|
-
},
|
|
8096
|
+
xp(n, r) && !so(n, r) && (n.editable || !(r.type in Se)) && t(n, r);
|
|
8097
|
+
}, yp[e] ? { passive: !0 } : void 0);
|
|
8084
8098
|
}
|
|
8085
8099
|
xe && n.dom.addEventListener("input", () => null), Ls(n);
|
|
8086
8100
|
}
|
|
8087
8101
|
function xt(n, e) {
|
|
8088
8102
|
n.input.lastSelectionOrigin = e, n.input.lastSelectionTime = Date.now();
|
|
8089
8103
|
}
|
|
8090
|
-
function
|
|
8104
|
+
function vp(n) {
|
|
8091
8105
|
n.domObserver.stop();
|
|
8092
8106
|
for (let e in n.input.eventHandlers)
|
|
8093
8107
|
n.dom.removeEventListener(e, n.input.eventHandlers[e]);
|
|
@@ -8105,7 +8119,7 @@ function so(n, e) {
|
|
|
8105
8119
|
return r ? r(n, e) || e.defaultPrevented : !1;
|
|
8106
8120
|
});
|
|
8107
8121
|
}
|
|
8108
|
-
function
|
|
8122
|
+
function xp(n, e) {
|
|
8109
8123
|
if (!e.bubbles)
|
|
8110
8124
|
return !0;
|
|
8111
8125
|
if (e.defaultPrevented)
|
|
@@ -8115,7 +8129,7 @@ function bp(n, e) {
|
|
|
8115
8129
|
return !1;
|
|
8116
8130
|
return !0;
|
|
8117
8131
|
}
|
|
8118
|
-
function
|
|
8132
|
+
function wp(n, e) {
|
|
8119
8133
|
!so(n, e) && we[e.type] && (n.editable || !(e.type in Se)) && we[e.type](n, e);
|
|
8120
8134
|
}
|
|
8121
8135
|
Se.keydown = (n, e) => {
|
|
@@ -8126,7 +8140,7 @@ Se.keydown = (n, e) => {
|
|
|
8126
8140
|
n.input.lastIOSEnter = r, n.input.lastIOSEnterFallbackTimeout = setTimeout(() => {
|
|
8127
8141
|
n.input.lastIOSEnter == r && (n.someProp("handleKeyDown", (i) => i(n, Lt(13, "Enter"))), n.input.lastIOSEnter = 0);
|
|
8128
8142
|
}, 200);
|
|
8129
|
-
} else n.someProp("handleKeyDown", (r) => r(n, t)) ||
|
|
8143
|
+
} else n.someProp("handleKeyDown", (r) => r(n, t)) || up(n, t) ? t.preventDefault() : xt(n, "key");
|
|
8130
8144
|
};
|
|
8131
8145
|
Se.keyup = (n, e) => {
|
|
8132
8146
|
e.keyCode == 16 && (n.input.shiftKey = !1);
|
|
@@ -8148,7 +8162,7 @@ Se.keypress = (n, e) => {
|
|
|
8148
8162
|
function Ci(n) {
|
|
8149
8163
|
return { left: n.clientX, top: n.clientY };
|
|
8150
8164
|
}
|
|
8151
|
-
function
|
|
8165
|
+
function Sp(n, e) {
|
|
8152
8166
|
let t = e.x - n.clientX, r = e.y - n.clientY;
|
|
8153
8167
|
return t * t + r * r < 100;
|
|
8154
8168
|
}
|
|
@@ -8167,13 +8181,13 @@ function hn(n, e, t) {
|
|
|
8167
8181
|
let r = n.state.tr.setSelection(e);
|
|
8168
8182
|
r.setMeta("pointer", !0), n.dispatch(r);
|
|
8169
8183
|
}
|
|
8170
|
-
function
|
|
8184
|
+
function Cp(n, e) {
|
|
8171
8185
|
if (e == -1)
|
|
8172
8186
|
return !1;
|
|
8173
8187
|
let t = n.state.doc.resolve(e), r = t.nodeAfter;
|
|
8174
8188
|
return r && r.isAtom && I.isSelectable(r) ? (hn(n, new I(t)), !0) : !1;
|
|
8175
8189
|
}
|
|
8176
|
-
function
|
|
8190
|
+
function Mp(n, e) {
|
|
8177
8191
|
if (e == -1)
|
|
8178
8192
|
return !1;
|
|
8179
8193
|
let t = n.state.selection, r, i;
|
|
@@ -8188,16 +8202,16 @@ function wp(n, e) {
|
|
|
8188
8202
|
}
|
|
8189
8203
|
return i != null ? (hn(n, I.create(n.state.doc, i)), !0) : !1;
|
|
8190
8204
|
}
|
|
8191
|
-
function
|
|
8192
|
-
return oo(n, "handleClickOn", e, t, r) || n.someProp("handleClick", (s) => s(n, e, r)) || (i ?
|
|
8205
|
+
function Tp(n, e, t, r, i) {
|
|
8206
|
+
return oo(n, "handleClickOn", e, t, r) || n.someProp("handleClick", (s) => s(n, e, r)) || (i ? Mp(n, t) : Cp(n, t));
|
|
8193
8207
|
}
|
|
8194
|
-
function
|
|
8208
|
+
function Ep(n, e, t, r) {
|
|
8195
8209
|
return oo(n, "handleDoubleClickOn", e, t, r) || n.someProp("handleDoubleClick", (i) => i(n, e, r));
|
|
8196
8210
|
}
|
|
8197
|
-
function
|
|
8198
|
-
return oo(n, "handleTripleClickOn", e, t, r) || n.someProp("handleTripleClick", (i) => i(n, e, r)) ||
|
|
8211
|
+
function Op(n, e, t, r) {
|
|
8212
|
+
return oo(n, "handleTripleClickOn", e, t, r) || n.someProp("handleTripleClick", (i) => i(n, e, r)) || Ap(n, t, r);
|
|
8199
8213
|
}
|
|
8200
|
-
function
|
|
8214
|
+
function Ap(n, e, t) {
|
|
8201
8215
|
if (t.button != 0)
|
|
8202
8216
|
return !1;
|
|
8203
8217
|
let r = n.state.doc;
|
|
@@ -8223,11 +8237,11 @@ we.mousedown = (n, e) => {
|
|
|
8223
8237
|
let t = e;
|
|
8224
8238
|
n.input.shiftKey = t.shiftKey;
|
|
8225
8239
|
let r = lo(n), i = Date.now(), s = "singleClick";
|
|
8226
|
-
i - n.input.lastClick.time < 500 &&
|
|
8240
|
+
i - n.input.lastClick.time < 500 && Sp(t, n.input.lastClick) && !t[Yc] && n.input.lastClick.button == t.button && (n.input.lastClick.type == "singleClick" ? s = "doubleClick" : n.input.lastClick.type == "doubleClick" && (s = "tripleClick")), n.input.lastClick = { time: i, x: t.clientX, y: t.clientY, type: s, button: t.button };
|
|
8227
8241
|
let o = n.posAtCoords(Ci(t));
|
|
8228
|
-
o && (s == "singleClick" ? (n.input.mouseDown && n.input.mouseDown.done(), n.input.mouseDown = new
|
|
8242
|
+
o && (s == "singleClick" ? (n.input.mouseDown && n.input.mouseDown.done(), n.input.mouseDown = new Np(n, o, t, !!r)) : (s == "doubleClick" ? Ep : Op)(n, o.pos, o.inside, t) ? t.preventDefault() : xt(n, "pointer"));
|
|
8229
8243
|
};
|
|
8230
|
-
class
|
|
8244
|
+
class Np {
|
|
8231
8245
|
constructor(e, t, r, i) {
|
|
8232
8246
|
this.view = e, this.pos = t, this.event = r, this.flushed = i, this.delayedSelectionSync = !1, this.mightDrag = null, this.startDoc = e.state.doc, this.selectNode = !!r[Yc], this.allowDefault = r.shiftKey;
|
|
8233
8247
|
let s, o;
|
|
@@ -8256,7 +8270,7 @@ class Ep {
|
|
|
8256
8270
|
if (this.done(), !this.view.dom.contains(e.target))
|
|
8257
8271
|
return;
|
|
8258
8272
|
let t = this.pos;
|
|
8259
|
-
this.view.state.doc != this.startDoc && (t = this.view.posAtCoords(Ci(e))), this.updateAllowDefault(e), this.allowDefault || !t ? xt(this.view, "pointer") :
|
|
8273
|
+
this.view.state.doc != this.startDoc && (t = this.view.posAtCoords(Ci(e))), this.updateAllowDefault(e), this.allowDefault || !t ? xt(this.view, "pointer") : Tp(this.view, t.pos, t.inside, e, this.selectNode) ? e.preventDefault() : e.button == 0 && (this.flushed || // Safari ignores clicks on draggable elements
|
|
8260
8274
|
xe && this.mightDrag && !this.mightDrag.node.isAtom || // Chrome will sometimes treat a node selection as a
|
|
8261
8275
|
// cursor, but still report that the node is selected
|
|
8262
8276
|
// when asked through getSelection. You'll then get a
|
|
@@ -8283,7 +8297,7 @@ we.contextmenu = (n) => lo(n);
|
|
|
8283
8297
|
function Xc(n, e) {
|
|
8284
8298
|
return n.composing ? !0 : xe && Math.abs(e.timeStamp - n.input.compositionEndedAt) < 500 ? (n.input.compositionEndedAt = -2e8, !0) : !1;
|
|
8285
8299
|
}
|
|
8286
|
-
const
|
|
8300
|
+
const Ip = at ? 5e3 : -1;
|
|
8287
8301
|
Se.compositionstart = Se.compositionupdate = (n) => {
|
|
8288
8302
|
if (!n.composing) {
|
|
8289
8303
|
n.domObserver.flush();
|
|
@@ -8306,7 +8320,7 @@ Se.compositionstart = Se.compositionupdate = (n) => {
|
|
|
8306
8320
|
}
|
|
8307
8321
|
n.input.composing = !0;
|
|
8308
8322
|
}
|
|
8309
|
-
Qc(n,
|
|
8323
|
+
Qc(n, Ip);
|
|
8310
8324
|
};
|
|
8311
8325
|
Se.compositionend = (n, e) => {
|
|
8312
8326
|
n.composing && (n.input.composing = !1, n.input.compositionEndedAt = e.timeStamp, n.input.compositionPendingChanges = n.domObserver.pendingRecords().length ? n.input.compositionID : 0, n.input.compositionNode = null, n.input.compositionPendingChanges && Promise.resolve().then(() => n.domObserver.flush()), n.input.compositionID++, Qc(n, 20));
|
|
@@ -8315,14 +8329,14 @@ function Qc(n, e) {
|
|
|
8315
8329
|
clearTimeout(n.input.composingTimeout), e > -1 && (n.input.composingTimeout = setTimeout(() => Br(n), e));
|
|
8316
8330
|
}
|
|
8317
8331
|
function Zc(n) {
|
|
8318
|
-
for (n.composing && (n.input.composing = !1, n.input.compositionEndedAt =
|
|
8332
|
+
for (n.composing && (n.input.composing = !1, n.input.compositionEndedAt = Rp()); n.input.compositionNodes.length > 0; )
|
|
8319
8333
|
n.input.compositionNodes.pop().markParentsDirty();
|
|
8320
8334
|
}
|
|
8321
|
-
function
|
|
8335
|
+
function Dp(n) {
|
|
8322
8336
|
let e = n.domSelectionRange();
|
|
8323
8337
|
if (!e.focusNode)
|
|
8324
8338
|
return null;
|
|
8325
|
-
let t =
|
|
8339
|
+
let t = Ch(e.focusNode, e.focusOffset), r = Mh(e.focusNode, e.focusOffset);
|
|
8326
8340
|
if (t && r && t != r) {
|
|
8327
8341
|
let i = r.pmViewDesc, s = n.domObserver.lastChangedTextNode;
|
|
8328
8342
|
if (t == s || r == s)
|
|
@@ -8337,7 +8351,7 @@ function Ap(n) {
|
|
|
8337
8351
|
}
|
|
8338
8352
|
return t || r;
|
|
8339
8353
|
}
|
|
8340
|
-
function
|
|
8354
|
+
function Rp() {
|
|
8341
8355
|
let n = document.createEvent("Event");
|
|
8342
8356
|
return n.initEvent("event", !0, !0), n.timeStamp;
|
|
8343
8357
|
}
|
|
@@ -8350,7 +8364,7 @@ function Br(n, e = !1) {
|
|
|
8350
8364
|
return !1;
|
|
8351
8365
|
}
|
|
8352
8366
|
}
|
|
8353
|
-
function
|
|
8367
|
+
function Lp(n, e) {
|
|
8354
8368
|
if (!n.dom.parentNode)
|
|
8355
8369
|
return;
|
|
8356
8370
|
let t = n.dom.parentNode.appendChild(document.createElement("div"));
|
|
@@ -8360,18 +8374,18 @@ function Ip(n, e) {
|
|
|
8360
8374
|
t.parentNode && t.parentNode.removeChild(t), n.focus();
|
|
8361
8375
|
}, 50);
|
|
8362
8376
|
}
|
|
8363
|
-
const Wn = Me && Ct < 15 || gn &&
|
|
8377
|
+
const Wn = Me && Ct < 15 || gn && Nh < 604;
|
|
8364
8378
|
we.copy = Se.cut = (n, e) => {
|
|
8365
8379
|
let t = e, r = n.state.selection, i = t.type == "cut";
|
|
8366
8380
|
if (r.empty)
|
|
8367
8381
|
return;
|
|
8368
8382
|
let s = Wn ? null : t.clipboardData, o = r.content(), { dom: l, text: a } = io(n, o);
|
|
8369
|
-
s ? (t.preventDefault(), s.clearData(), s.setData("text/html", l.innerHTML), s.setData("text/plain", a)) :
|
|
8383
|
+
s ? (t.preventDefault(), s.clearData(), s.setData("text/html", l.innerHTML), s.setData("text/plain", a)) : Lp(n, l), i && n.dispatch(n.state.tr.deleteSelection().scrollIntoView().setMeta("uiEvent", "cut"));
|
|
8370
8384
|
};
|
|
8371
|
-
function
|
|
8385
|
+
function Pp(n) {
|
|
8372
8386
|
return n.openStart == 0 && n.openEnd == 0 && n.content.childCount == 1 ? n.content.firstChild : null;
|
|
8373
8387
|
}
|
|
8374
|
-
function
|
|
8388
|
+
function Bp(n, e) {
|
|
8375
8389
|
if (!n.dom.parentNode)
|
|
8376
8390
|
return;
|
|
8377
8391
|
let t = n.input.shiftKey || n.state.selection.$from.parent.type.spec.code, r = n.dom.parentNode.appendChild(document.createElement(t ? "textarea" : "div"));
|
|
@@ -8387,7 +8401,7 @@ function Kn(n, e, t, r, i) {
|
|
|
8387
8401
|
return !0;
|
|
8388
8402
|
if (!s)
|
|
8389
8403
|
return !1;
|
|
8390
|
-
let o =
|
|
8404
|
+
let o = Pp(s), l = o ? n.state.tr.replaceSelectionWith(o, r) : n.state.tr.replaceSelection(s);
|
|
8391
8405
|
return n.dispatch(l.scrollIntoView().setMeta("paste", !0).setMeta("uiEvent", "paste")), !0;
|
|
8392
8406
|
}
|
|
8393
8407
|
function eu(n) {
|
|
@@ -8402,17 +8416,17 @@ Se.paste = (n, e) => {
|
|
|
8402
8416
|
if (n.composing && !at)
|
|
8403
8417
|
return;
|
|
8404
8418
|
let r = Wn ? null : t.clipboardData, i = n.input.shiftKey && n.input.lastKeyCode != 45;
|
|
8405
|
-
r && Kn(n, eu(r), r.getData("text/html"), i, t) ? t.preventDefault() :
|
|
8419
|
+
r && Kn(n, eu(r), r.getData("text/html"), i, t) ? t.preventDefault() : Bp(n, t);
|
|
8406
8420
|
};
|
|
8407
8421
|
class tu {
|
|
8408
8422
|
constructor(e, t, r) {
|
|
8409
8423
|
this.slice = e, this.move = t, this.node = r;
|
|
8410
8424
|
}
|
|
8411
8425
|
}
|
|
8412
|
-
const
|
|
8426
|
+
const Fp = Pe ? "altKey" : "ctrlKey";
|
|
8413
8427
|
function nu(n, e) {
|
|
8414
8428
|
let t = n.someProp("dragCopies", (r) => !r(e));
|
|
8415
|
-
return t ?? !e[
|
|
8429
|
+
return t ?? !e[Fp];
|
|
8416
8430
|
}
|
|
8417
8431
|
we.dragstart = (n, e) => {
|
|
8418
8432
|
let t = e, r = n.input.mouseDown;
|
|
@@ -8694,7 +8708,7 @@ class ne {
|
|
|
8694
8708
|
let a = this.local[l].map(e, r, i);
|
|
8695
8709
|
a && a.type.valid(t, a) ? (o || (o = [])).push(a) : s.onRemove && s.onRemove(this.local[l].spec);
|
|
8696
8710
|
}
|
|
8697
|
-
return this.children.length ?
|
|
8711
|
+
return this.children.length ? zp(this.children, o || [], e, t, r, i, s) : o ? new ne(o.sort(_t), ln) : ge;
|
|
8698
8712
|
}
|
|
8699
8713
|
/**
|
|
8700
8714
|
Add the given array of decorations to the ones in the set,
|
|
@@ -8872,7 +8886,7 @@ class yt {
|
|
|
8872
8886
|
this.members[t].forEachSet(e);
|
|
8873
8887
|
}
|
|
8874
8888
|
}
|
|
8875
|
-
function
|
|
8889
|
+
function zp(n, e, t, r, i, s, o) {
|
|
8876
8890
|
let l = n.slice();
|
|
8877
8891
|
for (let c = 0, u = s; c < t.maps.length; c++) {
|
|
8878
8892
|
let d = 0;
|
|
@@ -8908,7 +8922,7 @@ function Pp(n, e, t, r, i, s, o) {
|
|
|
8908
8922
|
a = !0;
|
|
8909
8923
|
}
|
|
8910
8924
|
if (a) {
|
|
8911
|
-
let c =
|
|
8925
|
+
let c = $p(l, n, e, t, i, s, o), u = zr(c, r, 0, o);
|
|
8912
8926
|
e = u.local;
|
|
8913
8927
|
for (let d = 0; d < l.length; d += 3)
|
|
8914
8928
|
l[d + 1] < 0 && (l.splice(d, 3), d -= 3);
|
|
@@ -8931,7 +8945,7 @@ function ru(n, e) {
|
|
|
8931
8945
|
}
|
|
8932
8946
|
return t;
|
|
8933
8947
|
}
|
|
8934
|
-
function
|
|
8948
|
+
function $p(n, e, t, r, i, s, o) {
|
|
8935
8949
|
function l(a, c) {
|
|
8936
8950
|
for (let u = 0; u < a.local.length; u++) {
|
|
8937
8951
|
let d = a.local[u].map(r, i, c);
|
|
@@ -9006,15 +9020,15 @@ function Yi(n) {
|
|
|
9006
9020
|
r && r != ge && e.push(r);
|
|
9007
9021
|
}), n.cursorWrapper && e.push(ne.create(n.state.doc, [n.cursorWrapper.deco])), yt.from(e);
|
|
9008
9022
|
}
|
|
9009
|
-
const
|
|
9023
|
+
const Hp = {
|
|
9010
9024
|
childList: !0,
|
|
9011
9025
|
characterData: !0,
|
|
9012
9026
|
characterDataOldValue: !0,
|
|
9013
9027
|
attributes: !0,
|
|
9014
9028
|
attributeOldValue: !0,
|
|
9015
9029
|
subtree: !0
|
|
9016
|
-
},
|
|
9017
|
-
class
|
|
9030
|
+
}, Vp = Me && Ct <= 11;
|
|
9031
|
+
class jp {
|
|
9018
9032
|
constructor() {
|
|
9019
9033
|
this.anchorNode = null, this.anchorOffset = 0, this.focusNode = null, this.focusOffset = 0;
|
|
9020
9034
|
}
|
|
@@ -9028,13 +9042,13 @@ class $p {
|
|
|
9028
9042
|
return e.anchorNode == this.anchorNode && e.anchorOffset == this.anchorOffset && e.focusNode == this.focusNode && e.focusOffset == this.focusOffset;
|
|
9029
9043
|
}
|
|
9030
9044
|
}
|
|
9031
|
-
class
|
|
9045
|
+
class _p {
|
|
9032
9046
|
constructor(e, t) {
|
|
9033
|
-
this.view = e, this.handleDOMChange = t, this.queue = [], this.flushingSoon = -1, this.observer = null, this.currentSelection = new
|
|
9047
|
+
this.view = e, this.handleDOMChange = t, this.queue = [], this.flushingSoon = -1, this.observer = null, this.currentSelection = new jp(), this.onCharData = null, this.suppressingSelectionUpdates = !1, this.lastChangedTextNode = null, this.observer = window.MutationObserver && new window.MutationObserver((r) => {
|
|
9034
9048
|
for (let i = 0; i < r.length; i++)
|
|
9035
9049
|
this.queue.push(r[i]);
|
|
9036
9050
|
Me && Ct <= 11 && r.some((i) => i.type == "childList" && i.removedNodes.length || i.type == "characterData" && i.oldValue.length > i.target.nodeValue.length) ? this.flushSoon() : this.flush();
|
|
9037
|
-
}),
|
|
9051
|
+
}), Vp && (this.onCharData = (r) => {
|
|
9038
9052
|
this.queue.push({ target: r.target, type: "characterData", oldValue: r.prevValue }), this.flushSoon();
|
|
9039
9053
|
}), this.onSelectionChange = this.onSelectionChange.bind(this);
|
|
9040
9054
|
}
|
|
@@ -9047,7 +9061,7 @@ class Hp {
|
|
|
9047
9061
|
this.flushingSoon > -1 && (window.clearTimeout(this.flushingSoon), this.flushingSoon = -1, this.flush());
|
|
9048
9062
|
}
|
|
9049
9063
|
start() {
|
|
9050
|
-
this.observer && (this.observer.takeRecords(), this.observer.observe(this.view.dom,
|
|
9064
|
+
this.observer && (this.observer.takeRecords(), this.observer.observe(this.view.dom, Hp)), this.onCharData && this.view.dom.addEventListener("DOMCharacterDataModified", this.onCharData), this.connectSelection();
|
|
9051
9065
|
}
|
|
9052
9066
|
stop() {
|
|
9053
9067
|
if (this.observer) {
|
|
@@ -9130,12 +9144,12 @@ class Hp {
|
|
|
9130
9144
|
let { focusNode: d } = this.currentSelection;
|
|
9131
9145
|
for (let f of u) {
|
|
9132
9146
|
let h = f.parentNode;
|
|
9133
|
-
h && h.nodeName == "LI" && (!d ||
|
|
9147
|
+
h && h.nodeName == "LI" && (!d || Up(e, d) != h) && f.remove();
|
|
9134
9148
|
}
|
|
9135
9149
|
}
|
|
9136
9150
|
}
|
|
9137
9151
|
let c = null;
|
|
9138
|
-
s < 0 && i && e.input.lastFocus > Date.now() - 200 && Math.max(e.input.lastTouch, e.input.lastClick.time) < Date.now() - 300 && wi(r) && (c = no(e)) && c.eq(B.near(e.state.doc.resolve(0), 1)) ? (e.input.lastFocus = 0, dt(e), this.currentSelection.set(r), e.scrollToSelection()) : (s > -1 || i) && (s > -1 && (e.docView.markDirty(s, o),
|
|
9152
|
+
s < 0 && i && e.input.lastFocus > Date.now() - 200 && Math.max(e.input.lastTouch, e.input.lastClick.time) < Date.now() - 300 && wi(r) && (c = no(e)) && c.eq(B.near(e.state.doc.resolve(0), 1)) ? (e.input.lastFocus = 0, dt(e), this.currentSelection.set(r), e.scrollToSelection()) : (s > -1 || i) && (s > -1 && (e.docView.markDirty(s, o), Wp(e)), this.handleDOMChange(s, o, l, a), e.docView && e.docView.dirty ? e.updateState(e.state) : this.currentSelection.eq(r) || dt(e), this.currentSelection.set(r));
|
|
9139
9153
|
}
|
|
9140
9154
|
registerMutation(e, t) {
|
|
9141
9155
|
if (t.indexOf(e.target) > -1)
|
|
@@ -9171,7 +9185,7 @@ class Hp {
|
|
|
9171
9185
|
}
|
|
9172
9186
|
}
|
|
9173
9187
|
let Wl = /* @__PURE__ */ new WeakMap(), Kl = !1;
|
|
9174
|
-
function
|
|
9188
|
+
function Wp(n) {
|
|
9175
9189
|
if (!Wl.has(n) && (Wl.set(n, null), ["normal", "nowrap", "pre-line"].indexOf(getComputedStyle(n.dom).whiteSpace) !== -1)) {
|
|
9176
9190
|
if (n.requiresGeckoHackNode = je, Kl)
|
|
9177
9191
|
return;
|
|
@@ -9182,7 +9196,7 @@ function Ul(n, e) {
|
|
|
9182
9196
|
let t = e.startContainer, r = e.startOffset, i = e.endContainer, s = e.endOffset, o = n.domAtPos(n.state.selection.anchor);
|
|
9183
9197
|
return Gt(o.node, o.offset, i, s) && ([t, r, i, s] = [i, s, t, r]), { anchorNode: t, anchorOffset: r, focusNode: i, focusOffset: s };
|
|
9184
9198
|
}
|
|
9185
|
-
function
|
|
9199
|
+
function Kp(n, e) {
|
|
9186
9200
|
if (e.getComposedRanges) {
|
|
9187
9201
|
let i = e.getComposedRanges(n.root)[0];
|
|
9188
9202
|
if (i)
|
|
@@ -9194,7 +9208,7 @@ function jp(n, e) {
|
|
|
9194
9208
|
}
|
|
9195
9209
|
return n.dom.addEventListener("beforeinput", r, !0), document.execCommand("indent"), n.dom.removeEventListener("beforeinput", r, !0), t ? Ul(n, t) : null;
|
|
9196
9210
|
}
|
|
9197
|
-
function
|
|
9211
|
+
function Up(n, e) {
|
|
9198
9212
|
for (let t = e.parentNode; t && t != n.dom; t = t.parentNode) {
|
|
9199
9213
|
let r = n.docView.nearestDesc(t, !0);
|
|
9200
9214
|
if (r && r.node.isBlock)
|
|
@@ -9202,7 +9216,7 @@ function _p(n, e) {
|
|
|
9202
9216
|
}
|
|
9203
9217
|
return null;
|
|
9204
9218
|
}
|
|
9205
|
-
function
|
|
9219
|
+
function qp(n, e, t) {
|
|
9206
9220
|
let { node: r, fromOffset: i, toOffset: s, from: o, to: l } = n.docView.parseRange(e, t), a = n.domSelectionRange(), c, u = a.anchorNode;
|
|
9207
9221
|
if (u && n.dom.contains(u.nodeType == 1 ? u : u.parentNode) && (c = [{ node: u, offset: a.anchorOffset }], wi(a) || c.push({ node: a.focusNode, offset: a.focusOffset })), be && n.input.lastKeyCode === 8)
|
|
9208
9222
|
for (let y = s; y > i; y--) {
|
|
@@ -9222,7 +9236,7 @@ function Wp(n, e, t) {
|
|
|
9222
9236
|
to: s,
|
|
9223
9237
|
preserveWhitespace: h.parent.type.whitespace == "pre" ? "full" : !0,
|
|
9224
9238
|
findPositions: c,
|
|
9225
|
-
ruleFromNode:
|
|
9239
|
+
ruleFromNode: Jp,
|
|
9226
9240
|
context: h
|
|
9227
9241
|
});
|
|
9228
9242
|
if (c && c[0].pos != null) {
|
|
@@ -9231,7 +9245,7 @@ function Wp(n, e, t) {
|
|
|
9231
9245
|
}
|
|
9232
9246
|
return { doc: m, sel: p, from: o, to: l };
|
|
9233
9247
|
}
|
|
9234
|
-
function
|
|
9248
|
+
function Jp(n) {
|
|
9235
9249
|
let e = n.pmViewDesc;
|
|
9236
9250
|
if (e)
|
|
9237
9251
|
return e.parseRule();
|
|
@@ -9245,8 +9259,8 @@ function Kp(n) {
|
|
|
9245
9259
|
return { ignore: !0 };
|
|
9246
9260
|
return null;
|
|
9247
9261
|
}
|
|
9248
|
-
const
|
|
9249
|
-
function
|
|
9262
|
+
const Gp = /^(a|abbr|acronym|b|bd[io]|big|br|button|cite|code|data(list)?|del|dfn|em|i|img|ins|kbd|label|map|mark|meter|output|q|ruby|s|samp|small|span|strong|su[bp]|time|u|tt|var)$/i;
|
|
9263
|
+
function Yp(n, e, t, r, i) {
|
|
9250
9264
|
let s = n.input.compositionPendingChanges || (n.composing ? n.input.compositionID : 0);
|
|
9251
9265
|
if (n.input.compositionPendingChanges = 0, e < 0) {
|
|
9252
9266
|
let T = n.input.lastSelectionTime > Date.now() - 50 ? n.input.lastSelectionOrigin : null, F = no(n, T);
|
|
@@ -9260,10 +9274,10 @@ function qp(n, e, t, r, i) {
|
|
|
9260
9274
|
}
|
|
9261
9275
|
let o = n.state.doc.resolve(e), l = o.sharedDepth(t);
|
|
9262
9276
|
e = o.before(l + 1), t = n.state.doc.resolve(t).after(l + 1);
|
|
9263
|
-
let a = n.state.selection, c =
|
|
9277
|
+
let a = n.state.selection, c = qp(n, e, t), u = n.state.doc, d = u.slice(c.from, c.to), f, h;
|
|
9264
9278
|
n.input.lastKeyCode === 8 && Date.now() - 100 < n.input.lastKeyCodeTime ? (f = n.state.selection.to, h = "end") : (f = n.state.selection.from, h = "start"), n.input.lastKeyCode = null;
|
|
9265
|
-
let p =
|
|
9266
|
-
if (p && n.input.domChangeCount++, (gn && n.input.lastIOSEnter > Date.now() - 225 || at) && i.some((T) => T.nodeType == 1 && !
|
|
9279
|
+
let p = Zp(d.content, c.doc.content, c.from, f, h);
|
|
9280
|
+
if (p && n.input.domChangeCount++, (gn && n.input.lastIOSEnter > Date.now() - 225 || at) && i.some((T) => T.nodeType == 1 && !Gp.test(T.nodeName)) && (!p || p.endA >= p.endB) && n.someProp("handleKeyDown", (T) => T(n, Lt(13, "Enter")))) {
|
|
9267
9281
|
n.input.lastIOSEnter = 0;
|
|
9268
9282
|
return;
|
|
9269
9283
|
}
|
|
@@ -9286,7 +9300,7 @@ function qp(n, e, t, r, i) {
|
|
|
9286
9300
|
n.input.lastIOSEnter = 0;
|
|
9287
9301
|
return;
|
|
9288
9302
|
}
|
|
9289
|
-
if (n.state.selection.anchor > p.start &&
|
|
9303
|
+
if (n.state.selection.anchor > p.start && Qp(u, p.start, p.endA, m, y) && n.someProp("handleKeyDown", (T) => T(n, Lt(8, "Backspace")))) {
|
|
9290
9304
|
at && be && n.domObserver.suppressSelectionUpdates();
|
|
9291
9305
|
return;
|
|
9292
9306
|
}
|
|
@@ -9310,7 +9324,7 @@ function qp(n, e, t, r, i) {
|
|
|
9310
9324
|
F && T.ensureMarks(F), n.dispatch(T);
|
|
9311
9325
|
} else if (
|
|
9312
9326
|
// Adding or removing a mark
|
|
9313
|
-
p.endA == p.endB && (P =
|
|
9327
|
+
p.endA == p.endB && (P = Xp(m.parent.content.cut(m.parentOffset, y.parentOffset), b.parent.content.cut(b.parentOffset, p.endA - b.start())))
|
|
9314
9328
|
) {
|
|
9315
9329
|
let T = v(n.state.tr);
|
|
9316
9330
|
P.type == "add" ? T.addMark(g, S, P.mark) : T.removeMark(g, S, P.mark), n.dispatch(T);
|
|
@@ -9324,7 +9338,7 @@ function qp(n, e, t, r, i) {
|
|
|
9324
9338
|
function ql(n, e, t) {
|
|
9325
9339
|
return Math.max(t.anchor, t.head) > e.content.size ? null : ro(n, e.resolve(t.anchor), e.resolve(t.head));
|
|
9326
9340
|
}
|
|
9327
|
-
function
|
|
9341
|
+
function Xp(n, e) {
|
|
9328
9342
|
let t = n.firstChild.marks, r = e.firstChild.marks, i = t, s = r, o, l, a;
|
|
9329
9343
|
for (let u = 0; u < r.length; u++)
|
|
9330
9344
|
i = r[u].removeFromSet(i);
|
|
@@ -9342,7 +9356,7 @@ function Jp(n, e) {
|
|
|
9342
9356
|
if (x.from(c).eq(n))
|
|
9343
9357
|
return { mark: l, type: o };
|
|
9344
9358
|
}
|
|
9345
|
-
function
|
|
9359
|
+
function Qp(n, e, t, r, i) {
|
|
9346
9360
|
if (
|
|
9347
9361
|
// The content must have shrunk
|
|
9348
9362
|
t - e <= i.pos - r.pos || // newEnd must point directly at or after the end of the block that newStart points into
|
|
@@ -9370,7 +9384,7 @@ function Xi(n, e, t) {
|
|
|
9370
9384
|
}
|
|
9371
9385
|
return i;
|
|
9372
9386
|
}
|
|
9373
|
-
function
|
|
9387
|
+
function Zp(n, e, t, r, i) {
|
|
9374
9388
|
let s = n.findDiffStart(e, t);
|
|
9375
9389
|
if (s == null)
|
|
9376
9390
|
return null;
|
|
@@ -9403,7 +9417,7 @@ class ou {
|
|
|
9403
9417
|
added to the document.
|
|
9404
9418
|
*/
|
|
9405
9419
|
constructor(e, t) {
|
|
9406
|
-
this._root = null, this.focused = !1, this.trackWrites = null, this.mounted = !1, this.markCursor = null, this.cursorWrapper = null, this.lastSelectedViewDesc = void 0, this.input = new
|
|
9420
|
+
this._root = null, this.focused = !1, this.trackWrites = null, this.mounted = !1, this.markCursor = null, this.cursorWrapper = null, this.lastSelectedViewDesc = void 0, this.input = new bp(), this.prevDirectPlugins = [], this.pluginViews = [], this.requiresGeckoHackNode = !1, this.dragging = null, this._props = t, this.state = t.state, this.directPlugins = t.plugins || [], this.directPlugins.forEach(Zl), this.dispatch = this.dispatch.bind(this), this.dom = e && e.mount || document.createElement("div"), e && (e.appendChild ? e.appendChild(this.dom) : typeof e == "function" ? e(this.dom) : e.mount && (this.mounted = !0)), this.editable = Xl(this), Yl(this), this.nodeViews = Ql(this), this.docView = Al(this.state.doc, Gl(this), Yi(this), this.dom, this), this.domObserver = new _p(this, (r, i, s, o) => Yp(this, r, i, s, o)), this.domObserver.start(), kp(this), this.updatePluginViews();
|
|
9407
9421
|
}
|
|
9408
9422
|
/**
|
|
9409
9423
|
Holds `true` when a
|
|
@@ -9463,22 +9477,22 @@ class ou {
|
|
|
9463
9477
|
let l = i.plugins != e.plugins || this._props.plugins != t.plugins;
|
|
9464
9478
|
if (l || this._props.plugins != t.plugins || this._props.nodeViews != t.nodeViews) {
|
|
9465
9479
|
let h = Ql(this);
|
|
9466
|
-
|
|
9480
|
+
tm(h, this.nodeViews) && (this.nodeViews = h, s = !0);
|
|
9467
9481
|
}
|
|
9468
9482
|
(l || t.handleDOMEvents != this._props.handleDOMEvents) && Ls(this), this.editable = Xl(this), Yl(this);
|
|
9469
9483
|
let a = Yi(this), c = Gl(this), u = i.plugins != e.plugins && !i.doc.eq(e.doc) ? "reset" : e.scrollToSelection > i.scrollToSelection ? "to selection" : "preserve", d = s || !this.docView.matchesNode(e.doc, c, a);
|
|
9470
9484
|
(d || !e.selection.eq(i.selection)) && (o = !0);
|
|
9471
|
-
let f = u == "preserve" && o && this.dom.style.overflowAnchor == null &&
|
|
9485
|
+
let f = u == "preserve" && o && this.dom.style.overflowAnchor == null && Rh(this);
|
|
9472
9486
|
if (o) {
|
|
9473
9487
|
this.domObserver.stop();
|
|
9474
|
-
let h = d && (Me || be) && !this.composing && !i.selection.empty && !e.selection.empty &&
|
|
9488
|
+
let h = d && (Me || be) && !this.composing && !i.selection.empty && !e.selection.empty && em(i.selection, e.selection);
|
|
9475
9489
|
if (d) {
|
|
9476
9490
|
let p = be ? this.trackWrites = this.domSelectionRange().focusNode : null;
|
|
9477
|
-
this.composing && (this.input.compositionNode =
|
|
9491
|
+
this.composing && (this.input.compositionNode = Dp(this)), (s || !this.docView.update(e.doc, c, a, this)) && (this.docView.updateOuterDeco(c), this.docView.destroy(), this.docView = Al(e.doc, c, a, this.dom, this)), p && !this.trackWrites && (h = !0);
|
|
9478
9492
|
}
|
|
9479
|
-
h || !(this.input.mouseDown && this.domObserver.currentSelection.eq(this.domSelectionRange()) &&
|
|
9493
|
+
h || !(this.input.mouseDown && this.domObserver.currentSelection.eq(this.domSelectionRange()) && rp(this)) ? dt(this, h) : (Vc(this, e.selection), this.domObserver.setCurSelection()), this.domObserver.start();
|
|
9480
9494
|
}
|
|
9481
|
-
this.updatePluginViews(i), !((r = this.dragging) === null || r === void 0) && r.node && !i.doc.eq(e.doc) && this.updateDraggedNode(this.dragging, i), u == "reset" ? this.dom.scrollTop = 0 : u == "to selection" ? this.scrollToSelection() : f &&
|
|
9495
|
+
this.updatePluginViews(i), !((r = this.dragging) === null || r === void 0) && r.node && !i.doc.eq(e.doc) && this.updateDraggedNode(this.dragging, i), u == "reset" ? this.dom.scrollTop = 0 : u == "to selection" ? this.scrollToSelection() : f && Lh(f);
|
|
9482
9496
|
}
|
|
9483
9497
|
/**
|
|
9484
9498
|
@internal
|
|
@@ -9565,7 +9579,7 @@ class ou {
|
|
|
9565
9579
|
Focus the editor.
|
|
9566
9580
|
*/
|
|
9567
9581
|
focus() {
|
|
9568
|
-
this.domObserver.stop(), this.editable &&
|
|
9582
|
+
this.domObserver.stop(), this.editable && Ph(this.dom), dt(this), this.domObserver.start();
|
|
9569
9583
|
}
|
|
9570
9584
|
/**
|
|
9571
9585
|
Get the document root in which the editor exists. This will
|
|
@@ -9599,7 +9613,7 @@ class ou {
|
|
|
9599
9613
|
the top level, not in any node.
|
|
9600
9614
|
*/
|
|
9601
9615
|
posAtCoords(e) {
|
|
9602
|
-
return
|
|
9616
|
+
return Hh(this, e);
|
|
9603
9617
|
}
|
|
9604
9618
|
/**
|
|
9605
9619
|
Returns the viewport rectangle at a given document position.
|
|
@@ -9664,7 +9678,7 @@ class ou {
|
|
|
9664
9678
|
pass a different state.
|
|
9665
9679
|
*/
|
|
9666
9680
|
endOfTextblock(e, t) {
|
|
9667
|
-
return
|
|
9681
|
+
return Kh(this, t || this.state, e);
|
|
9668
9682
|
}
|
|
9669
9683
|
/**
|
|
9670
9684
|
Run the editor's paste logic with the given HTML string. The
|
|
@@ -9696,7 +9710,7 @@ class ou {
|
|
|
9696
9710
|
views](https://prosemirror.net/docs/ref/#view.NodeView).
|
|
9697
9711
|
*/
|
|
9698
9712
|
destroy() {
|
|
9699
|
-
this.docView && (
|
|
9713
|
+
this.docView && (vp(this), this.destroyPluginViews(), this.mounted ? (this.docView.update(this.state.doc, [], Yi(this), this), this.dom.textContent = "") : this.dom.parentNode && this.dom.parentNode.removeChild(this.dom), this.docView.destroy(), this.docView = null, wh());
|
|
9700
9714
|
}
|
|
9701
9715
|
/**
|
|
9702
9716
|
This is true when the view has been
|
|
@@ -9710,14 +9724,14 @@ class ou {
|
|
|
9710
9724
|
Used for testing.
|
|
9711
9725
|
*/
|
|
9712
9726
|
dispatchEvent(e) {
|
|
9713
|
-
return
|
|
9727
|
+
return wp(this, e);
|
|
9714
9728
|
}
|
|
9715
9729
|
/**
|
|
9716
9730
|
@internal
|
|
9717
9731
|
*/
|
|
9718
9732
|
domSelectionRange() {
|
|
9719
9733
|
let e = this.domSelection();
|
|
9720
|
-
return e ? xe && this.root.nodeType === 11 &&
|
|
9734
|
+
return e ? xe && this.root.nodeType === 11 && Eh(this.dom.ownerDocument) == this.dom && Kp(this, e) || e : { focusNode: null, focusOffset: 0, anchorNode: null, anchorOffset: 0 };
|
|
9721
9735
|
}
|
|
9722
9736
|
/**
|
|
9723
9737
|
@internal
|
|
@@ -9748,7 +9762,7 @@ function Yl(n) {
|
|
|
9748
9762
|
function Xl(n) {
|
|
9749
9763
|
return !n.someProp("editable", (e) => e(n.state) === !1);
|
|
9750
9764
|
}
|
|
9751
|
-
function
|
|
9765
|
+
function em(n, e) {
|
|
9752
9766
|
let t = Math.min(n.$anchor.sharedDepth(n.head), e.$anchor.sharedDepth(e.head));
|
|
9753
9767
|
return n.$anchor.start(t) != e.$anchor.start(t);
|
|
9754
9768
|
}
|
|
@@ -9760,7 +9774,7 @@ function Ql(n) {
|
|
|
9760
9774
|
}
|
|
9761
9775
|
return n.someProp("nodeViews", t), n.someProp("markViews", t), e;
|
|
9762
9776
|
}
|
|
9763
|
-
function
|
|
9777
|
+
function tm(n, e) {
|
|
9764
9778
|
let t = 0, r = 0;
|
|
9765
9779
|
for (let i in n) {
|
|
9766
9780
|
if (n[i] != e[i])
|
|
@@ -9853,18 +9867,18 @@ var Et = {
|
|
|
9853
9867
|
220: "|",
|
|
9854
9868
|
221: "}",
|
|
9855
9869
|
222: '"'
|
|
9856
|
-
},
|
|
9870
|
+
}, nm = typeof navigator < "u" && /Mac/.test(navigator.platform), rm = typeof navigator < "u" && /MSIE \d|Trident\/(?:[7-9]|\d{2,})\..*rv:(\d+)/.exec(navigator.userAgent);
|
|
9857
9871
|
for (var he = 0; he < 10; he++) Et[48 + he] = Et[96 + he] = String(he);
|
|
9858
9872
|
for (var he = 1; he <= 24; he++) Et[he + 111] = "F" + he;
|
|
9859
9873
|
for (var he = 65; he <= 90; he++)
|
|
9860
9874
|
Et[he] = String.fromCharCode(he + 32), $r[he] = String.fromCharCode(he);
|
|
9861
9875
|
for (var Qi in Et) $r.hasOwnProperty(Qi) || ($r[Qi] = Et[Qi]);
|
|
9862
|
-
function
|
|
9863
|
-
var e =
|
|
9876
|
+
function im(n) {
|
|
9877
|
+
var e = nm && n.metaKey && n.shiftKey && !n.ctrlKey && !n.altKey || rm && n.shiftKey && n.key && n.key.length == 1 || n.key == "Unidentified", t = !e && n.key || (n.shiftKey ? $r : Et)[n.keyCode] || n.key || "Unidentified";
|
|
9864
9878
|
return t == "Esc" && (t = "Escape"), t == "Del" && (t = "Delete"), t == "Left" && (t = "ArrowLeft"), t == "Up" && (t = "ArrowUp"), t == "Right" && (t = "ArrowRight"), t == "Down" && (t = "ArrowDown"), t;
|
|
9865
9879
|
}
|
|
9866
|
-
const
|
|
9867
|
-
function
|
|
9880
|
+
const sm = typeof navigator < "u" && /Mac|iP(hone|[oa]d)/.test(navigator.platform), om = typeof navigator < "u" && /Win/.test(navigator.platform);
|
|
9881
|
+
function lm(n) {
|
|
9868
9882
|
let e = n.split(/-(?!$)/), t = e[e.length - 1];
|
|
9869
9883
|
t == "Space" && (t = " ");
|
|
9870
9884
|
let r, i, s, o;
|
|
@@ -9879,28 +9893,28 @@ function im(n) {
|
|
|
9879
9893
|
else if (/^s(hift)?$/i.test(a))
|
|
9880
9894
|
s = !0;
|
|
9881
9895
|
else if (/^mod$/i.test(a))
|
|
9882
|
-
|
|
9896
|
+
sm ? o = !0 : i = !0;
|
|
9883
9897
|
else
|
|
9884
9898
|
throw new Error("Unrecognized modifier name: " + a);
|
|
9885
9899
|
}
|
|
9886
9900
|
return r && (t = "Alt-" + t), i && (t = "Ctrl-" + t), o && (t = "Meta-" + t), s && (t = "Shift-" + t), t;
|
|
9887
9901
|
}
|
|
9888
|
-
function
|
|
9902
|
+
function am(n) {
|
|
9889
9903
|
let e = /* @__PURE__ */ Object.create(null);
|
|
9890
9904
|
for (let t in n)
|
|
9891
|
-
e[
|
|
9905
|
+
e[lm(t)] = n[t];
|
|
9892
9906
|
return e;
|
|
9893
9907
|
}
|
|
9894
9908
|
function Zi(n, e, t = !0) {
|
|
9895
9909
|
return e.altKey && (n = "Alt-" + n), e.ctrlKey && (n = "Ctrl-" + n), e.metaKey && (n = "Meta-" + n), t && e.shiftKey && (n = "Shift-" + n), n;
|
|
9896
9910
|
}
|
|
9897
|
-
function
|
|
9911
|
+
function cm(n) {
|
|
9898
9912
|
return new Q({ props: { handleKeyDown: lu(n) } });
|
|
9899
9913
|
}
|
|
9900
9914
|
function lu(n) {
|
|
9901
|
-
let e =
|
|
9915
|
+
let e = am(n);
|
|
9902
9916
|
return function(t, r) {
|
|
9903
|
-
let i =
|
|
9917
|
+
let i = im(r), s, o = e[Zi(i, r)];
|
|
9904
9918
|
if (o && o(t.state, t.dispatch, t))
|
|
9905
9919
|
return !0;
|
|
9906
9920
|
if (i.length == 1 && i != " ") {
|
|
@@ -9910,7 +9924,7 @@ function lu(n) {
|
|
|
9910
9924
|
return !0;
|
|
9911
9925
|
}
|
|
9912
9926
|
if ((r.altKey || r.metaKey || r.ctrlKey) && // Ctrl-Alt may be used for AltGr on Windows
|
|
9913
|
-
!(
|
|
9927
|
+
!(om && r.ctrlKey && r.altKey) && (s = Et[r.keyCode]) && s != i) {
|
|
9914
9928
|
let l = e[Zi(s, r)];
|
|
9915
9929
|
if (l && l(t.state, t.dispatch, t))
|
|
9916
9930
|
return !0;
|
|
@@ -9950,13 +9964,13 @@ const cu = (n, e, t) => {
|
|
|
9950
9964
|
break;
|
|
9951
9965
|
}
|
|
9952
9966
|
return s.isAtom && i.depth == r.depth - 1 ? (e && e(n.tr.delete(i.pos - s.nodeSize, i.pos).scrollIntoView()), !0) : !1;
|
|
9953
|
-
},
|
|
9967
|
+
}, um = (n, e, t) => {
|
|
9954
9968
|
let r = au(n, t);
|
|
9955
9969
|
if (!r)
|
|
9956
9970
|
return !1;
|
|
9957
9971
|
let i = fo(r);
|
|
9958
9972
|
return i ? uu(n, i, e) : !1;
|
|
9959
|
-
},
|
|
9973
|
+
}, dm = (n, e, t) => {
|
|
9960
9974
|
let r = fu(n, t);
|
|
9961
9975
|
if (!r)
|
|
9962
9976
|
return !1;
|
|
@@ -10070,7 +10084,7 @@ function ho(n) {
|
|
|
10070
10084
|
}
|
|
10071
10085
|
return null;
|
|
10072
10086
|
}
|
|
10073
|
-
const
|
|
10087
|
+
const fm = (n, e) => {
|
|
10074
10088
|
let t = n.selection, r = t instanceof I, i;
|
|
10075
10089
|
if (r) {
|
|
10076
10090
|
if (t.node.isTextblock || !Ot(n.doc, t.from))
|
|
@@ -10083,7 +10097,7 @@ const cm = (n, e) => {
|
|
|
10083
10097
|
r && s.setSelection(I.create(s.doc, i - n.doc.resolve(i).nodeBefore.nodeSize)), e(s.scrollIntoView());
|
|
10084
10098
|
}
|
|
10085
10099
|
return !0;
|
|
10086
|
-
},
|
|
10100
|
+
}, hm = (n, e) => {
|
|
10087
10101
|
let t = n.selection, r;
|
|
10088
10102
|
if (t instanceof I) {
|
|
10089
10103
|
if (t.node.isTextblock || !Ot(n.doc, t.to))
|
|
@@ -10092,7 +10106,7 @@ const cm = (n, e) => {
|
|
|
10092
10106
|
} else if (r = ki(n.doc, t.to, 1), r == null)
|
|
10093
10107
|
return !1;
|
|
10094
10108
|
return e && e(n.tr.join(r).scrollIntoView()), !0;
|
|
10095
|
-
},
|
|
10109
|
+
}, pm = (n, e) => {
|
|
10096
10110
|
let { $from: t, $to: r } = n.selection, i = t.blockRange(r), s = i && kn(i);
|
|
10097
10111
|
return s == null ? !1 : (e && e(n.tr.lift(i, s).scrollIntoView()), !0);
|
|
10098
10112
|
}, mu = (n, e) => {
|
|
@@ -10108,7 +10122,7 @@ function po(n) {
|
|
|
10108
10122
|
}
|
|
10109
10123
|
return null;
|
|
10110
10124
|
}
|
|
10111
|
-
const
|
|
10125
|
+
const mm = (n, e) => {
|
|
10112
10126
|
let { $head: t, $anchor: r } = n.selection;
|
|
10113
10127
|
if (!t.parent.type.spec.code || !t.sameParent(r))
|
|
10114
10128
|
return !1;
|
|
@@ -10144,7 +10158,7 @@ const fm = (n, e) => {
|
|
|
10144
10158
|
let r = t.blockRange(), i = r && kn(r);
|
|
10145
10159
|
return i == null ? !1 : (e && e(n.tr.lift(r, i).scrollIntoView()), !0);
|
|
10146
10160
|
};
|
|
10147
|
-
function
|
|
10161
|
+
function gm(n) {
|
|
10148
10162
|
return (e, t) => {
|
|
10149
10163
|
let { $from: r, $to: i } = e.selection;
|
|
10150
10164
|
if (e.selection instanceof I && e.selection.node.isBlock)
|
|
@@ -10173,17 +10187,17 @@ function hm(n) {
|
|
|
10173
10187
|
return t && t(u.scrollIntoView()), !0;
|
|
10174
10188
|
};
|
|
10175
10189
|
}
|
|
10176
|
-
const
|
|
10190
|
+
const ym = gm(), bm = (n, e) => {
|
|
10177
10191
|
let { $from: t, to: r } = n.selection, i, s = t.sharedDepth(r);
|
|
10178
10192
|
return s == 0 ? !1 : (i = t.before(s), e && e(n.tr.setSelection(I.create(n.doc, i))), !0);
|
|
10179
10193
|
};
|
|
10180
|
-
function
|
|
10194
|
+
function km(n, e, t) {
|
|
10181
10195
|
let r = e.nodeBefore, i = e.nodeAfter, s = e.index();
|
|
10182
10196
|
return !r || !i || !r.type.compatibleContent(i.type) ? !1 : !r.content.size && e.parent.canReplace(s - 1, s) ? (t && t(n.tr.delete(e.pos - r.nodeSize, e.pos).scrollIntoView()), !0) : !e.parent.canReplace(s, s + 1) || !(i.isTextblock || Ot(n.doc, e.pos)) ? !1 : (t && t(n.tr.join(e.pos).scrollIntoView()), !0);
|
|
10183
10197
|
}
|
|
10184
10198
|
function bu(n, e, t, r) {
|
|
10185
10199
|
let i = e.nodeBefore, s = e.nodeAfter, o, l, a = i.type.spec.isolating || s.type.spec.isolating;
|
|
10186
|
-
if (!a &&
|
|
10200
|
+
if (!a && km(n, e, t))
|
|
10187
10201
|
return !0;
|
|
10188
10202
|
let c = !a && e.parent.canReplace(e.index(), e.index() + 1);
|
|
10189
10203
|
if (c && (o = (l = i.contentMatchAt(i.childCount)).findWrapping(s.type)) && l.matchType(o[0] || s.type).validEnd) {
|
|
@@ -10231,8 +10245,8 @@ function ku(n) {
|
|
|
10231
10245
|
return i.node(s).isTextblock ? (t && t(e.tr.setSelection(R.create(e.doc, n < 0 ? i.start(s) : i.end(s)))), !0) : !1;
|
|
10232
10246
|
};
|
|
10233
10247
|
}
|
|
10234
|
-
const
|
|
10235
|
-
function
|
|
10248
|
+
const vm = ku(-1), xm = ku(1);
|
|
10249
|
+
function wm(n, e = null) {
|
|
10236
10250
|
return function(t, r) {
|
|
10237
10251
|
let { $from: i, $to: s } = t.selection, o = i.blockRange(s), l = o && Zs(o, n, e);
|
|
10238
10252
|
return l ? (r && r(t.tr.wrap(o, l).scrollIntoView()), !0) : !1;
|
|
@@ -10278,18 +10292,18 @@ function mo(...n) {
|
|
|
10278
10292
|
}
|
|
10279
10293
|
mo(uo, cu, du);
|
|
10280
10294
|
mo(uo, hu, pu);
|
|
10281
|
-
mo(mu, gu, yu,
|
|
10295
|
+
mo(mu, gu, yu, ym);
|
|
10282
10296
|
typeof navigator < "u" ? /Mac|iP(hone|[oa]d)/.test(navigator.platform) : typeof os < "u" && os.platform && os.platform() == "darwin";
|
|
10283
|
-
function
|
|
10297
|
+
function Sm(n, e = null) {
|
|
10284
10298
|
return function(t, r) {
|
|
10285
10299
|
let { $from: i, $to: s } = t.selection, o = i.blockRange(s);
|
|
10286
10300
|
if (!o)
|
|
10287
10301
|
return !1;
|
|
10288
10302
|
let l = r ? t.tr : null;
|
|
10289
|
-
return
|
|
10303
|
+
return Cm(l, o, n, e) ? (r && r(l.scrollIntoView()), !0) : !1;
|
|
10290
10304
|
};
|
|
10291
10305
|
}
|
|
10292
|
-
function
|
|
10306
|
+
function Cm(n, e, t, r = null) {
|
|
10293
10307
|
let i = !1, s = e, o = e.$from.doc;
|
|
10294
10308
|
if (e.depth >= 2 && e.$from.node(e.depth - 1).type.compatibleContent(t) && e.startIndex == 0) {
|
|
10295
10309
|
if (e.$from.index(e.depth - 1) == 0)
|
|
@@ -10298,9 +10312,9 @@ function xm(n, e, t, r = null) {
|
|
|
10298
10312
|
s = new Dr(a, a, e.depth), e.endIndex < e.parent.childCount && (e = new Dr(e.$from, o.resolve(e.$to.end(e.depth)), e.depth)), i = !0;
|
|
10299
10313
|
}
|
|
10300
10314
|
let l = Zs(s, t, r, e);
|
|
10301
|
-
return l ? (n &&
|
|
10315
|
+
return l ? (n && Mm(n, e, l, i, t), !0) : !1;
|
|
10302
10316
|
}
|
|
10303
|
-
function
|
|
10317
|
+
function Mm(n, e, t, r, i) {
|
|
10304
10318
|
let s = x.empty;
|
|
10305
10319
|
for (let u = t.length - 1; u >= 0; u--)
|
|
10306
10320
|
s = x.from(t[u].type.create(t[u].attrs, s));
|
|
@@ -10313,13 +10327,13 @@ function wm(n, e, t, r, i) {
|
|
|
10313
10327
|
!f && ut(n.doc, a, l) && (n.split(a, l), a += 2 * l), a += c.child(u).nodeSize;
|
|
10314
10328
|
return n;
|
|
10315
10329
|
}
|
|
10316
|
-
function
|
|
10330
|
+
function Tm(n) {
|
|
10317
10331
|
return function(e, t) {
|
|
10318
10332
|
let { $from: r, $to: i } = e.selection, s = r.blockRange(i, (o) => o.childCount > 0 && o.firstChild.type == n);
|
|
10319
|
-
return s ? t ? r.node(s.depth - 1).type == n ?
|
|
10333
|
+
return s ? t ? r.node(s.depth - 1).type == n ? Em(e, t, n, s) : Om(e, t, s) : !0 : !1;
|
|
10320
10334
|
};
|
|
10321
10335
|
}
|
|
10322
|
-
function
|
|
10336
|
+
function Em(n, e, t, r) {
|
|
10323
10337
|
let i = n.tr, s = r.end, o = r.$to.end(r.depth);
|
|
10324
10338
|
s < o && (i.step(new le(s - 1, o, s, o, new E(x.from(t.create(null, r.parent.copy())), 1, 0), 1, !0)), r = new Dr(i.doc.resolve(r.$from.pos), i.doc.resolve(o), r.depth));
|
|
10325
10339
|
const l = kn(r);
|
|
@@ -10329,7 +10343,7 @@ function Cm(n, e, t, r) {
|
|
|
10329
10343
|
let a = i.doc.resolve(i.mapping.map(s, -1) - 1);
|
|
10330
10344
|
return Ot(i.doc, a.pos) && a.nodeBefore.type == a.nodeAfter.type && i.join(a.pos), e(i.scrollIntoView()), !0;
|
|
10331
10345
|
}
|
|
10332
|
-
function
|
|
10346
|
+
function Om(n, e, t) {
|
|
10333
10347
|
let r = n.tr, i = t.parent;
|
|
10334
10348
|
for (let h = t.end, p = t.endIndex - 1, m = t.startIndex; p > m; p--)
|
|
10335
10349
|
h -= i.child(p).nodeSize, r.delete(h - 1, h + 1);
|
|
@@ -10342,7 +10356,7 @@ function Mm(n, e, t) {
|
|
|
10342
10356
|
let d = s.pos, f = d + o.nodeSize;
|
|
10343
10357
|
return r.step(new le(d - (l ? 1 : 0), f + (a ? 1 : 0), d + 1, f - 1, new E((l ? x.empty : x.from(i.copy(x.empty))).append(a ? x.empty : x.from(i.copy(x.empty))), l ? 0 : 1, a ? 0 : 1), l ? 0 : 1)), e(r.scrollIntoView()), !0;
|
|
10344
10358
|
}
|
|
10345
|
-
function
|
|
10359
|
+
function Am(n) {
|
|
10346
10360
|
return function(e, t) {
|
|
10347
10361
|
let { $from: r, $to: i } = e.selection, s = r.blockRange(i, (c) => c.childCount > 0 && c.firstChild.type == n);
|
|
10348
10362
|
if (!s)
|
|
@@ -10445,7 +10459,7 @@ class Ti {
|
|
|
10445
10459
|
return l;
|
|
10446
10460
|
}
|
|
10447
10461
|
}
|
|
10448
|
-
class
|
|
10462
|
+
class Nm {
|
|
10449
10463
|
constructor() {
|
|
10450
10464
|
this.callbacks = {};
|
|
10451
10465
|
}
|
|
@@ -10582,10 +10596,10 @@ function xu(n) {
|
|
|
10582
10596
|
function $(n, e = void 0, ...t) {
|
|
10583
10597
|
return xu(n) ? e ? n.bind(e)(...t) : n(...t) : n;
|
|
10584
10598
|
}
|
|
10585
|
-
function
|
|
10599
|
+
function Im(n = {}) {
|
|
10586
10600
|
return Object.keys(n).length === 0 && n.constructor === Object;
|
|
10587
10601
|
}
|
|
10588
|
-
function
|
|
10602
|
+
function Dm(n) {
|
|
10589
10603
|
return typeof n != "string" ? n : n.match(/^[+-]?(?:\d*\.)?\d+$/) ? Number(n) : n === "true" ? !0 : n === "false" ? !1 : n;
|
|
10590
10604
|
}
|
|
10591
10605
|
function ta(n, e) {
|
|
@@ -10596,7 +10610,7 @@ function ta(n, e) {
|
|
|
10596
10610
|
if (r === !1)
|
|
10597
10611
|
return !1;
|
|
10598
10612
|
const i = e.reduce((s, o) => {
|
|
10599
|
-
const l = o.attribute.parseHTML ? o.attribute.parseHTML(t) :
|
|
10613
|
+
const l = o.attribute.parseHTML ? o.attribute.parseHTML(t) : Dm(t.getAttribute(o.name));
|
|
10600
10614
|
return l == null ? s : {
|
|
10601
10615
|
...s,
|
|
10602
10616
|
[o.name]: l
|
|
@@ -10609,10 +10623,10 @@ function ta(n, e) {
|
|
|
10609
10623
|
function na(n) {
|
|
10610
10624
|
return Object.fromEntries(
|
|
10611
10625
|
// @ts-ignore
|
|
10612
|
-
Object.entries(n).filter(([e, t]) => e === "attrs" &&
|
|
10626
|
+
Object.entries(n).filter(([e, t]) => e === "attrs" && Im(t) ? !1 : t != null)
|
|
10613
10627
|
);
|
|
10614
10628
|
}
|
|
10615
|
-
function
|
|
10629
|
+
function Rm(n, e) {
|
|
10616
10630
|
var t;
|
|
10617
10631
|
const r = vu(n), { nodeExtensions: i, markExtensions: s } = Ei(n), o = (t = i.find((c) => O(c, "topNode"))) === null || t === void 0 ? void 0 : t.name, l = Object.fromEntries(i.map((c) => {
|
|
10618
10632
|
const u = r.filter((b) => b.type === c.name), d = {
|
|
@@ -10700,7 +10714,7 @@ function go(n, e) {
|
|
|
10700
10714
|
const t = Qt.fromSchema(e).serializeFragment(n), i = document.implementation.createHTMLDocument().createElement("div");
|
|
10701
10715
|
return i.appendChild(t), i.innerHTML;
|
|
10702
10716
|
}
|
|
10703
|
-
const
|
|
10717
|
+
const Lm = (n, e = 500) => {
|
|
10704
10718
|
let t = "";
|
|
10705
10719
|
const r = n.parentOffset;
|
|
10706
10720
|
return n.parent.nodesBetween(Math.max(0, r - e), r, (i, s, o, l) => {
|
|
@@ -10722,7 +10736,7 @@ class Oi {
|
|
|
10722
10736
|
this.find = e.find, this.handler = e.handler;
|
|
10723
10737
|
}
|
|
10724
10738
|
}
|
|
10725
|
-
const
|
|
10739
|
+
const Pm = (n, e) => {
|
|
10726
10740
|
if (yo(e))
|
|
10727
10741
|
return e.exec(n);
|
|
10728
10742
|
const t = e(n);
|
|
@@ -10743,11 +10757,11 @@ function pr(n) {
|
|
|
10743
10757
|
)
|
|
10744
10758
|
return !1;
|
|
10745
10759
|
let u = !1;
|
|
10746
|
-
const d =
|
|
10760
|
+
const d = Lm(c) + s;
|
|
10747
10761
|
return o.forEach((f) => {
|
|
10748
10762
|
if (u)
|
|
10749
10763
|
return;
|
|
10750
|
-
const h =
|
|
10764
|
+
const h = Pm(d, f.find);
|
|
10751
10765
|
if (!h)
|
|
10752
10766
|
return;
|
|
10753
10767
|
const p = a.state.tr, m = Mi({
|
|
@@ -10775,7 +10789,7 @@ function pr(n) {
|
|
|
10775
10789
|
}), a.dispatch(p), u = !0);
|
|
10776
10790
|
}), u;
|
|
10777
10791
|
}
|
|
10778
|
-
function
|
|
10792
|
+
function Bm(n) {
|
|
10779
10793
|
const { editor: e, rules: t } = n, r = new Q({
|
|
10780
10794
|
state: {
|
|
10781
10795
|
init() {
|
|
@@ -10847,11 +10861,11 @@ function Rm(n) {
|
|
|
10847
10861
|
});
|
|
10848
10862
|
return r;
|
|
10849
10863
|
}
|
|
10850
|
-
function
|
|
10864
|
+
function Fm(n) {
|
|
10851
10865
|
return Object.prototype.toString.call(n).slice(8, -1);
|
|
10852
10866
|
}
|
|
10853
10867
|
function mr(n) {
|
|
10854
|
-
return
|
|
10868
|
+
return Fm(n) !== "Object" ? !1 : n.constructor === Object && Object.getPrototypeOf(n) === Object.prototype;
|
|
10855
10869
|
}
|
|
10856
10870
|
function Ai(n, e) {
|
|
10857
10871
|
const t = { ...n };
|
|
@@ -10905,15 +10919,15 @@ class Ze {
|
|
|
10905
10919
|
return !1;
|
|
10906
10920
|
}
|
|
10907
10921
|
}
|
|
10908
|
-
function
|
|
10922
|
+
function zm(n) {
|
|
10909
10923
|
return typeof n == "number";
|
|
10910
10924
|
}
|
|
10911
|
-
class
|
|
10925
|
+
class $m {
|
|
10912
10926
|
constructor(e) {
|
|
10913
10927
|
this.find = e.find, this.handler = e.handler;
|
|
10914
10928
|
}
|
|
10915
10929
|
}
|
|
10916
|
-
const
|
|
10930
|
+
const Hm = (n, e, t) => {
|
|
10917
10931
|
if (yo(e))
|
|
10918
10932
|
return [...n.matchAll(e)];
|
|
10919
10933
|
const r = e(n, t);
|
|
@@ -10922,7 +10936,7 @@ const Fm = (n, e, t) => {
|
|
|
10922
10936
|
return s.index = i.index, s.input = n, s.data = i.data, i.replaceWith && (i.text.includes(i.replaceWith) || console.warn('[tiptap warn]: "pasteRuleMatch.replaceWith" must be part of "pasteRuleMatch.text".'), s.push(i.replaceWith)), s;
|
|
10923
10937
|
}) : [];
|
|
10924
10938
|
};
|
|
10925
|
-
function
|
|
10939
|
+
function Vm(n) {
|
|
10926
10940
|
const { editor: e, state: t, from: r, to: i, rule: s, pasteEvent: o, dropEvent: l } = n, { commands: a, chain: c, can: u } = new Ti({
|
|
10927
10941
|
editor: e,
|
|
10928
10942
|
state: t
|
|
@@ -10931,7 +10945,7 @@ function zm(n) {
|
|
|
10931
10945
|
if (!h.isTextblock || h.type.spec.code)
|
|
10932
10946
|
return;
|
|
10933
10947
|
const m = Math.max(r, p), y = Math.min(i, p + h.content.size), b = h.textBetween(m - p, y - p, void 0, "");
|
|
10934
|
-
|
|
10948
|
+
Hm(b, s.find, o).forEach((M) => {
|
|
10935
10949
|
if (M.index === void 0)
|
|
10936
10950
|
return;
|
|
10937
10951
|
const g = m + M.index + 1, S = g + M[0].length, v = {
|
|
@@ -10952,14 +10966,14 @@ function zm(n) {
|
|
|
10952
10966
|
}), d.every((h) => h !== null);
|
|
10953
10967
|
}
|
|
10954
10968
|
let gr = null;
|
|
10955
|
-
const
|
|
10969
|
+
const jm = (n) => {
|
|
10956
10970
|
var e;
|
|
10957
10971
|
const t = new ClipboardEvent("paste", {
|
|
10958
10972
|
clipboardData: new DataTransfer()
|
|
10959
10973
|
});
|
|
10960
10974
|
return (e = t.clipboardData) === null || e === void 0 || e.setData("text/html", n), t;
|
|
10961
10975
|
};
|
|
10962
|
-
function
|
|
10976
|
+
function _m(n) {
|
|
10963
10977
|
const { editor: e, rules: t } = n;
|
|
10964
10978
|
let r = null, i = !1, s = !1, o = typeof ClipboardEvent < "u" ? new ClipboardEvent("paste") : null, l;
|
|
10965
10979
|
try {
|
|
@@ -10972,7 +10986,7 @@ function Hm(n) {
|
|
|
10972
10986
|
state: u,
|
|
10973
10987
|
transaction: m
|
|
10974
10988
|
});
|
|
10975
|
-
if (!(!
|
|
10989
|
+
if (!(!Vm({
|
|
10976
10990
|
editor: e,
|
|
10977
10991
|
state: y,
|
|
10978
10992
|
from: Math.max(d - 1, 0),
|
|
@@ -11030,7 +11044,7 @@ function Hm(n) {
|
|
|
11030
11044
|
if (C) {
|
|
11031
11045
|
let { text: S } = b;
|
|
11032
11046
|
typeof S == "string" ? S = S : S = go(x.from(S), h.schema);
|
|
11033
|
-
const { from: v } = b, P = v + S.length, T =
|
|
11047
|
+
const { from: v } = b, P = v + S.length, T = jm(S);
|
|
11034
11048
|
return a({
|
|
11035
11049
|
rule: u,
|
|
11036
11050
|
state: h,
|
|
@@ -11040,7 +11054,7 @@ function Hm(n) {
|
|
|
11040
11054
|
});
|
|
11041
11055
|
}
|
|
11042
11056
|
const M = f.doc.content.findDiffStart(h.doc.content), g = f.doc.content.findDiffEnd(h.doc.content);
|
|
11043
|
-
if (!(!
|
|
11057
|
+
if (!(!zm(M) || !g || M === g.b))
|
|
11044
11058
|
return a({
|
|
11045
11059
|
rule: u,
|
|
11046
11060
|
state: h,
|
|
@@ -11051,13 +11065,13 @@ function Hm(n) {
|
|
|
11051
11065
|
}
|
|
11052
11066
|
}));
|
|
11053
11067
|
}
|
|
11054
|
-
function
|
|
11068
|
+
function Wm(n) {
|
|
11055
11069
|
const e = n.filter((t, r) => n.indexOf(t) !== r);
|
|
11056
11070
|
return Array.from(new Set(e));
|
|
11057
11071
|
}
|
|
11058
11072
|
class dn {
|
|
11059
11073
|
constructor(e, t) {
|
|
11060
|
-
this.splittableMarks = [], this.editor = t, this.extensions = dn.resolve(e), this.schema =
|
|
11074
|
+
this.splittableMarks = [], this.editor = t, this.extensions = dn.resolve(e), this.schema = Rm(this.extensions, t), this.setupExtensions();
|
|
11061
11075
|
}
|
|
11062
11076
|
/**
|
|
11063
11077
|
* Returns a flattened and sorted extension list while
|
|
@@ -11066,7 +11080,7 @@ class dn {
|
|
|
11066
11080
|
* @returns An flattened and sorted array of Tiptap extensions
|
|
11067
11081
|
*/
|
|
11068
11082
|
static resolve(e) {
|
|
11069
|
-
const t = dn.sort(dn.flatten(e)), r =
|
|
11083
|
+
const t = dn.sort(dn.flatten(e)), r = Wm(t.map((i) => i.name));
|
|
11070
11084
|
return r.length && console.warn(`[tiptap warn]: Duplicate extension names found: [${r.map((i) => `'${i}'`).join(", ")}]. This can lead to issues.`), t;
|
|
11071
11085
|
}
|
|
11072
11086
|
/**
|
|
@@ -11132,7 +11146,7 @@ class dn {
|
|
|
11132
11146
|
const m = Object.fromEntries(Object.entries(c()).map(([y, b]) => [y, () => b({ editor: e })]));
|
|
11133
11147
|
u = { ...u, ...m };
|
|
11134
11148
|
}
|
|
11135
|
-
const d =
|
|
11149
|
+
const d = cm(u);
|
|
11136
11150
|
a.push(d);
|
|
11137
11151
|
const f = O(o, "addInputRules", l);
|
|
11138
11152
|
ra(o, e.options.enableInputRules) && f && r.push(...f());
|
|
@@ -11146,11 +11160,11 @@ class dn {
|
|
|
11146
11160
|
return a;
|
|
11147
11161
|
}).flat();
|
|
11148
11162
|
return [
|
|
11149
|
-
|
|
11163
|
+
Bm({
|
|
11150
11164
|
editor: e,
|
|
11151
11165
|
rules: r
|
|
11152
11166
|
}),
|
|
11153
|
-
...
|
|
11167
|
+
..._m({
|
|
11154
11168
|
editor: e,
|
|
11155
11169
|
rules: i
|
|
11156
11170
|
}),
|
|
@@ -11277,7 +11291,7 @@ function wu(n, e, t) {
|
|
|
11277
11291
|
function bo(n) {
|
|
11278
11292
|
return Object.fromEntries(Object.entries(n.nodes).filter(([, e]) => e.spec.toText).map(([e, t]) => [e, t.spec.toText]));
|
|
11279
11293
|
}
|
|
11280
|
-
const
|
|
11294
|
+
const Km = te.create({
|
|
11281
11295
|
name: "clipboardTextSerializer",
|
|
11282
11296
|
addOptions() {
|
|
11283
11297
|
return {
|
|
@@ -11300,10 +11314,10 @@ const jm = te.create({
|
|
|
11300
11314
|
})
|
|
11301
11315
|
];
|
|
11302
11316
|
}
|
|
11303
|
-
}),
|
|
11317
|
+
}), Um = () => ({ editor: n, view: e }) => (requestAnimationFrame(() => {
|
|
11304
11318
|
var t;
|
|
11305
11319
|
n.isDestroyed || (e.dom.blur(), (t = window?.getSelection()) === null || t === void 0 || t.removeAllRanges());
|
|
11306
|
-
}), !0),
|
|
11320
|
+
}), !0), qm = (n = !1) => ({ commands: e }) => e.setContent("", n), Jm = () => ({ state: n, tr: e, dispatch: t }) => {
|
|
11307
11321
|
const { selection: r } = e, { ranges: i } = r;
|
|
11308
11322
|
return t && i.forEach(({ $from: s, $to: o }) => {
|
|
11309
11323
|
n.doc.nodesBetween(s.pos, o.pos, (l, a) => {
|
|
@@ -11320,12 +11334,12 @@ const jm = te.create({
|
|
|
11320
11334
|
(p || p === 0) && e.lift(h, p);
|
|
11321
11335
|
});
|
|
11322
11336
|
}), !0;
|
|
11323
|
-
},
|
|
11337
|
+
}, Gm = (n) => (e) => n(e), Ym = () => ({ state: n, dispatch: e }) => gu(n, e), Xm = (n, e) => ({ editor: t, tr: r }) => {
|
|
11324
11338
|
const { state: i } = t, s = i.doc.slice(n.from, n.to);
|
|
11325
11339
|
r.deleteRange(n.from, n.to);
|
|
11326
11340
|
const o = r.mapping.map(e);
|
|
11327
11341
|
return r.insert(o, s.content), r.setSelection(new R(r.doc.resolve(Math.max(o - 1, 0)))), !0;
|
|
11328
|
-
},
|
|
11342
|
+
}, Qm = () => ({ tr: n, dispatch: e }) => {
|
|
11329
11343
|
const { selection: t } = n, r = t.$anchor.node();
|
|
11330
11344
|
if (r.content.size > 0)
|
|
11331
11345
|
return !1;
|
|
@@ -11339,7 +11353,7 @@ const jm = te.create({
|
|
|
11339
11353
|
return !0;
|
|
11340
11354
|
}
|
|
11341
11355
|
return !1;
|
|
11342
|
-
},
|
|
11356
|
+
}, Zm = (n) => ({ tr: e, state: t, dispatch: r }) => {
|
|
11343
11357
|
const i = ce(n, t.schema), s = e.selection.$anchor;
|
|
11344
11358
|
for (let o = s.depth; o > 0; o -= 1)
|
|
11345
11359
|
if (s.node(o).type === i) {
|
|
@@ -11350,10 +11364,10 @@ const jm = te.create({
|
|
|
11350
11364
|
return !0;
|
|
11351
11365
|
}
|
|
11352
11366
|
return !1;
|
|
11353
|
-
},
|
|
11367
|
+
}, eg = (n) => ({ tr: e, dispatch: t }) => {
|
|
11354
11368
|
const { from: r, to: i } = n;
|
|
11355
11369
|
return t && e.delete(r, i), !0;
|
|
11356
|
-
},
|
|
11370
|
+
}, tg = () => ({ state: n, dispatch: e }) => uo(n, e), ng = () => ({ commands: n }) => n.keyboardShortcut("Enter"), rg = () => ({ state: n, dispatch: e }) => mm(n, e);
|
|
11357
11371
|
function Hr(n, e, t = { strict: !0 }) {
|
|
11358
11372
|
const r = Object.keys(e);
|
|
11359
11373
|
return r.length ? r.every((i) => t.strict ? e[i] === n[i] : yo(e[i]) ? e[i].test(n[i]) : e[i] === n[i]) : !0;
|
|
@@ -11393,7 +11407,7 @@ function Nt(n, e) {
|
|
|
11393
11407
|
}
|
|
11394
11408
|
return n;
|
|
11395
11409
|
}
|
|
11396
|
-
const
|
|
11410
|
+
const ig = (n, e = {}) => ({ tr: t, state: r, dispatch: i }) => {
|
|
11397
11411
|
const s = Nt(n, r.schema), { doc: o, selection: l } = t, { $from: a, from: c, to: u } = l;
|
|
11398
11412
|
if (i) {
|
|
11399
11413
|
const d = ko(a, s, e);
|
|
@@ -11403,7 +11417,7 @@ const tg = (n, e = {}) => ({ tr: t, state: r, dispatch: i }) => {
|
|
|
11403
11417
|
}
|
|
11404
11418
|
}
|
|
11405
11419
|
return !0;
|
|
11406
|
-
},
|
|
11420
|
+
}, sg = (n) => (e) => {
|
|
11407
11421
|
const t = typeof n == "function" ? n(e) : n;
|
|
11408
11422
|
for (let r = 0; r < t.length; r += 1)
|
|
11409
11423
|
if (t[r](e))
|
|
@@ -11427,7 +11441,7 @@ function Cu(n, e = null) {
|
|
|
11427
11441
|
const i = t.from, s = r.to;
|
|
11428
11442
|
return e === "all" ? R.create(n, ct(0, i, s), ct(n.content.size, i, s)) : R.create(n, ct(e, i, s), ct(e, i, s));
|
|
11429
11443
|
}
|
|
11430
|
-
function
|
|
11444
|
+
function og() {
|
|
11431
11445
|
return navigator.platform === "Android" || /android/i.test(navigator.userAgent);
|
|
11432
11446
|
}
|
|
11433
11447
|
function xo() {
|
|
@@ -11440,13 +11454,13 @@ function xo() {
|
|
|
11440
11454
|
"iPod"
|
|
11441
11455
|
].includes(navigator.platform) || navigator.userAgent.includes("Mac") && "ontouchend" in document;
|
|
11442
11456
|
}
|
|
11443
|
-
const
|
|
11457
|
+
const lg = (n = null, e = {}) => ({ editor: t, view: r, tr: i, dispatch: s }) => {
|
|
11444
11458
|
e = {
|
|
11445
11459
|
scrollIntoView: !0,
|
|
11446
11460
|
...e
|
|
11447
11461
|
};
|
|
11448
11462
|
const o = () => {
|
|
11449
|
-
(xo() ||
|
|
11463
|
+
(xo() || og()) && r.dom.focus(), requestAnimationFrame(() => {
|
|
11450
11464
|
t.isDestroyed || (r.focus(), e?.scrollIntoView && t.commands.scrollIntoView());
|
|
11451
11465
|
});
|
|
11452
11466
|
};
|
|
@@ -11456,7 +11470,7 @@ const ig = (n = null, e = {}) => ({ editor: t, view: r, tr: i, dispatch: s }) =>
|
|
|
11456
11470
|
return o(), !0;
|
|
11457
11471
|
const l = Cu(i.doc, n) || t.state.selection, a = t.state.selection.eq(l);
|
|
11458
11472
|
return s && (a || i.setSelection(l), a && i.storedMarks && i.setStoredMarks(i.storedMarks), o()), !0;
|
|
11459
|
-
},
|
|
11473
|
+
}, ag = (n, e) => (t) => n.every((r, i) => e(r, { ...t, index: i })), cg = (n, e) => ({ tr: t, commands: r }) => r.insertContentAt({ from: t.selection.from, to: t.selection.to }, n, e), Mu = (n) => {
|
|
11460
11474
|
const e = n.childNodes;
|
|
11461
11475
|
for (let t = e.length - 1; t >= 0; t -= 1) {
|
|
11462
11476
|
const r = e[t];
|
|
@@ -11517,7 +11531,7 @@ function qn(n, e, t) {
|
|
|
11517
11531
|
}
|
|
11518
11532
|
return qn("", e, t);
|
|
11519
11533
|
}
|
|
11520
|
-
function
|
|
11534
|
+
function ug(n, e, t) {
|
|
11521
11535
|
const r = n.steps.length - 1;
|
|
11522
11536
|
if (r < e)
|
|
11523
11537
|
return;
|
|
@@ -11530,7 +11544,7 @@ function lg(n, e, t) {
|
|
|
11530
11544
|
o === 0 && (o = u);
|
|
11531
11545
|
}), n.setSelection(B.near(n.doc.resolve(o), t));
|
|
11532
11546
|
}
|
|
11533
|
-
const
|
|
11547
|
+
const dg = (n) => !("type" in n), fg = (n, e, t) => ({ tr: r, dispatch: i, editor: s }) => {
|
|
11534
11548
|
var o;
|
|
11535
11549
|
if (i) {
|
|
11536
11550
|
t = {
|
|
@@ -11571,7 +11585,7 @@ const ag = (n) => !("type" in n), cg = (n, e, t) => ({ tr: r, dispatch: i, edito
|
|
|
11571
11585
|
return a(y), !1;
|
|
11572
11586
|
}
|
|
11573
11587
|
let { from: u, to: d } = typeof n == "number" ? { from: n, to: n } : { from: n.from, to: n.to }, f = !0, h = !0;
|
|
11574
|
-
if ((
|
|
11588
|
+
if ((dg(l) ? l : [l]).forEach((y) => {
|
|
11575
11589
|
y.check(), f = f ? y.isText && y.marks.length === 0 : !1, h = h ? y.isBlock : !1;
|
|
11576
11590
|
}), u === d && h) {
|
|
11577
11591
|
const { parent: y } = r.doc.resolve(u);
|
|
@@ -11590,28 +11604,28 @@ const ag = (n) => !("type" in n), cg = (n, e, t) => ({ tr: r, dispatch: i, edito
|
|
|
11590
11604
|
r.insertText(m, u, d);
|
|
11591
11605
|
} else
|
|
11592
11606
|
m = l, r.replaceWith(u, d, m);
|
|
11593
|
-
t.updateSelection &&
|
|
11607
|
+
t.updateSelection && ug(r, r.steps.length - 1, -1), t.applyInputRules && r.setMeta("applyInputRules", { from: u, text: m }), t.applyPasteRules && r.setMeta("applyPasteRules", { from: u, text: m });
|
|
11594
11608
|
}
|
|
11595
11609
|
return !0;
|
|
11596
|
-
},
|
|
11610
|
+
}, hg = () => ({ state: n, dispatch: e }) => fm(n, e), pg = () => ({ state: n, dispatch: e }) => hm(n, e), mg = () => ({ state: n, dispatch: e }) => cu(n, e), gg = () => ({ state: n, dispatch: e }) => hu(n, e), yg = () => ({ state: n, dispatch: e, tr: t }) => {
|
|
11597
11611
|
try {
|
|
11598
11612
|
const r = ki(n.doc, n.selection.$from.pos, -1);
|
|
11599
11613
|
return r == null ? !1 : (t.join(r, 2), e && e(t), !0);
|
|
11600
11614
|
} catch {
|
|
11601
11615
|
return !1;
|
|
11602
11616
|
}
|
|
11603
|
-
},
|
|
11617
|
+
}, bg = () => ({ state: n, dispatch: e, tr: t }) => {
|
|
11604
11618
|
try {
|
|
11605
11619
|
const r = ki(n.doc, n.selection.$from.pos, 1);
|
|
11606
11620
|
return r == null ? !1 : (t.join(r, 2), e && e(t), !0);
|
|
11607
11621
|
} catch {
|
|
11608
11622
|
return !1;
|
|
11609
11623
|
}
|
|
11610
|
-
},
|
|
11624
|
+
}, kg = () => ({ state: n, dispatch: e }) => um(n, e), vg = () => ({ state: n, dispatch: e }) => dm(n, e);
|
|
11611
11625
|
function Tu() {
|
|
11612
11626
|
return typeof navigator < "u" ? /Mac/.test(navigator.platform) : !1;
|
|
11613
11627
|
}
|
|
11614
|
-
function
|
|
11628
|
+
function xg(n) {
|
|
11615
11629
|
const e = n.split(/-(?!$)/);
|
|
11616
11630
|
let t = e[e.length - 1];
|
|
11617
11631
|
t === "Space" && (t = " ");
|
|
@@ -11633,8 +11647,8 @@ function bg(n) {
|
|
|
11633
11647
|
}
|
|
11634
11648
|
return r && (t = `Alt-${t}`), i && (t = `Ctrl-${t}`), o && (t = `Meta-${t}`), s && (t = `Shift-${t}`), t;
|
|
11635
11649
|
}
|
|
11636
|
-
const
|
|
11637
|
-
const s =
|
|
11650
|
+
const wg = (n) => ({ editor: e, view: t, tr: r, dispatch: i }) => {
|
|
11651
|
+
const s = xg(n).split(/-(?!$)/), o = s.find((c) => !["Alt", "Ctrl", "Meta", "Shift"].includes(c)), l = new KeyboardEvent("keydown", {
|
|
11638
11652
|
key: o === "Space" ? " " : o,
|
|
11639
11653
|
altKey: s.includes("Alt"),
|
|
11640
11654
|
ctrlKey: s.includes("Ctrl"),
|
|
@@ -11665,13 +11679,13 @@ function Jn(n, e, t = {}) {
|
|
|
11665
11679
|
const a = i - r, c = l.filter((d) => o ? o.name === d.node.type.name : !0).filter((d) => Hr(d.node.attrs, t, { strict: !1 }));
|
|
11666
11680
|
return s ? !!c.length : c.reduce((d, f) => d + f.to - f.from, 0) >= a;
|
|
11667
11681
|
}
|
|
11668
|
-
const
|
|
11682
|
+
const Sg = (n, e = {}) => ({ state: t, dispatch: r }) => {
|
|
11669
11683
|
const i = ce(n, t.schema);
|
|
11670
|
-
return Jn(t, i, e) ?
|
|
11671
|
-
},
|
|
11684
|
+
return Jn(t, i, e) ? pm(t, r) : !1;
|
|
11685
|
+
}, Cg = () => ({ state: n, dispatch: e }) => yu(n, e), Mg = (n) => ({ state: e, dispatch: t }) => {
|
|
11672
11686
|
const r = ce(n, e.schema);
|
|
11673
|
-
return
|
|
11674
|
-
},
|
|
11687
|
+
return Tm(r)(e, t);
|
|
11688
|
+
}, Tg = () => ({ state: n, dispatch: e }) => mu(n, e);
|
|
11675
11689
|
function Ni(n, e) {
|
|
11676
11690
|
return e.nodes[n] ? "node" : e.marks[n] ? "mark" : null;
|
|
11677
11691
|
}
|
|
@@ -11679,7 +11693,7 @@ function sa(n, e) {
|
|
|
11679
11693
|
const t = typeof e == "string" ? [e] : e;
|
|
11680
11694
|
return Object.keys(n).reduce((r, i) => (t.includes(i) || (r[i] = n[i]), r), {});
|
|
11681
11695
|
}
|
|
11682
|
-
const
|
|
11696
|
+
const Eg = (n, e) => ({ tr: t, state: r, dispatch: i }) => {
|
|
11683
11697
|
let s = null, o = null;
|
|
11684
11698
|
const l = Ni(typeof n == "string" ? n : n.name, r.schema);
|
|
11685
11699
|
return l ? (l === "node" && (s = ce(n, r.schema)), l === "mark" && (o = Nt(n, r.schema)), i && t.selection.ranges.forEach((a) => {
|
|
@@ -11689,13 +11703,13 @@ const Cg = (n, e) => ({ tr: t, state: r, dispatch: i }) => {
|
|
|
11689
11703
|
});
|
|
11690
11704
|
});
|
|
11691
11705
|
}), !0) : !1;
|
|
11692
|
-
},
|
|
11706
|
+
}, Og = () => ({ tr: n, dispatch: e }) => (e && n.scrollIntoView(), !0), Ag = () => ({ tr: n, dispatch: e }) => {
|
|
11693
11707
|
if (e) {
|
|
11694
11708
|
const t = new Ne(n.doc);
|
|
11695
11709
|
n.setSelection(t);
|
|
11696
11710
|
}
|
|
11697
11711
|
return !0;
|
|
11698
|
-
},
|
|
11712
|
+
}, Ng = () => ({ state: n, dispatch: e }) => du(n, e), Ig = () => ({ state: n, dispatch: e }) => pu(n, e), Dg = () => ({ state: n, dispatch: e }) => bm(n, e), Rg = () => ({ state: n, dispatch: e }) => xm(n, e), Lg = () => ({ state: n, dispatch: e }) => vm(n, e);
|
|
11699
11713
|
function Bs(n, e, t = {}, r = {}) {
|
|
11700
11714
|
return qn(n, e, {
|
|
11701
11715
|
slice: !1,
|
|
@@ -11703,7 +11717,7 @@ function Bs(n, e, t = {}, r = {}) {
|
|
|
11703
11717
|
errorOnInvalidContent: r.errorOnInvalidContent
|
|
11704
11718
|
});
|
|
11705
11719
|
}
|
|
11706
|
-
const
|
|
11720
|
+
const Pg = (n, e = !1, t = {}, r = {}) => ({ editor: i, tr: s, dispatch: o, commands: l }) => {
|
|
11707
11721
|
var a, c;
|
|
11708
11722
|
const { doc: u } = s;
|
|
11709
11723
|
if (t.preserveWhitespace !== "full") {
|
|
@@ -11725,7 +11739,7 @@ function Eu(n, e) {
|
|
|
11725
11739
|
const l = o.find((a) => a.type.name === t.name);
|
|
11726
11740
|
return l ? { ...l.attrs } : {};
|
|
11727
11741
|
}
|
|
11728
|
-
function
|
|
11742
|
+
function Bg(n, e) {
|
|
11729
11743
|
const t = new Cc(n);
|
|
11730
11744
|
return e.forEach((r) => {
|
|
11731
11745
|
r.steps.forEach((i) => {
|
|
@@ -11733,7 +11747,7 @@ function Rg(n, e) {
|
|
|
11733
11747
|
});
|
|
11734
11748
|
}), t;
|
|
11735
11749
|
}
|
|
11736
|
-
function
|
|
11750
|
+
function Fg(n) {
|
|
11737
11751
|
for (let e = 0; e < n.edgeCount; e += 1) {
|
|
11738
11752
|
const { type: t } = n.edge(e);
|
|
11739
11753
|
if (t.isTextblock && !t.hasRequiredAttrs())
|
|
@@ -11741,7 +11755,7 @@ function Lg(n) {
|
|
|
11741
11755
|
}
|
|
11742
11756
|
return null;
|
|
11743
11757
|
}
|
|
11744
|
-
function
|
|
11758
|
+
function zg(n, e, t) {
|
|
11745
11759
|
const r = [];
|
|
11746
11760
|
return n.nodesBetween(e.from, e.to, (i, s) => {
|
|
11747
11761
|
t(i) && r.push({
|
|
@@ -11750,7 +11764,7 @@ function Pg(n, e, t) {
|
|
|
11750
11764
|
});
|
|
11751
11765
|
}), r;
|
|
11752
11766
|
}
|
|
11753
|
-
function
|
|
11767
|
+
function $g(n, e) {
|
|
11754
11768
|
for (let t = n.depth; t > 0; t -= 1) {
|
|
11755
11769
|
const r = n.node(t);
|
|
11756
11770
|
if (e(r))
|
|
@@ -11763,7 +11777,7 @@ function Bg(n, e) {
|
|
|
11763
11777
|
}
|
|
11764
11778
|
}
|
|
11765
11779
|
function wo(n) {
|
|
11766
|
-
return (e) =>
|
|
11780
|
+
return (e) => $g(e.$from, n);
|
|
11767
11781
|
}
|
|
11768
11782
|
function Ou(n, e) {
|
|
11769
11783
|
const t = {
|
|
@@ -11772,7 +11786,7 @@ function Ou(n, e) {
|
|
|
11772
11786
|
};
|
|
11773
11787
|
return wu(n, t, e);
|
|
11774
11788
|
}
|
|
11775
|
-
function
|
|
11789
|
+
function Hg(n, e) {
|
|
11776
11790
|
const t = ce(e, n.schema), { from: r, to: i } = n.selection, s = [];
|
|
11777
11791
|
n.doc.nodesBetween(r, i, (l) => {
|
|
11778
11792
|
s.push(l);
|
|
@@ -11782,20 +11796,20 @@ function Fg(n, e) {
|
|
|
11782
11796
|
}
|
|
11783
11797
|
function So(n, e) {
|
|
11784
11798
|
const t = Ni(typeof e == "string" ? e : e.name, n.schema);
|
|
11785
|
-
return t === "node" ?
|
|
11799
|
+
return t === "node" ? Hg(n, e) : t === "mark" ? Eu(n, e) : {};
|
|
11786
11800
|
}
|
|
11787
|
-
function
|
|
11801
|
+
function Vg(n, e = JSON.stringify) {
|
|
11788
11802
|
const t = {};
|
|
11789
11803
|
return n.filter((r) => {
|
|
11790
11804
|
const i = e(r);
|
|
11791
11805
|
return Object.prototype.hasOwnProperty.call(t, i) ? !1 : t[i] = !0;
|
|
11792
11806
|
});
|
|
11793
11807
|
}
|
|
11794
|
-
function
|
|
11795
|
-
const e =
|
|
11808
|
+
function jg(n) {
|
|
11809
|
+
const e = Vg(n);
|
|
11796
11810
|
return e.length === 1 ? e : e.filter((t, r) => !e.filter((s, o) => o !== r).some((s) => t.oldRange.from >= s.oldRange.from && t.oldRange.to <= s.oldRange.to && t.newRange.from >= s.newRange.from && t.newRange.to <= s.newRange.to));
|
|
11797
11811
|
}
|
|
11798
|
-
function
|
|
11812
|
+
function _g(n) {
|
|
11799
11813
|
const { mapping: e, steps: t } = n, r = [];
|
|
11800
11814
|
return e.maps.forEach((i, s) => {
|
|
11801
11815
|
const o = [];
|
|
@@ -11822,7 +11836,7 @@ function Hg(n) {
|
|
|
11822
11836
|
}
|
|
11823
11837
|
});
|
|
11824
11838
|
});
|
|
11825
|
-
}),
|
|
11839
|
+
}), jg(r);
|
|
11826
11840
|
}
|
|
11827
11841
|
function Co(n, e, t) {
|
|
11828
11842
|
const r = [];
|
|
@@ -11869,7 +11883,7 @@ function Fs(n, e, t = {}) {
|
|
|
11869
11883
|
const a = l.filter((d) => s ? s.name === d.mark.type.name : !0).filter((d) => Hr(d.mark.attrs, t, { strict: !1 })).reduce((d, f) => d + f.to - f.from, 0), c = l.filter((d) => s ? d.mark.type !== s && d.mark.type.excludes(s) : !0).reduce((d, f) => d + f.to - f.from, 0);
|
|
11870
11884
|
return (a > 0 ? a + c : a) >= o;
|
|
11871
11885
|
}
|
|
11872
|
-
function
|
|
11886
|
+
function Wg(n, e, t = {}) {
|
|
11873
11887
|
if (!e)
|
|
11874
11888
|
return Jn(n, null, t) || Fs(n, null, t);
|
|
11875
11889
|
const r = Ni(e, n.schema);
|
|
@@ -11927,7 +11941,7 @@ function Nu(n, e, t) {
|
|
|
11927
11941
|
toJSON: () => b
|
|
11928
11942
|
};
|
|
11929
11943
|
}
|
|
11930
|
-
function
|
|
11944
|
+
function Kg(n, e, t) {
|
|
11931
11945
|
var r;
|
|
11932
11946
|
const { selection: i } = e;
|
|
11933
11947
|
let s = null;
|
|
@@ -11949,7 +11963,7 @@ function jg(n, e, t) {
|
|
|
11949
11963
|
}), c;
|
|
11950
11964
|
});
|
|
11951
11965
|
}
|
|
11952
|
-
const
|
|
11966
|
+
const Ug = (n, e = {}) => ({ tr: t, state: r, dispatch: i }) => {
|
|
11953
11967
|
const { selection: s } = t, { empty: o, ranges: l } = s, a = Nt(n, r.schema);
|
|
11954
11968
|
if (i)
|
|
11955
11969
|
if (o) {
|
|
@@ -11971,26 +11985,26 @@ const _g = (n, e = {}) => ({ tr: t, state: r, dispatch: i }) => {
|
|
|
11971
11985
|
}) : t.addMark(p, m, a.create(e));
|
|
11972
11986
|
});
|
|
11973
11987
|
});
|
|
11974
|
-
return
|
|
11975
|
-
},
|
|
11988
|
+
return Kg(r, t, a);
|
|
11989
|
+
}, qg = (n, e) => ({ tr: t }) => (t.setMeta(n, e), !0), Jg = (n, e = {}) => ({ state: t, dispatch: r, chain: i }) => {
|
|
11976
11990
|
const s = ce(n, t.schema);
|
|
11977
11991
|
let o;
|
|
11978
11992
|
return t.selection.$anchor.sameParent(t.selection.$head) && (o = t.selection.$anchor.parent.attrs), s.isTextblock ? i().command(({ commands: l }) => ea(s, { ...o, ...e })(t) ? !0 : l.clearNodes()).command(({ state: l }) => ea(s, { ...o, ...e })(l, r)).run() : (console.warn('[tiptap warn]: Currently "setNode()" only supports text block nodes.'), !1);
|
|
11979
|
-
},
|
|
11993
|
+
}, Gg = (n) => ({ tr: e, dispatch: t }) => {
|
|
11980
11994
|
if (t) {
|
|
11981
11995
|
const { doc: r } = e, i = ct(n, 0, r.content.size), s = I.create(r, i);
|
|
11982
11996
|
e.setSelection(s);
|
|
11983
11997
|
}
|
|
11984
11998
|
return !0;
|
|
11985
|
-
},
|
|
11999
|
+
}, Yg = (n) => ({ tr: e, dispatch: t }) => {
|
|
11986
12000
|
if (t) {
|
|
11987
12001
|
const { doc: r } = e, { from: i, to: s } = typeof n == "number" ? { from: n, to: n } : n, o = R.atStart(r).from, l = R.atEnd(r).to, a = ct(i, o, l), c = ct(s, o, l), u = R.create(r, a, c);
|
|
11988
12002
|
e.setSelection(u);
|
|
11989
12003
|
}
|
|
11990
12004
|
return !0;
|
|
11991
|
-
},
|
|
12005
|
+
}, Xg = (n) => ({ state: e, dispatch: t }) => {
|
|
11992
12006
|
const r = ce(n, e.schema);
|
|
11993
|
-
return
|
|
12007
|
+
return Am(r)(e, t);
|
|
11994
12008
|
};
|
|
11995
12009
|
function la(n, e) {
|
|
11996
12010
|
const t = n.storedMarks || n.selection.$to.parentOffset && n.selection.$from.marks();
|
|
@@ -11999,13 +12013,13 @@ function la(n, e) {
|
|
|
11999
12013
|
n.tr.ensureMarks(r);
|
|
12000
12014
|
}
|
|
12001
12015
|
}
|
|
12002
|
-
const
|
|
12016
|
+
const Qg = ({ keepMarks: n = !0 } = {}) => ({ tr: e, state: t, dispatch: r, editor: i }) => {
|
|
12003
12017
|
const { selection: s, doc: o } = e, { $from: l, $to: a } = s, c = i.extensionManager.attributes, u = Mr(c, l.node().type.name, l.node().attrs);
|
|
12004
12018
|
if (s instanceof I && s.node.isBlock)
|
|
12005
12019
|
return !l.parentOffset || !ut(o, l.pos) ? !1 : (r && (n && la(t, i.extensionManager.splittableMarks), e.split(l.pos).scrollIntoView()), !0);
|
|
12006
12020
|
if (!l.parent.isBlock)
|
|
12007
12021
|
return !1;
|
|
12008
|
-
const d = a.parentOffset === a.parent.content.size, f = l.depth === 0 ? void 0 :
|
|
12022
|
+
const d = a.parentOffset === a.parent.content.size, f = l.depth === 0 ? void 0 : Fg(l.node(-1).contentMatchAt(l.indexAfter(-1)));
|
|
12009
12023
|
let h = d && f ? [
|
|
12010
12024
|
{
|
|
12011
12025
|
type: f,
|
|
@@ -12025,7 +12039,7 @@ const Gg = ({ keepMarks: n = !0 } = {}) => ({ tr: e, state: t, dispatch: r, edit
|
|
|
12025
12039
|
n && la(t, i.extensionManager.splittableMarks), e.scrollIntoView();
|
|
12026
12040
|
}
|
|
12027
12041
|
return p;
|
|
12028
|
-
},
|
|
12042
|
+
}, Zg = (n, e = {}) => ({ tr: t, state: r, dispatch: i, editor: s }) => {
|
|
12029
12043
|
var o;
|
|
12030
12044
|
const l = ce(n, r.schema), { $from: a, $to: c } = r.selection, u = r.selection.node;
|
|
12031
12045
|
if (u && u.isBlock || a.depth < 2 || !a.sameParent(c))
|
|
@@ -12098,7 +12112,7 @@ const Gg = ({ keepMarks: n = !0 } = {}) => ({ tr: e, state: t, dispatch: r, edit
|
|
|
12098
12112
|
return !0;
|
|
12099
12113
|
const i = n.doc.nodeAt(r);
|
|
12100
12114
|
return t.node.type === i?.type && Ot(n.doc, r) && n.join(r), !0;
|
|
12101
|
-
},
|
|
12115
|
+
}, ey = (n, e, t, r = {}) => ({ editor: i, tr: s, state: o, dispatch: l, chain: a, commands: c, can: u }) => {
|
|
12102
12116
|
const { extensions: d, splittableMarks: f } = i.extensionManager, h = ce(n, o.schema), p = ce(e, o.schema), { selection: m, storedMarks: y } = o, { $from: b, $to: C } = m, M = b.blockRange(C), g = y || m.$to.parentOffset && m.$from.marks();
|
|
12103
12117
|
if (!M)
|
|
12104
12118
|
return !1;
|
|
@@ -12113,17 +12127,17 @@ const Gg = ({ keepMarks: n = !0 } = {}) => ({ tr: e, state: t, dispatch: r, edit
|
|
|
12113
12127
|
const v = u().wrapInList(h, r), P = g.filter((T) => f.includes(T.type.name));
|
|
12114
12128
|
return s.ensureMarks(P), v ? !0 : c.clearNodes();
|
|
12115
12129
|
}).wrapInList(h, r).command(() => ts(s, h)).command(() => ns(s, h)).run();
|
|
12116
|
-
},
|
|
12130
|
+
}, ty = (n, e = {}, t = {}) => ({ state: r, commands: i }) => {
|
|
12117
12131
|
const { extendEmptyMarkRange: s = !1 } = t, o = Nt(n, r.schema);
|
|
12118
12132
|
return Fs(r, o, e) ? i.unsetMark(o, { extendEmptyMarkRange: s }) : i.setMark(o, e);
|
|
12119
|
-
},
|
|
12133
|
+
}, ny = (n, e, t = {}) => ({ state: r, commands: i }) => {
|
|
12120
12134
|
const s = ce(n, r.schema), o = ce(e, r.schema), l = Jn(r, s, t);
|
|
12121
12135
|
let a;
|
|
12122
12136
|
return r.selection.$anchor.sameParent(r.selection.$head) && (a = r.selection.$anchor.parent.attrs), l ? i.setNode(o, a) : i.setNode(s, { ...a, ...t });
|
|
12123
|
-
},
|
|
12137
|
+
}, ry = (n, e = {}) => ({ state: t, commands: r }) => {
|
|
12124
12138
|
const i = ce(n, t.schema);
|
|
12125
12139
|
return Jn(t, i, e) ? r.lift(i) : r.wrapIn(i, e);
|
|
12126
|
-
},
|
|
12140
|
+
}, iy = () => ({ state: n, dispatch: e }) => {
|
|
12127
12141
|
const t = n.plugins;
|
|
12128
12142
|
for (let r = 0; r < t.length; r += 1) {
|
|
12129
12143
|
const i = t[r];
|
|
@@ -12143,12 +12157,12 @@ const Gg = ({ keepMarks: n = !0 } = {}) => ({ tr: e, state: t, dispatch: r, edit
|
|
|
12143
12157
|
}
|
|
12144
12158
|
}
|
|
12145
12159
|
return !1;
|
|
12146
|
-
},
|
|
12160
|
+
}, sy = () => ({ tr: n, dispatch: e }) => {
|
|
12147
12161
|
const { selection: t } = n, { empty: r, ranges: i } = t;
|
|
12148
12162
|
return r || e && i.forEach((s) => {
|
|
12149
12163
|
n.removeMark(s.$from.pos, s.$to.pos);
|
|
12150
12164
|
}), !0;
|
|
12151
|
-
},
|
|
12165
|
+
}, oy = (n, e = {}) => ({ tr: t, state: r, dispatch: i }) => {
|
|
12152
12166
|
var s;
|
|
12153
12167
|
const { extendEmptyMarkRange: o = !1 } = e, { selection: l } = t, a = Nt(n, r.schema), { $from: c, empty: u, ranges: d } = l;
|
|
12154
12168
|
if (!i)
|
|
@@ -12162,7 +12176,7 @@ const Gg = ({ keepMarks: n = !0 } = {}) => ({ tr: e, state: t, dispatch: r, edit
|
|
|
12162
12176
|
t.removeMark(f.$from.pos, f.$to.pos, a);
|
|
12163
12177
|
});
|
|
12164
12178
|
return t.removeStoredMark(a), !0;
|
|
12165
|
-
},
|
|
12179
|
+
}, ly = (n, e = {}) => ({ tr: t, state: r, dispatch: i }) => {
|
|
12166
12180
|
let s = null, o = null;
|
|
12167
12181
|
const l = Ni(typeof n == "string" ? n : n.name, r.schema);
|
|
12168
12182
|
return l ? (l === "node" && (s = ce(n, r.schema)), l === "mark" && (o = Nt(n, r.schema)), i && t.selection.ranges.forEach((a) => {
|
|
@@ -12193,82 +12207,82 @@ const Gg = ({ keepMarks: n = !0 } = {}) => ({ tr: e, state: t, dispatch: r, edit
|
|
|
12193
12207
|
}));
|
|
12194
12208
|
}));
|
|
12195
12209
|
}), !0) : !1;
|
|
12196
|
-
},
|
|
12210
|
+
}, ay = (n, e = {}) => ({ state: t, dispatch: r }) => {
|
|
12197
12211
|
const i = ce(n, t.schema);
|
|
12198
|
-
return
|
|
12199
|
-
},
|
|
12212
|
+
return wm(i, e)(t, r);
|
|
12213
|
+
}, cy = (n, e = {}) => ({ state: t, dispatch: r }) => {
|
|
12200
12214
|
const i = ce(n, t.schema);
|
|
12201
|
-
return
|
|
12215
|
+
return Sm(i, e)(t, r);
|
|
12202
12216
|
};
|
|
12203
|
-
var
|
|
12217
|
+
var uy = /* @__PURE__ */ Object.freeze({
|
|
12204
12218
|
__proto__: null,
|
|
12205
|
-
blur:
|
|
12206
|
-
clearContent:
|
|
12207
|
-
clearNodes:
|
|
12208
|
-
command:
|
|
12209
|
-
createParagraphNear:
|
|
12210
|
-
cut:
|
|
12211
|
-
deleteCurrentNode:
|
|
12212
|
-
deleteNode:
|
|
12213
|
-
deleteRange:
|
|
12214
|
-
deleteSelection:
|
|
12215
|
-
enter:
|
|
12216
|
-
exitCode:
|
|
12217
|
-
extendMarkRange:
|
|
12218
|
-
first:
|
|
12219
|
-
focus:
|
|
12220
|
-
forEach:
|
|
12221
|
-
insertContent:
|
|
12222
|
-
insertContentAt:
|
|
12223
|
-
joinBackward:
|
|
12224
|
-
joinDown:
|
|
12225
|
-
joinForward:
|
|
12226
|
-
joinItemBackward:
|
|
12227
|
-
joinItemForward:
|
|
12228
|
-
joinTextblockBackward:
|
|
12229
|
-
joinTextblockForward:
|
|
12230
|
-
joinUp:
|
|
12231
|
-
keyboardShortcut:
|
|
12232
|
-
lift:
|
|
12233
|
-
liftEmptyBlock:
|
|
12234
|
-
liftListItem:
|
|
12235
|
-
newlineInCode:
|
|
12236
|
-
resetAttributes:
|
|
12237
|
-
scrollIntoView:
|
|
12238
|
-
selectAll:
|
|
12239
|
-
selectNodeBackward:
|
|
12240
|
-
selectNodeForward:
|
|
12241
|
-
selectParentNode:
|
|
12242
|
-
selectTextblockEnd:
|
|
12243
|
-
selectTextblockStart:
|
|
12244
|
-
setContent:
|
|
12245
|
-
setMark:
|
|
12246
|
-
setMeta:
|
|
12247
|
-
setNode:
|
|
12248
|
-
setNodeSelection:
|
|
12249
|
-
setTextSelection:
|
|
12250
|
-
sinkListItem:
|
|
12251
|
-
splitBlock:
|
|
12252
|
-
splitListItem:
|
|
12253
|
-
toggleList:
|
|
12254
|
-
toggleMark:
|
|
12255
|
-
toggleNode:
|
|
12256
|
-
toggleWrap:
|
|
12257
|
-
undoInputRule:
|
|
12258
|
-
unsetAllMarks:
|
|
12259
|
-
unsetMark:
|
|
12260
|
-
updateAttributes:
|
|
12261
|
-
wrapIn:
|
|
12262
|
-
wrapInList:
|
|
12219
|
+
blur: Um,
|
|
12220
|
+
clearContent: qm,
|
|
12221
|
+
clearNodes: Jm,
|
|
12222
|
+
command: Gm,
|
|
12223
|
+
createParagraphNear: Ym,
|
|
12224
|
+
cut: Xm,
|
|
12225
|
+
deleteCurrentNode: Qm,
|
|
12226
|
+
deleteNode: Zm,
|
|
12227
|
+
deleteRange: eg,
|
|
12228
|
+
deleteSelection: tg,
|
|
12229
|
+
enter: ng,
|
|
12230
|
+
exitCode: rg,
|
|
12231
|
+
extendMarkRange: ig,
|
|
12232
|
+
first: sg,
|
|
12233
|
+
focus: lg,
|
|
12234
|
+
forEach: ag,
|
|
12235
|
+
insertContent: cg,
|
|
12236
|
+
insertContentAt: fg,
|
|
12237
|
+
joinBackward: mg,
|
|
12238
|
+
joinDown: pg,
|
|
12239
|
+
joinForward: gg,
|
|
12240
|
+
joinItemBackward: yg,
|
|
12241
|
+
joinItemForward: bg,
|
|
12242
|
+
joinTextblockBackward: kg,
|
|
12243
|
+
joinTextblockForward: vg,
|
|
12244
|
+
joinUp: hg,
|
|
12245
|
+
keyboardShortcut: wg,
|
|
12246
|
+
lift: Sg,
|
|
12247
|
+
liftEmptyBlock: Cg,
|
|
12248
|
+
liftListItem: Mg,
|
|
12249
|
+
newlineInCode: Tg,
|
|
12250
|
+
resetAttributes: Eg,
|
|
12251
|
+
scrollIntoView: Og,
|
|
12252
|
+
selectAll: Ag,
|
|
12253
|
+
selectNodeBackward: Ng,
|
|
12254
|
+
selectNodeForward: Ig,
|
|
12255
|
+
selectParentNode: Dg,
|
|
12256
|
+
selectTextblockEnd: Rg,
|
|
12257
|
+
selectTextblockStart: Lg,
|
|
12258
|
+
setContent: Pg,
|
|
12259
|
+
setMark: Ug,
|
|
12260
|
+
setMeta: qg,
|
|
12261
|
+
setNode: Jg,
|
|
12262
|
+
setNodeSelection: Gg,
|
|
12263
|
+
setTextSelection: Yg,
|
|
12264
|
+
sinkListItem: Xg,
|
|
12265
|
+
splitBlock: Qg,
|
|
12266
|
+
splitListItem: Zg,
|
|
12267
|
+
toggleList: ey,
|
|
12268
|
+
toggleMark: ty,
|
|
12269
|
+
toggleNode: ny,
|
|
12270
|
+
toggleWrap: ry,
|
|
12271
|
+
undoInputRule: iy,
|
|
12272
|
+
unsetAllMarks: sy,
|
|
12273
|
+
unsetMark: oy,
|
|
12274
|
+
updateAttributes: ly,
|
|
12275
|
+
wrapIn: ay,
|
|
12276
|
+
wrapInList: cy
|
|
12263
12277
|
});
|
|
12264
|
-
const
|
|
12278
|
+
const dy = te.create({
|
|
12265
12279
|
name: "commands",
|
|
12266
12280
|
addCommands() {
|
|
12267
12281
|
return {
|
|
12268
|
-
...
|
|
12282
|
+
...uy
|
|
12269
12283
|
};
|
|
12270
12284
|
}
|
|
12271
|
-
}),
|
|
12285
|
+
}), fy = te.create({
|
|
12272
12286
|
name: "drop",
|
|
12273
12287
|
addProseMirrorPlugins() {
|
|
12274
12288
|
return [
|
|
@@ -12287,7 +12301,7 @@ const ay = te.create({
|
|
|
12287
12301
|
})
|
|
12288
12302
|
];
|
|
12289
12303
|
}
|
|
12290
|
-
}),
|
|
12304
|
+
}), hy = te.create({
|
|
12291
12305
|
name: "editable",
|
|
12292
12306
|
addProseMirrorPlugins() {
|
|
12293
12307
|
return [
|
|
@@ -12299,13 +12313,13 @@ const ay = te.create({
|
|
|
12299
12313
|
})
|
|
12300
12314
|
];
|
|
12301
12315
|
}
|
|
12302
|
-
}),
|
|
12316
|
+
}), py = new me("focusEvents"), my = te.create({
|
|
12303
12317
|
name: "focusEvents",
|
|
12304
12318
|
addProseMirrorPlugins() {
|
|
12305
12319
|
const { editor: n } = this;
|
|
12306
12320
|
return [
|
|
12307
12321
|
new Q({
|
|
12308
|
-
key:
|
|
12322
|
+
key: py,
|
|
12309
12323
|
props: {
|
|
12310
12324
|
handleDOMEvents: {
|
|
12311
12325
|
focus: (e, t) => {
|
|
@@ -12323,7 +12337,7 @@ const ay = te.create({
|
|
|
12323
12337
|
})
|
|
12324
12338
|
];
|
|
12325
12339
|
}
|
|
12326
|
-
}),
|
|
12340
|
+
}), gy = te.create({
|
|
12327
12341
|
name: "keymap",
|
|
12328
12342
|
addKeyboardShortcuts() {
|
|
12329
12343
|
const n = () => this.editor.commands.first(({ commands: o }) => [
|
|
@@ -12401,7 +12415,7 @@ const ay = te.create({
|
|
|
12401
12415
|
})
|
|
12402
12416
|
];
|
|
12403
12417
|
}
|
|
12404
|
-
}),
|
|
12418
|
+
}), yy = te.create({
|
|
12405
12419
|
name: "paste",
|
|
12406
12420
|
addProseMirrorPlugins() {
|
|
12407
12421
|
return [
|
|
@@ -12419,7 +12433,7 @@ const ay = te.create({
|
|
|
12419
12433
|
})
|
|
12420
12434
|
];
|
|
12421
12435
|
}
|
|
12422
|
-
}),
|
|
12436
|
+
}), by = te.create({
|
|
12423
12437
|
name: "tabindex",
|
|
12424
12438
|
addProseMirrorPlugins() {
|
|
12425
12439
|
return [
|
|
@@ -12558,7 +12572,7 @@ class Pt {
|
|
|
12558
12572
|
}), this.editor.view.dispatch(t);
|
|
12559
12573
|
}
|
|
12560
12574
|
}
|
|
12561
|
-
const
|
|
12575
|
+
const ky = `.ProseMirror {
|
|
12562
12576
|
position: relative;
|
|
12563
12577
|
}
|
|
12564
12578
|
|
|
@@ -12633,14 +12647,14 @@ img.ProseMirror-separator {
|
|
|
12633
12647
|
.tippy-box[data-animation=fade][data-state=hidden] {
|
|
12634
12648
|
opacity: 0
|
|
12635
12649
|
}`;
|
|
12636
|
-
function
|
|
12650
|
+
function vy(n, e, t) {
|
|
12637
12651
|
const r = document.querySelector("style[data-tiptap-style]");
|
|
12638
12652
|
if (r !== null)
|
|
12639
12653
|
return r;
|
|
12640
12654
|
const i = document.createElement("style");
|
|
12641
12655
|
return e && i.setAttribute("nonce", e), i.setAttribute("data-tiptap-style", ""), i.innerHTML = n, document.getElementsByTagName("head")[0].appendChild(i), i;
|
|
12642
12656
|
}
|
|
12643
|
-
let
|
|
12657
|
+
let xy = class extends Nm {
|
|
12644
12658
|
constructor(e = {}) {
|
|
12645
12659
|
super(), this.isFocused = !1, this.isInitialized = !1, this.extensionStorage = {}, this.options = {
|
|
12646
12660
|
element: document.createElement("div"),
|
|
@@ -12703,7 +12717,7 @@ let by = class extends Em {
|
|
|
12703
12717
|
* Inject CSS styles.
|
|
12704
12718
|
*/
|
|
12705
12719
|
injectCSS() {
|
|
12706
|
-
this.options.injectCSS && document && (this.css =
|
|
12720
|
+
this.options.injectCSS && document && (this.css = vy(ky, this.options.injectNonce));
|
|
12707
12721
|
}
|
|
12708
12722
|
/**
|
|
12709
12723
|
* Update editor options.
|
|
@@ -12772,16 +12786,16 @@ let by = class extends Em {
|
|
|
12772
12786
|
createExtensionManager() {
|
|
12773
12787
|
var e, t;
|
|
12774
12788
|
const i = [...this.options.enableCoreExtensions ? [
|
|
12775
|
-
|
|
12776
|
-
|
|
12789
|
+
hy,
|
|
12790
|
+
Km.configure({
|
|
12777
12791
|
blockSeparator: (t = (e = this.options.coreExtensionOptions) === null || e === void 0 ? void 0 : e.clipboardTextSerializer) === null || t === void 0 ? void 0 : t.blockSeparator
|
|
12778
12792
|
}),
|
|
12779
|
-
|
|
12780
|
-
fy,
|
|
12781
|
-
hy,
|
|
12793
|
+
dy,
|
|
12782
12794
|
my,
|
|
12783
|
-
|
|
12784
|
-
|
|
12795
|
+
gy,
|
|
12796
|
+
by,
|
|
12797
|
+
fy,
|
|
12798
|
+
yy
|
|
12785
12799
|
].filter((s) => typeof this.options.enableCoreExtensions == "object" ? this.options.enableCoreExtensions[s.name] !== !1 : !0) : [], ...this.options.extensions].filter((s) => ["extension", "node", "mark"].includes(s?.type));
|
|
12786
12800
|
this.extensionManager = new dn(i, this);
|
|
12787
12801
|
}
|
|
@@ -12911,7 +12925,7 @@ let by = class extends Em {
|
|
|
12911
12925
|
}
|
|
12912
12926
|
isActive(e, t) {
|
|
12913
12927
|
const r = typeof e == "string" ? e : null, i = typeof e == "string" ? t : e;
|
|
12914
|
-
return
|
|
12928
|
+
return Wg(this.state, r, i);
|
|
12915
12929
|
}
|
|
12916
12930
|
/**
|
|
12917
12931
|
* Get the document as JSON.
|
|
@@ -13006,7 +13020,7 @@ function bn(n) {
|
|
|
13006
13020
|
}
|
|
13007
13021
|
});
|
|
13008
13022
|
}
|
|
13009
|
-
function
|
|
13023
|
+
function wy(n) {
|
|
13010
13024
|
return new Oi({
|
|
13011
13025
|
find: n.find,
|
|
13012
13026
|
handler: ({ state: e, range: t, match: r }) => {
|
|
@@ -13097,7 +13111,7 @@ class Te {
|
|
|
13097
13111
|
}
|
|
13098
13112
|
}
|
|
13099
13113
|
function Xt(n) {
|
|
13100
|
-
return new
|
|
13114
|
+
return new $m({
|
|
13101
13115
|
find: n.find,
|
|
13102
13116
|
handler: ({ state: e, range: t, match: r, pasteEvent: i }) => {
|
|
13103
13117
|
const s = $(n.getAttributes, void 0, r, i);
|
|
@@ -13114,7 +13128,7 @@ function Xt(n) {
|
|
|
13114
13128
|
}
|
|
13115
13129
|
});
|
|
13116
13130
|
}
|
|
13117
|
-
function
|
|
13131
|
+
function Sy(n, e) {
|
|
13118
13132
|
const { selection: t } = n, { $from: r } = t;
|
|
13119
13133
|
if (t instanceof I) {
|
|
13120
13134
|
const s = r.index();
|
|
@@ -13129,7 +13143,7 @@ function vy(n, e) {
|
|
|
13129
13143
|
}
|
|
13130
13144
|
return !1;
|
|
13131
13145
|
}
|
|
13132
|
-
const
|
|
13146
|
+
const Cy = te.create({
|
|
13133
13147
|
name: "characterCount",
|
|
13134
13148
|
addOptions() {
|
|
13135
13149
|
return {
|
|
@@ -13195,7 +13209,7 @@ const xy = te.create({
|
|
|
13195
13209
|
})
|
|
13196
13210
|
];
|
|
13197
13211
|
}
|
|
13198
|
-
}),
|
|
13212
|
+
}), My = Ze.create({
|
|
13199
13213
|
name: "underline",
|
|
13200
13214
|
addOptions() {
|
|
13201
13215
|
return {
|
|
@@ -13230,7 +13244,7 @@ const xy = te.create({
|
|
|
13230
13244
|
"Mod-U": () => this.editor.commands.toggleUnderline()
|
|
13231
13245
|
};
|
|
13232
13246
|
}
|
|
13233
|
-
}),
|
|
13247
|
+
}), Ty = /^\s*>\s$/, Ey = Te.create({
|
|
13234
13248
|
name: "blockquote",
|
|
13235
13249
|
addOptions() {
|
|
13236
13250
|
return {
|
|
@@ -13263,12 +13277,12 @@ const xy = te.create({
|
|
|
13263
13277
|
addInputRules() {
|
|
13264
13278
|
return [
|
|
13265
13279
|
Gn({
|
|
13266
|
-
find:
|
|
13280
|
+
find: Ty,
|
|
13267
13281
|
type: this.type
|
|
13268
13282
|
})
|
|
13269
13283
|
];
|
|
13270
13284
|
}
|
|
13271
|
-
}),
|
|
13285
|
+
}), Oy = /(?:^|\s)(\*\*(?!\s+\*\*)((?:[^*]+))\*\*(?!\s+\*\*))$/, Ay = /(?:^|\s)(\*\*(?!\s+\*\*)((?:[^*]+))\*\*(?!\s+\*\*))/g, Ny = /(?:^|\s)(__(?!\s+__)((?:[^_]+))__(?!\s+__))$/, Iy = /(?:^|\s)(__(?!\s+__)((?:[^_]+))__(?!\s+__))/g, Dy = Ze.create({
|
|
13272
13286
|
name: "bold",
|
|
13273
13287
|
addOptions() {
|
|
13274
13288
|
return {
|
|
@@ -13313,11 +13327,11 @@ const xy = te.create({
|
|
|
13313
13327
|
addInputRules() {
|
|
13314
13328
|
return [
|
|
13315
13329
|
bn({
|
|
13316
|
-
find:
|
|
13330
|
+
find: Oy,
|
|
13317
13331
|
type: this.type
|
|
13318
13332
|
}),
|
|
13319
13333
|
bn({
|
|
13320
|
-
find:
|
|
13334
|
+
find: Ny,
|
|
13321
13335
|
type: this.type
|
|
13322
13336
|
})
|
|
13323
13337
|
];
|
|
@@ -13325,16 +13339,16 @@ const xy = te.create({
|
|
|
13325
13339
|
addPasteRules() {
|
|
13326
13340
|
return [
|
|
13327
13341
|
Xt({
|
|
13328
|
-
find:
|
|
13342
|
+
find: Ay,
|
|
13329
13343
|
type: this.type
|
|
13330
13344
|
}),
|
|
13331
13345
|
Xt({
|
|
13332
|
-
find:
|
|
13346
|
+
find: Iy,
|
|
13333
13347
|
type: this.type
|
|
13334
13348
|
})
|
|
13335
13349
|
];
|
|
13336
13350
|
}
|
|
13337
|
-
}),
|
|
13351
|
+
}), Ry = "listItem", aa = "textStyle", ca = /^\s*([-+*])\s$/, Ly = Te.create({
|
|
13338
13352
|
name: "bulletList",
|
|
13339
13353
|
addOptions() {
|
|
13340
13354
|
return {
|
|
@@ -13358,7 +13372,7 @@ const xy = te.create({
|
|
|
13358
13372
|
},
|
|
13359
13373
|
addCommands() {
|
|
13360
13374
|
return {
|
|
13361
|
-
toggleBulletList: () => ({ commands: n, chain: e }) => this.options.keepAttributes ? e().toggleList(this.name, this.options.itemTypeName, this.options.keepMarks).updateAttributes(
|
|
13375
|
+
toggleBulletList: () => ({ commands: n, chain: e }) => this.options.keepAttributes ? e().toggleList(this.name, this.options.itemTypeName, this.options.keepMarks).updateAttributes(Ry, this.editor.getAttributes(aa)).run() : n.toggleList(this.name, this.options.itemTypeName, this.options.keepMarks)
|
|
13362
13376
|
};
|
|
13363
13377
|
},
|
|
13364
13378
|
addKeyboardShortcuts() {
|
|
@@ -13382,7 +13396,7 @@ const xy = te.create({
|
|
|
13382
13396
|
n
|
|
13383
13397
|
];
|
|
13384
13398
|
}
|
|
13385
|
-
}),
|
|
13399
|
+
}), Py = /(^|[^`])`([^`]+)`(?!`)/, By = /(^|[^`])`([^`]+)`(?!`)/g, Fy = Ze.create({
|
|
13386
13400
|
name: "code",
|
|
13387
13401
|
addOptions() {
|
|
13388
13402
|
return {
|
|
@@ -13415,7 +13429,7 @@ const xy = te.create({
|
|
|
13415
13429
|
addInputRules() {
|
|
13416
13430
|
return [
|
|
13417
13431
|
bn({
|
|
13418
|
-
find:
|
|
13432
|
+
find: Py,
|
|
13419
13433
|
type: this.type
|
|
13420
13434
|
})
|
|
13421
13435
|
];
|
|
@@ -13423,12 +13437,12 @@ const xy = te.create({
|
|
|
13423
13437
|
addPasteRules() {
|
|
13424
13438
|
return [
|
|
13425
13439
|
Xt({
|
|
13426
|
-
find:
|
|
13440
|
+
find: By,
|
|
13427
13441
|
type: this.type
|
|
13428
13442
|
})
|
|
13429
13443
|
];
|
|
13430
13444
|
}
|
|
13431
|
-
}),
|
|
13445
|
+
}), zy = /^```([a-z]+)?[\s\n]$/, $y = /^~~~([a-z]+)?[\s\n]$/, Hy = Te.create({
|
|
13432
13446
|
name: "codeBlock",
|
|
13433
13447
|
addOptions() {
|
|
13434
13448
|
return {
|
|
@@ -13519,14 +13533,14 @@ const xy = te.create({
|
|
|
13519
13533
|
addInputRules() {
|
|
13520
13534
|
return [
|
|
13521
13535
|
zs({
|
|
13522
|
-
find:
|
|
13536
|
+
find: zy,
|
|
13523
13537
|
type: this.type,
|
|
13524
13538
|
getAttributes: (n) => ({
|
|
13525
13539
|
language: n[1]
|
|
13526
13540
|
})
|
|
13527
13541
|
}),
|
|
13528
13542
|
zs({
|
|
13529
|
-
find:
|
|
13543
|
+
find: $y,
|
|
13530
13544
|
type: this.type,
|
|
13531
13545
|
getAttributes: (n) => ({
|
|
13532
13546
|
language: n[1]
|
|
@@ -13555,19 +13569,19 @@ const xy = te.create({
|
|
|
13555
13569
|
})
|
|
13556
13570
|
];
|
|
13557
13571
|
}
|
|
13558
|
-
}),
|
|
13572
|
+
}), Vy = Te.create({
|
|
13559
13573
|
name: "doc",
|
|
13560
13574
|
topNode: !0,
|
|
13561
13575
|
content: "block+"
|
|
13562
13576
|
});
|
|
13563
|
-
function
|
|
13577
|
+
function jy(n = {}) {
|
|
13564
13578
|
return new Q({
|
|
13565
13579
|
view(e) {
|
|
13566
|
-
return new
|
|
13580
|
+
return new _y(e, n);
|
|
13567
13581
|
}
|
|
13568
13582
|
});
|
|
13569
13583
|
}
|
|
13570
|
-
class
|
|
13584
|
+
class _y {
|
|
13571
13585
|
constructor(e, t) {
|
|
13572
13586
|
var r;
|
|
13573
13587
|
this.editorView = e, this.cursorPos = null, this.element = null, this.timeout = -1, this.width = (r = t.width) !== null && r !== void 0 ? r : 1, this.color = t.color === !1 ? void 0 : t.color || "black", this.class = t.class, this.handlers = ["dragover", "dragend", "drop", "dragleave"].map((i) => {
|
|
@@ -13641,7 +13655,7 @@ class Hy {
|
|
|
13641
13655
|
this.editorView.dom.contains(e.relatedTarget) || this.setCursor(null);
|
|
13642
13656
|
}
|
|
13643
13657
|
}
|
|
13644
|
-
const
|
|
13658
|
+
const Wy = te.create({
|
|
13645
13659
|
name: "dropCursor",
|
|
13646
13660
|
addOptions() {
|
|
13647
13661
|
return {
|
|
@@ -13652,7 +13666,7 @@ const Vy = te.create({
|
|
|
13652
13666
|
},
|
|
13653
13667
|
addProseMirrorPlugins() {
|
|
13654
13668
|
return [
|
|
13655
|
-
|
|
13669
|
+
jy(this.options)
|
|
13656
13670
|
];
|
|
13657
13671
|
}
|
|
13658
13672
|
});
|
|
@@ -13695,7 +13709,7 @@ class Y extends B {
|
|
|
13695
13709
|
*/
|
|
13696
13710
|
static valid(e) {
|
|
13697
13711
|
let t = e.parent;
|
|
13698
|
-
if (t.isTextblock || !
|
|
13712
|
+
if (t.isTextblock || !Ky(e) || !Uy(e))
|
|
13699
13713
|
return !1;
|
|
13700
13714
|
let r = t.type.spec.allowGapCursor;
|
|
13701
13715
|
if (r != null)
|
|
@@ -13756,7 +13770,7 @@ class To {
|
|
|
13756
13770
|
return Y.valid(t) ? new Y(t) : B.near(t);
|
|
13757
13771
|
}
|
|
13758
13772
|
}
|
|
13759
|
-
function
|
|
13773
|
+
function Ky(n) {
|
|
13760
13774
|
for (let e = n.depth; e >= 0; e--) {
|
|
13761
13775
|
let t = n.index(e), r = n.node(e);
|
|
13762
13776
|
if (t == 0) {
|
|
@@ -13773,7 +13787,7 @@ function jy(n) {
|
|
|
13773
13787
|
}
|
|
13774
13788
|
return !0;
|
|
13775
13789
|
}
|
|
13776
|
-
function
|
|
13790
|
+
function Uy(n) {
|
|
13777
13791
|
for (let e = n.depth; e >= 0; e--) {
|
|
13778
13792
|
let t = n.indexAfter(e), r = n.node(e);
|
|
13779
13793
|
if (t == r.childCount) {
|
|
@@ -13790,20 +13804,20 @@ function _y(n) {
|
|
|
13790
13804
|
}
|
|
13791
13805
|
return !0;
|
|
13792
13806
|
}
|
|
13793
|
-
function
|
|
13807
|
+
function qy() {
|
|
13794
13808
|
return new Q({
|
|
13795
13809
|
props: {
|
|
13796
|
-
decorations:
|
|
13810
|
+
decorations: Xy,
|
|
13797
13811
|
createSelectionBetween(n, e, t) {
|
|
13798
13812
|
return e.pos == t.pos && Y.valid(t) ? new Y(t) : null;
|
|
13799
13813
|
},
|
|
13800
|
-
handleClick:
|
|
13801
|
-
handleKeyDown:
|
|
13802
|
-
handleDOMEvents: { beforeinput:
|
|
13814
|
+
handleClick: Gy,
|
|
13815
|
+
handleKeyDown: Jy,
|
|
13816
|
+
handleDOMEvents: { beforeinput: Yy }
|
|
13803
13817
|
}
|
|
13804
13818
|
});
|
|
13805
13819
|
}
|
|
13806
|
-
const
|
|
13820
|
+
const Jy = lu({
|
|
13807
13821
|
ArrowLeft: br("horiz", -1),
|
|
13808
13822
|
ArrowRight: br("horiz", 1),
|
|
13809
13823
|
ArrowUp: br("vert", -1),
|
|
@@ -13822,7 +13836,7 @@ function br(n, e) {
|
|
|
13822
13836
|
return c ? (i && i(r.tr.setSelection(new Y(c))), !0) : !1;
|
|
13823
13837
|
};
|
|
13824
13838
|
}
|
|
13825
|
-
function
|
|
13839
|
+
function Gy(n, e, t) {
|
|
13826
13840
|
if (!n || !n.editable)
|
|
13827
13841
|
return !1;
|
|
13828
13842
|
let r = n.state.doc.resolve(e);
|
|
@@ -13831,7 +13845,7 @@ function Uy(n, e, t) {
|
|
|
13831
13845
|
let i = n.posAtCoords({ left: t.clientX, top: t.clientY });
|
|
13832
13846
|
return i && i.inside > -1 && I.isSelectable(n.state.doc.nodeAt(i.inside)) ? !1 : (n.dispatch(n.state.tr.setSelection(new Y(r))), !0);
|
|
13833
13847
|
}
|
|
13834
|
-
function
|
|
13848
|
+
function Yy(n, e) {
|
|
13835
13849
|
if (e.inputType != "insertCompositionText" || !(n.state.selection instanceof Y))
|
|
13836
13850
|
return !1;
|
|
13837
13851
|
let { $from: t } = n.state.selection, r = t.parent.contentMatchAt(t.index()).findWrapping(n.state.schema.nodes.text);
|
|
@@ -13843,17 +13857,17 @@ function qy(n, e) {
|
|
|
13843
13857
|
let s = n.state.tr.replace(t.pos, t.pos, new E(i, 0, 0));
|
|
13844
13858
|
return s.setSelection(R.near(s.doc.resolve(t.pos + 1))), n.dispatch(s), !1;
|
|
13845
13859
|
}
|
|
13846
|
-
function
|
|
13860
|
+
function Xy(n) {
|
|
13847
13861
|
if (!(n.selection instanceof Y))
|
|
13848
13862
|
return null;
|
|
13849
13863
|
let e = document.createElement("div");
|
|
13850
13864
|
return e.className = "ProseMirror-gapcursor", ne.create(n.doc, [ze.widget(n.selection.head, e, { key: "gapcursor" })]);
|
|
13851
13865
|
}
|
|
13852
|
-
const
|
|
13866
|
+
const Qy = te.create({
|
|
13853
13867
|
name: "gapCursor",
|
|
13854
13868
|
addProseMirrorPlugins() {
|
|
13855
13869
|
return [
|
|
13856
|
-
|
|
13870
|
+
qy()
|
|
13857
13871
|
];
|
|
13858
13872
|
},
|
|
13859
13873
|
extendNodeSchema(n) {
|
|
@@ -13917,7 +13931,7 @@ const Gy = te.create({
|
|
|
13917
13931
|
"Shift-Enter": () => this.editor.commands.setHardBreak()
|
|
13918
13932
|
};
|
|
13919
13933
|
}
|
|
13920
|
-
}),
|
|
13934
|
+
}), Zy = Te.create({
|
|
13921
13935
|
name: "heading",
|
|
13922
13936
|
addOptions() {
|
|
13923
13937
|
return {
|
|
@@ -13976,7 +13990,7 @@ ae.prototype.prepend = function(e) {
|
|
|
13976
13990
|
return e.length ? ae.from(e).append(this) : this;
|
|
13977
13991
|
};
|
|
13978
13992
|
ae.prototype.appendInner = function(e) {
|
|
13979
|
-
return new
|
|
13993
|
+
return new e0(this, e);
|
|
13980
13994
|
};
|
|
13981
13995
|
ae.prototype.slice = function(e, t) {
|
|
13982
13996
|
return e === void 0 && (e = 0), t === void 0 && (t = this.length), e >= t ? ae.empty : this.sliceInner(Math.max(0, e), Math.min(this.length, t));
|
|
@@ -14031,7 +14045,7 @@ var Du = /* @__PURE__ */ function(n) {
|
|
|
14031
14045
|
}, Object.defineProperties(e.prototype, t), e;
|
|
14032
14046
|
}(ae);
|
|
14033
14047
|
ae.empty = new Du([]);
|
|
14034
|
-
var
|
|
14048
|
+
var e0 = /* @__PURE__ */ function(n) {
|
|
14035
14049
|
function e(t, r) {
|
|
14036
14050
|
n.call(this), this.left = t, this.right = r, this.length = t.length + r.length, this.depth = Math.max(t.depth, r.depth) + 1;
|
|
14037
14051
|
}
|
|
@@ -14064,7 +14078,7 @@ var Xy = /* @__PURE__ */ function(n) {
|
|
|
14064
14078
|
return this.left.depth >= Math.max(this.right.depth, r.depth) + 1 ? new e(this.left, new e(this.right, r)) : new e(this, r);
|
|
14065
14079
|
}, e;
|
|
14066
14080
|
}(ae);
|
|
14067
|
-
const
|
|
14081
|
+
const t0 = 500;
|
|
14068
14082
|
class He {
|
|
14069
14083
|
constructor(e, t) {
|
|
14070
14084
|
this.items = e, this.eventCount = t;
|
|
@@ -14106,7 +14120,7 @@ class He {
|
|
|
14106
14120
|
(h = a && a.merge(f)) && (f = h, u ? s.pop() : l = l.slice(0, l.length - 1)), s.push(f), t && (o++, t = void 0), i || (a = f);
|
|
14107
14121
|
}
|
|
14108
14122
|
let c = o - r.depth;
|
|
14109
|
-
return c >
|
|
14123
|
+
return c > r0 && (l = n0(l, c), o -= c), new He(l.append(s), o);
|
|
14110
14124
|
}
|
|
14111
14125
|
remapping(e, t) {
|
|
14112
14126
|
let r = new jn();
|
|
@@ -14146,7 +14160,7 @@ class He {
|
|
|
14146
14160
|
for (let f = t; f < o; f++)
|
|
14147
14161
|
c.push(new Ue(s.maps[f]));
|
|
14148
14162
|
let u = this.items.slice(0, i).append(c).append(r), d = new He(u, l);
|
|
14149
|
-
return d.emptyItemCount() >
|
|
14163
|
+
return d.emptyItemCount() > t0 && (d = d.compress(this.items.length - r.length)), d;
|
|
14150
14164
|
}
|
|
14151
14165
|
emptyItemCount() {
|
|
14152
14166
|
let e = 0;
|
|
@@ -14178,7 +14192,7 @@ class He {
|
|
|
14178
14192
|
}
|
|
14179
14193
|
}
|
|
14180
14194
|
He.empty = new He(ae.empty, 0);
|
|
14181
|
-
function
|
|
14195
|
+
function n0(n, e) {
|
|
14182
14196
|
let t;
|
|
14183
14197
|
return n.forEach((r, i) => {
|
|
14184
14198
|
if (r.selection && e-- == 0)
|
|
@@ -14202,23 +14216,23 @@ class mt {
|
|
|
14202
14216
|
this.done = e, this.undone = t, this.prevRanges = r, this.prevTime = i, this.prevComposition = s;
|
|
14203
14217
|
}
|
|
14204
14218
|
}
|
|
14205
|
-
const
|
|
14206
|
-
function
|
|
14219
|
+
const r0 = 20;
|
|
14220
|
+
function i0(n, e, t, r) {
|
|
14207
14221
|
let i = t.getMeta(Wt), s;
|
|
14208
14222
|
if (i)
|
|
14209
14223
|
return i.historyState;
|
|
14210
|
-
t.getMeta(
|
|
14224
|
+
t.getMeta(l0) && (n = new mt(n.done, n.undone, null, 0, -1));
|
|
14211
14225
|
let o = t.getMeta("appendedTransaction");
|
|
14212
14226
|
if (t.steps.length == 0)
|
|
14213
14227
|
return n;
|
|
14214
14228
|
if (o && o.getMeta(Wt))
|
|
14215
14229
|
return o.getMeta(Wt).redo ? new mt(n.done.addTransform(t, void 0, r, Tr(e)), n.undone, ua(t.mapping.maps), n.prevTime, n.prevComposition) : new mt(n.done, n.undone.addTransform(t, void 0, r, Tr(e)), null, n.prevTime, n.prevComposition);
|
|
14216
14230
|
if (t.getMeta("addToHistory") !== !1 && !(o && o.getMeta("addToHistory") === !1)) {
|
|
14217
|
-
let l = t.getMeta("composition"), a = n.prevTime == 0 || !o && n.prevComposition != l && (n.prevTime < (t.time || 0) - r.newGroupDelay || !
|
|
14231
|
+
let l = t.getMeta("composition"), a = n.prevTime == 0 || !o && n.prevComposition != l && (n.prevTime < (t.time || 0) - r.newGroupDelay || !s0(t, n.prevRanges)), c = o ? rs(n.prevRanges, t.mapping) : ua(t.mapping.maps);
|
|
14218
14232
|
return new mt(n.done.addTransform(t, a ? e.selection.getBookmark() : void 0, r, Tr(e)), He.empty, c, t.time, l ?? n.prevComposition);
|
|
14219
14233
|
} else return (s = t.getMeta("rebased")) ? new mt(n.done.rebased(t, s), n.undone.rebased(t, s), rs(n.prevRanges, t.mapping), n.prevTime, n.prevComposition) : new mt(n.done.addMaps(t.mapping.maps), n.undone.addMaps(t.mapping.maps), rs(n.prevRanges, t.mapping), n.prevTime, n.prevComposition);
|
|
14220
14234
|
}
|
|
14221
|
-
function
|
|
14235
|
+
function s0(n, e) {
|
|
14222
14236
|
if (!e)
|
|
14223
14237
|
return !1;
|
|
14224
14238
|
if (!n.docChanged)
|
|
@@ -14245,7 +14259,7 @@ function rs(n, e) {
|
|
|
14245
14259
|
}
|
|
14246
14260
|
return t;
|
|
14247
14261
|
}
|
|
14248
|
-
function
|
|
14262
|
+
function o0(n, e, t) {
|
|
14249
14263
|
let r = Tr(e), i = Wt.get(e).spec.config, s = (t ? n.undone : n.done).popEvent(e, r);
|
|
14250
14264
|
if (!s)
|
|
14251
14265
|
return null;
|
|
@@ -14265,8 +14279,8 @@ function Tr(n) {
|
|
|
14265
14279
|
}
|
|
14266
14280
|
return is;
|
|
14267
14281
|
}
|
|
14268
|
-
const Wt = new me("history"),
|
|
14269
|
-
function
|
|
14282
|
+
const Wt = new me("history"), l0 = new me("closeHistory");
|
|
14283
|
+
function a0(n = {}) {
|
|
14270
14284
|
return n = {
|
|
14271
14285
|
depth: n.depth || 100,
|
|
14272
14286
|
newGroupDelay: n.newGroupDelay || 500
|
|
@@ -14277,7 +14291,7 @@ function s0(n = {}) {
|
|
|
14277
14291
|
return new mt(He.empty, He.empty, null, 0, -1);
|
|
14278
14292
|
},
|
|
14279
14293
|
apply(e, t, r) {
|
|
14280
|
-
return
|
|
14294
|
+
return i0(t, r, e, n);
|
|
14281
14295
|
}
|
|
14282
14296
|
},
|
|
14283
14297
|
config: n,
|
|
@@ -14297,13 +14311,13 @@ function Ru(n, e) {
|
|
|
14297
14311
|
if (!i || (n ? i.undone : i.done).eventCount == 0)
|
|
14298
14312
|
return !1;
|
|
14299
14313
|
if (r) {
|
|
14300
|
-
let s =
|
|
14314
|
+
let s = o0(i, t, n);
|
|
14301
14315
|
s && r(e ? s.scrollIntoView() : s);
|
|
14302
14316
|
}
|
|
14303
14317
|
return !0;
|
|
14304
14318
|
};
|
|
14305
14319
|
}
|
|
14306
|
-
const Lu = Ru(!1, !0), Pu = Ru(!0, !0),
|
|
14320
|
+
const Lu = Ru(!1, !0), Pu = Ru(!0, !0), c0 = te.create({
|
|
14307
14321
|
name: "history",
|
|
14308
14322
|
addOptions() {
|
|
14309
14323
|
return {
|
|
@@ -14319,7 +14333,7 @@ const Lu = Ru(!1, !0), Pu = Ru(!0, !0), o0 = te.create({
|
|
|
14319
14333
|
},
|
|
14320
14334
|
addProseMirrorPlugins() {
|
|
14321
14335
|
return [
|
|
14322
|
-
|
|
14336
|
+
a0(this.options)
|
|
14323
14337
|
];
|
|
14324
14338
|
},
|
|
14325
14339
|
addKeyboardShortcuts() {
|
|
@@ -14332,7 +14346,7 @@ const Lu = Ru(!1, !0), Pu = Ru(!0, !0), o0 = te.create({
|
|
|
14332
14346
|
"Shift-Mod-я": () => this.editor.commands.redo()
|
|
14333
14347
|
};
|
|
14334
14348
|
}
|
|
14335
|
-
}),
|
|
14349
|
+
}), u0 = Te.create({
|
|
14336
14350
|
name: "horizontalRule",
|
|
14337
14351
|
addOptions() {
|
|
14338
14352
|
return {
|
|
@@ -14349,7 +14363,7 @@ const Lu = Ru(!1, !0), Pu = Ru(!0, !0), o0 = te.create({
|
|
|
14349
14363
|
addCommands() {
|
|
14350
14364
|
return {
|
|
14351
14365
|
setHorizontalRule: () => ({ chain: n, state: e }) => {
|
|
14352
|
-
if (!
|
|
14366
|
+
if (!Sy(e, e.schema.nodes[this.name]))
|
|
14353
14367
|
return !1;
|
|
14354
14368
|
const { selection: t } = e, { $from: r, $to: i } = t, s = n();
|
|
14355
14369
|
return r.parentOffset === 0 ? s.insertContentAt({
|
|
@@ -14378,13 +14392,13 @@ const Lu = Ru(!1, !0), Pu = Ru(!0, !0), o0 = te.create({
|
|
|
14378
14392
|
},
|
|
14379
14393
|
addInputRules() {
|
|
14380
14394
|
return [
|
|
14381
|
-
|
|
14395
|
+
wy({
|
|
14382
14396
|
find: /^(?:---|—-|___\s|\*\*\*\s)$/,
|
|
14383
14397
|
type: this.type
|
|
14384
14398
|
})
|
|
14385
14399
|
];
|
|
14386
14400
|
}
|
|
14387
|
-
}),
|
|
14401
|
+
}), d0 = /(?:^|\s)(\*(?!\s+\*)((?:[^*]+))\*(?!\s+\*))$/, f0 = /(?:^|\s)(\*(?!\s+\*)((?:[^*]+))\*(?!\s+\*))/g, h0 = /(?:^|\s)(_(?!\s+_)((?:[^_]+))_(?!\s+_))$/, p0 = /(?:^|\s)(_(?!\s+_)((?:[^_]+))_(?!\s+_))/g, m0 = Ze.create({
|
|
14388
14402
|
name: "italic",
|
|
14389
14403
|
addOptions() {
|
|
14390
14404
|
return {
|
|
@@ -14428,11 +14442,11 @@ const Lu = Ru(!1, !0), Pu = Ru(!0, !0), o0 = te.create({
|
|
|
14428
14442
|
addInputRules() {
|
|
14429
14443
|
return [
|
|
14430
14444
|
bn({
|
|
14431
|
-
find:
|
|
14445
|
+
find: d0,
|
|
14432
14446
|
type: this.type
|
|
14433
14447
|
}),
|
|
14434
14448
|
bn({
|
|
14435
|
-
find:
|
|
14449
|
+
find: h0,
|
|
14436
14450
|
type: this.type
|
|
14437
14451
|
})
|
|
14438
14452
|
];
|
|
@@ -14440,16 +14454,16 @@ const Lu = Ru(!1, !0), Pu = Ru(!0, !0), o0 = te.create({
|
|
|
14440
14454
|
addPasteRules() {
|
|
14441
14455
|
return [
|
|
14442
14456
|
Xt({
|
|
14443
|
-
find:
|
|
14457
|
+
find: f0,
|
|
14444
14458
|
type: this.type
|
|
14445
14459
|
}),
|
|
14446
14460
|
Xt({
|
|
14447
|
-
find:
|
|
14461
|
+
find: p0,
|
|
14448
14462
|
type: this.type
|
|
14449
14463
|
})
|
|
14450
14464
|
];
|
|
14451
14465
|
}
|
|
14452
|
-
}),
|
|
14466
|
+
}), g0 = Te.create({
|
|
14453
14467
|
name: "listItem",
|
|
14454
14468
|
addOptions() {
|
|
14455
14469
|
return {
|
|
@@ -14477,7 +14491,7 @@ const Lu = Ru(!1, !0), Pu = Ru(!0, !0), o0 = te.create({
|
|
|
14477
14491
|
"Shift-Tab": () => this.editor.commands.liftListItem(this.name)
|
|
14478
14492
|
};
|
|
14479
14493
|
}
|
|
14480
|
-
}),
|
|
14494
|
+
}), y0 = "listItem", fa = "textStyle", ha = /^(\d+)\.\s$/, b0 = Te.create({
|
|
14481
14495
|
name: "orderedList",
|
|
14482
14496
|
addOptions() {
|
|
14483
14497
|
return {
|
|
@@ -14516,7 +14530,7 @@ const Lu = Ru(!1, !0), Pu = Ru(!0, !0), o0 = te.create({
|
|
|
14516
14530
|
},
|
|
14517
14531
|
addCommands() {
|
|
14518
14532
|
return {
|
|
14519
|
-
toggleOrderedList: () => ({ commands: n, chain: e }) => this.options.keepAttributes ? e().toggleList(this.name, this.options.itemTypeName, this.options.keepMarks).updateAttributes(
|
|
14533
|
+
toggleOrderedList: () => ({ commands: n, chain: e }) => this.options.keepAttributes ? e().toggleList(this.name, this.options.itemTypeName, this.options.keepMarks).updateAttributes(y0, this.editor.getAttributes(fa)).run() : n.toggleList(this.name, this.options.itemTypeName, this.options.keepMarks)
|
|
14520
14534
|
};
|
|
14521
14535
|
},
|
|
14522
14536
|
addKeyboardShortcuts() {
|
|
@@ -14571,7 +14585,7 @@ const Lu = Ru(!1, !0), Pu = Ru(!0, !0), o0 = te.create({
|
|
|
14571
14585
|
"Mod-Alt-0": () => this.editor.commands.setParagraph()
|
|
14572
14586
|
};
|
|
14573
14587
|
}
|
|
14574
|
-
}),
|
|
14588
|
+
}), k0 = /(?:^|\s)(~~(?!\s+~~)((?:[^~]+))~~(?!\s+~~))$/, v0 = /(?:^|\s)(~~(?!\s+~~)((?:[^~]+))~~(?!\s+~~))/g, x0 = Ze.create({
|
|
14575
14589
|
name: "strike",
|
|
14576
14590
|
addOptions() {
|
|
14577
14591
|
return {
|
|
@@ -14614,7 +14628,7 @@ const Lu = Ru(!1, !0), Pu = Ru(!0, !0), o0 = te.create({
|
|
|
14614
14628
|
addInputRules() {
|
|
14615
14629
|
return [
|
|
14616
14630
|
bn({
|
|
14617
|
-
find:
|
|
14631
|
+
find: k0,
|
|
14618
14632
|
type: this.type
|
|
14619
14633
|
})
|
|
14620
14634
|
];
|
|
@@ -14622,28 +14636,28 @@ const Lu = Ru(!1, !0), Pu = Ru(!0, !0), o0 = te.create({
|
|
|
14622
14636
|
addPasteRules() {
|
|
14623
14637
|
return [
|
|
14624
14638
|
Xt({
|
|
14625
|
-
find:
|
|
14639
|
+
find: v0,
|
|
14626
14640
|
type: this.type
|
|
14627
14641
|
})
|
|
14628
14642
|
];
|
|
14629
14643
|
}
|
|
14630
|
-
}),
|
|
14644
|
+
}), w0 = Te.create({
|
|
14631
14645
|
name: "text",
|
|
14632
14646
|
group: "inline"
|
|
14633
|
-
}),
|
|
14647
|
+
}), S0 = te.create({
|
|
14634
14648
|
name: "starterKit",
|
|
14635
14649
|
addExtensions() {
|
|
14636
14650
|
const n = [];
|
|
14637
|
-
return this.options.bold !== !1 && n.push(
|
|
14651
|
+
return this.options.bold !== !1 && n.push(Dy.configure(this.options.bold)), this.options.blockquote !== !1 && n.push(Ey.configure(this.options.blockquote)), this.options.bulletList !== !1 && n.push(Ly.configure(this.options.bulletList)), this.options.code !== !1 && n.push(Fy.configure(this.options.code)), this.options.codeBlock !== !1 && n.push(Hy.configure(this.options.codeBlock)), this.options.document !== !1 && n.push(Vy.configure(this.options.document)), this.options.dropcursor !== !1 && n.push(Wy.configure(this.options.dropcursor)), this.options.gapcursor !== !1 && n.push(Qy.configure(this.options.gapcursor)), this.options.hardBreak !== !1 && n.push(Iu.configure(this.options.hardBreak)), this.options.heading !== !1 && n.push(Zy.configure(this.options.heading)), this.options.history !== !1 && n.push(c0.configure(this.options.history)), this.options.horizontalRule !== !1 && n.push(u0.configure(this.options.horizontalRule)), this.options.italic !== !1 && n.push(m0.configure(this.options.italic)), this.options.listItem !== !1 && n.push(g0.configure(this.options.listItem)), this.options.orderedList !== !1 && n.push(b0.configure(this.options.orderedList)), this.options.paragraph !== !1 && n.push(Bu.configure(this.options.paragraph)), this.options.strike !== !1 && n.push(x0.configure(this.options.strike)), this.options.text !== !1 && n.push(w0.configure(this.options.text)), n;
|
|
14638
14652
|
}
|
|
14639
14653
|
});
|
|
14640
|
-
var
|
|
14654
|
+
var C0 = "tippy-box", Fu = "tippy-content", M0 = "tippy-backdrop", zu = "tippy-arrow", $u = "tippy-svg-arrow", Rt = {
|
|
14641
14655
|
passive: !0,
|
|
14642
14656
|
capture: !0
|
|
14643
14657
|
}, Hu = function() {
|
|
14644
14658
|
return document.body;
|
|
14645
14659
|
};
|
|
14646
|
-
function
|
|
14660
|
+
function T0(n, e) {
|
|
14647
14661
|
return {}.hasOwnProperty.call(n, e);
|
|
14648
14662
|
}
|
|
14649
14663
|
function ss(n, e, t) {
|
|
@@ -14670,13 +14684,13 @@ function pa(n, e) {
|
|
|
14670
14684
|
}, e);
|
|
14671
14685
|
};
|
|
14672
14686
|
}
|
|
14673
|
-
function
|
|
14687
|
+
function E0(n, e) {
|
|
14674
14688
|
var t = Object.assign({}, n);
|
|
14675
14689
|
return e.forEach(function(r) {
|
|
14676
14690
|
delete t[r];
|
|
14677
14691
|
}), t;
|
|
14678
14692
|
}
|
|
14679
|
-
function
|
|
14693
|
+
function O0(n) {
|
|
14680
14694
|
return n.split(/\s+/).filter(Boolean);
|
|
14681
14695
|
}
|
|
14682
14696
|
function an(n) {
|
|
@@ -14685,12 +14699,12 @@ function an(n) {
|
|
|
14685
14699
|
function ma(n, e) {
|
|
14686
14700
|
n.indexOf(e) === -1 && n.push(e);
|
|
14687
14701
|
}
|
|
14688
|
-
function
|
|
14702
|
+
function A0(n) {
|
|
14689
14703
|
return n.filter(function(e, t) {
|
|
14690
14704
|
return n.indexOf(e) === t;
|
|
14691
14705
|
});
|
|
14692
14706
|
}
|
|
14693
|
-
function
|
|
14707
|
+
function N0(n) {
|
|
14694
14708
|
return n.split("-")[0];
|
|
14695
14709
|
}
|
|
14696
14710
|
function jr(n) {
|
|
@@ -14709,17 +14723,17 @@ function Yn(n) {
|
|
|
14709
14723
|
return Eo(n, e);
|
|
14710
14724
|
});
|
|
14711
14725
|
}
|
|
14712
|
-
function
|
|
14726
|
+
function I0(n) {
|
|
14713
14727
|
return Eo(n, "NodeList");
|
|
14714
14728
|
}
|
|
14715
|
-
function
|
|
14729
|
+
function D0(n) {
|
|
14716
14730
|
return Eo(n, "MouseEvent");
|
|
14717
14731
|
}
|
|
14718
|
-
function
|
|
14732
|
+
function R0(n) {
|
|
14719
14733
|
return !!(n && n._tippy && n._tippy.reference === n);
|
|
14720
14734
|
}
|
|
14721
|
-
function
|
|
14722
|
-
return Yn(n) ? [n] :
|
|
14735
|
+
function L0(n) {
|
|
14736
|
+
return Yn(n) ? [n] : I0(n) ? jr(n) : Array.isArray(n) ? n : jr(document.querySelectorAll(n));
|
|
14723
14737
|
}
|
|
14724
14738
|
function ls(n, e) {
|
|
14725
14739
|
n.forEach(function(t) {
|
|
@@ -14731,14 +14745,14 @@ function ya(n, e) {
|
|
|
14731
14745
|
t && t.setAttribute("data-state", e);
|
|
14732
14746
|
});
|
|
14733
14747
|
}
|
|
14734
|
-
function
|
|
14748
|
+
function P0(n) {
|
|
14735
14749
|
var e, t = an(n), r = t[0];
|
|
14736
14750
|
return r != null && (e = r.ownerDocument) != null && e.body ? r.ownerDocument : document;
|
|
14737
14751
|
}
|
|
14738
|
-
function
|
|
14752
|
+
function B0(n, e) {
|
|
14739
14753
|
var t = e.clientX, r = e.clientY;
|
|
14740
14754
|
return n.every(function(i) {
|
|
14741
|
-
var s = i.popperRect, o = i.popperState, l = i.props, a = l.interactiveBorder, c =
|
|
14755
|
+
var s = i.popperRect, o = i.popperState, l = i.props, a = l.interactiveBorder, c = N0(o.placement), u = o.modifiersData.offset;
|
|
14742
14756
|
if (!u)
|
|
14743
14757
|
return !0;
|
|
14744
14758
|
var d = c === "bottom" ? u.top.y : 0, f = c === "top" ? u.bottom.y : 0, h = c === "right" ? u.left.x : 0, p = c === "left" ? u.right.x : 0, m = s.top - r + d > a, y = r - s.bottom - f > a, b = s.left - t + h > a, C = t - s.right - p > a;
|
|
@@ -14763,24 +14777,24 @@ function ba(n, e) {
|
|
|
14763
14777
|
var Ge = {
|
|
14764
14778
|
isTouch: !1
|
|
14765
14779
|
}, ka = 0;
|
|
14766
|
-
function
|
|
14780
|
+
function F0() {
|
|
14767
14781
|
Ge.isTouch || (Ge.isTouch = !0, window.performance && document.addEventListener("mousemove", ju));
|
|
14768
14782
|
}
|
|
14769
14783
|
function ju() {
|
|
14770
14784
|
var n = performance.now();
|
|
14771
14785
|
n - ka < 20 && (Ge.isTouch = !1, document.removeEventListener("mousemove", ju)), ka = n;
|
|
14772
14786
|
}
|
|
14773
|
-
function
|
|
14787
|
+
function z0() {
|
|
14774
14788
|
var n = document.activeElement;
|
|
14775
|
-
if (
|
|
14789
|
+
if (R0(n)) {
|
|
14776
14790
|
var e = n._tippy;
|
|
14777
14791
|
n.blur && !e.state.isVisible && n.blur();
|
|
14778
14792
|
}
|
|
14779
14793
|
}
|
|
14780
|
-
function
|
|
14781
|
-
document.addEventListener("touchstart",
|
|
14794
|
+
function $0() {
|
|
14795
|
+
document.addEventListener("touchstart", F0, Rt), window.addEventListener("blur", z0);
|
|
14782
14796
|
}
|
|
14783
|
-
var
|
|
14797
|
+
var H0 = typeof window < "u" && typeof document < "u", V0 = H0 ? (
|
|
14784
14798
|
// @ts-ignore
|
|
14785
14799
|
!!window.msCrypto
|
|
14786
14800
|
) : !1;
|
|
@@ -14792,7 +14806,7 @@ function va(n) {
|
|
|
14792
14806
|
var e = /[ \t]{2,}/g, t = /^[ \t]*/gm;
|
|
14793
14807
|
return n.replace(e, " ").replace(t, "").trim();
|
|
14794
14808
|
}
|
|
14795
|
-
function
|
|
14809
|
+
function j0(n) {
|
|
14796
14810
|
return va(`
|
|
14797
14811
|
%ctippy.js
|
|
14798
14812
|
|
|
@@ -14803,7 +14817,7 @@ function $0(n) {
|
|
|
14803
14817
|
}
|
|
14804
14818
|
function _u(n) {
|
|
14805
14819
|
return [
|
|
14806
|
-
|
|
14820
|
+
j0(n),
|
|
14807
14821
|
// title
|
|
14808
14822
|
"color: #00C584; font-size: 1.3em; font-weight: bold;",
|
|
14809
14823
|
// message
|
|
@@ -14813,8 +14827,8 @@ function _u(n) {
|
|
|
14813
14827
|
];
|
|
14814
14828
|
}
|
|
14815
14829
|
var Xn;
|
|
14816
|
-
process.env.NODE_ENV !== "production" &&
|
|
14817
|
-
function
|
|
14830
|
+
process.env.NODE_ENV !== "production" && _0();
|
|
14831
|
+
function _0() {
|
|
14818
14832
|
Xn = /* @__PURE__ */ new Set();
|
|
14819
14833
|
}
|
|
14820
14834
|
function lt(n, e) {
|
|
@@ -14829,7 +14843,7 @@ function $s(n, e) {
|
|
|
14829
14843
|
Xn.add(e), (t = console).error.apply(t, _u(e));
|
|
14830
14844
|
}
|
|
14831
14845
|
}
|
|
14832
|
-
function
|
|
14846
|
+
function W0(n) {
|
|
14833
14847
|
var e = !n, t = Object.prototype.toString.call(n) === "[object Object]" && !n.addEventListener;
|
|
14834
14848
|
$s(e, ["tippy() was passed", "`" + String(n) + "`", "as its targets (first) argument. Valid types are: String, Element,", "Element[], or NodeList."].join(" ")), $s(t, ["tippy() was passed a plain object which is not supported as an argument", "for virtual positioning. Use props.getReferenceClientRect instead."].join(" "));
|
|
14835
14849
|
}
|
|
@@ -14838,7 +14852,7 @@ var Wu = {
|
|
|
14838
14852
|
followCursor: !1,
|
|
14839
14853
|
inlinePositioning: !1,
|
|
14840
14854
|
sticky: !1
|
|
14841
|
-
},
|
|
14855
|
+
}, K0 = {
|
|
14842
14856
|
allowHTML: !1,
|
|
14843
14857
|
animation: "fade",
|
|
14844
14858
|
arrow: !0,
|
|
@@ -14896,7 +14910,7 @@ var Wu = {
|
|
|
14896
14910
|
touch: !0,
|
|
14897
14911
|
trigger: "mouseenter focus",
|
|
14898
14912
|
triggerTarget: null
|
|
14899
|
-
}, Wu,
|
|
14913
|
+
}, Wu, K0), U0 = Object.keys(Ae), q0 = function(e) {
|
|
14900
14914
|
process.env.NODE_ENV !== "production" && Uu(e, []);
|
|
14901
14915
|
var t = Object.keys(e);
|
|
14902
14916
|
t.forEach(function(r) {
|
|
@@ -14914,10 +14928,10 @@ function Ku(n) {
|
|
|
14914
14928
|
}, {});
|
|
14915
14929
|
return Object.assign({}, n, t);
|
|
14916
14930
|
}
|
|
14917
|
-
function
|
|
14931
|
+
function J0(n, e) {
|
|
14918
14932
|
var t = e ? Object.keys(Ku(Object.assign({}, Ae, {
|
|
14919
14933
|
plugins: e
|
|
14920
|
-
}))) :
|
|
14934
|
+
}))) : U0, r = t.reduce(function(i, s) {
|
|
14921
14935
|
var o = (n.getAttribute("data-tippy-" + s) || "").trim();
|
|
14922
14936
|
if (!o)
|
|
14923
14937
|
return i;
|
|
@@ -14936,7 +14950,7 @@ function K0(n, e) {
|
|
|
14936
14950
|
function xa(n, e) {
|
|
14937
14951
|
var t = Object.assign({}, e, {
|
|
14938
14952
|
content: Vu(e.content, [n])
|
|
14939
|
-
}, e.ignoreAttributes ? {} :
|
|
14953
|
+
}, e.ignoreAttributes ? {} : J0(n, e.plugins));
|
|
14940
14954
|
return t.aria = Object.assign({}, Ae.aria, t.aria), t.aria = {
|
|
14941
14955
|
expanded: t.aria.expanded === "auto" ? e.interactive : t.aria.expanded,
|
|
14942
14956
|
content: t.aria.content === "auto" ? e.interactive ? null : "describedby" : t.aria.content
|
|
@@ -14946,7 +14960,7 @@ function Uu(n, e) {
|
|
|
14946
14960
|
n === void 0 && (n = {}), e === void 0 && (e = []);
|
|
14947
14961
|
var t = Object.keys(n);
|
|
14948
14962
|
t.forEach(function(r) {
|
|
14949
|
-
var i =
|
|
14963
|
+
var i = E0(Ae, Object.keys(Wu)), s = !T0(i, r);
|
|
14950
14964
|
s && (s = e.filter(function(o) {
|
|
14951
14965
|
return o.name === r;
|
|
14952
14966
|
}).length === 0), lt(s, ["`" + r + "`", "is not a valid prop. You may have spelled it incorrectly, or if it's", "a plugin, forgot to pass it in an array as props.plugins.", `
|
|
@@ -14955,11 +14969,11 @@ function Uu(n, e) {
|
|
|
14955
14969
|
`, "Plugins: https://atomiks.github.io/tippyjs/v6/plugins/"].join(" "));
|
|
14956
14970
|
});
|
|
14957
14971
|
}
|
|
14958
|
-
var
|
|
14972
|
+
var G0 = function() {
|
|
14959
14973
|
return "innerHTML";
|
|
14960
14974
|
};
|
|
14961
14975
|
function Hs(n, e) {
|
|
14962
|
-
n[
|
|
14976
|
+
n[G0()] = e;
|
|
14963
14977
|
}
|
|
14964
14978
|
function wa(n) {
|
|
14965
14979
|
var e = Dn();
|
|
@@ -14979,13 +14993,13 @@ function Vs(n) {
|
|
|
14979
14993
|
return r.classList.contains(zu) || r.classList.contains($u);
|
|
14980
14994
|
}),
|
|
14981
14995
|
backdrop: t.find(function(r) {
|
|
14982
|
-
return r.classList.contains(
|
|
14996
|
+
return r.classList.contains(M0);
|
|
14983
14997
|
})
|
|
14984
14998
|
};
|
|
14985
14999
|
}
|
|
14986
15000
|
function qu(n) {
|
|
14987
15001
|
var e = Dn(), t = Dn();
|
|
14988
|
-
t.className =
|
|
15002
|
+
t.className = C0, t.setAttribute("data-state", "hidden"), t.setAttribute("tabindex", "-1");
|
|
14989
15003
|
var r = Dn();
|
|
14990
15004
|
r.className = Fu, r.setAttribute("data-state", "hidden"), Sa(r, n.props), e.appendChild(t), t.appendChild(r), i(n.props, n.props);
|
|
14991
15005
|
function i(s, o) {
|
|
@@ -14998,9 +15012,9 @@ function qu(n) {
|
|
|
14998
15012
|
};
|
|
14999
15013
|
}
|
|
15000
15014
|
qu.$$tippy = !0;
|
|
15001
|
-
var
|
|
15002
|
-
function
|
|
15003
|
-
var t = xa(n, Object.assign({}, Ae, Ku(ga(e)))), r, i, s, o = !1, l = !1, a = !1, c = !1, u, d, f, h = [], p = pa(Ko, t.interactiveDebounce), m, y =
|
|
15015
|
+
var Y0 = 1, kr = [], cs = [];
|
|
15016
|
+
function X0(n, e) {
|
|
15017
|
+
var t = xa(n, Object.assign({}, Ae, Ku(ga(e)))), r, i, s, o = !1, l = !1, a = !1, c = !1, u, d, f, h = [], p = pa(Ko, t.interactiveDebounce), m, y = Y0++, b = null, C = A0(t.plugins), M = {
|
|
15004
15018
|
// Is the instance currently enabled?
|
|
15005
15019
|
isEnabled: !0,
|
|
15006
15020
|
// Is the tippy currently showing and not transitioning out?
|
|
@@ -15060,7 +15074,7 @@ function J0(n, e) {
|
|
|
15060
15074
|
}
|
|
15061
15075
|
function et() {
|
|
15062
15076
|
var k = X().parentNode;
|
|
15063
|
-
return k ?
|
|
15077
|
+
return k ? P0(k) : document;
|
|
15064
15078
|
}
|
|
15065
15079
|
function We() {
|
|
15066
15080
|
return Vs(v);
|
|
@@ -15172,14 +15186,14 @@ function J0(n, e) {
|
|
|
15172
15186
|
passive: !0
|
|
15173
15187
|
}), Zt("touchend", Uo, {
|
|
15174
15188
|
passive: !0
|
|
15175
|
-
})),
|
|
15189
|
+
})), O0(g.props.trigger).forEach(function(k) {
|
|
15176
15190
|
if (k !== "manual")
|
|
15177
15191
|
switch (Zt(k, Wo), k) {
|
|
15178
15192
|
case "mouseenter":
|
|
15179
15193
|
Zt("mouseleave", Uo);
|
|
15180
15194
|
break;
|
|
15181
15195
|
case "focus":
|
|
15182
|
-
Zt(
|
|
15196
|
+
Zt(V0 ? "focusout" : "blur", qo);
|
|
15183
15197
|
break;
|
|
15184
15198
|
case "focusin":
|
|
15185
15199
|
Zt("focusout", qo);
|
|
@@ -15197,7 +15211,7 @@ function J0(n, e) {
|
|
|
15197
15211
|
var A, D = !1;
|
|
15198
15212
|
if (!(!g.state.isEnabled || Jo(k) || l)) {
|
|
15199
15213
|
var W = ((A = u) == null ? void 0 : A.type) === "focus";
|
|
15200
|
-
u = k, m = k.currentTarget, xn(), !g.state.isVisible &&
|
|
15214
|
+
u = k, m = k.currentTarget, xn(), !g.state.isVisible && D0(k) && kr.forEach(function(_) {
|
|
15201
15215
|
return _(k);
|
|
15202
15216
|
}), k.type === "click" && (g.props.trigger.indexOf("mouseenter") < 0 || o) && g.props.hideOnClick !== !1 && g.state.isVisible ? D = !0 : Xo(k), k.type === "click" && (o = !D), D && !W && ar(k);
|
|
15203
15217
|
}
|
|
@@ -15213,7 +15227,7 @@ function J0(n, e) {
|
|
|
15213
15227
|
props: t
|
|
15214
15228
|
} : null;
|
|
15215
15229
|
}).filter(Boolean);
|
|
15216
|
-
|
|
15230
|
+
B0(W, k) && (Di(), ar(k));
|
|
15217
15231
|
}
|
|
15218
15232
|
}
|
|
15219
15233
|
function Uo(k) {
|
|
@@ -15403,10 +15417,10 @@ function J0(n, e) {
|
|
|
15403
15417
|
function vn(n, e) {
|
|
15404
15418
|
e === void 0 && (e = {});
|
|
15405
15419
|
var t = Ae.plugins.concat(e.plugins || []);
|
|
15406
|
-
process.env.NODE_ENV !== "production" && (
|
|
15420
|
+
process.env.NODE_ENV !== "production" && (W0(n), Uu(e, t)), $0();
|
|
15407
15421
|
var r = Object.assign({}, e, {
|
|
15408
15422
|
plugins: t
|
|
15409
|
-
}), i =
|
|
15423
|
+
}), i = L0(n);
|
|
15410
15424
|
if (process.env.NODE_ENV !== "production") {
|
|
15411
15425
|
var s = Yn(r.content), o = i.length > 1;
|
|
15412
15426
|
lt(s && o, ["tippy() was passed an Element as the `content` prop, but more than", "one tippy instance was created by this invocation. This means the", "content element will only be appended to the last tippy instance.", `
|
|
@@ -15417,13 +15431,13 @@ function vn(n, e) {
|
|
|
15417
15431
|
`, "2) content: () => element.cloneNode(true)"].join(" "));
|
|
15418
15432
|
}
|
|
15419
15433
|
var l = i.reduce(function(a, c) {
|
|
15420
|
-
var u = c &&
|
|
15434
|
+
var u = c && X0(c, r);
|
|
15421
15435
|
return u && a.push(u), a;
|
|
15422
15436
|
}, []);
|
|
15423
15437
|
return Yn(n) ? l[0] : l;
|
|
15424
15438
|
}
|
|
15425
15439
|
vn.defaultProps = Ae;
|
|
15426
|
-
vn.setDefaultProps =
|
|
15440
|
+
vn.setDefaultProps = q0;
|
|
15427
15441
|
vn.currentInput = Ge;
|
|
15428
15442
|
Object.assign({}, Dd, {
|
|
15429
15443
|
effect: function(e) {
|
|
@@ -15445,7 +15459,7 @@ Object.assign({}, Dd, {
|
|
|
15445
15459
|
vn.setDefaultProps({
|
|
15446
15460
|
render: qu
|
|
15447
15461
|
});
|
|
15448
|
-
class
|
|
15462
|
+
class Q0 {
|
|
15449
15463
|
constructor({ editor: e, element: t, view: r, tippyOptions: i = {}, updateDelay: s = 250, shouldShow: o }) {
|
|
15450
15464
|
this.preventHide = !1, this.shouldShow = ({ view: l, state: a, from: c, to: u }) => {
|
|
15451
15465
|
const { doc: d, selection: f } = a, { empty: h } = f, p = !d.textBetween(c, u).length && vo(a.selection), m = this.element.contains(document.activeElement);
|
|
@@ -15541,7 +15555,7 @@ class G0 {
|
|
|
15541
15555
|
}
|
|
15542
15556
|
const Ju = (n) => new Q({
|
|
15543
15557
|
key: typeof n.pluginKey == "string" ? new me(n.pluginKey) : n.pluginKey,
|
|
15544
|
-
view: (e) => new
|
|
15558
|
+
view: (e) => new Q0({ view: e, ...n })
|
|
15545
15559
|
});
|
|
15546
15560
|
te.create({
|
|
15547
15561
|
name: "bubbleMenu",
|
|
@@ -15567,7 +15581,7 @@ te.create({
|
|
|
15567
15581
|
] : [];
|
|
15568
15582
|
}
|
|
15569
15583
|
});
|
|
15570
|
-
class
|
|
15584
|
+
class Z0 {
|
|
15571
15585
|
getTextContent(e) {
|
|
15572
15586
|
return Ou(e, { textSerializers: bo(this.editor.schema) });
|
|
15573
15587
|
}
|
|
@@ -15636,7 +15650,7 @@ class Y0 {
|
|
|
15636
15650
|
}
|
|
15637
15651
|
const Gu = (n) => new Q({
|
|
15638
15652
|
key: typeof n.pluginKey == "string" ? new me(n.pluginKey) : n.pluginKey,
|
|
15639
|
-
view: (e) => new
|
|
15653
|
+
view: (e) => new Z0({ view: e, ...n })
|
|
15640
15654
|
});
|
|
15641
15655
|
te.create({
|
|
15642
15656
|
name: "floatingMenu",
|
|
@@ -15719,7 +15733,7 @@ function Ca(n) {
|
|
|
15719
15733
|
}
|
|
15720
15734
|
}));
|
|
15721
15735
|
}
|
|
15722
|
-
class
|
|
15736
|
+
class eb extends xy {
|
|
15723
15737
|
constructor(e = {}) {
|
|
15724
15738
|
return super(e), this.contentComponent = null, this.appContext = null, this.reactiveState = Ca(this.view.state), this.reactiveExtensionStorage = Ca(this.extensionStorage), this.on("beforeTransaction", ({ nextState: t }) => {
|
|
15725
15739
|
this.reactiveState.value = t, this.reactiveExtensionStorage.value = this.extensionStorage;
|
|
@@ -15746,7 +15760,7 @@ class X0 extends by {
|
|
|
15746
15760
|
return this.reactiveState && t && (this.reactiveState.value = t), t;
|
|
15747
15761
|
}
|
|
15748
15762
|
}
|
|
15749
|
-
const
|
|
15763
|
+
const tb = pe({
|
|
15750
15764
|
name: "EditorContent",
|
|
15751
15765
|
props: {
|
|
15752
15766
|
editor: {
|
|
@@ -15867,33 +15881,33 @@ pe({
|
|
|
15867
15881
|
}, (e = (n = this.$slots).default) === null || e === void 0 ? void 0 : e.call(n));
|
|
15868
15882
|
}
|
|
15869
15883
|
});
|
|
15870
|
-
const
|
|
15884
|
+
const nb = (n = {}) => {
|
|
15871
15885
|
const e = Sd();
|
|
15872
15886
|
return nr(() => {
|
|
15873
|
-
e.value = new
|
|
15887
|
+
e.value = new eb(n);
|
|
15874
15888
|
}), yi(() => {
|
|
15875
15889
|
var t, r, i;
|
|
15876
15890
|
const s = (t = e.value) === null || t === void 0 ? void 0 : t.options.element, o = s?.cloneNode(!0);
|
|
15877
15891
|
(r = s?.parentNode) === null || r === void 0 || r.replaceChild(o, s), (i = e.value) === null || i === void 0 || i.destroy();
|
|
15878
15892
|
}), e;
|
|
15879
|
-
},
|
|
15893
|
+
}, rb = Iu.extend({
|
|
15880
15894
|
addKeyboardShortcuts() {
|
|
15881
15895
|
return {
|
|
15882
15896
|
"Shift-Enter": () => this.editor.commands.setHardBreak()
|
|
15883
15897
|
};
|
|
15884
15898
|
}
|
|
15885
|
-
}),
|
|
15886
|
-
function
|
|
15899
|
+
}), ib = "aaa1rp3bb0ott3vie4c1le2ogado5udhabi7c0ademy5centure6ountant0s9o1tor4d0s1ult4e0g1ro2tna4f0l1rica5g0akhan5ency5i0g1rbus3force5tel5kdn3l0ibaba4pay4lfinanz6state5y2sace3tom5m0azon4ericanexpress7family11x2fam3ica3sterdam8nalytics7droid5quan4z2o0l2partments8p0le4q0uarelle8r0ab1mco4chi3my2pa2t0e3s0da2ia2sociates9t0hleta5torney7u0ction5di0ble3o3spost5thor3o0s4w0s2x0a2z0ure5ba0by2idu3namex4d1k2r0celona5laycard4s5efoot5gains6seball5ketball8uhaus5yern5b0c1t1va3cg1n2d1e0ats2uty4er2rlin4st0buy5t2f1g1h0arti5i0ble3d1ke2ng0o3o1z2j1lack0friday9ockbuster8g1omberg7ue3m0s1w2n0pparibas9o0ats3ehringer8fa2m1nd2o0k0ing5sch2tik2on4t1utique6x2r0adesco6idgestone9oadway5ker3ther5ussels7s1t1uild0ers6siness6y1zz3v1w1y1z0h3ca0b1fe2l0l1vinklein9m0era3p2non3petown5ital0one8r0avan4ds2e0er0s4s2sa1e1h1ino4t0ering5holic7ba1n1re3c1d1enter4o1rn3f0a1d2g1h0anel2nel4rity4se2t2eap3intai5ristmas6ome4urch5i0priani6rcle4sco3tadel4i0c2y3k1l0aims4eaning6ick2nic1que6othing5ud3ub0med6m1n1o0ach3des3ffee4llege4ogne5m0mbank4unity6pany2re3uter5sec4ndos3struction8ulting7tact3ractors9oking4l1p2rsica5untry4pon0s4rses6pa2r0edit0card4union9icket5own3s1uise0s6u0isinella9v1w1x1y0mru3ou3z2dad1nce3ta1e1ing3sun4y2clk3ds2e0al0er2s3gree4livery5l1oitte5ta3mocrat6ntal2ist5si0gn4v2hl2iamonds6et2gital5rect0ory7scount3ver5h2y2j1k1m1np2o0cs1tor4g1mains5t1wnload7rive4tv2ubai3nlop4pont4rban5vag2r2z2earth3t2c0o2deka3u0cation8e1g1mail3erck5nergy4gineer0ing9terprises10pson4quipment8r0icsson6ni3s0q1tate5t1u0rovision8s2vents5xchange6pert3osed4ress5traspace10fage2il1rwinds6th3mily4n0s2rm0ers5shion4t3edex3edback6rrari3ero6i0delity5o2lm2nal1nce1ial7re0stone6mdale6sh0ing5t0ness6j1k1lickr3ghts4r2orist4wers5y2m1o0o0d1tball6rd1ex2sale4um3undation8x2r0ee1senius7l1ogans4ntier7tr2ujitsu5n0d2rniture7tbol5yi3ga0l0lery3o1up4me0s3p1rden4y2b0iz3d0n2e0a1nt0ing5orge5f1g0ee3h1i0ft0s3ves2ing5l0ass3e1obal2o4m0ail3bh2o1x2n1odaddy5ld0point6f2o0dyear5g0le4p1t1v2p1q1r0ainger5phics5tis4een3ipe3ocery4up4s1t1u0cci3ge2ide2tars5ru3w1y2hair2mburg5ngout5us3bo2dfc0bank7ealth0care8lp1sinki6re1mes5iphop4samitsu7tachi5v2k0t2m1n1ockey4ldings5iday5medepot5goods5s0ense7nda3rse3spital5t0ing5t0els3mail5use3w2r1sbc3t1u0ghes5yatt3undai7ibm2cbc2e1u2d1e0ee3fm2kano4l1m0amat4db2mo0bilien9n0c1dustries8finiti5o2g1k1stitute6urance4e4t0ernational10uit4vestments10o1piranga7q1r0ish4s0maili5t0anbul7t0au2v3jaguar4va3cb2e0ep2tzt3welry6io2ll2m0p2nj2o0bs1urg4t1y2p0morgan6rs3uegos4niper7kaufen5ddi3e0rryhotels6properties14fh2g1h1i0a1ds2m1ndle4tchen5wi3m1n1oeln3matsu5sher5p0mg2n2r0d1ed3uokgroup8w1y0oto4z2la0caixa5mborghini8er3nd0rover6xess5salle5t0ino3robe5w0yer5b1c1ds2ease3clerc5frak4gal2o2xus4gbt3i0dl2fe0insurance9style7ghting6ke2lly3mited4o2ncoln4k2ve1ing5k1lc1p2oan0s3cker3us3l1ndon4tte1o3ve3pl0financial11r1s1t0d0a3u0ndbeck6xe1ury5v1y2ma0drid4if1son4keup4n0agement7go3p1rket0ing3s4riott5shalls7ttel5ba2c0kinsey7d1e0d0ia3et2lbourne7me1orial6n0u2rckmsd7g1h1iami3crosoft7l1ni1t2t0subishi9k1l0b1s2m0a2n1o0bi0le4da2e1i1m1nash3ey2ster5rmon3tgage6scow4to0rcycles9v0ie4p1q1r1s0d2t0n1r2u0seum3ic4v1w1x1y1z2na0b1goya4me2vy3ba2c1e0c1t0bank4flix4work5ustar5w0s2xt0direct7us4f0l2g0o2hk2i0co2ke1on3nja3ssan1y5l1o0kia3rton4w0ruz3tv4p1r0a1w2tt2u1yc2z2obi1server7ffice5kinawa6layan0group9lo3m0ega4ne1g1l0ine5oo2pen3racle3nge4g0anic5igins6saka4tsuka4t2vh3pa0ge2nasonic7ris2s1tners4s1y3y2ccw3e0t2f0izer5g1h0armacy6d1ilips5one2to0graphy6s4ysio5ics1tet2ures6d1n0g1k2oneer5zza4k1l0ace2y0station9umbing5s3m1n0c2ohl2ker3litie5rn2st3r0axi3ess3ime3o0d0uctions8f1gressive8mo2perties3y5tection8u0dential9s1t1ub2w0c2y2qa1pon3uebec3st5racing4dio4e0ad1lestate6tor2y4cipes5d0stone5umbrella9hab3ise0n3t2liance6n0t0als5pair3ort3ublican8st0aurant8view0s5xroth6ich0ardli6oh3l1o1p2o0cks3deo3gers4om3s0vp3u0gby3hr2n2w0e2yukyu6sa0arland6fe0ty4kura4le1on3msclub4ung5ndvik0coromant12ofi4p1rl2s1ve2xo3b0i1s2c0b1haeffler7midt4olarships8ol3ule3warz5ience5ot3d1e0arch3t2cure1ity6ek2lect4ner3rvices6ven3w1x0y3fr2g1h0angrila6rp3ell3ia1ksha5oes2p0ping5uji3w3i0lk2na1gles5te3j1k0i0n2y0pe4l0ing4m0art3ile4n0cf3o0ccer3ial4ftbank4ware6hu2lar2utions7ng1y2y2pa0ce3ort2t3r0l2s1t0ada2ples4r1tebank4farm7c0group6ockholm6rage3e3ream4udio2y3yle4u0cks3pplies3y2ort5rf1gery5zuki5v1watch4iss4x1y0dney4stems6z2tab1ipei4lk2obao4rget4tamotors6r2too4x0i3c0i2d0k2eam2ch0nology8l1masek5nnis4va3f1g1h0d1eater2re6iaa2ckets5enda4ps2res2ol4j0maxx4x2k0maxx5l1m0all4n1o0day3kyo3ols3p1ray3shiba5tal3urs3wn2yota3s3r0ade1ing4ining5vel0ers0insurance16ust3v2t1ube2i1nes3shu4v0s2w1z2ua1bank3s2g1k1nicom3versity8o2ol2ps2s1y1z2va0cations7na1guard7c1e0gas3ntures6risign5mögensberater2ung14sicherung10t2g1i0ajes4deo3g1king4llas4n1p1rgin4sa1ion4va1o3laanderen9n1odka3lvo3te1ing3o2yage5u2wales2mart4ter4ng0gou5tch0es6eather0channel12bcam3er2site5d0ding5ibo2r3f1hoswho6ien2ki2lliamhill9n0dows4e1ners6me2olterskluwer11odside6rk0s2ld3w2s1tc1f3xbox3erox4ihuan4n2xx2yz3yachts4hoo3maxun5ndex5e1odobashi7ga2kohama6u0tube6t1un3za0ppos4ra3ero3ip2m1one3uerich6w2", sb = "ελ1υ2бг1ел3дети4ею2католик6ом3мкд2он1сква6онлайн5рг3рус2ф2сайт3рб3укр3қаз3հայ3ישראל5קום3ابوظبي5رامكو5لاردن4بحرين5جزائر5سعودية6عليان5مغرب5مارات5یران5بارت2زار4يتك3ھارت5تونس4سودان3رية5شبكة4عراق2ب2مان4فلسطين6قطر3كاثوليك6وم3مصر2ليسيا5وريتانيا7قع4همراه5پاکستان7ڀارت4कॉम3नेट3भारत0म्3ोत5संगठन5বাংলা5ভারত2ৰত4ਭਾਰਤ4ભારત4ଭାରତ4இந்தியா6லங்கை6சிங்கப்பூர்11భారత్5ಭಾರತ4ഭാരതം5ලංකා4คอม3ไทย3ລາວ3გე2みんな3アマゾン4クラウド4グーグル4コム2ストア3セール3ファッション6ポイント4世界2中信1国1國1文网3亚马逊3企业2佛山2信息2健康2八卦2公司1益2台湾1灣2商城1店1标2嘉里0大酒店5在线2大拿2天主教3娱乐2家電2广东2微博2慈善2我爱你3手机2招聘2政务1府2新加坡2闻2时尚2書籍2机构2淡马锡3游戏2澳門2点看2移动2组织机构4网址1店1站1络2联通2谷歌2购物2通販2集团2電訊盈科4飞利浦3食品2餐厅2香格里拉3港2닷넷1컴2삼성2한국2", js = "numeric", _s = "ascii", Ws = "alpha", Rn = "asciinumeric", En = "alphanumeric", Ks = "domain", Yu = "emoji", ob = "scheme", lb = "slashscheme", us = "whitespace";
|
|
15900
|
+
function ab(n, e) {
|
|
15887
15901
|
return n in e || (e[n] = []), e[n];
|
|
15888
15902
|
}
|
|
15889
15903
|
function zt(n, e, t) {
|
|
15890
15904
|
e[js] && (e[Rn] = !0, e[En] = !0), e[_s] && (e[Rn] = !0, e[Ws] = !0), e[Rn] && (e[En] = !0), e[Ws] && (e[En] = !0), e[En] && (e[Ks] = !0), e[Yu] && (e[Ks] = !0);
|
|
15891
15905
|
for (const r in e) {
|
|
15892
|
-
const i =
|
|
15906
|
+
const i = ab(r, t);
|
|
15893
15907
|
i.indexOf(n) < 0 && i.push(n);
|
|
15894
15908
|
}
|
|
15895
15909
|
}
|
|
15896
|
-
function
|
|
15910
|
+
function cb(n, e) {
|
|
15897
15911
|
const t = {};
|
|
15898
15912
|
for (const r in e)
|
|
15899
15913
|
e[r].indexOf(n) >= 0 && (t[r] = !0);
|
|
@@ -16015,7 +16029,7 @@ Ce.prototype = {
|
|
|
16015
16029
|
if (l ? (o = new Ce(), Object.assign(o.j, l.j), o.jr.push.apply(o.jr, l.jr), o.jd = l.jd, o.t = l.t) : o = new Ce(), s) {
|
|
16016
16030
|
if (r)
|
|
16017
16031
|
if (o.t && typeof o.t == "string") {
|
|
16018
|
-
const a = Object.assign(
|
|
16032
|
+
const a = Object.assign(cb(o.t, r), t);
|
|
16019
16033
|
zt(s, a, r);
|
|
16020
16034
|
} else t && zt(s, t, r);
|
|
16021
16035
|
o.t = s;
|
|
@@ -16083,13 +16097,13 @@ var td = /* @__PURE__ */ Object.freeze({
|
|
|
16083
16097
|
WS: Gs
|
|
16084
16098
|
});
|
|
16085
16099
|
const rt = /[a-z]/, Sn = new RegExp("\\p{L}", "u"), ds = new RegExp("\\p{Emoji}", "u"), it = /\d/, fs = /\s/, Ta = "\r", hs = `
|
|
16086
|
-
`,
|
|
16100
|
+
`, ub = "️", db = "", ps = "";
|
|
16087
16101
|
let vr = null, xr = null;
|
|
16088
|
-
function
|
|
16102
|
+
function fb(n = []) {
|
|
16089
16103
|
const e = {};
|
|
16090
16104
|
Ce.groups = e;
|
|
16091
16105
|
const t = new Ce();
|
|
16092
|
-
vr == null && (vr = Ea(
|
|
16106
|
+
vr == null && (vr = Ea(ib)), xr == null && (xr = Ea(sb)), w(t, "'", ii), w(t, "{", Ln), w(t, "}", Pn), w(t, "[", _r), w(t, "]", Wr), w(t, "(", Kr), w(t, ")", Ur), w(t, "<", qr), w(t, ">", Jr), w(t, "(", Gr), w(t, ")", Yr), w(t, "「", Xr), w(t, "」", Qr), w(t, "『", Zr), w(t, "』", ei), w(t, "<", ti), w(t, ">", ni), w(t, "&", ri), w(t, "*", si), w(t, "@", gt), w(t, "`", li), w(t, "^", ai), w(t, ":", bt), w(t, ",", No), w(t, "$", ci), w(t, ".", qe), w(t, "=", ui), w(t, "!", Io), w(t, "-", Le), w(t, "%", Bn), w(t, "|", di), w(t, "+", fi), w(t, "#", hi), w(t, "?", Fn), w(t, '"', Do), w(t, "/", Je), w(t, ";", Ro), w(t, "~", zn), w(t, "_", pi), w(t, "\\", oi), w(t, "・", Zu);
|
|
16093
16107
|
const r = G(t, it, Oo, {
|
|
16094
16108
|
[js]: !0
|
|
16095
16109
|
});
|
|
@@ -16117,8 +16131,8 @@ function cb(n = []) {
|
|
|
16117
16131
|
const d = G(t, ds, ed, {
|
|
16118
16132
|
[Yu]: !0
|
|
16119
16133
|
});
|
|
16120
|
-
w(d, "#"), G(d, ds, d), w(d,
|
|
16121
|
-
const f = w(d,
|
|
16134
|
+
w(d, "#"), G(d, ds, d), w(d, ub, d);
|
|
16135
|
+
const f = w(d, db);
|
|
16122
16136
|
w(f, "#"), G(f, ds, d);
|
|
16123
16137
|
const h = [[rt, o], [it, i]], p = [[rt, null], [Sn, l], [it, s]];
|
|
16124
16138
|
for (let m = 0; m < vr.length; m++)
|
|
@@ -16140,9 +16154,9 @@ function cb(n = []) {
|
|
|
16140
16154
|
}, e), n = n.sort((m, y) => m[0] > y[0] ? 1 : -1);
|
|
16141
16155
|
for (let m = 0; m < n.length; m++) {
|
|
16142
16156
|
const y = n[m][0], C = n[m][1] ? {
|
|
16143
|
-
[
|
|
16157
|
+
[ob]: !0
|
|
16144
16158
|
} : {
|
|
16145
|
-
[
|
|
16159
|
+
[lb]: !0
|
|
16146
16160
|
};
|
|
16147
16161
|
y.indexOf("-") >= 0 ? C[Ks] = !0 : rt.test(y) ? it.test(y) ? C[Rn] = !0 : C[_s] = !0 : C[js] = !0, Ma(t, y, y, C);
|
|
16148
16162
|
}
|
|
@@ -16156,7 +16170,7 @@ function cb(n = []) {
|
|
|
16156
16170
|
};
|
|
16157
16171
|
}
|
|
16158
16172
|
function nd(n, e) {
|
|
16159
|
-
const t =
|
|
16173
|
+
const t = hb(e.replace(/[A-Z]/g, (l) => l.toLowerCase())), r = t.length, i = [];
|
|
16160
16174
|
let s = 0, o = 0;
|
|
16161
16175
|
for (; o < r; ) {
|
|
16162
16176
|
let l = n, a = null, c = 0, u = null, d = -1, f = -1;
|
|
@@ -16175,7 +16189,7 @@ function nd(n, e) {
|
|
|
16175
16189
|
}
|
|
16176
16190
|
return i;
|
|
16177
16191
|
}
|
|
16178
|
-
function
|
|
16192
|
+
function hb(n) {
|
|
16179
16193
|
const e = [], t = n.length;
|
|
16180
16194
|
let r = 0;
|
|
16181
16195
|
for (; r < t; ) {
|
|
@@ -16421,7 +16435,7 @@ const Aa = Ii("email", {
|
|
|
16421
16435
|
toHref() {
|
|
16422
16436
|
return "mailto:" + this.toString();
|
|
16423
16437
|
}
|
|
16424
|
-
}), Na = Ii("text"),
|
|
16438
|
+
}), Na = Ii("text"), pb = Ii("nl"), wr = Ii("url", {
|
|
16425
16439
|
isLink: !0,
|
|
16426
16440
|
/**
|
|
16427
16441
|
Lowercases relevant parts of the domain and adds the protocol if
|
|
@@ -16442,7 +16456,7 @@ const Aa = Ii("email", {
|
|
|
16442
16456
|
return n.length >= 2 && n[0].t !== Qn && n[1].t === bt;
|
|
16443
16457
|
}
|
|
16444
16458
|
}), Re = (n) => new Ce(n);
|
|
16445
|
-
function
|
|
16459
|
+
function mb({
|
|
16446
16460
|
groups: n
|
|
16447
16461
|
}) {
|
|
16448
16462
|
const e = n.domain.concat([ri, si, gt, oi, li, ai, ci, ui, Le, Oo, Bn, di, fi, hi, Je, mi, zn, pi]), t = [ii, bt, No, qe, Io, Bn, Fn, Do, Ro, qr, Jr, Ln, Pn, Wr, _r, Kr, Ur, Gr, Yr, Xr, Qr, Zr, ei, ti, ni], r = [ri, ii, si, oi, li, ai, ci, ui, Le, Ln, Pn, Bn, di, fi, hi, Fn, Je, mi, zn, pi], i = Re(), s = w(i, zn);
|
|
@@ -16499,12 +16513,12 @@ function fb({
|
|
|
16499
16513
|
const Ke = Re();
|
|
16500
16514
|
z(We, t), z(tt, e, tt), z(tt, t, Ke), z(Ke, e, tt), z(Ke, t, Ke), w(tt, et, S), w(Ke, et, S);
|
|
16501
16515
|
}
|
|
16502
|
-
return w(i, Qn, C), w(i, Ao,
|
|
16516
|
+
return w(i, Qn, C), w(i, Ao, pb), {
|
|
16503
16517
|
start: i,
|
|
16504
16518
|
tokens: td
|
|
16505
16519
|
};
|
|
16506
16520
|
}
|
|
16507
|
-
function
|
|
16521
|
+
function gb(n, e, t) {
|
|
16508
16522
|
let r = t.length, i = 0, s = [], o = [];
|
|
16509
16523
|
for (; i < r; ) {
|
|
16510
16524
|
let l = n, a = null, c = null, u = 0, d = null, f = -1;
|
|
@@ -16526,8 +16540,8 @@ function ms(n, e, t) {
|
|
|
16526
16540
|
const r = t[0].s, i = t[t.length - 1].e, s = e.slice(r, i);
|
|
16527
16541
|
return new n(s, t);
|
|
16528
16542
|
}
|
|
16529
|
-
const
|
|
16530
|
-
}),
|
|
16543
|
+
const yb = typeof console < "u" && console && console.warn || (() => {
|
|
16544
|
+
}), bb = "until manual call of linkify.init(). Register all schemes and plugins before invoking linkify the first time.", U = {
|
|
16531
16545
|
scanner: null,
|
|
16532
16546
|
parser: null,
|
|
16533
16547
|
tokenQueue: [],
|
|
@@ -16535,24 +16549,24 @@ const pb = typeof console < "u" && console && console.warn || (() => {
|
|
|
16535
16549
|
customSchemes: [],
|
|
16536
16550
|
initialized: !1
|
|
16537
16551
|
};
|
|
16538
|
-
function
|
|
16552
|
+
function kb() {
|
|
16539
16553
|
return Ce.groups = {}, U.scanner = null, U.parser = null, U.tokenQueue = [], U.pluginQueue = [], U.customSchemes = [], U.initialized = !1, U;
|
|
16540
16554
|
}
|
|
16541
16555
|
function Ia(n, e = !1) {
|
|
16542
|
-
if (U.initialized &&
|
|
16556
|
+
if (U.initialized && yb(`linkifyjs: already initialized - will not register custom scheme "${n}" ${bb}`), !/^[0-9a-z]+(-[0-9a-z]+)*$/.test(n))
|
|
16543
16557
|
throw new Error(`linkifyjs: incorrect scheme format.
|
|
16544
16558
|
1. Must only contain digits, lowercase ASCII letters or "-"
|
|
16545
16559
|
2. Cannot start or end with "-"
|
|
16546
16560
|
3. "-" cannot repeat`);
|
|
16547
16561
|
U.customSchemes.push([n, e]);
|
|
16548
16562
|
}
|
|
16549
|
-
function
|
|
16550
|
-
U.scanner =
|
|
16563
|
+
function vb() {
|
|
16564
|
+
U.scanner = fb(U.customSchemes);
|
|
16551
16565
|
for (let n = 0; n < U.tokenQueue.length; n++)
|
|
16552
16566
|
U.tokenQueue[n][1]({
|
|
16553
16567
|
scanner: U.scanner
|
|
16554
16568
|
});
|
|
16555
|
-
U.parser =
|
|
16569
|
+
U.parser = mb(U.scanner.tokens);
|
|
16556
16570
|
for (let n = 0; n < U.pluginQueue.length; n++)
|
|
16557
16571
|
U.pluginQueue[n][1]({
|
|
16558
16572
|
scanner: U.scanner,
|
|
@@ -16561,7 +16575,7 @@ function yb() {
|
|
|
16561
16575
|
return U.initialized = !0, U;
|
|
16562
16576
|
}
|
|
16563
16577
|
function Po(n) {
|
|
16564
|
-
return U.initialized ||
|
|
16578
|
+
return U.initialized || vb(), gb(U.parser.start, n, nd(U.scanner.start, n));
|
|
16565
16579
|
}
|
|
16566
16580
|
Po.scan = nd;
|
|
16567
16581
|
function id(n, e = null, t = null) {
|
|
@@ -16577,38 +16591,38 @@ function id(n, e = null, t = null) {
|
|
|
16577
16591
|
}
|
|
16578
16592
|
return s;
|
|
16579
16593
|
}
|
|
16580
|
-
const Bo = "[\0- -\u2029 ]",
|
|
16581
|
-
function
|
|
16594
|
+
const Bo = "[\0- -\u2029 ]", xb = new RegExp(Bo), wb = new RegExp(`${Bo}$`), Sb = new RegExp(Bo, "g");
|
|
16595
|
+
function Cb(n) {
|
|
16582
16596
|
return n.length === 1 ? n[0].isLink : n.length === 3 && n[1].isLink ? ["()", "[]"].includes(n[0].value + n[2].value) : !1;
|
|
16583
16597
|
}
|
|
16584
|
-
function
|
|
16598
|
+
function Mb(n) {
|
|
16585
16599
|
return new Q({
|
|
16586
16600
|
key: new me("autolink"),
|
|
16587
16601
|
appendTransaction: (e, t, r) => {
|
|
16588
16602
|
const i = e.some((c) => c.docChanged) && !t.doc.eq(r.doc), s = e.some((c) => c.getMeta("preventAutolink"));
|
|
16589
16603
|
if (!i || s)
|
|
16590
16604
|
return;
|
|
16591
|
-
const { tr: o } = r, l =
|
|
16592
|
-
if (
|
|
16593
|
-
const u =
|
|
16605
|
+
const { tr: o } = r, l = Bg(t.doc, [...e]);
|
|
16606
|
+
if (_g(l).forEach(({ newRange: c }) => {
|
|
16607
|
+
const u = zg(r.doc, c, (h) => h.isTextblock);
|
|
16594
16608
|
let d, f;
|
|
16595
16609
|
if (u.length > 1)
|
|
16596
16610
|
d = u[0], f = r.doc.textBetween(d.pos, d.pos + d.node.nodeSize, void 0, " ");
|
|
16597
16611
|
else if (u.length) {
|
|
16598
16612
|
const h = r.doc.textBetween(c.from, c.to, " ", " ");
|
|
16599
|
-
if (!
|
|
16613
|
+
if (!wb.test(h))
|
|
16600
16614
|
return;
|
|
16601
16615
|
d = u[0], f = r.doc.textBetween(d.pos, c.to, void 0, " ");
|
|
16602
16616
|
}
|
|
16603
16617
|
if (d && f) {
|
|
16604
|
-
const h = f.split(
|
|
16618
|
+
const h = f.split(xb).filter(Boolean);
|
|
16605
16619
|
if (h.length <= 0)
|
|
16606
16620
|
return !1;
|
|
16607
16621
|
const p = h[h.length - 1], m = d.pos + f.lastIndexOf(p);
|
|
16608
16622
|
if (!p)
|
|
16609
16623
|
return !1;
|
|
16610
16624
|
const y = Po(p).map((b) => b.toObject(n.defaultProtocol));
|
|
16611
|
-
if (!
|
|
16625
|
+
if (!Cb(y))
|
|
16612
16626
|
return !1;
|
|
16613
16627
|
y.filter((b) => b.isLink).map((b) => ({
|
|
16614
16628
|
...b,
|
|
@@ -16625,7 +16639,7 @@ function wb(n) {
|
|
|
16625
16639
|
}
|
|
16626
16640
|
});
|
|
16627
16641
|
}
|
|
16628
|
-
function
|
|
16642
|
+
function Tb(n) {
|
|
16629
16643
|
return new Q({
|
|
16630
16644
|
key: new me("handleClickLink"),
|
|
16631
16645
|
props: {
|
|
@@ -16645,7 +16659,7 @@ function Sb(n) {
|
|
|
16645
16659
|
}
|
|
16646
16660
|
});
|
|
16647
16661
|
}
|
|
16648
|
-
function
|
|
16662
|
+
function Eb(n) {
|
|
16649
16663
|
return new Q({
|
|
16650
16664
|
key: new me("handlePasteLink"),
|
|
16651
16665
|
props: {
|
|
@@ -16681,13 +16695,13 @@ function Dt(n, e) {
|
|
|
16681
16695
|
return e && e.forEach((r) => {
|
|
16682
16696
|
const i = typeof r == "string" ? r : r.scheme;
|
|
16683
16697
|
i && t.push(i);
|
|
16684
|
-
}), !n || n.replace(
|
|
16698
|
+
}), !n || n.replace(Sb, "").match(new RegExp(
|
|
16685
16699
|
// eslint-disable-next-line no-useless-escape
|
|
16686
16700
|
`^(?:(?:${t.join("|")}):|[^a-z]|[a-z0-9+.-]+(?:[^a-z+.-:]|$))`,
|
|
16687
16701
|
"i"
|
|
16688
16702
|
));
|
|
16689
16703
|
}
|
|
16690
|
-
const
|
|
16704
|
+
const Ob = Ze.create({
|
|
16691
16705
|
name: "link",
|
|
16692
16706
|
priority: 1e3,
|
|
16693
16707
|
keepOnSplit: !1,
|
|
@@ -16702,7 +16716,7 @@ const Mb = Ze.create({
|
|
|
16702
16716
|
});
|
|
16703
16717
|
},
|
|
16704
16718
|
onDestroy() {
|
|
16705
|
-
|
|
16719
|
+
kb();
|
|
16706
16720
|
},
|
|
16707
16721
|
inclusive() {
|
|
16708
16722
|
return this.options.autolink;
|
|
@@ -16823,7 +16837,7 @@ const Mb = Ze.create({
|
|
|
16823
16837
|
},
|
|
16824
16838
|
addProseMirrorPlugins() {
|
|
16825
16839
|
const n = [], { protocols: e, defaultProtocol: t } = this.options;
|
|
16826
|
-
return this.options.autolink && n.push(
|
|
16840
|
+
return this.options.autolink && n.push(Mb({
|
|
16827
16841
|
type: this.type,
|
|
16828
16842
|
defaultProtocol: this.options.defaultProtocol,
|
|
16829
16843
|
validate: (r) => this.options.isAllowedUri(r, {
|
|
@@ -16832,23 +16846,23 @@ const Mb = Ze.create({
|
|
|
16832
16846
|
defaultProtocol: t
|
|
16833
16847
|
}),
|
|
16834
16848
|
shouldAutoLink: this.options.shouldAutoLink
|
|
16835
|
-
})), this.options.openOnClick === !0 && n.push(
|
|
16849
|
+
})), this.options.openOnClick === !0 && n.push(Tb({
|
|
16836
16850
|
type: this.type
|
|
16837
|
-
})), this.options.linkOnPaste && n.push(
|
|
16851
|
+
})), this.options.linkOnPaste && n.push(Eb({
|
|
16838
16852
|
editor: this.editor,
|
|
16839
16853
|
defaultProtocol: this.options.defaultProtocol,
|
|
16840
16854
|
type: this.type
|
|
16841
16855
|
})), n;
|
|
16842
16856
|
}
|
|
16843
|
-
}),
|
|
16857
|
+
}), Ab = () => {
|
|
16844
16858
|
const n = "(http://www\\.|https://www\\.|http://|https://)", e = "[a-z0-9]+([-.]{1}[a-z0-9]+)*\\.[a-z]{2,5}(:[0-9]{1,5})?(/.*)?";
|
|
16845
16859
|
return new RegExp(`^${n}?${e}$`);
|
|
16846
|
-
},
|
|
16860
|
+
}, Nb = Ab(), sd = (n) => Nb.test(n), Or = {
|
|
16847
16861
|
urlValidator: sd,
|
|
16848
16862
|
sanitizeUrlText: (n) => ["http://", "https://"].some(
|
|
16849
16863
|
(t) => n.includes(t)
|
|
16850
16864
|
) ? n : `https://${n}`
|
|
16851
|
-
},
|
|
16865
|
+
}, Ib = Ob.extend({
|
|
16852
16866
|
addOptions() {
|
|
16853
16867
|
return {
|
|
16854
16868
|
...this.parent?.(),
|
|
@@ -16882,7 +16896,7 @@ const Mb = Ze.create({
|
|
|
16882
16896
|
});
|
|
16883
16897
|
return n.push(e), n;
|
|
16884
16898
|
}
|
|
16885
|
-
}),
|
|
16899
|
+
}), Db = te.create({
|
|
16886
16900
|
name: "textAlign",
|
|
16887
16901
|
addOptions() {
|
|
16888
16902
|
return {
|
|
@@ -16923,7 +16937,7 @@ const Mb = Ze.create({
|
|
|
16923
16937
|
"Mod-Shift-j": () => this.editor.commands.setTextAlign("justify")
|
|
16924
16938
|
};
|
|
16925
16939
|
}
|
|
16926
|
-
}),
|
|
16940
|
+
}), Rb = Db.extend({
|
|
16927
16941
|
addKeyboardShortcuts() {
|
|
16928
16942
|
const n = () => !(this.editor.isActive("bulletList") || this.editor.isActive("orderedList"));
|
|
16929
16943
|
return {
|
|
@@ -16932,7 +16946,7 @@ const Mb = Ze.create({
|
|
|
16932
16946
|
"Mod-Shift-r": () => n() && this.editor.commands.setTextAlign("right")
|
|
16933
16947
|
};
|
|
16934
16948
|
}
|
|
16935
|
-
}),
|
|
16949
|
+
}), Lb = Bu.extend({
|
|
16936
16950
|
addAttributes() {
|
|
16937
16951
|
const n = "small-text";
|
|
16938
16952
|
return {
|
|
@@ -16961,18 +16975,7 @@ const Mb = Ze.create({
|
|
|
16961
16975
|
"Mod-Alt--": () => this.editor.commands.setSmallText()
|
|
16962
16976
|
};
|
|
16963
16977
|
}
|
|
16964
|
-
}),
|
|
16965
|
-
xmlns: "http://www.w3.org/2000/svg",
|
|
16966
|
-
fill: "none",
|
|
16967
|
-
stroke: "#000",
|
|
16968
|
-
viewBox: "0 0 32 32"
|
|
16969
|
-
};
|
|
16970
|
-
function Rb(n, e) {
|
|
16971
|
-
return N(), V("svg", Db, e[0] || (e[0] = [
|
|
16972
|
-
L("path", { d: "M4 7h24M4 19h24M9 13h14M9 25h14" }, null, -1)
|
|
16973
|
-
]));
|
|
16974
|
-
}
|
|
16975
|
-
const Lb = { render: Rb }, Pb = {
|
|
16978
|
+
}), Pb = {
|
|
16976
16979
|
xmlns: "http://www.w3.org/2000/svg",
|
|
16977
16980
|
fill: "none",
|
|
16978
16981
|
stroke: "#000",
|
|
@@ -16980,7 +16983,7 @@ const Lb = { render: Rb }, Pb = {
|
|
|
16980
16983
|
};
|
|
16981
16984
|
function Bb(n, e) {
|
|
16982
16985
|
return N(), V("svg", Pb, e[0] || (e[0] = [
|
|
16983
|
-
L("path", { d: "M4 7h24M4
|
|
16986
|
+
L("path", { d: "M4 7h24M4 19h24M9 13h14M9 25h14" }, null, -1)
|
|
16984
16987
|
]));
|
|
16985
16988
|
}
|
|
16986
16989
|
const Fb = { render: Bb }, zb = {
|
|
@@ -16991,7 +16994,7 @@ const Fb = { render: Bb }, zb = {
|
|
|
16991
16994
|
};
|
|
16992
16995
|
function $b(n, e) {
|
|
16993
16996
|
return N(), V("svg", zb, e[0] || (e[0] = [
|
|
16994
|
-
L("path", { d: "M4 7h24M4
|
|
16997
|
+
L("path", { d: "M4 7h24M4 19h24M4 13h13M4 25h13" }, null, -1)
|
|
16995
16998
|
]));
|
|
16996
16999
|
}
|
|
16997
17000
|
const Hb = { render: $b }, Vb = {
|
|
@@ -17002,7 +17005,7 @@ const Hb = { render: $b }, Vb = {
|
|
|
17002
17005
|
};
|
|
17003
17006
|
function jb(n, e) {
|
|
17004
17007
|
return N(), V("svg", Vb, e[0] || (e[0] = [
|
|
17005
|
-
L("path", { d: "
|
|
17008
|
+
L("path", { d: "M4 7h24M4 19h24M15 13h13M15 25h13" }, null, -1)
|
|
17006
17009
|
]));
|
|
17007
17010
|
}
|
|
17008
17011
|
const _b = { render: jb }, Wb = {
|
|
@@ -17013,30 +17016,30 @@ const _b = { render: jb }, Wb = {
|
|
|
17013
17016
|
};
|
|
17014
17017
|
function Kb(n, e) {
|
|
17015
17018
|
return N(), V("svg", Wb, e[0] || (e[0] = [
|
|
17016
|
-
L("path", { d: "M9
|
|
17019
|
+
L("path", { d: "M9 7h13M9 19h16M9 13h19M9 25h12M4.5 6v20" }, null, -1)
|
|
17017
17020
|
]));
|
|
17018
17021
|
}
|
|
17019
17022
|
const Ub = { render: Kb }, qb = {
|
|
17020
17023
|
xmlns: "http://www.w3.org/2000/svg",
|
|
17021
17024
|
fill: "none",
|
|
17022
17025
|
stroke: "#000",
|
|
17023
|
-
"stroke-linejoin": "round",
|
|
17024
17026
|
viewBox: "0 0 32 32"
|
|
17025
17027
|
};
|
|
17026
17028
|
function Jb(n, e) {
|
|
17027
17029
|
return N(), V("svg", qb, e[0] || (e[0] = [
|
|
17028
|
-
L("path", { d: "
|
|
17030
|
+
L("path", { d: "M9.5 27.528h7.669q1.733 0 3.12-.39 1.386-.39 2.354-1.17a5.2 5.2 0 0 0 1.487-1.935q.52-1.155.52-2.672 0-.795-.217-1.53a4.5 4.5 0 0 0-.635-1.387 4.4 4.4 0 0 0-1.04-1.04q-.606-.448-1.646-.737v-.014q.534-.203.967-.491.448-.29.795-.636.635-.635.953-1.473.332-.852.346-1.805 0-1.473-.548-2.556A4.74 4.74 0 0 0 22.094 7.9q-.997-.708-2.412-1.054-1.401-.347-3.12-.347H9.5v21.028ZM21.042 16.653h-12" }, null, -1)
|
|
17029
17031
|
]));
|
|
17030
17032
|
}
|
|
17031
17033
|
const Gb = { render: Jb }, Yb = {
|
|
17032
17034
|
xmlns: "http://www.w3.org/2000/svg",
|
|
17033
17035
|
fill: "none",
|
|
17034
17036
|
stroke: "#000",
|
|
17037
|
+
"stroke-linejoin": "round",
|
|
17035
17038
|
viewBox: "0 0 32 32"
|
|
17036
17039
|
};
|
|
17037
17040
|
function Xb(n, e) {
|
|
17038
17041
|
return N(), V("svg", Yb, e[0] || (e[0] = [
|
|
17039
|
-
L("path", { d: "
|
|
17042
|
+
L("path", { d: "M11.189 23.689 3.5 16l7.689-7.689m9.622 0L28.5 16l-7.689 7.689M18.82 4.693l-5.64 22.614" }, null, -1)
|
|
17040
17043
|
]));
|
|
17041
17044
|
}
|
|
17042
17045
|
const Qb = { render: Xb }, Zb = {
|
|
@@ -17047,29 +17050,40 @@ const Qb = { render: Xb }, Zb = {
|
|
|
17047
17050
|
};
|
|
17048
17051
|
function e1(n, e) {
|
|
17049
17052
|
return N(), V("svg", Zb, e[0] || (e[0] = [
|
|
17050
|
-
L("path", { d: "
|
|
17053
|
+
L("path", { d: "M10 20h12m-12 4h12M10 8h12m-12 4h12M4 16h4m1 0h4m1 0h4m1 0h4m1 0h4" }, null, -1)
|
|
17051
17054
|
]));
|
|
17052
17055
|
}
|
|
17053
17056
|
const t1 = { render: e1 }, n1 = {
|
|
17054
17057
|
xmlns: "http://www.w3.org/2000/svg",
|
|
17055
17058
|
fill: "none",
|
|
17056
17059
|
stroke: "#000",
|
|
17057
|
-
"stroke-linejoin": "round",
|
|
17058
17060
|
viewBox: "0 0 32 32"
|
|
17059
17061
|
};
|
|
17060
17062
|
function r1(n, e) {
|
|
17061
17063
|
return N(), V("svg", n1, e[0] || (e[0] = [
|
|
17062
|
-
L("path", { d: "
|
|
17064
|
+
L("path", { d: "M6 26.5h15M13.5 26.6l3.916-21.144M10 5.5h15" }, null, -1)
|
|
17063
17065
|
]));
|
|
17064
17066
|
}
|
|
17065
17067
|
const i1 = { render: r1 }, s1 = {
|
|
17066
17068
|
xmlns: "http://www.w3.org/2000/svg",
|
|
17067
17069
|
fill: "none",
|
|
17068
17070
|
stroke: "#000",
|
|
17071
|
+
"stroke-linejoin": "round",
|
|
17069
17072
|
viewBox: "0 0 32 32"
|
|
17070
17073
|
};
|
|
17071
17074
|
function o1(n, e) {
|
|
17072
17075
|
return N(), V("svg", s1, e[0] || (e[0] = [
|
|
17076
|
+
L("path", { d: "M14.539 18.62c-1.442-1.442-1.252-3.971.424-5.647l6.107-6.107c1.677-1.677 4.205-1.866 5.647-.424l1.699 1.699c1.442 1.442 1.252 3.971-.424 5.647l-6.107 6.107c-1.217 1.217-2.884 1.651-4.258 1.245m-.166-7.345c1.442 1.442 1.252 3.971-.424 5.647l-6.107 6.107c-1.677 1.677-4.205 1.866-5.647.424l-1.699-1.699c-1.442-1.442-1.252-3.971.424-5.647l6.107-6.107c1.217-1.217 2.884-1.651 4.258-1.245" }, null, -1)
|
|
17077
|
+
]));
|
|
17078
|
+
}
|
|
17079
|
+
const l1 = { render: o1 }, a1 = {
|
|
17080
|
+
xmlns: "http://www.w3.org/2000/svg",
|
|
17081
|
+
fill: "none",
|
|
17082
|
+
stroke: "#000",
|
|
17083
|
+
viewBox: "0 0 32 32"
|
|
17084
|
+
};
|
|
17085
|
+
function c1(n, e) {
|
|
17086
|
+
return N(), V("svg", a1, e[0] || (e[0] = [
|
|
17073
17087
|
L("path", { d: "M3 6.483 6.707 5v8.155" }, null, -1),
|
|
17074
17088
|
L("path", {
|
|
17075
17089
|
"stroke-linejoin": "round",
|
|
@@ -17083,56 +17097,56 @@ function o1(n, e) {
|
|
|
17083
17097
|
L("path", { d: "M7.448 21.569c0-.741-.445-2.224-2.224-2.224M7.448 21.569c0 .247-.148.89-.741 1.483M3 21.569c0-.741.445-2.224 2.224-2.224" }, null, -1)
|
|
17084
17098
|
]));
|
|
17085
17099
|
}
|
|
17086
|
-
const
|
|
17100
|
+
const u1 = { render: c1 }, d1 = {
|
|
17087
17101
|
xmlns: "http://www.w3.org/2000/svg",
|
|
17088
17102
|
fill: "none",
|
|
17089
17103
|
stroke: "#000",
|
|
17090
17104
|
viewBox: "0 0 32 32"
|
|
17091
17105
|
};
|
|
17092
|
-
function
|
|
17093
|
-
return N(), V("svg",
|
|
17106
|
+
function f1(n, e) {
|
|
17107
|
+
return N(), V("svg", d1, e[0] || (e[0] = [
|
|
17094
17108
|
L("path", { d: "M4 16h24m-18 3.543q0 1.431.667 2.546.653 1.13 1.898 1.763 1.23.648 3.01.648 1.777 0 2.994-.558 1.2-.541 1.823-1.461A3.54 3.54 0 0 0 21 20.462q0-.783-.297-1.446-.296-.649-.963-1.22a6 6 0 0 0-.74-.514m2-4.475q0-1.387-.607-2.469-.593-1.095-1.724-1.71-1.12-.627-2.736-.628-1.618 0-2.723.54-1.092.527-1.657 1.418A3.6 3.6 0 0 0 11 11.916q0 .76.27 1.403.27.628.876 1.183.293.255.672.498S14 15.75 15 16" }, null, -1)
|
|
17095
17109
|
]));
|
|
17096
17110
|
}
|
|
17097
|
-
const
|
|
17111
|
+
const h1 = { render: f1 }, p1 = {
|
|
17098
17112
|
xmlns: "http://www.w3.org/2000/svg",
|
|
17099
17113
|
fill: "none",
|
|
17100
17114
|
stroke: "#000",
|
|
17101
17115
|
"stroke-linejoin": "round",
|
|
17102
17116
|
viewBox: "0 0 32 32"
|
|
17103
17117
|
};
|
|
17104
|
-
function
|
|
17105
|
-
return N(), V("svg",
|
|
17118
|
+
function m1(n, e) {
|
|
17119
|
+
return N(), V("svg", p1, e[0] || (e[0] = [
|
|
17106
17120
|
L("path", { d: "M1 27.5 9.5 6 18 27.5M4 20h11m6.438-3.062c0-1.313.962-3.938 4.812-3.938s4.813 2.625 4.813 3.938v7c0 .729.087 2.862.437 3.562" }, null, -1),
|
|
17107
17121
|
L("path", { d: "M31.063 19.256c-4.604-.445-9.625.09-9.625 4.003s3.905 4.003 5.858 3.558c1.349-.307 2.762-1.423 3.767-3.558" }, null, -1)
|
|
17108
17122
|
]));
|
|
17109
17123
|
}
|
|
17110
|
-
const
|
|
17124
|
+
const g1 = { render: m1 }, y1 = {
|
|
17111
17125
|
xmlns: "http://www.w3.org/2000/svg",
|
|
17112
17126
|
fill: "none",
|
|
17113
17127
|
stroke: "#000",
|
|
17114
17128
|
viewBox: "0 0 32 32"
|
|
17115
17129
|
};
|
|
17116
|
-
function
|
|
17117
|
-
return N(), V("svg",
|
|
17130
|
+
function b1(n, e) {
|
|
17131
|
+
return N(), V("svg", y1, e[0] || (e[0] = [
|
|
17118
17132
|
L("path", { d: "M10.839 5v12.903c0 1.72 1.032 5.16 5.161 5.16s5.161-3.44 5.161-5.16V5M8 26.75h16" }, null, -1)
|
|
17119
17133
|
]));
|
|
17120
17134
|
}
|
|
17121
|
-
const
|
|
17135
|
+
const k1 = { render: b1 }, v1 = {
|
|
17122
17136
|
xmlns: "http://www.w3.org/2000/svg",
|
|
17123
17137
|
fill: "none",
|
|
17124
17138
|
stroke: "#000",
|
|
17125
17139
|
viewBox: "0 0 32 32"
|
|
17126
17140
|
};
|
|
17127
|
-
function
|
|
17128
|
-
return N(), V("svg",
|
|
17141
|
+
function x1(n, e) {
|
|
17142
|
+
return N(), V("svg", v1, e[0] || (e[0] = [
|
|
17129
17143
|
L("path", {
|
|
17130
17144
|
"stroke-linejoin": "round",
|
|
17131
17145
|
d: "M30 9.46H14M10 5.46H2v8h8zM30 22.647H14M10 18.5H2v8h8z"
|
|
17132
17146
|
}, null, -1)
|
|
17133
17147
|
]));
|
|
17134
17148
|
}
|
|
17135
|
-
const
|
|
17149
|
+
const w1 = { render: x1 }, S1 = ({
|
|
17136
17150
|
editor: n,
|
|
17137
17151
|
isRegistered: e,
|
|
17138
17152
|
linkToolOptions: t
|
|
@@ -17213,12 +17227,12 @@ const k1 = { render: b1 }, v1 = ({
|
|
|
17213
17227
|
n.chain().focus().toggleHeading({ level: t }).run();
|
|
17214
17228
|
break;
|
|
17215
17229
|
}
|
|
17216
|
-
},
|
|
17230
|
+
}, C1 = (n, e) => ({
|
|
17217
17231
|
item: { text: `Heading ${n}` },
|
|
17218
17232
|
id: n,
|
|
17219
17233
|
hotkey: ["Ctrl", "Alt", `${n}`],
|
|
17220
17234
|
active: () => e().isActive("heading", { level: n })
|
|
17221
|
-
}),
|
|
17235
|
+
}), M1 = (n) => ({
|
|
17222
17236
|
children: [
|
|
17223
17237
|
{
|
|
17224
17238
|
item: { text: "Standard" },
|
|
@@ -17234,7 +17248,7 @@ const k1 = { render: b1 }, v1 = ({
|
|
|
17234
17248
|
},
|
|
17235
17249
|
...Array.from(
|
|
17236
17250
|
{ length: 6 },
|
|
17237
|
-
(e, t) =>
|
|
17251
|
+
(e, t) => C1(t + 1, n)
|
|
17238
17252
|
)
|
|
17239
17253
|
],
|
|
17240
17254
|
onChildClick: (e) => {
|
|
@@ -17249,7 +17263,7 @@ const k1 = { render: b1 }, v1 = ({
|
|
|
17249
17263
|
}
|
|
17250
17264
|
t.chain().focus().toggleHeading({ level: e }).run();
|
|
17251
17265
|
}
|
|
17252
|
-
}),
|
|
17266
|
+
}), T1 = /* @__PURE__ */ pe({
|
|
17253
17267
|
__name: "RichTextEditorBaseToolbar",
|
|
17254
17268
|
props: {
|
|
17255
17269
|
editor: {},
|
|
@@ -17257,7 +17271,7 @@ const k1 = { render: b1 }, v1 = ({
|
|
|
17257
17271
|
linkToolOptions: {}
|
|
17258
17272
|
},
|
|
17259
17273
|
setup(n) {
|
|
17260
|
-
const e = n, t = (l, a) => "all" in e.baseExtensions ? [a] : e.baseExtensions[l] ? [a] : [], r = (l) => "all" in e.baseExtensions ? !0 : !!e.baseExtensions[l], i = () => e.editor.isActive("orderedList") || e.editor.isActive("bulletList"), s =
|
|
17274
|
+
const e = n, t = (l, a) => "all" in e.baseExtensions ? [a] : e.baseExtensions[l] ? [a] : [], r = (l) => "all" in e.baseExtensions ? !0 : !!e.baseExtensions[l], i = () => e.editor.isActive("orderedList") || e.editor.isActive("bulletList"), s = S1({
|
|
17261
17275
|
editor: e.editor,
|
|
17262
17276
|
isRegistered: r("link"),
|
|
17263
17277
|
linkToolOptions: e.linkToolOptions
|
|
@@ -17266,14 +17280,14 @@ const k1 = { render: b1 }, v1 = ({
|
|
|
17266
17280
|
id: "bold",
|
|
17267
17281
|
name: "Bold",
|
|
17268
17282
|
hotkey: ["Ctrl", "B"],
|
|
17269
|
-
icon:
|
|
17283
|
+
icon: Gb,
|
|
17270
17284
|
active: () => e.editor.isActive("bold"),
|
|
17271
17285
|
onClick: () => e.editor.chain().focus().toggleBold().run()
|
|
17272
17286
|
}),
|
|
17273
17287
|
...t("italic", {
|
|
17274
17288
|
id: "italic",
|
|
17275
17289
|
name: "Italic",
|
|
17276
|
-
icon:
|
|
17290
|
+
icon: i1,
|
|
17277
17291
|
hotkey: ["Ctrl", "I"],
|
|
17278
17292
|
active: () => e.editor.isActive("italic"),
|
|
17279
17293
|
onClick: () => e.editor.chain().focus().toggleItalic().run()
|
|
@@ -17281,7 +17295,7 @@ const k1 = { render: b1 }, v1 = ({
|
|
|
17281
17295
|
...t("underline", {
|
|
17282
17296
|
id: "underline",
|
|
17283
17297
|
name: "Underline",
|
|
17284
|
-
icon:
|
|
17298
|
+
icon: k1,
|
|
17285
17299
|
hotkey: ["Ctrl", "U"],
|
|
17286
17300
|
active: () => e.editor.isActive("underline"),
|
|
17287
17301
|
onClick: () => e.editor.chain().focus().toggleUnderline().run()
|
|
@@ -17289,7 +17303,7 @@ const k1 = { render: b1 }, v1 = ({
|
|
|
17289
17303
|
...t("bulletList", {
|
|
17290
17304
|
id: "bulletList",
|
|
17291
17305
|
name: "Bullet list",
|
|
17292
|
-
icon:
|
|
17306
|
+
icon: w1,
|
|
17293
17307
|
hotkey: ["Ctrl", "Shift", "8"],
|
|
17294
17308
|
active: () => e.editor.isActive("bulletList"),
|
|
17295
17309
|
onClick: () => {
|
|
@@ -17300,7 +17314,7 @@ const k1 = { render: b1 }, v1 = ({
|
|
|
17300
17314
|
...t("orderedList", {
|
|
17301
17315
|
id: "orderedList",
|
|
17302
17316
|
name: "Ordered list",
|
|
17303
|
-
icon:
|
|
17317
|
+
icon: u1,
|
|
17304
17318
|
hotkey: ["Ctrl", "Shift", "7"],
|
|
17305
17319
|
active: () => e.editor.isActive("orderedList"),
|
|
17306
17320
|
onClick: () => {
|
|
@@ -17310,7 +17324,7 @@ const k1 = { render: b1 }, v1 = ({
|
|
|
17310
17324
|
}),
|
|
17311
17325
|
...t("textAlign", {
|
|
17312
17326
|
id: "align-left",
|
|
17313
|
-
icon:
|
|
17327
|
+
icon: Hb,
|
|
17314
17328
|
name: "Align left",
|
|
17315
17329
|
hotkey: ["Ctrl", "Shift", "L"],
|
|
17316
17330
|
active: () => !i() && e.editor.isActive({ textAlign: "left" }),
|
|
@@ -17319,7 +17333,7 @@ const k1 = { render: b1 }, v1 = ({
|
|
|
17319
17333
|
}),
|
|
17320
17334
|
...t("textAlign", {
|
|
17321
17335
|
id: "align-center",
|
|
17322
|
-
icon:
|
|
17336
|
+
icon: Fb,
|
|
17323
17337
|
name: "Align center",
|
|
17324
17338
|
hotkey: ["Ctrl", "Shift", "E"],
|
|
17325
17339
|
active: () => !i() && e.editor.isActive({ textAlign: "center" }),
|
|
@@ -17328,7 +17342,7 @@ const k1 = { render: b1 }, v1 = ({
|
|
|
17328
17342
|
}),
|
|
17329
17343
|
...t("textAlign", {
|
|
17330
17344
|
id: "align-right",
|
|
17331
|
-
icon:
|
|
17345
|
+
icon: _b,
|
|
17332
17346
|
name: "Align right",
|
|
17333
17347
|
hotkey: ["Ctrl", "Shift", "R"],
|
|
17334
17348
|
active: () => !i() && e.editor.isActive({ textAlign: "right" }),
|
|
@@ -17337,7 +17351,7 @@ const k1 = { render: b1 }, v1 = ({
|
|
|
17337
17351
|
}),
|
|
17338
17352
|
...t("link", {
|
|
17339
17353
|
id: "link",
|
|
17340
|
-
icon:
|
|
17354
|
+
icon: l1,
|
|
17341
17355
|
name: "Link",
|
|
17342
17356
|
hotkey: ["Ctrl", "K"],
|
|
17343
17357
|
active: () => e.editor.isActive("link"),
|
|
@@ -17345,14 +17359,14 @@ const k1 = { render: b1 }, v1 = ({
|
|
|
17345
17359
|
}),
|
|
17346
17360
|
...t("paragraphTextStyle", {
|
|
17347
17361
|
id: "paragraphTextStyle",
|
|
17348
|
-
icon:
|
|
17362
|
+
icon: g1,
|
|
17349
17363
|
name: "Text style",
|
|
17350
17364
|
secondary: !0,
|
|
17351
|
-
...
|
|
17365
|
+
...M1(() => e.editor)
|
|
17352
17366
|
}),
|
|
17353
17367
|
...t("blockquote", {
|
|
17354
17368
|
id: "blockquote",
|
|
17355
|
-
icon:
|
|
17369
|
+
icon: Ub,
|
|
17356
17370
|
name: "Blockquote",
|
|
17357
17371
|
active: () => e.editor.isActive("blockquote"),
|
|
17358
17372
|
onClick: () => e.editor.chain().focus().toggleBlockquote().run(),
|
|
@@ -17360,7 +17374,7 @@ const k1 = { render: b1 }, v1 = ({
|
|
|
17360
17374
|
}),
|
|
17361
17375
|
...t("codeBlock", {
|
|
17362
17376
|
id: "codeBlock",
|
|
17363
|
-
icon:
|
|
17377
|
+
icon: Qb,
|
|
17364
17378
|
name: "Code block",
|
|
17365
17379
|
hotkey: ["Ctrl", "Alt", "C"],
|
|
17366
17380
|
active: () => e.editor.isActive("codeBlock"),
|
|
@@ -17369,7 +17383,7 @@ const k1 = { render: b1 }, v1 = ({
|
|
|
17369
17383
|
}),
|
|
17370
17384
|
...t("strike", {
|
|
17371
17385
|
id: "strikethrough",
|
|
17372
|
-
icon:
|
|
17386
|
+
icon: h1,
|
|
17373
17387
|
name: "Strikethrough",
|
|
17374
17388
|
hotkey: ["Ctrl", "Shift", "X"],
|
|
17375
17389
|
active: () => e.editor.isActive("strike"),
|
|
@@ -17378,7 +17392,7 @@ const k1 = { render: b1 }, v1 = ({
|
|
|
17378
17392
|
}),
|
|
17379
17393
|
...t("horizontalRule", {
|
|
17380
17394
|
id: "horizontalRule",
|
|
17381
|
-
icon:
|
|
17395
|
+
icon: t1,
|
|
17382
17396
|
name: "Divider",
|
|
17383
17397
|
active: () => !1,
|
|
17384
17398
|
onClick: () => e.editor.chain().focus().setHorizontalRule().run(),
|
|
@@ -17390,21 +17404,7 @@ const k1 = { render: b1 }, v1 = ({
|
|
|
17390
17404
|
Fe(l.$slots, "linkModal", { linkTool: H(s) })
|
|
17391
17405
|
], 64));
|
|
17392
17406
|
}
|
|
17393
|
-
}),
|
|
17394
|
-
xmlns: "http://www.w3.org/2000/svg",
|
|
17395
|
-
fill: "none",
|
|
17396
|
-
stroke: "#000",
|
|
17397
|
-
"stroke-linecap": "round",
|
|
17398
|
-
viewBox: "0 0 32 32"
|
|
17399
|
-
};
|
|
17400
|
-
function M1(n, e) {
|
|
17401
|
-
return N(), V("svg", C1, e[0] || (e[0] = [
|
|
17402
|
-
L("line", { transform: "matrix(3 0 0 3 16 8)" }, null, -1),
|
|
17403
|
-
L("line", { transform: "matrix(3 0 0 3 16 16)" }, null, -1),
|
|
17404
|
-
L("line", { transform: "matrix(3 0 0 3 16 24)" }, null, -1)
|
|
17405
|
-
]));
|
|
17406
|
-
}
|
|
17407
|
-
const T1 = { render: M1 }, E1 = { class: "tools" }, O1 = /* @__PURE__ */ pe({
|
|
17407
|
+
}), E1 = { class: "tools" }, O1 = /* @__PURE__ */ pe({
|
|
17408
17408
|
__name: "RichTextEditorToolbar",
|
|
17409
17409
|
props: {
|
|
17410
17410
|
editor: {},
|
|
@@ -17459,7 +17459,7 @@ const T1 = { render: M1 }, E1 = { class: "tools" }, O1 = /* @__PURE__ */ pe({
|
|
|
17459
17459
|
onItemClick: s
|
|
17460
17460
|
}, {
|
|
17461
17461
|
default: q(() => [
|
|
17462
|
-
Z(H(
|
|
17462
|
+
Z(H(Sf))
|
|
17463
17463
|
]),
|
|
17464
17464
|
_: 1
|
|
17465
17465
|
}, 8, ["items"])) : re("", !0)
|
|
@@ -17510,7 +17510,7 @@ const T1 = { render: M1 }, E1 = { class: "tools" }, O1 = /* @__PURE__ */ pe({
|
|
|
17510
17510
|
customExtensions: u,
|
|
17511
17511
|
autofocus: d
|
|
17512
17512
|
} = Pa(r), f = t, h = (T) => "all" in c.value ? !0 : !!c.value[T], p = (T) => h(T) ? void 0 : !1, m = [
|
|
17513
|
-
|
|
17513
|
+
S0.configure({
|
|
17514
17514
|
bold: p("bold"),
|
|
17515
17515
|
italic: p("italic"),
|
|
17516
17516
|
bulletList: p("bulletList"),
|
|
@@ -17524,10 +17524,10 @@ const T1 = { render: M1 }, E1 = { class: "tools" }, O1 = /* @__PURE__ */ pe({
|
|
|
17524
17524
|
...h("paragraphTextStyle") && { paragraph: !1 },
|
|
17525
17525
|
hardBreak: !1
|
|
17526
17526
|
}),
|
|
17527
|
-
...h("underline") ? [
|
|
17528
|
-
...h("paragraphTextStyle") ? [
|
|
17527
|
+
...h("underline") ? [My] : [],
|
|
17528
|
+
...h("paragraphTextStyle") ? [Lb] : [],
|
|
17529
17529
|
...h("textAlign") ? [
|
|
17530
|
-
|
|
17530
|
+
Rb.configure({
|
|
17531
17531
|
types: [
|
|
17532
17532
|
c.value.heading ? "heading" : "",
|
|
17533
17533
|
"paragraph"
|
|
@@ -17535,13 +17535,13 @@ const T1 = { render: M1 }, E1 = { class: "tools" }, O1 = /* @__PURE__ */ pe({
|
|
|
17535
17535
|
alignments: ["left", "right", "center"]
|
|
17536
17536
|
})
|
|
17537
17537
|
] : [],
|
|
17538
|
-
...h("link") ? [
|
|
17539
|
-
|
|
17540
|
-
|
|
17538
|
+
...h("link") ? [Ib.configure({ validate: sd })] : [],
|
|
17539
|
+
rb,
|
|
17540
|
+
Cy.configure({
|
|
17541
17541
|
limit: i
|
|
17542
17542
|
}),
|
|
17543
17543
|
...u.value
|
|
17544
|
-
], y =
|
|
17544
|
+
], y = nb({
|
|
17545
17545
|
content: o.value,
|
|
17546
17546
|
editable: l.value && !a.value,
|
|
17547
17547
|
autofocus: d.value,
|
|
@@ -17594,7 +17594,7 @@ const T1 = { render: M1 }, E1 = { class: "tools" }, O1 = /* @__PURE__ */ pe({
|
|
|
17594
17594
|
key: 0,
|
|
17595
17595
|
class: Ve({ "embedded-toolbar": !H(v) })
|
|
17596
17596
|
}, [
|
|
17597
|
-
Z(
|
|
17597
|
+
Z(T1, {
|
|
17598
17598
|
editor: H(y),
|
|
17599
17599
|
"base-extensions": H(c),
|
|
17600
17600
|
"link-tool-options": T.linkToolOptions
|
|
@@ -17623,7 +17623,7 @@ const T1 = { render: M1 }, E1 = { class: "tools" }, O1 = /* @__PURE__ */ pe({
|
|
|
17623
17623
|
]),
|
|
17624
17624
|
_: 3
|
|
17625
17625
|
}, 8, ["css"])) : re("", !0),
|
|
17626
|
-
Z(H(
|
|
17626
|
+
Z(H(tb), {
|
|
17627
17627
|
class: Ve(["rich-text-editor", { editable: H(l) && !H(a) }]),
|
|
17628
17628
|
editor: H(y)
|
|
17629
17629
|
}, null, 8, ["editor", "class"]),
|