@dialpad/dialtone 9.17.0 → 9.19.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/css/dialtone.css +2 -2
- package/dist/tokens/android/java/tokens-dark.kt +1 -1
- package/dist/tokens/android/java/tokens-light.kt +1 -1
- package/dist/tokens/android/res/values/colors-dark.xml +1 -1
- package/dist/tokens/android/res/values/colors-light.xml +1 -1
- package/dist/tokens/android/res/values/dimens.xml +1 -1
- package/dist/tokens/css/variables-dark.css +1 -1
- package/dist/tokens/css/variables-light.css +1 -1
- package/dist/tokens/ios/tokens-dark.swift +1 -1
- package/dist/tokens/ios/tokens-light.swift +1 -1
- package/dist/tokens/less/variables-dark.less +1 -1
- package/dist/tokens/less/variables-light.less +1 -1
- package/dist/vue2/component-documentation.json +1 -1
- package/dist/vue2/dialtone-vue.cjs +5 -5
- package/dist/vue2/dialtone-vue.js +147 -130
- package/dist/vue2/directives.cjs +1 -1
- package/dist/vue2/directives.js +1 -1
- package/dist/vue2/emoji.cjs +1 -1
- package/dist/vue2/emoji.js +4 -4
- package/dist/vue2/{emoji_picker-GfisVsYp.js → emoji_picker-oRqwDR1h.js} +2 -2
- package/dist/vue2/{emoji_picker-zi8qwHtl.cjs → emoji_picker-pzXZS6X7.cjs} +1 -1
- package/dist/vue2/{emoji_text_wrapper-JQf6BpGc.cjs → emoji_text_wrapper-6Yl5NIEJ.cjs} +1 -1
- package/dist/vue2/{emoji_text_wrapper-OrF0kZ6L.js → emoji_text_wrapper-V-Qf4XZv.js} +2 -2
- package/dist/vue2/{index-G0QxbVGe.js → index-74FmkvkN.js} +1 -1
- package/dist/vue2/{index-ihXjcrB-.cjs → index-dsfPzyLy.cjs} +1 -1
- package/dist/vue2/message_input.cjs +1 -1
- package/dist/vue2/message_input.js +4 -4
- package/dist/vue2/{rich_text_editor-trHmm1VD.js → rich_text_editor-AZuWkf9m.js} +1740 -1762
- package/dist/vue2/{rich_text_editor-MzdHNizj.cjs → rich_text_editor-TX19t44m.cjs} +20 -20
- package/dist/vue2/style.css +1 -1
- package/dist/vue2/{tooltip-AVHt9lw0.js → tooltip-mMe9F6C6.js} +474 -441
- package/dist/vue2/tooltip-sE12R_AU.cjs +21 -0
- package/dist/vue2/types/components/rich_text_editor/extensions/emoji/suggestion.d.ts.map +1 -1
- package/dist/vue2/types/components/rich_text_editor/extensions/mentions/suggestion.d.ts.map +1 -1
- package/dist/vue2/types/components/tooltip/tooltip.vue.d.ts +30 -0
- package/dist/vue2/types/components/tooltip/tooltip.vue.d.ts.map +1 -1
- package/dist/vue2/types/recipes/conversation_view/editor/editor.vue.d.ts +17 -1
- package/dist/vue2/types/recipes/conversation_view/editor/editor.vue.d.ts.map +1 -1
- package/dist/vue3/component-documentation.json +1 -1
- package/dist/vue3/dialtone-vue.cjs +5 -5
- package/dist/vue3/dialtone-vue.js +206 -189
- package/dist/vue3/directives.cjs +1 -1
- package/dist/vue3/directives.js +1 -1
- package/dist/vue3/{emoji-acqIsOA0.js → emoji-ifbDMGtx.js} +1 -1
- package/dist/vue3/{emoji-gFUvTgzf.cjs → emoji-q4ZpxDOX.cjs} +1 -1
- package/dist/vue3/emoji.cjs +1 -1
- package/dist/vue3/emoji.js +4 -4
- package/dist/vue3/{emoji_picker-7KBwg94e.js → emoji_picker-G6QLC4uN.js} +2 -2
- package/dist/vue3/{emoji_picker-XmAzvsvD.cjs → emoji_picker-i3y8jyyY.cjs} +1 -1
- package/dist/vue3/{emoji_text_wrapper-Cr15_VcH.cjs → emoji_text_wrapper-spWldgj4.cjs} +1 -1
- package/dist/vue3/{emoji_text_wrapper-TK25xXF3.js → emoji_text_wrapper-vQeoLfQ4.js} +1 -1
- package/dist/vue3/message_input.cjs +1 -1
- package/dist/vue3/message_input.js +4 -4
- package/dist/vue3/{rich_text_editor-NWAFxCaY.js → rich_text_editor-S31F6RAP.js} +773 -794
- package/dist/vue3/{rich_text_editor-2jqjuGrZ.cjs → rich_text_editor-fciM1V1t.cjs} +20 -20
- package/dist/vue3/style.css +1 -1
- package/dist/vue3/{tooltip-Od71Luh6.js → tooltip-FcHJcgMd.js} +503 -470
- package/dist/vue3/tooltip-px-Nxl4C.cjs +21 -0
- package/dist/vue3/types/components/tooltip/tooltip.vue.d.ts +30 -0
- package/dist/vue3/types/components/tooltip/tooltip.vue.d.ts.map +1 -1
- package/dist/vue3/types/recipes/conversation_view/editor/editor.vue.d.ts +18 -1
- package/dist/vue3/types/recipes/conversation_view/editor/editor.vue.d.ts.map +1 -1
- package/package.json +1 -1
- package/dist/vue2/tooltip-6msmWvq0.cjs +0 -21
- package/dist/vue3/tooltip-8utqWHHH.cjs +0 -21
|
@@ -1,17 +1,17 @@
|
|
|
1
|
-
import { _ as de, g as gi, d as Ga, h as qi, u as Ya,
|
|
2
|
-
import { B as
|
|
3
|
-
import { openBlock as O, createElementBlock as j, toDisplayString as ut, createCommentVNode as J, createElementVNode as ht, normalizeClass as X, resolveComponent as $, createBlock as z, resolveDynamicComponent as kt, withCtx as q, mergeProps as Tr, renderSlot as se, withKeys as Ot, withModifiers as Xt, createVNode as nt, toHandlers as rl, createSlots as
|
|
1
|
+
import { _ as de, g as gi, d as Ga, h as qi, u as Ya, e as Xa, P as Qa, i as Es, j as Za, k as ec, l as tc, m as nc, n as rc, o as ic, p as sc, q as oc, T as Ts, t as Cr, r as lc, s as ac } from "./tooltip-FcHJcgMd.js";
|
|
2
|
+
import { B as cc, w as Er, I as dc, L as uc, C as hc, t as el, D as tl, E as fc, m as pc, o as nl } from "./emoji-ifbDMGtx.js";
|
|
3
|
+
import { openBlock as O, createElementBlock as j, toDisplayString as ut, createCommentVNode as J, createElementVNode as ht, normalizeClass as X, resolveComponent as $, createBlock as z, resolveDynamicComponent as kt, withCtx as q, mergeProps as Tr, renderSlot as se, withKeys as Ot, withModifiers as Xt, createVNode as nt, toHandlers as rl, createSlots as mc, renderList as il, Teleport as sl, defineComponent as $t, ref as Mr, onMounted as ol, onBeforeUnmount as Ki, h as ft, getCurrentInstance as gc, watchEffect as yc, nextTick as bc, unref as kc, markRaw as wr, reactive as ll, provide as Ms, customRef as Sc, withDirectives as xc, Fragment as Cc, vShow as Ec, createTextVNode as Wi } from "vue";
|
|
4
4
|
const Ut = {
|
|
5
5
|
BUSY: "busy",
|
|
6
6
|
AWAY: "away",
|
|
7
7
|
OFFLINE: "offline",
|
|
8
8
|
ACTIVE: "active"
|
|
9
|
-
},
|
|
9
|
+
}, Tc = [
|
|
10
10
|
Ut.BUSY,
|
|
11
11
|
Ut.AWAY,
|
|
12
12
|
Ut.OFFLINE,
|
|
13
13
|
Ut.ACTIVE
|
|
14
|
-
],
|
|
14
|
+
], Mc = {
|
|
15
15
|
name: "DtPresence",
|
|
16
16
|
props: {
|
|
17
17
|
/**
|
|
@@ -22,7 +22,7 @@ const Ut = {
|
|
|
22
22
|
presence: {
|
|
23
23
|
type: String,
|
|
24
24
|
default: Ut.ACTIVE,
|
|
25
|
-
validator: (n) =>
|
|
25
|
+
validator: (n) => Tc.includes(n)
|
|
26
26
|
},
|
|
27
27
|
/**
|
|
28
28
|
* Since Presence is a visual element, we need SRs to read out any state changes
|
|
@@ -34,19 +34,19 @@ const Ut = {
|
|
|
34
34
|
default: null
|
|
35
35
|
}
|
|
36
36
|
}
|
|
37
|
-
},
|
|
37
|
+
}, wc = ["aria-live"], Oc = {
|
|
38
38
|
key: 0,
|
|
39
39
|
"data-qa": "dt-presence-sr-text",
|
|
40
40
|
class: "sr-only"
|
|
41
41
|
};
|
|
42
|
-
function
|
|
42
|
+
function vc(n, e, t, r, i, s) {
|
|
43
43
|
return O(), j("div", {
|
|
44
44
|
class: "d-presence",
|
|
45
45
|
"data-qa": "dt-presence",
|
|
46
46
|
role: "status",
|
|
47
47
|
"aria-live": n.$attrs.ariaLive || "off"
|
|
48
48
|
}, [
|
|
49
|
-
t.srText ? (O(), j("span",
|
|
49
|
+
t.srText ? (O(), j("span", Oc, ut(t.srText), 1)) : J("", !0),
|
|
50
50
|
ht("div", {
|
|
51
51
|
class: X(["d-presence__inner", {
|
|
52
52
|
"d-presence__inner--active": t.presence === "active",
|
|
@@ -55,34 +55,34 @@ function Tc(n, e, t, r, i, s) {
|
|
|
55
55
|
"d-presence__inner--offline": t.presence === "offline"
|
|
56
56
|
}])
|
|
57
57
|
}, null, 2)
|
|
58
|
-
], 8,
|
|
58
|
+
], 8, wc);
|
|
59
59
|
}
|
|
60
|
-
const
|
|
60
|
+
const Ac = /* @__PURE__ */ de(Mc, [["render", vc]]), jr = {
|
|
61
61
|
xs: "d-avatar--xs",
|
|
62
62
|
sm: "d-avatar--sm",
|
|
63
63
|
md: "d-avatar--md",
|
|
64
64
|
lg: "d-avatar--lg",
|
|
65
65
|
xl: "d-avatar--xl"
|
|
66
|
-
},
|
|
66
|
+
}, Nc = {
|
|
67
67
|
default: "",
|
|
68
68
|
icon: "d-avatar__icon",
|
|
69
69
|
initials: "d-avatar__initials"
|
|
70
|
-
},
|
|
70
|
+
}, Dc = {
|
|
71
71
|
md: "d-avatar__presence--md",
|
|
72
72
|
lg: "d-avatar__presence--lg"
|
|
73
|
-
},
|
|
73
|
+
}, ws = {
|
|
74
74
|
NONE: "",
|
|
75
75
|
BUSY: "busy",
|
|
76
76
|
AWAY: "away",
|
|
77
77
|
OFFLINE: "offline",
|
|
78
78
|
ACTIVE: "active"
|
|
79
|
-
},
|
|
79
|
+
}, Ic = {
|
|
80
80
|
xs: "100",
|
|
81
81
|
sm: "200",
|
|
82
82
|
md: "300",
|
|
83
83
|
lg: "500",
|
|
84
84
|
xl: "600"
|
|
85
|
-
},
|
|
85
|
+
}, Rc = [
|
|
86
86
|
"100",
|
|
87
87
|
"200",
|
|
88
88
|
"300",
|
|
@@ -101,18 +101,18 @@ const Mc = /* @__PURE__ */ de(xc, [["render", Tc]]), jr = {
|
|
|
101
101
|
"1600",
|
|
102
102
|
"1700",
|
|
103
103
|
"1800"
|
|
104
|
-
],
|
|
105
|
-
function
|
|
106
|
-
return [void 0, ...
|
|
104
|
+
], Os = (n) => n > 1;
|
|
105
|
+
function Pc() {
|
|
106
|
+
return [void 0, ...cc];
|
|
107
107
|
}
|
|
108
|
-
const
|
|
108
|
+
const Lc = (n) => {
|
|
109
109
|
if (typeof n != "string" || !n.trim())
|
|
110
110
|
return "";
|
|
111
111
|
const e = n.trim().split(/\s+/g);
|
|
112
112
|
return e.length === 1 ? e.join("").substring(0, 2) : e.filter((t, r) => r === 0 || r === e.length - 1).map((t) => t.slice(0, 1).toUpperCase()).join("");
|
|
113
|
-
},
|
|
113
|
+
}, Bc = Pc(), _c = {
|
|
114
114
|
name: "DtAvatar",
|
|
115
|
-
components: { DtPresence:
|
|
115
|
+
components: { DtPresence: Ac, DtIcon: Er },
|
|
116
116
|
inheritAttrs: !1,
|
|
117
117
|
props: {
|
|
118
118
|
/**
|
|
@@ -178,8 +178,8 @@ const Dc = (n) => {
|
|
|
178
178
|
*/
|
|
179
179
|
presence: {
|
|
180
180
|
type: String,
|
|
181
|
-
default:
|
|
182
|
-
validator: (n) => Object.values(
|
|
181
|
+
default: ws.NONE,
|
|
182
|
+
validator: (n) => Object.values(ws).includes(n)
|
|
183
183
|
},
|
|
184
184
|
/**
|
|
185
185
|
* A set of props to be passed into the presence component.
|
|
@@ -196,7 +196,7 @@ const Dc = (n) => {
|
|
|
196
196
|
group: {
|
|
197
197
|
type: Number,
|
|
198
198
|
default: void 0,
|
|
199
|
-
validator: (n) =>
|
|
199
|
+
validator: (n) => Os(n)
|
|
200
200
|
},
|
|
201
201
|
/**
|
|
202
202
|
* The icon that overlays the avatar
|
|
@@ -241,7 +241,7 @@ const Dc = (n) => {
|
|
|
241
241
|
iconName: {
|
|
242
242
|
type: String,
|
|
243
243
|
default: void 0,
|
|
244
|
-
validator: (n) =>
|
|
244
|
+
validator: (n) => Bc.includes(n)
|
|
245
245
|
},
|
|
246
246
|
/**
|
|
247
247
|
* Icon size to be displayed on the avatar
|
|
@@ -250,7 +250,7 @@ const Dc = (n) => {
|
|
|
250
250
|
iconSize: {
|
|
251
251
|
type: String,
|
|
252
252
|
default: "",
|
|
253
|
-
validator: (n) => !n || Object.keys(
|
|
253
|
+
validator: (n) => !n || Object.keys(dc).includes(n)
|
|
254
254
|
},
|
|
255
255
|
/**
|
|
256
256
|
* Full name used to extract initials.
|
|
@@ -288,9 +288,9 @@ const Dc = (n) => {
|
|
|
288
288
|
data() {
|
|
289
289
|
return {
|
|
290
290
|
AVATAR_SIZE_MODIFIERS: jr,
|
|
291
|
-
AVATAR_KIND_MODIFIERS:
|
|
292
|
-
AVATAR_PRESENCE_SIZE_MODIFIERS:
|
|
293
|
-
AVATAR_ICON_SIZES:
|
|
291
|
+
AVATAR_KIND_MODIFIERS: Nc,
|
|
292
|
+
AVATAR_PRESENCE_SIZE_MODIFIERS: Dc,
|
|
293
|
+
AVATAR_ICON_SIZES: Ic,
|
|
294
294
|
imageLoadedSuccessfully: null,
|
|
295
295
|
formattedInitials: "",
|
|
296
296
|
initializing: !1
|
|
@@ -319,7 +319,7 @@ const Dc = (n) => {
|
|
|
319
319
|
];
|
|
320
320
|
},
|
|
321
321
|
showGroup() {
|
|
322
|
-
return
|
|
322
|
+
return Os(this.group);
|
|
323
323
|
},
|
|
324
324
|
formattedGroup() {
|
|
325
325
|
return this.group > 99 ? "99+" : this.group;
|
|
@@ -364,11 +364,11 @@ const Dc = (n) => {
|
|
|
364
364
|
n && (n.addEventListener("load", () => this._loadedImageEventHandler(n), { once: !0 }), n.addEventListener("error", () => this._erroredImageEventHandler(n), { once: !0 }));
|
|
365
365
|
},
|
|
366
366
|
formatInitials() {
|
|
367
|
-
const n =
|
|
367
|
+
const n = Lc(this.fullName);
|
|
368
368
|
this.validatedSize === "xs" ? this.formattedInitials = "" : this.validatedSize === "sm" ? this.formattedInitials = n[0] : this.formattedInitials = n;
|
|
369
369
|
},
|
|
370
370
|
getColor() {
|
|
371
|
-
return this.color ?? Ga(
|
|
371
|
+
return this.color ?? Ga(Rc, this.seed);
|
|
372
372
|
},
|
|
373
373
|
_loadedImageEventHandler(n) {
|
|
374
374
|
this.imageLoadedSuccessfully = !0, n.classList.remove("d-d-none");
|
|
@@ -384,15 +384,15 @@ const Dc = (n) => {
|
|
|
384
384
|
this.clickable && this.$emit("click", n);
|
|
385
385
|
}
|
|
386
386
|
}
|
|
387
|
-
},
|
|
387
|
+
}, Fc = ["src", "alt"], zc = {
|
|
388
388
|
key: 1,
|
|
389
389
|
class: "d-avatar__overlay-text"
|
|
390
|
-
},
|
|
390
|
+
}, Hc = {
|
|
391
391
|
key: 1,
|
|
392
392
|
class: "d-avatar__count",
|
|
393
393
|
"data-qa": "dt-avatar-count"
|
|
394
394
|
};
|
|
395
|
-
function
|
|
395
|
+
function Vc(n, e, t, r, i, s) {
|
|
396
396
|
const o = $("dt-icon"), l = $("dt-presence");
|
|
397
397
|
return O(), z(kt(t.clickable ? "button" : "div"), {
|
|
398
398
|
id: t.id,
|
|
@@ -416,7 +416,7 @@ function _c(n, e, t, r, i, s) {
|
|
|
416
416
|
"data-qa": "dt-avatar-image",
|
|
417
417
|
src: t.imageSrc,
|
|
418
418
|
alt: t.imageAlt
|
|
419
|
-
}, null, 8,
|
|
419
|
+
}, null, 8, Fc)) : t.iconName ? (O(), z(o, {
|
|
420
420
|
key: 1,
|
|
421
421
|
name: t.iconName,
|
|
422
422
|
"aria-label": t.iconAriaLabel,
|
|
@@ -436,9 +436,9 @@ function _c(n, e, t, r, i, s) {
|
|
|
436
436
|
key: 0,
|
|
437
437
|
class: "d-avatar__overlay-icon",
|
|
438
438
|
name: t.overlayIcon
|
|
439
|
-
}, null, 8, ["name"])) : t.overlayText ? (O(), j("p",
|
|
439
|
+
}, null, 8, ["name"])) : t.overlayText ? (O(), j("p", zc, ut(t.overlayText), 1)) : J("", !0)
|
|
440
440
|
], 2)) : J("", !0),
|
|
441
|
-
s.showGroup ? (O(), j("span",
|
|
441
|
+
s.showGroup ? (O(), j("span", Hc, ut(s.formattedGroup), 1)) : J("", !0),
|
|
442
442
|
t.presence && !s.showGroup ? (O(), z(l, Tr({
|
|
443
443
|
key: 2,
|
|
444
444
|
presence: t.presence,
|
|
@@ -451,7 +451,7 @@ function _c(n, e, t, r, i, s) {
|
|
|
451
451
|
_: 1
|
|
452
452
|
}, 8, ["id", "class", "onClick"]);
|
|
453
453
|
}
|
|
454
|
-
const
|
|
454
|
+
const $c = /* @__PURE__ */ de(_c, [["render", Vc]]), jc = {
|
|
455
455
|
name: "DtLink",
|
|
456
456
|
props: {
|
|
457
457
|
/**
|
|
@@ -462,17 +462,17 @@ const Fc = /* @__PURE__ */ de(Rc, [["render", _c]]), zc = {
|
|
|
462
462
|
type: String,
|
|
463
463
|
default: "",
|
|
464
464
|
validator(n) {
|
|
465
|
-
return
|
|
465
|
+
return uc.includes(n);
|
|
466
466
|
}
|
|
467
467
|
}
|
|
468
468
|
},
|
|
469
469
|
data() {
|
|
470
470
|
return {
|
|
471
|
-
LINK_KIND_MODIFIERS:
|
|
471
|
+
LINK_KIND_MODIFIERS: hc
|
|
472
472
|
};
|
|
473
473
|
}
|
|
474
|
-
},
|
|
475
|
-
function
|
|
474
|
+
}, qc = ["href"];
|
|
475
|
+
function Kc(n, e, t, r, i, s) {
|
|
476
476
|
return O(), j("a", {
|
|
477
477
|
class: X([
|
|
478
478
|
"d-link",
|
|
@@ -482,9 +482,9 @@ function Vc(n, e, t, r, i, s) {
|
|
|
482
482
|
href: "href" in n.$attrs ? n.$attrs.href : "javascript:void(0)"
|
|
483
483
|
}, [
|
|
484
484
|
se(n.$slots, "default")
|
|
485
|
-
], 10,
|
|
485
|
+
], 10, qc);
|
|
486
486
|
}
|
|
487
|
-
const
|
|
487
|
+
const Wc = /* @__PURE__ */ de(jc, [["render", Kc]]), Uc = {
|
|
488
488
|
props: {
|
|
489
489
|
/**
|
|
490
490
|
* If true, a hidden close button is included for screen readers
|
|
@@ -523,7 +523,7 @@ const $c = /* @__PURE__ */ de(zc, [["render", Vc]]), jc = {
|
|
|
523
523
|
a visually hidden close button and you must set the visuallyHiddenCloseLabel prop.`);
|
|
524
524
|
}
|
|
525
525
|
}
|
|
526
|
-
},
|
|
526
|
+
}, Jc = {
|
|
527
527
|
name: "SrOnlyCloseButton",
|
|
528
528
|
components: {
|
|
529
529
|
DtIcon: Er,
|
|
@@ -546,7 +546,7 @@ const $c = /* @__PURE__ */ de(zc, [["render", Vc]]), jc = {
|
|
|
546
546
|
}
|
|
547
547
|
}
|
|
548
548
|
};
|
|
549
|
-
function
|
|
549
|
+
function Gc(n, e, t, r, i, s) {
|
|
550
550
|
const o = $("dt-icon"), l = $("dt-button");
|
|
551
551
|
return O(), z(l, {
|
|
552
552
|
id: "sr-only-close-button",
|
|
@@ -562,7 +562,7 @@ function Kc(n, e, t, r, i, s) {
|
|
|
562
562
|
_: 1
|
|
563
563
|
}, 8, ["aria-label", "onClick", "onKeydown"]);
|
|
564
564
|
}
|
|
565
|
-
const
|
|
565
|
+
const Yc = /* @__PURE__ */ de(Jc, [["render", Gc]]), al = ':not(:disabled):not([aria-disabled="true"]):not([role="presentation"])', Xc = `${al}:not([tabindex="-1"])`, Qc = "button,[href],input,select,textarea,details,[tabindex]", Zc = {
|
|
566
566
|
methods: {
|
|
567
567
|
/**
|
|
568
568
|
* get the first focusable element in your component, includes tabindex="-1".
|
|
@@ -606,9 +606,9 @@ const Wc = /* @__PURE__ */ de(qc, [["render", Kc]]), al = ':not(:disabled):not([
|
|
|
606
606
|
* @param {bool} includeNegativeTabIndex - will include tabindex="-1" in the list of focusable elements.
|
|
607
607
|
*/
|
|
608
608
|
_getFocusableElements(n = this.$el, e = !1) {
|
|
609
|
-
return n ? [...n.querySelectorAll(
|
|
609
|
+
return n ? [...n.querySelectorAll(Qc)].filter((r) => {
|
|
610
610
|
const i = window.getComputedStyle(r);
|
|
611
|
-
return i.getPropertyValue("display") !== "none" && i.getPropertyValue("visibility") !== "hidden" && r.matches(e ? al :
|
|
611
|
+
return i.getPropertyValue("display") !== "none" && i.getPropertyValue("visibility") !== "hidden" && r.matches(e ? al : Xc);
|
|
612
612
|
}) : [];
|
|
613
613
|
},
|
|
614
614
|
/**
|
|
@@ -636,7 +636,7 @@ const Wc = /* @__PURE__ */ de(qc, [["render", Kc]]), al = ':not(:disabled):not([
|
|
|
636
636
|
ARROW_KEYS: "arrow-keys",
|
|
637
637
|
TAB: "tab",
|
|
638
638
|
NONE: "none"
|
|
639
|
-
},
|
|
639
|
+
}, ed = {
|
|
640
640
|
name: "DtItemLayout",
|
|
641
641
|
props: {
|
|
642
642
|
/**
|
|
@@ -656,40 +656,40 @@ const Wc = /* @__PURE__ */ de(qc, [["render", Kc]]), al = ':not(:disabled):not([
|
|
|
656
656
|
}
|
|
657
657
|
},
|
|
658
658
|
methods: { hasSlotContent: qi }
|
|
659
|
-
},
|
|
659
|
+
}, td = {
|
|
660
660
|
key: 0,
|
|
661
661
|
"data-qa": "dt-item-layout-left-wrapper",
|
|
662
662
|
class: "dt-item-layout--left"
|
|
663
|
-
},
|
|
663
|
+
}, nd = {
|
|
664
664
|
"data-qa": "dt-item-layout-content-wrapper",
|
|
665
665
|
class: "dt-item-layout--content"
|
|
666
|
-
},
|
|
666
|
+
}, rd = {
|
|
667
667
|
key: 0,
|
|
668
668
|
"data-qa": "dt-item-layout-title-wrapper",
|
|
669
669
|
class: "dt-item-layout--title"
|
|
670
|
-
},
|
|
670
|
+
}, id = {
|
|
671
671
|
key: 2,
|
|
672
672
|
"data-qa": "dt-item-layout-bottom-wrapper",
|
|
673
673
|
class: "dt-item-layout--bottom"
|
|
674
|
-
},
|
|
674
|
+
}, sd = {
|
|
675
675
|
key: 1,
|
|
676
676
|
"data-qa": "dt-item-layout-right-wrapper",
|
|
677
677
|
class: "dt-item-layout--right"
|
|
678
|
-
},
|
|
678
|
+
}, od = {
|
|
679
679
|
key: 2,
|
|
680
680
|
"data-qa": "dt-item-layout-selected-wrapper",
|
|
681
681
|
class: "dt-item-layout--selected"
|
|
682
682
|
};
|
|
683
|
-
function
|
|
683
|
+
function ld(n, e, t, r, i, s) {
|
|
684
684
|
return O(), z(kt(t.as), {
|
|
685
685
|
class: X(t.unstyled ? "dt-item-layout--custom" : "dt-item-layout")
|
|
686
686
|
}, {
|
|
687
687
|
default: q(() => [
|
|
688
|
-
s.hasSlotContent(n.$slots.left) ? (O(), j("section",
|
|
688
|
+
s.hasSlotContent(n.$slots.left) ? (O(), j("section", td, [
|
|
689
689
|
se(n.$slots, "left")
|
|
690
690
|
])) : J("", !0),
|
|
691
|
-
ht("section",
|
|
692
|
-
s.hasSlotContent(n.$slots.default) ? (O(), j("div",
|
|
691
|
+
ht("section", nd, [
|
|
692
|
+
s.hasSlotContent(n.$slots.default) ? (O(), j("div", rd, [
|
|
693
693
|
se(n.$slots, "default")
|
|
694
694
|
])) : J("", !0),
|
|
695
695
|
s.hasSlotContent(n.$slots.subtitle) ? (O(), j("div", {
|
|
@@ -699,24 +699,24 @@ function rd(n, e, t, r, i, s) {
|
|
|
699
699
|
}, [
|
|
700
700
|
se(n.$slots, "subtitle")
|
|
701
701
|
], 2)) : J("", !0),
|
|
702
|
-
s.hasSlotContent(n.$slots.bottom) ? (O(), j("div",
|
|
702
|
+
s.hasSlotContent(n.$slots.bottom) ? (O(), j("div", id, [
|
|
703
703
|
se(n.$slots, "bottom")
|
|
704
704
|
])) : J("", !0)
|
|
705
705
|
]),
|
|
706
|
-
s.hasSlotContent(n.$slots.right) ? (O(), j("section",
|
|
706
|
+
s.hasSlotContent(n.$slots.right) ? (O(), j("section", sd, [
|
|
707
707
|
se(n.$slots, "right")
|
|
708
708
|
])) : J("", !0),
|
|
709
|
-
s.hasSlotContent(n.$slots.selected) ? (O(), j("section",
|
|
709
|
+
s.hasSlotContent(n.$slots.selected) ? (O(), j("section", od, [
|
|
710
710
|
se(n.$slots, "selected")
|
|
711
711
|
])) : J("", !0)
|
|
712
712
|
]),
|
|
713
713
|
_: 3
|
|
714
714
|
}, 8, ["class"]);
|
|
715
715
|
}
|
|
716
|
-
const
|
|
716
|
+
const vs = /* @__PURE__ */ de(ed, [["render", ld]]), ad = ["listitem", "menuitem", "option"], cd = {
|
|
717
717
|
name: "DtListItem",
|
|
718
718
|
components: {
|
|
719
|
-
DtItemLayout:
|
|
719
|
+
DtItemLayout: vs,
|
|
720
720
|
DtIcon: Er
|
|
721
721
|
},
|
|
722
722
|
/**
|
|
@@ -741,7 +741,7 @@ const Os = /* @__PURE__ */ de(Yc, [["render", rd]]), id = ["listitem", "option"]
|
|
|
741
741
|
role: {
|
|
742
742
|
type: String,
|
|
743
743
|
default: "listitem",
|
|
744
|
-
validator: (n) =>
|
|
744
|
+
validator: (n) => ad.includes(n)
|
|
745
745
|
},
|
|
746
746
|
/**
|
|
747
747
|
* HTML element type (tag name) of the content wrapper element.
|
|
@@ -818,7 +818,7 @@ const Os = /* @__PURE__ */ de(Yc, [["render", rd]]), id = ["listitem", "option"]
|
|
|
818
818
|
listItemType() {
|
|
819
819
|
switch (this.type) {
|
|
820
820
|
case qr.DEFAULT:
|
|
821
|
-
return
|
|
821
|
+
return vs;
|
|
822
822
|
default:
|
|
823
823
|
return null;
|
|
824
824
|
}
|
|
@@ -865,7 +865,7 @@ const Os = /* @__PURE__ */ de(Yc, [["render", rd]]), id = ["listitem", "option"]
|
|
|
865
865
|
}
|
|
866
866
|
}
|
|
867
867
|
};
|
|
868
|
-
function
|
|
868
|
+
function dd(n, e, t, r, i, s) {
|
|
869
869
|
const o = $("dt-icon");
|
|
870
870
|
return O(), z(kt(t.elementType), Tr({
|
|
871
871
|
id: t.id,
|
|
@@ -876,10 +876,10 @@ function od(n, e, t, r, i, s) {
|
|
|
876
876
|
}],
|
|
877
877
|
tabindex: s.isFocusable ? 0 : -1,
|
|
878
878
|
role: t.role,
|
|
879
|
-
"aria-selected": t.role === "
|
|
879
|
+
"aria-selected": t.role === "listitem" ? void 0 : s.isHighlighted
|
|
880
880
|
}, rl(s.listItemListeners)), {
|
|
881
881
|
default: q(() => [
|
|
882
|
-
s.listItemType ? (O(), z(kt(s.listItemType), { key: 0 },
|
|
882
|
+
s.listItemType ? (O(), z(kt(s.listItemType), { key: 0 }, mc({ _: 2 }, [
|
|
883
883
|
il(n.$slots, (l, a) => ({
|
|
884
884
|
name: a,
|
|
885
885
|
fn: q(() => [
|
|
@@ -902,27 +902,13 @@ function od(n, e, t, r, i, s) {
|
|
|
902
902
|
_: 3
|
|
903
903
|
}, 16, ["id", "class", "tabindex", "role", "aria-selected"]);
|
|
904
904
|
}
|
|
905
|
-
const
|
|
905
|
+
const ud = /* @__PURE__ */ de(cd, [["render", dd]]), St = {
|
|
906
906
|
default: "column",
|
|
907
907
|
column: "column",
|
|
908
908
|
row: "row",
|
|
909
909
|
"row-reverse": "row-reverse",
|
|
910
910
|
"column-reverse": "column-reverse"
|
|
911
|
-
}, cl = ["sm", "md", "lg", "xl"], Ui = ["0", "100", "200", "300", "400", "450", "500", "600"],
|
|
912
|
-
none: void 0,
|
|
913
|
-
small: "d-p4",
|
|
914
|
-
medium: "d-p8",
|
|
915
|
-
large: "d-p16"
|
|
916
|
-
}, ad = {
|
|
917
|
-
none: void 0,
|
|
918
|
-
small: "d-pl4",
|
|
919
|
-
medium: "d-pl8",
|
|
920
|
-
large: "d-pl16"
|
|
921
|
-
}, cd = ["dialog", "menu", "listbox", "tree", "grid"], dd = ["", "anchor"], ud = ["none", "dialog", "first"], hd = ["parent", "body"], fd = [
|
|
922
|
-
...Xa
|
|
923
|
-
], gy = [
|
|
924
|
-
...Qa
|
|
925
|
-
], pd = {
|
|
911
|
+
}, cl = ["sm", "md", "lg", "xl"], Ui = ["0", "100", "200", "300", "400", "450", "500", "600"], hd = {
|
|
926
912
|
name: "PopoverHeaderFooter",
|
|
927
913
|
components: {
|
|
928
914
|
DtButton: el,
|
|
@@ -983,7 +969,7 @@ const ld = /* @__PURE__ */ de(sd, [["render", od]]), St = {
|
|
|
983
969
|
}
|
|
984
970
|
}
|
|
985
971
|
};
|
|
986
|
-
function
|
|
972
|
+
function fd(n, e, t, r, i, s) {
|
|
987
973
|
const o = $("dt-icon"), l = $("dt-button");
|
|
988
974
|
return O(), j("div", {
|
|
989
975
|
"data-qa": "dt-popover-header-footer",
|
|
@@ -1026,17 +1012,17 @@ function md(n, e, t, r, i, s) {
|
|
|
1026
1012
|
}, 16, ["class"])) : J("", !0)
|
|
1027
1013
|
], 2);
|
|
1028
1014
|
}
|
|
1029
|
-
const
|
|
1015
|
+
const pd = /* @__PURE__ */ de(hd, [["render", fd]]), md = {
|
|
1030
1016
|
name: "DtPopover",
|
|
1031
1017
|
/********************
|
|
1032
1018
|
* CHILD COMPONENTS *
|
|
1033
1019
|
********************/
|
|
1034
1020
|
components: {
|
|
1035
|
-
SrOnlyCloseButton:
|
|
1036
|
-
DtLazyShow:
|
|
1037
|
-
PopoverHeaderFooter:
|
|
1021
|
+
SrOnlyCloseButton: Yc,
|
|
1022
|
+
DtLazyShow: Xa,
|
|
1023
|
+
PopoverHeaderFooter: pd
|
|
1038
1024
|
},
|
|
1039
|
-
mixins: [
|
|
1025
|
+
mixins: [Zc, Uc],
|
|
1040
1026
|
props: {
|
|
1041
1027
|
/**
|
|
1042
1028
|
* Controls whether the popover is shown. Leaving this null will have the popover trigger on click by default.
|
|
@@ -1079,7 +1065,7 @@ const gd = /* @__PURE__ */ de(pd, [["render", md]]), yd = {
|
|
|
1079
1065
|
role: {
|
|
1080
1066
|
type: String,
|
|
1081
1067
|
default: "dialog",
|
|
1082
|
-
validator: (n) =>
|
|
1068
|
+
validator: (n) => Qa.includes(n)
|
|
1083
1069
|
},
|
|
1084
1070
|
/**
|
|
1085
1071
|
* ID of the element that serves as the label for the popover content.
|
|
@@ -1115,7 +1101,7 @@ const gd = /* @__PURE__ */ de(pd, [["render", md]]), yd = {
|
|
|
1115
1101
|
padding: {
|
|
1116
1102
|
type: String,
|
|
1117
1103
|
default: "large",
|
|
1118
|
-
validator: (n) => Object.keys(
|
|
1104
|
+
validator: (n) => Object.keys(Es).some((e) => e === n)
|
|
1119
1105
|
},
|
|
1120
1106
|
/**
|
|
1121
1107
|
* Additional class name for the content wrapper element.
|
|
@@ -1132,7 +1118,7 @@ const gd = /* @__PURE__ */ de(pd, [["render", md]]), yd = {
|
|
|
1132
1118
|
contentWidth: {
|
|
1133
1119
|
type: String,
|
|
1134
1120
|
default: "",
|
|
1135
|
-
validator: (n) =>
|
|
1121
|
+
validator: (n) => Za.includes(n)
|
|
1136
1122
|
},
|
|
1137
1123
|
/**
|
|
1138
1124
|
* Whether to apply transition on initial render in the content lazy show component.
|
|
@@ -1266,7 +1252,7 @@ const gd = /* @__PURE__ */ de(pd, [["render", md]]), yd = {
|
|
|
1266
1252
|
sticky: {
|
|
1267
1253
|
type: [Boolean, String],
|
|
1268
1254
|
default: !1,
|
|
1269
|
-
validator: (n) =>
|
|
1255
|
+
validator: (n) => ec.includes(n)
|
|
1270
1256
|
},
|
|
1271
1257
|
/**
|
|
1272
1258
|
* Determines maximum height for the popover before overflow.
|
|
@@ -1324,7 +1310,7 @@ const gd = /* @__PURE__ */ de(pd, [["render", md]]), yd = {
|
|
|
1324
1310
|
initialFocusElement: {
|
|
1325
1311
|
type: [String, HTMLElement],
|
|
1326
1312
|
default: "first",
|
|
1327
|
-
validator: (n) =>
|
|
1313
|
+
validator: (n) => tc.includes(n) || n instanceof HTMLElement || n.startsWith("#")
|
|
1328
1314
|
},
|
|
1329
1315
|
/**
|
|
1330
1316
|
* If the popover should open pressing up or down arrow key on the anchor element.
|
|
@@ -1343,7 +1329,7 @@ const gd = /* @__PURE__ */ de(pd, [["render", md]]), yd = {
|
|
|
1343
1329
|
appendTo: {
|
|
1344
1330
|
type: [HTMLElement, String],
|
|
1345
1331
|
default: "body",
|
|
1346
|
-
validator: (n) =>
|
|
1332
|
+
validator: (n) => nc.includes(n) || n instanceof HTMLElement
|
|
1347
1333
|
},
|
|
1348
1334
|
/**
|
|
1349
1335
|
* Set this prop to true and popover component will support hovercard behaviour
|
|
@@ -1388,8 +1374,8 @@ const gd = /* @__PURE__ */ de(pd, [["render", md]]), yd = {
|
|
|
1388
1374
|
],
|
|
1389
1375
|
data() {
|
|
1390
1376
|
return {
|
|
1391
|
-
POPOVER_PADDING_CLASSES:
|
|
1392
|
-
POPOVER_HEADER_FOOTER_PADDING_CLASSES:
|
|
1377
|
+
POPOVER_PADDING_CLASSES: Es,
|
|
1378
|
+
POPOVER_HEADER_FOOTER_PADDING_CLASSES: rc,
|
|
1393
1379
|
intersectionObserver: null,
|
|
1394
1380
|
isOutsideViewport: !1,
|
|
1395
1381
|
isOpen: !1,
|
|
@@ -1506,11 +1492,11 @@ const gd = /* @__PURE__ */ de(pd, [["render", md]]), yd = {
|
|
|
1506
1492
|
const e = (r = n == null ? void 0 : n[0]) == null ? void 0 : r.target;
|
|
1507
1493
|
if (!e)
|
|
1508
1494
|
return;
|
|
1509
|
-
const t =
|
|
1495
|
+
const t = ic(e);
|
|
1510
1496
|
this.isOutsideViewport = t.bottom || t.top;
|
|
1511
1497
|
},
|
|
1512
1498
|
popperOptions() {
|
|
1513
|
-
return
|
|
1499
|
+
return sc({
|
|
1514
1500
|
fallbackPlacements: this.fallbackPlacements,
|
|
1515
1501
|
tether: this.tether,
|
|
1516
1502
|
hasHideModifierEnabled: !0
|
|
@@ -1628,7 +1614,7 @@ const gd = /* @__PURE__ */ de(pd, [["render", md]]), yd = {
|
|
|
1628
1614
|
},
|
|
1629
1615
|
initTippyInstance() {
|
|
1630
1616
|
var n, e;
|
|
1631
|
-
this.tip =
|
|
1617
|
+
this.tip = oc(this.anchorEl, {
|
|
1632
1618
|
popperOptions: this.popperOptions(),
|
|
1633
1619
|
contentElement: this.popoverContentEl,
|
|
1634
1620
|
placement: this.placement,
|
|
@@ -1651,12 +1637,12 @@ const gd = /* @__PURE__ */ de(pd, [["render", md]]), yd = {
|
|
|
1651
1637
|
setInTimer() {
|
|
1652
1638
|
this.inTimer = setTimeout(() => {
|
|
1653
1639
|
this.isOpen = !0;
|
|
1654
|
-
},
|
|
1640
|
+
}, Ts);
|
|
1655
1641
|
},
|
|
1656
1642
|
setOutTimer() {
|
|
1657
1643
|
this.outTimer = setTimeout(() => {
|
|
1658
1644
|
this.isOpen = !1;
|
|
1659
|
-
},
|
|
1645
|
+
}, Ts);
|
|
1660
1646
|
},
|
|
1661
1647
|
onEnterAnchor() {
|
|
1662
1648
|
this.hovercard && (this.timer ? this.timer.enter(this.id) : (clearTimeout(this.outTimer), this.setInTimer()));
|
|
@@ -1674,8 +1660,8 @@ const gd = /* @__PURE__ */ de(pd, [["render", md]]), yd = {
|
|
|
1674
1660
|
// $ HOVERCARD
|
|
1675
1661
|
// ----------------------------------------------------------------------------
|
|
1676
1662
|
}
|
|
1677
|
-
},
|
|
1678
|
-
function
|
|
1663
|
+
}, gd = ["aria-hidden"], yd = ["id", "data-qa", "tabindex"], bd = ["data-qa"];
|
|
1664
|
+
function kd(n, e, t, r, i, s) {
|
|
1679
1665
|
const o = $("popover-header-footer"), l = $("sr-only-close-button"), a = $("dt-lazy-show");
|
|
1680
1666
|
return O(), j("div", null, [
|
|
1681
1667
|
t.modal && i.isOpen ? (O(), z(sl, {
|
|
@@ -1687,7 +1673,7 @@ function xd(n, e, t, r, i, s) {
|
|
|
1687
1673
|
"aria-hidden": t.modal && i.isOpen ? "false" : "true",
|
|
1688
1674
|
onClick: e[0] || (e[0] = Xt(() => {
|
|
1689
1675
|
}, ["prevent", "stop"]))
|
|
1690
|
-
}, null, 8,
|
|
1676
|
+
}, null, 8, gd)
|
|
1691
1677
|
])) : J("", !0),
|
|
1692
1678
|
(O(), z(kt(t.elementType), {
|
|
1693
1679
|
ref: "popover",
|
|
@@ -1719,7 +1705,7 @@ function xd(n, e, t, r, i, s) {
|
|
|
1719
1705
|
"aria-haspopup": t.role
|
|
1720
1706
|
}
|
|
1721
1707
|
})
|
|
1722
|
-
], 40,
|
|
1708
|
+
], 40, yd),
|
|
1723
1709
|
nt(a, Tr({
|
|
1724
1710
|
id: t.id,
|
|
1725
1711
|
ref: "content",
|
|
@@ -1769,7 +1755,7 @@ function xd(n, e, t, r, i, s) {
|
|
|
1769
1755
|
])
|
|
1770
1756
|
}, [
|
|
1771
1757
|
se(n.$slots, "content", { close: s.closePopover })
|
|
1772
|
-
], 10,
|
|
1758
|
+
], 10, bd),
|
|
1773
1759
|
i.hasSlotContent(n.$slots.footerContent) ? (O(), z(o, {
|
|
1774
1760
|
key: 1,
|
|
1775
1761
|
ref: "popover__footer",
|
|
@@ -1795,7 +1781,7 @@ function xd(n, e, t, r, i, s) {
|
|
|
1795
1781
|
}, 8, ["class"]))
|
|
1796
1782
|
]);
|
|
1797
1783
|
}
|
|
1798
|
-
const
|
|
1784
|
+
const py = /* @__PURE__ */ de(md, [["render", kd]]);
|
|
1799
1785
|
function As(n) {
|
|
1800
1786
|
return n === St.default;
|
|
1801
1787
|
}
|
|
@@ -1811,18 +1797,18 @@ function Ns(n) {
|
|
|
1811
1797
|
function ln(n) {
|
|
1812
1798
|
return typeof n;
|
|
1813
1799
|
}
|
|
1814
|
-
function
|
|
1800
|
+
function Sd(n) {
|
|
1815
1801
|
return Ns(n) ? `d-stack--${St[Ns(n)]}` : null;
|
|
1816
1802
|
}
|
|
1817
|
-
function
|
|
1803
|
+
function xd(n) {
|
|
1818
1804
|
return ln(n) === "object" ? [
|
|
1819
1805
|
...cl.map((e) => n[e] ? `d-stack--${e}--${n[e]}` : null)
|
|
1820
1806
|
] : null;
|
|
1821
1807
|
}
|
|
1822
|
-
function
|
|
1808
|
+
function Cd(n) {
|
|
1823
1809
|
return Ui.includes(n) ? `d-stack--gap-${n}` : null;
|
|
1824
1810
|
}
|
|
1825
|
-
function
|
|
1811
|
+
function Ed(n) {
|
|
1826
1812
|
if (ln(n) === "string")
|
|
1827
1813
|
return Object.keys(St).includes(n);
|
|
1828
1814
|
if (ln(n) === "object") {
|
|
@@ -1831,10 +1817,10 @@ function Md(n) {
|
|
|
1831
1817
|
} else
|
|
1832
1818
|
return null;
|
|
1833
1819
|
}
|
|
1834
|
-
function
|
|
1820
|
+
function Td(n) {
|
|
1835
1821
|
return Ui.includes(n);
|
|
1836
1822
|
}
|
|
1837
|
-
const
|
|
1823
|
+
const Md = {
|
|
1838
1824
|
name: "DtStack",
|
|
1839
1825
|
props: {
|
|
1840
1826
|
/**
|
|
@@ -1848,7 +1834,7 @@ const Od = {
|
|
|
1848
1834
|
direction: {
|
|
1849
1835
|
type: [String, Object],
|
|
1850
1836
|
default: "column",
|
|
1851
|
-
validator: (n) =>
|
|
1837
|
+
validator: (n) => Ed(n)
|
|
1852
1838
|
},
|
|
1853
1839
|
/**
|
|
1854
1840
|
* Set this prop to render stack as a specific HTML element.
|
|
@@ -1864,7 +1850,7 @@ const Od = {
|
|
|
1864
1850
|
gap: {
|
|
1865
1851
|
type: String,
|
|
1866
1852
|
default: "0",
|
|
1867
|
-
validator: (n) =>
|
|
1853
|
+
validator: (n) => Td(n)
|
|
1868
1854
|
}
|
|
1869
1855
|
},
|
|
1870
1856
|
data() {
|
|
@@ -1876,17 +1862,17 @@ const Od = {
|
|
|
1876
1862
|
},
|
|
1877
1863
|
computed: {
|
|
1878
1864
|
stackGap() {
|
|
1879
|
-
return
|
|
1865
|
+
return Cd(this.gap);
|
|
1880
1866
|
},
|
|
1881
1867
|
defaultDirection() {
|
|
1882
|
-
return
|
|
1868
|
+
return Sd(this.direction);
|
|
1883
1869
|
},
|
|
1884
1870
|
stackResponsive() {
|
|
1885
|
-
return
|
|
1871
|
+
return xd(this.direction);
|
|
1886
1872
|
}
|
|
1887
1873
|
}
|
|
1888
1874
|
};
|
|
1889
|
-
function
|
|
1875
|
+
function wd(n, e, t, r, i, s) {
|
|
1890
1876
|
return O(), z(kt(t.as), {
|
|
1891
1877
|
class: X([
|
|
1892
1878
|
"d-stack",
|
|
@@ -1901,7 +1887,7 @@ function vd(n, e, t, r, i, s) {
|
|
|
1901
1887
|
_: 3
|
|
1902
1888
|
}, 8, ["class"]);
|
|
1903
1889
|
}
|
|
1904
|
-
const dl = /* @__PURE__ */ de(
|
|
1890
|
+
const dl = /* @__PURE__ */ de(Md, [["render", wd]]);
|
|
1905
1891
|
function U(n) {
|
|
1906
1892
|
this.content = n;
|
|
1907
1893
|
}
|
|
@@ -2542,7 +2528,7 @@ function pl(n, e, t, r) {
|
|
|
2542
2528
|
let l = pl(o.content, e - s - 1, t);
|
|
2543
2529
|
return l && n.replaceChild(i, o.copy(l));
|
|
2544
2530
|
}
|
|
2545
|
-
function
|
|
2531
|
+
function Od(n, e, t) {
|
|
2546
2532
|
if (t.openStart > n.depth)
|
|
2547
2533
|
throw new Pn("Inserted content deeper than insertion position");
|
|
2548
2534
|
if (n.depth - t.openStart != e.depth - t.openEnd)
|
|
@@ -2559,7 +2545,7 @@ function ml(n, e, t, r) {
|
|
|
2559
2545
|
let o = n.parent, l = o.content;
|
|
2560
2546
|
return mt(o, l.cut(0, n.parentOffset).append(t.content).append(l.cut(e.parentOffset)));
|
|
2561
2547
|
} else {
|
|
2562
|
-
let { start: o, end: l } =
|
|
2548
|
+
let { start: o, end: l } = vd(t, n);
|
|
2563
2549
|
return mt(s, yl(n, o, l, e, r));
|
|
2564
2550
|
}
|
|
2565
2551
|
else
|
|
@@ -2599,7 +2585,7 @@ function Ln(n, e, t) {
|
|
|
2599
2585
|
}
|
|
2600
2586
|
return Qt(e, null, t, r), new b(r);
|
|
2601
2587
|
}
|
|
2602
|
-
function
|
|
2588
|
+
function vd(n, e) {
|
|
2603
2589
|
let t = e.depth - n.openStart, i = e.node(t).copy(n.content);
|
|
2604
2590
|
for (let s = t - 1; s >= 0; s--)
|
|
2605
2591
|
i = e.node(s).copy(b.from(i));
|
|
@@ -2848,10 +2834,10 @@ class an {
|
|
|
2848
2834
|
return s;
|
|
2849
2835
|
}
|
|
2850
2836
|
let r = Wr[Ur] = an.resolve(e, t);
|
|
2851
|
-
return Ur = (Ur + 1) %
|
|
2837
|
+
return Ur = (Ur + 1) % Ad, r;
|
|
2852
2838
|
}
|
|
2853
2839
|
}
|
|
2854
|
-
let Wr = [], Ur = 0,
|
|
2840
|
+
let Wr = [], Ur = 0, Ad = 12;
|
|
2855
2841
|
class Bn {
|
|
2856
2842
|
/**
|
|
2857
2843
|
Construct a node range. `$from` and `$to` should point into the
|
|
@@ -2892,7 +2878,7 @@ class Bn {
|
|
|
2892
2878
|
return this.$to.indexAfter(this.depth);
|
|
2893
2879
|
}
|
|
2894
2880
|
}
|
|
2895
|
-
const
|
|
2881
|
+
const Nd = /* @__PURE__ */ Object.create(null);
|
|
2896
2882
|
let gt = class ki {
|
|
2897
2883
|
/**
|
|
2898
2884
|
@internal
|
|
@@ -3005,7 +2991,7 @@ let gt = class ki {
|
|
|
3005
2991
|
attributes, and marks.
|
|
3006
2992
|
*/
|
|
3007
2993
|
hasMarkup(e, t, r) {
|
|
3008
|
-
return this.type == e && Rn(this.attrs, t || e.defaultAttrs ||
|
|
2994
|
+
return this.type == e && Rn(this.attrs, t || e.defaultAttrs || Nd) && B.sameSet(this.marks, r || B.none);
|
|
3009
2995
|
}
|
|
3010
2996
|
/**
|
|
3011
2997
|
Create a new node with the same markup as this node, containing
|
|
@@ -3048,7 +3034,7 @@ let gt = class ki {
|
|
|
3048
3034
|
[`ReplaceError`](https://prosemirror.net/docs/ref/#model.ReplaceError) is thrown.
|
|
3049
3035
|
*/
|
|
3050
3036
|
replace(e, t, r) {
|
|
3051
|
-
return
|
|
3037
|
+
return Od(this.resolve(e), this.resolve(t), r);
|
|
3052
3038
|
}
|
|
3053
3039
|
/**
|
|
3054
3040
|
Find the node directly after the given position.
|
|
@@ -3309,13 +3295,13 @@ class xt {
|
|
|
3309
3295
|
@internal
|
|
3310
3296
|
*/
|
|
3311
3297
|
static parse(e, t) {
|
|
3312
|
-
let r = new
|
|
3298
|
+
let r = new Dd(e, t);
|
|
3313
3299
|
if (r.next == null)
|
|
3314
3300
|
return xt.empty;
|
|
3315
3301
|
let i = kl(r);
|
|
3316
3302
|
r.next && r.err("Unexpected trailing text");
|
|
3317
|
-
let s =
|
|
3318
|
-
return
|
|
3303
|
+
let s = Fd(_d(i));
|
|
3304
|
+
return zd(s, r), s;
|
|
3319
3305
|
}
|
|
3320
3306
|
/**
|
|
3321
3307
|
Match a node type, returning a match after that node if
|
|
@@ -3461,7 +3447,7 @@ class xt {
|
|
|
3461
3447
|
}
|
|
3462
3448
|
}
|
|
3463
3449
|
xt.empty = new xt(!0);
|
|
3464
|
-
class
|
|
3450
|
+
class Dd {
|
|
3465
3451
|
constructor(e, t) {
|
|
3466
3452
|
this.string = e, this.nodeTypes = t, this.inline = null, this.pos = 0, this.tokens = e.split(/\s*(?=\b|\W|$)/), this.tokens[this.tokens.length - 1] == "" && this.tokens.pop(), this.tokens[0] == "" && this.tokens.shift();
|
|
3467
3453
|
}
|
|
@@ -3478,19 +3464,19 @@ class Rd {
|
|
|
3478
3464
|
function kl(n) {
|
|
3479
3465
|
let e = [];
|
|
3480
3466
|
do
|
|
3481
|
-
e.push(
|
|
3467
|
+
e.push(Id(n));
|
|
3482
3468
|
while (n.eat("|"));
|
|
3483
3469
|
return e.length == 1 ? e[0] : { type: "choice", exprs: e };
|
|
3484
3470
|
}
|
|
3485
|
-
function
|
|
3471
|
+
function Id(n) {
|
|
3486
3472
|
let e = [];
|
|
3487
3473
|
do
|
|
3488
|
-
e.push(
|
|
3474
|
+
e.push(Rd(n));
|
|
3489
3475
|
while (n.next && n.next != ")" && n.next != "|");
|
|
3490
3476
|
return e.length == 1 ? e[0] : { type: "seq", exprs: e };
|
|
3491
3477
|
}
|
|
3492
|
-
function
|
|
3493
|
-
let e =
|
|
3478
|
+
function Rd(n) {
|
|
3479
|
+
let e = Bd(n);
|
|
3494
3480
|
for (; ; )
|
|
3495
3481
|
if (n.eat("+"))
|
|
3496
3482
|
e = { type: "plus", expr: e };
|
|
@@ -3499,7 +3485,7 @@ function Ld(n) {
|
|
|
3499
3485
|
else if (n.eat("?"))
|
|
3500
3486
|
e = { type: "opt", expr: e };
|
|
3501
3487
|
else if (n.eat("{"))
|
|
3502
|
-
e =
|
|
3488
|
+
e = Pd(n, e);
|
|
3503
3489
|
else
|
|
3504
3490
|
break;
|
|
3505
3491
|
return e;
|
|
@@ -3509,11 +3495,11 @@ function Ds(n) {
|
|
|
3509
3495
|
let e = Number(n.next);
|
|
3510
3496
|
return n.pos++, e;
|
|
3511
3497
|
}
|
|
3512
|
-
function
|
|
3498
|
+
function Pd(n, e) {
|
|
3513
3499
|
let t = Ds(n), r = t;
|
|
3514
3500
|
return n.eat(",") && (n.next != "}" ? r = Ds(n) : r = -1), n.eat("}") || n.err("Unclosed braced range"), { type: "range", min: t, max: r, expr: e };
|
|
3515
3501
|
}
|
|
3516
|
-
function
|
|
3502
|
+
function Ld(n, e) {
|
|
3517
3503
|
let t = n.nodeTypes, r = t[e];
|
|
3518
3504
|
if (r)
|
|
3519
3505
|
return [r];
|
|
@@ -3524,18 +3510,18 @@ function _d(n, e) {
|
|
|
3524
3510
|
}
|
|
3525
3511
|
return i.length == 0 && n.err("No node type or group '" + e + "' found"), i;
|
|
3526
3512
|
}
|
|
3527
|
-
function
|
|
3513
|
+
function Bd(n) {
|
|
3528
3514
|
if (n.eat("(")) {
|
|
3529
3515
|
let e = kl(n);
|
|
3530
3516
|
return n.eat(")") || n.err("Missing closing paren"), e;
|
|
3531
3517
|
} else if (/\W/.test(n.next))
|
|
3532
3518
|
n.err("Unexpected token '" + n.next + "'");
|
|
3533
3519
|
else {
|
|
3534
|
-
let e =
|
|
3520
|
+
let e = Ld(n, n.next).map((t) => (n.inline == null ? n.inline = t.isInline : n.inline != t.isInline && n.err("Mixing inline and block content"), { type: "name", value: t }));
|
|
3535
3521
|
return n.pos++, e.length == 1 ? e[0] : { type: "choice", exprs: e };
|
|
3536
3522
|
}
|
|
3537
3523
|
}
|
|
3538
|
-
function
|
|
3524
|
+
function _d(n) {
|
|
3539
3525
|
let e = [[]];
|
|
3540
3526
|
return i(s(n, 0), t()), e;
|
|
3541
3527
|
function t() {
|
|
@@ -3606,7 +3592,7 @@ function Is(n, e) {
|
|
|
3606
3592
|
}
|
|
3607
3593
|
}
|
|
3608
3594
|
}
|
|
3609
|
-
function
|
|
3595
|
+
function Fd(n) {
|
|
3610
3596
|
let e = /* @__PURE__ */ Object.create(null);
|
|
3611
3597
|
return t(Is(n, 0));
|
|
3612
3598
|
function t(r) {
|
|
@@ -3631,7 +3617,7 @@ function Hd(n) {
|
|
|
3631
3617
|
return s;
|
|
3632
3618
|
}
|
|
3633
3619
|
}
|
|
3634
|
-
function
|
|
3620
|
+
function zd(n, e) {
|
|
3635
3621
|
for (let t = 0, r = [n]; t < r.length; t++) {
|
|
3636
3622
|
let i = r[t], s = !i.validEnd, o = [];
|
|
3637
3623
|
for (let l = 0; l < i.next.length; l++) {
|
|
@@ -3670,7 +3656,7 @@ function El(n) {
|
|
|
3670
3656
|
let e = /* @__PURE__ */ Object.create(null);
|
|
3671
3657
|
if (n)
|
|
3672
3658
|
for (let t in n)
|
|
3673
|
-
e[t] = new
|
|
3659
|
+
e[t] = new Hd(n[t]);
|
|
3674
3660
|
return e;
|
|
3675
3661
|
}
|
|
3676
3662
|
let Rs = class Tl {
|
|
@@ -3839,7 +3825,7 @@ let Rs = class Tl {
|
|
|
3839
3825
|
return r;
|
|
3840
3826
|
}
|
|
3841
3827
|
};
|
|
3842
|
-
class
|
|
3828
|
+
class Hd {
|
|
3843
3829
|
constructor(e) {
|
|
3844
3830
|
this.hasDefault = Object.prototype.hasOwnProperty.call(e, "default"), this.default = e.default;
|
|
3845
3831
|
}
|
|
@@ -3896,7 +3882,7 @@ class Or {
|
|
|
3896
3882
|
return this.excluded.indexOf(e) > -1;
|
|
3897
3883
|
}
|
|
3898
3884
|
}
|
|
3899
|
-
class
|
|
3885
|
+
class Vd {
|
|
3900
3886
|
/**
|
|
3901
3887
|
Construct a schema from a schema [specification](https://prosemirror.net/docs/ref/#model.SchemaSpec).
|
|
3902
3888
|
*/
|
|
@@ -4029,7 +4015,7 @@ let Ji = class Si {
|
|
|
4029
4015
|
matchTag(e, t, r) {
|
|
4030
4016
|
for (let i = r ? this.tags.indexOf(r) + 1 : 0; i < this.tags.length; i++) {
|
|
4031
4017
|
let s = this.tags[i];
|
|
4032
|
-
if (
|
|
4018
|
+
if (qd(e, s.tag) && (s.namespace === void 0 || e.namespaceURI == s.namespace) && (!s.context || t.matchesContext(s.context))) {
|
|
4033
4019
|
if (s.getAttrs) {
|
|
4034
4020
|
let o = s.getAttrs(e);
|
|
4035
4021
|
if (o === !1)
|
|
@@ -4130,7 +4116,7 @@ const Ml = {
|
|
|
4130
4116
|
table: !0,
|
|
4131
4117
|
tfoot: !0,
|
|
4132
4118
|
ul: !0
|
|
4133
|
-
},
|
|
4119
|
+
}, $d = {
|
|
4134
4120
|
head: !0,
|
|
4135
4121
|
noscript: !0,
|
|
4136
4122
|
object: !0,
|
|
@@ -4178,7 +4164,7 @@ class En {
|
|
|
4178
4164
|
applyPending(e) {
|
|
4179
4165
|
for (let t = 0, r = this.pendingMarks; t < r.length; t++) {
|
|
4180
4166
|
let i = r[t];
|
|
4181
|
-
(this.type ? this.type.allowsMarkType(i.type) :
|
|
4167
|
+
(this.type ? this.type.allowsMarkType(i.type) : Wd(i.type, e)) && !i.isInSet(this.activeMarks) && (this.activeMarks = i.addToSet(this.activeMarks), this.pendingMarks = i.removeFromSet(this.pendingMarks));
|
|
4182
4168
|
}
|
|
4183
4169
|
}
|
|
4184
4170
|
inlineContext(e) {
|
|
@@ -4204,7 +4190,7 @@ class Bs {
|
|
|
4204
4190
|
let r = e.getAttribute("style");
|
|
4205
4191
|
if (!r)
|
|
4206
4192
|
return t();
|
|
4207
|
-
let i = this.readStyles(
|
|
4193
|
+
let i = this.readStyles(Kd(r));
|
|
4208
4194
|
if (!i)
|
|
4209
4195
|
return;
|
|
4210
4196
|
let [s, o] = i, l = this.top;
|
|
@@ -4236,9 +4222,9 @@ class Bs {
|
|
|
4236
4222
|
// none is found, the element's content nodes are added directly.
|
|
4237
4223
|
addElement(e, t) {
|
|
4238
4224
|
let r = e.nodeName.toLowerCase(), i;
|
|
4239
|
-
wl.hasOwnProperty(r) && this.parser.normalizeLists &&
|
|
4225
|
+
wl.hasOwnProperty(r) && this.parser.normalizeLists && jd(e);
|
|
4240
4226
|
let s = this.options.ruleFromNode && this.options.ruleFromNode(e) || (i = this.parser.matchTag(e, this, t));
|
|
4241
|
-
if (s ? s.ignore :
|
|
4227
|
+
if (s ? s.ignore : $d.hasOwnProperty(r))
|
|
4242
4228
|
this.findInside(e), this.ignoreFallback(e);
|
|
4243
4229
|
else if (!s || s.skip || s.closeParent) {
|
|
4244
4230
|
s && s.closeParent ? this.open = Math.max(0, this.open - 1) : s && s.skip.nodeType && (e = s.skip);
|
|
@@ -4451,7 +4437,7 @@ class Bs {
|
|
|
4451
4437
|
}
|
|
4452
4438
|
}
|
|
4453
4439
|
addPendingMark(e) {
|
|
4454
|
-
let t =
|
|
4440
|
+
let t = Ud(e, this.top.pendingMarks);
|
|
4455
4441
|
t && this.top.stashMarks.push(t), this.top.pendingMarks = e.addToSet(this.top.pendingMarks);
|
|
4456
4442
|
}
|
|
4457
4443
|
removePendingMark(e, t) {
|
|
@@ -4469,16 +4455,16 @@ class Bs {
|
|
|
4469
4455
|
}
|
|
4470
4456
|
}
|
|
4471
4457
|
}
|
|
4472
|
-
function
|
|
4458
|
+
function jd(n) {
|
|
4473
4459
|
for (let e = n.firstChild, t = null; e; e = e.nextSibling) {
|
|
4474
4460
|
let r = e.nodeType == 1 ? e.nodeName.toLowerCase() : null;
|
|
4475
4461
|
r && wl.hasOwnProperty(r) && t ? (t.appendChild(e), e = t) : r == "li" ? t = e : r && (t = null);
|
|
4476
4462
|
}
|
|
4477
4463
|
}
|
|
4478
|
-
function
|
|
4464
|
+
function qd(n, e) {
|
|
4479
4465
|
return (n.matches || n.msMatchesSelector || n.webkitMatchesSelector || n.mozMatchesSelector).call(n, e);
|
|
4480
4466
|
}
|
|
4481
|
-
function
|
|
4467
|
+
function Kd(n) {
|
|
4482
4468
|
let e = /\s*([\w-]+)\s*:\s*([^;]+)/g, t, r = [];
|
|
4483
4469
|
for (; t = e.exec(n); )
|
|
4484
4470
|
r.push(t[1], t[2].trim());
|
|
@@ -4490,7 +4476,7 @@ function _s(n) {
|
|
|
4490
4476
|
e[t] = n[t];
|
|
4491
4477
|
return e;
|
|
4492
4478
|
}
|
|
4493
|
-
function
|
|
4479
|
+
function Wd(n, e) {
|
|
4494
4480
|
let t = e.schema.nodes;
|
|
4495
4481
|
for (let r in t) {
|
|
4496
4482
|
let i = t[r];
|
|
@@ -4508,7 +4494,7 @@ function Jd(n, e) {
|
|
|
4508
4494
|
return !0;
|
|
4509
4495
|
}
|
|
4510
4496
|
}
|
|
4511
|
-
function
|
|
4497
|
+
function Ud(n, e) {
|
|
4512
4498
|
for (let t = 0; t < e.length; t++)
|
|
4513
4499
|
if (n.eq(e[t]))
|
|
4514
4500
|
return e[t];
|
|
@@ -4666,13 +4652,13 @@ function Jr(n) {
|
|
|
4666
4652
|
return n.document || window.document;
|
|
4667
4653
|
}
|
|
4668
4654
|
const Ol = 65535, vl = Math.pow(2, 16);
|
|
4669
|
-
function
|
|
4655
|
+
function Jd(n, e) {
|
|
4670
4656
|
return n + e * vl;
|
|
4671
4657
|
}
|
|
4672
4658
|
function zs(n) {
|
|
4673
4659
|
return n & Ol;
|
|
4674
4660
|
}
|
|
4675
|
-
function
|
|
4661
|
+
function Gd(n) {
|
|
4676
4662
|
return (n - (n & Ol)) / vl;
|
|
4677
4663
|
}
|
|
4678
4664
|
const Al = 1, Nl = 2, An = 4, Dl = 8;
|
|
@@ -4730,7 +4716,7 @@ class pe {
|
|
|
4730
4716
|
if (!this.inverted)
|
|
4731
4717
|
for (let i = 0; i < r; i++)
|
|
4732
4718
|
t += this.ranges[i * 3 + 2] - this.ranges[i * 3 + 1];
|
|
4733
|
-
return this.ranges[r * 3] + t +
|
|
4719
|
+
return this.ranges[r * 3] + t + Gd(e);
|
|
4734
4720
|
}
|
|
4735
4721
|
mapResult(e, t = 1) {
|
|
4736
4722
|
return this._map(e, t, !1);
|
|
@@ -4752,7 +4738,7 @@ class pe {
|
|
|
4752
4738
|
let h = c ? e == a ? -1 : e == u ? 1 : t : t, f = a + i + (h < 0 ? 0 : d);
|
|
4753
4739
|
if (r)
|
|
4754
4740
|
return f;
|
|
4755
|
-
let p = e == (t < 0 ? a : u) ? null :
|
|
4741
|
+
let p = e == (t < 0 ? a : u) ? null : Jd(l / 3, e - a), m = e == a ? Nl : e == u ? Al : An;
|
|
4756
4742
|
return (t < 0 ? e != a : e != u) && (m |= Dl), new xi(f, m, p);
|
|
4757
4743
|
}
|
|
4758
4744
|
i += d - c;
|
|
@@ -5281,7 +5267,7 @@ function Ci(n, e, t) {
|
|
|
5281
5267
|
}
|
|
5282
5268
|
return !1;
|
|
5283
5269
|
}
|
|
5284
|
-
function
|
|
5270
|
+
function Yd(n, e, t, r) {
|
|
5285
5271
|
let i = [], s = [], o, l;
|
|
5286
5272
|
n.doc.nodesBetween(e, t, (a, c, d) => {
|
|
5287
5273
|
if (!a.isInline)
|
|
@@ -5295,7 +5281,7 @@ function Qd(n, e, t, r) {
|
|
|
5295
5281
|
}
|
|
5296
5282
|
}), i.forEach((a) => n.step(a)), s.forEach((a) => n.step(a));
|
|
5297
5283
|
}
|
|
5298
|
-
function
|
|
5284
|
+
function Xd(n, e, t, r) {
|
|
5299
5285
|
let i = [], s = 0;
|
|
5300
5286
|
n.doc.nodesBetween(e, t, (o, l) => {
|
|
5301
5287
|
if (!o.isInline)
|
|
@@ -5321,7 +5307,7 @@ function Zd(n, e, t, r) {
|
|
|
5321
5307
|
}
|
|
5322
5308
|
}), i.forEach((o) => n.step(new De(o.from, o.to, o.style)));
|
|
5323
5309
|
}
|
|
5324
|
-
function
|
|
5310
|
+
function Qd(n, e, t, r = t.contentMatch) {
|
|
5325
5311
|
let i = n.doc.nodeAt(e), s = [], o = e + 1;
|
|
5326
5312
|
for (let l = 0; l < i.childCount; l++) {
|
|
5327
5313
|
let a = i.child(l), c = o + a.nodeSize, d = r.matchType(a.type);
|
|
@@ -5346,7 +5332,7 @@ function eu(n, e, t, r = t.contentMatch) {
|
|
|
5346
5332
|
for (let l = s.length - 1; l >= 0; l--)
|
|
5347
5333
|
n.step(s[l]);
|
|
5348
5334
|
}
|
|
5349
|
-
function
|
|
5335
|
+
function Zd(n, e, t) {
|
|
5350
5336
|
return (e == 0 || n.canReplace(e, n.childCount)) && (t == n.childCount || n.canReplace(0, t));
|
|
5351
5337
|
}
|
|
5352
5338
|
function jt(n) {
|
|
@@ -5355,12 +5341,12 @@ function jt(n) {
|
|
|
5355
5341
|
let i = n.$from.node(r), s = n.$from.index(r), o = n.$to.indexAfter(r);
|
|
5356
5342
|
if (r < n.depth && i.canReplace(s, o, t))
|
|
5357
5343
|
return r;
|
|
5358
|
-
if (r == 0 || i.type.spec.isolating || !
|
|
5344
|
+
if (r == 0 || i.type.spec.isolating || !Zd(i, s, o))
|
|
5359
5345
|
break;
|
|
5360
5346
|
}
|
|
5361
5347
|
return null;
|
|
5362
5348
|
}
|
|
5363
|
-
function
|
|
5349
|
+
function eu(n, e, t) {
|
|
5364
5350
|
let { $from: r, $to: i, depth: s } = e, o = r.before(s + 1), l = i.after(s + 1), a = o, c = l, d = b.empty, u = 0;
|
|
5365
5351
|
for (let p = s, m = !1; p > t; p--)
|
|
5366
5352
|
m || r.index(p) > 0 ? (m = !0, d = b.from(r.node(p).copy(d)), u++) : a--;
|
|
@@ -5370,20 +5356,20 @@ function nu(n, e, t) {
|
|
|
5370
5356
|
n.step(new K(a, c, o, l, new S(d.append(h), u, f), d.size - u, !0));
|
|
5371
5357
|
}
|
|
5372
5358
|
function Yi(n, e, t = null, r = n) {
|
|
5373
|
-
let i =
|
|
5359
|
+
let i = tu(n, e), s = i && nu(r, e);
|
|
5374
5360
|
return s ? i.map(Hs).concat({ type: e, attrs: t }).concat(s.map(Hs)) : null;
|
|
5375
5361
|
}
|
|
5376
5362
|
function Hs(n) {
|
|
5377
5363
|
return { type: n, attrs: null };
|
|
5378
5364
|
}
|
|
5379
|
-
function
|
|
5365
|
+
function tu(n, e) {
|
|
5380
5366
|
let { parent: t, startIndex: r, endIndex: i } = n, s = t.contentMatchAt(r).findWrapping(e);
|
|
5381
5367
|
if (!s)
|
|
5382
5368
|
return null;
|
|
5383
5369
|
let o = s.length ? s[0] : e;
|
|
5384
5370
|
return t.canReplaceWith(r, i, o) ? s : null;
|
|
5385
5371
|
}
|
|
5386
|
-
function
|
|
5372
|
+
function nu(n, e) {
|
|
5387
5373
|
let { parent: t, startIndex: r, endIndex: i } = n, s = t.child(r), o = e.contentMatch.findWrapping(s.type);
|
|
5388
5374
|
if (!o)
|
|
5389
5375
|
return null;
|
|
@@ -5392,7 +5378,7 @@ function iu(n, e) {
|
|
|
5392
5378
|
a = a.matchType(t.child(c).type);
|
|
5393
5379
|
return !a || !a.validEnd ? null : o;
|
|
5394
5380
|
}
|
|
5395
|
-
function
|
|
5381
|
+
function ru(n, e, t) {
|
|
5396
5382
|
let r = b.empty;
|
|
5397
5383
|
for (let o = t.length - 1; o >= 0; o--) {
|
|
5398
5384
|
if (r.size) {
|
|
@@ -5405,23 +5391,23 @@ function su(n, e, t) {
|
|
|
5405
5391
|
let i = e.start, s = e.end;
|
|
5406
5392
|
n.step(new K(i, s, i, s, new S(r, 0, 0), t.length, !0));
|
|
5407
5393
|
}
|
|
5408
|
-
function
|
|
5394
|
+
function iu(n, e, t, r, i) {
|
|
5409
5395
|
if (!r.isTextblock)
|
|
5410
5396
|
throw new RangeError("Type given to setBlockType should be a textblock");
|
|
5411
5397
|
let s = n.steps.length;
|
|
5412
5398
|
n.doc.nodesBetween(e, t, (o, l) => {
|
|
5413
|
-
if (o.isTextblock && !o.hasMarkup(r, i) &&
|
|
5399
|
+
if (o.isTextblock && !o.hasMarkup(r, i) && su(n.doc, n.mapping.slice(s).map(l), r)) {
|
|
5414
5400
|
n.clearIncompatible(n.mapping.slice(s).map(l, 1), r);
|
|
5415
5401
|
let a = n.mapping.slice(s), c = a.map(l, 1), d = a.map(l + o.nodeSize, 1);
|
|
5416
5402
|
return n.step(new K(c, d, c + 1, d - 1, new S(b.from(r.create(i, null, o.marks)), 0, 0), 1, !0)), !1;
|
|
5417
5403
|
}
|
|
5418
5404
|
});
|
|
5419
5405
|
}
|
|
5420
|
-
function
|
|
5406
|
+
function su(n, e, t) {
|
|
5421
5407
|
let r = n.resolve(e), i = r.index();
|
|
5422
5408
|
return r.parent.canReplaceWith(i, i + 1, t);
|
|
5423
5409
|
}
|
|
5424
|
-
function
|
|
5410
|
+
function ou(n, e, t, r, i) {
|
|
5425
5411
|
let s = n.doc.nodeAt(e);
|
|
5426
5412
|
if (!s)
|
|
5427
5413
|
throw new RangeError("No node at given position");
|
|
@@ -5450,7 +5436,7 @@ function Rt(n, e, t = 1, r) {
|
|
|
5450
5436
|
let l = i.indexAfter(s), a = r && r[0];
|
|
5451
5437
|
return i.node(s).canReplaceWith(l, l, a ? a.type : i.node(s + 1).type);
|
|
5452
5438
|
}
|
|
5453
|
-
function
|
|
5439
|
+
function lu(n, e, t = 1, r) {
|
|
5454
5440
|
let i = n.doc.resolve(e), s = b.empty, o = b.empty;
|
|
5455
5441
|
for (let l = i.depth, a = i.depth - t, c = t - 1; l > a; l--, c--) {
|
|
5456
5442
|
s = b.from(i.node(l).copy(s));
|
|
@@ -5477,11 +5463,11 @@ function Rl(n, e, t = -1) {
|
|
|
5477
5463
|
e = t < 0 ? r.before(i) : r.after(i);
|
|
5478
5464
|
}
|
|
5479
5465
|
}
|
|
5480
|
-
function
|
|
5466
|
+
function au(n, e, t) {
|
|
5481
5467
|
let r = new G(e - t, e + t, S.empty, !0);
|
|
5482
5468
|
n.step(r);
|
|
5483
5469
|
}
|
|
5484
|
-
function
|
|
5470
|
+
function cu(n, e, t) {
|
|
5485
5471
|
let r = n.resolve(e);
|
|
5486
5472
|
if (r.parent.canReplaceWith(r.index(), r.index(), t))
|
|
5487
5473
|
return e;
|
|
@@ -5503,7 +5489,7 @@ function uu(n, e, t) {
|
|
|
5503
5489
|
}
|
|
5504
5490
|
return null;
|
|
5505
5491
|
}
|
|
5506
|
-
function
|
|
5492
|
+
function du(n, e, t) {
|
|
5507
5493
|
let r = n.resolve(e);
|
|
5508
5494
|
if (!t.content.size)
|
|
5509
5495
|
return e;
|
|
@@ -5528,12 +5514,12 @@ function Xi(n, e, t = e, r = S.empty) {
|
|
|
5528
5514
|
if (e == t && !r.size)
|
|
5529
5515
|
return null;
|
|
5530
5516
|
let i = n.resolve(e), s = n.resolve(t);
|
|
5531
|
-
return Pl(i, s, r) ? new G(e, t, r) : new
|
|
5517
|
+
return Pl(i, s, r) ? new G(e, t, r) : new uu(i, s, r).fit();
|
|
5532
5518
|
}
|
|
5533
5519
|
function Pl(n, e, t) {
|
|
5534
5520
|
return !t.openStart && !t.openEnd && n.start() == e.start() && n.parent.canReplace(n.index(), e.index(), t.content);
|
|
5535
5521
|
}
|
|
5536
|
-
class
|
|
5522
|
+
class uu {
|
|
5537
5523
|
constructor(e, t, r) {
|
|
5538
5524
|
this.$from = e, this.$to = t, this.unplaced = r, this.frontier = [], this.placed = b.empty;
|
|
5539
5525
|
for (let i = 0; i <= e.depth; i++) {
|
|
@@ -5703,18 +5689,18 @@ function Xr(n, e, t, r, i) {
|
|
|
5703
5689
|
if (o == s.childCount && !t.compatibleContent(s.type))
|
|
5704
5690
|
return null;
|
|
5705
5691
|
let l = r.fillBefore(s.content, !0, o);
|
|
5706
|
-
return l && !
|
|
5692
|
+
return l && !hu(t, s.content, o) ? l : null;
|
|
5707
5693
|
}
|
|
5708
|
-
function
|
|
5694
|
+
function hu(n, e, t) {
|
|
5709
5695
|
for (let r = t; r < e.childCount; r++)
|
|
5710
5696
|
if (!n.allowsMarks(e.child(r).marks))
|
|
5711
5697
|
return !0;
|
|
5712
5698
|
return !1;
|
|
5713
5699
|
}
|
|
5714
|
-
function
|
|
5700
|
+
function fu(n) {
|
|
5715
5701
|
return n.spec.defining || n.spec.definingForContent;
|
|
5716
5702
|
}
|
|
5717
|
-
function
|
|
5703
|
+
function pu(n, e, t, r) {
|
|
5718
5704
|
if (!r.size)
|
|
5719
5705
|
return n.deleteRange(e, t);
|
|
5720
5706
|
let i = n.doc.resolve(e), s = n.doc.resolve(t);
|
|
@@ -5738,7 +5724,7 @@ function gu(n, e, t, r) {
|
|
|
5738
5724
|
h = p.content;
|
|
5739
5725
|
}
|
|
5740
5726
|
for (let h = d - 1; h >= 0; h--) {
|
|
5741
|
-
let f = c[h], p =
|
|
5727
|
+
let f = c[h], p = fu(f.type);
|
|
5742
5728
|
if (p && !f.sameMarkup(i.node(Math.abs(l) - 1)))
|
|
5743
5729
|
d = h;
|
|
5744
5730
|
else if (p || !f.type.isTextblock)
|
|
@@ -5772,14 +5758,14 @@ function Bl(n, e, t, r, i) {
|
|
|
5772
5758
|
}
|
|
5773
5759
|
return n;
|
|
5774
5760
|
}
|
|
5775
|
-
function
|
|
5761
|
+
function mu(n, e, t, r) {
|
|
5776
5762
|
if (!r.isInline && e == t && n.doc.resolve(e).parent.content.size) {
|
|
5777
|
-
let i =
|
|
5763
|
+
let i = cu(n.doc, e, r.type);
|
|
5778
5764
|
i != null && (e = t = i);
|
|
5779
5765
|
}
|
|
5780
5766
|
n.replaceRange(e, t, new S(b.from(r), 0, 0));
|
|
5781
5767
|
}
|
|
5782
|
-
function
|
|
5768
|
+
function gu(n, e, t) {
|
|
5783
5769
|
let r = n.doc.resolve(e), i = n.doc.resolve(t), s = _l(r, i);
|
|
5784
5770
|
for (let o = 0; o < s.length; o++) {
|
|
5785
5771
|
let l = s[o], a = o == s.length - 1;
|
|
@@ -5975,7 +5961,7 @@ class Fl {
|
|
|
5975
5961
|
control over what happens.
|
|
5976
5962
|
*/
|
|
5977
5963
|
replaceRange(e, t, r) {
|
|
5978
|
-
return
|
|
5964
|
+
return pu(this, e, t, r), this;
|
|
5979
5965
|
}
|
|
5980
5966
|
/**
|
|
5981
5967
|
Replace the given range with a node, but use `from` and `to` as
|
|
@@ -5987,14 +5973,14 @@ class Fl {
|
|
|
5987
5973
|
that parent node.
|
|
5988
5974
|
*/
|
|
5989
5975
|
replaceRangeWith(e, t, r) {
|
|
5990
|
-
return
|
|
5976
|
+
return mu(this, e, t, r), this;
|
|
5991
5977
|
}
|
|
5992
5978
|
/**
|
|
5993
5979
|
Delete the given range, expanding it to cover fully covered
|
|
5994
5980
|
parent nodes until a valid replace is found.
|
|
5995
5981
|
*/
|
|
5996
5982
|
deleteRange(e, t) {
|
|
5997
|
-
return
|
|
5983
|
+
return gu(this, e, t), this;
|
|
5998
5984
|
}
|
|
5999
5985
|
/**
|
|
6000
5986
|
Split the content in the given range off from its parent, if there
|
|
@@ -6004,14 +5990,14 @@ class Fl {
|
|
|
6004
5990
|
sure the lift is valid.
|
|
6005
5991
|
*/
|
|
6006
5992
|
lift(e, t) {
|
|
6007
|
-
return
|
|
5993
|
+
return eu(this, e, t), this;
|
|
6008
5994
|
}
|
|
6009
5995
|
/**
|
|
6010
5996
|
Join the blocks around the given position. If depth is 2, their
|
|
6011
5997
|
last and first siblings are also joined, and so on.
|
|
6012
5998
|
*/
|
|
6013
5999
|
join(e, t = 1) {
|
|
6014
|
-
return
|
|
6000
|
+
return au(this, e, t), this;
|
|
6015
6001
|
}
|
|
6016
6002
|
/**
|
|
6017
6003
|
Wrap the given [range](https://prosemirror.net/docs/ref/#model.NodeRange) in the given set of wrappers.
|
|
@@ -6019,21 +6005,21 @@ class Fl {
|
|
|
6019
6005
|
probably be computed with [`findWrapping`](https://prosemirror.net/docs/ref/#transform.findWrapping).
|
|
6020
6006
|
*/
|
|
6021
6007
|
wrap(e, t) {
|
|
6022
|
-
return
|
|
6008
|
+
return ru(this, e, t), this;
|
|
6023
6009
|
}
|
|
6024
6010
|
/**
|
|
6025
6011
|
Set the type of all textblocks (partly) between `from` and `to` to
|
|
6026
6012
|
the given node type with the given attributes.
|
|
6027
6013
|
*/
|
|
6028
6014
|
setBlockType(e, t = e, r, i = null) {
|
|
6029
|
-
return
|
|
6015
|
+
return iu(this, e, t, r, i), this;
|
|
6030
6016
|
}
|
|
6031
6017
|
/**
|
|
6032
6018
|
Change the type, attributes, and/or marks of the node at `pos`.
|
|
6033
6019
|
When `type` isn't given, the existing node type is preserved,
|
|
6034
6020
|
*/
|
|
6035
6021
|
setNodeMarkup(e, t, r = null, i) {
|
|
6036
|
-
return
|
|
6022
|
+
return ou(this, e, t, r, i), this;
|
|
6037
6023
|
}
|
|
6038
6024
|
/**
|
|
6039
6025
|
Set a single attribute on a given node to a new value.
|
|
@@ -6077,13 +6063,13 @@ class Fl {
|
|
|
6077
6063
|
use after the split.
|
|
6078
6064
|
*/
|
|
6079
6065
|
split(e, t = 1, r) {
|
|
6080
|
-
return
|
|
6066
|
+
return lu(this, e, t, r), this;
|
|
6081
6067
|
}
|
|
6082
6068
|
/**
|
|
6083
6069
|
Add the given mark to the inline content between `from` and `to`.
|
|
6084
6070
|
*/
|
|
6085
6071
|
addMark(e, t, r) {
|
|
6086
|
-
return
|
|
6072
|
+
return Yd(this, e, t, r), this;
|
|
6087
6073
|
}
|
|
6088
6074
|
/**
|
|
6089
6075
|
Remove marks from inline nodes between `from` and `to`. When
|
|
@@ -6092,7 +6078,7 @@ class Fl {
|
|
|
6092
6078
|
remove all marks of any type.
|
|
6093
6079
|
*/
|
|
6094
6080
|
removeMark(e, t, r) {
|
|
6095
|
-
return
|
|
6081
|
+
return Xd(this, e, t, r), this;
|
|
6096
6082
|
}
|
|
6097
6083
|
/**
|
|
6098
6084
|
Removes all marks and nodes from the content of the node at
|
|
@@ -6101,7 +6087,7 @@ class Fl {
|
|
|
6101
6087
|
third argument.
|
|
6102
6088
|
*/
|
|
6103
6089
|
clearIncompatible(e, t, r) {
|
|
6104
|
-
return
|
|
6090
|
+
return Qd(this, e, t, r), this;
|
|
6105
6091
|
}
|
|
6106
6092
|
}
|
|
6107
6093
|
const Qr = /* @__PURE__ */ Object.create(null);
|
|
@@ -6112,7 +6098,7 @@ class N {
|
|
|
6112
6098
|
`$head`.
|
|
6113
6099
|
*/
|
|
6114
6100
|
constructor(e, t, r) {
|
|
6115
|
-
this.$anchor = e, this.$head = t, this.ranges = r || [new
|
|
6101
|
+
this.$anchor = e, this.$head = t, this.ranges = r || [new yu(e.min(t), e.max(t))];
|
|
6116
6102
|
}
|
|
6117
6103
|
/**
|
|
6118
6104
|
The selection's anchor, as an unresolved position.
|
|
@@ -6270,7 +6256,7 @@ class N {
|
|
|
6270
6256
|
}
|
|
6271
6257
|
}
|
|
6272
6258
|
N.prototype.visible = !0;
|
|
6273
|
-
class
|
|
6259
|
+
class yu {
|
|
6274
6260
|
/**
|
|
6275
6261
|
Create a range.
|
|
6276
6262
|
*/
|
|
@@ -6458,11 +6444,11 @@ class Te extends N {
|
|
|
6458
6444
|
return e instanceof Te;
|
|
6459
6445
|
}
|
|
6460
6446
|
getBookmark() {
|
|
6461
|
-
return
|
|
6447
|
+
return bu;
|
|
6462
6448
|
}
|
|
6463
6449
|
}
|
|
6464
6450
|
N.jsonID("all", Te);
|
|
6465
|
-
const
|
|
6451
|
+
const bu = {
|
|
6466
6452
|
map() {
|
|
6467
6453
|
return this;
|
|
6468
6454
|
},
|
|
@@ -6500,7 +6486,7 @@ function js(n, e, t) {
|
|
|
6500
6486
|
}), n.setSelection(N.near(n.doc.resolve(o), t));
|
|
6501
6487
|
}
|
|
6502
6488
|
const qs = 1, Tn = 2, Ks = 4;
|
|
6503
|
-
class
|
|
6489
|
+
class ku extends Fl {
|
|
6504
6490
|
/**
|
|
6505
6491
|
@internal
|
|
6506
6492
|
*/
|
|
@@ -6659,7 +6645,7 @@ class Yt {
|
|
|
6659
6645
|
this.name = e, this.init = Ws(t.init, r), this.apply = Ws(t.apply, r);
|
|
6660
6646
|
}
|
|
6661
6647
|
}
|
|
6662
|
-
const
|
|
6648
|
+
const Su = [
|
|
6663
6649
|
new Yt("doc", {
|
|
6664
6650
|
init(n) {
|
|
6665
6651
|
return n.doc || n.schema.topNodeType.createAndFill();
|
|
@@ -6695,7 +6681,7 @@ const Cu = [
|
|
|
6695
6681
|
];
|
|
6696
6682
|
class Zr {
|
|
6697
6683
|
constructor(e, t) {
|
|
6698
|
-
this.schema = e, this.plugins = [], this.pluginsByKey = /* @__PURE__ */ Object.create(null), this.fields =
|
|
6684
|
+
this.schema = e, this.plugins = [], this.pluginsByKey = /* @__PURE__ */ Object.create(null), this.fields = Su.slice(), t && t.forEach((r) => {
|
|
6699
6685
|
if (this.pluginsByKey[r.key])
|
|
6700
6686
|
throw new RangeError("Adding different instances of a keyed plugin (" + r.key + ")");
|
|
6701
6687
|
this.plugins.push(r), this.pluginsByKey[r.key] = r, r.spec.state && this.fields.push(new Yt(r.key, r.spec.state, r));
|
|
@@ -6788,7 +6774,7 @@ class Dt {
|
|
|
6788
6774
|
Start a [transaction](https://prosemirror.net/docs/ref/#state.Transaction) from this state.
|
|
6789
6775
|
*/
|
|
6790
6776
|
get tr() {
|
|
6791
|
-
return new
|
|
6777
|
+
return new ku(this);
|
|
6792
6778
|
}
|
|
6793
6779
|
/**
|
|
6794
6780
|
Create a new state.
|
|
@@ -6927,14 +6913,14 @@ const Be = function(n, e, t) {
|
|
|
6927
6913
|
return r.setEnd(n, t ?? n.nodeValue.length), r.setStart(n, e || 0), r;
|
|
6928
6914
|
}, Ct = function(n, e, t, r) {
|
|
6929
6915
|
return t && (Js(n, e, t, r, -1) || Js(n, e, t, r, 1));
|
|
6930
|
-
},
|
|
6916
|
+
}, xu = /^(img|br|input|textarea|hr)$/i;
|
|
6931
6917
|
function Js(n, e, t, r, i) {
|
|
6932
6918
|
for (; ; ) {
|
|
6933
6919
|
if (n == t && e == r)
|
|
6934
6920
|
return !0;
|
|
6935
6921
|
if (e == (i < 0 ? 0 : Ae(n))) {
|
|
6936
6922
|
let s = n.parentNode;
|
|
6937
|
-
if (!s || s.nodeType != 1 || Zi(n) ||
|
|
6923
|
+
if (!s || s.nodeType != 1 || Zi(n) || xu.test(n.nodeName) || n.contentEditable == "false")
|
|
6938
6924
|
return !1;
|
|
6939
6925
|
e = oe(n) + (i < 0 ? 0 : 1), n = s;
|
|
6940
6926
|
} else if (n.nodeType == 1) {
|
|
@@ -6948,7 +6934,7 @@ function Js(n, e, t, r, i) {
|
|
|
6948
6934
|
function Ae(n) {
|
|
6949
6935
|
return n.nodeType == 3 ? n.nodeValue.length : n.childNodes.length;
|
|
6950
6936
|
}
|
|
6951
|
-
function
|
|
6937
|
+
function Cu(n, e, t) {
|
|
6952
6938
|
for (let r = e == 0, i = e == Ae(n); r || i; ) {
|
|
6953
6939
|
if (n == t)
|
|
6954
6940
|
return !0;
|
|
@@ -6971,13 +6957,13 @@ function lt(n, e) {
|
|
|
6971
6957
|
let t = document.createEvent("Event");
|
|
6972
6958
|
return t.initEvent("keydown", !0, !0), t.keyCode = n, t.key = t.code = e, t;
|
|
6973
6959
|
}
|
|
6974
|
-
function
|
|
6960
|
+
function Eu(n) {
|
|
6975
6961
|
let e = n.activeElement;
|
|
6976
6962
|
for (; e && e.shadowRoot; )
|
|
6977
6963
|
e = e.shadowRoot.activeElement;
|
|
6978
6964
|
return e;
|
|
6979
6965
|
}
|
|
6980
|
-
function
|
|
6966
|
+
function Tu(n, e, t) {
|
|
6981
6967
|
if (n.caretPositionFromPoint)
|
|
6982
6968
|
try {
|
|
6983
6969
|
let r = n.caretPositionFromPoint(e, t);
|
|
@@ -6993,8 +6979,8 @@ function wu(n, e, t) {
|
|
|
6993
6979
|
}
|
|
6994
6980
|
const Ie = typeof navigator < "u" ? navigator : null, Gs = typeof document < "u" ? document : null, it = Ie && Ie.userAgent || "", Ei = /Edge\/(\d+)/.exec(it), Vl = /MSIE \d/.exec(it), Ti = /Trident\/(?:[7-9]|\d{2,})\..*rv:(\d+)/.exec(it), he = !!(Vl || Ti || Ei), Qe = Vl ? document.documentMode : Ti ? +Ti[1] : Ei ? +Ei[1] : 0, Me = !he && /gecko\/(\d+)/i.test(it);
|
|
6995
6981
|
Me && +(/Firefox\/(\d+)/.exec(it) || [0, 0])[1];
|
|
6996
|
-
const Mi = !he && /Chrome\/(\d+)/.exec(it), te = !!Mi,
|
|
6997
|
-
function
|
|
6982
|
+
const Mi = !he && /Chrome\/(\d+)/.exec(it), te = !!Mi, Mu = Mi ? +Mi[1] : 0, le = !he && !!Ie && /Apple Computer/.test(Ie.vendor), Ft = le && (/Mobile\/\w+/.test(it) || !!Ie && Ie.maxTouchPoints > 2), ke = Ft || (Ie ? /Mac/.test(Ie.platform) : !1), wu = Ie ? /Win/.test(Ie.platform) : !1, Ee = /Android \d/.test(it), kn = !!Gs && "webkitFontSmoothing" in Gs.documentElement.style, Ou = kn ? +(/\bAppleWebKit\/(\d+)/.exec(navigator.userAgent) || [0, 0])[1] : 0;
|
|
6983
|
+
function vu(n) {
|
|
6998
6984
|
return {
|
|
6999
6985
|
left: 0,
|
|
7000
6986
|
right: n.documentElement.clientWidth,
|
|
@@ -7005,7 +6991,7 @@ function Nu(n) {
|
|
|
7005
6991
|
function Pe(n, e) {
|
|
7006
6992
|
return typeof n == "number" ? n : n[e];
|
|
7007
6993
|
}
|
|
7008
|
-
function
|
|
6994
|
+
function Au(n) {
|
|
7009
6995
|
let e = n.getBoundingClientRect(), t = e.width / n.offsetWidth || 1, r = e.height / n.offsetHeight || 1;
|
|
7010
6996
|
return {
|
|
7011
6997
|
left: e.left,
|
|
@@ -7019,7 +7005,7 @@ function Ys(n, e, t) {
|
|
|
7019
7005
|
for (let o = t || n.dom; o; o = dn(o)) {
|
|
7020
7006
|
if (o.nodeType != 1)
|
|
7021
7007
|
continue;
|
|
7022
|
-
let l = o, a = l == s.body, c = a ?
|
|
7008
|
+
let l = o, a = l == s.body, c = a ? vu(s) : Au(l), d = 0, u = 0;
|
|
7023
7009
|
if (e.top < c.top + Pe(r, "top") ? u = -(c.top - e.top + Pe(i, "top")) : e.bottom > c.bottom - Pe(r, "bottom") && (u = e.bottom - e.top > c.bottom - c.top ? e.top + Pe(i, "top") - c.top : e.bottom - c.bottom + Pe(i, "bottom")), e.left < c.left + Pe(r, "left") ? d = -(c.left - e.left + Pe(i, "left")) : e.right > c.right - Pe(r, "right") && (d = e.right - c.right + Pe(i, "right")), d || u)
|
|
7024
7010
|
if (a)
|
|
7025
7011
|
s.defaultView.scrollBy(d, u);
|
|
@@ -7033,7 +7019,7 @@ function Ys(n, e, t) {
|
|
|
7033
7019
|
break;
|
|
7034
7020
|
}
|
|
7035
7021
|
}
|
|
7036
|
-
function
|
|
7022
|
+
function Nu(n) {
|
|
7037
7023
|
let e = n.dom.getBoundingClientRect(), t = Math.max(0, e.top), r, i;
|
|
7038
7024
|
for (let s = (e.left + e.right) / 2, o = t + 1; o < Math.min(innerHeight, e.bottom); o += 5) {
|
|
7039
7025
|
let l = n.root.elementFromPoint(s, o);
|
|
@@ -7053,7 +7039,7 @@ function $l(n) {
|
|
|
7053
7039
|
;
|
|
7054
7040
|
return e;
|
|
7055
7041
|
}
|
|
7056
|
-
function
|
|
7042
|
+
function Du({ refDOM: n, refTop: e, stack: t }) {
|
|
7057
7043
|
let r = n ? n.getBoundingClientRect().top : 0;
|
|
7058
7044
|
jl(t, r == 0 ? 0 : r - e);
|
|
7059
7045
|
}
|
|
@@ -7064,7 +7050,7 @@ function jl(n, e) {
|
|
|
7064
7050
|
}
|
|
7065
7051
|
}
|
|
7066
7052
|
let Tt = null;
|
|
7067
|
-
function
|
|
7053
|
+
function Iu(n) {
|
|
7068
7054
|
if (n.setActive)
|
|
7069
7055
|
return n.setActive();
|
|
7070
7056
|
if (Tt)
|
|
@@ -7103,9 +7089,9 @@ function ql(n, e) {
|
|
|
7103
7089
|
!t && (e.left >= p.right && e.top >= p.top || e.left >= p.left && e.top >= p.bottom) && (s = u + 1);
|
|
7104
7090
|
}
|
|
7105
7091
|
}
|
|
7106
|
-
return !t && a && (t = a, i = c, r = 0), t && t.nodeType == 3 ?
|
|
7092
|
+
return !t && a && (t = a, i = c, r = 0), t && t.nodeType == 3 ? Ru(t, i) : !t || r && t.nodeType == 1 ? { node: n, offset: s } : ql(t, i);
|
|
7107
7093
|
}
|
|
7108
|
-
function
|
|
7094
|
+
function Ru(n, e) {
|
|
7109
7095
|
let t = n.nodeValue.length, r = document.createRange();
|
|
7110
7096
|
for (let i = 0; i < t; i++) {
|
|
7111
7097
|
r.setEnd(n, i + 1), r.setStart(n, i);
|
|
@@ -7118,11 +7104,11 @@ function Lu(n, e) {
|
|
|
7118
7104
|
function es(n, e) {
|
|
7119
7105
|
return n.left >= e.left - 1 && n.left <= e.right + 1 && n.top >= e.top - 1 && n.top <= e.bottom + 1;
|
|
7120
7106
|
}
|
|
7121
|
-
function
|
|
7107
|
+
function Pu(n, e) {
|
|
7122
7108
|
let t = n.parentNode;
|
|
7123
7109
|
return t && /^li$/i.test(t.nodeName) && e.left < n.getBoundingClientRect().left ? t : n;
|
|
7124
7110
|
}
|
|
7125
|
-
function
|
|
7111
|
+
function Lu(n, e, t) {
|
|
7126
7112
|
let { node: r, offset: i } = ql(e, t), s = -1;
|
|
7127
7113
|
if (r.nodeType == 1 && !r.firstChild) {
|
|
7128
7114
|
let o = r.getBoundingClientRect();
|
|
@@ -7130,7 +7116,7 @@ function _u(n, e, t) {
|
|
|
7130
7116
|
}
|
|
7131
7117
|
return n.docView.posFromDOM(r, i, s);
|
|
7132
7118
|
}
|
|
7133
|
-
function
|
|
7119
|
+
function Bu(n, e, t, r) {
|
|
7134
7120
|
let i = -1;
|
|
7135
7121
|
for (let s = e, o = !1; s != n.dom; ) {
|
|
7136
7122
|
let l = n.docView.nearestDesc(s, !0);
|
|
@@ -7163,8 +7149,8 @@ function Kl(n, e, t) {
|
|
|
7163
7149
|
}
|
|
7164
7150
|
return n;
|
|
7165
7151
|
}
|
|
7166
|
-
function
|
|
7167
|
-
let t = n.dom.ownerDocument, r, i = 0, s =
|
|
7152
|
+
function _u(n, e) {
|
|
7153
|
+
let t = n.dom.ownerDocument, r, i = 0, s = Tu(t, e.left, e.top);
|
|
7168
7154
|
s && ({ node: r, offset: i } = s);
|
|
7169
7155
|
let o = (n.root.elementFromPoint ? n.root : t).elementFromPoint(e.left, e.top), l;
|
|
7170
7156
|
if (!o || !n.dom.contains(o.nodeType != 1 ? o.parentNode : o)) {
|
|
@@ -7175,15 +7161,15 @@ function zu(n, e) {
|
|
|
7175
7161
|
if (le)
|
|
7176
7162
|
for (let c = o; r && c; c = dn(c))
|
|
7177
7163
|
c.draggable && (r = void 0);
|
|
7178
|
-
if (o =
|
|
7164
|
+
if (o = Pu(o, e), r) {
|
|
7179
7165
|
if (Me && r.nodeType == 1 && (i = Math.min(i, r.childNodes.length), i < r.childNodes.length)) {
|
|
7180
7166
|
let d = r.childNodes[i], u;
|
|
7181
7167
|
d.nodeName == "IMG" && (u = d.getBoundingClientRect()).right <= e.left && u.bottom > e.top && i++;
|
|
7182
7168
|
}
|
|
7183
7169
|
let c;
|
|
7184
|
-
kn && i && r.nodeType == 1 && (c = r.childNodes[i - 1]).nodeType == 1 && c.contentEditable == "false" && c.getBoundingClientRect().top >= e.top && i--, r == n.dom && i == r.childNodes.length - 1 && r.lastChild.nodeType == 1 && e.top > r.lastChild.getBoundingClientRect().bottom ? l = n.state.doc.content.size : (i == 0 || r.nodeType != 1 || r.childNodes[i - 1].nodeName != "BR") && (l =
|
|
7170
|
+
kn && i && r.nodeType == 1 && (c = r.childNodes[i - 1]).nodeType == 1 && c.contentEditable == "false" && c.getBoundingClientRect().top >= e.top && i--, r == n.dom && i == r.childNodes.length - 1 && r.lastChild.nodeType == 1 && e.top > r.lastChild.getBoundingClientRect().bottom ? l = n.state.doc.content.size : (i == 0 || r.nodeType != 1 || r.childNodes[i - 1].nodeName != "BR") && (l = Bu(n, r, i, e));
|
|
7185
7171
|
}
|
|
7186
|
-
l == null && (l =
|
|
7172
|
+
l == null && (l = Lu(n, o, e));
|
|
7187
7173
|
let a = n.docView.nearestDesc(o, !0);
|
|
7188
7174
|
return { pos: l, inside: a ? a.posAtStart - a.border : -1 };
|
|
7189
7175
|
}
|
|
@@ -7199,11 +7185,11 @@ function qe(n, e) {
|
|
|
7199
7185
|
}
|
|
7200
7186
|
return Array.prototype.find.call(t, Xs) || n.getBoundingClientRect();
|
|
7201
7187
|
}
|
|
7202
|
-
const
|
|
7188
|
+
const Fu = /[\u0590-\u05f4\u0600-\u06ff\u0700-\u08ac]/;
|
|
7203
7189
|
function Wl(n, e, t) {
|
|
7204
7190
|
let { node: r, offset: i, atom: s } = n.docView.domFromPos(e, t < 0 ? -1 : 1), o = kn || Me;
|
|
7205
7191
|
if (r.nodeType == 3)
|
|
7206
|
-
if (o && (
|
|
7192
|
+
if (o && (Fu.test(r.nodeValue) || (t < 0 ? !i : i == r.nodeValue.length))) {
|
|
7207
7193
|
let a = qe(Be(r, i, i), t);
|
|
7208
7194
|
if (Me && i && /\s/.test(r.nodeValue[i - 1]) && i < r.nodeValue.length) {
|
|
7209
7195
|
let c = qe(Be(r, i - 1, i - 1), -1);
|
|
@@ -7267,7 +7253,7 @@ function Ul(n, e, t) {
|
|
|
7267
7253
|
r != e && n.updateState(r), i != n.dom && i && i.focus();
|
|
7268
7254
|
}
|
|
7269
7255
|
}
|
|
7270
|
-
function
|
|
7256
|
+
function zu(n, e, t) {
|
|
7271
7257
|
let r = e.selection, i = t == "up" ? r.$from : r.$to;
|
|
7272
7258
|
return Ul(n, e, () => {
|
|
7273
7259
|
let { node: s } = n.docView.domFromPos(i.pos, t == "up" ? -1 : 1);
|
|
@@ -7299,13 +7285,13 @@ function Vu(n, e, t) {
|
|
|
7299
7285
|
return !0;
|
|
7300
7286
|
});
|
|
7301
7287
|
}
|
|
7302
|
-
const
|
|
7303
|
-
function
|
|
7288
|
+
const Hu = /[\u0590-\u08ac]/;
|
|
7289
|
+
function Vu(n, e, t) {
|
|
7304
7290
|
let { $head: r } = e.selection;
|
|
7305
7291
|
if (!r.parent.isTextblock)
|
|
7306
7292
|
return !1;
|
|
7307
7293
|
let i = r.parentOffset, s = !i, o = i == r.parent.content.size, l = n.domSelection();
|
|
7308
|
-
return
|
|
7294
|
+
return !Hu.test(r.parent.textContent) || !l.modify ? t == "left" || t == "backward" ? s : o : Ul(n, e, () => {
|
|
7309
7295
|
let { focusNode: a, focusOffset: c, anchorNode: d, anchorOffset: u } = n.domSelectionRange(), h = l.caretBidiLevel;
|
|
7310
7296
|
l.modify("move", t, "character");
|
|
7311
7297
|
let f = r.depth ? n.docView.domAfterPos(r.before()) : n.dom, { focusNode: p, focusOffset: m } = n.domSelectionRange(), g = p && !f.contains(p.nodeType == 1 ? p : p.parentNode) || a == p && c == m;
|
|
@@ -7317,8 +7303,8 @@ function ju(n, e, t) {
|
|
|
7317
7303
|
});
|
|
7318
7304
|
}
|
|
7319
7305
|
let Qs = null, Zs = null, eo = !1;
|
|
7320
|
-
function
|
|
7321
|
-
return Qs == e && Zs == t ? eo : (Qs = e, Zs = t, eo = t == "up" || t == "down" ?
|
|
7306
|
+
function $u(n, e, t) {
|
|
7307
|
+
return Qs == e && Zs == t ? eo : (Qs = e, Zs = t, eo = t == "up" || t == "down" ? zu(n, e, t) : Vu(n, e, t));
|
|
7322
7308
|
}
|
|
7323
7309
|
const Se = 0, to = 1, at = 2, Re = 3;
|
|
7324
7310
|
class Sn {
|
|
@@ -7693,7 +7679,7 @@ class Jl extends Sn {
|
|
|
7693
7679
|
return this.widget.type.side;
|
|
7694
7680
|
}
|
|
7695
7681
|
}
|
|
7696
|
-
class
|
|
7682
|
+
class ju extends Sn {
|
|
7697
7683
|
constructor(e, t, r, i) {
|
|
7698
7684
|
super(e, [], t, null), this.textDOM = r, this.text = i;
|
|
7699
7685
|
}
|
|
@@ -7769,7 +7755,7 @@ class Ze extends Sn {
|
|
|
7769
7755
|
d || ({ dom: d, contentDOM: u } = Ne.renderSpec(document, t.type.spec.toDOM(t)));
|
|
7770
7756
|
!u && !t.isText && d.nodeName != "BR" && (d.hasAttribute("contenteditable") || (d.contentEditable = "false"), t.type.spec.draggable && (d.draggable = !0));
|
|
7771
7757
|
let h = d;
|
|
7772
|
-
return d = Ql(d, r, t), c ? a = new
|
|
7758
|
+
return d = Ql(d, r, t), c ? a = new qu(e, t, r, i, d, u || null, h, c, s, o + 1) : t.isText ? new Nr(e, t, r, i, d, h, s) : new Ze(e, t, r, i, d, u || null, h, s, o + 1);
|
|
7773
7759
|
}
|
|
7774
7760
|
parseRule() {
|
|
7775
7761
|
if (this.node.type.spec.reparseInView)
|
|
@@ -7805,24 +7791,24 @@ class Ze extends Sn {
|
|
|
7805
7791
|
// separate step, syncs the DOM inside `this.contentDOM` to
|
|
7806
7792
|
// `this.children`.
|
|
7807
7793
|
updateChildren(e, t) {
|
|
7808
|
-
let r = this.node.inlineContent, i = t, s = e.composing ? this.localCompositionInfo(e, t) : null, o = s && s.pos > -1 ? s : null, l = s && s.pos < 0, a = new
|
|
7809
|
-
|
|
7794
|
+
let r = this.node.inlineContent, i = t, s = e.composing ? this.localCompositionInfo(e, t) : null, o = s && s.pos > -1 ? s : null, l = s && s.pos < 0, a = new Wu(this, o && o.node, e);
|
|
7795
|
+
Gu(this.node, this.innerDeco, (c, d, u) => {
|
|
7810
7796
|
c.spec.marks ? a.syncToMarks(c.spec.marks, r, e) : c.type.side >= 0 && !u && a.syncToMarks(d == this.node.childCount ? B.none : this.node.child(d).marks, r, e), a.placeWidget(c, e, i);
|
|
7811
7797
|
}, (c, d, u, h) => {
|
|
7812
7798
|
a.syncToMarks(c.marks, r, e);
|
|
7813
7799
|
let f;
|
|
7814
7800
|
a.findNodeMatch(c, d, u, h) || l && e.state.selection.from > i && e.state.selection.to < i + c.nodeSize && (f = a.findIndexWithChild(s.node)) > -1 && a.updateNodeAt(c, d, u, f, e) || a.updateNextNode(c, d, u, e, h, i) || a.addNode(c, d, u, e, i), i += c.nodeSize;
|
|
7815
|
-
}), a.syncToMarks([], r, e), this.node.isTextblock && a.addTextblockHacks(), a.destroyRest(), (a.changed || this.dirty == at) && (o && this.protectLocalComposition(e, o), Yl(this.contentDOM, this.children, e), Ft &&
|
|
7801
|
+
}), a.syncToMarks([], r, e), this.node.isTextblock && a.addTextblockHacks(), a.destroyRest(), (a.changed || this.dirty == at) && (o && this.protectLocalComposition(e, o), Yl(this.contentDOM, this.children, e), Ft && Yu(this.dom));
|
|
7816
7802
|
}
|
|
7817
7803
|
localCompositionInfo(e, t) {
|
|
7818
7804
|
let { from: r, to: i } = e.state.selection;
|
|
7819
7805
|
if (!(e.state.selection instanceof D) || r < t || i > t + this.node.content.size)
|
|
7820
7806
|
return null;
|
|
7821
|
-
let s = e.domSelectionRange(), o =
|
|
7807
|
+
let s = e.domSelectionRange(), o = Xu(s.focusNode, s.focusOffset);
|
|
7822
7808
|
if (!o || !this.dom.contains(o.parentNode))
|
|
7823
7809
|
return null;
|
|
7824
7810
|
if (this.node.inlineContent) {
|
|
7825
|
-
let l = o.nodeValue, a =
|
|
7811
|
+
let l = o.nodeValue, a = Qu(this.node.content, l, r - t, i - t);
|
|
7826
7812
|
return a < 0 ? null : { node: o, pos: a, text: l };
|
|
7827
7813
|
} else
|
|
7828
7814
|
return { node: o, pos: -1, text: "" };
|
|
@@ -7838,7 +7824,7 @@ class Ze extends Sn {
|
|
|
7838
7824
|
s.parentNode.removeChild(s.nextSibling);
|
|
7839
7825
|
s.pmViewDesc && (s.pmViewDesc = void 0);
|
|
7840
7826
|
}
|
|
7841
|
-
let o = new
|
|
7827
|
+
let o = new ju(this, s, t, i);
|
|
7842
7828
|
e.input.compositionNodes.push(o), this.children = vi(this.children, r, r + i.length, e, o);
|
|
7843
7829
|
}
|
|
7844
7830
|
// If this desc must be updated to match the given node decoration,
|
|
@@ -7926,7 +7912,7 @@ class Gl extends Sn {
|
|
|
7926
7912
|
return this.dom.nodeName == "IMG";
|
|
7927
7913
|
}
|
|
7928
7914
|
}
|
|
7929
|
-
class
|
|
7915
|
+
class qu extends Ze {
|
|
7930
7916
|
constructor(e, t, r, i, s, o, l, a, c, d) {
|
|
7931
7917
|
super(e, t, r, i, s, o, l, c, d), this.spec = a;
|
|
7932
7918
|
}
|
|
@@ -8011,11 +7997,11 @@ function Xl(n, e, t, r) {
|
|
|
8011
7997
|
let a;
|
|
8012
7998
|
l && l.nodeName == o.nodeName && i != n && (a = i.parentNode) && a.nodeName.toLowerCase() == o.nodeName || (a = document.createElement(o.nodeName), a.pmIsDeco = !0, a.appendChild(i), l = ct[0]), i = a;
|
|
8013
7999
|
}
|
|
8014
|
-
|
|
8000
|
+
Ku(i, l || ct[0], o);
|
|
8015
8001
|
}
|
|
8016
8002
|
return i;
|
|
8017
8003
|
}
|
|
8018
|
-
function
|
|
8004
|
+
function Ku(n, e, t) {
|
|
8019
8005
|
for (let r in e)
|
|
8020
8006
|
r != "class" && r != "style" && r != "nodeName" && !(r in t) && n.removeAttribute(r);
|
|
8021
8007
|
for (let r in t)
|
|
@@ -8052,9 +8038,9 @@ function ro(n) {
|
|
|
8052
8038
|
let e = n.nextSibling;
|
|
8053
8039
|
return n.parentNode.removeChild(n), e;
|
|
8054
8040
|
}
|
|
8055
|
-
class
|
|
8041
|
+
class Wu {
|
|
8056
8042
|
constructor(e, t, r) {
|
|
8057
|
-
this.lock = t, this.view = r, this.index = 0, this.stack = [], this.changed = !1, this.top = e, this.preMatch =
|
|
8043
|
+
this.lock = t, this.view = r, this.index = 0, this.stack = [], this.changed = !1, this.top = e, this.preMatch = Uu(e.node.content, e);
|
|
8058
8044
|
}
|
|
8059
8045
|
// Destroy and remove the children between the given indices in
|
|
8060
8046
|
// `this.top`.
|
|
@@ -8202,7 +8188,7 @@ class Ju {
|
|
|
8202
8188
|
return this.lock && (e == this.lock || e.nodeType == 1 && e.contains(this.lock.parentNode));
|
|
8203
8189
|
}
|
|
8204
8190
|
}
|
|
8205
|
-
function
|
|
8191
|
+
function Uu(n, e) {
|
|
8206
8192
|
let t = e, r = t.children.length, i = n.childCount, s = /* @__PURE__ */ new Map(), o = [];
|
|
8207
8193
|
e:
|
|
8208
8194
|
for (; i > 0; ) {
|
|
@@ -8230,10 +8216,10 @@ function Gu(n, e) {
|
|
|
8230
8216
|
}
|
|
8231
8217
|
return { index: i, matched: s, matches: o.reverse() };
|
|
8232
8218
|
}
|
|
8233
|
-
function
|
|
8219
|
+
function Ju(n, e) {
|
|
8234
8220
|
return n.type.side - e.type.side;
|
|
8235
8221
|
}
|
|
8236
|
-
function
|
|
8222
|
+
function Gu(n, e, t, r) {
|
|
8237
8223
|
let i = e.locals(n), s = 0;
|
|
8238
8224
|
if (i.length == 0) {
|
|
8239
8225
|
for (let c = 0; c < n.childCount; c++) {
|
|
@@ -8251,7 +8237,7 @@ function Xu(n, e, t, r) {
|
|
|
8251
8237
|
}
|
|
8252
8238
|
if (d)
|
|
8253
8239
|
if (u) {
|
|
8254
|
-
u.sort(
|
|
8240
|
+
u.sort(Ju);
|
|
8255
8241
|
for (let g = 0; g < u.length; g++)
|
|
8256
8242
|
t(u[g], c, !!a);
|
|
8257
8243
|
} else
|
|
@@ -8279,13 +8265,13 @@ function Xu(n, e, t, r) {
|
|
|
8279
8265
|
r(h, m, e.forChild(s, h), f), s = p;
|
|
8280
8266
|
}
|
|
8281
8267
|
}
|
|
8282
|
-
function
|
|
8268
|
+
function Yu(n) {
|
|
8283
8269
|
if (n.nodeName == "UL" || n.nodeName == "OL") {
|
|
8284
8270
|
let e = n.style.cssText;
|
|
8285
8271
|
n.style.cssText = e + "; list-style: square !important", window.getComputedStyle(n).listStyle, n.style.cssText = e;
|
|
8286
8272
|
}
|
|
8287
8273
|
}
|
|
8288
|
-
function
|
|
8274
|
+
function Xu(n, e) {
|
|
8289
8275
|
for (; ; ) {
|
|
8290
8276
|
if (n.nodeType == 3)
|
|
8291
8277
|
return n;
|
|
@@ -8299,7 +8285,7 @@ function Zu(n, e) {
|
|
|
8299
8285
|
return null;
|
|
8300
8286
|
}
|
|
8301
8287
|
}
|
|
8302
|
-
function
|
|
8288
|
+
function Qu(n, e, t, r) {
|
|
8303
8289
|
for (let i = 0, s = 0; i < n.childCount && s <= r; ) {
|
|
8304
8290
|
let o = n.child(i++), l = s;
|
|
8305
8291
|
if (s += o.nodeSize, !o.isText)
|
|
@@ -8343,7 +8329,7 @@ function ts(n, e = null) {
|
|
|
8343
8329
|
for (a = l; i && !i.node; )
|
|
8344
8330
|
i = i.parent;
|
|
8345
8331
|
let d = i.node;
|
|
8346
|
-
if (i && d.isAtom && w.isSelectable(d) && i.parent && !(d.isInline &&
|
|
8332
|
+
if (i && d.isAtom && w.isSelectable(d) && i.parent && !(d.isInline && Cu(t.focusNode, t.focusOffset, i.dom))) {
|
|
8347
8333
|
let u = i.posBefore;
|
|
8348
8334
|
c = new w(o == u ? l : r.resolve(u));
|
|
8349
8335
|
}
|
|
@@ -8373,15 +8359,15 @@ function Fe(n, e = !1) {
|
|
|
8373
8359
|
}
|
|
8374
8360
|
}
|
|
8375
8361
|
if (n.domObserver.disconnectSelection(), n.cursorWrapper)
|
|
8376
|
-
|
|
8362
|
+
eh(n);
|
|
8377
8363
|
else {
|
|
8378
8364
|
let { anchor: r, head: i } = t, s, o;
|
|
8379
|
-
io && !(t instanceof D) && (t.$from.parent.inlineContent || (s = so(n, t.from)), !t.empty && !t.$from.parent.inlineContent && (o = so(n, t.to))), n.docView.setSelection(r, i, n.root, e), io && (s && oo(s), o && oo(o)), t.visible ? n.dom.classList.remove("ProseMirror-hideselection") : (n.dom.classList.add("ProseMirror-hideselection"), "onselectionchange" in document &&
|
|
8365
|
+
io && !(t instanceof D) && (t.$from.parent.inlineContent || (s = so(n, t.from)), !t.empty && !t.$from.parent.inlineContent && (o = so(n, t.to))), n.docView.setSelection(r, i, n.root, e), io && (s && oo(s), o && oo(o)), t.visible ? n.dom.classList.remove("ProseMirror-hideselection") : (n.dom.classList.add("ProseMirror-hideselection"), "onselectionchange" in document && Zu(n));
|
|
8380
8366
|
}
|
|
8381
8367
|
n.domObserver.setCurSelection(), n.domObserver.connectSelection();
|
|
8382
8368
|
}
|
|
8383
8369
|
}
|
|
8384
|
-
const io = le || te &&
|
|
8370
|
+
const io = le || te && Mu < 63;
|
|
8385
8371
|
function so(n, e) {
|
|
8386
8372
|
let { node: t, offset: r } = n.docView.domFromPos(e, 0), i = r < t.childNodes.length ? t.childNodes[r] : null, s = r ? t.childNodes[r - 1] : null;
|
|
8387
8373
|
if (le && i && i.contentEditable == "false")
|
|
@@ -8399,7 +8385,7 @@ function ni(n) {
|
|
|
8399
8385
|
function oo(n) {
|
|
8400
8386
|
n.contentEditable = "false", n.wasDraggable && (n.draggable = !0, n.wasDraggable = null);
|
|
8401
8387
|
}
|
|
8402
|
-
function
|
|
8388
|
+
function Zu(n) {
|
|
8403
8389
|
let e = n.dom.ownerDocument;
|
|
8404
8390
|
e.removeEventListener("selectionchange", n.input.hideSelectionGuard);
|
|
8405
8391
|
let t = n.domSelectionRange(), r = t.anchorNode, i = t.anchorOffset;
|
|
@@ -8409,7 +8395,7 @@ function th(n) {
|
|
|
8409
8395
|
}, 20));
|
|
8410
8396
|
});
|
|
8411
8397
|
}
|
|
8412
|
-
function
|
|
8398
|
+
function eh(n) {
|
|
8413
8399
|
let e = n.domSelection(), t = document.createRange(), r = n.cursorWrapper.dom, i = r.nodeName == "IMG";
|
|
8414
8400
|
i ? t.setEnd(r.parentNode, oe(r) + 1) : t.setEnd(r, 0), t.collapse(!1), e.removeAllRanges(), e.addRange(t), !i && !n.state.selection.visible && he && Qe <= 11 && (r.disabled = !0, r.disabled = !1);
|
|
8415
8401
|
}
|
|
@@ -8439,7 +8425,7 @@ function ta(n) {
|
|
|
8439
8425
|
return !1;
|
|
8440
8426
|
}
|
|
8441
8427
|
}
|
|
8442
|
-
function
|
|
8428
|
+
function th(n) {
|
|
8443
8429
|
let e = n.docView.domFromPos(n.state.selection.anchor, 0), t = n.domSelectionRange();
|
|
8444
8430
|
return Ct(e.node, e.offset, t.anchorNode, t.anchorOffset);
|
|
8445
8431
|
}
|
|
@@ -8489,9 +8475,9 @@ function nn(n, e) {
|
|
|
8489
8475
|
return t && t.size == 0 && (e < 0 || n.nextSibling || n.nodeName != "BR");
|
|
8490
8476
|
}
|
|
8491
8477
|
function Mt(n, e) {
|
|
8492
|
-
return e < 0 ?
|
|
8478
|
+
return e < 0 ? nh(n) : rh(n);
|
|
8493
8479
|
}
|
|
8494
|
-
function
|
|
8480
|
+
function nh(n) {
|
|
8495
8481
|
let e = n.domSelectionRange(), t = e.focusNode, r = e.focusOffset;
|
|
8496
8482
|
if (!t)
|
|
8497
8483
|
return;
|
|
@@ -8527,7 +8513,7 @@ function ih(n) {
|
|
|
8527
8513
|
}
|
|
8528
8514
|
o ? Ni(n, t, r) : i && Ni(n, i, s);
|
|
8529
8515
|
}
|
|
8530
|
-
function
|
|
8516
|
+
function rh(n) {
|
|
8531
8517
|
let e = n.domSelectionRange(), t = e.focusNode, r = e.focusOffset;
|
|
8532
8518
|
if (!t)
|
|
8533
8519
|
return;
|
|
@@ -8563,7 +8549,7 @@ function na(n) {
|
|
|
8563
8549
|
let e = n.pmViewDesc;
|
|
8564
8550
|
return e && e.node && e.node.isBlock;
|
|
8565
8551
|
}
|
|
8566
|
-
function
|
|
8552
|
+
function ih(n, e) {
|
|
8567
8553
|
for (; n && e == n.childNodes.length && !Zi(n); )
|
|
8568
8554
|
e = oe(n) + 1, n = n.parentNode;
|
|
8569
8555
|
for (; n && e < n.childNodes.length; ) {
|
|
@@ -8575,7 +8561,7 @@ function oh(n, e) {
|
|
|
8575
8561
|
n = t, e = 0;
|
|
8576
8562
|
}
|
|
8577
8563
|
}
|
|
8578
|
-
function
|
|
8564
|
+
function sh(n, e) {
|
|
8579
8565
|
for (; n && !e && !Zi(n); )
|
|
8580
8566
|
e = oe(n), n = n.parentNode;
|
|
8581
8567
|
for (; n && e; ) {
|
|
@@ -8590,7 +8576,7 @@ function lh(n, e) {
|
|
|
8590
8576
|
function Ni(n, e, t) {
|
|
8591
8577
|
if (e.nodeType != 3) {
|
|
8592
8578
|
let s, o;
|
|
8593
|
-
(o =
|
|
8579
|
+
(o = ih(e, t)) ? (e = o, t = 0) : (s = sh(e, t)) && (e = s, t = s.nodeValue.length);
|
|
8594
8580
|
}
|
|
8595
8581
|
let r = n.domSelection();
|
|
8596
8582
|
if (Ar(r)) {
|
|
@@ -8606,7 +8592,7 @@ function Ni(n, e, t) {
|
|
|
8606
8592
|
}
|
|
8607
8593
|
function uo(n, e) {
|
|
8608
8594
|
let t = n.state.doc.resolve(e);
|
|
8609
|
-
if (!(te ||
|
|
8595
|
+
if (!(te || wu) && t.parent.inlineContent) {
|
|
8610
8596
|
let i = n.coordsAtPos(e);
|
|
8611
8597
|
if (e > t.start()) {
|
|
8612
8598
|
let s = n.coordsAtPos(e - 1), o = (s.top + s.bottom) / 2;
|
|
@@ -8657,7 +8643,7 @@ function fo(n, e) {
|
|
|
8657
8643
|
function po(n, e, t) {
|
|
8658
8644
|
n.domObserver.stop(), e.contentEditable = t, n.domObserver.start();
|
|
8659
8645
|
}
|
|
8660
|
-
function
|
|
8646
|
+
function oh(n) {
|
|
8661
8647
|
if (!le || n.state.selection.$head.parentOffset > 0)
|
|
8662
8648
|
return !1;
|
|
8663
8649
|
let { focusNode: e, focusOffset: t } = n.domSelectionRange();
|
|
@@ -8667,12 +8653,12 @@ function ah(n) {
|
|
|
8667
8653
|
}
|
|
8668
8654
|
return !1;
|
|
8669
8655
|
}
|
|
8670
|
-
function
|
|
8656
|
+
function lh(n) {
|
|
8671
8657
|
let e = "";
|
|
8672
8658
|
return n.ctrlKey && (e += "c"), n.metaKey && (e += "m"), n.altKey && (e += "a"), n.shiftKey && (e += "s"), e;
|
|
8673
8659
|
}
|
|
8674
|
-
function
|
|
8675
|
-
let t = e.keyCode, r =
|
|
8660
|
+
function ah(n, e) {
|
|
8661
|
+
let t = e.keyCode, r = lh(e);
|
|
8676
8662
|
if (t == 8 || ke && t == 72 && r == "c")
|
|
8677
8663
|
return fo(n, -1) || Mt(n, -1);
|
|
8678
8664
|
if (t == 46 && !e.shiftKey || ke && t == 68 && r == "c")
|
|
@@ -8689,7 +8675,7 @@ function dh(n, e) {
|
|
|
8689
8675
|
if (t == 38 || ke && t == 80 && r == "c")
|
|
8690
8676
|
return ho(n, -1, r) || Mt(n, -1);
|
|
8691
8677
|
if (t == 40 || ke && t == 78 && r == "c")
|
|
8692
|
-
return
|
|
8678
|
+
return oh(n) || ho(n, 1, r) || Mt(n, 1);
|
|
8693
8679
|
if (r == (ke ? "m" : "c") && (t == 66 || t == 73 || t == 89 || t == 90))
|
|
8694
8680
|
return !0;
|
|
8695
8681
|
}
|
|
@@ -8747,7 +8733,7 @@ function ia(n, e, t, r, i) {
|
|
|
8747
8733
|
} else
|
|
8748
8734
|
n.someProp("transformPastedHTML", (u) => {
|
|
8749
8735
|
t = u(t, n);
|
|
8750
|
-
}), o =
|
|
8736
|
+
}), o = uh(t), kn && hh(o);
|
|
8751
8737
|
let c = o && o.querySelector("[data-pm-slice]"), d = c && /^(\d+) (\d+)(?: -(\d+))? (.*)/.exec(c.getAttribute("data-pm-slice") || "");
|
|
8752
8738
|
if (d && d[3])
|
|
8753
8739
|
for (let u = +d[3]; u > 0; u--) {
|
|
@@ -8762,11 +8748,11 @@ function ia(n, e, t, r, i) {
|
|
|
8762
8748
|
preserveWhitespace: !!(a || d),
|
|
8763
8749
|
context: i,
|
|
8764
8750
|
ruleFromNode(h) {
|
|
8765
|
-
return h.nodeName == "BR" && !h.nextSibling && h.parentNode && !
|
|
8751
|
+
return h.nodeName == "BR" && !h.nextSibling && h.parentNode && !ch.test(h.parentNode.nodeName) ? { ignore: !0 } : null;
|
|
8766
8752
|
}
|
|
8767
8753
|
})), d)
|
|
8768
|
-
l =
|
|
8769
|
-
else if (l = S.maxOpen(
|
|
8754
|
+
l = fh(mo(l, +d[1], +d[2]), d[4]);
|
|
8755
|
+
else if (l = S.maxOpen(dh(l.content, i), !0), l.openStart || l.openEnd) {
|
|
8770
8756
|
let u = 0, h = 0;
|
|
8771
8757
|
for (let f = l.content.firstChild; u < l.openStart && !f.type.spec.isolating; u++, f = f.firstChild)
|
|
8772
8758
|
;
|
|
@@ -8778,8 +8764,8 @@ function ia(n, e, t, r, i) {
|
|
|
8778
8764
|
l = u(l, n);
|
|
8779
8765
|
}), l;
|
|
8780
8766
|
}
|
|
8781
|
-
const
|
|
8782
|
-
function
|
|
8767
|
+
const ch = /^(a|abbr|acronym|b|cite|code|del|em|i|ins|kbd|label|output|q|ruby|s|samp|span|strong|sub|sup|time|u|tt|var)$/i;
|
|
8768
|
+
function dh(n, e) {
|
|
8783
8769
|
if (n.childCount < 2)
|
|
8784
8770
|
return n;
|
|
8785
8771
|
for (let t = e.depth; t >= 0; t--) {
|
|
@@ -8844,7 +8830,7 @@ let go = null;
|
|
|
8844
8830
|
function ca() {
|
|
8845
8831
|
return go || (go = document.implementation.createHTMLDocument("title"));
|
|
8846
8832
|
}
|
|
8847
|
-
function
|
|
8833
|
+
function uh(n) {
|
|
8848
8834
|
let e = /^(\s*<meta [^>]*>)*/.exec(n);
|
|
8849
8835
|
e && (n = n.slice(e[0].length));
|
|
8850
8836
|
let t = ca().createElement("div"), r = /<([a-z][^>\s]+)/i.exec(n), i;
|
|
@@ -8853,14 +8839,14 @@ function fh(n) {
|
|
|
8853
8839
|
t = t.querySelector(i[s]) || t;
|
|
8854
8840
|
return t;
|
|
8855
8841
|
}
|
|
8856
|
-
function
|
|
8842
|
+
function hh(n) {
|
|
8857
8843
|
let e = n.querySelectorAll(te ? "span:not([class]):not([style])" : "span.Apple-converted-space");
|
|
8858
8844
|
for (let t = 0; t < e.length; t++) {
|
|
8859
8845
|
let r = e[t];
|
|
8860
8846
|
r.childNodes.length == 1 && r.textContent == " " && r.parentNode && r.parentNode.replaceChild(n.ownerDocument.createTextNode(" "), r);
|
|
8861
8847
|
}
|
|
8862
8848
|
}
|
|
8863
|
-
function
|
|
8849
|
+
function fh(n, e) {
|
|
8864
8850
|
if (!n.size)
|
|
8865
8851
|
return n;
|
|
8866
8852
|
let t = n.content.firstChild.type.schema, r;
|
|
@@ -8878,25 +8864,25 @@ function mh(n, e) {
|
|
|
8878
8864
|
}
|
|
8879
8865
|
return new S(i, s, o);
|
|
8880
8866
|
}
|
|
8881
|
-
const ae = {}, ce = {},
|
|
8882
|
-
class
|
|
8867
|
+
const ae = {}, ce = {}, ph = { touchstart: !0, touchmove: !0 };
|
|
8868
|
+
class mh {
|
|
8883
8869
|
constructor() {
|
|
8884
8870
|
this.shiftKey = !1, this.mouseDown = null, this.lastKeyCode = null, this.lastKeyCodeTime = 0, this.lastClick = { time: 0, x: 0, y: 0, type: "" }, this.lastSelectionOrigin = null, this.lastSelectionTime = 0, this.lastIOSEnter = 0, this.lastIOSEnterFallbackTimeout = -1, this.lastFocus = 0, this.lastTouch = 0, this.lastAndroidDelete = 0, this.composing = !1, this.composingTimeout = -1, this.compositionNodes = [], this.compositionEndedAt = -2e8, this.compositionID = 1, this.compositionPendingChanges = 0, this.domChangeCount = 0, this.eventHandlers = /* @__PURE__ */ Object.create(null), this.hideSelectionGuard = null;
|
|
8885
8871
|
}
|
|
8886
8872
|
}
|
|
8887
|
-
function
|
|
8873
|
+
function gh(n) {
|
|
8888
8874
|
for (let e in ae) {
|
|
8889
8875
|
let t = ae[e];
|
|
8890
8876
|
n.dom.addEventListener(e, n.input.eventHandlers[e] = (r) => {
|
|
8891
|
-
|
|
8892
|
-
},
|
|
8877
|
+
bh(n, r) && !rs(n, r) && (n.editable || !(r.type in ce)) && t(n, r);
|
|
8878
|
+
}, ph[e] ? { passive: !0 } : void 0);
|
|
8893
8879
|
}
|
|
8894
8880
|
le && n.dom.addEventListener("input", () => null), Ii(n);
|
|
8895
8881
|
}
|
|
8896
8882
|
function Xe(n, e) {
|
|
8897
8883
|
n.input.lastSelectionOrigin = e, n.input.lastSelectionTime = Date.now();
|
|
8898
8884
|
}
|
|
8899
|
-
function
|
|
8885
|
+
function yh(n) {
|
|
8900
8886
|
n.domObserver.stop();
|
|
8901
8887
|
for (let e in n.input.eventHandlers)
|
|
8902
8888
|
n.dom.removeEventListener(e, n.input.eventHandlers[e]);
|
|
@@ -8914,7 +8900,7 @@ function rs(n, e) {
|
|
|
8914
8900
|
return r ? r(n, e) || e.defaultPrevented : !1;
|
|
8915
8901
|
});
|
|
8916
8902
|
}
|
|
8917
|
-
function
|
|
8903
|
+
function bh(n, e) {
|
|
8918
8904
|
if (!e.bubbles)
|
|
8919
8905
|
return !0;
|
|
8920
8906
|
if (e.defaultPrevented)
|
|
@@ -8924,7 +8910,7 @@ function Sh(n, e) {
|
|
|
8924
8910
|
return !1;
|
|
8925
8911
|
return !0;
|
|
8926
8912
|
}
|
|
8927
|
-
function
|
|
8913
|
+
function kh(n, e) {
|
|
8928
8914
|
!rs(n, e) && ae[e.type] && (n.editable || !(e.type in ce)) && ae[e.type](n, e);
|
|
8929
8915
|
}
|
|
8930
8916
|
ce.keydown = (n, e) => {
|
|
@@ -8936,7 +8922,7 @@ ce.keydown = (n, e) => {
|
|
|
8936
8922
|
n.input.lastIOSEnter == r && (n.someProp("handleKeyDown", (i) => i(n, lt(13, "Enter"))), n.input.lastIOSEnter = 0);
|
|
8937
8923
|
}, 200);
|
|
8938
8924
|
} else
|
|
8939
|
-
n.someProp("handleKeyDown", (r) => r(n, t)) ||
|
|
8925
|
+
n.someProp("handleKeyDown", (r) => r(n, t)) || ah(n, t) ? t.preventDefault() : Xe(n, "key");
|
|
8940
8926
|
};
|
|
8941
8927
|
ce.keyup = (n, e) => {
|
|
8942
8928
|
e.keyCode == 16 && (n.input.shiftKey = !1);
|
|
@@ -8958,7 +8944,7 @@ ce.keypress = (n, e) => {
|
|
|
8958
8944
|
function Dr(n) {
|
|
8959
8945
|
return { left: n.clientX, top: n.clientY };
|
|
8960
8946
|
}
|
|
8961
|
-
function
|
|
8947
|
+
function Sh(n, e) {
|
|
8962
8948
|
let t = e.x - n.clientX, r = e.y - n.clientY;
|
|
8963
8949
|
return t * t + r * r < 100;
|
|
8964
8950
|
}
|
|
@@ -8976,13 +8962,13 @@ function Lt(n, e, t) {
|
|
|
8976
8962
|
let r = n.state.tr.setSelection(e);
|
|
8977
8963
|
t == "pointer" && r.setMeta("pointer", !0), n.dispatch(r);
|
|
8978
8964
|
}
|
|
8979
|
-
function
|
|
8965
|
+
function xh(n, e) {
|
|
8980
8966
|
if (e == -1)
|
|
8981
8967
|
return !1;
|
|
8982
8968
|
let t = n.state.doc.resolve(e), r = t.nodeAfter;
|
|
8983
8969
|
return r && r.isAtom && w.isSelectable(r) ? (Lt(n, new w(t), "pointer"), !0) : !1;
|
|
8984
8970
|
}
|
|
8985
|
-
function
|
|
8971
|
+
function Ch(n, e) {
|
|
8986
8972
|
if (e == -1)
|
|
8987
8973
|
return !1;
|
|
8988
8974
|
let t = n.state.selection, r, i;
|
|
@@ -8997,16 +8983,16 @@ function Th(n, e) {
|
|
|
8997
8983
|
}
|
|
8998
8984
|
return i != null ? (Lt(n, w.create(n.state.doc, i), "pointer"), !0) : !1;
|
|
8999
8985
|
}
|
|
9000
|
-
function
|
|
9001
|
-
return is(n, "handleClickOn", e, t, r) || n.someProp("handleClick", (s) => s(n, e, r)) || (i ?
|
|
8986
|
+
function Eh(n, e, t, r, i) {
|
|
8987
|
+
return is(n, "handleClickOn", e, t, r) || n.someProp("handleClick", (s) => s(n, e, r)) || (i ? Ch(n, t) : xh(n, t));
|
|
9002
8988
|
}
|
|
9003
|
-
function
|
|
8989
|
+
function Th(n, e, t, r) {
|
|
9004
8990
|
return is(n, "handleDoubleClickOn", e, t, r) || n.someProp("handleDoubleClick", (i) => i(n, e, r));
|
|
9005
8991
|
}
|
|
9006
|
-
function
|
|
9007
|
-
return is(n, "handleTripleClickOn", e, t, r) || n.someProp("handleTripleClick", (i) => i(n, e, r)) ||
|
|
8992
|
+
function Mh(n, e, t, r) {
|
|
8993
|
+
return is(n, "handleTripleClickOn", e, t, r) || n.someProp("handleTripleClick", (i) => i(n, e, r)) || wh(n, t, r);
|
|
9008
8994
|
}
|
|
9009
|
-
function
|
|
8995
|
+
function wh(n, e, t) {
|
|
9010
8996
|
if (t.button != 0)
|
|
9011
8997
|
return !1;
|
|
9012
8998
|
let r = n.state.doc;
|
|
@@ -9032,11 +9018,11 @@ ae.mousedown = (n, e) => {
|
|
|
9032
9018
|
let t = e;
|
|
9033
9019
|
n.input.shiftKey = t.shiftKey;
|
|
9034
9020
|
let r = ss(n), i = Date.now(), s = "singleClick";
|
|
9035
|
-
i - n.input.lastClick.time < 500 &&
|
|
9021
|
+
i - n.input.lastClick.time < 500 && Sh(t, n.input.lastClick) && !t[da] && (n.input.lastClick.type == "singleClick" ? s = "doubleClick" : n.input.lastClick.type == "doubleClick" && (s = "tripleClick")), n.input.lastClick = { time: i, x: t.clientX, y: t.clientY, type: s };
|
|
9036
9022
|
let o = n.posAtCoords(Dr(t));
|
|
9037
|
-
o && (s == "singleClick" ? (n.input.mouseDown && n.input.mouseDown.done(), n.input.mouseDown = new
|
|
9023
|
+
o && (s == "singleClick" ? (n.input.mouseDown && n.input.mouseDown.done(), n.input.mouseDown = new Oh(n, o, t, !!r)) : (s == "doubleClick" ? Th : Mh)(n, o.pos, o.inside, t) ? t.preventDefault() : Xe(n, "pointer"));
|
|
9038
9024
|
};
|
|
9039
|
-
class
|
|
9025
|
+
class Oh {
|
|
9040
9026
|
constructor(e, t, r, i) {
|
|
9041
9027
|
this.view = e, this.pos = t, this.event = r, this.flushed = i, this.delayedSelectionSync = !1, this.mightDrag = null, this.startDoc = e.state.doc, this.selectNode = !!r[da], this.allowDefault = r.shiftKey;
|
|
9042
9028
|
let s, o;
|
|
@@ -9065,7 +9051,7 @@ class Ah {
|
|
|
9065
9051
|
if (this.done(), !this.view.dom.contains(e.target))
|
|
9066
9052
|
return;
|
|
9067
9053
|
let t = this.pos;
|
|
9068
|
-
this.view.state.doc != this.startDoc && (t = this.view.posAtCoords(Dr(e))), this.updateAllowDefault(e), this.allowDefault || !t ? Xe(this.view, "pointer") :
|
|
9054
|
+
this.view.state.doc != this.startDoc && (t = this.view.posAtCoords(Dr(e))), this.updateAllowDefault(e), this.allowDefault || !t ? Xe(this.view, "pointer") : Eh(this.view, t.pos, t.inside, e, this.selectNode) ? e.preventDefault() : e.button == 0 && (this.flushed || // Safari ignores clicks on draggable elements
|
|
9069
9055
|
le && this.mightDrag && !this.mightDrag.node.isAtom || // Chrome will sometimes treat a node selection as a
|
|
9070
9056
|
// cursor, but still report that the node is selected
|
|
9071
9057
|
// when asked through getSelection. You'll then get a
|
|
@@ -9092,7 +9078,7 @@ ae.contextmenu = (n) => ss(n);
|
|
|
9092
9078
|
function ua(n, e) {
|
|
9093
9079
|
return n.composing ? !0 : le && Math.abs(e.timeStamp - n.input.compositionEndedAt) < 500 ? (n.input.compositionEndedAt = -2e8, !0) : !1;
|
|
9094
9080
|
}
|
|
9095
|
-
const
|
|
9081
|
+
const vh = Ee ? 5e3 : -1;
|
|
9096
9082
|
ce.compositionstart = ce.compositionupdate = (n) => {
|
|
9097
9083
|
if (!n.composing) {
|
|
9098
9084
|
n.domObserver.flush();
|
|
@@ -9114,7 +9100,7 @@ ce.compositionstart = ce.compositionupdate = (n) => {
|
|
|
9114
9100
|
}
|
|
9115
9101
|
n.input.composing = !0;
|
|
9116
9102
|
}
|
|
9117
|
-
ha(n,
|
|
9103
|
+
ha(n, vh);
|
|
9118
9104
|
};
|
|
9119
9105
|
ce.compositionend = (n, e) => {
|
|
9120
9106
|
n.composing && (n.input.composing = !1, n.input.compositionEndedAt = e.timeStamp, n.input.compositionPendingChanges = n.domObserver.pendingRecords().length ? n.input.compositionID : 0, n.input.compositionPendingChanges && Promise.resolve().then(() => n.domObserver.flush()), n.input.compositionID++, ha(n, 20));
|
|
@@ -9123,10 +9109,10 @@ function ha(n, e) {
|
|
|
9123
9109
|
clearTimeout(n.input.composingTimeout), e > -1 && (n.input.composingTimeout = setTimeout(() => Vn(n), e));
|
|
9124
9110
|
}
|
|
9125
9111
|
function fa(n) {
|
|
9126
|
-
for (n.composing && (n.input.composing = !1, n.input.compositionEndedAt =
|
|
9112
|
+
for (n.composing && (n.input.composing = !1, n.input.compositionEndedAt = Ah()); n.input.compositionNodes.length > 0; )
|
|
9127
9113
|
n.input.compositionNodes.pop().markParentsDirty();
|
|
9128
9114
|
}
|
|
9129
|
-
function
|
|
9115
|
+
function Ah() {
|
|
9130
9116
|
let n = document.createEvent("Event");
|
|
9131
9117
|
return n.initEvent("event", !0, !0), n.timeStamp;
|
|
9132
9118
|
}
|
|
@@ -9139,7 +9125,7 @@ function Vn(n, e = !1) {
|
|
|
9139
9125
|
return !1;
|
|
9140
9126
|
}
|
|
9141
9127
|
}
|
|
9142
|
-
function
|
|
9128
|
+
function Nh(n, e) {
|
|
9143
9129
|
if (!n.dom.parentNode)
|
|
9144
9130
|
return;
|
|
9145
9131
|
let t = n.dom.parentNode.appendChild(document.createElement("div"));
|
|
@@ -9149,18 +9135,18 @@ function Ih(n, e) {
|
|
|
9149
9135
|
t.parentNode && t.parentNode.removeChild(t), n.focus();
|
|
9150
9136
|
}, 50);
|
|
9151
9137
|
}
|
|
9152
|
-
const un = he && Qe < 15 || Ft &&
|
|
9138
|
+
const un = he && Qe < 15 || Ft && Ou < 604;
|
|
9153
9139
|
ae.copy = ce.cut = (n, e) => {
|
|
9154
9140
|
let t = e, r = n.state.selection, i = t.type == "cut";
|
|
9155
9141
|
if (r.empty)
|
|
9156
9142
|
return;
|
|
9157
9143
|
let s = un ? null : t.clipboardData, o = r.content(), { dom: l, text: a } = ra(n, o);
|
|
9158
|
-
s ? (t.preventDefault(), s.clearData(), s.setData("text/html", l.innerHTML), s.setData("text/plain", a)) :
|
|
9144
|
+
s ? (t.preventDefault(), s.clearData(), s.setData("text/html", l.innerHTML), s.setData("text/plain", a)) : Nh(n, l), i && n.dispatch(n.state.tr.deleteSelection().scrollIntoView().setMeta("uiEvent", "cut"));
|
|
9159
9145
|
};
|
|
9160
|
-
function
|
|
9146
|
+
function Dh(n) {
|
|
9161
9147
|
return n.openStart == 0 && n.openEnd == 0 && n.content.childCount == 1 ? n.content.firstChild : null;
|
|
9162
9148
|
}
|
|
9163
|
-
function
|
|
9149
|
+
function Ih(n, e) {
|
|
9164
9150
|
if (!n.dom.parentNode)
|
|
9165
9151
|
return;
|
|
9166
9152
|
let t = n.input.shiftKey || n.state.selection.$from.parent.type.spec.code, r = n.dom.parentNode.appendChild(document.createElement(t ? "textarea" : "div"));
|
|
@@ -9176,7 +9162,7 @@ function hn(n, e, t, r, i) {
|
|
|
9176
9162
|
return !0;
|
|
9177
9163
|
if (!s)
|
|
9178
9164
|
return !1;
|
|
9179
|
-
let o =
|
|
9165
|
+
let o = Dh(s), l = o ? n.state.tr.replaceSelectionWith(o, r) : n.state.tr.replaceSelection(s);
|
|
9180
9166
|
return n.dispatch(l.scrollIntoView().setMeta("paste", !0).setMeta("uiEvent", "paste")), !0;
|
|
9181
9167
|
}
|
|
9182
9168
|
function pa(n) {
|
|
@@ -9191,9 +9177,9 @@ ce.paste = (n, e) => {
|
|
|
9191
9177
|
if (n.composing && !Ee)
|
|
9192
9178
|
return;
|
|
9193
9179
|
let r = un ? null : t.clipboardData, i = n.input.shiftKey && n.input.lastKeyCode != 45;
|
|
9194
|
-
r && hn(n, pa(r), r.getData("text/html"), i, t) ? t.preventDefault() :
|
|
9180
|
+
r && hn(n, pa(r), r.getData("text/html"), i, t) ? t.preventDefault() : Ih(n, t);
|
|
9195
9181
|
};
|
|
9196
|
-
class
|
|
9182
|
+
class Rh {
|
|
9197
9183
|
constructor(e, t) {
|
|
9198
9184
|
this.slice = e, this.move = t;
|
|
9199
9185
|
}
|
|
@@ -9213,7 +9199,7 @@ ae.dragstart = (n, e) => {
|
|
|
9213
9199
|
}
|
|
9214
9200
|
}
|
|
9215
9201
|
let o = n.state.selection.content(), { dom: l, text: a } = ra(n, o);
|
|
9216
|
-
t.dataTransfer.clearData(), t.dataTransfer.setData(un ? "Text" : "text/html", l.innerHTML), t.dataTransfer.effectAllowed = "copyMove", un || t.dataTransfer.setData("text/plain", a), n.dragging = new
|
|
9202
|
+
t.dataTransfer.clearData(), t.dataTransfer.setData(un ? "Text" : "text/html", l.innerHTML), t.dataTransfer.effectAllowed = "copyMove", un || t.dataTransfer.setData("text/plain", a), n.dragging = new Rh(o, !t[ma]);
|
|
9217
9203
|
};
|
|
9218
9204
|
ae.dragend = (n) => {
|
|
9219
9205
|
let e = n.dragging;
|
|
@@ -9241,7 +9227,7 @@ ce.drop = (n, e) => {
|
|
|
9241
9227
|
if (!o)
|
|
9242
9228
|
return;
|
|
9243
9229
|
t.preventDefault();
|
|
9244
|
-
let a = o ?
|
|
9230
|
+
let a = o ? du(n.state.doc, s.pos, o) : s.pos;
|
|
9245
9231
|
a == null && (a = s.pos);
|
|
9246
9232
|
let c = n.state.tr;
|
|
9247
9233
|
l && c.deleteSelection();
|
|
@@ -9476,7 +9462,7 @@ class H {
|
|
|
9476
9462
|
let a = this.local[l].map(e, r, i);
|
|
9477
9463
|
a && a.type.valid(t, a) ? (o || (o = [])).push(a) : s.onRemove && s.onRemove(this.local[l].spec);
|
|
9478
9464
|
}
|
|
9479
|
-
return this.children.length ?
|
|
9465
|
+
return this.children.length ? Ph(this.children, o || [], e, t, r, i, s) : o ? new H(o.sort(bt), At) : ee;
|
|
9480
9466
|
}
|
|
9481
9467
|
/**
|
|
9482
9468
|
Add the given array of decorations to the ones in the set,
|
|
@@ -9650,7 +9636,7 @@ class Ue {
|
|
|
9650
9636
|
}
|
|
9651
9637
|
}
|
|
9652
9638
|
}
|
|
9653
|
-
function
|
|
9639
|
+
function Ph(n, e, t, r, i, s, o) {
|
|
9654
9640
|
let l = n.slice();
|
|
9655
9641
|
for (let c = 0, d = s; c < t.maps.length; c++) {
|
|
9656
9642
|
let u = 0;
|
|
@@ -9686,7 +9672,7 @@ function Bh(n, e, t, r, i, s, o) {
|
|
|
9686
9672
|
a = !0;
|
|
9687
9673
|
}
|
|
9688
9674
|
if (a) {
|
|
9689
|
-
let c =
|
|
9675
|
+
let c = Lh(l, n, e, t, i, s, o), d = jn(c, r, 0, o);
|
|
9690
9676
|
e = d.local;
|
|
9691
9677
|
for (let u = 0; u < l.length; u += 3)
|
|
9692
9678
|
l[u + 1] < 0 && (l.splice(u, 3), u -= 3);
|
|
@@ -9709,7 +9695,7 @@ function ga(n, e) {
|
|
|
9709
9695
|
}
|
|
9710
9696
|
return t;
|
|
9711
9697
|
}
|
|
9712
|
-
function
|
|
9698
|
+
function Lh(n, e, t, r, i, s, o) {
|
|
9713
9699
|
function l(a, c) {
|
|
9714
9700
|
for (let d = 0; d < a.local.length; d++) {
|
|
9715
9701
|
let u = a.local[d].map(r, i, c);
|
|
@@ -9784,15 +9770,15 @@ function ri(n) {
|
|
|
9784
9770
|
r && r != ee && e.push(r);
|
|
9785
9771
|
}), n.cursorWrapper && e.push(H.create(n.state.doc, [n.cursorWrapper.deco])), Ue.from(e);
|
|
9786
9772
|
}
|
|
9787
|
-
const
|
|
9773
|
+
const Bh = {
|
|
9788
9774
|
childList: !0,
|
|
9789
9775
|
characterData: !0,
|
|
9790
9776
|
characterDataOldValue: !0,
|
|
9791
9777
|
attributes: !0,
|
|
9792
9778
|
attributeOldValue: !0,
|
|
9793
9779
|
subtree: !0
|
|
9794
|
-
},
|
|
9795
|
-
class
|
|
9780
|
+
}, _h = he && Qe <= 11;
|
|
9781
|
+
class Fh {
|
|
9796
9782
|
constructor() {
|
|
9797
9783
|
this.anchorNode = null, this.anchorOffset = 0, this.focusNode = null, this.focusOffset = 0;
|
|
9798
9784
|
}
|
|
@@ -9806,13 +9792,13 @@ class Hh {
|
|
|
9806
9792
|
return e.anchorNode == this.anchorNode && e.anchorOffset == this.anchorOffset && e.focusNode == this.focusNode && e.focusOffset == this.focusOffset;
|
|
9807
9793
|
}
|
|
9808
9794
|
}
|
|
9809
|
-
class
|
|
9795
|
+
class zh {
|
|
9810
9796
|
constructor(e, t) {
|
|
9811
|
-
this.view = e, this.handleDOMChange = t, this.queue = [], this.flushingSoon = -1, this.observer = null, this.currentSelection = new
|
|
9797
|
+
this.view = e, this.handleDOMChange = t, this.queue = [], this.flushingSoon = -1, this.observer = null, this.currentSelection = new Fh(), this.onCharData = null, this.suppressingSelectionUpdates = !1, this.observer = window.MutationObserver && new window.MutationObserver((r) => {
|
|
9812
9798
|
for (let i = 0; i < r.length; i++)
|
|
9813
9799
|
this.queue.push(r[i]);
|
|
9814
9800
|
he && Qe <= 11 && r.some((i) => i.type == "childList" && i.removedNodes.length || i.type == "characterData" && i.oldValue.length > i.target.nodeValue.length) ? this.flushSoon() : this.flush();
|
|
9815
|
-
}),
|
|
9801
|
+
}), _h && (this.onCharData = (r) => {
|
|
9816
9802
|
this.queue.push({ target: r.target, type: "characterData", oldValue: r.prevValue }), this.flushSoon();
|
|
9817
9803
|
}), this.onSelectionChange = this.onSelectionChange.bind(this);
|
|
9818
9804
|
}
|
|
@@ -9825,7 +9811,7 @@ class Vh {
|
|
|
9825
9811
|
this.flushingSoon > -1 && (window.clearTimeout(this.flushingSoon), this.flushingSoon = -1, this.flush());
|
|
9826
9812
|
}
|
|
9827
9813
|
start() {
|
|
9828
|
-
this.observer && (this.observer.takeRecords(), this.observer.observe(this.view.dom,
|
|
9814
|
+
this.observer && (this.observer.takeRecords(), this.observer.observe(this.view.dom, Bh)), this.onCharData && this.view.dom.addEventListener("DOMCharacterDataModified", this.onCharData), this.connectSelection();
|
|
9829
9815
|
}
|
|
9830
9816
|
stop() {
|
|
9831
9817
|
if (this.observer) {
|
|
@@ -9907,7 +9893,7 @@ class Vh {
|
|
|
9907
9893
|
}
|
|
9908
9894
|
}
|
|
9909
9895
|
let c = null;
|
|
9910
|
-
s < 0 && i && e.input.lastFocus > Date.now() - 200 && Math.max(e.input.lastTouch, e.input.lastClick.time) < Date.now() - 300 && Ar(r) && (c = ts(e)) && c.eq(N.near(e.state.doc.resolve(0), 1)) ? (e.input.lastFocus = 0, Fe(e), this.currentSelection.set(r), e.scrollToSelection()) : (s > -1 || i) && (s > -1 && (e.docView.markDirty(s, o),
|
|
9896
|
+
s < 0 && i && e.input.lastFocus > Date.now() - 200 && Math.max(e.input.lastTouch, e.input.lastClick.time) < Date.now() - 300 && Ar(r) && (c = ts(e)) && c.eq(N.near(e.state.doc.resolve(0), 1)) ? (e.input.lastFocus = 0, Fe(e), this.currentSelection.set(r), e.scrollToSelection()) : (s > -1 || i) && (s > -1 && (e.docView.markDirty(s, o), Hh(e)), this.handleDOMChange(s, o, l, a), e.docView && e.docView.dirty ? e.updateState(e.state) : this.currentSelection.eq(r) || Fe(e), this.currentSelection.set(r));
|
|
9911
9897
|
}
|
|
9912
9898
|
registerMutation(e, t) {
|
|
9913
9899
|
if (t.indexOf(e.target) > -1)
|
|
@@ -9942,14 +9928,14 @@ class Vh {
|
|
|
9942
9928
|
}
|
|
9943
9929
|
}
|
|
9944
9930
|
let bo = /* @__PURE__ */ new WeakMap(), ko = !1;
|
|
9945
|
-
function
|
|
9931
|
+
function Hh(n) {
|
|
9946
9932
|
if (!bo.has(n) && (bo.set(n, null), ["normal", "nowrap", "pre-line"].indexOf(getComputedStyle(n.dom).whiteSpace) !== -1)) {
|
|
9947
9933
|
if (n.requiresGeckoHackNode = Me, ko)
|
|
9948
9934
|
return;
|
|
9949
9935
|
console.warn("ProseMirror expects the CSS white-space property to be set, preferably to 'pre-wrap'. It is recommended to load style/prosemirror.css from the prosemirror-view package."), ko = !0;
|
|
9950
9936
|
}
|
|
9951
9937
|
}
|
|
9952
|
-
function
|
|
9938
|
+
function Vh(n) {
|
|
9953
9939
|
let e;
|
|
9954
9940
|
function t(a) {
|
|
9955
9941
|
a.preventDefault(), a.stopImmediatePropagation(), e = a.getTargetRanges()[0];
|
|
@@ -9958,7 +9944,7 @@ function jh(n) {
|
|
|
9958
9944
|
let r = e.startContainer, i = e.startOffset, s = e.endContainer, o = e.endOffset, l = n.domAtPos(n.state.selection.anchor);
|
|
9959
9945
|
return Ct(l.node, l.offset, s, o) && ([r, i, s, o] = [s, o, r, i]), { anchorNode: r, anchorOffset: i, focusNode: s, focusOffset: o };
|
|
9960
9946
|
}
|
|
9961
|
-
function
|
|
9947
|
+
function $h(n, e, t) {
|
|
9962
9948
|
let { node: r, fromOffset: i, toOffset: s, from: o, to: l } = n.docView.parseRange(e, t), a = n.domSelectionRange(), c, d = a.anchorNode;
|
|
9963
9949
|
if (d && n.dom.contains(d.nodeType == 1 ? d : d.parentNode) && (c = [{ node: d, offset: a.anchorOffset }], Ar(a) || c.push({ node: a.focusNode, offset: a.focusOffset })), te && n.input.lastKeyCode === 8)
|
|
9964
9950
|
for (let g = s; g > i; g--) {
|
|
@@ -9978,7 +9964,7 @@ function qh(n, e, t) {
|
|
|
9978
9964
|
to: s,
|
|
9979
9965
|
preserveWhitespace: f.parent.type.whitespace == "pre" ? "full" : !0,
|
|
9980
9966
|
findPositions: c,
|
|
9981
|
-
ruleFromNode:
|
|
9967
|
+
ruleFromNode: jh,
|
|
9982
9968
|
context: f
|
|
9983
9969
|
});
|
|
9984
9970
|
if (c && c[0].pos != null) {
|
|
@@ -9987,7 +9973,7 @@ function qh(n, e, t) {
|
|
|
9987
9973
|
}
|
|
9988
9974
|
return { doc: m, sel: p, from: o, to: l };
|
|
9989
9975
|
}
|
|
9990
|
-
function
|
|
9976
|
+
function jh(n) {
|
|
9991
9977
|
let e = n.pmViewDesc;
|
|
9992
9978
|
if (e)
|
|
9993
9979
|
return e.parseRule();
|
|
@@ -10001,8 +9987,8 @@ function Kh(n) {
|
|
|
10001
9987
|
return { ignore: !0 };
|
|
10002
9988
|
return null;
|
|
10003
9989
|
}
|
|
10004
|
-
const
|
|
10005
|
-
function
|
|
9990
|
+
const qh = /^(a|abbr|acronym|b|bd[io]|big|br|button|cite|code|data(list)?|del|dfn|em|i|ins|kbd|label|map|mark|meter|output|q|ruby|s|samp|small|span|strong|su[bp]|time|u|tt|var)$/i;
|
|
9991
|
+
function Kh(n, e, t, r, i) {
|
|
10006
9992
|
let s = n.input.compositionPendingChanges || (n.composing ? n.input.compositionID : 0);
|
|
10007
9993
|
if (n.input.compositionPendingChanges = 0, e < 0) {
|
|
10008
9994
|
let M = n.input.lastSelectionTime > Date.now() - 50 ? n.input.lastSelectionOrigin : null, Z = ts(n, M);
|
|
@@ -10016,10 +10002,10 @@ function Uh(n, e, t, r, i) {
|
|
|
10016
10002
|
}
|
|
10017
10003
|
let o = n.state.doc.resolve(e), l = o.sharedDepth(t);
|
|
10018
10004
|
e = o.before(l + 1), t = n.state.doc.resolve(t).after(l + 1);
|
|
10019
|
-
let a = n.state.selection, c =
|
|
10005
|
+
let a = n.state.selection, c = $h(n, e, t), d = n.state.doc, u = d.slice(c.from, c.to), h, f;
|
|
10020
10006
|
n.input.lastKeyCode === 8 && Date.now() - 100 < n.input.lastKeyCodeTime ? (h = n.state.selection.to, f = "end") : (h = n.state.selection.from, f = "start"), n.input.lastKeyCode = null;
|
|
10021
|
-
let p =
|
|
10022
|
-
if ((Ft && n.input.lastIOSEnter > Date.now() - 225 || Ee) && i.some((M) => M.nodeType == 1 && !
|
|
10007
|
+
let p = Jh(u.content, c.doc.content, c.from, h, f);
|
|
10008
|
+
if ((Ft && n.input.lastIOSEnter > Date.now() - 225 || Ee) && i.some((M) => M.nodeType == 1 && !qh.test(M.nodeName)) && (!p || p.endA >= p.endB) && n.someProp("handleKeyDown", (M) => M(n, lt(13, "Enter")))) {
|
|
10023
10009
|
n.input.lastIOSEnter = 0;
|
|
10024
10010
|
return;
|
|
10025
10011
|
}
|
|
@@ -10046,7 +10032,7 @@ function Uh(n, e, t, r, i) {
|
|
|
10046
10032
|
n.input.lastIOSEnter = 0;
|
|
10047
10033
|
return;
|
|
10048
10034
|
}
|
|
10049
|
-
if (n.state.selection.anchor > p.start &&
|
|
10035
|
+
if (n.state.selection.anchor > p.start && Uh(d, p.start, p.endA, m, g) && n.someProp("handleKeyDown", (M) => M(n, lt(8, "Backspace")))) {
|
|
10050
10036
|
Ee && te && n.domObserver.suppressSelectionUpdates();
|
|
10051
10037
|
return;
|
|
10052
10038
|
}
|
|
@@ -10061,7 +10047,7 @@ function Uh(n, e, t, r, i) {
|
|
|
10061
10047
|
he && Qe <= 11 && m.parentOffset == 0 && (n.domObserver.suppressSelectionUpdates(), setTimeout(() => Fe(n), 20)), E = n.state.tr.delete(R, P), L = d.resolve(p.start).marksAcross(d.resolve(p.endA));
|
|
10062
10048
|
else if (
|
|
10063
10049
|
// Adding or removing a mark
|
|
10064
|
-
p.endA == p.endB && (I =
|
|
10050
|
+
p.endA == p.endB && (I = Wh(m.parent.content.cut(m.parentOffset, g.parentOffset), y.parent.content.cut(y.parentOffset, p.endA - y.start())))
|
|
10065
10051
|
)
|
|
10066
10052
|
E = n.state.tr, I.type == "add" ? E.addMark(R, P, I.mark) : E.removeMark(R, P, I.mark);
|
|
10067
10053
|
else if (m.parent.child(m.index()).isText && m.index() == g.index() - (g.textOffset ? 0 : 1)) {
|
|
@@ -10080,7 +10066,7 @@ function Uh(n, e, t, r, i) {
|
|
|
10080
10066
|
function So(n, e, t) {
|
|
10081
10067
|
return Math.max(t.anchor, t.head) > e.content.size ? null : ns(n, e.resolve(t.anchor), e.resolve(t.head));
|
|
10082
10068
|
}
|
|
10083
|
-
function
|
|
10069
|
+
function Wh(n, e) {
|
|
10084
10070
|
let t = n.firstChild.marks, r = e.firstChild.marks, i = t, s = r, o, l, a;
|
|
10085
10071
|
for (let d = 0; d < r.length; d++)
|
|
10086
10072
|
i = r[d].removeFromSet(i);
|
|
@@ -10098,7 +10084,7 @@ function Jh(n, e) {
|
|
|
10098
10084
|
if (b.from(c).eq(n))
|
|
10099
10085
|
return { mark: l, type: o };
|
|
10100
10086
|
}
|
|
10101
|
-
function
|
|
10087
|
+
function Uh(n, e, t, r, i) {
|
|
10102
10088
|
if (!r.parent.isTextblock || // The content must have shrunk
|
|
10103
10089
|
t - e <= i.pos - r.pos || // newEnd must point directly at or after the end of the block that newStart points into
|
|
10104
10090
|
ii(r, !0, !1) < i.pos)
|
|
@@ -10120,7 +10106,7 @@ function ii(n, e, t) {
|
|
|
10120
10106
|
}
|
|
10121
10107
|
return i;
|
|
10122
10108
|
}
|
|
10123
|
-
function
|
|
10109
|
+
function Jh(n, e, t, r, i) {
|
|
10124
10110
|
let s = n.findDiffStart(e, t);
|
|
10125
10111
|
if (s == null)
|
|
10126
10112
|
return null;
|
|
@@ -10138,7 +10124,7 @@ function Yh(n, e, t, r, i) {
|
|
|
10138
10124
|
}
|
|
10139
10125
|
return { start: s, endA: o, endB: l };
|
|
10140
10126
|
}
|
|
10141
|
-
class
|
|
10127
|
+
class Gh {
|
|
10142
10128
|
/**
|
|
10143
10129
|
Create a view. `place` may be a DOM node that the editor should
|
|
10144
10130
|
be appended to, a function that will place it into the document,
|
|
@@ -10147,7 +10133,7 @@ class Xh {
|
|
|
10147
10133
|
added to the document.
|
|
10148
10134
|
*/
|
|
10149
10135
|
constructor(e, t) {
|
|
10150
|
-
this._root = null, this.focused = !1, this.trackWrites = null, this.mounted = !1, this.markCursor = null, this.cursorWrapper = null, this.lastSelectedViewDesc = void 0, this.input = new
|
|
10136
|
+
this._root = null, this.focused = !1, this.trackWrites = null, this.mounted = !1, this.markCursor = null, this.cursorWrapper = null, this.lastSelectedViewDesc = void 0, this.input = new mh(), this.prevDirectPlugins = [], this.pluginViews = [], this.requiresGeckoHackNode = !1, this.dragging = null, this._props = t, this.state = t.state, this.directPlugins = t.plugins || [], this.directPlugins.forEach(Mo), this.dispatch = this.dispatch.bind(this), this.dom = e && e.mount || document.createElement("div"), e && (e.appendChild ? e.appendChild(this.dom) : typeof e == "function" ? e(this.dom) : e.mount && (this.mounted = !0)), this.editable = Eo(this), Co(this), this.nodeViews = To(this), this.docView = no(this.state.doc, xo(this), ri(this), this.dom, this), this.domObserver = new zh(this, (r, i, s, o) => Kh(this, r, i, s, o)), this.domObserver.start(), gh(this), this.updatePluginViews();
|
|
10151
10137
|
}
|
|
10152
10138
|
/**
|
|
10153
10139
|
Holds `true` when a
|
|
@@ -10206,22 +10192,22 @@ class Xh {
|
|
|
10206
10192
|
let o = r.plugins != e.plugins || this._props.plugins != t.plugins;
|
|
10207
10193
|
if (o || this._props.plugins != t.plugins || this._props.nodeViews != t.nodeViews) {
|
|
10208
10194
|
let h = To(this);
|
|
10209
|
-
|
|
10195
|
+
Xh(h, this.nodeViews) && (this.nodeViews = h, i = !0);
|
|
10210
10196
|
}
|
|
10211
10197
|
(o || t.handleDOMEvents != this._props.handleDOMEvents) && Ii(this), this.editable = Eo(this), Co(this);
|
|
10212
10198
|
let l = ri(this), a = xo(this), c = r.plugins != e.plugins && !r.doc.eq(e.doc) ? "reset" : e.scrollToSelection > r.scrollToSelection ? "to selection" : "preserve", d = i || !this.docView.matchesNode(e.doc, a, l);
|
|
10213
10199
|
(d || !e.selection.eq(r.selection)) && (s = !0);
|
|
10214
|
-
let u = c == "preserve" && s && this.dom.style.overflowAnchor == null &&
|
|
10200
|
+
let u = c == "preserve" && s && this.dom.style.overflowAnchor == null && Nu(this);
|
|
10215
10201
|
if (s) {
|
|
10216
10202
|
this.domObserver.stop();
|
|
10217
|
-
let h = d && (he || te) && !this.composing && !r.selection.empty && !e.selection.empty &&
|
|
10203
|
+
let h = d && (he || te) && !this.composing && !r.selection.empty && !e.selection.empty && Yh(r.selection, e.selection);
|
|
10218
10204
|
if (d) {
|
|
10219
10205
|
let f = te ? this.trackWrites = this.domSelectionRange().focusNode : null;
|
|
10220
10206
|
(i || !this.docView.update(e.doc, a, l, this)) && (this.docView.updateOuterDeco([]), this.docView.destroy(), this.docView = no(e.doc, a, l, this.dom, this)), f && !this.trackWrites && (h = !0);
|
|
10221
10207
|
}
|
|
10222
|
-
h || !(this.input.mouseDown && this.domObserver.currentSelection.eq(this.domSelectionRange()) &&
|
|
10208
|
+
h || !(this.input.mouseDown && this.domObserver.currentSelection.eq(this.domSelectionRange()) && th(this)) ? Fe(this, h) : (ea(this, e.selection), this.domObserver.setCurSelection()), this.domObserver.start();
|
|
10223
10209
|
}
|
|
10224
|
-
this.updatePluginViews(r), c == "reset" ? this.dom.scrollTop = 0 : c == "to selection" ? this.scrollToSelection() : u &&
|
|
10210
|
+
this.updatePluginViews(r), c == "reset" ? this.dom.scrollTop = 0 : c == "to selection" ? this.scrollToSelection() : u && Du(u);
|
|
10225
10211
|
}
|
|
10226
10212
|
/**
|
|
10227
10213
|
@internal
|
|
@@ -10297,7 +10283,7 @@ class Xh {
|
|
|
10297
10283
|
Focus the editor.
|
|
10298
10284
|
*/
|
|
10299
10285
|
focus() {
|
|
10300
|
-
this.domObserver.stop(), this.editable &&
|
|
10286
|
+
this.domObserver.stop(), this.editable && Iu(this.dom), Fe(this), this.domObserver.start();
|
|
10301
10287
|
}
|
|
10302
10288
|
/**
|
|
10303
10289
|
Get the document root in which the editor exists. This will
|
|
@@ -10331,7 +10317,7 @@ class Xh {
|
|
|
10331
10317
|
the top level, not in any node.
|
|
10332
10318
|
*/
|
|
10333
10319
|
posAtCoords(e) {
|
|
10334
|
-
return
|
|
10320
|
+
return _u(this, e);
|
|
10335
10321
|
}
|
|
10336
10322
|
/**
|
|
10337
10323
|
Returns the viewport rectangle at a given document position.
|
|
@@ -10396,7 +10382,7 @@ class Xh {
|
|
|
10396
10382
|
pass a different state.
|
|
10397
10383
|
*/
|
|
10398
10384
|
endOfTextblock(e, t) {
|
|
10399
|
-
return
|
|
10385
|
+
return $u(this, t || this.state, e);
|
|
10400
10386
|
}
|
|
10401
10387
|
/**
|
|
10402
10388
|
Run the editor's paste logic with the given HTML string. The
|
|
@@ -10417,7 +10403,7 @@ class Xh {
|
|
|
10417
10403
|
views](https://prosemirror.net/docs/ref/#view.NodeView).
|
|
10418
10404
|
*/
|
|
10419
10405
|
destroy() {
|
|
10420
|
-
this.docView && (
|
|
10406
|
+
this.docView && (yh(this), this.destroyPluginViews(), this.mounted ? (this.docView.update(this.state.doc, [], ri(this), this), this.dom.textContent = "") : this.dom.parentNode && this.dom.parentNode.removeChild(this.dom), this.docView.destroy(), this.docView = null);
|
|
10421
10407
|
}
|
|
10422
10408
|
/**
|
|
10423
10409
|
This is true when the view has been
|
|
@@ -10431,7 +10417,7 @@ class Xh {
|
|
|
10431
10417
|
Used for testing.
|
|
10432
10418
|
*/
|
|
10433
10419
|
dispatchEvent(e) {
|
|
10434
|
-
return
|
|
10420
|
+
return kh(this, e);
|
|
10435
10421
|
}
|
|
10436
10422
|
/**
|
|
10437
10423
|
Dispatch a transaction. Will call
|
|
@@ -10450,7 +10436,7 @@ class Xh {
|
|
|
10450
10436
|
@internal
|
|
10451
10437
|
*/
|
|
10452
10438
|
domSelectionRange() {
|
|
10453
|
-
return le && this.root.nodeType === 11 &&
|
|
10439
|
+
return le && this.root.nodeType === 11 && Eu(this.dom.ownerDocument) == this.dom ? Vh(this) : this.domSelection();
|
|
10454
10440
|
}
|
|
10455
10441
|
/**
|
|
10456
10442
|
@internal
|
|
@@ -10477,7 +10463,7 @@ function Co(n) {
|
|
|
10477
10463
|
function Eo(n) {
|
|
10478
10464
|
return !n.someProp("editable", (e) => e(n.state) === !1);
|
|
10479
10465
|
}
|
|
10480
|
-
function
|
|
10466
|
+
function Yh(n, e) {
|
|
10481
10467
|
let t = Math.min(n.$anchor.sharedDepth(n.head), e.$anchor.sharedDepth(e.head));
|
|
10482
10468
|
return n.$anchor.start(t) != e.$anchor.start(t);
|
|
10483
10469
|
}
|
|
@@ -10489,7 +10475,7 @@ function To(n) {
|
|
|
10489
10475
|
}
|
|
10490
10476
|
return n.someProp("nodeViews", t), n.someProp("markViews", t), e;
|
|
10491
10477
|
}
|
|
10492
|
-
function
|
|
10478
|
+
function Xh(n, e) {
|
|
10493
10479
|
let t = 0, r = 0;
|
|
10494
10480
|
for (let i in n) {
|
|
10495
10481
|
if (n[i] != e[i])
|
|
@@ -10582,7 +10568,7 @@ var tt = {
|
|
|
10582
10568
|
220: "|",
|
|
10583
10569
|
221: "}",
|
|
10584
10570
|
222: '"'
|
|
10585
|
-
},
|
|
10571
|
+
}, Qh = typeof navigator < "u" && /Mac/.test(navigator.platform), Zh = typeof navigator < "u" && /MSIE \d|Trident\/(?:[7-9]|\d{2,})\..*rv:(\d+)/.exec(navigator.userAgent);
|
|
10586
10572
|
for (var Y = 0; Y < 10; Y++)
|
|
10587
10573
|
tt[48 + Y] = tt[96 + Y] = String(Y);
|
|
10588
10574
|
for (var Y = 1; Y <= 24; Y++)
|
|
@@ -10591,12 +10577,12 @@ for (var Y = 65; Y <= 90; Y++)
|
|
|
10591
10577
|
tt[Y] = String.fromCharCode(Y + 32), qn[Y] = String.fromCharCode(Y);
|
|
10592
10578
|
for (var si in tt)
|
|
10593
10579
|
qn.hasOwnProperty(si) || (qn[si] = tt[si]);
|
|
10594
|
-
function
|
|
10595
|
-
var e =
|
|
10580
|
+
function ef(n) {
|
|
10581
|
+
var e = Qh && n.metaKey && n.shiftKey && !n.ctrlKey && !n.altKey || Zh && n.shiftKey && n.key && n.key.length == 1 || n.key == "Unidentified", t = !e && n.key || (n.shiftKey ? qn : tt)[n.keyCode] || n.key || "Unidentified";
|
|
10596
10582
|
return t == "Esc" && (t = "Escape"), t == "Del" && (t = "Delete"), t == "Left" && (t = "ArrowLeft"), t == "Up" && (t = "ArrowUp"), t == "Right" && (t = "ArrowRight"), t == "Down" && (t = "ArrowDown"), t;
|
|
10597
10583
|
}
|
|
10598
|
-
const
|
|
10599
|
-
function
|
|
10584
|
+
const tf = typeof navigator < "u" ? /Mac|iP(hone|[oa]d)/.test(navigator.platform) : !1;
|
|
10585
|
+
function nf(n) {
|
|
10600
10586
|
let e = n.split(/-(?!$)/), t = e[e.length - 1];
|
|
10601
10587
|
t == "Space" && (t = " ");
|
|
10602
10588
|
let r, i, s, o;
|
|
@@ -10611,28 +10597,28 @@ function sf(n) {
|
|
|
10611
10597
|
else if (/^s(hift)?$/i.test(a))
|
|
10612
10598
|
s = !0;
|
|
10613
10599
|
else if (/^mod$/i.test(a))
|
|
10614
|
-
|
|
10600
|
+
tf ? o = !0 : i = !0;
|
|
10615
10601
|
else
|
|
10616
10602
|
throw new Error("Unrecognized modifier name: " + a);
|
|
10617
10603
|
}
|
|
10618
10604
|
return r && (t = "Alt-" + t), i && (t = "Ctrl-" + t), o && (t = "Meta-" + t), s && (t = "Shift-" + t), t;
|
|
10619
10605
|
}
|
|
10620
|
-
function
|
|
10606
|
+
function rf(n) {
|
|
10621
10607
|
let e = /* @__PURE__ */ Object.create(null);
|
|
10622
10608
|
for (let t in n)
|
|
10623
|
-
e[
|
|
10609
|
+
e[nf(t)] = n[t];
|
|
10624
10610
|
return e;
|
|
10625
10611
|
}
|
|
10626
10612
|
function oi(n, e, t = !0) {
|
|
10627
10613
|
return e.altKey && (n = "Alt-" + n), e.ctrlKey && (n = "Ctrl-" + n), e.metaKey && (n = "Meta-" + n), t && e.shiftKey && (n = "Shift-" + n), n;
|
|
10628
10614
|
}
|
|
10629
|
-
function
|
|
10630
|
-
return new Q({ props: { handleKeyDown:
|
|
10615
|
+
function sf(n) {
|
|
10616
|
+
return new Q({ props: { handleKeyDown: of(n) } });
|
|
10631
10617
|
}
|
|
10632
|
-
function
|
|
10633
|
-
let e =
|
|
10618
|
+
function of(n) {
|
|
10619
|
+
let e = rf(n);
|
|
10634
10620
|
return function(t, r) {
|
|
10635
|
-
let i =
|
|
10621
|
+
let i = ef(r), s, o = e[oi(i, r)];
|
|
10636
10622
|
if (o && o(t.state, t.dispatch, t))
|
|
10637
10623
|
return !0;
|
|
10638
10624
|
if (i.length == 1 && i != " ") {
|
|
@@ -10650,13 +10636,13 @@ function af(n) {
|
|
|
10650
10636
|
return !1;
|
|
10651
10637
|
};
|
|
10652
10638
|
}
|
|
10653
|
-
const
|
|
10654
|
-
function
|
|
10639
|
+
const lf = (n, e) => n.selection.empty ? !1 : (e && e(n.tr.deleteSelection().scrollIntoView()), !0);
|
|
10640
|
+
function af(n, e) {
|
|
10655
10641
|
let { $cursor: t } = n.selection;
|
|
10656
10642
|
return !t || (e ? !e.endOfTextblock("backward", n) : t.parentOffset > 0) ? null : t;
|
|
10657
10643
|
}
|
|
10658
|
-
const
|
|
10659
|
-
let r =
|
|
10644
|
+
const cf = (n, e, t) => {
|
|
10645
|
+
let r = af(n, t);
|
|
10660
10646
|
if (!r)
|
|
10661
10647
|
return !1;
|
|
10662
10648
|
let i = ka(r);
|
|
@@ -10688,7 +10674,7 @@ function zt(n, e, t = !1) {
|
|
|
10688
10674
|
}
|
|
10689
10675
|
return !1;
|
|
10690
10676
|
}
|
|
10691
|
-
const
|
|
10677
|
+
const df = (n, e, t) => {
|
|
10692
10678
|
let { $head: r, empty: i } = n.selection, s = r;
|
|
10693
10679
|
if (!i)
|
|
10694
10680
|
return !1;
|
|
@@ -10710,12 +10696,12 @@ function ka(n) {
|
|
|
10710
10696
|
}
|
|
10711
10697
|
return null;
|
|
10712
10698
|
}
|
|
10713
|
-
function
|
|
10699
|
+
function uf(n, e) {
|
|
10714
10700
|
let { $cursor: t } = n.selection;
|
|
10715
10701
|
return !t || (e ? !e.endOfTextblock("forward", n) : t.parentOffset < t.parent.content.size) ? null : t;
|
|
10716
10702
|
}
|
|
10717
|
-
const
|
|
10718
|
-
let r =
|
|
10703
|
+
const hf = (n, e, t) => {
|
|
10704
|
+
let r = uf(n, t);
|
|
10719
10705
|
if (!r)
|
|
10720
10706
|
return !1;
|
|
10721
10707
|
let i = Sa(r);
|
|
@@ -10735,7 +10721,7 @@ const pf = (n, e, t) => {
|
|
|
10735
10721
|
}
|
|
10736
10722
|
}
|
|
10737
10723
|
return s.isAtom && i.depth == r.depth - 1 ? (e && e(n.tr.delete(i.pos, i.pos + s.nodeSize).scrollIntoView()), !0) : !1;
|
|
10738
|
-
},
|
|
10724
|
+
}, ff = (n, e, t) => {
|
|
10739
10725
|
let { $head: r, empty: i } = n.selection, s = r;
|
|
10740
10726
|
if (!i)
|
|
10741
10727
|
return !1;
|
|
@@ -10758,7 +10744,7 @@ function Sa(n) {
|
|
|
10758
10744
|
}
|
|
10759
10745
|
return null;
|
|
10760
10746
|
}
|
|
10761
|
-
const
|
|
10747
|
+
const pf = (n, e) => {
|
|
10762
10748
|
let t = n.selection, r = t instanceof w, i;
|
|
10763
10749
|
if (r) {
|
|
10764
10750
|
if (t.node.isTextblock || !rt(n.doc, t.from))
|
|
@@ -10771,7 +10757,7 @@ const gf = (n, e) => {
|
|
|
10771
10757
|
r && s.setSelection(w.create(s.doc, i - n.doc.resolve(i).nodeBefore.nodeSize)), e(s.scrollIntoView());
|
|
10772
10758
|
}
|
|
10773
10759
|
return !0;
|
|
10774
|
-
},
|
|
10760
|
+
}, mf = (n, e) => {
|
|
10775
10761
|
let t = n.selection, r;
|
|
10776
10762
|
if (t instanceof w) {
|
|
10777
10763
|
if (t.node.isTextblock || !rt(n.doc, t.to))
|
|
@@ -10780,10 +10766,10 @@ const gf = (n, e) => {
|
|
|
10780
10766
|
} else if (r = Rl(n.doc, t.to, 1), r == null)
|
|
10781
10767
|
return !1;
|
|
10782
10768
|
return e && e(n.tr.join(r).scrollIntoView()), !0;
|
|
10783
|
-
},
|
|
10769
|
+
}, gf = (n, e) => {
|
|
10784
10770
|
let { $from: t, $to: r } = n.selection, i = t.blockRange(r), s = i && jt(i);
|
|
10785
10771
|
return s == null ? !1 : (e && e(n.tr.lift(i, s).scrollIntoView()), !0);
|
|
10786
|
-
},
|
|
10772
|
+
}, yf = (n, e) => {
|
|
10787
10773
|
let { $head: t, $anchor: r } = n.selection;
|
|
10788
10774
|
return !t.parent.type.spec.code || !t.sameParent(r) ? !1 : (e && e(n.tr.insertText(`
|
|
10789
10775
|
`).scrollIntoView()), !0);
|
|
@@ -10796,7 +10782,7 @@ function xa(n) {
|
|
|
10796
10782
|
}
|
|
10797
10783
|
return null;
|
|
10798
10784
|
}
|
|
10799
|
-
const
|
|
10785
|
+
const bf = (n, e) => {
|
|
10800
10786
|
let { $head: t, $anchor: r } = n.selection;
|
|
10801
10787
|
if (!t.parent.type.spec.code || !t.sameParent(r))
|
|
10802
10788
|
return !1;
|
|
@@ -10808,7 +10794,7 @@ const Sf = (n, e) => {
|
|
|
10808
10794
|
a.setSelection(N.near(a.doc.resolve(l), 1)), e(a.scrollIntoView());
|
|
10809
10795
|
}
|
|
10810
10796
|
return !0;
|
|
10811
|
-
},
|
|
10797
|
+
}, kf = (n, e) => {
|
|
10812
10798
|
let t = n.selection, { $from: r, $to: i } = t;
|
|
10813
10799
|
if (t instanceof Te || r.parent.inlineContent || i.parent.inlineContent)
|
|
10814
10800
|
return !1;
|
|
@@ -10820,7 +10806,7 @@ const Sf = (n, e) => {
|
|
|
10820
10806
|
l.setSelection(D.create(l.doc, o + 1)), e(l.scrollIntoView());
|
|
10821
10807
|
}
|
|
10822
10808
|
return !0;
|
|
10823
|
-
},
|
|
10809
|
+
}, Sf = (n, e) => {
|
|
10824
10810
|
let { $cursor: t } = n.selection;
|
|
10825
10811
|
if (!t || t.parent.content.size)
|
|
10826
10812
|
return !1;
|
|
@@ -10831,11 +10817,11 @@ const Sf = (n, e) => {
|
|
|
10831
10817
|
}
|
|
10832
10818
|
let r = t.blockRange(), i = r && jt(r);
|
|
10833
10819
|
return i == null ? !1 : (e && e(n.tr.lift(r, i).scrollIntoView()), !0);
|
|
10834
|
-
},
|
|
10820
|
+
}, xf = (n, e) => {
|
|
10835
10821
|
let { $from: t, to: r } = n.selection, i, s = t.sharedDepth(r);
|
|
10836
10822
|
return s == 0 ? !1 : (i = t.before(s), e && e(n.tr.setSelection(w.create(n.doc, i))), !0);
|
|
10837
10823
|
};
|
|
10838
|
-
function
|
|
10824
|
+
function Cf(n, e, t) {
|
|
10839
10825
|
let r = e.nodeBefore, i = e.nodeAfter, s = e.index();
|
|
10840
10826
|
return !r || !i || !r.type.compatibleContent(i.type) ? !1 : !r.content.size && e.parent.canReplace(s - 1, s) ? (t && t(n.tr.delete(e.pos - r.nodeSize, e.pos).scrollIntoView()), !0) : !e.parent.canReplace(s, s + 1) || !(i.isTextblock || rt(n.doc, e.pos)) ? !1 : (t && t(n.tr.clearIncompatible(e.pos, r.type, r.contentMatchAt(r.childCount)).join(e.pos).scrollIntoView()), !0);
|
|
10841
10827
|
}
|
|
@@ -10843,7 +10829,7 @@ function Ca(n, e, t) {
|
|
|
10843
10829
|
let r = e.nodeBefore, i = e.nodeAfter, s, o;
|
|
10844
10830
|
if (r.type.spec.isolating || i.type.spec.isolating)
|
|
10845
10831
|
return !1;
|
|
10846
|
-
if (
|
|
10832
|
+
if (Cf(n, e, t))
|
|
10847
10833
|
return !0;
|
|
10848
10834
|
let l = e.parent.canReplace(e.index(), e.index() + 1);
|
|
10849
10835
|
if (l && (s = (o = r.contentMatchAt(r.childCount)).findWrapping(i.type)) && o.matchType(s[0] || i.type).validEnd) {
|
|
@@ -10891,8 +10877,8 @@ function Ea(n) {
|
|
|
10891
10877
|
return i.node(s).isTextblock ? (t && t(e.tr.setSelection(D.create(e.doc, n < 0 ? i.start(s) : i.end(s)))), !0) : !1;
|
|
10892
10878
|
};
|
|
10893
10879
|
}
|
|
10894
|
-
const
|
|
10895
|
-
function
|
|
10880
|
+
const Ef = Ea(-1), Tf = Ea(1);
|
|
10881
|
+
function Mf(n, e = null) {
|
|
10896
10882
|
return function(t, r) {
|
|
10897
10883
|
let { $from: i, $to: s } = t.selection, o = i.blockRange(s), l = o && Yi(o, n, e);
|
|
10898
10884
|
return l ? (r && r(t.tr.wrap(o, l).scrollIntoView()), !0) : !1;
|
|
@@ -10929,7 +10915,7 @@ function wo(n, e = null) {
|
|
|
10929
10915
|
};
|
|
10930
10916
|
}
|
|
10931
10917
|
typeof navigator < "u" ? /Mac|iP(hone|[oa]d)/.test(navigator.platform) : typeof os < "u" && os.platform && os.platform() == "darwin";
|
|
10932
|
-
function
|
|
10918
|
+
function wf(n, e = null) {
|
|
10933
10919
|
return function(t, r) {
|
|
10934
10920
|
let { $from: i, $to: s } = t.selection, o = i.blockRange(s), l = !1, a = o;
|
|
10935
10921
|
if (!o)
|
|
@@ -10941,10 +10927,10 @@ function vf(n, e = null) {
|
|
|
10941
10927
|
a = new Bn(d, d, o.depth), o.endIndex < o.parent.childCount && (o = new Bn(i, t.doc.resolve(s.end(o.depth)), o.depth)), l = !0;
|
|
10942
10928
|
}
|
|
10943
10929
|
let c = Yi(a, n, e, o);
|
|
10944
|
-
return c ? (r && r(
|
|
10930
|
+
return c ? (r && r(Of(t.tr, o, c, l, n).scrollIntoView()), !0) : !1;
|
|
10945
10931
|
};
|
|
10946
10932
|
}
|
|
10947
|
-
function
|
|
10933
|
+
function Of(n, e, t, r, i) {
|
|
10948
10934
|
let s = b.empty;
|
|
10949
10935
|
for (let d = t.length - 1; d >= 0; d--)
|
|
10950
10936
|
s = b.from(t[d].type.create(t[d].attrs, s));
|
|
@@ -10957,13 +10943,13 @@ function Af(n, e, t, r, i) {
|
|
|
10957
10943
|
!h && Rt(n.doc, a, l) && (n.split(a, l), a += 2 * l), a += c.child(d).nodeSize;
|
|
10958
10944
|
return n;
|
|
10959
10945
|
}
|
|
10960
|
-
function
|
|
10946
|
+
function vf(n) {
|
|
10961
10947
|
return function(e, t) {
|
|
10962
10948
|
let { $from: r, $to: i } = e.selection, s = r.blockRange(i, (o) => o.childCount > 0 && o.firstChild.type == n);
|
|
10963
|
-
return s ? t ? r.node(s.depth - 1).type == n ?
|
|
10949
|
+
return s ? t ? r.node(s.depth - 1).type == n ? Af(e, t, n, s) : Nf(e, t, s) : !0 : !1;
|
|
10964
10950
|
};
|
|
10965
10951
|
}
|
|
10966
|
-
function
|
|
10952
|
+
function Af(n, e, t, r) {
|
|
10967
10953
|
let i = n.tr, s = r.end, o = r.$to.end(r.depth);
|
|
10968
10954
|
s < o && (i.step(new K(s - 1, o, s, o, new S(b.from(t.create(null, r.parent.copy())), 1, 0), 1, !0)), r = new Bn(i.doc.resolve(r.$from.pos), i.doc.resolve(o), r.depth));
|
|
10969
10955
|
const l = jt(r);
|
|
@@ -10973,7 +10959,7 @@ function Df(n, e, t, r) {
|
|
|
10973
10959
|
let a = i.mapping.map(s, -1) - 1;
|
|
10974
10960
|
return rt(i.doc, a) && i.join(a), e(i.scrollIntoView()), !0;
|
|
10975
10961
|
}
|
|
10976
|
-
function
|
|
10962
|
+
function Nf(n, e, t) {
|
|
10977
10963
|
let r = n.tr, i = t.parent;
|
|
10978
10964
|
for (let f = t.end, p = t.endIndex - 1, m = t.startIndex; p > m; p--)
|
|
10979
10965
|
f -= i.child(p).nodeSize, r.delete(f - 1, f + 1);
|
|
@@ -10986,7 +10972,7 @@ function If(n, e, t) {
|
|
|
10986
10972
|
let u = s.pos, h = u + o.nodeSize;
|
|
10987
10973
|
return r.step(new K(u - (l ? 1 : 0), h + (a ? 1 : 0), u + 1, h - 1, new S((l ? b.empty : b.from(i.copy(b.empty))).append(a ? b.empty : b.from(i.copy(b.empty))), l ? 0 : 1, a ? 0 : 1), l ? 0 : 1)), e(r.scrollIntoView()), !0;
|
|
10988
10974
|
}
|
|
10989
|
-
function
|
|
10975
|
+
function Df(n) {
|
|
10990
10976
|
return function(e, t) {
|
|
10991
10977
|
let { $from: r, $to: i } = e.selection, s = r.blockRange(i, (c) => c.childCount > 0 && c.firstChild.type == n);
|
|
10992
10978
|
if (!s)
|
|
@@ -11092,7 +11078,7 @@ class Rr {
|
|
|
11092
11078
|
return l;
|
|
11093
11079
|
}
|
|
11094
11080
|
}
|
|
11095
|
-
class
|
|
11081
|
+
class If {
|
|
11096
11082
|
constructor() {
|
|
11097
11083
|
this.callbacks = {};
|
|
11098
11084
|
}
|
|
@@ -11209,10 +11195,10 @@ function Ma(n) {
|
|
|
11209
11195
|
function A(n, e = void 0, ...t) {
|
|
11210
11196
|
return Ma(n) ? e ? n.bind(e)(...t) : n(...t) : n;
|
|
11211
11197
|
}
|
|
11212
|
-
function
|
|
11198
|
+
function Rf(n = {}) {
|
|
11213
11199
|
return Object.keys(n).length === 0 && n.constructor === Object;
|
|
11214
11200
|
}
|
|
11215
|
-
function
|
|
11201
|
+
function Pf(n) {
|
|
11216
11202
|
return typeof n != "string" ? n : n.match(/^[+-]?(?:\d*\.)?\d+$/) ? Number(n) : n === "true" ? !0 : n === "false" ? !1 : n;
|
|
11217
11203
|
}
|
|
11218
11204
|
function Oo(n, e) {
|
|
@@ -11223,7 +11209,7 @@ function Oo(n, e) {
|
|
|
11223
11209
|
if (r === !1)
|
|
11224
11210
|
return !1;
|
|
11225
11211
|
const i = e.reduce((s, o) => {
|
|
11226
|
-
const l = o.attribute.parseHTML ? o.attribute.parseHTML(t) :
|
|
11212
|
+
const l = o.attribute.parseHTML ? o.attribute.parseHTML(t) : Pf(t.getAttribute(o.name));
|
|
11227
11213
|
return l == null ? s : {
|
|
11228
11214
|
...s,
|
|
11229
11215
|
[o.name]: l
|
|
@@ -11236,10 +11222,10 @@ function Oo(n, e) {
|
|
|
11236
11222
|
function vo(n) {
|
|
11237
11223
|
return Object.fromEntries(
|
|
11238
11224
|
// @ts-ignore
|
|
11239
|
-
Object.entries(n).filter(([e, t]) => e === "attrs" &&
|
|
11225
|
+
Object.entries(n).filter(([e, t]) => e === "attrs" && Rf(t) ? !1 : t != null)
|
|
11240
11226
|
);
|
|
11241
11227
|
}
|
|
11242
|
-
function
|
|
11228
|
+
function Lf(n, e) {
|
|
11243
11229
|
var t;
|
|
11244
11230
|
const r = Ta(n), { nodeExtensions: i, markExtensions: s } = Pr(n), o = (t = i.find((c) => C(c, "topNode"))) === null || t === void 0 ? void 0 : t.name, l = Object.fromEntries(i.map((c) => {
|
|
11245
11231
|
const d = r.filter((y) => y.type === c.name), u = {
|
|
@@ -11309,7 +11295,7 @@ function _f(n, e) {
|
|
|
11309
11295
|
HTMLAttributes: Ri(g, d)
|
|
11310
11296
|
})), [c.name, f];
|
|
11311
11297
|
}));
|
|
11312
|
-
return new
|
|
11298
|
+
return new Vd({
|
|
11313
11299
|
topNode: o,
|
|
11314
11300
|
nodes: l,
|
|
11315
11301
|
marks: a
|
|
@@ -11321,7 +11307,7 @@ function li(n, e) {
|
|
|
11321
11307
|
function Ao(n, e) {
|
|
11322
11308
|
return Array.isArray(e) ? e.some((t) => (typeof t == "string" ? t : t.name) === n.name) : e;
|
|
11323
11309
|
}
|
|
11324
|
-
const
|
|
11310
|
+
const Bf = (n, e = 500) => {
|
|
11325
11311
|
let t = "";
|
|
11326
11312
|
const r = n.parentOffset;
|
|
11327
11313
|
return n.parent.nodesBetween(Math.max(0, r - e), r, (i, s, o, l) => {
|
|
@@ -11343,7 +11329,7 @@ class Lr {
|
|
|
11343
11329
|
this.find = e.find, this.handler = e.handler;
|
|
11344
11330
|
}
|
|
11345
11331
|
}
|
|
11346
|
-
const
|
|
11332
|
+
const _f = (n, e) => {
|
|
11347
11333
|
if (cs(e))
|
|
11348
11334
|
return e.exec(n);
|
|
11349
11335
|
const t = e(n);
|
|
@@ -11364,11 +11350,11 @@ function ai(n) {
|
|
|
11364
11350
|
)
|
|
11365
11351
|
return !1;
|
|
11366
11352
|
let d = !1;
|
|
11367
|
-
const u =
|
|
11353
|
+
const u = Bf(c) + s;
|
|
11368
11354
|
return o.forEach((h) => {
|
|
11369
11355
|
if (d)
|
|
11370
11356
|
return;
|
|
11371
|
-
const f =
|
|
11357
|
+
const f = _f(u, h.find);
|
|
11372
11358
|
if (!f)
|
|
11373
11359
|
return;
|
|
11374
11360
|
const p = a.state.tr, m = Ir({
|
|
@@ -11396,7 +11382,7 @@ function ai(n) {
|
|
|
11396
11382
|
}), a.dispatch(p), d = !0);
|
|
11397
11383
|
}), d;
|
|
11398
11384
|
}
|
|
11399
|
-
function
|
|
11385
|
+
function Ff(n) {
|
|
11400
11386
|
const { editor: e, rules: t } = n, r = new Q({
|
|
11401
11387
|
state: {
|
|
11402
11388
|
init() {
|
|
@@ -11453,7 +11439,7 @@ function Hf(n) {
|
|
|
11453
11439
|
});
|
|
11454
11440
|
return r;
|
|
11455
11441
|
}
|
|
11456
|
-
function
|
|
11442
|
+
function zf(n) {
|
|
11457
11443
|
return typeof n == "number";
|
|
11458
11444
|
}
|
|
11459
11445
|
class wa {
|
|
@@ -11461,7 +11447,7 @@ class wa {
|
|
|
11461
11447
|
this.find = e.find, this.handler = e.handler;
|
|
11462
11448
|
}
|
|
11463
11449
|
}
|
|
11464
|
-
const
|
|
11450
|
+
const Hf = (n, e) => {
|
|
11465
11451
|
if (cs(e))
|
|
11466
11452
|
return [...n.matchAll(e)];
|
|
11467
11453
|
const t = e(n);
|
|
@@ -11470,7 +11456,7 @@ const $f = (n, e) => {
|
|
|
11470
11456
|
return i.index = r.index, i.input = n, i.data = r.data, r.replaceWith && (r.text.includes(r.replaceWith) || console.warn('[tiptap warn]: "pasteRuleMatch.replaceWith" must be part of "pasteRuleMatch.text".'), i.push(r.replaceWith)), i;
|
|
11471
11457
|
}) : [];
|
|
11472
11458
|
};
|
|
11473
|
-
function
|
|
11459
|
+
function Vf(n) {
|
|
11474
11460
|
const { editor: e, state: t, from: r, to: i, rule: s } = n, { commands: o, chain: l, can: a } = new Rr({
|
|
11475
11461
|
editor: e,
|
|
11476
11462
|
state: t
|
|
@@ -11479,7 +11465,7 @@ function jf(n) {
|
|
|
11479
11465
|
if (!u.isTextblock || u.type.spec.code)
|
|
11480
11466
|
return;
|
|
11481
11467
|
const f = Math.max(r, h), p = Math.min(i, h + u.content.size), m = u.textBetween(f - h, p - h, void 0, "");
|
|
11482
|
-
|
|
11468
|
+
Hf(m, s.find).forEach((y) => {
|
|
11483
11469
|
if (y.index === void 0)
|
|
11484
11470
|
return;
|
|
11485
11471
|
const x = f + y.index + 1, T = x + y[0].length, R = {
|
|
@@ -11497,7 +11483,7 @@ function jf(n) {
|
|
|
11497
11483
|
});
|
|
11498
11484
|
}), c.every((u) => u !== null);
|
|
11499
11485
|
}
|
|
11500
|
-
function
|
|
11486
|
+
function $f(n) {
|
|
11501
11487
|
const { editor: e, rules: t } = n;
|
|
11502
11488
|
let r = null, i = !1, s = !1;
|
|
11503
11489
|
return t.map((l) => new Q({
|
|
@@ -11528,13 +11514,13 @@ function qf(n) {
|
|
|
11528
11514
|
if (!h && !f)
|
|
11529
11515
|
return;
|
|
11530
11516
|
const p = c.doc.content.findDiffStart(d.doc.content), m = c.doc.content.findDiffEnd(d.doc.content);
|
|
11531
|
-
if (!
|
|
11517
|
+
if (!zf(p) || !m || p === m.b)
|
|
11532
11518
|
return;
|
|
11533
11519
|
const g = d.tr, y = Ir({
|
|
11534
11520
|
state: d,
|
|
11535
11521
|
transaction: g
|
|
11536
11522
|
});
|
|
11537
|
-
if (!(!
|
|
11523
|
+
if (!(!Vf({
|
|
11538
11524
|
editor: e,
|
|
11539
11525
|
state: y,
|
|
11540
11526
|
from: Math.max(p - 1, 0),
|
|
@@ -11545,13 +11531,13 @@ function qf(n) {
|
|
|
11545
11531
|
}
|
|
11546
11532
|
}));
|
|
11547
11533
|
}
|
|
11548
|
-
function
|
|
11534
|
+
function jf(n) {
|
|
11549
11535
|
const e = n.filter((t, r) => n.indexOf(t) !== r);
|
|
11550
11536
|
return [...new Set(e)];
|
|
11551
11537
|
}
|
|
11552
11538
|
class It {
|
|
11553
11539
|
constructor(e, t) {
|
|
11554
|
-
this.splittableMarks = [], this.editor = t, this.extensions = It.resolve(e), this.schema =
|
|
11540
|
+
this.splittableMarks = [], this.editor = t, this.extensions = It.resolve(e), this.schema = Lf(this.extensions, t), this.extensions.forEach((r) => {
|
|
11555
11541
|
var i;
|
|
11556
11542
|
this.editor.extensionStorage[r.name] = r.storage;
|
|
11557
11543
|
const s = {
|
|
@@ -11581,7 +11567,7 @@ class It {
|
|
|
11581
11567
|
});
|
|
11582
11568
|
}
|
|
11583
11569
|
static resolve(e) {
|
|
11584
|
-
const t = It.sort(It.flatten(e)), r =
|
|
11570
|
+
const t = It.sort(It.flatten(e)), r = jf(t.map((i) => i.name));
|
|
11585
11571
|
return r.length && console.warn(`[tiptap warn]: Duplicate extension names found: [${r.map((i) => `'${i}'`).join(", ")}]. This can lead to issues.`), t;
|
|
11586
11572
|
}
|
|
11587
11573
|
static flatten(e) {
|
|
@@ -11629,7 +11615,7 @@ class It {
|
|
|
11629
11615
|
const m = Object.fromEntries(Object.entries(c()).map(([g, y]) => [g, () => y({ editor: e })]));
|
|
11630
11616
|
d = { ...d, ...m };
|
|
11631
11617
|
}
|
|
11632
|
-
const u =
|
|
11618
|
+
const u = sf(d);
|
|
11633
11619
|
a.push(u);
|
|
11634
11620
|
const h = C(o, "addInputRules", l);
|
|
11635
11621
|
Ao(o, e.options.enableInputRules) && h && r.push(...h());
|
|
@@ -11643,11 +11629,11 @@ class It {
|
|
|
11643
11629
|
return a;
|
|
11644
11630
|
}).flat();
|
|
11645
11631
|
return [
|
|
11646
|
-
|
|
11632
|
+
Ff({
|
|
11647
11633
|
editor: e,
|
|
11648
11634
|
rules: r
|
|
11649
11635
|
}),
|
|
11650
|
-
|
|
11636
|
+
...$f({
|
|
11651
11637
|
editor: e,
|
|
11652
11638
|
rules: i
|
|
11653
11639
|
}),
|
|
@@ -11684,11 +11670,11 @@ class It {
|
|
|
11684
11670
|
}));
|
|
11685
11671
|
}
|
|
11686
11672
|
}
|
|
11687
|
-
function
|
|
11673
|
+
function qf(n) {
|
|
11688
11674
|
return Object.prototype.toString.call(n).slice(8, -1);
|
|
11689
11675
|
}
|
|
11690
11676
|
function ci(n) {
|
|
11691
|
-
return
|
|
11677
|
+
return qf(n) !== "Object" ? !1 : n.constructor === Object && Object.getPrototypeOf(n) === Object.prototype;
|
|
11692
11678
|
}
|
|
11693
11679
|
function Br(n, e) {
|
|
11694
11680
|
const t = { ...n };
|
|
@@ -11751,7 +11737,7 @@ function Oa(n, e, t) {
|
|
|
11751
11737
|
function va(n) {
|
|
11752
11738
|
return Object.fromEntries(Object.entries(n.nodes).filter(([, e]) => e.spec.toText).map(([e, t]) => [e, t.spec.toText]));
|
|
11753
11739
|
}
|
|
11754
|
-
const
|
|
11740
|
+
const Kf = ge.create({
|
|
11755
11741
|
name: "clipboardTextSerializer",
|
|
11756
11742
|
addProseMirrorPlugins() {
|
|
11757
11743
|
return [
|
|
@@ -11768,10 +11754,10 @@ const Uf = ge.create({
|
|
|
11768
11754
|
})
|
|
11769
11755
|
];
|
|
11770
11756
|
}
|
|
11771
|
-
}),
|
|
11757
|
+
}), Wf = () => ({ editor: n, view: e }) => (requestAnimationFrame(() => {
|
|
11772
11758
|
var t;
|
|
11773
11759
|
n.isDestroyed || (e.dom.blur(), (t = window == null ? void 0 : window.getSelection()) === null || t === void 0 || t.removeAllRanges());
|
|
11774
|
-
}), !0),
|
|
11760
|
+
}), !0), Uf = (n = !1) => ({ commands: e }) => e.setContent("", n), Jf = () => ({ state: n, tr: e, dispatch: t }) => {
|
|
11775
11761
|
const { selection: r } = e, { ranges: i } = r;
|
|
11776
11762
|
return t && i.forEach(({ $from: s, $to: o }) => {
|
|
11777
11763
|
n.doc.nodesBetween(s.pos, o.pos, (l, a) => {
|
|
@@ -11788,7 +11774,7 @@ const Uf = ge.create({
|
|
|
11788
11774
|
(p || p === 0) && e.lift(f, p);
|
|
11789
11775
|
});
|
|
11790
11776
|
}), !0;
|
|
11791
|
-
},
|
|
11777
|
+
}, Gf = (n) => (e) => n(e), Yf = () => ({ state: n, dispatch: e }) => kf(n, e), Xf = () => ({ tr: n, dispatch: e }) => {
|
|
11792
11778
|
const { selection: t } = n, r = t.$anchor.node();
|
|
11793
11779
|
if (r.content.size > 0)
|
|
11794
11780
|
return !1;
|
|
@@ -11802,7 +11788,7 @@ const Uf = ge.create({
|
|
|
11802
11788
|
return !0;
|
|
11803
11789
|
}
|
|
11804
11790
|
return !1;
|
|
11805
|
-
},
|
|
11791
|
+
}, Qf = (n) => ({ tr: e, state: t, dispatch: r }) => {
|
|
11806
11792
|
const i = W(n, t.schema), s = e.selection.$anchor;
|
|
11807
11793
|
for (let o = s.depth; o > 0; o -= 1)
|
|
11808
11794
|
if (s.node(o).type === i) {
|
|
@@ -11813,10 +11799,10 @@ const Uf = ge.create({
|
|
|
11813
11799
|
return !0;
|
|
11814
11800
|
}
|
|
11815
11801
|
return !1;
|
|
11816
|
-
},
|
|
11802
|
+
}, Zf = (n) => ({ tr: e, dispatch: t }) => {
|
|
11817
11803
|
const { from: r, to: i } = n;
|
|
11818
11804
|
return t && e.delete(r, i), !0;
|
|
11819
|
-
},
|
|
11805
|
+
}, ep = () => ({ state: n, dispatch: e }) => lf(n, e), tp = () => ({ commands: n }) => n.keyboardShortcut("Enter"), np = () => ({ state: n, dispatch: e }) => bf(n, e);
|
|
11820
11806
|
function Kn(n, e, t = { strict: !0 }) {
|
|
11821
11807
|
const r = Object.keys(e);
|
|
11822
11808
|
return r.length ? r.every((i) => t.strict ? e[i] === n[i] : cs(e[i]) ? e[i].test(n[i]) : e[i] === n[i]) : !0;
|
|
@@ -11824,7 +11810,7 @@ function Kn(n, e, t = { strict: !0 }) {
|
|
|
11824
11810
|
function Pi(n, e, t = {}) {
|
|
11825
11811
|
return n.find((r) => r.type === e && Kn(r.attrs, t));
|
|
11826
11812
|
}
|
|
11827
|
-
function
|
|
11813
|
+
function rp(n, e, t = {}) {
|
|
11828
11814
|
return !!Pi(n, e, t);
|
|
11829
11815
|
}
|
|
11830
11816
|
function ds(n, e, t = {}) {
|
|
@@ -11839,7 +11825,7 @@ function ds(n, e, t = {}) {
|
|
|
11839
11825
|
let s = r.index, o = n.start() + r.offset, l = s + 1, a = o + r.node.nodeSize;
|
|
11840
11826
|
for (Pi([...r.node.marks], e, t); s > 0 && i.isInSet(n.parent.child(s - 1).marks); )
|
|
11841
11827
|
s -= 1, o -= n.parent.child(s).nodeSize;
|
|
11842
|
-
for (; l < n.parent.childCount &&
|
|
11828
|
+
for (; l < n.parent.childCount && rp([...n.parent.child(l).marks], e, t); )
|
|
11843
11829
|
a += n.parent.child(l).nodeSize, l += 1;
|
|
11844
11830
|
return {
|
|
11845
11831
|
from: o,
|
|
@@ -11854,7 +11840,7 @@ function st(n, e) {
|
|
|
11854
11840
|
}
|
|
11855
11841
|
return n;
|
|
11856
11842
|
}
|
|
11857
|
-
const
|
|
11843
|
+
const ip = (n, e = {}) => ({ tr: t, state: r, dispatch: i }) => {
|
|
11858
11844
|
const s = st(n, r.schema), { doc: o, selection: l } = t, { $from: a, from: c, to: d } = l;
|
|
11859
11845
|
if (i) {
|
|
11860
11846
|
const u = ds(a, s, e);
|
|
@@ -11864,7 +11850,7 @@ const op = (n, e = {}) => ({ tr: t, state: r, dispatch: i }) => {
|
|
|
11864
11850
|
}
|
|
11865
11851
|
}
|
|
11866
11852
|
return !0;
|
|
11867
|
-
},
|
|
11853
|
+
}, sp = (n) => (e) => {
|
|
11868
11854
|
const t = typeof n == "function" ? n(e) : n;
|
|
11869
11855
|
for (let r = 0; r < t.length; r += 1)
|
|
11870
11856
|
if (t[r](e))
|
|
@@ -11898,7 +11884,7 @@ function _r() {
|
|
|
11898
11884
|
"iPod"
|
|
11899
11885
|
].includes(navigator.platform) || navigator.userAgent.includes("Mac") && "ontouchend" in document;
|
|
11900
11886
|
}
|
|
11901
|
-
const
|
|
11887
|
+
const op = (n = null, e = {}) => ({ editor: t, view: r, tr: i, dispatch: s }) => {
|
|
11902
11888
|
e = {
|
|
11903
11889
|
scrollIntoView: !0,
|
|
11904
11890
|
...e
|
|
@@ -11914,7 +11900,7 @@ const ap = (n = null, e = {}) => ({ editor: t, view: r, tr: i, dispatch: s }) =>
|
|
|
11914
11900
|
return o(), !0;
|
|
11915
11901
|
const l = Aa(i.doc, n) || t.state.selection, a = t.state.selection.eq(l);
|
|
11916
11902
|
return s && (a || i.setSelection(l), a && i.storedMarks && i.setStoredMarks(i.storedMarks), o()), !0;
|
|
11917
|
-
},
|
|
11903
|
+
}, lp = (n, e) => (t) => n.every((r, i) => e(r, { ...t, index: i })), ap = (n, e) => ({ tr: t, commands: r }) => r.insertContentAt({ from: t.selection.from, to: t.selection.to }, n, e);
|
|
11918
11904
|
function No(n) {
|
|
11919
11905
|
const e = `<body>${n}</body>`;
|
|
11920
11906
|
return new window.DOMParser().parseFromString(e, "text/html").body;
|
|
@@ -11936,7 +11922,7 @@ function Wn(n, e, t) {
|
|
|
11936
11922
|
}
|
|
11937
11923
|
return Wn("", e, t);
|
|
11938
11924
|
}
|
|
11939
|
-
function
|
|
11925
|
+
function cp(n, e, t) {
|
|
11940
11926
|
const r = n.steps.length - 1;
|
|
11941
11927
|
if (r < e)
|
|
11942
11928
|
return;
|
|
@@ -11949,7 +11935,7 @@ function up(n, e, t) {
|
|
|
11949
11935
|
o === 0 && (o = d);
|
|
11950
11936
|
}), n.setSelection(N.near(n.doc.resolve(o), t));
|
|
11951
11937
|
}
|
|
11952
|
-
const
|
|
11938
|
+
const dp = (n) => n.toString().startsWith("<"), up = (n, e, t) => ({ tr: r, dispatch: i, editor: s }) => {
|
|
11953
11939
|
if (i) {
|
|
11954
11940
|
t = {
|
|
11955
11941
|
parseOptions: {},
|
|
@@ -11965,20 +11951,20 @@ const hp = (n) => n.toString().startsWith("<"), fp = (n, e, t) => ({ tr: r, disp
|
|
|
11965
11951
|
if (o.toString() === "<>")
|
|
11966
11952
|
return !0;
|
|
11967
11953
|
let { from: l, to: a } = typeof n == "number" ? { from: n, to: n } : n, c = !0, d = !0;
|
|
11968
|
-
if ((
|
|
11954
|
+
if ((dp(o) ? o : [o]).forEach((h) => {
|
|
11969
11955
|
h.check(), c = c ? h.isText && h.marks.length === 0 : !1, d = d ? h.isBlock : !1;
|
|
11970
11956
|
}), l === a && d) {
|
|
11971
11957
|
const { parent: h } = r.doc.resolve(l);
|
|
11972
11958
|
h.isTextblock && !h.type.spec.code && !h.childCount && (l -= 1, a += 1);
|
|
11973
11959
|
}
|
|
11974
|
-
c ? Array.isArray(e) ? r.insertText(e.map((h) => h.text || "").join(""), l, a) : typeof e == "object" && e && e.text ? r.insertText(e.text, l, a) : r.insertText(e, l, a) : r.replaceWith(l, a, o), t.updateSelection &&
|
|
11960
|
+
c ? Array.isArray(e) ? r.insertText(e.map((h) => h.text || "").join(""), l, a) : typeof e == "object" && e && e.text ? r.insertText(e.text, l, a) : r.insertText(e, l, a) : r.replaceWith(l, a, o), t.updateSelection && cp(r, r.steps.length - 1, -1);
|
|
11975
11961
|
}
|
|
11976
11962
|
return !0;
|
|
11977
|
-
},
|
|
11963
|
+
}, hp = () => ({ state: n, dispatch: e }) => pf(n, e), fp = () => ({ state: n, dispatch: e }) => mf(n, e), pp = () => ({ state: n, dispatch: e }) => cf(n, e), mp = () => ({ state: n, dispatch: e }) => hf(n, e);
|
|
11978
11964
|
function hs() {
|
|
11979
11965
|
return typeof navigator < "u" ? /Mac/.test(navigator.platform) : !1;
|
|
11980
11966
|
}
|
|
11981
|
-
function
|
|
11967
|
+
function gp(n) {
|
|
11982
11968
|
const e = n.split(/-(?!$)/);
|
|
11983
11969
|
let t = e[e.length - 1];
|
|
11984
11970
|
t === "Space" && (t = " ");
|
|
@@ -12000,8 +11986,8 @@ function bp(n) {
|
|
|
12000
11986
|
}
|
|
12001
11987
|
return r && (t = `Alt-${t}`), i && (t = `Ctrl-${t}`), o && (t = `Meta-${t}`), s && (t = `Shift-${t}`), t;
|
|
12002
11988
|
}
|
|
12003
|
-
const
|
|
12004
|
-
const s =
|
|
11989
|
+
const yp = (n) => ({ editor: e, view: t, tr: r, dispatch: i }) => {
|
|
11990
|
+
const s = gp(n).split(/-(?!$)/), o = s.find((c) => !["Alt", "Ctrl", "Meta", "Shift"].includes(c)), l = new KeyboardEvent("keydown", {
|
|
12005
11991
|
key: o === "Space" ? " " : o,
|
|
12006
11992
|
altKey: s.includes("Alt"),
|
|
12007
11993
|
ctrlKey: s.includes("Ctrl"),
|
|
@@ -12032,13 +12018,13 @@ function pn(n, e, t = {}) {
|
|
|
12032
12018
|
const a = i - r, c = l.filter((u) => o ? o.name === u.node.type.name : !0).filter((u) => Kn(u.node.attrs, t, { strict: !1 }));
|
|
12033
12019
|
return s ? !!c.length : c.reduce((u, h) => u + h.to - h.from, 0) >= a;
|
|
12034
12020
|
}
|
|
12035
|
-
const
|
|
12021
|
+
const bp = (n, e = {}) => ({ state: t, dispatch: r }) => {
|
|
12036
12022
|
const i = W(n, t.schema);
|
|
12037
|
-
return pn(t, i, e) ?
|
|
12038
|
-
},
|
|
12023
|
+
return pn(t, i, e) ? gf(t, r) : !1;
|
|
12024
|
+
}, kp = () => ({ state: n, dispatch: e }) => Sf(n, e), Sp = (n) => ({ state: e, dispatch: t }) => {
|
|
12039
12025
|
const r = W(n, e.schema);
|
|
12040
|
-
return
|
|
12041
|
-
},
|
|
12026
|
+
return vf(r)(e, t);
|
|
12027
|
+
}, xp = () => ({ state: n, dispatch: e }) => yf(n, e);
|
|
12042
12028
|
function Fr(n, e) {
|
|
12043
12029
|
return e.nodes[n] ? "node" : e.marks[n] ? "mark" : null;
|
|
12044
12030
|
}
|
|
@@ -12046,7 +12032,7 @@ function Do(n, e) {
|
|
|
12046
12032
|
const t = typeof e == "string" ? [e] : e;
|
|
12047
12033
|
return Object.keys(n).reduce((r, i) => (t.includes(i) || (r[i] = n[i]), r), {});
|
|
12048
12034
|
}
|
|
12049
|
-
const
|
|
12035
|
+
const Cp = (n, e) => ({ tr: t, state: r, dispatch: i }) => {
|
|
12050
12036
|
let s = null, o = null;
|
|
12051
12037
|
const l = Fr(typeof n == "string" ? n : n.name, r.schema);
|
|
12052
12038
|
return l ? (l === "node" && (s = W(n, r.schema)), l === "mark" && (o = st(n, r.schema)), i && t.selection.ranges.forEach((a) => {
|
|
@@ -12056,14 +12042,14 @@ const Tp = (n, e) => ({ tr: t, state: r, dispatch: i }) => {
|
|
|
12056
12042
|
});
|
|
12057
12043
|
});
|
|
12058
12044
|
}), !0) : !1;
|
|
12059
|
-
},
|
|
12045
|
+
}, Ep = () => ({ tr: n, dispatch: e }) => (e && n.scrollIntoView(), !0), Tp = () => ({ tr: n, commands: e }) => e.setTextSelection({
|
|
12060
12046
|
from: 0,
|
|
12061
12047
|
to: n.doc.content.size
|
|
12062
|
-
}),
|
|
12048
|
+
}), Mp = () => ({ state: n, dispatch: e }) => df(n, e), wp = () => ({ state: n, dispatch: e }) => ff(n, e), Op = () => ({ state: n, dispatch: e }) => xf(n, e), vp = () => ({ state: n, dispatch: e }) => Tf(n, e), Ap = () => ({ state: n, dispatch: e }) => Ef(n, e);
|
|
12063
12049
|
function Na(n, e, t = {}) {
|
|
12064
12050
|
return Wn(n, e, { slice: !1, parseOptions: t });
|
|
12065
12051
|
}
|
|
12066
|
-
const
|
|
12052
|
+
const Np = (n, e = !1, t = {}) => ({ tr: r, editor: i, dispatch: s }) => {
|
|
12067
12053
|
const { doc: o } = r, l = Na(n, i.schema, t);
|
|
12068
12054
|
return s && r.replaceWith(0, o.content.size, l).setMeta("preventUpdate", !e), !0;
|
|
12069
12055
|
};
|
|
@@ -12075,7 +12061,7 @@ function Da(n, e) {
|
|
|
12075
12061
|
});
|
|
12076
12062
|
}), t;
|
|
12077
12063
|
}
|
|
12078
|
-
function
|
|
12064
|
+
function Dp(n) {
|
|
12079
12065
|
for (let e = 0; e < n.edgeCount; e += 1) {
|
|
12080
12066
|
const { type: t } = n.edge(e);
|
|
12081
12067
|
if (t.isTextblock && !t.hasRequiredAttrs())
|
|
@@ -12092,7 +12078,7 @@ function Ia(n, e, t) {
|
|
|
12092
12078
|
});
|
|
12093
12079
|
}), r;
|
|
12094
12080
|
}
|
|
12095
|
-
function
|
|
12081
|
+
function Ip(n, e) {
|
|
12096
12082
|
for (let t = n.depth; t > 0; t -= 1) {
|
|
12097
12083
|
const r = n.node(t);
|
|
12098
12084
|
if (e(r))
|
|
@@ -12105,13 +12091,13 @@ function Pp(n, e) {
|
|
|
12105
12091
|
}
|
|
12106
12092
|
}
|
|
12107
12093
|
function fs(n) {
|
|
12108
|
-
return (e) =>
|
|
12094
|
+
return (e) => Ip(e.$from, n);
|
|
12109
12095
|
}
|
|
12110
|
-
function
|
|
12096
|
+
function Rp(n, e) {
|
|
12111
12097
|
const t = Ne.fromSchema(e).serializeFragment(n), i = document.implementation.createHTMLDocument().createElement("div");
|
|
12112
12098
|
return i.appendChild(t), i.innerHTML;
|
|
12113
12099
|
}
|
|
12114
|
-
function
|
|
12100
|
+
function Pp(n, e) {
|
|
12115
12101
|
const t = {
|
|
12116
12102
|
from: 0,
|
|
12117
12103
|
to: n.content.size
|
|
@@ -12126,7 +12112,7 @@ function zr(n, e) {
|
|
|
12126
12112
|
const l = o.find((a) => a.type.name === t.name);
|
|
12127
12113
|
return l ? { ...l.attrs } : {};
|
|
12128
12114
|
}
|
|
12129
|
-
function
|
|
12115
|
+
function Lp(n, e) {
|
|
12130
12116
|
const t = W(e, n.schema), { from: r, to: i } = n.selection, s = [];
|
|
12131
12117
|
n.doc.nodesBetween(r, i, (l) => {
|
|
12132
12118
|
s.push(l);
|
|
@@ -12136,17 +12122,17 @@ function _p(n, e) {
|
|
|
12136
12122
|
}
|
|
12137
12123
|
function Ra(n, e) {
|
|
12138
12124
|
const t = Fr(typeof e == "string" ? e : e.name, n.schema);
|
|
12139
|
-
return t === "node" ?
|
|
12125
|
+
return t === "node" ? Lp(n, e) : t === "mark" ? zr(n, e) : {};
|
|
12140
12126
|
}
|
|
12141
|
-
function
|
|
12127
|
+
function Bp(n, e = JSON.stringify) {
|
|
12142
12128
|
const t = {};
|
|
12143
12129
|
return n.filter((r) => {
|
|
12144
12130
|
const i = e(r);
|
|
12145
12131
|
return Object.prototype.hasOwnProperty.call(t, i) ? !1 : t[i] = !0;
|
|
12146
12132
|
});
|
|
12147
12133
|
}
|
|
12148
|
-
function
|
|
12149
|
-
const e =
|
|
12134
|
+
function _p(n) {
|
|
12135
|
+
const e = Bp(n);
|
|
12150
12136
|
return e.length === 1 ? e : e.filter((t, r) => !e.filter((s, o) => o !== r).some((s) => t.oldRange.from >= s.oldRange.from && t.oldRange.to <= s.oldRange.to && t.newRange.from >= s.newRange.from && t.newRange.to <= s.newRange.to));
|
|
12151
12137
|
}
|
|
12152
12138
|
function Pa(n) {
|
|
@@ -12176,7 +12162,7 @@ function Pa(n) {
|
|
|
12176
12162
|
}
|
|
12177
12163
|
});
|
|
12178
12164
|
});
|
|
12179
|
-
}),
|
|
12165
|
+
}), _p(r);
|
|
12180
12166
|
}
|
|
12181
12167
|
function Hr(n, e, t) {
|
|
12182
12168
|
const r = [];
|
|
@@ -12223,7 +12209,7 @@ function Li(n, e, t = {}) {
|
|
|
12223
12209
|
const a = l.filter((u) => s ? s.name === u.mark.type.name : !0).filter((u) => Kn(u.mark.attrs, t, { strict: !1 })).reduce((u, h) => u + h.to - h.from, 0), c = l.filter((u) => s ? u.mark.type !== s && u.mark.type.excludes(s) : !0).reduce((u, h) => u + h.to - h.from, 0);
|
|
12224
12210
|
return (a > 0 ? a + c : a) >= o;
|
|
12225
12211
|
}
|
|
12226
|
-
function
|
|
12212
|
+
function Fp(n, e, t = {}) {
|
|
12227
12213
|
if (!e)
|
|
12228
12214
|
return pn(n, null, t) || Li(n, null, t);
|
|
12229
12215
|
const r = Fr(e, n.schema);
|
|
@@ -12240,12 +12226,12 @@ function Io(n, e) {
|
|
|
12240
12226
|
}, s = A(C(r, "group", i));
|
|
12241
12227
|
return typeof s != "string" ? !1 : s.split(" ").includes("list");
|
|
12242
12228
|
}
|
|
12243
|
-
function
|
|
12229
|
+
function zp(n) {
|
|
12244
12230
|
var e;
|
|
12245
12231
|
const t = (e = n.type.createAndFill()) === null || e === void 0 ? void 0 : e.toJSON(), r = n.toJSON();
|
|
12246
12232
|
return JSON.stringify(t) === JSON.stringify(r);
|
|
12247
12233
|
}
|
|
12248
|
-
function
|
|
12234
|
+
function Hp(n) {
|
|
12249
12235
|
return n instanceof w;
|
|
12250
12236
|
}
|
|
12251
12237
|
function La(n, e, t) {
|
|
@@ -12264,7 +12250,7 @@ function La(n, e, t) {
|
|
|
12264
12250
|
toJSON: () => y
|
|
12265
12251
|
};
|
|
12266
12252
|
}
|
|
12267
|
-
function
|
|
12253
|
+
function Vp(n, e, t) {
|
|
12268
12254
|
var r;
|
|
12269
12255
|
const { selection: i } = e;
|
|
12270
12256
|
let s = null;
|
|
@@ -12286,7 +12272,7 @@ function jp(n, e, t) {
|
|
|
12286
12272
|
}), c;
|
|
12287
12273
|
});
|
|
12288
12274
|
}
|
|
12289
|
-
const
|
|
12275
|
+
const $p = (n, e = {}) => ({ tr: t, state: r, dispatch: i }) => {
|
|
12290
12276
|
const { selection: s } = t, { empty: o, ranges: l } = s, a = st(n, r.schema);
|
|
12291
12277
|
if (i)
|
|
12292
12278
|
if (o) {
|
|
@@ -12308,25 +12294,25 @@ const qp = (n, e = {}) => ({ tr: t, state: r, dispatch: i }) => {
|
|
|
12308
12294
|
}) : t.addMark(p, m, a.create(e));
|
|
12309
12295
|
});
|
|
12310
12296
|
});
|
|
12311
|
-
return
|
|
12312
|
-
},
|
|
12297
|
+
return Vp(r, t, a);
|
|
12298
|
+
}, jp = (n, e) => ({ tr: t }) => (t.setMeta(n, e), !0), qp = (n, e = {}) => ({ state: t, dispatch: r, chain: i }) => {
|
|
12313
12299
|
const s = W(n, t.schema);
|
|
12314
12300
|
return s.isTextblock ? i().command(({ commands: o }) => wo(s, e)(t) ? !0 : o.clearNodes()).command(({ state: o }) => wo(s, e)(o, r)).run() : (console.warn('[tiptap warn]: Currently "setNode()" only supports text block nodes.'), !1);
|
|
12315
|
-
},
|
|
12301
|
+
}, Kp = (n) => ({ tr: e, dispatch: t }) => {
|
|
12316
12302
|
if (t) {
|
|
12317
12303
|
const { doc: r } = e, i = _e(n, 0, r.content.size), s = w.create(r, i);
|
|
12318
12304
|
e.setSelection(s);
|
|
12319
12305
|
}
|
|
12320
12306
|
return !0;
|
|
12321
|
-
},
|
|
12307
|
+
}, Wp = (n) => ({ tr: e, dispatch: t }) => {
|
|
12322
12308
|
if (t) {
|
|
12323
12309
|
const { doc: r } = e, { from: i, to: s } = typeof n == "number" ? { from: n, to: n } : n, o = D.atStart(r).from, l = D.atEnd(r).to, a = _e(i, o, l), c = _e(s, o, l), d = D.create(r, a, c);
|
|
12324
12310
|
e.setSelection(d);
|
|
12325
12311
|
}
|
|
12326
12312
|
return !0;
|
|
12327
|
-
},
|
|
12313
|
+
}, Up = (n) => ({ state: e, dispatch: t }) => {
|
|
12328
12314
|
const r = W(n, e.schema);
|
|
12329
|
-
return
|
|
12315
|
+
return Df(r)(e, t);
|
|
12330
12316
|
};
|
|
12331
12317
|
function Ro(n, e) {
|
|
12332
12318
|
const t = n.storedMarks || n.selection.$to.parentOffset && n.selection.$from.marks();
|
|
@@ -12335,7 +12321,7 @@ function Ro(n, e) {
|
|
|
12335
12321
|
n.tr.ensureMarks(r);
|
|
12336
12322
|
}
|
|
12337
12323
|
}
|
|
12338
|
-
const
|
|
12324
|
+
const Jp = ({ keepMarks: n = !0 } = {}) => ({ tr: e, state: t, dispatch: r, editor: i }) => {
|
|
12339
12325
|
const { selection: s, doc: o } = e, { $from: l, $to: a } = s, c = i.extensionManager.attributes, d = Nn(c, l.node().type.name, l.node().attrs);
|
|
12340
12326
|
if (s instanceof w && s.node.isBlock)
|
|
12341
12327
|
return !l.parentOffset || !Rt(o, l.pos) ? !1 : (r && (n && Ro(t, i.extensionManager.splittableMarks), e.split(l.pos).scrollIntoView()), !0);
|
|
@@ -12344,7 +12330,7 @@ const Yp = ({ keepMarks: n = !0 } = {}) => ({ tr: e, state: t, dispatch: r, edit
|
|
|
12344
12330
|
if (r) {
|
|
12345
12331
|
const u = a.parentOffset === a.parent.content.size;
|
|
12346
12332
|
s instanceof D && e.deleteSelection();
|
|
12347
|
-
const h = l.depth === 0 ? void 0 :
|
|
12333
|
+
const h = l.depth === 0 ? void 0 : Dp(l.node(-1).contentMatchAt(l.indexAfter(-1)));
|
|
12348
12334
|
let f = u && h ? [
|
|
12349
12335
|
{
|
|
12350
12336
|
type: h,
|
|
@@ -12363,7 +12349,7 @@ const Yp = ({ keepMarks: n = !0 } = {}) => ({ tr: e, state: t, dispatch: r, edit
|
|
|
12363
12349
|
n && Ro(t, i.extensionManager.splittableMarks), e.scrollIntoView();
|
|
12364
12350
|
}
|
|
12365
12351
|
return !0;
|
|
12366
|
-
},
|
|
12352
|
+
}, Gp = (n) => ({ tr: e, state: t, dispatch: r, editor: i }) => {
|
|
12367
12353
|
var s;
|
|
12368
12354
|
const o = W(n, t.schema), { $from: l, $to: a } = t.selection, c = t.selection.node;
|
|
12369
12355
|
if (c && c.isBlock || l.depth < 2 || !l.sameParent(a))
|
|
@@ -12427,7 +12413,7 @@ const Yp = ({ keepMarks: n = !0 } = {}) => ({ tr: e, state: t, dispatch: r, edit
|
|
|
12427
12413
|
return !0;
|
|
12428
12414
|
const i = n.doc.nodeAt(r);
|
|
12429
12415
|
return t.node.type === (i == null ? void 0 : i.type) && rt(n.doc, r) && n.join(r), !0;
|
|
12430
|
-
},
|
|
12416
|
+
}, Yp = (n, e, t, r = {}) => ({ editor: i, tr: s, state: o, dispatch: l, chain: a, commands: c, can: d }) => {
|
|
12431
12417
|
const { extensions: u, splittableMarks: h } = i.extensionManager, f = W(n, o.schema), p = W(e, o.schema), { selection: m, storedMarks: g } = o, { $from: y, $to: x } = m, T = y.blockRange(x), R = g || m.$to.parentOffset && m.$from.marks();
|
|
12432
12418
|
if (!T)
|
|
12433
12419
|
return !1;
|
|
@@ -12442,16 +12428,16 @@ const Yp = ({ keepMarks: n = !0 } = {}) => ({ tr: e, state: t, dispatch: r, edit
|
|
|
12442
12428
|
const E = d().wrapInList(f, r), L = R.filter((I) => h.includes(I.type.name));
|
|
12443
12429
|
return s.ensureMarks(L), E ? !0 : c.clearNodes();
|
|
12444
12430
|
}).wrapInList(f, r).command(() => di(s, f)).command(() => ui(s, f)).run();
|
|
12445
|
-
},
|
|
12431
|
+
}, Xp = (n, e = {}, t = {}) => ({ state: r, commands: i }) => {
|
|
12446
12432
|
const { extendEmptyMarkRange: s = !1 } = t, o = st(n, r.schema);
|
|
12447
12433
|
return Li(r, o, e) ? i.unsetMark(o, { extendEmptyMarkRange: s }) : i.setMark(o, e);
|
|
12448
|
-
},
|
|
12434
|
+
}, Qp = (n, e, t = {}) => ({ state: r, commands: i }) => {
|
|
12449
12435
|
const s = W(n, r.schema), o = W(e, r.schema);
|
|
12450
12436
|
return pn(r, s, t) ? i.setNode(o) : i.setNode(s, t);
|
|
12451
|
-
},
|
|
12437
|
+
}, Zp = (n, e = {}) => ({ state: t, commands: r }) => {
|
|
12452
12438
|
const i = W(n, t.schema);
|
|
12453
12439
|
return pn(t, i, e) ? r.lift(i) : r.wrapIn(i, e);
|
|
12454
|
-
},
|
|
12440
|
+
}, em = () => ({ state: n, dispatch: e }) => {
|
|
12455
12441
|
const t = n.plugins;
|
|
12456
12442
|
for (let r = 0; r < t.length; r += 1) {
|
|
12457
12443
|
const i = t[r];
|
|
@@ -12471,12 +12457,12 @@ const Yp = ({ keepMarks: n = !0 } = {}) => ({ tr: e, state: t, dispatch: r, edit
|
|
|
12471
12457
|
}
|
|
12472
12458
|
}
|
|
12473
12459
|
return !1;
|
|
12474
|
-
},
|
|
12460
|
+
}, tm = () => ({ tr: n, dispatch: e }) => {
|
|
12475
12461
|
const { selection: t } = n, { empty: r, ranges: i } = t;
|
|
12476
12462
|
return r || e && i.forEach((s) => {
|
|
12477
12463
|
n.removeMark(s.$from.pos, s.$to.pos);
|
|
12478
12464
|
}), !0;
|
|
12479
|
-
},
|
|
12465
|
+
}, nm = (n, e = {}) => ({ tr: t, state: r, dispatch: i }) => {
|
|
12480
12466
|
var s;
|
|
12481
12467
|
const { extendEmptyMarkRange: o = !1 } = e, { selection: l } = t, a = st(n, r.schema), { $from: c, empty: d, ranges: u } = l;
|
|
12482
12468
|
if (!i)
|
|
@@ -12490,7 +12476,7 @@ const Yp = ({ keepMarks: n = !0 } = {}) => ({ tr: e, state: t, dispatch: r, edit
|
|
|
12490
12476
|
t.removeMark(h.$from.pos, h.$to.pos, a);
|
|
12491
12477
|
});
|
|
12492
12478
|
return t.removeStoredMark(a), !0;
|
|
12493
|
-
},
|
|
12479
|
+
}, rm = (n, e = {}) => ({ tr: t, state: r, dispatch: i }) => {
|
|
12494
12480
|
let s = null, o = null;
|
|
12495
12481
|
const l = Fr(typeof n == "string" ? n : n.name, r.schema);
|
|
12496
12482
|
return l ? (l === "node" && (s = W(n, r.schema)), l === "mark" && (o = st(n, r.schema)), i && t.selection.ranges.forEach((a) => {
|
|
@@ -12510,77 +12496,77 @@ const Yp = ({ keepMarks: n = !0 } = {}) => ({ tr: e, state: t, dispatch: r, edit
|
|
|
12510
12496
|
});
|
|
12511
12497
|
});
|
|
12512
12498
|
}), !0) : !1;
|
|
12513
|
-
},
|
|
12499
|
+
}, im = (n, e = {}) => ({ state: t, dispatch: r }) => {
|
|
12514
12500
|
const i = W(n, t.schema);
|
|
12515
|
-
return
|
|
12516
|
-
},
|
|
12501
|
+
return Mf(i, e)(t, r);
|
|
12502
|
+
}, sm = (n, e = {}) => ({ state: t, dispatch: r }) => {
|
|
12517
12503
|
const i = W(n, t.schema);
|
|
12518
|
-
return
|
|
12504
|
+
return wf(i, e)(t, r);
|
|
12519
12505
|
};
|
|
12520
|
-
var
|
|
12506
|
+
var om = /* @__PURE__ */ Object.freeze({
|
|
12521
12507
|
__proto__: null,
|
|
12522
|
-
blur:
|
|
12523
|
-
clearContent:
|
|
12524
|
-
clearNodes:
|
|
12525
|
-
command:
|
|
12526
|
-
createParagraphNear:
|
|
12527
|
-
deleteCurrentNode:
|
|
12528
|
-
deleteNode:
|
|
12529
|
-
deleteRange:
|
|
12530
|
-
deleteSelection:
|
|
12531
|
-
enter:
|
|
12532
|
-
exitCode:
|
|
12533
|
-
extendMarkRange:
|
|
12534
|
-
first:
|
|
12535
|
-
focus:
|
|
12536
|
-
forEach:
|
|
12537
|
-
insertContent:
|
|
12538
|
-
insertContentAt:
|
|
12539
|
-
joinUp:
|
|
12540
|
-
joinDown:
|
|
12541
|
-
joinBackward:
|
|
12542
|
-
joinForward:
|
|
12543
|
-
keyboardShortcut:
|
|
12544
|
-
lift:
|
|
12545
|
-
liftEmptyBlock:
|
|
12546
|
-
liftListItem:
|
|
12547
|
-
newlineInCode:
|
|
12548
|
-
resetAttributes:
|
|
12549
|
-
scrollIntoView:
|
|
12550
|
-
selectAll:
|
|
12551
|
-
selectNodeBackward:
|
|
12552
|
-
selectNodeForward:
|
|
12553
|
-
selectParentNode:
|
|
12554
|
-
selectTextblockEnd:
|
|
12555
|
-
selectTextblockStart:
|
|
12556
|
-
setContent:
|
|
12557
|
-
setMark:
|
|
12558
|
-
setMeta:
|
|
12559
|
-
setNode:
|
|
12560
|
-
setNodeSelection:
|
|
12561
|
-
setTextSelection:
|
|
12562
|
-
sinkListItem:
|
|
12563
|
-
splitBlock:
|
|
12564
|
-
splitListItem:
|
|
12565
|
-
toggleList:
|
|
12566
|
-
toggleMark:
|
|
12567
|
-
toggleNode:
|
|
12568
|
-
toggleWrap:
|
|
12569
|
-
undoInputRule:
|
|
12570
|
-
unsetAllMarks:
|
|
12571
|
-
unsetMark:
|
|
12572
|
-
updateAttributes:
|
|
12573
|
-
wrapIn:
|
|
12574
|
-
wrapInList:
|
|
12508
|
+
blur: Wf,
|
|
12509
|
+
clearContent: Uf,
|
|
12510
|
+
clearNodes: Jf,
|
|
12511
|
+
command: Gf,
|
|
12512
|
+
createParagraphNear: Yf,
|
|
12513
|
+
deleteCurrentNode: Xf,
|
|
12514
|
+
deleteNode: Qf,
|
|
12515
|
+
deleteRange: Zf,
|
|
12516
|
+
deleteSelection: ep,
|
|
12517
|
+
enter: tp,
|
|
12518
|
+
exitCode: np,
|
|
12519
|
+
extendMarkRange: ip,
|
|
12520
|
+
first: sp,
|
|
12521
|
+
focus: op,
|
|
12522
|
+
forEach: lp,
|
|
12523
|
+
insertContent: ap,
|
|
12524
|
+
insertContentAt: up,
|
|
12525
|
+
joinUp: hp,
|
|
12526
|
+
joinDown: fp,
|
|
12527
|
+
joinBackward: pp,
|
|
12528
|
+
joinForward: mp,
|
|
12529
|
+
keyboardShortcut: yp,
|
|
12530
|
+
lift: bp,
|
|
12531
|
+
liftEmptyBlock: kp,
|
|
12532
|
+
liftListItem: Sp,
|
|
12533
|
+
newlineInCode: xp,
|
|
12534
|
+
resetAttributes: Cp,
|
|
12535
|
+
scrollIntoView: Ep,
|
|
12536
|
+
selectAll: Tp,
|
|
12537
|
+
selectNodeBackward: Mp,
|
|
12538
|
+
selectNodeForward: wp,
|
|
12539
|
+
selectParentNode: Op,
|
|
12540
|
+
selectTextblockEnd: vp,
|
|
12541
|
+
selectTextblockStart: Ap,
|
|
12542
|
+
setContent: Np,
|
|
12543
|
+
setMark: $p,
|
|
12544
|
+
setMeta: jp,
|
|
12545
|
+
setNode: qp,
|
|
12546
|
+
setNodeSelection: Kp,
|
|
12547
|
+
setTextSelection: Wp,
|
|
12548
|
+
sinkListItem: Up,
|
|
12549
|
+
splitBlock: Jp,
|
|
12550
|
+
splitListItem: Gp,
|
|
12551
|
+
toggleList: Yp,
|
|
12552
|
+
toggleMark: Xp,
|
|
12553
|
+
toggleNode: Qp,
|
|
12554
|
+
toggleWrap: Zp,
|
|
12555
|
+
undoInputRule: em,
|
|
12556
|
+
unsetAllMarks: tm,
|
|
12557
|
+
unsetMark: nm,
|
|
12558
|
+
updateAttributes: rm,
|
|
12559
|
+
wrapIn: im,
|
|
12560
|
+
wrapInList: sm
|
|
12575
12561
|
});
|
|
12576
|
-
const
|
|
12562
|
+
const lm = ge.create({
|
|
12577
12563
|
name: "commands",
|
|
12578
12564
|
addCommands() {
|
|
12579
12565
|
return {
|
|
12580
|
-
...
|
|
12566
|
+
...om
|
|
12581
12567
|
};
|
|
12582
12568
|
}
|
|
12583
|
-
}),
|
|
12569
|
+
}), am = ge.create({
|
|
12584
12570
|
name: "editable",
|
|
12585
12571
|
addProseMirrorPlugins() {
|
|
12586
12572
|
return [
|
|
@@ -12592,7 +12578,7 @@ const cm = ge.create({
|
|
|
12592
12578
|
})
|
|
12593
12579
|
];
|
|
12594
12580
|
}
|
|
12595
|
-
}),
|
|
12581
|
+
}), cm = ge.create({
|
|
12596
12582
|
name: "focusEvents",
|
|
12597
12583
|
addProseMirrorPlugins() {
|
|
12598
12584
|
const { editor: n } = this;
|
|
@@ -12616,7 +12602,7 @@ const cm = ge.create({
|
|
|
12616
12602
|
})
|
|
12617
12603
|
];
|
|
12618
12604
|
}
|
|
12619
|
-
}),
|
|
12605
|
+
}), dm = ge.create({
|
|
12620
12606
|
name: "keymap",
|
|
12621
12607
|
addKeyboardShortcuts() {
|
|
12622
12608
|
const n = () => this.editor.commands.first(({ commands: o }) => [
|
|
@@ -12691,7 +12677,7 @@ const cm = ge.create({
|
|
|
12691
12677
|
})
|
|
12692
12678
|
];
|
|
12693
12679
|
}
|
|
12694
|
-
}),
|
|
12680
|
+
}), um = ge.create({
|
|
12695
12681
|
name: "tabindex",
|
|
12696
12682
|
addProseMirrorPlugins() {
|
|
12697
12683
|
return [
|
|
@@ -12704,16 +12690,16 @@ const cm = ge.create({
|
|
|
12704
12690
|
];
|
|
12705
12691
|
}
|
|
12706
12692
|
});
|
|
12707
|
-
var
|
|
12693
|
+
var hm = /* @__PURE__ */ Object.freeze({
|
|
12708
12694
|
__proto__: null,
|
|
12709
|
-
ClipboardTextSerializer:
|
|
12710
|
-
Commands:
|
|
12711
|
-
Editable:
|
|
12712
|
-
FocusEvents:
|
|
12713
|
-
Keymap:
|
|
12714
|
-
Tabindex:
|
|
12695
|
+
ClipboardTextSerializer: Kf,
|
|
12696
|
+
Commands: lm,
|
|
12697
|
+
Editable: am,
|
|
12698
|
+
FocusEvents: cm,
|
|
12699
|
+
Keymap: dm,
|
|
12700
|
+
Tabindex: um
|
|
12715
12701
|
});
|
|
12716
|
-
const
|
|
12702
|
+
const fm = `.ProseMirror {
|
|
12717
12703
|
position: relative;
|
|
12718
12704
|
}
|
|
12719
12705
|
|
|
@@ -12788,14 +12774,14 @@ img.ProseMirror-separator {
|
|
|
12788
12774
|
.tippy-box[data-animation=fade][data-state=hidden] {
|
|
12789
12775
|
opacity: 0
|
|
12790
12776
|
}`;
|
|
12791
|
-
function
|
|
12777
|
+
function pm(n, e) {
|
|
12792
12778
|
const t = document.querySelector("style[data-tiptap-style]");
|
|
12793
12779
|
if (t !== null)
|
|
12794
12780
|
return t;
|
|
12795
12781
|
const r = document.createElement("style");
|
|
12796
12782
|
return e && r.setAttribute("nonce", e), r.setAttribute("data-tiptap-style", ""), r.innerHTML = n, document.getElementsByTagName("head")[0].appendChild(r), r;
|
|
12797
12783
|
}
|
|
12798
|
-
let
|
|
12784
|
+
let mm = class extends If {
|
|
12799
12785
|
constructor(e = {}) {
|
|
12800
12786
|
super(), this.isFocused = !1, this.extensionStorage = {}, this.options = {
|
|
12801
12787
|
element: document.createElement("div"),
|
|
@@ -12850,7 +12836,7 @@ let ym = class extends Pf {
|
|
|
12850
12836
|
* Inject CSS styles.
|
|
12851
12837
|
*/
|
|
12852
12838
|
injectCSS() {
|
|
12853
|
-
this.options.injectCSS && document && (this.css =
|
|
12839
|
+
this.options.injectCSS && document && (this.css = pm(fm, this.options.injectNonce));
|
|
12854
12840
|
}
|
|
12855
12841
|
/**
|
|
12856
12842
|
* Update editor options.
|
|
@@ -12909,7 +12895,7 @@ let ym = class extends Pf {
|
|
|
12909
12895
|
* Creates an extension manager.
|
|
12910
12896
|
*/
|
|
12911
12897
|
createExtensionManager() {
|
|
12912
|
-
const t = [...this.options.enableCoreExtensions ? Object.values(
|
|
12898
|
+
const t = [...this.options.enableCoreExtensions ? Object.values(hm) : [], ...this.options.extensions].filter((r) => ["extension", "node", "mark"].includes(r == null ? void 0 : r.type));
|
|
12913
12899
|
this.extensionManager = new It(t, this);
|
|
12914
12900
|
}
|
|
12915
12901
|
/**
|
|
@@ -12931,7 +12917,7 @@ let ym = class extends Pf {
|
|
|
12931
12917
|
*/
|
|
12932
12918
|
createView() {
|
|
12933
12919
|
const e = Na(this.options.content, this.schema, this.options.parseOptions), t = Aa(e, this.options.autofocus);
|
|
12934
|
-
this.view = new
|
|
12920
|
+
this.view = new Gh(this.options.element, {
|
|
12935
12921
|
...this.options.editorProps,
|
|
12936
12922
|
dispatchTransaction: this.dispatchTransaction.bind(this),
|
|
12937
12923
|
state: Dt.create({
|
|
@@ -13008,7 +12994,7 @@ let ym = class extends Pf {
|
|
|
13008
12994
|
}
|
|
13009
12995
|
isActive(e, t) {
|
|
13010
12996
|
const r = typeof e == "string" ? e : null, i = typeof e == "string" ? t : e;
|
|
13011
|
-
return
|
|
12997
|
+
return Fp(this.state, r, i);
|
|
13012
12998
|
}
|
|
13013
12999
|
/**
|
|
13014
13000
|
* Get the document as JSON.
|
|
@@ -13020,7 +13006,7 @@ let ym = class extends Pf {
|
|
|
13020
13006
|
* Get the document as HTML.
|
|
13021
13007
|
*/
|
|
13022
13008
|
getHTML() {
|
|
13023
|
-
return
|
|
13009
|
+
return Rp(this.state.doc.content, this.schema);
|
|
13024
13010
|
}
|
|
13025
13011
|
/**
|
|
13026
13012
|
* Get the document as text.
|
|
@@ -13029,7 +13015,7 @@ let ym = class extends Pf {
|
|
|
13029
13015
|
const { blockSeparator: t = `
|
|
13030
13016
|
|
|
13031
13017
|
`, textSerializers: r = {} } = e || {};
|
|
13032
|
-
return
|
|
13018
|
+
return Pp(this.state.doc, {
|
|
13033
13019
|
blockSeparator: t,
|
|
13034
13020
|
textSerializers: {
|
|
13035
13021
|
...va(this.schema),
|
|
@@ -13041,7 +13027,7 @@ let ym = class extends Pf {
|
|
|
13041
13027
|
* Check if there is no content.
|
|
13042
13028
|
*/
|
|
13043
13029
|
get isEmpty() {
|
|
13044
|
-
return
|
|
13030
|
+
return zp(this.state.doc);
|
|
13045
13031
|
}
|
|
13046
13032
|
/**
|
|
13047
13033
|
* Get the number of characters for the current document.
|
|
@@ -13215,7 +13201,7 @@ class ne {
|
|
|
13215
13201
|
})), t;
|
|
13216
13202
|
}
|
|
13217
13203
|
}
|
|
13218
|
-
class
|
|
13204
|
+
class gm {
|
|
13219
13205
|
constructor(e, t, r) {
|
|
13220
13206
|
this.isDragging = !1, this.component = e, this.editor = t.editor, this.options = {
|
|
13221
13207
|
stopEvent: null,
|
|
@@ -13310,7 +13296,7 @@ function Ht(n) {
|
|
|
13310
13296
|
}
|
|
13311
13297
|
});
|
|
13312
13298
|
}
|
|
13313
|
-
function
|
|
13299
|
+
function ym(n) {
|
|
13314
13300
|
return n.replace(/[-/\\^$*+?.()|[\]{}]/g, "\\$&");
|
|
13315
13301
|
}
|
|
13316
13302
|
function Bo(n) {
|
|
@@ -13327,7 +13313,7 @@ function Bo(n) {
|
|
|
13327
13313
|
}
|
|
13328
13314
|
});
|
|
13329
13315
|
}
|
|
13330
|
-
class
|
|
13316
|
+
class bm {
|
|
13331
13317
|
constructor({ editor: e, element: t, view: r, tippyOptions: i = {}, updateDelay: s = 250, shouldShow: o }) {
|
|
13332
13318
|
this.preventHide = !1, this.shouldShow = ({ view: l, state: a, from: c, to: d }) => {
|
|
13333
13319
|
const { doc: u, selection: h } = a, { empty: f } = h, p = !u.textBetween(c, d).length && us(a.selection), m = this.element.contains(document.activeElement);
|
|
@@ -13372,7 +13358,7 @@ class Sm {
|
|
|
13372
13358
|
}
|
|
13373
13359
|
(h = this.tippy) === null || h === void 0 || h.setProps({
|
|
13374
13360
|
getReferenceClientRect: ((f = this.tippyOptions) === null || f === void 0 ? void 0 : f.getReferenceClientRect) || (() => {
|
|
13375
|
-
if (
|
|
13361
|
+
if (Hp(p.selection)) {
|
|
13376
13362
|
let E = l.nodeDOM(T);
|
|
13377
13363
|
const L = E.dataset.nodeViewWrapper ? E : E.querySelector("[data-node-view-wrapper]");
|
|
13378
13364
|
if (L && (E = L.firstChild), E)
|
|
@@ -13420,7 +13406,7 @@ class Sm {
|
|
|
13420
13406
|
}
|
|
13421
13407
|
const Ba = (n) => new Q({
|
|
13422
13408
|
key: typeof n.pluginKey == "string" ? new ie(n.pluginKey) : n.pluginKey,
|
|
13423
|
-
view: (e) => new
|
|
13409
|
+
view: (e) => new bm({ view: e, ...n })
|
|
13424
13410
|
});
|
|
13425
13411
|
ge.create({
|
|
13426
13412
|
name: "bubbleMenu",
|
|
@@ -13446,7 +13432,7 @@ ge.create({
|
|
|
13446
13432
|
] : [];
|
|
13447
13433
|
}
|
|
13448
13434
|
});
|
|
13449
|
-
class
|
|
13435
|
+
class km {
|
|
13450
13436
|
constructor({ editor: e, element: t, view: r, tippyOptions: i = {}, shouldShow: s }) {
|
|
13451
13437
|
this.preventHide = !1, this.shouldShow = ({ view: o, state: l }) => {
|
|
13452
13438
|
const { selection: a } = l, { $anchor: c, empty: d } = a, u = c.depth === 1, h = c.parent.isTextblock && !c.parent.type.spec.code && !c.parent.textContent;
|
|
@@ -13512,7 +13498,7 @@ class xm {
|
|
|
13512
13498
|
}
|
|
13513
13499
|
const _a = (n) => new Q({
|
|
13514
13500
|
key: typeof n.pluginKey == "string" ? new ie(n.pluginKey) : n.pluginKey,
|
|
13515
|
-
view: (e) => new
|
|
13501
|
+
view: (e) => new km({ view: e, ...n })
|
|
13516
13502
|
});
|
|
13517
13503
|
ge.create({
|
|
13518
13504
|
name: "floatingMenu",
|
|
@@ -13582,7 +13568,7 @@ $t({
|
|
|
13582
13568
|
}
|
|
13583
13569
|
});
|
|
13584
13570
|
function _o(n) {
|
|
13585
|
-
return
|
|
13571
|
+
return Sc((e, t) => ({
|
|
13586
13572
|
get() {
|
|
13587
13573
|
return e(), n;
|
|
13588
13574
|
},
|
|
@@ -13595,7 +13581,7 @@ function _o(n) {
|
|
|
13595
13581
|
}
|
|
13596
13582
|
}));
|
|
13597
13583
|
}
|
|
13598
|
-
class
|
|
13584
|
+
class Sm extends mm {
|
|
13599
13585
|
constructor(e = {}) {
|
|
13600
13586
|
return super(e), this.vueRenderers = ll(/* @__PURE__ */ new Map()), this.contentComponent = null, this.reactiveState = _o(this.view.state), this.reactiveExtensionStorage = _o(this.extensionStorage), this.on("transaction", () => {
|
|
13601
13587
|
this.reactiveState.value = this.view.state, this.reactiveExtensionStorage.value = this.extensionStorage;
|
|
@@ -13620,7 +13606,7 @@ class Cm extends ym {
|
|
|
13620
13606
|
super.unregisterPlugin(e), this.reactiveState.value = this.view.state;
|
|
13621
13607
|
}
|
|
13622
13608
|
}
|
|
13623
|
-
const
|
|
13609
|
+
const xm = $t({
|
|
13624
13610
|
name: "EditorContent",
|
|
13625
13611
|
props: {
|
|
13626
13612
|
editor: {
|
|
@@ -13629,13 +13615,13 @@ const Em = $t({
|
|
|
13629
13615
|
}
|
|
13630
13616
|
},
|
|
13631
13617
|
setup(n) {
|
|
13632
|
-
const e = Mr(), t =
|
|
13633
|
-
return
|
|
13618
|
+
const e = Mr(), t = gc();
|
|
13619
|
+
return yc(() => {
|
|
13634
13620
|
const r = n.editor;
|
|
13635
|
-
r && r.options.element && e.value &&
|
|
13621
|
+
r && r.options.element && e.value && bc(() => {
|
|
13636
13622
|
if (!e.value || !r.options.element.firstChild)
|
|
13637
13623
|
return;
|
|
13638
|
-
const i =
|
|
13624
|
+
const i = kc(e.value);
|
|
13639
13625
|
e.value.append(...r.options.element.childNodes), r.contentComponent = t.ctx._, r.setOptions({
|
|
13640
13626
|
element: i
|
|
13641
13627
|
}), r.createNodeViews();
|
|
@@ -13807,7 +13793,7 @@ const za = {
|
|
|
13807
13793
|
required: !0
|
|
13808
13794
|
}
|
|
13809
13795
|
};
|
|
13810
|
-
class
|
|
13796
|
+
class Cm extends gm {
|
|
13811
13797
|
mount() {
|
|
13812
13798
|
const e = {
|
|
13813
13799
|
editor: this.editor,
|
|
@@ -13826,7 +13812,7 @@ class Tm extends bm {
|
|
|
13826
13812
|
template: this.component.template,
|
|
13827
13813
|
setup: (i) => {
|
|
13828
13814
|
var s, o;
|
|
13829
|
-
return
|
|
13815
|
+
return Ms("onDragStart", t), Ms("decorationClasses", this.decorationClasses), (o = (s = this.component).setup) === null || o === void 0 ? void 0 : o.call(s, i, {
|
|
13830
13816
|
expose: () => {
|
|
13831
13817
|
}
|
|
13832
13818
|
});
|
|
@@ -13894,9 +13880,9 @@ class Tm extends bm {
|
|
|
13894
13880
|
}
|
|
13895
13881
|
}
|
|
13896
13882
|
function Ha(n, e) {
|
|
13897
|
-
return (t) => t.editor.contentComponent ? new
|
|
13883
|
+
return (t) => t.editor.contentComponent ? new Cm(n, t, e) : {};
|
|
13898
13884
|
}
|
|
13899
|
-
const
|
|
13885
|
+
const Em = /^\s*>\s$/, Tm = ne.create({
|
|
13900
13886
|
name: "blockquote",
|
|
13901
13887
|
addOptions() {
|
|
13902
13888
|
return {
|
|
@@ -13929,12 +13915,12 @@ const Mm = /^\s*>\s$/, wm = ne.create({
|
|
|
13929
13915
|
addInputRules() {
|
|
13930
13916
|
return [
|
|
13931
13917
|
gn({
|
|
13932
|
-
find:
|
|
13918
|
+
find: Em,
|
|
13933
13919
|
type: this.type
|
|
13934
13920
|
})
|
|
13935
13921
|
];
|
|
13936
13922
|
}
|
|
13937
|
-
}),
|
|
13923
|
+
}), Mm = /^```([a-z]+)?[\s\n]$/, wm = /^~~~([a-z]+)?[\s\n]$/, Om = ne.create({
|
|
13938
13924
|
name: "codeBlock",
|
|
13939
13925
|
addOptions() {
|
|
13940
13926
|
return {
|
|
@@ -14024,14 +14010,14 @@ const Mm = /^\s*>\s$/, wm = ne.create({
|
|
|
14024
14010
|
addInputRules() {
|
|
14025
14011
|
return [
|
|
14026
14012
|
Lo({
|
|
14027
|
-
find:
|
|
14013
|
+
find: Mm,
|
|
14028
14014
|
type: this.type,
|
|
14029
14015
|
getAttributes: (n) => ({
|
|
14030
14016
|
language: n[1]
|
|
14031
14017
|
})
|
|
14032
14018
|
}),
|
|
14033
14019
|
Lo({
|
|
14034
|
-
find:
|
|
14020
|
+
find: wm,
|
|
14035
14021
|
type: this.type,
|
|
14036
14022
|
getAttributes: (n) => ({
|
|
14037
14023
|
language: n[1]
|
|
@@ -14060,11 +14046,11 @@ const Mm = /^\s*>\s$/, wm = ne.create({
|
|
|
14060
14046
|
})
|
|
14061
14047
|
];
|
|
14062
14048
|
}
|
|
14063
|
-
}),
|
|
14049
|
+
}), vm = ne.create({
|
|
14064
14050
|
name: "doc",
|
|
14065
14051
|
topNode: !0,
|
|
14066
14052
|
content: "block+"
|
|
14067
|
-
}),
|
|
14053
|
+
}), Am = ne.create({
|
|
14068
14054
|
name: "hardBreak",
|
|
14069
14055
|
addOptions() {
|
|
14070
14056
|
return {
|
|
@@ -14113,7 +14099,7 @@ const Mm = /^\s*>\s$/, wm = ne.create({
|
|
|
14113
14099
|
"Shift-Enter": () => this.editor.commands.setHardBreak()
|
|
14114
14100
|
};
|
|
14115
14101
|
}
|
|
14116
|
-
}),
|
|
14102
|
+
}), Nm = ne.create({
|
|
14117
14103
|
name: "paragraph",
|
|
14118
14104
|
priority: 1e3,
|
|
14119
14105
|
addOptions() {
|
|
@@ -14141,7 +14127,7 @@ const Mm = /^\s*>\s$/, wm = ne.create({
|
|
|
14141
14127
|
"Mod-Alt-0": () => this.editor.commands.setParagraph()
|
|
14142
14128
|
};
|
|
14143
14129
|
}
|
|
14144
|
-
}),
|
|
14130
|
+
}), Dm = ge.create({
|
|
14145
14131
|
name: "placeholder",
|
|
14146
14132
|
addOptions() {
|
|
14147
14133
|
return {
|
|
@@ -14186,7 +14172,7 @@ const Mm = /^\s*>\s$/, wm = ne.create({
|
|
|
14186
14172
|
})
|
|
14187
14173
|
];
|
|
14188
14174
|
}
|
|
14189
|
-
}),
|
|
14175
|
+
}), Im = /(?:^|\s)((?:\*\*)((?:[^*]+))(?:\*\*))$/, Rm = /(?:^|\s)((?:\*\*)((?:[^*]+))(?:\*\*))/g, Pm = /(?:^|\s)((?:__)((?:[^__]+))(?:__))$/, Lm = /(?:^|\s)((?:__)((?:[^__]+))(?:__))/g, Bm = xe.create({
|
|
14190
14176
|
name: "bold",
|
|
14191
14177
|
addOptions() {
|
|
14192
14178
|
return {
|
|
@@ -14227,11 +14213,11 @@ const Mm = /^\s*>\s$/, wm = ne.create({
|
|
|
14227
14213
|
addInputRules() {
|
|
14228
14214
|
return [
|
|
14229
14215
|
mn({
|
|
14230
|
-
find:
|
|
14216
|
+
find: Im,
|
|
14231
14217
|
type: this.type
|
|
14232
14218
|
}),
|
|
14233
14219
|
mn({
|
|
14234
|
-
find:
|
|
14220
|
+
find: Pm,
|
|
14235
14221
|
type: this.type
|
|
14236
14222
|
})
|
|
14237
14223
|
];
|
|
@@ -14239,16 +14225,16 @@ const Mm = /^\s*>\s$/, wm = ne.create({
|
|
|
14239
14225
|
addPasteRules() {
|
|
14240
14226
|
return [
|
|
14241
14227
|
Ht({
|
|
14242
|
-
find:
|
|
14228
|
+
find: Rm,
|
|
14243
14229
|
type: this.type
|
|
14244
14230
|
}),
|
|
14245
14231
|
Ht({
|
|
14246
|
-
find:
|
|
14232
|
+
find: Lm,
|
|
14247
14233
|
type: this.type
|
|
14248
14234
|
})
|
|
14249
14235
|
];
|
|
14250
14236
|
}
|
|
14251
|
-
}),
|
|
14237
|
+
}), _m = ne.create({
|
|
14252
14238
|
name: "listItem",
|
|
14253
14239
|
addOptions() {
|
|
14254
14240
|
return {
|
|
@@ -14302,7 +14288,7 @@ const Mm = /^\s*>\s$/, wm = ne.create({
|
|
|
14302
14288
|
}
|
|
14303
14289
|
};
|
|
14304
14290
|
}
|
|
14305
|
-
}), zo = /^\s*([-+*])\s$/,
|
|
14291
|
+
}), zo = /^\s*([-+*])\s$/, Fm = ne.create({
|
|
14306
14292
|
name: "bulletList",
|
|
14307
14293
|
addOptions() {
|
|
14308
14294
|
return {
|
|
@@ -14326,7 +14312,7 @@ const Mm = /^\s*>\s$/, wm = ne.create({
|
|
|
14326
14312
|
},
|
|
14327
14313
|
addCommands() {
|
|
14328
14314
|
return {
|
|
14329
|
-
toggleBulletList: () => ({ commands: n, chain: e }) => this.options.keepAttributes ? e().toggleList(this.name, this.options.itemTypeName, this.options.keepMarks).updateAttributes(
|
|
14315
|
+
toggleBulletList: () => ({ commands: n, chain: e }) => this.options.keepAttributes ? e().toggleList(this.name, this.options.itemTypeName, this.options.keepMarks).updateAttributes(_m.name, this.editor.getAttributes(Fo.name)).run() : n.toggleList(this.name, this.options.itemTypeName, this.options.keepMarks)
|
|
14330
14316
|
};
|
|
14331
14317
|
},
|
|
14332
14318
|
addKeyboardShortcuts() {
|
|
@@ -14350,7 +14336,7 @@ const Mm = /^\s*>\s$/, wm = ne.create({
|
|
|
14350
14336
|
n
|
|
14351
14337
|
];
|
|
14352
14338
|
}
|
|
14353
|
-
}),
|
|
14339
|
+
}), zm = /(?:^|\s)((?:\*)((?:[^*]+))(?:\*))$/, Hm = /(?:^|\s)((?:\*)((?:[^*]+))(?:\*))/g, Vm = /(?:^|\s)((?:_)((?:[^_]+))(?:_))$/, $m = /(?:^|\s)((?:_)((?:[^_]+))(?:_))/g, jm = xe.create({
|
|
14354
14340
|
name: "italic",
|
|
14355
14341
|
addOptions() {
|
|
14356
14342
|
return {
|
|
@@ -14390,11 +14376,11 @@ const Mm = /^\s*>\s$/, wm = ne.create({
|
|
|
14390
14376
|
addInputRules() {
|
|
14391
14377
|
return [
|
|
14392
14378
|
mn({
|
|
14393
|
-
find:
|
|
14379
|
+
find: zm,
|
|
14394
14380
|
type: this.type
|
|
14395
14381
|
}),
|
|
14396
14382
|
mn({
|
|
14397
|
-
find:
|
|
14383
|
+
find: Vm,
|
|
14398
14384
|
type: this.type
|
|
14399
14385
|
})
|
|
14400
14386
|
];
|
|
@@ -14402,31 +14388,31 @@ const Mm = /^\s*>\s$/, wm = ne.create({
|
|
|
14402
14388
|
addPasteRules() {
|
|
14403
14389
|
return [
|
|
14404
14390
|
Ht({
|
|
14405
|
-
find:
|
|
14391
|
+
find: Hm,
|
|
14406
14392
|
type: this.type
|
|
14407
14393
|
}),
|
|
14408
14394
|
Ht({
|
|
14409
|
-
find:
|
|
14395
|
+
find: $m,
|
|
14410
14396
|
type: this.type
|
|
14411
14397
|
})
|
|
14412
14398
|
];
|
|
14413
14399
|
}
|
|
14414
|
-
}),
|
|
14400
|
+
}), qm = "aaa1rp3bb0ott3vie4c1le2ogado5udhabi7c0ademy5centure6ountant0s9o1tor4d0s1ult4e0g1ro2tna4f0l1rica5g0akhan5ency5i0g1rbus3force5tel5kdn3l0ibaba4pay4lfinanz6state5y2sace3tom5m0azon4ericanexpress7family11x2fam3ica3sterdam8nalytics7droid5quan4z2o0l2partments8p0le4q0uarelle8r0ab1mco4chi3my2pa2t0e3s0da2ia2sociates9t0hleta5torney7u0ction5di0ble3o3spost5thor3o0s4vianca6w0s2x0a2z0ure5ba0by2idu3namex3narepublic11d1k2r0celona5laycard4s5efoot5gains6seball5ketball8uhaus5yern5b0c1t1va3cg1n2d1e0ats2uty4er2ntley5rlin4st0buy5t2f1g1h0arti5i0ble3d1ke2ng0o3o1z2j1lack0friday9ockbuster8g1omberg7ue3m0s1w2n0pparibas9o0ats3ehringer8fa2m1nd2o0k0ing5sch2tik2on4t1utique6x2r0adesco6idgestone9oadway5ker3ther5ussels7s1t1uild0ers6siness6y1zz3v1w1y1z0h3ca0b1fe2l0l1vinklein9m0era3p2non3petown5ital0one8r0avan4ds2e0er0s4s2sa1e1h1ino4t0ering5holic7ba1n1re3c1d1enter4o1rn3f0a1d2g1h0anel2nel4rity4se2t2eap3intai5ristmas6ome4urch5i0priani6rcle4sco3tadel4i0c2y3k1l0aims4eaning6ick2nic1que6othing5ud3ub0med6m1n1o0ach3des3ffee4llege4ogne5m0cast4mbank4unity6pany2re3uter5sec4ndos3struction8ulting7tact3ractors9oking4l1p2rsica5untry4pon0s4rses6pa2r0edit0card4union9icket5own3s1uise0s6u0isinella9v1w1x1y0mru3ou3z2dabur3d1nce3ta1e1ing3sun4y2clk3ds2e0al0er2s3gree4livery5l1oitte5ta3mocrat6ntal2ist5si0gn4v2hl2iamonds6et2gital5rect0ory7scount3ver5h2y2j1k1m1np2o0cs1tor4g1mains5t1wnload7rive4tv2ubai3nlop4pont4rban5vag2r2z2earth3t2c0o2deka3u0cation8e1g1mail3erck5nergy4gineer0ing9terprises10pson4quipment8r0icsson6ni3s0q1tate5t1u0rovision8s2vents5xchange6pert3osed4ress5traspace10fage2il1rwinds6th3mily4n0s2rm0ers5shion4t3edex3edback6rrari3ero6i0delity5o2lm2nal1nce1ial7re0stone6mdale6sh0ing5t0ness6j1k1lickr3ghts4r2orist4wers5y2m1o0o0d1tball6rd1ex2sale4um3undation8x2r0ee1senius7l1ogans4ntier7tr2ujitsu5n0d2rniture7tbol5yi3ga0l0lery3o1up4me0s3p1rden4y2b0iz3d0n2e0a1nt0ing5orge5f1g0ee3h1i0ft0s3ves2ing5l0ass3e1obal2o4m0ail3bh2o1x2n1odaddy5ld0point6f2o0dyear5g0le4p1t1v2p1q1r0ainger5phics5tis4een3ipe3ocery4up4s1t1u0ardian6cci3ge2ide2tars5ru3w1y2hair2mburg5ngout5us3bo2dfc0bank7ealth0care8lp1sinki6re1mes5iphop4samitsu7tachi5v2k0t2m1n1ockey4ldings5iday5medepot5goods5s0ense7nda3rse3spital5t0ing5t0els3mail5use3w2r1sbc3t1u0ghes5yatt3undai7ibm2cbc2e1u2d1e0ee3fm2kano4l1m0amat4db2mo0bilien9n0c1dustries8finiti5o2g1k1stitute6urance4e4t0ernational10uit4vestments10o1piranga7q1r0ish4s0maili5t0anbul7t0au2v3jaguar4va3cb2e0ep2tzt3welry6io2ll2m0p2nj2o0bs1urg4t1y2p0morgan6rs3uegos4niper7kaufen5ddi3e0rryhotels6logistics9properties14fh2g1h1i0a1ds2m1ndle4tchen5wi3m1n1oeln3matsu5sher5p0mg2n2r0d1ed3uokgroup8w1y0oto4z2la0caixa5mborghini8er3ncaster6d0rover6xess5salle5t0ino3robe5w0yer5b1c1ds2ease3clerc5frak4gal2o2xus4gbt3i0dl2fe0insurance9style7ghting6ke2lly3mited4o2ncoln4k2psy3ve1ing5k1lc1p2oan0s3cker3us3l1ndon4tte1o3ve3pl0financial11r1s1t0d0a3u0ndbeck6xe1ury5v1y2ma0drid4if1son4keup4n0agement7go3p1rket0ing3s4riott5shalls7ttel5ba2c0kinsey7d1e0d0ia3et2lbourne7me1orial6n0u2rckmsd7g1h1iami3crosoft7l1ni1t2t0subishi9k1l0b1s2m0a2n1o0bi0le4da2e1i1m1nash3ey2ster5rmon3tgage6scow4to0rcycles9v0ie4p1q1r1s0d2t0n1r2u0seum3ic4v1w1x1y1z2na0b1goya4me2tura4vy3ba2c1e0c1t0bank4flix4work5ustar5w0s2xt0direct7us4f0l2g0o2hk2i0co2ke1on3nja3ssan1y5l1o0kia3rton4w0ruz3tv4p1r0a1w2tt2u1yc2z2obi1server7ffice5kinawa6layan0group9dnavy5lo3m0ega4ne1g1l0ine5oo2pen3racle3nge4g0anic5igins6saka4tsuka4t2vh3pa0ge2nasonic7ris2s1tners4s1y3y2ccw3e0t2f0izer5g1h0armacy6d1ilips5one2to0graphy6s4ysio5ics1tet2ures6d1n0g1k2oneer5zza4k1l0ace2y0station9umbing5s3m1n0c2ohl2ker3litie5rn2st3r0america6xi3ess3ime3o0d0uctions8f1gressive8mo2perties3y5tection8u0dential9s1t1ub2w0c2y2qa1pon3uebec3st5racing4dio4e0ad1lestate6tor2y4cipes5d0stone5umbrella9hab3ise0n3t2liance6n0t0als5pair3ort3ublican8st0aurant8view0s5xroth6ich0ardli6oh3l1o1p2o0cks3deo3gers4om3s0vp3u0gby3hr2n2w0e2yukyu6sa0arland6fe0ty4kura4le1on3msclub4ung5ndvik0coromant12ofi4p1rl2s1ve2xo3b0i1s2c0a1b1haeffler7midt4olarships8ol3ule3warz5ience5ot3d1e0arch3t2cure1ity6ek2lect4ner3rvices6ven3w1x0y3fr2g1h0angrila6rp2w2ell3ia1ksha5oes2p0ping5uji3w3i0lk2na1gles5te3j1k0i0n2y0pe4l0ing4m0art3ile4n0cf3o0ccer3ial4ftbank4ware6hu2lar2utions7ng1y2y2pa0ce3ort2t3r0l2s1t0ada2ples4r1tebank4farm7c0group6ockholm6rage3e3ream4udio2y3yle4u0cks3pplies3y2ort5rf1gery5zuki5v1watch4iss4x1y0dney4stems6z2tab1ipei4lk2obao4rget4tamotors6r2too4x0i3c0i2d0k2eam2ch0nology8l1masek5nnis4va3f1g1h0d1eater2re6iaa2ckets5enda4ps2res2ol4j0maxx4x2k0maxx5l1m0all4n1o0day3kyo3ols3p1ray3shiba5tal3urs3wn2yota3s3r0ade1ing4ining5vel0ers0insurance16ust3v2t1ube2i1nes3shu4v0s2w1z2ua1bank3s2g1k1nicom3versity8o2ol2ps2s1y1z2va0cations7na1guard7c1e0gas3ntures6risign5mögensberater2ung14sicherung10t2g1i0ajes4deo3g1king4llas4n1p1rgin4sa1ion4va1o3laanderen9n1odka3lvo3te1ing3o2yage5u2wales2mart4ter4ng0gou5tch0es6eather0channel12bcam3er2site5d0ding5ibo2r3f1hoswho6ien2ki2lliamhill9n0dows4e1ners6me2olterskluwer11odside6rk0s2ld3w2s1tc1f3xbox3erox4finity6ihuan4n2xx2yz3yachts4hoo3maxun5ndex5e1odobashi7ga2kohama6u0tube6t1un3za0ppos4ra3ero3ip2m1one3uerich6w2", Km = "ελ1υ2бг1ел3дети4ею2католик6ом3мкд2он1сква6онлайн5рг3рус2ф2сайт3рб3укр3қаз3հայ3ישראל5קום3ابوظبي5رامكو5لاردن4بحرين5جزائر5سعودية6عليان5مغرب5مارات5یران5بارت2زار4يتك3ھارت5تونس4سودان3رية5شبكة4عراق2ب2مان4فلسطين6قطر3كاثوليك6وم3مصر2ليسيا5وريتانيا7قع4همراه5پاکستان7ڀارت4कॉम3नेट3भारत0म्3ोत5संगठन5বাংলা5ভারত2ৰত4ਭਾਰਤ4ભારત4ଭାରତ4இந்தியா6லங்கை6சிங்கப்பூர்11భారత్5ಭಾರತ4ഭാരതം5ලංකා4คอม3ไทย3ລາວ3გე2みんな3アマゾン4クラウド4グーグル4コム2ストア3セール3ファッション6ポイント4世界2中信1国1國1文网3亚马逊3企业2佛山2信息2健康2八卦2公司1益2台湾1灣2商城1店1标2嘉里0大酒店5在线2大拿2天主教3娱乐2家電2广东2微博2慈善2我爱你3手机2招聘2政务1府2新加坡2闻2时尚2書籍2机构2淡马锡3游戏2澳門2点看2移动2组织机构4网址1店1站1络2联通2谷歌2购物2通販2集团2電訊盈科4飞利浦3食品2餐厅2香格里拉3港2닷넷1컴2삼성2한국2", Vt = (n, e) => {
|
|
14415
14401
|
for (const t in e)
|
|
14416
14402
|
n[t] = e[t];
|
|
14417
14403
|
return n;
|
|
14418
|
-
}, Bi = "numeric", _i = "ascii", Fi = "alpha", Dn = "asciinumeric", Mn = "alphanumeric", zi = "domain", Va = "emoji",
|
|
14419
|
-
function
|
|
14404
|
+
}, Bi = "numeric", _i = "ascii", Fi = "alpha", Dn = "asciinumeric", Mn = "alphanumeric", zi = "domain", Va = "emoji", Wm = "scheme", Um = "slashscheme", Ho = "whitespace";
|
|
14405
|
+
function Jm(n, e) {
|
|
14420
14406
|
return n in e || (e[n] = []), e[n];
|
|
14421
14407
|
}
|
|
14422
14408
|
function dt(n, e, t) {
|
|
14423
14409
|
e[Bi] && (e[Dn] = !0, e[Mn] = !0), e[_i] && (e[Dn] = !0, e[Fi] = !0), e[Dn] && (e[Mn] = !0), e[Fi] && (e[Mn] = !0), e[Mn] && (e[zi] = !0), e[Va] && (e[zi] = !0);
|
|
14424
14410
|
for (const r in e) {
|
|
14425
|
-
const i =
|
|
14411
|
+
const i = Jm(r, t);
|
|
14426
14412
|
i.indexOf(n) < 0 && i.push(n);
|
|
14427
14413
|
}
|
|
14428
14414
|
}
|
|
14429
|
-
function
|
|
14415
|
+
function Gm(n, e) {
|
|
14430
14416
|
const t = {};
|
|
14431
14417
|
for (const r in e)
|
|
14432
14418
|
e[r].indexOf(n) >= 0 && (t[r] = !0);
|
|
@@ -14548,7 +14534,7 @@ ue.prototype = {
|
|
|
14548
14534
|
if (l ? (o = new ue(), Vt(o.j, l.j), o.jr.push.apply(o.jr, l.jr), o.jd = l.jd, o.t = l.t) : o = new ue(), s) {
|
|
14549
14535
|
if (r)
|
|
14550
14536
|
if (o.t && typeof o.t == "string") {
|
|
14551
|
-
const a = Vt(
|
|
14537
|
+
const a = Vt(Gm(o.t, r), t);
|
|
14552
14538
|
dt(s, a, r);
|
|
14553
14539
|
} else
|
|
14554
14540
|
t && dt(s, t, r);
|
|
@@ -14614,14 +14600,14 @@ var qa = /* @__PURE__ */ Object.freeze({
|
|
|
14614
14600
|
SYM: xr
|
|
14615
14601
|
});
|
|
14616
14602
|
const wt = /[a-z]/, hi = new RegExp("\\p{L}", "u"), fi = new RegExp("\\p{Emoji}", "u"), pi = /\d/, $o = /\s/, jo = `
|
|
14617
|
-
`,
|
|
14603
|
+
`, Ym = "️", Xm = "";
|
|
14618
14604
|
let wn = null, On = null;
|
|
14619
|
-
function
|
|
14605
|
+
function Qm(n) {
|
|
14620
14606
|
n === void 0 && (n = []);
|
|
14621
14607
|
const e = {};
|
|
14622
14608
|
ue.groups = e;
|
|
14623
14609
|
const t = new ue();
|
|
14624
|
-
wn == null && (wn = qo(
|
|
14610
|
+
wn == null && (wn = qo(qm)), On == null && (On = qo(Km)), k(t, "'", ar), k(t, "{", rn), k(t, "}", sn), k(t, "[", Un), k(t, "]", Jn), k(t, "(", Gn), k(t, ")", Yn), k(t, "<", Xn), k(t, ">", Qn), k(t, "(", Zn), k(t, ")", er), k(t, "「", tr), k(t, "」", nr), k(t, "『", rr), k(t, "』", ir), k(t, "<", sr), k(t, ">", or), k(t, "&", lr), k(t, "*", cr), k(t, "@", We), k(t, "`", ur), k(t, "^", hr), k(t, ":", Je), k(t, ",", ys), k(t, "$", fr), k(t, ".", we), k(t, "=", pr), k(t, "!", bs), k(t, "-", Oe), k(t, "%", mr), k(t, "|", gr), k(t, "+", yr), k(t, "#", br), k(t, "?", kr), k(t, '"', ks), k(t, "/", ve), k(t, ";", Ss), k(t, "~", on), k(t, "_", Sr), k(t, "\\", dr);
|
|
14625
14611
|
const r = ye(t, pi, ms, {
|
|
14626
14612
|
[Bi]: !0
|
|
14627
14613
|
});
|
|
@@ -14643,8 +14629,8 @@ function eg(n) {
|
|
|
14643
14629
|
const l = ye(t, fi, ja, {
|
|
14644
14630
|
[Va]: !0
|
|
14645
14631
|
});
|
|
14646
|
-
ye(l, fi, l), k(l,
|
|
14647
|
-
const a = k(l,
|
|
14632
|
+
ye(l, fi, l), k(l, Ym, l);
|
|
14633
|
+
const a = k(l, Xm);
|
|
14648
14634
|
ye(a, fi, l);
|
|
14649
14635
|
const c = [[wt, i]], d = [[wt, null], [hi, s]];
|
|
14650
14636
|
for (let u = 0; u < wn.length; u++)
|
|
@@ -14666,9 +14652,9 @@ function eg(n) {
|
|
|
14666
14652
|
}, e), n = n.sort((u, h) => u[0] > h[0] ? 1 : -1);
|
|
14667
14653
|
for (let u = 0; u < n.length; u++) {
|
|
14668
14654
|
const h = n[u][0], p = n[u][1] ? {
|
|
14669
|
-
[
|
|
14655
|
+
[Wm]: !0
|
|
14670
14656
|
} : {
|
|
14671
|
-
[
|
|
14657
|
+
[Um]: !0
|
|
14672
14658
|
};
|
|
14673
14659
|
h.indexOf("-") >= 0 ? p[zi] = !0 : wt.test(h) ? pi.test(h) ? p[Dn] = !0 : p[_i] = !0 : p[Bi] = !0, Vo(t, h, h, p);
|
|
14674
14660
|
}
|
|
@@ -14681,8 +14667,8 @@ function eg(n) {
|
|
|
14681
14667
|
}, qa)
|
|
14682
14668
|
};
|
|
14683
14669
|
}
|
|
14684
|
-
function
|
|
14685
|
-
const t =
|
|
14670
|
+
function Zm(n, e) {
|
|
14671
|
+
const t = eg(e.replace(/[A-Z]/g, (l) => l.toLowerCase())), r = t.length, i = [];
|
|
14686
14672
|
let s = 0, o = 0;
|
|
14687
14673
|
for (; o < r; ) {
|
|
14688
14674
|
let l = n, a = null, c = 0, d = null, u = -1, h = -1;
|
|
@@ -14701,7 +14687,7 @@ function tg(n, e) {
|
|
|
14701
14687
|
}
|
|
14702
14688
|
return i;
|
|
14703
14689
|
}
|
|
14704
|
-
function
|
|
14690
|
+
function eg(n) {
|
|
14705
14691
|
const e = [], t = n.length;
|
|
14706
14692
|
let r = 0;
|
|
14707
14693
|
for (; r < t; ) {
|
|
@@ -14948,7 +14934,7 @@ const Wo = Vr("email", {
|
|
|
14948
14934
|
toHref() {
|
|
14949
14935
|
return "mailto:" + this.toString();
|
|
14950
14936
|
}
|
|
14951
|
-
}), Uo = Vr("text"),
|
|
14937
|
+
}), Uo = Vr("text"), tg = Vr("nl"), vn = Vr("url", {
|
|
14952
14938
|
isLink: !0,
|
|
14953
14939
|
/**
|
|
14954
14940
|
Lowercases relevant parts of the domain and adds the protocol if
|
|
@@ -14969,7 +14955,7 @@ const Wo = Vr("email", {
|
|
|
14969
14955
|
return n.length >= 2 && n[0].t !== yn && n[1].t === Je;
|
|
14970
14956
|
}
|
|
14971
14957
|
}), be = (n) => new ue(n);
|
|
14972
|
-
function
|
|
14958
|
+
function ng(n) {
|
|
14973
14959
|
let {
|
|
14974
14960
|
groups: e
|
|
14975
14961
|
} = n;
|
|
@@ -15027,12 +15013,12 @@ function ig(n) {
|
|
|
15027
15013
|
const $e = be();
|
|
15028
15014
|
v(Ve, r), v(fe, t, fe), v(fe, r, $e), v($e, t, fe), v($e, r, $e), k(fe, He, E), k($e, He, E);
|
|
15029
15015
|
}
|
|
15030
|
-
return k(s, yn, T), k(s, gs,
|
|
15016
|
+
return k(s, yn, T), k(s, gs, tg), {
|
|
15031
15017
|
start: s,
|
|
15032
15018
|
tokens: qa
|
|
15033
15019
|
};
|
|
15034
15020
|
}
|
|
15035
|
-
function
|
|
15021
|
+
function rg(n, e, t) {
|
|
15036
15022
|
let r = t.length, i = 0, s = [], o = [];
|
|
15037
15023
|
for (; i < r; ) {
|
|
15038
15024
|
let l = n, a = null, c = null, d = 0, u = null, h = -1;
|
|
@@ -15054,8 +15040,8 @@ function mi(n, e, t) {
|
|
|
15054
15040
|
const r = t[0].s, i = t[t.length - 1].e, s = e.slice(r, i);
|
|
15055
15041
|
return new n(s, t);
|
|
15056
15042
|
}
|
|
15057
|
-
const
|
|
15058
|
-
}),
|
|
15043
|
+
const ig = typeof console < "u" && console && console.warn || (() => {
|
|
15044
|
+
}), sg = "until manual call of linkify.init(). Register all schemes and plugins before invoking linkify the first time.", _ = {
|
|
15059
15045
|
scanner: null,
|
|
15060
15046
|
parser: null,
|
|
15061
15047
|
tokenQueue: [],
|
|
@@ -15063,24 +15049,24 @@ const og = typeof console < "u" && console && console.warn || (() => {
|
|
|
15063
15049
|
customSchemes: [],
|
|
15064
15050
|
initialized: !1
|
|
15065
15051
|
};
|
|
15066
|
-
function
|
|
15052
|
+
function og() {
|
|
15067
15053
|
ue.groups = {}, _.scanner = null, _.parser = null, _.tokenQueue = [], _.pluginQueue = [], _.customSchemes = [], _.initialized = !1;
|
|
15068
15054
|
}
|
|
15069
15055
|
function Jo(n, e) {
|
|
15070
|
-
if (e === void 0 && (e = !1), _.initialized &&
|
|
15056
|
+
if (e === void 0 && (e = !1), _.initialized && ig(`linkifyjs: already initialized - will not register custom scheme "${n}" ${sg}`), !/^[0-9a-z]+(-[0-9a-z]+)*$/.test(n))
|
|
15071
15057
|
throw new Error(`linkifyjs: incorrect scheme format.
|
|
15072
15058
|
1. Must only contain digits, lowercase ASCII letters or "-"
|
|
15073
15059
|
2. Cannot start or end with "-"
|
|
15074
15060
|
3. "-" cannot repeat`);
|
|
15075
15061
|
_.customSchemes.push([n, e]);
|
|
15076
15062
|
}
|
|
15077
|
-
function
|
|
15078
|
-
_.scanner =
|
|
15063
|
+
function lg() {
|
|
15064
|
+
_.scanner = Qm(_.customSchemes);
|
|
15079
15065
|
for (let n = 0; n < _.tokenQueue.length; n++)
|
|
15080
15066
|
_.tokenQueue[n][1]({
|
|
15081
15067
|
scanner: _.scanner
|
|
15082
15068
|
});
|
|
15083
|
-
_.parser =
|
|
15069
|
+
_.parser = ng(_.scanner.tokens);
|
|
15084
15070
|
for (let n = 0; n < _.pluginQueue.length; n++)
|
|
15085
15071
|
_.pluginQueue[n][1]({
|
|
15086
15072
|
scanner: _.scanner,
|
|
@@ -15088,8 +15074,8 @@ function cg() {
|
|
|
15088
15074
|
});
|
|
15089
15075
|
_.initialized = !0;
|
|
15090
15076
|
}
|
|
15091
|
-
function
|
|
15092
|
-
return _.initialized ||
|
|
15077
|
+
function ag(n) {
|
|
15078
|
+
return _.initialized || lg(), rg(_.parser.start, n, Zm(_.scanner.start, n));
|
|
15093
15079
|
}
|
|
15094
15080
|
function Cs(n, e, t) {
|
|
15095
15081
|
if (e === void 0 && (e = null), t === void 0 && (t = null), e && typeof e == "object") {
|
|
@@ -15097,14 +15083,14 @@ function Cs(n, e, t) {
|
|
|
15097
15083
|
throw Error(`linkifyjs: Invalid link type ${e}; must be a string`);
|
|
15098
15084
|
t = e, e = null;
|
|
15099
15085
|
}
|
|
15100
|
-
const r = new xs(t), i =
|
|
15086
|
+
const r = new xs(t), i = ag(n), s = [];
|
|
15101
15087
|
for (let o = 0; o < i.length; o++) {
|
|
15102
15088
|
const l = i[o];
|
|
15103
15089
|
l.isLink && (!e || l.t === e) && r.check(l) && s.push(l.toFormattedObject(r));
|
|
15104
15090
|
}
|
|
15105
15091
|
return s;
|
|
15106
15092
|
}
|
|
15107
|
-
function
|
|
15093
|
+
function cg(n) {
|
|
15108
15094
|
return new Q({
|
|
15109
15095
|
key: new ie("autolink"),
|
|
15110
15096
|
appendTransaction: (e, t, r) => {
|
|
@@ -15137,7 +15123,7 @@ function ug(n) {
|
|
|
15137
15123
|
}
|
|
15138
15124
|
});
|
|
15139
15125
|
}
|
|
15140
|
-
function
|
|
15126
|
+
function dg(n) {
|
|
15141
15127
|
return new Q({
|
|
15142
15128
|
key: new ie("handleClickLink"),
|
|
15143
15129
|
props: {
|
|
@@ -15151,7 +15137,7 @@ function hg(n) {
|
|
|
15151
15137
|
}
|
|
15152
15138
|
});
|
|
15153
15139
|
}
|
|
15154
|
-
function
|
|
15140
|
+
function ug(n) {
|
|
15155
15141
|
return new Q({
|
|
15156
15142
|
key: new ie("handlePasteLink"),
|
|
15157
15143
|
props: {
|
|
@@ -15171,7 +15157,7 @@ function fg(n) {
|
|
|
15171
15157
|
}
|
|
15172
15158
|
});
|
|
15173
15159
|
}
|
|
15174
|
-
const
|
|
15160
|
+
const hg = xe.create({
|
|
15175
15161
|
name: "link",
|
|
15176
15162
|
priority: 1e3,
|
|
15177
15163
|
keepOnSplit: !1,
|
|
@@ -15185,7 +15171,7 @@ const pg = xe.create({
|
|
|
15185
15171
|
});
|
|
15186
15172
|
},
|
|
15187
15173
|
onDestroy() {
|
|
15188
|
-
|
|
15174
|
+
og();
|
|
15189
15175
|
},
|
|
15190
15176
|
inclusive() {
|
|
15191
15177
|
return this.options.autolink;
|
|
@@ -15276,17 +15262,17 @@ const pg = xe.create({
|
|
|
15276
15262
|
},
|
|
15277
15263
|
addProseMirrorPlugins() {
|
|
15278
15264
|
const n = [];
|
|
15279
|
-
return this.options.autolink && n.push(
|
|
15265
|
+
return this.options.autolink && n.push(cg({
|
|
15280
15266
|
type: this.type,
|
|
15281
15267
|
validate: this.options.validate
|
|
15282
|
-
})), this.options.openOnClick && n.push(
|
|
15268
|
+
})), this.options.openOnClick && n.push(dg({
|
|
15283
15269
|
type: this.type
|
|
15284
|
-
})), this.options.linkOnPaste && n.push(
|
|
15270
|
+
})), this.options.linkOnPaste && n.push(ug({
|
|
15285
15271
|
editor: this.editor,
|
|
15286
15272
|
type: this.type
|
|
15287
15273
|
})), n;
|
|
15288
15274
|
}
|
|
15289
|
-
}),
|
|
15275
|
+
}), fg = ne.create({
|
|
15290
15276
|
name: "listItem",
|
|
15291
15277
|
addOptions() {
|
|
15292
15278
|
return {
|
|
@@ -15314,7 +15300,7 @@ const pg = xe.create({
|
|
|
15314
15300
|
"Shift-Tab": () => this.editor.commands.liftListItem(this.name)
|
|
15315
15301
|
};
|
|
15316
15302
|
}
|
|
15317
|
-
}),
|
|
15303
|
+
}), pg = ne.create({
|
|
15318
15304
|
name: "listItem",
|
|
15319
15305
|
addOptions() {
|
|
15320
15306
|
return {
|
|
@@ -15368,7 +15354,7 @@ const pg = xe.create({
|
|
|
15368
15354
|
}
|
|
15369
15355
|
};
|
|
15370
15356
|
}
|
|
15371
|
-
}), Yo = /^(\d+)\.\s$/,
|
|
15357
|
+
}), Yo = /^(\d+)\.\s$/, mg = ne.create({
|
|
15372
15358
|
name: "orderedList",
|
|
15373
15359
|
addOptions() {
|
|
15374
15360
|
return {
|
|
@@ -15403,7 +15389,7 @@ const pg = xe.create({
|
|
|
15403
15389
|
},
|
|
15404
15390
|
addCommands() {
|
|
15405
15391
|
return {
|
|
15406
|
-
toggleOrderedList: () => ({ commands: n, chain: e }) => this.options.keepAttributes ? e().toggleList(this.name, this.options.itemTypeName, this.options.keepMarks).updateAttributes(
|
|
15392
|
+
toggleOrderedList: () => ({ commands: n, chain: e }) => this.options.keepAttributes ? e().toggleList(this.name, this.options.itemTypeName, this.options.keepMarks).updateAttributes(pg.name, this.editor.getAttributes(Go.name)).run() : n.toggleList(this.name, this.options.itemTypeName, this.options.keepMarks)
|
|
15407
15393
|
};
|
|
15408
15394
|
},
|
|
15409
15395
|
addKeyboardShortcuts() {
|
|
@@ -15430,7 +15416,7 @@ const pg = xe.create({
|
|
|
15430
15416
|
n
|
|
15431
15417
|
];
|
|
15432
15418
|
}
|
|
15433
|
-
}),
|
|
15419
|
+
}), gg = /(?:^|\s)((?:~~)((?:[^~]+))(?:~~))$/, yg = /(?:^|\s)((?:~~)((?:[^~]+))(?:~~))/g, bg = xe.create({
|
|
15434
15420
|
name: "strike",
|
|
15435
15421
|
addOptions() {
|
|
15436
15422
|
return {
|
|
@@ -15472,7 +15458,7 @@ const pg = xe.create({
|
|
|
15472
15458
|
addInputRules() {
|
|
15473
15459
|
return [
|
|
15474
15460
|
mn({
|
|
15475
|
-
find:
|
|
15461
|
+
find: gg,
|
|
15476
15462
|
type: this.type
|
|
15477
15463
|
})
|
|
15478
15464
|
];
|
|
@@ -15480,12 +15466,12 @@ const pg = xe.create({
|
|
|
15480
15466
|
addPasteRules() {
|
|
15481
15467
|
return [
|
|
15482
15468
|
Ht({
|
|
15483
|
-
find:
|
|
15469
|
+
find: yg,
|
|
15484
15470
|
type: this.type
|
|
15485
15471
|
})
|
|
15486
15472
|
];
|
|
15487
15473
|
}
|
|
15488
|
-
}),
|
|
15474
|
+
}), kg = xe.create({
|
|
15489
15475
|
name: "underline",
|
|
15490
15476
|
addOptions() {
|
|
15491
15477
|
return {
|
|
@@ -15520,10 +15506,10 @@ const pg = xe.create({
|
|
|
15520
15506
|
"Mod-U": () => this.editor.commands.toggleUnderline()
|
|
15521
15507
|
};
|
|
15522
15508
|
}
|
|
15523
|
-
}),
|
|
15509
|
+
}), Sg = ne.create({
|
|
15524
15510
|
name: "text",
|
|
15525
15511
|
group: "inline"
|
|
15526
|
-
}),
|
|
15512
|
+
}), xg = ge.create({
|
|
15527
15513
|
name: "textAlign",
|
|
15528
15514
|
addOptions() {
|
|
15529
15515
|
return {
|
|
@@ -15560,7 +15546,7 @@ const pg = xe.create({
|
|
|
15560
15546
|
"Mod-Shift-j": () => this.editor.commands.setTextAlign("justify")
|
|
15561
15547
|
};
|
|
15562
15548
|
}
|
|
15563
|
-
}),
|
|
15549
|
+
}), Cg = {
|
|
15564
15550
|
name: "EmojiComponent",
|
|
15565
15551
|
components: {
|
|
15566
15552
|
NodeViewWrapper: Fa,
|
|
@@ -15568,7 +15554,7 @@ const pg = xe.create({
|
|
|
15568
15554
|
},
|
|
15569
15555
|
props: za
|
|
15570
15556
|
};
|
|
15571
|
-
function
|
|
15557
|
+
function Eg(n, e, t, r, i, s) {
|
|
15572
15558
|
const o = $("dt-emoji"), l = $("node-view-wrapper");
|
|
15573
15559
|
return O(), z(l, { class: "d-d-inline-block d-va-bottom d-lh0" }, {
|
|
15574
15560
|
default: q(() => [
|
|
@@ -15580,10 +15566,10 @@ function Mg(n, e, t, r, i, s) {
|
|
|
15580
15566
|
_: 1
|
|
15581
15567
|
});
|
|
15582
15568
|
}
|
|
15583
|
-
const
|
|
15584
|
-
function
|
|
15569
|
+
const Tg = /* @__PURE__ */ de(Cg, [["render", Eg]]);
|
|
15570
|
+
function Mg(n) {
|
|
15585
15571
|
var e;
|
|
15586
|
-
const { char: t, allowSpaces: r, allowedPrefixes: i, startOfLine: s, $position: o } = n, l =
|
|
15572
|
+
const { char: t, allowSpaces: r, allowedPrefixes: i, startOfLine: s, $position: o } = n, l = ym(t), a = new RegExp(`\\s${l}$`), c = s ? "^" : "", d = r ? new RegExp(`${c}${l}.*?(?=\\s${l}|$)`, "gm") : new RegExp(`${c}(?:^)?${l}[^\\s${l}]*`, "gm"), u = ((e = o.nodeBefore) === null || e === void 0 ? void 0 : e.isText) && o.nodeBefore.text;
|
|
15587
15573
|
if (!u)
|
|
15588
15574
|
return null;
|
|
15589
15575
|
const h = o.pos - u.length, f = Array.from(u.matchAll(d)).pop();
|
|
@@ -15603,8 +15589,8 @@ function Og(n) {
|
|
|
15603
15589
|
text: f[0]
|
|
15604
15590
|
} : null;
|
|
15605
15591
|
}
|
|
15606
|
-
const
|
|
15607
|
-
function Wa({ pluginKey: n =
|
|
15592
|
+
const wg = new ie("suggestion");
|
|
15593
|
+
function Wa({ pluginKey: n = wg, editor: e, char: t = "@", allowSpaces: r = !1, allowedPrefixes: i = [" "], startOfLine: s = !1, decorationTag: o = "span", decorationClass: l = "suggestion", command: a = () => null, items: c = () => [], render: d = () => ({}), allow: u = () => !0 }) {
|
|
15608
15594
|
let h;
|
|
15609
15595
|
const f = d == null ? void 0 : d(), p = new Q({
|
|
15610
15596
|
key: n,
|
|
@@ -15667,7 +15653,7 @@ function Wa({ pluginKey: n = vg, editor: e, char: t = "@", allowSpaces: r = !1,
|
|
|
15667
15653
|
const { isEditable: T } = e, { composing: R } = e.view, { selection: P } = m, { empty: E, from: L } = P, I = { ...g };
|
|
15668
15654
|
if (I.composing = R, T && (E || e.view.composing)) {
|
|
15669
15655
|
(L < g.range.from || L > g.range.to) && !R && !g.composing && (I.active = !1);
|
|
15670
|
-
const M =
|
|
15656
|
+
const M = Mg({
|
|
15671
15657
|
char: t,
|
|
15672
15658
|
allowSpaces: r,
|
|
15673
15659
|
allowedPrefixes: i,
|
|
@@ -15702,10 +15688,10 @@ function Wa({ pluginKey: n = vg, editor: e, char: t = "@", allowSpaces: r = !1,
|
|
|
15702
15688
|
});
|
|
15703
15689
|
return p;
|
|
15704
15690
|
}
|
|
15705
|
-
const
|
|
15691
|
+
const Og = {
|
|
15706
15692
|
name: "SuggestionList",
|
|
15707
15693
|
components: {
|
|
15708
|
-
DtListItem:
|
|
15694
|
+
DtListItem: ud
|
|
15709
15695
|
},
|
|
15710
15696
|
props: {
|
|
15711
15697
|
items: {
|
|
@@ -15767,15 +15753,15 @@ const Ag = {
|
|
|
15767
15753
|
}
|
|
15768
15754
|
}
|
|
15769
15755
|
}
|
|
15770
|
-
},
|
|
15756
|
+
}, vg = { class: "d-popover__dialog" }, Ag = {
|
|
15771
15757
|
ref: "suggestionList",
|
|
15772
15758
|
class: "dt-suggestion-list"
|
|
15773
15759
|
};
|
|
15774
|
-
function
|
|
15760
|
+
function Ng(n, e, t, r, i, s) {
|
|
15775
15761
|
const o = $("dt-list-item");
|
|
15776
|
-
return O(), j("div",
|
|
15777
|
-
|
|
15778
|
-
(O(!0), j(
|
|
15762
|
+
return O(), j("div", vg, [
|
|
15763
|
+
xc(ht("ul", Ag, [
|
|
15764
|
+
(O(!0), j(Cc, null, il(t.items, (l, a) => (O(), z(o, {
|
|
15779
15765
|
key: l.id,
|
|
15780
15766
|
class: X([
|
|
15781
15767
|
"dt-suggestion-list--item",
|
|
@@ -15791,11 +15777,11 @@ function Ig(n, e, t, r, i, s) {
|
|
|
15791
15777
|
_: 2
|
|
15792
15778
|
}, 1032, ["class", "onClick", "onKeydown"]))), 128))
|
|
15793
15779
|
], 512), [
|
|
15794
|
-
[
|
|
15780
|
+
[Ec, t.items.length]
|
|
15795
15781
|
])
|
|
15796
15782
|
]);
|
|
15797
15783
|
}
|
|
15798
|
-
const Ua = /* @__PURE__ */ de(
|
|
15784
|
+
const Ua = /* @__PURE__ */ de(Og, [["render", Ng]]), Dg = {
|
|
15799
15785
|
name: "EmojiSuggestion",
|
|
15800
15786
|
components: {
|
|
15801
15787
|
DtEmoji: tl,
|
|
@@ -15808,7 +15794,7 @@ const Ua = /* @__PURE__ */ de(Ag, [["render", Ig]]), Rg = {
|
|
|
15808
15794
|
}
|
|
15809
15795
|
}
|
|
15810
15796
|
};
|
|
15811
|
-
function
|
|
15797
|
+
function Ig(n, e, t, r, i, s) {
|
|
15812
15798
|
const o = $("dt-emoji"), l = $("dt-stack");
|
|
15813
15799
|
return O(), z(l, {
|
|
15814
15800
|
direction: "row",
|
|
@@ -15824,8 +15810,8 @@ function Pg(n, e, t, r, i, s) {
|
|
|
15824
15810
|
_: 1
|
|
15825
15811
|
});
|
|
15826
15812
|
}
|
|
15827
|
-
const
|
|
15828
|
-
items: ({ query: n }) => n.length < 2 ? [] : Object.values(
|
|
15813
|
+
const Rg = /* @__PURE__ */ de(Dg, [["render", Ig]]), Pg = {
|
|
15814
|
+
items: ({ query: n }) => n.length < 2 ? [] : Object.values(fc).filter(function(r) {
|
|
15829
15815
|
return !!r.shortname.substring(1, r.shortname.length - 1).startsWith(n.toLowerCase());
|
|
15830
15816
|
}).map((r) => ({ id: r.unicode_character, code: r.shortname })),
|
|
15831
15817
|
command: ({ editor: n, range: e, props: t }) => {
|
|
@@ -15848,7 +15834,7 @@ const Lg = /* @__PURE__ */ de(Rg, [["render", Pg]]), Bg = {
|
|
|
15848
15834
|
onStart: (t) => {
|
|
15849
15835
|
n = new ps(Ua, {
|
|
15850
15836
|
props: {
|
|
15851
|
-
itemComponent: wr(
|
|
15837
|
+
itemComponent: wr(Rg),
|
|
15852
15838
|
itemType: "emoji",
|
|
15853
15839
|
...t
|
|
15854
15840
|
},
|
|
@@ -15879,24 +15865,24 @@ const Lg = /* @__PURE__ */ de(Rg, [["render", Pg]]), Bg = {
|
|
|
15879
15865
|
}
|
|
15880
15866
|
};
|
|
15881
15867
|
}
|
|
15882
|
-
},
|
|
15868
|
+
}, Lg = new ie("emoji"), Bg = /:\w+:$/, _g = /:\w+:/g, Fg = /(\u00a9|\u00ae|[\u2000-\u3300]|\ud83c[\ud000-\udfff]|\ud83d[\ud000-\udfff]|\ud83e[\ud000-\udfff])$/, zg = /(\u00a9|\u00ae|[\u2000-\u3300]|\ud83c[\ud000-\udfff]|\ud83d[\ud000-\udfff]|\ud83e[\ud000-\udfff])/g, Xo = (n) => {
|
|
15883
15869
|
if (n && nl(n[0]))
|
|
15884
15870
|
return {
|
|
15885
15871
|
index: n.index,
|
|
15886
15872
|
text: n[0],
|
|
15887
15873
|
match: n
|
|
15888
15874
|
};
|
|
15889
|
-
},
|
|
15875
|
+
}, Hg = (n) => [...n.matchAll(_g)].filter((t) => nl(t[0])).map((t) => ({
|
|
15890
15876
|
index: t.index,
|
|
15891
15877
|
text: t[0],
|
|
15892
15878
|
match: t
|
|
15893
|
-
})),
|
|
15879
|
+
})), Vg = ne.create({
|
|
15894
15880
|
addOptions() {
|
|
15895
15881
|
return {
|
|
15896
15882
|
HTMLAttributes: {},
|
|
15897
15883
|
suggestion: {
|
|
15898
15884
|
char: ":",
|
|
15899
|
-
pluginKey:
|
|
15885
|
+
pluginKey: Lg
|
|
15900
15886
|
}
|
|
15901
15887
|
};
|
|
15902
15888
|
},
|
|
@@ -15905,7 +15891,7 @@ const Lg = /* @__PURE__ */ de(Rg, [["render", Pg]]), Bg = {
|
|
|
15905
15891
|
inline: !0,
|
|
15906
15892
|
selectable: !0,
|
|
15907
15893
|
addNodeView() {
|
|
15908
|
-
return Ha(
|
|
15894
|
+
return Ha(Tg);
|
|
15909
15895
|
},
|
|
15910
15896
|
addAttributes() {
|
|
15911
15897
|
return {
|
|
@@ -15928,14 +15914,14 @@ const Lg = /* @__PURE__ */ de(Rg, [["render", Pg]]), Bg = {
|
|
|
15928
15914
|
return n.attrs.code;
|
|
15929
15915
|
},
|
|
15930
15916
|
renderHTML({ HTMLAttributes: n }) {
|
|
15931
|
-
return ["emoji-component", F(this.options.HTMLAttributes, n)
|
|
15917
|
+
return ["emoji-component", F(this.options.HTMLAttributes, n)];
|
|
15932
15918
|
},
|
|
15933
15919
|
addInputRules() {
|
|
15934
15920
|
return [
|
|
15935
15921
|
// shortcode input
|
|
15936
15922
|
Po({
|
|
15937
15923
|
find: (n) => {
|
|
15938
|
-
const e = n.match(
|
|
15924
|
+
const e = n.match(Bg);
|
|
15939
15925
|
return Xo(e);
|
|
15940
15926
|
},
|
|
15941
15927
|
type: this.type,
|
|
@@ -15947,12 +15933,12 @@ const Lg = /* @__PURE__ */ de(Rg, [["render", Pg]]), Bg = {
|
|
|
15947
15933
|
}),
|
|
15948
15934
|
Po({
|
|
15949
15935
|
find: (n) => {
|
|
15950
|
-
const e = n.match(
|
|
15936
|
+
const e = n.match(Fg);
|
|
15951
15937
|
return Xo(e);
|
|
15952
15938
|
},
|
|
15953
15939
|
type: this.type,
|
|
15954
15940
|
getAttributes(n) {
|
|
15955
|
-
const e =
|
|
15941
|
+
const e = pc(n[0]).unicode_output;
|
|
15956
15942
|
return {
|
|
15957
15943
|
code: String.fromCodePoint(parseInt(e, 16)),
|
|
15958
15944
|
label: "emoji"
|
|
@@ -15964,7 +15950,7 @@ const Lg = /* @__PURE__ */ de(Rg, [["render", Pg]]), Bg = {
|
|
|
15964
15950
|
addPasteRules() {
|
|
15965
15951
|
return [
|
|
15966
15952
|
Bo({
|
|
15967
|
-
find:
|
|
15953
|
+
find: Hg,
|
|
15968
15954
|
type: this.type,
|
|
15969
15955
|
getAttributes(n) {
|
|
15970
15956
|
return {
|
|
@@ -15973,7 +15959,7 @@ const Lg = /* @__PURE__ */ de(Rg, [["render", Pg]]), Bg = {
|
|
|
15973
15959
|
}
|
|
15974
15960
|
}),
|
|
15975
15961
|
Bo({
|
|
15976
|
-
find:
|
|
15962
|
+
find: zg,
|
|
15977
15963
|
type: this.type,
|
|
15978
15964
|
getAttributes(n) {
|
|
15979
15965
|
return {
|
|
@@ -15988,12 +15974,12 @@ const Lg = /* @__PURE__ */ de(Rg, [["render", Pg]]), Bg = {
|
|
|
15988
15974
|
Wa({
|
|
15989
15975
|
editor: this.editor,
|
|
15990
15976
|
...this.options.suggestion,
|
|
15991
|
-
...
|
|
15977
|
+
...Pg
|
|
15992
15978
|
})
|
|
15993
15979
|
];
|
|
15994
15980
|
}
|
|
15995
15981
|
});
|
|
15996
|
-
function
|
|
15982
|
+
function $g(n, e, t = () => !0) {
|
|
15997
15983
|
const r = [];
|
|
15998
15984
|
e.lastIndex = 0;
|
|
15999
15985
|
let i;
|
|
@@ -16001,10 +15987,10 @@ function qg(n, e, t = () => !0) {
|
|
|
16001
15987
|
t(n, i) && r.push(i);
|
|
16002
15988
|
return r;
|
|
16003
15989
|
}
|
|
16004
|
-
function
|
|
15990
|
+
function jg(n, e) {
|
|
16005
15991
|
return !["#", "@"].includes(n.charAt(e.index)) && !["#", "@"].includes(n.charAt(e.index - 1));
|
|
16006
15992
|
}
|
|
16007
|
-
function
|
|
15993
|
+
function qg(n) {
|
|
16008
15994
|
const e = new RegExp(
|
|
16009
15995
|
"(?:" + [
|
|
16010
15996
|
`[!?.,:;'"]`,
|
|
@@ -16014,7 +16000,7 @@ function Wg(n) {
|
|
|
16014
16000
|
);
|
|
16015
16001
|
return n.replace(e, "");
|
|
16016
16002
|
}
|
|
16017
|
-
function
|
|
16003
|
+
function Kg(n, e) {
|
|
16018
16004
|
const t = n.slice(0, e + 1).search(/\S+\s*$/), r = n.slice(e).search(/\s/);
|
|
16019
16005
|
if (r < 0) {
|
|
16020
16006
|
const i = n.slice(t);
|
|
@@ -16031,18 +16017,18 @@ function Ug(n, e) {
|
|
|
16031
16017
|
};
|
|
16032
16018
|
}
|
|
16033
16019
|
function ji(n, e, t, r) {
|
|
16034
|
-
const i =
|
|
16020
|
+
const i = Kg(n, e);
|
|
16035
16021
|
if (r.lastIndex = 0, !r.test(i.text))
|
|
16036
16022
|
return i;
|
|
16037
16023
|
const s = t === "left" ? i.from - 1 : i.to + 1;
|
|
16038
16024
|
return s <= 0 || s >= n.length || s === e ? i : ji(n, s, t, r);
|
|
16039
16025
|
}
|
|
16040
|
-
function
|
|
16026
|
+
function Wg(n, e, t, r) {
|
|
16041
16027
|
const i = Math.max(n.from - 1, 0), s = Math.min(n.to + 1, e.content.size), o = Hr(i, s, e);
|
|
16042
16028
|
for (const l of o)
|
|
16043
16029
|
l.mark.type === r && t.removeMark(l.from, l.to, r);
|
|
16044
16030
|
}
|
|
16045
|
-
const Qo =
|
|
16031
|
+
const Qo = lc(1, 15);
|
|
16046
16032
|
function Zo(n, e, t, r, i, s) {
|
|
16047
16033
|
if (!n)
|
|
16048
16034
|
return;
|
|
@@ -16059,12 +16045,12 @@ function Zo(n, e, t, r, i, s) {
|
|
|
16059
16045
|
"right",
|
|
16060
16046
|
Qo
|
|
16061
16047
|
), d = n.slice(a.from, c.to);
|
|
16062
|
-
|
|
16063
|
-
const f =
|
|
16048
|
+
$g(d, ac, jg).forEach((h) => {
|
|
16049
|
+
const f = qg(h[0]), p = e + a.from + h.index + 1, m = p + f.length;
|
|
16064
16050
|
i.addMark(p, m, s.create());
|
|
16065
16051
|
});
|
|
16066
16052
|
}
|
|
16067
|
-
function
|
|
16053
|
+
function Ug(n) {
|
|
16068
16054
|
let e = !1;
|
|
16069
16055
|
return new Q({
|
|
16070
16056
|
key: new ie("autolink"),
|
|
@@ -16079,7 +16065,7 @@ function Gg(n) {
|
|
|
16079
16065
|
[...t]
|
|
16080
16066
|
);
|
|
16081
16067
|
return Pa(a).forEach(({ oldRange: d, newRange: u }) => {
|
|
16082
|
-
|
|
16068
|
+
Wg(u, i.doc, o, n.type), Ia(
|
|
16083
16069
|
i.doc,
|
|
16084
16070
|
u,
|
|
16085
16071
|
(f) => f.isTextblock
|
|
@@ -16097,10 +16083,10 @@ function Gg(n) {
|
|
|
16097
16083
|
}
|
|
16098
16084
|
});
|
|
16099
16085
|
}
|
|
16100
|
-
const
|
|
16086
|
+
const Jg = {
|
|
16101
16087
|
class: "d-link d-c-text d-d-inline-block",
|
|
16102
16088
|
rel: "noopener noreferrer nofollow"
|
|
16103
|
-
},
|
|
16089
|
+
}, Gg = xe.create({
|
|
16104
16090
|
name: "Link",
|
|
16105
16091
|
renderHTML({ HTMLAttributes: n }) {
|
|
16106
16092
|
return [
|
|
@@ -16108,7 +16094,7 @@ const Yg = {
|
|
|
16108
16094
|
F(
|
|
16109
16095
|
this.options.HTMLAttributes,
|
|
16110
16096
|
n,
|
|
16111
|
-
|
|
16097
|
+
Jg
|
|
16112
16098
|
),
|
|
16113
16099
|
0
|
|
16114
16100
|
];
|
|
@@ -16118,10 +16104,10 @@ const Yg = {
|
|
|
16118
16104
|
},
|
|
16119
16105
|
addProseMirrorPlugins() {
|
|
16120
16106
|
return [
|
|
16121
|
-
|
|
16107
|
+
Ug({ type: this.type })
|
|
16122
16108
|
];
|
|
16123
16109
|
}
|
|
16124
|
-
}),
|
|
16110
|
+
}), Yg = new ie("mention"), Xg = ne.create({
|
|
16125
16111
|
name: "mention",
|
|
16126
16112
|
addOptions() {
|
|
16127
16113
|
return {
|
|
@@ -16132,7 +16118,7 @@ const Yg = {
|
|
|
16132
16118
|
},
|
|
16133
16119
|
suggestion: {
|
|
16134
16120
|
char: "@",
|
|
16135
|
-
pluginKey:
|
|
16121
|
+
pluginKey: Yg,
|
|
16136
16122
|
command: ({ editor: n, range: e, props: t }) => {
|
|
16137
16123
|
var r, i;
|
|
16138
16124
|
const s = n.view.state.selection.$to.nodeAfter;
|
|
@@ -16219,11 +16205,11 @@ const Yg = {
|
|
|
16219
16205
|
})
|
|
16220
16206
|
];
|
|
16221
16207
|
}
|
|
16222
|
-
}),
|
|
16208
|
+
}), Qg = {
|
|
16223
16209
|
name: "MentionComponent",
|
|
16224
16210
|
components: {
|
|
16225
16211
|
NodeViewWrapper: Fa,
|
|
16226
|
-
DtLink:
|
|
16212
|
+
DtLink: Wc
|
|
16227
16213
|
},
|
|
16228
16214
|
props: za,
|
|
16229
16215
|
computed: {
|
|
@@ -16232,7 +16218,7 @@ const Yg = {
|
|
|
16232
16218
|
}
|
|
16233
16219
|
}
|
|
16234
16220
|
};
|
|
16235
|
-
function
|
|
16221
|
+
function Zg(n, e, t, r, i, s) {
|
|
16236
16222
|
const o = $("dt-link"), l = $("node-view-wrapper");
|
|
16237
16223
|
return O(), z(l, { class: "d-d-inline-block" }, {
|
|
16238
16224
|
default: q(() => [
|
|
@@ -16250,9 +16236,9 @@ function ty(n, e, t, r, i, s) {
|
|
|
16250
16236
|
_: 1
|
|
16251
16237
|
});
|
|
16252
16238
|
}
|
|
16253
|
-
const
|
|
16239
|
+
const ey = /* @__PURE__ */ de(Qg, [["render", Zg]]), ty = Xg.extend({
|
|
16254
16240
|
addNodeView() {
|
|
16255
|
-
return Ha(
|
|
16241
|
+
return Ha(ey);
|
|
16256
16242
|
},
|
|
16257
16243
|
parseHTML() {
|
|
16258
16244
|
return [
|
|
@@ -16280,25 +16266,25 @@ const ny = /* @__PURE__ */ de(ey, [["render", ty]]), ry = Zg.extend({
|
|
|
16280
16266
|
renderHTML({ HTMLAttributes: n }) {
|
|
16281
16267
|
return ["mention-component", F(this.options.HTMLAttributes, n), 0];
|
|
16282
16268
|
}
|
|
16283
|
-
}),
|
|
16269
|
+
}), ny = [
|
|
16284
16270
|
"text",
|
|
16285
16271
|
"json",
|
|
16286
16272
|
"html"
|
|
16287
|
-
],
|
|
16273
|
+
], ry = [
|
|
16288
16274
|
"start",
|
|
16289
16275
|
"end",
|
|
16290
16276
|
"all"
|
|
16291
|
-
],
|
|
16277
|
+
], iy = [
|
|
16292
16278
|
"https",
|
|
16293
16279
|
"http",
|
|
16294
16280
|
"ftp",
|
|
16295
16281
|
"ftps",
|
|
16296
16282
|
"sftp",
|
|
16297
16283
|
"mailto"
|
|
16298
|
-
],
|
|
16284
|
+
], sy = {
|
|
16299
16285
|
name: "MentionSuggestion",
|
|
16300
16286
|
components: {
|
|
16301
|
-
DtAvatar:
|
|
16287
|
+
DtAvatar: $c,
|
|
16302
16288
|
DtStack: dl
|
|
16303
16289
|
},
|
|
16304
16290
|
props: {
|
|
@@ -16316,7 +16302,7 @@ const ny = /* @__PURE__ */ de(ey, [["render", ty]]), ry = Zg.extend({
|
|
|
16316
16302
|
}
|
|
16317
16303
|
}
|
|
16318
16304
|
};
|
|
16319
|
-
function
|
|
16305
|
+
function oy(n, e, t, r, i, s) {
|
|
16320
16306
|
const o = $("dt-avatar"), l = $("dt-stack");
|
|
16321
16307
|
return O(), z(l, {
|
|
16322
16308
|
direction: "row",
|
|
@@ -16333,7 +16319,7 @@ function ay(n, e, t, r, i, s) {
|
|
|
16333
16319
|
_: 1
|
|
16334
16320
|
});
|
|
16335
16321
|
}
|
|
16336
|
-
const
|
|
16322
|
+
const ly = /* @__PURE__ */ de(sy, [["render", oy]]), ay = {
|
|
16337
16323
|
// This function comes from the user and passed to the editor directly.
|
|
16338
16324
|
// This will also activate the mention plugin on the editor
|
|
16339
16325
|
// items: ({ query }) => { return [] },
|
|
@@ -16343,7 +16329,7 @@ const cy = /* @__PURE__ */ de(ly, [["render", ay]]), dy = {
|
|
|
16343
16329
|
onStart: (t) => {
|
|
16344
16330
|
n = new ps(Ua, {
|
|
16345
16331
|
props: {
|
|
16346
|
-
itemComponent: wr(
|
|
16332
|
+
itemComponent: wr(ly),
|
|
16347
16333
|
itemType: "mention",
|
|
16348
16334
|
...t
|
|
16349
16335
|
},
|
|
@@ -16372,10 +16358,10 @@ const cy = /* @__PURE__ */ de(ly, [["render", ay]]), dy = {
|
|
|
16372
16358
|
}
|
|
16373
16359
|
};
|
|
16374
16360
|
}
|
|
16375
|
-
},
|
|
16361
|
+
}, cy = {
|
|
16376
16362
|
name: "DtRichTextEditor",
|
|
16377
16363
|
components: {
|
|
16378
|
-
EditorContent:
|
|
16364
|
+
EditorContent: xm
|
|
16379
16365
|
},
|
|
16380
16366
|
props: {
|
|
16381
16367
|
/**
|
|
@@ -16431,7 +16417,7 @@ const cy = /* @__PURE__ */ de(ly, [["render", ay]]), dy = {
|
|
|
16431
16417
|
type: [Boolean, String, Number],
|
|
16432
16418
|
default: !1,
|
|
16433
16419
|
validator(n) {
|
|
16434
|
-
return typeof n == "string" ?
|
|
16420
|
+
return typeof n == "string" ? ry.includes(n) : !0;
|
|
16435
16421
|
}
|
|
16436
16422
|
},
|
|
16437
16423
|
/**
|
|
@@ -16444,7 +16430,7 @@ const cy = /* @__PURE__ */ de(ly, [["render", ay]]), dy = {
|
|
|
16444
16430
|
type: String,
|
|
16445
16431
|
default: "text",
|
|
16446
16432
|
validator(n) {
|
|
16447
|
-
return
|
|
16433
|
+
return ny.includes(n);
|
|
16448
16434
|
}
|
|
16449
16435
|
},
|
|
16450
16436
|
/**
|
|
@@ -16512,21 +16498,21 @@ const cy = /* @__PURE__ */ de(ly, [["render", ay]]), dy = {
|
|
|
16512
16498
|
computed: {
|
|
16513
16499
|
extensions() {
|
|
16514
16500
|
const n = [
|
|
16515
|
-
|
|
16501
|
+
Tm,
|
|
16502
|
+
Bm,
|
|
16516
16503
|
Fm,
|
|
16517
|
-
|
|
16504
|
+
vm,
|
|
16505
|
+
jm,
|
|
16506
|
+
fg,
|
|
16518
16507
|
Nm,
|
|
16519
|
-
|
|
16520
|
-
mg,
|
|
16521
|
-
Im,
|
|
16508
|
+
bg,
|
|
16522
16509
|
Sg,
|
|
16523
|
-
|
|
16524
|
-
xg
|
|
16510
|
+
kg
|
|
16525
16511
|
];
|
|
16526
|
-
if (this.link && n.push(this.getExtension(
|
|
16527
|
-
|
|
16512
|
+
if (this.link && n.push(this.getExtension(Gg, this.link)), n.push(
|
|
16513
|
+
Dm.configure({ placeholder: this.placeholder })
|
|
16528
16514
|
), this.allowLineBreaks || n.push(
|
|
16529
|
-
|
|
16515
|
+
Am.extend({
|
|
16530
16516
|
addKeyboardShortcuts() {
|
|
16531
16517
|
return {
|
|
16532
16518
|
Enter: () => !0,
|
|
@@ -16539,21 +16525,21 @@ const cy = /* @__PURE__ */ de(ly, [["render", ay]]), dy = {
|
|
|
16539
16525
|
};
|
|
16540
16526
|
}
|
|
16541
16527
|
})
|
|
16542
|
-
), n.push(
|
|
16528
|
+
), n.push(hg.extend({ inclusive: !1 }).configure({
|
|
16543
16529
|
autolink: !0,
|
|
16544
|
-
protocols:
|
|
16530
|
+
protocols: iy
|
|
16545
16531
|
})), this.mentionSuggestion) {
|
|
16546
|
-
const e = { ...this.mentionSuggestion, ...
|
|
16547
|
-
n.push(
|
|
16532
|
+
const e = { ...this.mentionSuggestion, ...ay };
|
|
16533
|
+
n.push(ty.configure({ suggestion: e }));
|
|
16548
16534
|
}
|
|
16549
|
-
return n.push(
|
|
16535
|
+
return n.push(Vg), n.push(xg.configure({
|
|
16550
16536
|
types: ["paragraph"],
|
|
16551
16537
|
defaultAlignment: "left"
|
|
16552
|
-
})), n.push(
|
|
16538
|
+
})), n.push(Om.configure({
|
|
16553
16539
|
HTMLAttributes: {
|
|
16554
16540
|
class: "dt-rich-text-editor--code-block"
|
|
16555
16541
|
}
|
|
16556
|
-
})), n.push(
|
|
16542
|
+
})), n.push(mg.configure({
|
|
16557
16543
|
itemTypeName: "listItem"
|
|
16558
16544
|
})), n;
|
|
16559
16545
|
},
|
|
@@ -16597,7 +16583,7 @@ const cy = /* @__PURE__ */ de(ly, [["render", ay]]), dy = {
|
|
|
16597
16583
|
},
|
|
16598
16584
|
methods: {
|
|
16599
16585
|
createEditor() {
|
|
16600
|
-
this.editor = new
|
|
16586
|
+
this.editor = new Sm({
|
|
16601
16587
|
autofocus: this.autoFocus,
|
|
16602
16588
|
content: this.modelValue,
|
|
16603
16589
|
editable: this.editable,
|
|
@@ -16650,48 +16636,41 @@ const cy = /* @__PURE__ */ de(ly, [["render", ay]]), dy = {
|
|
|
16650
16636
|
}
|
|
16651
16637
|
}
|
|
16652
16638
|
};
|
|
16653
|
-
function
|
|
16639
|
+
function dy(n, e, t, r, i, s) {
|
|
16654
16640
|
const o = $("editor-content");
|
|
16655
16641
|
return O(), z(o, {
|
|
16656
16642
|
editor: i.editor,
|
|
16657
|
-
"data-qa": "dt-rich-text-editor"
|
|
16643
|
+
"data-qa": "dt-rich-text-editor",
|
|
16644
|
+
class: "dt-rich-text-editor"
|
|
16658
16645
|
}, null, 8, ["editor"]);
|
|
16659
16646
|
}
|
|
16660
|
-
const
|
|
16647
|
+
const gy = /* @__PURE__ */ de(cy, [["render", dy]]);
|
|
16661
16648
|
export {
|
|
16662
16649
|
jr as A,
|
|
16663
|
-
|
|
16664
|
-
cl as C,
|
|
16665
|
-
yy as D,
|
|
16650
|
+
py as D,
|
|
16666
16651
|
xn as L,
|
|
16667
|
-
|
|
16668
|
-
|
|
16669
|
-
|
|
16670
|
-
|
|
16671
|
-
|
|
16672
|
-
|
|
16673
|
-
|
|
16674
|
-
|
|
16675
|
-
|
|
16652
|
+
Zc as M,
|
|
16653
|
+
Ut as P,
|
|
16654
|
+
ry as R,
|
|
16655
|
+
Yc as S,
|
|
16656
|
+
gy as a,
|
|
16657
|
+
ny as b,
|
|
16658
|
+
Uc as c,
|
|
16659
|
+
Wc as d,
|
|
16660
|
+
ud as e,
|
|
16676
16661
|
Ui as f,
|
|
16677
|
-
|
|
16678
|
-
|
|
16679
|
-
|
|
16680
|
-
|
|
16681
|
-
|
|
16682
|
-
|
|
16683
|
-
|
|
16684
|
-
|
|
16685
|
-
|
|
16686
|
-
|
|
16687
|
-
|
|
16688
|
-
|
|
16689
|
-
|
|
16690
|
-
|
|
16691
|
-
ud as u,
|
|
16692
|
-
fd as v,
|
|
16693
|
-
gy as w,
|
|
16694
|
-
Mc as x,
|
|
16695
|
-
Ut as y,
|
|
16696
|
-
Sc as z
|
|
16662
|
+
dl as g,
|
|
16663
|
+
$c as h,
|
|
16664
|
+
vs as i,
|
|
16665
|
+
Nc as j,
|
|
16666
|
+
Dc as k,
|
|
16667
|
+
ws as l,
|
|
16668
|
+
Ic as m,
|
|
16669
|
+
Rc as n,
|
|
16670
|
+
Os as o,
|
|
16671
|
+
qr as p,
|
|
16672
|
+
Ac as q,
|
|
16673
|
+
Tc as r,
|
|
16674
|
+
St as s,
|
|
16675
|
+
cl as t
|
|
16697
16676
|
};
|