@ahzoo/sus 3.0.0 → 3.0.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/index.d.ts +117 -10
- package/dist/index.js +838 -834
- package/dist/index.umd.cjs +4 -4
- package/dist/style.css +1 -1
- package/dist/types/comment.d.ts +10 -9
- package/dist/types/list.d.ts +21 -1
- package/package.json +1 -1
package/dist/index.js
CHANGED
|
@@ -1,11 +1,11 @@
|
|
|
1
|
-
import { ref as
|
|
1
|
+
import { ref as Pe, defineComponent as Ke, provide as aa, markRaw as Yc, reactive as yo, h as Ft, render as ca, shallowRef as Qh, onMounted as nr, onBeforeUnmount as ds, getCurrentInstance as Zh, watchEffect as ep, nextTick as tp, unref as Be, customRef as np, createBlock as xr, openBlock as J, Transition as rp, withCtx as Qt, createElementBlock as Q, createCommentVNode as de, Fragment as Br, renderList as fs, createElementVNode as E, Teleport as Xc, withDirectives as _e, withModifiers as bo, withKeys as ip, vModelText as di, createStaticVNode as fi, vShow as rt, computed as ua, onUnmounted as sp, normalizeClass as wo, toDisplayString as Je, createTextVNode as Sr, createVNode as ut } from "vue";
|
|
2
2
|
import { OuOToolTip as Gr, OuOCheckBox as op } from "@ahzoo/ouo";
|
|
3
3
|
import { createLowlight as lp } from "lowlight";
|
|
4
|
-
function
|
|
4
|
+
function Re(n) {
|
|
5
5
|
this.content = n;
|
|
6
6
|
}
|
|
7
|
-
|
|
8
|
-
constructor:
|
|
7
|
+
Re.prototype = {
|
|
8
|
+
constructor: Re,
|
|
9
9
|
find: function(n) {
|
|
10
10
|
for (var e = 0; e < this.content.length; e += 2)
|
|
11
11
|
if (this.content[e] === n) return e;
|
|
@@ -24,7 +24,7 @@ De.prototype = {
|
|
|
24
24
|
// given, the key of the binding will be replaced with that key.
|
|
25
25
|
update: function(n, e, t) {
|
|
26
26
|
var r = t && t != n ? this.remove(t) : this, i = r.find(n), s = r.content.slice();
|
|
27
|
-
return i == -1 ? s.push(t || n, e) : (s[i + 1] = e, t && (s[i] = t)), new
|
|
27
|
+
return i == -1 ? s.push(t || n, e) : (s[i + 1] = e, t && (s[i] = t)), new Re(s);
|
|
28
28
|
},
|
|
29
29
|
// :: (string) → OrderedMap
|
|
30
30
|
// Return a map with the given key removed, if it existed.
|
|
@@ -32,25 +32,25 @@ De.prototype = {
|
|
|
32
32
|
var e = this.find(n);
|
|
33
33
|
if (e == -1) return this;
|
|
34
34
|
var t = this.content.slice();
|
|
35
|
-
return t.splice(e, 2), new
|
|
35
|
+
return t.splice(e, 2), new Re(t);
|
|
36
36
|
},
|
|
37
37
|
// :: (string, any) → OrderedMap
|
|
38
38
|
// Add a new key to the start of the map.
|
|
39
39
|
addToStart: function(n, e) {
|
|
40
|
-
return new
|
|
40
|
+
return new Re([n, e].concat(this.remove(n).content));
|
|
41
41
|
},
|
|
42
42
|
// :: (string, any) → OrderedMap
|
|
43
43
|
// Add a new key to the end of the map.
|
|
44
44
|
addToEnd: function(n, e) {
|
|
45
45
|
var t = this.remove(n).content.slice();
|
|
46
|
-
return t.push(n, e), new
|
|
46
|
+
return t.push(n, e), new Re(t);
|
|
47
47
|
},
|
|
48
48
|
// :: (string, string, any) → OrderedMap
|
|
49
49
|
// Add a key after the given key. If `place` is not found, the new
|
|
50
50
|
// key is added to the end.
|
|
51
51
|
addBefore: function(n, e, t) {
|
|
52
52
|
var r = this.remove(e), i = r.content.slice(), s = r.find(n);
|
|
53
|
-
return i.splice(s == -1 ? i.length : s, 0, e, t), new
|
|
53
|
+
return i.splice(s == -1 ? i.length : s, 0, e, t), new Re(i);
|
|
54
54
|
},
|
|
55
55
|
// :: ((key: string, value: any))
|
|
56
56
|
// Call the given function for each key/value pair in the map, in
|
|
@@ -63,20 +63,20 @@ De.prototype = {
|
|
|
63
63
|
// Create a new map by prepending the keys in this map that don't
|
|
64
64
|
// appear in `map` before the keys in `map`.
|
|
65
65
|
prepend: function(n) {
|
|
66
|
-
return n =
|
|
66
|
+
return n = Re.from(n), n.size ? new Re(n.content.concat(this.subtract(n).content)) : this;
|
|
67
67
|
},
|
|
68
68
|
// :: (union<Object, OrderedMap>) → OrderedMap
|
|
69
69
|
// Create a new map by appending the keys in this map that don't
|
|
70
70
|
// appear in `map` after the keys in `map`.
|
|
71
71
|
append: function(n) {
|
|
72
|
-
return n =
|
|
72
|
+
return n = Re.from(n), n.size ? new Re(this.subtract(n).content.concat(n.content)) : this;
|
|
73
73
|
},
|
|
74
74
|
// :: (union<Object, OrderedMap>) → OrderedMap
|
|
75
75
|
// Create a map containing all the keys in this map that don't
|
|
76
76
|
// appear in `map`.
|
|
77
77
|
subtract: function(n) {
|
|
78
78
|
var e = this;
|
|
79
|
-
n =
|
|
79
|
+
n = Re.from(n);
|
|
80
80
|
for (var t = 0; t < n.content.length; t += 2)
|
|
81
81
|
e = e.remove(n.content[t]);
|
|
82
82
|
return e;
|
|
@@ -95,11 +95,11 @@ De.prototype = {
|
|
|
95
95
|
return this.content.length >> 1;
|
|
96
96
|
}
|
|
97
97
|
};
|
|
98
|
-
|
|
99
|
-
if (n instanceof
|
|
98
|
+
Re.from = function(n) {
|
|
99
|
+
if (n instanceof Re) return n;
|
|
100
100
|
var e = [];
|
|
101
101
|
if (n) for (var t in n) e.push(t, n[t]);
|
|
102
|
-
return new
|
|
102
|
+
return new Re(e);
|
|
103
103
|
};
|
|
104
104
|
function Qc(n, e, t) {
|
|
105
105
|
for (let r = 0; ; r++) {
|
|
@@ -150,7 +150,7 @@ function Zc(n, e, t, r) {
|
|
|
150
150
|
t -= a, r -= a;
|
|
151
151
|
}
|
|
152
152
|
}
|
|
153
|
-
class
|
|
153
|
+
class v {
|
|
154
154
|
/**
|
|
155
155
|
@internal
|
|
156
156
|
*/
|
|
@@ -205,7 +205,7 @@ class x {
|
|
|
205
205
|
let t = this.lastChild, r = e.firstChild, i = this.content.slice(), s = 0;
|
|
206
206
|
for (t.isText && t.sameMarkup(r) && (i[i.length - 1] = t.withText(t.text + r.text), s = 1); s < e.content.length; s++)
|
|
207
207
|
i.push(e.content[s]);
|
|
208
|
-
return new
|
|
208
|
+
return new v(i, this.size + e.size);
|
|
209
209
|
}
|
|
210
210
|
/**
|
|
211
211
|
Cut out the sub-fragment between the two given positions.
|
|
@@ -219,13 +219,13 @@ class x {
|
|
|
219
219
|
let l = this.content[s], a = o + l.nodeSize;
|
|
220
220
|
a > e && ((o < e || a > t) && (l.isText ? l = l.cut(Math.max(0, e - o), Math.min(l.text.length, t - o)) : l = l.cut(Math.max(0, e - o - 1), Math.min(l.content.size, t - o - 1))), r.push(l), i += l.nodeSize), o = a;
|
|
221
221
|
}
|
|
222
|
-
return new
|
|
222
|
+
return new v(r, i);
|
|
223
223
|
}
|
|
224
224
|
/**
|
|
225
225
|
@internal
|
|
226
226
|
*/
|
|
227
227
|
cutByIndex(e, t) {
|
|
228
|
-
return e == t ?
|
|
228
|
+
return e == t ? v.empty : e == 0 && t == this.content.length ? this : new v(this.content.slice(e, t));
|
|
229
229
|
}
|
|
230
230
|
/**
|
|
231
231
|
Create a new fragment in which the node at the given index is
|
|
@@ -236,21 +236,21 @@ class x {
|
|
|
236
236
|
if (r == t)
|
|
237
237
|
return this;
|
|
238
238
|
let i = this.content.slice(), s = this.size + t.nodeSize - r.nodeSize;
|
|
239
|
-
return i[e] = t, new
|
|
239
|
+
return i[e] = t, new v(i, s);
|
|
240
240
|
}
|
|
241
241
|
/**
|
|
242
242
|
Create a new fragment by prepending the given node to this
|
|
243
243
|
fragment.
|
|
244
244
|
*/
|
|
245
245
|
addToStart(e) {
|
|
246
|
-
return new
|
|
246
|
+
return new v([e].concat(this.content), this.size + e.nodeSize);
|
|
247
247
|
}
|
|
248
248
|
/**
|
|
249
249
|
Create a new fragment by appending the given node to this
|
|
250
250
|
fragment.
|
|
251
251
|
*/
|
|
252
252
|
addToEnd(e) {
|
|
253
|
-
return new
|
|
253
|
+
return new v(this.content.concat(e), this.size + e.nodeSize);
|
|
254
254
|
}
|
|
255
255
|
/**
|
|
256
256
|
Compare this fragment to another one.
|
|
@@ -365,10 +365,10 @@ class x {
|
|
|
365
365
|
*/
|
|
366
366
|
static fromJSON(e, t) {
|
|
367
367
|
if (!t)
|
|
368
|
-
return
|
|
368
|
+
return v.empty;
|
|
369
369
|
if (!Array.isArray(t))
|
|
370
370
|
throw new RangeError("Invalid input for Fragment.fromJSON");
|
|
371
|
-
return new
|
|
371
|
+
return new v(t.map(e.nodeFromJSON));
|
|
372
372
|
}
|
|
373
373
|
/**
|
|
374
374
|
Build a fragment from an array of nodes. Ensures that adjacent
|
|
@@ -376,13 +376,13 @@ class x {
|
|
|
376
376
|
*/
|
|
377
377
|
static fromArray(e) {
|
|
378
378
|
if (!e.length)
|
|
379
|
-
return
|
|
379
|
+
return v.empty;
|
|
380
380
|
let t, r = 0;
|
|
381
381
|
for (let i = 0; i < e.length; i++) {
|
|
382
382
|
let s = e[i];
|
|
383
383
|
r += s.nodeSize, i && s.isText && e[i - 1].sameMarkup(s) ? (t || (t = e.slice(0, i)), t[t.length - 1] = s.withText(t[t.length - 1].text + s.text)) : t && t.push(s);
|
|
384
384
|
}
|
|
385
|
-
return new
|
|
385
|
+
return new v(t || e, r);
|
|
386
386
|
}
|
|
387
387
|
/**
|
|
388
388
|
Create a fragment from something that can be interpreted as a
|
|
@@ -392,17 +392,17 @@ class x {
|
|
|
392
392
|
*/
|
|
393
393
|
static from(e) {
|
|
394
394
|
if (!e)
|
|
395
|
-
return
|
|
396
|
-
if (e instanceof
|
|
395
|
+
return v.empty;
|
|
396
|
+
if (e instanceof v)
|
|
397
397
|
return e;
|
|
398
398
|
if (Array.isArray(e))
|
|
399
399
|
return this.fromArray(e);
|
|
400
400
|
if (e.attrs)
|
|
401
|
-
return new
|
|
401
|
+
return new v([e], e.nodeSize);
|
|
402
402
|
throw new RangeError("Can not convert " + e + " to a Fragment" + (e.nodesBetween ? " (looks like multiple versions of prosemirror-model were loaded)" : ""));
|
|
403
403
|
}
|
|
404
404
|
}
|
|
405
|
-
|
|
405
|
+
v.empty = new v([], 0);
|
|
406
406
|
const Fs = { index: 0, offset: 0 };
|
|
407
407
|
function Yr(n, e) {
|
|
408
408
|
return Fs.index = n, Fs.offset = e, Fs;
|
|
@@ -604,7 +604,7 @@ class A {
|
|
|
604
604
|
let r = t.openStart || 0, i = t.openEnd || 0;
|
|
605
605
|
if (typeof r != "number" || typeof i != "number")
|
|
606
606
|
throw new RangeError("Invalid input for Slice.fromJSON");
|
|
607
|
-
return new A(
|
|
607
|
+
return new A(v.fromJSON(e, t.content), r, i);
|
|
608
608
|
}
|
|
609
609
|
/**
|
|
610
610
|
Create a slice from a fragment by taking the maximum possible
|
|
@@ -619,7 +619,7 @@ class A {
|
|
|
619
619
|
return new A(e, r, i);
|
|
620
620
|
}
|
|
621
621
|
}
|
|
622
|
-
A.empty = new A(
|
|
622
|
+
A.empty = new A(v.empty, 0, 0);
|
|
623
623
|
function eu(n, e, t) {
|
|
624
624
|
let { index: r, offset: i } = n.findIndex(e), s = n.maybeChild(r), { index: o, offset: l } = n.findIndex(t);
|
|
625
625
|
if (i == e || s.isText) {
|
|
@@ -658,13 +658,13 @@ function nu(n, e, t, r) {
|
|
|
658
658
|
let { start: o, end: l } = cp(t, n);
|
|
659
659
|
return Cn(s, iu(n, o, l, e, r));
|
|
660
660
|
}
|
|
661
|
-
else return Cn(s,
|
|
661
|
+
else return Cn(s, vi(n, e, r));
|
|
662
662
|
}
|
|
663
663
|
function ru(n, e) {
|
|
664
664
|
if (!e.type.compatibleContent(n.type))
|
|
665
665
|
throw new ki("Cannot join " + e.type.name + " onto " + n.type.name);
|
|
666
666
|
}
|
|
667
|
-
function
|
|
667
|
+
function vo(n, e, t) {
|
|
668
668
|
let r = n.node(t);
|
|
669
669
|
return ru(r, e.node(t)), r;
|
|
670
670
|
}
|
|
@@ -683,21 +683,21 @@ function Cn(n, e) {
|
|
|
683
683
|
return n.type.checkContent(e), n.copy(e);
|
|
684
684
|
}
|
|
685
685
|
function iu(n, e, t, r, i) {
|
|
686
|
-
let s = n.depth > i &&
|
|
687
|
-
return fr(null, n, i, l), s && o && e.index(i) == t.index(i) ? (ru(s, o), Sn(Cn(s, iu(n, e, t, r, i + 1)), l)) : (s && Sn(Cn(s,
|
|
686
|
+
let s = n.depth > i && vo(n, e, i + 1), o = r.depth > i && vo(t, r, i + 1), l = [];
|
|
687
|
+
return fr(null, n, i, l), s && o && e.index(i) == t.index(i) ? (ru(s, o), Sn(Cn(s, iu(n, e, t, r, i + 1)), l)) : (s && Sn(Cn(s, vi(n, e, i + 1)), l), fr(e, t, i, l), o && Sn(Cn(o, vi(t, r, i + 1)), l)), fr(r, null, i, l), new v(l);
|
|
688
688
|
}
|
|
689
|
-
function
|
|
689
|
+
function vi(n, e, t) {
|
|
690
690
|
let r = [];
|
|
691
691
|
if (fr(null, n, t, r), n.depth > t) {
|
|
692
|
-
let i =
|
|
693
|
-
Sn(Cn(i,
|
|
692
|
+
let i = vo(n, e, t + 1);
|
|
693
|
+
Sn(Cn(i, vi(n, e, t + 1)), r);
|
|
694
694
|
}
|
|
695
|
-
return fr(e, null, t, r), new
|
|
695
|
+
return fr(e, null, t, r), new v(r);
|
|
696
696
|
}
|
|
697
697
|
function cp(n, e) {
|
|
698
698
|
let t = e.depth - n.openStart, i = e.node(t).copy(n.content);
|
|
699
699
|
for (let s = t - 1; s >= 0; s--)
|
|
700
|
-
i = e.node(s).copy(
|
|
700
|
+
i = e.node(s).copy(v.from(i));
|
|
701
701
|
return {
|
|
702
702
|
start: i.resolveNoCache(n.openStart + t),
|
|
703
703
|
end: i.resolveNoCache(i.content.size - n.openEnd - t)
|
|
@@ -888,7 +888,7 @@ class Cr {
|
|
|
888
888
|
return e.blockRange(this);
|
|
889
889
|
for (let r = this.depth - (this.parent.inlineContent || this.pos == e.pos ? 1 : 0); r >= 0; r--)
|
|
890
890
|
if (e.pos <= this.end(r) && (!t || t(this.node(r))))
|
|
891
|
-
return new
|
|
891
|
+
return new xi(this, e, r);
|
|
892
892
|
return null;
|
|
893
893
|
}
|
|
894
894
|
/**
|
|
@@ -956,7 +956,7 @@ class up {
|
|
|
956
956
|
}
|
|
957
957
|
}
|
|
958
958
|
const dp = 12, da = /* @__PURE__ */ new WeakMap();
|
|
959
|
-
class
|
|
959
|
+
class xi {
|
|
960
960
|
/**
|
|
961
961
|
Construct a node range. `$from` and `$to` should point into the
|
|
962
962
|
same node until at least the given `depth`, since a node range
|
|
@@ -997,12 +997,12 @@ class vi {
|
|
|
997
997
|
}
|
|
998
998
|
}
|
|
999
999
|
const fp = /* @__PURE__ */ Object.create(null);
|
|
1000
|
-
let sn = class
|
|
1000
|
+
let sn = class xo {
|
|
1001
1001
|
/**
|
|
1002
1002
|
@internal
|
|
1003
1003
|
*/
|
|
1004
1004
|
constructor(e, t, r, i = ie.none) {
|
|
1005
|
-
this.type = e, this.attrs = t, this.marks = i, this.content = r ||
|
|
1005
|
+
this.type = e, this.attrs = t, this.marks = i, this.content = r || v.empty;
|
|
1006
1006
|
}
|
|
1007
1007
|
/**
|
|
1008
1008
|
The array of this node's child nodes.
|
|
@@ -1122,14 +1122,14 @@ let sn = class vo {
|
|
|
1122
1122
|
the given content (or empty, if no content is given).
|
|
1123
1123
|
*/
|
|
1124
1124
|
copy(e = null) {
|
|
1125
|
-
return e == this.content ? this : new
|
|
1125
|
+
return e == this.content ? this : new xo(this.type, this.attrs, e, this.marks);
|
|
1126
1126
|
}
|
|
1127
1127
|
/**
|
|
1128
1128
|
Create a copy of this node, with the given set of marks instead
|
|
1129
1129
|
of the node's own marks.
|
|
1130
1130
|
*/
|
|
1131
1131
|
mark(e) {
|
|
1132
|
-
return e == this.marks ? this : new
|
|
1132
|
+
return e == this.marks ? this : new xo(this.type, this.attrs, this.content, e);
|
|
1133
1133
|
}
|
|
1134
1134
|
/**
|
|
1135
1135
|
Create a copy of this node with only the content between the
|
|
@@ -1291,7 +1291,7 @@ let sn = class vo {
|
|
|
1291
1291
|
can optionally pass `start` and `end` indices into the
|
|
1292
1292
|
replacement fragment.
|
|
1293
1293
|
*/
|
|
1294
|
-
canReplace(e, t, r =
|
|
1294
|
+
canReplace(e, t, r = v.empty, i = 0, s = r.childCount) {
|
|
1295
1295
|
let o = this.contentMatchAt(e).matchFragment(r, i, s), l = o && o.matchFragment(this.content, t);
|
|
1296
1296
|
if (!l || !l.validEnd)
|
|
1297
1297
|
return !1;
|
|
@@ -1362,7 +1362,7 @@ let sn = class vo {
|
|
|
1362
1362
|
throw new RangeError("Invalid text node in JSON");
|
|
1363
1363
|
return e.text(t.text, r);
|
|
1364
1364
|
}
|
|
1365
|
-
let i =
|
|
1365
|
+
let i = v.fromJSON(e, t.content), s = e.nodeType(t.type).create(t.attrs, i, r);
|
|
1366
1366
|
return s.type.checkAttrs(s.attrs), s;
|
|
1367
1367
|
}
|
|
1368
1368
|
};
|
|
@@ -1427,7 +1427,7 @@ class On {
|
|
|
1427
1427
|
let i = ou(r);
|
|
1428
1428
|
r.next && r.err("Unexpected trailing text");
|
|
1429
1429
|
let s = kp(wp(i));
|
|
1430
|
-
return
|
|
1430
|
+
return vp(s, r), s;
|
|
1431
1431
|
}
|
|
1432
1432
|
/**
|
|
1433
1433
|
Match a node type, returning a match after that node if
|
|
@@ -1490,7 +1490,7 @@ class On {
|
|
|
1490
1490
|
function s(o, l) {
|
|
1491
1491
|
let a = o.matchFragment(e, r);
|
|
1492
1492
|
if (a && (!t || a.validEnd))
|
|
1493
|
-
return
|
|
1493
|
+
return v.from(l.map((c) => c.createAndFill()));
|
|
1494
1494
|
for (let c = 0; c < o.next.length; c++) {
|
|
1495
1495
|
let { type: u, next: d } = o.next[c];
|
|
1496
1496
|
if (!(u.isText || u.hasRequiredAttrs()) && i.indexOf(d) == -1) {
|
|
@@ -1743,7 +1743,7 @@ function kp(n) {
|
|
|
1743
1743
|
return s;
|
|
1744
1744
|
}
|
|
1745
1745
|
}
|
|
1746
|
-
function
|
|
1746
|
+
function vp(n, e) {
|
|
1747
1747
|
for (let t = 0, r = [n]; t < r.length; t++) {
|
|
1748
1748
|
let i = r[t], s = !i.validEnd, o = [];
|
|
1749
1749
|
for (let l = 0; l < i.next.length; l++) {
|
|
@@ -1873,7 +1873,7 @@ let pa = class fu {
|
|
|
1873
1873
|
create(e = null, t, r) {
|
|
1874
1874
|
if (this.isText)
|
|
1875
1875
|
throw new Error("NodeType.create can't construct text nodes");
|
|
1876
|
-
return new sn(this, this.computeAttrs(e),
|
|
1876
|
+
return new sn(this, this.computeAttrs(e), v.from(t), ie.setFrom(r));
|
|
1877
1877
|
}
|
|
1878
1878
|
/**
|
|
1879
1879
|
Like [`create`](https://prosemirror.net/docs/ref/#model.NodeType.create), but check the given content
|
|
@@ -1881,7 +1881,7 @@ let pa = class fu {
|
|
|
1881
1881
|
if it doesn't match.
|
|
1882
1882
|
*/
|
|
1883
1883
|
createChecked(e = null, t, r) {
|
|
1884
|
-
return t =
|
|
1884
|
+
return t = v.from(t), this.checkContent(t), new sn(this, this.computeAttrs(e), t, ie.setFrom(r));
|
|
1885
1885
|
}
|
|
1886
1886
|
/**
|
|
1887
1887
|
Like [`create`](https://prosemirror.net/docs/ref/#model.NodeType.create), but see if it is
|
|
@@ -1892,13 +1892,13 @@ let pa = class fu {
|
|
|
1892
1892
|
`Fragment.empty` as content.
|
|
1893
1893
|
*/
|
|
1894
1894
|
createAndFill(e = null, t, r) {
|
|
1895
|
-
if (e = this.computeAttrs(e), t =
|
|
1895
|
+
if (e = this.computeAttrs(e), t = v.from(t), t.size) {
|
|
1896
1896
|
let o = this.contentMatch.fillBefore(t);
|
|
1897
1897
|
if (!o)
|
|
1898
1898
|
return null;
|
|
1899
1899
|
t = o.append(t);
|
|
1900
1900
|
}
|
|
1901
|
-
let i = this.contentMatch.matchFragment(t), s = i && i.fillBefore(
|
|
1901
|
+
let i = this.contentMatch.matchFragment(t), s = i && i.fillBefore(v.empty, !0);
|
|
1902
1902
|
return s ? new sn(this, e, t.append(s), ie.setFrom(r)) : null;
|
|
1903
1903
|
}
|
|
1904
1904
|
/**
|
|
@@ -1973,7 +1973,7 @@ let pa = class fu {
|
|
|
1973
1973
|
return r;
|
|
1974
1974
|
}
|
|
1975
1975
|
};
|
|
1976
|
-
function
|
|
1976
|
+
function xp(n, e, t) {
|
|
1977
1977
|
let r = t.split("|");
|
|
1978
1978
|
return (i) => {
|
|
1979
1979
|
let s = i === null ? "null" : typeof i;
|
|
@@ -1983,7 +1983,7 @@ function vp(n, e, t) {
|
|
|
1983
1983
|
}
|
|
1984
1984
|
class Sp {
|
|
1985
1985
|
constructor(e, t, r) {
|
|
1986
|
-
this.hasDefault = Object.prototype.hasOwnProperty.call(r, "default"), this.default = r.default, this.validate = typeof r.validate == "string" ?
|
|
1986
|
+
this.hasDefault = Object.prototype.hasOwnProperty.call(r, "default"), this.default = r.default, this.validate = typeof r.validate == "string" ? xp(e, t, r.validate) : r.validate;
|
|
1987
1987
|
}
|
|
1988
1988
|
get isRequired() {
|
|
1989
1989
|
return !this.hasDefault;
|
|
@@ -2053,7 +2053,7 @@ class hu {
|
|
|
2053
2053
|
let t = this.spec = {};
|
|
2054
2054
|
for (let i in e)
|
|
2055
2055
|
t[i] = e[i];
|
|
2056
|
-
t.nodes =
|
|
2056
|
+
t.nodes = Re.from(e.nodes), t.marks = Re.from(e.marks || {}), this.nodes = pa.compile(this.spec.nodes, this), this.marks = hs.compile(this.spec.marks, this);
|
|
2057
2057
|
let r = /* @__PURE__ */ Object.create(null);
|
|
2058
2058
|
for (let i in this.nodes) {
|
|
2059
2059
|
if (i in this.marks)
|
|
@@ -2302,7 +2302,7 @@ class Xr {
|
|
|
2302
2302
|
if (!this.match) {
|
|
2303
2303
|
if (!this.type)
|
|
2304
2304
|
return [];
|
|
2305
|
-
let t = this.type.contentMatch.fillBefore(
|
|
2305
|
+
let t = this.type.contentMatch.fillBefore(v.from(e));
|
|
2306
2306
|
if (t)
|
|
2307
2307
|
this.match = this.type.contentMatch.matchFragment(t);
|
|
2308
2308
|
else {
|
|
@@ -2320,8 +2320,8 @@ class Xr {
|
|
|
2320
2320
|
r.text.length == i[0].length ? this.content.pop() : this.content[this.content.length - 1] = s.withText(s.text.slice(0, s.text.length - i[0].length));
|
|
2321
2321
|
}
|
|
2322
2322
|
}
|
|
2323
|
-
let t =
|
|
2324
|
-
return !e && this.match && (t = t.append(this.match.fillBefore(
|
|
2323
|
+
let t = v.from(this.content);
|
|
2324
|
+
return !e && this.match && (t = t.append(this.match.fillBefore(v.empty, !0))), this.type ? this.type.create(this.attrs, t, this.marks) : t;
|
|
2325
2325
|
}
|
|
2326
2326
|
inlineContext(e) {
|
|
2327
2327
|
return this.type ? this.type.inlineContent : this.content.length ? this.content[0].isInline : e.parentNode && !pu.hasOwnProperty(e.parentNode.nodeName.toLowerCase());
|
|
@@ -2749,10 +2749,10 @@ function ka(n) {
|
|
|
2749
2749
|
function Vs(n) {
|
|
2750
2750
|
return n.document || window.document;
|
|
2751
2751
|
}
|
|
2752
|
-
const
|
|
2752
|
+
const va = /* @__PURE__ */ new WeakMap();
|
|
2753
2753
|
function Ap(n) {
|
|
2754
|
-
let e =
|
|
2755
|
-
return e === void 0 &&
|
|
2754
|
+
let e = va.get(n);
|
|
2755
|
+
return e === void 0 && va.set(n, e = Np(n)), e;
|
|
2756
2756
|
}
|
|
2757
2757
|
function Np(n) {
|
|
2758
2758
|
let e = null;
|
|
@@ -2814,7 +2814,7 @@ const gu = 65535, yu = Math.pow(2, 16);
|
|
|
2814
2814
|
function Rp(n, e) {
|
|
2815
2815
|
return n + e * yu;
|
|
2816
2816
|
}
|
|
2817
|
-
function
|
|
2817
|
+
function xa(n) {
|
|
2818
2818
|
return n & gu;
|
|
2819
2819
|
}
|
|
2820
2820
|
function Dp(n) {
|
|
@@ -2857,21 +2857,21 @@ class Co {
|
|
|
2857
2857
|
return (this.delInfo & pi) > 0;
|
|
2858
2858
|
}
|
|
2859
2859
|
}
|
|
2860
|
-
class
|
|
2860
|
+
class Qe {
|
|
2861
2861
|
/**
|
|
2862
2862
|
Create a position map. The modifications to the document are
|
|
2863
2863
|
represented as an array of numbers, in which each group of three
|
|
2864
2864
|
represents a modified chunk as `[start, oldSize, newSize]`.
|
|
2865
2865
|
*/
|
|
2866
2866
|
constructor(e, t = !1) {
|
|
2867
|
-
if (this.ranges = e, this.inverted = t, !e.length &&
|
|
2868
|
-
return
|
|
2867
|
+
if (this.ranges = e, this.inverted = t, !e.length && Qe.empty)
|
|
2868
|
+
return Qe.empty;
|
|
2869
2869
|
}
|
|
2870
2870
|
/**
|
|
2871
2871
|
@internal
|
|
2872
2872
|
*/
|
|
2873
2873
|
recover(e) {
|
|
2874
|
-
let t = 0, r =
|
|
2874
|
+
let t = 0, r = xa(e);
|
|
2875
2875
|
if (!this.inverted)
|
|
2876
2876
|
for (let i = 0; i < r; i++)
|
|
2877
2877
|
t += this.ranges[i * 3 + 2] - this.ranges[i * 3 + 1];
|
|
@@ -2908,7 +2908,7 @@ class Ze {
|
|
|
2908
2908
|
@internal
|
|
2909
2909
|
*/
|
|
2910
2910
|
touches(e, t) {
|
|
2911
|
-
let r = 0, i =
|
|
2911
|
+
let r = 0, i = xa(t), s = this.inverted ? 2 : 1, o = this.inverted ? 1 : 2;
|
|
2912
2912
|
for (let l = 0; l < this.ranges.length; l += 3) {
|
|
2913
2913
|
let a = this.ranges[l] - (this.inverted ? r : 0);
|
|
2914
2914
|
if (a > e)
|
|
@@ -2936,7 +2936,7 @@ class Ze {
|
|
|
2936
2936
|
map positions in the post-step document to the pre-step document.
|
|
2937
2937
|
*/
|
|
2938
2938
|
invert() {
|
|
2939
|
-
return new
|
|
2939
|
+
return new Qe(this.ranges, !this.inverted);
|
|
2940
2940
|
}
|
|
2941
2941
|
/**
|
|
2942
2942
|
@internal
|
|
@@ -2950,10 +2950,10 @@ class Ze {
|
|
|
2950
2950
|
sub-document to a larger document, or vice-versa.
|
|
2951
2951
|
*/
|
|
2952
2952
|
static offset(e) {
|
|
2953
|
-
return e == 0 ?
|
|
2953
|
+
return e == 0 ? Qe.empty : new Qe(e < 0 ? [0, -e, 0] : [0, 0, e]);
|
|
2954
2954
|
}
|
|
2955
2955
|
}
|
|
2956
|
-
|
|
2956
|
+
Qe.empty = new Qe([]);
|
|
2957
2957
|
class Er {
|
|
2958
2958
|
/**
|
|
2959
2959
|
Create a new mapping with the given position maps.
|
|
@@ -3069,7 +3069,7 @@ class Fe {
|
|
|
3069
3069
|
and the new document.
|
|
3070
3070
|
*/
|
|
3071
3071
|
getMap() {
|
|
3072
|
-
return
|
|
3072
|
+
return Qe.empty;
|
|
3073
3073
|
}
|
|
3074
3074
|
/**
|
|
3075
3075
|
Try to merge this step with another one, to be applied directly
|
|
@@ -3103,7 +3103,7 @@ class Fe {
|
|
|
3103
3103
|
return js[e] = t, t.prototype.jsonID = e, t;
|
|
3104
3104
|
}
|
|
3105
3105
|
}
|
|
3106
|
-
class
|
|
3106
|
+
class ve {
|
|
3107
3107
|
/**
|
|
3108
3108
|
@internal
|
|
3109
3109
|
*/
|
|
@@ -3114,13 +3114,13 @@ class xe {
|
|
|
3114
3114
|
Create a successful step result.
|
|
3115
3115
|
*/
|
|
3116
3116
|
static ok(e) {
|
|
3117
|
-
return new
|
|
3117
|
+
return new ve(e, null);
|
|
3118
3118
|
}
|
|
3119
3119
|
/**
|
|
3120
3120
|
Create a failed step result.
|
|
3121
3121
|
*/
|
|
3122
3122
|
static fail(e) {
|
|
3123
|
-
return new
|
|
3123
|
+
return new ve(null, e);
|
|
3124
3124
|
}
|
|
3125
3125
|
/**
|
|
3126
3126
|
Call [`Node.replace`](https://prosemirror.net/docs/ref/#model.Node.replace) with the given
|
|
@@ -3129,10 +3129,10 @@ class xe {
|
|
|
3129
3129
|
*/
|
|
3130
3130
|
static fromReplace(e, t, r, i) {
|
|
3131
3131
|
try {
|
|
3132
|
-
return
|
|
3132
|
+
return ve.ok(e.replace(t, r, i));
|
|
3133
3133
|
} catch (s) {
|
|
3134
3134
|
if (s instanceof ki)
|
|
3135
|
-
return
|
|
3135
|
+
return ve.fail(s.message);
|
|
3136
3136
|
throw s;
|
|
3137
3137
|
}
|
|
3138
3138
|
}
|
|
@@ -3143,7 +3143,7 @@ function el(n, e, t) {
|
|
|
3143
3143
|
let s = n.child(i);
|
|
3144
3144
|
s.content.size && (s = s.copy(el(s.content, e, s))), s.isInline && (s = e(s, t, i)), r.push(s);
|
|
3145
3145
|
}
|
|
3146
|
-
return
|
|
3146
|
+
return v.fromArray(r);
|
|
3147
3147
|
}
|
|
3148
3148
|
class tn extends Fe {
|
|
3149
3149
|
/**
|
|
@@ -3154,7 +3154,7 @@ class tn extends Fe {
|
|
|
3154
3154
|
}
|
|
3155
3155
|
apply(e) {
|
|
3156
3156
|
let t = e.slice(this.from, this.to), r = e.resolve(this.from), i = r.node(r.sharedDepth(this.to)), s = new A(el(t.content, (o, l) => !o.isAtom || !l.type.allowsMarkType(this.mark.type) ? o : o.mark(this.mark.addToSet(o.marks)), i), t.openStart, t.openEnd);
|
|
3157
|
-
return
|
|
3157
|
+
return ve.fromReplace(e, this.from, this.to, s);
|
|
3158
3158
|
}
|
|
3159
3159
|
invert() {
|
|
3160
3160
|
return new ft(this.from, this.to, this.mark);
|
|
@@ -3193,7 +3193,7 @@ class ft extends Fe {
|
|
|
3193
3193
|
}
|
|
3194
3194
|
apply(e) {
|
|
3195
3195
|
let t = e.slice(this.from, this.to), r = new A(el(t.content, (i) => i.mark(this.mark.removeFromSet(i.marks)), e), t.openStart, t.openEnd);
|
|
3196
|
-
return
|
|
3196
|
+
return ve.fromReplace(e, this.from, this.to, r);
|
|
3197
3197
|
}
|
|
3198
3198
|
invert() {
|
|
3199
3199
|
return new tn(this.from, this.to, this.mark);
|
|
@@ -3233,9 +3233,9 @@ class nn extends Fe {
|
|
|
3233
3233
|
apply(e) {
|
|
3234
3234
|
let t = e.nodeAt(this.pos);
|
|
3235
3235
|
if (!t)
|
|
3236
|
-
return
|
|
3236
|
+
return ve.fail("No node at mark step's position");
|
|
3237
3237
|
let r = t.type.create(t.attrs, null, this.mark.addToSet(t.marks));
|
|
3238
|
-
return
|
|
3238
|
+
return ve.fromReplace(e, this.pos, this.pos + 1, new A(v.from(r), 0, t.isLeaf ? 0 : 1));
|
|
3239
3239
|
}
|
|
3240
3240
|
invert(e) {
|
|
3241
3241
|
let t = e.nodeAt(this.pos);
|
|
@@ -3277,9 +3277,9 @@ class An extends Fe {
|
|
|
3277
3277
|
apply(e) {
|
|
3278
3278
|
let t = e.nodeAt(this.pos);
|
|
3279
3279
|
if (!t)
|
|
3280
|
-
return
|
|
3280
|
+
return ve.fail("No node at mark step's position");
|
|
3281
3281
|
let r = t.type.create(t.attrs, null, this.mark.removeFromSet(t.marks));
|
|
3282
|
-
return
|
|
3282
|
+
return ve.fromReplace(e, this.pos, this.pos + 1, new A(v.from(r), 0, t.isLeaf ? 0 : 1));
|
|
3283
3283
|
}
|
|
3284
3284
|
invert(e) {
|
|
3285
3285
|
let t = e.nodeAt(this.pos);
|
|
@@ -3302,7 +3302,7 @@ class An extends Fe {
|
|
|
3302
3302
|
}
|
|
3303
3303
|
}
|
|
3304
3304
|
Fe.jsonID("removeNodeMark", An);
|
|
3305
|
-
class
|
|
3305
|
+
class Te extends Fe {
|
|
3306
3306
|
/**
|
|
3307
3307
|
The given `slice` should fit the 'gap' between `from` and
|
|
3308
3308
|
`to`—the depths must line up, and the surrounding nodes must be
|
|
@@ -3316,27 +3316,27 @@ class Oe extends Fe {
|
|
|
3316
3316
|
super(), this.from = e, this.to = t, this.slice = r, this.structure = i;
|
|
3317
3317
|
}
|
|
3318
3318
|
apply(e) {
|
|
3319
|
-
return this.structure && Mo(e, this.from, this.to) ?
|
|
3319
|
+
return this.structure && Mo(e, this.from, this.to) ? ve.fail("Structure replace would overwrite content") : ve.fromReplace(e, this.from, this.to, this.slice);
|
|
3320
3320
|
}
|
|
3321
3321
|
getMap() {
|
|
3322
|
-
return new
|
|
3322
|
+
return new Qe([this.from, this.to - this.from, this.slice.size]);
|
|
3323
3323
|
}
|
|
3324
3324
|
invert(e) {
|
|
3325
|
-
return new
|
|
3325
|
+
return new Te(this.from, this.from + this.slice.size, e.slice(this.from, this.to));
|
|
3326
3326
|
}
|
|
3327
3327
|
map(e) {
|
|
3328
3328
|
let t = e.mapResult(this.from, 1), r = e.mapResult(this.to, -1);
|
|
3329
|
-
return t.deletedAcross && r.deletedAcross ? null : new
|
|
3329
|
+
return t.deletedAcross && r.deletedAcross ? null : new Te(t.pos, Math.max(t.pos, r.pos), this.slice, this.structure);
|
|
3330
3330
|
}
|
|
3331
3331
|
merge(e) {
|
|
3332
|
-
if (!(e instanceof
|
|
3332
|
+
if (!(e instanceof Te) || e.structure || this.structure)
|
|
3333
3333
|
return null;
|
|
3334
3334
|
if (this.from + this.slice.size == e.from && !this.slice.openEnd && !e.slice.openStart) {
|
|
3335
3335
|
let t = this.slice.size + e.slice.size == 0 ? A.empty : new A(this.slice.content.append(e.slice.content), this.slice.openStart, e.slice.openEnd);
|
|
3336
|
-
return new
|
|
3336
|
+
return new Te(this.from, this.to + (e.to - e.from), t, this.structure);
|
|
3337
3337
|
} else if (e.to == this.from && !this.slice.openStart && !e.slice.openEnd) {
|
|
3338
3338
|
let t = this.slice.size + e.slice.size == 0 ? A.empty : new A(e.slice.content.append(this.slice.content), e.slice.openStart, this.slice.openEnd);
|
|
3339
|
-
return new
|
|
3339
|
+
return new Te(e.from, this.to, t, this.structure);
|
|
3340
3340
|
} else
|
|
3341
3341
|
return null;
|
|
3342
3342
|
}
|
|
@@ -3350,11 +3350,11 @@ class Oe extends Fe {
|
|
|
3350
3350
|
static fromJSON(e, t) {
|
|
3351
3351
|
if (typeof t.from != "number" || typeof t.to != "number")
|
|
3352
3352
|
throw new RangeError("Invalid input for ReplaceStep.fromJSON");
|
|
3353
|
-
return new
|
|
3353
|
+
return new Te(t.from, t.to, A.fromJSON(e, t.slice), !!t.structure);
|
|
3354
3354
|
}
|
|
3355
3355
|
}
|
|
3356
|
-
Fe.jsonID("replace",
|
|
3357
|
-
class
|
|
3356
|
+
Fe.jsonID("replace", Te);
|
|
3357
|
+
class Oe extends Fe {
|
|
3358
3358
|
/**
|
|
3359
3359
|
Create a replace-around step with the given range and gap.
|
|
3360
3360
|
`insert` should be the point in the slice into which the content
|
|
@@ -3366,15 +3366,15 @@ class Ae extends Fe {
|
|
|
3366
3366
|
}
|
|
3367
3367
|
apply(e) {
|
|
3368
3368
|
if (this.structure && (Mo(e, this.from, this.gapFrom) || Mo(e, this.gapTo, this.to)))
|
|
3369
|
-
return
|
|
3369
|
+
return ve.fail("Structure gap-replace would overwrite content");
|
|
3370
3370
|
let t = e.slice(this.gapFrom, this.gapTo);
|
|
3371
3371
|
if (t.openStart || t.openEnd)
|
|
3372
|
-
return
|
|
3372
|
+
return ve.fail("Gap is not a flat range");
|
|
3373
3373
|
let r = this.slice.insertAt(this.insert, t.content);
|
|
3374
|
-
return r ?
|
|
3374
|
+
return r ? ve.fromReplace(e, this.from, this.to, r) : ve.fail("Content does not fit in gap");
|
|
3375
3375
|
}
|
|
3376
3376
|
getMap() {
|
|
3377
|
-
return new
|
|
3377
|
+
return new Qe([
|
|
3378
3378
|
this.from,
|
|
3379
3379
|
this.gapFrom - this.from,
|
|
3380
3380
|
this.insert,
|
|
@@ -3385,11 +3385,11 @@ class Ae extends Fe {
|
|
|
3385
3385
|
}
|
|
3386
3386
|
invert(e) {
|
|
3387
3387
|
let t = this.gapTo - this.gapFrom;
|
|
3388
|
-
return new
|
|
3388
|
+
return new Oe(this.from, this.from + this.slice.size + t, this.from + this.insert, this.from + this.insert + t, e.slice(this.from, this.to).removeBetween(this.gapFrom - this.from, this.gapTo - this.from), this.gapFrom - this.from, this.structure);
|
|
3389
3389
|
}
|
|
3390
3390
|
map(e) {
|
|
3391
3391
|
let t = e.mapResult(this.from, 1), r = e.mapResult(this.to, -1), i = this.from == this.gapFrom ? t.pos : e.map(this.gapFrom, -1), s = this.to == this.gapTo ? r.pos : e.map(this.gapTo, 1);
|
|
3392
|
-
return t.deletedAcross && r.deletedAcross || i < t.pos || s > r.pos ? null : new
|
|
3392
|
+
return t.deletedAcross && r.deletedAcross || i < t.pos || s > r.pos ? null : new Oe(t.pos, r.pos, i, s, this.slice, this.insert, this.structure);
|
|
3393
3393
|
}
|
|
3394
3394
|
toJSON() {
|
|
3395
3395
|
let e = {
|
|
@@ -3408,10 +3408,10 @@ class Ae extends Fe {
|
|
|
3408
3408
|
static fromJSON(e, t) {
|
|
3409
3409
|
if (typeof t.from != "number" || typeof t.to != "number" || typeof t.gapFrom != "number" || typeof t.gapTo != "number" || typeof t.insert != "number")
|
|
3410
3410
|
throw new RangeError("Invalid input for ReplaceAroundStep.fromJSON");
|
|
3411
|
-
return new
|
|
3411
|
+
return new Oe(t.from, t.to, t.gapFrom, t.gapTo, A.fromJSON(e, t.slice), t.insert, !!t.structure);
|
|
3412
3412
|
}
|
|
3413
3413
|
}
|
|
3414
|
-
Fe.jsonID("replaceAround",
|
|
3414
|
+
Fe.jsonID("replaceAround", Oe);
|
|
3415
3415
|
function Mo(n, e, t) {
|
|
3416
3416
|
let r = n.resolve(e), i = t - e, s = r.depth;
|
|
3417
3417
|
for (; i > 0 && s > 0 && r.indexAfter(s) == r.node(s).childCount; )
|
|
@@ -3470,7 +3470,7 @@ function tl(n, e, t, r = t.contentMatch, i = !0) {
|
|
|
3470
3470
|
for (let a = 0; a < s.childCount; a++) {
|
|
3471
3471
|
let c = s.child(a), u = l + c.nodeSize, d = r.matchType(c.type);
|
|
3472
3472
|
if (!d)
|
|
3473
|
-
o.push(new
|
|
3473
|
+
o.push(new Te(l, u, A.empty));
|
|
3474
3474
|
else {
|
|
3475
3475
|
r = d;
|
|
3476
3476
|
for (let f = 0; f < c.marks.length; f++)
|
|
@@ -3478,13 +3478,13 @@ function tl(n, e, t, r = t.contentMatch, i = !0) {
|
|
|
3478
3478
|
if (i && c.isText && t.whitespace != "pre") {
|
|
3479
3479
|
let f, h = /\r?\n|\r/g, p;
|
|
3480
3480
|
for (; f = h.exec(c.text); )
|
|
3481
|
-
p || (p = new A(
|
|
3481
|
+
p || (p = new A(v.from(t.schema.text(" ", t.allowedMarks(c.marks))), 0, 0)), o.push(new Te(l + f.index, l + f.index + f[0].length, p));
|
|
3482
3482
|
}
|
|
3483
3483
|
}
|
|
3484
3484
|
l = u;
|
|
3485
3485
|
}
|
|
3486
3486
|
if (!r.validEnd) {
|
|
3487
|
-
let a = r.fillBefore(
|
|
3487
|
+
let a = r.fillBefore(v.empty, !0);
|
|
3488
3488
|
n.replace(l, l, new A(a, 0, 0));
|
|
3489
3489
|
}
|
|
3490
3490
|
for (let a = o.length - 1; a >= 0; a--)
|
|
@@ -3505,13 +3505,13 @@ function rr(n) {
|
|
|
3505
3505
|
return null;
|
|
3506
3506
|
}
|
|
3507
3507
|
function Bp(n, e, t) {
|
|
3508
|
-
let { $from: r, $to: i, depth: s } = e, o = r.before(s + 1), l = i.after(s + 1), a = o, c = l, u =
|
|
3508
|
+
let { $from: r, $to: i, depth: s } = e, o = r.before(s + 1), l = i.after(s + 1), a = o, c = l, u = v.empty, d = 0;
|
|
3509
3509
|
for (let p = s, m = !1; p > t; p--)
|
|
3510
|
-
m || r.index(p) > 0 ? (m = !0, u =
|
|
3511
|
-
let f =
|
|
3510
|
+
m || r.index(p) > 0 ? (m = !0, u = v.from(r.node(p).copy(u)), d++) : a--;
|
|
3511
|
+
let f = v.empty, h = 0;
|
|
3512
3512
|
for (let p = s, m = !1; p > t; p--)
|
|
3513
|
-
m || i.after(p + 1) < i.end(p) ? (m = !0, f =
|
|
3514
|
-
n.step(new
|
|
3513
|
+
m || i.after(p + 1) < i.end(p) ? (m = !0, f = v.from(i.node(p).copy(f)), h++) : c++;
|
|
3514
|
+
n.step(new Oe(a, c, o, l, new A(u.append(f), d, h), u.size - d, !0));
|
|
3515
3515
|
}
|
|
3516
3516
|
function nl(n, e, t = null, r = n) {
|
|
3517
3517
|
let i = _p(n, e), s = i && $p(r, e);
|
|
@@ -3537,17 +3537,17 @@ function $p(n, e) {
|
|
|
3537
3537
|
return !a || !a.validEnd ? null : o;
|
|
3538
3538
|
}
|
|
3539
3539
|
function zp(n, e, t) {
|
|
3540
|
-
let r =
|
|
3540
|
+
let r = v.empty;
|
|
3541
3541
|
for (let o = t.length - 1; o >= 0; o--) {
|
|
3542
3542
|
if (r.size) {
|
|
3543
3543
|
let l = t[o].type.contentMatch.matchFragment(r);
|
|
3544
3544
|
if (!l || !l.validEnd)
|
|
3545
3545
|
throw new RangeError("Wrapper type given to Transform.wrap does not form valid content of its parent wrapper");
|
|
3546
3546
|
}
|
|
3547
|
-
r =
|
|
3547
|
+
r = v.from(t[o].type.create(t[o].attrs, r));
|
|
3548
3548
|
}
|
|
3549
3549
|
let i = e.start, s = e.end;
|
|
3550
|
-
n.step(new
|
|
3550
|
+
n.step(new Oe(i, s, i, s, new A(r, 0, 0), t.length, !0));
|
|
3551
3551
|
}
|
|
3552
3552
|
function Hp(n, e, t, r, i) {
|
|
3553
3553
|
if (!r.isTextblock)
|
|
@@ -3561,13 +3561,13 @@ function Hp(n, e, t, r, i) {
|
|
|
3561
3561
|
let h = r.whitespace == "pre", p = !!r.contentMatch.matchType(r.schema.linebreakReplacement);
|
|
3562
3562
|
h && !p ? c = !1 : !h && p && (c = !0);
|
|
3563
3563
|
}
|
|
3564
|
-
c === !1 &&
|
|
3564
|
+
c === !1 && xu(n, o, l, s), tl(n, n.mapping.slice(s).map(l, 1), r, void 0, c === null);
|
|
3565
3565
|
let u = n.mapping.slice(s), d = u.map(l, 1), f = u.map(l + o.nodeSize, 1);
|
|
3566
|
-
return n.step(new
|
|
3566
|
+
return n.step(new Oe(d, f, d + 1, f - 1, new A(v.from(r.create(a, null, o.marks)), 0, 0), 1, !0)), c === !0 && vu(n, o, l, s), !1;
|
|
3567
3567
|
}
|
|
3568
3568
|
});
|
|
3569
3569
|
}
|
|
3570
|
-
function
|
|
3570
|
+
function vu(n, e, t, r) {
|
|
3571
3571
|
e.forEach((i, s) => {
|
|
3572
3572
|
if (i.isText) {
|
|
3573
3573
|
let o, l = /\r?\n|\r/g;
|
|
@@ -3578,7 +3578,7 @@ function xu(n, e, t, r) {
|
|
|
3578
3578
|
}
|
|
3579
3579
|
});
|
|
3580
3580
|
}
|
|
3581
|
-
function
|
|
3581
|
+
function xu(n, e, t, r) {
|
|
3582
3582
|
e.forEach((i, s) => {
|
|
3583
3583
|
if (i.type == i.type.schema.linebreakReplacement) {
|
|
3584
3584
|
let o = n.mapping.slice(r).map(t + 1 + s);
|
|
@@ -3601,7 +3601,7 @@ function Vp(n, e, t, r, i) {
|
|
|
3601
3601
|
return n.replaceWith(e, e + s.nodeSize, o);
|
|
3602
3602
|
if (!t.validContent(s.content))
|
|
3603
3603
|
throw new RangeError("Invalid content for node type " + t.name);
|
|
3604
|
-
n.step(new
|
|
3604
|
+
n.step(new Oe(e, e + s.nodeSize, e + 1, e + s.nodeSize - 1, new A(v.from(o), 0, 0), 1, !0));
|
|
3605
3605
|
}
|
|
3606
3606
|
function zt(n, e, t = 1, r) {
|
|
3607
3607
|
let i = n.resolve(e), s = i.depth - t, o = r && r[r.length - 1] || i.parent;
|
|
@@ -3621,13 +3621,13 @@ function zt(n, e, t = 1, r) {
|
|
|
3621
3621
|
return i.node(s).canReplaceWith(l, l, a ? a.type : i.node(s + 1).type);
|
|
3622
3622
|
}
|
|
3623
3623
|
function jp(n, e, t = 1, r) {
|
|
3624
|
-
let i = n.doc.resolve(e), s =
|
|
3624
|
+
let i = n.doc.resolve(e), s = v.empty, o = v.empty;
|
|
3625
3625
|
for (let l = i.depth, a = i.depth - t, c = t - 1; l > a; l--, c--) {
|
|
3626
|
-
s =
|
|
3626
|
+
s = v.from(i.node(l).copy(s));
|
|
3627
3627
|
let u = r && r[c];
|
|
3628
|
-
o =
|
|
3628
|
+
o = v.from(u ? u.type.create(u.attrs, o) : i.node(l).copy(o));
|
|
3629
3629
|
}
|
|
3630
|
-
n.step(new
|
|
3630
|
+
n.step(new Te(e, e, new A(s.append(o), t, t), !0));
|
|
3631
3631
|
}
|
|
3632
3632
|
function hn(n, e) {
|
|
3633
3633
|
let t = n.resolve(e), r = t.index();
|
|
@@ -3666,13 +3666,13 @@ function Wp(n, e, t) {
|
|
|
3666
3666
|
let l = n.steps.length;
|
|
3667
3667
|
if (r === !1) {
|
|
3668
3668
|
let u = n.doc.resolve(e + t);
|
|
3669
|
-
|
|
3669
|
+
xu(n, u.node(), u.before(), l);
|
|
3670
3670
|
}
|
|
3671
3671
|
o.inlineContent && tl(n, e + t - 1, o, s.node().contentMatchAt(s.index()), r == null);
|
|
3672
3672
|
let a = n.mapping.slice(l), c = a.map(e - t);
|
|
3673
|
-
if (n.step(new
|
|
3673
|
+
if (n.step(new Te(c, a.map(e + t, -1), A.empty, !0)), r === !0) {
|
|
3674
3674
|
let u = n.doc.resolve(c);
|
|
3675
|
-
|
|
3675
|
+
vu(n, u.node(), u.before(), n.steps.length);
|
|
3676
3676
|
}
|
|
3677
3677
|
return n;
|
|
3678
3678
|
}
|
|
@@ -3723,14 +3723,14 @@ function ms(n, e, t = e, r = A.empty) {
|
|
|
3723
3723
|
if (e == t && !r.size)
|
|
3724
3724
|
return null;
|
|
3725
3725
|
let i = n.resolve(e), s = n.resolve(t);
|
|
3726
|
-
return Mu(i, s, r) ? new
|
|
3726
|
+
return Mu(i, s, r) ? new Te(e, t, r) : new qp(i, s, r).fit();
|
|
3727
3727
|
}
|
|
3728
3728
|
function Mu(n, e, t) {
|
|
3729
3729
|
return !t.openStart && !t.openEnd && n.start() == e.start() && n.parent.canReplace(n.index(), e.index(), t.content);
|
|
3730
3730
|
}
|
|
3731
3731
|
class qp {
|
|
3732
3732
|
constructor(e, t, r) {
|
|
3733
|
-
this.$from = e, this.$to = t, this.unplaced = r, this.frontier = [], this.placed =
|
|
3733
|
+
this.$from = e, this.$to = t, this.unplaced = r, this.frontier = [], this.placed = v.empty;
|
|
3734
3734
|
for (let i = 0; i <= e.depth; i++) {
|
|
3735
3735
|
let s = e.node(i);
|
|
3736
3736
|
this.frontier.push({
|
|
@@ -3739,7 +3739,7 @@ class qp {
|
|
|
3739
3739
|
});
|
|
3740
3740
|
}
|
|
3741
3741
|
for (let i = e.depth; i > 0; i--)
|
|
3742
|
-
this.placed =
|
|
3742
|
+
this.placed = v.from(e.node(i).copy(this.placed));
|
|
3743
3743
|
}
|
|
3744
3744
|
get depth() {
|
|
3745
3745
|
return this.frontier.length - 1;
|
|
@@ -3756,7 +3756,7 @@ class qp {
|
|
|
3756
3756
|
for (; o && l && s.childCount == 1; )
|
|
3757
3757
|
s = s.firstChild.content, o--, l--;
|
|
3758
3758
|
let a = new A(s, o, l);
|
|
3759
|
-
return e > -1 ? new
|
|
3759
|
+
return e > -1 ? new Oe(r.pos, e, this.$to.pos, this.$to.end(), a, t) : a.size || r.pos != this.$to.pos ? new Te(r.pos, i.pos, a) : null;
|
|
3760
3760
|
}
|
|
3761
3761
|
// Find a position on the start spine of `this.unplaced` that has
|
|
3762
3762
|
// content that can be moved somewhere on the frontier. Returns two
|
|
@@ -3778,7 +3778,7 @@ class qp {
|
|
|
3778
3778
|
let o = i.firstChild;
|
|
3779
3779
|
for (let l = this.depth; l >= 0; l--) {
|
|
3780
3780
|
let { type: a, match: c } = this.frontier[l], u, d = null;
|
|
3781
|
-
if (t == 1 && (o ? c.matchType(o.type) || (d = c.fillBefore(
|
|
3781
|
+
if (t == 1 && (o ? c.matchType(o.type) || (d = c.fillBefore(v.from(o), !1)) : s && a.compatibleContent(s.type)))
|
|
3782
3782
|
return { sliceDepth: r, frontierDepth: l, parent: s, inject: d };
|
|
3783
3783
|
if (t == 2 && o && (u = c.findWrapping(o.type)))
|
|
3784
3784
|
return { sliceDepth: r, frontierDepth: l, parent: s, wrap: u };
|
|
@@ -3822,7 +3822,7 @@ class qp {
|
|
|
3822
3822
|
c++, (c > 1 || a == 0 || m.content.size) && (d = g, u.push(Eu(m.mark(f.allowedMarks(m.marks)), c == 1 ? a : 0, c == l.childCount ? h : -1)));
|
|
3823
3823
|
}
|
|
3824
3824
|
let p = c == l.childCount;
|
|
3825
|
-
p || (h = -1), this.placed = cr(this.placed, t,
|
|
3825
|
+
p || (h = -1), this.placed = cr(this.placed, t, v.from(u)), this.frontier[t].match = d, p && h < 0 && r && r.type == this.frontier[this.depth].type && this.frontier.length > 1 && this.closeFrontierNode();
|
|
3826
3826
|
for (let m = 0, g = l; m < h; m++) {
|
|
3827
3827
|
let b = g.lastChild;
|
|
3828
3828
|
this.frontier.push({ type: b.type, match: b.contentMatchAt(b.childCount) }), g = b.content;
|
|
@@ -3868,10 +3868,10 @@ class qp {
|
|
|
3868
3868
|
}
|
|
3869
3869
|
openFrontierNode(e, t = null, r) {
|
|
3870
3870
|
let i = this.frontier[this.depth];
|
|
3871
|
-
i.match = i.match.matchType(e), this.placed = cr(this.placed, this.depth,
|
|
3871
|
+
i.match = i.match.matchType(e), this.placed = cr(this.placed, this.depth, v.from(e.create(t, r))), this.frontier.push({ type: e, match: e.contentMatch });
|
|
3872
3872
|
}
|
|
3873
3873
|
closeFrontierNode() {
|
|
3874
|
-
let t = this.frontier.pop().match.fillBefore(
|
|
3874
|
+
let t = this.frontier.pop().match.fillBefore(v.empty, !0);
|
|
3875
3875
|
t.childCount && (this.placed = cr(this.placed, this.frontier.length, t));
|
|
3876
3876
|
}
|
|
3877
3877
|
}
|
|
@@ -3890,7 +3890,7 @@ function Eu(n, e, t) {
|
|
|
3890
3890
|
if (e <= 0)
|
|
3891
3891
|
return n;
|
|
3892
3892
|
let r = n.content;
|
|
3893
|
-
return e > 1 && (r = r.replaceChild(0, Eu(r.firstChild, e - 1, r.childCount == 1 ? t - 1 : 0))), e > 0 && (r = n.type.contentMatch.fillBefore(r).append(r), t <= 0 && (r = r.append(n.type.contentMatch.matchFragment(r).fillBefore(
|
|
3893
|
+
return e > 1 && (r = r.replaceChild(0, Eu(r.firstChild, e - 1, r.childCount == 1 ? t - 1 : 0))), e > 0 && (r = n.type.contentMatch.fillBefore(r).append(r), t <= 0 && (r = r.append(n.type.contentMatch.matchFragment(r).fillBefore(v.empty, !0)))), n.copy(r);
|
|
3894
3894
|
}
|
|
3895
3895
|
function Ws(n, e, t, r, i) {
|
|
3896
3896
|
let s = n.node(e), o = i ? n.indexAfter(e) : n.index(e);
|
|
@@ -3913,7 +3913,7 @@ function Yp(n, e, t, r) {
|
|
|
3913
3913
|
return n.deleteRange(e, t);
|
|
3914
3914
|
let i = n.doc.resolve(e), s = n.doc.resolve(t);
|
|
3915
3915
|
if (Mu(i, s, r))
|
|
3916
|
-
return n.step(new
|
|
3916
|
+
return n.step(new Te(e, t, r));
|
|
3917
3917
|
let o = Ou(i, n.doc.resolve(t));
|
|
3918
3918
|
o[o.length - 1] == 0 && o.pop();
|
|
3919
3919
|
let l = -(i.depth + 1);
|
|
@@ -3944,8 +3944,8 @@ function Yp(n, e, t, r) {
|
|
|
3944
3944
|
for (let m = 0; m < o.length; m++) {
|
|
3945
3945
|
let g = o[(m + a) % o.length], b = !0;
|
|
3946
3946
|
g < 0 && (b = !1, g = -g);
|
|
3947
|
-
let w = i.node(g - 1),
|
|
3948
|
-
if (w.canReplaceWith(
|
|
3947
|
+
let w = i.node(g - 1), x = i.index(g - 1);
|
|
3948
|
+
if (w.canReplaceWith(x, x, p.type, p.marks))
|
|
3949
3949
|
return n.replace(i.before(g), b ? s.after(g) : t, new A(Tu(r.content, 0, r.openStart, h), h, r.openEnd));
|
|
3950
3950
|
}
|
|
3951
3951
|
}
|
|
@@ -3962,7 +3962,7 @@ function Tu(n, e, t, r, i) {
|
|
|
3962
3962
|
}
|
|
3963
3963
|
if (e > r) {
|
|
3964
3964
|
let s = i.contentMatchAt(0), o = s.fillBefore(n).append(n);
|
|
3965
|
-
n = o.append(s.matchFragment(o).fillBefore(
|
|
3965
|
+
n = o.append(s.matchFragment(o).fillBefore(v.empty, !0));
|
|
3966
3966
|
}
|
|
3967
3967
|
return n;
|
|
3968
3968
|
}
|
|
@@ -3971,7 +3971,7 @@ function Xp(n, e, t, r) {
|
|
|
3971
3971
|
let i = Kp(n.doc, e, r.type);
|
|
3972
3972
|
i != null && (e = t = i);
|
|
3973
3973
|
}
|
|
3974
|
-
n.replaceRange(e, t, new A(
|
|
3974
|
+
n.replaceRange(e, t, new A(v.from(r), 0, 0));
|
|
3975
3975
|
}
|
|
3976
3976
|
function Qp(n, e, t) {
|
|
3977
3977
|
let r = n.doc.resolve(e), i = n.doc.resolve(t), s = Ou(r, i);
|
|
@@ -4007,16 +4007,16 @@ class Un extends Fe {
|
|
|
4007
4007
|
apply(e) {
|
|
4008
4008
|
let t = e.nodeAt(this.pos);
|
|
4009
4009
|
if (!t)
|
|
4010
|
-
return
|
|
4010
|
+
return ve.fail("No node at attribute step's position");
|
|
4011
4011
|
let r = /* @__PURE__ */ Object.create(null);
|
|
4012
4012
|
for (let s in t.attrs)
|
|
4013
4013
|
r[s] = t.attrs[s];
|
|
4014
4014
|
r[this.attr] = this.value;
|
|
4015
4015
|
let i = t.type.create(r, null, t.marks);
|
|
4016
|
-
return
|
|
4016
|
+
return ve.fromReplace(e, this.pos, this.pos + 1, new A(v.from(i), 0, t.isLeaf ? 0 : 1));
|
|
4017
4017
|
}
|
|
4018
4018
|
getMap() {
|
|
4019
|
-
return
|
|
4019
|
+
return Qe.empty;
|
|
4020
4020
|
}
|
|
4021
4021
|
invert(e) {
|
|
4022
4022
|
return new Un(this.pos, this.attr, e.nodeAt(this.pos).attrs[this.attr]);
|
|
@@ -4048,10 +4048,10 @@ class Tr extends Fe {
|
|
|
4048
4048
|
t[i] = e.attrs[i];
|
|
4049
4049
|
t[this.attr] = this.value;
|
|
4050
4050
|
let r = e.type.create(t, e.content, e.marks);
|
|
4051
|
-
return
|
|
4051
|
+
return ve.ok(r);
|
|
4052
4052
|
}
|
|
4053
4053
|
getMap() {
|
|
4054
|
-
return
|
|
4054
|
+
return Qe.empty;
|
|
4055
4055
|
}
|
|
4056
4056
|
invert(e) {
|
|
4057
4057
|
return new Tr(this.attr, e.attrs[this.attr]);
|
|
@@ -4135,7 +4135,7 @@ class Au {
|
|
|
4135
4135
|
fragment, node, or array of nodes.
|
|
4136
4136
|
*/
|
|
4137
4137
|
replaceWith(e, t, r) {
|
|
4138
|
-
return this.replace(e, t, new A(
|
|
4138
|
+
return this.replace(e, t, new A(v.from(r), 0, 0));
|
|
4139
4139
|
}
|
|
4140
4140
|
/**
|
|
4141
4141
|
Delete the content between the given positions.
|
|
@@ -4414,7 +4414,7 @@ class F {
|
|
|
4414
4414
|
negative, it will search backwards first.
|
|
4415
4415
|
*/
|
|
4416
4416
|
static near(e, t = 1) {
|
|
4417
|
-
return this.findFrom(e, t) || this.findFrom(e, -t) || new
|
|
4417
|
+
return this.findFrom(e, t) || this.findFrom(e, -t) || new Ze(e.node(0));
|
|
4418
4418
|
}
|
|
4419
4419
|
/**
|
|
4420
4420
|
Find the cursor or leaf node selection closest to the start of
|
|
@@ -4423,14 +4423,14 @@ class F {
|
|
|
4423
4423
|
exists.
|
|
4424
4424
|
*/
|
|
4425
4425
|
static atStart(e) {
|
|
4426
|
-
return zn(e, e, 0, 0, 1) || new
|
|
4426
|
+
return zn(e, e, 0, 0, 1) || new Ze(e);
|
|
4427
4427
|
}
|
|
4428
4428
|
/**
|
|
4429
4429
|
Find the cursor or leaf node selection closest to the end of the
|
|
4430
4430
|
given document.
|
|
4431
4431
|
*/
|
|
4432
4432
|
static atEnd(e) {
|
|
4433
|
-
return zn(e, e, e.content.size, e.childCount, -1) || new
|
|
4433
|
+
return zn(e, e, e.content.size, e.childCount, -1) || new Ze(e);
|
|
4434
4434
|
}
|
|
4435
4435
|
/**
|
|
4436
4436
|
Deserialize the JSON representation of a selection. Must be
|
|
@@ -4578,7 +4578,7 @@ class _ extends F {
|
|
|
4578
4578
|
return r ? F.near(s) : new _(s);
|
|
4579
4579
|
}
|
|
4580
4580
|
content() {
|
|
4581
|
-
return new A(
|
|
4581
|
+
return new A(v.from(this.node), 0, 0);
|
|
4582
4582
|
}
|
|
4583
4583
|
eq(e) {
|
|
4584
4584
|
return e instanceof _ && e.anchor == this.anchor;
|
|
@@ -4626,7 +4626,7 @@ class rl {
|
|
|
4626
4626
|
return r && _.isSelectable(r) ? new _(t) : F.near(t);
|
|
4627
4627
|
}
|
|
4628
4628
|
}
|
|
4629
|
-
class
|
|
4629
|
+
class Ze extends F {
|
|
4630
4630
|
/**
|
|
4631
4631
|
Create an all-selection over the given document.
|
|
4632
4632
|
*/
|
|
@@ -4648,25 +4648,25 @@ class et extends F {
|
|
|
4648
4648
|
@internal
|
|
4649
4649
|
*/
|
|
4650
4650
|
static fromJSON(e) {
|
|
4651
|
-
return new
|
|
4651
|
+
return new Ze(e);
|
|
4652
4652
|
}
|
|
4653
4653
|
map(e) {
|
|
4654
|
-
return new
|
|
4654
|
+
return new Ze(e);
|
|
4655
4655
|
}
|
|
4656
4656
|
eq(e) {
|
|
4657
|
-
return e instanceof
|
|
4657
|
+
return e instanceof Ze;
|
|
4658
4658
|
}
|
|
4659
4659
|
getBookmark() {
|
|
4660
4660
|
return Zp;
|
|
4661
4661
|
}
|
|
4662
4662
|
}
|
|
4663
|
-
F.jsonID("all",
|
|
4663
|
+
F.jsonID("all", Ze);
|
|
4664
4664
|
const Zp = {
|
|
4665
4665
|
map() {
|
|
4666
4666
|
return this;
|
|
4667
4667
|
},
|
|
4668
4668
|
resolve(n) {
|
|
4669
|
-
return new
|
|
4669
|
+
return new Ze(n);
|
|
4670
4670
|
}
|
|
4671
4671
|
};
|
|
4672
4672
|
function zn(n, e, t, r, i, s = !1) {
|
|
@@ -4691,7 +4691,7 @@ function Ea(n, e, t) {
|
|
|
4691
4691
|
if (r < e)
|
|
4692
4692
|
return;
|
|
4693
4693
|
let i = n.steps[r];
|
|
4694
|
-
if (!(i instanceof
|
|
4694
|
+
if (!(i instanceof Te || i instanceof Oe))
|
|
4695
4695
|
return;
|
|
4696
4696
|
let s = n.mapping.maps[r], o;
|
|
4697
4697
|
s.forEach((l, a, c, u) => {
|
|
@@ -5112,7 +5112,7 @@ class ue {
|
|
|
5112
5112
|
return e[this.key];
|
|
5113
5113
|
}
|
|
5114
5114
|
}
|
|
5115
|
-
const
|
|
5115
|
+
const De = function(n) {
|
|
5116
5116
|
for (var e = 0; ; e++)
|
|
5117
5117
|
if (n = n.previousSibling, !n)
|
|
5118
5118
|
return e;
|
|
@@ -5137,7 +5137,7 @@ function Na(n, e, t, r, i) {
|
|
|
5137
5137
|
let o = n.parentNode;
|
|
5138
5138
|
if (!o || o.nodeType != 1 || _r(n) || rm.test(n.nodeName) || n.contentEditable == "false")
|
|
5139
5139
|
return !1;
|
|
5140
|
-
e =
|
|
5140
|
+
e = De(n) + (i < 0 ? 0 : 1), n = o;
|
|
5141
5141
|
} else if (n.nodeType == 1) {
|
|
5142
5142
|
let o = n.childNodes[e + (i < 0 ? -1 : 0)];
|
|
5143
5143
|
if (o.nodeType == 1 && o.contentEditable == "false")
|
|
@@ -5163,7 +5163,7 @@ function im(n, e) {
|
|
|
5163
5163
|
return null;
|
|
5164
5164
|
n = n.childNodes[e - 1], e = st(n);
|
|
5165
5165
|
} else if (n.parentNode && !_r(n))
|
|
5166
|
-
e =
|
|
5166
|
+
e = De(n), n = n.parentNode;
|
|
5167
5167
|
else
|
|
5168
5168
|
return null;
|
|
5169
5169
|
}
|
|
@@ -5177,7 +5177,7 @@ function sm(n, e) {
|
|
|
5177
5177
|
return null;
|
|
5178
5178
|
n = n.childNodes[e], e = 0;
|
|
5179
5179
|
} else if (n.parentNode && !_r(n))
|
|
5180
|
-
e =
|
|
5180
|
+
e = De(n) + 1, n = n.parentNode;
|
|
5181
5181
|
else
|
|
5182
5182
|
return null;
|
|
5183
5183
|
}
|
|
@@ -5186,7 +5186,7 @@ function om(n, e, t) {
|
|
|
5186
5186
|
for (let r = e == 0, i = e == st(n); r || i; ) {
|
|
5187
5187
|
if (n == t)
|
|
5188
5188
|
return !0;
|
|
5189
|
-
let s =
|
|
5189
|
+
let s = De(n);
|
|
5190
5190
|
if (n = n.parentNode, !n)
|
|
5191
5191
|
return !1;
|
|
5192
5192
|
r = r && s == 0, i = i && s == st(n);
|
|
@@ -5225,9 +5225,9 @@ function am(n, e, t) {
|
|
|
5225
5225
|
return { node: r.startContainer, offset: Math.min(st(r.startContainer), r.startOffset) };
|
|
5226
5226
|
}
|
|
5227
5227
|
}
|
|
5228
|
-
const Mt = typeof navigator < "u" ? navigator : null, Ra = typeof document < "u" ? document : null, pn = Mt && Mt.userAgent || "", To = /Edge\/(\d+)/.exec(pn), Iu = /MSIE \d/.exec(pn), Oo = /Trident\/(?:[7-9]|\d{2,})\..*rv:(\d+)/.exec(pn),
|
|
5228
|
+
const Mt = typeof navigator < "u" ? navigator : null, Ra = typeof document < "u" ? document : null, pn = Mt && Mt.userAgent || "", To = /Edge\/(\d+)/.exec(pn), Iu = /MSIE \d/.exec(pn), Oo = /Trident\/(?:[7-9]|\d{2,})\..*rv:(\d+)/.exec(pn), Ye = !!(Iu || Oo || To), ln = Iu ? document.documentMode : Oo ? +Oo[1] : To ? +To[1] : 0, ot = !Ye && /gecko\/(\d+)/i.test(pn);
|
|
5229
5229
|
ot && +(/Firefox\/(\d+)/.exec(pn) || [0, 0])[1];
|
|
5230
|
-
const Ao = !
|
|
5230
|
+
const Ao = !Ye && /Chrome\/(\d+)/.exec(pn), ze = !!Ao, Pu = Ao ? +Ao[1] : 0, je = !Ye && !!Mt && /Apple Computer/.test(Mt.vendor), Gn = je && (/Mobile\/\w+/.test(pn) || !!Mt && Mt.maxTouchPoints > 2), it = Gn || (Mt ? /Mac/.test(Mt.platform) : !1), cm = Mt ? /Win/.test(Mt.platform) : !1, _t = /Android \d/.test(pn), $r = !!Ra && "webkitFontSmoothing" in Ra.documentElement.style, um = $r ? +(/\bAppleWebKit\/(\d+)/.exec(navigator.userAgent) || [0, 0])[1] : 0;
|
|
5231
5231
|
function dm(n) {
|
|
5232
5232
|
let e = n.defaultView && n.defaultView.visualViewport;
|
|
5233
5233
|
return e ? {
|
|
@@ -5440,11 +5440,11 @@ function Jt(n, e) {
|
|
|
5440
5440
|
}
|
|
5441
5441
|
return Array.prototype.find.call(t, Ia) || n.getBoundingClientRect();
|
|
5442
5442
|
}
|
|
5443
|
-
const
|
|
5443
|
+
const vm = /[\u0590-\u05f4\u0600-\u06ff\u0700-\u08ac]/;
|
|
5444
5444
|
function zu(n, e, t) {
|
|
5445
5445
|
let { node: r, offset: i, atom: s } = n.docView.domFromPos(e, t < 0 ? -1 : 1), o = $r || ot;
|
|
5446
5446
|
if (r.nodeType == 3)
|
|
5447
|
-
if (o && (
|
|
5447
|
+
if (o && (vm.test(r.nodeValue) || (t < 0 ? !i : i == r.nodeValue.length))) {
|
|
5448
5448
|
let a = Jt(Lt(r, i, i), t);
|
|
5449
5449
|
if (ot && i && /\s/.test(r.nodeValue[i - 1]) && i < r.nodeValue.length) {
|
|
5450
5450
|
let c = Jt(Lt(r, i - 1, i - 1), -1);
|
|
@@ -5508,7 +5508,7 @@ function Hu(n, e, t) {
|
|
|
5508
5508
|
r != e && n.updateState(r), i != n.dom && i && i.focus();
|
|
5509
5509
|
}
|
|
5510
5510
|
}
|
|
5511
|
-
function
|
|
5511
|
+
function xm(n, e, t) {
|
|
5512
5512
|
let r = e.selection, i = t == "up" ? r.$from : r.$to;
|
|
5513
5513
|
return Hu(n, e, () => {
|
|
5514
5514
|
let { node: s } = n.docView.domFromPos(i.pos, t == "up" ? -1 : 1);
|
|
@@ -5559,7 +5559,7 @@ function Cm(n, e, t) {
|
|
|
5559
5559
|
}
|
|
5560
5560
|
let Pa = null, La = null, Ba = !1;
|
|
5561
5561
|
function Mm(n, e, t) {
|
|
5562
|
-
return Pa == e && La == t ? Ba : (Pa = e, La = t, Ba = t == "up" || t == "down" ?
|
|
5562
|
+
return Pa == e && La == t ? Ba : (Pa = e, La = t, Ba = t == "up" || t == "down" ? xm(n, e, t) : Cm(n, e, t));
|
|
5563
5563
|
}
|
|
5564
5564
|
const lt = 0, _a = 1, kn = 2, Et = 3;
|
|
5565
5565
|
class zr {
|
|
@@ -5657,7 +5657,7 @@ class zr {
|
|
|
5657
5657
|
}
|
|
5658
5658
|
let i;
|
|
5659
5659
|
if (e == this.dom && this.contentDOM)
|
|
5660
|
-
i = t >
|
|
5660
|
+
i = t > De(this.contentDOM);
|
|
5661
5661
|
else if (this.contentDOM && this.contentDOM != this.dom && this.dom.contains(this.contentDOM))
|
|
5662
5662
|
i = e.compareDocumentPosition(this.contentDOM) & 2;
|
|
5663
5663
|
else if (this.dom.firstChild) {
|
|
@@ -5747,12 +5747,12 @@ class zr {
|
|
|
5747
5747
|
let s, o = !0;
|
|
5748
5748
|
for (; s = r ? this.children[r - 1] : null, !(!s || s.dom.parentNode == this.contentDOM); r--, o = !1)
|
|
5749
5749
|
;
|
|
5750
|
-
return s && t && o && !s.border && !s.domAtom ? s.domFromPos(s.size, t) : { node: this.contentDOM, offset: s ?
|
|
5750
|
+
return s && t && o && !s.border && !s.domAtom ? s.domFromPos(s.size, t) : { node: this.contentDOM, offset: s ? De(s.dom) + 1 : 0 };
|
|
5751
5751
|
} else {
|
|
5752
5752
|
let s, o = !0;
|
|
5753
5753
|
for (; s = r < this.children.length ? this.children[r] : null, !(!s || s.dom.parentNode == this.contentDOM); r++, o = !1)
|
|
5754
5754
|
;
|
|
5755
|
-
return s && o && !s.border && !s.domAtom ? s.domFromPos(0, t) : { node: this.contentDOM, offset: s ?
|
|
5755
|
+
return s && o && !s.border && !s.domAtom ? s.domFromPos(0, t) : { node: this.contentDOM, offset: s ? De(s.dom) : this.contentDOM.childNodes.length };
|
|
5756
5756
|
}
|
|
5757
5757
|
}
|
|
5758
5758
|
// Used to find a DOM range in a single parent for a given changed
|
|
@@ -5771,7 +5771,7 @@ class zr {
|
|
|
5771
5771
|
for (let d = l; d > 0; d--) {
|
|
5772
5772
|
let f = this.children[d - 1];
|
|
5773
5773
|
if (f.size && f.dom.parentNode == this.contentDOM && !f.emptyChildAt(1)) {
|
|
5774
|
-
i =
|
|
5774
|
+
i = De(f.dom) + 1;
|
|
5775
5775
|
break;
|
|
5776
5776
|
}
|
|
5777
5777
|
e -= f.size;
|
|
@@ -5783,7 +5783,7 @@ class zr {
|
|
|
5783
5783
|
for (let u = l + 1; u < this.children.length; u++) {
|
|
5784
5784
|
let d = this.children[u];
|
|
5785
5785
|
if (d.size && d.dom.parentNode == this.contentDOM && !d.emptyChildAt(-1)) {
|
|
5786
|
-
s =
|
|
5786
|
+
s = De(d.dom);
|
|
5787
5787
|
break;
|
|
5788
5788
|
}
|
|
5789
5789
|
t += d.size;
|
|
@@ -5828,7 +5828,7 @@ class zr {
|
|
|
5828
5828
|
`), d && p == h.nodeValue.length)
|
|
5829
5829
|
for (let m = h, g; m; m = m.parentNode) {
|
|
5830
5830
|
if (g = m.nextSibling) {
|
|
5831
|
-
g.nodeName == "BR" && (l = a = { node: g.parentNode, offset:
|
|
5831
|
+
g.nodeName == "BR" && (l = a = { node: g.parentNode, offset: De(g) + 1 });
|
|
5832
5832
|
break;
|
|
5833
5833
|
}
|
|
5834
5834
|
let b = m.pmViewDesc;
|
|
@@ -6048,7 +6048,7 @@ class an extends zr {
|
|
|
6048
6048
|
break;
|
|
6049
6049
|
}
|
|
6050
6050
|
}
|
|
6051
|
-
e.contentElement || (e.getContent = () =>
|
|
6051
|
+
e.contentElement || (e.getContent = () => v.empty);
|
|
6052
6052
|
}
|
|
6053
6053
|
return e;
|
|
6054
6054
|
}
|
|
@@ -6247,11 +6247,11 @@ const pr = function(n) {
|
|
|
6247
6247
|
n && (this.nodeName = n);
|
|
6248
6248
|
};
|
|
6249
6249
|
pr.prototype = /* @__PURE__ */ Object.create(null);
|
|
6250
|
-
const
|
|
6250
|
+
const vn = [new pr()];
|
|
6251
6251
|
function No(n, e, t) {
|
|
6252
6252
|
if (n.length == 0)
|
|
6253
|
-
return
|
|
6254
|
-
let r = t ?
|
|
6253
|
+
return vn;
|
|
6254
|
+
let r = t ? vn[0] : new pr(), i = [r];
|
|
6255
6255
|
for (let s = 0; s < n.length; s++) {
|
|
6256
6256
|
let o = n[s].type.attrs;
|
|
6257
6257
|
if (o) {
|
|
@@ -6265,16 +6265,16 @@ function No(n, e, t) {
|
|
|
6265
6265
|
return i;
|
|
6266
6266
|
}
|
|
6267
6267
|
function Uu(n, e, t, r) {
|
|
6268
|
-
if (t ==
|
|
6268
|
+
if (t == vn && r == vn)
|
|
6269
6269
|
return e;
|
|
6270
6270
|
let i = e;
|
|
6271
6271
|
for (let s = 0; s < r.length; s++) {
|
|
6272
6272
|
let o = r[s], l = t[s];
|
|
6273
6273
|
if (s) {
|
|
6274
6274
|
let a;
|
|
6275
|
-
l && l.nodeName == o.nodeName && i != n && (a = i.parentNode) && a.nodeName.toLowerCase() == o.nodeName || (a = document.createElement(o.nodeName), a.pmIsDeco = !0, a.appendChild(i), l =
|
|
6275
|
+
l && l.nodeName == o.nodeName && i != n && (a = i.parentNode) && a.nodeName.toLowerCase() == o.nodeName || (a = document.createElement(o.nodeName), a.pmIsDeco = !0, a.appendChild(i), l = vn[0]), i = a;
|
|
6276
6276
|
}
|
|
6277
|
-
Om(i, l ||
|
|
6277
|
+
Om(i, l || vn[0], o);
|
|
6278
6278
|
}
|
|
6279
6279
|
return i;
|
|
6280
6280
|
}
|
|
@@ -6301,7 +6301,7 @@ function Om(n, e, t) {
|
|
|
6301
6301
|
}
|
|
6302
6302
|
}
|
|
6303
6303
|
function Wu(n, e, t) {
|
|
6304
|
-
return Uu(n, n,
|
|
6304
|
+
return Uu(n, n, vn, No(e, t, n.nodeType != 1));
|
|
6305
6305
|
}
|
|
6306
6306
|
function Ci(n, e) {
|
|
6307
6307
|
if (n.length != e.length)
|
|
@@ -6674,7 +6674,7 @@ function Bm(n) {
|
|
|
6674
6674
|
if (!e)
|
|
6675
6675
|
return;
|
|
6676
6676
|
let t = n.cursorWrapper.dom, r = t.nodeName == "IMG";
|
|
6677
|
-
r ? e.collapse(t.parentNode,
|
|
6677
|
+
r ? e.collapse(t.parentNode, De(t) + 1) : e.collapse(t, 0), !r && !n.state.selection.visible && Ye && ln <= 11 && (t.disabled = !0, t.disabled = !1);
|
|
6678
6678
|
}
|
|
6679
6679
|
function qu(n, e) {
|
|
6680
6680
|
if (e instanceof _) {
|
|
@@ -6777,7 +6777,7 @@ function $m(n) {
|
|
|
6777
6777
|
{
|
|
6778
6778
|
let l = t.previousSibling;
|
|
6779
6779
|
for (; l && mr(l, -1); )
|
|
6780
|
-
i = t.parentNode, s =
|
|
6780
|
+
i = t.parentNode, s = De(l), l = l.previousSibling;
|
|
6781
6781
|
if (l)
|
|
6782
6782
|
t = l, r = Mi(t);
|
|
6783
6783
|
else {
|
|
@@ -6809,7 +6809,7 @@ function zm(n) {
|
|
|
6809
6809
|
{
|
|
6810
6810
|
let l = t.nextSibling;
|
|
6811
6811
|
for (; l && mr(l, 1); )
|
|
6812
|
-
s = l.parentNode, o =
|
|
6812
|
+
s = l.parentNode, o = De(l) + 1, l = l.nextSibling;
|
|
6813
6813
|
if (l)
|
|
6814
6814
|
t = l, r = 0, i = Mi(t);
|
|
6815
6815
|
else {
|
|
@@ -6827,7 +6827,7 @@ function Gu(n) {
|
|
|
6827
6827
|
}
|
|
6828
6828
|
function Hm(n, e) {
|
|
6829
6829
|
for (; n && e == n.childNodes.length && !_r(n); )
|
|
6830
|
-
e =
|
|
6830
|
+
e = De(n) + 1, n = n.parentNode;
|
|
6831
6831
|
for (; n && e < n.childNodes.length; ) {
|
|
6832
6832
|
let t = n.childNodes[e];
|
|
6833
6833
|
if (t.nodeType == 3)
|
|
@@ -6839,7 +6839,7 @@ function Hm(n, e) {
|
|
|
6839
6839
|
}
|
|
6840
6840
|
function Fm(n, e) {
|
|
6841
6841
|
for (; n && !e && !_r(n); )
|
|
6842
|
-
e =
|
|
6842
|
+
e = De(n), n = n.parentNode;
|
|
6843
6843
|
for (; n && e; ) {
|
|
6844
6844
|
let t = n.childNodes[e - 1];
|
|
6845
6845
|
if (t.nodeType == 3)
|
|
@@ -6895,7 +6895,7 @@ function qa(n, e, t) {
|
|
|
6895
6895
|
return Gt(n, o);
|
|
6896
6896
|
}
|
|
6897
6897
|
if (!i.parent.inlineContent) {
|
|
6898
|
-
let o = e < 0 ? i : s, l = r instanceof
|
|
6898
|
+
let o = e < 0 ? i : s, l = r instanceof Ze ? F.near(o, e) : F.findFrom(o, e);
|
|
6899
6899
|
return l ? Gt(n, l) : !1;
|
|
6900
6900
|
}
|
|
6901
6901
|
return !1;
|
|
@@ -6995,7 +6995,7 @@ function Yu(n, e, t, r, i) {
|
|
|
6995
6995
|
if (n.someProp("transformPastedText", (f) => {
|
|
6996
6996
|
e = f(e, s || r, n);
|
|
6997
6997
|
}), s)
|
|
6998
|
-
return l = new A(
|
|
6998
|
+
return l = new A(v.from(n.state.schema.text(e.replace(/\r\n?/g, `
|
|
6999
6999
|
`))), 0, 0), n.someProp("transformPasted", (f) => {
|
|
7000
7000
|
l = f(l, n, !0);
|
|
7001
7001
|
}), l;
|
|
@@ -7063,13 +7063,13 @@ function Km(n, e) {
|
|
|
7063
7063
|
o.push(u), i = i.matchType(u.type), s = a;
|
|
7064
7064
|
}
|
|
7065
7065
|
}), o)
|
|
7066
|
-
return
|
|
7066
|
+
return v.from(o);
|
|
7067
7067
|
}
|
|
7068
7068
|
return n;
|
|
7069
7069
|
}
|
|
7070
7070
|
function Xu(n, e, t = 0) {
|
|
7071
7071
|
for (let r = e.length - 1; r >= t; r--)
|
|
7072
|
-
n = e[r].create(null,
|
|
7072
|
+
n = e[r].create(null, v.from(n));
|
|
7073
7073
|
return n;
|
|
7074
7074
|
}
|
|
7075
7075
|
function Qu(n, e, t, r, i) {
|
|
@@ -7078,18 +7078,18 @@ function Qu(n, e, t, r, i) {
|
|
|
7078
7078
|
if (s)
|
|
7079
7079
|
return r.copy(r.content.replaceChild(r.childCount - 1, s));
|
|
7080
7080
|
if (r.contentMatchAt(r.childCount).matchType(i == n.length - 1 ? t.type : n[i + 1]))
|
|
7081
|
-
return r.copy(r.content.append(
|
|
7081
|
+
return r.copy(r.content.append(v.from(Xu(t, n, i + 1))));
|
|
7082
7082
|
}
|
|
7083
7083
|
}
|
|
7084
7084
|
function Zu(n, e) {
|
|
7085
7085
|
if (e == 0)
|
|
7086
7086
|
return n;
|
|
7087
|
-
let t = n.content.replaceChild(n.childCount - 1, Zu(n.lastChild, e - 1)), r = n.contentMatchAt(n.childCount).fillBefore(
|
|
7087
|
+
let t = n.content.replaceChild(n.childCount - 1, Zu(n.lastChild, e - 1)), r = n.contentMatchAt(n.childCount).fillBefore(v.empty, !0);
|
|
7088
7088
|
return n.copy(t.append(r));
|
|
7089
7089
|
}
|
|
7090
7090
|
function Po(n, e, t, r, i, s) {
|
|
7091
7091
|
let o = e < 0 ? n.firstChild : n.lastChild, l = o.content;
|
|
7092
|
-
return n.childCount > 1 && (s = 0), i < r - 1 && (l = Po(l, e, t, r, i + 1, s)), i >= t && (l = e < 0 ? o.contentMatchAt(0).fillBefore(l, s <= i).append(l) : l.append(o.contentMatchAt(o.childCount).fillBefore(
|
|
7092
|
+
return n.childCount > 1 && (s = 0), i < r - 1 && (l = Po(l, e, t, r, i + 1, s)), i >= t && (l = e < 0 ? o.contentMatchAt(0).fillBefore(l, s <= i).append(l) : l.append(o.contentMatchAt(o.childCount).fillBefore(v.empty, !0))), n.replaceChild(e < 0 ? 0 : n.childCount - 1, o.copy(l));
|
|
7093
7093
|
}
|
|
7094
7094
|
function Ya(n, e, t) {
|
|
7095
7095
|
return e < n.openStart && (n = new A(Po(n.content, -1, e, n.openStart, 0, n.openEnd), e, n.openEnd)), t < n.openEnd && (n = new A(Po(n.content, 1, t, n.openEnd, 0, 0), n.openStart, t)), n;
|
|
@@ -7144,7 +7144,7 @@ function Ym(n, e) {
|
|
|
7144
7144
|
let a = t.nodes[r[l]];
|
|
7145
7145
|
if (!a || a.hasRequiredAttrs())
|
|
7146
7146
|
break;
|
|
7147
|
-
i =
|
|
7147
|
+
i = v.from(a.create(r[l + 1], i)), s++, o++;
|
|
7148
7148
|
}
|
|
7149
7149
|
return new A(i, s, o);
|
|
7150
7150
|
}
|
|
@@ -7439,7 +7439,7 @@ function pg(n, e) {
|
|
|
7439
7439
|
t.parentNode && t.parentNode.removeChild(t), n.focus();
|
|
7440
7440
|
}, 50);
|
|
7441
7441
|
}
|
|
7442
|
-
const Or =
|
|
7442
|
+
const Or = Ye && ln < 15 || Gn && um < 604;
|
|
7443
7443
|
Ue.copy = We.cut = (n, e) => {
|
|
7444
7444
|
let t = e, r = n.state.selection, i = t.type == "cut";
|
|
7445
7445
|
if (r.empty)
|
|
@@ -7961,8 +7961,8 @@ function bg(n, e, t, r, i, s, o) {
|
|
|
7961
7961
|
let w = l[b + 1];
|
|
7962
7962
|
if (w < 0 || f > w + u - d)
|
|
7963
7963
|
continue;
|
|
7964
|
-
let
|
|
7965
|
-
h >=
|
|
7964
|
+
let x = l[b] + u - d;
|
|
7965
|
+
h >= x ? l[b + 1] = f <= x ? -2 : -1 : f >= u && g && (l[b] += g, l[b + 1] += g);
|
|
7966
7966
|
}
|
|
7967
7967
|
d += g;
|
|
7968
7968
|
}), u = t.maps[c].map(u, -1);
|
|
@@ -8092,8 +8092,8 @@ const kg = {
|
|
|
8092
8092
|
attributes: !0,
|
|
8093
8093
|
attributeOldValue: !0,
|
|
8094
8094
|
subtree: !0
|
|
8095
|
-
},
|
|
8096
|
-
class
|
|
8095
|
+
}, vg = Ye && ln <= 11;
|
|
8096
|
+
class xg {
|
|
8097
8097
|
constructor() {
|
|
8098
8098
|
this.anchorNode = null, this.anchorOffset = 0, this.focusNode = null, this.focusOffset = 0;
|
|
8099
8099
|
}
|
|
@@ -8109,11 +8109,11 @@ class vg {
|
|
|
8109
8109
|
}
|
|
8110
8110
|
class Sg {
|
|
8111
8111
|
constructor(e, t) {
|
|
8112
|
-
this.view = e, this.handleDOMChange = t, this.queue = [], this.flushingSoon = -1, this.observer = null, this.currentSelection = new
|
|
8112
|
+
this.view = e, this.handleDOMChange = t, this.queue = [], this.flushingSoon = -1, this.observer = null, this.currentSelection = new xg(), this.onCharData = null, this.suppressingSelectionUpdates = !1, this.lastChangedTextNode = null, this.observer = window.MutationObserver && new window.MutationObserver((r) => {
|
|
8113
8113
|
for (let i = 0; i < r.length; i++)
|
|
8114
8114
|
this.queue.push(r[i]);
|
|
8115
|
-
|
|
8116
|
-
}),
|
|
8115
|
+
Ye && ln <= 11 && r.some((i) => i.type == "childList" && i.removedNodes.length || i.type == "characterData" && i.oldValue.length > i.target.nodeValue.length) ? this.flushSoon() : this.flush();
|
|
8116
|
+
}), vg && (this.onCharData = (r) => {
|
|
8117
8117
|
this.queue.push({ target: r.target, type: "characterData", oldValue: r.prevValue }), this.flushSoon();
|
|
8118
8118
|
}), this.onSelectionChange = this.onSelectionChange.bind(this);
|
|
8119
8119
|
}
|
|
@@ -8153,7 +8153,7 @@ class Sg {
|
|
|
8153
8153
|
if (Ua(this.view)) {
|
|
8154
8154
|
if (this.suppressingSelectionUpdates)
|
|
8155
8155
|
return Ht(this.view);
|
|
8156
|
-
if (
|
|
8156
|
+
if (Ye && ln <= 11 && !this.view.state.selection.empty) {
|
|
8157
8157
|
let e = this.view.domSelectionRange();
|
|
8158
8158
|
if (e.focusNode && Nn(e.focusNode, e.focusOffset, e.anchorNode, e.anchorOffset))
|
|
8159
8159
|
return this.flushSoon();
|
|
@@ -8231,12 +8231,12 @@ class Sg {
|
|
|
8231
8231
|
if (r.contentDOM && r.contentDOM != r.dom && !r.contentDOM.contains(e.target))
|
|
8232
8232
|
return { from: r.posBefore, to: r.posAfter };
|
|
8233
8233
|
let i = e.previousSibling, s = e.nextSibling;
|
|
8234
|
-
if (
|
|
8234
|
+
if (Ye && ln <= 11 && e.addedNodes.length)
|
|
8235
8235
|
for (let u = 0; u < e.addedNodes.length; u++) {
|
|
8236
8236
|
let { previousSibling: d, nextSibling: f } = e.addedNodes[u];
|
|
8237
8237
|
(!d || Array.prototype.indexOf.call(e.addedNodes, d) < 0) && (i = d), (!f || Array.prototype.indexOf.call(e.addedNodes, f) < 0) && (s = f);
|
|
8238
8238
|
}
|
|
8239
|
-
let o = i && i.parentNode == e.target ?
|
|
8239
|
+
let o = i && i.parentNode == e.target ? De(i) + 1 : 0, l = r.localPosFromDOM(e.target, o, -1), a = s && s.parentNode == e.target ? De(s) : e.target.childNodes.length, c = r.localPosFromDOM(e.target, a, 1);
|
|
8240
8240
|
return { from: l, to: c };
|
|
8241
8241
|
} else return e.type == "attributes" ? { from: r.posAtStart - r.border, to: r.posAtEnd + r.border } : (this.lastChangedTextNode = e.target, {
|
|
8242
8242
|
from: r.posAtStart,
|
|
@@ -8359,7 +8359,7 @@ function Ng(n, e, t, r, i) {
|
|
|
8359
8359
|
}
|
|
8360
8360
|
return;
|
|
8361
8361
|
}
|
|
8362
|
-
n.state.selection.from < n.state.selection.to && p.start == p.endB && n.state.selection instanceof j && (p.start > n.state.selection.from && p.start <= n.state.selection.from + 2 && n.state.selection.from >= c.from ? p.start = n.state.selection.from : p.endA < n.state.selection.to && p.endA >= n.state.selection.to - 2 && n.state.selection.to <= c.to && (p.endB += n.state.selection.to - p.endA, p.endA = n.state.selection.to)),
|
|
8362
|
+
n.state.selection.from < n.state.selection.to && p.start == p.endB && n.state.selection instanceof j && (p.start > n.state.selection.from && p.start <= n.state.selection.from + 2 && n.state.selection.from >= c.from ? p.start = n.state.selection.from : p.endA < n.state.selection.to && p.endA >= n.state.selection.to - 2 && n.state.selection.to <= c.to && (p.endB += n.state.selection.to - p.endA, p.endA = n.state.selection.to)), Ye && ln <= 11 && p.endB == p.start + 1 && p.endA == p.start && p.start > c.from && c.doc.textBetween(p.start - c.from - 1, p.start - c.from + 1) == " " && (p.start--, p.endA--, p.endB--);
|
|
8363
8363
|
let m = c.doc.resolveNoCache(p.start - c.from), g = c.doc.resolveNoCache(p.endB - c.from), b = u.resolve(p.start), w = m.sameParent(g) && m.parent.inlineContent && b.end() >= p.endA;
|
|
8364
8364
|
if ((Gn && n.input.lastIOSEnter > Date.now() - 225 && (!w || i.some((T) => T.nodeName == "DIV" || T.nodeName == "P")) || !w && m.pos < c.doc.content.size && (!m.sameParent(g) || !m.parent.inlineContent) && m.pos < g.pos && !/\S/.test(c.doc.textBetween(m.pos, g.pos, "", ""))) && n.someProp("handleKeyDown", (T) => T(n, wn(13, "Enter")))) {
|
|
8365
8365
|
n.input.lastIOSEnter = 0;
|
|
@@ -8374,28 +8374,28 @@ function Ng(n, e, t, r, i) {
|
|
|
8374
8374
|
return T(n, wn(13, "Enter"));
|
|
8375
8375
|
});
|
|
8376
8376
|
}, 20));
|
|
8377
|
-
let
|
|
8378
|
-
let $ = T || n.state.tr.replace(
|
|
8377
|
+
let x = p.start, R = p.endA, C = (T) => {
|
|
8378
|
+
let $ = T || n.state.tr.replace(x, R, c.doc.slice(p.start - c.from, p.endB - c.from));
|
|
8379
8379
|
if (c.sel) {
|
|
8380
8380
|
let K = nc(n, $.doc, c.sel);
|
|
8381
|
-
K && !(ze && n.composing && K.empty && (p.start != p.endB || n.input.lastChromeDelete < Date.now() - 100) && (K.head ==
|
|
8381
|
+
K && !(ze && n.composing && K.empty && (p.start != p.endB || n.input.lastChromeDelete < Date.now() - 100) && (K.head == x || K.head == $.mapping.map(R) - 1) || Ye && K.empty && K.head == x) && $.setSelection(K);
|
|
8382
8382
|
}
|
|
8383
8383
|
return s && $.setMeta("composition", s), $.scrollIntoView();
|
|
8384
8384
|
}, P;
|
|
8385
8385
|
if (w) {
|
|
8386
8386
|
if (m.pos == g.pos) {
|
|
8387
|
-
|
|
8388
|
-
let T = C(n.state.tr.delete(
|
|
8387
|
+
Ye && ln <= 11 && m.parentOffset == 0 && (n.domObserver.suppressSelectionUpdates(), setTimeout(() => Ht(n), 20));
|
|
8388
|
+
let T = C(n.state.tr.delete(x, R)), $ = u.resolve(p.start).marksAcross(u.resolve(p.endA));
|
|
8389
8389
|
$ && T.ensureMarks($), n.dispatch(T);
|
|
8390
8390
|
} else if (
|
|
8391
8391
|
// Adding or removing a mark
|
|
8392
8392
|
p.endA == p.endB && (P = Rg(m.parent.content.cut(m.parentOffset, g.parentOffset), b.parent.content.cut(b.parentOffset, p.endA - b.start())))
|
|
8393
8393
|
) {
|
|
8394
8394
|
let T = C(n.state.tr);
|
|
8395
|
-
P.type == "add" ? T.addMark(
|
|
8395
|
+
P.type == "add" ? T.addMark(x, R, P.mark) : T.removeMark(x, R, P.mark), n.dispatch(T);
|
|
8396
8396
|
} else if (m.parent.child(m.index()).isText && m.index() == g.index() - (g.textOffset ? 0 : 1)) {
|
|
8397
|
-
let T = m.parent.textBetween(m.parentOffset, g.parentOffset), $ = () => C(n.state.tr.insertText(T,
|
|
8398
|
-
n.someProp("handleTextInput", (K) => K(n,
|
|
8397
|
+
let T = m.parent.textBetween(m.parentOffset, g.parentOffset), $ = () => C(n.state.tr.insertText(T, x, R));
|
|
8398
|
+
n.someProp("handleTextInput", (K) => K(n, x, R, T, $)) || n.dispatch($());
|
|
8399
8399
|
}
|
|
8400
8400
|
} else
|
|
8401
8401
|
n.dispatch(C());
|
|
@@ -8418,7 +8418,7 @@ function Rg(n, e) {
|
|
|
8418
8418
|
let c = [];
|
|
8419
8419
|
for (let u = 0; u < e.childCount; u++)
|
|
8420
8420
|
c.push(a(e.child(u)));
|
|
8421
|
-
if (
|
|
8421
|
+
if (v.from(c).eq(n))
|
|
8422
8422
|
return { mark: l, type: o };
|
|
8423
8423
|
}
|
|
8424
8424
|
function Dg(n, e, t, r, i) {
|
|
@@ -8550,7 +8550,7 @@ class fd {
|
|
|
8550
8550
|
let f = u == "preserve" && o && this.dom.style.overflowAnchor == null && hm(this);
|
|
8551
8551
|
if (o) {
|
|
8552
8552
|
this.domObserver.stop();
|
|
8553
|
-
let h = d && (
|
|
8553
|
+
let h = d && (Ye || ze) && !this.composing && !i.selection.empty && !e.selection.empty && Pg(i.selection, e.selection);
|
|
8554
8554
|
if (d) {
|
|
8555
8555
|
let p = ze ? this.trackWrites = this.domSelectionRange().focusNode : null;
|
|
8556
8556
|
this.composing && (this.input.compositionNode = fg(this)), (s || !this.docView.update(e.doc, c, a, this)) && (this.docView.updateOuterDeco(c), this.docView.destroy(), this.docView = $a(e.doc, c, a, this.dom, this)), p && !this.trackWrites && (h = !0);
|
|
@@ -8625,7 +8625,7 @@ class fd {
|
|
|
8625
8625
|
Query whether the view has focus.
|
|
8626
8626
|
*/
|
|
8627
8627
|
hasFocus() {
|
|
8628
|
-
if (
|
|
8628
|
+
if (Ye) {
|
|
8629
8629
|
let e = this.root.activeElement;
|
|
8630
8630
|
if (e == this.dom)
|
|
8631
8631
|
return !0;
|
|
@@ -8933,10 +8933,10 @@ var un = {
|
|
|
8933
8933
|
221: "}",
|
|
8934
8934
|
222: '"'
|
|
8935
8935
|
}, Bg = typeof navigator < "u" && /Mac/.test(navigator.platform), _g = typeof navigator < "u" && /MSIE \d|Trident\/(?:[7-9]|\d{2,})\..*rv:(\d+)/.exec(navigator.userAgent);
|
|
8936
|
-
for (var
|
|
8937
|
-
for (var
|
|
8938
|
-
for (var
|
|
8939
|
-
un[
|
|
8936
|
+
for (var Ie = 0; Ie < 10; Ie++) un[48 + Ie] = un[96 + Ie] = String(Ie);
|
|
8937
|
+
for (var Ie = 1; Ie <= 24; Ie++) un[Ie + 111] = "F" + Ie;
|
|
8938
|
+
for (var Ie = 65; Ie <= 90; Ie++)
|
|
8939
|
+
un[Ie] = String.fromCharCode(Ie + 32), Ai[Ie] = String.fromCharCode(Ie);
|
|
8940
8940
|
for (var eo in un) Ai.hasOwnProperty(eo) || (Ai[eo] = un[eo]);
|
|
8941
8941
|
function $g(n) {
|
|
8942
8942
|
var e = Bg && n.metaKey && n.shiftKey && !n.ctrlKey && !n.altKey || _g && n.shiftKey && n.key && n.key.length == 1 || n.key == "Unidentified", t = !e && n.key || (n.shiftKey ? Ai : un)[n.keyCode] || n.key || "Unidentified";
|
|
@@ -9062,7 +9062,7 @@ function md(n, e, t) {
|
|
|
9062
9062
|
l = u;
|
|
9063
9063
|
}
|
|
9064
9064
|
let c = ms(n.doc, s, a, A.empty);
|
|
9065
|
-
if (!c || c.from != s || c instanceof
|
|
9065
|
+
if (!c || c.from != s || c instanceof Te && c.slice.size >= a - s)
|
|
9066
9066
|
return !1;
|
|
9067
9067
|
if (t) {
|
|
9068
9068
|
let u = n.tr.step(c);
|
|
@@ -9199,9 +9199,9 @@ const Gg = (n, e) => {
|
|
|
9199
9199
|
a.setSelection(F.near(a.doc.resolve(l), 1)), e(a.scrollIntoView());
|
|
9200
9200
|
}
|
|
9201
9201
|
return !0;
|
|
9202
|
-
},
|
|
9202
|
+
}, vd = (n, e) => {
|
|
9203
9203
|
let t = n.selection, { $from: r, $to: i } = t;
|
|
9204
|
-
if (t instanceof
|
|
9204
|
+
if (t instanceof Ze || r.parent.inlineContent || i.parent.inlineContent)
|
|
9205
9205
|
return !1;
|
|
9206
9206
|
let s = yl(i.parent.contentMatchAt(i.indexAfter()));
|
|
9207
9207
|
if (!s || !s.isTextblock)
|
|
@@ -9211,7 +9211,7 @@ const Gg = (n, e) => {
|
|
|
9211
9211
|
l.setSelection(j.create(l.doc, o + 1)), e(l.scrollIntoView());
|
|
9212
9212
|
}
|
|
9213
9213
|
return !0;
|
|
9214
|
-
},
|
|
9214
|
+
}, xd = (n, e) => {
|
|
9215
9215
|
let { $cursor: t } = n.selection;
|
|
9216
9216
|
if (!t || t.parent.content.size)
|
|
9217
9217
|
return !1;
|
|
@@ -9241,7 +9241,7 @@ function Yg(n) {
|
|
|
9241
9241
|
s.unshift(null);
|
|
9242
9242
|
}
|
|
9243
9243
|
let u = e.tr;
|
|
9244
|
-
(e.selection instanceof j || e.selection instanceof
|
|
9244
|
+
(e.selection instanceof j || e.selection instanceof Ze) && u.deleteSelection();
|
|
9245
9245
|
let d = u.mapping.map(r.pos), f = zt(u.doc, d, s.length, s);
|
|
9246
9246
|
if (f || (s[0] = l ? { type: l } : null, f = zt(u.doc, d, s.length, s)), !f)
|
|
9247
9247
|
return !1;
|
|
@@ -9267,11 +9267,11 @@ function Sd(n, e, t, r) {
|
|
|
9267
9267
|
let c = !a && e.parent.canReplace(e.index(), e.index() + 1);
|
|
9268
9268
|
if (c && (o = (l = i.contentMatchAt(i.childCount)).findWrapping(s.type)) && l.matchType(o[0] || s.type).validEnd) {
|
|
9269
9269
|
if (t) {
|
|
9270
|
-
let h = e.pos + s.nodeSize, p =
|
|
9270
|
+
let h = e.pos + s.nodeSize, p = v.empty;
|
|
9271
9271
|
for (let b = o.length - 1; b >= 0; b--)
|
|
9272
|
-
p =
|
|
9273
|
-
p =
|
|
9274
|
-
let m = n.tr.step(new
|
|
9272
|
+
p = v.from(o[b].create(null, p));
|
|
9273
|
+
p = v.from(i.copy(p));
|
|
9274
|
+
let m = n.tr.step(new Oe(e.pos - 1, h, e.pos, h, new A(p, 1, 0), o.length, !0)), g = m.doc.resolve(h + 2 * o.length);
|
|
9275
9275
|
g.nodeAfter && g.nodeAfter.type == i.type && hn(m.doc, g.pos) && m.join(g.pos), t(m.scrollIntoView());
|
|
9276
9276
|
}
|
|
9277
9277
|
return !0;
|
|
@@ -9288,10 +9288,10 @@ function Sd(n, e, t, r) {
|
|
|
9288
9288
|
g++;
|
|
9289
9289
|
if (h.canReplace(h.childCount, h.childCount, m.content)) {
|
|
9290
9290
|
if (t) {
|
|
9291
|
-
let b =
|
|
9292
|
-
for (let
|
|
9293
|
-
b =
|
|
9294
|
-
let w = n.tr.step(new
|
|
9291
|
+
let b = v.empty;
|
|
9292
|
+
for (let x = p.length - 1; x >= 0; x--)
|
|
9293
|
+
b = v.from(p[x].copy(b));
|
|
9294
|
+
let w = n.tr.step(new Oe(e.pos - p.length, e.pos + s.nodeSize, e.pos + g, e.pos + s.nodeSize - g, new A(b, p.length, 0), 0, !0));
|
|
9295
9295
|
t(w.scrollIntoView());
|
|
9296
9296
|
}
|
|
9297
9297
|
return !0;
|
|
@@ -9357,7 +9357,7 @@ function bl(...n) {
|
|
|
9357
9357
|
}
|
|
9358
9358
|
bl(pl, pd, gd);
|
|
9359
9359
|
bl(pl, bd, wd);
|
|
9360
|
-
bl(kd,
|
|
9360
|
+
bl(kd, vd, xd, Xg);
|
|
9361
9361
|
typeof navigator < "u" ? /Mac|iP(hone|[oa]d)/.test(navigator.platform) : typeof os < "u" && os.platform && os.platform() == "darwin";
|
|
9362
9362
|
function ry(n, e = null) {
|
|
9363
9363
|
return function(t, r) {
|
|
@@ -9374,16 +9374,16 @@ function iy(n, e, t, r = null) {
|
|
|
9374
9374
|
if (e.$from.index(e.depth - 1) == 0)
|
|
9375
9375
|
return !1;
|
|
9376
9376
|
let a = o.resolve(e.start - 2);
|
|
9377
|
-
s = new
|
|
9377
|
+
s = new xi(a, a, e.depth), e.endIndex < e.parent.childCount && (e = new xi(e.$from, o.resolve(e.$to.end(e.depth)), e.depth)), i = !0;
|
|
9378
9378
|
}
|
|
9379
9379
|
let l = nl(s, t, r, e);
|
|
9380
9380
|
return l ? (n && sy(n, e, l, i, t), !0) : !1;
|
|
9381
9381
|
}
|
|
9382
9382
|
function sy(n, e, t, r, i) {
|
|
9383
|
-
let s =
|
|
9383
|
+
let s = v.empty;
|
|
9384
9384
|
for (let u = t.length - 1; u >= 0; u--)
|
|
9385
|
-
s =
|
|
9386
|
-
n.step(new
|
|
9385
|
+
s = v.from(t[u].type.create(t[u].attrs, s));
|
|
9386
|
+
n.step(new Oe(e.start - (r ? 2 : 0), e.end, e.start, e.end, new A(s, 0, 0), t.length, !0));
|
|
9387
9387
|
let o = 0;
|
|
9388
9388
|
for (let u = 0; u < t.length; u++)
|
|
9389
9389
|
t[u].type == i && (o = u + 1);
|
|
@@ -9400,7 +9400,7 @@ function oy(n) {
|
|
|
9400
9400
|
}
|
|
9401
9401
|
function ly(n, e, t, r) {
|
|
9402
9402
|
let i = n.tr, s = r.end, o = r.$to.end(r.depth);
|
|
9403
|
-
s < o && (i.step(new
|
|
9403
|
+
s < o && (i.step(new Oe(s - 1, o, s, o, new A(v.from(t.create(null, r.parent.copy())), 1, 0), 1, !0)), r = new xi(i.doc.resolve(r.$from.pos), i.doc.resolve(o), r.depth));
|
|
9404
9404
|
const l = rr(r);
|
|
9405
9405
|
if (l == null)
|
|
9406
9406
|
return !1;
|
|
@@ -9416,10 +9416,10 @@ function ay(n, e, t) {
|
|
|
9416
9416
|
if (r.mapping.map(t.end) != t.start + s.nodeAfter.nodeSize)
|
|
9417
9417
|
return !1;
|
|
9418
9418
|
let l = t.startIndex == 0, a = t.endIndex == i.childCount, c = s.node(-1), u = s.index(-1);
|
|
9419
|
-
if (!c.canReplace(u + (l ? 0 : 1), u + 1, o.content.append(a ?
|
|
9419
|
+
if (!c.canReplace(u + (l ? 0 : 1), u + 1, o.content.append(a ? v.empty : v.from(i))))
|
|
9420
9420
|
return !1;
|
|
9421
9421
|
let d = s.pos, f = d + o.nodeSize;
|
|
9422
|
-
return r.step(new
|
|
9422
|
+
return r.step(new Oe(d - (l ? 1 : 0), f + (a ? 1 : 0), d + 1, f - 1, new A((l ? v.empty : v.from(i.copy(v.empty))).append(a ? v.empty : v.from(i.copy(v.empty))), l ? 0 : 1, a ? 0 : 1), l ? 0 : 1)), e(r.scrollIntoView()), !0;
|
|
9423
9423
|
}
|
|
9424
9424
|
function cy(n) {
|
|
9425
9425
|
return function(e, t) {
|
|
@@ -9433,8 +9433,8 @@ function cy(n) {
|
|
|
9433
9433
|
if (a.type != n)
|
|
9434
9434
|
return !1;
|
|
9435
9435
|
if (t) {
|
|
9436
|
-
let c = a.lastChild && a.lastChild.type == l.type, u =
|
|
9437
|
-
t(e.tr.step(new
|
|
9436
|
+
let c = a.lastChild && a.lastChild.type == l.type, u = v.from(c ? n.create() : null), d = new A(v.from(n.create(null, v.from(l.type.create(null, u)))), c ? 3 : 1, 0), f = s.start, h = s.end;
|
|
9437
|
+
t(e.tr.step(new Oe(f - (c ? 3 : 1), h, f, h, d, 1, !0)).scrollIntoView());
|
|
9438
9438
|
}
|
|
9439
9439
|
return !0;
|
|
9440
9440
|
};
|
|
@@ -9468,7 +9468,7 @@ function ks(n) {
|
|
|
9468
9468
|
}
|
|
9469
9469
|
};
|
|
9470
9470
|
}
|
|
9471
|
-
var
|
|
9471
|
+
var vs = class {
|
|
9472
9472
|
constructor(n) {
|
|
9473
9473
|
this.editor = n.editor, this.rawCommands = this.editor.extensionManager.commands, this.customState = n.state;
|
|
9474
9474
|
}
|
|
@@ -9583,7 +9583,7 @@ function Zr(n) {
|
|
|
9583
9583
|
return Td(t);
|
|
9584
9584
|
}
|
|
9585
9585
|
function Rr(n, e, t) {
|
|
9586
|
-
if (n instanceof sn || n instanceof
|
|
9586
|
+
if (n instanceof sn || n instanceof v)
|
|
9587
9587
|
return n;
|
|
9588
9588
|
t = {
|
|
9589
9589
|
slice: !0,
|
|
@@ -9594,7 +9594,7 @@ function Rr(n, e, t) {
|
|
|
9594
9594
|
if (r)
|
|
9595
9595
|
try {
|
|
9596
9596
|
if (Array.isArray(n) && n.length > 0)
|
|
9597
|
-
return
|
|
9597
|
+
return v.fromArray(n.map((l) => e.nodeFromJSON(l)));
|
|
9598
9598
|
const o = e.nodeFromJSON(n);
|
|
9599
9599
|
return t.errorOnInvalidContent && o.check(), o;
|
|
9600
9600
|
} catch (s) {
|
|
@@ -9678,7 +9678,7 @@ function py(n, e) {
|
|
|
9678
9678
|
};
|
|
9679
9679
|
}
|
|
9680
9680
|
}
|
|
9681
|
-
function
|
|
9681
|
+
function xs(n) {
|
|
9682
9682
|
return (e) => py(e.$from, n);
|
|
9683
9683
|
}
|
|
9684
9684
|
function z(n, e, t) {
|
|
@@ -9848,10 +9848,10 @@ function yy(n, e) {
|
|
|
9848
9848
|
storage: c.storage,
|
|
9849
9849
|
editor: e
|
|
9850
9850
|
}, f = n.reduce((b, w) => {
|
|
9851
|
-
const
|
|
9851
|
+
const x = z(w, "extendNodeSchema", d);
|
|
9852
9852
|
return {
|
|
9853
9853
|
...b,
|
|
9854
|
-
...
|
|
9854
|
+
...x ? x(c) : {}
|
|
9855
9855
|
};
|
|
9856
9856
|
}, {}), h = dc({
|
|
9857
9857
|
...f,
|
|
@@ -9871,10 +9871,10 @@ function yy(n, e) {
|
|
|
9871
9871
|
isolating: re(z(c, "isolating", d)),
|
|
9872
9872
|
attrs: Object.fromEntries(
|
|
9873
9873
|
u.map((b) => {
|
|
9874
|
-
var w,
|
|
9874
|
+
var w, x;
|
|
9875
9875
|
return [
|
|
9876
9876
|
b.name,
|
|
9877
|
-
{ default: (w = b?.attribute) == null ? void 0 : w.default, validate: (
|
|
9877
|
+
{ default: (w = b?.attribute) == null ? void 0 : w.default, validate: (x = b?.attribute) == null ? void 0 : x.validate }
|
|
9878
9878
|
];
|
|
9879
9879
|
})
|
|
9880
9880
|
)
|
|
@@ -9940,14 +9940,14 @@ function by(n) {
|
|
|
9940
9940
|
const e = n.filter((t, r) => n.indexOf(t) !== r);
|
|
9941
9941
|
return Array.from(new Set(e));
|
|
9942
9942
|
}
|
|
9943
|
-
function
|
|
9943
|
+
function vl(n) {
|
|
9944
9944
|
return n.sort((t, r) => {
|
|
9945
9945
|
const i = z(t, "priority") || 100, s = z(r, "priority") || 100;
|
|
9946
9946
|
return i > s ? -1 : i < s ? 1 : 0;
|
|
9947
9947
|
});
|
|
9948
9948
|
}
|
|
9949
9949
|
function Nd(n) {
|
|
9950
|
-
const e =
|
|
9950
|
+
const e = vl(wl(n)), t = by(e.map((r) => r.name));
|
|
9951
9951
|
return t.length && console.warn(
|
|
9952
9952
|
`[tiptap warn]: Duplicate extension names found: [${t.map((r) => `'${r}'`).join(", ")}]. This can lead to issues.`
|
|
9953
9953
|
), e;
|
|
@@ -9979,7 +9979,7 @@ function Dd(n, e) {
|
|
|
9979
9979
|
};
|
|
9980
9980
|
return Rd(n, t, e);
|
|
9981
9981
|
}
|
|
9982
|
-
function
|
|
9982
|
+
function xl(n) {
|
|
9983
9983
|
return Object.fromEntries(
|
|
9984
9984
|
Object.entries(n.nodes).filter(([, e]) => e.spec.toText).map(([e, t]) => [e, t.spec.toText])
|
|
9985
9985
|
);
|
|
@@ -10000,7 +10000,7 @@ function Id(n, e) {
|
|
|
10000
10000
|
const l = o.find((a) => a.type.name === t.name);
|
|
10001
10001
|
return l ? { ...l.attrs } : {};
|
|
10002
10002
|
}
|
|
10003
|
-
function
|
|
10003
|
+
function xe(n, e) {
|
|
10004
10004
|
if (typeof n == "string") {
|
|
10005
10005
|
if (!e.nodes[n])
|
|
10006
10006
|
throw Error(`There is no node type named '${n}'. Maybe you forgot to add the extension?`);
|
|
@@ -10009,7 +10009,7 @@ function ve(n, e) {
|
|
|
10009
10009
|
return n;
|
|
10010
10010
|
}
|
|
10011
10011
|
function wy(n, e) {
|
|
10012
|
-
const t =
|
|
10012
|
+
const t = xe(e, n.schema), { from: r, to: i } = n.selection, s = [];
|
|
10013
10013
|
n.doc.nodesBetween(r, i, (l) => {
|
|
10014
10014
|
s.push(l);
|
|
10015
10015
|
});
|
|
@@ -10033,7 +10033,7 @@ function ky(n, e = JSON.stringify) {
|
|
|
10033
10033
|
return Object.prototype.hasOwnProperty.call(t, i) ? !1 : t[i] = !0;
|
|
10034
10034
|
});
|
|
10035
10035
|
}
|
|
10036
|
-
function
|
|
10036
|
+
function vy(n) {
|
|
10037
10037
|
const e = ky(n);
|
|
10038
10038
|
return e.length === 1 ? e : e.filter((t, r) => !e.filter((s, o) => o !== r).some((s) => t.oldRange.from >= s.oldRange.from && t.oldRange.to <= s.oldRange.to && t.newRange.from >= s.newRange.from && t.newRange.to <= s.newRange.to));
|
|
10039
10039
|
}
|
|
@@ -10064,7 +10064,7 @@ function Ld(n) {
|
|
|
10064
10064
|
}
|
|
10065
10065
|
});
|
|
10066
10066
|
});
|
|
10067
|
-
}),
|
|
10067
|
+
}), vy(r);
|
|
10068
10068
|
}
|
|
10069
10069
|
function Sl(n) {
|
|
10070
10070
|
return Object.prototype.toString.call(n) === "[object RegExp]";
|
|
@@ -10118,7 +10118,7 @@ function Ml(n, e, t) {
|
|
|
10118
10118
|
);
|
|
10119
10119
|
}), r;
|
|
10120
10120
|
}
|
|
10121
|
-
var
|
|
10121
|
+
var xy = (n, e, t, r = 20) => {
|
|
10122
10122
|
const i = n.doc.resolve(t);
|
|
10123
10123
|
let s = r, o = null;
|
|
10124
10124
|
for (; s > 0 && o === null; ) {
|
|
@@ -10163,8 +10163,8 @@ function $o(n, e, t = {}) {
|
|
|
10163
10163
|
n.doc.nodesBetween(h, p, (m, g) => {
|
|
10164
10164
|
if (!m.isText && !m.marks.length)
|
|
10165
10165
|
return;
|
|
10166
|
-
const b = Math.max(h, g), w = Math.min(p, g + m.nodeSize),
|
|
10167
|
-
o +=
|
|
10166
|
+
const b = Math.max(h, g), w = Math.min(p, g + m.nodeSize), x = w - b;
|
|
10167
|
+
o += x, l.push(
|
|
10168
10168
|
...m.marks.map((R) => ({
|
|
10169
10169
|
mark: R,
|
|
10170
10170
|
from: b,
|
|
@@ -10178,7 +10178,7 @@ function $o(n, e, t = {}) {
|
|
|
10178
10178
|
return (a > 0 ? a + c : a) >= o;
|
|
10179
10179
|
}
|
|
10180
10180
|
function dn(n, e, t = {}) {
|
|
10181
|
-
const { from: r, to: i, empty: s } = n.selection, o = e ?
|
|
10181
|
+
const { from: r, to: i, empty: s } = n.selection, o = e ? xe(e, n.schema) : null, l = [];
|
|
10182
10182
|
n.doc.nodesBetween(r, i, (d, f) => {
|
|
10183
10183
|
if (d.isText)
|
|
10184
10184
|
return;
|
|
@@ -10201,7 +10201,7 @@ function Cy(n, e, t = {}) {
|
|
|
10201
10201
|
var My = (n, e) => {
|
|
10202
10202
|
const { $from: t, $to: r, $anchor: i } = n.selection;
|
|
10203
10203
|
if (e) {
|
|
10204
|
-
const s =
|
|
10204
|
+
const s = xs((l) => l.type.name === e)(n.selection);
|
|
10205
10205
|
if (!s)
|
|
10206
10206
|
return !1;
|
|
10207
10207
|
const o = n.doc.resolve(s.pos + 1);
|
|
@@ -10292,7 +10292,7 @@ function Ty(n, e, t) {
|
|
|
10292
10292
|
if (r < e)
|
|
10293
10293
|
return;
|
|
10294
10294
|
const i = n.steps[r];
|
|
10295
|
-
if (!(i instanceof
|
|
10295
|
+
if (!(i instanceof Te || i instanceof Oe))
|
|
10296
10296
|
return;
|
|
10297
10297
|
const s = n.mapping.maps[r];
|
|
10298
10298
|
let o = 0;
|
|
@@ -10339,7 +10339,7 @@ function ei(n) {
|
|
|
10339
10339
|
}), g = {
|
|
10340
10340
|
from: r - (h[0].length - s.length),
|
|
10341
10341
|
to: i
|
|
10342
|
-
}, { commands: b, chain: w, can:
|
|
10342
|
+
}, { commands: b, chain: w, can: x } = new vs({
|
|
10343
10343
|
editor: t,
|
|
10344
10344
|
state: m
|
|
10345
10345
|
});
|
|
@@ -10349,7 +10349,7 @@ function ei(n) {
|
|
|
10349
10349
|
match: h,
|
|
10350
10350
|
commands: b,
|
|
10351
10351
|
chain: w,
|
|
10352
|
-
can:
|
|
10352
|
+
can: x
|
|
10353
10353
|
}) === null || !p.steps.length || (f.undoable && p.setMeta(l, {
|
|
10354
10354
|
transform: p,
|
|
10355
10355
|
from: r,
|
|
@@ -10371,7 +10371,7 @@ function Ay(n) {
|
|
|
10371
10371
|
const a = i.getMeta("applyInputRules");
|
|
10372
10372
|
return !!a && setTimeout(() => {
|
|
10373
10373
|
let { text: u } = a;
|
|
10374
|
-
typeof u == "string" ? u = u : u = kl(
|
|
10374
|
+
typeof u == "string" ? u = u : u = kl(v.from(u), o.schema);
|
|
10375
10375
|
const { from: d } = a, f = d + u.length;
|
|
10376
10376
|
ei({
|
|
10377
10377
|
editor: e,
|
|
@@ -10529,15 +10529,15 @@ var Dy = class {
|
|
|
10529
10529
|
}) : [];
|
|
10530
10530
|
};
|
|
10531
10531
|
function Py(n) {
|
|
10532
|
-
const { editor: e, state: t, from: r, to: i, rule: s, pasteEvent: o, dropEvent: l } = n, { commands: a, chain: c, can: u } = new
|
|
10532
|
+
const { editor: e, state: t, from: r, to: i, rule: s, pasteEvent: o, dropEvent: l } = n, { commands: a, chain: c, can: u } = new vs({
|
|
10533
10533
|
editor: e,
|
|
10534
10534
|
state: t
|
|
10535
10535
|
}), d = [];
|
|
10536
10536
|
return t.doc.nodesBetween(r, i, (h, p) => {
|
|
10537
|
-
var m, g, b, w,
|
|
10537
|
+
var m, g, b, w, x;
|
|
10538
10538
|
if ((g = (m = h.type) == null ? void 0 : m.spec) != null && g.code || !(h.isText || h.isTextblock || h.isInline))
|
|
10539
10539
|
return;
|
|
10540
|
-
const R = (
|
|
10540
|
+
const R = (x = (w = (b = h.content) == null ? void 0 : b.size) != null ? w : h.nodeSize) != null ? x : 0, C = Math.max(r, p), P = Math.min(i, p + R);
|
|
10541
10541
|
if (C >= P)
|
|
10542
10542
|
return;
|
|
10543
10543
|
const T = h.isText ? h.text || "" : h.textBetween(C - p, P - p, void 0, "");
|
|
@@ -10644,7 +10644,7 @@ function By(n) {
|
|
|
10644
10644
|
return;
|
|
10645
10645
|
if (w) {
|
|
10646
10646
|
let { text: C } = b;
|
|
10647
|
-
typeof C == "string" ? C = C : C = kl(
|
|
10647
|
+
typeof C == "string" ? C = C : C = kl(v.from(C), h.schema);
|
|
10648
10648
|
const { from: P } = b, T = P + C.length, $ = Ly(C);
|
|
10649
10649
|
return a({
|
|
10650
10650
|
rule: u,
|
|
@@ -10654,12 +10654,12 @@ function By(n) {
|
|
|
10654
10654
|
pasteEvt: $
|
|
10655
10655
|
});
|
|
10656
10656
|
}
|
|
10657
|
-
const
|
|
10658
|
-
if (!(!Ry(
|
|
10657
|
+
const x = f.doc.content.findDiffStart(h.doc.content), R = f.doc.content.findDiffEnd(h.doc.content);
|
|
10658
|
+
if (!(!Ry(x) || !R || x === R.b))
|
|
10659
10659
|
return a({
|
|
10660
10660
|
rule: u,
|
|
10661
10661
|
state: h,
|
|
10662
|
-
from:
|
|
10662
|
+
from: x,
|
|
10663
10663
|
to: R,
|
|
10664
10664
|
pasteEvt: o
|
|
10665
10665
|
});
|
|
@@ -10695,7 +10695,7 @@ var Es = class {
|
|
|
10695
10695
|
*/
|
|
10696
10696
|
get plugins() {
|
|
10697
10697
|
const { editor: n } = this;
|
|
10698
|
-
return
|
|
10698
|
+
return vl([...this.extensions].reverse()).flatMap((r) => {
|
|
10699
10699
|
const i = {
|
|
10700
10700
|
name: r.name,
|
|
10701
10701
|
options: r.options,
|
|
@@ -10767,7 +10767,7 @@ var Es = class {
|
|
|
10767
10767
|
options: t.options,
|
|
10768
10768
|
storage: this.editor.extensionStorage[t.name],
|
|
10769
10769
|
editor: n,
|
|
10770
|
-
type:
|
|
10770
|
+
type: xe(t.name, this.schema)
|
|
10771
10771
|
}, s = z(t, "addNodeView", i);
|
|
10772
10772
|
if (!s)
|
|
10773
10773
|
return [];
|
|
@@ -10851,7 +10851,7 @@ var Es = class {
|
|
|
10851
10851
|
}
|
|
10852
10852
|
};
|
|
10853
10853
|
Es.resolve = Nd;
|
|
10854
|
-
Es.sort =
|
|
10854
|
+
Es.sort = vl;
|
|
10855
10855
|
Es.flatten = wl;
|
|
10856
10856
|
var _y = {};
|
|
10857
10857
|
Md(_y, {
|
|
@@ -10898,7 +10898,7 @@ var me = class Vd extends Tl {
|
|
|
10898
10898
|
key: new ue("clipboardTextSerializer"),
|
|
10899
10899
|
props: {
|
|
10900
10900
|
clipboardTextSerializer: () => {
|
|
10901
|
-
const { editor: n } = this, { state: e, schema: t } = n, { doc: r, selection: i } = e, { ranges: s } = i, o = Math.min(...s.map((u) => u.$from.pos)), l = Math.max(...s.map((u) => u.$to.pos)), a =
|
|
10901
|
+
const { editor: n } = this, { state: e, schema: t } = n, { doc: r, selection: i } = e, { ranges: s } = i, o = Math.min(...s.map((u) => u.$from.pos)), l = Math.max(...s.map((u) => u.$to.pos)), a = xl(t);
|
|
10902
10902
|
return Rd(r, { from: o, to: l }, {
|
|
10903
10903
|
...this.options.blockSeparator !== void 0 ? { blockSeparator: this.options.blockSeparator } : {},
|
|
10904
10904
|
textSerializers: a
|
|
@@ -10945,8 +10945,8 @@ Md(Ud, {
|
|
|
10945
10945
|
scrollIntoView: () => b0,
|
|
10946
10946
|
selectAll: () => w0,
|
|
10947
10947
|
selectNodeBackward: () => k0,
|
|
10948
|
-
selectNodeForward: () =>
|
|
10949
|
-
selectParentNode: () =>
|
|
10948
|
+
selectNodeForward: () => v0,
|
|
10949
|
+
selectParentNode: () => x0,
|
|
10950
10950
|
selectTextblockEnd: () => S0,
|
|
10951
10951
|
selectTextblockStart: () => C0,
|
|
10952
10952
|
setContent: () => M0,
|
|
@@ -10989,7 +10989,7 @@ var $y = () => ({ editor: n, view: e }) => (requestAnimationFrame(() => {
|
|
|
10989
10989
|
(p || p === 0) && e.lift(h, p);
|
|
10990
10990
|
});
|
|
10991
10991
|
}), !0;
|
|
10992
|
-
}, Fy = (n) => (e) => n(e), Vy = () => ({ state: n, dispatch: e }) =>
|
|
10992
|
+
}, Fy = (n) => (e) => n(e), Vy = () => ({ state: n, dispatch: e }) => vd(n, e), jy = (n, e) => ({ editor: t, tr: r }) => {
|
|
10993
10993
|
const { state: i } = t, s = i.doc.slice(n.from, n.to);
|
|
10994
10994
|
r.deleteRange(n.from, n.to);
|
|
10995
10995
|
const o = r.mapping.map(e);
|
|
@@ -11009,7 +11009,7 @@ var $y = () => ({ editor: n, view: e }) => (requestAnimationFrame(() => {
|
|
|
11009
11009
|
}
|
|
11010
11010
|
return !1;
|
|
11011
11011
|
}, Wy = (n) => ({ tr: e, state: t, dispatch: r }) => {
|
|
11012
|
-
const i =
|
|
11012
|
+
const i = xe(n, t.schema), s = e.selection.$anchor;
|
|
11013
11013
|
for (let o = s.depth; o > 0; o -= 1)
|
|
11014
11014
|
if (s.node(o).type === i) {
|
|
11015
11015
|
if (r) {
|
|
@@ -11113,7 +11113,7 @@ var Qy = (n = null, e = {}) => ({ editor: t, view: r, tr: i, dispatch: s }) => {
|
|
|
11113
11113
|
if (f) {
|
|
11114
11114
|
if (Array.isArray(e))
|
|
11115
11115
|
m = e.map((g) => g.text || "").join("");
|
|
11116
|
-
else if (e instanceof
|
|
11116
|
+
else if (e instanceof v) {
|
|
11117
11117
|
let g = "";
|
|
11118
11118
|
e.forEach((b) => {
|
|
11119
11119
|
b.text && (g += b.text);
|
|
@@ -11122,8 +11122,8 @@ var Qy = (n = null, e = {}) => ({ editor: t, view: r, tr: i, dispatch: s }) => {
|
|
|
11122
11122
|
r.insertText(m, u, d);
|
|
11123
11123
|
} else {
|
|
11124
11124
|
m = l;
|
|
11125
|
-
const g = r.doc.resolve(u), b = g.node(), w = g.parentOffset === 0,
|
|
11126
|
-
w &&
|
|
11125
|
+
const g = r.doc.resolve(u), b = g.node(), w = g.parentOffset === 0, x = b.isText || b.isTextblock, R = b.content.size > 0;
|
|
11126
|
+
w && x && R && (u = Math.max(0, u - 1)), r.replaceWith(u, d, m);
|
|
11127
11127
|
}
|
|
11128
11128
|
t.updateSelection && Ty(r, r.steps.length - 1, -1), t.applyInputRules && r.setMeta("applyInputRules", { from: u, text: m }), t.applyPasteRules && r.setMeta("applyPasteRules", { from: u, text: m });
|
|
11129
11129
|
}
|
|
@@ -11185,10 +11185,10 @@ var f0 = (n) => ({ editor: e, view: t, tr: r, dispatch: i }) => {
|
|
|
11185
11185
|
u && i && r.maybeStep(u);
|
|
11186
11186
|
}), !0;
|
|
11187
11187
|
}, h0 = (n, e = {}) => ({ state: t, dispatch: r }) => {
|
|
11188
|
-
const i =
|
|
11188
|
+
const i = xe(n, t.schema);
|
|
11189
11189
|
return dn(t, i, e) ? Jg(t, r) : !1;
|
|
11190
|
-
}, p0 = () => ({ state: n, dispatch: e }) =>
|
|
11191
|
-
const r =
|
|
11190
|
+
}, p0 = () => ({ state: n, dispatch: e }) => xd(n, e), m0 = (n) => ({ state: e, dispatch: t }) => {
|
|
11191
|
+
const r = xe(n, e.schema);
|
|
11192
11192
|
return oy(r)(e, t);
|
|
11193
11193
|
}, g0 = () => ({ state: n, dispatch: e }) => kd(n, e);
|
|
11194
11194
|
function mc(n, e) {
|
|
@@ -11201,7 +11201,7 @@ var y0 = (n, e) => ({ tr: t, state: r, dispatch: i }) => {
|
|
|
11201
11201
|
typeof n == "string" ? n : n.name,
|
|
11202
11202
|
r.schema
|
|
11203
11203
|
);
|
|
11204
|
-
return l ? (l === "node" && (s =
|
|
11204
|
+
return l ? (l === "node" && (s = xe(n, r.schema)), l === "mark" && (o = Vt(n, r.schema)), i && t.selection.ranges.forEach((a) => {
|
|
11205
11205
|
r.doc.nodesBetween(a.$from.pos, a.$to.pos, (c, u) => {
|
|
11206
11206
|
s && s === c.type && t.setNodeMarkup(u, void 0, mc(c.attrs, e)), o && c.marks.length && c.marks.forEach((d) => {
|
|
11207
11207
|
o === d.type && t.addMark(u, u + c.nodeSize, o.create(mc(d.attrs, e)));
|
|
@@ -11210,11 +11210,11 @@ var y0 = (n, e) => ({ tr: t, state: r, dispatch: i }) => {
|
|
|
11210
11210
|
}), !0) : !1;
|
|
11211
11211
|
}, b0 = () => ({ tr: n, dispatch: e }) => (e && n.scrollIntoView(), !0), w0 = () => ({ tr: n, dispatch: e }) => {
|
|
11212
11212
|
if (e) {
|
|
11213
|
-
const t = new
|
|
11213
|
+
const t = new Ze(n.doc);
|
|
11214
11214
|
n.setSelection(t);
|
|
11215
11215
|
}
|
|
11216
11216
|
return !0;
|
|
11217
|
-
}, k0 = () => ({ state: n, dispatch: e }) => gd(n, e),
|
|
11217
|
+
}, k0 = () => ({ state: n, dispatch: e }) => gd(n, e), v0 = () => ({ state: n, dispatch: e }) => wd(n, e), x0 = () => ({ state: n, dispatch: e }) => Qg(n, e), S0 = () => ({ state: n, dispatch: e }) => ty(n, e), C0 = () => ({ state: n, dispatch: e }) => ey(n, e), M0 = (n, { errorOnInvalidContent: e, emitUpdate: t = !0, parseOptions: r = {} } = {}) => ({ editor: i, tr: s, dispatch: o, commands: l }) => {
|
|
11218
11218
|
const { doc: a } = s;
|
|
11219
11219
|
if (r.preserveWhitespace !== "full") {
|
|
11220
11220
|
const c = Bo(n, i.schema, r, {
|
|
@@ -11279,7 +11279,7 @@ var T0 = (n, e = {}) => ({ tr: t, state: r, dispatch: i }) => {
|
|
|
11279
11279
|
});
|
|
11280
11280
|
return E0(r, t, a);
|
|
11281
11281
|
}, O0 = (n, e) => ({ tr: t }) => (t.setMeta(n, e), !0), A0 = (n, e = {}) => ({ state: t, dispatch: r, chain: i }) => {
|
|
11282
|
-
const s =
|
|
11282
|
+
const s = xe(n, t.schema);
|
|
11283
11283
|
let o;
|
|
11284
11284
|
return t.selection.$anchor.sameParent(t.selection.$head) && (o = t.selection.$anchor.parent.attrs), s.isTextblock ? i().command(({ commands: l }) => cc(s, { ...o, ...e })(t) ? !0 : l.clearNodes()).command(({ state: l }) => cc(s, { ...o, ...e })(l, r)).run() : (console.warn('[tiptap warn]: Currently "setNode()" only supports text block nodes.'), !1);
|
|
11285
11285
|
}, N0 = (n) => ({ tr: e, dispatch: t }) => {
|
|
@@ -11295,7 +11295,7 @@ var T0 = (n, e = {}) => ({ tr: t, state: r, dispatch: i }) => {
|
|
|
11295
11295
|
}
|
|
11296
11296
|
return !0;
|
|
11297
11297
|
}, D0 = (n) => ({ state: e, dispatch: t }) => {
|
|
11298
|
-
const r =
|
|
11298
|
+
const r = xe(n, e.schema);
|
|
11299
11299
|
return cy(r)(e, t);
|
|
11300
11300
|
};
|
|
11301
11301
|
function gc(n, e) {
|
|
@@ -11333,7 +11333,7 @@ var I0 = ({ keepMarks: n = !0 } = {}) => ({ tr: e, state: t, dispatch: r, editor
|
|
|
11333
11333
|
return p;
|
|
11334
11334
|
}, P0 = (n, e = {}) => ({ tr: t, state: r, dispatch: i, editor: s }) => {
|
|
11335
11335
|
var o;
|
|
11336
|
-
const l =
|
|
11336
|
+
const l = xe(n, r.schema), { $from: a, $to: c } = r.selection, u = r.selection.node;
|
|
11337
11337
|
if (u && u.isBlock || a.depth < 2 || !a.sameParent(c))
|
|
11338
11338
|
return !1;
|
|
11339
11339
|
const d = a.node(-1);
|
|
@@ -11344,20 +11344,20 @@ var I0 = ({ keepMarks: n = !0 } = {}) => ({ tr: e, state: t, dispatch: r, editor
|
|
|
11344
11344
|
if (a.depth === 2 || a.node(-3).type !== l || a.index(-2) !== a.node(-2).childCount - 1)
|
|
11345
11345
|
return !1;
|
|
11346
11346
|
if (i) {
|
|
11347
|
-
let b =
|
|
11347
|
+
let b = v.empty;
|
|
11348
11348
|
const w = a.index(-1) ? 1 : a.index(-2) ? 2 : 3;
|
|
11349
11349
|
for (let $ = a.depth - w; $ >= a.depth - 3; $ -= 1)
|
|
11350
|
-
b =
|
|
11351
|
-
const
|
|
11350
|
+
b = v.from(a.node($).copy(b));
|
|
11351
|
+
const x = (
|
|
11352
11352
|
// eslint-disable-next-line no-nested-ternary
|
|
11353
11353
|
a.indexAfter(-1) < a.node(-2).childCount ? 1 : a.indexAfter(-2) < a.node(-3).childCount ? 2 : 3
|
|
11354
11354
|
), R = {
|
|
11355
11355
|
...mi(f, a.node().type.name, a.node().attrs),
|
|
11356
11356
|
...e
|
|
11357
11357
|
}, C = ((o = l.contentMatch.defaultType) == null ? void 0 : o.createAndFill(R)) || void 0;
|
|
11358
|
-
b = b.append(
|
|
11358
|
+
b = b.append(v.from(l.createAndFill(null, C) || void 0));
|
|
11359
11359
|
const P = a.before(a.depth - (w - 1));
|
|
11360
|
-
t.replace(P, a.after(-
|
|
11360
|
+
t.replace(P, a.after(-x), new A(b, 4 - w, 0));
|
|
11361
11361
|
let T = -1;
|
|
11362
11362
|
t.doc.nodesBetween(P, t.doc.content.size, ($, K) => {
|
|
11363
11363
|
if (T > -1)
|
|
@@ -11382,15 +11382,15 @@ var I0 = ({ keepMarks: n = !0 } = {}) => ({ tr: e, state: t, dispatch: r, editor
|
|
|
11382
11382
|
if (!zt(t.doc, a.pos, 2))
|
|
11383
11383
|
return !1;
|
|
11384
11384
|
if (i) {
|
|
11385
|
-
const { selection: b, storedMarks: w } = r, { splittableMarks:
|
|
11385
|
+
const { selection: b, storedMarks: w } = r, { splittableMarks: x } = s.extensionManager, R = w || b.$to.parentOffset && b.$from.marks();
|
|
11386
11386
|
if (t.split(a.pos, 2, g).scrollIntoView(), !R || !i)
|
|
11387
11387
|
return !0;
|
|
11388
|
-
const C = R.filter((P) =>
|
|
11388
|
+
const C = R.filter((P) => x.includes(P.type.name));
|
|
11389
11389
|
t.ensureMarks(C);
|
|
11390
11390
|
}
|
|
11391
11391
|
return !0;
|
|
11392
11392
|
}, ro = (n, e) => {
|
|
11393
|
-
const t =
|
|
11393
|
+
const t = xs((o) => o.type === e)(n.selection);
|
|
11394
11394
|
if (!t)
|
|
11395
11395
|
return !0;
|
|
11396
11396
|
const r = n.doc.resolve(Math.max(0, t.pos - 1)).before(t.depth);
|
|
@@ -11399,7 +11399,7 @@ var I0 = ({ keepMarks: n = !0 } = {}) => ({ tr: e, state: t, dispatch: r, editor
|
|
|
11399
11399
|
const i = n.doc.nodeAt(r);
|
|
11400
11400
|
return t.node.type === i?.type && hn(n.doc, t.pos) && n.join(t.pos), !0;
|
|
11401
11401
|
}, io = (n, e) => {
|
|
11402
|
-
const t =
|
|
11402
|
+
const t = xs((o) => o.type === e)(n.selection);
|
|
11403
11403
|
if (!t)
|
|
11404
11404
|
return !0;
|
|
11405
11405
|
const r = n.doc.resolve(t.start).after(t.depth);
|
|
@@ -11408,11 +11408,11 @@ var I0 = ({ keepMarks: n = !0 } = {}) => ({ tr: e, state: t, dispatch: r, editor
|
|
|
11408
11408
|
const i = n.doc.nodeAt(r);
|
|
11409
11409
|
return t.node.type === i?.type && hn(n.doc, r) && n.join(r), !0;
|
|
11410
11410
|
}, L0 = (n, e, t, r = {}) => ({ editor: i, tr: s, state: o, dispatch: l, chain: a, commands: c, can: u }) => {
|
|
11411
|
-
const { extensions: d, splittableMarks: f } = i.extensionManager, h =
|
|
11412
|
-
if (!
|
|
11411
|
+
const { extensions: d, splittableMarks: f } = i.extensionManager, h = xe(n, o.schema), p = xe(e, o.schema), { selection: m, storedMarks: g } = o, { $from: b, $to: w } = m, x = b.blockRange(w), R = g || m.$to.parentOffset && m.$from.marks();
|
|
11412
|
+
if (!x)
|
|
11413
11413
|
return !1;
|
|
11414
|
-
const C =
|
|
11415
|
-
if (
|
|
11414
|
+
const C = xs((P) => pc(P.type.name, d))(m);
|
|
11415
|
+
if (x.depth >= 1 && C && x.depth - C.depth <= 1) {
|
|
11416
11416
|
if (C.node.type === h)
|
|
11417
11417
|
return c.liftListItem(p);
|
|
11418
11418
|
if (pc(C.node.type.name, d) && h.validContent(C.node.content) && l)
|
|
@@ -11426,11 +11426,11 @@ var I0 = ({ keepMarks: n = !0 } = {}) => ({ tr: e, state: t, dispatch: r, editor
|
|
|
11426
11426
|
const { extendEmptyMarkRange: s = !1 } = t, o = Vt(n, r.schema);
|
|
11427
11427
|
return $o(r, o, e) ? i.unsetMark(o, { extendEmptyMarkRange: s }) : i.setMark(o, e);
|
|
11428
11428
|
}, _0 = (n, e, t = {}) => ({ state: r, commands: i }) => {
|
|
11429
|
-
const s =
|
|
11429
|
+
const s = xe(n, r.schema), o = xe(e, r.schema), l = dn(r, s, t);
|
|
11430
11430
|
let a;
|
|
11431
11431
|
return r.selection.$anchor.sameParent(r.selection.$head) && (a = r.selection.$anchor.parent.attrs), l ? i.setNode(o, a) : i.setNode(s, { ...a, ...t });
|
|
11432
11432
|
}, $0 = (n, e = {}) => ({ state: t, commands: r }) => {
|
|
11433
|
-
const i =
|
|
11433
|
+
const i = xe(n, t.schema);
|
|
11434
11434
|
return dn(t, i, e) ? r.lift(i) : r.wrapIn(i, e);
|
|
11435
11435
|
}, z0 = () => ({ state: n, dispatch: e }) => {
|
|
11436
11436
|
const t = n.plugins;
|
|
@@ -11477,7 +11477,7 @@ var I0 = ({ keepMarks: n = !0 } = {}) => ({ tr: e, state: t, dispatch: r, editor
|
|
|
11477
11477
|
typeof n == "string" ? n : n.name,
|
|
11478
11478
|
r.schema
|
|
11479
11479
|
);
|
|
11480
|
-
return l ? (l === "node" && (s =
|
|
11480
|
+
return l ? (l === "node" && (s = xe(n, r.schema)), l === "mark" && (o = Vt(n, r.schema)), i && t.selection.ranges.forEach((a) => {
|
|
11481
11481
|
const c = a.$from.pos, u = a.$to.pos;
|
|
11482
11482
|
let d, f, h, p;
|
|
11483
11483
|
t.selection.empty ? r.doc.nodesBetween(c, u, (m, g) => {
|
|
@@ -11488,10 +11488,10 @@ var I0 = ({ keepMarks: n = !0 } = {}) => ({ tr: e, state: t, dispatch: r, editor
|
|
|
11488
11488
|
...e
|
|
11489
11489
|
}), o && m.marks.length && m.marks.forEach((b) => {
|
|
11490
11490
|
if (o === b.type) {
|
|
11491
|
-
const w = Math.max(g, c),
|
|
11491
|
+
const w = Math.max(g, c), x = Math.min(g + m.nodeSize, u);
|
|
11492
11492
|
t.addMark(
|
|
11493
11493
|
w,
|
|
11494
|
-
|
|
11494
|
+
x,
|
|
11495
11495
|
o.create({
|
|
11496
11496
|
...b.attrs,
|
|
11497
11497
|
...e
|
|
@@ -11514,10 +11514,10 @@ var I0 = ({ keepMarks: n = !0 } = {}) => ({ tr: e, state: t, dispatch: r, editor
|
|
|
11514
11514
|
}));
|
|
11515
11515
|
}), !0) : !1;
|
|
11516
11516
|
}, j0 = (n, e = {}) => ({ state: t, dispatch: r }) => {
|
|
11517
|
-
const i =
|
|
11517
|
+
const i = xe(n, t.schema);
|
|
11518
11518
|
return ny(i, e)(t, r);
|
|
11519
11519
|
}, U0 = (n, e = {}) => ({ state: t, dispatch: r }) => {
|
|
11520
|
-
const i =
|
|
11520
|
+
const i = xe(n, t.schema);
|
|
11521
11521
|
return ry(i, e)(t, r);
|
|
11522
11522
|
}, qd = me.create({
|
|
11523
11523
|
name: "commands",
|
|
@@ -11558,14 +11558,14 @@ var I0 = ({ keepMarks: n = !0 } = {}) => ({ tr: e, state: t, dispatch: r, editor
|
|
|
11558
11558
|
u.steps.forEach((h, p) => {
|
|
11559
11559
|
var m, g;
|
|
11560
11560
|
if (h instanceof ft) {
|
|
11561
|
-
const b = f.slice(p).map(h.from, -1), w = f.slice(p).map(h.to),
|
|
11561
|
+
const b = f.slice(p).map(h.from, -1), w = f.slice(p).map(h.to), x = f.invert().map(b, -1), R = f.invert().map(w), C = (m = u.doc.nodeAt(b - 1)) == null ? void 0 : m.marks.some((T) => T.eq(h.mark)), P = (g = u.doc.nodeAt(w)) == null ? void 0 : g.marks.some((T) => T.eq(h.mark));
|
|
11562
11562
|
this.editor.emit("delete", {
|
|
11563
11563
|
type: "mark",
|
|
11564
11564
|
mark: h.mark,
|
|
11565
11565
|
from: h.from,
|
|
11566
11566
|
to: h.to,
|
|
11567
11567
|
deletedRange: {
|
|
11568
|
-
from:
|
|
11568
|
+
from: x,
|
|
11569
11569
|
to: R
|
|
11570
11570
|
},
|
|
11571
11571
|
newRange: {
|
|
@@ -11705,7 +11705,7 @@ var I0 = ({ keepMarks: n = !0 } = {}) => ({ tr: e, state: t, dispatch: r, editor
|
|
|
11705
11705
|
const f = t.tr, h = ks({
|
|
11706
11706
|
state: t,
|
|
11707
11707
|
transaction: f
|
|
11708
|
-
}), { commands: p } = new
|
|
11708
|
+
}), { commands: p } = new vs({
|
|
11709
11709
|
editor: this.editor,
|
|
11710
11710
|
state: h
|
|
11711
11711
|
});
|
|
@@ -12167,7 +12167,7 @@ var J0 = class extends dy {
|
|
|
12167
12167
|
* Creates an command manager.
|
|
12168
12168
|
*/
|
|
12169
12169
|
createCommandManager() {
|
|
12170
|
-
this.commandManager = new
|
|
12170
|
+
this.commandManager = new vs({
|
|
12171
12171
|
editor: this
|
|
12172
12172
|
});
|
|
12173
12173
|
}
|
|
@@ -12328,7 +12328,7 @@ var J0 = class extends dy {
|
|
|
12328
12328
|
return Dd(this.state.doc, {
|
|
12329
12329
|
blockSeparator: t,
|
|
12330
12330
|
textSerializers: {
|
|
12331
|
-
...
|
|
12331
|
+
...xl(this.schema),
|
|
12332
12332
|
...r
|
|
12333
12333
|
}
|
|
12334
12334
|
});
|
|
@@ -12526,8 +12526,8 @@ var qe = class rf extends Tl {
|
|
|
12526
12526
|
return;
|
|
12527
12527
|
let d = 0, f = 0;
|
|
12528
12528
|
if (this.dom !== u) {
|
|
12529
|
-
const w = this.dom.getBoundingClientRect(),
|
|
12530
|
-
d =
|
|
12529
|
+
const w = this.dom.getBoundingClientRect(), x = u.getBoundingClientRect(), R = (i = n.offsetX) != null ? i : (r = n.nativeEvent) == null ? void 0 : r.offsetX, C = (o = n.offsetY) != null ? o : (s = n.nativeEvent) == null ? void 0 : s.offsetY;
|
|
12530
|
+
d = x.x - w.x + R, f = x.y - w.y + C;
|
|
12531
12531
|
}
|
|
12532
12532
|
const h = this.dom.cloneNode(!0);
|
|
12533
12533
|
try {
|
|
@@ -12689,14 +12689,14 @@ var Q0 = class extends J0 {
|
|
|
12689
12689
|
}
|
|
12690
12690
|
},
|
|
12691
12691
|
setup(n) {
|
|
12692
|
-
const e =
|
|
12692
|
+
const e = Pe(), t = Zh();
|
|
12693
12693
|
return ep(() => {
|
|
12694
12694
|
const r = n.editor;
|
|
12695
12695
|
r && r.options.element && e.value && tp(() => {
|
|
12696
12696
|
var i;
|
|
12697
12697
|
if (!e.value || !((i = r.view.dom) != null && i.firstChild))
|
|
12698
12698
|
return;
|
|
12699
|
-
const s =
|
|
12699
|
+
const s = Be(e.value);
|
|
12700
12700
|
e.value.append(r.view.dom), r.contentComponent = t.ctx._, t && (r.appContext = {
|
|
12701
12701
|
...t.appContext,
|
|
12702
12702
|
// Vue internally uses prototype chain to forward/shadow injects across the entire component chain
|
|
@@ -12828,7 +12828,7 @@ var ib = class extends X0 {
|
|
|
12828
12828
|
updateAttributes: (r = {}) => this.updateAttributes(r),
|
|
12829
12829
|
deleteNode: () => this.deleteNode()
|
|
12830
12830
|
}, e = this.onDragStart.bind(this);
|
|
12831
|
-
this.decorationClasses =
|
|
12831
|
+
this.decorationClasses = Pe(this.getDecorationClasses());
|
|
12832
12832
|
const t = Ke({
|
|
12833
12833
|
extends: { ...this.component },
|
|
12834
12834
|
props: Object.keys(n),
|
|
@@ -12969,11 +12969,11 @@ const ob = {
|
|
|
12969
12969
|
}
|
|
12970
12970
|
}), e.emoji.showPanel = !1;
|
|
12971
12971
|
}
|
|
12972
|
-
return (r, i) => (
|
|
12972
|
+
return (r, i) => (J(), xr(rp, { name: "slide-up" }, {
|
|
12973
12973
|
default: Qt(() => [
|
|
12974
|
-
n.emoji.showPanel ? (
|
|
12975
|
-
(
|
|
12976
|
-
|
|
12974
|
+
n.emoji.showPanel ? (J(), Q("div", ob, [
|
|
12975
|
+
(J(!0), Q(Br, null, fs(n.emoji.emojis, (s) => (J(), Q("div", null, [
|
|
12976
|
+
E("img", {
|
|
12977
12977
|
onClick: (o) => t(s),
|
|
12978
12978
|
class: "sus-emoji-item",
|
|
12979
12979
|
src: s.fallbackImage,
|
|
@@ -12981,7 +12981,7 @@ const ob = {
|
|
|
12981
12981
|
title: `:${s.name}:`
|
|
12982
12982
|
}, null, 8, lb)
|
|
12983
12983
|
]))), 256))
|
|
12984
|
-
])) :
|
|
12984
|
+
])) : de("", !0)
|
|
12985
12985
|
]),
|
|
12986
12986
|
_: 1
|
|
12987
12987
|
}));
|
|
@@ -13147,7 +13147,7 @@ var Di = (n, e) => {
|
|
|
13147
13147
|
})
|
|
13148
13148
|
];
|
|
13149
13149
|
}
|
|
13150
|
-
}), so = 4, kb = /^```([a-z]+)?[\s\n]$/,
|
|
13150
|
+
}), so = 4, kb = /^```([a-z]+)?[\s\n]$/, vb = /^~~~([a-z]+)?[\s\n]$/, sf = qe.create({
|
|
13151
13151
|
name: "codeBlock",
|
|
13152
13152
|
addOptions() {
|
|
13153
13153
|
return {
|
|
@@ -13255,13 +13255,13 @@ var Di = (n, e) => {
|
|
|
13255
13255
|
}
|
|
13256
13256
|
m += h[P].length + 1;
|
|
13257
13257
|
}
|
|
13258
|
-
const w = ((a = h[p].match(/^ */)) == null ? void 0 : a[0]) || "",
|
|
13259
|
-
if (
|
|
13258
|
+
const w = ((a = h[p].match(/^ */)) == null ? void 0 : a[0]) || "", x = Math.min(w.length, t);
|
|
13259
|
+
if (x === 0)
|
|
13260
13260
|
return !0;
|
|
13261
13261
|
let R = u;
|
|
13262
13262
|
for (let P = 0; P < p; P += 1)
|
|
13263
13263
|
R += h[P].length + 1;
|
|
13264
|
-
return l.delete(R, R +
|
|
13264
|
+
return l.delete(R, R + x), c - R <= x && l.setSelection(j.create(l.doc, R)), !0;
|
|
13265
13265
|
}) : n.commands.command(({ tr: l }) => {
|
|
13266
13266
|
const { from: a, to: c } = i, f = r.doc.textBetween(a, c, `
|
|
13267
13267
|
`, `
|
|
@@ -13309,7 +13309,7 @@ var Di = (n, e) => {
|
|
|
13309
13309
|
})
|
|
13310
13310
|
}),
|
|
13311
13311
|
zo({
|
|
13312
|
-
find:
|
|
13312
|
+
find: vb,
|
|
13313
13313
|
type: this.type,
|
|
13314
13314
|
getAttributes: (n) => ({
|
|
13315
13315
|
language: n[1]
|
|
@@ -13338,7 +13338,7 @@ var Di = (n, e) => {
|
|
|
13338
13338
|
})
|
|
13339
13339
|
];
|
|
13340
13340
|
}
|
|
13341
|
-
}),
|
|
13341
|
+
}), xb = sf, Sb = qe.create({
|
|
13342
13342
|
name: "doc",
|
|
13343
13343
|
topNode: !0,
|
|
13344
13344
|
content: "block+"
|
|
@@ -13559,7 +13559,7 @@ const Db = "aaa1rp3bb0ott3vie4c1le2ogado5udhabi7c0ademy5centure6ountant0s9o1tor4
|
|
|
13559
13559
|
function Bb(n, e) {
|
|
13560
13560
|
return n in e || (e[n] = []), e[n];
|
|
13561
13561
|
}
|
|
13562
|
-
function
|
|
13562
|
+
function xn(n, e, t) {
|
|
13563
13563
|
e[Ho] && (e[gr] = !0, e[dr] = !0), e[Fo] && (e[gr] = !0, e[Vo] = !0), e[gr] && (e[dr] = !0), e[Vo] && (e[dr] = !0), e[dr] && (e[jo] = !0), e[of] && (e[jo] = !0);
|
|
13564
13564
|
for (const r in e) {
|
|
13565
13565
|
const i = Bb(r, t);
|
|
@@ -13572,11 +13572,11 @@ function _b(n, e) {
|
|
|
13572
13572
|
e[r].indexOf(n) >= 0 && (t[r] = !0);
|
|
13573
13573
|
return t;
|
|
13574
13574
|
}
|
|
13575
|
-
function
|
|
13575
|
+
function Ge(n = null) {
|
|
13576
13576
|
this.j = {}, this.jr = [], this.jd = null, this.t = n;
|
|
13577
13577
|
}
|
|
13578
|
-
|
|
13579
|
-
|
|
13578
|
+
Ge.groups = {};
|
|
13579
|
+
Ge.prototype = {
|
|
13580
13580
|
accepts() {
|
|
13581
13581
|
return !!this.t;
|
|
13582
13582
|
},
|
|
@@ -13629,9 +13629,9 @@ Ye.prototype = {
|
|
|
13629
13629
|
* @returns {State<T>} taken after the given input
|
|
13630
13630
|
*/
|
|
13631
13631
|
tr(n, e, t, r) {
|
|
13632
|
-
r = r ||
|
|
13632
|
+
r = r || Ge.groups;
|
|
13633
13633
|
let i;
|
|
13634
|
-
return e && e.j ? i = e : (i = new
|
|
13634
|
+
return e && e.j ? i = e : (i = new Ge(e), t && r && xn(e, t, r)), this.jr.push([n, i]), i;
|
|
13635
13635
|
},
|
|
13636
13636
|
/**
|
|
13637
13637
|
* Short for "take transitions", will take as many sequential transitions as
|
|
@@ -13679,24 +13679,24 @@ Ye.prototype = {
|
|
|
13679
13679
|
* @returns {State<T>} taken after the given input
|
|
13680
13680
|
*/
|
|
13681
13681
|
tt(n, e, t, r) {
|
|
13682
|
-
r = r ||
|
|
13682
|
+
r = r || Ge.groups;
|
|
13683
13683
|
const i = this;
|
|
13684
13684
|
if (e && e.j)
|
|
13685
13685
|
return i.j[n] = e, e;
|
|
13686
13686
|
const s = e;
|
|
13687
13687
|
let o, l = i.go(n);
|
|
13688
|
-
if (l ? (o = new
|
|
13688
|
+
if (l ? (o = new Ge(), Object.assign(o.j, l.j), o.jr.push.apply(o.jr, l.jr), o.jd = l.jd, o.t = l.t) : o = new Ge(), s) {
|
|
13689
13689
|
if (r)
|
|
13690
13690
|
if (o.t && typeof o.t == "string") {
|
|
13691
13691
|
const a = Object.assign(_b(o.t, r), t);
|
|
13692
|
-
|
|
13693
|
-
} else t &&
|
|
13692
|
+
xn(s, a, r);
|
|
13693
|
+
} else t && xn(s, t, r);
|
|
13694
13694
|
o.t = s;
|
|
13695
13695
|
}
|
|
13696
13696
|
return i.j[n] = o, o;
|
|
13697
13697
|
}
|
|
13698
13698
|
};
|
|
13699
|
-
const Y = (n, e, t, r, i) => n.ta(e, t, r, i),
|
|
13699
|
+
const Y = (n, e, t, r, i) => n.ta(e, t, r, i), fe = (n, e, t, r, i) => n.tr(e, t, r, i), bc = (n, e, t, r, i) => n.ts(e, t, r, i), S = (n, e, t, r, i) => n.tt(e, t, r, i), It = "WORD", Uo = "UWORD", lf = "ASCIINUMERICAL", af = "ALPHANUMERICAL", Ir = "LOCALHOST", Wo = "TLD", Ko = "UTLD", gi = "SCHEME", Vn = "SLASH_SCHEME", Ol = "NUM", qo = "WS", Al = "NL", yr = "OPENBRACE", br = "CLOSEBRACE", Ii = "OPENBRACKET", Pi = "CLOSEBRACKET", Li = "OPENPAREN", Bi = "CLOSEPAREN", _i = "OPENANGLEBRACKET", $i = "CLOSEANGLEBRACKET", zi = "FULLWIDTHLEFTPAREN", Hi = "FULLWIDTHRIGHTPAREN", Fi = "LEFTCORNERBRACKET", Vi = "RIGHTCORNERBRACKET", ji = "LEFTWHITECORNERBRACKET", Ui = "RIGHTWHITECORNERBRACKET", Wi = "FULLWIDTHLESSTHAN", Ki = "FULLWIDTHGREATERTHAN", qi = "AMPERSAND", Ji = "APOSTROPHE", Gi = "ASTERISK", Yt = "AT", Yi = "BACKSLASH", Xi = "BACKTICK", Qi = "CARET", en = "COLON", Nl = "COMMA", Zi = "DOLLAR", wt = "DOT", es = "EQUALS", Rl = "EXCLAMATION", nt = "HYPHEN", wr = "PERCENT", ts = "PIPE", ns = "PLUS", rs = "POUND", kr = "QUERY", Dl = "QUOTE", cf = "FULLWIDTHMIDDLEDOT", Il = "SEMI", kt = "SLASH", vr = "TILDE", is = "UNDERSCORE", uf = "EMOJI", ss = "SYM";
|
|
13700
13700
|
var df = /* @__PURE__ */ Object.freeze({
|
|
13701
13701
|
__proto__: null,
|
|
13702
13702
|
ALPHANUMERICAL: af,
|
|
@@ -13724,7 +13724,7 @@ var df = /* @__PURE__ */ Object.freeze({
|
|
|
13724
13724
|
FULLWIDTHLESSTHAN: Wi,
|
|
13725
13725
|
FULLWIDTHMIDDLEDOT: cf,
|
|
13726
13726
|
FULLWIDTHRIGHTPAREN: Hi,
|
|
13727
|
-
HYPHEN:
|
|
13727
|
+
HYPHEN: nt,
|
|
13728
13728
|
LEFTCORNERBRACKET: Fi,
|
|
13729
13729
|
LEFTWHITECORNERBRACKET: ji,
|
|
13730
13730
|
LOCALHOST: Ir,
|
|
@@ -13747,7 +13747,7 @@ var df = /* @__PURE__ */ Object.freeze({
|
|
|
13747
13747
|
SLASH: kt,
|
|
13748
13748
|
SLASH_SCHEME: Vn,
|
|
13749
13749
|
SYM: ss,
|
|
13750
|
-
TILDE:
|
|
13750
|
+
TILDE: vr,
|
|
13751
13751
|
TLD: Wo,
|
|
13752
13752
|
UNDERSCORE: is,
|
|
13753
13753
|
UTLD: Ko,
|
|
@@ -13760,54 +13760,54 @@ const Rt = /[a-z]/, lr = new RegExp("\\p{L}", "u"), lo = new RegExp("\\p{Emoji}"
|
|
|
13760
13760
|
let ri = null, ii = null;
|
|
13761
13761
|
function Hb(n = []) {
|
|
13762
13762
|
const e = {};
|
|
13763
|
-
|
|
13764
|
-
const t = new
|
|
13765
|
-
ri == null && (ri = kc(Db)), ii == null && (ii = kc(Ib)), S(t, "'", Ji), S(t, "{", yr), S(t, "}", br), S(t, "[", Ii), S(t, "]", Pi), S(t, "(", Li), S(t, ")", Bi), S(t, "<", _i), S(t, ">", $i), S(t, "(", zi), S(t, ")", Hi), S(t, "「", Fi), S(t, "」", Vi), S(t, "『", ji), S(t, "』", Ui), S(t, "<", Wi), S(t, ">", Ki), S(t, "&", qi), S(t, "*", Gi), S(t, "@", Yt), S(t, "`", Xi), S(t, "^", Qi), S(t, ":", en), S(t, ",", Nl), S(t, "$", Zi), S(t, ".", wt), S(t, "=", es), S(t, "!", Rl), S(t, "-",
|
|
13766
|
-
const r =
|
|
13763
|
+
Ge.groups = e;
|
|
13764
|
+
const t = new Ge();
|
|
13765
|
+
ri == null && (ri = kc(Db)), ii == null && (ii = kc(Ib)), S(t, "'", Ji), S(t, "{", yr), S(t, "}", br), S(t, "[", Ii), S(t, "]", Pi), S(t, "(", Li), S(t, ")", Bi), S(t, "<", _i), S(t, ">", $i), S(t, "(", zi), S(t, ")", Hi), S(t, "「", Fi), S(t, "」", Vi), S(t, "『", ji), S(t, "』", Ui), S(t, "<", Wi), S(t, ">", Ki), S(t, "&", qi), S(t, "*", Gi), S(t, "@", Yt), S(t, "`", Xi), S(t, "^", Qi), S(t, ":", en), S(t, ",", Nl), S(t, "$", Zi), S(t, ".", wt), S(t, "=", es), S(t, "!", Rl), S(t, "-", nt), S(t, "%", wr), S(t, "|", ts), S(t, "+", ns), S(t, "#", rs), S(t, "?", kr), S(t, '"', Dl), S(t, "/", kt), S(t, ";", Il), S(t, "~", vr), S(t, "_", is), S(t, "\\", Yi), S(t, "・", cf);
|
|
13766
|
+
const r = fe(t, Dt, Ol, {
|
|
13767
13767
|
[Ho]: !0
|
|
13768
13768
|
});
|
|
13769
|
-
|
|
13770
|
-
const i =
|
|
13769
|
+
fe(r, Dt, r);
|
|
13770
|
+
const i = fe(r, Rt, lf, {
|
|
13771
13771
|
[gr]: !0
|
|
13772
|
-
}), s =
|
|
13772
|
+
}), s = fe(r, lr, af, {
|
|
13773
13773
|
[dr]: !0
|
|
13774
|
-
}), o =
|
|
13774
|
+
}), o = fe(t, Rt, It, {
|
|
13775
13775
|
[Fo]: !0
|
|
13776
13776
|
});
|
|
13777
|
-
|
|
13778
|
-
const l =
|
|
13777
|
+
fe(o, Dt, i), fe(o, Rt, o), fe(i, Dt, i), fe(i, Rt, i);
|
|
13778
|
+
const l = fe(t, lr, Uo, {
|
|
13779
13779
|
[Vo]: !0
|
|
13780
13780
|
});
|
|
13781
|
-
|
|
13781
|
+
fe(l, Rt), fe(l, Dt, s), fe(l, lr, l), fe(s, Dt, s), fe(s, Rt), fe(s, lr, s);
|
|
13782
13782
|
const a = S(t, co, Al, {
|
|
13783
13783
|
[oo]: !0
|
|
13784
13784
|
}), c = S(t, wc, qo, {
|
|
13785
13785
|
[oo]: !0
|
|
13786
|
-
}), u =
|
|
13786
|
+
}), u = fe(t, ao, qo, {
|
|
13787
13787
|
[oo]: !0
|
|
13788
13788
|
});
|
|
13789
|
-
S(t, uo, u), S(c, co, a), S(c, uo, u),
|
|
13790
|
-
const d =
|
|
13789
|
+
S(t, uo, u), S(c, co, a), S(c, uo, u), fe(c, ao, u), S(u, wc), S(u, co), fe(u, ao, u), S(u, uo, u);
|
|
13790
|
+
const d = fe(t, lo, uf, {
|
|
13791
13791
|
[of]: !0
|
|
13792
13792
|
});
|
|
13793
|
-
S(d, "#"),
|
|
13793
|
+
S(d, "#"), fe(d, lo, d), S(d, $b, d);
|
|
13794
13794
|
const f = S(d, zb);
|
|
13795
|
-
S(f, "#"),
|
|
13795
|
+
S(f, "#"), fe(f, lo, d);
|
|
13796
13796
|
const h = [[Rt, o], [Dt, i]], p = [[Rt, null], [lr, l], [Dt, s]];
|
|
13797
13797
|
for (let m = 0; m < ri.length; m++)
|
|
13798
13798
|
qt(t, ri[m], Wo, It, h);
|
|
13799
13799
|
for (let m = 0; m < ii.length; m++)
|
|
13800
13800
|
qt(t, ii[m], Ko, Uo, p);
|
|
13801
|
-
|
|
13801
|
+
xn(Wo, {
|
|
13802
13802
|
tld: !0,
|
|
13803
13803
|
ascii: !0
|
|
13804
|
-
}, e),
|
|
13804
|
+
}, e), xn(Ko, {
|
|
13805
13805
|
utld: !0,
|
|
13806
13806
|
alpha: !0
|
|
13807
|
-
}, e), qt(t, "file", gi, It, h), qt(t, "mailto", gi, It, h), qt(t, "http", Vn, It, h), qt(t, "https", Vn, It, h), qt(t, "ftp", Vn, It, h), qt(t, "ftps", Vn, It, h),
|
|
13807
|
+
}, e), qt(t, "file", gi, It, h), qt(t, "mailto", gi, It, h), qt(t, "http", Vn, It, h), qt(t, "https", Vn, It, h), qt(t, "ftp", Vn, It, h), qt(t, "ftps", Vn, It, h), xn(gi, {
|
|
13808
13808
|
scheme: !0,
|
|
13809
13809
|
ascii: !0
|
|
13810
|
-
}, e),
|
|
13810
|
+
}, e), xn(Vn, {
|
|
13811
13811
|
slashscheme: !0,
|
|
13812
13812
|
ascii: !0
|
|
13813
13813
|
}, e), n = n.sort((m, g) => m[0] > g[0] ? 1 : -1);
|
|
@@ -13821,7 +13821,7 @@ function Hb(n = []) {
|
|
|
13821
13821
|
}
|
|
13822
13822
|
return bc(t, "localhost", Ir, {
|
|
13823
13823
|
ascii: !0
|
|
13824
|
-
}), t.jd = new
|
|
13824
|
+
}), t.jd = new Ge(ss), {
|
|
13825
13825
|
start: t,
|
|
13826
13826
|
tokens: Object.assign({
|
|
13827
13827
|
groups: e
|
|
@@ -13862,9 +13862,9 @@ function qt(n, e, t, r, i) {
|
|
|
13862
13862
|
const o = e.length;
|
|
13863
13863
|
for (let l = 0; l < o - 1; l++) {
|
|
13864
13864
|
const a = e[l];
|
|
13865
|
-
n.j[a] ? s = n.j[a] : (s = new
|
|
13865
|
+
n.j[a] ? s = n.j[a] : (s = new Ge(r), s.jr = i.slice(), n.j[a] = s), n = s;
|
|
13866
13866
|
}
|
|
13867
|
-
return s = new
|
|
13867
|
+
return s = new Ge(t), s.jr = i.slice(), n.j[e[o - 1]] = s, s;
|
|
13868
13868
|
}
|
|
13869
13869
|
function kc(n) {
|
|
13870
13870
|
const e = [], t = [];
|
|
@@ -13886,8 +13886,8 @@ function kc(n) {
|
|
|
13886
13886
|
const Pr = {
|
|
13887
13887
|
defaultProtocol: "http",
|
|
13888
13888
|
events: null,
|
|
13889
|
-
format:
|
|
13890
|
-
formatHref:
|
|
13889
|
+
format: vc,
|
|
13890
|
+
formatHref: vc,
|
|
13891
13891
|
nl2br: !1,
|
|
13892
13892
|
tagName: "a",
|
|
13893
13893
|
target: null,
|
|
@@ -13969,7 +13969,7 @@ Pl.prototype = {
|
|
|
13969
13969
|
return (this.get("render", null, n) || this.defaultRender)(e, n.t, n);
|
|
13970
13970
|
}
|
|
13971
13971
|
};
|
|
13972
|
-
function
|
|
13972
|
+
function vc(n) {
|
|
13973
13973
|
return n;
|
|
13974
13974
|
}
|
|
13975
13975
|
function hf(n, e) {
|
|
@@ -14089,7 +14089,7 @@ function Os(n, e) {
|
|
|
14089
14089
|
t.prototype[r] = e[r];
|
|
14090
14090
|
return t.t = n, t;
|
|
14091
14091
|
}
|
|
14092
|
-
const
|
|
14092
|
+
const xc = Os("email", {
|
|
14093
14093
|
isLink: !0,
|
|
14094
14094
|
toHref() {
|
|
14095
14095
|
return "mailto:" + this.toString();
|
|
@@ -14114,38 +14114,38 @@ const vc = Os("email", {
|
|
|
14114
14114
|
const n = this.tk;
|
|
14115
14115
|
return n.length >= 2 && n[0].t !== Ir && n[1].t === en;
|
|
14116
14116
|
}
|
|
14117
|
-
}),
|
|
14117
|
+
}), tt = (n) => new Ge(n);
|
|
14118
14118
|
function jb({
|
|
14119
14119
|
groups: n
|
|
14120
14120
|
}) {
|
|
14121
|
-
const e = n.domain.concat([qi, Gi, Yt, Yi, Xi, Qi, Zi, es,
|
|
14121
|
+
const e = n.domain.concat([qi, Gi, Yt, Yi, Xi, Qi, Zi, es, nt, Ol, wr, ts, ns, rs, kt, ss, vr, is]), t = [Ji, en, Nl, wt, Rl, wr, kr, Dl, Il, _i, $i, yr, br, Pi, Ii, Li, Bi, zi, Hi, Fi, Vi, ji, Ui, Wi, Ki], r = [qi, Ji, Gi, Yi, Xi, Qi, Zi, es, nt, yr, br, wr, ts, ns, rs, kr, kt, ss, vr, is], i = tt(), s = S(i, vr);
|
|
14122
14122
|
Y(s, r, s), Y(s, n.domain, s);
|
|
14123
|
-
const o =
|
|
14123
|
+
const o = tt(), l = tt(), a = tt();
|
|
14124
14124
|
Y(i, n.domain, o), Y(i, n.scheme, l), Y(i, n.slashscheme, a), Y(o, r, s), Y(o, n.domain, o);
|
|
14125
14125
|
const c = S(o, Yt);
|
|
14126
14126
|
S(s, Yt, c), S(l, Yt, c), S(a, Yt, c);
|
|
14127
14127
|
const u = S(s, wt);
|
|
14128
14128
|
Y(u, r, s), Y(u, n.domain, s);
|
|
14129
|
-
const d =
|
|
14129
|
+
const d = tt();
|
|
14130
14130
|
Y(c, n.domain, d), Y(d, n.domain, d);
|
|
14131
14131
|
const f = S(d, wt);
|
|
14132
14132
|
Y(f, n.domain, d);
|
|
14133
|
-
const h =
|
|
14133
|
+
const h = tt(xc);
|
|
14134
14134
|
Y(f, n.tld, h), Y(f, n.utld, h), S(c, Ir, h);
|
|
14135
|
-
const p = S(d,
|
|
14136
|
-
S(p,
|
|
14135
|
+
const p = S(d, nt);
|
|
14136
|
+
S(p, nt, p), Y(p, n.domain, d), Y(h, n.domain, d), S(h, wt, f), S(h, nt, p);
|
|
14137
14137
|
const m = S(h, en);
|
|
14138
|
-
Y(m, n.numeric,
|
|
14139
|
-
const g = S(o,
|
|
14140
|
-
S(g,
|
|
14141
|
-
const w =
|
|
14142
|
-
Y(b, n.tld, w), Y(b, n.utld, w), Y(w, n.domain, o), Y(w, r, s), S(w, wt, b), S(w,
|
|
14143
|
-
const
|
|
14144
|
-
Y(
|
|
14145
|
-
const C =
|
|
14138
|
+
Y(m, n.numeric, xc);
|
|
14139
|
+
const g = S(o, nt), b = S(o, wt);
|
|
14140
|
+
S(g, nt, g), Y(g, n.domain, o), Y(b, r, s), Y(b, n.domain, o);
|
|
14141
|
+
const w = tt(si);
|
|
14142
|
+
Y(b, n.tld, w), Y(b, n.utld, w), Y(w, n.domain, o), Y(w, r, s), S(w, wt, b), S(w, nt, g), S(w, Yt, c);
|
|
14143
|
+
const x = S(w, en), R = tt(si);
|
|
14144
|
+
Y(x, n.numeric, R);
|
|
14145
|
+
const C = tt(si), P = tt();
|
|
14146
14146
|
Y(C, e, C), Y(C, t, P), Y(P, e, C), Y(P, t, P), S(w, kt, C), S(R, kt, C);
|
|
14147
14147
|
const T = S(l, en), $ = S(a, en), K = S($, kt), V = S(K, kt);
|
|
14148
|
-
Y(l, n.domain, o), S(l, wt, b), S(l,
|
|
14148
|
+
Y(l, n.domain, o), S(l, wt, b), S(l, nt, g), Y(a, n.domain, o), S(a, wt, b), S(a, nt, g), Y(T, n.domain, C), S(T, kt, C), S(T, kr, C), Y(V, n.domain, C), Y(V, e, C), S(V, kt, C);
|
|
14149
14149
|
const U = [
|
|
14150
14150
|
[yr, br],
|
|
14151
14151
|
// {}
|
|
@@ -14167,9 +14167,9 @@ function jb({
|
|
|
14167
14167
|
for (let D = 0; D < U.length; D++) {
|
|
14168
14168
|
const [Z, te] = U[D], Se = S(C, Z);
|
|
14169
14169
|
S(P, Z, Se), S(Se, te, C);
|
|
14170
|
-
const ge =
|
|
14170
|
+
const ge = tt(si);
|
|
14171
14171
|
Y(Se, e, ge);
|
|
14172
|
-
const ye =
|
|
14172
|
+
const ye = tt();
|
|
14173
14173
|
Y(Se, t), Y(ge, e, ge), Y(ge, t, ye), Y(ye, e, ge), Y(ye, t, ye), S(ge, te, C), S(ye, te, C);
|
|
14174
14174
|
}
|
|
14175
14175
|
return S(i, Ir, w), S(i, Al, Vb), {
|
|
@@ -14209,7 +14209,7 @@ const Wb = typeof console < "u" && console && console.warn || (() => {
|
|
|
14209
14209
|
initialized: !1
|
|
14210
14210
|
};
|
|
14211
14211
|
function qb() {
|
|
14212
|
-
return
|
|
14212
|
+
return Ge.groups = {}, le.scanner = null, le.parser = null, le.tokenQueue = [], le.pluginQueue = [], le.customSchemes = [], le.initialized = !1, le;
|
|
14213
14213
|
}
|
|
14214
14214
|
function Cc(n, e = !1) {
|
|
14215
14215
|
if (le.initialized && Wb(`linkifyjs: already initialized - will not register custom scheme "${n}" ${Kb}`), !/^[0-9a-z]+(-[0-9a-z]+)*$/.test(n))
|
|
@@ -14615,11 +14615,11 @@ i1(o1, {
|
|
|
14615
14615
|
hasListItemAfter: () => l1,
|
|
14616
14616
|
hasListItemBefore: () => wf,
|
|
14617
14617
|
listItemHasSubList: () => kf,
|
|
14618
|
-
nextListIsDeeper: () =>
|
|
14619
|
-
nextListIsHigher: () =>
|
|
14618
|
+
nextListIsDeeper: () => vf,
|
|
14619
|
+
nextListIsHigher: () => xf
|
|
14620
14620
|
});
|
|
14621
14621
|
var Hr = (n, e) => {
|
|
14622
|
-
const { $from: t } = e.selection, r =
|
|
14622
|
+
const { $from: t } = e.selection, r = xe(n, e.schema);
|
|
14623
14623
|
let i = null, s = t.depth, o = t.pos, l = null;
|
|
14624
14624
|
for (; s > 0 && l === null; )
|
|
14625
14625
|
i = t.node(s), i.type === r ? l = s : (s -= 1, o -= 1);
|
|
@@ -14628,7 +14628,7 @@ var Hr = (n, e) => {
|
|
|
14628
14628
|
const t = Hr(n, e);
|
|
14629
14629
|
if (!t)
|
|
14630
14630
|
return !1;
|
|
14631
|
-
const [, r] =
|
|
14631
|
+
const [, r] = xy(e, n, t.$pos.pos + 4);
|
|
14632
14632
|
return r;
|
|
14633
14633
|
}, bf = (n, e, t) => {
|
|
14634
14634
|
const { $anchor: r } = n.selection, i = Math.max(0, r.pos - 2), s = n.doc.resolve(i).node();
|
|
@@ -14640,7 +14640,7 @@ var Hr = (n, e) => {
|
|
|
14640
14640
|
}, kf = (n, e, t) => {
|
|
14641
14641
|
if (!t)
|
|
14642
14642
|
return !1;
|
|
14643
|
-
const r =
|
|
14643
|
+
const r = xe(n, e.schema);
|
|
14644
14644
|
let i = !1;
|
|
14645
14645
|
return t.descendants((s) => {
|
|
14646
14646
|
s.type === r && (i = !0);
|
|
@@ -14668,17 +14668,17 @@ var Hr = (n, e) => {
|
|
|
14668
14668
|
return !1;
|
|
14669
14669
|
const s = n.state.doc.resolve(r.$pos.pos - 2).node(r.depth), o = kf(e, n.state, s);
|
|
14670
14670
|
return wf(e, n.state) && !o ? n.commands.joinItemBackward() : n.chain().liftListItem(e).run();
|
|
14671
|
-
},
|
|
14671
|
+
}, vf = (n, e) => {
|
|
14672
14672
|
const t = _l(n, e), r = Hr(n, e);
|
|
14673
14673
|
return !r || !t ? !1 : t > r.depth;
|
|
14674
|
-
},
|
|
14674
|
+
}, xf = (n, e) => {
|
|
14675
14675
|
const t = _l(n, e), r = Hr(n, e);
|
|
14676
14676
|
return !r || !t ? !1 : t < r.depth;
|
|
14677
14677
|
}, Go = (n, e) => {
|
|
14678
14678
|
if (!dn(n.state, e) || !My(n.state, e))
|
|
14679
14679
|
return !1;
|
|
14680
14680
|
const { selection: t } = n.state, { $from: r, $to: i } = t;
|
|
14681
|
-
return !t.empty && r.sameParent(i) ? !1 :
|
|
14681
|
+
return !t.empty && r.sameParent(i) ? !1 : vf(e, n.state) ? n.chain().focus(n.state.selection.from + 4).lift(e).joinBackward().run() : xf(e, n.state) ? n.chain().joinForward().joinBackward().run() : n.commands.joinItemForward();
|
|
14682
14682
|
}, l1 = (n, e) => {
|
|
14683
14683
|
var t;
|
|
14684
14684
|
const { $anchor: r } = e.selection, i = e.doc.resolve(r.pos - r.parentOffset - 2);
|
|
@@ -15184,7 +15184,7 @@ class he extends F {
|
|
|
15184
15184
|
*/
|
|
15185
15185
|
static valid(e) {
|
|
15186
15186
|
let t = e.parent;
|
|
15187
|
-
if (t.isTextblock || !k1(e) || !
|
|
15187
|
+
if (t.isTextblock || !k1(e) || !v1(e))
|
|
15188
15188
|
return !1;
|
|
15189
15189
|
let r = t.type.spec.allowGapCursor;
|
|
15190
15190
|
if (r != null)
|
|
@@ -15262,7 +15262,7 @@ function k1(n) {
|
|
|
15262
15262
|
}
|
|
15263
15263
|
return !0;
|
|
15264
15264
|
}
|
|
15265
|
-
function
|
|
15265
|
+
function v1(n) {
|
|
15266
15266
|
for (let e = n.depth; e >= 0; e--) {
|
|
15267
15267
|
let t = n.indexAfter(e), r = n.node(e);
|
|
15268
15268
|
if (t == r.childCount) {
|
|
@@ -15279,7 +15279,7 @@ function x1(n) {
|
|
|
15279
15279
|
}
|
|
15280
15280
|
return !0;
|
|
15281
15281
|
}
|
|
15282
|
-
function
|
|
15282
|
+
function x1() {
|
|
15283
15283
|
return new ae({
|
|
15284
15284
|
props: {
|
|
15285
15285
|
decorations: E1,
|
|
@@ -15326,9 +15326,9 @@ function M1(n, e) {
|
|
|
15326
15326
|
let { $from: t } = n.state.selection, r = t.parent.contentMatchAt(t.index()).findWrapping(n.state.schema.nodes.text);
|
|
15327
15327
|
if (!r)
|
|
15328
15328
|
return !1;
|
|
15329
|
-
let i =
|
|
15329
|
+
let i = v.empty;
|
|
15330
15330
|
for (let o = r.length - 1; o >= 0; o--)
|
|
15331
|
-
i =
|
|
15331
|
+
i = v.from(r[o].createAndFill(null, i));
|
|
15332
15332
|
let s = n.state.tr.replace(t.pos, t.pos, new A(i, 0, 0));
|
|
15333
15333
|
return s.setSelection(j.near(s.doc.resolve(t.pos + 1))), n.dispatch(s), !1;
|
|
15334
15334
|
}
|
|
@@ -15338,36 +15338,36 @@ function E1(n) {
|
|
|
15338
15338
|
let e = document.createElement("div");
|
|
15339
15339
|
return e.className = "ProseMirror-gapcursor", ce.create(n.doc, [He.widget(n.selection.head, e, { key: "gapcursor" })]);
|
|
15340
15340
|
}
|
|
15341
|
-
var ls = 200,
|
|
15341
|
+
var ls = 200, Ae = function() {
|
|
15342
15342
|
};
|
|
15343
|
-
|
|
15344
|
-
return e.length ? (e =
|
|
15343
|
+
Ae.prototype.append = function(e) {
|
|
15344
|
+
return e.length ? (e = Ae.from(e), !this.length && e || e.length < ls && this.leafAppend(e) || this.length < ls && e.leafPrepend(this) || this.appendInner(e)) : this;
|
|
15345
15345
|
};
|
|
15346
|
-
|
|
15347
|
-
return e.length ?
|
|
15346
|
+
Ae.prototype.prepend = function(e) {
|
|
15347
|
+
return e.length ? Ae.from(e).append(this) : this;
|
|
15348
15348
|
};
|
|
15349
|
-
|
|
15349
|
+
Ae.prototype.appendInner = function(e) {
|
|
15350
15350
|
return new T1(this, e);
|
|
15351
15351
|
};
|
|
15352
|
-
|
|
15353
|
-
return e === void 0 && (e = 0), t === void 0 && (t = this.length), e >= t ?
|
|
15352
|
+
Ae.prototype.slice = function(e, t) {
|
|
15353
|
+
return e === void 0 && (e = 0), t === void 0 && (t = this.length), e >= t ? Ae.empty : this.sliceInner(Math.max(0, e), Math.min(this.length, t));
|
|
15354
15354
|
};
|
|
15355
|
-
|
|
15355
|
+
Ae.prototype.get = function(e) {
|
|
15356
15356
|
if (!(e < 0 || e >= this.length))
|
|
15357
15357
|
return this.getInner(e);
|
|
15358
15358
|
};
|
|
15359
|
-
|
|
15359
|
+
Ae.prototype.forEach = function(e, t, r) {
|
|
15360
15360
|
t === void 0 && (t = 0), r === void 0 && (r = this.length), t <= r ? this.forEachInner(e, t, r, 0) : this.forEachInvertedInner(e, t, r, 0);
|
|
15361
15361
|
};
|
|
15362
|
-
|
|
15362
|
+
Ae.prototype.map = function(e, t, r) {
|
|
15363
15363
|
t === void 0 && (t = 0), r === void 0 && (r = this.length);
|
|
15364
15364
|
var i = [];
|
|
15365
15365
|
return this.forEach(function(s, o) {
|
|
15366
15366
|
return i.push(e(s, o));
|
|
15367
15367
|
}, t, r), i;
|
|
15368
15368
|
};
|
|
15369
|
-
|
|
15370
|
-
return e instanceof
|
|
15369
|
+
Ae.from = function(e) {
|
|
15370
|
+
return e instanceof Ae ? e : e && e.length ? new Mf(e) : Ae.empty;
|
|
15371
15371
|
};
|
|
15372
15372
|
var Mf = /* @__PURE__ */ (function(n) {
|
|
15373
15373
|
function e(r) {
|
|
@@ -15400,8 +15400,8 @@ var Mf = /* @__PURE__ */ (function(n) {
|
|
|
15400
15400
|
}, t.depth.get = function() {
|
|
15401
15401
|
return 0;
|
|
15402
15402
|
}, Object.defineProperties(e.prototype, t), e;
|
|
15403
|
-
})(
|
|
15404
|
-
|
|
15403
|
+
})(Ae);
|
|
15404
|
+
Ae.empty = new Mf([]);
|
|
15405
15405
|
var T1 = /* @__PURE__ */ (function(n) {
|
|
15406
15406
|
function e(t, r) {
|
|
15407
15407
|
n.call(this), this.left = t, this.right = r, this.length = t.length + r.length, this.depth = Math.max(t.depth, r.depth) + 1;
|
|
@@ -15434,7 +15434,7 @@ var T1 = /* @__PURE__ */ (function(n) {
|
|
|
15434
15434
|
}, e.prototype.appendInner = function(r) {
|
|
15435
15435
|
return this.left.depth >= Math.max(this.right.depth, r.depth) + 1 ? new e(this.left, new e(this.right, r)) : new e(this, r);
|
|
15436
15436
|
}, e;
|
|
15437
|
-
})(
|
|
15437
|
+
})(Ae);
|
|
15438
15438
|
const O1 = 500;
|
|
15439
15439
|
class dt {
|
|
15440
15440
|
constructor(e, t) {
|
|
@@ -15460,9 +15460,9 @@ class dt {
|
|
|
15460
15460
|
return;
|
|
15461
15461
|
}
|
|
15462
15462
|
if (i) {
|
|
15463
|
-
u.push(new
|
|
15463
|
+
u.push(new vt(d.map));
|
|
15464
15464
|
let h = d.step.map(i.slice(s)), p;
|
|
15465
|
-
h && o.maybeStep(h).doc && (p = o.mapping.maps[o.mapping.maps.length - 1], c.push(new
|
|
15465
|
+
h && o.maybeStep(h).doc && (p = o.mapping.maps[o.mapping.maps.length - 1], c.push(new vt(p, void 0, void 0, c.length + u.length))), s--, p && i.appendMap(p, s);
|
|
15466
15466
|
} else
|
|
15467
15467
|
o.maybeStep(d.step);
|
|
15468
15468
|
if (d.selection)
|
|
@@ -15473,7 +15473,7 @@ class dt {
|
|
|
15473
15473
|
addTransform(e, t, r, i) {
|
|
15474
15474
|
let s = [], o = this.eventCount, l = this.items, a = !i && l.length ? l.get(l.length - 1) : null;
|
|
15475
15475
|
for (let u = 0; u < e.steps.length; u++) {
|
|
15476
|
-
let d = e.steps[u].invert(e.docs[u]), f = new
|
|
15476
|
+
let d = e.steps[u].invert(e.docs[u]), f = new vt(e.mapping.maps[u], d, t), h;
|
|
15477
15477
|
(h = a && a.merge(f)) && (f = h, u ? s.pop() : l = l.slice(0, l.length - 1)), s.push(f), t && (o++, t = void 0), i || (a = f);
|
|
15478
15478
|
}
|
|
15479
15479
|
let c = o - r.depth;
|
|
@@ -15487,7 +15487,7 @@ class dt {
|
|
|
15487
15487
|
}, e, t), r;
|
|
15488
15488
|
}
|
|
15489
15489
|
addMaps(e) {
|
|
15490
|
-
return this.eventCount == 0 ? this : new dt(this.items.append(e.map((t) => new
|
|
15490
|
+
return this.eventCount == 0 ? this : new dt(this.items.append(e.map((t) => new vt(t))), this.eventCount);
|
|
15491
15491
|
}
|
|
15492
15492
|
// When the collab module receives remote changes, the history has
|
|
15493
15493
|
// to know about those, so that it can adjust the steps that were
|
|
@@ -15509,13 +15509,13 @@ class dt {
|
|
|
15509
15509
|
let p = s.maps[h];
|
|
15510
15510
|
if (f.step) {
|
|
15511
15511
|
let m = e.steps[h].invert(e.docs[h]), g = f.selection && f.selection.map(s.slice(a + 1, h));
|
|
15512
|
-
g && l++, r.push(new
|
|
15512
|
+
g && l++, r.push(new vt(p, m, g));
|
|
15513
15513
|
} else
|
|
15514
|
-
r.push(new
|
|
15514
|
+
r.push(new vt(p));
|
|
15515
15515
|
}, i);
|
|
15516
15516
|
let c = [];
|
|
15517
15517
|
for (let f = t; f < o; f++)
|
|
15518
|
-
c.push(new
|
|
15518
|
+
c.push(new vt(s.maps[f]));
|
|
15519
15519
|
let u = this.items.slice(0, i).append(c).append(r), d = new dt(u, l);
|
|
15520
15520
|
return d.emptyItemCount() > O1 && (d = d.compress(this.items.length - r.length)), d;
|
|
15521
15521
|
}
|
|
@@ -15541,14 +15541,14 @@ class dt {
|
|
|
15541
15541
|
if (r--, c && t.appendMap(c, r), a) {
|
|
15542
15542
|
let u = o.selection && o.selection.map(t.slice(r));
|
|
15543
15543
|
u && s++;
|
|
15544
|
-
let d = new
|
|
15544
|
+
let d = new vt(c.invert(), a, u), f, h = i.length - 1;
|
|
15545
15545
|
(f = i.length && i[h].merge(d)) ? i[h] = f : i.push(d);
|
|
15546
15546
|
}
|
|
15547
15547
|
} else o.map && r--;
|
|
15548
|
-
}, this.items.length, 0), new dt(
|
|
15548
|
+
}, this.items.length, 0), new dt(Ae.from(i.reverse()), s);
|
|
15549
15549
|
}
|
|
15550
15550
|
}
|
|
15551
|
-
dt.empty = new dt(
|
|
15551
|
+
dt.empty = new dt(Ae.empty, 0);
|
|
15552
15552
|
function A1(n, e) {
|
|
15553
15553
|
let t;
|
|
15554
15554
|
return n.forEach((r, i) => {
|
|
@@ -15556,7 +15556,7 @@ function A1(n, e) {
|
|
|
15556
15556
|
return t = i, !1;
|
|
15557
15557
|
}), n.slice(t);
|
|
15558
15558
|
}
|
|
15559
|
-
class
|
|
15559
|
+
class vt {
|
|
15560
15560
|
constructor(e, t, r, i) {
|
|
15561
15561
|
this.map = e, this.step = t, this.selection = r, this.mirrorOffset = i;
|
|
15562
15562
|
}
|
|
@@ -15564,7 +15564,7 @@ class xt {
|
|
|
15564
15564
|
if (this.step && e.step && !e.selection) {
|
|
15565
15565
|
let t = e.step.merge(this.step);
|
|
15566
15566
|
if (t)
|
|
15567
|
-
return new
|
|
15567
|
+
return new vt(t.getMap().invert(), t, this.selection);
|
|
15568
15568
|
}
|
|
15569
15569
|
}
|
|
15570
15570
|
}
|
|
@@ -15803,7 +15803,7 @@ me.create({
|
|
|
15803
15803
|
var _1 = me.create({
|
|
15804
15804
|
name: "gapCursor",
|
|
15805
15805
|
addProseMirrorPlugins() {
|
|
15806
|
-
return [
|
|
15806
|
+
return [x1()];
|
|
15807
15807
|
},
|
|
15808
15808
|
extendNodeSchema(n) {
|
|
15809
15809
|
var e;
|
|
@@ -16054,11 +16054,11 @@ function zl(n) {
|
|
|
16054
16054
|
return n === "y" ? "height" : "width";
|
|
16055
16055
|
}
|
|
16056
16056
|
const q1 = /* @__PURE__ */ new Set(["top", "bottom"]);
|
|
16057
|
-
function
|
|
16057
|
+
function xt(n) {
|
|
16058
16058
|
return q1.has(at(n)) ? "y" : "x";
|
|
16059
16059
|
}
|
|
16060
16060
|
function Hl(n) {
|
|
16061
|
-
return Nf(
|
|
16061
|
+
return Nf(xt(n));
|
|
16062
16062
|
}
|
|
16063
16063
|
function Rf(n, e, t) {
|
|
16064
16064
|
t === void 0 && (t = !1);
|
|
@@ -16134,7 +16134,7 @@ function Bc(n, e, t) {
|
|
|
16134
16134
|
reference: r,
|
|
16135
16135
|
floating: i
|
|
16136
16136
|
} = n;
|
|
16137
|
-
const s =
|
|
16137
|
+
const s = xt(e), o = Hl(e), l = zl(o), a = at(e), c = s === "y", u = r.x + r.width / 2 - i.width / 2, d = r.y + r.height / 2 - i.height / 2, f = r[l] / 2 - i[l] / 2;
|
|
16138
16138
|
let h;
|
|
16139
16139
|
switch (a) {
|
|
16140
16140
|
case "top":
|
|
@@ -16198,7 +16198,7 @@ const ew = async (n, e, t) => {
|
|
|
16198
16198
|
fn: b
|
|
16199
16199
|
} = l[m], {
|
|
16200
16200
|
x: w,
|
|
16201
|
-
y:
|
|
16201
|
+
y: x,
|
|
16202
16202
|
data: R,
|
|
16203
16203
|
reset: C
|
|
16204
16204
|
} = await b({
|
|
@@ -16215,7 +16215,7 @@ const ew = async (n, e, t) => {
|
|
|
16215
16215
|
floating: e
|
|
16216
16216
|
}
|
|
16217
16217
|
});
|
|
16218
|
-
u = w ?? u, d =
|
|
16218
|
+
u = w ?? u, d = x ?? d, h = {
|
|
16219
16219
|
...h,
|
|
16220
16220
|
[g]: {
|
|
16221
16221
|
...h[g],
|
|
@@ -16264,7 +16264,7 @@ async function er(n, e) {
|
|
|
16264
16264
|
y: i,
|
|
16265
16265
|
width: o.floating.width,
|
|
16266
16266
|
height: o.floating.height
|
|
16267
|
-
} : o.reference,
|
|
16267
|
+
} : o.reference, x = await (s.getOffsetParent == null ? void 0 : s.getOffsetParent(l.floating)), R = await (s.isElement == null ? void 0 : s.isElement(x)) ? await (s.getScale == null ? void 0 : s.getScale(x)) || {
|
|
16268
16268
|
x: 1,
|
|
16269
16269
|
y: 1
|
|
16270
16270
|
} : {
|
|
@@ -16273,7 +16273,7 @@ async function er(n, e) {
|
|
|
16273
16273
|
}, C = Zn(s.convertOffsetParentRelativeRectToViewportRelativeRect ? await s.convertOffsetParentRelativeRectToViewportRelativeRect({
|
|
16274
16274
|
elements: l,
|
|
16275
16275
|
rect: w,
|
|
16276
|
-
offsetParent:
|
|
16276
|
+
offsetParent: x,
|
|
16277
16277
|
strategy: a
|
|
16278
16278
|
}) : w);
|
|
16279
16279
|
return {
|
|
@@ -16304,9 +16304,9 @@ const tw = (n) => ({
|
|
|
16304
16304
|
const d = Fl(u), f = {
|
|
16305
16305
|
x: t,
|
|
16306
16306
|
y: r
|
|
16307
|
-
}, h = Hl(i), p = zl(h), m = await o.getDimensions(c), g = h === "y", b = g ? "top" : "left", w = g ? "bottom" : "right",
|
|
16308
|
-
let T = P ? P[
|
|
16309
|
-
(!T || !await (o.isElement == null ? void 0 : o.isElement(P))) && (T = l.floating[
|
|
16307
|
+
}, h = Hl(i), p = zl(h), m = await o.getDimensions(c), g = h === "y", b = g ? "top" : "left", w = g ? "bottom" : "right", x = g ? "clientHeight" : "clientWidth", R = s.reference[p] + s.reference[h] - f[h] - s.floating[p], C = f[h] - s.reference[h], P = await (o.getOffsetParent == null ? void 0 : o.getOffsetParent(c));
|
|
16308
|
+
let T = P ? P[x] : 0;
|
|
16309
|
+
(!T || !await (o.isElement == null ? void 0 : o.isElement(P))) && (T = l.floating[x] || s.floating[p]);
|
|
16310
16310
|
const $ = R / 2 - C / 2, K = T / 2 - m[p] / 2 - 1, V = Tt(d[b], K), U = Tt(d[w], K), D = V, Z = T - m[p] - U, te = T / 2 - m[p] / 2 + $, Se = Yo(D, te, Z), ge = !a.arrow && ht(i) != null && te !== Se && s.reference[p] / 2 - (te < D ? V : U) - m[p] / 2 < 0, ye = ge ? te < D ? te - D : te - Z : 0;
|
|
16311
16311
|
return {
|
|
16312
16312
|
[h]: f[h] + ye,
|
|
@@ -16345,14 +16345,14 @@ const rw = function(n) {
|
|
|
16345
16345
|
} = jt(n, e), m = d !== void 0 || f === Ic ? nw(d || null, h, f) : f, g = await er(e, p), b = ((t = o.autoPlacement) == null ? void 0 : t.index) || 0, w = m[b];
|
|
16346
16346
|
if (w == null)
|
|
16347
16347
|
return {};
|
|
16348
|
-
const
|
|
16348
|
+
const x = Rf(w, s, await (a.isRTL == null ? void 0 : a.isRTL(c.floating)));
|
|
16349
16349
|
if (l !== w)
|
|
16350
16350
|
return {
|
|
16351
16351
|
reset: {
|
|
16352
16352
|
placement: m[0]
|
|
16353
16353
|
}
|
|
16354
16354
|
};
|
|
16355
|
-
const R = [g[at(w)], g[
|
|
16355
|
+
const R = [g[at(w)], g[x[0]], g[x[1]]], C = [...((r = o.autoPlacement) == null ? void 0 : r.overflows) || [], {
|
|
16356
16356
|
placement: w,
|
|
16357
16357
|
overflows: R
|
|
16358
16358
|
}], P = m[b + 1];
|
|
@@ -16416,7 +16416,7 @@ const rw = function(n) {
|
|
|
16416
16416
|
} = jt(n, e);
|
|
16417
16417
|
if ((t = s.arrow) != null && t.alignmentOffset)
|
|
16418
16418
|
return {};
|
|
16419
|
-
const b = at(i), w =
|
|
16419
|
+
const b = at(i), w = xt(l), x = at(l) === l, R = await (a.isRTL == null ? void 0 : a.isRTL(c.floating)), C = f || (x || !m ? [us(l)] : J1(l)), P = p !== "none";
|
|
16420
16420
|
!f && P && C.push(...Q1(l, m, p, R));
|
|
16421
16421
|
const T = [l, ...C], $ = await er(e, g), K = [];
|
|
16422
16422
|
let V = ((r = s.flip) == null ? void 0 : r.overflows) || [];
|
|
@@ -16430,9 +16430,9 @@ const rw = function(n) {
|
|
|
16430
16430
|
}], !K.every((te) => te <= 0)) {
|
|
16431
16431
|
var U, D;
|
|
16432
16432
|
const te = (((U = s.flip) == null ? void 0 : U.index) || 0) + 1, Se = T[te];
|
|
16433
|
-
if (Se && (!(d === "alignment" ? w !==
|
|
16433
|
+
if (Se && (!(d === "alignment" ? w !== xt(Se) : !1) || // We leave the current main axis only if every placement on that axis
|
|
16434
16434
|
// overflows the main axis.
|
|
16435
|
-
V.every((Me) =>
|
|
16435
|
+
V.every((Me) => xt(Me.placement) === w ? Me.overflows[0] > 0 : !0)))
|
|
16436
16436
|
return {
|
|
16437
16437
|
data: {
|
|
16438
16438
|
index: te,
|
|
@@ -16449,7 +16449,7 @@ const rw = function(n) {
|
|
|
16449
16449
|
var Z;
|
|
16450
16450
|
const ye = (Z = V.filter((Me) => {
|
|
16451
16451
|
if (P) {
|
|
16452
|
-
const gt =
|
|
16452
|
+
const gt = xt(Me.placement);
|
|
16453
16453
|
return gt === w || // Create a bias to the `y` side axis due to horizontal
|
|
16454
16454
|
// reading directions favoring greater width.
|
|
16455
16455
|
gt === "y";
|
|
@@ -16565,7 +16565,7 @@ const lw = function(n) {
|
|
|
16565
16565
|
if (d.length === 2 && d[0].left > d[1].right && a != null && c != null)
|
|
16566
16566
|
return d.find((g) => a > g.left - h.left && a < g.right + h.right && c > g.top - h.top && c < g.bottom + h.bottom) || f;
|
|
16567
16567
|
if (d.length >= 2) {
|
|
16568
|
-
if (
|
|
16568
|
+
if (xt(t) === "y") {
|
|
16569
16569
|
const V = d[0], U = d[d.length - 1], D = at(t) === "top", Z = V.top, te = U.bottom, Se = D ? V.left : U.left, ge = D ? V.right : U.right, ye = ge - Se, Me = te - Z;
|
|
16570
16570
|
return {
|
|
16571
16571
|
top: Z,
|
|
@@ -16578,7 +16578,7 @@ const lw = function(n) {
|
|
|
16578
16578
|
y: Z
|
|
16579
16579
|
};
|
|
16580
16580
|
}
|
|
16581
|
-
const g = at(t) === "left", b = Ve(...d.map((V) => V.right)), w = Tt(...d.map((V) => V.left)),
|
|
16581
|
+
const g = at(t) === "left", b = Ve(...d.map((V) => V.right)), w = Tt(...d.map((V) => V.left)), x = d.filter((V) => g ? V.left === w : V.right === b), R = x[0].top, C = x[x.length - 1].bottom, P = w, T = b, $ = T - P, K = C - R;
|
|
16582
16582
|
return {
|
|
16583
16583
|
top: R,
|
|
16584
16584
|
bottom: C,
|
|
@@ -16612,7 +16612,7 @@ async function cw(n, e) {
|
|
|
16612
16612
|
placement: t,
|
|
16613
16613
|
platform: r,
|
|
16614
16614
|
elements: i
|
|
16615
|
-
} = n, s = await (r.isRTL == null ? void 0 : r.isRTL(i.floating)), o = at(t), l = ht(t), a =
|
|
16615
|
+
} = n, s = await (r.isRTL == null ? void 0 : r.isRTL(i.floating)), o = at(t), l = ht(t), a = xt(t) === "y", c = aw.has(o) ? -1 : 1, u = s && a ? -1 : 1, d = jt(e, n);
|
|
16616
16616
|
let {
|
|
16617
16617
|
mainAxis: f,
|
|
16618
16618
|
crossAxis: h,
|
|
@@ -16684,15 +16684,15 @@ const uw = function(n) {
|
|
|
16684
16684
|
} = jt(n, e), c = {
|
|
16685
16685
|
x: t,
|
|
16686
16686
|
y: r
|
|
16687
|
-
}, u = await er(e, a), d =
|
|
16687
|
+
}, u = await er(e, a), d = xt(at(i)), f = Nf(d);
|
|
16688
16688
|
let h = c[f], p = c[d];
|
|
16689
16689
|
if (s) {
|
|
16690
|
-
const g = f === "y" ? "top" : "left", b = f === "y" ? "bottom" : "right", w = h + u[g],
|
|
16691
|
-
h = Yo(w, h,
|
|
16690
|
+
const g = f === "y" ? "top" : "left", b = f === "y" ? "bottom" : "right", w = h + u[g], x = h - u[b];
|
|
16691
|
+
h = Yo(w, h, x);
|
|
16692
16692
|
}
|
|
16693
16693
|
if (o) {
|
|
16694
|
-
const g = d === "y" ? "top" : "left", b = d === "y" ? "bottom" : "right", w = p + u[g],
|
|
16695
|
-
p = Yo(w, p,
|
|
16694
|
+
const g = d === "y" ? "top" : "left", b = d === "y" ? "bottom" : "right", w = p + u[g], x = p - u[b];
|
|
16695
|
+
p = Yo(w, p, x);
|
|
16696
16696
|
}
|
|
16697
16697
|
const m = l.fn({
|
|
16698
16698
|
...e,
|
|
@@ -16727,15 +16727,15 @@ const uw = function(n) {
|
|
|
16727
16727
|
apply: a = () => {
|
|
16728
16728
|
},
|
|
16729
16729
|
...c
|
|
16730
|
-
} = jt(n, e), u = await er(e, c), d = at(i), f = ht(i), h =
|
|
16730
|
+
} = jt(n, e), u = await er(e, c), d = at(i), f = ht(i), h = xt(i) === "y", {
|
|
16731
16731
|
width: p,
|
|
16732
16732
|
height: m
|
|
16733
16733
|
} = s.floating;
|
|
16734
16734
|
let g, b;
|
|
16735
16735
|
d === "top" || d === "bottom" ? (g = d, b = f === (await (o.isRTL == null ? void 0 : o.isRTL(l.floating)) ? "start" : "end") ? "left" : "right") : (b = d, g = f === "end" ? "top" : "bottom");
|
|
16736
|
-
const w = m - u.top - u.bottom,
|
|
16736
|
+
const w = m - u.top - u.bottom, x = p - u.left - u.right, R = Tt(m - u[g], w), C = Tt(p - u[b], x), P = !e.middlewareData.shift;
|
|
16737
16737
|
let T = R, $ = C;
|
|
16738
|
-
if ((t = e.middlewareData.shift) != null && t.enabled.x && ($ =
|
|
16738
|
+
if ((t = e.middlewareData.shift) != null && t.enabled.x && ($ = x), (r = e.middlewareData.shift) != null && r.enabled.y && (T = w), P && !f) {
|
|
16739
16739
|
const V = Ve(u.left, 0), U = Ve(u.right, 0), D = Ve(u.top, 0), Z = Ve(u.bottom, 0);
|
|
16740
16740
|
h ? $ = p - 2 * (V !== 0 || U !== 0 ? V + U : Ve(u.left, u.right)) : T = m - 2 * (D !== 0 || Z !== 0 ? D + Z : Ve(u.top, u.bottom));
|
|
16741
16741
|
}
|
|
@@ -16759,7 +16759,7 @@ function As() {
|
|
|
16759
16759
|
function ir(n) {
|
|
16760
16760
|
return If(n) ? (n.nodeName || "").toLowerCase() : "#document";
|
|
16761
16761
|
}
|
|
16762
|
-
function
|
|
16762
|
+
function et(n) {
|
|
16763
16763
|
var e;
|
|
16764
16764
|
return (n == null || (e = n.ownerDocument) == null ? void 0 : e.defaultView) || window;
|
|
16765
16765
|
}
|
|
@@ -16768,16 +16768,16 @@ function Ut(n) {
|
|
|
16768
16768
|
return (e = (If(n) ? n.ownerDocument : n.document) || window.document) == null ? void 0 : e.documentElement;
|
|
16769
16769
|
}
|
|
16770
16770
|
function If(n) {
|
|
16771
|
-
return As() ? n instanceof Node || n instanceof
|
|
16771
|
+
return As() ? n instanceof Node || n instanceof et(n).Node : !1;
|
|
16772
16772
|
}
|
|
16773
16773
|
function pt(n) {
|
|
16774
|
-
return As() ? n instanceof Element || n instanceof
|
|
16774
|
+
return As() ? n instanceof Element || n instanceof et(n).Element : !1;
|
|
16775
16775
|
}
|
|
16776
16776
|
function Ot(n) {
|
|
16777
|
-
return As() ? n instanceof HTMLElement || n instanceof
|
|
16777
|
+
return As() ? n instanceof HTMLElement || n instanceof et(n).HTMLElement : !1;
|
|
16778
16778
|
}
|
|
16779
16779
|
function zc(n) {
|
|
16780
|
-
return !As() || typeof ShadowRoot > "u" ? !1 : n instanceof ShadowRoot || n instanceof
|
|
16780
|
+
return !As() || typeof ShadowRoot > "u" ? !1 : n instanceof ShadowRoot || n instanceof et(n).ShadowRoot;
|
|
16781
16781
|
}
|
|
16782
16782
|
const hw = /* @__PURE__ */ new Set(["inline", "contents"]);
|
|
16783
16783
|
function Fr(n) {
|
|
@@ -16822,12 +16822,12 @@ function kw(n) {
|
|
|
16822
16822
|
function jl() {
|
|
16823
16823
|
return typeof CSS > "u" || !CSS.supports ? !1 : CSS.supports("-webkit-backdrop-filter", "none");
|
|
16824
16824
|
}
|
|
16825
|
-
const
|
|
16825
|
+
const vw = /* @__PURE__ */ new Set(["html", "body", "#document"]);
|
|
16826
16826
|
function tr(n) {
|
|
16827
|
-
return
|
|
16827
|
+
return vw.has(ir(n));
|
|
16828
16828
|
}
|
|
16829
16829
|
function mt(n) {
|
|
16830
|
-
return
|
|
16830
|
+
return et(n).getComputedStyle(n);
|
|
16831
16831
|
}
|
|
16832
16832
|
function Rs(n) {
|
|
16833
16833
|
return pt(n) ? {
|
|
@@ -16857,7 +16857,7 @@ function Pf(n) {
|
|
|
16857
16857
|
function Lf(n, e, t) {
|
|
16858
16858
|
var r;
|
|
16859
16859
|
e === void 0 && (e = []);
|
|
16860
|
-
const i = Pf(n), s = i === ((r = n.ownerDocument) == null ? void 0 : r.body), o =
|
|
16860
|
+
const i = Pf(n), s = i === ((r = n.ownerDocument) == null ? void 0 : r.body), o = et(i);
|
|
16861
16861
|
return s ? (Xo(o), e.concat(o, o.visualViewport || [], Fr(i) ? i : [], [])) : e.concat(i, Lf(i, []));
|
|
16862
16862
|
}
|
|
16863
16863
|
function Xo(n) {
|
|
@@ -16891,16 +16891,16 @@ function Kn(n) {
|
|
|
16891
16891
|
y: l
|
|
16892
16892
|
};
|
|
16893
16893
|
}
|
|
16894
|
-
const
|
|
16894
|
+
const xw = /* @__PURE__ */ St(0);
|
|
16895
16895
|
function $f(n) {
|
|
16896
|
-
const e =
|
|
16897
|
-
return !jl() || !e.visualViewport ?
|
|
16896
|
+
const e = et(n);
|
|
16897
|
+
return !jl() || !e.visualViewport ? xw : {
|
|
16898
16898
|
x: e.visualViewport.offsetLeft,
|
|
16899
16899
|
y: e.visualViewport.offsetTop
|
|
16900
16900
|
};
|
|
16901
16901
|
}
|
|
16902
16902
|
function Sw(n, e, t) {
|
|
16903
|
-
return e === void 0 && (e = !1), !t || e && t !==
|
|
16903
|
+
return e === void 0 && (e = !1), !t || e && t !== et(n) ? !1 : e;
|
|
16904
16904
|
}
|
|
16905
16905
|
function Lr(n, e, t, r) {
|
|
16906
16906
|
e === void 0 && (e = !1), t === void 0 && (t = !1);
|
|
@@ -16910,11 +16910,11 @@ function Lr(n, e, t, r) {
|
|
|
16910
16910
|
const l = Sw(s, t, r) ? $f(s) : St(0);
|
|
16911
16911
|
let a = (i.left + l.x) / o.x, c = (i.top + l.y) / o.y, u = i.width / o.x, d = i.height / o.y;
|
|
16912
16912
|
if (s) {
|
|
16913
|
-
const f =
|
|
16913
|
+
const f = et(s), h = r && pt(r) ? et(r) : r;
|
|
16914
16914
|
let p = f, m = Xo(p);
|
|
16915
16915
|
for (; m && r && h !== p; ) {
|
|
16916
|
-
const g = Kn(m), b = m.getBoundingClientRect(), w = mt(m),
|
|
16917
|
-
a *= g.x, c *= g.y, u *= g.x, d *= g.y, a +=
|
|
16916
|
+
const g = Kn(m), b = m.getBoundingClientRect(), w = mt(m), x = b.left + (m.clientLeft + parseFloat(w.paddingLeft)) * g.x, R = b.top + (m.clientTop + parseFloat(w.paddingTop)) * g.y;
|
|
16917
|
+
a *= g.x, c *= g.y, u *= g.x, d *= g.y, a += x, c += R, p = et(m), m = Xo(p);
|
|
16918
16918
|
}
|
|
16919
16919
|
}
|
|
16920
16920
|
return Zn({
|
|
@@ -16978,7 +16978,7 @@ function Ew(n) {
|
|
|
16978
16978
|
}
|
|
16979
16979
|
const Hc = 25;
|
|
16980
16980
|
function Tw(n, e) {
|
|
16981
|
-
const t =
|
|
16981
|
+
const t = et(n), r = Ut(n), i = t.visualViewport;
|
|
16982
16982
|
let s = r.clientWidth, o = r.clientHeight, l = 0, a = 0;
|
|
16983
16983
|
if (i) {
|
|
16984
16984
|
s = i.width, o = i.height;
|
|
@@ -17107,7 +17107,7 @@ function Vc(n, e) {
|
|
|
17107
17107
|
return Ut(n) === t && (t = t.ownerDocument.body), t;
|
|
17108
17108
|
}
|
|
17109
17109
|
function Ff(n, e) {
|
|
17110
|
-
const t =
|
|
17110
|
+
const t = et(n);
|
|
17111
17111
|
if (Ns(n))
|
|
17112
17112
|
return t;
|
|
17113
17113
|
if (!Ot(n)) {
|
|
@@ -17271,16 +17271,16 @@ function _w(n) {
|
|
|
17271
17271
|
for (; i < r.length && r[i] != 0; ) i++;
|
|
17272
17272
|
if (p == d.childCount) break;
|
|
17273
17273
|
const m = d.child(p), { colspan: g, rowspan: b, colwidth: w } = m.attrs;
|
|
17274
|
-
for (let
|
|
17275
|
-
if (
|
|
17274
|
+
for (let x = 0; x < b; x++) {
|
|
17275
|
+
if (x + c >= t) {
|
|
17276
17276
|
(s || (s = [])).push({
|
|
17277
17277
|
type: "overlong_rowspan",
|
|
17278
17278
|
pos: u,
|
|
17279
|
-
n: b -
|
|
17279
|
+
n: b - x
|
|
17280
17280
|
});
|
|
17281
17281
|
break;
|
|
17282
17282
|
}
|
|
17283
|
-
const R = i +
|
|
17283
|
+
const R = i + x * e;
|
|
17284
17284
|
for (let C = 0; C < g; C++) {
|
|
17285
17285
|
r[R + C] == 0 ? r[R + C] = u : (s || (s = [])).push({
|
|
17286
17286
|
type: "collision",
|
|
@@ -17491,10 +17491,10 @@ var Ct = class Pt extends F {
|
|
|
17491
17491
|
}
|
|
17492
17492
|
c.push(p);
|
|
17493
17493
|
}
|
|
17494
|
-
o.push(e.child(a).copy(
|
|
17494
|
+
o.push(e.child(a).copy(v.from(c)));
|
|
17495
17495
|
}
|
|
17496
17496
|
const l = this.isColSelection() && this.isRowSelection() ? e : o;
|
|
17497
|
-
return new A(
|
|
17497
|
+
return new A(v.from(l), 1, 1);
|
|
17498
17498
|
}
|
|
17499
17499
|
replace(e, t = A.empty) {
|
|
17500
17500
|
const r = e.steps.length, i = this.ranges;
|
|
@@ -17513,7 +17513,7 @@ var Ct = class Pt extends F {
|
|
|
17513
17513
|
s && e.setSelection(s);
|
|
17514
17514
|
}
|
|
17515
17515
|
replaceWith(e, t) {
|
|
17516
|
-
this.replace(e, new A(
|
|
17516
|
+
this.replace(e, new A(v.from(t), 0, 0));
|
|
17517
17517
|
}
|
|
17518
17518
|
forEachCell(e) {
|
|
17519
17519
|
const t = this.$anchorCell.node(-1), r = Bt.get(t), i = this.$anchorCell.start(-1), s = r.cellsInRect(
|
|
@@ -18023,7 +18023,7 @@ var Jw = Ke({
|
|
|
18023
18023
|
}
|
|
18024
18024
|
},
|
|
18025
18025
|
setup(n, { slots: e, attrs: t }) {
|
|
18026
|
-
const r =
|
|
18026
|
+
const r = Pe(null);
|
|
18027
18027
|
return nr(() => {
|
|
18028
18028
|
const {
|
|
18029
18029
|
editor: i,
|
|
@@ -18098,7 +18098,7 @@ var Jw = Ke({
|
|
|
18098
18098
|
}, this.element.tabIndex = 0, s && (this.shouldShow = s), this.element.addEventListener("mousedown", this.mousedownHandler, { capture: !0 }), this.editor.on("focus", this.focusHandler), this.editor.on("blur", this.blurHandler), this.update(t, t.state), this.getShouldShow() && this.show();
|
|
18099
18099
|
}
|
|
18100
18100
|
getTextContent(n) {
|
|
18101
|
-
return Dd(n, { textSerializers:
|
|
18101
|
+
return Dd(n, { textSerializers: xl(this.editor.schema) });
|
|
18102
18102
|
}
|
|
18103
18103
|
get middlewares() {
|
|
18104
18104
|
const n = [];
|
|
@@ -18213,7 +18213,7 @@ Ke({
|
|
|
18213
18213
|
}
|
|
18214
18214
|
},
|
|
18215
18215
|
setup(n, { slots: e, attrs: t }) {
|
|
18216
|
-
const r =
|
|
18216
|
+
const r = Pe(null);
|
|
18217
18217
|
return nr(() => {
|
|
18218
18218
|
const { pluginKey: i, editor: s, options: o, appendTo: l, shouldShow: a } = n;
|
|
18219
18219
|
r.value && (r.value.style.visibility = "hidden", r.value.style.position = "absolute", r.value.remove(), s.registerPlugin(
|
|
@@ -18242,7 +18242,7 @@ const Yw = { class: "sus-bubble-menu" }, Xw = /* @__PURE__ */ Ke({
|
|
|
18242
18242
|
showMenu: { type: Boolean }
|
|
18243
18243
|
},
|
|
18244
18244
|
setup(n) {
|
|
18245
|
-
const e = n, t =
|
|
18245
|
+
const e = n, t = Pe(""), r = Pe(!1);
|
|
18246
18246
|
function i({ editor: l }) {
|
|
18247
18247
|
const { from: a, to: c } = l.state.selection;
|
|
18248
18248
|
if (a === c) {
|
|
@@ -18265,17 +18265,17 @@ const Yw = { class: "sus-bubble-menu" }, Xw = /* @__PURE__ */ Ke({
|
|
|
18265
18265
|
}
|
|
18266
18266
|
e.editor?.chain().focus().extendMarkRange("link").setLink({ href: t.value }).run(), r.value = !1;
|
|
18267
18267
|
}
|
|
18268
|
-
return (l, a) => (
|
|
18269
|
-
|
|
18268
|
+
return (l, a) => (J(), Q(Br, null, [
|
|
18269
|
+
_e(E("div", {
|
|
18270
18270
|
class: "sus-bubble-mask",
|
|
18271
18271
|
onClick: a[2] || (a[2] = (c) => r.value = !1)
|
|
18272
18272
|
}, [
|
|
18273
|
-
|
|
18273
|
+
E("div", {
|
|
18274
18274
|
class: "sus-link",
|
|
18275
18275
|
onClick: a[1] || (a[1] = bo(() => {
|
|
18276
18276
|
}, ["stop"]))
|
|
18277
18277
|
}, [
|
|
18278
|
-
|
|
18278
|
+
_e(E("input", {
|
|
18279
18279
|
"onUpdate:modelValue": a[0] || (a[0] = (c) => t.value = c),
|
|
18280
18280
|
onKeyup: ip(o, ["enter"]),
|
|
18281
18281
|
class: "sus-link-input",
|
|
@@ -18284,7 +18284,7 @@ const Yw = { class: "sus-bubble-menu" }, Xw = /* @__PURE__ */ Ke({
|
|
|
18284
18284
|
}, null, 544), [
|
|
18285
18285
|
[di, t.value]
|
|
18286
18286
|
]),
|
|
18287
|
-
|
|
18287
|
+
E("button", {
|
|
18288
18288
|
onClick: o,
|
|
18289
18289
|
title: "确定"
|
|
18290
18290
|
}, [...a[4] || (a[4] = [
|
|
@@ -18292,20 +18292,20 @@ const Yw = { class: "sus-bubble-menu" }, Xw = /* @__PURE__ */ Ke({
|
|
|
18292
18292
|
])])
|
|
18293
18293
|
])
|
|
18294
18294
|
], 512), [
|
|
18295
|
-
[
|
|
18295
|
+
[rt, r.value]
|
|
18296
18296
|
]),
|
|
18297
|
-
n.editor && n.showMenu ? (
|
|
18297
|
+
n.editor && n.showMenu ? (J(), xr(Be(Jw), {
|
|
18298
18298
|
key: 0,
|
|
18299
18299
|
editor: n.editor,
|
|
18300
18300
|
options: { placement: "bottom", offset: 8, shouldShow: i }
|
|
18301
18301
|
}, {
|
|
18302
18302
|
default: Qt(() => [
|
|
18303
|
-
|
|
18304
|
-
|
|
18303
|
+
E("div", Yw, [
|
|
18304
|
+
E("button", {
|
|
18305
18305
|
onClick: s,
|
|
18306
18306
|
title: "添加链接"
|
|
18307
18307
|
}, [...a[5] || (a[5] = [
|
|
18308
|
-
|
|
18308
|
+
E("svg", {
|
|
18309
18309
|
xmlns: "http://www.w3.org/2000/svg",
|
|
18310
18310
|
width: "16",
|
|
18311
18311
|
height: "16",
|
|
@@ -18316,9 +18316,9 @@ const Yw = { class: "sus-bubble-menu" }, Xw = /* @__PURE__ */ Ke({
|
|
|
18316
18316
|
"stroke-linecap": "round",
|
|
18317
18317
|
"stroke-linejoin": "round"
|
|
18318
18318
|
}, [
|
|
18319
|
-
|
|
18320
|
-
|
|
18321
|
-
|
|
18319
|
+
E("path", { d: "M9 17H7A5 5 0 0 1 7 7h2" }),
|
|
18320
|
+
E("path", { d: "M15 7h2a5 5 0 1 1 0 10h-2" }),
|
|
18321
|
+
E("line", {
|
|
18322
18322
|
x1: "8",
|
|
18323
18323
|
x2: "16",
|
|
18324
18324
|
y1: "12",
|
|
@@ -18326,11 +18326,11 @@ const Yw = { class: "sus-bubble-menu" }, Xw = /* @__PURE__ */ Ke({
|
|
|
18326
18326
|
})
|
|
18327
18327
|
], -1)
|
|
18328
18328
|
])]),
|
|
18329
|
-
|
|
18329
|
+
E("button", {
|
|
18330
18330
|
onClick: a[3] || (a[3] = (c) => n.editor.commands.unsetAllMarks()),
|
|
18331
18331
|
title: "清除当前选中格式"
|
|
18332
18332
|
}, [...a[6] || (a[6] = [
|
|
18333
|
-
|
|
18333
|
+
E("svg", {
|
|
18334
18334
|
xmlns: "http://www.w3.org/2000/svg",
|
|
18335
18335
|
width: "16",
|
|
18336
18336
|
height: "16",
|
|
@@ -18341,17 +18341,17 @@ const Yw = { class: "sus-bubble-menu" }, Xw = /* @__PURE__ */ Ke({
|
|
|
18341
18341
|
"stroke-linecap": "round",
|
|
18342
18342
|
"stroke-linejoin": "round"
|
|
18343
18343
|
}, [
|
|
18344
|
-
|
|
18345
|
-
|
|
18346
|
-
|
|
18347
|
-
|
|
18348
|
-
|
|
18344
|
+
E("path", { d: "M4 7V4h16v3" }),
|
|
18345
|
+
E("path", { d: "M5 20h6" }),
|
|
18346
|
+
E("path", { d: "M13 4 8 20" }),
|
|
18347
|
+
E("path", { d: "m15 15 5 5" }),
|
|
18348
|
+
E("path", { d: "m20 15-5 5" })
|
|
18349
18349
|
], -1)
|
|
18350
18350
|
])])
|
|
18351
18351
|
])
|
|
18352
18352
|
]),
|
|
18353
18353
|
_: 1
|
|
18354
|
-
}, 8, ["editor", "options"])) :
|
|
18354
|
+
}, 8, ["editor", "options"])) : de("", !0)
|
|
18355
18355
|
], 64));
|
|
18356
18356
|
}
|
|
18357
18357
|
}), Qw = /* @__PURE__ */ mn(Xw, [["__scopeId", "data-v-1bbeca5c"]]), Zw = qe.create({
|
|
@@ -18614,7 +18614,7 @@ function tk() {
|
|
|
18614
18614
|
function w(y) {
|
|
18615
18615
|
return new RegExp(y.toString() + "|").exec("").length - 1;
|
|
18616
18616
|
}
|
|
18617
|
-
function
|
|
18617
|
+
function x(y, k) {
|
|
18618
18618
|
const O = y && y.exec(k);
|
|
18619
18619
|
return O && O.index === 0;
|
|
18620
18620
|
}
|
|
@@ -18848,7 +18848,7 @@ function tk() {
|
|
|
18848
18848
|
Object.assign(O, { endsParent: !0 })
|
|
18849
18849
|
]
|
|
18850
18850
|
}, y.relevance = 0, delete O.beforeMatch;
|
|
18851
|
-
},
|
|
18851
|
+
}, vh = [
|
|
18852
18852
|
"of",
|
|
18853
18853
|
"and",
|
|
18854
18854
|
"for",
|
|
@@ -18863,8 +18863,8 @@ function tk() {
|
|
|
18863
18863
|
// common variable name
|
|
18864
18864
|
"value"
|
|
18865
18865
|
// common variable name
|
|
18866
|
-
],
|
|
18867
|
-
function Kl(y, k, O =
|
|
18866
|
+
], xh = "keyword";
|
|
18867
|
+
function Kl(y, k, O = xh) {
|
|
18868
18868
|
const q = /* @__PURE__ */ Object.create(null);
|
|
18869
18869
|
return typeof y == "string" ? be(O, y.split(" ")) : Array.isArray(y) ? be(O, y) : Object.keys(y).forEach(function(we) {
|
|
18870
18870
|
Object.assign(
|
|
@@ -18883,7 +18883,7 @@ function tk() {
|
|
|
18883
18883
|
return k ? Number(k) : Ch(y) ? 0 : 1;
|
|
18884
18884
|
}
|
|
18885
18885
|
function Ch(y) {
|
|
18886
|
-
return
|
|
18886
|
+
return vh.includes(y.toLowerCase());
|
|
18887
18887
|
}
|
|
18888
18888
|
const ql = {}, gn = (y) => {
|
|
18889
18889
|
console.error(y);
|
|
@@ -19061,23 +19061,23 @@ function tk() {
|
|
|
19061
19061
|
// https://github.com/highlightjs/highlight.js/issues/1086
|
|
19062
19062
|
__emitter: u
|
|
19063
19063
|
};
|
|
19064
|
-
function W(
|
|
19065
|
-
return I.noHighlightRe.test(
|
|
19064
|
+
function W(M) {
|
|
19065
|
+
return I.noHighlightRe.test(M);
|
|
19066
19066
|
}
|
|
19067
|
-
function Ee(
|
|
19068
|
-
let H =
|
|
19069
|
-
H +=
|
|
19067
|
+
function Ee(M) {
|
|
19068
|
+
let H = M.className + " ";
|
|
19069
|
+
H += M.parentNode ? M.parentNode.className : "";
|
|
19070
19070
|
const ee = I.languageDetectRe.exec(H);
|
|
19071
19071
|
if (ee) {
|
|
19072
19072
|
const se = Wt(ee[1]);
|
|
19073
|
-
return se || (Jl(we.replace("{}", ee[1])), Jl("Falling back to no-highlight mode for this block.",
|
|
19073
|
+
return se || (Jl(we.replace("{}", ee[1])), Jl("Falling back to no-highlight mode for this block.", M)), se ? ee[1] : "no-highlight";
|
|
19074
19074
|
}
|
|
19075
19075
|
return H.split(/\s+/).find((se) => W(se) || Wt(se));
|
|
19076
19076
|
}
|
|
19077
|
-
function ke(
|
|
19077
|
+
function ke(M, H, ee) {
|
|
19078
19078
|
let se = "", Ce = "";
|
|
19079
|
-
typeof H == "object" ? (se =
|
|
19080
|
-
https://github.com/highlightjs/highlight.js/issues/2277`), Ce =
|
|
19079
|
+
typeof H == "object" ? (se = M, ee = H.ignoreIllegals, Ce = H.language) : (Ln("10.7.0", "highlight(lang, code, ...args) has been deprecated."), Ln("10.7.0", `Please use highlight(code, options) instead.
|
|
19080
|
+
https://github.com/highlightjs/highlight.js/issues/2277`), Ce = M, se = H), ee === void 0 && (ee = !0);
|
|
19081
19081
|
const ct = {
|
|
19082
19082
|
code: se,
|
|
19083
19083
|
language: Ce
|
|
@@ -19086,25 +19086,25 @@ https://github.com/highlightjs/highlight.js/issues/2277`), Ce = E, se = H), ee =
|
|
|
19086
19086
|
const Kt = ct.result ? ct.result : sr(ct.language, ct.code, ee);
|
|
19087
19087
|
return Kt.code = ct.code, Wr("after:highlight", Kt), Kt;
|
|
19088
19088
|
}
|
|
19089
|
-
function sr(
|
|
19089
|
+
function sr(M, H, ee, se) {
|
|
19090
19090
|
const Ce = /* @__PURE__ */ Object.create(null);
|
|
19091
19091
|
function ct(N, B) {
|
|
19092
19092
|
return N.keywords[B];
|
|
19093
19093
|
}
|
|
19094
19094
|
function Kt() {
|
|
19095
|
-
if (!
|
|
19096
|
-
|
|
19095
|
+
if (!G.keywords) {
|
|
19096
|
+
Ne.addText(oe);
|
|
19097
19097
|
return;
|
|
19098
19098
|
}
|
|
19099
19099
|
let N = 0;
|
|
19100
|
-
|
|
19101
|
-
let B =
|
|
19100
|
+
G.keywordPatternRe.lastIndex = 0;
|
|
19101
|
+
let B = G.keywordPatternRe.exec(oe), X = "";
|
|
19102
19102
|
for (; B; ) {
|
|
19103
19103
|
X += oe.substring(N, B.index);
|
|
19104
|
-
const ne = bt.case_insensitive ? B[0].toLowerCase() : B[0],
|
|
19105
|
-
if (
|
|
19106
|
-
const [At, Yh] =
|
|
19107
|
-
if (
|
|
19104
|
+
const ne = bt.case_insensitive ? B[0].toLowerCase() : B[0], Le = ct(G, ne);
|
|
19105
|
+
if (Le) {
|
|
19106
|
+
const [At, Yh] = Le;
|
|
19107
|
+
if (Ne.addText(X), X = "", Ce[ne] = (Ce[ne] || 0) + 1, Ce[ne] <= Ih && (Jr += Yh), At.startsWith("_"))
|
|
19108
19108
|
X += B[0];
|
|
19109
19109
|
else {
|
|
19110
19110
|
const Xh = bt.classNameAliases[At] || At;
|
|
@@ -19112,29 +19112,29 @@ https://github.com/highlightjs/highlight.js/issues/2277`), Ce = E, se = H), ee =
|
|
|
19112
19112
|
}
|
|
19113
19113
|
} else
|
|
19114
19114
|
X += B[0];
|
|
19115
|
-
N =
|
|
19115
|
+
N = G.keywordPatternRe.lastIndex, B = G.keywordPatternRe.exec(oe);
|
|
19116
19116
|
}
|
|
19117
|
-
X += oe.substring(N),
|
|
19117
|
+
X += oe.substring(N), Ne.addText(X);
|
|
19118
19118
|
}
|
|
19119
19119
|
function Kr() {
|
|
19120
19120
|
if (oe === "") return;
|
|
19121
19121
|
let N = null;
|
|
19122
|
-
if (typeof
|
|
19123
|
-
if (!k[
|
|
19124
|
-
|
|
19122
|
+
if (typeof G.subLanguage == "string") {
|
|
19123
|
+
if (!k[G.subLanguage]) {
|
|
19124
|
+
Ne.addText(oe);
|
|
19125
19125
|
return;
|
|
19126
19126
|
}
|
|
19127
|
-
N = sr(
|
|
19127
|
+
N = sr(G.subLanguage, oe, !0, la[G.subLanguage]), la[G.subLanguage] = /** @type {CompiledMode} */
|
|
19128
19128
|
N._top;
|
|
19129
19129
|
} else
|
|
19130
|
-
N = Bs(oe,
|
|
19131
|
-
|
|
19130
|
+
N = Bs(oe, G.subLanguage.length ? G.subLanguage : null);
|
|
19131
|
+
G.relevance > 0 && (Jr += N.relevance), Ne.__addSublanguage(N._emitter, N.language);
|
|
19132
19132
|
}
|
|
19133
|
-
function
|
|
19134
|
-
|
|
19133
|
+
function Xe() {
|
|
19134
|
+
G.subLanguage != null ? Kr() : Kt(), oe = "";
|
|
19135
19135
|
}
|
|
19136
19136
|
function yt(N, B) {
|
|
19137
|
-
N !== "" && (
|
|
19137
|
+
N !== "" && (Ne.startScope(B), Ne.addText(N), Ne.endScope());
|
|
19138
19138
|
}
|
|
19139
19139
|
function ra(N, B) {
|
|
19140
19140
|
let X = 1;
|
|
@@ -19144,19 +19144,19 @@ https://github.com/highlightjs/highlight.js/issues/2277`), Ce = E, se = H), ee =
|
|
|
19144
19144
|
X++;
|
|
19145
19145
|
continue;
|
|
19146
19146
|
}
|
|
19147
|
-
const
|
|
19148
|
-
|
|
19147
|
+
const Le = bt.classNameAliases[N[X]] || N[X], At = B[X];
|
|
19148
|
+
Le ? yt(At, Le) : (oe = At, Kt(), oe = ""), X++;
|
|
19149
19149
|
}
|
|
19150
19150
|
}
|
|
19151
19151
|
function ia(N, B) {
|
|
19152
|
-
return N.scope && typeof N.scope == "string" &&
|
|
19152
|
+
return N.scope && typeof N.scope == "string" && Ne.openNode(bt.classNameAliases[N.scope] || N.scope), N.beginScope && (N.beginScope._wrap ? (yt(oe, bt.classNameAliases[N.beginScope._wrap] || N.beginScope._wrap), oe = "") : N.beginScope._multi && (ra(N.beginScope, B), oe = "")), G = Object.create(N, { parent: { value: G } }), G;
|
|
19153
19153
|
}
|
|
19154
19154
|
function sa(N, B, X) {
|
|
19155
|
-
let ne =
|
|
19155
|
+
let ne = x(N.endRe, X);
|
|
19156
19156
|
if (ne) {
|
|
19157
19157
|
if (N["on:end"]) {
|
|
19158
|
-
const
|
|
19159
|
-
N["on:end"](B,
|
|
19158
|
+
const Le = new e(N);
|
|
19159
|
+
N["on:end"](B, Le), Le.isMatchIgnored && (ne = !1);
|
|
19160
19160
|
}
|
|
19161
19161
|
if (ne) {
|
|
19162
19162
|
for (; N.endsParent && N.parent; )
|
|
@@ -19168,49 +19168,49 @@ https://github.com/highlightjs/highlight.js/issues/2277`), Ce = E, se = H), ee =
|
|
|
19168
19168
|
return sa(N.parent, B, X);
|
|
19169
19169
|
}
|
|
19170
19170
|
function Wh(N) {
|
|
19171
|
-
return
|
|
19171
|
+
return G.matcher.regexIndex === 0 ? (oe += N[0], 1) : (Hs = !0, 0);
|
|
19172
19172
|
}
|
|
19173
19173
|
function Kh(N) {
|
|
19174
|
-
const B = N[0], X = N.rule, ne = new e(X),
|
|
19175
|
-
for (const At of
|
|
19174
|
+
const B = N[0], X = N.rule, ne = new e(X), Le = [X.__beforeBegin, X["on:begin"]];
|
|
19175
|
+
for (const At of Le)
|
|
19176
19176
|
if (At && (At(N, ne), ne.isMatchIgnored))
|
|
19177
19177
|
return Wh(B);
|
|
19178
|
-
return X.skip ? oe += B : (X.excludeBegin && (oe += B),
|
|
19178
|
+
return X.skip ? oe += B : (X.excludeBegin && (oe += B), Xe(), !X.returnBegin && !X.excludeBegin && (oe = B)), ia(X, N), X.returnBegin ? 0 : B.length;
|
|
19179
19179
|
}
|
|
19180
19180
|
function qh(N) {
|
|
19181
|
-
const B = N[0], X = H.substring(N.index), ne = sa(
|
|
19181
|
+
const B = N[0], X = H.substring(N.index), ne = sa(G, N, X);
|
|
19182
19182
|
if (!ne)
|
|
19183
19183
|
return Ql;
|
|
19184
|
-
const
|
|
19185
|
-
|
|
19184
|
+
const Le = G;
|
|
19185
|
+
G.endScope && G.endScope._wrap ? (Xe(), yt(B, G.endScope._wrap)) : G.endScope && G.endScope._multi ? (Xe(), ra(G.endScope, N)) : Le.skip ? oe += B : (Le.returnEnd || Le.excludeEnd || (oe += B), Xe(), Le.excludeEnd && (oe = B));
|
|
19186
19186
|
do
|
|
19187
|
-
|
|
19188
|
-
while (
|
|
19189
|
-
return ne.starts && ia(ne.starts, N),
|
|
19187
|
+
G.scope && Ne.closeNode(), !G.skip && !G.subLanguage && (Jr += G.relevance), G = G.parent;
|
|
19188
|
+
while (G !== ne.parent);
|
|
19189
|
+
return ne.starts && ia(ne.starts, N), Le.returnEnd ? 0 : B.length;
|
|
19190
19190
|
}
|
|
19191
19191
|
function Jh() {
|
|
19192
19192
|
const N = [];
|
|
19193
|
-
for (let B =
|
|
19193
|
+
for (let B = G; B !== bt; B = B.parent)
|
|
19194
19194
|
B.scope && N.unshift(B.scope);
|
|
19195
|
-
N.forEach((B) =>
|
|
19195
|
+
N.forEach((B) => Ne.openNode(B));
|
|
19196
19196
|
}
|
|
19197
19197
|
let qr = {};
|
|
19198
19198
|
function oa(N, B) {
|
|
19199
19199
|
const X = B && B[0];
|
|
19200
19200
|
if (oe += N, X == null)
|
|
19201
|
-
return
|
|
19201
|
+
return Xe(), 0;
|
|
19202
19202
|
if (qr.type === "begin" && B.type === "end" && qr.index === B.index && X === "") {
|
|
19203
19203
|
if (oe += H.slice(B.index, B.index + 1), !be) {
|
|
19204
|
-
const ne = new Error(`0 width match regex (${
|
|
19205
|
-
throw ne.languageName =
|
|
19204
|
+
const ne = new Error(`0 width match regex (${M})`);
|
|
19205
|
+
throw ne.languageName = M, ne.badRule = qr.rule, ne;
|
|
19206
19206
|
}
|
|
19207
19207
|
return 1;
|
|
19208
19208
|
}
|
|
19209
19209
|
if (qr = B, B.type === "begin")
|
|
19210
19210
|
return Kh(B);
|
|
19211
19211
|
if (B.type === "illegal" && !ee) {
|
|
19212
|
-
const ne = new Error('Illegal lexeme "' + X + '" for mode "' + (
|
|
19213
|
-
throw ne.mode =
|
|
19212
|
+
const ne = new Error('Illegal lexeme "' + X + '" for mode "' + (G.scope || "<unnamed>") + '"');
|
|
19213
|
+
throw ne.mode = G, ne;
|
|
19214
19214
|
} else if (B.type === "end") {
|
|
19215
19215
|
const ne = qh(B);
|
|
19216
19216
|
if (ne !== Ql)
|
|
@@ -19223,39 +19223,39 @@ https://github.com/highlightjs/highlight.js/issues/2277`), Ce = E, se = H), ee =
|
|
|
19223
19223
|
throw new Error("potential infinite loop, way more iterations than matches");
|
|
19224
19224
|
return oe += X, X.length;
|
|
19225
19225
|
}
|
|
19226
|
-
const bt = Wt(
|
|
19226
|
+
const bt = Wt(M);
|
|
19227
19227
|
if (!bt)
|
|
19228
|
-
throw gn(we.replace("{}",
|
|
19228
|
+
throw gn(we.replace("{}", M)), new Error('Unknown language: "' + M + '"');
|
|
19229
19229
|
const Gh = Ah(bt);
|
|
19230
|
-
let $s = "",
|
|
19231
|
-
const la = {},
|
|
19230
|
+
let $s = "", G = se || Gh;
|
|
19231
|
+
const la = {}, Ne = new I.__emitter(I);
|
|
19232
19232
|
Jh();
|
|
19233
19233
|
let oe = "", Jr = 0, yn = 0, zs = 0, Hs = !1;
|
|
19234
19234
|
try {
|
|
19235
19235
|
if (bt.__emitTokens)
|
|
19236
|
-
bt.__emitTokens(H,
|
|
19236
|
+
bt.__emitTokens(H, Ne);
|
|
19237
19237
|
else {
|
|
19238
|
-
for (
|
|
19239
|
-
zs++, Hs ? Hs = !1 :
|
|
19240
|
-
const N =
|
|
19238
|
+
for (G.matcher.considerAll(); ; ) {
|
|
19239
|
+
zs++, Hs ? Hs = !1 : G.matcher.considerAll(), G.matcher.lastIndex = yn;
|
|
19240
|
+
const N = G.matcher.exec(H);
|
|
19241
19241
|
if (!N) break;
|
|
19242
19242
|
const B = H.substring(yn, N.index), X = oa(B, N);
|
|
19243
19243
|
yn = N.index + X;
|
|
19244
19244
|
}
|
|
19245
19245
|
oa(H.substring(yn));
|
|
19246
19246
|
}
|
|
19247
|
-
return
|
|
19248
|
-
language:
|
|
19247
|
+
return Ne.finalize(), $s = Ne.toHTML(), {
|
|
19248
|
+
language: M,
|
|
19249
19249
|
value: $s,
|
|
19250
19250
|
relevance: Jr,
|
|
19251
19251
|
illegal: !1,
|
|
19252
|
-
_emitter:
|
|
19253
|
-
_top:
|
|
19252
|
+
_emitter: Ne,
|
|
19253
|
+
_top: G
|
|
19254
19254
|
};
|
|
19255
19255
|
} catch (N) {
|
|
19256
19256
|
if (N.message && N.message.includes("Illegal"))
|
|
19257
19257
|
return {
|
|
19258
|
-
language:
|
|
19258
|
+
language: M,
|
|
19259
19259
|
value: Ps(H),
|
|
19260
19260
|
illegal: !0,
|
|
19261
19261
|
relevance: 0,
|
|
@@ -19266,83 +19266,83 @@ https://github.com/highlightjs/highlight.js/issues/2277`), Ce = E, se = H), ee =
|
|
|
19266
19266
|
mode: N.mode,
|
|
19267
19267
|
resultSoFar: $s
|
|
19268
19268
|
},
|
|
19269
|
-
_emitter:
|
|
19269
|
+
_emitter: Ne
|
|
19270
19270
|
};
|
|
19271
19271
|
if (be)
|
|
19272
19272
|
return {
|
|
19273
|
-
language:
|
|
19273
|
+
language: M,
|
|
19274
19274
|
value: Ps(H),
|
|
19275
19275
|
illegal: !1,
|
|
19276
19276
|
relevance: 0,
|
|
19277
19277
|
errorRaised: N,
|
|
19278
|
-
_emitter:
|
|
19279
|
-
_top:
|
|
19278
|
+
_emitter: Ne,
|
|
19279
|
+
_top: G
|
|
19280
19280
|
};
|
|
19281
19281
|
throw N;
|
|
19282
19282
|
}
|
|
19283
19283
|
}
|
|
19284
|
-
function Ls(
|
|
19284
|
+
function Ls(M) {
|
|
19285
19285
|
const H = {
|
|
19286
|
-
value: Ps(
|
|
19286
|
+
value: Ps(M),
|
|
19287
19287
|
illegal: !1,
|
|
19288
19288
|
relevance: 0,
|
|
19289
19289
|
_top: L,
|
|
19290
19290
|
_emitter: new I.__emitter(I)
|
|
19291
19291
|
};
|
|
19292
|
-
return H._emitter.addText(
|
|
19292
|
+
return H._emitter.addText(M), H;
|
|
19293
19293
|
}
|
|
19294
|
-
function Bs(
|
|
19294
|
+
function Bs(M, H) {
|
|
19295
19295
|
H = H || I.languages || Object.keys(k);
|
|
19296
|
-
const ee = Ls(
|
|
19297
|
-
(
|
|
19296
|
+
const ee = Ls(M), se = H.filter(Wt).filter(na).map(
|
|
19297
|
+
(Xe) => sr(Xe, M, !1)
|
|
19298
19298
|
);
|
|
19299
19299
|
se.unshift(ee);
|
|
19300
|
-
const Ce = se.sort((
|
|
19301
|
-
if (
|
|
19302
|
-
if (
|
|
19303
|
-
if (Wt(
|
|
19300
|
+
const Ce = se.sort((Xe, yt) => {
|
|
19301
|
+
if (Xe.relevance !== yt.relevance) return yt.relevance - Xe.relevance;
|
|
19302
|
+
if (Xe.language && yt.language) {
|
|
19303
|
+
if (Wt(Xe.language).supersetOf === yt.language)
|
|
19304
19304
|
return 1;
|
|
19305
|
-
if (Wt(yt.language).supersetOf ===
|
|
19305
|
+
if (Wt(yt.language).supersetOf === Xe.language)
|
|
19306
19306
|
return -1;
|
|
19307
19307
|
}
|
|
19308
19308
|
return 0;
|
|
19309
19309
|
}), [ct, Kt] = Ce, Kr = ct;
|
|
19310
19310
|
return Kr.secondBest = Kt, Kr;
|
|
19311
19311
|
}
|
|
19312
|
-
function Ph(
|
|
19312
|
+
function Ph(M, H, ee) {
|
|
19313
19313
|
const se = H && O[H] || ee;
|
|
19314
|
-
|
|
19314
|
+
M.classList.add("hljs"), M.classList.add(`language-${se}`);
|
|
19315
19315
|
}
|
|
19316
|
-
function _s(
|
|
19316
|
+
function _s(M) {
|
|
19317
19317
|
let H = null;
|
|
19318
|
-
const ee = Ee(
|
|
19318
|
+
const ee = Ee(M);
|
|
19319
19319
|
if (W(ee)) return;
|
|
19320
19320
|
if (Wr(
|
|
19321
19321
|
"before:highlightElement",
|
|
19322
|
-
{ el:
|
|
19323
|
-
),
|
|
19324
|
-
console.log("Element previously highlighted. To highlight again, first unset `dataset.highlighted`.",
|
|
19322
|
+
{ el: M, language: ee }
|
|
19323
|
+
), M.dataset.highlighted) {
|
|
19324
|
+
console.log("Element previously highlighted. To highlight again, first unset `dataset.highlighted`.", M);
|
|
19325
19325
|
return;
|
|
19326
19326
|
}
|
|
19327
|
-
if (
|
|
19327
|
+
if (M.children.length > 0 && (I.ignoreUnescapedHTML || (console.warn("One of your code blocks includes unescaped HTML. This is a potentially serious security risk."), console.warn("https://github.com/highlightjs/highlight.js/wiki/security"), console.warn("The element with unescaped HTML:"), console.warn(M)), I.throwUnescapedHTML))
|
|
19328
19328
|
throw new Dh(
|
|
19329
19329
|
"One of your code blocks includes unescaped HTML.",
|
|
19330
|
-
|
|
19330
|
+
M.innerHTML
|
|
19331
19331
|
);
|
|
19332
|
-
H =
|
|
19332
|
+
H = M;
|
|
19333
19333
|
const se = H.textContent, Ce = ee ? ke(se, { language: ee, ignoreIllegals: !0 }) : Bs(se);
|
|
19334
|
-
|
|
19334
|
+
M.innerHTML = Ce.value, M.dataset.highlighted = "yes", Ph(M, ee, Ce.language), M.result = {
|
|
19335
19335
|
language: Ce.language,
|
|
19336
19336
|
// TODO: remove with version 11.0
|
|
19337
19337
|
re: Ce.relevance,
|
|
19338
19338
|
relevance: Ce.relevance
|
|
19339
|
-
}, Ce.secondBest && (
|
|
19339
|
+
}, Ce.secondBest && (M.secondBest = {
|
|
19340
19340
|
language: Ce.secondBest.language,
|
|
19341
19341
|
relevance: Ce.secondBest.relevance
|
|
19342
|
-
}), Wr("after:highlightElement", { el:
|
|
19342
|
+
}), Wr("after:highlightElement", { el: M, result: Ce, text: se });
|
|
19343
19343
|
}
|
|
19344
|
-
function Lh(
|
|
19345
|
-
I = Xl(I,
|
|
19344
|
+
function Lh(M) {
|
|
19345
|
+
I = Xl(I, M);
|
|
19346
19346
|
}
|
|
19347
19347
|
const Bh = () => {
|
|
19348
19348
|
Ur(), Ln("10.6.0", "initHighlighting() deprecated. Use highlightAll() now.");
|
|
@@ -19352,74 +19352,74 @@ https://github.com/highlightjs/highlight.js/issues/2277`), Ce = E, se = H), ee =
|
|
|
19352
19352
|
}
|
|
19353
19353
|
let ea = !1;
|
|
19354
19354
|
function Ur() {
|
|
19355
|
-
function
|
|
19355
|
+
function M() {
|
|
19356
19356
|
Ur();
|
|
19357
19357
|
}
|
|
19358
19358
|
if (document.readyState === "loading") {
|
|
19359
|
-
ea || window.addEventListener("DOMContentLoaded",
|
|
19359
|
+
ea || window.addEventListener("DOMContentLoaded", M, !1), ea = !0;
|
|
19360
19360
|
return;
|
|
19361
19361
|
}
|
|
19362
19362
|
document.querySelectorAll(I.cssSelector).forEach(_s);
|
|
19363
19363
|
}
|
|
19364
|
-
function $h(
|
|
19364
|
+
function $h(M, H) {
|
|
19365
19365
|
let ee = null;
|
|
19366
19366
|
try {
|
|
19367
19367
|
ee = H(y);
|
|
19368
19368
|
} catch (se) {
|
|
19369
|
-
if (gn("Language definition for '{}' could not be registered.".replace("{}",
|
|
19369
|
+
if (gn("Language definition for '{}' could not be registered.".replace("{}", M)), be)
|
|
19370
19370
|
gn(se);
|
|
19371
19371
|
else
|
|
19372
19372
|
throw se;
|
|
19373
19373
|
ee = L;
|
|
19374
19374
|
}
|
|
19375
|
-
ee.name || (ee.name =
|
|
19375
|
+
ee.name || (ee.name = M), k[M] = ee, ee.rawDefinition = H.bind(null, y), ee.aliases && ta(ee.aliases, { languageName: M });
|
|
19376
19376
|
}
|
|
19377
|
-
function zh(
|
|
19378
|
-
delete k[
|
|
19377
|
+
function zh(M) {
|
|
19378
|
+
delete k[M];
|
|
19379
19379
|
for (const H of Object.keys(O))
|
|
19380
|
-
O[H] ===
|
|
19380
|
+
O[H] === M && delete O[H];
|
|
19381
19381
|
}
|
|
19382
19382
|
function Hh() {
|
|
19383
19383
|
return Object.keys(k);
|
|
19384
19384
|
}
|
|
19385
|
-
function Wt(
|
|
19386
|
-
return
|
|
19385
|
+
function Wt(M) {
|
|
19386
|
+
return M = (M || "").toLowerCase(), k[M] || k[O[M]];
|
|
19387
19387
|
}
|
|
19388
|
-
function ta(
|
|
19389
|
-
typeof
|
|
19388
|
+
function ta(M, { languageName: H }) {
|
|
19389
|
+
typeof M == "string" && (M = [M]), M.forEach((ee) => {
|
|
19390
19390
|
O[ee.toLowerCase()] = H;
|
|
19391
19391
|
});
|
|
19392
19392
|
}
|
|
19393
|
-
function na(
|
|
19394
|
-
const H = Wt(
|
|
19393
|
+
function na(M) {
|
|
19394
|
+
const H = Wt(M);
|
|
19395
19395
|
return H && !H.disableAutodetect;
|
|
19396
19396
|
}
|
|
19397
|
-
function Fh(
|
|
19398
|
-
|
|
19399
|
-
|
|
19397
|
+
function Fh(M) {
|
|
19398
|
+
M["before:highlightBlock"] && !M["before:highlightElement"] && (M["before:highlightElement"] = (H) => {
|
|
19399
|
+
M["before:highlightBlock"](
|
|
19400
19400
|
Object.assign({ block: H.el }, H)
|
|
19401
19401
|
);
|
|
19402
|
-
}),
|
|
19403
|
-
|
|
19402
|
+
}), M["after:highlightBlock"] && !M["after:highlightElement"] && (M["after:highlightElement"] = (H) => {
|
|
19403
|
+
M["after:highlightBlock"](
|
|
19404
19404
|
Object.assign({ block: H.el }, H)
|
|
19405
19405
|
);
|
|
19406
19406
|
});
|
|
19407
19407
|
}
|
|
19408
|
-
function Vh(
|
|
19409
|
-
Fh(
|
|
19408
|
+
function Vh(M) {
|
|
19409
|
+
Fh(M), q.push(M);
|
|
19410
19410
|
}
|
|
19411
|
-
function jh(
|
|
19412
|
-
const H = q.indexOf(
|
|
19411
|
+
function jh(M) {
|
|
19412
|
+
const H = q.indexOf(M);
|
|
19413
19413
|
H !== -1 && q.splice(H, 1);
|
|
19414
19414
|
}
|
|
19415
|
-
function Wr(
|
|
19416
|
-
const ee =
|
|
19415
|
+
function Wr(M, H) {
|
|
19416
|
+
const ee = M;
|
|
19417
19417
|
q.forEach(function(se) {
|
|
19418
19418
|
se[ee] && se[ee](H);
|
|
19419
19419
|
});
|
|
19420
19420
|
}
|
|
19421
|
-
function Uh(
|
|
19422
|
-
return Ln("10.7.0", "highlightBlock will be removed entirely in v12.0"), Ln("10.7.0", "Please use highlightElement now."), _s(
|
|
19421
|
+
function Uh(M) {
|
|
19422
|
+
return Ln("10.7.0", "highlightBlock will be removed entirely in v12.0"), Ln("10.7.0", "Please use highlightElement now."), _s(M);
|
|
19423
19423
|
}
|
|
19424
19424
|
Object.assign(y, {
|
|
19425
19425
|
highlight: ke,
|
|
@@ -19451,8 +19451,8 @@ https://github.com/highlightjs/highlight.js/issues/2277`), Ce = E, se = H), ee =
|
|
|
19451
19451
|
optional: p,
|
|
19452
19452
|
anyNumberOfTimes: h
|
|
19453
19453
|
};
|
|
19454
|
-
for (const
|
|
19455
|
-
typeof Vr[
|
|
19454
|
+
for (const M in Vr)
|
|
19455
|
+
typeof Vr[M] == "object" && n(Vr[M]);
|
|
19456
19456
|
return Object.assign(y, Vr), y;
|
|
19457
19457
|
}, Bn = Zl({});
|
|
19458
19458
|
return Bn.newInstance = () => Zl({}), go = Bn, Bn.HighlightJS = Bn, Bn.default = Bn, go;
|
|
@@ -19548,7 +19548,7 @@ function ok({
|
|
|
19548
19548
|
});
|
|
19549
19549
|
return r;
|
|
19550
19550
|
}
|
|
19551
|
-
var lk =
|
|
19551
|
+
var lk = xb.extend({
|
|
19552
19552
|
addOptions() {
|
|
19553
19553
|
var n;
|
|
19554
19554
|
return {
|
|
@@ -19584,7 +19584,7 @@ const ck = ["onClick"], uk = { class: "sus-code-block-content" }, dk = /* @__PUR
|
|
|
19584
19584
|
selected: { type: Boolean }
|
|
19585
19585
|
},
|
|
19586
19586
|
setup(n) {
|
|
19587
|
-
const e = n, t =
|
|
19587
|
+
const e = n, t = Pe(!1), r = Pe(null), i = ua(() => e.node.attrs.language || ""), s = ua(() => {
|
|
19588
19588
|
const c = Gc.find((u) => u.value === i.value);
|
|
19589
19589
|
return c ? c.label : "纯文本";
|
|
19590
19590
|
});
|
|
@@ -19601,22 +19601,22 @@ const ck = ["onClick"], uk = { class: "sus-code-block-content" }, dk = /* @__PUR
|
|
|
19601
19601
|
document.addEventListener("click", a);
|
|
19602
19602
|
}), sp(() => {
|
|
19603
19603
|
document.removeEventListener("click", a);
|
|
19604
|
-
}), (c, u) => (
|
|
19604
|
+
}), (c, u) => (J(), xr(Be(tb), {
|
|
19605
19605
|
class: wo(["sus-code-block-wrapper", { "is-selected": n.selected }])
|
|
19606
19606
|
}, {
|
|
19607
19607
|
default: Qt(() => [
|
|
19608
|
-
|
|
19608
|
+
E("div", {
|
|
19609
19609
|
class: "sus-code-block-toolbar",
|
|
19610
19610
|
ref_key: "languageSelectRef",
|
|
19611
19611
|
ref: r
|
|
19612
19612
|
}, [
|
|
19613
|
-
|
|
19613
|
+
E("button", {
|
|
19614
19614
|
onClick: bo(l, ["stop"]),
|
|
19615
19615
|
class: "sus-code-block-language-btn",
|
|
19616
19616
|
title: "选择语言"
|
|
19617
19617
|
}, [
|
|
19618
|
-
|
|
19619
|
-
u[1] || (u[1] =
|
|
19618
|
+
E("span", null, Je(s.value), 1),
|
|
19619
|
+
u[1] || (u[1] = E("svg", {
|
|
19620
19620
|
xmlns: "http://www.w3.org/2000/svg",
|
|
19621
19621
|
width: "16",
|
|
19622
19622
|
height: "16",
|
|
@@ -19627,26 +19627,26 @@ const ck = ["onClick"], uk = { class: "sus-code-block-content" }, dk = /* @__PUR
|
|
|
19627
19627
|
"stroke-linecap": "round",
|
|
19628
19628
|
"stroke-linejoin": "round"
|
|
19629
19629
|
}, [
|
|
19630
|
-
|
|
19630
|
+
E("polyline", { points: "6 9 12 15 18 9" })
|
|
19631
19631
|
], -1))
|
|
19632
19632
|
]),
|
|
19633
|
-
t.value ? (
|
|
19633
|
+
t.value ? (J(), Q("div", {
|
|
19634
19634
|
key: 0,
|
|
19635
19635
|
class: "sus-code-block-language-selector",
|
|
19636
19636
|
onClick: u[0] || (u[0] = bo(() => {
|
|
19637
19637
|
}, ["stop"]))
|
|
19638
19638
|
}, [
|
|
19639
|
-
(
|
|
19639
|
+
(J(!0), Q(Br, null, fs(Be(Gc), (d) => (J(), Q("div", {
|
|
19640
19640
|
key: d.value,
|
|
19641
19641
|
onClick: (f) => o(d.value),
|
|
19642
19642
|
class: wo(["sus-code-block-language-item", { active: i.value === d.value }])
|
|
19643
|
-
},
|
|
19644
|
-
])) :
|
|
19643
|
+
}, Je(d.label), 11, ck))), 128))
|
|
19644
|
+
])) : de("", !0)
|
|
19645
19645
|
], 512),
|
|
19646
|
-
|
|
19646
|
+
E("pre", uk, [
|
|
19647
19647
|
u[2] || (u[2] = Sr(" ", -1)),
|
|
19648
|
-
|
|
19649
|
-
ut(
|
|
19648
|
+
E("code", null, [
|
|
19649
|
+
ut(Be(eb))
|
|
19650
19650
|
]),
|
|
19651
19651
|
u[3] || (u[3] = Sr(`
|
|
19652
19652
|
`, -1))
|
|
@@ -19676,10 +19676,10 @@ const ck = ["onClick"], uk = { class: "sus-code-block-content" }, dk = /* @__PUR
|
|
|
19676
19676
|
}, yk = ["src"], bk = { class: "sus-avatar-text" }, wk = { class: "sus-comment__main" }, kk = {
|
|
19677
19677
|
key: 0,
|
|
19678
19678
|
class: "sus-comment__info"
|
|
19679
|
-
},
|
|
19679
|
+
}, vk = {
|
|
19680
19680
|
key: 0,
|
|
19681
19681
|
class: "sus-comment__info-input"
|
|
19682
|
-
},
|
|
19682
|
+
}, xk = ["placeholder", "title"], Sk = {
|
|
19683
19683
|
key: 1,
|
|
19684
19684
|
class: "sus-comment__info-input"
|
|
19685
19685
|
}, Ck = ["placeholder", "title"], Mk = {
|
|
@@ -19723,7 +19723,7 @@ const ck = ["onClick"], uk = { class: "sus-code-block-content" }, dk = /* @__PUR
|
|
|
19723
19723
|
const s = t, o = yo({
|
|
19724
19724
|
emojis: i.toolBar?.emoji?.emojis || [],
|
|
19725
19725
|
showPanel: !1
|
|
19726
|
-
}), l = i.reply?.userName, a =
|
|
19726
|
+
}), l = i.reply?.userName, a = Pe("在此处留下你的足迹吧!(支持markdown语法)"), c = yo(new r()), u = Pe(""), d = Pe(null), f = Pe([]), h = Pe(null), p = i.comment?.privacy || !1, m = {
|
|
19727
19727
|
enable: i.infoBar?.enable === void 0 ? !0 : i.infoBar.enable,
|
|
19728
19728
|
name: {
|
|
19729
19729
|
show: i.infoBar?.name?.show === void 0 ? !0 : i.infoBar.name.show,
|
|
@@ -19781,7 +19781,7 @@ const ck = ["onClick"], uk = { class: "sus-code-block-content" }, dk = /* @__PUR
|
|
|
19781
19781
|
c.content = u.value, c.contentText = g.value.getText(), s("on-save", c, h.value);
|
|
19782
19782
|
}
|
|
19783
19783
|
}
|
|
19784
|
-
function
|
|
19784
|
+
function x() {
|
|
19785
19785
|
localStorage.setItem("comment-content", ""), s("on-cancel");
|
|
19786
19786
|
}
|
|
19787
19787
|
function R() {
|
|
@@ -19831,41 +19831,41 @@ const ck = ["onClick"], uk = { class: "sus-code-block-content" }, dk = /* @__PUR
|
|
|
19831
19831
|
c.userName = D.userName, c.userEmail = D.userEmail, c.userWebsite = D.userWebsite, $();
|
|
19832
19832
|
}
|
|
19833
19833
|
c.notify = 1;
|
|
19834
|
-
}), (U, D) => (
|
|
19835
|
-
m.enable ? (
|
|
19836
|
-
|
|
19834
|
+
}), (U, D) => (J(), Q("div", mk, [
|
|
19835
|
+
m.enable ? (J(), Q("div", gk, [
|
|
19836
|
+
_e(E("img", {
|
|
19837
19837
|
alt: "头像",
|
|
19838
19838
|
src: c.userAvatar,
|
|
19839
19839
|
class: "sus-avatar",
|
|
19840
19840
|
onerror: "this.onerror=null,this.src='/error.webp'"
|
|
19841
19841
|
}, null, 8, yk), [
|
|
19842
|
-
[
|
|
19842
|
+
[rt, !!c.userAvatar]
|
|
19843
19843
|
]),
|
|
19844
|
-
|
|
19845
|
-
|
|
19844
|
+
_e(E("div", bk, [
|
|
19845
|
+
E("span", null, Je(c?.userName?.charAt(0)), 1)
|
|
19846
19846
|
], 512), [
|
|
19847
|
-
[
|
|
19847
|
+
[rt, !c.userAvatar]
|
|
19848
19848
|
])
|
|
19849
|
-
])) :
|
|
19850
|
-
|
|
19851
|
-
m.enable ? (
|
|
19852
|
-
m.name.show ? (
|
|
19853
|
-
|
|
19849
|
+
])) : de("", !0),
|
|
19850
|
+
E("div", wk, [
|
|
19851
|
+
m.enable ? (J(), Q("div", kk, [
|
|
19852
|
+
m.name.show ? (J(), Q("div", vk, [
|
|
19853
|
+
_e(E("input", {
|
|
19854
19854
|
class: "sus-input sus-username",
|
|
19855
19855
|
placeholder: m.name.placeholder,
|
|
19856
19856
|
title: m.name.placeholder,
|
|
19857
19857
|
"onUpdate:modelValue": D[0] || (D[0] = (Z) => c.userName = Z),
|
|
19858
19858
|
maxlength: "23"
|
|
19859
|
-
}, null, 8,
|
|
19859
|
+
}, null, 8, xk), [
|
|
19860
19860
|
[di, c.userName]
|
|
19861
19861
|
])
|
|
19862
|
-
])) :
|
|
19863
|
-
m.website.show ? (
|
|
19864
|
-
ut(
|
|
19862
|
+
])) : de("", !0),
|
|
19863
|
+
m.website.show ? (J(), Q("div", Sk, [
|
|
19864
|
+
ut(Be(Gr), {
|
|
19865
19865
|
content: m.website.tips
|
|
19866
19866
|
}, {
|
|
19867
19867
|
default: Qt(() => [
|
|
19868
|
-
|
|
19868
|
+
_e(E("input", {
|
|
19869
19869
|
class: "sus-input sus-web",
|
|
19870
19870
|
placeholder: m.website.placeholder,
|
|
19871
19871
|
title: m.website.placeholder,
|
|
@@ -19877,13 +19877,13 @@ const ck = ["onClick"], uk = { class: "sus-code-block-content" }, dk = /* @__PUR
|
|
|
19877
19877
|
]),
|
|
19878
19878
|
_: 1
|
|
19879
19879
|
}, 8, ["content"])
|
|
19880
|
-
])) :
|
|
19881
|
-
m.email.show ? (
|
|
19882
|
-
ut(
|
|
19880
|
+
])) : de("", !0),
|
|
19881
|
+
m.email.show ? (J(), Q("div", Mk, [
|
|
19882
|
+
ut(Be(Gr), {
|
|
19883
19883
|
content: m.email.tips
|
|
19884
19884
|
}, {
|
|
19885
19885
|
default: Qt(() => [
|
|
19886
|
-
|
|
19886
|
+
_e(E("input", {
|
|
19887
19887
|
onBlur: $,
|
|
19888
19888
|
class: "sus-input sus-email",
|
|
19889
19889
|
placeholder: m.email.placeholder,
|
|
@@ -19896,29 +19896,29 @@ const ck = ["onClick"], uk = { class: "sus-code-block-content" }, dk = /* @__PUR
|
|
|
19896
19896
|
]),
|
|
19897
19897
|
_: 1
|
|
19898
19898
|
}, 8, ["content"])
|
|
19899
|
-
])) :
|
|
19900
|
-
])) :
|
|
19901
|
-
|
|
19899
|
+
])) : de("", !0)
|
|
19900
|
+
])) : de("", !0),
|
|
19901
|
+
E("div", Tk, [
|
|
19902
19902
|
ut(Qw, {
|
|
19903
|
-
editor:
|
|
19903
|
+
editor: Be(g),
|
|
19904
19904
|
showMenu: n.toolBar?.bubbleMenu?.show
|
|
19905
19905
|
}, null, 8, ["editor", "showMenu"]),
|
|
19906
|
-
|
|
19906
|
+
_e(ut(cb, {
|
|
19907
19907
|
class: "sus-emoji-panel-position",
|
|
19908
19908
|
emoji: o,
|
|
19909
|
-
editor:
|
|
19909
|
+
editor: Be(g)
|
|
19910
19910
|
}, null, 8, ["emoji", "editor"]), [
|
|
19911
|
-
[
|
|
19911
|
+
[rt, o.showPanel]
|
|
19912
19912
|
]),
|
|
19913
|
-
ut(
|
|
19913
|
+
ut(Be(Z0), {
|
|
19914
19914
|
class: "sus-comment-input",
|
|
19915
|
-
editor:
|
|
19915
|
+
editor: Be(g)
|
|
19916
19916
|
}, null, 8, ["editor"])
|
|
19917
19917
|
]),
|
|
19918
|
-
|
|
19919
|
-
|
|
19920
|
-
o.emojis.length >= 0 ? (
|
|
19921
|
-
(
|
|
19918
|
+
E("div", Ok, [
|
|
19919
|
+
E("div", Ak, [
|
|
19920
|
+
o.emojis.length >= 0 ? (J(), Q("div", Nk, [
|
|
19921
|
+
(J(), Q("svg", {
|
|
19922
19922
|
title: "表情",
|
|
19923
19923
|
onClick: D[3] || (D[3] = (Z) => o.showPanel = !o.showPanel),
|
|
19924
19924
|
xmlns: "http://www.w3.org/2000/svg",
|
|
@@ -19926,9 +19926,9 @@ const ck = ["onClick"], uk = { class: "sus-code-block-content" }, dk = /* @__PUR
|
|
|
19926
19926
|
}, [...D[5] || (D[5] = [
|
|
19927
19927
|
fi('<g fill="none" data-v-f4426d84><path stroke="currentColor" stroke-linecap="round" stroke-width="1.5" d="M9 16c.85.63 1.885 1 3 1s2.15-.37 3-1" data-v-f4426d84></path><path fill="currentColor" d="M16 10.5c0 .828-.448 1.5-1 1.5s-1-.672-1-1.5s.448-1.5 1-1.5s1 .672 1 1.5" data-v-f4426d84></path><ellipse cx="9" cy="10.5" fill="currentColor" rx="1" ry="1.5" data-v-f4426d84></ellipse><path stroke="currentColor" stroke-linecap="round" stroke-width="1.5" d="M7 3.338A9.95 9.95 0 0 1 12 2c5.523 0 10 4.477 10 10s-4.477 10-10 10S2 17.523 2 12c0-1.821.487-3.53 1.338-5" data-v-f4426d84></path></g>', 1)
|
|
19928
19928
|
])]))
|
|
19929
|
-
])) :
|
|
19930
|
-
n.toolBar?.image ? (
|
|
19931
|
-
|
|
19929
|
+
])) : de("", !0),
|
|
19930
|
+
n.toolBar?.image ? (J(), Q("div", Rk, [
|
|
19931
|
+
E("input", {
|
|
19932
19932
|
ref_key: "imgRef",
|
|
19933
19933
|
ref: d,
|
|
19934
19934
|
onChange: R,
|
|
@@ -19938,19 +19938,19 @@ const ck = ["onClick"], uk = { class: "sus-code-block-content" }, dk = /* @__PUR
|
|
|
19938
19938
|
accept: "image/*"
|
|
19939
19939
|
}, null, 544),
|
|
19940
19940
|
D[6] || (D[6] = fi('<label for="upload-input" data-v-f4426d84><svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24" data-v-f4426d84><g fill="none" stroke="currentColor" stroke-linecap="round" stroke-width="1.5" data-v-f4426d84><path d="m2 12.5l1.752-1.533a2.3 2.3 0 0 1 3.14.105l4.29 4.29a2 2 0 0 0 2.564.222l.299-.21a3 3 0 0 1 3.731.225L21 18.5m-6-13h3.5m0 0H22m-3.5 0V9m0-3.5V2" data-v-f4426d84></path><path d="M22 12c0 4.714 0 7.071-1.465 8.535C19.072 22 16.714 22 12 22s-7.071 0-8.536-1.465C2 19.072 2 16.714 2 12c0-1.128 0-2.122.02-3M12 2C7.286 2 4.929 2 3.464 3.464c-.424.425-.726.925-.94 1.536" data-v-f4426d84></path></g></svg></label>', 1))
|
|
19941
|
-
])) :
|
|
19942
|
-
n.toolBar?.notify ? (
|
|
19941
|
+
])) : de("", !0),
|
|
19942
|
+
n.toolBar?.notify ? (J(), Q("div", {
|
|
19943
19943
|
key: 2,
|
|
19944
19944
|
onClick: K,
|
|
19945
19945
|
class: "sus-comment__footer-icon"
|
|
19946
19946
|
}, [
|
|
19947
|
-
|
|
19947
|
+
_e(ut(Be(Gr), { content: "收到回复后通知" }, {
|
|
19948
19948
|
default: Qt(() => [...D[7] || (D[7] = [
|
|
19949
|
-
|
|
19949
|
+
E("svg", {
|
|
19950
19950
|
xmlns: "http://www.w3.org/2000/svg",
|
|
19951
19951
|
viewBox: "0 0 24 24"
|
|
19952
19952
|
}, [
|
|
19953
|
-
|
|
19953
|
+
E("path", {
|
|
19954
19954
|
fill: "none",
|
|
19955
19955
|
stroke: "currentColor",
|
|
19956
19956
|
"stroke-linecap": "round",
|
|
@@ -19961,73 +19961,73 @@ const ck = ["onClick"], uk = { class: "sus-code-block-content" }, dk = /* @__PUR
|
|
|
19961
19961
|
])]),
|
|
19962
19962
|
_: 1
|
|
19963
19963
|
}, 512), [
|
|
19964
|
-
[
|
|
19964
|
+
[rt, c.notify === 1]
|
|
19965
19965
|
]),
|
|
19966
|
-
|
|
19966
|
+
_e(ut(Be(Gr), { content: "收到回复后不通知" }, {
|
|
19967
19967
|
default: Qt(() => [...D[8] || (D[8] = [
|
|
19968
|
-
|
|
19968
|
+
E("svg", {
|
|
19969
19969
|
xmlns: "http://www.w3.org/2000/svg",
|
|
19970
19970
|
viewBox: "0 0 24 24"
|
|
19971
19971
|
}, [
|
|
19972
|
-
|
|
19972
|
+
E("g", {
|
|
19973
19973
|
fill: "none",
|
|
19974
19974
|
stroke: "currentColor",
|
|
19975
19975
|
"stroke-linecap": "round",
|
|
19976
19976
|
"stroke-width": "1.5"
|
|
19977
19977
|
}, [
|
|
19978
|
-
|
|
19978
|
+
E("path", {
|
|
19979
19979
|
"stroke-linejoin": "round",
|
|
19980
19980
|
d: "M10 9h4l-4 4h4"
|
|
19981
19981
|
}),
|
|
19982
|
-
|
|
19982
|
+
E("path", { d: "M7.5 19c.655 1.748 2.422 3 4.5 3q.367 0 .72-.05M16.5 19a4.5 4.5 0 0 1-1.302 1.84M9.107 2.674A6.5 6.5 0 0 1 12 2c3.727 0 6.75 3.136 6.75 7.005v.705a4.4 4.4 0 0 0 .692 2.375l1.108 1.724c1.011 1.575.239 3.716-1.52 4.214a25.8 25.8 0 0 1-14.06 0c-1.759-.498-2.531-2.639-1.52-4.213l1.108-1.725A4.4 4.4 0 0 0 5.25 9.71v-.705c0-1.074.233-2.092.65-3.002" })
|
|
19983
19983
|
])
|
|
19984
19984
|
], -1)
|
|
19985
19985
|
])]),
|
|
19986
19986
|
_: 1
|
|
19987
19987
|
}, 512), [
|
|
19988
|
-
[
|
|
19988
|
+
[rt, c.notify !== 1]
|
|
19989
19989
|
])
|
|
19990
|
-
])) :
|
|
19990
|
+
])) : de("", !0)
|
|
19991
19991
|
]),
|
|
19992
|
-
|
|
19993
|
-
|
|
19992
|
+
E("div", { class: "sus-comment__footer-send" }, [
|
|
19993
|
+
E("button", {
|
|
19994
19994
|
class: "sus-button cancel",
|
|
19995
|
-
onClick:
|
|
19995
|
+
onClick: x
|
|
19996
19996
|
}, "取消"),
|
|
19997
|
-
|
|
19997
|
+
E("button", {
|
|
19998
19998
|
class: "sus-button ok",
|
|
19999
19999
|
onClick: w
|
|
20000
20000
|
}, "发送")
|
|
20001
20001
|
])
|
|
20002
20002
|
]),
|
|
20003
|
-
|
|
20004
|
-
|
|
20003
|
+
E("div", Dk, [
|
|
20004
|
+
_e(ut(Be(op), {
|
|
20005
20005
|
modelValue: c.privacy,
|
|
20006
20006
|
"onUpdate:modelValue": D[4] || (D[4] = (Z) => c.privacy = Z),
|
|
20007
|
-
checked:
|
|
20007
|
+
checked: Be(p)
|
|
20008
20008
|
}, {
|
|
20009
20009
|
default: Qt(() => [...D[9] || (D[9] = [
|
|
20010
20010
|
Sr(" 仅博主可见 ", -1)
|
|
20011
20011
|
])]),
|
|
20012
20012
|
_: 1
|
|
20013
20013
|
}, 8, ["modelValue", "checked"]), [
|
|
20014
|
-
[
|
|
20014
|
+
[rt, n.toolBar?.privacy?.show]
|
|
20015
20015
|
]),
|
|
20016
|
-
|
|
20017
|
-
[
|
|
20016
|
+
_e(E("div", Ik, null, 512), [
|
|
20017
|
+
[rt, n.toolBar?.privacy?.disable]
|
|
20018
20018
|
])
|
|
20019
20019
|
]),
|
|
20020
|
-
|
|
20021
|
-
(
|
|
20020
|
+
E("div", Pk, [
|
|
20021
|
+
(J(!0), Q(Br, null, fs(f.value, (Z, te) => (J(), Q("div", {
|
|
20022
20022
|
class: "sus-comment__extend-img",
|
|
20023
20023
|
key: Z
|
|
20024
20024
|
}, [
|
|
20025
|
-
|
|
20025
|
+
E("img", {
|
|
20026
20026
|
class: "img-item",
|
|
20027
20027
|
src: Z,
|
|
20028
20028
|
alt: ""
|
|
20029
20029
|
}, null, 8, Lk),
|
|
20030
|
-
|
|
20030
|
+
E("div", {
|
|
20031
20031
|
onClick: (Se) => V(te),
|
|
20032
20032
|
class: "mask"
|
|
20033
20033
|
}, [...D[10] || (D[10] = [
|
|
@@ -20056,23 +20056,29 @@ const Hk = { class: "sus-item__container" }, Fk = {
|
|
|
20056
20056
|
width: "24",
|
|
20057
20057
|
height: "24",
|
|
20058
20058
|
viewBox: "0 0 24 24"
|
|
20059
|
-
}, Vk = { class: "sus-item__row" }, jk = { class: "sus-item__operate" }, Uk = { class: "sus-comment-aside" }, Wk = {
|
|
20059
|
+
}, Vk = { class: "sus-item__row" }, jk = { class: "sus-item__operate" }, Uk = { class: "sus-comment-aside" }, Wk = {
|
|
20060
|
+
key: 0,
|
|
20061
|
+
class: "sus-comment-avatar"
|
|
20062
|
+
}, Kk = {
|
|
20063
|
+
key: 0,
|
|
20064
|
+
class: "sus-avatar-text-container"
|
|
20065
|
+
}, qk = { class: "sus-avatar-text" }, Jk = ["src"], Gk = { class: "sus-item-floor" }, Yk = { class: "sus-item__main" }, Xk = { class: "sus-item__user" }, Qk = ["rel", "href"], Zk = {
|
|
20060
20066
|
key: 0,
|
|
20061
20067
|
class: "sus-item-tag",
|
|
20062
20068
|
title: "博主"
|
|
20063
|
-
},
|
|
20069
|
+
}, ev = {
|
|
20064
20070
|
key: 1,
|
|
20065
20071
|
class: "sus-item__content-name"
|
|
20066
|
-
},
|
|
20072
|
+
}, tv = { class: "sus-item__user-date" }, nv = {
|
|
20067
20073
|
key: 0,
|
|
20068
20074
|
class: "sus-item__content"
|
|
20069
|
-
},
|
|
20075
|
+
}, rv = ["innerHTML"], iv = {
|
|
20070
20076
|
key: 1,
|
|
20071
20077
|
class: "sus-item__content"
|
|
20072
|
-
},
|
|
20078
|
+
}, sv = ["innerHTML"], ov = {
|
|
20073
20079
|
key: 0,
|
|
20074
20080
|
class: "sus-item__info"
|
|
20075
|
-
},
|
|
20081
|
+
}, lv = { class: "sus-item__info-area" }, av = { class: "sus-item__info-useragent" }, cv = /* @__PURE__ */ Ke({
|
|
20076
20082
|
__name: "item",
|
|
20077
20083
|
props: {
|
|
20078
20084
|
comment: {},
|
|
@@ -20082,7 +20088,7 @@ const Hk = { class: "sus-item__container" }, Fk = {
|
|
|
20082
20088
|
},
|
|
20083
20089
|
emits: ["on-reply", "on-edit", "on-remove"],
|
|
20084
20090
|
setup(n, { emit: e }) {
|
|
20085
|
-
const t = n, r =
|
|
20091
|
+
const t = n, r = Pe(), i = Pe(), s = Pe(!1), o = e;
|
|
20086
20092
|
function l() {
|
|
20087
20093
|
r.value.style.display = "block", s.value = !1;
|
|
20088
20094
|
}
|
|
@@ -20108,125 +20114,123 @@ const Hk = { class: "sus-item__container" }, Fk = {
|
|
|
20108
20114
|
}
|
|
20109
20115
|
return nr(() => {
|
|
20110
20116
|
f(), a();
|
|
20111
|
-
}), (p, m) => (
|
|
20112
|
-
|
|
20113
|
-
|
|
20117
|
+
}), (p, m) => (J(), Q("div", Hk, [
|
|
20118
|
+
_e((J(), Q("svg", Fk, [...m[0] || (m[0] = [
|
|
20119
|
+
E("rect", {
|
|
20114
20120
|
width: "24",
|
|
20115
20121
|
height: "24",
|
|
20116
20122
|
fill: "none"
|
|
20117
20123
|
}, null, -1),
|
|
20118
|
-
|
|
20124
|
+
E("g", {
|
|
20119
20125
|
fill: "none",
|
|
20120
20126
|
stroke: "currentColor",
|
|
20121
20127
|
"stroke-linecap": "round",
|
|
20122
20128
|
"stroke-width": "1.5"
|
|
20123
20129
|
}, [
|
|
20124
|
-
|
|
20125
|
-
|
|
20130
|
+
E("path", { d: "M21 7v-.281c0-2.19 0-3.285-.707-3.884c-.707-.6-1.788-.42-3.95-.059l-1.055.176c-1.64.273-2.46.41-3.288.41s-1.648-.137-3.288-.41l-1.054-.176c-2.162-.36-3.243-.54-3.95.059S3 4.529 3 6.719V12c0 5.49 4.239 8.155 6.899 9.286c.721.307 1.082.46 2.101.46c1.02 0 1.38-.153 2.101-.46C16.761 20.155 21 17.49 21 12v-1" }),
|
|
20131
|
+
E("path", { d: "M6.5 9c.291-.583 1.077-1 2-1s1.709.417 2 1m3 0c.291-.583 1.077-1 2-1s1.709.417 2 1m-9 5s1.05 1 3.5 1s3.5-1 3.5-1" })
|
|
20126
20132
|
], -1)
|
|
20127
20133
|
])], 512)), [
|
|
20128
|
-
[
|
|
20134
|
+
[rt, n.comment.band === "privacy"]
|
|
20129
20135
|
]),
|
|
20130
|
-
|
|
20131
|
-
|
|
20132
|
-
|
|
20136
|
+
E("div", Vk, [
|
|
20137
|
+
E("div", jk, [
|
|
20138
|
+
_e(E("span", {
|
|
20133
20139
|
onClick: d,
|
|
20134
20140
|
class: "sus-item__operate-delete"
|
|
20135
20141
|
}, " 删除 ", 512), [
|
|
20136
|
-
[
|
|
20142
|
+
[rt, !n.comment.privacy && n.comment.showDelete]
|
|
20137
20143
|
]),
|
|
20138
|
-
|
|
20144
|
+
_e(E("span", {
|
|
20139
20145
|
onClick: u,
|
|
20140
20146
|
class: "sus-item__operate-edit"
|
|
20141
20147
|
}, " 编辑 ", 512), [
|
|
20142
|
-
[
|
|
20148
|
+
[rt, !n.comment.privacy && n.comment.showEdit]
|
|
20143
20149
|
]),
|
|
20144
|
-
|
|
20150
|
+
_e(E("span", {
|
|
20145
20151
|
onClick: c,
|
|
20146
20152
|
class: "sus-item__operate-reply"
|
|
20147
20153
|
}, " 回复 ", 512), [
|
|
20148
|
-
[
|
|
20154
|
+
[rt, !n.comment.privacy]
|
|
20149
20155
|
])
|
|
20150
20156
|
]),
|
|
20151
|
-
|
|
20152
|
-
|
|
20153
|
-
|
|
20157
|
+
E("div", Uk, [
|
|
20158
|
+
n.comment.avatarDisplay !== "none" ? (J(), Q("div", Wk, [
|
|
20159
|
+
n.comment.avatarDisplay === "text" || !n.comment.userAvatar ? (J(), Q("div", Kk, [
|
|
20160
|
+
E("div", qk, [
|
|
20161
|
+
E("span", null, Je(n.comment.userName.charAt(0)), 1)
|
|
20162
|
+
])
|
|
20163
|
+
])) : (J(), Q("img", {
|
|
20164
|
+
key: 1,
|
|
20154
20165
|
alt: "",
|
|
20155
20166
|
class: "sus-avatar",
|
|
20156
20167
|
src: n.comment.userAvatar,
|
|
20157
20168
|
onerror: "this.onerror=null,this.src='/error.webp'"
|
|
20158
|
-
}, null, 8,
|
|
20159
|
-
|
|
20160
|
-
|
|
20161
|
-
Te(M("div", qk, [
|
|
20162
|
-
M("span", null, Ge(n.comment.userName.charAt(0)), 1)
|
|
20163
|
-
], 512), [
|
|
20164
|
-
[Je, !n.comment.userAvatar]
|
|
20165
|
-
])
|
|
20166
|
-
]),
|
|
20167
|
-
M("p", Jk, Ge(n.num), 1)
|
|
20169
|
+
}, null, 8, Jk))
|
|
20170
|
+
])) : de("", !0),
|
|
20171
|
+
E("p", Gk, Je(n.num), 1)
|
|
20168
20172
|
]),
|
|
20169
|
-
|
|
20170
|
-
|
|
20171
|
-
|
|
20173
|
+
E("div", Yk, [
|
|
20174
|
+
E("div", Xk, [
|
|
20175
|
+
E("a", {
|
|
20172
20176
|
target: "_blank",
|
|
20173
20177
|
rel: h(),
|
|
20174
20178
|
href: n.comment.userWebsite,
|
|
20175
20179
|
class: wo([n.comment.tagName, "sus-item__user-name"])
|
|
20176
|
-
},
|
|
20177
|
-
n.comment.tagName === "owner" ? (
|
|
20178
|
-
n.comment.replyName ? (
|
|
20179
|
-
|
|
20180
|
+
}, Je(n.comment.userName), 11, Qk),
|
|
20181
|
+
n.comment.tagName === "owner" ? (J(), Q("span", Zk, " 博主 ")) : de("", !0),
|
|
20182
|
+
n.comment.replyName ? (J(), Q("span", ev, "@" + Je(n.comment.replyName), 1)) : de("", !0),
|
|
20183
|
+
E("span", tv, Je(Be(zk)(n.comment.createdDate)), 1)
|
|
20180
20184
|
]),
|
|
20181
|
-
n.comment.privacy ? (
|
|
20182
|
-
m[1] || (m[1] =
|
|
20183
|
-
|
|
20185
|
+
n.comment.privacy ? (J(), Q("div", nv, [
|
|
20186
|
+
m[1] || (m[1] = E("div", { class: "sus-item-privacy" }, null, -1)),
|
|
20187
|
+
E("span", {
|
|
20184
20188
|
class: "sus-item-privacy-text",
|
|
20185
20189
|
innerHTML: n.comment.content
|
|
20186
|
-
}, null, 8,
|
|
20187
|
-
])) : (
|
|
20188
|
-
|
|
20190
|
+
}, null, 8, rv)
|
|
20191
|
+
])) : (J(), Q("div", iv, [
|
|
20192
|
+
E("span", {
|
|
20189
20193
|
ref_key: "contentDom",
|
|
20190
20194
|
ref: r,
|
|
20191
20195
|
class: "sus-item__content-text",
|
|
20192
20196
|
innerHTML: n.comment.content + (n.comment.contentExtends || "")
|
|
20193
|
-
}, null, 8,
|
|
20194
|
-
s.value ? (
|
|
20197
|
+
}, null, 8, sv),
|
|
20198
|
+
s.value ? (J(), Q("a", {
|
|
20195
20199
|
key: 0,
|
|
20196
20200
|
ref_key: "showMoreDom",
|
|
20197
20201
|
ref: i,
|
|
20198
20202
|
class: "sus-show-detail",
|
|
20199
20203
|
onClick: l
|
|
20200
|
-
}, "显示更多>", 512)) :
|
|
20204
|
+
}, "显示更多>", 512)) : de("", !0)
|
|
20201
20205
|
]))
|
|
20202
20206
|
])
|
|
20203
20207
|
]),
|
|
20204
|
-
n.showFooter && n.comment.area && !n.comment.privacy ? (
|
|
20205
|
-
|
|
20206
|
-
m[2] || (m[2] =
|
|
20208
|
+
n.showFooter && n.comment.area && !n.comment.privacy ? (J(), Q("div", ov, [
|
|
20209
|
+
E("span", lv, [
|
|
20210
|
+
m[2] || (m[2] = E("svg", {
|
|
20207
20211
|
class: "sus-svg",
|
|
20208
20212
|
xmlns: "http://www.w3.org/2000/svg",
|
|
20209
20213
|
viewBox: "0 0 24 24"
|
|
20210
20214
|
}, [
|
|
20211
|
-
|
|
20215
|
+
E("g", {
|
|
20212
20216
|
fill: "none",
|
|
20213
20217
|
stroke: "currentColor",
|
|
20214
20218
|
"stroke-linecap": "round",
|
|
20215
20219
|
"stroke-width": "1.5"
|
|
20216
20220
|
}, [
|
|
20217
|
-
|
|
20218
|
-
|
|
20221
|
+
E("path", { d: "M12.5 7.041A3 3 0 1 0 14.959 9.5" }),
|
|
20222
|
+
E("path", { d: "M5 15.216c-.647-1.654-1-3.415-1-5.073C4 5.646 7.582 2 12 2s8 3.646 8 8.143c0 4.462-2.553 9.67-6.537 11.531a3.45 3.45 0 0 1-2.926 0C9.265 21.08 8.138 20.144 7.194 19" })
|
|
20219
20223
|
])
|
|
20220
20224
|
], -1)),
|
|
20221
|
-
Sr(" " +
|
|
20225
|
+
Sr(" " + Je(n.comment.area), 1)
|
|
20222
20226
|
]),
|
|
20223
|
-
|
|
20224
|
-
m[3] || (m[3] =
|
|
20227
|
+
E("span", av, [
|
|
20228
|
+
m[3] || (m[3] = E("svg", {
|
|
20225
20229
|
class: "sus-svg",
|
|
20226
20230
|
xmlns: "http://www.w3.org/2000/svg",
|
|
20227
20231
|
viewBox: "0 0 24 24"
|
|
20228
20232
|
}, [
|
|
20229
|
-
|
|
20233
|
+
E("path", {
|
|
20230
20234
|
fill: "none",
|
|
20231
20235
|
stroke: "currentColor",
|
|
20232
20236
|
"stroke-linecap": "round",
|
|
@@ -20234,18 +20238,18 @@ const Hk = { class: "sus-item__container" }, Fk = {
|
|
|
20234
20238
|
d: "M5 2.252c-.774.169-1.359.45-1.828.92C2 4.343 2 6.229 2 10v1c0 2.828 0 4.243.879 5.121C3.757 17 5.172 17 8 17h8c2.828 0 4.243 0 5.121-.879C22 15.243 22 13.828 22 11v-1c0-3.771 0-5.657-1.172-6.828S17.771 2 14 2H9m7 20H8m4-5v5m10-9h-6M2 13h10"
|
|
20235
20239
|
})
|
|
20236
20240
|
], -1)),
|
|
20237
|
-
Sr(" " +
|
|
20241
|
+
Sr(" " + Je(n.comment.userAgent), 1)
|
|
20238
20242
|
])
|
|
20239
|
-
])) :
|
|
20243
|
+
])) : de("", !0)
|
|
20240
20244
|
]));
|
|
20241
20245
|
}
|
|
20242
|
-
}), ui = /* @__PURE__ */ mn(
|
|
20246
|
+
}), ui = /* @__PURE__ */ mn(cv, [["__scopeId", "data-v-40d615a8"]]), uv = { class: "sus-comment__item" }, dv = {
|
|
20243
20247
|
key: 0,
|
|
20244
20248
|
class: "sus-comment__item-child"
|
|
20245
|
-
},
|
|
20249
|
+
}, fv = { key: 1 }, hv = {
|
|
20246
20250
|
key: 0,
|
|
20247
20251
|
class: "sus-comment__item-footer"
|
|
20248
|
-
},
|
|
20252
|
+
}, pv = /* @__PURE__ */ Ke({
|
|
20249
20253
|
__name: "index",
|
|
20250
20254
|
props: {
|
|
20251
20255
|
comment: {},
|
|
@@ -20254,7 +20258,7 @@ const Hk = { class: "sus-item__container" }, Fk = {
|
|
|
20254
20258
|
},
|
|
20255
20259
|
emits: ["on-reply", "on-edit", "on-remove"],
|
|
20256
20260
|
setup(n, { emit: e }) {
|
|
20257
|
-
const t =
|
|
20261
|
+
const t = Pe(!1), r = e;
|
|
20258
20262
|
function i(l) {
|
|
20259
20263
|
r("on-reply", l);
|
|
20260
20264
|
}
|
|
@@ -20264,7 +20268,7 @@ const Hk = { class: "sus-item__container" }, Fk = {
|
|
|
20264
20268
|
function o(l) {
|
|
20265
20269
|
r("on-remove", l);
|
|
20266
20270
|
}
|
|
20267
|
-
return (l, a) => (
|
|
20271
|
+
return (l, a) => (J(), Q("div", uv, [
|
|
20268
20272
|
ut(ui, {
|
|
20269
20273
|
comment: n.comment,
|
|
20270
20274
|
onOnReply: a[0] || (a[0] = (c) => i(n.comment)),
|
|
@@ -20273,7 +20277,7 @@ const Hk = { class: "sus-item__container" }, Fk = {
|
|
|
20273
20277
|
lineHeight: n.lineHeight,
|
|
20274
20278
|
showFooter: n.showFooter
|
|
20275
20279
|
}, null, 8, ["comment", "lineHeight", "showFooter"]),
|
|
20276
|
-
n.comment.child?.length > 0 ? (
|
|
20280
|
+
n.comment.child?.length > 0 ? (J(), Q("div", dv, [
|
|
20277
20281
|
ut(ui, {
|
|
20278
20282
|
onOnReply: a[3] || (a[3] = (c) => i(n.comment.child[0])),
|
|
20279
20283
|
onOnEdit: a[4] || (a[4] = (c) => s(n.comment.child[0])),
|
|
@@ -20284,7 +20288,7 @@ const Hk = { class: "sus-item__container" }, Fk = {
|
|
|
20284
20288
|
lineHeight: n.lineHeight,
|
|
20285
20289
|
class: "sus-comment__item-child__item"
|
|
20286
20290
|
}, null, 8, ["comment", "showFooter", "lineHeight"]),
|
|
20287
|
-
n.comment.child?.length > 1 ? (
|
|
20291
|
+
n.comment.child?.length > 1 ? (J(), xr(ui, {
|
|
20288
20292
|
key: 0,
|
|
20289
20293
|
onOnReply: a[6] || (a[6] = (c) => i(n.comment.child[1])),
|
|
20290
20294
|
onOnEdit: a[7] || (a[7] = (c) => s(n.comment.child[1])),
|
|
@@ -20294,15 +20298,15 @@ const Hk = { class: "sus-item__container" }, Fk = {
|
|
|
20294
20298
|
showFooter: n.showFooter,
|
|
20295
20299
|
lineHeight: n.lineHeight,
|
|
20296
20300
|
class: "sus-comment__item-child__item"
|
|
20297
|
-
}, null, 8, ["comment", "showFooter", "lineHeight"])) :
|
|
20298
|
-
n.comment.child?.length > 2 ? (
|
|
20299
|
-
t.value ?
|
|
20300
|
-
|
|
20301
|
+
}, null, 8, ["comment", "showFooter", "lineHeight"])) : de("", !0),
|
|
20302
|
+
n.comment.child?.length > 2 ? (J(), Q("div", fv, [
|
|
20303
|
+
t.value ? de("", !0) : (J(), Q("div", hv, [
|
|
20304
|
+
E("p", {
|
|
20301
20305
|
class: "sus-load-more",
|
|
20302
20306
|
onClick: a[9] || (a[9] = (c) => t.value = !0)
|
|
20303
20307
|
}, " 查看更多回复 > ")
|
|
20304
20308
|
])),
|
|
20305
|
-
t.value ? (
|
|
20309
|
+
t.value ? (J(!0), Q(Br, { key: 1 }, fs(n.comment.child.slice(2), (c, u) => (J(), xr(ui, {
|
|
20306
20310
|
onOnReply: (d) => i(c),
|
|
20307
20311
|
onOnEdit: (d) => s(c),
|
|
20308
20312
|
onOnRemove: (d) => o(c),
|
|
@@ -20312,35 +20316,35 @@ const Hk = { class: "sus-item__container" }, Fk = {
|
|
|
20312
20316
|
showFooter: n.showFooter,
|
|
20313
20317
|
lineHeight: n.lineHeight,
|
|
20314
20318
|
class: "sus-comment__item-child__item"
|
|
20315
|
-
}, null, 8, ["onOnReply", "onOnEdit", "onOnRemove", "comment", "num", "showFooter", "lineHeight"]))), 128)) :
|
|
20316
|
-
])) :
|
|
20317
|
-
])) :
|
|
20319
|
+
}, null, 8, ["onOnReply", "onOnEdit", "onOnRemove", "comment", "num", "showFooter", "lineHeight"]))), 128)) : de("", !0)
|
|
20320
|
+
])) : de("", !0)
|
|
20321
|
+
])) : de("", !0)
|
|
20318
20322
|
]));
|
|
20319
20323
|
}
|
|
20320
|
-
}),
|
|
20324
|
+
}), mv = /* @__PURE__ */ mn(pv, [["__scopeId", "data-v-170ec605"]]), gv = { class: "sus-top-item" }, yv = { class: "sus-top-item__info" }, bv = { class: "sus-top-item__user" }, wv = {
|
|
20321
20325
|
key: 0,
|
|
20322
20326
|
class: "sus-top-item__reply"
|
|
20323
|
-
},
|
|
20327
|
+
}, kv = ["innerHTML"], vv = /* @__PURE__ */ Ke({
|
|
20324
20328
|
__name: "simple",
|
|
20325
20329
|
props: {
|
|
20326
20330
|
comment: {}
|
|
20327
20331
|
},
|
|
20328
20332
|
setup(n) {
|
|
20329
|
-
return (e, t) => (
|
|
20330
|
-
|
|
20331
|
-
|
|
20332
|
-
n.comment.replyName ? (
|
|
20333
|
+
return (e, t) => (J(), Q("div", gv, [
|
|
20334
|
+
E("div", yv, [
|
|
20335
|
+
E("span", bv, Je(n.comment.userName) + ": ", 1),
|
|
20336
|
+
n.comment.replyName ? (J(), Q("span", wv, Je("@" + n.comment.replyName), 1)) : de("", !0)
|
|
20333
20337
|
]),
|
|
20334
|
-
|
|
20338
|
+
E("span", {
|
|
20335
20339
|
class: "sus-top-item__content",
|
|
20336
20340
|
innerHTML: n.comment.content
|
|
20337
|
-
}, null, 8,
|
|
20341
|
+
}, null, 8, kv)
|
|
20338
20342
|
]));
|
|
20339
20343
|
}
|
|
20340
|
-
}),
|
|
20344
|
+
}), xv = /* @__PURE__ */ mn(vv, [["__scopeId", "data-v-f6f1f9aa"]]), Sv = { class: "sus-top-item__user" }, Cv = {
|
|
20341
20345
|
key: 0,
|
|
20342
20346
|
class: "sus-top-item__user-avatar"
|
|
20343
|
-
},
|
|
20347
|
+
}, Mv = ["src"], Ev = { class: "sus-top-item__user-owner" }, Tv = { class: "sus-top-item__user-reply" }, Ov = ["innerHTML"], Av = /* @__PURE__ */ Ke({
|
|
20344
20348
|
__name: "index",
|
|
20345
20349
|
props: {
|
|
20346
20350
|
comment: {}
|
|
@@ -20351,41 +20355,41 @@ const Hk = { class: "sus-item__container" }, Fk = {
|
|
|
20351
20355
|
function r() {
|
|
20352
20356
|
t("go-local");
|
|
20353
20357
|
}
|
|
20354
|
-
return (i, s) => (
|
|
20358
|
+
return (i, s) => (J(), Q("div", {
|
|
20355
20359
|
class: "sus-top-item",
|
|
20356
20360
|
onClick: r
|
|
20357
20361
|
}, [
|
|
20358
|
-
|
|
20359
|
-
n.comment.userAvatar ? (
|
|
20360
|
-
|
|
20362
|
+
E("div", Sv, [
|
|
20363
|
+
n.comment.userAvatar ? (J(), Q("div", Cv, [
|
|
20364
|
+
E("img", {
|
|
20361
20365
|
alt: "",
|
|
20362
20366
|
class: "sus-avatar",
|
|
20363
20367
|
loading: "lazy",
|
|
20364
20368
|
decoding: "async",
|
|
20365
20369
|
src: n.comment.userAvatar,
|
|
20366
20370
|
onerror: "this.onerror=null,this.src='/error.webp'"
|
|
20367
|
-
}, null, 8,
|
|
20368
|
-
])) :
|
|
20369
|
-
|
|
20370
|
-
|
|
20371
|
+
}, null, 8, Mv)
|
|
20372
|
+
])) : de("", !0),
|
|
20373
|
+
E("div", Ev, Je(n.comment.userName), 1),
|
|
20374
|
+
E("div", Tv, Je(n.comment.replyName ? "@" + n.comment.replyName : ""), 1)
|
|
20371
20375
|
]),
|
|
20372
|
-
|
|
20376
|
+
E("div", {
|
|
20373
20377
|
class: "sus-top-item__content",
|
|
20374
20378
|
innerHTML: n.comment.content
|
|
20375
|
-
}, null, 8,
|
|
20379
|
+
}, null, 8, Ov)
|
|
20376
20380
|
]));
|
|
20377
20381
|
}
|
|
20378
|
-
}),
|
|
20382
|
+
}), Nv = /* @__PURE__ */ mn(Av, [["__scopeId", "data-v-250e2f2a"]]), Rv = [$k, mv, Nv, xv], _v = {
|
|
20379
20383
|
install(n) {
|
|
20380
|
-
|
|
20384
|
+
Rv.forEach((e) => {
|
|
20381
20385
|
n.component(e.name, e);
|
|
20382
20386
|
});
|
|
20383
20387
|
}
|
|
20384
20388
|
};
|
|
20385
20389
|
export {
|
|
20386
20390
|
$k as SuSComment,
|
|
20387
|
-
|
|
20388
|
-
|
|
20389
|
-
|
|
20390
|
-
|
|
20391
|
+
mv as SuSList,
|
|
20392
|
+
xv as SuSSimpleTop,
|
|
20393
|
+
Nv as SuSTop,
|
|
20394
|
+
_v as default
|
|
20391
20395
|
};
|