@dialpad/dialtone-vue 4.4.1 → 4.5.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/{Datepicker-CGFa1nGm.js → Datepicker-D-Lgvthq.js} +17 -5
- package/dist/Datepicker-D-Lgvthq.js.map +1 -0
- package/dist/Datepicker-DmKOuf5y.cjs +2 -0
- package/dist/Datepicker-DmKOuf5y.cjs.map +1 -0
- package/dist/EmojiPicker-CXFd-iVj.cjs +2 -0
- package/dist/EmojiPicker-CXFd-iVj.cjs.map +1 -0
- package/dist/{EmojiPicker-BllVwJf4.js → EmojiPicker-D46lLRMp.js} +75 -41
- package/dist/EmojiPicker-D46lLRMp.js.map +1 -0
- package/dist/{ForceLinkify-bO3ug94b.js → ForceLinkify-DuAo3TMB.js} +1 -1
- package/dist/{ForceLinkify-bO3ug94b.js.map → ForceLinkify-DuAo3TMB.js.map} +1 -1
- package/dist/{ForceLinkify-CI1tkUBf.cjs → ForceLinkify-kQ_kWKVm.cjs} +1 -1
- package/dist/{ForceLinkify-CI1tkUBf.cjs.map → ForceLinkify-kQ_kWKVm.cjs.map} +1 -1
- package/dist/{MarkdownRenderer-B6oyniLV.cjs → MarkdownRenderer-C5wdjC5_.cjs} +1 -1
- package/dist/{MarkdownRenderer-B6oyniLV.cjs.map → MarkdownRenderer-C5wdjC5_.cjs.map} +1 -1
- package/dist/{MarkdownRenderer-D-EV50_M.js → MarkdownRenderer-eMwmPygx.js} +1 -1
- package/dist/{MarkdownRenderer-D-EV50_M.js.map → MarkdownRenderer-eMwmPygx.js.map} +1 -1
- package/dist/RichTextEditor-7eY8gy9u.cjs +11 -0
- package/dist/RichTextEditor-7eY8gy9u.cjs.map +1 -0
- package/dist/{RichTextEditor-Cz2VXb7-.js → RichTextEditor-DaOHmXD_.js} +362 -1254
- package/dist/RichTextEditor-DaOHmXD_.js.map +1 -0
- package/dist/{Scroller-JDoDYC5V.js → Scroller-B1xwv6TG.js} +1 -1
- package/dist/{Scroller-JDoDYC5V.js.map → Scroller-B1xwv6TG.js.map} +1 -1
- package/dist/{Scroller-Du2kJsTR.cjs → Scroller-pAU8UWIH.cjs} +1 -1
- package/dist/{Scroller-Du2kJsTR.cjs.map → Scroller-pAU8UWIH.cjs.map} +1 -1
- package/dist/Slider-D2cDYZcJ.cjs +2 -0
- package/dist/Slider-D2cDYZcJ.cjs.map +1 -0
- package/dist/Slider-Du45PVLU.js +1188 -0
- package/dist/Slider-Du45PVLU.js.map +1 -0
- package/dist/{TextList-D40u4g4T.js → TextList-7RwngSie.js} +1 -1
- package/dist/{TextList-D40u4g4T.js.map → TextList-7RwngSie.js.map} +1 -1
- package/dist/{TextList-rS1MQdPB.cjs → TextList-CLUdOdlp.cjs} +1 -1
- package/dist/{TextList-rS1MQdPB.cjs.map → TextList-CLUdOdlp.cjs.map} +1 -1
- package/dist/{TextListItem-CF6DzdvT.cjs → TextListItem-B-bhrqik.cjs} +1 -1
- package/dist/{TextListItem-CF6DzdvT.cjs.map → TextListItem-B-bhrqik.cjs.map} +1 -1
- package/dist/{TextListItem-PHgDIWV1.js → TextListItem-D0UmIR_q.js} +1 -1
- package/dist/{TextListItem-PHgDIWV1.js.map → TextListItem-D0UmIR_q.js.map} +1 -1
- package/dist/{Toast-CN9x3jKH.cjs → Toast-57Ts-hX9.cjs} +1 -1
- package/dist/{Toast-CN9x3jKH.cjs.map → Toast-57Ts-hX9.cjs.map} +1 -1
- package/dist/{Toast-DVUE2_fV.js → Toast-BNhGD6l8.js} +1 -1
- package/dist/{Toast-DVUE2_fV.js.map → Toast-BNhGD6l8.js.map} +1 -1
- package/dist/component-documentation.json +1 -1
- package/dist/components/ButtonGroup/ButtonGroup.vue.d.ts.map +1 -1
- package/dist/components/Codeblock/Codeblock.vue.d.ts.map +1 -1
- package/dist/components/Datepicker/Datepicker.vue.d.ts.map +1 -1
- package/dist/components/Datepicker/Modules/Calendar.vue.d.ts.map +1 -1
- package/dist/components/Datepicker/Modules/MonthYearPicker.vue.d.ts.map +1 -1
- package/dist/components/DescriptionList/DescriptionList.vue.d.ts.map +1 -1
- package/dist/components/Emoji/Emoji.vue.d.ts.map +1 -1
- package/dist/components/EmojiPicker/EmojiPicker.vue.d.ts.map +1 -1
- package/dist/components/EmojiPicker/Modules/EmojiDescription.vue.d.ts.map +1 -1
- package/dist/components/EmojiPicker/Modules/EmojiSearch.vue.d.ts.map +1 -1
- package/dist/components/EmojiPicker/Modules/EmojiSelector.vue.d.ts.map +1 -1
- package/dist/components/EmojiPicker/Modules/EmojiSkinSelector.vue.d.ts.map +1 -1
- package/dist/components/EmojiPicker/Modules/EmojiTabset.vue.d.ts.map +1 -1
- package/dist/components/EmptyState/EmptyState.vue.d.ts.map +1 -1
- package/dist/components/KeyboardShortcut/KeyboardShortcut.vue.d.ts.map +1 -1
- package/dist/components/LazyShow/LazyShow.vue.d.ts.map +1 -1
- package/dist/components/ModeIsland/ModeIsland.vue.d.ts.map +1 -1
- package/dist/components/MotionText/MotionText.vue.d.ts.map +1 -1
- package/dist/components/MotionText/MotionTextConstants.d.ts +72 -0
- package/dist/components/MotionText/MotionTextConstants.d.ts.map +1 -1
- package/dist/components/MotionText/index.d.ts +1 -1
- package/dist/components/MotionText/utils.d.ts +9 -0
- package/dist/components/MotionText/utils.d.ts.map +1 -0
- package/dist/components/Skeleton/Skeleton.vue.d.ts.map +1 -1
- package/dist/components/Slider/Composables/UseSliderCollisionAvoidance.d.ts +25 -0
- package/dist/components/Slider/Composables/UseSliderCollisionAvoidance.d.ts.map +1 -0
- package/dist/components/Slider/Composables/UseSliderDevWarnings.d.ts +5 -0
- package/dist/components/Slider/Composables/UseSliderDevWarnings.d.ts.map +1 -0
- package/dist/components/Slider/Composables/UseSliderDirection.d.ts +4 -0
- package/dist/components/Slider/Composables/UseSliderDirection.d.ts.map +1 -0
- package/dist/components/Slider/Composables/UseSliderGeometry.d.ts +88 -0
- package/dist/components/Slider/Composables/UseSliderGeometry.d.ts.map +1 -0
- package/dist/components/Slider/Composables/UseSliderInteraction.d.ts +33 -0
- package/dist/components/Slider/Composables/UseSliderInteraction.d.ts.map +1 -0
- package/dist/components/Slider/Composables/UseSliderMagneticSnap.d.ts +8 -0
- package/dist/components/Slider/Composables/UseSliderMagneticSnap.d.ts.map +1 -0
- package/dist/components/Slider/Composables/UseSliderMarksAndTicks.d.ts +13 -0
- package/dist/components/Slider/Composables/UseSliderMarksAndTicks.d.ts.map +1 -0
- package/dist/components/Slider/Composables/UseSliderTooltipReadout.d.ts +10 -0
- package/dist/components/Slider/Composables/UseSliderTooltipReadout.d.ts.map +1 -0
- package/dist/components/Slider/Composables/UseSliderValue.d.ts +16 -0
- package/dist/components/Slider/Composables/UseSliderValue.d.ts.map +1 -0
- package/dist/components/Slider/Slider.vue.d.ts +304 -0
- package/dist/components/Slider/Slider.vue.d.ts.map +1 -0
- package/dist/components/Slider/SliderConstants.d.ts +7 -0
- package/dist/components/Slider/SliderConstants.d.ts.map +1 -0
- package/dist/components/Slider/index.d.ts +3 -0
- package/dist/components/Slider/index.d.ts.map +1 -0
- package/dist/components/Slider/utils.d.ts +8 -0
- package/dist/components/Slider/utils.d.ts.map +1 -0
- package/dist/dialtone-vue.cjs +1 -1
- package/dist/dialtone-vue.js +26 -24
- package/dist/floating-ui.dom-D2zQ_96p.cjs +2 -0
- package/dist/floating-ui.dom-D2zQ_96p.cjs.map +1 -0
- package/dist/floating-ui.dom-j5GI2lJG.js +963 -0
- package/dist/floating-ui.dom-j5GI2lJG.js.map +1 -0
- package/dist/index.d.ts +1 -0
- package/dist/lib/button-group/button-group.cjs +1 -1
- package/dist/lib/button-group/button-group.cjs.map +1 -1
- package/dist/lib/button-group/button-group.js +2 -1
- package/dist/lib/button-group/button-group.js.map +1 -1
- package/dist/lib/codeblock/codeblock.cjs +1 -1
- package/dist/lib/codeblock/codeblock.cjs.map +1 -1
- package/dist/lib/codeblock/codeblock.js +7 -1
- package/dist/lib/codeblock/codeblock.js.map +1 -1
- package/dist/lib/datepicker/datepicker.cjs +1 -1
- package/dist/lib/datepicker/datepicker.js +1 -1
- package/dist/lib/datepicker/index.cjs +1 -1
- package/dist/lib/datepicker/index.js +1 -1
- package/dist/lib/description-list/description-list.cjs +1 -1
- package/dist/lib/description-list/description-list.cjs.map +1 -1
- package/dist/lib/description-list/description-list.js +14 -5
- package/dist/lib/description-list/description-list.js.map +1 -1
- package/dist/lib/emoji/emoji.cjs +1 -1
- package/dist/lib/emoji/emoji.cjs.map +1 -1
- package/dist/lib/emoji/emoji.js +5 -1
- package/dist/lib/emoji/emoji.js.map +1 -1
- package/dist/lib/emoji-picker/emoji-picker.cjs +1 -1
- package/dist/lib/emoji-picker/emoji-picker.js +1 -1
- package/dist/lib/emoji-picker/index.cjs +1 -1
- package/dist/lib/emoji-picker/index.js +1 -1
- package/dist/lib/empty-state/empty-state.cjs +1 -1
- package/dist/lib/empty-state/empty-state.cjs.map +1 -1
- package/dist/lib/empty-state/empty-state.js +6 -3
- package/dist/lib/empty-state/empty-state.js.map +1 -1
- package/dist/lib/keyboard-shortcut/keyboard-shortcut.cjs +1 -1
- package/dist/lib/keyboard-shortcut/keyboard-shortcut.cjs.map +1 -1
- package/dist/lib/keyboard-shortcut/keyboard-shortcut.js +8 -2
- package/dist/lib/keyboard-shortcut/keyboard-shortcut.js.map +1 -1
- package/dist/lib/lazy-show/lazy-show.cjs +1 -1
- package/dist/lib/lazy-show/lazy-show.cjs.map +1 -1
- package/dist/lib/lazy-show/lazy-show.js +10 -10
- package/dist/lib/lazy-show/lazy-show.js.map +1 -1
- package/dist/lib/mode-island/mode-island.cjs +1 -1
- package/dist/lib/mode-island/mode-island.cjs.map +1 -1
- package/dist/lib/mode-island/mode-island.js +1 -0
- package/dist/lib/mode-island/mode-island.js.map +1 -1
- package/dist/lib/motion-text/index.cjs +1 -1
- package/dist/lib/motion-text/index.js +3 -3
- package/dist/lib/motion-text/motion-text-constants.cjs +1 -1
- package/dist/lib/motion-text/motion-text-constants.cjs.map +1 -1
- package/dist/lib/motion-text/motion-text-constants.js +64 -2
- package/dist/lib/motion-text/motion-text-constants.js.map +1 -1
- package/dist/lib/motion-text/motion-text.cjs +1 -1
- package/dist/lib/motion-text/motion-text.cjs.map +1 -1
- package/dist/lib/motion-text/motion-text.js +186 -146
- package/dist/lib/motion-text/motion-text.js.map +1 -1
- package/dist/lib/motion-text/utils.cjs +2 -0
- package/dist/lib/motion-text/utils.cjs.map +1 -0
- package/dist/lib/motion-text/utils.js +24 -0
- package/dist/lib/motion-text/utils.js.map +1 -0
- package/dist/lib/rich-text-editor/force-linkify.cjs +1 -1
- package/dist/lib/rich-text-editor/force-linkify.js +1 -1
- package/dist/lib/rich-text-editor/index.cjs +1 -1
- package/dist/lib/rich-text-editor/index.js +1 -1
- package/dist/lib/rich-text-editor/markdown-renderer.cjs +1 -1
- package/dist/lib/rich-text-editor/markdown-renderer.js +1 -1
- package/dist/lib/rich-text-editor/rich-text-editor.cjs +1 -1
- package/dist/lib/rich-text-editor/rich-text-editor.js +1 -1
- package/dist/lib/scroller/index.cjs +1 -1
- package/dist/lib/scroller/index.js +1 -1
- package/dist/lib/scroller/scroller.cjs +1 -1
- package/dist/lib/scroller/scroller.js +1 -1
- package/dist/lib/skeleton/skeleton.cjs +1 -1
- package/dist/lib/skeleton/skeleton.cjs.map +1 -1
- package/dist/lib/skeleton/skeleton.js +1 -0
- package/dist/lib/skeleton/skeleton.js.map +1 -1
- package/dist/lib/slider/index.cjs +1 -0
- package/dist/lib/slider/index.js +2 -0
- package/dist/lib/slider/slider.cjs +1 -0
- package/dist/lib/slider/slider.js +2 -0
- package/dist/lib/slider/utils.cjs +2 -0
- package/dist/lib/slider/utils.cjs.map +1 -0
- package/dist/lib/slider/utils.js +32 -0
- package/dist/lib/slider/utils.js.map +1 -0
- package/dist/lib/text-list/index.cjs +1 -1
- package/dist/lib/text-list/index.js +2 -2
- package/dist/lib/text-list/text-list-item.cjs +1 -1
- package/dist/lib/text-list/text-list-item.js +1 -1
- package/dist/lib/text-list/text-list.cjs +1 -1
- package/dist/lib/text-list/text-list.js +1 -1
- package/dist/lib/toast/index.cjs +1 -1
- package/dist/lib/toast/index.js +1 -1
- package/dist/lib/toast/toast.cjs +1 -1
- package/dist/lib/toast/toast.js +1 -1
- package/package.json +5 -5
- package/dist/Datepicker-CGFa1nGm.js.map +0 -1
- package/dist/Datepicker-DkGmnVc8.cjs +0 -2
- package/dist/Datepicker-DkGmnVc8.cjs.map +0 -1
- package/dist/EmojiPicker-BllVwJf4.js.map +0 -1
- package/dist/EmojiPicker-KO1yhODv.cjs +0 -2
- package/dist/EmojiPicker-KO1yhODv.cjs.map +0 -1
- package/dist/RichTextEditor-Cz2VXb7-.js.map +0 -1
- package/dist/RichTextEditor-EHgahp8r.cjs +0 -11
- package/dist/RichTextEditor-EHgahp8r.cjs.map +0 -1
|
@@ -4,946 +4,54 @@ import { codeToEmojiData as a, emojiRegex as o, emojiShortCodeRegex as s, getEmo
|
|
|
4
4
|
import u from "./lib/avatar/avatar.js";
|
|
5
5
|
import d from "./lib/badge/badge.js";
|
|
6
6
|
import f from "./lib/text/text.js";
|
|
7
|
-
import
|
|
8
|
-
import { DialtoneLocalization as
|
|
9
|
-
import
|
|
10
|
-
import
|
|
11
|
-
import
|
|
12
|
-
import
|
|
13
|
-
import
|
|
14
|
-
import
|
|
15
|
-
import { Editor as
|
|
16
|
-
import { t as
|
|
17
|
-
import {
|
|
18
|
-
import {
|
|
19
|
-
import {
|
|
20
|
-
import {
|
|
21
|
-
import {
|
|
22
|
-
import {
|
|
23
|
-
import {
|
|
24
|
-
import {
|
|
25
|
-
import
|
|
26
|
-
import
|
|
27
|
-
import
|
|
28
|
-
import
|
|
29
|
-
import
|
|
30
|
-
import
|
|
31
|
-
import
|
|
32
|
-
import
|
|
33
|
-
import
|
|
34
|
-
import
|
|
35
|
-
import
|
|
36
|
-
import
|
|
37
|
-
import
|
|
38
|
-
import
|
|
39
|
-
import
|
|
40
|
-
import
|
|
41
|
-
import {
|
|
42
|
-
import
|
|
43
|
-
import
|
|
44
|
-
import
|
|
45
|
-
import
|
|
46
|
-
import
|
|
47
|
-
import
|
|
48
|
-
|
|
49
|
-
var yt = [
|
|
50
|
-
"top",
|
|
51
|
-
"right",
|
|
52
|
-
"bottom",
|
|
53
|
-
"left"
|
|
54
|
-
], bt = ["start", "end"], xt = /* @__PURE__ */ yt.reduce((e, t) => e.concat(t, t + "-" + bt[0], t + "-" + bt[1]), []), R = Math.min, z = Math.max, St = Math.round, B = (e) => ({
|
|
55
|
-
x: e,
|
|
56
|
-
y: e
|
|
57
|
-
}), Ct = {
|
|
58
|
-
left: "right",
|
|
59
|
-
right: "left",
|
|
60
|
-
bottom: "top",
|
|
61
|
-
top: "bottom"
|
|
62
|
-
};
|
|
63
|
-
function wt(e, t, n) {
|
|
64
|
-
return z(e, R(t, n));
|
|
65
|
-
}
|
|
66
|
-
function V(e, t) {
|
|
67
|
-
return typeof e == "function" ? e(t) : e;
|
|
68
|
-
}
|
|
69
|
-
function H(e) {
|
|
70
|
-
return e.split("-")[0];
|
|
71
|
-
}
|
|
72
|
-
function U(e) {
|
|
73
|
-
return e.split("-")[1];
|
|
74
|
-
}
|
|
75
|
-
function Tt(e) {
|
|
76
|
-
return e === "x" ? "y" : "x";
|
|
77
|
-
}
|
|
78
|
-
function Et(e) {
|
|
79
|
-
return e === "y" ? "height" : "width";
|
|
80
|
-
}
|
|
81
|
-
function W(e) {
|
|
82
|
-
let t = e[0];
|
|
83
|
-
return t === "t" || t === "b" ? "y" : "x";
|
|
84
|
-
}
|
|
85
|
-
function Dt(e) {
|
|
86
|
-
return Tt(W(e));
|
|
87
|
-
}
|
|
88
|
-
function Ot(e, t, n) {
|
|
89
|
-
n === void 0 && (n = !1);
|
|
90
|
-
let r = U(e), i = Dt(e), a = Et(i), o = i === "x" ? r === (n ? "end" : "start") ? "right" : "left" : r === "start" ? "bottom" : "top";
|
|
91
|
-
return t.reference[a] > t.floating[a] && (o = Lt(o)), [o, Lt(o)];
|
|
92
|
-
}
|
|
93
|
-
function kt(e) {
|
|
94
|
-
let t = Lt(e);
|
|
95
|
-
return [
|
|
96
|
-
At(e),
|
|
97
|
-
t,
|
|
98
|
-
At(t)
|
|
99
|
-
];
|
|
100
|
-
}
|
|
101
|
-
function At(e) {
|
|
102
|
-
return e.includes("start") ? e.replace("start", "end") : e.replace("end", "start");
|
|
103
|
-
}
|
|
104
|
-
var jt = ["left", "right"], Mt = ["right", "left"], Nt = ["top", "bottom"], Pt = ["bottom", "top"];
|
|
105
|
-
function Ft(e, t, n) {
|
|
106
|
-
switch (e) {
|
|
107
|
-
case "top":
|
|
108
|
-
case "bottom": return n ? t ? Mt : jt : t ? jt : Mt;
|
|
109
|
-
case "left":
|
|
110
|
-
case "right": return t ? Nt : Pt;
|
|
111
|
-
default: return [];
|
|
112
|
-
}
|
|
113
|
-
}
|
|
114
|
-
function It(e, t, n, r) {
|
|
115
|
-
let i = U(e), a = Ft(H(e), n === "start", r);
|
|
116
|
-
return i && (a = a.map((e) => e + "-" + i), t && (a = a.concat(a.map(At)))), a;
|
|
117
|
-
}
|
|
118
|
-
function Lt(e) {
|
|
119
|
-
let t = H(e);
|
|
120
|
-
return Ct[t] + e.slice(t.length);
|
|
121
|
-
}
|
|
122
|
-
function Rt(e) {
|
|
123
|
-
return {
|
|
124
|
-
top: 0,
|
|
125
|
-
right: 0,
|
|
126
|
-
bottom: 0,
|
|
127
|
-
left: 0,
|
|
128
|
-
...e
|
|
129
|
-
};
|
|
130
|
-
}
|
|
131
|
-
function zt(e) {
|
|
132
|
-
return typeof e == "number" ? {
|
|
133
|
-
top: e,
|
|
134
|
-
right: e,
|
|
135
|
-
bottom: e,
|
|
136
|
-
left: e
|
|
137
|
-
} : Rt(e);
|
|
138
|
-
}
|
|
139
|
-
function G(e) {
|
|
140
|
-
let { x: t, y: n, width: r, height: i } = e;
|
|
141
|
-
return {
|
|
142
|
-
width: r,
|
|
143
|
-
height: i,
|
|
144
|
-
top: n,
|
|
145
|
-
left: t,
|
|
146
|
-
right: t + r,
|
|
147
|
-
bottom: n + i,
|
|
148
|
-
x: t,
|
|
149
|
-
y: n
|
|
150
|
-
};
|
|
151
|
-
}
|
|
152
|
-
//#endregion
|
|
153
|
-
//#region ../../node_modules/.pnpm/@floating-ui+core@1.7.5/node_modules/@floating-ui/core/dist/floating-ui.core.mjs
|
|
154
|
-
function Bt(e, t, n) {
|
|
155
|
-
let { reference: r, floating: i } = e, a = W(t), o = Dt(t), s = Et(o), c = H(t), l = a === "y", u = r.x + r.width / 2 - i.width / 2, d = r.y + r.height / 2 - i.height / 2, f = r[s] / 2 - i[s] / 2, p;
|
|
156
|
-
switch (c) {
|
|
157
|
-
case "top":
|
|
158
|
-
p = {
|
|
159
|
-
x: u,
|
|
160
|
-
y: r.y - i.height
|
|
161
|
-
};
|
|
162
|
-
break;
|
|
163
|
-
case "bottom":
|
|
164
|
-
p = {
|
|
165
|
-
x: u,
|
|
166
|
-
y: r.y + r.height
|
|
167
|
-
};
|
|
168
|
-
break;
|
|
169
|
-
case "right":
|
|
170
|
-
p = {
|
|
171
|
-
x: r.x + r.width,
|
|
172
|
-
y: d
|
|
173
|
-
};
|
|
174
|
-
break;
|
|
175
|
-
case "left":
|
|
176
|
-
p = {
|
|
177
|
-
x: r.x - i.width,
|
|
178
|
-
y: d
|
|
179
|
-
};
|
|
180
|
-
break;
|
|
181
|
-
default: p = {
|
|
182
|
-
x: r.x,
|
|
183
|
-
y: r.y
|
|
184
|
-
};
|
|
185
|
-
}
|
|
186
|
-
switch (U(t)) {
|
|
187
|
-
case "start":
|
|
188
|
-
p[o] -= f * (n && l ? -1 : 1);
|
|
189
|
-
break;
|
|
190
|
-
case "end":
|
|
191
|
-
p[o] += f * (n && l ? -1 : 1);
|
|
192
|
-
break;
|
|
193
|
-
}
|
|
194
|
-
return p;
|
|
195
|
-
}
|
|
196
|
-
async function Vt(e, t) {
|
|
197
|
-
t === void 0 && (t = {});
|
|
198
|
-
let { x: n, y: r, platform: i, rects: a, elements: o, strategy: s } = e, { boundary: c = "clippingAncestors", rootBoundary: l = "viewport", elementContext: u = "floating", altBoundary: d = !1, padding: f = 0 } = V(t, e), p = zt(f), m = o[d ? u === "floating" ? "reference" : "floating" : u], h = G(await i.getClippingRect({
|
|
199
|
-
element: await (i.isElement == null ? void 0 : i.isElement(m)) ?? !0 ? m : m.contextElement || await (i.getDocumentElement == null ? void 0 : i.getDocumentElement(o.floating)),
|
|
200
|
-
boundary: c,
|
|
201
|
-
rootBoundary: l,
|
|
202
|
-
strategy: s
|
|
203
|
-
})), g = u === "floating" ? {
|
|
204
|
-
x: n,
|
|
205
|
-
y: r,
|
|
206
|
-
width: a.floating.width,
|
|
207
|
-
height: a.floating.height
|
|
208
|
-
} : a.reference, _ = await (i.getOffsetParent == null ? void 0 : i.getOffsetParent(o.floating)), v = await (i.isElement == null ? void 0 : i.isElement(_)) && await (i.getScale == null ? void 0 : i.getScale(_)) || {
|
|
209
|
-
x: 1,
|
|
210
|
-
y: 1
|
|
211
|
-
}, y = G(i.convertOffsetParentRelativeRectToViewportRelativeRect ? await i.convertOffsetParentRelativeRectToViewportRelativeRect({
|
|
212
|
-
elements: o,
|
|
213
|
-
rect: g,
|
|
214
|
-
offsetParent: _,
|
|
215
|
-
strategy: s
|
|
216
|
-
}) : g);
|
|
217
|
-
return {
|
|
218
|
-
top: (h.top - y.top + p.top) / v.y,
|
|
219
|
-
bottom: (y.bottom - h.bottom + p.bottom) / v.y,
|
|
220
|
-
left: (h.left - y.left + p.left) / v.x,
|
|
221
|
-
right: (y.right - h.right + p.right) / v.x
|
|
222
|
-
};
|
|
223
|
-
}
|
|
224
|
-
var Ht = 50, Ut = async (e, t, n) => {
|
|
225
|
-
let { placement: r = "bottom", strategy: i = "absolute", middleware: a = [], platform: o } = n, s = o.detectOverflow ? o : {
|
|
226
|
-
...o,
|
|
227
|
-
detectOverflow: Vt
|
|
228
|
-
}, c = await (o.isRTL == null ? void 0 : o.isRTL(t)), l = await o.getElementRects({
|
|
229
|
-
reference: e,
|
|
230
|
-
floating: t,
|
|
231
|
-
strategy: i
|
|
232
|
-
}), { x: u, y: d } = Bt(l, r, c), f = r, p = 0, m = {};
|
|
233
|
-
for (let n = 0; n < a.length; n++) {
|
|
234
|
-
let h = a[n];
|
|
235
|
-
if (!h) continue;
|
|
236
|
-
let { name: g, fn: _ } = h, { x: v, y, data: b, reset: x } = await _({
|
|
237
|
-
x: u,
|
|
238
|
-
y: d,
|
|
239
|
-
initialPlacement: r,
|
|
240
|
-
placement: f,
|
|
241
|
-
strategy: i,
|
|
242
|
-
middlewareData: m,
|
|
243
|
-
rects: l,
|
|
244
|
-
platform: s,
|
|
245
|
-
elements: {
|
|
246
|
-
reference: e,
|
|
247
|
-
floating: t
|
|
248
|
-
}
|
|
249
|
-
});
|
|
250
|
-
u = v ?? u, d = y ?? d, m[g] = {
|
|
251
|
-
...m[g],
|
|
252
|
-
...b
|
|
253
|
-
}, x && p < Ht && (p++, typeof x == "object" && (x.placement && (f = x.placement), x.rects && (l = x.rects === !0 ? await o.getElementRects({
|
|
254
|
-
reference: e,
|
|
255
|
-
floating: t,
|
|
256
|
-
strategy: i
|
|
257
|
-
}) : x.rects), {x: u, y: d} = Bt(l, f, c)), n = -1);
|
|
258
|
-
}
|
|
259
|
-
return {
|
|
260
|
-
x: u,
|
|
261
|
-
y: d,
|
|
262
|
-
placement: f,
|
|
263
|
-
strategy: i,
|
|
264
|
-
middlewareData: m
|
|
265
|
-
};
|
|
266
|
-
}, Wt = (e) => ({
|
|
267
|
-
name: "arrow",
|
|
268
|
-
options: e,
|
|
269
|
-
async fn(t) {
|
|
270
|
-
let { x: n, y: r, placement: i, rects: a, platform: o, elements: s, middlewareData: c } = t, { element: l, padding: u = 0 } = V(e, t) || {};
|
|
271
|
-
if (l == null) return {};
|
|
272
|
-
let d = zt(u), f = {
|
|
273
|
-
x: n,
|
|
274
|
-
y: r
|
|
275
|
-
}, p = Dt(i), m = Et(p), h = await o.getDimensions(l), g = p === "y", _ = g ? "top" : "left", v = g ? "bottom" : "right", y = g ? "clientHeight" : "clientWidth", b = a.reference[m] + a.reference[p] - f[p] - a.floating[m], x = f[p] - a.reference[p], S = await (o.getOffsetParent == null ? void 0 : o.getOffsetParent(l)), C = S ? S[y] : 0;
|
|
276
|
-
(!C || !await (o.isElement == null ? void 0 : o.isElement(S))) && (C = s.floating[y] || a.floating[m]);
|
|
277
|
-
let w = b / 2 - x / 2, T = C / 2 - h[m] / 2 - 1, E = R(d[_], T), ee = R(d[v], T), te = E, ne = C - h[m] - ee, D = C / 2 - h[m] / 2 + w, re = wt(te, D, ne), ie = !c.arrow && U(i) != null && D !== re && a.reference[m] / 2 - (D < te ? E : ee) - h[m] / 2 < 0, O = ie ? D < te ? D - te : D - ne : 0;
|
|
278
|
-
return {
|
|
279
|
-
[p]: f[p] + O,
|
|
280
|
-
data: {
|
|
281
|
-
[p]: re,
|
|
282
|
-
centerOffset: D - re - O,
|
|
283
|
-
...ie && { alignmentOffset: O }
|
|
284
|
-
},
|
|
285
|
-
reset: ie
|
|
286
|
-
};
|
|
287
|
-
}
|
|
288
|
-
});
|
|
289
|
-
function Gt(e, t, n) {
|
|
290
|
-
return (e ? [...n.filter((t) => U(t) === e), ...n.filter((t) => U(t) !== e)] : n.filter((e) => H(e) === e)).filter((n) => e ? U(n) === e || (t ? At(n) !== n : !1) : !0);
|
|
291
|
-
}
|
|
292
|
-
var Kt = function(e) {
|
|
293
|
-
return e === void 0 && (e = {}), {
|
|
294
|
-
name: "autoPlacement",
|
|
295
|
-
options: e,
|
|
296
|
-
async fn(t) {
|
|
297
|
-
let { rects: n, middlewareData: r, placement: i, platform: a, elements: o } = t, { crossAxis: s = !1, alignment: c, allowedPlacements: l = xt, autoAlignment: u = !0, ...d } = V(e, t), f = c !== void 0 || l === xt ? Gt(c || null, u, l) : l, p = await a.detectOverflow(t, d), m = r.autoPlacement?.index || 0, h = f[m];
|
|
298
|
-
if (h == null) return {};
|
|
299
|
-
let g = Ot(h, n, await (a.isRTL == null ? void 0 : a.isRTL(o.floating)));
|
|
300
|
-
if (i !== h) return { reset: { placement: f[0] } };
|
|
301
|
-
let _ = [
|
|
302
|
-
p[H(h)],
|
|
303
|
-
p[g[0]],
|
|
304
|
-
p[g[1]]
|
|
305
|
-
], v = [...r.autoPlacement?.overflows || [], {
|
|
306
|
-
placement: h,
|
|
307
|
-
overflows: _
|
|
308
|
-
}], y = f[m + 1];
|
|
309
|
-
if (y) return {
|
|
310
|
-
data: {
|
|
311
|
-
index: m + 1,
|
|
312
|
-
overflows: v
|
|
313
|
-
},
|
|
314
|
-
reset: { placement: y }
|
|
315
|
-
};
|
|
316
|
-
let b = v.map((e) => {
|
|
317
|
-
let t = U(e.placement);
|
|
318
|
-
return [
|
|
319
|
-
e.placement,
|
|
320
|
-
t && s ? e.overflows.slice(0, 2).reduce((e, t) => e + t, 0) : e.overflows[0],
|
|
321
|
-
e.overflows
|
|
322
|
-
];
|
|
323
|
-
}).sort((e, t) => e[1] - t[1]), x = b.filter((e) => e[2].slice(0, U(e[0]) ? 2 : 3).every((e) => e <= 0))[0]?.[0] || b[0][0];
|
|
324
|
-
return x === i ? {} : {
|
|
325
|
-
data: {
|
|
326
|
-
index: m + 1,
|
|
327
|
-
overflows: v
|
|
328
|
-
},
|
|
329
|
-
reset: { placement: x }
|
|
330
|
-
};
|
|
331
|
-
}
|
|
332
|
-
};
|
|
333
|
-
}, qt = function(e) {
|
|
334
|
-
return e === void 0 && (e = {}), {
|
|
335
|
-
name: "flip",
|
|
336
|
-
options: e,
|
|
337
|
-
async fn(t) {
|
|
338
|
-
var n;
|
|
339
|
-
let { placement: r, middlewareData: i, rects: a, initialPlacement: o, platform: s, elements: c } = t, { mainAxis: l = !0, crossAxis: u = !0, fallbackPlacements: d, fallbackStrategy: f = "bestFit", fallbackAxisSideDirection: p = "none", flipAlignment: m = !0, ...h } = V(e, t);
|
|
340
|
-
if ((n = i.arrow) != null && n.alignmentOffset) return {};
|
|
341
|
-
let g = H(r), _ = W(o), v = H(o) === o, y = await (s.isRTL == null ? void 0 : s.isRTL(c.floating)), b = d || (v || !m ? [Lt(o)] : kt(o)), x = p !== "none";
|
|
342
|
-
!d && x && b.push(...It(o, m, p, y));
|
|
343
|
-
let S = [o, ...b], C = await s.detectOverflow(t, h), w = [], T = i.flip?.overflows || [];
|
|
344
|
-
if (l && w.push(C[g]), u) {
|
|
345
|
-
let e = Ot(r, a, y);
|
|
346
|
-
w.push(C[e[0]], C[e[1]]);
|
|
347
|
-
}
|
|
348
|
-
if (T = [...T, {
|
|
349
|
-
placement: r,
|
|
350
|
-
overflows: w
|
|
351
|
-
}], !w.every((e) => e <= 0)) {
|
|
352
|
-
let e = (i.flip?.index || 0) + 1, t = S[e];
|
|
353
|
-
if (t && (!(u === "alignment" && _ !== W(t)) || T.every((e) => W(e.placement) === _ ? e.overflows[0] > 0 : !0))) return {
|
|
354
|
-
data: {
|
|
355
|
-
index: e,
|
|
356
|
-
overflows: T
|
|
357
|
-
},
|
|
358
|
-
reset: { placement: t }
|
|
359
|
-
};
|
|
360
|
-
let n = T.filter((e) => e.overflows[0] <= 0).sort((e, t) => e.overflows[1] - t.overflows[1])[0]?.placement;
|
|
361
|
-
if (!n) switch (f) {
|
|
362
|
-
case "bestFit": {
|
|
363
|
-
let e = T.filter((e) => {
|
|
364
|
-
if (x) {
|
|
365
|
-
let t = W(e.placement);
|
|
366
|
-
return t === _ || t === "y";
|
|
367
|
-
}
|
|
368
|
-
return !0;
|
|
369
|
-
}).map((e) => [e.placement, e.overflows.filter((e) => e > 0).reduce((e, t) => e + t, 0)]).sort((e, t) => e[1] - t[1])[0]?.[0];
|
|
370
|
-
e && (n = e);
|
|
371
|
-
break;
|
|
372
|
-
}
|
|
373
|
-
case "initialPlacement":
|
|
374
|
-
n = o;
|
|
375
|
-
break;
|
|
376
|
-
}
|
|
377
|
-
if (r !== n) return { reset: { placement: n } };
|
|
378
|
-
}
|
|
379
|
-
return {};
|
|
380
|
-
}
|
|
381
|
-
};
|
|
382
|
-
};
|
|
383
|
-
function Jt(e, t) {
|
|
384
|
-
return {
|
|
385
|
-
top: e.top - t.height,
|
|
386
|
-
right: e.right - t.width,
|
|
387
|
-
bottom: e.bottom - t.height,
|
|
388
|
-
left: e.left - t.width
|
|
389
|
-
};
|
|
390
|
-
}
|
|
391
|
-
function Yt(e) {
|
|
392
|
-
return yt.some((t) => e[t] >= 0);
|
|
393
|
-
}
|
|
394
|
-
var Xt = function(e) {
|
|
395
|
-
return e === void 0 && (e = {}), {
|
|
396
|
-
name: "hide",
|
|
397
|
-
options: e,
|
|
398
|
-
async fn(t) {
|
|
399
|
-
let { rects: n, platform: r } = t, { strategy: i = "referenceHidden", ...a } = V(e, t);
|
|
400
|
-
switch (i) {
|
|
401
|
-
case "referenceHidden": {
|
|
402
|
-
let e = Jt(await r.detectOverflow(t, {
|
|
403
|
-
...a,
|
|
404
|
-
elementContext: "reference"
|
|
405
|
-
}), n.reference);
|
|
406
|
-
return { data: {
|
|
407
|
-
referenceHiddenOffsets: e,
|
|
408
|
-
referenceHidden: Yt(e)
|
|
409
|
-
} };
|
|
410
|
-
}
|
|
411
|
-
case "escaped": {
|
|
412
|
-
let e = Jt(await r.detectOverflow(t, {
|
|
413
|
-
...a,
|
|
414
|
-
altBoundary: !0
|
|
415
|
-
}), n.floating);
|
|
416
|
-
return { data: {
|
|
417
|
-
escapedOffsets: e,
|
|
418
|
-
escaped: Yt(e)
|
|
419
|
-
} };
|
|
420
|
-
}
|
|
421
|
-
default: return {};
|
|
422
|
-
}
|
|
423
|
-
}
|
|
424
|
-
};
|
|
425
|
-
};
|
|
426
|
-
function Zt(e) {
|
|
427
|
-
let t = R(...e.map((e) => e.left)), n = R(...e.map((e) => e.top)), r = z(...e.map((e) => e.right)), i = z(...e.map((e) => e.bottom));
|
|
428
|
-
return {
|
|
429
|
-
x: t,
|
|
430
|
-
y: n,
|
|
431
|
-
width: r - t,
|
|
432
|
-
height: i - n
|
|
433
|
-
};
|
|
434
|
-
}
|
|
435
|
-
function Qt(e) {
|
|
436
|
-
let t = e.slice().sort((e, t) => e.y - t.y), n = [], r = null;
|
|
437
|
-
for (let e = 0; e < t.length; e++) {
|
|
438
|
-
let i = t[e];
|
|
439
|
-
!r || i.y - r.y > r.height / 2 ? n.push([i]) : n[n.length - 1].push(i), r = i;
|
|
440
|
-
}
|
|
441
|
-
return n.map((e) => G(Zt(e)));
|
|
442
|
-
}
|
|
443
|
-
var $t = function(e) {
|
|
444
|
-
return e === void 0 && (e = {}), {
|
|
445
|
-
name: "inline",
|
|
446
|
-
options: e,
|
|
447
|
-
async fn(t) {
|
|
448
|
-
let { placement: n, elements: r, rects: i, platform: a, strategy: o } = t, { padding: s = 2, x: c, y: l } = V(e, t), u = Array.from(await (a.getClientRects == null ? void 0 : a.getClientRects(r.reference)) || []), d = Qt(u), f = G(Zt(u)), p = zt(s);
|
|
449
|
-
function m() {
|
|
450
|
-
if (d.length === 2 && d[0].left > d[1].right && c != null && l != null) return d.find((e) => c > e.left - p.left && c < e.right + p.right && l > e.top - p.top && l < e.bottom + p.bottom) || f;
|
|
451
|
-
if (d.length >= 2) {
|
|
452
|
-
if (W(n) === "y") {
|
|
453
|
-
let e = d[0], t = d[d.length - 1], r = H(n) === "top", i = e.top, a = t.bottom, o = r ? e.left : t.left, s = r ? e.right : t.right;
|
|
454
|
-
return {
|
|
455
|
-
top: i,
|
|
456
|
-
bottom: a,
|
|
457
|
-
left: o,
|
|
458
|
-
right: s,
|
|
459
|
-
width: s - o,
|
|
460
|
-
height: a - i,
|
|
461
|
-
x: o,
|
|
462
|
-
y: i
|
|
463
|
-
};
|
|
464
|
-
}
|
|
465
|
-
let e = H(n) === "left", t = z(...d.map((e) => e.right)), r = R(...d.map((e) => e.left)), i = d.filter((n) => e ? n.left === r : n.right === t), a = i[0].top, o = i[i.length - 1].bottom, s = r, c = t;
|
|
466
|
-
return {
|
|
467
|
-
top: a,
|
|
468
|
-
bottom: o,
|
|
469
|
-
left: s,
|
|
470
|
-
right: c,
|
|
471
|
-
width: c - s,
|
|
472
|
-
height: o - a,
|
|
473
|
-
x: s,
|
|
474
|
-
y: a
|
|
475
|
-
};
|
|
476
|
-
}
|
|
477
|
-
return f;
|
|
478
|
-
}
|
|
479
|
-
let h = await a.getElementRects({
|
|
480
|
-
reference: { getBoundingClientRect: m },
|
|
481
|
-
floating: r.floating,
|
|
482
|
-
strategy: o
|
|
483
|
-
});
|
|
484
|
-
return i.reference.x !== h.reference.x || i.reference.y !== h.reference.y || i.reference.width !== h.reference.width || i.reference.height !== h.reference.height ? { reset: { rects: h } } : {};
|
|
485
|
-
}
|
|
486
|
-
};
|
|
487
|
-
}, en = /* @__PURE__ */ new Set(["left", "top"]);
|
|
488
|
-
async function tn(e, t) {
|
|
489
|
-
let { placement: n, platform: r, elements: i } = e, a = await (r.isRTL == null ? void 0 : r.isRTL(i.floating)), o = H(n), s = U(n), c = W(n) === "y", l = en.has(o) ? -1 : 1, u = a && c ? -1 : 1, d = V(t, e), { mainAxis: f, crossAxis: p, alignmentAxis: m } = typeof d == "number" ? {
|
|
490
|
-
mainAxis: d,
|
|
491
|
-
crossAxis: 0,
|
|
492
|
-
alignmentAxis: null
|
|
493
|
-
} : {
|
|
494
|
-
mainAxis: d.mainAxis || 0,
|
|
495
|
-
crossAxis: d.crossAxis || 0,
|
|
496
|
-
alignmentAxis: d.alignmentAxis
|
|
497
|
-
};
|
|
498
|
-
return s && typeof m == "number" && (p = s === "end" ? m * -1 : m), c ? {
|
|
499
|
-
x: p * u,
|
|
500
|
-
y: f * l
|
|
501
|
-
} : {
|
|
502
|
-
x: f * l,
|
|
503
|
-
y: p * u
|
|
504
|
-
};
|
|
505
|
-
}
|
|
506
|
-
var nn = function(e) {
|
|
507
|
-
return e === void 0 && (e = 0), {
|
|
508
|
-
name: "offset",
|
|
509
|
-
options: e,
|
|
510
|
-
async fn(t) {
|
|
511
|
-
var n;
|
|
512
|
-
let { x: r, y: i, placement: a, middlewareData: o } = t, s = await tn(t, e);
|
|
513
|
-
return a === o.offset?.placement && (n = o.arrow) != null && n.alignmentOffset ? {} : {
|
|
514
|
-
x: r + s.x,
|
|
515
|
-
y: i + s.y,
|
|
516
|
-
data: {
|
|
517
|
-
...s,
|
|
518
|
-
placement: a
|
|
519
|
-
}
|
|
520
|
-
};
|
|
521
|
-
}
|
|
522
|
-
};
|
|
523
|
-
}, rn = function(e) {
|
|
524
|
-
return e === void 0 && (e = {}), {
|
|
525
|
-
name: "shift",
|
|
526
|
-
options: e,
|
|
527
|
-
async fn(t) {
|
|
528
|
-
let { x: n, y: r, placement: i, platform: a } = t, { mainAxis: o = !0, crossAxis: s = !1, limiter: c = { fn: (e) => {
|
|
529
|
-
let { x: t, y: n } = e;
|
|
530
|
-
return {
|
|
531
|
-
x: t,
|
|
532
|
-
y: n
|
|
533
|
-
};
|
|
534
|
-
} }, ...l } = V(e, t), u = {
|
|
535
|
-
x: n,
|
|
536
|
-
y: r
|
|
537
|
-
}, d = await a.detectOverflow(t, l), f = W(H(i)), p = Tt(f), m = u[p], h = u[f];
|
|
538
|
-
if (o) {
|
|
539
|
-
let e = p === "y" ? "top" : "left", t = p === "y" ? "bottom" : "right", n = m + d[e], r = m - d[t];
|
|
540
|
-
m = wt(n, m, r);
|
|
541
|
-
}
|
|
542
|
-
if (s) {
|
|
543
|
-
let e = f === "y" ? "top" : "left", t = f === "y" ? "bottom" : "right", n = h + d[e], r = h - d[t];
|
|
544
|
-
h = wt(n, h, r);
|
|
545
|
-
}
|
|
546
|
-
let g = c.fn({
|
|
547
|
-
...t,
|
|
548
|
-
[p]: m,
|
|
549
|
-
[f]: h
|
|
550
|
-
});
|
|
551
|
-
return {
|
|
552
|
-
...g,
|
|
553
|
-
data: {
|
|
554
|
-
x: g.x - n,
|
|
555
|
-
y: g.y - r,
|
|
556
|
-
enabled: {
|
|
557
|
-
[p]: o,
|
|
558
|
-
[f]: s
|
|
559
|
-
}
|
|
560
|
-
}
|
|
561
|
-
};
|
|
562
|
-
}
|
|
563
|
-
};
|
|
564
|
-
}, an = function(e) {
|
|
565
|
-
return e === void 0 && (e = {}), {
|
|
566
|
-
name: "size",
|
|
567
|
-
options: e,
|
|
568
|
-
async fn(t) {
|
|
569
|
-
var n, r;
|
|
570
|
-
let { placement: i, rects: a, platform: o, elements: s } = t, { apply: c = () => {}, ...l } = V(e, t), u = await o.detectOverflow(t, l), d = H(i), f = U(i), p = W(i) === "y", { width: m, height: h } = a.floating, g, _;
|
|
571
|
-
d === "top" || d === "bottom" ? (g = d, _ = f === (await (o.isRTL == null ? void 0 : o.isRTL(s.floating)) ? "start" : "end") ? "left" : "right") : (_ = d, g = f === "end" ? "top" : "bottom");
|
|
572
|
-
let v = h - u.top - u.bottom, y = m - u.left - u.right, b = R(h - u[g], v), x = R(m - u[_], y), S = !t.middlewareData.shift, C = b, w = x;
|
|
573
|
-
if ((n = t.middlewareData.shift) != null && n.enabled.x && (w = y), (r = t.middlewareData.shift) != null && r.enabled.y && (C = v), S && !f) {
|
|
574
|
-
let e = z(u.left, 0), t = z(u.right, 0), n = z(u.top, 0), r = z(u.bottom, 0);
|
|
575
|
-
p ? w = m - 2 * (e !== 0 || t !== 0 ? e + t : z(u.left, u.right)) : C = h - 2 * (n !== 0 || r !== 0 ? n + r : z(u.top, u.bottom));
|
|
576
|
-
}
|
|
577
|
-
await c({
|
|
578
|
-
...t,
|
|
579
|
-
availableWidth: w,
|
|
580
|
-
availableHeight: C
|
|
581
|
-
});
|
|
582
|
-
let T = await o.getDimensions(s.floating);
|
|
583
|
-
return m !== T.width || h !== T.height ? { reset: { rects: !0 } } : {};
|
|
584
|
-
}
|
|
585
|
-
};
|
|
586
|
-
};
|
|
587
|
-
//#endregion
|
|
588
|
-
//#region ../../node_modules/.pnpm/@floating-ui+utils@0.2.11/node_modules/@floating-ui/utils/dist/floating-ui.utils.dom.mjs
|
|
589
|
-
function on() {
|
|
590
|
-
return typeof window < "u";
|
|
591
|
-
}
|
|
592
|
-
function sn(e) {
|
|
593
|
-
return cn(e) ? (e.nodeName || "").toLowerCase() : "#document";
|
|
594
|
-
}
|
|
595
|
-
function K(e) {
|
|
596
|
-
var t;
|
|
597
|
-
return (e == null || (t = e.ownerDocument) == null ? void 0 : t.defaultView) || window;
|
|
598
|
-
}
|
|
599
|
-
function q(e) {
|
|
600
|
-
return ((cn(e) ? e.ownerDocument : e.document) || window.document)?.documentElement;
|
|
601
|
-
}
|
|
602
|
-
function cn(e) {
|
|
603
|
-
return on() ? e instanceof Node || e instanceof K(e).Node : !1;
|
|
604
|
-
}
|
|
605
|
-
function J(e) {
|
|
606
|
-
return on() ? e instanceof Element || e instanceof K(e).Element : !1;
|
|
607
|
-
}
|
|
608
|
-
function Y(e) {
|
|
609
|
-
return on() ? e instanceof HTMLElement || e instanceof K(e).HTMLElement : !1;
|
|
610
|
-
}
|
|
611
|
-
function ln(e) {
|
|
612
|
-
return !on() || typeof ShadowRoot > "u" ? !1 : e instanceof ShadowRoot || e instanceof K(e).ShadowRoot;
|
|
613
|
-
}
|
|
614
|
-
function un(e) {
|
|
615
|
-
let { overflow: t, overflowX: n, overflowY: r, display: i } = Z(e);
|
|
616
|
-
return /auto|scroll|overlay|hidden|clip/.test(t + r + n) && i !== "inline" && i !== "contents";
|
|
617
|
-
}
|
|
618
|
-
function dn(e) {
|
|
619
|
-
return /^(table|td|th)$/.test(sn(e));
|
|
620
|
-
}
|
|
621
|
-
function fn(e) {
|
|
622
|
-
try {
|
|
623
|
-
if (e.matches(":popover-open")) return !0;
|
|
624
|
-
} catch {}
|
|
625
|
-
try {
|
|
626
|
-
return e.matches(":modal");
|
|
627
|
-
} catch {
|
|
628
|
-
return !1;
|
|
629
|
-
}
|
|
630
|
-
}
|
|
631
|
-
var pn = /transform|translate|scale|rotate|perspective|filter/, mn = /paint|layout|strict|content/, X = (e) => !!e && e !== "none", hn;
|
|
632
|
-
function gn(e) {
|
|
633
|
-
let t = J(e) ? Z(e) : e;
|
|
634
|
-
return X(t.transform) || X(t.translate) || X(t.scale) || X(t.rotate) || X(t.perspective) || !vn() && (X(t.backdropFilter) || X(t.filter)) || pn.test(t.willChange || "") || mn.test(t.contain || "");
|
|
635
|
-
}
|
|
636
|
-
function _n(e) {
|
|
637
|
-
let t = Q(e);
|
|
638
|
-
for (; Y(t) && !yn(t);) {
|
|
639
|
-
if (gn(t)) return t;
|
|
640
|
-
if (fn(t)) return null;
|
|
641
|
-
t = Q(t);
|
|
642
|
-
}
|
|
643
|
-
return null;
|
|
644
|
-
}
|
|
645
|
-
function vn() {
|
|
646
|
-
return hn ?? (hn = typeof CSS < "u" && CSS.supports && CSS.supports("-webkit-backdrop-filter", "none")), hn;
|
|
647
|
-
}
|
|
648
|
-
function yn(e) {
|
|
649
|
-
return /^(html|body|#document)$/.test(sn(e));
|
|
650
|
-
}
|
|
651
|
-
function Z(e) {
|
|
652
|
-
return K(e).getComputedStyle(e);
|
|
653
|
-
}
|
|
654
|
-
function bn(e) {
|
|
655
|
-
return J(e) ? {
|
|
656
|
-
scrollLeft: e.scrollLeft,
|
|
657
|
-
scrollTop: e.scrollTop
|
|
658
|
-
} : {
|
|
659
|
-
scrollLeft: e.scrollX,
|
|
660
|
-
scrollTop: e.scrollY
|
|
661
|
-
};
|
|
662
|
-
}
|
|
663
|
-
function Q(e) {
|
|
664
|
-
if (sn(e) === "html") return e;
|
|
665
|
-
let t = e.assignedSlot || e.parentNode || ln(e) && e.host || q(e);
|
|
666
|
-
return ln(t) ? t.host : t;
|
|
667
|
-
}
|
|
668
|
-
function xn(e) {
|
|
669
|
-
let t = Q(e);
|
|
670
|
-
return yn(t) ? e.ownerDocument ? e.ownerDocument.body : e.body : Y(t) && un(t) ? t : xn(t);
|
|
671
|
-
}
|
|
672
|
-
function Sn(e, t, n) {
|
|
673
|
-
t === void 0 && (t = []), n === void 0 && (n = !0);
|
|
674
|
-
let r = xn(e), i = r === e.ownerDocument?.body, a = K(r);
|
|
675
|
-
if (i) {
|
|
676
|
-
let e = Cn(a);
|
|
677
|
-
return t.concat(a, a.visualViewport || [], un(r) ? r : [], e && n ? Sn(e) : []);
|
|
678
|
-
} else return t.concat(r, Sn(r, [], n));
|
|
679
|
-
}
|
|
680
|
-
function Cn(e) {
|
|
681
|
-
return e.parent && Object.getPrototypeOf(e.parent) ? e.frameElement : null;
|
|
682
|
-
}
|
|
683
|
-
//#endregion
|
|
684
|
-
//#region ../../node_modules/.pnpm/@floating-ui+dom@1.7.6/node_modules/@floating-ui/dom/dist/floating-ui.dom.mjs
|
|
685
|
-
function wn(e) {
|
|
686
|
-
let t = Z(e), n = parseFloat(t.width) || 0, r = parseFloat(t.height) || 0, i = Y(e), a = i ? e.offsetWidth : n, o = i ? e.offsetHeight : r, s = St(n) !== a || St(r) !== o;
|
|
687
|
-
return s && (n = a, r = o), {
|
|
688
|
-
width: n,
|
|
689
|
-
height: r,
|
|
690
|
-
$: s
|
|
691
|
-
};
|
|
692
|
-
}
|
|
693
|
-
function Tn(e) {
|
|
694
|
-
return J(e) ? e : e.contextElement;
|
|
695
|
-
}
|
|
696
|
-
function En(e) {
|
|
697
|
-
let t = Tn(e);
|
|
698
|
-
if (!Y(t)) return B(1);
|
|
699
|
-
let n = t.getBoundingClientRect(), { width: r, height: i, $: a } = wn(t), o = (a ? St(n.width) : n.width) / r, s = (a ? St(n.height) : n.height) / i;
|
|
700
|
-
return (!o || !Number.isFinite(o)) && (o = 1), (!s || !Number.isFinite(s)) && (s = 1), {
|
|
701
|
-
x: o,
|
|
702
|
-
y: s
|
|
703
|
-
};
|
|
704
|
-
}
|
|
705
|
-
var Dn = /* @__PURE__ */ B(0);
|
|
706
|
-
function On(e) {
|
|
707
|
-
let t = K(e);
|
|
708
|
-
return !vn() || !t.visualViewport ? Dn : {
|
|
709
|
-
x: t.visualViewport.offsetLeft,
|
|
710
|
-
y: t.visualViewport.offsetTop
|
|
711
|
-
};
|
|
712
|
-
}
|
|
713
|
-
function kn(e, t, n) {
|
|
714
|
-
return t === void 0 && (t = !1), !n || t && n !== K(e) ? !1 : t;
|
|
715
|
-
}
|
|
716
|
-
function An(e, t, n, r) {
|
|
717
|
-
t === void 0 && (t = !1), n === void 0 && (n = !1);
|
|
718
|
-
let i = e.getBoundingClientRect(), a = Tn(e), o = B(1);
|
|
719
|
-
t && (r ? J(r) && (o = En(r)) : o = En(e));
|
|
720
|
-
let s = kn(a, n, r) ? On(a) : B(0), c = (i.left + s.x) / o.x, l = (i.top + s.y) / o.y, u = i.width / o.x, d = i.height / o.y;
|
|
721
|
-
if (a) {
|
|
722
|
-
let e = K(a), t = r && J(r) ? K(r) : r, n = e, i = Cn(n);
|
|
723
|
-
for (; i && r && t !== n;) {
|
|
724
|
-
let e = En(i), t = i.getBoundingClientRect(), r = Z(i), a = t.left + (i.clientLeft + parseFloat(r.paddingLeft)) * e.x, o = t.top + (i.clientTop + parseFloat(r.paddingTop)) * e.y;
|
|
725
|
-
c *= e.x, l *= e.y, u *= e.x, d *= e.y, c += a, l += o, n = K(i), i = Cn(n);
|
|
726
|
-
}
|
|
727
|
-
}
|
|
728
|
-
return G({
|
|
729
|
-
width: u,
|
|
730
|
-
height: d,
|
|
731
|
-
x: c,
|
|
732
|
-
y: l
|
|
733
|
-
});
|
|
734
|
-
}
|
|
735
|
-
function jn(e, t) {
|
|
736
|
-
let n = bn(e).scrollLeft;
|
|
737
|
-
return t ? t.left + n : An(q(e)).left + n;
|
|
738
|
-
}
|
|
739
|
-
function Mn(e, t) {
|
|
740
|
-
let n = e.getBoundingClientRect();
|
|
741
|
-
return {
|
|
742
|
-
x: n.left + t.scrollLeft - jn(e, n),
|
|
743
|
-
y: n.top + t.scrollTop
|
|
744
|
-
};
|
|
745
|
-
}
|
|
746
|
-
function Nn(e) {
|
|
747
|
-
let { elements: t, rect: n, offsetParent: r, strategy: i } = e, a = i === "fixed", o = q(r), s = t ? fn(t.floating) : !1;
|
|
748
|
-
if (r === o || s && a) return n;
|
|
749
|
-
let c = {
|
|
750
|
-
scrollLeft: 0,
|
|
751
|
-
scrollTop: 0
|
|
752
|
-
}, l = B(1), u = B(0), d = Y(r);
|
|
753
|
-
if ((d || !d && !a) && ((sn(r) !== "body" || un(o)) && (c = bn(r)), d)) {
|
|
754
|
-
let e = An(r);
|
|
755
|
-
l = En(r), u.x = e.x + r.clientLeft, u.y = e.y + r.clientTop;
|
|
756
|
-
}
|
|
757
|
-
let f = o && !d && !a ? Mn(o, c) : B(0);
|
|
758
|
-
return {
|
|
759
|
-
width: n.width * l.x,
|
|
760
|
-
height: n.height * l.y,
|
|
761
|
-
x: n.x * l.x - c.scrollLeft * l.x + u.x + f.x,
|
|
762
|
-
y: n.y * l.y - c.scrollTop * l.y + u.y + f.y
|
|
763
|
-
};
|
|
764
|
-
}
|
|
765
|
-
function Pn(e) {
|
|
766
|
-
return Array.from(e.getClientRects());
|
|
767
|
-
}
|
|
768
|
-
function Fn(e) {
|
|
769
|
-
let t = q(e), n = bn(e), r = e.ownerDocument.body, i = z(t.scrollWidth, t.clientWidth, r.scrollWidth, r.clientWidth), a = z(t.scrollHeight, t.clientHeight, r.scrollHeight, r.clientHeight), o = -n.scrollLeft + jn(e), s = -n.scrollTop;
|
|
770
|
-
return Z(r).direction === "rtl" && (o += z(t.clientWidth, r.clientWidth) - i), {
|
|
771
|
-
width: i,
|
|
772
|
-
height: a,
|
|
773
|
-
x: o,
|
|
774
|
-
y: s
|
|
775
|
-
};
|
|
776
|
-
}
|
|
777
|
-
var In = 25;
|
|
778
|
-
function Ln(e, t) {
|
|
779
|
-
let n = K(e), r = q(e), i = n.visualViewport, a = r.clientWidth, o = r.clientHeight, s = 0, c = 0;
|
|
780
|
-
if (i) {
|
|
781
|
-
a = i.width, o = i.height;
|
|
782
|
-
let e = vn();
|
|
783
|
-
(!e || e && t === "fixed") && (s = i.offsetLeft, c = i.offsetTop);
|
|
784
|
-
}
|
|
785
|
-
let l = jn(r);
|
|
786
|
-
if (l <= 0) {
|
|
787
|
-
let e = r.ownerDocument, t = e.body, n = getComputedStyle(t), i = e.compatMode === "CSS1Compat" && parseFloat(n.marginLeft) + parseFloat(n.marginRight) || 0, o = Math.abs(r.clientWidth - t.clientWidth - i);
|
|
788
|
-
o <= In && (a -= o);
|
|
789
|
-
} else l <= In && (a += l);
|
|
790
|
-
return {
|
|
791
|
-
width: a,
|
|
792
|
-
height: o,
|
|
793
|
-
x: s,
|
|
794
|
-
y: c
|
|
795
|
-
};
|
|
796
|
-
}
|
|
797
|
-
function Rn(e, t) {
|
|
798
|
-
let n = An(e, !0, t === "fixed"), r = n.top + e.clientTop, i = n.left + e.clientLeft, a = Y(e) ? En(e) : B(1);
|
|
799
|
-
return {
|
|
800
|
-
width: e.clientWidth * a.x,
|
|
801
|
-
height: e.clientHeight * a.y,
|
|
802
|
-
x: i * a.x,
|
|
803
|
-
y: r * a.y
|
|
804
|
-
};
|
|
805
|
-
}
|
|
806
|
-
function zn(e, t, n) {
|
|
807
|
-
let r;
|
|
808
|
-
if (t === "viewport") r = Ln(e, n);
|
|
809
|
-
else if (t === "document") r = Fn(q(e));
|
|
810
|
-
else if (J(t)) r = Rn(t, n);
|
|
811
|
-
else {
|
|
812
|
-
let n = On(e);
|
|
813
|
-
r = {
|
|
814
|
-
x: t.x - n.x,
|
|
815
|
-
y: t.y - n.y,
|
|
816
|
-
width: t.width,
|
|
817
|
-
height: t.height
|
|
818
|
-
};
|
|
819
|
-
}
|
|
820
|
-
return G(r);
|
|
821
|
-
}
|
|
822
|
-
function Bn(e, t) {
|
|
823
|
-
let n = Q(e);
|
|
824
|
-
return n === t || !J(n) || yn(n) ? !1 : Z(n).position === "fixed" || Bn(n, t);
|
|
825
|
-
}
|
|
826
|
-
function Vn(e, t) {
|
|
827
|
-
let n = t.get(e);
|
|
828
|
-
if (n) return n;
|
|
829
|
-
let r = Sn(e, [], !1).filter((e) => J(e) && sn(e) !== "body"), i = null, a = Z(e).position === "fixed", o = a ? Q(e) : e;
|
|
830
|
-
for (; J(o) && !yn(o);) {
|
|
831
|
-
let t = Z(o), n = gn(o);
|
|
832
|
-
!n && t.position === "fixed" && (i = null), (a ? !n && !i : !n && t.position === "static" && i && (i.position === "absolute" || i.position === "fixed") || un(o) && !n && Bn(e, o)) ? r = r.filter((e) => e !== o) : i = t, o = Q(o);
|
|
833
|
-
}
|
|
834
|
-
return t.set(e, r), r;
|
|
835
|
-
}
|
|
836
|
-
function Hn(e) {
|
|
837
|
-
let { element: t, boundary: n, rootBoundary: r, strategy: i } = e, a = [...n === "clippingAncestors" ? fn(t) ? [] : Vn(t, this._c) : [].concat(n), r], o = zn(t, a[0], i), s = o.top, c = o.right, l = o.bottom, u = o.left;
|
|
838
|
-
for (let e = 1; e < a.length; e++) {
|
|
839
|
-
let n = zn(t, a[e], i);
|
|
840
|
-
s = z(n.top, s), c = R(n.right, c), l = R(n.bottom, l), u = z(n.left, u);
|
|
841
|
-
}
|
|
842
|
-
return {
|
|
843
|
-
width: c - u,
|
|
844
|
-
height: l - s,
|
|
845
|
-
x: u,
|
|
846
|
-
y: s
|
|
847
|
-
};
|
|
848
|
-
}
|
|
849
|
-
function Un(e) {
|
|
850
|
-
let { width: t, height: n } = wn(e);
|
|
851
|
-
return {
|
|
852
|
-
width: t,
|
|
853
|
-
height: n
|
|
854
|
-
};
|
|
855
|
-
}
|
|
856
|
-
function Wn(e, t, n) {
|
|
857
|
-
let r = Y(t), i = q(t), a = n === "fixed", o = An(e, !0, a, t), s = {
|
|
858
|
-
scrollLeft: 0,
|
|
859
|
-
scrollTop: 0
|
|
860
|
-
}, c = B(0);
|
|
861
|
-
function l() {
|
|
862
|
-
c.x = jn(i);
|
|
863
|
-
}
|
|
864
|
-
if (r || !r && !a) if ((sn(t) !== "body" || un(i)) && (s = bn(t)), r) {
|
|
865
|
-
let e = An(t, !0, a, t);
|
|
866
|
-
c.x = e.x + t.clientLeft, c.y = e.y + t.clientTop;
|
|
867
|
-
} else i && l();
|
|
868
|
-
a && !r && i && l();
|
|
869
|
-
let u = i && !r && !a ? Mn(i, s) : B(0);
|
|
870
|
-
return {
|
|
871
|
-
x: o.left + s.scrollLeft - c.x - u.x,
|
|
872
|
-
y: o.top + s.scrollTop - c.y - u.y,
|
|
873
|
-
width: o.width,
|
|
874
|
-
height: o.height
|
|
875
|
-
};
|
|
876
|
-
}
|
|
877
|
-
function Gn(e) {
|
|
878
|
-
return Z(e).position === "static";
|
|
879
|
-
}
|
|
880
|
-
function Kn(e, t) {
|
|
881
|
-
if (!Y(e) || Z(e).position === "fixed") return null;
|
|
882
|
-
if (t) return t(e);
|
|
883
|
-
let n = e.offsetParent;
|
|
884
|
-
return q(e) === n && (n = n.ownerDocument.body), n;
|
|
885
|
-
}
|
|
886
|
-
function qn(e, t) {
|
|
887
|
-
let n = K(e);
|
|
888
|
-
if (fn(e)) return n;
|
|
889
|
-
if (!Y(e)) {
|
|
890
|
-
let t = Q(e);
|
|
891
|
-
for (; t && !yn(t);) {
|
|
892
|
-
if (J(t) && !Gn(t)) return t;
|
|
893
|
-
t = Q(t);
|
|
894
|
-
}
|
|
895
|
-
return n;
|
|
896
|
-
}
|
|
897
|
-
let r = Kn(e, t);
|
|
898
|
-
for (; r && dn(r) && Gn(r);) r = Kn(r, t);
|
|
899
|
-
return r && yn(r) && Gn(r) && !gn(r) ? n : r || _n(e) || n;
|
|
900
|
-
}
|
|
901
|
-
var Jn = async function(e) {
|
|
902
|
-
let t = this.getOffsetParent || qn, n = this.getDimensions, r = await n(e.floating);
|
|
903
|
-
return {
|
|
904
|
-
reference: Wn(e.reference, await t(e.floating), e.strategy),
|
|
905
|
-
floating: {
|
|
906
|
-
x: 0,
|
|
907
|
-
y: 0,
|
|
908
|
-
width: r.width,
|
|
909
|
-
height: r.height
|
|
910
|
-
}
|
|
911
|
-
};
|
|
912
|
-
};
|
|
913
|
-
function Yn(e) {
|
|
914
|
-
return Z(e).direction === "rtl";
|
|
915
|
-
}
|
|
916
|
-
var Xn = {
|
|
917
|
-
convertOffsetParentRelativeRectToViewportRelativeRect: Nn,
|
|
918
|
-
getDocumentElement: q,
|
|
919
|
-
getClippingRect: Hn,
|
|
920
|
-
getOffsetParent: qn,
|
|
921
|
-
getElementRects: Jn,
|
|
922
|
-
getClientRects: Pn,
|
|
923
|
-
getDimensions: Un,
|
|
924
|
-
getScale: En,
|
|
925
|
-
isElement: J,
|
|
926
|
-
isRTL: Yn
|
|
927
|
-
}, Zn = nn, Qn = Kt, $n = rn, er = qt, tr = an, nr = Xt, rr = Wt, ir = $t, ar = (e, t, n) => {
|
|
928
|
-
let r = /* @__PURE__ */ new Map(), i = {
|
|
929
|
-
platform: Xn,
|
|
930
|
-
...n
|
|
931
|
-
}, a = {
|
|
932
|
-
...i.platform,
|
|
933
|
-
_c: r
|
|
934
|
-
};
|
|
935
|
-
return Ut(e, t, {
|
|
936
|
-
...i,
|
|
937
|
-
platform: a
|
|
938
|
-
});
|
|
939
|
-
};
|
|
940
|
-
//#endregion
|
|
7
|
+
import ee from "./lib/link/link.js";
|
|
8
|
+
import { DialtoneLocalization as te } from "./localization/index.js";
|
|
9
|
+
import p from "./lib/button/button.js";
|
|
10
|
+
import ne from "./lib/list-item/list-item.js";
|
|
11
|
+
import m from "./lib/stack/stack.js";
|
|
12
|
+
import re from "./lib/popover/popover.js";
|
|
13
|
+
import h from "./lib/emoji/emoji.js";
|
|
14
|
+
import ie from "./lib/input/input.js";
|
|
15
|
+
import { Editor as ae, EditorContent as oe, NodeViewWrapper as g, VueNodeViewRenderer as _, VueRenderer as se, nodeViewProps as v } from "./node_modules/@tiptap/vue-3.js";
|
|
16
|
+
import { a as y, c as b, i as x, l as S, n as C, o as w, s as ce, t as le, u as T } from "./floating-ui.dom-j5GI2lJG.js";
|
|
17
|
+
import { t as ue } from "./ForceLinkify-DuAo3TMB.js";
|
|
18
|
+
import { RICH_TEXT_EDITOR_AUTOFOCUS_TYPES as de, RICH_TEXT_EDITOR_OUTPUT_FORMATS as fe, RICH_TEXT_EDITOR_SUPPORTED_LINK_PROTOCOLS as E } from "./lib/rich-text-editor/rich-text-editor-constants.js";
|
|
19
|
+
import { t as D } from "./MarkdownRenderer-eMwmPygx.js";
|
|
20
|
+
import { Fragment as pe, createBlock as O, createCommentVNode as k, createElementBlock as A, createElementVNode as j, createTextVNode as M, createVNode as N, defineComponent as me, h as he, markRaw as ge, mergeProps as _e, nextTick as ve, normalizeClass as ye, onBeforeUnmount as be, onMounted as P, openBlock as F, ref as I, renderList as xe, resolveComponent as L, resolveDynamicComponent as Se, toDisplayString as R, vShow as Ce, withCtx as z, withDirectives as we, withKeys as Te, withModifiers as B } from "vue";
|
|
21
|
+
import { DtIconLock as Ee } from "@dialpad/dialtone-icons/vue";
|
|
22
|
+
import { emojiPattern as V } from "regex-combined-emojis";
|
|
23
|
+
import { Extension as De, InputRule as Oe, Mark as H, Node as U, combineTransactionSteps as ke, findChildrenInRange as Ae, getChangedRanges as je, getMarkRange as Me, getMarksBetween as Ne, getText as Pe, getTextSerializersFromSchema as Fe, isTextSelection as Ie, mergeAttributes as W, nodeInputRule as Le, nodePasteRule as G, posToDOMRect as Re } from "@tiptap/core";
|
|
24
|
+
import { NodeSelection as ze, Plugin as K, PluginKey as q } from "@tiptap/pm/state";
|
|
25
|
+
import { CellSelection as Be } from "@tiptap/pm/tables";
|
|
26
|
+
import Ve from "@tiptap/extension-blockquote";
|
|
27
|
+
import He from "@tiptap/extension-code-block";
|
|
28
|
+
import Ue from "@tiptap/extension-code";
|
|
29
|
+
import We from "@tiptap/extension-document";
|
|
30
|
+
import { Gapcursor as Ge, Placeholder as Ke, UndoRedo as qe } from "@tiptap/extensions";
|
|
31
|
+
import Je from "@tiptap/extension-hard-break";
|
|
32
|
+
import J from "@tiptap/extension-paragraph";
|
|
33
|
+
import Ye from "@tiptap/extension-bold";
|
|
34
|
+
import { BulletList as Xe, ListItem as Ze, OrderedList as Qe } from "@tiptap/extension-list";
|
|
35
|
+
import $e from "@tiptap/extension-italic";
|
|
36
|
+
import et from "@tiptap/extension-link";
|
|
37
|
+
import tt from "@tiptap/extension-strike";
|
|
38
|
+
import nt from "@tiptap/extension-underline";
|
|
39
|
+
import rt from "@tiptap/extension-text";
|
|
40
|
+
import it from "@tiptap/extension-text-align";
|
|
41
|
+
import { Table as at, TableCell as ot, TableHeader as st, TableRow as ct } from "@tiptap/extension-table";
|
|
42
|
+
import { TextStyle as lt, TextStyleKit as ut } from "@tiptap/extension-text-style";
|
|
43
|
+
import dt from "@tiptap/suggestion";
|
|
44
|
+
import ft from "@tiptap/extension-image";
|
|
45
|
+
import Y from "@tiptap/extension-mention";
|
|
46
|
+
import pt from "@dialpad/dialtone-icons/vue/hash";
|
|
47
|
+
import mt from "@dialpad/dialtone-icons/vue/lock";
|
|
48
|
+
import ht from "deep-equal";
|
|
941
49
|
//#region ../../node_modules/.pnpm/@tiptap+vue-3@3.19.0_patch_hash=65d98f737afae097542c692b176a81069e1b7b8d577d1d7e222a944_23bfa7b5fde667bfc96216774c3ce084/node_modules/@tiptap/vue-3/dist/menus/index.js
|
|
942
|
-
function
|
|
50
|
+
function gt(e, t) {
|
|
943
51
|
let n = Math.min(e.top, t.top), r = Math.max(e.bottom, t.bottom), i = Math.min(e.left, t.left), a = Math.max(e.right, t.right) - i, o = r - n;
|
|
944
52
|
return new DOMRect(i, n, a, o);
|
|
945
53
|
}
|
|
946
|
-
var
|
|
54
|
+
var _t = class {
|
|
947
55
|
constructor({ editor: e, element: t, view: n, updateDelay: r = 250, resizeDelay: i = 60, shouldShow: a, appendTo: o, getReferencedVirtualElement: s, options: c }) {
|
|
948
56
|
this.preventHide = !1, this.isVisible = !1, this.scrollTarget = window, this.floatingUIOptions = {
|
|
949
57
|
strategy: "absolute",
|
|
@@ -961,7 +69,7 @@ var sr = class {
|
|
|
961
69
|
onUpdate: void 0,
|
|
962
70
|
onDestroy: void 0
|
|
963
71
|
}, this.shouldShow = ({ view: e, state: t, from: n, to: r }) => {
|
|
964
|
-
let { doc: i, selection: a } = t, { empty: o } = a, s = !i.textBetween(n, r).length &&
|
|
72
|
+
let { doc: i, selection: a } = t, { empty: o } = a, s = !i.textBetween(n, r).length && Ie(t.selection), c = this.element.contains(document.activeElement);
|
|
965
73
|
return !(!(e.hasFocus() || c) || o || s || !this.editor.isEditable);
|
|
966
74
|
}, this.mousedownHandler = () => {
|
|
967
75
|
this.preventHide = !0;
|
|
@@ -1007,7 +115,7 @@ var sr = class {
|
|
|
1007
115
|
}
|
|
1008
116
|
get middlewares() {
|
|
1009
117
|
let e = [];
|
|
1010
|
-
return this.floatingUIOptions.flip && e.push(
|
|
118
|
+
return this.floatingUIOptions.flip && e.push(y(typeof this.floatingUIOptions.flip == "boolean" ? void 0 : this.floatingUIOptions.flip)), this.floatingUIOptions.shift && e.push(S(typeof this.floatingUIOptions.shift == "boolean" ? void 0 : this.floatingUIOptions.shift)), this.floatingUIOptions.offset && e.push(b(typeof this.floatingUIOptions.offset == "boolean" ? void 0 : this.floatingUIOptions.offset)), this.floatingUIOptions.arrow && e.push(le(this.floatingUIOptions.arrow)), this.floatingUIOptions.size && e.push(T(typeof this.floatingUIOptions.size == "boolean" ? void 0 : this.floatingUIOptions.size)), this.floatingUIOptions.autoPlacement && e.push(C(typeof this.floatingUIOptions.autoPlacement == "boolean" ? void 0 : this.floatingUIOptions.autoPlacement)), this.floatingUIOptions.hide && e.push(w(typeof this.floatingUIOptions.hide == "boolean" ? void 0 : this.floatingUIOptions.hide)), this.floatingUIOptions.inline && e.push(ce(typeof this.floatingUIOptions.inline == "boolean" ? void 0 : this.floatingUIOptions.inline)), e;
|
|
1011
119
|
}
|
|
1012
120
|
get virtualElement() {
|
|
1013
121
|
let { selection: e } = this.editor.state, t = this.getReferencedVirtualElement?.call(this);
|
|
@@ -1024,10 +132,10 @@ var sr = class {
|
|
|
1024
132
|
getClientRects: () => [t.getBoundingClientRect()]
|
|
1025
133
|
});
|
|
1026
134
|
}
|
|
1027
|
-
if (e instanceof
|
|
135
|
+
if (e instanceof Be) {
|
|
1028
136
|
let { $anchorCell: t, $headCell: n } = e, i = t ? t.pos : n.pos, a = n ? n.pos : t.pos, o = this.view.nodeDOM(i), s = this.view.nodeDOM(a);
|
|
1029
137
|
if (!o || !s) return;
|
|
1030
|
-
let c = o === s ? o.getBoundingClientRect() :
|
|
138
|
+
let c = o === s ? o.getBoundingClientRect() : gt(o.getBoundingClientRect(), s.getBoundingClientRect());
|
|
1031
139
|
r = {
|
|
1032
140
|
getBoundingClientRect: () => c,
|
|
1033
141
|
getClientRects: () => [c]
|
|
@@ -1037,7 +145,7 @@ var sr = class {
|
|
|
1037
145
|
}
|
|
1038
146
|
updatePosition() {
|
|
1039
147
|
let e = this.virtualElement;
|
|
1040
|
-
e &&
|
|
148
|
+
e && x(e, this.element, {
|
|
1041
149
|
placement: this.floatingUIOptions.placement,
|
|
1042
150
|
strategy: this.floatingUIOptions.strategy,
|
|
1043
151
|
middleware: this.middlewares
|
|
@@ -1089,13 +197,13 @@ var sr = class {
|
|
|
1089
197
|
destroy() {
|
|
1090
198
|
this.hide(), this.element.removeEventListener("mousedown", this.mousedownHandler, { capture: !0 }), this.view.dom.removeEventListener("dragstart", this.dragstartHandler), window.removeEventListener("resize", this.resizeHandler), this.scrollTarget.removeEventListener("scroll", this.resizeHandler), this.editor.off("focus", this.focusHandler), this.editor.off("blur", this.blurHandler), this.editor.off("transaction", this.transactionHandler), this.floatingUIOptions.onDestroy && this.floatingUIOptions.onDestroy();
|
|
1091
199
|
}
|
|
1092
|
-
},
|
|
1093
|
-
key: typeof e.pluginKey == "string" ? new
|
|
1094
|
-
view: (t) => new
|
|
200
|
+
}, vt = (e) => new K({
|
|
201
|
+
key: typeof e.pluginKey == "string" ? new q(e.pluginKey) : e.pluginKey,
|
|
202
|
+
view: (t) => new _t({
|
|
1095
203
|
view: t,
|
|
1096
204
|
...e
|
|
1097
205
|
})
|
|
1098
|
-
}),
|
|
206
|
+
}), yt = me({
|
|
1099
207
|
name: "BubbleMenu",
|
|
1100
208
|
inheritAttrs: !1,
|
|
1101
209
|
props: {
|
|
@@ -1133,11 +241,11 @@ var sr = class {
|
|
|
1133
241
|
}
|
|
1134
242
|
},
|
|
1135
243
|
setup(e, { slots: t, attrs: n }) {
|
|
1136
|
-
let r =
|
|
1137
|
-
return
|
|
244
|
+
let r = I(null);
|
|
245
|
+
return P(() => {
|
|
1138
246
|
let { editor: t, options: n, pluginKey: i, resizeDelay: a, appendTo: o, shouldShow: s, getReferencedVirtualElement: c, updateDelay: l } = e, u = r.value;
|
|
1139
|
-
u && (u.style.visibility = "hidden", u.style.position = "absolute", u.remove(),
|
|
1140
|
-
t.registerPlugin(
|
|
247
|
+
u && (u.style.visibility = "hidden", u.style.position = "absolute", u.remove(), ve(() => {
|
|
248
|
+
t.registerPlugin(vt({
|
|
1141
249
|
editor: t,
|
|
1142
250
|
element: u,
|
|
1143
251
|
options: n,
|
|
@@ -1149,15 +257,15 @@ var sr = class {
|
|
|
1149
257
|
updateDelay: l
|
|
1150
258
|
}));
|
|
1151
259
|
}));
|
|
1152
|
-
}),
|
|
260
|
+
}), be(() => {
|
|
1153
261
|
let { pluginKey: t, editor: n } = e;
|
|
1154
262
|
n.unregisterPlugin(t);
|
|
1155
|
-
}), () =>
|
|
263
|
+
}), () => he("div", {
|
|
1156
264
|
ref: r,
|
|
1157
265
|
...n
|
|
1158
266
|
}, t.default?.call(t));
|
|
1159
267
|
}
|
|
1160
|
-
}),
|
|
268
|
+
}), bt = class {
|
|
1161
269
|
constructor({ editor: e, element: t, view: n, updateDelay: r = 250, resizeDelay: i = 60, options: a, appendTo: o, shouldShow: s }) {
|
|
1162
270
|
this.preventHide = !1, this.isVisible = !1, this.scrollTarget = window, this.shouldShow = ({ view: e, state: t }) => {
|
|
1163
271
|
let { selection: n } = t, { $anchor: r, empty: i } = n, a = r.depth === 1, o = r.parent.isTextblock && !r.parent.type.spec.code && !r.parent.textContent && r.parent.childCount === 0 && !this.getTextContent(r.parent);
|
|
@@ -1205,11 +313,11 @@ var sr = class {
|
|
|
1205
313
|
}, this.element.tabIndex = 0, s && (this.shouldShow = s), this.element.addEventListener("mousedown", this.mousedownHandler, { capture: !0 }), this.editor.on("focus", this.focusHandler), this.editor.on("blur", this.blurHandler), this.editor.on("transaction", this.transactionHandler), window.addEventListener("resize", this.resizeHandler), this.scrollTarget.addEventListener("scroll", this.resizeHandler), this.update(n, n.state), this.getShouldShow() && (this.show(), this.updatePosition());
|
|
1206
314
|
}
|
|
1207
315
|
getTextContent(e) {
|
|
1208
|
-
return
|
|
316
|
+
return Pe(e, { textSerializers: Fe(this.editor.schema) });
|
|
1209
317
|
}
|
|
1210
318
|
get middlewares() {
|
|
1211
319
|
let e = [];
|
|
1212
|
-
return this.floatingUIOptions.flip && e.push(
|
|
320
|
+
return this.floatingUIOptions.flip && e.push(y(typeof this.floatingUIOptions.flip == "boolean" ? void 0 : this.floatingUIOptions.flip)), this.floatingUIOptions.shift && e.push(S(typeof this.floatingUIOptions.shift == "boolean" ? void 0 : this.floatingUIOptions.shift)), this.floatingUIOptions.offset && e.push(b(typeof this.floatingUIOptions.offset == "boolean" ? void 0 : this.floatingUIOptions.offset)), this.floatingUIOptions.arrow && e.push(le(this.floatingUIOptions.arrow)), this.floatingUIOptions.size && e.push(T(typeof this.floatingUIOptions.size == "boolean" ? void 0 : this.floatingUIOptions.size)), this.floatingUIOptions.autoPlacement && e.push(C(typeof this.floatingUIOptions.autoPlacement == "boolean" ? void 0 : this.floatingUIOptions.autoPlacement)), this.floatingUIOptions.hide && e.push(w(typeof this.floatingUIOptions.hide == "boolean" ? void 0 : this.floatingUIOptions.hide)), this.floatingUIOptions.inline && e.push(ce(typeof this.floatingUIOptions.inline == "boolean" ? void 0 : this.floatingUIOptions.inline)), e;
|
|
1213
321
|
}
|
|
1214
322
|
getShouldShow(e) {
|
|
1215
323
|
let { state: t } = this.view, { selection: n } = t, { ranges: r } = n, i = Math.min(...r.map((e) => e.$from.pos)), a = Math.max(...r.map((e) => e.$to.pos));
|
|
@@ -1233,7 +341,7 @@ var sr = class {
|
|
|
1233
341
|
}
|
|
1234
342
|
updatePosition() {
|
|
1235
343
|
let { selection: e } = this.editor.state, t = Re(this.view, e.from, e.to);
|
|
1236
|
-
|
|
344
|
+
x({
|
|
1237
345
|
getBoundingClientRect: () => t,
|
|
1238
346
|
getClientRects: () => [t]
|
|
1239
347
|
}, this.element, {
|
|
@@ -1262,14 +370,14 @@ var sr = class {
|
|
|
1262
370
|
destroy() {
|
|
1263
371
|
this.hide(), this.element.removeEventListener("mousedown", this.mousedownHandler, { capture: !0 }), window.removeEventListener("resize", this.resizeHandler), this.scrollTarget.removeEventListener("scroll", this.resizeHandler), this.editor.off("focus", this.focusHandler), this.editor.off("blur", this.blurHandler), this.editor.off("transaction", this.transactionHandler), this.floatingUIOptions.onDestroy && this.floatingUIOptions.onDestroy();
|
|
1264
372
|
}
|
|
1265
|
-
},
|
|
1266
|
-
key: typeof e.pluginKey == "string" ? new
|
|
1267
|
-
view: (t) => new
|
|
373
|
+
}, xt = (e) => new K({
|
|
374
|
+
key: typeof e.pluginKey == "string" ? new q(e.pluginKey) : e.pluginKey,
|
|
375
|
+
view: (t) => new bt({
|
|
1268
376
|
view: t,
|
|
1269
377
|
...e
|
|
1270
378
|
})
|
|
1271
379
|
});
|
|
1272
|
-
|
|
380
|
+
me({
|
|
1273
381
|
name: "FloatingMenu",
|
|
1274
382
|
inheritAttrs: !1,
|
|
1275
383
|
props: {
|
|
@@ -1303,10 +411,10 @@ se({
|
|
|
1303
411
|
}
|
|
1304
412
|
},
|
|
1305
413
|
setup(e, { slots: t, attrs: n }) {
|
|
1306
|
-
let r =
|
|
1307
|
-
return
|
|
414
|
+
let r = I(null);
|
|
415
|
+
return P(() => {
|
|
1308
416
|
let { pluginKey: t, editor: n, updateDelay: i, resizeDelay: a, options: o, appendTo: s, shouldShow: c } = e, l = r.value;
|
|
1309
|
-
l && (l.style.visibility = "hidden", l.style.position = "absolute", l.remove(), n.registerPlugin(
|
|
417
|
+
l && (l.style.visibility = "hidden", l.style.position = "absolute", l.remove(), n.registerPlugin(xt({
|
|
1310
418
|
pluginKey: t,
|
|
1311
419
|
editor: n,
|
|
1312
420
|
element: l,
|
|
@@ -1316,10 +424,10 @@ se({
|
|
|
1316
424
|
appendTo: s,
|
|
1317
425
|
shouldShow: c
|
|
1318
426
|
})));
|
|
1319
|
-
}),
|
|
427
|
+
}), be(() => {
|
|
1320
428
|
let { pluginKey: t, editor: n } = e;
|
|
1321
429
|
n.unregisterPlugin(t);
|
|
1322
|
-
}), () =>
|
|
430
|
+
}), () => he("div", {
|
|
1323
431
|
ref: r,
|
|
1324
432
|
...n
|
|
1325
433
|
}, t.default?.call(t));
|
|
@@ -1327,54 +435,54 @@ se({
|
|
|
1327
435
|
});
|
|
1328
436
|
//#endregion
|
|
1329
437
|
//#region components/RichTextEditor/Extensions/Table/Table.js
|
|
1330
|
-
var
|
|
438
|
+
var X = (e) => ({
|
|
1331
439
|
default: null,
|
|
1332
440
|
parseHTML: (t) => t.getAttribute(e),
|
|
1333
441
|
renderHTML: (t) => t[e] ? { [e]: t[e] } : {}
|
|
1334
|
-
}),
|
|
1335
|
-
let e =
|
|
1336
|
-
return e.renderHTML = (e) => e.style ? { style:
|
|
442
|
+
}), St = () => {
|
|
443
|
+
let e = X("style");
|
|
444
|
+
return e.renderHTML = (e) => e.style ? { style: Ct(e.style) } : {}, e;
|
|
1337
445
|
};
|
|
1338
|
-
function
|
|
446
|
+
function Ct(e) {
|
|
1339
447
|
return e.replace(/(?<![a-z-])width\s*:\s*([^;]+);?/gi, (e, t) => /^\s*0\s*[a-z%]*\s*(!important)?\s*$/i.test(t) ? "width: 100%;" : e);
|
|
1340
448
|
}
|
|
1341
|
-
var
|
|
449
|
+
var wt = at.extend({
|
|
1342
450
|
addAttributes() {
|
|
1343
451
|
return {
|
|
1344
452
|
...this.parent?.(),
|
|
1345
|
-
border:
|
|
1346
|
-
cellpadding:
|
|
1347
|
-
cellspacing:
|
|
1348
|
-
style:
|
|
453
|
+
border: X("border"),
|
|
454
|
+
cellpadding: X("cellpadding"),
|
|
455
|
+
cellspacing: X("cellspacing"),
|
|
456
|
+
style: St()
|
|
1349
457
|
};
|
|
1350
458
|
},
|
|
1351
459
|
renderHTML({ HTMLAttributes: e }) {
|
|
1352
460
|
return [
|
|
1353
461
|
"table",
|
|
1354
|
-
|
|
462
|
+
W(this.options.HTMLAttributes, e),
|
|
1355
463
|
["tbody", 0]
|
|
1356
464
|
];
|
|
1357
465
|
}
|
|
1358
|
-
}),
|
|
466
|
+
}), Tt = ct.extend({ addAttributes() {
|
|
1359
467
|
return {
|
|
1360
468
|
...this.parent?.(),
|
|
1361
|
-
style:
|
|
469
|
+
style: X("style")
|
|
1362
470
|
};
|
|
1363
|
-
} }),
|
|
1364
|
-
style:
|
|
1365
|
-
valign:
|
|
1366
|
-
width:
|
|
1367
|
-
},
|
|
471
|
+
} }), Et = {
|
|
472
|
+
style: X("style"),
|
|
473
|
+
valign: X("valign"),
|
|
474
|
+
width: X("width")
|
|
475
|
+
}, Dt = ot.extend({ addAttributes() {
|
|
1368
476
|
return {
|
|
1369
477
|
...this.parent?.(),
|
|
1370
|
-
...
|
|
478
|
+
...Et
|
|
1371
479
|
};
|
|
1372
|
-
} }),
|
|
480
|
+
} }), Ot = st.extend({ addAttributes() {
|
|
1373
481
|
return {
|
|
1374
482
|
...this.parent?.(),
|
|
1375
|
-
...
|
|
483
|
+
...Et
|
|
1376
484
|
};
|
|
1377
|
-
} }),
|
|
485
|
+
} }), kt = lt.extend({ parseHTML() {
|
|
1378
486
|
return [
|
|
1379
487
|
...this.parent?.() || [],
|
|
1380
488
|
{
|
|
@@ -1388,27 +496,27 @@ var mr = st.extend({
|
|
|
1388
496
|
getAttrs: (e) => e.hasAttribute("style") ? {} : !1
|
|
1389
497
|
}
|
|
1390
498
|
];
|
|
1391
|
-
} }),
|
|
499
|
+
} }), At = {
|
|
1392
500
|
name: "EmojiComponent",
|
|
1393
501
|
components: {
|
|
1394
|
-
NodeViewWrapper:
|
|
1395
|
-
DtEmoji:
|
|
502
|
+
NodeViewWrapper: g,
|
|
503
|
+
DtEmoji: h
|
|
1396
504
|
},
|
|
1397
|
-
props:
|
|
505
|
+
props: v
|
|
1398
506
|
};
|
|
1399
|
-
function
|
|
1400
|
-
let o =
|
|
1401
|
-
return
|
|
1402
|
-
default:
|
|
507
|
+
function jt(e, t, n, r, i, a) {
|
|
508
|
+
let o = L("dt-emoji"), s = L("node-view-wrapper");
|
|
509
|
+
return F(), O(s, { class: "d-d-inline-block d-va-bottom d-lh0" }, {
|
|
510
|
+
default: z(() => [N(o, {
|
|
1403
511
|
size: "500",
|
|
1404
512
|
code: e.node.attrs.code
|
|
1405
513
|
}, null, 8, ["code"])]),
|
|
1406
514
|
_: 1
|
|
1407
515
|
});
|
|
1408
516
|
}
|
|
1409
|
-
var
|
|
517
|
+
var Mt = /* @__PURE__ */ i(At, [["render", jt]]), Nt = {
|
|
1410
518
|
name: "SuggestionList",
|
|
1411
|
-
components: { DtListItem:
|
|
519
|
+
components: { DtListItem: ne },
|
|
1412
520
|
props: {
|
|
1413
521
|
items: {
|
|
1414
522
|
type: Array,
|
|
@@ -1482,29 +590,29 @@ var Sr = /* @__PURE__ */ i(br, [["render", xr]]), Cr = {
|
|
|
1482
590
|
}
|
|
1483
591
|
}
|
|
1484
592
|
}
|
|
1485
|
-
},
|
|
593
|
+
}, Pt = { class: "d-popover__dialog d-suggestion-list__container" }, Ft = {
|
|
1486
594
|
ref: "suggestionList",
|
|
1487
595
|
class: "d-suggestion-list"
|
|
1488
596
|
};
|
|
1489
|
-
function
|
|
1490
|
-
let o =
|
|
1491
|
-
return
|
|
597
|
+
function It(e, t, n, r, i, a) {
|
|
598
|
+
let o = L("dt-list-item");
|
|
599
|
+
return F(), A("div", Pt, [we(j("ul", Ft, [(F(!0), A(pe, null, xe(n.items, (e, t) => (F(), O(o, {
|
|
1492
600
|
key: e.id,
|
|
1493
|
-
class:
|
|
601
|
+
class: ye(["d-suggestion-list__item", { "d-list-item--highlighted": t === i.selectedIndex }]),
|
|
1494
602
|
"navigation-type": "arrow-keys",
|
|
1495
603
|
onClick: (e) => a.selectItem(t),
|
|
1496
|
-
onKeydown:
|
|
604
|
+
onKeydown: B(a.onKeyDown, ["prevent"])
|
|
1497
605
|
}, {
|
|
1498
|
-
default:
|
|
606
|
+
default: z(() => [(F(), O(Se(n.itemComponent), { item: e }, null, 8, ["item"]))]),
|
|
1499
607
|
_: 2
|
|
1500
608
|
}, 1032, [
|
|
1501
609
|
"class",
|
|
1502
610
|
"onClick",
|
|
1503
611
|
"onKeydown"
|
|
1504
|
-
]))), 128))], 512), [[
|
|
612
|
+
]))), 128))], 512), [[Ce, n.items.length]])]);
|
|
1505
613
|
}
|
|
1506
|
-
var
|
|
1507
|
-
function
|
|
614
|
+
var Lt = /* @__PURE__ */ i(Nt, [["render", It]]), Rt = "top-start";
|
|
615
|
+
function zt() {
|
|
1508
616
|
return { getBoundingClientRect: () => ({
|
|
1509
617
|
width: 0,
|
|
1510
618
|
height: 0,
|
|
@@ -1516,16 +624,16 @@ function kr() {
|
|
|
1516
624
|
bottom: 0
|
|
1517
625
|
}) };
|
|
1518
626
|
}
|
|
1519
|
-
function
|
|
627
|
+
function Bt(e) {
|
|
1520
628
|
return { getBoundingClientRect: e };
|
|
1521
629
|
}
|
|
1522
|
-
async function
|
|
630
|
+
async function Vt(e, t, n = {}) {
|
|
1523
631
|
if (!e || !t?.getBoundingClientRect) return;
|
|
1524
|
-
let { placement: r =
|
|
1525
|
-
|
|
1526
|
-
|
|
1527
|
-
|
|
1528
|
-
] } = n, { x: a, y: o } = await
|
|
632
|
+
let { placement: r = Rt, middleware: i = [
|
|
633
|
+
b(0),
|
|
634
|
+
y(),
|
|
635
|
+
S({ padding: 8 })
|
|
636
|
+
] } = n, { x: a, y: o } = await x(t, e, {
|
|
1529
637
|
placement: r,
|
|
1530
638
|
middleware: i
|
|
1531
639
|
});
|
|
@@ -1534,65 +642,65 @@ async function jr(e, t, n = {}) {
|
|
|
1534
642
|
top: `${o}px`
|
|
1535
643
|
});
|
|
1536
644
|
}
|
|
1537
|
-
function
|
|
645
|
+
function Ht(e, t = {}) {
|
|
1538
646
|
let { zIndex: n = "650" } = t;
|
|
1539
647
|
e.style.position = "absolute", e.style.zIndex = n, e.style.display = "none";
|
|
1540
648
|
}
|
|
1541
|
-
function
|
|
649
|
+
function Ut(e) {
|
|
1542
650
|
e && (e.style.display = "block");
|
|
1543
651
|
}
|
|
1544
|
-
function
|
|
652
|
+
function Wt(e) {
|
|
1545
653
|
e && (e.style.display = "none");
|
|
1546
654
|
}
|
|
1547
|
-
function
|
|
655
|
+
function Gt(e, t) {
|
|
1548
656
|
return (n) => {
|
|
1549
657
|
n.key === "Escape" && t() && e();
|
|
1550
658
|
};
|
|
1551
659
|
}
|
|
1552
|
-
function
|
|
660
|
+
function Kt(e) {
|
|
1553
661
|
document.addEventListener("keydown", e);
|
|
1554
662
|
}
|
|
1555
|
-
function
|
|
663
|
+
function qt(e) {
|
|
1556
664
|
document.removeEventListener("keydown", e);
|
|
1557
665
|
}
|
|
1558
|
-
function
|
|
1559
|
-
return new
|
|
666
|
+
function Jt(e, t, n, r) {
|
|
667
|
+
return new se(e, {
|
|
1560
668
|
props: {
|
|
1561
|
-
itemComponent:
|
|
669
|
+
itemComponent: ge(t),
|
|
1562
670
|
itemType: n,
|
|
1563
671
|
...r
|
|
1564
672
|
},
|
|
1565
673
|
editor: r.editor
|
|
1566
674
|
});
|
|
1567
675
|
}
|
|
1568
|
-
function
|
|
1569
|
-
e.escHandler &&
|
|
676
|
+
function Yt(e) {
|
|
677
|
+
e.escHandler && qt(e.escHandler), e.floatingEl?.remove(), e.component?.destroy();
|
|
1570
678
|
}
|
|
1571
|
-
function
|
|
1572
|
-
let { listComponent: r =
|
|
679
|
+
function Z(e, t, n = {}) {
|
|
680
|
+
let { listComponent: r = Lt, placement: i = Rt, zIndex: a = "650" } = n;
|
|
1573
681
|
return () => {
|
|
1574
|
-
let n = null, o = null, s = !1, c =
|
|
682
|
+
let n = null, o = null, s = !1, c = zt(), l = null;
|
|
1575
683
|
function u() {
|
|
1576
|
-
|
|
684
|
+
Vt(o, c, { placement: i });
|
|
1577
685
|
}
|
|
1578
686
|
function d() {
|
|
1579
|
-
o && (
|
|
687
|
+
o && (Ut(o), s = !0, u());
|
|
1580
688
|
}
|
|
1581
689
|
function f() {
|
|
1582
|
-
o && (
|
|
690
|
+
o && (Wt(o), s = !1);
|
|
1583
691
|
}
|
|
1584
692
|
return {
|
|
1585
693
|
onStart: (i) => {
|
|
1586
|
-
n =
|
|
694
|
+
n = Jt(r, e, t, i), i.clientRect && (o = n.element, Ht(o, { zIndex: a }), document.body.appendChild(o), c = Bt(i.clientRect), l = Gt(f, () => s), Kt(l), i.items.length > 0 && d());
|
|
1587
695
|
},
|
|
1588
696
|
onUpdate(e) {
|
|
1589
|
-
n?.updateProps(e), e.items.length > 0 ? d() : f(), e.clientRect && (c =
|
|
697
|
+
n?.updateProps(e), e.items.length > 0 ? d() : f(), e.clientRect && (c = Bt(e.clientRect), u());
|
|
1590
698
|
},
|
|
1591
699
|
onKeyDown(e) {
|
|
1592
700
|
if (s) return n?.ref?.onKeyDown(e);
|
|
1593
701
|
},
|
|
1594
702
|
onExit() {
|
|
1595
|
-
|
|
703
|
+
Yt({
|
|
1596
704
|
escHandler: l,
|
|
1597
705
|
floatingEl: o,
|
|
1598
706
|
component: n
|
|
@@ -1603,34 +711,34 @@ function Br(e, t, n = {}) {
|
|
|
1603
711
|
}
|
|
1604
712
|
//#endregion
|
|
1605
713
|
//#region components/RichTextEditor/Extensions/Emoji/EmojiSuggestion.vue
|
|
1606
|
-
var
|
|
714
|
+
var Xt = {
|
|
1607
715
|
name: "EmojiSuggestion",
|
|
1608
716
|
components: {
|
|
1609
|
-
DtEmoji:
|
|
1610
|
-
DtStack:
|
|
717
|
+
DtEmoji: h,
|
|
718
|
+
DtStack: m
|
|
1611
719
|
},
|
|
1612
720
|
props: { item: {
|
|
1613
721
|
type: Object,
|
|
1614
722
|
required: !0
|
|
1615
723
|
} }
|
|
1616
724
|
};
|
|
1617
|
-
function
|
|
1618
|
-
let o =
|
|
1619
|
-
return
|
|
725
|
+
function Zt(e, t, n, r, i, a) {
|
|
726
|
+
let o = L("dt-emoji"), s = L("dt-stack");
|
|
727
|
+
return F(), O(s, {
|
|
1620
728
|
direction: "row",
|
|
1621
729
|
gap: "100"
|
|
1622
730
|
}, {
|
|
1623
|
-
default:
|
|
731
|
+
default: z(() => [N(o, {
|
|
1624
732
|
size: "200",
|
|
1625
733
|
code: n.item.code
|
|
1626
|
-
}, null, 8, ["code"]),
|
|
734
|
+
}, null, 8, ["code"]), M(" " + R(n.item.code), 1)]),
|
|
1627
735
|
_: 1
|
|
1628
736
|
});
|
|
1629
737
|
}
|
|
1630
|
-
var
|
|
738
|
+
var Qt = /* @__PURE__ */ i(Xt, [["render", Zt]]), $t = 20, en = (e, t, n) => {
|
|
1631
739
|
let r = e.shortname?.replaceAll(":", ""), i = t.shortname?.replaceAll(":", ""), a = r.startsWith(n), o = i.startsWith(n);
|
|
1632
740
|
return a && !o ? -1 : !a && o ? 1 : r.localeCompare(i);
|
|
1633
|
-
},
|
|
741
|
+
}, tn = {
|
|
1634
742
|
items: ({ query: e }) => {
|
|
1635
743
|
if (e.length < 2) return [];
|
|
1636
744
|
let t = Object.values(c());
|
|
@@ -1638,7 +746,7 @@ var Ur = /* @__PURE__ */ i(Vr, [["render", Hr]]), Wr = 20, Gr = (e, t, n) => {
|
|
|
1638
746
|
t.name,
|
|
1639
747
|
t.shortname?.replaceAll(":", ""),
|
|
1640
748
|
...t.keywords || []
|
|
1641
|
-
].some((t) => t && t.startsWith(e))).splice(0,
|
|
749
|
+
].some((t) => t && t.startsWith(e))).splice(0, $t).sort((t, n) => en(t, n, e)).map((e) => ({ code: e.shortname }));
|
|
1642
750
|
},
|
|
1643
751
|
command: ({ editor: e, range: t, props: n }) => {
|
|
1644
752
|
e.view.state.selection.$to.nodeAfter?.text?.startsWith(" ") && (t.to += 1), e.chain().focus().insertContentAt(t, [{
|
|
@@ -1646,14 +754,14 @@ var Ur = /* @__PURE__ */ i(Vr, [["render", Hr]]), Wr = 20, Gr = (e, t, n) => {
|
|
|
1646
754
|
attrs: n
|
|
1647
755
|
}]).run(), window.getSelection()?.collapseToEnd();
|
|
1648
756
|
},
|
|
1649
|
-
render:
|
|
1650
|
-
},
|
|
757
|
+
render: Z(Qt, "emoji")
|
|
758
|
+
}, nn = /(:\w+:)$/, rn = RegExp(V + "$"), an = (e) => {
|
|
1651
759
|
if (e && a(e[0])) return { text: e[2] || e[0] };
|
|
1652
|
-
},
|
|
760
|
+
}, on = (e) => [...e.matchAll(s)].filter((e) => a(e[0])).map((e) => ({
|
|
1653
761
|
index: e.index,
|
|
1654
762
|
text: e[0],
|
|
1655
763
|
match: e
|
|
1656
|
-
})),
|
|
764
|
+
})), sn = U.create({
|
|
1657
765
|
name: "emoji",
|
|
1658
766
|
addOptions() {
|
|
1659
767
|
return { HTMLAttributes: {} };
|
|
@@ -1663,7 +771,7 @@ var Ur = /* @__PURE__ */ i(Vr, [["render", Hr]]), Wr = 20, Gr = (e, t, n) => {
|
|
|
1663
771
|
selectable: !1,
|
|
1664
772
|
atom: !0,
|
|
1665
773
|
addNodeView() {
|
|
1666
|
-
return
|
|
774
|
+
return _(Mt);
|
|
1667
775
|
},
|
|
1668
776
|
addAttributes() {
|
|
1669
777
|
return { code: { default: null } };
|
|
@@ -1676,13 +784,13 @@ var Ur = /* @__PURE__ */ i(Vr, [["render", Hr]]), Wr = 20, Gr = (e, t, n) => {
|
|
|
1676
784
|
return n ? l(n.unicode_output) : t;
|
|
1677
785
|
},
|
|
1678
786
|
renderHTML({ HTMLAttributes: e }) {
|
|
1679
|
-
return ["emoji-component",
|
|
787
|
+
return ["emoji-component", W(this.options.HTMLAttributes, e)];
|
|
1680
788
|
},
|
|
1681
789
|
addInputRules() {
|
|
1682
|
-
return [new
|
|
790
|
+
return [new Oe({
|
|
1683
791
|
find: (e) => {
|
|
1684
|
-
let t = e.match(
|
|
1685
|
-
if (t) return
|
|
792
|
+
let t = e.match(nn) || e.match(rn);
|
|
793
|
+
if (t) return an(t);
|
|
1686
794
|
},
|
|
1687
795
|
handler: ({ state: e, range: t, match: n }) => {
|
|
1688
796
|
let { tr: r } = e, i = t.from, a = t.to;
|
|
@@ -1691,13 +799,13 @@ var Ur = /* @__PURE__ */ i(Vr, [["render", Hr]]), Wr = 20, Gr = (e, t, n) => {
|
|
|
1691
799
|
})];
|
|
1692
800
|
},
|
|
1693
801
|
addPasteRules() {
|
|
1694
|
-
return [
|
|
1695
|
-
find:
|
|
802
|
+
return [G({
|
|
803
|
+
find: on,
|
|
1696
804
|
type: this.type,
|
|
1697
805
|
getAttributes(e) {
|
|
1698
806
|
return { code: e[0] };
|
|
1699
807
|
}
|
|
1700
|
-
}),
|
|
808
|
+
}), G({
|
|
1701
809
|
find: o,
|
|
1702
810
|
type: this.type,
|
|
1703
811
|
getAttributes(e) {
|
|
@@ -1706,12 +814,12 @@ var Ur = /* @__PURE__ */ i(Vr, [["render", Hr]]), Wr = 20, Gr = (e, t, n) => {
|
|
|
1706
814
|
})];
|
|
1707
815
|
},
|
|
1708
816
|
addProseMirrorPlugins() {
|
|
1709
|
-
return [
|
|
817
|
+
return [dt({
|
|
1710
818
|
char: ":",
|
|
1711
|
-
pluginKey: new
|
|
819
|
+
pluginKey: new q("emoji"),
|
|
1712
820
|
editor: this.editor,
|
|
1713
821
|
...this.options.suggestion,
|
|
1714
|
-
...
|
|
822
|
+
...tn
|
|
1715
823
|
})];
|
|
1716
824
|
},
|
|
1717
825
|
addKeyboardShortcuts() {
|
|
@@ -1725,21 +833,21 @@ var Ur = /* @__PURE__ */ i(Vr, [["render", Hr]]), Wr = 20, Gr = (e, t, n) => {
|
|
|
1725
833
|
});
|
|
1726
834
|
//#endregion
|
|
1727
835
|
//#region components/RichTextEditor/Extensions/CustomLink/Utils.js
|
|
1728
|
-
function
|
|
836
|
+
function cn(e, t, n = () => !0) {
|
|
1729
837
|
let r = [];
|
|
1730
838
|
t.lastIndex = 0;
|
|
1731
839
|
let i;
|
|
1732
840
|
for (; i = t.exec(e);) n(e, i) && r.push(i);
|
|
1733
841
|
return r;
|
|
1734
842
|
}
|
|
1735
|
-
function
|
|
843
|
+
function ln(e, t) {
|
|
1736
844
|
return !["#", "@"].includes(e.charAt(t.index)) && !["#", "@"].includes(e.charAt(t.index - 1));
|
|
1737
845
|
}
|
|
1738
|
-
function
|
|
846
|
+
function un(e) {
|
|
1739
847
|
let t = RegExp("(?:" + ["[!?.,:;'\"]", "(?:&|&)(?:lt|gt|quot|apos|raquo|laquo|rsaquo|lsaquo);)+$"].join("|"), "g");
|
|
1740
848
|
return e.replace(t, "");
|
|
1741
849
|
}
|
|
1742
|
-
function
|
|
850
|
+
function dn(e, t) {
|
|
1743
851
|
let n = e.slice(0, t + 1).search(/\S+\s*$/), r = e.slice(t).search(/\s/);
|
|
1744
852
|
if (r < 0) {
|
|
1745
853
|
let t = e.slice(n);
|
|
@@ -1755,89 +863,89 @@ function ti(e, t) {
|
|
|
1755
863
|
to: r + t
|
|
1756
864
|
};
|
|
1757
865
|
}
|
|
1758
|
-
function
|
|
1759
|
-
let i =
|
|
866
|
+
function Q(e, t, n, r) {
|
|
867
|
+
let i = dn(e, t);
|
|
1760
868
|
if (r.lastIndex = 0, !r.test(i.text)) return i;
|
|
1761
869
|
let a = n === "left" ? i.from - 1 : i.to + 1;
|
|
1762
|
-
return a <= 0 || a >= e.length || a === t ? i :
|
|
870
|
+
return a <= 0 || a >= e.length || a === t ? i : Q(e, a, n, r);
|
|
1763
871
|
}
|
|
1764
|
-
function
|
|
1765
|
-
let i =
|
|
872
|
+
function fn(e, t, n, r) {
|
|
873
|
+
let i = Ne(Math.max(e.from - 1, 0), Math.min(e.to + 1, t.content.size), t);
|
|
1766
874
|
for (let e of i) e.mark.type === r && n.removeMark(e.from, e.to, r);
|
|
1767
875
|
}
|
|
1768
|
-
var
|
|
1769
|
-
function
|
|
876
|
+
var pn = e(1, 15);
|
|
877
|
+
function $(e, n, r, i, a, o) {
|
|
1770
878
|
if (!e) return;
|
|
1771
879
|
let s = r - n - 1;
|
|
1772
880
|
s = s < 0 ? 0 : s;
|
|
1773
|
-
let c = i - n, l =
|
|
1774
|
-
|
|
1775
|
-
let t =
|
|
881
|
+
let c = i - n, l = Q(e, s, "left", pn), u = Q(e, c, "right", pn);
|
|
882
|
+
cn(e.slice(l.from, u.to), t, ln).forEach((e) => {
|
|
883
|
+
let t = un(e[0]), r = n + l.from + e.index + 1, i = r + t.length;
|
|
1776
884
|
a.addMark(r, i, o.create());
|
|
1777
885
|
});
|
|
1778
886
|
}
|
|
1779
887
|
//#endregion
|
|
1780
888
|
//#region components/RichTextEditor/Extensions/CustomLink/Autolink.js
|
|
1781
|
-
function
|
|
889
|
+
function mn(e) {
|
|
1782
890
|
let t = !1;
|
|
1783
|
-
return new
|
|
1784
|
-
key: new
|
|
891
|
+
return new K({
|
|
892
|
+
key: new q("autolink"),
|
|
1785
893
|
appendTransaction: (n, r, i) => {
|
|
1786
894
|
let a = n.some((e) => e.docChanged) && !r.doc.eq(i.doc);
|
|
1787
895
|
if (t && !a) return;
|
|
1788
896
|
let { tr: o } = i, { textContent: s } = i.doc;
|
|
1789
|
-
if (!t || !r.doc.textContent) return
|
|
897
|
+
if (!t || !r.doc.textContent) return $(s, 0, 0, s.length, o, e.type), t = !0, o;
|
|
1790
898
|
t = !0;
|
|
1791
|
-
let c =
|
|
899
|
+
let c = je(ke(r.doc, [...n]));
|
|
1792
900
|
return c.length ? (c.forEach(({ oldRange: t, newRange: n }) => {
|
|
1793
901
|
if (n.from === n.to) {
|
|
1794
|
-
|
|
902
|
+
$(s, 0, 0, s.length, o, e.type);
|
|
1795
903
|
return;
|
|
1796
904
|
}
|
|
1797
|
-
|
|
1798
|
-
|
|
905
|
+
fn(n, i.doc, o, e.type), Ae(i.doc, n, (e) => e.isTextblock).forEach(({ node: r, pos: i }) => {
|
|
906
|
+
$(r.textContent, i, t.from, n.to, o, e.type);
|
|
1799
907
|
});
|
|
1800
|
-
}), o) : (
|
|
908
|
+
}), o) : ($(s, 0, 0, s.length, o, e.type), o);
|
|
1801
909
|
}
|
|
1802
910
|
});
|
|
1803
911
|
}
|
|
1804
912
|
//#endregion
|
|
1805
913
|
//#region components/RichTextEditor/Extensions/CustomLink/CustomLink.js
|
|
1806
|
-
var
|
|
914
|
+
var hn = {
|
|
1807
915
|
class: "d-link d-c-text d-d-inline-block d-wb-break-all",
|
|
1808
916
|
rel: "noopener noreferrer nofollow"
|
|
1809
|
-
},
|
|
917
|
+
}, gn = H.create({
|
|
1810
918
|
name: "CustomLink",
|
|
1811
919
|
renderHTML({ HTMLAttributes: e }) {
|
|
1812
|
-
return ["a",
|
|
920
|
+
return ["a", W(this.options.HTMLAttributes, e, hn)];
|
|
1813
921
|
},
|
|
1814
922
|
renderText({ node: e }) {
|
|
1815
923
|
return e.attrs.text;
|
|
1816
924
|
},
|
|
1817
925
|
addProseMirrorPlugins() {
|
|
1818
|
-
return [
|
|
926
|
+
return [mn({ type: this.type })];
|
|
1819
927
|
}
|
|
1820
|
-
}),
|
|
928
|
+
}), _n = H.create({
|
|
1821
929
|
name: "LinkPhoneNumbers",
|
|
1822
930
|
renderHTML({ HTMLAttributes: e }) {
|
|
1823
|
-
return ["a",
|
|
931
|
+
return ["a", W(e, {
|
|
1824
932
|
class: "d-link d-c-pointer d-d-inline-block d-wb-break-all",
|
|
1825
933
|
rel: "noopener noreferrer nofollow"
|
|
1826
934
|
})];
|
|
1827
935
|
},
|
|
1828
936
|
addProseMirrorPlugins() {
|
|
1829
937
|
let e = this.editor, t = this.type;
|
|
1830
|
-
return [new
|
|
1831
|
-
key: new
|
|
938
|
+
return [new K({
|
|
939
|
+
key: new q("phoneClick"),
|
|
1832
940
|
props: { handleClick(n, r, i) {
|
|
1833
941
|
let { state: a } = n, o = a.doc.resolve(r);
|
|
1834
942
|
if (!o.marks().some((e) => e.type === t)) return !1;
|
|
1835
|
-
let s =
|
|
943
|
+
let s = Me(o, t), c = s ? a.doc.textBetween(s.from, s.to) : "";
|
|
1836
944
|
return i.preventDefault(), e.emit("phone-click", { phoneNumber: c }), !0;
|
|
1837
945
|
} }
|
|
1838
946
|
})];
|
|
1839
947
|
}
|
|
1840
|
-
}),
|
|
948
|
+
}), vn = ft.extend({
|
|
1841
949
|
name: "ConfigurableImage",
|
|
1842
950
|
addAttributes() {
|
|
1843
951
|
return {
|
|
@@ -1852,12 +960,12 @@ var si = {
|
|
|
1852
960
|
}).configure({
|
|
1853
961
|
inline: !0,
|
|
1854
962
|
allowBase64: !0
|
|
1855
|
-
}),
|
|
963
|
+
}), yn = new Set(/* @__PURE__ */ "address.article.aside.blockquote.dd.details.dialog.div.dl.dt.fieldset.figcaption.figure.footer.form.h1.h2.h3.h4.h5.h6.header.hgroup.hr.li.main.nav.ol.p.pre.section.table.ul".split(".")), bn = J.extend({
|
|
1856
964
|
parseHTML() {
|
|
1857
965
|
return [{
|
|
1858
966
|
tag: "div",
|
|
1859
967
|
getAttrs: (e) => {
|
|
1860
|
-
for (let t of e.children) if (
|
|
968
|
+
for (let t of e.children) if (yn.has(t.tagName.toLowerCase())) return !1;
|
|
1861
969
|
return null;
|
|
1862
970
|
}
|
|
1863
971
|
}];
|
|
@@ -1865,17 +973,17 @@ var si = {
|
|
|
1865
973
|
renderHTML({ HTMLAttributes: e }) {
|
|
1866
974
|
return [
|
|
1867
975
|
"div",
|
|
1868
|
-
|
|
976
|
+
W(this.options.HTMLAttributes, e),
|
|
1869
977
|
0
|
|
1870
978
|
];
|
|
1871
979
|
}
|
|
1872
|
-
}),
|
|
980
|
+
}), xn = {
|
|
1873
981
|
name: "MentionComponent",
|
|
1874
982
|
components: {
|
|
1875
|
-
NodeViewWrapper:
|
|
1876
|
-
DtLink:
|
|
983
|
+
NodeViewWrapper: g,
|
|
984
|
+
DtLink: ee
|
|
1877
985
|
},
|
|
1878
|
-
props:
|
|
986
|
+
props: v,
|
|
1879
987
|
computed: { text() {
|
|
1880
988
|
return "@" + this.$props.node.attrs.name;
|
|
1881
989
|
} },
|
|
@@ -1905,18 +1013,18 @@ var si = {
|
|
|
1905
1013
|
}
|
|
1906
1014
|
}
|
|
1907
1015
|
};
|
|
1908
|
-
function
|
|
1909
|
-
let o =
|
|
1910
|
-
return
|
|
1911
|
-
default:
|
|
1016
|
+
function Sn(e, t, n, r, i, a) {
|
|
1017
|
+
let o = L("dt-link"), s = L("node-view-wrapper");
|
|
1018
|
+
return F(), O(s, { class: "d-d-inline-block" }, {
|
|
1019
|
+
default: z(() => [N(o, {
|
|
1912
1020
|
tone: "mention",
|
|
1913
|
-
onClick:
|
|
1021
|
+
onClick: B(a.handleClick, ["prevent"]),
|
|
1914
1022
|
onMouseenter: a.handleMouseEnter,
|
|
1915
1023
|
onMouseleave: a.handleMouseLeave,
|
|
1916
1024
|
onFocusin: a.handleMouseEnter,
|
|
1917
1025
|
onFocusout: a.handleMouseLeave
|
|
1918
1026
|
}, {
|
|
1919
|
-
default:
|
|
1027
|
+
default: z(() => [M(R(a.text), 1)]),
|
|
1920
1028
|
_: 1
|
|
1921
1029
|
}, 8, [
|
|
1922
1030
|
"onClick",
|
|
@@ -1928,9 +1036,9 @@ function mi(e, t, n, r, i, a) {
|
|
|
1928
1036
|
_: 1
|
|
1929
1037
|
});
|
|
1930
1038
|
}
|
|
1931
|
-
var
|
|
1039
|
+
var Cn = /* @__PURE__ */ i(xn, [["render", Sn]]), wn = Y.extend({
|
|
1932
1040
|
addNodeView() {
|
|
1933
|
-
return
|
|
1041
|
+
return _(Cn);
|
|
1934
1042
|
},
|
|
1935
1043
|
parseHTML() {
|
|
1936
1044
|
return [{ tag: "mention-component" }];
|
|
@@ -1947,20 +1055,20 @@ var hi = /* @__PURE__ */ i(pi, [["render", mi]]), gi = ht.extend({
|
|
|
1947
1055
|
return `@${e.attrs.id}`;
|
|
1948
1056
|
},
|
|
1949
1057
|
renderHTML({ HTMLAttributes: e }) {
|
|
1950
|
-
return ["mention-component",
|
|
1058
|
+
return ["mention-component", W(this.options.HTMLAttributes, e)];
|
|
1951
1059
|
}
|
|
1952
1060
|
}).configure({ suggestion: {
|
|
1953
1061
|
char: "@",
|
|
1954
|
-
pluginKey: new
|
|
1955
|
-
} }),
|
|
1062
|
+
pluginKey: new q("mentionSuggestion")
|
|
1063
|
+
} }), Tn = {
|
|
1956
1064
|
name: "ChannelComponent",
|
|
1957
1065
|
components: {
|
|
1958
|
-
NodeViewWrapper:
|
|
1959
|
-
DtLink:
|
|
1960
|
-
DtIconLock:
|
|
1961
|
-
DtStack:
|
|
1066
|
+
NodeViewWrapper: g,
|
|
1067
|
+
DtLink: ee,
|
|
1068
|
+
DtIconLock: Ee,
|
|
1069
|
+
DtStack: m
|
|
1962
1070
|
},
|
|
1963
|
-
props:
|
|
1071
|
+
props: v,
|
|
1964
1072
|
computed: { text() {
|
|
1965
1073
|
return this.$props.node.attrs.locked ? this.$props.node.attrs.name : "#" + this.$props.node.attrs.name;
|
|
1966
1074
|
} },
|
|
@@ -1974,21 +1082,21 @@ var hi = /* @__PURE__ */ i(pi, [["render", mi]]), gi = ht.extend({
|
|
|
1974
1082
|
this.$props.editor.emit("channel-click", e);
|
|
1975
1083
|
} }
|
|
1976
1084
|
};
|
|
1977
|
-
function
|
|
1978
|
-
let o =
|
|
1979
|
-
return
|
|
1980
|
-
default:
|
|
1085
|
+
function En(e, t, n, r, i, a) {
|
|
1086
|
+
let o = L("dt-icon-lock"), s = L("dt-stack"), c = L("dt-link"), l = L("node-view-wrapper");
|
|
1087
|
+
return F(), O(l, { class: "d-d-inline-block" }, {
|
|
1088
|
+
default: z(() => [N(c, {
|
|
1981
1089
|
tone: "mention",
|
|
1982
|
-
onClick:
|
|
1090
|
+
onClick: B(a.handleClick, ["prevent"])
|
|
1983
1091
|
}, {
|
|
1984
|
-
default:
|
|
1092
|
+
default: z(() => [N(s, {
|
|
1985
1093
|
direction: "row",
|
|
1986
1094
|
gap: "0"
|
|
1987
1095
|
}, {
|
|
1988
|
-
default:
|
|
1096
|
+
default: z(() => [e.$props.node.attrs.locked ? (F(), O(o, {
|
|
1989
1097
|
key: 0,
|
|
1990
1098
|
size: "200"
|
|
1991
|
-
})) : k("", !0),
|
|
1099
|
+
})) : k("", !0), j("span", null, R(a.text), 1)]),
|
|
1992
1100
|
_: 1
|
|
1993
1101
|
})]),
|
|
1994
1102
|
_: 1
|
|
@@ -1996,10 +1104,10 @@ function vi(e, t, n, r, i, a) {
|
|
|
1996
1104
|
_: 1
|
|
1997
1105
|
});
|
|
1998
1106
|
}
|
|
1999
|
-
var
|
|
1107
|
+
var Dn = /* @__PURE__ */ i(Tn, [["render", En]]), On = Y.extend({
|
|
2000
1108
|
name: "channel",
|
|
2001
1109
|
addNodeView() {
|
|
2002
|
-
return
|
|
1110
|
+
return _(Dn);
|
|
2003
1111
|
},
|
|
2004
1112
|
parseHTML() {
|
|
2005
1113
|
return [{ tag: "channel-component" }];
|
|
@@ -2016,15 +1124,15 @@ var yi = /* @__PURE__ */ i(_i, [["render", vi]]), bi = ht.extend({
|
|
|
2016
1124
|
return `#${e.attrs.id}`;
|
|
2017
1125
|
},
|
|
2018
1126
|
renderHTML({ HTMLAttributes: e }) {
|
|
2019
|
-
return ["channel-component",
|
|
1127
|
+
return ["channel-component", W(this.options.HTMLAttributes, e)];
|
|
2020
1128
|
}
|
|
2021
1129
|
}).configure({ suggestion: {
|
|
2022
1130
|
char: "#",
|
|
2023
|
-
pluginKey: new
|
|
2024
|
-
} }),
|
|
1131
|
+
pluginKey: new q("channelSuggestion")
|
|
1132
|
+
} }), kn = {
|
|
2025
1133
|
name: "SlashCommandsComponent",
|
|
2026
|
-
components: { NodeViewWrapper:
|
|
2027
|
-
props: { ...
|
|
1134
|
+
components: { NodeViewWrapper: g },
|
|
1135
|
+
props: { ...v },
|
|
2028
1136
|
emits: ["selected-command"],
|
|
2029
1137
|
computed: { text() {
|
|
2030
1138
|
return "/" + this.$props.node.attrs.command;
|
|
@@ -2036,21 +1144,21 @@ var yi = /* @__PURE__ */ i(_i, [["render", vi]]), bi = ht.extend({
|
|
|
2036
1144
|
t && typeof t == "function" && t(e);
|
|
2037
1145
|
}
|
|
2038
1146
|
};
|
|
2039
|
-
function
|
|
2040
|
-
let o =
|
|
2041
|
-
return
|
|
2042
|
-
default:
|
|
1147
|
+
function An(e, t, n, r, i, a) {
|
|
1148
|
+
let o = L("node-view-wrapper");
|
|
1149
|
+
return F(), O(o, { class: "d-d-inline-block" }, {
|
|
1150
|
+
default: z(() => [M(R(a.text), 1)]),
|
|
2043
1151
|
_: 1
|
|
2044
1152
|
});
|
|
2045
1153
|
}
|
|
2046
|
-
var
|
|
1154
|
+
var jn = /* @__PURE__ */ i(kn, [["render", An]]), Mn = (e, t) => [...e.matchAll(t)].map((e) => {
|
|
2047
1155
|
let t = e[2];
|
|
2048
1156
|
return t.endsWith(" ") || (t += " "), {
|
|
2049
1157
|
index: e.index,
|
|
2050
1158
|
text: t,
|
|
2051
1159
|
match: e
|
|
2052
1160
|
};
|
|
2053
|
-
}),
|
|
1161
|
+
}), Nn = Y.extend({
|
|
2054
1162
|
name: "slash-commands",
|
|
2055
1163
|
group: "inline",
|
|
2056
1164
|
inline: !0,
|
|
@@ -2064,7 +1172,7 @@ var Ci = /* @__PURE__ */ i(xi, [["render", Si]]), wi = (e, t) => [...e.matchAll(
|
|
|
2064
1172
|
return { onSelectedCommand: this.options.onSelectedCommand };
|
|
2065
1173
|
},
|
|
2066
1174
|
addNodeView() {
|
|
2067
|
-
return
|
|
1175
|
+
return _(jn);
|
|
2068
1176
|
},
|
|
2069
1177
|
parseHTML() {
|
|
2070
1178
|
return [{ tag: "command-component" }];
|
|
@@ -2080,11 +1188,11 @@ var Ci = /* @__PURE__ */ i(xi, [["render", Si]]), wi = (e, t) => [...e.matchAll(
|
|
|
2080
1188
|
return `/${e.attrs.command}`;
|
|
2081
1189
|
},
|
|
2082
1190
|
renderHTML({ HTMLAttributes: e }) {
|
|
2083
|
-
return ["command-component",
|
|
1191
|
+
return ["command-component", W(this.options.HTMLAttributes, e)];
|
|
2084
1192
|
},
|
|
2085
1193
|
addInputRules() {
|
|
2086
1194
|
let e = this.options.suggestion?.items({ query: "" }).map((e) => e.command);
|
|
2087
|
-
return [
|
|
1195
|
+
return [Le({
|
|
2088
1196
|
find: RegExp(`^((?:\\/)(${e.join("|")})) $`),
|
|
2089
1197
|
type: this.type,
|
|
2090
1198
|
getAttributes(e) {
|
|
@@ -2094,8 +1202,8 @@ var Ci = /* @__PURE__ */ i(xi, [["render", Si]]), wi = (e, t) => [...e.matchAll(
|
|
|
2094
1202
|
},
|
|
2095
1203
|
addPasteRules() {
|
|
2096
1204
|
let e = this.options.suggestion?.items({ query: "" }).map((e) => e.command), t = RegExp(`^((?:\\/)(${e.join("|")})) ?$`, "g");
|
|
2097
|
-
return [
|
|
2098
|
-
find: (e) =>
|
|
1205
|
+
return [G({
|
|
1206
|
+
find: (e) => Mn(e, t),
|
|
2099
1207
|
type: this.type,
|
|
2100
1208
|
getAttributes(e) {
|
|
2101
1209
|
return { command: e[0].trim() };
|
|
@@ -2104,21 +1212,21 @@ var Ci = /* @__PURE__ */ i(xi, [["render", Si]]), wi = (e, t) => [...e.matchAll(
|
|
|
2104
1212
|
}
|
|
2105
1213
|
}).configure({ suggestion: {
|
|
2106
1214
|
char: "/",
|
|
2107
|
-
pluginKey: new
|
|
2108
|
-
} }),
|
|
1215
|
+
pluginKey: new q("slashCommandSuggestion")
|
|
1216
|
+
} }), Pn = 100, Fn = {
|
|
2109
1217
|
name: "VariableComponent",
|
|
2110
1218
|
components: {
|
|
2111
1219
|
DtBadge: d,
|
|
2112
|
-
DtButton:
|
|
2113
|
-
DtPopover:
|
|
2114
|
-
DtInput:
|
|
2115
|
-
NodeViewWrapper:
|
|
1220
|
+
DtButton: p,
|
|
1221
|
+
DtPopover: re,
|
|
1222
|
+
DtInput: ie,
|
|
1223
|
+
NodeViewWrapper: g
|
|
2116
1224
|
},
|
|
2117
|
-
props:
|
|
1225
|
+
props: v,
|
|
2118
1226
|
data() {
|
|
2119
1227
|
return {
|
|
2120
|
-
i18n: new
|
|
2121
|
-
MAX_VARIABLE_ALT_LENGTH:
|
|
1228
|
+
i18n: new te(),
|
|
1229
|
+
MAX_VARIABLE_ALT_LENGTH: Pn
|
|
2122
1230
|
};
|
|
2123
1231
|
},
|
|
2124
1232
|
computed: {
|
|
@@ -2153,24 +1261,24 @@ var Ci = /* @__PURE__ */ i(xi, [["render", Si]]), wi = (e, t) => [...e.matchAll(
|
|
|
2153
1261
|
}
|
|
2154
1262
|
}
|
|
2155
1263
|
};
|
|
2156
|
-
function
|
|
2157
|
-
let o =
|
|
2158
|
-
return
|
|
2159
|
-
default:
|
|
1264
|
+
function In(e, t, n, r, i, a) {
|
|
1265
|
+
let o = L("dt-badge"), s = L("dt-button"), c = L("dt-input"), l = L("dt-popover"), u = L("node-view-wrapper");
|
|
1266
|
+
return F(), O(u, { class: "d-d-inline-block" }, {
|
|
1267
|
+
default: z(() => [a.enableAltText ? (F(), O(l, {
|
|
2160
1268
|
key: 0,
|
|
2161
1269
|
padding: "small",
|
|
2162
1270
|
"navigation-type": "arrow-keys",
|
|
2163
1271
|
placement: "top-start",
|
|
2164
1272
|
modal: !1
|
|
2165
1273
|
}, {
|
|
2166
|
-
anchor:
|
|
2167
|
-
default:
|
|
1274
|
+
anchor: z(({ attrs: e }) => [N(s, _e(e, { kind: "unstyled" }), {
|
|
1275
|
+
default: z(() => [N(o, {
|
|
2168
1276
|
text: a.badgeLabel,
|
|
2169
1277
|
contenteditable: "false"
|
|
2170
1278
|
}, null, 8, ["text"])]),
|
|
2171
1279
|
_: 1
|
|
2172
1280
|
}, 16)]),
|
|
2173
|
-
content:
|
|
1281
|
+
content: z(({ close: e }) => [N(c, {
|
|
2174
1282
|
modelValue: a.altText,
|
|
2175
1283
|
"onUpdate:modelValue": t[0] || (t[0] = (e) => a.altText = e),
|
|
2176
1284
|
class: "d-p-100 d-w332",
|
|
@@ -2183,7 +1291,7 @@ function Oi(e, t, n, r, i, a) {
|
|
|
2183
1291
|
warn: i.MAX_VARIABLE_ALT_LENGTH,
|
|
2184
1292
|
limitMaxLength: !0
|
|
2185
1293
|
} },
|
|
2186
|
-
onKeyup:
|
|
1294
|
+
onKeyup: Te((t) => e(), ["enter"])
|
|
2187
1295
|
}, null, 8, [
|
|
2188
1296
|
"modelValue",
|
|
2189
1297
|
"label",
|
|
@@ -2192,7 +1300,7 @@ function Oi(e, t, n, r, i, a) {
|
|
|
2192
1300
|
"onKeyup"
|
|
2193
1301
|
])]),
|
|
2194
1302
|
_: 1
|
|
2195
|
-
})) : (
|
|
1303
|
+
})) : (F(), O(o, {
|
|
2196
1304
|
key: 1,
|
|
2197
1305
|
text: a.badgeLabel,
|
|
2198
1306
|
contenteditable: "false"
|
|
@@ -2200,7 +1308,7 @@ function Oi(e, t, n, r, i, a) {
|
|
|
2200
1308
|
_: 1
|
|
2201
1309
|
});
|
|
2202
1310
|
}
|
|
2203
|
-
var
|
|
1311
|
+
var Ln = /* @__PURE__ */ i(Fn, [["render", In]]), Rn = U.create({
|
|
2204
1312
|
name: "variable",
|
|
2205
1313
|
group: "inline",
|
|
2206
1314
|
inline: !0,
|
|
@@ -2213,7 +1321,7 @@ var ki = /* @__PURE__ */ i(Di, [["render", Oi]]), Ai = De.create({
|
|
|
2213
1321
|
};
|
|
2214
1322
|
},
|
|
2215
1323
|
addNodeView() {
|
|
2216
|
-
return
|
|
1324
|
+
return _(Ln);
|
|
2217
1325
|
},
|
|
2218
1326
|
addAttributes() {
|
|
2219
1327
|
return {
|
|
@@ -2241,7 +1349,7 @@ var ki = /* @__PURE__ */ i(Di, [["render", Oi]]), Ai = De.create({
|
|
|
2241
1349
|
return e.attrs.altText;
|
|
2242
1350
|
},
|
|
2243
1351
|
renderHTML({ node: e, HTMLAttributes: t }) {
|
|
2244
|
-
return ["variable",
|
|
1352
|
+
return ["variable", W(this.options.HTMLAttributes, t, {
|
|
2245
1353
|
"data-variable-id": e.attrs.id,
|
|
2246
1354
|
"data-alt-text": e.attrs.altText,
|
|
2247
1355
|
"data-enable-alt-text": String(e.attrs.enableAltText)
|
|
@@ -2257,11 +1365,11 @@ var ki = /* @__PURE__ */ i(Di, [["render", Oi]]), Ai = De.create({
|
|
|
2257
1365
|
}
|
|
2258
1366
|
}) };
|
|
2259
1367
|
}
|
|
2260
|
-
}),
|
|
1368
|
+
}), zn = {
|
|
2261
1369
|
name: "MentionSuggestion",
|
|
2262
1370
|
components: {
|
|
2263
1371
|
DtAvatar: u,
|
|
2264
|
-
DtStack:
|
|
1372
|
+
DtStack: m,
|
|
2265
1373
|
DtText: f
|
|
2266
1374
|
},
|
|
2267
1375
|
props: { item: {
|
|
@@ -2296,15 +1404,15 @@ var ki = /* @__PURE__ */ i(Di, [["render", Oi]]), Ai = De.create({
|
|
|
2296
1404
|
return this.item.showDetails;
|
|
2297
1405
|
}
|
|
2298
1406
|
}
|
|
2299
|
-
},
|
|
2300
|
-
function
|
|
2301
|
-
let o =
|
|
2302
|
-
return
|
|
1407
|
+
}, Bn = { class: "d-mention-suggestion__name" };
|
|
1408
|
+
function Vn(e, t, n, r, i, a) {
|
|
1409
|
+
let o = L("dt-avatar"), s = L("dt-text"), c = L("dt-stack");
|
|
1410
|
+
return F(), O(c, {
|
|
2303
1411
|
direction: "row",
|
|
2304
1412
|
class: "d-mention-suggestion__container",
|
|
2305
1413
|
gap: "100"
|
|
2306
1414
|
}, {
|
|
2307
|
-
default:
|
|
1415
|
+
default: z(() => [N(o, {
|
|
2308
1416
|
"full-name": a.name,
|
|
2309
1417
|
"image-src": a.avatarSrc,
|
|
2310
1418
|
"image-alt": a.name,
|
|
@@ -2317,27 +1425,27 @@ function Ni(e, t, n, r, i, a) {
|
|
|
2317
1425
|
"image-alt",
|
|
2318
1426
|
"show-presence",
|
|
2319
1427
|
"presence"
|
|
2320
|
-
]),
|
|
1428
|
+
]), N(c, {
|
|
2321
1429
|
class: "d-mention-suggestion__details-container",
|
|
2322
1430
|
gap: "1"
|
|
2323
1431
|
}, {
|
|
2324
|
-
default:
|
|
1432
|
+
default: z(() => [j("span", Bn, R(a.name), 1), a.showDetails ? (F(), O(c, {
|
|
2325
1433
|
key: 0,
|
|
2326
1434
|
direction: "row",
|
|
2327
1435
|
gap: "50"
|
|
2328
1436
|
}, {
|
|
2329
|
-
default:
|
|
2330
|
-
a.presenceText ? (
|
|
1437
|
+
default: z(() => [
|
|
1438
|
+
a.presenceText ? (F(), O(s, {
|
|
2331
1439
|
key: 0,
|
|
2332
1440
|
kind: "label",
|
|
2333
1441
|
size: 200,
|
|
2334
1442
|
strength: "normal",
|
|
2335
|
-
class:
|
|
1443
|
+
class: ye(["d-mention-suggestion__presence", [a.presenceFontColorClass]])
|
|
2336
1444
|
}, {
|
|
2337
|
-
default:
|
|
1445
|
+
default: z(() => [M(R(a.presenceText), 1)]),
|
|
2338
1446
|
_: 1
|
|
2339
1447
|
}, 8, ["class"])) : k("", !0),
|
|
2340
|
-
a.status && a.presenceText ? (
|
|
1448
|
+
a.status && a.presenceText ? (F(), O(s, {
|
|
2341
1449
|
key: 1,
|
|
2342
1450
|
kind: "label",
|
|
2343
1451
|
size: 200,
|
|
@@ -2345,10 +1453,10 @@ function Ni(e, t, n, r, i, a) {
|
|
|
2345
1453
|
as: "div",
|
|
2346
1454
|
class: "d-mention-suggestion__divider"
|
|
2347
1455
|
}, {
|
|
2348
|
-
default:
|
|
1456
|
+
default: z(() => [...t[0] || (t[0] = [M(" • ", -1)])]),
|
|
2349
1457
|
_: 1
|
|
2350
1458
|
})) : k("", !0),
|
|
2351
|
-
a.status ? (
|
|
1459
|
+
a.status ? (F(), O(s, {
|
|
2352
1460
|
key: 2,
|
|
2353
1461
|
kind: "label",
|
|
2354
1462
|
size: 200,
|
|
@@ -2356,7 +1464,7 @@ function Ni(e, t, n, r, i, a) {
|
|
|
2356
1464
|
as: "div",
|
|
2357
1465
|
class: "d-mention-suggestion__status"
|
|
2358
1466
|
}, {
|
|
2359
|
-
default:
|
|
1467
|
+
default: z(() => [M(R(a.status), 1)]),
|
|
2360
1468
|
_: 1
|
|
2361
1469
|
})) : k("", !0)
|
|
2362
1470
|
]),
|
|
@@ -2369,15 +1477,15 @@ function Ni(e, t, n, r, i, a) {
|
|
|
2369
1477
|
}
|
|
2370
1478
|
//#endregion
|
|
2371
1479
|
//#region components/RichTextEditor/Extensions/Mentions/Suggestion.js
|
|
2372
|
-
var
|
|
1480
|
+
var Hn = {
|
|
2373
1481
|
allowSpaces: !0,
|
|
2374
|
-
render:
|
|
2375
|
-
},
|
|
1482
|
+
render: Z(/* @__PURE__ */ i(zn, [["render", Vn]]), "mention")
|
|
1483
|
+
}, Un = {
|
|
2376
1484
|
name: "ChannelSuggestion",
|
|
2377
1485
|
components: {
|
|
2378
|
-
DtStack:
|
|
2379
|
-
DtIconHash:
|
|
2380
|
-
DtIconLock:
|
|
1486
|
+
DtStack: m,
|
|
1487
|
+
DtIconHash: pt,
|
|
1488
|
+
DtIconLock: mt
|
|
2381
1489
|
},
|
|
2382
1490
|
props: { item: {
|
|
2383
1491
|
type: Object,
|
|
@@ -2387,28 +1495,28 @@ var Pi = {
|
|
|
2387
1495
|
return this.item.name;
|
|
2388
1496
|
} }
|
|
2389
1497
|
};
|
|
2390
|
-
function
|
|
2391
|
-
let o =
|
|
2392
|
-
return
|
|
1498
|
+
function Wn(e, t, n, r, i, a) {
|
|
1499
|
+
let o = L("dt-icon-hash"), s = L("dt-icon-lock"), c = L("dt-stack");
|
|
1500
|
+
return F(), O(c, {
|
|
2393
1501
|
direction: "row",
|
|
2394
1502
|
gap: "100"
|
|
2395
1503
|
}, {
|
|
2396
|
-
default:
|
|
1504
|
+
default: z(() => [n.item.locked ? (F(), O(s, {
|
|
2397
1505
|
key: 1,
|
|
2398
1506
|
size: "300"
|
|
2399
|
-
})) : (
|
|
1507
|
+
})) : (F(), O(o, {
|
|
2400
1508
|
key: 0,
|
|
2401
1509
|
size: "300"
|
|
2402
|
-
})),
|
|
1510
|
+
})), j("span", null, R(a.name), 1)]),
|
|
2403
1511
|
_: 1
|
|
2404
1512
|
});
|
|
2405
1513
|
}
|
|
2406
1514
|
//#endregion
|
|
2407
1515
|
//#region components/RichTextEditor/Extensions/Channels/Suggestion.js
|
|
2408
|
-
var
|
|
1516
|
+
var Gn = {
|
|
2409
1517
|
allowSpaces: !0,
|
|
2410
|
-
render:
|
|
2411
|
-
},
|
|
1518
|
+
render: Z(/* @__PURE__ */ i(Un, [["render", Wn]]), "channel")
|
|
1519
|
+
}, Kn = {
|
|
2412
1520
|
name: "SlashCommandSuggestion",
|
|
2413
1521
|
components: { DtText: f },
|
|
2414
1522
|
props: { item: {
|
|
@@ -2426,40 +1534,40 @@ var Li = {
|
|
|
2426
1534
|
return this.item.parametersExample;
|
|
2427
1535
|
}
|
|
2428
1536
|
}
|
|
2429
|
-
},
|
|
2430
|
-
function
|
|
2431
|
-
let o =
|
|
2432
|
-
return
|
|
1537
|
+
}, qn = { key: 0 };
|
|
1538
|
+
function Jn(e, t, n, r, i, a) {
|
|
1539
|
+
let o = L("dt-text");
|
|
1540
|
+
return F(), A("div", null, [N(o, {
|
|
2433
1541
|
kind: "body",
|
|
2434
1542
|
size: 300,
|
|
2435
1543
|
density: 300,
|
|
2436
1544
|
as: "div"
|
|
2437
1545
|
}, {
|
|
2438
|
-
default:
|
|
1546
|
+
default: z(() => [j("span", null, "/" + R(a.command), 1), a.parametersExample ? (F(), A("span", qn, R(a.parametersExample), 1)) : k("", !0)]),
|
|
2439
1547
|
_: 1
|
|
2440
|
-
}),
|
|
1548
|
+
}), N(o, {
|
|
2441
1549
|
kind: "body",
|
|
2442
1550
|
size: 200,
|
|
2443
1551
|
tone: "tertiary",
|
|
2444
1552
|
as: "div"
|
|
2445
1553
|
}, {
|
|
2446
|
-
default:
|
|
1554
|
+
default: z(() => [M(R(a.description), 1)]),
|
|
2447
1555
|
_: 1
|
|
2448
1556
|
})]);
|
|
2449
1557
|
}
|
|
2450
1558
|
//#endregion
|
|
2451
1559
|
//#region components/RichTextEditor/Extensions/SlashCommand/Suggestion.js
|
|
2452
|
-
var
|
|
1560
|
+
var Yn = {
|
|
2453
1561
|
allowSpaces: !0,
|
|
2454
1562
|
startOfLine: !0,
|
|
2455
|
-
render:
|
|
2456
|
-
},
|
|
1563
|
+
render: Z(/* @__PURE__ */ i(Kn, [["render", Jn]]), "slash-command")
|
|
1564
|
+
}, Xn = {
|
|
2457
1565
|
name: "DtRichTextEditor",
|
|
2458
1566
|
components: {
|
|
2459
|
-
EditorContent:
|
|
2460
|
-
BubbleMenu:
|
|
2461
|
-
DtButton:
|
|
2462
|
-
DtStack:
|
|
1567
|
+
EditorContent: oe,
|
|
1568
|
+
BubbleMenu: yt,
|
|
1569
|
+
DtButton: p,
|
|
1570
|
+
DtStack: m
|
|
2463
1571
|
},
|
|
2464
1572
|
props: {
|
|
2465
1573
|
modelValue: {
|
|
@@ -2498,14 +1606,14 @@ var Vi = {
|
|
|
2498
1606
|
],
|
|
2499
1607
|
default: !1,
|
|
2500
1608
|
validator(e) {
|
|
2501
|
-
return typeof e == "string" ?
|
|
1609
|
+
return typeof e == "string" ? de.includes(e) : !0;
|
|
2502
1610
|
}
|
|
2503
1611
|
},
|
|
2504
1612
|
outputFormat: {
|
|
2505
1613
|
type: String,
|
|
2506
1614
|
default: "html",
|
|
2507
1615
|
validator(e) {
|
|
2508
|
-
return
|
|
1616
|
+
return fe.includes(e);
|
|
2509
1617
|
}
|
|
2510
1618
|
},
|
|
2511
1619
|
placeholder: {
|
|
@@ -2653,7 +1761,7 @@ var Vi = {
|
|
|
2653
1761
|
editor: null,
|
|
2654
1762
|
appendTo: () => n(this.$refs.editor.$el).getRootNode()?.querySelector("body"),
|
|
2655
1763
|
floatingOptions: { placement: "top-start" },
|
|
2656
|
-
i18n: new
|
|
1764
|
+
i18n: new te()
|
|
2657
1765
|
};
|
|
2658
1766
|
},
|
|
2659
1767
|
computed: {
|
|
@@ -2667,15 +1775,15 @@ var Vi = {
|
|
|
2667
1775
|
},
|
|
2668
1776
|
extensions() {
|
|
2669
1777
|
let e = [
|
|
2670
|
-
|
|
2671
|
-
|
|
2672
|
-
|
|
2673
|
-
|
|
1778
|
+
We,
|
|
1779
|
+
rt,
|
|
1780
|
+
qe,
|
|
1781
|
+
Je
|
|
2674
1782
|
];
|
|
2675
|
-
e.push(this.useDivTags ?
|
|
1783
|
+
e.push(this.useDivTags ? bn : J), this.allowBold && e.push(Ye), this.allowBlockquote && e.push(Ve), this.allowBulletList && (e.push(Xe), e.push(Ze.extend({ renderText({ node: e }) {
|
|
2676
1784
|
return e.textContent;
|
|
2677
|
-
} })), e.push(
|
|
2678
|
-
let t = this, n =
|
|
1785
|
+
} })), e.push(Qe)), this.allowItalic && e.push($e), this.allowStrike && e.push(tt), this.allowUnderline && e.push(nt), this.placeholder && e.push(Ke.configure({ placeholder: this.placeholder }));
|
|
1786
|
+
let t = this, n = De.create({ addKeyboardShortcuts() {
|
|
2679
1787
|
return {
|
|
2680
1788
|
"Shift-Enter": ({ editor: e }) => t.allowLineBreaks ? !1 : (e.commands.first(({ commands: e }) => [
|
|
2681
1789
|
() => e.newlineInCode(),
|
|
@@ -2687,7 +1795,7 @@ var Vi = {
|
|
|
2687
1795
|
Enter: () => t.allowLineBreaks ? !1 : (t.$emit("enter"), !0)
|
|
2688
1796
|
};
|
|
2689
1797
|
} });
|
|
2690
|
-
if (e.push(n), this.link && e.push(
|
|
1798
|
+
if (e.push(n), this.link && e.push(et.extend({
|
|
2691
1799
|
inclusive: !1,
|
|
2692
1800
|
addKeyboardShortcuts() {
|
|
2693
1801
|
return { "Mod-k": () => (t.$emit("edit-link"), !0) };
|
|
@@ -2696,34 +1804,34 @@ var Vi = {
|
|
|
2696
1804
|
HTMLAttributes: { class: "d-link d-wb-break-all" },
|
|
2697
1805
|
openOnClick: !1,
|
|
2698
1806
|
autolink: !this.customLink,
|
|
2699
|
-
protocols:
|
|
2700
|
-
})), this.customLink && e.push(this.getExtension(
|
|
1807
|
+
protocols: E
|
|
1808
|
+
})), this.customLink && e.push(this.getExtension(gn, this.customLink)), this.linkPhoneNumbers !== null && e.push(_n), this.mentionSuggestion) {
|
|
2701
1809
|
let t = {
|
|
2702
1810
|
...this.mentionSuggestion,
|
|
2703
|
-
...
|
|
1811
|
+
...Hn
|
|
2704
1812
|
};
|
|
2705
|
-
e.push(
|
|
1813
|
+
e.push(wn.configure({ suggestion: t }));
|
|
2706
1814
|
}
|
|
2707
1815
|
if (this.channelSuggestion) {
|
|
2708
1816
|
let t = {
|
|
2709
1817
|
...this.channelSuggestion,
|
|
2710
|
-
...
|
|
1818
|
+
...Gn
|
|
2711
1819
|
};
|
|
2712
|
-
e.push(
|
|
1820
|
+
e.push(On.configure({ suggestion: t }));
|
|
2713
1821
|
}
|
|
2714
1822
|
if (this.slashCommandSuggestion) {
|
|
2715
1823
|
let t = {
|
|
2716
1824
|
...this.slashCommandSuggestion,
|
|
2717
|
-
...
|
|
1825
|
+
...Yn
|
|
2718
1826
|
};
|
|
2719
|
-
e.push(
|
|
1827
|
+
e.push(Nn.configure({
|
|
2720
1828
|
suggestion: t,
|
|
2721
1829
|
onSelectedCommand: (e) => {
|
|
2722
1830
|
this.$emit("selected-command", e);
|
|
2723
1831
|
}
|
|
2724
1832
|
}));
|
|
2725
1833
|
}
|
|
2726
|
-
return this.allowVariable && e.push(
|
|
1834
|
+
return this.allowVariable && e.push(Rn.configure({ variableItems: this.variableItems })), e.push(sn), this.allowTextAlign && e.push(it.configure({ types: ["paragraph"] })), this.allowCode && e.push(Ue), this.allowCodeblock && e.push(He.extend({
|
|
2727
1835
|
renderText({ node: e, pos: t, range: n }) {
|
|
2728
1836
|
let r = n?.from ?? 0, i = n?.to ?? t + e.nodeSize;
|
|
2729
1837
|
if (r <= t && i >= t + e.nodeSize) return `\`\`\`\n${e.textContent}\n\`\`\``;
|
|
@@ -2750,17 +1858,17 @@ var Vi = {
|
|
|
2750
1858
|
}
|
|
2751
1859
|
};
|
|
2752
1860
|
}
|
|
2753
|
-
}).configure({ HTMLAttributes: { class: "d-rich-text-editor__code-block" } })), this.allowInlineImages && e.push(
|
|
1861
|
+
}).configure({ HTMLAttributes: { class: "d-rich-text-editor__code-block" } })), this.allowInlineImages && e.push(vn.configure({ resize: {
|
|
2754
1862
|
enabled: this.allowImageResize,
|
|
2755
1863
|
alwaysPreserveAspectRatio: !0
|
|
2756
|
-
} })), (this.allowFontFamily || this.allowFontColor || this.allowFontSize || this.allowBackgroundColor || this.allowLineHeight) && (e.push(
|
|
1864
|
+
} })), (this.allowFontFamily || this.allowFontColor || this.allowFontSize || this.allowBackgroundColor || this.allowLineHeight) && (e.push(ut.configure({
|
|
2757
1865
|
textStyle: !1,
|
|
2758
1866
|
color: this.allowFontColor,
|
|
2759
1867
|
backgroundColor: this.allowBackgroundColor,
|
|
2760
1868
|
fontFamily: this.allowFontFamily,
|
|
2761
1869
|
fontSize: this.allowFontSize,
|
|
2762
1870
|
lineHeight: this.allowLineHeight
|
|
2763
|
-
})), e.push(
|
|
1871
|
+
})), e.push(kt)), this.additionalExtensions.length && e.push(...this.additionalExtensions), this.allowTables && e.push(wt.configure({ resizable: !0 }), Tt, Ot, Dt, Ge), e;
|
|
2764
1872
|
},
|
|
2765
1873
|
inputAttrs() {
|
|
2766
1874
|
let e = {
|
|
@@ -2802,7 +1910,7 @@ var Vi = {
|
|
|
2802
1910
|
},
|
|
2803
1911
|
methods: {
|
|
2804
1912
|
createEditor() {
|
|
2805
|
-
this.editor = new
|
|
1913
|
+
this.editor = new ae({
|
|
2806
1914
|
autofocus: this.autoFocus,
|
|
2807
1915
|
content: this.modelValue,
|
|
2808
1916
|
editable: this.editable,
|
|
@@ -2861,9 +1969,9 @@ var Vi = {
|
|
|
2861
1969
|
window.open(e, "_blank");
|
|
2862
1970
|
},
|
|
2863
1971
|
forceLinkifyPendingText() {
|
|
2864
|
-
!this.editor || !this.link || this.customLink ||
|
|
1972
|
+
!this.editor || !this.link || this.customLink || ue(this.editor);
|
|
2865
1973
|
},
|
|
2866
|
-
setLink(e, t, n, r =
|
|
1974
|
+
setLink(e, t, n, r = E, i) {
|
|
2867
1975
|
if (!e) {
|
|
2868
1976
|
this.removeLink();
|
|
2869
1977
|
return;
|
|
@@ -2881,9 +1989,9 @@ var Vi = {
|
|
|
2881
1989
|
processValue(e, t = !0) {
|
|
2882
1990
|
if (!this.editor) return;
|
|
2883
1991
|
let n = this.getOutput();
|
|
2884
|
-
if (!(t &&
|
|
1992
|
+
if (!(t && ht(e, n))) {
|
|
2885
1993
|
if (typeof e == "string" && this.outputFormat === "text") {
|
|
2886
|
-
let t = RegExp(`(${
|
|
1994
|
+
let t = RegExp(`(${V})`, "g");
|
|
2887
1995
|
e = e?.replace(t, "<emoji-component code=\"$1\"></emoji-component>");
|
|
2888
1996
|
}
|
|
2889
1997
|
this.editor.commands.setContent(e, {
|
|
@@ -2966,7 +2074,7 @@ var Vi = {
|
|
|
2966
2074
|
this.$emit("html-input", n);
|
|
2967
2075
|
let r = this.editor.getText({ blockSeparator: "\n" });
|
|
2968
2076
|
this.$emit("text-input", r);
|
|
2969
|
-
let i =
|
|
2077
|
+
let i = D(t, this.extensions);
|
|
2970
2078
|
this.$emit("markdown-input", i);
|
|
2971
2079
|
},
|
|
2972
2080
|
addEditorListeners() {
|
|
@@ -2998,7 +2106,7 @@ var Vi = {
|
|
|
2998
2106
|
switch (this.outputFormat) {
|
|
2999
2107
|
case "json": return this.editor.getJSON();
|
|
3000
2108
|
case "html": return this.editor.getHTML();
|
|
3001
|
-
case "markdown": return
|
|
2109
|
+
case "markdown": return D(this.editor.getJSON(), this.extensions);
|
|
3002
2110
|
default: return this.editor.getText({ blockSeparator: "\n" });
|
|
3003
2111
|
}
|
|
3004
2112
|
},
|
|
@@ -3016,10 +2124,10 @@ var Vi = {
|
|
|
3016
2124
|
this.editor.commands.focus();
|
|
3017
2125
|
}
|
|
3018
2126
|
}
|
|
3019
|
-
},
|
|
3020
|
-
function
|
|
3021
|
-
let o =
|
|
3022
|
-
return
|
|
2127
|
+
}, Zn = { class: "d-popover__dialog" };
|
|
2128
|
+
function Qn(e, t, n, r, i, a) {
|
|
2129
|
+
let o = L("dt-button"), s = L("dt-stack"), c = L("bubble-menu"), l = L("editor-content");
|
|
2130
|
+
return F(), A("div", null, [i.editor && n.link ? (F(), O(c, {
|
|
3023
2131
|
key: 0,
|
|
3024
2132
|
editor: i.editor,
|
|
3025
2133
|
"should-show": a.bubbleMenuShouldShow,
|
|
@@ -3027,34 +2135,34 @@ function Wi(e, t, n, r, i, a) {
|
|
|
3027
2135
|
"append-to": i.appendTo,
|
|
3028
2136
|
style: { visibility: "visible" }
|
|
3029
2137
|
}, {
|
|
3030
|
-
default:
|
|
2138
|
+
default: z(() => [j("div", Zn, [N(s, {
|
|
3031
2139
|
direction: "row",
|
|
3032
2140
|
class: "d-rich-text-editor-bubble-menu__button-stack",
|
|
3033
2141
|
gap: "0"
|
|
3034
2142
|
}, {
|
|
3035
|
-
default:
|
|
3036
|
-
|
|
2143
|
+
default: z(() => [
|
|
2144
|
+
N(o, {
|
|
3037
2145
|
kind: "muted",
|
|
3038
2146
|
importance: "clear",
|
|
3039
2147
|
onClick: a.editLink
|
|
3040
2148
|
}, {
|
|
3041
|
-
default:
|
|
2149
|
+
default: z(() => [M(R(i.i18n.$t("DIALTONE_RICH_TEXT_EDITOR_EDIT_BUTTON_LABEL")), 1)]),
|
|
3042
2150
|
_: 1
|
|
3043
2151
|
}, 8, ["onClick"]),
|
|
3044
|
-
|
|
2152
|
+
N(o, {
|
|
3045
2153
|
kind: "muted",
|
|
3046
2154
|
importance: "clear",
|
|
3047
2155
|
onClick: a.openLink
|
|
3048
2156
|
}, {
|
|
3049
|
-
default:
|
|
2157
|
+
default: z(() => [M(R(i.i18n.$t("DIALTONE_RICH_TEXT_EDITOR_OPEN_LINK_BUTTON_LABEL")), 1)]),
|
|
3050
2158
|
_: 1
|
|
3051
2159
|
}, 8, ["onClick"]),
|
|
3052
|
-
|
|
2160
|
+
N(o, {
|
|
3053
2161
|
kind: "critical",
|
|
3054
2162
|
importance: "clear",
|
|
3055
2163
|
onClick: a.removeLink
|
|
3056
2164
|
}, {
|
|
3057
|
-
default:
|
|
2165
|
+
default: z(() => [M(R(i.i18n.$t("DIALTONE_RICH_TEXT_EDITOR_REMOVE_BUTTON_LABEL")), 1)]),
|
|
3058
2166
|
_: 1
|
|
3059
2167
|
}, 8, ["onClick"])
|
|
3060
2168
|
]),
|
|
@@ -3066,15 +2174,15 @@ function Wi(e, t, n, r, i, a) {
|
|
|
3066
2174
|
"should-show",
|
|
3067
2175
|
"options",
|
|
3068
2176
|
"append-to"
|
|
3069
|
-
])) : k("", !0),
|
|
2177
|
+
])) : k("", !0), N(l, _e({
|
|
3070
2178
|
ref: "editor",
|
|
3071
2179
|
editor: i.editor,
|
|
3072
2180
|
class: "d-rich-text-editor",
|
|
3073
2181
|
"data-qa": "dt-rich-text-editor"
|
|
3074
2182
|
}, a.attrs), null, 16, ["editor"])]);
|
|
3075
2183
|
}
|
|
3076
|
-
var
|
|
2184
|
+
var $n = /* @__PURE__ */ i(Xn, [["render", Qn]]);
|
|
3077
2185
|
//#endregion
|
|
3078
|
-
export {
|
|
2186
|
+
export { $n as t };
|
|
3079
2187
|
|
|
3080
|
-
//# sourceMappingURL=RichTextEditor-
|
|
2188
|
+
//# sourceMappingURL=RichTextEditor-DaOHmXD_.js.map
|