@storyblok/vue 10.0.0 → 10.1.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/storyblok-vue.mjs
CHANGED
|
@@ -4,8 +4,8 @@
|
|
|
4
4
|
* description: SDK to integrate Storyblok into your project using Vue.
|
|
5
5
|
* author: Storyblok
|
|
6
6
|
*/
|
|
7
|
-
import { defineComponent as Qr, ref as Mo, resolveDynamicComponent as za, inject as Cp,
|
|
8
|
-
var
|
|
7
|
+
import { defineComponent as Qr, ref as Mo, resolveDynamicComponent as za, inject as Cp, openBlock as Zr, createBlock as ei, mergeProps as Fp, createSlots as xp, renderList as Ep, withCtx as Ap, renderSlot as Sp, normalizeProps as Mp, guardReactiveProps as Tp, h as Ms, createTextVNode as Lp, watch as zp, defineAsyncComponent as Rp, onMounted as $p } from "vue";
|
|
8
|
+
var Bp = Object.defineProperty, Np = (t, e, o) => e in t ? Bp(t, e, { enumerable: !0, configurable: !0, writable: !0, value: o }) : t[e] = o, N = (t, e, o) => Np(t, typeof e != "symbol" ? e + "" : e, o);
|
|
9
9
|
function ae(t) {
|
|
10
10
|
this.content = t;
|
|
11
11
|
}
|
|
@@ -335,15 +335,15 @@ class v {
|
|
|
335
335
|
*/
|
|
336
336
|
findIndex(e) {
|
|
337
337
|
if (e == 0)
|
|
338
|
-
return
|
|
338
|
+
return ro(0, e);
|
|
339
339
|
if (e == this.size)
|
|
340
|
-
return
|
|
340
|
+
return ro(this.content.length, e);
|
|
341
341
|
if (e > this.size || e < 0)
|
|
342
342
|
throw new RangeError(`Position ${e} outside of fragment (${this})`);
|
|
343
343
|
for (let o = 0, a = 0; ; o++) {
|
|
344
344
|
let n = this.child(o), s = a + n.nodeSize;
|
|
345
345
|
if (s >= e)
|
|
346
|
-
return s == e ?
|
|
346
|
+
return s == e ? ro(o + 1, s) : ro(o, a);
|
|
347
347
|
a = s;
|
|
348
348
|
}
|
|
349
349
|
}
|
|
@@ -409,7 +409,7 @@ class v {
|
|
|
409
409
|
}
|
|
410
410
|
v.empty = new v([], 0);
|
|
411
411
|
const Ra = { index: 0, offset: 0 };
|
|
412
|
-
function
|
|
412
|
+
function ro(t, e) {
|
|
413
413
|
return Ra.index = t, Ra.offset = e, Ra;
|
|
414
414
|
}
|
|
415
415
|
function To(t, e) {
|
|
@@ -643,7 +643,7 @@ function ni(t, e, o, a) {
|
|
|
643
643
|
let i = ni(r.content, e - s - 1, o, r);
|
|
644
644
|
return i && t.replaceChild(n, r.copy(i));
|
|
645
645
|
}
|
|
646
|
-
function
|
|
646
|
+
function Op(t, e, o) {
|
|
647
647
|
if (o.openStart > t.depth)
|
|
648
648
|
throw new Lo("Inserted content deeper than insertion position");
|
|
649
649
|
if (t.depth - o.openStart != e.depth - o.openEnd)
|
|
@@ -708,7 +708,7 @@ function Hp(t, e) {
|
|
|
708
708
|
end: a.resolveNoCache(a.content.size - t.openEnd - o)
|
|
709
709
|
};
|
|
710
710
|
}
|
|
711
|
-
class
|
|
711
|
+
class Kt {
|
|
712
712
|
/**
|
|
713
713
|
@internal
|
|
714
714
|
*/
|
|
@@ -936,7 +936,7 @@ class Wt {
|
|
|
936
936
|
break;
|
|
937
937
|
s = p - 1, n += l + 1;
|
|
938
938
|
}
|
|
939
|
-
return new
|
|
939
|
+
return new Kt(o, a, s);
|
|
940
940
|
}
|
|
941
941
|
/**
|
|
942
942
|
@internal
|
|
@@ -951,7 +951,7 @@ class Wt {
|
|
|
951
951
|
}
|
|
952
952
|
else
|
|
953
953
|
Ts.set(e, a = new Pp());
|
|
954
|
-
let n = a.elts[a.i] =
|
|
954
|
+
let n = a.elts[a.i] = Kt.resolve(e, o);
|
|
955
955
|
return a.i = (a.i + 1) % qp, n;
|
|
956
956
|
}
|
|
957
957
|
}
|
|
@@ -1163,7 +1163,7 @@ class Ie {
|
|
|
1163
1163
|
[`ReplaceError`](https://prosemirror.net/docs/ref/#model.ReplaceError) is thrown.
|
|
1164
1164
|
*/
|
|
1165
1165
|
replace(e, o, a) {
|
|
1166
|
-
return
|
|
1166
|
+
return Op(this.resolve(e), this.resolve(o), a);
|
|
1167
1167
|
}
|
|
1168
1168
|
/**
|
|
1169
1169
|
Find the node directly after the given position.
|
|
@@ -1206,13 +1206,13 @@ class Ie {
|
|
|
1206
1206
|
[object](https://prosemirror.net/docs/ref/#model.ResolvedPos) with information about its context.
|
|
1207
1207
|
*/
|
|
1208
1208
|
resolve(e) {
|
|
1209
|
-
return
|
|
1209
|
+
return Kt.resolveCached(this, e);
|
|
1210
1210
|
}
|
|
1211
1211
|
/**
|
|
1212
1212
|
@internal
|
|
1213
1213
|
*/
|
|
1214
1214
|
resolveNoCache(e) {
|
|
1215
|
-
return
|
|
1215
|
+
return Kt.resolve(this, e);
|
|
1216
1216
|
}
|
|
1217
1217
|
/**
|
|
1218
1218
|
Test whether a given mark or mark type occurs in this document
|
|
@@ -2166,7 +2166,7 @@ class nt {
|
|
|
2166
2166
|
Parse a document from the content of a DOM node.
|
|
2167
2167
|
*/
|
|
2168
2168
|
parse(e, o = {}) {
|
|
2169
|
-
let a = new
|
|
2169
|
+
let a = new Ns(this, o, !1);
|
|
2170
2170
|
return a.addAll(e, W.none, o.from, o.to), a.finish();
|
|
2171
2171
|
}
|
|
2172
2172
|
/**
|
|
@@ -2178,7 +2178,7 @@ class nt {
|
|
|
2178
2178
|
the left of the input and the end of nodes at the end.
|
|
2179
2179
|
*/
|
|
2180
2180
|
parseSlice(e, o = {}) {
|
|
2181
|
-
let a = new
|
|
2181
|
+
let a = new Ns(this, o, !0);
|
|
2182
2182
|
return a.addAll(e, W.none, o.from, o.to), _.maxOpen(a.finish());
|
|
2183
2183
|
}
|
|
2184
2184
|
/**
|
|
@@ -2235,13 +2235,13 @@ class nt {
|
|
|
2235
2235
|
for (let n in e.marks) {
|
|
2236
2236
|
let s = e.marks[n].spec.parseDOM;
|
|
2237
2237
|
s && s.forEach((r) => {
|
|
2238
|
-
a(r =
|
|
2238
|
+
a(r = Os(r)), r.mark || r.ignore || r.clearMark || (r.mark = n);
|
|
2239
2239
|
});
|
|
2240
2240
|
}
|
|
2241
2241
|
for (let n in e.nodes) {
|
|
2242
2242
|
let s = e.nodes[n].spec.parseDOM;
|
|
2243
2243
|
s && s.forEach((r) => {
|
|
2244
|
-
a(r =
|
|
2244
|
+
a(r = Os(r)), r.node || r.ignore || r.mark || (r.node = n);
|
|
2245
2245
|
});
|
|
2246
2246
|
}
|
|
2247
2247
|
return o;
|
|
@@ -2295,13 +2295,13 @@ const hi = {
|
|
|
2295
2295
|
script: !0,
|
|
2296
2296
|
style: !0,
|
|
2297
2297
|
title: !0
|
|
2298
|
-
}, bi = { ol: !0, ul: !0 },
|
|
2299
|
-
function
|
|
2300
|
-
return e != null ? (e ?
|
|
2298
|
+
}, bi = { ol: !0, ul: !0 }, Vt = 1, mn = 2, $t = 4;
|
|
2299
|
+
function Bs(t, e, o) {
|
|
2300
|
+
return e != null ? (e ? Vt : 0) | (e === "full" ? mn : 0) : t && t.whitespace == "pre" ? Vt | mn : o & ~$t;
|
|
2301
2301
|
}
|
|
2302
|
-
class
|
|
2302
|
+
class io {
|
|
2303
2303
|
constructor(e, o, a, n, s, r) {
|
|
2304
|
-
this.type = e, this.attrs = o, this.marks = a, this.solid = n, this.options = r, this.content = [], this.activeMarks = W.none, this.match = s || (r &
|
|
2304
|
+
this.type = e, this.attrs = o, this.marks = a, this.solid = n, this.options = r, this.content = [], this.activeMarks = W.none, this.match = s || (r & $t ? null : e.contentMatch);
|
|
2305
2305
|
}
|
|
2306
2306
|
findWrapping(e) {
|
|
2307
2307
|
if (!this.match) {
|
|
@@ -2318,7 +2318,7 @@ class ro {
|
|
|
2318
2318
|
return this.match.findWrapping(e.type);
|
|
2319
2319
|
}
|
|
2320
2320
|
finish(e) {
|
|
2321
|
-
if (!(this.options &
|
|
2321
|
+
if (!(this.options & Vt)) {
|
|
2322
2322
|
let a = this.content[this.content.length - 1], n;
|
|
2323
2323
|
if (a && a.isText && (n = /[ \t\r\n\u000c]+$/.exec(a.text))) {
|
|
2324
2324
|
let s = a;
|
|
@@ -2332,11 +2332,11 @@ class ro {
|
|
|
2332
2332
|
return this.type ? this.type.inlineContent : this.content.length ? this.content[0].isInline : e.parentNode && !hi.hasOwnProperty(e.parentNode.nodeName.toLowerCase());
|
|
2333
2333
|
}
|
|
2334
2334
|
}
|
|
2335
|
-
class
|
|
2335
|
+
class Ns {
|
|
2336
2336
|
constructor(e, o, a) {
|
|
2337
2337
|
this.parser = e, this.options = o, this.isOpen = a, this.open = 0, this.localPreserveWS = !1;
|
|
2338
|
-
let n = o.topNode, s, r =
|
|
2339
|
-
n ? s = new
|
|
2338
|
+
let n = o.topNode, s, r = Bs(null, o.preserveWhitespace, 0) | (a ? $t : 0);
|
|
2339
|
+
n ? s = new io(n.type, n.attrs, W.none, !0, o.topMatch || n.type.contentMatch, r) : a ? s = new io(null, null, W.none, !0, null, r) : s = new io(e.schema.topNodeType, null, W.none, !0, null, r), this.nodes = [s], this.find = o.findPositions, this.needsBlock = !1;
|
|
2340
2340
|
}
|
|
2341
2341
|
get top() {
|
|
2342
2342
|
return this.nodes[this.open];
|
|
@@ -2348,7 +2348,7 @@ class Os {
|
|
|
2348
2348
|
e.nodeType == 3 ? this.addTextNode(e, o) : e.nodeType == 1 && this.addElement(e, o);
|
|
2349
2349
|
}
|
|
2350
2350
|
addTextNode(e, o) {
|
|
2351
|
-
let a = e.nodeValue, n = this.top, s = n.options & mn ? "full" : this.localPreserveWS || (n.options &
|
|
2351
|
+
let a = e.nodeValue, n = this.top, s = n.options & mn ? "full" : this.localPreserveWS || (n.options & Vt) > 0, { schema: r } = this.parser;
|
|
2352
2352
|
if (s === "full" || n.inlineContext(e) || /[^ \t\r\n\u000c]/.test(a)) {
|
|
2353
2353
|
if (s)
|
|
2354
2354
|
if (s === "full")
|
|
@@ -2517,10 +2517,10 @@ class Os {
|
|
|
2517
2517
|
this.closeExtra();
|
|
2518
2518
|
let r = this.top;
|
|
2519
2519
|
r.match = r.match && r.match.matchType(e);
|
|
2520
|
-
let i =
|
|
2521
|
-
r.options &
|
|
2520
|
+
let i = Bs(e, s, r.options);
|
|
2521
|
+
r.options & $t && r.content.length == 0 && (i |= $t);
|
|
2522
2522
|
let l = W.none;
|
|
2523
|
-
return a = a.filter((p) => (r.type ? r.type.allowsMarkType(p.type) : Hs(p.type, e)) ? (l = p.addToSet(l), !1) : !0), this.nodes.push(new
|
|
2523
|
+
return a = a.filter((p) => (r.type ? r.type.allowsMarkType(p.type) : Hs(p.type, e)) ? (l = p.addToSet(l), !1) : !0), this.nodes.push(new io(e, o, l, n, null, i)), this.open++, a;
|
|
2524
2524
|
}
|
|
2525
2525
|
// Make sure all nodes above this.open are finished and added to
|
|
2526
2526
|
// their parents
|
|
@@ -2539,7 +2539,7 @@ class Os {
|
|
|
2539
2539
|
for (let o = this.open; o >= 0; o--) {
|
|
2540
2540
|
if (this.nodes[o] == e)
|
|
2541
2541
|
return this.open = o, !0;
|
|
2542
|
-
this.localPreserveWS && (this.nodes[o].options |=
|
|
2542
|
+
this.localPreserveWS && (this.nodes[o].options |= Vt);
|
|
2543
2543
|
}
|
|
2544
2544
|
return !1;
|
|
2545
2545
|
}
|
|
@@ -2623,7 +2623,7 @@ function rc(t) {
|
|
|
2623
2623
|
function ic(t, e) {
|
|
2624
2624
|
return (t.matches || t.msMatchesSelector || t.webkitMatchesSelector || t.mozMatchesSelector).call(t, e);
|
|
2625
2625
|
}
|
|
2626
|
-
function
|
|
2626
|
+
function Os(t) {
|
|
2627
2627
|
let e = {};
|
|
2628
2628
|
for (let o in t)
|
|
2629
2629
|
e[o] = t[o];
|
|
@@ -2967,7 +2967,7 @@ class de {
|
|
|
2967
2967
|
}
|
|
2968
2968
|
}
|
|
2969
2969
|
de.empty = new de([]);
|
|
2970
|
-
class
|
|
2970
|
+
class Bo {
|
|
2971
2971
|
/**
|
|
2972
2972
|
Create a new mapping with the given position maps.
|
|
2973
2973
|
*/
|
|
@@ -2984,7 +2984,7 @@ class No {
|
|
|
2984
2984
|
Create a mapping that maps only through a part of this one.
|
|
2985
2985
|
*/
|
|
2986
2986
|
slice(e = 0, o = this.maps.length) {
|
|
2987
|
-
return new
|
|
2987
|
+
return new Bo(this._maps, this.mirror, e, o);
|
|
2988
2988
|
}
|
|
2989
2989
|
/**
|
|
2990
2990
|
Add a step map to the end of this mapping. If `mirrors` is
|
|
@@ -3035,7 +3035,7 @@ class No {
|
|
|
3035
3035
|
Create an inverted version of this mapping.
|
|
3036
3036
|
*/
|
|
3037
3037
|
invert() {
|
|
3038
|
-
let e = new
|
|
3038
|
+
let e = new Bo();
|
|
3039
3039
|
return e.appendMappingInverted(this), e;
|
|
3040
3040
|
}
|
|
3041
3041
|
/**
|
|
@@ -3074,7 +3074,7 @@ class No {
|
|
|
3074
3074
|
return a ? e : new dn(e, n, null);
|
|
3075
3075
|
}
|
|
3076
3076
|
}
|
|
3077
|
-
const
|
|
3077
|
+
const Ba = /* @__PURE__ */ Object.create(null);
|
|
3078
3078
|
class ie {
|
|
3079
3079
|
/**
|
|
3080
3080
|
Get the step map that represents the changes made by this step,
|
|
@@ -3099,7 +3099,7 @@ class ie {
|
|
|
3099
3099
|
static fromJSON(e, o) {
|
|
3100
3100
|
if (!o || !o.stepType)
|
|
3101
3101
|
throw new RangeError("Invalid input for Step.fromJSON");
|
|
3102
|
-
let a =
|
|
3102
|
+
let a = Ba[o.stepType];
|
|
3103
3103
|
if (!a)
|
|
3104
3104
|
throw new RangeError(`No step type ${o.stepType} defined`);
|
|
3105
3105
|
return a.fromJSON(e, o);
|
|
@@ -3111,9 +3111,9 @@ class ie {
|
|
|
3111
3111
|
that's unlikely to clash with steps from other modules.
|
|
3112
3112
|
*/
|
|
3113
3113
|
static jsonID(e, o) {
|
|
3114
|
-
if (e in
|
|
3114
|
+
if (e in Ba)
|
|
3115
3115
|
throw new RangeError("Duplicate use of step JSON ID " + e);
|
|
3116
|
-
return
|
|
3116
|
+
return Ba[e] = o, o.prototype.jsonID = e, o;
|
|
3117
3117
|
}
|
|
3118
3118
|
}
|
|
3119
3119
|
class G {
|
|
@@ -3506,7 +3506,7 @@ function Pn(t, e, o, a = o.contentMatch, n = !0) {
|
|
|
3506
3506
|
function uc(t, e, o) {
|
|
3507
3507
|
return (e == 0 || t.canReplace(e, t.childCount)) && (o == t.childCount || t.canReplace(0, o));
|
|
3508
3508
|
}
|
|
3509
|
-
function
|
|
3509
|
+
function xt(t) {
|
|
3510
3510
|
let e = t.parent.content.cutByIndex(t.startIndex, t.endIndex);
|
|
3511
3511
|
for (let o = t.depth, a = 0, n = 0; ; --o) {
|
|
3512
3512
|
let s = t.$from.node(o), r = t.$from.index(o) + a, i = t.$to.indexAfter(o) - n;
|
|
@@ -3737,12 +3737,12 @@ function Ia(t, e, o = e, a = _.empty) {
|
|
|
3737
3737
|
if (e == o && !a.size)
|
|
3738
3738
|
return null;
|
|
3739
3739
|
let n = t.resolve(e), s = t.resolve(o);
|
|
3740
|
-
return Ci(n, s, a) ? new te(e, o, a) : new
|
|
3740
|
+
return Ci(n, s, a) ? new te(e, o, a) : new Fc(n, s, a).fit();
|
|
3741
3741
|
}
|
|
3742
3742
|
function Ci(t, e, o) {
|
|
3743
3743
|
return !o.openStart && !o.openEnd && t.start() == e.start() && t.parent.canReplace(t.index(), e.index(), o.content);
|
|
3744
3744
|
}
|
|
3745
|
-
class
|
|
3745
|
+
class Fc {
|
|
3746
3746
|
constructor(e, o, a) {
|
|
3747
3747
|
this.$from = e, this.$to = o, this.unplaced = a, this.frontier = [], this.placed = v.empty;
|
|
3748
3748
|
for (let n = 0; n <= e.depth; n++) {
|
|
@@ -3788,7 +3788,7 @@ class xc {
|
|
|
3788
3788
|
for (let o = 1; o <= 2; o++)
|
|
3789
3789
|
for (let a = o == 1 ? e : this.unplaced.openStart; a >= 0; a--) {
|
|
3790
3790
|
let n, s = null;
|
|
3791
|
-
a ? (s =
|
|
3791
|
+
a ? (s = Na(this.unplaced.content, a - 1).firstChild, n = s.content) : n = this.unplaced.content;
|
|
3792
3792
|
let r = n.firstChild;
|
|
3793
3793
|
for (let i = this.depth; i >= 0; i--) {
|
|
3794
3794
|
let { type: l, match: p } = this.frontier[i], c, m = null;
|
|
@@ -3802,11 +3802,11 @@ class xc {
|
|
|
3802
3802
|
}
|
|
3803
3803
|
}
|
|
3804
3804
|
openMore() {
|
|
3805
|
-
let { content: e, openStart: o, openEnd: a } = this.unplaced, n =
|
|
3805
|
+
let { content: e, openStart: o, openEnd: a } = this.unplaced, n = Na(e, o);
|
|
3806
3806
|
return !n.childCount || n.firstChild.isLeaf ? !1 : (this.unplaced = new _(e, o + 1, Math.max(a, n.size + o >= e.size - a ? o + 1 : 0)), !0);
|
|
3807
3807
|
}
|
|
3808
3808
|
dropNode() {
|
|
3809
|
-
let { content: e, openStart: o, openEnd: a } = this.unplaced, n =
|
|
3809
|
+
let { content: e, openStart: o, openEnd: a } = this.unplaced, n = Na(e, o);
|
|
3810
3810
|
if (n.childCount <= 1 && o > 0) {
|
|
3811
3811
|
let s = e.size - o <= o + n.size;
|
|
3812
3812
|
this.unplaced = new _(Mt(e, o - 1, 1), o - 1, s ? o - 1 : a);
|
|
@@ -3833,7 +3833,7 @@ class xc {
|
|
|
3833
3833
|
let f = i.child(p), h = m.matchType(f.type);
|
|
3834
3834
|
if (!h)
|
|
3835
3835
|
break;
|
|
3836
|
-
p++, (p > 1 || l == 0 || f.content.size) && (m = h, c.push(
|
|
3836
|
+
p++, (p > 1 || l == 0 || f.content.size) && (m = h, c.push(Fi(f.mark(d.allowedMarks(f.marks)), p == 1 ? l : 0, p == i.childCount ? g : -1)));
|
|
3837
3837
|
}
|
|
3838
3838
|
let u = p == i.childCount;
|
|
3839
3839
|
u || (g = -1), this.placed = Tt(this.placed, o, v.from(c)), this.frontier[o].match = m, u && g < 0 && a && a.type == this.frontier[this.depth].type && this.frontier.length > 1 && this.closeFrontierNode();
|
|
@@ -3847,7 +3847,7 @@ class xc {
|
|
|
3847
3847
|
if (!this.$to.parent.isTextblock)
|
|
3848
3848
|
return -1;
|
|
3849
3849
|
let e = this.frontier[this.depth], o;
|
|
3850
|
-
if (!e.type.isTextblock || !
|
|
3850
|
+
if (!e.type.isTextblock || !Oa(this.$to, this.$to.depth, e.type, e.match, !1) || this.$to.depth == this.depth && (o = this.findCloseLevel(this.$to)) && o.depth == this.depth)
|
|
3851
3851
|
return -1;
|
|
3852
3852
|
let { depth: a } = this.$to, n = this.$to.after(a);
|
|
3853
3853
|
for (; a > 1 && n == this.$to.end(--a); )
|
|
@@ -3856,10 +3856,10 @@ class xc {
|
|
|
3856
3856
|
}
|
|
3857
3857
|
findCloseLevel(e) {
|
|
3858
3858
|
e: for (let o = Math.min(this.depth, e.depth); o >= 0; o--) {
|
|
3859
|
-
let { match: a, type: n } = this.frontier[o], s = o < e.depth && e.end(o + 1) == e.pos + (e.depth - (o + 1)), r =
|
|
3859
|
+
let { match: a, type: n } = this.frontier[o], s = o < e.depth && e.end(o + 1) == e.pos + (e.depth - (o + 1)), r = Oa(e, o, n, a, s);
|
|
3860
3860
|
if (r) {
|
|
3861
3861
|
for (let i = o - 1; i >= 0; i--) {
|
|
3862
|
-
let { match: l, type: p } = this.frontier[i], c =
|
|
3862
|
+
let { match: l, type: p } = this.frontier[i], c = Oa(e, i, p, l, !0);
|
|
3863
3863
|
if (!c || c.childCount)
|
|
3864
3864
|
continue e;
|
|
3865
3865
|
}
|
|
@@ -3895,31 +3895,31 @@ function Mt(t, e, o) {
|
|
|
3895
3895
|
function Tt(t, e, o) {
|
|
3896
3896
|
return e == 0 ? t.append(o) : t.replaceChild(t.childCount - 1, t.lastChild.copy(Tt(t.lastChild.content, e - 1, o)));
|
|
3897
3897
|
}
|
|
3898
|
-
function
|
|
3898
|
+
function Na(t, e) {
|
|
3899
3899
|
for (let o = 0; o < e; o++)
|
|
3900
3900
|
t = t.firstChild.content;
|
|
3901
3901
|
return t;
|
|
3902
3902
|
}
|
|
3903
|
-
function
|
|
3903
|
+
function Fi(t, e, o) {
|
|
3904
3904
|
if (e <= 0)
|
|
3905
3905
|
return t;
|
|
3906
3906
|
let a = t.content;
|
|
3907
|
-
return e > 1 && (a = a.replaceChild(0,
|
|
3907
|
+
return e > 1 && (a = a.replaceChild(0, Fi(a.firstChild, e - 1, a.childCount == 1 ? o - 1 : 0))), e > 0 && (a = t.type.contentMatch.fillBefore(a).append(a), o <= 0 && (a = a.append(t.type.contentMatch.matchFragment(a).fillBefore(v.empty, !0)))), t.copy(a);
|
|
3908
3908
|
}
|
|
3909
|
-
function
|
|
3909
|
+
function Oa(t, e, o, a, n) {
|
|
3910
3910
|
let s = t.node(e), r = n ? t.indexAfter(e) : t.index(e);
|
|
3911
3911
|
if (r == s.childCount && !o.compatibleContent(s.type))
|
|
3912
3912
|
return null;
|
|
3913
3913
|
let i = a.fillBefore(s.content, !0, r);
|
|
3914
|
-
return i && !
|
|
3914
|
+
return i && !xc(o, s.content, r) ? i : null;
|
|
3915
3915
|
}
|
|
3916
|
-
function
|
|
3916
|
+
function xc(t, e, o) {
|
|
3917
3917
|
for (let a = o; a < e.childCount; a++)
|
|
3918
3918
|
if (!t.allowsMarks(e.child(a).marks))
|
|
3919
3919
|
return !0;
|
|
3920
3920
|
return !1;
|
|
3921
3921
|
}
|
|
3922
|
-
function
|
|
3922
|
+
function Ec(t) {
|
|
3923
3923
|
return t.spec.defining || t.spec.definingForContent;
|
|
3924
3924
|
}
|
|
3925
3925
|
function Ac(t, e, o, a) {
|
|
@@ -3928,7 +3928,7 @@ function Ac(t, e, o, a) {
|
|
|
3928
3928
|
let n = t.doc.resolve(e), s = t.doc.resolve(o);
|
|
3929
3929
|
if (Ci(n, s, a))
|
|
3930
3930
|
return t.step(new te(e, o, a));
|
|
3931
|
-
let r =
|
|
3931
|
+
let r = Ei(n, s);
|
|
3932
3932
|
r[r.length - 1] == 0 && r.pop();
|
|
3933
3933
|
let i = -(n.depth + 1);
|
|
3934
3934
|
r.unshift(i);
|
|
@@ -3946,7 +3946,7 @@ function Ac(t, e, o, a) {
|
|
|
3946
3946
|
d = u.content;
|
|
3947
3947
|
}
|
|
3948
3948
|
for (let d = c - 1; d >= 0; d--) {
|
|
3949
|
-
let g = p[d], u =
|
|
3949
|
+
let g = p[d], u = Ec(g.type);
|
|
3950
3950
|
if (u && !g.sameMarkup(n.node(Math.abs(i) - 1)))
|
|
3951
3951
|
c = d;
|
|
3952
3952
|
else if (u || !g.type.isTextblock)
|
|
@@ -3960,7 +3960,7 @@ function Ac(t, e, o, a) {
|
|
|
3960
3960
|
h < 0 && (b = !1, h = -h);
|
|
3961
3961
|
let j = n.node(h - 1), y = n.index(h - 1);
|
|
3962
3962
|
if (j.canReplaceWith(y, y, u.type, u.marks))
|
|
3963
|
-
return t.replace(n.before(h), b ? s.after(h) : o, new _(
|
|
3963
|
+
return t.replace(n.before(h), b ? s.after(h) : o, new _(xi(a.content, 0, a.openStart, g), g, a.openEnd));
|
|
3964
3964
|
}
|
|
3965
3965
|
}
|
|
3966
3966
|
let m = t.steps.length;
|
|
@@ -3969,10 +3969,10 @@ function Ac(t, e, o, a) {
|
|
|
3969
3969
|
g < 0 || (e = n.before(g), o = s.after(g));
|
|
3970
3970
|
}
|
|
3971
3971
|
}
|
|
3972
|
-
function
|
|
3972
|
+
function xi(t, e, o, a, n) {
|
|
3973
3973
|
if (e < o) {
|
|
3974
3974
|
let s = t.firstChild;
|
|
3975
|
-
t = t.replaceChild(0, s.copy(
|
|
3975
|
+
t = t.replaceChild(0, s.copy(xi(s.content, e + 1, o, a, s)));
|
|
3976
3976
|
}
|
|
3977
3977
|
if (e > a) {
|
|
3978
3978
|
let s = n.contentMatchAt(0), r = s.fillBefore(t).append(t);
|
|
@@ -3988,7 +3988,7 @@ function Sc(t, e, o, a) {
|
|
|
3988
3988
|
t.replaceRange(e, o, new _(v.from(a), 0, 0));
|
|
3989
3989
|
}
|
|
3990
3990
|
function Mc(t, e, o) {
|
|
3991
|
-
let a = t.doc.resolve(e), n = t.doc.resolve(o), s =
|
|
3991
|
+
let a = t.doc.resolve(e), n = t.doc.resolve(o), s = Ei(a, n);
|
|
3992
3992
|
for (let r = 0; r < s.length; r++) {
|
|
3993
3993
|
let i = s[r], l = r == s.length - 1;
|
|
3994
3994
|
if (l && i == 0 || a.node(i).type.contentMatch.validEnd)
|
|
@@ -4001,7 +4001,7 @@ function Mc(t, e, o) {
|
|
|
4001
4001
|
return t.delete(a.before(r), o);
|
|
4002
4002
|
t.delete(e, o);
|
|
4003
4003
|
}
|
|
4004
|
-
function
|
|
4004
|
+
function Ei(t, e) {
|
|
4005
4005
|
let o = [], a = Math.min(t.depth, e.depth);
|
|
4006
4006
|
for (let n = a; n >= 0; n--) {
|
|
4007
4007
|
let s = t.start(n);
|
|
@@ -4049,7 +4049,7 @@ class _t extends ie {
|
|
|
4049
4049
|
}
|
|
4050
4050
|
}
|
|
4051
4051
|
ie.jsonID("attr", _t);
|
|
4052
|
-
class
|
|
4052
|
+
class Ut extends ie {
|
|
4053
4053
|
/**
|
|
4054
4054
|
Construct an attribute step.
|
|
4055
4055
|
*/
|
|
@@ -4068,7 +4068,7 @@ class Vt extends ie {
|
|
|
4068
4068
|
return de.empty;
|
|
4069
4069
|
}
|
|
4070
4070
|
invert(e) {
|
|
4071
|
-
return new
|
|
4071
|
+
return new Ut(this.attr, e.attrs[this.attr]);
|
|
4072
4072
|
}
|
|
4073
4073
|
map(e) {
|
|
4074
4074
|
return this;
|
|
@@ -4079,10 +4079,10 @@ class Vt extends ie {
|
|
|
4079
4079
|
static fromJSON(e, o) {
|
|
4080
4080
|
if (typeof o.attr != "string")
|
|
4081
4081
|
throw new RangeError("Invalid input for DocAttrStep.fromJSON");
|
|
4082
|
-
return new
|
|
4082
|
+
return new Ut(o.attr, o.value);
|
|
4083
4083
|
}
|
|
4084
4084
|
}
|
|
4085
|
-
ie.jsonID("docAttr",
|
|
4085
|
+
ie.jsonID("docAttr", Ut);
|
|
4086
4086
|
let Dt = class extends Error {
|
|
4087
4087
|
};
|
|
4088
4088
|
Dt = function t(e) {
|
|
@@ -4097,7 +4097,7 @@ class Ai {
|
|
|
4097
4097
|
Create a transform that starts with the given document.
|
|
4098
4098
|
*/
|
|
4099
4099
|
constructor(e) {
|
|
4100
|
-
this.doc = e, this.steps = [], this.docs = [], this.mapping = new
|
|
4100
|
+
this.doc = e, this.steps = [], this.docs = [], this.mapping = new Bo();
|
|
4101
4101
|
}
|
|
4102
4102
|
/**
|
|
4103
4103
|
The starting document.
|
|
@@ -4271,7 +4271,7 @@ class Ai {
|
|
|
4271
4271
|
Set a single attribute on the document to a new value.
|
|
4272
4272
|
*/
|
|
4273
4273
|
setDocAttribute(e, o) {
|
|
4274
|
-
return this.step(new
|
|
4274
|
+
return this.step(new Ut(e, o)), this;
|
|
4275
4275
|
}
|
|
4276
4276
|
/**
|
|
4277
4277
|
Add a mark to the node at position `pos`.
|
|
@@ -4428,7 +4428,7 @@ class A {
|
|
|
4428
4428
|
found.
|
|
4429
4429
|
*/
|
|
4430
4430
|
static findFrom(e, o, a = !1) {
|
|
4431
|
-
let n = e.parent.inlineContent ? new
|
|
4431
|
+
let n = e.parent.inlineContent ? new x(e) : vt(e.node(0), e.parent, e.pos, e.index(), o, a);
|
|
4432
4432
|
if (n)
|
|
4433
4433
|
return n;
|
|
4434
4434
|
for (let s = e.depth - 1; s >= 0; s--) {
|
|
@@ -4495,7 +4495,7 @@ class A {
|
|
|
4495
4495
|
returns the bookmark for that.
|
|
4496
4496
|
*/
|
|
4497
4497
|
getBookmark() {
|
|
4498
|
-
return
|
|
4498
|
+
return x.between(this.$anchor, this.$head).getBookmark();
|
|
4499
4499
|
}
|
|
4500
4500
|
}
|
|
4501
4501
|
A.prototype.visible = !0;
|
|
@@ -4511,7 +4511,7 @@ let Vs = !1;
|
|
|
4511
4511
|
function Us(t) {
|
|
4512
4512
|
!Vs && !t.parent.inlineContent && (Vs = !0, console.warn("TextSelection endpoint not pointing into a node with inline content (" + t.parent.type.name + ")"));
|
|
4513
4513
|
}
|
|
4514
|
-
class
|
|
4514
|
+
class x extends A {
|
|
4515
4515
|
/**
|
|
4516
4516
|
Construct a text selection between the given points.
|
|
4517
4517
|
*/
|
|
@@ -4530,7 +4530,7 @@ class E extends A {
|
|
|
4530
4530
|
if (!a.parent.inlineContent)
|
|
4531
4531
|
return A.near(a);
|
|
4532
4532
|
let n = e.resolve(o.map(this.anchor));
|
|
4533
|
-
return new
|
|
4533
|
+
return new x(n.parent.inlineContent ? n : a, a);
|
|
4534
4534
|
}
|
|
4535
4535
|
replace(e, o = _.empty) {
|
|
4536
4536
|
if (super.replace(e, o), o == _.empty) {
|
|
@@ -4539,7 +4539,7 @@ class E extends A {
|
|
|
4539
4539
|
}
|
|
4540
4540
|
}
|
|
4541
4541
|
eq(e) {
|
|
4542
|
-
return e instanceof
|
|
4542
|
+
return e instanceof x && e.anchor == this.anchor && e.head == this.head;
|
|
4543
4543
|
}
|
|
4544
4544
|
getBookmark() {
|
|
4545
4545
|
return new Ca(this.anchor, this.head);
|
|
@@ -4553,7 +4553,7 @@ class E extends A {
|
|
|
4553
4553
|
static fromJSON(e, o) {
|
|
4554
4554
|
if (typeof o.anchor != "number" || typeof o.head != "number")
|
|
4555
4555
|
throw new RangeError("Invalid input for TextSelection.fromJSON");
|
|
4556
|
-
return new
|
|
4556
|
+
return new x(e.resolve(o.anchor), e.resolve(o.head));
|
|
4557
4557
|
}
|
|
4558
4558
|
/**
|
|
4559
4559
|
Create a text selection from non-resolved positions.
|
|
@@ -4579,10 +4579,10 @@ class E extends A {
|
|
|
4579
4579
|
else
|
|
4580
4580
|
return A.near(o, a);
|
|
4581
4581
|
}
|
|
4582
|
-
return e.parent.inlineContent || (n == 0 ? e = o : (e = (A.findFrom(e, -a, !0) || A.findFrom(e, a, !0)).$anchor, e.pos < o.pos != n < 0 && (e = o))), new
|
|
4582
|
+
return e.parent.inlineContent || (n == 0 ? e = o : (e = (A.findFrom(e, -a, !0) || A.findFrom(e, a, !0)).$anchor, e.pos < o.pos != n < 0 && (e = o))), new x(e, o);
|
|
4583
4583
|
}
|
|
4584
4584
|
}
|
|
4585
|
-
A.jsonID("text",
|
|
4585
|
+
A.jsonID("text", x);
|
|
4586
4586
|
class Ca {
|
|
4587
4587
|
constructor(e, o) {
|
|
4588
4588
|
this.anchor = e, this.head = o;
|
|
@@ -4591,10 +4591,10 @@ class Ca {
|
|
|
4591
4591
|
return new Ca(e.map(this.anchor), e.map(this.head));
|
|
4592
4592
|
}
|
|
4593
4593
|
resolve(e) {
|
|
4594
|
-
return
|
|
4594
|
+
return x.between(e.resolve(this.anchor), e.resolve(this.head));
|
|
4595
4595
|
}
|
|
4596
4596
|
}
|
|
4597
|
-
class
|
|
4597
|
+
class F extends A {
|
|
4598
4598
|
/**
|
|
4599
4599
|
Create a node selection. Does not verify the validity of its
|
|
4600
4600
|
argument.
|
|
@@ -4605,13 +4605,13 @@ class x extends A {
|
|
|
4605
4605
|
}
|
|
4606
4606
|
map(e, o) {
|
|
4607
4607
|
let { deleted: a, pos: n } = o.mapResult(this.anchor), s = e.resolve(n);
|
|
4608
|
-
return a ? A.near(s) : new
|
|
4608
|
+
return a ? A.near(s) : new F(s);
|
|
4609
4609
|
}
|
|
4610
4610
|
content() {
|
|
4611
4611
|
return new _(v.from(this.node), 0, 0);
|
|
4612
4612
|
}
|
|
4613
4613
|
eq(e) {
|
|
4614
|
-
return e instanceof
|
|
4614
|
+
return e instanceof F && e.anchor == this.anchor;
|
|
4615
4615
|
}
|
|
4616
4616
|
toJSON() {
|
|
4617
4617
|
return { type: "node", anchor: this.anchor };
|
|
@@ -4625,13 +4625,13 @@ class x extends A {
|
|
|
4625
4625
|
static fromJSON(e, o) {
|
|
4626
4626
|
if (typeof o.anchor != "number")
|
|
4627
4627
|
throw new RangeError("Invalid input for NodeSelection.fromJSON");
|
|
4628
|
-
return new
|
|
4628
|
+
return new F(e.resolve(o.anchor));
|
|
4629
4629
|
}
|
|
4630
4630
|
/**
|
|
4631
4631
|
Create a node selection from non-resolved positions.
|
|
4632
4632
|
*/
|
|
4633
4633
|
static create(e, o) {
|
|
4634
|
-
return new
|
|
4634
|
+
return new F(e.resolve(o));
|
|
4635
4635
|
}
|
|
4636
4636
|
/**
|
|
4637
4637
|
Determines whether the given node may be selected as a node
|
|
@@ -4641,8 +4641,8 @@ class x extends A {
|
|
|
4641
4641
|
return !e.isText && e.type.spec.selectable !== !1;
|
|
4642
4642
|
}
|
|
4643
4643
|
}
|
|
4644
|
-
|
|
4645
|
-
A.jsonID("node",
|
|
4644
|
+
F.prototype.visible = !1;
|
|
4645
|
+
A.jsonID("node", F);
|
|
4646
4646
|
class Wn {
|
|
4647
4647
|
constructor(e) {
|
|
4648
4648
|
this.anchor = e;
|
|
@@ -4653,7 +4653,7 @@ class Wn {
|
|
|
4653
4653
|
}
|
|
4654
4654
|
resolve(e) {
|
|
4655
4655
|
let o = e.resolve(this.anchor), a = o.nodeAfter;
|
|
4656
|
-
return a &&
|
|
4656
|
+
return a && F.isSelectable(a) ? new F(o) : A.near(o);
|
|
4657
4657
|
}
|
|
4658
4658
|
}
|
|
4659
4659
|
class fe extends A {
|
|
@@ -4701,12 +4701,12 @@ const Tc = {
|
|
|
4701
4701
|
};
|
|
4702
4702
|
function vt(t, e, o, a, n, s = !1) {
|
|
4703
4703
|
if (e.inlineContent)
|
|
4704
|
-
return
|
|
4704
|
+
return x.create(t, o);
|
|
4705
4705
|
for (let r = a - (n > 0 ? 0 : 1); n > 0 ? r < e.childCount : r >= 0; r += n) {
|
|
4706
4706
|
let i = e.child(r);
|
|
4707
4707
|
if (i.isAtom) {
|
|
4708
|
-
if (!s &&
|
|
4709
|
-
return
|
|
4708
|
+
if (!s && F.isSelectable(i))
|
|
4709
|
+
return F.create(t, o - (n < 0 ? i.nodeSize : 0));
|
|
4710
4710
|
} else {
|
|
4711
4711
|
let l = vt(t, i, o + n, n < 0 ? i.childCount : 0, n, s);
|
|
4712
4712
|
if (l)
|
|
@@ -4731,33 +4731,33 @@ function Js(t, e, o) {
|
|
|
4731
4731
|
function Gs(t, e) {
|
|
4732
4732
|
return !e || !t ? t : t.bind(e);
|
|
4733
4733
|
}
|
|
4734
|
-
class
|
|
4734
|
+
class lo {
|
|
4735
4735
|
constructor(e, o, a) {
|
|
4736
4736
|
this.name = e, this.init = Gs(o.init, a), this.apply = Gs(o.apply, a);
|
|
4737
4737
|
}
|
|
4738
4738
|
}
|
|
4739
|
-
new
|
|
4739
|
+
new lo("doc", {
|
|
4740
4740
|
init(t) {
|
|
4741
4741
|
return t.doc || t.schema.topNodeType.createAndFill();
|
|
4742
4742
|
},
|
|
4743
4743
|
apply(t) {
|
|
4744
4744
|
return t.doc;
|
|
4745
4745
|
}
|
|
4746
|
-
}), new
|
|
4746
|
+
}), new lo("selection", {
|
|
4747
4747
|
init(t, e) {
|
|
4748
4748
|
return t.selection || A.atStart(e.doc);
|
|
4749
4749
|
},
|
|
4750
4750
|
apply(t) {
|
|
4751
4751
|
return t.selection;
|
|
4752
4752
|
}
|
|
4753
|
-
}), new
|
|
4753
|
+
}), new lo("storedMarks", {
|
|
4754
4754
|
init(t) {
|
|
4755
4755
|
return t.storedMarks || null;
|
|
4756
4756
|
},
|
|
4757
4757
|
apply(t, e, o, a) {
|
|
4758
4758
|
return a.selection.$cursor ? t.storedMarks : null;
|
|
4759
4759
|
}
|
|
4760
|
-
}), new
|
|
4760
|
+
}), new lo("scrollToSelection", {
|
|
4761
4761
|
init() {
|
|
4762
4762
|
return 0;
|
|
4763
4763
|
},
|
|
@@ -4822,19 +4822,19 @@ const zi = (t, e, o) => {
|
|
|
4822
4822
|
return !1;
|
|
4823
4823
|
let n = Vn(a);
|
|
4824
4824
|
if (!n) {
|
|
4825
|
-
let r = a.blockRange(), i = r &&
|
|
4825
|
+
let r = a.blockRange(), i = r && xt(r);
|
|
4826
4826
|
return i == null ? !1 : (e && e(t.tr.lift(r, i).scrollIntoView()), !0);
|
|
4827
4827
|
}
|
|
4828
4828
|
let s = n.nodeBefore;
|
|
4829
4829
|
if (Wi(t, n, e, -1))
|
|
4830
4830
|
return !0;
|
|
4831
|
-
if (a.parent.content.size == 0 && (It(s, "end") ||
|
|
4831
|
+
if (a.parent.content.size == 0 && (It(s, "end") || F.isSelectable(s)))
|
|
4832
4832
|
for (let r = a.depth; ; r--) {
|
|
4833
4833
|
let i = Ia(t.doc, a.before(r), a.after(r), _.empty);
|
|
4834
4834
|
if (i && i.slice.size < i.to - i.from) {
|
|
4835
4835
|
if (e) {
|
|
4836
4836
|
let l = t.tr.step(i);
|
|
4837
|
-
l.setSelection(It(s, "end") ? A.findFrom(l.doc.resolve(l.mapping.map(n.pos, -1)), -1) :
|
|
4837
|
+
l.setSelection(It(s, "end") ? A.findFrom(l.doc.resolve(l.mapping.map(n.pos, -1)), -1) : F.create(l.doc, n.pos - s.nodeSize)), e(l.scrollIntoView());
|
|
4838
4838
|
}
|
|
4839
4839
|
return !0;
|
|
4840
4840
|
}
|
|
@@ -4849,7 +4849,7 @@ const zi = (t, e, o) => {
|
|
|
4849
4849
|
let n = Vn(a);
|
|
4850
4850
|
return n ? Ri(t, n, e) : !1;
|
|
4851
4851
|
}, zc = (t, e, o) => {
|
|
4852
|
-
let a =
|
|
4852
|
+
let a = Bi(t, o);
|
|
4853
4853
|
if (!a)
|
|
4854
4854
|
return !1;
|
|
4855
4855
|
let n = Un(a);
|
|
@@ -4879,7 +4879,7 @@ function Ri(t, e, o) {
|
|
|
4879
4879
|
return !1;
|
|
4880
4880
|
if (o) {
|
|
4881
4881
|
let c = t.tr.step(p);
|
|
4882
|
-
c.setSelection(
|
|
4882
|
+
c.setSelection(x.create(c.doc, s)), o(c.scrollIntoView());
|
|
4883
4883
|
}
|
|
4884
4884
|
return !0;
|
|
4885
4885
|
}
|
|
@@ -4902,7 +4902,7 @@ const $i = (t, e, o) => {
|
|
|
4902
4902
|
s = Vn(a);
|
|
4903
4903
|
}
|
|
4904
4904
|
let r = s && s.nodeBefore;
|
|
4905
|
-
return !r || !
|
|
4905
|
+
return !r || !F.isSelectable(r) ? !1 : (e && e(t.tr.setSelection(F.create(t.doc, s.pos - r.nodeSize)).scrollIntoView()), !0);
|
|
4906
4906
|
};
|
|
4907
4907
|
function Vn(t) {
|
|
4908
4908
|
if (!t.parent.type.spec.isolating)
|
|
@@ -4914,12 +4914,12 @@ function Vn(t) {
|
|
|
4914
4914
|
}
|
|
4915
4915
|
return null;
|
|
4916
4916
|
}
|
|
4917
|
-
function
|
|
4917
|
+
function Bi(t, e) {
|
|
4918
4918
|
let { $cursor: o } = t.selection;
|
|
4919
4919
|
return !o || (e ? !e.endOfTextblock("forward", t) : o.parentOffset < o.parent.content.size) ? null : o;
|
|
4920
4920
|
}
|
|
4921
|
-
const
|
|
4922
|
-
let a =
|
|
4921
|
+
const Ni = (t, e, o) => {
|
|
4922
|
+
let a = Bi(t, o);
|
|
4923
4923
|
if (!a)
|
|
4924
4924
|
return !1;
|
|
4925
4925
|
let n = Un(a);
|
|
@@ -4928,18 +4928,18 @@ const Oi = (t, e, o) => {
|
|
|
4928
4928
|
let s = n.nodeAfter;
|
|
4929
4929
|
if (Wi(t, n, e, 1))
|
|
4930
4930
|
return !0;
|
|
4931
|
-
if (a.parent.content.size == 0 && (It(s, "start") ||
|
|
4931
|
+
if (a.parent.content.size == 0 && (It(s, "start") || F.isSelectable(s))) {
|
|
4932
4932
|
let r = Ia(t.doc, a.before(), a.after(), _.empty);
|
|
4933
4933
|
if (r && r.slice.size < r.to - r.from) {
|
|
4934
4934
|
if (e) {
|
|
4935
4935
|
let i = t.tr.step(r);
|
|
4936
|
-
i.setSelection(It(s, "start") ? A.findFrom(i.doc.resolve(i.mapping.map(n.pos)), 1) :
|
|
4936
|
+
i.setSelection(It(s, "start") ? A.findFrom(i.doc.resolve(i.mapping.map(n.pos)), 1) : F.create(i.doc, i.mapping.map(n.pos))), e(i.scrollIntoView());
|
|
4937
4937
|
}
|
|
4938
4938
|
return !0;
|
|
4939
4939
|
}
|
|
4940
4940
|
}
|
|
4941
4941
|
return s.isAtom && n.depth == a.depth - 1 ? (e && e(t.tr.delete(n.pos, n.pos + s.nodeSize).scrollIntoView()), !0) : !1;
|
|
4942
|
-
},
|
|
4942
|
+
}, Oi = (t, e, o) => {
|
|
4943
4943
|
let { $head: a, empty: n } = t.selection, s = a;
|
|
4944
4944
|
if (!n)
|
|
4945
4945
|
return !1;
|
|
@@ -4949,7 +4949,7 @@ const Oi = (t, e, o) => {
|
|
|
4949
4949
|
s = Un(a);
|
|
4950
4950
|
}
|
|
4951
4951
|
let r = s && s.nodeAfter;
|
|
4952
|
-
return !r || !
|
|
4952
|
+
return !r || !F.isSelectable(r) ? !1 : (e && e(t.tr.setSelection(F.create(t.doc, s.pos)).scrollIntoView()), !0);
|
|
4953
4953
|
};
|
|
4954
4954
|
function Un(t) {
|
|
4955
4955
|
if (!t.parent.type.spec.isolating)
|
|
@@ -4963,7 +4963,7 @@ function Un(t) {
|
|
|
4963
4963
|
return null;
|
|
4964
4964
|
}
|
|
4965
4965
|
const Rc = (t, e) => {
|
|
4966
|
-
let o = t.selection, a = o instanceof
|
|
4966
|
+
let o = t.selection, a = o instanceof F, n;
|
|
4967
4967
|
if (a) {
|
|
4968
4968
|
if (o.node.isTextblock || !Ge(t.doc, o.from))
|
|
4969
4969
|
return !1;
|
|
@@ -4972,20 +4972,20 @@ const Rc = (t, e) => {
|
|
|
4972
4972
|
return !1;
|
|
4973
4973
|
if (e) {
|
|
4974
4974
|
let s = t.tr.join(n);
|
|
4975
|
-
a && s.setSelection(
|
|
4975
|
+
a && s.setSelection(F.create(s.doc, n - t.doc.resolve(n).nodeBefore.nodeSize)), e(s.scrollIntoView());
|
|
4976
4976
|
}
|
|
4977
4977
|
return !0;
|
|
4978
4978
|
}, $c = (t, e) => {
|
|
4979
4979
|
let o = t.selection, a;
|
|
4980
|
-
if (o instanceof
|
|
4980
|
+
if (o instanceof F) {
|
|
4981
4981
|
if (o.node.isTextblock || !Ge(t.doc, o.to))
|
|
4982
4982
|
return !1;
|
|
4983
4983
|
a = o.to;
|
|
4984
4984
|
} else if (a = Da(t.doc, o.to, 1), a == null)
|
|
4985
4985
|
return !1;
|
|
4986
4986
|
return e && e(t.tr.join(a).scrollIntoView()), !0;
|
|
4987
|
-
},
|
|
4988
|
-
let { $from: o, $to: a } = t.selection, n = o.blockRange(a), s = n &&
|
|
4987
|
+
}, Bc = (t, e) => {
|
|
4988
|
+
let { $from: o, $to: a } = t.selection, n = o.blockRange(a), s = n && xt(n);
|
|
4989
4989
|
return s == null ? !1 : (e && e(t.tr.lift(n, s).scrollIntoView()), !0);
|
|
4990
4990
|
}, Hi = (t, e) => {
|
|
4991
4991
|
let { $head: o, $anchor: a } = t.selection;
|
|
@@ -5000,7 +5000,7 @@ function Jn(t) {
|
|
|
5000
5000
|
}
|
|
5001
5001
|
return null;
|
|
5002
5002
|
}
|
|
5003
|
-
const
|
|
5003
|
+
const Nc = (t, e) => {
|
|
5004
5004
|
let { $head: o, $anchor: a } = t.selection;
|
|
5005
5005
|
if (!o.parent.type.spec.code || !o.sameParent(a))
|
|
5006
5006
|
return !1;
|
|
@@ -5021,7 +5021,7 @@ const Oc = (t, e) => {
|
|
|
5021
5021
|
return !1;
|
|
5022
5022
|
if (e) {
|
|
5023
5023
|
let r = (!a.parentOffset && n.index() < n.parent.childCount ? a : n).pos, i = t.tr.insert(r, s.createAndFill());
|
|
5024
|
-
i.setSelection(
|
|
5024
|
+
i.setSelection(x.create(i.doc, r + 1)), e(i.scrollIntoView());
|
|
5025
5025
|
}
|
|
5026
5026
|
return !0;
|
|
5027
5027
|
}, qi = (t, e) => {
|
|
@@ -5033,13 +5033,13 @@ const Oc = (t, e) => {
|
|
|
5033
5033
|
if (Me(t.doc, s))
|
|
5034
5034
|
return e && e(t.tr.split(s).scrollIntoView()), !0;
|
|
5035
5035
|
}
|
|
5036
|
-
let a = o.blockRange(), n = a &&
|
|
5036
|
+
let a = o.blockRange(), n = a && xt(a);
|
|
5037
5037
|
return n == null ? !1 : (e && e(t.tr.lift(a, n).scrollIntoView()), !0);
|
|
5038
5038
|
};
|
|
5039
|
-
function
|
|
5039
|
+
function Oc(t) {
|
|
5040
5040
|
return (e, o) => {
|
|
5041
5041
|
let { $from: a, $to: n } = e.selection;
|
|
5042
|
-
if (e.selection instanceof
|
|
5042
|
+
if (e.selection instanceof F && e.selection.node.isBlock)
|
|
5043
5043
|
return !a.parentOffset || !Me(e.doc, a.pos) ? !1 : (o && o(e.tr.split(a.pos).scrollIntoView()), !0);
|
|
5044
5044
|
if (!a.depth)
|
|
5045
5045
|
return !1;
|
|
@@ -5054,7 +5054,7 @@ function Bc(t) {
|
|
|
5054
5054
|
s.unshift(null);
|
|
5055
5055
|
}
|
|
5056
5056
|
let c = e.tr;
|
|
5057
|
-
(e.selection instanceof
|
|
5057
|
+
(e.selection instanceof x || e.selection instanceof fe) && c.deleteSelection();
|
|
5058
5058
|
let m = c.mapping.map(a.pos), d = Me(c.doc, m, s.length, s);
|
|
5059
5059
|
if (d || (s[0] = i ? { type: i } : null, d = Me(c.doc, m, s.length, s)), !d)
|
|
5060
5060
|
return !1;
|
|
@@ -5065,9 +5065,9 @@ function Bc(t) {
|
|
|
5065
5065
|
return o && o(c.scrollIntoView()), !0;
|
|
5066
5066
|
};
|
|
5067
5067
|
}
|
|
5068
|
-
const Hc =
|
|
5068
|
+
const Hc = Oc(), Pc = (t, e) => {
|
|
5069
5069
|
let { $from: o, to: a } = t.selection, n, s = o.sharedDepth(a);
|
|
5070
|
-
return s == 0 ? !1 : (n = o.before(s), e && e(t.tr.setSelection(
|
|
5070
|
+
return s == 0 ? !1 : (n = o.before(s), e && e(t.tr.setSelection(F.create(t.doc, n))), !0);
|
|
5071
5071
|
};
|
|
5072
5072
|
function qc(t, e, o) {
|
|
5073
5073
|
let a = e.nodeBefore, n = e.nodeAfter, s = e.index();
|
|
@@ -5089,7 +5089,7 @@ function Wi(t, e, o, a) {
|
|
|
5089
5089
|
}
|
|
5090
5090
|
return !0;
|
|
5091
5091
|
}
|
|
5092
|
-
let c = s.type.spec.isolating || a > 0 && l ? null : A.findFrom(e, 1), m = c && c.$from.blockRange(c.$to), d = m &&
|
|
5092
|
+
let c = s.type.spec.isolating || a > 0 && l ? null : A.findFrom(e, 1), m = c && c.$from.blockRange(c.$to), d = m && xt(m);
|
|
5093
5093
|
if (d != null && d >= e.depth)
|
|
5094
5094
|
return o && o(t.tr.lift(m, d).scrollIntoView()), !0;
|
|
5095
5095
|
if (p && It(s, "start", !0) && It(n, "end")) {
|
|
@@ -5120,7 +5120,7 @@ function Ki(t) {
|
|
|
5120
5120
|
return !1;
|
|
5121
5121
|
s--;
|
|
5122
5122
|
}
|
|
5123
|
-
return n.node(s).isTextblock ? (o && o(e.tr.setSelection(
|
|
5123
|
+
return n.node(s).isTextblock ? (o && o(e.tr.setSelection(x.create(e.doc, t < 0 ? n.start(s) : n.end(s)))), !0) : !1;
|
|
5124
5124
|
};
|
|
5125
5125
|
}
|
|
5126
5126
|
const Wc = Ki(-1), Kc = Ki(1);
|
|
@@ -5169,7 +5169,7 @@ function Gn(...t) {
|
|
|
5169
5169
|
};
|
|
5170
5170
|
}
|
|
5171
5171
|
Gn(Kn, zi, $i);
|
|
5172
|
-
Gn(Kn,
|
|
5172
|
+
Gn(Kn, Ni, Oi);
|
|
5173
5173
|
Gn(Hi, Pi, qi, Hc);
|
|
5174
5174
|
typeof navigator < "u" ? /Mac|iP(hone|[oa]d)/.test(navigator.platform) : typeof os < "u" && os.platform && os.platform() == "darwin";
|
|
5175
5175
|
function Uc(t, e = null) {
|
|
@@ -5214,7 +5214,7 @@ function Xc(t) {
|
|
|
5214
5214
|
function Yc(t, e, o, a) {
|
|
5215
5215
|
let n = t.tr, s = a.end, r = a.$to.end(a.depth);
|
|
5216
5216
|
s < r && (n.step(new oe(s - 1, r, s, r, new _(v.from(o.create(null, a.parent.copy())), 1, 0), 1, !0)), a = new Ro(n.doc.resolve(a.$from.pos), n.doc.resolve(r), a.depth));
|
|
5217
|
-
const i =
|
|
5217
|
+
const i = xt(a);
|
|
5218
5218
|
if (i == null)
|
|
5219
5219
|
return !1;
|
|
5220
5220
|
n.lift(a, i);
|
|
@@ -5263,7 +5263,7 @@ function Ys(t, e, o, a, n) {
|
|
|
5263
5263
|
for (var s; ; ) {
|
|
5264
5264
|
if (t == o && e == a)
|
|
5265
5265
|
return !0;
|
|
5266
|
-
if (e == (n < 0 ? 0 :
|
|
5266
|
+
if (e == (n < 0 ? 0 : No(t))) {
|
|
5267
5267
|
let r = t.parentNode;
|
|
5268
5268
|
if (!r || r.nodeType != 1 || Xn(t) || em.test(t.nodeName) || t.contentEditable == "false")
|
|
5269
5269
|
return !1;
|
|
@@ -5276,22 +5276,22 @@ function Ys(t, e, o, a, n) {
|
|
|
5276
5276
|
else
|
|
5277
5277
|
return !1;
|
|
5278
5278
|
else
|
|
5279
|
-
t = r, e = n < 0 ?
|
|
5279
|
+
t = r, e = n < 0 ? No(t) : 0;
|
|
5280
5280
|
} else
|
|
5281
5281
|
return !1;
|
|
5282
5282
|
}
|
|
5283
5283
|
}
|
|
5284
|
-
function
|
|
5284
|
+
function No(t) {
|
|
5285
5285
|
return t.nodeType == 3 ? t.nodeValue.length : t.childNodes.length;
|
|
5286
5286
|
}
|
|
5287
5287
|
function tm(t, e, o) {
|
|
5288
|
-
for (let a = e == 0, n = e ==
|
|
5288
|
+
for (let a = e == 0, n = e == No(t); a || n; ) {
|
|
5289
5289
|
if (t == o)
|
|
5290
5290
|
return !0;
|
|
5291
5291
|
let s = dt(t);
|
|
5292
5292
|
if (t = t.parentNode, !t)
|
|
5293
5293
|
return !1;
|
|
5294
|
-
a = a && s == 0, n = n && s ==
|
|
5294
|
+
a = a && s == 0, n = n && s == No(t);
|
|
5295
5295
|
}
|
|
5296
5296
|
}
|
|
5297
5297
|
function Xn(t) {
|
|
@@ -5307,9 +5307,9 @@ function Ji(t, e) {
|
|
|
5307
5307
|
let o = document.createEvent("Event");
|
|
5308
5308
|
return o.initEvent("keydown", !0, !0), o.keyCode = t, o.key = o.code = e, o;
|
|
5309
5309
|
}
|
|
5310
|
-
const Ce = typeof navigator < "u" ? navigator : null, Qs = typeof document < "u" ? document : null, Xe = Ce && Ce.userAgent || "", un = /Edge\/(\d+)/.exec(Xe), Gi = /MSIE \d/.exec(Xe), fn = /Trident\/(?:[7-9]|\d{2,})\..*rv:(\d+)/.exec(Xe),
|
|
5311
|
-
|
|
5312
|
-
const hn = !
|
|
5310
|
+
const Ce = typeof navigator < "u" ? navigator : null, Qs = typeof document < "u" ? document : null, Xe = Ce && Ce.userAgent || "", un = /Edge\/(\d+)/.exec(Xe), Gi = /MSIE \d/.exec(Xe), fn = /Trident\/(?:[7-9]|\d{2,})\..*rv:(\d+)/.exec(Xe), to = !!(Gi || fn || un), Xi = Gi ? document.documentMode : fn ? +fn[1] : un ? +un[1] : 0, Fa = !to && /gecko\/(\d+)/i.test(Xe);
|
|
5311
|
+
Fa && +(/Firefox\/(\d+)/.exec(Xe) || [0, 0])[1];
|
|
5312
|
+
const hn = !to && /Chrome\/(\d+)/.exec(Xe), Le = !!hn, Yi = hn ? +hn[1] : 0, gt = !to && !!Ce && /Apple Computer/.test(Ce.vendor), Yn = gt && (/Mobile\/\w+/.test(Xe) || !!Ce && Ce.maxTouchPoints > 2), ve = Yn || (Ce ? /Mac/.test(Ce.platform) : !1), Qi = Ce ? /Win/.test(Ce.platform) : !1, oo = /Android \d/.test(Xe), Qn = !!Qs && "webkitFontSmoothing" in Qs.documentElement.style, om = Qn ? +(/\bAppleWebKit\/(\d+)/.exec(navigator.userAgent) || [0, 0])[1] : 0;
|
|
5313
5313
|
function am(t, e = null) {
|
|
5314
5314
|
let o = t.domSelectionRange(), a = t.state.doc;
|
|
5315
5315
|
if (!o.focusNode)
|
|
@@ -5322,9 +5322,9 @@ function am(t, e = null) {
|
|
|
5322
5322
|
for (l = r; n && !n.node; )
|
|
5323
5323
|
n = n.parent;
|
|
5324
5324
|
let m = n.node;
|
|
5325
|
-
if (n && m.isAtom &&
|
|
5325
|
+
if (n && m.isAtom && F.isSelectable(m) && n.parent && !(m.isInline && tm(o.focusNode, o.focusOffset, n.dom))) {
|
|
5326
5326
|
let d = n.posBefore;
|
|
5327
|
-
p = new
|
|
5327
|
+
p = new F(r == d ? i : a.resolve(d));
|
|
5328
5328
|
}
|
|
5329
5329
|
} else {
|
|
5330
5330
|
if (o instanceof t.dom.ownerDocument.defaultView.Selection && o.rangeCount > 1) {
|
|
@@ -5365,7 +5365,7 @@ function Zn(t, e = !1) {
|
|
|
5365
5365
|
sm(t);
|
|
5366
5366
|
else {
|
|
5367
5367
|
let { anchor: a, head: n } = o, s, r;
|
|
5368
|
-
Zs && !(o instanceof
|
|
5368
|
+
Zs && !(o instanceof x) && (o.$from.parent.inlineContent || (s = er(t, o.from)), !o.empty && !o.$from.parent.inlineContent && (r = er(t, o.to))), t.docView.setSelection(a, n, t, e), Zs && (s && tr(s), r && tr(r)), o.visible ? t.dom.classList.remove("ProseMirror-hideselection") : (t.dom.classList.add("ProseMirror-hideselection"), "onselectionchange" in document && nm(t));
|
|
5369
5369
|
}
|
|
5370
5370
|
t.domObserver.setCurSelection(), t.domObserver.connectSelection();
|
|
5371
5371
|
}
|
|
@@ -5403,10 +5403,10 @@ function sm(t) {
|
|
|
5403
5403
|
if (!e)
|
|
5404
5404
|
return;
|
|
5405
5405
|
let o = t.cursorWrapper.dom, a = o.nodeName == "IMG";
|
|
5406
|
-
a ? e.collapse(o.parentNode, dt(o) + 1) : e.collapse(o, 0), !a && !t.state.selection.visible &&
|
|
5406
|
+
a ? e.collapse(o.parentNode, dt(o) + 1) : e.collapse(o, 0), !a && !t.state.selection.visible && to && Xi <= 11 && (o.disabled = !0, o.disabled = !1);
|
|
5407
5407
|
}
|
|
5408
5408
|
function rm(t, e) {
|
|
5409
|
-
if (e instanceof
|
|
5409
|
+
if (e instanceof F) {
|
|
5410
5410
|
let o = t.docView.descAt(e.from);
|
|
5411
5411
|
o != t.lastSelectedViewDesc && (or(t), o && o.selectNode(), t.lastSelectedViewDesc = o);
|
|
5412
5412
|
} else
|
|
@@ -5416,7 +5416,7 @@ function or(t) {
|
|
|
5416
5416
|
t.lastSelectedViewDesc && (t.lastSelectedViewDesc.parent && t.lastSelectedViewDesc.deselectNode(), t.lastSelectedViewDesc = void 0);
|
|
5417
5417
|
}
|
|
5418
5418
|
function el(t, e, o, a) {
|
|
5419
|
-
return t.someProp("createSelectionBetween", (n) => n(t, e, o)) ||
|
|
5419
|
+
return t.someProp("createSelectionBetween", (n) => n(t, e, o)) || x.between(e, o, a);
|
|
5420
5420
|
}
|
|
5421
5421
|
function im(t) {
|
|
5422
5422
|
let e = t.domSelectionRange();
|
|
@@ -5432,43 +5432,43 @@ function bn(t, e) {
|
|
|
5432
5432
|
let { $anchor: o, $head: a } = t.selection, n = e > 0 ? o.max(a) : o.min(a), s = n.parent.inlineContent ? n.depth ? t.doc.resolve(e > 0 ? n.after() : n.before()) : null : n;
|
|
5433
5433
|
return s && A.findFrom(s, e);
|
|
5434
5434
|
}
|
|
5435
|
-
function
|
|
5435
|
+
function Be(t, e) {
|
|
5436
5436
|
return t.dispatch(t.state.tr.setSelection(e).scrollIntoView()), !0;
|
|
5437
5437
|
}
|
|
5438
5438
|
function ar(t, e, o) {
|
|
5439
5439
|
let a = t.state.selection;
|
|
5440
|
-
if (a instanceof
|
|
5440
|
+
if (a instanceof x)
|
|
5441
5441
|
if (o.indexOf("s") > -1) {
|
|
5442
5442
|
let { $head: n } = a, s = n.textOffset ? null : e < 0 ? n.nodeBefore : n.nodeAfter;
|
|
5443
5443
|
if (!s || s.isText || !s.isLeaf)
|
|
5444
5444
|
return !1;
|
|
5445
5445
|
let r = t.state.doc.resolve(n.pos + s.nodeSize * (e < 0 ? -1 : 1));
|
|
5446
|
-
return
|
|
5446
|
+
return Be(t, new x(a.$anchor, r));
|
|
5447
5447
|
} else if (a.empty) {
|
|
5448
5448
|
if (t.endOfTextblock(e > 0 ? "forward" : "backward")) {
|
|
5449
5449
|
let n = bn(t.state, e);
|
|
5450
|
-
return n && n instanceof
|
|
5450
|
+
return n && n instanceof F ? Be(t, n) : !1;
|
|
5451
5451
|
} else if (!(ve && o.indexOf("m") > -1)) {
|
|
5452
5452
|
let n = a.$head, s = n.textOffset ? null : e < 0 ? n.nodeBefore : n.nodeAfter, r;
|
|
5453
5453
|
if (!s || s.isText)
|
|
5454
5454
|
return !1;
|
|
5455
5455
|
let i = e < 0 ? n.pos - s.nodeSize : n.pos;
|
|
5456
|
-
return s.isAtom || (r = t.docView.descAt(i)) && !r.contentDOM ?
|
|
5456
|
+
return s.isAtom || (r = t.docView.descAt(i)) && !r.contentDOM ? F.isSelectable(s) ? Be(t, new F(e < 0 ? t.state.doc.resolve(n.pos - s.nodeSize) : n)) : Qn ? Be(t, new x(t.state.doc.resolve(e < 0 ? i : i + s.nodeSize))) : !1 : !1;
|
|
5457
5457
|
}
|
|
5458
5458
|
} else return !1;
|
|
5459
5459
|
else {
|
|
5460
|
-
if (a instanceof
|
|
5461
|
-
return
|
|
5460
|
+
if (a instanceof F && a.node.isInline)
|
|
5461
|
+
return Be(t, new x(e > 0 ? a.$to : a.$from));
|
|
5462
5462
|
{
|
|
5463
5463
|
let n = bn(t.state, e);
|
|
5464
|
-
return n ?
|
|
5464
|
+
return n ? Be(t, n) : !1;
|
|
5465
5465
|
}
|
|
5466
5466
|
}
|
|
5467
5467
|
}
|
|
5468
|
-
function
|
|
5468
|
+
function Oo(t) {
|
|
5469
5469
|
return t.nodeType == 3 ? t.nodeValue.length : t.childNodes.length;
|
|
5470
5470
|
}
|
|
5471
|
-
function
|
|
5471
|
+
function Bt(t, e) {
|
|
5472
5472
|
let o = t.pmViewDesc;
|
|
5473
5473
|
return o && o.size == 0 && (e < 0 || t.nextSibling || t.nodeName != "BR");
|
|
5474
5474
|
}
|
|
@@ -5480,13 +5480,13 @@ function lm(t) {
|
|
|
5480
5480
|
if (!o)
|
|
5481
5481
|
return;
|
|
5482
5482
|
let n, s, r = !1;
|
|
5483
|
-
for (
|
|
5483
|
+
for (Fa && o.nodeType == 1 && a < Oo(o) && Bt(o.childNodes[a], -1) && (r = !0); ; )
|
|
5484
5484
|
if (a > 0) {
|
|
5485
5485
|
if (o.nodeType != 1)
|
|
5486
5486
|
break;
|
|
5487
5487
|
{
|
|
5488
5488
|
let i = o.childNodes[a - 1];
|
|
5489
|
-
if (
|
|
5489
|
+
if (Bt(i, -1))
|
|
5490
5490
|
n = o, s = --a;
|
|
5491
5491
|
else if (i.nodeType == 3)
|
|
5492
5492
|
o = i, a = o.nodeValue.length;
|
|
@@ -5498,10 +5498,10 @@ function lm(t) {
|
|
|
5498
5498
|
break;
|
|
5499
5499
|
{
|
|
5500
5500
|
let i = o.previousSibling;
|
|
5501
|
-
for (; i &&
|
|
5501
|
+
for (; i && Bt(i, -1); )
|
|
5502
5502
|
n = o.parentNode, s = dt(i), i = i.previousSibling;
|
|
5503
5503
|
if (i)
|
|
5504
|
-
o = i, a =
|
|
5504
|
+
o = i, a = Oo(o);
|
|
5505
5505
|
else {
|
|
5506
5506
|
if (o = o.parentNode, o == t.dom)
|
|
5507
5507
|
break;
|
|
@@ -5515,13 +5515,13 @@ function pm(t) {
|
|
|
5515
5515
|
let e = t.domSelectionRange(), o = e.focusNode, a = e.focusOffset;
|
|
5516
5516
|
if (!o)
|
|
5517
5517
|
return;
|
|
5518
|
-
let n =
|
|
5518
|
+
let n = Oo(o), s, r;
|
|
5519
5519
|
for (; ; )
|
|
5520
5520
|
if (a < n) {
|
|
5521
5521
|
if (o.nodeType != 1)
|
|
5522
5522
|
break;
|
|
5523
5523
|
let i = o.childNodes[a];
|
|
5524
|
-
if (
|
|
5524
|
+
if (Bt(i, 1))
|
|
5525
5525
|
s = o, r = ++a;
|
|
5526
5526
|
else
|
|
5527
5527
|
break;
|
|
@@ -5530,10 +5530,10 @@ function pm(t) {
|
|
|
5530
5530
|
break;
|
|
5531
5531
|
{
|
|
5532
5532
|
let i = o.nextSibling;
|
|
5533
|
-
for (; i &&
|
|
5533
|
+
for (; i && Bt(i, 1); )
|
|
5534
5534
|
s = i.parentNode, r = dt(i) + 1, i = i.nextSibling;
|
|
5535
5535
|
if (i)
|
|
5536
|
-
o = i, a = 0, n =
|
|
5536
|
+
o = i, a = 0, n = Oo(o);
|
|
5537
5537
|
else {
|
|
5538
5538
|
if (o = o.parentNode, o == t.dom)
|
|
5539
5539
|
break;
|
|
@@ -5608,22 +5608,22 @@ function nr(t, e) {
|
|
|
5608
5608
|
}
|
|
5609
5609
|
function sr(t, e, o) {
|
|
5610
5610
|
let a = t.state.selection;
|
|
5611
|
-
if (a instanceof
|
|
5611
|
+
if (a instanceof x && !a.empty || o.indexOf("s") > -1 || ve && o.indexOf("m") > -1)
|
|
5612
5612
|
return !1;
|
|
5613
5613
|
let { $from: n, $to: s } = a;
|
|
5614
5614
|
if (!n.parent.inlineContent || t.endOfTextblock(e < 0 ? "up" : "down")) {
|
|
5615
5615
|
let r = bn(t.state, e);
|
|
5616
|
-
if (r && r instanceof
|
|
5617
|
-
return
|
|
5616
|
+
if (r && r instanceof F)
|
|
5617
|
+
return Be(t, r);
|
|
5618
5618
|
}
|
|
5619
5619
|
if (!n.parent.inlineContent) {
|
|
5620
5620
|
let r = e < 0 ? n : s, i = a instanceof fe ? A.near(r, e) : A.findFrom(r, e);
|
|
5621
|
-
return i ?
|
|
5621
|
+
return i ? Be(t, i) : !1;
|
|
5622
5622
|
}
|
|
5623
5623
|
return !1;
|
|
5624
5624
|
}
|
|
5625
5625
|
function rr(t, e) {
|
|
5626
|
-
if (!(t.state.selection instanceof
|
|
5626
|
+
if (!(t.state.selection instanceof x))
|
|
5627
5627
|
return !0;
|
|
5628
5628
|
let { $head: o, $anchor: a, empty: n } = t.state.selection;
|
|
5629
5629
|
if (!o.sameParent(a))
|
|
@@ -5876,7 +5876,7 @@ function We(t, e) {
|
|
|
5876
5876
|
}
|
|
5877
5877
|
he.keydown = (t, e) => {
|
|
5878
5878
|
let o = e;
|
|
5879
|
-
if (t.input.shiftKey = o.keyCode == 16 || o.shiftKey, !cl(t, o) && (t.input.lastKeyCode = o.keyCode, t.input.lastKeyCodeTime = Date.now(), !(
|
|
5879
|
+
if (t.input.shiftKey = o.keyCode == 16 || o.shiftKey, !cl(t, o) && (t.input.lastKeyCode = o.keyCode, t.input.lastKeyCodeTime = Date.now(), !(oo && Le && o.keyCode == 13)))
|
|
5880
5880
|
if (o.keyCode != 229 && t.domObserver.forceFlush(), Yn && o.keyCode == 13 && !o.ctrlKey && !o.altKey && !o.metaKey) {
|
|
5881
5881
|
let a = Date.now();
|
|
5882
5882
|
t.input.lastIOSEnter = a, t.input.lastIOSEnterFallbackTimeout = setTimeout(() => {
|
|
@@ -5896,12 +5896,12 @@ he.keypress = (t, e) => {
|
|
|
5896
5896
|
return;
|
|
5897
5897
|
}
|
|
5898
5898
|
let a = t.state.selection;
|
|
5899
|
-
if (!(a instanceof
|
|
5899
|
+
if (!(a instanceof x) || !a.$from.sameParent(a.$to)) {
|
|
5900
5900
|
let n = String.fromCharCode(o.charCode), s = () => t.state.tr.insertText(n).scrollIntoView();
|
|
5901
5901
|
!/[\r\n]/.test(n) && !t.someProp("handleTextInput", (r) => r(t, a.$from.pos, a.$to.pos, n, s)) && t.dispatch(s()), o.preventDefault();
|
|
5902
5902
|
}
|
|
5903
5903
|
};
|
|
5904
|
-
function
|
|
5904
|
+
function xa(t) {
|
|
5905
5905
|
return { left: t.clientX, top: t.clientY };
|
|
5906
5906
|
}
|
|
5907
5907
|
function ym(t, e) {
|
|
@@ -5927,22 +5927,22 @@ function _m(t, e) {
|
|
|
5927
5927
|
if (e == -1)
|
|
5928
5928
|
return !1;
|
|
5929
5929
|
let o = t.state.doc.resolve(e), a = o.nodeAfter;
|
|
5930
|
-
return a && a.isAtom &&
|
|
5930
|
+
return a && a.isAtom && F.isSelectable(a) ? (wt(t, new F(o)), !0) : !1;
|
|
5931
5931
|
}
|
|
5932
5932
|
function wm(t, e) {
|
|
5933
5933
|
if (e == -1)
|
|
5934
5934
|
return !1;
|
|
5935
5935
|
let o = t.state.selection, a, n;
|
|
5936
|
-
o instanceof
|
|
5936
|
+
o instanceof F && (a = o.node);
|
|
5937
5937
|
let s = t.state.doc.resolve(e);
|
|
5938
5938
|
for (let r = s.depth + 1; r > 0; r--) {
|
|
5939
5939
|
let i = r > s.depth ? s.nodeAfter : s.node(r);
|
|
5940
|
-
if (
|
|
5940
|
+
if (F.isSelectable(i)) {
|
|
5941
5941
|
a && o.$from.depth > 0 && r >= o.$from.depth && s.before(o.$from.depth + 1) == o.$from.pos ? n = s.before(o.$from.depth) : n = s.before(r);
|
|
5942
5942
|
break;
|
|
5943
5943
|
}
|
|
5944
5944
|
}
|
|
5945
|
-
return n != null ? (wt(t,
|
|
5945
|
+
return n != null ? (wt(t, F.create(t.state.doc, n)), !0) : !1;
|
|
5946
5946
|
}
|
|
5947
5947
|
function Dm(t, e, o, a, n) {
|
|
5948
5948
|
return es(t, "handleClickOn", e, o, a) || t.someProp("handleClick", (s) => s(t, e, a)) || (n ? wm(t, o) : _m(t, o));
|
|
@@ -5951,21 +5951,21 @@ function Im(t, e, o, a) {
|
|
|
5951
5951
|
return es(t, "handleDoubleClickOn", e, o, a) || t.someProp("handleDoubleClick", (n) => n(t, e, a));
|
|
5952
5952
|
}
|
|
5953
5953
|
function Cm(t, e, o, a) {
|
|
5954
|
-
return es(t, "handleTripleClickOn", e, o, a) || t.someProp("handleTripleClick", (n) => n(t, e, a)) ||
|
|
5954
|
+
return es(t, "handleTripleClickOn", e, o, a) || t.someProp("handleTripleClick", (n) => n(t, e, a)) || Fm(t, o, a);
|
|
5955
5955
|
}
|
|
5956
|
-
function
|
|
5956
|
+
function Fm(t, e, o) {
|
|
5957
5957
|
if (o.button != 0)
|
|
5958
5958
|
return !1;
|
|
5959
5959
|
let a = t.state.doc;
|
|
5960
5960
|
if (e == -1)
|
|
5961
|
-
return a.inlineContent ? (wt(t,
|
|
5961
|
+
return a.inlineContent ? (wt(t, x.create(a, 0, a.content.size)), !0) : !1;
|
|
5962
5962
|
let n = a.resolve(e);
|
|
5963
5963
|
for (let s = n.depth + 1; s > 0; s--) {
|
|
5964
5964
|
let r = s > n.depth ? n.nodeAfter : n.node(s), i = n.before(s);
|
|
5965
5965
|
if (r.inlineContent)
|
|
5966
|
-
wt(t,
|
|
5967
|
-
else if (
|
|
5968
|
-
wt(t,
|
|
5966
|
+
wt(t, x.create(a, i + 1, i + 1 + r.content.size));
|
|
5967
|
+
else if (F.isSelectable(r))
|
|
5968
|
+
wt(t, F.create(a, i));
|
|
5969
5969
|
else
|
|
5970
5970
|
continue;
|
|
5971
5971
|
return !0;
|
|
@@ -5980,10 +5980,10 @@ ye.mousedown = (t, e) => {
|
|
|
5980
5980
|
t.input.shiftKey = o.shiftKey;
|
|
5981
5981
|
let a = ts(t), n = Date.now(), s = "singleClick";
|
|
5982
5982
|
n - t.input.lastClick.time < 500 && ym(o, t.input.lastClick) && !o[pl] && t.input.lastClick.button == o.button && (t.input.lastClick.type == "singleClick" ? s = "doubleClick" : t.input.lastClick.type == "doubleClick" && (s = "tripleClick")), t.input.lastClick = { time: n, x: o.clientX, y: o.clientY, type: s, button: o.button };
|
|
5983
|
-
let r = t.posAtCoords(
|
|
5984
|
-
r && (s == "singleClick" ? (t.input.mouseDown && t.input.mouseDown.done(), t.input.mouseDown = new
|
|
5983
|
+
let r = t.posAtCoords(xa(o));
|
|
5984
|
+
r && (s == "singleClick" ? (t.input.mouseDown && t.input.mouseDown.done(), t.input.mouseDown = new xm(t, r, o, !!a)) : (s == "doubleClick" ? Im : Cm)(t, r.pos, r.inside, o) ? o.preventDefault() : We(t, "pointer"));
|
|
5985
5985
|
};
|
|
5986
|
-
class
|
|
5986
|
+
class xm {
|
|
5987
5987
|
constructor(e, o, a, n) {
|
|
5988
5988
|
this.view = e, this.pos = o, this.event = a, this.flushed = n, this.delayedSelectionSync = !1, this.mightDrag = null, this.startDoc = e.state.doc, this.selectNode = !!a[pl], this.allowDefault = a.shiftKey;
|
|
5989
5989
|
let s, r;
|
|
@@ -5996,11 +5996,11 @@ class Em {
|
|
|
5996
5996
|
const i = n ? null : a.target, l = i ? e.docView.nearestDesc(i, !0) : null;
|
|
5997
5997
|
this.target = l && l.nodeDOM.nodeType == 1 ? l.nodeDOM : null;
|
|
5998
5998
|
let { selection: p } = e.state;
|
|
5999
|
-
(a.button == 0 && s.type.spec.draggable && s.type.spec.selectable !== !1 || p instanceof
|
|
5999
|
+
(a.button == 0 && s.type.spec.draggable && s.type.spec.selectable !== !1 || p instanceof F && p.from <= r && p.to > r) && (this.mightDrag = {
|
|
6000
6000
|
node: s,
|
|
6001
6001
|
pos: r,
|
|
6002
6002
|
addAttr: !!(this.target && !this.target.draggable),
|
|
6003
|
-
setUneditable: !!(this.target &&
|
|
6003
|
+
setUneditable: !!(this.target && Fa && !this.target.hasAttribute("contentEditable"))
|
|
6004
6004
|
}), this.target && this.mightDrag && (this.mightDrag.addAttr || this.mightDrag.setUneditable) && (this.view.domObserver.stop(), this.mightDrag.addAttr && (this.target.draggable = !0), this.mightDrag.setUneditable && setTimeout(() => {
|
|
6005
6005
|
this.view.input.mouseDown == this && this.target.setAttribute("contentEditable", "false");
|
|
6006
6006
|
}, 20), this.view.domObserver.start()), e.root.addEventListener("mouseup", this.up = this.up.bind(this)), e.root.addEventListener("mousemove", this.move = this.move.bind(this)), We(e, "pointer");
|
|
@@ -6012,7 +6012,7 @@ class Em {
|
|
|
6012
6012
|
if (this.done(), !this.view.dom.contains(e.target))
|
|
6013
6013
|
return;
|
|
6014
6014
|
let o = this.pos;
|
|
6015
|
-
this.view.state.doc != this.startDoc && (o = this.view.posAtCoords(
|
|
6015
|
+
this.view.state.doc != this.startDoc && (o = this.view.posAtCoords(xa(e))), this.updateAllowDefault(e), this.allowDefault || !o ? We(this.view, "pointer") : Dm(this.view, o.pos, o.inside, e, this.selectNode) ? e.preventDefault() : e.button == 0 && (this.flushed || // Safari ignores clicks on draggable elements
|
|
6016
6016
|
gt && this.mightDrag && !this.mightDrag.node.isAtom || // Chrome will sometimes treat a node selection as a
|
|
6017
6017
|
// cursor, but still report that the node is selected
|
|
6018
6018
|
// when asked through getSelection. You'll then get a
|
|
@@ -6039,14 +6039,14 @@ ye.contextmenu = (t) => ts(t);
|
|
|
6039
6039
|
function cl(t, e) {
|
|
6040
6040
|
return t.composing ? !0 : gt && Math.abs(e.timeStamp - t.input.compositionEndedAt) < 500 ? (t.input.compositionEndedAt = -2e8, !0) : !1;
|
|
6041
6041
|
}
|
|
6042
|
-
const
|
|
6042
|
+
const Em = oo ? 5e3 : -1;
|
|
6043
6043
|
he.compositionstart = he.compositionupdate = (t) => {
|
|
6044
6044
|
if (!t.composing) {
|
|
6045
6045
|
t.domObserver.flush();
|
|
6046
6046
|
let { state: e } = t, o = e.selection.$to;
|
|
6047
|
-
if (e.selection instanceof
|
|
6047
|
+
if (e.selection instanceof x && (e.storedMarks || !o.textOffset && o.parentOffset && o.nodeBefore.marks.some((a) => a.type.spec.inclusive === !1) || Le && Qi && Am(t)))
|
|
6048
6048
|
t.markCursor = t.state.storedMarks || o.marks(), Ho(t, !0), t.markCursor = null;
|
|
6049
|
-
else if (Ho(t, !e.selection.empty),
|
|
6049
|
+
else if (Ho(t, !e.selection.empty), Fa && e.selection.empty && o.parentOffset && !o.textOffset && o.nodeBefore.marks.length) {
|
|
6050
6050
|
let a = t.domSelectionRange();
|
|
6051
6051
|
for (let n = a.focusNode, s = a.focusOffset; n && n.nodeType == 1 && s != 0; ) {
|
|
6052
6052
|
let r = s < 0 ? n.lastChild : n.childNodes[s - 1];
|
|
@@ -6062,7 +6062,7 @@ he.compositionstart = he.compositionupdate = (t) => {
|
|
|
6062
6062
|
}
|
|
6063
6063
|
t.input.composing = !0;
|
|
6064
6064
|
}
|
|
6065
|
-
ml(t,
|
|
6065
|
+
ml(t, Em);
|
|
6066
6066
|
};
|
|
6067
6067
|
function Am(t) {
|
|
6068
6068
|
let { focusNode: e, focusOffset: o } = t.domSelectionRange();
|
|
@@ -6086,7 +6086,7 @@ function Mm() {
|
|
|
6086
6086
|
return t.initEvent("event", !0, !0), t.timeStamp;
|
|
6087
6087
|
}
|
|
6088
6088
|
function Ho(t, e = !1) {
|
|
6089
|
-
if (!(
|
|
6089
|
+
if (!(oo && t.domObserver.flushingSoon >= 0)) {
|
|
6090
6090
|
if (t.domObserver.forceFlush(), Sm(t), e || t.docView && t.docView.dirty) {
|
|
6091
6091
|
let o = am(t), a = t.state.selection;
|
|
6092
6092
|
return o && !o.eq(a) ? t.dispatch(t.state.tr.setSelection(o)) : (t.markCursor || e) && !a.$from.node(a.$from.sharedDepth(a.to)).inlineContent ? t.dispatch(t.state.tr.deleteSelection()) : t.updateState(t.state), !0;
|
|
@@ -6104,12 +6104,12 @@ function Tm(t, e) {
|
|
|
6104
6104
|
o.parentNode && o.parentNode.removeChild(o), t.focus();
|
|
6105
6105
|
}, 50);
|
|
6106
6106
|
}
|
|
6107
|
-
const
|
|
6107
|
+
const Jt = to && Xi < 15 || Yn && om < 604;
|
|
6108
6108
|
ye.copy = he.cut = (t, e) => {
|
|
6109
6109
|
let o = e, a = t.state.selection, n = o.type == "cut";
|
|
6110
6110
|
if (a.empty)
|
|
6111
6111
|
return;
|
|
6112
|
-
let s =
|
|
6112
|
+
let s = Jt ? null : o.clipboardData, r = a.content(), { dom: i, text: l } = ol(t, r);
|
|
6113
6113
|
s ? (o.preventDefault(), s.clearData(), s.setData("text/html", i.innerHTML), s.setData("text/plain", l)) : Tm(t, i), n && t.dispatch(t.state.tr.deleteSelection().scrollIntoView().setMeta("uiEvent", "cut"));
|
|
6114
6114
|
};
|
|
6115
6115
|
function Lm(t) {
|
|
@@ -6143,9 +6143,9 @@ function dl(t) {
|
|
|
6143
6143
|
}
|
|
6144
6144
|
he.paste = (t, e) => {
|
|
6145
6145
|
let o = e;
|
|
6146
|
-
if (t.composing && !
|
|
6146
|
+
if (t.composing && !oo)
|
|
6147
6147
|
return;
|
|
6148
|
-
let a =
|
|
6148
|
+
let a = Jt ? null : o.clipboardData, n = t.input.shiftKey && t.input.lastKeyCode != 45;
|
|
6149
6149
|
a && kn(t, dl(a), a.getData("text/html"), n, o) ? o.preventDefault() : zm(t, o);
|
|
6150
6150
|
};
|
|
6151
6151
|
class Rm {
|
|
@@ -6161,17 +6161,17 @@ ye.dragstart = (t, e) => {
|
|
|
6161
6161
|
let o = e, a = t.input.mouseDown;
|
|
6162
6162
|
if (a && a.done(), !o.dataTransfer)
|
|
6163
6163
|
return;
|
|
6164
|
-
let n = t.state.selection, s = n.empty ? null : t.posAtCoords(
|
|
6165
|
-
if (!(s && s.pos >= n.from && s.pos <= (n instanceof
|
|
6164
|
+
let n = t.state.selection, s = n.empty ? null : t.posAtCoords(xa(o)), r;
|
|
6165
|
+
if (!(s && s.pos >= n.from && s.pos <= (n instanceof F ? n.to - 1 : n.to))) {
|
|
6166
6166
|
if (a && a.mightDrag)
|
|
6167
|
-
r =
|
|
6167
|
+
r = F.create(t.state.doc, a.mightDrag.pos);
|
|
6168
6168
|
else if (o.target && o.target.nodeType == 1) {
|
|
6169
6169
|
let m = t.docView.nearestDesc(o.target, !0);
|
|
6170
|
-
m && m.node.type.spec.draggable && m != t.docView && (r =
|
|
6170
|
+
m && m.node.type.spec.draggable && m != t.docView && (r = F.create(t.state.doc, m.posBefore));
|
|
6171
6171
|
}
|
|
6172
6172
|
}
|
|
6173
6173
|
let i = (r || t.state.selection).content(), { dom: l, text: p, slice: c } = ol(t, i);
|
|
6174
|
-
(!o.dataTransfer.files.length || !Le || Yi > 120) && o.dataTransfer.clearData(), o.dataTransfer.setData(
|
|
6174
|
+
(!o.dataTransfer.files.length || !Le || Yi > 120) && o.dataTransfer.clearData(), o.dataTransfer.setData(Jt ? "Text" : "text/html", l.innerHTML), o.dataTransfer.effectAllowed = "copyMove", Jt || o.dataTransfer.setData("text/plain", p), t.dragging = new Rm(c, gl(t, o), r);
|
|
6175
6175
|
};
|
|
6176
6176
|
ye.dragend = (t) => {
|
|
6177
6177
|
let e = t.dragging;
|
|
@@ -6182,21 +6182,21 @@ ye.dragend = (t) => {
|
|
|
6182
6182
|
he.dragover = he.dragenter = (t, e) => e.preventDefault();
|
|
6183
6183
|
he.drop = (t, e) => {
|
|
6184
6184
|
try {
|
|
6185
|
-
|
|
6185
|
+
Bm(t, e, t.dragging);
|
|
6186
6186
|
} finally {
|
|
6187
6187
|
t.dragging = null;
|
|
6188
6188
|
}
|
|
6189
6189
|
};
|
|
6190
|
-
function
|
|
6190
|
+
function Bm(t, e, o) {
|
|
6191
6191
|
if (!e.dataTransfer)
|
|
6192
6192
|
return;
|
|
6193
|
-
let a = t.posAtCoords(
|
|
6193
|
+
let a = t.posAtCoords(xa(e));
|
|
6194
6194
|
if (!a)
|
|
6195
6195
|
return;
|
|
6196
6196
|
let n = t.state.doc.resolve(a.pos), s = o && o.slice;
|
|
6197
6197
|
s ? t.someProp("transformPasted", (g) => {
|
|
6198
6198
|
s = g(s, t, !1);
|
|
6199
|
-
}) : s = al(t, dl(e.dataTransfer),
|
|
6199
|
+
}) : s = al(t, dl(e.dataTransfer), Jt ? null : e.dataTransfer.getData("text/html"), !1, n);
|
|
6200
6200
|
let r = !!(o && gl(t, e));
|
|
6201
6201
|
if (t.someProp("handleDrop", (g) => g(t, e, s || _.empty, r))) {
|
|
6202
6202
|
e.preventDefault();
|
|
@@ -6216,8 +6216,8 @@ function Nm(t, e, o) {
|
|
|
6216
6216
|
if (c ? l.replaceRangeWith(p, p, s.content.firstChild) : l.replaceRange(p, p, s), l.doc.eq(m))
|
|
6217
6217
|
return;
|
|
6218
6218
|
let d = l.doc.resolve(p);
|
|
6219
|
-
if (c &&
|
|
6220
|
-
l.setSelection(new
|
|
6219
|
+
if (c && F.isSelectable(s.content.firstChild) && d.nodeAfter && d.nodeAfter.sameMarkup(s.content.firstChild))
|
|
6220
|
+
l.setSelection(new F(d));
|
|
6221
6221
|
else {
|
|
6222
6222
|
let g = l.mapping.map(i);
|
|
6223
6223
|
l.mapping.maps[l.mapping.maps.length - 1].forEach((u, f, h, b) => g = b), l.setSelection(el(t, d, l.doc.resolve(g)));
|
|
@@ -6234,7 +6234,7 @@ ye.blur = (t, e) => {
|
|
|
6234
6234
|
t.focused && (t.domObserver.stop(), t.dom.classList.remove("ProseMirror-focused"), t.domObserver.start(), o.relatedTarget && t.dom.contains(o.relatedTarget) && t.domObserver.currentSelection.clear(), t.focused = !1);
|
|
6235
6235
|
};
|
|
6236
6236
|
ye.beforeinput = (t, e) => {
|
|
6237
|
-
if (Le &&
|
|
6237
|
+
if (Le && oo && e.inputType == "deleteContentBackward") {
|
|
6238
6238
|
t.domObserver.flushSoon();
|
|
6239
6239
|
let { domChangeCount: o } = t.input;
|
|
6240
6240
|
setTimeout(() => {
|
|
@@ -6247,7 +6247,7 @@ ye.beforeinput = (t, e) => {
|
|
|
6247
6247
|
};
|
|
6248
6248
|
for (let t in he)
|
|
6249
6249
|
ye[t] = he[t];
|
|
6250
|
-
function
|
|
6250
|
+
function Gt(t, e) {
|
|
6251
6251
|
if (t == e)
|
|
6252
6252
|
return !0;
|
|
6253
6253
|
for (let o in t)
|
|
@@ -6270,7 +6270,7 @@ class Po {
|
|
|
6270
6270
|
return !0;
|
|
6271
6271
|
}
|
|
6272
6272
|
eq(e) {
|
|
6273
|
-
return this == e || e instanceof Po && (this.spec.key && this.spec.key == e.spec.key || this.toDOM == e.toDOM &&
|
|
6273
|
+
return this == e || e instanceof Po && (this.spec.key && this.spec.key == e.spec.key || this.toDOM == e.toDOM && Gt(this.spec, e.spec));
|
|
6274
6274
|
}
|
|
6275
6275
|
destroy(e) {
|
|
6276
6276
|
this.spec.destroy && this.spec.destroy(e);
|
|
@@ -6288,7 +6288,7 @@ class Ke {
|
|
|
6288
6288
|
return o.from < o.to;
|
|
6289
6289
|
}
|
|
6290
6290
|
eq(e) {
|
|
6291
|
-
return this == e || e instanceof Ke &&
|
|
6291
|
+
return this == e || e instanceof Ke && Gt(this.attrs, e.attrs) && Gt(this.spec, e.spec);
|
|
6292
6292
|
}
|
|
6293
6293
|
static is(e) {
|
|
6294
6294
|
return e.type instanceof Ke;
|
|
@@ -6312,7 +6312,7 @@ class as {
|
|
|
6312
6312
|
return n == o.from && !(s = e.child(a)).isText && n + s.nodeSize == o.to;
|
|
6313
6313
|
}
|
|
6314
6314
|
eq(e) {
|
|
6315
|
-
return this == e || e instanceof as &&
|
|
6315
|
+
return this == e || e instanceof as && Gt(this.attrs, e.attrs) && Gt(this.spec, e.spec);
|
|
6316
6316
|
}
|
|
6317
6317
|
destroy() {
|
|
6318
6318
|
}
|
|
@@ -6443,7 +6443,7 @@ class J {
|
|
|
6443
6443
|
let l = this.local[i].map(e, a, n);
|
|
6444
6444
|
l && l.type.valid(o, l) ? (r || (r = [])).push(l) : s.onRemove && s.onRemove(this.local[i].spec);
|
|
6445
6445
|
}
|
|
6446
|
-
return this.children.length ?
|
|
6446
|
+
return this.children.length ? Nm(this.children, r || [], e, o, a, n, s) : r ? new J(r.sort(rt), kt) : le;
|
|
6447
6447
|
}
|
|
6448
6448
|
/**
|
|
6449
6449
|
Add the given array of decorations to the ones in the set,
|
|
@@ -6621,7 +6621,7 @@ class Ze {
|
|
|
6621
6621
|
this.members[o].forEachSet(e);
|
|
6622
6622
|
}
|
|
6623
6623
|
}
|
|
6624
|
-
function
|
|
6624
|
+
function Nm(t, e, o, a, n, s, r) {
|
|
6625
6625
|
let i = t.slice();
|
|
6626
6626
|
for (let p = 0, c = s; p < o.maps.length; p++) {
|
|
6627
6627
|
let m = 0;
|
|
@@ -6657,7 +6657,7 @@ function Om(t, e, o, a, n, s, r) {
|
|
|
6657
6657
|
l = !0;
|
|
6658
6658
|
}
|
|
6659
6659
|
if (l) {
|
|
6660
|
-
let p =
|
|
6660
|
+
let p = Om(i, t, e, o, n, s, r), c = qo(p, a, 0, r);
|
|
6661
6661
|
e = c.local;
|
|
6662
6662
|
for (let m = 0; m < i.length; m += 3)
|
|
6663
6663
|
i[m + 1] < 0 && (i.splice(m, 3), m -= 3);
|
|
@@ -6680,7 +6680,7 @@ function ul(t, e) {
|
|
|
6680
6680
|
}
|
|
6681
6681
|
return o;
|
|
6682
6682
|
}
|
|
6683
|
-
function
|
|
6683
|
+
function Om(t, e, o, a, n, s, r) {
|
|
6684
6684
|
function i(l, p) {
|
|
6685
6685
|
for (let c = 0; c < l.local.length; c++) {
|
|
6686
6686
|
let m = l.local[c].map(a, n, p);
|
|
@@ -7013,8 +7013,8 @@ ss(vl, {
|
|
|
7013
7013
|
joinTextblockBackward: () => Id,
|
|
7014
7014
|
joinTextblockForward: () => Cd,
|
|
7015
7015
|
joinUp: () => vd,
|
|
7016
|
-
keyboardShortcut: () =>
|
|
7017
|
-
lift: () =>
|
|
7016
|
+
keyboardShortcut: () => xd,
|
|
7017
|
+
lift: () => Ed,
|
|
7018
7018
|
liftEmptyBlock: () => Ad,
|
|
7019
7019
|
liftListItem: () => Sd,
|
|
7020
7020
|
newlineInCode: () => Md,
|
|
@@ -7023,9 +7023,9 @@ ss(vl, {
|
|
|
7023
7023
|
selectAll: () => zd,
|
|
7024
7024
|
selectNodeBackward: () => Rd,
|
|
7025
7025
|
selectNodeForward: () => $d,
|
|
7026
|
-
selectParentNode: () =>
|
|
7027
|
-
selectTextblockEnd: () =>
|
|
7028
|
-
selectTextblockStart: () =>
|
|
7026
|
+
selectParentNode: () => Bd,
|
|
7027
|
+
selectTextblockEnd: () => Nd,
|
|
7028
|
+
selectTextblockStart: () => Od,
|
|
7029
7029
|
setContent: () => Pd,
|
|
7030
7030
|
setMark: () => ag,
|
|
7031
7031
|
setMeta: () => ng,
|
|
@@ -7060,7 +7060,7 @@ var Xm = () => ({ editor: t, view: e }) => (requestAnimationFrame(() => {
|
|
|
7060
7060
|
const { doc: p, mapping: c } = e, m = p.resolve(c.map(l)), d = p.resolve(c.map(l + i.nodeSize)), g = m.blockRange(d);
|
|
7061
7061
|
if (!g)
|
|
7062
7062
|
return;
|
|
7063
|
-
const u =
|
|
7063
|
+
const u = xt(g);
|
|
7064
7064
|
if (i.type.isTextblock) {
|
|
7065
7065
|
const { defaultType: f } = m.parent.contentMatchAt(m.index());
|
|
7066
7066
|
e.setNodeMarkup(g.start, f);
|
|
@@ -7072,7 +7072,7 @@ var Xm = () => ({ editor: t, view: e }) => (requestAnimationFrame(() => {
|
|
|
7072
7072
|
const { state: n } = o, s = n.doc.slice(t.from, t.to);
|
|
7073
7073
|
a.deleteRange(t.from, t.to);
|
|
7074
7074
|
const r = a.mapping.map(e);
|
|
7075
|
-
return a.insert(r, s.content), a.setSelection(new
|
|
7075
|
+
return a.insert(r, s.content), a.setSelection(new x(a.doc.resolve(Math.max(r - 1, 0)))), !0;
|
|
7076
7076
|
}, od = () => ({ tr: t, dispatch: e }) => {
|
|
7077
7077
|
const { selection: o } = t, a = o.$anchor.node();
|
|
7078
7078
|
if (a.content.size > 0)
|
|
@@ -7110,7 +7110,7 @@ var ad = (t) => ({ tr: e, state: o, dispatch: a }) => {
|
|
|
7110
7110
|
}, nd = (t) => ({ tr: e, dispatch: o }) => {
|
|
7111
7111
|
const { from: a, to: n } = t;
|
|
7112
7112
|
return o && e.delete(a, n), !0;
|
|
7113
|
-
}, sd = () => ({ state: t, dispatch: e }) => Kn(t, e), rd = () => ({ commands: t }) => t.keyboardShortcut("Enter"), id = () => ({ state: t, dispatch: e }) =>
|
|
7113
|
+
}, sd = () => ({ state: t, dispatch: e }) => Kn(t, e), rd = () => ({ commands: t }) => t.keyboardShortcut("Enter"), id = () => ({ state: t, dispatch: e }) => Nc(t, e);
|
|
7114
7114
|
function ld(t) {
|
|
7115
7115
|
return Object.prototype.toString.call(t) === "[object RegExp]";
|
|
7116
7116
|
}
|
|
@@ -7158,7 +7158,7 @@ var pd = (t, e = {}) => ({ tr: o, state: a, dispatch: n }) => {
|
|
|
7158
7158
|
if (n) {
|
|
7159
7159
|
const m = rs(l, s, e);
|
|
7160
7160
|
if (m && m.from <= p && m.to >= c) {
|
|
7161
|
-
const d =
|
|
7161
|
+
const d = x.create(r, m.from, m.to);
|
|
7162
7162
|
o.setSelection(d);
|
|
7163
7163
|
}
|
|
7164
7164
|
}
|
|
@@ -7171,7 +7171,7 @@ var pd = (t, e = {}) => ({ tr: o, state: a, dispatch: n }) => {
|
|
|
7171
7171
|
return !1;
|
|
7172
7172
|
};
|
|
7173
7173
|
function yl(t) {
|
|
7174
|
-
return t instanceof
|
|
7174
|
+
return t instanceof x;
|
|
7175
7175
|
}
|
|
7176
7176
|
function et(t = 0, e = 0, o = 0) {
|
|
7177
7177
|
return Math.min(Math.max(t, e), o);
|
|
@@ -7185,7 +7185,7 @@ function md(t, e = null) {
|
|
|
7185
7185
|
if (e === "end")
|
|
7186
7186
|
return a;
|
|
7187
7187
|
const n = o.from, s = a.to;
|
|
7188
|
-
return e === "all" ?
|
|
7188
|
+
return e === "all" ? x.create(t, et(0, n, s), et(t.content.size, n, s)) : x.create(t, et(e, n, s), et(e, n, s));
|
|
7189
7189
|
}
|
|
7190
7190
|
function dr() {
|
|
7191
7191
|
return navigator.platform === "Android" || /android/i.test(navigator.userAgent);
|
|
@@ -7225,13 +7225,13 @@ var gd = (t = null, e = {}) => ({ editor: o, view: a, tr: n, dispatch: s }) => {
|
|
|
7225
7225
|
}
|
|
7226
7226
|
return t;
|
|
7227
7227
|
};
|
|
7228
|
-
function
|
|
7228
|
+
function po(t) {
|
|
7229
7229
|
if (typeof window > "u")
|
|
7230
7230
|
throw new Error("[tiptap error]: there is no window object available, so this function cannot be used");
|
|
7231
7231
|
const e = `<body>${t}</body>`, o = new window.DOMParser().parseFromString(e, "text/html").body;
|
|
7232
7232
|
return _l(o);
|
|
7233
7233
|
}
|
|
7234
|
-
function
|
|
7234
|
+
function Xt(t, e, o) {
|
|
7235
7235
|
if (t instanceof Ie || t instanceof v)
|
|
7236
7236
|
return t;
|
|
7237
7237
|
o = {
|
|
@@ -7249,7 +7249,7 @@ function Gt(t, e, o) {
|
|
|
7249
7249
|
} catch (s) {
|
|
7250
7250
|
if (o.errorOnInvalidContent)
|
|
7251
7251
|
throw new Error("[tiptap error]: Invalid JSON content", { cause: s });
|
|
7252
|
-
return console.warn("[tiptap warn]: Invalid content.", "Passed value:", t, "Error:", s),
|
|
7252
|
+
return console.warn("[tiptap warn]: Invalid content.", "Passed value:", t, "Error:", s), Xt("", e, o);
|
|
7253
7253
|
}
|
|
7254
7254
|
if (n) {
|
|
7255
7255
|
if (o.errorOnInvalidContent) {
|
|
@@ -7272,15 +7272,15 @@ function Gt(t, e, o) {
|
|
|
7272
7272
|
}
|
|
7273
7273
|
})
|
|
7274
7274
|
});
|
|
7275
|
-
if (o.slice ? nt.fromSchema(l).parseSlice(
|
|
7275
|
+
if (o.slice ? nt.fromSchema(l).parseSlice(po(t), o.parseOptions) : nt.fromSchema(l).parse(po(t), o.parseOptions), o.errorOnInvalidContent && r)
|
|
7276
7276
|
throw new Error("[tiptap error]: Invalid HTML content", {
|
|
7277
7277
|
cause: new Error(`Invalid element found: ${i}`)
|
|
7278
7278
|
});
|
|
7279
7279
|
}
|
|
7280
7280
|
const s = nt.fromSchema(e);
|
|
7281
|
-
return o.slice ? s.parseSlice(
|
|
7281
|
+
return o.slice ? s.parseSlice(po(t), o.parseOptions).content : s.parse(po(t), o.parseOptions);
|
|
7282
7282
|
}
|
|
7283
|
-
return
|
|
7283
|
+
return Xt("", e, o);
|
|
7284
7284
|
}
|
|
7285
7285
|
function hd(t, e, o) {
|
|
7286
7286
|
const a = t.steps.length - 1;
|
|
@@ -7320,7 +7320,7 @@ var bd = (t) => !("type" in t), jd = (t, e, o) => ({ tr: a, dispatch: n, editor:
|
|
|
7320
7320
|
};
|
|
7321
7321
|
if (!o.errorOnInvalidContent && !s.options.enableContentCheck && s.options.emitContentError)
|
|
7322
7322
|
try {
|
|
7323
|
-
|
|
7323
|
+
Xt(e, s.schema, {
|
|
7324
7324
|
parseOptions: p,
|
|
7325
7325
|
errorOnInvalidContent: !0
|
|
7326
7326
|
});
|
|
@@ -7328,7 +7328,7 @@ var bd = (t) => !("type" in t), jd = (t, e, o) => ({ tr: a, dispatch: n, editor:
|
|
|
7328
7328
|
l(f);
|
|
7329
7329
|
}
|
|
7330
7330
|
try {
|
|
7331
|
-
i =
|
|
7331
|
+
i = Xt(e, s.schema, {
|
|
7332
7332
|
parseOptions: p,
|
|
7333
7333
|
errorOnInvalidContent: (r = o.errorOnInvalidContent) != null ? r : s.options.enableContentCheck
|
|
7334
7334
|
});
|
|
@@ -7361,7 +7361,7 @@ var bd = (t) => !("type" in t), jd = (t, e, o) => ({ tr: a, dispatch: n, editor:
|
|
|
7361
7361
|
o.updateSelection && hd(a, a.steps.length - 1, -1), o.applyInputRules && a.setMeta("applyInputRules", { from: c, text: u }), o.applyPasteRules && a.setMeta("applyPasteRules", { from: c, text: u });
|
|
7362
7362
|
}
|
|
7363
7363
|
return !0;
|
|
7364
|
-
}, vd = () => ({ state: t, dispatch: e }) => Rc(t, e), kd = () => ({ state: t, dispatch: e }) => $c(t, e), yd = () => ({ state: t, dispatch: e }) => zi(t, e), _d = () => ({ state: t, dispatch: e }) =>
|
|
7364
|
+
}, vd = () => ({ state: t, dispatch: e }) => Rc(t, e), kd = () => ({ state: t, dispatch: e }) => $c(t, e), yd = () => ({ state: t, dispatch: e }) => zi(t, e), _d = () => ({ state: t, dispatch: e }) => Ni(t, e), wd = () => ({ state: t, dispatch: e, tr: o }) => {
|
|
7365
7365
|
try {
|
|
7366
7366
|
const a = Da(t.doc, t.selection.$from.pos, -1);
|
|
7367
7367
|
return a == null ? !1 : (o.join(a, 2), e && e(o), !0);
|
|
@@ -7379,7 +7379,7 @@ var bd = (t) => !("type" in t), jd = (t, e, o) => ({ tr: a, dispatch: n, editor:
|
|
|
7379
7379
|
function wl() {
|
|
7380
7380
|
return typeof navigator < "u" ? /Mac/.test(navigator.platform) : !1;
|
|
7381
7381
|
}
|
|
7382
|
-
function
|
|
7382
|
+
function Fd(t) {
|
|
7383
7383
|
const e = t.split(/-(?!$)/);
|
|
7384
7384
|
let o = e[e.length - 1];
|
|
7385
7385
|
o === "Space" && (o = " ");
|
|
@@ -7401,8 +7401,8 @@ function xd(t) {
|
|
|
7401
7401
|
}
|
|
7402
7402
|
return a && (o = `Alt-${o}`), n && (o = `Ctrl-${o}`), r && (o = `Meta-${o}`), s && (o = `Shift-${o}`), o;
|
|
7403
7403
|
}
|
|
7404
|
-
var
|
|
7405
|
-
const s =
|
|
7404
|
+
var xd = (t) => ({ editor: e, view: o, tr: a, dispatch: n }) => {
|
|
7405
|
+
const s = Fd(t).split(/-(?!$)/), r = s.find((p) => !["Alt", "Ctrl", "Meta", "Shift"].includes(p)), i = new KeyboardEvent("keydown", {
|
|
7406
7406
|
key: r === "Space" ? " " : r,
|
|
7407
7407
|
altKey: s.includes("Alt"),
|
|
7408
7408
|
ctrlKey: s.includes("Ctrl"),
|
|
@@ -7433,14 +7433,14 @@ function Ue(t, e, o = {}) {
|
|
|
7433
7433
|
const l = n - a, p = i.filter((c) => r ? r.name === c.node.type.name : !0).filter((c) => Ko(c.node.attrs, o, { strict: !1 }));
|
|
7434
7434
|
return s ? !!p.length : p.reduce((c, m) => c + m.to - m.from, 0) >= l;
|
|
7435
7435
|
}
|
|
7436
|
-
var
|
|
7436
|
+
var Ed = (t, e = {}) => ({ state: o, dispatch: a }) => {
|
|
7437
7437
|
const n = Y(t, o.schema);
|
|
7438
|
-
return Ue(o, n, e) ?
|
|
7438
|
+
return Ue(o, n, e) ? Bc(o, a) : !1;
|
|
7439
7439
|
}, Ad = () => ({ state: t, dispatch: e }) => qi(t, e), Sd = (t) => ({ state: e, dispatch: o }) => {
|
|
7440
7440
|
const a = Y(t, e.schema);
|
|
7441
7441
|
return Xc(a)(e, o);
|
|
7442
7442
|
}, Md = () => ({ state: t, dispatch: e }) => Hi(t, e);
|
|
7443
|
-
function
|
|
7443
|
+
function Ea(t, e) {
|
|
7444
7444
|
return e.nodes[t] ? "node" : e.marks[t] ? "mark" : null;
|
|
7445
7445
|
}
|
|
7446
7446
|
function gr(t, e) {
|
|
@@ -7449,7 +7449,7 @@ function gr(t, e) {
|
|
|
7449
7449
|
}
|
|
7450
7450
|
var Td = (t, e) => ({ tr: o, state: a, dispatch: n }) => {
|
|
7451
7451
|
let s = null, r = null;
|
|
7452
|
-
const i =
|
|
7452
|
+
const i = Ea(
|
|
7453
7453
|
typeof t == "string" ? t : t.name,
|
|
7454
7454
|
a.schema
|
|
7455
7455
|
);
|
|
@@ -7470,9 +7470,9 @@ var Td = (t, e) => ({ tr: o, state: a, dispatch: n }) => {
|
|
|
7470
7470
|
t.setSelection(o);
|
|
7471
7471
|
}
|
|
7472
7472
|
return !0;
|
|
7473
|
-
}, Rd = () => ({ state: t, dispatch: e }) => $i(t, e), $d = () => ({ state: t, dispatch: e }) =>
|
|
7473
|
+
}, Rd = () => ({ state: t, dispatch: e }) => $i(t, e), $d = () => ({ state: t, dispatch: e }) => Oi(t, e), Bd = () => ({ state: t, dispatch: e }) => Pc(t, e), Nd = () => ({ state: t, dispatch: e }) => Kc(t, e), Od = () => ({ state: t, dispatch: e }) => Wc(t, e);
|
|
7474
7474
|
function Hd(t, e, o = {}, a = {}) {
|
|
7475
|
-
return
|
|
7475
|
+
return Xt(t, e, {
|
|
7476
7476
|
slice: !1,
|
|
7477
7477
|
parseOptions: o,
|
|
7478
7478
|
errorOnInvalidContent: a.errorOnInvalidContent
|
|
@@ -7560,7 +7560,7 @@ function qd(t) {
|
|
|
7560
7560
|
function Te(t, e = void 0, ...o) {
|
|
7561
7561
|
return qd(t) ? e ? t.bind(e)(...o) : t(...o) : t;
|
|
7562
7562
|
}
|
|
7563
|
-
function
|
|
7563
|
+
function Fl(t) {
|
|
7564
7564
|
const e = t.filter((n) => n.type === "extension"), o = t.filter((n) => n.type === "node"), a = t.filter((n) => n.type === "mark");
|
|
7565
7565
|
return {
|
|
7566
7566
|
baseExtensions: e,
|
|
@@ -7632,7 +7632,7 @@ function Ud(t, e) {
|
|
|
7632
7632
|
return r ? { ...r.attrs } : {};
|
|
7633
7633
|
}
|
|
7634
7634
|
function Jd(t, e) {
|
|
7635
|
-
const o =
|
|
7635
|
+
const o = Ea(
|
|
7636
7636
|
typeof e == "string" ? e : e.name,
|
|
7637
7637
|
t.schema
|
|
7638
7638
|
);
|
|
@@ -7705,7 +7705,7 @@ var Yd = (t, e, o, a = 20) => {
|
|
|
7705
7705
|
}
|
|
7706
7706
|
return [r, s];
|
|
7707
7707
|
};
|
|
7708
|
-
function
|
|
7708
|
+
function Fo(t, e, o) {
|
|
7709
7709
|
return Object.fromEntries(
|
|
7710
7710
|
Object.entries(o).filter(([a]) => {
|
|
7711
7711
|
const n = t.find((s) => s.type === e && s.name === a);
|
|
@@ -7722,6 +7722,8 @@ function yn(t, e, o = {}) {
|
|
|
7722
7722
|
if (n.forEach(({ $from: c, $to: m }) => {
|
|
7723
7723
|
const d = c.pos, g = m.pos;
|
|
7724
7724
|
t.doc.nodesBetween(d, g, (u, f) => {
|
|
7725
|
+
if (s && u.inlineContent && !u.type.allowsMarkType(s))
|
|
7726
|
+
return !1;
|
|
7725
7727
|
if (!u.isText && !u.marks.length)
|
|
7726
7728
|
return;
|
|
7727
7729
|
const h = Math.max(d, f), b = Math.min(g, f + u.nodeSize), j = b - h;
|
|
@@ -7741,7 +7743,7 @@ function yn(t, e, o = {}) {
|
|
|
7741
7743
|
function Qd(t, e, o = {}) {
|
|
7742
7744
|
if (!e)
|
|
7743
7745
|
return Ue(t, null, o) || yn(t, null, o);
|
|
7744
|
-
const a =
|
|
7746
|
+
const a = Ea(e, t.schema);
|
|
7745
7747
|
return a === "node" ? Ue(t, e, o) : a === "mark" ? yn(t, e, o) : !1;
|
|
7746
7748
|
}
|
|
7747
7749
|
var Zd = (t, e) => {
|
|
@@ -7759,7 +7761,7 @@ var Zd = (t, e) => {
|
|
|
7759
7761
|
return !(e.parentOffset > 0 || e.pos !== o.pos);
|
|
7760
7762
|
};
|
|
7761
7763
|
function ur(t, e) {
|
|
7762
|
-
const { nodeExtensions: o } =
|
|
7764
|
+
const { nodeExtensions: o } = Fl(e), a = o.find((r) => r.name === t);
|
|
7763
7765
|
if (!a)
|
|
7764
7766
|
return !1;
|
|
7765
7767
|
const n = {
|
|
@@ -7769,7 +7771,7 @@ function ur(t, e) {
|
|
|
7769
7771
|
}, s = Te(Ct(a, "group", n));
|
|
7770
7772
|
return typeof s != "string" ? !1 : s.split(" ").includes("list");
|
|
7771
7773
|
}
|
|
7772
|
-
function
|
|
7774
|
+
function xl(t, {
|
|
7773
7775
|
checkChildren: e = !0,
|
|
7774
7776
|
ignoreWhitespace: o = !1
|
|
7775
7777
|
} = {}) {
|
|
@@ -7789,13 +7791,13 @@ function El(t, {
|
|
|
7789
7791
|
if (e) {
|
|
7790
7792
|
let n = !0;
|
|
7791
7793
|
return t.content.forEach((s) => {
|
|
7792
|
-
n !== !1 && (
|
|
7794
|
+
n !== !1 && (xl(s, { ignoreWhitespace: o, checkChildren: e }) || (n = !1));
|
|
7793
7795
|
}), n;
|
|
7794
7796
|
}
|
|
7795
7797
|
return !1;
|
|
7796
7798
|
}
|
|
7797
7799
|
function tg(t) {
|
|
7798
|
-
return t instanceof
|
|
7800
|
+
return t instanceof F;
|
|
7799
7801
|
}
|
|
7800
7802
|
function og(t, e, o) {
|
|
7801
7803
|
var a;
|
|
@@ -7854,7 +7856,7 @@ var ag = (t, e = {}) => ({ tr: o, state: a, dispatch: n }) => {
|
|
|
7854
7856
|
return o.selection.$anchor.sameParent(o.selection.$head) && (r = o.selection.$anchor.parent.attrs), s.isTextblock ? n().command(({ commands: i }) => Xs(s, { ...r, ...e })(o) ? !0 : i.clearNodes()).command(({ state: i }) => Xs(s, { ...r, ...e })(i, a)).run() : (console.warn('[tiptap warn]: Currently "setNode()" only supports text block nodes.'), !1);
|
|
7855
7857
|
}, rg = (t) => ({ tr: e, dispatch: o }) => {
|
|
7856
7858
|
if (o) {
|
|
7857
|
-
const { doc: a } = e, n = et(t, 0, a.content.size), s =
|
|
7859
|
+
const { doc: a } = e, n = et(t, 0, a.content.size), s = F.create(a, n);
|
|
7858
7860
|
e.setSelection(s);
|
|
7859
7861
|
}
|
|
7860
7862
|
return !0;
|
|
@@ -7869,7 +7871,7 @@ var ag = (t, e = {}) => ({ tr: o, state: a, dispatch: n }) => {
|
|
|
7869
7871
|
}), !0;
|
|
7870
7872
|
}, lg = (t) => ({ tr: e, dispatch: o }) => {
|
|
7871
7873
|
if (o) {
|
|
7872
|
-
const { doc: a } = e, { from: n, to: s } = typeof t == "number" ? { from: t, to: t } : t, r =
|
|
7874
|
+
const { doc: a } = e, { from: n, to: s } = typeof t == "number" ? { from: t, to: t } : t, r = x.atStart(a).from, i = x.atEnd(a).to, l = et(n, r, i), p = et(s, r, i), c = x.create(a, l, p);
|
|
7873
7875
|
e.setSelection(c);
|
|
7874
7876
|
}
|
|
7875
7877
|
return !0;
|
|
@@ -7885,8 +7887,8 @@ function fr(t, e) {
|
|
|
7885
7887
|
}
|
|
7886
7888
|
}
|
|
7887
7889
|
var cg = ({ keepMarks: t = !0 } = {}) => ({ tr: e, state: o, dispatch: a, editor: n }) => {
|
|
7888
|
-
const { selection: s, doc: r } = e, { $from: i, $to: l } = s, p = n.extensionManager.attributes, c =
|
|
7889
|
-
if (s instanceof
|
|
7890
|
+
const { selection: s, doc: r } = e, { $from: i, $to: l } = s, p = n.extensionManager.attributes, c = Fo(p, i.node().type.name, i.node().attrs);
|
|
7891
|
+
if (s instanceof F && s.node.isBlock)
|
|
7890
7892
|
return !i.parentOffset || !Me(r, i.pos) ? !1 : (a && (t && fr(o, n.extensionManager.splittableMarks), e.split(i.pos).scrollIntoView()), !0);
|
|
7891
7893
|
if (!i.parent.isBlock)
|
|
7892
7894
|
return !1;
|
|
@@ -7903,7 +7905,7 @@ var cg = ({ keepMarks: t = !0 } = {}) => ({ tr: e, state: o, dispatch: a, editor
|
|
|
7903
7905
|
attrs: c
|
|
7904
7906
|
}
|
|
7905
7907
|
] : void 0), a) {
|
|
7906
|
-
if (u && (s instanceof
|
|
7908
|
+
if (u && (s instanceof x && e.deleteSelection(), e.split(e.mapping.map(i.pos), 1, g), d && !m && !i.parentOffset && i.parent.type !== d)) {
|
|
7907
7909
|
const f = e.mapping.map(i.before()), h = e.doc.resolve(f);
|
|
7908
7910
|
i.node(-1).canReplaceWith(h.index(), h.index() + 1, d) && e.setNodeMarkup(e.mapping.map(i.before()), d);
|
|
7909
7911
|
}
|
|
@@ -7931,26 +7933,26 @@ var cg = ({ keepMarks: t = !0 } = {}) => ({ tr: e, state: o, dispatch: a, editor
|
|
|
7931
7933
|
// eslint-disable-next-line no-nested-ternary
|
|
7932
7934
|
l.indexAfter(-1) < l.node(-2).childCount ? 1 : l.indexAfter(-2) < l.node(-3).childCount ? 2 : 3
|
|
7933
7935
|
), I = {
|
|
7934
|
-
...
|
|
7936
|
+
...Fo(d, l.node().type.name, l.node().attrs),
|
|
7935
7937
|
...e
|
|
7936
7938
|
}, w = ((r = i.contentMatch.defaultType) == null ? void 0 : r.createAndFill(I)) || void 0;
|
|
7937
7939
|
b = b.append(v.from(i.createAndFill(null, w) || void 0));
|
|
7938
|
-
const
|
|
7939
|
-
o.replace(
|
|
7940
|
+
const E = l.before(l.depth - (j - 1));
|
|
7941
|
+
o.replace(E, l.after(-y), new _(b, 4 - j, 0));
|
|
7940
7942
|
let D = -1;
|
|
7941
|
-
o.doc.nodesBetween(
|
|
7943
|
+
o.doc.nodesBetween(E, o.doc.content.size, (C, L) => {
|
|
7942
7944
|
if (D > -1)
|
|
7943
7945
|
return !1;
|
|
7944
7946
|
C.isTextblock && C.content.size === 0 && (D = L + 1);
|
|
7945
|
-
}), D > -1 && o.setSelection(
|
|
7947
|
+
}), D > -1 && o.setSelection(x.near(o.doc.resolve(D))), o.scrollIntoView();
|
|
7946
7948
|
}
|
|
7947
7949
|
return !0;
|
|
7948
7950
|
}
|
|
7949
7951
|
const g = p.pos === l.end() ? m.contentMatchAt(0).defaultType : null, u = {
|
|
7950
|
-
...
|
|
7952
|
+
...Fo(d, m.type.name, m.attrs),
|
|
7951
7953
|
...e
|
|
7952
7954
|
}, f = {
|
|
7953
|
-
...
|
|
7955
|
+
...Fo(d, l.node().type.name, l.node().attrs),
|
|
7954
7956
|
...e
|
|
7955
7957
|
};
|
|
7956
7958
|
o.delete(l.pos, p.pos);
|
|
@@ -7964,7 +7966,7 @@ var cg = ({ keepMarks: t = !0 } = {}) => ({ tr: e, state: o, dispatch: a, editor
|
|
|
7964
7966
|
const { selection: b, storedMarks: j } = a, { splittableMarks: y } = s.extensionManager, I = j || b.$to.parentOffset && b.$from.marks();
|
|
7965
7967
|
if (o.split(l.pos, 2, h).scrollIntoView(), !I || !n)
|
|
7966
7968
|
return !0;
|
|
7967
|
-
const w = I.filter((
|
|
7969
|
+
const w = I.filter((E) => y.includes(E.type.name));
|
|
7968
7970
|
o.ensureMarks(w);
|
|
7969
7971
|
}
|
|
7970
7972
|
return !0;
|
|
@@ -7990,7 +7992,7 @@ var cg = ({ keepMarks: t = !0 } = {}) => ({ tr: e, state: o, dispatch: a, editor
|
|
|
7990
7992
|
const { extensions: m, splittableMarks: d } = n.extensionManager, g = Y(t, r.schema), u = Y(e, r.schema), { selection: f, storedMarks: h } = r, { $from: b, $to: j } = f, y = b.blockRange(j), I = h || f.$to.parentOffset && f.$from.marks();
|
|
7991
7993
|
if (!y)
|
|
7992
7994
|
return !1;
|
|
7993
|
-
const w = ut((
|
|
7995
|
+
const w = ut((E) => ur(E.type.name, m))(f);
|
|
7994
7996
|
if (y.depth >= 1 && w && y.depth - w.depth <= 1) {
|
|
7995
7997
|
if (w.node.type === g)
|
|
7996
7998
|
return p.liftListItem(u);
|
|
@@ -7998,8 +8000,8 @@ var cg = ({ keepMarks: t = !0 } = {}) => ({ tr: e, state: o, dispatch: a, editor
|
|
|
7998
8000
|
return l().command(() => (s.setNodeMarkup(w.pos, g), !0)).command(() => Ua(s, g)).command(() => Ja(s, g)).run();
|
|
7999
8001
|
}
|
|
8000
8002
|
return !o || !I || !i ? l().command(() => c().wrapInList(g, a) ? !0 : p.clearNodes()).wrapInList(g, a).command(() => Ua(s, g)).command(() => Ja(s, g)).run() : l().command(() => {
|
|
8001
|
-
const
|
|
8002
|
-
return s.ensureMarks(D),
|
|
8003
|
+
const E = c().wrapInList(g, a), D = I.filter((C) => d.includes(C.type.name));
|
|
8004
|
+
return s.ensureMarks(D), E ? !0 : p.clearNodes();
|
|
8003
8005
|
}).wrapInList(g, a).command(() => Ua(s, g)).command(() => Ja(s, g)).run();
|
|
8004
8006
|
}, gg = (t, e = {}, o = {}) => ({ state: a, commands: n }) => {
|
|
8005
8007
|
const { extendEmptyMarkRange: s = !1 } = o, r = Ye(t, a.schema);
|
|
@@ -8061,7 +8063,7 @@ var cg = ({ keepMarks: t = !0 } = {}) => ({ tr: e, state: o, dispatch: a, editor
|
|
|
8061
8063
|
}), !0;
|
|
8062
8064
|
}, kg = (t, e = {}) => ({ tr: o, state: a, dispatch: n }) => {
|
|
8063
8065
|
let s = null, r = null;
|
|
8064
|
-
const i =
|
|
8066
|
+
const i = Ea(
|
|
8065
8067
|
typeof t == "string" ? t : t.name,
|
|
8066
8068
|
a.schema
|
|
8067
8069
|
);
|
|
@@ -8111,7 +8113,7 @@ var cg = ({ keepMarks: t = !0 } = {}) => ({ tr: e, state: o, dispatch: a, editor
|
|
|
8111
8113
|
}, _g = (t, e = {}) => ({ state: o, dispatch: a }) => {
|
|
8112
8114
|
const n = Y(t, o.schema);
|
|
8113
8115
|
return Uc(n, e)(o, a);
|
|
8114
|
-
},
|
|
8116
|
+
}, ao = class {
|
|
8115
8117
|
constructor(t) {
|
|
8116
8118
|
var e;
|
|
8117
8119
|
this.find = t.find, this.handler = t.handler, this.undoable = (e = t.undoable) != null ? e : !0;
|
|
@@ -8120,13 +8122,13 @@ var cg = ({ keepMarks: t = !0 } = {}) => ({ tr: e, state: o, dispatch: a, editor
|
|
|
8120
8122
|
function wg(t) {
|
|
8121
8123
|
return Object.prototype.toString.call(t).slice(8, -1);
|
|
8122
8124
|
}
|
|
8123
|
-
function
|
|
8125
|
+
function co(t) {
|
|
8124
8126
|
return wg(t) !== "Object" ? !1 : t.constructor === Object && Object.getPrototypeOf(t) === Object.prototype;
|
|
8125
8127
|
}
|
|
8126
|
-
function
|
|
8128
|
+
function El(t, e) {
|
|
8127
8129
|
const o = { ...t };
|
|
8128
|
-
return
|
|
8129
|
-
|
|
8130
|
+
return co(t) && co(e) && Object.keys(e).forEach((a) => {
|
|
8131
|
+
co(e[a]) && co(t[a]) ? o[a] = El(t[a], e[a]) : o[a] = e[a];
|
|
8130
8132
|
}), o;
|
|
8131
8133
|
}
|
|
8132
8134
|
var ms = class {
|
|
@@ -8160,7 +8162,7 @@ var ms = class {
|
|
|
8160
8162
|
configure(t = {}) {
|
|
8161
8163
|
const e = this.extend({
|
|
8162
8164
|
...this.config,
|
|
8163
|
-
addOptions: () =>
|
|
8165
|
+
addOptions: () => El(this.options, t)
|
|
8164
8166
|
});
|
|
8165
8167
|
return e.name = this.name, e.parent = this.parent, e;
|
|
8166
8168
|
}
|
|
@@ -8206,9 +8208,9 @@ var ms = class {
|
|
|
8206
8208
|
ss(Dg, {
|
|
8207
8209
|
ClipboardTextSerializer: () => Ig,
|
|
8208
8210
|
Commands: () => Cg,
|
|
8209
|
-
Delete: () =>
|
|
8210
|
-
Drop: () =>
|
|
8211
|
-
Editable: () =>
|
|
8211
|
+
Delete: () => Fg,
|
|
8212
|
+
Drop: () => xg,
|
|
8213
|
+
Editable: () => Eg,
|
|
8212
8214
|
FocusEvents: () => Ag,
|
|
8213
8215
|
Keymap: () => Sg,
|
|
8214
8216
|
Paste: () => Mg,
|
|
@@ -8265,7 +8267,7 @@ var Z = class Ml extends ms {
|
|
|
8265
8267
|
...vl
|
|
8266
8268
|
};
|
|
8267
8269
|
}
|
|
8268
|
-
}),
|
|
8270
|
+
}), Fg = Z.create({
|
|
8269
8271
|
name: "delete",
|
|
8270
8272
|
onUpdate({ transaction: t, appendedTransactions: e }) {
|
|
8271
8273
|
var o, a, n;
|
|
@@ -8297,7 +8299,7 @@ var Z = class Ml extends ms {
|
|
|
8297
8299
|
c.steps.forEach((d, g) => {
|
|
8298
8300
|
var u, f;
|
|
8299
8301
|
if (d instanceof ke) {
|
|
8300
|
-
const h = m.slice(g).map(d.from, -1), b = m.slice(g).map(d.to), j = m.invert().map(h, -1), y = m.invert().map(b), I = (u = c.doc.nodeAt(h - 1)) == null ? void 0 : u.marks.some((
|
|
8302
|
+
const h = m.slice(g).map(d.from, -1), b = m.slice(g).map(d.to), j = m.invert().map(h, -1), y = m.invert().map(b), I = (u = c.doc.nodeAt(h - 1)) == null ? void 0 : u.marks.some((E) => E.eq(d.mark)), w = (f = c.doc.nodeAt(b)) == null ? void 0 : f.marks.some((E) => E.eq(d.mark));
|
|
8301
8303
|
this.editor.emit("delete", {
|
|
8302
8304
|
type: "mark",
|
|
8303
8305
|
mark: d.mark,
|
|
@@ -8321,7 +8323,7 @@ var Z = class Ml extends ms {
|
|
|
8321
8323
|
};
|
|
8322
8324
|
(n = (a = (o = this.editor.options.coreExtensionOptions) == null ? void 0 : o.delete) == null ? void 0 : a.async) == null || n ? setTimeout(s, 0) : s();
|
|
8323
8325
|
}
|
|
8324
|
-
}),
|
|
8326
|
+
}), xg = Z.create({
|
|
8325
8327
|
name: "drop",
|
|
8326
8328
|
addProseMirrorPlugins() {
|
|
8327
8329
|
return [
|
|
@@ -8340,7 +8342,7 @@ var Z = class Ml extends ms {
|
|
|
8340
8342
|
})
|
|
8341
8343
|
];
|
|
8342
8344
|
}
|
|
8343
|
-
}),
|
|
8345
|
+
}), Eg = Z.create({
|
|
8344
8346
|
name: "editable",
|
|
8345
8347
|
addProseMirrorPlugins() {
|
|
8346
8348
|
return [
|
|
@@ -8439,7 +8441,7 @@ var Z = class Ml extends ms {
|
|
|
8439
8441
|
if (!a || n)
|
|
8440
8442
|
return;
|
|
8441
8443
|
const { empty: s, from: r, to: i } = e.selection, l = A.atStart(e.doc).from, p = A.atEnd(e.doc).to;
|
|
8442
|
-
if (s || !(r === l && i === p) || !
|
|
8444
|
+
if (s || !(r === l && i === p) || !xl(o.doc))
|
|
8443
8445
|
return;
|
|
8444
8446
|
const c = o.tr, m = jl({
|
|
8445
8447
|
state: o,
|
|
@@ -8494,7 +8496,7 @@ var Z = class Ml extends ms {
|
|
|
8494
8496
|
addGlobalAttributes() {
|
|
8495
8497
|
if (!this.options.direction)
|
|
8496
8498
|
return [];
|
|
8497
|
-
const { nodeExtensions: t } =
|
|
8499
|
+
const { nodeExtensions: t } = Fl(this.extensions);
|
|
8498
8500
|
return [
|
|
8499
8501
|
{
|
|
8500
8502
|
types: t.filter((e) => e.name !== "text").map((e) => e.name),
|
|
@@ -8530,7 +8532,7 @@ var Z = class Ml extends ms {
|
|
|
8530
8532
|
}
|
|
8531
8533
|
});
|
|
8532
8534
|
function pt(t) {
|
|
8533
|
-
return new
|
|
8535
|
+
return new ao({
|
|
8534
8536
|
find: t.find,
|
|
8535
8537
|
handler: ({ state: e, range: o, match: a }) => {
|
|
8536
8538
|
const n = Te(t.getAttributes, void 0, a);
|
|
@@ -8550,7 +8552,7 @@ function pt(t) {
|
|
|
8550
8552
|
});
|
|
8551
8553
|
}
|
|
8552
8554
|
function ds(t) {
|
|
8553
|
-
return new
|
|
8555
|
+
return new ao({
|
|
8554
8556
|
find: t.find,
|
|
8555
8557
|
handler: ({ state: e, range: o, match: a }) => {
|
|
8556
8558
|
const n = Te(t.getAttributes, void 0, a) || {}, { tr: s } = e, r = o.from;
|
|
@@ -8572,7 +8574,7 @@ function ds(t) {
|
|
|
8572
8574
|
});
|
|
8573
8575
|
}
|
|
8574
8576
|
function _n(t) {
|
|
8575
|
-
return new
|
|
8577
|
+
return new ao({
|
|
8576
8578
|
find: t.find,
|
|
8577
8579
|
handler: ({ state: e, range: o, match: a }) => {
|
|
8578
8580
|
const n = e.doc.resolve(o.from), s = Te(t.getAttributes, void 0, a) || {};
|
|
@@ -8583,8 +8585,8 @@ function _n(t) {
|
|
|
8583
8585
|
undoable: t.undoable
|
|
8584
8586
|
});
|
|
8585
8587
|
}
|
|
8586
|
-
function
|
|
8587
|
-
return new
|
|
8588
|
+
function Ft(t) {
|
|
8589
|
+
return new ao({
|
|
8588
8590
|
find: t.find,
|
|
8589
8591
|
handler: ({ state: e, range: o, match: a, chain: n }) => {
|
|
8590
8592
|
const s = Te(t.getAttributes, void 0, a) || {}, r = e.tr.delete(o.from, o.to), i = r.doc.resolve(o.from).blockRange(), l = i && qn(i, t.type, s);
|
|
@@ -8876,7 +8878,7 @@ var zg = (t) => "touches" in t, Rg = class {
|
|
|
8876
8878
|
};
|
|
8877
8879
|
function $g(t, e) {
|
|
8878
8880
|
const { selection: o } = t, { $from: a } = o;
|
|
8879
|
-
if (o instanceof
|
|
8881
|
+
if (o instanceof F) {
|
|
8880
8882
|
const s = a.index();
|
|
8881
8883
|
return a.parent.canReplaceWith(s, s + 1, e);
|
|
8882
8884
|
}
|
|
@@ -8892,9 +8894,9 @@ function $g(t, e) {
|
|
|
8892
8894
|
function Ll(t) {
|
|
8893
8895
|
return t.replace(/[-/\\^$*+?.()|[\]{}]/g, "\\$&");
|
|
8894
8896
|
}
|
|
8895
|
-
var
|
|
8896
|
-
ss(
|
|
8897
|
-
createAtomBlockMarkdownSpec: () =>
|
|
8897
|
+
var Bg = {};
|
|
8898
|
+
ss(Bg, {
|
|
8899
|
+
createAtomBlockMarkdownSpec: () => Ng,
|
|
8898
8900
|
createBlockMarkdownSpec: () => Aa,
|
|
8899
8901
|
createInlineMarkdownSpec: () => Pg,
|
|
8900
8902
|
parseAttributes: () => gs,
|
|
@@ -8931,7 +8933,7 @@ function us(t) {
|
|
|
8931
8933
|
o === "class" || o === "id" || (a === !0 ? e.push(o) : a !== !1 && a != null && e.push(`${o}="${String(a)}"`));
|
|
8932
8934
|
}), e.join(" ");
|
|
8933
8935
|
}
|
|
8934
|
-
function
|
|
8936
|
+
function Ng(t) {
|
|
8935
8937
|
const {
|
|
8936
8938
|
nodeName: e,
|
|
8937
8939
|
name: o,
|
|
@@ -9024,7 +9026,7 @@ function Aa(t) {
|
|
|
9024
9026
|
const [b, j = ""] = h, y = n(j);
|
|
9025
9027
|
let I = 1;
|
|
9026
9028
|
const w = b.length;
|
|
9027
|
-
let
|
|
9029
|
+
let E = "";
|
|
9028
9030
|
const D = /^:::([\w-]*)(\s.*)?/gm, C = m.slice(w);
|
|
9029
9031
|
for (D.lastIndex = 0; ; ) {
|
|
9030
9032
|
const L = D.exec(C);
|
|
@@ -9035,13 +9037,13 @@ function Aa(t) {
|
|
|
9035
9037
|
if (M)
|
|
9036
9038
|
I += 1;
|
|
9037
9039
|
else if (I -= 1, I === 0) {
|
|
9038
|
-
const
|
|
9039
|
-
|
|
9040
|
+
const B = C.slice(0, $);
|
|
9041
|
+
E = B.trim();
|
|
9040
9042
|
const H = m.slice(0, w + $ + L[0].length);
|
|
9041
9043
|
let P = [];
|
|
9042
|
-
if (
|
|
9044
|
+
if (E)
|
|
9043
9045
|
if (i === "block")
|
|
9044
|
-
for (P = g.blockTokens(
|
|
9046
|
+
for (P = g.blockTokens(B), P.forEach((R) => {
|
|
9045
9047
|
R.text && (!R.tokens || R.tokens.length === 0) && (R.tokens = g.inlineTokens(R.text));
|
|
9046
9048
|
}); P.length > 0; ) {
|
|
9047
9049
|
const R = P[P.length - 1];
|
|
@@ -9051,12 +9053,12 @@ function Aa(t) {
|
|
|
9051
9053
|
break;
|
|
9052
9054
|
}
|
|
9053
9055
|
else
|
|
9054
|
-
P = g.inlineTokens(
|
|
9056
|
+
P = g.inlineTokens(E);
|
|
9055
9057
|
return {
|
|
9056
9058
|
type: e,
|
|
9057
9059
|
raw: H,
|
|
9058
9060
|
attributes: y,
|
|
9059
|
-
content:
|
|
9061
|
+
content: E,
|
|
9060
9062
|
tokens: P
|
|
9061
9063
|
};
|
|
9062
9064
|
}
|
|
@@ -9076,7 +9078,7 @@ ${h}
|
|
|
9076
9078
|
}
|
|
9077
9079
|
};
|
|
9078
9080
|
}
|
|
9079
|
-
function
|
|
9081
|
+
function Og(t) {
|
|
9080
9082
|
if (!t.trim())
|
|
9081
9083
|
return {};
|
|
9082
9084
|
const e = {}, o = /(\w+)=(?:"([^"]*)"|'([^']*)')/g;
|
|
@@ -9095,7 +9097,7 @@ function Pg(t) {
|
|
|
9095
9097
|
nodeName: e,
|
|
9096
9098
|
name: o,
|
|
9097
9099
|
getContent: a,
|
|
9098
|
-
parseAttributes: n =
|
|
9100
|
+
parseAttributes: n = Og,
|
|
9099
9101
|
serializeAttributes: s = Hg,
|
|
9100
9102
|
defaultAttributes: r = {},
|
|
9101
9103
|
selfClosing: i = !1,
|
|
@@ -9183,10 +9185,10 @@ function wn(t, e, o) {
|
|
|
9183
9185
|
for (c += 1; c < i.length; ) {
|
|
9184
9186
|
const w = i[c];
|
|
9185
9187
|
if (w.trim() === "") {
|
|
9186
|
-
const
|
|
9187
|
-
if (
|
|
9188
|
+
const E = i.slice(c + 1).findIndex((D) => D.trim() !== "");
|
|
9189
|
+
if (E === -1)
|
|
9188
9190
|
break;
|
|
9189
|
-
if ((((n = (a = i[c + 1 +
|
|
9191
|
+
if ((((n = (a = i[c + 1 + E].match(/^(\s*)/)) == null ? void 0 : a[1]) == null ? void 0 : n.length) || 0) > f) {
|
|
9190
9192
|
b.push(w), p = `${p}${w}
|
|
9191
9193
|
`, c += 1;
|
|
9192
9194
|
continue;
|
|
@@ -9202,7 +9204,7 @@ function wn(t, e, o) {
|
|
|
9202
9204
|
let j;
|
|
9203
9205
|
const y = b.slice(1);
|
|
9204
9206
|
if (y.length > 0) {
|
|
9205
|
-
const w = y.map((
|
|
9207
|
+
const w = y.map((E) => E.slice(f + m)).join(`
|
|
9206
9208
|
`);
|
|
9207
9209
|
w.trim() && (e.customNestedParser ? j = e.customNestedParser(w) : j = o.blockTokens(w));
|
|
9208
9210
|
}
|
|
@@ -9312,11 +9314,11 @@ var qg = Object.defineProperty, Wg = (t, e) => {
|
|
|
9312
9314
|
};
|
|
9313
9315
|
},
|
|
9314
9316
|
addInputRules() {
|
|
9315
|
-
let t =
|
|
9317
|
+
let t = Ft({
|
|
9316
9318
|
find: br,
|
|
9317
9319
|
type: this.type
|
|
9318
9320
|
});
|
|
9319
|
-
return (this.options.keepMarks || this.options.keepAttributes) && (t =
|
|
9321
|
+
return (this.options.keepMarks || this.options.keepAttributes) && (t = Ft({
|
|
9320
9322
|
find: br,
|
|
9321
9323
|
type: this.type,
|
|
9322
9324
|
keepMarks: this.options.keepMarks,
|
|
@@ -9397,37 +9399,37 @@ var qg = Object.defineProperty, Wg = (t, e) => {
|
|
|
9397
9399
|
}
|
|
9398
9400
|
}), Vg = {};
|
|
9399
9401
|
Wg(Vg, {
|
|
9400
|
-
findListItemPos: () =>
|
|
9402
|
+
findListItemPos: () => no,
|
|
9401
9403
|
getNextListDepth: () => hs,
|
|
9402
9404
|
handleBackspace: () => Dn,
|
|
9403
9405
|
handleDelete: () => In,
|
|
9404
|
-
hasListBefore: () =>
|
|
9406
|
+
hasListBefore: () => Bl,
|
|
9405
9407
|
hasListItemAfter: () => Ug,
|
|
9406
|
-
hasListItemBefore: () =>
|
|
9407
|
-
listItemHasSubList: () =>
|
|
9408
|
+
hasListItemBefore: () => Nl,
|
|
9409
|
+
listItemHasSubList: () => Ol,
|
|
9408
9410
|
nextListIsDeeper: () => Hl,
|
|
9409
9411
|
nextListIsHigher: () => Pl
|
|
9410
9412
|
});
|
|
9411
|
-
var
|
|
9413
|
+
var no = (t, e) => {
|
|
9412
9414
|
const { $from: o } = e.selection, a = Y(t, e.schema);
|
|
9413
9415
|
let n = null, s = o.depth, r = o.pos, i = null;
|
|
9414
9416
|
for (; s > 0 && i === null; )
|
|
9415
9417
|
n = o.node(s), n.type === a ? i = s : (s -= 1, r -= 1);
|
|
9416
9418
|
return i === null ? null : { $pos: e.doc.resolve(r), depth: i };
|
|
9417
9419
|
}, hs = (t, e) => {
|
|
9418
|
-
const o =
|
|
9420
|
+
const o = no(t, e);
|
|
9419
9421
|
if (!o)
|
|
9420
9422
|
return !1;
|
|
9421
9423
|
const [, a] = Yd(e, t, o.$pos.pos + 4);
|
|
9422
9424
|
return a;
|
|
9423
|
-
},
|
|
9425
|
+
}, Bl = (t, e, o) => {
|
|
9424
9426
|
const { $anchor: a } = t.selection, n = Math.max(0, a.pos - 2), s = t.doc.resolve(n).node();
|
|
9425
9427
|
return !(!s || !o.includes(s.type.name));
|
|
9426
|
-
},
|
|
9428
|
+
}, Nl = (t, e) => {
|
|
9427
9429
|
var o;
|
|
9428
9430
|
const { $anchor: a } = e.selection, n = e.doc.resolve(a.pos - 2);
|
|
9429
9431
|
return !(n.index() === 0 || ((o = n.nodeBefore) == null ? void 0 : o.type.name) !== t);
|
|
9430
|
-
},
|
|
9432
|
+
}, Ol = (t, e, o) => {
|
|
9431
9433
|
if (!o)
|
|
9432
9434
|
return !1;
|
|
9433
9435
|
const a = Y(t, e.schema);
|
|
@@ -9440,7 +9442,7 @@ var ao = (t, e) => {
|
|
|
9440
9442
|
return !0;
|
|
9441
9443
|
if (t.state.selection.from !== t.state.selection.to)
|
|
9442
9444
|
return !1;
|
|
9443
|
-
if (!Ue(t.state, e) &&
|
|
9445
|
+
if (!Ue(t.state, e) && Bl(t.state, e, o)) {
|
|
9444
9446
|
const { $anchor: r } = t.state.selection, i = t.state.doc.resolve(r.before() - 1), l = [];
|
|
9445
9447
|
i.node().descendants((m, d) => {
|
|
9446
9448
|
m.type.name === e && l.push({ node: m, pos: d });
|
|
@@ -9453,16 +9455,16 @@ var ao = (t, e) => {
|
|
|
9453
9455
|
}
|
|
9454
9456
|
if (!Ue(t.state, e) || !eg(t.state))
|
|
9455
9457
|
return !1;
|
|
9456
|
-
const a =
|
|
9458
|
+
const a = no(e, t.state);
|
|
9457
9459
|
if (!a)
|
|
9458
9460
|
return !1;
|
|
9459
|
-
const n = t.state.doc.resolve(a.$pos.pos - 2).node(a.depth), s =
|
|
9460
|
-
return
|
|
9461
|
+
const n = t.state.doc.resolve(a.$pos.pos - 2).node(a.depth), s = Ol(e, t.state, n);
|
|
9462
|
+
return Nl(e, t.state) && !s ? t.commands.joinItemBackward() : t.chain().liftListItem(e).run();
|
|
9461
9463
|
}, Hl = (t, e) => {
|
|
9462
|
-
const o = hs(t, e), a =
|
|
9464
|
+
const o = hs(t, e), a = no(t, e);
|
|
9463
9465
|
return !a || !o ? !1 : o > a.depth;
|
|
9464
9466
|
}, Pl = (t, e) => {
|
|
9465
|
-
const o = hs(t, e), a =
|
|
9467
|
+
const o = hs(t, e), a = no(t, e);
|
|
9466
9468
|
return !a || !o ? !1 : o < a.depth;
|
|
9467
9469
|
}, In = (t, e) => {
|
|
9468
9470
|
if (!Ue(t.state, e) || !Zd(t.state, e))
|
|
@@ -9711,13 +9713,13 @@ var Qg = "listItem", vr = "textStyle", kr = /^(\d+)\.\s$/, Wl = K.create({
|
|
|
9711
9713
|
};
|
|
9712
9714
|
},
|
|
9713
9715
|
addInputRules() {
|
|
9714
|
-
let t =
|
|
9716
|
+
let t = Ft({
|
|
9715
9717
|
find: kr,
|
|
9716
9718
|
type: this.type,
|
|
9717
9719
|
getAttributes: (e) => ({ start: +e[1] }),
|
|
9718
9720
|
joinPredicate: (e, o) => o.childCount + o.attrs.start === +e[1]
|
|
9719
9721
|
});
|
|
9720
|
-
return (this.options.keepMarks || this.options.keepAttributes) && (t =
|
|
9722
|
+
return (this.options.keepMarks || this.options.keepAttributes) && (t = Ft({
|
|
9721
9723
|
find: kr,
|
|
9722
9724
|
type: this.type,
|
|
9723
9725
|
keepMarks: this.options.keepMarks,
|
|
@@ -9854,7 +9856,7 @@ var Qg = "listItem", vr = "textStyle", kr = /^(\d+)\.\s$/, Wl = K.create({
|
|
|
9854
9856
|
},
|
|
9855
9857
|
addInputRules() {
|
|
9856
9858
|
return [
|
|
9857
|
-
|
|
9859
|
+
Ft({
|
|
9858
9860
|
find: Zg,
|
|
9859
9861
|
type: this.type,
|
|
9860
9862
|
getAttributes: (t) => ({
|
|
@@ -10053,7 +10055,7 @@ class ee extends A {
|
|
|
10053
10055
|
for (; ; ) {
|
|
10054
10056
|
let r = o > 0 ? s.firstChild : s.lastChild;
|
|
10055
10057
|
if (!r) {
|
|
10056
|
-
if (s.isAtom && !s.isText && !
|
|
10058
|
+
if (s.isAtom && !s.isText && !F.isSelectable(s)) {
|
|
10057
10059
|
e = e.doc.resolve(n + s.nodeSize * o), a = !1;
|
|
10058
10060
|
continue e;
|
|
10059
10061
|
}
|
|
@@ -10121,16 +10123,16 @@ function au(t) {
|
|
|
10121
10123
|
return !0;
|
|
10122
10124
|
}
|
|
10123
10125
|
bl({
|
|
10124
|
-
ArrowLeft:
|
|
10125
|
-
ArrowRight:
|
|
10126
|
-
ArrowUp:
|
|
10127
|
-
ArrowDown:
|
|
10126
|
+
ArrowLeft: mo("horiz", -1),
|
|
10127
|
+
ArrowRight: mo("horiz", 1),
|
|
10128
|
+
ArrowUp: mo("vert", -1),
|
|
10129
|
+
ArrowDown: mo("vert", 1)
|
|
10128
10130
|
});
|
|
10129
|
-
function
|
|
10131
|
+
function mo(t, e) {
|
|
10130
10132
|
const o = t == "vert" ? e > 0 ? "down" : "up" : e > 0 ? "right" : "left";
|
|
10131
10133
|
return function(a, n, s) {
|
|
10132
10134
|
let r = a.selection, i = e > 0 ? r.$to : r.$from, l = r.empty;
|
|
10133
|
-
if (r instanceof
|
|
10135
|
+
if (r instanceof x) {
|
|
10134
10136
|
if (!s.endOfTextblock(o) || i.depth == 0)
|
|
10135
10137
|
return !1;
|
|
10136
10138
|
l = !1, i = a.doc.resolve(e > 0 ? i.after() : i.before());
|
|
@@ -10353,7 +10355,7 @@ var Uo = (t, e) => e.view.domAtPos(t).node.offsetParent !== null, nu = (t, e, o)
|
|
|
10353
10355
|
);
|
|
10354
10356
|
if (!i.length)
|
|
10355
10357
|
return;
|
|
10356
|
-
const l = i[0], p = (e.selection.from < o.selection.from ? "forward" : "backward") == "forward" ? r.start + l.pos : r.pos + l.pos + l.node.nodeSize, c =
|
|
10358
|
+
const l = i[0], p = (e.selection.from < o.selection.from ? "forward" : "backward") == "forward" ? r.start + l.pos : r.pos + l.pos + l.node.nodeSize, c = x.create(o.doc, p);
|
|
10357
10359
|
return o.tr.setSelection(c);
|
|
10358
10360
|
}
|
|
10359
10361
|
})
|
|
@@ -10424,8 +10426,8 @@ var Uo = (t, e) => e.view.domAtPos(t).node.offsetParent !== null, nu = (t, e, o)
|
|
|
10424
10426
|
return !1;
|
|
10425
10427
|
const { tr: y } = e, I = n.after(-2);
|
|
10426
10428
|
y.replaceWith(I, I, j);
|
|
10427
|
-
const w = y.doc.resolve(I),
|
|
10428
|
-
y.setSelection(
|
|
10429
|
+
const w = y.doc.resolve(I), E = A.near(w, 1);
|
|
10430
|
+
y.setSelection(E);
|
|
10429
10431
|
const D = u, C = u + g.nodeSize;
|
|
10430
10432
|
return y.delete(D, C), y.scrollIntoView(), o.dispatch(y), !0;
|
|
10431
10433
|
}
|
|
@@ -10460,16 +10462,16 @@ var Uo = (t, e) => e.view.domAtPos(t).node.offsetParent !== null, nu = (t, e, o)
|
|
|
10460
10462
|
content: "inline"
|
|
10461
10463
|
})
|
|
10462
10464
|
});
|
|
10463
|
-
let Cn,
|
|
10465
|
+
let Cn, Fn;
|
|
10464
10466
|
if (typeof WeakMap < "u") {
|
|
10465
10467
|
let t = /* @__PURE__ */ new WeakMap();
|
|
10466
|
-
Cn = (e) => t.get(e),
|
|
10468
|
+
Cn = (e) => t.get(e), Fn = (e, o) => (t.set(e, o), o);
|
|
10467
10469
|
} else {
|
|
10468
10470
|
const t = [];
|
|
10469
10471
|
let e = 0;
|
|
10470
10472
|
Cn = (o) => {
|
|
10471
10473
|
for (let a = 0; a < t.length; a += 2) if (t[a] == o) return t[a + 1];
|
|
10472
|
-
},
|
|
10474
|
+
}, Fn = (o, a) => (e == 10 && (e = 0), t[e++] = o, t[e++] = a);
|
|
10473
10475
|
}
|
|
10474
10476
|
var U = class {
|
|
10475
10477
|
constructor(t, e, o, a) {
|
|
@@ -10530,7 +10532,7 @@ var U = class {
|
|
|
10530
10532
|
}
|
|
10531
10533
|
}
|
|
10532
10534
|
static get(t) {
|
|
10533
|
-
return Cn(t) ||
|
|
10535
|
+
return Cn(t) || Fn(t, lu(t));
|
|
10534
10536
|
}
|
|
10535
10537
|
};
|
|
10536
10538
|
function lu(t) {
|
|
@@ -10563,10 +10565,10 @@ function lu(t) {
|
|
|
10563
10565
|
pos: c,
|
|
10564
10566
|
n: h - w
|
|
10565
10567
|
});
|
|
10566
|
-
const
|
|
10567
|
-
if (
|
|
10568
|
+
const E = j && j[w];
|
|
10569
|
+
if (E) {
|
|
10568
10570
|
const D = (I + w) % e * 2, C = r[D];
|
|
10569
|
-
C == null || C !=
|
|
10571
|
+
C == null || C != E && r[D + 1] == 1 ? (r[D] = E, r[D + 1] = 1) : C == E && r[D + 1]++;
|
|
10570
10572
|
}
|
|
10571
10573
|
}
|
|
10572
10574
|
}
|
|
@@ -10646,7 +10648,7 @@ function re(t) {
|
|
|
10646
10648
|
}
|
|
10647
10649
|
return e;
|
|
10648
10650
|
}
|
|
10649
|
-
const
|
|
10651
|
+
const Oe = new Q("selectingCells");
|
|
10650
10652
|
function ct(t) {
|
|
10651
10653
|
for (let e = t.depth - 1; e > 0; e--) if (t.node(e).type.spec.tableRole == "row") return t.node(0).resolve(t.before(e + 1));
|
|
10652
10654
|
return null;
|
|
@@ -10681,7 +10683,7 @@ function gu(t) {
|
|
|
10681
10683
|
if (a == "cell" || a == "header_cell") return t.doc.resolve(o - e.nodeSize);
|
|
10682
10684
|
}
|
|
10683
10685
|
}
|
|
10684
|
-
function
|
|
10686
|
+
function xn(t) {
|
|
10685
10687
|
return t.parent.type.spec.tableRole == "row" && !!t.nodeAfter;
|
|
10686
10688
|
}
|
|
10687
10689
|
function uu(t) {
|
|
@@ -10717,7 +10719,7 @@ function fu(t, e, o) {
|
|
|
10717
10719
|
for (let n = 0; n < t.height; n++) if (e.nodeAt(t.map[o + n * t.width]).type != a) return !1;
|
|
10718
10720
|
return !0;
|
|
10719
10721
|
}
|
|
10720
|
-
var
|
|
10722
|
+
var O = class Ae extends A {
|
|
10721
10723
|
constructor(e, o = e) {
|
|
10722
10724
|
const a = e.node(-1), n = U.get(a), s = e.start(-1), r = n.rectBetween(e.pos - s, o.pos - s), i = e.node(0), l = n.cellsInRect(r).filter((c) => c != o.pos - s);
|
|
10723
10725
|
l.unshift(o.pos - s);
|
|
@@ -10731,11 +10733,11 @@ var B = class Ae extends A {
|
|
|
10731
10733
|
}
|
|
10732
10734
|
map(e, o) {
|
|
10733
10735
|
const a = e.resolve(o.map(this.$anchorCell.pos)), n = e.resolve(o.map(this.$headCell.pos));
|
|
10734
|
-
if (
|
|
10736
|
+
if (xn(a) && xn(n) && js(a, n)) {
|
|
10735
10737
|
const s = this.$anchorCell.node(-1) != a.node(-1);
|
|
10736
10738
|
return s && this.isRowSelection() ? Ae.rowSelection(a, n) : s && this.isColSelection() ? Ae.colSelection(a, n) : new Ae(a, n);
|
|
10737
10739
|
}
|
|
10738
|
-
return
|
|
10740
|
+
return x.between(a, n);
|
|
10739
10741
|
}
|
|
10740
10742
|
content() {
|
|
10741
10743
|
const e = this.$anchorCell.node(-1), o = U.get(e), a = this.$anchorCell.start(-1), n = o.rectBetween(this.$anchorCell.pos - a, this.$headCell.pos - a), s = {}, r = [];
|
|
@@ -10825,8 +10827,8 @@ var B = class Ae extends A {
|
|
|
10825
10827
|
return new hu(this.$anchorCell.pos, this.$headCell.pos);
|
|
10826
10828
|
}
|
|
10827
10829
|
};
|
|
10828
|
-
|
|
10829
|
-
A.jsonID("cell",
|
|
10830
|
+
O.prototype.visible = !1;
|
|
10831
|
+
A.jsonID("cell", O);
|
|
10830
10832
|
var hu = class Jl {
|
|
10831
10833
|
constructor(e, o) {
|
|
10832
10834
|
this.anchor = e, this.head = o;
|
|
@@ -10836,11 +10838,11 @@ var hu = class Jl {
|
|
|
10836
10838
|
}
|
|
10837
10839
|
resolve(e) {
|
|
10838
10840
|
const o = e.resolve(this.anchor), a = e.resolve(this.head);
|
|
10839
|
-
return o.parent.type.spec.tableRole == "row" && a.parent.type.spec.tableRole == "row" && o.index() < o.parent.childCount && a.index() < a.parent.childCount && js(o, a) ? new
|
|
10841
|
+
return o.parent.type.spec.tableRole == "row" && a.parent.type.spec.tableRole == "row" && o.index() < o.parent.childCount && a.index() < a.parent.childCount && js(o, a) ? new O(o, a) : A.near(a, 1);
|
|
10840
10842
|
}
|
|
10841
10843
|
};
|
|
10842
10844
|
function bu(t) {
|
|
10843
|
-
if (!(t.selection instanceof
|
|
10845
|
+
if (!(t.selection instanceof O)) return null;
|
|
10844
10846
|
const e = [];
|
|
10845
10847
|
return t.selection.forEachCell((o, a) => {
|
|
10846
10848
|
e.push(ue.node(a, a + o.nodeSize, { class: "selectedCell" }));
|
|
@@ -10874,16 +10876,16 @@ function vu({ $from: t, $to: e }) {
|
|
|
10874
10876
|
function ku(t, e, o) {
|
|
10875
10877
|
const a = (e || t).selection, n = (e || t).doc;
|
|
10876
10878
|
let s, r;
|
|
10877
|
-
if (a instanceof
|
|
10878
|
-
if (r == "cell" || r == "header_cell") s =
|
|
10879
|
+
if (a instanceof F && (r = a.node.type.spec.tableRole)) {
|
|
10880
|
+
if (r == "cell" || r == "header_cell") s = O.create(n, a.from);
|
|
10879
10881
|
else if (r == "row") {
|
|
10880
10882
|
const i = n.resolve(a.from + 1);
|
|
10881
|
-
s =
|
|
10883
|
+
s = O.rowSelection(i, i);
|
|
10882
10884
|
} else if (!o) {
|
|
10883
10885
|
const i = U.get(a.node), l = a.from + 1, p = l + i.map[i.width * i.height - 1];
|
|
10884
|
-
s =
|
|
10886
|
+
s = O.create(n, l + 1, p);
|
|
10885
10887
|
}
|
|
10886
|
-
} else a instanceof
|
|
10888
|
+
} else a instanceof x && ju(a) ? s = x.create(n, a.from) : a instanceof x && vu(a) && (s = x.create(n, a.$from.start(), a.$from.end()));
|
|
10887
10889
|
return s && (e || (e = t.tr)).setSelection(s), e;
|
|
10888
10890
|
}
|
|
10889
10891
|
const yu = new Q("fix-tables");
|
|
@@ -10958,10 +10960,10 @@ function _u(t, e, o, a) {
|
|
|
10958
10960
|
}
|
|
10959
10961
|
return a.setMeta(yu, { fixTables: !0 });
|
|
10960
10962
|
}
|
|
10961
|
-
function
|
|
10963
|
+
function Fe(t) {
|
|
10962
10964
|
const e = t.selection, o = Sa(t), a = o.node(-1), n = o.start(-1), s = U.get(a);
|
|
10963
10965
|
return {
|
|
10964
|
-
...e instanceof
|
|
10966
|
+
...e instanceof O ? s.rectBetween(e.$anchorCell.pos - n, e.$headCell.pos - n) : s.findCell(o.pos - n),
|
|
10965
10967
|
tableStart: n,
|
|
10966
10968
|
map: s,
|
|
10967
10969
|
table: a
|
|
@@ -10985,7 +10987,7 @@ function Yl(t, { map: e, tableStart: o, table: a }, n) {
|
|
|
10985
10987
|
function wu(t, e) {
|
|
10986
10988
|
if (!_e(t)) return !1;
|
|
10987
10989
|
if (e) {
|
|
10988
|
-
const o =
|
|
10990
|
+
const o = Fe(t);
|
|
10989
10991
|
e(Yl(t.tr, o, o.left));
|
|
10990
10992
|
}
|
|
10991
10993
|
return !0;
|
|
@@ -10993,7 +10995,7 @@ function wu(t, e) {
|
|
|
10993
10995
|
function Du(t, e) {
|
|
10994
10996
|
if (!_e(t)) return !1;
|
|
10995
10997
|
if (e) {
|
|
10996
|
-
const o =
|
|
10998
|
+
const o = Fe(t);
|
|
10997
10999
|
e(Yl(t.tr, o, o.right));
|
|
10998
11000
|
}
|
|
10999
11001
|
return !0;
|
|
@@ -11013,7 +11015,7 @@ function Iu(t, { map: e, table: o, tableStart: a }, n) {
|
|
|
11013
11015
|
function Cu(t, e) {
|
|
11014
11016
|
if (!_e(t)) return !1;
|
|
11015
11017
|
if (e) {
|
|
11016
|
-
const o =
|
|
11018
|
+
const o = Fe(t), a = t.tr;
|
|
11017
11019
|
if (o.left == 0 && o.right == o.map.width) return !1;
|
|
11018
11020
|
for (let n = o.right - 1; Iu(a, o, n), n != o.left; n--) {
|
|
11019
11021
|
const s = o.tableStart ? a.doc.nodeAt(o.tableStart - 1) : a.doc;
|
|
@@ -11024,7 +11026,7 @@ function Cu(t, e) {
|
|
|
11024
11026
|
}
|
|
11025
11027
|
return !0;
|
|
11026
11028
|
}
|
|
11027
|
-
function
|
|
11029
|
+
function Fu(t, e, o) {
|
|
11028
11030
|
var a;
|
|
11029
11031
|
const n = re(e.type.schema).header_cell;
|
|
11030
11032
|
for (let s = 0; s < t.width; s++) if (((a = e.nodeAt(t.map[s + o * t.width])) === null || a === void 0 ? void 0 : a.type) != n) return !1;
|
|
@@ -11035,7 +11037,7 @@ function Ql(t, { map: e, tableStart: o, table: a }, n) {
|
|
|
11035
11037
|
for (let p = 0; p < n; p++) s += a.child(p).nodeSize;
|
|
11036
11038
|
const r = [];
|
|
11037
11039
|
let i = n > 0 ? -1 : 0;
|
|
11038
|
-
|
|
11040
|
+
Fu(e, a, n + i) && (i = n == 0 || n == e.height ? null : 0);
|
|
11039
11041
|
for (let p = 0, c = e.width * n; p < e.width; p++, c++) if (n > 0 && n < e.height && e.map[c] == e.map[c - e.width]) {
|
|
11040
11042
|
const m = e.map[c], d = a.nodeAt(m).attrs;
|
|
11041
11043
|
t.setNodeMarkup(o + m, null, {
|
|
@@ -11049,18 +11051,18 @@ function Ql(t, { map: e, tableStart: o, table: a }, n) {
|
|
|
11049
11051
|
}
|
|
11050
11052
|
return t.insert(s, re(a.type.schema).row.create(null, r)), t;
|
|
11051
11053
|
}
|
|
11052
|
-
function
|
|
11054
|
+
function xu(t, e) {
|
|
11053
11055
|
if (!_e(t)) return !1;
|
|
11054
11056
|
if (e) {
|
|
11055
|
-
const o =
|
|
11057
|
+
const o = Fe(t);
|
|
11056
11058
|
e(Ql(t.tr, o, o.top));
|
|
11057
11059
|
}
|
|
11058
11060
|
return !0;
|
|
11059
11061
|
}
|
|
11060
|
-
function
|
|
11062
|
+
function Eu(t, e) {
|
|
11061
11063
|
if (!_e(t)) return !1;
|
|
11062
11064
|
if (e) {
|
|
11063
|
-
const o =
|
|
11065
|
+
const o = Fe(t);
|
|
11064
11066
|
e(Ql(t.tr, o, o.bottom));
|
|
11065
11067
|
}
|
|
11066
11068
|
return !0;
|
|
@@ -11093,7 +11095,7 @@ function Au(t, { map: e, table: o, tableStart: a }, n) {
|
|
|
11093
11095
|
function Su(t, e) {
|
|
11094
11096
|
if (!_e(t)) return !1;
|
|
11095
11097
|
if (e) {
|
|
11096
|
-
const o =
|
|
11098
|
+
const o = Fe(t), a = t.tr;
|
|
11097
11099
|
if (o.top == 0 && o.bottom == o.map.height) return !1;
|
|
11098
11100
|
for (let n = o.bottom - 1; Au(a, o, n), n != o.top; n--) {
|
|
11099
11101
|
const s = o.tableStart ? a.doc.nodeAt(o.tableStart - 1) : a.doc;
|
|
@@ -11122,8 +11124,8 @@ function Mu({ width: t, height: e, map: o }, a) {
|
|
|
11122
11124
|
}
|
|
11123
11125
|
function wr(t, e) {
|
|
11124
11126
|
const o = t.selection;
|
|
11125
|
-
if (!(o instanceof
|
|
11126
|
-
const a =
|
|
11127
|
+
if (!(o instanceof O) || o.$anchorCell.pos == o.$headCell.pos) return !1;
|
|
11128
|
+
const a = Fe(t), { map: n } = a;
|
|
11127
11129
|
if (Mu(n, a)) return !1;
|
|
11128
11130
|
if (e) {
|
|
11129
11131
|
const s = t.tr, r = {};
|
|
@@ -11147,7 +11149,7 @@ function wr(t, e) {
|
|
|
11147
11149
|
const c = l + 1 + p.content.size, m = _r(p) ? l + 1 : c;
|
|
11148
11150
|
s.replaceWith(m + a.tableStart, c + a.tableStart, i);
|
|
11149
11151
|
}
|
|
11150
|
-
s.setSelection(new
|
|
11152
|
+
s.setSelection(new O(s.doc.resolve(l + a.tableStart))), e(s);
|
|
11151
11153
|
}
|
|
11152
11154
|
return !0;
|
|
11153
11155
|
}
|
|
@@ -11159,7 +11161,7 @@ function Tu(t) {
|
|
|
11159
11161
|
return (e, o) => {
|
|
11160
11162
|
const a = e.selection;
|
|
11161
11163
|
let n, s;
|
|
11162
|
-
if (a instanceof
|
|
11164
|
+
if (a instanceof O) {
|
|
11163
11165
|
if (a.$anchorCell.pos != a.$headCell.pos) return !1;
|
|
11164
11166
|
n = a.$anchorCell.nodeAfter, s = a.$anchorCell.pos;
|
|
11165
11167
|
} else {
|
|
@@ -11178,7 +11180,7 @@ function Tu(t) {
|
|
|
11178
11180
|
...i,
|
|
11179
11181
|
colspan: 1
|
|
11180
11182
|
});
|
|
11181
|
-
const c =
|
|
11183
|
+
const c = Fe(e), m = e.tr;
|
|
11182
11184
|
for (let g = 0; g < c.right - c.left; g++) l.push(p ? {
|
|
11183
11185
|
...i,
|
|
11184
11186
|
colwidth: p && p[g] ? [p[g]] : null
|
|
@@ -11198,7 +11200,7 @@ function Tu(t) {
|
|
|
11198
11200
|
node: n,
|
|
11199
11201
|
row: c.top,
|
|
11200
11202
|
col: c.left
|
|
11201
|
-
}), l[0]), a instanceof
|
|
11203
|
+
}), l[0]), a instanceof O && m.setSelection(new O(m.doc.resolve(a.$anchorCell.pos), d ? m.doc.resolve(d) : void 0)), o(m);
|
|
11202
11204
|
}
|
|
11203
11205
|
return !0;
|
|
11204
11206
|
};
|
|
@@ -11210,7 +11212,7 @@ function Lu(t, e) {
|
|
|
11210
11212
|
if (n.nodeAfter.attrs[t] === e) return !1;
|
|
11211
11213
|
if (a) {
|
|
11212
11214
|
const s = o.tr;
|
|
11213
|
-
o.selection instanceof
|
|
11215
|
+
o.selection instanceof O ? o.selection.forEachCell((r, i) => {
|
|
11214
11216
|
r.attrs[t] !== e && s.setNodeMarkup(i, null, {
|
|
11215
11217
|
...r.attrs,
|
|
11216
11218
|
[t]: e
|
|
@@ -11227,7 +11229,7 @@ function zu(t) {
|
|
|
11227
11229
|
return function(e, o) {
|
|
11228
11230
|
if (!_e(e)) return !1;
|
|
11229
11231
|
if (o) {
|
|
11230
|
-
const a = re(e.schema), n =
|
|
11232
|
+
const a = re(e.schema), n = Fe(e), s = e.tr, r = n.map.cellsInRect(t == "column" ? {
|
|
11231
11233
|
left: n.left,
|
|
11232
11234
|
top: 0,
|
|
11233
11235
|
right: n.right,
|
|
@@ -11258,11 +11260,11 @@ function Ir(t, e, o) {
|
|
|
11258
11260
|
}
|
|
11259
11261
|
return !0;
|
|
11260
11262
|
}
|
|
11261
|
-
function
|
|
11263
|
+
function Yt(t, e) {
|
|
11262
11264
|
return e = e || { useDeprecatedLogic: !1 }, e.useDeprecatedLogic ? zu(t) : function(o, a) {
|
|
11263
11265
|
if (!_e(o)) return !1;
|
|
11264
11266
|
if (a) {
|
|
11265
|
-
const n = re(o.schema), s =
|
|
11267
|
+
const n = re(o.schema), s = Fe(o), r = o.tr, i = Ir("row", s, n), l = Ir("column", s, n), p = (t === "column" ? i : t === "row" && l) ? 1 : 0, c = t == "column" ? {
|
|
11266
11268
|
left: 0,
|
|
11267
11269
|
top: p,
|
|
11268
11270
|
right: 1,
|
|
@@ -11281,9 +11283,9 @@ function Xt(t, e) {
|
|
|
11281
11283
|
return !0;
|
|
11282
11284
|
};
|
|
11283
11285
|
}
|
|
11284
|
-
|
|
11285
|
-
|
|
11286
|
-
const Ru =
|
|
11286
|
+
Yt("row", { useDeprecatedLogic: !0 });
|
|
11287
|
+
Yt("column", { useDeprecatedLogic: !0 });
|
|
11288
|
+
const Ru = Yt("cell", { useDeprecatedLogic: !0 });
|
|
11287
11289
|
function $u(t, e) {
|
|
11288
11290
|
if (e < 0) {
|
|
11289
11291
|
const o = t.nodeBefore;
|
|
@@ -11311,20 +11313,20 @@ function Cr(t) {
|
|
|
11311
11313
|
if (a == null) return !1;
|
|
11312
11314
|
if (o) {
|
|
11313
11315
|
const n = e.doc.resolve(a);
|
|
11314
|
-
o(e.tr.setSelection(
|
|
11316
|
+
o(e.tr.setSelection(x.between(n, uu(n))).scrollIntoView());
|
|
11315
11317
|
}
|
|
11316
11318
|
return !0;
|
|
11317
11319
|
};
|
|
11318
11320
|
}
|
|
11319
|
-
function
|
|
11321
|
+
function Bu(t, e) {
|
|
11320
11322
|
const o = t.selection.$anchor;
|
|
11321
11323
|
for (let a = o.depth; a > 0; a--) if (o.node(a).type.spec.tableRole == "table")
|
|
11322
11324
|
return e && e(t.tr.delete(o.before(a), o.after(a)).scrollIntoView()), !0;
|
|
11323
11325
|
return !1;
|
|
11324
11326
|
}
|
|
11325
|
-
function
|
|
11327
|
+
function go(t, e) {
|
|
11326
11328
|
const o = t.selection;
|
|
11327
|
-
if (!(o instanceof
|
|
11329
|
+
if (!(o instanceof O)) return !1;
|
|
11328
11330
|
if (e) {
|
|
11329
11331
|
const a = t.tr, n = re(t.schema).cell.createAndFill().content;
|
|
11330
11332
|
o.forEachCell((s, r) => {
|
|
@@ -11333,7 +11335,7 @@ function mo(t, e) {
|
|
|
11333
11335
|
}
|
|
11334
11336
|
return !0;
|
|
11335
11337
|
}
|
|
11336
|
-
function
|
|
11338
|
+
function Nu(t) {
|
|
11337
11339
|
if (t.size === 0) return null;
|
|
11338
11340
|
let { content: e, openStart: o, openEnd: a } = t;
|
|
11339
11341
|
for (; e.childCount == 1 && (o > 0 && a > 0 || e.child(0).type.spec.tableRole == "table"); )
|
|
@@ -11342,13 +11344,13 @@ function Ou(t) {
|
|
|
11342
11344
|
if (s == "row") for (let l = 0; l < e.childCount; l++) {
|
|
11343
11345
|
let p = e.child(l).content;
|
|
11344
11346
|
const c = l ? 0 : Math.max(0, o - 1), m = l < e.childCount - 1 ? 0 : Math.max(0, a - 1);
|
|
11345
|
-
(c || m) && (p =
|
|
11347
|
+
(c || m) && (p = En(re(r).row, new _(p, c, m)).content), i.push(p);
|
|
11346
11348
|
}
|
|
11347
|
-
else if (s == "cell" || s == "header_cell") i.push(o || a ?
|
|
11349
|
+
else if (s == "cell" || s == "header_cell") i.push(o || a ? En(re(r).row, new _(e, o, a)).content : e);
|
|
11348
11350
|
else return null;
|
|
11349
|
-
return
|
|
11351
|
+
return Ou(r, i);
|
|
11350
11352
|
}
|
|
11351
|
-
function
|
|
11353
|
+
function Ou(t, e) {
|
|
11352
11354
|
const o = [];
|
|
11353
11355
|
for (let n = 0; n < e.length; n++) {
|
|
11354
11356
|
const s = e[n];
|
|
@@ -11371,7 +11373,7 @@ function Bu(t, e) {
|
|
|
11371
11373
|
rows: e
|
|
11372
11374
|
};
|
|
11373
11375
|
}
|
|
11374
|
-
function
|
|
11376
|
+
function En(t, e) {
|
|
11375
11377
|
const o = t.createAndFill();
|
|
11376
11378
|
return new Ai(o).replace(0, o.content.size, e).doc;
|
|
11377
11379
|
}
|
|
@@ -11434,7 +11436,7 @@ function Pu(t, e, o, a, n, s, r) {
|
|
|
11434
11436
|
}
|
|
11435
11437
|
return !!(p || c);
|
|
11436
11438
|
}
|
|
11437
|
-
function
|
|
11439
|
+
function Fr(t, e, o, a, n, s, r, i) {
|
|
11438
11440
|
if (r == 0 || r == e.height) return !1;
|
|
11439
11441
|
let l = !1;
|
|
11440
11442
|
for (let p = n; p < s; p++) {
|
|
@@ -11453,7 +11455,7 @@ function xr(t, e, o, a, n, s, r, i) {
|
|
|
11453
11455
|
}
|
|
11454
11456
|
return l;
|
|
11455
11457
|
}
|
|
11456
|
-
function
|
|
11458
|
+
function xr(t, e, o, a, n, s, r, i) {
|
|
11457
11459
|
if (r == 0 || r == e.width) return !1;
|
|
11458
11460
|
let l = !1;
|
|
11459
11461
|
for (let p = n; p < s; p++) {
|
|
@@ -11466,7 +11468,7 @@ function Er(t, e, o, a, n, s, r, i) {
|
|
|
11466
11468
|
}
|
|
11467
11469
|
return l;
|
|
11468
11470
|
}
|
|
11469
|
-
function
|
|
11471
|
+
function Er(t, e, o, a, n) {
|
|
11470
11472
|
let s = o ? t.doc.nodeAt(o - 1) : t.doc;
|
|
11471
11473
|
if (!s) throw new Error("No table found");
|
|
11472
11474
|
let r = U.get(s);
|
|
@@ -11476,80 +11478,80 @@ function Fr(t, e, o, a, n) {
|
|
|
11476
11478
|
if (s = o ? m.doc.nodeAt(o - 1) : m.doc, !s) throw new Error("No table found");
|
|
11477
11479
|
r = U.get(s), d = m.mapping.maps.length;
|
|
11478
11480
|
}
|
|
11479
|
-
Pu(m, r, s, o, p, c, d) && g(),
|
|
11481
|
+
Pu(m, r, s, o, p, c, d) && g(), Fr(m, r, s, o, l, p, i, d) && g(), Fr(m, r, s, o, l, p, c, d) && g(), xr(m, r, s, o, i, c, l, d) && g(), xr(m, r, s, o, i, c, p, d) && g();
|
|
11480
11482
|
for (let u = i; u < c; u++) {
|
|
11481
11483
|
const f = r.positionAt(u, l, s), h = r.positionAt(u, p, s);
|
|
11482
11484
|
m.replace(m.mapping.slice(d).map(f + o), m.mapping.slice(d).map(h + o), new _(n.rows[u - i], 0, 0));
|
|
11483
11485
|
}
|
|
11484
|
-
g(), m.setSelection(new
|
|
11486
|
+
g(), m.setSelection(new O(m.doc.resolve(o + r.positionAt(i, l, s)), m.doc.resolve(o + r.positionAt(c - 1, p - 1, s)))), e(m);
|
|
11485
11487
|
}
|
|
11486
11488
|
const qu = bl({
|
|
11487
|
-
ArrowLeft:
|
|
11488
|
-
ArrowRight:
|
|
11489
|
-
ArrowUp:
|
|
11490
|
-
ArrowDown:
|
|
11491
|
-
"Shift-ArrowLeft":
|
|
11492
|
-
"Shift-ArrowRight":
|
|
11493
|
-
"Shift-ArrowUp":
|
|
11494
|
-
"Shift-ArrowDown":
|
|
11495
|
-
Backspace:
|
|
11496
|
-
"Mod-Backspace":
|
|
11497
|
-
Delete:
|
|
11498
|
-
"Mod-Delete":
|
|
11489
|
+
ArrowLeft: uo("horiz", -1),
|
|
11490
|
+
ArrowRight: uo("horiz", 1),
|
|
11491
|
+
ArrowUp: uo("vert", -1),
|
|
11492
|
+
ArrowDown: uo("vert", 1),
|
|
11493
|
+
"Shift-ArrowLeft": fo("horiz", -1),
|
|
11494
|
+
"Shift-ArrowRight": fo("horiz", 1),
|
|
11495
|
+
"Shift-ArrowUp": fo("vert", -1),
|
|
11496
|
+
"Shift-ArrowDown": fo("vert", 1),
|
|
11497
|
+
Backspace: go,
|
|
11498
|
+
"Mod-Backspace": go,
|
|
11499
|
+
Delete: go,
|
|
11500
|
+
"Mod-Delete": go
|
|
11499
11501
|
});
|
|
11500
|
-
function
|
|
11502
|
+
function xo(t, e, o) {
|
|
11501
11503
|
return o.eq(t.selection) ? !1 : (e && e(t.tr.setSelection(o).scrollIntoView()), !0);
|
|
11502
11504
|
}
|
|
11503
|
-
function
|
|
11505
|
+
function uo(t, e) {
|
|
11504
11506
|
return (o, a, n) => {
|
|
11505
11507
|
if (!n) return !1;
|
|
11506
11508
|
const s = o.selection;
|
|
11507
|
-
if (s instanceof
|
|
11509
|
+
if (s instanceof O) return xo(o, a, A.near(s.$headCell, e));
|
|
11508
11510
|
if (t != "horiz" && !s.empty) return !1;
|
|
11509
11511
|
const r = Zl(n, t, e);
|
|
11510
11512
|
if (r == null) return !1;
|
|
11511
|
-
if (t == "horiz") return
|
|
11513
|
+
if (t == "horiz") return xo(o, a, A.near(o.doc.resolve(s.head + e), e));
|
|
11512
11514
|
{
|
|
11513
11515
|
const i = o.doc.resolve(r), l = Vl(i, t, e);
|
|
11514
11516
|
let p;
|
|
11515
|
-
return l ? p = A.near(l, 1) : e < 0 ? p = A.near(o.doc.resolve(i.before(-1)), -1) : p = A.near(o.doc.resolve(i.after(-1)), 1),
|
|
11517
|
+
return l ? p = A.near(l, 1) : e < 0 ? p = A.near(o.doc.resolve(i.before(-1)), -1) : p = A.near(o.doc.resolve(i.after(-1)), 1), xo(o, a, p);
|
|
11516
11518
|
}
|
|
11517
11519
|
};
|
|
11518
11520
|
}
|
|
11519
|
-
function
|
|
11521
|
+
function fo(t, e) {
|
|
11520
11522
|
return (o, a, n) => {
|
|
11521
11523
|
if (!n) return !1;
|
|
11522
11524
|
const s = o.selection;
|
|
11523
11525
|
let r;
|
|
11524
|
-
if (s instanceof
|
|
11526
|
+
if (s instanceof O) r = s;
|
|
11525
11527
|
else {
|
|
11526
11528
|
const l = Zl(n, t, e);
|
|
11527
11529
|
if (l == null) return !1;
|
|
11528
|
-
r = new
|
|
11530
|
+
r = new O(o.doc.resolve(l));
|
|
11529
11531
|
}
|
|
11530
11532
|
const i = Vl(r.$headCell, t, e);
|
|
11531
|
-
return i ?
|
|
11533
|
+
return i ? xo(o, a, new O(r.$anchorCell, i)) : !1;
|
|
11532
11534
|
};
|
|
11533
11535
|
}
|
|
11534
11536
|
function Wu(t, e) {
|
|
11535
11537
|
const o = t.state.doc, a = ct(o.resolve(e));
|
|
11536
|
-
return a ? (t.dispatch(t.state.tr.setSelection(new
|
|
11538
|
+
return a ? (t.dispatch(t.state.tr.setSelection(new O(a))), !0) : !1;
|
|
11537
11539
|
}
|
|
11538
11540
|
function Ku(t, e, o) {
|
|
11539
11541
|
if (!_e(t.state)) return !1;
|
|
11540
|
-
let a =
|
|
11542
|
+
let a = Nu(o);
|
|
11541
11543
|
const n = t.state.selection;
|
|
11542
|
-
if (n instanceof
|
|
11544
|
+
if (n instanceof O) {
|
|
11543
11545
|
a || (a = {
|
|
11544
11546
|
width: 1,
|
|
11545
11547
|
height: 1,
|
|
11546
|
-
rows: [v.from(
|
|
11548
|
+
rows: [v.from(En(re(t.state.schema).cell, o))]
|
|
11547
11549
|
});
|
|
11548
11550
|
const s = n.$anchorCell.node(-1), r = n.$anchorCell.start(-1), i = U.get(s).rectBetween(n.$anchorCell.pos - r, n.$headCell.pos - r);
|
|
11549
|
-
return a = Hu(a, i.right - i.left, i.bottom - i.top),
|
|
11551
|
+
return a = Hu(a, i.right - i.left, i.bottom - i.top), Er(t.state, t.dispatch, r, i, a), !0;
|
|
11550
11552
|
} else if (a) {
|
|
11551
11553
|
const s = Sa(t.state), r = s.start(-1);
|
|
11552
|
-
return
|
|
11554
|
+
return Er(t.state, t.dispatch, r, U.get(s.node(-1)).findCell(s.pos - r), a), !0;
|
|
11553
11555
|
} else return !1;
|
|
11554
11556
|
}
|
|
11555
11557
|
function Vu(t, e) {
|
|
@@ -11557,27 +11559,27 @@ function Vu(t, e) {
|
|
|
11557
11559
|
if (e.button != 0 || e.ctrlKey || e.metaKey) return;
|
|
11558
11560
|
const a = Ar(t, e.target);
|
|
11559
11561
|
let n;
|
|
11560
|
-
if (e.shiftKey && t.state.selection instanceof
|
|
11562
|
+
if (e.shiftKey && t.state.selection instanceof O)
|
|
11561
11563
|
s(t.state.selection.$anchorCell, e), e.preventDefault();
|
|
11562
11564
|
else if (e.shiftKey && a && (n = ct(t.state.selection.$anchor)) != null && ((o = Ga(t, e)) === null || o === void 0 ? void 0 : o.pos) != n.pos)
|
|
11563
11565
|
s(n, e), e.preventDefault();
|
|
11564
11566
|
else if (!a) return;
|
|
11565
11567
|
function s(l, p) {
|
|
11566
11568
|
let c = Ga(t, p);
|
|
11567
|
-
const m =
|
|
11569
|
+
const m = Oe.getState(t.state) == null;
|
|
11568
11570
|
if (!c || !js(l, c)) if (m) c = l;
|
|
11569
11571
|
else return;
|
|
11570
|
-
const d = new
|
|
11572
|
+
const d = new O(l, c);
|
|
11571
11573
|
if (m || !t.state.selection.eq(d)) {
|
|
11572
11574
|
const g = t.state.tr.setSelection(d);
|
|
11573
|
-
m && g.setMeta(
|
|
11575
|
+
m && g.setMeta(Oe, l.pos), t.dispatch(g);
|
|
11574
11576
|
}
|
|
11575
11577
|
}
|
|
11576
11578
|
function r() {
|
|
11577
|
-
t.root.removeEventListener("mouseup", r), t.root.removeEventListener("dragstart", r), t.root.removeEventListener("mousemove", i),
|
|
11579
|
+
t.root.removeEventListener("mouseup", r), t.root.removeEventListener("dragstart", r), t.root.removeEventListener("mousemove", i), Oe.getState(t.state) != null && t.dispatch(t.state.tr.setMeta(Oe, -1));
|
|
11578
11580
|
}
|
|
11579
11581
|
function i(l) {
|
|
11580
|
-
const p = l, c =
|
|
11582
|
+
const p = l, c = Oe.getState(t.state);
|
|
11581
11583
|
let m;
|
|
11582
11584
|
if (c != null) m = t.state.doc.resolve(c);
|
|
11583
11585
|
else if (Ar(t, p.target) != a && (m = Ga(t, e), !m))
|
|
@@ -11587,7 +11589,7 @@ function Vu(t, e) {
|
|
|
11587
11589
|
t.root.addEventListener("mouseup", r), t.root.addEventListener("dragstart", r), t.root.addEventListener("mousemove", i);
|
|
11588
11590
|
}
|
|
11589
11591
|
function Zl(t, e, o) {
|
|
11590
|
-
if (!(t.state.selection instanceof
|
|
11592
|
+
if (!(t.state.selection instanceof x)) return null;
|
|
11591
11593
|
const { $head: a } = t.state.selection;
|
|
11592
11594
|
for (let n = a.depth - 1; n >= 0; n--) {
|
|
11593
11595
|
const s = a.node(n);
|
|
@@ -11686,17 +11688,17 @@ function Ju({ handleWidth: t = 5, cellMinWidth: e = 25, defaultCellMinWidth: o =
|
|
|
11686
11688
|
});
|
|
11687
11689
|
return s;
|
|
11688
11690
|
}
|
|
11689
|
-
var Gu = class
|
|
11691
|
+
var Gu = class Eo {
|
|
11690
11692
|
constructor(e, o) {
|
|
11691
11693
|
this.activeHandle = e, this.dragging = o;
|
|
11692
11694
|
}
|
|
11693
11695
|
apply(e) {
|
|
11694
11696
|
const o = this, a = e.getMeta(ge);
|
|
11695
|
-
if (a && a.setHandle != null) return new
|
|
11696
|
-
if (a && a.setDragging !== void 0) return new
|
|
11697
|
+
if (a && a.setHandle != null) return new Eo(a.setHandle, !1);
|
|
11698
|
+
if (a && a.setDragging !== void 0) return new Eo(o.activeHandle, a.setDragging);
|
|
11697
11699
|
if (o.activeHandle > -1 && e.docChanged) {
|
|
11698
11700
|
let n = e.mapping.map(o.activeHandle, -1);
|
|
11699
|
-
return
|
|
11701
|
+
return xn(e.doc.resolve(n)) || (n = -1), new Eo(n, o.dragging);
|
|
11700
11702
|
}
|
|
11701
11703
|
return o;
|
|
11702
11704
|
}
|
|
@@ -11822,13 +11824,13 @@ function af(t, e) {
|
|
|
11822
11824
|
}
|
|
11823
11825
|
function nf({ allowTableNodeSelection: t = !1 } = {}) {
|
|
11824
11826
|
return new se({
|
|
11825
|
-
key:
|
|
11827
|
+
key: Oe,
|
|
11826
11828
|
state: {
|
|
11827
11829
|
init() {
|
|
11828
11830
|
return null;
|
|
11829
11831
|
},
|
|
11830
11832
|
apply(e, o) {
|
|
11831
|
-
const a = e.getMeta(
|
|
11833
|
+
const a = e.getMeta(Oe);
|
|
11832
11834
|
if (a != null) return a == -1 ? null : a;
|
|
11833
11835
|
if (o == null || !e.docChanged) return o;
|
|
11834
11836
|
const { deleted: n, pos: s } = e.mapping.mapResult(o);
|
|
@@ -11839,7 +11841,7 @@ function nf({ allowTableNodeSelection: t = !1 } = {}) {
|
|
|
11839
11841
|
decorations: bu,
|
|
11840
11842
|
handleDOMEvents: { mousedown: Vu },
|
|
11841
11843
|
createSelectionBetween(e) {
|
|
11842
|
-
return
|
|
11844
|
+
return Oe.getState(e.state) != null ? e.state.selection : null;
|
|
11843
11845
|
},
|
|
11844
11846
|
handleTripleClick: Wu,
|
|
11845
11847
|
handleKeyDown: qu,
|
|
@@ -12027,9 +12029,9 @@ function pf(t, e, o, a, n) {
|
|
|
12027
12029
|
return s.table.createChecked(null, l);
|
|
12028
12030
|
}
|
|
12029
12031
|
function cf(t) {
|
|
12030
|
-
return t instanceof
|
|
12032
|
+
return t instanceof O;
|
|
12031
12033
|
}
|
|
12032
|
-
var
|
|
12034
|
+
var ho = ({ editor: t }) => {
|
|
12033
12035
|
const { selection: e } = t.state;
|
|
12034
12036
|
if (!cf(e))
|
|
12035
12037
|
return !1;
|
|
@@ -12141,21 +12143,21 @@ var uf = gf, np = K.create({
|
|
|
12141
12143
|
const r = pf(s.schema, t, e, o);
|
|
12142
12144
|
if (n) {
|
|
12143
12145
|
const i = a.selection.from + 1;
|
|
12144
|
-
a.replaceSelectionWith(r).scrollIntoView().setSelection(
|
|
12146
|
+
a.replaceSelectionWith(r).scrollIntoView().setSelection(x.near(a.doc.resolve(i)));
|
|
12145
12147
|
}
|
|
12146
12148
|
return !0;
|
|
12147
12149
|
},
|
|
12148
12150
|
addColumnBefore: () => ({ state: t, dispatch: e }) => wu(t, e),
|
|
12149
12151
|
addColumnAfter: () => ({ state: t, dispatch: e }) => Du(t, e),
|
|
12150
12152
|
deleteColumn: () => ({ state: t, dispatch: e }) => Cu(t, e),
|
|
12151
|
-
addRowBefore: () => ({ state: t, dispatch: e }) =>
|
|
12152
|
-
addRowAfter: () => ({ state: t, dispatch: e }) =>
|
|
12153
|
+
addRowBefore: () => ({ state: t, dispatch: e }) => xu(t, e),
|
|
12154
|
+
addRowAfter: () => ({ state: t, dispatch: e }) => Eu(t, e),
|
|
12153
12155
|
deleteRow: () => ({ state: t, dispatch: e }) => Su(t, e),
|
|
12154
|
-
deleteTable: () => ({ state: t, dispatch: e }) =>
|
|
12156
|
+
deleteTable: () => ({ state: t, dispatch: e }) => Bu(t, e),
|
|
12155
12157
|
mergeCells: () => ({ state: t, dispatch: e }) => wr(t, e),
|
|
12156
12158
|
splitCell: () => ({ state: t, dispatch: e }) => Dr(t, e),
|
|
12157
|
-
toggleHeaderColumn: () => ({ state: t, dispatch: e }) =>
|
|
12158
|
-
toggleHeaderRow: () => ({ state: t, dispatch: e }) =>
|
|
12159
|
+
toggleHeaderColumn: () => ({ state: t, dispatch: e }) => Yt("column")(t, e),
|
|
12160
|
+
toggleHeaderRow: () => ({ state: t, dispatch: e }) => Yt("row")(t, e),
|
|
12159
12161
|
toggleHeaderCell: () => ({ state: t, dispatch: e }) => Ru(t, e),
|
|
12160
12162
|
mergeOrSplit: () => ({ state: t, dispatch: e }) => wr(t, e) ? !0 : Dr(t, e),
|
|
12161
12163
|
setCellAttribute: (t, e) => ({ state: o, dispatch: a }) => Lu(t, e)(o, a),
|
|
@@ -12164,7 +12166,7 @@ var uf = gf, np = K.create({
|
|
|
12164
12166
|
fixTables: () => ({ state: t, dispatch: e }) => (e && Xl(t), !0),
|
|
12165
12167
|
setCellSelection: (t) => ({ tr: e, dispatch: o }) => {
|
|
12166
12168
|
if (o) {
|
|
12167
|
-
const a =
|
|
12169
|
+
const a = O.create(e.doc, t.anchorCell, t.headCell);
|
|
12168
12170
|
e.setSelection(a);
|
|
12169
12171
|
}
|
|
12170
12172
|
return !0;
|
|
@@ -12175,10 +12177,10 @@ var uf = gf, np = K.create({
|
|
|
12175
12177
|
return {
|
|
12176
12178
|
Tab: () => this.editor.commands.goToNextCell() ? !0 : this.editor.can().addRowAfter() ? this.editor.chain().addRowAfter().goToNextCell().run() : !1,
|
|
12177
12179
|
"Shift-Tab": () => this.editor.commands.goToPreviousCell(),
|
|
12178
|
-
Backspace:
|
|
12179
|
-
"Mod-Backspace":
|
|
12180
|
-
Delete:
|
|
12181
|
-
"Mod-Delete":
|
|
12180
|
+
Backspace: ho,
|
|
12181
|
+
"Mod-Backspace": ho,
|
|
12182
|
+
Delete: ho,
|
|
12183
|
+
"Mod-Delete": ho
|
|
12182
12184
|
};
|
|
12183
12185
|
},
|
|
12184
12186
|
addProseMirrorPlugins() {
|
|
@@ -12268,7 +12270,7 @@ ${o}
|
|
|
12268
12270
|
},
|
|
12269
12271
|
addInputRules() {
|
|
12270
12272
|
return [
|
|
12271
|
-
|
|
12273
|
+
Ft({
|
|
12272
12274
|
find: ff,
|
|
12273
12275
|
type: this.type
|
|
12274
12276
|
})
|
|
@@ -12403,7 +12405,7 @@ ${o}
|
|
|
12403
12405
|
let j = c;
|
|
12404
12406
|
for (let y = 0; y < g; y += 1)
|
|
12405
12407
|
j += d[y].length + 1;
|
|
12406
|
-
return i.delete(j, j + b), p - j <= b && i.setSelection(
|
|
12408
|
+
return i.delete(j, j + b), p - j <= b && i.setSelection(x.create(i.doc, j)), !0;
|
|
12407
12409
|
}) : t.commands.command(({ tr: i }) => {
|
|
12408
12410
|
const { from: l, to: p } = n, c = a.doc.textBetween(l, p, `
|
|
12409
12411
|
`, `
|
|
@@ -12474,7 +12476,7 @@ ${o}
|
|
|
12474
12476
|
return !1;
|
|
12475
12477
|
const { tr: r, schema: i } = t.state, l = i.text(o.replace(/\r\n?/g, `
|
|
12476
12478
|
`));
|
|
12477
|
-
return r.replaceSelectionWith(this.type.create({ language: s }, l)), r.selection.$from.parent.type !== this.type && r.setSelection(
|
|
12479
|
+
return r.replaceSelectionWith(this.type.create({ language: s }, l)), r.selection.$from.parent.type !== this.type && r.setSelection(x.near(r.doc.resolve(Math.max(0, r.selection.from - 2)))), r.setMeta("paste", !0), t.dispatch(r), !0;
|
|
12478
12480
|
}
|
|
12479
12481
|
}
|
|
12480
12482
|
})
|
|
@@ -12532,9 +12534,9 @@ function Cf({
|
|
|
12532
12534
|
}) {
|
|
12533
12535
|
let b;
|
|
12534
12536
|
const j = g == null ? void 0 : g(), y = () => {
|
|
12535
|
-
const D = e.state.selection.$anchor.pos, C = e.view.coordsAtPos(D), { top: L, right: $, bottom: M, left:
|
|
12537
|
+
const D = e.state.selection.$anchor.pos, C = e.view.coordsAtPos(D), { top: L, right: $, bottom: M, left: B } = C;
|
|
12536
12538
|
try {
|
|
12537
|
-
return new DOMRect(
|
|
12539
|
+
return new DOMRect(B, L, $ - B, M - L);
|
|
12538
12540
|
} catch {
|
|
12539
12541
|
return null;
|
|
12540
12542
|
}
|
|
@@ -12545,7 +12547,7 @@ function Cf({
|
|
|
12545
12547
|
function w(D, C) {
|
|
12546
12548
|
var L;
|
|
12547
12549
|
try {
|
|
12548
|
-
const M = t.getState(D.state),
|
|
12550
|
+
const M = t.getState(D.state), B = M != null && M.decorationId ? D.dom.querySelector(`[data-decoration-id="${M.decorationId}"]`) : null, H = {
|
|
12549
12551
|
// @ts-ignore editor is available in closure
|
|
12550
12552
|
editor: e,
|
|
12551
12553
|
range: (M == null ? void 0 : M.range) || { from: 0, to: 0 },
|
|
@@ -12553,8 +12555,8 @@ function Cf({
|
|
|
12553
12555
|
text: (M == null ? void 0 : M.text) || null,
|
|
12554
12556
|
items: [],
|
|
12555
12557
|
command: (P) => m({ editor: e, range: (M == null ? void 0 : M.range) || { from: 0, to: 0 }, props: P }),
|
|
12556
|
-
decorationNode:
|
|
12557
|
-
clientRect: I(D,
|
|
12558
|
+
decorationNode: B,
|
|
12559
|
+
clientRect: I(D, B)
|
|
12558
12560
|
};
|
|
12559
12561
|
(L = j == null ? void 0 : j.onExit) == null || L.call(j, H);
|
|
12560
12562
|
} catch {
|
|
@@ -12562,16 +12564,16 @@ function Cf({
|
|
|
12562
12564
|
const $ = D.state.tr.setMeta(C, { exit: !0 });
|
|
12563
12565
|
D.dispatch($);
|
|
12564
12566
|
}
|
|
12565
|
-
const
|
|
12567
|
+
const E = new se({
|
|
12566
12568
|
key: t,
|
|
12567
12569
|
view() {
|
|
12568
12570
|
return {
|
|
12569
12571
|
update: async (D, C) => {
|
|
12570
|
-
var L, $, M,
|
|
12571
|
-
const T = (L = this.key) == null ? void 0 : L.getState(C), X = ($ = this.key) == null ? void 0 : $.getState(D.state), pe = T.active && X.active && T.range.from !== X.range.from, ht = !T.active && X.active, As = T.active && !X.active, Ta = !ht && !As && T.query !== X.query,
|
|
12572
|
-
if (!
|
|
12572
|
+
var L, $, M, B, H, P, R;
|
|
12573
|
+
const T = (L = this.key) == null ? void 0 : L.getState(C), X = ($ = this.key) == null ? void 0 : $.getState(D.state), pe = T.active && X.active && T.range.from !== X.range.from, ht = !T.active && X.active, As = T.active && !X.active, Ta = !ht && !As && T.query !== X.query, Et = ht || pe && Ta, so = Ta || pe, La = As || pe && Ta;
|
|
12574
|
+
if (!Et && !so && !La)
|
|
12573
12575
|
return;
|
|
12574
|
-
const bt = La && !
|
|
12576
|
+
const bt = La && !Et ? T : X, Ss = D.dom.querySelector(`[data-decoration-id="${bt.decorationId}"]`);
|
|
12575
12577
|
b = {
|
|
12576
12578
|
editor: e,
|
|
12577
12579
|
range: bt.range,
|
|
@@ -12585,10 +12587,10 @@ function Cf({
|
|
|
12585
12587
|
}),
|
|
12586
12588
|
decorationNode: Ss,
|
|
12587
12589
|
clientRect: I(D, Ss)
|
|
12588
|
-
},
|
|
12590
|
+
}, Et && ((M = j == null ? void 0 : j.onBeforeStart) == null || M.call(j, b)), so && ((B = j == null ? void 0 : j.onBeforeUpdate) == null || B.call(j, b)), (so || Et) && (b.items = await d({
|
|
12589
12591
|
editor: e,
|
|
12590
12592
|
query: bt.query
|
|
12591
|
-
})), La && ((H = j == null ? void 0 : j.onExit) == null || H.call(j, b)),
|
|
12593
|
+
})), La && ((H = j == null ? void 0 : j.onExit) == null || H.call(j, b)), so && ((P = j == null ? void 0 : j.onUpdate) == null || P.call(j, b)), Et && ((R = j == null ? void 0 : j.onStart) == null || R.call(j, b));
|
|
12592
12594
|
},
|
|
12593
12595
|
destroy: () => {
|
|
12594
12596
|
var D;
|
|
@@ -12612,11 +12614,11 @@ function Cf({
|
|
|
12612
12614
|
},
|
|
12613
12615
|
// Apply changes to the plugin state from a view transaction.
|
|
12614
12616
|
apply(D, C, L, $) {
|
|
12615
|
-
const { isEditable: M } = e, { composing:
|
|
12617
|
+
const { isEditable: M } = e, { composing: B } = e.view, { selection: H } = D, { empty: P, from: R } = H, T = { ...C }, X = D.getMeta(t);
|
|
12616
12618
|
if (X && X.exit)
|
|
12617
12619
|
return T.active = !1, T.decorationId = null, T.range = { from: 0, to: 0 }, T.query = null, T.text = null, T;
|
|
12618
|
-
if (T.composing =
|
|
12619
|
-
(R < C.range.from || R > C.range.to) && !
|
|
12620
|
+
if (T.composing = B, M && (P || e.view.composing)) {
|
|
12621
|
+
(R < C.range.from || R > C.range.to) && !B && !C.composing && (T.active = !1);
|
|
12620
12622
|
const pe = f({
|
|
12621
12623
|
char: o,
|
|
12622
12624
|
allowSpaces: a,
|
|
@@ -12645,12 +12647,12 @@ function Cf({
|
|
|
12645
12647
|
props: {
|
|
12646
12648
|
// Call the keydown hook if suggestion is active.
|
|
12647
12649
|
handleKeyDown(D, C) {
|
|
12648
|
-
var L, $, M,
|
|
12649
|
-
const { active: H, range: P } =
|
|
12650
|
+
var L, $, M, B;
|
|
12651
|
+
const { active: H, range: P } = E.getState(D.state);
|
|
12650
12652
|
if (!H)
|
|
12651
12653
|
return !1;
|
|
12652
12654
|
if (C.key === "Escape" || C.key === "Esc") {
|
|
12653
|
-
const R =
|
|
12655
|
+
const R = E.getState(D.state), T = (L = b == null ? void 0 : b.decorationNode) != null ? L : null, X = T ?? (R != null && R.decorationId ? D.dom.querySelector(`[data-decoration-id="${R.decorationId}"]`) : null);
|
|
12654
12656
|
if (($ = j == null ? void 0 : j.onKeyDown) != null && $.call(j, { view: D, event: C, range: R.range }))
|
|
12655
12657
|
return !0;
|
|
12656
12658
|
const pe = {
|
|
@@ -12668,15 +12670,15 @@ function Cf({
|
|
|
12668
12670
|
};
|
|
12669
12671
|
return (M = j == null ? void 0 : j.onExit) == null || M.call(j, pe), w(D, t), !0;
|
|
12670
12672
|
}
|
|
12671
|
-
return ((
|
|
12673
|
+
return ((B = j == null ? void 0 : j.onKeyDown) == null ? void 0 : B.call(j, { view: D, event: C, range: P })) || !1;
|
|
12672
12674
|
},
|
|
12673
12675
|
// Setup decorator on the currently active suggestion.
|
|
12674
12676
|
decorations(D) {
|
|
12675
|
-
const { active: C, range: L, decorationId: $, query: M } =
|
|
12677
|
+
const { active: C, range: L, decorationId: $, query: M } = E.getState(D);
|
|
12676
12678
|
if (!C)
|
|
12677
12679
|
return null;
|
|
12678
|
-
const
|
|
12679
|
-
return
|
|
12680
|
+
const B = !(M != null && M.length), H = [l];
|
|
12681
|
+
return B && H.push(c), J.create(D.doc, [
|
|
12680
12682
|
ue.inline(L.from, L.to, {
|
|
12681
12683
|
nodeName: i,
|
|
12682
12684
|
class: H.join(" "),
|
|
@@ -12687,18 +12689,18 @@ function Cf({
|
|
|
12687
12689
|
}
|
|
12688
12690
|
}
|
|
12689
12691
|
});
|
|
12690
|
-
return
|
|
12692
|
+
return E;
|
|
12691
12693
|
}
|
|
12692
|
-
var
|
|
12693
|
-
const Ef = () => /[#*0-9]\uFE0F?\u20E3|[\xA9\xAE\u203C\u2049\u2122\u2139\u2194-\u2199\u21A9\u21AA\u231A\u231B\u2328\u23CF\u23ED-\u23EF\u23F1\u23F2\u23F8-\u23FA\u24C2\u25AA\u25AB\u25B6\u25C0\u25FB\u25FC\u25FE\u2600-\u2604\u260E\u2611\u2614\u2615\u2618\u2620\u2622\u2623\u2626\u262A\u262E\u262F\u2638-\u263A\u2640\u2642\u2648-\u2653\u265F\u2660\u2663\u2665\u2666\u2668\u267B\u267E\u267F\u2692\u2694-\u2697\u2699\u269B\u269C\u26A0\u26A7\u26AA\u26B0\u26B1\u26BD\u26BE\u26C4\u26C8\u26CF\u26D1\u26E9\u26F0-\u26F5\u26F7\u26F8\u26FA\u2702\u2708\u2709\u270F\u2712\u2714\u2716\u271D\u2721\u2733\u2734\u2744\u2747\u2757\u2763\u27A1\u2934\u2935\u2B05-\u2B07\u2B1B\u2B1C\u2B55\u3030\u303D\u3297\u3299]\uFE0F?|[\u261D\u270C\u270D](?:\uD83C[\uDFFB-\uDFFF]|\uFE0F)?|[\u270A\u270B](?:\uD83C[\uDFFB-\uDFFF])?|[\u23E9-\u23EC\u23F0\u23F3\u25FD\u2693\u26A1\u26AB\u26C5\u26CE\u26D4\u26EA\u26FD\u2705\u2728\u274C\u274E\u2753-\u2755\u2795-\u2797\u27B0\u27BF\u2B50]|\u26D3\uFE0F?(?:\u200D\uD83D\uDCA5)?|\u26F9(?:\uD83C[\uDFFB-\uDFFF]|\uFE0F)?(?:\u200D[\u2640\u2642]\uFE0F?)?|\u2764\uFE0F?(?:\u200D(?:\uD83D\uDD25|\uD83E\uDE79))?|\uD83C(?:[\uDC04\uDD70\uDD71\uDD7E\uDD7F\uDE02\uDE37\uDF21\uDF24-\uDF2C\uDF36\uDF7D\uDF96\uDF97\uDF99-\uDF9B\uDF9E\uDF9F\uDFCD\uDFCE\uDFD4-\uDFDF\uDFF5\uDFF7]\uFE0F?|[\uDF85\uDFC2\uDFC7](?:\uD83C[\uDFFB-\uDFFF])?|[\uDFC4\uDFCA](?:\uD83C[\uDFFB-\uDFFF])?(?:\u200D[\u2640\u2642]\uFE0F?)?|[\uDFCB\uDFCC](?:\uD83C[\uDFFB-\uDFFF]|\uFE0F)?(?:\u200D[\u2640\u2642]\uFE0F?)?|[\uDCCF\uDD8E\uDD91-\uDD9A\uDE01\uDE1A\uDE2F\uDE32-\uDE36\uDE38-\uDE3A\uDE50\uDE51\uDF00-\uDF20\uDF2D-\uDF35\uDF37-\uDF43\uDF45-\uDF4A\uDF4C-\uDF7C\uDF7E-\uDF84\uDF86-\uDF93\uDFA0-\uDFC1\uDFC5\uDFC6\uDFC8\uDFC9\uDFCF-\uDFD3\uDFE0-\uDFF0\uDFF8-\uDFFF]|\uDDE6\uD83C[\uDDE8-\uDDEC\uDDEE\uDDF1\uDDF2\uDDF4\uDDF6-\uDDFA\uDDFC\uDDFD\uDDFF]|\uDDE7\uD83C[\uDDE6\uDDE7\uDDE9-\uDDEF\uDDF1-\uDDF4\uDDF6-\uDDF9\uDDFB\uDDFC\uDDFE\uDDFF]|\uDDE8\uD83C[\uDDE6\uDDE8\uDDE9\uDDEB-\uDDEE\uDDF0-\uDDF7\uDDFA-\uDDFF]|\uDDE9\uD83C[\uDDEA\uDDEC\uDDEF\uDDF0\uDDF2\uDDF4\uDDFF]|\uDDEA\uD83C[\uDDE6\uDDE8\uDDEA\uDDEC\uDDED\uDDF7-\uDDFA]|\uDDEB\uD83C[\uDDEE-\uDDF0\uDDF2\uDDF4\uDDF7]|\uDDEC\uD83C[\uDDE6\uDDE7\uDDE9-\uDDEE\uDDF1-\uDDF3\uDDF5-\uDDFA\uDDFC\uDDFE]|\uDDED\uD83C[\uDDF0\uDDF2\uDDF3\uDDF7\uDDF9\uDDFA]|\uDDEE\uD83C[\uDDE8-\uDDEA\uDDF1-\uDDF4\uDDF6-\uDDF9]|\uDDEF\uD83C[\uDDEA\uDDF2\uDDF4\uDDF5]|\uDDF0\uD83C[\uDDEA\uDDEC-\uDDEE\uDDF2\uDDF3\uDDF5\uDDF7\uDDFC\uDDFE\uDDFF]|\uDDF1\uD83C[\uDDE6-\uDDE8\uDDEE\uDDF0\uDDF7-\uDDFB\uDDFE]|\uDDF2\uD83C[\uDDE6\uDDE8-\uDDED\uDDF0-\uDDFF]|\uDDF3\uD83C[\uDDE6\uDDE8\uDDEA-\uDDEC\uDDEE\uDDF1\uDDF4\uDDF5\uDDF7\uDDFA\uDDFF]|\uDDF4\uD83C\uDDF2|\uDDF5\uD83C[\uDDE6\uDDEA-\uDDED\uDDF0-\uDDF3\uDDF7-\uDDF9\uDDFC\uDDFE]|\uDDF6\uD83C\uDDE6|\uDDF7\uD83C[\uDDEA\uDDF4\uDDF8\uDDFA\uDDFC]|\uDDF8\uD83C[\uDDE6-\uDDEA\uDDEC-\uDDF4\uDDF7-\uDDF9\uDDFB\uDDFD-\uDDFF]|\uDDF9\uD83C[\uDDE6\uDDE8\uDDE9\uDDEB-\uDDED\uDDEF-\uDDF4\uDDF7\uDDF9\uDDFB\uDDFC\uDDFF]|\uDDFA\uD83C[\uDDE6\uDDEC\uDDF2\uDDF3\uDDF8\uDDFE\uDDFF]|\uDDFB\uD83C[\uDDE6\uDDE8\uDDEA\uDDEC\uDDEE\uDDF3\uDDFA]|\uDDFC\uD83C[\uDDEB\uDDF8]|\uDDFD\uD83C\uDDF0|\uDDFE\uD83C[\uDDEA\uDDF9]|\uDDFF\uD83C[\uDDE6\uDDF2\uDDFC]|\uDF44(?:\u200D\uD83D\uDFEB)?|\uDF4B(?:\u200D\uD83D\uDFE9)?|\uDFC3(?:\uD83C[\uDFFB-\uDFFF])?(?:\u200D(?:[\u2640\u2642]\uFE0F?(?:\u200D\u27A1\uFE0F?)?|\u27A1\uFE0F?))?|\uDFF3\uFE0F?(?:\u200D(?:\u26A7\uFE0F?|\uD83C\uDF08))?|\uDFF4(?:\u200D\u2620\uFE0F?|\uDB40\uDC67\uDB40\uDC62\uDB40(?:\uDC65\uDB40\uDC6E\uDB40\uDC67|\uDC73\uDB40\uDC63\uDB40\uDC74|\uDC77\uDB40\uDC6C\uDB40\uDC73)\uDB40\uDC7F)?)|\uD83D(?:[\uDC3F\uDCFD\uDD49\uDD4A\uDD6F\uDD70\uDD73\uDD76-\uDD79\uDD87\uDD8A-\uDD8D\uDDA5\uDDA8\uDDB1\uDDB2\uDDBC\uDDC2-\uDDC4\uDDD1-\uDDD3\uDDDC-\uDDDE\uDDE1\uDDE3\uDDE8\uDDEF\uDDF3\uDDFA\uDECB\uDECD-\uDECF\uDEE0-\uDEE5\uDEE9\uDEF0\uDEF3]\uFE0F?|[\uDC42\uDC43\uDC46-\uDC50\uDC66\uDC67\uDC6B-\uDC6D\uDC72\uDC74-\uDC76\uDC78\uDC7C\uDC83\uDC85\uDC8F\uDC91\uDCAA\uDD7A\uDD95\uDD96\uDE4C\uDE4F\uDEC0\uDECC](?:\uD83C[\uDFFB-\uDFFF])?|[\uDC6E\uDC70\uDC71\uDC73\uDC77\uDC81\uDC82\uDC86\uDC87\uDE45-\uDE47\uDE4B\uDE4D\uDE4E\uDEA3\uDEB4\uDEB5](?:\uD83C[\uDFFB-\uDFFF])?(?:\u200D[\u2640\u2642]\uFE0F?)?|[\uDD74\uDD90](?:\uD83C[\uDFFB-\uDFFF]|\uFE0F)?|[\uDC00-\uDC07\uDC09-\uDC14\uDC16-\uDC25\uDC27-\uDC3A\uDC3C-\uDC3E\uDC40\uDC44\uDC45\uDC51-\uDC65\uDC6A\uDC79-\uDC7B\uDC7D-\uDC80\uDC84\uDC88-\uDC8E\uDC90\uDC92-\uDCA9\uDCAB-\uDCFC\uDCFF-\uDD3D\uDD4B-\uDD4E\uDD50-\uDD67\uDDA4\uDDFB-\uDE2D\uDE2F-\uDE34\uDE37-\uDE41\uDE43\uDE44\uDE48-\uDE4A\uDE80-\uDEA2\uDEA4-\uDEB3\uDEB7-\uDEBF\uDEC1-\uDEC5\uDED0-\uDED2\uDED5-\uDED7\uDEDC-\uDEDF\uDEEB\uDEEC\uDEF4-\uDEFC\uDFE0-\uDFEB\uDFF0]|\uDC08(?:\u200D\u2B1B)?|\uDC15(?:\u200D\uD83E\uDDBA)?|\uDC26(?:\u200D(?:\u2B1B|\uD83D\uDD25))?|\uDC3B(?:\u200D\u2744\uFE0F?)?|\uDC41\uFE0F?(?:\u200D\uD83D\uDDE8\uFE0F?)?|\uDC68(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\u2764\uFE0F?\u200D\uD83D(?:\uDC8B\u200D\uD83D)?\uDC68|\uD83C[\uDF3E\uDF73\uDF7C\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D(?:[\uDC68\uDC69]\u200D\uD83D(?:\uDC66(?:\u200D\uD83D\uDC66)?|\uDC67(?:\u200D\uD83D[\uDC66\uDC67])?)|[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uDC66(?:\u200D\uD83D\uDC66)?|\uDC67(?:\u200D\uD83D[\uDC66\uDC67])?)|\uD83E(?:[\uDDAF\uDDBC\uDDBD](?:\u200D\u27A1\uFE0F?)?|[\uDDB0-\uDDB3]))|\uD83C(?:\uDFFB(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\u2764\uFE0F?\u200D\uD83D(?:\uDC8B\u200D\uD83D)?\uDC68\uD83C[\uDFFB-\uDFFF]|\uD83C[\uDF3E\uDF73\uDF7C\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E(?:[\uDDAF\uDDBC\uDDBD](?:\u200D\u27A1\uFE0F?)?|[\uDDB0-\uDDB3]|\uDD1D\u200D\uD83D\uDC68\uD83C[\uDFFC-\uDFFF])))?|\uDFFC(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\u2764\uFE0F?\u200D\uD83D(?:\uDC8B\u200D\uD83D)?\uDC68\uD83C[\uDFFB-\uDFFF]|\uD83C[\uDF3E\uDF73\uDF7C\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E(?:[\uDDAF\uDDBC\uDDBD](?:\u200D\u27A1\uFE0F?)?|[\uDDB0-\uDDB3]|\uDD1D\u200D\uD83D\uDC68\uD83C[\uDFFB\uDFFD-\uDFFF])))?|\uDFFD(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\u2764\uFE0F?\u200D\uD83D(?:\uDC8B\u200D\uD83D)?\uDC68\uD83C[\uDFFB-\uDFFF]|\uD83C[\uDF3E\uDF73\uDF7C\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E(?:[\uDDAF\uDDBC\uDDBD](?:\u200D\u27A1\uFE0F?)?|[\uDDB0-\uDDB3]|\uDD1D\u200D\uD83D\uDC68\uD83C[\uDFFB\uDFFC\uDFFE\uDFFF])))?|\uDFFE(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\u2764\uFE0F?\u200D\uD83D(?:\uDC8B\u200D\uD83D)?\uDC68\uD83C[\uDFFB-\uDFFF]|\uD83C[\uDF3E\uDF73\uDF7C\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E(?:[\uDDAF\uDDBC\uDDBD](?:\u200D\u27A1\uFE0F?)?|[\uDDB0-\uDDB3]|\uDD1D\u200D\uD83D\uDC68\uD83C[\uDFFB-\uDFFD\uDFFF])))?|\uDFFF(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\u2764\uFE0F?\u200D\uD83D(?:\uDC8B\u200D\uD83D)?\uDC68\uD83C[\uDFFB-\uDFFF]|\uD83C[\uDF3E\uDF73\uDF7C\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E(?:[\uDDAF\uDDBC\uDDBD](?:\u200D\u27A1\uFE0F?)?|[\uDDB0-\uDDB3]|\uDD1D\u200D\uD83D\uDC68\uD83C[\uDFFB-\uDFFE])))?))?|\uDC69(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\u2764\uFE0F?\u200D\uD83D(?:\uDC8B\u200D\uD83D)?[\uDC68\uDC69]|\uD83C[\uDF3E\uDF73\uDF7C\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D(?:[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uDC66(?:\u200D\uD83D\uDC66)?|\uDC67(?:\u200D\uD83D[\uDC66\uDC67])?|\uDC69\u200D\uD83D(?:\uDC66(?:\u200D\uD83D\uDC66)?|\uDC67(?:\u200D\uD83D[\uDC66\uDC67])?))|\uD83E(?:[\uDDAF\uDDBC\uDDBD](?:\u200D\u27A1\uFE0F?)?|[\uDDB0-\uDDB3]))|\uD83C(?:\uDFFB(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\u2764\uFE0F?\u200D\uD83D(?:[\uDC68\uDC69]|\uDC8B\u200D\uD83D[\uDC68\uDC69])\uD83C[\uDFFB-\uDFFF]|\uD83C[\uDF3E\uDF73\uDF7C\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E(?:[\uDDAF\uDDBC\uDDBD](?:\u200D\u27A1\uFE0F?)?|[\uDDB0-\uDDB3]|\uDD1D\u200D\uD83D[\uDC68\uDC69]\uD83C[\uDFFC-\uDFFF])))?|\uDFFC(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\u2764\uFE0F?\u200D\uD83D(?:[\uDC68\uDC69]|\uDC8B\u200D\uD83D[\uDC68\uDC69])\uD83C[\uDFFB-\uDFFF]|\uD83C[\uDF3E\uDF73\uDF7C\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E(?:[\uDDAF\uDDBC\uDDBD](?:\u200D\u27A1\uFE0F?)?|[\uDDB0-\uDDB3]|\uDD1D\u200D\uD83D[\uDC68\uDC69]\uD83C[\uDFFB\uDFFD-\uDFFF])))?|\uDFFD(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\u2764\uFE0F?\u200D\uD83D(?:[\uDC68\uDC69]|\uDC8B\u200D\uD83D[\uDC68\uDC69])\uD83C[\uDFFB-\uDFFF]|\uD83C[\uDF3E\uDF73\uDF7C\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E(?:[\uDDAF\uDDBC\uDDBD](?:\u200D\u27A1\uFE0F?)?|[\uDDB0-\uDDB3]|\uDD1D\u200D\uD83D[\uDC68\uDC69]\uD83C[\uDFFB\uDFFC\uDFFE\uDFFF])))?|\uDFFE(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\u2764\uFE0F?\u200D\uD83D(?:[\uDC68\uDC69]|\uDC8B\u200D\uD83D[\uDC68\uDC69])\uD83C[\uDFFB-\uDFFF]|\uD83C[\uDF3E\uDF73\uDF7C\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E(?:[\uDDAF\uDDBC\uDDBD](?:\u200D\u27A1\uFE0F?)?|[\uDDB0-\uDDB3]|\uDD1D\u200D\uD83D[\uDC68\uDC69]\uD83C[\uDFFB-\uDFFD\uDFFF])))?|\uDFFF(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\u2764\uFE0F?\u200D\uD83D(?:[\uDC68\uDC69]|\uDC8B\u200D\uD83D[\uDC68\uDC69])\uD83C[\uDFFB-\uDFFF]|\uD83C[\uDF3E\uDF73\uDF7C\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E(?:[\uDDAF\uDDBC\uDDBD](?:\u200D\u27A1\uFE0F?)?|[\uDDB0-\uDDB3]|\uDD1D\u200D\uD83D[\uDC68\uDC69]\uD83C[\uDFFB-\uDFFE])))?))?|\uDC6F(?:\u200D[\u2640\u2642]\uFE0F?)?|\uDD75(?:\uD83C[\uDFFB-\uDFFF]|\uFE0F)?(?:\u200D[\u2640\u2642]\uFE0F?)?|\uDE2E(?:\u200D\uD83D\uDCA8)?|\uDE35(?:\u200D\uD83D\uDCAB)?|\uDE36(?:\u200D\uD83C\uDF2B\uFE0F?)?|\uDE42(?:\u200D[\u2194\u2195]\uFE0F?)?|\uDEB6(?:\uD83C[\uDFFB-\uDFFF])?(?:\u200D(?:[\u2640\u2642]\uFE0F?(?:\u200D\u27A1\uFE0F?)?|\u27A1\uFE0F?))?)|\uD83E(?:[\uDD0C\uDD0F\uDD18-\uDD1F\uDD30-\uDD34\uDD36\uDD77\uDDB5\uDDB6\uDDBB\uDDD2\uDDD3\uDDD5\uDEC3-\uDEC5\uDEF0\uDEF2-\uDEF8](?:\uD83C[\uDFFB-\uDFFF])?|[\uDD26\uDD35\uDD37-\uDD39\uDD3D\uDD3E\uDDB8\uDDB9\uDDCD\uDDCF\uDDD4\uDDD6-\uDDDD](?:\uD83C[\uDFFB-\uDFFF])?(?:\u200D[\u2640\u2642]\uFE0F?)?|[\uDDDE\uDDDF](?:\u200D[\u2640\u2642]\uFE0F?)?|[\uDD0D\uDD0E\uDD10-\uDD17\uDD20-\uDD25\uDD27-\uDD2F\uDD3A\uDD3F-\uDD45\uDD47-\uDD76\uDD78-\uDDB4\uDDB7\uDDBA\uDDBC-\uDDCC\uDDD0\uDDE0-\uDDFF\uDE70-\uDE7C\uDE80-\uDE89\uDE8F-\uDEC2\uDEC6\uDECE-\uDEDC\uDEDF-\uDEE9]|\uDD3C(?:\u200D[\u2640\u2642]\uFE0F?|\uD83C[\uDFFB-\uDFFF])?|\uDDCE(?:\uD83C[\uDFFB-\uDFFF])?(?:\u200D(?:[\u2640\u2642]\uFE0F?(?:\u200D\u27A1\uFE0F?)?|\u27A1\uFE0F?))?|\uDDD1(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\uD83C[\uDF3E\uDF73\uDF7C\uDF84\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E(?:[\uDDAF\uDDBC\uDDBD](?:\u200D\u27A1\uFE0F?)?|[\uDDB0-\uDDB3]|\uDD1D\u200D\uD83E\uDDD1|\uDDD1\u200D\uD83E\uDDD2(?:\u200D\uD83E\uDDD2)?|\uDDD2(?:\u200D\uD83E\uDDD2)?))|\uD83C(?:\uDFFB(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\u2764\uFE0F?\u200D(?:\uD83D\uDC8B\u200D)?\uD83E\uDDD1\uD83C[\uDFFC-\uDFFF]|\uD83C[\uDF3E\uDF73\uDF7C\uDF84\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E(?:[\uDDAF\uDDBC\uDDBD](?:\u200D\u27A1\uFE0F?)?|[\uDDB0-\uDDB3]|\uDD1D\u200D\uD83E\uDDD1\uD83C[\uDFFB-\uDFFF])))?|\uDFFC(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\u2764\uFE0F?\u200D(?:\uD83D\uDC8B\u200D)?\uD83E\uDDD1\uD83C[\uDFFB\uDFFD-\uDFFF]|\uD83C[\uDF3E\uDF73\uDF7C\uDF84\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E(?:[\uDDAF\uDDBC\uDDBD](?:\u200D\u27A1\uFE0F?)?|[\uDDB0-\uDDB3]|\uDD1D\u200D\uD83E\uDDD1\uD83C[\uDFFB-\uDFFF])))?|\uDFFD(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\u2764\uFE0F?\u200D(?:\uD83D\uDC8B\u200D)?\uD83E\uDDD1\uD83C[\uDFFB\uDFFC\uDFFE\uDFFF]|\uD83C[\uDF3E\uDF73\uDF7C\uDF84\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E(?:[\uDDAF\uDDBC\uDDBD](?:\u200D\u27A1\uFE0F?)?|[\uDDB0-\uDDB3]|\uDD1D\u200D\uD83E\uDDD1\uD83C[\uDFFB-\uDFFF])))?|\uDFFE(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\u2764\uFE0F?\u200D(?:\uD83D\uDC8B\u200D)?\uD83E\uDDD1\uD83C[\uDFFB-\uDFFD\uDFFF]|\uD83C[\uDF3E\uDF73\uDF7C\uDF84\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E(?:[\uDDAF\uDDBC\uDDBD](?:\u200D\u27A1\uFE0F?)?|[\uDDB0-\uDDB3]|\uDD1D\u200D\uD83E\uDDD1\uD83C[\uDFFB-\uDFFF])))?|\uDFFF(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\u2764\uFE0F?\u200D(?:\uD83D\uDC8B\u200D)?\uD83E\uDDD1\uD83C[\uDFFB-\uDFFE]|\uD83C[\uDF3E\uDF73\uDF7C\uDF84\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E(?:[\uDDAF\uDDBC\uDDBD](?:\u200D\u27A1\uFE0F?)?|[\uDDB0-\uDDB3]|\uDD1D\u200D\uD83E\uDDD1\uD83C[\uDFFB-\uDFFF])))?))?|\uDEF1(?:\uD83C(?:\uDFFB(?:\u200D\uD83E\uDEF2\uD83C[\uDFFC-\uDFFF])?|\uDFFC(?:\u200D\uD83E\uDEF2\uD83C[\uDFFB\uDFFD-\uDFFF])?|\uDFFD(?:\u200D\uD83E\uDEF2\uD83C[\uDFFB\uDFFC\uDFFE\uDFFF])?|\uDFFE(?:\u200D\uD83E\uDEF2\uD83C[\uDFFB-\uDFFD\uDFFF])?|\uDFFF(?:\u200D\uD83E\uDEF2\uD83C[\uDFFB-\uDFFE])?))?)/g;
|
|
12694
|
+
var Ff = Cf;
|
|
12695
|
+
const xf = () => /[#*0-9]\uFE0F?\u20E3|[\xA9\xAE\u203C\u2049\u2122\u2139\u2194-\u2199\u21A9\u21AA\u231A\u231B\u2328\u23CF\u23ED-\u23EF\u23F1\u23F2\u23F8-\u23FA\u24C2\u25AA\u25AB\u25B6\u25C0\u25FB\u25FC\u25FE\u2600-\u2604\u260E\u2611\u2614\u2615\u2618\u2620\u2622\u2623\u2626\u262A\u262E\u262F\u2638-\u263A\u2640\u2642\u2648-\u2653\u265F\u2660\u2663\u2665\u2666\u2668\u267B\u267E\u267F\u2692\u2694-\u2697\u2699\u269B\u269C\u26A0\u26A7\u26AA\u26B0\u26B1\u26BD\u26BE\u26C4\u26C8\u26CF\u26D1\u26E9\u26F0-\u26F5\u26F7\u26F8\u26FA\u2702\u2708\u2709\u270F\u2712\u2714\u2716\u271D\u2721\u2733\u2734\u2744\u2747\u2757\u2763\u27A1\u2934\u2935\u2B05-\u2B07\u2B1B\u2B1C\u2B55\u3030\u303D\u3297\u3299]\uFE0F?|[\u261D\u270C\u270D](?:\uD83C[\uDFFB-\uDFFF]|\uFE0F)?|[\u270A\u270B](?:\uD83C[\uDFFB-\uDFFF])?|[\u23E9-\u23EC\u23F0\u23F3\u25FD\u2693\u26A1\u26AB\u26C5\u26CE\u26D4\u26EA\u26FD\u2705\u2728\u274C\u274E\u2753-\u2755\u2795-\u2797\u27B0\u27BF\u2B50]|\u26D3\uFE0F?(?:\u200D\uD83D\uDCA5)?|\u26F9(?:\uD83C[\uDFFB-\uDFFF]|\uFE0F)?(?:\u200D[\u2640\u2642]\uFE0F?)?|\u2764\uFE0F?(?:\u200D(?:\uD83D\uDD25|\uD83E\uDE79))?|\uD83C(?:[\uDC04\uDD70\uDD71\uDD7E\uDD7F\uDE02\uDE37\uDF21\uDF24-\uDF2C\uDF36\uDF7D\uDF96\uDF97\uDF99-\uDF9B\uDF9E\uDF9F\uDFCD\uDFCE\uDFD4-\uDFDF\uDFF5\uDFF7]\uFE0F?|[\uDF85\uDFC2\uDFC7](?:\uD83C[\uDFFB-\uDFFF])?|[\uDFC4\uDFCA](?:\uD83C[\uDFFB-\uDFFF])?(?:\u200D[\u2640\u2642]\uFE0F?)?|[\uDFCB\uDFCC](?:\uD83C[\uDFFB-\uDFFF]|\uFE0F)?(?:\u200D[\u2640\u2642]\uFE0F?)?|[\uDCCF\uDD8E\uDD91-\uDD9A\uDE01\uDE1A\uDE2F\uDE32-\uDE36\uDE38-\uDE3A\uDE50\uDE51\uDF00-\uDF20\uDF2D-\uDF35\uDF37-\uDF43\uDF45-\uDF4A\uDF4C-\uDF7C\uDF7E-\uDF84\uDF86-\uDF93\uDFA0-\uDFC1\uDFC5\uDFC6\uDFC8\uDFC9\uDFCF-\uDFD3\uDFE0-\uDFF0\uDFF8-\uDFFF]|\uDDE6\uD83C[\uDDE8-\uDDEC\uDDEE\uDDF1\uDDF2\uDDF4\uDDF6-\uDDFA\uDDFC\uDDFD\uDDFF]|\uDDE7\uD83C[\uDDE6\uDDE7\uDDE9-\uDDEF\uDDF1-\uDDF4\uDDF6-\uDDF9\uDDFB\uDDFC\uDDFE\uDDFF]|\uDDE8\uD83C[\uDDE6\uDDE8\uDDE9\uDDEB-\uDDEE\uDDF0-\uDDF7\uDDFA-\uDDFF]|\uDDE9\uD83C[\uDDEA\uDDEC\uDDEF\uDDF0\uDDF2\uDDF4\uDDFF]|\uDDEA\uD83C[\uDDE6\uDDE8\uDDEA\uDDEC\uDDED\uDDF7-\uDDFA]|\uDDEB\uD83C[\uDDEE-\uDDF0\uDDF2\uDDF4\uDDF7]|\uDDEC\uD83C[\uDDE6\uDDE7\uDDE9-\uDDEE\uDDF1-\uDDF3\uDDF5-\uDDFA\uDDFC\uDDFE]|\uDDED\uD83C[\uDDF0\uDDF2\uDDF3\uDDF7\uDDF9\uDDFA]|\uDDEE\uD83C[\uDDE8-\uDDEA\uDDF1-\uDDF4\uDDF6-\uDDF9]|\uDDEF\uD83C[\uDDEA\uDDF2\uDDF4\uDDF5]|\uDDF0\uD83C[\uDDEA\uDDEC-\uDDEE\uDDF2\uDDF3\uDDF5\uDDF7\uDDFC\uDDFE\uDDFF]|\uDDF1\uD83C[\uDDE6-\uDDE8\uDDEE\uDDF0\uDDF7-\uDDFB\uDDFE]|\uDDF2\uD83C[\uDDE6\uDDE8-\uDDED\uDDF0-\uDDFF]|\uDDF3\uD83C[\uDDE6\uDDE8\uDDEA-\uDDEC\uDDEE\uDDF1\uDDF4\uDDF5\uDDF7\uDDFA\uDDFF]|\uDDF4\uD83C\uDDF2|\uDDF5\uD83C[\uDDE6\uDDEA-\uDDED\uDDF0-\uDDF3\uDDF7-\uDDF9\uDDFC\uDDFE]|\uDDF6\uD83C\uDDE6|\uDDF7\uD83C[\uDDEA\uDDF4\uDDF8\uDDFA\uDDFC]|\uDDF8\uD83C[\uDDE6-\uDDEA\uDDEC-\uDDF4\uDDF7-\uDDF9\uDDFB\uDDFD-\uDDFF]|\uDDF9\uD83C[\uDDE6\uDDE8\uDDE9\uDDEB-\uDDED\uDDEF-\uDDF4\uDDF7\uDDF9\uDDFB\uDDFC\uDDFF]|\uDDFA\uD83C[\uDDE6\uDDEC\uDDF2\uDDF3\uDDF8\uDDFE\uDDFF]|\uDDFB\uD83C[\uDDE6\uDDE8\uDDEA\uDDEC\uDDEE\uDDF3\uDDFA]|\uDDFC\uD83C[\uDDEB\uDDF8]|\uDDFD\uD83C\uDDF0|\uDDFE\uD83C[\uDDEA\uDDF9]|\uDDFF\uD83C[\uDDE6\uDDF2\uDDFC]|\uDF44(?:\u200D\uD83D\uDFEB)?|\uDF4B(?:\u200D\uD83D\uDFE9)?|\uDFC3(?:\uD83C[\uDFFB-\uDFFF])?(?:\u200D(?:[\u2640\u2642]\uFE0F?(?:\u200D\u27A1\uFE0F?)?|\u27A1\uFE0F?))?|\uDFF3\uFE0F?(?:\u200D(?:\u26A7\uFE0F?|\uD83C\uDF08))?|\uDFF4(?:\u200D\u2620\uFE0F?|\uDB40\uDC67\uDB40\uDC62\uDB40(?:\uDC65\uDB40\uDC6E\uDB40\uDC67|\uDC73\uDB40\uDC63\uDB40\uDC74|\uDC77\uDB40\uDC6C\uDB40\uDC73)\uDB40\uDC7F)?)|\uD83D(?:[\uDC3F\uDCFD\uDD49\uDD4A\uDD6F\uDD70\uDD73\uDD76-\uDD79\uDD87\uDD8A-\uDD8D\uDDA5\uDDA8\uDDB1\uDDB2\uDDBC\uDDC2-\uDDC4\uDDD1-\uDDD3\uDDDC-\uDDDE\uDDE1\uDDE3\uDDE8\uDDEF\uDDF3\uDDFA\uDECB\uDECD-\uDECF\uDEE0-\uDEE5\uDEE9\uDEF0\uDEF3]\uFE0F?|[\uDC42\uDC43\uDC46-\uDC50\uDC66\uDC67\uDC6B-\uDC6D\uDC72\uDC74-\uDC76\uDC78\uDC7C\uDC83\uDC85\uDC8F\uDC91\uDCAA\uDD7A\uDD95\uDD96\uDE4C\uDE4F\uDEC0\uDECC](?:\uD83C[\uDFFB-\uDFFF])?|[\uDC6E-\uDC71\uDC73\uDC77\uDC81\uDC82\uDC86\uDC87\uDE45-\uDE47\uDE4B\uDE4D\uDE4E\uDEA3\uDEB4\uDEB5](?:\uD83C[\uDFFB-\uDFFF])?(?:\u200D[\u2640\u2642]\uFE0F?)?|[\uDD74\uDD90](?:\uD83C[\uDFFB-\uDFFF]|\uFE0F)?|[\uDC00-\uDC07\uDC09-\uDC14\uDC16-\uDC25\uDC27-\uDC3A\uDC3C-\uDC3E\uDC40\uDC44\uDC45\uDC51-\uDC65\uDC6A\uDC79-\uDC7B\uDC7D-\uDC80\uDC84\uDC88-\uDC8E\uDC90\uDC92-\uDCA9\uDCAB-\uDCFC\uDCFF-\uDD3D\uDD4B-\uDD4E\uDD50-\uDD67\uDDA4\uDDFB-\uDE2D\uDE2F-\uDE34\uDE37-\uDE41\uDE43\uDE44\uDE48-\uDE4A\uDE80-\uDEA2\uDEA4-\uDEB3\uDEB7-\uDEBF\uDEC1-\uDEC5\uDED0-\uDED2\uDED5-\uDED8\uDEDC-\uDEDF\uDEEB\uDEEC\uDEF4-\uDEFC\uDFE0-\uDFEB\uDFF0]|\uDC08(?:\u200D\u2B1B)?|\uDC15(?:\u200D\uD83E\uDDBA)?|\uDC26(?:\u200D(?:\u2B1B|\uD83D\uDD25))?|\uDC3B(?:\u200D\u2744\uFE0F?)?|\uDC41\uFE0F?(?:\u200D\uD83D\uDDE8\uFE0F?)?|\uDC68(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\u2764\uFE0F?\u200D\uD83D(?:\uDC8B\u200D\uD83D)?\uDC68|\uD83C[\uDF3E\uDF73\uDF7C\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D(?:[\uDC68\uDC69]\u200D\uD83D(?:\uDC66(?:\u200D\uD83D\uDC66)?|\uDC67(?:\u200D\uD83D[\uDC66\uDC67])?)|[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uDC66(?:\u200D\uD83D\uDC66)?|\uDC67(?:\u200D\uD83D[\uDC66\uDC67])?)|\uD83E(?:[\uDDAF\uDDBC\uDDBD](?:\u200D\u27A1\uFE0F?)?|[\uDDB0-\uDDB3]))|\uD83C(?:\uDFFB(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\u2764\uFE0F?\u200D\uD83D(?:\uDC8B\u200D\uD83D)?\uDC68\uD83C[\uDFFB-\uDFFF]|\uD83C[\uDF3E\uDF73\uDF7C\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D(?:[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uDC30\u200D\uD83D\uDC68\uD83C[\uDFFC-\uDFFF])|\uD83E(?:[\uDD1D\uDEEF]\u200D\uD83D\uDC68\uD83C[\uDFFC-\uDFFF]|[\uDDAF\uDDBC\uDDBD](?:\u200D\u27A1\uFE0F?)?|[\uDDB0-\uDDB3])))?|\uDFFC(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\u2764\uFE0F?\u200D\uD83D(?:\uDC8B\u200D\uD83D)?\uDC68\uD83C[\uDFFB-\uDFFF]|\uD83C[\uDF3E\uDF73\uDF7C\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D(?:[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uDC30\u200D\uD83D\uDC68\uD83C[\uDFFB\uDFFD-\uDFFF])|\uD83E(?:[\uDD1D\uDEEF]\u200D\uD83D\uDC68\uD83C[\uDFFB\uDFFD-\uDFFF]|[\uDDAF\uDDBC\uDDBD](?:\u200D\u27A1\uFE0F?)?|[\uDDB0-\uDDB3])))?|\uDFFD(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\u2764\uFE0F?\u200D\uD83D(?:\uDC8B\u200D\uD83D)?\uDC68\uD83C[\uDFFB-\uDFFF]|\uD83C[\uDF3E\uDF73\uDF7C\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D(?:[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uDC30\u200D\uD83D\uDC68\uD83C[\uDFFB\uDFFC\uDFFE\uDFFF])|\uD83E(?:[\uDD1D\uDEEF]\u200D\uD83D\uDC68\uD83C[\uDFFB\uDFFC\uDFFE\uDFFF]|[\uDDAF\uDDBC\uDDBD](?:\u200D\u27A1\uFE0F?)?|[\uDDB0-\uDDB3])))?|\uDFFE(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\u2764\uFE0F?\u200D\uD83D(?:\uDC8B\u200D\uD83D)?\uDC68\uD83C[\uDFFB-\uDFFF]|\uD83C[\uDF3E\uDF73\uDF7C\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D(?:[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uDC30\u200D\uD83D\uDC68\uD83C[\uDFFB-\uDFFD\uDFFF])|\uD83E(?:[\uDD1D\uDEEF]\u200D\uD83D\uDC68\uD83C[\uDFFB-\uDFFD\uDFFF]|[\uDDAF\uDDBC\uDDBD](?:\u200D\u27A1\uFE0F?)?|[\uDDB0-\uDDB3])))?|\uDFFF(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\u2764\uFE0F?\u200D\uD83D(?:\uDC8B\u200D\uD83D)?\uDC68\uD83C[\uDFFB-\uDFFF]|\uD83C[\uDF3E\uDF73\uDF7C\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D(?:[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uDC30\u200D\uD83D\uDC68\uD83C[\uDFFB-\uDFFE])|\uD83E(?:[\uDD1D\uDEEF]\u200D\uD83D\uDC68\uD83C[\uDFFB-\uDFFE]|[\uDDAF\uDDBC\uDDBD](?:\u200D\u27A1\uFE0F?)?|[\uDDB0-\uDDB3])))?))?|\uDC69(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\u2764\uFE0F?\u200D\uD83D(?:\uDC8B\u200D\uD83D)?[\uDC68\uDC69]|\uD83C[\uDF3E\uDF73\uDF7C\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D(?:[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uDC66(?:\u200D\uD83D\uDC66)?|\uDC67(?:\u200D\uD83D[\uDC66\uDC67])?|\uDC69\u200D\uD83D(?:\uDC66(?:\u200D\uD83D\uDC66)?|\uDC67(?:\u200D\uD83D[\uDC66\uDC67])?))|\uD83E(?:[\uDDAF\uDDBC\uDDBD](?:\u200D\u27A1\uFE0F?)?|[\uDDB0-\uDDB3]))|\uD83C(?:\uDFFB(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\u2764\uFE0F?\u200D\uD83D(?:[\uDC68\uDC69]|\uDC8B\u200D\uD83D[\uDC68\uDC69])\uD83C[\uDFFB-\uDFFF]|\uD83C[\uDF3E\uDF73\uDF7C\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D(?:[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uDC30\u200D\uD83D\uDC69\uD83C[\uDFFC-\uDFFF])|\uD83E(?:[\uDDAF\uDDBC\uDDBD](?:\u200D\u27A1\uFE0F?)?|[\uDDB0-\uDDB3]|\uDD1D\u200D\uD83D[\uDC68\uDC69]\uD83C[\uDFFC-\uDFFF]|\uDEEF\u200D\uD83D\uDC69\uD83C[\uDFFC-\uDFFF])))?|\uDFFC(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\u2764\uFE0F?\u200D\uD83D(?:[\uDC68\uDC69]|\uDC8B\u200D\uD83D[\uDC68\uDC69])\uD83C[\uDFFB-\uDFFF]|\uD83C[\uDF3E\uDF73\uDF7C\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D(?:[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uDC30\u200D\uD83D\uDC69\uD83C[\uDFFB\uDFFD-\uDFFF])|\uD83E(?:[\uDDAF\uDDBC\uDDBD](?:\u200D\u27A1\uFE0F?)?|[\uDDB0-\uDDB3]|\uDD1D\u200D\uD83D[\uDC68\uDC69]\uD83C[\uDFFB\uDFFD-\uDFFF]|\uDEEF\u200D\uD83D\uDC69\uD83C[\uDFFB\uDFFD-\uDFFF])))?|\uDFFD(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\u2764\uFE0F?\u200D\uD83D(?:[\uDC68\uDC69]|\uDC8B\u200D\uD83D[\uDC68\uDC69])\uD83C[\uDFFB-\uDFFF]|\uD83C[\uDF3E\uDF73\uDF7C\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D(?:[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uDC30\u200D\uD83D\uDC69\uD83C[\uDFFB\uDFFC\uDFFE\uDFFF])|\uD83E(?:[\uDDAF\uDDBC\uDDBD](?:\u200D\u27A1\uFE0F?)?|[\uDDB0-\uDDB3]|\uDD1D\u200D\uD83D[\uDC68\uDC69]\uD83C[\uDFFB\uDFFC\uDFFE\uDFFF]|\uDEEF\u200D\uD83D\uDC69\uD83C[\uDFFB\uDFFC\uDFFE\uDFFF])))?|\uDFFE(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\u2764\uFE0F?\u200D\uD83D(?:[\uDC68\uDC69]|\uDC8B\u200D\uD83D[\uDC68\uDC69])\uD83C[\uDFFB-\uDFFF]|\uD83C[\uDF3E\uDF73\uDF7C\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D(?:[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uDC30\u200D\uD83D\uDC69\uD83C[\uDFFB-\uDFFD\uDFFF])|\uD83E(?:[\uDDAF\uDDBC\uDDBD](?:\u200D\u27A1\uFE0F?)?|[\uDDB0-\uDDB3]|\uDD1D\u200D\uD83D[\uDC68\uDC69]\uD83C[\uDFFB-\uDFFD\uDFFF]|\uDEEF\u200D\uD83D\uDC69\uD83C[\uDFFB-\uDFFD\uDFFF])))?|\uDFFF(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\u2764\uFE0F?\u200D\uD83D(?:[\uDC68\uDC69]|\uDC8B\u200D\uD83D[\uDC68\uDC69])\uD83C[\uDFFB-\uDFFF]|\uD83C[\uDF3E\uDF73\uDF7C\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D(?:[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uDC30\u200D\uD83D\uDC69\uD83C[\uDFFB-\uDFFE])|\uD83E(?:[\uDDAF\uDDBC\uDDBD](?:\u200D\u27A1\uFE0F?)?|[\uDDB0-\uDDB3]|\uDD1D\u200D\uD83D[\uDC68\uDC69]\uD83C[\uDFFB-\uDFFE]|\uDEEF\u200D\uD83D\uDC69\uD83C[\uDFFB-\uDFFE])))?))?|\uDD75(?:\uD83C[\uDFFB-\uDFFF]|\uFE0F)?(?:\u200D[\u2640\u2642]\uFE0F?)?|\uDE2E(?:\u200D\uD83D\uDCA8)?|\uDE35(?:\u200D\uD83D\uDCAB)?|\uDE36(?:\u200D\uD83C\uDF2B\uFE0F?)?|\uDE42(?:\u200D[\u2194\u2195]\uFE0F?)?|\uDEB6(?:\uD83C[\uDFFB-\uDFFF])?(?:\u200D(?:[\u2640\u2642]\uFE0F?(?:\u200D\u27A1\uFE0F?)?|\u27A1\uFE0F?))?)|\uD83E(?:[\uDD0C\uDD0F\uDD18-\uDD1F\uDD30-\uDD34\uDD36\uDD77\uDDB5\uDDB6\uDDBB\uDDD2\uDDD3\uDDD5\uDEC3-\uDEC5\uDEF0\uDEF2-\uDEF8](?:\uD83C[\uDFFB-\uDFFF])?|[\uDD26\uDD35\uDD37-\uDD39\uDD3C-\uDD3E\uDDB8\uDDB9\uDDCD\uDDCF\uDDD4\uDDD6-\uDDDD](?:\uD83C[\uDFFB-\uDFFF])?(?:\u200D[\u2640\u2642]\uFE0F?)?|[\uDDDE\uDDDF](?:\u200D[\u2640\u2642]\uFE0F?)?|[\uDD0D\uDD0E\uDD10-\uDD17\uDD20-\uDD25\uDD27-\uDD2F\uDD3A\uDD3F-\uDD45\uDD47-\uDD76\uDD78-\uDDB4\uDDB7\uDDBA\uDDBC-\uDDCC\uDDD0\uDDE0-\uDDFF\uDE70-\uDE7C\uDE80-\uDE8A\uDE8E-\uDEC2\uDEC6\uDEC8\uDECD-\uDEDC\uDEDF-\uDEEA\uDEEF]|\uDDCE(?:\uD83C[\uDFFB-\uDFFF])?(?:\u200D(?:[\u2640\u2642]\uFE0F?(?:\u200D\u27A1\uFE0F?)?|\u27A1\uFE0F?))?|\uDDD1(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\uD83C[\uDF3E\uDF73\uDF7C\uDF84\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E(?:[\uDDAF\uDDBC\uDDBD](?:\u200D\u27A1\uFE0F?)?|[\uDDB0-\uDDB3\uDE70]|\uDD1D\u200D\uD83E\uDDD1|\uDDD1\u200D\uD83E\uDDD2(?:\u200D\uD83E\uDDD2)?|\uDDD2(?:\u200D\uD83E\uDDD2)?))|\uD83C(?:\uDFFB(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\u2764\uFE0F?\u200D(?:\uD83D\uDC8B\u200D)?\uD83E\uDDD1\uD83C[\uDFFC-\uDFFF]|\uD83C[\uDF3E\uDF73\uDF7C\uDF84\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D(?:[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uDC30\u200D\uD83E\uDDD1\uD83C[\uDFFC-\uDFFF])|\uD83E(?:[\uDDAF\uDDBC\uDDBD](?:\u200D\u27A1\uFE0F?)?|[\uDDB0-\uDDB3\uDE70]|\uDD1D\u200D\uD83E\uDDD1\uD83C[\uDFFB-\uDFFF]|\uDEEF\u200D\uD83E\uDDD1\uD83C[\uDFFC-\uDFFF])))?|\uDFFC(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\u2764\uFE0F?\u200D(?:\uD83D\uDC8B\u200D)?\uD83E\uDDD1\uD83C[\uDFFB\uDFFD-\uDFFF]|\uD83C[\uDF3E\uDF73\uDF7C\uDF84\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D(?:[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uDC30\u200D\uD83E\uDDD1\uD83C[\uDFFB\uDFFD-\uDFFF])|\uD83E(?:[\uDDAF\uDDBC\uDDBD](?:\u200D\u27A1\uFE0F?)?|[\uDDB0-\uDDB3\uDE70]|\uDD1D\u200D\uD83E\uDDD1\uD83C[\uDFFB-\uDFFF]|\uDEEF\u200D\uD83E\uDDD1\uD83C[\uDFFB\uDFFD-\uDFFF])))?|\uDFFD(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\u2764\uFE0F?\u200D(?:\uD83D\uDC8B\u200D)?\uD83E\uDDD1\uD83C[\uDFFB\uDFFC\uDFFE\uDFFF]|\uD83C[\uDF3E\uDF73\uDF7C\uDF84\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D(?:[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uDC30\u200D\uD83E\uDDD1\uD83C[\uDFFB\uDFFC\uDFFE\uDFFF])|\uD83E(?:[\uDDAF\uDDBC\uDDBD](?:\u200D\u27A1\uFE0F?)?|[\uDDB0-\uDDB3\uDE70]|\uDD1D\u200D\uD83E\uDDD1\uD83C[\uDFFB-\uDFFF]|\uDEEF\u200D\uD83E\uDDD1\uD83C[\uDFFB\uDFFC\uDFFE\uDFFF])))?|\uDFFE(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\u2764\uFE0F?\u200D(?:\uD83D\uDC8B\u200D)?\uD83E\uDDD1\uD83C[\uDFFB-\uDFFD\uDFFF]|\uD83C[\uDF3E\uDF73\uDF7C\uDF84\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D(?:[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uDC30\u200D\uD83E\uDDD1\uD83C[\uDFFB-\uDFFD\uDFFF])|\uD83E(?:[\uDDAF\uDDBC\uDDBD](?:\u200D\u27A1\uFE0F?)?|[\uDDB0-\uDDB3\uDE70]|\uDD1D\u200D\uD83E\uDDD1\uD83C[\uDFFB-\uDFFF]|\uDEEF\u200D\uD83E\uDDD1\uD83C[\uDFFB-\uDFFD\uDFFF])))?|\uDFFF(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\u2764\uFE0F?\u200D(?:\uD83D\uDC8B\u200D)?\uD83E\uDDD1\uD83C[\uDFFB-\uDFFE]|\uD83C[\uDF3E\uDF73\uDF7C\uDF84\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D(?:[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uDC30\u200D\uD83E\uDDD1\uD83C[\uDFFB-\uDFFE])|\uD83E(?:[\uDDAF\uDDBC\uDDBD](?:\u200D\u27A1\uFE0F?)?|[\uDDB0-\uDDB3\uDE70]|\uDD1D\u200D\uD83E\uDDD1\uD83C[\uDFFB-\uDFFF]|\uDEEF\u200D\uD83E\uDDD1\uD83C[\uDFFB-\uDFFE])))?))?|\uDEF1(?:\uD83C(?:\uDFFB(?:\u200D\uD83E\uDEF2\uD83C[\uDFFC-\uDFFF])?|\uDFFC(?:\u200D\uD83E\uDEF2\uD83C[\uDFFB\uDFFD-\uDFFF])?|\uDFFD(?:\u200D\uD83E\uDEF2\uD83C[\uDFFB\uDFFC\uDFFE\uDFFF])?|\uDFFE(?:\u200D\uD83E\uDEF2\uD83C[\uDFFB-\uDFFD\uDFFF])?|\uDFFF(?:\u200D\uD83E\uDEF2\uD83C[\uDFFB-\uDFFE])?))?)/g;
|
|
12694
12696
|
var Ya = /* @__PURE__ */ new Map();
|
|
12695
|
-
function
|
|
12697
|
+
function Ef(t) {
|
|
12696
12698
|
if (Ya.has(t))
|
|
12697
12699
|
return Ya.get(t);
|
|
12698
12700
|
var e = Af(t);
|
|
12699
12701
|
return Ya.set(t, e), e;
|
|
12700
12702
|
}
|
|
12701
|
-
var Af = function() {
|
|
12703
|
+
var Af = (function() {
|
|
12702
12704
|
var t = null;
|
|
12703
12705
|
try {
|
|
12704
12706
|
t = document.createElement("canvas").getContext("2d");
|
|
@@ -12718,7 +12720,7 @@ var Af = function() {
|
|
|
12718
12720
|
var l = o + i / 4 % o, p = Math.floor(i / 4 / o), c = t.getImageData(l, p, 1, 1).data;
|
|
12719
12721
|
return !(s[i] !== c[0] || s[i + 2] !== c[2] || t.measureText(n).width >= o);
|
|
12720
12722
|
};
|
|
12721
|
-
}(), sp = [
|
|
12723
|
+
})(), sp = [
|
|
12722
12724
|
{
|
|
12723
12725
|
emoji: "🇦",
|
|
12724
12726
|
name: "regional_indicator_a",
|
|
@@ -32083,7 +32085,7 @@ function Lf(t, e = JSON.stringify) {
|
|
|
32083
32085
|
function At(t, e) {
|
|
32084
32086
|
return e.find((o) => t === o.name || o.shortcodes.includes(t));
|
|
32085
32087
|
}
|
|
32086
|
-
var zf = new Q("emojiSuggestion"), Rf = /:([a-zA-Z0-9_+-]+):$/, $f = /(^|\s):([a-zA-Z0-9_+-]+):/g,
|
|
32088
|
+
var zf = new Q("emojiSuggestion"), Rf = /:([a-zA-Z0-9_+-]+):$/, $f = /(^|\s):([a-zA-Z0-9_+-]+):/g, Bf = K.create({
|
|
32087
32089
|
name: "emoji",
|
|
32088
32090
|
inline: !0,
|
|
32089
32091
|
group: "inline",
|
|
@@ -32123,7 +32125,7 @@ var zf = new Q("emojiSuggestion"), Rf = /:([a-zA-Z0-9_+-]+):$/, $f = /(^|\s):([a
|
|
|
32123
32125
|
const n = t.find((s) => s.version === a && s.emoji);
|
|
32124
32126
|
return {
|
|
32125
32127
|
...o,
|
|
32126
|
-
[a]: n ?
|
|
32128
|
+
[a]: n ? Ef(n.emoji) : !1
|
|
32127
32129
|
};
|
|
32128
32130
|
}, {});
|
|
32129
32131
|
return {
|
|
@@ -32193,7 +32195,7 @@ var zf = new Q("emojiSuggestion"), Rf = /:([a-zA-Z0-9_+-]+):$/, $f = /(^|\s):([a
|
|
|
32193
32195
|
addInputRules() {
|
|
32194
32196
|
const t = [];
|
|
32195
32197
|
if (t.push(
|
|
32196
|
-
new
|
|
32198
|
+
new ao({
|
|
32197
32199
|
find: Rf,
|
|
32198
32200
|
handler: ({ range: e, match: o, chain: a }) => {
|
|
32199
32201
|
const n = o[1];
|
|
@@ -32253,7 +32255,7 @@ var zf = new Q("emojiSuggestion"), Rf = /:([a-zA-Z0-9_+-]+):$/, $f = /(^|\s):([a
|
|
|
32253
32255
|
},
|
|
32254
32256
|
addProseMirrorPlugins() {
|
|
32255
32257
|
return [
|
|
32256
|
-
|
|
32258
|
+
Ff({
|
|
32257
32259
|
editor: this.editor,
|
|
32258
32260
|
...this.options.suggestion
|
|
32259
32261
|
}),
|
|
@@ -32279,7 +32281,7 @@ var zf = new Q("emojiSuggestion"), Rf = /:([a-zA-Z0-9_+-]+):$/, $f = /(^|\s):([a
|
|
|
32279
32281
|
const { tr: a } = o, n = is(e.doc, t);
|
|
32280
32282
|
if (ps(n).forEach(({ newRange: s }) => {
|
|
32281
32283
|
o.doc.resolve(s.from).parent.type.spec.code || Il(o.doc, s, (r) => r.type.isText).forEach(({ node: r, pos: i }) => {
|
|
32282
|
-
r.text && [...r.text.matchAll(
|
|
32284
|
+
r.text && [...r.text.matchAll(xf())].forEach((l) => {
|
|
32283
32285
|
if (l.index === void 0)
|
|
32284
32286
|
return;
|
|
32285
32287
|
const p = l[0], c = Tf(p, this.options.emojis);
|
|
@@ -32300,7 +32302,7 @@ var zf = new Q("emojiSuggestion"), Rf = /:([a-zA-Z0-9_+-]+):$/, $f = /(^|\s):([a
|
|
|
32300
32302
|
})
|
|
32301
32303
|
];
|
|
32302
32304
|
}
|
|
32303
|
-
}),
|
|
32305
|
+
}), Nf = Bf, Of = K.create({
|
|
32304
32306
|
name: "hardBreak",
|
|
32305
32307
|
markdownTokenName: "br",
|
|
32306
32308
|
addOptions() {
|
|
@@ -32354,7 +32356,7 @@ var zf = new Q("emojiSuggestion"), Rf = /:([a-zA-Z0-9_+-]+):$/, $f = /(^|\s):([a
|
|
|
32354
32356
|
"Shift-Enter": () => this.editor.commands.setHardBreak()
|
|
32355
32357
|
};
|
|
32356
32358
|
}
|
|
32357
|
-
}), Hf =
|
|
32359
|
+
}), Hf = Of, Pf = K.create({
|
|
32358
32360
|
name: "heading",
|
|
32359
32361
|
addOptions() {
|
|
32360
32362
|
return {
|
|
@@ -32442,10 +32444,10 @@ var zf = new Q("emojiSuggestion"), Rf = /:([a-zA-Z0-9_+-]+):$/, $f = /(^|\s):([a
|
|
|
32442
32444
|
if (i) {
|
|
32443
32445
|
const { $to: l } = r.selection, p = l.end();
|
|
32444
32446
|
if (l.nodeAfter)
|
|
32445
|
-
l.nodeAfter.isTextblock ? r.setSelection(
|
|
32447
|
+
l.nodeAfter.isTextblock ? r.setSelection(x.create(r.doc, l.pos + 1)) : l.nodeAfter.isBlock ? r.setSelection(F.create(r.doc, l.pos)) : r.setSelection(x.create(r.doc, l.pos));
|
|
32446
32448
|
else {
|
|
32447
32449
|
const c = s.schema.nodes[this.options.nextNodeType] || l.parent.type.contentMatch.defaultType, m = c == null ? void 0 : c.create();
|
|
32448
|
-
m && (r.insert(p, m), r.setSelection(
|
|
32450
|
+
m && (r.insert(p, m), r.setSelection(x.create(r.doc, p + 1)));
|
|
32449
32451
|
}
|
|
32450
32452
|
r.scrollIntoView();
|
|
32451
32453
|
}
|
|
@@ -33035,7 +33037,7 @@ ce.prototype = {
|
|
|
33035
33037
|
return n.j[t] = r, r;
|
|
33036
33038
|
}
|
|
33037
33039
|
};
|
|
33038
|
-
const S = (t, e, o, a, n) => t.ta(e, o, a, n), V = (t, e, o, a, n) => t.tr(e, o, a, n), $r = (t, e, o, a, n) => t.ts(e, o, a, n), k = (t, e, o, a, n) => t.tt(e, o, a, n), Se = "WORD", Rn = "UWORD", ip = "ASCIINUMERICAL", lp = "ALPHANUMERICAL",
|
|
33040
|
+
const S = (t, e, o, a, n) => t.ta(e, o, a, n), V = (t, e, o, a, n) => t.tr(e, o, a, n), $r = (t, e, o, a, n) => t.ts(e, o, a, n), k = (t, e, o, a, n) => t.tt(e, o, a, n), Se = "WORD", Rn = "UWORD", ip = "ASCIINUMERICAL", lp = "ALPHANUMERICAL", Qt = "LOCALHOST", $n = "TLD", Bn = "UTLD", Ao = "SCHEME", yt = "SLASH_SCHEME", vs = "NUM", Nn = "WS", ks = "NL", Ot = "OPENBRACE", Ht = "CLOSEBRACE", Go = "OPENBRACKET", Xo = "CLOSEBRACKET", Yo = "OPENPAREN", Qo = "CLOSEPAREN", Zo = "OPENANGLEBRACKET", ea = "CLOSEANGLEBRACKET", ta = "FULLWIDTHLEFTPAREN", oa = "FULLWIDTHRIGHTPAREN", aa = "LEFTCORNERBRACKET", na = "RIGHTCORNERBRACKET", sa = "LEFTWHITECORNERBRACKET", ra = "RIGHTWHITECORNERBRACKET", ia = "FULLWIDTHLESSTHAN", la = "FULLWIDTHGREATERTHAN", pa = "AMPERSAND", ca = "APOSTROPHE", ma = "ASTERISK", Ne = "AT", da = "BACKSLASH", ga = "BACKTICK", ua = "CARET", He = "COLON", ys = "COMMA", fa = "DOLLAR", we = "DOT", ha = "EQUALS", _s = "EXCLAMATION", je = "HYPHEN", Pt = "PERCENT", ba = "PIPE", ja = "PLUS", va = "POUND", qt = "QUERY", ws = "QUOTE", pp = "FULLWIDTHMIDDLEDOT", Ds = "SEMI", De = "SLASH", Wt = "TILDE", ka = "UNDERSCORE", cp = "EMOJI", ya = "SYM";
|
|
33039
33041
|
var mp = /* @__PURE__ */ Object.freeze({
|
|
33040
33042
|
__proto__: null,
|
|
33041
33043
|
ALPHANUMERICAL: lp,
|
|
@@ -33043,12 +33045,12 @@ var mp = /* @__PURE__ */ Object.freeze({
|
|
|
33043
33045
|
APOSTROPHE: ca,
|
|
33044
33046
|
ASCIINUMERICAL: ip,
|
|
33045
33047
|
ASTERISK: ma,
|
|
33046
|
-
AT:
|
|
33048
|
+
AT: Ne,
|
|
33047
33049
|
BACKSLASH: da,
|
|
33048
33050
|
BACKTICK: ga,
|
|
33049
33051
|
CARET: ua,
|
|
33050
33052
|
CLOSEANGLEBRACKET: ea,
|
|
33051
|
-
CLOSEBRACE:
|
|
33053
|
+
CLOSEBRACE: Ht,
|
|
33052
33054
|
CLOSEBRACKET: Xo,
|
|
33053
33055
|
CLOSEPAREN: Qo,
|
|
33054
33056
|
COLON: He,
|
|
@@ -33066,18 +33068,18 @@ var mp = /* @__PURE__ */ Object.freeze({
|
|
|
33066
33068
|
HYPHEN: je,
|
|
33067
33069
|
LEFTCORNERBRACKET: aa,
|
|
33068
33070
|
LEFTWHITECORNERBRACKET: sa,
|
|
33069
|
-
LOCALHOST:
|
|
33071
|
+
LOCALHOST: Qt,
|
|
33070
33072
|
NL: ks,
|
|
33071
33073
|
NUM: vs,
|
|
33072
33074
|
OPENANGLEBRACKET: Zo,
|
|
33073
33075
|
OPENBRACE: Ot,
|
|
33074
33076
|
OPENBRACKET: Go,
|
|
33075
33077
|
OPENPAREN: Yo,
|
|
33076
|
-
PERCENT:
|
|
33078
|
+
PERCENT: Pt,
|
|
33077
33079
|
PIPE: ba,
|
|
33078
33080
|
PLUS: ja,
|
|
33079
33081
|
POUND: va,
|
|
33080
|
-
QUERY:
|
|
33082
|
+
QUERY: qt,
|
|
33081
33083
|
QUOTE: ws,
|
|
33082
33084
|
RIGHTCORNERBRACKET: na,
|
|
33083
33085
|
RIGHTWHITECORNERBRACKET: ra,
|
|
@@ -33086,61 +33088,61 @@ var mp = /* @__PURE__ */ Object.freeze({
|
|
|
33086
33088
|
SLASH: De,
|
|
33087
33089
|
SLASH_SCHEME: yt,
|
|
33088
33090
|
SYM: ya,
|
|
33089
|
-
TILDE:
|
|
33091
|
+
TILDE: Wt,
|
|
33090
33092
|
TLD: $n,
|
|
33091
33093
|
UNDERSCORE: ka,
|
|
33092
|
-
UTLD:
|
|
33094
|
+
UTLD: Bn,
|
|
33093
33095
|
UWORD: Rn,
|
|
33094
33096
|
WORD: Se,
|
|
33095
|
-
WS:
|
|
33097
|
+
WS: Nn
|
|
33096
33098
|
});
|
|
33097
|
-
const
|
|
33098
|
-
`, Ch = "️",
|
|
33099
|
-
let
|
|
33100
|
-
function
|
|
33099
|
+
const xe = /[a-z]/, St = new RegExp("\\p{L}", "u"), Za = new RegExp("\\p{Emoji}", "u"), Ee = /\d/, en = /\s/, Br = "\r", tn = `
|
|
33100
|
+
`, Ch = "️", Fh = "", on = "";
|
|
33101
|
+
let bo = null, jo = null;
|
|
33102
|
+
function xh(t = []) {
|
|
33101
33103
|
const e = {};
|
|
33102
33104
|
ce.groups = e;
|
|
33103
33105
|
const o = new ce();
|
|
33104
|
-
|
|
33105
|
-
const a = V(o,
|
|
33106
|
+
bo == null && (bo = Nr(kh)), jo == null && (jo = Nr(yh)), k(o, "'", ca), k(o, "{", Ot), k(o, "}", Ht), k(o, "[", Go), k(o, "]", Xo), k(o, "(", Yo), k(o, ")", Qo), k(o, "<", Zo), k(o, ">", ea), k(o, "(", ta), k(o, ")", oa), k(o, "「", aa), k(o, "」", na), k(o, "『", sa), k(o, "』", ra), k(o, "<", ia), k(o, ">", la), k(o, "&", pa), k(o, "*", ma), k(o, "@", Ne), k(o, "`", ga), k(o, "^", ua), k(o, ":", He), k(o, ",", ys), k(o, "$", fa), k(o, ".", we), k(o, "=", ha), k(o, "!", _s), k(o, "-", je), k(o, "%", Pt), k(o, "|", ba), k(o, "+", ja), k(o, "#", va), k(o, "?", qt), k(o, '"', ws), k(o, "/", De), k(o, ";", Ds), k(o, "~", Wt), k(o, "_", ka), k(o, "\\", da), k(o, "・", pp);
|
|
33107
|
+
const a = V(o, Ee, vs, {
|
|
33106
33108
|
[Mn]: !0
|
|
33107
33109
|
});
|
|
33108
|
-
V(a,
|
|
33109
|
-
const n = V(a,
|
|
33110
|
+
V(a, Ee, a);
|
|
33111
|
+
const n = V(a, xe, ip, {
|
|
33110
33112
|
[Nt]: !0
|
|
33111
33113
|
}), s = V(a, St, lp, {
|
|
33112
33114
|
[Lt]: !0
|
|
33113
|
-
}), r = V(o,
|
|
33115
|
+
}), r = V(o, xe, Se, {
|
|
33114
33116
|
[Tn]: !0
|
|
33115
33117
|
});
|
|
33116
|
-
V(r,
|
|
33118
|
+
V(r, Ee, n), V(r, xe, r), V(n, Ee, n), V(n, xe, n);
|
|
33117
33119
|
const i = V(o, St, Rn, {
|
|
33118
33120
|
[Ln]: !0
|
|
33119
33121
|
});
|
|
33120
|
-
V(i,
|
|
33122
|
+
V(i, xe), V(i, Ee, s), V(i, St, i), V(s, Ee, s), V(s, xe), V(s, St, s);
|
|
33121
33123
|
const l = k(o, tn, ks, {
|
|
33122
33124
|
[Qa]: !0
|
|
33123
|
-
}), p = k(o,
|
|
33125
|
+
}), p = k(o, Br, Nn, {
|
|
33124
33126
|
[Qa]: !0
|
|
33125
|
-
}), c = V(o, en,
|
|
33127
|
+
}), c = V(o, en, Nn, {
|
|
33126
33128
|
[Qa]: !0
|
|
33127
33129
|
});
|
|
33128
|
-
k(o, on, c), k(p, tn, l), k(p, on, c), V(p, en, c), k(c,
|
|
33130
|
+
k(o, on, c), k(p, tn, l), k(p, on, c), V(p, en, c), k(c, Br), k(c, tn), V(c, en, c), k(c, on, c);
|
|
33129
33131
|
const m = V(o, Za, cp, {
|
|
33130
33132
|
[rp]: !0
|
|
33131
33133
|
});
|
|
33132
33134
|
k(m, "#"), V(m, Za, m), k(m, Ch, m);
|
|
33133
|
-
const d = k(m,
|
|
33135
|
+
const d = k(m, Fh);
|
|
33134
33136
|
k(d, "#"), V(d, Za, m);
|
|
33135
|
-
const g = [[
|
|
33136
|
-
for (let f = 0; f < ho.length; f++)
|
|
33137
|
-
Re(o, ho[f], $n, Se, g);
|
|
33137
|
+
const g = [[xe, r], [Ee, n]], u = [[xe, null], [St, i], [Ee, s]];
|
|
33138
33138
|
for (let f = 0; f < bo.length; f++)
|
|
33139
|
-
Re(o, bo[f],
|
|
33139
|
+
Re(o, bo[f], $n, Se, g);
|
|
33140
|
+
for (let f = 0; f < jo.length; f++)
|
|
33141
|
+
Re(o, jo[f], Bn, Rn, u);
|
|
33140
33142
|
tt($n, {
|
|
33141
33143
|
tld: !0,
|
|
33142
33144
|
ascii: !0
|
|
33143
|
-
}, e), tt(
|
|
33145
|
+
}, e), tt(Bn, {
|
|
33144
33146
|
utld: !0,
|
|
33145
33147
|
alpha: !0
|
|
33146
33148
|
}, e), Re(o, "file", Ao, Se, g), Re(o, "mailto", Ao, Se, g), Re(o, "http", yt, Se, g), Re(o, "https", yt, Se, g), Re(o, "ftp", yt, Se, g), Re(o, "ftps", yt, Se, g), tt(Ao, {
|
|
@@ -33156,9 +33158,9 @@ function Eh(t = []) {
|
|
|
33156
33158
|
} : {
|
|
33157
33159
|
[wh]: !0
|
|
33158
33160
|
};
|
|
33159
|
-
h.indexOf("-") >= 0 ? b[zn] = !0 :
|
|
33161
|
+
h.indexOf("-") >= 0 ? b[zn] = !0 : xe.test(h) ? Ee.test(h) ? b[Nt] = !0 : b[Tn] = !0 : b[Mn] = !0, $r(o, h, h, b);
|
|
33160
33162
|
}
|
|
33161
|
-
return $r(o, "localhost",
|
|
33163
|
+
return $r(o, "localhost", Qt, {
|
|
33162
33164
|
ascii: !0
|
|
33163
33165
|
}), o.jd = new ce(ya), {
|
|
33164
33166
|
start: o,
|
|
@@ -33168,7 +33170,7 @@ function Eh(t = []) {
|
|
|
33168
33170
|
};
|
|
33169
33171
|
}
|
|
33170
33172
|
function dp(t, e) {
|
|
33171
|
-
const o =
|
|
33173
|
+
const o = Eh(e.replace(/[A-Z]/g, (i) => i.toLowerCase())), a = o.length, n = [];
|
|
33172
33174
|
let s = 0, r = 0;
|
|
33173
33175
|
for (; r < a; ) {
|
|
33174
33176
|
let i = t, l = null, p = 0, c = null, m = -1, d = -1;
|
|
@@ -33187,7 +33189,7 @@ function dp(t, e) {
|
|
|
33187
33189
|
}
|
|
33188
33190
|
return n;
|
|
33189
33191
|
}
|
|
33190
|
-
function
|
|
33192
|
+
function Eh(t) {
|
|
33191
33193
|
const e = [], o = t.length;
|
|
33192
33194
|
let a = 0;
|
|
33193
33195
|
for (; a < o; ) {
|
|
@@ -33205,7 +33207,7 @@ function Re(t, e, o, a, n) {
|
|
|
33205
33207
|
}
|
|
33206
33208
|
return s = new ce(o), s.jr = n.slice(), t.j[e[r - 1]] = s, s;
|
|
33207
33209
|
}
|
|
33208
|
-
function
|
|
33210
|
+
function Nr(t) {
|
|
33209
33211
|
const e = [], o = [];
|
|
33210
33212
|
let a = 0, n = "0123456789";
|
|
33211
33213
|
for (; a < t.length; ) {
|
|
@@ -33222,11 +33224,11 @@ function Or(t) {
|
|
|
33222
33224
|
}
|
|
33223
33225
|
return e;
|
|
33224
33226
|
}
|
|
33225
|
-
const
|
|
33227
|
+
const Zt = {
|
|
33226
33228
|
defaultProtocol: "http",
|
|
33227
33229
|
events: null,
|
|
33228
|
-
format:
|
|
33229
|
-
formatHref:
|
|
33230
|
+
format: Or,
|
|
33231
|
+
formatHref: Or,
|
|
33230
33232
|
nl2br: !1,
|
|
33231
33233
|
tagName: "a",
|
|
33232
33234
|
target: null,
|
|
@@ -33239,7 +33241,7 @@ const Qt = {
|
|
|
33239
33241
|
render: null
|
|
33240
33242
|
};
|
|
33241
33243
|
function Is(t, e = null) {
|
|
33242
|
-
let o = Object.assign({},
|
|
33244
|
+
let o = Object.assign({}, Zt);
|
|
33243
33245
|
t && (o = Object.assign(o, t instanceof Is ? t.o : t));
|
|
33244
33246
|
const a = o.ignoreTags, n = [];
|
|
33245
33247
|
for (let s = 0; s < a.length; s++)
|
|
@@ -33247,7 +33249,7 @@ function Is(t, e = null) {
|
|
|
33247
33249
|
this.o = o, e && (this.defaultRender = e), this.ignoreTags = n;
|
|
33248
33250
|
}
|
|
33249
33251
|
Is.prototype = {
|
|
33250
|
-
o:
|
|
33252
|
+
o: Zt,
|
|
33251
33253
|
/**
|
|
33252
33254
|
* @type string[]
|
|
33253
33255
|
*/
|
|
@@ -33283,7 +33285,7 @@ Is.prototype = {
|
|
|
33283
33285
|
get(t, e, o) {
|
|
33284
33286
|
const a = e != null;
|
|
33285
33287
|
let n = this.o[t];
|
|
33286
|
-
return n && (typeof n == "object" ? (n = o.t in n ? n[o.t] :
|
|
33288
|
+
return n && (typeof n == "object" ? (n = o.t in n ? n[o.t] : Zt[t], typeof n == "function" && a && (n = n(e, o))) : typeof n == "function" && a && (n = n(e, o.t, o)), n);
|
|
33287
33289
|
},
|
|
33288
33290
|
/**
|
|
33289
33291
|
* @template {keyof Opts} L
|
|
@@ -33308,7 +33310,7 @@ Is.prototype = {
|
|
|
33308
33310
|
return (this.get("render", null, t) || this.defaultRender)(e, t.t, t);
|
|
33309
33311
|
}
|
|
33310
33312
|
};
|
|
33311
|
-
function
|
|
33313
|
+
function Or(t) {
|
|
33312
33314
|
return t;
|
|
33313
33315
|
}
|
|
33314
33316
|
function gp(t, e) {
|
|
@@ -33372,7 +33374,7 @@ gp.prototype = {
|
|
|
33372
33374
|
@method toObject
|
|
33373
33375
|
@param {string} [protocol] `'http'` by default
|
|
33374
33376
|
*/
|
|
33375
|
-
toObject(t =
|
|
33377
|
+
toObject(t = Zt.defaultProtocol) {
|
|
33376
33378
|
return {
|
|
33377
33379
|
type: this.t,
|
|
33378
33380
|
value: this.toString(),
|
|
@@ -33433,7 +33435,7 @@ const Hr = Ma("email", {
|
|
|
33433
33435
|
toHref() {
|
|
33434
33436
|
return "mailto:" + this.toString();
|
|
33435
33437
|
}
|
|
33436
|
-
}), Pr = Ma("text"), Ah = Ma("nl"),
|
|
33438
|
+
}), Pr = Ma("text"), Ah = Ma("nl"), vo = Ma("url", {
|
|
33437
33439
|
isLink: !0,
|
|
33438
33440
|
/**
|
|
33439
33441
|
Lowercases relevant parts of the domain and adds the protocol if
|
|
@@ -33442,7 +33444,7 @@ const Hr = Ma("email", {
|
|
|
33442
33444
|
@param {string} [scheme] default scheme (e.g., 'https')
|
|
33443
33445
|
@return {string} the full href
|
|
33444
33446
|
*/
|
|
33445
|
-
toHref(t =
|
|
33447
|
+
toHref(t = Zt.defaultProtocol) {
|
|
33446
33448
|
return this.hasProtocol() ? this.v : `${t}://${this.v}`;
|
|
33447
33449
|
},
|
|
33448
33450
|
/**
|
|
@@ -33451,18 +33453,18 @@ const Hr = Ma("email", {
|
|
|
33451
33453
|
*/
|
|
33452
33454
|
hasProtocol() {
|
|
33453
33455
|
const t = this.tk;
|
|
33454
|
-
return t.length >= 2 && t[0].t !==
|
|
33456
|
+
return t.length >= 2 && t[0].t !== Qt && t[1].t === He;
|
|
33455
33457
|
}
|
|
33456
33458
|
}), be = (t) => new ce(t);
|
|
33457
33459
|
function Sh({
|
|
33458
33460
|
groups: t
|
|
33459
33461
|
}) {
|
|
33460
|
-
const e = t.domain.concat([pa, ma,
|
|
33462
|
+
const e = t.domain.concat([pa, ma, Ne, da, ga, ua, fa, ha, je, vs, Pt, ba, ja, va, De, ya, Wt, ka]), o = [ca, He, ys, we, _s, Pt, qt, ws, Ds, Zo, ea, Ot, Ht, Xo, Go, Yo, Qo, ta, oa, aa, na, sa, ra, ia, la], a = [pa, ca, ma, da, ga, ua, fa, ha, je, Ot, Ht, Pt, ba, ja, va, qt, De, ya, Wt, ka], n = be(), s = k(n, Wt);
|
|
33461
33463
|
S(s, a, s), S(s, t.domain, s);
|
|
33462
33464
|
const r = be(), i = be(), l = be();
|
|
33463
33465
|
S(n, t.domain, r), S(n, t.scheme, i), S(n, t.slashscheme, l), S(r, a, s), S(r, t.domain, r);
|
|
33464
|
-
const p = k(r,
|
|
33465
|
-
k(s,
|
|
33466
|
+
const p = k(r, Ne);
|
|
33467
|
+
k(s, Ne, p), k(i, Ne, p), k(l, Ne, p);
|
|
33466
33468
|
const c = k(s, we);
|
|
33467
33469
|
S(c, a, s), S(c, t.domain, s);
|
|
33468
33470
|
const m = be();
|
|
@@ -33470,23 +33472,23 @@ function Sh({
|
|
|
33470
33472
|
const d = k(m, we);
|
|
33471
33473
|
S(d, t.domain, m);
|
|
33472
33474
|
const g = be(Hr);
|
|
33473
|
-
S(d, t.tld, g), S(d, t.utld, g), k(p,
|
|
33475
|
+
S(d, t.tld, g), S(d, t.utld, g), k(p, Qt, g);
|
|
33474
33476
|
const u = k(m, je);
|
|
33475
33477
|
k(u, je, u), S(u, t.domain, m), S(g, t.domain, m), k(g, we, d), k(g, je, u);
|
|
33476
33478
|
const f = k(g, He);
|
|
33477
33479
|
S(f, t.numeric, Hr);
|
|
33478
33480
|
const h = k(r, je), b = k(r, we);
|
|
33479
33481
|
k(h, je, h), S(h, t.domain, r), S(b, a, s), S(b, t.domain, r);
|
|
33480
|
-
const j = be(
|
|
33481
|
-
S(b, t.tld, j), S(b, t.utld, j), S(j, t.domain, r), S(j, a, s), k(j, we, b), k(j, je, h), k(j,
|
|
33482
|
-
const y = k(j, He), I = be(
|
|
33482
|
+
const j = be(vo);
|
|
33483
|
+
S(b, t.tld, j), S(b, t.utld, j), S(j, t.domain, r), S(j, a, s), k(j, we, b), k(j, je, h), k(j, Ne, p);
|
|
33484
|
+
const y = k(j, He), I = be(vo);
|
|
33483
33485
|
S(y, t.numeric, I);
|
|
33484
|
-
const w = be(
|
|
33485
|
-
S(w, e, w), S(w, o,
|
|
33486
|
+
const w = be(vo), E = be();
|
|
33487
|
+
S(w, e, w), S(w, o, E), S(E, e, w), S(E, o, E), k(j, De, w), k(I, De, w);
|
|
33486
33488
|
const D = k(i, He), C = k(l, He), L = k(C, De), $ = k(L, De);
|
|
33487
|
-
S(i, t.domain, r), k(i, we, b), k(i, je, h), S(l, t.domain, r), k(l, we, b), k(l, je, h), S(D, t.domain, w), k(D, De, w), k(D,
|
|
33489
|
+
S(i, t.domain, r), k(i, we, b), k(i, je, h), S(l, t.domain, r), k(l, we, b), k(l, je, h), S(D, t.domain, w), k(D, De, w), k(D, qt, w), S($, t.domain, w), S($, e, w), k($, De, w);
|
|
33488
33490
|
const M = [
|
|
33489
|
-
[Ot,
|
|
33491
|
+
[Ot, Ht],
|
|
33490
33492
|
// {}
|
|
33491
33493
|
[Go, Xo],
|
|
33492
33494
|
// []
|
|
@@ -33503,15 +33505,15 @@ function Sh({
|
|
|
33503
33505
|
[ia, la]
|
|
33504
33506
|
// <>
|
|
33505
33507
|
];
|
|
33506
|
-
for (let
|
|
33507
|
-
const [H, P] = M[
|
|
33508
|
-
k(
|
|
33509
|
-
const T = be(
|
|
33508
|
+
for (let B = 0; B < M.length; B++) {
|
|
33509
|
+
const [H, P] = M[B], R = k(w, H);
|
|
33510
|
+
k(E, H, R), k(R, P, w);
|
|
33511
|
+
const T = be(vo);
|
|
33510
33512
|
S(R, e, T);
|
|
33511
33513
|
const X = be();
|
|
33512
33514
|
S(R, o), S(T, e, T), S(T, o, X), S(X, e, T), S(X, o, X), k(T, P, w), k(X, P, w);
|
|
33513
33515
|
}
|
|
33514
|
-
return k(n,
|
|
33516
|
+
return k(n, Qt, j), k(n, ks, Ah), {
|
|
33515
33517
|
start: n,
|
|
33516
33518
|
tokens: mp
|
|
33517
33519
|
};
|
|
@@ -33559,7 +33561,7 @@ function qr(t, e = !1) {
|
|
|
33559
33561
|
q.customSchemes.push([t, e]);
|
|
33560
33562
|
}
|
|
33561
33563
|
function Rh() {
|
|
33562
|
-
q.scanner =
|
|
33564
|
+
q.scanner = xh(q.customSchemes);
|
|
33563
33565
|
for (let t = 0; t < q.tokenQueue.length; t++)
|
|
33564
33566
|
q.tokenQueue[t][1]({
|
|
33565
33567
|
scanner: q.scanner
|
|
@@ -33589,8 +33591,8 @@ function up(t, e = null, o = null) {
|
|
|
33589
33591
|
}
|
|
33590
33592
|
return s;
|
|
33591
33593
|
}
|
|
33592
|
-
var
|
|
33593
|
-
function
|
|
33594
|
+
var Fs = "[\0- -\u2029 ]", $h = new RegExp(Fs), Bh = new RegExp(`${Fs}$`), Nh = new RegExp(Fs, "g");
|
|
33595
|
+
function Oh(t) {
|
|
33594
33596
|
return t.length === 1 ? t[0].isLink : t.length === 3 && t[1].isLink ? ["()", "[]"].includes(t[0].value + t[2].value) : !1;
|
|
33595
33597
|
}
|
|
33596
33598
|
function Hh(t) {
|
|
@@ -33613,7 +33615,7 @@ function Hh(t) {
|
|
|
33613
33615
|
);
|
|
33614
33616
|
else if (p.length) {
|
|
33615
33617
|
const d = a.doc.textBetween(l.from, l.to, " ", " ");
|
|
33616
|
-
if (!
|
|
33618
|
+
if (!Bh.test(d))
|
|
33617
33619
|
return;
|
|
33618
33620
|
c = p[0], m = a.doc.textBetween(c.pos, l.to, void 0, " ");
|
|
33619
33621
|
}
|
|
@@ -33625,7 +33627,7 @@ function Hh(t) {
|
|
|
33625
33627
|
if (!g)
|
|
33626
33628
|
return !1;
|
|
33627
33629
|
const f = Cs(g).map((h) => h.toObject(t.defaultProtocol));
|
|
33628
|
-
if (!
|
|
33630
|
+
if (!Oh(f))
|
|
33629
33631
|
return !1;
|
|
33630
33632
|
f.filter((h) => h.isLink).map((h) => ({
|
|
33631
33633
|
...h,
|
|
@@ -33703,7 +33705,7 @@ function Qe(t, e) {
|
|
|
33703
33705
|
return e && e.forEach((a) => {
|
|
33704
33706
|
const n = typeof a == "string" ? a : a.scheme;
|
|
33705
33707
|
n && o.push(n);
|
|
33706
|
-
}), !t || t.replace(
|
|
33708
|
+
}), !t || t.replace(Nh, "").match(
|
|
33707
33709
|
new RegExp(
|
|
33708
33710
|
// eslint-disable-next-line no-useless-escape
|
|
33709
33711
|
`^(?:(?:${o.join("|")}):|[^a-z]|[a-z0-9+.-]+(?:[^a-z+.-:]|$))`,
|
|
@@ -34382,15 +34384,15 @@ function gb(t) {
|
|
|
34382
34384
|
return t.replace(/&/g, "&").replace(/</g, "<").replace(/>/g, ">").replace(/"/g, """).replace(/'/g, "'");
|
|
34383
34385
|
}
|
|
34384
34386
|
const ft = (t) => Object.fromEntries(Object.entries(t).filter(([e, o]) => o != null));
|
|
34385
|
-
let sj = /* @__PURE__ */ function(t) {
|
|
34387
|
+
let sj = /* @__PURE__ */ (function(t) {
|
|
34386
34388
|
return t.DOCUMENT = "doc", t.HEADING = "heading", t.PARAGRAPH = "paragraph", t.QUOTE = "blockquote", t.OL_LIST = "ordered_list", t.UL_LIST = "bullet_list", t.LIST_ITEM = "list_item", t.CODE_BLOCK = "code_block", t.HR = "horizontal_rule", t.BR = "hard_break", t.IMAGE = "image", t.EMOJI = "emoji", t.COMPONENT = "blok", t.TABLE = "table", t.TABLE_ROW = "tableRow", t.TABLE_CELL = "tableCell", t.TABLE_HEADER = "tableHeader", t;
|
|
34387
|
-
}({}), rj = /* @__PURE__ */ function(t) {
|
|
34389
|
+
})({}), rj = /* @__PURE__ */ (function(t) {
|
|
34388
34390
|
return t.BOLD = "bold", t.STRONG = "strong", t.STRIKE = "strike", t.UNDERLINE = "underline", t.ITALIC = "italic", t.CODE = "code", t.LINK = "link", t.ANCHOR = "anchor", t.STYLED = "styled", t.SUPERSCRIPT = "superscript", t.SUBSCRIPT = "subscript", t.TEXT_STYLE = "textStyle", t.HIGHLIGHT = "highlight", t;
|
|
34389
|
-
}({}), ij = /* @__PURE__ */ function(t) {
|
|
34391
|
+
})({}), ij = /* @__PURE__ */ (function(t) {
|
|
34390
34392
|
return t.TEXT = "text", t;
|
|
34391
|
-
}({}),
|
|
34393
|
+
})({}), ko = /* @__PURE__ */ (function(t) {
|
|
34392
34394
|
return t.URL = "url", t.STORY = "story", t.ASSET = "asset", t.EMAIL = "email", t;
|
|
34393
|
-
}({});
|
|
34395
|
+
})({});
|
|
34394
34396
|
function ze(t = {}) {
|
|
34395
34397
|
const { textAlign: e, class: o, id: a, style: n, ...s } = t, r = [];
|
|
34396
34398
|
return n && r.push(n.endsWith(";") ? n : `${n};`), e && r.push(`text-align: ${e};`), ft({
|
|
@@ -34404,13 +34406,13 @@ function ub(t = {}) {
|
|
|
34404
34406
|
const { linktype: e, href: o, anchor: a, uuid: n, custom: s, ...r } = t;
|
|
34405
34407
|
let i = o ?? "";
|
|
34406
34408
|
switch (e) {
|
|
34407
|
-
case
|
|
34408
|
-
case
|
|
34409
|
+
case ko.ASSET:
|
|
34410
|
+
case ko.URL:
|
|
34409
34411
|
break;
|
|
34410
|
-
case
|
|
34412
|
+
case ko.EMAIL:
|
|
34411
34413
|
i && !i.startsWith("mailto:") && (i = `mailto:${i}`);
|
|
34412
34414
|
break;
|
|
34413
|
-
case
|
|
34415
|
+
case ko.STORY:
|
|
34414
34416
|
a && (i = `${i}#${a}`);
|
|
34415
34417
|
break;
|
|
34416
34418
|
}
|
|
@@ -34431,7 +34433,7 @@ function bp(t = {}) {
|
|
|
34431
34433
|
...i.length > 0 ? { style: i.join(" ") } : {}
|
|
34432
34434
|
});
|
|
34433
34435
|
}
|
|
34434
|
-
const
|
|
34436
|
+
const On = {
|
|
34435
34437
|
a: [
|
|
34436
34438
|
"href",
|
|
34437
34439
|
"target",
|
|
@@ -34550,7 +34552,7 @@ const fb = bf.extend({ renderHTML({ HTMLAttributes: t }) {
|
|
|
34550
34552
|
bp(t),
|
|
34551
34553
|
0
|
|
34552
34554
|
];
|
|
34553
|
-
} }),
|
|
34555
|
+
} }), Fb = op.extend({ renderHTML({ HTMLAttributes: t }) {
|
|
34554
34556
|
return [
|
|
34555
34557
|
"th",
|
|
34556
34558
|
bp(t),
|
|
@@ -34580,7 +34582,7 @@ const fb = bf.extend({ renderHTML({ HTMLAttributes: t }) {
|
|
|
34580
34582
|
...i
|
|
34581
34583
|
})];
|
|
34582
34584
|
}
|
|
34583
|
-
}),
|
|
34585
|
+
}), xb = Nf.extend({ renderHTML({ HTMLAttributes: t }) {
|
|
34584
34586
|
return [
|
|
34585
34587
|
"span",
|
|
34586
34588
|
{
|
|
@@ -34620,7 +34622,7 @@ const fb = bf.extend({ renderHTML({ HTMLAttributes: t }) {
|
|
|
34620
34622
|
style: "display: none"
|
|
34621
34623
|
})];
|
|
34622
34624
|
}
|
|
34623
|
-
}),
|
|
34625
|
+
}), xs = Kh.extend({
|
|
34624
34626
|
addAttributes() {
|
|
34625
34627
|
return {
|
|
34626
34628
|
href: { parseHTML: (t) => t.getAttribute("href") },
|
|
@@ -34650,14 +34652,14 @@ const fb = bf.extend({ renderHTML({ HTMLAttributes: t }) {
|
|
|
34650
34652
|
0
|
|
34651
34653
|
];
|
|
34652
34654
|
}
|
|
34653
|
-
}),
|
|
34655
|
+
}), Eb = xs.extend({ addAttributes() {
|
|
34654
34656
|
var t;
|
|
34655
34657
|
return {
|
|
34656
34658
|
...(t = this.parent) == null ? void 0 : t.call(this),
|
|
34657
34659
|
custom: {
|
|
34658
34660
|
default: null,
|
|
34659
34661
|
parseHTML: (e) => {
|
|
34660
|
-
const o =
|
|
34662
|
+
const o = On.a, a = e.getAttributeNames().filter((s) => !o.includes(s)), n = {};
|
|
34661
34663
|
for (const s of a) n[s] = e.getAttribute(s);
|
|
34662
34664
|
return Object.keys(n).length ? n : null;
|
|
34663
34665
|
}
|
|
@@ -34748,7 +34750,7 @@ const fb = bf.extend({ renderHTML({ HTMLAttributes: t }) {
|
|
|
34748
34750
|
getAttrs: (t) => {
|
|
34749
34751
|
const e = t.tagName.toLowerCase();
|
|
34750
34752
|
if (e === "a" && this.options.allowCustomAttributes) return !1;
|
|
34751
|
-
const o = t.getAttributeNames().filter((a) => !(e in
|
|
34753
|
+
const o = t.getAttributeNames().filter((a) => !(e in On ? On[e] : []).includes(a));
|
|
34752
34754
|
for (const a of o) console.warn(`[StoryblokRichText] - \`${a}\` "${t.getAttribute(a)}" on \`<${e}>\` can not be transformed to rich text.`);
|
|
34753
34755
|
return !1;
|
|
34754
34756
|
}
|
|
@@ -34767,11 +34769,11 @@ const fb = bf.extend({ renderHTML({ HTMLAttributes: t }) {
|
|
|
34767
34769
|
hardBreak: wb,
|
|
34768
34770
|
horizontalRule: Db,
|
|
34769
34771
|
image: jp,
|
|
34770
|
-
emoji:
|
|
34772
|
+
emoji: xb,
|
|
34771
34773
|
table: Ib,
|
|
34772
34774
|
tableRow: jb,
|
|
34773
34775
|
tableCell: Cb,
|
|
34774
|
-
tableHeader:
|
|
34776
|
+
tableHeader: Fb,
|
|
34775
34777
|
blok: vp,
|
|
34776
34778
|
details: su,
|
|
34777
34779
|
detailsContent: ru,
|
|
@@ -34785,14 +34787,14 @@ const fb = bf.extend({ renderHTML({ HTMLAttributes: t }) {
|
|
|
34785
34787
|
subscript: Yh,
|
|
34786
34788
|
highlight: gh,
|
|
34787
34789
|
textStyle: Sb,
|
|
34788
|
-
link:
|
|
34790
|
+
link: xs,
|
|
34789
34791
|
anchor: Ab,
|
|
34790
34792
|
styled: kp,
|
|
34791
34793
|
reporter: yp
|
|
34792
34794
|
};
|
|
34793
34795
|
function Tb(t = {}) {
|
|
34794
34796
|
var e;
|
|
34795
|
-
const o = t.allowCustomAttributes ?
|
|
34797
|
+
const o = t.allowCustomAttributes ? Eb : xs;
|
|
34796
34798
|
return {
|
|
34797
34799
|
...Mb,
|
|
34798
34800
|
image: jp.configure({ optimizeImages: t.optimizeImages || !1 }),
|
|
@@ -34847,7 +34849,7 @@ function _p(t = {}) {
|
|
|
34847
34849
|
return o(b, j, y);
|
|
34848
34850
|
};
|
|
34849
34851
|
function u(b) {
|
|
34850
|
-
var j, y, I, w,
|
|
34852
|
+
var j, y, I, w, E, D;
|
|
34851
34853
|
if (b.type === "text") return f(b);
|
|
34852
34854
|
if (b.type === "doc") return h(b);
|
|
34853
34855
|
const C = m.get(b.type);
|
|
@@ -34856,14 +34858,14 @@ function _p(t = {}) {
|
|
|
34856
34858
|
if ((y = C.options) != null && y.renderComponent) {
|
|
34857
34859
|
const $ = (I = b.attrs) == null ? void 0 : I.body, M = (w = b.attrs) == null ? void 0 : w.id;
|
|
34858
34860
|
if (!Array.isArray($) || $.length === 0) return i ? [] : "";
|
|
34859
|
-
const
|
|
34860
|
-
return i ?
|
|
34861
|
+
const B = $.map((H) => C.options.renderComponent(H, M));
|
|
34862
|
+
return i ? B : B.filter((H) => H != null).join("");
|
|
34861
34863
|
}
|
|
34862
|
-
if (b.type === "table" && (
|
|
34864
|
+
if (b.type === "table" && (E = b.content) != null && E.length) {
|
|
34863
34865
|
const $ = [], M = [];
|
|
34864
34866
|
for (const P of b.content) M.length === 0 && (D = P.content) != null && D.every((R) => R.type === "tableHeader") ? $.push(P) : M.push(P);
|
|
34865
|
-
const
|
|
34866
|
-
return $.length > 0 && H.push(g("thead", {}, $.map(h))), M.length > 0 && H.push(g("tbody", {}, M.map(h))), So(
|
|
34867
|
+
const B = nn(C, "node", b.attrs || {}), H = [];
|
|
34868
|
+
return $.length > 0 && H.push(g("thead", {}, $.map(h))), M.length > 0 && H.push(g("tbody", {}, M.map(h))), So(B, g, H);
|
|
34867
34869
|
}
|
|
34868
34870
|
const L = b.content ? b.content.map(h) : void 0;
|
|
34869
34871
|
return So(nn(C, "node", b.attrs || {}), g, L);
|
|
@@ -34872,17 +34874,17 @@ function _p(t = {}) {
|
|
|
34872
34874
|
const { marks: j, ...y } = b;
|
|
34873
34875
|
if (j != null && j.length) {
|
|
34874
34876
|
const w = (() => {
|
|
34875
|
-
const
|
|
34877
|
+
const E = {};
|
|
34876
34878
|
if (s) {
|
|
34877
34879
|
const D = e.get("txt") || 0;
|
|
34878
|
-
e.set("txt", D + 1),
|
|
34880
|
+
e.set("txt", D + 1), E.key = `txt-${D}`;
|
|
34879
34881
|
}
|
|
34880
|
-
return a(y.text,
|
|
34882
|
+
return a(y.text, E);
|
|
34881
34883
|
})();
|
|
34882
|
-
return j.reduce((
|
|
34884
|
+
return j.reduce((E, D) => {
|
|
34883
34885
|
var C;
|
|
34884
34886
|
const L = d.get(D.type);
|
|
34885
|
-
return (C = L == null ? void 0 : L.config) != null && C.renderHTML ? So(nn(L, "mark", D.attrs || {}), g,
|
|
34887
|
+
return (C = L == null ? void 0 : L.config) != null && C.renderHTML ? So(nn(L, "mark", D.attrs || {}), g, E) : (console.error("<Storyblok>", `No extension found for node type ${D.type}`), E);
|
|
34886
34888
|
}, w);
|
|
34887
34889
|
}
|
|
34888
34890
|
const I = b.attrs || {};
|
|
@@ -34925,10 +34927,10 @@ const Ur = [], Lb = (t) => new Promise((e, o) => {
|
|
|
34925
34927
|
...t,
|
|
34926
34928
|
per_page: e,
|
|
34927
34929
|
page: o
|
|
34928
|
-
}), Rb = (t) => new Promise((e) => setTimeout(e, t)), $b = (t = 0, e) => Array.from({ length: t }, e),
|
|
34930
|
+
}), Rb = (t) => new Promise((e) => setTimeout(e, t)), $b = (t = 0, e) => Array.from({ length: t }, e), Bb = (t = 0, e = t) => {
|
|
34929
34931
|
const o = Math.abs(e - t) || 0, a = t < e ? 1 : -1;
|
|
34930
34932
|
return $b(o, (n, s) => s * a + t);
|
|
34931
|
-
},
|
|
34933
|
+
}, Nb = async (t, e) => Promise.all(t.map(e)), Ob = (t = [], e) => t.map(e).reduce((o, a) => [...o, ...a], []), Es = (t, e, o) => {
|
|
34932
34934
|
const a = [];
|
|
34933
34935
|
for (const n in t) {
|
|
34934
34936
|
if (!Object.prototype.hasOwnProperty.call(t, n)) continue;
|
|
@@ -34936,7 +34938,7 @@ const Ur = [], Lb = (t) => new Promise((e, o) => {
|
|
|
34936
34938
|
if (s == null) continue;
|
|
34937
34939
|
const r = o ? "" : encodeURIComponent(n);
|
|
34938
34940
|
let i;
|
|
34939
|
-
typeof s == "object" ? i =
|
|
34941
|
+
typeof s == "object" ? i = Es(s, e ? e + encodeURIComponent(`[${r}]`) : r, Array.isArray(s)) : i = `${e ? e + encodeURIComponent(`[${r}]`) : r}=${encodeURIComponent(s)}`, a.push(i);
|
|
34940
34942
|
}
|
|
34941
34943
|
return a.join("&");
|
|
34942
34944
|
}, Jr = (t) => {
|
|
@@ -34951,7 +34953,7 @@ const Ur = [], Lb = (t) => new Promise((e, o) => {
|
|
|
34951
34953
|
};
|
|
34952
34954
|
var Hb = class {
|
|
34953
34955
|
constructor(t) {
|
|
34954
|
-
|
|
34956
|
+
N(this, "baseURL"), N(this, "timeout"), N(this, "headers"), N(this, "responseInterceptor"), N(this, "fetch"), N(this, "ejectInterceptor"), N(this, "url"), N(this, "parameters"), N(this, "fetchOptions"), this.baseURL = t.baseURL, this.headers = t.headers || new Headers(), this.timeout = t != null && t.timeout ? t.timeout * 1e3 : 0, this.responseInterceptor = t.responseInterceptor, this.fetch = (...e) => t.fetch ? t.fetch(...e) : fetch(...e), this.ejectInterceptor = !1, this.url = "", this.parameters = {}, this.fetchOptions = {};
|
|
34955
34957
|
}
|
|
34956
34958
|
/**
|
|
34957
34959
|
*
|
|
@@ -34986,7 +34988,7 @@ var Hb = class {
|
|
|
34986
34988
|
}
|
|
34987
34989
|
async _methodHandler(t) {
|
|
34988
34990
|
let e = `${this.baseURL}${this.url}`, o = null;
|
|
34989
|
-
t === "get" ? e = `${this.baseURL}${this.url}?${
|
|
34991
|
+
t === "get" ? e = `${this.baseURL}${this.url}?${Es(this.parameters)}` : o = JSON.stringify(this.parameters);
|
|
34990
34992
|
const a = new URL(e), n = new AbortController(), { signal: s } = n;
|
|
34991
34993
|
let r = null;
|
|
34992
34994
|
this.timeout && (r = setTimeout(() => n.abort(), this.timeout));
|
|
@@ -35055,7 +35057,7 @@ const Gr = "SB-Agent", rn = {
|
|
|
35055
35057
|
MEDIUM: 15,
|
|
35056
35058
|
LARGE: 10,
|
|
35057
35059
|
VERY_LARGE: 6
|
|
35058
|
-
}, Xr = 1e3,
|
|
35060
|
+
}, Xr = 1e3, yo = 3;
|
|
35059
35061
|
function Wb(t, e) {
|
|
35060
35062
|
const o = t.includes("/cdn/stories/"), a = t.split("/").length > 3 && !t.endsWith("/cdn/stories"), n = "find_by" in e;
|
|
35061
35063
|
return o && a || n;
|
|
@@ -35063,7 +35065,7 @@ function Wb(t, e) {
|
|
|
35063
35065
|
function Kb(t) {
|
|
35064
35066
|
return t <= ln.SMALL ? zt.SINGLE_OR_SMALL : t <= ln.MEDIUM ? zt.MEDIUM : t <= ln.LARGE ? zt.LARGE : zt.VERY_LARGE;
|
|
35065
35067
|
}
|
|
35066
|
-
function
|
|
35068
|
+
function _o(t, e, o = {}, a) {
|
|
35067
35069
|
return o.userRateLimit !== void 0 ? Math.min(o.userRateLimit, Xr) : o.serverHeadersRateLimit !== void 0 ? Math.min(o.serverHeadersRateLimit, Xr) : a !== void 0 ? a : !t || !e || Wb(t, e) ? zt.SINGLE_OR_SMALL : Kb(e.per_page || qb);
|
|
35068
35070
|
}
|
|
35069
35071
|
function Vb(t) {
|
|
@@ -35124,7 +35126,7 @@ function Gb(t, e, o) {
|
|
|
35124
35126
|
}
|
|
35125
35127
|
var Xb = class {
|
|
35126
35128
|
constructor(t, e = 1e3) {
|
|
35127
|
-
|
|
35129
|
+
N(this, "queues"), N(this, "interval"), N(this, "throttledRequestFn"), this.queues = /* @__PURE__ */ new Map(), this.interval = e, this.throttledRequestFn = t;
|
|
35128
35130
|
}
|
|
35129
35131
|
/**
|
|
35130
35132
|
* Gets or creates a throttle queue for the specified rate limit
|
|
@@ -35155,7 +35157,7 @@ var Xb = class {
|
|
|
35155
35157
|
return this.queues.size;
|
|
35156
35158
|
}
|
|
35157
35159
|
};
|
|
35158
|
-
let
|
|
35160
|
+
let wo = {};
|
|
35159
35161
|
const $e = {};
|
|
35160
35162
|
var Yb = class {
|
|
35161
35163
|
/**
|
|
@@ -35164,7 +35166,7 @@ var Yb = class {
|
|
|
35164
35166
|
* @param pEndpoint string, optional
|
|
35165
35167
|
*/
|
|
35166
35168
|
constructor(t, e) {
|
|
35167
|
-
|
|
35169
|
+
N(this, "client"), N(this, "maxRetries"), N(this, "retriesDelay"), N(this, "throttleManager"), N(this, "accessToken"), N(this, "cache"), N(this, "resolveCounter"), N(this, "relations"), N(this, "links"), N(this, "version"), N(this, "rateLimitConfig"), N(this, "richTextResolver"), N(this, "resolveNestedRelations"), N(this, "stringifiedStoriesCache"), N(this, "inlineAssets");
|
|
35168
35170
|
let o = t.endpoint || e;
|
|
35169
35171
|
if (!o) {
|
|
35170
35172
|
const n = t.https === !1 ? "http" : "https";
|
|
@@ -35202,19 +35204,19 @@ var Yb = class {
|
|
|
35202
35204
|
const n = (e == null ? void 0 : e.per_page) || 25, s = `/${t}`.replace(/\/$/, ""), r = o ?? s.substring(s.lastIndexOf("/") + 1);
|
|
35203
35205
|
e.version = e.version || this.version;
|
|
35204
35206
|
const i = 1, l = await this.makeRequest(s, e, n, i, a);
|
|
35205
|
-
return
|
|
35207
|
+
return Ob([l, ...await Nb(Bb(i, l.total ? Math.ceil(l.total / (l.perPage || n)) : 1), (p) => this.makeRequest(s, e, n, p + 1, a))], (p) => Object.values(p.data[r]));
|
|
35206
35208
|
}
|
|
35207
35209
|
post(t, e = {}, o) {
|
|
35208
|
-
const a = `/${t}`, n =
|
|
35210
|
+
const a = `/${t}`, n = _o(void 0, void 0, this.rateLimitConfig, yo);
|
|
35209
35211
|
return this.throttleManager.execute(n, "post", a, e, o);
|
|
35210
35212
|
}
|
|
35211
35213
|
put(t, e = {}, o) {
|
|
35212
|
-
const a = `/${t}`, n =
|
|
35214
|
+
const a = `/${t}`, n = _o(void 0, void 0, this.rateLimitConfig, yo);
|
|
35213
35215
|
return this.throttleManager.execute(n, "put", a, e, o);
|
|
35214
35216
|
}
|
|
35215
35217
|
delete(t, e = {}, o) {
|
|
35216
35218
|
e || (e = {});
|
|
35217
|
-
const a = `/${t}`, n =
|
|
35219
|
+
const a = `/${t}`, n = _o(void 0, void 0, this.rateLimitConfig, yo);
|
|
35218
35220
|
return this.throttleManager.execute(n, "delete", a, e, o);
|
|
35219
35221
|
}
|
|
35220
35222
|
getStories(t = {}, e) {
|
|
@@ -35380,7 +35382,7 @@ var Yb = class {
|
|
|
35380
35382
|
}), this.stringifiedStoriesCache = {}, delete this.links[o], delete this.relations[o];
|
|
35381
35383
|
}
|
|
35382
35384
|
async cacheResponse(t, e, o, a) {
|
|
35383
|
-
const n =
|
|
35385
|
+
const n = Es({
|
|
35384
35386
|
url: t,
|
|
35385
35387
|
params: e
|
|
35386
35388
|
}), s = this.cacheProvider();
|
|
@@ -35388,7 +35390,7 @@ var Yb = class {
|
|
|
35388
35390
|
const l = await s.get(n);
|
|
35389
35391
|
if (l) return Promise.resolve(l);
|
|
35390
35392
|
}
|
|
35391
|
-
const r = !sn(t) && this.rateLimitConfig.isManagementApi ?
|
|
35393
|
+
const r = !sn(t) && this.rateLimitConfig.isManagementApi ? yo : void 0, i = _o(t, e, this.rateLimitConfig, r);
|
|
35392
35394
|
return new Promise(async (l, p) => {
|
|
35393
35395
|
var c;
|
|
35394
35396
|
try {
|
|
@@ -35436,16 +35438,16 @@ var Yb = class {
|
|
|
35436
35438
|
case "memory":
|
|
35437
35439
|
return {
|
|
35438
35440
|
get(t) {
|
|
35439
|
-
return Promise.resolve(
|
|
35441
|
+
return Promise.resolve(wo[t]);
|
|
35440
35442
|
},
|
|
35441
35443
|
getAll() {
|
|
35442
|
-
return Promise.resolve(
|
|
35444
|
+
return Promise.resolve(wo);
|
|
35443
35445
|
},
|
|
35444
35446
|
set(t, e) {
|
|
35445
|
-
return
|
|
35447
|
+
return wo[t] = e, Promise.resolve(void 0);
|
|
35446
35448
|
},
|
|
35447
35449
|
flush() {
|
|
35448
|
-
return
|
|
35450
|
+
return wo = {}, Promise.resolve(void 0);
|
|
35449
35451
|
}
|
|
35450
35452
|
};
|
|
35451
35453
|
case "custom":
|
|
@@ -35565,11 +35567,11 @@ const wp = /* @__PURE__ */ Qr({
|
|
|
35565
35567
|
`Is the Fallback component "${r.value}" registered properly?`
|
|
35566
35568
|
)) : console.error(
|
|
35567
35569
|
`Component could not be found for blok "${o.blok.component}"! Is it defined in main.ts as "app.component("${o.blok.component}", ${o.blok.component});"?`
|
|
35568
|
-
)), (l, p) => (
|
|
35570
|
+
)), (l, p) => (Zr(), ei(za(r.value), Fp({
|
|
35569
35571
|
ref_key: "blokRef",
|
|
35570
35572
|
ref: a
|
|
35571
|
-
}, { ...l.$props, ...l.$attrs }),
|
|
35572
|
-
|
|
35573
|
+
}, { ...l.$props, ...l.$attrs }), xp({ _: 2 }, [
|
|
35574
|
+
Ep(l.$slots, (c, m) => ({
|
|
35573
35575
|
name: m,
|
|
35574
35576
|
fn: Ap((d) => [
|
|
35575
35577
|
Sp(l.$slots, m, Mp(Tp(d)))
|
|
@@ -35610,7 +35612,7 @@ const oj = /* @__PURE__ */ Qr({
|
|
|
35610
35612
|
}, {
|
|
35611
35613
|
immediate: !0,
|
|
35612
35614
|
deep: !0
|
|
35613
|
-
}), (n, s) => (
|
|
35615
|
+
}), (n, s) => (Zr(), ei(a));
|
|
35614
35616
|
}
|
|
35615
35617
|
}), aj = {
|
|
35616
35618
|
beforeMount(t, e) {
|
|
@@ -35623,17 +35625,17 @@ const oj = /* @__PURE__ */ Qr({
|
|
|
35623
35625
|
console.error(`You can't use ${t} if you're not loading apiPlugin. Please provide it on StoryblokVue initialization.
|
|
35624
35626
|
`);
|
|
35625
35627
|
};
|
|
35626
|
-
let
|
|
35627
|
-
const mj = () => (
|
|
35628
|
+
let eo = null;
|
|
35629
|
+
const mj = () => (eo || Dp("useStoryblokApi"), eo), dj = async (t, e = {}, o = {}) => {
|
|
35628
35630
|
const a = Mo(null);
|
|
35629
|
-
if (o.resolveRelations = o.resolveRelations ?? e.resolve_relations, o.resolveLinks = o.resolveLinks ?? e.resolve_links,
|
|
35631
|
+
if (o.resolveRelations = o.resolveRelations ?? e.resolve_relations, o.resolveLinks = o.resolveLinks ?? e.resolve_links, $p(() => {
|
|
35630
35632
|
a.value && a.value.id && Zb(
|
|
35631
35633
|
a.value.id,
|
|
35632
35634
|
(n) => a.value = n,
|
|
35633
35635
|
o
|
|
35634
35636
|
);
|
|
35635
|
-
}),
|
|
35636
|
-
const { data: n } = await
|
|
35637
|
+
}), eo) {
|
|
35638
|
+
const { data: n } = await eo.get(
|
|
35637
35639
|
`cdn/stories/${t}`,
|
|
35638
35640
|
e
|
|
35639
35641
|
);
|
|
@@ -35645,16 +35647,16 @@ const mj = () => (Zt || Dp("useStoryblokApi"), Zt), dj = async (t, e = {}, o = {
|
|
|
35645
35647
|
install(t, e = {}) {
|
|
35646
35648
|
t.directive("editable", aj), t.component("StoryblokComponent", wp), t.component("StoryblokRichText", oj), e.enableFallbackComponent && !e.customFallbackComponent && t.component(
|
|
35647
35649
|
"FallbackComponent",
|
|
35648
|
-
|
|
35650
|
+
Rp(() => import("./FallbackComponent-1UpuMdw-.js"))
|
|
35649
35651
|
);
|
|
35650
35652
|
const { storyblokApi: o } = ej(e);
|
|
35651
|
-
|
|
35653
|
+
eo = o || null, t.provide("VueSDKOptions", e);
|
|
35652
35654
|
}
|
|
35653
35655
|
};
|
|
35654
35656
|
export {
|
|
35655
35657
|
sj as BlockTypes,
|
|
35656
35658
|
vp as ComponentBlok,
|
|
35657
|
-
|
|
35659
|
+
ko as LinkTypes,
|
|
35658
35660
|
rj as MarkTypes,
|
|
35659
35661
|
Yb as StoryblokClient,
|
|
35660
35662
|
wp as StoryblokComponent,
|