reactjs-tiptap-editor 0.0.26 → 0.0.27
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/components-DqT7-cFp.js +2496 -0
- package/lib/components-xS2gsLRE.cjs +135 -0
- package/lib/extensions-BUtdRI-5.js +7997 -0
- package/lib/extensions-BlyolCeu.cjs +1 -0
- package/lib/index.d.cts +42 -42
- package/lib/index.d.ts +42 -42
- package/lib/radix-BnsE5jjU.cjs +1 -0
- package/lib/radix-gnVzeGS4.js +3103 -0
- package/lib/reactjs-tiptap-editor.cjs +1 -136
- package/lib/reactjs-tiptap-editor.js +145 -11475
- package/lib/style.css +1 -1
- package/lib/tiptap-BEIRLff8.js +5883 -0
- package/lib/tiptap-CMeHtctt.cjs +116 -0
- package/lib/utils-DqGt9oOA.cjs +1 -0
- package/lib/utils-Wb2bM69j.js +1034 -0
- package/lib/vendor-Btqs8WA3.cjs +452 -0
- package/lib/vendor-uVk9OL1t.js +27903 -0
- package/package.json +55 -54
- package/lib/reactjs-tiptap-editor.cjs.map +0 -1
- package/lib/reactjs-tiptap-editor.js.map +0 -1
- package/lib/vendor-BfS5bQGj.cjs +0 -596
- package/lib/vendor-BfS5bQGj.cjs.map +0 -1
- package/lib/vendor-DNe_eTW3.js +0 -49712
- package/lib/vendor-DNe_eTW3.js.map +0 -1
|
@@ -0,0 +1,2496 @@
|
|
|
1
|
+
import { jsxs as l, jsx as e, Fragment as N } from "react/jsx-runtime";
|
|
2
|
+
import * as v from "react";
|
|
3
|
+
import zt, { useState as M, useRef as it, useEffect as T, useCallback as S, useMemo as H, forwardRef as ge, useImperativeHandle as ve, Fragment as pe } from "react";
|
|
4
|
+
import { S as dt, R as we, T as be, G as Ce, P as Et, a as ye, b as Ne, c as Mt, d as Lt, C as Dt, I as Bt, e as Ft, f as Rt, g as It, L as Ht, h as _t, i as Ot, j as Te, k as ke, l as Ae, m as Vt, n as Pt, o as jt, p as Se, q as ze, r as $t, s as Ut, t as Wt, u as Ee, V as Gt, v as Kt, A as Xt, w as Jt, x as qt, D as Zt, y as Qt, z as Me, B as Le, E as De, F as Yt, H as Be, J as Fe, K as Re, M as Ie } from "./radix-gnVzeGS4.js";
|
|
5
|
+
import { g as te, d as ee, u as z, a as He, r as _e, h as Oe, i as Ve, l as G, I as pt, s as wt } from "./utils-Wb2bM69j.js";
|
|
6
|
+
import { t as Pe, c as je, d as $e, a as rt, C as Ue, b as We, e as Ge, X as Ke, f as Xe, P as ie, T as re, Z as Je, g as ne, p as qe, u as Ze, h as Qe, i as Ye, B as ti, L as ei, I as ii, U as ri, Q as ni, S as ci, M as ai, E as oi, j as si, R as li, k as hi, l as di, m as xi, n as ui, o as mi, q as fi, r as gi, s as vi, v as pi, w as wi, x as bi, y as Ci, z as yi, A as Ni, V as Ti, D as ki, F as Ai, G as Si, H as zi, J as Ei, K as Mi, N as Li, O as Di, W as Bi, Y as Fi, _ as Ri, $ as Ii, a0 as bt, a1 as Hi, a2 as _i, a3 as Oi, a4 as Vi, a5 as Pi, a6 as ji, a7 as $i, a8 as Ct, a9 as Ui, aa as Wi, ab as Gi, ac as Ki, ad as Xi, ae as Ji, af as qi, ag as Zi, ah as yt, ai as Qi, aj as Yi, ak as ce, al as tr, am as er } from "./vendor-uVk9OL1t.js";
|
|
7
|
+
import { B as _, u as ir, E as rr, D as nr, d as cr, i as ar } from "./tiptap-BEIRLff8.js";
|
|
8
|
+
import { K as Y, H as or, L as sr, a as lr, M as Nt } from "./extensions-BUtdRI-5.js";
|
|
9
|
+
const Hn = "en", hr = 200, dr = hr - 80, _n = 20, On = 1e5, Vn = 16, Pn = 10, jn = 10, $n = 2, Un = "#262626", xr = [
|
|
10
|
+
"#000000",
|
|
11
|
+
"#262626",
|
|
12
|
+
"#595959",
|
|
13
|
+
"#8C8C8C",
|
|
14
|
+
"#BFBFBF",
|
|
15
|
+
"#D9D9D9",
|
|
16
|
+
"#E9E9E9",
|
|
17
|
+
"#F5F5F5",
|
|
18
|
+
"#FAFAFA",
|
|
19
|
+
"#FFFFFF",
|
|
20
|
+
"#F5222D",
|
|
21
|
+
"#FA541C",
|
|
22
|
+
"#FA8C16",
|
|
23
|
+
"#FADB14",
|
|
24
|
+
"#52C41A",
|
|
25
|
+
"#13C2C2",
|
|
26
|
+
"#1890FF",
|
|
27
|
+
"#2F54EB",
|
|
28
|
+
"#722ED1",
|
|
29
|
+
"#EB2F96",
|
|
30
|
+
"#FFE8E6",
|
|
31
|
+
"#FFECE0",
|
|
32
|
+
"#FFEFD1",
|
|
33
|
+
"#FCFCCA",
|
|
34
|
+
"#E4F7D2",
|
|
35
|
+
"#D3F5F0",
|
|
36
|
+
"#D4EEFC",
|
|
37
|
+
"#DEE8FC",
|
|
38
|
+
"#EFE1FA",
|
|
39
|
+
"#FAE1EB",
|
|
40
|
+
"#FFA39E",
|
|
41
|
+
"#FFBB96",
|
|
42
|
+
"#FFD591",
|
|
43
|
+
"#FFFB8F",
|
|
44
|
+
"#B7EB8F",
|
|
45
|
+
"#87E8DE",
|
|
46
|
+
"#91D5FF",
|
|
47
|
+
"#ADC6FF",
|
|
48
|
+
"#D3ADF7",
|
|
49
|
+
"#FFADD2",
|
|
50
|
+
"#FF4D4F",
|
|
51
|
+
"#FF7A45",
|
|
52
|
+
"#FFA940",
|
|
53
|
+
"#FFEC3D",
|
|
54
|
+
"#73D13D",
|
|
55
|
+
"#36CFC9",
|
|
56
|
+
"#40A9FF",
|
|
57
|
+
"#597EF7",
|
|
58
|
+
"#9254DE",
|
|
59
|
+
"#F759AB",
|
|
60
|
+
"#CF1322",
|
|
61
|
+
"#D4380D",
|
|
62
|
+
"#D46B08",
|
|
63
|
+
"#D4B106",
|
|
64
|
+
"#389E0D",
|
|
65
|
+
"#08979C",
|
|
66
|
+
"#096DD9",
|
|
67
|
+
"#1D39C4",
|
|
68
|
+
"#531DAB",
|
|
69
|
+
"#C41D7F",
|
|
70
|
+
"#820014",
|
|
71
|
+
"#871400",
|
|
72
|
+
"#873800",
|
|
73
|
+
"#614700",
|
|
74
|
+
"#135200",
|
|
75
|
+
"#00474F",
|
|
76
|
+
"#003A8C",
|
|
77
|
+
"#061178",
|
|
78
|
+
"#22075E",
|
|
79
|
+
"#780650"
|
|
80
|
+
], Wn = [
|
|
81
|
+
"Inter",
|
|
82
|
+
"Comic Sans MS, Comic Sans",
|
|
83
|
+
"serif",
|
|
84
|
+
"monospace",
|
|
85
|
+
"cursive"
|
|
86
|
+
], Gn = [
|
|
87
|
+
"html",
|
|
88
|
+
"css",
|
|
89
|
+
"js",
|
|
90
|
+
"ts"
|
|
91
|
+
], Kn = {
|
|
92
|
+
html: "HTML",
|
|
93
|
+
css: "CSS",
|
|
94
|
+
js: "JavaScript",
|
|
95
|
+
ts: "TypeScript"
|
|
96
|
+
}, Xn = [
|
|
97
|
+
"10px",
|
|
98
|
+
"11px",
|
|
99
|
+
"12px",
|
|
100
|
+
"14px",
|
|
101
|
+
"16px",
|
|
102
|
+
"18px",
|
|
103
|
+
"20px",
|
|
104
|
+
"22px",
|
|
105
|
+
"24px",
|
|
106
|
+
"26px",
|
|
107
|
+
"28px",
|
|
108
|
+
"36px",
|
|
109
|
+
"48px",
|
|
110
|
+
"72px"
|
|
111
|
+
], Jn = "default";
|
|
112
|
+
var ot = /* @__PURE__ */ ((t) => (t[t["size-small"] = 200] = "size-small", t[t["size-medium"] = 500] = "size-medium", t["size-large"] = "100%", t))(ot || {}), st = /* @__PURE__ */ ((t) => (t[t["size-small"] = 480] = "size-small", t[t["size-medium"] = 640] = "size-medium", t["size-large"] = "100%", t))(st || {});
|
|
113
|
+
const qn = ["100%", "115%", "150%", "200%", "250%", "300%"], Zn = 1.7, Qn = "1", Yn = {
|
|
114
|
+
image: [
|
|
115
|
+
"divider",
|
|
116
|
+
"image-size-small",
|
|
117
|
+
"image-size-medium",
|
|
118
|
+
"image-size-large",
|
|
119
|
+
"divider",
|
|
120
|
+
"image-left",
|
|
121
|
+
"image-center",
|
|
122
|
+
"image-right",
|
|
123
|
+
"divider",
|
|
124
|
+
"image-aspect-ratio",
|
|
125
|
+
"remove"
|
|
126
|
+
],
|
|
127
|
+
text: [
|
|
128
|
+
"divider",
|
|
129
|
+
"text-bubble",
|
|
130
|
+
"divider",
|
|
131
|
+
"bold",
|
|
132
|
+
"italic",
|
|
133
|
+
"underline",
|
|
134
|
+
"strike",
|
|
135
|
+
"code",
|
|
136
|
+
"link",
|
|
137
|
+
"divider",
|
|
138
|
+
"color",
|
|
139
|
+
"highlight",
|
|
140
|
+
"textAlign"
|
|
141
|
+
],
|
|
142
|
+
video: ["video-size-small", "video-size-medium", "video-size-large", "divider", "remove"],
|
|
143
|
+
table: ["removeTable"]
|
|
144
|
+
}, ur = [
|
|
145
|
+
"bold",
|
|
146
|
+
"italic",
|
|
147
|
+
"underline",
|
|
148
|
+
"strike",
|
|
149
|
+
"code",
|
|
150
|
+
"link",
|
|
151
|
+
"divider",
|
|
152
|
+
"color",
|
|
153
|
+
"highlight",
|
|
154
|
+
"textAlign"
|
|
155
|
+
];
|
|
156
|
+
function g(...t) {
|
|
157
|
+
return Pe(je(t));
|
|
158
|
+
}
|
|
159
|
+
const C = zt.forwardRef(
|
|
160
|
+
(t, r) => {
|
|
161
|
+
const {
|
|
162
|
+
icon: i = void 0,
|
|
163
|
+
// title = undefined,
|
|
164
|
+
tooltip: n = void 0,
|
|
165
|
+
disabled: c = !1,
|
|
166
|
+
customClass: a = "",
|
|
167
|
+
// color = undefined,
|
|
168
|
+
// loading = false,
|
|
169
|
+
shortcutKeys: s = void 0,
|
|
170
|
+
tooltipOptions: h = {},
|
|
171
|
+
action: o = void 0,
|
|
172
|
+
isActive: d = void 0,
|
|
173
|
+
children: p,
|
|
174
|
+
asChild: x = !1,
|
|
175
|
+
upload: w = !1,
|
|
176
|
+
...u
|
|
177
|
+
} = t, f = ft[i];
|
|
178
|
+
return /* @__PURE__ */ l(ut, { children: [
|
|
179
|
+
/* @__PURE__ */ e(mt, { asChild: !0, children: /* @__PURE__ */ l(
|
|
180
|
+
x ? dt : xe,
|
|
181
|
+
{
|
|
182
|
+
ref: r,
|
|
183
|
+
size: "sm",
|
|
184
|
+
className: g("richtext-w-[32px] richtext-h-[32px]", a),
|
|
185
|
+
disabled: c,
|
|
186
|
+
onClick: o,
|
|
187
|
+
"data-state": d != null && d() ? "on" : "off",
|
|
188
|
+
...u,
|
|
189
|
+
children: [
|
|
190
|
+
f && /* @__PURE__ */ e(f, { className: "richtext-w-4 richtext-h-4" }),
|
|
191
|
+
p
|
|
192
|
+
]
|
|
193
|
+
}
|
|
194
|
+
) }),
|
|
195
|
+
n && /* @__PURE__ */ e(nt, { ...h, children: /* @__PURE__ */ l("div", { className: "richtext-flex richtext-flex-col richtext-items-center richtext-text-center richtext-max-w-24", children: [
|
|
196
|
+
/* @__PURE__ */ e("div", { children: n }),
|
|
197
|
+
!!(s != null && s.length) && /* @__PURE__ */ e("span", { children: te(s) })
|
|
198
|
+
] }) })
|
|
199
|
+
] });
|
|
200
|
+
}
|
|
201
|
+
), tc = zt.forwardRef(
|
|
202
|
+
({ asChild: t, ...r }, i) => {
|
|
203
|
+
var a;
|
|
204
|
+
const n = ft[r.icon];
|
|
205
|
+
return /* @__PURE__ */ l(ut, { children: [
|
|
206
|
+
/* @__PURE__ */ e(mt, { asChild: !0, children: /* @__PURE__ */ e(
|
|
207
|
+
t ? dt : P,
|
|
208
|
+
{
|
|
209
|
+
ref: i,
|
|
210
|
+
className: "richtext-h-[32px] richtext-px-[5px] richtext-py-0 richtext-min-w-24 richtext-overflow-hidden",
|
|
211
|
+
variant: "ghost",
|
|
212
|
+
disabled: r == null ? void 0 : r.disabled,
|
|
213
|
+
...r,
|
|
214
|
+
children: /* @__PURE__ */ l("div", { className: "richtext-flex richtext-items-center richtext-h-full richtext-font-normal", children: [
|
|
215
|
+
(r == null ? void 0 : r.title) && /* @__PURE__ */ e("div", { className: "richtext-flex-grow richtext-text-sm richtext-text-left richtext-truncate", children: r == null ? void 0 : r.title }),
|
|
216
|
+
n && /* @__PURE__ */ e(n, { className: "richtext-flex-shrink-0 richtext-w-3 richtext-h-3 richtext-ml-1 richtext-text-zinc-500" })
|
|
217
|
+
] })
|
|
218
|
+
}
|
|
219
|
+
) }),
|
|
220
|
+
/* @__PURE__ */ e(nt, { children: /* @__PURE__ */ l("div", { className: "richtext-flex richtext-flex-col richtext-items-center richtext-text-center richtext-max-w-24", children: [
|
|
221
|
+
(r == null ? void 0 : r.tooltip) && /* @__PURE__ */ e("div", { children: r == null ? void 0 : r.tooltip }),
|
|
222
|
+
/* @__PURE__ */ e("div", { className: "richtext-flex", children: !!((a = r == null ? void 0 : r.shortcutKeys) != null && a.length) && /* @__PURE__ */ e("span", { children: te(r == null ? void 0 : r.shortcutKeys) }) })
|
|
223
|
+
] }) })
|
|
224
|
+
] });
|
|
225
|
+
}
|
|
226
|
+
);
|
|
227
|
+
function mr(t) {
|
|
228
|
+
return t;
|
|
229
|
+
}
|
|
230
|
+
function fr(t, r, i, n) {
|
|
231
|
+
const c = mr, [a, s] = M(c(i)), h = it(a);
|
|
232
|
+
return T(() => {
|
|
233
|
+
const o = () => {
|
|
234
|
+
const d = { ...i, ...t.getAttributes(r) };
|
|
235
|
+
Object.keys(d).forEach((x) => {
|
|
236
|
+
(d[x] === null || d[x] === void 0) && (d[x] = i[x]);
|
|
237
|
+
});
|
|
238
|
+
const p = c(d);
|
|
239
|
+
$e(h.current, p) || (s(p), h.current = p);
|
|
240
|
+
};
|
|
241
|
+
return t.on("selectionUpdate", o), t.on("transaction", o), () => {
|
|
242
|
+
t.off("selectionUpdate", o), t.off("transaction", o);
|
|
243
|
+
};
|
|
244
|
+
}, [t, i, r, c]), a;
|
|
245
|
+
}
|
|
246
|
+
const ae = v.forwardRef(
|
|
247
|
+
({ className: t, ...r }, i) => /* @__PURE__ */ e(
|
|
248
|
+
"textarea",
|
|
249
|
+
{
|
|
250
|
+
className: g(
|
|
251
|
+
"richtext-flex richtext-min-h-[80px] richtext-w-full richtext-rounded-md !richtext-border richtext-border-input richtext-bg-background 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-2 disabled:richtext-cursor-not-allowed disabled:richtext-opacity-50",
|
|
252
|
+
t
|
|
253
|
+
),
|
|
254
|
+
ref: i,
|
|
255
|
+
...r
|
|
256
|
+
}
|
|
257
|
+
)
|
|
258
|
+
);
|
|
259
|
+
ae.displayName = "Textarea";
|
|
260
|
+
const gr = rt(
|
|
261
|
+
"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-2 disabled:richtext-pointer-events-none disabled:richtext-opacity-50",
|
|
262
|
+
{
|
|
263
|
+
variants: {
|
|
264
|
+
variant: {
|
|
265
|
+
default: "!richtext-bg-primary !richtext-text-primary-foreground hover:!richtext-bg-primary/90",
|
|
266
|
+
destructive: "richtext-bg-destructive richtext-text-destructive-foreground hover:richtext-bg-destructive/90",
|
|
267
|
+
outline: "richtext-border richtext-border-input richtext-bg-background hover:richtext-bg-accent hover:richtext-text-accent-foreground",
|
|
268
|
+
secondary: "richtext-bg-secondary richtext-text-secondary-foreground hover:richtext-bg-secondary/80",
|
|
269
|
+
ghost: "hover:richtext-bg-accent hover:richtext-text-accent-foreground",
|
|
270
|
+
link: "richtext-text-primary richtext-underline-offset-4 hover:richtext-underline"
|
|
271
|
+
},
|
|
272
|
+
size: {
|
|
273
|
+
default: "richtext-h-10 richtext-px-4 richtext-py-2",
|
|
274
|
+
sm: "richtext-h-9 richtext-rounded-md richtext-px-3",
|
|
275
|
+
lg: "richtext-h-11 richtext-rounded-md richtext-px-8",
|
|
276
|
+
icon: "richtext-h-10 richtext-w-10"
|
|
277
|
+
}
|
|
278
|
+
},
|
|
279
|
+
defaultVariants: {
|
|
280
|
+
variant: "default",
|
|
281
|
+
size: "default"
|
|
282
|
+
}
|
|
283
|
+
}
|
|
284
|
+
), P = v.forwardRef(
|
|
285
|
+
({ className: t, variant: r, size: i, asChild: n = !1, ...c }, a) => /* @__PURE__ */ e(
|
|
286
|
+
n ? dt : "button",
|
|
287
|
+
{
|
|
288
|
+
className: g(gr({ variant: r, size: i, className: t })),
|
|
289
|
+
ref: a,
|
|
290
|
+
...c
|
|
291
|
+
}
|
|
292
|
+
)
|
|
293
|
+
);
|
|
294
|
+
P.displayName = "Button";
|
|
295
|
+
const vr = we, pr = be, ec = Ce, Tt = Et, kt = ye, ic = Ne, lt = v.forwardRef(({ className: t, inset: r, children: i, ...n }, c) => /* @__PURE__ */ l(
|
|
296
|
+
Mt,
|
|
297
|
+
{
|
|
298
|
+
ref: c,
|
|
299
|
+
className: g(
|
|
300
|
+
"richtext-flex richtext-cursor-default richtext-select-none richtext-items-center richtext-rounded-sm richtext-px-2 richtext-py-1.5 richtext-text-sm richtext-outline-none focus:richtext-bg-accent data-[state=open]:richtext-bg-accent",
|
|
301
|
+
r && "richtext-pl-8",
|
|
302
|
+
t
|
|
303
|
+
),
|
|
304
|
+
...n,
|
|
305
|
+
children: [
|
|
306
|
+
i,
|
|
307
|
+
/* @__PURE__ */ e(Ue, { className: "richtext-ml-auto richtext-h-4 richtext-w-4" })
|
|
308
|
+
]
|
|
309
|
+
}
|
|
310
|
+
));
|
|
311
|
+
lt.displayName = Mt.displayName;
|
|
312
|
+
const ht = v.forwardRef(({ className: t, ...r }, i) => /* @__PURE__ */ e(
|
|
313
|
+
Lt,
|
|
314
|
+
{
|
|
315
|
+
ref: i,
|
|
316
|
+
className: g(
|
|
317
|
+
"richtext-z-50 richtext-min-w-[8rem] richtext-overflow-hidden richtext-rounded-md !richtext-border richtext-bg-popover richtext-p-1 richtext-text-popover-foreground richtext-shadow-lg 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",
|
|
318
|
+
t
|
|
319
|
+
),
|
|
320
|
+
...r
|
|
321
|
+
}
|
|
322
|
+
));
|
|
323
|
+
ht.displayName = Lt.displayName;
|
|
324
|
+
const oe = v.forwardRef(({ className: t, sideOffset: r = 4, ...i }, n) => /* @__PURE__ */ e(Et, { children: /* @__PURE__ */ e(
|
|
325
|
+
Dt,
|
|
326
|
+
{
|
|
327
|
+
ref: n,
|
|
328
|
+
sideOffset: r,
|
|
329
|
+
className: g(
|
|
330
|
+
"richtext-z-50 richtext-min-w-[8rem] richtext-overflow-hidden richtext-rounded-md !richtext-border richtext-bg-popover richtext-p-1 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",
|
|
331
|
+
t
|
|
332
|
+
),
|
|
333
|
+
...i
|
|
334
|
+
}
|
|
335
|
+
) }));
|
|
336
|
+
oe.displayName = Dt.displayName;
|
|
337
|
+
const A = v.forwardRef(({ className: t, inset: r, ...i }, n) => /* @__PURE__ */ e(
|
|
338
|
+
Bt,
|
|
339
|
+
{
|
|
340
|
+
ref: n,
|
|
341
|
+
className: g(
|
|
342
|
+
"richtext-relative richtext-flex richtext-cursor-default richtext-select-none richtext-items-center richtext-rounded-sm richtext-px-2 richtext-py-1.5 richtext-text-sm richtext-outline-none richtext-transition-colors focus:richtext-bg-accent focus:richtext-text-accent-foreground data-[disabled]:richtext-pointer-events-none data-[disabled]:richtext-opacity-50",
|
|
343
|
+
r && "richtext-pl-8",
|
|
344
|
+
t
|
|
345
|
+
),
|
|
346
|
+
...i
|
|
347
|
+
}
|
|
348
|
+
));
|
|
349
|
+
A.displayName = Bt.displayName;
|
|
350
|
+
const wr = v.forwardRef(({ className: t, children: r, checked: i, ...n }, c) => /* @__PURE__ */ l(
|
|
351
|
+
Ft,
|
|
352
|
+
{
|
|
353
|
+
ref: c,
|
|
354
|
+
className: g(
|
|
355
|
+
"richtext-relative richtext-flex 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 richtext-transition-colors focus:richtext-bg-accent focus:richtext-text-accent-foreground data-[disabled]:richtext-pointer-events-none data-[disabled]:richtext-opacity-50",
|
|
356
|
+
t
|
|
357
|
+
),
|
|
358
|
+
checked: i,
|
|
359
|
+
...n,
|
|
360
|
+
children: [
|
|
361
|
+
/* @__PURE__ */ e("span", { className: "richtext-absolute richtext-left-2 richtext-flex richtext-h-3.5 richtext-w-3.5 richtext-items-center richtext-justify-center", children: /* @__PURE__ */ e(Rt, { children: /* @__PURE__ */ e(We, { className: "richtext-h-4 richtext-w-4" }) }) }),
|
|
362
|
+
r
|
|
363
|
+
]
|
|
364
|
+
}
|
|
365
|
+
));
|
|
366
|
+
wr.displayName = Ft.displayName;
|
|
367
|
+
const br = v.forwardRef(({ className: t, children: r, ...i }, n) => /* @__PURE__ */ l(
|
|
368
|
+
It,
|
|
369
|
+
{
|
|
370
|
+
ref: n,
|
|
371
|
+
className: g(
|
|
372
|
+
"richtext-relative richtext-flex 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 richtext-transition-colors focus:richtext-bg-accent focus:richtext-text-accent-foreground data-[disabled]:richtext-pointer-events-none data-[disabled]:richtext-opacity-50",
|
|
373
|
+
t
|
|
374
|
+
),
|
|
375
|
+
...i,
|
|
376
|
+
children: [
|
|
377
|
+
/* @__PURE__ */ e("span", { className: "richtext-absolute richtext-left-2 richtext-flex richtext-h-3.5 richtext-w-3.5 richtext-items-center richtext-justify-center", children: /* @__PURE__ */ e(Rt, { children: /* @__PURE__ */ e(Ge, { className: "richtext-h-2 richtext-w-2 richtext-fill-current" }) }) }),
|
|
378
|
+
r
|
|
379
|
+
]
|
|
380
|
+
}
|
|
381
|
+
));
|
|
382
|
+
br.displayName = It.displayName;
|
|
383
|
+
const Cr = v.forwardRef(({ className: t, inset: r, ...i }, n) => /* @__PURE__ */ e(
|
|
384
|
+
Ht,
|
|
385
|
+
{
|
|
386
|
+
ref: n,
|
|
387
|
+
className: g(
|
|
388
|
+
"richtext-px-2 richtext-py-1.5 richtext-text-sm richtext-font-semibold",
|
|
389
|
+
r && "richtext-pl-8",
|
|
390
|
+
t
|
|
391
|
+
),
|
|
392
|
+
...i
|
|
393
|
+
}
|
|
394
|
+
));
|
|
395
|
+
Cr.displayName = Ht.displayName;
|
|
396
|
+
const se = v.forwardRef(({ className: t, ...r }, i) => /* @__PURE__ */ e(
|
|
397
|
+
_t,
|
|
398
|
+
{
|
|
399
|
+
ref: i,
|
|
400
|
+
className: g("richtext--mx-1 richtext-my-1 richtext-h-px richtext-bg-muted", t),
|
|
401
|
+
...r
|
|
402
|
+
}
|
|
403
|
+
));
|
|
404
|
+
se.displayName = _t.displayName;
|
|
405
|
+
function yr({
|
|
406
|
+
className: t,
|
|
407
|
+
...r
|
|
408
|
+
}) {
|
|
409
|
+
return /* @__PURE__ */ e(
|
|
410
|
+
"span",
|
|
411
|
+
{
|
|
412
|
+
className: g("richtext-ml-auto richtext-text-xs richtext-tracking-widest richtext-opacity-60", t),
|
|
413
|
+
...r
|
|
414
|
+
}
|
|
415
|
+
);
|
|
416
|
+
}
|
|
417
|
+
yr.displayName = "DropdownMenuShortcut";
|
|
418
|
+
const le = v.forwardRef(
|
|
419
|
+
({ className: t, type: r, ...i }, n) => /* @__PURE__ */ e(
|
|
420
|
+
"input",
|
|
421
|
+
{
|
|
422
|
+
type: r,
|
|
423
|
+
className: g(
|
|
424
|
+
"richtext-flex richtext-h-10 richtext-w-full richtext-rounded-md !richtext-border richtext-border-input richtext-bg-background richtext-px-3 richtext-py-2 richtext-text-sm 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 disabled:richtext-cursor-not-allowed disabled:richtext-opacity-50",
|
|
425
|
+
t
|
|
426
|
+
),
|
|
427
|
+
ref: n,
|
|
428
|
+
...i
|
|
429
|
+
}
|
|
430
|
+
)
|
|
431
|
+
);
|
|
432
|
+
le.displayName = "Input";
|
|
433
|
+
const Nr = rt(
|
|
434
|
+
"richtext-text-sm richtext-font-medium richtext-leading-none peer-disabled:richtext-cursor-not-allowed peer-disabled:richtext-opacity-70"
|
|
435
|
+
), Tr = v.forwardRef(({ className: t, ...r }, i) => /* @__PURE__ */ e(
|
|
436
|
+
Ot,
|
|
437
|
+
{
|
|
438
|
+
ref: i,
|
|
439
|
+
className: g(Nr(), t),
|
|
440
|
+
...r
|
|
441
|
+
}
|
|
442
|
+
));
|
|
443
|
+
Tr.displayName = Ot.displayName;
|
|
444
|
+
const he = Te, de = ke, xt = v.forwardRef(({ className: t, align: r = "center", sideOffset: i = 4, ...n }, c) => /* @__PURE__ */ e(Ae, { children: /* @__PURE__ */ e(
|
|
445
|
+
Vt,
|
|
446
|
+
{
|
|
447
|
+
ref: c,
|
|
448
|
+
align: r,
|
|
449
|
+
sideOffset: i,
|
|
450
|
+
className: g(
|
|
451
|
+
"richtext-z-50 richtext-w-72 richtext-rounded-md !richtext-border richtext-bg-popover richtext-p-4 richtext-text-popover-foreground richtext-shadow-md richtext-outline-none 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",
|
|
452
|
+
t
|
|
453
|
+
),
|
|
454
|
+
...n
|
|
455
|
+
}
|
|
456
|
+
) }));
|
|
457
|
+
xt.displayName = Vt.displayName;
|
|
458
|
+
const L = v.forwardRef(
|
|
459
|
+
({ className: t, orientation: r = "horizontal", decorative: i = !0, ...n }, c) => /* @__PURE__ */ e(
|
|
460
|
+
Pt,
|
|
461
|
+
{
|
|
462
|
+
ref: c,
|
|
463
|
+
decorative: i,
|
|
464
|
+
orientation: r,
|
|
465
|
+
className: g(
|
|
466
|
+
"richtext-shrink-0 richtext-bg-border",
|
|
467
|
+
r === "horizontal" ? "richtext-h-[1px] richtext-w-full" : "richtext-h-full richtext-w-[1px]",
|
|
468
|
+
t
|
|
469
|
+
),
|
|
470
|
+
...n
|
|
471
|
+
}
|
|
472
|
+
)
|
|
473
|
+
);
|
|
474
|
+
L.displayName = Pt.displayName;
|
|
475
|
+
const kr = v.forwardRef(({ className: t, ...r }, i) => /* @__PURE__ */ e(
|
|
476
|
+
jt,
|
|
477
|
+
{
|
|
478
|
+
className: g(
|
|
479
|
+
"richtext-peer richtext-inline-flex richtext-h-6 richtext-w-11 richtext-shrink-0 richtext-cursor-pointer richtext-items-center richtext-rounded-full richtext-border-2 richtext-border-transparent richtext-transition-colors focus-visible:richtext-outline-none focus-visible:richtext-ring-2 focus-visible:richtext-ring-ring focus-visible:richtext-ring-offset-2 focus-visible:richtext-ring-offset-background disabled:richtext-cursor-not-allowed disabled:richtext-opacity-50 data-[state=checked]:richtext-bg-primary data-[state=unchecked]:richtext-bg-input",
|
|
480
|
+
t
|
|
481
|
+
),
|
|
482
|
+
...r,
|
|
483
|
+
ref: i,
|
|
484
|
+
children: /* @__PURE__ */ e(
|
|
485
|
+
Se,
|
|
486
|
+
{
|
|
487
|
+
className: g(
|
|
488
|
+
"richtext-pointer-events-none richtext-block richtext-h-5 richtext-w-5 richtext-rounded-full richtext-bg-background richtext-shadow-lg richtext-ring-0 richtext-transition-transform data-[state=checked]:richtext-translate-x-5 data-[state=unchecked]:richtext-translate-x-0"
|
|
489
|
+
)
|
|
490
|
+
}
|
|
491
|
+
)
|
|
492
|
+
}
|
|
493
|
+
));
|
|
494
|
+
kr.displayName = jt.displayName;
|
|
495
|
+
const rc = ze, Ar = v.forwardRef(({ className: t, ...r }, i) => /* @__PURE__ */ e(
|
|
496
|
+
$t,
|
|
497
|
+
{
|
|
498
|
+
ref: i,
|
|
499
|
+
className: g(
|
|
500
|
+
"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",
|
|
501
|
+
t
|
|
502
|
+
),
|
|
503
|
+
...r
|
|
504
|
+
}
|
|
505
|
+
));
|
|
506
|
+
Ar.displayName = $t.displayName;
|
|
507
|
+
const Sr = v.forwardRef(({ className: t, ...r }, i) => /* @__PURE__ */ e(
|
|
508
|
+
Ut,
|
|
509
|
+
{
|
|
510
|
+
ref: i,
|
|
511
|
+
className: g(
|
|
512
|
+
"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-2 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",
|
|
513
|
+
t
|
|
514
|
+
),
|
|
515
|
+
...r
|
|
516
|
+
}
|
|
517
|
+
));
|
|
518
|
+
Sr.displayName = Ut.displayName;
|
|
519
|
+
const zr = v.forwardRef(({ className: t, ...r }, i) => /* @__PURE__ */ e(
|
|
520
|
+
Wt,
|
|
521
|
+
{
|
|
522
|
+
ref: i,
|
|
523
|
+
className: g(
|
|
524
|
+
"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-2",
|
|
525
|
+
t
|
|
526
|
+
),
|
|
527
|
+
...r
|
|
528
|
+
}
|
|
529
|
+
));
|
|
530
|
+
zr.displayName = Wt.displayName;
|
|
531
|
+
const nc = Ee, Er = v.forwardRef(({ className: t, ...r }, i) => /* @__PURE__ */ e(
|
|
532
|
+
Gt,
|
|
533
|
+
{
|
|
534
|
+
ref: i,
|
|
535
|
+
className: g(
|
|
536
|
+
"richtext-fixed richtext-top-0 richtext-z-[100] richtext-flex richtext-max-h-screen richtext-w-full richtext-flex-col-reverse richtext-p-4 sm:richtext-bottom-0 sm:richtext-right-0 sm:richtext-top-auto sm:richtext-flex-col md:richtext-max-w-[420px]",
|
|
537
|
+
t
|
|
538
|
+
),
|
|
539
|
+
...r
|
|
540
|
+
}
|
|
541
|
+
));
|
|
542
|
+
Er.displayName = Gt.displayName;
|
|
543
|
+
const Mr = rt(
|
|
544
|
+
"richtext-group richtext-pointer-events-auto richtext-relative richtext-flex richtext-w-full richtext-items-center richtext-justify-between richtext-space-x-4 richtext-overflow-hidden richtext-rounded-md !richtext-border richtext-p-6 richtext-pr-8 richtext-shadow-lg richtext-transition-all data-[swipe=cancel]:richtext-translate-x-0 data-[swipe=end]:richtext-translate-x-[var(--radix-toast-swipe-end-x)] data-[swipe=move]:richtext-translate-x-[var(--radix-toast-swipe-move-x)] data-[swipe=move]:richtext-transition-none data-[state=open]:richtext-animate-in data-[state=closed]:richtext-animate-out data-[swipe=end]:richtext-animate-out data-[state=closed]:richtext-fade-out-80 data-[state=closed]:richtext-slide-out-to-right-full data-[state=open]:richtext-slide-in-from-top-full data-[state=open]:sm:richtext-slide-in-from-bottom-full",
|
|
545
|
+
{
|
|
546
|
+
variants: {
|
|
547
|
+
variant: {
|
|
548
|
+
default: "richtext-border richtext-bg-background richtext-text-foreground",
|
|
549
|
+
destructive: "richtext-destructive richtext-group richtext-border-destructive richtext-bg-destructive richtext-text-destructive-foreground"
|
|
550
|
+
}
|
|
551
|
+
},
|
|
552
|
+
defaultVariants: {
|
|
553
|
+
variant: "default"
|
|
554
|
+
}
|
|
555
|
+
}
|
|
556
|
+
), Lr = v.forwardRef(({ className: t, variant: r, ...i }, n) => /* @__PURE__ */ e(
|
|
557
|
+
Kt,
|
|
558
|
+
{
|
|
559
|
+
ref: n,
|
|
560
|
+
className: g(Mr({ variant: r }), t),
|
|
561
|
+
...i
|
|
562
|
+
}
|
|
563
|
+
));
|
|
564
|
+
Lr.displayName = Kt.displayName;
|
|
565
|
+
const Dr = v.forwardRef(({ className: t, ...r }, i) => /* @__PURE__ */ e(
|
|
566
|
+
Xt,
|
|
567
|
+
{
|
|
568
|
+
ref: i,
|
|
569
|
+
className: g(
|
|
570
|
+
"richtext-inline-flex richtext-h-8 richtext-shrink-0 richtext-items-center richtext-justify-center richtext-rounded-md !richtext-border richtext-bg-transparent richtext-px-3 richtext-text-sm richtext-font-medium richtext-ring-offset-background richtext-transition-colors hover:richtext-bg-secondary focus:richtext-outline-none focus:richtext-ring-2 focus:richtext-ring-ring focus:richtext-ring-offset-2 disabled:richtext-pointer-events-none disabled:richtext-opacity-50 group-[.destructive]:richtext-border-muted/40 group-[.destructive]:hover:richtext-border-destructive/30 group-[.destructive]:hover:richtext-bg-destructive group-[.destructive]:hover:richtext-text-destructive-foreground group-[.destructive]:focus:richtext-ring-destructive",
|
|
571
|
+
t
|
|
572
|
+
),
|
|
573
|
+
...r
|
|
574
|
+
}
|
|
575
|
+
));
|
|
576
|
+
Dr.displayName = Xt.displayName;
|
|
577
|
+
const Br = v.forwardRef(({ className: t, ...r }, i) => /* @__PURE__ */ e(
|
|
578
|
+
Jt,
|
|
579
|
+
{
|
|
580
|
+
ref: i,
|
|
581
|
+
className: g(
|
|
582
|
+
"richtext-absolute richtext-right-2 richtext-top-2 richtext-rounded-md richtext-p-1 richtext-text-foreground/50 richtext-opacity-0 richtext-transition-opacity hover:richtext-text-foreground focus:richtext-opacity-100 focus:richtext-outline-none focus:richtext-ring-2 group-hover:richtext-opacity-100 group-[.destructive]:richtext-text-red-300 group-[.destructive]:hover:richtext-text-red-50 group-[.destructive]:focus:richtext-ring-red-400 group-[.destructive]:focus:richtext-ring-offset-red-600",
|
|
583
|
+
t
|
|
584
|
+
),
|
|
585
|
+
"toast-close": "",
|
|
586
|
+
...r,
|
|
587
|
+
children: /* @__PURE__ */ e(Ke, { className: "richtext-h-4 richtext-w-4" })
|
|
588
|
+
}
|
|
589
|
+
));
|
|
590
|
+
Br.displayName = Jt.displayName;
|
|
591
|
+
const Fr = v.forwardRef(({ className: t, ...r }, i) => /* @__PURE__ */ e(
|
|
592
|
+
qt,
|
|
593
|
+
{
|
|
594
|
+
ref: i,
|
|
595
|
+
className: g("richtext-text-sm richtext-font-semibold", t),
|
|
596
|
+
...r
|
|
597
|
+
}
|
|
598
|
+
));
|
|
599
|
+
Fr.displayName = qt.displayName;
|
|
600
|
+
const Rr = v.forwardRef(({ className: t, ...r }, i) => /* @__PURE__ */ e(
|
|
601
|
+
Zt,
|
|
602
|
+
{
|
|
603
|
+
ref: i,
|
|
604
|
+
className: g("richtext-text-sm richtext-opacity-90", t),
|
|
605
|
+
...r
|
|
606
|
+
}
|
|
607
|
+
));
|
|
608
|
+
Rr.displayName = Zt.displayName;
|
|
609
|
+
const Ir = rt(
|
|
610
|
+
"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-2 disabled:richtext-pointer-events-none disabled:richtext-opacity-50 data-[state=on]:richtext-bg-accent data-[state=on]:richtext-text-accent-foreground",
|
|
611
|
+
{
|
|
612
|
+
variants: {
|
|
613
|
+
variant: {
|
|
614
|
+
default: "richtext-bg-transparent",
|
|
615
|
+
outline: "richtext-border richtext-border-input richtext-bg-transparent hover:richtext-bg-accent hover:richtext-text-accent-foreground"
|
|
616
|
+
},
|
|
617
|
+
size: {
|
|
618
|
+
default: "richtext-h-10 richtext-px-3",
|
|
619
|
+
sm: "richtext-h-9 richtext-px-2",
|
|
620
|
+
lg: "richtext-h-11 richtext-px-5"
|
|
621
|
+
}
|
|
622
|
+
},
|
|
623
|
+
defaultVariants: {
|
|
624
|
+
variant: "default",
|
|
625
|
+
size: "default"
|
|
626
|
+
}
|
|
627
|
+
}
|
|
628
|
+
), xe = v.forwardRef(({ className: t, variant: r, size: i, ...n }, c) => /* @__PURE__ */ e(
|
|
629
|
+
Qt,
|
|
630
|
+
{
|
|
631
|
+
ref: c,
|
|
632
|
+
className: g(Ir({ variant: r, size: i, className: t })),
|
|
633
|
+
...n
|
|
634
|
+
}
|
|
635
|
+
));
|
|
636
|
+
xe.displayName = Qt.displayName;
|
|
637
|
+
const Hr = Me, ut = Le, mt = De, nt = v.forwardRef(({ className: t, sideOffset: r = 4, ...i }, n) => /* @__PURE__ */ e(
|
|
638
|
+
Yt,
|
|
639
|
+
{
|
|
640
|
+
ref: n,
|
|
641
|
+
sideOffset: r,
|
|
642
|
+
className: g(
|
|
643
|
+
"richtext-z-50 richtext-overflow-hidden richtext-rounded-md !richtext-border richtext-bg-popover richtext-px-3 richtext-py-1.5 richtext-text-sm richtext-text-popover-foreground richtext-shadow-md richtext-animate-in richtext-fade-in-0 richtext-zoom-in-95 data-[state=closed]:richtext-animate-out data-[state=closed]:richtext-fade-out-0 data-[state=closed]:richtext-zoom-out-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",
|
|
644
|
+
t
|
|
645
|
+
),
|
|
646
|
+
...i
|
|
647
|
+
}
|
|
648
|
+
));
|
|
649
|
+
nt.displayName = Yt.displayName;
|
|
650
|
+
const _r = 1, Or = 1e6;
|
|
651
|
+
let ct = 0;
|
|
652
|
+
function Vr() {
|
|
653
|
+
return ct = (ct + 1) % Number.MAX_SAFE_INTEGER, ct.toString();
|
|
654
|
+
}
|
|
655
|
+
const at = /* @__PURE__ */ new Map();
|
|
656
|
+
function At(t) {
|
|
657
|
+
if (at.has(t))
|
|
658
|
+
return;
|
|
659
|
+
const r = setTimeout(() => {
|
|
660
|
+
at.delete(t), W({
|
|
661
|
+
type: "REMOVE_TOAST",
|
|
662
|
+
toastId: t
|
|
663
|
+
});
|
|
664
|
+
}, Or);
|
|
665
|
+
at.set(t, r);
|
|
666
|
+
}
|
|
667
|
+
function Pr(t, r) {
|
|
668
|
+
switch (r.type) {
|
|
669
|
+
case "ADD_TOAST":
|
|
670
|
+
return {
|
|
671
|
+
...t,
|
|
672
|
+
toasts: [r.toast, ...t.toasts].slice(0, _r)
|
|
673
|
+
};
|
|
674
|
+
case "UPDATE_TOAST":
|
|
675
|
+
return {
|
|
676
|
+
...t,
|
|
677
|
+
toasts: t.toasts.map(
|
|
678
|
+
(i) => i.id === r.toast.id ? { ...i, ...r.toast } : i
|
|
679
|
+
)
|
|
680
|
+
};
|
|
681
|
+
case "DISMISS_TOAST": {
|
|
682
|
+
const { toastId: i } = r;
|
|
683
|
+
return i ? At(i) : t.toasts.forEach((n) => {
|
|
684
|
+
At(n.id);
|
|
685
|
+
}), {
|
|
686
|
+
...t,
|
|
687
|
+
toasts: t.toasts.map(
|
|
688
|
+
(n) => n.id === i || i === void 0 ? {
|
|
689
|
+
...n,
|
|
690
|
+
open: !1
|
|
691
|
+
} : n
|
|
692
|
+
)
|
|
693
|
+
};
|
|
694
|
+
}
|
|
695
|
+
case "REMOVE_TOAST":
|
|
696
|
+
return r.toastId === void 0 ? {
|
|
697
|
+
...t,
|
|
698
|
+
toasts: []
|
|
699
|
+
} : {
|
|
700
|
+
...t,
|
|
701
|
+
toasts: t.toasts.filter((i) => i.id !== r.toastId)
|
|
702
|
+
};
|
|
703
|
+
}
|
|
704
|
+
}
|
|
705
|
+
const tt = [];
|
|
706
|
+
let et = { toasts: [] };
|
|
707
|
+
function W(t) {
|
|
708
|
+
et = Pr(et, t), tt.forEach((r) => {
|
|
709
|
+
r(et);
|
|
710
|
+
});
|
|
711
|
+
}
|
|
712
|
+
function jr({ ...t }) {
|
|
713
|
+
const r = Vr(), i = (c) => W({
|
|
714
|
+
type: "UPDATE_TOAST",
|
|
715
|
+
toast: { ...c, id: r }
|
|
716
|
+
}), n = () => W({ type: "DISMISS_TOAST", toastId: r });
|
|
717
|
+
return W({
|
|
718
|
+
type: "ADD_TOAST",
|
|
719
|
+
toast: {
|
|
720
|
+
...t,
|
|
721
|
+
id: r,
|
|
722
|
+
open: !0,
|
|
723
|
+
onOpenChange: (c) => {
|
|
724
|
+
c || n();
|
|
725
|
+
}
|
|
726
|
+
}
|
|
727
|
+
}), {
|
|
728
|
+
id: r,
|
|
729
|
+
dismiss: n,
|
|
730
|
+
update: i
|
|
731
|
+
};
|
|
732
|
+
}
|
|
733
|
+
function cc() {
|
|
734
|
+
const [t, r] = v.useState(et);
|
|
735
|
+
return v.useEffect(() => (tt.push(r), () => {
|
|
736
|
+
const i = tt.indexOf(r);
|
|
737
|
+
i > -1 && tt.splice(i, 1);
|
|
738
|
+
}), [t]), {
|
|
739
|
+
...t,
|
|
740
|
+
toast: jr,
|
|
741
|
+
dismiss: (i) => W({ type: "DISMISS_TOAST", toastId: i })
|
|
742
|
+
};
|
|
743
|
+
}
|
|
744
|
+
function $r({ editor: t, ...r }) {
|
|
745
|
+
const i = fr(t, Y.name, {
|
|
746
|
+
text: "",
|
|
747
|
+
defaultShowPicker: !1
|
|
748
|
+
}), { text: n, defaultShowPicker: c } = i, a = it(), [s, h] = M(!1), o = S(() => t.isActive(Y.name), [t]), d = S(() => ee(Y.name, t), [t]), p = S(() => {
|
|
749
|
+
t.chain().focus().setKatex({ text: a.current.value }).run();
|
|
750
|
+
}, [t]);
|
|
751
|
+
return T(() => {
|
|
752
|
+
c && (h(!0), t.chain().updateAttributes(Y.name, { defaultShowPicker: !1 }).focus().run());
|
|
753
|
+
}, [t, c, h]), T(() => {
|
|
754
|
+
s && setTimeout(() => {
|
|
755
|
+
var x;
|
|
756
|
+
return (x = a.current) == null ? void 0 : x.focus();
|
|
757
|
+
}, 200);
|
|
758
|
+
}, [s]), /* @__PURE__ */ e(
|
|
759
|
+
_,
|
|
760
|
+
{
|
|
761
|
+
editor: t,
|
|
762
|
+
pluginKey: "Katex-bubble-menu",
|
|
763
|
+
shouldShow: o,
|
|
764
|
+
tippyOptions: {
|
|
765
|
+
popperOptions: {
|
|
766
|
+
modifiers: [{ name: "flip", enabled: !1 }]
|
|
767
|
+
},
|
|
768
|
+
placement: "bottom-start",
|
|
769
|
+
offset: [-2, 16],
|
|
770
|
+
zIndex: 9999,
|
|
771
|
+
onHidden: () => {
|
|
772
|
+
h(!1);
|
|
773
|
+
}
|
|
774
|
+
},
|
|
775
|
+
children: r != null && r.disabled ? /* @__PURE__ */ e(N, {}) : /* @__PURE__ */ e("div", { className: "richtext-p-2 richtext-bg-white !richtext-border richtext-rounded-lg richtext-shadow-sm dark:richtext-bg-black richtext-border-neutral-200 dark:richtext-border-neutral-800", children: s ? /* @__PURE__ */ l(N, { children: [
|
|
776
|
+
/* @__PURE__ */ e(
|
|
777
|
+
ae,
|
|
778
|
+
{
|
|
779
|
+
ref: a,
|
|
780
|
+
autoFocus: !0,
|
|
781
|
+
placeholder: "Formula text",
|
|
782
|
+
rows: 3,
|
|
783
|
+
defaultValue: n,
|
|
784
|
+
style: { marginBottom: 8 }
|
|
785
|
+
}
|
|
786
|
+
),
|
|
787
|
+
/* @__PURE__ */ l("div", { className: "richtext-flex richtext-items-center richtext-justify-between richtext-gap-[6px]", children: [
|
|
788
|
+
/* @__PURE__ */ e(P, { onClick: p, className: "richtext-flex-1", children: "Submit" }),
|
|
789
|
+
/* @__PURE__ */ e("a", { href: "https://katex.org/", target: "_blank", rel: "noreferrer noopener", children: /* @__PURE__ */ e(Xe, { size: 16 }) })
|
|
790
|
+
] })
|
|
791
|
+
] }) : /* @__PURE__ */ l("div", { className: "richtext-flex richtext-items-center richtext-justify-center richtext-gap-[6px]", children: [
|
|
792
|
+
/* @__PURE__ */ e(C, { tooltip: "Edit", action: () => h(!s), children: /* @__PURE__ */ e(ie, { size: 16 }) }),
|
|
793
|
+
/* @__PURE__ */ e(C, { tooltip: "Delete", action: d, children: /* @__PURE__ */ e(re, { size: 16 }) })
|
|
794
|
+
] }) })
|
|
795
|
+
}
|
|
796
|
+
);
|
|
797
|
+
}
|
|
798
|
+
function Ur({ editor: t, disabled: r, bubbleMenu: i }) {
|
|
799
|
+
const n = t.extensionManager.extensions.map((a) => a.name), c = () => {
|
|
800
|
+
var a, s, h, o, d, p, x, w;
|
|
801
|
+
return [
|
|
802
|
+
n.includes("columns") && !((a = i == null ? void 0 : i.columnConfig) != null && a.hidden) ? /* @__PURE__ */ e(zn, { editor: t }, "columns") : null,
|
|
803
|
+
n.includes("table") && !((s = i == null ? void 0 : i.tableConfig) != null && s.hidden) ? /* @__PURE__ */ e(yn, { editor: t }, "table") : null,
|
|
804
|
+
n.includes("link") && !((h = i == null ? void 0 : i.linkConfig) != null && h.hidden) ? /* @__PURE__ */ e(Nn, { editor: t, disabled: r }, "link") : null,
|
|
805
|
+
n.includes("image") && !((o = i == null ? void 0 : i.imageConfig) != null && o.hidden) ? /* @__PURE__ */ e(An, { editor: t, disabled: r }, "image") : null,
|
|
806
|
+
n.includes("video") && !((d = i == null ? void 0 : i.videoConfig) != null && d.hidden) ? /* @__PURE__ */ e(Sn, { editor: t, disabled: r }, "video") : null,
|
|
807
|
+
n.includes("katex") && !((p = i == null ? void 0 : i.katexConfig) != null && p.hidden) ? /* @__PURE__ */ e($r, { editor: t, disabled: r }, "katex") : null,
|
|
808
|
+
(x = i == null ? void 0 : i.floatingMenuConfig) != null && x.hidden ? null : /* @__PURE__ */ e(pn, { editor: t, disabled: r }, "content"),
|
|
809
|
+
(w = i == null ? void 0 : i.textConfig) != null && w.hidden ? null : /* @__PURE__ */ e(Cn, { editor: t, disabled: r }, "text")
|
|
810
|
+
];
|
|
811
|
+
};
|
|
812
|
+
return i != null && i.render ? i.render({ editor: t, disabled: r || !1, bubbleMenu: i }, c()) : c().filter(Boolean);
|
|
813
|
+
}
|
|
814
|
+
function St() {
|
|
815
|
+
return /* @__PURE__ */ e("svg", { xmlns: "http://www.w3.org/2000/svg", width: "1em", height: "1em", viewBox: "0 0 24 24", children: /* @__PURE__ */ e("path", { fill: "currentColor", d: "M18 14c0-4-6-10.8-6-10.8s-1.33 1.51-2.73 3.52l8.59 8.59c.09-.42.14-.86.14-1.31m-.88 3.12L12.5 12.5L5.27 5.27L4 6.55l3.32 3.32C6.55 11.32 6 12.79 6 14c0 3.31 2.69 6 6 6c1.52 0 2.9-.57 3.96-1.5l2.63 2.63l1.27-1.27z" }) });
|
|
816
|
+
}
|
|
817
|
+
function ac(t) {
|
|
818
|
+
const { t: r } = z(), {
|
|
819
|
+
highlight: i = !1,
|
|
820
|
+
disabled: n = !1,
|
|
821
|
+
selectedColor: c,
|
|
822
|
+
setSelectedColor: a,
|
|
823
|
+
onChange: s,
|
|
824
|
+
colors: h = xr
|
|
825
|
+
} = t, o = H(() => {
|
|
826
|
+
const u = h, f = [];
|
|
827
|
+
for (let b = 0; b < u.length; b += 10)
|
|
828
|
+
f.push(u.slice(b, b + 10));
|
|
829
|
+
return f;
|
|
830
|
+
}, [h]), [d, p] = M([]), x = (u) => {
|
|
831
|
+
const f = [...d], b = f.indexOf(u);
|
|
832
|
+
b !== -1 && f.splice(b, 1), f.unshift(u), f.length > 10 && f.pop(), p(f);
|
|
833
|
+
};
|
|
834
|
+
function w(u) {
|
|
835
|
+
if (u === void 0) {
|
|
836
|
+
a == null || a(u), s == null || s(u);
|
|
837
|
+
return;
|
|
838
|
+
}
|
|
839
|
+
/^#([\da-f]{3}){1,2}$/i.test(u) && (a == null || a(u), s == null || s(u), x(u));
|
|
840
|
+
}
|
|
841
|
+
return /* @__PURE__ */ l(he, { children: [
|
|
842
|
+
/* @__PURE__ */ e(de, { className: "!richtext-p-0", disabled: n, asChild: !0, children: t == null ? void 0 : t.children }),
|
|
843
|
+
/* @__PURE__ */ e(xt, { hideWhenDetached: !0, className: "richtext-w-full richtext-h-full richtext-p-2", align: "start", side: "bottom", children: /* @__PURE__ */ l("div", { className: "richtext-flex richtext-flex-col", children: [
|
|
844
|
+
i ? /* @__PURE__ */ l(
|
|
845
|
+
"div",
|
|
846
|
+
{
|
|
847
|
+
className: "richtext-flex richtext-items-center richtext-p-1 richtext-cursor-pointer rd-1 richtext-gap-[4px] hover:richtext-bg-accent",
|
|
848
|
+
onClick: () => w(void 0),
|
|
849
|
+
children: [
|
|
850
|
+
/* @__PURE__ */ e(St, {}),
|
|
851
|
+
/* @__PURE__ */ e("span", { className: "richtext-ml-1 richtext-text-sm", children: r("editor.nofill") })
|
|
852
|
+
]
|
|
853
|
+
}
|
|
854
|
+
) : /* @__PURE__ */ l(
|
|
855
|
+
"div",
|
|
856
|
+
{
|
|
857
|
+
className: "richtext-flex richtext-items-center richtext-p-1 richtext-cursor-pointer rd-1 richtext-gap-[4px] hover:richtext-bg-accent",
|
|
858
|
+
onClick: () => {
|
|
859
|
+
w(void 0);
|
|
860
|
+
},
|
|
861
|
+
children: [
|
|
862
|
+
/* @__PURE__ */ e(St, {}),
|
|
863
|
+
/* @__PURE__ */ e("span", { className: "richtext-ml-1 richtext-text-sm", children: r("editor.default") })
|
|
864
|
+
]
|
|
865
|
+
}
|
|
866
|
+
),
|
|
867
|
+
o.map((u, f) => /* @__PURE__ */ e("span", { className: "richtext-relative richtext-flex richtext-w-full richtext-h-auto richtext-p-0 last:richtext-pb-2", children: u.map((b, k) => /* @__PURE__ */ e(
|
|
868
|
+
"span",
|
|
869
|
+
{
|
|
870
|
+
className: "richtext-w-6 richtext-h-6 richtext-p-0.5 richtext-inline-block richtext-rounded-sm !richtext-border richtext-border-transparent richtext-flex-[0_0_auto] richtext-cursor-pointer hover:richtext-border-border hover:richtext-shadow-sm",
|
|
871
|
+
onClick: () => w(b),
|
|
872
|
+
children: /* @__PURE__ */ e(
|
|
873
|
+
"span",
|
|
874
|
+
{
|
|
875
|
+
style: {
|
|
876
|
+
backgroundColor: b
|
|
877
|
+
},
|
|
878
|
+
className: "richtext-relative richtext-w-[18px] richtext-h-[18px] richtext-block richtext-rounded-[2px] richtext-border-transparent",
|
|
879
|
+
children: b === c ? /* @__PURE__ */ e(
|
|
880
|
+
"svg",
|
|
881
|
+
{
|
|
882
|
+
className: "richtext-absolute richtext-block richtext-top-[-1px] richtext-left-[1px] richtext-w-3 richtext-h-3",
|
|
883
|
+
viewBox: "0 0 18 18",
|
|
884
|
+
style: {
|
|
885
|
+
fill: "rgb(255, 255, 255)"
|
|
886
|
+
},
|
|
887
|
+
children: /* @__PURE__ */ e("path", { d: "M21,7L9,19L3.5,13.5L4.91,12.09L9,16.17L19.59,5.59L21,7Z" })
|
|
888
|
+
}
|
|
889
|
+
) : /* @__PURE__ */ e(
|
|
890
|
+
"svg",
|
|
891
|
+
{
|
|
892
|
+
viewBox: "0 0 18 18",
|
|
893
|
+
style: {
|
|
894
|
+
fill: "rgb(255, 255, 255)",
|
|
895
|
+
display: "none"
|
|
896
|
+
},
|
|
897
|
+
children: /* @__PURE__ */ e("path", { d: "M21,7L9,19L3.5,13.5L4.91,12.09L9,16.17L19.59,5.59L21,7Z" })
|
|
898
|
+
}
|
|
899
|
+
)
|
|
900
|
+
}
|
|
901
|
+
)
|
|
902
|
+
},
|
|
903
|
+
`sub-color-${k}`
|
|
904
|
+
)) }, f)),
|
|
905
|
+
/* @__PURE__ */ l("div", { children: [
|
|
906
|
+
/* @__PURE__ */ e("div", { className: "richtext-my-1 richtext-text-sm", children: r("editor.recent") }),
|
|
907
|
+
/* @__PURE__ */ e("span", { className: "richtext-relative richtext-flex richtext-w-full richtext-h-auto richtext-p-0 last:richtext-pb-2", children: d == null ? void 0 : d.map((u, f) => /* @__PURE__ */ e(
|
|
908
|
+
"span",
|
|
909
|
+
{
|
|
910
|
+
className: "richtext-w-6 richtext-h-6 richtext-p-0.5 richtext-inline-block richtext-rounded-sm !richtext-border richtext-border-transparent richtext-flex-[0_0_auto] richtext-cursor-pointer hover:richtext-border-border hover:richtext-shadow-sm",
|
|
911
|
+
onClick: () => w(u),
|
|
912
|
+
children: /* @__PURE__ */ e(
|
|
913
|
+
"span",
|
|
914
|
+
{
|
|
915
|
+
className: "richtext-relative richtext-w-[18px] richtext-h-[18px] richtext-block richtext-rounded-[2px] richtext-border-transparent",
|
|
916
|
+
style: {
|
|
917
|
+
backgroundColor: u
|
|
918
|
+
},
|
|
919
|
+
children: /* @__PURE__ */ e(
|
|
920
|
+
"svg",
|
|
921
|
+
{
|
|
922
|
+
viewBox: "0 0 18 18",
|
|
923
|
+
style: {
|
|
924
|
+
fill: "rgb(255, 255, 255)",
|
|
925
|
+
display: "none"
|
|
926
|
+
},
|
|
927
|
+
children: /* @__PURE__ */ e("path", { d: "M21,7L9,19L3.5,13.5L4.91,12.09L9,16.17L19.59,5.59L21,7Z" })
|
|
928
|
+
}
|
|
929
|
+
)
|
|
930
|
+
}
|
|
931
|
+
)
|
|
932
|
+
},
|
|
933
|
+
`sub-color-recent-${f}`
|
|
934
|
+
)) })
|
|
935
|
+
] }),
|
|
936
|
+
/* @__PURE__ */ e(Wr, { setColor: w })
|
|
937
|
+
] }) })
|
|
938
|
+
] });
|
|
939
|
+
}
|
|
940
|
+
function Wr({ setColor: t }) {
|
|
941
|
+
const [r, i] = M("#000000"), [n, c] = M(!1), { t: a } = z();
|
|
942
|
+
return T(() => () => {
|
|
943
|
+
c(!1);
|
|
944
|
+
}, []), /* @__PURE__ */ l(he, { open: n, children: [
|
|
945
|
+
/* @__PURE__ */ e(de, { asChild: !0, children: /* @__PURE__ */ l(
|
|
946
|
+
"div",
|
|
947
|
+
{
|
|
948
|
+
onClick: (s) => {
|
|
949
|
+
s.preventDefault(), c(!0);
|
|
950
|
+
},
|
|
951
|
+
className: "richtext-text-sm hover:richtext-cursor-pointer hover:richtext-bg-accent richtext-py-1.5 richtext-px-1.5",
|
|
952
|
+
children: [
|
|
953
|
+
a("editor.color.more"),
|
|
954
|
+
"..."
|
|
955
|
+
]
|
|
956
|
+
}
|
|
957
|
+
) }),
|
|
958
|
+
/* @__PURE__ */ l(xt, { children: [
|
|
959
|
+
/* @__PURE__ */ l("div", { className: "richtext-flex richtext-flex-col richtext-items-center richtext-justify-center", children: [
|
|
960
|
+
/* @__PURE__ */ e(Je, { color: r, onChange: i }),
|
|
961
|
+
/* @__PURE__ */ e(
|
|
962
|
+
le,
|
|
963
|
+
{
|
|
964
|
+
className: "richtext-mt-[8px] richtext-w-full",
|
|
965
|
+
type: "text",
|
|
966
|
+
onChange: (s) => {
|
|
967
|
+
s.preventDefault(), i(`#${s.target.value}`);
|
|
968
|
+
},
|
|
969
|
+
value: r.slice(1)
|
|
970
|
+
}
|
|
971
|
+
)
|
|
972
|
+
] }),
|
|
973
|
+
/* @__PURE__ */ e(L, { className: "richtext-my-[10px]" }),
|
|
974
|
+
/* @__PURE__ */ e(
|
|
975
|
+
P,
|
|
976
|
+
{
|
|
977
|
+
onClick: (s) => {
|
|
978
|
+
s.preventDefault(), t(r), c(!1);
|
|
979
|
+
},
|
|
980
|
+
className: "richtext-w-full",
|
|
981
|
+
children: /* @__PURE__ */ e(ne, { size: 16 })
|
|
982
|
+
}
|
|
983
|
+
)
|
|
984
|
+
] })
|
|
985
|
+
] });
|
|
986
|
+
}
|
|
987
|
+
const Gr = `
|
|
988
|
+
.reactjs-tiptap-editor {
|
|
989
|
+
button,
|
|
990
|
+
input:where([type=button]),
|
|
991
|
+
input:where([type=reset]),
|
|
992
|
+
input:where([type=submit]) {
|
|
993
|
+
-webkit-appearance: button;
|
|
994
|
+
background-color: transparent;
|
|
995
|
+
background-image: none
|
|
996
|
+
}
|
|
997
|
+
|
|
998
|
+
input,
|
|
999
|
+
optgroup,
|
|
1000
|
+
select,
|
|
1001
|
+
textarea {
|
|
1002
|
+
font-family: inherit;
|
|
1003
|
+
font-feature-settings: inherit;
|
|
1004
|
+
font-variation-settings: inherit;
|
|
1005
|
+
font-size: 100%;
|
|
1006
|
+
font-weight: inherit;
|
|
1007
|
+
line-height: inherit;
|
|
1008
|
+
letter-spacing: inherit;
|
|
1009
|
+
color: inherit;
|
|
1010
|
+
}
|
|
1011
|
+
|
|
1012
|
+
button {
|
|
1013
|
+
font-family: inherit;
|
|
1014
|
+
font-feature-settings: inherit;
|
|
1015
|
+
font-variation-settings: inherit;
|
|
1016
|
+
font-size: 100%;
|
|
1017
|
+
font-weight: inherit;
|
|
1018
|
+
line-height: inherit;
|
|
1019
|
+
letter-spacing: inherit;
|
|
1020
|
+
color: inherit;
|
|
1021
|
+
}
|
|
1022
|
+
}
|
|
1023
|
+
|
|
1024
|
+
.reactjs-tiptap-editor,
|
|
1025
|
+
div[data-radix-popper-content-wrapper],
|
|
1026
|
+
div[data-tippy-root] {
|
|
1027
|
+
*,
|
|
1028
|
+
:before,
|
|
1029
|
+
:after {
|
|
1030
|
+
box-sizing: border-box;
|
|
1031
|
+
border-width: 0;
|
|
1032
|
+
border-style: solid;
|
|
1033
|
+
border-color: hsl(var(--richtext-border));
|
|
1034
|
+
}
|
|
1035
|
+
|
|
1036
|
+
background-color: hsl(var(--richtext-background));
|
|
1037
|
+
color: hsl(var(--richtext-foreground));
|
|
1038
|
+
|
|
1039
|
+
|
|
1040
|
+
html,
|
|
1041
|
+
:host {
|
|
1042
|
+
line-height: 1.5;
|
|
1043
|
+
-webkit-text-size-adjust: 100%;
|
|
1044
|
+
-moz-tab-size: 4;
|
|
1045
|
+
tab-size: 4;
|
|
1046
|
+
font-family: ui-sans-serif, system-ui, sans-serif, "Apple Color Emoji", "Segoe UI Emoji", Segoe UI Symbol, "Noto Color Emoji";
|
|
1047
|
+
font-feature-settings: normal;
|
|
1048
|
+
font-variation-settings: normal;
|
|
1049
|
+
-webkit-tap-highlight-color: transparent
|
|
1050
|
+
}
|
|
1051
|
+
|
|
1052
|
+
hr {
|
|
1053
|
+
height: 0;
|
|
1054
|
+
color: inherit;
|
|
1055
|
+
border-top-width: 1px
|
|
1056
|
+
}
|
|
1057
|
+
|
|
1058
|
+
a {
|
|
1059
|
+
color: inherit;
|
|
1060
|
+
text-decoration: inherit
|
|
1061
|
+
}
|
|
1062
|
+
|
|
1063
|
+
b,
|
|
1064
|
+
strong {
|
|
1065
|
+
font-weight: bolder
|
|
1066
|
+
}
|
|
1067
|
+
|
|
1068
|
+
code,
|
|
1069
|
+
kbd,
|
|
1070
|
+
samp,
|
|
1071
|
+
pre {
|
|
1072
|
+
font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, Liberation Mono, Courier New, monospace;
|
|
1073
|
+
font-feature-settings: normal;
|
|
1074
|
+
font-variation-settings: normal;
|
|
1075
|
+
font-size: 1em
|
|
1076
|
+
}
|
|
1077
|
+
|
|
1078
|
+
table {
|
|
1079
|
+
text-indent: 0;
|
|
1080
|
+
border-color: inherit;
|
|
1081
|
+
border-collapse: collapse
|
|
1082
|
+
}
|
|
1083
|
+
|
|
1084
|
+
input, textarea {
|
|
1085
|
+
border-width: 1px;
|
|
1086
|
+
}
|
|
1087
|
+
|
|
1088
|
+
textarea {
|
|
1089
|
+
resize: vertical
|
|
1090
|
+
}
|
|
1091
|
+
|
|
1092
|
+
input::placeholder,
|
|
1093
|
+
textarea::placeholder {
|
|
1094
|
+
opacity: 1;
|
|
1095
|
+
color: #9ca3af
|
|
1096
|
+
}
|
|
1097
|
+
|
|
1098
|
+
button, input, textarea {
|
|
1099
|
+
cursor: pointer;
|
|
1100
|
+
color: inherit;
|
|
1101
|
+
}
|
|
1102
|
+
|
|
1103
|
+
img,
|
|
1104
|
+
svg,
|
|
1105
|
+
video,
|
|
1106
|
+
canvas,
|
|
1107
|
+
audio,
|
|
1108
|
+
iframe,
|
|
1109
|
+
embed,
|
|
1110
|
+
object {
|
|
1111
|
+
display: block;
|
|
1112
|
+
vertical-align: middle
|
|
1113
|
+
}
|
|
1114
|
+
|
|
1115
|
+
img,
|
|
1116
|
+
video {
|
|
1117
|
+
max-width: 100%;
|
|
1118
|
+
height: auto
|
|
1119
|
+
}
|
|
1120
|
+
}
|
|
1121
|
+
`, ue = qe({
|
|
1122
|
+
theme: "light"
|
|
1123
|
+
});
|
|
1124
|
+
function oc() {
|
|
1125
|
+
return Ze(ue).theme;
|
|
1126
|
+
}
|
|
1127
|
+
const Kr = {
|
|
1128
|
+
setTheme: (t) => {
|
|
1129
|
+
ue.theme = t;
|
|
1130
|
+
}
|
|
1131
|
+
};
|
|
1132
|
+
function Xr(t, r) {
|
|
1133
|
+
const { content: i, extensions: n, useEditorOptions: c = {} } = t, { t: a } = z(), s = H(() => {
|
|
1134
|
+
const x = Qe(n, n, "name");
|
|
1135
|
+
return [...n.map((u) => {
|
|
1136
|
+
const f = n.find((b) => b.name === u.name);
|
|
1137
|
+
return f ? u.configure(f.options) : u;
|
|
1138
|
+
}), ...x].map((u, f) => u.configure({ sort: f }));
|
|
1139
|
+
}, [n]), h = Ye((x) => {
|
|
1140
|
+
var u;
|
|
1141
|
+
const w = d(x, t.output);
|
|
1142
|
+
(u = t == null ? void 0 : t.onChangeContent) == null || u.call(t, w);
|
|
1143
|
+
}, dr), o = ir({
|
|
1144
|
+
extensions: s,
|
|
1145
|
+
content: i,
|
|
1146
|
+
onUpdate: ({ editor: x }) => {
|
|
1147
|
+
h && h(x);
|
|
1148
|
+
},
|
|
1149
|
+
...c
|
|
1150
|
+
});
|
|
1151
|
+
ve(r, () => ({
|
|
1152
|
+
editor: o
|
|
1153
|
+
})), T(() => {
|
|
1154
|
+
document.documentElement.classList.toggle("dark", t.dark), Kr.setTheme(t.dark ? "dark" : "light");
|
|
1155
|
+
}, [t.dark]), T(() => {
|
|
1156
|
+
o == null || o.setEditable(!(t != null && t.disabled));
|
|
1157
|
+
}, [o, t == null ? void 0 : t.disabled]), T(() => ((t == null ? void 0 : t.resetCSS) !== !1 && He(Gr, "react-tiptap-reset"), () => {
|
|
1158
|
+
_e("react-tiptap-reset");
|
|
1159
|
+
}), [t == null ? void 0 : t.resetCSS]);
|
|
1160
|
+
function d(x, w) {
|
|
1161
|
+
return t != null && t.removeDefaultWrapper ? w === "html" ? x.isEmpty ? "" : x.getHTML() : w === "json" ? x.isEmpty ? {} : x.getJSON() : w === "text" ? x.isEmpty ? "" : x.getText() : "" : w === "html" ? x.getHTML() : w === "json" ? x.getJSON() : w === "text" ? x.getText() : "";
|
|
1162
|
+
}
|
|
1163
|
+
T(() => () => {
|
|
1164
|
+
var x;
|
|
1165
|
+
(x = o == null ? void 0 : o.destroy) == null || x.call(o);
|
|
1166
|
+
}, []);
|
|
1167
|
+
const p = Oe(o, "characterCount");
|
|
1168
|
+
return o ? /* @__PURE__ */ e("div", { className: "reactjs-tiptap-editor", children: /* @__PURE__ */ e(Hr, { delayDuration: 0, children: /* @__PURE__ */ l("div", { className: "richtext-rounded-[0.5rem] richtext-bg-background richtext-shadow richtext-overflow-hidden richtext-outline richtext-outline-1", children: [
|
|
1169
|
+
!(t != null && t.hideBubble) && /* @__PURE__ */ e(Ur, { bubbleMenu: t == null ? void 0 : t.bubbleMenu, editor: o, disabled: t == null ? void 0 : t.disabled }),
|
|
1170
|
+
/* @__PURE__ */ l("div", { className: "richtext-flex richtext-flex-col richtext-w-full richtext-max-h-full", children: [
|
|
1171
|
+
!(t != null && t.hideToolbar) && /* @__PURE__ */ e(Jr, { editor: o, disabled: !!(t != null && t.disabled) }),
|
|
1172
|
+
/* @__PURE__ */ e(rr, { className: `richtext-relative ${(t == null ? void 0 : t.contentClass) || ""}`, editor: o }),
|
|
1173
|
+
/* @__PURE__ */ e("div", { className: "richtext-flex richtext-items-center richtext-justify-between richtext-p-3 richtext-border-t", children: p && /* @__PURE__ */ e("div", { className: "richtext-flex richtext-flex-col", children: /* @__PURE__ */ e("div", { className: "richtext-flex richtext-justify-end richtext-gap-3 richtext-text-sm", children: /* @__PURE__ */ l("span", { children: [
|
|
1174
|
+
o.storage.characterCount.characters(),
|
|
1175
|
+
" ",
|
|
1176
|
+
a("editor.characters")
|
|
1177
|
+
] }) }) }) })
|
|
1178
|
+
] })
|
|
1179
|
+
] }) }) }) : /* @__PURE__ */ e(N, {});
|
|
1180
|
+
}
|
|
1181
|
+
const sc = ge(Xr);
|
|
1182
|
+
function Jr({ editor: t, disabled: r }) {
|
|
1183
|
+
const { t: i, lang: n } = z(), c = H(() => {
|
|
1184
|
+
const s = [...t.extensionManager.extensions].sort((o, d) => {
|
|
1185
|
+
const p = o.options.sort ?? -1, x = d.options.sort ?? -1;
|
|
1186
|
+
return p - x;
|
|
1187
|
+
});
|
|
1188
|
+
let h = [];
|
|
1189
|
+
for (const o of s) {
|
|
1190
|
+
const { button: d, divider: p = !1, spacer: x = !1, toolbar: w = !0 } = o.options;
|
|
1191
|
+
if (!d || !Ve(d) || !w)
|
|
1192
|
+
continue;
|
|
1193
|
+
const u = d({
|
|
1194
|
+
editor: t,
|
|
1195
|
+
extension: o,
|
|
1196
|
+
t: i
|
|
1197
|
+
});
|
|
1198
|
+
if (Array.isArray(u)) {
|
|
1199
|
+
const f = u.map((b, k) => ({
|
|
1200
|
+
button: b,
|
|
1201
|
+
divider: k === u.length - 1 ? p : !1,
|
|
1202
|
+
spacer: k === 0 ? x : !1
|
|
1203
|
+
}));
|
|
1204
|
+
h = [...h, ...f];
|
|
1205
|
+
continue;
|
|
1206
|
+
}
|
|
1207
|
+
h.push({ button: u, divider: p, spacer: x });
|
|
1208
|
+
}
|
|
1209
|
+
return h;
|
|
1210
|
+
}, [t, i, n]);
|
|
1211
|
+
return /* @__PURE__ */ e(
|
|
1212
|
+
"div",
|
|
1213
|
+
{
|
|
1214
|
+
className: "richtext-px-1 richtext-py-2 !richtext-border-b",
|
|
1215
|
+
style: {
|
|
1216
|
+
pointerEvents: r ? "none" : "auto",
|
|
1217
|
+
opacity: r ? 0.5 : 1
|
|
1218
|
+
},
|
|
1219
|
+
children: /* @__PURE__ */ e("div", { className: "richtext-relative richtext-flex richtext-flex-wrap richtext-h-auto richtext-gap-y-1 richtext-gap-x-1", children: c.map((a, s) => {
|
|
1220
|
+
var o, d;
|
|
1221
|
+
const h = a.button.component;
|
|
1222
|
+
return /* @__PURE__ */ l("div", { className: "richtext-flex richtext-items-center", children: [
|
|
1223
|
+
(a == null ? void 0 : a.spacer) && /* @__PURE__ */ e(L, { orientation: "vertical", className: "!richtext-h-[16px] !richtext-mx-[10px]" }),
|
|
1224
|
+
/* @__PURE__ */ e(
|
|
1225
|
+
h,
|
|
1226
|
+
{
|
|
1227
|
+
...a.button.componentProps,
|
|
1228
|
+
disabled: r || ((d = (o = a == null ? void 0 : a.button) == null ? void 0 : o.componentProps) == null ? void 0 : d.disabled)
|
|
1229
|
+
}
|
|
1230
|
+
),
|
|
1231
|
+
(a == null ? void 0 : a.divider) && /* @__PURE__ */ e(L, { orientation: "vertical", className: "!richtext-h-auto !richtext-mx-2" })
|
|
1232
|
+
] }, `toolbar-item-${s}`);
|
|
1233
|
+
}) })
|
|
1234
|
+
}
|
|
1235
|
+
);
|
|
1236
|
+
}
|
|
1237
|
+
function qr(t) {
|
|
1238
|
+
return /* @__PURE__ */ e("svg", { xmlns: "http://www.w3.org/2000/svg", width: "1em", height: "1em", viewBox: "0 0 24 24", ...t, children: /* @__PURE__ */ e(
|
|
1239
|
+
"path",
|
|
1240
|
+
{
|
|
1241
|
+
fill: "currentColor",
|
|
1242
|
+
d: "M19 12h-2v3h-3v2h5zM7 9h3V7H5v5h2zm14-6H3a2 2 0 0 0-2 2v14a2 2 0 0 0 2 2h18a2 2 0 0 0 2-2V5a2 2 0 0 0-2-2m0 16H3V5h18z"
|
|
1243
|
+
}
|
|
1244
|
+
) });
|
|
1245
|
+
}
|
|
1246
|
+
function Zr(t) {
|
|
1247
|
+
return /* @__PURE__ */ e("svg", { xmlns: "http://www.w3.org/2000/svg", width: "1em", height: "1em", viewBox: "0 0 24 24", ...t, children: /* @__PURE__ */ e(
|
|
1248
|
+
"path",
|
|
1249
|
+
{
|
|
1250
|
+
fill: "none",
|
|
1251
|
+
stroke: "currentColor",
|
|
1252
|
+
strokeLinecap: "round",
|
|
1253
|
+
strokeLinejoin: "round",
|
|
1254
|
+
strokeWidth: "2",
|
|
1255
|
+
d: "M6 15h15m0 4H6m9-8h6m0-4h-6M9 9h1a1 1 0 1 1-1 1V7.5a2 2 0 0 1 2-2M3 9h1a1 1 0 1 1-1 1V7.5a2 2 0 0 1 2-2"
|
|
1256
|
+
}
|
|
1257
|
+
) });
|
|
1258
|
+
}
|
|
1259
|
+
function Qr() {
|
|
1260
|
+
return /* @__PURE__ */ e(
|
|
1261
|
+
"svg",
|
|
1262
|
+
{
|
|
1263
|
+
xmlns: "http://www.w3.org/2000/svg",
|
|
1264
|
+
xmlnsXlink: "http://www.w3.org/1999/xlink",
|
|
1265
|
+
"aria-hidden": "true",
|
|
1266
|
+
role: "img",
|
|
1267
|
+
className: "richtext-w-4 richtext-h-4",
|
|
1268
|
+
width: "1em",
|
|
1269
|
+
height: "1em",
|
|
1270
|
+
viewBox: "0 0 24 24",
|
|
1271
|
+
children: /* @__PURE__ */ e(
|
|
1272
|
+
"path",
|
|
1273
|
+
{
|
|
1274
|
+
fill: "none",
|
|
1275
|
+
stroke: "currentColor",
|
|
1276
|
+
strokeLinecap: "round",
|
|
1277
|
+
strokeLinejoin: "round",
|
|
1278
|
+
strokeWidth: "1.5",
|
|
1279
|
+
d: "M5.5 3c1.404 0 2.107 0 2.611.38c.219.164.406.375.552.62C9 4.568 9 5.358 9 6.938v10.125c0 1.58 0 2.37-.337 2.937a2.1 2.1 0 0 1-.552.621c-.504.38-1.207.38-2.611.38s-2.107 0-2.611-.38a2.1 2.1 0 0 1-.552-.62C2 19.432 2 18.642 2 17.062V6.938c0-1.58 0-2.37.337-2.938a2.1 2.1 0 0 1 .552-.62C3.393 3 4.096 3 5.5 3M20 11.938v5.124c0 1.58 0 2.37-.337 2.938a2.1 2.1 0 0 1-.552.62c-.504.38-1.207.38-2.611.38s-2.107 0-2.611-.38a2.1 2.1 0 0 1-.552-.62C13 19.433 13 18.642 13 17.063V6.938c0-1.58 0-2.37.337-2.938M22 9l-6-6m6 0l-6 6",
|
|
1280
|
+
color: "currentColor"
|
|
1281
|
+
}
|
|
1282
|
+
)
|
|
1283
|
+
}
|
|
1284
|
+
);
|
|
1285
|
+
}
|
|
1286
|
+
function Yr() {
|
|
1287
|
+
return /* @__PURE__ */ e(
|
|
1288
|
+
"svg",
|
|
1289
|
+
{
|
|
1290
|
+
xmlns: "http://www.w3.org/2000/svg",
|
|
1291
|
+
xmlnsXlink: "http://www.w3.org/1999/xlink",
|
|
1292
|
+
"aria-hidden": "true",
|
|
1293
|
+
role: "img",
|
|
1294
|
+
className: "richtext-w-4 richtext-h-4",
|
|
1295
|
+
width: "1em",
|
|
1296
|
+
height: "1em",
|
|
1297
|
+
viewBox: "0 0 24 24",
|
|
1298
|
+
children: /* @__PURE__ */ e(
|
|
1299
|
+
"path",
|
|
1300
|
+
{
|
|
1301
|
+
fill: "none",
|
|
1302
|
+
stroke: "currentColor",
|
|
1303
|
+
strokeLinecap: "round",
|
|
1304
|
+
strokeLinejoin: "round",
|
|
1305
|
+
strokeWidth: "1.5",
|
|
1306
|
+
d: "M21 18.5c0 1.404 0 2.107-.38 2.611a2.1 2.1 0 0 1-.62.552c-.567.337-1.358.337-2.937.337H6.938c-1.58 0-2.37 0-2.938-.337a2.1 2.1 0 0 1-.62-.552C3 20.607 3 19.904 3 18.5s0-2.107.38-2.611c.163-.218.374-.406.62-.552C4.567 15 5.357 15 6.938 15h10.125c1.58 0 2.37 0 2.937.337c.246.146.457.334.62.552c.38.504.38 1.207.38 2.611M12.063 4H6.937C5.358 4 4.568 4 4 4.337a2.1 2.1 0 0 0-.62.552C3 5.393 3 6.096 3 7.5s0 2.107.38 2.611c.163.218.374.406.62.552C4.567 11 5.357 11 6.938 11h10.125c1.58 0 2.37 0 2.937-.337M21 8l-6-6m6 0l-6 6",
|
|
1307
|
+
color: "currentColor"
|
|
1308
|
+
}
|
|
1309
|
+
)
|
|
1310
|
+
}
|
|
1311
|
+
);
|
|
1312
|
+
}
|
|
1313
|
+
function tn(t) {
|
|
1314
|
+
return /* @__PURE__ */ e("svg", { xmlns: "http://www.w3.org/2000/svg", width: "1em", height: "1em", viewBox: "0 0 24 24", ...t, children: /* @__PURE__ */ e(
|
|
1315
|
+
"path",
|
|
1316
|
+
{
|
|
1317
|
+
fill: "currentColor",
|
|
1318
|
+
d: "M14 2H6a2 2 0 0 0-2 2v16c0 1.11.89 2 2 2h12c1.11 0 2-.89 2-2V8zm4 18H6V4h7v5h5zm-.65-10l-2.1 9h-1.4l-1.8-6.79l-1.8 6.79h-1.4l-2.2-9h1.5l1.4 6.81l1.8-6.81h1.3l1.8 6.81l1.4-6.81z"
|
|
1319
|
+
}
|
|
1320
|
+
) });
|
|
1321
|
+
}
|
|
1322
|
+
function y(t) {
|
|
1323
|
+
const r = ft[t.name];
|
|
1324
|
+
return r ? /* @__PURE__ */ e(r, { onClick: t == null ? void 0 : t.onClick, className: `richtext-w-4 richtext-h-4 ${(t == null ? void 0 : t.className) || ""}` }) : null;
|
|
1325
|
+
}
|
|
1326
|
+
function en(t) {
|
|
1327
|
+
return /* @__PURE__ */ e("svg", { xmlns: "http://www.w3.org/2000/svg", width: "1em", height: "1em", viewBox: "0 0 24 24", ...t, children: /* @__PURE__ */ e(
|
|
1328
|
+
"path",
|
|
1329
|
+
{
|
|
1330
|
+
fill: "currentColor",
|
|
1331
|
+
d: "M21 22H3v-2h18zm0-18H3V2h18zm-11 9.7h4l-2-5.4zM11.2 6h1.7l4.7 12h-2l-.9-2.6H9.4L8.5 18h-2z"
|
|
1332
|
+
}
|
|
1333
|
+
) });
|
|
1334
|
+
}
|
|
1335
|
+
function rn(t) {
|
|
1336
|
+
return /* @__PURE__ */ e(
|
|
1337
|
+
"svg",
|
|
1338
|
+
{
|
|
1339
|
+
xmlns: "http://www.w3.org/2000/svg",
|
|
1340
|
+
xmlnsXlink: "http://www.w3.org/1999/xlink",
|
|
1341
|
+
"aria-hidden": "true",
|
|
1342
|
+
role: "img",
|
|
1343
|
+
width: "1em",
|
|
1344
|
+
height: "1em",
|
|
1345
|
+
viewBox: "0 0 48 48",
|
|
1346
|
+
...t,
|
|
1347
|
+
children: /* @__PURE__ */ e(
|
|
1348
|
+
"path",
|
|
1349
|
+
{
|
|
1350
|
+
fill: "currentColor",
|
|
1351
|
+
stroke: "currentColor",
|
|
1352
|
+
strokeLinejoin: "round",
|
|
1353
|
+
strokeWidth: 4,
|
|
1354
|
+
d: "M36 19L24 31L12 19z"
|
|
1355
|
+
}
|
|
1356
|
+
)
|
|
1357
|
+
}
|
|
1358
|
+
);
|
|
1359
|
+
}
|
|
1360
|
+
function nn(t) {
|
|
1361
|
+
return /* @__PURE__ */ e("svg", { xmlns: "http://www.w3.org/2000/svg", width: "1em", height: "1em", viewBox: "0 0 24 24", ...t, children: /* @__PURE__ */ e("path", { fill: "currentColor", d: "M9 7v10h6v-2h-4V7z" }) });
|
|
1362
|
+
}
|
|
1363
|
+
function cn(t) {
|
|
1364
|
+
return /* @__PURE__ */ e("svg", { xmlns: "http://www.w3.org/2000/svg", width: "1em", height: "1em", viewBox: "0 0 24 24", ...t, children: /* @__PURE__ */ e(
|
|
1365
|
+
"path",
|
|
1366
|
+
{
|
|
1367
|
+
fill: "currentColor",
|
|
1368
|
+
d: "M9 7c-1.1 0-2 .9-2 2v8h2V9h2v7h2V9h2v8h2V9a2 2 0 0 0-2-2z"
|
|
1369
|
+
}
|
|
1370
|
+
) });
|
|
1371
|
+
}
|
|
1372
|
+
function an(t) {
|
|
1373
|
+
return /* @__PURE__ */ e("svg", { xmlns: "http://www.w3.org/2000/svg", width: "1em", height: "1em", viewBox: "0 0 24 24", ...t, children: /* @__PURE__ */ e(
|
|
1374
|
+
"path",
|
|
1375
|
+
{
|
|
1376
|
+
fill: "currentColor",
|
|
1377
|
+
d: "M11 7c-1.1 0-2 .9-2 2v2a2 2 0 0 0 2 2h2v2H9v2h4c1.11 0 2-.89 2-2v-2a2 2 0 0 0-2-2h-2V9h4V7z"
|
|
1378
|
+
}
|
|
1379
|
+
) });
|
|
1380
|
+
}
|
|
1381
|
+
function on() {
|
|
1382
|
+
return /* @__PURE__ */ e(
|
|
1383
|
+
"svg",
|
|
1384
|
+
{
|
|
1385
|
+
xmlns: "http://www.w3.org/2000/svg",
|
|
1386
|
+
xmlnsXlink: "http://www.w3.org/1999/xlink",
|
|
1387
|
+
"aria-hidden": "true",
|
|
1388
|
+
role: "img",
|
|
1389
|
+
width: "1em",
|
|
1390
|
+
height: "1em",
|
|
1391
|
+
viewBox: "0 0 24 24",
|
|
1392
|
+
children: /* @__PURE__ */ e(
|
|
1393
|
+
"path",
|
|
1394
|
+
{
|
|
1395
|
+
fill: "currentColor",
|
|
1396
|
+
d: "M14 2H6a2 2 0 0 0-2 2v16c0 1.11.89 2 2 2h12c1.11 0 2-.89 2-2V8zm4 18H6V4h7v5h5zm-.65-10l-2.1 9h-1.4l-1.8-6.79l-1.8 6.79h-1.4l-2.2-9h1.5l1.4 6.81l1.8-6.81h1.3l1.8 6.81l1.4-6.81z"
|
|
1397
|
+
}
|
|
1398
|
+
)
|
|
1399
|
+
}
|
|
1400
|
+
);
|
|
1401
|
+
}
|
|
1402
|
+
function sn() {
|
|
1403
|
+
return /* @__PURE__ */ l("svg", { xmlns: "http://www.w3.org/2000/svg", width: "1em", height: "1em", viewBox: "0 0 32 32", children: [
|
|
1404
|
+
/* @__PURE__ */ e("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" }),
|
|
1405
|
+
/* @__PURE__ */ e("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" })
|
|
1406
|
+
] });
|
|
1407
|
+
}
|
|
1408
|
+
function ln() {
|
|
1409
|
+
return /* @__PURE__ */ l(
|
|
1410
|
+
"svg",
|
|
1411
|
+
{
|
|
1412
|
+
xmlns: "http://www.w3.org/2000/svg",
|
|
1413
|
+
width: "1em",
|
|
1414
|
+
height: "1em",
|
|
1415
|
+
className: "icon",
|
|
1416
|
+
viewBox: "0 0 1024 1024",
|
|
1417
|
+
children: [
|
|
1418
|
+
/* @__PURE__ */ e(
|
|
1419
|
+
"path",
|
|
1420
|
+
{
|
|
1421
|
+
fill: "currentColor",
|
|
1422
|
+
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"
|
|
1423
|
+
}
|
|
1424
|
+
),
|
|
1425
|
+
/* @__PURE__ */ e(
|
|
1426
|
+
"path",
|
|
1427
|
+
{
|
|
1428
|
+
fill: "currentColor",
|
|
1429
|
+
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"
|
|
1430
|
+
}
|
|
1431
|
+
)
|
|
1432
|
+
]
|
|
1433
|
+
}
|
|
1434
|
+
);
|
|
1435
|
+
}
|
|
1436
|
+
function hn() {
|
|
1437
|
+
return /* @__PURE__ */ e("svg", { xmlns: "http://www.w3.org/2000/svg", width: "1em", height: "1em", viewBox: "0 0 24 24", children: /* @__PURE__ */ e("path", { fill: "none", stroke: "currentColor", strokeLinecap: "round", strokeLinejoin: "round", strokeWidth: "2", d: "M14 4h4a1 1 0 0 1 1 1v14a1 1 0 0 1-1 1h-4a1 1 0 0 1-1-1V5a1 1 0 0 1 1-1m-9 8h4m-2-2v4" }) });
|
|
1438
|
+
}
|
|
1439
|
+
function dn() {
|
|
1440
|
+
return /* @__PURE__ */ e("svg", { xmlns: "http://www.w3.org/2000/svg", width: "1em", height: "1em", viewBox: "0 0 24 24", children: /* @__PURE__ */ e("path", { fill: "none", stroke: "currentColor", strokeLinecap: "round", strokeLinejoin: "round", strokeWidth: "2", d: "M6 4h4a1 1 0 0 1 1 1v14a1 1 0 0 1-1 1H6a1 1 0 0 1-1-1V5a1 1 0 0 1 1-1m9 8h4m-2-2v4" }) });
|
|
1441
|
+
}
|
|
1442
|
+
const ft = {
|
|
1443
|
+
Bold: ti,
|
|
1444
|
+
LoaderCircle: ei,
|
|
1445
|
+
Italic: ii,
|
|
1446
|
+
Underline: ri,
|
|
1447
|
+
Quote: ni,
|
|
1448
|
+
TextQuote: Zr,
|
|
1449
|
+
Strikethrough: ci,
|
|
1450
|
+
Minus: ai,
|
|
1451
|
+
Eraser: oi,
|
|
1452
|
+
PaintRoller: si,
|
|
1453
|
+
Redo2: li,
|
|
1454
|
+
Undo2: hi,
|
|
1455
|
+
AlignCenter: Be,
|
|
1456
|
+
AlignJustify: Fe,
|
|
1457
|
+
AlignLeft: Re,
|
|
1458
|
+
AlignRight: Ie,
|
|
1459
|
+
ChevronDown: di,
|
|
1460
|
+
Subscript: xi,
|
|
1461
|
+
Superscript: ui,
|
|
1462
|
+
Code: mi,
|
|
1463
|
+
Code2: fi,
|
|
1464
|
+
Type: gi,
|
|
1465
|
+
IndentIncrease: vi,
|
|
1466
|
+
IndentDecrease: pi,
|
|
1467
|
+
List: wi,
|
|
1468
|
+
ListOrdered: bi,
|
|
1469
|
+
ListTodo: Ci,
|
|
1470
|
+
Link: yi,
|
|
1471
|
+
ImageUp: Ni,
|
|
1472
|
+
Video: Ti,
|
|
1473
|
+
Maximize: ki,
|
|
1474
|
+
Minimize: Ai,
|
|
1475
|
+
Table: Si,
|
|
1476
|
+
Sparkles: zi,
|
|
1477
|
+
Pencil: ie,
|
|
1478
|
+
Unlink: Ei,
|
|
1479
|
+
BetweenHorizonalEnd: Mi,
|
|
1480
|
+
BetweenHorizonalStart: Li,
|
|
1481
|
+
BetweenVerticalStart: Di,
|
|
1482
|
+
BetweenVerticalEnd: Bi,
|
|
1483
|
+
TableCellsMerge: Fi,
|
|
1484
|
+
TableCellsSplit: Ri,
|
|
1485
|
+
Trash2: re,
|
|
1486
|
+
Trash: Ii,
|
|
1487
|
+
Replace: bt,
|
|
1488
|
+
ChevronsUpDown: Hi,
|
|
1489
|
+
LineHeight: en,
|
|
1490
|
+
Word: tn,
|
|
1491
|
+
Heading1: _i,
|
|
1492
|
+
Heading2: Oi,
|
|
1493
|
+
Heading3: Vi,
|
|
1494
|
+
Heading4: Pi,
|
|
1495
|
+
Heading5: ji,
|
|
1496
|
+
Heading6: $i,
|
|
1497
|
+
Columns2: Ct,
|
|
1498
|
+
Columns3: Ui,
|
|
1499
|
+
Columns4: Wi,
|
|
1500
|
+
Plus: ne,
|
|
1501
|
+
Grip: Gi,
|
|
1502
|
+
Copy: Ki,
|
|
1503
|
+
Clipboard: Xi,
|
|
1504
|
+
PanelLeft: Ji,
|
|
1505
|
+
PanelRight: qi,
|
|
1506
|
+
Columns: Ct,
|
|
1507
|
+
Iframe: Zi,
|
|
1508
|
+
MenuDown: rn,
|
|
1509
|
+
SizeS: an,
|
|
1510
|
+
SizeM: cn,
|
|
1511
|
+
SizeL: nn,
|
|
1512
|
+
AspectRatio: qr,
|
|
1513
|
+
Emoji: yt,
|
|
1514
|
+
DeleteColumn: Qr,
|
|
1515
|
+
DeleteRow: Yr,
|
|
1516
|
+
SearchAndReplace: bt,
|
|
1517
|
+
EmojiIcon: yt,
|
|
1518
|
+
KatexIcon: Qi,
|
|
1519
|
+
ExportPdf: sn,
|
|
1520
|
+
ExportWord: ln,
|
|
1521
|
+
ImportWord: on,
|
|
1522
|
+
ColumnAddLeft: hn,
|
|
1523
|
+
ColumnAddRight: dn,
|
|
1524
|
+
BookMarked: Yi
|
|
1525
|
+
};
|
|
1526
|
+
function xn(t) {
|
|
1527
|
+
const r = ["size-small", "size-medium", "size-large"], i = [
|
|
1528
|
+
"SizeS",
|
|
1529
|
+
"SizeM",
|
|
1530
|
+
"SizeL"
|
|
1531
|
+
];
|
|
1532
|
+
return r.map((n, c) => ({
|
|
1533
|
+
type: `image-${n}`,
|
|
1534
|
+
component: C,
|
|
1535
|
+
componentProps: {
|
|
1536
|
+
tooltip: G.t(`editor.${n.replace("-", ".")}.tooltip`),
|
|
1537
|
+
icon: i[c],
|
|
1538
|
+
action: () => t.commands.updateImage({ width: ot[n] }),
|
|
1539
|
+
isActive: () => t.isActive("image", { width: ot[n] })
|
|
1540
|
+
}
|
|
1541
|
+
}));
|
|
1542
|
+
}
|
|
1543
|
+
function un(t) {
|
|
1544
|
+
const r = ["left", "center", "right"], i = {
|
|
1545
|
+
left: "AlignLeft",
|
|
1546
|
+
center: "AlignCenter",
|
|
1547
|
+
right: "AlignRight"
|
|
1548
|
+
};
|
|
1549
|
+
return r.map((n) => {
|
|
1550
|
+
var c, a;
|
|
1551
|
+
return {
|
|
1552
|
+
type: `image-${n}`,
|
|
1553
|
+
component: C,
|
|
1554
|
+
componentProps: {
|
|
1555
|
+
tooltip: G.t(`editor.textalign.${n}.tooltip`),
|
|
1556
|
+
icon: i[n],
|
|
1557
|
+
action: () => {
|
|
1558
|
+
var s, h;
|
|
1559
|
+
return (h = (s = t.commands) == null ? void 0 : s.setTextAlign) == null ? void 0 : h.call(s, n);
|
|
1560
|
+
},
|
|
1561
|
+
isActive: () => t.isActive({ textAlign: n }) || !1,
|
|
1562
|
+
disabled: !((a = (c = t.can()) == null ? void 0 : c.setTextAlign) != null && a.call(c, n))
|
|
1563
|
+
}
|
|
1564
|
+
};
|
|
1565
|
+
});
|
|
1566
|
+
}
|
|
1567
|
+
function mn(t) {
|
|
1568
|
+
const r = ["size-small", "size-medium", "size-large"], i = [
|
|
1569
|
+
"SizeS",
|
|
1570
|
+
"SizeM",
|
|
1571
|
+
"SizeL"
|
|
1572
|
+
];
|
|
1573
|
+
return r.map((n, c) => ({
|
|
1574
|
+
type: `video-${n}`,
|
|
1575
|
+
component: C,
|
|
1576
|
+
componentProps: {
|
|
1577
|
+
tooltip: G.t(`editor.${n.replace("-", ".")}.tooltip`),
|
|
1578
|
+
icon: i[c],
|
|
1579
|
+
action: () => t.commands.updateVideo({ width: st[n] }),
|
|
1580
|
+
isActive: () => t.isActive("video", { width: st[n] })
|
|
1581
|
+
}
|
|
1582
|
+
}));
|
|
1583
|
+
}
|
|
1584
|
+
function fn(t) {
|
|
1585
|
+
return [
|
|
1586
|
+
...xn(t),
|
|
1587
|
+
...un(t),
|
|
1588
|
+
{
|
|
1589
|
+
type: "remove",
|
|
1590
|
+
component: C,
|
|
1591
|
+
componentProps: {
|
|
1592
|
+
editor: t,
|
|
1593
|
+
tooltip: G.t("editor.remove"),
|
|
1594
|
+
icon: "Trash2",
|
|
1595
|
+
action: () => {
|
|
1596
|
+
const { state: r, dispatch: i } = t.view;
|
|
1597
|
+
ce(r, i);
|
|
1598
|
+
}
|
|
1599
|
+
}
|
|
1600
|
+
}
|
|
1601
|
+
];
|
|
1602
|
+
}
|
|
1603
|
+
function gn(t) {
|
|
1604
|
+
return [
|
|
1605
|
+
...mn(t),
|
|
1606
|
+
{
|
|
1607
|
+
type: "remove",
|
|
1608
|
+
component: C,
|
|
1609
|
+
componentProps: {
|
|
1610
|
+
editor: t,
|
|
1611
|
+
tooltip: G.t("editor.remove"),
|
|
1612
|
+
icon: "Trash2",
|
|
1613
|
+
action: () => {
|
|
1614
|
+
const { state: r, dispatch: i } = t.view;
|
|
1615
|
+
ce(r, i);
|
|
1616
|
+
}
|
|
1617
|
+
}
|
|
1618
|
+
}
|
|
1619
|
+
];
|
|
1620
|
+
}
|
|
1621
|
+
function vn(t, r) {
|
|
1622
|
+
return ur.reduce((i, n) => {
|
|
1623
|
+
if (n === "divider" && i.length > 0)
|
|
1624
|
+
return [...i, {
|
|
1625
|
+
type: "divider",
|
|
1626
|
+
component: void 0,
|
|
1627
|
+
componentProps: {}
|
|
1628
|
+
}];
|
|
1629
|
+
const c = t.extensionManager.extensions.find((a) => a.name === n);
|
|
1630
|
+
return c ? [...i, c.configure().options.button({ editor: t, t: r, extension: c })] : i;
|
|
1631
|
+
}, []);
|
|
1632
|
+
}
|
|
1633
|
+
function pn(t) {
|
|
1634
|
+
var F, j, R;
|
|
1635
|
+
const { pluginKey: r = cr } = t, { t: i } = z(), [n, c] = M(null), [a, s] = M(-1), h = it(null), o = it(null), [d, p] = M(!1), x = t.editor.extensionManager.extensions.some((m) => m.name === "textAlign"), w = t.editor.extensionManager.extensions.some((m) => m.name === "indent"), u = t.editor.extensionManager.extensions.some((m) => m.name === "clear");
|
|
1636
|
+
T(() => {
|
|
1637
|
+
h.current && !t.editor.isDestroyed && (o.current = nr({
|
|
1638
|
+
editor: t.editor,
|
|
1639
|
+
element: h.current,
|
|
1640
|
+
pluginKey: "ContentItemMenu",
|
|
1641
|
+
tippyOptions: {
|
|
1642
|
+
offset: [-2, 16],
|
|
1643
|
+
zIndex: 99,
|
|
1644
|
+
moveTransition: "transform 0.15s ease-out"
|
|
1645
|
+
},
|
|
1646
|
+
onNodeChange: q
|
|
1647
|
+
}), t.editor.registerPlugin(o.current));
|
|
1648
|
+
}, [t.editor, h]);
|
|
1649
|
+
function f() {
|
|
1650
|
+
const m = t.editor.chain();
|
|
1651
|
+
m.setNodeSelection(a).unsetAllMarks(), (n == null ? void 0 : n.type.name) !== "paragraph" && m.setParagraph(), m.run();
|
|
1652
|
+
}
|
|
1653
|
+
function b() {
|
|
1654
|
+
t.editor.chain().focus().setNodeSelection(a).run(), document.execCommand("copy");
|
|
1655
|
+
}
|
|
1656
|
+
function k() {
|
|
1657
|
+
t.editor.commands.setNodeSelection(a);
|
|
1658
|
+
const { $anchor: m } = t.editor.state.selection, D = m.node(1) || t.editor.state.selection.node;
|
|
1659
|
+
t.editor.chain().setMeta("hideDragHandle", !0).insertContentAt(a + ((n == null ? void 0 : n.nodeSize) || 0), D.toJSON()).run();
|
|
1660
|
+
}
|
|
1661
|
+
function O(m) {
|
|
1662
|
+
t.editor.commands.setTextAlign(m);
|
|
1663
|
+
}
|
|
1664
|
+
function K() {
|
|
1665
|
+
const m = wt(t.editor.state.tr, a, 1);
|
|
1666
|
+
m.setMeta("hideDragHandle", !0), t.editor.view.dispatch && t.editor.view.dispatch(m);
|
|
1667
|
+
}
|
|
1668
|
+
function X() {
|
|
1669
|
+
const m = wt(t.editor.state.tr, a, -1);
|
|
1670
|
+
t.editor.view.dispatch && t.editor.view.dispatch(m);
|
|
1671
|
+
}
|
|
1672
|
+
function J() {
|
|
1673
|
+
t.editor.chain().setMeta("hideDragHandle", !0).setNodeSelection(a).deleteSelection().run();
|
|
1674
|
+
}
|
|
1675
|
+
function q(m) {
|
|
1676
|
+
m.node && c(m.node), s(m.pos);
|
|
1677
|
+
}
|
|
1678
|
+
function V() {
|
|
1679
|
+
var m;
|
|
1680
|
+
if (a !== -1) {
|
|
1681
|
+
const D = (n == null ? void 0 : n.nodeSize) || 0, $ = a + D, I = (n == null ? void 0 : n.type.name) === "paragraph" && ((m = n == null ? void 0 : n.content) == null ? void 0 : m.size) === 0, Q = I ? a + 2 : $ + 2;
|
|
1682
|
+
t.editor.chain().command(({ dispatch: B, tr: U, state: E }) => B ? (I ? U.insertText("/", a, a + 1) : U.insert(
|
|
1683
|
+
$,
|
|
1684
|
+
E.schema.nodes.paragraph.create(null, [E.schema.text("/")])
|
|
1685
|
+
), B(U)) : !0).focus(Q).run();
|
|
1686
|
+
}
|
|
1687
|
+
}
|
|
1688
|
+
T(() => (d ? t.editor.commands.setMeta("lockDragHandle", !0) : t.editor.commands.setMeta("lockDragHandle", !1), () => {
|
|
1689
|
+
t.editor.commands.setMeta("lockDragHandle", !1);
|
|
1690
|
+
}), [d]), T(() => () => {
|
|
1691
|
+
o.current && (t.editor.unregisterPlugin(r), o.current = null);
|
|
1692
|
+
}, []), T(() => {
|
|
1693
|
+
var m;
|
|
1694
|
+
(m = t.editor) != null && m.isDestroyed && o.current && (t.editor.unregisterPlugin(r), o.current = null);
|
|
1695
|
+
}, [(F = t.editor) == null ? void 0 : F.isDestroyed]);
|
|
1696
|
+
const Z = (m) => {
|
|
1697
|
+
t != null && t.disabled || p(m);
|
|
1698
|
+
};
|
|
1699
|
+
return /* @__PURE__ */ e(
|
|
1700
|
+
"div",
|
|
1701
|
+
{
|
|
1702
|
+
className: `drag-handle [transition-property:top,_left] richtext-ease-in-out richtext-duration-200 ${t == null ? void 0 : t.className}`,
|
|
1703
|
+
style: {
|
|
1704
|
+
opacity: t != null && t.disabled ? 0 : 1
|
|
1705
|
+
},
|
|
1706
|
+
ref: h,
|
|
1707
|
+
children: /* @__PURE__ */ l("div", { className: "richtext-flex richtext-items-center richtext-gap-0.5 [transition-property:top,_left] richtext-ease-in-out richtext-duration-200", children: [
|
|
1708
|
+
/* @__PURE__ */ e(
|
|
1709
|
+
P,
|
|
1710
|
+
{
|
|
1711
|
+
variant: "ghost",
|
|
1712
|
+
size: "icon",
|
|
1713
|
+
className: "richtext-w-7 richtext-h-7 richtext-cursor-grab",
|
|
1714
|
+
disabled: t == null ? void 0 : t.disabled,
|
|
1715
|
+
onClick: V,
|
|
1716
|
+
children: /* @__PURE__ */ e(y, { name: "Plus", className: "richtext-text-lg richtext-text-neutral-600 dark:richtext-text-neutral-200" })
|
|
1717
|
+
}
|
|
1718
|
+
),
|
|
1719
|
+
/* @__PURE__ */ l(vr, { open: d, onOpenChange: Z, children: [
|
|
1720
|
+
/* @__PURE__ */ l("div", { className: "richtext-relative richtext-flex richtext-flex-col", children: [
|
|
1721
|
+
/* @__PURE__ */ l(ut, { children: [
|
|
1722
|
+
/* @__PURE__ */ e(mt, { asChild: !0, disabled: t == null ? void 0 : t.disabled, children: /* @__PURE__ */ e(
|
|
1723
|
+
P,
|
|
1724
|
+
{
|
|
1725
|
+
variant: "ghost",
|
|
1726
|
+
size: "icon",
|
|
1727
|
+
className: "richtext-w-7 richtext-h-7 richtext-cursor-grab richtext-relative richtext-z-[1]",
|
|
1728
|
+
disabled: t == null ? void 0 : t.disabled,
|
|
1729
|
+
onMouseUp: () => {
|
|
1730
|
+
t != null && t.disabled || p(!0);
|
|
1731
|
+
},
|
|
1732
|
+
children: /* @__PURE__ */ e(y, { name: "Grip", className: "richtext-text-sm dark:richtext-text-neutral-200 richtext-text-neutral-600" })
|
|
1733
|
+
}
|
|
1734
|
+
) }),
|
|
1735
|
+
/* @__PURE__ */ e(nt, { children: i("editor.draghandle.tooltip") })
|
|
1736
|
+
] }),
|
|
1737
|
+
/* @__PURE__ */ e(pr, { className: "richtext-absolute richtext-top-0 richtext-left-0 richtext-w-[28px] richtext-h-[28px] richtext-z-0" })
|
|
1738
|
+
] }),
|
|
1739
|
+
/* @__PURE__ */ l(oe, { className: "richtext-w-48", align: "start", side: "bottom", sideOffset: 0, children: [
|
|
1740
|
+
/* @__PURE__ */ l(
|
|
1741
|
+
A,
|
|
1742
|
+
{
|
|
1743
|
+
onClick: J,
|
|
1744
|
+
className: "richtext-flex richtext-gap-3 focus:richtext-text-red-500 focus:richtext-bg-red-400 hover:richtext-bg-red-400 dark:hover:richtext-text-red-500 richtext-bg-opacity-10 hover:richtext-bg-opacity-20 focus:richtext-bg-opacity-30 dark:hover:richtext-bg-opacity-20",
|
|
1745
|
+
children: [
|
|
1746
|
+
/* @__PURE__ */ e(y, { name: "Trash2" }),
|
|
1747
|
+
/* @__PURE__ */ e("span", { children: i("editor.remove") })
|
|
1748
|
+
]
|
|
1749
|
+
}
|
|
1750
|
+
),
|
|
1751
|
+
u ? /* @__PURE__ */ l(A, { className: "richtext-flex richtext-gap-3", onClick: f, children: [
|
|
1752
|
+
/* @__PURE__ */ e(y, { name: "PaintRoller" }),
|
|
1753
|
+
/* @__PURE__ */ e("span", { children: i("editor.clear.tooltip") })
|
|
1754
|
+
] }) : null,
|
|
1755
|
+
/* @__PURE__ */ l(A, { className: "richtext-flex richtext-gap-3", onClick: b, children: [
|
|
1756
|
+
/* @__PURE__ */ e(y, { name: "Clipboard" }),
|
|
1757
|
+
/* @__PURE__ */ e("span", { children: i("editor.copyToClipboard") })
|
|
1758
|
+
] }),
|
|
1759
|
+
/* @__PURE__ */ l(A, { className: "richtext-flex richtext-gap-3", onClick: k, children: [
|
|
1760
|
+
/* @__PURE__ */ e(y, { name: "Copy" }),
|
|
1761
|
+
/* @__PURE__ */ e("span", { children: i("editor.copy") })
|
|
1762
|
+
] }),
|
|
1763
|
+
x || w ? /* @__PURE__ */ e(se, {}) : null,
|
|
1764
|
+
x ? /* @__PURE__ */ l(kt, { children: [
|
|
1765
|
+
/* @__PURE__ */ l(lt, { className: "richtext-flex richtext-gap-3", children: [
|
|
1766
|
+
/* @__PURE__ */ e(y, { name: "AlignCenter" }),
|
|
1767
|
+
/* @__PURE__ */ e("span", { children: i("editor.textalign.tooltip") })
|
|
1768
|
+
] }),
|
|
1769
|
+
/* @__PURE__ */ e(Tt, { children: /* @__PURE__ */ l(ht, { children: [
|
|
1770
|
+
/* @__PURE__ */ l(A, { className: "richtext-flex richtext-gap-3", onClick: () => O("left"), children: [
|
|
1771
|
+
/* @__PURE__ */ e(y, { name: "AlignLeft" }),
|
|
1772
|
+
/* @__PURE__ */ e("span", { children: i("editor.textalign.left.tooltip") })
|
|
1773
|
+
] }),
|
|
1774
|
+
/* @__PURE__ */ l(A, { className: "richtext-flex richtext-gap-3", onClick: () => O("center"), children: [
|
|
1775
|
+
/* @__PURE__ */ e(y, { name: "AlignCenter" }),
|
|
1776
|
+
/* @__PURE__ */ e("span", { children: i("editor.textalign.center.tooltip") })
|
|
1777
|
+
] }),
|
|
1778
|
+
/* @__PURE__ */ l(A, { className: "richtext-flex richtext-gap-3", onClick: () => O("right"), children: [
|
|
1779
|
+
/* @__PURE__ */ e(y, { name: "AlignRight" }),
|
|
1780
|
+
/* @__PURE__ */ e("span", { children: i("editor.textalign.right.tooltip") })
|
|
1781
|
+
] })
|
|
1782
|
+
] }) })
|
|
1783
|
+
] }) : null,
|
|
1784
|
+
w ? /* @__PURE__ */ l(kt, { children: [
|
|
1785
|
+
/* @__PURE__ */ l(lt, { className: "richtext-flex richtext-gap-3", children: [
|
|
1786
|
+
/* @__PURE__ */ e(y, { name: "IndentIncrease" }),
|
|
1787
|
+
/* @__PURE__ */ e("span", { children: i("editor.indent") })
|
|
1788
|
+
] }),
|
|
1789
|
+
/* @__PURE__ */ e(Tt, { children: /* @__PURE__ */ l(ht, { children: [
|
|
1790
|
+
/* @__PURE__ */ l(
|
|
1791
|
+
A,
|
|
1792
|
+
{
|
|
1793
|
+
className: "richtext-flex richtext-gap-3",
|
|
1794
|
+
onClick: K,
|
|
1795
|
+
disabled: ((j = n == null ? void 0 : n.attrs) == null ? void 0 : j.indent) >= pt.max,
|
|
1796
|
+
children: [
|
|
1797
|
+
/* @__PURE__ */ e(y, { name: "IndentIncrease" }),
|
|
1798
|
+
/* @__PURE__ */ e("span", { children: i("editor.indent.tooltip") })
|
|
1799
|
+
]
|
|
1800
|
+
}
|
|
1801
|
+
),
|
|
1802
|
+
/* @__PURE__ */ l(
|
|
1803
|
+
A,
|
|
1804
|
+
{
|
|
1805
|
+
className: "richtext-flex richtext-gap-3",
|
|
1806
|
+
onClick: X,
|
|
1807
|
+
disabled: ((R = n == null ? void 0 : n.attrs) == null ? void 0 : R.indent) <= pt.min,
|
|
1808
|
+
children: [
|
|
1809
|
+
/* @__PURE__ */ e(y, { name: "IndentDecrease" }),
|
|
1810
|
+
/* @__PURE__ */ e("span", { children: i("editor.outdent.tooltip") })
|
|
1811
|
+
]
|
|
1812
|
+
}
|
|
1813
|
+
)
|
|
1814
|
+
] }) })
|
|
1815
|
+
] }) : null
|
|
1816
|
+
] })
|
|
1817
|
+
] })
|
|
1818
|
+
] })
|
|
1819
|
+
}
|
|
1820
|
+
);
|
|
1821
|
+
}
|
|
1822
|
+
const wn = {
|
|
1823
|
+
maxWidth: "auto",
|
|
1824
|
+
zIndex: 20,
|
|
1825
|
+
appendTo: "parent",
|
|
1826
|
+
moveTransition: "transform 0.1s ease-out"
|
|
1827
|
+
};
|
|
1828
|
+
function bn({ item: t, disabled: r, editor: i }) {
|
|
1829
|
+
var c;
|
|
1830
|
+
const n = t.component;
|
|
1831
|
+
return n ? /* @__PURE__ */ e(
|
|
1832
|
+
n,
|
|
1833
|
+
{
|
|
1834
|
+
...t.componentProps,
|
|
1835
|
+
editor: i,
|
|
1836
|
+
disabled: r || ((c = t == null ? void 0 : t.componentProps) == null ? void 0 : c.disabled)
|
|
1837
|
+
}
|
|
1838
|
+
) : /* @__PURE__ */ e(N, {});
|
|
1839
|
+
}
|
|
1840
|
+
function Cn(t) {
|
|
1841
|
+
const { t: r, lang: i } = z(), n = ({ editor: a }) => {
|
|
1842
|
+
const { selection: s } = a.view.state, { $from: h, to: o } = s;
|
|
1843
|
+
return h.pos === o ? !1 : s instanceof tr;
|
|
1844
|
+
}, c = H(() => t.disabled || !(t != null && t.editor) ? [] : vn(t.editor, r), [t.disabled, t.editor, i, r]);
|
|
1845
|
+
return /* @__PURE__ */ e(_, { shouldShow: n, editor: t == null ? void 0 : t.editor, tippyOptions: wn, children: c != null && c.length ? /* @__PURE__ */ e("div", { className: "richtext-w-auto richtext-px-3 richtext-py-2 richtext-transition-all !richtext-border richtext-rounded-sm richtext-shadow-sm richtext-pointer-events-auto richtext-select-none richtext-border-neutral-200 dark:richtext-border-neutral-800 richtext-bg-background", children: /* @__PURE__ */ e("div", { className: "richtext-flex richtext-items-center richtext-gap-[4px] richtext-flex-nowrap richtext-whitespace-nowrap richtext-h-[26px] richtext-justify-start richtext-relative", children: c == null ? void 0 : c.map((a, s) => (a == null ? void 0 : a.type) === "divider" ? /* @__PURE__ */ e(
|
|
1846
|
+
L,
|
|
1847
|
+
{
|
|
1848
|
+
orientation: "vertical",
|
|
1849
|
+
className: "!richtext-mx-1 !richtext-my-2 !richtext-h-[16px]"
|
|
1850
|
+
},
|
|
1851
|
+
`bubbleMenu-divider-${s}`
|
|
1852
|
+
) : /* @__PURE__ */ e(
|
|
1853
|
+
bn,
|
|
1854
|
+
{
|
|
1855
|
+
item: a,
|
|
1856
|
+
disabled: t.disabled,
|
|
1857
|
+
editor: t.editor
|
|
1858
|
+
},
|
|
1859
|
+
`bubbleMenu-text-${s}`
|
|
1860
|
+
)) }) }) : /* @__PURE__ */ e(N, {}) });
|
|
1861
|
+
}
|
|
1862
|
+
function yn({ editor: t }) {
|
|
1863
|
+
var f, b, k, O, K, X, J, q, V, Z, F, j, R, m, D, $, I, Q;
|
|
1864
|
+
const r = ({ editor: B }) => ar(B.view.state, "table"), { t: i } = z();
|
|
1865
|
+
function n() {
|
|
1866
|
+
t.chain().focus().addColumnBefore().run();
|
|
1867
|
+
}
|
|
1868
|
+
function c() {
|
|
1869
|
+
t.chain().focus().addColumnAfter().run();
|
|
1870
|
+
}
|
|
1871
|
+
function a() {
|
|
1872
|
+
t.chain().focus().deleteColumn().run();
|
|
1873
|
+
}
|
|
1874
|
+
function s() {
|
|
1875
|
+
t.chain().focus().addRowBefore().run();
|
|
1876
|
+
}
|
|
1877
|
+
function h() {
|
|
1878
|
+
t.chain().focus().addRowAfter().run();
|
|
1879
|
+
}
|
|
1880
|
+
function o() {
|
|
1881
|
+
t.chain().focus().deleteRow().run();
|
|
1882
|
+
}
|
|
1883
|
+
function d() {
|
|
1884
|
+
t.chain().focus().mergeCells().run();
|
|
1885
|
+
}
|
|
1886
|
+
function p() {
|
|
1887
|
+
t == null || t.chain().focus().splitCell().run();
|
|
1888
|
+
}
|
|
1889
|
+
function x() {
|
|
1890
|
+
t.chain().focus().deleteTable().run();
|
|
1891
|
+
}
|
|
1892
|
+
function w(B) {
|
|
1893
|
+
t.chain().focus().setTableCellBackground(B).run();
|
|
1894
|
+
}
|
|
1895
|
+
return /* @__PURE__ */ e(
|
|
1896
|
+
_,
|
|
1897
|
+
{
|
|
1898
|
+
editor: t,
|
|
1899
|
+
pluginKey: "table",
|
|
1900
|
+
shouldShow: r,
|
|
1901
|
+
updateDelay: 0,
|
|
1902
|
+
tippyOptions: {
|
|
1903
|
+
offset: [0, 8],
|
|
1904
|
+
popperOptions: {
|
|
1905
|
+
modifiers: [{ name: "flip", enabled: !1 }]
|
|
1906
|
+
},
|
|
1907
|
+
maxWidth: "auto",
|
|
1908
|
+
getReferenceClientRect: () => {
|
|
1909
|
+
var vt;
|
|
1910
|
+
const {
|
|
1911
|
+
view: B,
|
|
1912
|
+
state: {
|
|
1913
|
+
selection: { from: U }
|
|
1914
|
+
}
|
|
1915
|
+
} = t, E = B.domAtPos(U).node;
|
|
1916
|
+
if (!E)
|
|
1917
|
+
return new DOMRect(-1e3, -1e3, 0, 0);
|
|
1918
|
+
const gt = (vt = E == null ? void 0 : E.closest) == null ? void 0 : vt.call(E, ".tableWrapper");
|
|
1919
|
+
return gt ? gt.getBoundingClientRect() : new DOMRect(-1e3, -1e3, 0, 0);
|
|
1920
|
+
},
|
|
1921
|
+
plugins: [er],
|
|
1922
|
+
sticky: "popper"
|
|
1923
|
+
},
|
|
1924
|
+
children: /* @__PURE__ */ l("div", { className: "richtext-min-w-32 richtext-flex richtext-flex-row richtext-h-full richtext-items-center richtext-leading-none richtext-gap-0.5 richtext-p-2 richtext-w-full richtext-bg-background richtext-rounded-lg richtext-shadow-sm !richtext-border richtext-border-border", children: [
|
|
1925
|
+
/* @__PURE__ */ e(
|
|
1926
|
+
C,
|
|
1927
|
+
{
|
|
1928
|
+
icon: "BetweenHorizonalEnd",
|
|
1929
|
+
tooltip: i("editor.table.menu.insertColumnBefore"),
|
|
1930
|
+
action: n,
|
|
1931
|
+
"tooltip-options": {
|
|
1932
|
+
sideOffset: 15
|
|
1933
|
+
},
|
|
1934
|
+
disabled: !((b = (f = t == null ? void 0 : t.can()) == null ? void 0 : f.addColumnBefore) != null && b.call(f))
|
|
1935
|
+
}
|
|
1936
|
+
),
|
|
1937
|
+
/* @__PURE__ */ e(
|
|
1938
|
+
C,
|
|
1939
|
+
{
|
|
1940
|
+
icon: "BetweenHorizonalStart",
|
|
1941
|
+
tooltip: i("editor.table.menu.insertColumnAfter"),
|
|
1942
|
+
action: c,
|
|
1943
|
+
"tooltip-options": {
|
|
1944
|
+
sideOffset: 15
|
|
1945
|
+
},
|
|
1946
|
+
disabled: !((O = (k = t == null ? void 0 : t.can()) == null ? void 0 : k.addColumnAfter) != null && O.call(k))
|
|
1947
|
+
}
|
|
1948
|
+
),
|
|
1949
|
+
/* @__PURE__ */ e(
|
|
1950
|
+
C,
|
|
1951
|
+
{
|
|
1952
|
+
icon: "DeleteColumn",
|
|
1953
|
+
action: a,
|
|
1954
|
+
tooltip: i("editor.table.menu.deleteColumn"),
|
|
1955
|
+
"tooltip-options": {
|
|
1956
|
+
sideOffset: 15
|
|
1957
|
+
},
|
|
1958
|
+
disabled: !((X = t == null ? void 0 : (K = t.can()).deleteColumn) != null && X.call(K))
|
|
1959
|
+
}
|
|
1960
|
+
),
|
|
1961
|
+
/* @__PURE__ */ e(L, { orientation: "vertical", className: "!richtext-mx-1 !richtext-my-2 !richtext-h-[16px]" }),
|
|
1962
|
+
/* @__PURE__ */ e(
|
|
1963
|
+
C,
|
|
1964
|
+
{
|
|
1965
|
+
icon: "BetweenVerticalEnd",
|
|
1966
|
+
action: s,
|
|
1967
|
+
tooltip: i("editor.table.menu.insertRowAbove"),
|
|
1968
|
+
"tooltip-options": {
|
|
1969
|
+
sideOffset: 15
|
|
1970
|
+
},
|
|
1971
|
+
disabled: !((q = t == null ? void 0 : (J = t.can()).addRowBefore) != null && q.call(J))
|
|
1972
|
+
}
|
|
1973
|
+
),
|
|
1974
|
+
/* @__PURE__ */ e(
|
|
1975
|
+
C,
|
|
1976
|
+
{
|
|
1977
|
+
icon: "BetweenVerticalStart",
|
|
1978
|
+
action: h,
|
|
1979
|
+
tooltip: i("editor.table.menu.insertRowBelow"),
|
|
1980
|
+
"tooltip-options": {
|
|
1981
|
+
sideOffset: 15
|
|
1982
|
+
},
|
|
1983
|
+
disabled: !((Z = (V = t == null ? void 0 : t.can()) == null ? void 0 : V.addRowAfter) != null && Z.call(V))
|
|
1984
|
+
}
|
|
1985
|
+
),
|
|
1986
|
+
/* @__PURE__ */ e(
|
|
1987
|
+
C,
|
|
1988
|
+
{
|
|
1989
|
+
icon: "DeleteRow",
|
|
1990
|
+
action: o,
|
|
1991
|
+
tooltip: i("editor.table.menu.deleteRow"),
|
|
1992
|
+
"tooltip-options": {
|
|
1993
|
+
sideOffset: 15
|
|
1994
|
+
},
|
|
1995
|
+
disabled: !((j = (F = t == null ? void 0 : t.can()) == null ? void 0 : F.deleteRow) != null && j.call(F))
|
|
1996
|
+
}
|
|
1997
|
+
),
|
|
1998
|
+
/* @__PURE__ */ e(L, { orientation: "vertical", className: "!richtext-mx-1 !richtext-my-2 !richtext-h-[16px]" }),
|
|
1999
|
+
/* @__PURE__ */ e(
|
|
2000
|
+
C,
|
|
2001
|
+
{
|
|
2002
|
+
icon: "TableCellsMerge",
|
|
2003
|
+
action: d,
|
|
2004
|
+
tooltip: i("editor.table.menu.mergeCells"),
|
|
2005
|
+
"tooltip-options": {
|
|
2006
|
+
sideOffset: 15
|
|
2007
|
+
},
|
|
2008
|
+
disabled: !((m = (R = t == null ? void 0 : t.can()) == null ? void 0 : R.mergeCells) != null && m.call(R))
|
|
2009
|
+
}
|
|
2010
|
+
),
|
|
2011
|
+
/* @__PURE__ */ e(
|
|
2012
|
+
C,
|
|
2013
|
+
{
|
|
2014
|
+
icon: "TableCellsSplit",
|
|
2015
|
+
action: p,
|
|
2016
|
+
tooltip: i("editor.table.menu.splitCells"),
|
|
2017
|
+
"tooltip-options": {
|
|
2018
|
+
sideOffset: 15
|
|
2019
|
+
},
|
|
2020
|
+
disabled: !(($ = (D = t == null ? void 0 : t.can()) == null ? void 0 : D.splitCell) != null && $.call(D))
|
|
2021
|
+
}
|
|
2022
|
+
),
|
|
2023
|
+
/* @__PURE__ */ e(L, { orientation: "vertical", className: "!richtext-mx-1 !richtext-my-2 !richtext-h-[16px]" }),
|
|
2024
|
+
/* @__PURE__ */ e(
|
|
2025
|
+
or,
|
|
2026
|
+
{
|
|
2027
|
+
editor: t,
|
|
2028
|
+
tooltip: i("editor.table.menu.setCellsBgColor"),
|
|
2029
|
+
action: w,
|
|
2030
|
+
tooltipOptions: {
|
|
2031
|
+
sideOffset: 15
|
|
2032
|
+
}
|
|
2033
|
+
}
|
|
2034
|
+
),
|
|
2035
|
+
/* @__PURE__ */ e(
|
|
2036
|
+
C,
|
|
2037
|
+
{
|
|
2038
|
+
icon: "Trash2",
|
|
2039
|
+
tooltip: i("editor.table.menu.deleteTable"),
|
|
2040
|
+
action: x,
|
|
2041
|
+
"tooltip-options": {
|
|
2042
|
+
sideOffset: 15
|
|
2043
|
+
},
|
|
2044
|
+
disabled: !((Q = (I = t == null ? void 0 : t.can()) == null ? void 0 : I.deleteTable) != null && Q.call(I))
|
|
2045
|
+
}
|
|
2046
|
+
)
|
|
2047
|
+
] })
|
|
2048
|
+
}
|
|
2049
|
+
);
|
|
2050
|
+
}
|
|
2051
|
+
function Nn({ editor: t, disabled: r }) {
|
|
2052
|
+
const [i, n] = M(!1), c = H(() => {
|
|
2053
|
+
const { href: o } = t.getAttributes("link");
|
|
2054
|
+
return o;
|
|
2055
|
+
}, [t]), a = S(({ editor: o }) => o.isActive("link"), []), s = (o, d, p) => {
|
|
2056
|
+
t.chain().extendMarkRange("link").insertContent({
|
|
2057
|
+
type: "text",
|
|
2058
|
+
text: d,
|
|
2059
|
+
marks: [
|
|
2060
|
+
{
|
|
2061
|
+
type: "link",
|
|
2062
|
+
attrs: {
|
|
2063
|
+
href: o,
|
|
2064
|
+
target: p ? "_blank" : ""
|
|
2065
|
+
}
|
|
2066
|
+
}
|
|
2067
|
+
]
|
|
2068
|
+
}).setLink({ href: o }).focus().run(), n(!1);
|
|
2069
|
+
}, h = S(() => {
|
|
2070
|
+
t.chain().extendMarkRange("link").unsetLink().focus().run(), n(!1);
|
|
2071
|
+
}, [t]);
|
|
2072
|
+
return /* @__PURE__ */ e(N, { children: /* @__PURE__ */ e(
|
|
2073
|
+
_,
|
|
2074
|
+
{
|
|
2075
|
+
editor: t,
|
|
2076
|
+
shouldShow: a,
|
|
2077
|
+
tippyOptions: {
|
|
2078
|
+
popperOptions: {
|
|
2079
|
+
modifiers: [{ name: "flip", enabled: !1 }]
|
|
2080
|
+
},
|
|
2081
|
+
placement: "bottom-start",
|
|
2082
|
+
offset: [-2, 16],
|
|
2083
|
+
zIndex: 9999,
|
|
2084
|
+
onHidden: () => {
|
|
2085
|
+
n(!1);
|
|
2086
|
+
}
|
|
2087
|
+
},
|
|
2088
|
+
children: r ? /* @__PURE__ */ e(N, {}) : /* @__PURE__ */ e(N, { children: i ? /* @__PURE__ */ e(sr, { onSetLink: s, editor: t }) : /* @__PURE__ */ e(
|
|
2089
|
+
lr,
|
|
2090
|
+
{
|
|
2091
|
+
editor: t,
|
|
2092
|
+
onClear: h,
|
|
2093
|
+
onEdit: () => {
|
|
2094
|
+
n(!0);
|
|
2095
|
+
},
|
|
2096
|
+
link: c
|
|
2097
|
+
}
|
|
2098
|
+
) })
|
|
2099
|
+
}
|
|
2100
|
+
) });
|
|
2101
|
+
}
|
|
2102
|
+
const me = {
|
|
2103
|
+
maxWidth: "auto",
|
|
2104
|
+
zIndex: 20,
|
|
2105
|
+
appendTo: "parent",
|
|
2106
|
+
moveTransition: "transform 0.1s ease-out"
|
|
2107
|
+
};
|
|
2108
|
+
function fe({ item: t, disabled: r, editor: i }) {
|
|
2109
|
+
var c;
|
|
2110
|
+
const n = t.component;
|
|
2111
|
+
return n ? /* @__PURE__ */ e(pe, { children: t.type === "divider" ? /* @__PURE__ */ e(L, { orientation: "vertical", className: "!richtext-mx-1 !richtext-my-2 !richtext-h-[16px]" }) : /* @__PURE__ */ e(
|
|
2112
|
+
n,
|
|
2113
|
+
{
|
|
2114
|
+
...t.componentProps,
|
|
2115
|
+
editor: i,
|
|
2116
|
+
disabled: r || ((c = t == null ? void 0 : t.componentProps) == null ? void 0 : c.disabled)
|
|
2117
|
+
}
|
|
2118
|
+
) }) : /* @__PURE__ */ e(N, {});
|
|
2119
|
+
}
|
|
2120
|
+
function Tn(t) {
|
|
2121
|
+
return t.type.name === "image";
|
|
2122
|
+
}
|
|
2123
|
+
function kn(t) {
|
|
2124
|
+
return t.type.name === "video";
|
|
2125
|
+
}
|
|
2126
|
+
function An(t) {
|
|
2127
|
+
const { lang: r } = z(), i = ({ editor: c }) => {
|
|
2128
|
+
const { selection: a } = c.view.state, { $from: s, to: h } = a;
|
|
2129
|
+
let o = !1;
|
|
2130
|
+
return c.view.state.doc.nodesBetween(s.pos, h, (d) => {
|
|
2131
|
+
if (Tn(d))
|
|
2132
|
+
return o = !0, !1;
|
|
2133
|
+
}), o;
|
|
2134
|
+
}, n = H(() => t.disabled ? [] : fn(t.editor), [t.disabled, t.editor, r]);
|
|
2135
|
+
return /* @__PURE__ */ e(N, { children: /* @__PURE__ */ e(
|
|
2136
|
+
_,
|
|
2137
|
+
{
|
|
2138
|
+
shouldShow: i,
|
|
2139
|
+
editor: t == null ? void 0 : t.editor,
|
|
2140
|
+
tippyOptions: me,
|
|
2141
|
+
children: n != null && n.length ? /* @__PURE__ */ e("div", { className: "richtext-w-auto richtext-px-3 richtext-py-2 richtext-transition-all !richtext-border richtext-rounded-sm richtext-shadow-sm richtext-pointer-events-auto richtext-select-none richtext-border-neutral-200 dark:richtext-border-neutral-800 richtext-bg-background", children: /* @__PURE__ */ e("div", { className: "richtext-flex richtext-items-center richtext-flex-nowrap richtext-whitespace-nowrap richtext-h-[26px] richtext-justify-start richtext-relative", children: n == null ? void 0 : n.map((c, a) => /* @__PURE__ */ e(
|
|
2142
|
+
fe,
|
|
2143
|
+
{
|
|
2144
|
+
item: c,
|
|
2145
|
+
disabled: t.disabled,
|
|
2146
|
+
editor: t.editor
|
|
2147
|
+
},
|
|
2148
|
+
`bubbleMenu-image-${a}`
|
|
2149
|
+
)) }) }) : /* @__PURE__ */ e(N, {})
|
|
2150
|
+
}
|
|
2151
|
+
) });
|
|
2152
|
+
}
|
|
2153
|
+
function Sn(t) {
|
|
2154
|
+
const { lang: r } = z(), i = ({ editor: c }) => {
|
|
2155
|
+
const { selection: a } = c.view.state, { $from: s, to: h } = a;
|
|
2156
|
+
let o = !1;
|
|
2157
|
+
return c.view.state.doc.nodesBetween(s.pos, h, (d) => {
|
|
2158
|
+
if (kn(d))
|
|
2159
|
+
return o = !0, !1;
|
|
2160
|
+
}), o;
|
|
2161
|
+
}, n = H(() => t.disabled ? [] : gn(t.editor), [t.editor, t.disabled, r]);
|
|
2162
|
+
return /* @__PURE__ */ e(N, { children: /* @__PURE__ */ e(
|
|
2163
|
+
_,
|
|
2164
|
+
{
|
|
2165
|
+
shouldShow: i,
|
|
2166
|
+
editor: t == null ? void 0 : t.editor,
|
|
2167
|
+
tippyOptions: me,
|
|
2168
|
+
children: n != null && n.length ? /* @__PURE__ */ e("div", { className: "richtext-w-auto richtext-px-3 richtext-py-2 richtext-transition-all !richtext-border richtext-rounded-sm richtext-shadow-sm richtext-pointer-events-auto richtext-select-none richtext-border-neutral-200 dark:richtext-border-neutral-800 richtext-bg-background", children: /* @__PURE__ */ e("div", { className: "richtext-flex richtext-items-center richtext-flex-nowrap richtext-whitespace-nowrap richtext-h-[26px] richtext-justify-start richtext-relative", children: n == null ? void 0 : n.map((c, a) => /* @__PURE__ */ e(
|
|
2169
|
+
fe,
|
|
2170
|
+
{
|
|
2171
|
+
item: c,
|
|
2172
|
+
disabled: t.disabled,
|
|
2173
|
+
editor: t.editor
|
|
2174
|
+
},
|
|
2175
|
+
`bubbleMenu-video-${a}`
|
|
2176
|
+
)) }) }) : /* @__PURE__ */ e(N, {})
|
|
2177
|
+
}
|
|
2178
|
+
) });
|
|
2179
|
+
}
|
|
2180
|
+
function zn({ editor: t }) {
|
|
2181
|
+
const { t: r } = z(), i = S(() => t.isActive(Nt.name), [t]), n = S(() => ee(Nt.name, t), [t]), c = S(() => t.chain().focus().addColBefore().run(), [t]), a = S(() => t.chain().focus().addColAfter().run(), [t]), s = S(() => t.chain().focus().deleteCol().run(), [t]);
|
|
2182
|
+
return /* @__PURE__ */ e(
|
|
2183
|
+
_,
|
|
2184
|
+
{
|
|
2185
|
+
pluginKey: "columns-bubble-menu",
|
|
2186
|
+
editor: t,
|
|
2187
|
+
shouldShow: i,
|
|
2188
|
+
tippyOptions: {
|
|
2189
|
+
popperOptions: {
|
|
2190
|
+
modifiers: [{ name: "flip", enabled: !1 }]
|
|
2191
|
+
},
|
|
2192
|
+
placement: "bottom-start",
|
|
2193
|
+
offset: [-2, 16],
|
|
2194
|
+
zIndex: 9999
|
|
2195
|
+
// onHidden: () => {
|
|
2196
|
+
// toggleVisible(false)
|
|
2197
|
+
// },
|
|
2198
|
+
},
|
|
2199
|
+
children: /* @__PURE__ */ l("div", { className: "richtext-w-auto richtext-px-3 richtext-py-2 richtext-transition-all !richtext-border richtext-rounded-sm richtext-shadow-sm richtext-pointer-events-auto richtext-select-none richtext-border-neutral-200 dark:richtext-border-neutral-800 richtext-bg-background", children: [
|
|
2200
|
+
/* @__PURE__ */ e(
|
|
2201
|
+
C,
|
|
2202
|
+
{
|
|
2203
|
+
action: c,
|
|
2204
|
+
icon: "ColumnAddLeft",
|
|
2205
|
+
tooltip: r("editor.table.menu.insertColumnBefore")
|
|
2206
|
+
}
|
|
2207
|
+
),
|
|
2208
|
+
/* @__PURE__ */ e(
|
|
2209
|
+
C,
|
|
2210
|
+
{
|
|
2211
|
+
action: a,
|
|
2212
|
+
icon: "ColumnAddRight",
|
|
2213
|
+
tooltip: r("editor.table.menu.insertColumnAfter")
|
|
2214
|
+
}
|
|
2215
|
+
),
|
|
2216
|
+
/* @__PURE__ */ e(
|
|
2217
|
+
C,
|
|
2218
|
+
{
|
|
2219
|
+
action: s,
|
|
2220
|
+
icon: "DeleteColumn",
|
|
2221
|
+
tooltip: r("editor.table.menu.deleteColumn")
|
|
2222
|
+
}
|
|
2223
|
+
),
|
|
2224
|
+
/* @__PURE__ */ e(
|
|
2225
|
+
C,
|
|
2226
|
+
{
|
|
2227
|
+
action: n,
|
|
2228
|
+
icon: "Trash2",
|
|
2229
|
+
tooltip: r("editor.table.menu.delete_column")
|
|
2230
|
+
}
|
|
2231
|
+
)
|
|
2232
|
+
] })
|
|
2233
|
+
}
|
|
2234
|
+
);
|
|
2235
|
+
}
|
|
2236
|
+
function lc() {
|
|
2237
|
+
return /* @__PURE__ */ e(
|
|
2238
|
+
"svg",
|
|
2239
|
+
{
|
|
2240
|
+
xmlns: "http://www.w3.org/2000/svg",
|
|
2241
|
+
viewBox: "0 0 24 24",
|
|
2242
|
+
width: "1em",
|
|
2243
|
+
height: "1em",
|
|
2244
|
+
children: /* @__PURE__ */ e(
|
|
2245
|
+
"path",
|
|
2246
|
+
{
|
|
2247
|
+
d: "M12 0C5.373 0 0 5.372 0 12c0 6.627 5.373 12 12 12 6.628 0 12-5.373 12-12 0-6.628-5.372-12-12-12m9.949 11H17.05c.224-2.527 1.232-4.773 1.968-6.113A9.966 9.966 0 0 1 21.949 11M13 11V2.051a9.945 9.945 0 0 1 4.432 1.564c-.858 1.491-2.156 4.22-2.392 7.385H13zm-2 0H8.961c-.238-3.165-1.536-5.894-2.393-7.385A9.95 9.95 0 0 1 11 2.051V11zm0 2v8.949a9.937 9.937 0 0 1-4.432-1.564c.857-1.492 2.155-4.221 2.393-7.385H11zm4.04 0c.236 3.164 1.534 5.893 2.392 7.385A9.92 9.92 0 0 1 13 21.949V13h2.04zM4.982 4.887C5.718 6.227 6.726 8.473 6.951 11h-4.9a9.977 9.977 0 0 1 2.931-6.113M2.051 13h4.9c-.226 2.527-1.233 4.771-1.969 6.113A9.972 9.972 0 0 1 2.051 13m16.967 6.113c-.735-1.342-1.744-3.586-1.968-6.113h4.899a9.961 9.961 0 0 1-2.931 6.113",
|
|
2248
|
+
fill: "currentColor"
|
|
2249
|
+
}
|
|
2250
|
+
)
|
|
2251
|
+
}
|
|
2252
|
+
);
|
|
2253
|
+
}
|
|
2254
|
+
function hc() {
|
|
2255
|
+
return /* @__PURE__ */ l(
|
|
2256
|
+
"svg",
|
|
2257
|
+
{
|
|
2258
|
+
xmlns: "http://www.w3.org/2000/svg",
|
|
2259
|
+
viewBox: "0 0 24 24",
|
|
2260
|
+
width: "1em",
|
|
2261
|
+
height: "1em",
|
|
2262
|
+
children: [
|
|
2263
|
+
/* @__PURE__ */ e(
|
|
2264
|
+
"path",
|
|
2265
|
+
{
|
|
2266
|
+
d: "M15.5 8a1.5 1.5 0 1 0 .001 3.001A1.5 1.5 0 0 0 15.5 8M8.5 8a1.5 1.5 0 1 0 .001 3.001A1.5 1.5 0 0 0 8.5 8",
|
|
2267
|
+
fill: "currentColor"
|
|
2268
|
+
}
|
|
2269
|
+
),
|
|
2270
|
+
/* @__PURE__ */ e(
|
|
2271
|
+
"path",
|
|
2272
|
+
{
|
|
2273
|
+
d: "M18.933 0h-.027c-.97 0-2.138.787-3.018 1.497-1.274-.374-2.612-.51-3.887-.51-1.285 0-2.616.133-3.874.517C7.245.79 6.069 0 5.093 0h-.027C3.352 0 .07 2.67.002 7.026c-.039 2.479.276 4.238 1.04 5.013.254.258.882.677 1.295.882.191 3.177.922 5.238 2.536 6.38.897.637 2.187.949 3.2 1.102C8.04 20.6 8 20.795 8 21c0 1.773 2.35 3 4 3 1.648 0 4-1.227 4-3 0-.201-.038-.393-.072-.586 2.573-.385 5.435-1.877 5.925-7.587.396-.22.887-.568 1.104-.788.763-.774 1.079-2.534 1.04-5.013C23.929 2.67 20.646 0 18.933 0M3.223 9.135c-.237.281-.837 1.155-.884 1.238-.15-.41-.368-1.349-.337-3.291.051-3.281 2.478-4.972 3.091-5.031.256.015.731.27 1.265.646-1.11 1.171-2.275 2.915-2.352 5.125-.133.546-.398.858-.783 1.313M12 22c-.901 0-1.954-.693-2-1 0-.654.475-1.236 1-1.602V20a1 1 0 1 0 2 0v-.602c.524.365 1 .947 1 1.602-.046.307-1.099 1-2 1m3-3.48v.02a4.752 4.752 0 0 0-1.262-1.02c1.092-.516 2.239-1.334 2.239-2.217 0-1.842-1.781-2.195-3.977-2.195-2.196 0-3.978.354-3.978 2.195 0 .883 1.148 1.701 2.238 2.217A4.8 4.8 0 0 0 9 18.539v-.025c-1-.076-2.182-.281-2.973-.842-1.301-.92-1.838-3.045-1.853-6.478l.023-.041c.496-.826 1.49-1.45 1.804-3.102 0-2.047 1.357-3.631 2.362-4.522C9.37 3.178 10.555 3 11.948 3c1.447 0 2.685.192 3.733.57 1 .9 2.316 2.465 2.316 4.48.313 1.651 1.307 2.275 1.803 3.102.035.058.068.117.102.178-.059 5.967-1.949 7.01-4.902 7.19m6.628-8.202c-.037-.065-.074-.13-.113-.195a7.587 7.587 0 0 0-.739-.987c-.385-.455-.648-.768-.782-1.313-.076-2.209-1.241-3.954-2.353-5.124.531-.376 1.004-.63 1.261-.647.636.071 3.044 1.764 3.096 5.031.027 1.81-.347 3.218-.37 3.235",
|
|
2274
|
+
fill: "currentColor"
|
|
2275
|
+
}
|
|
2276
|
+
)
|
|
2277
|
+
]
|
|
2278
|
+
}
|
|
2279
|
+
);
|
|
2280
|
+
}
|
|
2281
|
+
function dc() {
|
|
2282
|
+
return /* @__PURE__ */ e(
|
|
2283
|
+
"svg",
|
|
2284
|
+
{
|
|
2285
|
+
xmlns: "http://www.w3.org/2000/svg",
|
|
2286
|
+
viewBox: "0 0 24 24",
|
|
2287
|
+
width: "1em",
|
|
2288
|
+
height: "1em",
|
|
2289
|
+
children: /* @__PURE__ */ e(
|
|
2290
|
+
"path",
|
|
2291
|
+
{
|
|
2292
|
+
d: "M0 0l6.084 24H8L1.916 0zM21 5h-4l-1-4H4l3 12h3l1 4h13L21 5zM6.563 3h7.875l2 8H8.563l-2-8zm8.832 10l-2.856 1.904L12.063 13h3.332zM19 13l-1.5-6h1.938l2 8H16l3-2z",
|
|
2293
|
+
fill: "currentColor"
|
|
2294
|
+
}
|
|
2295
|
+
)
|
|
2296
|
+
}
|
|
2297
|
+
);
|
|
2298
|
+
}
|
|
2299
|
+
function xc() {
|
|
2300
|
+
return /* @__PURE__ */ e(
|
|
2301
|
+
"svg",
|
|
2302
|
+
{
|
|
2303
|
+
xmlns: "http://www.w3.org/2000/svg",
|
|
2304
|
+
viewBox: "0 0 24 24",
|
|
2305
|
+
width: "1em",
|
|
2306
|
+
height: "1em",
|
|
2307
|
+
children: /* @__PURE__ */ e(
|
|
2308
|
+
"path",
|
|
2309
|
+
{
|
|
2310
|
+
d: "M17 4.978c-1.838 0-2.876.396-3.68.934.513-1.172 1.768-2.934 4.68-2.934a1 1 0 0 0 0-2c-2.921 0-4.629 1.365-5.547 2.512-.064.078-.119.162-.18.244C11.73 1.838 10.798.023 9.207.023 8.579.022 7.85.306 7 .978 5.027 2.54 5.329 3.902 6.492 4.999 3.609 5.222 0 7.352 0 12.969c0 4.582 4.961 11.009 9 11.009 1.975 0 2.371-.486 3-1 .629.514 1.025 1 3 1 4.039 0 9-6.418 9-11 0-5.953-4.055-8-7-8M8.242 2.546c.641-.508.943-.523.965-.523.426.169.975 1.405 1.357 3.055-1.527-.629-2.741-1.352-2.98-1.846.059-.112.241-.356.658-.686M15 21.978c-1.08 0-1.21-.109-1.559-.402l-.176-.146c-.367-.302-.816-.452-1.266-.452s-.898.15-1.266.452l-.176.146c-.347.292-.477.402-1.557.402-2.813 0-7-5.389-7-9.009 0-5.823 4.488-5.991 5-5.991 1.939 0 2.484.471 3.387 1.251l.323.276a1.995 1.995 0 0 0 2.58 0l.323-.276c.902-.78 1.447-1.251 3.387-1.251.512 0 5 .168 5 6 0 3.617-4.187 9-7 9",
|
|
2311
|
+
fill: "currentColor"
|
|
2312
|
+
}
|
|
2313
|
+
)
|
|
2314
|
+
}
|
|
2315
|
+
);
|
|
2316
|
+
}
|
|
2317
|
+
function uc() {
|
|
2318
|
+
return /* @__PURE__ */ l(
|
|
2319
|
+
"svg",
|
|
2320
|
+
{
|
|
2321
|
+
xmlns: "http://www.w3.org/2000/svg",
|
|
2322
|
+
viewBox: "0 0 24 24",
|
|
2323
|
+
width: "1em",
|
|
2324
|
+
height: "1em",
|
|
2325
|
+
children: [
|
|
2326
|
+
/* @__PURE__ */ e(
|
|
2327
|
+
"path",
|
|
2328
|
+
{
|
|
2329
|
+
d: "M12 0a9 9 0 0 0-5 16.482V21s2.035 3 5 3 5-3 5-3v-4.518A9 9 0 0 0 12 0zm0 2c3.86 0 7 3.141 7 7s-3.14 7-7 7-7-3.141-7-7 3.14-7 7-7zM9 17.477c.94.332 1.946.523 3 .523s2.06-.19 3-.523v.834c-.91.436-1.925.689-3 .689a6.924 6.924 0 0 1-3-.69v-.833zm.236 3.07A8.854 8.854 0 0 0 12 21c.965 0 1.888-.167 2.758-.451C14.155 21.173 13.153 22 12 22c-1.102 0-2.117-.789-2.764-1.453z",
|
|
2330
|
+
fill: "currentColor"
|
|
2331
|
+
}
|
|
2332
|
+
),
|
|
2333
|
+
/* @__PURE__ */ e(
|
|
2334
|
+
"path",
|
|
2335
|
+
{
|
|
2336
|
+
d: "M14.745 12.449h-.004c-.852-.024-1.188-.858-1.577-1.824-.421-1.061-.703-1.561-1.182-1.566h-.009c-.481 0-.783.497-1.235 1.537-.436.982-.801 1.811-1.636 1.791l-.276-.043c-.565-.171-.853-.691-1.284-1.794-.125-.313-.202-.632-.27-.913-.051-.213-.127-.53-.195-.634C7.067 9.004 7.039 9 6.99 9A1 1 0 0 1 7 7h.01c1.662.017 2.015 1.373 2.198 2.134.486-.981 1.304-2.058 2.797-2.075 1.531.018 2.28 1.153 2.731 2.141l.002-.008C14.944 8.424 15.327 7 16.979 7h.032A1 1 0 1 1 17 9h-.011c-.149.076-.256.474-.319.709a6.484 6.484 0 0 1-.311.951c-.429.973-.79 1.789-1.614 1.789",
|
|
2337
|
+
fill: "currentColor"
|
|
2338
|
+
}
|
|
2339
|
+
)
|
|
2340
|
+
]
|
|
2341
|
+
}
|
|
2342
|
+
);
|
|
2343
|
+
}
|
|
2344
|
+
function mc() {
|
|
2345
|
+
return /* @__PURE__ */ e(
|
|
2346
|
+
"svg",
|
|
2347
|
+
{
|
|
2348
|
+
xmlns: "http://www.w3.org/2000/svg",
|
|
2349
|
+
viewBox: "0 0 24 24",
|
|
2350
|
+
width: "1em",
|
|
2351
|
+
height: "1em",
|
|
2352
|
+
children: /* @__PURE__ */ e(
|
|
2353
|
+
"path",
|
|
2354
|
+
{
|
|
2355
|
+
d: "M0 0h11v2H0zM4 11h3V6h4V4H0v2h4zM15.5 17c1.381 0 2.5-1.116 2.5-2.493s-1.119-2.493-2.5-2.493S13 13.13 13 14.507 14.119 17 15.5 17m0-2.986c.276 0 .5.222.5.493 0 .272-.224.493-.5.493s-.5-.221-.5-.493.224-.493.5-.493M21.5 19.014c-1.381 0-2.5 1.116-2.5 2.493S20.119 24 21.5 24s2.5-1.116 2.5-2.493-1.119-2.493-2.5-2.493m0 2.986a.497.497 0 0 1-.5-.493c0-.271.224-.493.5-.493s.5.222.5.493a.497.497 0 0 1-.5.493M22 13l-9 9 1.513 1.5 8.99-9.009zM17 11c2.209 0 4-1.119 4-2.5V2s.985-.161 1.498.949C23.01 4.055 23 6 23 6s1-1.119 1-3.135C24-.02 21 0 21 0h-2v6.347A5.853 5.853 0 0 0 17 6c-2.209 0-4 1.119-4 2.5s1.791 2.5 4 2.5M10.297 20.482l-1.475-1.585a47.54 47.54 0 0 1-1.442 1.129c-.307-.288-.989-1.016-2.045-2.183.902-.836 1.479-1.466 1.729-1.892s.376-.871.376-1.336c0-.592-.273-1.178-.818-1.759-.546-.581-1.329-.871-2.349-.871-1.008 0-1.79.293-2.344.879-.556.587-.832 1.181-.832 1.784 0 .813.419 1.748 1.256 2.805-.847.614-1.444 1.208-1.794 1.784a3.465 3.465 0 0 0-.523 1.833c0 .857.308 1.56.924 2.107.616.549 1.423.823 2.42.823 1.173 0 2.444-.379 3.813-1.137L8.235 24h2.819l-2.09-2.383 1.333-1.135zm-6.736-6.389a1.02 1.02 0 0 1 .73-.286c.31 0 .559.085.747.254a.849.849 0 0 1 .283.659c0 .518-.419 1.112-1.257 1.784-.536-.651-.805-1.231-.805-1.742a.901.901 0 0 1 .302-.669M3.74 22c-.427 0-.778-.116-1.057-.349-.279-.232-.418-.487-.418-.766 0-.594.509-1.288 1.527-2.083.968 1.134 1.717 1.946 2.248 2.438-.921.507-1.686.76-2.3.76",
|
|
2356
|
+
fill: "currentColor"
|
|
2357
|
+
}
|
|
2358
|
+
)
|
|
2359
|
+
}
|
|
2360
|
+
);
|
|
2361
|
+
}
|
|
2362
|
+
function fc() {
|
|
2363
|
+
return /* @__PURE__ */ l(
|
|
2364
|
+
"svg",
|
|
2365
|
+
{
|
|
2366
|
+
xmlns: "http://www.w3.org/2000/svg",
|
|
2367
|
+
viewBox: "0 0 24 24",
|
|
2368
|
+
width: "1em",
|
|
2369
|
+
height: "1em",
|
|
2370
|
+
children: [
|
|
2371
|
+
/* @__PURE__ */ e(
|
|
2372
|
+
"path",
|
|
2373
|
+
{
|
|
2374
|
+
d: "M6.5 12C5.122 12 4 13.121 4 14.5S5.122 17 6.5 17 9 15.879 9 14.5 7.878 12 6.5 12m0 3c-.275 0-.5-.225-.5-.5s.225-.5.5-.5.5.225.5.5-.225.5-.5.5M17.5 12c-1.378 0-2.5 1.121-2.5 2.5s1.122 2.5 2.5 2.5 2.5-1.121 2.5-2.5-1.122-2.5-2.5-2.5m0 3c-.275 0-.5-.225-.5-.5s.225-.5.5-.5.5.225.5.5-.225.5-.5.5",
|
|
2375
|
+
fill: "currentColor"
|
|
2376
|
+
}
|
|
2377
|
+
),
|
|
2378
|
+
/* @__PURE__ */ e(
|
|
2379
|
+
"path",
|
|
2380
|
+
{
|
|
2381
|
+
d: "M22.482 9.494l-1.039-.346L21.4 9h.6c.552 0 1-.439 1-.992 0-.006-.003-.008-.003-.008H23c0-1-.889-2-1.984-2h-.642l-.731-1.717C19.262 3.012 18.091 2 16.764 2H7.236C5.909 2 4.738 3.012 4.357 4.283L3.626 6h-.642C1.889 6 1 7 1 8h.003S1 8.002 1 8.008C1 8.561 1.448 9 2 9h.6l-.043.148-1.039.346a2.001 2.001 0 0 0-1.359 2.097l.751 7.508a1 1 0 0 0 .994.901H3v1c0 1.103.896 2 2 2h2c1.104 0 2-.897 2-2v-1h6v1c0 1.103.896 2 2 2h2c1.104 0 2-.897 2-2v-1h1.096a.999.999 0 0 0 .994-.901l.751-7.508a2.001 2.001 0 0 0-1.359-2.097M6.273 4.857C6.402 4.43 6.788 4 7.236 4h9.527c.448 0 .834.43.963.857L19.313 9H4.688l1.585-4.143zM7 21H5v-1h2v1zm12 0h-2v-1h2v1zm2.189-3H2.811l-.662-6.607L3 11h18l.852.393L21.189 18z",
|
|
2382
|
+
fill: "currentColor"
|
|
2383
|
+
}
|
|
2384
|
+
)
|
|
2385
|
+
]
|
|
2386
|
+
}
|
|
2387
|
+
);
|
|
2388
|
+
}
|
|
2389
|
+
export {
|
|
2390
|
+
ae as $,
|
|
2391
|
+
C as A,
|
|
2392
|
+
P as B,
|
|
2393
|
+
ac as C,
|
|
2394
|
+
vr as D,
|
|
2395
|
+
rc as E,
|
|
2396
|
+
Ar as F,
|
|
2397
|
+
Sr as G,
|
|
2398
|
+
zr as H,
|
|
2399
|
+
y as I,
|
|
2400
|
+
jn as J,
|
|
2401
|
+
Pn as K,
|
|
2402
|
+
Tr as L,
|
|
2403
|
+
Kn as M,
|
|
2404
|
+
$n as N,
|
|
2405
|
+
hc as O,
|
|
2406
|
+
he as P,
|
|
2407
|
+
xc as Q,
|
|
2408
|
+
lc as R,
|
|
2409
|
+
kr as S,
|
|
2410
|
+
ut as T,
|
|
2411
|
+
fc as U,
|
|
2412
|
+
st as V,
|
|
2413
|
+
uc as W,
|
|
2414
|
+
mc as X,
|
|
2415
|
+
dc as Y,
|
|
2416
|
+
oc as Z,
|
|
2417
|
+
fr as _,
|
|
2418
|
+
le as a,
|
|
2419
|
+
Hn as a0,
|
|
2420
|
+
sc as a1,
|
|
2421
|
+
hr as a2,
|
|
2422
|
+
dr as a3,
|
|
2423
|
+
Un as a4,
|
|
2424
|
+
xr as a5,
|
|
2425
|
+
ot as a6,
|
|
2426
|
+
Zn as a7,
|
|
2427
|
+
Yn as a8,
|
|
2428
|
+
ur as a9,
|
|
2429
|
+
kt as aA,
|
|
2430
|
+
ht as aB,
|
|
2431
|
+
lt as aC,
|
|
2432
|
+
ic as aD,
|
|
2433
|
+
nc as aE,
|
|
2434
|
+
Er as aF,
|
|
2435
|
+
Lr as aG,
|
|
2436
|
+
Fr as aH,
|
|
2437
|
+
Rr as aI,
|
|
2438
|
+
Br as aJ,
|
|
2439
|
+
Dr as aK,
|
|
2440
|
+
Ir as aL,
|
|
2441
|
+
Hr as aM,
|
|
2442
|
+
Pr as aN,
|
|
2443
|
+
cc as aO,
|
|
2444
|
+
jr as aP,
|
|
2445
|
+
Ur as aa,
|
|
2446
|
+
Jr as ab,
|
|
2447
|
+
qr as ac,
|
|
2448
|
+
Zr as ad,
|
|
2449
|
+
Qr as ae,
|
|
2450
|
+
Yr as af,
|
|
2451
|
+
tn as ag,
|
|
2452
|
+
en as ah,
|
|
2453
|
+
nn as ai,
|
|
2454
|
+
cn as aj,
|
|
2455
|
+
an as ak,
|
|
2456
|
+
fn as al,
|
|
2457
|
+
gn as am,
|
|
2458
|
+
vn as an,
|
|
2459
|
+
pn as ao,
|
|
2460
|
+
Cn as ap,
|
|
2461
|
+
yn as aq,
|
|
2462
|
+
Nn as ar,
|
|
2463
|
+
An as as,
|
|
2464
|
+
Sn as at,
|
|
2465
|
+
zn as au,
|
|
2466
|
+
gr as av,
|
|
2467
|
+
br as aw,
|
|
2468
|
+
Cr as ax,
|
|
2469
|
+
ec as ay,
|
|
2470
|
+
Tt as az,
|
|
2471
|
+
L as b,
|
|
2472
|
+
pr as c,
|
|
2473
|
+
oe as d,
|
|
2474
|
+
A as e,
|
|
2475
|
+
Gn as f,
|
|
2476
|
+
tc as g,
|
|
2477
|
+
wr as h,
|
|
2478
|
+
se as i,
|
|
2479
|
+
Wn as j,
|
|
2480
|
+
yr as k,
|
|
2481
|
+
de as l,
|
|
2482
|
+
xt as m,
|
|
2483
|
+
mt as n,
|
|
2484
|
+
xe as o,
|
|
2485
|
+
nt as p,
|
|
2486
|
+
Xn as q,
|
|
2487
|
+
Jn as r,
|
|
2488
|
+
ft as s,
|
|
2489
|
+
rn as t,
|
|
2490
|
+
qn as u,
|
|
2491
|
+
Qn as v,
|
|
2492
|
+
g as w,
|
|
2493
|
+
On as x,
|
|
2494
|
+
Vn as y,
|
|
2495
|
+
_n as z
|
|
2496
|
+
};
|