@samhammer/tiptob 2.2.1 → 2.3.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +199 -199
- package/dist/extensions.js +547 -527
- package/dist/extensions.js.map +1 -1
- package/dist/plugins/FontHighlight/HighlightExtension.d.ts +2 -1
- package/dist/web-components.js +2076 -2022
- package/dist/web-components.js.map +1 -1
- package/package.json +15 -15
package/dist/extensions.js
CHANGED
|
@@ -327,15 +327,15 @@ class k {
|
|
|
327
327
|
*/
|
|
328
328
|
findIndex(e, t = -1) {
|
|
329
329
|
if (e == 0)
|
|
330
|
-
return
|
|
330
|
+
return xn(0, e);
|
|
331
331
|
if (e == this.size)
|
|
332
|
-
return
|
|
332
|
+
return xn(this.content.length, e);
|
|
333
333
|
if (e > this.size || e < 0)
|
|
334
334
|
throw new RangeError(`Position ${e} outside of fragment (${this})`);
|
|
335
335
|
for (let r = 0, i = 0; ; r++) {
|
|
336
336
|
let o = this.child(r), s = i + o.nodeSize;
|
|
337
337
|
if (s >= e)
|
|
338
|
-
return s == e || t > 0 ?
|
|
338
|
+
return s == e || t > 0 ? xn(r + 1, s) : xn(r, i);
|
|
339
339
|
i = s;
|
|
340
340
|
}
|
|
341
341
|
}
|
|
@@ -401,10 +401,10 @@ class k {
|
|
|
401
401
|
}
|
|
402
402
|
k.empty = new k([], 0);
|
|
403
403
|
const nr = { index: 0, offset: 0 };
|
|
404
|
-
function
|
|
404
|
+
function xn(n, e) {
|
|
405
405
|
return nr.index = n, nr.offset = e, nr;
|
|
406
406
|
}
|
|
407
|
-
function
|
|
407
|
+
function In(n, e) {
|
|
408
408
|
if (n === e)
|
|
409
409
|
return !0;
|
|
410
410
|
if (!(n && typeof n == "object") || !(e && typeof e == "object"))
|
|
@@ -416,11 +416,11 @@ function Nn(n, e) {
|
|
|
416
416
|
if (n.length != e.length)
|
|
417
417
|
return !1;
|
|
418
418
|
for (let r = 0; r < n.length; r++)
|
|
419
|
-
if (!
|
|
419
|
+
if (!In(n[r], e[r]))
|
|
420
420
|
return !1;
|
|
421
421
|
} else {
|
|
422
422
|
for (let r in n)
|
|
423
|
-
if (!(r in e) || !
|
|
423
|
+
if (!(r in e) || !In(n[r], e[r]))
|
|
424
424
|
return !1;
|
|
425
425
|
for (let r in e)
|
|
426
426
|
if (!(r in n))
|
|
@@ -482,7 +482,7 @@ let z = class yr {
|
|
|
482
482
|
another mark.
|
|
483
483
|
*/
|
|
484
484
|
eq(e) {
|
|
485
|
-
return this == e || this.type == e.type &&
|
|
485
|
+
return this == e || this.type == e.type && In(this.attrs, e.attrs);
|
|
486
486
|
}
|
|
487
487
|
/**
|
|
488
488
|
Convert this mark to a JSON-serializeable representation.
|
|
@@ -534,7 +534,7 @@ let z = class yr {
|
|
|
534
534
|
}
|
|
535
535
|
};
|
|
536
536
|
z.none = [];
|
|
537
|
-
class
|
|
537
|
+
class Dn extends Error {
|
|
538
538
|
}
|
|
539
539
|
class S {
|
|
540
540
|
/**
|
|
@@ -637,9 +637,9 @@ function yo(n, e, t, r) {
|
|
|
637
637
|
}
|
|
638
638
|
function aa(n, e, t) {
|
|
639
639
|
if (t.openStart > n.depth)
|
|
640
|
-
throw new
|
|
640
|
+
throw new Dn("Inserted content deeper than insertion position");
|
|
641
641
|
if (n.depth - t.openStart != e.depth - t.openEnd)
|
|
642
|
-
throw new
|
|
642
|
+
throw new Dn("Inconsistent open depths");
|
|
643
643
|
return vo(n, e, t, 0);
|
|
644
644
|
}
|
|
645
645
|
function vo(n, e, t, r) {
|
|
@@ -655,11 +655,11 @@ function vo(n, e, t, r) {
|
|
|
655
655
|
let { start: s, end: a } = la(t, n);
|
|
656
656
|
return nt(o, xo(n, s, a, e, r));
|
|
657
657
|
}
|
|
658
|
-
else return nt(o,
|
|
658
|
+
else return nt(o, Rn(n, e, r));
|
|
659
659
|
}
|
|
660
660
|
function bo(n, e) {
|
|
661
661
|
if (!e.type.compatibleContent(n.type))
|
|
662
|
-
throw new
|
|
662
|
+
throw new Dn("Cannot join " + e.type.name + " onto " + n.type.name);
|
|
663
663
|
}
|
|
664
664
|
function vr(n, e, t) {
|
|
665
665
|
let r = n.node(t);
|
|
@@ -681,13 +681,13 @@ function nt(n, e) {
|
|
|
681
681
|
}
|
|
682
682
|
function xo(n, e, t, r, i) {
|
|
683
683
|
let o = n.depth > i && vr(n, e, i + 1), s = r.depth > i && vr(t, r, i + 1), a = [];
|
|
684
|
-
return Lt(null, n, i, a), o && s && e.index(i) == t.index(i) ? (bo(o, s), tt(nt(o, xo(n, e, t, r, i + 1)), a)) : (o && tt(nt(o,
|
|
684
|
+
return Lt(null, n, i, a), o && s && e.index(i) == t.index(i) ? (bo(o, s), tt(nt(o, xo(n, e, t, r, i + 1)), a)) : (o && tt(nt(o, Rn(n, e, i + 1)), a), Lt(e, t, i, a), s && tt(nt(s, Rn(t, r, i + 1)), a)), Lt(r, null, i, a), new k(a);
|
|
685
685
|
}
|
|
686
|
-
function
|
|
686
|
+
function Rn(n, e, t) {
|
|
687
687
|
let r = [];
|
|
688
688
|
if (Lt(null, n, t, r), n.depth > t) {
|
|
689
689
|
let i = vr(n, e, t + 1);
|
|
690
|
-
tt(nt(i,
|
|
690
|
+
tt(nt(i, Rn(n, e, t + 1)), r);
|
|
691
691
|
}
|
|
692
692
|
return Lt(e, null, t, r), new k(r);
|
|
693
693
|
}
|
|
@@ -700,7 +700,7 @@ function la(n, e) {
|
|
|
700
700
|
end: i.resolveNoCache(i.content.size - n.openEnd - t)
|
|
701
701
|
};
|
|
702
702
|
}
|
|
703
|
-
class
|
|
703
|
+
class qt {
|
|
704
704
|
/**
|
|
705
705
|
@internal
|
|
706
706
|
*/
|
|
@@ -885,7 +885,7 @@ class Jt {
|
|
|
885
885
|
return e.blockRange(this);
|
|
886
886
|
for (let r = this.depth - (this.parent.inlineContent || this.pos == e.pos ? 1 : 0); r >= 0; r--)
|
|
887
887
|
if (e.pos <= this.end(r) && (!t || t(this.node(r))))
|
|
888
|
-
return new
|
|
888
|
+
return new Pn(this, e, r);
|
|
889
889
|
return null;
|
|
890
890
|
}
|
|
891
891
|
/**
|
|
@@ -928,7 +928,7 @@ class Jt {
|
|
|
928
928
|
break;
|
|
929
929
|
o = c - 1, i += l + 1;
|
|
930
930
|
}
|
|
931
|
-
return new
|
|
931
|
+
return new qt(t, r, o);
|
|
932
932
|
}
|
|
933
933
|
/**
|
|
934
934
|
@internal
|
|
@@ -943,7 +943,7 @@ class Jt {
|
|
|
943
943
|
}
|
|
944
944
|
else
|
|
945
945
|
fi.set(e, r = new ca());
|
|
946
|
-
let i = r.elts[r.i] =
|
|
946
|
+
let i = r.elts[r.i] = qt.resolve(e, t);
|
|
947
947
|
return r.i = (r.i + 1) % ua, i;
|
|
948
948
|
}
|
|
949
949
|
}
|
|
@@ -953,7 +953,7 @@ class ca {
|
|
|
953
953
|
}
|
|
954
954
|
}
|
|
955
955
|
const ua = 12, fi = /* @__PURE__ */ new WeakMap();
|
|
956
|
-
class
|
|
956
|
+
class Pn {
|
|
957
957
|
/**
|
|
958
958
|
Construct a node range. `$from` and `$to` should point into the
|
|
959
959
|
same node until at least the given `depth`, since a node range
|
|
@@ -1112,7 +1112,7 @@ let rt = class br {
|
|
|
1112
1112
|
attributes, and marks.
|
|
1113
1113
|
*/
|
|
1114
1114
|
hasMarkup(e, t, r) {
|
|
1115
|
-
return this.type == e &&
|
|
1115
|
+
return this.type == e && In(this.attrs, t || e.defaultAttrs || fa) && z.sameSet(this.marks, r || z.none);
|
|
1116
1116
|
}
|
|
1117
1117
|
/**
|
|
1118
1118
|
Create a new node with the same markup as this node, containing
|
|
@@ -1198,13 +1198,13 @@ let rt = class br {
|
|
|
1198
1198
|
[object](https://prosemirror.net/docs/ref/#model.ResolvedPos) with information about its context.
|
|
1199
1199
|
*/
|
|
1200
1200
|
resolve(e) {
|
|
1201
|
-
return
|
|
1201
|
+
return qt.resolveCached(this, e);
|
|
1202
1202
|
}
|
|
1203
1203
|
/**
|
|
1204
1204
|
@internal
|
|
1205
1205
|
*/
|
|
1206
1206
|
resolveNoCache(e) {
|
|
1207
|
-
return
|
|
1207
|
+
return qt.resolve(this, e);
|
|
1208
1208
|
}
|
|
1209
1209
|
/**
|
|
1210
1210
|
Test whether a given mark or mark type occurs in this document
|
|
@@ -1364,7 +1364,7 @@ let rt = class br {
|
|
|
1364
1364
|
}
|
|
1365
1365
|
};
|
|
1366
1366
|
rt.prototype.text = void 0;
|
|
1367
|
-
class
|
|
1367
|
+
class Bn extends rt {
|
|
1368
1368
|
/**
|
|
1369
1369
|
@internal
|
|
1370
1370
|
*/
|
|
@@ -1386,10 +1386,10 @@ class Pn extends rt {
|
|
|
1386
1386
|
return this.text.length;
|
|
1387
1387
|
}
|
|
1388
1388
|
mark(e) {
|
|
1389
|
-
return e == this.marks ? this : new
|
|
1389
|
+
return e == this.marks ? this : new Bn(this.type, this.attrs, this.text, e);
|
|
1390
1390
|
}
|
|
1391
1391
|
withText(e) {
|
|
1392
|
-
return e == this.text ? this : new
|
|
1392
|
+
return e == this.text ? this : new Bn(this.type, this.attrs, e, this.marks);
|
|
1393
1393
|
}
|
|
1394
1394
|
cut(e = 0, t = this.text.length) {
|
|
1395
1395
|
return e == 0 && t == this.text.length ? this : this.withText(this.text.slice(e, t));
|
|
@@ -2092,7 +2092,7 @@ class Sa {
|
|
|
2092
2092
|
*/
|
|
2093
2093
|
text(e, t) {
|
|
2094
2094
|
let r = this.nodes.text;
|
|
2095
|
-
return new
|
|
2095
|
+
return new Bn(r, r.defaultAttrs, e, z.setFrom(t));
|
|
2096
2096
|
}
|
|
2097
2097
|
/**
|
|
2098
2098
|
Create a mark with the given type and attributes.
|
|
@@ -2301,13 +2301,13 @@ const Ao = {
|
|
|
2301
2301
|
script: !0,
|
|
2302
2302
|
style: !0,
|
|
2303
2303
|
title: !0
|
|
2304
|
-
}, No = { ol: !0, ul: !0 },
|
|
2304
|
+
}, No = { ol: !0, ul: !0 }, Kt = 1, xr = 2, $t = 4;
|
|
2305
2305
|
function gi(n, e, t) {
|
|
2306
|
-
return e != null ? (e ?
|
|
2306
|
+
return e != null ? (e ? Kt : 0) | (e === "full" ? xr : 0) : n && n.whitespace == "pre" ? Kt | xr : t & ~$t;
|
|
2307
2307
|
}
|
|
2308
|
-
class
|
|
2308
|
+
class kn {
|
|
2309
2309
|
constructor(e, t, r, i, o, s) {
|
|
2310
|
-
this.type = e, this.attrs = t, this.marks = r, this.solid = i, this.options = s, this.content = [], this.activeMarks = z.none, this.match = o || (s &
|
|
2310
|
+
this.type = e, this.attrs = t, this.marks = r, this.solid = i, this.options = s, this.content = [], this.activeMarks = z.none, this.match = o || (s & $t ? null : e.contentMatch);
|
|
2311
2311
|
}
|
|
2312
2312
|
findWrapping(e) {
|
|
2313
2313
|
if (!this.match) {
|
|
@@ -2324,7 +2324,7 @@ class bn {
|
|
|
2324
2324
|
return this.match.findWrapping(e.type);
|
|
2325
2325
|
}
|
|
2326
2326
|
finish(e) {
|
|
2327
|
-
if (!(this.options &
|
|
2327
|
+
if (!(this.options & Kt)) {
|
|
2328
2328
|
let r = this.content[this.content.length - 1], i;
|
|
2329
2329
|
if (r && r.isText && (i = /[ \t\r\n\u000c]+$/.exec(r.text))) {
|
|
2330
2330
|
let o = r;
|
|
@@ -2341,8 +2341,8 @@ class bn {
|
|
|
2341
2341
|
class yi {
|
|
2342
2342
|
constructor(e, t, r) {
|
|
2343
2343
|
this.parser = e, this.options = t, this.isOpen = r, this.open = 0, this.localPreserveWS = !1;
|
|
2344
|
-
let i = t.topNode, o, s = gi(null, t.preserveWhitespace, 0) | (r ?
|
|
2345
|
-
i ? o = new
|
|
2344
|
+
let i = t.topNode, o, s = gi(null, t.preserveWhitespace, 0) | (r ? $t : 0);
|
|
2345
|
+
i ? o = new kn(i.type, i.attrs, z.none, !0, t.topMatch || i.type.contentMatch, s) : r ? o = new kn(null, null, z.none, !0, null, s) : o = new kn(e.schema.topNodeType, null, z.none, !0, null, s), this.nodes = [o], this.find = t.findPositions, this.needsBlock = !1;
|
|
2346
2346
|
}
|
|
2347
2347
|
get top() {
|
|
2348
2348
|
return this.nodes[this.open];
|
|
@@ -2354,7 +2354,7 @@ class yi {
|
|
|
2354
2354
|
e.nodeType == 3 ? this.addTextNode(e, t) : e.nodeType == 1 && this.addElement(e, t);
|
|
2355
2355
|
}
|
|
2356
2356
|
addTextNode(e, t) {
|
|
2357
|
-
let r = e.nodeValue, i = this.top, o = i.options & xr ? "full" : this.localPreserveWS || (i.options &
|
|
2357
|
+
let r = e.nodeValue, i = this.top, o = i.options & xr ? "full" : this.localPreserveWS || (i.options & Kt) > 0;
|
|
2358
2358
|
if (o === "full" || i.inlineContext(e) || /[^ \t\r\n\u000c]/.test(r)) {
|
|
2359
2359
|
if (o)
|
|
2360
2360
|
o !== "full" ? r = r.replace(/\r?\n|\r/g, " ") : r = r.replace(/\r\n?/g, `
|
|
@@ -2516,9 +2516,9 @@ class yi {
|
|
|
2516
2516
|
let s = this.top;
|
|
2517
2517
|
s.match = s.match && s.match.matchType(e);
|
|
2518
2518
|
let a = gi(e, o, s.options);
|
|
2519
|
-
s.options &
|
|
2519
|
+
s.options & $t && s.content.length == 0 && (a |= $t);
|
|
2520
2520
|
let l = z.none;
|
|
2521
|
-
return r = r.filter((c) => (s.type ? s.type.allowsMarkType(c.type) : bi(c.type, e)) ? (l = c.addToSet(l), !1) : !0), this.nodes.push(new
|
|
2521
|
+
return r = r.filter((c) => (s.type ? s.type.allowsMarkType(c.type) : bi(c.type, e)) ? (l = c.addToSet(l), !1) : !0), this.nodes.push(new kn(e, t, l, i, null, a)), this.open++, r;
|
|
2522
2522
|
}
|
|
2523
2523
|
// Make sure all nodes above this.open are finished and added to
|
|
2524
2524
|
// their parents
|
|
@@ -2537,7 +2537,7 @@ class yi {
|
|
|
2537
2537
|
for (let t = this.open; t >= 0; t--) {
|
|
2538
2538
|
if (this.nodes[t] == e)
|
|
2539
2539
|
return this.open = t, !0;
|
|
2540
|
-
this.localPreserveWS && (this.nodes[t].options |=
|
|
2540
|
+
this.localPreserveWS && (this.nodes[t].options |= Kt);
|
|
2541
2541
|
}
|
|
2542
2542
|
return !1;
|
|
2543
2543
|
}
|
|
@@ -2694,7 +2694,7 @@ class Kn {
|
|
|
2694
2694
|
@internal
|
|
2695
2695
|
*/
|
|
2696
2696
|
serializeNodeInner(e, t) {
|
|
2697
|
-
let { dom: r, contentDOM: i } =
|
|
2697
|
+
let { dom: r, contentDOM: i } = Tn(rr(t), this.nodes[e.type.name](e), null, e.attrs);
|
|
2698
2698
|
if (i) {
|
|
2699
2699
|
if (e.isLeaf)
|
|
2700
2700
|
throw new RangeError("Content hole not allowed in a leaf node spec");
|
|
@@ -2722,10 +2722,10 @@ class Kn {
|
|
|
2722
2722
|
*/
|
|
2723
2723
|
serializeMark(e, t, r = {}) {
|
|
2724
2724
|
let i = this.marks[e.type.name];
|
|
2725
|
-
return i &&
|
|
2725
|
+
return i && Tn(rr(r), i(e, t), null, e.attrs);
|
|
2726
2726
|
}
|
|
2727
2727
|
static renderSpec(e, t, r = null, i) {
|
|
2728
|
-
return
|
|
2728
|
+
return Tn(e, t, r, i);
|
|
2729
2729
|
}
|
|
2730
2730
|
/**
|
|
2731
2731
|
Build a serializer using the [`toDOM`](https://prosemirror.net/docs/ref/#model.NodeSpec.toDOM)
|
|
@@ -2781,7 +2781,7 @@ function Na(n) {
|
|
|
2781
2781
|
}
|
|
2782
2782
|
return t(n), e;
|
|
2783
2783
|
}
|
|
2784
|
-
function
|
|
2784
|
+
function Tn(n, e, t, r) {
|
|
2785
2785
|
if (typeof e == "string")
|
|
2786
2786
|
return { dom: n.createTextNode(e) };
|
|
2787
2787
|
if (e.nodeType != null)
|
|
@@ -2811,11 +2811,11 @@ function En(n, e, t, r) {
|
|
|
2811
2811
|
throw new RangeError("Content hole must be the only child of its parent node");
|
|
2812
2812
|
return { dom: l, contentDOM: l };
|
|
2813
2813
|
} else {
|
|
2814
|
-
let { dom: d, contentDOM:
|
|
2815
|
-
if (l.appendChild(d),
|
|
2814
|
+
let { dom: d, contentDOM: g } = Tn(n, p, t, r);
|
|
2815
|
+
if (l.appendChild(d), g) {
|
|
2816
2816
|
if (a)
|
|
2817
2817
|
throw new RangeError("Multiple content holes");
|
|
2818
|
-
a =
|
|
2818
|
+
a = g;
|
|
2819
2819
|
}
|
|
2820
2820
|
}
|
|
2821
2821
|
}
|
|
@@ -2831,7 +2831,7 @@ function wi(n) {
|
|
|
2831
2831
|
function Da(n) {
|
|
2832
2832
|
return (n - (n & Io)) / Do;
|
|
2833
2833
|
}
|
|
2834
|
-
const Ro = 1, Po = 2,
|
|
2834
|
+
const Ro = 1, Po = 2, Mn = 4, Bo = 8;
|
|
2835
2835
|
class Si {
|
|
2836
2836
|
/**
|
|
2837
2837
|
@internal
|
|
@@ -2851,13 +2851,13 @@ class Si {
|
|
|
2851
2851
|
Tells you whether the token before the mapped position was deleted.
|
|
2852
2852
|
*/
|
|
2853
2853
|
get deletedBefore() {
|
|
2854
|
-
return (this.delInfo & (Ro |
|
|
2854
|
+
return (this.delInfo & (Ro | Mn)) > 0;
|
|
2855
2855
|
}
|
|
2856
2856
|
/**
|
|
2857
2857
|
True when the token after the mapped position was deleted.
|
|
2858
2858
|
*/
|
|
2859
2859
|
get deletedAfter() {
|
|
2860
|
-
return (this.delInfo & (Po |
|
|
2860
|
+
return (this.delInfo & (Po | Mn)) > 0;
|
|
2861
2861
|
}
|
|
2862
2862
|
/**
|
|
2863
2863
|
Tells whether any of the steps mapped through deletes across the
|
|
@@ -2865,7 +2865,7 @@ class Si {
|
|
|
2865
2865
|
position).
|
|
2866
2866
|
*/
|
|
2867
2867
|
get deletedAcross() {
|
|
2868
|
-
return (this.delInfo &
|
|
2868
|
+
return (this.delInfo & Mn) > 0;
|
|
2869
2869
|
}
|
|
2870
2870
|
}
|
|
2871
2871
|
class oe {
|
|
@@ -2908,8 +2908,8 @@ class oe {
|
|
|
2908
2908
|
let p = c ? e == l ? -1 : e == f ? 1 : t : t, d = l + i + (p < 0 ? 0 : u);
|
|
2909
2909
|
if (r)
|
|
2910
2910
|
return d;
|
|
2911
|
-
let
|
|
2912
|
-
return (t < 0 ? e != l : e != f) && (
|
|
2911
|
+
let g = e == (t < 0 ? l : f) ? null : Ia(a / 3, e - l), m = e == l ? Po : e == f ? Ro : Mn;
|
|
2912
|
+
return (t < 0 ? e != l : e != f) && (m |= Bo), new Si(d, m, g);
|
|
2913
2913
|
}
|
|
2914
2914
|
i += u - c;
|
|
2915
2915
|
}
|
|
@@ -3035,7 +3035,7 @@ class V {
|
|
|
3035
3035
|
try {
|
|
3036
3036
|
return V.ok(e.replace(t, r, i));
|
|
3037
3037
|
} catch (o) {
|
|
3038
|
-
if (o instanceof
|
|
3038
|
+
if (o instanceof Dn)
|
|
3039
3039
|
return V.fail(o.message);
|
|
3040
3040
|
throw o;
|
|
3041
3041
|
}
|
|
@@ -3152,7 +3152,7 @@ class et extends Y {
|
|
|
3152
3152
|
return new et(this.pos, this.mark);
|
|
3153
3153
|
}
|
|
3154
3154
|
}
|
|
3155
|
-
return new
|
|
3155
|
+
return new Ut(this.pos, this.mark);
|
|
3156
3156
|
}
|
|
3157
3157
|
map(e) {
|
|
3158
3158
|
let t = e.mapResult(this.pos, 1);
|
|
@@ -3171,7 +3171,7 @@ class et extends Y {
|
|
|
3171
3171
|
}
|
|
3172
3172
|
}
|
|
3173
3173
|
Y.jsonID("addNodeMark", et);
|
|
3174
|
-
class
|
|
3174
|
+
class Ut extends Y {
|
|
3175
3175
|
/**
|
|
3176
3176
|
Create a mark-removing step.
|
|
3177
3177
|
*/
|
|
@@ -3191,7 +3191,7 @@ class Kt extends Y {
|
|
|
3191
3191
|
}
|
|
3192
3192
|
map(e) {
|
|
3193
3193
|
let t = e.mapResult(this.pos, 1);
|
|
3194
|
-
return t.deletedAfter ? null : new
|
|
3194
|
+
return t.deletedAfter ? null : new Ut(t.pos, this.mark);
|
|
3195
3195
|
}
|
|
3196
3196
|
toJSON() {
|
|
3197
3197
|
return { stepType: "removeNodeMark", pos: this.pos, mark: this.mark.toJSON() };
|
|
@@ -3202,10 +3202,10 @@ class Kt extends Y {
|
|
|
3202
3202
|
static fromJSON(e, t) {
|
|
3203
3203
|
if (typeof t.pos != "number")
|
|
3204
3204
|
throw new RangeError("Invalid input for RemoveNodeMarkStep.fromJSON");
|
|
3205
|
-
return new
|
|
3205
|
+
return new Ut(t.pos, e.markFromJSON(t.mark));
|
|
3206
3206
|
}
|
|
3207
3207
|
}
|
|
3208
|
-
Y.jsonID("removeNodeMark",
|
|
3208
|
+
Y.jsonID("removeNodeMark", Ut);
|
|
3209
3209
|
class ie extends Y {
|
|
3210
3210
|
/**
|
|
3211
3211
|
The given `slice` should fit the 'gap' between `from` and
|
|
@@ -3375,10 +3375,10 @@ function Pe(n, e, t = 1, r) {
|
|
|
3375
3375
|
let f = i.node(c), p = i.index(c);
|
|
3376
3376
|
if (f.type.spec.isolating)
|
|
3377
3377
|
return !1;
|
|
3378
|
-
let d = f.content.cutByIndex(p, f.childCount),
|
|
3379
|
-
|
|
3380
|
-
let
|
|
3381
|
-
if (!f.canReplace(p + 1, f.childCount) || !
|
|
3378
|
+
let d = f.content.cutByIndex(p, f.childCount), g = r && r[u + 1];
|
|
3379
|
+
g && (d = d.replaceChild(0, g.type.create(g.attrs)));
|
|
3380
|
+
let m = r && r[u] || f;
|
|
3381
|
+
if (!f.canReplace(p + 1, f.childCount) || !m.type.validContent(d))
|
|
3382
3382
|
return !1;
|
|
3383
3383
|
}
|
|
3384
3384
|
let a = i.indexAfter(o), l = r && r[0];
|
|
@@ -3520,28 +3520,28 @@ class $a {
|
|
|
3520
3520
|
for (; this.depth > t; )
|
|
3521
3521
|
this.closeFrontierNode();
|
|
3522
3522
|
if (o)
|
|
3523
|
-
for (let
|
|
3524
|
-
this.openFrontierNode(o[
|
|
3523
|
+
for (let m = 0; m < o.length; m++)
|
|
3524
|
+
this.openFrontierNode(o[m]);
|
|
3525
3525
|
let s = this.unplaced, a = r ? r.content : s.content, l = s.openStart - e, c = 0, u = [], { match: f, type: p } = this.frontier[t];
|
|
3526
3526
|
if (i) {
|
|
3527
|
-
for (let
|
|
3528
|
-
u.push(i.child(
|
|
3527
|
+
for (let m = 0; m < i.childCount; m++)
|
|
3528
|
+
u.push(i.child(m));
|
|
3529
3529
|
f = f.matchFragment(i);
|
|
3530
3530
|
}
|
|
3531
3531
|
let d = a.size + e - (s.content.size - s.openEnd);
|
|
3532
3532
|
for (; c < a.childCount; ) {
|
|
3533
|
-
let
|
|
3534
|
-
if (!
|
|
3533
|
+
let m = a.child(c), y = f.matchType(m.type);
|
|
3534
|
+
if (!y)
|
|
3535
3535
|
break;
|
|
3536
|
-
c++, (c > 1 || l == 0 ||
|
|
3536
|
+
c++, (c > 1 || l == 0 || m.content.size) && (f = y, u.push(Lo(m.mark(p.allowedMarks(m.marks)), c == 1 ? l : 0, c == a.childCount ? d : -1)));
|
|
3537
3537
|
}
|
|
3538
|
-
let
|
|
3539
|
-
|
|
3540
|
-
for (let
|
|
3541
|
-
let b =
|
|
3542
|
-
this.frontier.push({ type: b.type, match: b.contentMatchAt(b.childCount) }),
|
|
3538
|
+
let g = c == a.childCount;
|
|
3539
|
+
g || (d = -1), this.placed = Ft(this.placed, t, k.from(u)), this.frontier[t].match = f, g && d < 0 && r && r.type == this.frontier[this.depth].type && this.frontier.length > 1 && this.closeFrontierNode();
|
|
3540
|
+
for (let m = 0, y = a; m < d; m++) {
|
|
3541
|
+
let b = y.lastChild;
|
|
3542
|
+
this.frontier.push({ type: b.type, match: b.contentMatchAt(b.childCount) }), y = b.content;
|
|
3543
3543
|
}
|
|
3544
|
-
this.unplaced =
|
|
3544
|
+
this.unplaced = g ? e == 0 ? S.empty : new S(zt(s.content, e - 1, 1), e - 1, d < 0 ? s.openEnd : e - 1) : new S(zt(s.content, e, c), s.openStart, s.openEnd);
|
|
3545
3545
|
}
|
|
3546
3546
|
mustMoveInline() {
|
|
3547
3547
|
if (!this.$to.parent.isTextblock)
|
|
@@ -3619,7 +3619,7 @@ function Va(n, e, t) {
|
|
|
3619
3619
|
return !0;
|
|
3620
3620
|
return !1;
|
|
3621
3621
|
}
|
|
3622
|
-
class
|
|
3622
|
+
class Vt extends Y {
|
|
3623
3623
|
/**
|
|
3624
3624
|
Construct an attribute step.
|
|
3625
3625
|
*/
|
|
@@ -3641,11 +3641,11 @@ class $t extends Y {
|
|
|
3641
3641
|
return oe.empty;
|
|
3642
3642
|
}
|
|
3643
3643
|
invert(e) {
|
|
3644
|
-
return new
|
|
3644
|
+
return new Vt(this.pos, this.attr, e.nodeAt(this.pos).attrs[this.attr]);
|
|
3645
3645
|
}
|
|
3646
3646
|
map(e) {
|
|
3647
3647
|
let t = e.mapResult(this.pos, 1);
|
|
3648
|
-
return t.deletedAfter ? null : new
|
|
3648
|
+
return t.deletedAfter ? null : new Vt(t.pos, this.attr, this.value);
|
|
3649
3649
|
}
|
|
3650
3650
|
toJSON() {
|
|
3651
3651
|
return { stepType: "attr", pos: this.pos, attr: this.attr, value: this.value };
|
|
@@ -3653,11 +3653,11 @@ class $t extends Y {
|
|
|
3653
3653
|
static fromJSON(e, t) {
|
|
3654
3654
|
if (typeof t.pos != "number" || typeof t.attr != "string")
|
|
3655
3655
|
throw new RangeError("Invalid input for AttrStep.fromJSON");
|
|
3656
|
-
return new
|
|
3656
|
+
return new Vt(t.pos, t.attr, t.value);
|
|
3657
3657
|
}
|
|
3658
3658
|
}
|
|
3659
|
-
Y.jsonID("attr",
|
|
3660
|
-
class
|
|
3659
|
+
Y.jsonID("attr", Vt);
|
|
3660
|
+
class zn extends Y {
|
|
3661
3661
|
/**
|
|
3662
3662
|
Construct an attribute step.
|
|
3663
3663
|
*/
|
|
@@ -3676,7 +3676,7 @@ class Bn extends Y {
|
|
|
3676
3676
|
return oe.empty;
|
|
3677
3677
|
}
|
|
3678
3678
|
invert(e) {
|
|
3679
|
-
return new
|
|
3679
|
+
return new zn(this.attr, e.attrs[this.attr]);
|
|
3680
3680
|
}
|
|
3681
3681
|
map(e) {
|
|
3682
3682
|
return this;
|
|
@@ -3687,19 +3687,19 @@ class Bn extends Y {
|
|
|
3687
3687
|
static fromJSON(e, t) {
|
|
3688
3688
|
if (typeof t.attr != "string")
|
|
3689
3689
|
throw new RangeError("Invalid input for DocAttrStep.fromJSON");
|
|
3690
|
-
return new
|
|
3690
|
+
return new zn(t.attr, t.value);
|
|
3691
3691
|
}
|
|
3692
3692
|
}
|
|
3693
|
-
Y.jsonID("docAttr",
|
|
3694
|
-
let
|
|
3693
|
+
Y.jsonID("docAttr", zn);
|
|
3694
|
+
let Gt = class extends Error {
|
|
3695
3695
|
};
|
|
3696
|
-
|
|
3696
|
+
Gt = function n(e) {
|
|
3697
3697
|
let t = Error.call(this, e);
|
|
3698
3698
|
return t.__proto__ = n.prototype, t;
|
|
3699
3699
|
};
|
|
3700
|
-
|
|
3701
|
-
|
|
3702
|
-
|
|
3700
|
+
Gt.prototype = Object.create(Error.prototype);
|
|
3701
|
+
Gt.prototype.constructor = Gt;
|
|
3702
|
+
Gt.prototype.name = "TransformError";
|
|
3703
3703
|
const ar = /* @__PURE__ */ Object.create(null);
|
|
3704
3704
|
class D {
|
|
3705
3705
|
/**
|
|
@@ -4098,33 +4098,33 @@ function Ti(n, e, t) {
|
|
|
4098
4098
|
function Mi(n, e) {
|
|
4099
4099
|
return !e || !n ? n : n.bind(e);
|
|
4100
4100
|
}
|
|
4101
|
-
class
|
|
4101
|
+
class wn {
|
|
4102
4102
|
constructor(e, t, r) {
|
|
4103
4103
|
this.name = e, this.init = Mi(t.init, r), this.apply = Mi(t.apply, r);
|
|
4104
4104
|
}
|
|
4105
4105
|
}
|
|
4106
|
-
new
|
|
4106
|
+
new wn("doc", {
|
|
4107
4107
|
init(n) {
|
|
4108
4108
|
return n.doc || n.schema.topNodeType.createAndFill();
|
|
4109
4109
|
},
|
|
4110
4110
|
apply(n) {
|
|
4111
4111
|
return n.doc;
|
|
4112
4112
|
}
|
|
4113
|
-
}), new
|
|
4113
|
+
}), new wn("selection", {
|
|
4114
4114
|
init(n, e) {
|
|
4115
4115
|
return n.selection || D.atStart(e.doc);
|
|
4116
4116
|
},
|
|
4117
4117
|
apply(n) {
|
|
4118
4118
|
return n.selection;
|
|
4119
4119
|
}
|
|
4120
|
-
}), new
|
|
4120
|
+
}), new wn("storedMarks", {
|
|
4121
4121
|
init(n) {
|
|
4122
4122
|
return n.storedMarks || null;
|
|
4123
4123
|
},
|
|
4124
4124
|
apply(n, e, t, r) {
|
|
4125
4125
|
return r.selection.$cursor ? n.storedMarks : null;
|
|
4126
4126
|
}
|
|
4127
|
-
}), new
|
|
4127
|
+
}), new wn("scrollToSelection", {
|
|
4128
4128
|
init() {
|
|
4129
4129
|
return 0;
|
|
4130
4130
|
},
|
|
@@ -4186,33 +4186,38 @@ const ft = function(n) {
|
|
|
4186
4186
|
return t && (Ai(n, e, t, r, -1) || Ai(n, e, t, r, 1));
|
|
4187
4187
|
}, Ha = /^(img|br|input|textarea|hr)$/i;
|
|
4188
4188
|
function Ai(n, e, t, r, i) {
|
|
4189
|
-
for (; ; ) {
|
|
4189
|
+
for (var o; ; ) {
|
|
4190
4190
|
if (n == t && e == r)
|
|
4191
4191
|
return !0;
|
|
4192
|
-
if (e == (i < 0 ? 0 :
|
|
4193
|
-
let
|
|
4194
|
-
if (!
|
|
4192
|
+
if (e == (i < 0 ? 0 : Fn(n))) {
|
|
4193
|
+
let s = n.parentNode;
|
|
4194
|
+
if (!s || s.nodeType != 1 || Lr(n) || Ha.test(n.nodeName) || n.contentEditable == "false")
|
|
4195
4195
|
return !1;
|
|
4196
|
-
e = ft(n) + (i < 0 ? 0 : 1), n =
|
|
4196
|
+
e = ft(n) + (i < 0 ? 0 : 1), n = s;
|
|
4197
4197
|
} else if (n.nodeType == 1) {
|
|
4198
|
-
|
|
4199
|
-
|
|
4200
|
-
|
|
4198
|
+
let s = n.childNodes[e + (i < 0 ? -1 : 0)];
|
|
4199
|
+
if (s.nodeType == 1 && s.contentEditable == "false")
|
|
4200
|
+
if (!((o = s.pmViewDesc) === null || o === void 0) && o.ignoreForSelection)
|
|
4201
|
+
e += i;
|
|
4202
|
+
else
|
|
4203
|
+
return !1;
|
|
4204
|
+
else
|
|
4205
|
+
n = s, e = i < 0 ? Fn(n) : 0;
|
|
4201
4206
|
} else
|
|
4202
4207
|
return !1;
|
|
4203
4208
|
}
|
|
4204
4209
|
}
|
|
4205
|
-
function
|
|
4210
|
+
function Fn(n) {
|
|
4206
4211
|
return n.nodeType == 3 ? n.nodeValue.length : n.childNodes.length;
|
|
4207
4212
|
}
|
|
4208
4213
|
function Ja(n, e, t) {
|
|
4209
|
-
for (let r = e == 0, i = e ==
|
|
4214
|
+
for (let r = e == 0, i = e == Fn(n); r || i; ) {
|
|
4210
4215
|
if (n == t)
|
|
4211
4216
|
return !0;
|
|
4212
4217
|
let o = ft(n);
|
|
4213
4218
|
if (n = n.parentNode, !n)
|
|
4214
4219
|
return !1;
|
|
4215
|
-
r = r && o == 0, i = i && o ==
|
|
4220
|
+
r = r && o == 0, i = i && o == Fn(n);
|
|
4216
4221
|
}
|
|
4217
4222
|
}
|
|
4218
4223
|
function Lr(n) {
|
|
@@ -4228,9 +4233,9 @@ function Ho(n, e) {
|
|
|
4228
4233
|
let t = document.createEvent("Event");
|
|
4229
4234
|
return t.initEvent("keydown", !0, !0), t.keyCode = n, t.key = t.code = e, t;
|
|
4230
4235
|
}
|
|
4231
|
-
const Oe = typeof navigator < "u" ? navigator : null, Ni = typeof document < "u" ? document : null, je = Oe && Oe.userAgent || "", wr = /Edge\/(\d+)/.exec(je), Jo = /MSIE \d/.exec(je), Sr = /Trident\/(?:[7-9]|\d{2,})\..*rv:(\d+)/.exec(je),
|
|
4236
|
+
const Oe = typeof navigator < "u" ? navigator : null, Ni = typeof document < "u" ? document : null, je = Oe && Oe.userAgent || "", wr = /Edge\/(\d+)/.exec(je), Jo = /MSIE \d/.exec(je), Sr = /Trident\/(?:[7-9]|\d{2,})\..*rv:(\d+)/.exec(je), rn = !!(Jo || Sr || wr), qo = Jo ? document.documentMode : Sr ? +Sr[1] : wr ? +wr[1] : 0, Yn = !rn && /gecko\/(\d+)/i.test(je);
|
|
4232
4237
|
Yn && +(/Firefox\/(\d+)/.exec(je) || [0, 0])[1];
|
|
4233
|
-
const Cr = !
|
|
4238
|
+
const Cr = !rn && /Chrome\/(\d+)/.exec(je), We = !!Cr, Ko = Cr ? +Cr[1] : 0, dt = !rn && !!Oe && /Apple Computer/.test(Oe.vendor), $r = dt && (/Mobile\/\w+/.test(je) || !!Oe && Oe.maxTouchPoints > 2), de = $r || (Oe ? /Mac/.test(Oe.platform) : !1), qa = Oe ? /Win/.test(Oe.platform) : !1, on = /Android \d/.test(je), Vr = !!Ni && "webkitFontSmoothing" in Ni.documentElement.style, Ka = Vr ? +(/\bAppleWebKit\/(\d+)/.exec(navigator.userAgent) || [0, 0])[1] : 0;
|
|
4234
4239
|
function Ua(n, e = null) {
|
|
4235
4240
|
let t = n.domSelectionRange(), r = n.state.doc;
|
|
4236
4241
|
if (!t.focusNode)
|
|
@@ -4251,8 +4256,8 @@ function Ua(n, e = null) {
|
|
|
4251
4256
|
if (t instanceof n.dom.ownerDocument.defaultView.Selection && t.rangeCount > 1) {
|
|
4252
4257
|
let f = s, p = s;
|
|
4253
4258
|
for (let d = 0; d < t.rangeCount; d++) {
|
|
4254
|
-
let
|
|
4255
|
-
f = Math.min(f, n.docView.posFromDOM(
|
|
4259
|
+
let g = t.getRangeAt(d);
|
|
4260
|
+
f = Math.min(f, n.docView.posFromDOM(g.startContainer, g.startOffset, 1)), p = Math.max(p, n.docView.posFromDOM(g.endContainer, g.endOffset, -1));
|
|
4256
4261
|
}
|
|
4257
4262
|
if (f < 0)
|
|
4258
4263
|
return null;
|
|
@@ -4324,7 +4329,7 @@ function Ya(n) {
|
|
|
4324
4329
|
if (!e)
|
|
4325
4330
|
return;
|
|
4326
4331
|
let r = n.cursorWrapper.dom, i = r.nodeName == "IMG";
|
|
4327
|
-
i ? t.setStart(r.parentNode, ft(r) + 1) : t.setStart(r, 0), t.collapse(!0), e.removeAllRanges(), e.addRange(t), !i && !n.state.selection.visible &&
|
|
4332
|
+
i ? t.setStart(r.parentNode, ft(r) + 1) : t.setStart(r, 0), t.collapse(!0), e.removeAllRanges(), e.addRange(t), !i && !n.state.selection.visible && rn && qo <= 11 && (r.disabled = !0, r.disabled = !1);
|
|
4328
4333
|
}
|
|
4329
4334
|
function Xa(n, e) {
|
|
4330
4335
|
if (e instanceof O) {
|
|
@@ -4386,10 +4391,10 @@ function Bi(n, e, t) {
|
|
|
4386
4391
|
}
|
|
4387
4392
|
}
|
|
4388
4393
|
}
|
|
4389
|
-
function
|
|
4394
|
+
function Ln(n) {
|
|
4390
4395
|
return n.nodeType == 3 ? n.nodeValue.length : n.childNodes.length;
|
|
4391
4396
|
}
|
|
4392
|
-
function
|
|
4397
|
+
function jt(n, e) {
|
|
4393
4398
|
let t = n.pmViewDesc;
|
|
4394
4399
|
return t && t.size == 0 && (e < 0 || n.nextSibling || n.nodeName != "BR");
|
|
4395
4400
|
}
|
|
@@ -4401,13 +4406,13 @@ function Za(n) {
|
|
|
4401
4406
|
if (!t)
|
|
4402
4407
|
return;
|
|
4403
4408
|
let i, o, s = !1;
|
|
4404
|
-
for (Yn && t.nodeType == 1 && r <
|
|
4409
|
+
for (Yn && t.nodeType == 1 && r < Ln(t) && jt(t.childNodes[r], -1) && (s = !0); ; )
|
|
4405
4410
|
if (r > 0) {
|
|
4406
4411
|
if (t.nodeType != 1)
|
|
4407
4412
|
break;
|
|
4408
4413
|
{
|
|
4409
4414
|
let a = t.childNodes[r - 1];
|
|
4410
|
-
if (
|
|
4415
|
+
if (jt(a, -1))
|
|
4411
4416
|
i = t, o = --r;
|
|
4412
4417
|
else if (a.nodeType == 3)
|
|
4413
4418
|
t = a, r = t.nodeValue.length;
|
|
@@ -4419,10 +4424,10 @@ function Za(n) {
|
|
|
4419
4424
|
break;
|
|
4420
4425
|
{
|
|
4421
4426
|
let a = t.previousSibling;
|
|
4422
|
-
for (; a &&
|
|
4427
|
+
for (; a && jt(a, -1); )
|
|
4423
4428
|
i = t.parentNode, o = ft(a), a = a.previousSibling;
|
|
4424
4429
|
if (a)
|
|
4425
|
-
t = a, r =
|
|
4430
|
+
t = a, r = Ln(t);
|
|
4426
4431
|
else {
|
|
4427
4432
|
if (t = t.parentNode, t == n.dom)
|
|
4428
4433
|
break;
|
|
@@ -4436,13 +4441,13 @@ function _a(n) {
|
|
|
4436
4441
|
let e = n.domSelectionRange(), t = e.focusNode, r = e.focusOffset;
|
|
4437
4442
|
if (!t)
|
|
4438
4443
|
return;
|
|
4439
|
-
let i =
|
|
4444
|
+
let i = Ln(t), o, s;
|
|
4440
4445
|
for (; ; )
|
|
4441
4446
|
if (r < i) {
|
|
4442
4447
|
if (t.nodeType != 1)
|
|
4443
4448
|
break;
|
|
4444
4449
|
let a = t.childNodes[r];
|
|
4445
|
-
if (
|
|
4450
|
+
if (jt(a, 1))
|
|
4446
4451
|
o = t, s = ++r;
|
|
4447
4452
|
else
|
|
4448
4453
|
break;
|
|
@@ -4451,10 +4456,10 @@ function _a(n) {
|
|
|
4451
4456
|
break;
|
|
4452
4457
|
{
|
|
4453
4458
|
let a = t.nextSibling;
|
|
4454
|
-
for (; a &&
|
|
4459
|
+
for (; a && jt(a, 1); )
|
|
4455
4460
|
o = a.parentNode, s = ft(a) + 1, a = a.nextSibling;
|
|
4456
4461
|
if (a)
|
|
4457
|
-
t = a, r = 0, i =
|
|
4462
|
+
t = a, r = 0, i = Ln(t);
|
|
4458
4463
|
else {
|
|
4459
4464
|
if (t = t.parentNode, t == n.dom)
|
|
4460
4465
|
break;
|
|
@@ -4616,10 +4621,10 @@ function Xo(n, e) {
|
|
|
4616
4621
|
let c = l.firstChild, u, f = 0;
|
|
4617
4622
|
for (; c && c.nodeType == 1 && (u = ts[c.nodeName.toLowerCase()]); ) {
|
|
4618
4623
|
for (let d = u.length - 1; d >= 0; d--) {
|
|
4619
|
-
let
|
|
4624
|
+
let g = a.createElement(u[d]);
|
|
4620
4625
|
for (; l.firstChild; )
|
|
4621
|
-
|
|
4622
|
-
l.appendChild(
|
|
4626
|
+
g.appendChild(l.firstChild);
|
|
4627
|
+
l.appendChild(g), f++;
|
|
4623
4628
|
}
|
|
4624
4629
|
c = l.firstChild;
|
|
4625
4630
|
}
|
|
@@ -4644,10 +4649,10 @@ function Qo(n, e, t, r, i) {
|
|
|
4644
4649
|
if (f)
|
|
4645
4650
|
a = f;
|
|
4646
4651
|
else {
|
|
4647
|
-
let p = i.marks(), { schema: d } = n.state,
|
|
4648
|
-
s = document.createElement("div"), e.split(/(?:\r\n?|\n)+/).forEach((
|
|
4649
|
-
let
|
|
4650
|
-
|
|
4652
|
+
let p = i.marks(), { schema: d } = n.state, g = Kn.fromSchema(d);
|
|
4653
|
+
s = document.createElement("div"), e.split(/(?:\r\n?|\n)+/).forEach((m) => {
|
|
4654
|
+
let y = s.appendChild(document.createElement("p"));
|
|
4655
|
+
m && y.appendChild(g.serializeNode(d.text(m, p)));
|
|
4651
4656
|
});
|
|
4652
4657
|
}
|
|
4653
4658
|
} else
|
|
@@ -4795,7 +4800,7 @@ function $e(n, e) {
|
|
|
4795
4800
|
}
|
|
4796
4801
|
le.keydown = (n, e) => {
|
|
4797
4802
|
let t = e;
|
|
4798
|
-
if (n.input.shiftKey = t.keyCode == 16 || t.shiftKey, !is(n, t) && (n.input.lastKeyCode = t.keyCode, n.input.lastKeyCodeTime = Date.now(), !(
|
|
4803
|
+
if (n.input.shiftKey = t.keyCode == 16 || t.shiftKey, !is(n, t) && (n.input.lastKeyCode = t.keyCode, n.input.lastKeyCodeTime = Date.now(), !(on && We && t.keyCode == 13)))
|
|
4799
4804
|
if (t.keyCode != 229 && n.domObserver.forceFlush(), $r && t.keyCode == 13 && !t.ctrlKey && !t.altKey && !t.metaKey) {
|
|
4800
4805
|
let r = Date.now();
|
|
4801
4806
|
n.input.lastIOSEnter = r, n.input.lastIOSEnterFallbackTimeout = setTimeout(() => {
|
|
@@ -4816,8 +4821,8 @@ le.keypress = (n, e) => {
|
|
|
4816
4821
|
}
|
|
4817
4822
|
let r = n.state.selection;
|
|
4818
4823
|
if (!(r instanceof A) || !r.$from.sameParent(r.$to)) {
|
|
4819
|
-
let i = String.fromCharCode(t.charCode);
|
|
4820
|
-
!/[\r\n]/.test(i) && !n.someProp("handleTextInput", (
|
|
4824
|
+
let i = String.fromCharCode(t.charCode), o = () => n.state.tr.insertText(i).scrollIntoView();
|
|
4825
|
+
!/[\r\n]/.test(i) && !n.someProp("handleTextInput", (s) => s(n, r.$from.pos, r.$to.pos, i, o)) && n.dispatch(o()), t.preventDefault();
|
|
4821
4826
|
}
|
|
4822
4827
|
};
|
|
4823
4828
|
function Xn(n) {
|
|
@@ -4891,14 +4896,14 @@ function yl(n, e, t) {
|
|
|
4891
4896
|
}
|
|
4892
4897
|
}
|
|
4893
4898
|
function Hr(n) {
|
|
4894
|
-
return
|
|
4899
|
+
return $n(n);
|
|
4895
4900
|
}
|
|
4896
4901
|
const rs = de ? "metaKey" : "ctrlKey";
|
|
4897
4902
|
ve.mousedown = (n, e) => {
|
|
4898
4903
|
let t = e;
|
|
4899
4904
|
n.input.shiftKey = t.shiftKey;
|
|
4900
4905
|
let r = Hr(n), i = Date.now(), o = "singleClick";
|
|
4901
|
-
i - n.input.lastClick.time < 500 && fl(t, n.input.lastClick) && !t[rs] && (n.input.lastClick.type == "singleClick" ? o = "doubleClick" : n.input.lastClick.type == "doubleClick" && (o = "tripleClick")), n.input.lastClick = { time: i, x: t.clientX, y: t.clientY, type: o };
|
|
4906
|
+
i - n.input.lastClick.time < 500 && fl(t, n.input.lastClick) && !t[rs] && n.input.lastClick.button == t.button && (n.input.lastClick.type == "singleClick" ? o = "doubleClick" : n.input.lastClick.type == "doubleClick" && (o = "tripleClick")), n.input.lastClick = { time: i, x: t.clientX, y: t.clientY, type: o, button: t.button };
|
|
4902
4907
|
let s = n.posAtCoords(Xn(t));
|
|
4903
4908
|
s && (o == "singleClick" ? (n.input.mouseDown && n.input.mouseDown.done(), n.input.mouseDown = new vl(n, s, t, !!r)) : (o == "doubleClick" ? ml : gl)(n, s.pos, s.inside, t) ? t.preventDefault() : $e(n, "pointer"));
|
|
4904
4909
|
};
|
|
@@ -4958,14 +4963,14 @@ ve.contextmenu = (n) => Hr(n);
|
|
|
4958
4963
|
function is(n, e) {
|
|
4959
4964
|
return n.composing ? !0 : dt && Math.abs(e.timeStamp - n.input.compositionEndedAt) < 500 ? (n.input.compositionEndedAt = -2e8, !0) : !1;
|
|
4960
4965
|
}
|
|
4961
|
-
const bl =
|
|
4966
|
+
const bl = on ? 5e3 : -1;
|
|
4962
4967
|
le.compositionstart = le.compositionupdate = (n) => {
|
|
4963
4968
|
if (!n.composing) {
|
|
4964
4969
|
n.domObserver.flush();
|
|
4965
4970
|
let { state: e } = n, t = e.selection.$to;
|
|
4966
4971
|
if (e.selection instanceof A && (e.storedMarks || !t.textOffset && t.parentOffset && t.nodeBefore.marks.some((r) => r.type.spec.inclusive === !1)))
|
|
4967
|
-
n.markCursor = n.state.storedMarks || t.marks(),
|
|
4968
|
-
else if (
|
|
4972
|
+
n.markCursor = n.state.storedMarks || t.marks(), $n(n, !0), n.markCursor = null;
|
|
4973
|
+
else if ($n(n, !e.selection.empty), Yn && e.selection.empty && t.parentOffset && !t.textOffset && t.nodeBefore.marks.length) {
|
|
4969
4974
|
let r = n.domSelectionRange();
|
|
4970
4975
|
for (let i = r.focusNode, o = r.focusOffset; i && i.nodeType == 1 && o != 0; ) {
|
|
4971
4976
|
let s = o < 0 ? i.lastChild : i.childNodes[o - 1];
|
|
@@ -4987,7 +4992,7 @@ le.compositionend = (n, e) => {
|
|
|
4987
4992
|
n.composing && (n.input.composing = !1, n.input.compositionEndedAt = e.timeStamp, n.input.compositionPendingChanges = n.domObserver.pendingRecords().length ? n.input.compositionID : 0, n.input.compositionNode = null, n.input.compositionPendingChanges && Promise.resolve().then(() => n.domObserver.flush()), n.input.compositionID++, ss(n, 20));
|
|
4988
4993
|
};
|
|
4989
4994
|
function ss(n, e) {
|
|
4990
|
-
clearTimeout(n.input.composingTimeout), e > -1 && (n.input.composingTimeout = setTimeout(() =>
|
|
4995
|
+
clearTimeout(n.input.composingTimeout), e > -1 && (n.input.composingTimeout = setTimeout(() => $n(n), e));
|
|
4991
4996
|
}
|
|
4992
4997
|
function xl(n) {
|
|
4993
4998
|
for (n.composing && (n.input.composing = !1, n.input.compositionEndedAt = kl()); n.input.compositionNodes.length > 0; )
|
|
@@ -4997,11 +5002,11 @@ function kl() {
|
|
|
4997
5002
|
let n = document.createEvent("Event");
|
|
4998
5003
|
return n.initEvent("event", !0, !0), n.timeStamp;
|
|
4999
5004
|
}
|
|
5000
|
-
function
|
|
5001
|
-
if (!(
|
|
5005
|
+
function $n(n, e = !1) {
|
|
5006
|
+
if (!(on && n.domObserver.flushingSoon >= 0)) {
|
|
5002
5007
|
if (n.domObserver.forceFlush(), xl(n), e || n.docView && n.docView.dirty) {
|
|
5003
|
-
let t = Ua(n);
|
|
5004
|
-
return t && !t.eq(
|
|
5008
|
+
let t = Ua(n), r = n.state.selection;
|
|
5009
|
+
return t && !t.eq(r) ? n.dispatch(n.state.tr.setSelection(t)) : (n.markCursor || e) && !r.$from.node(r.$from.sharedDepth(r.to)).inlineContent ? n.dispatch(n.state.tr.deleteSelection()) : n.updateState(n.state), !0;
|
|
5005
5010
|
}
|
|
5006
5011
|
return !1;
|
|
5007
5012
|
}
|
|
@@ -5016,12 +5021,12 @@ function wl(n, e) {
|
|
|
5016
5021
|
t.parentNode && t.parentNode.removeChild(t), n.focus();
|
|
5017
5022
|
}, 50);
|
|
5018
5023
|
}
|
|
5019
|
-
const
|
|
5024
|
+
const Yt = rn && qo < 15 || $r && Ka < 604;
|
|
5020
5025
|
ve.copy = le.cut = (n, e) => {
|
|
5021
5026
|
let t = e, r = n.state.selection, i = t.type == "cut";
|
|
5022
5027
|
if (r.empty)
|
|
5023
5028
|
return;
|
|
5024
|
-
let o =
|
|
5029
|
+
let o = Yt ? null : t.clipboardData, s = r.content(), { dom: a, text: l } = Xo(n, s);
|
|
5025
5030
|
o ? (t.preventDefault(), o.clearData(), o.setData("text/html", a.innerHTML), o.setData("text/plain", l)) : wl(n, a), i && n.dispatch(n.state.tr.deleteSelection().scrollIntoView().setMeta("uiEvent", "cut"));
|
|
5026
5031
|
};
|
|
5027
5032
|
function Sl(n) {
|
|
@@ -5055,9 +5060,9 @@ function as(n) {
|
|
|
5055
5060
|
}
|
|
5056
5061
|
le.paste = (n, e) => {
|
|
5057
5062
|
let t = e;
|
|
5058
|
-
if (n.composing && !
|
|
5063
|
+
if (n.composing && !on)
|
|
5059
5064
|
return;
|
|
5060
|
-
let r =
|
|
5065
|
+
let r = Yt ? null : t.clipboardData, i = n.input.shiftKey && n.input.lastKeyCode != 45;
|
|
5061
5066
|
r && Mr(n, as(r), r.getData("text/html"), i, t) ? t.preventDefault() : Cl(n, t);
|
|
5062
5067
|
};
|
|
5063
5068
|
class Ol {
|
|
@@ -5084,7 +5089,7 @@ ve.dragstart = (n, e) => {
|
|
|
5084
5089
|
}
|
|
5085
5090
|
}
|
|
5086
5091
|
let a = (s || n.state.selection).content(), { dom: l, text: c, slice: u } = Xo(n, a);
|
|
5087
|
-
(!t.dataTransfer.files.length || !We || Ko > 120) && t.dataTransfer.clearData(), t.dataTransfer.setData(
|
|
5092
|
+
(!t.dataTransfer.files.length || !We || Ko > 120) && t.dataTransfer.clearData(), t.dataTransfer.setData(Yt ? "Text" : "text/html", l.innerHTML), t.dataTransfer.effectAllowed = "copyMove", Yt || t.dataTransfer.setData("text/plain", c), n.dragging = new Ol(u, ls(n, t), s);
|
|
5088
5093
|
};
|
|
5089
5094
|
ve.dragend = (n) => {
|
|
5090
5095
|
let e = n.dragging;
|
|
@@ -5101,11 +5106,11 @@ le.drop = (n, e) => {
|
|
|
5101
5106
|
if (!i)
|
|
5102
5107
|
return;
|
|
5103
5108
|
let o = n.state.doc.resolve(i.pos), s = r && r.slice;
|
|
5104
|
-
s ? n.someProp("transformPasted", (
|
|
5105
|
-
s =
|
|
5106
|
-
}) : s = Qo(n, as(t.dataTransfer),
|
|
5109
|
+
s ? n.someProp("transformPasted", (g) => {
|
|
5110
|
+
s = g(s, n);
|
|
5111
|
+
}) : s = Qo(n, as(t.dataTransfer), Yt ? null : t.dataTransfer.getData("text/html"), !1, o);
|
|
5107
5112
|
let a = !!(r && ls(n, t));
|
|
5108
|
-
if (n.someProp("handleDrop", (
|
|
5113
|
+
if (n.someProp("handleDrop", (g) => g(n, t, s || S.empty, a))) {
|
|
5109
5114
|
t.preventDefault();
|
|
5110
5115
|
return;
|
|
5111
5116
|
}
|
|
@@ -5116,8 +5121,8 @@ le.drop = (n, e) => {
|
|
|
5116
5121
|
l == null && (l = o.pos);
|
|
5117
5122
|
let c = n.state.tr;
|
|
5118
5123
|
if (a) {
|
|
5119
|
-
let { node:
|
|
5120
|
-
|
|
5124
|
+
let { node: g } = r;
|
|
5125
|
+
g ? g.replace(c) : c.deleteSelection();
|
|
5121
5126
|
}
|
|
5122
5127
|
let u = c.mapping.map(l), f = s.openStart == 0 && s.openEnd == 0 && s.content.childCount == 1, p = c.doc;
|
|
5123
5128
|
if (f ? c.replaceRangeWith(u, u, s.content.firstChild) : c.replaceRange(u, u, s), c.doc.eq(p))
|
|
@@ -5126,8 +5131,8 @@ le.drop = (n, e) => {
|
|
|
5126
5131
|
if (f && O.isSelectable(s.content.firstChild) && d.nodeAfter && d.nodeAfter.sameMarkup(s.content.firstChild))
|
|
5127
5132
|
c.setSelection(new O(d));
|
|
5128
5133
|
else {
|
|
5129
|
-
let
|
|
5130
|
-
c.mapping.maps[c.mapping.maps.length - 1].forEach((
|
|
5134
|
+
let g = c.mapping.map(l);
|
|
5135
|
+
c.mapping.maps[c.mapping.maps.length - 1].forEach((m, y, b, C) => g = C), c.setSelection(Go(n, d, c.doc.resolve(g)));
|
|
5131
5136
|
}
|
|
5132
5137
|
n.focus(), n.dispatch(c.setMeta("uiEvent", "drop"));
|
|
5133
5138
|
};
|
|
@@ -5141,7 +5146,7 @@ ve.blur = (n, e) => {
|
|
|
5141
5146
|
n.focused && (n.domObserver.stop(), n.dom.classList.remove("ProseMirror-focused"), n.domObserver.start(), t.relatedTarget && n.dom.contains(t.relatedTarget) && n.domObserver.currentSelection.clear(), n.focused = !1);
|
|
5142
5147
|
};
|
|
5143
5148
|
ve.beforeinput = (n, e) => {
|
|
5144
|
-
if (We &&
|
|
5149
|
+
if (We && on && e.inputType == "deleteContentBackward") {
|
|
5145
5150
|
n.domObserver.flushSoon();
|
|
5146
5151
|
let { domChangeCount: r } = n.input;
|
|
5147
5152
|
setTimeout(() => {
|
|
@@ -5154,7 +5159,7 @@ ve.beforeinput = (n, e) => {
|
|
|
5154
5159
|
};
|
|
5155
5160
|
for (let n in le)
|
|
5156
5161
|
ve[n] = le[n];
|
|
5157
|
-
function
|
|
5162
|
+
function Xt(n, e) {
|
|
5158
5163
|
if (n == e)
|
|
5159
5164
|
return !0;
|
|
5160
5165
|
for (let t in n)
|
|
@@ -5165,7 +5170,7 @@ function Yt(n, e) {
|
|
|
5165
5170
|
return !1;
|
|
5166
5171
|
return !0;
|
|
5167
5172
|
}
|
|
5168
|
-
class
|
|
5173
|
+
class Vn {
|
|
5169
5174
|
constructor(e, t) {
|
|
5170
5175
|
this.toDOM = e, this.spec = t || ot, this.side = this.spec.side || 0;
|
|
5171
5176
|
}
|
|
@@ -5177,7 +5182,7 @@ class $n {
|
|
|
5177
5182
|
return !0;
|
|
5178
5183
|
}
|
|
5179
5184
|
eq(e) {
|
|
5180
|
-
return this == e || e instanceof
|
|
5185
|
+
return this == e || e instanceof Vn && (this.spec.key && this.spec.key == e.spec.key || this.toDOM == e.toDOM && Xt(this.spec, e.spec));
|
|
5181
5186
|
}
|
|
5182
5187
|
destroy(e) {
|
|
5183
5188
|
this.spec.destroy && this.spec.destroy(e);
|
|
@@ -5195,7 +5200,7 @@ class Ve {
|
|
|
5195
5200
|
return t.from < t.to;
|
|
5196
5201
|
}
|
|
5197
5202
|
eq(e) {
|
|
5198
|
-
return this == e || e instanceof Ve &&
|
|
5203
|
+
return this == e || e instanceof Ve && Xt(this.attrs, e.attrs) && Xt(this.spec, e.spec);
|
|
5199
5204
|
}
|
|
5200
5205
|
static is(e) {
|
|
5201
5206
|
return e.type instanceof Ve;
|
|
@@ -5219,7 +5224,7 @@ class Jr {
|
|
|
5219
5224
|
return i == t.from && !(o = e.child(r)).isText && i + o.nodeSize == t.to;
|
|
5220
5225
|
}
|
|
5221
5226
|
eq(e) {
|
|
5222
|
-
return this == e || e instanceof Jr &&
|
|
5227
|
+
return this == e || e instanceof Jr && Xt(this.attrs, e.attrs) && Xt(this.spec, e.spec);
|
|
5223
5228
|
}
|
|
5224
5229
|
destroy() {
|
|
5225
5230
|
}
|
|
@@ -5258,7 +5263,7 @@ class Se {
|
|
|
5258
5263
|
widget's current document position.
|
|
5259
5264
|
*/
|
|
5260
5265
|
static widget(e, t, r) {
|
|
5261
|
-
return new Se(e, e, new
|
|
5266
|
+
return new Se(e, e, new Vn(t, r));
|
|
5262
5267
|
}
|
|
5263
5268
|
/**
|
|
5264
5269
|
Creates an inline decoration, which adds the given attributes to
|
|
@@ -5292,7 +5297,7 @@ class Se {
|
|
|
5292
5297
|
@internal
|
|
5293
5298
|
*/
|
|
5294
5299
|
get widget() {
|
|
5295
|
-
return this.type instanceof
|
|
5300
|
+
return this.type instanceof Vn;
|
|
5296
5301
|
}
|
|
5297
5302
|
}
|
|
5298
5303
|
const kt = [], ot = {};
|
|
@@ -5309,7 +5314,7 @@ class W {
|
|
|
5309
5314
|
you must make a copy if you want need to preserve that.
|
|
5310
5315
|
*/
|
|
5311
5316
|
static create(e, t) {
|
|
5312
|
-
return t.length ?
|
|
5317
|
+
return t.length ? jn(t, e, 0, ot) : Q;
|
|
5313
5318
|
}
|
|
5314
5319
|
/**
|
|
5315
5320
|
Find all decorations in this set which touch the given range
|
|
@@ -5368,7 +5373,7 @@ class W {
|
|
|
5368
5373
|
if (u = us(t, a, c)) {
|
|
5369
5374
|
for (i || (i = this.children.slice()); o < i.length && i[o] < l; )
|
|
5370
5375
|
o += 3;
|
|
5371
|
-
i[o] == l ? i[o + 2] = i[o + 2].addInner(a, u, c + 1) : i.splice(o, 0, l, l + a.nodeSize,
|
|
5376
|
+
i[o] == l ? i[o + 2] = i[o + 2].addInner(a, u, c + 1) : i.splice(o, 0, l, l + a.nodeSize, jn(u, a, c + 1, ot)), o += 3;
|
|
5372
5377
|
}
|
|
5373
5378
|
});
|
|
5374
5379
|
let s = cs(o ? fs(t) : t, -r);
|
|
@@ -5532,16 +5537,16 @@ function Tl(n, e, t, r, i, o, s) {
|
|
|
5532
5537
|
let a = n.slice();
|
|
5533
5538
|
for (let c = 0, u = o; c < t.maps.length; c++) {
|
|
5534
5539
|
let f = 0;
|
|
5535
|
-
t.maps[c].forEach((p, d,
|
|
5536
|
-
let
|
|
5540
|
+
t.maps[c].forEach((p, d, g, m) => {
|
|
5541
|
+
let y = m - g - (d - p);
|
|
5537
5542
|
for (let b = 0; b < a.length; b += 3) {
|
|
5538
5543
|
let C = a[b + 1];
|
|
5539
5544
|
if (C < 0 || p > C + u - f)
|
|
5540
5545
|
continue;
|
|
5541
5546
|
let T = a[b] + u - f;
|
|
5542
|
-
d >= T ? a[b + 1] = p <= T ? -2 : -1 : p >= u &&
|
|
5547
|
+
d >= T ? a[b + 1] = p <= T ? -2 : -1 : p >= u && y && (a[b] += y, a[b + 1] += y);
|
|
5543
5548
|
}
|
|
5544
|
-
f +=
|
|
5549
|
+
f += y;
|
|
5545
5550
|
}), u = t.maps[c].map(u, -1);
|
|
5546
5551
|
}
|
|
5547
5552
|
let l = !1;
|
|
@@ -5556,15 +5561,15 @@ function Tl(n, e, t, r, i, o, s) {
|
|
|
5556
5561
|
l = !0;
|
|
5557
5562
|
continue;
|
|
5558
5563
|
}
|
|
5559
|
-
let p = t.map(n[c + 1] + o, -1), d = p - i, { index:
|
|
5560
|
-
if (
|
|
5561
|
-
let b = a[c + 2].mapInner(t,
|
|
5564
|
+
let p = t.map(n[c + 1] + o, -1), d = p - i, { index: g, offset: m } = r.content.findIndex(f), y = r.maybeChild(g);
|
|
5565
|
+
if (y && m == f && m + y.nodeSize == d) {
|
|
5566
|
+
let b = a[c + 2].mapInner(t, y, u + 1, n[c] + o + 1, s);
|
|
5562
5567
|
b != Q ? (a[c] = f, a[c + 1] = d, a[c + 2] = b) : (a[c + 1] = -2, l = !0);
|
|
5563
5568
|
} else
|
|
5564
5569
|
l = !0;
|
|
5565
5570
|
}
|
|
5566
5571
|
if (l) {
|
|
5567
|
-
let c = Ml(a, n, e, t, i, o, s), u =
|
|
5572
|
+
let c = Ml(a, n, e, t, i, o, s), u = jn(c, r, 0, s);
|
|
5568
5573
|
e = u.local;
|
|
5569
5574
|
for (let f = 0; f < a.length; f += 3)
|
|
5570
5575
|
a[f + 1] < 0 && (a.splice(f, 3), f -= 3);
|
|
@@ -5614,13 +5619,13 @@ function fs(n) {
|
|
|
5614
5619
|
n[t] != null && e.push(n[t]);
|
|
5615
5620
|
return e;
|
|
5616
5621
|
}
|
|
5617
|
-
function
|
|
5622
|
+
function jn(n, e, t, r) {
|
|
5618
5623
|
let i = [], o = !1;
|
|
5619
5624
|
e.forEach((a, l) => {
|
|
5620
5625
|
let c = us(n, a, l + t);
|
|
5621
5626
|
if (c) {
|
|
5622
5627
|
o = !0;
|
|
5623
|
-
let u =
|
|
5628
|
+
let u = jn(c, a, t + l + 1, r);
|
|
5624
5629
|
u != Q && i.push(l, l + a.nodeSize, u);
|
|
5625
5630
|
}
|
|
5626
5631
|
});
|
|
@@ -5903,8 +5908,8 @@ function Bl(n) {
|
|
|
5903
5908
|
if (p || (o[0] = a ? { type: a } : null, p = Pe(u.doc, f, o.length, o)), !p)
|
|
5904
5909
|
return !1;
|
|
5905
5910
|
if (u.split(f, o.length, o), !l && c && r.node(s).type != a) {
|
|
5906
|
-
let d = u.mapping.map(r.before(s)),
|
|
5907
|
-
a && r.node(s - 1).canReplaceWith(
|
|
5911
|
+
let d = u.mapping.map(r.before(s)), g = u.doc.resolve(d);
|
|
5912
|
+
a && r.node(s - 1).canReplaceWith(g.index(), g.index() + 1, a) && u.setNodeMarkup(u.mapping.map(r.before(s)), a);
|
|
5908
5913
|
}
|
|
5909
5914
|
return t && t(u.scrollIntoView()), !0;
|
|
5910
5915
|
};
|
|
@@ -5924,12 +5929,12 @@ function ws(n, e, t, r) {
|
|
|
5924
5929
|
let c = !l && e.parent.canReplace(e.index(), e.index() + 1);
|
|
5925
5930
|
if (c && (s = (a = i.contentMatchAt(i.childCount)).findWrapping(o.type)) && a.matchType(s[0] || o.type).validEnd) {
|
|
5926
5931
|
if (t) {
|
|
5927
|
-
let d = e.pos + o.nodeSize,
|
|
5932
|
+
let d = e.pos + o.nodeSize, g = k.empty;
|
|
5928
5933
|
for (let b = s.length - 1; b >= 0; b--)
|
|
5929
|
-
|
|
5930
|
-
|
|
5931
|
-
let
|
|
5932
|
-
|
|
5934
|
+
g = k.from(s[b].create(null, g));
|
|
5935
|
+
g = k.from(i.copy(g));
|
|
5936
|
+
let m = n.tr.step(new _(e.pos - 1, d, e.pos, d, new S(g, 1, 0), s.length, !0)), y = m.doc.resolve(d + 2 * s.length);
|
|
5937
|
+
y.nodeAfter && y.nodeAfter.type == i.type && ut(m.doc, y.pos) && m.join(y.pos), t(m.scrollIntoView());
|
|
5933
5938
|
}
|
|
5934
5939
|
return !0;
|
|
5935
5940
|
}
|
|
@@ -5937,18 +5942,18 @@ function ws(n, e, t, r) {
|
|
|
5937
5942
|
if (p != null && p >= e.depth)
|
|
5938
5943
|
return t && t(n.tr.lift(f, p).scrollIntoView()), !0;
|
|
5939
5944
|
if (c && Ct(o, "start", !0) && Ct(i, "end")) {
|
|
5940
|
-
let d = i,
|
|
5941
|
-
for (;
|
|
5945
|
+
let d = i, g = [];
|
|
5946
|
+
for (; g.push(d), !d.isTextblock; )
|
|
5942
5947
|
d = d.lastChild;
|
|
5943
|
-
let
|
|
5944
|
-
for (; !
|
|
5945
|
-
|
|
5946
|
-
if (d.canReplace(d.childCount, d.childCount,
|
|
5948
|
+
let m = o, y = 1;
|
|
5949
|
+
for (; !m.isTextblock; m = m.firstChild)
|
|
5950
|
+
y++;
|
|
5951
|
+
if (d.canReplace(d.childCount, d.childCount, m.content)) {
|
|
5947
5952
|
if (t) {
|
|
5948
5953
|
let b = k.empty;
|
|
5949
|
-
for (let T =
|
|
5950
|
-
b = k.from(
|
|
5951
|
-
let C = n.tr.step(new _(e.pos -
|
|
5954
|
+
for (let T = g.length - 1; T >= 0; T--)
|
|
5955
|
+
b = k.from(g[T].copy(b));
|
|
5956
|
+
let C = n.tr.step(new _(e.pos - g.length, e.pos + o.nodeSize, e.pos + y, e.pos + o.nodeSize - y, new S(b, g.length, 0), 0, !0));
|
|
5952
5957
|
t(C.scrollIntoView());
|
|
5953
5958
|
}
|
|
5954
5959
|
return !0;
|
|
@@ -6031,7 +6036,7 @@ function Hl(n, e, t, r = null) {
|
|
|
6031
6036
|
if (e.$from.index(e.depth - 1) == 0)
|
|
6032
6037
|
return !1;
|
|
6033
6038
|
let l = s.resolve(e.start - 2);
|
|
6034
|
-
o = new
|
|
6039
|
+
o = new Pn(l, l, e.depth), e.endIndex < e.parent.childCount && (e = new Pn(e.$from, s.resolve(e.$to.end(e.depth)), e.depth)), i = !0;
|
|
6035
6040
|
}
|
|
6036
6041
|
let a = zo(o, t, r, e);
|
|
6037
6042
|
return a ? (n && Jl(n, e, a, i, t), !0) : !1;
|
|
@@ -6057,7 +6062,7 @@ function ql(n) {
|
|
|
6057
6062
|
}
|
|
6058
6063
|
function Kl(n, e, t, r) {
|
|
6059
6064
|
let i = n.tr, o = r.end, s = r.$to.end(r.depth);
|
|
6060
|
-
o < s && (i.step(new _(o - 1, s, o, s, new S(k.from(t.create(null, r.parent.copy())), 1, 0), 1, !0)), r = new
|
|
6065
|
+
o < s && (i.step(new _(o - 1, s, o, s, new S(k.from(t.create(null, r.parent.copy())), 1, 0), 1, !0)), r = new Pn(i.doc.resolve(r.$from.pos), i.doc.resolve(s), r.depth));
|
|
6061
6066
|
const a = At(r);
|
|
6062
6067
|
if (a == null)
|
|
6063
6068
|
return !1;
|
|
@@ -6067,8 +6072,8 @@ function Kl(n, e, t, r) {
|
|
|
6067
6072
|
}
|
|
6068
6073
|
function Ul(n, e, t) {
|
|
6069
6074
|
let r = n.tr, i = t.parent;
|
|
6070
|
-
for (let d = t.end,
|
|
6071
|
-
d -= i.child(
|
|
6075
|
+
for (let d = t.end, g = t.endIndex - 1, m = t.startIndex; g > m; g--)
|
|
6076
|
+
d -= i.child(g).nodeSize, r.delete(d - 1, d + 1);
|
|
6072
6077
|
let o = r.doc.resolve(t.start), s = o.nodeAfter;
|
|
6073
6078
|
if (r.mapping.map(t.end) != t.start + o.nodeAfter.nodeSize)
|
|
6074
6079
|
return !1;
|
|
@@ -6146,8 +6151,8 @@ class Yl {
|
|
|
6146
6151
|
}
|
|
6147
6152
|
createChain(e, t = !0) {
|
|
6148
6153
|
const { rawCommands: r, editor: i, state: o } = this, { view: s } = i, a = [], l = !!e, c = e || o.tr, u = () => (!l && t && !c.getMeta("preventDispatch") && !this.hasCustomState && s.dispatch(c), a.every((p) => p === !0)), f = {
|
|
6149
|
-
...Object.fromEntries(Object.entries(r).map(([p, d]) => [p, (...
|
|
6150
|
-
const
|
|
6154
|
+
...Object.fromEntries(Object.entries(r).map(([p, d]) => [p, (...m) => {
|
|
6155
|
+
const y = this.buildProps(c, t), b = d(...m)(y);
|
|
6151
6156
|
return a.push(b), f;
|
|
6152
6157
|
}])),
|
|
6153
6158
|
run: u
|
|
@@ -6245,16 +6250,16 @@ class Os {
|
|
|
6245
6250
|
function _l(n) {
|
|
6246
6251
|
return Object.prototype.toString.call(n).slice(8, -1);
|
|
6247
6252
|
}
|
|
6248
|
-
function
|
|
6253
|
+
function Sn(n) {
|
|
6249
6254
|
return _l(n) !== "Object" ? !1 : n.constructor === Object && Object.getPrototypeOf(n) === Object.prototype;
|
|
6250
6255
|
}
|
|
6251
6256
|
function Zn(n, e) {
|
|
6252
6257
|
const t = { ...n };
|
|
6253
|
-
return
|
|
6254
|
-
|
|
6258
|
+
return Sn(n) && Sn(e) && Object.keys(e).forEach((r) => {
|
|
6259
|
+
Sn(e[r]) && Sn(n[r]) ? t[r] = Zn(n[r], e[r]) : t[r] = e[r];
|
|
6255
6260
|
}), t;
|
|
6256
6261
|
}
|
|
6257
|
-
class
|
|
6262
|
+
class Qt {
|
|
6258
6263
|
constructor(e = {}) {
|
|
6259
6264
|
this.type = "mark", this.name = "mark", this.parent = null, this.child = null, this.config = {
|
|
6260
6265
|
name: this.name,
|
|
@@ -6270,7 +6275,7 @@ class Xt {
|
|
|
6270
6275
|
})) || {};
|
|
6271
6276
|
}
|
|
6272
6277
|
static create(e = {}) {
|
|
6273
|
-
return new
|
|
6278
|
+
return new Qt(e);
|
|
6274
6279
|
}
|
|
6275
6280
|
configure(e = {}) {
|
|
6276
6281
|
const t = this.extend({
|
|
@@ -6280,7 +6285,7 @@ class Xt {
|
|
|
6280
6285
|
return t.name = this.name, t.parent = this.parent, t;
|
|
6281
6286
|
}
|
|
6282
6287
|
extend(e = {}) {
|
|
6283
|
-
const t = new
|
|
6288
|
+
const t = new Qt(e);
|
|
6284
6289
|
return t.parent = this, this.child = t, t.name = e.name ? e.name : t.parent.name, e.defaultOptions && Object.keys(e.defaultOptions).length > 0 && console.warn(`[tiptap warn]: BREAKING CHANGE: "defaultOptions" is deprecated. Please use "addOptions" instead. Found in extension: "${t.name}".`), t.options = U(Z(t, "addOptions", {
|
|
6285
6290
|
name: t.name
|
|
6286
6291
|
})), t.storage = U(Z(t, "addStorage", {
|
|
@@ -6399,19 +6404,19 @@ const rc = () => ({ editor: n, view: e }) => (requestAnimationFrame(() => {
|
|
|
6399
6404
|
const { doc: c, mapping: u } = e, f = c.resolve(u.map(l)), p = c.resolve(u.map(l + a.nodeSize)), d = f.blockRange(p);
|
|
6400
6405
|
if (!d)
|
|
6401
6406
|
return;
|
|
6402
|
-
const
|
|
6407
|
+
const g = At(d);
|
|
6403
6408
|
if (a.type.isTextblock) {
|
|
6404
|
-
const { defaultType:
|
|
6405
|
-
e.setNodeMarkup(d.start,
|
|
6409
|
+
const { defaultType: m } = f.parent.contentMatchAt(f.index());
|
|
6410
|
+
e.setNodeMarkup(d.start, m);
|
|
6406
6411
|
}
|
|
6407
|
-
(
|
|
6412
|
+
(g || g === 0) && e.lift(d, g);
|
|
6408
6413
|
});
|
|
6409
6414
|
}), !0;
|
|
6410
6415
|
}, sc = (n) => (e) => n(e), ac = () => ({ state: n, dispatch: e }) => xs(n, e), lc = (n, e) => ({ editor: t, tr: r }) => {
|
|
6411
6416
|
const { state: i } = t, o = i.doc.slice(n.from, n.to);
|
|
6412
6417
|
r.deleteRange(n.from, n.to);
|
|
6413
6418
|
const s = r.mapping.map(e);
|
|
6414
|
-
return r.insert(s, o.content), r.setSelection(new A(r.doc.resolve(s - 1))), !0;
|
|
6419
|
+
return r.insert(s, o.content), r.setSelection(new A(r.doc.resolve(Math.max(s - 1, 0)))), !0;
|
|
6415
6420
|
}, cc = () => ({ tr: n, dispatch: e }) => {
|
|
6416
6421
|
const { selection: t } = n, r = t.$anchor.node();
|
|
6417
6422
|
if (r.content.size > 0)
|
|
@@ -6441,12 +6446,12 @@ const rc = () => ({ editor: n, view: e }) => (requestAnimationFrame(() => {
|
|
|
6441
6446
|
const { from: r, to: i } = n;
|
|
6442
6447
|
return t && e.delete(r, i), !0;
|
|
6443
6448
|
}, dc = () => ({ state: n, dispatch: e }) => Kr(n, e), pc = () => ({ commands: n }) => n.keyboardShortcut("Enter"), hc = () => ({ state: n, dispatch: e }) => Pl(n, e);
|
|
6444
|
-
function
|
|
6449
|
+
function Wn(n, e, t = { strict: !0 }) {
|
|
6445
6450
|
const r = Object.keys(e);
|
|
6446
6451
|
return r.length ? r.every((i) => t.strict ? e[i] === n[i] : Zl(e[i]) ? e[i].test(n[i]) : e[i] === n[i]) : !0;
|
|
6447
6452
|
}
|
|
6448
6453
|
function Es(n, e, t = {}) {
|
|
6449
|
-
return n.find((r) => r.type === e &&
|
|
6454
|
+
return n.find((r) => r.type === e && Wn(
|
|
6450
6455
|
// Only check equality for the attributes that are provided
|
|
6451
6456
|
Object.fromEntries(Object.keys(t).map((i) => [i, r.attrs[i]])),
|
|
6452
6457
|
t
|
|
@@ -6551,11 +6556,11 @@ const bc = (n = null, e = {}) => ({ editor: t, view: r, tr: i, dispatch: o }) =>
|
|
|
6551
6556
|
}
|
|
6552
6557
|
return n;
|
|
6553
6558
|
};
|
|
6554
|
-
function
|
|
6559
|
+
function Cn(n) {
|
|
6555
6560
|
const e = `<body>${n}</body>`, t = new window.DOMParser().parseFromString(e, "text/html").body;
|
|
6556
6561
|
return Ts(t);
|
|
6557
6562
|
}
|
|
6558
|
-
function
|
|
6563
|
+
function Zt(n, e, t) {
|
|
6559
6564
|
if (n instanceof rt || n instanceof k)
|
|
6560
6565
|
return n;
|
|
6561
6566
|
t = {
|
|
@@ -6573,7 +6578,7 @@ function Wn(n, e, t) {
|
|
|
6573
6578
|
} catch (o) {
|
|
6574
6579
|
if (t.errorOnInvalidContent)
|
|
6575
6580
|
throw new Error("[tiptap error]: Invalid JSON content", { cause: o });
|
|
6576
|
-
return console.warn("[tiptap warn]: Invalid content.", "Passed value:", n, "Error:", o),
|
|
6581
|
+
return console.warn("[tiptap warn]: Invalid content.", "Passed value:", n, "Error:", o), Zt("", e, t);
|
|
6577
6582
|
}
|
|
6578
6583
|
if (i) {
|
|
6579
6584
|
if (t.errorOnInvalidContent) {
|
|
@@ -6596,13 +6601,13 @@ function Wn(n, e, t) {
|
|
|
6596
6601
|
}
|
|
6597
6602
|
})
|
|
6598
6603
|
});
|
|
6599
|
-
if (t.slice ? it.fromSchema(l).parseSlice(
|
|
6604
|
+
if (t.slice ? it.fromSchema(l).parseSlice(Cn(n), t.parseOptions) : it.fromSchema(l).parse(Cn(n), t.parseOptions), t.errorOnInvalidContent && s)
|
|
6600
6605
|
throw new Error("[tiptap error]: Invalid HTML content", { cause: new Error(`Invalid element found: ${a}`) });
|
|
6601
6606
|
}
|
|
6602
6607
|
const o = it.fromSchema(e);
|
|
6603
|
-
return t.slice ? o.parseSlice(
|
|
6608
|
+
return t.slice ? o.parseSlice(Cn(n), t.parseOptions).content : o.parse(Cn(n), t.parseOptions);
|
|
6604
6609
|
}
|
|
6605
|
-
return
|
|
6610
|
+
return Zt("", e, t);
|
|
6606
6611
|
}
|
|
6607
6612
|
function wc(n, e, t) {
|
|
6608
6613
|
const r = n.steps.length - 1;
|
|
@@ -6628,44 +6633,56 @@ const Sc = (n) => !("type" in n), Cc = (n, e, t) => ({ tr: r, dispatch: i, edito
|
|
|
6628
6633
|
...t
|
|
6629
6634
|
};
|
|
6630
6635
|
let a;
|
|
6631
|
-
|
|
6632
|
-
|
|
6633
|
-
parseOptions: {
|
|
6634
|
-
preserveWhitespace: "full",
|
|
6635
|
-
...t.parseOptions
|
|
6636
|
-
},
|
|
6637
|
-
errorOnInvalidContent: (s = t.errorOnInvalidContent) !== null && s !== void 0 ? s : o.options.enableContentCheck
|
|
6638
|
-
});
|
|
6639
|
-
} catch (m) {
|
|
6640
|
-
return o.emit("contentError", {
|
|
6636
|
+
const l = (y) => {
|
|
6637
|
+
o.emit("contentError", {
|
|
6641
6638
|
editor: o,
|
|
6642
|
-
error:
|
|
6639
|
+
error: y,
|
|
6643
6640
|
disableCollaboration: () => {
|
|
6644
6641
|
o.storage.collaboration && (o.storage.collaboration.isDisabled = !0);
|
|
6645
6642
|
}
|
|
6646
|
-
})
|
|
6647
|
-
}
|
|
6648
|
-
|
|
6649
|
-
|
|
6650
|
-
|
|
6651
|
-
|
|
6652
|
-
|
|
6653
|
-
|
|
6654
|
-
|
|
6655
|
-
|
|
6656
|
-
|
|
6643
|
+
});
|
|
6644
|
+
}, c = {
|
|
6645
|
+
preserveWhitespace: "full",
|
|
6646
|
+
...t.parseOptions
|
|
6647
|
+
};
|
|
6648
|
+
if (!t.errorOnInvalidContent && !o.options.enableContentCheck && o.options.emitContentError)
|
|
6649
|
+
try {
|
|
6650
|
+
Zt(e, o.schema, {
|
|
6651
|
+
parseOptions: c,
|
|
6652
|
+
errorOnInvalidContent: !0
|
|
6653
|
+
});
|
|
6654
|
+
} catch (y) {
|
|
6655
|
+
l(y);
|
|
6656
|
+
}
|
|
6657
|
+
try {
|
|
6658
|
+
a = Zt(e, o.schema, {
|
|
6659
|
+
parseOptions: c,
|
|
6660
|
+
errorOnInvalidContent: (s = t.errorOnInvalidContent) !== null && s !== void 0 ? s : o.options.enableContentCheck
|
|
6661
|
+
});
|
|
6662
|
+
} catch (y) {
|
|
6663
|
+
return l(y), !1;
|
|
6664
|
+
}
|
|
6665
|
+
let { from: u, to: f } = typeof n == "number" ? { from: n, to: n } : { from: n.from, to: n.to }, p = !0, d = !0;
|
|
6666
|
+
if ((Sc(a) ? a : [a]).forEach((y) => {
|
|
6667
|
+
y.check(), p = p ? y.isText && y.marks.length === 0 : !1, d = d ? y.isBlock : !1;
|
|
6668
|
+
}), u === f && d) {
|
|
6669
|
+
const { parent: y } = r.doc.resolve(u);
|
|
6670
|
+
y.isTextblock && !y.type.spec.code && !y.childCount && (u -= 1, f += 1);
|
|
6671
|
+
}
|
|
6672
|
+
let m;
|
|
6673
|
+
if (p) {
|
|
6657
6674
|
if (Array.isArray(e))
|
|
6658
|
-
|
|
6675
|
+
m = e.map((y) => y.text || "").join("");
|
|
6659
6676
|
else if (e instanceof k) {
|
|
6660
|
-
let
|
|
6661
|
-
e.forEach((
|
|
6662
|
-
|
|
6663
|
-
}),
|
|
6664
|
-
} else typeof e == "object" && e && e.text ?
|
|
6665
|
-
r.insertText(
|
|
6677
|
+
let y = "";
|
|
6678
|
+
e.forEach((b) => {
|
|
6679
|
+
b.text && (y += b.text);
|
|
6680
|
+
}), m = y;
|
|
6681
|
+
} else typeof e == "object" && e && e.text ? m = e.text : m = e;
|
|
6682
|
+
r.insertText(m, u, f);
|
|
6666
6683
|
} else
|
|
6667
|
-
|
|
6668
|
-
t.updateSelection && wc(r, r.steps.length - 1, -1), t.applyInputRules && r.setMeta("applyInputRules", { from:
|
|
6684
|
+
m = a, r.replaceWith(u, f, m);
|
|
6685
|
+
t.updateSelection && wc(r, r.steps.length - 1, -1), t.applyInputRules && r.setMeta("applyInputRules", { from: u, text: m }), t.applyPasteRules && r.setMeta("applyPasteRules", { from: u, text: m });
|
|
6669
6686
|
}
|
|
6670
6687
|
return !0;
|
|
6671
6688
|
}, Oc = () => ({ state: n, dispatch: e }) => Il(n, e), Ec = () => ({ state: n, dispatch: e }) => Dl(n, e), Tc = () => ({ state: n, dispatch: e }) => ps(n, e), Mc = () => ({ state: n, dispatch: e }) => ys(n, e), Ac = () => ({ state: n, dispatch: e, tr: t }) => {
|
|
@@ -6730,14 +6747,14 @@ function ei(n, e, t = {}) {
|
|
|
6730
6747
|
n.doc.nodesBetween(r, i, (f, p) => {
|
|
6731
6748
|
if (f.isText)
|
|
6732
6749
|
return;
|
|
6733
|
-
const d = Math.max(r, p),
|
|
6750
|
+
const d = Math.max(r, p), g = Math.min(i, p + f.nodeSize);
|
|
6734
6751
|
a.push({
|
|
6735
6752
|
node: f,
|
|
6736
6753
|
from: d,
|
|
6737
|
-
to:
|
|
6754
|
+
to: g
|
|
6738
6755
|
});
|
|
6739
6756
|
});
|
|
6740
|
-
const l = i - r, c = a.filter((f) => s ? s.name === f.node.type.name : !0).filter((f) =>
|
|
6757
|
+
const l = i - r, c = a.filter((f) => s ? s.name === f.node.type.name : !0).filter((f) => Wn(f.node.attrs, t, { strict: !1 }));
|
|
6741
6758
|
return o ? !!c.length : c.reduce((f, p) => f + p.to - p.from, 0) >= l;
|
|
6742
6759
|
}
|
|
6743
6760
|
const Bc = (n, e = {}) => ({ state: t, dispatch: r }) => {
|
|
@@ -6772,7 +6789,7 @@ const $c = (n, e) => ({ tr: t, state: r, dispatch: i }) => {
|
|
|
6772
6789
|
return !0;
|
|
6773
6790
|
}, Wc = () => ({ state: n, dispatch: e }) => ms(n, e), Hc = () => ({ state: n, dispatch: e }) => vs(n, e), Jc = () => ({ state: n, dispatch: e }) => Fl(n, e), qc = () => ({ state: n, dispatch: e }) => Vl(n, e), Kc = () => ({ state: n, dispatch: e }) => $l(n, e);
|
|
6774
6791
|
function Uc(n, e, t = {}, r = {}) {
|
|
6775
|
-
return
|
|
6792
|
+
return Zt(n, e, {
|
|
6776
6793
|
slice: !1,
|
|
6777
6794
|
parseOptions: t,
|
|
6778
6795
|
errorOnInvalidContent: r.errorOnInvalidContent
|
|
@@ -6839,7 +6856,7 @@ function Ns(n, e, t) {
|
|
|
6839
6856
|
})));
|
|
6840
6857
|
}), r;
|
|
6841
6858
|
}
|
|
6842
|
-
function
|
|
6859
|
+
function An(n, e, t) {
|
|
6843
6860
|
return Object.fromEntries(Object.entries(t).filter(([r]) => {
|
|
6844
6861
|
const i = n.find((o) => o.type === e && o.name === r);
|
|
6845
6862
|
return i ? i.attribute.keepOnSplit : !1;
|
|
@@ -6848,16 +6865,16 @@ function Mn(n, e, t) {
|
|
|
6848
6865
|
function Zc(n, e, t = {}) {
|
|
6849
6866
|
const { empty: r, ranges: i } = n.selection, o = e ? He(e, n.schema) : null;
|
|
6850
6867
|
if (r)
|
|
6851
|
-
return !!(n.storedMarks || n.selection.$from.marks()).filter((f) => o ? o.name === f.type.name : !0).find((f) =>
|
|
6868
|
+
return !!(n.storedMarks || n.selection.$from.marks()).filter((f) => o ? o.name === f.type.name : !0).find((f) => Wn(f.attrs, t, { strict: !1 }));
|
|
6852
6869
|
let s = 0;
|
|
6853
6870
|
const a = [];
|
|
6854
6871
|
if (i.forEach(({ $from: f, $to: p }) => {
|
|
6855
|
-
const d = f.pos,
|
|
6856
|
-
n.doc.nodesBetween(d,
|
|
6857
|
-
if (!
|
|
6872
|
+
const d = f.pos, g = p.pos;
|
|
6873
|
+
n.doc.nodesBetween(d, g, (m, y) => {
|
|
6874
|
+
if (!m.isText && !m.marks.length)
|
|
6858
6875
|
return;
|
|
6859
|
-
const b = Math.max(d,
|
|
6860
|
-
s += T, a.push(...
|
|
6876
|
+
const b = Math.max(d, y), C = Math.min(g, y + m.nodeSize), T = C - b;
|
|
6877
|
+
s += T, a.push(...m.marks.map((h) => ({
|
|
6861
6878
|
mark: h,
|
|
6862
6879
|
from: b,
|
|
6863
6880
|
to: C
|
|
@@ -6865,7 +6882,7 @@ function Zc(n, e, t = {}) {
|
|
|
6865
6882
|
});
|
|
6866
6883
|
}), s === 0)
|
|
6867
6884
|
return !1;
|
|
6868
|
-
const l = a.filter((f) => o ? o.name === f.mark.type.name : !0).filter((f) =>
|
|
6885
|
+
const l = a.filter((f) => o ? o.name === f.mark.type.name : !0).filter((f) => Wn(f.mark.attrs, t, { strict: !1 })).reduce((f, p) => f + p.to - p.from, 0), c = a.filter((f) => o ? f.mark.type !== o && f.mark.type.excludes(o) : !0).reduce((f, p) => f + p.to - p.from, 0);
|
|
6869
6886
|
return (l > 0 ? l + c : l) >= s;
|
|
6870
6887
|
}
|
|
6871
6888
|
function Ki(n, e) {
|
|
@@ -6905,13 +6922,13 @@ function _c(n) {
|
|
|
6905
6922
|
return n instanceof O;
|
|
6906
6923
|
}
|
|
6907
6924
|
function Ds(n, e, t) {
|
|
6908
|
-
const i = n.state.doc.content.size, o = Re(e, 0, i), s = Re(t, 0, i), a = n.coordsAtPos(o), l = n.coordsAtPos(s, -1), c = Math.min(a.top, l.top), u = Math.max(a.bottom, l.bottom), f = Math.min(a.left, l.left), p = Math.max(a.right, l.right), d = p - f,
|
|
6925
|
+
const i = n.state.doc.content.size, o = Re(e, 0, i), s = Re(t, 0, i), a = n.coordsAtPos(o), l = n.coordsAtPos(s, -1), c = Math.min(a.top, l.top), u = Math.max(a.bottom, l.bottom), f = Math.min(a.left, l.left), p = Math.max(a.right, l.right), d = p - f, g = u - c, b = {
|
|
6909
6926
|
top: c,
|
|
6910
6927
|
bottom: u,
|
|
6911
6928
|
left: f,
|
|
6912
6929
|
right: p,
|
|
6913
6930
|
width: d,
|
|
6914
|
-
height:
|
|
6931
|
+
height: g,
|
|
6915
6932
|
x: f,
|
|
6916
6933
|
y: c
|
|
6917
6934
|
};
|
|
@@ -6935,8 +6952,8 @@ function eu(n, e, t) {
|
|
|
6935
6952
|
if (c)
|
|
6936
6953
|
return !1;
|
|
6937
6954
|
if (u.isInline) {
|
|
6938
|
-
const d = !p || p.type.allowsMarkType(t),
|
|
6939
|
-
c = d &&
|
|
6955
|
+
const d = !p || p.type.allowsMarkType(t), g = !!t.isInSet(u.marks) || !u.marks.some((m) => m.type.excludes(t));
|
|
6956
|
+
c = d && g;
|
|
6940
6957
|
}
|
|
6941
6958
|
return !c;
|
|
6942
6959
|
}), c;
|
|
@@ -6955,13 +6972,13 @@ const tu = (n, e = {}) => ({ tr: t, state: r, dispatch: i }) => {
|
|
|
6955
6972
|
a.forEach((c) => {
|
|
6956
6973
|
const u = c.$from.pos, f = c.$to.pos;
|
|
6957
6974
|
r.doc.nodesBetween(u, f, (p, d) => {
|
|
6958
|
-
const
|
|
6975
|
+
const g = Math.max(d, u), m = Math.min(d + p.nodeSize, f);
|
|
6959
6976
|
p.marks.find((b) => b.type === l) ? p.marks.forEach((b) => {
|
|
6960
|
-
l === b.type && t.addMark(
|
|
6977
|
+
l === b.type && t.addMark(g, m, l.create({
|
|
6961
6978
|
...b.attrs,
|
|
6962
6979
|
...e
|
|
6963
6980
|
}));
|
|
6964
|
-
}) : t.addMark(
|
|
6981
|
+
}) : t.addMark(g, m, l.create(e));
|
|
6965
6982
|
});
|
|
6966
6983
|
});
|
|
6967
6984
|
return eu(r, t, l);
|
|
@@ -6993,7 +7010,7 @@ function Ui(n, e) {
|
|
|
6993
7010
|
}
|
|
6994
7011
|
}
|
|
6995
7012
|
const au = ({ keepMarks: n = !0 } = {}) => ({ tr: e, state: t, dispatch: r, editor: i }) => {
|
|
6996
|
-
const { selection: o, doc: s } = e, { $from: a, $to: l } = o, c = i.extensionManager.attributes, u =
|
|
7013
|
+
const { selection: o, doc: s } = e, { $from: a, $to: l } = o, c = i.extensionManager.attributes, u = An(c, a.node().type.name, a.node().attrs);
|
|
6997
7014
|
if (o instanceof O && o.node.isBlock)
|
|
6998
7015
|
return !a.parentOffset || !Pe(s, a.pos) ? !1 : (r && (n && Ui(t, i.extensionManager.splittableMarks), e.split(a.pos).scrollIntoView()), !0);
|
|
6999
7016
|
if (!a.parent.isBlock)
|
|
@@ -7004,20 +7021,20 @@ const au = ({ keepMarks: n = !0 } = {}) => ({ tr: e, state: t, dispatch: r, edit
|
|
|
7004
7021
|
type: p,
|
|
7005
7022
|
attrs: u
|
|
7006
7023
|
}
|
|
7007
|
-
] : void 0,
|
|
7008
|
-
if (!d && !
|
|
7024
|
+
] : void 0, g = Pe(e.doc, e.mapping.map(a.pos), 1, d);
|
|
7025
|
+
if (!d && !g && Pe(e.doc, e.mapping.map(a.pos), 1, p ? [{ type: p }] : void 0) && (g = !0, d = p ? [
|
|
7009
7026
|
{
|
|
7010
7027
|
type: p,
|
|
7011
7028
|
attrs: u
|
|
7012
7029
|
}
|
|
7013
7030
|
] : void 0), r) {
|
|
7014
|
-
if (
|
|
7015
|
-
const
|
|
7016
|
-
a.node(-1).canReplaceWith(
|
|
7031
|
+
if (g && (o instanceof A && e.deleteSelection(), e.split(e.mapping.map(a.pos), 1, d), p && !f && !a.parentOffset && a.parent.type !== p)) {
|
|
7032
|
+
const m = e.mapping.map(a.before()), y = e.doc.resolve(m);
|
|
7033
|
+
a.node(-1).canReplaceWith(y.index(), y.index() + 1, p) && e.setNodeMarkup(e.mapping.map(a.before()), p);
|
|
7017
7034
|
}
|
|
7018
7035
|
n && Ui(t, i.extensionManager.splittableMarks), e.scrollIntoView();
|
|
7019
7036
|
}
|
|
7020
|
-
return
|
|
7037
|
+
return g;
|
|
7021
7038
|
}, lu = (n, e = {}) => ({ tr: t, state: r, dispatch: i, editor: o }) => {
|
|
7022
7039
|
var s;
|
|
7023
7040
|
const a = G(n, r.schema), { $from: l, $to: c } = r.selection, u = r.selection.node;
|
|
@@ -7036,7 +7053,7 @@ const au = ({ keepMarks: n = !0 } = {}) => ({ tr: e, state: t, dispatch: r, edit
|
|
|
7036
7053
|
for (let P = l.depth - C; P >= l.depth - 3; P -= 1)
|
|
7037
7054
|
b = k.from(l.node(P).copy(b));
|
|
7038
7055
|
const T = l.indexAfter(-1) < l.node(-2).childCount ? 1 : l.indexAfter(-2) < l.node(-3).childCount ? 2 : 3, h = {
|
|
7039
|
-
...
|
|
7056
|
+
...An(p, l.node().type.name, l.node().attrs),
|
|
7040
7057
|
...e
|
|
7041
7058
|
}, M = ((s = a.contentMatch.defaultType) === null || s === void 0 ? void 0 : s.createAndFill(h)) || void 0;
|
|
7042
7059
|
b = b.append(k.from(a.createAndFill(null, M) || void 0));
|
|
@@ -7051,23 +7068,23 @@ const au = ({ keepMarks: n = !0 } = {}) => ({ tr: e, state: t, dispatch: r, edit
|
|
|
7051
7068
|
}
|
|
7052
7069
|
return !0;
|
|
7053
7070
|
}
|
|
7054
|
-
const d = c.pos === l.end() ? f.contentMatchAt(0).defaultType : null,
|
|
7055
|
-
...
|
|
7071
|
+
const d = c.pos === l.end() ? f.contentMatchAt(0).defaultType : null, g = {
|
|
7072
|
+
...An(p, f.type.name, f.attrs),
|
|
7056
7073
|
...e
|
|
7057
|
-
},
|
|
7058
|
-
...
|
|
7074
|
+
}, m = {
|
|
7075
|
+
...An(p, l.node().type.name, l.node().attrs),
|
|
7059
7076
|
...e
|
|
7060
7077
|
};
|
|
7061
7078
|
t.delete(l.pos, c.pos);
|
|
7062
|
-
const
|
|
7063
|
-
{ type: a, attrs:
|
|
7064
|
-
{ type: d, attrs:
|
|
7065
|
-
] : [{ type: a, attrs:
|
|
7079
|
+
const y = d ? [
|
|
7080
|
+
{ type: a, attrs: g },
|
|
7081
|
+
{ type: d, attrs: m }
|
|
7082
|
+
] : [{ type: a, attrs: g }];
|
|
7066
7083
|
if (!Pe(t.doc, l.pos, 2))
|
|
7067
7084
|
return !1;
|
|
7068
7085
|
if (i) {
|
|
7069
7086
|
const { selection: b, storedMarks: C } = r, { splittableMarks: T } = o.extensionManager, h = C || b.$to.parentOffset && b.$from.marks();
|
|
7070
|
-
if (t.split(l.pos, 2,
|
|
7087
|
+
if (t.split(l.pos, 2, y).scrollIntoView(), !h || !i)
|
|
7071
7088
|
return !0;
|
|
7072
7089
|
const M = h.filter((x) => T.includes(x.type.name));
|
|
7073
7090
|
t.ensureMarks(M);
|
|
@@ -7092,13 +7109,13 @@ const au = ({ keepMarks: n = !0 } = {}) => ({ tr: e, state: t, dispatch: r, edit
|
|
|
7092
7109
|
const i = n.doc.nodeAt(r);
|
|
7093
7110
|
return t.node.type === (i == null ? void 0 : i.type) && ut(n.doc, r) && n.join(r), !0;
|
|
7094
7111
|
}, cu = (n, e, t, r = {}) => ({ editor: i, tr: o, state: s, dispatch: a, chain: l, commands: c, can: u }) => {
|
|
7095
|
-
const { extensions: f, splittableMarks: p } = i.extensionManager, d = G(n, s.schema),
|
|
7112
|
+
const { extensions: f, splittableMarks: p } = i.extensionManager, d = G(n, s.schema), g = G(e, s.schema), { selection: m, storedMarks: y } = s, { $from: b, $to: C } = m, T = b.blockRange(C), h = y || m.$to.parentOffset && m.$from.marks();
|
|
7096
7113
|
if (!T)
|
|
7097
7114
|
return !1;
|
|
7098
|
-
const M = ti((x) => Ki(x.type.name, f))(
|
|
7115
|
+
const M = ti((x) => Ki(x.type.name, f))(m);
|
|
7099
7116
|
if (T.depth >= 1 && M && T.depth - M.depth <= 1) {
|
|
7100
7117
|
if (M.node.type === d)
|
|
7101
|
-
return c.liftListItem(
|
|
7118
|
+
return c.liftListItem(g);
|
|
7102
7119
|
if (Ki(M.node.type.name, f) && d.validContent(M.node.content) && a)
|
|
7103
7120
|
return l().command(() => (o.setNodeMarkup(M.pos, d), !0)).command(() => fr(o, d)).command(() => dr(o, d)).run();
|
|
7104
7121
|
}
|
|
@@ -7148,8 +7165,8 @@ const au = ({ keepMarks: n = !0 } = {}) => ({ tr: e, state: t, dispatch: r, edit
|
|
|
7148
7165
|
return !0;
|
|
7149
7166
|
if (u && s) {
|
|
7150
7167
|
let { from: p, to: d } = a;
|
|
7151
|
-
const
|
|
7152
|
-
|
|
7168
|
+
const g = (o = c.marks().find((y) => y.type === l)) === null || o === void 0 ? void 0 : o.attrs, m = Qr(c, l, g);
|
|
7169
|
+
m && (p = m.from, d = m.to), t.removeMark(p, d, l);
|
|
7153
7170
|
} else
|
|
7154
7171
|
f.forEach((p) => {
|
|
7155
7172
|
t.removeMark(p.$from.pos, p.$to.pos, l);
|
|
@@ -7160,16 +7177,16 @@ const au = ({ keepMarks: n = !0 } = {}) => ({ tr: e, state: t, dispatch: r, edit
|
|
|
7160
7177
|
const a = As(typeof n == "string" ? n : n.name, r.schema);
|
|
7161
7178
|
return a ? (a === "node" && (o = G(n, r.schema)), a === "mark" && (s = He(n, r.schema)), i && t.selection.ranges.forEach((l) => {
|
|
7162
7179
|
const c = l.$from.pos, u = l.$to.pos;
|
|
7163
|
-
let f, p, d,
|
|
7164
|
-
t.selection.empty ? r.doc.nodesBetween(c, u, (
|
|
7165
|
-
o && o ===
|
|
7166
|
-
}) : r.doc.nodesBetween(c, u, (
|
|
7167
|
-
|
|
7168
|
-
...
|
|
7180
|
+
let f, p, d, g;
|
|
7181
|
+
t.selection.empty ? r.doc.nodesBetween(c, u, (m, y) => {
|
|
7182
|
+
o && o === m.type && (d = Math.max(y, c), g = Math.min(y + m.nodeSize, u), f = y, p = m);
|
|
7183
|
+
}) : r.doc.nodesBetween(c, u, (m, y) => {
|
|
7184
|
+
y < c && o && o === m.type && (d = Math.max(y, c), g = Math.min(y + m.nodeSize, u), f = y, p = m), y >= c && y <= u && (o && o === m.type && t.setNodeMarkup(y, void 0, {
|
|
7185
|
+
...m.attrs,
|
|
7169
7186
|
...e
|
|
7170
|
-
}), s &&
|
|
7187
|
+
}), s && m.marks.length && m.marks.forEach((b) => {
|
|
7171
7188
|
if (s === b.type) {
|
|
7172
|
-
const C = Math.max(
|
|
7189
|
+
const C = Math.max(y, c), T = Math.min(y + m.nodeSize, u);
|
|
7173
7190
|
t.addMark(C, T, s.create({
|
|
7174
7191
|
...b.attrs,
|
|
7175
7192
|
...e
|
|
@@ -7179,9 +7196,9 @@ const au = ({ keepMarks: n = !0 } = {}) => ({ tr: e, state: t, dispatch: r, edit
|
|
|
7179
7196
|
}), p && (f !== void 0 && t.setNodeMarkup(f, void 0, {
|
|
7180
7197
|
...p.attrs,
|
|
7181
7198
|
...e
|
|
7182
|
-
}), s && p.marks.length && p.marks.forEach((
|
|
7183
|
-
s ===
|
|
7184
|
-
...
|
|
7199
|
+
}), s && p.marks.length && p.marks.forEach((m) => {
|
|
7200
|
+
s === m.type && t.addMark(d, g, s.create({
|
|
7201
|
+
...m.attrs,
|
|
7185
7202
|
...e
|
|
7186
7203
|
}));
|
|
7187
7204
|
}));
|
|
@@ -7328,7 +7345,7 @@ ce.create({
|
|
|
7328
7345
|
() => s.undoInputRule(),
|
|
7329
7346
|
// maybe convert first text block node to default node
|
|
7330
7347
|
() => s.command(({ tr: a }) => {
|
|
7331
|
-
const { selection: l, doc: c } = a, { empty: u, $anchor: f } = l, { pos: p, parent: d } = f,
|
|
7348
|
+
const { selection: l, doc: c } = a, { empty: u, $anchor: f } = l, { pos: p, parent: d } = f, g = f.parent.isTextblock && p > 0 ? a.doc.resolve(p - 1) : f, m = g.parent.type.spec.isolating, y = f.pos - f.parentOffset, b = m && g.parent.childCount === 1 ? y === f.pos : D.atStart(c).from === p;
|
|
7332
7349
|
return !u || !d.type.isTextblock || d.textContent.length || !b || b && f.parent.type.name === "paragraph" ? !1 : s.clearNodes();
|
|
7333
7350
|
}),
|
|
7334
7351
|
() => s.deleteSelection(),
|
|
@@ -7378,9 +7395,9 @@ ce.create({
|
|
|
7378
7395
|
new Te({
|
|
7379
7396
|
key: new ye("clearDocument"),
|
|
7380
7397
|
appendTransaction: (n, e, t) => {
|
|
7381
|
-
if (n.some((
|
|
7398
|
+
if (n.some((m) => m.getMeta("composition")))
|
|
7382
7399
|
return;
|
|
7383
|
-
const r = n.some((
|
|
7400
|
+
const r = n.some((m) => m.docChanged) && !e.doc.eq(t.doc), i = n.some((m) => m.getMeta("preventClearDocument"));
|
|
7384
7401
|
if (!r || i)
|
|
7385
7402
|
return;
|
|
7386
7403
|
const { empty: o, from: s, to: a } = e.selection, l = D.atStart(e.doc).from, c = D.atEnd(e.doc).to;
|
|
@@ -7389,11 +7406,11 @@ ce.create({
|
|
|
7389
7406
|
const p = t.tr, d = Cs({
|
|
7390
7407
|
state: t,
|
|
7391
7408
|
transaction: p
|
|
7392
|
-
}), { commands:
|
|
7409
|
+
}), { commands: g } = new Yl({
|
|
7393
7410
|
editor: this.editor,
|
|
7394
7411
|
state: d
|
|
7395
7412
|
});
|
|
7396
|
-
if (
|
|
7413
|
+
if (g.clearNodes(), !!p.steps.length)
|
|
7397
7414
|
return p;
|
|
7398
7415
|
}
|
|
7399
7416
|
})
|
|
@@ -7504,7 +7521,10 @@ class Qe {
|
|
|
7504
7521
|
get children() {
|
|
7505
7522
|
const e = [];
|
|
7506
7523
|
return this.node.content.forEach((t, r) => {
|
|
7507
|
-
const i = t.isBlock && !t.isTextblock, o = t.isAtom && !t.isText, s = this.pos + r + (o ? 0 : 1)
|
|
7524
|
+
const i = t.isBlock && !t.isTextblock, o = t.isAtom && !t.isText, s = this.pos + r + (o ? 0 : 1);
|
|
7525
|
+
if (s < 0 || s > this.resolvedPos.doc.nodeSize - 2)
|
|
7526
|
+
return;
|
|
7527
|
+
const a = this.resolvedPos.doc.resolve(s);
|
|
7508
7528
|
if (!i && a.depth <= this.depth)
|
|
7509
7529
|
return;
|
|
7510
7530
|
const l = new Qe(a, this.editor, i, i ? t : null);
|
|
@@ -7565,7 +7585,7 @@ function ku(n) {
|
|
|
7565
7585
|
const { tr: o } = e, s = r[r.length - 1], a = r[0];
|
|
7566
7586
|
if (s) {
|
|
7567
7587
|
const l = a.search(/\S/), c = t.from + a.indexOf(s), u = c + s.length;
|
|
7568
|
-
if (Ns(t.from, t.to, e.doc).filter((d) => d.mark.type.excluded.find((
|
|
7588
|
+
if (Ns(t.from, t.to, e.doc).filter((d) => d.mark.type.excluded.find((m) => m === n.type && m !== d.mark.type)).filter((d) => d.to > c).length)
|
|
7569
7589
|
return null;
|
|
7570
7590
|
u < t.to && o.delete(u, t.to), c > t.from && o.delete(t.from + l, c);
|
|
7571
7591
|
const p = t.from + l + s.length;
|
|
@@ -7641,7 +7661,7 @@ function Su(n) {
|
|
|
7641
7661
|
let c = t.to;
|
|
7642
7662
|
if (a) {
|
|
7643
7663
|
const u = l.search(/\S/), f = t.from + l.indexOf(a), p = f + a.length;
|
|
7644
|
-
if (Ns(t.from, t.to, e.doc).filter((
|
|
7664
|
+
if (Ns(t.from, t.to, e.doc).filter((g) => g.mark.type.excluded.find((y) => y === n.type && y !== g.mark.type)).filter((g) => g.to > f).length)
|
|
7645
7665
|
return null;
|
|
7646
7666
|
p < t.to && s.delete(p, t.to), f > t.from && s.delete(t.from + u, f), c = t.from + u + a.length, s.addMark(t.from + u, c, n.type.create(o || {})), s.removeStoredMark(n.type);
|
|
7647
7667
|
}
|
|
@@ -7739,7 +7759,7 @@ function dd(n) {
|
|
|
7739
7759
|
});
|
|
7740
7760
|
}
|
|
7741
7761
|
function pd() {
|
|
7742
|
-
return
|
|
7762
|
+
return Qt.create({
|
|
7743
7763
|
name: "knowledgeMark",
|
|
7744
7764
|
parseHTML() {
|
|
7745
7765
|
return [
|
|
@@ -7761,10 +7781,10 @@ function pd() {
|
|
|
7761
7781
|
}
|
|
7762
7782
|
});
|
|
7763
7783
|
}
|
|
7764
|
-
var ee = "top", he = "bottom", me = "right", te = "left", ni = "auto",
|
|
7765
|
-
return n.concat([e + "-" + Ot, e + "-" +
|
|
7766
|
-
}, []), Ps = /* @__PURE__ */ [].concat(
|
|
7767
|
-
return n.concat([e, e + "-" + Ot, e + "-" +
|
|
7784
|
+
var ee = "top", he = "bottom", me = "right", te = "left", ni = "auto", sn = [ee, he, me, te], Ot = "start", _t = "end", Eu = "clippingParents", Rs = "viewport", Bt = "popper", Tu = "reference", Gi = /* @__PURE__ */ sn.reduce(function(n, e) {
|
|
7785
|
+
return n.concat([e + "-" + Ot, e + "-" + _t]);
|
|
7786
|
+
}, []), Ps = /* @__PURE__ */ [].concat(sn, [ni]).reduce(function(n, e) {
|
|
7787
|
+
return n.concat([e, e + "-" + Ot, e + "-" + _t]);
|
|
7768
7788
|
}, []), Mu = "beforeRead", Au = "read", Nu = "afterRead", Iu = "beforeMain", Du = "main", Ru = "afterMain", Pu = "beforeWrite", Bu = "write", zu = "afterWrite", Fu = [Mu, Au, Nu, Iu, Du, Ru, Pu, Bu, zu];
|
|
7769
7789
|
function Ee(n) {
|
|
7770
7790
|
return n ? (n.nodeName || "").toLowerCase() : null;
|
|
@@ -7930,7 +7950,7 @@ function ju(n) {
|
|
|
7930
7950
|
}
|
|
7931
7951
|
return null;
|
|
7932
7952
|
}
|
|
7933
|
-
function
|
|
7953
|
+
function an(n) {
|
|
7934
7954
|
for (var e = ue(n), t = Yi(n); t && Vu(t) && Be(t).position === "static"; )
|
|
7935
7955
|
t = Yi(t);
|
|
7936
7956
|
return t && (Ee(t) === "html" || Ee(t) === "body" && Be(t).position === "static") ? e : t || ju(n) || e;
|
|
@@ -7938,11 +7958,11 @@ function on(n) {
|
|
|
7938
7958
|
function oi(n) {
|
|
7939
7959
|
return ["top", "bottom"].indexOf(n) >= 0 ? "x" : "y";
|
|
7940
7960
|
}
|
|
7941
|
-
function
|
|
7961
|
+
function Wt(n, e, t) {
|
|
7942
7962
|
return at(n, Jn(e, t));
|
|
7943
7963
|
}
|
|
7944
7964
|
function Wu(n, e, t) {
|
|
7945
|
-
var r =
|
|
7965
|
+
var r = Wt(n, e, t);
|
|
7946
7966
|
return r > t ? t : r;
|
|
7947
7967
|
}
|
|
7948
7968
|
function Ls() {
|
|
@@ -7964,12 +7984,12 @@ function Vs(n, e) {
|
|
|
7964
7984
|
var Hu = function(e, t) {
|
|
7965
7985
|
return e = typeof e == "function" ? e(Object.assign({}, t.rects, {
|
|
7966
7986
|
placement: t.placement
|
|
7967
|
-
})) : e, $s(typeof e != "number" ? e : Vs(e,
|
|
7987
|
+
})) : e, $s(typeof e != "number" ? e : Vs(e, sn));
|
|
7968
7988
|
};
|
|
7969
7989
|
function Ju(n) {
|
|
7970
7990
|
var e, t = n.state, r = n.name, i = n.options, o = t.elements.arrow, s = t.modifiersData.popperOffsets, a = Ce(t.placement), l = oi(a), c = [te, me].indexOf(a) >= 0, u = c ? "height" : "width";
|
|
7971
7991
|
if (!(!o || !s)) {
|
|
7972
|
-
var f = Hu(i.padding, t), p = ii(o), d = l === "y" ? ee : te,
|
|
7992
|
+
var f = Hu(i.padding, t), p = ii(o), d = l === "y" ? ee : te, g = l === "y" ? he : me, m = t.rects.reference[u] + t.rects.reference[l] - s[l] - t.rects.popper[u], y = s[l] - t.rects.reference[l], b = an(o), C = b ? l === "y" ? b.clientHeight || 0 : b.clientWidth || 0 : 0, T = m / 2 - y / 2, h = f[d], M = C - p[u] - f[g], x = C / 2 - p[u] / 2 + T, N = Wt(h, x, M), P = l;
|
|
7973
7993
|
t.modifiersData[r] = (e = {}, e[P] = N, e.centerOffset = N - x, e);
|
|
7974
7994
|
}
|
|
7975
7995
|
}
|
|
@@ -8003,26 +8023,26 @@ function Gu(n, e) {
|
|
|
8003
8023
|
};
|
|
8004
8024
|
}
|
|
8005
8025
|
function Xi(n) {
|
|
8006
|
-
var e, t = n.popper, r = n.popperRect, i = n.placement, o = n.variation, s = n.offsets, a = n.position, l = n.gpuAcceleration, c = n.adaptive, u = n.roundOffsets, f = n.isFixed, p = s.x, d = p === void 0 ? 0 : p,
|
|
8026
|
+
var e, t = n.popper, r = n.popperRect, i = n.placement, o = n.variation, s = n.offsets, a = n.position, l = n.gpuAcceleration, c = n.adaptive, u = n.roundOffsets, f = n.isFixed, p = s.x, d = p === void 0 ? 0 : p, g = s.y, m = g === void 0 ? 0 : g, y = typeof u == "function" ? u({
|
|
8007
8027
|
x: d,
|
|
8008
|
-
y:
|
|
8028
|
+
y: m
|
|
8009
8029
|
}) : {
|
|
8010
8030
|
x: d,
|
|
8011
|
-
y:
|
|
8031
|
+
y: m
|
|
8012
8032
|
};
|
|
8013
|
-
d =
|
|
8033
|
+
d = y.x, m = y.y;
|
|
8014
8034
|
var b = s.hasOwnProperty("x"), C = s.hasOwnProperty("y"), T = te, h = ee, M = window;
|
|
8015
8035
|
if (c) {
|
|
8016
|
-
var x =
|
|
8017
|
-
if (x === ue(t) && (x = Je(t), Be(x).position !== "static" && a === "absolute" && (N = "scrollHeight", P = "scrollWidth")), x = x, i === ee || (i === te || i === me) && o ===
|
|
8036
|
+
var x = an(t), N = "clientHeight", P = "clientWidth";
|
|
8037
|
+
if (x === ue(t) && (x = Je(t), Be(x).position !== "static" && a === "absolute" && (N = "scrollHeight", P = "scrollWidth")), x = x, i === ee || (i === te || i === me) && o === _t) {
|
|
8018
8038
|
h = he;
|
|
8019
8039
|
var F = f && x === M && M.visualViewport ? M.visualViewport.height : (
|
|
8020
8040
|
// $FlowFixMe[prop-missing]
|
|
8021
8041
|
x[N]
|
|
8022
8042
|
);
|
|
8023
|
-
|
|
8043
|
+
m -= F - r.height, m *= l ? 1 : -1;
|
|
8024
8044
|
}
|
|
8025
|
-
if (i === te || (i === ee || i === he) && o ===
|
|
8045
|
+
if (i === te || (i === ee || i === he) && o === _t) {
|
|
8026
8046
|
T = me;
|
|
8027
8047
|
var L = f && x === M && M.visualViewport ? M.visualViewport.width : (
|
|
8028
8048
|
// $FlowFixMe[prop-missing]
|
|
@@ -8035,16 +8055,16 @@ function Xi(n) {
|
|
|
8035
8055
|
position: a
|
|
8036
8056
|
}, c && Uu), $ = u === !0 ? Gu({
|
|
8037
8057
|
x: d,
|
|
8038
|
-
y:
|
|
8058
|
+
y: m
|
|
8039
8059
|
}, ue(t)) : {
|
|
8040
8060
|
x: d,
|
|
8041
|
-
y:
|
|
8061
|
+
y: m
|
|
8042
8062
|
};
|
|
8043
|
-
if (d = $.x,
|
|
8063
|
+
if (d = $.x, m = $.y, l) {
|
|
8044
8064
|
var B;
|
|
8045
|
-
return Object.assign({}, j, (B = {}, B[h] = C ? "0" : "", B[T] = b ? "0" : "", B.transform = (M.devicePixelRatio || 1) <= 1 ? "translate(" + d + "px, " +
|
|
8065
|
+
return Object.assign({}, j, (B = {}, B[h] = C ? "0" : "", B[T] = b ? "0" : "", B.transform = (M.devicePixelRatio || 1) <= 1 ? "translate(" + d + "px, " + m + "px)" : "translate3d(" + d + "px, " + m + "px, 0)", B));
|
|
8046
8066
|
}
|
|
8047
|
-
return Object.assign({}, j, (e = {}, e[h] = C ?
|
|
8067
|
+
return Object.assign({}, j, (e = {}, e[h] = C ? m + "px" : "", e[T] = b ? d + "px" : "", e.transform = "", e));
|
|
8048
8068
|
}
|
|
8049
8069
|
function Yu(n) {
|
|
8050
8070
|
var e = n.state, t = n.options, r = t.gpuAcceleration, i = r === void 0 ? !0 : r, o = t.adaptive, s = o === void 0 ? !0 : o, a = t.roundOffsets, l = a === void 0 ? !0 : a, c = {
|
|
@@ -8076,17 +8096,17 @@ const Xu = {
|
|
|
8076
8096
|
fn: Yu,
|
|
8077
8097
|
data: {}
|
|
8078
8098
|
};
|
|
8079
|
-
var
|
|
8099
|
+
var On = {
|
|
8080
8100
|
passive: !0
|
|
8081
8101
|
};
|
|
8082
8102
|
function Qu(n) {
|
|
8083
8103
|
var e = n.state, t = n.instance, r = n.options, i = r.scroll, o = i === void 0 ? !0 : i, s = r.resize, a = s === void 0 ? !0 : s, l = ue(e.elements.popper), c = [].concat(e.scrollParents.reference, e.scrollParents.popper);
|
|
8084
8104
|
return o && c.forEach(function(u) {
|
|
8085
|
-
u.addEventListener("scroll", t.update,
|
|
8086
|
-
}), a && l.addEventListener("resize", t.update,
|
|
8105
|
+
u.addEventListener("scroll", t.update, On);
|
|
8106
|
+
}), a && l.addEventListener("resize", t.update, On), function() {
|
|
8087
8107
|
o && c.forEach(function(u) {
|
|
8088
|
-
u.removeEventListener("scroll", t.update,
|
|
8089
|
-
}), a && l.removeEventListener("resize", t.update,
|
|
8108
|
+
u.removeEventListener("scroll", t.update, On);
|
|
8109
|
+
}), a && l.removeEventListener("resize", t.update, On);
|
|
8090
8110
|
};
|
|
8091
8111
|
}
|
|
8092
8112
|
const Zu = {
|
|
@@ -8104,7 +8124,7 @@ var _u = {
|
|
|
8104
8124
|
bottom: "top",
|
|
8105
8125
|
top: "bottom"
|
|
8106
8126
|
};
|
|
8107
|
-
function
|
|
8127
|
+
function Nn(n) {
|
|
8108
8128
|
return n.replace(/left|right|bottom|top/g, function(e) {
|
|
8109
8129
|
return _u[e];
|
|
8110
8130
|
});
|
|
@@ -8158,13 +8178,13 @@ function li(n) {
|
|
|
8158
8178
|
function js(n) {
|
|
8159
8179
|
return ["html", "body", "#document"].indexOf(Ee(n)) >= 0 ? n.ownerDocument.body : pe(n) && li(n) ? n : js(_n(n));
|
|
8160
8180
|
}
|
|
8161
|
-
function
|
|
8181
|
+
function Ht(n, e) {
|
|
8162
8182
|
var t;
|
|
8163
8183
|
e === void 0 && (e = []);
|
|
8164
8184
|
var r = js(n), i = r === ((t = n.ownerDocument) == null ? void 0 : t.body), o = ue(r), s = i ? [o].concat(o.visualViewport || [], li(r) ? r : []) : r, a = e.concat(s);
|
|
8165
8185
|
return i ? a : (
|
|
8166
8186
|
// $FlowFixMe[incompatible-call]: isBody tells us target will be an HTMLElement here
|
|
8167
|
-
a.concat(
|
|
8187
|
+
a.concat(Ht(_n(s)))
|
|
8168
8188
|
);
|
|
8169
8189
|
}
|
|
8170
8190
|
function Nr(n) {
|
|
@@ -8183,7 +8203,7 @@ function Zi(n, e, t) {
|
|
|
8183
8203
|
return e === Rs ? Nr(tf(n, t)) : ct(e) ? rf(e, t) : Nr(nf(Je(n)));
|
|
8184
8204
|
}
|
|
8185
8205
|
function of(n) {
|
|
8186
|
-
var e =
|
|
8206
|
+
var e = Ht(_n(n)), t = ["absolute", "fixed"].indexOf(Be(n).position) >= 0, r = t && pe(n) ? an(n) : n;
|
|
8187
8207
|
return ct(r) ? e.filter(function(i) {
|
|
8188
8208
|
return ct(i) && Fs(i, r) && Ee(i) !== "body";
|
|
8189
8209
|
}) : [];
|
|
@@ -8235,16 +8255,16 @@ function Ws(n) {
|
|
|
8235
8255
|
case Ot:
|
|
8236
8256
|
l[c] = l[c] - (e[u] / 2 - t[u] / 2);
|
|
8237
8257
|
break;
|
|
8238
|
-
case
|
|
8258
|
+
case _t:
|
|
8239
8259
|
l[c] = l[c] + (e[u] / 2 - t[u] / 2);
|
|
8240
8260
|
break;
|
|
8241
8261
|
}
|
|
8242
8262
|
}
|
|
8243
8263
|
return l;
|
|
8244
8264
|
}
|
|
8245
|
-
function
|
|
8265
|
+
function en(n, e) {
|
|
8246
8266
|
e === void 0 && (e = {});
|
|
8247
|
-
var t = e, r = t.placement, i = r === void 0 ? n.placement : r, o = t.strategy, s = o === void 0 ? n.strategy : o, a = t.boundary, l = a === void 0 ? Eu : a, c = t.rootBoundary, u = c === void 0 ? Rs : c, f = t.elementContext, p = f === void 0 ? Bt : f, d = t.altBoundary,
|
|
8267
|
+
var t = e, r = t.placement, i = r === void 0 ? n.placement : r, o = t.strategy, s = o === void 0 ? n.strategy : o, a = t.boundary, l = a === void 0 ? Eu : a, c = t.rootBoundary, u = c === void 0 ? Rs : c, f = t.elementContext, p = f === void 0 ? Bt : f, d = t.altBoundary, g = d === void 0 ? !1 : d, m = t.padding, y = m === void 0 ? 0 : m, b = $s(typeof y != "number" ? y : Vs(y, sn)), C = p === Bt ? Tu : Bt, T = n.rects.popper, h = n.elements[g ? C : p], M = sf(ct(h) ? h : h.contextElement || Je(n.elements.popper), l, u, s), x = Tt(n.elements.reference), N = Ws({
|
|
8248
8268
|
reference: x,
|
|
8249
8269
|
element: T,
|
|
8250
8270
|
placement: i
|
|
@@ -8265,52 +8285,52 @@ function Zt(n, e) {
|
|
|
8265
8285
|
}
|
|
8266
8286
|
function af(n, e) {
|
|
8267
8287
|
e === void 0 && (e = {});
|
|
8268
|
-
var t = e, r = t.placement, i = t.boundary, o = t.rootBoundary, s = t.padding, a = t.flipVariations, l = t.allowedAutoPlacements, c = l === void 0 ? Ps : l, u = Mt(r), f = u ? a ? Gi : Gi.filter(function(
|
|
8269
|
-
return Mt(
|
|
8270
|
-
}) :
|
|
8271
|
-
return c.indexOf(
|
|
8288
|
+
var t = e, r = t.placement, i = t.boundary, o = t.rootBoundary, s = t.padding, a = t.flipVariations, l = t.allowedAutoPlacements, c = l === void 0 ? Ps : l, u = Mt(r), f = u ? a ? Gi : Gi.filter(function(g) {
|
|
8289
|
+
return Mt(g) === u;
|
|
8290
|
+
}) : sn, p = f.filter(function(g) {
|
|
8291
|
+
return c.indexOf(g) >= 0;
|
|
8272
8292
|
});
|
|
8273
8293
|
p.length === 0 && (p = f);
|
|
8274
|
-
var d = p.reduce(function(
|
|
8275
|
-
return m
|
|
8276
|
-
placement:
|
|
8294
|
+
var d = p.reduce(function(g, m) {
|
|
8295
|
+
return g[m] = en(n, {
|
|
8296
|
+
placement: m,
|
|
8277
8297
|
boundary: i,
|
|
8278
8298
|
rootBoundary: o,
|
|
8279
8299
|
padding: s
|
|
8280
|
-
})[Ce(
|
|
8300
|
+
})[Ce(m)], g;
|
|
8281
8301
|
}, {});
|
|
8282
|
-
return Object.keys(d).sort(function(
|
|
8283
|
-
return d[
|
|
8302
|
+
return Object.keys(d).sort(function(g, m) {
|
|
8303
|
+
return d[g] - d[m];
|
|
8284
8304
|
});
|
|
8285
8305
|
}
|
|
8286
8306
|
function lf(n) {
|
|
8287
8307
|
if (Ce(n) === ni)
|
|
8288
8308
|
return [];
|
|
8289
|
-
var e =
|
|
8309
|
+
var e = Nn(n);
|
|
8290
8310
|
return [Qi(n), e, Qi(e)];
|
|
8291
8311
|
}
|
|
8292
8312
|
function cf(n) {
|
|
8293
8313
|
var e = n.state, t = n.options, r = n.name;
|
|
8294
8314
|
if (!e.modifiersData[r]._skip) {
|
|
8295
|
-
for (var i = t.mainAxis, o = i === void 0 ? !0 : i, s = t.altAxis, a = s === void 0 ? !0 : s, l = t.fallbackPlacements, c = t.padding, u = t.boundary, f = t.rootBoundary, p = t.altBoundary, d = t.flipVariations,
|
|
8315
|
+
for (var i = t.mainAxis, o = i === void 0 ? !0 : i, s = t.altAxis, a = s === void 0 ? !0 : s, l = t.fallbackPlacements, c = t.padding, u = t.boundary, f = t.rootBoundary, p = t.altBoundary, d = t.flipVariations, g = d === void 0 ? !0 : d, m = t.allowedAutoPlacements, y = e.options.placement, b = Ce(y), C = b === y, T = l || (C || !g ? [Nn(y)] : lf(y)), h = [y].concat(T).reduce(function(Me, ge) {
|
|
8296
8316
|
return Me.concat(Ce(ge) === ni ? af(e, {
|
|
8297
8317
|
placement: ge,
|
|
8298
8318
|
boundary: u,
|
|
8299
8319
|
rootBoundary: f,
|
|
8300
8320
|
padding: c,
|
|
8301
|
-
flipVariations:
|
|
8302
|
-
allowedAutoPlacements:
|
|
8321
|
+
flipVariations: g,
|
|
8322
|
+
allowedAutoPlacements: m
|
|
8303
8323
|
}) : ge);
|
|
8304
8324
|
}, []), M = e.rects.reference, x = e.rects.popper, N = /* @__PURE__ */ new Map(), P = !0, F = h[0], L = 0; L < h.length; L++) {
|
|
8305
|
-
var j = h[L], $ = Ce(j), B = Mt(j) === Ot, ne = [ee, he].indexOf($) >= 0, re = ne ? "width" : "height", q =
|
|
8325
|
+
var j = h[L], $ = Ce(j), B = Mt(j) === Ot, ne = [ee, he].indexOf($) >= 0, re = ne ? "width" : "height", q = en(e, {
|
|
8306
8326
|
placement: j,
|
|
8307
8327
|
boundary: u,
|
|
8308
8328
|
rootBoundary: f,
|
|
8309
8329
|
altBoundary: p,
|
|
8310
8330
|
padding: c
|
|
8311
8331
|
}), K = ne ? B ? me : te : B ? he : ee;
|
|
8312
|
-
M[re] > x[re] && (K =
|
|
8313
|
-
var H =
|
|
8332
|
+
M[re] > x[re] && (K = Nn(K));
|
|
8333
|
+
var H = Nn(K), be = [];
|
|
8314
8334
|
if (o && be.push(q[$] <= 0), a && be.push(q[K] <= 0, q[H] <= 0), be.every(function(Me) {
|
|
8315
8335
|
return Me;
|
|
8316
8336
|
})) {
|
|
@@ -8320,7 +8340,7 @@ function cf(n) {
|
|
|
8320
8340
|
N.set(j, be);
|
|
8321
8341
|
}
|
|
8322
8342
|
if (P)
|
|
8323
|
-
for (var xe =
|
|
8343
|
+
for (var xe = g ? 3 : 1, qe = function(ge) {
|
|
8324
8344
|
var Ae = h.find(function(pt) {
|
|
8325
8345
|
var Ne = N.get(pt);
|
|
8326
8346
|
if (Ne)
|
|
@@ -8364,9 +8384,9 @@ function eo(n) {
|
|
|
8364
8384
|
});
|
|
8365
8385
|
}
|
|
8366
8386
|
function ff(n) {
|
|
8367
|
-
var e = n.state, t = n.name, r = e.rects.reference, i = e.rects.popper, o = e.modifiersData.preventOverflow, s =
|
|
8387
|
+
var e = n.state, t = n.name, r = e.rects.reference, i = e.rects.popper, o = e.modifiersData.preventOverflow, s = en(e, {
|
|
8368
8388
|
elementContext: "reference"
|
|
8369
|
-
}), a =
|
|
8389
|
+
}), a = en(e, {
|
|
8370
8390
|
altBoundary: !0
|
|
8371
8391
|
}), l = _i(s, r), c = _i(a, i, o), u = eo(l), f = eo(c);
|
|
8372
8392
|
e.modifiersData[t] = {
|
|
@@ -8430,14 +8450,14 @@ function vf(n) {
|
|
|
8430
8450
|
return n === "x" ? "y" : "x";
|
|
8431
8451
|
}
|
|
8432
8452
|
function bf(n) {
|
|
8433
|
-
var e = n.state, t = n.options, r = n.name, i = t.mainAxis, o = i === void 0 ? !0 : i, s = t.altAxis, a = s === void 0 ? !1 : s, l = t.boundary, c = t.rootBoundary, u = t.altBoundary, f = t.padding, p = t.tether, d = p === void 0 ? !0 : p,
|
|
8453
|
+
var e = n.state, t = n.options, r = n.name, i = t.mainAxis, o = i === void 0 ? !0 : i, s = t.altAxis, a = s === void 0 ? !1 : s, l = t.boundary, c = t.rootBoundary, u = t.altBoundary, f = t.padding, p = t.tether, d = p === void 0 ? !0 : p, g = t.tetherOffset, m = g === void 0 ? 0 : g, y = en(e, {
|
|
8434
8454
|
boundary: l,
|
|
8435
8455
|
rootBoundary: c,
|
|
8436
8456
|
padding: f,
|
|
8437
8457
|
altBoundary: u
|
|
8438
|
-
}), b = Ce(e.placement), C = Mt(e.placement), T = !C, h = oi(b), M = vf(h), x = e.modifiersData.popperOffsets, N = e.rects.reference, P = e.rects.popper, F = typeof
|
|
8458
|
+
}), b = Ce(e.placement), C = Mt(e.placement), T = !C, h = oi(b), M = vf(h), x = e.modifiersData.popperOffsets, N = e.rects.reference, P = e.rects.popper, F = typeof m == "function" ? m(Object.assign({}, e.rects, {
|
|
8439
8459
|
placement: e.placement
|
|
8440
|
-
})) :
|
|
8460
|
+
})) : m, L = typeof F == "number" ? {
|
|
8441
8461
|
mainAxis: F,
|
|
8442
8462
|
altAxis: F
|
|
8443
8463
|
} : Object.assign({
|
|
@@ -8449,15 +8469,15 @@ function bf(n) {
|
|
|
8449
8469
|
};
|
|
8450
8470
|
if (x) {
|
|
8451
8471
|
if (o) {
|
|
8452
|
-
var B, ne = h === "y" ? ee : te, re = h === "y" ? he : me, q = h === "y" ? "height" : "width", K = x[h], H = K +
|
|
8472
|
+
var B, ne = h === "y" ? ee : te, re = h === "y" ? he : me, q = h === "y" ? "height" : "width", K = x[h], H = K + y[ne], be = K - y[re], xe = d ? -P[q] / 2 : 0, qe = C === Ot ? N[q] : P[q], ke = C === Ot ? -P[q] : -N[q], Ke = e.elements.arrow, Me = d && Ke ? ii(Ke) : {
|
|
8453
8473
|
width: 0,
|
|
8454
8474
|
height: 0
|
|
8455
|
-
}, ge = e.modifiersData["arrow#persistent"] ? e.modifiersData["arrow#persistent"].padding : Ls(), Ae = ge[ne], pt = ge[re], Ne =
|
|
8475
|
+
}, ge = e.modifiersData["arrow#persistent"] ? e.modifiersData["arrow#persistent"].padding : Ls(), Ae = ge[ne], pt = ge[re], Ne = Wt(0, N[q], Me[q]), ht = T ? N[q] / 2 - xe - Ne - Ae - L.mainAxis : qe - Ne - Ae - L.mainAxis, ze = T ? -N[q] / 2 + xe + Ne + pt + L.mainAxis : ke + Ne + pt + L.mainAxis, mt = e.elements.arrow && an(e.elements.arrow), cn = mt ? h === "y" ? mt.clientTop || 0 : mt.clientLeft || 0 : 0, Nt = (B = j == null ? void 0 : j[h]) != null ? B : 0, un = K + ht - Nt - cn, fn = K + ze - Nt, It = Wt(d ? Jn(H, un) : H, K, d ? at(be, fn) : be);
|
|
8456
8476
|
x[h] = It, $[h] = It - K;
|
|
8457
8477
|
}
|
|
8458
8478
|
if (a) {
|
|
8459
|
-
var Dt,
|
|
8460
|
-
x[M] =
|
|
8479
|
+
var Dt, dn = h === "x" ? ee : te, pn = h === "x" ? he : me, Ie = x[M], Fe = M === "y" ? "height" : "width", Rt = Ie + y[dn], Ue = Ie - y[pn], Pt = [ee, te].indexOf(b) !== -1, hn = (Dt = j == null ? void 0 : j[M]) != null ? Dt : 0, mn = Pt ? Rt : Ie - N[Fe] - P[Fe] - hn + L.altAxis, gn = Pt ? Ie + N[Fe] + P[Fe] - hn - L.altAxis : Ue, yn = d && Pt ? Wu(mn, Ie, gn) : Wt(d ? mn : Rt, Ie, d ? gn : Ue);
|
|
8480
|
+
x[M] = yn, $[M] = yn - Ie;
|
|
8461
8481
|
}
|
|
8462
8482
|
e.modifiersData[r] = $;
|
|
8463
8483
|
}
|
|
@@ -8580,14 +8600,14 @@ function Af(n) {
|
|
|
8580
8600
|
state: u,
|
|
8581
8601
|
setOptions: function(b) {
|
|
8582
8602
|
var C = typeof b == "function" ? b(u.options) : b;
|
|
8583
|
-
|
|
8584
|
-
reference: ct(a) ?
|
|
8585
|
-
popper:
|
|
8603
|
+
m(), u.options = Object.assign({}, o, u.options, C), u.scrollParents = {
|
|
8604
|
+
reference: ct(a) ? Ht(a) : a.contextElement ? Ht(a.contextElement) : [],
|
|
8605
|
+
popper: Ht(l)
|
|
8586
8606
|
};
|
|
8587
8607
|
var T = Ef(Mf([].concat(r, u.options.modifiers)));
|
|
8588
8608
|
return u.orderedModifiers = T.filter(function(h) {
|
|
8589
8609
|
return h.enabled;
|
|
8590
|
-
}),
|
|
8610
|
+
}), g(), d.update();
|
|
8591
8611
|
},
|
|
8592
8612
|
// Sync update – it will always be executed, even if not necessary. This
|
|
8593
8613
|
// is useful for low frequency updates where sync behavior simplifies the
|
|
@@ -8599,7 +8619,7 @@ function Af(n) {
|
|
|
8599
8619
|
var b = u.elements, C = b.reference, T = b.popper;
|
|
8600
8620
|
if (no(C, T)) {
|
|
8601
8621
|
u.rects = {
|
|
8602
|
-
reference: Cf(C,
|
|
8622
|
+
reference: Cf(C, an(T), u.options.strategy === "fixed"),
|
|
8603
8623
|
popper: ii(T)
|
|
8604
8624
|
}, u.reset = !1, u.placement = u.options.placement, u.orderedModifiers.forEach(function(L) {
|
|
8605
8625
|
return u.modifiersData[L.name] = Object.assign({}, L.data);
|
|
@@ -8623,22 +8643,22 @@ function Af(n) {
|
|
|
8623
8643
|
// Async and optimistically optimized update – it will not be executed if
|
|
8624
8644
|
// not necessary (debounced to run at most once-per-tick)
|
|
8625
8645
|
update: Tf(function() {
|
|
8626
|
-
return new Promise(function(
|
|
8627
|
-
d.forceUpdate(),
|
|
8646
|
+
return new Promise(function(y) {
|
|
8647
|
+
d.forceUpdate(), y(u);
|
|
8628
8648
|
});
|
|
8629
8649
|
}),
|
|
8630
8650
|
destroy: function() {
|
|
8631
|
-
|
|
8651
|
+
m(), p = !0;
|
|
8632
8652
|
}
|
|
8633
8653
|
};
|
|
8634
8654
|
if (!no(a, l))
|
|
8635
8655
|
return d;
|
|
8636
|
-
d.setOptions(c).then(function(
|
|
8637
|
-
!p && c.onFirstUpdate && c.onFirstUpdate(
|
|
8656
|
+
d.setOptions(c).then(function(y) {
|
|
8657
|
+
!p && c.onFirstUpdate && c.onFirstUpdate(y);
|
|
8638
8658
|
});
|
|
8639
|
-
function
|
|
8640
|
-
u.orderedModifiers.forEach(function(
|
|
8641
|
-
var b =
|
|
8659
|
+
function g() {
|
|
8660
|
+
u.orderedModifiers.forEach(function(y) {
|
|
8661
|
+
var b = y.name, C = y.options, T = C === void 0 ? {} : C, h = y.effect;
|
|
8642
8662
|
if (typeof h == "function") {
|
|
8643
8663
|
var M = h({
|
|
8644
8664
|
state: u,
|
|
@@ -8651,9 +8671,9 @@ function Af(n) {
|
|
|
8651
8671
|
}
|
|
8652
8672
|
});
|
|
8653
8673
|
}
|
|
8654
|
-
function
|
|
8655
|
-
f.forEach(function(
|
|
8656
|
-
return
|
|
8674
|
+
function m() {
|
|
8675
|
+
f.forEach(function(y) {
|
|
8676
|
+
return y();
|
|
8657
8677
|
}), f = [];
|
|
8658
8678
|
}
|
|
8659
8679
|
return d;
|
|
@@ -8725,10 +8745,10 @@ function oo(n) {
|
|
|
8725
8745
|
return n[t] !== void 0 && (e[t] = n[t]), e;
|
|
8726
8746
|
}, {});
|
|
8727
8747
|
}
|
|
8728
|
-
function
|
|
8748
|
+
function Jt() {
|
|
8729
8749
|
return document.createElement("div");
|
|
8730
8750
|
}
|
|
8731
|
-
function
|
|
8751
|
+
function tn(n) {
|
|
8732
8752
|
return ["Element", "Fragment"].some(function(e) {
|
|
8733
8753
|
return ci(n, e);
|
|
8734
8754
|
});
|
|
@@ -8743,7 +8763,7 @@ function jf(n) {
|
|
|
8743
8763
|
return !!(n && n._tippy && n._tippy.reference === n);
|
|
8744
8764
|
}
|
|
8745
8765
|
function Wf(n) {
|
|
8746
|
-
return
|
|
8766
|
+
return tn(n) ? [n] : $f(n) ? qn(n) : Array.isArray(n) ? n : qn(document.querySelectorAll(n));
|
|
8747
8767
|
}
|
|
8748
8768
|
function hr(n, e) {
|
|
8749
8769
|
n.forEach(function(t) {
|
|
@@ -8765,8 +8785,8 @@ function Jf(n, e) {
|
|
|
8765
8785
|
var o = i.popperRect, s = i.popperState, a = i.props, l = a.interactiveBorder, c = Lf(s.placement), u = s.modifiersData.offset;
|
|
8766
8786
|
if (!u)
|
|
8767
8787
|
return !0;
|
|
8768
|
-
var f = c === "bottom" ? u.top.y : 0, p = c === "top" ? u.bottom.y : 0, d = c === "right" ? u.left.x : 0,
|
|
8769
|
-
return
|
|
8788
|
+
var f = c === "bottom" ? u.top.y : 0, p = c === "top" ? u.bottom.y : 0, d = c === "right" ? u.left.x : 0, g = c === "left" ? u.right.x : 0, m = o.top - r + f > l, y = r - o.bottom - p > l, b = o.left - t + d > l, C = t - o.right - g > l;
|
|
8789
|
+
return m || y || b || C;
|
|
8770
8790
|
});
|
|
8771
8791
|
}
|
|
8772
8792
|
function mr(n, e, t) {
|
|
@@ -8836,21 +8856,21 @@ function Ys(n) {
|
|
|
8836
8856
|
"color: #a6a095;"
|
|
8837
8857
|
];
|
|
8838
8858
|
}
|
|
8839
|
-
var
|
|
8859
|
+
var nn;
|
|
8840
8860
|
process.env.NODE_ENV !== "production" && Qf();
|
|
8841
8861
|
function Qf() {
|
|
8842
|
-
|
|
8862
|
+
nn = /* @__PURE__ */ new Set();
|
|
8843
8863
|
}
|
|
8844
8864
|
function De(n, e) {
|
|
8845
|
-
if (n && !
|
|
8865
|
+
if (n && !nn.has(e)) {
|
|
8846
8866
|
var t;
|
|
8847
|
-
|
|
8867
|
+
nn.add(e), (t = console).warn.apply(t, Ys(e));
|
|
8848
8868
|
}
|
|
8849
8869
|
}
|
|
8850
8870
|
function Ir(n, e) {
|
|
8851
|
-
if (n && !
|
|
8871
|
+
if (n && !nn.has(e)) {
|
|
8852
8872
|
var t;
|
|
8853
|
-
|
|
8873
|
+
nn.add(e), (t = console).error.apply(t, Ys(e));
|
|
8854
8874
|
}
|
|
8855
8875
|
}
|
|
8856
8876
|
function Zf(n) {
|
|
@@ -8986,11 +9006,11 @@ function Dr(n, e) {
|
|
|
8986
9006
|
n[rd()] = e;
|
|
8987
9007
|
}
|
|
8988
9008
|
function fo(n) {
|
|
8989
|
-
var e =
|
|
8990
|
-
return n === !0 ? e.className = Js : (e.className = qs,
|
|
9009
|
+
var e = Jt();
|
|
9010
|
+
return n === !0 ? e.className = Js : (e.className = qs, tn(n) ? e.appendChild(n) : Dr(e, n)), e;
|
|
8991
9011
|
}
|
|
8992
9012
|
function po(n, e) {
|
|
8993
|
-
|
|
9013
|
+
tn(e.content) ? (Dr(n, ""), n.appendChild(e.content)) : typeof e.content != "function" && (e.allowHTML ? Dr(n, e.content) : n.textContent = e.content);
|
|
8994
9014
|
}
|
|
8995
9015
|
function Rr(n) {
|
|
8996
9016
|
var e = n.firstElementChild, t = qn(e.children);
|
|
@@ -9008,9 +9028,9 @@ function Rr(n) {
|
|
|
9008
9028
|
};
|
|
9009
9029
|
}
|
|
9010
9030
|
function _s(n) {
|
|
9011
|
-
var e =
|
|
9031
|
+
var e = Jt(), t = Jt();
|
|
9012
9032
|
t.className = Df, t.setAttribute("data-state", "hidden"), t.setAttribute("tabindex", "-1");
|
|
9013
|
-
var r =
|
|
9033
|
+
var r = Jt();
|
|
9014
9034
|
r.className = Hs, r.setAttribute("data-state", "hidden"), po(r, n.props), e.appendChild(t), t.appendChild(r), i(n.props, n.props);
|
|
9015
9035
|
function i(o, s) {
|
|
9016
9036
|
var a = Rr(e), l = a.box, c = a.content, u = a.arrow;
|
|
@@ -9022,9 +9042,9 @@ function _s(n) {
|
|
|
9022
9042
|
};
|
|
9023
9043
|
}
|
|
9024
9044
|
_s.$$tippy = !0;
|
|
9025
|
-
var id = 1,
|
|
9045
|
+
var id = 1, En = [], gr = [];
|
|
9026
9046
|
function od(n, e) {
|
|
9027
|
-
var t = uo(n, Object.assign({}, se, Qs(oo(e)))), r, i, o, s = !1, a = !1, l = !1, c = !1, u, f, p, d = [],
|
|
9047
|
+
var t = uo(n, Object.assign({}, se, Qs(oo(e)))), r, i, o, s = !1, a = !1, l = !1, c = !1, u, f, p, d = [], g = ro(un, t.interactiveDebounce), m, y = id++, b = null, C = Ff(t.plugins), T = {
|
|
9028
9048
|
// Is the instance currently enabled?
|
|
9029
9049
|
isEnabled: !0,
|
|
9030
9050
|
// Is the tippy currently showing and not transitioning out?
|
|
@@ -9037,22 +9057,22 @@ function od(n, e) {
|
|
|
9037
9057
|
isShown: !1
|
|
9038
9058
|
}, h = {
|
|
9039
9059
|
// properties
|
|
9040
|
-
id:
|
|
9060
|
+
id: y,
|
|
9041
9061
|
reference: n,
|
|
9042
|
-
popper:
|
|
9062
|
+
popper: Jt(),
|
|
9043
9063
|
popperInstance: b,
|
|
9044
9064
|
props: t,
|
|
9045
9065
|
state: T,
|
|
9046
9066
|
plugins: C,
|
|
9047
9067
|
// methods
|
|
9048
|
-
clearDelayTimeouts:
|
|
9049
|
-
setProps:
|
|
9050
|
-
setContent:
|
|
9068
|
+
clearDelayTimeouts: mn,
|
|
9069
|
+
setProps: gn,
|
|
9070
|
+
setContent: yn,
|
|
9051
9071
|
show: ta,
|
|
9052
9072
|
hide: na,
|
|
9053
9073
|
hideWithInteractivity: ra,
|
|
9054
9074
|
enable: Pt,
|
|
9055
|
-
disable:
|
|
9075
|
+
disable: hn,
|
|
9056
9076
|
unmount: ia,
|
|
9057
9077
|
destroy: oa
|
|
9058
9078
|
};
|
|
@@ -9060,53 +9080,53 @@ function od(n, e) {
|
|
|
9060
9080
|
return process.env.NODE_ENV !== "production" && Ir(!0, "render() function has not been supplied."), h;
|
|
9061
9081
|
var M = t.render(h), x = M.popper, N = M.onUpdate;
|
|
9062
9082
|
x.setAttribute("data-tippy-root", ""), x.id = "tippy-" + h.id, h.popper = x, n._tippy = h, x._tippy = h;
|
|
9063
|
-
var P = C.map(function(
|
|
9064
|
-
return
|
|
9083
|
+
var P = C.map(function(v) {
|
|
9084
|
+
return v.fn(h);
|
|
9065
9085
|
}), F = n.hasAttribute("aria-expanded");
|
|
9066
9086
|
return mt(), xe(), K(), H("onCreate", [h]), t.showOnCreate && Rt(), x.addEventListener("mouseenter", function() {
|
|
9067
9087
|
h.props.interactive && h.state.isVisible && h.clearDelayTimeouts();
|
|
9068
9088
|
}), x.addEventListener("mouseleave", function() {
|
|
9069
|
-
h.props.interactive && h.props.trigger.indexOf("mouseenter") >= 0 && ne().addEventListener("mousemove",
|
|
9089
|
+
h.props.interactive && h.props.trigger.indexOf("mouseenter") >= 0 && ne().addEventListener("mousemove", g);
|
|
9070
9090
|
}), h;
|
|
9071
9091
|
function L() {
|
|
9072
|
-
var
|
|
9073
|
-
return Array.isArray(
|
|
9092
|
+
var v = h.props.touch;
|
|
9093
|
+
return Array.isArray(v) ? v : [v, 0];
|
|
9074
9094
|
}
|
|
9075
9095
|
function j() {
|
|
9076
9096
|
return L()[0] === "hold";
|
|
9077
9097
|
}
|
|
9078
9098
|
function $() {
|
|
9079
|
-
var
|
|
9080
|
-
return !!((
|
|
9099
|
+
var v;
|
|
9100
|
+
return !!((v = h.props.render) != null && v.$$tippy);
|
|
9081
9101
|
}
|
|
9082
9102
|
function B() {
|
|
9083
|
-
return
|
|
9103
|
+
return m || n;
|
|
9084
9104
|
}
|
|
9085
9105
|
function ne() {
|
|
9086
|
-
var
|
|
9087
|
-
return
|
|
9106
|
+
var v = B().parentNode;
|
|
9107
|
+
return v ? Hf(v) : document;
|
|
9088
9108
|
}
|
|
9089
9109
|
function re() {
|
|
9090
9110
|
return Rr(x);
|
|
9091
9111
|
}
|
|
9092
|
-
function q(
|
|
9093
|
-
return h.state.isMounted && !h.state.isVisible || we.isTouch || u && u.type === "focus" ? 0 : pr(h.props.delay,
|
|
9112
|
+
function q(v) {
|
|
9113
|
+
return h.state.isMounted && !h.state.isVisible || we.isTouch || u && u.type === "focus" ? 0 : pr(h.props.delay, v ? 0 : 1, se.delay);
|
|
9094
9114
|
}
|
|
9095
|
-
function K(
|
|
9096
|
-
|
|
9115
|
+
function K(v) {
|
|
9116
|
+
v === void 0 && (v = !1), x.style.pointerEvents = h.props.interactive && !v ? "" : "none", x.style.zIndex = "" + h.props.zIndex;
|
|
9097
9117
|
}
|
|
9098
|
-
function H(
|
|
9118
|
+
function H(v, w, E) {
|
|
9099
9119
|
if (E === void 0 && (E = !0), P.forEach(function(I) {
|
|
9100
|
-
I[
|
|
9120
|
+
I[v] && I[v].apply(I, w);
|
|
9101
9121
|
}), E) {
|
|
9102
9122
|
var R;
|
|
9103
|
-
(R = h.props)[
|
|
9123
|
+
(R = h.props)[v].apply(R, w);
|
|
9104
9124
|
}
|
|
9105
9125
|
}
|
|
9106
9126
|
function be() {
|
|
9107
|
-
var
|
|
9108
|
-
if (
|
|
9109
|
-
var w = "aria-" +
|
|
9127
|
+
var v = h.props.aria;
|
|
9128
|
+
if (v.content) {
|
|
9129
|
+
var w = "aria-" + v.content, E = x.id, R = wt(h.props.triggerTarget || n);
|
|
9110
9130
|
R.forEach(function(I) {
|
|
9111
9131
|
var X = I.getAttribute(w);
|
|
9112
9132
|
if (h.state.isVisible)
|
|
@@ -9120,20 +9140,20 @@ function od(n, e) {
|
|
|
9120
9140
|
}
|
|
9121
9141
|
function xe() {
|
|
9122
9142
|
if (!(F || !h.props.aria.expanded)) {
|
|
9123
|
-
var
|
|
9124
|
-
|
|
9143
|
+
var v = wt(h.props.triggerTarget || n);
|
|
9144
|
+
v.forEach(function(w) {
|
|
9125
9145
|
h.props.interactive ? w.setAttribute("aria-expanded", h.state.isVisible && w === B() ? "true" : "false") : w.removeAttribute("aria-expanded");
|
|
9126
9146
|
});
|
|
9127
9147
|
}
|
|
9128
9148
|
}
|
|
9129
9149
|
function qe() {
|
|
9130
|
-
ne().removeEventListener("mousemove",
|
|
9131
|
-
return
|
|
9150
|
+
ne().removeEventListener("mousemove", g), En = En.filter(function(v) {
|
|
9151
|
+
return v !== g;
|
|
9132
9152
|
});
|
|
9133
9153
|
}
|
|
9134
|
-
function ke(
|
|
9135
|
-
if (!(we.isTouch && (l ||
|
|
9136
|
-
var w =
|
|
9154
|
+
function ke(v) {
|
|
9155
|
+
if (!(we.isTouch && (l || v.type === "mousedown"))) {
|
|
9156
|
+
var w = v.composedPath && v.composedPath()[0] || v.target;
|
|
9137
9157
|
if (!(h.props.interactive && ao(x, w))) {
|
|
9138
9158
|
if (wt(h.props.triggerTarget || n).some(function(E) {
|
|
9139
9159
|
return ao(E, w);
|
|
@@ -9141,7 +9161,7 @@ function od(n, e) {
|
|
|
9141
9161
|
if (we.isTouch || h.state.isVisible && h.props.trigger.indexOf("click") >= 0)
|
|
9142
9162
|
return;
|
|
9143
9163
|
} else
|
|
9144
|
-
H("onClickOutside", [h,
|
|
9164
|
+
H("onClickOutside", [h, v]);
|
|
9145
9165
|
h.props.hideOnClick === !0 && (h.clearDelayTimeouts(), h.hide(), a = !0, setTimeout(function() {
|
|
9146
9166
|
a = !1;
|
|
9147
9167
|
}), h.state.isMounted || Ae());
|
|
@@ -9155,37 +9175,37 @@ function od(n, e) {
|
|
|
9155
9175
|
l = !1;
|
|
9156
9176
|
}
|
|
9157
9177
|
function ge() {
|
|
9158
|
-
var
|
|
9159
|
-
|
|
9178
|
+
var v = ne();
|
|
9179
|
+
v.addEventListener("mousedown", ke, !0), v.addEventListener("touchend", ke, Ye), v.addEventListener("touchstart", Me, Ye), v.addEventListener("touchmove", Ke, Ye);
|
|
9160
9180
|
}
|
|
9161
9181
|
function Ae() {
|
|
9162
|
-
var
|
|
9163
|
-
|
|
9182
|
+
var v = ne();
|
|
9183
|
+
v.removeEventListener("mousedown", ke, !0), v.removeEventListener("touchend", ke, Ye), v.removeEventListener("touchstart", Me, Ye), v.removeEventListener("touchmove", Ke, Ye);
|
|
9164
9184
|
}
|
|
9165
|
-
function pt(
|
|
9166
|
-
ht(
|
|
9185
|
+
function pt(v, w) {
|
|
9186
|
+
ht(v, function() {
|
|
9167
9187
|
!h.state.isVisible && x.parentNode && x.parentNode.contains(x) && w();
|
|
9168
9188
|
});
|
|
9169
9189
|
}
|
|
9170
|
-
function Ne(
|
|
9171
|
-
ht(
|
|
9190
|
+
function Ne(v, w) {
|
|
9191
|
+
ht(v, w);
|
|
9172
9192
|
}
|
|
9173
|
-
function ht(
|
|
9193
|
+
function ht(v, w) {
|
|
9174
9194
|
var E = re().box;
|
|
9175
9195
|
function R(I) {
|
|
9176
9196
|
I.target === E && (mr(E, "remove", R), w());
|
|
9177
9197
|
}
|
|
9178
|
-
if (
|
|
9198
|
+
if (v === 0)
|
|
9179
9199
|
return w();
|
|
9180
9200
|
mr(E, "remove", f), mr(E, "add", R), f = R;
|
|
9181
9201
|
}
|
|
9182
|
-
function ze(
|
|
9202
|
+
function ze(v, w, E) {
|
|
9183
9203
|
E === void 0 && (E = !1);
|
|
9184
9204
|
var R = wt(h.props.triggerTarget || n);
|
|
9185
9205
|
R.forEach(function(I) {
|
|
9186
|
-
I.addEventListener(
|
|
9206
|
+
I.addEventListener(v, w, E), d.push({
|
|
9187
9207
|
node: I,
|
|
9188
|
-
eventType:
|
|
9208
|
+
eventType: v,
|
|
9189
9209
|
handler: w,
|
|
9190
9210
|
options: E
|
|
9191
9211
|
});
|
|
@@ -9194,13 +9214,13 @@ function od(n, e) {
|
|
|
9194
9214
|
function mt() {
|
|
9195
9215
|
j() && (ze("touchstart", Nt, {
|
|
9196
9216
|
passive: !0
|
|
9197
|
-
}), ze("touchend",
|
|
9217
|
+
}), ze("touchend", fn, {
|
|
9198
9218
|
passive: !0
|
|
9199
|
-
})), zf(h.props.trigger).forEach(function(
|
|
9200
|
-
if (
|
|
9201
|
-
switch (ze(
|
|
9219
|
+
})), zf(h.props.trigger).forEach(function(v) {
|
|
9220
|
+
if (v !== "manual")
|
|
9221
|
+
switch (ze(v, Nt), v) {
|
|
9202
9222
|
case "mouseenter":
|
|
9203
|
-
ze("mouseleave",
|
|
9223
|
+
ze("mouseleave", fn);
|
|
9204
9224
|
break;
|
|
9205
9225
|
case "focus":
|
|
9206
9226
|
ze(Yf ? "focusout" : "blur", It);
|
|
@@ -9211,24 +9231,24 @@ function od(n, e) {
|
|
|
9211
9231
|
}
|
|
9212
9232
|
});
|
|
9213
9233
|
}
|
|
9214
|
-
function
|
|
9215
|
-
d.forEach(function(
|
|
9216
|
-
var w =
|
|
9234
|
+
function cn() {
|
|
9235
|
+
d.forEach(function(v) {
|
|
9236
|
+
var w = v.node, E = v.eventType, R = v.handler, I = v.options;
|
|
9217
9237
|
w.removeEventListener(E, R, I);
|
|
9218
9238
|
}), d = [];
|
|
9219
9239
|
}
|
|
9220
|
-
function Nt(
|
|
9240
|
+
function Nt(v) {
|
|
9221
9241
|
var w, E = !1;
|
|
9222
|
-
if (!(!h.state.isEnabled || Dt(
|
|
9242
|
+
if (!(!h.state.isEnabled || Dt(v) || a)) {
|
|
9223
9243
|
var R = ((w = u) == null ? void 0 : w.type) === "focus";
|
|
9224
|
-
u =
|
|
9225
|
-
return I(
|
|
9226
|
-
}),
|
|
9244
|
+
u = v, m = v.currentTarget, xe(), !h.state.isVisible && Vf(v) && En.forEach(function(I) {
|
|
9245
|
+
return I(v);
|
|
9246
|
+
}), v.type === "click" && (h.props.trigger.indexOf("mouseenter") < 0 || s) && h.props.hideOnClick !== !1 && h.state.isVisible ? E = !0 : Rt(v), v.type === "click" && (s = !E), E && !R && Ue(v);
|
|
9227
9247
|
}
|
|
9228
9248
|
}
|
|
9229
|
-
function
|
|
9230
|
-
var w =
|
|
9231
|
-
if (!(
|
|
9249
|
+
function un(v) {
|
|
9250
|
+
var w = v.target, E = B().contains(w) || x.contains(w);
|
|
9251
|
+
if (!(v.type === "mousemove" && E)) {
|
|
9232
9252
|
var R = Fe().concat(x).map(function(I) {
|
|
9233
9253
|
var X, fe = I._tippy, gt = (X = fe.popperInstance) == null ? void 0 : X.state;
|
|
9234
9254
|
return gt ? {
|
|
@@ -9237,28 +9257,28 @@ function od(n, e) {
|
|
|
9237
9257
|
props: t
|
|
9238
9258
|
} : null;
|
|
9239
9259
|
}).filter(Boolean);
|
|
9240
|
-
Jf(R,
|
|
9260
|
+
Jf(R, v) && (qe(), Ue(v));
|
|
9241
9261
|
}
|
|
9242
9262
|
}
|
|
9243
|
-
function
|
|
9244
|
-
var w = Dt(
|
|
9263
|
+
function fn(v) {
|
|
9264
|
+
var w = Dt(v) || h.props.trigger.indexOf("click") >= 0 && s;
|
|
9245
9265
|
if (!w) {
|
|
9246
9266
|
if (h.props.interactive) {
|
|
9247
|
-
h.hideWithInteractivity(
|
|
9267
|
+
h.hideWithInteractivity(v);
|
|
9248
9268
|
return;
|
|
9249
9269
|
}
|
|
9250
|
-
Ue(
|
|
9270
|
+
Ue(v);
|
|
9251
9271
|
}
|
|
9252
9272
|
}
|
|
9253
|
-
function It(
|
|
9254
|
-
h.props.trigger.indexOf("focusin") < 0 &&
|
|
9273
|
+
function It(v) {
|
|
9274
|
+
h.props.trigger.indexOf("focusin") < 0 && v.target !== B() || h.props.interactive && v.relatedTarget && x.contains(v.relatedTarget) || Ue(v);
|
|
9255
9275
|
}
|
|
9256
|
-
function Dt(
|
|
9257
|
-
return we.isTouch ? j() !==
|
|
9276
|
+
function Dt(v) {
|
|
9277
|
+
return we.isTouch ? j() !== v.type.indexOf("touch") >= 0 : !1;
|
|
9258
9278
|
}
|
|
9259
|
-
function
|
|
9260
|
-
|
|
9261
|
-
var
|
|
9279
|
+
function dn() {
|
|
9280
|
+
pn();
|
|
9281
|
+
var v = h.props, w = v.popperOptions, E = v.placement, R = v.offset, I = v.getReferenceClientRect, X = v.moveTransition, fe = $() ? Rr(x).arrow : null, gt = I ? {
|
|
9262
9282
|
getBoundingClientRect: I,
|
|
9263
9283
|
contextElement: I.contextElement || B()
|
|
9264
9284
|
} : n, ui = {
|
|
@@ -9266,12 +9286,12 @@ function od(n, e) {
|
|
|
9266
9286
|
enabled: !0,
|
|
9267
9287
|
phase: "beforeWrite",
|
|
9268
9288
|
requires: ["computeStyles"],
|
|
9269
|
-
fn: function(
|
|
9270
|
-
var yt =
|
|
9289
|
+
fn: function(vn) {
|
|
9290
|
+
var yt = vn.state;
|
|
9271
9291
|
if ($()) {
|
|
9272
9292
|
var sa = re(), tr = sa.box;
|
|
9273
|
-
["placement", "reference-hidden", "escaped"].forEach(function(
|
|
9274
|
-
|
|
9293
|
+
["placement", "reference-hidden", "escaped"].forEach(function(bn) {
|
|
9294
|
+
bn === "placement" ? tr.setAttribute("data-placement", yt.placement) : yt.attributes.popper["data-popper-" + bn] ? tr.setAttribute("data-" + bn, "") : tr.removeAttribute("data-" + bn);
|
|
9275
9295
|
}), yt.attributes.popper = {};
|
|
9276
9296
|
}
|
|
9277
9297
|
}
|
|
@@ -9313,12 +9333,12 @@ function od(n, e) {
|
|
|
9313
9333
|
modifiers: Ge
|
|
9314
9334
|
}));
|
|
9315
9335
|
}
|
|
9316
|
-
function
|
|
9336
|
+
function pn() {
|
|
9317
9337
|
h.popperInstance && (h.popperInstance.destroy(), h.popperInstance = null);
|
|
9318
9338
|
}
|
|
9319
9339
|
function Ie() {
|
|
9320
|
-
var
|
|
9321
|
-
h.props.interactive &&
|
|
9340
|
+
var v = h.props.appendTo, w, E = B();
|
|
9341
|
+
h.props.interactive && v === Ks || v === "parent" ? w = E.parentNode : w = Us(v, [E]), w.contains(x) || w.appendChild(x), h.state.isMounted = !0, dn(), process.env.NODE_ENV !== "production" && De(h.props.interactive && v === se.appendTo && E.nextElementSibling !== x, ["Interactive tippy element may not be accessible via keyboard", "navigation because it is not directly after the reference element", "in the DOM source order.", `
|
|
9322
9342
|
|
|
9323
9343
|
`, "Using a wrapper <div> or <span> tag around the reference element", "solves this by creating a new parentNode context.", `
|
|
9324
9344
|
|
|
@@ -9329,19 +9349,19 @@ function od(n, e) {
|
|
|
9329
9349
|
function Fe() {
|
|
9330
9350
|
return qn(x.querySelectorAll("[data-tippy-root]"));
|
|
9331
9351
|
}
|
|
9332
|
-
function Rt(
|
|
9333
|
-
h.clearDelayTimeouts(),
|
|
9352
|
+
function Rt(v) {
|
|
9353
|
+
h.clearDelayTimeouts(), v && H("onTrigger", [h, v]), ge();
|
|
9334
9354
|
var w = q(!0), E = L(), R = E[0], I = E[1];
|
|
9335
9355
|
we.isTouch && R === "hold" && I && (w = I), w ? r = setTimeout(function() {
|
|
9336
9356
|
h.show();
|
|
9337
9357
|
}, w) : h.show();
|
|
9338
9358
|
}
|
|
9339
|
-
function Ue(
|
|
9340
|
-
if (h.clearDelayTimeouts(), H("onUntrigger", [h,
|
|
9359
|
+
function Ue(v) {
|
|
9360
|
+
if (h.clearDelayTimeouts(), H("onUntrigger", [h, v]), !h.state.isVisible) {
|
|
9341
9361
|
Ae();
|
|
9342
9362
|
return;
|
|
9343
9363
|
}
|
|
9344
|
-
if (!(h.props.trigger.indexOf("mouseenter") >= 0 && h.props.trigger.indexOf("click") >= 0 && ["mouseleave", "mousemove"].indexOf(
|
|
9364
|
+
if (!(h.props.trigger.indexOf("mouseenter") >= 0 && h.props.trigger.indexOf("click") >= 0 && ["mouseleave", "mousemove"].indexOf(v.type) >= 0 && s)) {
|
|
9345
9365
|
var w = q(!1);
|
|
9346
9366
|
w ? i = setTimeout(function() {
|
|
9347
9367
|
h.state.isVisible && h.hide();
|
|
@@ -9353,34 +9373,34 @@ function od(n, e) {
|
|
|
9353
9373
|
function Pt() {
|
|
9354
9374
|
h.state.isEnabled = !0;
|
|
9355
9375
|
}
|
|
9356
|
-
function
|
|
9376
|
+
function hn() {
|
|
9357
9377
|
h.hide(), h.state.isEnabled = !1;
|
|
9358
9378
|
}
|
|
9359
|
-
function
|
|
9379
|
+
function mn() {
|
|
9360
9380
|
clearTimeout(r), clearTimeout(i), cancelAnimationFrame(o);
|
|
9361
9381
|
}
|
|
9362
|
-
function
|
|
9382
|
+
function gn(v) {
|
|
9363
9383
|
if (process.env.NODE_ENV !== "production" && De(h.state.isDestroyed, bt("setProps")), !h.state.isDestroyed) {
|
|
9364
|
-
H("onBeforeUpdate", [h,
|
|
9365
|
-
var w = h.props, E = uo(n, Object.assign({}, w, oo(
|
|
9384
|
+
H("onBeforeUpdate", [h, v]), cn();
|
|
9385
|
+
var w = h.props, E = uo(n, Object.assign({}, w, oo(v), {
|
|
9366
9386
|
ignoreAttributes: !0
|
|
9367
9387
|
}));
|
|
9368
|
-
h.props = E, mt(), w.interactiveDebounce !== E.interactiveDebounce && (qe(),
|
|
9388
|
+
h.props = E, mt(), w.interactiveDebounce !== E.interactiveDebounce && (qe(), g = ro(un, E.interactiveDebounce)), w.triggerTarget && !E.triggerTarget ? wt(w.triggerTarget).forEach(function(R) {
|
|
9369
9389
|
R.removeAttribute("aria-expanded");
|
|
9370
|
-
}) : E.triggerTarget && n.removeAttribute("aria-expanded"), xe(), K(), N && N(w, E), h.popperInstance && (
|
|
9390
|
+
}) : E.triggerTarget && n.removeAttribute("aria-expanded"), xe(), K(), N && N(w, E), h.popperInstance && (dn(), Fe().forEach(function(R) {
|
|
9371
9391
|
requestAnimationFrame(R._tippy.popperInstance.forceUpdate);
|
|
9372
|
-
})), H("onAfterUpdate", [h,
|
|
9392
|
+
})), H("onAfterUpdate", [h, v]);
|
|
9373
9393
|
}
|
|
9374
9394
|
}
|
|
9375
|
-
function
|
|
9395
|
+
function yn(v) {
|
|
9376
9396
|
h.setProps({
|
|
9377
|
-
content:
|
|
9397
|
+
content: v
|
|
9378
9398
|
});
|
|
9379
9399
|
}
|
|
9380
9400
|
function ta() {
|
|
9381
9401
|
process.env.NODE_ENV !== "production" && De(h.state.isDestroyed, bt("show"));
|
|
9382
|
-
var
|
|
9383
|
-
if (!(
|
|
9402
|
+
var v = h.state.isVisible, w = h.state.isDestroyed, E = !h.state.isEnabled, R = we.isTouch && !h.props.touch, I = pr(h.props.duration, 0, se.duration);
|
|
9403
|
+
if (!(v || w || E || R) && !B().hasAttribute("disabled") && (H("onShow", [h], !1), h.props.onShow(h) !== !1)) {
|
|
9384
9404
|
if (h.state.isVisible = !0, $() && (x.style.visibility = "visible"), K(), ge(), h.state.isMounted || (x.style.transition = "none"), $()) {
|
|
9385
9405
|
var X = re(), fe = X.box, gt = X.content;
|
|
9386
9406
|
hr([fe, gt], 0);
|
|
@@ -9389,8 +9409,8 @@ function od(n, e) {
|
|
|
9389
9409
|
var Ge;
|
|
9390
9410
|
if (!(!h.state.isVisible || c)) {
|
|
9391
9411
|
if (c = !0, x.offsetHeight, x.style.transition = h.props.moveTransition, $() && h.props.animation) {
|
|
9392
|
-
var er = re(),
|
|
9393
|
-
hr([
|
|
9412
|
+
var er = re(), vn = er.box, yt = er.content;
|
|
9413
|
+
hr([vn, yt], I), so([vn, yt], "visible");
|
|
9394
9414
|
}
|
|
9395
9415
|
be(), xe(), io(gr, h), (Ge = h.popperInstance) == null || Ge.forceUpdate(), H("onMount", [h]), h.props.animation && $() && Ne(I, function() {
|
|
9396
9416
|
h.state.isShown = !0, H("onShown", [h]);
|
|
@@ -9401,8 +9421,8 @@ function od(n, e) {
|
|
|
9401
9421
|
}
|
|
9402
9422
|
function na() {
|
|
9403
9423
|
process.env.NODE_ENV !== "production" && De(h.state.isDestroyed, bt("hide"));
|
|
9404
|
-
var
|
|
9405
|
-
if (!(
|
|
9424
|
+
var v = !h.state.isVisible, w = h.state.isDestroyed, E = !h.state.isEnabled, R = pr(h.props.duration, 1, se.duration);
|
|
9425
|
+
if (!(v || w || E) && (H("onHide", [h], !1), h.props.onHide(h) !== !1)) {
|
|
9406
9426
|
if (h.state.isVisible = !1, h.state.isShown = !1, c = !1, s = !1, $() && (x.style.visibility = "hidden"), qe(), Ae(), K(!0), $()) {
|
|
9407
9427
|
var I = re(), X = I.box, fe = I.content;
|
|
9408
9428
|
h.props.animation && (hr([X, fe], R), so([X, fe], "hidden"));
|
|
@@ -9410,21 +9430,21 @@ function od(n, e) {
|
|
|
9410
9430
|
be(), xe(), h.props.animation ? $() && pt(R, h.unmount) : h.unmount();
|
|
9411
9431
|
}
|
|
9412
9432
|
}
|
|
9413
|
-
function ra(
|
|
9414
|
-
process.env.NODE_ENV !== "production" && De(h.state.isDestroyed, bt("hideWithInteractivity")), ne().addEventListener("mousemove",
|
|
9433
|
+
function ra(v) {
|
|
9434
|
+
process.env.NODE_ENV !== "production" && De(h.state.isDestroyed, bt("hideWithInteractivity")), ne().addEventListener("mousemove", g), io(En, g), g(v);
|
|
9415
9435
|
}
|
|
9416
9436
|
function ia() {
|
|
9417
|
-
process.env.NODE_ENV !== "production" && De(h.state.isDestroyed, bt("unmount")), h.state.isVisible && h.hide(), h.state.isMounted && (
|
|
9418
|
-
|
|
9419
|
-
}), x.parentNode && x.parentNode.removeChild(x), gr = gr.filter(function(
|
|
9420
|
-
return
|
|
9437
|
+
process.env.NODE_ENV !== "production" && De(h.state.isDestroyed, bt("unmount")), h.state.isVisible && h.hide(), h.state.isMounted && (pn(), Fe().forEach(function(v) {
|
|
9438
|
+
v._tippy.unmount();
|
|
9439
|
+
}), x.parentNode && x.parentNode.removeChild(x), gr = gr.filter(function(v) {
|
|
9440
|
+
return v !== h;
|
|
9421
9441
|
}), h.state.isMounted = !1, H("onHidden", [h]));
|
|
9422
9442
|
}
|
|
9423
9443
|
function oa() {
|
|
9424
|
-
process.env.NODE_ENV !== "production" && De(h.state.isDestroyed, bt("destroy")), !h.state.isDestroyed && (h.clearDelayTimeouts(), h.unmount(),
|
|
9444
|
+
process.env.NODE_ENV !== "production" && De(h.state.isDestroyed, bt("destroy")), !h.state.isDestroyed && (h.clearDelayTimeouts(), h.unmount(), cn(), delete n._tippy, h.state.isDestroyed = !0, H("onDestroy", [h]));
|
|
9425
9445
|
}
|
|
9426
9446
|
}
|
|
9427
|
-
function
|
|
9447
|
+
function ln(n, e) {
|
|
9428
9448
|
e === void 0 && (e = {});
|
|
9429
9449
|
var t = se.plugins.concat(e.plugins || []);
|
|
9430
9450
|
process.env.NODE_ENV !== "production" && (Zf(n), Zs(e, t)), Uf();
|
|
@@ -9432,7 +9452,7 @@ function sn(n, e) {
|
|
|
9432
9452
|
plugins: t
|
|
9433
9453
|
}), i = Wf(n);
|
|
9434
9454
|
if (process.env.NODE_ENV !== "production") {
|
|
9435
|
-
var o =
|
|
9455
|
+
var o = tn(r.content), s = i.length > 1;
|
|
9436
9456
|
De(o && 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.", `
|
|
9437
9457
|
|
|
9438
9458
|
`, "Instead, pass the .innerHTML of the element, or use a function that", "returns a cloned version of the element instead.", `
|
|
@@ -9444,11 +9464,11 @@ function sn(n, e) {
|
|
|
9444
9464
|
var u = c && od(c, r);
|
|
9445
9465
|
return u && l.push(u), l;
|
|
9446
9466
|
}, []);
|
|
9447
|
-
return
|
|
9467
|
+
return tn(n) ? a[0] : a;
|
|
9448
9468
|
}
|
|
9449
|
-
|
|
9450
|
-
|
|
9451
|
-
|
|
9469
|
+
ln.defaultProps = se;
|
|
9470
|
+
ln.setDefaultProps = td;
|
|
9471
|
+
ln.currentInput = we;
|
|
9452
9472
|
Object.assign({}, Bs, {
|
|
9453
9473
|
effect: function(e) {
|
|
9454
9474
|
var t = e.state, r = {
|
|
@@ -9466,14 +9486,14 @@ Object.assign({}, Bs, {
|
|
|
9466
9486
|
Object.assign(t.elements.popper.style, r.popper), t.styles = r, t.elements.arrow && Object.assign(t.elements.arrow.style, r.arrow);
|
|
9467
9487
|
}
|
|
9468
9488
|
});
|
|
9469
|
-
|
|
9489
|
+
ln.setDefaultProps({
|
|
9470
9490
|
render: _s
|
|
9471
9491
|
});
|
|
9472
9492
|
class sd {
|
|
9473
9493
|
constructor({ editor: e, element: t, view: r, tippyOptions: i = {}, updateDelay: o = 250, shouldShow: s }) {
|
|
9474
9494
|
this.preventHide = !1, this.shouldShow = ({ view: a, state: l, from: c, to: u }) => {
|
|
9475
|
-
const { doc: f, selection: p } = l, { empty: d } = p,
|
|
9476
|
-
return !(!(a.hasFocus() ||
|
|
9495
|
+
const { doc: f, selection: p } = l, { empty: d } = p, g = !f.textBetween(c, u).length && Zr(l.selection), m = this.element.contains(document.activeElement);
|
|
9496
|
+
return !(!(a.hasFocus() || m) || d || g || !this.editor.isEditable);
|
|
9477
9497
|
}, this.mousedownHandler = () => {
|
|
9478
9498
|
this.preventHide = !0;
|
|
9479
9499
|
}, this.dragstartHandler = () => {
|
|
@@ -9496,16 +9516,16 @@ class sd {
|
|
|
9496
9516
|
}, this.updateDelay));
|
|
9497
9517
|
}, this.updateHandler = (a, l, c, u) => {
|
|
9498
9518
|
var f, p, d;
|
|
9499
|
-
const { state:
|
|
9500
|
-
if (
|
|
9519
|
+
const { state: g, composing: m } = a, { selection: y } = g;
|
|
9520
|
+
if (m || !l && !c)
|
|
9501
9521
|
return;
|
|
9502
9522
|
this.createTooltip();
|
|
9503
|
-
const { ranges: C } =
|
|
9523
|
+
const { ranges: C } = y, T = Math.min(...C.map((x) => x.$from.pos)), h = Math.max(...C.map((x) => x.$to.pos));
|
|
9504
9524
|
if (!((f = this.shouldShow) === null || f === void 0 ? void 0 : f.call(this, {
|
|
9505
9525
|
editor: this.editor,
|
|
9506
9526
|
element: this.element,
|
|
9507
9527
|
view: a,
|
|
9508
|
-
state:
|
|
9528
|
+
state: g,
|
|
9509
9529
|
oldState: u,
|
|
9510
9530
|
from: T,
|
|
9511
9531
|
to: h
|
|
@@ -9515,7 +9535,7 @@ class sd {
|
|
|
9515
9535
|
}
|
|
9516
9536
|
(p = this.tippy) === null || p === void 0 || p.setProps({
|
|
9517
9537
|
getReferenceClientRect: ((d = this.tippyOptions) === null || d === void 0 ? void 0 : d.getReferenceClientRect) || (() => {
|
|
9518
|
-
if (_c(
|
|
9538
|
+
if (_c(g.selection)) {
|
|
9519
9539
|
let x = a.nodeDOM(T);
|
|
9520
9540
|
if (x) {
|
|
9521
9541
|
const N = x.dataset.nodeViewWrapper ? x : x.querySelector("[data-node-view-wrapper]");
|
|
@@ -9530,7 +9550,7 @@ class sd {
|
|
|
9530
9550
|
}
|
|
9531
9551
|
createTooltip() {
|
|
9532
9552
|
const { element: e } = this.editor.options, t = !!e.parentElement;
|
|
9533
|
-
this.tippy || !t
|
|
9553
|
+
this.element.tabIndex = 0, !(this.tippy || !t) && (this.tippy = ln(e, {
|
|
9534
9554
|
duration: 0,
|
|
9535
9555
|
getReferenceClientRect: null,
|
|
9536
9556
|
content: this.element,
|
|
@@ -9643,7 +9663,7 @@ const md = ce.create({
|
|
|
9643
9663
|
})
|
|
9644
9664
|
];
|
|
9645
9665
|
}
|
|
9646
|
-
}), cd = /(?:^|\s)(==(?!\s+==)((?:[^=]+))==(?!\s+==))$/, ud = /(?:^|\s)(==(?!\s+==)((?:[^=]+))==(?!\s+==))/g, fd =
|
|
9666
|
+
}), cd = /(?:^|\s)(==(?!\s+==)((?:[^=]+))==(?!\s+==))$/, ud = /(?:^|\s)(==(?!\s+==)((?:[^=]+))==(?!\s+==))/g, fd = Qt.create({
|
|
9647
9667
|
name: "highlight",
|
|
9648
9668
|
addOptions() {
|
|
9649
9669
|
return {
|