mhz-ui 1.0.53 → 1.0.54
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/UiEditor/UiEditor.js +674 -657
- package/dist/UiInput/UiInput.js +44 -44
- package/dist/UiModal/UiModal.js +32 -32
- package/dist/UiSearch/UiSearch.js +59 -59
- package/dist/UiSelect/UiSelect.js +70 -70
- package/dist/UiSpoiler/UiSpoiler.js +38 -38
- package/dist/UiUpload/UiUpload.js +75 -75
- package/package.json +21 -21
|
@@ -4375,7 +4375,7 @@ class R {
|
|
|
4375
4375
|
negative, it will search backwards first.
|
|
4376
4376
|
*/
|
|
4377
4377
|
static near(e, t = 1) {
|
|
4378
|
-
return this.findFrom(e, t) || this.findFrom(e, -t) || new
|
|
4378
|
+
return this.findFrom(e, t) || this.findFrom(e, -t) || new Ie(e.node(0));
|
|
4379
4379
|
}
|
|
4380
4380
|
/**
|
|
4381
4381
|
Find the cursor or leaf node selection closest to the start of
|
|
@@ -4384,14 +4384,14 @@ class R {
|
|
|
4384
4384
|
exists.
|
|
4385
4385
|
*/
|
|
4386
4386
|
static atStart(e) {
|
|
4387
|
-
return Gt(e, e, 0, 0, 1) || new
|
|
4387
|
+
return Gt(e, e, 0, 0, 1) || new Ie(e);
|
|
4388
4388
|
}
|
|
4389
4389
|
/**
|
|
4390
4390
|
Find the cursor or leaf node selection closest to the end of the
|
|
4391
4391
|
given document.
|
|
4392
4392
|
*/
|
|
4393
4393
|
static atEnd(e) {
|
|
4394
|
-
return Gt(e, e, e.content.size, e.childCount, -1) || new
|
|
4394
|
+
return Gt(e, e, e.content.size, e.childCount, -1) || new Ie(e);
|
|
4395
4395
|
}
|
|
4396
4396
|
/**
|
|
4397
4397
|
Deserialize the JSON representation of a selection. Must be
|
|
@@ -4587,7 +4587,7 @@ class ls {
|
|
|
4587
4587
|
return r && A.isSelectable(r) ? new A(t) : R.near(t);
|
|
4588
4588
|
}
|
|
4589
4589
|
}
|
|
4590
|
-
class
|
|
4590
|
+
class Ie extends R {
|
|
4591
4591
|
/**
|
|
4592
4592
|
Create an all-selection over the given document.
|
|
4593
4593
|
*/
|
|
@@ -4609,25 +4609,25 @@ class De extends R {
|
|
|
4609
4609
|
@internal
|
|
4610
4610
|
*/
|
|
4611
4611
|
static fromJSON(e) {
|
|
4612
|
-
return new
|
|
4612
|
+
return new Ie(e);
|
|
4613
4613
|
}
|
|
4614
4614
|
map(e) {
|
|
4615
|
-
return new
|
|
4615
|
+
return new Ie(e);
|
|
4616
4616
|
}
|
|
4617
4617
|
eq(e) {
|
|
4618
|
-
return e instanceof
|
|
4618
|
+
return e instanceof Ie;
|
|
4619
4619
|
}
|
|
4620
4620
|
getBookmark() {
|
|
4621
4621
|
return Nu;
|
|
4622
4622
|
}
|
|
4623
4623
|
}
|
|
4624
|
-
R.jsonID("all",
|
|
4624
|
+
R.jsonID("all", Ie);
|
|
4625
4625
|
const Nu = {
|
|
4626
4626
|
map() {
|
|
4627
4627
|
return this;
|
|
4628
4628
|
},
|
|
4629
4629
|
resolve(n) {
|
|
4630
|
-
return new
|
|
4630
|
+
return new Ie(n);
|
|
4631
4631
|
}
|
|
4632
4632
|
};
|
|
4633
4633
|
function Gt(n, e, t, r, i, s = !1) {
|
|
@@ -5094,7 +5094,7 @@ function to(n, e, t, r, i) {
|
|
|
5094
5094
|
for (; ; ) {
|
|
5095
5095
|
if (n == t && e == r)
|
|
5096
5096
|
return !0;
|
|
5097
|
-
if (e == (i < 0 ? 0 :
|
|
5097
|
+
if (e == (i < 0 ? 0 : Se(n))) {
|
|
5098
5098
|
let s = n.parentNode;
|
|
5099
5099
|
if (!s || s.nodeType != 1 || Gn(n) || Pu.test(n.nodeName) || n.contentEditable == "false")
|
|
5100
5100
|
return !1;
|
|
@@ -5102,12 +5102,12 @@ function to(n, e, t, r, i) {
|
|
|
5102
5102
|
} else if (n.nodeType == 1) {
|
|
5103
5103
|
if (n = n.childNodes[e + (i < 0 ? -1 : 0)], n.contentEditable == "false")
|
|
5104
5104
|
return !1;
|
|
5105
|
-
e = i < 0 ?
|
|
5105
|
+
e = i < 0 ? Se(n) : 0;
|
|
5106
5106
|
} else
|
|
5107
5107
|
return !1;
|
|
5108
5108
|
}
|
|
5109
5109
|
}
|
|
5110
|
-
function
|
|
5110
|
+
function Se(n) {
|
|
5111
5111
|
return n.nodeType == 3 ? n.nodeValue.length : n.childNodes.length;
|
|
5112
5112
|
}
|
|
5113
5113
|
function Bu(n, e) {
|
|
@@ -5117,7 +5117,7 @@ function Bu(n, e) {
|
|
|
5117
5117
|
if (n.nodeType == 1 && e > 0) {
|
|
5118
5118
|
if (n.contentEditable == "false")
|
|
5119
5119
|
return null;
|
|
5120
|
-
n = n.childNodes[e - 1], e =
|
|
5120
|
+
n = n.childNodes[e - 1], e = Se(n);
|
|
5121
5121
|
} else if (n.parentNode && !Gn(n))
|
|
5122
5122
|
e = Q(n), n = n.parentNode;
|
|
5123
5123
|
else
|
|
@@ -5139,13 +5139,13 @@ function Lu(n, e) {
|
|
|
5139
5139
|
}
|
|
5140
5140
|
}
|
|
5141
5141
|
function zu(n, e, t) {
|
|
5142
|
-
for (let r = e == 0, i = e ==
|
|
5142
|
+
for (let r = e == 0, i = e == Se(n); r || i; ) {
|
|
5143
5143
|
if (n == t)
|
|
5144
5144
|
return !0;
|
|
5145
5145
|
let s = Q(n);
|
|
5146
5146
|
if (n = n.parentNode, !n)
|
|
5147
5147
|
return !1;
|
|
5148
|
-
r = r && s == 0, i = i && s ==
|
|
5148
|
+
r = r && s == 0, i = i && s == Se(n);
|
|
5149
5149
|
}
|
|
5150
5150
|
}
|
|
5151
5151
|
function Gn(n) {
|
|
@@ -5172,18 +5172,18 @@ function Fu(n, e, t) {
|
|
|
5172
5172
|
try {
|
|
5173
5173
|
let r = n.caretPositionFromPoint(e, t);
|
|
5174
5174
|
if (r)
|
|
5175
|
-
return { node: r.offsetNode, offset: r.offset };
|
|
5175
|
+
return { node: r.offsetNode, offset: Math.min(Se(r.offsetNode), r.offset) };
|
|
5176
5176
|
} catch {
|
|
5177
5177
|
}
|
|
5178
5178
|
if (n.caretRangeFromPoint) {
|
|
5179
5179
|
let r = n.caretRangeFromPoint(e, t);
|
|
5180
5180
|
if (r)
|
|
5181
|
-
return { node: r.startContainer, offset: r.startOffset };
|
|
5181
|
+
return { node: r.startContainer, offset: Math.min(Se(r.startContainer), r.startOffset) };
|
|
5182
5182
|
}
|
|
5183
5183
|
}
|
|
5184
|
-
const He = typeof navigator < "u" ? navigator : null, no = typeof document < "u" ? document : null, yt = He && He.userAgent || "", Li = /Edge\/(\d+)/.exec(yt), Jl = /MSIE \d/.exec(yt), zi = /Trident\/(?:[7-9]|\d{2,})\..*rv:(\d+)/.exec(yt), fe = !!(Jl || zi || Li), ft = Jl ? document.documentMode : zi ? +zi[1] : Li ? +Li[1] : 0,
|
|
5185
|
-
|
|
5186
|
-
const Vi = !fe && /Chrome\/(\d+)/.exec(yt), ie = !!Vi, _l = Vi ? +Vi[1] : 0, ae = !fe && !!He && /Apple Computer/.test(He.vendor), ln = ae && (/Mobile\/\w+/.test(yt) || !!He && He.maxTouchPoints > 2), we = ln || (He ? /Mac/.test(He.platform) : !1), $u = He ? /Win/.test(He.platform) : !1,
|
|
5184
|
+
const He = typeof navigator < "u" ? navigator : null, no = typeof document < "u" ? document : null, yt = He && He.userAgent || "", Li = /Edge\/(\d+)/.exec(yt), Jl = /MSIE \d/.exec(yt), zi = /Trident\/(?:[7-9]|\d{2,})\..*rv:(\d+)/.exec(yt), fe = !!(Jl || zi || Li), ft = Jl ? document.documentMode : zi ? +zi[1] : Li ? +Li[1] : 0, Re = !fe && /gecko\/(\d+)/i.test(yt);
|
|
5185
|
+
Re && +(/Firefox\/(\d+)/.exec(yt) || [0, 0])[1];
|
|
5186
|
+
const Vi = !fe && /Chrome\/(\d+)/.exec(yt), ie = !!Vi, _l = Vi ? +Vi[1] : 0, ae = !fe && !!He && /Apple Computer/.test(He.vendor), ln = ae && (/Mobile\/\w+/.test(yt) || !!He && He.maxTouchPoints > 2), we = ln || (He ? /Mac/.test(He.platform) : !1), $u = He ? /Win/.test(He.platform) : !1, Ne = /Android \d/.test(yt), Yn = !!no && "webkitFontSmoothing" in no.documentElement.style, Hu = Yn ? +(/\bAppleWebKit\/(\d+)/.exec(navigator.userAgent) || [0, 0])[1] : 0;
|
|
5187
5187
|
function ju(n) {
|
|
5188
5188
|
let e = n.defaultView && n.defaultView.visualViewport;
|
|
5189
5189
|
return e ? {
|
|
@@ -5371,7 +5371,7 @@ function Xu(n, e) {
|
|
|
5371
5371
|
for (let c = o; r && c; c = zn(c))
|
|
5372
5372
|
c.draggable && (r = void 0);
|
|
5373
5373
|
if (o = Uu(o, e), r) {
|
|
5374
|
-
if (
|
|
5374
|
+
if (Re && r.nodeType == 1 && (i = Math.min(i, r.childNodes.length), i < r.childNodes.length)) {
|
|
5375
5375
|
let u = r.childNodes[i], d;
|
|
5376
5376
|
u.nodeName == "IMG" && (d = u.getBoundingClientRect()).right <= e.left && d.bottom > e.top && i++;
|
|
5377
5377
|
}
|
|
@@ -5396,11 +5396,11 @@ function it(n, e) {
|
|
|
5396
5396
|
}
|
|
5397
5397
|
const Zu = /[\u0590-\u05f4\u0600-\u06ff\u0700-\u08ac]/;
|
|
5398
5398
|
function Zl(n, e, t) {
|
|
5399
|
-
let { node: r, offset: i, atom: s } = n.docView.domFromPos(e, t < 0 ? -1 : 1), o = Yn ||
|
|
5399
|
+
let { node: r, offset: i, atom: s } = n.docView.domFromPos(e, t < 0 ? -1 : 1), o = Yn || Re;
|
|
5400
5400
|
if (r.nodeType == 3)
|
|
5401
5401
|
if (o && (Zu.test(r.nodeValue) || (t < 0 ? !i : i == r.nodeValue.length))) {
|
|
5402
5402
|
let a = it(Xe(r, i, i), t);
|
|
5403
|
-
if (
|
|
5403
|
+
if (Re && i && /\s/.test(r.nodeValue[i - 1]) && i < r.nodeValue.length) {
|
|
5404
5404
|
let c = it(Xe(r, i - 1, i - 1), -1);
|
|
5405
5405
|
if (c.top == a.top) {
|
|
5406
5406
|
let u = it(Xe(r, i, i + 1), -1);
|
|
@@ -5414,24 +5414,24 @@ function Zl(n, e, t) {
|
|
|
5414
5414
|
return t < 0 && !i ? (c++, u = -1) : t >= 0 && i == r.nodeValue.length ? (a--, u = 1) : t < 0 ? a-- : c++, Sn(it(Xe(r, a, c), u), u < 0);
|
|
5415
5415
|
}
|
|
5416
5416
|
if (!n.state.doc.resolve(e - (s || 0)).parent.inlineContent) {
|
|
5417
|
-
if (s == null && i && (t < 0 || i ==
|
|
5417
|
+
if (s == null && i && (t < 0 || i == Se(r))) {
|
|
5418
5418
|
let a = r.childNodes[i - 1];
|
|
5419
5419
|
if (a.nodeType == 1)
|
|
5420
5420
|
return pi(a.getBoundingClientRect(), !1);
|
|
5421
5421
|
}
|
|
5422
|
-
if (s == null && i <
|
|
5422
|
+
if (s == null && i < Se(r)) {
|
|
5423
5423
|
let a = r.childNodes[i];
|
|
5424
5424
|
if (a.nodeType == 1)
|
|
5425
5425
|
return pi(a.getBoundingClientRect(), !0);
|
|
5426
5426
|
}
|
|
5427
5427
|
return pi(r.getBoundingClientRect(), t >= 0);
|
|
5428
5428
|
}
|
|
5429
|
-
if (s == null && i && (t < 0 || i ==
|
|
5430
|
-
let a = r.childNodes[i - 1], c = a.nodeType == 3 ? Xe(a,
|
|
5429
|
+
if (s == null && i && (t < 0 || i == Se(r))) {
|
|
5430
|
+
let a = r.childNodes[i - 1], c = a.nodeType == 3 ? Xe(a, Se(a) - (o ? 0 : 1)) : a.nodeType == 1 && (a.nodeName != "BR" || !a.nextSibling) ? a : null;
|
|
5431
5431
|
if (c)
|
|
5432
5432
|
return Sn(it(c, 1), !1);
|
|
5433
5433
|
}
|
|
5434
|
-
if (s == null && i <
|
|
5434
|
+
if (s == null && i < Se(r)) {
|
|
5435
5435
|
let a = r.childNodes[i];
|
|
5436
5436
|
for (; a.pmViewDesc && a.pmViewDesc.ignoreForCoords; )
|
|
5437
5437
|
a = a.nextSibling;
|
|
@@ -5515,10 +5515,10 @@ let so = null, oo = null, lo = !1;
|
|
|
5515
5515
|
function nd(n, e, t) {
|
|
5516
5516
|
return so == e && oo == t ? lo : (so = e, oo = t, lo = t == "up" || t == "down" ? Qu(n, e, t) : td(n, e, t));
|
|
5517
5517
|
}
|
|
5518
|
-
const
|
|
5518
|
+
const Ce = 0, ao = 1, Tt = 2, je = 3;
|
|
5519
5519
|
class Xn {
|
|
5520
5520
|
constructor(e, t, r, i) {
|
|
5521
|
-
this.parent = e, this.children = t, this.dom = r, this.contentDOM = i, this.dirty =
|
|
5521
|
+
this.parent = e, this.children = t, this.dom = r, this.contentDOM = i, this.dirty = Ce, r.pmViewDesc = this;
|
|
5522
5522
|
}
|
|
5523
5523
|
// Used to check whether a given description corresponds to a
|
|
5524
5524
|
// widget/mark/node.
|
|
@@ -5769,7 +5769,7 @@ class Xn {
|
|
|
5769
5769
|
h = m;
|
|
5770
5770
|
}
|
|
5771
5771
|
let l = this.domFromPos(e, e ? -1 : 1), a = t == e ? l : this.domFromPos(t, t ? -1 : 1), c = r.getSelection(), u = !1;
|
|
5772
|
-
if ((
|
|
5772
|
+
if ((Re || ae) && e == t) {
|
|
5773
5773
|
let { node: f, offset: h } = l;
|
|
5774
5774
|
if (f.nodeType == 3) {
|
|
5775
5775
|
if (u = !!(h && f.nodeValue[h - 1] == `
|
|
@@ -5788,7 +5788,7 @@ class Xn {
|
|
|
5788
5788
|
u = p && (p.nodeName == "BR" || p.contentEditable == "false");
|
|
5789
5789
|
}
|
|
5790
5790
|
}
|
|
5791
|
-
if (
|
|
5791
|
+
if (Re && c.focusNode && c.focusNode != a.node && c.focusNode.nodeType == 1) {
|
|
5792
5792
|
let f = c.focusNode.childNodes[c.focusOffset];
|
|
5793
5793
|
f && f.contentEditable == "false" && (i = !0);
|
|
5794
5794
|
}
|
|
@@ -5869,7 +5869,7 @@ class ea extends Xn {
|
|
|
5869
5869
|
super(e, [], o, null), this.widget = t, this.widget = t, s = this;
|
|
5870
5870
|
}
|
|
5871
5871
|
matchesWidget(e) {
|
|
5872
|
-
return this.dirty ==
|
|
5872
|
+
return this.dirty == Ce && e.type.eq(this.widget.type);
|
|
5873
5873
|
}
|
|
5874
5874
|
parseRule() {
|
|
5875
5875
|
return { ignore: !0 };
|
|
@@ -5923,11 +5923,11 @@ class Vt extends Xn {
|
|
|
5923
5923
|
return this.dirty != je && this.mark.eq(e);
|
|
5924
5924
|
}
|
|
5925
5925
|
markDirty(e, t) {
|
|
5926
|
-
if (super.markDirty(e, t), this.dirty !=
|
|
5926
|
+
if (super.markDirty(e, t), this.dirty != Ce) {
|
|
5927
5927
|
let r = this.parent;
|
|
5928
5928
|
for (; !r.node; )
|
|
5929
5929
|
r = r.parent;
|
|
5930
|
-
r.dirty < this.dirty && (r.dirty = this.dirty), this.dirty =
|
|
5930
|
+
r.dirty < this.dirty && (r.dirty = this.dirty), this.dirty = Ce;
|
|
5931
5931
|
}
|
|
5932
5932
|
}
|
|
5933
5933
|
slice(e, t, r) {
|
|
@@ -5989,7 +5989,7 @@ class ht extends Xn {
|
|
|
5989
5989
|
return e;
|
|
5990
5990
|
}
|
|
5991
5991
|
matchesNode(e, t, r) {
|
|
5992
|
-
return this.dirty ==
|
|
5992
|
+
return this.dirty == Ce && e.eq(this.node) && $i(t, this.outerDeco) && r.eq(this.innerDeco);
|
|
5993
5993
|
}
|
|
5994
5994
|
get size() {
|
|
5995
5995
|
return this.node.nodeSize;
|
|
@@ -6044,7 +6044,7 @@ class ht extends Xn {
|
|
|
6044
6044
|
return this.dirty == je || !e.sameMarkup(this.node) ? !1 : (this.updateInner(e, t, r, i), !0);
|
|
6045
6045
|
}
|
|
6046
6046
|
updateInner(e, t, r, i) {
|
|
6047
|
-
this.updateOuterDeco(t), this.node = e, this.innerDeco = r, this.contentDOM && this.updateChildren(i, this.posAtStart), this.dirty =
|
|
6047
|
+
this.updateOuterDeco(t), this.node = e, this.innerDeco = r, this.contentDOM && this.updateChildren(i, this.posAtStart), this.dirty = Ce;
|
|
6048
6048
|
}
|
|
6049
6049
|
updateOuterDeco(e) {
|
|
6050
6050
|
if ($i(e, this.outerDeco))
|
|
@@ -6080,7 +6080,7 @@ class Ur extends ht {
|
|
|
6080
6080
|
return { skip: e || !0 };
|
|
6081
6081
|
}
|
|
6082
6082
|
update(e, t, r, i) {
|
|
6083
|
-
return this.dirty == je || this.dirty !=
|
|
6083
|
+
return this.dirty == je || this.dirty != Ce && !this.inParent() || !e.sameMarkup(this.node) ? !1 : (this.updateOuterDeco(t), (this.dirty != Ce || e.text != this.node.text) && e.text != this.nodeDOM.nodeValue && (this.nodeDOM.nodeValue = e.text, i.trackWrites == this.nodeDOM && (i.trackWrites = null)), this.node = e, this.dirty = Ce, !0);
|
|
6084
6084
|
}
|
|
6085
6085
|
inParent() {
|
|
6086
6086
|
let e = this.parent.contentDOM;
|
|
@@ -6117,7 +6117,7 @@ class ta extends Xn {
|
|
|
6117
6117
|
return { ignore: !0 };
|
|
6118
6118
|
}
|
|
6119
6119
|
matchesHack(e) {
|
|
6120
|
-
return this.dirty ==
|
|
6120
|
+
return this.dirty == Ce && this.dom.nodeName == e;
|
|
6121
6121
|
}
|
|
6122
6122
|
get domAtom() {
|
|
6123
6123
|
return !0;
|
|
@@ -6275,7 +6275,7 @@ class od {
|
|
|
6275
6275
|
for (; i < o && (i == s - 1 ? this.top : this.stack[i + 1 << 1]).matchesMark(e[i]) && e[i].type.spec.spanning !== !1; )
|
|
6276
6276
|
i++;
|
|
6277
6277
|
for (; i < s; )
|
|
6278
|
-
this.destroyRest(), this.top.dirty =
|
|
6278
|
+
this.destroyRest(), this.top.dirty = Ce, this.index = this.stack.pop(), this.top = this.stack.pop(), s--;
|
|
6279
6279
|
for (; s < e.length; ) {
|
|
6280
6280
|
this.stack.push(this.top, this.index + 1);
|
|
6281
6281
|
let l = -1;
|
|
@@ -6345,7 +6345,7 @@ class od {
|
|
|
6345
6345
|
if (!f && a.update(e, t, r, i))
|
|
6346
6346
|
return this.destroyBetween(this.index, l), a.dom != u && (this.changed = !0), this.index++, !0;
|
|
6347
6347
|
if (!f && (d = this.recreateWrapper(a, e, t, r, i, o)))
|
|
6348
|
-
return this.top.children[this.index] = d, d.contentDOM && (d.dirty = Tt, d.updateChildren(i, o + 1), d.dirty =
|
|
6348
|
+
return this.top.children[this.index] = d, d.contentDOM && (d.dirty = Tt, d.updateChildren(i, o + 1), d.dirty = Ce), this.changed = !0, this.index++, !0;
|
|
6349
6349
|
break;
|
|
6350
6350
|
}
|
|
6351
6351
|
}
|
|
@@ -6684,7 +6684,7 @@ function md(n) {
|
|
|
6684
6684
|
if (!t)
|
|
6685
6685
|
return;
|
|
6686
6686
|
let i, s, o = !1;
|
|
6687
|
-
for (
|
|
6687
|
+
for (Re && t.nodeType == 1 && r < Rr(t) && Dn(t.childNodes[r], -1) && (o = !0); ; )
|
|
6688
6688
|
if (r > 0) {
|
|
6689
6689
|
if (t.nodeType != 1)
|
|
6690
6690
|
break;
|
|
@@ -6821,7 +6821,7 @@ function vo(n, e, t) {
|
|
|
6821
6821
|
return st(n, o);
|
|
6822
6822
|
}
|
|
6823
6823
|
if (!i.parent.inlineContent) {
|
|
6824
|
-
let o = e < 0 ? i : s, l = r instanceof
|
|
6824
|
+
let o = e < 0 ? i : s, l = r instanceof Ie ? R.near(o, e) : R.findFrom(o, e);
|
|
6825
6825
|
return l ? st(n, l) : !1;
|
|
6826
6826
|
}
|
|
6827
6827
|
return !1;
|
|
@@ -6936,7 +6936,7 @@ function ua(n, e, t, r, i) {
|
|
|
6936
6936
|
} else
|
|
6937
6937
|
n.someProp("transformPastedHTML", (d) => {
|
|
6938
6938
|
t = d(t, n);
|
|
6939
|
-
}), o =
|
|
6939
|
+
}), o = Cd(t), Yn && Od(o);
|
|
6940
6940
|
let c = o && o.querySelector("[data-pm-slice]"), u = c && /^(\d+) (\d+)(?: -(\d+))? (.*)/.exec(c.getAttribute("data-pm-slice") || "");
|
|
6941
6941
|
if (u && u[3])
|
|
6942
6942
|
for (let d = +u[3]; d > 0; d--) {
|
|
@@ -6954,7 +6954,7 @@ function ua(n, e, t, r, i) {
|
|
|
6954
6954
|
return f.nodeName == "BR" && !f.nextSibling && f.parentNode && !wd.test(f.parentNode.nodeName) ? { ignore: !0 } : null;
|
|
6955
6955
|
}
|
|
6956
6956
|
})), u)
|
|
6957
|
-
l =
|
|
6957
|
+
l = Td(wo(l, +u[1], +u[2]), u[4]);
|
|
6958
6958
|
else if (l = S.maxOpen(Sd(l.content, i), !0), l.openStart || l.openEnd) {
|
|
6959
6959
|
let d = 0, f = 0;
|
|
6960
6960
|
for (let h = l.content.firstChild; d < l.openStart && !h.type.spec.isolating; d++, h = h.firstChild)
|
|
@@ -7034,22 +7034,26 @@ function ma() {
|
|
|
7034
7034
|
return So || (So = document.implementation.createHTMLDocument("title"));
|
|
7035
7035
|
}
|
|
7036
7036
|
function Md(n) {
|
|
7037
|
+
let e = window.trustedTypes;
|
|
7038
|
+
return e ? e.createPolicy("detachedDocument", { createHTML: (t) => t }).createHTML(n) : n;
|
|
7039
|
+
}
|
|
7040
|
+
function Cd(n) {
|
|
7037
7041
|
let e = /^(\s*<meta [^>]*>)*/.exec(n);
|
|
7038
7042
|
e && (n = n.slice(e[0].length));
|
|
7039
7043
|
let t = ma().createElement("div"), r = /<([a-z][^>\s]+)/i.exec(n), i;
|
|
7040
|
-
if ((i = r && pa[r[1].toLowerCase()]) && (n = i.map((s) => "<" + s + ">").join("") + n + i.map((s) => "</" + s + ">").reverse().join("")), t.innerHTML = n, i)
|
|
7044
|
+
if ((i = r && pa[r[1].toLowerCase()]) && (n = i.map((s) => "<" + s + ">").join("") + n + i.map((s) => "</" + s + ">").reverse().join("")), t.innerHTML = Md(n), i)
|
|
7041
7045
|
for (let s = 0; s < i.length; s++)
|
|
7042
7046
|
t = t.querySelector(i[s]) || t;
|
|
7043
7047
|
return t;
|
|
7044
7048
|
}
|
|
7045
|
-
function
|
|
7049
|
+
function Od(n) {
|
|
7046
7050
|
let e = n.querySelectorAll(ie ? "span:not([class]):not([style])" : "span.Apple-converted-space");
|
|
7047
7051
|
for (let t = 0; t < e.length; t++) {
|
|
7048
7052
|
let r = e[t];
|
|
7049
7053
|
r.childNodes.length == 1 && r.textContent == " " && r.parentNode && r.parentNode.replaceChild(n.ownerDocument.createTextNode(" "), r);
|
|
7050
7054
|
}
|
|
7051
7055
|
}
|
|
7052
|
-
function
|
|
7056
|
+
function Td(n, e) {
|
|
7053
7057
|
if (!n.size)
|
|
7054
7058
|
return n;
|
|
7055
7059
|
let t = n.content.firstChild.type.schema, r;
|
|
@@ -7067,25 +7071,25 @@ function Od(n, e) {
|
|
|
7067
7071
|
}
|
|
7068
7072
|
return new S(i, s, o);
|
|
7069
7073
|
}
|
|
7070
|
-
const ce = {}, ue = {},
|
|
7071
|
-
class
|
|
7074
|
+
const ce = {}, ue = {}, Ed = { touchstart: !0, touchmove: !0 };
|
|
7075
|
+
class Ad {
|
|
7072
7076
|
constructor() {
|
|
7073
7077
|
this.shiftKey = !1, this.mouseDown = null, this.lastKeyCode = null, this.lastKeyCodeTime = 0, this.lastClick = { time: 0, x: 0, y: 0, type: "" }, this.lastSelectionOrigin = null, this.lastSelectionTime = 0, this.lastIOSEnter = 0, this.lastIOSEnterFallbackTimeout = -1, this.lastFocus = 0, this.lastTouch = 0, this.lastAndroidDelete = 0, this.composing = !1, this.compositionNode = null, this.composingTimeout = -1, this.compositionNodes = [], this.compositionEndedAt = -2e8, this.compositionID = 1, this.compositionPendingChanges = 0, this.domChangeCount = 0, this.eventHandlers = /* @__PURE__ */ Object.create(null), this.hideSelectionGuard = null;
|
|
7074
7078
|
}
|
|
7075
7079
|
}
|
|
7076
|
-
function
|
|
7080
|
+
function Nd(n) {
|
|
7077
7081
|
for (let e in ce) {
|
|
7078
7082
|
let t = ce[e];
|
|
7079
7083
|
n.dom.addEventListener(e, n.input.eventHandlers[e] = (r) => {
|
|
7080
|
-
|
|
7081
|
-
},
|
|
7084
|
+
Id(n, r) && !ds(n, r) && (n.editable || !(r.type in ue)) && t(n, r);
|
|
7085
|
+
}, Ed[e] ? { passive: !0 } : void 0);
|
|
7082
7086
|
}
|
|
7083
7087
|
ae && n.dom.addEventListener("input", () => null), Ki(n);
|
|
7084
7088
|
}
|
|
7085
7089
|
function ut(n, e) {
|
|
7086
7090
|
n.input.lastSelectionOrigin = e, n.input.lastSelectionTime = Date.now();
|
|
7087
7091
|
}
|
|
7088
|
-
function
|
|
7092
|
+
function Dd(n) {
|
|
7089
7093
|
n.domObserver.stop();
|
|
7090
7094
|
for (let e in n.input.eventHandlers)
|
|
7091
7095
|
n.dom.removeEventListener(e, n.input.eventHandlers[e]);
|
|
@@ -7103,7 +7107,7 @@ function ds(n, e) {
|
|
|
7103
7107
|
return r ? r(n, e) || e.defaultPrevented : !1;
|
|
7104
7108
|
});
|
|
7105
7109
|
}
|
|
7106
|
-
function
|
|
7110
|
+
function Id(n, e) {
|
|
7107
7111
|
if (!e.bubbles)
|
|
7108
7112
|
return !0;
|
|
7109
7113
|
if (e.defaultPrevented)
|
|
@@ -7113,13 +7117,13 @@ function Dd(n, e) {
|
|
|
7113
7117
|
return !1;
|
|
7114
7118
|
return !0;
|
|
7115
7119
|
}
|
|
7116
|
-
function
|
|
7120
|
+
function Rd(n, e) {
|
|
7117
7121
|
!ds(n, e) && ce[e.type] && (n.editable || !(e.type in ue)) && ce[e.type](n, e);
|
|
7118
7122
|
}
|
|
7119
7123
|
ue.keydown = (n, e) => {
|
|
7120
7124
|
let t = e;
|
|
7121
|
-
if (n.input.shiftKey = t.keyCode == 16 || t.shiftKey, !ya(n, t) && (n.input.lastKeyCode = t.keyCode, n.input.lastKeyCodeTime = Date.now(), !(
|
|
7122
|
-
if (t.keyCode != 229 && n.domObserver.forceFlush(), ln && t.keyCode == 13 && !t.ctrlKey && !t.altKey && !t.metaKey) {
|
|
7125
|
+
if (n.input.shiftKey = t.keyCode == 16 || t.shiftKey, !ya(n, t) && (n.input.lastKeyCode = t.keyCode, n.input.lastKeyCodeTime = Date.now(), !(Ne && ie && t.keyCode == 13)))
|
|
7126
|
+
if (n.domObserver.selectionChanged(n.domSelectionRange()) ? n.domObserver.flush() : t.keyCode != 229 && n.domObserver.forceFlush(), ln && t.keyCode == 13 && !t.ctrlKey && !t.altKey && !t.metaKey) {
|
|
7123
7127
|
let r = Date.now();
|
|
7124
7128
|
n.input.lastIOSEnter = r, n.input.lastIOSEnterFallbackTimeout = setTimeout(() => {
|
|
7125
7129
|
n.input.lastIOSEnter == r && (n.someProp("handleKeyDown", (i) => i(n, Ct(13, "Enter"))), n.input.lastIOSEnter = 0);
|
|
@@ -7146,7 +7150,7 @@ ue.keypress = (n, e) => {
|
|
|
7146
7150
|
function Gr(n) {
|
|
7147
7151
|
return { left: n.clientX, top: n.clientY };
|
|
7148
7152
|
}
|
|
7149
|
-
function
|
|
7153
|
+
function Pd(n, e) {
|
|
7150
7154
|
let t = e.x - n.clientX, r = e.y - n.clientY;
|
|
7151
7155
|
return t * t + r * r < 100;
|
|
7152
7156
|
}
|
|
@@ -7165,13 +7169,13 @@ function rn(n, e, t) {
|
|
|
7165
7169
|
let r = n.state.tr.setSelection(e);
|
|
7166
7170
|
r.setMeta("pointer", !0), n.dispatch(r);
|
|
7167
7171
|
}
|
|
7168
|
-
function
|
|
7172
|
+
function Bd(n, e) {
|
|
7169
7173
|
if (e == -1)
|
|
7170
7174
|
return !1;
|
|
7171
7175
|
let t = n.state.doc.resolve(e), r = t.nodeAfter;
|
|
7172
7176
|
return r && r.isAtom && A.isSelectable(r) ? (rn(n, new A(t)), !0) : !1;
|
|
7173
7177
|
}
|
|
7174
|
-
function
|
|
7178
|
+
function Ld(n, e) {
|
|
7175
7179
|
if (e == -1)
|
|
7176
7180
|
return !1;
|
|
7177
7181
|
let t = n.state.selection, r, i;
|
|
@@ -7186,16 +7190,16 @@ function Bd(n, e) {
|
|
|
7186
7190
|
}
|
|
7187
7191
|
return i != null ? (rn(n, A.create(n.state.doc, i)), !0) : !1;
|
|
7188
7192
|
}
|
|
7189
|
-
function
|
|
7190
|
-
return fs(n, "handleClickOn", e, t, r) || n.someProp("handleClick", (s) => s(n, e, r)) || (i ?
|
|
7193
|
+
function zd(n, e, t, r, i) {
|
|
7194
|
+
return fs(n, "handleClickOn", e, t, r) || n.someProp("handleClick", (s) => s(n, e, r)) || (i ? Ld(n, t) : Bd(n, t));
|
|
7191
7195
|
}
|
|
7192
|
-
function
|
|
7196
|
+
function Vd(n, e, t, r) {
|
|
7193
7197
|
return fs(n, "handleDoubleClickOn", e, t, r) || n.someProp("handleDoubleClick", (i) => i(n, e, r));
|
|
7194
7198
|
}
|
|
7195
|
-
function
|
|
7196
|
-
return fs(n, "handleTripleClickOn", e, t, r) || n.someProp("handleTripleClick", (i) => i(n, e, r)) ||
|
|
7199
|
+
function Fd(n, e, t, r) {
|
|
7200
|
+
return fs(n, "handleTripleClickOn", e, t, r) || n.someProp("handleTripleClick", (i) => i(n, e, r)) || $d(n, t, r);
|
|
7197
7201
|
}
|
|
7198
|
-
function
|
|
7202
|
+
function $d(n, e, t) {
|
|
7199
7203
|
if (t.button != 0)
|
|
7200
7204
|
return !1;
|
|
7201
7205
|
let r = n.state.doc;
|
|
@@ -7221,11 +7225,11 @@ ce.mousedown = (n, e) => {
|
|
|
7221
7225
|
let t = e;
|
|
7222
7226
|
n.input.shiftKey = t.shiftKey;
|
|
7223
7227
|
let r = hs(n), i = Date.now(), s = "singleClick";
|
|
7224
|
-
i - n.input.lastClick.time < 500 &&
|
|
7228
|
+
i - n.input.lastClick.time < 500 && Pd(t, n.input.lastClick) && !t[ga] && (n.input.lastClick.type == "singleClick" ? s = "doubleClick" : n.input.lastClick.type == "doubleClick" && (s = "tripleClick")), n.input.lastClick = { time: i, x: t.clientX, y: t.clientY, type: s };
|
|
7225
7229
|
let o = n.posAtCoords(Gr(t));
|
|
7226
|
-
o && (s == "singleClick" ? (n.input.mouseDown && n.input.mouseDown.done(), n.input.mouseDown = new
|
|
7230
|
+
o && (s == "singleClick" ? (n.input.mouseDown && n.input.mouseDown.done(), n.input.mouseDown = new Hd(n, o, t, !!r)) : (s == "doubleClick" ? Vd : Fd)(n, o.pos, o.inside, t) ? t.preventDefault() : ut(n, "pointer"));
|
|
7227
7231
|
};
|
|
7228
|
-
class
|
|
7232
|
+
class Hd {
|
|
7229
7233
|
constructor(e, t, r, i) {
|
|
7230
7234
|
this.view = e, this.pos = t, this.event = r, this.flushed = i, this.delayedSelectionSync = !1, this.mightDrag = null, this.startDoc = e.state.doc, this.selectNode = !!r[ga], this.allowDefault = r.shiftKey;
|
|
7231
7235
|
let s, o;
|
|
@@ -7242,7 +7246,7 @@ class $d {
|
|
|
7242
7246
|
node: s,
|
|
7243
7247
|
pos: o,
|
|
7244
7248
|
addAttr: !!(this.target && !this.target.draggable),
|
|
7245
|
-
setUneditable: !!(this.target &&
|
|
7249
|
+
setUneditable: !!(this.target && Re && !this.target.hasAttribute("contentEditable"))
|
|
7246
7250
|
}), this.target && this.mightDrag && (this.mightDrag.addAttr || this.mightDrag.setUneditable) && (this.view.domObserver.stop(), this.mightDrag.addAttr && (this.target.draggable = !0), this.mightDrag.setUneditable && setTimeout(() => {
|
|
7247
7251
|
this.view.input.mouseDown == this && this.target.setAttribute("contentEditable", "false");
|
|
7248
7252
|
}, 20), this.view.domObserver.start()), e.root.addEventListener("mouseup", this.up = this.up.bind(this)), e.root.addEventListener("mousemove", this.move = this.move.bind(this)), ut(e, "pointer");
|
|
@@ -7254,7 +7258,7 @@ class $d {
|
|
|
7254
7258
|
if (this.done(), !this.view.dom.contains(e.target))
|
|
7255
7259
|
return;
|
|
7256
7260
|
let t = this.pos;
|
|
7257
|
-
this.view.state.doc != this.startDoc && (t = this.view.posAtCoords(Gr(e))), this.updateAllowDefault(e), this.allowDefault || !t ? ut(this.view, "pointer") :
|
|
7261
|
+
this.view.state.doc != this.startDoc && (t = this.view.posAtCoords(Gr(e))), this.updateAllowDefault(e), this.allowDefault || !t ? ut(this.view, "pointer") : zd(this.view, t.pos, t.inside, e, this.selectNode) ? e.preventDefault() : e.button == 0 && (this.flushed || // Safari ignores clicks on draggable elements
|
|
7258
7262
|
ae && this.mightDrag && !this.mightDrag.node.isAtom || // Chrome will sometimes treat a node selection as a
|
|
7259
7263
|
// cursor, but still report that the node is selected
|
|
7260
7264
|
// when asked through getSelection. You'll then get a
|
|
@@ -7281,14 +7285,14 @@ ce.contextmenu = (n) => hs(n);
|
|
|
7281
7285
|
function ya(n, e) {
|
|
7282
7286
|
return n.composing ? !0 : ae && Math.abs(e.timeStamp - n.input.compositionEndedAt) < 500 ? (n.input.compositionEndedAt = -2e8, !0) : !1;
|
|
7283
7287
|
}
|
|
7284
|
-
const
|
|
7288
|
+
const jd = Ne ? 5e3 : -1;
|
|
7285
7289
|
ue.compositionstart = ue.compositionupdate = (n) => {
|
|
7286
7290
|
if (!n.composing) {
|
|
7287
7291
|
n.domObserver.flush();
|
|
7288
7292
|
let { state: e } = n, t = e.selection.$to;
|
|
7289
7293
|
if (e.selection instanceof D && (e.storedMarks || !t.textOffset && t.parentOffset && t.nodeBefore.marks.some((r) => r.type.spec.inclusive === !1)))
|
|
7290
7294
|
n.markCursor = n.state.storedMarks || t.marks(), Pr(n, !0), n.markCursor = null;
|
|
7291
|
-
else if (Pr(n, !e.selection.empty),
|
|
7295
|
+
else if (Pr(n, !e.selection.empty), Re && e.selection.empty && t.parentOffset && !t.textOffset && t.nodeBefore.marks.length) {
|
|
7292
7296
|
let r = n.domSelectionRange();
|
|
7293
7297
|
for (let i = r.focusNode, s = r.focusOffset; i && i.nodeType == 1 && s != 0; ) {
|
|
7294
7298
|
let o = s < 0 ? i.lastChild : i.childNodes[s - 1];
|
|
@@ -7304,7 +7308,7 @@ ue.compositionstart = ue.compositionupdate = (n) => {
|
|
|
7304
7308
|
}
|
|
7305
7309
|
n.input.composing = !0;
|
|
7306
7310
|
}
|
|
7307
|
-
ba(n,
|
|
7311
|
+
ba(n, jd);
|
|
7308
7312
|
};
|
|
7309
7313
|
ue.compositionend = (n, e) => {
|
|
7310
7314
|
n.composing && (n.input.composing = !1, n.input.compositionEndedAt = e.timeStamp, n.input.compositionPendingChanges = n.domObserver.pendingRecords().length ? n.input.compositionID : 0, n.input.compositionNode = null, n.input.compositionPendingChanges && Promise.resolve().then(() => n.domObserver.flush()), n.input.compositionID++, ba(n, 20));
|
|
@@ -7313,10 +7317,10 @@ function ba(n, e) {
|
|
|
7313
7317
|
clearTimeout(n.input.composingTimeout), e > -1 && (n.input.composingTimeout = setTimeout(() => Pr(n), e));
|
|
7314
7318
|
}
|
|
7315
7319
|
function va(n) {
|
|
7316
|
-
for (n.composing && (n.input.composing = !1, n.input.compositionEndedAt =
|
|
7320
|
+
for (n.composing && (n.input.composing = !1, n.input.compositionEndedAt = qd()); n.input.compositionNodes.length > 0; )
|
|
7317
7321
|
n.input.compositionNodes.pop().markParentsDirty();
|
|
7318
7322
|
}
|
|
7319
|
-
function
|
|
7323
|
+
function Wd(n) {
|
|
7320
7324
|
let e = n.domSelectionRange();
|
|
7321
7325
|
if (!e.focusNode)
|
|
7322
7326
|
return null;
|
|
@@ -7335,12 +7339,12 @@ function jd(n) {
|
|
|
7335
7339
|
}
|
|
7336
7340
|
return t || r;
|
|
7337
7341
|
}
|
|
7338
|
-
function
|
|
7342
|
+
function qd() {
|
|
7339
7343
|
let n = document.createEvent("Event");
|
|
7340
7344
|
return n.initEvent("event", !0, !0), n.timeStamp;
|
|
7341
7345
|
}
|
|
7342
7346
|
function Pr(n, e = !1) {
|
|
7343
|
-
if (!(
|
|
7347
|
+
if (!(Ne && n.domObserver.flushingSoon >= 0)) {
|
|
7344
7348
|
if (n.domObserver.forceFlush(), va(n), e || n.docView && n.docView.dirty) {
|
|
7345
7349
|
let t = cs(n);
|
|
7346
7350
|
return t && !t.eq(n.state.selection) ? n.dispatch(n.state.tr.setSelection(t)) : (n.markCursor || e) && !n.state.selection.empty ? n.dispatch(n.state.tr.deleteSelection()) : n.updateState(n.state), !0;
|
|
@@ -7348,7 +7352,7 @@ function Pr(n, e = !1) {
|
|
|
7348
7352
|
return !1;
|
|
7349
7353
|
}
|
|
7350
7354
|
}
|
|
7351
|
-
function
|
|
7355
|
+
function Kd(n, e) {
|
|
7352
7356
|
if (!n.dom.parentNode)
|
|
7353
7357
|
return;
|
|
7354
7358
|
let t = n.dom.parentNode.appendChild(document.createElement("div"));
|
|
@@ -7364,12 +7368,12 @@ ce.copy = ue.cut = (n, e) => {
|
|
|
7364
7368
|
if (r.empty)
|
|
7365
7369
|
return;
|
|
7366
7370
|
let s = Vn ? null : t.clipboardData, o = r.content(), { dom: l, text: a } = ca(n, o);
|
|
7367
|
-
s ? (t.preventDefault(), s.clearData(), s.setData("text/html", l.innerHTML), s.setData("text/plain", a)) :
|
|
7371
|
+
s ? (t.preventDefault(), s.clearData(), s.setData("text/html", l.innerHTML), s.setData("text/plain", a)) : Kd(n, l), i && n.dispatch(n.state.tr.deleteSelection().scrollIntoView().setMeta("uiEvent", "cut"));
|
|
7368
7372
|
};
|
|
7369
|
-
function
|
|
7373
|
+
function Jd(n) {
|
|
7370
7374
|
return n.openStart == 0 && n.openEnd == 0 && n.content.childCount == 1 ? n.content.firstChild : null;
|
|
7371
7375
|
}
|
|
7372
|
-
function
|
|
7376
|
+
function _d(n, e) {
|
|
7373
7377
|
if (!n.dom.parentNode)
|
|
7374
7378
|
return;
|
|
7375
7379
|
let t = n.input.shiftKey || n.state.selection.$from.parent.type.spec.code, r = n.dom.parentNode.appendChild(document.createElement(t ? "textarea" : "div"));
|
|
@@ -7385,7 +7389,7 @@ function Fn(n, e, t, r, i) {
|
|
|
7385
7389
|
return !0;
|
|
7386
7390
|
if (!s)
|
|
7387
7391
|
return !1;
|
|
7388
|
-
let o =
|
|
7392
|
+
let o = Jd(s), l = o ? n.state.tr.replaceSelectionWith(o, r) : n.state.tr.replaceSelection(s);
|
|
7389
7393
|
return n.dispatch(l.scrollIntoView().setMeta("paste", !0).setMeta("uiEvent", "paste")), !0;
|
|
7390
7394
|
}
|
|
7391
7395
|
function ka(n) {
|
|
@@ -7397,10 +7401,10 @@ function ka(n) {
|
|
|
7397
7401
|
}
|
|
7398
7402
|
ue.paste = (n, e) => {
|
|
7399
7403
|
let t = e;
|
|
7400
|
-
if (n.composing && !
|
|
7404
|
+
if (n.composing && !Ne)
|
|
7401
7405
|
return;
|
|
7402
7406
|
let r = Vn ? null : t.clipboardData, i = n.input.shiftKey && n.input.lastKeyCode != 45;
|
|
7403
|
-
r && Fn(n, ka(r), r.getData("text/html"), i, t) ? t.preventDefault() :
|
|
7407
|
+
r && Fn(n, ka(r), r.getData("text/html"), i, t) ? t.preventDefault() : _d(n, t);
|
|
7404
7408
|
};
|
|
7405
7409
|
class xa {
|
|
7406
7410
|
constructor(e, t, r) {
|
|
@@ -7479,7 +7483,7 @@ ce.blur = (n, e) => {
|
|
|
7479
7483
|
n.focused && (n.domObserver.stop(), n.dom.classList.remove("ProseMirror-focused"), n.domObserver.start(), t.relatedTarget && n.dom.contains(t.relatedTarget) && n.domObserver.currentSelection.clear(), n.focused = !1);
|
|
7480
7484
|
};
|
|
7481
7485
|
ce.beforeinput = (n, e) => {
|
|
7482
|
-
if (ie &&
|
|
7486
|
+
if (ie && Ne && e.inputType == "deleteContentBackward") {
|
|
7483
7487
|
n.domObserver.flushSoon();
|
|
7484
7488
|
let { domChangeCount: r } = n.input;
|
|
7485
7489
|
setTimeout(() => {
|
|
@@ -7509,7 +7513,7 @@ class Br {
|
|
|
7509
7513
|
}
|
|
7510
7514
|
map(e, t, r, i) {
|
|
7511
7515
|
let { pos: s, deleted: o } = e.mapResult(t.from + i, this.side < 0 ? -1 : 1);
|
|
7512
|
-
return o ? null : new
|
|
7516
|
+
return o ? null : new Me(s - r, s - r, this);
|
|
7513
7517
|
}
|
|
7514
7518
|
valid() {
|
|
7515
7519
|
return !0;
|
|
@@ -7527,7 +7531,7 @@ class pt {
|
|
|
7527
7531
|
}
|
|
7528
7532
|
map(e, t, r, i) {
|
|
7529
7533
|
let s = e.map(t.from + i, this.spec.inclusiveStart ? -1 : 1) - r, o = e.map(t.to + i, this.spec.inclusiveEnd ? 1 : -1) - r;
|
|
7530
|
-
return s >= o ? null : new
|
|
7534
|
+
return s >= o ? null : new Me(s, o, this);
|
|
7531
7535
|
}
|
|
7532
7536
|
valid(e, t) {
|
|
7533
7537
|
return t.from < t.to;
|
|
@@ -7550,7 +7554,7 @@ class ps {
|
|
|
7550
7554
|
if (s.deleted)
|
|
7551
7555
|
return null;
|
|
7552
7556
|
let o = e.mapResult(t.to + i, -1);
|
|
7553
|
-
return o.deleted || o.pos <= s.pos ? null : new
|
|
7557
|
+
return o.deleted || o.pos <= s.pos ? null : new Me(s.pos - r, o.pos - r, this);
|
|
7554
7558
|
}
|
|
7555
7559
|
valid(e, t) {
|
|
7556
7560
|
let { index: r, offset: i } = e.content.findIndex(t.from), s;
|
|
@@ -7562,7 +7566,7 @@ class ps {
|
|
|
7562
7566
|
destroy() {
|
|
7563
7567
|
}
|
|
7564
7568
|
}
|
|
7565
|
-
class
|
|
7569
|
+
class Me {
|
|
7566
7570
|
/**
|
|
7567
7571
|
@internal
|
|
7568
7572
|
*/
|
|
@@ -7573,7 +7577,7 @@ class Se {
|
|
|
7573
7577
|
@internal
|
|
7574
7578
|
*/
|
|
7575
7579
|
copy(e, t) {
|
|
7576
|
-
return new
|
|
7580
|
+
return new Me(e, t, this.type);
|
|
7577
7581
|
}
|
|
7578
7582
|
/**
|
|
7579
7583
|
@internal
|
|
@@ -7596,14 +7600,14 @@ class Se {
|
|
|
7596
7600
|
widget's current document position.
|
|
7597
7601
|
*/
|
|
7598
7602
|
static widget(e, t, r) {
|
|
7599
|
-
return new
|
|
7603
|
+
return new Me(e, e, new Br(t, r));
|
|
7600
7604
|
}
|
|
7601
7605
|
/**
|
|
7602
7606
|
Creates an inline decoration, which adds the given attributes to
|
|
7603
7607
|
each inline node between `from` and `to`.
|
|
7604
7608
|
*/
|
|
7605
7609
|
static inline(e, t, r, i) {
|
|
7606
|
-
return new
|
|
7610
|
+
return new Me(e, t, new pt(r, i));
|
|
7607
7611
|
}
|
|
7608
7612
|
/**
|
|
7609
7613
|
Creates a node decoration. `from` and `to` should point precisely
|
|
@@ -7611,7 +7615,7 @@ class Se {
|
|
|
7611
7615
|
node, will receive the given attributes.
|
|
7612
7616
|
*/
|
|
7613
7617
|
static node(e, t, r, i) {
|
|
7614
|
-
return new
|
|
7618
|
+
return new Me(e, t, new ps(r, i));
|
|
7615
7619
|
}
|
|
7616
7620
|
/**
|
|
7617
7621
|
The spec provided when creating this decoration. Can be useful
|
|
@@ -7688,7 +7692,7 @@ class K {
|
|
|
7688
7692
|
let a = this.local[l].map(e, r, i);
|
|
7689
7693
|
a && a.type.valid(t, a) ? (o || (o = [])).push(a) : s.onRemove && s.onRemove(this.local[l].spec);
|
|
7690
7694
|
}
|
|
7691
|
-
return this.children.length ?
|
|
7695
|
+
return this.children.length ? Ud(this.children, o || [], e, t, r, i, s) : o ? new K(o.sort(Rt), Yt) : re;
|
|
7692
7696
|
}
|
|
7693
7697
|
/**
|
|
7694
7698
|
Add the given array of decorations to the ones in the set,
|
|
@@ -7801,6 +7805,9 @@ class K {
|
|
|
7801
7805
|
this.local[r].type instanceof pt || t.push(this.local[r]);
|
|
7802
7806
|
return t;
|
|
7803
7807
|
}
|
|
7808
|
+
forEachSet(e) {
|
|
7809
|
+
e(this);
|
|
7810
|
+
}
|
|
7804
7811
|
}
|
|
7805
7812
|
K.empty = new K([], []);
|
|
7806
7813
|
K.removeOverlap = ms;
|
|
@@ -7858,8 +7865,12 @@ class lt {
|
|
|
7858
7865
|
return new lt(e.every((t) => t instanceof K) ? e : e.reduce((t, r) => t.concat(r instanceof K ? r : r.members), []));
|
|
7859
7866
|
}
|
|
7860
7867
|
}
|
|
7868
|
+
forEachSet(e) {
|
|
7869
|
+
for (let t = 0; t < this.members.length; t++)
|
|
7870
|
+
this.members[t].forEachSet(e);
|
|
7871
|
+
}
|
|
7861
7872
|
}
|
|
7862
|
-
function
|
|
7873
|
+
function Ud(n, e, t, r, i, s, o) {
|
|
7863
7874
|
let l = n.slice();
|
|
7864
7875
|
for (let c = 0, u = s; c < t.maps.length; c++) {
|
|
7865
7876
|
let d = 0;
|
|
@@ -7895,7 +7906,7 @@ function _d(n, e, t, r, i, s, o) {
|
|
|
7895
7906
|
a = !0;
|
|
7896
7907
|
}
|
|
7897
7908
|
if (a) {
|
|
7898
|
-
let c =
|
|
7909
|
+
let c = Gd(l, n, e, t, i, s, o), u = Lr(c, r, 0, o);
|
|
7899
7910
|
e = u.local;
|
|
7900
7911
|
for (let d = 0; d < l.length; d += 3)
|
|
7901
7912
|
l[d + 1] < 0 && (l.splice(d, 3), d -= 3);
|
|
@@ -7914,11 +7925,11 @@ function Sa(n, e) {
|
|
|
7914
7925
|
let t = [];
|
|
7915
7926
|
for (let r = 0; r < n.length; r++) {
|
|
7916
7927
|
let i = n[r];
|
|
7917
|
-
t.push(new
|
|
7928
|
+
t.push(new Me(i.from + e, i.to + e, i.type));
|
|
7918
7929
|
}
|
|
7919
7930
|
return t;
|
|
7920
7931
|
}
|
|
7921
|
-
function
|
|
7932
|
+
function Gd(n, e, t, r, i, s, o) {
|
|
7922
7933
|
function l(a, c) {
|
|
7923
7934
|
for (let u = 0; u < a.local.length; u++) {
|
|
7924
7935
|
let d = a.local[u].map(r, i, c);
|
|
@@ -7993,15 +8004,15 @@ function gi(n) {
|
|
|
7993
8004
|
r && r != re && e.push(r);
|
|
7994
8005
|
}), n.cursorWrapper && e.push(K.create(n.state.doc, [n.cursorWrapper.deco])), lt.from(e);
|
|
7995
8006
|
}
|
|
7996
|
-
const
|
|
8007
|
+
const Yd = {
|
|
7997
8008
|
childList: !0,
|
|
7998
8009
|
characterData: !0,
|
|
7999
8010
|
characterDataOldValue: !0,
|
|
8000
8011
|
attributes: !0,
|
|
8001
8012
|
attributeOldValue: !0,
|
|
8002
8013
|
subtree: !0
|
|
8003
|
-
},
|
|
8004
|
-
class
|
|
8014
|
+
}, Xd = fe && ft <= 11;
|
|
8015
|
+
class Zd {
|
|
8005
8016
|
constructor() {
|
|
8006
8017
|
this.anchorNode = null, this.anchorOffset = 0, this.focusNode = null, this.focusOffset = 0;
|
|
8007
8018
|
}
|
|
@@ -8015,13 +8026,13 @@ class Xd {
|
|
|
8015
8026
|
return e.anchorNode == this.anchorNode && e.anchorOffset == this.anchorOffset && e.focusNode == this.focusNode && e.focusOffset == this.focusOffset;
|
|
8016
8027
|
}
|
|
8017
8028
|
}
|
|
8018
|
-
class
|
|
8029
|
+
class Qd {
|
|
8019
8030
|
constructor(e, t) {
|
|
8020
|
-
this.view = e, this.handleDOMChange = t, this.queue = [], this.flushingSoon = -1, this.observer = null, this.currentSelection = new
|
|
8031
|
+
this.view = e, this.handleDOMChange = t, this.queue = [], this.flushingSoon = -1, this.observer = null, this.currentSelection = new Zd(), this.onCharData = null, this.suppressingSelectionUpdates = !1, this.lastChangedTextNode = null, this.observer = window.MutationObserver && new window.MutationObserver((r) => {
|
|
8021
8032
|
for (let i = 0; i < r.length; i++)
|
|
8022
8033
|
this.queue.push(r[i]);
|
|
8023
8034
|
fe && ft <= 11 && r.some((i) => i.type == "childList" && i.removedNodes.length || i.type == "characterData" && i.oldValue.length > i.target.nodeValue.length) ? this.flushSoon() : this.flush();
|
|
8024
|
-
}),
|
|
8035
|
+
}), Xd && (this.onCharData = (r) => {
|
|
8025
8036
|
this.queue.push({ target: r.target, type: "characterData", oldValue: r.prevValue }), this.flushSoon();
|
|
8026
8037
|
}), this.onSelectionChange = this.onSelectionChange.bind(this);
|
|
8027
8038
|
}
|
|
@@ -8034,7 +8045,7 @@ class Zd {
|
|
|
8034
8045
|
this.flushingSoon > -1 && (window.clearTimeout(this.flushingSoon), this.flushingSoon = -1, this.flush());
|
|
8035
8046
|
}
|
|
8036
8047
|
start() {
|
|
8037
|
-
this.observer && (this.observer.takeRecords(), this.observer.observe(this.view.dom,
|
|
8048
|
+
this.observer && (this.observer.takeRecords(), this.observer.observe(this.view.dom, Yd)), this.onCharData && this.view.dom.addEventListener("DOMCharacterDataModified", this.onCharData), this.connectSelection();
|
|
8038
8049
|
}
|
|
8039
8050
|
stop() {
|
|
8040
8051
|
if (this.observer) {
|
|
@@ -8096,19 +8107,22 @@ class Zd {
|
|
|
8096
8107
|
this.queue.push(e);
|
|
8097
8108
|
return this.queue;
|
|
8098
8109
|
}
|
|
8110
|
+
selectionChanged(e) {
|
|
8111
|
+
return !this.suppressingSelectionUpdates && !this.currentSelection.eq(e) && go(this.view) && !this.ignoreSelectionChange(e);
|
|
8112
|
+
}
|
|
8099
8113
|
flush() {
|
|
8100
8114
|
let { view: e } = this;
|
|
8101
8115
|
if (!e.docView || this.flushingSoon > -1)
|
|
8102
8116
|
return;
|
|
8103
8117
|
let t = this.pendingRecords();
|
|
8104
8118
|
t.length && (this.queue = []);
|
|
8105
|
-
let r = e.domSelectionRange(), i =
|
|
8119
|
+
let r = e.domSelectionRange(), i = this.selectionChanged(r), s = -1, o = -1, l = !1, a = [];
|
|
8106
8120
|
if (e.editable)
|
|
8107
8121
|
for (let u = 0; u < t.length; u++) {
|
|
8108
8122
|
let d = this.registerMutation(t[u], a);
|
|
8109
8123
|
d && (s = s < 0 ? d.from : Math.min(d.from, s), o = o < 0 ? d.to : Math.max(d.to, o), d.typeOver && (l = !0));
|
|
8110
8124
|
}
|
|
8111
|
-
if (
|
|
8125
|
+
if (Re && a.length) {
|
|
8112
8126
|
let u = a.filter((d) => d.nodeName == "BR");
|
|
8113
8127
|
if (u.length == 2) {
|
|
8114
8128
|
let [d, f] = u;
|
|
@@ -8117,12 +8131,12 @@ class Zd {
|
|
|
8117
8131
|
let { focusNode: d } = this.currentSelection;
|
|
8118
8132
|
for (let f of u) {
|
|
8119
8133
|
let h = f.parentNode;
|
|
8120
|
-
h && h.nodeName == "LI" && (!d ||
|
|
8134
|
+
h && h.nodeName == "LI" && (!d || nf(e, d) != h) && f.remove();
|
|
8121
8135
|
}
|
|
8122
8136
|
}
|
|
8123
8137
|
}
|
|
8124
8138
|
let c = null;
|
|
8125
|
-
s < 0 && i && e.input.lastFocus > Date.now() - 200 && Math.max(e.input.lastTouch, e.input.lastClick.time) < Date.now() - 300 && _r(r) && (c = cs(e)) && c.eq(R.near(e.state.doc.resolve(0), 1)) ? (e.input.lastFocus = 0, et(e), this.currentSelection.set(r), e.scrollToSelection()) : (s > -1 || i) && (s > -1 && (e.docView.markDirty(s, o),
|
|
8139
|
+
s < 0 && i && e.input.lastFocus > Date.now() - 200 && Math.max(e.input.lastTouch, e.input.lastClick.time) < Date.now() - 300 && _r(r) && (c = cs(e)) && c.eq(R.near(e.state.doc.resolve(0), 1)) ? (e.input.lastFocus = 0, et(e), this.currentSelection.set(r), e.scrollToSelection()) : (s > -1 || i) && (s > -1 && (e.docView.markDirty(s, o), ef(e)), this.handleDOMChange(s, o, l, a), e.docView && e.docView.dirty ? e.updateState(e.state) : this.currentSelection.eq(r) || et(e), this.currentSelection.set(r));
|
|
8126
8140
|
}
|
|
8127
8141
|
registerMutation(e, t) {
|
|
8128
8142
|
if (t.indexOf(e.target) > -1)
|
|
@@ -8158,9 +8172,9 @@ class Zd {
|
|
|
8158
8172
|
}
|
|
8159
8173
|
}
|
|
8160
8174
|
let Co = /* @__PURE__ */ new WeakMap(), Oo = !1;
|
|
8161
|
-
function
|
|
8175
|
+
function ef(n) {
|
|
8162
8176
|
if (!Co.has(n) && (Co.set(n, null), ["normal", "nowrap", "pre-line"].indexOf(getComputedStyle(n.dom).whiteSpace) !== -1)) {
|
|
8163
|
-
if (n.requiresGeckoHackNode =
|
|
8177
|
+
if (n.requiresGeckoHackNode = Re, Oo)
|
|
8164
8178
|
return;
|
|
8165
8179
|
console.warn("ProseMirror expects the CSS white-space property to be set, preferably to 'pre-wrap'. It is recommended to load style/prosemirror.css from the prosemirror-view package."), Oo = !0;
|
|
8166
8180
|
}
|
|
@@ -8169,7 +8183,7 @@ function To(n, e) {
|
|
|
8169
8183
|
let t = e.startContainer, r = e.startOffset, i = e.endContainer, s = e.endOffset, o = n.domAtPos(n.state.selection.anchor);
|
|
8170
8184
|
return zt(o.node, o.offset, i, s) && ([t, r, i, s] = [i, s, t, r]), { anchorNode: t, anchorOffset: r, focusNode: i, focusOffset: s };
|
|
8171
8185
|
}
|
|
8172
|
-
function
|
|
8186
|
+
function tf(n, e) {
|
|
8173
8187
|
if (e.getComposedRanges) {
|
|
8174
8188
|
let i = e.getComposedRanges(n.root)[0];
|
|
8175
8189
|
if (i)
|
|
@@ -8181,7 +8195,7 @@ function ef(n, e) {
|
|
|
8181
8195
|
}
|
|
8182
8196
|
return n.dom.addEventListener("beforeinput", r, !0), document.execCommand("indent"), n.dom.removeEventListener("beforeinput", r, !0), t ? To(n, t) : null;
|
|
8183
8197
|
}
|
|
8184
|
-
function
|
|
8198
|
+
function nf(n, e) {
|
|
8185
8199
|
for (let t = e.parentNode; t && t != n.dom; t = t.parentNode) {
|
|
8186
8200
|
let r = n.docView.nearestDesc(t, !0);
|
|
8187
8201
|
if (r && r.node.isBlock)
|
|
@@ -8189,7 +8203,7 @@ function tf(n, e) {
|
|
|
8189
8203
|
}
|
|
8190
8204
|
return null;
|
|
8191
8205
|
}
|
|
8192
|
-
function
|
|
8206
|
+
function rf(n, e, t) {
|
|
8193
8207
|
let { node: r, fromOffset: i, toOffset: s, from: o, to: l } = n.docView.parseRange(e, t), a = n.domSelectionRange(), c, u = a.anchorNode;
|
|
8194
8208
|
if (u && n.dom.contains(u.nodeType == 1 ? u : u.parentNode) && (c = [{ node: u, offset: a.anchorOffset }], _r(a) || c.push({ node: a.focusNode, offset: a.focusOffset })), ie && n.input.lastKeyCode === 8)
|
|
8195
8209
|
for (let y = s; y > i; y--) {
|
|
@@ -8209,7 +8223,7 @@ function nf(n, e, t) {
|
|
|
8209
8223
|
to: s,
|
|
8210
8224
|
preserveWhitespace: h.parent.type.whitespace == "pre" ? "full" : !0,
|
|
8211
8225
|
findPositions: c,
|
|
8212
|
-
ruleFromNode:
|
|
8226
|
+
ruleFromNode: sf,
|
|
8213
8227
|
context: h
|
|
8214
8228
|
});
|
|
8215
8229
|
if (c && c[0].pos != null) {
|
|
@@ -8218,7 +8232,7 @@ function nf(n, e, t) {
|
|
|
8218
8232
|
}
|
|
8219
8233
|
return { doc: m, sel: p, from: o, to: l };
|
|
8220
8234
|
}
|
|
8221
|
-
function
|
|
8235
|
+
function sf(n) {
|
|
8222
8236
|
let e = n.pmViewDesc;
|
|
8223
8237
|
if (e)
|
|
8224
8238
|
return e.parseRule();
|
|
@@ -8232,13 +8246,13 @@ function rf(n) {
|
|
|
8232
8246
|
return { ignore: !0 };
|
|
8233
8247
|
return null;
|
|
8234
8248
|
}
|
|
8235
|
-
const
|
|
8236
|
-
function
|
|
8249
|
+
const of = /^(a|abbr|acronym|b|bd[io]|big|br|button|cite|code|data(list)?|del|dfn|em|i|ins|kbd|label|map|mark|meter|output|q|ruby|s|samp|small|span|strong|su[bp]|time|u|tt|var)$/i;
|
|
8250
|
+
function lf(n, e, t, r, i) {
|
|
8237
8251
|
let s = n.input.compositionPendingChanges || (n.composing ? n.input.compositionID : 0);
|
|
8238
8252
|
if (n.input.compositionPendingChanges = 0, e < 0) {
|
|
8239
8253
|
let E = n.input.lastSelectionTime > Date.now() - 50 ? n.input.lastSelectionOrigin : null, z = cs(n, E);
|
|
8240
8254
|
if (z && !n.state.selection.eq(z)) {
|
|
8241
|
-
if (ie &&
|
|
8255
|
+
if (ie && Ne && n.input.lastKeyCode === 13 && Date.now() - 100 < n.input.lastKeyCodeTime && n.someProp("handleKeyDown", (H) => H(n, Ct(13, "Enter"))))
|
|
8242
8256
|
return;
|
|
8243
8257
|
let $ = n.state.tr.setSelection(z);
|
|
8244
8258
|
E == "pointer" ? $.setMeta("pointer", !0) : E == "key" && $.scrollIntoView(), s && $.setMeta("composition", s), n.dispatch($);
|
|
@@ -8247,10 +8261,10 @@ function of(n, e, t, r, i) {
|
|
|
8247
8261
|
}
|
|
8248
8262
|
let o = n.state.doc.resolve(e), l = o.sharedDepth(t);
|
|
8249
8263
|
e = o.before(l + 1), t = n.state.doc.resolve(t).after(l + 1);
|
|
8250
|
-
let a = n.state.selection, c =
|
|
8264
|
+
let a = n.state.selection, c = rf(n, e, t), u = n.state.doc, d = u.slice(c.from, c.to), f, h;
|
|
8251
8265
|
n.input.lastKeyCode === 8 && Date.now() - 100 < n.input.lastKeyCodeTime ? (f = n.state.selection.to, h = "end") : (f = n.state.selection.from, h = "start"), n.input.lastKeyCode = null;
|
|
8252
|
-
let p =
|
|
8253
|
-
if ((ln && n.input.lastIOSEnter > Date.now() - 225 ||
|
|
8266
|
+
let p = uf(d.content, c.doc.content, c.from, f, h);
|
|
8267
|
+
if (p && n.input.domChangeCount++, (ln && n.input.lastIOSEnter > Date.now() - 225 || Ne) && i.some((E) => E.nodeType == 1 && !of.test(E.nodeName)) && (!p || p.endA >= p.endB) && n.someProp("handleKeyDown", (E) => E(n, Ct(13, "Enter")))) {
|
|
8254
8268
|
n.input.lastIOSEnter = 0;
|
|
8255
8269
|
return;
|
|
8256
8270
|
}
|
|
@@ -8267,17 +8281,17 @@ function of(n, e, t, r, i) {
|
|
|
8267
8281
|
}
|
|
8268
8282
|
return;
|
|
8269
8283
|
}
|
|
8270
|
-
n.
|
|
8284
|
+
n.state.selection.from < n.state.selection.to && p.start == p.endB && n.state.selection instanceof D && (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)), fe && ft <= 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--);
|
|
8271
8285
|
let m = c.doc.resolveNoCache(p.start - c.from), y = c.doc.resolveNoCache(p.endB - c.from), b = u.resolve(p.start), w = m.sameParent(y) && m.parent.inlineContent && b.end() >= p.endA, M;
|
|
8272
8286
|
if ((ln && n.input.lastIOSEnter > Date.now() - 225 && (!w || i.some((E) => E.nodeName == "DIV" || E.nodeName == "P")) || !w && m.pos < c.doc.content.size && !m.sameParent(y) && (M = R.findFrom(c.doc.resolve(m.pos + 1), 1, !0)) && M.head == y.pos) && n.someProp("handleKeyDown", (E) => E(n, Ct(13, "Enter")))) {
|
|
8273
8287
|
n.input.lastIOSEnter = 0;
|
|
8274
8288
|
return;
|
|
8275
8289
|
}
|
|
8276
|
-
if (n.state.selection.anchor > p.start &&
|
|
8277
|
-
|
|
8290
|
+
if (n.state.selection.anchor > p.start && cf(u, p.start, p.endA, m, y) && n.someProp("handleKeyDown", (E) => E(n, Ct(8, "Backspace")))) {
|
|
8291
|
+
Ne && ie && n.domObserver.suppressSelectionUpdates();
|
|
8278
8292
|
return;
|
|
8279
8293
|
}
|
|
8280
|
-
ie &&
|
|
8294
|
+
ie && Ne && p.endB == p.start && (n.input.lastAndroidDelete = Date.now()), Ne && !w && m.start() != y.start() && y.parentOffset == 0 && m.depth == y.depth && c.sel && c.sel.anchor == c.sel.head && c.sel.head == p.endA && (p.endB -= 2, y = c.doc.resolveNoCache(p.endB - c.from), setTimeout(() => {
|
|
8281
8295
|
n.someProp("handleKeyDown", function(E) {
|
|
8282
8296
|
return E(n, Ct(13, "Enter"));
|
|
8283
8297
|
});
|
|
@@ -8288,7 +8302,7 @@ function of(n, e, t, r, i) {
|
|
|
8288
8302
|
fe && ft <= 11 && m.parentOffset == 0 && (n.domObserver.suppressSelectionUpdates(), setTimeout(() => et(n), 20)), k = n.state.tr.delete(g, T), I = u.resolve(p.start).marksAcross(u.resolve(p.endA));
|
|
8289
8303
|
else if (
|
|
8290
8304
|
// Adding or removing a mark
|
|
8291
|
-
p.endA == p.endB && (B =
|
|
8305
|
+
p.endA == p.endB && (B = af(m.parent.content.cut(m.parentOffset, y.parentOffset), b.parent.content.cut(b.parentOffset, p.endA - b.start())))
|
|
8292
8306
|
)
|
|
8293
8307
|
k = n.state.tr, B.type == "add" ? k.addMark(g, T, B.mark) : k.removeMark(g, T, B.mark);
|
|
8294
8308
|
else if (m.parent.child(m.index()).isText && m.index() == y.index() - (y.textOffset ? 0 : 1)) {
|
|
@@ -8300,14 +8314,14 @@ function of(n, e, t, r, i) {
|
|
|
8300
8314
|
}
|
|
8301
8315
|
if (k || (k = n.state.tr.replace(g, T, c.doc.slice(p.start - c.from, p.endB - c.from))), c.sel) {
|
|
8302
8316
|
let E = Eo(n, k.doc, c.sel);
|
|
8303
|
-
E && !(ie &&
|
|
8317
|
+
E && !(ie && Ne && n.composing && E.empty && (p.start != p.endB || n.input.lastAndroidDelete < Date.now() - 100) && (E.head == g || E.head == k.mapping.map(T) - 1) || fe && E.empty && E.head == g) && k.setSelection(E);
|
|
8304
8318
|
}
|
|
8305
8319
|
I && k.ensureMarks(I), s && k.setMeta("composition", s), n.dispatch(k.scrollIntoView());
|
|
8306
8320
|
}
|
|
8307
8321
|
function Eo(n, e, t) {
|
|
8308
8322
|
return Math.max(t.anchor, t.head) > e.content.size ? null : us(n, e.resolve(t.anchor), e.resolve(t.head));
|
|
8309
8323
|
}
|
|
8310
|
-
function
|
|
8324
|
+
function af(n, e) {
|
|
8311
8325
|
let t = n.firstChild.marks, r = e.firstChild.marks, i = t, s = r, o, l, a;
|
|
8312
8326
|
for (let u = 0; u < r.length; u++)
|
|
8313
8327
|
i = r[u].removeFromSet(i);
|
|
@@ -8325,7 +8339,7 @@ function lf(n, e) {
|
|
|
8325
8339
|
if (x.from(c).eq(n))
|
|
8326
8340
|
return { mark: l, type: o };
|
|
8327
8341
|
}
|
|
8328
|
-
function
|
|
8342
|
+
function cf(n, e, t, r, i) {
|
|
8329
8343
|
if (
|
|
8330
8344
|
// The content must have shrunk
|
|
8331
8345
|
t - e <= i.pos - r.pos || // newEnd must point directly at or after the end of the block that newStart points into
|
|
@@ -8353,7 +8367,7 @@ function yi(n, e, t) {
|
|
|
8353
8367
|
}
|
|
8354
8368
|
return i;
|
|
8355
8369
|
}
|
|
8356
|
-
function
|
|
8370
|
+
function uf(n, e, t, r, i) {
|
|
8357
8371
|
let s = n.findDiffStart(e, t);
|
|
8358
8372
|
if (s == null)
|
|
8359
8373
|
return null;
|
|
@@ -8377,7 +8391,7 @@ function Ao(n) {
|
|
|
8377
8391
|
let e = n.charCodeAt(0), t = n.charCodeAt(1);
|
|
8378
8392
|
return e >= 56320 && e <= 57343 && t >= 55296 && t <= 56319;
|
|
8379
8393
|
}
|
|
8380
|
-
class
|
|
8394
|
+
class df {
|
|
8381
8395
|
/**
|
|
8382
8396
|
Create a view. `place` may be a DOM node that the editor should
|
|
8383
8397
|
be appended to, a function that will place it into the document,
|
|
@@ -8386,7 +8400,7 @@ class uf {
|
|
|
8386
8400
|
added to the document.
|
|
8387
8401
|
*/
|
|
8388
8402
|
constructor(e, t) {
|
|
8389
|
-
this._root = null, this.focused = !1, this.trackWrites = null, this.mounted = !1, this.markCursor = null, this.cursorWrapper = null, this.lastSelectedViewDesc = void 0, this.input = new
|
|
8403
|
+
this._root = null, this.focused = !1, this.trackWrites = null, this.mounted = !1, this.markCursor = null, this.cursorWrapper = null, this.lastSelectedViewDesc = void 0, this.input = new Ad(), this.prevDirectPlugins = [], this.pluginViews = [], this.requiresGeckoHackNode = !1, this.dragging = null, this._props = t, this.state = t.state, this.directPlugins = t.plugins || [], this.directPlugins.forEach(Po), this.dispatch = this.dispatch.bind(this), this.dom = e && e.mount || document.createElement("div"), e && (e.appendChild ? e.appendChild(this.dom) : typeof e == "function" ? e(this.dom) : e.mount && (this.mounted = !0)), this.editable = Io(this), Do(this), this.nodeViews = Ro(this), this.docView = co(this.state.doc, No(this), gi(this), this.dom, this), this.domObserver = new Qd(this, (r, i, s, o) => lf(this, r, i, s, o)), this.domObserver.start(), Nd(this), this.updatePluginViews();
|
|
8390
8404
|
}
|
|
8391
8405
|
/**
|
|
8392
8406
|
Holds `true` when a
|
|
@@ -8446,7 +8460,7 @@ class uf {
|
|
|
8446
8460
|
let l = i.plugins != e.plugins || this._props.plugins != t.plugins;
|
|
8447
8461
|
if (l || this._props.plugins != t.plugins || this._props.nodeViews != t.nodeViews) {
|
|
8448
8462
|
let h = Ro(this);
|
|
8449
|
-
|
|
8463
|
+
hf(h, this.nodeViews) && (this.nodeViews = h, s = !0);
|
|
8450
8464
|
}
|
|
8451
8465
|
(l || t.handleDOMEvents != this._props.handleDOMEvents) && Ki(this), this.editable = Io(this), Do(this);
|
|
8452
8466
|
let a = gi(this), c = No(this), u = i.plugins != e.plugins && !i.doc.eq(e.doc) ? "reset" : e.scrollToSelection > i.scrollToSelection ? "to selection" : "preserve", d = s || !this.docView.matchesNode(e.doc, c, a);
|
|
@@ -8454,10 +8468,10 @@ class uf {
|
|
|
8454
8468
|
let f = u == "preserve" && o && this.dom.style.overflowAnchor == null && qu(this);
|
|
8455
8469
|
if (o) {
|
|
8456
8470
|
this.domObserver.stop();
|
|
8457
|
-
let h = d && (fe || ie) && !this.composing && !i.selection.empty && !e.selection.empty &&
|
|
8471
|
+
let h = d && (fe || ie) && !this.composing && !i.selection.empty && !e.selection.empty && ff(i.selection, e.selection);
|
|
8458
8472
|
if (d) {
|
|
8459
8473
|
let p = ie ? this.trackWrites = this.domSelectionRange().focusNode : null;
|
|
8460
|
-
this.composing && (this.input.compositionNode =
|
|
8474
|
+
this.composing && (this.input.compositionNode = Wd(this)), (s || !this.docView.update(e.doc, c, a, this)) && (this.docView.updateOuterDeco(c), this.docView.destroy(), this.docView = co(e.doc, c, a, this.dom, this)), p && !this.trackWrites && (h = !0);
|
|
8461
8475
|
}
|
|
8462
8476
|
h || !(this.input.mouseDown && this.domObserver.currentSelection.eq(this.domSelectionRange()) && pd(this)) ? et(this, h) : (oa(this, e.selection), this.domObserver.setCurSelection()), this.domObserver.start();
|
|
8463
8477
|
}
|
|
@@ -8666,7 +8680,7 @@ class uf {
|
|
|
8666
8680
|
views](https://prosemirror.net/docs/ref/#view.NodeView).
|
|
8667
8681
|
*/
|
|
8668
8682
|
destroy() {
|
|
8669
|
-
this.docView && (
|
|
8683
|
+
this.docView && (Dd(this), this.destroyPluginViews(), this.mounted ? (this.docView.update(this.state.doc, [], gi(this), this), this.dom.textContent = "") : this.dom.parentNode && this.dom.parentNode.removeChild(this.dom), this.docView.destroy(), this.docView = null, Ru());
|
|
8670
8684
|
}
|
|
8671
8685
|
/**
|
|
8672
8686
|
This is true when the view has been
|
|
@@ -8680,7 +8694,7 @@ class uf {
|
|
|
8680
8694
|
Used for testing.
|
|
8681
8695
|
*/
|
|
8682
8696
|
dispatchEvent(e) {
|
|
8683
|
-
return
|
|
8697
|
+
return Rd(this, e);
|
|
8684
8698
|
}
|
|
8685
8699
|
/**
|
|
8686
8700
|
Dispatch a transaction. Will call
|
|
@@ -8700,7 +8714,7 @@ class uf {
|
|
|
8700
8714
|
*/
|
|
8701
8715
|
domSelectionRange() {
|
|
8702
8716
|
let e = this.domSelection();
|
|
8703
|
-
return e ? ae && this.root.nodeType === 11 && Vu(this.dom.ownerDocument) == this.dom &&
|
|
8717
|
+
return e ? ae && this.root.nodeType === 11 && Vu(this.dom.ownerDocument) == this.dom && tf(this, e) || e : { focusNode: null, focusOffset: 0, anchorNode: null, anchorOffset: 0 };
|
|
8704
8718
|
}
|
|
8705
8719
|
/**
|
|
8706
8720
|
@internal
|
|
@@ -8715,19 +8729,19 @@ function No(n) {
|
|
|
8715
8729
|
if (typeof t == "function" && (t = t(n.state)), t)
|
|
8716
8730
|
for (let r in t)
|
|
8717
8731
|
r == "class" ? e.class += " " + t[r] : r == "style" ? e.style = (e.style ? e.style + ";" : "") + t[r] : !e[r] && r != "contenteditable" && r != "nodeName" && (e[r] = String(t[r]));
|
|
8718
|
-
}), e.translate || (e.translate = "no"), [
|
|
8732
|
+
}), e.translate || (e.translate = "no"), [Me.node(0, n.state.doc.content.size, e)];
|
|
8719
8733
|
}
|
|
8720
8734
|
function Do(n) {
|
|
8721
8735
|
if (n.markCursor) {
|
|
8722
8736
|
let e = document.createElement("img");
|
|
8723
|
-
e.className = "ProseMirror-separator", e.setAttribute("mark-placeholder", "true"), e.setAttribute("alt", ""), n.cursorWrapper = { dom: e, deco:
|
|
8737
|
+
e.className = "ProseMirror-separator", e.setAttribute("mark-placeholder", "true"), e.setAttribute("alt", ""), n.cursorWrapper = { dom: e, deco: Me.widget(n.state.selection.from, e, { raw: !0, marks: n.markCursor }) };
|
|
8724
8738
|
} else
|
|
8725
8739
|
n.cursorWrapper = null;
|
|
8726
8740
|
}
|
|
8727
8741
|
function Io(n) {
|
|
8728
8742
|
return !n.someProp("editable", (e) => e(n.state) === !1);
|
|
8729
8743
|
}
|
|
8730
|
-
function
|
|
8744
|
+
function ff(n, e) {
|
|
8731
8745
|
let t = Math.min(n.$anchor.sharedDepth(n.head), e.$anchor.sharedDepth(e.head));
|
|
8732
8746
|
return n.$anchor.start(t) != e.$anchor.start(t);
|
|
8733
8747
|
}
|
|
@@ -8739,7 +8753,7 @@ function Ro(n) {
|
|
|
8739
8753
|
}
|
|
8740
8754
|
return n.someProp("nodeViews", t), n.someProp("markViews", t), e;
|
|
8741
8755
|
}
|
|
8742
|
-
function
|
|
8756
|
+
function hf(n, e) {
|
|
8743
8757
|
let t = 0, r = 0;
|
|
8744
8758
|
for (let i in n) {
|
|
8745
8759
|
if (n[i] != e[i])
|
|
@@ -8832,18 +8846,18 @@ var mt = {
|
|
|
8832
8846
|
220: "|",
|
|
8833
8847
|
221: "}",
|
|
8834
8848
|
222: '"'
|
|
8835
|
-
},
|
|
8849
|
+
}, pf = typeof navigator < "u" && /Mac/.test(navigator.platform), mf = typeof navigator < "u" && /MSIE \d|Trident\/(?:[7-9]|\d{2,})\..*rv:(\d+)/.exec(navigator.userAgent);
|
|
8836
8850
|
for (var ee = 0; ee < 10; ee++) mt[48 + ee] = mt[96 + ee] = String(ee);
|
|
8837
8851
|
for (var ee = 1; ee <= 24; ee++) mt[ee + 111] = "F" + ee;
|
|
8838
8852
|
for (var ee = 65; ee <= 90; ee++)
|
|
8839
8853
|
mt[ee] = String.fromCharCode(ee + 32), zr[ee] = String.fromCharCode(ee);
|
|
8840
8854
|
for (var bi in mt) zr.hasOwnProperty(bi) || (zr[bi] = mt[bi]);
|
|
8841
|
-
function
|
|
8842
|
-
var e =
|
|
8855
|
+
function gf(n) {
|
|
8856
|
+
var e = pf && n.metaKey && n.shiftKey && !n.ctrlKey && !n.altKey || mf && n.shiftKey && n.key && n.key.length == 1 || n.key == "Unidentified", t = !e && n.key || (n.shiftKey ? zr : mt)[n.keyCode] || n.key || "Unidentified";
|
|
8843
8857
|
return t == "Esc" && (t = "Escape"), t == "Del" && (t = "Delete"), t == "Left" && (t = "ArrowLeft"), t == "Up" && (t = "ArrowUp"), t == "Right" && (t = "ArrowRight"), t == "Down" && (t = "ArrowDown"), t;
|
|
8844
8858
|
}
|
|
8845
|
-
const
|
|
8846
|
-
function
|
|
8859
|
+
const yf = typeof navigator < "u" ? /Mac|iP(hone|[oa]d)/.test(navigator.platform) : !1;
|
|
8860
|
+
function bf(n) {
|
|
8847
8861
|
let e = n.split(/-(?!$)/), t = e[e.length - 1];
|
|
8848
8862
|
t == "Space" && (t = " ");
|
|
8849
8863
|
let r, i, s, o;
|
|
@@ -8858,28 +8872,28 @@ function yf(n) {
|
|
|
8858
8872
|
else if (/^s(hift)?$/i.test(a))
|
|
8859
8873
|
s = !0;
|
|
8860
8874
|
else if (/^mod$/i.test(a))
|
|
8861
|
-
|
|
8875
|
+
yf ? o = !0 : i = !0;
|
|
8862
8876
|
else
|
|
8863
8877
|
throw new Error("Unrecognized modifier name: " + a);
|
|
8864
8878
|
}
|
|
8865
8879
|
return r && (t = "Alt-" + t), i && (t = "Ctrl-" + t), o && (t = "Meta-" + t), s && (t = "Shift-" + t), t;
|
|
8866
8880
|
}
|
|
8867
|
-
function
|
|
8881
|
+
function vf(n) {
|
|
8868
8882
|
let e = /* @__PURE__ */ Object.create(null);
|
|
8869
8883
|
for (let t in n)
|
|
8870
|
-
e[
|
|
8884
|
+
e[bf(t)] = n[t];
|
|
8871
8885
|
return e;
|
|
8872
8886
|
}
|
|
8873
8887
|
function vi(n, e, t = !0) {
|
|
8874
8888
|
return e.altKey && (n = "Alt-" + n), e.ctrlKey && (n = "Ctrl-" + n), e.metaKey && (n = "Meta-" + n), t && e.shiftKey && (n = "Shift-" + n), n;
|
|
8875
8889
|
}
|
|
8876
|
-
function
|
|
8890
|
+
function kf(n) {
|
|
8877
8891
|
return new me({ props: { handleKeyDown: Oa(n) } });
|
|
8878
8892
|
}
|
|
8879
8893
|
function Oa(n) {
|
|
8880
|
-
let e =
|
|
8894
|
+
let e = vf(n);
|
|
8881
8895
|
return function(t, r) {
|
|
8882
|
-
let i =
|
|
8896
|
+
let i = gf(r), s, o = e[vi(i, r)];
|
|
8883
8897
|
if (o && o(t.state, t.dispatch, t))
|
|
8884
8898
|
return !0;
|
|
8885
8899
|
if (i.length == 1 && i != " ") {
|
|
@@ -8897,12 +8911,12 @@ function Oa(n) {
|
|
|
8897
8911
|
return !1;
|
|
8898
8912
|
};
|
|
8899
8913
|
}
|
|
8900
|
-
const
|
|
8914
|
+
const xf = (n, e) => n.selection.empty ? !1 : (e && e(n.tr.deleteSelection().scrollIntoView()), !0);
|
|
8901
8915
|
function Ta(n, e) {
|
|
8902
8916
|
let { $cursor: t } = n.selection;
|
|
8903
8917
|
return !t || (e ? !e.endOfTextblock("backward", n) : t.parentOffset > 0) ? null : t;
|
|
8904
8918
|
}
|
|
8905
|
-
const
|
|
8919
|
+
const wf = (n, e, t) => {
|
|
8906
8920
|
let r = Ta(n, t);
|
|
8907
8921
|
if (!r)
|
|
8908
8922
|
return !1;
|
|
@@ -8928,13 +8942,13 @@ const xf = (n, e, t) => {
|
|
|
8928
8942
|
break;
|
|
8929
8943
|
}
|
|
8930
8944
|
return s.isAtom && i.depth == r.depth - 1 ? (e && e(n.tr.delete(i.pos - s.nodeSize, i.pos).scrollIntoView()), !0) : !1;
|
|
8931
|
-
},
|
|
8945
|
+
}, Sf = (n, e, t) => {
|
|
8932
8946
|
let r = Ta(n, t);
|
|
8933
8947
|
if (!r)
|
|
8934
8948
|
return !1;
|
|
8935
8949
|
let i = gs(r);
|
|
8936
8950
|
return i ? Ea(n, i, e) : !1;
|
|
8937
|
-
},
|
|
8951
|
+
}, Mf = (n, e, t) => {
|
|
8938
8952
|
let r = Aa(n, t);
|
|
8939
8953
|
if (!r)
|
|
8940
8954
|
return !1;
|
|
@@ -8978,7 +8992,7 @@ function an(n, e, t = !1) {
|
|
|
8978
8992
|
}
|
|
8979
8993
|
return !1;
|
|
8980
8994
|
}
|
|
8981
|
-
const
|
|
8995
|
+
const Cf = (n, e, t) => {
|
|
8982
8996
|
let { $head: r, empty: i } = n.selection, s = r;
|
|
8983
8997
|
if (!i)
|
|
8984
8998
|
return !1;
|
|
@@ -9004,7 +9018,7 @@ function Aa(n, e) {
|
|
|
9004
9018
|
let { $cursor: t } = n.selection;
|
|
9005
9019
|
return !t || (e ? !e.endOfTextblock("forward", n) : t.parentOffset < t.parent.content.size) ? null : t;
|
|
9006
9020
|
}
|
|
9007
|
-
const
|
|
9021
|
+
const Of = (n, e, t) => {
|
|
9008
9022
|
let r = Aa(n, t);
|
|
9009
9023
|
if (!r)
|
|
9010
9024
|
return !1;
|
|
@@ -9025,7 +9039,7 @@ const Cf = (n, e, t) => {
|
|
|
9025
9039
|
}
|
|
9026
9040
|
}
|
|
9027
9041
|
return s.isAtom && i.depth == r.depth - 1 ? (e && e(n.tr.delete(i.pos, i.pos + s.nodeSize).scrollIntoView()), !0) : !1;
|
|
9028
|
-
},
|
|
9042
|
+
}, Tf = (n, e, t) => {
|
|
9029
9043
|
let { $head: r, empty: i } = n.selection, s = r;
|
|
9030
9044
|
if (!i)
|
|
9031
9045
|
return !1;
|
|
@@ -9048,7 +9062,7 @@ function ys(n) {
|
|
|
9048
9062
|
}
|
|
9049
9063
|
return null;
|
|
9050
9064
|
}
|
|
9051
|
-
const
|
|
9065
|
+
const Ef = (n, e) => {
|
|
9052
9066
|
let t = n.selection, r = t instanceof A, i;
|
|
9053
9067
|
if (r) {
|
|
9054
9068
|
if (t.node.isTextblock || !gt(n.doc, t.from))
|
|
@@ -9061,7 +9075,7 @@ const Tf = (n, e) => {
|
|
|
9061
9075
|
r && s.setSelection(A.create(s.doc, i - n.doc.resolve(i).nodeBefore.nodeSize)), e(s.scrollIntoView());
|
|
9062
9076
|
}
|
|
9063
9077
|
return !0;
|
|
9064
|
-
},
|
|
9078
|
+
}, Af = (n, e) => {
|
|
9065
9079
|
let t = n.selection, r;
|
|
9066
9080
|
if (t instanceof A) {
|
|
9067
9081
|
if (t.node.isTextblock || !gt(n.doc, t.to))
|
|
@@ -9070,10 +9084,10 @@ const Tf = (n, e) => {
|
|
|
9070
9084
|
} else if (r = qr(n.doc, t.to, 1), r == null)
|
|
9071
9085
|
return !1;
|
|
9072
9086
|
return e && e(n.tr.join(r).scrollIntoView()), !0;
|
|
9073
|
-
},
|
|
9087
|
+
}, Nf = (n, e) => {
|
|
9074
9088
|
let { $from: t, $to: r } = n.selection, i = t.blockRange(r), s = i && gn(i);
|
|
9075
9089
|
return s == null ? !1 : (e && e(n.tr.lift(i, s).scrollIntoView()), !0);
|
|
9076
|
-
},
|
|
9090
|
+
}, Df = (n, e) => {
|
|
9077
9091
|
let { $head: t, $anchor: r } = n.selection;
|
|
9078
9092
|
return !t.parent.type.spec.code || !t.sameParent(r) ? !1 : (e && e(n.tr.insertText(`
|
|
9079
9093
|
`).scrollIntoView()), !0);
|
|
@@ -9086,7 +9100,7 @@ function Na(n) {
|
|
|
9086
9100
|
}
|
|
9087
9101
|
return null;
|
|
9088
9102
|
}
|
|
9089
|
-
const
|
|
9103
|
+
const If = (n, e) => {
|
|
9090
9104
|
let { $head: t, $anchor: r } = n.selection;
|
|
9091
9105
|
if (!t.parent.type.spec.code || !t.sameParent(r))
|
|
9092
9106
|
return !1;
|
|
@@ -9098,9 +9112,9 @@ const Df = (n, e) => {
|
|
|
9098
9112
|
a.setSelection(R.near(a.doc.resolve(l), 1)), e(a.scrollIntoView());
|
|
9099
9113
|
}
|
|
9100
9114
|
return !0;
|
|
9101
|
-
},
|
|
9115
|
+
}, Rf = (n, e) => {
|
|
9102
9116
|
let t = n.selection, { $from: r, $to: i } = t;
|
|
9103
|
-
if (t instanceof
|
|
9117
|
+
if (t instanceof Ie || r.parent.inlineContent || i.parent.inlineContent)
|
|
9104
9118
|
return !1;
|
|
9105
9119
|
let s = Na(i.parent.contentMatchAt(i.indexAfter()));
|
|
9106
9120
|
if (!s || !s.isTextblock)
|
|
@@ -9110,7 +9124,7 @@ const Df = (n, e) => {
|
|
|
9110
9124
|
l.setSelection(D.create(l.doc, o + 1)), e(l.scrollIntoView());
|
|
9111
9125
|
}
|
|
9112
9126
|
return !0;
|
|
9113
|
-
},
|
|
9127
|
+
}, Pf = (n, e) => {
|
|
9114
9128
|
let { $cursor: t } = n.selection;
|
|
9115
9129
|
if (!t || t.parent.content.size)
|
|
9116
9130
|
return !1;
|
|
@@ -9121,17 +9135,17 @@ const Df = (n, e) => {
|
|
|
9121
9135
|
}
|
|
9122
9136
|
let r = t.blockRange(), i = r && gn(r);
|
|
9123
9137
|
return i == null ? !1 : (e && e(n.tr.lift(r, i).scrollIntoView()), !0);
|
|
9124
|
-
},
|
|
9138
|
+
}, Bf = (n, e) => {
|
|
9125
9139
|
let { $from: t, to: r } = n.selection, i, s = t.sharedDepth(r);
|
|
9126
9140
|
return s == 0 ? !1 : (i = t.before(s), e && e(n.tr.setSelection(A.create(n.doc, i))), !0);
|
|
9127
9141
|
};
|
|
9128
|
-
function
|
|
9142
|
+
function Lf(n, e, t) {
|
|
9129
9143
|
let r = e.nodeBefore, i = e.nodeAfter, s = e.index();
|
|
9130
9144
|
return !r || !i || !r.type.compatibleContent(i.type) ? !1 : !r.content.size && e.parent.canReplace(s - 1, s) ? (t && t(n.tr.delete(e.pos - r.nodeSize, e.pos).scrollIntoView()), !0) : !e.parent.canReplace(s, s + 1) || !(i.isTextblock || gt(n.doc, e.pos)) ? !1 : (t && t(n.tr.clearIncompatible(e.pos, r.type, r.contentMatchAt(r.childCount)).join(e.pos).scrollIntoView()), !0);
|
|
9131
9145
|
}
|
|
9132
9146
|
function Da(n, e, t, r) {
|
|
9133
9147
|
let i = e.nodeBefore, s = e.nodeAfter, o, l, a = i.type.spec.isolating || s.type.spec.isolating;
|
|
9134
|
-
if (!a &&
|
|
9148
|
+
if (!a && Lf(n, e, t))
|
|
9135
9149
|
return !0;
|
|
9136
9150
|
let c = !a && e.parent.canReplace(e.index(), e.index() + 1);
|
|
9137
9151
|
if (c && (o = (l = i.contentMatchAt(i.childCount)).findWrapping(s.type)) && l.matchType(o[0] || s.type).validEnd) {
|
|
@@ -9179,8 +9193,8 @@ function Ia(n) {
|
|
|
9179
9193
|
return i.node(s).isTextblock ? (t && t(e.tr.setSelection(D.create(e.doc, n < 0 ? i.start(s) : i.end(s)))), !0) : !1;
|
|
9180
9194
|
};
|
|
9181
9195
|
}
|
|
9182
|
-
const
|
|
9183
|
-
function
|
|
9196
|
+
const zf = Ia(-1), Vf = Ia(1);
|
|
9197
|
+
function Ff(n, e = null) {
|
|
9184
9198
|
return function(t, r) {
|
|
9185
9199
|
let { $from: i, $to: s } = t.selection, o = i.blockRange(s), l = o && ss(o, n, e);
|
|
9186
9200
|
return l ? (r && r(t.tr.wrap(o, l).scrollIntoView()), !0) : !1;
|
|
@@ -9217,7 +9231,7 @@ function Bo(n, e = null) {
|
|
|
9217
9231
|
};
|
|
9218
9232
|
}
|
|
9219
9233
|
typeof navigator < "u" ? /Mac|iP(hone|[oa]d)/.test(navigator.platform) : typeof os < "u" && os.platform && os.platform() == "darwin";
|
|
9220
|
-
function
|
|
9234
|
+
function $f(n, e = null) {
|
|
9221
9235
|
return function(t, r) {
|
|
9222
9236
|
let { $from: i, $to: s } = t.selection, o = i.blockRange(s), l = !1, a = o;
|
|
9223
9237
|
if (!o)
|
|
@@ -9229,10 +9243,10 @@ function Ff(n, e = null) {
|
|
|
9229
9243
|
a = new Ar(u, u, o.depth), o.endIndex < o.parent.childCount && (o = new Ar(i, t.doc.resolve(s.end(o.depth)), o.depth)), l = !0;
|
|
9230
9244
|
}
|
|
9231
9245
|
let c = ss(a, n, e, o);
|
|
9232
|
-
return c ? (r && r(
|
|
9246
|
+
return c ? (r && r(Hf(t.tr, o, c, l, n).scrollIntoView()), !0) : !1;
|
|
9233
9247
|
};
|
|
9234
9248
|
}
|
|
9235
|
-
function
|
|
9249
|
+
function Hf(n, e, t, r, i) {
|
|
9236
9250
|
let s = x.empty;
|
|
9237
9251
|
for (let u = t.length - 1; u >= 0; u--)
|
|
9238
9252
|
s = x.from(t[u].type.create(t[u].attrs, s));
|
|
@@ -9245,13 +9259,13 @@ function $f(n, e, t, r, i) {
|
|
|
9245
9259
|
!f && tn(n.doc, a, l) && (n.split(a, l), a += 2 * l), a += c.child(u).nodeSize;
|
|
9246
9260
|
return n;
|
|
9247
9261
|
}
|
|
9248
|
-
function
|
|
9262
|
+
function jf(n) {
|
|
9249
9263
|
return function(e, t) {
|
|
9250
9264
|
let { $from: r, $to: i } = e.selection, s = r.blockRange(i, (o) => o.childCount > 0 && o.firstChild.type == n);
|
|
9251
|
-
return s ? t ? r.node(s.depth - 1).type == n ?
|
|
9265
|
+
return s ? t ? r.node(s.depth - 1).type == n ? Wf(e, t, n, s) : qf(e, t, s) : !0 : !1;
|
|
9252
9266
|
};
|
|
9253
9267
|
}
|
|
9254
|
-
function
|
|
9268
|
+
function Wf(n, e, t, r) {
|
|
9255
9269
|
let i = n.tr, s = r.end, o = r.$to.end(r.depth);
|
|
9256
9270
|
s < o && (i.step(new U(s - 1, o, s, o, new S(x.from(t.create(null, r.parent.copy())), 1, 0), 1, !0)), r = new Ar(i.doc.resolve(r.$from.pos), i.doc.resolve(o), r.depth));
|
|
9257
9271
|
const l = gn(r);
|
|
@@ -9261,7 +9275,7 @@ function jf(n, e, t, r) {
|
|
|
9261
9275
|
let a = i.mapping.map(s, -1) - 1;
|
|
9262
9276
|
return gt(i.doc, a) && i.join(a), e(i.scrollIntoView()), !0;
|
|
9263
9277
|
}
|
|
9264
|
-
function
|
|
9278
|
+
function qf(n, e, t) {
|
|
9265
9279
|
let r = n.tr, i = t.parent;
|
|
9266
9280
|
for (let h = t.end, p = t.endIndex - 1, m = t.startIndex; p > m; p--)
|
|
9267
9281
|
h -= i.child(p).nodeSize, r.delete(h - 1, h + 1);
|
|
@@ -9274,7 +9288,7 @@ function Wf(n, e, t) {
|
|
|
9274
9288
|
let d = s.pos, f = d + o.nodeSize;
|
|
9275
9289
|
return r.step(new U(d - (l ? 1 : 0), f + (a ? 1 : 0), d + 1, f - 1, new S((l ? x.empty : x.from(i.copy(x.empty))).append(a ? x.empty : x.from(i.copy(x.empty))), l ? 0 : 1, a ? 0 : 1), l ? 0 : 1)), e(r.scrollIntoView()), !0;
|
|
9276
9290
|
}
|
|
9277
|
-
function
|
|
9291
|
+
function Kf(n) {
|
|
9278
9292
|
return function(e, t) {
|
|
9279
9293
|
let { $from: r, $to: i } = e.selection, s = r.blockRange(i, (c) => c.childCount > 0 && c.firstChild.type == n);
|
|
9280
9294
|
if (!s)
|
|
@@ -9377,7 +9391,7 @@ class Xr {
|
|
|
9377
9391
|
return l;
|
|
9378
9392
|
}
|
|
9379
9393
|
}
|
|
9380
|
-
class
|
|
9394
|
+
class Jf {
|
|
9381
9395
|
constructor() {
|
|
9382
9396
|
this.callbacks = {};
|
|
9383
9397
|
}
|
|
@@ -9498,10 +9512,10 @@ function Pa(n) {
|
|
|
9498
9512
|
function P(n, e = void 0, ...t) {
|
|
9499
9513
|
return Pa(n) ? e ? n.bind(e)(...t) : n(...t) : n;
|
|
9500
9514
|
}
|
|
9501
|
-
function
|
|
9515
|
+
function _f(n = {}) {
|
|
9502
9516
|
return Object.keys(n).length === 0 && n.constructor === Object;
|
|
9503
9517
|
}
|
|
9504
|
-
function
|
|
9518
|
+
function Uf(n) {
|
|
9505
9519
|
return typeof n != "string" ? n : n.match(/^[+-]?(?:\d*\.)?\d+$/) ? Number(n) : n === "true" ? !0 : n === "false" ? !1 : n;
|
|
9506
9520
|
}
|
|
9507
9521
|
function Lo(n, e) {
|
|
@@ -9512,7 +9526,7 @@ function Lo(n, e) {
|
|
|
9512
9526
|
if (r === !1)
|
|
9513
9527
|
return !1;
|
|
9514
9528
|
const i = e.reduce((s, o) => {
|
|
9515
|
-
const l = o.attribute.parseHTML ? o.attribute.parseHTML(t) :
|
|
9529
|
+
const l = o.attribute.parseHTML ? o.attribute.parseHTML(t) : Uf(t.getAttribute(o.name));
|
|
9516
9530
|
return l == null ? s : {
|
|
9517
9531
|
...s,
|
|
9518
9532
|
[o.name]: l
|
|
@@ -9525,10 +9539,10 @@ function Lo(n, e) {
|
|
|
9525
9539
|
function zo(n) {
|
|
9526
9540
|
return Object.fromEntries(
|
|
9527
9541
|
// @ts-ignore
|
|
9528
|
-
Object.entries(n).filter(([e, t]) => e === "attrs" &&
|
|
9542
|
+
Object.entries(n).filter(([e, t]) => e === "attrs" && _f(t) ? !1 : t != null)
|
|
9529
9543
|
);
|
|
9530
9544
|
}
|
|
9531
|
-
function
|
|
9545
|
+
function Gf(n, e) {
|
|
9532
9546
|
var t;
|
|
9533
9547
|
const r = Ra(n), { nodeExtensions: i, markExtensions: s } = Zr(n), o = (t = i.find((c) => C(c, "topNode"))) === null || t === void 0 ? void 0 : t.name, l = Object.fromEntries(i.map((c) => {
|
|
9534
9548
|
const u = r.filter((b) => b.type === c.name), d = {
|
|
@@ -9611,7 +9625,7 @@ function ki(n, e) {
|
|
|
9611
9625
|
function Vo(n, e) {
|
|
9612
9626
|
return Array.isArray(e) ? e.some((t) => (typeof t == "string" ? t : t.name) === n.name) : e;
|
|
9613
9627
|
}
|
|
9614
|
-
const
|
|
9628
|
+
const Yf = (n, e = 500) => {
|
|
9615
9629
|
let t = "";
|
|
9616
9630
|
const r = n.parentOffset;
|
|
9617
9631
|
return n.parent.nodesBetween(Math.max(0, r - e), r, (i, s, o, l) => {
|
|
@@ -9633,7 +9647,7 @@ class Qr {
|
|
|
9633
9647
|
this.find = e.find, this.handler = e.handler;
|
|
9634
9648
|
}
|
|
9635
9649
|
}
|
|
9636
|
-
const
|
|
9650
|
+
const Xf = (n, e) => {
|
|
9637
9651
|
if (bs(e))
|
|
9638
9652
|
return e.exec(n);
|
|
9639
9653
|
const t = e(n);
|
|
@@ -9654,11 +9668,11 @@ function mr(n) {
|
|
|
9654
9668
|
)
|
|
9655
9669
|
return !1;
|
|
9656
9670
|
let u = !1;
|
|
9657
|
-
const d =
|
|
9671
|
+
const d = Yf(c) + s;
|
|
9658
9672
|
return o.forEach((f) => {
|
|
9659
9673
|
if (u)
|
|
9660
9674
|
return;
|
|
9661
|
-
const h =
|
|
9675
|
+
const h = Xf(d, f.find);
|
|
9662
9676
|
if (!h)
|
|
9663
9677
|
return;
|
|
9664
9678
|
const p = a.state.tr, m = Yr({
|
|
@@ -9686,7 +9700,7 @@ function mr(n) {
|
|
|
9686
9700
|
}), a.dispatch(p), u = !0);
|
|
9687
9701
|
}), u;
|
|
9688
9702
|
}
|
|
9689
|
-
function
|
|
9703
|
+
function Zf(n) {
|
|
9690
9704
|
const { editor: e, rules: t } = n, r = new me({
|
|
9691
9705
|
state: {
|
|
9692
9706
|
init() {
|
|
@@ -9756,15 +9770,15 @@ function Xf(n) {
|
|
|
9756
9770
|
});
|
|
9757
9771
|
return r;
|
|
9758
9772
|
}
|
|
9759
|
-
function
|
|
9773
|
+
function Qf(n) {
|
|
9760
9774
|
return typeof n == "number";
|
|
9761
9775
|
}
|
|
9762
|
-
class
|
|
9776
|
+
class eh {
|
|
9763
9777
|
constructor(e) {
|
|
9764
9778
|
this.find = e.find, this.handler = e.handler;
|
|
9765
9779
|
}
|
|
9766
9780
|
}
|
|
9767
|
-
const
|
|
9781
|
+
const th = (n, e, t) => {
|
|
9768
9782
|
if (bs(e))
|
|
9769
9783
|
return [...n.matchAll(e)];
|
|
9770
9784
|
const r = e(n, t);
|
|
@@ -9773,7 +9787,7 @@ const eh = (n, e, t) => {
|
|
|
9773
9787
|
return s.index = i.index, s.input = n, s.data = i.data, i.replaceWith && (i.text.includes(i.replaceWith) || console.warn('[tiptap warn]: "pasteRuleMatch.replaceWith" must be part of "pasteRuleMatch.text".'), s.push(i.replaceWith)), s;
|
|
9774
9788
|
}) : [];
|
|
9775
9789
|
};
|
|
9776
|
-
function
|
|
9790
|
+
function nh(n) {
|
|
9777
9791
|
const { editor: e, state: t, from: r, to: i, rule: s, pasteEvent: o, dropEvent: l } = n, { commands: a, chain: c, can: u } = new Xr({
|
|
9778
9792
|
editor: e,
|
|
9779
9793
|
state: t
|
|
@@ -9782,7 +9796,7 @@ function th(n) {
|
|
|
9782
9796
|
if (!h.isTextblock || h.type.spec.code)
|
|
9783
9797
|
return;
|
|
9784
9798
|
const m = Math.max(r, p), y = Math.min(i, p + h.content.size), b = h.textBetween(m - p, y - p, void 0, "");
|
|
9785
|
-
|
|
9799
|
+
th(b, s.find, o).forEach((M) => {
|
|
9786
9800
|
if (M.index === void 0)
|
|
9787
9801
|
return;
|
|
9788
9802
|
const g = m + M.index + 1, T = g + M[0].length, k = {
|
|
@@ -9802,14 +9816,14 @@ function th(n) {
|
|
|
9802
9816
|
});
|
|
9803
9817
|
}), d.every((h) => h !== null);
|
|
9804
9818
|
}
|
|
9805
|
-
const
|
|
9819
|
+
const rh = (n) => {
|
|
9806
9820
|
var e;
|
|
9807
9821
|
const t = new ClipboardEvent("paste", {
|
|
9808
9822
|
clipboardData: new DataTransfer()
|
|
9809
9823
|
});
|
|
9810
9824
|
return (e = t.clipboardData) === null || e === void 0 || e.setData("text/html", n), t;
|
|
9811
9825
|
};
|
|
9812
|
-
function
|
|
9826
|
+
function ih(n) {
|
|
9813
9827
|
const { editor: e, rules: t } = n;
|
|
9814
9828
|
let r = null, i = !1, s = !1, o = typeof ClipboardEvent < "u" ? new ClipboardEvent("paste") : null, l = typeof DragEvent < "u" ? new DragEvent("drop") : null;
|
|
9815
9829
|
const a = ({ state: u, from: d, to: f, rule: h, pasteEvt: p }) => {
|
|
@@ -9817,7 +9831,7 @@ function rh(n) {
|
|
|
9817
9831
|
state: u,
|
|
9818
9832
|
transaction: m
|
|
9819
9833
|
});
|
|
9820
|
-
if (!(!
|
|
9834
|
+
if (!(!nh({
|
|
9821
9835
|
editor: e,
|
|
9822
9836
|
state: y,
|
|
9823
9837
|
from: Math.max(d - 1, 0),
|
|
@@ -9856,7 +9870,7 @@ function rh(n) {
|
|
|
9856
9870
|
if (!m && !y && !w)
|
|
9857
9871
|
return;
|
|
9858
9872
|
if (w) {
|
|
9859
|
-
const { from: T, text: k } = b, I = T + k.length, B =
|
|
9873
|
+
const { from: T, text: k } = b, I = T + k.length, B = rh(k);
|
|
9860
9874
|
return a({
|
|
9861
9875
|
rule: u,
|
|
9862
9876
|
state: h,
|
|
@@ -9866,7 +9880,7 @@ function rh(n) {
|
|
|
9866
9880
|
});
|
|
9867
9881
|
}
|
|
9868
9882
|
const M = f.doc.content.findDiffStart(h.doc.content), g = f.doc.content.findDiffEnd(h.doc.content);
|
|
9869
|
-
if (!(!
|
|
9883
|
+
if (!(!Qf(M) || !g || M === g.b))
|
|
9870
9884
|
return a({
|
|
9871
9885
|
rule: u,
|
|
9872
9886
|
state: h,
|
|
@@ -9877,13 +9891,13 @@ function rh(n) {
|
|
|
9877
9891
|
}
|
|
9878
9892
|
}));
|
|
9879
9893
|
}
|
|
9880
|
-
function
|
|
9894
|
+
function sh(n) {
|
|
9881
9895
|
const e = n.filter((t, r) => n.indexOf(t) !== r);
|
|
9882
9896
|
return Array.from(new Set(e));
|
|
9883
9897
|
}
|
|
9884
9898
|
class Qt {
|
|
9885
9899
|
constructor(e, t) {
|
|
9886
|
-
this.splittableMarks = [], this.editor = t, this.extensions = Qt.resolve(e), this.schema =
|
|
9900
|
+
this.splittableMarks = [], this.editor = t, this.extensions = Qt.resolve(e), this.schema = Gf(this.extensions, t), this.setupExtensions();
|
|
9887
9901
|
}
|
|
9888
9902
|
/**
|
|
9889
9903
|
* Returns a flattened and sorted extension list while
|
|
@@ -9892,7 +9906,7 @@ class Qt {
|
|
|
9892
9906
|
* @returns An flattened and sorted array of Tiptap extensions
|
|
9893
9907
|
*/
|
|
9894
9908
|
static resolve(e) {
|
|
9895
|
-
const t = Qt.sort(Qt.flatten(e)), r =
|
|
9909
|
+
const t = Qt.sort(Qt.flatten(e)), r = sh(t.map((i) => i.name));
|
|
9896
9910
|
return r.length && console.warn(`[tiptap warn]: Duplicate extension names found: [${r.map((i) => `'${i}'`).join(", ")}]. This can lead to issues.`), t;
|
|
9897
9911
|
}
|
|
9898
9912
|
/**
|
|
@@ -9958,7 +9972,7 @@ class Qt {
|
|
|
9958
9972
|
const m = Object.fromEntries(Object.entries(c()).map(([y, b]) => [y, () => b({ editor: e })]));
|
|
9959
9973
|
u = { ...u, ...m };
|
|
9960
9974
|
}
|
|
9961
|
-
const d =
|
|
9975
|
+
const d = kf(u);
|
|
9962
9976
|
a.push(d);
|
|
9963
9977
|
const f = C(o, "addInputRules", l);
|
|
9964
9978
|
Vo(o, e.options.enableInputRules) && f && r.push(...f());
|
|
@@ -9972,11 +9986,11 @@ class Qt {
|
|
|
9972
9986
|
return a;
|
|
9973
9987
|
}).flat();
|
|
9974
9988
|
return [
|
|
9975
|
-
|
|
9989
|
+
Zf({
|
|
9976
9990
|
editor: e,
|
|
9977
9991
|
rules: r
|
|
9978
9992
|
}),
|
|
9979
|
-
...
|
|
9993
|
+
...ih({
|
|
9980
9994
|
editor: e,
|
|
9981
9995
|
rules: i
|
|
9982
9996
|
}),
|
|
@@ -10041,11 +10055,11 @@ class Qt {
|
|
|
10041
10055
|
});
|
|
10042
10056
|
}
|
|
10043
10057
|
}
|
|
10044
|
-
function
|
|
10058
|
+
function oh(n) {
|
|
10045
10059
|
return Object.prototype.toString.call(n).slice(8, -1);
|
|
10046
10060
|
}
|
|
10047
10061
|
function gr(n) {
|
|
10048
|
-
return
|
|
10062
|
+
return oh(n) !== "Object" ? !1 : n.constructor === Object && Object.getPrototypeOf(n) === Object.prototype;
|
|
10049
10063
|
}
|
|
10050
10064
|
function ei(n, e) {
|
|
10051
10065
|
const t = { ...n };
|
|
@@ -10111,7 +10125,7 @@ function Ba(n, e, t) {
|
|
|
10111
10125
|
function La(n) {
|
|
10112
10126
|
return Object.fromEntries(Object.entries(n.nodes).filter(([, e]) => e.spec.toText).map(([e, t]) => [e, t.spec.toText]));
|
|
10113
10127
|
}
|
|
10114
|
-
const
|
|
10128
|
+
const lh = de.create({
|
|
10115
10129
|
name: "clipboardTextSerializer",
|
|
10116
10130
|
addOptions() {
|
|
10117
10131
|
return {
|
|
@@ -10134,10 +10148,10 @@ const oh = de.create({
|
|
|
10134
10148
|
})
|
|
10135
10149
|
];
|
|
10136
10150
|
}
|
|
10137
|
-
}),
|
|
10151
|
+
}), ah = () => ({ editor: n, view: e }) => (requestAnimationFrame(() => {
|
|
10138
10152
|
var t;
|
|
10139
10153
|
n.isDestroyed || (e.dom.blur(), (t = window?.getSelection()) === null || t === void 0 || t.removeAllRanges());
|
|
10140
|
-
}), !0),
|
|
10154
|
+
}), !0), ch = (n = !1) => ({ commands: e }) => e.setContent("", n), uh = () => ({ state: n, tr: e, dispatch: t }) => {
|
|
10141
10155
|
const { selection: r } = e, { ranges: i } = r;
|
|
10142
10156
|
return t && i.forEach(({ $from: s, $to: o }) => {
|
|
10143
10157
|
n.doc.nodesBetween(s.pos, o.pos, (l, a) => {
|
|
@@ -10154,12 +10168,12 @@ const oh = de.create({
|
|
|
10154
10168
|
(p || p === 0) && e.lift(h, p);
|
|
10155
10169
|
});
|
|
10156
10170
|
}), !0;
|
|
10157
|
-
},
|
|
10171
|
+
}, dh = (n) => (e) => n(e), fh = () => ({ state: n, dispatch: e }) => Rf(n, e), hh = (n, e) => ({ editor: t, tr: r }) => {
|
|
10158
10172
|
const { state: i } = t, s = i.doc.slice(n.from, n.to);
|
|
10159
10173
|
r.deleteRange(n.from, n.to);
|
|
10160
10174
|
const o = r.mapping.map(e);
|
|
10161
10175
|
return r.insert(o, s.content), r.setSelection(new D(r.doc.resolve(o - 1))), !0;
|
|
10162
|
-
},
|
|
10176
|
+
}, ph = () => ({ tr: n, dispatch: e }) => {
|
|
10163
10177
|
const { selection: t } = n, r = t.$anchor.node();
|
|
10164
10178
|
if (r.content.size > 0)
|
|
10165
10179
|
return !1;
|
|
@@ -10173,7 +10187,7 @@ const oh = de.create({
|
|
|
10173
10187
|
return !0;
|
|
10174
10188
|
}
|
|
10175
10189
|
return !1;
|
|
10176
|
-
},
|
|
10190
|
+
}, mh = (n) => ({ tr: e, state: t, dispatch: r }) => {
|
|
10177
10191
|
const i = Y(n, t.schema), s = e.selection.$anchor;
|
|
10178
10192
|
for (let o = s.depth; o > 0; o -= 1)
|
|
10179
10193
|
if (s.node(o).type === i) {
|
|
@@ -10184,10 +10198,10 @@ const oh = de.create({
|
|
|
10184
10198
|
return !0;
|
|
10185
10199
|
}
|
|
10186
10200
|
return !1;
|
|
10187
|
-
},
|
|
10201
|
+
}, gh = (n) => ({ tr: e, dispatch: t }) => {
|
|
10188
10202
|
const { from: r, to: i } = n;
|
|
10189
10203
|
return t && e.delete(r, i), !0;
|
|
10190
|
-
},
|
|
10204
|
+
}, yh = () => ({ state: n, dispatch: e }) => xf(n, e), bh = () => ({ commands: n }) => n.keyboardShortcut("Enter"), vh = () => ({ state: n, dispatch: e }) => If(n, e);
|
|
10191
10205
|
function Vr(n, e, t = { strict: !0 }) {
|
|
10192
10206
|
const r = Object.keys(e);
|
|
10193
10207
|
return r.length ? r.every((i) => t.strict ? e[i] === n[i] : bs(e[i]) ? e[i].test(n[i]) : e[i] === n[i]) : !0;
|
|
@@ -10195,7 +10209,7 @@ function Vr(n, e, t = { strict: !0 }) {
|
|
|
10195
10209
|
function _i(n, e, t = {}) {
|
|
10196
10210
|
return n.find((r) => r.type === e && Vr(r.attrs, t));
|
|
10197
10211
|
}
|
|
10198
|
-
function
|
|
10212
|
+
function kh(n, e, t = {}) {
|
|
10199
10213
|
return !!_i(n, e, t);
|
|
10200
10214
|
}
|
|
10201
10215
|
function vs(n, e, t = {}) {
|
|
@@ -10210,7 +10224,7 @@ function vs(n, e, t = {}) {
|
|
|
10210
10224
|
let s = r.index, o = n.start() + r.offset, l = s + 1, a = o + r.node.nodeSize;
|
|
10211
10225
|
for (_i([...r.node.marks], e, t); s > 0 && i.isInSet(n.parent.child(s - 1).marks); )
|
|
10212
10226
|
s -= 1, o -= n.parent.child(s).nodeSize;
|
|
10213
|
-
for (; l < n.parent.childCount &&
|
|
10227
|
+
for (; l < n.parent.childCount && kh([...n.parent.child(l).marks], e, t); )
|
|
10214
10228
|
a += n.parent.child(l).nodeSize, l += 1;
|
|
10215
10229
|
return {
|
|
10216
10230
|
from: o,
|
|
@@ -10225,7 +10239,7 @@ function bt(n, e) {
|
|
|
10225
10239
|
}
|
|
10226
10240
|
return n;
|
|
10227
10241
|
}
|
|
10228
|
-
const
|
|
10242
|
+
const xh = (n, e = {}) => ({ tr: t, state: r, dispatch: i }) => {
|
|
10229
10243
|
const s = bt(n, r.schema), { doc: o, selection: l } = t, { $from: a, from: c, to: u } = l;
|
|
10230
10244
|
if (i) {
|
|
10231
10245
|
const d = vs(a, s, e);
|
|
@@ -10235,7 +10249,7 @@ const kh = (n, e = {}) => ({ tr: t, state: r, dispatch: i }) => {
|
|
|
10235
10249
|
}
|
|
10236
10250
|
}
|
|
10237
10251
|
return !0;
|
|
10238
|
-
},
|
|
10252
|
+
}, wh = (n) => (e) => {
|
|
10239
10253
|
const t = typeof n == "function" ? n(e) : n;
|
|
10240
10254
|
for (let r = 0; r < t.length; r += 1)
|
|
10241
10255
|
if (t[r](e))
|
|
@@ -10269,7 +10283,7 @@ function xs() {
|
|
|
10269
10283
|
"iPod"
|
|
10270
10284
|
].includes(navigator.platform) || navigator.userAgent.includes("Mac") && "ontouchend" in document;
|
|
10271
10285
|
}
|
|
10272
|
-
const
|
|
10286
|
+
const Sh = (n = null, e = {}) => ({ editor: t, view: r, tr: i, dispatch: s }) => {
|
|
10273
10287
|
e = {
|
|
10274
10288
|
scrollIntoView: !0,
|
|
10275
10289
|
...e
|
|
@@ -10285,7 +10299,7 @@ const wh = (n = null, e = {}) => ({ editor: t, view: r, tr: i, dispatch: s }) =>
|
|
|
10285
10299
|
return o(), !0;
|
|
10286
10300
|
const l = za(i.doc, n) || t.state.selection, a = t.state.selection.eq(l);
|
|
10287
10301
|
return s && (a || i.setSelection(l), a && i.storedMarks && i.setStoredMarks(i.storedMarks), o()), !0;
|
|
10288
|
-
},
|
|
10302
|
+
}, Mh = (n, e) => (t) => n.every((r, i) => e(r, { ...t, index: i })), Ch = (n, e) => ({ tr: t, commands: r }) => r.insertContentAt({ from: t.selection.from, to: t.selection.to }, n, e), Va = (n) => {
|
|
10289
10303
|
const e = n.childNodes;
|
|
10290
10304
|
for (let t = e.length - 1; t >= 0; t -= 1) {
|
|
10291
10305
|
const r = e[t];
|
|
@@ -10306,7 +10320,10 @@ function Fr(n, e, t) {
|
|
|
10306
10320
|
const r = typeof n == "object" && n !== null, i = typeof n == "string";
|
|
10307
10321
|
if (r)
|
|
10308
10322
|
try {
|
|
10309
|
-
|
|
10323
|
+
if (Array.isArray(n) && n.length > 0)
|
|
10324
|
+
return x.fromArray(n.map((l) => e.nodeFromJSON(l)));
|
|
10325
|
+
const o = e.nodeFromJSON(n);
|
|
10326
|
+
return t.errorOnInvalidContent && o.check(), o;
|
|
10310
10327
|
} catch (s) {
|
|
10311
10328
|
if (t.errorOnInvalidContent)
|
|
10312
10329
|
throw new Error("[tiptap error]: Invalid JSON content", { cause: s });
|
|
@@ -10341,7 +10358,7 @@ function Fr(n, e, t) {
|
|
|
10341
10358
|
}
|
|
10342
10359
|
return Fr("", e, t);
|
|
10343
10360
|
}
|
|
10344
|
-
function
|
|
10361
|
+
function Oh(n, e, t) {
|
|
10345
10362
|
const r = n.steps.length - 1;
|
|
10346
10363
|
if (r < e)
|
|
10347
10364
|
return;
|
|
@@ -10354,7 +10371,7 @@ function Ch(n, e, t) {
|
|
|
10354
10371
|
o === 0 && (o = u);
|
|
10355
10372
|
}), n.setSelection(R.near(n.doc.resolve(o), t));
|
|
10356
10373
|
}
|
|
10357
|
-
const
|
|
10374
|
+
const Th = (n) => !("type" in n), Eh = (n, e, t) => ({ tr: r, dispatch: i, editor: s }) => {
|
|
10358
10375
|
var o;
|
|
10359
10376
|
if (i) {
|
|
10360
10377
|
t = {
|
|
@@ -10383,35 +10400,35 @@ const Oh = (n) => !("type" in n), Th = (n, e, t) => ({ tr: r, dispatch: i, edito
|
|
|
10383
10400
|
}), !1;
|
|
10384
10401
|
}
|
|
10385
10402
|
let { from: a, to: c } = typeof n == "number" ? { from: n, to: n } : { from: n.from, to: n.to }, u = !0, d = !0;
|
|
10386
|
-
if ((
|
|
10403
|
+
if ((Th(l) ? l : [l]).forEach((p) => {
|
|
10387
10404
|
p.check(), u = u ? p.isText && p.marks.length === 0 : !1, d = d ? p.isBlock : !1;
|
|
10388
10405
|
}), a === c && d) {
|
|
10389
10406
|
const { parent: p } = r.doc.resolve(a);
|
|
10390
10407
|
p.isTextblock && !p.type.spec.code && !p.childCount && (a -= 1, c += 1);
|
|
10391
10408
|
}
|
|
10392
10409
|
let h;
|
|
10393
|
-
u ? (Array.isArray(e) ? h = e.map((p) => p.text || "").join("") : typeof e == "object" && e && e.text ? h = e.text : h = e, r.insertText(h, a, c)) : (h = l, r.replaceWith(a, c, h)), t.updateSelection &&
|
|
10410
|
+
u ? (Array.isArray(e) ? h = e.map((p) => p.text || "").join("") : typeof e == "object" && e && e.text ? h = e.text : h = e, r.insertText(h, a, c)) : (h = l, r.replaceWith(a, c, h)), t.updateSelection && Oh(r, r.steps.length - 1, -1), t.applyInputRules && r.setMeta("applyInputRules", { from: a, text: h }), t.applyPasteRules && r.setMeta("applyPasteRules", { from: a, text: h });
|
|
10394
10411
|
}
|
|
10395
10412
|
return !0;
|
|
10396
|
-
},
|
|
10413
|
+
}, Ah = () => ({ state: n, dispatch: e }) => Ef(n, e), Nh = () => ({ state: n, dispatch: e }) => Af(n, e), Dh = () => ({ state: n, dispatch: e }) => wf(n, e), Ih = () => ({ state: n, dispatch: e }) => Of(n, e), Rh = () => ({ state: n, dispatch: e, tr: t }) => {
|
|
10397
10414
|
try {
|
|
10398
10415
|
const r = qr(n.doc, n.selection.$from.pos, -1);
|
|
10399
10416
|
return r == null ? !1 : (t.join(r, 2), e && e(t), !0);
|
|
10400
10417
|
} catch {
|
|
10401
10418
|
return !1;
|
|
10402
10419
|
}
|
|
10403
|
-
},
|
|
10420
|
+
}, Ph = () => ({ state: n, dispatch: e, tr: t }) => {
|
|
10404
10421
|
try {
|
|
10405
10422
|
const r = qr(n.doc, n.selection.$from.pos, 1);
|
|
10406
10423
|
return r == null ? !1 : (t.join(r, 2), e && e(t), !0);
|
|
10407
10424
|
} catch {
|
|
10408
10425
|
return !1;
|
|
10409
10426
|
}
|
|
10410
|
-
},
|
|
10427
|
+
}, Bh = () => ({ state: n, dispatch: e }) => Sf(n, e), Lh = () => ({ state: n, dispatch: e }) => Mf(n, e);
|
|
10411
10428
|
function Fa() {
|
|
10412
10429
|
return typeof navigator < "u" ? /Mac/.test(navigator.platform) : !1;
|
|
10413
10430
|
}
|
|
10414
|
-
function
|
|
10431
|
+
function zh(n) {
|
|
10415
10432
|
const e = n.split(/-(?!$)/);
|
|
10416
10433
|
let t = e[e.length - 1];
|
|
10417
10434
|
t === "Space" && (t = " ");
|
|
@@ -10433,8 +10450,8 @@ function Lh(n) {
|
|
|
10433
10450
|
}
|
|
10434
10451
|
return r && (t = `Alt-${t}`), i && (t = `Ctrl-${t}`), o && (t = `Meta-${t}`), s && (t = `Shift-${t}`), t;
|
|
10435
10452
|
}
|
|
10436
|
-
const
|
|
10437
|
-
const s =
|
|
10453
|
+
const Vh = (n) => ({ editor: e, view: t, tr: r, dispatch: i }) => {
|
|
10454
|
+
const s = zh(n).split(/-(?!$)/), o = s.find((c) => !["Alt", "Ctrl", "Meta", "Shift"].includes(c)), l = new KeyboardEvent("keydown", {
|
|
10438
10455
|
key: o === "Space" ? " " : o,
|
|
10439
10456
|
altKey: s.includes("Alt"),
|
|
10440
10457
|
ctrlKey: s.includes("Ctrl"),
|
|
@@ -10465,13 +10482,13 @@ function Hn(n, e, t = {}) {
|
|
|
10465
10482
|
const a = i - r, c = l.filter((d) => o ? o.name === d.node.type.name : !0).filter((d) => Vr(d.node.attrs, t, { strict: !1 }));
|
|
10466
10483
|
return s ? !!c.length : c.reduce((d, f) => d + f.to - f.from, 0) >= a;
|
|
10467
10484
|
}
|
|
10468
|
-
const
|
|
10485
|
+
const Fh = (n, e = {}) => ({ state: t, dispatch: r }) => {
|
|
10469
10486
|
const i = Y(n, t.schema);
|
|
10470
|
-
return Hn(t, i, e) ?
|
|
10471
|
-
},
|
|
10487
|
+
return Hn(t, i, e) ? Nf(t, r) : !1;
|
|
10488
|
+
}, $h = () => ({ state: n, dispatch: e }) => Pf(n, e), Hh = (n) => ({ state: e, dispatch: t }) => {
|
|
10472
10489
|
const r = Y(n, e.schema);
|
|
10473
|
-
return
|
|
10474
|
-
},
|
|
10490
|
+
return jf(r)(e, t);
|
|
10491
|
+
}, jh = () => ({ state: n, dispatch: e }) => Df(n, e);
|
|
10475
10492
|
function ti(n, e) {
|
|
10476
10493
|
return e.nodes[n] ? "node" : e.marks[n] ? "mark" : null;
|
|
10477
10494
|
}
|
|
@@ -10479,7 +10496,7 @@ function Fo(n, e) {
|
|
|
10479
10496
|
const t = typeof e == "string" ? [e] : e;
|
|
10480
10497
|
return Object.keys(n).reduce((r, i) => (t.includes(i) || (r[i] = n[i]), r), {});
|
|
10481
10498
|
}
|
|
10482
|
-
const
|
|
10499
|
+
const Wh = (n, e) => ({ tr: t, state: r, dispatch: i }) => {
|
|
10483
10500
|
let s = null, o = null;
|
|
10484
10501
|
const l = ti(typeof n == "string" ? n : n.name, r.schema);
|
|
10485
10502
|
return l ? (l === "node" && (s = Y(n, r.schema)), l === "mark" && (o = bt(n, r.schema)), i && t.selection.ranges.forEach((a) => {
|
|
@@ -10489,10 +10506,10 @@ const jh = (n, e) => ({ tr: t, state: r, dispatch: i }) => {
|
|
|
10489
10506
|
});
|
|
10490
10507
|
});
|
|
10491
10508
|
}), !0) : !1;
|
|
10492
|
-
},
|
|
10509
|
+
}, qh = () => ({ tr: n, dispatch: e }) => (e && n.scrollIntoView(), !0), Kh = () => ({ tr: n, commands: e }) => e.setTextSelection({
|
|
10493
10510
|
from: 0,
|
|
10494
10511
|
to: n.doc.content.size
|
|
10495
|
-
}),
|
|
10512
|
+
}), Jh = () => ({ state: n, dispatch: e }) => Cf(n, e), _h = () => ({ state: n, dispatch: e }) => Tf(n, e), Uh = () => ({ state: n, dispatch: e }) => Bf(n, e), Gh = () => ({ state: n, dispatch: e }) => Vf(n, e), Yh = () => ({ state: n, dispatch: e }) => zf(n, e);
|
|
10496
10513
|
function Ui(n, e, t = {}, r = {}) {
|
|
10497
10514
|
return Fr(n, e, {
|
|
10498
10515
|
slice: !1,
|
|
@@ -10500,7 +10517,7 @@ function Ui(n, e, t = {}, r = {}) {
|
|
|
10500
10517
|
errorOnInvalidContent: r.errorOnInvalidContent
|
|
10501
10518
|
});
|
|
10502
10519
|
}
|
|
10503
|
-
const
|
|
10520
|
+
const Xh = (n, e = !1, t = {}, r = {}) => ({ editor: i, tr: s, dispatch: o, commands: l }) => {
|
|
10504
10521
|
var a, c;
|
|
10505
10522
|
const { doc: u } = s;
|
|
10506
10523
|
if (t.preserveWhitespace !== "full") {
|
|
@@ -10522,7 +10539,7 @@ function ni(n, e) {
|
|
|
10522
10539
|
const l = o.find((a) => a.type.name === t.name);
|
|
10523
10540
|
return l ? { ...l.attrs } : {};
|
|
10524
10541
|
}
|
|
10525
|
-
function
|
|
10542
|
+
function Zh(n) {
|
|
10526
10543
|
for (let e = 0; e < n.edgeCount; e += 1) {
|
|
10527
10544
|
const { type: t } = n.edge(e);
|
|
10528
10545
|
if (t.isTextblock && !t.hasRequiredAttrs())
|
|
@@ -10530,7 +10547,7 @@ function Xh(n) {
|
|
|
10530
10547
|
}
|
|
10531
10548
|
return null;
|
|
10532
10549
|
}
|
|
10533
|
-
function
|
|
10550
|
+
function Qh(n, e) {
|
|
10534
10551
|
for (let t = n.depth; t > 0; t -= 1) {
|
|
10535
10552
|
const r = n.node(t);
|
|
10536
10553
|
if (e(r))
|
|
@@ -10543,20 +10560,20 @@ function Zh(n, e) {
|
|
|
10543
10560
|
}
|
|
10544
10561
|
}
|
|
10545
10562
|
function ws(n) {
|
|
10546
|
-
return (e) =>
|
|
10563
|
+
return (e) => Qh(e.$from, n);
|
|
10547
10564
|
}
|
|
10548
|
-
function
|
|
10565
|
+
function ep(n, e) {
|
|
10549
10566
|
const t = $t.fromSchema(e).serializeFragment(n), i = document.implementation.createHTMLDocument().createElement("div");
|
|
10550
10567
|
return i.appendChild(t), i.innerHTML;
|
|
10551
10568
|
}
|
|
10552
|
-
function
|
|
10569
|
+
function tp(n, e) {
|
|
10553
10570
|
const t = {
|
|
10554
10571
|
from: 0,
|
|
10555
10572
|
to: n.content.size
|
|
10556
10573
|
};
|
|
10557
10574
|
return Ba(n, t, e);
|
|
10558
10575
|
}
|
|
10559
|
-
function
|
|
10576
|
+
function np(n, e) {
|
|
10560
10577
|
const t = Y(e, n.schema), { from: r, to: i } = n.selection, s = [];
|
|
10561
10578
|
n.doc.nodesBetween(r, i, (l) => {
|
|
10562
10579
|
s.push(l);
|
|
@@ -10564,9 +10581,9 @@ function tp(n, e) {
|
|
|
10564
10581
|
const o = s.reverse().find((l) => l.type.name === t.name);
|
|
10565
10582
|
return o ? { ...o.attrs } : {};
|
|
10566
10583
|
}
|
|
10567
|
-
function
|
|
10584
|
+
function rp(n, e) {
|
|
10568
10585
|
const t = ti(typeof e == "string" ? e : e.name, n.schema);
|
|
10569
|
-
return t === "node" ?
|
|
10586
|
+
return t === "node" ? np(n, e) : t === "mark" ? ni(n, e) : {};
|
|
10570
10587
|
}
|
|
10571
10588
|
function $a(n, e, t) {
|
|
10572
10589
|
const r = [];
|
|
@@ -10613,7 +10630,7 @@ function Gi(n, e, t = {}) {
|
|
|
10613
10630
|
const a = l.filter((d) => s ? s.name === d.mark.type.name : !0).filter((d) => Vr(d.mark.attrs, t, { strict: !1 })).reduce((d, f) => d + f.to - f.from, 0), c = l.filter((d) => s ? d.mark.type !== s && d.mark.type.excludes(s) : !0).reduce((d, f) => d + f.to - f.from, 0);
|
|
10614
10631
|
return (a > 0 ? a + c : a) >= o;
|
|
10615
10632
|
}
|
|
10616
|
-
function
|
|
10633
|
+
function ip(n, e, t = {}) {
|
|
10617
10634
|
if (!e)
|
|
10618
10635
|
return Hn(n, null, t) || Gi(n, null, t);
|
|
10619
10636
|
const r = ti(e, n.schema);
|
|
@@ -10671,7 +10688,7 @@ function Wa(n, e, t) {
|
|
|
10671
10688
|
toJSON: () => b
|
|
10672
10689
|
};
|
|
10673
10690
|
}
|
|
10674
|
-
function
|
|
10691
|
+
function sp(n, e, t) {
|
|
10675
10692
|
var r;
|
|
10676
10693
|
const { selection: i } = e;
|
|
10677
10694
|
let s = null;
|
|
@@ -10693,7 +10710,7 @@ function ip(n, e, t) {
|
|
|
10693
10710
|
}), c;
|
|
10694
10711
|
});
|
|
10695
10712
|
}
|
|
10696
|
-
const
|
|
10713
|
+
const op = (n, e = {}) => ({ tr: t, state: r, dispatch: i }) => {
|
|
10697
10714
|
const { selection: s } = t, { empty: o, ranges: l } = s, a = bt(n, r.schema);
|
|
10698
10715
|
if (i)
|
|
10699
10716
|
if (o) {
|
|
@@ -10715,25 +10732,25 @@ const sp = (n, e = {}) => ({ tr: t, state: r, dispatch: i }) => {
|
|
|
10715
10732
|
}) : t.addMark(p, m, a.create(e));
|
|
10716
10733
|
});
|
|
10717
10734
|
});
|
|
10718
|
-
return
|
|
10719
|
-
},
|
|
10735
|
+
return sp(r, t, a);
|
|
10736
|
+
}, lp = (n, e) => ({ tr: t }) => (t.setMeta(n, e), !0), ap = (n, e = {}) => ({ state: t, dispatch: r, chain: i }) => {
|
|
10720
10737
|
const s = Y(n, t.schema);
|
|
10721
10738
|
return s.isTextblock ? i().command(({ commands: o }) => Bo(s, e)(t) ? !0 : o.clearNodes()).command(({ state: o }) => Bo(s, e)(o, r)).run() : (console.warn('[tiptap warn]: Currently "setNode()" only supports text block nodes.'), !1);
|
|
10722
|
-
},
|
|
10739
|
+
}, cp = (n) => ({ tr: e, dispatch: t }) => {
|
|
10723
10740
|
if (t) {
|
|
10724
10741
|
const { doc: r } = e, i = Qe(n, 0, r.content.size), s = A.create(r, i);
|
|
10725
10742
|
e.setSelection(s);
|
|
10726
10743
|
}
|
|
10727
10744
|
return !0;
|
|
10728
|
-
},
|
|
10745
|
+
}, up = (n) => ({ tr: e, dispatch: t }) => {
|
|
10729
10746
|
if (t) {
|
|
10730
10747
|
const { doc: r } = e, { from: i, to: s } = typeof n == "number" ? { from: n, to: n } : n, o = D.atStart(r).from, l = D.atEnd(r).to, a = Qe(i, o, l), c = Qe(s, o, l), u = D.create(r, a, c);
|
|
10731
10748
|
e.setSelection(u);
|
|
10732
10749
|
}
|
|
10733
10750
|
return !0;
|
|
10734
|
-
},
|
|
10751
|
+
}, dp = (n) => ({ state: e, dispatch: t }) => {
|
|
10735
10752
|
const r = Y(n, e.schema);
|
|
10736
|
-
return
|
|
10753
|
+
return Kf(r)(e, t);
|
|
10737
10754
|
};
|
|
10738
10755
|
function Ho(n, e) {
|
|
10739
10756
|
const t = n.storedMarks || n.selection.$to.parentOffset && n.selection.$from.marks();
|
|
@@ -10742,13 +10759,13 @@ function Ho(n, e) {
|
|
|
10742
10759
|
n.tr.ensureMarks(r);
|
|
10743
10760
|
}
|
|
10744
10761
|
}
|
|
10745
|
-
const
|
|
10762
|
+
const fp = ({ keepMarks: n = !0 } = {}) => ({ tr: e, state: t, dispatch: r, editor: i }) => {
|
|
10746
10763
|
const { selection: s, doc: o } = e, { $from: l, $to: a } = s, c = i.extensionManager.attributes, u = Sr(c, l.node().type.name, l.node().attrs);
|
|
10747
10764
|
if (s instanceof A && s.node.isBlock)
|
|
10748
10765
|
return !l.parentOffset || !tn(o, l.pos) ? !1 : (r && (n && Ho(t, i.extensionManager.splittableMarks), e.split(l.pos).scrollIntoView()), !0);
|
|
10749
10766
|
if (!l.parent.isBlock)
|
|
10750
10767
|
return !1;
|
|
10751
|
-
const d = a.parentOffset === a.parent.content.size, f = l.depth === 0 ? void 0 :
|
|
10768
|
+
const d = a.parentOffset === a.parent.content.size, f = l.depth === 0 ? void 0 : Zh(l.node(-1).contentMatchAt(l.indexAfter(-1)));
|
|
10752
10769
|
let h = d && f ? [
|
|
10753
10770
|
{
|
|
10754
10771
|
type: f,
|
|
@@ -10768,7 +10785,7 @@ const dp = ({ keepMarks: n = !0 } = {}) => ({ tr: e, state: t, dispatch: r, edit
|
|
|
10768
10785
|
n && Ho(t, i.extensionManager.splittableMarks), e.scrollIntoView();
|
|
10769
10786
|
}
|
|
10770
10787
|
return p;
|
|
10771
|
-
},
|
|
10788
|
+
}, hp = (n, e = {}) => ({ tr: t, state: r, dispatch: i, editor: s }) => {
|
|
10772
10789
|
var o;
|
|
10773
10790
|
const l = Y(n, r.schema), { $from: a, $to: c } = r.selection, u = r.selection.node;
|
|
10774
10791
|
if (u && u.isBlock || a.depth < 2 || !a.sameParent(c))
|
|
@@ -10841,7 +10858,7 @@ const dp = ({ keepMarks: n = !0 } = {}) => ({ tr: e, state: t, dispatch: r, edit
|
|
|
10841
10858
|
return !0;
|
|
10842
10859
|
const i = n.doc.nodeAt(r);
|
|
10843
10860
|
return t.node.type === i?.type && gt(n.doc, r) && n.join(r), !0;
|
|
10844
|
-
},
|
|
10861
|
+
}, pp = (n, e, t, r = {}) => ({ editor: i, tr: s, state: o, dispatch: l, chain: a, commands: c, can: u }) => {
|
|
10845
10862
|
const { extensions: d, splittableMarks: f } = i.extensionManager, h = Y(n, o.schema), p = Y(e, o.schema), { selection: m, storedMarks: y } = o, { $from: b, $to: w } = m, M = b.blockRange(w), g = y || m.$to.parentOffset && m.$from.marks();
|
|
10846
10863
|
if (!M)
|
|
10847
10864
|
return !1;
|
|
@@ -10856,16 +10873,16 @@ const dp = ({ keepMarks: n = !0 } = {}) => ({ tr: e, state: t, dispatch: r, edit
|
|
|
10856
10873
|
const k = u().wrapInList(h, r), I = g.filter((B) => f.includes(B.type.name));
|
|
10857
10874
|
return s.ensureMarks(I), k ? !0 : c.clearNodes();
|
|
10858
10875
|
}).wrapInList(h, r).command(() => xi(s, h)).command(() => wi(s, h)).run();
|
|
10859
|
-
},
|
|
10876
|
+
}, mp = (n, e = {}, t = {}) => ({ state: r, commands: i }) => {
|
|
10860
10877
|
const { extendEmptyMarkRange: s = !1 } = t, o = bt(n, r.schema);
|
|
10861
10878
|
return Gi(r, o, e) ? i.unsetMark(o, { extendEmptyMarkRange: s }) : i.setMark(o, e);
|
|
10862
|
-
},
|
|
10879
|
+
}, gp = (n, e, t = {}) => ({ state: r, commands: i }) => {
|
|
10863
10880
|
const s = Y(n, r.schema), o = Y(e, r.schema);
|
|
10864
10881
|
return Hn(r, s, t) ? i.setNode(o) : i.setNode(s, t);
|
|
10865
|
-
},
|
|
10882
|
+
}, yp = (n, e = {}) => ({ state: t, commands: r }) => {
|
|
10866
10883
|
const i = Y(n, t.schema);
|
|
10867
10884
|
return Hn(t, i, e) ? r.lift(i) : r.wrapIn(i, e);
|
|
10868
|
-
},
|
|
10885
|
+
}, bp = () => ({ state: n, dispatch: e }) => {
|
|
10869
10886
|
const t = n.plugins;
|
|
10870
10887
|
for (let r = 0; r < t.length; r += 1) {
|
|
10871
10888
|
const i = t[r];
|
|
@@ -10885,12 +10902,12 @@ const dp = ({ keepMarks: n = !0 } = {}) => ({ tr: e, state: t, dispatch: r, edit
|
|
|
10885
10902
|
}
|
|
10886
10903
|
}
|
|
10887
10904
|
return !1;
|
|
10888
|
-
},
|
|
10905
|
+
}, vp = () => ({ tr: n, dispatch: e }) => {
|
|
10889
10906
|
const { selection: t } = n, { empty: r, ranges: i } = t;
|
|
10890
10907
|
return r || e && i.forEach((s) => {
|
|
10891
10908
|
n.removeMark(s.$from.pos, s.$to.pos);
|
|
10892
10909
|
}), !0;
|
|
10893
|
-
},
|
|
10910
|
+
}, kp = (n, e = {}) => ({ tr: t, state: r, dispatch: i }) => {
|
|
10894
10911
|
var s;
|
|
10895
10912
|
const { extendEmptyMarkRange: o = !1 } = e, { selection: l } = t, a = bt(n, r.schema), { $from: c, empty: u, ranges: d } = l;
|
|
10896
10913
|
if (!i)
|
|
@@ -10904,7 +10921,7 @@ const dp = ({ keepMarks: n = !0 } = {}) => ({ tr: e, state: t, dispatch: r, edit
|
|
|
10904
10921
|
t.removeMark(f.$from.pos, f.$to.pos, a);
|
|
10905
10922
|
});
|
|
10906
10923
|
return t.removeStoredMark(a), !0;
|
|
10907
|
-
},
|
|
10924
|
+
}, xp = (n, e = {}) => ({ tr: t, state: r, dispatch: i }) => {
|
|
10908
10925
|
let s = null, o = null;
|
|
10909
10926
|
const l = ti(typeof n == "string" ? n : n.name, r.schema);
|
|
10910
10927
|
return l ? (l === "node" && (s = Y(n, r.schema)), l === "mark" && (o = bt(n, r.schema)), i && t.selection.ranges.forEach((a) => {
|
|
@@ -10924,82 +10941,82 @@ const dp = ({ keepMarks: n = !0 } = {}) => ({ tr: e, state: t, dispatch: r, edit
|
|
|
10924
10941
|
});
|
|
10925
10942
|
});
|
|
10926
10943
|
}), !0) : !1;
|
|
10927
|
-
}, xp = (n, e = {}) => ({ state: t, dispatch: r }) => {
|
|
10928
|
-
const i = Y(n, t.schema);
|
|
10929
|
-
return Vf(i, e)(t, r);
|
|
10930
10944
|
}, wp = (n, e = {}) => ({ state: t, dispatch: r }) => {
|
|
10931
10945
|
const i = Y(n, t.schema);
|
|
10932
10946
|
return Ff(i, e)(t, r);
|
|
10947
|
+
}, Sp = (n, e = {}) => ({ state: t, dispatch: r }) => {
|
|
10948
|
+
const i = Y(n, t.schema);
|
|
10949
|
+
return $f(i, e)(t, r);
|
|
10933
10950
|
};
|
|
10934
|
-
var
|
|
10951
|
+
var Mp = /* @__PURE__ */ Object.freeze({
|
|
10935
10952
|
__proto__: null,
|
|
10936
|
-
blur:
|
|
10937
|
-
clearContent:
|
|
10938
|
-
clearNodes:
|
|
10939
|
-
command:
|
|
10940
|
-
createParagraphNear:
|
|
10941
|
-
cut:
|
|
10942
|
-
deleteCurrentNode:
|
|
10943
|
-
deleteNode:
|
|
10944
|
-
deleteRange:
|
|
10945
|
-
deleteSelection:
|
|
10946
|
-
enter:
|
|
10947
|
-
exitCode:
|
|
10948
|
-
extendMarkRange:
|
|
10949
|
-
first:
|
|
10950
|
-
focus:
|
|
10951
|
-
forEach:
|
|
10952
|
-
insertContent:
|
|
10953
|
-
insertContentAt:
|
|
10954
|
-
joinBackward:
|
|
10955
|
-
joinDown:
|
|
10956
|
-
joinForward:
|
|
10957
|
-
joinItemBackward:
|
|
10958
|
-
joinItemForward:
|
|
10959
|
-
joinTextblockBackward:
|
|
10960
|
-
joinTextblockForward:
|
|
10961
|
-
joinUp:
|
|
10962
|
-
keyboardShortcut:
|
|
10963
|
-
lift:
|
|
10964
|
-
liftEmptyBlock:
|
|
10965
|
-
liftListItem:
|
|
10966
|
-
newlineInCode:
|
|
10967
|
-
resetAttributes:
|
|
10968
|
-
scrollIntoView:
|
|
10969
|
-
selectAll:
|
|
10970
|
-
selectNodeBackward:
|
|
10971
|
-
selectNodeForward:
|
|
10972
|
-
selectParentNode:
|
|
10973
|
-
selectTextblockEnd:
|
|
10974
|
-
selectTextblockStart:
|
|
10975
|
-
setContent:
|
|
10976
|
-
setMark:
|
|
10977
|
-
setMeta:
|
|
10978
|
-
setNode:
|
|
10979
|
-
setNodeSelection:
|
|
10980
|
-
setTextSelection:
|
|
10981
|
-
sinkListItem:
|
|
10982
|
-
splitBlock:
|
|
10983
|
-
splitListItem:
|
|
10984
|
-
toggleList:
|
|
10985
|
-
toggleMark:
|
|
10986
|
-
toggleNode:
|
|
10987
|
-
toggleWrap:
|
|
10988
|
-
undoInputRule:
|
|
10989
|
-
unsetAllMarks:
|
|
10990
|
-
unsetMark:
|
|
10991
|
-
updateAttributes:
|
|
10992
|
-
wrapIn:
|
|
10993
|
-
wrapInList:
|
|
10953
|
+
blur: ah,
|
|
10954
|
+
clearContent: ch,
|
|
10955
|
+
clearNodes: uh,
|
|
10956
|
+
command: dh,
|
|
10957
|
+
createParagraphNear: fh,
|
|
10958
|
+
cut: hh,
|
|
10959
|
+
deleteCurrentNode: ph,
|
|
10960
|
+
deleteNode: mh,
|
|
10961
|
+
deleteRange: gh,
|
|
10962
|
+
deleteSelection: yh,
|
|
10963
|
+
enter: bh,
|
|
10964
|
+
exitCode: vh,
|
|
10965
|
+
extendMarkRange: xh,
|
|
10966
|
+
first: wh,
|
|
10967
|
+
focus: Sh,
|
|
10968
|
+
forEach: Mh,
|
|
10969
|
+
insertContent: Ch,
|
|
10970
|
+
insertContentAt: Eh,
|
|
10971
|
+
joinBackward: Dh,
|
|
10972
|
+
joinDown: Nh,
|
|
10973
|
+
joinForward: Ih,
|
|
10974
|
+
joinItemBackward: Rh,
|
|
10975
|
+
joinItemForward: Ph,
|
|
10976
|
+
joinTextblockBackward: Bh,
|
|
10977
|
+
joinTextblockForward: Lh,
|
|
10978
|
+
joinUp: Ah,
|
|
10979
|
+
keyboardShortcut: Vh,
|
|
10980
|
+
lift: Fh,
|
|
10981
|
+
liftEmptyBlock: $h,
|
|
10982
|
+
liftListItem: Hh,
|
|
10983
|
+
newlineInCode: jh,
|
|
10984
|
+
resetAttributes: Wh,
|
|
10985
|
+
scrollIntoView: qh,
|
|
10986
|
+
selectAll: Kh,
|
|
10987
|
+
selectNodeBackward: Jh,
|
|
10988
|
+
selectNodeForward: _h,
|
|
10989
|
+
selectParentNode: Uh,
|
|
10990
|
+
selectTextblockEnd: Gh,
|
|
10991
|
+
selectTextblockStart: Yh,
|
|
10992
|
+
setContent: Xh,
|
|
10993
|
+
setMark: op,
|
|
10994
|
+
setMeta: lp,
|
|
10995
|
+
setNode: ap,
|
|
10996
|
+
setNodeSelection: cp,
|
|
10997
|
+
setTextSelection: up,
|
|
10998
|
+
sinkListItem: dp,
|
|
10999
|
+
splitBlock: fp,
|
|
11000
|
+
splitListItem: hp,
|
|
11001
|
+
toggleList: pp,
|
|
11002
|
+
toggleMark: mp,
|
|
11003
|
+
toggleNode: gp,
|
|
11004
|
+
toggleWrap: yp,
|
|
11005
|
+
undoInputRule: bp,
|
|
11006
|
+
unsetAllMarks: vp,
|
|
11007
|
+
unsetMark: kp,
|
|
11008
|
+
updateAttributes: xp,
|
|
11009
|
+
wrapIn: wp,
|
|
11010
|
+
wrapInList: Sp
|
|
10994
11011
|
});
|
|
10995
|
-
const
|
|
11012
|
+
const Cp = de.create({
|
|
10996
11013
|
name: "commands",
|
|
10997
11014
|
addCommands() {
|
|
10998
11015
|
return {
|
|
10999
|
-
...
|
|
11016
|
+
...Mp
|
|
11000
11017
|
};
|
|
11001
11018
|
}
|
|
11002
|
-
}),
|
|
11019
|
+
}), Op = de.create({
|
|
11003
11020
|
name: "editable",
|
|
11004
11021
|
addProseMirrorPlugins() {
|
|
11005
11022
|
return [
|
|
@@ -11011,7 +11028,7 @@ const Mp = de.create({
|
|
|
11011
11028
|
})
|
|
11012
11029
|
];
|
|
11013
11030
|
}
|
|
11014
|
-
}),
|
|
11031
|
+
}), Tp = de.create({
|
|
11015
11032
|
name: "focusEvents",
|
|
11016
11033
|
addProseMirrorPlugins() {
|
|
11017
11034
|
const { editor: n } = this;
|
|
@@ -11035,7 +11052,7 @@ const Mp = de.create({
|
|
|
11035
11052
|
})
|
|
11036
11053
|
];
|
|
11037
11054
|
}
|
|
11038
|
-
}),
|
|
11055
|
+
}), Ep = de.create({
|
|
11039
11056
|
name: "keymap",
|
|
11040
11057
|
addKeyboardShortcuts() {
|
|
11041
11058
|
const n = () => this.editor.commands.first(({ commands: o }) => [
|
|
@@ -11110,7 +11127,7 @@ const Mp = de.create({
|
|
|
11110
11127
|
})
|
|
11111
11128
|
];
|
|
11112
11129
|
}
|
|
11113
|
-
}),
|
|
11130
|
+
}), Ap = de.create({
|
|
11114
11131
|
name: "tabindex",
|
|
11115
11132
|
addProseMirrorPlugins() {
|
|
11116
11133
|
return [
|
|
@@ -11243,7 +11260,7 @@ class Ot {
|
|
|
11243
11260
|
this.editor.chain().setTextSelection(this.from).updateAttributes(this.node.type.name, e).setTextSelection(t.from).run();
|
|
11244
11261
|
}
|
|
11245
11262
|
}
|
|
11246
|
-
const
|
|
11263
|
+
const Np = `.ProseMirror {
|
|
11247
11264
|
position: relative;
|
|
11248
11265
|
}
|
|
11249
11266
|
|
|
@@ -11318,14 +11335,14 @@ img.ProseMirror-separator {
|
|
|
11318
11335
|
.tippy-box[data-animation=fade][data-state=hidden] {
|
|
11319
11336
|
opacity: 0
|
|
11320
11337
|
}`;
|
|
11321
|
-
function
|
|
11338
|
+
function Dp(n, e, t) {
|
|
11322
11339
|
const r = document.querySelector("style[data-tiptap-style]");
|
|
11323
11340
|
if (r !== null)
|
|
11324
11341
|
return r;
|
|
11325
11342
|
const i = document.createElement("style");
|
|
11326
11343
|
return e && i.setAttribute("nonce", e), i.setAttribute("data-tiptap-style", ""), i.innerHTML = n, document.getElementsByTagName("head")[0].appendChild(i), i;
|
|
11327
11344
|
}
|
|
11328
|
-
let
|
|
11345
|
+
let Ip = class extends Jf {
|
|
11329
11346
|
constructor(e = {}) {
|
|
11330
11347
|
super(), this.isFocused = !1, this.isInitialized = !1, this.extensionStorage = {}, this.options = {
|
|
11331
11348
|
element: document.createElement("div"),
|
|
@@ -11385,7 +11402,7 @@ let Dp = class extends Kf {
|
|
|
11385
11402
|
* Inject CSS styles.
|
|
11386
11403
|
*/
|
|
11387
11404
|
injectCSS() {
|
|
11388
|
-
this.options.injectCSS && document && (this.css = Np
|
|
11405
|
+
this.options.injectCSS && document && (this.css = Dp(Np, this.options.injectNonce));
|
|
11389
11406
|
}
|
|
11390
11407
|
/**
|
|
11391
11408
|
* Update editor options.
|
|
@@ -11446,14 +11463,14 @@ let Dp = class extends Kf {
|
|
|
11446
11463
|
createExtensionManager() {
|
|
11447
11464
|
var e, t;
|
|
11448
11465
|
const i = [...this.options.enableCoreExtensions ? [
|
|
11449
|
-
|
|
11450
|
-
|
|
11466
|
+
Op,
|
|
11467
|
+
lh.configure({
|
|
11451
11468
|
blockSeparator: (t = (e = this.options.coreExtensionOptions) === null || e === void 0 ? void 0 : e.clipboardTextSerializer) === null || t === void 0 ? void 0 : t.blockSeparator
|
|
11452
11469
|
}),
|
|
11453
|
-
|
|
11454
|
-
Op,
|
|
11470
|
+
Cp,
|
|
11455
11471
|
Tp,
|
|
11456
|
-
Ep
|
|
11472
|
+
Ep,
|
|
11473
|
+
Ap
|
|
11457
11474
|
] : [], ...this.options.extensions].filter((s) => ["extension", "node", "mark"].includes(s?.type));
|
|
11458
11475
|
this.extensionManager = new Qt(i, this);
|
|
11459
11476
|
}
|
|
@@ -11490,7 +11507,7 @@ let Dp = class extends Kf {
|
|
|
11490
11507
|
}), e = Ui(this.options.content, this.schema, this.options.parseOptions, { errorOnInvalidContent: !1 });
|
|
11491
11508
|
}
|
|
11492
11509
|
const t = za(e, this.options.autofocus);
|
|
11493
|
-
this.view = new
|
|
11510
|
+
this.view = new df(this.options.element, {
|
|
11494
11511
|
...this.options.editorProps,
|
|
11495
11512
|
dispatchTransaction: this.dispatchTransaction.bind(this),
|
|
11496
11513
|
state: Zt.create({
|
|
@@ -11573,11 +11590,11 @@ let Dp = class extends Kf {
|
|
|
11573
11590
|
* Get attributes of the currently selected node or mark.
|
|
11574
11591
|
*/
|
|
11575
11592
|
getAttributes(e) {
|
|
11576
|
-
return
|
|
11593
|
+
return rp(this.state, e);
|
|
11577
11594
|
}
|
|
11578
11595
|
isActive(e, t) {
|
|
11579
11596
|
const r = typeof e == "string" ? e : null, i = typeof e == "string" ? t : e;
|
|
11580
|
-
return
|
|
11597
|
+
return ip(this.state, r, i);
|
|
11581
11598
|
}
|
|
11582
11599
|
/**
|
|
11583
11600
|
* Get the document as JSON.
|
|
@@ -11589,7 +11606,7 @@ let Dp = class extends Kf {
|
|
|
11589
11606
|
* Get the document as HTML.
|
|
11590
11607
|
*/
|
|
11591
11608
|
getHTML() {
|
|
11592
|
-
return
|
|
11609
|
+
return ep(this.state.doc.content, this.schema);
|
|
11593
11610
|
}
|
|
11594
11611
|
/**
|
|
11595
11612
|
* Get the document as text.
|
|
@@ -11598,7 +11615,7 @@ let Dp = class extends Kf {
|
|
|
11598
11615
|
const { blockSeparator: t = `
|
|
11599
11616
|
|
|
11600
11617
|
`, textSerializers: r = {} } = e || {};
|
|
11601
|
-
return
|
|
11618
|
+
return tp(this.state.doc, {
|
|
11602
11619
|
blockSeparator: t,
|
|
11603
11620
|
textSerializers: {
|
|
11604
11621
|
...La(this.schema),
|
|
@@ -11668,7 +11685,7 @@ function cn(n) {
|
|
|
11668
11685
|
}
|
|
11669
11686
|
});
|
|
11670
11687
|
}
|
|
11671
|
-
function
|
|
11688
|
+
function Rp(n) {
|
|
11672
11689
|
return new Qr({
|
|
11673
11690
|
find: n.find,
|
|
11674
11691
|
handler: ({ state: e, range: t, match: r }) => {
|
|
@@ -11805,7 +11822,7 @@ class se {
|
|
|
11805
11822
|
}
|
|
11806
11823
|
}
|
|
11807
11824
|
function un(n) {
|
|
11808
|
-
return new
|
|
11825
|
+
return new eh({
|
|
11809
11826
|
find: n.find,
|
|
11810
11827
|
handler: ({ state: e, range: t, match: r, pasteEvent: i }) => {
|
|
11811
11828
|
const s = P(n.getAttributes, void 0, r, i);
|
|
@@ -11822,11 +11839,11 @@ function un(n) {
|
|
|
11822
11839
|
}
|
|
11823
11840
|
});
|
|
11824
11841
|
}
|
|
11825
|
-
var he = "top",
|
|
11842
|
+
var he = "top", Te = "bottom", Ee = "right", pe = "left", Ss = "auto", Zn = [he, Te, Ee, pe], dn = "start", Wn = "end", Pp = "clippingParents", qa = "viewport", Mn = "popper", Bp = "reference", jo = /* @__PURE__ */ Zn.reduce(function(n, e) {
|
|
11826
11843
|
return n.concat([e + "-" + dn, e + "-" + Wn]);
|
|
11827
11844
|
}, []), Ka = /* @__PURE__ */ [].concat(Zn, [Ss]).reduce(function(n, e) {
|
|
11828
11845
|
return n.concat([e, e + "-" + dn, e + "-" + Wn]);
|
|
11829
|
-
}, []),
|
|
11846
|
+
}, []), Lp = "beforeRead", zp = "read", Vp = "afterRead", Fp = "beforeMain", $p = "main", Hp = "afterMain", jp = "beforeWrite", Wp = "write", qp = "afterWrite", Kp = [Lp, zp, Vp, Fp, $p, Hp, jp, Wp, qp];
|
|
11830
11847
|
function qe(n) {
|
|
11831
11848
|
return n ? (n.nodeName || "").toLowerCase() : null;
|
|
11832
11849
|
}
|
|
@@ -11843,7 +11860,7 @@ function Ft(n) {
|
|
|
11843
11860
|
var e = ke(n).Element;
|
|
11844
11861
|
return n instanceof e || n instanceof Element;
|
|
11845
11862
|
}
|
|
11846
|
-
function
|
|
11863
|
+
function Oe(n) {
|
|
11847
11864
|
var e = ke(n).HTMLElement;
|
|
11848
11865
|
return n instanceof e || n instanceof HTMLElement;
|
|
11849
11866
|
}
|
|
@@ -11853,17 +11870,17 @@ function Ms(n) {
|
|
|
11853
11870
|
var e = ke(n).ShadowRoot;
|
|
11854
11871
|
return n instanceof e || n instanceof ShadowRoot;
|
|
11855
11872
|
}
|
|
11856
|
-
function
|
|
11873
|
+
function Jp(n) {
|
|
11857
11874
|
var e = n.state;
|
|
11858
11875
|
Object.keys(e.elements).forEach(function(t) {
|
|
11859
11876
|
var r = e.styles[t] || {}, i = e.attributes[t] || {}, s = e.elements[t];
|
|
11860
|
-
!
|
|
11877
|
+
!Oe(s) || !qe(s) || (Object.assign(s.style, r), Object.keys(i).forEach(function(o) {
|
|
11861
11878
|
var l = i[o];
|
|
11862
11879
|
l === !1 ? s.removeAttribute(o) : s.setAttribute(o, l === !0 ? "" : l);
|
|
11863
11880
|
}));
|
|
11864
11881
|
});
|
|
11865
11882
|
}
|
|
11866
|
-
function
|
|
11883
|
+
function _p(n) {
|
|
11867
11884
|
var e = n.state, t = {
|
|
11868
11885
|
popper: {
|
|
11869
11886
|
position: e.options.strategy,
|
|
@@ -11881,7 +11898,7 @@ function Jp(n) {
|
|
|
11881
11898
|
var i = e.elements[r], s = e.attributes[r] || {}, o = Object.keys(e.styles.hasOwnProperty(r) ? e.styles[r] : t[r]), l = o.reduce(function(a, c) {
|
|
11882
11899
|
return a[c] = "", a;
|
|
11883
11900
|
}, {});
|
|
11884
|
-
!
|
|
11901
|
+
!Oe(i) || !qe(i) || (Object.assign(i.style, l), Object.keys(s).forEach(function(a) {
|
|
11885
11902
|
i.removeAttribute(a);
|
|
11886
11903
|
}));
|
|
11887
11904
|
});
|
|
@@ -11891,8 +11908,8 @@ const Ja = {
|
|
|
11891
11908
|
name: "applyStyles",
|
|
11892
11909
|
enabled: !0,
|
|
11893
11910
|
phase: "write",
|
|
11894
|
-
fn:
|
|
11895
|
-
effect:
|
|
11911
|
+
fn: Jp,
|
|
11912
|
+
effect: _p,
|
|
11896
11913
|
requires: ["computeStyles"]
|
|
11897
11914
|
};
|
|
11898
11915
|
function $e(n) {
|
|
@@ -11911,7 +11928,7 @@ function _a() {
|
|
|
11911
11928
|
function hn(n, e, t) {
|
|
11912
11929
|
e === void 0 && (e = !1), t === void 0 && (t = !1);
|
|
11913
11930
|
var r = n.getBoundingClientRect(), i = 1, s = 1;
|
|
11914
|
-
e &&
|
|
11931
|
+
e && Oe(n) && (i = n.offsetWidth > 0 && fn(r.width) / n.offsetWidth || 1, s = n.offsetHeight > 0 && fn(r.height) / n.offsetHeight || 1);
|
|
11915
11932
|
var o = Ft(n) ? ke(n) : window, l = o.visualViewport, a = !_a() && t, c = (r.left + (a && l ? l.offsetLeft : 0)) / i, u = (r.top + (a && l ? l.offsetTop : 0)) / s, d = r.width / i, f = r.height / s;
|
|
11916
11933
|
return {
|
|
11917
11934
|
width: d,
|
|
@@ -11950,7 +11967,7 @@ function Ua(n, e) {
|
|
|
11950
11967
|
function tt(n) {
|
|
11951
11968
|
return ke(n).getComputedStyle(n);
|
|
11952
11969
|
}
|
|
11953
|
-
function
|
|
11970
|
+
function Up(n) {
|
|
11954
11971
|
return ["table", "td", "th"].indexOf(qe(n)) >= 0;
|
|
11955
11972
|
}
|
|
11956
11973
|
function vt(n) {
|
|
@@ -11972,18 +11989,18 @@ function ri(n) {
|
|
|
11972
11989
|
);
|
|
11973
11990
|
}
|
|
11974
11991
|
function Wo(n) {
|
|
11975
|
-
return !
|
|
11992
|
+
return !Oe(n) || // https://github.com/popperjs/popper-core/issues/837
|
|
11976
11993
|
tt(n).position === "fixed" ? null : n.offsetParent;
|
|
11977
11994
|
}
|
|
11978
|
-
function
|
|
11995
|
+
function Gp(n) {
|
|
11979
11996
|
var e = /firefox/i.test(Xi()), t = /Trident/i.test(Xi());
|
|
11980
|
-
if (t &&
|
|
11997
|
+
if (t && Oe(n)) {
|
|
11981
11998
|
var r = tt(n);
|
|
11982
11999
|
if (r.position === "fixed")
|
|
11983
12000
|
return null;
|
|
11984
12001
|
}
|
|
11985
12002
|
var i = ri(n);
|
|
11986
|
-
for (Ms(i) && (i = i.host);
|
|
12003
|
+
for (Ms(i) && (i = i.host); Oe(i) && ["html", "body"].indexOf(qe(i)) < 0; ) {
|
|
11987
12004
|
var s = tt(i);
|
|
11988
12005
|
if (s.transform !== "none" || s.perspective !== "none" || s.contain === "paint" || ["transform", "perspective"].indexOf(s.willChange) !== -1 || e && s.willChange === "filter" || e && s.filter && s.filter !== "none")
|
|
11989
12006
|
return i;
|
|
@@ -11992,9 +12009,9 @@ function Up(n) {
|
|
|
11992
12009
|
return null;
|
|
11993
12010
|
}
|
|
11994
12011
|
function Qn(n) {
|
|
11995
|
-
for (var e = ke(n), t = Wo(n); t &&
|
|
12012
|
+
for (var e = ke(n), t = Wo(n); t && Up(t) && tt(t).position === "static"; )
|
|
11996
12013
|
t = Wo(t);
|
|
11997
|
-
return t && (qe(t) === "html" || qe(t) === "body" && tt(t).position === "static") ? e : t ||
|
|
12014
|
+
return t && (qe(t) === "html" || qe(t) === "body" && tt(t).position === "static") ? e : t || Gp(n) || e;
|
|
11998
12015
|
}
|
|
11999
12016
|
function Os(n) {
|
|
12000
12017
|
return ["top", "bottom"].indexOf(n) >= 0 ? "x" : "y";
|
|
@@ -12002,7 +12019,7 @@ function Os(n) {
|
|
|
12002
12019
|
function In(n, e, t) {
|
|
12003
12020
|
return Pt(n, $r(e, t));
|
|
12004
12021
|
}
|
|
12005
|
-
function
|
|
12022
|
+
function Yp(n, e, t) {
|
|
12006
12023
|
var r = In(n, e, t);
|
|
12007
12024
|
return r > t ? t : r;
|
|
12008
12025
|
}
|
|
@@ -12022,41 +12039,41 @@ function Xa(n, e) {
|
|
|
12022
12039
|
return t[r] = n, t;
|
|
12023
12040
|
}, {});
|
|
12024
12041
|
}
|
|
12025
|
-
var
|
|
12042
|
+
var Xp = function(e, t) {
|
|
12026
12043
|
return e = typeof e == "function" ? e(Object.assign({}, t.rects, {
|
|
12027
12044
|
placement: t.placement
|
|
12028
12045
|
})) : e, Ya(typeof e != "number" ? e : Xa(e, Zn));
|
|
12029
12046
|
};
|
|
12030
|
-
function
|
|
12031
|
-
var e, t = n.state, r = n.name, i = n.options, s = t.elements.arrow, o = t.modifiersData.popperOffsets, l = $e(t.placement), a = Os(l), c = [pe,
|
|
12047
|
+
function Zp(n) {
|
|
12048
|
+
var e, t = n.state, r = n.name, i = n.options, s = t.elements.arrow, o = t.modifiersData.popperOffsets, l = $e(t.placement), a = Os(l), c = [pe, Ee].indexOf(l) >= 0, u = c ? "height" : "width";
|
|
12032
12049
|
if (!(!s || !o)) {
|
|
12033
|
-
var d =
|
|
12050
|
+
var d = Xp(i.padding, t), f = Cs(s), h = a === "y" ? he : pe, p = a === "y" ? Te : Ee, m = t.rects.reference[u] + t.rects.reference[a] - o[a] - t.rects.popper[u], y = o[a] - t.rects.reference[a], b = Qn(s), w = b ? a === "y" ? b.clientHeight || 0 : b.clientWidth || 0 : 0, M = m / 2 - y / 2, g = d[h], T = w - f[u] - d[p], k = w / 2 - f[u] / 2 + M, I = In(g, k, T), B = a;
|
|
12034
12051
|
t.modifiersData[r] = (e = {}, e[B] = I, e.centerOffset = I - k, e);
|
|
12035
12052
|
}
|
|
12036
12053
|
}
|
|
12037
|
-
function
|
|
12054
|
+
function Qp(n) {
|
|
12038
12055
|
var e = n.state, t = n.options, r = t.element, i = r === void 0 ? "[data-popper-arrow]" : r;
|
|
12039
12056
|
i != null && (typeof i == "string" && (i = e.elements.popper.querySelector(i), !i) || Ua(e.elements.popper, i) && (e.elements.arrow = i));
|
|
12040
12057
|
}
|
|
12041
|
-
const
|
|
12058
|
+
const em = {
|
|
12042
12059
|
name: "arrow",
|
|
12043
12060
|
enabled: !0,
|
|
12044
12061
|
phase: "main",
|
|
12045
|
-
fn:
|
|
12046
|
-
effect:
|
|
12062
|
+
fn: Zp,
|
|
12063
|
+
effect: Qp,
|
|
12047
12064
|
requires: ["popperOffsets"],
|
|
12048
12065
|
requiresIfExists: ["preventOverflow"]
|
|
12049
12066
|
};
|
|
12050
12067
|
function pn(n) {
|
|
12051
12068
|
return n.split("-")[1];
|
|
12052
12069
|
}
|
|
12053
|
-
var
|
|
12070
|
+
var tm = {
|
|
12054
12071
|
top: "auto",
|
|
12055
12072
|
right: "auto",
|
|
12056
12073
|
bottom: "auto",
|
|
12057
12074
|
left: "auto"
|
|
12058
12075
|
};
|
|
12059
|
-
function
|
|
12076
|
+
function nm(n, e) {
|
|
12060
12077
|
var t = n.x, r = n.y, i = e.devicePixelRatio || 1;
|
|
12061
12078
|
return {
|
|
12062
12079
|
x: fn(t * i) / i || 0,
|
|
@@ -12075,16 +12092,16 @@ function qo(n) {
|
|
|
12075
12092
|
var b = o.hasOwnProperty("x"), w = o.hasOwnProperty("y"), M = pe, g = he, T = window;
|
|
12076
12093
|
if (c) {
|
|
12077
12094
|
var k = Qn(t), I = "clientHeight", B = "clientWidth";
|
|
12078
|
-
if (k === ke(t) && (k = vt(t), tt(k).position !== "static" && l === "absolute" && (I = "scrollHeight", B = "scrollWidth")), k = k, i === he || (i === pe || i ===
|
|
12079
|
-
g =
|
|
12095
|
+
if (k === ke(t) && (k = vt(t), tt(k).position !== "static" && l === "absolute" && (I = "scrollHeight", B = "scrollWidth")), k = k, i === he || (i === pe || i === Ee) && s === Wn) {
|
|
12096
|
+
g = Te;
|
|
12080
12097
|
var E = d && k === T && T.visualViewport ? T.visualViewport.height : (
|
|
12081
12098
|
// $FlowFixMe[prop-missing]
|
|
12082
12099
|
k[I]
|
|
12083
12100
|
);
|
|
12084
12101
|
m -= E - r.height, m *= a ? 1 : -1;
|
|
12085
12102
|
}
|
|
12086
|
-
if (i === pe || (i === he || i ===
|
|
12087
|
-
M =
|
|
12103
|
+
if (i === pe || (i === he || i === Te) && s === Wn) {
|
|
12104
|
+
M = Ee;
|
|
12088
12105
|
var z = d && k === T && T.visualViewport ? T.visualViewport.width : (
|
|
12089
12106
|
// $FlowFixMe[prop-missing]
|
|
12090
12107
|
k[B]
|
|
@@ -12094,7 +12111,7 @@ function qo(n) {
|
|
|
12094
12111
|
}
|
|
12095
12112
|
var $ = Object.assign({
|
|
12096
12113
|
position: l
|
|
12097
|
-
}, c &&
|
|
12114
|
+
}, c && tm), H = u === !0 ? nm({
|
|
12098
12115
|
x: h,
|
|
12099
12116
|
y: m
|
|
12100
12117
|
}, ke(t)) : {
|
|
@@ -12107,7 +12124,7 @@ function qo(n) {
|
|
|
12107
12124
|
}
|
|
12108
12125
|
return Object.assign({}, $, (e = {}, e[g] = w ? m + "px" : "", e[M] = b ? h + "px" : "", e.transform = "", e));
|
|
12109
12126
|
}
|
|
12110
|
-
function
|
|
12127
|
+
function rm(n) {
|
|
12111
12128
|
var e = n.state, t = n.options, r = t.gpuAcceleration, i = r === void 0 ? !0 : r, s = t.adaptive, o = s === void 0 ? !0 : s, l = t.roundOffsets, a = l === void 0 ? !0 : l, c = {
|
|
12112
12129
|
placement: $e(e.placement),
|
|
12113
12130
|
variation: pn(e.placement),
|
|
@@ -12130,17 +12147,17 @@ function nm(n) {
|
|
|
12130
12147
|
"data-popper-placement": e.placement
|
|
12131
12148
|
});
|
|
12132
12149
|
}
|
|
12133
|
-
const
|
|
12150
|
+
const im = {
|
|
12134
12151
|
name: "computeStyles",
|
|
12135
12152
|
enabled: !0,
|
|
12136
12153
|
phase: "beforeWrite",
|
|
12137
|
-
fn:
|
|
12154
|
+
fn: rm,
|
|
12138
12155
|
data: {}
|
|
12139
12156
|
};
|
|
12140
12157
|
var br = {
|
|
12141
12158
|
passive: !0
|
|
12142
12159
|
};
|
|
12143
|
-
function
|
|
12160
|
+
function sm(n) {
|
|
12144
12161
|
var e = n.state, t = n.instance, r = n.options, i = r.scroll, s = i === void 0 ? !0 : i, o = r.resize, l = o === void 0 ? !0 : o, a = ke(e.elements.popper), c = [].concat(e.scrollParents.reference, e.scrollParents.popper);
|
|
12145
12162
|
return s && c.forEach(function(u) {
|
|
12146
12163
|
u.addEventListener("scroll", t.update, br);
|
|
@@ -12150,16 +12167,16 @@ function im(n) {
|
|
|
12150
12167
|
}), l && a.removeEventListener("resize", t.update, br);
|
|
12151
12168
|
};
|
|
12152
12169
|
}
|
|
12153
|
-
const
|
|
12170
|
+
const om = {
|
|
12154
12171
|
name: "eventListeners",
|
|
12155
12172
|
enabled: !0,
|
|
12156
12173
|
phase: "write",
|
|
12157
12174
|
fn: function() {
|
|
12158
12175
|
},
|
|
12159
|
-
effect:
|
|
12176
|
+
effect: sm,
|
|
12160
12177
|
data: {}
|
|
12161
12178
|
};
|
|
12162
|
-
var
|
|
12179
|
+
var lm = {
|
|
12163
12180
|
left: "right",
|
|
12164
12181
|
right: "left",
|
|
12165
12182
|
bottom: "top",
|
|
@@ -12167,16 +12184,16 @@ var om = {
|
|
|
12167
12184
|
};
|
|
12168
12185
|
function Mr(n) {
|
|
12169
12186
|
return n.replace(/left|right|bottom|top/g, function(e) {
|
|
12170
|
-
return
|
|
12187
|
+
return lm[e];
|
|
12171
12188
|
});
|
|
12172
12189
|
}
|
|
12173
|
-
var
|
|
12190
|
+
var am = {
|
|
12174
12191
|
start: "end",
|
|
12175
12192
|
end: "start"
|
|
12176
12193
|
};
|
|
12177
12194
|
function Ko(n) {
|
|
12178
12195
|
return n.replace(/start|end/g, function(e) {
|
|
12179
|
-
return
|
|
12196
|
+
return am[e];
|
|
12180
12197
|
});
|
|
12181
12198
|
}
|
|
12182
12199
|
function Ts(n) {
|
|
@@ -12189,7 +12206,7 @@ function Ts(n) {
|
|
|
12189
12206
|
function Es(n) {
|
|
12190
12207
|
return hn(vt(n)).left + Ts(n).scrollLeft;
|
|
12191
12208
|
}
|
|
12192
|
-
function
|
|
12209
|
+
function cm(n, e) {
|
|
12193
12210
|
var t = ke(n), r = vt(n), i = t.visualViewport, s = r.clientWidth, o = r.clientHeight, l = 0, a = 0;
|
|
12194
12211
|
if (i) {
|
|
12195
12212
|
s = i.width, o = i.height;
|
|
@@ -12203,7 +12220,7 @@ function am(n, e) {
|
|
|
12203
12220
|
y: a
|
|
12204
12221
|
};
|
|
12205
12222
|
}
|
|
12206
|
-
function
|
|
12223
|
+
function um(n) {
|
|
12207
12224
|
var e, t = vt(n), r = Ts(n), i = (e = n.ownerDocument) == null ? void 0 : e.body, s = Pt(t.scrollWidth, t.clientWidth, i ? i.scrollWidth : 0, i ? i.clientWidth : 0), o = Pt(t.scrollHeight, t.clientHeight, i ? i.scrollHeight : 0, i ? i.clientHeight : 0), l = -r.scrollLeft + Es(n), a = -r.scrollTop;
|
|
12208
12225
|
return tt(i || t).direction === "rtl" && (l += Pt(t.clientWidth, i ? i.clientWidth : 0) - s), {
|
|
12209
12226
|
width: s,
|
|
@@ -12217,7 +12234,7 @@ function As(n) {
|
|
|
12217
12234
|
return /auto|scroll|overlay|hidden/.test(t + i + r);
|
|
12218
12235
|
}
|
|
12219
12236
|
function Za(n) {
|
|
12220
|
-
return ["html", "body", "#document"].indexOf(qe(n)) >= 0 ? n.ownerDocument.body :
|
|
12237
|
+
return ["html", "body", "#document"].indexOf(qe(n)) >= 0 ? n.ownerDocument.body : Oe(n) && As(n) ? n : Za(ri(n));
|
|
12221
12238
|
}
|
|
12222
12239
|
function Rn(n, e) {
|
|
12223
12240
|
var t;
|
|
@@ -12236,21 +12253,21 @@ function Zi(n) {
|
|
|
12236
12253
|
bottom: n.y + n.height
|
|
12237
12254
|
});
|
|
12238
12255
|
}
|
|
12239
|
-
function
|
|
12256
|
+
function dm(n, e) {
|
|
12240
12257
|
var t = hn(n, !1, e === "fixed");
|
|
12241
12258
|
return t.top = t.top + n.clientTop, t.left = t.left + n.clientLeft, t.bottom = t.top + n.clientHeight, t.right = t.left + n.clientWidth, t.width = n.clientWidth, t.height = n.clientHeight, t.x = t.left, t.y = t.top, t;
|
|
12242
12259
|
}
|
|
12243
12260
|
function Jo(n, e, t) {
|
|
12244
|
-
return e === qa ? Zi(
|
|
12261
|
+
return e === qa ? Zi(cm(n, t)) : Ft(e) ? dm(e, t) : Zi(um(vt(n)));
|
|
12245
12262
|
}
|
|
12246
|
-
function
|
|
12247
|
-
var e = Rn(ri(n)), t = ["absolute", "fixed"].indexOf(tt(n).position) >= 0, r = t &&
|
|
12263
|
+
function fm(n) {
|
|
12264
|
+
var e = Rn(ri(n)), t = ["absolute", "fixed"].indexOf(tt(n).position) >= 0, r = t && Oe(n) ? Qn(n) : n;
|
|
12248
12265
|
return Ft(r) ? e.filter(function(i) {
|
|
12249
12266
|
return Ft(i) && Ua(i, r) && qe(i) !== "body";
|
|
12250
12267
|
}) : [];
|
|
12251
12268
|
}
|
|
12252
|
-
function
|
|
12253
|
-
var i = e === "clippingParents" ?
|
|
12269
|
+
function hm(n, e, t, r) {
|
|
12270
|
+
var i = e === "clippingParents" ? fm(n) : [].concat(e), s = [].concat(i, [t]), o = s[0], l = s.reduce(function(a, c) {
|
|
12254
12271
|
var u = Jo(n, c, r);
|
|
12255
12272
|
return a.top = Pt(u.top, a.top), a.right = $r(u.right, a.right), a.bottom = $r(u.bottom, a.bottom), a.left = Pt(u.left, a.left), a;
|
|
12256
12273
|
}, Jo(n, o, r));
|
|
@@ -12265,13 +12282,13 @@ function Qa(n) {
|
|
|
12265
12282
|
y: e.y - t.height
|
|
12266
12283
|
};
|
|
12267
12284
|
break;
|
|
12268
|
-
case
|
|
12285
|
+
case Te:
|
|
12269
12286
|
a = {
|
|
12270
12287
|
x: o,
|
|
12271
12288
|
y: e.y + e.height
|
|
12272
12289
|
};
|
|
12273
12290
|
break;
|
|
12274
|
-
case
|
|
12291
|
+
case Ee:
|
|
12275
12292
|
a = {
|
|
12276
12293
|
x: e.x + e.width,
|
|
12277
12294
|
y: l
|
|
@@ -12305,7 +12322,7 @@ function Qa(n) {
|
|
|
12305
12322
|
}
|
|
12306
12323
|
function qn(n, e) {
|
|
12307
12324
|
e === void 0 && (e = {});
|
|
12308
|
-
var t = e, r = t.placement, i = r === void 0 ? n.placement : r, s = t.strategy, o = s === void 0 ? n.strategy : s, l = t.boundary, a = l === void 0 ?
|
|
12325
|
+
var t = e, r = t.placement, i = r === void 0 ? n.placement : r, s = t.strategy, o = s === void 0 ? n.strategy : s, l = t.boundary, a = l === void 0 ? Pp : l, c = t.rootBoundary, u = c === void 0 ? qa : c, d = t.elementContext, f = d === void 0 ? Mn : d, h = t.altBoundary, p = h === void 0 ? !1 : h, m = t.padding, y = m === void 0 ? 0 : m, b = Ya(typeof y != "number" ? y : Xa(y, Zn)), w = f === Mn ? Bp : Mn, M = n.rects.popper, g = n.elements[p ? w : f], T = hm(Ft(g) ? g : g.contextElement || vt(n.elements.popper), a, u, o), k = hn(n.elements.reference), I = Qa({
|
|
12309
12326
|
reference: k,
|
|
12310
12327
|
element: M,
|
|
12311
12328
|
strategy: "absolute",
|
|
@@ -12319,13 +12336,13 @@ function qn(n, e) {
|
|
|
12319
12336
|
if (f === Mn && $) {
|
|
12320
12337
|
var H = $[i];
|
|
12321
12338
|
Object.keys(z).forEach(function(j) {
|
|
12322
|
-
var ge = [
|
|
12339
|
+
var ge = [Ee, Te].indexOf(j) >= 0 ? 1 : -1, ye = [he, Te].indexOf(j) >= 0 ? "y" : "x";
|
|
12323
12340
|
z[j] += H[ye] * ge;
|
|
12324
12341
|
});
|
|
12325
12342
|
}
|
|
12326
12343
|
return z;
|
|
12327
12344
|
}
|
|
12328
|
-
function
|
|
12345
|
+
function pm(n, e) {
|
|
12329
12346
|
e === void 0 && (e = {});
|
|
12330
12347
|
var t = e, r = t.placement, i = t.boundary, s = t.rootBoundary, o = t.padding, l = t.flipVariations, a = t.allowedAutoPlacements, c = a === void 0 ? Ka : a, u = pn(r), d = u ? l ? jo : jo.filter(function(p) {
|
|
12331
12348
|
return pn(p) === u;
|
|
@@ -12345,65 +12362,65 @@ function hm(n, e) {
|
|
|
12345
12362
|
return h[p] - h[m];
|
|
12346
12363
|
});
|
|
12347
12364
|
}
|
|
12348
|
-
function
|
|
12365
|
+
function mm(n) {
|
|
12349
12366
|
if ($e(n) === Ss)
|
|
12350
12367
|
return [];
|
|
12351
12368
|
var e = Mr(n);
|
|
12352
12369
|
return [Ko(n), e, Ko(e)];
|
|
12353
12370
|
}
|
|
12354
|
-
function
|
|
12371
|
+
function gm(n) {
|
|
12355
12372
|
var e = n.state, t = n.options, r = n.name;
|
|
12356
12373
|
if (!e.modifiersData[r]._skip) {
|
|
12357
|
-
for (var i = t.mainAxis, s = i === void 0 ? !0 : i, o = t.altAxis, l = o === void 0 ? !0 : o, a = t.fallbackPlacements, c = t.padding, u = t.boundary, d = t.rootBoundary, f = t.altBoundary, h = t.flipVariations, p = h === void 0 ? !0 : h, m = t.allowedAutoPlacements, y = e.options.placement, b = $e(y), w = b === y, M = a || (w || !p ? [Mr(y)] :
|
|
12358
|
-
return Je.concat($e(
|
|
12359
|
-
placement:
|
|
12374
|
+
for (var i = t.mainAxis, s = i === void 0 ? !0 : i, o = t.altAxis, l = o === void 0 ? !0 : o, a = t.fallbackPlacements, c = t.padding, u = t.boundary, d = t.rootBoundary, f = t.altBoundary, h = t.flipVariations, p = h === void 0 ? !0 : h, m = t.allowedAutoPlacements, y = e.options.placement, b = $e(y), w = b === y, M = a || (w || !p ? [Mr(y)] : mm(y)), g = [y].concat(M).reduce(function(Je, Ae) {
|
|
12375
|
+
return Je.concat($e(Ae) === Ss ? pm(e, {
|
|
12376
|
+
placement: Ae,
|
|
12360
12377
|
boundary: u,
|
|
12361
12378
|
rootBoundary: d,
|
|
12362
12379
|
padding: c,
|
|
12363
12380
|
flipVariations: p,
|
|
12364
12381
|
allowedAutoPlacements: m
|
|
12365
|
-
}) :
|
|
12382
|
+
}) : Ae);
|
|
12366
12383
|
}, []), T = e.rects.reference, k = e.rects.popper, I = /* @__PURE__ */ new Map(), B = !0, E = g[0], z = 0; z < g.length; z++) {
|
|
12367
|
-
var $ = g[z], H = $e($), j = pn($) === dn, ge = [he,
|
|
12384
|
+
var $ = g[z], H = $e($), j = pn($) === dn, ge = [he, Te].indexOf(H) >= 0, ye = ge ? "width" : "height", te = qn(e, {
|
|
12368
12385
|
placement: $,
|
|
12369
12386
|
boundary: u,
|
|
12370
12387
|
rootBoundary: d,
|
|
12371
12388
|
altBoundary: f,
|
|
12372
12389
|
padding: c
|
|
12373
|
-
}), ne = ge ? j ?
|
|
12390
|
+
}), ne = ge ? j ? Ee : pe : j ? Te : he;
|
|
12374
12391
|
T[ye] > k[ye] && (ne = Mr(ne));
|
|
12375
|
-
var X = Mr(ne),
|
|
12376
|
-
if (s &&
|
|
12392
|
+
var X = Mr(ne), Pe = [];
|
|
12393
|
+
if (s && Pe.push(te[H] <= 0), l && Pe.push(te[ne] <= 0, te[X] <= 0), Pe.every(function(Je) {
|
|
12377
12394
|
return Je;
|
|
12378
12395
|
})) {
|
|
12379
12396
|
E = $, B = !1;
|
|
12380
12397
|
break;
|
|
12381
12398
|
}
|
|
12382
|
-
I.set($,
|
|
12399
|
+
I.set($, Pe);
|
|
12383
12400
|
}
|
|
12384
12401
|
if (B)
|
|
12385
|
-
for (var
|
|
12402
|
+
for (var Be = p ? 3 : 1, kt = function(Ae) {
|
|
12386
12403
|
var _e = g.find(function(Ht) {
|
|
12387
12404
|
var Ue = I.get(Ht);
|
|
12388
12405
|
if (Ue)
|
|
12389
|
-
return Ue.slice(0,
|
|
12406
|
+
return Ue.slice(0, Ae).every(function(jt) {
|
|
12390
12407
|
return jt;
|
|
12391
12408
|
});
|
|
12392
12409
|
});
|
|
12393
12410
|
if (_e)
|
|
12394
12411
|
return E = _e, "break";
|
|
12395
|
-
},
|
|
12396
|
-
var xt = kt(
|
|
12412
|
+
}, Le = Be; Le > 0; Le--) {
|
|
12413
|
+
var xt = kt(Le);
|
|
12397
12414
|
if (xt === "break") break;
|
|
12398
12415
|
}
|
|
12399
12416
|
e.placement !== E && (e.modifiersData[r]._skip = !0, e.placement = E, e.reset = !0);
|
|
12400
12417
|
}
|
|
12401
12418
|
}
|
|
12402
|
-
const
|
|
12419
|
+
const ym = {
|
|
12403
12420
|
name: "flip",
|
|
12404
12421
|
enabled: !0,
|
|
12405
12422
|
phase: "main",
|
|
12406
|
-
fn:
|
|
12423
|
+
fn: gm,
|
|
12407
12424
|
requiresIfExists: ["offset"],
|
|
12408
12425
|
data: {
|
|
12409
12426
|
_skip: !1
|
|
@@ -12421,11 +12438,11 @@ function _o(n, e, t) {
|
|
|
12421
12438
|
};
|
|
12422
12439
|
}
|
|
12423
12440
|
function Uo(n) {
|
|
12424
|
-
return [he,
|
|
12441
|
+
return [he, Ee, Te, pe].some(function(e) {
|
|
12425
12442
|
return n[e] >= 0;
|
|
12426
12443
|
});
|
|
12427
12444
|
}
|
|
12428
|
-
function
|
|
12445
|
+
function bm(n) {
|
|
12429
12446
|
var e = n.state, t = n.name, r = e.rects.reference, i = e.rects.popper, s = e.modifiersData.preventOverflow, o = qn(e, {
|
|
12430
12447
|
elementContext: "reference"
|
|
12431
12448
|
}), l = qn(e, {
|
|
@@ -12441,18 +12458,18 @@ function ym(n) {
|
|
|
12441
12458
|
"data-popper-escaped": d
|
|
12442
12459
|
});
|
|
12443
12460
|
}
|
|
12444
|
-
const
|
|
12461
|
+
const vm = {
|
|
12445
12462
|
name: "hide",
|
|
12446
12463
|
enabled: !0,
|
|
12447
12464
|
phase: "main",
|
|
12448
12465
|
requiresIfExists: ["preventOverflow"],
|
|
12449
|
-
fn:
|
|
12466
|
+
fn: bm
|
|
12450
12467
|
};
|
|
12451
|
-
function
|
|
12468
|
+
function km(n, e, t) {
|
|
12452
12469
|
var r = $e(n), i = [pe, he].indexOf(r) >= 0 ? -1 : 1, s = typeof t == "function" ? t(Object.assign({}, e, {
|
|
12453
12470
|
placement: n
|
|
12454
12471
|
})) : t, o = s[0], l = s[1];
|
|
12455
|
-
return o = o || 0, l = (l || 0) * i, [pe,
|
|
12472
|
+
return o = o || 0, l = (l || 0) * i, [pe, Ee].indexOf(r) >= 0 ? {
|
|
12456
12473
|
x: l,
|
|
12457
12474
|
y: o
|
|
12458
12475
|
} : {
|
|
@@ -12460,20 +12477,20 @@ function vm(n, e, t) {
|
|
|
12460
12477
|
y: l
|
|
12461
12478
|
};
|
|
12462
12479
|
}
|
|
12463
|
-
function
|
|
12480
|
+
function xm(n) {
|
|
12464
12481
|
var e = n.state, t = n.options, r = n.name, i = t.offset, s = i === void 0 ? [0, 0] : i, o = Ka.reduce(function(u, d) {
|
|
12465
|
-
return u[d] =
|
|
12482
|
+
return u[d] = km(d, e.rects, s), u;
|
|
12466
12483
|
}, {}), l = o[e.placement], a = l.x, c = l.y;
|
|
12467
12484
|
e.modifiersData.popperOffsets != null && (e.modifiersData.popperOffsets.x += a, e.modifiersData.popperOffsets.y += c), e.modifiersData[r] = o;
|
|
12468
12485
|
}
|
|
12469
|
-
const
|
|
12486
|
+
const wm = {
|
|
12470
12487
|
name: "offset",
|
|
12471
12488
|
enabled: !0,
|
|
12472
12489
|
phase: "main",
|
|
12473
12490
|
requires: ["popperOffsets"],
|
|
12474
|
-
fn:
|
|
12491
|
+
fn: xm
|
|
12475
12492
|
};
|
|
12476
|
-
function
|
|
12493
|
+
function Sm(n) {
|
|
12477
12494
|
var e = n.state, t = n.name;
|
|
12478
12495
|
e.modifiersData[t] = Qa({
|
|
12479
12496
|
reference: e.rects.reference,
|
|
@@ -12482,23 +12499,23 @@ function wm(n) {
|
|
|
12482
12499
|
placement: e.placement
|
|
12483
12500
|
});
|
|
12484
12501
|
}
|
|
12485
|
-
const
|
|
12502
|
+
const Mm = {
|
|
12486
12503
|
name: "popperOffsets",
|
|
12487
12504
|
enabled: !0,
|
|
12488
12505
|
phase: "read",
|
|
12489
|
-
fn:
|
|
12506
|
+
fn: Sm,
|
|
12490
12507
|
data: {}
|
|
12491
12508
|
};
|
|
12492
|
-
function
|
|
12509
|
+
function Cm(n) {
|
|
12493
12510
|
return n === "x" ? "y" : "x";
|
|
12494
12511
|
}
|
|
12495
|
-
function
|
|
12512
|
+
function Om(n) {
|
|
12496
12513
|
var e = n.state, t = n.options, r = n.name, i = t.mainAxis, s = i === void 0 ? !0 : i, o = t.altAxis, l = o === void 0 ? !1 : o, a = t.boundary, c = t.rootBoundary, u = t.altBoundary, d = t.padding, f = t.tether, h = f === void 0 ? !0 : f, p = t.tetherOffset, m = p === void 0 ? 0 : p, y = qn(e, {
|
|
12497
12514
|
boundary: a,
|
|
12498
12515
|
rootBoundary: c,
|
|
12499
12516
|
padding: d,
|
|
12500
12517
|
altBoundary: u
|
|
12501
|
-
}), b = $e(e.placement), w = pn(e.placement), M = !w, g = Os(b), T =
|
|
12518
|
+
}), b = $e(e.placement), w = pn(e.placement), M = !w, g = Os(b), T = Cm(g), k = e.modifiersData.popperOffsets, I = e.rects.reference, B = e.rects.popper, E = typeof m == "function" ? m(Object.assign({}, e.rects, {
|
|
12502
12519
|
placement: e.placement
|
|
12503
12520
|
})) : m, z = typeof E == "number" ? {
|
|
12504
12521
|
mainAxis: E,
|
|
@@ -12512,42 +12529,42 @@ function Cm(n) {
|
|
|
12512
12529
|
};
|
|
12513
12530
|
if (k) {
|
|
12514
12531
|
if (s) {
|
|
12515
|
-
var j, ge = g === "y" ? he : pe, ye = g === "y" ?
|
|
12532
|
+
var j, ge = g === "y" ? he : pe, ye = g === "y" ? Te : Ee, te = g === "y" ? "height" : "width", ne = k[g], X = ne + y[ge], Pe = ne - y[ye], Be = h ? -B[te] / 2 : 0, kt = w === dn ? I[te] : B[te], Le = w === dn ? -B[te] : -I[te], xt = e.elements.arrow, Je = h && xt ? Cs(xt) : {
|
|
12516
12533
|
width: 0,
|
|
12517
12534
|
height: 0
|
|
12518
|
-
},
|
|
12535
|
+
}, Ae = e.modifiersData["arrow#persistent"] ? e.modifiersData["arrow#persistent"].padding : Ga(), _e = Ae[ge], Ht = Ae[ye], Ue = In(0, I[te], Je[te]), jt = M ? I[te] / 2 - Be - Ue - _e - z.mainAxis : kt - Ue - _e - z.mainAxis, nt = M ? -I[te] / 2 + Be + Ue + Ht + z.mainAxis : Le + Ue + Ht + z.mainAxis, Wt = e.elements.arrow && Qn(e.elements.arrow), er = Wt ? g === "y" ? Wt.clientTop || 0 : Wt.clientLeft || 0 : 0, bn = (j = $?.[g]) != null ? j : 0, tr = ne + jt - bn - er, nr = ne + nt - bn, vn = In(h ? $r(X, tr) : X, ne, h ? Pt(Pe, nr) : Pe);
|
|
12519
12536
|
k[g] = vn, H[g] = vn - ne;
|
|
12520
12537
|
}
|
|
12521
12538
|
if (l) {
|
|
12522
|
-
var kn, rr = g === "x" ? he : pe, ir = g === "x" ?
|
|
12539
|
+
var kn, rr = g === "x" ? he : pe, ir = g === "x" ? Te : Ee, Ge = k[T], rt = T === "y" ? "height" : "width", xn = Ge + y[rr], wt = Ge - y[ir], wn = [he, pe].indexOf(b) !== -1, sr = (kn = $?.[T]) != null ? kn : 0, or = wn ? xn : Ge - I[rt] - B[rt] - sr + z.altAxis, lr = wn ? Ge + I[rt] + B[rt] - sr - z.altAxis : wt, ar = h && wn ? Yp(or, Ge, lr) : In(h ? or : xn, Ge, h ? lr : wt);
|
|
12523
12540
|
k[T] = ar, H[T] = ar - Ge;
|
|
12524
12541
|
}
|
|
12525
12542
|
e.modifiersData[r] = H;
|
|
12526
12543
|
}
|
|
12527
12544
|
}
|
|
12528
|
-
const
|
|
12545
|
+
const Tm = {
|
|
12529
12546
|
name: "preventOverflow",
|
|
12530
12547
|
enabled: !0,
|
|
12531
12548
|
phase: "main",
|
|
12532
|
-
fn:
|
|
12549
|
+
fn: Om,
|
|
12533
12550
|
requiresIfExists: ["offset"]
|
|
12534
12551
|
};
|
|
12535
|
-
function
|
|
12552
|
+
function Em(n) {
|
|
12536
12553
|
return {
|
|
12537
12554
|
scrollLeft: n.scrollLeft,
|
|
12538
12555
|
scrollTop: n.scrollTop
|
|
12539
12556
|
};
|
|
12540
12557
|
}
|
|
12541
|
-
function Em(n) {
|
|
12542
|
-
return n === ke(n) || !Ce(n) ? Ts(n) : Tm(n);
|
|
12543
|
-
}
|
|
12544
12558
|
function Am(n) {
|
|
12559
|
+
return n === ke(n) || !Oe(n) ? Ts(n) : Em(n);
|
|
12560
|
+
}
|
|
12561
|
+
function Nm(n) {
|
|
12545
12562
|
var e = n.getBoundingClientRect(), t = fn(e.width) / n.offsetWidth || 1, r = fn(e.height) / n.offsetHeight || 1;
|
|
12546
12563
|
return t !== 1 || r !== 1;
|
|
12547
12564
|
}
|
|
12548
|
-
function
|
|
12565
|
+
function Dm(n, e, t) {
|
|
12549
12566
|
t === void 0 && (t = !1);
|
|
12550
|
-
var r =
|
|
12567
|
+
var r = Oe(e), i = Oe(e) && Nm(e), s = vt(e), o = hn(n, i, t), l = {
|
|
12551
12568
|
scrollLeft: 0,
|
|
12552
12569
|
scrollTop: 0
|
|
12553
12570
|
}, a = {
|
|
@@ -12555,14 +12572,14 @@ function Nm(n, e, t) {
|
|
|
12555
12572
|
y: 0
|
|
12556
12573
|
};
|
|
12557
12574
|
return (r || !r && !t) && ((qe(e) !== "body" || // https://github.com/popperjs/popper-core/issues/1078
|
|
12558
|
-
As(s)) && (l =
|
|
12575
|
+
As(s)) && (l = Am(e)), Oe(e) ? (a = hn(e, !0), a.x += e.clientLeft, a.y += e.clientTop) : s && (a.x = Es(s))), {
|
|
12559
12576
|
x: o.left + l.scrollLeft - a.x,
|
|
12560
12577
|
y: o.top + l.scrollTop - a.y,
|
|
12561
12578
|
width: o.width,
|
|
12562
12579
|
height: o.height
|
|
12563
12580
|
};
|
|
12564
12581
|
}
|
|
12565
|
-
function
|
|
12582
|
+
function Im(n) {
|
|
12566
12583
|
var e = /* @__PURE__ */ new Map(), t = /* @__PURE__ */ new Set(), r = [];
|
|
12567
12584
|
n.forEach(function(s) {
|
|
12568
12585
|
e.set(s.name, s);
|
|
@@ -12581,15 +12598,15 @@ function Dm(n) {
|
|
|
12581
12598
|
t.has(s.name) || i(s);
|
|
12582
12599
|
}), r;
|
|
12583
12600
|
}
|
|
12584
|
-
function
|
|
12585
|
-
var e =
|
|
12586
|
-
return
|
|
12601
|
+
function Rm(n) {
|
|
12602
|
+
var e = Im(n);
|
|
12603
|
+
return Kp.reduce(function(t, r) {
|
|
12587
12604
|
return t.concat(e.filter(function(i) {
|
|
12588
12605
|
return i.phase === r;
|
|
12589
12606
|
}));
|
|
12590
12607
|
}, []);
|
|
12591
12608
|
}
|
|
12592
|
-
function
|
|
12609
|
+
function Pm(n) {
|
|
12593
12610
|
var e;
|
|
12594
12611
|
return function() {
|
|
12595
12612
|
return e || (e = new Promise(function(t) {
|
|
@@ -12599,7 +12616,7 @@ function Rm(n) {
|
|
|
12599
12616
|
})), e;
|
|
12600
12617
|
};
|
|
12601
12618
|
}
|
|
12602
|
-
function
|
|
12619
|
+
function Bm(n) {
|
|
12603
12620
|
var e = n.reduce(function(t, r) {
|
|
12604
12621
|
var i = t[r.name];
|
|
12605
12622
|
return t[r.name] = i ? Object.assign({}, i, r, {
|
|
@@ -12623,7 +12640,7 @@ function Yo() {
|
|
|
12623
12640
|
return !(r && typeof r.getBoundingClientRect == "function");
|
|
12624
12641
|
});
|
|
12625
12642
|
}
|
|
12626
|
-
function
|
|
12643
|
+
function Lm(n) {
|
|
12627
12644
|
n === void 0 && (n = {});
|
|
12628
12645
|
var e = n, t = e.defaultModifiers, r = t === void 0 ? [] : t, i = e.defaultOptions, s = i === void 0 ? Go : i;
|
|
12629
12646
|
return function(l, a, c) {
|
|
@@ -12647,7 +12664,7 @@ function Bm(n) {
|
|
|
12647
12664
|
reference: Ft(l) ? Rn(l) : l.contextElement ? Rn(l.contextElement) : [],
|
|
12648
12665
|
popper: Rn(a)
|
|
12649
12666
|
};
|
|
12650
|
-
var M =
|
|
12667
|
+
var M = Rm(Bm([].concat(r, u.options.modifiers)));
|
|
12651
12668
|
return u.orderedModifiers = M.filter(function(g) {
|
|
12652
12669
|
return g.enabled;
|
|
12653
12670
|
}), p(), h.update();
|
|
@@ -12662,7 +12679,7 @@ function Bm(n) {
|
|
|
12662
12679
|
var b = u.elements, w = b.reference, M = b.popper;
|
|
12663
12680
|
if (Yo(w, M)) {
|
|
12664
12681
|
u.rects = {
|
|
12665
|
-
reference:
|
|
12682
|
+
reference: Dm(w, Qn(M), u.options.strategy === "fixed"),
|
|
12666
12683
|
popper: Cs(M)
|
|
12667
12684
|
}, u.reset = !1, u.placement = u.options.placement, u.orderedModifiers.forEach(function(z) {
|
|
12668
12685
|
return u.modifiersData[z.name] = Object.assign({}, z.data);
|
|
@@ -12685,7 +12702,7 @@ function Bm(n) {
|
|
|
12685
12702
|
},
|
|
12686
12703
|
// Async and optimistically optimized update – it will not be executed if
|
|
12687
12704
|
// not necessary (debounced to run at most once-per-tick)
|
|
12688
|
-
update:
|
|
12705
|
+
update: Pm(function() {
|
|
12689
12706
|
return new Promise(function(y) {
|
|
12690
12707
|
h.forceUpdate(), y(u);
|
|
12691
12708
|
});
|
|
@@ -12722,15 +12739,15 @@ function Bm(n) {
|
|
|
12722
12739
|
return h;
|
|
12723
12740
|
};
|
|
12724
12741
|
}
|
|
12725
|
-
var
|
|
12726
|
-
defaultModifiers:
|
|
12727
|
-
}),
|
|
12742
|
+
var zm = [om, Mm, im, Ja, wm, ym, Tm, em, vm], Vm = /* @__PURE__ */ Lm({
|
|
12743
|
+
defaultModifiers: zm
|
|
12744
|
+
}), Fm = "tippy-box", ec = "tippy-content", $m = "tippy-backdrop", tc = "tippy-arrow", nc = "tippy-svg-arrow", Mt = {
|
|
12728
12745
|
passive: !0,
|
|
12729
12746
|
capture: !0
|
|
12730
12747
|
}, rc = function() {
|
|
12731
12748
|
return document.body;
|
|
12732
12749
|
};
|
|
12733
|
-
function
|
|
12750
|
+
function Hm(n, e) {
|
|
12734
12751
|
return {}.hasOwnProperty.call(n, e);
|
|
12735
12752
|
}
|
|
12736
12753
|
function Si(n, e, t) {
|
|
@@ -12757,13 +12774,13 @@ function Xo(n, e) {
|
|
|
12757
12774
|
}, e);
|
|
12758
12775
|
};
|
|
12759
12776
|
}
|
|
12760
|
-
function
|
|
12777
|
+
function jm(n, e) {
|
|
12761
12778
|
var t = Object.assign({}, n);
|
|
12762
12779
|
return e.forEach(function(r) {
|
|
12763
12780
|
delete t[r];
|
|
12764
12781
|
}), t;
|
|
12765
12782
|
}
|
|
12766
|
-
function
|
|
12783
|
+
function Wm(n) {
|
|
12767
12784
|
return n.split(/\s+/).filter(Boolean);
|
|
12768
12785
|
}
|
|
12769
12786
|
function Xt(n) {
|
|
@@ -12772,12 +12789,12 @@ function Xt(n) {
|
|
|
12772
12789
|
function Zo(n, e) {
|
|
12773
12790
|
n.indexOf(e) === -1 && n.push(e);
|
|
12774
12791
|
}
|
|
12775
|
-
function
|
|
12792
|
+
function qm(n) {
|
|
12776
12793
|
return n.filter(function(e, t) {
|
|
12777
12794
|
return n.indexOf(e) === t;
|
|
12778
12795
|
});
|
|
12779
12796
|
}
|
|
12780
|
-
function
|
|
12797
|
+
function Km(n) {
|
|
12781
12798
|
return n.split("-")[0];
|
|
12782
12799
|
}
|
|
12783
12800
|
function Hr(n) {
|
|
@@ -12796,17 +12813,17 @@ function Kn(n) {
|
|
|
12796
12813
|
return Ns(n, e);
|
|
12797
12814
|
});
|
|
12798
12815
|
}
|
|
12799
|
-
function
|
|
12816
|
+
function Jm(n) {
|
|
12800
12817
|
return Ns(n, "NodeList");
|
|
12801
12818
|
}
|
|
12802
|
-
function
|
|
12819
|
+
function _m(n) {
|
|
12803
12820
|
return Ns(n, "MouseEvent");
|
|
12804
12821
|
}
|
|
12805
|
-
function
|
|
12822
|
+
function Um(n) {
|
|
12806
12823
|
return !!(n && n._tippy && n._tippy.reference === n);
|
|
12807
12824
|
}
|
|
12808
|
-
function
|
|
12809
|
-
return Kn(n) ? [n] :
|
|
12825
|
+
function Gm(n) {
|
|
12826
|
+
return Kn(n) ? [n] : Jm(n) ? Hr(n) : Array.isArray(n) ? n : Hr(document.querySelectorAll(n));
|
|
12810
12827
|
}
|
|
12811
12828
|
function Mi(n, e) {
|
|
12812
12829
|
n.forEach(function(t) {
|
|
@@ -12818,14 +12835,14 @@ function el(n, e) {
|
|
|
12818
12835
|
t && t.setAttribute("data-state", e);
|
|
12819
12836
|
});
|
|
12820
12837
|
}
|
|
12821
|
-
function
|
|
12838
|
+
function Ym(n) {
|
|
12822
12839
|
var e, t = Xt(n), r = t[0];
|
|
12823
12840
|
return r != null && (e = r.ownerDocument) != null && e.body ? r.ownerDocument : document;
|
|
12824
12841
|
}
|
|
12825
|
-
function
|
|
12842
|
+
function Xm(n, e) {
|
|
12826
12843
|
var t = e.clientX, r = e.clientY;
|
|
12827
12844
|
return n.every(function(i) {
|
|
12828
|
-
var s = i.popperRect, o = i.popperState, l = i.props, a = l.interactiveBorder, c =
|
|
12845
|
+
var s = i.popperRect, o = i.popperState, l = i.props, a = l.interactiveBorder, c = Km(o.placement), u = o.modifiersData.offset;
|
|
12829
12846
|
if (!u)
|
|
12830
12847
|
return !0;
|
|
12831
12848
|
var d = c === "bottom" ? u.top.y : 0, f = c === "top" ? u.bottom.y : 0, h = c === "right" ? u.left.x : 0, p = c === "left" ? u.right.x : 0, m = s.top - r + d > a, y = r - s.bottom - f > a, b = s.left - t + h > a, w = t - s.right - p > a;
|
|
@@ -12847,27 +12864,27 @@ function tl(n, e) {
|
|
|
12847
12864
|
}
|
|
12848
12865
|
return !1;
|
|
12849
12866
|
}
|
|
12850
|
-
var
|
|
12867
|
+
var Ve = {
|
|
12851
12868
|
isTouch: !1
|
|
12852
12869
|
}, nl = 0;
|
|
12853
|
-
function
|
|
12854
|
-
|
|
12870
|
+
function Zm() {
|
|
12871
|
+
Ve.isTouch || (Ve.isTouch = !0, window.performance && document.addEventListener("mousemove", sc));
|
|
12855
12872
|
}
|
|
12856
12873
|
function sc() {
|
|
12857
12874
|
var n = performance.now();
|
|
12858
|
-
n - nl < 20 && (
|
|
12875
|
+
n - nl < 20 && (Ve.isTouch = !1, document.removeEventListener("mousemove", sc)), nl = n;
|
|
12859
12876
|
}
|
|
12860
|
-
function
|
|
12877
|
+
function Qm() {
|
|
12861
12878
|
var n = document.activeElement;
|
|
12862
|
-
if (
|
|
12879
|
+
if (Um(n)) {
|
|
12863
12880
|
var e = n._tippy;
|
|
12864
12881
|
n.blur && !e.state.isVisible && n.blur();
|
|
12865
12882
|
}
|
|
12866
12883
|
}
|
|
12867
|
-
function
|
|
12868
|
-
document.addEventListener("touchstart",
|
|
12884
|
+
function eg() {
|
|
12885
|
+
document.addEventListener("touchstart", Zm, Mt), window.addEventListener("blur", Qm);
|
|
12869
12886
|
}
|
|
12870
|
-
var
|
|
12887
|
+
var tg = typeof window < "u" && typeof document < "u", ng = tg ? (
|
|
12871
12888
|
// @ts-ignore
|
|
12872
12889
|
!!window.msCrypto
|
|
12873
12890
|
) : !1;
|
|
@@ -12879,7 +12896,7 @@ function rl(n) {
|
|
|
12879
12896
|
var e = /[ \t]{2,}/g, t = /^[ \t]*/gm;
|
|
12880
12897
|
return n.replace(e, " ").replace(t, "").trim();
|
|
12881
12898
|
}
|
|
12882
|
-
function
|
|
12899
|
+
function rg(n) {
|
|
12883
12900
|
return rl(`
|
|
12884
12901
|
%ctippy.js
|
|
12885
12902
|
|
|
@@ -12890,7 +12907,7 @@ function ng(n) {
|
|
|
12890
12907
|
}
|
|
12891
12908
|
function oc(n) {
|
|
12892
12909
|
return [
|
|
12893
|
-
|
|
12910
|
+
rg(n),
|
|
12894
12911
|
// title
|
|
12895
12912
|
"color: #00C584; font-size: 1.3em; font-weight: bold;",
|
|
12896
12913
|
// message
|
|
@@ -12900,8 +12917,8 @@ function oc(n) {
|
|
|
12900
12917
|
];
|
|
12901
12918
|
}
|
|
12902
12919
|
var Jn;
|
|
12903
|
-
process.env.NODE_ENV !== "production" &&
|
|
12904
|
-
function
|
|
12920
|
+
process.env.NODE_ENV !== "production" && ig();
|
|
12921
|
+
function ig() {
|
|
12905
12922
|
Jn = /* @__PURE__ */ new Set();
|
|
12906
12923
|
}
|
|
12907
12924
|
function Ze(n, e) {
|
|
@@ -12916,7 +12933,7 @@ function Qi(n, e) {
|
|
|
12916
12933
|
Jn.add(e), (t = console).error.apply(t, oc(e));
|
|
12917
12934
|
}
|
|
12918
12935
|
}
|
|
12919
|
-
function
|
|
12936
|
+
function sg(n) {
|
|
12920
12937
|
var e = !n, t = Object.prototype.toString.call(n) === "[object Object]" && !n.addEventListener;
|
|
12921
12938
|
Qi(e, ["tippy() was passed", "`" + String(n) + "`", "as its targets (first) argument. Valid types are: String, Element,", "Element[], or NodeList."].join(" ")), Qi(t, ["tippy() was passed a plain object which is not supported as an argument", "for virtual positioning. Use props.getReferenceClientRect instead."].join(" "));
|
|
12922
12939
|
}
|
|
@@ -12925,7 +12942,7 @@ var lc = {
|
|
|
12925
12942
|
followCursor: !1,
|
|
12926
12943
|
inlinePositioning: !1,
|
|
12927
12944
|
sticky: !1
|
|
12928
|
-
},
|
|
12945
|
+
}, og = {
|
|
12929
12946
|
allowHTML: !1,
|
|
12930
12947
|
animation: "fade",
|
|
12931
12948
|
arrow: !0,
|
|
@@ -12983,7 +13000,7 @@ var lc = {
|
|
|
12983
13000
|
touch: !0,
|
|
12984
13001
|
trigger: "mouseenter focus",
|
|
12985
13002
|
triggerTarget: null
|
|
12986
|
-
}, lc,
|
|
13003
|
+
}, lc, og), lg = Object.keys(ve), ag = function(e) {
|
|
12987
13004
|
process.env.NODE_ENV !== "production" && cc(e, []);
|
|
12988
13005
|
var t = Object.keys(e);
|
|
12989
13006
|
t.forEach(function(r) {
|
|
@@ -13001,10 +13018,10 @@ function ac(n) {
|
|
|
13001
13018
|
}, {});
|
|
13002
13019
|
return Object.assign({}, n, t);
|
|
13003
13020
|
}
|
|
13004
|
-
function
|
|
13021
|
+
function cg(n, e) {
|
|
13005
13022
|
var t = e ? Object.keys(ac(Object.assign({}, ve, {
|
|
13006
13023
|
plugins: e
|
|
13007
|
-
}))) :
|
|
13024
|
+
}))) : lg, r = t.reduce(function(i, s) {
|
|
13008
13025
|
var o = (n.getAttribute("data-tippy-" + s) || "").trim();
|
|
13009
13026
|
if (!o)
|
|
13010
13027
|
return i;
|
|
@@ -13023,7 +13040,7 @@ function ag(n, e) {
|
|
|
13023
13040
|
function il(n, e) {
|
|
13024
13041
|
var t = Object.assign({}, e, {
|
|
13025
13042
|
content: ic(e.content, [n])
|
|
13026
|
-
}, e.ignoreAttributes ? {} :
|
|
13043
|
+
}, e.ignoreAttributes ? {} : cg(n, e.plugins));
|
|
13027
13044
|
return t.aria = Object.assign({}, ve.aria, t.aria), t.aria = {
|
|
13028
13045
|
expanded: t.aria.expanded === "auto" ? e.interactive : t.aria.expanded,
|
|
13029
13046
|
content: t.aria.content === "auto" ? e.interactive ? null : "describedby" : t.aria.content
|
|
@@ -13033,7 +13050,7 @@ function cc(n, e) {
|
|
|
13033
13050
|
n === void 0 && (n = {}), e === void 0 && (e = []);
|
|
13034
13051
|
var t = Object.keys(n);
|
|
13035
13052
|
t.forEach(function(r) {
|
|
13036
|
-
var i =
|
|
13053
|
+
var i = jm(ve, Object.keys(lc)), s = !Hm(i, r);
|
|
13037
13054
|
s && (s = e.filter(function(o) {
|
|
13038
13055
|
return o.name === r;
|
|
13039
13056
|
}).length === 0), Ze(s, ["`" + r + "`", "is not a valid prop. You may have spelled it incorrectly, or if it's", "a plugin, forgot to pass it in an array as props.plugins.", `
|
|
@@ -13042,11 +13059,11 @@ function cc(n, e) {
|
|
|
13042
13059
|
`, "Plugins: https://atomiks.github.io/tippyjs/v6/plugins/"].join(" "));
|
|
13043
13060
|
});
|
|
13044
13061
|
}
|
|
13045
|
-
var
|
|
13062
|
+
var ug = function() {
|
|
13046
13063
|
return "innerHTML";
|
|
13047
13064
|
};
|
|
13048
13065
|
function es(n, e) {
|
|
13049
|
-
n[
|
|
13066
|
+
n[ug()] = e;
|
|
13050
13067
|
}
|
|
13051
13068
|
function sl(n) {
|
|
13052
13069
|
var e = Pn();
|
|
@@ -13066,13 +13083,13 @@ function ts(n) {
|
|
|
13066
13083
|
return r.classList.contains(tc) || r.classList.contains(nc);
|
|
13067
13084
|
}),
|
|
13068
13085
|
backdrop: t.find(function(r) {
|
|
13069
|
-
return r.classList.contains(
|
|
13086
|
+
return r.classList.contains($m);
|
|
13070
13087
|
})
|
|
13071
13088
|
};
|
|
13072
13089
|
}
|
|
13073
13090
|
function uc(n) {
|
|
13074
13091
|
var e = Pn(), t = Pn();
|
|
13075
|
-
t.className =
|
|
13092
|
+
t.className = Fm, t.setAttribute("data-state", "hidden"), t.setAttribute("tabindex", "-1");
|
|
13076
13093
|
var r = Pn();
|
|
13077
13094
|
r.className = ec, r.setAttribute("data-state", "hidden"), ol(r, n.props), e.appendChild(t), t.appendChild(r), i(n.props, n.props);
|
|
13078
13095
|
function i(s, o) {
|
|
@@ -13085,9 +13102,9 @@ function uc(n) {
|
|
|
13085
13102
|
};
|
|
13086
13103
|
}
|
|
13087
13104
|
uc.$$tippy = !0;
|
|
13088
|
-
var
|
|
13089
|
-
function
|
|
13090
|
-
var t = il(n, Object.assign({}, ve, ac(Qo(e)))), r, i, s, o = !1, l = !1, a = !1, c = !1, u, d, f, h = [], p = Xo(tr, t.interactiveDebounce), m, y =
|
|
13105
|
+
var dg = 1, vr = [], Oi = [];
|
|
13106
|
+
function fg(n, e) {
|
|
13107
|
+
var t = il(n, Object.assign({}, ve, ac(Qo(e)))), r, i, s, o = !1, l = !1, a = !1, c = !1, u, d, f, h = [], p = Xo(tr, t.interactiveDebounce), m, y = dg++, b = null, w = qm(t.plugins), M = {
|
|
13091
13108
|
// Is the instance currently enabled?
|
|
13092
13109
|
isEnabled: !0,
|
|
13093
13110
|
// Is the tippy currently showing and not transitioning out?
|
|
@@ -13126,7 +13143,7 @@ function dg(n, e) {
|
|
|
13126
13143
|
var B = w.map(function(v) {
|
|
13127
13144
|
return v.fn(g);
|
|
13128
13145
|
}), E = n.hasAttribute("aria-expanded");
|
|
13129
|
-
return Wt(),
|
|
13146
|
+
return Wt(), Be(), ne(), X("onCreate", [g]), t.showOnCreate && xn(), k.addEventListener("mouseenter", function() {
|
|
13130
13147
|
g.props.interactive && g.state.isVisible && g.clearDelayTimeouts();
|
|
13131
13148
|
}), k.addEventListener("mouseleave", function() {
|
|
13132
13149
|
g.props.interactive && g.props.trigger.indexOf("mouseenter") >= 0 && ge().addEventListener("mousemove", p);
|
|
@@ -13147,13 +13164,13 @@ function dg(n, e) {
|
|
|
13147
13164
|
}
|
|
13148
13165
|
function ge() {
|
|
13149
13166
|
var v = j().parentNode;
|
|
13150
|
-
return v ?
|
|
13167
|
+
return v ? Ym(v) : document;
|
|
13151
13168
|
}
|
|
13152
13169
|
function ye() {
|
|
13153
13170
|
return ts(k);
|
|
13154
13171
|
}
|
|
13155
13172
|
function te(v) {
|
|
13156
|
-
return g.state.isMounted && !g.state.isVisible ||
|
|
13173
|
+
return g.state.isMounted && !g.state.isVisible || Ve.isTouch || u && u.type === "focus" ? 0 : Si(g.props.delay, v ? 0 : 1, ve.delay);
|
|
13157
13174
|
}
|
|
13158
13175
|
function ne(v) {
|
|
13159
13176
|
v === void 0 && (v = !1), k.style.pointerEvents = g.props.interactive && !v ? "" : "none", k.style.zIndex = "" + g.props.zIndex;
|
|
@@ -13166,7 +13183,7 @@ function dg(n, e) {
|
|
|
13166
13183
|
(V = g.props)[v].apply(V, O);
|
|
13167
13184
|
}
|
|
13168
13185
|
}
|
|
13169
|
-
function
|
|
13186
|
+
function Pe() {
|
|
13170
13187
|
var v = g.props.aria;
|
|
13171
13188
|
if (v.content) {
|
|
13172
13189
|
var O = "aria-" + v.content, N = k.id, V = Xt(g.props.triggerTarget || n);
|
|
@@ -13181,7 +13198,7 @@ function dg(n, e) {
|
|
|
13181
13198
|
});
|
|
13182
13199
|
}
|
|
13183
13200
|
}
|
|
13184
|
-
function
|
|
13201
|
+
function Be() {
|
|
13185
13202
|
if (!(E || !g.props.aria.expanded)) {
|
|
13186
13203
|
var v = Xt(g.props.triggerTarget || n);
|
|
13187
13204
|
v.forEach(function(O) {
|
|
@@ -13194,14 +13211,14 @@ function dg(n, e) {
|
|
|
13194
13211
|
return v !== p;
|
|
13195
13212
|
});
|
|
13196
13213
|
}
|
|
13197
|
-
function
|
|
13198
|
-
if (!(
|
|
13214
|
+
function Le(v) {
|
|
13215
|
+
if (!(Ve.isTouch && (a || v.type === "mousedown"))) {
|
|
13199
13216
|
var O = v.composedPath && v.composedPath()[0] || v.target;
|
|
13200
13217
|
if (!(g.props.interactive && tl(k, O))) {
|
|
13201
13218
|
if (Xt(g.props.triggerTarget || n).some(function(N) {
|
|
13202
13219
|
return tl(N, O);
|
|
13203
13220
|
})) {
|
|
13204
|
-
if (
|
|
13221
|
+
if (Ve.isTouch || g.state.isVisible && g.props.trigger.indexOf("click") >= 0)
|
|
13205
13222
|
return;
|
|
13206
13223
|
} else
|
|
13207
13224
|
X("onClickOutside", [g, v]);
|
|
@@ -13217,13 +13234,13 @@ function dg(n, e) {
|
|
|
13217
13234
|
function Je() {
|
|
13218
13235
|
a = !1;
|
|
13219
13236
|
}
|
|
13220
|
-
function
|
|
13237
|
+
function Ae() {
|
|
13221
13238
|
var v = ge();
|
|
13222
|
-
v.addEventListener("mousedown",
|
|
13239
|
+
v.addEventListener("mousedown", Le, !0), v.addEventListener("touchend", Le, Mt), v.addEventListener("touchstart", Je, Mt), v.addEventListener("touchmove", xt, Mt);
|
|
13223
13240
|
}
|
|
13224
13241
|
function _e() {
|
|
13225
13242
|
var v = ge();
|
|
13226
|
-
v.removeEventListener("mousedown",
|
|
13243
|
+
v.removeEventListener("mousedown", Le, !0), v.removeEventListener("touchend", Le, Mt), v.removeEventListener("touchstart", Je, Mt), v.removeEventListener("touchmove", xt, Mt);
|
|
13227
13244
|
}
|
|
13228
13245
|
function Ht(v, O) {
|
|
13229
13246
|
jt(v, function() {
|
|
@@ -13259,14 +13276,14 @@ function dg(n, e) {
|
|
|
13259
13276
|
passive: !0
|
|
13260
13277
|
}), nt("touchend", nr, {
|
|
13261
13278
|
passive: !0
|
|
13262
|
-
})),
|
|
13279
|
+
})), Wm(g.props.trigger).forEach(function(v) {
|
|
13263
13280
|
if (v !== "manual")
|
|
13264
13281
|
switch (nt(v, bn), v) {
|
|
13265
13282
|
case "mouseenter":
|
|
13266
13283
|
nt("mouseleave", nr);
|
|
13267
13284
|
break;
|
|
13268
13285
|
case "focus":
|
|
13269
|
-
nt(
|
|
13286
|
+
nt(ng ? "focusout" : "blur", vn);
|
|
13270
13287
|
break;
|
|
13271
13288
|
case "focusin":
|
|
13272
13289
|
nt("focusout", vn);
|
|
@@ -13284,7 +13301,7 @@ function dg(n, e) {
|
|
|
13284
13301
|
var O, N = !1;
|
|
13285
13302
|
if (!(!g.state.isEnabled || kn(v) || l)) {
|
|
13286
13303
|
var V = ((O = u) == null ? void 0 : O.type) === "focus";
|
|
13287
|
-
u = v, m = v.currentTarget,
|
|
13304
|
+
u = v, m = v.currentTarget, Be(), !g.state.isVisible && _m(v) && vr.forEach(function(L) {
|
|
13288
13305
|
return L(v);
|
|
13289
13306
|
}), v.type === "click" && (g.props.trigger.indexOf("mouseenter") < 0 || o) && g.props.hideOnClick !== !1 && g.state.isVisible ? N = !0 : xn(v), v.type === "click" && (o = !N), N && !V && wt(v);
|
|
13290
13307
|
}
|
|
@@ -13300,7 +13317,7 @@ function dg(n, e) {
|
|
|
13300
13317
|
props: t
|
|
13301
13318
|
} : null;
|
|
13302
13319
|
}).filter(Boolean);
|
|
13303
|
-
|
|
13320
|
+
Xm(V, v) && (kt(), wt(v));
|
|
13304
13321
|
}
|
|
13305
13322
|
}
|
|
13306
13323
|
function nr(v) {
|
|
@@ -13317,7 +13334,7 @@ function dg(n, e) {
|
|
|
13317
13334
|
g.props.trigger.indexOf("focusin") < 0 && v.target !== j() || g.props.interactive && v.relatedTarget && k.contains(v.relatedTarget) || wt(v);
|
|
13318
13335
|
}
|
|
13319
13336
|
function kn(v) {
|
|
13320
|
-
return
|
|
13337
|
+
return Ve.isTouch ? $() !== v.type.indexOf("touch") >= 0 : !1;
|
|
13321
13338
|
}
|
|
13322
13339
|
function rr() {
|
|
13323
13340
|
ir();
|
|
@@ -13370,7 +13387,7 @@ function dg(n, e) {
|
|
|
13370
13387
|
element: xe,
|
|
13371
13388
|
padding: 3
|
|
13372
13389
|
}
|
|
13373
|
-
}), St.push.apply(St, O?.modifiers || []), g.popperInstance =
|
|
13390
|
+
}), St.push.apply(St, O?.modifiers || []), g.popperInstance = Vm(qt, k, Object.assign({}, O, {
|
|
13374
13391
|
placement: N,
|
|
13375
13392
|
onFirstUpdate: f,
|
|
13376
13393
|
modifiers: St
|
|
@@ -13393,9 +13410,9 @@ function dg(n, e) {
|
|
|
13393
13410
|
return Hr(k.querySelectorAll("[data-tippy-root]"));
|
|
13394
13411
|
}
|
|
13395
13412
|
function xn(v) {
|
|
13396
|
-
g.clearDelayTimeouts(), v && X("onTrigger", [g, v]),
|
|
13413
|
+
g.clearDelayTimeouts(), v && X("onTrigger", [g, v]), Ae();
|
|
13397
13414
|
var O = te(!0), N = z(), V = N[0], L = N[1];
|
|
13398
|
-
|
|
13415
|
+
Ve.isTouch && V === "hold" && L && (O = L), O ? r = setTimeout(function() {
|
|
13399
13416
|
g.show();
|
|
13400
13417
|
}, O) : g.show();
|
|
13401
13418
|
}
|
|
@@ -13430,7 +13447,7 @@ function dg(n, e) {
|
|
|
13430
13447
|
}));
|
|
13431
13448
|
g.props = N, Wt(), O.interactiveDebounce !== N.interactiveDebounce && (kt(), p = Xo(tr, N.interactiveDebounce)), O.triggerTarget && !N.triggerTarget ? Xt(O.triggerTarget).forEach(function(V) {
|
|
13432
13449
|
V.removeAttribute("aria-expanded");
|
|
13433
|
-
}) : N.triggerTarget && n.removeAttribute("aria-expanded"),
|
|
13450
|
+
}) : N.triggerTarget && n.removeAttribute("aria-expanded"), Be(), ne(), I && I(O, N), g.popperInstance && (rr(), rt().forEach(function(V) {
|
|
13434
13451
|
requestAnimationFrame(V._tippy.popperInstance.forceUpdate);
|
|
13435
13452
|
})), X("onAfterUpdate", [g, v]);
|
|
13436
13453
|
}
|
|
@@ -13442,9 +13459,9 @@ function dg(n, e) {
|
|
|
13442
13459
|
}
|
|
13443
13460
|
function yc() {
|
|
13444
13461
|
process.env.NODE_ENV !== "production" && Ze(g.state.isDestroyed, Ut("show"));
|
|
13445
|
-
var v = g.state.isVisible, O = g.state.isDestroyed, N = !g.state.isEnabled, V =
|
|
13462
|
+
var v = g.state.isVisible, O = g.state.isDestroyed, N = !g.state.isEnabled, V = Ve.isTouch && !g.props.touch, L = Si(g.props.duration, 0, ve.duration);
|
|
13446
13463
|
if (!(v || O || N || V) && !j().hasAttribute("disabled") && (X("onShow", [g], !1), g.props.onShow(g) !== !1)) {
|
|
13447
|
-
if (g.state.isVisible = !0, H() && (k.style.visibility = "visible"), ne(),
|
|
13464
|
+
if (g.state.isVisible = !0, H() && (k.style.visibility = "visible"), ne(), Ae(), g.state.isMounted || (k.style.transition = "none"), H()) {
|
|
13448
13465
|
var le = ye(), xe = le.box, qt = le.content;
|
|
13449
13466
|
Mi([xe, qt], 0);
|
|
13450
13467
|
}
|
|
@@ -13455,7 +13472,7 @@ function dg(n, e) {
|
|
|
13455
13472
|
var ii = ye(), cr = ii.box, Kt = ii.content;
|
|
13456
13473
|
Mi([cr, Kt], L), el([cr, Kt], "visible");
|
|
13457
13474
|
}
|
|
13458
|
-
|
|
13475
|
+
Pe(), Be(), Zo(Oi, g), (St = g.popperInstance) == null || St.forceUpdate(), X("onMount", [g]), g.props.animation && H() && Ue(L, function() {
|
|
13459
13476
|
g.state.isShown = !0, X("onShown", [g]);
|
|
13460
13477
|
});
|
|
13461
13478
|
}
|
|
@@ -13470,7 +13487,7 @@ function dg(n, e) {
|
|
|
13470
13487
|
var L = ye(), le = L.box, xe = L.content;
|
|
13471
13488
|
g.props.animation && (Mi([le, xe], V), el([le, xe], "hidden"));
|
|
13472
13489
|
}
|
|
13473
|
-
|
|
13490
|
+
Pe(), Be(), g.props.animation ? H() && Ht(V, g.unmount) : g.unmount();
|
|
13474
13491
|
}
|
|
13475
13492
|
}
|
|
13476
13493
|
function vc(v) {
|
|
@@ -13490,10 +13507,10 @@ function dg(n, e) {
|
|
|
13490
13507
|
function yn(n, e) {
|
|
13491
13508
|
e === void 0 && (e = {});
|
|
13492
13509
|
var t = ve.plugins.concat(e.plugins || []);
|
|
13493
|
-
process.env.NODE_ENV !== "production" && (
|
|
13510
|
+
process.env.NODE_ENV !== "production" && (sg(n), cc(e, t)), eg();
|
|
13494
13511
|
var r = Object.assign({}, e, {
|
|
13495
13512
|
plugins: t
|
|
13496
|
-
}), i =
|
|
13513
|
+
}), i = Gm(n);
|
|
13497
13514
|
if (process.env.NODE_ENV !== "production") {
|
|
13498
13515
|
var s = Kn(r.content), o = i.length > 1;
|
|
13499
13516
|
Ze(s && o, ["tippy() was passed an Element as the `content` prop, but more than", "one tippy instance was created by this invocation. This means the", "content element will only be appended to the last tippy instance.", `
|
|
@@ -13504,14 +13521,14 @@ function yn(n, e) {
|
|
|
13504
13521
|
`, "2) content: () => element.cloneNode(true)"].join(" "));
|
|
13505
13522
|
}
|
|
13506
13523
|
var l = i.reduce(function(a, c) {
|
|
13507
|
-
var u = c &&
|
|
13524
|
+
var u = c && fg(c, r);
|
|
13508
13525
|
return u && a.push(u), a;
|
|
13509
13526
|
}, []);
|
|
13510
13527
|
return Kn(n) ? l[0] : l;
|
|
13511
13528
|
}
|
|
13512
13529
|
yn.defaultProps = ve;
|
|
13513
|
-
yn.setDefaultProps =
|
|
13514
|
-
yn.currentInput =
|
|
13530
|
+
yn.setDefaultProps = ag;
|
|
13531
|
+
yn.currentInput = Ve;
|
|
13515
13532
|
Object.assign({}, Ja, {
|
|
13516
13533
|
effect: function(e) {
|
|
13517
13534
|
var t = e.state, r = {
|
|
@@ -13532,7 +13549,7 @@ Object.assign({}, Ja, {
|
|
|
13532
13549
|
yn.setDefaultProps({
|
|
13533
13550
|
render: uc
|
|
13534
13551
|
});
|
|
13535
|
-
class
|
|
13552
|
+
class hg {
|
|
13536
13553
|
constructor({ editor: e, element: t, view: r, tippyOptions: i = {}, updateDelay: s = 250, shouldShow: o }) {
|
|
13537
13554
|
this.preventHide = !1, this.shouldShow = ({ view: l, state: a, from: c, to: u }) => {
|
|
13538
13555
|
const { doc: d, selection: f } = a, { empty: h } = f, p = !d.textBetween(c, u).length && ks(a.selection), m = this.element.contains(document.activeElement);
|
|
@@ -13625,7 +13642,7 @@ class fg {
|
|
|
13625
13642
|
}
|
|
13626
13643
|
const dc = (n) => new me({
|
|
13627
13644
|
key: typeof n.pluginKey == "string" ? new Ke(n.pluginKey) : n.pluginKey,
|
|
13628
|
-
view: (e) => new
|
|
13645
|
+
view: (e) => new hg({ view: e, ...n })
|
|
13629
13646
|
});
|
|
13630
13647
|
de.create({
|
|
13631
13648
|
name: "bubbleMenu",
|
|
@@ -13651,7 +13668,7 @@ de.create({
|
|
|
13651
13668
|
] : [];
|
|
13652
13669
|
}
|
|
13653
13670
|
});
|
|
13654
|
-
class
|
|
13671
|
+
class pg {
|
|
13655
13672
|
constructor({ editor: e, element: t, view: r, tippyOptions: i = {}, shouldShow: s }) {
|
|
13656
13673
|
this.preventHide = !1, this.shouldShow = ({ view: o, state: l }) => {
|
|
13657
13674
|
const { selection: a } = l, { $anchor: c, empty: u } = a, d = c.depth === 1, f = c.parent.isTextblock && !c.parent.type.spec.code && !c.parent.textContent;
|
|
@@ -13717,7 +13734,7 @@ class hg {
|
|
|
13717
13734
|
}
|
|
13718
13735
|
const fc = (n) => new me({
|
|
13719
13736
|
key: typeof n.pluginKey == "string" ? new Ke(n.pluginKey) : n.pluginKey,
|
|
13720
|
-
view: (e) => new
|
|
13737
|
+
view: (e) => new pg({ view: e, ...n })
|
|
13721
13738
|
});
|
|
13722
13739
|
de.create({
|
|
13723
13740
|
name: "floatingMenu",
|
|
@@ -13800,7 +13817,7 @@ function ll(n) {
|
|
|
13800
13817
|
}
|
|
13801
13818
|
}));
|
|
13802
13819
|
}
|
|
13803
|
-
class
|
|
13820
|
+
class mg extends Ip {
|
|
13804
13821
|
constructor(e = {}) {
|
|
13805
13822
|
return super(e), this.contentComponent = null, this.appContext = null, this.reactiveState = ll(this.view.state), this.reactiveExtensionStorage = ll(this.extensionStorage), this.on("beforeTransaction", ({ nextState: t }) => {
|
|
13806
13823
|
this.reactiveState.value = t, this.reactiveExtensionStorage.value = this.extensionStorage;
|
|
@@ -13825,7 +13842,7 @@ class pg extends Dp {
|
|
|
13825
13842
|
super.unregisterPlugin(e), this.reactiveState.value = this.view.state;
|
|
13826
13843
|
}
|
|
13827
13844
|
}
|
|
13828
|
-
const
|
|
13845
|
+
const gg = mn({
|
|
13829
13846
|
name: "EditorContent",
|
|
13830
13847
|
props: {
|
|
13831
13848
|
editor: {
|
|
@@ -13953,15 +13970,15 @@ mn({
|
|
|
13953
13970
|
}, (e = (n = this.$slots).default) === null || e === void 0 ? void 0 : e.call(n));
|
|
13954
13971
|
}
|
|
13955
13972
|
});
|
|
13956
|
-
const
|
|
13973
|
+
const yg = (n = {}) => {
|
|
13957
13974
|
const e = Oc();
|
|
13958
13975
|
return rs(() => {
|
|
13959
|
-
e.value = new
|
|
13976
|
+
e.value = new mg(n);
|
|
13960
13977
|
}), _n(() => {
|
|
13961
13978
|
var t;
|
|
13962
13979
|
(t = e.value) === null || t === void 0 || t.destroy();
|
|
13963
13980
|
}), e;
|
|
13964
|
-
},
|
|
13981
|
+
}, bg = /^\s*>\s$/, vg = se.create({
|
|
13965
13982
|
name: "blockquote",
|
|
13966
13983
|
addOptions() {
|
|
13967
13984
|
return {
|
|
@@ -13994,12 +14011,12 @@ const gg = (n = {}) => {
|
|
|
13994
14011
|
addInputRules() {
|
|
13995
14012
|
return [
|
|
13996
14013
|
jn({
|
|
13997
|
-
find:
|
|
14014
|
+
find: bg,
|
|
13998
14015
|
type: this.type
|
|
13999
14016
|
})
|
|
14000
14017
|
];
|
|
14001
14018
|
}
|
|
14002
|
-
}),
|
|
14019
|
+
}), kg = /(?:^|\s)(\*\*(?!\s+\*\*)((?:[^*]+))\*\*(?!\s+\*\*))$/, xg = /(?:^|\s)(\*\*(?!\s+\*\*)((?:[^*]+))\*\*(?!\s+\*\*))/g, wg = /(?:^|\s)(__(?!\s+__)((?:[^_]+))__(?!\s+__))$/, Sg = /(?:^|\s)(__(?!\s+__)((?:[^_]+))__(?!\s+__))/g, Mg = We.create({
|
|
14003
14020
|
name: "bold",
|
|
14004
14021
|
addOptions() {
|
|
14005
14022
|
return {
|
|
@@ -14040,11 +14057,11 @@ const gg = (n = {}) => {
|
|
|
14040
14057
|
addInputRules() {
|
|
14041
14058
|
return [
|
|
14042
14059
|
cn({
|
|
14043
|
-
find:
|
|
14060
|
+
find: kg,
|
|
14044
14061
|
type: this.type
|
|
14045
14062
|
}),
|
|
14046
14063
|
cn({
|
|
14047
|
-
find:
|
|
14064
|
+
find: wg,
|
|
14048
14065
|
type: this.type
|
|
14049
14066
|
})
|
|
14050
14067
|
];
|
|
@@ -14052,16 +14069,16 @@ const gg = (n = {}) => {
|
|
|
14052
14069
|
addPasteRules() {
|
|
14053
14070
|
return [
|
|
14054
14071
|
un({
|
|
14055
|
-
find:
|
|
14072
|
+
find: xg,
|
|
14056
14073
|
type: this.type
|
|
14057
14074
|
}),
|
|
14058
14075
|
un({
|
|
14059
|
-
find:
|
|
14076
|
+
find: Sg,
|
|
14060
14077
|
type: this.type
|
|
14061
14078
|
})
|
|
14062
14079
|
];
|
|
14063
14080
|
}
|
|
14064
|
-
}),
|
|
14081
|
+
}), Cg = se.create({
|
|
14065
14082
|
name: "listItem",
|
|
14066
14083
|
addOptions() {
|
|
14067
14084
|
return {
|
|
@@ -14116,7 +14133,7 @@ const gg = (n = {}) => {
|
|
|
14116
14133
|
}
|
|
14117
14134
|
};
|
|
14118
14135
|
}
|
|
14119
|
-
}), cl = /^\s*([-+*])\s$/,
|
|
14136
|
+
}), cl = /^\s*([-+*])\s$/, Og = se.create({
|
|
14120
14137
|
name: "bulletList",
|
|
14121
14138
|
addOptions() {
|
|
14122
14139
|
return {
|
|
@@ -14140,7 +14157,7 @@ const gg = (n = {}) => {
|
|
|
14140
14157
|
},
|
|
14141
14158
|
addCommands() {
|
|
14142
14159
|
return {
|
|
14143
|
-
toggleBulletList: () => ({ commands: n, chain: e }) => this.options.keepAttributes ? e().toggleList(this.name, this.options.itemTypeName, this.options.keepMarks).updateAttributes(
|
|
14160
|
+
toggleBulletList: () => ({ commands: n, chain: e }) => this.options.keepAttributes ? e().toggleList(this.name, this.options.itemTypeName, this.options.keepMarks).updateAttributes(Cg.name, this.editor.getAttributes(al.name)).run() : n.toggleList(this.name, this.options.itemTypeName, this.options.keepMarks)
|
|
14144
14161
|
};
|
|
14145
14162
|
},
|
|
14146
14163
|
addKeyboardShortcuts() {
|
|
@@ -14164,7 +14181,7 @@ const gg = (n = {}) => {
|
|
|
14164
14181
|
n
|
|
14165
14182
|
];
|
|
14166
14183
|
}
|
|
14167
|
-
}),
|
|
14184
|
+
}), Tg = /(?:^|\s)(`(?!\s+`)((?:[^`]+))`(?!\s+`))$/, Eg = /(?:^|\s)(`(?!\s+`)((?:[^`]+))`(?!\s+`))/g, Ag = We.create({
|
|
14168
14185
|
name: "code",
|
|
14169
14186
|
addOptions() {
|
|
14170
14187
|
return {
|
|
@@ -14197,7 +14214,7 @@ const gg = (n = {}) => {
|
|
|
14197
14214
|
addInputRules() {
|
|
14198
14215
|
return [
|
|
14199
14216
|
cn({
|
|
14200
|
-
find:
|
|
14217
|
+
find: Tg,
|
|
14201
14218
|
type: this.type
|
|
14202
14219
|
})
|
|
14203
14220
|
];
|
|
@@ -14205,12 +14222,12 @@ const gg = (n = {}) => {
|
|
|
14205
14222
|
addPasteRules() {
|
|
14206
14223
|
return [
|
|
14207
14224
|
un({
|
|
14208
|
-
find:
|
|
14225
|
+
find: Eg,
|
|
14209
14226
|
type: this.type
|
|
14210
14227
|
})
|
|
14211
14228
|
];
|
|
14212
14229
|
}
|
|
14213
|
-
}),
|
|
14230
|
+
}), Ng = /^```([a-z]+)?[\s\n]$/, Dg = /^~~~([a-z]+)?[\s\n]$/, Ig = se.create({
|
|
14214
14231
|
name: "codeBlock",
|
|
14215
14232
|
addOptions() {
|
|
14216
14233
|
return {
|
|
@@ -14301,14 +14318,14 @@ const gg = (n = {}) => {
|
|
|
14301
14318
|
addInputRules() {
|
|
14302
14319
|
return [
|
|
14303
14320
|
Yi({
|
|
14304
|
-
find:
|
|
14321
|
+
find: Ng,
|
|
14305
14322
|
type: this.type,
|
|
14306
14323
|
getAttributes: (n) => ({
|
|
14307
14324
|
language: n[1]
|
|
14308
14325
|
})
|
|
14309
14326
|
}),
|
|
14310
14327
|
Yi({
|
|
14311
|
-
find:
|
|
14328
|
+
find: Dg,
|
|
14312
14329
|
type: this.type,
|
|
14313
14330
|
getAttributes: (n) => ({
|
|
14314
14331
|
language: n[1]
|
|
@@ -14337,19 +14354,19 @@ const gg = (n = {}) => {
|
|
|
14337
14354
|
})
|
|
14338
14355
|
];
|
|
14339
14356
|
}
|
|
14340
|
-
}),
|
|
14357
|
+
}), Rg = se.create({
|
|
14341
14358
|
name: "doc",
|
|
14342
14359
|
topNode: !0,
|
|
14343
14360
|
content: "block+"
|
|
14344
14361
|
});
|
|
14345
|
-
function
|
|
14362
|
+
function Pg(n = {}) {
|
|
14346
14363
|
return new me({
|
|
14347
14364
|
view(e) {
|
|
14348
|
-
return new
|
|
14365
|
+
return new Bg(e, n);
|
|
14349
14366
|
}
|
|
14350
14367
|
});
|
|
14351
14368
|
}
|
|
14352
|
-
class
|
|
14369
|
+
class Bg {
|
|
14353
14370
|
constructor(e, t) {
|
|
14354
14371
|
var r;
|
|
14355
14372
|
this.editorView = e, this.cursorPos = null, this.element = null, this.timeout = -1, this.width = (r = t.width) !== null && r !== void 0 ? r : 1, this.color = t.color === !1 ? void 0 : t.color || "black", this.class = t.class, this.handlers = ["dragover", "dragend", "drop", "dragleave"].map((i) => {
|
|
@@ -14421,7 +14438,7 @@ class Pg {
|
|
|
14421
14438
|
(e.target == this.editorView.dom || !this.editorView.dom.contains(e.relatedTarget)) && this.setCursor(null);
|
|
14422
14439
|
}
|
|
14423
14440
|
}
|
|
14424
|
-
const
|
|
14441
|
+
const Lg = de.create({
|
|
14425
14442
|
name: "dropCursor",
|
|
14426
14443
|
addOptions() {
|
|
14427
14444
|
return {
|
|
@@ -14432,7 +14449,7 @@ const Bg = de.create({
|
|
|
14432
14449
|
},
|
|
14433
14450
|
addProseMirrorPlugins() {
|
|
14434
14451
|
return [
|
|
14435
|
-
|
|
14452
|
+
Pg(this.options)
|
|
14436
14453
|
];
|
|
14437
14454
|
}
|
|
14438
14455
|
});
|
|
@@ -14475,7 +14492,7 @@ class W extends R {
|
|
|
14475
14492
|
*/
|
|
14476
14493
|
static valid(e) {
|
|
14477
14494
|
let t = e.parent;
|
|
14478
|
-
if (t.isTextblock || !
|
|
14495
|
+
if (t.isTextblock || !zg(e) || !Vg(e))
|
|
14479
14496
|
return !1;
|
|
14480
14497
|
let r = t.type.spec.allowGapCursor;
|
|
14481
14498
|
if (r != null)
|
|
@@ -14536,7 +14553,7 @@ class Ds {
|
|
|
14536
14553
|
return W.valid(t) ? new W(t) : R.near(t);
|
|
14537
14554
|
}
|
|
14538
14555
|
}
|
|
14539
|
-
function
|
|
14556
|
+
function zg(n) {
|
|
14540
14557
|
for (let e = n.depth; e >= 0; e--) {
|
|
14541
14558
|
let t = n.index(e), r = n.node(e);
|
|
14542
14559
|
if (t == 0) {
|
|
@@ -14553,7 +14570,7 @@ function Lg(n) {
|
|
|
14553
14570
|
}
|
|
14554
14571
|
return !0;
|
|
14555
14572
|
}
|
|
14556
|
-
function
|
|
14573
|
+
function Vg(n) {
|
|
14557
14574
|
for (let e = n.depth; e >= 0; e--) {
|
|
14558
14575
|
let t = n.indexAfter(e), r = n.node(e);
|
|
14559
14576
|
if (t == r.childCount) {
|
|
@@ -14570,20 +14587,20 @@ function zg(n) {
|
|
|
14570
14587
|
}
|
|
14571
14588
|
return !0;
|
|
14572
14589
|
}
|
|
14573
|
-
function
|
|
14590
|
+
function Fg() {
|
|
14574
14591
|
return new me({
|
|
14575
14592
|
props: {
|
|
14576
|
-
decorations:
|
|
14593
|
+
decorations: Wg,
|
|
14577
14594
|
createSelectionBetween(n, e, t) {
|
|
14578
14595
|
return e.pos == t.pos && W.valid(t) ? new W(t) : null;
|
|
14579
14596
|
},
|
|
14580
|
-
handleClick:
|
|
14581
|
-
handleKeyDown:
|
|
14582
|
-
handleDOMEvents: { beforeinput:
|
|
14597
|
+
handleClick: Hg,
|
|
14598
|
+
handleKeyDown: $g,
|
|
14599
|
+
handleDOMEvents: { beforeinput: jg }
|
|
14583
14600
|
}
|
|
14584
14601
|
});
|
|
14585
14602
|
}
|
|
14586
|
-
const
|
|
14603
|
+
const $g = Oa({
|
|
14587
14604
|
ArrowLeft: kr("horiz", -1),
|
|
14588
14605
|
ArrowRight: kr("horiz", 1),
|
|
14589
14606
|
ArrowUp: kr("vert", -1),
|
|
@@ -14602,7 +14619,7 @@ function kr(n, e) {
|
|
|
14602
14619
|
return c ? (i && i(r.tr.setSelection(new W(c))), !0) : !1;
|
|
14603
14620
|
};
|
|
14604
14621
|
}
|
|
14605
|
-
function
|
|
14622
|
+
function Hg(n, e, t) {
|
|
14606
14623
|
if (!n || !n.editable)
|
|
14607
14624
|
return !1;
|
|
14608
14625
|
let r = n.state.doc.resolve(e);
|
|
@@ -14611,7 +14628,7 @@ function $g(n, e, t) {
|
|
|
14611
14628
|
let i = n.posAtCoords({ left: t.clientX, top: t.clientY });
|
|
14612
14629
|
return i && i.inside > -1 && A.isSelectable(n.state.doc.nodeAt(i.inside)) ? !1 : (n.dispatch(n.state.tr.setSelection(new W(r))), !0);
|
|
14613
14630
|
}
|
|
14614
|
-
function
|
|
14631
|
+
function jg(n, e) {
|
|
14615
14632
|
if (e.inputType != "insertCompositionText" || !(n.state.selection instanceof W))
|
|
14616
14633
|
return !1;
|
|
14617
14634
|
let { $from: t } = n.state.selection, r = t.parent.contentMatchAt(t.index()).findWrapping(n.state.schema.nodes.text);
|
|
@@ -14623,17 +14640,17 @@ function Hg(n, e) {
|
|
|
14623
14640
|
let s = n.state.tr.replace(t.pos, t.pos, new S(i, 0, 0));
|
|
14624
14641
|
return s.setSelection(D.near(s.doc.resolve(t.pos + 1))), n.dispatch(s), !1;
|
|
14625
14642
|
}
|
|
14626
|
-
function
|
|
14643
|
+
function Wg(n) {
|
|
14627
14644
|
if (!(n.selection instanceof W))
|
|
14628
14645
|
return null;
|
|
14629
14646
|
let e = document.createElement("div");
|
|
14630
|
-
return e.className = "ProseMirror-gapcursor", K.create(n.doc, [
|
|
14647
|
+
return e.className = "ProseMirror-gapcursor", K.create(n.doc, [Me.widget(n.selection.head, e, { key: "gapcursor" })]);
|
|
14631
14648
|
}
|
|
14632
|
-
const
|
|
14649
|
+
const qg = de.create({
|
|
14633
14650
|
name: "gapCursor",
|
|
14634
14651
|
addProseMirrorPlugins() {
|
|
14635
14652
|
return [
|
|
14636
|
-
|
|
14653
|
+
Fg()
|
|
14637
14654
|
];
|
|
14638
14655
|
},
|
|
14639
14656
|
extendNodeSchema(n) {
|
|
@@ -14647,7 +14664,7 @@ const Wg = de.create({
|
|
|
14647
14664
|
allowGapCursor: (e = P(C(n, "allowGapCursor", t))) !== null && e !== void 0 ? e : null
|
|
14648
14665
|
};
|
|
14649
14666
|
}
|
|
14650
|
-
}),
|
|
14667
|
+
}), Kg = se.create({
|
|
14651
14668
|
name: "hardBreak",
|
|
14652
14669
|
addOptions() {
|
|
14653
14670
|
return {
|
|
@@ -14696,7 +14713,7 @@ const Wg = de.create({
|
|
|
14696
14713
|
"Shift-Enter": () => this.editor.commands.setHardBreak()
|
|
14697
14714
|
};
|
|
14698
14715
|
}
|
|
14699
|
-
}),
|
|
14716
|
+
}), Jg = se.create({
|
|
14700
14717
|
name: "heading",
|
|
14701
14718
|
addOptions() {
|
|
14702
14719
|
return {
|
|
@@ -14755,7 +14772,7 @@ G.prototype.prepend = function(e) {
|
|
|
14755
14772
|
return e.length ? G.from(e).append(this) : this;
|
|
14756
14773
|
};
|
|
14757
14774
|
G.prototype.appendInner = function(e) {
|
|
14758
|
-
return new
|
|
14775
|
+
return new _g(this, e);
|
|
14759
14776
|
};
|
|
14760
14777
|
G.prototype.slice = function(e, t) {
|
|
14761
14778
|
return e === void 0 && (e = 0), t === void 0 && (t = this.length), e >= t ? G.empty : this.sliceInner(Math.max(0, e), Math.min(this.length, t));
|
|
@@ -14810,7 +14827,7 @@ var hc = /* @__PURE__ */ function(n) {
|
|
|
14810
14827
|
}, Object.defineProperties(e.prototype, t), e;
|
|
14811
14828
|
}(G);
|
|
14812
14829
|
G.empty = new hc([]);
|
|
14813
|
-
var
|
|
14830
|
+
var _g = /* @__PURE__ */ function(n) {
|
|
14814
14831
|
function e(t, r) {
|
|
14815
14832
|
n.call(this), this.left = t, this.right = r, this.length = t.length + r.length, this.depth = Math.max(t.depth, r.depth) + 1;
|
|
14816
14833
|
}
|
|
@@ -14843,8 +14860,8 @@ var Jg = /* @__PURE__ */ function(n) {
|
|
|
14843
14860
|
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);
|
|
14844
14861
|
}, e;
|
|
14845
14862
|
}(G);
|
|
14846
|
-
const
|
|
14847
|
-
class
|
|
14863
|
+
const Ug = 500;
|
|
14864
|
+
class De {
|
|
14848
14865
|
constructor(e, t) {
|
|
14849
14866
|
this.items = e, this.eventCount = t;
|
|
14850
14867
|
}
|
|
@@ -14868,24 +14885,24 @@ class Ne {
|
|
|
14868
14885
|
return;
|
|
14869
14886
|
}
|
|
14870
14887
|
if (i) {
|
|
14871
|
-
u.push(new
|
|
14888
|
+
u.push(new ze(d.map));
|
|
14872
14889
|
let h = d.step.map(i.slice(s)), p;
|
|
14873
|
-
h && o.maybeStep(h).doc && (p = o.mapping.maps[o.mapping.maps.length - 1], c.push(new
|
|
14890
|
+
h && o.maybeStep(h).doc && (p = o.mapping.maps[o.mapping.maps.length - 1], c.push(new ze(p, void 0, void 0, c.length + u.length))), s--, p && i.appendMap(p, s);
|
|
14874
14891
|
} else
|
|
14875
14892
|
o.maybeStep(d.step);
|
|
14876
14893
|
if (d.selection)
|
|
14877
|
-
return l = i ? d.selection.map(i.slice(s)) : d.selection, a = new
|
|
14894
|
+
return l = i ? d.selection.map(i.slice(s)) : d.selection, a = new De(this.items.slice(0, r).append(u.reverse().concat(c)), this.eventCount - 1), !1;
|
|
14878
14895
|
}, this.items.length, 0), { remaining: a, transform: o, selection: l };
|
|
14879
14896
|
}
|
|
14880
14897
|
// Create a new branch with the given transform added.
|
|
14881
14898
|
addTransform(e, t, r, i) {
|
|
14882
14899
|
let s = [], o = this.eventCount, l = this.items, a = !i && l.length ? l.get(l.length - 1) : null;
|
|
14883
14900
|
for (let u = 0; u < e.steps.length; u++) {
|
|
14884
|
-
let d = e.steps[u].invert(e.docs[u]), f = new
|
|
14901
|
+
let d = e.steps[u].invert(e.docs[u]), f = new ze(e.mapping.maps[u], d, t), h;
|
|
14885
14902
|
(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);
|
|
14886
14903
|
}
|
|
14887
14904
|
let c = o - r.depth;
|
|
14888
|
-
return c >
|
|
14905
|
+
return c > Yg && (l = Gg(l, c), o -= c), new De(l.append(s), o);
|
|
14889
14906
|
}
|
|
14890
14907
|
remapping(e, t) {
|
|
14891
14908
|
let r = new en();
|
|
@@ -14895,7 +14912,7 @@ class Ne {
|
|
|
14895
14912
|
}, e, t), r;
|
|
14896
14913
|
}
|
|
14897
14914
|
addMaps(e) {
|
|
14898
|
-
return this.eventCount == 0 ? this : new
|
|
14915
|
+
return this.eventCount == 0 ? this : new De(this.items.append(e.map((t) => new ze(t))), this.eventCount);
|
|
14899
14916
|
}
|
|
14900
14917
|
// When the collab module receives remote changes, the history has
|
|
14901
14918
|
// to know about those, so that it can adjust the steps that were
|
|
@@ -14917,15 +14934,15 @@ class Ne {
|
|
|
14917
14934
|
let p = s.maps[h];
|
|
14918
14935
|
if (f.step) {
|
|
14919
14936
|
let m = e.steps[h].invert(e.docs[h]), y = f.selection && f.selection.map(s.slice(a + 1, h));
|
|
14920
|
-
y && l++, r.push(new
|
|
14937
|
+
y && l++, r.push(new ze(p, m, y));
|
|
14921
14938
|
} else
|
|
14922
|
-
r.push(new
|
|
14939
|
+
r.push(new ze(p));
|
|
14923
14940
|
}, i);
|
|
14924
14941
|
let c = [];
|
|
14925
14942
|
for (let f = t; f < o; f++)
|
|
14926
|
-
c.push(new
|
|
14927
|
-
let u = this.items.slice(0, i).append(c).append(r), d = new
|
|
14928
|
-
return d.emptyItemCount() >
|
|
14943
|
+
c.push(new ze(s.maps[f]));
|
|
14944
|
+
let u = this.items.slice(0, i).append(c).append(r), d = new De(u, l);
|
|
14945
|
+
return d.emptyItemCount() > Ug && (d = d.compress(this.items.length - r.length)), d;
|
|
14929
14946
|
}
|
|
14930
14947
|
emptyItemCount() {
|
|
14931
14948
|
let e = 0;
|
|
@@ -14949,22 +14966,22 @@ class Ne {
|
|
|
14949
14966
|
if (r--, c && t.appendMap(c, r), a) {
|
|
14950
14967
|
let u = o.selection && o.selection.map(t.slice(r));
|
|
14951
14968
|
u && s++;
|
|
14952
|
-
let d = new
|
|
14969
|
+
let d = new ze(c.invert(), a, u), f, h = i.length - 1;
|
|
14953
14970
|
(f = i.length && i[h].merge(d)) ? i[h] = f : i.push(d);
|
|
14954
14971
|
}
|
|
14955
14972
|
} else o.map && r--;
|
|
14956
|
-
}, this.items.length, 0), new
|
|
14973
|
+
}, this.items.length, 0), new De(G.from(i.reverse()), s);
|
|
14957
14974
|
}
|
|
14958
14975
|
}
|
|
14959
|
-
|
|
14960
|
-
function
|
|
14976
|
+
De.empty = new De(G.empty, 0);
|
|
14977
|
+
function Gg(n, e) {
|
|
14961
14978
|
let t;
|
|
14962
14979
|
return n.forEach((r, i) => {
|
|
14963
14980
|
if (r.selection && e-- == 0)
|
|
14964
14981
|
return t = i, !1;
|
|
14965
14982
|
}), n.slice(t);
|
|
14966
14983
|
}
|
|
14967
|
-
class
|
|
14984
|
+
class ze {
|
|
14968
14985
|
constructor(e, t, r, i) {
|
|
14969
14986
|
this.map = e, this.step = t, this.selection = r, this.mirrorOffset = i;
|
|
14970
14987
|
}
|
|
@@ -14972,7 +14989,7 @@ class Le {
|
|
|
14972
14989
|
if (this.step && e.step && !e.selection) {
|
|
14973
14990
|
let t = e.step.merge(this.step);
|
|
14974
14991
|
if (t)
|
|
14975
|
-
return new
|
|
14992
|
+
return new ze(t.getMap().invert(), t, this.selection);
|
|
14976
14993
|
}
|
|
14977
14994
|
}
|
|
14978
14995
|
}
|
|
@@ -14981,23 +14998,23 @@ class ot {
|
|
|
14981
14998
|
this.done = e, this.undone = t, this.prevRanges = r, this.prevTime = i, this.prevComposition = s;
|
|
14982
14999
|
}
|
|
14983
15000
|
}
|
|
14984
|
-
const
|
|
14985
|
-
function
|
|
15001
|
+
const Yg = 20;
|
|
15002
|
+
function Xg(n, e, t, r) {
|
|
14986
15003
|
let i = t.getMeta(Bt), s;
|
|
14987
15004
|
if (i)
|
|
14988
15005
|
return i.historyState;
|
|
14989
|
-
t.getMeta(
|
|
15006
|
+
t.getMeta(ey) && (n = new ot(n.done, n.undone, null, 0, -1));
|
|
14990
15007
|
let o = t.getMeta("appendedTransaction");
|
|
14991
15008
|
if (t.steps.length == 0)
|
|
14992
15009
|
return n;
|
|
14993
15010
|
if (o && o.getMeta(Bt))
|
|
14994
15011
|
return o.getMeta(Bt).redo ? new ot(n.done.addTransform(t, void 0, r, Cr(e)), n.undone, ul(t.mapping.maps), n.prevTime, n.prevComposition) : new ot(n.done, n.undone.addTransform(t, void 0, r, Cr(e)), null, n.prevTime, n.prevComposition);
|
|
14995
15012
|
if (t.getMeta("addToHistory") !== !1 && !(o && o.getMeta("addToHistory") === !1)) {
|
|
14996
|
-
let l = t.getMeta("composition"), a = n.prevTime == 0 || !o && n.prevComposition != l && (n.prevTime < (t.time || 0) - r.newGroupDelay || !
|
|
14997
|
-
return new ot(n.done.addTransform(t, a ? e.selection.getBookmark() : void 0, r, Cr(e)),
|
|
15013
|
+
let l = t.getMeta("composition"), a = n.prevTime == 0 || !o && n.prevComposition != l && (n.prevTime < (t.time || 0) - r.newGroupDelay || !Zg(t, n.prevRanges)), c = o ? Ti(n.prevRanges, t.mapping) : ul(t.mapping.maps);
|
|
15014
|
+
return new ot(n.done.addTransform(t, a ? e.selection.getBookmark() : void 0, r, Cr(e)), De.empty, c, t.time, l ?? n.prevComposition);
|
|
14998
15015
|
} else return (s = t.getMeta("rebased")) ? new ot(n.done.rebased(t, s), n.undone.rebased(t, s), Ti(n.prevRanges, t.mapping), n.prevTime, n.prevComposition) : new ot(n.done.addMaps(t.mapping.maps), n.undone.addMaps(t.mapping.maps), Ti(n.prevRanges, t.mapping), n.prevTime, n.prevComposition);
|
|
14999
15016
|
}
|
|
15000
|
-
function
|
|
15017
|
+
function Zg(n, e) {
|
|
15001
15018
|
if (!e)
|
|
15002
15019
|
return !1;
|
|
15003
15020
|
if (!n.docChanged)
|
|
@@ -15024,7 +15041,7 @@ function Ti(n, e) {
|
|
|
15024
15041
|
}
|
|
15025
15042
|
return t;
|
|
15026
15043
|
}
|
|
15027
|
-
function
|
|
15044
|
+
function Qg(n, e, t) {
|
|
15028
15045
|
let r = Cr(e), i = Bt.get(e).spec.config, s = (t ? n.undone : n.done).popEvent(e, r);
|
|
15029
15046
|
if (!s)
|
|
15030
15047
|
return null;
|
|
@@ -15044,8 +15061,8 @@ function Cr(n) {
|
|
|
15044
15061
|
}
|
|
15045
15062
|
return Ei;
|
|
15046
15063
|
}
|
|
15047
|
-
const Bt = new Ke("history"),
|
|
15048
|
-
function
|
|
15064
|
+
const Bt = new Ke("history"), ey = new Ke("closeHistory");
|
|
15065
|
+
function ty(n = {}) {
|
|
15049
15066
|
return n = {
|
|
15050
15067
|
depth: n.depth || 100,
|
|
15051
15068
|
newGroupDelay: n.newGroupDelay || 500
|
|
@@ -15053,10 +15070,10 @@ function ey(n = {}) {
|
|
|
15053
15070
|
key: Bt,
|
|
15054
15071
|
state: {
|
|
15055
15072
|
init() {
|
|
15056
|
-
return new ot(
|
|
15073
|
+
return new ot(De.empty, De.empty, null, 0, -1);
|
|
15057
15074
|
},
|
|
15058
15075
|
apply(e, t, r) {
|
|
15059
|
-
return
|
|
15076
|
+
return Xg(t, r, e, n);
|
|
15060
15077
|
}
|
|
15061
15078
|
},
|
|
15062
15079
|
config: n,
|
|
@@ -15076,13 +15093,13 @@ function pc(n, e) {
|
|
|
15076
15093
|
if (!i || (n ? i.undone : i.done).eventCount == 0)
|
|
15077
15094
|
return !1;
|
|
15078
15095
|
if (r) {
|
|
15079
|
-
let s =
|
|
15096
|
+
let s = Qg(i, t, n);
|
|
15080
15097
|
s && r(e ? s.scrollIntoView() : s);
|
|
15081
15098
|
}
|
|
15082
15099
|
return !0;
|
|
15083
15100
|
};
|
|
15084
15101
|
}
|
|
15085
|
-
const mc = pc(!1, !0), gc = pc(!0, !0),
|
|
15102
|
+
const mc = pc(!1, !0), gc = pc(!0, !0), ny = de.create({
|
|
15086
15103
|
name: "history",
|
|
15087
15104
|
addOptions() {
|
|
15088
15105
|
return {
|
|
@@ -15098,7 +15115,7 @@ const mc = pc(!1, !0), gc = pc(!0, !0), ty = de.create({
|
|
|
15098
15115
|
},
|
|
15099
15116
|
addProseMirrorPlugins() {
|
|
15100
15117
|
return [
|
|
15101
|
-
|
|
15118
|
+
ty(this.options)
|
|
15102
15119
|
];
|
|
15103
15120
|
},
|
|
15104
15121
|
addKeyboardShortcuts() {
|
|
@@ -15111,7 +15128,7 @@ const mc = pc(!1, !0), gc = pc(!0, !0), ty = de.create({
|
|
|
15111
15128
|
"Shift-Mod-я": () => this.editor.commands.redo()
|
|
15112
15129
|
};
|
|
15113
15130
|
}
|
|
15114
|
-
}),
|
|
15131
|
+
}), ry = se.create({
|
|
15115
15132
|
name: "horizontalRule",
|
|
15116
15133
|
addOptions() {
|
|
15117
15134
|
return {
|
|
@@ -15155,13 +15172,13 @@ const mc = pc(!1, !0), gc = pc(!0, !0), ty = de.create({
|
|
|
15155
15172
|
},
|
|
15156
15173
|
addInputRules() {
|
|
15157
15174
|
return [
|
|
15158
|
-
|
|
15175
|
+
Rp({
|
|
15159
15176
|
find: /^(?:---|—-|___\s|\*\*\*\s)$/,
|
|
15160
15177
|
type: this.type
|
|
15161
15178
|
})
|
|
15162
15179
|
];
|
|
15163
15180
|
}
|
|
15164
|
-
}),
|
|
15181
|
+
}), iy = /(?:^|\s)(\*(?!\s+\*)((?:[^*]+))\*(?!\s+\*))$/, sy = /(?:^|\s)(\*(?!\s+\*)((?:[^*]+))\*(?!\s+\*))/g, oy = /(?:^|\s)(_(?!\s+_)((?:[^_]+))_(?!\s+_))$/, ly = /(?:^|\s)(_(?!\s+_)((?:[^_]+))_(?!\s+_))/g, ay = We.create({
|
|
15165
15182
|
name: "italic",
|
|
15166
15183
|
addOptions() {
|
|
15167
15184
|
return {
|
|
@@ -15201,11 +15218,11 @@ const mc = pc(!1, !0), gc = pc(!0, !0), ty = de.create({
|
|
|
15201
15218
|
addInputRules() {
|
|
15202
15219
|
return [
|
|
15203
15220
|
cn({
|
|
15204
|
-
find:
|
|
15221
|
+
find: iy,
|
|
15205
15222
|
type: this.type
|
|
15206
15223
|
}),
|
|
15207
15224
|
cn({
|
|
15208
|
-
find:
|
|
15225
|
+
find: oy,
|
|
15209
15226
|
type: this.type
|
|
15210
15227
|
})
|
|
15211
15228
|
];
|
|
@@ -15213,16 +15230,16 @@ const mc = pc(!1, !0), gc = pc(!0, !0), ty = de.create({
|
|
|
15213
15230
|
addPasteRules() {
|
|
15214
15231
|
return [
|
|
15215
15232
|
un({
|
|
15216
|
-
find:
|
|
15233
|
+
find: sy,
|
|
15217
15234
|
type: this.type
|
|
15218
15235
|
}),
|
|
15219
15236
|
un({
|
|
15220
|
-
find:
|
|
15237
|
+
find: ly,
|
|
15221
15238
|
type: this.type
|
|
15222
15239
|
})
|
|
15223
15240
|
];
|
|
15224
15241
|
}
|
|
15225
|
-
}),
|
|
15242
|
+
}), cy = se.create({
|
|
15226
15243
|
name: "listItem",
|
|
15227
15244
|
addOptions() {
|
|
15228
15245
|
return {
|
|
@@ -15250,7 +15267,7 @@ const mc = pc(!1, !0), gc = pc(!0, !0), ty = de.create({
|
|
|
15250
15267
|
"Shift-Tab": () => this.editor.commands.liftListItem(this.name)
|
|
15251
15268
|
};
|
|
15252
15269
|
}
|
|
15253
|
-
}),
|
|
15270
|
+
}), uy = se.create({
|
|
15254
15271
|
name: "listItem",
|
|
15255
15272
|
addOptions() {
|
|
15256
15273
|
return {
|
|
@@ -15305,7 +15322,7 @@ const mc = pc(!1, !0), gc = pc(!0, !0), ty = de.create({
|
|
|
15305
15322
|
}
|
|
15306
15323
|
};
|
|
15307
15324
|
}
|
|
15308
|
-
}), hl = /^(\d+)\.\s$/,
|
|
15325
|
+
}), hl = /^(\d+)\.\s$/, dy = se.create({
|
|
15309
15326
|
name: "orderedList",
|
|
15310
15327
|
addOptions() {
|
|
15311
15328
|
return {
|
|
@@ -15344,7 +15361,7 @@ const mc = pc(!1, !0), gc = pc(!0, !0), ty = de.create({
|
|
|
15344
15361
|
},
|
|
15345
15362
|
addCommands() {
|
|
15346
15363
|
return {
|
|
15347
|
-
toggleOrderedList: () => ({ commands: n, chain: e }) => this.options.keepAttributes ? e().toggleList(this.name, this.options.itemTypeName, this.options.keepMarks).updateAttributes(
|
|
15364
|
+
toggleOrderedList: () => ({ commands: n, chain: e }) => this.options.keepAttributes ? e().toggleList(this.name, this.options.itemTypeName, this.options.keepMarks).updateAttributes(uy.name, this.editor.getAttributes(fl.name)).run() : n.toggleList(this.name, this.options.itemTypeName, this.options.keepMarks)
|
|
15348
15365
|
};
|
|
15349
15366
|
},
|
|
15350
15367
|
addKeyboardShortcuts() {
|
|
@@ -15371,7 +15388,7 @@ const mc = pc(!1, !0), gc = pc(!0, !0), ty = de.create({
|
|
|
15371
15388
|
n
|
|
15372
15389
|
];
|
|
15373
15390
|
}
|
|
15374
|
-
}),
|
|
15391
|
+
}), fy = se.create({
|
|
15375
15392
|
name: "paragraph",
|
|
15376
15393
|
priority: 1e3,
|
|
15377
15394
|
addOptions() {
|
|
@@ -15399,7 +15416,7 @@ const mc = pc(!1, !0), gc = pc(!0, !0), ty = de.create({
|
|
|
15399
15416
|
"Mod-Alt-0": () => this.editor.commands.setParagraph()
|
|
15400
15417
|
};
|
|
15401
15418
|
}
|
|
15402
|
-
}),
|
|
15419
|
+
}), hy = /(?:^|\s)(~~(?!\s+~~)((?:[^~]+))~~(?!\s+~~))$/, py = /(?:^|\s)(~~(?!\s+~~)((?:[^~]+))~~(?!\s+~~))/g, my = We.create({
|
|
15403
15420
|
name: "strike",
|
|
15404
15421
|
addOptions() {
|
|
15405
15422
|
return {
|
|
@@ -15442,7 +15459,7 @@ const mc = pc(!1, !0), gc = pc(!0, !0), ty = de.create({
|
|
|
15442
15459
|
addInputRules() {
|
|
15443
15460
|
return [
|
|
15444
15461
|
cn({
|
|
15445
|
-
find:
|
|
15462
|
+
find: hy,
|
|
15446
15463
|
type: this.type
|
|
15447
15464
|
})
|
|
15448
15465
|
];
|
|
@@ -15450,31 +15467,31 @@ const mc = pc(!1, !0), gc = pc(!0, !0), ty = de.create({
|
|
|
15450
15467
|
addPasteRules() {
|
|
15451
15468
|
return [
|
|
15452
15469
|
un({
|
|
15453
|
-
find:
|
|
15470
|
+
find: py,
|
|
15454
15471
|
type: this.type
|
|
15455
15472
|
})
|
|
15456
15473
|
];
|
|
15457
15474
|
}
|
|
15458
|
-
}),
|
|
15475
|
+
}), gy = se.create({
|
|
15459
15476
|
name: "text",
|
|
15460
15477
|
group: "inline"
|
|
15461
|
-
}),
|
|
15478
|
+
}), yy = de.create({
|
|
15462
15479
|
name: "starterKit",
|
|
15463
15480
|
addExtensions() {
|
|
15464
15481
|
var n, e, t, r, i, s, o, l, a, c, u, d, f, h, p, m, y, b;
|
|
15465
15482
|
const w = [];
|
|
15466
|
-
return this.options.bold !== !1 && w.push(
|
|
15483
|
+
return this.options.bold !== !1 && w.push(Mg.configure((n = this.options) === null || n === void 0 ? void 0 : n.bold)), this.options.blockquote !== !1 && w.push(vg.configure((e = this.options) === null || e === void 0 ? void 0 : e.blockquote)), this.options.bulletList !== !1 && w.push(Og.configure((t = this.options) === null || t === void 0 ? void 0 : t.bulletList)), this.options.code !== !1 && w.push(Ag.configure((r = this.options) === null || r === void 0 ? void 0 : r.code)), this.options.codeBlock !== !1 && w.push(Ig.configure((i = this.options) === null || i === void 0 ? void 0 : i.codeBlock)), this.options.document !== !1 && w.push(Rg.configure((s = this.options) === null || s === void 0 ? void 0 : s.document)), this.options.dropcursor !== !1 && w.push(Lg.configure((o = this.options) === null || o === void 0 ? void 0 : o.dropcursor)), this.options.gapcursor !== !1 && w.push(qg.configure((l = this.options) === null || l === void 0 ? void 0 : l.gapcursor)), this.options.hardBreak !== !1 && w.push(Kg.configure((a = this.options) === null || a === void 0 ? void 0 : a.hardBreak)), this.options.heading !== !1 && w.push(Jg.configure((c = this.options) === null || c === void 0 ? void 0 : c.heading)), this.options.history !== !1 && w.push(ny.configure((u = this.options) === null || u === void 0 ? void 0 : u.history)), this.options.horizontalRule !== !1 && w.push(ry.configure((d = this.options) === null || d === void 0 ? void 0 : d.horizontalRule)), this.options.italic !== !1 && w.push(ay.configure((f = this.options) === null || f === void 0 ? void 0 : f.italic)), this.options.listItem !== !1 && w.push(cy.configure((h = this.options) === null || h === void 0 ? void 0 : h.listItem)), this.options.orderedList !== !1 && w.push(dy.configure((p = this.options) === null || p === void 0 ? void 0 : p.orderedList)), this.options.paragraph !== !1 && w.push(fy.configure((m = this.options) === null || m === void 0 ? void 0 : m.paragraph)), this.options.strike !== !1 && w.push(my.configure((y = this.options) === null || y === void 0 ? void 0 : y.strike)), this.options.text !== !1 && w.push(gy.configure((b = this.options) === null || b === void 0 ? void 0 : b.text)), w;
|
|
15467
15484
|
}
|
|
15468
|
-
}),
|
|
15485
|
+
}), by = ["onClick"], vy = /* @__PURE__ */ mn({
|
|
15469
15486
|
__name: "UiEditor",
|
|
15470
15487
|
props: {
|
|
15471
15488
|
modelValue: {}
|
|
15472
15489
|
},
|
|
15473
15490
|
emits: ["update:modelValue"],
|
|
15474
15491
|
setup(n, { emit: e }) {
|
|
15475
|
-
const t = n, r = e, i = Ac(() => t.modelValue), s =
|
|
15492
|
+
const t = n, r = e, i = Ac(() => t.modelValue), s = yg({
|
|
15476
15493
|
content: i.value,
|
|
15477
|
-
extensions: [
|
|
15494
|
+
extensions: [yy],
|
|
15478
15495
|
onUpdate: () => {
|
|
15479
15496
|
r("update:modelValue", s.value?.getHTML());
|
|
15480
15497
|
}
|
|
@@ -15502,22 +15519,22 @@ const mc = pc(!1, !0), gc = pc(!0, !0), ty = de.create({
|
|
|
15502
15519
|
onClick: (u) => c.method(),
|
|
15503
15520
|
class: dr(l.$style.action),
|
|
15504
15521
|
type: "button"
|
|
15505
|
-
}, Rc(c.name), 11,
|
|
15522
|
+
}, Rc(c.name), 11, by)), 64))
|
|
15506
15523
|
], 2),
|
|
15507
|
-
Pc(Ai(
|
|
15524
|
+
Pc(Ai(gg), {
|
|
15508
15525
|
editor: Ai(s),
|
|
15509
15526
|
class: dr(l.$style.editor)
|
|
15510
15527
|
}, null, 8, ["editor", "class"])
|
|
15511
15528
|
], 2));
|
|
15512
15529
|
}
|
|
15513
|
-
}),
|
|
15514
|
-
container:
|
|
15515
|
-
actions:
|
|
15516
|
-
action:
|
|
15517
|
-
editor:
|
|
15518
|
-
},
|
|
15519
|
-
$style:
|
|
15520
|
-
},
|
|
15530
|
+
}), ky = "_container_1jv52_1", xy = "_actions_1jv52_18", wy = "_action_1jv52_18", Sy = "_editor_1jv52_41", My = {
|
|
15531
|
+
container: ky,
|
|
15532
|
+
actions: xy,
|
|
15533
|
+
action: wy,
|
|
15534
|
+
editor: Sy
|
|
15535
|
+
}, Cy = {
|
|
15536
|
+
$style: My
|
|
15537
|
+
}, Ay = /* @__PURE__ */ Bc(vy, [["__cssModules", Cy]]);
|
|
15521
15538
|
export {
|
|
15522
|
-
|
|
15539
|
+
Ay as default
|
|
15523
15540
|
};
|