@cling-se/widget 0.15.8 → 0.16.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +13 -0
- package/README.internal.md +82 -0
- package/README.md +14 -43
- package/README.public.md +14 -0
- package/dist/{AddClientCallout-B3oHwM0w.js → AddClientCallout-y-zhsVHD.js} +4 -4
- package/dist/{AnswerModal-BIY9m36m.js → AnswerModal-D_Xn8vYp.js} +7 -7
- package/dist/{AttachmentItem-CkenzhCJ.js → AttachmentItem-B_QXPkQd.js} +5 -5
- package/dist/{BaseDatePicker-CtqDVlHe.js → BaseDatePicker-9mWkLSes.js} +2 -2
- package/dist/{BaseUpload-BeOrE1F0.js → BaseUpload-BYr9ceyE.js} +3 -3
- package/dist/{BlockMedia-BWGMf5cf.js → BlockMedia-B7df7mkZ.js} +2 -2
- package/dist/{CCallout-CB-vK9F0.js → CCallout-PpBctkYi.js} +2 -2
- package/dist/{CCurrencyDropdown-Dlj42evv.js → CCurrencyDropdown-B4r3UK5p.js} +4 -4
- package/dist/{CDropdownItem-CRc4VSz5.js → CDropdownItem-D9qExYxr.js} +2 -2
- package/dist/{CFormField-GIBoTVbZ.js → CFormField-CAu3ko8B.js} +1 -1
- package/dist/{CPhoneFormat-Ca1ccVRu.js → CPhoneFormat-LZmpWJgi.js} +1 -1
- package/dist/{CPhoneInput-DZpyNBd0.js → CPhoneInput-ChuZrAQD.js} +5 -5
- package/dist/{CPriceInput-NXVAOnQP.js → CPriceInput-COrol9j1.js} +2 -2
- package/dist/{CSelect-BrHJKjec.js → CSelect-kh9nf3qC.js} +5 -5
- package/dist/{CSkeleton-Dvy8uDVW.js → CSkeleton-D_ixq6ml.js} +1 -1
- package/dist/{ClientAutocomplete-jfloTTJ2.js → ClientAutocomplete-DHipi8vn.js} +6 -6
- package/dist/{ClientModal-DmjLYO4d.js → ClientModal-BowPWtr4.js} +14 -14
- package/dist/{ColorPicker-BH4PY9E2.js → ColorPicker-CzbXZiaY.js} +2 -2
- package/dist/{CompanyModal-CAJqnGck.js → CompanyModal-B9YpDL-m.js} +7 -7
- package/dist/{ContentWrapper-BI-9h6ov.js → ContentWrapper-DaZYO-TC.js} +9 -9
- package/dist/{CoverBlockSettings-DdXMR8BZ.js → CoverBlockSettings-BVjSiXAC.js} +9 -9
- package/dist/{DocAnswer-Dt-bz92P.js → DocAnswer-D2wP2fWm.js} +2 -2
- package/dist/{DocDetails-D8QKEMLn.js → DocDetails-BZ7Ra1DH.js} +7 -7
- package/dist/{DocForm-CE9_l6w6.js → DocForm-Bf9B4wgW.js} +57 -57
- package/dist/{DocFormSend-vTDflXXG.js → DocFormSend-CKgGNEXF.js} +2 -2
- package/dist/{DocLinks-BO9czwt7.js → DocLinks-D62I0vCP.js} +2 -2
- package/dist/{DocModalBase-0fsYtG6V.js → DocModalBase-DPDXjuJL.js} +2 -2
- package/dist/{DocPrint-xuxIQW8z.js → DocPrint-RJ0CtTmm.js} +2 -2
- package/dist/{DocReceipt-BytYF4CL.js → DocReceipt-BibIkXtI.js} +2 -2
- package/dist/{DocSendReminder-QvyimULH.js → DocSendReminder-8mxaYS6a.js} +1 -1
- package/dist/{DocTextEditor-UEAnD9Ix.js → DocTextEditor-CHSTTDb5.js} +317 -307
- package/dist/{DocTimeline-fiAmLpmF.js → DocTimeline-Pb2mDuSl.js} +2 -2
- package/dist/{DocumentClient-u93kv_ya.js → DocumentClient-CBVMXCJk.js} +5 -5
- package/dist/{DocumentLayout-BZeD_Gyt.js → DocumentLayout-C-wJE5eC.js} +6 -6
- package/dist/{DocumentLogotype-byz8hCUp.js → DocumentLogotype-DweKx9A7.js} +5 -5
- package/dist/{DocumentVoided-BsaIHjwB.js → DocumentVoided-yGVbvKRa.js} +1 -1
- package/dist/{EmbedInput-Ar_w6ypO.js → EmbedInput-Cjfd1wIG.js} +3 -3
- package/dist/{EmbedSettings-BbBFqsyn.js → EmbedSettings-CdKmydes.js} +4 -4
- package/dist/{ErrorCallout-BzYGsd1X.js → ErrorCallout-CcZpbmta.js} +4 -4
- package/dist/{FilePreviewModal-15Lqa5yi.js → FilePreviewModal-Cud7184s.js} +3 -3
- package/dist/{Flag-Iuep7qsp.js → Flag-BNvniHuq.js} +1 -1
- package/dist/{HeaderSettings-CvzkxBdC.js → HeaderSettings-BJsebJRd.js} +11 -11
- package/dist/{ImageSelectModal-DPE6h4RY.js → ImageSelectModal-DLf_eWz1.js} +6 -6
- package/dist/{ImageUploadWrapper-BLkn_myS.js → ImageUploadWrapper-w5ZLifwQ.js} +3 -3
- package/dist/{Index-CwSvxfJ5.js → Index-0FsmqoRt.js} +15 -15
- package/dist/{Index-50TIN8HC.js → Index-B5iGQq9Y.js} +7 -7
- package/dist/{Index-D99TWJd7.js → Index-B83yprTa.js} +4 -4
- package/dist/{Index-ToUQ0bbZ.js → Index-B9C1WkCd.js} +3 -3
- package/dist/{Index-DyjWjAAx.js → Index-BDbonb6D.js} +9 -9
- package/dist/{Index-B6AG0SDV.js → Index-BDdcJgub.js} +7 -7
- package/dist/{Index-BY06AGKE.js → Index-BKoxPM7Q.js} +7 -7
- package/dist/{Index-DY3zeep-.js → Index-BMH-ouw7.js} +7 -7
- package/dist/{Index-LXkKYFjA.js → Index-BQLpCuiY.js} +1 -1
- package/dist/{Index-BpVebMQy.js → Index-BlFe_sVA.js} +7 -7
- package/dist/{Index-SPap79Kf.js → Index-BlJJ_Hyd.js} +2 -2
- package/dist/{Index-CUqeHnaT.js → Index-BoHaA_xe.js} +4 -4
- package/dist/{Index-BxESK9aB.js → Index-BvvwWlpY.js} +5 -5
- package/dist/{Index-DQ75m466.js → Index-C-2vPFaj.js} +5 -5
- package/dist/{Index-fYzmWvd0.js → Index-C3yLVDgc.js} +4 -4
- package/dist/{Index-DYEEwHGV.js → Index-CF2U1V_D.js} +2 -2
- package/dist/{Index-kK3KdJTZ.js → Index-CRM1JC9P.js} +4 -4
- package/dist/{Index-DMFdQHiN.js → Index-CSpVwK6k.js} +4 -4
- package/dist/{Index-DoZ0cI55.js → Index-CcPsAtze.js} +5 -5
- package/dist/{Index-CNH4JNBW.js → Index-Cf2bPdtB.js} +6 -6
- package/dist/{Index-DZqfg4MK.js → Index-CiPhHgfu.js} +26 -26
- package/dist/{Index-CTGPvq-f.js → Index-Cj7YINSC.js} +5 -5
- package/dist/{Index-D0RWB-gX.js → Index-D4-f7mTG.js} +15 -15
- package/dist/{Index-Chm5-Du4.js → Index-DY9Tntfh.js} +3 -3
- package/dist/{Index-DfwtlBQ3.js → Index-DYkN8zVO.js} +2 -2
- package/dist/{Index-Cax7Dsww.js → Index-D_wcx3Of.js} +4 -4
- package/dist/{Index-Zbf56tZX.js → Index-DblXQyCy.js} +2 -2
- package/dist/{Index-DL60EOXM.js → Index-DuO2f-vX.js} +10 -10
- package/dist/{Index-5MnaOnb6.js → Index-DwgpBl9r.js} +2 -2
- package/dist/{Index-TleoR19t.js → Index-DzR0bujJ.js} +5 -5
- package/dist/{Index-uUhpQoXx.js → Index-P6z5RLSu.js} +6 -6
- package/dist/{Index-DgQ-y4d6.js → Index-VsRsMadr.js} +3 -3
- package/dist/{Index-7WHM8wRV.js → Index-f9sVo8jx.js} +7 -7
- package/dist/{Index-DMIHAmj8.js → Index-uY0XMOKH.js} +9 -9
- package/dist/{InputToggleRow-DNiafQW4.js → InputToggleRow-CJYPezZy.js} +2 -2
- package/dist/{ManualPopover-0DFFMWlf.js → ManualPopover-Cqoi2dQR.js} +3 -3
- package/dist/{MediaWrapper-BSlTqnhh.js → MediaWrapper-5ArAcMau.js} +3 -3
- package/dist/{NotBindingText-BfGCgcsR.js → NotBindingText-DdTbb3O4.js} +2 -2
- package/dist/{PackageGroup-DCTGA4Ro.js → PackageGroup-BTU_pglB.js} +10 -10
- package/dist/{PdfTerms-CXrs6eMv.js → PdfTerms-CltyFwWM.js} +3 -3
- package/dist/{PdfViewer-DxzSft8L.js → PdfViewer-DG-MYtZa.js} +20 -20
- package/dist/{PlainHtml-HRXr99JY.js → PlainHtml-SN-qLxLn.js} +1 -1
- package/dist/{PriceHeader-hXjfZxfH.js → PriceHeader-BWnpaBZ0.js} +9 -9
- package/dist/{SearchApi-DW3HuCLP.js → SearchApi-BnxpIqz-.js} +2 -2
- package/dist/{SendForm-fONWRcc-.js → SendForm-CrNnUYWp.js} +14 -14
- package/dist/{Setup-Tt45041C.js → Setup-BloDBZml.js} +1 -1
- package/dist/{SmartList-DBf6ys28.js → SmartList-_z7XCf7a.js} +1 -1
- package/dist/{TermsSettings-ucWr_Wwo.js → TermsSettings-CtijshXK.js} +6 -6
- package/dist/{ThemeColorRow-CF2NFLjN.js → ThemeColorRow-DThMA_v6.js} +4 -4
- package/dist/{ToggleBinding-DJIrPKnF.js → ToggleBinding-BXdn9i32.js} +4 -4
- package/dist/{UploadModal-C6bdMw0O.js → UploadModal-CMblLwJF.js} +3 -3
- package/dist/{VideoPlayerInput-DOZOevkX.js → VideoPlayerInput-Dpan3me5.js} +4 -4
- package/dist/{VideoPlayerSettings-IMxM4ek4.js → VideoPlayerSettings-Dmmoz0nE.js} +3 -3
- package/dist/{VideoSelectModal-siyVr32Q.js → VideoSelectModal-CrFgVTrD.js} +4 -4
- package/dist/{answerDocumentMixin-B39nx-g1.js → answerDocumentMixin-C13fhvoV.js} +3 -3
- package/dist/{debounce-CHDfr29z.js → debounce-4B1-HP-3.js} +1 -1
- package/dist/{focusDrawerMixin-D9UjWglf.js → focusDrawerMixin-CctNs3Uo.js} +1 -1
- package/dist/{formDrawerState-ZuevS9li.js → formDrawerState-DEg12QaL.js} +1 -1
- package/dist/{formValidationMixin-Dm50vaeG.js → formValidationMixin-DXSTeLwK.js} +1 -1
- package/dist/{index-RCHnUQZg.js → index-4BD0nKeD.js} +2 -2
- package/dist/{index-wO4GnKTd.js → index-BTvgCLOL.js} +1 -1
- package/dist/{index-BJGKN_Lo.js → index-CtLvzhen.js} +9 -9
- package/dist/{index-DBKwhFmi.js → index-D7crCb7w.js} +1 -1
- package/dist/{index-Dq-34h-w.js → index-DfRihiRe.js} +9 -9
- package/dist/{index-CUzKWi0i.js → index-MnjQHyr1.js} +9 -9
- package/dist/index.es.js +3 -3
- package/dist/index.umd.js +75 -75
- package/dist/{main-DGbS8R6V.js → main-DK3JrX1P.js} +115 -109
- package/dist/{mapFormMixin-CT5_px27.js → mapFormMixin-_bBfKoX9.js} +1 -1
- package/dist/{omit-BXSebC3v.js → omit-CqikFKvF.js} +1 -1
- package/dist/{publicSenderState-CXESYkye.js → publicSenderState-DtdMgn5v.js} +1 -1
- package/dist/{simplebar.min-5QX85rG2.js → simplebar.min-BEjSOYoR.js} +1 -1
- package/dist/style.css +2 -2
- package/dist/{throttle-CLeRwaqj.js → throttle-Bbw-Wnk7.js} +2 -2
- package/dist/{tinycolor-BP1bAH70.js → tinycolor-DxfarVSt.js} +1 -1
- package/dist/{tippy.esm-B9UOKRIp.js → tippy.esm-DQb1IUux.js} +6 -6
- package/dist/{utils-ChpqjBlG.js → utils-DSw9IgIG.js} +1 -1
- package/dist/{vuedraggable.umd-BDI5B15c.js → vuedraggable.umd-kqbjGStS.js} +1 -1
- package/package.json +7 -1
|
@@ -1,9 +1,9 @@
|
|
|
1
|
-
import { V as Vn, n as ut, $ as
|
|
1
|
+
import { V as Vn, n as ut, $ as bs, b as zr, G as _a, p as $a } from "./main-DK3JrX1P.js";
|
|
2
2
|
import { g as jn } from "./dom-CJxkno7i.js";
|
|
3
|
-
import { t as Uo, F as Ha, s as Va, d as Ds } from "./tippy.esm-
|
|
4
|
-
import { i as Jo, w as ja } from "./CDropdownItem-
|
|
5
|
-
import { C as Wa } from "./ColorPicker-
|
|
6
|
-
import { M as Go } from "./ManualPopover-
|
|
3
|
+
import { t as Uo, F as Ha, s as Va, d as Ds } from "./tippy.esm-DQb1IUux.js";
|
|
4
|
+
import { i as Jo, w as ja } from "./CDropdownItem-D9qExYxr.js";
|
|
5
|
+
import { C as Wa } from "./ColorPicker-CzbXZiaY.js";
|
|
6
|
+
import { M as Go } from "./ManualPopover-Cqoi2dQR.js";
|
|
7
7
|
import { h as qa } from "./color-TdtKxwVa.js";
|
|
8
8
|
function ee(n) {
|
|
9
9
|
this.content = n;
|
|
@@ -411,9 +411,9 @@ class b {
|
|
|
411
411
|
}
|
|
412
412
|
}
|
|
413
413
|
b.empty = new b([], 0);
|
|
414
|
-
const
|
|
414
|
+
const _r = { index: 0, offset: 0 };
|
|
415
415
|
function Tn(n, e) {
|
|
416
|
-
return
|
|
416
|
+
return _r.index = n, _r.offset = e, _r;
|
|
417
417
|
}
|
|
418
418
|
function Wn(n, e) {
|
|
419
419
|
if (n === e)
|
|
@@ -439,7 +439,7 @@ function Wn(n, e) {
|
|
|
439
439
|
}
|
|
440
440
|
return !0;
|
|
441
441
|
}
|
|
442
|
-
let P = class
|
|
442
|
+
let P = class ci {
|
|
443
443
|
/**
|
|
444
444
|
@internal
|
|
445
445
|
*/
|
|
@@ -536,8 +536,8 @@ let P = class ui {
|
|
|
536
536
|
*/
|
|
537
537
|
static setFrom(e) {
|
|
538
538
|
if (!e || Array.isArray(e) && e.length == 0)
|
|
539
|
-
return
|
|
540
|
-
if (e instanceof
|
|
539
|
+
return ci.none;
|
|
540
|
+
if (e instanceof ci)
|
|
541
541
|
return [e];
|
|
542
542
|
let t = e.slice();
|
|
543
543
|
return t.sort((r, i) => r.type.rank - i.type.rank), t;
|
|
@@ -672,7 +672,7 @@ function tl(n, e) {
|
|
|
672
672
|
if (!e.type.compatibleContent(n.type))
|
|
673
673
|
throw new Cn("Cannot join " + e.type.name + " onto " + n.type.name);
|
|
674
674
|
}
|
|
675
|
-
function
|
|
675
|
+
function di(n, e, t) {
|
|
676
676
|
let r = n.node(t);
|
|
677
677
|
return tl(r, e.node(t)), r;
|
|
678
678
|
}
|
|
@@ -693,13 +693,13 @@ function yt(n, e) {
|
|
|
693
693
|
return n.copy(e);
|
|
694
694
|
}
|
|
695
695
|
function nl(n, e, t, r, i) {
|
|
696
|
-
let s = n.depth > i &&
|
|
696
|
+
let s = n.depth > i && di(n, e, i + 1), o = r.depth > i && di(t, r, i + 1), l = [];
|
|
697
697
|
return dn(null, n, i, l), s && o && e.index(i) == t.index(i) ? (tl(s, o), gt(yt(s, nl(n, e, t, r, i + 1)), l)) : (s && gt(yt(s, qn(n, e, i + 1)), l), dn(e, t, i, l), o && gt(yt(o, qn(t, r, i + 1)), l)), dn(r, null, i, l), new b(l);
|
|
698
698
|
}
|
|
699
699
|
function qn(n, e, t) {
|
|
700
700
|
let r = [];
|
|
701
701
|
if (dn(null, n, t, r), n.depth > t) {
|
|
702
|
-
let i =
|
|
702
|
+
let i = di(n, e, t + 1);
|
|
703
703
|
gt(yt(i, qn(n, e, t + 1)), r);
|
|
704
704
|
}
|
|
705
705
|
return dn(e, null, t, r), new b(r);
|
|
@@ -947,16 +947,16 @@ class kn {
|
|
|
947
947
|
@internal
|
|
948
948
|
*/
|
|
949
949
|
static resolveCached(e, t) {
|
|
950
|
-
for (let i = 0; i <
|
|
951
|
-
let s =
|
|
950
|
+
for (let i = 0; i < $r.length; i++) {
|
|
951
|
+
let s = $r[i];
|
|
952
952
|
if (s.pos == t && s.doc == e)
|
|
953
953
|
return s;
|
|
954
954
|
}
|
|
955
|
-
let r =
|
|
956
|
-
return
|
|
955
|
+
let r = $r[Hr] = kn.resolve(e, t);
|
|
956
|
+
return Hr = (Hr + 1) % Ja, r;
|
|
957
957
|
}
|
|
958
958
|
}
|
|
959
|
-
let
|
|
959
|
+
let $r = [], Hr = 0, Ja = 12;
|
|
960
960
|
class Kn {
|
|
961
961
|
/**
|
|
962
962
|
Construct a node range. `$from` and `$to` should point into the
|
|
@@ -998,7 +998,7 @@ class Kn {
|
|
|
998
998
|
}
|
|
999
999
|
}
|
|
1000
1000
|
const Ga = /* @__PURE__ */ Object.create(null);
|
|
1001
|
-
let bt = class
|
|
1001
|
+
let bt = class hi {
|
|
1002
1002
|
/**
|
|
1003
1003
|
@internal
|
|
1004
1004
|
*/
|
|
@@ -1116,14 +1116,14 @@ let bt = class di {
|
|
|
1116
1116
|
the given content (or empty, if no content is given).
|
|
1117
1117
|
*/
|
|
1118
1118
|
copy(e = null) {
|
|
1119
|
-
return e == this.content ? this : new
|
|
1119
|
+
return e == this.content ? this : new hi(this.type, this.attrs, e, this.marks);
|
|
1120
1120
|
}
|
|
1121
1121
|
/**
|
|
1122
1122
|
Create a copy of this node, with the given set of marks instead
|
|
1123
1123
|
of the node's own marks.
|
|
1124
1124
|
*/
|
|
1125
1125
|
mark(e) {
|
|
1126
|
-
return e == this.marks ? this : new
|
|
1126
|
+
return e == this.marks ? this : new hi(this.type, this.attrs, this.content, e);
|
|
1127
1127
|
}
|
|
1128
1128
|
/**
|
|
1129
1129
|
Create a copy of this node with only the content between the
|
|
@@ -2620,7 +2620,7 @@ class Ie {
|
|
|
2620
2620
|
nodes.
|
|
2621
2621
|
*/
|
|
2622
2622
|
serializeFragment(e, t = {}, r) {
|
|
2623
|
-
r || (r =
|
|
2623
|
+
r || (r = Vr(t).createDocumentFragment());
|
|
2624
2624
|
let i = r, s = [];
|
|
2625
2625
|
return e.forEach((o) => {
|
|
2626
2626
|
if (s.length || o.marks.length) {
|
|
@@ -2649,7 +2649,7 @@ class Ie {
|
|
|
2649
2649
|
@internal
|
|
2650
2650
|
*/
|
|
2651
2651
|
serializeNodeInner(e, t) {
|
|
2652
|
-
let { dom: r, contentDOM: i } = Ie.renderSpec(
|
|
2652
|
+
let { dom: r, contentDOM: i } = Ie.renderSpec(Vr(t), this.nodes[e.type.name](e));
|
|
2653
2653
|
if (i) {
|
|
2654
2654
|
if (e.isLeaf)
|
|
2655
2655
|
throw new RangeError("Content hole not allowed in a leaf node spec");
|
|
@@ -2677,7 +2677,7 @@ class Ie {
|
|
|
2677
2677
|
*/
|
|
2678
2678
|
serializeMark(e, t, r = {}) {
|
|
2679
2679
|
let i = this.marks[e.type.name];
|
|
2680
|
-
return i && Ie.renderSpec(
|
|
2680
|
+
return i && Ie.renderSpec(Vr(r), i(e, t));
|
|
2681
2681
|
}
|
|
2682
2682
|
/**
|
|
2683
2683
|
Render an [output spec](https://prosemirror.net/docs/ref/#model.DOMOutputSpec) to a DOM node. If
|
|
@@ -2749,7 +2749,7 @@ function Es(n) {
|
|
|
2749
2749
|
}
|
|
2750
2750
|
return e;
|
|
2751
2751
|
}
|
|
2752
|
-
function
|
|
2752
|
+
function Vr(n) {
|
|
2753
2753
|
return n.document || window.document;
|
|
2754
2754
|
}
|
|
2755
2755
|
const hl = 65535, fl = Math.pow(2, 16);
|
|
@@ -2763,7 +2763,7 @@ function pu(n) {
|
|
|
2763
2763
|
return (n - (n & hl)) / fl;
|
|
2764
2764
|
}
|
|
2765
2765
|
const pl = 1, ml = 2, Pn = 4, gl = 8;
|
|
2766
|
-
class
|
|
2766
|
+
class fi {
|
|
2767
2767
|
/**
|
|
2768
2768
|
@internal
|
|
2769
2769
|
*/
|
|
@@ -2840,11 +2840,11 @@ class Ce {
|
|
|
2840
2840
|
if (r)
|
|
2841
2841
|
return f;
|
|
2842
2842
|
let p = e == (t < 0 ? a : d) ? null : fu(l / 3, e - a), m = e == a ? ml : e == d ? pl : Pn;
|
|
2843
|
-
return (t < 0 ? e != a : e != d) && (m |= gl), new
|
|
2843
|
+
return (t < 0 ? e != a : e != d) && (m |= gl), new fi(f, m, p);
|
|
2844
2844
|
}
|
|
2845
2845
|
i += c - u;
|
|
2846
2846
|
}
|
|
2847
|
-
return r ? e + i : new
|
|
2847
|
+
return r ? e + i : new fi(e + i, 0, null);
|
|
2848
2848
|
}
|
|
2849
2849
|
/**
|
|
2850
2850
|
@internal
|
|
@@ -3000,10 +3000,10 @@ class $t {
|
|
|
3000
3000
|
}
|
|
3001
3001
|
i |= l.delInfo, e = l.pos;
|
|
3002
3002
|
}
|
|
3003
|
-
return r ? e : new
|
|
3003
|
+
return r ? e : new fi(e, i, null);
|
|
3004
3004
|
}
|
|
3005
3005
|
}
|
|
3006
|
-
const
|
|
3006
|
+
const jr = /* @__PURE__ */ Object.create(null);
|
|
3007
3007
|
class pe {
|
|
3008
3008
|
/**
|
|
3009
3009
|
Get the step map that represents the changes made by this step,
|
|
@@ -3028,7 +3028,7 @@ class pe {
|
|
|
3028
3028
|
static fromJSON(e, t) {
|
|
3029
3029
|
if (!t || !t.stepType)
|
|
3030
3030
|
throw new RangeError("Invalid input for Step.fromJSON");
|
|
3031
|
-
let r =
|
|
3031
|
+
let r = jr[t.stepType];
|
|
3032
3032
|
if (!r)
|
|
3033
3033
|
throw new RangeError(`No step type ${t.stepType} defined`);
|
|
3034
3034
|
return r.fromJSON(e, t);
|
|
@@ -3040,9 +3040,9 @@ class pe {
|
|
|
3040
3040
|
that's unlikely to clash with steps from other modules.
|
|
3041
3041
|
*/
|
|
3042
3042
|
static jsonID(e, t) {
|
|
3043
|
-
if (e in
|
|
3043
|
+
if (e in jr)
|
|
3044
3044
|
throw new RangeError("Duplicate use of step JSON ID " + e);
|
|
3045
|
-
return
|
|
3045
|
+
return jr[e] = t, t.prototype.jsonID = e, t;
|
|
3046
3046
|
}
|
|
3047
3047
|
}
|
|
3048
3048
|
class U {
|
|
@@ -3079,11 +3079,11 @@ class U {
|
|
|
3079
3079
|
}
|
|
3080
3080
|
}
|
|
3081
3081
|
}
|
|
3082
|
-
function
|
|
3082
|
+
function zi(n, e, t) {
|
|
3083
3083
|
let r = [];
|
|
3084
3084
|
for (let i = 0; i < n.childCount; i++) {
|
|
3085
3085
|
let s = n.child(i);
|
|
3086
|
-
s.content.size && (s = s.copy(
|
|
3086
|
+
s.content.size && (s = s.copy(zi(s.content, e, s))), s.isInline && (s = e(s, t, i)), r.push(s);
|
|
3087
3087
|
}
|
|
3088
3088
|
return b.fromArray(r);
|
|
3089
3089
|
}
|
|
@@ -3095,7 +3095,7 @@ class et extends pe {
|
|
|
3095
3095
|
super(), this.from = e, this.to = t, this.mark = r;
|
|
3096
3096
|
}
|
|
3097
3097
|
apply(e) {
|
|
3098
|
-
let t = e.slice(this.from, this.to), r = e.resolve(this.from), i = r.node(r.sharedDepth(this.to)), s = new k(
|
|
3098
|
+
let t = e.slice(this.from, this.to), r = e.resolve(this.from), i = r.node(r.sharedDepth(this.to)), s = new k(zi(t.content, (o, l) => !o.isAtom || !l.type.allowsMarkType(this.mark.type) ? o : o.mark(this.mark.addToSet(o.marks)), i), t.openStart, t.openEnd);
|
|
3099
3099
|
return U.fromReplace(e, this.from, this.to, s);
|
|
3100
3100
|
}
|
|
3101
3101
|
invert() {
|
|
@@ -3134,7 +3134,7 @@ class Pe extends pe {
|
|
|
3134
3134
|
super(), this.from = e, this.to = t, this.mark = r;
|
|
3135
3135
|
}
|
|
3136
3136
|
apply(e) {
|
|
3137
|
-
let t = e.slice(this.from, this.to), r = new k(
|
|
3137
|
+
let t = e.slice(this.from, this.to), r = new k(zi(t.content, (i) => i.mark(this.mark.removeFromSet(i.marks)), e), t.openStart, t.openEnd);
|
|
3138
3138
|
return U.fromReplace(e, this.from, this.to, r);
|
|
3139
3139
|
}
|
|
3140
3140
|
invert() {
|
|
@@ -3258,7 +3258,7 @@ class se extends pe {
|
|
|
3258
3258
|
super(), this.from = e, this.to = t, this.slice = r, this.structure = i;
|
|
3259
3259
|
}
|
|
3260
3260
|
apply(e) {
|
|
3261
|
-
return this.structure &&
|
|
3261
|
+
return this.structure && pi(e, this.from, this.to) ? U.fail("Structure replace would overwrite content") : U.fromReplace(e, this.from, this.to, this.slice);
|
|
3262
3262
|
}
|
|
3263
3263
|
getMap() {
|
|
3264
3264
|
return new Ce([this.from, this.to - this.from, this.slice.size]);
|
|
@@ -3307,7 +3307,7 @@ class Y extends pe {
|
|
|
3307
3307
|
super(), this.from = e, this.to = t, this.gapFrom = r, this.gapTo = i, this.slice = s, this.insert = o, this.structure = l;
|
|
3308
3308
|
}
|
|
3309
3309
|
apply(e) {
|
|
3310
|
-
if (this.structure && (
|
|
3310
|
+
if (this.structure && (pi(e, this.from, this.gapFrom) || pi(e, this.gapTo, this.to)))
|
|
3311
3311
|
return U.fail("Structure gap-replace would overwrite content");
|
|
3312
3312
|
let t = e.slice(this.gapFrom, this.gapTo);
|
|
3313
3313
|
if (t.openStart || t.openEnd)
|
|
@@ -3354,7 +3354,7 @@ class Y extends pe {
|
|
|
3354
3354
|
}
|
|
3355
3355
|
}
|
|
3356
3356
|
pe.jsonID("replaceAround", Y);
|
|
3357
|
-
function
|
|
3357
|
+
function pi(n, e, t) {
|
|
3358
3358
|
let r = n.resolve(e), i = t - e, s = r.depth;
|
|
3359
3359
|
for (; i > 0 && s > 0 && r.indexAfter(s) == r.node(s).childCount; )
|
|
3360
3360
|
s--, i--;
|
|
@@ -3451,7 +3451,7 @@ function Du(n, e, t) {
|
|
|
3451
3451
|
m || i.after(p + 1) < i.end(p) ? (m = !0, h = b.from(i.node(p).copy(h)), f++) : u++;
|
|
3452
3452
|
n.step(new Y(a, u, o, l, new k(c.append(h), d, f), c.size - d, !0));
|
|
3453
3453
|
}
|
|
3454
|
-
function
|
|
3454
|
+
function _i(n, e, t = null, r = n) {
|
|
3455
3455
|
let i = Cu(n, e), s = i && ku(r, e);
|
|
3456
3456
|
return s ? i.map(Ts).concat({ type: e, attrs: t }).concat(s.map(Ts)) : null;
|
|
3457
3457
|
}
|
|
@@ -3593,7 +3593,7 @@ function yl(n, e, t) {
|
|
|
3593
3593
|
}
|
|
3594
3594
|
return null;
|
|
3595
3595
|
}
|
|
3596
|
-
function
|
|
3596
|
+
function $i(n, e, t = e, r = k.empty) {
|
|
3597
3597
|
if (e == t && !r.size)
|
|
3598
3598
|
return null;
|
|
3599
3599
|
let i = n.resolve(e), s = n.resolve(t);
|
|
@@ -3639,7 +3639,7 @@ class Ou {
|
|
|
3639
3639
|
for (let e = 1; e <= 2; e++)
|
|
3640
3640
|
for (let t = this.unplaced.openStart; t >= 0; t--) {
|
|
3641
3641
|
let r, i = null;
|
|
3642
|
-
t ? (i =
|
|
3642
|
+
t ? (i = Wr(this.unplaced.content, t - 1).firstChild, r = i.content) : r = this.unplaced.content;
|
|
3643
3643
|
let s = r.firstChild;
|
|
3644
3644
|
for (let o = this.depth; o >= 0; o--) {
|
|
3645
3645
|
let { type: l, match: a } = this.frontier[o], u, c = null;
|
|
@@ -3653,11 +3653,11 @@ class Ou {
|
|
|
3653
3653
|
}
|
|
3654
3654
|
}
|
|
3655
3655
|
openMore() {
|
|
3656
|
-
let { content: e, openStart: t, openEnd: r } = this.unplaced, i =
|
|
3656
|
+
let { content: e, openStart: t, openEnd: r } = this.unplaced, i = Wr(e, t);
|
|
3657
3657
|
return !i.childCount || i.firstChild.isLeaf ? !1 : (this.unplaced = new k(e, t + 1, Math.max(r, i.size + t >= e.size - r ? t + 1 : 0)), !0);
|
|
3658
3658
|
}
|
|
3659
3659
|
dropNode() {
|
|
3660
|
-
let { content: e, openStart: t, openEnd: r } = this.unplaced, i =
|
|
3660
|
+
let { content: e, openStart: t, openEnd: r } = this.unplaced, i = Wr(e, t);
|
|
3661
3661
|
if (i.childCount <= 1 && t > 0) {
|
|
3662
3662
|
let s = e.size - t <= t + i.size;
|
|
3663
3663
|
this.unplaced = new k(an(e, t - 1, 1), t - 1, s ? t - 1 : r);
|
|
@@ -3698,7 +3698,7 @@ class Ou {
|
|
|
3698
3698
|
if (!this.$to.parent.isTextblock)
|
|
3699
3699
|
return -1;
|
|
3700
3700
|
let e = this.frontier[this.depth], t;
|
|
3701
|
-
if (!e.type.isTextblock || !
|
|
3701
|
+
if (!e.type.isTextblock || !qr(this.$to, this.$to.depth, e.type, e.match, !1) || this.$to.depth == this.depth && (t = this.findCloseLevel(this.$to)) && t.depth == this.depth)
|
|
3702
3702
|
return -1;
|
|
3703
3703
|
let { depth: r } = this.$to, i = this.$to.after(r);
|
|
3704
3704
|
for (; r > 1 && i == this.$to.end(--r); )
|
|
@@ -3708,10 +3708,10 @@ class Ou {
|
|
|
3708
3708
|
findCloseLevel(e) {
|
|
3709
3709
|
e:
|
|
3710
3710
|
for (let t = Math.min(this.depth, e.depth); t >= 0; t--) {
|
|
3711
|
-
let { match: r, type: i } = this.frontier[t], s = t < e.depth && e.end(t + 1) == e.pos + (e.depth - (t + 1)), o =
|
|
3711
|
+
let { match: r, type: i } = this.frontier[t], s = t < e.depth && e.end(t + 1) == e.pos + (e.depth - (t + 1)), o = qr(e, t, i, r, s);
|
|
3712
3712
|
if (o) {
|
|
3713
3713
|
for (let l = t - 1; l >= 0; l--) {
|
|
3714
|
-
let { match: a, type: u } = this.frontier[l], c =
|
|
3714
|
+
let { match: a, type: u } = this.frontier[l], c = qr(e, l, u, a, !0);
|
|
3715
3715
|
if (!c || c.childCount)
|
|
3716
3716
|
continue e;
|
|
3717
3717
|
}
|
|
@@ -3747,7 +3747,7 @@ function an(n, e, t) {
|
|
|
3747
3747
|
function un(n, e, t) {
|
|
3748
3748
|
return e == 0 ? n.append(t) : n.replaceChild(n.childCount - 1, n.lastChild.copy(un(n.lastChild.content, e - 1, t)));
|
|
3749
3749
|
}
|
|
3750
|
-
function
|
|
3750
|
+
function Wr(n, e) {
|
|
3751
3751
|
for (let t = 0; t < e; t++)
|
|
3752
3752
|
n = n.firstChild.content;
|
|
3753
3753
|
return n;
|
|
@@ -3758,7 +3758,7 @@ function Dl(n, e, t) {
|
|
|
3758
3758
|
let r = n.content;
|
|
3759
3759
|
return e > 1 && (r = r.replaceChild(0, Dl(r.firstChild, e - 1, r.childCount == 1 ? t - 1 : 0))), e > 0 && (r = n.type.contentMatch.fillBefore(r).append(r), t <= 0 && (r = r.append(n.type.contentMatch.matchFragment(r).fillBefore(b.empty, !0)))), n.copy(r);
|
|
3760
3760
|
}
|
|
3761
|
-
function
|
|
3761
|
+
function qr(n, e, t, r, i) {
|
|
3762
3762
|
let s = n.node(e), o = i ? n.indexAfter(e) : n.index(e);
|
|
3763
3763
|
if (o == s.childCount && !t.compatibleContent(s.type))
|
|
3764
3764
|
return null;
|
|
@@ -3910,7 +3910,7 @@ Kt = function n(e) {
|
|
|
3910
3910
|
Kt.prototype = Object.create(Error.prototype);
|
|
3911
3911
|
Kt.prototype.constructor = Kt;
|
|
3912
3912
|
Kt.prototype.name = "TransformError";
|
|
3913
|
-
class
|
|
3913
|
+
class Hi {
|
|
3914
3914
|
/**
|
|
3915
3915
|
Create a transform that starts with the given document.
|
|
3916
3916
|
*/
|
|
@@ -3959,7 +3959,7 @@ class $i {
|
|
|
3959
3959
|
given `slice`.
|
|
3960
3960
|
*/
|
|
3961
3961
|
replace(e, t = e, r = k.empty) {
|
|
3962
|
-
let i =
|
|
3962
|
+
let i = $i(this.doc, e, t, r);
|
|
3963
3963
|
return i && this.step(i), this;
|
|
3964
3964
|
}
|
|
3965
3965
|
/**
|
|
@@ -4122,7 +4122,7 @@ class $i {
|
|
|
4122
4122
|
return yu(this, e, t, r), this;
|
|
4123
4123
|
}
|
|
4124
4124
|
}
|
|
4125
|
-
const
|
|
4125
|
+
const Kr = /* @__PURE__ */ Object.create(null);
|
|
4126
4126
|
class E {
|
|
4127
4127
|
/**
|
|
4128
4128
|
Initialize a selection with the head and anchor and ranges. If no
|
|
@@ -4258,7 +4258,7 @@ class E {
|
|
|
4258
4258
|
static fromJSON(e, t) {
|
|
4259
4259
|
if (!t || !t.type)
|
|
4260
4260
|
throw new RangeError("Invalid input for Selection.fromJSON");
|
|
4261
|
-
let r =
|
|
4261
|
+
let r = Kr[t.type];
|
|
4262
4262
|
if (!r)
|
|
4263
4263
|
throw new RangeError(`No selection type ${t.type} defined`);
|
|
4264
4264
|
return r.fromJSON(e, t);
|
|
@@ -4270,9 +4270,9 @@ class E {
|
|
|
4270
4270
|
clash with classes from other modules.
|
|
4271
4271
|
*/
|
|
4272
4272
|
static jsonID(e, t) {
|
|
4273
|
-
if (e in
|
|
4273
|
+
if (e in Kr)
|
|
4274
4274
|
throw new RangeError("Duplicate use of selection JSON ID " + e);
|
|
4275
|
-
return
|
|
4275
|
+
return Kr[e] = t, t.prototype.jsonID = e, t;
|
|
4276
4276
|
}
|
|
4277
4277
|
/**
|
|
4278
4278
|
Get a [bookmark](https://prosemirror.net/docs/ref/#state.SelectionBookmark) for this selection,
|
|
@@ -4406,7 +4406,7 @@ class S extends E {
|
|
|
4406
4406
|
return { type: "node", anchor: this.anchor };
|
|
4407
4407
|
}
|
|
4408
4408
|
getBookmark() {
|
|
4409
|
-
return new
|
|
4409
|
+
return new Vi(this.anchor);
|
|
4410
4410
|
}
|
|
4411
4411
|
/**
|
|
4412
4412
|
@internal
|
|
@@ -4432,13 +4432,13 @@ class S extends E {
|
|
|
4432
4432
|
}
|
|
4433
4433
|
S.prototype.visible = !1;
|
|
4434
4434
|
E.jsonID("node", S);
|
|
4435
|
-
class
|
|
4435
|
+
class Vi {
|
|
4436
4436
|
constructor(e) {
|
|
4437
4437
|
this.anchor = e;
|
|
4438
4438
|
}
|
|
4439
4439
|
map(e) {
|
|
4440
4440
|
let { deleted: t, pos: r } = e.mapResult(this.anchor);
|
|
4441
|
-
return t ? new vr(r, r) : new
|
|
4441
|
+
return t ? new vr(r, r) : new Vi(r);
|
|
4442
4442
|
}
|
|
4443
4443
|
resolve(e) {
|
|
4444
4444
|
let t = e.resolve(this.anchor), r = t.nodeAfter;
|
|
@@ -4518,7 +4518,7 @@ function Fs(n, e, t) {
|
|
|
4518
4518
|
}), n.setSelection(E.near(n.doc.resolve(o), t));
|
|
4519
4519
|
}
|
|
4520
4520
|
const Bs = 1, Nn = 2, Rs = 4;
|
|
4521
|
-
class Pu extends
|
|
4521
|
+
class Pu extends Hi {
|
|
4522
4522
|
/**
|
|
4523
4523
|
@internal
|
|
4524
4524
|
*/
|
|
@@ -4711,7 +4711,7 @@ const zu = [
|
|
|
4711
4711
|
}
|
|
4712
4712
|
})
|
|
4713
4713
|
];
|
|
4714
|
-
class
|
|
4714
|
+
class Ur {
|
|
4715
4715
|
constructor(e, t) {
|
|
4716
4716
|
this.schema = e, this.plugins = [], this.pluginsByKey = /* @__PURE__ */ Object.create(null), this.fields = zu.slice(), t && t.forEach((r) => {
|
|
4717
4717
|
if (this.pluginsByKey[r.key])
|
|
@@ -4812,7 +4812,7 @@ class Nt {
|
|
|
4812
4812
|
Create a new state.
|
|
4813
4813
|
*/
|
|
4814
4814
|
static create(e) {
|
|
4815
|
-
let t = new
|
|
4815
|
+
let t = new Ur(e.doc ? e.doc.type.schema : e.schema, e.plugins), r = new Nt(t);
|
|
4816
4816
|
for (let i = 0; i < t.fields.length; i++)
|
|
4817
4817
|
r[t.fields[i].name] = t.fields[i].init(e, r);
|
|
4818
4818
|
return r;
|
|
@@ -4826,7 +4826,7 @@ class Nt {
|
|
|
4826
4826
|
configuration object..
|
|
4827
4827
|
*/
|
|
4828
4828
|
reconfigure(e) {
|
|
4829
|
-
let t = new
|
|
4829
|
+
let t = new Ur(this.schema, e.plugins), r = t.fields, i = new Nt(t);
|
|
4830
4830
|
for (let s = 0; s < r.length; s++) {
|
|
4831
4831
|
let o = r[s].name;
|
|
4832
4832
|
i[o] = this.hasOwnProperty(o) ? this[o] : r[s].init(e, i);
|
|
@@ -4863,7 +4863,7 @@ class Nt {
|
|
|
4863
4863
|
throw new RangeError("Invalid input for EditorState.fromJSON");
|
|
4864
4864
|
if (!e.schema)
|
|
4865
4865
|
throw new RangeError("Required config field 'schema' missing");
|
|
4866
|
-
let i = new
|
|
4866
|
+
let i = new Ur(e.schema, e.plugins), s = new Nt(i);
|
|
4867
4867
|
return i.fields.forEach((o) => {
|
|
4868
4868
|
if (o.name == "doc")
|
|
4869
4869
|
s.doc = bt.fromJSON(e.schema, t.doc);
|
|
@@ -4906,9 +4906,9 @@ class $ {
|
|
|
4906
4906
|
return e[this.key];
|
|
4907
4907
|
}
|
|
4908
4908
|
}
|
|
4909
|
-
const
|
|
4909
|
+
const Jr = /* @__PURE__ */ Object.create(null);
|
|
4910
4910
|
function Al(n) {
|
|
4911
|
-
return n in
|
|
4911
|
+
return n in Jr ? n + "$" + ++Jr[n] : (Jr[n] = 0, n + "$");
|
|
4912
4912
|
}
|
|
4913
4913
|
class K {
|
|
4914
4914
|
/**
|
|
@@ -4995,9 +4995,9 @@ function Vu(n) {
|
|
|
4995
4995
|
e = e.shadowRoot.activeElement;
|
|
4996
4996
|
return e;
|
|
4997
4997
|
}
|
|
4998
|
-
const ot = typeof navigator < "u" ? navigator : null, zs = typeof document < "u" ? document : null, ct = ot && ot.userAgent || "",
|
|
4998
|
+
const ot = typeof navigator < "u" ? navigator : null, zs = typeof document < "u" ? document : null, ct = ot && ot.userAgent || "", mi = /Edge\/(\d+)/.exec(ct), vl = /MSIE \d/.exec(ct), gi = /Trident\/(?:[7-9]|\d{2,})\..*rv:(\d+)/.exec(ct), fe = !!(vl || gi || mi), rt = vl ? document.documentMode : gi ? +gi[1] : mi ? +mi[1] : 0, Me = !fe && /gecko\/(\d+)/i.test(ct);
|
|
4999
4999
|
Me && +(/Firefox\/(\d+)/.exec(ct) || [0, 0])[1];
|
|
5000
|
-
const
|
|
5000
|
+
const yi = !fe && /Chrome\/(\d+)/.exec(ct), he = !!yi, ju = yi ? +yi[1] : 0, ae = !fe && !!ot && /Apple Computer/.test(ot.vendor), Ut = ae && (/Mobile\/\w+/.test(ct) || !!ot && ot.maxTouchPoints > 2), De = Ut || (ot ? /Mac/.test(ot.platform) : !1), Le = /Android \d/.test(ct), Er = !!zs && "webkitFontSmoothing" in zs.documentElement.style, Wu = Er ? +(/\bAppleWebKit\/(\d+)/.exec(navigator.userAgent) || [0, 0])[1] : 0;
|
|
5001
5001
|
function qu(n) {
|
|
5002
5002
|
return {
|
|
5003
5003
|
left: 0,
|
|
@@ -5113,12 +5113,12 @@ function Yu(n, e) {
|
|
|
5113
5113
|
for (let i = 0; i < t; i++) {
|
|
5114
5114
|
r.setEnd(n, i + 1), r.setStart(n, i);
|
|
5115
5115
|
let s = Je(r, 1);
|
|
5116
|
-
if (s.top != s.bottom &&
|
|
5116
|
+
if (s.top != s.bottom && ji(e, s))
|
|
5117
5117
|
return { node: n, offset: i + (e.left >= (s.left + s.right) / 2 ? 1 : 0) };
|
|
5118
5118
|
}
|
|
5119
5119
|
return { node: n, offset: 0 };
|
|
5120
5120
|
}
|
|
5121
|
-
function
|
|
5121
|
+
function ji(n, e) {
|
|
5122
5122
|
return n.left >= e.left - 1 && n.left <= e.right + 1 && n.top >= e.top - 1 && n.top <= e.bottom + 1;
|
|
5123
5123
|
}
|
|
5124
5124
|
function Xu(n, e) {
|
|
@@ -5161,7 +5161,7 @@ function Tl(n, e, t) {
|
|
|
5161
5161
|
let l = o.getClientRects();
|
|
5162
5162
|
for (let a = 0; a < l.length; a++) {
|
|
5163
5163
|
let u = l[a];
|
|
5164
|
-
if (
|
|
5164
|
+
if (ji(e, u))
|
|
5165
5165
|
return Tl(o, e, u);
|
|
5166
5166
|
}
|
|
5167
5167
|
}
|
|
@@ -5185,7 +5185,7 @@ function ec(n, e) {
|
|
|
5185
5185
|
let s = (n.root.elementFromPoint ? n.root : t).elementFromPoint(e.left, e.top), o;
|
|
5186
5186
|
if (!s || !n.dom.contains(s.nodeType != 1 ? s.parentNode : s)) {
|
|
5187
5187
|
let a = n.dom.getBoundingClientRect();
|
|
5188
|
-
if (!
|
|
5188
|
+
if (!ji(e, a) || (s = Tl(n.dom, e, a), !s))
|
|
5189
5189
|
return null;
|
|
5190
5190
|
}
|
|
5191
5191
|
if (ae)
|
|
@@ -5229,14 +5229,14 @@ function Ol(n, e, t) {
|
|
|
5229
5229
|
if (s == null && i && (t < 0 || i == Re(r))) {
|
|
5230
5230
|
let a = r.childNodes[i - 1];
|
|
5231
5231
|
if (a.nodeType == 1)
|
|
5232
|
-
return
|
|
5232
|
+
return Gr(a.getBoundingClientRect(), !1);
|
|
5233
5233
|
}
|
|
5234
5234
|
if (s == null && i < Re(r)) {
|
|
5235
5235
|
let a = r.childNodes[i];
|
|
5236
5236
|
if (a.nodeType == 1)
|
|
5237
|
-
return
|
|
5237
|
+
return Gr(a.getBoundingClientRect(), !0);
|
|
5238
5238
|
}
|
|
5239
|
-
return
|
|
5239
|
+
return Gr(r.getBoundingClientRect(), t >= 0);
|
|
5240
5240
|
}
|
|
5241
5241
|
if (s == null && i && (t < 0 || i == Re(r))) {
|
|
5242
5242
|
let a = r.childNodes[i - 1], u = a.nodeType == 3 ? Ve(a, Re(a) - (o ? 0 : 1)) : a.nodeType == 1 && (a.nodeName != "BR" || !a.nextSibling) ? a : null;
|
|
@@ -5259,7 +5259,7 @@ function nn(n, e) {
|
|
|
5259
5259
|
let t = e ? n.left : n.right;
|
|
5260
5260
|
return { top: n.top, bottom: n.bottom, left: t, right: t };
|
|
5261
5261
|
}
|
|
5262
|
-
function
|
|
5262
|
+
function Gr(n, e) {
|
|
5263
5263
|
if (n.height == 0)
|
|
5264
5264
|
return n;
|
|
5265
5265
|
let t = e ? n.top : n.bottom;
|
|
@@ -5743,7 +5743,7 @@ class xt extends Sn {
|
|
|
5743
5743
|
}
|
|
5744
5744
|
slice(e, t, r) {
|
|
5745
5745
|
let i = xt.create(this.parent, this.mark, !0, r), s = this.children, o = this.size;
|
|
5746
|
-
t < o && (s =
|
|
5746
|
+
t < o && (s = Ci(s, t, o, r)), e > 0 && (s = Ci(s, 0, e, r));
|
|
5747
5747
|
for (let l = 0; l < s.length; l++)
|
|
5748
5748
|
s[l].parent = i;
|
|
5749
5749
|
return i.children = s, i;
|
|
@@ -5801,7 +5801,7 @@ class At extends Sn {
|
|
|
5801
5801
|
return e;
|
|
5802
5802
|
}
|
|
5803
5803
|
matchesNode(e, t, r) {
|
|
5804
|
-
return this.dirty == Ee && e.eq(this.node) &&
|
|
5804
|
+
return this.dirty == Ee && e.eq(this.node) && Di(t, this.outerDeco) && r.eq(this.innerDeco);
|
|
5805
5805
|
}
|
|
5806
5806
|
get size() {
|
|
5807
5807
|
return this.node.nodeSize;
|
|
@@ -5848,7 +5848,7 @@ class At extends Sn {
|
|
|
5848
5848
|
s.pmViewDesc && (s.pmViewDesc = void 0);
|
|
5849
5849
|
}
|
|
5850
5850
|
let o = new oc(this, s, t, i);
|
|
5851
|
-
e.input.compositionNodes.push(o), this.children =
|
|
5851
|
+
e.input.compositionNodes.push(o), this.children = Ci(this.children, r, r + i.length, e, o);
|
|
5852
5852
|
}
|
|
5853
5853
|
// If this desc must be updated to match the given node decoration,
|
|
5854
5854
|
// do so and return true.
|
|
@@ -5859,10 +5859,10 @@ class At extends Sn {
|
|
|
5859
5859
|
this.updateOuterDeco(t), this.node = e, this.innerDeco = r, this.contentDOM && this.updateChildren(i, this.posAtStart), this.dirty = Ee;
|
|
5860
5860
|
}
|
|
5861
5861
|
updateOuterDeco(e) {
|
|
5862
|
-
if (
|
|
5862
|
+
if (Di(e, this.outerDeco))
|
|
5863
5863
|
return;
|
|
5864
5864
|
let t = this.nodeDOM.nodeType != 1, r = this.dom;
|
|
5865
|
-
this.dom = Ll(this.dom, this.nodeDOM,
|
|
5865
|
+
this.dom = Ll(this.dom, this.nodeDOM, bi(this.outerDeco, this.node, t), bi(e, this.node, t)), this.dom != r && (r.pmViewDesc = void 0, this.dom.pmViewDesc = this), this.outerDeco = e;
|
|
5866
5866
|
}
|
|
5867
5867
|
// Mark this node as being the selected node.
|
|
5868
5868
|
selectNode() {
|
|
@@ -5992,7 +5992,7 @@ const fn = function(n) {
|
|
|
5992
5992
|
};
|
|
5993
5993
|
fn.prototype = /* @__PURE__ */ Object.create(null);
|
|
5994
5994
|
const mt = [new fn()];
|
|
5995
|
-
function
|
|
5995
|
+
function bi(n, e, t) {
|
|
5996
5996
|
if (n.length == 0)
|
|
5997
5997
|
return mt;
|
|
5998
5998
|
let r = t ? mt[0] : new fn(), i = [r];
|
|
@@ -6045,9 +6045,9 @@ function ac(n, e, t) {
|
|
|
6045
6045
|
}
|
|
6046
6046
|
}
|
|
6047
6047
|
function Il(n, e, t) {
|
|
6048
|
-
return Ll(n, n, mt,
|
|
6048
|
+
return Ll(n, n, mt, bi(e, t, n.nodeType != 1));
|
|
6049
6049
|
}
|
|
6050
|
-
function
|
|
6050
|
+
function Di(n, e) {
|
|
6051
6051
|
if (n.length != e.length)
|
|
6052
6052
|
return !1;
|
|
6053
6053
|
for (let t = 0; t < n.length; t++)
|
|
@@ -6148,7 +6148,7 @@ class uc {
|
|
|
6148
6148
|
if (a != null && a != s)
|
|
6149
6149
|
return !1;
|
|
6150
6150
|
let u = l.dom;
|
|
6151
|
-
if (!(this.lock && (u == this.lock || u.nodeType == 1 && u.contains(this.lock.parentNode)) && !(e.isText && l.node && l.node.isText && l.nodeDOM.nodeValue == e.text && l.dirty != ze &&
|
|
6151
|
+
if (!(this.lock && (u == this.lock || u.nodeType == 1 && u.contains(this.lock.parentNode)) && !(e.isText && l.node && l.node.isText && l.nodeDOM.nodeValue == e.text && l.dirty != ze && Di(t, l.outerDeco))) && l.update(e, t, r, i))
|
|
6152
6152
|
return this.destroyBetween(this.index, o), l.dom != u && (this.changed = !0), this.index++, !0;
|
|
6153
6153
|
break;
|
|
6154
6154
|
}
|
|
@@ -6306,7 +6306,7 @@ function mc(n, e, t, r) {
|
|
|
6306
6306
|
}
|
|
6307
6307
|
return -1;
|
|
6308
6308
|
}
|
|
6309
|
-
function
|
|
6309
|
+
function Ci(n, e, t, r, i) {
|
|
6310
6310
|
let s = [];
|
|
6311
6311
|
for (let o = 0, l = 0; o < n.length; o++) {
|
|
6312
6312
|
let a = n[o], u = l, c = l += a.size;
|
|
@@ -6314,7 +6314,7 @@ function Di(n, e, t, r, i) {
|
|
|
6314
6314
|
}
|
|
6315
6315
|
return s;
|
|
6316
6316
|
}
|
|
6317
|
-
function
|
|
6317
|
+
function Wi(n, e = null) {
|
|
6318
6318
|
let t = n.domSelectionRange(), r = n.state.doc;
|
|
6319
6319
|
if (!t.focusNode)
|
|
6320
6320
|
return null;
|
|
@@ -6338,7 +6338,7 @@ function ji(n, e = null) {
|
|
|
6338
6338
|
}
|
|
6339
6339
|
if (!u) {
|
|
6340
6340
|
let c = e == "pointer" || n.state.selection.head < l.pos && !s ? 1 : -1;
|
|
6341
|
-
u =
|
|
6341
|
+
u = qi(n, a, l, c);
|
|
6342
6342
|
}
|
|
6343
6343
|
return u;
|
|
6344
6344
|
}
|
|
@@ -6368,15 +6368,15 @@ const Ks = ae || he && ju < 63;
|
|
|
6368
6368
|
function Us(n, e) {
|
|
6369
6369
|
let { node: t, offset: r } = n.docView.domFromPos(e, 0), i = r < t.childNodes.length ? t.childNodes[r] : null, s = r ? t.childNodes[r - 1] : null;
|
|
6370
6370
|
if (ae && i && i.contentEditable == "false")
|
|
6371
|
-
return
|
|
6371
|
+
return Yr(i);
|
|
6372
6372
|
if ((!i || i.contentEditable == "false") && (!s || s.contentEditable == "false")) {
|
|
6373
6373
|
if (i)
|
|
6374
|
-
return
|
|
6374
|
+
return Yr(i);
|
|
6375
6375
|
if (s)
|
|
6376
|
-
return
|
|
6376
|
+
return Yr(s);
|
|
6377
6377
|
}
|
|
6378
6378
|
}
|
|
6379
|
-
function
|
|
6379
|
+
function Yr(n) {
|
|
6380
6380
|
return n.contentEditable = "true", ae && n.draggable && (n.draggable = !1, n.wasDraggable = !0), n;
|
|
6381
6381
|
}
|
|
6382
6382
|
function Js(n) {
|
|
@@ -6406,7 +6406,7 @@ function zl(n, e) {
|
|
|
6406
6406
|
function Gs(n) {
|
|
6407
6407
|
n.lastSelectedViewDesc && (n.lastSelectedViewDesc.parent && n.lastSelectedViewDesc.deselectNode(), n.lastSelectedViewDesc = void 0);
|
|
6408
6408
|
}
|
|
6409
|
-
function
|
|
6409
|
+
function qi(n, e, t, r) {
|
|
6410
6410
|
return n.someProp("createSelectionBetween", (i) => i(n, e, t)) || M.between(e, t, r);
|
|
6411
6411
|
}
|
|
6412
6412
|
function Ys(n) {
|
|
@@ -6426,7 +6426,7 @@ function bc(n) {
|
|
|
6426
6426
|
let e = n.docView.domFromPos(n.state.selection.anchor, 0), t = n.domSelectionRange();
|
|
6427
6427
|
return wt(e.node, e.offset, t.anchorNode, t.anchorOffset);
|
|
6428
6428
|
}
|
|
6429
|
-
function
|
|
6429
|
+
function ki(n, e) {
|
|
6430
6430
|
let { $anchor: t, $head: r } = n.selection, i = e > 0 ? t.max(r) : t.min(r), s = i.parent.inlineContent ? i.depth ? n.doc.resolve(e > 0 ? i.after() : i.before()) : null : i;
|
|
6431
6431
|
return s && E.findFrom(s, e);
|
|
6432
6432
|
}
|
|
@@ -6439,7 +6439,7 @@ function Xs(n, e, t) {
|
|
|
6439
6439
|
if (!r.empty || t.indexOf("s") > -1)
|
|
6440
6440
|
return !1;
|
|
6441
6441
|
if (n.endOfTextblock(e > 0 ? "right" : "left")) {
|
|
6442
|
-
let i =
|
|
6442
|
+
let i = ki(n.state, e);
|
|
6443
6443
|
return i && i instanceof S ? ft(n, i) : !1;
|
|
6444
6444
|
} else if (!(De && t.indexOf("m") > -1)) {
|
|
6445
6445
|
let i = r.$head, s = i.textOffset ? null : e < 0 ? i.nodeBefore : i.nodeAfter, o;
|
|
@@ -6452,7 +6452,7 @@ function Xs(n, e, t) {
|
|
|
6452
6452
|
if (r instanceof S && r.node.isInline)
|
|
6453
6453
|
return ft(n, new M(e > 0 ? r.$to : r.$from));
|
|
6454
6454
|
{
|
|
6455
|
-
let i =
|
|
6455
|
+
let i = ki(n.state, e);
|
|
6456
6456
|
return i ? ft(n, i) : !1;
|
|
6457
6457
|
}
|
|
6458
6458
|
}
|
|
@@ -6464,7 +6464,7 @@ function pn(n) {
|
|
|
6464
6464
|
let e = n.pmViewDesc;
|
|
6465
6465
|
return e && e.size == 0 && (n.nextSibling || n.nodeName != "BR");
|
|
6466
6466
|
}
|
|
6467
|
-
function
|
|
6467
|
+
function Xr(n) {
|
|
6468
6468
|
let e = n.domSelectionRange(), t = e.focusNode, r = e.focusOffset;
|
|
6469
6469
|
if (!t)
|
|
6470
6470
|
return;
|
|
@@ -6498,9 +6498,9 @@ function Yr(n) {
|
|
|
6498
6498
|
}
|
|
6499
6499
|
}
|
|
6500
6500
|
}
|
|
6501
|
-
o ?
|
|
6501
|
+
o ? wi(n, t, r) : i && wi(n, i, s);
|
|
6502
6502
|
}
|
|
6503
|
-
function
|
|
6503
|
+
function Qr(n) {
|
|
6504
6504
|
let e = n.domSelectionRange(), t = e.focusNode, r = e.focusOffset;
|
|
6505
6505
|
if (!t)
|
|
6506
6506
|
return;
|
|
@@ -6530,13 +6530,13 @@ function Xr(n) {
|
|
|
6530
6530
|
}
|
|
6531
6531
|
}
|
|
6532
6532
|
}
|
|
6533
|
-
s &&
|
|
6533
|
+
s && wi(n, s, o);
|
|
6534
6534
|
}
|
|
6535
6535
|
function $l(n) {
|
|
6536
6536
|
let e = n.pmViewDesc;
|
|
6537
6537
|
return e && e.node && e.node.isBlock;
|
|
6538
6538
|
}
|
|
6539
|
-
function
|
|
6539
|
+
function wi(n, e, t) {
|
|
6540
6540
|
let r = n.domSelection();
|
|
6541
6541
|
if (Sr(r)) {
|
|
6542
6542
|
let s = document.createRange();
|
|
@@ -6555,7 +6555,7 @@ function Qs(n, e, t) {
|
|
|
6555
6555
|
return !1;
|
|
6556
6556
|
let { $from: i, $to: s } = r;
|
|
6557
6557
|
if (!i.parent.inlineContent || n.endOfTextblock(e < 0 ? "up" : "down")) {
|
|
6558
|
-
let o =
|
|
6558
|
+
let o = ki(n.state, e);
|
|
6559
6559
|
if (o && o instanceof S)
|
|
6560
6560
|
return ft(n, o);
|
|
6561
6561
|
}
|
|
@@ -6601,7 +6601,7 @@ function Cc(n) {
|
|
|
6601
6601
|
}
|
|
6602
6602
|
function kc(n, e) {
|
|
6603
6603
|
let t = e.keyCode, r = Cc(e);
|
|
6604
|
-
return t == 8 || De && t == 72 && r == "c" ? Zs(n, -1) ||
|
|
6604
|
+
return t == 8 || De && t == 72 && r == "c" ? Zs(n, -1) || Xr(n) : t == 46 || De && t == 68 && r == "c" ? Zs(n, 1) || Qr(n) : t == 13 || t == 27 ? !0 : t == 37 || De && t == 66 && r == "c" ? Xs(n, -1, r) || Xr(n) : t == 39 || De && t == 70 && r == "c" ? Xs(n, 1, r) || Qr(n) : t == 38 || De && t == 80 && r == "c" ? Qs(n, -1, r) || Xr(n) : t == 40 || De && t == 78 && r == "c" ? Dc(n) || Qs(n, 1, r) || Qr(n) : r == (De ? "m" : "c") && (t == 66 || t == 73 || t == 89 || t == 90);
|
|
6605
6605
|
}
|
|
6606
6606
|
function Hl(n, e) {
|
|
6607
6607
|
n.someProp("transformCopied", (f) => {
|
|
@@ -6730,12 +6730,12 @@ function ql(n, e) {
|
|
|
6730
6730
|
let t = n.content.replaceChild(n.childCount - 1, ql(n.lastChild, e - 1)), r = n.contentMatchAt(n.childCount).fillBefore(b.empty, !0);
|
|
6731
6731
|
return n.copy(t.append(r));
|
|
6732
6732
|
}
|
|
6733
|
-
function
|
|
6733
|
+
function xi(n, e, t, r, i, s) {
|
|
6734
6734
|
let o = e < 0 ? n.firstChild : n.lastChild, l = o.content;
|
|
6735
|
-
return i < r - 1 && (l =
|
|
6735
|
+
return i < r - 1 && (l = xi(l, e, t, r, i + 1, s)), i >= t && (l = e < 0 ? o.contentMatchAt(0).fillBefore(l, n.childCount > 1 || s <= i).append(l) : l.append(o.contentMatchAt(o.childCount).fillBefore(b.empty, !0))), n.replaceChild(e < 0 ? 0 : n.childCount - 1, o.copy(l));
|
|
6736
6736
|
}
|
|
6737
6737
|
function to(n, e, t) {
|
|
6738
|
-
return e < n.openStart && (n = new k(
|
|
6738
|
+
return e < n.openStart && (n = new k(xi(n.content, -1, e, n.openStart, 0, n.openEnd), e, n.openEnd)), t < n.openEnd && (n = new k(xi(n.content, 1, t, n.openEnd, 0, 0), n.openStart, t)), n;
|
|
6739
6739
|
}
|
|
6740
6740
|
const Kl = {
|
|
6741
6741
|
thead: ["table"],
|
|
@@ -6796,10 +6796,10 @@ function Tc(n) {
|
|
|
6796
6796
|
for (let e in ue) {
|
|
6797
6797
|
let t = ue[e];
|
|
6798
6798
|
n.dom.addEventListener(e, n.input.eventHandlers[e] = (r) => {
|
|
6799
|
-
Nc(n, r) && !
|
|
6799
|
+
Nc(n, r) && !Ki(n, r) && (n.editable || !(r.type in ce)) && t(n, r);
|
|
6800
6800
|
}, Ec[e] ? { passive: !0 } : void 0);
|
|
6801
6801
|
}
|
|
6802
|
-
ae && n.dom.addEventListener("input", () => null),
|
|
6802
|
+
ae && n.dom.addEventListener("input", () => null), Ai(n);
|
|
6803
6803
|
}
|
|
6804
6804
|
function nt(n, e) {
|
|
6805
6805
|
n.input.lastSelectionOrigin = e, n.input.lastSelectionTime = Date.now();
|
|
@@ -6810,13 +6810,13 @@ function Oc(n) {
|
|
|
6810
6810
|
n.dom.removeEventListener(e, n.input.eventHandlers[e]);
|
|
6811
6811
|
clearTimeout(n.input.composingTimeout), clearTimeout(n.input.lastIOSEnterFallbackTimeout);
|
|
6812
6812
|
}
|
|
6813
|
-
function
|
|
6813
|
+
function Ai(n) {
|
|
6814
6814
|
n.someProp("handleDOMEvents", (e) => {
|
|
6815
6815
|
for (let t in e)
|
|
6816
|
-
n.input.eventHandlers[t] || n.dom.addEventListener(t, n.input.eventHandlers[t] = (r) =>
|
|
6816
|
+
n.input.eventHandlers[t] || n.dom.addEventListener(t, n.input.eventHandlers[t] = (r) => Ki(n, r));
|
|
6817
6817
|
});
|
|
6818
6818
|
}
|
|
6819
|
-
function
|
|
6819
|
+
function Ki(n, e) {
|
|
6820
6820
|
return n.someProp("handleDOMEvents", (t) => {
|
|
6821
6821
|
let r = t[e.type];
|
|
6822
6822
|
return r ? r(n, e) || e.defaultPrevented : !1;
|
|
@@ -6833,7 +6833,7 @@ function Nc(n, e) {
|
|
|
6833
6833
|
return !0;
|
|
6834
6834
|
}
|
|
6835
6835
|
function Fc(n, e) {
|
|
6836
|
-
!
|
|
6836
|
+
!Ki(n, e) && ue[e.type] && (n.editable || !(e.type in ce)) && ue[e.type](n, e);
|
|
6837
6837
|
}
|
|
6838
6838
|
ce.keydown = (n, e) => {
|
|
6839
6839
|
let t = e;
|
|
@@ -6870,7 +6870,7 @@ function Bc(n, e) {
|
|
|
6870
6870
|
let t = e.x - n.clientX, r = e.y - n.clientY;
|
|
6871
6871
|
return t * t + r * r < 100;
|
|
6872
6872
|
}
|
|
6873
|
-
function
|
|
6873
|
+
function Ui(n, e, t, r, i) {
|
|
6874
6874
|
if (r == -1)
|
|
6875
6875
|
return !1;
|
|
6876
6876
|
let s = n.state.doc.resolve(r);
|
|
@@ -6906,13 +6906,13 @@ function Lc(n, e) {
|
|
|
6906
6906
|
return i != null ? (jt(n, S.create(n.state.doc, i)), !0) : !1;
|
|
6907
6907
|
}
|
|
6908
6908
|
function Ic(n, e, t, r, i) {
|
|
6909
|
-
return
|
|
6909
|
+
return Ui(n, "handleClickOn", e, t, r) || n.someProp("handleClick", (s) => s(n, e, r)) || (i ? Lc(n, t) : Rc(n, t));
|
|
6910
6910
|
}
|
|
6911
6911
|
function Pc(n, e, t, r) {
|
|
6912
|
-
return
|
|
6912
|
+
return Ui(n, "handleDoubleClickOn", e, t, r) || n.someProp("handleDoubleClick", (i) => i(n, e, r));
|
|
6913
6913
|
}
|
|
6914
6914
|
function zc(n, e, t, r) {
|
|
6915
|
-
return
|
|
6915
|
+
return Ui(n, "handleTripleClickOn", e, t, r) || n.someProp("handleTripleClick", (i) => i(n, e, r)) || _c(n, t, r);
|
|
6916
6916
|
}
|
|
6917
6917
|
function _c(n, e, t) {
|
|
6918
6918
|
if (t.button != 0)
|
|
@@ -6932,14 +6932,14 @@ function _c(n, e, t) {
|
|
|
6932
6932
|
return !0;
|
|
6933
6933
|
}
|
|
6934
6934
|
}
|
|
6935
|
-
function
|
|
6935
|
+
function Ji(n) {
|
|
6936
6936
|
return Xn(n);
|
|
6937
6937
|
}
|
|
6938
6938
|
const Jl = De ? "metaKey" : "ctrlKey";
|
|
6939
6939
|
ue.mousedown = (n, e) => {
|
|
6940
6940
|
let t = e;
|
|
6941
6941
|
n.input.shiftKey = t.shiftKey;
|
|
6942
|
-
let r =
|
|
6942
|
+
let r = Ji(n), i = Date.now(), s = "singleClick";
|
|
6943
6943
|
i - n.input.lastClick.time < 500 && Bc(t, n.input.lastClick) && !t[Jl] && (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 };
|
|
6944
6944
|
let o = n.posAtCoords(Tr(t));
|
|
6945
6945
|
o && (s == "singleClick" ? (n.input.mouseDown && n.input.mouseDown.done(), n.input.mouseDown = new $c(n, o, t, !!r)) : (s == "doubleClick" ? Pc : zc)(n, o.pos, o.inside, t) ? t.preventDefault() : nt(n, "pointer"));
|
|
@@ -6991,12 +6991,12 @@ class $c {
|
|
|
6991
6991
|
}
|
|
6992
6992
|
}
|
|
6993
6993
|
ue.touchstart = (n) => {
|
|
6994
|
-
n.input.lastTouch = Date.now(),
|
|
6994
|
+
n.input.lastTouch = Date.now(), Ji(n), nt(n, "pointer");
|
|
6995
6995
|
};
|
|
6996
6996
|
ue.touchmove = (n) => {
|
|
6997
6997
|
n.input.lastTouch = Date.now(), nt(n, "pointer");
|
|
6998
6998
|
};
|
|
6999
|
-
ue.contextmenu = (n) =>
|
|
6999
|
+
ue.contextmenu = (n) => Ji(n);
|
|
7000
7000
|
function Gl(n, e) {
|
|
7001
7001
|
return n.composing ? !0 : ae && Math.abs(e.timeStamp - n.input.compositionEndedAt) < 500 ? (n.input.compositionEndedAt = -2e8, !0) : !1;
|
|
7002
7002
|
}
|
|
@@ -7041,7 +7041,7 @@ function Vc() {
|
|
|
7041
7041
|
function Xn(n, e = !1) {
|
|
7042
7042
|
if (!(Le && n.domObserver.flushingSoon >= 0)) {
|
|
7043
7043
|
if (n.domObserver.forceFlush(), Xl(n), e || n.docView && n.docView.dirty) {
|
|
7044
|
-
let t =
|
|
7044
|
+
let t = Wi(n);
|
|
7045
7045
|
return t && !t.eq(n.state.selection) ? n.dispatch(n.state.tr.setSelection(t)) : n.updateState(n.state), !0;
|
|
7046
7046
|
}
|
|
7047
7047
|
return !1;
|
|
@@ -7073,10 +7073,10 @@ function qc(n, e) {
|
|
|
7073
7073
|
return;
|
|
7074
7074
|
let t = n.input.shiftKey || n.state.selection.$from.parent.type.spec.code, r = n.dom.parentNode.appendChild(document.createElement(t ? "textarea" : "div"));
|
|
7075
7075
|
t || (r.contentEditable = "true"), r.style.cssText = "position: fixed; left: -10000px; top: 10px", r.focus(), setTimeout(() => {
|
|
7076
|
-
n.focus(), r.parentNode && r.parentNode.removeChild(r), t ?
|
|
7076
|
+
n.focus(), r.parentNode && r.parentNode.removeChild(r), t ? vi(n, r.value, null, e) : vi(n, r.textContent, r.innerHTML, e);
|
|
7077
7077
|
}, 50);
|
|
7078
7078
|
}
|
|
7079
|
-
function
|
|
7079
|
+
function vi(n, e, t, r) {
|
|
7080
7080
|
let i = Vl(n, e, t, n.input.shiftKey, n.state.selection.$from);
|
|
7081
7081
|
if (n.someProp("handlePaste", (l) => l(n, r, i || k.empty)))
|
|
7082
7082
|
return !0;
|
|
@@ -7090,7 +7090,7 @@ ce.paste = (n, e) => {
|
|
|
7090
7090
|
if (n.composing && !Le)
|
|
7091
7091
|
return;
|
|
7092
7092
|
let r = Jt ? null : t.clipboardData;
|
|
7093
|
-
r &&
|
|
7093
|
+
r && vi(n, r.getData("text/plain"), r.getData("text/html"), t) ? t.preventDefault() : qc(n, t);
|
|
7094
7094
|
};
|
|
7095
7095
|
class Kc {
|
|
7096
7096
|
constructor(e, t) {
|
|
@@ -7152,7 +7152,7 @@ ce.drop = (n, e) => {
|
|
|
7152
7152
|
u.setSelection(new S(f));
|
|
7153
7153
|
else {
|
|
7154
7154
|
let p = u.mapping.map(a);
|
|
7155
|
-
u.mapping.maps[u.mapping.maps.length - 1].forEach((m, g, y, D) => p = D), u.setSelection(
|
|
7155
|
+
u.mapping.maps[u.mapping.maps.length - 1].forEach((m, g, y, D) => p = D), u.setSelection(qi(n, f, u.doc.resolve(p)));
|
|
7156
7156
|
}
|
|
7157
7157
|
n.focus(), n.dispatch(u.setMeta("uiEvent", "drop"));
|
|
7158
7158
|
};
|
|
@@ -7190,7 +7190,7 @@ function xn(n, e) {
|
|
|
7190
7190
|
return !1;
|
|
7191
7191
|
return !0;
|
|
7192
7192
|
}
|
|
7193
|
-
class
|
|
7193
|
+
class Gi {
|
|
7194
7194
|
constructor(e, t) {
|
|
7195
7195
|
this.toDOM = e, this.spec = t || Dt, this.side = this.spec.side || 0;
|
|
7196
7196
|
}
|
|
@@ -7202,7 +7202,7 @@ class Ji {
|
|
|
7202
7202
|
return !0;
|
|
7203
7203
|
}
|
|
7204
7204
|
eq(e) {
|
|
7205
|
-
return this == e || e instanceof
|
|
7205
|
+
return this == e || e instanceof Gi && (this.spec.key && this.spec.key == e.spec.key || this.toDOM == e.toDOM && xn(this.spec, e.spec));
|
|
7206
7206
|
}
|
|
7207
7207
|
destroy(e) {
|
|
7208
7208
|
this.spec.destroy && this.spec.destroy(e);
|
|
@@ -7228,7 +7228,7 @@ class it {
|
|
|
7228
7228
|
destroy() {
|
|
7229
7229
|
}
|
|
7230
7230
|
}
|
|
7231
|
-
class
|
|
7231
|
+
class Yi {
|
|
7232
7232
|
constructor(e, t) {
|
|
7233
7233
|
this.attrs = e, this.spec = t || Dt;
|
|
7234
7234
|
}
|
|
@@ -7244,7 +7244,7 @@ class Gi {
|
|
|
7244
7244
|
return i == t.from && !(s = e.child(r)).isText && i + s.nodeSize == t.to;
|
|
7245
7245
|
}
|
|
7246
7246
|
eq(e) {
|
|
7247
|
-
return this == e || e instanceof
|
|
7247
|
+
return this == e || e instanceof Yi && xn(this.attrs, e.attrs) && xn(this.spec, e.spec);
|
|
7248
7248
|
}
|
|
7249
7249
|
destroy() {
|
|
7250
7250
|
}
|
|
@@ -7283,7 +7283,7 @@ class oe {
|
|
|
7283
7283
|
widget's current document position.
|
|
7284
7284
|
*/
|
|
7285
7285
|
static widget(e, t, r) {
|
|
7286
|
-
return new oe(e, e, new
|
|
7286
|
+
return new oe(e, e, new Gi(t, r));
|
|
7287
7287
|
}
|
|
7288
7288
|
/**
|
|
7289
7289
|
Creates an inline decoration, which adds the given attributes to
|
|
@@ -7298,7 +7298,7 @@ class oe {
|
|
|
7298
7298
|
node, will receive the given attributes.
|
|
7299
7299
|
*/
|
|
7300
7300
|
static node(e, t, r, i) {
|
|
7301
|
-
return new oe(e, t, new
|
|
7301
|
+
return new oe(e, t, new Yi(r, i));
|
|
7302
7302
|
}
|
|
7303
7303
|
/**
|
|
7304
7304
|
The spec provided when creating this decoration. Can be useful
|
|
@@ -7468,7 +7468,7 @@ class W {
|
|
|
7468
7468
|
@internal
|
|
7469
7469
|
*/
|
|
7470
7470
|
locals(e) {
|
|
7471
|
-
return
|
|
7471
|
+
return Xi(this.localsInner(e));
|
|
7472
7472
|
}
|
|
7473
7473
|
/**
|
|
7474
7474
|
@internal
|
|
@@ -7485,7 +7485,7 @@ class W {
|
|
|
7485
7485
|
}
|
|
7486
7486
|
}
|
|
7487
7487
|
W.empty = new W([], []);
|
|
7488
|
-
W.removeOverlap =
|
|
7488
|
+
W.removeOverlap = Xi;
|
|
7489
7489
|
const ie = W.empty;
|
|
7490
7490
|
class Qe {
|
|
7491
7491
|
constructor(e) {
|
|
@@ -7526,7 +7526,7 @@ class Qe {
|
|
|
7526
7526
|
t.push(s[o]);
|
|
7527
7527
|
}
|
|
7528
7528
|
}
|
|
7529
|
-
return t ?
|
|
7529
|
+
return t ? Xi(r ? t : t.sort(Ct)) : Ot;
|
|
7530
7530
|
}
|
|
7531
7531
|
// Create a group for the given array of decoration sets, or return
|
|
7532
7532
|
// a single set when possible.
|
|
@@ -7645,7 +7645,7 @@ function Qn(n, e, t, r) {
|
|
|
7645
7645
|
function Ct(n, e) {
|
|
7646
7646
|
return n.from - e.from || n.to - e.to;
|
|
7647
7647
|
}
|
|
7648
|
-
function
|
|
7648
|
+
function Xi(n) {
|
|
7649
7649
|
let e = n;
|
|
7650
7650
|
for (let t = 0; t < e.length - 1; t++) {
|
|
7651
7651
|
let r = e[t];
|
|
@@ -7668,7 +7668,7 @@ function ro(n, e, t) {
|
|
|
7668
7668
|
e++;
|
|
7669
7669
|
n.splice(e, 0, t);
|
|
7670
7670
|
}
|
|
7671
|
-
function
|
|
7671
|
+
function Zr(n) {
|
|
7672
7672
|
let e = [];
|
|
7673
7673
|
return n.someProp("decorations", (t) => {
|
|
7674
7674
|
let r = t(n.state);
|
|
@@ -7792,7 +7792,7 @@ class Qc {
|
|
|
7792
7792
|
}
|
|
7793
7793
|
}
|
|
7794
7794
|
let u = null;
|
|
7795
|
-
s < 0 && i && e.input.lastFocus > Date.now() - 200 && e.input.lastTouch < Date.now() - 300 && Sr(r) && (u =
|
|
7795
|
+
s < 0 && i && e.input.lastFocus > Date.now() - 200 && e.input.lastTouch < Date.now() - 300 && Sr(r) && (u = Wi(e)) && u.eq(E.near(e.state.doc.resolve(0), 1)) ? (e.input.lastFocus = 0, Ke(e), this.currentSelection.set(r), e.scrollToSelection()) : (s > -1 || i) && (s > -1 && (e.docView.markDirty(s, o), Zc(e)), this.handleDOMChange(s, o, l, a), e.docView && e.docView.dirty ? e.updateState(e.state) : this.currentSelection.eq(r) || Ke(e), this.currentSelection.set(r));
|
|
7796
7796
|
}
|
|
7797
7797
|
registerMutation(e, t) {
|
|
7798
7798
|
if (t.indexOf(e.target) > -1)
|
|
@@ -7888,7 +7888,7 @@ function nd(n) {
|
|
|
7888
7888
|
}
|
|
7889
7889
|
function rd(n, e, t, r, i) {
|
|
7890
7890
|
if (e < 0) {
|
|
7891
|
-
let w = n.input.lastSelectionTime > Date.now() - 50 ? n.input.lastSelectionOrigin : null, z =
|
|
7891
|
+
let w = n.input.lastSelectionTime > Date.now() - 50 ? n.input.lastSelectionOrigin : null, z = Wi(n, w);
|
|
7892
7892
|
if (z && !n.state.selection.eq(z)) {
|
|
7893
7893
|
let de = n.state.tr.setSelection(z);
|
|
7894
7894
|
w == "pointer" ? de.setMeta("pointer", !0) : w == "key" && de.scrollIntoView(), n.dispatch(de);
|
|
@@ -7956,7 +7956,7 @@ function rd(n, e, t, r, i) {
|
|
|
7956
7956
|
I && T.ensureMarks(I), n.dispatch(T.scrollIntoView());
|
|
7957
7957
|
}
|
|
7958
7958
|
function oo(n, e, t) {
|
|
7959
|
-
return Math.max(t.anchor, t.head) > e.content.size ? null :
|
|
7959
|
+
return Math.max(t.anchor, t.head) > e.content.size ? null : qi(n, e.resolve(t.anchor), e.resolve(t.head));
|
|
7960
7960
|
}
|
|
7961
7961
|
function id(n, e) {
|
|
7962
7962
|
let t = n.firstChild.marks, r = e.firstChild.marks, i = t, s = r, o, l, a;
|
|
@@ -7979,15 +7979,15 @@ function id(n, e) {
|
|
|
7979
7979
|
function sd(n, e, t, r, i) {
|
|
7980
7980
|
if (!r.parent.isTextblock || // The content must have shrunk
|
|
7981
7981
|
t - e <= i.pos - r.pos || // newEnd must point directly at or after the end of the block that newStart points into
|
|
7982
|
-
|
|
7982
|
+
ei(r, !0, !1) < i.pos)
|
|
7983
7983
|
return !1;
|
|
7984
7984
|
let s = n.resolve(e);
|
|
7985
7985
|
if (s.parentOffset < s.parent.content.size || !s.parent.isTextblock)
|
|
7986
7986
|
return !1;
|
|
7987
|
-
let o = n.resolve(
|
|
7988
|
-
return !o.parent.isTextblock || o.pos > t ||
|
|
7987
|
+
let o = n.resolve(ei(s, !0, !0));
|
|
7988
|
+
return !o.parent.isTextblock || o.pos > t || ei(o, !0, !1) < t ? !1 : r.parent.content.cut(r.parentOffset).eq(o.parent.content);
|
|
7989
7989
|
}
|
|
7990
|
-
function
|
|
7990
|
+
function ei(n, e, t) {
|
|
7991
7991
|
let r = n.depth, i = e ? n.end() : n.pos;
|
|
7992
7992
|
for (; r > 0 && (e || n.indexAfter(r) == n.node(r).childCount); )
|
|
7993
7993
|
r--, i++, e = !1;
|
|
@@ -8025,7 +8025,7 @@ class ld {
|
|
|
8025
8025
|
added to the document.
|
|
8026
8026
|
*/
|
|
8027
8027
|
constructor(e, t) {
|
|
8028
|
-
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 Mc(), this.prevDirectPlugins = [], this.pluginViews = [], this.requiresGeckoHackNode = !1, this.dragging = null, this._props = t, this.state = t.state, this.directPlugins = t.plugins || [], this.directPlugins.forEach(ho), 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 = uo(this), ao(this), this.nodeViews = co(this), this.docView = Ws(this.state.doc, lo(this),
|
|
8028
|
+
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 Mc(), this.prevDirectPlugins = [], this.pluginViews = [], this.requiresGeckoHackNode = !1, this.dragging = null, this._props = t, this.state = t.state, this.directPlugins = t.plugins || [], this.directPlugins.forEach(ho), 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 = uo(this), ao(this), this.nodeViews = co(this), this.docView = Ws(this.state.doc, lo(this), Zr(this), this.dom, this), this.domObserver = new Qc(this, (r, i, s, o) => rd(this, r, i, s, o)), this.domObserver.start(), Tc(this), this.updatePluginViews();
|
|
8029
8029
|
}
|
|
8030
8030
|
/**
|
|
8031
8031
|
Holds `true` when a
|
|
@@ -8053,7 +8053,7 @@ class ld {
|
|
|
8053
8053
|
the DOM.
|
|
8054
8054
|
*/
|
|
8055
8055
|
update(e) {
|
|
8056
|
-
e.handleDOMEvents != this._props.handleDOMEvents &&
|
|
8056
|
+
e.handleDOMEvents != this._props.handleDOMEvents && Ai(this);
|
|
8057
8057
|
let t = this._props;
|
|
8058
8058
|
this._props = e, e.plugins && (e.plugins.forEach(ho), this.directPlugins = e.plugins), this.updateStateInner(e.state, t);
|
|
8059
8059
|
}
|
|
@@ -8086,8 +8086,8 @@ class ld {
|
|
|
8086
8086
|
let h = co(this);
|
|
8087
8087
|
ud(h, this.nodeViews) && (this.nodeViews = h, i = !0);
|
|
8088
8088
|
}
|
|
8089
|
-
(o || t.handleDOMEvents != this._props.handleDOMEvents) &&
|
|
8090
|
-
let l =
|
|
8089
|
+
(o || t.handleDOMEvents != this._props.handleDOMEvents) && Ai(this), this.editable = uo(this), ao(this);
|
|
8090
|
+
let l = Zr(this), a = lo(this), u = r.plugins != e.plugins && !r.doc.eq(e.doc) ? "reset" : e.scrollToSelection > r.scrollToSelection ? "to selection" : "preserve", c = i || !this.docView.matchesNode(e.doc, a, l);
|
|
8091
8091
|
(c || !e.selection.eq(r.selection)) && (s = !0);
|
|
8092
8092
|
let d = u == "preserve" && s && this.dom.style.overflowAnchor == null && Uu(this);
|
|
8093
8093
|
if (s) {
|
|
@@ -8274,7 +8274,7 @@ class ld {
|
|
|
8274
8274
|
views](https://prosemirror.net/docs/ref/#view.NodeView).
|
|
8275
8275
|
*/
|
|
8276
8276
|
destroy() {
|
|
8277
|
-
this.docView && (Oc(this), this.destroyPluginViews(), this.mounted ? (this.docView.update(this.state.doc, [],
|
|
8277
|
+
this.docView && (Oc(this), this.destroyPluginViews(), this.mounted ? (this.docView.update(this.state.doc, [], Zr(this), this), this.dom.textContent = "") : this.dom.parentNode && this.dom.parentNode.removeChild(this.dom), this.docView.destroy(), this.docView = null);
|
|
8278
8278
|
}
|
|
8279
8279
|
/**
|
|
8280
8280
|
This is true when the view has been
|
|
@@ -8446,8 +8446,8 @@ for (var te = 1; te <= 24; te++)
|
|
|
8446
8446
|
lt[te + 111] = "F" + te;
|
|
8447
8447
|
for (var te = 65; te <= 90; te++)
|
|
8448
8448
|
lt[te] = String.fromCharCode(te + 32), Zn[te] = String.fromCharCode(te);
|
|
8449
|
-
for (var
|
|
8450
|
-
Zn.hasOwnProperty(
|
|
8449
|
+
for (var ti in lt)
|
|
8450
|
+
Zn.hasOwnProperty(ti) || (Zn[ti] = lt[ti]);
|
|
8451
8451
|
function fd(n) {
|
|
8452
8452
|
var e = hd && (n.ctrlKey || n.altKey || n.metaKey) || dd && n.shiftKey && n.key && n.key.length == 1 || n.key == "Unidentified", t = !e && n.key || (n.shiftKey ? Zn : lt)[n.keyCode] || n.key || "Unidentified";
|
|
8453
8453
|
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;
|
|
@@ -8480,24 +8480,24 @@ function gd(n) {
|
|
|
8480
8480
|
e[md(t)] = n[t];
|
|
8481
8481
|
return e;
|
|
8482
8482
|
}
|
|
8483
|
-
function
|
|
8483
|
+
function ni(n, e, t) {
|
|
8484
8484
|
return e.altKey && (n = "Alt-" + n), e.ctrlKey && (n = "Ctrl-" + n), e.metaKey && (n = "Meta-" + n), t !== !1 && e.shiftKey && (n = "Shift-" + n), n;
|
|
8485
8485
|
}
|
|
8486
8486
|
function yd(n) {
|
|
8487
|
-
return new $({ props: { handleKeyDown:
|
|
8487
|
+
return new $({ props: { handleKeyDown: Qi(n) } });
|
|
8488
8488
|
}
|
|
8489
|
-
function
|
|
8489
|
+
function Qi(n) {
|
|
8490
8490
|
let e = gd(n);
|
|
8491
8491
|
return function(t, r) {
|
|
8492
|
-
let i = fd(r), s = i.length == 1 && i != " ", o, l = e[
|
|
8492
|
+
let i = fd(r), s = i.length == 1 && i != " ", o, l = e[ni(i, r, !s)];
|
|
8493
8493
|
if (l && l(t.state, t.dispatch, t))
|
|
8494
8494
|
return !0;
|
|
8495
8495
|
if (s && (r.shiftKey || r.altKey || r.metaKey || i.charCodeAt(0) > 127) && (o = lt[r.keyCode]) && o != i) {
|
|
8496
|
-
let a = e[
|
|
8496
|
+
let a = e[ni(o, r, !0)];
|
|
8497
8497
|
if (a && a(t.state, t.dispatch, t))
|
|
8498
8498
|
return !0;
|
|
8499
8499
|
} else if (s && r.shiftKey) {
|
|
8500
|
-
let a = e[
|
|
8500
|
+
let a = e[ni(i, r, !0)];
|
|
8501
8501
|
if (a && a(t.state, t.dispatch, t))
|
|
8502
8502
|
return !0;
|
|
8503
8503
|
}
|
|
@@ -8517,7 +8517,7 @@ const bd = (n, e) => n.selection.empty ? !1 : (e && e(n.tr.deleteSelection().scr
|
|
|
8517
8517
|
if (!s.type.spec.isolating && sa(n, i, e))
|
|
8518
8518
|
return !0;
|
|
8519
8519
|
if (r.parent.content.size == 0 && (Gt(s, "end") || S.isSelectable(s))) {
|
|
8520
|
-
let o =
|
|
8520
|
+
let o = $i(n.doc, r.before(), r.after(), k.empty);
|
|
8521
8521
|
if (o && o.slice.size < o.to - o.from) {
|
|
8522
8522
|
if (e) {
|
|
8523
8523
|
let l = n.tr.step(o);
|
|
@@ -8570,7 +8570,7 @@ const kd = (n, e, t) => {
|
|
|
8570
8570
|
if (sa(n, i, e))
|
|
8571
8571
|
return !0;
|
|
8572
8572
|
if (r.parent.content.size == 0 && (Gt(s, "start") || S.isSelectable(s))) {
|
|
8573
|
-
let o =
|
|
8573
|
+
let o = $i(n.doc, r.before(), r.after(), k.empty);
|
|
8574
8574
|
if (o && o.slice.size < o.to - o.from) {
|
|
8575
8575
|
if (e) {
|
|
8576
8576
|
let l = n.tr.step(o);
|
|
@@ -8717,7 +8717,7 @@ function oa(n) {
|
|
|
8717
8717
|
const Od = oa(-1), Nd = oa(1);
|
|
8718
8718
|
function Fd(n, e = null) {
|
|
8719
8719
|
return function(t, r) {
|
|
8720
|
-
let { $from: i, $to: s } = t.selection, o = i.blockRange(s), l = o &&
|
|
8720
|
+
let { $from: i, $to: s } = t.selection, o = i.blockRange(s), l = o && _i(o, n, e);
|
|
8721
8721
|
return l ? (r && r(t.tr.wrap(o, l).scrollIntoView()), !0) : !1;
|
|
8722
8722
|
};
|
|
8723
8723
|
}
|
|
@@ -8749,7 +8749,7 @@ function Bd(n, e = null) {
|
|
|
8749
8749
|
let c = t.doc.resolve(o.start - 2);
|
|
8750
8750
|
a = new Kn(c, c, o.depth), o.endIndex < o.parent.childCount && (o = new Kn(i, t.doc.resolve(s.end(o.depth)), o.depth)), l = !0;
|
|
8751
8751
|
}
|
|
8752
|
-
let u =
|
|
8752
|
+
let u = _i(a, n, e, o);
|
|
8753
8753
|
return u ? (r && r(Rd(t.tr, o, u, l, n).scrollIntoView()), !0) : !1;
|
|
8754
8754
|
};
|
|
8755
8755
|
}
|
|
@@ -9007,7 +9007,7 @@ function _(...n) {
|
|
|
9007
9007
|
}), r;
|
|
9008
9008
|
}, {});
|
|
9009
9009
|
}
|
|
9010
|
-
function
|
|
9010
|
+
function Si(n, e) {
|
|
9011
9011
|
return e.filter((t) => t.attribute.rendered).map((t) => t.attribute.renderHTML ? t.attribute.renderHTML(n.attrs) || {} : {
|
|
9012
9012
|
[t.name]: n.attrs[t.name]
|
|
9013
9013
|
}).reduce((t, r) => _(t, r), {});
|
|
@@ -9079,7 +9079,7 @@ function Vd(n) {
|
|
|
9079
9079
|
const p = x(a, "renderHTML", c);
|
|
9080
9080
|
p && (h.toDOM = (g) => p({
|
|
9081
9081
|
node: g,
|
|
9082
|
-
HTMLAttributes:
|
|
9082
|
+
HTMLAttributes: Si(g, u)
|
|
9083
9083
|
}));
|
|
9084
9084
|
const m = x(a, "renderText", c);
|
|
9085
9085
|
return m && (h.toText = m), [a.name, h];
|
|
@@ -9110,7 +9110,7 @@ function Vd(n) {
|
|
|
9110
9110
|
const p = x(a, "renderHTML", c);
|
|
9111
9111
|
return p && (h.toDOM = (m) => p({
|
|
9112
9112
|
mark: m,
|
|
9113
|
-
HTMLAttributes:
|
|
9113
|
+
HTMLAttributes: Si(m, u)
|
|
9114
9114
|
})), [a.name, h];
|
|
9115
9115
|
}));
|
|
9116
9116
|
return new ou({
|
|
@@ -9119,7 +9119,7 @@ function Vd(n) {
|
|
|
9119
9119
|
marks: l
|
|
9120
9120
|
});
|
|
9121
9121
|
}
|
|
9122
|
-
function
|
|
9122
|
+
function ri(n, e) {
|
|
9123
9123
|
return e.nodes[n] || e.marks[n] || null;
|
|
9124
9124
|
}
|
|
9125
9125
|
function yo(n, e) {
|
|
@@ -9139,7 +9139,7 @@ const jd = (n, e = 500) => {
|
|
|
9139
9139
|
t += c.slice(0, Math.max(0, r - s));
|
|
9140
9140
|
}), t;
|
|
9141
9141
|
};
|
|
9142
|
-
function
|
|
9142
|
+
function Zi(n) {
|
|
9143
9143
|
return Object.prototype.toString.call(n) === "[object RegExp]";
|
|
9144
9144
|
}
|
|
9145
9145
|
class Br {
|
|
@@ -9148,7 +9148,7 @@ class Br {
|
|
|
9148
9148
|
}
|
|
9149
9149
|
}
|
|
9150
9150
|
const Wd = (n, e) => {
|
|
9151
|
-
if (
|
|
9151
|
+
if (Zi(e))
|
|
9152
9152
|
return e.exec(n);
|
|
9153
9153
|
const t = e(n);
|
|
9154
9154
|
if (!t)
|
|
@@ -9156,7 +9156,7 @@ const Wd = (n, e) => {
|
|
|
9156
9156
|
const r = [];
|
|
9157
9157
|
return r.push(t.text), r.index = t.index, r.input = n, r.data = t.data, t.replaceWith && (t.text.includes(t.replaceWith) || console.warn('[tiptap warn]: "inputRuleMatch.replaceWith" must be part of "inputRuleMatch.text".'), r.push(t.replaceWith)), r;
|
|
9158
9158
|
};
|
|
9159
|
-
function
|
|
9159
|
+
function ii(n) {
|
|
9160
9160
|
var e;
|
|
9161
9161
|
const { editor: t, from: r, to: i, text: s, rules: o, plugin: l } = n, { view: a } = t;
|
|
9162
9162
|
if (a.composing)
|
|
@@ -9213,7 +9213,7 @@ function qd(n) {
|
|
|
9213
9213
|
},
|
|
9214
9214
|
props: {
|
|
9215
9215
|
handleTextInput(i, s, o, l) {
|
|
9216
|
-
return
|
|
9216
|
+
return ii({
|
|
9217
9217
|
editor: e,
|
|
9218
9218
|
from: s,
|
|
9219
9219
|
to: o,
|
|
@@ -9225,7 +9225,7 @@ function qd(n) {
|
|
|
9225
9225
|
handleDOMEvents: {
|
|
9226
9226
|
compositionend: (i) => (setTimeout(() => {
|
|
9227
9227
|
const { $cursor: s } = i.state.selection;
|
|
9228
|
-
s &&
|
|
9228
|
+
s && ii({
|
|
9229
9229
|
editor: e,
|
|
9230
9230
|
from: s.pos,
|
|
9231
9231
|
to: s.pos,
|
|
@@ -9241,7 +9241,7 @@ function qd(n) {
|
|
|
9241
9241
|
if (s.key !== "Enter")
|
|
9242
9242
|
return !1;
|
|
9243
9243
|
const { $cursor: o } = i.state.selection;
|
|
9244
|
-
return o ?
|
|
9244
|
+
return o ? ii({
|
|
9245
9245
|
editor: e,
|
|
9246
9246
|
from: o.pos,
|
|
9247
9247
|
to: o.pos,
|
|
@@ -9266,7 +9266,7 @@ class Ud {
|
|
|
9266
9266
|
}
|
|
9267
9267
|
}
|
|
9268
9268
|
const Jd = (n, e) => {
|
|
9269
|
-
if (
|
|
9269
|
+
if (Zi(e))
|
|
9270
9270
|
return [...n.matchAll(e)];
|
|
9271
9271
|
const t = e(n);
|
|
9272
9272
|
return t ? t.map((r) => {
|
|
@@ -9363,7 +9363,7 @@ class Rt {
|
|
|
9363
9363
|
options: r.options,
|
|
9364
9364
|
storage: r.storage,
|
|
9365
9365
|
editor: this.editor,
|
|
9366
|
-
type:
|
|
9366
|
+
type: ri(r.name, this.schema)
|
|
9367
9367
|
};
|
|
9368
9368
|
r.type === "mark" && (!((i = O(x(r, "keepOnSplit", s))) !== null && i !== void 0) || i) && this.splittableMarks.push(r.name);
|
|
9369
9369
|
const o = x(r, "onBeforeCreate", s);
|
|
@@ -9414,7 +9414,7 @@ class Rt {
|
|
|
9414
9414
|
options: t.options,
|
|
9415
9415
|
storage: t.storage,
|
|
9416
9416
|
editor: this.editor,
|
|
9417
|
-
type:
|
|
9417
|
+
type: ri(t.name, this.schema)
|
|
9418
9418
|
}, i = x(t, "addCommands", r);
|
|
9419
9419
|
return i ? {
|
|
9420
9420
|
...e,
|
|
@@ -9429,7 +9429,7 @@ class Rt {
|
|
|
9429
9429
|
options: o.options,
|
|
9430
9430
|
storage: o.storage,
|
|
9431
9431
|
editor: e,
|
|
9432
|
-
type:
|
|
9432
|
+
type: ri(o.name, this.schema)
|
|
9433
9433
|
}, a = [], u = x(o, "addKeyboardShortcuts", l);
|
|
9434
9434
|
let c = {};
|
|
9435
9435
|
if (o.type === "mark" && o.config.exitable && (c.ArrowRight = () => we.handleExit({ editor: e, mark: o })), u) {
|
|
@@ -9477,7 +9477,7 @@ class Rt {
|
|
|
9477
9477
|
if (!o)
|
|
9478
9478
|
return [];
|
|
9479
9479
|
const l = (a, u, c, d) => {
|
|
9480
|
-
const h =
|
|
9480
|
+
const h = Si(a, i);
|
|
9481
9481
|
return o()({
|
|
9482
9482
|
editor: e,
|
|
9483
9483
|
node: a,
|
|
@@ -9494,13 +9494,13 @@ class Rt {
|
|
|
9494
9494
|
function Qd(n) {
|
|
9495
9495
|
return Object.prototype.toString.call(n).slice(8, -1);
|
|
9496
9496
|
}
|
|
9497
|
-
function
|
|
9497
|
+
function si(n) {
|
|
9498
9498
|
return Qd(n) !== "Object" ? !1 : n.constructor === Object && Object.getPrototypeOf(n) === Object.prototype;
|
|
9499
9499
|
}
|
|
9500
9500
|
function Rr(n, e) {
|
|
9501
9501
|
const t = { ...n };
|
|
9502
|
-
return
|
|
9503
|
-
|
|
9502
|
+
return si(n) && si(e) && Object.keys(e).forEach((r) => {
|
|
9503
|
+
si(e[r]) ? r in n ? t[r] = Rr(n[r], e[r]) : Object.assign(t, { [r]: e[r] }) : Object.assign(t, { [r]: e[r] });
|
|
9504
9504
|
}), t;
|
|
9505
9505
|
}
|
|
9506
9506
|
class Z {
|
|
@@ -9612,25 +9612,25 @@ const Zd = Z.create({
|
|
|
9612
9612
|
}, lh = () => ({ state: n, dispatch: e }) => bd(n, e), ah = () => ({ commands: n }) => n.keyboardShortcut("Enter"), uh = () => ({ state: n, dispatch: e }) => vd(n, e);
|
|
9613
9613
|
function er(n, e, t = { strict: !0 }) {
|
|
9614
9614
|
const r = Object.keys(e);
|
|
9615
|
-
return r.length ? r.every((i) => t.strict ? e[i] === n[i] :
|
|
9615
|
+
return r.length ? r.every((i) => t.strict ? e[i] === n[i] : Zi(e[i]) ? e[i].test(n[i]) : e[i] === n[i]) : !0;
|
|
9616
9616
|
}
|
|
9617
|
-
function
|
|
9617
|
+
function Ei(n, e, t = {}) {
|
|
9618
9618
|
return n.find((r) => r.type === e && er(r.attrs, t));
|
|
9619
9619
|
}
|
|
9620
9620
|
function ch(n, e, t = {}) {
|
|
9621
|
-
return !!
|
|
9621
|
+
return !!Ei(n, e, t);
|
|
9622
9622
|
}
|
|
9623
|
-
function
|
|
9623
|
+
function es(n, e, t = {}) {
|
|
9624
9624
|
if (!n || !e)
|
|
9625
9625
|
return;
|
|
9626
9626
|
let r = n.parent.childAfter(n.parentOffset);
|
|
9627
9627
|
if (n.parentOffset === r.offset && r.offset !== 0 && (r = n.parent.childBefore(n.parentOffset)), !r.node)
|
|
9628
9628
|
return;
|
|
9629
|
-
const i =
|
|
9629
|
+
const i = Ei([...r.node.marks], e, t);
|
|
9630
9630
|
if (!i)
|
|
9631
9631
|
return;
|
|
9632
9632
|
let s = r.index, o = n.start() + r.offset, l = s + 1, a = o + r.node.nodeSize;
|
|
9633
|
-
for (
|
|
9633
|
+
for (Ei([...r.node.marks], e, t); s > 0 && i.isInSet(n.parent.child(s - 1).marks); )
|
|
9634
9634
|
s -= 1, o -= n.parent.child(s).nodeSize;
|
|
9635
9635
|
for (; l < n.parent.childCount && ch([...n.parent.child(l).marks], e, t); )
|
|
9636
9636
|
a += n.parent.child(l).nodeSize, l += 1;
|
|
@@ -9650,7 +9650,7 @@ function dt(n, e) {
|
|
|
9650
9650
|
const dh = (n, e = {}) => ({ tr: t, state: r, dispatch: i }) => {
|
|
9651
9651
|
const s = dt(n, r.schema), { doc: o, selection: l } = t, { $from: a, from: u, to: c } = l;
|
|
9652
9652
|
if (i) {
|
|
9653
|
-
const d =
|
|
9653
|
+
const d = es(a, s, e);
|
|
9654
9654
|
if (d && d.from <= u && d.to >= c) {
|
|
9655
9655
|
const h = M.create(o, d.from, d.to);
|
|
9656
9656
|
t.setSelection(h);
|
|
@@ -9664,7 +9664,7 @@ const dh = (n, e = {}) => ({ tr: t, state: r, dispatch: i }) => {
|
|
|
9664
9664
|
return !0;
|
|
9665
9665
|
return !1;
|
|
9666
9666
|
};
|
|
9667
|
-
function
|
|
9667
|
+
function ts(n) {
|
|
9668
9668
|
return n instanceof M;
|
|
9669
9669
|
}
|
|
9670
9670
|
function qe(n = 0, e = 0, t = 0) {
|
|
@@ -9703,7 +9703,7 @@ const fh = (n = null, e = {}) => ({ editor: t, view: r, tr: i, dispatch: s }) =>
|
|
|
9703
9703
|
};
|
|
9704
9704
|
if (r.hasFocus() && n === null || n === !1)
|
|
9705
9705
|
return !0;
|
|
9706
|
-
if (s && n === null && !
|
|
9706
|
+
if (s && n === null && !ts(t.state.selection))
|
|
9707
9707
|
return o(), !0;
|
|
9708
9708
|
const l = da(i.doc, n) || t.state.selection, a = t.state.selection.eq(l);
|
|
9709
9709
|
return s && (a || i.setSelection(l), a && i.storedMarks && i.setStoredMarks(i.storedMarks), o()), !0;
|
|
@@ -9861,7 +9861,7 @@ const Lh = (n, e = !1, t = {}) => ({ tr: r, editor: i, dispatch: s }) => {
|
|
|
9861
9861
|
return s && r.replaceWith(0, o.content.size, l).setMeta("preventUpdate", !e), !0;
|
|
9862
9862
|
};
|
|
9863
9863
|
function Ih(n, e) {
|
|
9864
|
-
const t = new
|
|
9864
|
+
const t = new Hi(n);
|
|
9865
9865
|
return e.forEach((r) => {
|
|
9866
9866
|
r.steps.forEach((i) => {
|
|
9867
9867
|
t.step(i);
|
|
@@ -9897,7 +9897,7 @@ function pa(n, e) {
|
|
|
9897
9897
|
};
|
|
9898
9898
|
}
|
|
9899
9899
|
}
|
|
9900
|
-
function
|
|
9900
|
+
function ns(n) {
|
|
9901
9901
|
return (e) => pa(e.$from, n);
|
|
9902
9902
|
}
|
|
9903
9903
|
function _h(n, e) {
|
|
@@ -9911,7 +9911,7 @@ function $h(n, e) {
|
|
|
9911
9911
|
};
|
|
9912
9912
|
return ua(n, t, e);
|
|
9913
9913
|
}
|
|
9914
|
-
function
|
|
9914
|
+
function rs(n, e) {
|
|
9915
9915
|
const t = dt(e, n.schema), { from: r, to: i, empty: s } = n.selection, o = [];
|
|
9916
9916
|
s ? (n.storedMarks && o.push(...n.storedMarks), o.push(...n.selection.$head.marks())) : n.doc.nodesBetween(r, i, (a) => {
|
|
9917
9917
|
o.push(...a.marks);
|
|
@@ -9929,7 +9929,7 @@ function Hh(n, e) {
|
|
|
9929
9929
|
}
|
|
9930
9930
|
function ma(n, e) {
|
|
9931
9931
|
const t = Ir(typeof e == "string" ? e : e.name, n.schema);
|
|
9932
|
-
return t === "node" ? Hh(n, e) : t === "mark" ?
|
|
9932
|
+
return t === "node" ? Hh(n, e) : t === "mark" ? rs(n, e) : {};
|
|
9933
9933
|
}
|
|
9934
9934
|
function Vh(n, e = JSON.stringify) {
|
|
9935
9935
|
const t = {};
|
|
@@ -9974,7 +9974,7 @@ function Wh(n) {
|
|
|
9974
9974
|
function nr(n, e, t) {
|
|
9975
9975
|
const r = [];
|
|
9976
9976
|
return n === e ? t.resolve(n).marks().forEach((i) => {
|
|
9977
|
-
const s = t.resolve(n - 1), o =
|
|
9977
|
+
const s = t.resolve(n - 1), o = es(s, i.type);
|
|
9978
9978
|
o && r.push({
|
|
9979
9979
|
mark: i,
|
|
9980
9980
|
...o
|
|
@@ -9987,7 +9987,7 @@ function nr(n, e, t) {
|
|
|
9987
9987
|
})));
|
|
9988
9988
|
}), r;
|
|
9989
9989
|
}
|
|
9990
|
-
function
|
|
9990
|
+
function Mi(n, e, t = {}) {
|
|
9991
9991
|
const { empty: r, ranges: i } = n.selection, s = e ? dt(e, n.schema) : null;
|
|
9992
9992
|
if (r)
|
|
9993
9993
|
return !!(n.storedMarks || n.selection.$from.marks()).filter((d) => s ? s.name === d.type.name : !0).find((d) => er(d.attrs, t, { strict: !1 }));
|
|
@@ -10012,9 +10012,9 @@ function Ei(n, e, t = {}) {
|
|
|
10012
10012
|
}
|
|
10013
10013
|
function qh(n, e, t = {}) {
|
|
10014
10014
|
if (!e)
|
|
10015
|
-
return An(n, null, t) ||
|
|
10015
|
+
return An(n, null, t) || Mi(n, null, t);
|
|
10016
10016
|
const r = Ir(e, n.schema);
|
|
10017
|
-
return r === "node" ? An(n, e, t) : r === "mark" ?
|
|
10017
|
+
return r === "node" ? An(n, e, t) : r === "mark" ? Mi(n, e, t) : !1;
|
|
10018
10018
|
}
|
|
10019
10019
|
function Co(n, e) {
|
|
10020
10020
|
const { nodeExtensions: t } = Fr(e), r = t.find((o) => o.name === n);
|
|
@@ -10055,7 +10055,7 @@ function Gh(n, e, t) {
|
|
|
10055
10055
|
var r;
|
|
10056
10056
|
const { selection: i } = e;
|
|
10057
10057
|
let s = null;
|
|
10058
|
-
if (
|
|
10058
|
+
if (ts(i) && (s = i.$cursor), s) {
|
|
10059
10059
|
const l = (r = n.storedMarks) !== null && r !== void 0 ? r : s.marks();
|
|
10060
10060
|
return !!t.isInSet(l) || !l.some((a) => a.type.excludes(t));
|
|
10061
10061
|
}
|
|
@@ -10077,7 +10077,7 @@ const Yh = (n, e = {}) => ({ tr: t, state: r, dispatch: i }) => {
|
|
|
10077
10077
|
const { selection: s } = t, { empty: o, ranges: l } = s, a = dt(n, r.schema);
|
|
10078
10078
|
if (i)
|
|
10079
10079
|
if (o) {
|
|
10080
|
-
const u =
|
|
10080
|
+
const u = rs(r, a);
|
|
10081
10081
|
t.addStoredMark(a.create({
|
|
10082
10082
|
...u,
|
|
10083
10083
|
...e
|
|
@@ -10187,7 +10187,7 @@ const nf = ({ keepMarks: n = !0 } = {}) => ({ tr: e, state: t, dispatch: r, edit
|
|
|
10187
10187
|
const m = h ? [{ type: o, attrs: f }, { type: h, attrs: p }] : [{ type: o, attrs: f }];
|
|
10188
10188
|
return Ht(e.doc, l.pos, 2) ? (r && e.split(l.pos, 2, m).scrollIntoView(), !0) : !1;
|
|
10189
10189
|
}, wo = (n, e) => {
|
|
10190
|
-
const t =
|
|
10190
|
+
const t = ns((o) => o.type === e)(n.selection);
|
|
10191
10191
|
if (!t)
|
|
10192
10192
|
return !0;
|
|
10193
10193
|
const r = n.doc.resolve(Math.max(0, t.pos - 1)).before(t.depth);
|
|
@@ -10196,7 +10196,7 @@ const nf = ({ keepMarks: n = !0 } = {}) => ({ tr: e, state: t, dispatch: r, edit
|
|
|
10196
10196
|
const i = n.doc.nodeAt(r);
|
|
10197
10197
|
return t.node.type === (i == null ? void 0 : i.type) && Zt(n.doc, t.pos) && n.join(t.pos), !0;
|
|
10198
10198
|
}, xo = (n, e) => {
|
|
10199
|
-
const t =
|
|
10199
|
+
const t = ns((o) => o.type === e)(n.selection);
|
|
10200
10200
|
if (!t)
|
|
10201
10201
|
return !0;
|
|
10202
10202
|
const r = n.doc.resolve(t.start).after(t.depth);
|
|
@@ -10208,7 +10208,7 @@ const nf = ({ keepMarks: n = !0 } = {}) => ({ tr: e, state: t, dispatch: r, edit
|
|
|
10208
10208
|
const { extensions: u } = t.extensionManager, c = Q(n, i.schema), d = Q(e, i.schema), { selection: h } = i, { $from: f, $to: p } = h, m = f.blockRange(p);
|
|
10209
10209
|
if (!m)
|
|
10210
10210
|
return !1;
|
|
10211
|
-
const g =
|
|
10211
|
+
const g = ns((y) => Co(y.type.name, u))(h);
|
|
10212
10212
|
if (m.depth >= 1 && g && m.depth - g.depth <= 1) {
|
|
10213
10213
|
if (g.node.type === c)
|
|
10214
10214
|
return l.liftListItem(d);
|
|
@@ -10218,7 +10218,7 @@ const nf = ({ keepMarks: n = !0 } = {}) => ({ tr: e, state: t, dispatch: r, edit
|
|
|
10218
10218
|
return o().command(() => a().wrapInList(c) ? !0 : l.clearNodes()).wrapInList(c).command(() => wo(r, c)).command(() => xo(r, c)).run();
|
|
10219
10219
|
}, of = (n, e = {}, t = {}) => ({ state: r, commands: i }) => {
|
|
10220
10220
|
const { extendEmptyMarkRange: s = !1 } = t, o = dt(n, r.schema);
|
|
10221
|
-
return
|
|
10221
|
+
return Mi(r, o, e) ? i.unsetMark(o, { extendEmptyMarkRange: s }) : i.setMark(o, e);
|
|
10222
10222
|
}, lf = (n, e, t = {}) => ({ state: r, commands: i }) => {
|
|
10223
10223
|
const s = Q(n, r.schema), o = Q(e, r.schema);
|
|
10224
10224
|
return An(r, s, t) ? i.setNode(o) : i.setNode(s, t);
|
|
@@ -10257,7 +10257,7 @@ const nf = ({ keepMarks: n = !0 } = {}) => ({ tr: e, state: t, dispatch: r, edit
|
|
|
10257
10257
|
return !0;
|
|
10258
10258
|
if (c && o) {
|
|
10259
10259
|
let { from: h, to: f } = l;
|
|
10260
|
-
const p = (s = u.marks().find((g) => g.type === a)) === null || s === void 0 ? void 0 : s.attrs, m =
|
|
10260
|
+
const p = (s = u.marks().find((g) => g.type === a)) === null || s === void 0 ? void 0 : s.attrs, m = es(u, a, p);
|
|
10261
10261
|
m && (h = m.from, f = m.to), t.removeMark(h, f, a);
|
|
10262
10262
|
} else
|
|
10263
10263
|
d.forEach((h) => {
|
|
@@ -10868,7 +10868,7 @@ function ga(n) {
|
|
|
10868
10868
|
}
|
|
10869
10869
|
});
|
|
10870
10870
|
}
|
|
10871
|
-
function
|
|
10871
|
+
function Ti(n) {
|
|
10872
10872
|
return new Br({
|
|
10873
10873
|
find: n.find,
|
|
10874
10874
|
handler: ({ state: e, range: t, match: r }) => {
|
|
@@ -10879,11 +10879,11 @@ function Mi(n) {
|
|
|
10879
10879
|
}
|
|
10880
10880
|
});
|
|
10881
10881
|
}
|
|
10882
|
-
function
|
|
10882
|
+
function is(n) {
|
|
10883
10883
|
return new Br({
|
|
10884
10884
|
find: n.find,
|
|
10885
10885
|
handler: ({ state: e, range: t, match: r }) => {
|
|
10886
|
-
const i = O(n.getAttributes, void 0, r) || {}, s = e.tr.delete(t.from, t.to), l = s.doc.resolve(t.from).blockRange(), a = l &&
|
|
10886
|
+
const i = O(n.getAttributes, void 0, r) || {}, s = e.tr.delete(t.from, t.to), l = s.doc.resolve(t.from).blockRange(), a = l && _i(l, n.type, i);
|
|
10887
10887
|
if (!a)
|
|
10888
10888
|
return null;
|
|
10889
10889
|
s.wrap(l, a);
|
|
@@ -11090,7 +11090,7 @@ const Ef = we.create({
|
|
|
11090
11090
|
addCommands() {
|
|
11091
11091
|
return {
|
|
11092
11092
|
removeEmptyTextStyle: () => ({ state: n, commands: e }) => {
|
|
11093
|
-
const t =
|
|
11093
|
+
const t = rs(n, this.type);
|
|
11094
11094
|
return Object.entries(t).some(([, i]) => !!i) ? !0 : e.unsetMark(this.name);
|
|
11095
11095
|
}
|
|
11096
11096
|
};
|
|
@@ -11186,10 +11186,10 @@ const Ef = we.create({
|
|
|
11186
11186
|
];
|
|
11187
11187
|
}
|
|
11188
11188
|
});
|
|
11189
|
-
function
|
|
11189
|
+
function ss(n) {
|
|
11190
11190
|
this.j = {}, this.jr = [], this.jd = null, this.t = n;
|
|
11191
11191
|
}
|
|
11192
|
-
|
|
11192
|
+
ss.prototype = {
|
|
11193
11193
|
/**
|
|
11194
11194
|
* @param {State} state
|
|
11195
11195
|
*/
|
|
@@ -11228,9 +11228,9 @@ is.prototype = {
|
|
|
11228
11228
|
}
|
|
11229
11229
|
};
|
|
11230
11230
|
var L = function() {
|
|
11231
|
-
return new
|
|
11231
|
+
return new ss();
|
|
11232
11232
|
}, v = function(e) {
|
|
11233
|
-
return new
|
|
11233
|
+
return new ss(e);
|
|
11234
11234
|
}, C = function(e, t, r) {
|
|
11235
11235
|
e.j[t] || (e.j[t] = r);
|
|
11236
11236
|
}, G = function(e, t, r) {
|
|
@@ -11261,16 +11261,16 @@ var L = function() {
|
|
|
11261
11261
|
for (; s < o - 1; )
|
|
11262
11262
|
l = i(), C(e, t[s], l), e = l, s++;
|
|
11263
11263
|
C(e, t[o - 1], r);
|
|
11264
|
-
}, Ae = "DOMAIN", je = "LOCALHOST", Fe = "TLD", be = "NUM", Yt = "PROTOCOL",
|
|
11264
|
+
}, Ae = "DOMAIN", je = "LOCALHOST", Fe = "TLD", be = "NUM", Yt = "PROTOCOL", ls = "MAILTO", ya = "WS", as = "NL", Lt = "OPENBRACE", mn = "OPENBRACKET", gn = "OPENANGLEBRACKET", yn = "OPENPAREN", pt = "CLOSEBRACE", It = "CLOSEBRACKET", Pt = "CLOSEANGLEBRACKET", zt = "CLOSEPAREN", ir = "AMPERSAND", sr = "APOSTROPHE", or = "ASTERISK", _t = "AT", lr = "BACKSLASH", ar = "BACKTICK", ur = "CARET", bn = "COLON", us = "COMMA", cr = "DOLLAR", Ye = "DOT", dr = "EQUALS", cs = "EXCLAMATION", hr = "HYPHEN", fr = "PERCENT", pr = "PIPE", mr = "PLUS", gr = "POUND", yr = "QUERY", ds = "QUOTE", hs = "SEMI", We = "SLASH", br = "TILDE", Dr = "UNDERSCORE", Cr = "SYM", Bf = /* @__PURE__ */ Object.freeze({
|
|
11265
11265
|
__proto__: null,
|
|
11266
11266
|
DOMAIN: Ae,
|
|
11267
11267
|
LOCALHOST: je,
|
|
11268
11268
|
TLD: Fe,
|
|
11269
11269
|
NUM: be,
|
|
11270
11270
|
PROTOCOL: Yt,
|
|
11271
|
-
MAILTO:
|
|
11271
|
+
MAILTO: ls,
|
|
11272
11272
|
WS: ya,
|
|
11273
|
-
NL:
|
|
11273
|
+
NL: as,
|
|
11274
11274
|
OPENBRACE: Lt,
|
|
11275
11275
|
OPENBRACKET: mn,
|
|
11276
11276
|
OPENANGLEBRACKET: gn,
|
|
@@ -11287,19 +11287,19 @@ var L = function() {
|
|
|
11287
11287
|
BACKTICK: ar,
|
|
11288
11288
|
CARET: ur,
|
|
11289
11289
|
COLON: bn,
|
|
11290
|
-
COMMA:
|
|
11290
|
+
COMMA: us,
|
|
11291
11291
|
DOLLAR: cr,
|
|
11292
11292
|
DOT: Ye,
|
|
11293
11293
|
EQUALS: dr,
|
|
11294
|
-
EXCLAMATION:
|
|
11294
|
+
EXCLAMATION: cs,
|
|
11295
11295
|
HYPHEN: hr,
|
|
11296
11296
|
PERCENT: fr,
|
|
11297
11297
|
PIPE: pr,
|
|
11298
11298
|
PLUS: mr,
|
|
11299
11299
|
POUND: gr,
|
|
11300
11300
|
QUERY: yr,
|
|
11301
|
-
QUOTE:
|
|
11302
|
-
SEMI:
|
|
11301
|
+
QUOTE: ds,
|
|
11302
|
+
SEMI: hs,
|
|
11303
11303
|
SLASH: We,
|
|
11304
11304
|
TILDE: br,
|
|
11305
11305
|
UNDERSCORE: Dr,
|
|
@@ -11315,14 +11315,14 @@ function Rf() {
|
|
|
11315
11315
|
var T = l();
|
|
11316
11316
|
return T.t = N, T;
|
|
11317
11317
|
};
|
|
11318
|
-
Ff(e, [["'", v(sr)], ["{", v(Lt)], ["[", v(mn)], ["<", v(gn)], ["(", v(yn)], ["}", v(pt)], ["]", v(It)], [">", v(Pt)], [")", v(zt)], ["&", v(ir)], ["*", v(or)], ["@", v(_t)], ["`", v(ar)], ["^", v(ur)], [":", v(bn)], [",", v(
|
|
11319
|
-
`, v(
|
|
11318
|
+
Ff(e, [["'", v(sr)], ["{", v(Lt)], ["[", v(mn)], ["<", v(gn)], ["(", v(yn)], ["}", v(pt)], ["]", v(It)], [">", v(Pt)], [")", v(zt)], ["&", v(ir)], ["*", v(or)], ["@", v(_t)], ["`", v(ar)], ["^", v(ur)], [":", v(bn)], [",", v(us)], ["$", v(cr)], [".", v(Ye)], ["=", v(dr)], ["!", v(cs)], ["-", v(hr)], ["%", v(fr)], ["|", v(pr)], ["+", v(mr)], ["#", v(gr)], ["?", v(yr)], ['"', v(ds)], ["/", v(We)], [";", v(hs)], ["~", v(br)], ["_", v(Dr)], ["\\", v(lr)]]), C(e, `
|
|
11319
|
+
`, v(as)), G(e, vo, s), C(s, `
|
|
11320
11320
|
`, L()), G(s, vo, s);
|
|
11321
11321
|
for (var u = 0; u < Ao.length; u++)
|
|
11322
11322
|
ht(e, Ao[u], a(Fe), l);
|
|
11323
11323
|
var c = l(), d = l(), h = l(), f = l();
|
|
11324
11324
|
ht(e, "file", c, l), ht(e, "ftp", d, l), ht(e, "http", h, l), ht(e, "mailto", f, l);
|
|
11325
|
-
var p = l(), m = v(Yt), g = v(
|
|
11325
|
+
var p = l(), m = v(Yt), g = v(ls);
|
|
11326
11326
|
C(d, "s", p), C(d, ":", m), C(h, "s", p), C(h, ":", m), C(c, ":", m), C(p, ":", m), C(f, ":", g);
|
|
11327
11327
|
for (var y = l(), D = 0; D < n.length; D++)
|
|
11328
11328
|
ht(e, n[D], y, l);
|
|
@@ -11518,12 +11518,12 @@ function Et(n, e) {
|
|
|
11518
11518
|
}
|
|
11519
11519
|
var ba = Et("email", {
|
|
11520
11520
|
isLink: !0
|
|
11521
|
-
}),
|
|
11521
|
+
}), Oi = Et("email", {
|
|
11522
11522
|
isLink: !0,
|
|
11523
11523
|
toHref: function() {
|
|
11524
11524
|
return "mailto:" + this.toString();
|
|
11525
11525
|
}
|
|
11526
|
-
}),
|
|
11526
|
+
}), Ni = Et("text"), Da = Et("nl"), Ge = Et("url", {
|
|
11527
11527
|
isLink: !0,
|
|
11528
11528
|
/**
|
|
11529
11529
|
Lowercases relevant parts of the domain and adds the protocol if
|
|
@@ -11551,15 +11551,15 @@ var ba = Et("email", {
|
|
|
11551
11551
|
Base: kr,
|
|
11552
11552
|
createTokenClass: Et,
|
|
11553
11553
|
MailtoEmail: ba,
|
|
11554
|
-
Email:
|
|
11555
|
-
Text:
|
|
11554
|
+
Email: Oi,
|
|
11555
|
+
Text: Ni,
|
|
11556
11556
|
Nl: Da,
|
|
11557
11557
|
Url: Ge
|
|
11558
11558
|
});
|
|
11559
11559
|
function $f() {
|
|
11560
|
-
var n = L(), e = L(), t = L(), r = L(), i = L(), s = L(), o = L(), l = v(Ge), a = L(), u = v(Ge), c = v(Ge), d = L(), h = L(), f = L(), p = L(), m = L(), g = v(Ge), y = v(Ge), D = v(Ge), A = v(Ge), N = L(), T = L(), I = L(), R = L(), w = L(), z = L(), de = v(
|
|
11561
|
-
C(n,
|
|
11562
|
-
var H = [ir, or, _t, lr, ar, ur, cr, Ae, dr, hr, je, be, fr, pr, mr, gr, Yt, We, Cr, br, Fe, Dr], J = [sr, Pt, pt, It, zt, bn,
|
|
11560
|
+
var n = L(), e = L(), t = L(), r = L(), i = L(), s = L(), o = L(), l = v(Ge), a = L(), u = v(Ge), c = v(Ge), d = L(), h = L(), f = L(), p = L(), m = L(), g = v(Ge), y = v(Ge), D = v(Ge), A = v(Ge), N = L(), T = L(), I = L(), R = L(), w = L(), z = L(), de = v(Oi), tn = L(), En = v(Oi), Oe = v(ba), Ne = L(), me = L(), xe = L(), $e = L(), Mn = v(Da);
|
|
11561
|
+
C(n, as, Mn), C(n, Yt, e), C(n, ls, t), C(e, We, r), C(r, We, i), C(n, Fe, s), C(n, Ae, s), C(n, je, l), C(n, be, s), C(i, Fe, c), C(i, Ae, c), C(i, be, c), C(i, je, c), C(s, Ye, o), C(w, Ye, z), C(o, Fe, l), C(o, Ae, s), C(o, be, s), C(o, je, s), C(z, Fe, de), C(z, Ae, w), C(z, be, w), C(z, je, w), C(l, Ye, o), C(de, Ye, z), C(l, bn, a), C(l, We, c), C(a, be, u), C(u, We, c), C(de, bn, tn), C(tn, be, En);
|
|
11562
|
+
var H = [ir, or, _t, lr, ar, ur, cr, Ae, dr, hr, je, be, fr, pr, mr, gr, Yt, We, Cr, br, Fe, Dr], J = [sr, Pt, pt, It, zt, bn, us, Ye, cs, gn, Lt, mn, yn, yr, ds, hs];
|
|
11563
11563
|
C(c, Lt, h), C(c, mn, f), C(c, gn, p), C(c, yn, m), C(d, Lt, h), C(d, mn, f), C(d, gn, p), C(d, yn, m), C(h, pt, c), C(f, It, c), C(p, Pt, c), C(m, zt, c), C(g, pt, c), C(y, It, c), C(D, Pt, c), C(A, zt, c), C(N, pt, c), C(T, It, c), C(I, Pt, c), C(R, zt, c), F(h, H, g), F(f, H, y), F(p, H, D), F(m, H, A), F(h, J, N), F(f, J, T), F(p, J, I), F(m, J, R), F(g, H, g), F(y, H, y), F(D, H, D), F(A, H, A), F(g, J, g), F(y, J, y), F(D, J, D), F(A, J, A), F(N, H, g), F(T, H, y), F(I, H, D), F(R, H, A), F(N, J, N), F(T, J, T), F(I, J, I), F(R, J, R), F(c, H, c), F(d, H, c), F(c, J, d), F(d, J, d), C(t, Fe, Oe), C(t, Ae, Oe), C(t, be, Oe), C(t, je, Oe), F(Oe, H, Oe), F(Oe, J, Ne), F(Ne, H, Oe), F(Ne, J, Ne);
|
|
11564
11564
|
var He = [ir, sr, or, lr, ar, ur, pt, cr, Ae, dr, hr, be, Lt, fr, pr, mr, gr, yr, We, Cr, br, Fe, Dr];
|
|
11565
11565
|
return F(s, He, me), C(s, _t, xe), F(l, He, me), C(l, _t, xe), F(o, He, me), F(me, He, me), C(me, _t, xe), C(me, Ye, $e), F($e, He, me), C(xe, Fe, w), C(xe, Ae, w), C(xe, be, w), C(xe, je, de), n;
|
|
@@ -11574,14 +11574,14 @@ function Hf(n, e, t) {
|
|
|
11574
11574
|
for (var f = i - c; f < i; f++)
|
|
11575
11575
|
o.push(t[f]);
|
|
11576
11576
|
else {
|
|
11577
|
-
o.length > 0 && (s.push(
|
|
11577
|
+
o.length > 0 && (s.push(oi(Ni, e, o)), o = []), i -= h, c -= h;
|
|
11578
11578
|
var p = d.t, m = t.slice(i - c, i);
|
|
11579
|
-
s.push(
|
|
11579
|
+
s.push(oi(p, e, m));
|
|
11580
11580
|
}
|
|
11581
11581
|
}
|
|
11582
|
-
return o.length > 0 && s.push(
|
|
11582
|
+
return o.length > 0 && s.push(oi(Ni, e, o)), s;
|
|
11583
11583
|
}
|
|
11584
|
-
function
|
|
11584
|
+
function oi(n, e, t) {
|
|
11585
11585
|
var r = t[0].s, i = t[t.length - 1].e, s = e.substr(r, i - r);
|
|
11586
11586
|
return new n(s, t);
|
|
11587
11587
|
}
|
|
@@ -11619,7 +11619,7 @@ function Wf() {
|
|
|
11619
11619
|
function Ca(n) {
|
|
11620
11620
|
return ge.initialized || Wf(), Hf(ge.parser.start, n, Lf(ge.scanner.start, n));
|
|
11621
11621
|
}
|
|
11622
|
-
function
|
|
11622
|
+
function fs(n) {
|
|
11623
11623
|
for (var e = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : null, t = Ca(n), r = [], i = 0; i < t.length; i++) {
|
|
11624
11624
|
var s = t[i];
|
|
11625
11625
|
s.isLink && (!e || s.t === e) && r.push(s.toObject());
|
|
@@ -11655,7 +11655,7 @@ function qf(n) {
|
|
|
11655
11655
|
const g = m[m.length - 1], y = f.pos + p.lastIndexOf(g);
|
|
11656
11656
|
if (!g)
|
|
11657
11657
|
return !1;
|
|
11658
|
-
|
|
11658
|
+
fs(g).filter((D) => D.isLink).filter((D) => n.validate ? n.validate(D.value) : !0).map((D) => ({
|
|
11659
11659
|
...D,
|
|
11660
11660
|
from: y + D.start + 1,
|
|
11661
11661
|
to: y + D.end + 1
|
|
@@ -11694,7 +11694,7 @@ function Uf(n) {
|
|
|
11694
11694
|
r.content.forEach((u) => {
|
|
11695
11695
|
l += u.textContent;
|
|
11696
11696
|
});
|
|
11697
|
-
const a =
|
|
11697
|
+
const a = fs(l).find((u) => u.isLink && u.value === l);
|
|
11698
11698
|
return !l || !a ? !1 : (n.editor.commands.setMark(n.type, {
|
|
11699
11699
|
href: a.href
|
|
11700
11700
|
}), !0);
|
|
@@ -11761,7 +11761,7 @@ const Jf = we.create({
|
|
|
11761
11761
|
addPasteRules() {
|
|
11762
11762
|
return [
|
|
11763
11763
|
at({
|
|
11764
|
-
find: (n) =>
|
|
11764
|
+
find: (n) => fs(n).filter((e) => this.options.validate ? this.options.validate(e.value) : !0).filter((e) => e.isLink).map((e) => ({
|
|
11765
11765
|
text: e.value,
|
|
11766
11766
|
index: e.start,
|
|
11767
11767
|
data: e
|
|
@@ -12048,7 +12048,7 @@ const Jf = we.create({
|
|
|
12048
12048
|
},
|
|
12049
12049
|
addInputRules() {
|
|
12050
12050
|
return [
|
|
12051
|
-
|
|
12051
|
+
is({
|
|
12052
12052
|
find: tp,
|
|
12053
12053
|
type: this.type
|
|
12054
12054
|
})
|
|
@@ -12148,7 +12148,7 @@ const Jf = we.create({
|
|
|
12148
12148
|
},
|
|
12149
12149
|
addInputRules() {
|
|
12150
12150
|
return [
|
|
12151
|
-
|
|
12151
|
+
is({
|
|
12152
12152
|
find: ap,
|
|
12153
12153
|
type: this.type
|
|
12154
12154
|
})
|
|
@@ -12289,14 +12289,14 @@ const Jf = we.create({
|
|
|
12289
12289
|
},
|
|
12290
12290
|
addInputRules() {
|
|
12291
12291
|
return [
|
|
12292
|
-
|
|
12292
|
+
Ti({
|
|
12293
12293
|
find: fp,
|
|
12294
12294
|
type: this.type,
|
|
12295
12295
|
getAttributes: (n) => ({
|
|
12296
12296
|
language: n[1]
|
|
12297
12297
|
})
|
|
12298
12298
|
}),
|
|
12299
|
-
|
|
12299
|
+
Ti({
|
|
12300
12300
|
find: pp,
|
|
12301
12301
|
type: this.type,
|
|
12302
12302
|
getAttributes: (n) => ({
|
|
@@ -12451,7 +12451,7 @@ class V extends E {
|
|
|
12451
12451
|
@internal
|
|
12452
12452
|
*/
|
|
12453
12453
|
getBookmark() {
|
|
12454
|
-
return new
|
|
12454
|
+
return new ps(this.anchor);
|
|
12455
12455
|
}
|
|
12456
12456
|
/**
|
|
12457
12457
|
@internal
|
|
@@ -12508,12 +12508,12 @@ class V extends E {
|
|
|
12508
12508
|
V.prototype.visible = !1;
|
|
12509
12509
|
V.findFrom = V.findGapCursorFrom;
|
|
12510
12510
|
E.jsonID("gapcursor", V);
|
|
12511
|
-
class
|
|
12511
|
+
class ps {
|
|
12512
12512
|
constructor(e) {
|
|
12513
12513
|
this.pos = e;
|
|
12514
12514
|
}
|
|
12515
12515
|
map(e) {
|
|
12516
|
-
return new
|
|
12516
|
+
return new ps(e.map(this.pos));
|
|
12517
12517
|
}
|
|
12518
12518
|
resolve(e) {
|
|
12519
12519
|
let t = e.resolve(this.pos);
|
|
@@ -12567,7 +12567,7 @@ function wp() {
|
|
|
12567
12567
|
}
|
|
12568
12568
|
});
|
|
12569
12569
|
}
|
|
12570
|
-
const xp =
|
|
12570
|
+
const xp = Qi({
|
|
12571
12571
|
ArrowLeft: Fn("horiz", -1),
|
|
12572
12572
|
ArrowRight: Fn("horiz", 1),
|
|
12573
12573
|
ArrowUp: Fn("vert", -1),
|
|
@@ -12721,7 +12721,7 @@ const Ep = Z.create({
|
|
|
12721
12721
|
}), {});
|
|
12722
12722
|
},
|
|
12723
12723
|
addInputRules() {
|
|
12724
|
-
return this.options.levels.map((n) =>
|
|
12724
|
+
return this.options.levels.map((n) => Ti({
|
|
12725
12725
|
find: new RegExp(`^(#{1,${n}})\\s$`),
|
|
12726
12726
|
type: this.type,
|
|
12727
12727
|
getAttributes: {
|
|
@@ -12978,10 +12978,10 @@ function Rp(n, e, t, r) {
|
|
|
12978
12978
|
if (o && o.getMeta(st))
|
|
12979
12979
|
return o.getMeta(st).redo ? new Xe(n.done.addTransform(t, void 0, r, $n(e)), n.undone, Mo(t.mapping.maps[t.steps.length - 1]), n.prevTime) : new Xe(n.done, n.undone.addTransform(t, void 0, r, $n(e)), null, n.prevTime);
|
|
12980
12980
|
if (t.getMeta("addToHistory") !== !1 && !(o && o.getMeta("addToHistory") === !1)) {
|
|
12981
|
-
let l = n.prevTime == 0 || !o && (n.prevTime < (t.time || 0) - r.newGroupDelay || !Lp(t, n.prevRanges)), a = o ?
|
|
12981
|
+
let l = n.prevTime == 0 || !o && (n.prevTime < (t.time || 0) - r.newGroupDelay || !Lp(t, n.prevRanges)), a = o ? li(n.prevRanges, t.mapping) : Mo(t.mapping.maps[t.steps.length - 1]);
|
|
12982
12982
|
return new Xe(n.done.addTransform(t, l ? e.selection.getBookmark() : void 0, r, $n(e)), ve.empty, a, t.time);
|
|
12983
12983
|
} else
|
|
12984
|
-
return (s = t.getMeta("rebased")) ? new Xe(n.done.rebased(t, s), n.undone.rebased(t, s),
|
|
12984
|
+
return (s = t.getMeta("rebased")) ? new Xe(n.done.rebased(t, s), n.undone.rebased(t, s), li(n.prevRanges, t.mapping), n.prevTime) : new Xe(n.done.addMaps(t.mapping.maps), n.undone.addMaps(t.mapping.maps), li(n.prevRanges, t.mapping), n.prevTime);
|
|
12985
12985
|
}
|
|
12986
12986
|
function Lp(n, e) {
|
|
12987
12987
|
if (!e)
|
|
@@ -12998,7 +12998,7 @@ function Mo(n) {
|
|
|
12998
12998
|
let e = [];
|
|
12999
12999
|
return n.forEach((t, r, i, s) => e.push(i, s)), e;
|
|
13000
13000
|
}
|
|
13001
|
-
function
|
|
13001
|
+
function li(n, e) {
|
|
13002
13002
|
if (!n)
|
|
13003
13003
|
return null;
|
|
13004
13004
|
let t = [];
|
|
@@ -13015,18 +13015,18 @@ function Aa(n, e, t, r) {
|
|
|
13015
13015
|
let l = o.selection.resolve(o.transform.doc), a = (r ? n.done : n.undone).addTransform(o.transform, e.selection.getBookmark(), s, i), u = new Xe(r ? a : o.remaining, r ? o.remaining : a, null, 0);
|
|
13016
13016
|
t(o.transform.setSelection(l).setMeta(st, { redo: r, historyState: u }).scrollIntoView());
|
|
13017
13017
|
}
|
|
13018
|
-
let
|
|
13018
|
+
let ai = !1, To = null;
|
|
13019
13019
|
function $n(n) {
|
|
13020
13020
|
let e = n.plugins;
|
|
13021
13021
|
if (To != e) {
|
|
13022
|
-
|
|
13022
|
+
ai = !1, To = e;
|
|
13023
13023
|
for (let t = 0; t < e.length; t++)
|
|
13024
13024
|
if (e[t].spec.historyPreserveItems) {
|
|
13025
|
-
|
|
13025
|
+
ai = !0;
|
|
13026
13026
|
break;
|
|
13027
13027
|
}
|
|
13028
13028
|
}
|
|
13029
|
-
return
|
|
13029
|
+
return ai;
|
|
13030
13030
|
}
|
|
13031
13031
|
const st = new K("history"), Ip = new K("closeHistory");
|
|
13032
13032
|
function Pp(n = {}) {
|
|
@@ -13261,7 +13261,7 @@ const va = (n, e) => {
|
|
|
13261
13261
|
},
|
|
13262
13262
|
addInputRules() {
|
|
13263
13263
|
return [
|
|
13264
|
-
|
|
13264
|
+
is({
|
|
13265
13265
|
find: Kp,
|
|
13266
13266
|
type: this.type,
|
|
13267
13267
|
getAttributes: (n) => ({ start: +n[1] }),
|
|
@@ -13339,7 +13339,7 @@ const va = (n, e) => {
|
|
|
13339
13339
|
class Zp {
|
|
13340
13340
|
constructor({ editor: e, element: t, view: r, tippyOptions: i = {}, shouldShow: s }) {
|
|
13341
13341
|
this.preventHide = !1, this.shouldShow = ({ view: o, state: l, from: a, to: u }) => {
|
|
13342
|
-
const { doc: c, selection: d } = l, { empty: h } = d, f = !c.textBetween(a, u).length &&
|
|
13342
|
+
const { doc: c, selection: d } = l, { empty: h } = d, f = !c.textBetween(a, u).length && ts(l.selection), p = this.element.contains(document.activeElement);
|
|
13343
13343
|
return !(!(o.hasFocus() || p) || h || f || !this.editor.isEditable);
|
|
13344
13344
|
}, this.mousedownHandler = () => {
|
|
13345
13345
|
this.preventHide = !0;
|
|
@@ -13758,7 +13758,7 @@ var am = function() {
|
|
|
13758
13758
|
um,
|
|
13759
13759
|
!1,
|
|
13760
13760
|
null,
|
|
13761
|
-
"
|
|
13761
|
+
"5b3042bc"
|
|
13762
13762
|
);
|
|
13763
13763
|
const dm = cm.exports, hm = {
|
|
13764
13764
|
name: "TextEditorFontStyleMenu",
|
|
@@ -13922,21 +13922,23 @@ var bm = function() {
|
|
|
13922
13922
|
} } }, [t("CIcon", { attrs: { type: "x", size: "16" } })], 1)]) : t("div", { staticClass: "menu-content" }, [t("FontStyleMenu", { attrs: { editor: e.editor, container: `.menu.menu-${e._uid}` } }), e.editor.commands.toggleBold ? t("button", { staticClass: "menu-button", class: { "is-active": e.editor.isActive("bold") }, attrs: { "data-texteditor-tooltip": e.$t("bold") }, on: { mousedown: function(r) {
|
|
13923
13923
|
r.preventDefault();
|
|
13924
13924
|
}, click: function(r) {
|
|
13925
|
-
e.editor.chain().focus().toggleBold().run();
|
|
13925
|
+
r.preventDefault(), e.editor.chain().focus().toggleBold().run();
|
|
13926
13926
|
} } }, [t("svg", { attrs: { width: "20", height: "20", fill: "currentColor", xmlns: "http://www.w3.org/2000/svg", viewBox: "-8 -5 62 62" } }, [t("path", { attrs: { d: "M 14 5 A 4.0004 4.0004 0 0 0 10 9 L 10 39 A 4.0004 4.0004 0 0 0 14 43 L 29 43 C 35.580064 43 41 37.580064 41 31 C 41 27.155249 39.030751 23.864926 36.179688 21.662109 C 37.230561 19.978585 38 18.110372 38 16 C 38 9.972248 33.027752 5 27 5 L 14 5 z M 18 13 L 27 13 C 28.704248 13 30 14.295752 30 16 C 30 17.704248 28.704248 19 27 19 L 18 19 L 18 13 z M 18 27 L 27 27 L 29 27 C 31.255936 27 33 28.744064 33 31 C 33 33.255936 31.255936 35 29 35 L 18 35 L 18 27 z" } })])]) : e._e(), e.editor.commands.toggleItalic ? t("button", { staticClass: "menu-button", class: { "is-active": e.editor.isActive("italic") }, attrs: { "data-texteditor-tooltip": e.$t("italic") }, on: { mousedown: function(r) {
|
|
13927
13927
|
r.preventDefault();
|
|
13928
13928
|
}, click: function(r) {
|
|
13929
|
-
e.editor.chain().focus().toggleItalic().run();
|
|
13929
|
+
r.preventDefault(), e.editor.chain().focus().toggleItalic().run();
|
|
13930
13930
|
} } }, [t("CIcon", { attrs: { type: "editorItalic", size: "20" } })], 1) : e._e(), t("button", { staticClass: "menu-button", class: { "is-active": e.editor.isActive("underline") }, attrs: { "data-texteditor-tooltip": e.$t("underline") }, on: { mousedown: function(r) {
|
|
13931
13931
|
r.preventDefault();
|
|
13932
13932
|
}, click: function(r) {
|
|
13933
|
-
e.editor.chain().focus().toggleUnderline().run();
|
|
13933
|
+
r.preventDefault(), e.editor.chain().focus().toggleUnderline().run();
|
|
13934
13934
|
} } }, [t("svg", { attrs: { width: "20", height: "20", fill: "currentColor", xmlns: "http://www.w3.org/2000/svg", viewBox: "-6 -6 58 58" } }, [t("path", { attrs: { d: "M 10.970703 4.9726562 A 2.0002 2.0002 0 0 0 9 7 L 9 22.5 C 9 30.484726 15.515274 37 23.5 37 C 31.484726 37 38 30.484726 38 22.5 L 38 7 A 2.0002 2.0002 0 1 0 34 7 L 34 22.5 C 34 28.323274 29.323274 33 23.5 33 C 17.676726 33 13 28.323274 13 22.5 L 13 7 A 2.0002 2.0002 0 0 0 10.970703 4.9726562 z M 11 40 A 2.0002 2.0002 0 1 0 11 44 L 37 44 A 2.0002 2.0002 0 1 0 37 40 L 11 40 z" } })])]), t("button", { staticClass: "menu-button", class: { "is-active": e.editor.isActive("link") }, attrs: { "data-texteditor-tooltip": e.$t("_common:link").capitalize() }, on: { mousedown: function(r) {
|
|
13935
13935
|
r.preventDefault();
|
|
13936
|
-
}, click:
|
|
13936
|
+
}, click: function(r) {
|
|
13937
|
+
return r.preventDefault(), e.showLinkMenu.apply(null, arguments);
|
|
13938
|
+
} } }, [t("svg", { attrs: { width: "20", height: "20", fill: "currentColor", xmlns: "http://www.w3.org/2000/svg", viewBox: "0 -4 54 54" } }, [t("path", { attrs: { d: "M 37 4.0039062 C 34.69525 4.0037812 32.389766 4.8822188 30.634766 6.6367188 L 25.634766 11.636719 C 23.142766 14.128719 22.430516 17.727281 23.478516 20.863281 L 27.070312 17.271484 C 27.220312 16.244484 27.673891 15.253844 28.462891 14.464844 L 33.462891 9.4648438 C 34.437891 8.4908438 35.72 8.0019531 37 8.0019531 C 38.28 8.0019531 39.561156 8.4898437 40.535156 9.4648438 C 42.484156 11.414844 42.484156 14.586156 40.535156 16.535156 L 35.535156 21.535156 C 34.746156 22.324156 33.756516 22.776734 32.728516 22.927734 L 29.134766 26.521484 C 30.062766 26.831484 31.029047 26.996094 31.998047 26.996094 C 34.303047 26.996094 36.608281 26.118281 38.363281 24.363281 L 43.363281 19.363281 C 46.873281 15.854281 46.872281 10.145719 43.363281 6.6367188 C 41.608281 4.8827187 39.30475 4.0040313 37 4.0039062 z M 30.960938 16.980469 A 2.0002 2.0002 0 0 0 29.585938 17.585938 L 17.585938 29.585938 A 2.0002 2.0002 0 1 0 20.414062 32.414062 L 32.414062 20.414062 A 2.0002 2.0002 0 0 0 30.960938 16.980469 z M 18.449219 23.023438 C 15.997141 22.898656 13.506469 23.765766 11.636719 25.634766 L 6.6367188 30.634766 C 3.1277188 34.143766 3.1277187 39.854281 6.6367188 43.363281 C 8.3917188 45.117281 10.696 45.994141 13 45.994141 C 15.304 45.994141 17.608281 45.116328 19.363281 43.361328 L 24.363281 38.361328 C 26.855281 35.869328 27.569484 32.270766 26.521484 29.134766 L 22.927734 32.728516 C 22.777734 33.755516 22.324156 34.746156 21.535156 35.535156 L 16.535156 40.535156 C 14.586156 42.485156 11.413844 42.485156 9.4648438 40.535156 C 7.5158438 38.585156 7.5158438 35.413844 9.4648438 33.464844 L 14.464844 28.464844 C 15.253844 27.675844 16.244484 27.221312 17.271484 27.070312 L 20.863281 23.478516 C 20.079281 23.216516 19.266578 23.065031 18.449219 23.023438 z" } })])]), t("div", { staticClass: "menu-divider" }), e.editor.commands.toggleHighlight ? t("button", { staticClass: "menu-button", class: { "is-active": e.editor.isActive("highlight") }, attrs: { "data-texteditor-tooltip": e.$t("highlight") }, on: { mousedown: function(r) {
|
|
13937
13939
|
r.preventDefault();
|
|
13938
13940
|
}, click: function(r) {
|
|
13939
|
-
e.editor.chain().focus().toggleHighlight().run();
|
|
13941
|
+
r.preventDefault(), e.editor.chain().focus().toggleHighlight().run();
|
|
13940
13942
|
} } }, [t("svg", { attrs: { xmlns: "http://www.w3.org/2000/svg", width: "20", height: "20", fill: "currentColor", viewBox: "0 0 48 48" } }, [t("path", { attrs: { d: "M 7.4765625 4.9785156 A 1.50015 1.50015 0 0 0 6 6.5 L 6 15.5 C 6 17.790682 7.7748091 19.635632 10 19.898438 L 10 24.5 C 10 26.967501 12.032499 29 14.5 29 L 15 29 L 15 43.5 C 15 44.013 15.261359 44.489625 15.693359 44.765625 C 15.938359 44.920625 16.219 45 16.5 45 C 16.716 45 16.933766 44.953375 17.134766 44.859375 L 30.402344 38.667969 C 31.980344 37.932969 33 36.330844 33 34.589844 L 33 29 L 33.5 29 C 35.967501 29 38 26.967501 38 24.5 L 38 19.898438 C 40.225191 19.635632 42 17.790682 42 15.5 L 42 6.5 A 1.50015 1.50015 0 1 0 39 6.5 L 39 15.5 C 39 16.346499 38.346499 17 37.5 17 L 36.746094 17 A 1.50015 1.50015 0 0 0 36.259766 17 L 11.746094 17 A 1.50015 1.50015 0 0 0 11.259766 17 L 10.5 17 C 9.6535009 17 9 16.346499 9 15.5 L 9 6.5 A 1.50015 1.50015 0 0 0 7.4765625 4.9785156 z M 13 20 L 35 20 L 35 24.5 C 35 25.346499 34.346499 26 33.5 26 L 14.5 26 C 13.653501 26 13 25.346499 13 24.5 L 13 20 z" } })])]) : e._e(), e.editor.commands.setColor ? t("ColorMenu", { attrs: { editor: e.editor, "show-picker": e.showColorPicker, container: `.menu.menu-${e._uid}` }, on: { "update:showPicker": function(r) {
|
|
13941
13943
|
e.showColorPicker = r;
|
|
13942
13944
|
}, "update:show-picker": function(r) {
|
|
@@ -13944,15 +13946,15 @@ var bm = function() {
|
|
|
13944
13946
|
} } }) : e._e(), t("div", { staticClass: "menu-divider" }), e.editor.commands.setTextAlign ? [t("button", { staticClass: "menu-button", class: { "is-active": e.textAlignActive("left") }, attrs: { "data-texteditor-tooltip": e.$t("_common:align", { thing: e.$t("_common:left") }) }, on: { mousedown: function(r) {
|
|
13945
13947
|
r.preventDefault();
|
|
13946
13948
|
}, click: function(r) {
|
|
13947
|
-
return e.setTextAlign("left");
|
|
13949
|
+
return r.preventDefault(), e.setTextAlign("left");
|
|
13948
13950
|
} } }, [t("svg", { attrs: { width: "20", height: "20", xmlns: "http://www.w3.org/2000/svg", viewBox: "0 0 48 48", fill: "currentColor" } }, [t("path", { attrs: { d: "M 6 9 A 2.0002 2.0002 0 1 0 6 13 L 34 13 A 2.0002 2.0002 0 1 0 34 9 L 6 9 z M 6 22 A 2.0002 2.0002 0 1 0 6 26 L 42 26 A 2.0002 2.0002 0 1 0 42 22 L 6 22 z M 7 35 A 2.0002 2.0002 0 1 0 7 39 L 27 39 A 2.0002 2.0002 0 1 0 27 35 L 7 35 z" } })])]), t("button", { staticClass: "menu-button", class: { "is-active": e.textAlignActive("center") }, attrs: { "data-texteditor-tooltip": e.$t("_common:center", { thing: e.$t("_common:text") }).capitalize() }, on: { mousedown: function(r) {
|
|
13949
13951
|
r.preventDefault();
|
|
13950
13952
|
}, click: function(r) {
|
|
13951
|
-
return e.setTextAlign("center");
|
|
13953
|
+
return r.preventDefault(), e.setTextAlign("center");
|
|
13952
13954
|
} } }, [t("svg", { attrs: { width: "20", height: "20", fill: "currentColor", xmlns: "http://www.w3.org/2000/svg", viewBox: "0 0 48 48" } }, [t("path", { attrs: { d: "M 10 9 A 2.0002 2.0002 0 1 0 10 13 L 38 13 A 2.0002 2.0002 0 1 0 38 9 L 10 9 z M 6 22 A 2.0002 2.0002 0 1 0 6 26 L 42 26 A 2.0002 2.0002 0 1 0 42 22 L 6 22 z M 14 35 A 2.0002 2.0002 0 1 0 14 39 L 34 39 A 2.0002 2.0002 0 1 0 34 35 L 14 35 z" } })])]), t("button", { staticClass: "menu-button", class: { "is-active": e.textAlignActive("right") }, attrs: { "data-texteditor-tooltip": e.$t("_common:align", { thing: e.$t("_common:right") }) }, on: { mousedown: function(r) {
|
|
13953
13955
|
r.preventDefault();
|
|
13954
13956
|
}, click: function(r) {
|
|
13955
|
-
return e.setTextAlign("right");
|
|
13957
|
+
return r.preventDefault(), e.setTextAlign("right");
|
|
13956
13958
|
} } }, [t("svg", { attrs: { width: "20", height: "20", xmlns: "http://www.w3.org/2000/svg", viewBox: "0 0 48 48", fill: "currentColor" } }, [t("path", { attrs: { d: "M 14 9 A 2.0002 2.0002 0 1 0 14 13 L 42 13 A 2.0002 2.0002 0 1 0 42 9 L 14 9 z M 6 22 A 2.0002 2.0002 0 1 0 6 26 L 42 26 A 2.0002 2.0002 0 1 0 42 22 L 6 22 z M 22 35 A 2.0002 2.0002 0 1 0 22 39 L 42 39 A 2.0002 2.0002 0 1 0 42 35 L 22 35 z" } })])])] : e._e()], 2)])]);
|
|
13957
13959
|
}, Dm = [], Cm = /* @__PURE__ */ ut(
|
|
13958
13960
|
ym,
|
|
@@ -13960,12 +13962,12 @@ var bm = function() {
|
|
|
13960
13962
|
Dm,
|
|
13961
13963
|
!1,
|
|
13962
13964
|
null,
|
|
13963
|
-
"
|
|
13965
|
+
"1e9828a1"
|
|
13964
13966
|
);
|
|
13965
13967
|
const km = Cm.exports, wm = {
|
|
13966
13968
|
components: {
|
|
13967
13969
|
FormInputRow: Ha,
|
|
13968
|
-
TextTemplates: () => import("./index-
|
|
13970
|
+
TextTemplates: () => import("./index-CtLvzhen.js")
|
|
13969
13971
|
},
|
|
13970
13972
|
mixins: [ja],
|
|
13971
13973
|
props: {
|
|
@@ -14321,7 +14323,7 @@ var xm = function() {
|
|
|
14321
14323
|
Am,
|
|
14322
14324
|
!1,
|
|
14323
14325
|
null,
|
|
14324
|
-
"
|
|
14326
|
+
"77b41fa2"
|
|
14325
14327
|
);
|
|
14326
14328
|
const Sm = vm.exports;
|
|
14327
14329
|
function Em(n) {
|
|
@@ -14709,7 +14711,7 @@ function Pm(n = null) {
|
|
|
14709
14711
|
...e["data-tooltip"] ? [] : ["empty"]
|
|
14710
14712
|
].join(" "),
|
|
14711
14713
|
...e,
|
|
14712
|
-
"data-tooltip": e["data-tooltip"] ||
|
|
14714
|
+
"data-tooltip": e["data-tooltip"] || bs.t("_common:missing", { thing: bs.t("_common:value") })
|
|
14713
14715
|
},
|
|
14714
14716
|
`${e.label}`
|
|
14715
14717
|
];
|
|
@@ -14847,11 +14849,14 @@ const zm = /(?:^|\s)(!\[(.+|:?)]\((\S+)(?:(?:\s+)["'](\S+)["'])?\))$/, _m = q.cr
|
|
|
14847
14849
|
},
|
|
14848
14850
|
src() {
|
|
14849
14851
|
var e, t;
|
|
14850
|
-
const n =
|
|
14852
|
+
const n = zr(this, "node.attrs.src", "");
|
|
14851
14853
|
return ((t = (e = this.extension) == null ? void 0 : e.options) == null ? void 0 : t.resolveImgSrc(n)) || n;
|
|
14852
14854
|
},
|
|
14853
14855
|
display() {
|
|
14854
|
-
return
|
|
14856
|
+
return zr(this, "node.attrs.display", "block");
|
|
14857
|
+
},
|
|
14858
|
+
style() {
|
|
14859
|
+
return zr(this, "node.attrs.style", "");
|
|
14855
14860
|
}
|
|
14856
14861
|
},
|
|
14857
14862
|
methods: {
|
|
@@ -14866,7 +14871,7 @@ const zm = /(?:^|\s)(!\[(.+|:?)]\((\S+)(?:(?:\s+)["'](\S+)["'])?\))$/, _m = q.cr
|
|
|
14866
14871
|
},
|
|
14867
14872
|
async openPreview() {
|
|
14868
14873
|
var r;
|
|
14869
|
-
const n = () => import("./FilePreviewModal-
|
|
14874
|
+
const n = () => import("./FilePreviewModal-Cud7184s.js"), { src: e, title: t } = ((r = this.node) == null ? void 0 : r.attrs) || {};
|
|
14870
14875
|
this.$modal.show(
|
|
14871
14876
|
n,
|
|
14872
14877
|
{
|
|
@@ -14894,7 +14899,7 @@ var Hm = function() {
|
|
|
14894
14899
|
"outline-primary-300 outline outline-2": e.isSelected
|
|
14895
14900
|
},
|
|
14896
14901
|
`texteditor-image-view-${e.display}`
|
|
14897
|
-
], attrs: { as: "span", draggable: "true", "data-drag-handle": "" } }, [t("img", { class: { selected: e.isSelected }, attrs: { src: e.src }, on: { click: e.selectImage } }), e.isSelected ? t("div", { staticClass: "image-menu top-2 rounded-md bg-gray-800" }, [e._l(e.displayOptions, function(r, i) {
|
|
14902
|
+
], attrs: { as: "span", draggable: "true", "data-drag-handle": "" } }, [t("img", { class: { selected: e.isSelected }, style: e.style, attrs: { src: e.src }, on: { click: e.selectImage } }), e.isSelected ? t("div", { staticClass: "image-menu top-2 rounded-md bg-gray-800" }, [e._l(e.displayOptions, function(r, i) {
|
|
14898
14903
|
return t("CButton", { key: i, class: { "!text-primary-300": e.display === r.value }, attrs: { "data-texteditor-tooltip": r.tooltip, type: "none", size: "small" }, on: { click: function(s) {
|
|
14899
14904
|
return e.changeDisplay(r.value);
|
|
14900
14905
|
} } }, [t("svg", { attrs: { viewBox: "0 0 24 24", width: "21", height: "21", stroke: "currentColor", "stroke-width": "2", fill: "none", "stroke-linecap": "round", "stroke-linejoin": "round" }, domProps: { innerHTML: e._s(r.icon) } })]);
|
|
@@ -14905,7 +14910,7 @@ var Hm = function() {
|
|
|
14905
14910
|
Vm,
|
|
14906
14911
|
!1,
|
|
14907
14912
|
null,
|
|
14908
|
-
"
|
|
14913
|
+
"e3cf1155"
|
|
14909
14914
|
);
|
|
14910
14915
|
const Wm = jm.exports, qm = (n, e = !1) => _m.extend({
|
|
14911
14916
|
addOptions() {
|
|
@@ -14932,6 +14937,11 @@ const Wm = jm.exports, qm = (n, e = !1) => _m.extend({
|
|
|
14932
14937
|
default: "block",
|
|
14933
14938
|
parseHTML: (t) => t.getAttribute("data-display"),
|
|
14934
14939
|
renderHTML: (t) => ({ "data-display": t.display })
|
|
14940
|
+
},
|
|
14941
|
+
style: {
|
|
14942
|
+
default: "",
|
|
14943
|
+
parseHTML: (t) => t.getAttribute("style"),
|
|
14944
|
+
renderHTML: (t) => ({ style: t.style })
|
|
14935
14945
|
}
|
|
14936
14946
|
};
|
|
14937
14947
|
},
|
|
@@ -15010,17 +15020,17 @@ const Wm = jm.exports, qm = (n, e = !1) => _m.extend({
|
|
|
15010
15020
|
];
|
|
15011
15021
|
}
|
|
15012
15022
|
});
|
|
15013
|
-
let
|
|
15023
|
+
let Fi, Bi;
|
|
15014
15024
|
if (typeof WeakMap < "u") {
|
|
15015
15025
|
let n = /* @__PURE__ */ new WeakMap();
|
|
15016
|
-
|
|
15026
|
+
Fi = (e) => n.get(e), Bi = (e, t) => (n.set(e, t), t);
|
|
15017
15027
|
} else {
|
|
15018
15028
|
let n = [], e = 10, t = 0;
|
|
15019
|
-
|
|
15029
|
+
Fi = (r) => {
|
|
15020
15030
|
for (let i = 0; i < n.length; i += 2)
|
|
15021
15031
|
if (n[i] == r)
|
|
15022
15032
|
return n[i + 1];
|
|
15023
|
-
},
|
|
15033
|
+
}, Bi = (r, i) => (t == e && (t = 0), n[t++] = r, n[t++] = i);
|
|
15024
15034
|
}
|
|
15025
15035
|
class Xt {
|
|
15026
15036
|
constructor(e, t, r, i) {
|
|
@@ -15113,7 +15123,7 @@ class j {
|
|
|
15113
15123
|
// :: (Node) → TableMap
|
|
15114
15124
|
// Find the table map for the given table node.
|
|
15115
15125
|
static get(e) {
|
|
15116
|
-
return
|
|
15126
|
+
return Fi(e) || Bi(e, Km(e));
|
|
15117
15127
|
}
|
|
15118
15128
|
}
|
|
15119
15129
|
function Km(n) {
|
|
@@ -15271,13 +15281,13 @@ function Xm(n) {
|
|
|
15271
15281
|
return n.doc.resolve(t - e.nodeSize);
|
|
15272
15282
|
}
|
|
15273
15283
|
}
|
|
15274
|
-
function
|
|
15284
|
+
function Ri(n) {
|
|
15275
15285
|
return n.parent.type.spec.tableRole == "row" && n.nodeAfter;
|
|
15276
15286
|
}
|
|
15277
15287
|
function Qm(n) {
|
|
15278
15288
|
return n.node(0).resolve(n.pos + n.nodeAfter.nodeSize);
|
|
15279
15289
|
}
|
|
15280
|
-
function
|
|
15290
|
+
function ms(n, e) {
|
|
15281
15291
|
return n.depth == e.depth && n.pos >= e.start(-1) && n.pos <= e.end(-1);
|
|
15282
15292
|
}
|
|
15283
15293
|
function Oa(n, e, t) {
|
|
@@ -15327,7 +15337,7 @@ class B extends E {
|
|
|
15327
15337
|
}
|
|
15328
15338
|
map(e, t) {
|
|
15329
15339
|
let r = e.resolve(t.map(this.$anchorCell.pos)), i = e.resolve(t.map(this.$headCell.pos));
|
|
15330
|
-
if (
|
|
15340
|
+
if (Ri(r) && Ri(i) && ms(r, i)) {
|
|
15331
15341
|
let s = this.$anchorCell.node(-1) != r.node(-1);
|
|
15332
15342
|
return s && this.isRowSelection() ? B.rowSelection(r, i) : s && this.isColSelection() ? B.colSelection(r, i) : new B(r, i);
|
|
15333
15343
|
}
|
|
@@ -15433,21 +15443,21 @@ class B extends E {
|
|
|
15433
15443
|
return new B(e.resolve(t), e.resolve(r));
|
|
15434
15444
|
}
|
|
15435
15445
|
getBookmark() {
|
|
15436
|
-
return new
|
|
15446
|
+
return new gs(this.$anchorCell.pos, this.$headCell.pos);
|
|
15437
15447
|
}
|
|
15438
15448
|
}
|
|
15439
15449
|
B.prototype.visible = !1;
|
|
15440
15450
|
E.jsonID("cell", B);
|
|
15441
|
-
class
|
|
15451
|
+
class gs {
|
|
15442
15452
|
constructor(e, t) {
|
|
15443
15453
|
this.anchor = e, this.head = t;
|
|
15444
15454
|
}
|
|
15445
15455
|
map(e) {
|
|
15446
|
-
return new
|
|
15456
|
+
return new gs(e.map(this.anchor), e.map(this.head));
|
|
15447
15457
|
}
|
|
15448
15458
|
resolve(e) {
|
|
15449
15459
|
let t = e.resolve(this.anchor), r = e.resolve(this.head);
|
|
15450
|
-
return t.parent.type.spec.tableRole == "row" && r.parent.type.spec.tableRole == "row" && t.index() < t.parent.childCount && r.index() < r.parent.childCount &&
|
|
15460
|
+
return t.parent.type.spec.tableRole == "row" && r.parent.type.spec.tableRole == "row" && t.index() < t.parent.childCount && r.index() < r.parent.childCount && ms(t, r) ? new B(t, r) : E.near(r, 1);
|
|
15451
15461
|
}
|
|
15452
15462
|
}
|
|
15453
15463
|
function eg(n) {
|
|
@@ -15524,10 +15534,10 @@ function ig(n) {
|
|
|
15524
15534
|
if (s == "row")
|
|
15525
15535
|
for (let a = 0; a < e.childCount; a++) {
|
|
15526
15536
|
let u = e.child(a).content, c = a ? 0 : Math.max(0, t - 1), d = a < e.childCount - 1 ? 0 : Math.max(0, r - 1);
|
|
15527
|
-
(c || d) && (u =
|
|
15537
|
+
(c || d) && (u = Li(le(o).row, new k(u, c, d)).content), l.push(u);
|
|
15528
15538
|
}
|
|
15529
15539
|
else if (s == "cell" || s == "header_cell")
|
|
15530
|
-
l.push(t || r ?
|
|
15540
|
+
l.push(t || r ? Li(le(o).row, new k(e, t, r)).content : e);
|
|
15531
15541
|
else
|
|
15532
15542
|
return null;
|
|
15533
15543
|
return sg(o, l);
|
|
@@ -15561,9 +15571,9 @@ function sg(n, e) {
|
|
|
15561
15571
|
rows: e
|
|
15562
15572
|
};
|
|
15563
15573
|
}
|
|
15564
|
-
function
|
|
15574
|
+
function Li(n, e) {
|
|
15565
15575
|
let t = n.createAndFill();
|
|
15566
|
-
return new
|
|
15576
|
+
return new Hi(t).replace(0, t.content.size, e).doc;
|
|
15567
15577
|
}
|
|
15568
15578
|
function og({
|
|
15569
15579
|
width: n,
|
|
@@ -15673,7 +15683,7 @@ function Ro(n, e, t, r, i) {
|
|
|
15673
15683
|
}
|
|
15674
15684
|
f(), d.setSelection(new B(d.doc.resolve(t + o.positionAt(l, a, s)), d.doc.resolve(t + o.positionAt(c - 1, u - 1, s)))), e(d);
|
|
15675
15685
|
}
|
|
15676
|
-
const ag =
|
|
15686
|
+
const ag = Qi({
|
|
15677
15687
|
ArrowLeft: Bn("horiz", -1),
|
|
15678
15688
|
ArrowRight: Bn("horiz", 1),
|
|
15679
15689
|
ArrowUp: Bn("vert", -1),
|
|
@@ -15745,7 +15755,7 @@ function cg(n, e, t) {
|
|
|
15745
15755
|
r || (r = {
|
|
15746
15756
|
width: 1,
|
|
15747
15757
|
height: 1,
|
|
15748
|
-
rows: [b.from(
|
|
15758
|
+
rows: [b.from(Li(le(n.state.schema).cell, t))]
|
|
15749
15759
|
});
|
|
15750
15760
|
let s = i.$anchorCell.node(-1), o = i.$anchorCell.start(-1), l = j.get(s).rectBetween(i.$anchorCell.pos - o, i.$headCell.pos - o);
|
|
15751
15761
|
return r = og(r, l.right - l.left, l.bottom - l.top), Ro(n.state, n.dispatch, o, l, r), !0;
|
|
@@ -15761,13 +15771,13 @@ function dg(n, e) {
|
|
|
15761
15771
|
let t = Lo(n, e.target), r;
|
|
15762
15772
|
if (e.shiftKey && n.state.selection instanceof B)
|
|
15763
15773
|
i(n.state.selection.$anchorCell, e), e.preventDefault();
|
|
15764
|
-
else if (e.shiftKey && t && (r = en(n.state.selection.$anchor)) != null &&
|
|
15774
|
+
else if (e.shiftKey && t && (r = en(n.state.selection.$anchor)) != null && ui(n, e).pos != r.pos)
|
|
15765
15775
|
i(r, e), e.preventDefault();
|
|
15766
15776
|
else if (!t)
|
|
15767
15777
|
return;
|
|
15768
15778
|
function i(l, a) {
|
|
15769
|
-
let u =
|
|
15770
|
-
if (!u || !
|
|
15779
|
+
let u = ui(n, a), c = Ze.getState(n.state) == null;
|
|
15780
|
+
if (!u || !ms(l, u))
|
|
15771
15781
|
if (c)
|
|
15772
15782
|
u = l;
|
|
15773
15783
|
else
|
|
@@ -15785,7 +15795,7 @@ function dg(n, e) {
|
|
|
15785
15795
|
let a = Ze.getState(n.state), u;
|
|
15786
15796
|
if (a != null)
|
|
15787
15797
|
u = n.state.doc.resolve(a);
|
|
15788
|
-
else if (Lo(n, l.target) != t && (u =
|
|
15798
|
+
else if (Lo(n, l.target) != t && (u = ui(n, e), !u))
|
|
15789
15799
|
return s();
|
|
15790
15800
|
u && i(u, l);
|
|
15791
15801
|
}
|
|
@@ -15813,7 +15823,7 @@ function Lo(n, e) {
|
|
|
15813
15823
|
if (e.nodeName == "TD" || e.nodeName == "TH")
|
|
15814
15824
|
return e;
|
|
15815
15825
|
}
|
|
15816
|
-
function
|
|
15826
|
+
function ui(n, e) {
|
|
15817
15827
|
let t = n.posAtCoords({
|
|
15818
15828
|
left: e.clientX,
|
|
15819
15829
|
top: e.clientY
|
|
@@ -16251,16 +16261,16 @@ function Tg(n, e) {
|
|
|
16251
16261
|
}
|
|
16252
16262
|
let Og = class {
|
|
16253
16263
|
constructor(e, t) {
|
|
16254
|
-
this.node = e, this.cellMinWidth = t, this.dom = document.createElement("div"), this.dom.className = "tableWrapper", this.table = this.dom.appendChild(document.createElement("table")), this.colgroup = this.table.appendChild(document.createElement("colgroup")),
|
|
16264
|
+
this.node = e, this.cellMinWidth = t, this.dom = document.createElement("div"), this.dom.className = "tableWrapper", this.table = this.dom.appendChild(document.createElement("table")), this.colgroup = this.table.appendChild(document.createElement("colgroup")), Ii(e, this.colgroup, this.table, t), this.contentDOM = this.table.appendChild(document.createElement("tbody"));
|
|
16255
16265
|
}
|
|
16256
16266
|
update(e) {
|
|
16257
|
-
return e.type != this.node.type ? !1 : (this.node = e,
|
|
16267
|
+
return e.type != this.node.type ? !1 : (this.node = e, Ii(e, this.colgroup, this.table, this.cellMinWidth), !0);
|
|
16258
16268
|
}
|
|
16259
16269
|
ignoreMutation(e) {
|
|
16260
16270
|
return e.type == "attributes" && (e.target == this.table || this.colgroup.contains(e.target));
|
|
16261
16271
|
}
|
|
16262
16272
|
};
|
|
16263
|
-
function
|
|
16273
|
+
function Ii(n, e, t, r, i, s) {
|
|
16264
16274
|
let o = 0, l = !0, a = e.firstChild, u = n.firstChild;
|
|
16265
16275
|
for (let c = 0, d = 0; c < u.childCount; c++) {
|
|
16266
16276
|
let {
|
|
@@ -16333,7 +16343,7 @@ class Dn {
|
|
|
16333
16343
|
return new Dn(t.activeHandle, r.setDragging);
|
|
16334
16344
|
if (t.activeHandle > -1 && e.docChanged) {
|
|
16335
16345
|
let i = e.mapping.map(t.activeHandle, -1);
|
|
16336
|
-
|
|
16346
|
+
Ri(e.doc.resolve(i)) || (i = null), t = new Dn(i, t.dragging);
|
|
16337
16347
|
}
|
|
16338
16348
|
return t;
|
|
16339
16349
|
}
|
|
@@ -16453,7 +16463,7 @@ function zg(n, e, t, r) {
|
|
|
16453
16463
|
let i = n.state.doc.resolve(e), s = i.node(-1), o = i.start(-1), l = j.get(s).colCount(i.pos - o) + i.nodeAfter.attrs.colspan - 1, a = n.domAtPos(i.start(-1)).node;
|
|
16454
16464
|
for (; a.nodeName != "TABLE"; )
|
|
16455
16465
|
a = a.parentNode;
|
|
16456
|
-
|
|
16466
|
+
Ii(s, a.firstChild, a, r, l, t);
|
|
16457
16467
|
}
|
|
16458
16468
|
function _g(n) {
|
|
16459
16469
|
let e = [];
|
|
@@ -16681,7 +16691,7 @@ const In = ({ editor: n }) => {
|
|
|
16681
16691
|
};
|
|
16682
16692
|
}
|
|
16683
16693
|
});
|
|
16684
|
-
function
|
|
16694
|
+
function Pi(n, e, t, r, i, s) {
|
|
16685
16695
|
let o = 0, l = !0, a = e.firstChild;
|
|
16686
16696
|
const u = n.firstChild;
|
|
16687
16697
|
for (let c = 0, d = 0; c < u.childCount; c += 1) {
|
|
@@ -16701,16 +16711,16 @@ class xr {
|
|
|
16701
16711
|
constructor(e, t) {
|
|
16702
16712
|
this.node = e, this.cellMinWidth = t, this.dom = document.createElement("div"), this.dom.className = "tableWrapper", Object.keys(this.node.attrs).forEach((r) => {
|
|
16703
16713
|
this.dom.dataset[r] = this.node.attrs[r];
|
|
16704
|
-
}), this.table = this.dom.appendChild(document.createElement("table")), this.colgroup = this.table.appendChild(document.createElement("colgroup")),
|
|
16714
|
+
}), this.table = this.dom.appendChild(document.createElement("table")), this.colgroup = this.table.appendChild(document.createElement("colgroup")), Pi(e, this.colgroup, this.table, t), this.contentDOM = this.table.appendChild(document.createElement("tbody"));
|
|
16705
16715
|
}
|
|
16706
16716
|
update(e) {
|
|
16707
|
-
return e.type !== this.node.type ? !1 : (this.node = e,
|
|
16717
|
+
return e.type !== this.node.type ? !1 : (this.node = e, Pi(e, this.colgroup, this.table, this.cellMinWidth), !0);
|
|
16708
16718
|
}
|
|
16709
16719
|
ignoreMutation(e) {
|
|
16710
16720
|
return e.type === "attributes" && (e.target === this.table || this.colgroup.contains(e.target));
|
|
16711
16721
|
}
|
|
16712
16722
|
}
|
|
16713
|
-
const
|
|
16723
|
+
const ys = Kg.extend({
|
|
16714
16724
|
addAttributes() {
|
|
16715
16725
|
return {
|
|
16716
16726
|
...this.parent ? this.parent() : null,
|
|
@@ -16738,13 +16748,13 @@ const gs = Kg.extend({
|
|
|
16738
16748
|
}
|
|
16739
16749
|
};
|
|
16740
16750
|
}
|
|
16741
|
-
}), za =
|
|
16751
|
+
}), za = ys.extend({
|
|
16742
16752
|
addNodeView() {
|
|
16743
16753
|
return ({ node: n }) => {
|
|
16744
16754
|
const e = document.createElement("div");
|
|
16745
16755
|
e.className = "tableWrapper";
|
|
16746
16756
|
const t = e.appendChild(document.createElement("table")), r = t.appendChild(document.createElement("colgroup"));
|
|
16747
|
-
|
|
16757
|
+
Pi(n, r, t);
|
|
16748
16758
|
const i = t.appendChild(document.createElement("tbody"));
|
|
16749
16759
|
return {
|
|
16750
16760
|
dom: e,
|
|
@@ -16755,14 +16765,14 @@ const gs = Kg.extend({
|
|
|
16755
16765
|
addProseMirrorPlugins() {
|
|
16756
16766
|
return [];
|
|
16757
16767
|
}
|
|
16758
|
-
}), Ug =
|
|
16768
|
+
}), Ug = ys.configure({
|
|
16759
16769
|
resizable: !0,
|
|
16760
16770
|
View: xr
|
|
16761
16771
|
}), Jg = za.configure({
|
|
16762
16772
|
resizable: !0,
|
|
16763
16773
|
View: xr
|
|
16764
16774
|
});
|
|
16765
|
-
|
|
16775
|
+
ys.configure({ resizable: !0, View: xr }), za.configure({ resizable: !0, View: xr });
|
|
16766
16776
|
function qo({ types: n, node: e }) {
|
|
16767
16777
|
return Array.isArray(n) && n.includes(e.type) || e.type === n;
|
|
16768
16778
|
}
|