@harbour-enterprises/superdoc 0.10.13 → 0.10.14
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/chunks/{super-editor.es-CtJbBdCY.cjs → super-editor.es-DKeEy3SL.cjs} +40 -40
- package/dist/chunks/{super-editor.es-35uGypnF.es.js → super-editor.es-DmSsQN1-.es.js} +1518 -1488
- package/dist/super-editor/chunks/{converter-CKYZCmLh.js → converter-D2y9EpE_.js} +2 -2
- package/dist/super-editor/chunks/{docx-zipper-CksbnyTX.js → docx-zipper-BbBE5I9n.js} +1 -1
- package/dist/super-editor/chunks/{editor-DEWQqVFW.js → editor-CP6udmf8.js} +763 -733
- package/dist/super-editor/chunks/{toolbar-BxidMIRu.js → toolbar-BMVgZtgU.js} +2 -2
- package/dist/super-editor/converter.es.js +1 -1
- package/dist/super-editor/core/InputRule.d.ts.map +1 -1
- package/dist/super-editor/docx-zipper.es.js +2 -2
- package/dist/super-editor/editor.es.js +3 -3
- package/dist/super-editor/file-zipper.es.js +1 -1
- package/dist/super-editor/super-editor.es.js +6 -6
- package/dist/super-editor/toolbar.es.js +2 -2
- package/dist/super-editor.cjs +1 -1
- package/dist/super-editor.es.js +1 -1
- package/dist/superdoc.cjs +4 -4
- package/dist/superdoc.es.js +3 -3
- package/dist/superdoc.umd.js +788 -758
- package/dist/superdoc.umd.js.map +1 -1
- package/package.json +1 -1
|
@@ -7,9 +7,9 @@ var P = (t, e, n) => mf(t, typeof e != "symbol" ? e + "" : e, n), Ho = (t, e, n)
|
|
|
7
7
|
var Ge = (t, e, n) => (Ho(t, e, "read from private field"), n ? n.call(t) : e.get(t)), ft = (t, e, n) => e.has(t) ? Qs("Cannot add the same private member more than once") : e instanceof WeakSet ? e.add(t) : e.set(t, n), jo = (t, e, n, r) => (Ho(t, e, "write to private field"), r ? r.call(t, n) : e.set(t, n), n), D = (t, e, n) => (Ho(t, e, "access private method"), n);
|
|
8
8
|
import * as T from "yjs";
|
|
9
9
|
import { UndoManager as gf, Item as yf, ContentType as bf, Text as wf, XmlElement as vf } from "yjs";
|
|
10
|
-
import { P as G, a as Z, M as cr, c as K, N as B, S as Y, T as H, b as W, D as Vn, F as I, d as
|
|
10
|
+
import { P as G, a as Z, M as cr, c as K, N as B, S as Y, T as H, b as W, D as Vn, F as I, d as tn, e as kf, f as Zl, A as Ar, p as ie, B as Cf, i as Sf, g as Ql, h as xf, j as wt, l as Or, k as Ht, m as ec, r as tc, R as an, o as dr, n as ea, q as Vt, s as bi, t as nc, u as Mf, v as Af, w as ue, x as Ve, y as Do, z as Cn, C as fo, E as Of, G as Se, H as to, I as rc, J as Sn, K as Wo, L as Uo, O as qo, Q as no, U as Rt, V as ys, W as Tf, X as ta, Y as na, Z as Df, _ as Nf, $ as Ef } from "./converter-D2y9EpE_.js";
|
|
11
11
|
import { ref as ra, computed as If, createElementBlock as Kt, openBlock as Xt, withModifiers as Ko, Fragment as Pf, renderList as Rf, normalizeClass as Lf, createCommentVNode as oa, toDisplayString as Xo, createElementVNode as Ff, createApp as Bf } from "vue";
|
|
12
|
-
import { D as ia } from "./docx-zipper-
|
|
12
|
+
import { D as ia } from "./docx-zipper-BbBE5I9n.js";
|
|
13
13
|
function No(t) {
|
|
14
14
|
const { from: e, to: n, empty: r } = t.selection, o = [];
|
|
15
15
|
return r ? (t.storedMarks && o.push(...t.storedMarks), o.push(...t.selection.$head.marks())) : t.doc.nodesBetween(e, n, (i) => {
|
|
@@ -407,11 +407,11 @@ function ic(t, e) {
|
|
|
407
407
|
};
|
|
408
408
|
}
|
|
409
409
|
const sc = ic(!1, !0), ac = ic(!0, !0);
|
|
410
|
-
function
|
|
410
|
+
function jk(t) {
|
|
411
411
|
let e = vt.getState(t);
|
|
412
412
|
return e ? e.done.eventCount : 0;
|
|
413
413
|
}
|
|
414
|
-
function
|
|
414
|
+
function Wk(t) {
|
|
415
415
|
let e = vt.getState(t);
|
|
416
416
|
return e ? e.undone.eventCount : 0;
|
|
417
417
|
}
|
|
@@ -488,7 +488,7 @@ const mt = function(t, e, n) {
|
|
|
488
488
|
return r.setEnd(t, n ?? t.nodeValue.length), r.setStart(t, e || 0), r;
|
|
489
489
|
}, Yf = function() {
|
|
490
490
|
wi = null;
|
|
491
|
-
},
|
|
491
|
+
}, ln = function(t, e, n, r) {
|
|
492
492
|
return n && (ca(t, e, n, r, -1) || ca(t, e, n, r, 1));
|
|
493
493
|
}, Gf = /^(img|br|input|textarea|hr)$/i;
|
|
494
494
|
function ca(t, e, n, r, o) {
|
|
@@ -556,7 +556,7 @@ function Tr(t) {
|
|
|
556
556
|
return e && e.node && e.node.isBlock && (e.dom == t || e.contentDOM == t);
|
|
557
557
|
}
|
|
558
558
|
const Io = function(t) {
|
|
559
|
-
return t.focusNode &&
|
|
559
|
+
return t.focusNode && ln(t.focusNode, t.focusOffset, t.anchorNode, t.anchorOffset);
|
|
560
560
|
};
|
|
561
561
|
function Gt(t, e) {
|
|
562
562
|
let n = document.createEvent("Event");
|
|
@@ -664,18 +664,18 @@ function uc(t, e) {
|
|
|
664
664
|
r.scrollTop != o + e && (r.scrollTop = o + e), r.scrollLeft != i && (r.scrollLeft = i);
|
|
665
665
|
}
|
|
666
666
|
}
|
|
667
|
-
let
|
|
667
|
+
let gn = null;
|
|
668
668
|
function cp(t) {
|
|
669
669
|
if (t.setActive)
|
|
670
670
|
return t.setActive();
|
|
671
|
-
if (
|
|
672
|
-
return t.focus(
|
|
671
|
+
if (gn)
|
|
672
|
+
return t.focus(gn);
|
|
673
673
|
let e = dc(t);
|
|
674
|
-
t.focus(
|
|
674
|
+
t.focus(gn == null ? {
|
|
675
675
|
get preventScroll() {
|
|
676
|
-
return
|
|
676
|
+
return gn = { preventScroll: !0 }, !0;
|
|
677
677
|
}
|
|
678
|
-
} : void 0),
|
|
678
|
+
} : void 0), gn || (gn = !1, uc(e, 0));
|
|
679
679
|
}
|
|
680
680
|
function fc(t, e) {
|
|
681
681
|
let n, r = 2e8, o, i = 0, s = e.top, a = e.top, l, c;
|
|
@@ -1201,7 +1201,7 @@ class Nr {
|
|
|
1201
1201
|
let p = d.focusNode.childNodes[d.focusOffset];
|
|
1202
1202
|
p && p.contentEditable == "false" && (o = !0);
|
|
1203
1203
|
}
|
|
1204
|
-
if (!(o || u && xe) &&
|
|
1204
|
+
if (!(o || u && xe) && ln(a.node, a.offset, d.anchorNode, d.anchorOffset) && ln(l.node, l.offset, d.focusNode, d.focusOffset))
|
|
1205
1205
|
return;
|
|
1206
1206
|
let f = !1;
|
|
1207
1207
|
if ((c.extend || e == n) && !u) {
|
|
@@ -1317,13 +1317,13 @@ class vp extends Nr {
|
|
|
1317
1317
|
return e.type === "characterData" && e.target.nodeValue == e.oldValue;
|
|
1318
1318
|
}
|
|
1319
1319
|
}
|
|
1320
|
-
class
|
|
1320
|
+
class cn extends Nr {
|
|
1321
1321
|
constructor(e, n, r, o, i) {
|
|
1322
1322
|
super(e, [], r, o), this.mark = n, this.spec = i;
|
|
1323
1323
|
}
|
|
1324
1324
|
static create(e, n, r, o) {
|
|
1325
1325
|
let i = o.nodeViews[n.type.name], s = i && i(n, o, r);
|
|
1326
|
-
return (!s || !s.dom) && (s = Vn.renderSpec(document, n.type.spec.toDOM(n, r), null, n.attrs)), new
|
|
1326
|
+
return (!s || !s.dom) && (s = Vn.renderSpec(document, n.type.spec.toDOM(n, r), null, n.attrs)), new cn(e, n, s.dom, s.contentDOM || s.dom, s);
|
|
1327
1327
|
}
|
|
1328
1328
|
parseRule() {
|
|
1329
1329
|
return this.dirty & it || this.mark.type.spec.reparseInView ? null : { mark: this.mark.type.name, attrs: this.mark.attrs, contentElement: this.contentDOM };
|
|
@@ -1340,7 +1340,7 @@ class ln extends Nr {
|
|
|
1340
1340
|
}
|
|
1341
1341
|
}
|
|
1342
1342
|
slice(e, n, r) {
|
|
1343
|
-
let o =
|
|
1343
|
+
let o = cn.create(this.parent, this.mark, !0, r), i = this.children, s = this.size;
|
|
1344
1344
|
n < s && (i = xi(i, n, s, r)), e > 0 && (i = xi(i, 0, e, r));
|
|
1345
1345
|
for (let a = 0; a < i.length; a++)
|
|
1346
1346
|
i[a].parent = o;
|
|
@@ -1585,7 +1585,7 @@ function bc(t, e, n) {
|
|
|
1585
1585
|
r = r.nextSibling;
|
|
1586
1586
|
} else
|
|
1587
1587
|
o = !0, t.insertBefore(a, r);
|
|
1588
|
-
if (s instanceof
|
|
1588
|
+
if (s instanceof cn) {
|
|
1589
1589
|
let l = r ? r.previousSibling : t.lastChild;
|
|
1590
1590
|
bc(s.contentDOM, s.children, n), r = l ? l.nextSibling : t.firstChild;
|
|
1591
1591
|
}
|
|
@@ -1704,7 +1704,7 @@ class Sp {
|
|
|
1704
1704
|
if (a > -1)
|
|
1705
1705
|
a > this.index && (this.changed = !0, this.destroyBetween(this.index, a)), this.top = this.top.children[this.index];
|
|
1706
1706
|
else {
|
|
1707
|
-
let l =
|
|
1707
|
+
let l = cn.create(this.top, e[i], n, r);
|
|
1708
1708
|
this.top.children.splice(this.index, 0, l), this.top = l, this.changed = !0;
|
|
1709
1709
|
}
|
|
1710
1710
|
this.index = 0, i++;
|
|
@@ -1797,7 +1797,7 @@ class Sp {
|
|
|
1797
1797
|
// contentEditable.
|
|
1798
1798
|
addTextblockHacks() {
|
|
1799
1799
|
let e = this.top.children[this.index - 1], n = this.top;
|
|
1800
|
-
for (; e instanceof
|
|
1800
|
+
for (; e instanceof cn; )
|
|
1801
1801
|
n = e, e = n.children[n.children.length - 1];
|
|
1802
1802
|
(!e || // Empty textblock
|
|
1803
1803
|
!(e instanceof Po) || /\n$/.test(e.node.text) || this.view.requiresGeckoHackNode && /\s$/.test(e.node.text)) && ((xe || be) && e && e.dom.contentEditable == "false" && this.addHackNode("IMG", n), this.addHackNode("BR", this.top));
|
|
@@ -1823,7 +1823,7 @@ function xp(t, e) {
|
|
|
1823
1823
|
for (; ; )
|
|
1824
1824
|
if (r) {
|
|
1825
1825
|
let c = n.children[r - 1];
|
|
1826
|
-
if (c instanceof
|
|
1826
|
+
if (c instanceof cn)
|
|
1827
1827
|
n = c, r = c.children.length;
|
|
1828
1828
|
else {
|
|
1829
1829
|
a = c, r--;
|
|
@@ -1978,7 +1978,7 @@ function kt(t, e = !1) {
|
|
|
1978
1978
|
if (Cc(t, n), !!kc(t)) {
|
|
1979
1979
|
if (!e && t.input.mouseDown && t.input.mouseDown.allowDefault && be) {
|
|
1980
1980
|
let r = t.domSelectionRange(), o = t.domObserver.currentSelection;
|
|
1981
|
-
if (r.anchorNode && o.anchorNode &&
|
|
1981
|
+
if (r.anchorNode && o.anchorNode && ln(r.anchorNode, r.anchorOffset, o.anchorNode, o.anchorOffset)) {
|
|
1982
1982
|
t.input.mouseDown.delayedSelectionSync = !0, t.domObserver.setCurSelection();
|
|
1983
1983
|
return;
|
|
1984
1984
|
}
|
|
@@ -2055,7 +2055,7 @@ function Sc(t) {
|
|
|
2055
2055
|
}
|
|
2056
2056
|
function Ep(t) {
|
|
2057
2057
|
let e = t.docView.domFromPos(t.state.selection.anchor, 0), n = t.domSelectionRange();
|
|
2058
|
-
return
|
|
2058
|
+
return ln(e.node, e.offset, n.anchorNode, n.anchorOffset);
|
|
2059
2059
|
}
|
|
2060
2060
|
function Mi(t, e) {
|
|
2061
2061
|
let { $anchor: n, $head: r } = t.selection, o = e > 0 ? n.max(r) : n.min(r), i = o.parent.inlineContent ? o.depth ? t.doc.resolve(e > 0 ? o.after() : o.before()) : null : o;
|
|
@@ -2101,7 +2101,7 @@ function tr(t, e) {
|
|
|
2101
2101
|
let n = t.pmViewDesc;
|
|
2102
2102
|
return n && n.size == 0 && (e < 0 || t.nextSibling || t.nodeName != "BR");
|
|
2103
2103
|
}
|
|
2104
|
-
function
|
|
2104
|
+
function yn(t, e) {
|
|
2105
2105
|
return e < 0 ? Ip(t) : Pp(t);
|
|
2106
2106
|
}
|
|
2107
2107
|
function Ip(t) {
|
|
@@ -2288,22 +2288,22 @@ function Bp(t) {
|
|
|
2288
2288
|
function zp(t, e) {
|
|
2289
2289
|
let n = e.keyCode, r = Bp(e);
|
|
2290
2290
|
if (n == 8 || ze && n == 72 && r == "c")
|
|
2291
|
-
return Oa(t, -1) ||
|
|
2291
|
+
return Oa(t, -1) || yn(t, -1);
|
|
2292
2292
|
if (n == 46 && !e.shiftKey || ze && n == 68 && r == "c")
|
|
2293
|
-
return Oa(t, 1) ||
|
|
2293
|
+
return Oa(t, 1) || yn(t, 1);
|
|
2294
2294
|
if (n == 13 || n == 27)
|
|
2295
2295
|
return !0;
|
|
2296
2296
|
if (n == 37 || ze && n == 66 && r == "c") {
|
|
2297
2297
|
let o = n == 37 ? Ma(t, t.state.selection.from) == "ltr" ? -1 : 1 : -1;
|
|
2298
|
-
return xa(t, o, r) ||
|
|
2298
|
+
return xa(t, o, r) || yn(t, o);
|
|
2299
2299
|
} else if (n == 39 || ze && n == 70 && r == "c") {
|
|
2300
2300
|
let o = n == 39 ? Ma(t, t.state.selection.from) == "ltr" ? 1 : -1 : 1;
|
|
2301
|
-
return xa(t, o, r) ||
|
|
2301
|
+
return xa(t, o, r) || yn(t, o);
|
|
2302
2302
|
} else {
|
|
2303
2303
|
if (n == 38 || ze && n == 80 && r == "c")
|
|
2304
|
-
return Aa(t, -1, r) ||
|
|
2304
|
+
return Aa(t, -1, r) || yn(t, -1);
|
|
2305
2305
|
if (n == 40 || ze && n == 78 && r == "c")
|
|
2306
|
-
return Fp(t) || Aa(t, 1, r) ||
|
|
2306
|
+
return Fp(t) || Aa(t, 1, r) || yn(t, 1);
|
|
2307
2307
|
if (r == (ze ? "m" : "c") && (n == 66 || n == 73 || n == 89 || n == 90))
|
|
2308
2308
|
return !0;
|
|
2309
2309
|
}
|
|
@@ -2372,7 +2372,7 @@ function Mc(t, e, n, r, o) {
|
|
|
2372
2372
|
break;
|
|
2373
2373
|
s = f;
|
|
2374
2374
|
}
|
|
2375
|
-
if (a || (a = (t.someProp("clipboardParser") || t.someProp("domParser") ||
|
|
2375
|
+
if (a || (a = (t.someProp("clipboardParser") || t.someProp("domParser") || tn.fromSchema(t.state.schema)).parseSlice(s, {
|
|
2376
2376
|
preserveWhitespace: !!(l || d),
|
|
2377
2377
|
context: o,
|
|
2378
2378
|
ruleFromNode(f) {
|
|
@@ -2939,7 +2939,7 @@ function pr(t, e) {
|
|
|
2939
2939
|
}
|
|
2940
2940
|
class yo {
|
|
2941
2941
|
constructor(e, n) {
|
|
2942
|
-
this.toDOM = e, this.spec = n ||
|
|
2942
|
+
this.toDOM = e, this.spec = n || nn, this.side = this.spec.side || 0;
|
|
2943
2943
|
}
|
|
2944
2944
|
map(e, n, r, o) {
|
|
2945
2945
|
let { pos: i, deleted: s } = e.mapResult(n.from + o, this.side < 0 ? -1 : 1);
|
|
@@ -2957,7 +2957,7 @@ class yo {
|
|
|
2957
2957
|
}
|
|
2958
2958
|
class Bt {
|
|
2959
2959
|
constructor(e, n) {
|
|
2960
|
-
this.attrs = e, this.spec = n ||
|
|
2960
|
+
this.attrs = e, this.spec = n || nn;
|
|
2961
2961
|
}
|
|
2962
2962
|
map(e, n, r, o) {
|
|
2963
2963
|
let i = e.map(n.from + o, this.spec.inclusiveStart ? -1 : 1) - r, s = e.map(n.to + o, this.spec.inclusiveEnd ? 1 : -1) - r;
|
|
@@ -2977,7 +2977,7 @@ class Bt {
|
|
|
2977
2977
|
}
|
|
2978
2978
|
class Ms {
|
|
2979
2979
|
constructor(e, n) {
|
|
2980
|
-
this.attrs = e, this.spec = n ||
|
|
2980
|
+
this.attrs = e, this.spec = n || nn;
|
|
2981
2981
|
}
|
|
2982
2982
|
map(e, n, r, o) {
|
|
2983
2983
|
let i = e.mapResult(n.from + o, 1);
|
|
@@ -3067,13 +3067,13 @@ class V {
|
|
|
3067
3067
|
return this.type instanceof yo;
|
|
3068
3068
|
}
|
|
3069
3069
|
}
|
|
3070
|
-
const
|
|
3070
|
+
const xn = [], nn = {};
|
|
3071
3071
|
class F {
|
|
3072
3072
|
/**
|
|
3073
3073
|
@internal
|
|
3074
3074
|
*/
|
|
3075
3075
|
constructor(e, n) {
|
|
3076
|
-
this.local = e.length ? e :
|
|
3076
|
+
this.local = e.length ? e : xn, this.children = n.length ? n : xn;
|
|
3077
3077
|
}
|
|
3078
3078
|
/**
|
|
3079
3079
|
Create a set of decorations, using the structure of the given
|
|
@@ -3081,7 +3081,7 @@ class F {
|
|
|
3081
3081
|
you must make a copy if you want need to preserve that.
|
|
3082
3082
|
*/
|
|
3083
3083
|
static create(e, n) {
|
|
3084
|
-
return n.length ? bo(n, e, 0,
|
|
3084
|
+
return n.length ? bo(n, e, 0, nn) : ye;
|
|
3085
3085
|
}
|
|
3086
3086
|
/**
|
|
3087
3087
|
Find all decorations in this set which touch the given range
|
|
@@ -3111,7 +3111,7 @@ class F {
|
|
|
3111
3111
|
document.
|
|
3112
3112
|
*/
|
|
3113
3113
|
map(e, n, r) {
|
|
3114
|
-
return this == ye || e.maps.length == 0 ? this : this.mapInner(e, n, 0, 0, r ||
|
|
3114
|
+
return this == ye || e.maps.length == 0 ? this : this.mapInner(e, n, 0, 0, r || nn);
|
|
3115
3115
|
}
|
|
3116
3116
|
/**
|
|
3117
3117
|
@internal
|
|
@@ -3122,7 +3122,7 @@ class F {
|
|
|
3122
3122
|
let l = this.local[a].map(e, r, o);
|
|
3123
3123
|
l && l.type.valid(n, l) ? (s || (s = [])).push(l) : i.onRemove && i.onRemove(this.local[a].spec);
|
|
3124
3124
|
}
|
|
3125
|
-
return this.children.length ? fh(this.children, s || [], e, n, r, o, i) : s ? new F(s.sort(
|
|
3125
|
+
return this.children.length ? fh(this.children, s || [], e, n, r, o, i) : s ? new F(s.sort(rn), xn) : ye;
|
|
3126
3126
|
}
|
|
3127
3127
|
/**
|
|
3128
3128
|
Add the given array of decorations to the ones in the set,
|
|
@@ -3140,13 +3140,13 @@ class F {
|
|
|
3140
3140
|
if (d = _c(n, a, c)) {
|
|
3141
3141
|
for (o || (o = this.children.slice()); i < o.length && o[i] < l; )
|
|
3142
3142
|
i += 3;
|
|
3143
|
-
o[i] == l ? o[i + 2] = o[i + 2].addInner(a, d, c + 1) : o.splice(i, 0, l, l + a.nodeSize, bo(d, a, c + 1,
|
|
3143
|
+
o[i] == l ? o[i + 2] = o[i + 2].addInner(a, d, c + 1) : o.splice(i, 0, l, l + a.nodeSize, bo(d, a, c + 1, nn)), i += 3;
|
|
3144
3144
|
}
|
|
3145
3145
|
});
|
|
3146
3146
|
let s = zc(i ? Vc(n) : n, -r);
|
|
3147
3147
|
for (let a = 0; a < s.length; a++)
|
|
3148
3148
|
s[a].type.valid(e, s[a]) || s.splice(a--, 1);
|
|
3149
|
-
return new F(s.length ? this.local.concat(s).sort(
|
|
3149
|
+
return new F(s.length ? this.local.concat(s).sort(rn) : this.local, o || this.children);
|
|
3150
3150
|
}
|
|
3151
3151
|
/**
|
|
3152
3152
|
Create a new set that contains the decorations in this set, minus
|
|
@@ -3195,7 +3195,7 @@ class F {
|
|
|
3195
3195
|
}
|
|
3196
3196
|
}
|
|
3197
3197
|
if (o) {
|
|
3198
|
-
let a = new F(o.sort(
|
|
3198
|
+
let a = new F(o.sort(rn), xn);
|
|
3199
3199
|
return r ? new Nt([a, r]) : a;
|
|
3200
3200
|
}
|
|
3201
3201
|
return r || ye;
|
|
@@ -3227,7 +3227,7 @@ class F {
|
|
|
3227
3227
|
*/
|
|
3228
3228
|
localsInner(e) {
|
|
3229
3229
|
if (this == ye)
|
|
3230
|
-
return
|
|
3230
|
+
return xn;
|
|
3231
3231
|
if (e.inlineContent || !this.local.some(Bt.is))
|
|
3232
3232
|
return this.local;
|
|
3233
3233
|
let n = [];
|
|
@@ -3247,7 +3247,7 @@ class Nt {
|
|
|
3247
3247
|
this.members = e;
|
|
3248
3248
|
}
|
|
3249
3249
|
map(e, n) {
|
|
3250
|
-
const r = this.members.map((o) => o.map(e, n,
|
|
3250
|
+
const r = this.members.map((o) => o.map(e, n, nn));
|
|
3251
3251
|
return Nt.from(r);
|
|
3252
3252
|
}
|
|
3253
3253
|
forChild(e, n) {
|
|
@@ -3281,7 +3281,7 @@ class Nt {
|
|
|
3281
3281
|
n.push(i[s]);
|
|
3282
3282
|
}
|
|
3283
3283
|
}
|
|
3284
|
-
return n ? As(r ? n : n.sort(
|
|
3284
|
+
return n ? As(r ? n : n.sort(rn)) : xn;
|
|
3285
3285
|
}
|
|
3286
3286
|
// Create a group for the given array of decoration sets, or return
|
|
3287
3287
|
// a single set when possible.
|
|
@@ -3347,7 +3347,7 @@ function fh(t, e, n, r, o, i, s) {
|
|
|
3347
3347
|
a.splice(f, 0, d.children[u], d.children[u + 1], d.children[u + 2]);
|
|
3348
3348
|
}
|
|
3349
3349
|
}
|
|
3350
|
-
return new F(e.sort(
|
|
3350
|
+
return new F(e.sort(rn), a);
|
|
3351
3351
|
}
|
|
3352
3352
|
function zc(t, e) {
|
|
3353
3353
|
if (!e || !t.length)
|
|
@@ -3396,12 +3396,12 @@ function bo(t, e, n, r) {
|
|
|
3396
3396
|
d != ye && o.push(l, l + a.nodeSize, d);
|
|
3397
3397
|
}
|
|
3398
3398
|
});
|
|
3399
|
-
let s = zc(i ? Vc(t) : t, -n).sort(
|
|
3399
|
+
let s = zc(i ? Vc(t) : t, -n).sort(rn);
|
|
3400
3400
|
for (let a = 0; a < s.length; a++)
|
|
3401
3401
|
s[a].type.valid(e, s[a]) || (r.onRemove && r.onRemove(s[a].spec), s.splice(a--, 1));
|
|
3402
3402
|
return s.length || o.length ? new F(s, o) : ye;
|
|
3403
3403
|
}
|
|
3404
|
-
function
|
|
3404
|
+
function rn(t, e) {
|
|
3405
3405
|
return t.from - e.from || t.to - e.to;
|
|
3406
3406
|
}
|
|
3407
3407
|
function As(t) {
|
|
@@ -3423,7 +3423,7 @@ function As(t) {
|
|
|
3423
3423
|
return e;
|
|
3424
3424
|
}
|
|
3425
3425
|
function Ea(t, e, n) {
|
|
3426
|
-
for (; e < t.length &&
|
|
3426
|
+
for (; e < t.length && rn(n, t[e]) > 0; )
|
|
3427
3427
|
e++;
|
|
3428
3428
|
t.splice(e, 0, n);
|
|
3429
3429
|
}
|
|
@@ -3504,7 +3504,7 @@ class yh {
|
|
|
3504
3504
|
return kt(this.view);
|
|
3505
3505
|
if (Oe && Lt <= 11 && !this.view.state.selection.empty) {
|
|
3506
3506
|
let e = this.view.domSelectionRange();
|
|
3507
|
-
if (e.focusNode &&
|
|
3507
|
+
if (e.focusNode && ln(e.focusNode, e.focusOffset, e.anchorNode, e.anchorOffset))
|
|
3508
3508
|
return this.flushSoon();
|
|
3509
3509
|
}
|
|
3510
3510
|
this.flush();
|
|
@@ -3608,7 +3608,7 @@ function bh(t) {
|
|
|
3608
3608
|
}
|
|
3609
3609
|
function Ra(t, e) {
|
|
3610
3610
|
let n = e.startContainer, r = e.startOffset, o = e.endContainer, i = e.endOffset, s = t.domAtPos(t.state.selection.anchor);
|
|
3611
|
-
return
|
|
3611
|
+
return ln(s.node, s.offset, o, i) && ([n, r, o, i] = [o, i, n, r]), { anchorNode: n, anchorOffset: r, focusNode: o, focusOffset: i };
|
|
3612
3612
|
}
|
|
3613
3613
|
function wh(t, e) {
|
|
3614
3614
|
if (e.getComposedRanges) {
|
|
@@ -3642,7 +3642,7 @@ function kh(t, e, n) {
|
|
|
3642
3642
|
if (!w || w.size)
|
|
3643
3643
|
break;
|
|
3644
3644
|
}
|
|
3645
|
-
let u = t.state.doc, f = t.someProp("domParser") ||
|
|
3645
|
+
let u = t.state.doc, f = t.someProp("domParser") || tn.fromSchema(t.state.schema), p = u.resolve(s), h = null, m = f.parse(r, {
|
|
3646
3646
|
topNode: p.parent,
|
|
3647
3647
|
topMatch: p.parent.contentMatchAt(p.index()),
|
|
3648
3648
|
topOpen: !0,
|
|
@@ -6222,14 +6222,44 @@ const Ag = (t, e) => {
|
|
|
6222
6222
|
rules: e,
|
|
6223
6223
|
plugin: n
|
|
6224
6224
|
}) : !1;
|
|
6225
|
+
},
|
|
6226
|
+
// Paste handler
|
|
6227
|
+
handlePaste(r, o, i) {
|
|
6228
|
+
const s = o.clipboardData;
|
|
6229
|
+
Array.from(s.types);
|
|
6230
|
+
const a = s.getData("text/html");
|
|
6231
|
+
s.getData("text/plain");
|
|
6232
|
+
let l;
|
|
6233
|
+
switch (a ? /class="?Mso|xmlns:o="urn:schemas-microsoft-com|name="?Generator" content="?Microsoft Word|<!--\[if gte mso/i.test(a) ? l = "word-html" : l = "browser-html" : l = "plain-text", l) {
|
|
6234
|
+
case "plain-text":
|
|
6235
|
+
break;
|
|
6236
|
+
case "word-html":
|
|
6237
|
+
break;
|
|
6238
|
+
case "browser-html":
|
|
6239
|
+
return Tg(a, t);
|
|
6240
|
+
}
|
|
6241
|
+
return !1;
|
|
6225
6242
|
}
|
|
6226
6243
|
},
|
|
6227
6244
|
isInputRules: !0
|
|
6228
6245
|
});
|
|
6229
6246
|
return n;
|
|
6230
|
-
}
|
|
6247
|
+
}, Tg = (t, e, n) => {
|
|
6248
|
+
const r = Dg(t), o = document.createElement("div");
|
|
6249
|
+
o.innerHTML = r;
|
|
6250
|
+
const i = tn.fromSchema(e.schema).parse(o);
|
|
6251
|
+
o.remove();
|
|
6252
|
+
const { dispatch: s } = e.view;
|
|
6253
|
+
return s ? (s(e.view.state.tr.replaceSelectionWith(i, !0)), !0) : !1;
|
|
6254
|
+
}, Dg = (t) => t.replace(
|
|
6255
|
+
/font-size\s*:\s*([\d.]+)em/gi,
|
|
6256
|
+
(e, n) => {
|
|
6257
|
+
const r = parseFloat(n);
|
|
6258
|
+
return `font-size: ${Math.round(r * 12 * 100) / 100}pt`;
|
|
6259
|
+
}
|
|
6260
|
+
);
|
|
6231
6261
|
var _n, rd, od;
|
|
6232
|
-
const
|
|
6262
|
+
const An = class An {
|
|
6233
6263
|
constructor(e, n, r) {
|
|
6234
6264
|
ft(this, _n);
|
|
6235
6265
|
P(this, "editor");
|
|
@@ -6237,14 +6267,14 @@ const Mn = class Mn {
|
|
|
6237
6267
|
P(this, "extensions");
|
|
6238
6268
|
P(this, "externalExtensions", []);
|
|
6239
6269
|
P(this, "splittableMarks", []);
|
|
6240
|
-
this.editor = r, this.externalExtensions = n || [], this.extensions =
|
|
6270
|
+
this.editor = r, this.externalExtensions = n || [], this.extensions = An.getResolvedExtensions([...e, ...this.externalExtensions]), this.schema = zi.createSchemaByExtensions(this.extensions, r), D(this, _n, rd).call(this);
|
|
6241
6271
|
}
|
|
6242
6272
|
/**
|
|
6243
6273
|
* Static method for creating ExtensionService.
|
|
6244
6274
|
* @param args Arguments for the constructor.
|
|
6245
6275
|
*/
|
|
6246
6276
|
static create(...e) {
|
|
6247
|
-
return new
|
|
6277
|
+
return new An(...e);
|
|
6248
6278
|
}
|
|
6249
6279
|
/**
|
|
6250
6280
|
* Get an array of resolved extensions (e.g. sorted by priority).
|
|
@@ -6252,7 +6282,7 @@ const Mn = class Mn {
|
|
|
6252
6282
|
* @returns Array of resolved extensions.
|
|
6253
6283
|
*/
|
|
6254
6284
|
static getResolvedExtensions(e) {
|
|
6255
|
-
return
|
|
6285
|
+
return An.sortByPriority(e);
|
|
6256
6286
|
}
|
|
6257
6287
|
/**
|
|
6258
6288
|
* Sort extensions by priority.
|
|
@@ -6299,7 +6329,7 @@ const Mn = class Mn {
|
|
|
6299
6329
|
* @returns Array of PM plugins.
|
|
6300
6330
|
*/
|
|
6301
6331
|
get plugins() {
|
|
6302
|
-
const e = this.editor, n =
|
|
6332
|
+
const e = this.editor, n = An.sortByPriority([...this.extensions].reverse()), r = [], o = n.map((i) => {
|
|
6303
6333
|
const s = {
|
|
6304
6334
|
name: i.name,
|
|
6305
6335
|
options: i.options,
|
|
@@ -6391,23 +6421,23 @@ od = function(e) {
|
|
|
6391
6421
|
}, r = E(e, "onBeforeCreate", n), o = E(e, "onCreate", n), i = E(e, "onUpdate", n), s = E(e, "onSelectionUpdate", n), a = E(e, "onTransaction", n), l = E(e, "onFocus", n), c = E(e, "onBlur", n), d = E(e, "onDestroy", n);
|
|
6392
6422
|
r && this.editor.on("beforeCreate", r), o && this.editor.on("create", o), i && this.editor.on("update", i), s && this.editor.on("selectionUpdate", s), a && this.editor.on("transaction", a), l && this.editor.on("focus", l), c && this.editor.on("blur", c), d && this.editor.on("destroy", d);
|
|
6393
6423
|
};
|
|
6394
|
-
let _i =
|
|
6395
|
-
const
|
|
6424
|
+
let _i = An;
|
|
6425
|
+
const Ng = (t) => (e) => {
|
|
6396
6426
|
const n = typeof t == "function" ? t(e) : t;
|
|
6397
6427
|
for (let r = 0; r < n.length; r += 1)
|
|
6398
6428
|
if (n[r](e)) return !0;
|
|
6399
6429
|
return !1;
|
|
6400
|
-
},
|
|
6430
|
+
}, Eg = (t) => (e) => t(e), Ig = () => ({ tr: t }) => (t.insertText(" ", t.selection.from, t.selection.to), !0), Pg = () => ({ tr: t, state: e }) => {
|
|
6401
6431
|
let n = t.selection.from;
|
|
6402
6432
|
const r = e.schema.nodes.tab.create();
|
|
6403
6433
|
return t.insert(n, r), !0;
|
|
6404
|
-
},
|
|
6405
|
-
function
|
|
6434
|
+
}, Rg = (t, e) => ({ tr: n }) => (n.setMeta(t, e), !0), Is = (t, e) => t.selection.empty ? !1 : (e && e(t.tr.deleteSelection().scrollIntoView()), !0);
|
|
6435
|
+
function Lg(t, e) {
|
|
6406
6436
|
let { $cursor: n } = t.selection;
|
|
6407
6437
|
return !n || (e ? !e.endOfTextblock("backward", t) : n.parentOffset > 0) ? null : n;
|
|
6408
6438
|
}
|
|
6409
6439
|
const id = (t, e, n) => {
|
|
6410
|
-
let r =
|
|
6440
|
+
let r = Lg(t, n);
|
|
6411
6441
|
if (!r)
|
|
6412
6442
|
return !1;
|
|
6413
6443
|
let o = ad(r);
|
|
@@ -6464,12 +6494,12 @@ function ad(t) {
|
|
|
6464
6494
|
}
|
|
6465
6495
|
return null;
|
|
6466
6496
|
}
|
|
6467
|
-
function
|
|
6497
|
+
function Fg(t, e) {
|
|
6468
6498
|
let { $cursor: n } = t.selection;
|
|
6469
6499
|
return !n || (e ? !e.endOfTextblock("forward", t) : n.parentOffset < n.parent.content.size) ? null : n;
|
|
6470
6500
|
}
|
|
6471
6501
|
const ld = (t, e, n) => {
|
|
6472
|
-
let r =
|
|
6502
|
+
let r = Fg(t, n);
|
|
6473
6503
|
if (!r)
|
|
6474
6504
|
return !1;
|
|
6475
6505
|
let o = dd(r);
|
|
@@ -6512,7 +6542,7 @@ function dd(t) {
|
|
|
6512
6542
|
}
|
|
6513
6543
|
return null;
|
|
6514
6544
|
}
|
|
6515
|
-
const
|
|
6545
|
+
const Bg = (t, e) => {
|
|
6516
6546
|
let n = t.selection, r = n instanceof B, o;
|
|
6517
6547
|
if (r) {
|
|
6518
6548
|
if (n.node.isTextblock || !Ht(t.doc, n.from))
|
|
@@ -6525,7 +6555,7 @@ const Lg = (t, e) => {
|
|
|
6525
6555
|
r && i.setSelection(B.create(i.doc, o - t.doc.resolve(o).nodeBefore.nodeSize)), e(i.scrollIntoView());
|
|
6526
6556
|
}
|
|
6527
6557
|
return !0;
|
|
6528
|
-
},
|
|
6558
|
+
}, zg = (t, e) => {
|
|
6529
6559
|
let n = t.selection, r;
|
|
6530
6560
|
if (n instanceof B) {
|
|
6531
6561
|
if (n.node.isTextblock || !Ht(t.doc, n.to))
|
|
@@ -6547,7 +6577,7 @@ function Ps(t) {
|
|
|
6547
6577
|
}
|
|
6548
6578
|
return null;
|
|
6549
6579
|
}
|
|
6550
|
-
const
|
|
6580
|
+
const _g = (t, e) => {
|
|
6551
6581
|
let { $head: n, $anchor: r } = t.selection;
|
|
6552
6582
|
if (!n.parent.type.spec.code || !n.sameParent(r))
|
|
6553
6583
|
return !1;
|
|
@@ -6583,7 +6613,7 @@ const Bg = (t, e) => {
|
|
|
6583
6613
|
let r = n.blockRange(), o = r && Or(r);
|
|
6584
6614
|
return o == null ? !1 : (e && e(t.tr.lift(r, o).scrollIntoView()), !0);
|
|
6585
6615
|
};
|
|
6586
|
-
function
|
|
6616
|
+
function Vg(t) {
|
|
6587
6617
|
return (e, n) => {
|
|
6588
6618
|
let { $from: r, $to: o } = e.selection;
|
|
6589
6619
|
if (e.selection instanceof B && e.selection.node.isBlock)
|
|
@@ -6610,14 +6640,14 @@ function zg(t) {
|
|
|
6610
6640
|
return n && n(d.scrollIntoView()), !0;
|
|
6611
6641
|
};
|
|
6612
6642
|
}
|
|
6613
|
-
const
|
|
6614
|
-
function
|
|
6643
|
+
const $g = Vg(), Hg = (t, e) => (e && e(t.tr.setSelection(new Ar(t.doc))), !0);
|
|
6644
|
+
function jg(t, e, n) {
|
|
6615
6645
|
let r = e.nodeBefore, o = e.nodeAfter, i = e.index();
|
|
6616
6646
|
return !r || !o || !r.type.compatibleContent(o.type) ? !1 : !r.content.size && e.parent.canReplace(i - 1, i) ? (n && n(t.tr.delete(e.pos - r.nodeSize, e.pos).scrollIntoView()), !0) : !e.parent.canReplace(i, i + 1) || !(o.isTextblock || Ht(t.doc, e.pos)) ? !1 : (n && n(t.tr.join(e.pos).scrollIntoView()), !0);
|
|
6617
6647
|
}
|
|
6618
6648
|
function hd(t, e, n, r) {
|
|
6619
6649
|
let o = e.nodeBefore, i = e.nodeAfter, s, a, l = o.type.spec.isolating || i.type.spec.isolating;
|
|
6620
|
-
if (!l &&
|
|
6650
|
+
if (!l && jg(t, e, n))
|
|
6621
6651
|
return !0;
|
|
6622
6652
|
let c = !l && e.parent.canReplace(e.index(), e.index() + 1);
|
|
6623
6653
|
if (c && (s = (a = o.contentMatchAt(o.childCount)).findWrapping(i.type)) && a.matchType(s[0] || i.type).validEnd) {
|
|
@@ -6626,7 +6656,7 @@ function hd(t, e, n, r) {
|
|
|
6626
6656
|
for (let b = s.length - 1; b >= 0; b--)
|
|
6627
6657
|
h = I.from(s[b].create(null, h));
|
|
6628
6658
|
h = I.from(o.copy(h));
|
|
6629
|
-
let m = t.tr.step(new
|
|
6659
|
+
let m = t.tr.step(new an(e.pos - 1, p, e.pos, p, new W(h, 1, 0), s.length, !0)), g = m.doc.resolve(p + 2 * s.length);
|
|
6630
6660
|
g.nodeAfter && g.nodeAfter.type == o.type && Ht(m.doc, g.pos) && m.join(g.pos), n(m.scrollIntoView());
|
|
6631
6661
|
}
|
|
6632
6662
|
return !0;
|
|
@@ -6646,7 +6676,7 @@ function hd(t, e, n, r) {
|
|
|
6646
6676
|
let b = I.empty;
|
|
6647
6677
|
for (let C = h.length - 1; C >= 0; C--)
|
|
6648
6678
|
b = I.from(h[C].copy(b));
|
|
6649
|
-
let w = t.tr.step(new
|
|
6679
|
+
let w = t.tr.step(new an(e.pos - h.length, e.pos + i.nodeSize, e.pos + g, e.pos + i.nodeSize - g, new W(b, h.length, 0), 0, !0));
|
|
6650
6680
|
n(w.scrollIntoView());
|
|
6651
6681
|
}
|
|
6652
6682
|
return !0;
|
|
@@ -6665,7 +6695,7 @@ function md(t) {
|
|
|
6665
6695
|
return o.node(i).isTextblock ? (n && n(e.tr.setSelection(H.create(e.doc, t < 0 ? o.start(i) : o.end(i)))), !0) : !1;
|
|
6666
6696
|
};
|
|
6667
6697
|
}
|
|
6668
|
-
const
|
|
6698
|
+
const Wg = md(-1), Ug = md(1);
|
|
6669
6699
|
function Ya(t, e = null) {
|
|
6670
6700
|
return function(n, r) {
|
|
6671
6701
|
let o = !1;
|
|
@@ -6706,7 +6736,7 @@ function Rs(...t) {
|
|
|
6706
6736
|
}
|
|
6707
6737
|
Rs(Is, id, sd);
|
|
6708
6738
|
Rs(Is, ld, cd);
|
|
6709
|
-
Rs(ud, fd, pd,
|
|
6739
|
+
Rs(ud, fd, pd, $g);
|
|
6710
6740
|
typeof navigator < "u" ? /Mac|iP(hone|[oa]d)/.test(navigator.platform) : typeof os < "u" && os.platform && os.platform() == "darwin";
|
|
6711
6741
|
function gd(t) {
|
|
6712
6742
|
for (let e = 0; e < t.edgeCount; e++) {
|
|
@@ -6721,7 +6751,7 @@ const Ga = (t, e) => {
|
|
|
6721
6751
|
const r = n.filter((o) => e?.includes(o.type.name));
|
|
6722
6752
|
t.tr.ensureMarks(r);
|
|
6723
6753
|
}
|
|
6724
|
-
},
|
|
6754
|
+
}, qg = ({ keepMarks: t = !0 } = {}) => (e) => {
|
|
6725
6755
|
const { tr: n, state: r, dispatch: o, editor: i } = e, { selection: s, doc: a } = n, { $from: l, $to: c } = s, d = i.extensionService.attributes, u = N.getSplittedAttributes(d, l.node().type.name, l.node().attrs);
|
|
6726
6756
|
if (s instanceof B && s.node.isBlock)
|
|
6727
6757
|
return !l.parentOffset || !wt(a, l.pos) ? !1 : (o && (t && Ga(r, i.extensionService.splittableMarks), n.split(l.pos).scrollIntoView()), !0);
|
|
@@ -6738,9 +6768,9 @@ const Ga = (t, e) => {
|
|
|
6738
6768
|
t && Ga(r, i.extensionService.splittableMarks), n.scrollIntoView();
|
|
6739
6769
|
}
|
|
6740
6770
|
return !0;
|
|
6741
|
-
},
|
|
6771
|
+
}, Kg = () => ({ state: t, dispatch: e }) => pd(t, e), Xg = () => ({ state: t, dispatch: e }) => fd(t, e), Jg = () => ({ state: t, dispatch: e }) => ud(t, e), Yg = () => ({ state: t, dispatch: e }) => _g(t, e), yd = (t) => {
|
|
6742
6772
|
};
|
|
6743
|
-
function
|
|
6773
|
+
function Gg(t, e, n) {
|
|
6744
6774
|
const { selection: r } = e;
|
|
6745
6775
|
let o = null;
|
|
6746
6776
|
if (yd() && (o = r.$cursor), o) {
|
|
@@ -6759,7 +6789,7 @@ function Jg(t, e, n) {
|
|
|
6759
6789
|
}), a;
|
|
6760
6790
|
});
|
|
6761
6791
|
}
|
|
6762
|
-
const
|
|
6792
|
+
const Zg = (t, e = {}) => ({ tr: n, state: r, dispatch: o }) => {
|
|
6763
6793
|
const { selection: i } = n, { empty: s, ranges: a } = i, l = St(t, r.schema);
|
|
6764
6794
|
if (o)
|
|
6765
6795
|
if (s) {
|
|
@@ -6787,12 +6817,12 @@ const Yg = (t, e = {}) => ({ tr: n, state: r, dispatch: o }) => {
|
|
|
6787
6817
|
}) : n.addMark(h, m, l.create(e));
|
|
6788
6818
|
});
|
|
6789
6819
|
});
|
|
6790
|
-
return
|
|
6820
|
+
return Gg(r, n, l);
|
|
6791
6821
|
};
|
|
6792
6822
|
function Vi(t, e, n = {}) {
|
|
6793
6823
|
return t.find((r) => r.type === e && dr(r.attrs, n));
|
|
6794
6824
|
}
|
|
6795
|
-
function
|
|
6825
|
+
function Qg(t, e, n = {}) {
|
|
6796
6826
|
return !!Vi(t, e, n);
|
|
6797
6827
|
}
|
|
6798
6828
|
function Ls(t, e, n = {}) {
|
|
@@ -6804,11 +6834,11 @@ function Ls(t, e, n = {}) {
|
|
|
6804
6834
|
let i = r.index, s = t.start() + r.offset, a = i + 1, l = s + r.node.nodeSize;
|
|
6805
6835
|
for (Vi([...r.node.marks], e, n); i > 0 && o.isInSet(t.parent.child(i - 1).marks); )
|
|
6806
6836
|
i -= 1, s -= t.parent.child(i).nodeSize;
|
|
6807
|
-
for (; a < t.parent.childCount &&
|
|
6837
|
+
for (; a < t.parent.childCount && Qg([...t.parent.child(a).marks], e, n); )
|
|
6808
6838
|
l += t.parent.child(a).nodeSize, a += 1;
|
|
6809
6839
|
return { from: s, to: l };
|
|
6810
6840
|
}
|
|
6811
|
-
const
|
|
6841
|
+
const ey = (t, e = {}) => ({ tr: n, state: r, dispatch: o }) => {
|
|
6812
6842
|
const { extendEmptyMarkRange: i = !1 } = e, { selection: s } = n, a = St(t, r.schema), { $from: l, empty: c, ranges: d } = s;
|
|
6813
6843
|
if (!o) return !0;
|
|
6814
6844
|
if (c && i) {
|
|
@@ -6820,7 +6850,7 @@ const Zg = (t, e = {}) => ({ tr: n, state: r, dispatch: o }) => {
|
|
|
6820
6850
|
n.removeMark(u.$from.pos, u.$to.pos, a);
|
|
6821
6851
|
});
|
|
6822
6852
|
return n.removeStoredMark(a), !0;
|
|
6823
|
-
},
|
|
6853
|
+
}, ty = () => ({ tr: t, dispatch: e }) => {
|
|
6824
6854
|
const { selection: n } = t, { empty: r, ranges: o } = n;
|
|
6825
6855
|
return r || e && o.forEach((i) => {
|
|
6826
6856
|
t.removeMark(i.$from.pos, i.$to.pos);
|
|
@@ -6849,10 +6879,10 @@ function So(t, e, n = {}) {
|
|
|
6849
6879
|
const l = a.filter((u) => i ? i.name === u.mark.type.name : !0).filter((u) => dr(u.mark.attrs, n, { strict: !1 })).reduce((u, f) => u + f.to - f.from, 0), c = a.filter((u) => i ? u.mark.type !== i && u.mark.type.excludes(i) : !0).reduce((u, f) => u + f.to - f.from, 0);
|
|
6850
6880
|
return (l > 0 ? l + c : l) >= s;
|
|
6851
6881
|
}
|
|
6852
|
-
const
|
|
6882
|
+
const ny = (t, e = {}, n = {}) => ({ state: r, commands: o }) => {
|
|
6853
6883
|
const { extendEmptyMarkRange: i = !1 } = n, s = St(t, r.schema);
|
|
6854
6884
|
return So(r, s, e) ? o.unsetMark(s, { extendEmptyMarkRange: i }) : o.setMark(s, e);
|
|
6855
|
-
},
|
|
6885
|
+
}, ry = () => ({ state: t, tr: e, dispatch: n }) => {
|
|
6856
6886
|
const { selection: r } = e, { ranges: o } = r;
|
|
6857
6887
|
return n && o.forEach(({ $from: i, $to: s }) => {
|
|
6858
6888
|
t.doc.nodesBetween(i.pos, s.pos, (a, l) => {
|
|
@@ -6867,7 +6897,7 @@ const ey = (t, e = {}, n = {}) => ({ state: r, commands: o }) => {
|
|
|
6867
6897
|
(h || h === 0) && e.lift(p, h);
|
|
6868
6898
|
});
|
|
6869
6899
|
}), !0;
|
|
6870
|
-
},
|
|
6900
|
+
}, oy = (t, e = {}) => ({ state: n, dispatch: r, chain: o }) => {
|
|
6871
6901
|
const i = le(t, n.schema);
|
|
6872
6902
|
return i.isTextblock ? o().command(({ commands: s }) => Ya(i, e)(n) ? !0 : s.clearNodes()).command(({ state: s }) => Ya(i, e)(s, r)).run() : !1;
|
|
6873
6903
|
};
|
|
@@ -6885,10 +6915,10 @@ function xo(t, e, n = {}) {
|
|
|
6885
6915
|
const l = o - r, c = a.filter((u) => s ? s.name === u.node.type.name : !0).filter((u) => dr(u.node.attrs, n, { strict: !1 }));
|
|
6886
6916
|
return i ? !!c.length : c.reduce((u, f) => u + f.to - f.from, 0) >= l;
|
|
6887
6917
|
}
|
|
6888
|
-
const
|
|
6918
|
+
const iy = (t, e, n = {}) => ({ state: r, commands: o }) => {
|
|
6889
6919
|
const i = le(t, r.schema), s = le(e, r.schema);
|
|
6890
6920
|
return xo(r, i, n) ? o.setNode(s) : o.setNode(i, n);
|
|
6891
|
-
},
|
|
6921
|
+
}, sy = () => ({ state: t, dispatch: e }) => Hg(t, e), ay = () => ({ state: t, dispatch: e }) => Is(t, e), ly = (t, e = {}) => ({ tr: n, state: r, dispatch: o }) => {
|
|
6892
6922
|
let i = null, s = null;
|
|
6893
6923
|
const a = Er(
|
|
6894
6924
|
typeof t == "string" ? t : t.name,
|
|
@@ -6905,7 +6935,7 @@ const ry = (t, e, n = {}) => ({ state: r, commands: o }) => {
|
|
|
6905
6935
|
});
|
|
6906
6936
|
});
|
|
6907
6937
|
}), !0) : !1;
|
|
6908
|
-
},
|
|
6938
|
+
}, cy = (t, e) => ({ tr: n, state: r, dispatch: o }) => {
|
|
6909
6939
|
let i = null, s = null;
|
|
6910
6940
|
const a = Er(
|
|
6911
6941
|
typeof t == "string" ? t : t.name,
|
|
@@ -6918,7 +6948,7 @@ const ry = (t, e, n = {}) => ({ state: r, commands: o }) => {
|
|
|
6918
6948
|
});
|
|
6919
6949
|
});
|
|
6920
6950
|
}), !0) : !1;
|
|
6921
|
-
},
|
|
6951
|
+
}, dy = () => ({ state: t, dispatch: e }) => Bg(t, e), uy = () => ({ state: t, dispatch: e }) => zg(t, e), fy = () => ({ state: t, dispatch: e }) => id(t, e), py = () => ({ state: t, dispatch: e }) => ld(t, e), hy = () => ({ state: t, dispatch: e }) => sd(t, e), my = () => ({ state: t, dispatch: e }) => cd(t, e), gy = () => ({ state: t, dispatch: e }) => Wg(t, e), yy = () => ({ state: t, dispatch: e }) => Ug(t, e), by = (t, e) => ({ tr: n, commands: r }) => r.insertContentAt({ from: n.selection.from, to: n.selection.to }, t, e), bd = (t) => {
|
|
6922
6952
|
const e = t.childNodes;
|
|
6923
6953
|
for (let n = e.length - 1; n >= 0; n -= 1) {
|
|
6924
6954
|
const r = e[n];
|
|
@@ -6969,22 +6999,22 @@ function $i(t, e, n) {
|
|
|
6969
6999
|
}
|
|
6970
7000
|
})
|
|
6971
7001
|
});
|
|
6972
|
-
if (n.slice ?
|
|
7002
|
+
if (n.slice ? tn.fromSchema(l).parseSlice(Kr(t), n.parseOptions) : tn.fromSchema(l).parse(Kr(t), n.parseOptions), n.errorOnInvalidContent && s)
|
|
6973
7003
|
throw new Error("[super-editor error]: Invalid HTML content", {
|
|
6974
7004
|
cause: new Error(`Invalid element found: ${a}`)
|
|
6975
7005
|
});
|
|
6976
7006
|
}
|
|
6977
|
-
const i =
|
|
7007
|
+
const i = tn.fromSchema(e);
|
|
6978
7008
|
return n.slice ? i.parseSlice(Kr(t), n.parseOptions).content : i.parse(Kr(t), n.parseOptions);
|
|
6979
7009
|
}
|
|
6980
7010
|
return $i("", e, n);
|
|
6981
7011
|
}
|
|
6982
|
-
function
|
|
7012
|
+
function wy(t, e, n) {
|
|
6983
7013
|
const r = t.steps.length - 1;
|
|
6984
7014
|
if (r < e)
|
|
6985
7015
|
return;
|
|
6986
7016
|
const o = t.steps[r];
|
|
6987
|
-
if (!(o instanceof Vt || o instanceof
|
|
7017
|
+
if (!(o instanceof Vt || o instanceof an))
|
|
6988
7018
|
return;
|
|
6989
7019
|
const i = t.mapping.maps[r];
|
|
6990
7020
|
let s = 0;
|
|
@@ -6992,7 +7022,7 @@ function yy(t, e, n) {
|
|
|
6992
7022
|
s === 0 && (s = d);
|
|
6993
7023
|
}), t.setSelection(Y.near(t.doc.resolve(s), n));
|
|
6994
7024
|
}
|
|
6995
|
-
const
|
|
7025
|
+
const vy = (t) => !("type" in t), ky = (t, e, n) => ({ tr: r, dispatch: o, editor: i }) => {
|
|
6996
7026
|
if (o) {
|
|
6997
7027
|
n = {
|
|
6998
7028
|
parseOptions: {},
|
|
@@ -7020,17 +7050,17 @@ const by = (t) => !("type" in t), wy = (t, e, n) => ({ tr: r, dispatch: o, edito
|
|
|
7020
7050
|
}), !1;
|
|
7021
7051
|
}
|
|
7022
7052
|
let { from: a, to: l } = typeof t == "number" ? { from: t, to: t } : { from: t.from, to: t.to }, c = !0, d = !0;
|
|
7023
|
-
if ((
|
|
7053
|
+
if ((vy(s) ? s : [s]).forEach((p) => {
|
|
7024
7054
|
p.check(), c = c ? p.isText && p.marks.length === 0 : !1, d = d ? p.isBlock : !1;
|
|
7025
7055
|
}), a === l && d) {
|
|
7026
7056
|
const { parent: p } = r.doc.resolve(a);
|
|
7027
7057
|
p.isTextblock && !p.type.spec.code && !p.childCount && (a -= 1, l += 1);
|
|
7028
7058
|
}
|
|
7029
7059
|
let f;
|
|
7030
|
-
c ? (Array.isArray(e) ? f = e.map((p) => p.text || "").join("") : typeof e == "object" && e && e.text ? f = e.text : f = e, r.insertText(f, a, l)) : (f = s, r.replaceWith(a, l, f)), n.updateSelection &&
|
|
7060
|
+
c ? (Array.isArray(e) ? f = e.map((p) => p.text || "").join("") : typeof e == "object" && e && e.text ? f = e.text : f = e, r.insertText(f, a, l)) : (f = s, r.replaceWith(a, l, f)), n.updateSelection && wy(r, r.steps.length - 1, -1), n.applyInputRules && r.setMeta("applyInputRules", { from: a, text: f }), n.applyPasteRules && r.setMeta("applyPasteRules", { from: a, text: f });
|
|
7031
7061
|
}
|
|
7032
7062
|
return !0;
|
|
7033
|
-
},
|
|
7063
|
+
}, Cy = () => ({ state: t, dispatch: e }) => {
|
|
7034
7064
|
const n = t.plugins;
|
|
7035
7065
|
for (let r = 0; r < n.length; r += 1) {
|
|
7036
7066
|
const o = n[r];
|
|
@@ -7051,16 +7081,16 @@ const by = (t) => !("type" in t), wy = (t, e, n) => ({ tr: r, dispatch: o, edito
|
|
|
7051
7081
|
}
|
|
7052
7082
|
return !1;
|
|
7053
7083
|
};
|
|
7054
|
-
function
|
|
7084
|
+
function Sy(t, e = null) {
|
|
7055
7085
|
return function(n, r) {
|
|
7056
7086
|
let { $from: o, $to: i } = n.selection, s = o.blockRange(i);
|
|
7057
7087
|
if (!s)
|
|
7058
7088
|
return !1;
|
|
7059
7089
|
let a = r ? n.tr : null;
|
|
7060
|
-
return
|
|
7090
|
+
return xy(a, s, t, e) ? (r && r(a.scrollIntoView()), !0) : !1;
|
|
7061
7091
|
};
|
|
7062
7092
|
}
|
|
7063
|
-
function
|
|
7093
|
+
function xy(t, e, n, r = null) {
|
|
7064
7094
|
let o = !1, i = e, s = e.$from.doc;
|
|
7065
7095
|
if (e.depth >= 2 && e.$from.node(e.depth - 1).type.compatibleContent(n) && e.startIndex == 0) {
|
|
7066
7096
|
if (e.$from.index(e.depth - 1) == 0)
|
|
@@ -7069,13 +7099,13 @@ function Cy(t, e, n, r = null) {
|
|
|
7069
7099
|
i = new bi(l, l, e.depth), e.endIndex < e.parent.childCount && (e = new bi(e.$from, s.resolve(e.$to.end(e.depth)), e.depth)), o = !0;
|
|
7070
7100
|
}
|
|
7071
7101
|
let a = nc(i, n, r, e);
|
|
7072
|
-
return a ? (t &&
|
|
7102
|
+
return a ? (t && My(t, e, a, o, n), !0) : !1;
|
|
7073
7103
|
}
|
|
7074
|
-
function
|
|
7104
|
+
function My(t, e, n, r, o) {
|
|
7075
7105
|
let i = I.empty;
|
|
7076
7106
|
for (let d = n.length - 1; d >= 0; d--)
|
|
7077
7107
|
i = I.from(n[d].type.create(n[d].attrs, i));
|
|
7078
|
-
t.step(new
|
|
7108
|
+
t.step(new an(e.start - (r ? 2 : 0), e.end, e.start, e.end, new W(i, 0, 0), n.length, !0));
|
|
7079
7109
|
let s = 0;
|
|
7080
7110
|
for (let d = 0; d < n.length; d++)
|
|
7081
7111
|
n[d].type == o && (s = d + 1);
|
|
@@ -7084,15 +7114,15 @@ function Sy(t, e, n, r, o) {
|
|
|
7084
7114
|
!f && wt(t.doc, l, a) && (t.split(l, a), l += 2 * a), l += c.child(d).nodeSize;
|
|
7085
7115
|
return t;
|
|
7086
7116
|
}
|
|
7087
|
-
function
|
|
7117
|
+
function Ay(t) {
|
|
7088
7118
|
return function(e, n) {
|
|
7089
7119
|
let { $from: r, $to: o } = e.selection, i = r.blockRange(o, (s) => s.childCount > 0 && s.firstChild.type == t);
|
|
7090
|
-
return i ? n ? r.node(i.depth - 1).type == t ?
|
|
7120
|
+
return i ? n ? r.node(i.depth - 1).type == t ? Oy(e, n, t, i) : Ty(e, n, i) : !0 : !1;
|
|
7091
7121
|
};
|
|
7092
7122
|
}
|
|
7093
|
-
function
|
|
7123
|
+
function Oy(t, e, n, r) {
|
|
7094
7124
|
let o = t.tr, i = r.end, s = r.$to.end(r.depth);
|
|
7095
|
-
i < s && (o.step(new
|
|
7125
|
+
i < s && (o.step(new an(i - 1, s, i, s, new W(I.from(n.create(null, r.parent.copy())), 1, 0), 1, !0)), r = new bi(o.doc.resolve(r.$from.pos), o.doc.resolve(s), r.depth));
|
|
7096
7126
|
const a = Or(r);
|
|
7097
7127
|
if (a == null)
|
|
7098
7128
|
return !1;
|
|
@@ -7100,7 +7130,7 @@ function My(t, e, n, r) {
|
|
|
7100
7130
|
let l = o.doc.resolve(o.mapping.map(i, -1) - 1);
|
|
7101
7131
|
return Ht(o.doc, l.pos) && l.nodeBefore.type == l.nodeAfter.type && o.join(l.pos), e(o.scrollIntoView()), !0;
|
|
7102
7132
|
}
|
|
7103
|
-
function
|
|
7133
|
+
function Ty(t, e, n) {
|
|
7104
7134
|
let r = t.tr, o = n.parent;
|
|
7105
7135
|
for (let p = n.end, h = n.endIndex - 1, m = n.startIndex; h > m; h--)
|
|
7106
7136
|
p -= o.child(h).nodeSize, r.delete(p - 1, p + 1);
|
|
@@ -7111,9 +7141,9 @@ function Ay(t, e, n) {
|
|
|
7111
7141
|
if (!c.canReplace(d + (a ? 0 : 1), d + 1, s.content.append(l ? I.empty : I.from(o))))
|
|
7112
7142
|
return !1;
|
|
7113
7143
|
let u = i.pos, f = u + s.nodeSize;
|
|
7114
|
-
return r.step(new
|
|
7144
|
+
return r.step(new an(u - (a ? 1 : 0), f + (l ? 1 : 0), u + 1, f - 1, new W((a ? I.empty : I.from(o.copy(I.empty))).append(l ? I.empty : I.from(o.copy(I.empty))), a ? 0 : 1, l ? 0 : 1), a ? 0 : 1)), e(r.scrollIntoView()), !0;
|
|
7115
7145
|
}
|
|
7116
|
-
function
|
|
7146
|
+
function Dy(t) {
|
|
7117
7147
|
return function(e, n) {
|
|
7118
7148
|
let { $from: r, $to: o } = e.selection, i = r.blockRange(o, (c) => c.childCount > 0 && c.firstChild.type == t);
|
|
7119
7149
|
if (!i)
|
|
@@ -7126,14 +7156,14 @@ function Oy(t) {
|
|
|
7126
7156
|
return !1;
|
|
7127
7157
|
if (n) {
|
|
7128
7158
|
let c = l.lastChild && l.lastChild.type == a.type, d = I.from(c ? t.create() : null), u = new W(I.from(t.create(null, I.from(a.type.create(null, d)))), c ? 3 : 1, 0), f = i.start, p = i.end;
|
|
7129
|
-
n(e.tr.step(new
|
|
7159
|
+
n(e.tr.step(new an(f - (c ? 3 : 1), p, f, p, u, 1, !0)).scrollIntoView());
|
|
7130
7160
|
}
|
|
7131
7161
|
return !0;
|
|
7132
7162
|
};
|
|
7133
7163
|
}
|
|
7134
|
-
const
|
|
7164
|
+
const Ny = (t, e = {}) => ({ state: n, dispatch: r }) => {
|
|
7135
7165
|
const o = le(t, n.schema);
|
|
7136
|
-
return
|
|
7166
|
+
return Sy(o, e)(n, r);
|
|
7137
7167
|
}, Bo = (t, e) => {
|
|
7138
7168
|
for (let n = t.depth; n > 0; n--) {
|
|
7139
7169
|
const r = t.node(n);
|
|
@@ -7154,7 +7184,7 @@ const Ty = (t, e = {}) => ({ state: n, dispatch: r }) => {
|
|
|
7154
7184
|
storage: r.storage
|
|
7155
7185
|
}, i = K(E(r, "group", o));
|
|
7156
7186
|
return typeof i != "string" ? !1 : i.split(" ").includes("list");
|
|
7157
|
-
},
|
|
7187
|
+
}, Ey = {
|
|
7158
7188
|
type: "element",
|
|
7159
7189
|
name: "w:abstractNum",
|
|
7160
7190
|
attributes: {
|
|
@@ -7653,7 +7683,7 @@ const Ty = (t, e = {}) => ({ state: n, dispatch: r }) => {
|
|
|
7653
7683
|
]
|
|
7654
7684
|
}
|
|
7655
7685
|
]
|
|
7656
|
-
},
|
|
7686
|
+
}, Iy = {
|
|
7657
7687
|
type: "element",
|
|
7658
7688
|
name: "w:abstractNum",
|
|
7659
7689
|
attributes: {
|
|
@@ -8311,14 +8341,14 @@ const Ty = (t, e = {}) => ({ state: n, dispatch: r }) => {
|
|
|
8311
8341
|
if (r === void 0) return !0;
|
|
8312
8342
|
const o = t.doc.nodeAt(r);
|
|
8313
8343
|
return n.node.type === o?.type && Ht(t.doc, r) && t.join(r), !0;
|
|
8314
|
-
},
|
|
8344
|
+
}, Py = (t, e, n, r = {}) => (o) => {
|
|
8315
8345
|
const { editor: i, tr: s, state: a, dispatch: l, chain: c, can: d, commands: u } = o, { extensions: f, splittableMarks: p } = i.extensionService, h = le(t, a.schema), m = le(e, a.schema), { selection: g, storedMarks: b } = a, { $from: w, $to: C } = g, y = w.blockRange(C), S = b || g.$to.parentOffset && g.$from.marks();
|
|
8316
8346
|
if (!y) return !1;
|
|
8317
8347
|
const k = He((z) => Hi(z.type.name, f))(g), { numbering: A } = i.converter;
|
|
8318
8348
|
if (y.depth >= 1 && k && y.depth - k.depth <= 1) {
|
|
8319
8349
|
if (k.node.type === h) {
|
|
8320
8350
|
const { listId: z } = k.node.attrs;
|
|
8321
|
-
return i.converter.numbering =
|
|
8351
|
+
return i.converter.numbering = Ly(z, A), u.liftListItem(m);
|
|
8322
8352
|
}
|
|
8323
8353
|
if (Hi(k.node.type.name, f) && h.validContent(k.node.content) && l)
|
|
8324
8354
|
return c().command(() => (s.setNodeMarkup(k.pos, h), !0)).command(() => ai(s, h)).command(() => li(s, h)).run();
|
|
@@ -8331,9 +8361,9 @@ const Ty = (t, e = {}) => ({ state: n, dispatch: r }) => {
|
|
|
8331
8361
|
}
|
|
8332
8362
|
return $ ? !0 : u.clearNodes();
|
|
8333
8363
|
}, x = wd(A.definitions);
|
|
8334
|
-
return i.converter.numbering =
|
|
8335
|
-
}, wd = (t) => Math.max(...Object.keys(t).map(Number)) + 1,
|
|
8336
|
-
const r = n.name === "orderedList" ?
|
|
8364
|
+
return i.converter.numbering = Ry(x, A, h), r.listId = x, !n || !S || !l ? c().command(L({ ensureMarks: !1 })).wrapInList(h, r).command(() => ai(s, h)).command(() => li(s, h)).run() : c().command(L({ ensureMarks: !0 })).wrapInList(h, r).command(() => ai(s, h)).command(() => li(s, h)).run();
|
|
8365
|
+
}, wd = (t) => Math.max(...Object.keys(t).map(Number)) + 1, Ry = (t, e, n) => {
|
|
8366
|
+
const r = n.name === "orderedList" ? Ey : Iy, o = { ...e }, i = wd(o.abstracts), s = {
|
|
8337
8367
|
...r,
|
|
8338
8368
|
attributes: {
|
|
8339
8369
|
...r.attributes,
|
|
@@ -8353,10 +8383,10 @@ const Ty = (t, e = {}) => ({ state: n, dispatch: r }) => {
|
|
|
8353
8383
|
]
|
|
8354
8384
|
};
|
|
8355
8385
|
return o.definitions[t] = a, o;
|
|
8356
|
-
},
|
|
8386
|
+
}, Ly = (t, e) => {
|
|
8357
8387
|
const { definitions: n, abstracts: r } = e, o = n[t].elements[0].attributes["w:val"];
|
|
8358
8388
|
return delete n[t], delete r[o], e;
|
|
8359
|
-
},
|
|
8389
|
+
}, Fy = (t) => (e) => {
|
|
8360
8390
|
const { tr: n, state: r, dispatch: o, editor: i } = e, s = le(t, r.schema), { $from: a, $to: l, node: c } = r.selection;
|
|
8361
8391
|
if (c && c.isBlock || a.depth < 2 || !a.sameParent(l))
|
|
8362
8392
|
return !1;
|
|
@@ -8408,57 +8438,57 @@ const Ty = (t, e = {}) => ({ state: n, dispatch: r }) => {
|
|
|
8408
8438
|
n.ensureMarks(y), n.setMeta("splitListItem", y);
|
|
8409
8439
|
}
|
|
8410
8440
|
return !0;
|
|
8411
|
-
},
|
|
8441
|
+
}, By = (t) => ({ state: e, dispatch: n }) => {
|
|
8412
8442
|
const r = le(t, e.schema);
|
|
8413
|
-
return
|
|
8414
|
-
},
|
|
8443
|
+
return Dy(r)(e, n);
|
|
8444
|
+
}, zy = (t) => ({ state: e, dispatch: n }) => {
|
|
8415
8445
|
const r = le(t, e.schema);
|
|
8416
|
-
return
|
|
8417
|
-
},
|
|
8446
|
+
return Ay(r)(e, n);
|
|
8447
|
+
}, _y = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
|
|
8418
8448
|
__proto__: null,
|
|
8419
|
-
clearNodes:
|
|
8420
|
-
command:
|
|
8421
|
-
createParagraphNear:
|
|
8422
|
-
deleteSelection:
|
|
8423
|
-
exitCode:
|
|
8424
|
-
first:
|
|
8425
|
-
insertContent:
|
|
8426
|
-
insertContentAt:
|
|
8427
|
-
insertTabChar:
|
|
8428
|
-
insertTabNode:
|
|
8429
|
-
joinBackward:
|
|
8430
|
-
joinDown:
|
|
8431
|
-
joinForward:
|
|
8432
|
-
joinUp:
|
|
8433
|
-
liftEmptyBlock:
|
|
8434
|
-
liftListItem:
|
|
8435
|
-
newlineInCode:
|
|
8436
|
-
resetAttributes:
|
|
8437
|
-
selectAll:
|
|
8438
|
-
selectNodeBackward:
|
|
8439
|
-
selectNodeForward:
|
|
8440
|
-
selectTextblockEnd:
|
|
8441
|
-
selectTextblockStart:
|
|
8442
|
-
setMark:
|
|
8443
|
-
setMeta:
|
|
8444
|
-
setNode:
|
|
8445
|
-
sinkListItem:
|
|
8446
|
-
splitBlock:
|
|
8447
|
-
splitListItem:
|
|
8448
|
-
toggleList:
|
|
8449
|
-
toggleMark:
|
|
8450
|
-
toggleNode:
|
|
8451
|
-
undoInputRule:
|
|
8452
|
-
unsetAllMarks:
|
|
8453
|
-
unsetMark:
|
|
8454
|
-
updateAttributes:
|
|
8455
|
-
wrapInList:
|
|
8456
|
-
}, Symbol.toStringTag, { value: "Module" })),
|
|
8449
|
+
clearNodes: ry,
|
|
8450
|
+
command: Eg,
|
|
8451
|
+
createParagraphNear: Xg,
|
|
8452
|
+
deleteSelection: ay,
|
|
8453
|
+
exitCode: Yg,
|
|
8454
|
+
first: Ng,
|
|
8455
|
+
insertContent: by,
|
|
8456
|
+
insertContentAt: ky,
|
|
8457
|
+
insertTabChar: Ig,
|
|
8458
|
+
insertTabNode: Pg,
|
|
8459
|
+
joinBackward: fy,
|
|
8460
|
+
joinDown: uy,
|
|
8461
|
+
joinForward: py,
|
|
8462
|
+
joinUp: dy,
|
|
8463
|
+
liftEmptyBlock: Kg,
|
|
8464
|
+
liftListItem: zy,
|
|
8465
|
+
newlineInCode: Jg,
|
|
8466
|
+
resetAttributes: cy,
|
|
8467
|
+
selectAll: sy,
|
|
8468
|
+
selectNodeBackward: hy,
|
|
8469
|
+
selectNodeForward: my,
|
|
8470
|
+
selectTextblockEnd: yy,
|
|
8471
|
+
selectTextblockStart: gy,
|
|
8472
|
+
setMark: Zg,
|
|
8473
|
+
setMeta: Rg,
|
|
8474
|
+
setNode: oy,
|
|
8475
|
+
sinkListItem: By,
|
|
8476
|
+
splitBlock: qg,
|
|
8477
|
+
splitListItem: Fy,
|
|
8478
|
+
toggleList: Py,
|
|
8479
|
+
toggleMark: ny,
|
|
8480
|
+
toggleNode: iy,
|
|
8481
|
+
undoInputRule: Cy,
|
|
8482
|
+
unsetAllMarks: ty,
|
|
8483
|
+
unsetMark: ey,
|
|
8484
|
+
updateAttributes: ly,
|
|
8485
|
+
wrapInList: Ny
|
|
8486
|
+
}, Symbol.toStringTag, { value: "Module" })), Vy = Q.create({
|
|
8457
8487
|
name: "commands",
|
|
8458
8488
|
addCommands() {
|
|
8459
|
-
return { ...
|
|
8489
|
+
return { ..._y };
|
|
8460
8490
|
}
|
|
8461
|
-
}),
|
|
8491
|
+
}), $y = (t) => {
|
|
8462
8492
|
t.commands.first(({ commands: e }) => [
|
|
8463
8493
|
() => e.newlineInCode(),
|
|
8464
8494
|
() => e.createParagraphNear(),
|
|
@@ -8473,23 +8503,23 @@ const Ty = (t, e = {}) => ({ state: n, dispatch: r }) => {
|
|
|
8473
8503
|
() => e.joinBackward(),
|
|
8474
8504
|
() => e.selectNodeBackward()
|
|
8475
8505
|
]);
|
|
8476
|
-
},
|
|
8506
|
+
}, bn = (t) => {
|
|
8477
8507
|
t.commands.first(({ commands: e }) => [
|
|
8478
8508
|
() => e.deleteSelection(),
|
|
8479
8509
|
() => e.joinForward(),
|
|
8480
8510
|
() => e.selectNodeForward()
|
|
8481
8511
|
]);
|
|
8482
|
-
},
|
|
8512
|
+
}, Hy = Q.create({
|
|
8483
8513
|
name: "keymap",
|
|
8484
8514
|
addShortcuts() {
|
|
8485
8515
|
const t = {
|
|
8486
|
-
Enter: () =>
|
|
8516
|
+
Enter: () => $y(this.editor),
|
|
8487
8517
|
"Mod-Enter": () => this.editor.commands.exitCode(),
|
|
8488
8518
|
Backspace: () => Xn(this.editor),
|
|
8489
8519
|
"Mod-Backspace": () => Xn(this.editor),
|
|
8490
8520
|
"Shift-Backspace": () => Xn(this.editor),
|
|
8491
|
-
Delete: () =>
|
|
8492
|
-
"Mod-Delete": () =>
|
|
8521
|
+
Delete: () => bn(this.editor),
|
|
8522
|
+
"Mod-Delete": () => bn(this.editor),
|
|
8493
8523
|
"Mod-a": () => this.editor.commands.selectAll(),
|
|
8494
8524
|
Tab: () => this.editor.commands.insertTabNode()
|
|
8495
8525
|
}, e = {
|
|
@@ -8498,17 +8528,17 @@ const Ty = (t, e = {}) => ({ state: n, dispatch: r }) => {
|
|
|
8498
8528
|
...t,
|
|
8499
8529
|
"Ctrl-h": () => Xn(this.editor),
|
|
8500
8530
|
"Alt-Backspace": () => Xn(this.editor),
|
|
8501
|
-
"Ctrl-d": () =>
|
|
8502
|
-
"Ctrl-Alt-Backspace": () =>
|
|
8503
|
-
"Alt-Delete": () =>
|
|
8504
|
-
"Alt-d": () =>
|
|
8531
|
+
"Ctrl-d": () => bn(this.editor),
|
|
8532
|
+
"Ctrl-Alt-Backspace": () => bn(this.editor),
|
|
8533
|
+
"Alt-Delete": () => bn(this.editor),
|
|
8534
|
+
"Alt-d": () => bn(this.editor),
|
|
8505
8535
|
"Ctrl-a": () => this.editor.commands.selectTextblockStart(),
|
|
8506
8536
|
"Ctrl-e": () => this.editor.commands.selectTextblockEnd(),
|
|
8507
8537
|
"Ctrl-t": () => this.editor.commands.insertTabChar()
|
|
8508
8538
|
};
|
|
8509
8539
|
return Mf() || Af() ? n : e;
|
|
8510
8540
|
}
|
|
8511
|
-
}),
|
|
8541
|
+
}), jy = Q.create({
|
|
8512
8542
|
name: "editable",
|
|
8513
8543
|
addPmPlugins() {
|
|
8514
8544
|
return [new Z({
|
|
@@ -8518,7 +8548,7 @@ const Ty = (t, e = {}) => ({ state: n, dispatch: r }) => {
|
|
|
8518
8548
|
}
|
|
8519
8549
|
})];
|
|
8520
8550
|
}
|
|
8521
|
-
}),
|
|
8551
|
+
}), Wy = Q.create({
|
|
8522
8552
|
name: "editorFocus",
|
|
8523
8553
|
addPmPlugins() {
|
|
8524
8554
|
const t = this.editor;
|
|
@@ -8632,7 +8662,7 @@ const Fs = ({
|
|
|
8632
8662
|
)) : d.attrs.track && !d.attrs.track.find((f) => f.type === ue) && ["bulletList", "orderedList"].includes(d.type.name);
|
|
8633
8663
|
}), { deletionMark: a, deletionMap: l, nodes: c };
|
|
8634
8664
|
};
|
|
8635
|
-
function
|
|
8665
|
+
function Uy(t) {
|
|
8636
8666
|
const e = {
|
|
8637
8667
|
bulletList: 1,
|
|
8638
8668
|
orderedList: 2
|
|
@@ -8640,11 +8670,11 @@ function jy(t) {
|
|
|
8640
8670
|
return {
|
|
8641
8671
|
attributes: {
|
|
8642
8672
|
parentAttributes: {
|
|
8643
|
-
"w14:paraId":
|
|
8644
|
-
"w14:textId":
|
|
8645
|
-
"w:rsidR":
|
|
8646
|
-
"w:rsidRDefault":
|
|
8647
|
-
"w:rsidP":
|
|
8673
|
+
"w14:paraId": Cn(),
|
|
8674
|
+
"w14:textId": Cn(),
|
|
8675
|
+
"w:rsidR": Cn(),
|
|
8676
|
+
"w:rsidRDefault": Cn(),
|
|
8677
|
+
"w:rsidP": Cn(),
|
|
8648
8678
|
paragraphProperties: {
|
|
8649
8679
|
type: "element",
|
|
8650
8680
|
name: "w:pPr",
|
|
@@ -8682,7 +8712,7 @@ function jy(t) {
|
|
|
8682
8712
|
}
|
|
8683
8713
|
};
|
|
8684
8714
|
}
|
|
8685
|
-
function
|
|
8715
|
+
function qy(t, e, n) {
|
|
8686
8716
|
const r = [];
|
|
8687
8717
|
return t === e ? n.resolve(t).marks().forEach((o) => {
|
|
8688
8718
|
const i = n.resolve(t - 1), s = Ls(i, o.type);
|
|
@@ -8741,14 +8771,14 @@ const Md = (t) => {
|
|
|
8741
8771
|
findMark: Eo,
|
|
8742
8772
|
findParentNode: He,
|
|
8743
8773
|
findParentNodeClosestToPos: Bo,
|
|
8744
|
-
generateDocxListAttributes:
|
|
8745
|
-
generateDocxRandomId:
|
|
8774
|
+
generateDocxListAttributes: Uy,
|
|
8775
|
+
generateDocxRandomId: Cn,
|
|
8746
8776
|
generateRandom32BitHex: Of,
|
|
8747
8777
|
getActiveFormatting: zf,
|
|
8748
8778
|
getExtensionConfigField: E,
|
|
8749
8779
|
getMarkRange: Ls,
|
|
8750
8780
|
getMarkType: St,
|
|
8751
|
-
getMarksBetween:
|
|
8781
|
+
getMarksBetween: qy,
|
|
8752
8782
|
getMarksFromSelection: No,
|
|
8753
8783
|
getNodeType: le,
|
|
8754
8784
|
getSchemaTypeByName: Yn,
|
|
@@ -8760,7 +8790,7 @@ const Md = (t) => {
|
|
|
8760
8790
|
isNodeActive: xo,
|
|
8761
8791
|
isTextSelection: yd,
|
|
8762
8792
|
posToDOMRect: xd
|
|
8763
|
-
}, Symbol.toStringTag, { value: "Module" })),
|
|
8793
|
+
}, Symbol.toStringTag, { value: "Module" })), Ky = (t, e, n) => {
|
|
8764
8794
|
const r = t.resolve(e), o = r.parent, i = o.childAfter(r.parentOffset);
|
|
8765
8795
|
if (!i.node)
|
|
8766
8796
|
return null;
|
|
@@ -8790,11 +8820,11 @@ const Md = (t) => {
|
|
|
8790
8820
|
throw new Error('Invalid "predicate" parameter');
|
|
8791
8821
|
} else throw new Error('Invalid "node" parameter');
|
|
8792
8822
|
return Od(t, n).filter((r) => e(r.node));
|
|
8793
|
-
}, Dd = (t, e) => Td(t, (n) => n.isInline, e),
|
|
8823
|
+
}, Dd = (t, e) => Td(t, (n) => n.isInline, e), Xy = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
|
|
8794
8824
|
__proto__: null,
|
|
8795
8825
|
findChildren: Td,
|
|
8796
8826
|
findInlineNodes: Dd,
|
|
8797
|
-
findMarkPosition:
|
|
8827
|
+
findMarkPosition: Ky,
|
|
8798
8828
|
flatten: Od
|
|
8799
8829
|
}, Symbol.toStringTag, { value: "Module" })), zs = (t, e = null) => {
|
|
8800
8830
|
const n = [], r = Dd(t.doc);
|
|
@@ -8808,7 +8838,7 @@ const Md = (t) => {
|
|
|
8808
8838
|
});
|
|
8809
8839
|
});
|
|
8810
8840
|
}), e ? n.filter(({ mark: o }) => o.attrs.id === e) : n) : n;
|
|
8811
|
-
}, de = new G("TrackChangesBase"),
|
|
8841
|
+
}, de = new G("TrackChangesBase"), Jy = (t = {}) => new Z({
|
|
8812
8842
|
key: de,
|
|
8813
8843
|
state: {
|
|
8814
8844
|
init(e, n) {
|
|
@@ -8816,7 +8846,7 @@ const Md = (t) => {
|
|
|
8816
8846
|
isTrackChangesActive: !1,
|
|
8817
8847
|
onlyOriginalShown: !1,
|
|
8818
8848
|
onlyModifiedShown: !1,
|
|
8819
|
-
decorations:
|
|
8849
|
+
decorations: wn(n, !1, !1)
|
|
8820
8850
|
};
|
|
8821
8851
|
},
|
|
8822
8852
|
apply(e, n, r, o) {
|
|
@@ -8824,7 +8854,7 @@ const Md = (t) => {
|
|
|
8824
8854
|
return i ? i.type === "TRACK_CHANGES_ENABLE" ? {
|
|
8825
8855
|
...n,
|
|
8826
8856
|
isTrackChangesActive: i.value === !0,
|
|
8827
|
-
decorations:
|
|
8857
|
+
decorations: wn(
|
|
8828
8858
|
o,
|
|
8829
8859
|
n.onlyOriginalShown,
|
|
8830
8860
|
n.onlyModifiedShown
|
|
@@ -8833,22 +8863,22 @@ const Md = (t) => {
|
|
|
8833
8863
|
...n,
|
|
8834
8864
|
onlyOriginalShown: i.value === !0,
|
|
8835
8865
|
onlyModifiedShown: !1,
|
|
8836
|
-
decorations:
|
|
8866
|
+
decorations: wn(o, i.value === !0, !1)
|
|
8837
8867
|
} : i.type === "SHOW_ONLY_MODIFIED" ? {
|
|
8838
8868
|
...n,
|
|
8839
8869
|
onlyOriginalShown: !1,
|
|
8840
8870
|
onlyModifiedShown: i.value === !0,
|
|
8841
|
-
decorations:
|
|
8871
|
+
decorations: wn(o, !1, i.value === !0)
|
|
8842
8872
|
} : {
|
|
8843
8873
|
...n,
|
|
8844
|
-
decorations:
|
|
8874
|
+
decorations: wn(
|
|
8845
8875
|
o,
|
|
8846
8876
|
n.onlyOriginalShown,
|
|
8847
8877
|
n.onlyModifiedShown
|
|
8848
8878
|
)
|
|
8849
8879
|
} : {
|
|
8850
8880
|
...n,
|
|
8851
|
-
decorations:
|
|
8881
|
+
decorations: wn(
|
|
8852
8882
|
o,
|
|
8853
8883
|
n.onlyOriginalShown,
|
|
8854
8884
|
n.onlyModifiedShown
|
|
@@ -8861,7 +8891,7 @@ const Md = (t) => {
|
|
|
8861
8891
|
return this.getState(e)?.decorations;
|
|
8862
8892
|
}
|
|
8863
8893
|
}
|
|
8864
|
-
}),
|
|
8894
|
+
}), wn = (t, e, n) => {
|
|
8865
8895
|
if (!t.doc || !t.doc.nodeSize || n && e)
|
|
8866
8896
|
return F.empty;
|
|
8867
8897
|
const r = [], o = zs(t);
|
|
@@ -8929,10 +8959,10 @@ const Md = (t) => {
|
|
|
8929
8959
|
}
|
|
8930
8960
|
}), F.create(t.doc, r)) : F.empty;
|
|
8931
8961
|
}, Pe = "commentMark", Za = ({ commentId: t, state: e, tr: n, dispatch: r }) => {
|
|
8932
|
-
|
|
8962
|
+
Yy(t, e.doc).forEach(({ from: i, to: s }) => {
|
|
8933
8963
|
n.removeMark(i, s, e.schema.marks[Pe]);
|
|
8934
8964
|
}), r(n);
|
|
8935
|
-
},
|
|
8965
|
+
}, Yy = (t, e) => {
|
|
8936
8966
|
const n = [];
|
|
8937
8967
|
return e.descendants((r, o) => {
|
|
8938
8968
|
const { marks: i } = r, s = i.find((a) => a.type.name === Pe);
|
|
@@ -8941,7 +8971,7 @@ const Md = (t) => {
|
|
|
8941
8971
|
t === l && n.push({ from: o, to: o + r.nodeSize });
|
|
8942
8972
|
}
|
|
8943
8973
|
}), n;
|
|
8944
|
-
},
|
|
8974
|
+
}, Gy = (t, e, n, r = []) => {
|
|
8945
8975
|
const o = [], i = [], s = /* @__PURE__ */ new Set();
|
|
8946
8976
|
return t.descendants((a, l) => {
|
|
8947
8977
|
(a.marks?.filter((d) => d.type.name === Pe)).forEach((d) => {
|
|
@@ -8987,7 +9017,7 @@ const Md = (t) => {
|
|
|
8987
9017
|
"w:id": e,
|
|
8988
9018
|
internal: n
|
|
8989
9019
|
};
|
|
8990
|
-
},
|
|
9020
|
+
}, Zy = (t, e, n, r) => {
|
|
8991
9021
|
const o = [], i = [];
|
|
8992
9022
|
t.descendants((s, a) => {
|
|
8993
9023
|
const { type: l } = s;
|
|
@@ -9014,7 +9044,7 @@ const Md = (t) => {
|
|
|
9014
9044
|
}), i.sort((s, a) => a.start - s.start).forEach(({ start: s, end: a }) => {
|
|
9015
9045
|
e.delete(s, a);
|
|
9016
9046
|
});
|
|
9017
|
-
},
|
|
9047
|
+
}, Qy = (t = {}) => {
|
|
9018
9048
|
const { before: e = [], after: n = [] } = t, r = new Set(e.map((h) => h.type)), o = new Set(n.map((h) => h.type)), i = [...o].filter((h) => !r.has(h)), s = [...r].filter((h) => !o.has(h)), a = [], l = i.filter((h) => !["textStyle", "commentMark"].includes(h));
|
|
9019
9049
|
l.length && a.push(`Added formatting: ${l.join(", ")}`);
|
|
9020
9050
|
const c = s.filter((h) => !["textStyle", "commentMark"].includes(h));
|
|
@@ -9033,11 +9063,11 @@ const Md = (t) => {
|
|
|
9033
9063
|
}
|
|
9034
9064
|
}
|
|
9035
9065
|
}), f.length && a.push(`Modified text style: ${f.join(", ")}`), a.length ? a.join(". ") : "No formatting changes.";
|
|
9036
|
-
},
|
|
9066
|
+
}, eb = ({ activeThreadId: t, threadId: e, isInternal: n, editor: r }) => {
|
|
9037
9067
|
if (!r.options.isInternal && n) return "transparent";
|
|
9038
9068
|
const o = he.getState(r.state), i = n ? o.internalColor : o.externalColor, s = t == e ? "44" : "22";
|
|
9039
9069
|
return `${i}${s}`;
|
|
9040
|
-
},
|
|
9070
|
+
}, on = new G("paginationPlugin"), tb = async (t) => {
|
|
9041
9071
|
if (!t.converter) return;
|
|
9042
9072
|
const e = { headers: {}, footers: {} }, n = t.converter.headerIds, r = t.converter.footerIds;
|
|
9043
9073
|
for (let o in n) {
|
|
@@ -9081,7 +9111,7 @@ const Md = (t) => {
|
|
|
9081
9111
|
editable: !1,
|
|
9082
9112
|
element: r,
|
|
9083
9113
|
content: e,
|
|
9084
|
-
extensions:
|
|
9114
|
+
extensions: Bk(),
|
|
9085
9115
|
documentId: "sectionId"
|
|
9086
9116
|
});
|
|
9087
9117
|
c.on("create", () => {
|
|
@@ -9103,7 +9133,7 @@ const Md = (t) => {
|
|
|
9103
9133
|
}), n({ height: d, sectionEditor: c, sectionContainer: r });
|
|
9104
9134
|
});
|
|
9105
9135
|
});
|
|
9106
|
-
}), _s = [Ve, ue, Se], he = new G("comments"),
|
|
9136
|
+
}), _s = [Ve, ue, Se], he = new G("comments"), nb = Q.create({
|
|
9107
9137
|
name: "comments",
|
|
9108
9138
|
addCommands() {
|
|
9109
9139
|
return {
|
|
@@ -9168,7 +9198,7 @@ const Md = (t) => {
|
|
|
9168
9198
|
};
|
|
9169
9199
|
},
|
|
9170
9200
|
apply(o, i, s, a) {
|
|
9171
|
-
const c = o.getMeta(
|
|
9201
|
+
const c = o.getMeta(on)?.isReadyToInit;
|
|
9172
9202
|
c && (e = !0);
|
|
9173
9203
|
const d = o.getMeta(he), { type: u } = d || {};
|
|
9174
9204
|
if (u === "force" && (e = !0), !c && !e && d && d.decorations)
|
|
@@ -9178,7 +9208,7 @@ const Md = (t) => {
|
|
|
9178
9208
|
allCommentPositions: d.allCommentPositions
|
|
9179
9209
|
};
|
|
9180
9210
|
const f = o.getMeta(de), p = i.trackedChanges;
|
|
9181
|
-
f && (i.trackedChanges =
|
|
9211
|
+
f && (i.trackedChanges = ob(
|
|
9182
9212
|
f,
|
|
9183
9213
|
p,
|
|
9184
9214
|
a,
|
|
@@ -9187,7 +9217,7 @@ const Md = (t) => {
|
|
|
9187
9217
|
const h = d?.type === "setActiveComment";
|
|
9188
9218
|
if (!o.docChanged && o.selectionSet || h) {
|
|
9189
9219
|
const { selection: m } = o;
|
|
9190
|
-
let g =
|
|
9220
|
+
let g = rb(a.doc, m);
|
|
9191
9221
|
if (h && (g = d.activeThreadId), n !== g) {
|
|
9192
9222
|
n = g;
|
|
9193
9223
|
const w = {
|
|
@@ -9231,7 +9261,7 @@ const Md = (t) => {
|
|
|
9231
9261
|
});
|
|
9232
9262
|
const z = L.internal;
|
|
9233
9263
|
S || (S = n === x);
|
|
9234
|
-
let $ =
|
|
9264
|
+
let $ = eb({ activeThreadId: n, threadId: x, isInternal: z, editor: t });
|
|
9235
9265
|
const j = V.inline(w, w + b.nodeSize, {
|
|
9236
9266
|
style: `background-color: ${$};`,
|
|
9237
9267
|
"data-thread-id": x,
|
|
@@ -9293,7 +9323,7 @@ const Md = (t) => {
|
|
|
9293
9323
|
const s = t[e];
|
|
9294
9324
|
s.start = Math.min(s.start, n), s.end = Math.max(s.end, n + o.nodeSize), s.bounds.top = Math.min(s.bounds.top, r.top), s.bounds.bottom = Math.max(s.bounds.bottom, r.bottom);
|
|
9295
9325
|
}
|
|
9296
|
-
},
|
|
9326
|
+
}, rb = (t, e) => {
|
|
9297
9327
|
if (!e) return;
|
|
9298
9328
|
const { $from: n, $to: r } = e;
|
|
9299
9329
|
if (n.pos !== r.pos || !t.nodeAt(n.pos)) return;
|
|
@@ -9345,7 +9375,7 @@ const Md = (t) => {
|
|
|
9345
9375
|
mark: c
|
|
9346
9376
|
});
|
|
9347
9377
|
}), s;
|
|
9348
|
-
},
|
|
9378
|
+
}, ob = (t, e, n, r) => {
|
|
9349
9379
|
const {
|
|
9350
9380
|
insertedMark: o,
|
|
9351
9381
|
deletionMark: i,
|
|
@@ -9366,7 +9396,7 @@ const Md = (t) => {
|
|
|
9366
9396
|
if (h.marks.find((b) => b.type.name === Se))
|
|
9367
9397
|
return f = [h], !1;
|
|
9368
9398
|
});
|
|
9369
|
-
const p =
|
|
9399
|
+
const p = sb({
|
|
9370
9400
|
documentId: r.options.documentId,
|
|
9371
9401
|
event: d ? "add" : "update",
|
|
9372
9402
|
marks: {
|
|
@@ -9379,7 +9409,7 @@ const Md = (t) => {
|
|
|
9379
9409
|
newEditorState: n
|
|
9380
9410
|
});
|
|
9381
9411
|
return p && r.emit("commentsUpdate", p), l;
|
|
9382
|
-
},
|
|
9412
|
+
}, ib = ({
|
|
9383
9413
|
state: t,
|
|
9384
9414
|
node: e,
|
|
9385
9415
|
mark: n,
|
|
@@ -9389,9 +9419,9 @@ const Md = (t) => {
|
|
|
9389
9419
|
deletionNodes: s = []
|
|
9390
9420
|
}) => {
|
|
9391
9421
|
let a = "", l = "";
|
|
9392
|
-
if (o === Ve && (a = e?.text ?? ""), o === Se && (a =
|
|
9422
|
+
if (o === Ve && (a = e?.text ?? ""), o === Se && (a = Qy(n.attrs)), (o === ue || i) && (l = e?.text ?? "", i)) {
|
|
9393
9423
|
let { id: c } = r.deletionMark.attrs;
|
|
9394
|
-
l =
|
|
9424
|
+
l = ab(t.doc, (u) => {
|
|
9395
9425
|
const { marks: f = [] } = u, p = f.filter((m) => _s.includes(m.type.name));
|
|
9396
9426
|
if (!p.length) return !1;
|
|
9397
9427
|
if (p.find((m) => m.attrs.id === c)) return !0;
|
|
@@ -9401,7 +9431,7 @@ const Md = (t) => {
|
|
|
9401
9431
|
deletionText: l,
|
|
9402
9432
|
trackedChangeText: a
|
|
9403
9433
|
};
|
|
9404
|
-
},
|
|
9434
|
+
}, sb = ({ event: t, marks: e, deletionNodes: n, nodes: r, newEditorState: o, documentId: i }) => {
|
|
9405
9435
|
const s = e.insertedMark || e.deletionMark || e.formatMark, { type: a, attrs: l } = s, { name: c } = a, { author: d, authorEmail: u, date: f } = l, p = l.id, h = r[0], m = !!(e.insertedMark && e.deletionMark);
|
|
9406
9436
|
let g;
|
|
9407
9437
|
o.doc.descendants((y, S) => {
|
|
@@ -9409,7 +9439,7 @@ const Md = (t) => {
|
|
|
9409
9439
|
if (!A.length) return;
|
|
9410
9440
|
if (A.find((x) => x.attrs.id === p) && (g = y), g) return !1;
|
|
9411
9441
|
});
|
|
9412
|
-
const { deletionText: b, trackedChangeText: w } =
|
|
9442
|
+
const { deletionText: b, trackedChangeText: w } = ib({
|
|
9413
9443
|
state: o,
|
|
9414
9444
|
node: g || h,
|
|
9415
9445
|
mark: s,
|
|
@@ -9434,7 +9464,7 @@ const Md = (t) => {
|
|
|
9434
9464
|
};
|
|
9435
9465
|
return t === "add" ? C.event = to.ADD : t === "update" && (C.event = to.UPDATE), C;
|
|
9436
9466
|
};
|
|
9437
|
-
function
|
|
9467
|
+
function ab(t, e) {
|
|
9438
9468
|
let n = null;
|
|
9439
9469
|
return t.descendants((r, o) => {
|
|
9440
9470
|
if (e(r) && (n = { node: r, pos: o }), n) return !1;
|
|
@@ -9476,8 +9506,8 @@ const Ed = ({ state: t, tr: e, step: n, newTr: r, map: o, doc: i, user: s, date:
|
|
|
9476
9506
|
m.deletionNodes = w, m.deletionMark = g, o.appendMapping(b);
|
|
9477
9507
|
}
|
|
9478
9508
|
r.setMeta(de, m), r.setMeta(he, { type: "force" });
|
|
9479
|
-
},
|
|
9480
|
-
},
|
|
9509
|
+
}, lb = () => {
|
|
9510
|
+
}, cb = () => {
|
|
9481
9511
|
}, Id = ({ state: t, tr: e, step: n, newTr: r, map: o, doc: i, user: s, date: a }) => {
|
|
9482
9512
|
const l = {};
|
|
9483
9513
|
i.nodesBetween(n.from, n.to, (c, d) => {
|
|
@@ -9587,7 +9617,7 @@ const Ed = ({ state: t, tr: e, step: n, newTr: r, map: o, doc: i, user: s, date:
|
|
|
9587
9617
|
doc: f,
|
|
9588
9618
|
user: n,
|
|
9589
9619
|
date: l
|
|
9590
|
-
}), console.debug("[track-changes]: addMarkStep")) : u instanceof
|
|
9620
|
+
}), console.debug("[track-changes]: addMarkStep")) : u instanceof Sn ? (Pd({
|
|
9591
9621
|
state: e,
|
|
9592
9622
|
tr: t,
|
|
9593
9623
|
step: u,
|
|
@@ -9612,7 +9642,7 @@ const Ed = ({ state: t, tr: e, step: n, newTr: r, map: o, doc: i, user: s, date:
|
|
|
9612
9642
|
i.setSelection(new H(i.doc.resolve(c)));
|
|
9613
9643
|
}
|
|
9614
9644
|
return t.storedMarksSet && i.setStoredMarks(t.storedMarks), t.scrolledIntoView && i.scrollIntoView(), i;
|
|
9615
|
-
},
|
|
9645
|
+
}, db = (t) => {
|
|
9616
9646
|
const { state: e } = t, { dispatch: n } = t.view, { tr: r } = e;
|
|
9617
9647
|
if (n)
|
|
9618
9648
|
return e.doc.descendants((o, i) => {
|
|
@@ -9633,10 +9663,10 @@ const Ed = ({ state: t, tr: e, step: n, newTr: r, map: o, doc: i, user: s, date:
|
|
|
9633
9663
|
});
|
|
9634
9664
|
}
|
|
9635
9665
|
}), n(r), !0;
|
|
9636
|
-
},
|
|
9637
|
-
initial:
|
|
9666
|
+
}, ub = {
|
|
9667
|
+
initial: db
|
|
9638
9668
|
}, nl = (t) => {
|
|
9639
|
-
if (t === "initial" || t === "0.4.14") return Object.values(
|
|
9669
|
+
if (t === "initial" || t === "0.4.14") return Object.values(ub);
|
|
9640
9670
|
};
|
|
9641
9671
|
var en, gs, M, Ld, Fd, Wi, Ui, Bd, qi, Ki, Xi, Ji, Yi, Gi, Zi, Qi, es, ts, zd, Gn, Zn, _d, Vd, $d, Hd;
|
|
9642
9672
|
const Gs = class Gs extends hg {
|
|
@@ -10004,7 +10034,7 @@ const Gs = class Gs extends hg {
|
|
|
10004
10034
|
* @returns {Y.Doc | undefined} Updated Y.Doc if any, otherwise undefined
|
|
10005
10035
|
*/
|
|
10006
10036
|
processCollaborationMigrations() {
|
|
10007
|
-
if (console.debug("[checkVersionMigrations] Current editor version", "0.10.
|
|
10037
|
+
if (console.debug("[checkVersionMigrations] Current editor version", "0.10.14"), !this.options.ydoc) return;
|
|
10008
10038
|
let r = this.options.ydoc.getMap("meta").get("version");
|
|
10009
10039
|
r || (r = "initial"), console.debug("[checkVersionMigrations] Document version", r);
|
|
10010
10040
|
const o = nl(r) || [], s = this.state.plugins.find((c) => c.key.startsWith("y-sync"));
|
|
@@ -10040,7 +10070,7 @@ en = new WeakMap(), gs = new WeakMap(), M = new WeakSet(), Ld = function(n) {
|
|
|
10040
10070
|
this.isDestroyed || this.emit("create", { editor: this });
|
|
10041
10071
|
}, 0));
|
|
10042
10072
|
}, Wi = function(n) {
|
|
10043
|
-
(!n.extensions || !n.extensions.length) && (this.options.extensions =
|
|
10073
|
+
(!n.extensions || !n.extensions.length) && (this.options.extensions = Fk()), D(this, M, Xi).call(this), D(this, M, Ji).call(this), D(this, M, Zi).call(this), this.on("beforeCreate", this.options.onBeforeCreate), this.emit("beforeCreate", { editor: this }), this.on("contentError", this.options.onContentError), D(this, M, ts).call(this), this.on("create", this.options.onCreate), this.on("update", this.options.onUpdate), this.on("selectionUpdate", this.options.onSelectionUpdate), this.on("transaction", this.options.onTransaction), this.on("focus", D(this, M, Ui)), this.on("blur", this.options.onBlur), this.on("destroy", this.options.onDestroy), this.on("commentsLoaded", this.options.onCommentsLoaded), this.on("commentClick", this.options.onCommentClicked), this.on("locked", this.options.onDocumentLocked), window.setTimeout(() => {
|
|
10044
10074
|
this.isDestroyed || this.emit("create", { editor: this });
|
|
10045
10075
|
}, 0);
|
|
10046
10076
|
}, Ui = function({ editor: n, event: r }) {
|
|
@@ -10065,7 +10095,7 @@ qi = function() {
|
|
|
10065
10095
|
* Creates extension service.
|
|
10066
10096
|
*/
|
|
10067
10097
|
Xi = function() {
|
|
10068
|
-
const n = ["extension", "node", "mark"], r = [
|
|
10098
|
+
const n = ["extension", "node", "mark"], r = [jy, Vy, Wy, Hy], o = this.options.externalExtensions || [], i = [...r, ...this.options.extensions].filter(
|
|
10069
10099
|
(s) => n.includes(s?.type)
|
|
10070
10100
|
);
|
|
10071
10101
|
this.extensionService = _i.create(i, o, this);
|
|
@@ -10125,7 +10155,7 @@ es = function(n) {
|
|
|
10125
10155
|
const o = document.createElement("div");
|
|
10126
10156
|
o.innerHTML = n, r = o, o.remove();
|
|
10127
10157
|
}
|
|
10128
|
-
return
|
|
10158
|
+
return tn.fromSchema(this.schema).parse(r);
|
|
10129
10159
|
}, /**
|
|
10130
10160
|
* Creates PM View.
|
|
10131
10161
|
*/
|
|
@@ -10160,9 +10190,9 @@ Gn = function() {
|
|
|
10160
10190
|
if (this.options.isHeadless || !this.extensionService) return;
|
|
10161
10191
|
if (this.options.extensions.find((r) => r.name === "pagination") && this.options.pagination) {
|
|
10162
10192
|
console.debug("🔗 [super-editor] Initializing pagination");
|
|
10163
|
-
const r = await
|
|
10193
|
+
const r = await tb(this);
|
|
10164
10194
|
this.storage.pagination.sectionData = r;
|
|
10165
|
-
const { state: o, dispatch: i } = this.view, s = o.tr.setMeta(
|
|
10195
|
+
const { state: o, dispatch: i } = this.view, s = o.tr.setMeta(on, { isReadyToInit: !0 });
|
|
10166
10196
|
i(s);
|
|
10167
10197
|
}
|
|
10168
10198
|
}, /**
|
|
@@ -10217,7 +10247,7 @@ Vd = function(n) {
|
|
|
10217
10247
|
schema: this.schema,
|
|
10218
10248
|
doc: n
|
|
10219
10249
|
}), { tr: o, doc: i } = r;
|
|
10220
|
-
return
|
|
10250
|
+
return Zy(i, o, this.schema, this.converter), r.apply(o).doc;
|
|
10221
10251
|
}, /**
|
|
10222
10252
|
* Prepare the document for export. Any necessary pre-export processing to the state
|
|
10223
10253
|
* can happen here.
|
|
@@ -10230,7 +10260,7 @@ $d = function(n = []) {
|
|
|
10230
10260
|
doc: this.state.doc,
|
|
10231
10261
|
plugins: this.state.plugins
|
|
10232
10262
|
}), { tr: o, doc: i } = r;
|
|
10233
|
-
return
|
|
10263
|
+
return Gy(i, o, this.schema, n), r.apply(o).doc.toJSON();
|
|
10234
10264
|
}, /**
|
|
10235
10265
|
* Destroy collaboration provider and ydoc
|
|
10236
10266
|
*/
|
|
@@ -10584,14 +10614,14 @@ const jd = Q.create({
|
|
|
10584
10614
|
};
|
|
10585
10615
|
}
|
|
10586
10616
|
});
|
|
10587
|
-
function
|
|
10617
|
+
function fb(t = {}) {
|
|
10588
10618
|
return new Z({
|
|
10589
10619
|
view(e) {
|
|
10590
|
-
return new
|
|
10620
|
+
return new pb(e, t);
|
|
10591
10621
|
}
|
|
10592
10622
|
});
|
|
10593
10623
|
}
|
|
10594
|
-
class
|
|
10624
|
+
class pb {
|
|
10595
10625
|
constructor(e, n) {
|
|
10596
10626
|
var r;
|
|
10597
10627
|
this.editorView = e, this.cursorPos = null, this.element = null, this.timeout = -1, this.width = (r = n.width) !== null && r !== void 0 ? r : 1, this.color = n.color === !1 ? void 0 : n.color || "black", this.class = n.class, this.handlers = ["dragover", "dragend", "drop", "dragleave"].map((o) => {
|
|
@@ -10673,7 +10703,7 @@ const Yd = Q.create({
|
|
|
10673
10703
|
};
|
|
10674
10704
|
},
|
|
10675
10705
|
addPmPlugins() {
|
|
10676
|
-
return [
|
|
10706
|
+
return [fb(this.options)];
|
|
10677
10707
|
}
|
|
10678
10708
|
});
|
|
10679
10709
|
class re extends Y {
|
|
@@ -10715,7 +10745,7 @@ class re extends Y {
|
|
|
10715
10745
|
*/
|
|
10716
10746
|
static valid(e) {
|
|
10717
10747
|
let n = e.parent;
|
|
10718
|
-
if (n.isTextblock || !
|
|
10748
|
+
if (n.isTextblock || !hb(e) || !mb(e))
|
|
10719
10749
|
return !1;
|
|
10720
10750
|
let r = n.type.spec.allowGapCursor;
|
|
10721
10751
|
if (r != null)
|
|
@@ -10776,7 +10806,7 @@ class Vs {
|
|
|
10776
10806
|
return re.valid(n) ? new re(n) : Y.near(n);
|
|
10777
10807
|
}
|
|
10778
10808
|
}
|
|
10779
|
-
function
|
|
10809
|
+
function hb(t) {
|
|
10780
10810
|
for (let e = t.depth; e >= 0; e--) {
|
|
10781
10811
|
let n = t.index(e), r = t.node(e);
|
|
10782
10812
|
if (n == 0) {
|
|
@@ -10793,7 +10823,7 @@ function fb(t) {
|
|
|
10793
10823
|
}
|
|
10794
10824
|
return !0;
|
|
10795
10825
|
}
|
|
10796
|
-
function
|
|
10826
|
+
function mb(t) {
|
|
10797
10827
|
for (let e = t.depth; e >= 0; e--) {
|
|
10798
10828
|
let n = t.indexAfter(e), r = t.node(e);
|
|
10799
10829
|
if (n == r.childCount) {
|
|
@@ -10810,20 +10840,20 @@ function pb(t) {
|
|
|
10810
10840
|
}
|
|
10811
10841
|
return !0;
|
|
10812
10842
|
}
|
|
10813
|
-
function
|
|
10843
|
+
function gb() {
|
|
10814
10844
|
return new Z({
|
|
10815
10845
|
props: {
|
|
10816
|
-
decorations:
|
|
10846
|
+
decorations: vb,
|
|
10817
10847
|
createSelectionBetween(t, e, n) {
|
|
10818
10848
|
return e.pos == n.pos && re.valid(n) ? new re(n) : null;
|
|
10819
10849
|
},
|
|
10820
|
-
handleClick:
|
|
10821
|
-
handleKeyDown:
|
|
10822
|
-
handleDOMEvents: { beforeinput:
|
|
10850
|
+
handleClick: bb,
|
|
10851
|
+
handleKeyDown: yb,
|
|
10852
|
+
handleDOMEvents: { beforeinput: wb }
|
|
10823
10853
|
}
|
|
10824
10854
|
});
|
|
10825
10855
|
}
|
|
10826
|
-
const
|
|
10856
|
+
const yb = Ns({
|
|
10827
10857
|
ArrowLeft: Xr("horiz", -1),
|
|
10828
10858
|
ArrowRight: Xr("horiz", 1),
|
|
10829
10859
|
ArrowUp: Xr("vert", -1),
|
|
@@ -10842,7 +10872,7 @@ function Xr(t, e) {
|
|
|
10842
10872
|
return c ? (o && o(r.tr.setSelection(new re(c))), !0) : !1;
|
|
10843
10873
|
};
|
|
10844
10874
|
}
|
|
10845
|
-
function
|
|
10875
|
+
function bb(t, e, n) {
|
|
10846
10876
|
if (!t || !t.editable)
|
|
10847
10877
|
return !1;
|
|
10848
10878
|
let r = t.state.doc.resolve(e);
|
|
@@ -10851,7 +10881,7 @@ function gb(t, e, n) {
|
|
|
10851
10881
|
let o = t.posAtCoords({ left: n.clientX, top: n.clientY });
|
|
10852
10882
|
return o && o.inside > -1 && B.isSelectable(t.state.doc.nodeAt(o.inside)) ? !1 : (t.dispatch(t.state.tr.setSelection(new re(r))), !0);
|
|
10853
10883
|
}
|
|
10854
|
-
function
|
|
10884
|
+
function wb(t, e) {
|
|
10855
10885
|
if (e.inputType != "insertCompositionText" || !(t.state.selection instanceof re))
|
|
10856
10886
|
return !1;
|
|
10857
10887
|
let { $from: n } = t.state.selection, r = n.parent.contentMatchAt(n.index()).findWrapping(t.state.schema.nodes.text);
|
|
@@ -10863,17 +10893,17 @@ function yb(t, e) {
|
|
|
10863
10893
|
let i = t.state.tr.replace(n.pos, n.pos, new W(o, 0, 0));
|
|
10864
10894
|
return i.setSelection(H.near(i.doc.resolve(n.pos + 1))), t.dispatch(i), !1;
|
|
10865
10895
|
}
|
|
10866
|
-
function
|
|
10896
|
+
function vb(t) {
|
|
10867
10897
|
if (!(t.selection instanceof re))
|
|
10868
10898
|
return null;
|
|
10869
10899
|
let e = document.createElement("div");
|
|
10870
10900
|
return e.className = "ProseMirror-gapcursor", F.create(t.doc, [V.widget(t.selection.head, e, { key: "gapcursor" })]);
|
|
10871
10901
|
}
|
|
10872
|
-
const
|
|
10902
|
+
const kb = Q.create({
|
|
10873
10903
|
name: "gapCursor",
|
|
10874
10904
|
addPmPlugins() {
|
|
10875
10905
|
return [
|
|
10876
|
-
|
|
10906
|
+
gb()
|
|
10877
10907
|
];
|
|
10878
10908
|
},
|
|
10879
10909
|
extendNodeSchema(t) {
|
|
@@ -10885,7 +10915,7 @@ const wb = Q.create({
|
|
|
10885
10915
|
})) ?? null
|
|
10886
10916
|
};
|
|
10887
10917
|
}
|
|
10888
|
-
}),
|
|
10918
|
+
}), Cb = new G("collaboration"), Sb = Q.create({
|
|
10889
10919
|
name: "collaboration",
|
|
10890
10920
|
priority: 1e3,
|
|
10891
10921
|
addOptions() {
|
|
@@ -10899,9 +10929,9 @@ const wb = Q.create({
|
|
|
10899
10929
|
addPmPlugins() {
|
|
10900
10930
|
if (!this.editor.options.ydoc) return [];
|
|
10901
10931
|
this.options.ydoc = this.editor.options.ydoc;
|
|
10902
|
-
const t =
|
|
10903
|
-
|
|
10904
|
-
const [e, n] =
|
|
10932
|
+
const t = Mb();
|
|
10933
|
+
Ab(this.options.ydoc, this.editor), Ob(this.options.ydoc, this.editor, this);
|
|
10934
|
+
const [e, n] = xb(this.options.ydoc, this.editor);
|
|
10905
10935
|
this.options.fragment = n;
|
|
10906
10936
|
const r = this.options.ydoc.getMap("media");
|
|
10907
10937
|
return r.observe((o) => {
|
|
@@ -10930,14 +10960,14 @@ const wb = Q.create({
|
|
|
10930
10960
|
"Mod-y": () => this.editor.commands.redo()
|
|
10931
10961
|
};
|
|
10932
10962
|
}
|
|
10933
|
-
}),
|
|
10963
|
+
}), xb = (t, e) => {
|
|
10934
10964
|
const n = t.getXmlFragment("supereditor");
|
|
10935
10965
|
return [jm(n, { onFirstRender: () => {
|
|
10936
10966
|
if (!e.options.isNewFile) return;
|
|
10937
10967
|
const o = t.getMap("meta");
|
|
10938
10968
|
o.set("docx", e.options.content), o.set("fonts", e.options.fonts);
|
|
10939
10969
|
} }), n];
|
|
10940
|
-
},
|
|
10970
|
+
}, Mb = () => pg(), Ab = (t, e) => {
|
|
10941
10971
|
const n = t.getMap("meta");
|
|
10942
10972
|
n.observe((r) => {
|
|
10943
10973
|
const o = n.get("lockedBy"), i = n.get("locked");
|
|
@@ -10945,7 +10975,7 @@ const wb = Q.create({
|
|
|
10945
10975
|
const s = o?.email !== e.options.user?.email, a = e.options.editable !== !i;
|
|
10946
10976
|
!s || !a || (i ? console.debug("--- Locking editor ---", o, e.options.user) : console.debug("--- Unlocking editor ---", o), e.setEditable(!i), e.emit("locked", { editor: e, isLocked: i, lockedBy: o }));
|
|
10947
10977
|
});
|
|
10948
|
-
},
|
|
10978
|
+
}, Ob = (t, e, n) => {
|
|
10949
10979
|
const r = e.options.collaborationProvider;
|
|
10950
10980
|
if (!r) return;
|
|
10951
10981
|
const o = () => {
|
|
@@ -10958,7 +10988,7 @@ const wb = Q.create({
|
|
|
10958
10988
|
return;
|
|
10959
10989
|
}
|
|
10960
10990
|
r.on("synced", o);
|
|
10961
|
-
},
|
|
10991
|
+
}, Tb = Q.create({
|
|
10962
10992
|
name: "collaborationCursor",
|
|
10963
10993
|
priority: 999,
|
|
10964
10994
|
addOptions() {
|
|
@@ -10977,9 +11007,9 @@ const wb = Q.create({
|
|
|
10977
11007
|
},
|
|
10978
11008
|
addPmPlugins() {
|
|
10979
11009
|
const { collaborationProvider: t = null } = this.editor.options;
|
|
10980
|
-
return t ? [lg(t.awareness, { cursorBuilder:
|
|
11010
|
+
return t ? [lg(t.awareness, { cursorBuilder: Db })] : [];
|
|
10981
11011
|
}
|
|
10982
|
-
}),
|
|
11012
|
+
}), Db = (t) => {
|
|
10983
11013
|
const e = document.createElement("span");
|
|
10984
11014
|
e.classList.add("ProseMirror-yjs-cursor"), e.setAttribute("style", `border-color: ${t.color}`);
|
|
10985
11015
|
const n = document.createElement("div");
|
|
@@ -11005,7 +11035,7 @@ const wb = Q.create({
|
|
|
11005
11035
|
name: "text",
|
|
11006
11036
|
group: "inline",
|
|
11007
11037
|
inline: !0
|
|
11008
|
-
}),
|
|
11038
|
+
}), Nb = J.create({
|
|
11009
11039
|
name: "run",
|
|
11010
11040
|
group: "inline",
|
|
11011
11041
|
content: "text*",
|
|
@@ -11118,7 +11148,7 @@ const rl = /^\s*([-+*])\s$/, Qd = J.create({
|
|
|
11118
11148
|
];
|
|
11119
11149
|
}
|
|
11120
11150
|
});
|
|
11121
|
-
function
|
|
11151
|
+
function Eb(t = {}) {
|
|
11122
11152
|
return new Z({
|
|
11123
11153
|
key: new G("orderedListSync"),
|
|
11124
11154
|
appendTransaction: (e, n, r) => {
|
|
@@ -11155,16 +11185,16 @@ function Db(t = {}) {
|
|
|
11155
11185
|
}
|
|
11156
11186
|
});
|
|
11157
11187
|
}
|
|
11158
|
-
function
|
|
11188
|
+
function Ib() {
|
|
11159
11189
|
return Math.floor(Math.random() * 4294967295).toString();
|
|
11160
11190
|
}
|
|
11161
|
-
function
|
|
11191
|
+
function Pb(t) {
|
|
11162
11192
|
return new Z({
|
|
11163
11193
|
key: new G("orderedListMarker"),
|
|
11164
11194
|
appendTransaction: (e, n, r) => {
|
|
11165
11195
|
if (!(e.some((c) => c.docChanged) && !n.doc.eq(r.doc)))
|
|
11166
11196
|
return;
|
|
11167
|
-
let { doc: i, tr: s } = r, a =
|
|
11197
|
+
let { doc: i, tr: s } = r, a = Rb(r);
|
|
11168
11198
|
if (!a.size)
|
|
11169
11199
|
return;
|
|
11170
11200
|
let l = !1;
|
|
@@ -11174,14 +11204,14 @@ function Eb(t) {
|
|
|
11174
11204
|
u.node.attrs.syncId;
|
|
11175
11205
|
let h = u.node.childCount !== f.length;
|
|
11176
11206
|
if (p) {
|
|
11177
|
-
f.forEach((y) =>
|
|
11207
|
+
f.forEach((y) => Fb(s, y)), l = !0;
|
|
11178
11208
|
return;
|
|
11179
11209
|
}
|
|
11180
11210
|
if (h) {
|
|
11181
|
-
let y =
|
|
11211
|
+
let y = Lb({ state: r, list: u });
|
|
11182
11212
|
y.length && (f = y);
|
|
11183
11213
|
}
|
|
11184
|
-
let m = f[0], g =
|
|
11214
|
+
let m = f[0], g = Bb({ state: r, listItems: f }), b = eu(), w = {
|
|
11185
11215
|
lvlText: m.node.attrs.lvlText ?? b.lvlText,
|
|
11186
11216
|
listLevel: m.node.attrs.listLevel ?? b.listLevel,
|
|
11187
11217
|
listNumberingType: m.node.attrs.listNumberingType ?? b.listNumberingType
|
|
@@ -11213,7 +11243,7 @@ function Eb(t) {
|
|
|
11213
11243
|
}
|
|
11214
11244
|
});
|
|
11215
11245
|
}
|
|
11216
|
-
function
|
|
11246
|
+
function Rb(t) {
|
|
11217
11247
|
let { doc: e } = t, n = /* @__PURE__ */ new Map();
|
|
11218
11248
|
return e.descendants((r, o) => {
|
|
11219
11249
|
let { attrs: i } = r, s = r.type.name === "listItem", a = !!i.listLevel?.length, l = !!i.lvlText, c = i.listNumberingType && i.listNumberingType !== "bullet";
|
|
@@ -11223,7 +11253,7 @@ function Ib(t) {
|
|
|
11223
11253
|
}
|
|
11224
11254
|
}), n;
|
|
11225
11255
|
}
|
|
11226
|
-
function
|
|
11256
|
+
function Lb({ state: t, list: e }) {
|
|
11227
11257
|
let { doc: n } = t, r = [];
|
|
11228
11258
|
return n.descendants((o, i) => {
|
|
11229
11259
|
let s = o.type.name === "listItem", a = n.resolve(i);
|
|
@@ -11237,7 +11267,7 @@ function eu({ lvlText: t = "", listLevel: e = [], listNumberingType: n = "decima
|
|
|
11237
11267
|
listNumberingType: n
|
|
11238
11268
|
};
|
|
11239
11269
|
}
|
|
11240
|
-
function
|
|
11270
|
+
function Fb(t, e) {
|
|
11241
11271
|
let { pos: n, node: r } = e;
|
|
11242
11272
|
t.setNodeMarkup(n, void 0, {
|
|
11243
11273
|
...r.attrs,
|
|
@@ -11249,7 +11279,7 @@ function Rb(t, e) {
|
|
|
11249
11279
|
function ol(t, e) {
|
|
11250
11280
|
return t.length === e.length && t.every((n, r) => n === e[r]);
|
|
11251
11281
|
}
|
|
11252
|
-
function
|
|
11282
|
+
function Bb({ state: t, listItems: e }) {
|
|
11253
11283
|
let { doc: n } = t, r = e[0], { lvlText: o, listLevel: i, listNumberingType: s } = r.node.attrs, a = eu({
|
|
11254
11284
|
lvlText: "%1.",
|
|
11255
11285
|
listLevel: [1],
|
|
@@ -11384,7 +11414,7 @@ const il = /^(\d+)\.\s$/, tu = J.create({
|
|
|
11384
11414
|
return !1;
|
|
11385
11415
|
let { $from: p } = r.selection, h = r.doc.nodeAt(f), m = p.after(), g = r.doc.nodeAt(m), b = h?.type.name === this.name, w = g?.type.name === this.name;
|
|
11386
11416
|
if (b && w) {
|
|
11387
|
-
let C = h.attrs.order || 1, y = h.childCount, S = h.attrs.syncId, k = y + C, A = S ||
|
|
11417
|
+
let C = h.attrs.order || 1, y = h.childCount, S = h.attrs.syncId, k = y + C, A = S || Ib();
|
|
11388
11418
|
r.setNodeMarkup(m, void 0, {
|
|
11389
11419
|
...g.attrs,
|
|
11390
11420
|
order: k,
|
|
@@ -11406,7 +11436,7 @@ const il = /^(\d+)\.\s$/, tu = J.create({
|
|
|
11406
11436
|
};
|
|
11407
11437
|
},
|
|
11408
11438
|
addPmPlugins() {
|
|
11409
|
-
return [
|
|
11439
|
+
return [Pb(this.editor), Eb()];
|
|
11410
11440
|
},
|
|
11411
11441
|
addInputRules() {
|
|
11412
11442
|
let t = Mo({
|
|
@@ -11427,19 +11457,19 @@ const il = /^(\d+)\.\s$/, tu = J.create({
|
|
|
11427
11457
|
t
|
|
11428
11458
|
];
|
|
11429
11459
|
}
|
|
11430
|
-
}),
|
|
11431
|
-
const r =
|
|
11460
|
+
}), zb = ({ listLevel: t, lvlText: e, listNumberingType: n }) => {
|
|
11461
|
+
const r = Hb[n];
|
|
11432
11462
|
return r ? r(t, e) : null;
|
|
11433
|
-
},
|
|
11434
|
-
decimal:
|
|
11435
|
-
lowerRoman:
|
|
11463
|
+
}, _b = (t, e) => $s(t, e, String), nu = (t, e) => $s(t, e, Wb), Vb = (t, e) => nu(t, e).toLowerCase(), $b = (t, e) => ru(t, e).toLowerCase(), ru = (t, e) => $s(t, e, (n) => Ub(n)), Hb = {
|
|
11464
|
+
decimal: _b,
|
|
11465
|
+
lowerRoman: Vb,
|
|
11436
11466
|
upperRoman: nu,
|
|
11437
|
-
lowerLetter:
|
|
11467
|
+
lowerLetter: $b,
|
|
11438
11468
|
upperLetter: ru
|
|
11439
|
-
},
|
|
11469
|
+
}, jb = (t, e) => t.reduce((n, r, o) => n.replace(`%${o + 1}`, r), e), $s = (t, e, n) => {
|
|
11440
11470
|
const r = t.map(n);
|
|
11441
|
-
return
|
|
11442
|
-
},
|
|
11471
|
+
return jb(r, e);
|
|
11472
|
+
}, Wb = (t) => {
|
|
11443
11473
|
const e = [
|
|
11444
11474
|
{ value: 1e3, numeral: "M" },
|
|
11445
11475
|
{ value: 900, numeral: "CM" },
|
|
@@ -11460,7 +11490,7 @@ const il = /^(\d+)\.\s$/, tu = J.create({
|
|
|
11460
11490
|
for (; t >= r; )
|
|
11461
11491
|
n += o, t -= r;
|
|
11462
11492
|
return n;
|
|
11463
|
-
},
|
|
11493
|
+
}, Ub = (t) => {
|
|
11464
11494
|
let e = "";
|
|
11465
11495
|
const n = "ABCDEFGHIJKLMNOPQRSTUVWXYZ";
|
|
11466
11496
|
for (; t > 0; ) {
|
|
@@ -11469,7 +11499,7 @@ const il = /^(\d+)\.\s$/, tu = J.create({
|
|
|
11469
11499
|
}
|
|
11470
11500
|
return e;
|
|
11471
11501
|
};
|
|
11472
|
-
function
|
|
11502
|
+
function qb(t = {}) {
|
|
11473
11503
|
return new Z({
|
|
11474
11504
|
key: new G("styledListMarker"),
|
|
11475
11505
|
state: {
|
|
@@ -11502,11 +11532,11 @@ function sl(t, e = []) {
|
|
|
11502
11532
|
let i = Bs(n, (s) => s.type.name === "listItem");
|
|
11503
11533
|
return i.length && i.forEach(({ node: s, pos: a }) => {
|
|
11504
11534
|
let l = St("textStyle", n.type.schema), c = [...e.filter((b) => b.type === l)];
|
|
11505
|
-
if (
|
|
11535
|
+
if (Xb(s) && e.length) {
|
|
11506
11536
|
const b = e.filter((w) => w.type === l);
|
|
11507
11537
|
c.push(...b);
|
|
11508
11538
|
} else {
|
|
11509
|
-
const b =
|
|
11539
|
+
const b = Kb(s, n, l);
|
|
11510
11540
|
c.push(...b);
|
|
11511
11541
|
}
|
|
11512
11542
|
let u = null, f = null;
|
|
@@ -11544,7 +11574,7 @@ function al(t) {
|
|
|
11544
11574
|
n.push(a);
|
|
11545
11575
|
}), n;
|
|
11546
11576
|
}
|
|
11547
|
-
function
|
|
11577
|
+
function Kb(t, e, n) {
|
|
11548
11578
|
let r = [];
|
|
11549
11579
|
return t.forEach((o) => {
|
|
11550
11580
|
o.type.name === "paragraph" && o.forEach((i) => {
|
|
@@ -11556,7 +11586,7 @@ function Ub(t, e, n) {
|
|
|
11556
11586
|
});
|
|
11557
11587
|
}), r;
|
|
11558
11588
|
}
|
|
11559
|
-
function
|
|
11589
|
+
function Xb(t) {
|
|
11560
11590
|
return t.childCount === 1 && t.firstChild?.type.name === "paragraph" && t.firstChild?.content.size === 0;
|
|
11561
11591
|
}
|
|
11562
11592
|
const ou = J.create({
|
|
@@ -11587,7 +11617,7 @@ const ou = J.create({
|
|
|
11587
11617
|
let { listLevel: e, listNumberingType: n, lvlText: r } = t;
|
|
11588
11618
|
if (!!!e?.length || !r)
|
|
11589
11619
|
return {};
|
|
11590
|
-
let i =
|
|
11620
|
+
let i = zb({
|
|
11591
11621
|
listLevel: e,
|
|
11592
11622
|
lvlText: r,
|
|
11593
11623
|
listNumberingType: n
|
|
@@ -11679,12 +11709,12 @@ const ou = J.create({
|
|
|
11679
11709
|
};
|
|
11680
11710
|
},
|
|
11681
11711
|
addPmPlugins() {
|
|
11682
|
-
return [
|
|
11712
|
+
return [qb()];
|
|
11683
11713
|
}
|
|
11684
|
-
}), io = new G("linkedStyles"),
|
|
11714
|
+
}), io = new G("linkedStyles"), Jb = Q.create({
|
|
11685
11715
|
name: "linkedStyles",
|
|
11686
11716
|
addPmPlugins() {
|
|
11687
|
-
return [
|
|
11717
|
+
return [Yb(this.editor)];
|
|
11688
11718
|
},
|
|
11689
11719
|
addCommands() {
|
|
11690
11720
|
return {
|
|
@@ -11704,7 +11734,7 @@ const ou = J.create({
|
|
|
11704
11734
|
}
|
|
11705
11735
|
};
|
|
11706
11736
|
}
|
|
11707
|
-
}),
|
|
11737
|
+
}), Yb = (t) => new Z({
|
|
11708
11738
|
key: io,
|
|
11709
11739
|
state: {
|
|
11710
11740
|
init(e, { doc: n, selection: r }) {
|
|
@@ -11736,14 +11766,14 @@ const ou = J.create({
|
|
|
11736
11766
|
return t.descendants((o, i) => {
|
|
11737
11767
|
const { name: s } = o.type;
|
|
11738
11768
|
if (o?.attrs?.styleId && (r = o.attrs.styleId), s === "paragraph" && !o.attrs?.styleId && (r = null), s !== "text") return;
|
|
11739
|
-
const a =
|
|
11769
|
+
const a = Zb(r, e);
|
|
11740
11770
|
if (!a) return;
|
|
11741
|
-
const l =
|
|
11771
|
+
const l = Gb(a, o);
|
|
11742
11772
|
if (!l) return;
|
|
11743
11773
|
const c = V.inline(i, i + o.nodeSize, { style: l });
|
|
11744
11774
|
n.push(c);
|
|
11745
11775
|
}), F.create(t, n);
|
|
11746
|
-
},
|
|
11776
|
+
}, Gb = (t, e, n = !0) => {
|
|
11747
11777
|
if (!t?.definition?.styles) return "";
|
|
11748
11778
|
const r = {};
|
|
11749
11779
|
return Object.entries(t.definition.styles).forEach(([o, i]) => {
|
|
@@ -11759,7 +11789,7 @@ const ou = J.create({
|
|
|
11759
11789
|
a.push({ key: c.type.name, value: c.attrs[s] });
|
|
11760
11790
|
}), !a.find((c) => c.key === s))
|
|
11761
11791
|
if (s === "spacing" && n) {
|
|
11762
|
-
const c =
|
|
11792
|
+
const c = Qb(i);
|
|
11763
11793
|
Object.entries(c).forEach(([d, u]) => {
|
|
11764
11794
|
r[d] = u;
|
|
11765
11795
|
});
|
|
@@ -11768,20 +11798,20 @@ const ou = J.create({
|
|
|
11768
11798
|
c && (r["margin-left"] = c + "px"), d && (r["margin-right"] = d + "px"), u && (r["text-indent"] = u + "px");
|
|
11769
11799
|
} else s === "bold" ? r["font-weight"] = "bold" : r[s] = i;
|
|
11770
11800
|
}), Object.entries(r).map(([o, i]) => `${o}: ${i}`).join(";");
|
|
11771
|
-
},
|
|
11801
|
+
}, Zb = (t, e = []) => e.find((n) => n.id === t), Qb = (t) => {
|
|
11772
11802
|
const { lineSpaceBefore: e, lineSpaceAfter: n, line: r } = t;
|
|
11773
11803
|
return {
|
|
11774
11804
|
"margin-top": e + "px",
|
|
11775
11805
|
"margin-bottom": n + "px",
|
|
11776
11806
|
...ys(r, "")
|
|
11777
11807
|
};
|
|
11778
|
-
},
|
|
11808
|
+
}, e0 = (t) => {
|
|
11779
11809
|
const { lineSpaceBefore: e, lineSpaceAfter: n } = t;
|
|
11780
11810
|
return `
|
|
11781
11811
|
${e ? `margin-top: ${e}px;` : ""}
|
|
11782
11812
|
${n ? `margin-bottom: ${n}px;` : ""}
|
|
11783
11813
|
`.trim();
|
|
11784
|
-
},
|
|
11814
|
+
}, t0 = (t) => {
|
|
11785
11815
|
let e = "";
|
|
11786
11816
|
for (const n of t)
|
|
11787
11817
|
switch (n.type) {
|
|
@@ -11802,7 +11832,7 @@ const ou = J.create({
|
|
|
11802
11832
|
e += `${r ? `font-family: ${r};` : ""} ${o ? `font-size: ${o};` : ""}`;
|
|
11803
11833
|
}
|
|
11804
11834
|
return e.trim();
|
|
11805
|
-
},
|
|
11835
|
+
}, qk = (t) => t?.converter ? (t.converter.linkedStyles || []).filter((n) => n.type === "paragraph" && n.definition.attrs).sort((n, r) => n.definition.attrs?.name.localeCompare(r.definition.attrs?.name)) : [], iu = J.create({
|
|
11806
11836
|
name: "paragraph",
|
|
11807
11837
|
priority: 1e3,
|
|
11808
11838
|
group: "block",
|
|
@@ -11819,7 +11849,7 @@ const ou = J.create({
|
|
|
11819
11849
|
renderDOM: (t) => {
|
|
11820
11850
|
const { spacing: e } = t;
|
|
11821
11851
|
if (!e) return {};
|
|
11822
|
-
const n =
|
|
11852
|
+
const n = e0(e);
|
|
11823
11853
|
return n ? { style: n } : {};
|
|
11824
11854
|
}
|
|
11825
11855
|
},
|
|
@@ -11837,7 +11867,7 @@ const ou = J.create({
|
|
|
11837
11867
|
renderDOM: (t) => {
|
|
11838
11868
|
const { marksAttrs: e } = t;
|
|
11839
11869
|
if (!e?.length) return {};
|
|
11840
|
-
const n =
|
|
11870
|
+
const n = t0(e);
|
|
11841
11871
|
return n ? { style: n } : {};
|
|
11842
11872
|
}
|
|
11843
11873
|
},
|
|
@@ -11917,7 +11947,7 @@ const ou = J.create({
|
|
|
11917
11947
|
{}
|
|
11918
11948
|
);
|
|
11919
11949
|
}
|
|
11920
|
-
}),
|
|
11950
|
+
}), n0 = J.create({
|
|
11921
11951
|
name: "commentRangeStart",
|
|
11922
11952
|
group: "inline",
|
|
11923
11953
|
inline: !0,
|
|
@@ -11948,7 +11978,7 @@ const ou = J.create({
|
|
|
11948
11978
|
}
|
|
11949
11979
|
};
|
|
11950
11980
|
}
|
|
11951
|
-
}),
|
|
11981
|
+
}), r0 = J.create({
|
|
11952
11982
|
name: "commentRangeEnd",
|
|
11953
11983
|
group: "inline",
|
|
11954
11984
|
inline: !0,
|
|
@@ -11975,7 +12005,7 @@ const ou = J.create({
|
|
|
11975
12005
|
}
|
|
11976
12006
|
};
|
|
11977
12007
|
}
|
|
11978
|
-
}),
|
|
12008
|
+
}), o0 = J.create({
|
|
11979
12009
|
name: "commentReference",
|
|
11980
12010
|
group: "inline",
|
|
11981
12011
|
inline: !0,
|
|
@@ -12002,7 +12032,7 @@ const ou = J.create({
|
|
|
12002
12032
|
}
|
|
12003
12033
|
};
|
|
12004
12034
|
}
|
|
12005
|
-
}),
|
|
12035
|
+
}), i0 = Le.create({
|
|
12006
12036
|
name: Pe,
|
|
12007
12037
|
group: "comments",
|
|
12008
12038
|
excludes: "",
|
|
@@ -12027,7 +12057,7 @@ const ou = J.create({
|
|
|
12027
12057
|
renderDOM({ htmlAttributes: t }) {
|
|
12028
12058
|
return [Pe, N.mergeAttributes(this.options.htmlAttributes, t)];
|
|
12029
12059
|
}
|
|
12030
|
-
}),
|
|
12060
|
+
}), s0 = J.create({
|
|
12031
12061
|
name: "tab",
|
|
12032
12062
|
group: "inline",
|
|
12033
12063
|
inline: !0,
|
|
@@ -12091,21 +12121,21 @@ const ou = J.create({
|
|
|
12091
12121
|
try {
|
|
12092
12122
|
t.doc.nodesBetween(o - s - 1, o - 1, (d, u) => {
|
|
12093
12123
|
if (d.isText && d.textContent !== " ") {
|
|
12094
|
-
const f =
|
|
12124
|
+
const f = a0(e, u);
|
|
12095
12125
|
a += f;
|
|
12096
12126
|
}
|
|
12097
12127
|
});
|
|
12098
12128
|
} catch {
|
|
12099
12129
|
return;
|
|
12100
12130
|
}
|
|
12101
|
-
const l = i.nodeBefore?.type.name === "tab" ? ci : ci - a % ci, c =
|
|
12131
|
+
const l = i.nodeBefore?.type.name === "tab" ? ci : ci - a % ci, c = l0(i);
|
|
12102
12132
|
n.push(
|
|
12103
12133
|
V.node(o, o + r.nodeSize, { style: `width: ${l}px; height: ${c};` })
|
|
12104
12134
|
);
|
|
12105
12135
|
}
|
|
12106
12136
|
}), n;
|
|
12107
12137
|
};
|
|
12108
|
-
function
|
|
12138
|
+
function a0(t, e) {
|
|
12109
12139
|
const n = t.nodeDOM(e);
|
|
12110
12140
|
if (n) {
|
|
12111
12141
|
const r = document.createRange();
|
|
@@ -12113,7 +12143,7 @@ function i0(t, e) {
|
|
|
12113
12143
|
}
|
|
12114
12144
|
return 0;
|
|
12115
12145
|
}
|
|
12116
|
-
function
|
|
12146
|
+
function l0(t) {
|
|
12117
12147
|
const i = t.node(1).firstChild.marks.find((a) => a.type.name === "textStyle");
|
|
12118
12148
|
return `${(parseInt(i?.attrs.fontSize) * 1.333 || 16) * 1.1}px`;
|
|
12119
12149
|
}
|
|
@@ -12147,7 +12177,7 @@ const au = J.create({
|
|
|
12147
12177
|
renderDOM({ htmlAttributes: t }) {
|
|
12148
12178
|
return ["span", N.mergeAttributes(this.options.htmlAttributes, t)];
|
|
12149
12179
|
}
|
|
12150
|
-
}),
|
|
12180
|
+
}), c0 = ({ editor: t }) => class {
|
|
12151
12181
|
constructor(n, r) {
|
|
12152
12182
|
P(this, "editor");
|
|
12153
12183
|
P(this, "node");
|
|
@@ -12225,7 +12255,7 @@ const pl = (t, e = null) => e ? t.createChecked(null, e) : t.createAndFill(), cu
|
|
|
12225
12255
|
right: { size: t, color: e },
|
|
12226
12256
|
insideH: { size: t, color: e },
|
|
12227
12257
|
insideV: { size: t, color: e }
|
|
12228
|
-
}),
|
|
12258
|
+
}), d0 = (t, e, n, r, o = null) => {
|
|
12229
12259
|
const i = {
|
|
12230
12260
|
table: le("table", t),
|
|
12231
12261
|
tableRow: le("tableRow", t),
|
|
@@ -12338,13 +12368,13 @@ var oe = class {
|
|
|
12338
12368
|
}
|
|
12339
12369
|
// Find the table map for the given table node.
|
|
12340
12370
|
static get(t) {
|
|
12341
|
-
return ns(t) || rs(t,
|
|
12371
|
+
return ns(t) || rs(t, u0(t));
|
|
12342
12372
|
}
|
|
12343
12373
|
};
|
|
12344
|
-
function
|
|
12374
|
+
function u0(t) {
|
|
12345
12375
|
if (t.type.spec.tableRole != "table")
|
|
12346
12376
|
throw new RangeError("Not a table node: " + t.type.name);
|
|
12347
|
-
const e =
|
|
12377
|
+
const e = f0(t), n = t.childCount, r = [];
|
|
12348
12378
|
let o = 0, i = null;
|
|
12349
12379
|
const s = [];
|
|
12350
12380
|
for (let c = 0, d = e * n; c < d; c++) r[c] = 0;
|
|
@@ -12391,9 +12421,9 @@ function c0(t) {
|
|
|
12391
12421
|
let l = !1;
|
|
12392
12422
|
for (let c = 0; !l && c < s.length; c += 2)
|
|
12393
12423
|
s[c] != null && s[c + 1] < n && (l = !0);
|
|
12394
|
-
return l &&
|
|
12424
|
+
return l && p0(a, s, t), a;
|
|
12395
12425
|
}
|
|
12396
|
-
function
|
|
12426
|
+
function f0(t) {
|
|
12397
12427
|
let e = -1, n = !1;
|
|
12398
12428
|
for (let r = 0; r < t.childCount; r++) {
|
|
12399
12429
|
const o = t.child(r);
|
|
@@ -12414,7 +12444,7 @@ function d0(t) {
|
|
|
12414
12444
|
}
|
|
12415
12445
|
return e;
|
|
12416
12446
|
}
|
|
12417
|
-
function
|
|
12447
|
+
function p0(t, e, n) {
|
|
12418
12448
|
t.problems || (t.problems = []);
|
|
12419
12449
|
const r = {};
|
|
12420
12450
|
for (let o = 0; o < t.map.length; o++) {
|
|
@@ -12428,7 +12458,7 @@ function u0(t, e, n) {
|
|
|
12428
12458
|
const l = s.attrs;
|
|
12429
12459
|
for (let c = 0; c < l.colspan; c++) {
|
|
12430
12460
|
const d = (o + c) % t.width, u = e[d * 2];
|
|
12431
|
-
u != null && (!l.colwidth || l.colwidth[c] != u) && ((a || (a =
|
|
12461
|
+
u != null && (!l.colwidth || l.colwidth[c] != u) && ((a || (a = h0(l)))[c] = u);
|
|
12432
12462
|
}
|
|
12433
12463
|
a && t.problems.unshift({
|
|
12434
12464
|
type: "colwidth mismatch",
|
|
@@ -12437,7 +12467,7 @@ function u0(t, e, n) {
|
|
|
12437
12467
|
});
|
|
12438
12468
|
}
|
|
12439
12469
|
}
|
|
12440
|
-
function
|
|
12470
|
+
function h0(t) {
|
|
12441
12471
|
if (t.colwidth) return t.colwidth.slice();
|
|
12442
12472
|
const e = [];
|
|
12443
12473
|
for (let n = 0; n < t.colspan; n++) e.push(0);
|
|
@@ -12461,7 +12491,7 @@ function $n(t) {
|
|
|
12461
12491
|
return t.node(0).resolve(t.before(e + 1));
|
|
12462
12492
|
return null;
|
|
12463
12493
|
}
|
|
12464
|
-
function
|
|
12494
|
+
function m0(t) {
|
|
12465
12495
|
for (let e = t.depth; e > 0; e--) {
|
|
12466
12496
|
const n = t.node(e).type.spec.tableRole;
|
|
12467
12497
|
if (n === "cell" || n === "header_cell") return t.node(e);
|
|
@@ -12480,12 +12510,12 @@ function zo(t) {
|
|
|
12480
12510
|
return e.$anchorCell.pos > e.$headCell.pos ? e.$anchorCell : e.$headCell;
|
|
12481
12511
|
if ("node" in e && e.node && e.node.type.spec.tableRole == "cell")
|
|
12482
12512
|
return e.$anchor;
|
|
12483
|
-
const n = $n(e.$head) ||
|
|
12513
|
+
const n = $n(e.$head) || g0(e.$head);
|
|
12484
12514
|
if (n)
|
|
12485
12515
|
return n;
|
|
12486
12516
|
throw new RangeError(`No cell found around position ${e.head}`);
|
|
12487
12517
|
}
|
|
12488
|
-
function
|
|
12518
|
+
function g0(t) {
|
|
12489
12519
|
for (let e = t.nodeAfter, n = t.pos; e; e = e.firstChild, n++) {
|
|
12490
12520
|
const r = e.type.spec.tableRole;
|
|
12491
12521
|
if (r == "cell" || r == "header_cell") return t.doc.resolve(n);
|
|
@@ -12499,7 +12529,7 @@ function h0(t) {
|
|
|
12499
12529
|
function is(t) {
|
|
12500
12530
|
return t.parent.type.spec.tableRole == "row" && !!t.nodeAfter;
|
|
12501
12531
|
}
|
|
12502
|
-
function
|
|
12532
|
+
function y0(t) {
|
|
12503
12533
|
return t.node(0).resolve(t.pos + t.nodeAfter.nodeSize);
|
|
12504
12534
|
}
|
|
12505
12535
|
function Hs(t, e) {
|
|
@@ -12509,7 +12539,7 @@ function du(t, e, n) {
|
|
|
12509
12539
|
const r = t.node(-1), o = oe.get(r), i = t.start(-1), s = o.nextCell(t.pos - i, e, n);
|
|
12510
12540
|
return s == null ? null : t.node(0).resolve(i + s);
|
|
12511
12541
|
}
|
|
12512
|
-
function
|
|
12542
|
+
function dn(t, e, n = 1) {
|
|
12513
12543
|
const r = { ...t, colspan: t.colspan - n };
|
|
12514
12544
|
return r.colwidth && (r.colwidth = r.colwidth.slice(), r.colwidth.splice(e, n), r.colwidth.some((o) => o > 0) || (r.colwidth = null)), r;
|
|
12515
12545
|
}
|
|
@@ -12521,7 +12551,7 @@ function uu(t, e, n = 1) {
|
|
|
12521
12551
|
}
|
|
12522
12552
|
return r;
|
|
12523
12553
|
}
|
|
12524
|
-
function
|
|
12554
|
+
function b0(t, e, n) {
|
|
12525
12555
|
const r = we(e.type.schema).header_cell;
|
|
12526
12556
|
for (let o = 0; o < t.height; o++)
|
|
12527
12557
|
if (e.nodeAt(t.map[n + o * t.width]).type != r)
|
|
@@ -12579,7 +12609,7 @@ var X = class ht extends Y {
|
|
|
12579
12609
|
const m = o.left - p.left, g = p.right - o.right;
|
|
12580
12610
|
if (m > 0 || g > 0) {
|
|
12581
12611
|
let b = h.attrs;
|
|
12582
|
-
if (m > 0 && (b =
|
|
12612
|
+
if (m > 0 && (b = dn(b, 0, m)), g > 0 && (b = dn(
|
|
12583
12613
|
b,
|
|
12584
12614
|
b.colspan - g,
|
|
12585
12615
|
g
|
|
@@ -12689,12 +12719,12 @@ var X = class ht extends Y {
|
|
|
12689
12719
|
return new ht(e.resolve(n), e.resolve(r));
|
|
12690
12720
|
}
|
|
12691
12721
|
getBookmark() {
|
|
12692
|
-
return new
|
|
12722
|
+
return new w0(this.$anchorCell.pos, this.$headCell.pos);
|
|
12693
12723
|
}
|
|
12694
12724
|
};
|
|
12695
12725
|
X.prototype.visible = !1;
|
|
12696
12726
|
Y.jsonID("cell", X);
|
|
12697
|
-
var
|
|
12727
|
+
var w0 = class fu {
|
|
12698
12728
|
constructor(e, n) {
|
|
12699
12729
|
this.anchor = e, this.head = n;
|
|
12700
12730
|
}
|
|
@@ -12706,7 +12736,7 @@ var y0 = class fu {
|
|
|
12706
12736
|
return n.parent.type.spec.tableRole == "row" && r.parent.type.spec.tableRole == "row" && n.index() < n.parent.childCount && r.index() < r.parent.childCount && Hs(n, r) ? new X(n, r) : Y.near(r, 1);
|
|
12707
12737
|
}
|
|
12708
12738
|
};
|
|
12709
|
-
function
|
|
12739
|
+
function v0(t) {
|
|
12710
12740
|
if (!(t.selection instanceof X)) return null;
|
|
12711
12741
|
const e = [];
|
|
12712
12742
|
return t.selection.forEachCell((n, r) => {
|
|
@@ -12715,7 +12745,7 @@ function b0(t) {
|
|
|
12715
12745
|
);
|
|
12716
12746
|
}), F.create(t.doc, e);
|
|
12717
12747
|
}
|
|
12718
|
-
function
|
|
12748
|
+
function k0({ $from: t, $to: e }) {
|
|
12719
12749
|
if (t.pos == e.pos || t.pos < e.pos - 6) return !1;
|
|
12720
12750
|
let n = t.pos, r = e.pos, o = t.depth;
|
|
12721
12751
|
for (; o >= 0 && !(t.after(o + 1) < t.end(o)); o--, n++)
|
|
@@ -12724,7 +12754,7 @@ function w0({ $from: t, $to: e }) {
|
|
|
12724
12754
|
;
|
|
12725
12755
|
return n == r && /row|table/.test(t.node(o).type.spec.tableRole);
|
|
12726
12756
|
}
|
|
12727
|
-
function
|
|
12757
|
+
function C0({ $from: t, $to: e }) {
|
|
12728
12758
|
let n, r;
|
|
12729
12759
|
for (let o = t.depth; o > 0; o--) {
|
|
12730
12760
|
const i = t.node(o);
|
|
@@ -12742,7 +12772,7 @@ function v0({ $from: t, $to: e }) {
|
|
|
12742
12772
|
}
|
|
12743
12773
|
return n !== r && e.parentOffset === 0;
|
|
12744
12774
|
}
|
|
12745
|
-
function
|
|
12775
|
+
function S0(t, e, n) {
|
|
12746
12776
|
const r = (e || t).selection, o = (e || t).doc;
|
|
12747
12777
|
let i, s;
|
|
12748
12778
|
if (r instanceof B && (s = r.node.type.spec.tableRole)) {
|
|
@@ -12755,10 +12785,10 @@ function k0(t, e, n) {
|
|
|
12755
12785
|
const a = oe.get(r.node), l = r.from + 1, c = l + a.map[a.width * a.height - 1];
|
|
12756
12786
|
i = X.create(o, l + 1, c);
|
|
12757
12787
|
}
|
|
12758
|
-
} else r instanceof H &&
|
|
12788
|
+
} else r instanceof H && k0(r) ? i = H.create(o, r.from) : r instanceof H && C0(r) && (i = H.create(o, r.$from.start(), r.$from.end()));
|
|
12759
12789
|
return i && (e || (e = t.tr)).setSelection(i), e;
|
|
12760
12790
|
}
|
|
12761
|
-
var
|
|
12791
|
+
var x0 = new G("fix-tables");
|
|
12762
12792
|
function pu(t, e, n, r) {
|
|
12763
12793
|
const o = t.childCount, i = e.childCount;
|
|
12764
12794
|
e: for (let s = 0, a = 0; s < i; s++) {
|
|
@@ -12774,11 +12804,11 @@ function pu(t, e, n, r) {
|
|
|
12774
12804
|
function hu(t, e) {
|
|
12775
12805
|
let n;
|
|
12776
12806
|
const r = (o, i) => {
|
|
12777
|
-
o.type.spec.tableRole == "table" && (n =
|
|
12807
|
+
o.type.spec.tableRole == "table" && (n = M0(t, o, i, n));
|
|
12778
12808
|
};
|
|
12779
12809
|
return e ? e.doc != t.doc && pu(e.doc, t.doc, 0, r) : t.doc.descendants(r), n;
|
|
12780
12810
|
}
|
|
12781
|
-
function
|
|
12811
|
+
function M0(t, e, n, r) {
|
|
12782
12812
|
const o = oe.get(e);
|
|
12783
12813
|
if (!o.problems) return r;
|
|
12784
12814
|
r || (r = t.tr);
|
|
@@ -12794,7 +12824,7 @@ function S0(t, e, n, r) {
|
|
|
12794
12824
|
r.setNodeMarkup(
|
|
12795
12825
|
r.mapping.map(n + 1 + c.pos),
|
|
12796
12826
|
null,
|
|
12797
|
-
|
|
12827
|
+
dn(u, u.colspan - c.n, c.n)
|
|
12798
12828
|
);
|
|
12799
12829
|
} else if (c.type == "missing")
|
|
12800
12830
|
i[c.row] += c.n;
|
|
@@ -12835,7 +12865,7 @@ function S0(t, e, n, r) {
|
|
|
12835
12865
|
}
|
|
12836
12866
|
c = u;
|
|
12837
12867
|
}
|
|
12838
|
-
return r.setMeta(
|
|
12868
|
+
return r.setMeta(x0, { fixTables: !0 });
|
|
12839
12869
|
}
|
|
12840
12870
|
function at(t) {
|
|
12841
12871
|
const e = t.selection, n = zo(t), r = n.node(-1), o = n.start(-1), i = oe.get(r);
|
|
@@ -12846,7 +12876,7 @@ function at(t) {
|
|
|
12846
12876
|
}
|
|
12847
12877
|
function mu(t, { map: e, tableStart: n, table: r }, o) {
|
|
12848
12878
|
let i = o > 0 ? -1 : 0;
|
|
12849
|
-
|
|
12879
|
+
b0(e, r, o + i) && (i = o == 0 || o == e.width ? null : 0);
|
|
12850
12880
|
for (let s = 0; s < e.height; s++) {
|
|
12851
12881
|
const a = s * e.width + o;
|
|
12852
12882
|
if (o > 0 && o < e.width && e.map[a - 1] == e.map[a]) {
|
|
@@ -12863,7 +12893,7 @@ function mu(t, { map: e, tableStart: n, table: r }, o) {
|
|
|
12863
12893
|
}
|
|
12864
12894
|
return t;
|
|
12865
12895
|
}
|
|
12866
|
-
function
|
|
12896
|
+
function A0(t, e) {
|
|
12867
12897
|
if (!Ye(t)) return !1;
|
|
12868
12898
|
if (e) {
|
|
12869
12899
|
const n = at(t);
|
|
@@ -12871,7 +12901,7 @@ function x0(t, e) {
|
|
|
12871
12901
|
}
|
|
12872
12902
|
return !0;
|
|
12873
12903
|
}
|
|
12874
|
-
function
|
|
12904
|
+
function O0(t, e) {
|
|
12875
12905
|
if (!Ye(t)) return !1;
|
|
12876
12906
|
if (e) {
|
|
12877
12907
|
const n = at(t);
|
|
@@ -12879,7 +12909,7 @@ function M0(t, e) {
|
|
|
12879
12909
|
}
|
|
12880
12910
|
return !0;
|
|
12881
12911
|
}
|
|
12882
|
-
function
|
|
12912
|
+
function T0(t, { map: e, table: n, tableStart: r }, o) {
|
|
12883
12913
|
const i = t.mapping.maps.length;
|
|
12884
12914
|
for (let s = 0; s < e.height; ) {
|
|
12885
12915
|
const a = s * e.width + o, l = e.map[a], c = n.nodeAt(l), d = c.attrs;
|
|
@@ -12887,7 +12917,7 @@ function A0(t, { map: e, table: n, tableStart: r }, o) {
|
|
|
12887
12917
|
t.setNodeMarkup(
|
|
12888
12918
|
t.mapping.slice(i).map(r + l),
|
|
12889
12919
|
null,
|
|
12890
|
-
|
|
12920
|
+
dn(d, o - e.colCount(l))
|
|
12891
12921
|
);
|
|
12892
12922
|
else {
|
|
12893
12923
|
const u = t.mapping.slice(i).map(r + l);
|
|
@@ -12896,12 +12926,12 @@ function A0(t, { map: e, table: n, tableStart: r }, o) {
|
|
|
12896
12926
|
s += d.rowspan;
|
|
12897
12927
|
}
|
|
12898
12928
|
}
|
|
12899
|
-
function
|
|
12929
|
+
function D0(t, e) {
|
|
12900
12930
|
if (!Ye(t)) return !1;
|
|
12901
12931
|
if (e) {
|
|
12902
12932
|
const n = at(t), r = t.tr;
|
|
12903
12933
|
if (n.left == 0 && n.right == n.map.width) return !1;
|
|
12904
|
-
for (let o = n.right - 1;
|
|
12934
|
+
for (let o = n.right - 1; T0(r, n, o), o != n.left; o--) {
|
|
12905
12935
|
const i = n.tableStart ? r.doc.nodeAt(n.tableStart - 1) : r.doc;
|
|
12906
12936
|
if (!i)
|
|
12907
12937
|
throw RangeError("No table found");
|
|
@@ -12911,7 +12941,7 @@ function O0(t, e) {
|
|
|
12911
12941
|
}
|
|
12912
12942
|
return !0;
|
|
12913
12943
|
}
|
|
12914
|
-
function
|
|
12944
|
+
function N0(t, e, n) {
|
|
12915
12945
|
var r;
|
|
12916
12946
|
const o = we(e.type.schema).header_cell;
|
|
12917
12947
|
for (let i = 0; i < t.width; i++)
|
|
@@ -12925,7 +12955,7 @@ function gu(t, { map: e, tableStart: n, table: r }, o) {
|
|
|
12925
12955
|
for (let c = 0; c < o; c++) s += r.child(c).nodeSize;
|
|
12926
12956
|
const a = [];
|
|
12927
12957
|
let l = o > 0 ? -1 : 0;
|
|
12928
|
-
|
|
12958
|
+
N0(e, r, o + l) && (l = o == 0 || o == e.height ? null : 0);
|
|
12929
12959
|
for (let c = 0, d = e.width * o; c < e.width; c++, d++)
|
|
12930
12960
|
if (o > 0 && o < e.height && e.map[d] == e.map[d - e.width]) {
|
|
12931
12961
|
const u = e.map[d], f = r.nodeAt(u).attrs;
|
|
@@ -12939,7 +12969,7 @@ function gu(t, { map: e, tableStart: n, table: r }, o) {
|
|
|
12939
12969
|
}
|
|
12940
12970
|
return t.insert(s, we(r.type.schema).row.create(null, a)), t;
|
|
12941
12971
|
}
|
|
12942
|
-
function
|
|
12972
|
+
function E0(t, e) {
|
|
12943
12973
|
if (!Ye(t)) return !1;
|
|
12944
12974
|
if (e) {
|
|
12945
12975
|
const n = at(t);
|
|
@@ -12947,7 +12977,7 @@ function D0(t, e) {
|
|
|
12947
12977
|
}
|
|
12948
12978
|
return !0;
|
|
12949
12979
|
}
|
|
12950
|
-
function
|
|
12980
|
+
function I0(t, e) {
|
|
12951
12981
|
if (!Ye(t)) return !1;
|
|
12952
12982
|
if (e) {
|
|
12953
12983
|
const n = at(t);
|
|
@@ -12955,7 +12985,7 @@ function N0(t, e) {
|
|
|
12955
12985
|
}
|
|
12956
12986
|
return !0;
|
|
12957
12987
|
}
|
|
12958
|
-
function
|
|
12988
|
+
function P0(t, { map: e, table: n, tableStart: r }, o) {
|
|
12959
12989
|
let i = 0;
|
|
12960
12990
|
for (let c = 0; c < o; c++) i += n.child(c).nodeSize;
|
|
12961
12991
|
const s = i + n.child(o).nodeSize, a = t.mapping.maps.length;
|
|
@@ -12980,12 +13010,12 @@ function E0(t, { map: e, table: n, tableStart: r }, o) {
|
|
|
12980
13010
|
}
|
|
12981
13011
|
}
|
|
12982
13012
|
}
|
|
12983
|
-
function
|
|
13013
|
+
function R0(t, e) {
|
|
12984
13014
|
if (!Ye(t)) return !1;
|
|
12985
13015
|
if (e) {
|
|
12986
13016
|
const n = at(t), r = t.tr;
|
|
12987
13017
|
if (n.top == 0 && n.bottom == n.map.height) return !1;
|
|
12988
|
-
for (let o = n.bottom - 1;
|
|
13018
|
+
for (let o = n.bottom - 1; P0(r, n, o), o != n.top; o--) {
|
|
12989
13019
|
const i = n.tableStart ? r.doc.nodeAt(n.tableStart - 1) : r.doc;
|
|
12990
13020
|
if (!i)
|
|
12991
13021
|
throw RangeError("No table found");
|
|
@@ -12999,7 +13029,7 @@ function hl(t) {
|
|
|
12999
13029
|
const e = t.content;
|
|
13000
13030
|
return e.childCount == 1 && e.child(0).isTextblock && e.child(0).childCount == 0;
|
|
13001
13031
|
}
|
|
13002
|
-
function
|
|
13032
|
+
function L0({ width: t, height: e, map: n }, r) {
|
|
13003
13033
|
let o = r.top * t + r.left, i = o, s = (r.bottom - 1) * t + r.left, a = o + (r.right - r.left - 1);
|
|
13004
13034
|
for (let l = r.top; l < r.bottom; l++) {
|
|
13005
13035
|
if (r.left > 0 && n[i] == n[i - 1] || r.right < t && n[a] == n[a + 1])
|
|
@@ -13018,7 +13048,7 @@ function ml(t, e) {
|
|
|
13018
13048
|
if (!(n instanceof X) || n.$anchorCell.pos == n.$headCell.pos)
|
|
13019
13049
|
return !1;
|
|
13020
13050
|
const r = at(t), { map: o } = r;
|
|
13021
|
-
if (
|
|
13051
|
+
if (L0(o, r)) return !1;
|
|
13022
13052
|
if (e) {
|
|
13023
13053
|
const i = t.tr, s = {};
|
|
13024
13054
|
let a = I.empty, l, c;
|
|
@@ -13055,9 +13085,9 @@ function ml(t, e) {
|
|
|
13055
13085
|
}
|
|
13056
13086
|
function gl(t, e) {
|
|
13057
13087
|
const n = we(t.schema);
|
|
13058
|
-
return
|
|
13088
|
+
return F0(({ node: r }) => n[r.type.spec.tableRole])(t, e);
|
|
13059
13089
|
}
|
|
13060
|
-
function
|
|
13090
|
+
function F0(t) {
|
|
13061
13091
|
return (e, n) => {
|
|
13062
13092
|
var r;
|
|
13063
13093
|
const o = e.selection;
|
|
@@ -13066,7 +13096,7 @@ function R0(t) {
|
|
|
13066
13096
|
if (o.$anchorCell.pos != o.$headCell.pos) return !1;
|
|
13067
13097
|
i = o.$anchorCell.nodeAfter, s = o.$anchorCell.pos;
|
|
13068
13098
|
} else {
|
|
13069
|
-
if (i =
|
|
13099
|
+
if (i = m0(o.$from), !i) return !1;
|
|
13070
13100
|
s = (r = $n(o.$from)) == null ? void 0 : r.pos;
|
|
13071
13101
|
}
|
|
13072
13102
|
if (i == null || s == null || i.attrs.colspan == 1 && i.attrs.rowspan == 1)
|
|
@@ -13107,7 +13137,7 @@ function R0(t) {
|
|
|
13107
13137
|
return !0;
|
|
13108
13138
|
};
|
|
13109
13139
|
}
|
|
13110
|
-
function
|
|
13140
|
+
function B0(t, e) {
|
|
13111
13141
|
return function(n, r) {
|
|
13112
13142
|
if (!Ye(n)) return !1;
|
|
13113
13143
|
const o = zo(n);
|
|
@@ -13127,7 +13157,7 @@ function L0(t, e) {
|
|
|
13127
13157
|
return !0;
|
|
13128
13158
|
};
|
|
13129
13159
|
}
|
|
13130
|
-
function
|
|
13160
|
+
function z0(t) {
|
|
13131
13161
|
return function(e, n) {
|
|
13132
13162
|
if (!Ye(e)) return !1;
|
|
13133
13163
|
if (n) {
|
|
@@ -13177,7 +13207,7 @@ function yl(t, e, n) {
|
|
|
13177
13207
|
return !0;
|
|
13178
13208
|
}
|
|
13179
13209
|
function vr(t, e) {
|
|
13180
|
-
return e = e || { useDeprecatedLogic: !1 }, e.useDeprecatedLogic ?
|
|
13210
|
+
return e = e || { useDeprecatedLogic: !1 }, e.useDeprecatedLogic ? z0(t) : function(n, r) {
|
|
13181
13211
|
if (!Ye(n)) return !1;
|
|
13182
13212
|
if (r) {
|
|
13183
13213
|
const o = we(n.schema), i = at(n), s = n.tr, a = yl("row", i, o), l = yl(
|
|
@@ -13209,10 +13239,10 @@ vr("row", {
|
|
|
13209
13239
|
vr("column", {
|
|
13210
13240
|
useDeprecatedLogic: !0
|
|
13211
13241
|
});
|
|
13212
|
-
var
|
|
13242
|
+
var _0 = vr("cell", {
|
|
13213
13243
|
useDeprecatedLogic: !0
|
|
13214
13244
|
});
|
|
13215
|
-
function
|
|
13245
|
+
function V0(t, e) {
|
|
13216
13246
|
if (e < 0) {
|
|
13217
13247
|
const n = t.nodeBefore;
|
|
13218
13248
|
if (n) return t.pos - n.nodeSize;
|
|
@@ -13237,18 +13267,18 @@ function z0(t, e) {
|
|
|
13237
13267
|
function bl(t) {
|
|
13238
13268
|
return function(e, n) {
|
|
13239
13269
|
if (!Ye(e)) return !1;
|
|
13240
|
-
const r =
|
|
13270
|
+
const r = V0(zo(e), t);
|
|
13241
13271
|
if (r == null) return !1;
|
|
13242
13272
|
if (n) {
|
|
13243
13273
|
const o = e.doc.resolve(r);
|
|
13244
13274
|
n(
|
|
13245
|
-
e.tr.setSelection(H.between(o,
|
|
13275
|
+
e.tr.setSelection(H.between(o, y0(o))).scrollIntoView()
|
|
13246
13276
|
);
|
|
13247
13277
|
}
|
|
13248
13278
|
return !0;
|
|
13249
13279
|
};
|
|
13250
13280
|
}
|
|
13251
|
-
function
|
|
13281
|
+
function $0(t, e) {
|
|
13252
13282
|
const n = t.selection.$anchor;
|
|
13253
13283
|
for (let r = n.depth; r > 0; r--)
|
|
13254
13284
|
if (n.node(r).type.spec.tableRole == "table")
|
|
@@ -13272,7 +13302,7 @@ function Jr(t, e) {
|
|
|
13272
13302
|
}
|
|
13273
13303
|
return !0;
|
|
13274
13304
|
}
|
|
13275
|
-
function
|
|
13305
|
+
function H0(t) {
|
|
13276
13306
|
if (!t.size) return null;
|
|
13277
13307
|
let { content: e, openStart: n, openEnd: r } = t;
|
|
13278
13308
|
for (; e.childCount == 1 && (n > 0 && r > 0 || e.child(0).type.spec.tableRole == "table"); )
|
|
@@ -13296,9 +13326,9 @@ function V0(t) {
|
|
|
13296
13326
|
);
|
|
13297
13327
|
else
|
|
13298
13328
|
return null;
|
|
13299
|
-
return
|
|
13329
|
+
return j0(s, a);
|
|
13300
13330
|
}
|
|
13301
|
-
function
|
|
13331
|
+
function j0(t, e) {
|
|
13302
13332
|
const n = [];
|
|
13303
13333
|
for (let o = 0; o < e.length; o++) {
|
|
13304
13334
|
const i = e[o];
|
|
@@ -13323,7 +13353,7 @@ function ss(t, e) {
|
|
|
13323
13353
|
const n = t.createAndFill();
|
|
13324
13354
|
return new Nf(n).replace(0, n.content.size, e).doc;
|
|
13325
13355
|
}
|
|
13326
|
-
function
|
|
13356
|
+
function W0({ width: t, height: e, rows: n }, r, o) {
|
|
13327
13357
|
if (t != r) {
|
|
13328
13358
|
const i = [], s = [];
|
|
13329
13359
|
for (let a = 0; a < n.length; a++) {
|
|
@@ -13331,7 +13361,7 @@ function H0({ width: t, height: e, rows: n }, r, o) {
|
|
|
13331
13361
|
for (let d = i[a] || 0, u = 0; d < r; u++) {
|
|
13332
13362
|
let f = l.child(u % l.childCount);
|
|
13333
13363
|
d + f.attrs.colspan > r && (f = f.type.createChecked(
|
|
13334
|
-
|
|
13364
|
+
dn(
|
|
13335
13365
|
f.attrs,
|
|
13336
13366
|
f.attrs.colspan,
|
|
13337
13367
|
d + f.attrs.colspan - r
|
|
@@ -13365,7 +13395,7 @@ function H0({ width: t, height: e, rows: n }, r, o) {
|
|
|
13365
13395
|
}
|
|
13366
13396
|
return { width: t, height: e, rows: n };
|
|
13367
13397
|
}
|
|
13368
|
-
function
|
|
13398
|
+
function U0(t, e, n, r, o, i, s) {
|
|
13369
13399
|
const a = t.doc.type.schema, l = we(a);
|
|
13370
13400
|
let c, d;
|
|
13371
13401
|
if (o > e.width)
|
|
@@ -13425,7 +13455,7 @@ function vl(t, e, n, r, o, i, s, a) {
|
|
|
13425
13455
|
t.setNodeMarkup(
|
|
13426
13456
|
h,
|
|
13427
13457
|
null,
|
|
13428
|
-
|
|
13458
|
+
dn(
|
|
13429
13459
|
f.attrs,
|
|
13430
13460
|
s - p,
|
|
13431
13461
|
f.attrs.colspan - (s - p)
|
|
@@ -13433,7 +13463,7 @@ function vl(t, e, n, r, o, i, s, a) {
|
|
|
13433
13463
|
), t.insert(
|
|
13434
13464
|
h + f.nodeSize,
|
|
13435
13465
|
f.type.createAndFill(
|
|
13436
|
-
|
|
13466
|
+
dn(f.attrs, 0, s - p)
|
|
13437
13467
|
)
|
|
13438
13468
|
), c += f.attrs.rowspan - 1;
|
|
13439
13469
|
}
|
|
@@ -13452,7 +13482,7 @@ function kl(t, e, n, r, o) {
|
|
|
13452
13482
|
throw new Error("No table found");
|
|
13453
13483
|
s = oe.get(i), f = u.mapping.maps.length;
|
|
13454
13484
|
}
|
|
13455
|
-
|
|
13485
|
+
U0(u, s, i, n, c, d, f) && p(), wl(u, s, i, n, l, c, a, f) && p(), wl(u, s, i, n, l, c, d, f) && p(), vl(u, s, i, n, a, d, l, f) && p(), vl(u, s, i, n, a, d, c, f) && p();
|
|
13456
13486
|
for (let h = a; h < d; h++) {
|
|
13457
13487
|
const m = s.positionAt(h, l, i), g = s.positionAt(h, c, i);
|
|
13458
13488
|
u.replace(
|
|
@@ -13468,7 +13498,7 @@ function kl(t, e, n, r, o) {
|
|
|
13468
13498
|
)
|
|
13469
13499
|
), e(u);
|
|
13470
13500
|
}
|
|
13471
|
-
var
|
|
13501
|
+
var q0 = Ns({
|
|
13472
13502
|
ArrowLeft: Yr("horiz", -1),
|
|
13473
13503
|
ArrowRight: Yr("horiz", 1),
|
|
13474
13504
|
ArrowUp: Yr("vert", -1),
|
|
@@ -13531,13 +13561,13 @@ function Gr(t, e) {
|
|
|
13531
13561
|
) : !1;
|
|
13532
13562
|
};
|
|
13533
13563
|
}
|
|
13534
|
-
function
|
|
13564
|
+
function K0(t, e) {
|
|
13535
13565
|
const n = t.state.doc, r = $n(n.resolve(e));
|
|
13536
13566
|
return r ? (t.dispatch(t.state.tr.setSelection(new X(r))), !0) : !1;
|
|
13537
13567
|
}
|
|
13538
|
-
function
|
|
13568
|
+
function X0(t, e, n) {
|
|
13539
13569
|
if (!Ye(t.state)) return !1;
|
|
13540
|
-
let r =
|
|
13570
|
+
let r = H0(n);
|
|
13541
13571
|
const o = t.state.selection;
|
|
13542
13572
|
if (o instanceof X) {
|
|
13543
13573
|
r || (r = {
|
|
@@ -13553,7 +13583,7 @@ function q0(t, e, n) {
|
|
|
13553
13583
|
o.$anchorCell.pos - s,
|
|
13554
13584
|
o.$headCell.pos - s
|
|
13555
13585
|
);
|
|
13556
|
-
return r =
|
|
13586
|
+
return r = W0(r, a.right - a.left, a.bottom - a.top), kl(t.state, t.dispatch, s, a, r), !0;
|
|
13557
13587
|
} else if (r) {
|
|
13558
13588
|
const i = zo(t.state), s = i.start(-1);
|
|
13559
13589
|
return kl(
|
|
@@ -13566,7 +13596,7 @@ function q0(t, e, n) {
|
|
|
13566
13596
|
} else
|
|
13567
13597
|
return !1;
|
|
13568
13598
|
}
|
|
13569
|
-
function
|
|
13599
|
+
function J0(t, e) {
|
|
13570
13600
|
var n;
|
|
13571
13601
|
if (e.ctrlKey || e.metaKey) return;
|
|
13572
13602
|
const r = Cl(t, e.target);
|
|
@@ -13629,7 +13659,7 @@ function di(t, e) {
|
|
|
13629
13659
|
});
|
|
13630
13660
|
return n && n ? $n(t.state.doc.resolve(n.pos)) : null;
|
|
13631
13661
|
}
|
|
13632
|
-
var
|
|
13662
|
+
var Y0 = class {
|
|
13633
13663
|
constructor(t, e) {
|
|
13634
13664
|
this.node = t, this.defaultCellMinWidth = e, this.dom = document.createElement("div"), this.dom.className = "tableWrapper", this.table = this.dom.appendChild(document.createElement("table")), this.table.style.setProperty(
|
|
13635
13665
|
"--default-cell-min-width",
|
|
@@ -13675,11 +13705,11 @@ function as(t, e, n, r, o, i) {
|
|
|
13675
13705
|
var Ee = new G(
|
|
13676
13706
|
"tableColumnResizing"
|
|
13677
13707
|
);
|
|
13678
|
-
function
|
|
13708
|
+
function G0({
|
|
13679
13709
|
handleWidth: t = 5,
|
|
13680
13710
|
cellMinWidth: e = 25,
|
|
13681
13711
|
defaultCellMinWidth: n = 100,
|
|
13682
|
-
View: r =
|
|
13712
|
+
View: r = Y0,
|
|
13683
13713
|
lastColumnResizable: o = !0
|
|
13684
13714
|
} = {}) {
|
|
13685
13715
|
const i = new Z({
|
|
@@ -13688,7 +13718,7 @@ function J0({
|
|
|
13688
13718
|
init(s, a) {
|
|
13689
13719
|
var l, c;
|
|
13690
13720
|
const d = (c = (l = i.spec) == null ? void 0 : l.props) == null ? void 0 : c.nodeViews, u = we(a.schema).table.name;
|
|
13691
|
-
return r && d && (d[u] = (f, p) => new r(f, n, p)), new
|
|
13721
|
+
return r && d && (d[u] = (f, p) => new r(f, n, p)), new Z0(-1, !1);
|
|
13692
13722
|
},
|
|
13693
13723
|
apply(s, a) {
|
|
13694
13724
|
return a.apply(s);
|
|
@@ -13701,26 +13731,26 @@ function J0({
|
|
|
13701
13731
|
},
|
|
13702
13732
|
handleDOMEvents: {
|
|
13703
13733
|
mousemove: (s, a) => {
|
|
13704
|
-
|
|
13734
|
+
Q0(s, a, t, o);
|
|
13705
13735
|
},
|
|
13706
13736
|
mouseleave: (s) => {
|
|
13707
|
-
|
|
13737
|
+
ew(s);
|
|
13708
13738
|
},
|
|
13709
13739
|
mousedown: (s, a) => {
|
|
13710
|
-
|
|
13740
|
+
tw(s, a, e, n);
|
|
13711
13741
|
}
|
|
13712
13742
|
},
|
|
13713
13743
|
decorations: (s) => {
|
|
13714
13744
|
const a = Ee.getState(s);
|
|
13715
13745
|
if (a && a.activeHandle > -1)
|
|
13716
|
-
return
|
|
13746
|
+
return sw(s, a.activeHandle);
|
|
13717
13747
|
},
|
|
13718
13748
|
nodeViews: {}
|
|
13719
13749
|
}
|
|
13720
13750
|
});
|
|
13721
13751
|
return i;
|
|
13722
13752
|
}
|
|
13723
|
-
var
|
|
13753
|
+
var Z0 = class ao {
|
|
13724
13754
|
constructor(e, n) {
|
|
13725
13755
|
this.activeHandle = e, this.dragging = n;
|
|
13726
13756
|
}
|
|
@@ -13737,11 +13767,11 @@ var Y0 = class ao {
|
|
|
13737
13767
|
return n;
|
|
13738
13768
|
}
|
|
13739
13769
|
};
|
|
13740
|
-
function
|
|
13770
|
+
function Q0(t, e, n, r) {
|
|
13741
13771
|
if (!t.editable) return;
|
|
13742
13772
|
const o = Ee.getState(t.state);
|
|
13743
13773
|
if (o && !o.dragging) {
|
|
13744
|
-
const i =
|
|
13774
|
+
const i = rw(e.target);
|
|
13745
13775
|
let s = -1;
|
|
13746
13776
|
if (i) {
|
|
13747
13777
|
const { left: a, right: l } = i.getBoundingClientRect();
|
|
@@ -13757,18 +13787,18 @@ function G0(t, e, n, r) {
|
|
|
13757
13787
|
}
|
|
13758
13788
|
}
|
|
13759
13789
|
}
|
|
13760
|
-
function
|
|
13790
|
+
function ew(t) {
|
|
13761
13791
|
if (!t.editable) return;
|
|
13762
13792
|
const e = Ee.getState(t.state);
|
|
13763
13793
|
e && e.activeHandle > -1 && !e.dragging && bu(t, -1);
|
|
13764
13794
|
}
|
|
13765
|
-
function
|
|
13795
|
+
function tw(t, e, n, r) {
|
|
13766
13796
|
var o;
|
|
13767
13797
|
if (!t.editable) return !1;
|
|
13768
13798
|
const i = (o = t.dom.ownerDocument.defaultView) != null ? o : window, s = Ee.getState(t.state);
|
|
13769
13799
|
if (!s || s.activeHandle == -1 || s.dragging)
|
|
13770
13800
|
return !1;
|
|
13771
|
-
const a = t.state.doc.nodeAt(s.activeHandle), l =
|
|
13801
|
+
const a = t.state.doc.nodeAt(s.activeHandle), l = nw(t, s.activeHandle, a.attrs);
|
|
13772
13802
|
t.dispatch(
|
|
13773
13803
|
t.state.tr.setMeta(Ee, {
|
|
13774
13804
|
setDragging: { startX: e.clientX, startWidth: l }
|
|
@@ -13777,7 +13807,7 @@ function Q0(t, e, n, r) {
|
|
|
13777
13807
|
function c(u) {
|
|
13778
13808
|
i.removeEventListener("mouseup", c), i.removeEventListener("mousemove", d);
|
|
13779
13809
|
const f = Ee.getState(t.state);
|
|
13780
|
-
f?.dragging && (
|
|
13810
|
+
f?.dragging && (ow(
|
|
13781
13811
|
t,
|
|
13782
13812
|
f.activeHandle,
|
|
13783
13813
|
xl(f.dragging, u, n)
|
|
@@ -13805,7 +13835,7 @@ function Q0(t, e, n, r) {
|
|
|
13805
13835
|
r
|
|
13806
13836
|
), i.addEventListener("mouseup", c), i.addEventListener("mousemove", d), e.preventDefault(), !0;
|
|
13807
13837
|
}
|
|
13808
|
-
function
|
|
13838
|
+
function nw(t, e, { colspan: n, colwidth: r }) {
|
|
13809
13839
|
const o = r && r[r.length - 1];
|
|
13810
13840
|
if (o) return o;
|
|
13811
13841
|
const i = t.domAtPos(e);
|
|
@@ -13815,7 +13845,7 @@ function ew(t, e, { colspan: n, colwidth: r }) {
|
|
|
13815
13845
|
r[c] && (a -= r[c], l--);
|
|
13816
13846
|
return a / l;
|
|
13817
13847
|
}
|
|
13818
|
-
function
|
|
13848
|
+
function rw(t) {
|
|
13819
13849
|
for (; t && t.nodeName != "TD" && t.nodeName != "TH"; )
|
|
13820
13850
|
t = t.classList && t.classList.contains("ProseMirror") ? null : t.parentNode;
|
|
13821
13851
|
return t;
|
|
@@ -13841,14 +13871,14 @@ function bu(t, e) {
|
|
|
13841
13871
|
t.state.tr.setMeta(Ee, { setHandle: e })
|
|
13842
13872
|
);
|
|
13843
13873
|
}
|
|
13844
|
-
function
|
|
13874
|
+
function ow(t, e, n) {
|
|
13845
13875
|
const r = t.state.doc.resolve(e), o = r.node(-1), i = oe.get(o), s = r.start(-1), a = i.colCount(r.pos - s) + r.nodeAfter.attrs.colspan - 1, l = t.state.tr;
|
|
13846
13876
|
for (let c = 0; c < i.height; c++) {
|
|
13847
13877
|
const d = c * i.width + a;
|
|
13848
13878
|
if (c && i.map[d] == i.map[d - i.width]) continue;
|
|
13849
13879
|
const u = i.map[d], f = o.nodeAt(u).attrs, p = f.colspan == 1 ? 0 : a - i.colCount(u);
|
|
13850
13880
|
if (f.colwidth && f.colwidth[p] == n) continue;
|
|
13851
|
-
const h = f.colwidth ? f.colwidth.slice() :
|
|
13881
|
+
const h = f.colwidth ? f.colwidth.slice() : iw(f.colspan);
|
|
13852
13882
|
h[p] = n, l.setNodeMarkup(s + u, null, { ...f, colwidth: h });
|
|
13853
13883
|
}
|
|
13854
13884
|
l.docChanged && t.dispatch(l);
|
|
@@ -13867,10 +13897,10 @@ function Ml(t, e, n, r) {
|
|
|
13867
13897
|
n
|
|
13868
13898
|
);
|
|
13869
13899
|
}
|
|
13870
|
-
function
|
|
13900
|
+
function iw(t) {
|
|
13871
13901
|
return Array(t).fill(0);
|
|
13872
13902
|
}
|
|
13873
|
-
function
|
|
13903
|
+
function sw(t, e) {
|
|
13874
13904
|
var n;
|
|
13875
13905
|
const r = [], o = t.doc.resolve(e), i = o.node(-1);
|
|
13876
13906
|
if (!i)
|
|
@@ -13893,7 +13923,7 @@ function ow(t, e) {
|
|
|
13893
13923
|
}
|
|
13894
13924
|
return F.create(t.doc, r);
|
|
13895
13925
|
}
|
|
13896
|
-
function
|
|
13926
|
+
function aw({
|
|
13897
13927
|
allowTableNodeSelection: t = !1
|
|
13898
13928
|
} = {}) {
|
|
13899
13929
|
return new Z({
|
|
@@ -13914,19 +13944,19 @@ function iw({
|
|
|
13914
13944
|
}
|
|
13915
13945
|
},
|
|
13916
13946
|
props: {
|
|
13917
|
-
decorations:
|
|
13947
|
+
decorations: v0,
|
|
13918
13948
|
handleDOMEvents: {
|
|
13919
|
-
mousedown:
|
|
13949
|
+
mousedown: J0
|
|
13920
13950
|
},
|
|
13921
13951
|
createSelectionBetween(e) {
|
|
13922
13952
|
return Et.getState(e.state) != null ? e.state.selection : null;
|
|
13923
13953
|
},
|
|
13924
|
-
handleTripleClick:
|
|
13925
|
-
handleKeyDown:
|
|
13926
|
-
handlePaste:
|
|
13954
|
+
handleTripleClick: K0,
|
|
13955
|
+
handleKeyDown: q0,
|
|
13956
|
+
handlePaste: X0
|
|
13927
13957
|
},
|
|
13928
13958
|
appendTransaction(e, n, r) {
|
|
13929
|
-
return
|
|
13959
|
+
return S0(
|
|
13930
13960
|
r,
|
|
13931
13961
|
hu(r, n),
|
|
13932
13962
|
t
|
|
@@ -13934,9 +13964,9 @@ function iw({
|
|
|
13934
13964
|
}
|
|
13935
13965
|
});
|
|
13936
13966
|
}
|
|
13937
|
-
const
|
|
13967
|
+
const lw = (t) => t instanceof X, Zr = ({ editor: t }) => {
|
|
13938
13968
|
const { selection: e } = t.state;
|
|
13939
|
-
if (!
|
|
13969
|
+
if (!lw(e)) return !1;
|
|
13940
13970
|
let n = 0;
|
|
13941
13971
|
return Bo(e.ranges[0].$from, (i) => i.type.name === "table")?.node.descendants((i) => {
|
|
13942
13972
|
if (i.type.name === "table") return !1;
|
|
@@ -14038,27 +14068,27 @@ const sw = (t) => t instanceof X, Zr = ({ editor: t }) => {
|
|
|
14038
14068
|
addCommands() {
|
|
14039
14069
|
return {
|
|
14040
14070
|
insertTable: ({ rows: t = 3, cols: e = 3, withHeaderRow: n = !1 } = {}) => ({ tr: r, dispatch: o, editor: i }) => {
|
|
14041
|
-
const s =
|
|
14071
|
+
const s = d0(i.schema, t, e, n);
|
|
14042
14072
|
if (o) {
|
|
14043
14073
|
const a = r.selection.from + 1;
|
|
14044
14074
|
r.replaceSelectionWith(s).scrollIntoView().setSelection(H.near(r.doc.resolve(a)));
|
|
14045
14075
|
}
|
|
14046
14076
|
return !0;
|
|
14047
14077
|
},
|
|
14048
|
-
deleteTable: () => ({ state: t, dispatch: e }) =>
|
|
14049
|
-
addColumnBefore: () => ({ state: t, dispatch: e }) =>
|
|
14050
|
-
addColumnAfter: () => ({ state: t, dispatch: e }) =>
|
|
14051
|
-
deleteColumn: () => ({ state: t, dispatch: e }) =>
|
|
14052
|
-
addRowBefore: () => ({ state: t, dispatch: e }) =>
|
|
14053
|
-
addRowAfter: () => ({ state: t, dispatch: e }) =>
|
|
14054
|
-
deleteRow: () => ({ state: t, dispatch: e }) =>
|
|
14078
|
+
deleteTable: () => ({ state: t, dispatch: e }) => $0(t, e),
|
|
14079
|
+
addColumnBefore: () => ({ state: t, dispatch: e }) => A0(t, e),
|
|
14080
|
+
addColumnAfter: () => ({ state: t, dispatch: e }) => O0(t, e),
|
|
14081
|
+
deleteColumn: () => ({ state: t, dispatch: e }) => D0(t, e),
|
|
14082
|
+
addRowBefore: () => ({ state: t, dispatch: e }) => E0(t, e),
|
|
14083
|
+
addRowAfter: () => ({ state: t, dispatch: e }) => I0(t, e),
|
|
14084
|
+
deleteRow: () => ({ state: t, dispatch: e }) => R0(t, e),
|
|
14055
14085
|
mergeCells: () => ({ state: t, dispatch: e }) => ml(t, e),
|
|
14056
14086
|
splitCell: () => ({ state: t, dispatch: e }) => gl(t, e),
|
|
14057
14087
|
mergeOrSplit: () => ({ state: t, dispatch: e }) => ml(t, e) ? !0 : gl(t, e),
|
|
14058
14088
|
toggleHeaderColumn: () => ({ state: t, dispatch: e }) => vr("column")(t, e),
|
|
14059
14089
|
toggleHeaderRow: () => ({ state: t, dispatch: e }) => vr("row")(t, e),
|
|
14060
|
-
toggleHeaderCell: () => ({ state: t, dispatch: e }) =>
|
|
14061
|
-
setCellAttr: (t, e) => ({ state: n, dispatch: r }) =>
|
|
14090
|
+
toggleHeaderCell: () => ({ state: t, dispatch: e }) => _0(t, e),
|
|
14091
|
+
setCellAttr: (t, e) => ({ state: n, dispatch: r }) => B0(t, e)(n, r),
|
|
14062
14092
|
goToNextCell: () => ({ state: t, dispatch: e }) => bl(1)(t, e),
|
|
14063
14093
|
goToPreviousCell: () => ({ state: t, dispatch: e }) => bl(-1)(t, e),
|
|
14064
14094
|
fixTables: () => ({ state: t, dispatch: e }) => (e && hu(t), !0),
|
|
@@ -14095,17 +14125,17 @@ const sw = (t) => t instanceof X, Zr = ({ editor: t }) => {
|
|
|
14095
14125
|
addPmPlugins() {
|
|
14096
14126
|
return [
|
|
14097
14127
|
...this.options.resizable && this.editor.isEditable ? [
|
|
14098
|
-
|
|
14128
|
+
G0({
|
|
14099
14129
|
handleWidth: this.options.handleWidth,
|
|
14100
14130
|
cellMinWidth: this.options.cellMinWidth,
|
|
14101
14131
|
defaultCellMinWidth: this.options.cellMinWidth,
|
|
14102
14132
|
lastColumnResizable: this.options.lastColumnResizable,
|
|
14103
|
-
View:
|
|
14133
|
+
View: c0({
|
|
14104
14134
|
editor: this.editor
|
|
14105
14135
|
})
|
|
14106
14136
|
})
|
|
14107
14137
|
] : [],
|
|
14108
|
-
|
|
14138
|
+
aw({
|
|
14109
14139
|
allowTableNodeSelection: this.options.allowTableNodeSelection
|
|
14110
14140
|
})
|
|
14111
14141
|
];
|
|
@@ -14263,7 +14293,7 @@ const sw = (t) => t instanceof X, Zr = ({ editor: t }) => {
|
|
|
14263
14293
|
}
|
|
14264
14294
|
});
|
|
14265
14295
|
var yt, Jt;
|
|
14266
|
-
class
|
|
14296
|
+
class cw {
|
|
14267
14297
|
constructor(e) {
|
|
14268
14298
|
ft(this, yt);
|
|
14269
14299
|
P(this, "editor");
|
|
@@ -14430,11 +14460,11 @@ function Mu(t, e) {
|
|
|
14430
14460
|
});
|
|
14431
14461
|
}, 0);
|
|
14432
14462
|
}
|
|
14433
|
-
const { findChildren:
|
|
14463
|
+
const { findChildren: dw } = Ad;
|
|
14434
14464
|
function Pt(t) {
|
|
14435
|
-
return
|
|
14465
|
+
return dw(t.doc, (n) => n.type.name === "fieldAnnotation");
|
|
14436
14466
|
}
|
|
14437
|
-
const
|
|
14467
|
+
const uw = (t = {}) => {
|
|
14438
14468
|
let { editor: e, annotationClass: n } = t;
|
|
14439
14469
|
return new Z({
|
|
14440
14470
|
key: new G("fieldAnnotation"),
|
|
@@ -14452,7 +14482,7 @@ const cw = (t = {}) => {
|
|
|
14452
14482
|
let a = o?.dataTransfer.getData("fieldAnnotation");
|
|
14453
14483
|
if (a) {
|
|
14454
14484
|
if (t.handleDropOutside)
|
|
14455
|
-
|
|
14485
|
+
fw({
|
|
14456
14486
|
fieldAnnotation: a,
|
|
14457
14487
|
editor: e,
|
|
14458
14488
|
view: r,
|
|
@@ -14509,7 +14539,7 @@ const cw = (t = {}) => {
|
|
|
14509
14539
|
///
|
|
14510
14540
|
});
|
|
14511
14541
|
};
|
|
14512
|
-
function
|
|
14542
|
+
function fw({ fieldAnnotation: t, editor: e, view: n, event: r }) {
|
|
14513
14543
|
let o;
|
|
14514
14544
|
try {
|
|
14515
14545
|
o = JSON.parse(t).sourceField;
|
|
@@ -14527,7 +14557,7 @@ function dw({ fieldAnnotation: t, editor: e, view: n, event: r }) {
|
|
|
14527
14557
|
pos: i.pos
|
|
14528
14558
|
});
|
|
14529
14559
|
}
|
|
14530
|
-
function
|
|
14560
|
+
function pw(t, e) {
|
|
14531
14561
|
return Pt(e).map(({ node: r, pos: o }) => {
|
|
14532
14562
|
let i = xd(t, o, o + r.nodeSize);
|
|
14533
14563
|
return {
|
|
@@ -14537,23 +14567,23 @@ function uw(t, e) {
|
|
|
14537
14567
|
};
|
|
14538
14568
|
});
|
|
14539
14569
|
}
|
|
14540
|
-
function
|
|
14570
|
+
function hw(t, e) {
|
|
14541
14571
|
let n = Pt(e), r = [];
|
|
14542
14572
|
return n.forEach((o) => {
|
|
14543
14573
|
t(o.node) && r.push(o);
|
|
14544
14574
|
}), r;
|
|
14545
14575
|
}
|
|
14546
|
-
const { findChildren:
|
|
14576
|
+
const { findChildren: mw } = Ad;
|
|
14547
14577
|
function lo(t, e) {
|
|
14548
|
-
return
|
|
14578
|
+
return mw(e.doc, (r) => {
|
|
14549
14579
|
let o = r.type.name === "fieldAnnotation";
|
|
14550
14580
|
return Array.isArray(t) ? o && t.includes(r.attrs.fieldId) : o && r.attrs.fieldId === t;
|
|
14551
14581
|
});
|
|
14552
14582
|
}
|
|
14553
|
-
function
|
|
14554
|
-
return
|
|
14583
|
+
function gw(t, e) {
|
|
14584
|
+
return yw(e.doc, (r) => r.type.name === "fieldAnnotation" && r.attrs.fieldId === t);
|
|
14555
14585
|
}
|
|
14556
|
-
function
|
|
14586
|
+
function yw(t, e) {
|
|
14557
14587
|
let n = null;
|
|
14558
14588
|
return t.descendants((r, o) => {
|
|
14559
14589
|
if (e(r) && (n = { node: r, pos: o }), n) return !1;
|
|
@@ -14568,74 +14598,74 @@ function co(t, e, n) {
|
|
|
14568
14598
|
});
|
|
14569
14599
|
}), r;
|
|
14570
14600
|
}
|
|
14571
|
-
const
|
|
14601
|
+
const Xk = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
|
|
14572
14602
|
__proto__: null,
|
|
14573
|
-
findFieldAnnotations:
|
|
14603
|
+
findFieldAnnotations: hw,
|
|
14574
14604
|
findFieldAnnotationsBetween: co,
|
|
14575
14605
|
findFieldAnnotationsByFieldId: lo,
|
|
14576
|
-
findFirstFieldAnnotationByFieldId:
|
|
14606
|
+
findFirstFieldAnnotationByFieldId: gw,
|
|
14577
14607
|
findRemovedFieldAnnotations: xu,
|
|
14578
14608
|
getAllFieldAnnotations: Pt,
|
|
14579
|
-
getAllFieldAnnotationsWithRect:
|
|
14609
|
+
getAllFieldAnnotationsWithRect: pw,
|
|
14580
14610
|
trackFieldAnnotationsDeletion: Mu
|
|
14581
14611
|
}, Symbol.toStringTag, { value: "Module" }));
|
|
14582
14612
|
function ls(t, e, n) {
|
|
14583
14613
|
return Math.min(Math.max(t, n), e);
|
|
14584
14614
|
}
|
|
14585
|
-
class
|
|
14615
|
+
class bw extends Error {
|
|
14586
14616
|
constructor(e) {
|
|
14587
14617
|
super(`Failed to parse color: "${e}"`);
|
|
14588
14618
|
}
|
|
14589
14619
|
}
|
|
14590
|
-
var Qn =
|
|
14591
|
-
function
|
|
14620
|
+
var Qn = bw;
|
|
14621
|
+
function ww(t) {
|
|
14592
14622
|
if (typeof t != "string") throw new Qn(t);
|
|
14593
14623
|
if (t.trim().toLowerCase() === "transparent") return [0, 0, 0, 0];
|
|
14594
14624
|
let e = t.trim();
|
|
14595
|
-
e =
|
|
14596
|
-
const n =
|
|
14625
|
+
e = Ow.test(t) ? Cw(t) : t;
|
|
14626
|
+
const n = Sw.exec(e);
|
|
14597
14627
|
if (n) {
|
|
14598
14628
|
const s = Array.from(n).slice(1);
|
|
14599
14629
|
return [...s.slice(0, 3).map((a) => parseInt(kr(a, 2), 16)), parseInt(kr(s[3] || "f", 2), 16) / 255];
|
|
14600
14630
|
}
|
|
14601
|
-
const r =
|
|
14631
|
+
const r = xw.exec(e);
|
|
14602
14632
|
if (r) {
|
|
14603
14633
|
const s = Array.from(r).slice(1);
|
|
14604
14634
|
return [...s.slice(0, 3).map((a) => parseInt(a, 16)), parseInt(s[3] || "ff", 16) / 255];
|
|
14605
14635
|
}
|
|
14606
|
-
const o =
|
|
14636
|
+
const o = Mw.exec(e);
|
|
14607
14637
|
if (o) {
|
|
14608
14638
|
const s = Array.from(o).slice(1);
|
|
14609
14639
|
return [...s.slice(0, 3).map((a) => parseInt(a, 10)), parseFloat(s[3] || "1")];
|
|
14610
14640
|
}
|
|
14611
|
-
const i =
|
|
14641
|
+
const i = Aw.exec(e);
|
|
14612
14642
|
if (i) {
|
|
14613
14643
|
const [s, a, l, c] = Array.from(i).slice(1).map(parseFloat);
|
|
14614
14644
|
if (ls(0, 100, a) !== a) throw new Qn(t);
|
|
14615
14645
|
if (ls(0, 100, l) !== l) throw new Qn(t);
|
|
14616
|
-
return [...
|
|
14646
|
+
return [...Tw(s, a, l), Number.isNaN(c) ? 1 : c];
|
|
14617
14647
|
}
|
|
14618
14648
|
throw new Qn(t);
|
|
14619
14649
|
}
|
|
14620
|
-
function
|
|
14650
|
+
function vw(t) {
|
|
14621
14651
|
let e = 5381, n = t.length;
|
|
14622
14652
|
for (; n; )
|
|
14623
14653
|
e = e * 33 ^ t.charCodeAt(--n);
|
|
14624
14654
|
return (e >>> 0) % 2341;
|
|
14625
14655
|
}
|
|
14626
|
-
const Al = (t) => parseInt(t.replace(/_/g, ""), 36),
|
|
14656
|
+
const Al = (t) => parseInt(t.replace(/_/g, ""), 36), kw = "1q29ehhb 1n09sgk7 1kl1ekf_ _yl4zsno 16z9eiv3 1p29lhp8 _bd9zg04 17u0____ _iw9zhe5 _to73___ _r45e31e _7l6g016 _jh8ouiv _zn3qba8 1jy4zshs 11u87k0u 1ro9yvyo 1aj3xael 1gz9zjz0 _3w8l4xo 1bf1ekf_ _ke3v___ _4rrkb__ 13j776yz _646mbhl _nrjr4__ _le6mbhl 1n37ehkb _m75f91n _qj3bzfz 1939yygw 11i5z6x8 _1k5f8xs 1509441m 15t5lwgf _ae2th1n _tg1ugcv 1lp1ugcv 16e14up_ _h55rw7n _ny9yavn _7a11xb_ 1ih442g9 _pv442g9 1mv16xof 14e6y7tu 1oo9zkds 17d1cisi _4v9y70f _y98m8kc 1019pq0v 12o9zda8 _348j4f4 1et50i2o _8epa8__ _ts6senj 1o350i2o 1mi9eiuo 1259yrp0 1ln80gnw _632xcoy 1cn9zldc _f29edu4 1n490c8q _9f9ziet 1b94vk74 _m49zkct 1kz6s73a 1eu9dtog _q58s1rz 1dy9sjiq __u89jo3 _aj5nkwg _ld89jo3 13h9z6wx _qa9z2ii _l119xgq _bs5arju 1hj4nwk9 1qt4nwk9 1ge6wau6 14j9zlcw 11p1edc_ _ms1zcxe _439shk6 _jt9y70f _754zsow 1la40eju _oq5p___ _x279qkz 1fa5r3rv _yd2d9ip _424tcku _8y1di2_ _zi2uabw _yy7rn9h 12yz980_ __39ljp6 1b59zg0x _n39zfzp 1fy9zest _b33k___ _hp9wq92 1il50hz4 _io472ub _lj9z3eo 19z9ykg0 _8t8iu3a 12b9bl4a 1ak5yw0o _896v4ku _tb8k8lv _s59zi6t _c09ze0p 1lg80oqn 1id9z8wb _238nba5 1kq6wgdi _154zssg _tn3zk49 _da9y6tc 1sg7cv4f _r12jvtt 1gq5fmkz 1cs9rvci _lp9jn1c _xw1tdnb 13f9zje6 16f6973h _vo7ir40 _bt5arjf _rc45e4t _hr4e100 10v4e100 _hc9zke2 _w91egv_ _sj2r1kk 13c87yx8 _vqpds__ _ni8ggk8 _tj9yqfb 1ia2j4r4 _7x9b10u 1fc9ld4j 1eq9zldr _5j9lhpx _ez9zl6o _md61fzm".split(" ").reduce((t, e) => {
|
|
14627
14657
|
const n = Al(e.substring(0, 3)), r = Al(e.substring(3)).toString(16);
|
|
14628
14658
|
let o = "";
|
|
14629
14659
|
for (let i = 0; i < 6 - r.length; i++)
|
|
14630
14660
|
o += "0";
|
|
14631
14661
|
return t[n] = `${o}${r}`, t;
|
|
14632
14662
|
}, {});
|
|
14633
|
-
function
|
|
14634
|
-
const e = t.toLowerCase().trim(), n =
|
|
14663
|
+
function Cw(t) {
|
|
14664
|
+
const e = t.toLowerCase().trim(), n = kw[vw(e)];
|
|
14635
14665
|
if (!n) throw new Qn(t);
|
|
14636
14666
|
return `#${n}`;
|
|
14637
14667
|
}
|
|
14638
|
-
const kr = (t, e) => Array.from(Array(e)).map(() => t).join(""),
|
|
14668
|
+
const kr = (t, e) => Array.from(Array(e)).map(() => t).join(""), Sw = new RegExp(`^#${kr("([a-f0-9])", 3)}([a-f0-9])?$`, "i"), xw = new RegExp(`^#${kr("([a-f0-9]{2})", 3)}([a-f0-9]{2})?$`, "i"), Mw = new RegExp(`^rgba?\\(\\s*(\\d+)\\s*${kr(",\\s*(\\d+)\\s*", 2)}(?:,\\s*([\\d.]+))?\\s*\\)$`, "i"), Aw = /^hsla?\(\s*([\d.]+)\s*,\s*([\d.]+)%\s*,\s*([\d.]+)%(?:\s*,\s*([\d.]+))?\s*\)$/i, Ow = /^[a-z]+$/i, Ol = (t) => Math.round(t * 255), Tw = (t, e, n) => {
|
|
14639
14669
|
let r = n / 100;
|
|
14640
14670
|
if (e === 0)
|
|
14641
14671
|
return [r, r, r].map(Ol);
|
|
@@ -14645,8 +14675,8 @@ const kr = (t, e) => Array.from(Array(e)).map(() => t).join(""), kw = new RegExp
|
|
|
14645
14675
|
const d = r - i / 2, u = a + d, f = l + d, p = c + d;
|
|
14646
14676
|
return [u, f, p].map(Ol);
|
|
14647
14677
|
};
|
|
14648
|
-
function
|
|
14649
|
-
const [e, n, r, o] =
|
|
14678
|
+
function Dw(t) {
|
|
14679
|
+
const [e, n, r, o] = ww(t);
|
|
14650
14680
|
let i = (s) => {
|
|
14651
14681
|
const a = ls(0, 255, s).toString(16);
|
|
14652
14682
|
return a.length === 1 ? `0${a}` : a;
|
|
@@ -14736,7 +14766,7 @@ const cs = "annotation", Au = "annotation-content", Ou = J.create({
|
|
|
14736
14766
|
parseDOM: (t) => t.getAttribute("data-field-color") || t.style.backgroundColor || null,
|
|
14737
14767
|
renderDOM: (t) => {
|
|
14738
14768
|
if (!t.fieldColor) return {};
|
|
14739
|
-
let e =
|
|
14769
|
+
let e = Dw(t.fieldColor);
|
|
14740
14770
|
return e.slice(1).length === 6 && (e = `${e}33`), t.highlighted === !1 ? {
|
|
14741
14771
|
"data-field-color": e
|
|
14742
14772
|
} : {
|
|
@@ -14920,7 +14950,7 @@ const cs = "annotation", Au = "annotation-content", Ou = J.create({
|
|
|
14920
14950
|
if (o) {
|
|
14921
14951
|
let { schema: a } = r, l = s.mapping.map(t), d = i.doc.resolve(l).marks();
|
|
14922
14952
|
d = d.length ? [...d] : null;
|
|
14923
|
-
let u =
|
|
14953
|
+
let u = Nw(d), f = a.nodes[this.name].create({ ...e, ...u }, null, null);
|
|
14924
14954
|
i.tr.insert(l, f).setSelection(Y.near(s.doc.resolve(l + f.nodeSize))), n && this.editor.view.focus();
|
|
14925
14955
|
}
|
|
14926
14956
|
return !0;
|
|
@@ -15119,7 +15149,7 @@ const cs = "annotation", Au = "annotation-content", Ou = J.create({
|
|
|
15119
15149
|
};
|
|
15120
15150
|
},
|
|
15121
15151
|
addNodeView() {
|
|
15122
|
-
return (t) => new
|
|
15152
|
+
return (t) => new cw({
|
|
15123
15153
|
...t,
|
|
15124
15154
|
annotationClass: this.options.annotationClass,
|
|
15125
15155
|
annotationContentClass: this.options.annotationContentClass,
|
|
@@ -15128,7 +15158,7 @@ const cs = "annotation", Au = "annotation-content", Ou = J.create({
|
|
|
15128
15158
|
},
|
|
15129
15159
|
addPmPlugins() {
|
|
15130
15160
|
return [
|
|
15131
|
-
|
|
15161
|
+
uw({
|
|
15132
15162
|
editor: this.editor,
|
|
15133
15163
|
annotationClass: this.options.annotationClass,
|
|
15134
15164
|
handleDropOutside: this.options.handleDropOutside
|
|
@@ -15136,7 +15166,7 @@ const cs = "annotation", Au = "annotation-content", Ou = J.create({
|
|
|
15136
15166
|
];
|
|
15137
15167
|
}
|
|
15138
15168
|
});
|
|
15139
|
-
function
|
|
15169
|
+
function Nw(t) {
|
|
15140
15170
|
if (!t)
|
|
15141
15171
|
return {};
|
|
15142
15172
|
let e = {
|
|
@@ -15153,7 +15183,7 @@ function Tw(t) {
|
|
|
15153
15183
|
}
|
|
15154
15184
|
return e;
|
|
15155
15185
|
}
|
|
15156
|
-
const Ao = new G("ImagePlaceholder"),
|
|
15186
|
+
const Ao = new G("ImagePlaceholder"), Ew = (t = {}) => new Z({
|
|
15157
15187
|
key: Ao,
|
|
15158
15188
|
state: {
|
|
15159
15189
|
init() {
|
|
@@ -15176,7 +15206,7 @@ const Ao = new G("ImagePlaceholder"), Dw = (t = {}) => new Z({
|
|
|
15176
15206
|
return this.getState(e);
|
|
15177
15207
|
}
|
|
15178
15208
|
}
|
|
15179
|
-
}),
|
|
15209
|
+
}), Jk = (t, e) => {
|
|
15180
15210
|
let r = Ao.getState(t)?.find(null, null, (o) => o.id === e);
|
|
15181
15211
|
return r?.length ? r[0].from : null;
|
|
15182
15212
|
}, Tu = J.create({
|
|
@@ -15259,9 +15289,9 @@ const Ao = new G("ImagePlaceholder"), Dw = (t = {}) => new Z({
|
|
|
15259
15289
|
};
|
|
15260
15290
|
},
|
|
15261
15291
|
addPmPlugins() {
|
|
15262
|
-
return [
|
|
15292
|
+
return [Ew()];
|
|
15263
15293
|
}
|
|
15264
|
-
}),
|
|
15294
|
+
}), Iw = J.create({
|
|
15265
15295
|
name: "bookmarkStart",
|
|
15266
15296
|
group: "inline",
|
|
15267
15297
|
content: "inline*",
|
|
@@ -15324,7 +15354,7 @@ const Ao = new G("ImagePlaceholder"), Dw = (t = {}) => new Z({
|
|
|
15324
15354
|
email: { default: null }
|
|
15325
15355
|
};
|
|
15326
15356
|
}
|
|
15327
|
-
}),
|
|
15357
|
+
}), Pw = J.create({
|
|
15328
15358
|
name: "page-number",
|
|
15329
15359
|
group: "inline",
|
|
15330
15360
|
inline: !0,
|
|
@@ -15342,7 +15372,7 @@ const Ao = new G("ImagePlaceholder"), Dw = (t = {}) => new Z({
|
|
|
15342
15372
|
renderDOM({ htmlAttributes: t }) {
|
|
15343
15373
|
return ["span", N.mergeAttributes(this.options.htmlAttributes, t), 0];
|
|
15344
15374
|
}
|
|
15345
|
-
}),
|
|
15375
|
+
}), Rw = J.create({
|
|
15346
15376
|
name: "total-page-number",
|
|
15347
15377
|
group: "inline",
|
|
15348
15378
|
inline: !0,
|
|
@@ -15609,22 +15639,22 @@ const Ao = new G("ImagePlaceholder"), Dw = (t = {}) => new Z({
|
|
|
15609
15639
|
toggleLink: ({ href: t }) => ({ commands: e }) => t ? e.setLink({ href: t }) : e.unsetLink()
|
|
15610
15640
|
};
|
|
15611
15641
|
}
|
|
15612
|
-
}),
|
|
15642
|
+
}), Lw = /[\u0000-\u0020\u00A0\u1680\u180E\u2000-\u2029\u205F\u3000]/g;
|
|
15613
15643
|
function Tl(t, e) {
|
|
15614
15644
|
const n = ["http", "https", "mailto"];
|
|
15615
15645
|
return e && e.forEach((r) => {
|
|
15616
15646
|
const o = typeof r == "string" ? r : r.scheme;
|
|
15617
15647
|
o && n.push(o);
|
|
15618
|
-
}), !t || t.replace(
|
|
15648
|
+
}), !t || t.replace(Lw, "").match(new RegExp(`^(?:(?:${n.join("|")}):|[^a-z]|[a-z+.-]+(?:[^a-z+.-:]|$))`, "i"));
|
|
15619
15649
|
}
|
|
15620
|
-
const
|
|
15650
|
+
const Fw = "track-insert", Bu = Le.create({
|
|
15621
15651
|
name: Ve,
|
|
15622
15652
|
group: "track",
|
|
15623
15653
|
inclusive: !1,
|
|
15624
15654
|
addOptions() {
|
|
15625
15655
|
return {
|
|
15626
15656
|
htmlAttributes: {
|
|
15627
|
-
class:
|
|
15657
|
+
class: Fw
|
|
15628
15658
|
}
|
|
15629
15659
|
};
|
|
15630
15660
|
},
|
|
@@ -15666,14 +15696,14 @@ const Rw = "track-insert", Bu = Le.create({
|
|
|
15666
15696
|
renderDOM({ htmlAttributes: t }) {
|
|
15667
15697
|
return ["span", N.mergeAttributes(this.options.htmlAttributes, t), 0];
|
|
15668
15698
|
}
|
|
15669
|
-
}),
|
|
15699
|
+
}), Bw = "track-delete", zu = Le.create({
|
|
15670
15700
|
name: ue,
|
|
15671
15701
|
group: "track",
|
|
15672
15702
|
inclusive: !1,
|
|
15673
15703
|
addOptions() {
|
|
15674
15704
|
return {
|
|
15675
15705
|
htmlAttributes: {
|
|
15676
|
-
class:
|
|
15706
|
+
class: Bw
|
|
15677
15707
|
}
|
|
15678
15708
|
};
|
|
15679
15709
|
},
|
|
@@ -15724,28 +15754,28 @@ const Rw = "track-insert", Bu = Le.create({
|
|
|
15724
15754
|
return [];
|
|
15725
15755
|
}
|
|
15726
15756
|
return Array.isArray(e) ? e.filter((n) => Object.hasOwn(n, "type") && Object.hasOwn(n, "attrs")) : [];
|
|
15727
|
-
},
|
|
15757
|
+
}, Yk = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
|
|
15728
15758
|
__proto__: null,
|
|
15729
15759
|
addMarkStep: Id,
|
|
15730
|
-
documentHelpers:
|
|
15760
|
+
documentHelpers: Xy,
|
|
15731
15761
|
findTrackedMarkBetween: Fs,
|
|
15732
15762
|
getTrackChanges: zs,
|
|
15733
15763
|
markDeletion: Sd,
|
|
15734
15764
|
markInsertion: Cd,
|
|
15735
|
-
markWrapping:
|
|
15765
|
+
markWrapping: lb,
|
|
15736
15766
|
parseFormatList: ds,
|
|
15737
15767
|
removeMarkStep: Pd,
|
|
15738
|
-
replaceAroundStep:
|
|
15768
|
+
replaceAroundStep: cb,
|
|
15739
15769
|
replaceStep: Ed,
|
|
15740
15770
|
trackedTransaction: Rd
|
|
15741
|
-
}, Symbol.toStringTag, { value: "Module" })),
|
|
15771
|
+
}, Symbol.toStringTag, { value: "Module" })), zw = "track-format", _u = Le.create({
|
|
15742
15772
|
name: Se,
|
|
15743
15773
|
group: "track",
|
|
15744
15774
|
inclusive: !1,
|
|
15745
15775
|
addOptions() {
|
|
15746
15776
|
return {
|
|
15747
15777
|
htmlAttributes: {
|
|
15748
|
-
class:
|
|
15778
|
+
class: zw
|
|
15749
15779
|
}
|
|
15750
15780
|
};
|
|
15751
15781
|
},
|
|
@@ -15809,7 +15839,7 @@ const Rw = "track-insert", Bu = Le.create({
|
|
|
15809
15839
|
renderDOM({ htmlAttributes: t }) {
|
|
15810
15840
|
return ["span", N.mergeAttributes(this.options.htmlAttributes, t), 0];
|
|
15811
15841
|
}
|
|
15812
|
-
}),
|
|
15842
|
+
}), _w = Q.create({
|
|
15813
15843
|
name: "trackChanges",
|
|
15814
15844
|
addCommands() {
|
|
15815
15845
|
return {
|
|
@@ -15828,7 +15858,7 @@ const Rw = "track-insert", Bu = Le.create({
|
|
|
15828
15858
|
} else if (a.marks && a.marks.find((c) => c.type.name === Ve)) {
|
|
15829
15859
|
const c = a.marks.find((d) => d.type.name === Ve);
|
|
15830
15860
|
o.step(
|
|
15831
|
-
new
|
|
15861
|
+
new Sn(
|
|
15832
15862
|
s.map(Math.max(l, t)),
|
|
15833
15863
|
s.map(Math.min(l + a.nodeSize, e)),
|
|
15834
15864
|
c
|
|
@@ -15837,7 +15867,7 @@ const Rw = "track-insert", Bu = Le.create({
|
|
|
15837
15867
|
} else if (a.marks && a.marks.find((c) => c.type.name === Se)) {
|
|
15838
15868
|
const c = a.marks.find((d) => d.type.name === Se);
|
|
15839
15869
|
o.step(
|
|
15840
|
-
new
|
|
15870
|
+
new Sn(
|
|
15841
15871
|
s.map(Math.max(l, t)),
|
|
15842
15872
|
s.map(Math.min(l + a.nodeSize, e)),
|
|
15843
15873
|
c
|
|
@@ -15854,7 +15884,7 @@ const Rw = "track-insert", Bu = Le.create({
|
|
|
15854
15884
|
if (a.marks && a.marks.find((c) => c.type.name === ue)) {
|
|
15855
15885
|
const c = a.marks.find((d) => d.type.name === ue);
|
|
15856
15886
|
o.step(
|
|
15857
|
-
new
|
|
15887
|
+
new Sn(
|
|
15858
15888
|
s.map(Math.max(l, t)),
|
|
15859
15889
|
s.map(Math.min(l + a.nodeSize, e)),
|
|
15860
15890
|
c
|
|
@@ -15879,14 +15909,14 @@ const Rw = "track-insert", Bu = Le.create({
|
|
|
15879
15909
|
);
|
|
15880
15910
|
}), c.attrs.after.forEach((d) => {
|
|
15881
15911
|
o.step(
|
|
15882
|
-
new
|
|
15912
|
+
new Sn(
|
|
15883
15913
|
s.map(Math.max(l, t)),
|
|
15884
15914
|
s.map(Math.min(l + a.nodeSize, e)),
|
|
15885
15915
|
a.marks.find((u) => u.type.name === d.type)
|
|
15886
15916
|
)
|
|
15887
15917
|
);
|
|
15888
15918
|
}), o.step(
|
|
15889
|
-
new
|
|
15919
|
+
new Sn(
|
|
15890
15920
|
s.map(Math.max(l, t)),
|
|
15891
15921
|
s.map(Math.min(l + a.nodeSize, e)),
|
|
15892
15922
|
c
|
|
@@ -15971,7 +16001,7 @@ const Rw = "track-insert", Bu = Le.create({
|
|
|
15971
16001
|
};
|
|
15972
16002
|
},
|
|
15973
16003
|
addPmPlugins() {
|
|
15974
|
-
return [
|
|
16004
|
+
return [Jy()];
|
|
15975
16005
|
}
|
|
15976
16006
|
}), Dl = (t, e) => {
|
|
15977
16007
|
const n = zs(t), r = n.findIndex(({ mark: l }) => l.attrs.id === e);
|
|
@@ -15979,7 +16009,7 @@ const Rw = "track-insert", Bu = Le.create({
|
|
|
15979
16009
|
const o = n[r], i = n[r - 1], s = n[r + 1];
|
|
15980
16010
|
let a;
|
|
15981
16011
|
return i && o.start === i.end ? a = i : s && o.end === s.start && (a = s), [o, a].filter(Boolean);
|
|
15982
|
-
},
|
|
16012
|
+
}, Vw = Q.create({
|
|
15983
16013
|
name: "placeholder",
|
|
15984
16014
|
addOptions() {
|
|
15985
16015
|
return {
|
|
@@ -16009,11 +16039,11 @@ const Rw = "track-insert", Bu = Le.create({
|
|
|
16009
16039
|
})];
|
|
16010
16040
|
}
|
|
16011
16041
|
});
|
|
16012
|
-
var Te = "top", We = "bottom", Ue = "right", De = "left", js = "auto", Ir = [Te, We, Ue, De], Pn = "start", Cr = "end",
|
|
16042
|
+
var Te = "top", We = "bottom", Ue = "right", De = "left", js = "auto", Ir = [Te, We, Ue, De], Pn = "start", Cr = "end", $w = "clippingParents", Vu = "viewport", Jn = "popper", Hw = "reference", Nl = /* @__PURE__ */ Ir.reduce(function(t, e) {
|
|
16013
16043
|
return t.concat([e + "-" + Pn, e + "-" + Cr]);
|
|
16014
16044
|
}, []), $u = /* @__PURE__ */ [].concat(Ir, [js]).reduce(function(t, e) {
|
|
16015
16045
|
return t.concat([e, e + "-" + Pn, e + "-" + Cr]);
|
|
16016
|
-
}, []),
|
|
16046
|
+
}, []), jw = "beforeRead", Ww = "read", Uw = "afterRead", qw = "beforeMain", Kw = "main", Xw = "afterMain", Jw = "beforeWrite", Yw = "write", Gw = "afterWrite", Zw = [jw, Ww, Uw, qw, Kw, Xw, Jw, Yw, Gw];
|
|
16017
16047
|
function st(t) {
|
|
16018
16048
|
return t ? (t.nodeName || "").toLowerCase() : null;
|
|
16019
16049
|
}
|
|
@@ -16026,7 +16056,7 @@ function Re(t) {
|
|
|
16026
16056
|
}
|
|
16027
16057
|
return t;
|
|
16028
16058
|
}
|
|
16029
|
-
function
|
|
16059
|
+
function un(t) {
|
|
16030
16060
|
var e = Re(t).Element;
|
|
16031
16061
|
return t instanceof e || t instanceof Element;
|
|
16032
16062
|
}
|
|
@@ -16040,7 +16070,7 @@ function Ws(t) {
|
|
|
16040
16070
|
var e = Re(t).ShadowRoot;
|
|
16041
16071
|
return t instanceof e || t instanceof ShadowRoot;
|
|
16042
16072
|
}
|
|
16043
|
-
function
|
|
16073
|
+
function Qw(t) {
|
|
16044
16074
|
var e = t.state;
|
|
16045
16075
|
Object.keys(e.elements).forEach(function(n) {
|
|
16046
16076
|
var r = e.styles[n] || {}, o = e.attributes[n] || {}, i = e.elements[n];
|
|
@@ -16050,7 +16080,7 @@ function Gw(t) {
|
|
|
16050
16080
|
}));
|
|
16051
16081
|
});
|
|
16052
16082
|
}
|
|
16053
|
-
function
|
|
16083
|
+
function ev(t) {
|
|
16054
16084
|
var e = t.state, n = {
|
|
16055
16085
|
popper: {
|
|
16056
16086
|
position: e.options.strategy,
|
|
@@ -16078,14 +16108,14 @@ const Hu = {
|
|
|
16078
16108
|
name: "applyStyles",
|
|
16079
16109
|
enabled: !0,
|
|
16080
16110
|
phase: "write",
|
|
16081
|
-
fn:
|
|
16082
|
-
effect:
|
|
16111
|
+
fn: Qw,
|
|
16112
|
+
effect: ev,
|
|
16083
16113
|
requires: ["computeStyles"]
|
|
16084
16114
|
};
|
|
16085
16115
|
function rt(t) {
|
|
16086
16116
|
return t.split("-")[0];
|
|
16087
16117
|
}
|
|
16088
|
-
var
|
|
16118
|
+
var sn = Math.max, Oo = Math.min, Rn = Math.round;
|
|
16089
16119
|
function us() {
|
|
16090
16120
|
var t = navigator.userAgentData;
|
|
16091
16121
|
return t != null && t.brands && Array.isArray(t.brands) ? t.brands.map(function(e) {
|
|
@@ -16099,7 +16129,7 @@ function Ln(t, e, n) {
|
|
|
16099
16129
|
e === void 0 && (e = !1), n === void 0 && (n = !1);
|
|
16100
16130
|
var r = t.getBoundingClientRect(), o = 1, i = 1;
|
|
16101
16131
|
e && je(t) && (o = t.offsetWidth > 0 && Rn(r.width) / t.offsetWidth || 1, i = t.offsetHeight > 0 && Rn(r.height) / t.offsetHeight || 1);
|
|
16102
|
-
var s =
|
|
16132
|
+
var s = un(t) ? Re(t) : window, a = s.visualViewport, l = !ju() && n, c = (r.left + (l && a ? a.offsetLeft : 0)) / o, d = (r.top + (l && a ? a.offsetTop : 0)) / i, u = r.width / o, f = r.height / i;
|
|
16103
16133
|
return {
|
|
16104
16134
|
width: u,
|
|
16105
16135
|
height: f,
|
|
@@ -16137,11 +16167,11 @@ function Wu(t, e) {
|
|
|
16137
16167
|
function Ct(t) {
|
|
16138
16168
|
return Re(t).getComputedStyle(t);
|
|
16139
16169
|
}
|
|
16140
|
-
function
|
|
16170
|
+
function tv(t) {
|
|
16141
16171
|
return ["table", "td", "th"].indexOf(st(t)) >= 0;
|
|
16142
16172
|
}
|
|
16143
16173
|
function Wt(t) {
|
|
16144
|
-
return ((
|
|
16174
|
+
return ((un(t) ? t.ownerDocument : (
|
|
16145
16175
|
// $FlowFixMe[prop-missing]
|
|
16146
16176
|
t.document
|
|
16147
16177
|
)) || window.document).documentElement;
|
|
@@ -16162,7 +16192,7 @@ function El(t) {
|
|
|
16162
16192
|
return !je(t) || // https://github.com/popperjs/popper-core/issues/837
|
|
16163
16193
|
Ct(t).position === "fixed" ? null : t.offsetParent;
|
|
16164
16194
|
}
|
|
16165
|
-
function
|
|
16195
|
+
function nv(t) {
|
|
16166
16196
|
var e = /firefox/i.test(us()), n = /Trident/i.test(us());
|
|
16167
16197
|
if (n && je(t)) {
|
|
16168
16198
|
var r = Ct(t);
|
|
@@ -16179,17 +16209,17 @@ function ev(t) {
|
|
|
16179
16209
|
return null;
|
|
16180
16210
|
}
|
|
16181
16211
|
function Pr(t) {
|
|
16182
|
-
for (var e = Re(t), n = El(t); n &&
|
|
16212
|
+
for (var e = Re(t), n = El(t); n && tv(n) && Ct(n).position === "static"; )
|
|
16183
16213
|
n = El(n);
|
|
16184
|
-
return n && (st(n) === "html" || st(n) === "body" && Ct(n).position === "static") ? e : n ||
|
|
16214
|
+
return n && (st(n) === "html" || st(n) === "body" && Ct(n).position === "static") ? e : n || nv(t) || e;
|
|
16185
16215
|
}
|
|
16186
16216
|
function qs(t) {
|
|
16187
16217
|
return ["top", "bottom"].indexOf(t) >= 0 ? "x" : "y";
|
|
16188
16218
|
}
|
|
16189
16219
|
function ir(t, e, n) {
|
|
16190
|
-
return
|
|
16220
|
+
return sn(t, Oo(e, n));
|
|
16191
16221
|
}
|
|
16192
|
-
function
|
|
16222
|
+
function rv(t, e, n) {
|
|
16193
16223
|
var r = ir(t, e, n);
|
|
16194
16224
|
return r > n ? n : r;
|
|
16195
16225
|
}
|
|
@@ -16209,41 +16239,41 @@ function Ku(t, e) {
|
|
|
16209
16239
|
return n[r] = t, n;
|
|
16210
16240
|
}, {});
|
|
16211
16241
|
}
|
|
16212
|
-
var
|
|
16242
|
+
var ov = function(e, n) {
|
|
16213
16243
|
return e = typeof e == "function" ? e(Object.assign({}, n.rects, {
|
|
16214
16244
|
placement: n.placement
|
|
16215
16245
|
})) : e, qu(typeof e != "number" ? e : Ku(e, Ir));
|
|
16216
16246
|
};
|
|
16217
|
-
function
|
|
16247
|
+
function iv(t) {
|
|
16218
16248
|
var e, n = t.state, r = t.name, o = t.options, i = n.elements.arrow, s = n.modifiersData.popperOffsets, a = rt(n.placement), l = qs(a), c = [De, Ue].indexOf(a) >= 0, d = c ? "height" : "width";
|
|
16219
16249
|
if (!(!i || !s)) {
|
|
16220
|
-
var u =
|
|
16250
|
+
var u = ov(o.padding, n), f = Us(i), p = l === "y" ? Te : De, h = l === "y" ? We : Ue, m = n.rects.reference[d] + n.rects.reference[l] - s[l] - n.rects.popper[d], g = s[l] - n.rects.reference[l], b = Pr(i), w = b ? l === "y" ? b.clientHeight || 0 : b.clientWidth || 0 : 0, C = m / 2 - g / 2, y = u[p], S = w - f[d] - u[h], k = w / 2 - f[d] / 2 + C, A = ir(y, k, S), L = l;
|
|
16221
16251
|
n.modifiersData[r] = (e = {}, e[L] = A, e.centerOffset = A - k, e);
|
|
16222
16252
|
}
|
|
16223
16253
|
}
|
|
16224
|
-
function
|
|
16254
|
+
function sv(t) {
|
|
16225
16255
|
var e = t.state, n = t.options, r = n.element, o = r === void 0 ? "[data-popper-arrow]" : r;
|
|
16226
16256
|
o != null && (typeof o == "string" && (o = e.elements.popper.querySelector(o), !o) || Wu(e.elements.popper, o) && (e.elements.arrow = o));
|
|
16227
16257
|
}
|
|
16228
|
-
const
|
|
16258
|
+
const av = {
|
|
16229
16259
|
name: "arrow",
|
|
16230
16260
|
enabled: !0,
|
|
16231
16261
|
phase: "main",
|
|
16232
|
-
fn:
|
|
16233
|
-
effect:
|
|
16262
|
+
fn: iv,
|
|
16263
|
+
effect: sv,
|
|
16234
16264
|
requires: ["popperOffsets"],
|
|
16235
16265
|
requiresIfExists: ["preventOverflow"]
|
|
16236
16266
|
};
|
|
16237
16267
|
function Fn(t) {
|
|
16238
16268
|
return t.split("-")[1];
|
|
16239
16269
|
}
|
|
16240
|
-
var
|
|
16270
|
+
var lv = {
|
|
16241
16271
|
top: "auto",
|
|
16242
16272
|
right: "auto",
|
|
16243
16273
|
bottom: "auto",
|
|
16244
16274
|
left: "auto"
|
|
16245
16275
|
};
|
|
16246
|
-
function
|
|
16276
|
+
function cv(t, e) {
|
|
16247
16277
|
var n = t.x, r = t.y, o = e.devicePixelRatio || 1;
|
|
16248
16278
|
return {
|
|
16249
16279
|
x: Rn(n * o) / o || 0,
|
|
@@ -16281,7 +16311,7 @@ function Il(t) {
|
|
|
16281
16311
|
}
|
|
16282
16312
|
var z = Object.assign({
|
|
16283
16313
|
position: a
|
|
16284
|
-
}, c &&
|
|
16314
|
+
}, c && lv), $ = d === !0 ? cv({
|
|
16285
16315
|
x: p,
|
|
16286
16316
|
y: m
|
|
16287
16317
|
}, Re(n)) : {
|
|
@@ -16294,7 +16324,7 @@ function Il(t) {
|
|
|
16294
16324
|
}
|
|
16295
16325
|
return Object.assign({}, z, (e = {}, e[y] = w ? m + "px" : "", e[C] = b ? p + "px" : "", e.transform = "", e));
|
|
16296
16326
|
}
|
|
16297
|
-
function
|
|
16327
|
+
function dv(t) {
|
|
16298
16328
|
var e = t.state, n = t.options, r = n.gpuAcceleration, o = r === void 0 ? !0 : r, i = n.adaptive, s = i === void 0 ? !0 : i, a = n.roundOffsets, l = a === void 0 ? !0 : a, c = {
|
|
16299
16329
|
placement: rt(e.placement),
|
|
16300
16330
|
variation: Fn(e.placement),
|
|
@@ -16317,17 +16347,17 @@ function lv(t) {
|
|
|
16317
16347
|
"data-popper-placement": e.placement
|
|
16318
16348
|
});
|
|
16319
16349
|
}
|
|
16320
|
-
const
|
|
16350
|
+
const uv = {
|
|
16321
16351
|
name: "computeStyles",
|
|
16322
16352
|
enabled: !0,
|
|
16323
16353
|
phase: "beforeWrite",
|
|
16324
|
-
fn:
|
|
16354
|
+
fn: dv,
|
|
16325
16355
|
data: {}
|
|
16326
16356
|
};
|
|
16327
16357
|
var Qr = {
|
|
16328
16358
|
passive: !0
|
|
16329
16359
|
};
|
|
16330
|
-
function
|
|
16360
|
+
function fv(t) {
|
|
16331
16361
|
var e = t.state, n = t.instance, r = t.options, o = r.scroll, i = o === void 0 ? !0 : o, s = r.resize, a = s === void 0 ? !0 : s, l = Re(e.elements.popper), c = [].concat(e.scrollParents.reference, e.scrollParents.popper);
|
|
16332
16362
|
return i && c.forEach(function(d) {
|
|
16333
16363
|
d.addEventListener("scroll", n.update, Qr);
|
|
@@ -16337,16 +16367,16 @@ function dv(t) {
|
|
|
16337
16367
|
}), a && l.removeEventListener("resize", n.update, Qr);
|
|
16338
16368
|
};
|
|
16339
16369
|
}
|
|
16340
|
-
const
|
|
16370
|
+
const pv = {
|
|
16341
16371
|
name: "eventListeners",
|
|
16342
16372
|
enabled: !0,
|
|
16343
16373
|
phase: "write",
|
|
16344
16374
|
fn: function() {
|
|
16345
16375
|
},
|
|
16346
|
-
effect:
|
|
16376
|
+
effect: fv,
|
|
16347
16377
|
data: {}
|
|
16348
16378
|
};
|
|
16349
|
-
var
|
|
16379
|
+
var hv = {
|
|
16350
16380
|
left: "right",
|
|
16351
16381
|
right: "left",
|
|
16352
16382
|
bottom: "top",
|
|
@@ -16354,16 +16384,16 @@ var fv = {
|
|
|
16354
16384
|
};
|
|
16355
16385
|
function uo(t) {
|
|
16356
16386
|
return t.replace(/left|right|bottom|top/g, function(e) {
|
|
16357
|
-
return
|
|
16387
|
+
return hv[e];
|
|
16358
16388
|
});
|
|
16359
16389
|
}
|
|
16360
|
-
var
|
|
16390
|
+
var mv = {
|
|
16361
16391
|
start: "end",
|
|
16362
16392
|
end: "start"
|
|
16363
16393
|
};
|
|
16364
16394
|
function Pl(t) {
|
|
16365
16395
|
return t.replace(/start|end/g, function(e) {
|
|
16366
|
-
return
|
|
16396
|
+
return mv[e];
|
|
16367
16397
|
});
|
|
16368
16398
|
}
|
|
16369
16399
|
function Ks(t) {
|
|
@@ -16376,7 +16406,7 @@ function Ks(t) {
|
|
|
16376
16406
|
function Xs(t) {
|
|
16377
16407
|
return Ln(Wt(t)).left + Ks(t).scrollLeft;
|
|
16378
16408
|
}
|
|
16379
|
-
function
|
|
16409
|
+
function gv(t, e) {
|
|
16380
16410
|
var n = Re(t), r = Wt(t), o = n.visualViewport, i = r.clientWidth, s = r.clientHeight, a = 0, l = 0;
|
|
16381
16411
|
if (o) {
|
|
16382
16412
|
i = o.width, s = o.height;
|
|
@@ -16390,9 +16420,9 @@ function hv(t, e) {
|
|
|
16390
16420
|
y: l
|
|
16391
16421
|
};
|
|
16392
16422
|
}
|
|
16393
|
-
function
|
|
16394
|
-
var e, n = Wt(t), r = Ks(t), o = (e = t.ownerDocument) == null ? void 0 : e.body, i =
|
|
16395
|
-
return Ct(o || n).direction === "rtl" && (a +=
|
|
16423
|
+
function yv(t) {
|
|
16424
|
+
var e, n = Wt(t), r = Ks(t), o = (e = t.ownerDocument) == null ? void 0 : e.body, i = sn(n.scrollWidth, n.clientWidth, o ? o.scrollWidth : 0, o ? o.clientWidth : 0), s = sn(n.scrollHeight, n.clientHeight, o ? o.scrollHeight : 0, o ? o.clientHeight : 0), a = -r.scrollLeft + Xs(t), l = -r.scrollTop;
|
|
16425
|
+
return Ct(o || n).direction === "rtl" && (a += sn(n.clientWidth, o ? o.clientWidth : 0) - i), {
|
|
16396
16426
|
width: i,
|
|
16397
16427
|
height: s,
|
|
16398
16428
|
x: a,
|
|
@@ -16423,23 +16453,23 @@ function fs(t) {
|
|
|
16423
16453
|
bottom: t.y + t.height
|
|
16424
16454
|
});
|
|
16425
16455
|
}
|
|
16426
|
-
function
|
|
16456
|
+
function bv(t, e) {
|
|
16427
16457
|
var n = Ln(t, !1, e === "fixed");
|
|
16428
16458
|
return n.top = n.top + t.clientTop, n.left = n.left + t.clientLeft, n.bottom = n.top + t.clientHeight, n.right = n.left + t.clientWidth, n.width = t.clientWidth, n.height = t.clientHeight, n.x = n.left, n.y = n.top, n;
|
|
16429
16459
|
}
|
|
16430
16460
|
function Rl(t, e, n) {
|
|
16431
|
-
return e === Vu ? fs(
|
|
16461
|
+
return e === Vu ? fs(gv(t, n)) : un(e) ? bv(e, n) : fs(yv(Wt(t)));
|
|
16432
16462
|
}
|
|
16433
|
-
function
|
|
16463
|
+
function wv(t) {
|
|
16434
16464
|
var e = sr(_o(t)), n = ["absolute", "fixed"].indexOf(Ct(t).position) >= 0, r = n && je(t) ? Pr(t) : t;
|
|
16435
|
-
return
|
|
16436
|
-
return
|
|
16465
|
+
return un(r) ? e.filter(function(o) {
|
|
16466
|
+
return un(o) && Wu(o, r) && st(o) !== "body";
|
|
16437
16467
|
}) : [];
|
|
16438
16468
|
}
|
|
16439
|
-
function
|
|
16440
|
-
var o = e === "clippingParents" ?
|
|
16469
|
+
function vv(t, e, n, r) {
|
|
16470
|
+
var o = e === "clippingParents" ? wv(t) : [].concat(e), i = [].concat(o, [n]), s = i[0], a = i.reduce(function(l, c) {
|
|
16441
16471
|
var d = Rl(t, c, r);
|
|
16442
|
-
return l.top =
|
|
16472
|
+
return l.top = sn(d.top, l.top), l.right = Oo(d.right, l.right), l.bottom = Oo(d.bottom, l.bottom), l.left = sn(d.left, l.left), l;
|
|
16443
16473
|
}, Rl(t, s, r));
|
|
16444
16474
|
return a.width = a.right - a.left, a.height = a.bottom - a.top, a.x = a.left, a.y = a.top, a;
|
|
16445
16475
|
}
|
|
@@ -16492,7 +16522,7 @@ function Ju(t) {
|
|
|
16492
16522
|
}
|
|
16493
16523
|
function Sr(t, e) {
|
|
16494
16524
|
e === void 0 && (e = {});
|
|
16495
|
-
var n = e, r = n.placement, o = r === void 0 ? t.placement : r, i = n.strategy, s = i === void 0 ? t.strategy : i, a = n.boundary, l = a === void 0 ?
|
|
16525
|
+
var n = e, r = n.placement, o = r === void 0 ? t.placement : r, i = n.strategy, s = i === void 0 ? t.strategy : i, a = n.boundary, l = a === void 0 ? $w : a, c = n.rootBoundary, d = c === void 0 ? Vu : c, u = n.elementContext, f = u === void 0 ? Jn : u, p = n.altBoundary, h = p === void 0 ? !1 : p, m = n.padding, g = m === void 0 ? 0 : m, b = qu(typeof g != "number" ? g : Ku(g, Ir)), w = f === Jn ? Hw : Jn, C = t.rects.popper, y = t.elements[h ? w : f], S = vv(un(y) ? y : y.contextElement || Wt(t.elements.popper), l, d, s), k = Ln(t.elements.reference), A = Ju({
|
|
16496
16526
|
reference: k,
|
|
16497
16527
|
element: C,
|
|
16498
16528
|
placement: o
|
|
@@ -16511,7 +16541,7 @@ function Sr(t, e) {
|
|
|
16511
16541
|
}
|
|
16512
16542
|
return _;
|
|
16513
16543
|
}
|
|
16514
|
-
function
|
|
16544
|
+
function kv(t, e) {
|
|
16515
16545
|
e === void 0 && (e = {});
|
|
16516
16546
|
var n = e, r = n.placement, o = n.boundary, i = n.rootBoundary, s = n.padding, a = n.flipVariations, l = n.allowedAutoPlacements, c = l === void 0 ? $u : l, d = Fn(r), u = d ? a ? Nl : Nl.filter(function(h) {
|
|
16517
16547
|
return Fn(h) === d;
|
|
@@ -16531,17 +16561,17 @@ function wv(t, e) {
|
|
|
16531
16561
|
return p[h] - p[m];
|
|
16532
16562
|
});
|
|
16533
16563
|
}
|
|
16534
|
-
function
|
|
16564
|
+
function Cv(t) {
|
|
16535
16565
|
if (rt(t) === js)
|
|
16536
16566
|
return [];
|
|
16537
16567
|
var e = uo(t);
|
|
16538
16568
|
return [Pl(t), e, Pl(e)];
|
|
16539
16569
|
}
|
|
16540
|
-
function
|
|
16570
|
+
function Sv(t) {
|
|
16541
16571
|
var e = t.state, n = t.options, r = t.name;
|
|
16542
16572
|
if (!e.modifiersData[r]._skip) {
|
|
16543
|
-
for (var o = n.mainAxis, i = o === void 0 ? !0 : o, s = n.altAxis, a = s === void 0 ? !0 : s, l = n.fallbackPlacements, c = n.padding, d = n.boundary, u = n.rootBoundary, f = n.altBoundary, p = n.flipVariations, h = p === void 0 ? !0 : p, m = n.allowedAutoPlacements, g = e.options.placement, b = rt(g), w = b === g, C = l || (w || !h ? [uo(g)] :
|
|
16544
|
-
return qe.concat(rt(Ne) === js ?
|
|
16573
|
+
for (var o = n.mainAxis, i = o === void 0 ? !0 : o, s = n.altAxis, a = s === void 0 ? !0 : s, l = n.fallbackPlacements, c = n.padding, d = n.boundary, u = n.rootBoundary, f = n.altBoundary, p = n.flipVariations, h = p === void 0 ? !0 : p, m = n.allowedAutoPlacements, g = e.options.placement, b = rt(g), w = b === g, C = l || (w || !h ? [uo(g)] : Cv(g)), y = [g].concat(C).reduce(function(qe, Ne) {
|
|
16574
|
+
return qe.concat(rt(Ne) === js ? kv(e, {
|
|
16545
16575
|
placement: Ne,
|
|
16546
16576
|
boundary: d,
|
|
16547
16577
|
rootBoundary: u,
|
|
@@ -16572,8 +16602,8 @@ function kv(t) {
|
|
|
16572
16602
|
var Ke = y.find(function(xt) {
|
|
16573
16603
|
var dt = A.get(xt);
|
|
16574
16604
|
if (dt)
|
|
16575
|
-
return dt.slice(0, Ne).every(function(
|
|
16576
|
-
return
|
|
16605
|
+
return dt.slice(0, Ne).every(function(fn) {
|
|
16606
|
+
return fn;
|
|
16577
16607
|
});
|
|
16578
16608
|
});
|
|
16579
16609
|
if (Ke)
|
|
@@ -16585,11 +16615,11 @@ function kv(t) {
|
|
|
16585
16615
|
e.placement !== x && (e.modifiersData[r]._skip = !0, e.placement = x, e.reset = !0);
|
|
16586
16616
|
}
|
|
16587
16617
|
}
|
|
16588
|
-
const
|
|
16618
|
+
const xv = {
|
|
16589
16619
|
name: "flip",
|
|
16590
16620
|
enabled: !0,
|
|
16591
16621
|
phase: "main",
|
|
16592
|
-
fn:
|
|
16622
|
+
fn: Sv,
|
|
16593
16623
|
requiresIfExists: ["offset"],
|
|
16594
16624
|
data: {
|
|
16595
16625
|
_skip: !1
|
|
@@ -16611,7 +16641,7 @@ function Fl(t) {
|
|
|
16611
16641
|
return t[e] >= 0;
|
|
16612
16642
|
});
|
|
16613
16643
|
}
|
|
16614
|
-
function
|
|
16644
|
+
function Mv(t) {
|
|
16615
16645
|
var e = t.state, n = t.name, r = e.rects.reference, o = e.rects.popper, i = e.modifiersData.preventOverflow, s = Sr(e, {
|
|
16616
16646
|
elementContext: "reference"
|
|
16617
16647
|
}), a = Sr(e, {
|
|
@@ -16627,14 +16657,14 @@ function Sv(t) {
|
|
|
16627
16657
|
"data-popper-escaped": u
|
|
16628
16658
|
});
|
|
16629
16659
|
}
|
|
16630
|
-
const
|
|
16660
|
+
const Av = {
|
|
16631
16661
|
name: "hide",
|
|
16632
16662
|
enabled: !0,
|
|
16633
16663
|
phase: "main",
|
|
16634
16664
|
requiresIfExists: ["preventOverflow"],
|
|
16635
|
-
fn:
|
|
16665
|
+
fn: Mv
|
|
16636
16666
|
};
|
|
16637
|
-
function
|
|
16667
|
+
function Ov(t, e, n) {
|
|
16638
16668
|
var r = rt(t), o = [De, Te].indexOf(r) >= 0 ? -1 : 1, i = typeof n == "function" ? n(Object.assign({}, e, {
|
|
16639
16669
|
placement: t
|
|
16640
16670
|
})) : n, s = i[0], a = i[1];
|
|
@@ -16646,20 +16676,20 @@ function Mv(t, e, n) {
|
|
|
16646
16676
|
y: a
|
|
16647
16677
|
};
|
|
16648
16678
|
}
|
|
16649
|
-
function
|
|
16679
|
+
function Tv(t) {
|
|
16650
16680
|
var e = t.state, n = t.options, r = t.name, o = n.offset, i = o === void 0 ? [0, 0] : o, s = $u.reduce(function(d, u) {
|
|
16651
|
-
return d[u] =
|
|
16681
|
+
return d[u] = Ov(u, e.rects, i), d;
|
|
16652
16682
|
}, {}), a = s[e.placement], l = a.x, c = a.y;
|
|
16653
16683
|
e.modifiersData.popperOffsets != null && (e.modifiersData.popperOffsets.x += l, e.modifiersData.popperOffsets.y += c), e.modifiersData[r] = s;
|
|
16654
16684
|
}
|
|
16655
|
-
const
|
|
16685
|
+
const Dv = {
|
|
16656
16686
|
name: "offset",
|
|
16657
16687
|
enabled: !0,
|
|
16658
16688
|
phase: "main",
|
|
16659
16689
|
requires: ["popperOffsets"],
|
|
16660
|
-
fn:
|
|
16690
|
+
fn: Tv
|
|
16661
16691
|
};
|
|
16662
|
-
function
|
|
16692
|
+
function Nv(t) {
|
|
16663
16693
|
var e = t.state, n = t.name;
|
|
16664
16694
|
e.modifiersData[n] = Ju({
|
|
16665
16695
|
reference: e.rects.reference,
|
|
@@ -16667,23 +16697,23 @@ function Tv(t) {
|
|
|
16667
16697
|
placement: e.placement
|
|
16668
16698
|
});
|
|
16669
16699
|
}
|
|
16670
|
-
const
|
|
16700
|
+
const Ev = {
|
|
16671
16701
|
name: "popperOffsets",
|
|
16672
16702
|
enabled: !0,
|
|
16673
16703
|
phase: "read",
|
|
16674
|
-
fn:
|
|
16704
|
+
fn: Nv,
|
|
16675
16705
|
data: {}
|
|
16676
16706
|
};
|
|
16677
|
-
function
|
|
16707
|
+
function Iv(t) {
|
|
16678
16708
|
return t === "x" ? "y" : "x";
|
|
16679
16709
|
}
|
|
16680
|
-
function
|
|
16710
|
+
function Pv(t) {
|
|
16681
16711
|
var e = t.state, n = t.options, r = t.name, o = n.mainAxis, i = o === void 0 ? !0 : o, s = n.altAxis, a = s === void 0 ? !1 : s, l = n.boundary, c = n.rootBoundary, d = n.altBoundary, u = n.padding, f = n.tether, p = f === void 0 ? !0 : f, h = n.tetherOffset, m = h === void 0 ? 0 : h, g = Sr(e, {
|
|
16682
16712
|
boundary: l,
|
|
16683
16713
|
rootBoundary: c,
|
|
16684
16714
|
padding: u,
|
|
16685
16715
|
altBoundary: d
|
|
16686
|
-
}), b = rt(e.placement), w = Fn(e.placement), C = !w, y = qs(b), S =
|
|
16716
|
+
}), b = rt(e.placement), w = Fn(e.placement), C = !w, y = qs(b), S = Iv(y), k = e.modifiersData.popperOffsets, A = e.rects.reference, L = e.rects.popper, x = typeof m == "function" ? m(Object.assign({}, e.rects, {
|
|
16687
16717
|
placement: e.placement
|
|
16688
16718
|
})) : m, _ = typeof x == "number" ? {
|
|
16689
16719
|
mainAxis: x,
|
|
@@ -16700,39 +16730,39 @@ function Ev(t) {
|
|
|
16700
16730
|
var j, se = y === "y" ? Te : De, ce = y === "y" ? We : Ue, ae = y === "y" ? "height" : "width", ee = k[y], ne = ee + g[se], ve = ee - g[ce], ke = p ? -L[ae] / 2 : 0, lt = w === Pn ? A[ae] : L[ae], Fe = w === Pn ? -L[ae] : -A[ae], ct = e.elements.arrow, qe = p && ct ? Us(ct) : {
|
|
16701
16731
|
width: 0,
|
|
16702
16732
|
height: 0
|
|
16703
|
-
}, Ne = e.modifiersData["arrow#persistent"] ? e.modifiersData["arrow#persistent"].padding : Uu(), Ke = Ne[se], xt = Ne[ce], dt = ir(0, A[ae], qe[ae]),
|
|
16733
|
+
}, Ne = e.modifiersData["arrow#persistent"] ? e.modifiersData["arrow#persistent"].padding : Uu(), Ke = Ne[se], xt = Ne[ce], dt = ir(0, A[ae], qe[ae]), fn = C ? A[ae] / 2 - ke - dt - Ke - _.mainAxis : lt - dt - Ke - _.mainAxis, Mt = C ? -A[ae] / 2 + ke + dt + xt + _.mainAxis : Fe + dt + xt + _.mainAxis, pn = e.elements.arrow && Pr(e.elements.arrow), Lr = pn ? y === "y" ? pn.clientTop || 0 : pn.clientLeft || 0 : 0, Hn = (j = z?.[y]) != null ? j : 0, Fr = ee + fn - Hn - Lr, Br = ee + Mt - Hn, jn = ir(p ? Oo(ne, Fr) : ne, ee, p ? sn(ve, Br) : ve);
|
|
16704
16734
|
k[y] = jn, $[y] = jn - ee;
|
|
16705
16735
|
}
|
|
16706
16736
|
if (a) {
|
|
16707
|
-
var Wn, zr = y === "x" ? Te : De, _r = y === "x" ? We : Ue, ut = k[S], At = S === "y" ? "height" : "width", Un = ut + g[zr], Ut = ut - g[_r], qn = [Te, De].indexOf(b) !== -1, Vr = (Wn = z?.[S]) != null ? Wn : 0, $r = qn ? Un : ut - A[At] - L[At] - Vr + _.altAxis, Hr = qn ? ut + A[At] + L[At] - Vr - _.altAxis : Ut, jr = p && qn ?
|
|
16737
|
+
var Wn, zr = y === "x" ? Te : De, _r = y === "x" ? We : Ue, ut = k[S], At = S === "y" ? "height" : "width", Un = ut + g[zr], Ut = ut - g[_r], qn = [Te, De].indexOf(b) !== -1, Vr = (Wn = z?.[S]) != null ? Wn : 0, $r = qn ? Un : ut - A[At] - L[At] - Vr + _.altAxis, Hr = qn ? ut + A[At] + L[At] - Vr - _.altAxis : Ut, jr = p && qn ? rv($r, ut, Hr) : ir(p ? $r : Un, ut, p ? Hr : Ut);
|
|
16708
16738
|
k[S] = jr, $[S] = jr - ut;
|
|
16709
16739
|
}
|
|
16710
16740
|
e.modifiersData[r] = $;
|
|
16711
16741
|
}
|
|
16712
16742
|
}
|
|
16713
|
-
const
|
|
16743
|
+
const Rv = {
|
|
16714
16744
|
name: "preventOverflow",
|
|
16715
16745
|
enabled: !0,
|
|
16716
16746
|
phase: "main",
|
|
16717
|
-
fn:
|
|
16747
|
+
fn: Pv,
|
|
16718
16748
|
requiresIfExists: ["offset"]
|
|
16719
16749
|
};
|
|
16720
|
-
function
|
|
16750
|
+
function Lv(t) {
|
|
16721
16751
|
return {
|
|
16722
16752
|
scrollLeft: t.scrollLeft,
|
|
16723
16753
|
scrollTop: t.scrollTop
|
|
16724
16754
|
};
|
|
16725
16755
|
}
|
|
16726
|
-
function
|
|
16727
|
-
return t === Re(t) || !je(t) ? Ks(t) :
|
|
16756
|
+
function Fv(t) {
|
|
16757
|
+
return t === Re(t) || !je(t) ? Ks(t) : Lv(t);
|
|
16728
16758
|
}
|
|
16729
|
-
function
|
|
16759
|
+
function Bv(t) {
|
|
16730
16760
|
var e = t.getBoundingClientRect(), n = Rn(e.width) / t.offsetWidth || 1, r = Rn(e.height) / t.offsetHeight || 1;
|
|
16731
16761
|
return n !== 1 || r !== 1;
|
|
16732
16762
|
}
|
|
16733
|
-
function
|
|
16763
|
+
function zv(t, e, n) {
|
|
16734
16764
|
n === void 0 && (n = !1);
|
|
16735
|
-
var r = je(e), o = je(e) &&
|
|
16765
|
+
var r = je(e), o = je(e) && Bv(e), i = Wt(e), s = Ln(t, o, n), a = {
|
|
16736
16766
|
scrollLeft: 0,
|
|
16737
16767
|
scrollTop: 0
|
|
16738
16768
|
}, l = {
|
|
@@ -16740,14 +16770,14 @@ function Fv(t, e, n) {
|
|
|
16740
16770
|
y: 0
|
|
16741
16771
|
};
|
|
16742
16772
|
return (r || !r && !n) && ((st(e) !== "body" || // https://github.com/popperjs/popper-core/issues/1078
|
|
16743
|
-
Js(i)) && (a =
|
|
16773
|
+
Js(i)) && (a = Fv(e)), je(e) ? (l = Ln(e, !0), l.x += e.clientLeft, l.y += e.clientTop) : i && (l.x = Xs(i))), {
|
|
16744
16774
|
x: s.left + a.scrollLeft - l.x,
|
|
16745
16775
|
y: s.top + a.scrollTop - l.y,
|
|
16746
16776
|
width: s.width,
|
|
16747
16777
|
height: s.height
|
|
16748
16778
|
};
|
|
16749
16779
|
}
|
|
16750
|
-
function
|
|
16780
|
+
function _v(t) {
|
|
16751
16781
|
var e = /* @__PURE__ */ new Map(), n = /* @__PURE__ */ new Set(), r = [];
|
|
16752
16782
|
t.forEach(function(i) {
|
|
16753
16783
|
e.set(i.name, i);
|
|
@@ -16766,15 +16796,15 @@ function Bv(t) {
|
|
|
16766
16796
|
n.has(i.name) || o(i);
|
|
16767
16797
|
}), r;
|
|
16768
16798
|
}
|
|
16769
|
-
function
|
|
16770
|
-
var e =
|
|
16771
|
-
return
|
|
16799
|
+
function Vv(t) {
|
|
16800
|
+
var e = _v(t);
|
|
16801
|
+
return Zw.reduce(function(n, r) {
|
|
16772
16802
|
return n.concat(e.filter(function(o) {
|
|
16773
16803
|
return o.phase === r;
|
|
16774
16804
|
}));
|
|
16775
16805
|
}, []);
|
|
16776
16806
|
}
|
|
16777
|
-
function
|
|
16807
|
+
function $v(t) {
|
|
16778
16808
|
var e;
|
|
16779
16809
|
return function() {
|
|
16780
16810
|
return e || (e = new Promise(function(n) {
|
|
@@ -16784,7 +16814,7 @@ function _v(t) {
|
|
|
16784
16814
|
})), e;
|
|
16785
16815
|
};
|
|
16786
16816
|
}
|
|
16787
|
-
function
|
|
16817
|
+
function Hv(t) {
|
|
16788
16818
|
var e = t.reduce(function(n, r) {
|
|
16789
16819
|
var o = n[r.name];
|
|
16790
16820
|
return n[r.name] = o ? Object.assign({}, o, r, {
|
|
@@ -16808,7 +16838,7 @@ function zl() {
|
|
|
16808
16838
|
return !(r && typeof r.getBoundingClientRect == "function");
|
|
16809
16839
|
});
|
|
16810
16840
|
}
|
|
16811
|
-
function
|
|
16841
|
+
function jv(t) {
|
|
16812
16842
|
t === void 0 && (t = {});
|
|
16813
16843
|
var e = t, n = e.defaultModifiers, r = n === void 0 ? [] : n, o = e.defaultOptions, i = o === void 0 ? Bl : o;
|
|
16814
16844
|
return function(a, l, c) {
|
|
@@ -16829,10 +16859,10 @@ function $v(t) {
|
|
|
16829
16859
|
setOptions: function(b) {
|
|
16830
16860
|
var w = typeof b == "function" ? b(d.options) : b;
|
|
16831
16861
|
m(), d.options = Object.assign({}, i, d.options, w), d.scrollParents = {
|
|
16832
|
-
reference:
|
|
16862
|
+
reference: un(a) ? sr(a) : a.contextElement ? sr(a.contextElement) : [],
|
|
16833
16863
|
popper: sr(l)
|
|
16834
16864
|
};
|
|
16835
|
-
var C =
|
|
16865
|
+
var C = Vv(Hv([].concat(r, d.options.modifiers)));
|
|
16836
16866
|
return d.orderedModifiers = C.filter(function(y) {
|
|
16837
16867
|
return y.enabled;
|
|
16838
16868
|
}), h(), p.update();
|
|
@@ -16847,7 +16877,7 @@ function $v(t) {
|
|
|
16847
16877
|
var b = d.elements, w = b.reference, C = b.popper;
|
|
16848
16878
|
if (zl(w, C)) {
|
|
16849
16879
|
d.rects = {
|
|
16850
|
-
reference:
|
|
16880
|
+
reference: zv(w, Pr(C), d.options.strategy === "fixed"),
|
|
16851
16881
|
popper: Us(C)
|
|
16852
16882
|
}, d.reset = !1, d.placement = d.options.placement, d.orderedModifiers.forEach(function(_) {
|
|
16853
16883
|
return d.modifiersData[_.name] = Object.assign({}, _.data);
|
|
@@ -16870,7 +16900,7 @@ function $v(t) {
|
|
|
16870
16900
|
},
|
|
16871
16901
|
// Async and optimistically optimized update – it will not be executed if
|
|
16872
16902
|
// not necessary (debounced to run at most once-per-tick)
|
|
16873
|
-
update:
|
|
16903
|
+
update: $v(function() {
|
|
16874
16904
|
return new Promise(function(g) {
|
|
16875
16905
|
p.forceUpdate(), g(d);
|
|
16876
16906
|
});
|
|
@@ -16907,15 +16937,15 @@ function $v(t) {
|
|
|
16907
16937
|
return p;
|
|
16908
16938
|
};
|
|
16909
16939
|
}
|
|
16910
|
-
var
|
|
16911
|
-
defaultModifiers:
|
|
16912
|
-
}),
|
|
16940
|
+
var Wv = [pv, Ev, uv, Hu, Dv, xv, Rv, av, Av], Uv = /* @__PURE__ */ jv({
|
|
16941
|
+
defaultModifiers: Wv
|
|
16942
|
+
}), qv = "tippy-box", Yu = "tippy-content", Kv = "tippy-backdrop", Gu = "tippy-arrow", Zu = "tippy-svg-arrow", Yt = {
|
|
16913
16943
|
passive: !0,
|
|
16914
16944
|
capture: !0
|
|
16915
16945
|
}, Qu = function() {
|
|
16916
16946
|
return document.body;
|
|
16917
16947
|
};
|
|
16918
|
-
function
|
|
16948
|
+
function Xv(t, e) {
|
|
16919
16949
|
return {}.hasOwnProperty.call(t, e);
|
|
16920
16950
|
}
|
|
16921
16951
|
function ui(t, e, n) {
|
|
@@ -16942,27 +16972,27 @@ function _l(t, e) {
|
|
|
16942
16972
|
}, e);
|
|
16943
16973
|
};
|
|
16944
16974
|
}
|
|
16945
|
-
function
|
|
16975
|
+
function Jv(t, e) {
|
|
16946
16976
|
var n = Object.assign({}, t);
|
|
16947
16977
|
return e.forEach(function(r) {
|
|
16948
16978
|
delete n[r];
|
|
16949
16979
|
}), n;
|
|
16950
16980
|
}
|
|
16951
|
-
function
|
|
16981
|
+
function Yv(t) {
|
|
16952
16982
|
return t.split(/\s+/).filter(Boolean);
|
|
16953
16983
|
}
|
|
16954
|
-
function
|
|
16984
|
+
function Mn(t) {
|
|
16955
16985
|
return [].concat(t);
|
|
16956
16986
|
}
|
|
16957
16987
|
function Vl(t, e) {
|
|
16958
16988
|
t.indexOf(e) === -1 && t.push(e);
|
|
16959
16989
|
}
|
|
16960
|
-
function
|
|
16990
|
+
function Gv(t) {
|
|
16961
16991
|
return t.filter(function(e, n) {
|
|
16962
16992
|
return t.indexOf(e) === n;
|
|
16963
16993
|
});
|
|
16964
16994
|
}
|
|
16965
|
-
function
|
|
16995
|
+
function Zv(t) {
|
|
16966
16996
|
return t.split("-")[0];
|
|
16967
16997
|
}
|
|
16968
16998
|
function To(t) {
|
|
@@ -16981,17 +17011,17 @@ function xr(t) {
|
|
|
16981
17011
|
return Ys(t, e);
|
|
16982
17012
|
});
|
|
16983
17013
|
}
|
|
16984
|
-
function
|
|
17014
|
+
function Qv(t) {
|
|
16985
17015
|
return Ys(t, "NodeList");
|
|
16986
17016
|
}
|
|
16987
|
-
function
|
|
17017
|
+
function ek(t) {
|
|
16988
17018
|
return Ys(t, "MouseEvent");
|
|
16989
17019
|
}
|
|
16990
|
-
function
|
|
17020
|
+
function tk(t) {
|
|
16991
17021
|
return !!(t && t._tippy && t._tippy.reference === t);
|
|
16992
17022
|
}
|
|
16993
|
-
function
|
|
16994
|
-
return xr(t) ? [t] :
|
|
17023
|
+
function nk(t) {
|
|
17024
|
+
return xr(t) ? [t] : Qv(t) ? To(t) : Array.isArray(t) ? t : To(document.querySelectorAll(t));
|
|
16995
17025
|
}
|
|
16996
17026
|
function fi(t, e) {
|
|
16997
17027
|
t.forEach(function(n) {
|
|
@@ -17003,14 +17033,14 @@ function Hl(t, e) {
|
|
|
17003
17033
|
n && n.setAttribute("data-state", e);
|
|
17004
17034
|
});
|
|
17005
17035
|
}
|
|
17006
|
-
function
|
|
17007
|
-
var e, n =
|
|
17036
|
+
function rk(t) {
|
|
17037
|
+
var e, n = Mn(t), r = n[0];
|
|
17008
17038
|
return r != null && (e = r.ownerDocument) != null && e.body ? r.ownerDocument : document;
|
|
17009
17039
|
}
|
|
17010
|
-
function
|
|
17040
|
+
function ok(t, e) {
|
|
17011
17041
|
var n = e.clientX, r = e.clientY;
|
|
17012
17042
|
return t.every(function(o) {
|
|
17013
|
-
var i = o.popperRect, s = o.popperState, a = o.props, l = a.interactiveBorder, c =
|
|
17043
|
+
var i = o.popperRect, s = o.popperState, a = o.props, l = a.interactiveBorder, c = Zv(s.placement), d = s.modifiersData.offset;
|
|
17014
17044
|
if (!d)
|
|
17015
17045
|
return !0;
|
|
17016
17046
|
var u = c === "bottom" ? d.top.y : 0, f = c === "top" ? d.bottom.y : 0, p = c === "right" ? d.left.x : 0, h = c === "left" ? d.right.x : 0, m = i.top - r + u > l, g = r - i.bottom - f > l, b = i.left - n + p > l, w = n - i.right - h > l;
|
|
@@ -17035,28 +17065,28 @@ function jl(t, e) {
|
|
|
17035
17065
|
var tt = {
|
|
17036
17066
|
isTouch: !1
|
|
17037
17067
|
}, Wl = 0;
|
|
17038
|
-
function
|
|
17068
|
+
function ik() {
|
|
17039
17069
|
tt.isTouch || (tt.isTouch = !0, window.performance && document.addEventListener("mousemove", tf));
|
|
17040
17070
|
}
|
|
17041
17071
|
function tf() {
|
|
17042
17072
|
var t = performance.now();
|
|
17043
17073
|
t - Wl < 20 && (tt.isTouch = !1, document.removeEventListener("mousemove", tf)), Wl = t;
|
|
17044
17074
|
}
|
|
17045
|
-
function
|
|
17075
|
+
function sk() {
|
|
17046
17076
|
var t = document.activeElement;
|
|
17047
|
-
if (
|
|
17077
|
+
if (tk(t)) {
|
|
17048
17078
|
var e = t._tippy;
|
|
17049
17079
|
t.blur && !e.state.isVisible && t.blur();
|
|
17050
17080
|
}
|
|
17051
17081
|
}
|
|
17052
|
-
function
|
|
17053
|
-
document.addEventListener("touchstart",
|
|
17082
|
+
function ak() {
|
|
17083
|
+
document.addEventListener("touchstart", ik, Yt), window.addEventListener("blur", sk);
|
|
17054
17084
|
}
|
|
17055
|
-
var
|
|
17085
|
+
var lk = typeof window < "u" && typeof document < "u", ck = lk ? (
|
|
17056
17086
|
// @ts-ignore
|
|
17057
17087
|
!!window.msCrypto
|
|
17058
17088
|
) : !1;
|
|
17059
|
-
function
|
|
17089
|
+
function vn(t) {
|
|
17060
17090
|
var e = t === "destroy" ? "n already-" : " ";
|
|
17061
17091
|
return [t + "() was called on a" + e + "destroyed instance. This is a no-op but", "indicates a potential memory leak."].join(" ");
|
|
17062
17092
|
}
|
|
@@ -17064,7 +17094,7 @@ function Ul(t) {
|
|
|
17064
17094
|
var e = /[ \t]{2,}/g, n = /^[ \t]*/gm;
|
|
17065
17095
|
return t.replace(e, " ").replace(n, "").trim();
|
|
17066
17096
|
}
|
|
17067
|
-
function
|
|
17097
|
+
function dk(t) {
|
|
17068
17098
|
return Ul(`
|
|
17069
17099
|
%ctippy.js
|
|
17070
17100
|
|
|
@@ -17075,7 +17105,7 @@ function lk(t) {
|
|
|
17075
17105
|
}
|
|
17076
17106
|
function nf(t) {
|
|
17077
17107
|
return [
|
|
17078
|
-
|
|
17108
|
+
dk(t),
|
|
17079
17109
|
// title
|
|
17080
17110
|
"color: #00C584; font-size: 1.3em; font-weight: bold;",
|
|
17081
17111
|
// message
|
|
@@ -17085,8 +17115,8 @@ function nf(t) {
|
|
|
17085
17115
|
];
|
|
17086
17116
|
}
|
|
17087
17117
|
var Mr;
|
|
17088
|
-
ie.env.NODE_ENV !== "production" &&
|
|
17089
|
-
function
|
|
17118
|
+
ie.env.NODE_ENV !== "production" && uk();
|
|
17119
|
+
function uk() {
|
|
17090
17120
|
Mr = /* @__PURE__ */ new Set();
|
|
17091
17121
|
}
|
|
17092
17122
|
function gt(t, e) {
|
|
@@ -17101,7 +17131,7 @@ function ps(t, e) {
|
|
|
17101
17131
|
Mr.add(e), (n = console).error.apply(n, nf(e));
|
|
17102
17132
|
}
|
|
17103
17133
|
}
|
|
17104
|
-
function
|
|
17134
|
+
function fk(t) {
|
|
17105
17135
|
var e = !t, n = Object.prototype.toString.call(t) === "[object Object]" && !t.addEventListener;
|
|
17106
17136
|
ps(e, ["tippy() was passed", "`" + String(t) + "`", "as its targets (first) argument. Valid types are: String, Element,", "Element[], or NodeList."].join(" ")), ps(n, ["tippy() was passed a plain object which is not supported as an argument", "for virtual positioning. Use props.getReferenceClientRect instead."].join(" "));
|
|
17107
17137
|
}
|
|
@@ -17110,7 +17140,7 @@ var rf = {
|
|
|
17110
17140
|
followCursor: !1,
|
|
17111
17141
|
inlinePositioning: !1,
|
|
17112
17142
|
sticky: !1
|
|
17113
|
-
},
|
|
17143
|
+
}, pk = {
|
|
17114
17144
|
allowHTML: !1,
|
|
17115
17145
|
animation: "fade",
|
|
17116
17146
|
arrow: !0,
|
|
@@ -17168,7 +17198,7 @@ var rf = {
|
|
|
17168
17198
|
touch: !0,
|
|
17169
17199
|
trigger: "mouseenter focus",
|
|
17170
17200
|
triggerTarget: null
|
|
17171
|
-
}, rf,
|
|
17201
|
+
}, rf, pk), hk = Object.keys(Ie), mk = function(e) {
|
|
17172
17202
|
ie.env.NODE_ENV !== "production" && sf(e, []);
|
|
17173
17203
|
var n = Object.keys(e);
|
|
17174
17204
|
n.forEach(function(r) {
|
|
@@ -17186,10 +17216,10 @@ function of(t) {
|
|
|
17186
17216
|
}, {});
|
|
17187
17217
|
return Object.assign({}, t, n);
|
|
17188
17218
|
}
|
|
17189
|
-
function
|
|
17219
|
+
function gk(t, e) {
|
|
17190
17220
|
var n = e ? Object.keys(of(Object.assign({}, Ie, {
|
|
17191
17221
|
plugins: e
|
|
17192
|
-
}))) :
|
|
17222
|
+
}))) : hk, r = n.reduce(function(o, i) {
|
|
17193
17223
|
var s = (t.getAttribute("data-tippy-" + i) || "").trim();
|
|
17194
17224
|
if (!s)
|
|
17195
17225
|
return o;
|
|
@@ -17208,7 +17238,7 @@ function hk(t, e) {
|
|
|
17208
17238
|
function ql(t, e) {
|
|
17209
17239
|
var n = Object.assign({}, e, {
|
|
17210
17240
|
content: ef(e.content, [t])
|
|
17211
|
-
}, e.ignoreAttributes ? {} :
|
|
17241
|
+
}, e.ignoreAttributes ? {} : gk(t, e.plugins));
|
|
17212
17242
|
return n.aria = Object.assign({}, Ie.aria, n.aria), n.aria = {
|
|
17213
17243
|
expanded: n.aria.expanded === "auto" ? e.interactive : n.aria.expanded,
|
|
17214
17244
|
content: n.aria.content === "auto" ? e.interactive ? null : "describedby" : n.aria.content
|
|
@@ -17218,7 +17248,7 @@ function sf(t, e) {
|
|
|
17218
17248
|
t === void 0 && (t = {}), e === void 0 && (e = []);
|
|
17219
17249
|
var n = Object.keys(t);
|
|
17220
17250
|
n.forEach(function(r) {
|
|
17221
|
-
var o =
|
|
17251
|
+
var o = Jv(Ie, Object.keys(rf)), i = !Xv(o, r);
|
|
17222
17252
|
i && (i = e.filter(function(s) {
|
|
17223
17253
|
return s.name === r;
|
|
17224
17254
|
}).length === 0), gt(i, ["`" + r + "`", "is not a valid prop. You may have spelled it incorrectly, or if it's", "a plugin, forgot to pass it in an array as props.plugins.", `
|
|
@@ -17227,11 +17257,11 @@ function sf(t, e) {
|
|
|
17227
17257
|
`, "Plugins: https://atomiks.github.io/tippyjs/v6/plugins/"].join(" "));
|
|
17228
17258
|
});
|
|
17229
17259
|
}
|
|
17230
|
-
var
|
|
17260
|
+
var yk = function() {
|
|
17231
17261
|
return "innerHTML";
|
|
17232
17262
|
};
|
|
17233
17263
|
function hs(t, e) {
|
|
17234
|
-
t[
|
|
17264
|
+
t[yk()] = e;
|
|
17235
17265
|
}
|
|
17236
17266
|
function Kl(t) {
|
|
17237
17267
|
var e = ar();
|
|
@@ -17251,13 +17281,13 @@ function ms(t) {
|
|
|
17251
17281
|
return r.classList.contains(Gu) || r.classList.contains(Zu);
|
|
17252
17282
|
}),
|
|
17253
17283
|
backdrop: n.find(function(r) {
|
|
17254
|
-
return r.classList.contains(
|
|
17284
|
+
return r.classList.contains(Kv);
|
|
17255
17285
|
})
|
|
17256
17286
|
};
|
|
17257
17287
|
}
|
|
17258
17288
|
function af(t) {
|
|
17259
17289
|
var e = ar(), n = ar();
|
|
17260
|
-
n.className =
|
|
17290
|
+
n.className = qv, n.setAttribute("data-state", "hidden"), n.setAttribute("tabindex", "-1");
|
|
17261
17291
|
var r = ar();
|
|
17262
17292
|
r.className = Yu, r.setAttribute("data-state", "hidden"), Xl(r, t.props), e.appendChild(n), n.appendChild(r), o(t.props, t.props);
|
|
17263
17293
|
function o(i, s) {
|
|
@@ -17270,9 +17300,9 @@ function af(t) {
|
|
|
17270
17300
|
};
|
|
17271
17301
|
}
|
|
17272
17302
|
af.$$tippy = !0;
|
|
17273
|
-
var
|
|
17274
|
-
function
|
|
17275
|
-
var n = ql(t, Object.assign({}, Ie, of($l(e)))), r, o, i, s = !1, a = !1, l = !1, c = !1, d, u, f, p = [], h = _l(Fr, n.interactiveDebounce), m, g =
|
|
17303
|
+
var bk = 1, eo = [], hi = [];
|
|
17304
|
+
function wk(t, e) {
|
|
17305
|
+
var n = ql(t, Object.assign({}, Ie, of($l(e)))), r, o, i, s = !1, a = !1, l = !1, c = !1, d, u, f, p = [], h = _l(Fr, n.interactiveDebounce), m, g = bk++, b = null, w = Gv(n.plugins), C = {
|
|
17276
17306
|
// Is the instance currently enabled?
|
|
17277
17307
|
isEnabled: !0,
|
|
17278
17308
|
// Is the tippy currently showing and not transitioning out?
|
|
@@ -17311,7 +17341,7 @@ function yk(t, e) {
|
|
|
17311
17341
|
var L = w.map(function(v) {
|
|
17312
17342
|
return v.fn(y);
|
|
17313
17343
|
}), x = t.hasAttribute("aria-expanded");
|
|
17314
|
-
return
|
|
17344
|
+
return pn(), ke(), ee(), ne("onCreate", [y]), n.showOnCreate && Un(), k.addEventListener("mouseenter", function() {
|
|
17315
17345
|
y.props.interactive && y.state.isVisible && y.clearDelayTimeouts();
|
|
17316
17346
|
}), k.addEventListener("mouseleave", function() {
|
|
17317
17347
|
y.props.interactive && y.props.trigger.indexOf("mouseenter") >= 0 && se().addEventListener("mousemove", h);
|
|
@@ -17332,7 +17362,7 @@ function yk(t, e) {
|
|
|
17332
17362
|
}
|
|
17333
17363
|
function se() {
|
|
17334
17364
|
var v = j().parentNode;
|
|
17335
|
-
return v ?
|
|
17365
|
+
return v ? rk(v) : document;
|
|
17336
17366
|
}
|
|
17337
17367
|
function ce() {
|
|
17338
17368
|
return ms(k);
|
|
@@ -17354,7 +17384,7 @@ function yk(t, e) {
|
|
|
17354
17384
|
function ve() {
|
|
17355
17385
|
var v = y.props.aria;
|
|
17356
17386
|
if (v.content) {
|
|
17357
|
-
var O = "aria-" + v.content, R = k.id, q =
|
|
17387
|
+
var O = "aria-" + v.content, R = k.id, q = Mn(y.props.triggerTarget || t);
|
|
17358
17388
|
q.forEach(function(U) {
|
|
17359
17389
|
var Ce = U.getAttribute(O);
|
|
17360
17390
|
if (y.state.isVisible)
|
|
@@ -17368,7 +17398,7 @@ function yk(t, e) {
|
|
|
17368
17398
|
}
|
|
17369
17399
|
function ke() {
|
|
17370
17400
|
if (!(x || !y.props.aria.expanded)) {
|
|
17371
|
-
var v =
|
|
17401
|
+
var v = Mn(y.props.triggerTarget || t);
|
|
17372
17402
|
v.forEach(function(O) {
|
|
17373
17403
|
y.props.interactive ? O.setAttribute("aria-expanded", y.state.isVisible && O === j() ? "true" : "false") : O.removeAttribute("aria-expanded");
|
|
17374
17404
|
});
|
|
@@ -17383,7 +17413,7 @@ function yk(t, e) {
|
|
|
17383
17413
|
if (!(tt.isTouch && (l || v.type === "mousedown"))) {
|
|
17384
17414
|
var O = v.composedPath && v.composedPath()[0] || v.target;
|
|
17385
17415
|
if (!(y.props.interactive && jl(k, O))) {
|
|
17386
|
-
if (
|
|
17416
|
+
if (Mn(y.props.triggerTarget || t).some(function(R) {
|
|
17387
17417
|
return jl(R, O);
|
|
17388
17418
|
})) {
|
|
17389
17419
|
if (tt.isTouch || y.state.isVisible && y.props.trigger.indexOf("click") >= 0)
|
|
@@ -17411,14 +17441,14 @@ function yk(t, e) {
|
|
|
17411
17441
|
v.removeEventListener("mousedown", Fe, !0), v.removeEventListener("touchend", Fe, Yt), v.removeEventListener("touchstart", qe, Yt), v.removeEventListener("touchmove", ct, Yt);
|
|
17412
17442
|
}
|
|
17413
17443
|
function xt(v, O) {
|
|
17414
|
-
|
|
17444
|
+
fn(v, function() {
|
|
17415
17445
|
!y.state.isVisible && k.parentNode && k.parentNode.contains(k) && O();
|
|
17416
17446
|
});
|
|
17417
17447
|
}
|
|
17418
17448
|
function dt(v, O) {
|
|
17419
|
-
|
|
17449
|
+
fn(v, O);
|
|
17420
17450
|
}
|
|
17421
|
-
function
|
|
17451
|
+
function fn(v, O) {
|
|
17422
17452
|
var R = ce().box;
|
|
17423
17453
|
function q(U) {
|
|
17424
17454
|
U.target === R && (pi(R, "remove", q), O());
|
|
@@ -17429,7 +17459,7 @@ function yk(t, e) {
|
|
|
17429
17459
|
}
|
|
17430
17460
|
function Mt(v, O, R) {
|
|
17431
17461
|
R === void 0 && (R = !1);
|
|
17432
|
-
var q =
|
|
17462
|
+
var q = Mn(y.props.triggerTarget || t);
|
|
17433
17463
|
q.forEach(function(U) {
|
|
17434
17464
|
U.addEventListener(v, O, R), p.push({
|
|
17435
17465
|
node: U,
|
|
@@ -17439,19 +17469,19 @@ function yk(t, e) {
|
|
|
17439
17469
|
});
|
|
17440
17470
|
});
|
|
17441
17471
|
}
|
|
17442
|
-
function
|
|
17472
|
+
function pn() {
|
|
17443
17473
|
z() && (Mt("touchstart", Hn, {
|
|
17444
17474
|
passive: !0
|
|
17445
17475
|
}), Mt("touchend", Br, {
|
|
17446
17476
|
passive: !0
|
|
17447
|
-
})),
|
|
17477
|
+
})), Yv(y.props.trigger).forEach(function(v) {
|
|
17448
17478
|
if (v !== "manual")
|
|
17449
17479
|
switch (Mt(v, Hn), v) {
|
|
17450
17480
|
case "mouseenter":
|
|
17451
17481
|
Mt("mouseleave", Br);
|
|
17452
17482
|
break;
|
|
17453
17483
|
case "focus":
|
|
17454
|
-
Mt(
|
|
17484
|
+
Mt(ck ? "focusout" : "blur", jn);
|
|
17455
17485
|
break;
|
|
17456
17486
|
case "focusin":
|
|
17457
17487
|
Mt("focusout", jn);
|
|
@@ -17469,7 +17499,7 @@ function yk(t, e) {
|
|
|
17469
17499
|
var O, R = !1;
|
|
17470
17500
|
if (!(!y.state.isEnabled || Wn(v) || a)) {
|
|
17471
17501
|
var q = ((O = d) == null ? void 0 : O.type) === "focus";
|
|
17472
|
-
d = v, m = v.currentTarget, ke(), !y.state.isVisible &&
|
|
17502
|
+
d = v, m = v.currentTarget, ke(), !y.state.isVisible && ek(v) && eo.forEach(function(U) {
|
|
17473
17503
|
return U(v);
|
|
17474
17504
|
}), v.type === "click" && (y.props.trigger.indexOf("mouseenter") < 0 || s) && y.props.hideOnClick !== !1 && y.state.isVisible ? R = !0 : Un(v), v.type === "click" && (s = !R), R && !q && Ut(v);
|
|
17475
17505
|
}
|
|
@@ -17478,14 +17508,14 @@ function yk(t, e) {
|
|
|
17478
17508
|
var O = v.target, R = j().contains(O) || k.contains(O);
|
|
17479
17509
|
if (!(v.type === "mousemove" && R)) {
|
|
17480
17510
|
var q = At().concat(k).map(function(U) {
|
|
17481
|
-
var Ce, Be = U._tippy,
|
|
17482
|
-
return
|
|
17511
|
+
var Ce, Be = U._tippy, hn = (Ce = Be.popperInstance) == null ? void 0 : Ce.state;
|
|
17512
|
+
return hn ? {
|
|
17483
17513
|
popperRect: U.getBoundingClientRect(),
|
|
17484
|
-
popperState:
|
|
17514
|
+
popperState: hn,
|
|
17485
17515
|
props: n
|
|
17486
17516
|
} : null;
|
|
17487
17517
|
}).filter(Boolean);
|
|
17488
|
-
|
|
17518
|
+
ok(q, v) && (lt(), Ut(v));
|
|
17489
17519
|
}
|
|
17490
17520
|
}
|
|
17491
17521
|
function Br(v) {
|
|
@@ -17506,7 +17536,7 @@ function yk(t, e) {
|
|
|
17506
17536
|
}
|
|
17507
17537
|
function zr() {
|
|
17508
17538
|
_r();
|
|
17509
|
-
var v = y.props, O = v.popperOptions, R = v.placement, q = v.offset, U = v.getReferenceClientRect, Ce = v.moveTransition, Be = $() ? ms(k).arrow : null,
|
|
17539
|
+
var v = y.props, O = v.popperOptions, R = v.placement, q = v.offset, U = v.getReferenceClientRect, Ce = v.moveTransition, Be = $() ? ms(k).arrow : null, hn = U ? {
|
|
17510
17540
|
getBoundingClientRect: U,
|
|
17511
17541
|
contextElement: U.contextElement || j()
|
|
17512
17542
|
} : t, Zs = {
|
|
@@ -17515,12 +17545,12 @@ function yk(t, e) {
|
|
|
17515
17545
|
phase: "beforeWrite",
|
|
17516
17546
|
requires: ["computeStyles"],
|
|
17517
17547
|
fn: function(Wr) {
|
|
17518
|
-
var
|
|
17548
|
+
var mn = Wr.state;
|
|
17519
17549
|
if ($()) {
|
|
17520
17550
|
var pf = ce(), $o = pf.box;
|
|
17521
17551
|
["placement", "reference-hidden", "escaped"].forEach(function(Ur) {
|
|
17522
|
-
Ur === "placement" ? $o.setAttribute("data-placement",
|
|
17523
|
-
}),
|
|
17552
|
+
Ur === "placement" ? $o.setAttribute("data-placement", mn.placement) : mn.attributes.popper["data-popper-" + Ur] ? $o.setAttribute("data-" + Ur, "") : $o.removeAttribute("data-" + Ur);
|
|
17553
|
+
}), mn.attributes.popper = {};
|
|
17524
17554
|
}
|
|
17525
17555
|
}
|
|
17526
17556
|
}, qt = [{
|
|
@@ -17555,7 +17585,7 @@ function yk(t, e) {
|
|
|
17555
17585
|
element: Be,
|
|
17556
17586
|
padding: 3
|
|
17557
17587
|
}
|
|
17558
|
-
}), qt.push.apply(qt, O?.modifiers || []), y.popperInstance =
|
|
17588
|
+
}), qt.push.apply(qt, O?.modifiers || []), y.popperInstance = Uv(hn, k, Object.assign({}, O, {
|
|
17559
17589
|
placement: R,
|
|
17560
17590
|
onFirstUpdate: f,
|
|
17561
17591
|
modifiers: qt
|
|
@@ -17608,12 +17638,12 @@ function yk(t, e) {
|
|
|
17608
17638
|
clearTimeout(r), clearTimeout(o), cancelAnimationFrame(i);
|
|
17609
17639
|
}
|
|
17610
17640
|
function Hr(v) {
|
|
17611
|
-
if (ie.env.NODE_ENV !== "production" && gt(y.state.isDestroyed,
|
|
17641
|
+
if (ie.env.NODE_ENV !== "production" && gt(y.state.isDestroyed, vn("setProps")), !y.state.isDestroyed) {
|
|
17612
17642
|
ne("onBeforeUpdate", [y, v]), Lr();
|
|
17613
17643
|
var O = y.props, R = ql(t, Object.assign({}, O, $l(v), {
|
|
17614
17644
|
ignoreAttributes: !0
|
|
17615
17645
|
}));
|
|
17616
|
-
y.props = R,
|
|
17646
|
+
y.props = R, pn(), O.interactiveDebounce !== R.interactiveDebounce && (lt(), h = _l(Fr, R.interactiveDebounce)), O.triggerTarget && !R.triggerTarget ? Mn(O.triggerTarget).forEach(function(q) {
|
|
17617
17647
|
q.removeAttribute("aria-expanded");
|
|
17618
17648
|
}) : R.triggerTarget && t.removeAttribute("aria-expanded"), ke(), ee(), A && A(O, R), y.popperInstance && (zr(), At().forEach(function(q) {
|
|
17619
17649
|
requestAnimationFrame(q._tippy.popperInstance.forceUpdate);
|
|
@@ -17626,19 +17656,19 @@ function yk(t, e) {
|
|
|
17626
17656
|
});
|
|
17627
17657
|
}
|
|
17628
17658
|
function lf() {
|
|
17629
|
-
ie.env.NODE_ENV !== "production" && gt(y.state.isDestroyed,
|
|
17659
|
+
ie.env.NODE_ENV !== "production" && gt(y.state.isDestroyed, vn("show"));
|
|
17630
17660
|
var v = y.state.isVisible, O = y.state.isDestroyed, R = !y.state.isEnabled, q = tt.isTouch && !y.props.touch, U = ui(y.props.duration, 0, Ie.duration);
|
|
17631
17661
|
if (!(v || O || R || q) && !j().hasAttribute("disabled") && (ne("onShow", [y], !1), y.props.onShow(y) !== !1)) {
|
|
17632
17662
|
if (y.state.isVisible = !0, $() && (k.style.visibility = "visible"), ee(), Ne(), y.state.isMounted || (k.style.transition = "none"), $()) {
|
|
17633
|
-
var Ce = ce(), Be = Ce.box,
|
|
17634
|
-
fi([Be,
|
|
17663
|
+
var Ce = ce(), Be = Ce.box, hn = Ce.content;
|
|
17664
|
+
fi([Be, hn], 0);
|
|
17635
17665
|
}
|
|
17636
17666
|
f = function() {
|
|
17637
17667
|
var qt;
|
|
17638
17668
|
if (!(!y.state.isVisible || c)) {
|
|
17639
17669
|
if (c = !0, k.offsetHeight, k.style.transition = y.props.moveTransition, $() && y.props.animation) {
|
|
17640
|
-
var Vo = ce(), Wr = Vo.box,
|
|
17641
|
-
fi([Wr,
|
|
17670
|
+
var Vo = ce(), Wr = Vo.box, mn = Vo.content;
|
|
17671
|
+
fi([Wr, mn], U), Hl([Wr, mn], "visible");
|
|
17642
17672
|
}
|
|
17643
17673
|
ve(), ke(), Vl(hi, y), (qt = y.popperInstance) == null || qt.forceUpdate(), ne("onMount", [y]), y.props.animation && $() && dt(U, function() {
|
|
17644
17674
|
y.state.isShown = !0, ne("onShown", [y]);
|
|
@@ -17648,7 +17678,7 @@ function yk(t, e) {
|
|
|
17648
17678
|
}
|
|
17649
17679
|
}
|
|
17650
17680
|
function cf() {
|
|
17651
|
-
ie.env.NODE_ENV !== "production" && gt(y.state.isDestroyed,
|
|
17681
|
+
ie.env.NODE_ENV !== "production" && gt(y.state.isDestroyed, vn("hide"));
|
|
17652
17682
|
var v = !y.state.isVisible, O = y.state.isDestroyed, R = !y.state.isEnabled, q = ui(y.props.duration, 1, Ie.duration);
|
|
17653
17683
|
if (!(v || O || R) && (ne("onHide", [y], !1), y.props.onHide(y) !== !1)) {
|
|
17654
17684
|
if (y.state.isVisible = !1, y.state.isShown = !1, c = !1, s = !1, $() && (k.style.visibility = "hidden"), lt(), Ke(), ee(!0), $()) {
|
|
@@ -17659,26 +17689,26 @@ function yk(t, e) {
|
|
|
17659
17689
|
}
|
|
17660
17690
|
}
|
|
17661
17691
|
function df(v) {
|
|
17662
|
-
ie.env.NODE_ENV !== "production" && gt(y.state.isDestroyed,
|
|
17692
|
+
ie.env.NODE_ENV !== "production" && gt(y.state.isDestroyed, vn("hideWithInteractivity")), se().addEventListener("mousemove", h), Vl(eo, h), h(v);
|
|
17663
17693
|
}
|
|
17664
17694
|
function uf() {
|
|
17665
|
-
ie.env.NODE_ENV !== "production" && gt(y.state.isDestroyed,
|
|
17695
|
+
ie.env.NODE_ENV !== "production" && gt(y.state.isDestroyed, vn("unmount")), y.state.isVisible && y.hide(), y.state.isMounted && (_r(), At().forEach(function(v) {
|
|
17666
17696
|
v._tippy.unmount();
|
|
17667
17697
|
}), k.parentNode && k.parentNode.removeChild(k), hi = hi.filter(function(v) {
|
|
17668
17698
|
return v !== y;
|
|
17669
17699
|
}), y.state.isMounted = !1, ne("onHidden", [y]));
|
|
17670
17700
|
}
|
|
17671
17701
|
function ff() {
|
|
17672
|
-
ie.env.NODE_ENV !== "production" && gt(y.state.isDestroyed,
|
|
17702
|
+
ie.env.NODE_ENV !== "production" && gt(y.state.isDestroyed, vn("destroy")), !y.state.isDestroyed && (y.clearDelayTimeouts(), y.unmount(), Lr(), delete t._tippy, y.state.isDestroyed = !0, ne("onDestroy", [y]));
|
|
17673
17703
|
}
|
|
17674
17704
|
}
|
|
17675
17705
|
function Rr(t, e) {
|
|
17676
17706
|
e === void 0 && (e = {});
|
|
17677
17707
|
var n = Ie.plugins.concat(e.plugins || []);
|
|
17678
|
-
ie.env.NODE_ENV !== "production" && (
|
|
17708
|
+
ie.env.NODE_ENV !== "production" && (fk(t), sf(e, n)), ak();
|
|
17679
17709
|
var r = Object.assign({}, e, {
|
|
17680
17710
|
plugins: n
|
|
17681
|
-
}), o =
|
|
17711
|
+
}), o = nk(t);
|
|
17682
17712
|
if (ie.env.NODE_ENV !== "production") {
|
|
17683
17713
|
var i = xr(r.content), s = o.length > 1;
|
|
17684
17714
|
gt(i && s, ["tippy() was passed an Element as the `content` prop, but more than", "one tippy instance was created by this invocation. This means the", "content element will only be appended to the last tippy instance.", `
|
|
@@ -17689,13 +17719,13 @@ function Rr(t, e) {
|
|
|
17689
17719
|
`, "2) content: () => element.cloneNode(true)"].join(" "));
|
|
17690
17720
|
}
|
|
17691
17721
|
var a = o.reduce(function(l, c) {
|
|
17692
|
-
var d = c &&
|
|
17722
|
+
var d = c && wk(c, r);
|
|
17693
17723
|
return d && l.push(d), l;
|
|
17694
17724
|
}, []);
|
|
17695
17725
|
return xr(t) ? a[0] : a;
|
|
17696
17726
|
}
|
|
17697
17727
|
Rr.defaultProps = Ie;
|
|
17698
|
-
Rr.setDefaultProps =
|
|
17728
|
+
Rr.setDefaultProps = mk;
|
|
17699
17729
|
Rr.currentInput = tt;
|
|
17700
17730
|
Object.assign({}, Hu, {
|
|
17701
17731
|
effect: function(e) {
|
|
@@ -17717,12 +17747,12 @@ Object.assign({}, Hu, {
|
|
|
17717
17747
|
Rr.setDefaultProps({
|
|
17718
17748
|
render: af
|
|
17719
17749
|
});
|
|
17720
|
-
const
|
|
17750
|
+
const vk = (t, e) => {
|
|
17721
17751
|
const n = t.__vccOpts || t;
|
|
17722
17752
|
for (const [r, o] of e)
|
|
17723
17753
|
n[r] = o;
|
|
17724
17754
|
return n;
|
|
17725
|
-
},
|
|
17755
|
+
}, kk = ["onClick", "onMouseenter"], Ck = { key: 0 }, Sk = { key: 0 }, xk = { key: 1 }, Mk = { key: 1 }, Ak = {
|
|
17726
17756
|
__name: "Mentions",
|
|
17727
17757
|
props: {
|
|
17728
17758
|
users: {
|
|
@@ -17774,16 +17804,16 @@ const bk = (t, e) => {
|
|
|
17774
17804
|
key: d.email,
|
|
17775
17805
|
class: Lf(["user-row", { selected: r.value === u }])
|
|
17776
17806
|
}, [
|
|
17777
|
-
d.name ? (Xt(), Kt("div",
|
|
17778
|
-
d.name ? (Xt(), Kt("span",
|
|
17779
|
-
d.name && d.email ? (Xt(), Kt("span",
|
|
17780
|
-
])) : (Xt(), Kt("div",
|
|
17807
|
+
d.name ? (Xt(), Kt("div", Ck, [
|
|
17808
|
+
d.name ? (Xt(), Kt("span", Sk, Xo(d.name), 1)) : oa("", !0),
|
|
17809
|
+
d.name && d.email ? (Xt(), Kt("span", xk, " (" + Xo(d.email) + ")", 1)) : oa("", !0)
|
|
17810
|
+
])) : (Xt(), Kt("div", Mk, [
|
|
17781
17811
|
Ff("span", null, Xo(d.email), 1)
|
|
17782
17812
|
]))
|
|
17783
|
-
], 42,
|
|
17813
|
+
], 42, kk))), 128))
|
|
17784
17814
|
], 544));
|
|
17785
17815
|
}
|
|
17786
|
-
},
|
|
17816
|
+
}, Ok = /* @__PURE__ */ vk(Ak, [["__scopeId", "data-v-0a2a8b4e"]]), Jl = new G("popoverPlugin"), Tk = Q.create({
|
|
17787
17817
|
name: "popoverPlugin",
|
|
17788
17818
|
addPmPlugins() {
|
|
17789
17819
|
return [new Z({
|
|
@@ -17796,7 +17826,7 @@ const bk = (t, e) => {
|
|
|
17796
17826
|
}
|
|
17797
17827
|
},
|
|
17798
17828
|
view: (e) => {
|
|
17799
|
-
const n = new
|
|
17829
|
+
const n = new Dk(e, this.editor);
|
|
17800
17830
|
return {
|
|
17801
17831
|
update: (r, o) => {
|
|
17802
17832
|
Jl.getState(r.state).shouldUpdate && n.update(r, o);
|
|
@@ -17809,7 +17839,7 @@ const bk = (t, e) => {
|
|
|
17809
17839
|
})];
|
|
17810
17840
|
}
|
|
17811
17841
|
});
|
|
17812
|
-
class
|
|
17842
|
+
class Dk {
|
|
17813
17843
|
constructor(e, n) {
|
|
17814
17844
|
P(this, "handleKeyDown", (e) => {
|
|
17815
17845
|
const n = e.key === "ArrowDown" || e.key === "ArrowUp";
|
|
@@ -17846,7 +17876,7 @@ class Ok {
|
|
|
17846
17876
|
if (this.isShowMentions) {
|
|
17847
17877
|
const { from: i } = this.state.selection, s = this.getMentionText(i);
|
|
17848
17878
|
o = {
|
|
17849
|
-
component:
|
|
17879
|
+
component: Ok,
|
|
17850
17880
|
props: {
|
|
17851
17881
|
users: this.editor.users,
|
|
17852
17882
|
mention: s,
|
|
@@ -17888,7 +17918,7 @@ class Ok {
|
|
|
17888
17918
|
this.tippyInstance.destroy(), this.popover.remove();
|
|
17889
17919
|
}
|
|
17890
17920
|
}
|
|
17891
|
-
const
|
|
17921
|
+
const Nk = !1, Ek = Q.create({
|
|
17892
17922
|
name: "pagination",
|
|
17893
17923
|
addStorage() {
|
|
17894
17924
|
return {
|
|
@@ -17915,18 +17945,18 @@ const Tk = !1, Dk = Q.create({
|
|
|
17915
17945
|
const t = this.editor;
|
|
17916
17946
|
let e = !1, n = !1, r = !1, o = !1;
|
|
17917
17947
|
return [new Z({
|
|
17918
|
-
key:
|
|
17948
|
+
key: on,
|
|
17919
17949
|
state: {
|
|
17920
17950
|
isReadyToInit: !1,
|
|
17921
17951
|
init(s, a) {
|
|
17922
17952
|
return {
|
|
17923
17953
|
isReadyToInit: !1,
|
|
17924
17954
|
decorations: F.empty,
|
|
17925
|
-
isDebugging:
|
|
17955
|
+
isDebugging: Nk
|
|
17926
17956
|
};
|
|
17927
17957
|
},
|
|
17928
17958
|
apply(s, a, l, c) {
|
|
17929
|
-
const d = s.getMeta(
|
|
17959
|
+
const d = s.getMeta(on);
|
|
17930
17960
|
d && d.isReadyToInit && (n = !0, o = d.isReadyToInit);
|
|
17931
17961
|
const u = s.getMeta(Ao);
|
|
17932
17962
|
if (u) {
|
|
@@ -17957,39 +17987,39 @@ const Tk = !1, Dk = Q.create({
|
|
|
17957
17987
|
let a = F.empty;
|
|
17958
17988
|
return {
|
|
17959
17989
|
update: (l) => {
|
|
17960
|
-
!n || e || (e = !0, r = !0,
|
|
17990
|
+
!n || e || (e = !0, r = !0, Ik(t, l, a), e = !1, n = !1);
|
|
17961
17991
|
}
|
|
17962
17992
|
};
|
|
17963
17993
|
},
|
|
17964
17994
|
props: {
|
|
17965
17995
|
decorations(s) {
|
|
17966
|
-
return
|
|
17996
|
+
return on.getState(s).decorations;
|
|
17967
17997
|
}
|
|
17968
17998
|
}
|
|
17969
17999
|
})];
|
|
17970
18000
|
}
|
|
17971
|
-
}),
|
|
18001
|
+
}), kn = (t, e, n) => {
|
|
17972
18002
|
const { alternateHeaders: r } = n.converter.pageStyles, o = n.converter[e];
|
|
17973
18003
|
if (o?.titlePg && !o.first && t === 1) return null;
|
|
17974
18004
|
const i = o.even, s = o.odd, a = o.first, l = o.default;
|
|
17975
18005
|
if (o?.titlePg && a && t === 1) return a;
|
|
17976
18006
|
let c = o.default;
|
|
17977
18007
|
return r && (t === 1 ? c = a : t % 2 === 0 ? c = i || l : c = s || l), c;
|
|
17978
|
-
},
|
|
17979
|
-
const r = t.storage.pagination.sectionData, o =
|
|
18008
|
+
}, Ik = (t, e, n) => {
|
|
18009
|
+
const r = t.storage.pagination.sectionData, o = Pk(e, t, r);
|
|
17980
18010
|
if (!n.eq(o)) {
|
|
17981
18011
|
const i = e.state.tr.setMeta(
|
|
17982
|
-
|
|
18012
|
+
on,
|
|
17983
18013
|
{ decorations: o }
|
|
17984
18014
|
);
|
|
17985
18015
|
e.dispatch(i);
|
|
17986
18016
|
}
|
|
17987
18017
|
t.emit("paginationUpdate");
|
|
17988
|
-
},
|
|
18018
|
+
}, Pk = (t, e, n) => {
|
|
17989
18019
|
if (!e.converter) return F.empty;
|
|
17990
18020
|
const r = e.converter.pageStyles?.pageSize, { width: o, height: i } = r;
|
|
17991
18021
|
if (!o || !i) return F.empty;
|
|
17992
|
-
const s = [
|
|
18022
|
+
const s = [Cb, on], { state: a } = t, l = no.create({
|
|
17993
18023
|
schema: a.schema,
|
|
17994
18024
|
doc: a.doc,
|
|
17995
18025
|
plugins: a.plugins.filter((h) => s.includes(h.key))
|
|
@@ -18004,16 +18034,16 @@ const Tk = !1, Dk = Q.create({
|
|
|
18004
18034
|
}
|
|
18005
18035
|
});
|
|
18006
18036
|
e.initDefaultStyles(c);
|
|
18007
|
-
const p =
|
|
18037
|
+
const p = Rk(l.doc, f, e, n);
|
|
18008
18038
|
return f.destroy(), document.body.removeChild(c), F.create(t.state.doc, p);
|
|
18009
18039
|
};
|
|
18010
|
-
function
|
|
18040
|
+
function Rk(t, e, n, r) {
|
|
18011
18041
|
const o = [], { pageSize: i, pageMargins: s } = n.converter.pageStyles, a = i.height * 96;
|
|
18012
18042
|
n.options.scale;
|
|
18013
18043
|
let l = 1, c = a, d = null, u = null;
|
|
18014
|
-
const f =
|
|
18044
|
+
const f = kn(l, "headerIds", n), p = mi(s, i, r, f), h = yi({ editor: n, header: p, isFirstHeader: !0 });
|
|
18015
18045
|
o.push(V.widget(0, h, { key: "stable-key" }));
|
|
18016
|
-
const m =
|
|
18046
|
+
const m = kn(l, "footerIds", n), g = gi(s, i, r, m);
|
|
18017
18047
|
c -= p.headerHeight + g.footerHeight;
|
|
18018
18048
|
let b = e?.coordsAtPos(t.content.size);
|
|
18019
18049
|
if (!b) return [];
|
|
@@ -18036,9 +18066,9 @@ function Ik(t, e, n, r) {
|
|
|
18036
18066
|
top: ne,
|
|
18037
18067
|
bottom: ve,
|
|
18038
18068
|
pos: ke
|
|
18039
|
-
} =
|
|
18069
|
+
} = Lk(e, j, c);
|
|
18040
18070
|
l++;
|
|
18041
|
-
const lt =
|
|
18071
|
+
const lt = kn(l, "headerIds", n), Fe = kn(l, "footerIds", n);
|
|
18042
18072
|
u = mi(s, i, r, lt), d = gi(s, i, r, Fe, l - 1);
|
|
18043
18073
|
const ct = c - ve, { node: qe } = Yl(ct), Ne = V.widget(ke, qe, { key: "stable-key" });
|
|
18044
18074
|
o.push(Ne);
|
|
@@ -18047,7 +18077,7 @@ function Ik(t, e, n, r) {
|
|
|
18047
18077
|
}
|
|
18048
18078
|
});
|
|
18049
18079
|
let w = t.content.size;
|
|
18050
|
-
const C = e.coordsAtPos(w), y =
|
|
18080
|
+
const C = e.coordsAtPos(w), y = kn(l, "headerIds", n), S = kn(l, "footerIds", n);
|
|
18051
18081
|
u = mi(s, i, r, y), d = gi(s, i, r, S, l);
|
|
18052
18082
|
const k = c - C.bottom, { node: A } = Yl(k), L = V.widget(t.content.size, A, { key: "stable-key" });
|
|
18053
18083
|
o.push(L);
|
|
@@ -18092,7 +18122,7 @@ function yi({ editor: t, header: e, footer: n, footerBottom: r = null, isFirstHe
|
|
|
18092
18122
|
}
|
|
18093
18123
|
return e && (d.appendChild(e.section), l += e.headerHeight), c.style.height = l + "px", c.style.minHeight = l + "px", c.style.maxHeight = l + "px", d.style.height = l + "px", c.style.width = "100px", c.style.marginLeft = a.left * -96 + "px", r !== null && (c.style.position = "absolute", c.style.bottom = r + "px"), c;
|
|
18094
18124
|
}
|
|
18095
|
-
function
|
|
18125
|
+
function Lk(t, e, n) {
|
|
18096
18126
|
let r = e - 1;
|
|
18097
18127
|
const o = { top: 0, bottom: 0, pos: 0 };
|
|
18098
18128
|
for (; r > 0; ) {
|
|
@@ -18110,7 +18140,7 @@ const Gl = (t) => {
|
|
|
18110
18140
|
const e = t.view.state.tr;
|
|
18111
18141
|
e.setMeta("forceUpdatePagination", !0), t.view.dispatch(e);
|
|
18112
18142
|
});
|
|
18113
|
-
},
|
|
18143
|
+
}, Fk = () => [
|
|
18114
18144
|
Eu,
|
|
18115
18145
|
Qd,
|
|
18116
18146
|
jd,
|
|
@@ -18133,8 +18163,8 @@ const Gl = (t) => {
|
|
|
18133
18163
|
Kd,
|
|
18134
18164
|
Nu,
|
|
18135
18165
|
Pu,
|
|
18136
|
-
|
|
18137
|
-
|
|
18166
|
+
Vw,
|
|
18167
|
+
Tk,
|
|
18138
18168
|
Du,
|
|
18139
18169
|
Ru,
|
|
18140
18170
|
Jd,
|
|
@@ -18148,13 +18178,13 @@ const Gl = (t) => {
|
|
|
18148
18178
|
zu,
|
|
18149
18179
|
_u,
|
|
18150
18180
|
Tu
|
|
18151
|
-
],
|
|
18181
|
+
], Bk = () => [
|
|
18152
18182
|
Eu,
|
|
18153
18183
|
Qd,
|
|
18154
18184
|
jd,
|
|
18155
|
-
e0,
|
|
18156
|
-
t0,
|
|
18157
18185
|
n0,
|
|
18186
|
+
r0,
|
|
18187
|
+
o0,
|
|
18158
18188
|
Gd,
|
|
18159
18189
|
Wd,
|
|
18160
18190
|
Ud,
|
|
@@ -18168,17 +18198,17 @@ const Gl = (t) => {
|
|
|
18168
18198
|
iu,
|
|
18169
18199
|
au,
|
|
18170
18200
|
lu,
|
|
18171
|
-
|
|
18201
|
+
Nb,
|
|
18172
18202
|
Lu,
|
|
18173
|
-
|
|
18203
|
+
s0,
|
|
18174
18204
|
Zd,
|
|
18175
18205
|
qd,
|
|
18176
18206
|
Kd,
|
|
18177
18207
|
Nu,
|
|
18178
18208
|
Pu,
|
|
18179
18209
|
Jd,
|
|
18180
|
-
|
|
18181
|
-
|
|
18210
|
+
nb,
|
|
18211
|
+
kb,
|
|
18182
18212
|
vu,
|
|
18183
18213
|
Cu,
|
|
18184
18214
|
Su,
|
|
@@ -18186,20 +18216,20 @@ const Gl = (t) => {
|
|
|
18186
18216
|
Ou,
|
|
18187
18217
|
Yd,
|
|
18188
18218
|
Tu,
|
|
18189
|
-
|
|
18219
|
+
Iw,
|
|
18190
18220
|
Du,
|
|
18191
|
-
|
|
18192
|
-
|
|
18193
|
-
|
|
18221
|
+
Sb,
|
|
18222
|
+
Tb,
|
|
18223
|
+
_w,
|
|
18194
18224
|
Bu,
|
|
18195
18225
|
zu,
|
|
18196
18226
|
_u,
|
|
18197
|
-
|
|
18198
|
-
|
|
18227
|
+
i0,
|
|
18228
|
+
Ek,
|
|
18199
18229
|
Ru,
|
|
18200
|
-
|
|
18201
|
-
|
|
18202
|
-
|
|
18230
|
+
Jb,
|
|
18231
|
+
Pw,
|
|
18232
|
+
Rw
|
|
18203
18233
|
];
|
|
18204
18234
|
export {
|
|
18205
18235
|
N as A,
|
|
@@ -18207,23 +18237,23 @@ export {
|
|
|
18207
18237
|
ji as E,
|
|
18208
18238
|
Ao as I,
|
|
18209
18239
|
J as N,
|
|
18210
|
-
|
|
18240
|
+
Vw as P,
|
|
18211
18241
|
de as T,
|
|
18212
|
-
|
|
18213
|
-
|
|
18214
|
-
|
|
18242
|
+
vk as _,
|
|
18243
|
+
qk as a,
|
|
18244
|
+
Gb as b,
|
|
18215
18245
|
He as c,
|
|
18216
18246
|
zf as d,
|
|
18217
|
-
|
|
18218
|
-
|
|
18247
|
+
Bk as e,
|
|
18248
|
+
Jk as f,
|
|
18219
18249
|
Go as g,
|
|
18220
|
-
|
|
18250
|
+
Fk as h,
|
|
18221
18251
|
Md as i,
|
|
18222
18252
|
Q as j,
|
|
18223
18253
|
Ad as k,
|
|
18224
|
-
|
|
18225
|
-
|
|
18254
|
+
Xk as l,
|
|
18255
|
+
Yk as m,
|
|
18226
18256
|
No as n,
|
|
18227
|
-
|
|
18228
|
-
|
|
18257
|
+
Wk as r,
|
|
18258
|
+
jk as u
|
|
18229
18259
|
};
|