@remarkablejames/editor 0.0.4 → 0.0.6
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/lib/{ActionMenuButton-BUtJUsfO.js → ActionMenuButton-CpmEfz31.js} +1 -1
- package/lib/{ActionMenuButton-M55VtCZ5.cjs → ActionMenuButton-NfiUDE60.cjs} +1 -1
- package/lib/Attachment.cjs +1 -19
- package/lib/Attachment.js +6 -305
- package/lib/Blockquote.cjs +2 -2
- package/lib/Blockquote.js +2 -2
- package/lib/Bold.cjs +1 -1
- package/lib/Bold.js +2 -2
- package/lib/BulletList.cjs +1 -1
- package/lib/BulletList.js +2 -2
- package/lib/Callout.cjs +1 -1
- package/lib/Callout.js +17 -18
- package/lib/Clear.cjs +1 -1
- package/lib/Clear.js +2 -2
- package/lib/Code.cjs +1 -1
- package/lib/Code.js +2 -2
- package/lib/CodeBlock.cjs +1 -1
- package/lib/CodeBlock.js +32 -33
- package/lib/CodeView.cjs +1 -1
- package/lib/CodeView.js +2 -2
- package/lib/Color.cjs +1 -1
- package/lib/Color.js +3 -3
- package/lib/Column.cjs +1 -1
- package/lib/Column.js +2 -2
- package/lib/{Drawer-mlmJ2nCT.js → Drawer-CayP4Ww4.js} +16 -16
- package/lib/{Drawer-CdQBnwUs.cjs → Drawer-DlgdaO_B.cjs} +2 -2
- package/lib/Drawer.cjs +1 -1
- package/lib/Drawer.js +3 -3
- package/lib/Emoji.cjs +1 -1
- package/lib/Emoji.js +12 -12
- package/lib/Excalidraw.cjs +1 -1
- package/lib/Excalidraw.js +29 -30
- package/lib/ExportPdf.cjs +1 -1
- package/lib/ExportPdf.js +2 -2
- package/lib/ExportWord.cjs +1 -1
- package/lib/ExportWord.js +2 -2
- package/lib/FontFamily.cjs +1 -1
- package/lib/FontFamily.js +5 -5
- package/lib/FontSize.cjs +1 -1
- package/lib/FontSize.js +5 -5
- package/lib/Heading.cjs +1 -1
- package/lib/Heading.js +10 -10
- package/lib/Highlight.cjs +1 -1
- package/lib/Highlight.js +3 -3
- package/lib/History.cjs +1 -1
- package/lib/History.js +3 -3
- package/lib/HorizontalRule.cjs +1 -1
- package/lib/HorizontalRule.js +2 -2
- package/lib/{Iframe-CYgR99Ny.js → Iframe-C6Sb97KS.js} +4 -5
- package/lib/Iframe-CANdxSpV.cjs +1 -0
- package/lib/Iframe.cjs +1 -1
- package/lib/Iframe.js +3 -3
- package/lib/Image.cjs +1 -1
- package/lib/Image.js +4 -4
- package/lib/ImageGif.cjs +1 -1
- package/lib/ImageGif.js +24 -24
- package/lib/ImportWord.cjs +1 -1
- package/lib/ImportWord.js +14 -14
- package/lib/{Indent-BMz2ILRl.js → Indent-CcFe8py3.js} +2 -2
- package/lib/{Indent-BAcoFdaq.cjs → Indent-DuB2U6Cs.cjs} +1 -1
- package/lib/Indent.cjs +1 -1
- package/lib/Indent.js +2 -2
- package/lib/Italic.cjs +1 -1
- package/lib/Italic.js +2 -2
- package/lib/{Katex-DOlb4iTP.js → Katex-Bp6AnIUF.js} +64 -65
- package/lib/Katex-DFU1unCm.cjs +4 -0
- package/lib/Katex.cjs +1 -1
- package/lib/Katex.js +2 -2
- package/lib/LineHeight.cjs +1 -1
- package/lib/LineHeight.js +4 -4
- package/lib/Link.cjs +1 -1
- package/lib/Link.js +2 -2
- package/lib/{LinkEditBlock-xnokk4G7.js → LinkEditBlock-BiHumIJR.js} +8 -8
- package/lib/{LinkEditBlock-Cqs5RxjV.cjs → LinkEditBlock-C2zX0WVK.cjs} +1 -1
- package/lib/Mention.js +3 -3
- package/lib/Mermaid-B8lQSOGn.cjs +2 -0
- package/lib/{Mermaid-Bs3pIGc6.js → Mermaid-Dlx0XTJj.js} +23 -24
- package/lib/Mermaid.cjs +1 -1
- package/lib/Mermaid.js +2 -2
- package/lib/MoreMark.cjs +1 -1
- package/lib/MoreMark.js +3 -3
- package/lib/OrderedList.cjs +1 -1
- package/lib/OrderedList.js +2 -2
- package/lib/PaywallSeparator.cjs +1 -0
- package/lib/PaywallSeparator.js +140 -0
- package/lib/SearchAndReplace.cjs +1 -1
- package/lib/SearchAndReplace.js +8 -8
- package/lib/SlashCommand.cjs +1 -1
- package/lib/SlashCommand.js +6 -6
- package/lib/SlashCommandNodeView-BfWNWGRr.cjs +1 -0
- package/lib/{SlashCommandNodeView-CYcf7mVz.js → SlashCommandNodeView-DzmsYaNc.js} +73 -57
- package/lib/Strike.cjs +1 -1
- package/lib/Strike.js +2 -2
- package/lib/{Table-dlXTKKwJ.cjs → Table-BfM6ywrZ.cjs} +1 -1
- package/lib/{Table-bz1Wcojf.js → Table-IH34r4jd.js} +5 -5
- package/lib/Table.cjs +1 -1
- package/lib/Table.js +1 -1
- package/lib/TaskList.cjs +1 -1
- package/lib/TaskList.js +2 -2
- package/lib/TextAlign.cjs +1 -1
- package/lib/TextAlign.js +3 -3
- package/lib/TextDirection.cjs +1 -1
- package/lib/TextDirection.js +3 -3
- package/lib/TextUnderline.cjs +1 -1
- package/lib/TextUnderline.js +2 -2
- package/lib/{Twitter-CNTXzgt0.js → Twitter-FVQKPaq6.js} +8 -8
- package/lib/{Twitter-DhEnGg6P.cjs → Twitter-axcoCgD7.cjs} +1 -1
- package/lib/Twitter.cjs +1 -1
- package/lib/Twitter.js +2 -2
- package/lib/Video.cjs +1 -1
- package/lib/Video.js +5 -5
- package/lib/bubble.cjs +3 -3
- package/lib/bubble.js +84 -86
- package/lib/{clsx-CDyrfCnw.js → clsx-BUPZHhq3.js} +2 -2
- package/lib/components/SlashDialogTrigger/RenderDialogUploadAttachment.d.ts +1 -0
- package/lib/{dropdown-menu-BuSlU2uN.js → dropdown-menu-Ce2TorkG.js} +1 -1
- package/lib/{dropdown-menu-CfWNst4v.cjs → dropdown-menu-DirUyRAI.cjs} +1 -1
- package/lib/extensions/Attachment/Attachment.d.ts +17 -6
- package/lib/extensions/Attachment/components/NodeViewAttachment/NodeViewAttachment.d.ts +1 -1
- package/lib/extensions/PaywallSeparator/PaywallSeparator.d.ts +35 -0
- package/lib/extensions/PaywallSeparator/components/PaywallIcon.d.ts +2 -0
- package/lib/extensions/PaywallSeparator/components/PaywallSeparatorView.d.ts +17 -0
- package/lib/extensions/PaywallSeparator/components/RichTextPaywallSeparator.d.ts +1 -0
- package/lib/extensions/PaywallSeparator/components/index.d.ts +2 -0
- package/lib/extensions/PaywallSeparator/index.d.ts +1 -0
- package/lib/{index-DZfkCNKr.js → index-BGd2HiwP.js} +50 -20
- package/lib/index-BynXHtjJ.cjs +28 -0
- package/lib/{index-8B00E8e4.js → index-CnKgiZFQ.js} +1766 -1245
- package/lib/{index-CsSfYR30.js → index-D4M4hrH4.js} +1 -1
- package/lib/{index-DjDf4BK8.js → index-DZj2z9_1.js} +1 -1
- package/lib/index-DgOXAdKt.cjs +1 -0
- package/lib/{index-C1WCZhyA.js → index-Dl3OjzmR.js} +1 -1
- package/lib/{index-C-tDsIKJ.js → index-RkKGy5oa.js} +1 -1
- package/lib/index.cjs +3 -3
- package/lib/index.js +19 -19
- package/lib/locale-bundle.cjs +1 -1
- package/lib/locale-bundle.js +1 -1
- package/lib/locales/en.d.ts +5 -0
- package/lib/locales/fi.d.ts +5 -0
- package/lib/locales/hu.d.ts +5 -0
- package/lib/locales/index.d.ts +30 -0
- package/lib/locales/pt-br.d.ts +5 -0
- package/lib/locales/vi.d.ts +5 -0
- package/lib/locales/zh-cn.d.ts +5 -0
- package/lib/{popover-51mwx3UY.cjs → popover-BdLwAlrM.cjs} +1 -1
- package/lib/{popover-DMPRgXD3.js → popover-BzJyaFvy.js} +1 -1
- package/lib/{renderNodeView-BJSrgyGj.js → renderNodeView-dj6AaFSX.js} +2 -2
- package/lib/{separator-kB9YUfeO.cjs → separator-CoQaQmFK.cjs} +1 -1
- package/lib/{separator-CpqX9KQC.js → separator-D-fyzbfx.js} +14 -14
- package/lib/style.css +1 -1
- package/lib/types.d.ts +5 -5
- package/lib/{updatePosition-e90ZrFWW.js → updatePosition-C294Pixi.js} +2 -2
- package/lib/utils/customEvents/events.constant.d.ts +1 -0
- package/package.json +14 -1
- package/lib/Iframe-B_a_AoZc.cjs +0 -1
- package/lib/Katex-bIhj82VV.cjs +0 -4
- package/lib/Mermaid-DiOdgQv1.cjs +0 -2
- package/lib/SlashCommandNodeView-CLimjqhb.cjs +0 -1
- package/lib/dom-dataset-BqoJhJXt.cjs +0 -1
- package/lib/dom-dataset-CIEeltF6.js +0 -47
- package/lib/index-BrxL7y9p.cjs +0 -1
- package/lib/index-Bt9LiArC.cjs +0 -10
- package/lib/select-B7v1Scb-.cjs +0 -1
- package/lib/select-BxFDMaZi.js +0 -120
- package/lib/textarea-C5DsgzSy.js +0 -20
- package/lib/textarea-bQSzjqg3.cjs +0 -1
|
@@ -1,55 +1,56 @@
|
|
|
1
|
-
import { jsxs as
|
|
2
|
-
import * as
|
|
3
|
-
import
|
|
4
|
-
import {
|
|
1
|
+
import { jsxs as y, jsx as n, Fragment as q } from "react/jsx-runtime";
|
|
2
|
+
import * as _ from "react";
|
|
3
|
+
import ie, { useCallback as oe, useState as I, useEffect as Ie, useMemo as F, useRef as me } from "react";
|
|
4
|
+
import { Slot as vt } from "@radix-ui/react-slot";
|
|
5
|
+
import { y as er, b as tr, S as rr } from "./index-BG0kQamI.js";
|
|
5
6
|
import "./theme.js";
|
|
6
|
-
import
|
|
7
|
-
import
|
|
8
|
-
import
|
|
9
|
-
import
|
|
10
|
-
import
|
|
11
|
-
import
|
|
12
|
-
import * as
|
|
13
|
-
import
|
|
14
|
-
import
|
|
15
|
-
import
|
|
16
|
-
import
|
|
17
|
-
import * as
|
|
18
|
-
const
|
|
19
|
-
const t =
|
|
7
|
+
import { j as Ae, h as Le, a3 as ir, aa as nr, N as Xe, k as wt, m as Ye, n as or, ab as ar } from "./clsx-BUPZHhq3.js";
|
|
8
|
+
import * as yt from "@radix-ui/react-label";
|
|
9
|
+
import * as se from "@radix-ui/react-tabs";
|
|
10
|
+
import * as Me from "@radix-ui/react-tooltip";
|
|
11
|
+
import * as D from "@radix-ui/react-select";
|
|
12
|
+
import { NotebookPen as sr, ExternalLink as lr, X as Ct, Loader2 as cr, WrapText as dr, PencilRuler as ur, FlipHorizontal as hr, FlipVertical as fr, CropIcon as mr, ChevronUp as kt, Download as pr, Paperclip as gr, Eye as xr, Settings as br, ZoomOut as vr, ZoomIn as wr, BookMarked as yr, Sigma as Cr, SmilePlusIcon as kr, Replace as at, SmilePlus as Mr, Frame as Nr, Columns2 as st, PanelRight as Tr, PanelLeft as Sr, Clipboard as zr, Copy as Ir, GripVertical as Ar, Plus as Lr, Columns4 as Er, Columns3 as Rr, Heading6 as Vr, Heading5 as _r, Heading4 as Hr, Heading3 as Dr, Heading2 as jr, Heading1 as Pr, Pilcrow as Or, ChevronsUpDown as Br, Trash as Ur, Trash2 as $r, TableCellsSplit as Fr, TableCellsMerge as Wr, BetweenVerticalEnd as Gr, BetweenVerticalStart as Xr, BetweenHorizonalStart as Yr, BetweenHorizonalEnd as Zr, Unlink as qr, Pencil as Jr, Sparkles as Kr, Table as Qr, Minimize as ei, Maximize as ti, Video as ri, ImageUp as ii, Link as ni, ListTodo as oi, ListOrdered as ai, List as si, IndentDecrease as li, IndentIncrease as ci, Type as di, CodeXml as ui, Code as hi, Superscript as fi, Subscript as mi, ChevronDown as Ze, Undo2 as pi, Redo2 as gi, PaintRoller as xi, Eraser as bi, Minus as vi, Strikethrough as wi, Quote as yi, Underline as Ci, Italic as ki, LoaderCircle as Mi, Bold as Ni, Check as Mt, LucideTableProperties as Ti, LucideSheet as Si, LucideImage as zi, LucideFile as Ii, LucideVideo as Ai, LucideAudioLines as Li } from "lucide-react";
|
|
13
|
+
import * as Fe from "@radix-ui/react-checkbox";
|
|
14
|
+
import * as Z from "@radix-ui/react-dialog";
|
|
15
|
+
import Ei from "react-image-crop";
|
|
16
|
+
import { u as ne, I as lt, i as ct, j as Ri, V as Vi } from "./index-BGd2HiwP.js";
|
|
17
|
+
import { TextAlignRightIcon as _i, TextAlignLeftIcon as Hi, TextAlignJustifyIcon as Di, TextAlignCenterIcon as ji } from "@radix-ui/react-icons";
|
|
18
|
+
import * as Nt from "@radix-ui/react-toggle";
|
|
19
|
+
const qe = "-", Pi = (e) => {
|
|
20
|
+
const t = Bi(e), {
|
|
20
21
|
conflictingClassGroups: r,
|
|
21
22
|
conflictingClassGroupModifiers: i
|
|
22
23
|
} = e;
|
|
23
24
|
return {
|
|
24
25
|
getClassGroupId: (l) => {
|
|
25
|
-
const s = l.split(
|
|
26
|
-
return s[0] === "" && s.length !== 1 && s.shift(),
|
|
26
|
+
const s = l.split(qe);
|
|
27
|
+
return s[0] === "" && s.length !== 1 && s.shift(), Tt(s, t) || Oi(l);
|
|
27
28
|
},
|
|
28
29
|
getConflictingClassGroupIds: (l, s) => {
|
|
29
30
|
const c = r[l] || [];
|
|
30
31
|
return s && i[l] ? [...c, ...i[l]] : c;
|
|
31
32
|
}
|
|
32
33
|
};
|
|
33
|
-
},
|
|
34
|
+
}, Tt = (e, t) => {
|
|
34
35
|
var l;
|
|
35
36
|
if (e.length === 0)
|
|
36
37
|
return t.classGroupId;
|
|
37
|
-
const r = e[0], i = t.nextPart.get(r), o = i ?
|
|
38
|
+
const r = e[0], i = t.nextPart.get(r), o = i ? Tt(e.slice(1), i) : void 0;
|
|
38
39
|
if (o)
|
|
39
40
|
return o;
|
|
40
41
|
if (t.validators.length === 0)
|
|
41
42
|
return;
|
|
42
|
-
const a = e.join(
|
|
43
|
+
const a = e.join(qe);
|
|
43
44
|
return (l = t.validators.find(({
|
|
44
45
|
validator: s
|
|
45
46
|
}) => s(a))) == null ? void 0 : l.classGroupId;
|
|
46
|
-
},
|
|
47
|
-
if (
|
|
48
|
-
const t =
|
|
47
|
+
}, dt = /^\[(.+)\]$/, Oi = (e) => {
|
|
48
|
+
if (dt.test(e)) {
|
|
49
|
+
const t = dt.exec(e)[1], r = t == null ? void 0 : t.substring(0, t.indexOf(":"));
|
|
49
50
|
if (r)
|
|
50
51
|
return "arbitrary.." + r;
|
|
51
52
|
}
|
|
52
|
-
},
|
|
53
|
+
}, Bi = (e) => {
|
|
53
54
|
const {
|
|
54
55
|
theme: t,
|
|
55
56
|
prefix: r
|
|
@@ -57,19 +58,19 @@ const _e = "-", ki = (e) => {
|
|
|
57
58
|
nextPart: /* @__PURE__ */ new Map(),
|
|
58
59
|
validators: []
|
|
59
60
|
};
|
|
60
|
-
return
|
|
61
|
-
|
|
61
|
+
return $i(Object.entries(e.classGroups), r).forEach(([a, l]) => {
|
|
62
|
+
We(l, i, a, t);
|
|
62
63
|
}), i;
|
|
63
|
-
},
|
|
64
|
+
}, We = (e, t, r, i) => {
|
|
64
65
|
e.forEach((o) => {
|
|
65
66
|
if (typeof o == "string") {
|
|
66
|
-
const a = o === "" ? t :
|
|
67
|
+
const a = o === "" ? t : ut(t, o);
|
|
67
68
|
a.classGroupId = r;
|
|
68
69
|
return;
|
|
69
70
|
}
|
|
70
71
|
if (typeof o == "function") {
|
|
71
|
-
if (
|
|
72
|
-
|
|
72
|
+
if (Ui(o)) {
|
|
73
|
+
We(o(i), t, r, i);
|
|
73
74
|
return;
|
|
74
75
|
}
|
|
75
76
|
t.validators.push({
|
|
@@ -79,21 +80,21 @@ const _e = "-", ki = (e) => {
|
|
|
79
80
|
return;
|
|
80
81
|
}
|
|
81
82
|
Object.entries(o).forEach(([a, l]) => {
|
|
82
|
-
|
|
83
|
+
We(l, ut(t, a), r, i);
|
|
83
84
|
});
|
|
84
85
|
});
|
|
85
|
-
},
|
|
86
|
+
}, ut = (e, t) => {
|
|
86
87
|
let r = e;
|
|
87
|
-
return t.split(
|
|
88
|
+
return t.split(qe).forEach((i) => {
|
|
88
89
|
r.nextPart.has(i) || r.nextPart.set(i, {
|
|
89
90
|
nextPart: /* @__PURE__ */ new Map(),
|
|
90
91
|
validators: []
|
|
91
92
|
}), r = r.nextPart.get(i);
|
|
92
93
|
}), r;
|
|
93
|
-
},
|
|
94
|
+
}, Ui = (e) => e.isThemeGetter, $i = (e, t) => t ? e.map(([r, i]) => {
|
|
94
95
|
const o = i.map((a) => typeof a == "string" ? t + a : typeof a == "object" ? Object.fromEntries(Object.entries(a).map(([l, s]) => [t + l, s])) : a);
|
|
95
96
|
return [r, o];
|
|
96
|
-
}) : e,
|
|
97
|
+
}) : e, Fi = (e) => {
|
|
97
98
|
if (e < 1)
|
|
98
99
|
return {
|
|
99
100
|
get: () => {
|
|
@@ -117,32 +118,32 @@ const _e = "-", ki = (e) => {
|
|
|
117
118
|
r.has(a) ? r.set(a, l) : o(a, l);
|
|
118
119
|
}
|
|
119
120
|
};
|
|
120
|
-
},
|
|
121
|
+
}, St = "!", Wi = (e) => {
|
|
121
122
|
const {
|
|
122
123
|
separator: t,
|
|
123
124
|
experimentalParseClassName: r
|
|
124
125
|
} = e, i = t.length === 1, o = t[0], a = t.length, l = (s) => {
|
|
125
126
|
const c = [];
|
|
126
|
-
let d = 0,
|
|
127
|
-
for (let
|
|
128
|
-
let
|
|
127
|
+
let d = 0, f = 0, g;
|
|
128
|
+
for (let h = 0; h < s.length; h++) {
|
|
129
|
+
let x = s[h];
|
|
129
130
|
if (d === 0) {
|
|
130
|
-
if (
|
|
131
|
-
c.push(s.slice(
|
|
131
|
+
if (x === o && (i || s.slice(h, h + a) === t)) {
|
|
132
|
+
c.push(s.slice(f, h)), f = h + a;
|
|
132
133
|
continue;
|
|
133
134
|
}
|
|
134
|
-
if (
|
|
135
|
-
|
|
135
|
+
if (x === "/") {
|
|
136
|
+
g = h;
|
|
136
137
|
continue;
|
|
137
138
|
}
|
|
138
139
|
}
|
|
139
|
-
|
|
140
|
+
x === "[" ? d++ : x === "]" && d--;
|
|
140
141
|
}
|
|
141
|
-
const
|
|
142
|
+
const u = c.length === 0 ? s : s.substring(f), v = u.startsWith(St), p = v ? u.substring(1) : u, k = g && g > f ? g - f : void 0;
|
|
142
143
|
return {
|
|
143
144
|
modifiers: c,
|
|
144
|
-
hasImportantModifier:
|
|
145
|
-
baseClassName:
|
|
145
|
+
hasImportantModifier: v,
|
|
146
|
+
baseClassName: p,
|
|
146
147
|
maybePostfixModifierPosition: k
|
|
147
148
|
};
|
|
148
149
|
};
|
|
@@ -150,7 +151,7 @@ const _e = "-", ki = (e) => {
|
|
|
150
151
|
className: s,
|
|
151
152
|
parseClassName: l
|
|
152
153
|
}) : l;
|
|
153
|
-
},
|
|
154
|
+
}, Gi = (e) => {
|
|
154
155
|
if (e.length <= 1)
|
|
155
156
|
return e;
|
|
156
157
|
const t = [];
|
|
@@ -158,122 +159,122 @@ const _e = "-", ki = (e) => {
|
|
|
158
159
|
return e.forEach((i) => {
|
|
159
160
|
i[0] === "[" ? (t.push(...r.sort(), i), r = []) : r.push(i);
|
|
160
161
|
}), t.push(...r.sort()), t;
|
|
161
|
-
},
|
|
162
|
-
cache:
|
|
163
|
-
parseClassName:
|
|
164
|
-
...
|
|
165
|
-
}),
|
|
162
|
+
}, Xi = (e) => ({
|
|
163
|
+
cache: Fi(e.cacheSize),
|
|
164
|
+
parseClassName: Wi(e),
|
|
165
|
+
...Pi(e)
|
|
166
|
+
}), Yi = /\s+/, Zi = (e, t) => {
|
|
166
167
|
const {
|
|
167
168
|
parseClassName: r,
|
|
168
169
|
getClassGroupId: i,
|
|
169
170
|
getConflictingClassGroupIds: o
|
|
170
|
-
} = t, a = [], l = e.trim().split(
|
|
171
|
+
} = t, a = [], l = e.trim().split(Yi);
|
|
171
172
|
let s = "";
|
|
172
173
|
for (let c = l.length - 1; c >= 0; c -= 1) {
|
|
173
174
|
const d = l[c], {
|
|
174
|
-
modifiers:
|
|
175
|
-
hasImportantModifier:
|
|
176
|
-
baseClassName:
|
|
177
|
-
maybePostfixModifierPosition:
|
|
175
|
+
modifiers: f,
|
|
176
|
+
hasImportantModifier: g,
|
|
177
|
+
baseClassName: u,
|
|
178
|
+
maybePostfixModifierPosition: v
|
|
178
179
|
} = r(d);
|
|
179
|
-
let
|
|
180
|
+
let p = !!v, k = i(p ? u.substring(0, v) : u);
|
|
180
181
|
if (!k) {
|
|
181
|
-
if (!
|
|
182
|
+
if (!p) {
|
|
182
183
|
s = d + (s.length > 0 ? " " + s : s);
|
|
183
184
|
continue;
|
|
184
185
|
}
|
|
185
|
-
if (k = i(
|
|
186
|
+
if (k = i(u), !k) {
|
|
186
187
|
s = d + (s.length > 0 ? " " + s : s);
|
|
187
188
|
continue;
|
|
188
189
|
}
|
|
189
|
-
|
|
190
|
+
p = !1;
|
|
190
191
|
}
|
|
191
|
-
const
|
|
192
|
+
const h = Gi(f).join(":"), x = g ? h + St : h, m = x + k;
|
|
192
193
|
if (a.includes(m))
|
|
193
194
|
continue;
|
|
194
195
|
a.push(m);
|
|
195
|
-
const
|
|
196
|
-
for (let
|
|
197
|
-
const A =
|
|
198
|
-
a.push(
|
|
196
|
+
const T = o(k, p);
|
|
197
|
+
for (let b = 0; b < T.length; ++b) {
|
|
198
|
+
const A = T[b];
|
|
199
|
+
a.push(x + A);
|
|
199
200
|
}
|
|
200
201
|
s = d + (s.length > 0 ? " " + s : s);
|
|
201
202
|
}
|
|
202
203
|
return s;
|
|
203
204
|
};
|
|
204
|
-
function
|
|
205
|
+
function qi() {
|
|
205
206
|
let e = 0, t, r, i = "";
|
|
206
207
|
for (; e < arguments.length; )
|
|
207
|
-
(t = arguments[e++]) && (r =
|
|
208
|
+
(t = arguments[e++]) && (r = zt(t)) && (i && (i += " "), i += r);
|
|
208
209
|
return i;
|
|
209
210
|
}
|
|
210
|
-
const
|
|
211
|
+
const zt = (e) => {
|
|
211
212
|
if (typeof e == "string")
|
|
212
213
|
return e;
|
|
213
214
|
let t, r = "";
|
|
214
215
|
for (let i = 0; i < e.length; i++)
|
|
215
|
-
e[i] && (t =
|
|
216
|
+
e[i] && (t = zt(e[i])) && (r && (r += " "), r += t);
|
|
216
217
|
return r;
|
|
217
218
|
};
|
|
218
|
-
function
|
|
219
|
+
function Ji(e, ...t) {
|
|
219
220
|
let r, i, o, a = l;
|
|
220
221
|
function l(c) {
|
|
221
|
-
const d = t.reduce((
|
|
222
|
-
return r =
|
|
222
|
+
const d = t.reduce((f, g) => g(f), e());
|
|
223
|
+
return r = Xi(d), i = r.cache.get, o = r.cache.set, a = s, s(c);
|
|
223
224
|
}
|
|
224
225
|
function s(c) {
|
|
225
226
|
const d = i(c);
|
|
226
227
|
if (d)
|
|
227
228
|
return d;
|
|
228
|
-
const
|
|
229
|
-
return o(c,
|
|
229
|
+
const f = Zi(c, r);
|
|
230
|
+
return o(c, f), f;
|
|
230
231
|
}
|
|
231
232
|
return function() {
|
|
232
|
-
return a(
|
|
233
|
+
return a(qi.apply(null, arguments));
|
|
233
234
|
};
|
|
234
235
|
}
|
|
235
|
-
const
|
|
236
|
+
const R = (e) => {
|
|
236
237
|
const t = (r) => r[e] || [];
|
|
237
238
|
return t.isThemeGetter = !0, t;
|
|
238
|
-
},
|
|
239
|
-
const i =
|
|
239
|
+
}, It = /^\[(?:([a-z-]+):)?(.+)\]$/i, Ki = /^\d+\/\d+$/, Qi = /* @__PURE__ */ new Set(["px", "full", "screen"]), en = /^(\d+(\.\d+)?)?(xs|sm|md|lg|xl)$/, tn = /\d+(%|px|r?em|[sdl]?v([hwib]|min|max)|pt|pc|in|cm|mm|cap|ch|ex|r?lh|cq(w|h|i|b|min|max))|\b(calc|min|max|clamp)\(.+\)|^0$/, rn = /^(rgba?|hsla?|hwb|(ok)?(lab|lch))\(.+\)$/, nn = /^(inset_)?-?((\d+)?\.?(\d+)[a-z]+|0)_-?((\d+)?\.?(\d+)[a-z]+|0)/, on = /^(url|image|image-set|cross-fade|element|(repeating-)?(linear|radial|conic)-gradient)\(.+\)$/, J = (e) => he(e) || Qi.has(e) || Ki.test(e), te = (e) => pe(e, "length", fn), he = (e) => !!e && !Number.isNaN(Number(e)), De = (e) => pe(e, "number", he), be = (e) => !!e && Number.isInteger(Number(e)), an = (e) => e.endsWith("%") && he(e.slice(0, -1)), M = (e) => It.test(e), re = (e) => en.test(e), sn = /* @__PURE__ */ new Set(["length", "size", "percentage"]), ln = (e) => pe(e, sn, At), cn = (e) => pe(e, "position", At), dn = /* @__PURE__ */ new Set(["image", "url"]), un = (e) => pe(e, dn, pn), hn = (e) => pe(e, "", mn), ve = () => !0, pe = (e, t, r) => {
|
|
240
|
+
const i = It.exec(e);
|
|
240
241
|
return i ? i[1] ? typeof t == "string" ? i[1] === t : t.has(i[1]) : r(i[2]) : !1;
|
|
241
|
-
},
|
|
242
|
+
}, fn = (e) => (
|
|
242
243
|
// `colorFunctionRegex` check is necessary because color functions can have percentages in them which which would be incorrectly classified as lengths.
|
|
243
244
|
// For example, `hsl(0 0% 0%)` would be classified as a length without this check.
|
|
244
245
|
// I could also use lookbehind assertion in `lengthUnitRegex` but that isn't supported widely enough.
|
|
245
|
-
|
|
246
|
-
),
|
|
247
|
-
const e =
|
|
246
|
+
tn.test(e) && !rn.test(e)
|
|
247
|
+
), At = () => !1, mn = (e) => nn.test(e), pn = (e) => on.test(e), gn = () => {
|
|
248
|
+
const e = R("colors"), t = R("spacing"), r = R("blur"), i = R("brightness"), o = R("borderColor"), a = R("borderRadius"), l = R("borderSpacing"), s = R("borderWidth"), c = R("contrast"), d = R("grayscale"), f = R("hueRotate"), g = R("invert"), u = R("gap"), v = R("gradientColorStops"), p = R("gradientColorStopPositions"), k = R("inset"), h = R("margin"), x = R("opacity"), m = R("padding"), T = R("saturate"), b = R("scale"), A = R("sepia"), C = R("skew"), L = R("space"), H = R("translate"), P = () => ["auto", "contain", "none"], O = () => ["auto", "hidden", "clip", "visible", "scroll"], U = () => ["auto", M, t], S = () => [M, t], w = () => ["", J, te], N = () => ["auto", he, M], V = () => ["bottom", "center", "left", "left-bottom", "left-top", "right", "right-bottom", "right-top", "top"], j = () => ["solid", "dashed", "dotted", "double", "none"], B = () => ["normal", "multiply", "screen", "overlay", "darken", "lighten", "color-dodge", "color-burn", "hard-light", "soft-light", "difference", "exclusion", "hue", "saturation", "color", "luminosity"], z = () => ["start", "end", "center", "between", "around", "evenly", "stretch"], $ = () => ["", "0", M], W = () => ["auto", "avoid", "all", "avoid-page", "page", "left", "right", "column"], G = () => [he, M];
|
|
248
249
|
return {
|
|
249
250
|
cacheSize: 500,
|
|
250
251
|
separator: ":",
|
|
251
252
|
theme: {
|
|
252
|
-
colors: [
|
|
253
|
-
spacing: [
|
|
254
|
-
blur: ["none", "",
|
|
255
|
-
brightness:
|
|
253
|
+
colors: [ve],
|
|
254
|
+
spacing: [J, te],
|
|
255
|
+
blur: ["none", "", re, M],
|
|
256
|
+
brightness: G(),
|
|
256
257
|
borderColor: [e],
|
|
257
|
-
borderRadius: ["none", "", "full",
|
|
258
|
-
borderSpacing:
|
|
259
|
-
borderWidth:
|
|
260
|
-
contrast:
|
|
261
|
-
grayscale:
|
|
262
|
-
hueRotate:
|
|
263
|
-
invert:
|
|
264
|
-
gap:
|
|
258
|
+
borderRadius: ["none", "", "full", re, M],
|
|
259
|
+
borderSpacing: S(),
|
|
260
|
+
borderWidth: w(),
|
|
261
|
+
contrast: G(),
|
|
262
|
+
grayscale: $(),
|
|
263
|
+
hueRotate: G(),
|
|
264
|
+
invert: $(),
|
|
265
|
+
gap: S(),
|
|
265
266
|
gradientColorStops: [e],
|
|
266
|
-
gradientColorStopPositions: [
|
|
267
|
-
inset:
|
|
268
|
-
margin:
|
|
269
|
-
opacity:
|
|
270
|
-
padding:
|
|
271
|
-
saturate:
|
|
272
|
-
scale:
|
|
273
|
-
sepia:
|
|
274
|
-
skew:
|
|
275
|
-
space:
|
|
276
|
-
translate:
|
|
267
|
+
gradientColorStopPositions: [an, te],
|
|
268
|
+
inset: U(),
|
|
269
|
+
margin: U(),
|
|
270
|
+
opacity: G(),
|
|
271
|
+
padding: S(),
|
|
272
|
+
saturate: G(),
|
|
273
|
+
scale: G(),
|
|
274
|
+
sepia: $(),
|
|
275
|
+
skew: G(),
|
|
276
|
+
space: S(),
|
|
277
|
+
translate: S()
|
|
277
278
|
},
|
|
278
279
|
classGroups: {
|
|
279
280
|
// Layout
|
|
@@ -294,21 +295,21 @@ const N = (e) => {
|
|
|
294
295
|
* @see https://tailwindcss.com/docs/columns
|
|
295
296
|
*/
|
|
296
297
|
columns: [{
|
|
297
|
-
columns: [
|
|
298
|
+
columns: [re]
|
|
298
299
|
}],
|
|
299
300
|
/**
|
|
300
301
|
* Break After
|
|
301
302
|
* @see https://tailwindcss.com/docs/break-after
|
|
302
303
|
*/
|
|
303
304
|
"break-after": [{
|
|
304
|
-
"break-after":
|
|
305
|
+
"break-after": W()
|
|
305
306
|
}],
|
|
306
307
|
/**
|
|
307
308
|
* Break Before
|
|
308
309
|
* @see https://tailwindcss.com/docs/break-before
|
|
309
310
|
*/
|
|
310
311
|
"break-before": [{
|
|
311
|
-
"break-before":
|
|
312
|
+
"break-before": W()
|
|
312
313
|
}],
|
|
313
314
|
/**
|
|
314
315
|
* Break Inside
|
|
@@ -367,49 +368,49 @@ const N = (e) => {
|
|
|
367
368
|
* @see https://tailwindcss.com/docs/object-position
|
|
368
369
|
*/
|
|
369
370
|
"object-position": [{
|
|
370
|
-
object: [...
|
|
371
|
+
object: [...V(), M]
|
|
371
372
|
}],
|
|
372
373
|
/**
|
|
373
374
|
* Overflow
|
|
374
375
|
* @see https://tailwindcss.com/docs/overflow
|
|
375
376
|
*/
|
|
376
377
|
overflow: [{
|
|
377
|
-
overflow:
|
|
378
|
+
overflow: O()
|
|
378
379
|
}],
|
|
379
380
|
/**
|
|
380
381
|
* Overflow X
|
|
381
382
|
* @see https://tailwindcss.com/docs/overflow
|
|
382
383
|
*/
|
|
383
384
|
"overflow-x": [{
|
|
384
|
-
"overflow-x":
|
|
385
|
+
"overflow-x": O()
|
|
385
386
|
}],
|
|
386
387
|
/**
|
|
387
388
|
* Overflow Y
|
|
388
389
|
* @see https://tailwindcss.com/docs/overflow
|
|
389
390
|
*/
|
|
390
391
|
"overflow-y": [{
|
|
391
|
-
"overflow-y":
|
|
392
|
+
"overflow-y": O()
|
|
392
393
|
}],
|
|
393
394
|
/**
|
|
394
395
|
* Overscroll Behavior
|
|
395
396
|
* @see https://tailwindcss.com/docs/overscroll-behavior
|
|
396
397
|
*/
|
|
397
398
|
overscroll: [{
|
|
398
|
-
overscroll:
|
|
399
|
+
overscroll: P()
|
|
399
400
|
}],
|
|
400
401
|
/**
|
|
401
402
|
* Overscroll Behavior X
|
|
402
403
|
* @see https://tailwindcss.com/docs/overscroll-behavior
|
|
403
404
|
*/
|
|
404
405
|
"overscroll-x": [{
|
|
405
|
-
"overscroll-x":
|
|
406
|
+
"overscroll-x": P()
|
|
406
407
|
}],
|
|
407
408
|
/**
|
|
408
409
|
* Overscroll Behavior Y
|
|
409
410
|
* @see https://tailwindcss.com/docs/overscroll-behavior
|
|
410
411
|
*/
|
|
411
412
|
"overscroll-y": [{
|
|
412
|
-
"overscroll-y":
|
|
413
|
+
"overscroll-y": P()
|
|
413
414
|
}],
|
|
414
415
|
/**
|
|
415
416
|
* Position
|
|
@@ -489,7 +490,7 @@ const N = (e) => {
|
|
|
489
490
|
* @see https://tailwindcss.com/docs/z-index
|
|
490
491
|
*/
|
|
491
492
|
z: [{
|
|
492
|
-
z: ["auto",
|
|
493
|
+
z: ["auto", be, M]
|
|
493
494
|
}],
|
|
494
495
|
// Flexbox and Grid
|
|
495
496
|
/**
|
|
@@ -497,7 +498,7 @@ const N = (e) => {
|
|
|
497
498
|
* @see https://tailwindcss.com/docs/flex-basis
|
|
498
499
|
*/
|
|
499
500
|
basis: [{
|
|
500
|
-
basis:
|
|
501
|
+
basis: U()
|
|
501
502
|
}],
|
|
502
503
|
/**
|
|
503
504
|
* Flex Direction
|
|
@@ -525,28 +526,28 @@ const N = (e) => {
|
|
|
525
526
|
* @see https://tailwindcss.com/docs/flex-grow
|
|
526
527
|
*/
|
|
527
528
|
grow: [{
|
|
528
|
-
grow:
|
|
529
|
+
grow: $()
|
|
529
530
|
}],
|
|
530
531
|
/**
|
|
531
532
|
* Flex Shrink
|
|
532
533
|
* @see https://tailwindcss.com/docs/flex-shrink
|
|
533
534
|
*/
|
|
534
535
|
shrink: [{
|
|
535
|
-
shrink:
|
|
536
|
+
shrink: $()
|
|
536
537
|
}],
|
|
537
538
|
/**
|
|
538
539
|
* Order
|
|
539
540
|
* @see https://tailwindcss.com/docs/order
|
|
540
541
|
*/
|
|
541
542
|
order: [{
|
|
542
|
-
order: ["first", "last", "none",
|
|
543
|
+
order: ["first", "last", "none", be, M]
|
|
543
544
|
}],
|
|
544
545
|
/**
|
|
545
546
|
* Grid Template Columns
|
|
546
547
|
* @see https://tailwindcss.com/docs/grid-template-columns
|
|
547
548
|
*/
|
|
548
549
|
"grid-cols": [{
|
|
549
|
-
"grid-cols": [
|
|
550
|
+
"grid-cols": [ve]
|
|
550
551
|
}],
|
|
551
552
|
/**
|
|
552
553
|
* Grid Column Start / End
|
|
@@ -554,7 +555,7 @@ const N = (e) => {
|
|
|
554
555
|
*/
|
|
555
556
|
"col-start-end": [{
|
|
556
557
|
col: ["auto", {
|
|
557
|
-
span: ["full",
|
|
558
|
+
span: ["full", be, M]
|
|
558
559
|
}, M]
|
|
559
560
|
}],
|
|
560
561
|
/**
|
|
@@ -562,21 +563,21 @@ const N = (e) => {
|
|
|
562
563
|
* @see https://tailwindcss.com/docs/grid-column
|
|
563
564
|
*/
|
|
564
565
|
"col-start": [{
|
|
565
|
-
"col-start":
|
|
566
|
+
"col-start": N()
|
|
566
567
|
}],
|
|
567
568
|
/**
|
|
568
569
|
* Grid Column End
|
|
569
570
|
* @see https://tailwindcss.com/docs/grid-column
|
|
570
571
|
*/
|
|
571
572
|
"col-end": [{
|
|
572
|
-
"col-end":
|
|
573
|
+
"col-end": N()
|
|
573
574
|
}],
|
|
574
575
|
/**
|
|
575
576
|
* Grid Template Rows
|
|
576
577
|
* @see https://tailwindcss.com/docs/grid-template-rows
|
|
577
578
|
*/
|
|
578
579
|
"grid-rows": [{
|
|
579
|
-
"grid-rows": [
|
|
580
|
+
"grid-rows": [ve]
|
|
580
581
|
}],
|
|
581
582
|
/**
|
|
582
583
|
* Grid Row Start / End
|
|
@@ -584,7 +585,7 @@ const N = (e) => {
|
|
|
584
585
|
*/
|
|
585
586
|
"row-start-end": [{
|
|
586
587
|
row: ["auto", {
|
|
587
|
-
span: [
|
|
588
|
+
span: [be, M]
|
|
588
589
|
}, M]
|
|
589
590
|
}],
|
|
590
591
|
/**
|
|
@@ -592,14 +593,14 @@ const N = (e) => {
|
|
|
592
593
|
* @see https://tailwindcss.com/docs/grid-row
|
|
593
594
|
*/
|
|
594
595
|
"row-start": [{
|
|
595
|
-
"row-start":
|
|
596
|
+
"row-start": N()
|
|
596
597
|
}],
|
|
597
598
|
/**
|
|
598
599
|
* Grid Row End
|
|
599
600
|
* @see https://tailwindcss.com/docs/grid-row
|
|
600
601
|
*/
|
|
601
602
|
"row-end": [{
|
|
602
|
-
"row-end":
|
|
603
|
+
"row-end": N()
|
|
603
604
|
}],
|
|
604
605
|
/**
|
|
605
606
|
* Grid Auto Flow
|
|
@@ -627,28 +628,28 @@ const N = (e) => {
|
|
|
627
628
|
* @see https://tailwindcss.com/docs/gap
|
|
628
629
|
*/
|
|
629
630
|
gap: [{
|
|
630
|
-
gap: [
|
|
631
|
+
gap: [u]
|
|
631
632
|
}],
|
|
632
633
|
/**
|
|
633
634
|
* Gap X
|
|
634
635
|
* @see https://tailwindcss.com/docs/gap
|
|
635
636
|
*/
|
|
636
637
|
"gap-x": [{
|
|
637
|
-
"gap-x": [
|
|
638
|
+
"gap-x": [u]
|
|
638
639
|
}],
|
|
639
640
|
/**
|
|
640
641
|
* Gap Y
|
|
641
642
|
* @see https://tailwindcss.com/docs/gap
|
|
642
643
|
*/
|
|
643
644
|
"gap-y": [{
|
|
644
|
-
"gap-y": [
|
|
645
|
+
"gap-y": [u]
|
|
645
646
|
}],
|
|
646
647
|
/**
|
|
647
648
|
* Justify Content
|
|
648
649
|
* @see https://tailwindcss.com/docs/justify-content
|
|
649
650
|
*/
|
|
650
651
|
"justify-content": [{
|
|
651
|
-
justify: ["normal", ...
|
|
652
|
+
justify: ["normal", ...z()]
|
|
652
653
|
}],
|
|
653
654
|
/**
|
|
654
655
|
* Justify Items
|
|
@@ -669,7 +670,7 @@ const N = (e) => {
|
|
|
669
670
|
* @see https://tailwindcss.com/docs/align-content
|
|
670
671
|
*/
|
|
671
672
|
"align-content": [{
|
|
672
|
-
content: ["normal", ...
|
|
673
|
+
content: ["normal", ...z(), "baseline"]
|
|
673
674
|
}],
|
|
674
675
|
/**
|
|
675
676
|
* Align Items
|
|
@@ -690,7 +691,7 @@ const N = (e) => {
|
|
|
690
691
|
* @see https://tailwindcss.com/docs/place-content
|
|
691
692
|
*/
|
|
692
693
|
"place-content": [{
|
|
693
|
-
"place-content": [...
|
|
694
|
+
"place-content": [...z(), "baseline"]
|
|
694
695
|
}],
|
|
695
696
|
/**
|
|
696
697
|
* Place Items
|
|
@@ -775,63 +776,63 @@ const N = (e) => {
|
|
|
775
776
|
* @see https://tailwindcss.com/docs/margin
|
|
776
777
|
*/
|
|
777
778
|
m: [{
|
|
778
|
-
m: [
|
|
779
|
+
m: [h]
|
|
779
780
|
}],
|
|
780
781
|
/**
|
|
781
782
|
* Margin X
|
|
782
783
|
* @see https://tailwindcss.com/docs/margin
|
|
783
784
|
*/
|
|
784
785
|
mx: [{
|
|
785
|
-
mx: [
|
|
786
|
+
mx: [h]
|
|
786
787
|
}],
|
|
787
788
|
/**
|
|
788
789
|
* Margin Y
|
|
789
790
|
* @see https://tailwindcss.com/docs/margin
|
|
790
791
|
*/
|
|
791
792
|
my: [{
|
|
792
|
-
my: [
|
|
793
|
+
my: [h]
|
|
793
794
|
}],
|
|
794
795
|
/**
|
|
795
796
|
* Margin Start
|
|
796
797
|
* @see https://tailwindcss.com/docs/margin
|
|
797
798
|
*/
|
|
798
799
|
ms: [{
|
|
799
|
-
ms: [
|
|
800
|
+
ms: [h]
|
|
800
801
|
}],
|
|
801
802
|
/**
|
|
802
803
|
* Margin End
|
|
803
804
|
* @see https://tailwindcss.com/docs/margin
|
|
804
805
|
*/
|
|
805
806
|
me: [{
|
|
806
|
-
me: [
|
|
807
|
+
me: [h]
|
|
807
808
|
}],
|
|
808
809
|
/**
|
|
809
810
|
* Margin Top
|
|
810
811
|
* @see https://tailwindcss.com/docs/margin
|
|
811
812
|
*/
|
|
812
813
|
mt: [{
|
|
813
|
-
mt: [
|
|
814
|
+
mt: [h]
|
|
814
815
|
}],
|
|
815
816
|
/**
|
|
816
817
|
* Margin Right
|
|
817
818
|
* @see https://tailwindcss.com/docs/margin
|
|
818
819
|
*/
|
|
819
820
|
mr: [{
|
|
820
|
-
mr: [
|
|
821
|
+
mr: [h]
|
|
821
822
|
}],
|
|
822
823
|
/**
|
|
823
824
|
* Margin Bottom
|
|
824
825
|
* @see https://tailwindcss.com/docs/margin
|
|
825
826
|
*/
|
|
826
827
|
mb: [{
|
|
827
|
-
mb: [
|
|
828
|
+
mb: [h]
|
|
828
829
|
}],
|
|
829
830
|
/**
|
|
830
831
|
* Margin Left
|
|
831
832
|
* @see https://tailwindcss.com/docs/margin
|
|
832
833
|
*/
|
|
833
834
|
ml: [{
|
|
834
|
-
ml: [
|
|
835
|
+
ml: [h]
|
|
835
836
|
}],
|
|
836
837
|
/**
|
|
837
838
|
* Space Between X
|
|
@@ -878,8 +879,8 @@ const N = (e) => {
|
|
|
878
879
|
*/
|
|
879
880
|
"max-w": [{
|
|
880
881
|
"max-w": [M, t, "none", "full", "min", "max", "fit", "prose", {
|
|
881
|
-
screen: [
|
|
882
|
-
},
|
|
882
|
+
screen: [re]
|
|
883
|
+
}, re]
|
|
883
884
|
}],
|
|
884
885
|
/**
|
|
885
886
|
* Height
|
|
@@ -915,7 +916,7 @@ const N = (e) => {
|
|
|
915
916
|
* @see https://tailwindcss.com/docs/font-size
|
|
916
917
|
*/
|
|
917
918
|
"font-size": [{
|
|
918
|
-
text: ["base",
|
|
919
|
+
text: ["base", re, te]
|
|
919
920
|
}],
|
|
920
921
|
/**
|
|
921
922
|
* Font Smoothing
|
|
@@ -932,14 +933,14 @@ const N = (e) => {
|
|
|
932
933
|
* @see https://tailwindcss.com/docs/font-weight
|
|
933
934
|
*/
|
|
934
935
|
"font-weight": [{
|
|
935
|
-
font: ["thin", "extralight", "light", "normal", "medium", "semibold", "bold", "extrabold", "black",
|
|
936
|
+
font: ["thin", "extralight", "light", "normal", "medium", "semibold", "bold", "extrabold", "black", De]
|
|
936
937
|
}],
|
|
937
938
|
/**
|
|
938
939
|
* Font Family
|
|
939
940
|
* @see https://tailwindcss.com/docs/font-family
|
|
940
941
|
*/
|
|
941
942
|
"font-family": [{
|
|
942
|
-
font: [
|
|
943
|
+
font: [ve]
|
|
943
944
|
}],
|
|
944
945
|
/**
|
|
945
946
|
* Font Variant Numeric
|
|
@@ -983,14 +984,14 @@ const N = (e) => {
|
|
|
983
984
|
* @see https://tailwindcss.com/docs/line-clamp
|
|
984
985
|
*/
|
|
985
986
|
"line-clamp": [{
|
|
986
|
-
"line-clamp": ["none",
|
|
987
|
+
"line-clamp": ["none", he, De]
|
|
987
988
|
}],
|
|
988
989
|
/**
|
|
989
990
|
* Line Height
|
|
990
991
|
* @see https://tailwindcss.com/docs/line-height
|
|
991
992
|
*/
|
|
992
993
|
leading: [{
|
|
993
|
-
leading: ["none", "tight", "snug", "normal", "relaxed", "loose",
|
|
994
|
+
leading: ["none", "tight", "snug", "normal", "relaxed", "loose", J, M]
|
|
994
995
|
}],
|
|
995
996
|
/**
|
|
996
997
|
* List Style Image
|
|
@@ -1026,7 +1027,7 @@ const N = (e) => {
|
|
|
1026
1027
|
* @see https://tailwindcss.com/docs/placeholder-opacity
|
|
1027
1028
|
*/
|
|
1028
1029
|
"placeholder-opacity": [{
|
|
1029
|
-
"placeholder-opacity": [
|
|
1030
|
+
"placeholder-opacity": [x]
|
|
1030
1031
|
}],
|
|
1031
1032
|
/**
|
|
1032
1033
|
* Text Alignment
|
|
@@ -1047,7 +1048,7 @@ const N = (e) => {
|
|
|
1047
1048
|
* @see https://tailwindcss.com/docs/text-opacity
|
|
1048
1049
|
*/
|
|
1049
1050
|
"text-opacity": [{
|
|
1050
|
-
"text-opacity": [
|
|
1051
|
+
"text-opacity": [x]
|
|
1051
1052
|
}],
|
|
1052
1053
|
/**
|
|
1053
1054
|
* Text Decoration
|
|
@@ -1059,21 +1060,21 @@ const N = (e) => {
|
|
|
1059
1060
|
* @see https://tailwindcss.com/docs/text-decoration-style
|
|
1060
1061
|
*/
|
|
1061
1062
|
"text-decoration-style": [{
|
|
1062
|
-
decoration: [...
|
|
1063
|
+
decoration: [...j(), "wavy"]
|
|
1063
1064
|
}],
|
|
1064
1065
|
/**
|
|
1065
1066
|
* Text Decoration Thickness
|
|
1066
1067
|
* @see https://tailwindcss.com/docs/text-decoration-thickness
|
|
1067
1068
|
*/
|
|
1068
1069
|
"text-decoration-thickness": [{
|
|
1069
|
-
decoration: ["auto", "from-font",
|
|
1070
|
+
decoration: ["auto", "from-font", J, te]
|
|
1070
1071
|
}],
|
|
1071
1072
|
/**
|
|
1072
1073
|
* Text Underline Offset
|
|
1073
1074
|
* @see https://tailwindcss.com/docs/text-underline-offset
|
|
1074
1075
|
*/
|
|
1075
1076
|
"underline-offset": [{
|
|
1076
|
-
"underline-offset": ["auto",
|
|
1077
|
+
"underline-offset": ["auto", J, M]
|
|
1077
1078
|
}],
|
|
1078
1079
|
/**
|
|
1079
1080
|
* Text Decoration Color
|
|
@@ -1104,7 +1105,7 @@ const N = (e) => {
|
|
|
1104
1105
|
* @see https://tailwindcss.com/docs/text-indent
|
|
1105
1106
|
*/
|
|
1106
1107
|
indent: [{
|
|
1107
|
-
indent:
|
|
1108
|
+
indent: S()
|
|
1108
1109
|
}],
|
|
1109
1110
|
/**
|
|
1110
1111
|
* Vertical Alignment
|
|
@@ -1162,7 +1163,7 @@ const N = (e) => {
|
|
|
1162
1163
|
* @see https://tailwindcss.com/docs/background-opacity
|
|
1163
1164
|
*/
|
|
1164
1165
|
"bg-opacity": [{
|
|
1165
|
-
"bg-opacity": [
|
|
1166
|
+
"bg-opacity": [x]
|
|
1166
1167
|
}],
|
|
1167
1168
|
/**
|
|
1168
1169
|
* Background Origin
|
|
@@ -1176,7 +1177,7 @@ const N = (e) => {
|
|
|
1176
1177
|
* @see https://tailwindcss.com/docs/background-position
|
|
1177
1178
|
*/
|
|
1178
1179
|
"bg-position": [{
|
|
1179
|
-
bg: [...
|
|
1180
|
+
bg: [...V(), cn]
|
|
1180
1181
|
}],
|
|
1181
1182
|
/**
|
|
1182
1183
|
* Background Repeat
|
|
@@ -1192,7 +1193,7 @@ const N = (e) => {
|
|
|
1192
1193
|
* @see https://tailwindcss.com/docs/background-size
|
|
1193
1194
|
*/
|
|
1194
1195
|
"bg-size": [{
|
|
1195
|
-
bg: ["auto", "cover", "contain",
|
|
1196
|
+
bg: ["auto", "cover", "contain", ln]
|
|
1196
1197
|
}],
|
|
1197
1198
|
/**
|
|
1198
1199
|
* Background Image
|
|
@@ -1201,7 +1202,7 @@ const N = (e) => {
|
|
|
1201
1202
|
"bg-image": [{
|
|
1202
1203
|
bg: ["none", {
|
|
1203
1204
|
"gradient-to": ["t", "tr", "r", "br", "b", "bl", "l", "tl"]
|
|
1204
|
-
},
|
|
1205
|
+
}, un]
|
|
1205
1206
|
}],
|
|
1206
1207
|
/**
|
|
1207
1208
|
* Background Color
|
|
@@ -1215,42 +1216,42 @@ const N = (e) => {
|
|
|
1215
1216
|
* @see https://tailwindcss.com/docs/gradient-color-stops
|
|
1216
1217
|
*/
|
|
1217
1218
|
"gradient-from-pos": [{
|
|
1218
|
-
from: [
|
|
1219
|
+
from: [p]
|
|
1219
1220
|
}],
|
|
1220
1221
|
/**
|
|
1221
1222
|
* Gradient Color Stops Via Position
|
|
1222
1223
|
* @see https://tailwindcss.com/docs/gradient-color-stops
|
|
1223
1224
|
*/
|
|
1224
1225
|
"gradient-via-pos": [{
|
|
1225
|
-
via: [
|
|
1226
|
+
via: [p]
|
|
1226
1227
|
}],
|
|
1227
1228
|
/**
|
|
1228
1229
|
* Gradient Color Stops To Position
|
|
1229
1230
|
* @see https://tailwindcss.com/docs/gradient-color-stops
|
|
1230
1231
|
*/
|
|
1231
1232
|
"gradient-to-pos": [{
|
|
1232
|
-
to: [
|
|
1233
|
+
to: [p]
|
|
1233
1234
|
}],
|
|
1234
1235
|
/**
|
|
1235
1236
|
* Gradient Color Stops From
|
|
1236
1237
|
* @see https://tailwindcss.com/docs/gradient-color-stops
|
|
1237
1238
|
*/
|
|
1238
1239
|
"gradient-from": [{
|
|
1239
|
-
from: [
|
|
1240
|
+
from: [v]
|
|
1240
1241
|
}],
|
|
1241
1242
|
/**
|
|
1242
1243
|
* Gradient Color Stops Via
|
|
1243
1244
|
* @see https://tailwindcss.com/docs/gradient-color-stops
|
|
1244
1245
|
*/
|
|
1245
1246
|
"gradient-via": [{
|
|
1246
|
-
via: [
|
|
1247
|
+
via: [v]
|
|
1247
1248
|
}],
|
|
1248
1249
|
/**
|
|
1249
1250
|
* Gradient Color Stops To
|
|
1250
1251
|
* @see https://tailwindcss.com/docs/gradient-color-stops
|
|
1251
1252
|
*/
|
|
1252
1253
|
"gradient-to": [{
|
|
1253
|
-
to: [
|
|
1254
|
+
to: [v]
|
|
1254
1255
|
}],
|
|
1255
1256
|
// Borders
|
|
1256
1257
|
/**
|
|
@@ -1426,14 +1427,14 @@ const N = (e) => {
|
|
|
1426
1427
|
* @see https://tailwindcss.com/docs/border-opacity
|
|
1427
1428
|
*/
|
|
1428
1429
|
"border-opacity": [{
|
|
1429
|
-
"border-opacity": [
|
|
1430
|
+
"border-opacity": [x]
|
|
1430
1431
|
}],
|
|
1431
1432
|
/**
|
|
1432
1433
|
* Border Style
|
|
1433
1434
|
* @see https://tailwindcss.com/docs/border-style
|
|
1434
1435
|
*/
|
|
1435
1436
|
"border-style": [{
|
|
1436
|
-
border: [...
|
|
1437
|
+
border: [...j(), "hidden"]
|
|
1437
1438
|
}],
|
|
1438
1439
|
/**
|
|
1439
1440
|
* Divide Width X
|
|
@@ -1464,14 +1465,14 @@ const N = (e) => {
|
|
|
1464
1465
|
* @see https://tailwindcss.com/docs/divide-opacity
|
|
1465
1466
|
*/
|
|
1466
1467
|
"divide-opacity": [{
|
|
1467
|
-
"divide-opacity": [
|
|
1468
|
+
"divide-opacity": [x]
|
|
1468
1469
|
}],
|
|
1469
1470
|
/**
|
|
1470
1471
|
* Divide Style
|
|
1471
1472
|
* @see https://tailwindcss.com/docs/divide-style
|
|
1472
1473
|
*/
|
|
1473
1474
|
"divide-style": [{
|
|
1474
|
-
divide:
|
|
1475
|
+
divide: j()
|
|
1475
1476
|
}],
|
|
1476
1477
|
/**
|
|
1477
1478
|
* Border Color
|
|
@@ -1548,21 +1549,21 @@ const N = (e) => {
|
|
|
1548
1549
|
* @see https://tailwindcss.com/docs/outline-style
|
|
1549
1550
|
*/
|
|
1550
1551
|
"outline-style": [{
|
|
1551
|
-
outline: ["", ...
|
|
1552
|
+
outline: ["", ...j()]
|
|
1552
1553
|
}],
|
|
1553
1554
|
/**
|
|
1554
1555
|
* Outline Offset
|
|
1555
1556
|
* @see https://tailwindcss.com/docs/outline-offset
|
|
1556
1557
|
*/
|
|
1557
1558
|
"outline-offset": [{
|
|
1558
|
-
"outline-offset": [
|
|
1559
|
+
"outline-offset": [J, M]
|
|
1559
1560
|
}],
|
|
1560
1561
|
/**
|
|
1561
1562
|
* Outline Width
|
|
1562
1563
|
* @see https://tailwindcss.com/docs/outline-width
|
|
1563
1564
|
*/
|
|
1564
1565
|
"outline-w": [{
|
|
1565
|
-
outline: [
|
|
1566
|
+
outline: [J, te]
|
|
1566
1567
|
}],
|
|
1567
1568
|
/**
|
|
1568
1569
|
* Outline Color
|
|
@@ -1576,7 +1577,7 @@ const N = (e) => {
|
|
|
1576
1577
|
* @see https://tailwindcss.com/docs/ring-width
|
|
1577
1578
|
*/
|
|
1578
1579
|
"ring-w": [{
|
|
1579
|
-
ring:
|
|
1580
|
+
ring: w()
|
|
1580
1581
|
}],
|
|
1581
1582
|
/**
|
|
1582
1583
|
* Ring Width Inset
|
|
@@ -1595,14 +1596,14 @@ const N = (e) => {
|
|
|
1595
1596
|
* @see https://tailwindcss.com/docs/ring-opacity
|
|
1596
1597
|
*/
|
|
1597
1598
|
"ring-opacity": [{
|
|
1598
|
-
"ring-opacity": [
|
|
1599
|
+
"ring-opacity": [x]
|
|
1599
1600
|
}],
|
|
1600
1601
|
/**
|
|
1601
1602
|
* Ring Offset Width
|
|
1602
1603
|
* @see https://tailwindcss.com/docs/ring-offset-width
|
|
1603
1604
|
*/
|
|
1604
1605
|
"ring-offset-w": [{
|
|
1605
|
-
"ring-offset": [
|
|
1606
|
+
"ring-offset": [J, te]
|
|
1606
1607
|
}],
|
|
1607
1608
|
/**
|
|
1608
1609
|
* Ring Offset Color
|
|
@@ -1617,35 +1618,35 @@ const N = (e) => {
|
|
|
1617
1618
|
* @see https://tailwindcss.com/docs/box-shadow
|
|
1618
1619
|
*/
|
|
1619
1620
|
shadow: [{
|
|
1620
|
-
shadow: ["", "inner", "none",
|
|
1621
|
+
shadow: ["", "inner", "none", re, hn]
|
|
1621
1622
|
}],
|
|
1622
1623
|
/**
|
|
1623
1624
|
* Box Shadow Color
|
|
1624
1625
|
* @see https://tailwindcss.com/docs/box-shadow-color
|
|
1625
1626
|
*/
|
|
1626
1627
|
"shadow-color": [{
|
|
1627
|
-
shadow: [
|
|
1628
|
+
shadow: [ve]
|
|
1628
1629
|
}],
|
|
1629
1630
|
/**
|
|
1630
1631
|
* Opacity
|
|
1631
1632
|
* @see https://tailwindcss.com/docs/opacity
|
|
1632
1633
|
*/
|
|
1633
1634
|
opacity: [{
|
|
1634
|
-
opacity: [
|
|
1635
|
+
opacity: [x]
|
|
1635
1636
|
}],
|
|
1636
1637
|
/**
|
|
1637
1638
|
* Mix Blend Mode
|
|
1638
1639
|
* @see https://tailwindcss.com/docs/mix-blend-mode
|
|
1639
1640
|
*/
|
|
1640
1641
|
"mix-blend": [{
|
|
1641
|
-
"mix-blend": [...
|
|
1642
|
+
"mix-blend": [...B(), "plus-lighter", "plus-darker"]
|
|
1642
1643
|
}],
|
|
1643
1644
|
/**
|
|
1644
1645
|
* Background Blend Mode
|
|
1645
1646
|
* @see https://tailwindcss.com/docs/background-blend-mode
|
|
1646
1647
|
*/
|
|
1647
1648
|
"bg-blend": [{
|
|
1648
|
-
"bg-blend":
|
|
1649
|
+
"bg-blend": B()
|
|
1649
1650
|
}],
|
|
1650
1651
|
// Filters
|
|
1651
1652
|
/**
|
|
@@ -1682,7 +1683,7 @@ const N = (e) => {
|
|
|
1682
1683
|
* @see https://tailwindcss.com/docs/drop-shadow
|
|
1683
1684
|
*/
|
|
1684
1685
|
"drop-shadow": [{
|
|
1685
|
-
"drop-shadow": ["", "none",
|
|
1686
|
+
"drop-shadow": ["", "none", re, M]
|
|
1686
1687
|
}],
|
|
1687
1688
|
/**
|
|
1688
1689
|
* Grayscale
|
|
@@ -1696,21 +1697,21 @@ const N = (e) => {
|
|
|
1696
1697
|
* @see https://tailwindcss.com/docs/hue-rotate
|
|
1697
1698
|
*/
|
|
1698
1699
|
"hue-rotate": [{
|
|
1699
|
-
"hue-rotate": [
|
|
1700
|
+
"hue-rotate": [f]
|
|
1700
1701
|
}],
|
|
1701
1702
|
/**
|
|
1702
1703
|
* Invert
|
|
1703
1704
|
* @see https://tailwindcss.com/docs/invert
|
|
1704
1705
|
*/
|
|
1705
1706
|
invert: [{
|
|
1706
|
-
invert: [
|
|
1707
|
+
invert: [g]
|
|
1707
1708
|
}],
|
|
1708
1709
|
/**
|
|
1709
1710
|
* Saturate
|
|
1710
1711
|
* @see https://tailwindcss.com/docs/saturate
|
|
1711
1712
|
*/
|
|
1712
1713
|
saturate: [{
|
|
1713
|
-
saturate: [
|
|
1714
|
+
saturate: [T]
|
|
1714
1715
|
}],
|
|
1715
1716
|
/**
|
|
1716
1717
|
* Sepia
|
|
@@ -1760,28 +1761,28 @@ const N = (e) => {
|
|
|
1760
1761
|
* @see https://tailwindcss.com/docs/backdrop-hue-rotate
|
|
1761
1762
|
*/
|
|
1762
1763
|
"backdrop-hue-rotate": [{
|
|
1763
|
-
"backdrop-hue-rotate": [
|
|
1764
|
+
"backdrop-hue-rotate": [f]
|
|
1764
1765
|
}],
|
|
1765
1766
|
/**
|
|
1766
1767
|
* Backdrop Invert
|
|
1767
1768
|
* @see https://tailwindcss.com/docs/backdrop-invert
|
|
1768
1769
|
*/
|
|
1769
1770
|
"backdrop-invert": [{
|
|
1770
|
-
"backdrop-invert": [
|
|
1771
|
+
"backdrop-invert": [g]
|
|
1771
1772
|
}],
|
|
1772
1773
|
/**
|
|
1773
1774
|
* Backdrop Opacity
|
|
1774
1775
|
* @see https://tailwindcss.com/docs/backdrop-opacity
|
|
1775
1776
|
*/
|
|
1776
1777
|
"backdrop-opacity": [{
|
|
1777
|
-
"backdrop-opacity": [
|
|
1778
|
+
"backdrop-opacity": [x]
|
|
1778
1779
|
}],
|
|
1779
1780
|
/**
|
|
1780
1781
|
* Backdrop Saturate
|
|
1781
1782
|
* @see https://tailwindcss.com/docs/backdrop-saturate
|
|
1782
1783
|
*/
|
|
1783
1784
|
"backdrop-saturate": [{
|
|
1784
|
-
"backdrop-saturate": [
|
|
1785
|
+
"backdrop-saturate": [T]
|
|
1785
1786
|
}],
|
|
1786
1787
|
/**
|
|
1787
1788
|
* Backdrop Sepia
|
|
@@ -1846,7 +1847,7 @@ const N = (e) => {
|
|
|
1846
1847
|
* @see https://tailwindcss.com/docs/transition-duration
|
|
1847
1848
|
*/
|
|
1848
1849
|
duration: [{
|
|
1849
|
-
duration:
|
|
1850
|
+
duration: G()
|
|
1850
1851
|
}],
|
|
1851
1852
|
/**
|
|
1852
1853
|
* Transition Timing Function
|
|
@@ -1860,7 +1861,7 @@ const N = (e) => {
|
|
|
1860
1861
|
* @see https://tailwindcss.com/docs/transition-delay
|
|
1861
1862
|
*/
|
|
1862
1863
|
delay: [{
|
|
1863
|
-
delay:
|
|
1864
|
+
delay: G()
|
|
1864
1865
|
}],
|
|
1865
1866
|
/**
|
|
1866
1867
|
* Animation
|
|
@@ -1882,56 +1883,56 @@ const N = (e) => {
|
|
|
1882
1883
|
* @see https://tailwindcss.com/docs/scale
|
|
1883
1884
|
*/
|
|
1884
1885
|
scale: [{
|
|
1885
|
-
scale: [
|
|
1886
|
+
scale: [b]
|
|
1886
1887
|
}],
|
|
1887
1888
|
/**
|
|
1888
1889
|
* Scale X
|
|
1889
1890
|
* @see https://tailwindcss.com/docs/scale
|
|
1890
1891
|
*/
|
|
1891
1892
|
"scale-x": [{
|
|
1892
|
-
"scale-x": [
|
|
1893
|
+
"scale-x": [b]
|
|
1893
1894
|
}],
|
|
1894
1895
|
/**
|
|
1895
1896
|
* Scale Y
|
|
1896
1897
|
* @see https://tailwindcss.com/docs/scale
|
|
1897
1898
|
*/
|
|
1898
1899
|
"scale-y": [{
|
|
1899
|
-
"scale-y": [
|
|
1900
|
+
"scale-y": [b]
|
|
1900
1901
|
}],
|
|
1901
1902
|
/**
|
|
1902
1903
|
* Rotate
|
|
1903
1904
|
* @see https://tailwindcss.com/docs/rotate
|
|
1904
1905
|
*/
|
|
1905
1906
|
rotate: [{
|
|
1906
|
-
rotate: [
|
|
1907
|
+
rotate: [be, M]
|
|
1907
1908
|
}],
|
|
1908
1909
|
/**
|
|
1909
1910
|
* Translate X
|
|
1910
1911
|
* @see https://tailwindcss.com/docs/translate
|
|
1911
1912
|
*/
|
|
1912
1913
|
"translate-x": [{
|
|
1913
|
-
"translate-x": [
|
|
1914
|
+
"translate-x": [H]
|
|
1914
1915
|
}],
|
|
1915
1916
|
/**
|
|
1916
1917
|
* Translate Y
|
|
1917
1918
|
* @see https://tailwindcss.com/docs/translate
|
|
1918
1919
|
*/
|
|
1919
1920
|
"translate-y": [{
|
|
1920
|
-
"translate-y": [
|
|
1921
|
+
"translate-y": [H]
|
|
1921
1922
|
}],
|
|
1922
1923
|
/**
|
|
1923
1924
|
* Skew X
|
|
1924
1925
|
* @see https://tailwindcss.com/docs/skew
|
|
1925
1926
|
*/
|
|
1926
1927
|
"skew-x": [{
|
|
1927
|
-
"skew-x": [
|
|
1928
|
+
"skew-x": [C]
|
|
1928
1929
|
}],
|
|
1929
1930
|
/**
|
|
1930
1931
|
* Skew Y
|
|
1931
1932
|
* @see https://tailwindcss.com/docs/skew
|
|
1932
1933
|
*/
|
|
1933
1934
|
"skew-y": [{
|
|
1934
|
-
"skew-y": [
|
|
1935
|
+
"skew-y": [C]
|
|
1935
1936
|
}],
|
|
1936
1937
|
/**
|
|
1937
1938
|
* Transform Origin
|
|
@@ -1995,126 +1996,126 @@ const N = (e) => {
|
|
|
1995
1996
|
* @see https://tailwindcss.com/docs/scroll-margin
|
|
1996
1997
|
*/
|
|
1997
1998
|
"scroll-m": [{
|
|
1998
|
-
"scroll-m":
|
|
1999
|
+
"scroll-m": S()
|
|
1999
2000
|
}],
|
|
2000
2001
|
/**
|
|
2001
2002
|
* Scroll Margin X
|
|
2002
2003
|
* @see https://tailwindcss.com/docs/scroll-margin
|
|
2003
2004
|
*/
|
|
2004
2005
|
"scroll-mx": [{
|
|
2005
|
-
"scroll-mx":
|
|
2006
|
+
"scroll-mx": S()
|
|
2006
2007
|
}],
|
|
2007
2008
|
/**
|
|
2008
2009
|
* Scroll Margin Y
|
|
2009
2010
|
* @see https://tailwindcss.com/docs/scroll-margin
|
|
2010
2011
|
*/
|
|
2011
2012
|
"scroll-my": [{
|
|
2012
|
-
"scroll-my":
|
|
2013
|
+
"scroll-my": S()
|
|
2013
2014
|
}],
|
|
2014
2015
|
/**
|
|
2015
2016
|
* Scroll Margin Start
|
|
2016
2017
|
* @see https://tailwindcss.com/docs/scroll-margin
|
|
2017
2018
|
*/
|
|
2018
2019
|
"scroll-ms": [{
|
|
2019
|
-
"scroll-ms":
|
|
2020
|
+
"scroll-ms": S()
|
|
2020
2021
|
}],
|
|
2021
2022
|
/**
|
|
2022
2023
|
* Scroll Margin End
|
|
2023
2024
|
* @see https://tailwindcss.com/docs/scroll-margin
|
|
2024
2025
|
*/
|
|
2025
2026
|
"scroll-me": [{
|
|
2026
|
-
"scroll-me":
|
|
2027
|
+
"scroll-me": S()
|
|
2027
2028
|
}],
|
|
2028
2029
|
/**
|
|
2029
2030
|
* Scroll Margin Top
|
|
2030
2031
|
* @see https://tailwindcss.com/docs/scroll-margin
|
|
2031
2032
|
*/
|
|
2032
2033
|
"scroll-mt": [{
|
|
2033
|
-
"scroll-mt":
|
|
2034
|
+
"scroll-mt": S()
|
|
2034
2035
|
}],
|
|
2035
2036
|
/**
|
|
2036
2037
|
* Scroll Margin Right
|
|
2037
2038
|
* @see https://tailwindcss.com/docs/scroll-margin
|
|
2038
2039
|
*/
|
|
2039
2040
|
"scroll-mr": [{
|
|
2040
|
-
"scroll-mr":
|
|
2041
|
+
"scroll-mr": S()
|
|
2041
2042
|
}],
|
|
2042
2043
|
/**
|
|
2043
2044
|
* Scroll Margin Bottom
|
|
2044
2045
|
* @see https://tailwindcss.com/docs/scroll-margin
|
|
2045
2046
|
*/
|
|
2046
2047
|
"scroll-mb": [{
|
|
2047
|
-
"scroll-mb":
|
|
2048
|
+
"scroll-mb": S()
|
|
2048
2049
|
}],
|
|
2049
2050
|
/**
|
|
2050
2051
|
* Scroll Margin Left
|
|
2051
2052
|
* @see https://tailwindcss.com/docs/scroll-margin
|
|
2052
2053
|
*/
|
|
2053
2054
|
"scroll-ml": [{
|
|
2054
|
-
"scroll-ml":
|
|
2055
|
+
"scroll-ml": S()
|
|
2055
2056
|
}],
|
|
2056
2057
|
/**
|
|
2057
2058
|
* Scroll Padding
|
|
2058
2059
|
* @see https://tailwindcss.com/docs/scroll-padding
|
|
2059
2060
|
*/
|
|
2060
2061
|
"scroll-p": [{
|
|
2061
|
-
"scroll-p":
|
|
2062
|
+
"scroll-p": S()
|
|
2062
2063
|
}],
|
|
2063
2064
|
/**
|
|
2064
2065
|
* Scroll Padding X
|
|
2065
2066
|
* @see https://tailwindcss.com/docs/scroll-padding
|
|
2066
2067
|
*/
|
|
2067
2068
|
"scroll-px": [{
|
|
2068
|
-
"scroll-px":
|
|
2069
|
+
"scroll-px": S()
|
|
2069
2070
|
}],
|
|
2070
2071
|
/**
|
|
2071
2072
|
* Scroll Padding Y
|
|
2072
2073
|
* @see https://tailwindcss.com/docs/scroll-padding
|
|
2073
2074
|
*/
|
|
2074
2075
|
"scroll-py": [{
|
|
2075
|
-
"scroll-py":
|
|
2076
|
+
"scroll-py": S()
|
|
2076
2077
|
}],
|
|
2077
2078
|
/**
|
|
2078
2079
|
* Scroll Padding Start
|
|
2079
2080
|
* @see https://tailwindcss.com/docs/scroll-padding
|
|
2080
2081
|
*/
|
|
2081
2082
|
"scroll-ps": [{
|
|
2082
|
-
"scroll-ps":
|
|
2083
|
+
"scroll-ps": S()
|
|
2083
2084
|
}],
|
|
2084
2085
|
/**
|
|
2085
2086
|
* Scroll Padding End
|
|
2086
2087
|
* @see https://tailwindcss.com/docs/scroll-padding
|
|
2087
2088
|
*/
|
|
2088
2089
|
"scroll-pe": [{
|
|
2089
|
-
"scroll-pe":
|
|
2090
|
+
"scroll-pe": S()
|
|
2090
2091
|
}],
|
|
2091
2092
|
/**
|
|
2092
2093
|
* Scroll Padding Top
|
|
2093
2094
|
* @see https://tailwindcss.com/docs/scroll-padding
|
|
2094
2095
|
*/
|
|
2095
2096
|
"scroll-pt": [{
|
|
2096
|
-
"scroll-pt":
|
|
2097
|
+
"scroll-pt": S()
|
|
2097
2098
|
}],
|
|
2098
2099
|
/**
|
|
2099
2100
|
* Scroll Padding Right
|
|
2100
2101
|
* @see https://tailwindcss.com/docs/scroll-padding
|
|
2101
2102
|
*/
|
|
2102
2103
|
"scroll-pr": [{
|
|
2103
|
-
"scroll-pr":
|
|
2104
|
+
"scroll-pr": S()
|
|
2104
2105
|
}],
|
|
2105
2106
|
/**
|
|
2106
2107
|
* Scroll Padding Bottom
|
|
2107
2108
|
* @see https://tailwindcss.com/docs/scroll-padding
|
|
2108
2109
|
*/
|
|
2109
2110
|
"scroll-pb": [{
|
|
2110
|
-
"scroll-pb":
|
|
2111
|
+
"scroll-pb": S()
|
|
2111
2112
|
}],
|
|
2112
2113
|
/**
|
|
2113
2114
|
* Scroll Padding Left
|
|
2114
2115
|
* @see https://tailwindcss.com/docs/scroll-padding
|
|
2115
2116
|
*/
|
|
2116
2117
|
"scroll-pl": [{
|
|
2117
|
-
"scroll-pl":
|
|
2118
|
+
"scroll-pl": S()
|
|
2118
2119
|
}],
|
|
2119
2120
|
/**
|
|
2120
2121
|
* Scroll Snap Align
|
|
@@ -2197,7 +2198,7 @@ const N = (e) => {
|
|
|
2197
2198
|
* @see https://tailwindcss.com/docs/stroke-width
|
|
2198
2199
|
*/
|
|
2199
2200
|
"stroke-w": [{
|
|
2200
|
-
stroke: [
|
|
2201
|
+
stroke: [J, te, De]
|
|
2201
2202
|
}],
|
|
2202
2203
|
/**
|
|
2203
2204
|
* Stroke
|
|
@@ -2272,21 +2273,21 @@ const N = (e) => {
|
|
|
2272
2273
|
"font-size": ["leading"]
|
|
2273
2274
|
}
|
|
2274
2275
|
};
|
|
2275
|
-
},
|
|
2276
|
-
function
|
|
2277
|
-
return
|
|
2276
|
+
}, xn = /* @__PURE__ */ Ji(gn);
|
|
2277
|
+
function E(...e) {
|
|
2278
|
+
return xn(Ae(e));
|
|
2278
2279
|
}
|
|
2279
|
-
let
|
|
2280
|
-
function
|
|
2281
|
-
return
|
|
2280
|
+
let je;
|
|
2281
|
+
function Pe() {
|
|
2282
|
+
return je === void 0 && (je = navigator.platform.includes("Mac")), je;
|
|
2282
2283
|
}
|
|
2283
|
-
function
|
|
2284
|
-
return `${e}`.toLowerCase() === "mod" ?
|
|
2284
|
+
function bn(e) {
|
|
2285
|
+
return `${e}`.toLowerCase() === "mod" ? Pe() ? "⌘" : "Ctrl" : `${e}`.toLowerCase() === "alt" ? Pe() ? "⌥" : "Alt" : `${e}`.toLowerCase() === "shift" ? Pe() ? "⇧" : "Shift" : e;
|
|
2285
2286
|
}
|
|
2286
|
-
function
|
|
2287
|
-
return e.map(
|
|
2287
|
+
function vn(e) {
|
|
2288
|
+
return e.map(bn).join(" ");
|
|
2288
2289
|
}
|
|
2289
|
-
const
|
|
2290
|
+
const fe = ie.forwardRef(
|
|
2290
2291
|
(e, t) => {
|
|
2291
2292
|
const {
|
|
2292
2293
|
icon: r = void 0,
|
|
@@ -2299,45 +2300,45 @@ const wt = Q.forwardRef(
|
|
|
2299
2300
|
shortcutKeys: s = void 0,
|
|
2300
2301
|
tooltipOptions: c = {},
|
|
2301
2302
|
action: d = void 0,
|
|
2302
|
-
isActive:
|
|
2303
|
-
children:
|
|
2304
|
-
asChild:
|
|
2305
|
-
upload:
|
|
2306
|
-
initialDisplayedColor:
|
|
2303
|
+
isActive: f = void 0,
|
|
2304
|
+
children: g,
|
|
2305
|
+
asChild: u = !1,
|
|
2306
|
+
upload: v = !1,
|
|
2307
|
+
initialDisplayedColor: p = void 0,
|
|
2307
2308
|
dataState: k = !1,
|
|
2308
|
-
...
|
|
2309
|
-
} = e,
|
|
2309
|
+
...h
|
|
2310
|
+
} = e, x = Rt[r], m = u ? vt : Vt, T = (b) => {
|
|
2310
2311
|
if (o) {
|
|
2311
|
-
|
|
2312
|
+
b.preventDefault();
|
|
2312
2313
|
return;
|
|
2313
2314
|
}
|
|
2314
|
-
d == null || d(
|
|
2315
|
+
d == null || d(b);
|
|
2315
2316
|
};
|
|
2316
|
-
return /* @__PURE__ */
|
|
2317
|
-
/* @__PURE__ */ n(
|
|
2317
|
+
return /* @__PURE__ */ y(Xn, { children: [
|
|
2318
|
+
/* @__PURE__ */ n(Yn, { asChild: !0, children: /* @__PURE__ */ y(
|
|
2318
2319
|
m,
|
|
2319
2320
|
{
|
|
2320
|
-
className:
|
|
2321
|
+
className: E("richtext-h-[32px] richtext-w-[32px]", a),
|
|
2321
2322
|
"data-state": k ? "on" : "off",
|
|
2322
2323
|
disabled: o,
|
|
2323
|
-
onClick:
|
|
2324
|
+
onClick: T,
|
|
2324
2325
|
ref: t,
|
|
2325
2326
|
size: "sm",
|
|
2326
|
-
...
|
|
2327
|
+
...h,
|
|
2327
2328
|
children: [
|
|
2328
|
-
|
|
2329
|
-
|
|
2329
|
+
x && /* @__PURE__ */ n(x, { className: "richtext-size-4" }),
|
|
2330
|
+
g
|
|
2330
2331
|
]
|
|
2331
2332
|
}
|
|
2332
2333
|
) }),
|
|
2333
|
-
i && /* @__PURE__ */ n(
|
|
2334
|
+
i && /* @__PURE__ */ n(_t, { ...c, className: "richtext-tooltip", children: /* @__PURE__ */ y("div", { className: "richtext-flex richtext-max-w-24 richtext-flex-col richtext-items-center richtext-text-center", children: [
|
|
2334
2335
|
/* @__PURE__ */ n("div", { children: i }),
|
|
2335
|
-
!!(s != null && s.length) && /* @__PURE__ */ n("span", { children:
|
|
2336
|
+
!!(s != null && s.length) && /* @__PURE__ */ n("span", { children: vn(s) })
|
|
2336
2337
|
] }) })
|
|
2337
2338
|
] });
|
|
2338
2339
|
}
|
|
2339
2340
|
);
|
|
2340
|
-
function
|
|
2341
|
+
function wn(e) {
|
|
2341
2342
|
return /* @__PURE__ */ n("svg", { xmlns: "http://www.w3.org/2000/svg", width: "1em", height: "1em", viewBox: "0 0 24 24", ...e, children: /* @__PURE__ */ n(
|
|
2342
2343
|
"path",
|
|
2343
2344
|
{
|
|
@@ -2346,7 +2347,7 @@ function nn(e) {
|
|
|
2346
2347
|
}
|
|
2347
2348
|
) });
|
|
2348
2349
|
}
|
|
2349
|
-
function
|
|
2350
|
+
function yn(e) {
|
|
2350
2351
|
return /* @__PURE__ */ n("svg", { xmlns: "http://www.w3.org/2000/svg", width: "1em", height: "1em", viewBox: "0 0 24 24", ...e, children: /* @__PURE__ */ n(
|
|
2351
2352
|
"path",
|
|
2352
2353
|
{
|
|
@@ -2359,7 +2360,7 @@ function on(e) {
|
|
|
2359
2360
|
}
|
|
2360
2361
|
) });
|
|
2361
2362
|
}
|
|
2362
|
-
function
|
|
2363
|
+
function Cn() {
|
|
2363
2364
|
return /* @__PURE__ */ n(
|
|
2364
2365
|
"svg",
|
|
2365
2366
|
{
|
|
@@ -2386,7 +2387,7 @@ function an() {
|
|
|
2386
2387
|
}
|
|
2387
2388
|
);
|
|
2388
2389
|
}
|
|
2389
|
-
function
|
|
2390
|
+
function kn() {
|
|
2390
2391
|
return /* @__PURE__ */ n(
|
|
2391
2392
|
"svg",
|
|
2392
2393
|
{
|
|
@@ -2413,7 +2414,7 @@ function sn() {
|
|
|
2413
2414
|
}
|
|
2414
2415
|
);
|
|
2415
2416
|
}
|
|
2416
|
-
function
|
|
2417
|
+
function Mn(e) {
|
|
2417
2418
|
return /* @__PURE__ */ n("svg", { xmlns: "http://www.w3.org/2000/svg", width: "1em", height: "1em", viewBox: "0 0 24 24", ...e, children: /* @__PURE__ */ n(
|
|
2418
2419
|
"path",
|
|
2419
2420
|
{
|
|
@@ -2422,8 +2423,8 @@ function ln(e) {
|
|
|
2422
2423
|
}
|
|
2423
2424
|
) });
|
|
2424
2425
|
}
|
|
2425
|
-
function
|
|
2426
|
-
const t =
|
|
2426
|
+
function Oe(e) {
|
|
2427
|
+
const t = Rt[e.name];
|
|
2427
2428
|
return t ? /* @__PURE__ */ n(
|
|
2428
2429
|
t,
|
|
2429
2430
|
{
|
|
@@ -2432,7 +2433,7 @@ function Re(e) {
|
|
|
2432
2433
|
}
|
|
2433
2434
|
) : null;
|
|
2434
2435
|
}
|
|
2435
|
-
function
|
|
2436
|
+
function Nn(e) {
|
|
2436
2437
|
return /* @__PURE__ */ n("svg", { xmlns: "http://www.w3.org/2000/svg", width: "1em", height: "1em", viewBox: "0 0 24 24", ...e, children: /* @__PURE__ */ n(
|
|
2437
2438
|
"path",
|
|
2438
2439
|
{
|
|
@@ -2441,7 +2442,7 @@ function cn(e) {
|
|
|
2441
2442
|
}
|
|
2442
2443
|
) });
|
|
2443
2444
|
}
|
|
2444
|
-
function
|
|
2445
|
+
function Tn(e) {
|
|
2445
2446
|
return /* @__PURE__ */ n(
|
|
2446
2447
|
"svg",
|
|
2447
2448
|
{
|
|
@@ -2466,10 +2467,10 @@ function dn(e) {
|
|
|
2466
2467
|
}
|
|
2467
2468
|
);
|
|
2468
2469
|
}
|
|
2469
|
-
function
|
|
2470
|
+
function Sn(e) {
|
|
2470
2471
|
return /* @__PURE__ */ n("svg", { xmlns: "http://www.w3.org/2000/svg", width: "1em", height: "1em", viewBox: "0 0 24 24", ...e, children: /* @__PURE__ */ n("path", { fill: "currentColor", d: "M9 7v10h6v-2h-4V7z" }) });
|
|
2471
2472
|
}
|
|
2472
|
-
function
|
|
2473
|
+
function zn(e) {
|
|
2473
2474
|
return /* @__PURE__ */ n("svg", { xmlns: "http://www.w3.org/2000/svg", width: "1em", height: "1em", viewBox: "0 0 24 24", ...e, children: /* @__PURE__ */ n(
|
|
2474
2475
|
"path",
|
|
2475
2476
|
{
|
|
@@ -2478,7 +2479,7 @@ function hn(e) {
|
|
|
2478
2479
|
}
|
|
2479
2480
|
) });
|
|
2480
2481
|
}
|
|
2481
|
-
function
|
|
2482
|
+
function In(e) {
|
|
2482
2483
|
return /* @__PURE__ */ n("svg", { xmlns: "http://www.w3.org/2000/svg", width: "1em", height: "1em", viewBox: "0 0 24 24", ...e, children: /* @__PURE__ */ n(
|
|
2483
2484
|
"path",
|
|
2484
2485
|
{
|
|
@@ -2487,7 +2488,7 @@ function fn(e) {
|
|
|
2487
2488
|
}
|
|
2488
2489
|
) });
|
|
2489
2490
|
}
|
|
2490
|
-
function
|
|
2491
|
+
function An() {
|
|
2491
2492
|
return /* @__PURE__ */ n("svg", { xmlns: "http://www.w3.org/2000/svg", width: "1em", height: "1em", viewBox: "0 0 24 24", children: /* @__PURE__ */ n(
|
|
2492
2493
|
"path",
|
|
2493
2494
|
{
|
|
@@ -2496,7 +2497,7 @@ function mn() {
|
|
|
2496
2497
|
}
|
|
2497
2498
|
) });
|
|
2498
2499
|
}
|
|
2499
|
-
function
|
|
2500
|
+
function Ln() {
|
|
2500
2501
|
return /* @__PURE__ */ n("svg", { xmlns: "http://www.w3.org/2000/svg", width: "1em", height: "1em", viewBox: "0 0 24 24", children: /* @__PURE__ */ n(
|
|
2501
2502
|
"path",
|
|
2502
2503
|
{
|
|
@@ -2509,7 +2510,7 @@ function gn() {
|
|
|
2509
2510
|
}
|
|
2510
2511
|
) });
|
|
2511
2512
|
}
|
|
2512
|
-
function
|
|
2513
|
+
function En() {
|
|
2513
2514
|
return /* @__PURE__ */ n("svg", { xmlns: "http://www.w3.org/2000/svg", width: "1em", height: "1em", viewBox: "0 0 24 24", children: /* @__PURE__ */ n(
|
|
2514
2515
|
"path",
|
|
2515
2516
|
{
|
|
@@ -2522,7 +2523,7 @@ function pn() {
|
|
|
2522
2523
|
}
|
|
2523
2524
|
) });
|
|
2524
2525
|
}
|
|
2525
|
-
function
|
|
2526
|
+
function Rn() {
|
|
2526
2527
|
return /* @__PURE__ */ n("svg", { xmlns: "http://www.w3.org/2000/svg", width: "1em", height: "1em", viewBox: "0 0 24 24", children: /* @__PURE__ */ n(
|
|
2527
2528
|
"path",
|
|
2528
2529
|
{
|
|
@@ -2535,7 +2536,7 @@ function xn() {
|
|
|
2535
2536
|
}
|
|
2536
2537
|
) });
|
|
2537
2538
|
}
|
|
2538
|
-
function
|
|
2539
|
+
function Vn() {
|
|
2539
2540
|
return /* @__PURE__ */ n("svg", { xmlns: "http://www.w3.org/2000/svg", width: "1em", height: "1em", viewBox: "0 0 24 24", children: /* @__PURE__ */ n(
|
|
2540
2541
|
"path",
|
|
2541
2542
|
{
|
|
@@ -2544,8 +2545,8 @@ function bn() {
|
|
|
2544
2545
|
}
|
|
2545
2546
|
) });
|
|
2546
2547
|
}
|
|
2547
|
-
function
|
|
2548
|
-
return /* @__PURE__ */
|
|
2548
|
+
function Lt() {
|
|
2549
|
+
return /* @__PURE__ */ y("svg", { xmlns: "http://www.w3.org/2000/svg", width: "1em", height: "1em", viewBox: "0 0 32 32", children: [
|
|
2549
2550
|
/* @__PURE__ */ n(
|
|
2550
2551
|
"path",
|
|
2551
2552
|
{
|
|
@@ -2562,8 +2563,8 @@ function vn() {
|
|
|
2562
2563
|
)
|
|
2563
2564
|
] });
|
|
2564
2565
|
}
|
|
2565
|
-
function
|
|
2566
|
-
return /* @__PURE__ */
|
|
2566
|
+
function Et() {
|
|
2567
|
+
return /* @__PURE__ */ y(
|
|
2567
2568
|
"svg",
|
|
2568
2569
|
{
|
|
2569
2570
|
xmlns: "http://www.w3.org/2000/svg",
|
|
@@ -2590,7 +2591,7 @@ function wn() {
|
|
|
2590
2591
|
}
|
|
2591
2592
|
);
|
|
2592
2593
|
}
|
|
2593
|
-
function
|
|
2594
|
+
function _n() {
|
|
2594
2595
|
return /* @__PURE__ */ n("svg", { height: "1em", viewBox: "0 0 15 15", width: "1em", xmlns: "http://www.w3.org/2000/svg", children: /* @__PURE__ */ n(
|
|
2595
2596
|
"path",
|
|
2596
2597
|
{
|
|
@@ -2599,8 +2600,8 @@ function yn() {
|
|
|
2599
2600
|
}
|
|
2600
2601
|
) });
|
|
2601
2602
|
}
|
|
2602
|
-
function
|
|
2603
|
-
return /* @__PURE__ */ n("svg", { height: "1em", viewBox: "0 0 24 24", width: "1em", xmlns: "http://www.w3.org/2000/svg", children: /* @__PURE__ */
|
|
2603
|
+
function Hn() {
|
|
2604
|
+
return /* @__PURE__ */ n("svg", { height: "1em", viewBox: "0 0 24 24", width: "1em", xmlns: "http://www.w3.org/2000/svg", children: /* @__PURE__ */ y(
|
|
2604
2605
|
"g",
|
|
2605
2606
|
{
|
|
2606
2607
|
fill: "none",
|
|
@@ -2615,7 +2616,7 @@ function Cn() {
|
|
|
2615
2616
|
}
|
|
2616
2617
|
) });
|
|
2617
2618
|
}
|
|
2618
|
-
function
|
|
2619
|
+
function Dn() {
|
|
2619
2620
|
return /* @__PURE__ */ n("svg", { xmlns: "http://www.w3.org/2000/svg", width: "1em", height: "1em", viewBox: "0 0 20 20", children: /* @__PURE__ */ n(
|
|
2620
2621
|
"path",
|
|
2621
2622
|
{
|
|
@@ -2624,8 +2625,8 @@ function kn() {
|
|
|
2624
2625
|
}
|
|
2625
2626
|
) });
|
|
2626
2627
|
}
|
|
2627
|
-
function
|
|
2628
|
-
return /* @__PURE__ */ n("svg", { xmlns: "http://www.w3.org/2000/svg", width: "1em", height: "1em", viewBox: "0 0 48 48", children: /* @__PURE__ */
|
|
2628
|
+
function jn() {
|
|
2629
|
+
return /* @__PURE__ */ n("svg", { xmlns: "http://www.w3.org/2000/svg", width: "1em", height: "1em", viewBox: "0 0 48 48", children: /* @__PURE__ */ y("g", { fill: "none", stroke: "currentColor", strokeWidth: "4", children: [
|
|
2629
2630
|
/* @__PURE__ */ n("circle", { cx: "10", cy: "24", r: "4" }),
|
|
2630
2631
|
/* @__PURE__ */ n("circle", { cx: "38", cy: "10", r: "4" }),
|
|
2631
2632
|
/* @__PURE__ */ n("circle", { cx: "38", cy: "24", r: "4" }),
|
|
@@ -2633,7 +2634,7 @@ function Mn() {
|
|
|
2633
2634
|
/* @__PURE__ */ n("path", { strokeLinecap: "round", strokeLinejoin: "round", d: "M34 38H22V10h12M14 24h20" })
|
|
2634
2635
|
] }) });
|
|
2635
2636
|
}
|
|
2636
|
-
function
|
|
2637
|
+
function Pn() {
|
|
2637
2638
|
return /* @__PURE__ */ n("svg", { xmlns: "http://www.w3.org/2000/svg", width: "1em", height: "1em", viewBox: "0 0 20 20", children: /* @__PURE__ */ n(
|
|
2638
2639
|
"path",
|
|
2639
2640
|
{
|
|
@@ -2642,7 +2643,7 @@ function In() {
|
|
|
2642
2643
|
}
|
|
2643
2644
|
) });
|
|
2644
2645
|
}
|
|
2645
|
-
function
|
|
2646
|
+
function On() {
|
|
2646
2647
|
return /* @__PURE__ */ n("svg", { xmlns: "http://www.w3.org/2000/svg", width: "1em", height: "1em", viewBox: "0 0 24 24", children: /* @__PURE__ */ n(
|
|
2647
2648
|
"path",
|
|
2648
2649
|
{
|
|
@@ -2656,7 +2657,7 @@ function Tn() {
|
|
|
2656
2657
|
}
|
|
2657
2658
|
) });
|
|
2658
2659
|
}
|
|
2659
|
-
function
|
|
2660
|
+
function Bn() {
|
|
2660
2661
|
return /* @__PURE__ */ n(
|
|
2661
2662
|
"svg",
|
|
2662
2663
|
{
|
|
@@ -2677,145 +2678,166 @@ function zn() {
|
|
|
2677
2678
|
}
|
|
2678
2679
|
);
|
|
2679
2680
|
}
|
|
2680
|
-
|
|
2681
|
-
|
|
2682
|
-
|
|
2683
|
-
|
|
2684
|
-
|
|
2685
|
-
|
|
2686
|
-
|
|
2687
|
-
|
|
2688
|
-
|
|
2689
|
-
|
|
2690
|
-
|
|
2691
|
-
|
|
2692
|
-
|
|
2693
|
-
|
|
2694
|
-
|
|
2695
|
-
|
|
2696
|
-
|
|
2697
|
-
|
|
2698
|
-
|
|
2699
|
-
|
|
2700
|
-
|
|
2701
|
-
|
|
2702
|
-
|
|
2703
|
-
|
|
2704
|
-
|
|
2705
|
-
|
|
2706
|
-
|
|
2707
|
-
|
|
2708
|
-
|
|
2709
|
-
|
|
2710
|
-
|
|
2711
|
-
|
|
2712
|
-
|
|
2713
|
-
|
|
2714
|
-
|
|
2715
|
-
|
|
2716
|
-
|
|
2717
|
-
|
|
2718
|
-
|
|
2719
|
-
|
|
2720
|
-
|
|
2721
|
-
|
|
2722
|
-
|
|
2723
|
-
|
|
2724
|
-
|
|
2725
|
-
|
|
2726
|
-
|
|
2727
|
-
|
|
2728
|
-
|
|
2729
|
-
|
|
2730
|
-
|
|
2731
|
-
|
|
2732
|
-
|
|
2733
|
-
|
|
2734
|
-
|
|
2735
|
-
|
|
2736
|
-
|
|
2737
|
-
|
|
2738
|
-
|
|
2739
|
-
|
|
2740
|
-
|
|
2741
|
-
|
|
2742
|
-
|
|
2743
|
-
|
|
2744
|
-
|
|
2745
|
-
|
|
2746
|
-
|
|
2747
|
-
|
|
2748
|
-
|
|
2749
|
-
|
|
2750
|
-
|
|
2751
|
-
|
|
2752
|
-
|
|
2753
|
-
|
|
2754
|
-
|
|
2755
|
-
|
|
2756
|
-
|
|
2757
|
-
|
|
2758
|
-
|
|
2759
|
-
|
|
2760
|
-
|
|
2761
|
-
|
|
2762
|
-
|
|
2763
|
-
|
|
2764
|
-
|
|
2765
|
-
|
|
2766
|
-
|
|
2767
|
-
|
|
2768
|
-
|
|
2769
|
-
|
|
2770
|
-
|
|
2771
|
-
|
|
2772
|
-
|
|
2773
|
-
|
|
2774
|
-
|
|
2775
|
-
|
|
2776
|
-
|
|
2777
|
-
|
|
2778
|
-
|
|
2779
|
-
|
|
2780
|
-
|
|
2781
|
-
|
|
2782
|
-
|
|
2783
|
-
|
|
2784
|
-
|
|
2785
|
-
|
|
2786
|
-
|
|
2787
|
-
|
|
2788
|
-
|
|
2789
|
-
|
|
2681
|
+
function Un(e) {
|
|
2682
|
+
return /* @__PURE__ */ y(
|
|
2683
|
+
"svg",
|
|
2684
|
+
{
|
|
2685
|
+
width: "1em",
|
|
2686
|
+
height: "1em",
|
|
2687
|
+
viewBox: "0 0 64 64",
|
|
2688
|
+
xmlns: "http://www.w3.org/2000/svg",
|
|
2689
|
+
strokeWidth: 3,
|
|
2690
|
+
stroke: "currentColor",
|
|
2691
|
+
fill: "none",
|
|
2692
|
+
...e,
|
|
2693
|
+
children: [
|
|
2694
|
+
/* @__PURE__ */ n("circle", { cx: 32, cy: "31.48", r: "25.29" }),
|
|
2695
|
+
/* @__PURE__ */ n("path", { d: "M40.12,24.41a8.36,8.36,0,0,0-7.84-5.06c-7.07,0-7.33,5.06-7.33,5.06s-1.06,6.24,7.58,6.9c9,.69,7.59,6.9,7.59,6.9s-.92,5.4-7.59,5.75-8.73-6.67-8.73-6.67" }),
|
|
2696
|
+
/* @__PURE__ */ n("line", { x1: "32.28", y1: "14.87", x2: "32.28", y2: "49.13" })
|
|
2697
|
+
]
|
|
2698
|
+
}
|
|
2699
|
+
);
|
|
2700
|
+
}
|
|
2701
|
+
const Rt = {
|
|
2702
|
+
Bold: Ni,
|
|
2703
|
+
LoaderCircle: Mi,
|
|
2704
|
+
Italic: ki,
|
|
2705
|
+
Underline: Ci,
|
|
2706
|
+
Quote: yi,
|
|
2707
|
+
TextQuote: yn,
|
|
2708
|
+
Strikethrough: wi,
|
|
2709
|
+
Minus: vi,
|
|
2710
|
+
Eraser: bi,
|
|
2711
|
+
PaintRoller: xi,
|
|
2712
|
+
Redo2: gi,
|
|
2713
|
+
Undo2: pi,
|
|
2714
|
+
AlignCenter: ji,
|
|
2715
|
+
AlignJustify: Di,
|
|
2716
|
+
AlignLeft: Hi,
|
|
2717
|
+
AlignRight: _i,
|
|
2718
|
+
ChevronDown: Ze,
|
|
2719
|
+
Subscript: mi,
|
|
2720
|
+
Superscript: fi,
|
|
2721
|
+
Code: hi,
|
|
2722
|
+
Code2: ui,
|
|
2723
|
+
Type: di,
|
|
2724
|
+
IndentIncrease: ci,
|
|
2725
|
+
IndentDecrease: li,
|
|
2726
|
+
List: si,
|
|
2727
|
+
ListOrdered: ai,
|
|
2728
|
+
ListTodo: oi,
|
|
2729
|
+
Link: ni,
|
|
2730
|
+
ImageUp: ii,
|
|
2731
|
+
Video: ri,
|
|
2732
|
+
Maximize: ti,
|
|
2733
|
+
Minimize: ei,
|
|
2734
|
+
Table: Qr,
|
|
2735
|
+
Sparkles: Kr,
|
|
2736
|
+
Pencil: Jr,
|
|
2737
|
+
Unlink: qr,
|
|
2738
|
+
BetweenHorizonalEnd: Zr,
|
|
2739
|
+
BetweenHorizonalStart: Yr,
|
|
2740
|
+
BetweenVerticalStart: Xr,
|
|
2741
|
+
BetweenVerticalEnd: Gr,
|
|
2742
|
+
TableCellsMerge: Wr,
|
|
2743
|
+
TableCellsSplit: Fr,
|
|
2744
|
+
Trash2: $r,
|
|
2745
|
+
Trash: Ur,
|
|
2746
|
+
Replace: at,
|
|
2747
|
+
ChevronsUpDown: Br,
|
|
2748
|
+
LineHeight: Nn,
|
|
2749
|
+
Word: Mn,
|
|
2750
|
+
HeadingParagraph: Or,
|
|
2751
|
+
Heading1: Pr,
|
|
2752
|
+
Heading2: jr,
|
|
2753
|
+
Heading3: Dr,
|
|
2754
|
+
Heading4: Hr,
|
|
2755
|
+
Heading5: _r,
|
|
2756
|
+
Heading6: Vr,
|
|
2757
|
+
Columns2: st,
|
|
2758
|
+
Columns3: Rr,
|
|
2759
|
+
Columns4: Er,
|
|
2760
|
+
Plus: Lr,
|
|
2761
|
+
Grip: Ar,
|
|
2762
|
+
Copy: Ir,
|
|
2763
|
+
Clipboard: zr,
|
|
2764
|
+
PanelLeft: Sr,
|
|
2765
|
+
PanelRight: Tr,
|
|
2766
|
+
Columns: st,
|
|
2767
|
+
Iframe: Nr,
|
|
2768
|
+
MenuDown: Tn,
|
|
2769
|
+
SizeS: In,
|
|
2770
|
+
SizeM: zn,
|
|
2771
|
+
SizeL: Sn,
|
|
2772
|
+
AspectRatio: wn,
|
|
2773
|
+
Emoji: Mr,
|
|
2774
|
+
DeleteColumn: Cn,
|
|
2775
|
+
DeleteRow: kn,
|
|
2776
|
+
SearchAndReplace: at,
|
|
2777
|
+
EmojiIcon: kr,
|
|
2778
|
+
KatexIcon: Cr,
|
|
2779
|
+
ExportPdf: Lt,
|
|
2780
|
+
ExportWord: Et,
|
|
2781
|
+
ImportWord: Bn,
|
|
2782
|
+
ColumnAddLeft: Ln,
|
|
2783
|
+
ColumnAddRight: En,
|
|
2784
|
+
BookMarked: yr,
|
|
2785
|
+
Excalidraw: Vn,
|
|
2786
|
+
ZoomIn: wr,
|
|
2787
|
+
ZoomOut: vr,
|
|
2788
|
+
Settings: br,
|
|
2789
|
+
Eye: xr,
|
|
2790
|
+
TextDirection: Rn,
|
|
2791
|
+
LeftToRight: Dn,
|
|
2792
|
+
RightToLeft: Pn,
|
|
2793
|
+
Attachment: gr,
|
|
2794
|
+
AttachmentDownload: pr,
|
|
2795
|
+
GifIcon: _n,
|
|
2796
|
+
ChevronUp: kt,
|
|
2797
|
+
Crop: mr,
|
|
2798
|
+
Mermaid: jn,
|
|
2799
|
+
Twitter: On,
|
|
2800
|
+
CodeView: An,
|
|
2801
|
+
FlipX: fr,
|
|
2802
|
+
FlipY: hr,
|
|
2803
|
+
PencilRuler: ur,
|
|
2804
|
+
WrapText: dr,
|
|
2805
|
+
Loader: cr,
|
|
2806
|
+
X: Ct,
|
|
2807
|
+
Html: Hn,
|
|
2808
|
+
ExternalLink: lr,
|
|
2809
|
+
Callout: sr,
|
|
2810
|
+
PaywallIcon: Un
|
|
2811
|
+
}, ht = (e) => typeof e == "boolean" ? `${e}` : e === 0 ? "0" : e, ft = Ae, Je = (e, t) => (r) => {
|
|
2790
2812
|
var i;
|
|
2791
|
-
if ((t == null ? void 0 : t.variants) == null) return
|
|
2813
|
+
if ((t == null ? void 0 : t.variants) == null) return ft(e, r == null ? void 0 : r.class, r == null ? void 0 : r.className);
|
|
2792
2814
|
const { variants: o, defaultVariants: a } = t, l = Object.keys(o).map((d) => {
|
|
2793
|
-
const
|
|
2794
|
-
if (
|
|
2795
|
-
const
|
|
2796
|
-
return o[d][
|
|
2797
|
-
}), s = r && Object.entries(r).reduce((d,
|
|
2798
|
-
let [
|
|
2799
|
-
return
|
|
2800
|
-
}, {}), c = t == null || (i = t.compoundVariants) === null || i === void 0 ? void 0 : i.reduce((d,
|
|
2801
|
-
let { class:
|
|
2802
|
-
return Object.entries(
|
|
2803
|
-
let [k,
|
|
2804
|
-
return Array.isArray(
|
|
2815
|
+
const f = r == null ? void 0 : r[d], g = a == null ? void 0 : a[d];
|
|
2816
|
+
if (f === null) return null;
|
|
2817
|
+
const u = ht(f) || ht(g);
|
|
2818
|
+
return o[d][u];
|
|
2819
|
+
}), s = r && Object.entries(r).reduce((d, f) => {
|
|
2820
|
+
let [g, u] = f;
|
|
2821
|
+
return u === void 0 || (d[g] = u), d;
|
|
2822
|
+
}, {}), c = t == null || (i = t.compoundVariants) === null || i === void 0 ? void 0 : i.reduce((d, f) => {
|
|
2823
|
+
let { class: g, className: u, ...v } = f;
|
|
2824
|
+
return Object.entries(v).every((p) => {
|
|
2825
|
+
let [k, h] = p;
|
|
2826
|
+
return Array.isArray(h) ? h.includes({
|
|
2805
2827
|
...a,
|
|
2806
2828
|
...s
|
|
2807
2829
|
}[k]) : {
|
|
2808
2830
|
...a,
|
|
2809
2831
|
...s
|
|
2810
|
-
}[k] ===
|
|
2832
|
+
}[k] === h;
|
|
2811
2833
|
}) ? [
|
|
2812
2834
|
...d,
|
|
2813
|
-
|
|
2814
|
-
|
|
2835
|
+
g,
|
|
2836
|
+
u
|
|
2815
2837
|
] : d;
|
|
2816
2838
|
}, []);
|
|
2817
|
-
return
|
|
2818
|
-
},
|
|
2839
|
+
return ft(e, l, c, r == null ? void 0 : r.class, r == null ? void 0 : r.className);
|
|
2840
|
+
}, $n = Je(
|
|
2819
2841
|
"richtext-inline-flex richtext-items-center richtext-justify-center richtext-whitespace-nowrap richtext-rounded-md richtext-text-sm richtext-font-medium richtext-ring-offset-background richtext-transition-colors focus-visible:richtext-outline-none focus-visible:richtext-ring-2 focus-visible:richtext-ring-ring focus-visible:richtext-ring-offset-1 disabled:richtext-pointer-events-none disabled:richtext-opacity-50",
|
|
2820
2842
|
{
|
|
2821
2843
|
variants: {
|
|
@@ -2839,17 +2861,17 @@ const yt = {
|
|
|
2839
2861
|
size: "default"
|
|
2840
2862
|
}
|
|
2841
2863
|
}
|
|
2842
|
-
),
|
|
2843
|
-
({ className: e, variant: t, size: r, asChild: i = !1, ...o }, a) => /* @__PURE__ */ n(i ?
|
|
2864
|
+
), X = _.forwardRef(
|
|
2865
|
+
({ className: e, variant: t, size: r, asChild: i = !1, ...o }, a) => /* @__PURE__ */ n(i ? vt : "button", { className: E($n({ variant: t, size: r, className: e })), ref: a, ...o })
|
|
2844
2866
|
);
|
|
2845
|
-
|
|
2846
|
-
const
|
|
2867
|
+
X.displayName = "Button";
|
|
2868
|
+
const ae = _.forwardRef(
|
|
2847
2869
|
({ className: e, type: t, ...r }, i) => /* @__PURE__ */ n(
|
|
2848
2870
|
"input",
|
|
2849
2871
|
{
|
|
2850
2872
|
ref: i,
|
|
2851
2873
|
type: t,
|
|
2852
|
-
className:
|
|
2874
|
+
className: E(
|
|
2853
2875
|
"richtext-flex richtext-h-10 richtext-w-full richtext-rounded-md !richtext-border richtext-border-input richtext-bg-transparent richtext-px-3 richtext-py-2 richtext-text-sm richtext-text-foreground richtext-ring-offset-background file:richtext-border-0 file:richtext-bg-transparent file:richtext-text-sm file:richtext-font-medium placeholder:richtext-text-muted-foreground focus-visible:richtext-outline-none focus-visible:richtext-ring-1 focus-visible:richtext-ring-ring focus-visible:richtext-ring-offset-1 disabled:richtext-cursor-not-allowed disabled:richtext-opacity-50",
|
|
2854
2876
|
e
|
|
2855
2877
|
),
|
|
@@ -2857,48 +2879,62 @@ const re = B.forwardRef(
|
|
|
2857
2879
|
}
|
|
2858
2880
|
)
|
|
2859
2881
|
);
|
|
2860
|
-
|
|
2861
|
-
const
|
|
2882
|
+
ae.displayName = "Input";
|
|
2883
|
+
const Fn = Je(
|
|
2862
2884
|
"richtext-text-sm richtext-font-medium richtext-leading-none richtext-text-foreground peer-disabled:richtext-cursor-not-allowed peer-disabled:richtext-opacity-70"
|
|
2863
|
-
),
|
|
2864
|
-
|
|
2865
|
-
const
|
|
2866
|
-
|
|
2885
|
+
), ke = _.forwardRef(({ className: e, ...t }, r) => /* @__PURE__ */ n(yt.Root, { className: E(Fn(), e), ref: r, ...t }));
|
|
2886
|
+
ke.displayName = yt.Root.displayName;
|
|
2887
|
+
const _e = se.Root, Ne = _.forwardRef(({ className: e, ...t }, r) => /* @__PURE__ */ n(
|
|
2888
|
+
se.List,
|
|
2867
2889
|
{
|
|
2868
2890
|
ref: r,
|
|
2869
|
-
className:
|
|
2891
|
+
className: E(
|
|
2870
2892
|
"richtext-inline-flex richtext-h-10 richtext-items-center richtext-justify-center richtext-rounded-md richtext-bg-muted richtext-p-1 richtext-text-muted-foreground",
|
|
2871
2893
|
e
|
|
2872
2894
|
),
|
|
2873
2895
|
...t
|
|
2874
2896
|
}
|
|
2875
2897
|
));
|
|
2876
|
-
|
|
2877
|
-
const
|
|
2878
|
-
|
|
2898
|
+
Ne.displayName = se.List.displayName;
|
|
2899
|
+
const K = _.forwardRef(({ className: e, ...t }, r) => /* @__PURE__ */ n(
|
|
2900
|
+
se.Trigger,
|
|
2879
2901
|
{
|
|
2880
2902
|
ref: r,
|
|
2881
|
-
className:
|
|
2903
|
+
className: E(
|
|
2882
2904
|
"richtext-inline-flex richtext-items-center richtext-justify-center richtext-whitespace-nowrap richtext-rounded-sm richtext-px-3 richtext-py-1.5 richtext-text-sm richtext-font-medium richtext-ring-offset-background richtext-transition-all focus-visible:richtext-outline-none focus-visible:richtext-ring-2 focus-visible:richtext-ring-ring focus-visible:richtext-ring-offset-1 disabled:richtext-pointer-events-none disabled:richtext-opacity-50 data-[state=active]:richtext-bg-background data-[state=active]:richtext-text-foreground data-[state=active]:richtext-shadow-sm",
|
|
2883
2905
|
e
|
|
2884
2906
|
),
|
|
2885
2907
|
...t
|
|
2886
2908
|
}
|
|
2887
2909
|
));
|
|
2888
|
-
|
|
2889
|
-
const
|
|
2890
|
-
|
|
2910
|
+
K.displayName = se.Trigger.displayName;
|
|
2911
|
+
const Q = _.forwardRef(({ className: e, ...t }, r) => /* @__PURE__ */ n(
|
|
2912
|
+
se.Content,
|
|
2891
2913
|
{
|
|
2892
2914
|
ref: r,
|
|
2893
|
-
className:
|
|
2915
|
+
className: E(
|
|
2894
2916
|
"richtext-mt-2 richtext-ring-offset-background focus-visible:richtext-outline-none focus-visible:richtext-ring-2 focus-visible:richtext-ring-ring focus-visible:richtext-ring-offset-1",
|
|
2895
2917
|
e
|
|
2896
2918
|
),
|
|
2897
2919
|
...t
|
|
2898
2920
|
}
|
|
2899
2921
|
));
|
|
2900
|
-
|
|
2901
|
-
const
|
|
2922
|
+
Q.displayName = se.Content.displayName;
|
|
2923
|
+
const Wn = _.forwardRef(
|
|
2924
|
+
({ className: e, ...t }, r) => /* @__PURE__ */ n(
|
|
2925
|
+
"textarea",
|
|
2926
|
+
{
|
|
2927
|
+
ref: r,
|
|
2928
|
+
className: E(
|
|
2929
|
+
"richtext-flex richtext-min-h-[80px] richtext-w-full richtext-rounded-md !richtext-border richtext-border-input richtext-bg-transparent richtext-px-3 richtext-py-2 richtext-text-sm richtext-ring-offset-background placeholder:richtext-text-muted-foreground focus-visible:richtext-outline-none focus-visible:richtext-ring-2 focus-visible:richtext-ring-ring focus-visible:richtext-ring-offset-1 disabled:richtext-cursor-not-allowed disabled:richtext-opacity-50",
|
|
2930
|
+
e
|
|
2931
|
+
),
|
|
2932
|
+
...t
|
|
2933
|
+
}
|
|
2934
|
+
)
|
|
2935
|
+
);
|
|
2936
|
+
Wn.displayName = "Textarea";
|
|
2937
|
+
const Gn = Je(
|
|
2902
2938
|
"richtext-inline-flex richtext-items-center richtext-justify-center richtext-rounded-md richtext-text-sm richtext-font-medium richtext-ring-offset-background richtext-transition-colors hover:richtext-bg-muted hover:richtext-text-muted-foreground focus-visible:richtext-outline-none focus-visible:richtext-ring-2 focus-visible:richtext-ring-ring focus-visible:richtext-ring-offset-1 disabled:richtext-pointer-events-none disabled:richtext-opacity-50 data-[state=on]:richtext-bg-accent data-[state=on]:richtext-text-accent-foreground",
|
|
2903
2939
|
{
|
|
2904
2940
|
variants: {
|
|
@@ -2917,52 +2953,160 @@ const Ln = Ue(
|
|
|
2917
2953
|
size: "default"
|
|
2918
2954
|
}
|
|
2919
2955
|
}
|
|
2920
|
-
),
|
|
2921
|
-
|
|
2956
|
+
), Vt = _.forwardRef(({ className: e, variant: t, size: r, ...i }, o) => /* @__PURE__ */ n(
|
|
2957
|
+
Nt.Root,
|
|
2922
2958
|
{
|
|
2923
2959
|
ref: o,
|
|
2924
|
-
className:
|
|
2960
|
+
className: E(Gn({ variant: t, size: r, className: e })),
|
|
2925
2961
|
...i
|
|
2926
2962
|
}
|
|
2927
2963
|
));
|
|
2928
|
-
|
|
2929
|
-
const
|
|
2930
|
-
|
|
2964
|
+
Vt.displayName = Nt.Root.displayName;
|
|
2965
|
+
const _a = Me.Provider, Xn = Me.Root, Yn = Me.Trigger, _t = _.forwardRef(({ className: e, sideOffset: t = 4, ...r }, i) => /* @__PURE__ */ n(
|
|
2966
|
+
Me.Content,
|
|
2931
2967
|
{
|
|
2932
2968
|
"data-richtext-portal": !0,
|
|
2933
2969
|
ref: i,
|
|
2934
2970
|
sideOffset: t,
|
|
2935
|
-
className:
|
|
2971
|
+
className: E(
|
|
2936
2972
|
"richtext-z-50 richtext-overflow-hidden richtext-rounded-md !richtext-border-none richtext-bg-primary richtext-px-3 richtext-py-1.5 richtext-text-sm richtext-text-primary-foreground richtext-shadow-md richtext-animate-in richtext-fade-in-0 richtext-zoom-in-95 data-[side=bottom]:richtext-slide-in-from-top-2 data-[side=left]:richtext-slide-in-from-right-2 data-[side=right]:richtext-slide-in-from-left-2 data-[side=top]:richtext-slide-in-from-bottom-2",
|
|
2937
2973
|
e
|
|
2938
2974
|
),
|
|
2939
2975
|
...r
|
|
2940
2976
|
}
|
|
2941
2977
|
));
|
|
2942
|
-
|
|
2943
|
-
const
|
|
2944
|
-
|
|
2945
|
-
|
|
2946
|
-
|
|
2978
|
+
_t.displayName = Me.Content.displayName;
|
|
2979
|
+
const Ha = D.Root, Da = D.Value, Zn = _.forwardRef(({ className: e, children: t, ...r }, i) => /* @__PURE__ */ y(
|
|
2980
|
+
D.Trigger,
|
|
2981
|
+
{
|
|
2982
|
+
ref: i,
|
|
2983
|
+
className: E(
|
|
2984
|
+
"richtext-flex richtext-h-10 richtext-w-full richtext-items-center richtext-justify-between richtext-rounded-md richtext-border richtext-border-input richtext-bg-background richtext-px-3 richtext-py-2 richtext-text-sm richtext-text-foreground richtext-ring-offset-background placeholder:richtext-text-muted-foreground focus:richtext-outline-none focus:richtext-ring-2 focus:richtext-ring-ring focus:richtext-ring-offset-1 disabled:richtext-cursor-not-allowed disabled:richtext-opacity-50 [&>span]:richtext-line-clamp-1",
|
|
2985
|
+
e
|
|
2986
|
+
),
|
|
2987
|
+
...r,
|
|
2988
|
+
children: [
|
|
2989
|
+
t,
|
|
2990
|
+
/* @__PURE__ */ n(D.Icon, { asChild: !0, children: /* @__PURE__ */ n(Ze, { className: "richtext-size-4 richtext-opacity-50" }) })
|
|
2991
|
+
]
|
|
2992
|
+
}
|
|
2993
|
+
));
|
|
2994
|
+
Zn.displayName = D.Trigger.displayName;
|
|
2995
|
+
const Ht = _.forwardRef(({ className: e, ...t }, r) => /* @__PURE__ */ n(
|
|
2996
|
+
D.ScrollUpButton,
|
|
2997
|
+
{
|
|
2998
|
+
ref: r,
|
|
2999
|
+
className: E(
|
|
3000
|
+
"richtext-flex richtext-cursor-default richtext-items-center richtext-justify-center richtext-py-1",
|
|
3001
|
+
e
|
|
3002
|
+
),
|
|
3003
|
+
...t,
|
|
3004
|
+
children: /* @__PURE__ */ n(kt, { className: "richtext-size-4" })
|
|
3005
|
+
}
|
|
3006
|
+
));
|
|
3007
|
+
Ht.displayName = D.ScrollUpButton.displayName;
|
|
3008
|
+
const Dt = _.forwardRef(({ className: e, ...t }, r) => /* @__PURE__ */ n(
|
|
3009
|
+
D.ScrollDownButton,
|
|
3010
|
+
{
|
|
3011
|
+
ref: r,
|
|
3012
|
+
className: E(
|
|
3013
|
+
"richtext-flex richtext-cursor-default richtext-items-center richtext-justify-center richtext-py-1",
|
|
3014
|
+
e
|
|
3015
|
+
),
|
|
3016
|
+
...t,
|
|
3017
|
+
children: /* @__PURE__ */ n(Ze, { className: "richtext-size-4" })
|
|
3018
|
+
}
|
|
3019
|
+
));
|
|
3020
|
+
Dt.displayName = D.ScrollDownButton.displayName;
|
|
3021
|
+
const qn = _.forwardRef(({ className: e, children: t, position: r = "popper", ...i }, o) => /* @__PURE__ */ n(D.Portal, { children: /* @__PURE__ */ y(
|
|
3022
|
+
D.Content,
|
|
3023
|
+
{
|
|
3024
|
+
"data-richtext-portal": !0,
|
|
3025
|
+
position: r,
|
|
3026
|
+
ref: o,
|
|
3027
|
+
className: E(
|
|
3028
|
+
"richtext-relative richtext-z-50 richtext-max-h-60 richtext-min-w-[8rem] richtext-overflow-hidden richtext-overflow-y-auto richtext-rounded-md richtext-border !richtext-border-border richtext-bg-popover richtext-text-popover-foreground richtext-shadow-md data-[state=open]:richtext-animate-in data-[state=closed]:richtext-animate-out data-[state=closed]:richtext-fade-out-0 data-[state=open]:richtext-fade-in-0 data-[state=closed]:richtext-zoom-out-95 data-[state=open]:richtext-zoom-in-95 data-[side=bottom]:richtext-slide-in-from-top-2 data-[side=left]:richtext-slide-in-from-right-2 data-[side=right]:richtext-slide-in-from-left-2 data-[side=top]:richtext-slide-in-from-bottom-2",
|
|
3029
|
+
r === "popper" && "data-[side=bottom]:richtext-translate-y-1 data-[side=left]:richtext--translate-x-1 data-[side=right]:richtext-translate-x-1 data-[side=top]:richtext--translate-y-1",
|
|
3030
|
+
e
|
|
3031
|
+
),
|
|
3032
|
+
...i,
|
|
3033
|
+
children: [
|
|
3034
|
+
/* @__PURE__ */ n(Ht, {}),
|
|
3035
|
+
/* @__PURE__ */ n(
|
|
3036
|
+
D.Viewport,
|
|
3037
|
+
{
|
|
3038
|
+
className: E(
|
|
3039
|
+
"richtext-p-1",
|
|
3040
|
+
r === "popper" && "richtext-h-[var(--radix-select-trigger-height)] richtext-w-full richtext-min-w-[var(--radix-select-trigger-width)]"
|
|
3041
|
+
),
|
|
3042
|
+
children: t
|
|
3043
|
+
}
|
|
3044
|
+
),
|
|
3045
|
+
/* @__PURE__ */ n(Dt, {})
|
|
3046
|
+
]
|
|
3047
|
+
}
|
|
3048
|
+
) }));
|
|
3049
|
+
qn.displayName = D.Content.displayName;
|
|
3050
|
+
const Jn = _.forwardRef(({ className: e, ...t }, r) => /* @__PURE__ */ n(
|
|
3051
|
+
D.Label,
|
|
3052
|
+
{
|
|
3053
|
+
className: E(
|
|
3054
|
+
"richtext-py-1.5 richtext-pl-8 richtext-pr-2 richtext-text-sm richtext-font-semibold",
|
|
3055
|
+
e
|
|
3056
|
+
),
|
|
3057
|
+
ref: r,
|
|
3058
|
+
...t
|
|
3059
|
+
}
|
|
3060
|
+
));
|
|
3061
|
+
Jn.displayName = D.Label.displayName;
|
|
3062
|
+
const Kn = _.forwardRef(({ className: e, children: t, ...r }, i) => /* @__PURE__ */ y(
|
|
3063
|
+
D.Item,
|
|
3064
|
+
{
|
|
3065
|
+
ref: i,
|
|
3066
|
+
className: E(
|
|
3067
|
+
"richtext-relative richtext-flex richtext-w-full richtext-cursor-default richtext-select-none richtext-items-center richtext-rounded-sm richtext-py-1.5 richtext-pl-8 richtext-pr-2 richtext-text-sm richtext-outline-none focus:richtext-bg-accent focus:richtext-text-accent-foreground data-[disabled]:richtext-pointer-events-none data-[disabled]:richtext-opacity-50",
|
|
3068
|
+
e
|
|
3069
|
+
),
|
|
3070
|
+
...r,
|
|
3071
|
+
children: [
|
|
3072
|
+
/* @__PURE__ */ n("span", { className: "richtext-absolute richtext-left-2 richtext-flex richtext-size-3.5 richtext-items-center richtext-justify-center", children: /* @__PURE__ */ n(D.ItemIndicator, { children: /* @__PURE__ */ n(Mt, { className: "richtext-size-4" }) }) }),
|
|
3073
|
+
/* @__PURE__ */ n(D.ItemText, { children: t })
|
|
3074
|
+
]
|
|
3075
|
+
}
|
|
3076
|
+
));
|
|
3077
|
+
Kn.displayName = D.Item.displayName;
|
|
3078
|
+
const Qn = _.forwardRef(({ className: e, ...t }, r) => /* @__PURE__ */ n(
|
|
3079
|
+
D.Separator,
|
|
3080
|
+
{
|
|
3081
|
+
className: E("richtext--mx-1 richtext-my-1 richtext-h-px richtext-bg-muted", e),
|
|
3082
|
+
ref: r,
|
|
3083
|
+
...t
|
|
3084
|
+
}
|
|
3085
|
+
));
|
|
3086
|
+
Qn.displayName = D.Separator.displayName;
|
|
3087
|
+
const eo = 1, to = 1e6;
|
|
3088
|
+
let Be = 0;
|
|
3089
|
+
function ro() {
|
|
3090
|
+
return Be = (Be + 1) % Number.MAX_SAFE_INTEGER, Be.toString();
|
|
2947
3091
|
}
|
|
2948
|
-
const
|
|
2949
|
-
function
|
|
2950
|
-
if (
|
|
3092
|
+
const Ue = /* @__PURE__ */ new Map();
|
|
3093
|
+
function mt(e) {
|
|
3094
|
+
if (Ue.has(e))
|
|
2951
3095
|
return;
|
|
2952
3096
|
const t = setTimeout(() => {
|
|
2953
|
-
|
|
3097
|
+
Ue.delete(e), ye({
|
|
2954
3098
|
type: "REMOVE_TOAST",
|
|
2955
3099
|
toastId: e
|
|
2956
3100
|
});
|
|
2957
|
-
},
|
|
2958
|
-
|
|
3101
|
+
}, to);
|
|
3102
|
+
Ue.set(e, t);
|
|
2959
3103
|
}
|
|
2960
|
-
function
|
|
3104
|
+
function io(e, t) {
|
|
2961
3105
|
switch (t.type) {
|
|
2962
3106
|
case "ADD_TOAST":
|
|
2963
3107
|
return {
|
|
2964
3108
|
...e,
|
|
2965
|
-
toasts: [t.toast, ...e.toasts].slice(0,
|
|
3109
|
+
toasts: [t.toast, ...e.toasts].slice(0, eo)
|
|
2966
3110
|
};
|
|
2967
3111
|
case "UPDATE_TOAST":
|
|
2968
3112
|
return {
|
|
@@ -2971,8 +3115,8 @@ function Dn(e, t) {
|
|
|
2971
3115
|
};
|
|
2972
3116
|
case "DISMISS_TOAST": {
|
|
2973
3117
|
const { toastId: r } = t;
|
|
2974
|
-
return r ?
|
|
2975
|
-
|
|
3118
|
+
return r ? mt(r) : e.toasts.forEach((i) => {
|
|
3119
|
+
mt(i.id);
|
|
2976
3120
|
}), {
|
|
2977
3121
|
...e,
|
|
2978
3122
|
toasts: e.toasts.map(
|
|
@@ -2993,19 +3137,19 @@ function Dn(e, t) {
|
|
|
2993
3137
|
};
|
|
2994
3138
|
}
|
|
2995
3139
|
}
|
|
2996
|
-
const
|
|
2997
|
-
let
|
|
2998
|
-
function
|
|
2999
|
-
|
|
3000
|
-
t(
|
|
3140
|
+
const Se = [];
|
|
3141
|
+
let ze = { toasts: [] };
|
|
3142
|
+
function ye(e) {
|
|
3143
|
+
ze = io(ze, e), Se.forEach((t) => {
|
|
3144
|
+
t(ze);
|
|
3001
3145
|
});
|
|
3002
3146
|
}
|
|
3003
|
-
function
|
|
3004
|
-
const t =
|
|
3147
|
+
function no({ ...e }) {
|
|
3148
|
+
const t = ro(), r = (o) => ye({
|
|
3005
3149
|
type: "UPDATE_TOAST",
|
|
3006
3150
|
toast: { ...o, id: t }
|
|
3007
|
-
}), i = () =>
|
|
3008
|
-
return
|
|
3151
|
+
}), i = () => ye({ type: "DISMISS_TOAST", toastId: t });
|
|
3152
|
+
return ye({
|
|
3009
3153
|
type: "ADD_TOAST",
|
|
3010
3154
|
toast: {
|
|
3011
3155
|
...e,
|
|
@@ -3021,39 +3165,39 @@ function jn({ ...e }) {
|
|
|
3021
3165
|
update: r
|
|
3022
3166
|
};
|
|
3023
3167
|
}
|
|
3024
|
-
function
|
|
3025
|
-
const [e, t] =
|
|
3026
|
-
return
|
|
3027
|
-
const r =
|
|
3028
|
-
r > -1 &&
|
|
3168
|
+
function Ke() {
|
|
3169
|
+
const [e, t] = _.useState(ze);
|
|
3170
|
+
return _.useEffect(() => (Se.push(t), () => {
|
|
3171
|
+
const r = Se.indexOf(t);
|
|
3172
|
+
r > -1 && Se.splice(r, 1);
|
|
3029
3173
|
}), [e]), {
|
|
3030
3174
|
...e,
|
|
3031
|
-
toast:
|
|
3032
|
-
dismiss: (r) =>
|
|
3175
|
+
toast: no,
|
|
3176
|
+
dismiss: (r) => ye({ type: "DISMISS_TOAST", toastId: r })
|
|
3033
3177
|
};
|
|
3034
3178
|
}
|
|
3035
|
-
const
|
|
3036
|
-
|
|
3179
|
+
const Qe = _.forwardRef(({ className: e, ...t }, r) => /* @__PURE__ */ n(
|
|
3180
|
+
Fe.Root,
|
|
3037
3181
|
{
|
|
3038
3182
|
ref: r,
|
|
3039
|
-
className:
|
|
3183
|
+
className: E(
|
|
3040
3184
|
"!richtext-peer !richtext-h-4 !richtext-w-4 !richtext-shrink-0 !richtext-rounded-sm !richtext-border !richtext-border-primary !richtext-p-0 !richtext-ring-offset-background focus-visible:!richtext-outline-none focus-visible:!richtext-ring-2 focus-visible:!richtext-ring-ring focus-visible:!richtext-ring-offset-1 disabled:!richtext-cursor-not-allowed disabled:!richtext-opacity-50 data-[state=checked]:!richtext-bg-primary data-[state=checked]:!richtext-text-primary-foreground",
|
|
3041
3185
|
e
|
|
3042
3186
|
),
|
|
3043
3187
|
...t,
|
|
3044
3188
|
children: /* @__PURE__ */ n(
|
|
3045
|
-
|
|
3189
|
+
Fe.Indicator,
|
|
3046
3190
|
{
|
|
3047
|
-
className:
|
|
3191
|
+
className: E(
|
|
3048
3192
|
"!richtext-flex !richtext-items-center !richtext-justify-center !richtext-p-0 !richtext-text-current"
|
|
3049
3193
|
),
|
|
3050
|
-
children: /* @__PURE__ */ n(
|
|
3194
|
+
children: /* @__PURE__ */ n(Mt, { className: "!richtext-h-4 !richtext-w-4" })
|
|
3051
3195
|
}
|
|
3052
3196
|
)
|
|
3053
3197
|
}
|
|
3054
3198
|
));
|
|
3055
|
-
|
|
3056
|
-
function
|
|
3199
|
+
Qe.displayName = Fe.Root.displayName;
|
|
3200
|
+
function oo(e) {
|
|
3057
3201
|
return e = e || /* @__PURE__ */ new Map(), {
|
|
3058
3202
|
/**
|
|
3059
3203
|
* A Map of event names to registered handler functions.
|
|
@@ -3100,57 +3244,57 @@ function Pn(e) {
|
|
|
3100
3244
|
}
|
|
3101
3245
|
};
|
|
3102
3246
|
}
|
|
3103
|
-
const
|
|
3104
|
-
function
|
|
3105
|
-
const r =
|
|
3106
|
-
|
|
3247
|
+
const et = oo(), jt = ie.createContext(et), ao = () => ie.useContext(jt);
|
|
3248
|
+
function tt(e, t) {
|
|
3249
|
+
const r = ao();
|
|
3250
|
+
ie.useEffect(() => (t.map((i) => r.on(i, e)), () => {
|
|
3107
3251
|
t.map((i) => r.off(i, e));
|
|
3108
3252
|
}), [r, t, e]);
|
|
3109
3253
|
}
|
|
3110
|
-
const
|
|
3111
|
-
function
|
|
3112
|
-
return /* @__PURE__ */ n(
|
|
3254
|
+
const so = et.emit;
|
|
3255
|
+
function ja({ children: e }) {
|
|
3256
|
+
return /* @__PURE__ */ n(jt.Provider, { value: et, children: e });
|
|
3113
3257
|
}
|
|
3114
|
-
const
|
|
3115
|
-
|
|
3258
|
+
const ge = Z.Root, rt = Z.Trigger, lo = Z.Portal, Pt = _.forwardRef(({ className: e, ...t }, r) => /* @__PURE__ */ n(
|
|
3259
|
+
Z.Overlay,
|
|
3116
3260
|
{
|
|
3117
3261
|
ref: r,
|
|
3118
|
-
className:
|
|
3262
|
+
className: E(
|
|
3119
3263
|
"richtext-fixed richtext-inset-0 richtext-z-50 richtext-bg-black/80 data-[state=open]:richtext-animate-in data-[state=closed]:richtext-animate-out data-[state=closed]:richtext-fade-out-0 data-[state=open]:richtext-fade-in-0",
|
|
3120
3264
|
e
|
|
3121
3265
|
),
|
|
3122
3266
|
...t
|
|
3123
3267
|
}
|
|
3124
3268
|
));
|
|
3125
|
-
|
|
3126
|
-
const
|
|
3127
|
-
/* @__PURE__ */ n(
|
|
3128
|
-
/* @__PURE__ */
|
|
3129
|
-
|
|
3269
|
+
Pt.displayName = Z.Overlay.displayName;
|
|
3270
|
+
const le = _.forwardRef(({ className: e, children: t, ...r }, i) => /* @__PURE__ */ y(lo, { "data-richtext-portal": !0, children: [
|
|
3271
|
+
/* @__PURE__ */ n(Pt, {}),
|
|
3272
|
+
/* @__PURE__ */ y(
|
|
3273
|
+
Z.Content,
|
|
3130
3274
|
{
|
|
3131
3275
|
"data-richtext-portal": !0,
|
|
3132
3276
|
ref: i,
|
|
3133
|
-
className:
|
|
3277
|
+
className: E(
|
|
3134
3278
|
"richtext-fixed richtext-left-[50%] richtext-top-[50%] richtext-z-50 richtext-grid richtext-w-full richtext-max-w-lg richtext-translate-x-[-50%] richtext-translate-y-[-50%] richtext-gap-4 richtext-border !richtext-border-border richtext-bg-background richtext-p-6 richtext-shadow-lg richtext-duration-200 data-[state=open]:richtext-animate-in data-[state=closed]:richtext-animate-out data-[state=closed]:richtext-fade-out-0 data-[state=open]:richtext-fade-in-0 data-[state=closed]:richtext-zoom-out-95 data-[state=open]:richtext-zoom-in-95 data-[state=closed]:richtext-slide-out-to-left-1/2 data-[state=closed]:richtext-slide-out-to-top-[48%] data-[state=open]:richtext-slide-in-from-left-1/2 data-[state=open]:richtext-slide-in-from-top-[48%] sm:richtext-rounded-lg",
|
|
3135
3279
|
e
|
|
3136
3280
|
),
|
|
3137
3281
|
...r,
|
|
3138
3282
|
children: [
|
|
3139
3283
|
t,
|
|
3140
|
-
/* @__PURE__ */
|
|
3141
|
-
/* @__PURE__ */ n(
|
|
3284
|
+
/* @__PURE__ */ y(Z.Close, { className: "richtext-absolute richtext-right-4 richtext-top-4 richtext-rounded-sm richtext-opacity-70 richtext-ring-offset-background richtext-transition-opacity hover:richtext-opacity-100 focus:richtext-outline-none focus:richtext-ring-2 focus:richtext-ring-ring focus:richtext-ring-offset-1 disabled:richtext-pointer-events-none data-[state=open]:richtext-bg-accent data-[state=open]:richtext-text-muted-foreground", children: [
|
|
3285
|
+
/* @__PURE__ */ n(Ct, { className: "richtext-size-4 richtext-text-accent-foreground" }),
|
|
3142
3286
|
/* @__PURE__ */ n("span", { className: "richtext-sr-only richtext-text-accent-foreground", children: "Close" })
|
|
3143
3287
|
] })
|
|
3144
3288
|
]
|
|
3145
3289
|
}
|
|
3146
3290
|
)
|
|
3147
3291
|
] }));
|
|
3148
|
-
|
|
3149
|
-
function
|
|
3292
|
+
le.displayName = Z.Content.displayName;
|
|
3293
|
+
function co({ className: e, ...t }) {
|
|
3150
3294
|
return /* @__PURE__ */ n(
|
|
3151
3295
|
"div",
|
|
3152
3296
|
{
|
|
3153
|
-
className:
|
|
3297
|
+
className: E(
|
|
3154
3298
|
"richtext-flex richtext-flex-col richtext-space-y-1.5 richtext-text-center sm:richtext-text-left",
|
|
3155
3299
|
e
|
|
3156
3300
|
),
|
|
@@ -3158,12 +3302,12 @@ function Un({ className: e, ...t }) {
|
|
|
3158
3302
|
}
|
|
3159
3303
|
);
|
|
3160
3304
|
}
|
|
3161
|
-
|
|
3162
|
-
function
|
|
3305
|
+
co.displayName = "DialogHeader";
|
|
3306
|
+
function Ot({ className: e, ...t }) {
|
|
3163
3307
|
return /* @__PURE__ */ n(
|
|
3164
3308
|
"div",
|
|
3165
3309
|
{
|
|
3166
|
-
className:
|
|
3310
|
+
className: E(
|
|
3167
3311
|
"richtext-flex richtext-flex-col-reverse sm:richtext-flex-row sm:richtext-justify-end sm:richtext-space-x-2",
|
|
3168
3312
|
e
|
|
3169
3313
|
),
|
|
@@ -3171,29 +3315,554 @@ function zt({ className: e, ...t }) {
|
|
|
3171
3315
|
}
|
|
3172
3316
|
);
|
|
3173
3317
|
}
|
|
3174
|
-
|
|
3175
|
-
const
|
|
3176
|
-
|
|
3318
|
+
Ot.displayName = "DialogFooter";
|
|
3319
|
+
const ce = _.forwardRef(({ className: e, ...t }, r) => /* @__PURE__ */ n(
|
|
3320
|
+
Z.Title,
|
|
3177
3321
|
{
|
|
3178
3322
|
ref: r,
|
|
3179
|
-
className:
|
|
3323
|
+
className: E(
|
|
3180
3324
|
"richtext-text-lg richtext-font-semibold richtext-leading-none richtext-tracking-tight richtext-text-foreground",
|
|
3181
3325
|
e
|
|
3182
3326
|
),
|
|
3183
3327
|
...t
|
|
3184
3328
|
}
|
|
3185
3329
|
));
|
|
3186
|
-
|
|
3187
|
-
const
|
|
3188
|
-
|
|
3330
|
+
ce.displayName = Z.Title.displayName;
|
|
3331
|
+
const uo = _.forwardRef(({ className: e, ...t }, r) => /* @__PURE__ */ n(
|
|
3332
|
+
Z.Description,
|
|
3189
3333
|
{
|
|
3190
|
-
className:
|
|
3334
|
+
className: E("richtext-text-sm richtext-text-muted-foreground", e),
|
|
3191
3335
|
ref: r,
|
|
3192
3336
|
...t
|
|
3193
3337
|
}
|
|
3194
3338
|
));
|
|
3195
|
-
|
|
3196
|
-
|
|
3339
|
+
uo.displayName = Z.Description.displayName;
|
|
3340
|
+
const ho = {
|
|
3341
|
+
audio: '<svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="lucide lucide-audio-lines"><path d="M2 10v3"/><path d="M6 6v11"/><path d="M10 3v18"/><path d="M14 8v7"/><path d="M18 5v13"/><path d="M22 10v3"/></svg>',
|
|
3342
|
+
video: '<svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="lucide lucide-video"><path d="m16 13 5.223 3.482a.5.5 0 0 0 .777-.416V7.87a.5.5 0 0 0-.752-.432L16 10.5"/><rect x="2" y="6" width="14" height="12" rx="2"/></svg>',
|
|
3343
|
+
file: '<svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="lucide lucide-file"><path d="M15 2H6a2 2 0 0 0-2 2v16a2 2 0 0 0 2 2h12a2 2 0 0 0 2-2V7Z"/><path d="M14 2v4a2 2 0 0 0 2 2h4"/></svg>',
|
|
3344
|
+
image: '<svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="lucide lucide-image"><rect width="18" height="18" x="3" y="3" rx="2" ry="2"/><circle cx="9" cy="9" r="2"/><path d="m21 15-3.086-3.086a2 2 0 0 0-2.828 0L6 21"/></svg>',
|
|
3345
|
+
pdf: `<svg xmlns="http://www.w3.org/2000/svg" width="1em" height="1em" viewBox="0 0 32 32">
|
|
3346
|
+
<path fill="currentColor" d="M30 18v-2h-6v10h2v-4h3v-2h-3v-2zm-11 8h-4V16h4a3.003 3.003 0 0 1 3 3v4a3.003 3.003 0 0 1-3 3m-2-2h2a1 1 0 0 0 1-1v-4a1 1 0 0 0-1-1h-2zm-6-8H6v10h2v-3h3a2.003 2.003 0 0 0 2-2v-3a2 2 0 0 0-2-2m-3 5v-3h3l.001 3z"></path>
|
|
3347
|
+
<path fill="currentColor" d="M22 14v-4a.91.91 0 0 0-.3-.7l-7-7A.9.9 0 0 0 14 2H4a2.006 2.006 0 0 0-2 2v24a2 2 0 0 0 2 2h16v-2H4V4h8v6a2.006 2.006 0 0 0 2 2h6v2Zm-8-4V4.4l5.6 5.6Z"></path>
|
|
3348
|
+
</svg>`,
|
|
3349
|
+
word: `<svg
|
|
3350
|
+
xmlns="http://www.w3.org/2000/svg"
|
|
3351
|
+
width="1em"
|
|
3352
|
+
height="1em"
|
|
3353
|
+
className="icon"
|
|
3354
|
+
viewBox="0 0 1024 1024"
|
|
3355
|
+
>
|
|
3356
|
+
<path
|
|
3357
|
+
fill="currentColor"
|
|
3358
|
+
d="M679.253 402.364 618.77 561.015l-60.348-158.651a30.04 30.04 0 0 0-30.447-18.637 29.76 29.76 0 0 0-30.447 18.637l-60.416 158.651-60.416-158.651a30.515 30.515 0 0 0-38.843-17.272 28.945 28.945 0 0 0-17.954 37.547l88.815 233.267c4.369 11.469 15.7 19.115 28.398 19.115a30.31 30.31 0 0 0 28.468-19.115l62.395-163.908 62.396 163.84c4.437 11.605 15.701 19.183 28.4 19.183a30.31 30.31 0 0 0 28.466-19.115l88.747-233.267a28.945 28.945 0 0 0-17.886-37.547 30.447 30.447 0 0 0-38.912 17.272zm219.478 395.605-51.883-29.218c-28.672-16.18-52.224-3.072-52.224 29.082v.273H643.209a29.833 29.833 0 0 0-30.31 29.354c0 16.18 13.584 29.218 30.31 29.218h151.825c1.092 30.516 24.03 43.077 52.224 27.648l51.063-27.989c29.013-15.906 29.15-42.189.41-58.368"
|
|
3359
|
+
/>
|
|
3360
|
+
<path
|
|
3361
|
+
fill="currentColor"
|
|
3362
|
+
d="m810.667 913.135-.478.068H201.796c-19.865 0-36.727-11.673-36.727-25.6v-618.36h154.965c51.268 0 92.911-39.39 92.911-87.858v-87.86H810.19c19.797 0 36.522 11.742 36.522 25.669V739.26h61.987V119.262c0-46.421-44.169-84.241-98.51-84.241H328.364l-225.28 194.56v658.09c0 46.285 44.236 84.105 98.713 84.105H810.19c43.759 0 80.554-24.713 93.32-58.573h-92.842zM350.89 94.89v86.562c0 16.11-13.858 29.286-30.925 29.286H216.815L350.959 94.891z"
|
|
3363
|
+
/>
|
|
3364
|
+
</svg>`,
|
|
3365
|
+
excel: '<svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="lucide lucide-sheet"><rect width="18" height="18" x="3" y="3" rx="2" ry="2"/><line x1="3" x2="21" y1="9" y2="9"/><line x1="3" x2="21" y1="15" y2="15"/><line x1="9" x2="9" y1="9" y2="21"/><line x1="15" x2="15" y1="9" y2="21"/></svg>',
|
|
3366
|
+
ppt: '<svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="lucide lucide-table-properties"><path d="M15 3v18"/><rect width="18" height="18" x="3" y="3" rx="2"/><path d="M21 9H3"/><path d="M21 15H3"/></svg>'
|
|
3367
|
+
};
|
|
3368
|
+
function fo(e) {
|
|
3369
|
+
return e.replace(/^.*\/|\..+$/g, "");
|
|
3370
|
+
}
|
|
3371
|
+
function mo(e) {
|
|
3372
|
+
return e.split(".").pop();
|
|
3373
|
+
}
|
|
3374
|
+
function Bt(e) {
|
|
3375
|
+
return e < 1024 ? `${e} Byte` : e < 1024 * 1024 ? `${(e / 1024).toFixed(2)} KB` : `${(e / 1024 / 1024).toFixed(2)} MB`;
|
|
3376
|
+
}
|
|
3377
|
+
function po(e) {
|
|
3378
|
+
return e ? e === "application/pdf" ? "pdf" : e.startsWith("application/") && [".document", "word"].some((t) => e.includes(t)) ? "word" : e.startsWith("application/") && ["presentation"].some((t) => e.includes(t)) ? "excel" : e.startsWith("application/") && ["sheet"].some((t) => e.includes(t)) ? "ppt" : e.startsWith("image") ? "image" : e.startsWith("audio") ? "audio" : e.startsWith("video") ? "video" : "file" : "file";
|
|
3379
|
+
}
|
|
3380
|
+
function go(e) {
|
|
3381
|
+
return new Promise((t) => {
|
|
3382
|
+
const r = new FileReader();
|
|
3383
|
+
r.addEventListener(
|
|
3384
|
+
"load",
|
|
3385
|
+
() => {
|
|
3386
|
+
t({
|
|
3387
|
+
alt: e.name,
|
|
3388
|
+
src: r.result
|
|
3389
|
+
});
|
|
3390
|
+
},
|
|
3391
|
+
!1
|
|
3392
|
+
), r.readAsDataURL(e);
|
|
3393
|
+
});
|
|
3394
|
+
}
|
|
3395
|
+
function xo(e, t) {
|
|
3396
|
+
const r = e.split(","), i = r[0].match(/:(.*?);/)[1], o = atob(r[r.length - 1]);
|
|
3397
|
+
let a = o.length;
|
|
3398
|
+
const l = new Uint8Array(a);
|
|
3399
|
+
for (; a--; )
|
|
3400
|
+
l[a] = o.charCodeAt(a);
|
|
3401
|
+
return new File([l], t, { type: i });
|
|
3402
|
+
}
|
|
3403
|
+
function bo(e) {
|
|
3404
|
+
const t = ho[e], o = new DOMParser().parseFromString(t, "image/svg+xml").documentElement, a = [
|
|
3405
|
+
"svg",
|
|
3406
|
+
{
|
|
3407
|
+
...Array.from(o.attributes).reduce((l, s) => (l[s.name] = s.value, l), {})
|
|
3408
|
+
}
|
|
3409
|
+
];
|
|
3410
|
+
return Array.from(o.childNodes).forEach((l) => {
|
|
3411
|
+
if (l.nodeType === 1) {
|
|
3412
|
+
const s = [
|
|
3413
|
+
l.tagName.toLowerCase(),
|
|
3414
|
+
Array.from(l.attributes).reduce((c, d) => (c[d.name] = d.value, c), {})
|
|
3415
|
+
];
|
|
3416
|
+
l.textContent && s.push(l.textContent), a.push(s);
|
|
3417
|
+
}
|
|
3418
|
+
}), a;
|
|
3419
|
+
}
|
|
3420
|
+
const vo = {
|
|
3421
|
+
audio: /* @__PURE__ */ n(Li, {}),
|
|
3422
|
+
video: /* @__PURE__ */ n(Ai, {}),
|
|
3423
|
+
file: /* @__PURE__ */ n(Ii, {}),
|
|
3424
|
+
image: /* @__PURE__ */ n(zi, {}),
|
|
3425
|
+
pdf: /* @__PURE__ */ n(Lt, {}),
|
|
3426
|
+
word: /* @__PURE__ */ n(Et, {}),
|
|
3427
|
+
excel: /* @__PURE__ */ n(Si, {}),
|
|
3428
|
+
ppt: /* @__PURE__ */ n(Ti, {})
|
|
3429
|
+
};
|
|
3430
|
+
function Ut(e, t = !1) {
|
|
3431
|
+
const r = po(e), i = vo[r] || /* @__PURE__ */ n(q, {});
|
|
3432
|
+
return t ? bo(r) : i;
|
|
3433
|
+
}
|
|
3434
|
+
const wo = "_card_1is0r_64", yo = "_downloadBtn_1is0r_82", Co = "_cardLeft_1is0r_88", ko = "_iconWrap_1is0r_97", Mo = "_fileInfo_1is0r_116", No = "_fileName_1is0r_123", To = "_fileSize_1is0r_133", So = "_cardPreview_1is0r_145", zo = "_actions_1is0r_221", Io = "_cardError_1is0r_236", Ao = "_errorText_1is0r_240", Y = {
|
|
3435
|
+
card: wo,
|
|
3436
|
+
downloadBtn: yo,
|
|
3437
|
+
cardLeft: Co,
|
|
3438
|
+
iconWrap: ko,
|
|
3439
|
+
fileInfo: Mo,
|
|
3440
|
+
fileName: No,
|
|
3441
|
+
fileSize: To,
|
|
3442
|
+
cardPreview: So,
|
|
3443
|
+
actions: zo,
|
|
3444
|
+
cardError: Io,
|
|
3445
|
+
errorText: Ao
|
|
3446
|
+
};
|
|
3447
|
+
function Lo({
|
|
3448
|
+
editor: e,
|
|
3449
|
+
node: t,
|
|
3450
|
+
deleteNode: r,
|
|
3451
|
+
extension: i
|
|
3452
|
+
}) {
|
|
3453
|
+
var k;
|
|
3454
|
+
const o = (e == null ? void 0 : e.isEditable) ?? !1, { fileName: a, fileSize: l, fileExt: s, fileType: c, id: d, error: f } = t.attrs, { t: g } = ne(), u = (k = i == null ? void 0 : i.options) == null ? void 0 : k.onDownload, v = oe(() => r(), [r]), p = oe(() => {
|
|
3455
|
+
!d || !u || u({ id: d, fileName: a, fileExt: s, fileType: c, fileSize: l });
|
|
3456
|
+
}, [d, a, s, c, l, u]);
|
|
3457
|
+
return f && f !== "null" ? /* @__PURE__ */ n(Le, { children: /* @__PURE__ */ n("div", { className: Ae(Y.card, Y.cardError, "render-wrapper"), children: /* @__PURE__ */ n("p", { className: Y.errorText, children: f }) }) }) : d ? /* @__PURE__ */ n(Le, { children: /* @__PURE__ */ y(
|
|
3458
|
+
"div",
|
|
3459
|
+
{
|
|
3460
|
+
className: Ae(Y.card, "render-wrapper", {
|
|
3461
|
+
[Y.cardPreview]: !o
|
|
3462
|
+
}),
|
|
3463
|
+
children: [
|
|
3464
|
+
/* @__PURE__ */ y("div", { className: Y.cardLeft, children: [
|
|
3465
|
+
/* @__PURE__ */ n("div", { className: Y.iconWrap, children: Ut(c) }),
|
|
3466
|
+
/* @__PURE__ */ y("div", { className: Y.fileInfo, children: [
|
|
3467
|
+
/* @__PURE__ */ y("span", { className: Y.fileName, children: [
|
|
3468
|
+
a,
|
|
3469
|
+
".",
|
|
3470
|
+
s
|
|
3471
|
+
] }),
|
|
3472
|
+
/* @__PURE__ */ n("span", { className: Y.fileSize, children: Bt(l) })
|
|
3473
|
+
] })
|
|
3474
|
+
] }),
|
|
3475
|
+
/* @__PURE__ */ y("div", { className: Y.actions, children: [
|
|
3476
|
+
u && /* @__PURE__ */ n(
|
|
3477
|
+
fe,
|
|
3478
|
+
{
|
|
3479
|
+
action: p,
|
|
3480
|
+
icon: "AttachmentDownload",
|
|
3481
|
+
tooltip: g("editor.attachment.download"),
|
|
3482
|
+
customClass: o ? void 0 : Y.downloadBtn
|
|
3483
|
+
}
|
|
3484
|
+
),
|
|
3485
|
+
o && /* @__PURE__ */ n(
|
|
3486
|
+
fe,
|
|
3487
|
+
{
|
|
3488
|
+
action: v,
|
|
3489
|
+
icon: "Trash2",
|
|
3490
|
+
tooltip: g("editor.delete")
|
|
3491
|
+
}
|
|
3492
|
+
)
|
|
3493
|
+
] })
|
|
3494
|
+
]
|
|
3495
|
+
}
|
|
3496
|
+
) }) : /* @__PURE__ */ n(q, {});
|
|
3497
|
+
}
|
|
3498
|
+
function Eo(e) {
|
|
3499
|
+
try {
|
|
3500
|
+
return JSON.stringify(e);
|
|
3501
|
+
} catch {
|
|
3502
|
+
return JSON.stringify({});
|
|
3503
|
+
}
|
|
3504
|
+
}
|
|
3505
|
+
function ue(e, t = !1) {
|
|
3506
|
+
return (r) => {
|
|
3507
|
+
const i = e.startsWith("data-") ? e : `data-${e}`;
|
|
3508
|
+
let o = decodeURIComponent(r.getAttribute(i));
|
|
3509
|
+
if (o == null || typeof o == "string" && o === "null")
|
|
3510
|
+
try {
|
|
3511
|
+
const s = r.outerHTML.match(/([\S\s])+?="([\S\s])+?"/g);
|
|
3512
|
+
s && s.length > 0 && (o = (s.map((d) => d.trim()).reduce((d, f) => {
|
|
3513
|
+
const g = f.indexOf("="), u = [f.slice(0, g), f.slice(g + 1).slice(1, -1)];
|
|
3514
|
+
return d[u[0]] = u[1], d;
|
|
3515
|
+
}, {})[e.toLowerCase()] || "").replaceAll(""", '"'));
|
|
3516
|
+
} catch (l) {
|
|
3517
|
+
console.error("Error getDatasetAttribute ", l.message, r);
|
|
3518
|
+
}
|
|
3519
|
+
if (t)
|
|
3520
|
+
try {
|
|
3521
|
+
return JSON.parse(o);
|
|
3522
|
+
} catch {
|
|
3523
|
+
return {};
|
|
3524
|
+
}
|
|
3525
|
+
if (o.includes("%") || o.includes("auto"))
|
|
3526
|
+
return o;
|
|
3527
|
+
const a = Number.parseInt(o);
|
|
3528
|
+
return a !== a ? o : a;
|
|
3529
|
+
};
|
|
3530
|
+
}
|
|
3531
|
+
function Pa(e) {
|
|
3532
|
+
const { attrs: t } = e;
|
|
3533
|
+
return Object.keys(t).reduce((r, i) => {
|
|
3534
|
+
const o = t[i];
|
|
3535
|
+
if (o == null)
|
|
3536
|
+
return r;
|
|
3537
|
+
let a = "";
|
|
3538
|
+
return typeof o == "object" ? a = Eo(o) : a = o, r[i] = a, r;
|
|
3539
|
+
}, /* @__PURE__ */ Object.create(null));
|
|
3540
|
+
}
|
|
3541
|
+
const He = {
|
|
3542
|
+
UPLOAD_IMAGE: (e) => `UPLOAD_IMAGE-${e}`,
|
|
3543
|
+
UPLOAD_VIDEO: (e) => `UPLOAD_VIDEO-${e}`,
|
|
3544
|
+
UPLOAD_ATTACHMENT: (e) => `UPLOAD_ATTACHMENT-${e}`,
|
|
3545
|
+
EXCALIDRAW: (e) => `EXCALIDRAW-${e}`
|
|
3546
|
+
};
|
|
3547
|
+
function Ro(e) {
|
|
3548
|
+
const { editor: t } = ir(), r = _.useMemo(
|
|
3549
|
+
() => t,
|
|
3550
|
+
[e, t]
|
|
3551
|
+
);
|
|
3552
|
+
return nr({
|
|
3553
|
+
editor: r,
|
|
3554
|
+
selector(o) {
|
|
3555
|
+
return o.editor ? {
|
|
3556
|
+
editor: o.editor,
|
|
3557
|
+
editorState: o.editor.state,
|
|
3558
|
+
canCommand: o.editor.can
|
|
3559
|
+
} : {
|
|
3560
|
+
editor: null,
|
|
3561
|
+
editorState: void 0,
|
|
3562
|
+
canCommand: void 0
|
|
3563
|
+
};
|
|
3564
|
+
}
|
|
3565
|
+
}) || { editor: null };
|
|
3566
|
+
}
|
|
3567
|
+
function ee() {
|
|
3568
|
+
return Ro().editor;
|
|
3569
|
+
}
|
|
3570
|
+
const $t = er(!1);
|
|
3571
|
+
function Ft() {
|
|
3572
|
+
return tr($t);
|
|
3573
|
+
}
|
|
3574
|
+
function Oa() {
|
|
3575
|
+
return rr($t);
|
|
3576
|
+
}
|
|
3577
|
+
const Wt = () => !1;
|
|
3578
|
+
function Ba(e = Wt) {
|
|
3579
|
+
const t = Ft(), [r, i] = I(() => {
|
|
3580
|
+
const s = e();
|
|
3581
|
+
return typeof s == "boolean" ? !s : s;
|
|
3582
|
+
}), o = ee();
|
|
3583
|
+
Ie(() => {
|
|
3584
|
+
if (!o || !e) return;
|
|
3585
|
+
const s = () => {
|
|
3586
|
+
const c = e();
|
|
3587
|
+
i(typeof c == "boolean" ? !c : c);
|
|
3588
|
+
};
|
|
3589
|
+
return s(), o.on("selectionUpdate", s), o.on("transaction", s), () => {
|
|
3590
|
+
o.off("selectionUpdate", s), o.off("transaction", s);
|
|
3591
|
+
};
|
|
3592
|
+
}, [o, e]);
|
|
3593
|
+
const a = F(() => !t || !o ? !0 : typeof r == "boolean" ? r : !1, [t, o, r]), l = F(() => !t || !o, [t, o]);
|
|
3594
|
+
return {
|
|
3595
|
+
disabled: a,
|
|
3596
|
+
// can not action, opacity < 1
|
|
3597
|
+
dataState: r,
|
|
3598
|
+
// true => show background, false => no background
|
|
3599
|
+
editorDisabled: l
|
|
3600
|
+
};
|
|
3601
|
+
}
|
|
3602
|
+
function xe(e = Wt) {
|
|
3603
|
+
const t = Ft(), [r, i] = I({}), [o, a] = I(e()), l = ee();
|
|
3604
|
+
Ie(() => {
|
|
3605
|
+
if (!l || !e) return;
|
|
3606
|
+
const d = () => {
|
|
3607
|
+
a(e());
|
|
3608
|
+
};
|
|
3609
|
+
return d(), l.on("selectionUpdate", d), () => {
|
|
3610
|
+
l.off("selectionUpdate", d);
|
|
3611
|
+
};
|
|
3612
|
+
}, [r, l, e]);
|
|
3613
|
+
const s = F(() => !t || !l, [t, l]), c = F(() => !t || !l, [t, l]);
|
|
3614
|
+
return {
|
|
3615
|
+
disabled: s,
|
|
3616
|
+
// can not action, opacity < 1
|
|
3617
|
+
dataState: o,
|
|
3618
|
+
// true => show background, false => no background
|
|
3619
|
+
editorDisabled: c,
|
|
3620
|
+
update: () => i({})
|
|
3621
|
+
// force update
|
|
3622
|
+
};
|
|
3623
|
+
}
|
|
3624
|
+
function de(e) {
|
|
3625
|
+
const t = ee();
|
|
3626
|
+
return F(() => t ? t.extensionManager.extensions.find(
|
|
3627
|
+
(i) => i.name === e
|
|
3628
|
+
) : null, [t, e]);
|
|
3629
|
+
}
|
|
3630
|
+
function Ua(e, t, r) {
|
|
3631
|
+
return e < t ? t : e > r ? r : e;
|
|
3632
|
+
}
|
|
3633
|
+
const Vo = (e) => typeof e == "number", _o = (e) => typeof e == "string", Ho = (e) => typeof e == "function";
|
|
3634
|
+
function Do(e, t = "px") {
|
|
3635
|
+
if (!e) return e;
|
|
3636
|
+
const r = Vo(e) ? String(e) : e, i = Number.parseFloat(r), o = r.match(/[%a-z]+$/i), a = o ? o[0] : t;
|
|
3637
|
+
return Number.isNaN(i) ? e : i + a;
|
|
3638
|
+
}
|
|
3639
|
+
function $a(e, t) {
|
|
3640
|
+
if (!e)
|
|
3641
|
+
return !1;
|
|
3642
|
+
const { extensions: r = [] } = (e == null ? void 0 : e.extensionManager) ?? {};
|
|
3643
|
+
return !!r.find((o) => o.name === t);
|
|
3644
|
+
}
|
|
3645
|
+
function Fa(e) {
|
|
3646
|
+
return e.map((t) => _o(t) ? { value: t, name: t } : t);
|
|
3647
|
+
}
|
|
3648
|
+
function it(e) {
|
|
3649
|
+
const t = ee(), r = de(e), { t: i } = ne();
|
|
3650
|
+
return F(() => {
|
|
3651
|
+
if (!t || !r || !i)
|
|
3652
|
+
return null;
|
|
3653
|
+
const { button: o } = r.options;
|
|
3654
|
+
return !o || !Ho(o) ? null : o({
|
|
3655
|
+
editor: t,
|
|
3656
|
+
extension: r,
|
|
3657
|
+
t: i
|
|
3658
|
+
});
|
|
3659
|
+
}, [t, r, i]);
|
|
3660
|
+
}
|
|
3661
|
+
function Wa() {
|
|
3662
|
+
const e = it(Gt.name), {
|
|
3663
|
+
icon: t = void 0,
|
|
3664
|
+
tooltip: r = void 0,
|
|
3665
|
+
shortcutKeys: i = void 0,
|
|
3666
|
+
tooltipOptions: o = {},
|
|
3667
|
+
action: a = void 0,
|
|
3668
|
+
isActive: l = void 0
|
|
3669
|
+
} = (e == null ? void 0 : e.componentProps) ?? {}, { editorDisabled: s, update: c } = xe(l), d = () => {
|
|
3670
|
+
s || a && (a(), c());
|
|
3671
|
+
};
|
|
3672
|
+
return e ? /* @__PURE__ */ n(
|
|
3673
|
+
fe,
|
|
3674
|
+
{
|
|
3675
|
+
action: d,
|
|
3676
|
+
disabled: s,
|
|
3677
|
+
icon: t,
|
|
3678
|
+
shortcutKeys: i,
|
|
3679
|
+
tooltip: r,
|
|
3680
|
+
tooltipOptions: o
|
|
3681
|
+
}
|
|
3682
|
+
) : /* @__PURE__ */ n(q, {});
|
|
3683
|
+
}
|
|
3684
|
+
const Gt = /* @__PURE__ */ Xe.create({
|
|
3685
|
+
name: "attachment",
|
|
3686
|
+
content: "",
|
|
3687
|
+
marks: "",
|
|
3688
|
+
group: "block",
|
|
3689
|
+
selectable: !0,
|
|
3690
|
+
atom: !0,
|
|
3691
|
+
draggable: !0,
|
|
3692
|
+
//@ts-expect-error
|
|
3693
|
+
addOptions() {
|
|
3694
|
+
var e;
|
|
3695
|
+
return {
|
|
3696
|
+
...(e = this.parent) == null ? void 0 : e.call(this),
|
|
3697
|
+
HTMLAttributes: {
|
|
3698
|
+
class: "attachment"
|
|
3699
|
+
},
|
|
3700
|
+
button: ({ editor: t, t: r }) => ({
|
|
3701
|
+
component: fe,
|
|
3702
|
+
componentProps: {
|
|
3703
|
+
/**
|
|
3704
|
+
* Instead of immediately inserting an empty node, we emit an event
|
|
3705
|
+
* that opens the attachment dialog. The node is only inserted once
|
|
3706
|
+
* the upload callback has returned an id.
|
|
3707
|
+
*/
|
|
3708
|
+
action: () => {
|
|
3709
|
+
const i = He.UPLOAD_ATTACHMENT(t.id);
|
|
3710
|
+
so(i, !0);
|
|
3711
|
+
},
|
|
3712
|
+
isActive: () => !1,
|
|
3713
|
+
disabled: !1,
|
|
3714
|
+
icon: "Attachment",
|
|
3715
|
+
tooltip: r("editor.attachment.tooltip")
|
|
3716
|
+
}
|
|
3717
|
+
})
|
|
3718
|
+
};
|
|
3719
|
+
},
|
|
3720
|
+
parseHTML() {
|
|
3721
|
+
return [{ tag: "div[class=attachment]" }];
|
|
3722
|
+
},
|
|
3723
|
+
renderHTML({ HTMLAttributes: e }) {
|
|
3724
|
+
const {
|
|
3725
|
+
id: t = "",
|
|
3726
|
+
fileName: r = "",
|
|
3727
|
+
fileSize: i = "",
|
|
3728
|
+
fileType: o = "",
|
|
3729
|
+
fileExt: a = ""
|
|
3730
|
+
} = e || {};
|
|
3731
|
+
return [
|
|
3732
|
+
"div",
|
|
3733
|
+
Ye(
|
|
3734
|
+
// @ts-expect-error
|
|
3735
|
+
this.options.HTMLAttributes || {},
|
|
3736
|
+
e || {}
|
|
3737
|
+
),
|
|
3738
|
+
t ? [
|
|
3739
|
+
"span",
|
|
3740
|
+
{ class: "attachment__body" },
|
|
3741
|
+
[
|
|
3742
|
+
"span",
|
|
3743
|
+
{ class: "attachment__icon" },
|
|
3744
|
+
Ut(o, !0)
|
|
3745
|
+
],
|
|
3746
|
+
[
|
|
3747
|
+
"span",
|
|
3748
|
+
{ class: "attachment__text" },
|
|
3749
|
+
`${r}.${a} (${Bt(i)})`
|
|
3750
|
+
]
|
|
3751
|
+
] : ["div", { class: "attachment__placeholder" }]
|
|
3752
|
+
];
|
|
3753
|
+
},
|
|
3754
|
+
addAttributes() {
|
|
3755
|
+
return {
|
|
3756
|
+
/**
|
|
3757
|
+
* The UUID / primary key your backend assigned to this asset.
|
|
3758
|
+
* This is the only persistent reference stored in the document.
|
|
3759
|
+
*/
|
|
3760
|
+
id: {
|
|
3761
|
+
default: null,
|
|
3762
|
+
parseHTML: ue("id")
|
|
3763
|
+
},
|
|
3764
|
+
fileName: {
|
|
3765
|
+
default: null,
|
|
3766
|
+
parseHTML: ue("filename")
|
|
3767
|
+
},
|
|
3768
|
+
fileSize: {
|
|
3769
|
+
default: null,
|
|
3770
|
+
parseHTML: ue("filesize")
|
|
3771
|
+
},
|
|
3772
|
+
fileType: {
|
|
3773
|
+
default: null,
|
|
3774
|
+
parseHTML: ue("filetype")
|
|
3775
|
+
},
|
|
3776
|
+
fileExt: {
|
|
3777
|
+
default: null,
|
|
3778
|
+
parseHTML: ue("fileext")
|
|
3779
|
+
},
|
|
3780
|
+
error: {
|
|
3781
|
+
default: null,
|
|
3782
|
+
parseHTML: ue("error")
|
|
3783
|
+
}
|
|
3784
|
+
};
|
|
3785
|
+
},
|
|
3786
|
+
addCommands() {
|
|
3787
|
+
return {
|
|
3788
|
+
setAttachment: (e) => ({ chain: t }) => t().insertContent({ type: this.name, attrs: e }).run()
|
|
3789
|
+
};
|
|
3790
|
+
},
|
|
3791
|
+
addNodeView() {
|
|
3792
|
+
return wt(Lo);
|
|
3793
|
+
}
|
|
3794
|
+
});
|
|
3795
|
+
function jo() {
|
|
3796
|
+
var h;
|
|
3797
|
+
const { t: e } = ne(), t = ee(), { editorDisabled: r } = xe(), [i, o] = I(!1), [a, l] = I(!1), [s, c] = I(null), d = me(null), f = de(Gt.name), g = He.UPLOAD_ATTACHMENT(t.id);
|
|
3798
|
+
tt((x) => {
|
|
3799
|
+
x && (c(null), l(!1), o(!0));
|
|
3800
|
+
}, [g]);
|
|
3801
|
+
const u = (h = f == null ? void 0 : f.options) == null ? void 0 : h.upload;
|
|
3802
|
+
function v(x) {
|
|
3803
|
+
var m;
|
|
3804
|
+
x.preventDefault(), (m = d.current) == null || m.click();
|
|
3805
|
+
}
|
|
3806
|
+
async function p(x) {
|
|
3807
|
+
var T;
|
|
3808
|
+
const m = (T = x.target.files) == null ? void 0 : T[0];
|
|
3809
|
+
if (!m || !t || t.isDestroyed) {
|
|
3810
|
+
x.target.value = "";
|
|
3811
|
+
return;
|
|
3812
|
+
}
|
|
3813
|
+
if (!u) {
|
|
3814
|
+
c(e("editor.attachment.error.no_upload_fn")), x.target.value = "";
|
|
3815
|
+
return;
|
|
3816
|
+
}
|
|
3817
|
+
c(null), l(!0);
|
|
3818
|
+
try {
|
|
3819
|
+
const b = await u(m);
|
|
3820
|
+
t.chain().focus().setAttachment({
|
|
3821
|
+
id: b,
|
|
3822
|
+
fileName: fo(m.name),
|
|
3823
|
+
fileSize: m.size,
|
|
3824
|
+
fileType: m.type,
|
|
3825
|
+
fileExt: mo(m.name)
|
|
3826
|
+
}).run(), o(!1);
|
|
3827
|
+
} catch (b) {
|
|
3828
|
+
c(
|
|
3829
|
+
b != null && b.message ? `${e("editor.attachment.error.upload_failed")}: ${b.message}` : e("editor.attachment.error.upload_failed")
|
|
3830
|
+
);
|
|
3831
|
+
} finally {
|
|
3832
|
+
l(!1), x.target.value = "";
|
|
3833
|
+
}
|
|
3834
|
+
}
|
|
3835
|
+
function k(x) {
|
|
3836
|
+
a || (o(x), x || c(null));
|
|
3837
|
+
}
|
|
3838
|
+
return r ? /* @__PURE__ */ n(q, {}) : /* @__PURE__ */ n(ge, { onOpenChange: k, open: i, children: /* @__PURE__ */ y(le, { children: [
|
|
3839
|
+
/* @__PURE__ */ n(ce, { children: e("editor.attachment.dialog.title") }),
|
|
3840
|
+
/* @__PURE__ */ y("div", { className: "richtext-flex richtext-flex-col richtext-gap-3", children: [
|
|
3841
|
+
/* @__PURE__ */ n("p", { className: "richtext-text-sm richtext-text-muted-foreground", children: e("editor.attachment.dialog.description") }),
|
|
3842
|
+
/* @__PURE__ */ n(
|
|
3843
|
+
X,
|
|
3844
|
+
{
|
|
3845
|
+
className: "richtext-w-full",
|
|
3846
|
+
disabled: a,
|
|
3847
|
+
onClick: v,
|
|
3848
|
+
size: "sm",
|
|
3849
|
+
children: e(a ? "editor.attachment.uploading" : "editor.attachment.dialog.button.choose")
|
|
3850
|
+
}
|
|
3851
|
+
),
|
|
3852
|
+
s && /* @__PURE__ */ n("p", { className: "richtext-text-sm richtext-text-destructive", children: s })
|
|
3853
|
+
] }),
|
|
3854
|
+
/* @__PURE__ */ n(
|
|
3855
|
+
"input",
|
|
3856
|
+
{
|
|
3857
|
+
hidden: !0,
|
|
3858
|
+
onChange: p,
|
|
3859
|
+
ref: d,
|
|
3860
|
+
type: "file"
|
|
3861
|
+
}
|
|
3862
|
+
)
|
|
3863
|
+
] }) });
|
|
3864
|
+
}
|
|
3865
|
+
var Po = /(?:^|\s)(!\[(.+|:?)]\((\S+)(?:(?:\s+)["'](\S+)["'])?\))$/, Oo = Xe.create({
|
|
3197
3866
|
name: "image",
|
|
3198
3867
|
addOptions() {
|
|
3199
3868
|
return {
|
|
@@ -3237,7 +3906,7 @@ var $n = /(?:^|\s)(!\[(.+|:?)]\((\S+)(?:(?:\s+)["'](\S+)["'])?\))$/, Fn = dt.cre
|
|
|
3237
3906
|
];
|
|
3238
3907
|
},
|
|
3239
3908
|
renderHTML({ HTMLAttributes: e }) {
|
|
3240
|
-
return ["img",
|
|
3909
|
+
return ["img", Ye(this.options.HTMLAttributes, e)];
|
|
3241
3910
|
},
|
|
3242
3911
|
parseMarkdown: (e, t) => t.createNode("image", {
|
|
3243
3912
|
src: e.href,
|
|
@@ -3255,33 +3924,33 @@ var $n = /(?:^|\s)(!\[(.+|:?)]\((\S+)(?:(?:\s+)["'](\S+)["'])?\))$/, Fn = dt.cre
|
|
|
3255
3924
|
const { directions: e, minWidth: t, minHeight: r, alwaysPreserveAspectRatio: i } = this.options.resize;
|
|
3256
3925
|
return ({ node: o, getPos: a, HTMLAttributes: l, editor: s }) => {
|
|
3257
3926
|
const c = document.createElement("img");
|
|
3258
|
-
Object.entries(l).forEach(([
|
|
3259
|
-
if (
|
|
3260
|
-
switch (
|
|
3927
|
+
Object.entries(l).forEach(([g, u]) => {
|
|
3928
|
+
if (u != null)
|
|
3929
|
+
switch (g) {
|
|
3261
3930
|
case "width":
|
|
3262
3931
|
case "height":
|
|
3263
3932
|
break;
|
|
3264
3933
|
default:
|
|
3265
|
-
c.setAttribute(
|
|
3934
|
+
c.setAttribute(g, u);
|
|
3266
3935
|
break;
|
|
3267
3936
|
}
|
|
3268
3937
|
}), c.src = l.src;
|
|
3269
|
-
const d = new
|
|
3938
|
+
const d = new ar({
|
|
3270
3939
|
element: c,
|
|
3271
3940
|
editor: s,
|
|
3272
3941
|
node: o,
|
|
3273
3942
|
getPos: a,
|
|
3274
|
-
onResize: (
|
|
3275
|
-
c.style.width = `${
|
|
3943
|
+
onResize: (g, u) => {
|
|
3944
|
+
c.style.width = `${g}px`, c.style.height = `${u}px`;
|
|
3276
3945
|
},
|
|
3277
|
-
onCommit: (
|
|
3278
|
-
const
|
|
3279
|
-
|
|
3280
|
-
width:
|
|
3281
|
-
height:
|
|
3946
|
+
onCommit: (g, u) => {
|
|
3947
|
+
const v = a();
|
|
3948
|
+
v !== void 0 && this.editor.chain().setNodeSelection(v).updateAttributes(this.name, {
|
|
3949
|
+
width: g,
|
|
3950
|
+
height: u
|
|
3282
3951
|
}).run();
|
|
3283
3952
|
},
|
|
3284
|
-
onUpdate: (
|
|
3953
|
+
onUpdate: (g, u, v) => g.type === o.type,
|
|
3285
3954
|
options: {
|
|
3286
3955
|
directions: e,
|
|
3287
3956
|
min: {
|
|
@@ -3290,9 +3959,9 @@ var $n = /(?:^|\s)(!\[(.+|:?)]\((\S+)(?:(?:\s+)["'](\S+)["'])?\))$/, Fn = dt.cre
|
|
|
3290
3959
|
},
|
|
3291
3960
|
preserveAspectRatio: i === !0
|
|
3292
3961
|
}
|
|
3293
|
-
}),
|
|
3294
|
-
return
|
|
3295
|
-
|
|
3962
|
+
}), f = d.dom;
|
|
3963
|
+
return f.style.visibility = "hidden", f.style.pointerEvents = "none", c.onload = () => {
|
|
3964
|
+
f.style.visibility = "", f.style.pointerEvents = "";
|
|
3296
3965
|
}, d;
|
|
3297
3966
|
};
|
|
3298
3967
|
},
|
|
@@ -3306,8 +3975,8 @@ var $n = /(?:^|\s)(!\[(.+|:?)]\((\S+)(?:(?:\s+)["'](\S+)["'])?\))$/, Fn = dt.cre
|
|
|
3306
3975
|
},
|
|
3307
3976
|
addInputRules() {
|
|
3308
3977
|
return [
|
|
3309
|
-
|
|
3310
|
-
find:
|
|
3978
|
+
or({
|
|
3979
|
+
find: Po,
|
|
3311
3980
|
type: this.type,
|
|
3312
3981
|
getAttributes: (e) => {
|
|
3313
3982
|
const [, , t, r, i] = e;
|
|
@@ -3316,144 +3985,144 @@ var $n = /(?:^|\s)(!\[(.+|:?)]\((\S+)(?:(?:\s+)["'](\S+)["'])?\))$/, Fn = dt.cre
|
|
|
3316
3985
|
})
|
|
3317
3986
|
];
|
|
3318
3987
|
}
|
|
3319
|
-
}),
|
|
3320
|
-
function
|
|
3321
|
-
var t =
|
|
3988
|
+
}), Bo = Oo, Uo = typeof global == "object" && global && global.Object === Object && global, $o = typeof self == "object" && self && self.Object === Object && self, Xt = Uo || $o || Function("return this")(), Ee = Xt.Symbol, Yt = Object.prototype, Fo = Yt.hasOwnProperty, Wo = Yt.toString, we = Ee ? Ee.toStringTag : void 0;
|
|
3989
|
+
function Go(e) {
|
|
3990
|
+
var t = Fo.call(e, we), r = e[we];
|
|
3322
3991
|
try {
|
|
3323
|
-
e[
|
|
3992
|
+
e[we] = void 0;
|
|
3324
3993
|
var i = !0;
|
|
3325
3994
|
} catch {
|
|
3326
3995
|
}
|
|
3327
|
-
var o =
|
|
3328
|
-
return i && (t ? e[
|
|
3996
|
+
var o = Wo.call(e);
|
|
3997
|
+
return i && (t ? e[we] = r : delete e[we]), o;
|
|
3329
3998
|
}
|
|
3330
|
-
var
|
|
3331
|
-
function
|
|
3332
|
-
return
|
|
3999
|
+
var Xo = Object.prototype, Yo = Xo.toString;
|
|
4000
|
+
function Zo(e) {
|
|
4001
|
+
return Yo.call(e);
|
|
3333
4002
|
}
|
|
3334
|
-
var
|
|
3335
|
-
function
|
|
3336
|
-
return e == null ? e === void 0 ?
|
|
4003
|
+
var qo = "[object Null]", Jo = "[object Undefined]", pt = Ee ? Ee.toStringTag : void 0;
|
|
4004
|
+
function Zt(e) {
|
|
4005
|
+
return e == null ? e === void 0 ? Jo : qo : pt && pt in Object(e) ? Go(e) : Zo(e);
|
|
3337
4006
|
}
|
|
3338
|
-
function
|
|
4007
|
+
function qt(e) {
|
|
3339
4008
|
return e != null && typeof e == "object";
|
|
3340
4009
|
}
|
|
3341
|
-
var
|
|
3342
|
-
function
|
|
3343
|
-
return typeof e == "symbol" ||
|
|
4010
|
+
var Ko = "[object Symbol]";
|
|
4011
|
+
function Qo(e) {
|
|
4012
|
+
return typeof e == "symbol" || qt(e) && Zt(e) == Ko;
|
|
3344
4013
|
}
|
|
3345
|
-
var
|
|
3346
|
-
function
|
|
3347
|
-
for (var t = e.length; t-- &&
|
|
4014
|
+
var ea = /\s/;
|
|
4015
|
+
function ta(e) {
|
|
4016
|
+
for (var t = e.length; t-- && ea.test(e.charAt(t)); )
|
|
3348
4017
|
;
|
|
3349
4018
|
return t;
|
|
3350
4019
|
}
|
|
3351
|
-
var
|
|
3352
|
-
function
|
|
3353
|
-
return e && e.slice(0,
|
|
4020
|
+
var ra = /^\s+/;
|
|
4021
|
+
function ia(e) {
|
|
4022
|
+
return e && e.slice(0, ta(e) + 1).replace(ra, "");
|
|
3354
4023
|
}
|
|
3355
|
-
function
|
|
4024
|
+
function Re(e) {
|
|
3356
4025
|
var t = typeof e;
|
|
3357
4026
|
return e != null && (t == "object" || t == "function");
|
|
3358
4027
|
}
|
|
3359
|
-
var
|
|
3360
|
-
function
|
|
4028
|
+
var gt = NaN, na = /^[-+]0x[0-9a-f]+$/i, oa = /^0b[01]+$/i, aa = /^0o[0-7]+$/i, sa = parseInt;
|
|
4029
|
+
function Ce(e) {
|
|
3361
4030
|
if (typeof e == "number")
|
|
3362
4031
|
return e;
|
|
3363
|
-
if (
|
|
3364
|
-
return
|
|
3365
|
-
if (
|
|
4032
|
+
if (Qo(e))
|
|
4033
|
+
return gt;
|
|
4034
|
+
if (Re(e)) {
|
|
3366
4035
|
var t = typeof e.valueOf == "function" ? e.valueOf() : e;
|
|
3367
|
-
e =
|
|
4036
|
+
e = Re(t) ? t + "" : t;
|
|
3368
4037
|
}
|
|
3369
4038
|
if (typeof e != "string")
|
|
3370
4039
|
return e === 0 ? e : +e;
|
|
3371
|
-
e =
|
|
3372
|
-
var r =
|
|
3373
|
-
return r ||
|
|
4040
|
+
e = ia(e);
|
|
4041
|
+
var r = oa.test(e);
|
|
4042
|
+
return r || aa.test(e) ? sa(e.slice(2), r ? 2 : 8) : na.test(e) ? gt : +e;
|
|
3374
4043
|
}
|
|
3375
|
-
function
|
|
4044
|
+
function la(e, t, r) {
|
|
3376
4045
|
return e === e && (r !== void 0 && (e = e <= r ? e : r), t !== void 0 && (e = e >= t ? e : t)), e;
|
|
3377
4046
|
}
|
|
3378
|
-
function
|
|
3379
|
-
return r === void 0 && (r = t, t = void 0), r !== void 0 && (r =
|
|
4047
|
+
function ca(e, t, r) {
|
|
4048
|
+
return r === void 0 && (r = t, t = void 0), r !== void 0 && (r = Ce(r), r = r === r ? r : 0), t !== void 0 && (t = Ce(t), t = t === t ? t : 0), la(Ce(e), t, r);
|
|
3380
4049
|
}
|
|
3381
|
-
var
|
|
3382
|
-
return
|
|
3383
|
-
},
|
|
3384
|
-
function
|
|
3385
|
-
var i, o, a, l, s, c, d = 0,
|
|
4050
|
+
var $e = function() {
|
|
4051
|
+
return Xt.Date.now();
|
|
4052
|
+
}, da = "Expected a function", ua = Math.max, ha = Math.min;
|
|
4053
|
+
function fa(e, t, r) {
|
|
4054
|
+
var i, o, a, l, s, c, d = 0, f = !1, g = !1, u = !0;
|
|
3386
4055
|
if (typeof e != "function")
|
|
3387
|
-
throw new TypeError(
|
|
3388
|
-
t =
|
|
3389
|
-
function
|
|
3390
|
-
var L = i,
|
|
3391
|
-
return i = o = void 0, d =
|
|
4056
|
+
throw new TypeError(da);
|
|
4057
|
+
t = Ce(t) || 0, Re(r) && (f = !!r.leading, g = "maxWait" in r, a = g ? ua(Ce(r.maxWait) || 0, t) : a, u = "trailing" in r ? !!r.trailing : u);
|
|
4058
|
+
function v(C) {
|
|
4059
|
+
var L = i, H = o;
|
|
4060
|
+
return i = o = void 0, d = C, l = e.apply(H, L), l;
|
|
3392
4061
|
}
|
|
3393
|
-
function
|
|
3394
|
-
return d =
|
|
4062
|
+
function p(C) {
|
|
4063
|
+
return d = C, s = setTimeout(x, t), f ? v(C) : l;
|
|
3395
4064
|
}
|
|
3396
|
-
function k(
|
|
3397
|
-
var L =
|
|
3398
|
-
return
|
|
4065
|
+
function k(C) {
|
|
4066
|
+
var L = C - c, H = C - d, P = t - L;
|
|
4067
|
+
return g ? ha(P, a - H) : P;
|
|
3399
4068
|
}
|
|
3400
|
-
function
|
|
3401
|
-
var L =
|
|
3402
|
-
return c === void 0 || L >= t || L < 0 ||
|
|
4069
|
+
function h(C) {
|
|
4070
|
+
var L = C - c, H = C - d;
|
|
4071
|
+
return c === void 0 || L >= t || L < 0 || g && H >= a;
|
|
3403
4072
|
}
|
|
3404
|
-
function
|
|
3405
|
-
var
|
|
3406
|
-
if (
|
|
3407
|
-
return m(
|
|
3408
|
-
s = setTimeout(
|
|
4073
|
+
function x() {
|
|
4074
|
+
var C = $e();
|
|
4075
|
+
if (h(C))
|
|
4076
|
+
return m(C);
|
|
4077
|
+
s = setTimeout(x, k(C));
|
|
3409
4078
|
}
|
|
3410
|
-
function m(
|
|
3411
|
-
return s = void 0,
|
|
4079
|
+
function m(C) {
|
|
4080
|
+
return s = void 0, u && i ? v(C) : (i = o = void 0, l);
|
|
3412
4081
|
}
|
|
3413
|
-
function
|
|
4082
|
+
function T() {
|
|
3414
4083
|
s !== void 0 && clearTimeout(s), d = 0, i = c = o = s = void 0;
|
|
3415
4084
|
}
|
|
3416
|
-
function
|
|
3417
|
-
return s === void 0 ? l : m(
|
|
4085
|
+
function b() {
|
|
4086
|
+
return s === void 0 ? l : m($e());
|
|
3418
4087
|
}
|
|
3419
4088
|
function A() {
|
|
3420
|
-
var
|
|
3421
|
-
if (i = arguments, o = this, c =
|
|
4089
|
+
var C = $e(), L = h(C);
|
|
4090
|
+
if (i = arguments, o = this, c = C, L) {
|
|
3422
4091
|
if (s === void 0)
|
|
3423
|
-
return
|
|
3424
|
-
if (
|
|
3425
|
-
return clearTimeout(s), s = setTimeout(
|
|
4092
|
+
return p(c);
|
|
4093
|
+
if (g)
|
|
4094
|
+
return clearTimeout(s), s = setTimeout(x, t), v(c);
|
|
3426
4095
|
}
|
|
3427
|
-
return s === void 0 && (s = setTimeout(
|
|
4096
|
+
return s === void 0 && (s = setTimeout(x, t)), l;
|
|
3428
4097
|
}
|
|
3429
|
-
return A.cancel =
|
|
4098
|
+
return A.cancel = T, A.flush = b, A;
|
|
3430
4099
|
}
|
|
3431
|
-
var
|
|
3432
|
-
function
|
|
3433
|
-
return typeof e == "number" ||
|
|
4100
|
+
var ma = "[object Number]";
|
|
4101
|
+
function xt(e) {
|
|
4102
|
+
return typeof e == "number" || qt(e) && Zt(e) == ma;
|
|
3434
4103
|
}
|
|
3435
|
-
var
|
|
3436
|
-
function
|
|
4104
|
+
var pa = "Expected a function";
|
|
4105
|
+
function bt(e, t, r) {
|
|
3437
4106
|
var i = !0, o = !0;
|
|
3438
4107
|
if (typeof e != "function")
|
|
3439
|
-
throw new TypeError(
|
|
3440
|
-
return
|
|
4108
|
+
throw new TypeError(pa);
|
|
4109
|
+
return Re(r) && (i = "leading" in r ? !!r.leading : i, o = "trailing" in r ? !!r.trailing : o), fa(e, t, {
|
|
3441
4110
|
leading: i,
|
|
3442
4111
|
maxWait: t,
|
|
3443
4112
|
trailing: o
|
|
3444
4113
|
});
|
|
3445
4114
|
}
|
|
3446
|
-
const
|
|
4115
|
+
const Te = {
|
|
3447
4116
|
TOP_LEFT: "tl",
|
|
3448
4117
|
TOP_RIGHT: "tr",
|
|
3449
4118
|
BOTTOM_LEFT: "bl",
|
|
3450
4119
|
BOTTOM_RIGHT: "br"
|
|
3451
4120
|
};
|
|
3452
|
-
function
|
|
4121
|
+
function ga({
|
|
3453
4122
|
src: e,
|
|
3454
4123
|
style: t
|
|
3455
4124
|
}) {
|
|
3456
|
-
return /* @__PURE__ */
|
|
4125
|
+
return /* @__PURE__ */ y(
|
|
3457
4126
|
"div",
|
|
3458
4127
|
{
|
|
3459
4128
|
style: {
|
|
@@ -3495,7 +4164,7 @@ function yo({
|
|
|
3495
4164
|
}
|
|
3496
4165
|
}
|
|
3497
4166
|
),
|
|
3498
|
-
/* @__PURE__ */
|
|
4167
|
+
/* @__PURE__ */ y(
|
|
3499
4168
|
"div",
|
|
3500
4169
|
{
|
|
3501
4170
|
style: {
|
|
@@ -3556,141 +4225,141 @@ function yo({
|
|
|
3556
4225
|
}
|
|
3557
4226
|
);
|
|
3558
4227
|
}
|
|
3559
|
-
function
|
|
3560
|
-
var
|
|
3561
|
-
const [t, r] =
|
|
3562
|
-
width:
|
|
3563
|
-
height:
|
|
3564
|
-
}), [i, o] =
|
|
4228
|
+
function xa(e) {
|
|
4229
|
+
var P, O, U, S;
|
|
4230
|
+
const [t, r] = I({
|
|
4231
|
+
width: lt,
|
|
4232
|
+
height: lt
|
|
4233
|
+
}), [i, o] = I({
|
|
3565
4234
|
width: 0,
|
|
3566
4235
|
height: 0
|
|
3567
|
-
}), [a] =
|
|
3568
|
-
|
|
3569
|
-
|
|
3570
|
-
|
|
3571
|
-
|
|
3572
|
-
]), [l, s] =
|
|
4236
|
+
}), [a] = I([
|
|
4237
|
+
Te.TOP_LEFT,
|
|
4238
|
+
Te.TOP_RIGHT,
|
|
4239
|
+
Te.BOTTOM_LEFT,
|
|
4240
|
+
Te.BOTTOM_RIGHT
|
|
4241
|
+
]), [l, s] = I(!1), [c, d] = I({
|
|
3573
4242
|
x: 0,
|
|
3574
4243
|
y: 0,
|
|
3575
4244
|
w: 0,
|
|
3576
4245
|
h: 0,
|
|
3577
4246
|
dir: ""
|
|
3578
|
-
}), { align:
|
|
3579
|
-
var
|
|
3580
|
-
const { src:
|
|
3581
|
-
|
|
3582
|
-
const
|
|
4247
|
+
}), { align: f, inline: g, uploading: u } = (P = e == null ? void 0 : e.node) == null ? void 0 : P.attrs, v = g && (f === "left" || f === "right"), p = F(() => {
|
|
4248
|
+
var ot;
|
|
4249
|
+
const { src: w, alt: N, width: V, height: j, flipX: B, flipY: z } = (ot = e == null ? void 0 : e.node) == null ? void 0 : ot.attrs, $ = xt(V) ? `${V}px` : V, W = xt(j) ? `${j}px` : j, G = [];
|
|
4250
|
+
B && G.push("rotateX(180deg)"), z && G.push("rotateY(180deg)");
|
|
4251
|
+
const Qt = G.join(" ");
|
|
3583
4252
|
return {
|
|
3584
|
-
src:
|
|
3585
|
-
alt:
|
|
4253
|
+
src: w || void 0,
|
|
4254
|
+
alt: N || void 0,
|
|
3586
4255
|
style: {
|
|
3587
|
-
width:
|
|
3588
|
-
height:
|
|
3589
|
-
transform:
|
|
3590
|
-
...
|
|
4256
|
+
width: $ || void 0,
|
|
4257
|
+
height: W || void 0,
|
|
4258
|
+
transform: Qt || "none",
|
|
4259
|
+
...v ? { float: f } : {}
|
|
3591
4260
|
}
|
|
3592
4261
|
};
|
|
3593
|
-
}, [(
|
|
4262
|
+
}, [(O = e == null ? void 0 : e.node) == null ? void 0 : O.attrs]), k = F(() => {
|
|
3594
4263
|
const {
|
|
3595
|
-
style: { width:
|
|
3596
|
-
} =
|
|
3597
|
-
return { width:
|
|
3598
|
-
}, [
|
|
3599
|
-
function
|
|
4264
|
+
style: { width: w }
|
|
4265
|
+
} = p;
|
|
4266
|
+
return { width: w === "100%" ? w : void 0 };
|
|
4267
|
+
}, [p]);
|
|
4268
|
+
function h(w) {
|
|
3600
4269
|
o({
|
|
3601
|
-
width:
|
|
3602
|
-
height:
|
|
4270
|
+
width: w.target.width,
|
|
4271
|
+
height: w.target.height
|
|
3603
4272
|
});
|
|
3604
4273
|
}
|
|
3605
|
-
function
|
|
3606
|
-
const { editor:
|
|
3607
|
-
|
|
4274
|
+
function x() {
|
|
4275
|
+
const { editor: w, getPos: N } = e;
|
|
4276
|
+
w.commands.setNodeSelection(N());
|
|
3608
4277
|
}
|
|
3609
|
-
const m =
|
|
3610
|
-
|
|
3611
|
-
const { editor:
|
|
3612
|
-
r((
|
|
3613
|
-
...
|
|
3614
|
-
width: Number.parseInt(
|
|
4278
|
+
const m = oe(
|
|
4279
|
+
bt(() => {
|
|
4280
|
+
const { editor: w } = e, { width: N } = getComputedStyle(w.view.dom);
|
|
4281
|
+
r((V) => ({
|
|
4282
|
+
...V,
|
|
4283
|
+
width: Number.parseInt(N, 10)
|
|
3615
4284
|
}));
|
|
3616
|
-
},
|
|
4285
|
+
}, ct),
|
|
3617
4286
|
[e == null ? void 0 : e.editor]
|
|
3618
4287
|
);
|
|
3619
|
-
function
|
|
3620
|
-
|
|
3621
|
-
const
|
|
3622
|
-
let
|
|
3623
|
-
const
|
|
3624
|
-
|
|
3625
|
-
x:
|
|
3626
|
-
y:
|
|
3627
|
-
w:
|
|
3628
|
-
h:
|
|
3629
|
-
dir:
|
|
4288
|
+
function T(w, N) {
|
|
4289
|
+
w.preventDefault(), w.stopPropagation();
|
|
4290
|
+
const V = i.width, j = i.height, B = V / j;
|
|
4291
|
+
let z = Number(e.node.attrs.width), $ = Number(e.node.attrs.height);
|
|
4292
|
+
const W = t.width;
|
|
4293
|
+
z && !$ ? (z = z > W ? W : z, $ = Math.round(z / B)) : $ && !z ? (z = Math.round($ * B), z = z > W ? W : z) : !z && !$ ? (z = V > W ? W : V, $ = Math.round(z / B)) : z = z > W ? W : z, s(!0), d({
|
|
4294
|
+
x: w.clientX,
|
|
4295
|
+
y: w.clientY,
|
|
4296
|
+
w: z,
|
|
4297
|
+
h: $,
|
|
4298
|
+
dir: N
|
|
3630
4299
|
});
|
|
3631
4300
|
}
|
|
3632
|
-
const
|
|
3633
|
-
|
|
3634
|
-
if (
|
|
4301
|
+
const b = oe(
|
|
4302
|
+
bt((w) => {
|
|
4303
|
+
if (w.preventDefault(), w.stopPropagation(), !l)
|
|
3635
4304
|
return;
|
|
3636
|
-
const { x:
|
|
4305
|
+
const { x: N, w: V, dir: j } = c, B = (w.clientX - N) * (/l/.test(j) ? -1 : 1), z = ca(V + B, Ri, t.width);
|
|
3637
4306
|
e.updateAttributes({
|
|
3638
|
-
width:
|
|
4307
|
+
width: z,
|
|
3639
4308
|
height: null
|
|
3640
4309
|
});
|
|
3641
|
-
},
|
|
4310
|
+
}, ct),
|
|
3642
4311
|
[l, c, t, e.updateAttributes]
|
|
3643
|
-
), A =
|
|
3644
|
-
(
|
|
3645
|
-
|
|
4312
|
+
), A = oe(
|
|
4313
|
+
(w) => {
|
|
4314
|
+
w.preventDefault(), w.stopPropagation(), l && (d({
|
|
3646
4315
|
x: 0,
|
|
3647
4316
|
y: 0,
|
|
3648
4317
|
w: 0,
|
|
3649
4318
|
h: 0,
|
|
3650
4319
|
dir: ""
|
|
3651
|
-
}), s(!1),
|
|
4320
|
+
}), s(!1), x());
|
|
3652
4321
|
},
|
|
3653
|
-
[l,
|
|
3654
|
-
),
|
|
3655
|
-
document == null || document.addEventListener("mousemove",
|
|
3656
|
-
}, [
|
|
3657
|
-
document == null || document.removeEventListener("mousemove",
|
|
3658
|
-
}, [
|
|
3659
|
-
|
|
4322
|
+
[l, x]
|
|
4323
|
+
), C = oe(() => {
|
|
4324
|
+
document == null || document.addEventListener("mousemove", b, !0), document == null || document.addEventListener("mouseup", A, !0);
|
|
4325
|
+
}, [b, A]), L = oe(() => {
|
|
4326
|
+
document == null || document.removeEventListener("mousemove", b, !0), document == null || document.removeEventListener("mouseup", A, !0);
|
|
4327
|
+
}, [b, A]);
|
|
4328
|
+
Ie(() => (l ? C() : L(), () => {
|
|
3660
4329
|
L();
|
|
3661
|
-
}), [l,
|
|
3662
|
-
const
|
|
3663
|
-
return
|
|
3664
|
-
|
|
3665
|
-
}), [e.editor.view.dom,
|
|
3666
|
-
|
|
4330
|
+
}), [l, C, L]);
|
|
4331
|
+
const H = F(() => new ResizeObserver(() => m()), [m]);
|
|
4332
|
+
return Ie(() => (H.observe(e.editor.view.dom), () => {
|
|
4333
|
+
H.disconnect();
|
|
4334
|
+
}), [e.editor.view.dom, H]), u ? /* @__PURE__ */ n(
|
|
4335
|
+
Le,
|
|
3667
4336
|
{
|
|
3668
|
-
as:
|
|
4337
|
+
as: g ? "span" : "div",
|
|
3669
4338
|
className: "image-view",
|
|
3670
4339
|
style: {
|
|
3671
|
-
float:
|
|
3672
|
-
margin:
|
|
3673
|
-
display:
|
|
3674
|
-
textAlign:
|
|
3675
|
-
width: ((
|
|
3676
|
-
...
|
|
4340
|
+
float: v ? f : void 0,
|
|
4341
|
+
margin: v ? f === "left" ? "1em 1em 1em 0" : "1em 0 1em 1em" : void 0,
|
|
4342
|
+
display: g ? "inline" : "block",
|
|
4343
|
+
textAlign: v ? void 0 : f,
|
|
4344
|
+
width: ((U = p.style) == null ? void 0 : U.width) ?? "auto",
|
|
4345
|
+
...v ? {} : k
|
|
3677
4346
|
},
|
|
3678
|
-
children: /* @__PURE__ */ n("div", { style: k, className: "image-view__body", children: /* @__PURE__ */ n(
|
|
4347
|
+
children: /* @__PURE__ */ n("div", { style: k, className: "image-view__body", children: /* @__PURE__ */ n(ga, { src: p.src, style: p.style }) })
|
|
3679
4348
|
}
|
|
3680
4349
|
) : /* @__PURE__ */ n(
|
|
3681
|
-
|
|
4350
|
+
Le,
|
|
3682
4351
|
{
|
|
3683
|
-
as:
|
|
4352
|
+
as: g ? "span" : "div",
|
|
3684
4353
|
className: "image-view",
|
|
3685
4354
|
style: {
|
|
3686
|
-
float:
|
|
3687
|
-
margin:
|
|
3688
|
-
display:
|
|
3689
|
-
textAlign:
|
|
3690
|
-
width: ((
|
|
3691
|
-
...
|
|
4355
|
+
float: v ? f : void 0,
|
|
4356
|
+
margin: v ? f === "left" ? "1em 1em 1em 0" : "1em 0 1em 1em" : void 0,
|
|
4357
|
+
display: g ? "inline" : "block",
|
|
4358
|
+
textAlign: v ? void 0 : f,
|
|
4359
|
+
width: ((S = p.style) == null ? void 0 : S.width) ?? "auto",
|
|
4360
|
+
...v ? {} : k
|
|
3692
4361
|
},
|
|
3693
|
-
children: /* @__PURE__ */
|
|
4362
|
+
children: /* @__PURE__ */ y(
|
|
3694
4363
|
"div",
|
|
3695
4364
|
{
|
|
3696
4365
|
"data-drag-handle": !0,
|
|
@@ -3701,22 +4370,22 @@ function Co(e) {
|
|
|
3701
4370
|
/* @__PURE__ */ n(
|
|
3702
4371
|
"img",
|
|
3703
4372
|
{
|
|
3704
|
-
alt:
|
|
4373
|
+
alt: p.alt,
|
|
3705
4374
|
className: "image-view__body__image block",
|
|
3706
4375
|
height: "auto",
|
|
3707
|
-
onClick:
|
|
3708
|
-
onLoad:
|
|
3709
|
-
src:
|
|
3710
|
-
style:
|
|
4376
|
+
onClick: x,
|
|
4377
|
+
onLoad: h,
|
|
4378
|
+
src: p.src,
|
|
4379
|
+
style: p.style
|
|
3711
4380
|
}
|
|
3712
4381
|
),
|
|
3713
|
-
(e == null ? void 0 : e.editor.view.editable) && ((e == null ? void 0 : e.selected) || l) && /* @__PURE__ */ n("div", { className: "image-resizer", children: a == null ? void 0 : a.map((
|
|
4382
|
+
(e == null ? void 0 : e.editor.view.editable) && ((e == null ? void 0 : e.selected) || l) && /* @__PURE__ */ n("div", { className: "image-resizer", children: a == null ? void 0 : a.map((w) => /* @__PURE__ */ n(
|
|
3714
4383
|
"span",
|
|
3715
4384
|
{
|
|
3716
|
-
className: `image-resizer__handler image-resizer__handler--${
|
|
3717
|
-
onMouseDown: (
|
|
4385
|
+
className: `image-resizer__handler image-resizer__handler--${w}`,
|
|
4386
|
+
onMouseDown: (N) => T(N, w)
|
|
3718
4387
|
},
|
|
3719
|
-
`image-dir-${
|
|
4388
|
+
`image-dir-${w}`
|
|
3720
4389
|
)) })
|
|
3721
4390
|
]
|
|
3722
4391
|
}
|
|
@@ -3724,121 +4393,7 @@ function Co(e) {
|
|
|
3724
4393
|
}
|
|
3725
4394
|
);
|
|
3726
4395
|
}
|
|
3727
|
-
function
|
|
3728
|
-
const { editor: t } = fi(), r = B.useMemo(
|
|
3729
|
-
() => t,
|
|
3730
|
-
[e, t]
|
|
3731
|
-
);
|
|
3732
|
-
return mi({
|
|
3733
|
-
editor: r,
|
|
3734
|
-
selector(o) {
|
|
3735
|
-
return o.editor ? {
|
|
3736
|
-
editor: o.editor,
|
|
3737
|
-
editorState: o.editor.state,
|
|
3738
|
-
canCommand: o.editor.can
|
|
3739
|
-
} : {
|
|
3740
|
-
editor: null,
|
|
3741
|
-
editorState: void 0,
|
|
3742
|
-
canCommand: void 0
|
|
3743
|
-
};
|
|
3744
|
-
}
|
|
3745
|
-
}) || { editor: null };
|
|
3746
|
-
}
|
|
3747
|
-
function ee() {
|
|
3748
|
-
return ko().editor;
|
|
3749
|
-
}
|
|
3750
|
-
const Et = _t(!1);
|
|
3751
|
-
function Rt() {
|
|
3752
|
-
return Ut(Et);
|
|
3753
|
-
}
|
|
3754
|
-
function Zo() {
|
|
3755
|
-
return Bt(Et);
|
|
3756
|
-
}
|
|
3757
|
-
const Vt = () => !1;
|
|
3758
|
-
function Ko(e = Vt) {
|
|
3759
|
-
const t = Rt(), [r, i] = E(() => {
|
|
3760
|
-
const s = e();
|
|
3761
|
-
return typeof s == "boolean" ? !s : s;
|
|
3762
|
-
}), o = ee();
|
|
3763
|
-
Me(() => {
|
|
3764
|
-
if (!o || !e) return;
|
|
3765
|
-
const s = () => {
|
|
3766
|
-
const c = e();
|
|
3767
|
-
i(typeof c == "boolean" ? !c : c);
|
|
3768
|
-
};
|
|
3769
|
-
return s(), o.on("selectionUpdate", s), o.on("transaction", s), () => {
|
|
3770
|
-
o.off("selectionUpdate", s), o.off("transaction", s);
|
|
3771
|
-
};
|
|
3772
|
-
}, [o, e]);
|
|
3773
|
-
const a = $(() => !t || !o ? !0 : typeof r == "boolean" ? r : !1, [t, o, r]), l = $(() => !t || !o, [t, o]);
|
|
3774
|
-
return {
|
|
3775
|
-
disabled: a,
|
|
3776
|
-
// can not action, opacity < 1
|
|
3777
|
-
dataState: r,
|
|
3778
|
-
// true => show background, false => no background
|
|
3779
|
-
editorDisabled: l
|
|
3780
|
-
};
|
|
3781
|
-
}
|
|
3782
|
-
function Ae(e = Vt) {
|
|
3783
|
-
const t = Rt(), [r, i] = E({}), [o, a] = E(e()), l = ee();
|
|
3784
|
-
Me(() => {
|
|
3785
|
-
if (!l || !e) return;
|
|
3786
|
-
const d = () => {
|
|
3787
|
-
a(e());
|
|
3788
|
-
};
|
|
3789
|
-
return d(), l.on("selectionUpdate", d), () => {
|
|
3790
|
-
l.off("selectionUpdate", d);
|
|
3791
|
-
};
|
|
3792
|
-
}, [r, l, e]);
|
|
3793
|
-
const s = $(() => !t || !l, [t, l]), c = $(() => !t || !l, [t, l]);
|
|
3794
|
-
return {
|
|
3795
|
-
disabled: s,
|
|
3796
|
-
// can not action, opacity < 1
|
|
3797
|
-
dataState: o,
|
|
3798
|
-
// true => show background, false => no background
|
|
3799
|
-
editorDisabled: c,
|
|
3800
|
-
update: () => i({})
|
|
3801
|
-
// force update
|
|
3802
|
-
};
|
|
3803
|
-
}
|
|
3804
|
-
function ce(e) {
|
|
3805
|
-
const t = ee();
|
|
3806
|
-
return $(() => t ? t.extensionManager.extensions.find(
|
|
3807
|
-
(i) => i.name === e
|
|
3808
|
-
) : null, [t, e]);
|
|
3809
|
-
}
|
|
3810
|
-
function Jo(e, t, r) {
|
|
3811
|
-
return e < t ? t : e > r ? r : e;
|
|
3812
|
-
}
|
|
3813
|
-
const Mo = (e) => typeof e == "number", Io = (e) => typeof e == "string", To = (e) => typeof e == "function";
|
|
3814
|
-
function zo(e, t = "px") {
|
|
3815
|
-
if (!e) return e;
|
|
3816
|
-
const r = Mo(e) ? String(e) : e, i = Number.parseFloat(r), o = r.match(/[%a-z]+$/i), a = o ? o[0] : t;
|
|
3817
|
-
return Number.isNaN(i) ? e : i + a;
|
|
3818
|
-
}
|
|
3819
|
-
function Qo(e, t) {
|
|
3820
|
-
if (!e)
|
|
3821
|
-
return !1;
|
|
3822
|
-
const { extensions: r = [] } = (e == null ? void 0 : e.extensionManager) ?? {};
|
|
3823
|
-
return !!r.find((o) => o.name === t);
|
|
3824
|
-
}
|
|
3825
|
-
function ea(e) {
|
|
3826
|
-
return e.map((t) => Io(t) ? { value: t, name: t } : t);
|
|
3827
|
-
}
|
|
3828
|
-
function Ht(e) {
|
|
3829
|
-
const t = ee(), r = ce(e), { t: i } = oe();
|
|
3830
|
-
return $(() => {
|
|
3831
|
-
if (!t || !r || !i)
|
|
3832
|
-
return null;
|
|
3833
|
-
const { button: o } = r.options;
|
|
3834
|
-
return !o || !To(o) ? null : o({
|
|
3835
|
-
editor: t,
|
|
3836
|
-
extension: r,
|
|
3837
|
-
t: i
|
|
3838
|
-
});
|
|
3839
|
-
}, [t, r, i]);
|
|
3840
|
-
}
|
|
3841
|
-
function So(e, t) {
|
|
4396
|
+
function ba(e, t) {
|
|
3842
4397
|
const r = e.type, i = e.name.toLowerCase(), o = i.split(".").pop();
|
|
3843
4398
|
if (!o) return !1;
|
|
3844
4399
|
const l = r || {
|
|
@@ -3861,10 +4416,10 @@ function So(e, t) {
|
|
|
3861
4416
|
return l === s;
|
|
3862
4417
|
});
|
|
3863
4418
|
}
|
|
3864
|
-
function
|
|
4419
|
+
function nt(e, t) {
|
|
3865
4420
|
const { acceptMimes: r, maxSize: i, t: o, toast: a } = t, l = [];
|
|
3866
4421
|
return (Array.isArray(e) ? e : Object.values(e)).forEach((c) => {
|
|
3867
|
-
if (!
|
|
4422
|
+
if (!ba(c, r)) {
|
|
3868
4423
|
t.onError ? t.onError({
|
|
3869
4424
|
type: "type",
|
|
3870
4425
|
message: o("editor.upload.fileTypeNotSupported", {
|
|
@@ -3900,55 +4455,55 @@ function Ge(e, t) {
|
|
|
3900
4455
|
l.push(c);
|
|
3901
4456
|
}), l;
|
|
3902
4457
|
}
|
|
3903
|
-
function
|
|
3904
|
-
const { t: e } =
|
|
3905
|
-
function
|
|
3906
|
-
var
|
|
3907
|
-
const L = (
|
|
4458
|
+
function Ga() {
|
|
4459
|
+
const { t: e } = ne(), { toast: t } = Ke(), r = ee(), i = it(Ve.name), { icon: o, tooltip: a } = (i == null ? void 0 : i.componentProps) ?? {}, { editorDisabled: l } = xe(), [s, c] = I(!1), d = de(Ve.name), [f, g] = I(""), [u, v] = I(""), p = me(null), k = (d == null ? void 0 : d.options.defaultInline) || !1, [h, x] = I(k), m = F(() => d == null ? void 0 : d.options, [d]);
|
|
4460
|
+
function T(C) {
|
|
4461
|
+
var U;
|
|
4462
|
+
const L = (U = C == null ? void 0 : C.target) == null ? void 0 : U.files;
|
|
3908
4463
|
if (!r || r.isDestroyed || L.length === 0) {
|
|
3909
|
-
|
|
4464
|
+
C.target.value = "";
|
|
3910
4465
|
return;
|
|
3911
4466
|
}
|
|
3912
|
-
const
|
|
4467
|
+
const H = nt(L, {
|
|
3913
4468
|
acceptMimes: m == null ? void 0 : m.acceptMimes,
|
|
3914
4469
|
maxSize: m == null ? void 0 : m.maxSize,
|
|
3915
4470
|
t: e,
|
|
3916
4471
|
toast: t,
|
|
3917
4472
|
onError: m.onError
|
|
3918
4473
|
});
|
|
3919
|
-
if (
|
|
3920
|
-
|
|
4474
|
+
if (H.length <= 0) {
|
|
4475
|
+
C.target.value = "";
|
|
3921
4476
|
return;
|
|
3922
4477
|
}
|
|
3923
4478
|
c(!1);
|
|
3924
|
-
const
|
|
3925
|
-
if (
|
|
3926
|
-
const
|
|
3927
|
-
for (const
|
|
4479
|
+
const P = u, O = h;
|
|
4480
|
+
if (v(""), x(k), m.upload) {
|
|
4481
|
+
const S = m != null && m.multiple ? H : [H[0]];
|
|
4482
|
+
for (const w of S)
|
|
3928
4483
|
r.chain().focus().insertImagePlaceholder({
|
|
3929
|
-
file:
|
|
3930
|
-
inline:
|
|
3931
|
-
alt:
|
|
4484
|
+
file: w,
|
|
4485
|
+
inline: O,
|
|
4486
|
+
alt: P
|
|
3932
4487
|
}).run();
|
|
3933
4488
|
} else {
|
|
3934
|
-
const
|
|
3935
|
-
for (const
|
|
3936
|
-
const
|
|
3937
|
-
r.chain().focus().setImageInline({ src:
|
|
4489
|
+
const S = m != null && m.multiple ? H : [H[0]];
|
|
4490
|
+
for (const w of S) {
|
|
4491
|
+
const N = URL.createObjectURL(w);
|
|
4492
|
+
r.chain().focus().setImageInline({ src: N, inline: O, alt: P }).run();
|
|
3938
4493
|
}
|
|
3939
4494
|
}
|
|
3940
|
-
|
|
4495
|
+
C.target.value = "";
|
|
3941
4496
|
}
|
|
3942
|
-
function
|
|
3943
|
-
|
|
4497
|
+
function b(C) {
|
|
4498
|
+
C.preventDefault(), C.stopPropagation(), r.chain().focus().setImageInline({ src: f, inline: h, alt: u }).run(), c(!1), x(k), g(""), v("");
|
|
3944
4499
|
}
|
|
3945
|
-
function A(
|
|
4500
|
+
function A(C) {
|
|
3946
4501
|
var L;
|
|
3947
|
-
|
|
4502
|
+
C.preventDefault(), (L = p.current) == null || L.click();
|
|
3948
4503
|
}
|
|
3949
|
-
return i ? /* @__PURE__ */
|
|
3950
|
-
/* @__PURE__ */ n(
|
|
3951
|
-
|
|
4504
|
+
return i ? /* @__PURE__ */ y(ge, { onOpenChange: c, open: s, children: [
|
|
4505
|
+
/* @__PURE__ */ n(rt, { asChild: !0, children: /* @__PURE__ */ n(
|
|
4506
|
+
fe,
|
|
3952
4507
|
{
|
|
3953
4508
|
disabled: l,
|
|
3954
4509
|
icon: o,
|
|
@@ -3958,46 +4513,46 @@ function ta() {
|
|
|
3958
4513
|
}
|
|
3959
4514
|
}
|
|
3960
4515
|
) }),
|
|
3961
|
-
/* @__PURE__ */
|
|
3962
|
-
/* @__PURE__ */ n(
|
|
3963
|
-
/* @__PURE__ */
|
|
3964
|
-
|
|
4516
|
+
/* @__PURE__ */ y(le, { children: [
|
|
4517
|
+
/* @__PURE__ */ n(ce, { children: e("editor.image.dialog.title") }),
|
|
4518
|
+
/* @__PURE__ */ y(
|
|
4519
|
+
_e,
|
|
3965
4520
|
{
|
|
3966
4521
|
activationMode: "manual",
|
|
3967
4522
|
defaultValue: m.resourceImage === "both" || m.resourceImage === "upload" ? "upload" : "link",
|
|
3968
4523
|
children: [
|
|
3969
|
-
m.resourceImage === "both" && /* @__PURE__ */
|
|
3970
|
-
/* @__PURE__ */ n(
|
|
3971
|
-
/* @__PURE__ */ n(
|
|
4524
|
+
m.resourceImage === "both" && /* @__PURE__ */ y(Ne, { className: "richtext-grid richtext-w-full richtext-grid-cols-2", children: [
|
|
4525
|
+
/* @__PURE__ */ n(K, { value: "upload", children: e("editor.image.dialog.tab.upload") }),
|
|
4526
|
+
/* @__PURE__ */ n(K, { value: "link", children: e("editor.image.dialog.tab.url") })
|
|
3972
4527
|
] }),
|
|
3973
|
-
/* @__PURE__ */
|
|
4528
|
+
/* @__PURE__ */ y("div", { className: "richtext-my-[10px] richtext-flex richtext-items-center richtext-gap-[4px]", children: [
|
|
3974
4529
|
/* @__PURE__ */ n(
|
|
3975
|
-
|
|
4530
|
+
Qe,
|
|
3976
4531
|
{
|
|
3977
|
-
checked:
|
|
3978
|
-
onCheckedChange: (
|
|
3979
|
-
|
|
4532
|
+
checked: h,
|
|
4533
|
+
onCheckedChange: (C) => {
|
|
4534
|
+
x(C);
|
|
3980
4535
|
}
|
|
3981
4536
|
}
|
|
3982
4537
|
),
|
|
3983
|
-
/* @__PURE__ */ n(
|
|
4538
|
+
/* @__PURE__ */ n(ke, { children: e("editor.link.dialog.inline") })
|
|
3984
4539
|
] }),
|
|
3985
|
-
m.enableAlt && /* @__PURE__ */
|
|
3986
|
-
/* @__PURE__ */ n(
|
|
4540
|
+
m.enableAlt && /* @__PURE__ */ y("div", { className: "richtext-my-[10px]", children: [
|
|
4541
|
+
/* @__PURE__ */ n(ke, { className: "mb-[6px]", children: e("editor.imageUpload.alt") }),
|
|
3987
4542
|
/* @__PURE__ */ n(
|
|
3988
|
-
|
|
4543
|
+
ae,
|
|
3989
4544
|
{
|
|
3990
|
-
onChange: (
|
|
4545
|
+
onChange: (C) => v(C.target.value),
|
|
3991
4546
|
required: !0,
|
|
3992
4547
|
type: "text",
|
|
3993
|
-
value:
|
|
4548
|
+
value: u
|
|
3994
4549
|
}
|
|
3995
4550
|
)
|
|
3996
4551
|
] }),
|
|
3997
|
-
/* @__PURE__ */
|
|
3998
|
-
/* @__PURE__ */
|
|
4552
|
+
/* @__PURE__ */ y(Q, { value: "upload", children: [
|
|
4553
|
+
/* @__PURE__ */ y("div", { className: "richtext-flex richtext-items-center richtext-gap-[10px]", children: [
|
|
3999
4554
|
/* @__PURE__ */ n(
|
|
4000
|
-
|
|
4555
|
+
X,
|
|
4001
4556
|
{
|
|
4002
4557
|
className: "richtext-mt-1 richtext-w-full",
|
|
4003
4558
|
onClick: A,
|
|
@@ -4006,14 +4561,14 @@ function ta() {
|
|
|
4006
4561
|
}
|
|
4007
4562
|
),
|
|
4008
4563
|
/* @__PURE__ */ n(
|
|
4009
|
-
|
|
4564
|
+
Jt,
|
|
4010
4565
|
{
|
|
4011
|
-
alt:
|
|
4566
|
+
alt: u,
|
|
4012
4567
|
disabled: !1,
|
|
4013
4568
|
editor: r,
|
|
4014
|
-
imageInline:
|
|
4569
|
+
imageInline: h,
|
|
4015
4570
|
onClose: () => {
|
|
4016
|
-
|
|
4571
|
+
v("");
|
|
4017
4572
|
}
|
|
4018
4573
|
}
|
|
4019
4574
|
)
|
|
@@ -4023,34 +4578,34 @@ function ta() {
|
|
|
4023
4578
|
{
|
|
4024
4579
|
accept: m.acceptMimes.join(",") || "image/*",
|
|
4025
4580
|
multiple: m.multiple,
|
|
4026
|
-
onChange:
|
|
4027
|
-
ref:
|
|
4581
|
+
onChange: T,
|
|
4582
|
+
ref: p,
|
|
4028
4583
|
style: { display: "none" },
|
|
4029
4584
|
type: "file"
|
|
4030
4585
|
}
|
|
4031
4586
|
)
|
|
4032
4587
|
] }),
|
|
4033
|
-
/* @__PURE__ */ n(
|
|
4588
|
+
/* @__PURE__ */ n(Q, { value: "link", children: /* @__PURE__ */ n("form", { onSubmit: b, children: /* @__PURE__ */ y("div", { className: "richtext-flex richtext-items-center richtext-gap-2", children: [
|
|
4034
4589
|
/* @__PURE__ */ n(
|
|
4035
|
-
|
|
4590
|
+
ae,
|
|
4036
4591
|
{
|
|
4037
4592
|
autoFocus: !0,
|
|
4038
|
-
onChange: (
|
|
4593
|
+
onChange: (C) => g(C.target.value),
|
|
4039
4594
|
placeholder: e("editor.image.dialog.placeholder"),
|
|
4040
4595
|
required: !0,
|
|
4041
4596
|
type: "url",
|
|
4042
|
-
value:
|
|
4597
|
+
value: f
|
|
4043
4598
|
}
|
|
4044
4599
|
),
|
|
4045
|
-
/* @__PURE__ */ n(
|
|
4600
|
+
/* @__PURE__ */ n(X, { type: "submit", children: e("editor.image.dialog.button.apply") })
|
|
4046
4601
|
] }) }) })
|
|
4047
4602
|
]
|
|
4048
4603
|
}
|
|
4049
4604
|
)
|
|
4050
4605
|
] })
|
|
4051
|
-
] }) : /* @__PURE__ */ n(
|
|
4606
|
+
] }) : /* @__PURE__ */ n(q, {});
|
|
4052
4607
|
}
|
|
4053
|
-
const
|
|
4608
|
+
const va = {
|
|
4054
4609
|
acceptMimes: ["image/jpeg", "image/gif", "image/png", "image/jpg"],
|
|
4055
4610
|
maxSize: 1024 * 1024 * 5,
|
|
4056
4611
|
// 5MB
|
|
@@ -4058,7 +4613,7 @@ const Ao = {
|
|
|
4058
4613
|
resourceImage: "both",
|
|
4059
4614
|
defaultInline: !1,
|
|
4060
4615
|
enableAlt: !0
|
|
4061
|
-
},
|
|
4616
|
+
}, Ve = /* @__PURE__ */ Bo.extend({
|
|
4062
4617
|
group: "inline",
|
|
4063
4618
|
inline: !0,
|
|
4064
4619
|
defining: !0,
|
|
@@ -4067,7 +4622,7 @@ const Ao = {
|
|
|
4067
4622
|
addOptions() {
|
|
4068
4623
|
var e;
|
|
4069
4624
|
return {
|
|
4070
|
-
...
|
|
4625
|
+
...va,
|
|
4071
4626
|
...(e = this.parent) == null ? void 0 : e.call(this),
|
|
4072
4627
|
upload: () => Promise.reject("Image Upload Function"),
|
|
4073
4628
|
button: ({
|
|
@@ -4144,7 +4699,7 @@ const Ao = {
|
|
|
4144
4699
|
};
|
|
4145
4700
|
},
|
|
4146
4701
|
addNodeView() {
|
|
4147
|
-
return
|
|
4702
|
+
return wt(xa);
|
|
4148
4703
|
},
|
|
4149
4704
|
addCommands() {
|
|
4150
4705
|
var r;
|
|
@@ -4175,34 +4730,34 @@ const Ao = {
|
|
|
4175
4730
|
imageId: null
|
|
4176
4731
|
}
|
|
4177
4732
|
})) return !1;
|
|
4178
|
-
const
|
|
4179
|
-
return
|
|
4180
|
-
const { doc:
|
|
4181
|
-
let
|
|
4182
|
-
|
|
4183
|
-
if (
|
|
4184
|
-
return
|
|
4185
|
-
}),
|
|
4186
|
-
l.state.tr.setNodeMarkup(
|
|
4187
|
-
...l.state.doc.nodeAt(
|
|
4188
|
-
src:
|
|
4189
|
-
imageId:
|
|
4733
|
+
const f = t.upload;
|
|
4734
|
+
return f && f(i).then((g) => {
|
|
4735
|
+
const { doc: u } = l.state;
|
|
4736
|
+
let v = null;
|
|
4737
|
+
u.descendants((p, k) => {
|
|
4738
|
+
if (p.type.name === e && p.attrs.uploading === !0 && p.attrs.src === c)
|
|
4739
|
+
return v = k, !1;
|
|
4740
|
+
}), v !== null && l.view.dispatch(
|
|
4741
|
+
l.state.tr.setNodeMarkup(v, void 0, {
|
|
4742
|
+
...l.state.doc.nodeAt(v).attrs,
|
|
4743
|
+
src: g.cdnUrl,
|
|
4744
|
+
imageId: g.imageId,
|
|
4190
4745
|
uploading: !1
|
|
4191
4746
|
})
|
|
4192
4747
|
), URL.revokeObjectURL(c);
|
|
4193
|
-
}).catch((
|
|
4194
|
-
console.error("Image upload failed",
|
|
4195
|
-
const { doc:
|
|
4196
|
-
let
|
|
4197
|
-
if (
|
|
4198
|
-
if (
|
|
4199
|
-
return
|
|
4200
|
-
}),
|
|
4201
|
-
const
|
|
4202
|
-
|
|
4748
|
+
}).catch((g) => {
|
|
4749
|
+
console.error("Image upload failed", g);
|
|
4750
|
+
const { doc: u } = l.state;
|
|
4751
|
+
let v = null;
|
|
4752
|
+
if (u.descendants((p, k) => {
|
|
4753
|
+
if (p.type.name === e && p.attrs.uploading === !0 && p.attrs.src === c)
|
|
4754
|
+
return v = k, !1;
|
|
4755
|
+
}), v !== null) {
|
|
4756
|
+
const p = l.state.doc.nodeAt(v);
|
|
4757
|
+
p && l.view.dispatch(
|
|
4203
4758
|
l.state.tr.delete(
|
|
4204
|
-
|
|
4205
|
-
|
|
4759
|
+
v,
|
|
4760
|
+
v + p.nodeSize
|
|
4206
4761
|
)
|
|
4207
4762
|
);
|
|
4208
4763
|
}
|
|
@@ -4214,7 +4769,7 @@ const Ao = {
|
|
|
4214
4769
|
};
|
|
4215
4770
|
},
|
|
4216
4771
|
renderHTML({ HTMLAttributes: e }) {
|
|
4217
|
-
const { flipX: t, flipY: r, align: i, inline: o } = e, a = o && (i === "left" || i === "right"), l = t || r ? `transform: rotateX(${t ? "180" : "0"}deg) rotateY(${r ? "180" : "0"}deg);` : "", s = a ? "" : `text-align: ${i};`,
|
|
4772
|
+
const { flipX: t, flipY: r, align: i, inline: o } = e, a = o && (i === "left" || i === "right"), l = t || r ? `transform: rotateX(${t ? "180" : "0"}deg) rotateY(${r ? "180" : "0"}deg);` : "", s = a ? "" : `text-align: ${i};`, f = `${a ? `float: ${i};` : ""}${a ? i === "left" ? "margin: 1em 1em 1em 0;" : "margin: 1em 0 1em 1em;" : ""}${l}`;
|
|
4218
4773
|
return [
|
|
4219
4774
|
o ? "span" : "div",
|
|
4220
4775
|
{
|
|
@@ -4223,10 +4778,10 @@ const Ao = {
|
|
|
4223
4778
|
},
|
|
4224
4779
|
[
|
|
4225
4780
|
"img",
|
|
4226
|
-
|
|
4781
|
+
Ye(
|
|
4227
4782
|
{
|
|
4228
4783
|
height: "auto",
|
|
4229
|
-
style:
|
|
4784
|
+
style: f
|
|
4230
4785
|
},
|
|
4231
4786
|
this.options.HTMLAttributes,
|
|
4232
4787
|
e
|
|
@@ -4330,202 +4885,167 @@ const Ao = {
|
|
|
4330
4885
|
// ];
|
|
4331
4886
|
// },
|
|
4332
4887
|
});
|
|
4333
|
-
function
|
|
4334
|
-
return e.replace(/^.*\/|\..+$/g, "");
|
|
4335
|
-
}
|
|
4336
|
-
function ia(e) {
|
|
4337
|
-
return e.split(".").pop();
|
|
4338
|
-
}
|
|
4339
|
-
function na(e) {
|
|
4340
|
-
return e < 1024 ? `${e} Byte` : e < 1024 * 1024 ? `${(e / 1024).toFixed(2)} KB` : `${(e / 1024 / 1024).toFixed(2)} MB`;
|
|
4341
|
-
}
|
|
4342
|
-
function oa(e) {
|
|
4343
|
-
return e ? e === "application/pdf" ? "pdf" : e.startsWith("application/") && [".document", "word"].some((t) => e.includes(t)) ? "word" : e.startsWith("application/") && ["presentation"].some((t) => e.includes(t)) ? "excel" : e.startsWith("application/") && ["sheet"].some((t) => e.includes(t)) ? "ppt" : e.startsWith("image") ? "image" : e.startsWith("audio") ? "audio" : e.startsWith("video") ? "video" : "file" : "file";
|
|
4344
|
-
}
|
|
4345
|
-
function Lo(e) {
|
|
4346
|
-
return new Promise((t) => {
|
|
4347
|
-
const r = new FileReader();
|
|
4348
|
-
r.addEventListener(
|
|
4349
|
-
"load",
|
|
4350
|
-
() => {
|
|
4351
|
-
t({
|
|
4352
|
-
alt: e.name,
|
|
4353
|
-
src: r.result
|
|
4354
|
-
});
|
|
4355
|
-
},
|
|
4356
|
-
!1
|
|
4357
|
-
), r.readAsDataURL(e);
|
|
4358
|
-
});
|
|
4359
|
-
}
|
|
4360
|
-
function No(e, t) {
|
|
4361
|
-
const r = e.split(","), i = r[0].match(/:(.*?);/)[1], o = atob(r[r.length - 1]);
|
|
4362
|
-
let a = o.length;
|
|
4363
|
-
const l = new Uint8Array(a);
|
|
4364
|
-
for (; a--; )
|
|
4365
|
-
l[a] = o.charCodeAt(a);
|
|
4366
|
-
return new File([l], t, { type: i });
|
|
4367
|
-
}
|
|
4368
|
-
function Dt({
|
|
4888
|
+
function Jt({
|
|
4369
4889
|
editor: e,
|
|
4370
4890
|
imageInline: t,
|
|
4371
4891
|
onClose: r,
|
|
4372
4892
|
disabled: i,
|
|
4373
4893
|
alt: o
|
|
4374
4894
|
}) {
|
|
4375
|
-
var
|
|
4376
|
-
const { t: a } =
|
|
4895
|
+
var U, S;
|
|
4896
|
+
const { t: a } = ne(), { toast: l } = Ke(), [s, c] = I(!1), [d, f] = I(!1), g = ie.useRef(null), [u, v] = ie.useState(), [p, k] = ie.useState(""), h = me(null), [x, m] = I({
|
|
4377
4897
|
src: "",
|
|
4378
4898
|
file: null
|
|
4379
|
-
}),
|
|
4380
|
-
function A(
|
|
4381
|
-
if (
|
|
4382
|
-
const
|
|
4383
|
-
k(
|
|
4899
|
+
}), T = de(Ve.name), b = F(() => (T == null ? void 0 : T.options) ?? {}, [T]);
|
|
4900
|
+
function A(w) {
|
|
4901
|
+
if (g.current && w.width && w.height) {
|
|
4902
|
+
const N = C(g.current, w);
|
|
4903
|
+
k(N);
|
|
4384
4904
|
}
|
|
4385
4905
|
}
|
|
4386
|
-
function w
|
|
4387
|
-
const
|
|
4388
|
-
|
|
4389
|
-
const
|
|
4390
|
-
return
|
|
4391
|
-
|
|
4392
|
-
|
|
4393
|
-
|
|
4394
|
-
|
|
4395
|
-
|
|
4906
|
+
function C(w, N) {
|
|
4907
|
+
const V = document.createElement("canvas"), j = w.naturalWidth / w.width, B = w.naturalHeight / w.height;
|
|
4908
|
+
V.width = N.width * j, V.height = N.height * B;
|
|
4909
|
+
const z = V.getContext("2d");
|
|
4910
|
+
return z && (z.imageSmoothingEnabled = !1, z.drawImage(
|
|
4911
|
+
w,
|
|
4912
|
+
N.x * j,
|
|
4913
|
+
N.y * B,
|
|
4914
|
+
N.width * j,
|
|
4915
|
+
N.height * B,
|
|
4396
4916
|
0,
|
|
4397
4917
|
0,
|
|
4398
|
-
|
|
4399
|
-
|
|
4400
|
-
)),
|
|
4918
|
+
N.width * j,
|
|
4919
|
+
N.height * B
|
|
4920
|
+
)), V.toDataURL("image/png", 1);
|
|
4401
4921
|
}
|
|
4402
|
-
const L =
|
|
4403
|
-
var
|
|
4922
|
+
const L = ie.useCallback(() => {
|
|
4923
|
+
var N;
|
|
4404
4924
|
if (d) return;
|
|
4405
|
-
const
|
|
4406
|
-
|
|
4407
|
-
((
|
|
4925
|
+
const w = xo(
|
|
4926
|
+
p,
|
|
4927
|
+
((N = x == null ? void 0 : x.file) == null ? void 0 : N.name) || "image.png"
|
|
4408
4928
|
);
|
|
4409
4929
|
if (c(!1), m({
|
|
4410
4930
|
src: "",
|
|
4411
4931
|
file: null
|
|
4412
|
-
}),
|
|
4932
|
+
}), O(), r(), b.upload)
|
|
4413
4933
|
e.chain().focus().insertImagePlaceholder({
|
|
4414
|
-
file:
|
|
4934
|
+
file: w,
|
|
4415
4935
|
inline: t,
|
|
4416
4936
|
alt: o
|
|
4417
4937
|
}).run();
|
|
4418
4938
|
else {
|
|
4419
|
-
const
|
|
4420
|
-
e.chain().focus().setImageInline({ src:
|
|
4939
|
+
const V = URL.createObjectURL(w);
|
|
4940
|
+
e.chain().focus().setImageInline({ src: V, inline: t, alt: o }).run();
|
|
4421
4941
|
}
|
|
4422
4942
|
}, [
|
|
4423
|
-
|
|
4943
|
+
p,
|
|
4424
4944
|
e,
|
|
4425
4945
|
t,
|
|
4426
4946
|
d,
|
|
4427
4947
|
r,
|
|
4428
|
-
(
|
|
4429
|
-
|
|
4948
|
+
(U = x == null ? void 0 : x.file) == null ? void 0 : U.name,
|
|
4949
|
+
b,
|
|
4430
4950
|
o
|
|
4431
4951
|
]);
|
|
4432
|
-
function
|
|
4433
|
-
var
|
|
4434
|
-
|
|
4952
|
+
function H(w) {
|
|
4953
|
+
var N;
|
|
4954
|
+
w.preventDefault(), (N = h.current) == null || N.click();
|
|
4435
4955
|
}
|
|
4436
|
-
const
|
|
4437
|
-
var
|
|
4438
|
-
const
|
|
4439
|
-
if (!e || e.isDestroyed ||
|
|
4440
|
-
|
|
4956
|
+
const P = async (w) => {
|
|
4957
|
+
var z;
|
|
4958
|
+
const N = (z = w == null ? void 0 : w.target) == null ? void 0 : z.files;
|
|
4959
|
+
if (!e || e.isDestroyed || N.length === 0) {
|
|
4960
|
+
w.target.value = "";
|
|
4441
4961
|
return;
|
|
4442
4962
|
}
|
|
4443
|
-
const
|
|
4444
|
-
acceptMimes:
|
|
4445
|
-
maxSize:
|
|
4963
|
+
const V = nt(N, {
|
|
4964
|
+
acceptMimes: b == null ? void 0 : b.acceptMimes,
|
|
4965
|
+
maxSize: b == null ? void 0 : b.maxSize,
|
|
4446
4966
|
t: a,
|
|
4447
4967
|
toast: l,
|
|
4448
|
-
onError:
|
|
4968
|
+
onError: b.onError
|
|
4449
4969
|
});
|
|
4450
|
-
if (
|
|
4451
|
-
|
|
4970
|
+
if (V.length <= 0) {
|
|
4971
|
+
w.target.value = "";
|
|
4452
4972
|
return;
|
|
4453
4973
|
}
|
|
4454
|
-
const
|
|
4974
|
+
const j = V[0], B = await go(j);
|
|
4455
4975
|
c(!0), m({
|
|
4456
|
-
src:
|
|
4457
|
-
file:
|
|
4976
|
+
src: B.src,
|
|
4977
|
+
file: j
|
|
4458
4978
|
});
|
|
4459
|
-
},
|
|
4460
|
-
|
|
4979
|
+
}, O = () => {
|
|
4980
|
+
h.current && (h.current.value = "");
|
|
4461
4981
|
};
|
|
4462
|
-
return /* @__PURE__ */
|
|
4982
|
+
return /* @__PURE__ */ y(q, { children: [
|
|
4463
4983
|
/* @__PURE__ */ n(
|
|
4464
|
-
|
|
4984
|
+
X,
|
|
4465
4985
|
{
|
|
4466
4986
|
className: "richtext-mt-1 richtext-w-full",
|
|
4467
4987
|
disabled: i,
|
|
4468
|
-
onClick:
|
|
4988
|
+
onClick: H,
|
|
4469
4989
|
size: "sm",
|
|
4470
4990
|
children: a("editor.image.dialog.tab.uploadCrop")
|
|
4471
4991
|
}
|
|
4472
4992
|
),
|
|
4473
|
-
/* @__PURE__ */
|
|
4474
|
-
|
|
4993
|
+
/* @__PURE__ */ y(
|
|
4994
|
+
ge,
|
|
4475
4995
|
{
|
|
4476
4996
|
open: s,
|
|
4477
|
-
onOpenChange: (
|
|
4478
|
-
c(
|
|
4997
|
+
onOpenChange: (w) => {
|
|
4998
|
+
c(w), w || (m({ src: "", file: null }), O());
|
|
4479
4999
|
},
|
|
4480
5000
|
children: [
|
|
4481
|
-
/* @__PURE__ */ n(
|
|
4482
|
-
/* @__PURE__ */
|
|
4483
|
-
/* @__PURE__ */ n(
|
|
4484
|
-
/* @__PURE__ */ n("div", { children:
|
|
4485
|
-
|
|
5001
|
+
/* @__PURE__ */ n(rt, {}),
|
|
5002
|
+
/* @__PURE__ */ y(le, { children: [
|
|
5003
|
+
/* @__PURE__ */ n(ce, { children: a("editor.image.dialog.tab.uploadCrop") }),
|
|
5004
|
+
/* @__PURE__ */ n("div", { children: x.src && /* @__PURE__ */ n(
|
|
5005
|
+
Ei,
|
|
4486
5006
|
{
|
|
4487
5007
|
className: "richtext-w-full",
|
|
4488
|
-
crop:
|
|
4489
|
-
onChange: (
|
|
4490
|
-
onComplete: (
|
|
4491
|
-
children: /* @__PURE__ */ n("img", { alt: "Crop me", ref:
|
|
5008
|
+
crop: u,
|
|
5009
|
+
onChange: (w) => v(w),
|
|
5010
|
+
onComplete: (w) => A(w),
|
|
5011
|
+
children: /* @__PURE__ */ n("img", { alt: "Crop me", ref: g, src: x.src })
|
|
4492
5012
|
}
|
|
4493
5013
|
) }),
|
|
4494
|
-
/* @__PURE__ */
|
|
4495
|
-
/* @__PURE__ */
|
|
4496
|
-
|
|
5014
|
+
/* @__PURE__ */ y(Ot, { children: [
|
|
5015
|
+
/* @__PURE__ */ y(
|
|
5016
|
+
X,
|
|
4497
5017
|
{
|
|
4498
5018
|
disabled: d,
|
|
4499
5019
|
onClick: () => {
|
|
4500
5020
|
c(!1), m({
|
|
4501
5021
|
src: "",
|
|
4502
5022
|
file: null
|
|
4503
|
-
}),
|
|
5023
|
+
}), O();
|
|
4504
5024
|
},
|
|
4505
5025
|
children: [
|
|
4506
5026
|
a("editor.imageUpload.cancel"),
|
|
4507
|
-
/* @__PURE__ */ n(
|
|
5027
|
+
/* @__PURE__ */ n(Oe, { className: "richtext-ml-1", name: "Trash2" })
|
|
4508
5028
|
]
|
|
4509
5029
|
}
|
|
4510
5030
|
),
|
|
4511
5031
|
/* @__PURE__ */ n(
|
|
4512
|
-
|
|
5032
|
+
X,
|
|
4513
5033
|
{
|
|
4514
5034
|
className: "richtext-w-fit",
|
|
4515
|
-
disabled: d || !
|
|
5035
|
+
disabled: d || !u,
|
|
4516
5036
|
onClick: L,
|
|
4517
|
-
children: d ? /* @__PURE__ */
|
|
5037
|
+
children: d ? /* @__PURE__ */ y(q, { children: [
|
|
4518
5038
|
a("editor.imageUpload.uploading"),
|
|
4519
5039
|
/* @__PURE__ */ n(
|
|
4520
|
-
|
|
5040
|
+
Oe,
|
|
4521
5041
|
{
|
|
4522
5042
|
className: "richtext-ml-1 richtext-animate-spin",
|
|
4523
5043
|
name: "Loader"
|
|
4524
5044
|
}
|
|
4525
5045
|
)
|
|
4526
|
-
] }) : /* @__PURE__ */
|
|
5046
|
+
] }) : /* @__PURE__ */ y(q, { children: [
|
|
4527
5047
|
a("editor.imageUpload.crop"),
|
|
4528
|
-
/* @__PURE__ */ n(
|
|
5048
|
+
/* @__PURE__ */ n(Oe, { className: "richtext-ml-1", name: "Crop" })
|
|
4529
5049
|
] })
|
|
4530
5050
|
}
|
|
4531
5051
|
)
|
|
@@ -4537,125 +5057,120 @@ function Dt({
|
|
|
4537
5057
|
/* @__PURE__ */ n(
|
|
4538
5058
|
"input",
|
|
4539
5059
|
{
|
|
4540
|
-
accept: ((
|
|
5060
|
+
accept: ((S = b == null ? void 0 : b.acceptMimes) == null ? void 0 : S.join(",")) || "image/*",
|
|
4541
5061
|
multiple: !1,
|
|
4542
|
-
onChange:
|
|
4543
|
-
ref:
|
|
5062
|
+
onChange: P,
|
|
5063
|
+
ref: h,
|
|
4544
5064
|
style: { display: "none" },
|
|
4545
5065
|
type: "file"
|
|
4546
5066
|
}
|
|
4547
5067
|
)
|
|
4548
5068
|
] });
|
|
4549
5069
|
}
|
|
4550
|
-
|
|
4551
|
-
|
|
4552
|
-
|
|
4553
|
-
|
|
4554
|
-
|
|
4555
|
-
|
|
4556
|
-
|
|
4557
|
-
It(a, [l]);
|
|
4558
|
-
const s = ce(ze.name), [c, d] = E(""), [g, p] = E(""), h = xe(null), b = (s == null ? void 0 : s.options.defaultInline) || !1, [f, k] = E(b), u = $(() => s == null ? void 0 : s.options, [s]);
|
|
4559
|
-
function y(v) {
|
|
4560
|
-
var D;
|
|
4561
|
-
const A = (D = v == null ? void 0 : v.target) == null ? void 0 : D.files;
|
|
5070
|
+
function wa() {
|
|
5071
|
+
const { t: e } = ne(), { toast: t } = Ke(), r = ee(), { editorDisabled: i } = xe(), [o, a] = I(!1), l = He.UPLOAD_IMAGE(r.id);
|
|
5072
|
+
tt(a, [l]);
|
|
5073
|
+
const s = de(Ve.name), [c, d] = I(""), [f, g] = I(""), u = me(null), v = (s == null ? void 0 : s.options.defaultInline) || !1, [p, k] = I(v), h = F(() => s == null ? void 0 : s.options, [s]);
|
|
5074
|
+
function x(b) {
|
|
5075
|
+
var P;
|
|
5076
|
+
const A = (P = b == null ? void 0 : b.target) == null ? void 0 : P.files;
|
|
4562
5077
|
if (!r || r.isDestroyed || A.length === 0) {
|
|
4563
|
-
|
|
5078
|
+
b.target.value = "";
|
|
4564
5079
|
return;
|
|
4565
5080
|
}
|
|
4566
|
-
const
|
|
4567
|
-
acceptMimes:
|
|
4568
|
-
maxSize:
|
|
5081
|
+
const C = nt(A, {
|
|
5082
|
+
acceptMimes: h == null ? void 0 : h.acceptMimes,
|
|
5083
|
+
maxSize: h == null ? void 0 : h.maxSize,
|
|
4569
5084
|
t: e,
|
|
4570
5085
|
toast: t,
|
|
4571
|
-
onError:
|
|
5086
|
+
onError: h.onError
|
|
4572
5087
|
});
|
|
4573
|
-
if (
|
|
4574
|
-
|
|
5088
|
+
if (C.length <= 0) {
|
|
5089
|
+
b.target.value = "";
|
|
4575
5090
|
return;
|
|
4576
5091
|
}
|
|
4577
5092
|
a(!1);
|
|
4578
|
-
const L =
|
|
4579
|
-
if (
|
|
4580
|
-
const
|
|
4581
|
-
for (const
|
|
5093
|
+
const L = f, H = p;
|
|
5094
|
+
if (g(""), k(v), h.upload) {
|
|
5095
|
+
const O = h != null && h.multiple ? C : [C[0]];
|
|
5096
|
+
for (const U of O)
|
|
4582
5097
|
r.chain().focus().insertImagePlaceholder({
|
|
4583
|
-
file:
|
|
4584
|
-
inline:
|
|
5098
|
+
file: U,
|
|
5099
|
+
inline: H,
|
|
4585
5100
|
alt: L
|
|
4586
5101
|
}).run();
|
|
4587
5102
|
} else {
|
|
4588
|
-
const
|
|
4589
|
-
for (const
|
|
4590
|
-
const
|
|
4591
|
-
r.chain().focus().setImageInline({ src:
|
|
5103
|
+
const O = h != null && h.multiple ? C : [C[0]];
|
|
5104
|
+
for (const U of O) {
|
|
5105
|
+
const S = URL.createObjectURL(U);
|
|
5106
|
+
r.chain().focus().setImageInline({ src: S, inline: H, alt: L }).run();
|
|
4592
5107
|
}
|
|
4593
5108
|
}
|
|
4594
|
-
|
|
5109
|
+
b.target.value = "";
|
|
4595
5110
|
}
|
|
4596
|
-
function m(
|
|
4597
|
-
|
|
5111
|
+
function m(b) {
|
|
5112
|
+
b.preventDefault(), b.stopPropagation(), r.chain().focus().setImageInline({ src: c, inline: p, alt: f }).run(), a(!1), k(v), d(""), g("");
|
|
4598
5113
|
}
|
|
4599
|
-
function
|
|
5114
|
+
function T(b) {
|
|
4600
5115
|
var A;
|
|
4601
|
-
|
|
5116
|
+
b.preventDefault(), (A = u.current) == null || A.click();
|
|
4602
5117
|
}
|
|
4603
|
-
return i ? /* @__PURE__ */ n(
|
|
4604
|
-
/* @__PURE__ */ n(
|
|
4605
|
-
/* @__PURE__ */
|
|
4606
|
-
|
|
5118
|
+
return i ? /* @__PURE__ */ n(q, {}) : /* @__PURE__ */ n(ge, { onOpenChange: a, open: o, children: /* @__PURE__ */ y(le, { children: [
|
|
5119
|
+
/* @__PURE__ */ n(ce, { children: e("editor.image.dialog.title") }),
|
|
5120
|
+
/* @__PURE__ */ y(
|
|
5121
|
+
_e,
|
|
4607
5122
|
{
|
|
4608
5123
|
activationMode: "manual",
|
|
4609
|
-
defaultValue:
|
|
5124
|
+
defaultValue: h.resourceImage === "both" || h.resourceImage === "upload" ? "upload" : "link",
|
|
4610
5125
|
children: [
|
|
4611
|
-
|
|
4612
|
-
/* @__PURE__ */ n(
|
|
4613
|
-
/* @__PURE__ */ n(
|
|
5126
|
+
h.resourceImage === "both" && /* @__PURE__ */ y(Ne, { className: "richtext-grid richtext-w-full richtext-grid-cols-2", children: [
|
|
5127
|
+
/* @__PURE__ */ n(K, { value: "upload", children: e("editor.image.dialog.tab.upload") }),
|
|
5128
|
+
/* @__PURE__ */ n(K, { value: "link", children: e("editor.image.dialog.tab.url") })
|
|
4614
5129
|
] }),
|
|
4615
|
-
/* @__PURE__ */
|
|
5130
|
+
/* @__PURE__ */ y("div", { className: "richtext-my-[10px] richtext-flex richtext-items-center richtext-gap-[4px]", children: [
|
|
4616
5131
|
/* @__PURE__ */ n(
|
|
4617
|
-
|
|
5132
|
+
Qe,
|
|
4618
5133
|
{
|
|
4619
|
-
checked:
|
|
4620
|
-
onCheckedChange: (
|
|
4621
|
-
k(
|
|
5134
|
+
checked: p,
|
|
5135
|
+
onCheckedChange: (b) => {
|
|
5136
|
+
k(b);
|
|
4622
5137
|
}
|
|
4623
5138
|
}
|
|
4624
5139
|
),
|
|
4625
|
-
/* @__PURE__ */ n(
|
|
5140
|
+
/* @__PURE__ */ n(ke, { children: e("editor.link.dialog.inline") })
|
|
4626
5141
|
] }),
|
|
4627
|
-
|
|
4628
|
-
/* @__PURE__ */ n(
|
|
5142
|
+
h.enableAlt && /* @__PURE__ */ y("div", { className: "richtext-my-[10px]", children: [
|
|
5143
|
+
/* @__PURE__ */ n(ke, { className: "mb-[6px]", children: e("editor.imageUpload.alt") }),
|
|
4629
5144
|
/* @__PURE__ */ n(
|
|
4630
|
-
|
|
5145
|
+
ae,
|
|
4631
5146
|
{
|
|
4632
|
-
onChange: (
|
|
5147
|
+
onChange: (b) => g(b.target.value),
|
|
4633
5148
|
required: !0,
|
|
4634
5149
|
type: "text",
|
|
4635
|
-
value:
|
|
5150
|
+
value: f
|
|
4636
5151
|
}
|
|
4637
5152
|
)
|
|
4638
5153
|
] }),
|
|
4639
|
-
/* @__PURE__ */
|
|
4640
|
-
/* @__PURE__ */
|
|
5154
|
+
/* @__PURE__ */ y(Q, { value: "upload", children: [
|
|
5155
|
+
/* @__PURE__ */ y("div", { className: "richtext-flex richtext-items-center richtext-gap-[10px]", children: [
|
|
4641
5156
|
/* @__PURE__ */ n(
|
|
4642
|
-
|
|
5157
|
+
X,
|
|
4643
5158
|
{
|
|
4644
5159
|
className: "richtext-mt-1 richtext-w-full",
|
|
4645
|
-
onClick:
|
|
5160
|
+
onClick: T,
|
|
4646
5161
|
size: "sm",
|
|
4647
5162
|
children: e("editor.image.dialog.tab.upload")
|
|
4648
5163
|
}
|
|
4649
5164
|
),
|
|
4650
5165
|
/* @__PURE__ */ n(
|
|
4651
|
-
|
|
5166
|
+
Jt,
|
|
4652
5167
|
{
|
|
4653
|
-
alt:
|
|
5168
|
+
alt: f,
|
|
4654
5169
|
disabled: !1,
|
|
4655
5170
|
editor: r,
|
|
4656
|
-
imageInline:
|
|
5171
|
+
imageInline: p,
|
|
4657
5172
|
onClose: () => {
|
|
4658
|
-
|
|
5173
|
+
g("");
|
|
4659
5174
|
}
|
|
4660
5175
|
}
|
|
4661
5176
|
)
|
|
@@ -4663,35 +5178,35 @@ function Eo() {
|
|
|
4663
5178
|
/* @__PURE__ */ n(
|
|
4664
5179
|
"input",
|
|
4665
5180
|
{
|
|
4666
|
-
accept:
|
|
4667
|
-
multiple:
|
|
4668
|
-
onChange:
|
|
4669
|
-
ref:
|
|
5181
|
+
accept: h.acceptMimes.join(",") || "image/*",
|
|
5182
|
+
multiple: h.multiple,
|
|
5183
|
+
onChange: x,
|
|
5184
|
+
ref: u,
|
|
4670
5185
|
style: { display: "none" },
|
|
4671
5186
|
type: "file"
|
|
4672
5187
|
}
|
|
4673
5188
|
)
|
|
4674
5189
|
] }),
|
|
4675
|
-
/* @__PURE__ */ n(
|
|
5190
|
+
/* @__PURE__ */ n(Q, { value: "link", children: /* @__PURE__ */ n("form", { onSubmit: m, children: /* @__PURE__ */ y("div", { className: "richtext-flex richtext-items-center richtext-gap-2", children: [
|
|
4676
5191
|
/* @__PURE__ */ n(
|
|
4677
|
-
|
|
5192
|
+
ae,
|
|
4678
5193
|
{
|
|
4679
5194
|
autoFocus: !0,
|
|
4680
|
-
onChange: (
|
|
5195
|
+
onChange: (b) => d(b.target.value),
|
|
4681
5196
|
placeholder: e("editor.image.dialog.placeholder"),
|
|
4682
5197
|
required: !0,
|
|
4683
5198
|
type: "url",
|
|
4684
5199
|
value: c
|
|
4685
5200
|
}
|
|
4686
5201
|
),
|
|
4687
|
-
/* @__PURE__ */ n(
|
|
5202
|
+
/* @__PURE__ */ n(X, { type: "submit", children: e("editor.image.dialog.button.apply") })
|
|
4688
5203
|
] }) }) })
|
|
4689
5204
|
]
|
|
4690
5205
|
}
|
|
4691
5206
|
)
|
|
4692
5207
|
] }) });
|
|
4693
5208
|
}
|
|
4694
|
-
function
|
|
5209
|
+
function Kt(e, t) {
|
|
4695
5210
|
let r;
|
|
4696
5211
|
try {
|
|
4697
5212
|
r = new URL(e);
|
|
@@ -4706,56 +5221,56 @@ function Pt(e, t) {
|
|
|
4706
5221
|
return r.hostname.includes(i);
|
|
4707
5222
|
});
|
|
4708
5223
|
}
|
|
4709
|
-
function
|
|
4710
|
-
const { t: e } =
|
|
5224
|
+
function Xa() {
|
|
5225
|
+
const { t: e } = ne(), t = ee(), r = it(Ge.name), { icon: i, tooltip: o } = (r == null ? void 0 : r.componentProps) ?? {}, { editorDisabled: a } = xe(), [l, s] = I(""), c = me(null), [d, f] = I(""), [g, u] = I(!1), v = de(Ge.name), p = F(() => (v == null ? void 0 : v.options) ?? {}, [v]);
|
|
4711
5226
|
async function k(m) {
|
|
4712
|
-
var
|
|
4713
|
-
const
|
|
4714
|
-
if (!t || t.isDestroyed ||
|
|
5227
|
+
var C;
|
|
5228
|
+
const T = (C = m == null ? void 0 : m.target) == null ? void 0 : C.files;
|
|
5229
|
+
if (!t || t.isDestroyed || T.length === 0)
|
|
4715
5230
|
return;
|
|
4716
|
-
const
|
|
5231
|
+
const b = T[0];
|
|
4717
5232
|
let A = "";
|
|
4718
|
-
|
|
5233
|
+
p.upload ? A = await p.upload(b) : A = URL.createObjectURL(b), t.chain().focus().setVideo({
|
|
4719
5234
|
src: A,
|
|
4720
5235
|
width: "100%"
|
|
4721
|
-
}).run(),
|
|
5236
|
+
}).run(), u(!1);
|
|
4722
5237
|
}
|
|
4723
|
-
function
|
|
5238
|
+
function h(m) {
|
|
4724
5239
|
m.preventDefault(), m.stopPropagation(), l && (t.chain().focus().setVideo({
|
|
4725
5240
|
src: l,
|
|
4726
5241
|
width: "100%"
|
|
4727
|
-
}).run(),
|
|
5242
|
+
}).run(), u(!1), s(""));
|
|
4728
5243
|
}
|
|
4729
|
-
function
|
|
4730
|
-
var
|
|
4731
|
-
m.preventDefault(), (
|
|
5244
|
+
function x(m) {
|
|
5245
|
+
var T;
|
|
5246
|
+
m.preventDefault(), (T = c.current) == null || T.click();
|
|
4732
5247
|
}
|
|
4733
|
-
return /* @__PURE__ */
|
|
4734
|
-
/* @__PURE__ */ n(
|
|
4735
|
-
|
|
5248
|
+
return /* @__PURE__ */ y(ge, { onOpenChange: u, open: g, children: [
|
|
5249
|
+
/* @__PURE__ */ n(rt, { asChild: !0, children: /* @__PURE__ */ n(
|
|
5250
|
+
fe,
|
|
4736
5251
|
{
|
|
4737
5252
|
disabled: a,
|
|
4738
5253
|
icon: i,
|
|
4739
5254
|
tooltip: o,
|
|
4740
5255
|
action: () => {
|
|
4741
|
-
a ||
|
|
5256
|
+
a || u(!0);
|
|
4742
5257
|
}
|
|
4743
5258
|
}
|
|
4744
5259
|
) }),
|
|
4745
|
-
/* @__PURE__ */
|
|
4746
|
-
/* @__PURE__ */ n(
|
|
4747
|
-
/* @__PURE__ */
|
|
4748
|
-
|
|
5260
|
+
/* @__PURE__ */ y(le, { children: [
|
|
5261
|
+
/* @__PURE__ */ n(ce, { children: e("editor.video.dialog.title") }),
|
|
5262
|
+
/* @__PURE__ */ y(
|
|
5263
|
+
_e,
|
|
4749
5264
|
{
|
|
4750
5265
|
activationMode: "manual",
|
|
4751
|
-
defaultValue: (
|
|
5266
|
+
defaultValue: (p == null ? void 0 : p.resourceVideo) === "both" || (p == null ? void 0 : p.resourceVideo) === "upload" ? "upload" : "link",
|
|
4752
5267
|
children: [
|
|
4753
|
-
/* @__PURE__ */
|
|
4754
|
-
((
|
|
4755
|
-
((
|
|
5268
|
+
/* @__PURE__ */ y(Ne, { className: "richtext-grid richtext-w-full richtext-grid-cols-2", children: [
|
|
5269
|
+
((p == null ? void 0 : p.resourceVideo) === "both" || (p == null ? void 0 : p.resourceVideo) === "upload") && /* @__PURE__ */ n(K, { value: "upload", children: e("editor.video.dialog.tab.upload") }),
|
|
5270
|
+
((p == null ? void 0 : p.resourceVideo) === "both" || (p == null ? void 0 : p.resourceVideo) === "link") && /* @__PURE__ */ n(K, { value: "link", children: e("editor.video.dialog.link") })
|
|
4756
5271
|
] }),
|
|
4757
|
-
/* @__PURE__ */
|
|
4758
|
-
/* @__PURE__ */ n("div", { className: "richtext-flex richtext-items-center richtext-gap-[10px]", children: /* @__PURE__ */ n(
|
|
5272
|
+
/* @__PURE__ */ y(Q, { value: "upload", children: [
|
|
5273
|
+
/* @__PURE__ */ n("div", { className: "richtext-flex richtext-items-center richtext-gap-[10px]", children: /* @__PURE__ */ n(X, { className: "richtext-mt-1 richtext-w-full", onClick: x, size: "sm", children: e("editor.video.dialog.tab.upload") }) }),
|
|
4759
5274
|
/* @__PURE__ */ n(
|
|
4760
5275
|
"input",
|
|
4761
5276
|
{
|
|
@@ -4770,10 +5285,10 @@ function aa() {
|
|
|
4770
5285
|
}
|
|
4771
5286
|
)
|
|
4772
5287
|
] }),
|
|
4773
|
-
/* @__PURE__ */
|
|
4774
|
-
/* @__PURE__ */ n("div", { children: /* @__PURE__ */
|
|
5288
|
+
/* @__PURE__ */ y(Q, { value: "link", children: [
|
|
5289
|
+
/* @__PURE__ */ n("div", { children: /* @__PURE__ */ y("div", { className: "richtext-flex richtext-items-center richtext-gap-2", children: [
|
|
4775
5290
|
/* @__PURE__ */ n(
|
|
4776
|
-
|
|
5291
|
+
ae,
|
|
4777
5292
|
{
|
|
4778
5293
|
autoFocus: !0,
|
|
4779
5294
|
placeholder: e("editor.video.dialog.placeholder"),
|
|
@@ -4781,15 +5296,15 @@ function aa() {
|
|
|
4781
5296
|
type: "url",
|
|
4782
5297
|
value: l,
|
|
4783
5298
|
onBlur: (m) => {
|
|
4784
|
-
const
|
|
4785
|
-
|
|
5299
|
+
const T = m.target.value, b = p.videoProviders || ["."];
|
|
5300
|
+
T && !Kt(T, b) ? f("Invalid video URL") : f("");
|
|
4786
5301
|
},
|
|
4787
5302
|
onChange: (m) => {
|
|
4788
5303
|
s(m.target.value);
|
|
4789
5304
|
}
|
|
4790
5305
|
}
|
|
4791
5306
|
),
|
|
4792
|
-
/* @__PURE__ */ n(
|
|
5307
|
+
/* @__PURE__ */ n(X, { onClick: h, type: "button", children: e("editor.video.dialog.button.apply") })
|
|
4793
5308
|
] }) }),
|
|
4794
5309
|
d && /* @__PURE__ */ n("div", { className: "richtext-my-[5px] richtext-text-red-500", children: d })
|
|
4795
5310
|
] })
|
|
@@ -4799,7 +5314,7 @@ function aa() {
|
|
|
4799
5314
|
] })
|
|
4800
5315
|
] });
|
|
4801
5316
|
}
|
|
4802
|
-
function
|
|
5317
|
+
function ya(e) {
|
|
4803
5318
|
e = e.replace("https://youtu.be/", "https://www.youtube.com/watch?v=").replace("watch?v=", "embed/");
|
|
4804
5319
|
const t = e.match(/^https:\/\/www\.youtube\.com\/shorts\/([a-zA-Z0-9_-]+)/);
|
|
4805
5320
|
t && (e = `https://www.youtube.com/embed/${t[1]}`);
|
|
@@ -4810,7 +5325,7 @@ function Ro(e) {
|
|
|
4810
5325
|
}
|
|
4811
5326
|
return /^https?:\/\/www.bilibili.com\/video\/.*/i.test(e) && (e = e.replace(/\?.*$/, "").replace("https://www.bilibili.com/video/", "https://player.bilibili.com/player.html?bvid=")), e.includes("drive.google.com") && (e = e.replace("/view", "/preview")), e;
|
|
4812
5327
|
}
|
|
4813
|
-
const
|
|
5328
|
+
const Ge = /* @__PURE__ */ Xe.create({
|
|
4814
5329
|
name: "video",
|
|
4815
5330
|
group: "block",
|
|
4816
5331
|
atom: !0,
|
|
@@ -4824,7 +5339,7 @@ const Oe = /* @__PURE__ */ dt.create({
|
|
|
4824
5339
|
upload: void 0,
|
|
4825
5340
|
frameborder: !1,
|
|
4826
5341
|
resourceVideo: "both",
|
|
4827
|
-
width:
|
|
5342
|
+
width: Vi["size-medium"],
|
|
4828
5343
|
HTMLAttributes: {
|
|
4829
5344
|
class: "iframe-wrapper"
|
|
4830
5345
|
// style: 'display: flex;justify-content: center;',
|
|
@@ -4852,13 +5367,13 @@ const Oe = /* @__PURE__ */ dt.create({
|
|
|
4852
5367
|
src: {
|
|
4853
5368
|
default: null,
|
|
4854
5369
|
renderHTML: ({ src: e }) => ({
|
|
4855
|
-
src: e ?
|
|
5370
|
+
src: e ? ya(e) : null
|
|
4856
5371
|
})
|
|
4857
5372
|
},
|
|
4858
5373
|
width: {
|
|
4859
5374
|
default: this.options.width,
|
|
4860
5375
|
renderHTML: ({ width: e }) => ({
|
|
4861
|
-
width:
|
|
5376
|
+
width: Do(e)
|
|
4862
5377
|
})
|
|
4863
5378
|
},
|
|
4864
5379
|
frameborder: {
|
|
@@ -4890,12 +5405,12 @@ const Oe = /* @__PURE__ */ dt.create({
|
|
|
4890
5405
|
...e,
|
|
4891
5406
|
width: "100%",
|
|
4892
5407
|
height: "100%"
|
|
4893
|
-
}, o = `position: relative;overflow: hidden;display: flex;flex: 1;max-width: ${t};`, a = `flex: 1;padding-bottom: ${9 / 16 * 100}%;`,
|
|
5408
|
+
}, o = `position: relative;overflow: hidden;display: flex;flex: 1;max-width: ${t};`, a = `flex: 1;padding-bottom: ${9 / 16 * 100}%;`, f = ["div", { style: `display: flex; justify-content: ${r};` }, ["div", { style: o }, ["div", { style: a }], ["iframe", i]]];
|
|
4894
5409
|
return ["div", {
|
|
4895
5410
|
...this.options.HTMLAttributes,
|
|
4896
5411
|
class: "iframe-wrapper",
|
|
4897
5412
|
"data-video": ""
|
|
4898
|
-
},
|
|
5413
|
+
}, f];
|
|
4899
5414
|
},
|
|
4900
5415
|
addCommands() {
|
|
4901
5416
|
return {
|
|
@@ -4907,52 +5422,52 @@ const Oe = /* @__PURE__ */ dt.create({
|
|
|
4907
5422
|
};
|
|
4908
5423
|
}
|
|
4909
5424
|
});
|
|
4910
|
-
function
|
|
4911
|
-
const { t: e } =
|
|
4912
|
-
|
|
4913
|
-
const
|
|
4914
|
-
async function
|
|
4915
|
-
var
|
|
4916
|
-
const
|
|
4917
|
-
if (!t || t.isDestroyed ||
|
|
5425
|
+
function Ca() {
|
|
5426
|
+
const { t: e } = ne(), t = ee(), { editorDisabled: r } = xe(), [i, o] = I(""), a = me(null), [l, s] = I(""), [c, d] = I(!1), f = de(Ge.name), g = He.UPLOAD_VIDEO(t.id);
|
|
5427
|
+
tt(d, [g]);
|
|
5428
|
+
const u = F(() => (f == null ? void 0 : f.options) ?? {}, [f]);
|
|
5429
|
+
async function v(h) {
|
|
5430
|
+
var b;
|
|
5431
|
+
const x = (b = h == null ? void 0 : h.target) == null ? void 0 : b.files;
|
|
5432
|
+
if (!t || t.isDestroyed || x.length === 0)
|
|
4918
5433
|
return;
|
|
4919
|
-
const m =
|
|
4920
|
-
let
|
|
4921
|
-
|
|
4922
|
-
src:
|
|
5434
|
+
const m = x[0];
|
|
5435
|
+
let T = "";
|
|
5436
|
+
u.upload ? T = await u.upload(m) : T = URL.createObjectURL(m), t.chain().focus().setVideo({
|
|
5437
|
+
src: T,
|
|
4923
5438
|
width: "100%"
|
|
4924
5439
|
}).run(), d(!1);
|
|
4925
5440
|
}
|
|
4926
|
-
function
|
|
4927
|
-
|
|
5441
|
+
function p(h) {
|
|
5442
|
+
h.preventDefault(), h.stopPropagation(), i && (t.chain().focus().setVideo({
|
|
4928
5443
|
src: i,
|
|
4929
5444
|
width: "100%"
|
|
4930
5445
|
}).run(), d(!1), o(""));
|
|
4931
5446
|
}
|
|
4932
|
-
function k(
|
|
4933
|
-
var
|
|
4934
|
-
|
|
5447
|
+
function k(h) {
|
|
5448
|
+
var x;
|
|
5449
|
+
h.preventDefault(), (x = a.current) == null || x.click();
|
|
4935
5450
|
}
|
|
4936
|
-
return r ? /* @__PURE__ */ n(
|
|
4937
|
-
/* @__PURE__ */ n(
|
|
4938
|
-
/* @__PURE__ */
|
|
4939
|
-
|
|
5451
|
+
return r ? /* @__PURE__ */ n(q, {}) : /* @__PURE__ */ n(ge, { onOpenChange: d, open: c, children: /* @__PURE__ */ y(le, { children: [
|
|
5452
|
+
/* @__PURE__ */ n(ce, { children: e("editor.video.dialog.title") }),
|
|
5453
|
+
/* @__PURE__ */ y(
|
|
5454
|
+
_e,
|
|
4940
5455
|
{
|
|
4941
5456
|
activationMode: "manual",
|
|
4942
|
-
defaultValue: (
|
|
5457
|
+
defaultValue: (u == null ? void 0 : u.resourceVideo) === "both" || (u == null ? void 0 : u.resourceVideo) === "upload" ? "upload" : "link",
|
|
4943
5458
|
children: [
|
|
4944
|
-
/* @__PURE__ */
|
|
4945
|
-
((
|
|
4946
|
-
((
|
|
5459
|
+
/* @__PURE__ */ y(Ne, { className: "richtext-grid richtext-w-full richtext-grid-cols-2", children: [
|
|
5460
|
+
((u == null ? void 0 : u.resourceVideo) === "both" || (u == null ? void 0 : u.resourceVideo) === "upload") && /* @__PURE__ */ n(K, { value: "upload", children: e("editor.video.dialog.tab.upload") }),
|
|
5461
|
+
((u == null ? void 0 : u.resourceVideo) === "both" || (u == null ? void 0 : u.resourceVideo) === "link") && /* @__PURE__ */ n(K, { value: "link", children: e("editor.video.dialog.link") })
|
|
4947
5462
|
] }),
|
|
4948
|
-
/* @__PURE__ */
|
|
4949
|
-
/* @__PURE__ */ n("div", { className: "richtext-flex richtext-items-center richtext-gap-[10px]", children: /* @__PURE__ */ n(
|
|
5463
|
+
/* @__PURE__ */ y(Q, { value: "upload", children: [
|
|
5464
|
+
/* @__PURE__ */ n("div", { className: "richtext-flex richtext-items-center richtext-gap-[10px]", children: /* @__PURE__ */ n(X, { className: "richtext-mt-1 richtext-w-full", onClick: k, size: "sm", children: e("editor.video.dialog.tab.upload") }) }),
|
|
4950
5465
|
/* @__PURE__ */ n(
|
|
4951
5466
|
"input",
|
|
4952
5467
|
{
|
|
4953
5468
|
accept: "video/*",
|
|
4954
5469
|
multiple: !0,
|
|
4955
|
-
onChange:
|
|
5470
|
+
onChange: v,
|
|
4956
5471
|
ref: a,
|
|
4957
5472
|
type: "file",
|
|
4958
5473
|
style: {
|
|
@@ -4961,26 +5476,26 @@ function Vo() {
|
|
|
4961
5476
|
}
|
|
4962
5477
|
)
|
|
4963
5478
|
] }),
|
|
4964
|
-
/* @__PURE__ */
|
|
4965
|
-
/* @__PURE__ */ n("div", { children: /* @__PURE__ */
|
|
5479
|
+
/* @__PURE__ */ y(Q, { value: "link", children: [
|
|
5480
|
+
/* @__PURE__ */ n("div", { children: /* @__PURE__ */ y("div", { className: "richtext-flex richtext-items-center richtext-gap-2", children: [
|
|
4966
5481
|
/* @__PURE__ */ n(
|
|
4967
|
-
|
|
5482
|
+
ae,
|
|
4968
5483
|
{
|
|
4969
5484
|
autoFocus: !0,
|
|
4970
5485
|
placeholder: e("editor.video.dialog.placeholder"),
|
|
4971
5486
|
required: !0,
|
|
4972
5487
|
type: "url",
|
|
4973
5488
|
value: i,
|
|
4974
|
-
onBlur: (
|
|
4975
|
-
const
|
|
4976
|
-
|
|
5489
|
+
onBlur: (h) => {
|
|
5490
|
+
const x = h.target.value, m = u.videoProviders || ["."];
|
|
5491
|
+
x && !Kt(x, m) ? s("Invalid video URL") : s("");
|
|
4977
5492
|
},
|
|
4978
|
-
onChange: (
|
|
4979
|
-
o(
|
|
5493
|
+
onChange: (h) => {
|
|
5494
|
+
o(h.target.value);
|
|
4980
5495
|
}
|
|
4981
5496
|
}
|
|
4982
5497
|
),
|
|
4983
|
-
/* @__PURE__ */ n(
|
|
5498
|
+
/* @__PURE__ */ n(X, { onClick: p, type: "button", children: e("editor.video.dialog.button.apply") })
|
|
4984
5499
|
] }) }),
|
|
4985
5500
|
l && /* @__PURE__ */ n("div", { className: "richtext-my-[5px] richtext-text-red-500", children: l })
|
|
4986
5501
|
] })
|
|
@@ -4989,67 +5504,73 @@ function Vo() {
|
|
|
4989
5504
|
)
|
|
4990
5505
|
] }) });
|
|
4991
5506
|
}
|
|
4992
|
-
function
|
|
4993
|
-
return /* @__PURE__ */
|
|
4994
|
-
/* @__PURE__ */ n(
|
|
4995
|
-
/* @__PURE__ */ n(
|
|
5507
|
+
function ka() {
|
|
5508
|
+
return /* @__PURE__ */ y(q, { children: [
|
|
5509
|
+
/* @__PURE__ */ n(wa, {}),
|
|
5510
|
+
/* @__PURE__ */ n(Ca, {}),
|
|
5511
|
+
/* @__PURE__ */ n(jo, {})
|
|
4996
5512
|
] });
|
|
4997
5513
|
}
|
|
4998
|
-
process.env.NODE_ENV !== "production" && (
|
|
5514
|
+
process.env.NODE_ENV !== "production" && (ka.displayName = "SlashDialogTrigger");
|
|
4999
5515
|
export {
|
|
5000
|
-
|
|
5001
|
-
|
|
5002
|
-
|
|
5003
|
-
|
|
5004
|
-
|
|
5005
|
-
|
|
5006
|
-
|
|
5007
|
-
|
|
5008
|
-
|
|
5009
|
-
|
|
5010
|
-
|
|
5011
|
-
|
|
5012
|
-
|
|
5013
|
-
|
|
5014
|
-
|
|
5015
|
-
|
|
5016
|
-
|
|
5017
|
-
|
|
5018
|
-
|
|
5019
|
-
|
|
5020
|
-
|
|
5021
|
-
|
|
5022
|
-
|
|
5023
|
-
|
|
5024
|
-
|
|
5025
|
-
|
|
5026
|
-
|
|
5027
|
-
|
|
5028
|
-
|
|
5029
|
-
|
|
5030
|
-
|
|
5031
|
-
|
|
5032
|
-
|
|
5033
|
-
|
|
5034
|
-
|
|
5035
|
-
|
|
5516
|
+
xo as $,
|
|
5517
|
+
fe as A,
|
|
5518
|
+
X as B,
|
|
5519
|
+
Qe as C,
|
|
5520
|
+
ge as D,
|
|
5521
|
+
He as E,
|
|
5522
|
+
no as F,
|
|
5523
|
+
Ft as G,
|
|
5524
|
+
Ua as H,
|
|
5525
|
+
Oe as I,
|
|
5526
|
+
tt as J,
|
|
5527
|
+
Pa as K,
|
|
5528
|
+
ke as L,
|
|
5529
|
+
ue as M,
|
|
5530
|
+
xt as N,
|
|
5531
|
+
bt as O,
|
|
5532
|
+
ca as P,
|
|
5533
|
+
fa as Q,
|
|
5534
|
+
Bo as R,
|
|
5535
|
+
Ha as S,
|
|
5536
|
+
Xn as T,
|
|
5537
|
+
Wn as U,
|
|
5538
|
+
Tn as V,
|
|
5539
|
+
Je as W,
|
|
5540
|
+
Oa as X,
|
|
5541
|
+
ja as Y,
|
|
5542
|
+
_a as Z,
|
|
5543
|
+
ka as _,
|
|
5544
|
+
Yn as a,
|
|
5545
|
+
co as a0,
|
|
5546
|
+
Ge as a1,
|
|
5547
|
+
Gt as a2,
|
|
5548
|
+
Wa as a3,
|
|
5549
|
+
Ga as a4,
|
|
5550
|
+
Xa as a5,
|
|
5551
|
+
_t as b,
|
|
5552
|
+
E as c,
|
|
5553
|
+
xe as d,
|
|
5554
|
+
Ba as e,
|
|
5555
|
+
Fa as f,
|
|
5556
|
+
vn as g,
|
|
5036
5557
|
ee as h,
|
|
5037
|
-
|
|
5038
|
-
|
|
5039
|
-
|
|
5040
|
-
|
|
5041
|
-
|
|
5042
|
-
|
|
5043
|
-
|
|
5044
|
-
|
|
5045
|
-
|
|
5046
|
-
|
|
5047
|
-
|
|
5048
|
-
|
|
5049
|
-
|
|
5050
|
-
|
|
5051
|
-
|
|
5052
|
-
|
|
5053
|
-
|
|
5054
|
-
|
|
5558
|
+
Rt as i,
|
|
5559
|
+
ae as j,
|
|
5560
|
+
Vt as k,
|
|
5561
|
+
bn as l,
|
|
5562
|
+
rt as m,
|
|
5563
|
+
le as n,
|
|
5564
|
+
ce as o,
|
|
5565
|
+
Zn as p,
|
|
5566
|
+
Da as q,
|
|
5567
|
+
qn as r,
|
|
5568
|
+
Kn as s,
|
|
5569
|
+
Ot as t,
|
|
5570
|
+
it as u,
|
|
5571
|
+
de as v,
|
|
5572
|
+
Ke as w,
|
|
5573
|
+
$a as x,
|
|
5574
|
+
Ve as y,
|
|
5575
|
+
so as z
|
|
5055
5576
|
};
|