@zealsolutions/zeal-ui 1.0.0-alpha.338 → 1.0.0-alpha.339
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/components/tiptap/index.js +311 -294
- package/package.json +1 -1
|
@@ -1,11 +1,11 @@
|
|
|
1
|
-
import { defineComponent as sr, ref as q, onMounted as
|
|
2
|
-
import { _ as
|
|
1
|
+
import { defineComponent as sr, ref as q, onMounted as Al, onBeforeUnmount as Fo, h as lr, getCurrentInstance as pp, watchEffect as hp, nextTick as mp, unref as V, markRaw as Sd, provide as ma, customRef as gp, reactive as yp, render as ga, computed as hn, openBlock as E, createBlock as X, withCtx as P, createElementVNode as x, normalizeClass as U, createElementBlock as j, createCommentVNode as W, createVNode as I, pushScopeId as bp, popScopeId as vp, createTextVNode as Be, resolveComponent as Tr, normalizeStyle as dn, withModifiers as xr, toDisplayString as kn, Fragment as Cn, renderList as Fr, withDirectives as xp, vShow as wp, Transition as kp, renderSlot as Cp, watch as Sp } from "vue";
|
|
2
|
+
import { _ as Ml } from "../../_plugin-vue_export-helper-CHgC5LLL.js";
|
|
3
3
|
import { DropdownMenu as Td, DropdownMenuItem as Tp } from "@zealsolutions/zeal-ui/menus";
|
|
4
4
|
import { BaseModal as qi } from "@zealsolutions/zeal-ui/modals";
|
|
5
|
-
import { InputField as
|
|
6
|
-
import { GearComplexIcon as
|
|
5
|
+
import { InputField as Ad, ToggleSwitch as Ap } from "@zealsolutions/zeal-ui/inputs";
|
|
6
|
+
import { GearComplexIcon as Mp, DownloadIcon as Ep, ChevronDownIcon as Op } from "@zealsolutions/zeal-ui/icons";
|
|
7
7
|
import { a as Vr, _ as jr } from "../../SecondaryButton-btKxXICN.js";
|
|
8
|
-
import { _ as
|
|
8
|
+
import { _ as Md } from "../../BaseModal-BUjYJ0hm.js";
|
|
9
9
|
import { _ as xi } from "../../FormField-XR9nvyQr.js";
|
|
10
10
|
import { _ as ds } from "../../InputField-BXS_YvPl.js";
|
|
11
11
|
import { e as Np } from "../../index-CedrSBIl.js";
|
|
@@ -564,7 +564,7 @@ let Z = class js {
|
|
|
564
564
|
Z.none = [];
|
|
565
565
|
class Ji extends Error {
|
|
566
566
|
}
|
|
567
|
-
class
|
|
567
|
+
class M {
|
|
568
568
|
/**
|
|
569
569
|
Create a slice. When specifying a non-zero open depth, you must
|
|
570
570
|
make sure that there are nodes of at least that depth at the
|
|
@@ -591,13 +591,13 @@ class A {
|
|
|
591
591
|
*/
|
|
592
592
|
insertAt(e, t) {
|
|
593
593
|
let r = Pd(this.content, e + this.openStart, t);
|
|
594
|
-
return r && new
|
|
594
|
+
return r && new M(r, this.openStart, this.openEnd);
|
|
595
595
|
}
|
|
596
596
|
/**
|
|
597
597
|
@internal
|
|
598
598
|
*/
|
|
599
599
|
removeBetween(e, t) {
|
|
600
|
-
return new
|
|
600
|
+
return new M(Ld(this.content, e + this.openStart, t + this.openStart), this.openStart, this.openEnd);
|
|
601
601
|
}
|
|
602
602
|
/**
|
|
603
603
|
Tests whether this slice is equal to another slice.
|
|
@@ -625,11 +625,11 @@ class A {
|
|
|
625
625
|
*/
|
|
626
626
|
static fromJSON(e, t) {
|
|
627
627
|
if (!t)
|
|
628
|
-
return
|
|
628
|
+
return M.empty;
|
|
629
629
|
let r = t.openStart || 0, i = t.openEnd || 0;
|
|
630
630
|
if (typeof r != "number" || typeof i != "number")
|
|
631
631
|
throw new RangeError("Invalid input for Slice.fromJSON");
|
|
632
|
-
return new
|
|
632
|
+
return new M(S.fromJSON(e, t.content), r, i);
|
|
633
633
|
}
|
|
634
634
|
/**
|
|
635
635
|
Create a slice from a fragment by taking the maximum possible
|
|
@@ -641,10 +641,10 @@ class A {
|
|
|
641
641
|
r++;
|
|
642
642
|
for (let o = e.lastChild; o && !o.isLeaf && (t || !o.type.spec.isolating); o = o.lastChild)
|
|
643
643
|
i++;
|
|
644
|
-
return new
|
|
644
|
+
return new M(e, r, i);
|
|
645
645
|
}
|
|
646
646
|
}
|
|
647
|
-
|
|
647
|
+
M.empty = new M(S.empty, 0, 0);
|
|
648
648
|
function Ld(n, e, t) {
|
|
649
649
|
let { index: r, offset: i } = n.findIndex(e), o = n.maybeChild(r), { index: s, offset: l } = n.findIndex(t);
|
|
650
650
|
if (i == e || o.isText) {
|
|
@@ -698,7 +698,7 @@ function mn(n, e) {
|
|
|
698
698
|
let t = e.length - 1;
|
|
699
699
|
t >= 0 && n.isText && n.sameMarkup(e[t]) ? e[t] = n.withText(e[t].text + n.text) : e.push(n);
|
|
700
700
|
}
|
|
701
|
-
function
|
|
701
|
+
function Ar(n, e, t, r) {
|
|
702
702
|
let i = (e || n).node(t), o = 0, s = e ? e.index(t) : i.childCount;
|
|
703
703
|
n && (o = n.index(t), n.depth > t ? o++ : n.textOffset && (mn(n.nodeAfter, r), o++));
|
|
704
704
|
for (let l = o; l < s; l++)
|
|
@@ -710,15 +710,15 @@ function gn(n, e) {
|
|
|
710
710
|
}
|
|
711
711
|
function $d(n, e, t, r, i) {
|
|
712
712
|
let o = n.depth > i && _s(n, e, i + 1), s = r.depth > i && _s(t, r, i + 1), l = [];
|
|
713
|
-
return
|
|
713
|
+
return Ar(null, n, i, l), o && s && e.index(i) == t.index(i) ? (zd(o, s), mn(gn(o, $d(n, e, t, r, i + 1)), l)) : (o && mn(gn(o, Gi(n, e, i + 1)), l), Ar(e, t, i, l), s && mn(gn(s, Gi(t, r, i + 1)), l)), Ar(r, null, i, l), new S(l);
|
|
714
714
|
}
|
|
715
715
|
function Gi(n, e, t) {
|
|
716
716
|
let r = [];
|
|
717
|
-
if (
|
|
717
|
+
if (Ar(null, n, t, r), n.depth > t) {
|
|
718
718
|
let i = _s(n, e, t + 1);
|
|
719
719
|
mn(gn(i, Gi(n, e, t + 1)), r);
|
|
720
720
|
}
|
|
721
|
-
return
|
|
721
|
+
return Ar(e, null, t, r), new S(r);
|
|
722
722
|
}
|
|
723
723
|
function Ip(n, e) {
|
|
724
724
|
let t = e.depth - n.openStart, i = e.node(t).copy(n.content);
|
|
@@ -1165,9 +1165,9 @@ let yn = class Ws {
|
|
|
1165
1165
|
*/
|
|
1166
1166
|
slice(e, t = this.content.size, r = !1) {
|
|
1167
1167
|
if (e == t)
|
|
1168
|
-
return
|
|
1168
|
+
return M.empty;
|
|
1169
1169
|
let i = this.resolve(e), o = this.resolve(t), s = r ? 0 : i.sharedDepth(t), l = i.start(s), c = i.node(s).content.cut(i.pos - l, o.pos - l);
|
|
1170
|
-
return new
|
|
1170
|
+
return new M(c, i.depth - s, o.depth - s);
|
|
1171
1171
|
}
|
|
1172
1172
|
/**
|
|
1173
1173
|
Replace the part of the document between the given positions with
|
|
@@ -1636,14 +1636,14 @@ function Hp(n) {
|
|
|
1636
1636
|
break;
|
|
1637
1637
|
return e;
|
|
1638
1638
|
}
|
|
1639
|
-
function
|
|
1639
|
+
function Aa(n) {
|
|
1640
1640
|
/\D/.test(n.next) && n.err("Expected number, got '" + n.next + "'");
|
|
1641
1641
|
let e = Number(n.next);
|
|
1642
1642
|
return n.pos++, e;
|
|
1643
1643
|
}
|
|
1644
1644
|
function Fp(n, e) {
|
|
1645
|
-
let t =
|
|
1646
|
-
return n.eat(",") && (n.next != "}" ? r =
|
|
1645
|
+
let t = Aa(n), r = t;
|
|
1646
|
+
return n.eat(",") && (n.next != "}" ? r = Aa(n) : r = -1), n.eat("}") || n.err("Unclosed braced range"), { type: "range", min: t, max: r, expr: e };
|
|
1647
1647
|
}
|
|
1648
1648
|
function Vp(n, e) {
|
|
1649
1649
|
let t = n.nodeTypes, r = t[e];
|
|
@@ -1724,7 +1724,7 @@ function _p(n) {
|
|
|
1724
1724
|
function Vd(n, e) {
|
|
1725
1725
|
return e - n;
|
|
1726
1726
|
}
|
|
1727
|
-
function
|
|
1727
|
+
function Ma(n, e) {
|
|
1728
1728
|
let t = [];
|
|
1729
1729
|
return r(e), t.sort(Vd);
|
|
1730
1730
|
function r(i) {
|
|
@@ -1740,7 +1740,7 @@ function Aa(n, e) {
|
|
|
1740
1740
|
}
|
|
1741
1741
|
function Wp(n) {
|
|
1742
1742
|
let e = /* @__PURE__ */ Object.create(null);
|
|
1743
|
-
return t(
|
|
1743
|
+
return t(Ma(n, 0));
|
|
1744
1744
|
function t(r) {
|
|
1745
1745
|
let i = [];
|
|
1746
1746
|
r.forEach((s) => {
|
|
@@ -1750,7 +1750,7 @@ function Wp(n) {
|
|
|
1750
1750
|
let c;
|
|
1751
1751
|
for (let d = 0; d < i.length; d++)
|
|
1752
1752
|
i[d][0] == l && (c = i[d][1]);
|
|
1753
|
-
|
|
1753
|
+
Ma(n, a).forEach((d) => {
|
|
1754
1754
|
c || i.push([l, c = []]), c.indexOf(d) == -1 && c.push(d);
|
|
1755
1755
|
});
|
|
1756
1756
|
});
|
|
@@ -2209,7 +2209,7 @@ class qt {
|
|
|
2209
2209
|
*/
|
|
2210
2210
|
parseSlice(e, t = {}) {
|
|
2211
2211
|
let r = new Da(this, t, !0);
|
|
2212
|
-
return r.addAll(e, Z.none, t.from, t.to),
|
|
2212
|
+
return r.addAll(e, Z.none, t.from, t.to), M.maxOpen(r.finish());
|
|
2213
2213
|
}
|
|
2214
2214
|
/**
|
|
2215
2215
|
@internal
|
|
@@ -2325,13 +2325,13 @@ const Jd = {
|
|
|
2325
2325
|
script: !0,
|
|
2326
2326
|
style: !0,
|
|
2327
2327
|
title: !0
|
|
2328
|
-
}, Gd = { ol: !0, ul: !0 }, Qi = 1, Zi = 2,
|
|
2328
|
+
}, Gd = { ol: !0, ul: !0 }, Qi = 1, Zi = 2, Mr = 4;
|
|
2329
2329
|
function Na(n, e, t) {
|
|
2330
|
-
return e != null ? (e ? Qi : 0) | (e === "full" ? Zi : 0) : n && n.whitespace == "pre" ? Qi | Zi : t & ~
|
|
2330
|
+
return e != null ? (e ? Qi : 0) | (e === "full" ? Zi : 0) : n && n.whitespace == "pre" ? Qi | Zi : t & ~Mr;
|
|
2331
2331
|
}
|
|
2332
2332
|
class ki {
|
|
2333
2333
|
constructor(e, t, r, i, o, s) {
|
|
2334
|
-
this.type = e, this.attrs = t, this.marks = r, this.solid = i, this.options = s, this.content = [], this.activeMarks = Z.none, this.match = o || (s &
|
|
2334
|
+
this.type = e, this.attrs = t, this.marks = r, this.solid = i, this.options = s, this.content = [], this.activeMarks = Z.none, this.match = o || (s & Mr ? null : e.contentMatch);
|
|
2335
2335
|
}
|
|
2336
2336
|
findWrapping(e) {
|
|
2337
2337
|
if (!this.match) {
|
|
@@ -2365,7 +2365,7 @@ class ki {
|
|
|
2365
2365
|
class Da {
|
|
2366
2366
|
constructor(e, t, r) {
|
|
2367
2367
|
this.parser = e, this.options = t, this.isOpen = r, this.open = 0;
|
|
2368
|
-
let i = t.topNode, o, s = Na(null, t.preserveWhitespace, 0) | (r ?
|
|
2368
|
+
let i = t.topNode, o, s = Na(null, t.preserveWhitespace, 0) | (r ? Mr : 0);
|
|
2369
2369
|
i ? o = new ki(i.type, i.attrs, Z.none, !0, t.topMatch || i.type.contentMatch, s) : r ? o = new ki(null, null, Z.none, !0, null, s) : o = new ki(e.schema.topNodeType, null, Z.none, !0, null, s), this.nodes = [o], this.find = t.findPositions, this.needsBlock = !1;
|
|
2370
2370
|
}
|
|
2371
2371
|
get top() {
|
|
@@ -2532,7 +2532,7 @@ class Da {
|
|
|
2532
2532
|
let s = this.top;
|
|
2533
2533
|
s.match = s.match && s.match.matchType(e);
|
|
2534
2534
|
let l = Na(e, o, s.options);
|
|
2535
|
-
s.options &
|
|
2535
|
+
s.options & Mr && s.content.length == 0 && (l |= Mr);
|
|
2536
2536
|
let a = Z.none;
|
|
2537
2537
|
return r = r.filter((c) => (s.type ? s.type.allowsMarkType(c.type) : Ia(c.type, e)) ? (a = c.addToSet(a), !1) : !0), this.nodes.push(new ki(e, t, a, i, null, l)), this.open++, r;
|
|
2538
2538
|
}
|
|
@@ -3178,7 +3178,7 @@ class _t extends Oe {
|
|
|
3178
3178
|
super(), this.from = e, this.to = t, this.mark = r;
|
|
3179
3179
|
}
|
|
3180
3180
|
apply(e) {
|
|
3181
|
-
let t = e.slice(this.from, this.to), r = e.resolve(this.from), i = r.node(r.sharedDepth(this.to)), o = new
|
|
3181
|
+
let t = e.slice(this.from, this.to), r = e.resolve(this.from), i = r.node(r.sharedDepth(this.to)), o = new M(El(t.content, (s, l) => !s.isAtom || !l.type.allowsMarkType(this.mark.type) ? s : s.mark(this.mark.addToSet(s.marks)), i), t.openStart, t.openEnd);
|
|
3182
3182
|
return pe.fromReplace(e, this.from, this.to, o);
|
|
3183
3183
|
}
|
|
3184
3184
|
invert() {
|
|
@@ -3217,7 +3217,7 @@ class pt extends Oe {
|
|
|
3217
3217
|
super(), this.from = e, this.to = t, this.mark = r;
|
|
3218
3218
|
}
|
|
3219
3219
|
apply(e) {
|
|
3220
|
-
let t = e.slice(this.from, this.to), r = new
|
|
3220
|
+
let t = e.slice(this.from, this.to), r = new M(El(t.content, (i) => i.mark(this.mark.removeFromSet(i.marks)), e), t.openStart, t.openEnd);
|
|
3221
3221
|
return pe.fromReplace(e, this.from, this.to, r);
|
|
3222
3222
|
}
|
|
3223
3223
|
invert() {
|
|
@@ -3260,7 +3260,7 @@ class Wt extends Oe {
|
|
|
3260
3260
|
if (!t)
|
|
3261
3261
|
return pe.fail("No node at mark step's position");
|
|
3262
3262
|
let r = t.type.create(t.attrs, null, this.mark.addToSet(t.marks));
|
|
3263
|
-
return pe.fromReplace(e, this.pos, this.pos + 1, new
|
|
3263
|
+
return pe.fromReplace(e, this.pos, this.pos + 1, new M(S.from(r), 0, t.isLeaf ? 0 : 1));
|
|
3264
3264
|
}
|
|
3265
3265
|
invert(e) {
|
|
3266
3266
|
let t = e.nodeAt(this.pos);
|
|
@@ -3304,7 +3304,7 @@ class Yn extends Oe {
|
|
|
3304
3304
|
if (!t)
|
|
3305
3305
|
return pe.fail("No node at mark step's position");
|
|
3306
3306
|
let r = t.type.create(t.attrs, null, this.mark.removeFromSet(t.marks));
|
|
3307
|
-
return pe.fromReplace(e, this.pos, this.pos + 1, new
|
|
3307
|
+
return pe.fromReplace(e, this.pos, this.pos + 1, new M(S.from(r), 0, t.isLeaf ? 0 : 1));
|
|
3308
3308
|
}
|
|
3309
3309
|
invert(e) {
|
|
3310
3310
|
let t = e.nodeAt(this.pos);
|
|
@@ -3357,10 +3357,10 @@ class ge extends Oe {
|
|
|
3357
3357
|
if (!(e instanceof ge) || e.structure || this.structure)
|
|
3358
3358
|
return null;
|
|
3359
3359
|
if (this.from + this.slice.size == e.from && !this.slice.openEnd && !e.slice.openStart) {
|
|
3360
|
-
let t = this.slice.size + e.slice.size == 0 ?
|
|
3360
|
+
let t = this.slice.size + e.slice.size == 0 ? M.empty : new M(this.slice.content.append(e.slice.content), this.slice.openStart, e.slice.openEnd);
|
|
3361
3361
|
return new ge(this.from, this.to + (e.to - e.from), t, this.structure);
|
|
3362
3362
|
} else if (e.to == this.from && !this.slice.openStart && !e.slice.openEnd) {
|
|
3363
|
-
let t = this.slice.size + e.slice.size == 0 ?
|
|
3363
|
+
let t = this.slice.size + e.slice.size == 0 ? M.empty : new M(e.slice.content.append(this.slice.content), e.slice.openStart, this.slice.openEnd);
|
|
3364
3364
|
return new ge(e.from, this.to, t, this.structure);
|
|
3365
3365
|
} else
|
|
3366
3366
|
return null;
|
|
@@ -3375,7 +3375,7 @@ class ge extends Oe {
|
|
|
3375
3375
|
static fromJSON(e, t) {
|
|
3376
3376
|
if (typeof t.from != "number" || typeof t.to != "number")
|
|
3377
3377
|
throw new RangeError("Invalid input for ReplaceStep.fromJSON");
|
|
3378
|
-
return new ge(t.from, t.to,
|
|
3378
|
+
return new ge(t.from, t.to, M.fromJSON(e, t.slice), !!t.structure);
|
|
3379
3379
|
}
|
|
3380
3380
|
}
|
|
3381
3381
|
Oe.jsonID("replace", ge);
|
|
@@ -3433,7 +3433,7 @@ class ye extends Oe {
|
|
|
3433
3433
|
static fromJSON(e, t) {
|
|
3434
3434
|
if (typeof t.from != "number" || typeof t.to != "number" || typeof t.gapFrom != "number" || typeof t.gapTo != "number" || typeof t.insert != "number")
|
|
3435
3435
|
throw new RangeError("Invalid input for ReplaceAroundStep.fromJSON");
|
|
3436
|
-
return new ye(t.from, t.to, t.gapFrom, t.gapTo,
|
|
3436
|
+
return new ye(t.from, t.to, t.gapFrom, t.gapTo, M.fromJSON(e, t.slice), t.insert, !!t.structure);
|
|
3437
3437
|
}
|
|
3438
3438
|
}
|
|
3439
3439
|
Oe.jsonID("replaceAround", ye);
|
|
@@ -3496,7 +3496,7 @@ function Ol(n, e, t, r = t.contentMatch, i = !0) {
|
|
|
3496
3496
|
for (let a = 0; a < o.childCount; a++) {
|
|
3497
3497
|
let c = o.child(a), d = l + c.nodeSize, u = r.matchType(c.type);
|
|
3498
3498
|
if (!u)
|
|
3499
|
-
s.push(new ge(l, d,
|
|
3499
|
+
s.push(new ge(l, d, M.empty));
|
|
3500
3500
|
else {
|
|
3501
3501
|
r = u;
|
|
3502
3502
|
for (let f = 0; f < c.marks.length; f++)
|
|
@@ -3504,14 +3504,14 @@ function Ol(n, e, t, r = t.contentMatch, i = !0) {
|
|
|
3504
3504
|
if (i && c.isText && t.whitespace != "pre") {
|
|
3505
3505
|
let f, p = /\r?\n|\r/g, h;
|
|
3506
3506
|
for (; f = p.exec(c.text); )
|
|
3507
|
-
h || (h = new
|
|
3507
|
+
h || (h = new M(S.from(t.schema.text(" ", t.allowedMarks(c.marks))), 0, 0)), s.push(new ge(l + f.index, l + f.index + f[0].length, h));
|
|
3508
3508
|
}
|
|
3509
3509
|
}
|
|
3510
3510
|
l = d;
|
|
3511
3511
|
}
|
|
3512
3512
|
if (!r.validEnd) {
|
|
3513
3513
|
let a = r.fillBefore(S.empty, !0);
|
|
3514
|
-
n.replace(l, l, new
|
|
3514
|
+
n.replace(l, l, new M(a, 0, 0));
|
|
3515
3515
|
}
|
|
3516
3516
|
for (let a = s.length - 1; a >= 0; a--)
|
|
3517
3517
|
n.step(s[a]);
|
|
@@ -3537,7 +3537,7 @@ function sh(n, e, t) {
|
|
|
3537
3537
|
let f = S.empty, p = 0;
|
|
3538
3538
|
for (let h = o, m = !1; h > t; h--)
|
|
3539
3539
|
m || i.after(h + 1) < i.end(h) ? (m = !0, f = S.from(i.node(h).copy(f)), p++) : c++;
|
|
3540
|
-
n.step(new ye(a, c, s, l, new
|
|
3540
|
+
n.step(new ye(a, c, s, l, new M(d.append(f), u, p), d.size - u, !0));
|
|
3541
3541
|
}
|
|
3542
3542
|
function Nl(n, e, t = null, r = n) {
|
|
3543
3543
|
let i = lh(n, e), o = i && ah(r, e);
|
|
@@ -3573,7 +3573,7 @@ function ch(n, e, t) {
|
|
|
3573
3573
|
r = S.from(t[s].type.create(t[s].attrs, r));
|
|
3574
3574
|
}
|
|
3575
3575
|
let i = e.start, o = e.end;
|
|
3576
|
-
n.step(new ye(i, o, i, o, new
|
|
3576
|
+
n.step(new ye(i, o, i, o, new M(r, 0, 0), t.length, !0));
|
|
3577
3577
|
}
|
|
3578
3578
|
function dh(n, e, t, r, i) {
|
|
3579
3579
|
if (!r.isTextblock)
|
|
@@ -3589,7 +3589,7 @@ function dh(n, e, t, r, i) {
|
|
|
3589
3589
|
}
|
|
3590
3590
|
c === !1 && nu(n, s, l, o), Ol(n, n.mapping.slice(o).map(l, 1), r, void 0, c === null);
|
|
3591
3591
|
let d = n.mapping.slice(o), u = d.map(l, 1), f = d.map(l + s.nodeSize, 1);
|
|
3592
|
-
return n.step(new ye(u, f, u + 1, f - 1, new
|
|
3592
|
+
return n.step(new ye(u, f, u + 1, f - 1, new M(S.from(r.create(a, null, s.marks)), 0, 0), 1, !0)), c === !0 && tu(n, s, l, o), !1;
|
|
3593
3593
|
}
|
|
3594
3594
|
});
|
|
3595
3595
|
}
|
|
@@ -3627,7 +3627,7 @@ function fh(n, e, t, r, i) {
|
|
|
3627
3627
|
return n.replaceWith(e, e + o.nodeSize, s);
|
|
3628
3628
|
if (!t.validContent(o.content))
|
|
3629
3629
|
throw new RangeError("Invalid content for node type " + t.name);
|
|
3630
|
-
n.step(new ye(e, e + o.nodeSize, e + 1, e + o.nodeSize - 1, new
|
|
3630
|
+
n.step(new ye(e, e + o.nodeSize, e + 1, e + o.nodeSize - 1, new M(S.from(s), 0, 0), 1, !0));
|
|
3631
3631
|
}
|
|
3632
3632
|
function Kn(n, e, t = 1, r) {
|
|
3633
3633
|
let i = n.resolve(e), o = i.depth - t, s = r && r[r.length - 1] || i.parent;
|
|
@@ -3653,7 +3653,7 @@ function ph(n, e, t = 1, r) {
|
|
|
3653
3653
|
let d = r && r[c];
|
|
3654
3654
|
s = S.from(d ? d.type.create(d.attrs, s) : i.node(l).copy(s));
|
|
3655
3655
|
}
|
|
3656
|
-
n.step(new ge(e, e, new
|
|
3656
|
+
n.step(new ge(e, e, new M(o.append(s), t, t), !0));
|
|
3657
3657
|
}
|
|
3658
3658
|
function Xt(n, e) {
|
|
3659
3659
|
let t = n.resolve(e), r = t.index();
|
|
@@ -3696,7 +3696,7 @@ function mh(n, e, t) {
|
|
|
3696
3696
|
}
|
|
3697
3697
|
s.inlineContent && Ol(n, e + t - 1, s, o.node().contentMatchAt(o.index()), r == null);
|
|
3698
3698
|
let a = n.mapping.slice(l), c = a.map(e - t);
|
|
3699
|
-
if (n.step(new ge(c, a.map(e + t, -1),
|
|
3699
|
+
if (n.step(new ge(c, a.map(e + t, -1), M.empty, !0)), r === !0) {
|
|
3700
3700
|
let d = n.doc.resolve(c);
|
|
3701
3701
|
tu(n, d.node(), d.before(), n.steps.length);
|
|
3702
3702
|
}
|
|
@@ -3745,7 +3745,7 @@ function iu(n, e, t) {
|
|
|
3745
3745
|
}
|
|
3746
3746
|
return null;
|
|
3747
3747
|
}
|
|
3748
|
-
function _o(n, e, t = e, r =
|
|
3748
|
+
function _o(n, e, t = e, r = M.empty) {
|
|
3749
3749
|
if (e == t && !r.size)
|
|
3750
3750
|
return null;
|
|
3751
3751
|
let i = n.resolve(e), o = n.resolve(t);
|
|
@@ -3781,7 +3781,7 @@ class yh {
|
|
|
3781
3781
|
let o = this.placed, s = r.depth, l = i.depth;
|
|
3782
3782
|
for (; s && l && o.childCount == 1; )
|
|
3783
3783
|
o = o.firstChild.content, s--, l--;
|
|
3784
|
-
let a = new
|
|
3784
|
+
let a = new M(o, s, l);
|
|
3785
3785
|
return e > -1 ? new ye(r.pos, e, this.$to.pos, this.$to.end(), a, t) : a.size || r.pos != this.$to.pos ? new ge(r.pos, i.pos, a) : null;
|
|
3786
3786
|
}
|
|
3787
3787
|
// Find a position on the start spine of `this.unplaced` that has
|
|
@@ -3815,15 +3815,15 @@ class yh {
|
|
|
3815
3815
|
}
|
|
3816
3816
|
openMore() {
|
|
3817
3817
|
let { content: e, openStart: t, openEnd: r } = this.unplaced, i = hs(e, t);
|
|
3818
|
-
return !i.childCount || i.firstChild.isLeaf ? !1 : (this.unplaced = new
|
|
3818
|
+
return !i.childCount || i.firstChild.isLeaf ? !1 : (this.unplaced = new M(e, t + 1, Math.max(r, i.size + t >= e.size - r ? t + 1 : 0)), !0);
|
|
3819
3819
|
}
|
|
3820
3820
|
dropNode() {
|
|
3821
3821
|
let { content: e, openStart: t, openEnd: r } = this.unplaced, i = hs(e, t);
|
|
3822
3822
|
if (i.childCount <= 1 && t > 0) {
|
|
3823
3823
|
let o = e.size - t <= t + i.size;
|
|
3824
|
-
this.unplaced = new
|
|
3824
|
+
this.unplaced = new M(wr(e, t - 1, 1), t - 1, o ? t - 1 : r);
|
|
3825
3825
|
} else
|
|
3826
|
-
this.unplaced = new
|
|
3826
|
+
this.unplaced = new M(wr(e, t, 1), t, r);
|
|
3827
3827
|
}
|
|
3828
3828
|
// Move content from the unplaced slice at `sliceDepth` to the
|
|
3829
3829
|
// frontier node at `frontierDepth`. Close that frontier node when
|
|
@@ -3853,7 +3853,7 @@ class yh {
|
|
|
3853
3853
|
let y = g.lastChild;
|
|
3854
3854
|
this.frontier.push({ type: y.type, match: y.contentMatchAt(y.childCount) }), g = y.content;
|
|
3855
3855
|
}
|
|
3856
|
-
this.unplaced = h ? e == 0 ?
|
|
3856
|
+
this.unplaced = h ? e == 0 ? M.empty : new M(wr(s.content, e - 1, 1), e - 1, p < 0 ? s.openEnd : e - 1) : new M(wr(s.content, e, c), s.openStart, s.openEnd);
|
|
3857
3857
|
}
|
|
3858
3858
|
mustMoveInline() {
|
|
3859
3859
|
if (!this.$to.parent.isTextblock)
|
|
@@ -3973,7 +3973,7 @@ function xh(n, e, t, r) {
|
|
|
3973
3973
|
g < 0 && (y = !1, g = -g);
|
|
3974
3974
|
let v = i.node(g - 1), w = i.index(g - 1);
|
|
3975
3975
|
if (v.canReplaceWith(w, w, h.type, h.marks))
|
|
3976
|
-
return n.replace(i.before(g), y ? o.after(g) : t, new
|
|
3976
|
+
return n.replace(i.before(g), y ? o.after(g) : t, new M(lu(r.content, 0, r.openStart, p), p, r.openEnd));
|
|
3977
3977
|
}
|
|
3978
3978
|
}
|
|
3979
3979
|
let u = n.steps.length;
|
|
@@ -3998,7 +3998,7 @@ function wh(n, e, t, r) {
|
|
|
3998
3998
|
let i = gh(n.doc, e, r.type);
|
|
3999
3999
|
i != null && (e = t = i);
|
|
4000
4000
|
}
|
|
4001
|
-
n.replaceRange(e, t, new
|
|
4001
|
+
n.replaceRange(e, t, new M(S.from(r), 0, 0));
|
|
4002
4002
|
}
|
|
4003
4003
|
function kh(n, e, t) {
|
|
4004
4004
|
let r = n.doc.resolve(e), i = n.doc.resolve(t), o = au(r, i);
|
|
@@ -4040,7 +4040,7 @@ class Jn extends Oe {
|
|
|
4040
4040
|
r[o] = t.attrs[o];
|
|
4041
4041
|
r[this.attr] = this.value;
|
|
4042
4042
|
let i = t.type.create(r, null, t.marks);
|
|
4043
|
-
return pe.fromReplace(e, this.pos, this.pos + 1, new
|
|
4043
|
+
return pe.fromReplace(e, this.pos, this.pos + 1, new M(S.from(i), 0, t.isLeaf ? 0 : 1));
|
|
4044
4044
|
}
|
|
4045
4045
|
getMap() {
|
|
4046
4046
|
return Fe.empty;
|
|
@@ -4153,7 +4153,7 @@ class Dl {
|
|
|
4153
4153
|
Replace the part of the document between `from` and `to` with the
|
|
4154
4154
|
given `slice`.
|
|
4155
4155
|
*/
|
|
4156
|
-
replace(e, t = e, r =
|
|
4156
|
+
replace(e, t = e, r = M.empty) {
|
|
4157
4157
|
let i = _o(this.doc, e, t, r);
|
|
4158
4158
|
return i && this.step(i), this;
|
|
4159
4159
|
}
|
|
@@ -4162,13 +4162,13 @@ class Dl {
|
|
|
4162
4162
|
fragment, node, or array of nodes.
|
|
4163
4163
|
*/
|
|
4164
4164
|
replaceWith(e, t, r) {
|
|
4165
|
-
return this.replace(e, t, new
|
|
4165
|
+
return this.replace(e, t, new M(S.from(r), 0, 0));
|
|
4166
4166
|
}
|
|
4167
4167
|
/**
|
|
4168
4168
|
Delete the content between the given positions.
|
|
4169
4169
|
*/
|
|
4170
4170
|
delete(e, t) {
|
|
4171
|
-
return this.replace(e, t,
|
|
4171
|
+
return this.replace(e, t, M.empty);
|
|
4172
4172
|
}
|
|
4173
4173
|
/**
|
|
4174
4174
|
Insert the given content at the given position.
|
|
@@ -4391,14 +4391,14 @@ class z {
|
|
|
4391
4391
|
Replace the selection with a slice or, if no slice is given,
|
|
4392
4392
|
delete the selection. Will append to the given transaction.
|
|
4393
4393
|
*/
|
|
4394
|
-
replace(e, t =
|
|
4394
|
+
replace(e, t = M.empty) {
|
|
4395
4395
|
let r = t.content.lastChild, i = null;
|
|
4396
4396
|
for (let l = 0; l < t.openEnd; l++)
|
|
4397
4397
|
i = r, r = r.lastChild;
|
|
4398
4398
|
let o = e.steps.length, s = this.ranges;
|
|
4399
4399
|
for (let l = 0; l < s.length; l++) {
|
|
4400
4400
|
let { $from: a, $to: c } = s[l], d = e.mapping.slice(o);
|
|
4401
|
-
e.replaceRange(d.map(a.pos), d.map(c.pos), l ?
|
|
4401
|
+
e.replaceRange(d.map(a.pos), d.map(c.pos), l ? M.empty : t), l == 0 && Fa(e, o, (r ? r.isInline : i && i.isTextblock) ? -1 : 1);
|
|
4402
4402
|
}
|
|
4403
4403
|
}
|
|
4404
4404
|
/**
|
|
@@ -4524,8 +4524,8 @@ class B extends z {
|
|
|
4524
4524
|
let i = e.resolve(t.map(this.anchor));
|
|
4525
4525
|
return new B(i.parent.inlineContent ? i : r, r);
|
|
4526
4526
|
}
|
|
4527
|
-
replace(e, t =
|
|
4528
|
-
if (super.replace(e, t), t ==
|
|
4527
|
+
replace(e, t = M.empty) {
|
|
4528
|
+
if (super.replace(e, t), t == M.empty) {
|
|
4529
4529
|
let r = this.$from.marksAcross(this.$to);
|
|
4530
4530
|
r && e.ensureMarks(r);
|
|
4531
4531
|
}
|
|
@@ -4600,7 +4600,7 @@ class L extends z {
|
|
|
4600
4600
|
return r ? z.near(o) : new L(o);
|
|
4601
4601
|
}
|
|
4602
4602
|
content() {
|
|
4603
|
-
return new
|
|
4603
|
+
return new M(S.from(this.node), 0, 0);
|
|
4604
4604
|
}
|
|
4605
4605
|
eq(e) {
|
|
4606
4606
|
return e instanceof L && e.anchor == this.anchor;
|
|
@@ -4655,8 +4655,8 @@ class rt extends z {
|
|
|
4655
4655
|
constructor(e) {
|
|
4656
4656
|
super(e.resolve(0), e.resolve(e.content.size));
|
|
4657
4657
|
}
|
|
4658
|
-
replace(e, t =
|
|
4659
|
-
if (t ==
|
|
4658
|
+
replace(e, t = M.empty) {
|
|
4659
|
+
if (t == M.empty) {
|
|
4660
4660
|
e.delete(0, e.doc.content.size);
|
|
4661
4661
|
let r = z.atStart(e.doc);
|
|
4662
4662
|
r.eq(e.selection) || e.setSelection(r);
|
|
@@ -5146,18 +5146,18 @@ let Ks = null;
|
|
|
5146
5146
|
const Et = function(n, e, t) {
|
|
5147
5147
|
let r = Ks || (Ks = document.createRange());
|
|
5148
5148
|
return r.setEnd(n, t ?? n.nodeValue.length), r.setStart(n, e || 0), r;
|
|
5149
|
-
},
|
|
5149
|
+
}, Ah = function() {
|
|
5150
5150
|
Ks = null;
|
|
5151
5151
|
}, Tn = function(n, e, t, r) {
|
|
5152
5152
|
return t && (Wa(n, e, t, r, -1) || Wa(n, e, t, r, 1));
|
|
5153
|
-
},
|
|
5153
|
+
}, Mh = /^(img|br|input|textarea|hr)$/i;
|
|
5154
5154
|
function Wa(n, e, t, r, i) {
|
|
5155
5155
|
for (; ; ) {
|
|
5156
5156
|
if (n == t && e == r)
|
|
5157
5157
|
return !0;
|
|
5158
5158
|
if (e == (i < 0 ? 0 : Je(n))) {
|
|
5159
5159
|
let o = n.parentNode;
|
|
5160
|
-
if (!o || o.nodeType != 1 || ii(n) ||
|
|
5160
|
+
if (!o || o.nodeType != 1 || ii(n) || Mh.test(n.nodeName) || n.contentEditable == "false")
|
|
5161
5161
|
return !1;
|
|
5162
5162
|
e = Ce(n) + (i < 0 ? 0 : 1), n = o;
|
|
5163
5163
|
} else if (n.nodeType == 1) {
|
|
@@ -5244,7 +5244,7 @@ function Rh(n, e, t) {
|
|
|
5244
5244
|
}
|
|
5245
5245
|
const mt = typeof navigator < "u" ? navigator : null, Ua = typeof document < "u" ? document : null, Qt = mt && mt.userAgent || "", Js = /Edge\/(\d+)/.exec(Qt), fu = /MSIE \d/.exec(Qt), Gs = /Trident\/(?:[7-9]|\d{2,})\..*rv:(\d+)/.exec(Qt), ze = !!(fu || Gs || Js), Kt = fu ? document.documentMode : Gs ? +Gs[1] : Js ? +Js[1] : 0, it = !ze && /gecko\/(\d+)/i.test(Qt);
|
|
5246
5246
|
it && +(/Firefox\/(\d+)/.exec(Qt) || [0, 0])[1];
|
|
5247
|
-
const Ys = !ze && /Chrome\/(\d+)/.exec(Qt),
|
|
5247
|
+
const Ys = !ze && /Chrome\/(\d+)/.exec(Qt), Ae = !!Ys, pu = Ys ? +Ys[1] : 0, De = !ze && !!mt && /Apple Computer/.test(mt.vendor), Qn = De && (/Mobile\/\w+/.test(Qt) || !!mt && mt.maxTouchPoints > 2), Ke = Qn || (mt ? /Mac/.test(mt.platform) : !1), Ih = mt ? /Win/.test(mt.platform) : !1, tt = /Android \d/.test(Qt), oi = !!Ua && "webkitFontSmoothing" in Ua.documentElement.style, Lh = oi ? +(/\bAppleWebKit\/(\d+)/.exec(navigator.userAgent) || [0, 0])[1] : 0;
|
|
5248
5248
|
function Ph(n) {
|
|
5249
5249
|
let e = n.defaultView && n.defaultView.visualViewport;
|
|
5250
5250
|
return e ? {
|
|
@@ -5970,13 +5970,13 @@ class Yh extends si {
|
|
|
5970
5970
|
return e.type === "characterData" && e.target.nodeValue == e.oldValue;
|
|
5971
5971
|
}
|
|
5972
5972
|
}
|
|
5973
|
-
class
|
|
5973
|
+
class An extends si {
|
|
5974
5974
|
constructor(e, t, r, i, o) {
|
|
5975
5975
|
super(e, [], r, i), this.mark = t, this.spec = o;
|
|
5976
5976
|
}
|
|
5977
5977
|
static create(e, t, r, i) {
|
|
5978
5978
|
let o = i.nodeViews[t.type.name], s = o && o(t, i, r);
|
|
5979
|
-
return (!s || !s.dom) && (s = Nn.renderSpec(document, t.type.spec.toDOM(t, r), null, t.attrs)), new
|
|
5979
|
+
return (!s || !s.dom) && (s = Nn.renderSpec(document, t.type.spec.toDOM(t, r), null, t.attrs)), new An(e, t, s.dom, s.contentDOM || s.dom, s);
|
|
5980
5980
|
}
|
|
5981
5981
|
parseRule() {
|
|
5982
5982
|
return this.dirty & gt || this.mark.type.spec.reparseInView ? null : { mark: this.mark.type.name, attrs: this.mark.attrs, contentElement: this.contentDOM };
|
|
@@ -5993,7 +5993,7 @@ class Mn extends si {
|
|
|
5993
5993
|
}
|
|
5994
5994
|
}
|
|
5995
5995
|
slice(e, t, r) {
|
|
5996
|
-
let i =
|
|
5996
|
+
let i = An.create(this.parent, this.mark, !0, r), o = this.children, s = this.size;
|
|
5997
5997
|
t < s && (o = Qs(o, t, s, r)), e > 0 && (o = Qs(o, 0, e, r));
|
|
5998
5998
|
for (let l = 0; l < o.length; l++)
|
|
5999
5999
|
o[l].parent = i;
|
|
@@ -6237,7 +6237,7 @@ function ku(n, e, t) {
|
|
|
6237
6237
|
r = r.nextSibling;
|
|
6238
6238
|
} else
|
|
6239
6239
|
i = !0, n.insertBefore(l, r);
|
|
6240
|
-
if (s instanceof
|
|
6240
|
+
if (s instanceof An) {
|
|
6241
6241
|
let a = r ? r.previousSibling : n.lastChild;
|
|
6242
6242
|
ku(s.contentDOM, s.children, t), r = a ? a.nextSibling : n.firstChild;
|
|
6243
6243
|
}
|
|
@@ -6356,7 +6356,7 @@ class Zh {
|
|
|
6356
6356
|
if (l > -1)
|
|
6357
6357
|
l > this.index && (this.changed = !0, this.destroyBetween(this.index, l)), this.top = this.top.children[this.index];
|
|
6358
6358
|
else {
|
|
6359
|
-
let a =
|
|
6359
|
+
let a = An.create(this.top, e[o], t, r);
|
|
6360
6360
|
this.top.children.splice(this.index, 0, a), this.top = a, this.changed = !0;
|
|
6361
6361
|
}
|
|
6362
6362
|
this.index = 0, o++;
|
|
@@ -6449,10 +6449,10 @@ class Zh {
|
|
|
6449
6449
|
// contentEditable.
|
|
6450
6450
|
addTextblockHacks() {
|
|
6451
6451
|
let e = this.top.children[this.index - 1], t = this.top;
|
|
6452
|
-
for (; e instanceof
|
|
6452
|
+
for (; e instanceof An; )
|
|
6453
6453
|
t = e, e = t.children[t.children.length - 1];
|
|
6454
6454
|
(!e || // Empty textblock
|
|
6455
|
-
!(e instanceof qo) || /\n$/.test(e.node.text) || this.view.requiresGeckoHackNode && /\s$/.test(e.node.text)) && ((De ||
|
|
6455
|
+
!(e instanceof qo) || /\n$/.test(e.node.text) || this.view.requiresGeckoHackNode && /\s$/.test(e.node.text)) && ((De || Ae) && e && e.dom.contentEditable == "false" && this.addHackNode("IMG", t), this.addHackNode("BR", this.top));
|
|
6456
6456
|
}
|
|
6457
6457
|
addHackNode(e, t) {
|
|
6458
6458
|
if (t == this.top && this.index < t.children.length && t.children[this.index].matchesHack(e))
|
|
@@ -6476,7 +6476,7 @@ function em(n, e) {
|
|
|
6476
6476
|
for (; ; )
|
|
6477
6477
|
if (r) {
|
|
6478
6478
|
let c = t.children[r - 1];
|
|
6479
|
-
if (c instanceof
|
|
6479
|
+
if (c instanceof An)
|
|
6480
6480
|
t = c, r = c.children.length;
|
|
6481
6481
|
else {
|
|
6482
6482
|
l = c, r--;
|
|
@@ -6624,12 +6624,12 @@ function Ll(n, e = null) {
|
|
|
6624
6624
|
return c;
|
|
6625
6625
|
}
|
|
6626
6626
|
function Tu(n) {
|
|
6627
|
-
return n.editable ? n.hasFocus() :
|
|
6627
|
+
return n.editable ? n.hasFocus() : Mu(n) && document.activeElement && document.activeElement.contains(n.dom);
|
|
6628
6628
|
}
|
|
6629
6629
|
function Dt(n, e = !1) {
|
|
6630
6630
|
let t = n.state.selection;
|
|
6631
|
-
if (
|
|
6632
|
-
if (!e && n.input.mouseDown && n.input.mouseDown.allowDefault &&
|
|
6631
|
+
if (Au(n, t), !!Tu(n)) {
|
|
6632
|
+
if (!e && n.input.mouseDown && n.input.mouseDown.allowDefault && Ae) {
|
|
6633
6633
|
let r = n.domSelectionRange(), i = n.domObserver.currentSelection;
|
|
6634
6634
|
if (r.anchorNode && i.anchorNode && Tn(r.anchorNode, r.anchorOffset, i.anchorNode, i.anchorOffset)) {
|
|
6635
6635
|
n.input.mouseDown.delayedSelectionSync = !0, n.domObserver.setCurSelection();
|
|
@@ -6645,7 +6645,7 @@ function Dt(n, e = !1) {
|
|
|
6645
6645
|
n.domObserver.setCurSelection(), n.domObserver.connectSelection();
|
|
6646
6646
|
}
|
|
6647
6647
|
}
|
|
6648
|
-
const ec = De ||
|
|
6648
|
+
const ec = De || Ae && pu < 63;
|
|
6649
6649
|
function tc(n, e) {
|
|
6650
6650
|
let { node: t, offset: r } = n.docView.domFromPos(e, 0), i = r < t.childNodes.length ? t.childNodes[r] : null, o = r ? t.childNodes[r - 1] : null;
|
|
6651
6651
|
if (De && i && i.contentEditable == "false")
|
|
@@ -6680,7 +6680,7 @@ function sm(n) {
|
|
|
6680
6680
|
let r = n.cursorWrapper.dom, i = r.nodeName == "IMG";
|
|
6681
6681
|
i ? t.setStart(r.parentNode, Ce(r) + 1) : t.setStart(r, 0), t.collapse(!0), e.removeAllRanges(), e.addRange(t), !i && !n.state.selection.visible && ze && Kt <= 11 && (r.disabled = !0, r.disabled = !1);
|
|
6682
6682
|
}
|
|
6683
|
-
function
|
|
6683
|
+
function Au(n, e) {
|
|
6684
6684
|
if (e instanceof L) {
|
|
6685
6685
|
let t = n.docView.descAt(e.from);
|
|
6686
6686
|
t != n.lastSelectedViewDesc && (rc(n), t && t.selectNode(), n.lastSelectedViewDesc = t);
|
|
@@ -6694,9 +6694,9 @@ function Pl(n, e, t, r) {
|
|
|
6694
6694
|
return n.someProp("createSelectionBetween", (i) => i(n, e, t)) || B.between(e, t, r);
|
|
6695
6695
|
}
|
|
6696
6696
|
function ic(n) {
|
|
6697
|
-
return n.editable && !n.hasFocus() ? !1 :
|
|
6697
|
+
return n.editable && !n.hasFocus() ? !1 : Mu(n);
|
|
6698
6698
|
}
|
|
6699
|
-
function
|
|
6699
|
+
function Mu(n) {
|
|
6700
6700
|
let e = n.domSelectionRange();
|
|
6701
6701
|
if (!e.anchorNode)
|
|
6702
6702
|
return !1;
|
|
@@ -6875,7 +6875,7 @@ function el(n, e, t) {
|
|
|
6875
6875
|
}
|
|
6876
6876
|
function sc(n, e) {
|
|
6877
6877
|
let t = n.state.doc.resolve(e);
|
|
6878
|
-
if (!(
|
|
6878
|
+
if (!(Ae || Ih) && t.parent.inlineContent) {
|
|
6879
6879
|
let i = n.coordsAtPos(e);
|
|
6880
6880
|
if (e > t.start()) {
|
|
6881
6881
|
let o = n.coordsAtPos(e - 1), s = (o.top + o.bottom) / 2;
|
|
@@ -7001,8 +7001,8 @@ function Nu(n, e, t, r, i) {
|
|
|
7001
7001
|
if (n.someProp("transformPastedText", (f) => {
|
|
7002
7002
|
e = f(e, o || r, n);
|
|
7003
7003
|
}), o)
|
|
7004
|
-
return e ? new
|
|
7005
|
-
`))), 0, 0) :
|
|
7004
|
+
return e ? new M(S.from(n.state.schema.text(e.replace(/\r\n?/g, `
|
|
7005
|
+
`))), 0, 0) : M.empty;
|
|
7006
7006
|
let u = n.someProp("clipboardTextParser", (f) => f(e, i, r, n));
|
|
7007
7007
|
if (u)
|
|
7008
7008
|
l = u;
|
|
@@ -7035,7 +7035,7 @@ function Nu(n, e, t, r, i) {
|
|
|
7035
7035
|
}
|
|
7036
7036
|
})), d)
|
|
7037
7037
|
l = xm(dc(l, +d[1], +d[2]), d[4]);
|
|
7038
|
-
else if (l =
|
|
7038
|
+
else if (l = M.maxOpen(gm(l.content, i), !0), l.openStart || l.openEnd) {
|
|
7039
7039
|
let u = 0, f = 0;
|
|
7040
7040
|
for (let p = l.content.firstChild; u < l.openStart && !p.type.spec.isolating; u++, p = p.firstChild)
|
|
7041
7041
|
;
|
|
@@ -7096,7 +7096,7 @@ function tl(n, e, t, r, i, o) {
|
|
|
7096
7096
|
return n.childCount > 1 && (o = 0), i < r - 1 && (l = tl(l, e, t, r, i + 1, o)), i >= t && (l = e < 0 ? s.contentMatchAt(0).fillBefore(l, o <= i).append(l) : l.append(s.contentMatchAt(s.childCount).fillBefore(S.empty, !0))), n.replaceChild(e < 0 ? 0 : n.childCount - 1, s.copy(l));
|
|
7097
7097
|
}
|
|
7098
7098
|
function dc(n, e, t) {
|
|
7099
|
-
return e < n.openStart && (n = new
|
|
7099
|
+
return e < n.openStart && (n = new M(tl(n.content, -1, e, n.openStart, 0, n.openEnd), e, n.openEnd)), t < n.openEnd && (n = new M(tl(n.content, 1, t, n.openEnd, 0, 0), n.openStart, t)), n;
|
|
7100
7100
|
}
|
|
7101
7101
|
const Lu = {
|
|
7102
7102
|
thead: ["table"],
|
|
@@ -7128,7 +7128,7 @@ function bm(n) {
|
|
|
7128
7128
|
return t;
|
|
7129
7129
|
}
|
|
7130
7130
|
function vm(n) {
|
|
7131
|
-
let e = n.querySelectorAll(
|
|
7131
|
+
let e = n.querySelectorAll(Ae ? "span:not([class]):not([style])" : "span.Apple-converted-space");
|
|
7132
7132
|
for (let t = 0; t < e.length; t++) {
|
|
7133
7133
|
let r = e[t];
|
|
7134
7134
|
r.childNodes.length == 1 && r.textContent == " " && r.parentNode && r.parentNode.replaceChild(n.ownerDocument.createTextNode(" "), r);
|
|
@@ -7150,7 +7150,7 @@ function xm(n, e) {
|
|
|
7150
7150
|
break;
|
|
7151
7151
|
i = S.from(a.create(r[l + 1], i)), o++, s++;
|
|
7152
7152
|
}
|
|
7153
|
-
return new
|
|
7153
|
+
return new M(i, o, s);
|
|
7154
7154
|
}
|
|
7155
7155
|
const Re = {}, Ie = {}, wm = { touchstart: !0, touchmove: !0 };
|
|
7156
7156
|
class km {
|
|
@@ -7198,12 +7198,12 @@ function Tm(n, e) {
|
|
|
7198
7198
|
return !1;
|
|
7199
7199
|
return !0;
|
|
7200
7200
|
}
|
|
7201
|
-
function
|
|
7201
|
+
function Am(n, e) {
|
|
7202
7202
|
!Bl(n, e) && Re[e.type] && (n.editable || !(e.type in Ie)) && Re[e.type](n, e);
|
|
7203
7203
|
}
|
|
7204
7204
|
Ie.keydown = (n, e) => {
|
|
7205
7205
|
let t = e;
|
|
7206
|
-
if (n.input.shiftKey = t.keyCode == 16 || t.shiftKey, !zu(n, t) && (n.input.lastKeyCode = t.keyCode, n.input.lastKeyCodeTime = Date.now(), !(tt &&
|
|
7206
|
+
if (n.input.shiftKey = t.keyCode == 16 || t.shiftKey, !zu(n, t) && (n.input.lastKeyCode = t.keyCode, n.input.lastKeyCodeTime = Date.now(), !(tt && Ae && t.keyCode == 13)))
|
|
7207
7207
|
if (t.keyCode != 229 && n.domObserver.forceFlush(), Qn && t.keyCode == 13 && !t.ctrlKey && !t.altKey && !t.metaKey) {
|
|
7208
7208
|
let r = Date.now();
|
|
7209
7209
|
n.input.lastIOSEnter = r, n.input.lastIOSEnterFallbackTimeout = setTimeout(() => {
|
|
@@ -7232,7 +7232,7 @@ Ie.keypress = (n, e) => {
|
|
|
7232
7232
|
function Ko(n) {
|
|
7233
7233
|
return { left: n.clientX, top: n.clientY };
|
|
7234
7234
|
}
|
|
7235
|
-
function
|
|
7235
|
+
function Mm(n, e) {
|
|
7236
7236
|
let t = e.x - n.clientX, r = e.y - n.clientY;
|
|
7237
7237
|
return t * t + r * r < 100;
|
|
7238
7238
|
}
|
|
@@ -7307,7 +7307,7 @@ Re.mousedown = (n, e) => {
|
|
|
7307
7307
|
let t = e;
|
|
7308
7308
|
n.input.shiftKey = t.shiftKey;
|
|
7309
7309
|
let r = $l(n), i = Date.now(), o = "singleClick";
|
|
7310
|
-
i - n.input.lastClick.time < 500 &&
|
|
7310
|
+
i - n.input.lastClick.time < 500 && Mm(t, n.input.lastClick) && !t[Bu] && (n.input.lastClick.type == "singleClick" ? o = "doubleClick" : n.input.lastClick.type == "doubleClick" && (o = "tripleClick")), n.input.lastClick = { time: i, x: t.clientX, y: t.clientY, type: o };
|
|
7311
7311
|
let s = n.posAtCoords(Ko(t));
|
|
7312
7312
|
s && (o == "singleClick" ? (n.input.mouseDown && n.input.mouseDown.done(), n.input.mouseDown = new Lm(n, s, t, !!r)) : (o == "doubleClick" ? Dm : Rm)(n, s.pos, s.inside, t) ? t.preventDefault() : Ut(n, "pointer"));
|
|
7313
7313
|
};
|
|
@@ -7348,7 +7348,7 @@ class Lm {
|
|
|
7348
7348
|
// (hidden) cursor is doesn't change the selection, and
|
|
7349
7349
|
// thus doesn't get a reaction from ProseMirror. This
|
|
7350
7350
|
// works around that.
|
|
7351
|
-
|
|
7351
|
+
Ae && !this.view.state.selection.visible && Math.min(Math.abs(t.pos - this.view.state.selection.from), Math.abs(t.pos - this.view.state.selection.to)) <= 2) ? (Gn(this.view, z.near(this.view.state.doc.resolve(t.pos))), e.preventDefault()) : Ut(this.view, "pointer");
|
|
7352
7352
|
}
|
|
7353
7353
|
move(e) {
|
|
7354
7354
|
this.updateAllowDefault(e), Ut(this.view, "pointer"), e.buttons == 0 && this.done();
|
|
@@ -7467,7 +7467,7 @@ function Fm(n, e) {
|
|
|
7467
7467
|
}
|
|
7468
7468
|
function Kr(n, e, t, r, i) {
|
|
7469
7469
|
let o = Nu(n, e, t, r, n.state.selection.$from);
|
|
7470
|
-
if (n.someProp("handlePaste", (a) => a(n, i, o ||
|
|
7470
|
+
if (n.someProp("handlePaste", (a) => a(n, i, o || M.empty)))
|
|
7471
7471
|
return !0;
|
|
7472
7472
|
if (!o)
|
|
7473
7473
|
return !1;
|
|
@@ -7508,7 +7508,7 @@ Re.dragstart = (n, e) => {
|
|
|
7508
7508
|
}
|
|
7509
7509
|
}
|
|
7510
7510
|
let l = (s || n.state.selection).content(), { dom: a, text: c, slice: d } = Ou(n, l);
|
|
7511
|
-
(!t.dataTransfer.files.length || !
|
|
7511
|
+
(!t.dataTransfer.files.length || !Ae || pu > 120) && t.dataTransfer.clearData(), t.dataTransfer.setData(qr ? "Text" : "text/html", a.innerHTML), t.dataTransfer.effectAllowed = "copyMove", qr || t.dataTransfer.setData("text/plain", c), n.dragging = new Vu(d, !t[ju], s);
|
|
7512
7512
|
};
|
|
7513
7513
|
Re.dragend = (n) => {
|
|
7514
7514
|
let e = n.dragging;
|
|
@@ -7529,7 +7529,7 @@ Ie.drop = (n, e) => {
|
|
|
7529
7529
|
s = h(s, n);
|
|
7530
7530
|
}) : s = Nu(n, Fu(t.dataTransfer), qr ? null : t.dataTransfer.getData("text/html"), !1, o);
|
|
7531
7531
|
let l = !!(r && !t[ju]);
|
|
7532
|
-
if (n.someProp("handleDrop", (h) => h(n, t, s ||
|
|
7532
|
+
if (n.someProp("handleDrop", (h) => h(n, t, s || M.empty, l))) {
|
|
7533
7533
|
t.preventDefault();
|
|
7534
7534
|
return;
|
|
7535
7535
|
}
|
|
@@ -7565,7 +7565,7 @@ Re.blur = (n, e) => {
|
|
|
7565
7565
|
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);
|
|
7566
7566
|
};
|
|
7567
7567
|
Re.beforeinput = (n, e) => {
|
|
7568
|
-
if (
|
|
7568
|
+
if (Ae && tt && e.inputType == "deleteContentBackward") {
|
|
7569
7569
|
n.domObserver.flushSoon();
|
|
7570
7570
|
let { domChangeCount: r } = n.input;
|
|
7571
7571
|
setTimeout(() => {
|
|
@@ -7595,7 +7595,7 @@ class ro {
|
|
|
7595
7595
|
}
|
|
7596
7596
|
map(e, t, r, i) {
|
|
7597
7597
|
let { pos: o, deleted: s } = e.mapResult(t.from + i, this.side < 0 ? -1 : 1);
|
|
7598
|
-
return s ? null : new
|
|
7598
|
+
return s ? null : new Me(o - r, o - r, this);
|
|
7599
7599
|
}
|
|
7600
7600
|
valid() {
|
|
7601
7601
|
return !0;
|
|
@@ -7613,7 +7613,7 @@ class Gt {
|
|
|
7613
7613
|
}
|
|
7614
7614
|
map(e, t, r, i) {
|
|
7615
7615
|
let o = e.map(t.from + i, this.spec.inclusiveStart ? -1 : 1) - r, s = e.map(t.to + i, this.spec.inclusiveEnd ? 1 : -1) - r;
|
|
7616
|
-
return o >= s ? null : new
|
|
7616
|
+
return o >= s ? null : new Me(o, s, this);
|
|
7617
7617
|
}
|
|
7618
7618
|
valid(e, t) {
|
|
7619
7619
|
return t.from < t.to;
|
|
@@ -7636,7 +7636,7 @@ class Hl {
|
|
|
7636
7636
|
if (o.deleted)
|
|
7637
7637
|
return null;
|
|
7638
7638
|
let s = e.mapResult(t.to + i, -1);
|
|
7639
|
-
return s.deleted || s.pos <= o.pos ? null : new
|
|
7639
|
+
return s.deleted || s.pos <= o.pos ? null : new Me(o.pos - r, s.pos - r, this);
|
|
7640
7640
|
}
|
|
7641
7641
|
valid(e, t) {
|
|
7642
7642
|
let { index: r, offset: i } = e.content.findIndex(t.from), o;
|
|
@@ -7648,7 +7648,7 @@ class Hl {
|
|
|
7648
7648
|
destroy() {
|
|
7649
7649
|
}
|
|
7650
7650
|
}
|
|
7651
|
-
class
|
|
7651
|
+
class Me {
|
|
7652
7652
|
/**
|
|
7653
7653
|
@internal
|
|
7654
7654
|
*/
|
|
@@ -7659,7 +7659,7 @@ class Ae {
|
|
|
7659
7659
|
@internal
|
|
7660
7660
|
*/
|
|
7661
7661
|
copy(e, t) {
|
|
7662
|
-
return new
|
|
7662
|
+
return new Me(e, t, this.type);
|
|
7663
7663
|
}
|
|
7664
7664
|
/**
|
|
7665
7665
|
@internal
|
|
@@ -7682,14 +7682,14 @@ class Ae {
|
|
|
7682
7682
|
widget's current document position.
|
|
7683
7683
|
*/
|
|
7684
7684
|
static widget(e, t, r) {
|
|
7685
|
-
return new
|
|
7685
|
+
return new Me(e, e, new ro(t, r));
|
|
7686
7686
|
}
|
|
7687
7687
|
/**
|
|
7688
7688
|
Creates an inline decoration, which adds the given attributes to
|
|
7689
7689
|
each inline node between `from` and `to`.
|
|
7690
7690
|
*/
|
|
7691
7691
|
static inline(e, t, r, i) {
|
|
7692
|
-
return new
|
|
7692
|
+
return new Me(e, t, new Gt(r, i));
|
|
7693
7693
|
}
|
|
7694
7694
|
/**
|
|
7695
7695
|
Creates a node decoration. `from` and `to` should point precisely
|
|
@@ -7697,7 +7697,7 @@ class Ae {
|
|
|
7697
7697
|
node, will receive the given attributes.
|
|
7698
7698
|
*/
|
|
7699
7699
|
static node(e, t, r, i) {
|
|
7700
|
-
return new
|
|
7700
|
+
return new Me(e, t, new Hl(r, i));
|
|
7701
7701
|
}
|
|
7702
7702
|
/**
|
|
7703
7703
|
The spec provided when creating this decoration. Can be useful
|
|
@@ -8007,7 +8007,7 @@ function _u(n, e) {
|
|
|
8007
8007
|
let t = [];
|
|
8008
8008
|
for (let r = 0; r < n.length; r++) {
|
|
8009
8009
|
let i = n[r];
|
|
8010
|
-
t.push(new
|
|
8010
|
+
t.push(new Me(i.from + e, i.to + e, i.type));
|
|
8011
8011
|
}
|
|
8012
8012
|
return t;
|
|
8013
8013
|
}
|
|
@@ -8285,7 +8285,7 @@ function Gm(n, e) {
|
|
|
8285
8285
|
}
|
|
8286
8286
|
function Ym(n, e, t) {
|
|
8287
8287
|
let { node: r, fromOffset: i, toOffset: o, from: s, to: l } = n.docView.parseRange(e, t), a = n.domSelectionRange(), c, d = a.anchorNode;
|
|
8288
|
-
if (d && n.dom.contains(d.nodeType == 1 ? d : d.parentNode) && (c = [{ node: d, offset: a.anchorOffset }], Uo(a) || c.push({ node: a.focusNode, offset: a.focusOffset })),
|
|
8288
|
+
if (d && n.dom.contains(d.nodeType == 1 ? d : d.parentNode) && (c = [{ node: d, offset: a.anchorOffset }], Uo(a) || c.push({ node: a.focusNode, offset: a.focusOffset })), Ae && n.input.lastKeyCode === 8)
|
|
8289
8289
|
for (let g = o; g > i; g--) {
|
|
8290
8290
|
let y = r.childNodes[g - 1], v = y.pmViewDesc;
|
|
8291
8291
|
if (y.nodeName == "BR" && !v) {
|
|
@@ -8332,7 +8332,7 @@ function Zm(n, e, t, r, i) {
|
|
|
8332
8332
|
if (n.input.compositionPendingChanges = 0, e < 0) {
|
|
8333
8333
|
let D = n.input.lastSelectionTime > Date.now() - 50 ? n.input.lastSelectionOrigin : null, K = Ll(n, D);
|
|
8334
8334
|
if (K && !n.state.selection.eq(K)) {
|
|
8335
|
-
if (
|
|
8335
|
+
if (Ae && tt && n.input.lastKeyCode === 13 && Date.now() - 100 < n.input.lastKeyCodeTime && n.someProp("handleKeyDown", (Y) => Y(n, an(13, "Enter"))))
|
|
8336
8336
|
return;
|
|
8337
8337
|
let Q = n.state.tr.setSelection(K);
|
|
8338
8338
|
D == "pointer" ? Q.setMeta("pointer", !0) : D == "key" && Q.scrollIntoView(), o && Q.setMeta("composition", o), n.dispatch(Q);
|
|
@@ -8368,10 +8368,10 @@ function Zm(n, e, t, r, i) {
|
|
|
8368
8368
|
return;
|
|
8369
8369
|
}
|
|
8370
8370
|
if (n.state.selection.anchor > h.start && tg(d, h.start, h.endA, m, g) && n.someProp("handleKeyDown", (D) => D(n, an(8, "Backspace")))) {
|
|
8371
|
-
tt &&
|
|
8371
|
+
tt && Ae && n.domObserver.suppressSelectionUpdates();
|
|
8372
8372
|
return;
|
|
8373
8373
|
}
|
|
8374
|
-
|
|
8374
|
+
Ae && tt && h.endB == h.start && (n.input.lastAndroidDelete = Date.now()), tt && !v && m.start() != g.start() && g.parentOffset == 0 && m.depth == g.depth && c.sel && c.sel.anchor == c.sel.head && c.sel.head == h.endA && (h.endB -= 2, g = c.doc.resolveNoCache(h.endB - c.from), setTimeout(() => {
|
|
8375
8375
|
n.someProp("handleKeyDown", function(D) {
|
|
8376
8376
|
return D(n, an(13, "Enter"));
|
|
8377
8377
|
});
|
|
@@ -8394,7 +8394,7 @@ function Zm(n, e, t, r, i) {
|
|
|
8394
8394
|
}
|
|
8395
8395
|
if (k || (k = n.state.tr.replace(b, T, c.doc.slice(h.start - c.from, h.endB - c.from))), c.sel) {
|
|
8396
8396
|
let D = gc(n, k.doc, c.sel);
|
|
8397
|
-
D && !(
|
|
8397
|
+
D && !(Ae && tt && n.composing && D.empty && (h.start != h.endB || n.input.lastAndroidDelete < Date.now() - 100) && (D.head == b || D.head == k.mapping.map(T) - 1) || ze && D.empty && D.head == b) && k.setSelection(D);
|
|
8398
8398
|
}
|
|
8399
8399
|
O && k.ensureMarks(O), o && k.setMeta("composition", o), n.dispatch(k.scrollIntoView());
|
|
8400
8400
|
}
|
|
@@ -8548,12 +8548,12 @@ class rg {
|
|
|
8548
8548
|
let f = d == "preserve" && s && this.dom.style.overflowAnchor == null && zh(this);
|
|
8549
8549
|
if (s) {
|
|
8550
8550
|
this.domObserver.stop();
|
|
8551
|
-
let p = u && (ze ||
|
|
8551
|
+
let p = u && (ze || Ae) && !this.composing && !i.selection.empty && !e.selection.empty && ig(i.selection, e.selection);
|
|
8552
8552
|
if (u) {
|
|
8553
|
-
let h =
|
|
8553
|
+
let h = Ae ? this.trackWrites = this.domSelectionRange().focusNode : null;
|
|
8554
8554
|
this.composing && (this.input.compositionNode = Bm(this)), (o || !this.docView.update(e.doc, c, a, this)) && (this.docView.updateOuterDeco(c), this.docView.destroy(), this.docView = Qa(e.doc, c, a, this.dom, this)), h && !this.trackWrites && (p = !0);
|
|
8555
8555
|
}
|
|
8556
|
-
p || !(this.input.mouseDown && this.domObserver.currentSelection.eq(this.domSelectionRange()) && lm(this)) ? Dt(this, p) : (
|
|
8556
|
+
p || !(this.input.mouseDown && this.domObserver.currentSelection.eq(this.domSelectionRange()) && lm(this)) ? Dt(this, p) : (Au(this, e.selection), this.domObserver.setCurSelection()), this.domObserver.start();
|
|
8557
8557
|
}
|
|
8558
8558
|
this.updatePluginViews(i), !((r = this.dragging) === null || r === void 0) && r.node && !i.doc.eq(e.doc) && this.updateDraggedNode(this.dragging, i), d == "reset" ? this.dom.scrollTop = 0 : d == "to selection" ? this.scrollToSelection() : f && $h(f);
|
|
8559
8559
|
}
|
|
@@ -8761,7 +8761,7 @@ class rg {
|
|
|
8761
8761
|
views](https://prosemirror.net/docs/ref/#view.NodeView).
|
|
8762
8762
|
*/
|
|
8763
8763
|
destroy() {
|
|
8764
|
-
this.docView && (Sm(this), this.destroyPluginViews(), this.mounted ? (this.docView.update(this.state.doc, [], ks(this), this), this.dom.textContent = "") : this.dom.parentNode && this.dom.parentNode.removeChild(this.dom), this.docView.destroy(), this.docView = null,
|
|
8764
|
+
this.docView && (Sm(this), this.destroyPluginViews(), this.mounted ? (this.docView.update(this.state.doc, [], ks(this), this), this.dom.textContent = "") : this.dom.parentNode && this.dom.parentNode.removeChild(this.dom), this.docView.destroy(), this.docView = null, Ah());
|
|
8765
8765
|
}
|
|
8766
8766
|
/**
|
|
8767
8767
|
This is true when the view has been
|
|
@@ -8775,7 +8775,7 @@ class rg {
|
|
|
8775
8775
|
Used for testing.
|
|
8776
8776
|
*/
|
|
8777
8777
|
dispatchEvent(e) {
|
|
8778
|
-
return
|
|
8778
|
+
return Am(this, e);
|
|
8779
8779
|
}
|
|
8780
8780
|
/**
|
|
8781
8781
|
Dispatch a transaction. Will call
|
|
@@ -8810,12 +8810,12 @@ function bc(n) {
|
|
|
8810
8810
|
if (typeof t == "function" && (t = t(n.state)), t)
|
|
8811
8811
|
for (let r in t)
|
|
8812
8812
|
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]));
|
|
8813
|
-
}), e.translate || (e.translate = "no"), [
|
|
8813
|
+
}), e.translate || (e.translate = "no"), [Me.node(0, n.state.doc.content.size, e)];
|
|
8814
8814
|
}
|
|
8815
8815
|
function vc(n) {
|
|
8816
8816
|
if (n.markCursor) {
|
|
8817
8817
|
let e = document.createElement("img");
|
|
8818
|
-
e.className = "ProseMirror-separator", e.setAttribute("mark-placeholder", "true"), e.setAttribute("alt", ""), n.cursorWrapper = { dom: e, deco:
|
|
8818
|
+
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 }) };
|
|
8819
8819
|
} else
|
|
8820
8820
|
n.cursorWrapper = null;
|
|
8821
8821
|
}
|
|
@@ -9014,7 +9014,7 @@ const hg = (n, e, t) => {
|
|
|
9014
9014
|
return !0;
|
|
9015
9015
|
if (r.parent.content.size == 0 && (Zn(o, "end") || L.isSelectable(o)))
|
|
9016
9016
|
for (let s = r.depth; ; s--) {
|
|
9017
|
-
let l = _o(n.doc, r.before(s), r.after(s),
|
|
9017
|
+
let l = _o(n.doc, r.before(s), r.after(s), M.empty);
|
|
9018
9018
|
if (l && l.slice.size < l.to - l.from) {
|
|
9019
9019
|
if (e) {
|
|
9020
9020
|
let a = n.tr.step(l);
|
|
@@ -9058,7 +9058,7 @@ function Ku(n, e, t) {
|
|
|
9058
9058
|
return !1;
|
|
9059
9059
|
l = d;
|
|
9060
9060
|
}
|
|
9061
|
-
let c = _o(n.doc, o, a,
|
|
9061
|
+
let c = _o(n.doc, o, a, M.empty);
|
|
9062
9062
|
if (!c || c.from != o || c instanceof ge && c.slice.size >= a - o)
|
|
9063
9063
|
return !1;
|
|
9064
9064
|
if (t) {
|
|
@@ -9113,7 +9113,7 @@ const bg = (n, e, t) => {
|
|
|
9113
9113
|
if (Yu(n, i, e, 1))
|
|
9114
9114
|
return !0;
|
|
9115
9115
|
if (r.parent.content.size == 0 && (Zn(o, "start") || L.isSelectable(o))) {
|
|
9116
|
-
let s = _o(n.doc, r.before(), r.after(),
|
|
9116
|
+
let s = _o(n.doc, r.before(), r.after(), M.empty);
|
|
9117
9117
|
if (s && s.slice.size < s.to - s.from) {
|
|
9118
9118
|
if (e) {
|
|
9119
9119
|
let l = n.tr.step(s);
|
|
@@ -9208,7 +9208,7 @@ const Sg = (n, e) => {
|
|
|
9208
9208
|
l.setSelection(B.create(l.doc, s + 1)), e(l.scrollIntoView());
|
|
9209
9209
|
}
|
|
9210
9210
|
return !0;
|
|
9211
|
-
},
|
|
9211
|
+
}, Ag = (n, e) => {
|
|
9212
9212
|
let { $cursor: t } = n.selection;
|
|
9213
9213
|
if (!t || t.parent.content.size)
|
|
9214
9214
|
return !1;
|
|
@@ -9219,7 +9219,7 @@ const Sg = (n, e) => {
|
|
|
9219
9219
|
}
|
|
9220
9220
|
let r = t.blockRange(), i = r && ar(r);
|
|
9221
9221
|
return i == null ? !1 : (e && e(n.tr.lift(r, i).scrollIntoView()), !0);
|
|
9222
|
-
},
|
|
9222
|
+
}, Mg = (n, e) => {
|
|
9223
9223
|
let { $from: t, to: r } = n.selection, i, o = t.sharedDepth(r);
|
|
9224
9224
|
return o == 0 ? !1 : (i = t.before(o), e && e(n.tr.setSelection(L.create(n.doc, i))), !0);
|
|
9225
9225
|
};
|
|
@@ -9238,7 +9238,7 @@ function Yu(n, e, t, r) {
|
|
|
9238
9238
|
for (let y = s.length - 1; y >= 0; y--)
|
|
9239
9239
|
h = S.from(s[y].create(null, h));
|
|
9240
9240
|
h = S.from(i.copy(h));
|
|
9241
|
-
let m = n.tr.step(new ye(e.pos - 1, p, e.pos, p, new
|
|
9241
|
+
let m = n.tr.step(new ye(e.pos - 1, p, e.pos, p, new M(h, 1, 0), s.length, !0)), g = m.doc.resolve(p + 2 * s.length);
|
|
9242
9242
|
g.nodeAfter && g.nodeAfter.type == i.type && Xt(m.doc, g.pos) && m.join(g.pos), t(m.scrollIntoView());
|
|
9243
9243
|
}
|
|
9244
9244
|
return !0;
|
|
@@ -9258,7 +9258,7 @@ function Yu(n, e, t, r) {
|
|
|
9258
9258
|
let y = S.empty;
|
|
9259
9259
|
for (let w = h.length - 1; w >= 0; w--)
|
|
9260
9260
|
y = S.from(h[w].copy(y));
|
|
9261
|
-
let v = n.tr.step(new ye(e.pos - h.length, e.pos + o.nodeSize, e.pos + g, e.pos + o.nodeSize - g, new
|
|
9261
|
+
let v = n.tr.step(new ye(e.pos - h.length, e.pos + o.nodeSize, e.pos + g, e.pos + o.nodeSize - g, new M(y, h.length, 0), 0, !0));
|
|
9262
9262
|
t(v.scrollIntoView());
|
|
9263
9263
|
}
|
|
9264
9264
|
return !0;
|
|
@@ -9334,7 +9334,7 @@ function Ig(n, e, t, r, i) {
|
|
|
9334
9334
|
let o = S.empty;
|
|
9335
9335
|
for (let d = t.length - 1; d >= 0; d--)
|
|
9336
9336
|
o = S.from(t[d].type.create(t[d].attrs, o));
|
|
9337
|
-
n.step(new ye(e.start - (r ? 2 : 0), e.end, e.start, e.end, new
|
|
9337
|
+
n.step(new ye(e.start - (r ? 2 : 0), e.end, e.start, e.end, new M(o, 0, 0), t.length, !0));
|
|
9338
9338
|
let s = 0;
|
|
9339
9339
|
for (let d = 0; d < t.length; d++)
|
|
9340
9340
|
t[d].type == i && (s = d + 1);
|
|
@@ -9351,7 +9351,7 @@ function Lg(n) {
|
|
|
9351
9351
|
}
|
|
9352
9352
|
function Pg(n, e, t, r) {
|
|
9353
9353
|
let i = n.tr, o = r.end, s = r.$to.end(r.depth);
|
|
9354
|
-
o < s && (i.step(new ye(o - 1, s, o, s, new
|
|
9354
|
+
o < s && (i.step(new ye(o - 1, s, o, s, new M(S.from(t.create(null, r.parent.copy())), 1, 0), 1, !0)), r = new Yi(i.doc.resolve(r.$from.pos), i.doc.resolve(s), r.depth));
|
|
9355
9355
|
const l = ar(r);
|
|
9356
9356
|
if (l == null)
|
|
9357
9357
|
return !1;
|
|
@@ -9370,7 +9370,7 @@ function Bg(n, e, t) {
|
|
|
9370
9370
|
if (!c.canReplace(d + (l ? 0 : 1), d + 1, s.content.append(a ? S.empty : S.from(i))))
|
|
9371
9371
|
return !1;
|
|
9372
9372
|
let u = o.pos, f = u + s.nodeSize;
|
|
9373
|
-
return r.step(new ye(u - (l ? 1 : 0), f + (a ? 1 : 0), u + 1, f - 1, new
|
|
9373
|
+
return r.step(new ye(u - (l ? 1 : 0), f + (a ? 1 : 0), u + 1, f - 1, new M((l ? S.empty : S.from(i.copy(S.empty))).append(a ? S.empty : S.from(i.copy(S.empty))), l ? 0 : 1, a ? 0 : 1), l ? 0 : 1)), e(r.scrollIntoView()), !0;
|
|
9374
9374
|
}
|
|
9375
9375
|
function zg(n) {
|
|
9376
9376
|
return function(e, t) {
|
|
@@ -9384,7 +9384,7 @@ function zg(n) {
|
|
|
9384
9384
|
if (a.type != n)
|
|
9385
9385
|
return !1;
|
|
9386
9386
|
if (t) {
|
|
9387
|
-
let c = a.lastChild && a.lastChild.type == l.type, d = S.from(c ? n.create() : null), u = new
|
|
9387
|
+
let c = a.lastChild && a.lastChild.type == l.type, d = S.from(c ? n.create() : null), u = new M(S.from(n.create(null, S.from(l.type.create(null, d)))), c ? 3 : 1, 0), f = o.start, p = o.end;
|
|
9388
9388
|
t(e.tr.step(new ye(f - (c ? 3 : 1), p, f, p, u, 1, !0)).scrollIntoView());
|
|
9389
9389
|
}
|
|
9390
9390
|
return !0;
|
|
@@ -9713,10 +9713,10 @@ function Vg(n, e) {
|
|
|
9713
9713
|
marks: a
|
|
9714
9714
|
});
|
|
9715
9715
|
}
|
|
9716
|
-
function
|
|
9716
|
+
function As(n, e) {
|
|
9717
9717
|
return e.nodes[n] || e.marks[n] || null;
|
|
9718
9718
|
}
|
|
9719
|
-
function
|
|
9719
|
+
function Ac(n, e) {
|
|
9720
9720
|
return Array.isArray(e) ? e.some((t) => (typeof t == "string" ? t : t.name) === n.name) : e;
|
|
9721
9721
|
}
|
|
9722
9722
|
const jg = (n, e = 500) => {
|
|
@@ -10098,7 +10098,7 @@ class Un {
|
|
|
10098
10098
|
options: t.options,
|
|
10099
10099
|
storage: t.storage,
|
|
10100
10100
|
editor: this.editor,
|
|
10101
|
-
type:
|
|
10101
|
+
type: As(t.name, this.schema)
|
|
10102
10102
|
}, i = N(t, "addCommands", r);
|
|
10103
10103
|
return i ? {
|
|
10104
10104
|
...e,
|
|
@@ -10117,7 +10117,7 @@ class Un {
|
|
|
10117
10117
|
options: s.options,
|
|
10118
10118
|
storage: s.storage,
|
|
10119
10119
|
editor: e,
|
|
10120
|
-
type:
|
|
10120
|
+
type: As(s.name, this.schema)
|
|
10121
10121
|
}, a = [], c = N(s, "addKeyboardShortcuts", l);
|
|
10122
10122
|
let d = {};
|
|
10123
10123
|
if (s.type === "mark" && N(s, "exitable", l) && (d.ArrowRight = () => Xe.handleExit({ editor: e, mark: s })), c) {
|
|
@@ -10127,9 +10127,9 @@ class Un {
|
|
|
10127
10127
|
const u = fg(d);
|
|
10128
10128
|
a.push(u);
|
|
10129
10129
|
const f = N(s, "addInputRules", l);
|
|
10130
|
-
|
|
10130
|
+
Ac(s, e.options.enableInputRules) && f && r.push(...f());
|
|
10131
10131
|
const p = N(s, "addPasteRules", l);
|
|
10132
|
-
|
|
10132
|
+
Ac(s, e.options.enablePasteRules) && p && i.push(...p());
|
|
10133
10133
|
const h = N(s, "addProseMirrorPlugins", l);
|
|
10134
10134
|
if (h) {
|
|
10135
10135
|
const m = h();
|
|
@@ -10203,7 +10203,7 @@ class Un {
|
|
|
10203
10203
|
options: e.options,
|
|
10204
10204
|
storage: e.storage,
|
|
10205
10205
|
editor: this.editor,
|
|
10206
|
-
type:
|
|
10206
|
+
type: As(e.name, this.schema)
|
|
10207
10207
|
};
|
|
10208
10208
|
e.type === "mark" && (!((t = _(N(e, "keepOnSplit", r))) !== null && t !== void 0) || t) && this.splittableMarks.push(e.name);
|
|
10209
10209
|
const i = N(e, "onBeforeCreate", r), o = N(e, "onCreate", r), s = N(e, "onUpdate", r), l = N(e, "onSelectionUpdate", r), a = N(e, "onTransaction", r), c = N(e, "onFocus", r), d = N(e, "onBlur", r), u = N(e, "onDestroy", r);
|
|
@@ -10451,7 +10451,7 @@ const my = (n = null, e = {}) => ({ editor: t, view: r, tr: i, dispatch: o }) =>
|
|
|
10451
10451
|
}
|
|
10452
10452
|
return n;
|
|
10453
10453
|
};
|
|
10454
|
-
function
|
|
10454
|
+
function Ai(n) {
|
|
10455
10455
|
const e = `<body>${n}</body>`, t = new window.DOMParser().parseFromString(e, "text/html").body;
|
|
10456
10456
|
return rf(t);
|
|
10457
10457
|
}
|
|
@@ -10494,11 +10494,11 @@ function lo(n, e, t) {
|
|
|
10494
10494
|
}
|
|
10495
10495
|
})
|
|
10496
10496
|
});
|
|
10497
|
-
if (t.slice ? qt.fromSchema(a).parseSlice(
|
|
10497
|
+
if (t.slice ? qt.fromSchema(a).parseSlice(Ai(n), t.parseOptions) : qt.fromSchema(a).parse(Ai(n), t.parseOptions), t.errorOnInvalidContent && s)
|
|
10498
10498
|
throw new Error("[tiptap error]: Invalid HTML content", { cause: new Error(`Invalid element found: ${l}`) });
|
|
10499
10499
|
}
|
|
10500
10500
|
const o = qt.fromSchema(e);
|
|
10501
|
-
return t.slice ? o.parseSlice(
|
|
10501
|
+
return t.slice ? o.parseSlice(Ai(n), t.parseOptions).content : o.parse(Ai(n), t.parseOptions);
|
|
10502
10502
|
}
|
|
10503
10503
|
return lo("", e, t);
|
|
10504
10504
|
}
|
|
@@ -10561,14 +10561,14 @@ const vy = (n) => !("type" in n), xy = (n, e, t) => ({ tr: r, dispatch: i, edito
|
|
|
10561
10561
|
} catch {
|
|
10562
10562
|
return !1;
|
|
10563
10563
|
}
|
|
10564
|
-
},
|
|
10564
|
+
}, Ay = () => ({ state: n, dispatch: e, tr: t }) => {
|
|
10565
10565
|
try {
|
|
10566
10566
|
const r = jo(n.doc, n.selection.$from.pos, 1);
|
|
10567
10567
|
return r == null ? !1 : (t.join(r, 2), e && e(t), !0);
|
|
10568
10568
|
} catch {
|
|
10569
10569
|
return !1;
|
|
10570
10570
|
}
|
|
10571
|
-
},
|
|
10571
|
+
}, My = () => ({ state: n, dispatch: e }) => mg(n, e), Ey = () => ({ state: n, dispatch: e }) => gg(n, e);
|
|
10572
10572
|
function of() {
|
|
10573
10573
|
return typeof navigator < "u" ? /Mac/.test(navigator.platform) : !1;
|
|
10574
10574
|
}
|
|
@@ -10629,14 +10629,14 @@ function Gr(n, e, t = {}) {
|
|
|
10629
10629
|
const Dy = (n, e = {}) => ({ state: t, dispatch: r }) => {
|
|
10630
10630
|
const i = ve(n, t.schema);
|
|
10631
10631
|
return Gr(t, i, e) ? kg(t, r) : !1;
|
|
10632
|
-
}, Ry = () => ({ state: n, dispatch: e }) =>
|
|
10632
|
+
}, Ry = () => ({ state: n, dispatch: e }) => Ag(n, e), Iy = (n) => ({ state: e, dispatch: t }) => {
|
|
10633
10633
|
const r = ve(n, e.schema);
|
|
10634
10634
|
return Lg(r)(e, t);
|
|
10635
10635
|
}, Ly = () => ({ state: n, dispatch: e }) => Cg(n, e);
|
|
10636
10636
|
function es(n, e) {
|
|
10637
10637
|
return e.nodes[n] ? "node" : e.marks[n] ? "mark" : null;
|
|
10638
10638
|
}
|
|
10639
|
-
function
|
|
10639
|
+
function Mc(n, e) {
|
|
10640
10640
|
const t = typeof e == "string" ? [e] : e;
|
|
10641
10641
|
return Object.keys(n).reduce((r, i) => (t.includes(i) || (r[i] = n[i]), r), {});
|
|
10642
10642
|
}
|
|
@@ -10645,15 +10645,15 @@ const Py = (n, e) => ({ tr: t, state: r, dispatch: i }) => {
|
|
|
10645
10645
|
const l = es(typeof n == "string" ? n : n.name, r.schema);
|
|
10646
10646
|
return l ? (l === "node" && (o = ve(n, r.schema)), l === "mark" && (s = Zt(n, r.schema)), i && t.selection.ranges.forEach((a) => {
|
|
10647
10647
|
r.doc.nodesBetween(a.$from.pos, a.$to.pos, (c, d) => {
|
|
10648
|
-
o && o === c.type && t.setNodeMarkup(d, void 0,
|
|
10649
|
-
s === u.type && t.addMark(d, d + c.nodeSize, s.create(
|
|
10648
|
+
o && o === c.type && t.setNodeMarkup(d, void 0, Mc(c.attrs, e)), s && c.marks.length && c.marks.forEach((u) => {
|
|
10649
|
+
s === u.type && t.addMark(d, d + c.nodeSize, s.create(Mc(u.attrs, e)));
|
|
10650
10650
|
});
|
|
10651
10651
|
});
|
|
10652
10652
|
}), !0) : !1;
|
|
10653
10653
|
}, By = () => ({ tr: n, dispatch: e }) => (e && n.scrollIntoView(), !0), zy = () => ({ tr: n, commands: e }) => e.setTextSelection({
|
|
10654
10654
|
from: 0,
|
|
10655
10655
|
to: n.doc.content.size
|
|
10656
|
-
}), $y = () => ({ state: n, dispatch: e }) => yg(n, e), Hy = () => ({ state: n, dispatch: e }) => vg(n, e), Fy = () => ({ state: n, dispatch: e }) =>
|
|
10656
|
+
}), $y = () => ({ state: n, dispatch: e }) => yg(n, e), Hy = () => ({ state: n, dispatch: e }) => vg(n, e), Fy = () => ({ state: n, dispatch: e }) => Mg(n, e), Vy = () => ({ state: n, dispatch: e }) => Ng(n, e), jy = () => ({ state: n, dispatch: e }) => Og(n, e);
|
|
10657
10657
|
function ol(n, e, t = {}, r = {}) {
|
|
10658
10658
|
return lo(n, e, {
|
|
10659
10659
|
slice: !1,
|
|
@@ -11009,7 +11009,7 @@ const l0 = ({ keepMarks: n = !0 } = {}) => ({ tr: e, state: t, dispatch: r, edit
|
|
|
11009
11009
|
}, T = ((s = l.contentMatch.defaultType) === null || s === void 0 ? void 0 : s.createAndFill(b)) || void 0;
|
|
11010
11010
|
y = y.append(S.from(l.createAndFill(null, T) || void 0));
|
|
11011
11011
|
const k = a.before(a.depth - (v - 1));
|
|
11012
|
-
t.replace(k, a.after(-w), new
|
|
11012
|
+
t.replace(k, a.after(-w), new M(y, 4 - v, 0));
|
|
11013
11013
|
let O = -1;
|
|
11014
11014
|
t.doc.nodesBetween(k, t.doc.content.size, (H, D) => {
|
|
11015
11015
|
if (O > -1)
|
|
@@ -11041,7 +11041,7 @@ const l0 = ({ keepMarks: n = !0 } = {}) => ({ tr: e, state: t, dispatch: r, edit
|
|
|
11041
11041
|
t.ensureMarks(T);
|
|
11042
11042
|
}
|
|
11043
11043
|
return !0;
|
|
11044
|
-
},
|
|
11044
|
+
}, Ms = (n, e) => {
|
|
11045
11045
|
const t = Jl((s) => s.type === e)(n.selection);
|
|
11046
11046
|
if (!t)
|
|
11047
11047
|
return !0;
|
|
@@ -11068,12 +11068,12 @@ const l0 = ({ keepMarks: n = !0 } = {}) => ({ tr: e, state: t, dispatch: r, edit
|
|
|
11068
11068
|
if (T.node.type === p)
|
|
11069
11069
|
return c.liftListItem(h);
|
|
11070
11070
|
if (Ec(T.node.type.name, u) && p.validContent(T.node.content) && l)
|
|
11071
|
-
return a().command(() => (o.setNodeMarkup(T.pos, p), !0)).command(() =>
|
|
11071
|
+
return a().command(() => (o.setNodeMarkup(T.pos, p), !0)).command(() => Ms(o, p)).command(() => Es(o, p)).run();
|
|
11072
11072
|
}
|
|
11073
|
-
return !t || !b || !l ? a().command(() => d().wrapInList(p, r) ? !0 : c.clearNodes()).wrapInList(p, r).command(() =>
|
|
11073
|
+
return !t || !b || !l ? a().command(() => d().wrapInList(p, r) ? !0 : c.clearNodes()).wrapInList(p, r).command(() => Ms(o, p)).command(() => Es(o, p)).run() : a().command(() => {
|
|
11074
11074
|
const k = d().wrapInList(p, r), O = b.filter((H) => f.includes(H.type.name));
|
|
11075
11075
|
return o.ensureMarks(O), k ? !0 : c.clearNodes();
|
|
11076
|
-
}).wrapInList(p, r).command(() =>
|
|
11076
|
+
}).wrapInList(p, r).command(() => Ms(o, p)).command(() => Es(o, p)).run();
|
|
11077
11077
|
}, d0 = (n, e = {}, t = {}) => ({ state: r, commands: i }) => {
|
|
11078
11078
|
const { extendEmptyMarkRange: o = !1 } = t, s = Zt(n, r.schema);
|
|
11079
11079
|
return sl(r, s, e) ? i.unsetMark(s, { extendEmptyMarkRange: o }) : i.setMark(s, e);
|
|
@@ -11174,8 +11174,8 @@ var v0 = /* @__PURE__ */ Object.freeze({
|
|
|
11174
11174
|
joinDown: ky,
|
|
11175
11175
|
joinForward: Sy,
|
|
11176
11176
|
joinItemBackward: Ty,
|
|
11177
|
-
joinItemForward:
|
|
11178
|
-
joinTextblockBackward:
|
|
11177
|
+
joinItemForward: Ay,
|
|
11178
|
+
joinTextblockBackward: My,
|
|
11179
11179
|
joinTextblockForward: Ey,
|
|
11180
11180
|
joinUp: wy,
|
|
11181
11181
|
keyboardShortcut: Ny,
|
|
@@ -11367,7 +11367,7 @@ const x0 = fe.create({
|
|
|
11367
11367
|
})
|
|
11368
11368
|
];
|
|
11369
11369
|
}
|
|
11370
|
-
}),
|
|
11370
|
+
}), A0 = fe.create({
|
|
11371
11371
|
name: "tabindex",
|
|
11372
11372
|
addProseMirrorPlugins() {
|
|
11373
11373
|
return [
|
|
@@ -11503,7 +11503,7 @@ class cn {
|
|
|
11503
11503
|
}), this.editor.view.dispatch(t);
|
|
11504
11504
|
}
|
|
11505
11505
|
}
|
|
11506
|
-
const
|
|
11506
|
+
const M0 = `.ProseMirror {
|
|
11507
11507
|
position: relative;
|
|
11508
11508
|
}
|
|
11509
11509
|
|
|
@@ -11647,7 +11647,7 @@ let O0 = class extends $g {
|
|
|
11647
11647
|
* Inject CSS styles.
|
|
11648
11648
|
*/
|
|
11649
11649
|
injectCSS() {
|
|
11650
|
-
this.options.injectCSS && document && (this.css = E0(
|
|
11650
|
+
this.options.injectCSS && document && (this.css = E0(M0, this.options.injectNonce));
|
|
11651
11651
|
}
|
|
11652
11652
|
/**
|
|
11653
11653
|
* Update editor options.
|
|
@@ -11723,7 +11723,7 @@ let O0 = class extends $g {
|
|
|
11723
11723
|
x0,
|
|
11724
11724
|
C0,
|
|
11725
11725
|
S0,
|
|
11726
|
-
|
|
11726
|
+
A0,
|
|
11727
11727
|
w0,
|
|
11728
11728
|
T0
|
|
11729
11729
|
].filter((o) => typeof this.options.enableCoreExtensions == "object" ? this.options.enableCoreExtensions[o.name] !== !1 : !0) : [], ...this.options.extensions].filter((o) => ["extension", "node", "mark"].includes(o == null ? void 0 : o.type));
|
|
@@ -12131,7 +12131,7 @@ class R0 {
|
|
|
12131
12131
|
this.editor.commands.deleteRange({ from: e, to: t });
|
|
12132
12132
|
}
|
|
12133
12133
|
}
|
|
12134
|
-
function
|
|
12134
|
+
function Mn(n) {
|
|
12135
12135
|
return new Kg({
|
|
12136
12136
|
find: n.find,
|
|
12137
12137
|
handler: ({ state: e, range: t, match: r, pasteEvent: i }) => {
|
|
@@ -12464,17 +12464,17 @@ const rb = {
|
|
|
12464
12464
|
fn: nb,
|
|
12465
12465
|
data: {}
|
|
12466
12466
|
};
|
|
12467
|
-
var
|
|
12467
|
+
var Mi = {
|
|
12468
12468
|
passive: !0
|
|
12469
12469
|
};
|
|
12470
12470
|
function ib(n) {
|
|
12471
12471
|
var e = n.state, t = n.instance, r = n.options, i = r.scroll, o = i === void 0 ? !0 : i, s = r.resize, l = s === void 0 ? !0 : s, a = _e(e.elements.popper), c = [].concat(e.scrollParents.reference, e.scrollParents.popper);
|
|
12472
12472
|
return o && c.forEach(function(d) {
|
|
12473
|
-
d.addEventListener("scroll", t.update,
|
|
12474
|
-
}), l && a.addEventListener("resize", t.update,
|
|
12473
|
+
d.addEventListener("scroll", t.update, Mi);
|
|
12474
|
+
}), l && a.addEventListener("resize", t.update, Mi), function() {
|
|
12475
12475
|
o && c.forEach(function(d) {
|
|
12476
|
-
d.removeEventListener("scroll", t.update,
|
|
12477
|
-
}), l && a.removeEventListener("resize", t.update,
|
|
12476
|
+
d.removeEventListener("scroll", t.update, Mi);
|
|
12477
|
+
}), l && a.removeEventListener("resize", t.update, Mi);
|
|
12478
12478
|
};
|
|
12479
12479
|
}
|
|
12480
12480
|
const ob = {
|
|
@@ -12853,21 +12853,21 @@ function Tb(n) {
|
|
|
12853
12853
|
e.modifiersData[r] = Y;
|
|
12854
12854
|
}
|
|
12855
12855
|
}
|
|
12856
|
-
const
|
|
12856
|
+
const Ab = {
|
|
12857
12857
|
name: "preventOverflow",
|
|
12858
12858
|
enabled: !0,
|
|
12859
12859
|
phase: "main",
|
|
12860
12860
|
fn: Tb,
|
|
12861
12861
|
requiresIfExists: ["offset"]
|
|
12862
12862
|
};
|
|
12863
|
-
function
|
|
12863
|
+
function Mb(n) {
|
|
12864
12864
|
return {
|
|
12865
12865
|
scrollLeft: n.scrollLeft,
|
|
12866
12866
|
scrollTop: n.scrollTop
|
|
12867
12867
|
};
|
|
12868
12868
|
}
|
|
12869
12869
|
function Eb(n) {
|
|
12870
|
-
return n === _e(n) || !Ye(n) ? ea(n) :
|
|
12870
|
+
return n === _e(n) || !Ye(n) ? ea(n) : Mb(n);
|
|
12871
12871
|
}
|
|
12872
12872
|
function Ob(n) {
|
|
12873
12873
|
var e = n.getBoundingClientRect(), t = nr(e.width) / n.offsetWidth || 1, r = nr(e.height) / n.offsetHeight || 1;
|
|
@@ -13050,7 +13050,7 @@ function Pb(n) {
|
|
|
13050
13050
|
return p;
|
|
13051
13051
|
};
|
|
13052
13052
|
}
|
|
13053
|
-
var Bb = [ob, Cb, rb, ff, wb, gb,
|
|
13053
|
+
var Bb = [ob, Cb, rb, ff, wb, gb, Ab, Z0, bb], zb = /* @__PURE__ */ Pb({
|
|
13054
13054
|
defaultModifiers: Bb
|
|
13055
13055
|
}), $b = "tippy-box", xf = "tippy-content", Hb = "tippy-backdrop", wf = "tippy-arrow", kf = "tippy-svg-arrow", ln = {
|
|
13056
13056
|
passive: !0,
|
|
@@ -13216,7 +13216,7 @@ function nv(n) {
|
|
|
13216
13216
|
%c👷 This is a development-only message. It will be removed in production.
|
|
13217
13217
|
`);
|
|
13218
13218
|
}
|
|
13219
|
-
function
|
|
13219
|
+
function Af(n) {
|
|
13220
13220
|
return [
|
|
13221
13221
|
nv(n),
|
|
13222
13222
|
// title
|
|
@@ -13235,20 +13235,20 @@ function rv() {
|
|
|
13235
13235
|
function Ot(n, e) {
|
|
13236
13236
|
if (n && !ei.has(e)) {
|
|
13237
13237
|
var t;
|
|
13238
|
-
ei.add(e), (t = console).warn.apply(t,
|
|
13238
|
+
ei.add(e), (t = console).warn.apply(t, Af(e));
|
|
13239
13239
|
}
|
|
13240
13240
|
}
|
|
13241
13241
|
function dl(n, e) {
|
|
13242
13242
|
if (n && !ei.has(e)) {
|
|
13243
13243
|
var t;
|
|
13244
|
-
ei.add(e), (t = console).error.apply(t,
|
|
13244
|
+
ei.add(e), (t = console).error.apply(t, Af(e));
|
|
13245
13245
|
}
|
|
13246
13246
|
}
|
|
13247
13247
|
function iv(n) {
|
|
13248
13248
|
var e = !n, t = Object.prototype.toString.call(n) === "[object Object]" && !n.addEventListener;
|
|
13249
13249
|
dl(e, ["tippy() was passed", "`" + String(n) + "`", "as its targets (first) argument. Valid types are: String, Element,", "Element[], or NodeList."].join(" ")), dl(t, ["tippy() was passed a plain object which is not supported as an argument", "for virtual positioning. Use props.getReferenceClientRect instead."].join(" "));
|
|
13250
13250
|
}
|
|
13251
|
-
var
|
|
13251
|
+
var Mf = {
|
|
13252
13252
|
animateFill: !1,
|
|
13253
13253
|
followCursor: !1,
|
|
13254
13254
|
inlinePositioning: !1,
|
|
@@ -13311,7 +13311,7 @@ var Af = {
|
|
|
13311
13311
|
touch: !0,
|
|
13312
13312
|
trigger: "mouseenter focus",
|
|
13313
13313
|
triggerTarget: null
|
|
13314
|
-
},
|
|
13314
|
+
}, Mf, ov), sv = Object.keys(Ve), lv = function(e) {
|
|
13315
13315
|
process.env.NODE_ENV !== "production" && Of(e, []);
|
|
13316
13316
|
var t = Object.keys(e);
|
|
13317
13317
|
t.forEach(function(r) {
|
|
@@ -13361,7 +13361,7 @@ function Of(n, e) {
|
|
|
13361
13361
|
n === void 0 && (n = {}), e === void 0 && (e = []);
|
|
13362
13362
|
var t = Object.keys(n);
|
|
13363
13363
|
t.forEach(function(r) {
|
|
13364
|
-
var i = Vb(Ve, Object.keys(
|
|
13364
|
+
var i = Vb(Ve, Object.keys(Mf)), o = !Fb(i, r);
|
|
13365
13365
|
o && (o = e.filter(function(s) {
|
|
13366
13366
|
return s.name === r;
|
|
13367
13367
|
}).length === 0), Ot(o, ["`" + 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.", `
|
|
@@ -14095,7 +14095,7 @@ const hv = sr({
|
|
|
14095
14095
|
},
|
|
14096
14096
|
setup(n, { slots: e }) {
|
|
14097
14097
|
const t = q(null);
|
|
14098
|
-
return
|
|
14098
|
+
return Al(() => {
|
|
14099
14099
|
const { updateDelay: r, editor: i, pluginKey: o, shouldShow: s, tippyOptions: l } = n;
|
|
14100
14100
|
i.registerPlugin(Df({
|
|
14101
14101
|
updateDelay: r,
|
|
@@ -14218,7 +14218,7 @@ sr({
|
|
|
14218
14218
|
},
|
|
14219
14219
|
setup(n, { slots: e }) {
|
|
14220
14220
|
const t = q(null);
|
|
14221
|
-
return
|
|
14221
|
+
return Al(() => {
|
|
14222
14222
|
const { pluginKey: r, editor: i, tippyOptions: o, shouldShow: s } = n;
|
|
14223
14223
|
i.registerPlugin(Rf({
|
|
14224
14224
|
pluginKey: r,
|
|
@@ -14531,17 +14531,17 @@ const vv = /^\s*>\s$/, xv = ie.create({
|
|
|
14531
14531
|
},
|
|
14532
14532
|
addPasteRules() {
|
|
14533
14533
|
return [
|
|
14534
|
-
|
|
14534
|
+
Mn({
|
|
14535
14535
|
find: kv,
|
|
14536
14536
|
type: this.type
|
|
14537
14537
|
}),
|
|
14538
|
-
|
|
14538
|
+
Mn({
|
|
14539
14539
|
find: Sv,
|
|
14540
14540
|
type: this.type
|
|
14541
14541
|
})
|
|
14542
14542
|
];
|
|
14543
14543
|
}
|
|
14544
|
-
}),
|
|
14544
|
+
}), Av = "listItem", Yc = "textStyle", Xc = /^\s*([-+*])\s$/, Mv = ie.create({
|
|
14545
14545
|
name: "bulletList",
|
|
14546
14546
|
addOptions() {
|
|
14547
14547
|
return {
|
|
@@ -14565,7 +14565,7 @@ const vv = /^\s*>\s$/, xv = ie.create({
|
|
|
14565
14565
|
},
|
|
14566
14566
|
addCommands() {
|
|
14567
14567
|
return {
|
|
14568
|
-
toggleBulletList: () => ({ commands: n, chain: e }) => this.options.keepAttributes ? e().toggleList(this.name, this.options.itemTypeName, this.options.keepMarks).updateAttributes(
|
|
14568
|
+
toggleBulletList: () => ({ commands: n, chain: e }) => this.options.keepAttributes ? e().toggleList(this.name, this.options.itemTypeName, this.options.keepMarks).updateAttributes(Av, this.editor.getAttributes(Yc)).run() : n.toggleList(this.name, this.options.itemTypeName, this.options.keepMarks)
|
|
14569
14569
|
};
|
|
14570
14570
|
},
|
|
14571
14571
|
addKeyboardShortcuts() {
|
|
@@ -14629,7 +14629,7 @@ const vv = /^\s*>\s$/, xv = ie.create({
|
|
|
14629
14629
|
},
|
|
14630
14630
|
addPasteRules() {
|
|
14631
14631
|
return [
|
|
14632
|
-
|
|
14632
|
+
Mn({
|
|
14633
14633
|
find: Ov,
|
|
14634
14634
|
type: this.type
|
|
14635
14635
|
})
|
|
@@ -14873,7 +14873,7 @@ class de extends z {
|
|
|
14873
14873
|
return de.valid(r) ? new de(r) : z.near(r);
|
|
14874
14874
|
}
|
|
14875
14875
|
content() {
|
|
14876
|
-
return
|
|
14876
|
+
return M.empty;
|
|
14877
14877
|
}
|
|
14878
14878
|
eq(e) {
|
|
14879
14879
|
return e instanceof de && e.head == this.head;
|
|
@@ -15046,14 +15046,14 @@ function _v(n, e) {
|
|
|
15046
15046
|
let i = S.empty;
|
|
15047
15047
|
for (let s = r.length - 1; s >= 0; s--)
|
|
15048
15048
|
i = S.from(r[s].createAndFill(null, i));
|
|
15049
|
-
let o = n.state.tr.replace(t.pos, t.pos, new
|
|
15049
|
+
let o = n.state.tr.replace(t.pos, t.pos, new M(i, 0, 0));
|
|
15050
15050
|
return o.setSelection(B.near(o.doc.resolve(t.pos + 1))), n.dispatch(o), !1;
|
|
15051
15051
|
}
|
|
15052
15052
|
function Wv(n) {
|
|
15053
15053
|
if (!(n.selection instanceof de))
|
|
15054
15054
|
return null;
|
|
15055
15055
|
let e = document.createElement("div");
|
|
15056
|
-
return e.className = "ProseMirror-gapcursor", se.create(n.doc, [
|
|
15056
|
+
return e.className = "ProseMirror-gapcursor", se.create(n.doc, [Me.widget(n.selection.head, e, { key: "gapcursor" })]);
|
|
15057
15057
|
}
|
|
15058
15058
|
const Uv = fe.create({
|
|
15059
15059
|
name: "gapCursor",
|
|
@@ -15644,11 +15644,11 @@ const Bf = Pf(!1, !0), zf = Pf(!0, !0), r1 = fe.create({
|
|
|
15644
15644
|
},
|
|
15645
15645
|
addPasteRules() {
|
|
15646
15646
|
return [
|
|
15647
|
-
|
|
15647
|
+
Mn({
|
|
15648
15648
|
find: s1,
|
|
15649
15649
|
type: this.type
|
|
15650
15650
|
}),
|
|
15651
|
-
|
|
15651
|
+
Mn({
|
|
15652
15652
|
find: a1,
|
|
15653
15653
|
type: this.type
|
|
15654
15654
|
})
|
|
@@ -15826,7 +15826,7 @@ const Bf = Pf(!1, !0), zf = Pf(!0, !0), r1 = fe.create({
|
|
|
15826
15826
|
},
|
|
15827
15827
|
addPasteRules() {
|
|
15828
15828
|
return [
|
|
15829
|
-
|
|
15829
|
+
Mn({
|
|
15830
15830
|
find: m1,
|
|
15831
15831
|
type: this.type
|
|
15832
15832
|
})
|
|
@@ -15840,7 +15840,7 @@ const Bf = Pf(!1, !0), zf = Pf(!0, !0), r1 = fe.create({
|
|
|
15840
15840
|
addExtensions() {
|
|
15841
15841
|
var n, e, t, r, i, o, s, l, a, c, d, u, f, p, h, m, g, y;
|
|
15842
15842
|
const v = [];
|
|
15843
|
-
return this.options.bold !== !1 && v.push(Tv.configure((n = this.options) === null || n === void 0 ? void 0 : n.bold)), this.options.blockquote !== !1 && v.push(xv.configure((e = this.options) === null || e === void 0 ? void 0 : e.blockquote)), this.options.bulletList !== !1 && v.push(
|
|
15843
|
+
return this.options.bold !== !1 && v.push(Tv.configure((n = this.options) === null || n === void 0 ? void 0 : n.bold)), this.options.blockquote !== !1 && v.push(xv.configure((e = this.options) === null || e === void 0 ? void 0 : e.blockquote)), this.options.bulletList !== !1 && v.push(Mv.configure((t = this.options) === null || t === void 0 ? void 0 : t.bulletList)), this.options.code !== !1 && v.push(Nv.configure((r = this.options) === null || r === void 0 ? void 0 : r.code)), this.options.codeBlock !== !1 && v.push(Iv.configure((i = this.options) === null || i === void 0 ? void 0 : i.codeBlock)), this.options.document !== !1 && v.push(Lv.configure((o = this.options) === null || o === void 0 ? void 0 : o.document)), this.options.dropcursor !== !1 && v.push(zv.configure((s = this.options) === null || s === void 0 ? void 0 : s.dropcursor)), this.options.gapcursor !== !1 && v.push(Uv.configure((l = this.options) === null || l === void 0 ? void 0 : l.gapcursor)), this.options.hardBreak !== !1 && v.push(qv.configure((a = this.options) === null || a === void 0 ? void 0 : a.hardBreak)), this.options.heading !== !1 && v.push(Kv.configure((c = this.options) === null || c === void 0 ? void 0 : c.heading)), this.options.history !== !1 && v.push(r1.configure((d = this.options) === null || d === void 0 ? void 0 : d.history)), this.options.horizontalRule !== !1 && v.push(i1.configure((u = this.options) === null || u === void 0 ? void 0 : u.horizontalRule)), this.options.italic !== !1 && v.push(c1.configure((f = this.options) === null || f === void 0 ? void 0 : f.italic)), this.options.listItem !== !1 && v.push(d1.configure((p = this.options) === null || p === void 0 ? void 0 : p.listItem)), this.options.orderedList !== !1 && v.push(f1.configure((h = this.options) === null || h === void 0 ? void 0 : h.orderedList)), this.options.paragraph !== !1 && v.push(p1.configure((m = this.options) === null || m === void 0 ? void 0 : m.paragraph)), this.options.strike !== !1 && v.push(g1.configure((g = this.options) === null || g === void 0 ? void 0 : g.strike)), this.options.text !== !1 && v.push(y1.configure((y = this.options) === null || y === void 0 ? void 0 : y.text)), v;
|
|
15844
15844
|
}
|
|
15845
15845
|
}), v1 = Xe.create({
|
|
15846
15846
|
name: "underline",
|
|
@@ -15956,15 +15956,15 @@ const Bf = Pf(!1, !0), zf = Pf(!0, !0), r1 = fe.create({
|
|
|
15956
15956
|
], T1 = {
|
|
15957
15957
|
key: 1,
|
|
15958
15958
|
class: "columns-controls absolute top-2 right-2 flex gap-1 opacity-0 group-hover:opacity-100 transition-opacity duration-200 z-10 bg-white border border-gray-300 rounded-md shadow-lg p-1"
|
|
15959
|
-
},
|
|
15959
|
+
}, A1 = /* @__PURE__ */ dr(() => /* @__PURE__ */ x("svg", {
|
|
15960
15960
|
class: "w-3 h-3",
|
|
15961
15961
|
fill: "currentColor",
|
|
15962
15962
|
viewBox: "0 0 20 20"
|
|
15963
15963
|
}, [
|
|
15964
15964
|
/* @__PURE__ */ x("path", { d: "M2 4a2 2 0 012-2h3a2 2 0 012 2v12a2 2 0 01-2 2H4a2 2 0 01-2-2V4zM11 4a2 2 0 012-2h3a2 2 0 012 2v12a2 2 0 01-2 2h-3a2 2 0 01-2-2V4z" })
|
|
15965
|
-
], -1)),
|
|
15966
|
-
|
|
15967
|
-
|
|
15965
|
+
], -1)), M1 = /* @__PURE__ */ dr(() => /* @__PURE__ */ x("span", null, "2", -1)), E1 = [
|
|
15966
|
+
A1,
|
|
15967
|
+
M1
|
|
15968
15968
|
], O1 = /* @__PURE__ */ dr(() => /* @__PURE__ */ x("svg", {
|
|
15969
15969
|
class: "w-3 h-3",
|
|
15970
15970
|
fill: "currentColor",
|
|
@@ -16043,7 +16043,7 @@ const Bf = Pf(!1, !0), zf = Pf(!0, !0), r1 = fe.create({
|
|
|
16043
16043
|
}, s = () => {
|
|
16044
16044
|
r.value = -1;
|
|
16045
16045
|
};
|
|
16046
|
-
|
|
16046
|
+
Al(() => {
|
|
16047
16047
|
e.editor.on("selectionUpdate", o), e.editor.on("focus", o), e.editor.on("blur", s);
|
|
16048
16048
|
}), Fo(() => {
|
|
16049
16049
|
e.editor.off("selectionUpdate", o), e.editor.off("focus", o), e.editor.off("blur", s);
|
|
@@ -16093,7 +16093,7 @@ const Bf = Pf(!1, !0), zf = Pf(!0, !0), r1 = fe.create({
|
|
|
16093
16093
|
_: 1
|
|
16094
16094
|
}));
|
|
16095
16095
|
}
|
|
16096
|
-
}, P1 = /* @__PURE__ */
|
|
16096
|
+
}, P1 = /* @__PURE__ */ Ml(L1, [["__scopeId", "data-v-3f6f48fb"]]), B1 = ie.create({
|
|
16097
16097
|
name: "customColumnBlock",
|
|
16098
16098
|
group: "block",
|
|
16099
16099
|
content: "customColumn{2,3}",
|
|
@@ -16535,7 +16535,7 @@ function U1(n, e, t) {
|
|
|
16535
16535
|
return !1;
|
|
16536
16536
|
return !0;
|
|
16537
16537
|
}
|
|
16538
|
-
var ne = class
|
|
16538
|
+
var ne = class At extends z {
|
|
16539
16539
|
// A table selection is identified by its anchor and head cells. The
|
|
16540
16540
|
// positions given to this constructor should point _before_ two
|
|
16541
16541
|
// cells in the same table. They may be the same, to select a single
|
|
@@ -16562,7 +16562,7 @@ var ne = class Mt extends z {
|
|
|
16562
16562
|
const r = e.resolve(t.map(this.$anchorCell.pos)), i = e.resolve(t.map(this.$headCell.pos));
|
|
16563
16563
|
if (ml(r) && ml(i) && oa(r, i)) {
|
|
16564
16564
|
const o = this.$anchorCell.node(-1) != r.node(-1);
|
|
16565
|
-
return o && this.isRowSelection() ?
|
|
16565
|
+
return o && this.isRowSelection() ? At.rowSelection(r, i) : o && this.isColSelection() ? At.colSelection(r, i) : new At(r, i);
|
|
16566
16566
|
}
|
|
16567
16567
|
return B.between(r, i);
|
|
16568
16568
|
}
|
|
@@ -16611,16 +16611,16 @@ var ne = class Mt extends z {
|
|
|
16611
16611
|
s.push(e.child(a).copy(S.from(c)));
|
|
16612
16612
|
}
|
|
16613
16613
|
const l = this.isColSelection() && this.isRowSelection() ? e : s;
|
|
16614
|
-
return new
|
|
16614
|
+
return new M(S.from(l), 1, 1);
|
|
16615
16615
|
}
|
|
16616
|
-
replace(e, t =
|
|
16616
|
+
replace(e, t = M.empty) {
|
|
16617
16617
|
const r = e.steps.length, i = this.ranges;
|
|
16618
16618
|
for (let s = 0; s < i.length; s++) {
|
|
16619
16619
|
const { $from: l, $to: a } = i[s], c = e.mapping.slice(r);
|
|
16620
16620
|
e.replace(
|
|
16621
16621
|
c.map(l.pos),
|
|
16622
16622
|
c.map(a.pos),
|
|
16623
|
-
s ?
|
|
16623
|
+
s ? M.empty : t
|
|
16624
16624
|
);
|
|
16625
16625
|
}
|
|
16626
16626
|
const o = z.findFrom(
|
|
@@ -16630,7 +16630,7 @@ var ne = class Mt extends z {
|
|
|
16630
16630
|
o && e.setSelection(o);
|
|
16631
16631
|
}
|
|
16632
16632
|
replaceWith(e, t) {
|
|
16633
|
-
this.replace(e, new
|
|
16633
|
+
this.replace(e, new M(S.from(t), 0, 0));
|
|
16634
16634
|
}
|
|
16635
16635
|
forEachCell(e) {
|
|
16636
16636
|
const t = this.$anchorCell.node(-1), r = ue.get(t), i = this.$anchorCell.start(-1), o = r.cellsInRect(
|
|
@@ -16659,7 +16659,7 @@ var ne = class Mt extends z {
|
|
|
16659
16659
|
o + i.map[i.width * (i.height - 1) + l.right - 1]
|
|
16660
16660
|
))) : (l.top > 0 && (t = a.resolve(o + i.map[l.left])), s.bottom < i.height && (e = a.resolve(
|
|
16661
16661
|
o + i.map[i.width * (i.height - 1) + s.right - 1]
|
|
16662
|
-
))), new
|
|
16662
|
+
))), new At(e, t);
|
|
16663
16663
|
}
|
|
16664
16664
|
// True if this selection goes all the way from the left to the
|
|
16665
16665
|
// right of the table.
|
|
@@ -16671,7 +16671,7 @@ var ne = class Mt extends z {
|
|
|
16671
16671
|
return Math.max(s, l) == t.width;
|
|
16672
16672
|
}
|
|
16673
16673
|
eq(e) {
|
|
16674
|
-
return e instanceof
|
|
16674
|
+
return e instanceof At && e.$anchorCell.pos == this.$anchorCell.pos && e.$headCell.pos == this.$headCell.pos;
|
|
16675
16675
|
}
|
|
16676
16676
|
// Returns the smallest row selection that covers the given anchor
|
|
16677
16677
|
// and head cell.
|
|
@@ -16683,7 +16683,7 @@ var ne = class Mt extends z {
|
|
|
16683
16683
|
o + i.map[i.width * (l.top + 1) - 1]
|
|
16684
16684
|
))) : (l.left > 0 && (t = a.resolve(o + i.map[l.top * i.width])), s.right < i.width && (e = a.resolve(
|
|
16685
16685
|
o + i.map[i.width * (s.top + 1) - 1]
|
|
16686
|
-
))), new
|
|
16686
|
+
))), new At(e, t);
|
|
16687
16687
|
}
|
|
16688
16688
|
toJSON() {
|
|
16689
16689
|
return {
|
|
@@ -16693,10 +16693,10 @@ var ne = class Mt extends z {
|
|
|
16693
16693
|
};
|
|
16694
16694
|
}
|
|
16695
16695
|
static fromJSON(e, t) {
|
|
16696
|
-
return new
|
|
16696
|
+
return new At(e.resolve(t.anchor), e.resolve(t.head));
|
|
16697
16697
|
}
|
|
16698
16698
|
static create(e, t, r = t) {
|
|
16699
|
-
return new
|
|
16699
|
+
return new At(e.resolve(t), e.resolve(r));
|
|
16700
16700
|
}
|
|
16701
16701
|
getBookmark() {
|
|
16702
16702
|
return new q1(this.$anchorCell.pos, this.$headCell.pos);
|
|
@@ -16722,7 +16722,7 @@ function K1(n) {
|
|
|
16722
16722
|
const e = [];
|
|
16723
16723
|
return n.selection.forEachCell((t, r) => {
|
|
16724
16724
|
e.push(
|
|
16725
|
-
|
|
16725
|
+
Me.node(r, r + t.nodeSize, { class: "selectedCell" })
|
|
16726
16726
|
);
|
|
16727
16727
|
}), se.create(n.doc, e);
|
|
16728
16728
|
}
|
|
@@ -17305,7 +17305,7 @@ function Ni(n, e) {
|
|
|
17305
17305
|
o.content.eq(i) || r.replace(
|
|
17306
17306
|
r.mapping.map(s + 1),
|
|
17307
17307
|
r.mapping.map(s + o.nodeSize - 1),
|
|
17308
|
-
new
|
|
17308
|
+
new M(i, 0, 0)
|
|
17309
17309
|
);
|
|
17310
17310
|
}), r.docChanged && e(r);
|
|
17311
17311
|
}
|
|
@@ -17324,14 +17324,14 @@ function mx(n) {
|
|
|
17324
17324
|
const d = a ? 0 : Math.max(0, t - 1), u = a < e.childCount - 1 ? 0 : Math.max(0, r - 1);
|
|
17325
17325
|
(d || u) && (c = gl(
|
|
17326
17326
|
Ee(s).row,
|
|
17327
|
-
new
|
|
17327
|
+
new M(c, d, u)
|
|
17328
17328
|
).content), l.push(c);
|
|
17329
17329
|
}
|
|
17330
17330
|
else if (o == "cell" || o == "header_cell")
|
|
17331
17331
|
l.push(
|
|
17332
17332
|
t || r ? gl(
|
|
17333
17333
|
Ee(s).row,
|
|
17334
|
-
new
|
|
17334
|
+
new M(e, t, r)
|
|
17335
17335
|
).content : e
|
|
17336
17336
|
);
|
|
17337
17337
|
else
|
|
@@ -17503,7 +17503,7 @@ function cd(n, e, t, r, i) {
|
|
|
17503
17503
|
u.replace(
|
|
17504
17504
|
u.mapping.slice(f).map(m + t),
|
|
17505
17505
|
u.mapping.slice(f).map(g + t),
|
|
17506
|
-
new
|
|
17506
|
+
new M(i.rows[h - l], 0, 0)
|
|
17507
17507
|
);
|
|
17508
17508
|
}
|
|
17509
17509
|
p(), u.setSelection(
|
|
@@ -17757,10 +17757,10 @@ function Sx({
|
|
|
17757
17757
|
},
|
|
17758
17758
|
handleDOMEvents: {
|
|
17759
17759
|
mousemove: (s, l) => {
|
|
17760
|
-
|
|
17760
|
+
Ax(s, l, n, i);
|
|
17761
17761
|
},
|
|
17762
17762
|
mouseleave: (s) => {
|
|
17763
|
-
|
|
17763
|
+
Mx(s);
|
|
17764
17764
|
},
|
|
17765
17765
|
mousedown: (s, l) => {
|
|
17766
17766
|
Ex(s, l, e, t);
|
|
@@ -17793,7 +17793,7 @@ var Tx = class Wi {
|
|
|
17793
17793
|
return t;
|
|
17794
17794
|
}
|
|
17795
17795
|
};
|
|
17796
|
-
function
|
|
17796
|
+
function Ax(n, e, t, r) {
|
|
17797
17797
|
const i = je.getState(n.state);
|
|
17798
17798
|
if (i && !i.dragging) {
|
|
17799
17799
|
const o = Nx(e.target);
|
|
@@ -17812,7 +17812,7 @@ function Mx(n, e, t, r) {
|
|
|
17812
17812
|
}
|
|
17813
17813
|
}
|
|
17814
17814
|
}
|
|
17815
|
-
function
|
|
17815
|
+
function Mx(n) {
|
|
17816
17816
|
const e = je.getState(n.state);
|
|
17817
17817
|
e && e.activeHandle > -1 && !e.dragging && qf(n, -1);
|
|
17818
17818
|
}
|
|
@@ -17941,14 +17941,14 @@ function Ix(n, e) {
|
|
|
17941
17941
|
if ((a == s.width - 1 || s.map[d] != s.map[d + 1]) && (c == 0 || s.map[d] != s.map[d - s.width])) {
|
|
17942
17942
|
const u = s.map[d], f = l + u + o.nodeAt(u).nodeSize - 1, p = document.createElement("div");
|
|
17943
17943
|
p.className = "column-resize-handle", (t = je.getState(n)) != null && t.dragging && r.push(
|
|
17944
|
-
|
|
17944
|
+
Me.node(
|
|
17945
17945
|
l + u,
|
|
17946
17946
|
l + u + o.nodeAt(u).nodeSize,
|
|
17947
17947
|
{
|
|
17948
17948
|
class: "column-resize-dragging"
|
|
17949
17949
|
}
|
|
17950
17950
|
)
|
|
17951
|
-
), r.push(
|
|
17951
|
+
), r.push(Me.widget(f, p));
|
|
17952
17952
|
}
|
|
17953
17953
|
}
|
|
17954
17954
|
return se.create(n.doc, r);
|
|
@@ -18386,7 +18386,7 @@ const Ii = ({ editor: n }) => {
|
|
|
18386
18386
|
const t = n, r = e, i = q(t.imageTitle), o = q(t.imageAltText), s = q(t.imageUrl), l = q(t.alignment), a = () => {
|
|
18387
18387
|
r("delete"), r("close");
|
|
18388
18388
|
};
|
|
18389
|
-
return (c, d) => (E(), X(
|
|
18389
|
+
return (c, d) => (E(), X(Md, {
|
|
18390
18390
|
show: !0,
|
|
18391
18391
|
class: "w-[40%] h-[60%] left-[40%] top-[40%] z-60 !p-0",
|
|
18392
18392
|
onClose: d[8] || (d[8] = (u) => c.$emit("close"))
|
|
@@ -18531,10 +18531,10 @@ const Ii = ({ editor: n }) => {
|
|
|
18531
18531
|
components: {
|
|
18532
18532
|
DropdownMenu: Td,
|
|
18533
18533
|
DropdownMenuItem: Tp,
|
|
18534
|
-
GearComplexIcon:
|
|
18534
|
+
GearComplexIcon: Mp,
|
|
18535
18535
|
NodeViewWrapper: rs,
|
|
18536
18536
|
BaseModal: qi,
|
|
18537
|
-
InputField:
|
|
18537
|
+
InputField: Ad,
|
|
18538
18538
|
EditImageModal: sw
|
|
18539
18539
|
},
|
|
18540
18540
|
computed: {
|
|
@@ -18647,7 +18647,7 @@ function fw(n, e, t, r, i, o) {
|
|
|
18647
18647
|
_: 1
|
|
18648
18648
|
}, 8, ["onClick"]);
|
|
18649
18649
|
}
|
|
18650
|
-
const pw = /* @__PURE__ */
|
|
18650
|
+
const pw = /* @__PURE__ */ Ml(cw, [["render", fw]]), hw = ie.create({
|
|
18651
18651
|
name: "ResizeableImage",
|
|
18652
18652
|
group: "block",
|
|
18653
18653
|
inline: !1,
|
|
@@ -18759,7 +18759,7 @@ const pw = /* @__PURE__ */ Al(cw, [["render", fw]]), hw = ie.create({
|
|
|
18759
18759
|
/* @__PURE__ */ x("span", { class: "text-black-950" }, " or drag and drop")
|
|
18760
18760
|
]),
|
|
18761
18761
|
/* @__PURE__ */ x("p", { class: "text-[11px] leading-[1.2] text-black-700" }, "PNG or JPG up to 5MB")
|
|
18762
|
-
], -1),
|
|
18762
|
+
], -1), Aw = ["onClick"], Mw = /* @__PURE__ */ x("i", { class: "fa-light fa-image text-[24px] text-black-150" }, null, -1), Ew = /* @__PURE__ */ x("div", { class: "flex flex-col gap-[5px] items-center text-center w-full" }, [
|
|
18763
18763
|
/* @__PURE__ */ x("p", { class: "text-[13px] leading-[1.2]" }, [
|
|
18764
18764
|
/* @__PURE__ */ x("span", { class: "font-bold text-proclus-950" }, "Upload a file"),
|
|
18765
18765
|
/* @__PURE__ */ x("span", { class: "text-black-950" }, " or drag and drop")
|
|
@@ -18825,7 +18825,7 @@ const pw = /* @__PURE__ */ Al(cw, [["render", fw]]), hw = ie.create({
|
|
|
18825
18825
|
}, g = () => {
|
|
18826
18826
|
i.value.length !== 0 && (r("save", [...i.value]), r("close"));
|
|
18827
18827
|
};
|
|
18828
|
-
return (y, v) => (E(), X(
|
|
18828
|
+
return (y, v) => (E(), X(Md, {
|
|
18829
18829
|
show: !0,
|
|
18830
18830
|
onClose: v[2] || (v[2] = (w) => y.$emit("close")),
|
|
18831
18831
|
class: "w-[410px] max-w-[93vw] !p-0 !rounded-[20px] !top-[calc(50%+10.5px)] !shadow-[0px_6px_15px_0px_rgba(0,0,0,0.1),0px_3px_8px_0px_rgba(0,0,0,0.1)]"
|
|
@@ -18892,7 +18892,7 @@ const pw = /* @__PURE__ */ Al(cw, [["render", fw]]), hw = ie.create({
|
|
|
18892
18892
|
class: "relative w-[calc(50%-5px)] h-[115px] bg-white border border-dashed border-black-150 rounded-[8px] flex flex-col gap-[10px] items-center justify-center p-[15px] cursor-pointer",
|
|
18893
18893
|
onClick: (b) => p(w - 1)
|
|
18894
18894
|
}, [
|
|
18895
|
-
|
|
18895
|
+
Mw,
|
|
18896
18896
|
Ew,
|
|
18897
18897
|
x("input", {
|
|
18898
18898
|
ref_for: !0,
|
|
@@ -18904,7 +18904,7 @@ const pw = /* @__PURE__ */ Al(cw, [["render", fw]]), hw = ie.create({
|
|
|
18904
18904
|
class: "hidden",
|
|
18905
18905
|
onChange: h
|
|
18906
18906
|
}, null, 544)
|
|
18907
|
-
], 8,
|
|
18907
|
+
], 8, Aw)), [
|
|
18908
18908
|
[wp, !a.value]
|
|
18909
18909
|
])), 128)),
|
|
18910
18910
|
i.value.length + l.value + 1 < 8 && !a.value ? (E(), j("div", {
|
|
@@ -18945,31 +18945,31 @@ const pw = /* @__PURE__ */ Al(cw, [["render", fw]]), hw = ie.create({
|
|
|
18945
18945
|
}
|
|
18946
18946
|
},
|
|
18947
18947
|
setup(n) {
|
|
18948
|
-
const e = n,
|
|
18949
|
-
|
|
18950
|
-
},
|
|
18948
|
+
const e = n, r = q(((d) => Array.isArray(d) ? d : d ? [d] : [])(e.node.attrs.srcs)), { state: i, prev: o, next: s } = Np(r.value), l = r.length == 0 ? q(!0) : q(!1), a = (d) => {
|
|
18949
|
+
r.value = d, i.value = r.value[0];
|
|
18950
|
+
}, c = () => {
|
|
18951
18951
|
e.deleteNode();
|
|
18952
18952
|
};
|
|
18953
|
-
return (
|
|
18953
|
+
return (d, u) => (E(), X(V(rs), { class: "vue-component" }, {
|
|
18954
18954
|
default: P(() => [
|
|
18955
18955
|
x("div", Lw, [
|
|
18956
18956
|
x("div", {
|
|
18957
18957
|
class: "absolute top-0 right-0 w-6 h-6 bg-red-500 text-white rounded-full flex items-center justify-center cursor-pointer hover:bg-red-600 transition-colors duration-200 z-10 opacity-0 group-hover:opacity-100 transition-opacity",
|
|
18958
|
-
onClick:
|
|
18958
|
+
onClick: c
|
|
18959
18959
|
}, Bw),
|
|
18960
|
-
(E(!0), j(Cn, null, Fr(
|
|
18960
|
+
(E(!0), j(Cn, null, Fr(r.value, (f) => (E(), j("div", zw, [
|
|
18961
18961
|
x("div", $w, [
|
|
18962
18962
|
x("img", {
|
|
18963
18963
|
class: "h-[136px]",
|
|
18964
|
-
src:
|
|
18964
|
+
src: f
|
|
18965
18965
|
}, null, 8, Hw)
|
|
18966
18966
|
])
|
|
18967
18967
|
]))), 256)),
|
|
18968
|
-
|
|
18968
|
+
r.value.length < 8 ? (E(), j("div", {
|
|
18969
18969
|
key: 0,
|
|
18970
18970
|
class: "m-2 !mt-2",
|
|
18971
|
-
onClick:
|
|
18972
|
-
|
|
18971
|
+
onClick: u[0] || (u[0] = (f) => {
|
|
18972
|
+
l.value = !0;
|
|
18973
18973
|
})
|
|
18974
18974
|
}, Vw)) : W("", !0)
|
|
18975
18975
|
]),
|
|
@@ -18977,15 +18977,15 @@ const pw = /* @__PURE__ */ Al(cw, [["render", fw]]), hw = ie.create({
|
|
|
18977
18977
|
x("div", _w, [
|
|
18978
18978
|
x("i", {
|
|
18979
18979
|
class: "fa-solid fa-arrow-left text-xl cursor-pointer",
|
|
18980
|
-
onClick:
|
|
18980
|
+
onClick: u[1] || (u[1] = (f) => V(o)())
|
|
18981
18981
|
})
|
|
18982
18982
|
]),
|
|
18983
18983
|
x("div", Ww, [
|
|
18984
18984
|
I(kp, null, {
|
|
18985
18985
|
default: P(() => [
|
|
18986
18986
|
(E(), j("img", {
|
|
18987
|
-
src: V(
|
|
18988
|
-
key: V(
|
|
18987
|
+
src: V(i),
|
|
18988
|
+
key: V(i),
|
|
18989
18989
|
class: "absolute max-h-full w-auto"
|
|
18990
18990
|
}, null, 8, Uw))
|
|
18991
18991
|
]),
|
|
@@ -18995,17 +18995,17 @@ const pw = /* @__PURE__ */ Al(cw, [["render", fw]]), hw = ie.create({
|
|
|
18995
18995
|
x("div", qw, [
|
|
18996
18996
|
x("i", {
|
|
18997
18997
|
class: "fa-solid fa-arrow-right text-xl cursor-pointer",
|
|
18998
|
-
onClick:
|
|
18998
|
+
onClick: u[2] || (u[2] = (f) => V(s)())
|
|
18999
18999
|
})
|
|
19000
19000
|
])
|
|
19001
19001
|
]),
|
|
19002
|
-
V(
|
|
19002
|
+
V(l) ? (E(), X(Jf, {
|
|
19003
19003
|
key: 0,
|
|
19004
|
-
onClose:
|
|
19005
|
-
|
|
19004
|
+
onClose: u[3] || (u[3] = (f) => {
|
|
19005
|
+
l.value = !1;
|
|
19006
19006
|
}),
|
|
19007
|
-
onSave:
|
|
19008
|
-
images:
|
|
19007
|
+
onSave: a,
|
|
19008
|
+
images: r.value
|
|
19009
19009
|
}, null, 8, ["images"])) : W("", !0)
|
|
19010
19010
|
]),
|
|
19011
19011
|
_: 1
|
|
@@ -19032,7 +19032,24 @@ const pw = /* @__PURE__ */ Al(cw, [["render", fw]]), hw = ie.create({
|
|
|
19032
19032
|
addAttributes() {
|
|
19033
19033
|
return {
|
|
19034
19034
|
srcs: {
|
|
19035
|
-
default: []
|
|
19035
|
+
default: [],
|
|
19036
|
+
// `srcs` is an array of image URLs/data-URIs. Serialise it to the DOM as JSON so it
|
|
19037
|
+
// round-trips as an array. Without this the array was flattened to a comma-joined
|
|
19038
|
+
// attribute string on save and read back as a string, which the node view then
|
|
19039
|
+
// iterated character-by-character — rendering one <img> per character of the base64
|
|
19040
|
+
// data URI (an "infinitely long list of images"). See ImageCarousel.test.js.
|
|
19041
|
+
parseHTML: (n) => {
|
|
19042
|
+
const e = n.getAttribute("srcs");
|
|
19043
|
+
if (!e)
|
|
19044
|
+
return [];
|
|
19045
|
+
try {
|
|
19046
|
+
const t = JSON.parse(e);
|
|
19047
|
+
return Array.isArray(t) ? t : [String(t)];
|
|
19048
|
+
} catch {
|
|
19049
|
+
return [e];
|
|
19050
|
+
}
|
|
19051
|
+
},
|
|
19052
|
+
renderHTML: (n) => ({ srcs: JSON.stringify(n.srcs ?? []) })
|
|
19036
19053
|
}
|
|
19037
19054
|
};
|
|
19038
19055
|
},
|
|
@@ -19066,7 +19083,7 @@ const pw = /* @__PURE__ */ Al(cw, [["render", fw]]), hw = ie.create({
|
|
|
19066
19083
|
if ((a || !this.options.showOnlyCurrent) && c) {
|
|
19067
19084
|
const d = [this.options.emptyNodeClass];
|
|
19068
19085
|
o && d.push(this.options.emptyEditorClass);
|
|
19069
|
-
const u =
|
|
19086
|
+
const u = Me.node(l, l + s.nodeSize, {
|
|
19070
19087
|
class: d.join(" "),
|
|
19071
19088
|
"data-placeholder": typeof this.options.placeholder == "function" ? this.options.placeholder({
|
|
19072
19089
|
editor: this.editor,
|
|
@@ -19257,12 +19274,12 @@ Pe.prototype = {
|
|
|
19257
19274
|
return i.j[n] = s, s;
|
|
19258
19275
|
}
|
|
19259
19276
|
};
|
|
19260
|
-
const F = (n, e, t, r, i) => n.ta(e, t, r, i), ce = (n, e, t, r, i) => n.tr(e, t, r, i), gd = (n, e, t, r, i) => n.ts(e, t, r, i),
|
|
19277
|
+
const F = (n, e, t, r, i) => n.ta(e, t, r, i), ce = (n, e, t, r, i) => n.tr(e, t, r, i), gd = (n, e, t, r, i) => n.ts(e, t, r, i), A = (n, e, t, r, i) => n.tt(e, t, r, i), Mt = "WORD", kl = "UWORD", Yf = "ASCIINUMERICAL", Xf = "ALPHANUMERICAL", ni = "LOCALHOST", Cl = "TLD", Sl = "UTLD", Ui = "SCHEME", _n = "SLASH_SCHEME", sa = "NUM", Tl = "WS", la = "NL", Lr = "OPENBRACE", Pr = "CLOSEBRACE", fo = "OPENBRACKET", po = "CLOSEBRACKET", ho = "OPENPAREN", mo = "CLOSEPAREN", go = "OPENANGLEBRACKET", yo = "CLOSEANGLEBRACKET", bo = "FULLWIDTHLEFTPAREN", vo = "FULLWIDTHRIGHTPAREN", xo = "LEFTCORNERBRACKET", wo = "RIGHTCORNERBRACKET", ko = "LEFTWHITECORNERBRACKET", Co = "RIGHTWHITECORNERBRACKET", So = "FULLWIDTHLESSTHAN", To = "FULLWIDTHGREATERTHAN", Ao = "AMPERSAND", Mo = "APOSTROPHE", Eo = "ASTERISK", Ht = "AT", Oo = "BACKSLASH", No = "BACKTICK", Do = "CARET", jt = "COLON", aa = "COMMA", Ro = "DOLLAR", dt = "DOT", Io = "EQUALS", ca = "EXCLAMATION", qe = "HYPHEN", Br = "PERCENT", Lo = "PIPE", Po = "PLUS", Bo = "POUND", zr = "QUERY", da = "QUOTE", Qf = "FULLWIDTHMIDDLEDOT", ua = "SEMI", ut = "SLASH", $r = "TILDE", zo = "UNDERSCORE", Zf = "EMOJI", $o = "SYM";
|
|
19261
19278
|
var ep = /* @__PURE__ */ Object.freeze({
|
|
19262
19279
|
__proto__: null,
|
|
19263
19280
|
ALPHANUMERICAL: Xf,
|
|
19264
|
-
AMPERSAND:
|
|
19265
|
-
APOSTROPHE:
|
|
19281
|
+
AMPERSAND: Ao,
|
|
19282
|
+
APOSTROPHE: Mo,
|
|
19266
19283
|
ASCIINUMERICAL: Yf,
|
|
19267
19284
|
ASTERISK: Eo,
|
|
19268
19285
|
AT: Ht,
|
|
@@ -19313,7 +19330,7 @@ var ep = /* @__PURE__ */ Object.freeze({
|
|
|
19313
19330
|
UNDERSCORE: zo,
|
|
19314
19331
|
UTLD: Sl,
|
|
19315
19332
|
UWORD: kl,
|
|
19316
|
-
WORD:
|
|
19333
|
+
WORD: Mt,
|
|
19317
19334
|
WS: Tl
|
|
19318
19335
|
});
|
|
19319
19336
|
const St = /[a-z]/, vr = new RegExp("\\p{L}", "u"), zs = new RegExp("\\p{Emoji}", "u"), Tt = /\d/, $s = /\s/, yd = "\r", Hs = `
|
|
@@ -19323,7 +19340,7 @@ function ok(n = []) {
|
|
|
19323
19340
|
const e = {};
|
|
19324
19341
|
Pe.groups = e;
|
|
19325
19342
|
const t = new Pe();
|
|
19326
|
-
Li == null && (Li = bd(Xw)), Pi == null && (Pi = bd(Qw)),
|
|
19343
|
+
Li == null && (Li = bd(Xw)), Pi == null && (Pi = bd(Qw)), A(t, "'", Mo), A(t, "{", Lr), A(t, "}", Pr), A(t, "[", fo), A(t, "]", po), A(t, "(", ho), A(t, ")", mo), A(t, "<", go), A(t, ">", yo), A(t, "(", bo), A(t, ")", vo), A(t, "「", xo), A(t, "」", wo), A(t, "『", ko), A(t, "』", Co), A(t, "<", So), A(t, ">", To), A(t, "&", Ao), A(t, "*", Eo), A(t, "@", Ht), A(t, "`", No), A(t, "^", Do), A(t, ":", jt), A(t, ",", aa), A(t, "$", Ro), A(t, ".", dt), A(t, "=", Io), A(t, "!", ca), A(t, "-", qe), A(t, "%", Br), A(t, "|", Lo), A(t, "+", Po), A(t, "#", Bo), A(t, "?", zr), A(t, '"', da), A(t, "/", ut), A(t, ";", ua), A(t, "~", $r), A(t, "_", zo), A(t, "\\", Oo), A(t, "・", Qf);
|
|
19327
19344
|
const r = ce(t, Tt, sa, {
|
|
19328
19345
|
[bl]: !0
|
|
19329
19346
|
});
|
|
@@ -19332,7 +19349,7 @@ function ok(n = []) {
|
|
|
19332
19349
|
[Ir]: !0
|
|
19333
19350
|
}), o = ce(r, vr, Xf, {
|
|
19334
19351
|
[Sr]: !0
|
|
19335
|
-
}), s = ce(t, St,
|
|
19352
|
+
}), s = ce(t, St, Mt, {
|
|
19336
19353
|
[vl]: !0
|
|
19337
19354
|
});
|
|
19338
19355
|
ce(s, Tt, i), ce(s, St, s), ce(i, Tt, i), ce(i, St, i);
|
|
@@ -19340,23 +19357,23 @@ function ok(n = []) {
|
|
|
19340
19357
|
[xl]: !0
|
|
19341
19358
|
});
|
|
19342
19359
|
ce(l, St), ce(l, Tt, o), ce(l, vr, l), ce(o, Tt, o), ce(o, St), ce(o, vr, o);
|
|
19343
|
-
const a =
|
|
19360
|
+
const a = A(t, Hs, la, {
|
|
19344
19361
|
[Bs]: !0
|
|
19345
|
-
}), c =
|
|
19362
|
+
}), c = A(t, yd, Tl, {
|
|
19346
19363
|
[Bs]: !0
|
|
19347
19364
|
}), d = ce(t, $s, Tl, {
|
|
19348
19365
|
[Bs]: !0
|
|
19349
19366
|
});
|
|
19350
|
-
|
|
19367
|
+
A(t, Fs, d), A(c, Hs, a), A(c, Fs, d), ce(c, $s, d), A(d, yd), A(d, Hs), ce(d, $s, d), A(d, Fs, d);
|
|
19351
19368
|
const u = ce(t, zs, Zf, {
|
|
19352
19369
|
[Gf]: !0
|
|
19353
19370
|
});
|
|
19354
|
-
|
|
19355
|
-
const f =
|
|
19356
|
-
|
|
19371
|
+
A(u, "#"), ce(u, zs, u), A(u, rk, u);
|
|
19372
|
+
const f = A(u, ik);
|
|
19373
|
+
A(f, "#"), ce(f, zs, u);
|
|
19357
19374
|
const p = [[St, s], [Tt, i]], h = [[St, null], [vr, l], [Tt, o]];
|
|
19358
19375
|
for (let m = 0; m < Li.length; m++)
|
|
19359
|
-
Pt(t, Li[m], Cl,
|
|
19376
|
+
Pt(t, Li[m], Cl, Mt, p);
|
|
19360
19377
|
for (let m = 0; m < Pi.length; m++)
|
|
19361
19378
|
Pt(t, Pi[m], Sl, kl, h);
|
|
19362
19379
|
pn(Cl, {
|
|
@@ -19365,7 +19382,7 @@ function ok(n = []) {
|
|
|
19365
19382
|
}, e), pn(Sl, {
|
|
19366
19383
|
utld: !0,
|
|
19367
19384
|
alpha: !0
|
|
19368
|
-
}, e), Pt(t, "file", Ui,
|
|
19385
|
+
}, e), Pt(t, "file", Ui, Mt, p), Pt(t, "mailto", Ui, Mt, p), Pt(t, "http", _n, Mt, p), Pt(t, "https", _n, Mt, p), Pt(t, "ftp", _n, Mt, p), Pt(t, "ftps", _n, Mt, p), pn(Ui, {
|
|
19369
19386
|
scheme: !0,
|
|
19370
19387
|
ascii: !0
|
|
19371
19388
|
}, e), pn(_n, {
|
|
@@ -19679,34 +19696,34 @@ const xd = ls("email", {
|
|
|
19679
19696
|
function ak({
|
|
19680
19697
|
groups: n
|
|
19681
19698
|
}) {
|
|
19682
|
-
const e = n.domain.concat([
|
|
19699
|
+
const e = n.domain.concat([Ao, Eo, Ht, Oo, No, Do, Ro, Io, qe, sa, Br, Lo, Po, Bo, ut, $o, $r, zo]), t = [Mo, jt, aa, dt, ca, Br, zr, da, ua, go, yo, Lr, Pr, po, fo, ho, mo, bo, vo, xo, wo, ko, Co, So, To], r = [Ao, Mo, Eo, Oo, No, Do, Ro, Io, qe, Lr, Pr, Br, Lo, Po, Bo, zr, ut, $o, $r, zo], i = Ue(), o = A(i, $r);
|
|
19683
19700
|
F(o, r, o), F(o, n.domain, o);
|
|
19684
19701
|
const s = Ue(), l = Ue(), a = Ue();
|
|
19685
19702
|
F(i, n.domain, s), F(i, n.scheme, l), F(i, n.slashscheme, a), F(s, r, o), F(s, n.domain, s);
|
|
19686
|
-
const c =
|
|
19687
|
-
|
|
19688
|
-
const d =
|
|
19703
|
+
const c = A(s, Ht);
|
|
19704
|
+
A(o, Ht, c), A(l, Ht, c), A(a, Ht, c);
|
|
19705
|
+
const d = A(o, dt);
|
|
19689
19706
|
F(d, r, o), F(d, n.domain, o);
|
|
19690
19707
|
const u = Ue();
|
|
19691
19708
|
F(c, n.domain, u), F(u, n.domain, u);
|
|
19692
|
-
const f =
|
|
19709
|
+
const f = A(u, dt);
|
|
19693
19710
|
F(f, n.domain, u);
|
|
19694
19711
|
const p = Ue(xd);
|
|
19695
|
-
F(f, n.tld, p), F(f, n.utld, p),
|
|
19696
|
-
const h =
|
|
19697
|
-
|
|
19698
|
-
const m =
|
|
19712
|
+
F(f, n.tld, p), F(f, n.utld, p), A(c, ni, p);
|
|
19713
|
+
const h = A(u, qe);
|
|
19714
|
+
A(h, qe, h), F(h, n.domain, u), F(p, n.domain, u), A(p, dt, f), A(p, qe, h);
|
|
19715
|
+
const m = A(p, jt);
|
|
19699
19716
|
F(m, n.numeric, xd);
|
|
19700
|
-
const g =
|
|
19701
|
-
|
|
19717
|
+
const g = A(s, qe), y = A(s, dt);
|
|
19718
|
+
A(g, qe, g), F(g, n.domain, s), F(y, r, o), F(y, n.domain, s);
|
|
19702
19719
|
const v = Ue(Bi);
|
|
19703
|
-
F(y, n.tld, v), F(y, n.utld, v), F(v, n.domain, s), F(v, r, o),
|
|
19704
|
-
const w =
|
|
19720
|
+
F(y, n.tld, v), F(y, n.utld, v), F(v, n.domain, s), F(v, r, o), A(v, dt, y), A(v, qe, g), A(v, Ht, c);
|
|
19721
|
+
const w = A(v, jt), b = Ue(Bi);
|
|
19705
19722
|
F(w, n.numeric, b);
|
|
19706
19723
|
const T = Ue(Bi), k = Ue();
|
|
19707
|
-
F(T, e, T), F(T, t, k), F(k, e, T), F(k, t, k),
|
|
19708
|
-
const O =
|
|
19709
|
-
F(l, n.domain, s),
|
|
19724
|
+
F(T, e, T), F(T, t, k), F(k, e, T), F(k, t, k), A(v, ut, T), A(b, ut, T);
|
|
19725
|
+
const O = A(l, jt), H = A(a, jt), D = A(H, ut), K = A(D, ut);
|
|
19726
|
+
F(l, n.domain, s), A(l, dt, y), A(l, qe, g), F(a, n.domain, s), A(a, dt, y), A(a, qe, g), F(O, n.domain, T), A(O, ut, T), A(O, zr, T), F(K, n.domain, T), F(K, e, T), A(K, ut, T);
|
|
19710
19727
|
const Q = [
|
|
19711
19728
|
[Lr, Pr],
|
|
19712
19729
|
// {}
|
|
@@ -19726,14 +19743,14 @@ function ak({
|
|
|
19726
19743
|
// <>
|
|
19727
19744
|
];
|
|
19728
19745
|
for (let Y = 0; Y < Q.length; Y++) {
|
|
19729
|
-
const [te, xe] = Q[Y], me =
|
|
19730
|
-
|
|
19746
|
+
const [te, xe] = Q[Y], me = A(T, te);
|
|
19747
|
+
A(k, te, me), A(me, xe, T);
|
|
19731
19748
|
const oe = Ue(Bi);
|
|
19732
19749
|
F(me, e, oe);
|
|
19733
19750
|
const ae = Ue();
|
|
19734
|
-
F(me, t), F(oe, e, oe), F(oe, t, ae), F(ae, e, oe), F(ae, t, ae),
|
|
19751
|
+
F(me, t), F(oe, e, oe), F(oe, t, ae), F(ae, e, oe), F(ae, t, ae), A(oe, xe, T), A(ae, xe, T);
|
|
19735
19752
|
}
|
|
19736
|
-
return
|
|
19753
|
+
return A(i, ni, v), A(i, la, lk), {
|
|
19737
19754
|
start: i,
|
|
19738
19755
|
tokens: ep
|
|
19739
19756
|
};
|
|
@@ -20018,7 +20035,7 @@ const vk = Xe.create({
|
|
|
20018
20035
|
},
|
|
20019
20036
|
addPasteRules() {
|
|
20020
20037
|
return [
|
|
20021
|
-
|
|
20038
|
+
Mn({
|
|
20022
20039
|
find: (n) => {
|
|
20023
20040
|
const e = [];
|
|
20024
20041
|
if (n) {
|
|
@@ -20164,7 +20181,7 @@ function Tk(n, e) {
|
|
|
20164
20181
|
}
|
|
20165
20182
|
return !0;
|
|
20166
20183
|
}
|
|
20167
|
-
const
|
|
20184
|
+
const Ak = fe.create({
|
|
20168
20185
|
name: "templateLock",
|
|
20169
20186
|
addOptions() {
|
|
20170
20187
|
return { enabled: !1 };
|
|
@@ -20182,7 +20199,7 @@ const Mk = fe.create({
|
|
|
20182
20199
|
})
|
|
20183
20200
|
] : [];
|
|
20184
20201
|
}
|
|
20185
|
-
}),
|
|
20202
|
+
}), Mk = [
|
|
20186
20203
|
b1.configure({
|
|
20187
20204
|
heading: {
|
|
20188
20205
|
levels: [1, 2],
|
|
@@ -20262,8 +20279,8 @@ const Mk = fe.create({
|
|
|
20262
20279
|
kk
|
|
20263
20280
|
], ip = (n, e, { templateLocked: t = !1 } = {}) => {
|
|
20264
20281
|
const r = [
|
|
20265
|
-
...
|
|
20266
|
-
|
|
20282
|
+
...Mk,
|
|
20283
|
+
Ak.configure({ enabled: t })
|
|
20267
20284
|
];
|
|
20268
20285
|
return new mv({
|
|
20269
20286
|
extensions: r,
|
|
@@ -20589,7 +20606,7 @@ const Mk = fe.create({
|
|
|
20589
20606
|
]),
|
|
20590
20607
|
default: P(() => [
|
|
20591
20608
|
x("div", eC, [
|
|
20592
|
-
I(V(
|
|
20609
|
+
I(V(Ap), {
|
|
20593
20610
|
useLabels: "",
|
|
20594
20611
|
leftLabel: "Web URL",
|
|
20595
20612
|
rightLabel: "Document",
|
|
@@ -20885,7 +20902,7 @@ const Mk = fe.create({
|
|
|
20885
20902
|
n.isOpen ? (E(), j("div", cC, [
|
|
20886
20903
|
dC,
|
|
20887
20904
|
x("div", uC, [
|
|
20888
|
-
I(V(
|
|
20905
|
+
I(V(Ad), {
|
|
20889
20906
|
modelValue: i.value,
|
|
20890
20907
|
"onUpdate:modelValue": v[6] || (v[6] = (w) => i.value = w),
|
|
20891
20908
|
placeholder: "Search options...",
|
|
@@ -21106,10 +21123,10 @@ const Mk = fe.create({
|
|
|
21106
21123
|
class: "absolute top-9 z-10 p-1 rounded bg-steel-200 flex flex-row flex-wrap gap-x-1 max-w-[188px] border border-steel-500"
|
|
21107
21124
|
}, kC = ["onClick"], CC = /* @__PURE__ */ x("b", null, "B", -1), SC = [
|
|
21108
21125
|
CC
|
|
21109
|
-
], TC = /* @__PURE__ */ x("i", null, "I", -1),
|
|
21126
|
+
], TC = /* @__PURE__ */ x("i", null, "I", -1), AC = [
|
|
21110
21127
|
TC
|
|
21111
|
-
],
|
|
21112
|
-
|
|
21128
|
+
], MC = /* @__PURE__ */ x("u", null, "U", -1), EC = [
|
|
21129
|
+
MC
|
|
21113
21130
|
], OC = /* @__PURE__ */ x("del", null, "ab", -1), NC = [
|
|
21114
21131
|
OC
|
|
21115
21132
|
], DC = /* @__PURE__ */ x("i", { class: "fa-solid fa-align-left" }, null, -1), RC = [
|
|
@@ -21178,7 +21195,7 @@ function $C(n, e, t, r, i, o) {
|
|
|
21178
21195
|
x("button", {
|
|
21179
21196
|
onClick: e[3] || (e[3] = (c) => t.editor.chain().focus().toggleItalic().run()),
|
|
21180
21197
|
class: U([t.editor.isActive("italic") ? "bg-steel-500" : "bg-steel-200", "size-6 border border-steel-500 rounded p-0.5 items-center flex justify-center"])
|
|
21181
|
-
},
|
|
21198
|
+
}, AC, 2),
|
|
21182
21199
|
x("button", {
|
|
21183
21200
|
onClick: e[4] || (e[4] = (c) => t.editor.chain().focus().toggleUnderline().run()),
|
|
21184
21201
|
class: U([t.editor.isActive("underline") ? "bg-steel-500" : "bg-steel-200", "size-6 border border-steel-500 rounded p-0.5 items-center flex justify-center"])
|
|
@@ -21217,7 +21234,7 @@ function $C(n, e, t, r, i, o) {
|
|
|
21217
21234
|
_: 1
|
|
21218
21235
|
}, 8, ["editor"]);
|
|
21219
21236
|
}
|
|
21220
|
-
const HC = /* @__PURE__ */
|
|
21237
|
+
const HC = /* @__PURE__ */ Ml(mC, [["render", $C]]), FC = {
|
|
21221
21238
|
key: 0,
|
|
21222
21239
|
class: "flex flex-row justify-end mx-8 mb-2"
|
|
21223
21240
|
}, CS = {
|