reactjs-tiptap-editor 0.2.2 → 0.2.4

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.
@@ -1,41 +1,40 @@
1
1
  import { jsxs as u, jsx as i, Fragment as _ } from "react/jsx-runtime";
2
2
  import * as E from "react";
3
- import Oe, { useState as w, useCallback as C, useEffect as I, useRef as nt, useMemo as P, Fragment as _e, forwardRef as Si, useImperativeHandle as Ai } from "react";
4
- import { f as Rt, N as dt, m as it, i as Mi, a as ut, R as xt, n as ce, I as He, b as me, c as Li, B as Y, d as Ii, D as Ei, e as zi, u as Ri, E as Oi } from "./tiptap-B9VypLMv.js";
5
- import { u as V, m as _i, I as Ot, f as _t, g as Pe, C as Hi, h as Z, B as Pi, i as Ht, V as fe, E as Di } from "./index-BEUeIQfa.js";
6
- import * as De from "@radix-ui/react-separator";
7
- import { ap as Bi, aq as Pt, ao as Be, ar as $e, as as Vt, at as Ve, T as bt, N as $i, A as Vi, au as We, av as Wi, aw as ge, ax as wt, ay as ji, az as je, aA as Fi, H as Wt, aB as Gi, aC as Ui } from "./vendor-BeclCw8p.js";
3
+ import Re, { useState as w, useCallback as C, useEffect as I, useRef as nt, useMemo as P, Fragment as Oe, forwardRef as ki, useImperativeHandle as Si } from "react";
4
+ import { f as Rt, N as dt, m as it, i as Ai, a as ut, R as xt, n as ne, I as _e, b as xe, c as Mi, B as Y, d as Li, D as Ii, e as Ei, u as zi, E as Ri } from "./tiptap-DXj1s_xP.js";
5
+ import { u as V, m as Oi, I as Ot, f as _t, g as He, C as _i, h as Z, B as Hi, i as Ht, V as me, E as Pi } from "./index-BUxFK1y_.js";
6
+ import * as Pe from "@radix-ui/react-separator";
7
+ import { ap as Di, aq as Pt, ao as De, ar as Be, as as $t, at as $e, T as bt, N as Bi, A as $i, au as Ve, av as Vi, aw as fe, ax as wt, ay as Wi, az as We, aA as ji, H as Vt, aB as Fi, aC as Gi } from "./vendor-DIvoV5tx.js";
8
8
  import * as X from "@radix-ui/react-toast";
9
- import { ChevronRight as Ki, Check as Zi, Circle as Xi, X as Fe, FlipHorizontal as qi, FlipVertical as Yi, CropIcon as Ji, ChevronUp as Qi, Paperclip as tr, Eye as er, Settings as ir, ZoomOut as rr, ZoomIn as nr, BookMarked as cr, Sigma as ar, SmilePlusIcon as or, Replace as pe, SmilePlus as sr, Frame as lr, Columns2 as we, PanelRight as hr, PanelLeft as dr, Clipboard as ur, Copy as xr, GripVertical as mr, Plus as Ge, Columns4 as fr, Columns3 as gr, Heading6 as pr, Heading5 as wr, Heading4 as vr, Heading3 as br, Heading2 as yr, Heading1 as Cr, ChevronsUpDown as Nr, Trash as Tr, Trash2 as Ue, TableCellsSplit as kr, TableCellsMerge as Sr, BetweenVerticalEnd as Ar, BetweenVerticalStart as Mr, BetweenHorizonalStart as Lr, BetweenHorizonalEnd as Ir, Unlink as Er, Pencil as Ke, Sparkles as zr, Table as Rr, Minimize as Or, Maximize as _r, Video as Hr, ImageUp as Pr, Link as Dr, ListTodo as Br, ListOrdered as $r, List as Vr, IndentDecrease as Wr, IndentIncrease as jr, Type as Fr, CodeXml as Gr, Code as Ur, Superscript as Kr, Subscript as Zr, ChevronDown as Xr, Undo2 as qr, Redo2 as Yr, PaintRoller as Jr, Eraser as Qr, Minus as tn, Strikethrough as en, Quote as rn, Underline as nn, Italic as cn, LoaderCircle as an, Bold as on, HelpCircle as Ze } from "lucide-react";
9
+ import { ChevronRight as Ui, Check as Ki, Circle as Zi, X as je, FlipHorizontal as Xi, FlipVertical as qi, CropIcon as Yi, ChevronUp as Ji, Paperclip as Qi, Eye as tr, Settings as er, ZoomOut as ir, ZoomIn as rr, BookMarked as nr, Sigma as cr, SmilePlusIcon as ar, Replace as ge, SmilePlus as or, Frame as sr, Columns2 as pe, PanelRight as lr, PanelLeft as hr, Clipboard as dr, Copy as ur, GripVertical as xr, Plus as Fe, Columns4 as mr, Columns3 as fr, Heading6 as gr, Heading5 as pr, Heading4 as wr, Heading3 as vr, Heading2 as br, Heading1 as yr, ChevronsUpDown as Cr, Trash as Nr, Trash2 as Ge, TableCellsSplit as Tr, TableCellsMerge as kr, BetweenVerticalEnd as Sr, BetweenVerticalStart as Ar, BetweenHorizonalStart as Mr, BetweenHorizonalEnd as Lr, Unlink as Ir, Pencil as Ue, Sparkles as Er, Table as zr, Minimize as Rr, Maximize as Or, Video as _r, ImageUp as Hr, Link as Pr, ListTodo as Dr, ListOrdered as Br, List as $r, IndentDecrease as Vr, IndentIncrease as Wr, Type as jr, CodeXml as Fr, Code as Gr, Superscript as Ur, Subscript as Kr, ChevronDown as Zr, Undo2 as Xr, Redo2 as qr, PaintRoller as Yr, Eraser as Jr, Minus as Qr, Strikethrough as tn, Quote as en, Underline as rn, Italic as nn, LoaderCircle as cn, Bold as an, HelpCircle as Ke } from "lucide-react";
10
10
  import * as yt from "@radix-ui/react-tooltip";
11
- import ae from "katex";
12
- import { Slot as Xe } from "@radix-ui/react-slot";
13
- import * as qe from "@radix-ui/react-toggle";
14
- import { TextAlignRightIcon as sn, TextAlignLeftIcon as ln, TextAlignJustifyIcon as hn, TextAlignCenterIcon as dn } from "@radix-ui/react-icons";
11
+ import ce from "katex";
12
+ import { Slot as Ze } from "@radix-ui/react-slot";
13
+ import * as Xe from "@radix-ui/react-toggle";
14
+ import { TextAlignRightIcon as on, TextAlignLeftIcon as sn, TextAlignJustifyIcon as ln, TextAlignCenterIcon as hn } from "@radix-ui/react-icons";
15
15
  import * as vt from "@radix-ui/react-popover";
16
- import * as Ye from "@radix-ui/react-label";
16
+ import * as qe from "@radix-ui/react-label";
17
17
  import * as q from "@radix-ui/react-dialog";
18
- import { Resizable as Je } from "re-resizable";
18
+ import { Resizable as Ye } from "re-resizable";
19
19
  import Dt from "mermaid";
20
- import { flushSync as Bt } from "react-dom";
21
- import { sticky as un } from "tippy.js";
22
- import { HexColorPicker as xn } from "react-colorful";
23
- import * as Yt from "@radix-ui/react-switch";
20
+ import { sticky as dn } from "tippy.js";
21
+ import { HexColorPicker as un } from "react-colorful";
22
+ import * as qt from "@radix-ui/react-switch";
24
23
  import * as D from "@radix-ui/react-dropdown-menu";
25
24
  function L(...t) {
26
- return Bi(Pt(t));
25
+ return Di(Pt(t));
27
26
  }
28
- let Gt;
29
- function Ut() {
30
- return Gt === void 0 && (Gt = navigator.platform.includes("Mac")), Gt;
27
+ let Ft;
28
+ function Gt() {
29
+ return Ft === void 0 && (Ft = navigator.platform.includes("Mac")), Ft;
31
30
  }
32
- function mn(t) {
33
- return `${t}`.toLowerCase() === "mod" ? Ut() ? "⌘" : "Ctrl" : `${t}`.toLowerCase() === "alt" ? Ut() ? "⌥" : "Alt" : `${t}`.toLowerCase() === "shift" ? Ut() ? "⇧" : "Shift" : t;
31
+ function xn(t) {
32
+ return `${t}`.toLowerCase() === "mod" ? Gt() ? "⌘" : "Ctrl" : `${t}`.toLowerCase() === "alt" ? Gt() ? "⌥" : "Alt" : `${t}`.toLowerCase() === "shift" ? Gt() ? "⇧" : "Shift" : t;
34
33
  }
35
- function fn(t) {
36
- return t.map(mn).join(" ");
34
+ function mn(t) {
35
+ return t.map(xn).join(" ");
37
36
  }
38
- const v = Oe.forwardRef(
37
+ const v = Re.forwardRef(
39
38
  (t, e) => {
40
39
  const {
41
40
  icon: r = void 0,
@@ -53,10 +52,10 @@ const v = Oe.forwardRef(
53
52
  asChild: m = !1,
54
53
  upload: f = !1,
55
54
  ...p
56
- } = t, b = ui[r];
57
- return /* @__PURE__ */ u(hi, { children: [
58
- /* @__PURE__ */ i(di, { asChild: !0, children: /* @__PURE__ */ u(
59
- m ? Xe : li,
55
+ } = t, b = di[r];
56
+ return /* @__PURE__ */ u(li, { children: [
57
+ /* @__PURE__ */ i(hi, { asChild: !0, children: /* @__PURE__ */ u(
58
+ m ? Ze : si,
60
59
  {
61
60
  "data-state": d != null && d() ? "on" : "off",
62
61
  onClick: h,
@@ -71,19 +70,19 @@ const v = Oe.forwardRef(
71
70
  ]
72
71
  }
73
72
  ) }),
74
- n && /* @__PURE__ */ i(oe, { ...l, children: /* @__PURE__ */ u("div", { className: "richtext-flex richtext-max-w-24 richtext-flex-col richtext-items-center richtext-text-center", children: [
73
+ n && /* @__PURE__ */ i(ae, { ...l, children: /* @__PURE__ */ u("div", { className: "richtext-flex richtext-max-w-24 richtext-flex-col richtext-items-center richtext-text-center", children: [
75
74
  /* @__PURE__ */ i("div", { children: n }),
76
- !!(s != null && s.length) && /* @__PURE__ */ i("span", { children: fn(s) })
75
+ !!(s != null && s.length) && /* @__PURE__ */ i("span", { children: mn(s) })
77
76
  ] }) })
78
77
  ] });
79
78
  }
80
- ), Qe = Be(!1);
81
- function gn() {
82
- return $e(Qe);
79
+ ), Je = De(!1);
80
+ function fn() {
81
+ return Be(Je);
83
82
  }
84
- const pn = {
83
+ const gn = {
85
84
  setDisable: (t) => {
86
- Qe(t);
85
+ Je(t);
87
86
  }
88
87
  };
89
88
  function Ct(t, e) {
@@ -105,26 +104,26 @@ function Ct(t, e) {
105
104
  }
106
105
  return a;
107
106
  }
108
- function ti(t, e, r) {
107
+ function Qe(t, e, r) {
109
108
  return t < e ? e : t > r ? r : t;
110
109
  }
111
- const wn = (t) => typeof t == "number", vn = (t) => typeof t == "string", bn = (t) => typeof t == "function";
112
- function uo(t, e = "px") {
110
+ const pn = (t) => typeof t == "number", wn = (t) => typeof t == "string", vn = (t) => typeof t == "function";
111
+ function lo(t, e = "px") {
113
112
  if (!t)
114
113
  return t;
115
- const r = wn(t) ? String(t) : t, n = Number.parseFloat(r), a = r.match(/[%a-z]+$/i), c = a ? a[0] : e;
114
+ const r = pn(t) ? String(t) : t, n = Number.parseFloat(r), a = r.match(/[%a-z]+$/i), c = a ? a[0] : e;
116
115
  return Number.isNaN(n) ? t : n + c;
117
116
  }
118
- function yn(t, e) {
117
+ function bn(t, e) {
119
118
  if (!t)
120
119
  return !1;
121
120
  const { extensions: r = [] } = (t == null ? void 0 : t.extensionManager) ?? {};
122
121
  return !!r.find((a) => a.name === e);
123
122
  }
124
- function xo(t) {
125
- return t.map((e) => vn(e) ? { value: e, name: e } : e);
123
+ function ho(t) {
124
+ return t.map((e) => wn(e) ? { value: e, name: e } : e);
126
125
  }
127
- const Cn = Vt(
126
+ const yn = $t(
128
127
  "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",
129
128
  {
130
129
  variants: {
@@ -150,16 +149,16 @@ const Cn = Vt(
150
149
  }
151
150
  ), U = E.forwardRef(
152
151
  ({ className: t, variant: e, size: r, asChild: n = !1, ...a }, c) => /* @__PURE__ */ i(
153
- n ? Xe : "button",
152
+ n ? Ze : "button",
154
153
  {
155
- className: L(Cn({ variant: e, size: r, className: t })),
154
+ className: L(yn({ variant: e, size: r, className: t })),
156
155
  ref: c,
157
156
  ...a
158
157
  }
159
158
  )
160
159
  );
161
160
  U.displayName = "Button";
162
- const Nn = D.Root, Tn = D.Trigger, ve = D.Portal, be = D.Sub, Jt = E.forwardRef(({ className: t, inset: e, children: r, ...n }, a) => /* @__PURE__ */ u(
161
+ const Cn = D.Root, Nn = D.Trigger, we = D.Portal, ve = D.Sub, Yt = E.forwardRef(({ className: t, inset: e, children: r, ...n }, a) => /* @__PURE__ */ u(
163
162
  D.SubTrigger,
164
163
  {
165
164
  ref: a,
@@ -171,12 +170,12 @@ const Nn = D.Root, Tn = D.Trigger, ve = D.Portal, be = D.Sub, Jt = E.forwardRef(
171
170
  ...n,
172
171
  children: [
173
172
  r,
174
- /* @__PURE__ */ i(Ki, { className: "richtext-ml-auto richtext-h-4 richtext-w-4" })
173
+ /* @__PURE__ */ i(Ui, { className: "richtext-ml-auto richtext-h-4 richtext-w-4" })
175
174
  ]
176
175
  }
177
176
  ));
178
- Jt.displayName = D.SubTrigger.displayName;
179
- const Qt = E.forwardRef(({ className: t, ...e }, r) => /* @__PURE__ */ i(
177
+ Yt.displayName = D.SubTrigger.displayName;
178
+ const Jt = E.forwardRef(({ className: t, ...e }, r) => /* @__PURE__ */ i(
180
179
  D.SubContent,
181
180
  {
182
181
  ref: r,
@@ -187,8 +186,8 @@ const Qt = E.forwardRef(({ className: t, ...e }, r) => /* @__PURE__ */ i(
187
186
  ...e
188
187
  }
189
188
  ));
190
- Qt.displayName = D.SubContent.displayName;
191
- const ei = E.forwardRef(({ className: t, sideOffset: e = 4, ...r }, n) => /* @__PURE__ */ i(D.Portal, { children: /* @__PURE__ */ i(
189
+ Jt.displayName = D.SubContent.displayName;
190
+ const ti = E.forwardRef(({ className: t, sideOffset: e = 4, ...r }, n) => /* @__PURE__ */ i(D.Portal, { children: /* @__PURE__ */ i(
192
191
  D.Content,
193
192
  {
194
193
  ref: n,
@@ -200,7 +199,7 @@ const ei = E.forwardRef(({ className: t, sideOffset: e = 4, ...r }, n) => /* @__
200
199
  ...r
201
200
  }
202
201
  ) }));
203
- ei.displayName = D.Content.displayName;
202
+ ti.displayName = D.Content.displayName;
204
203
  const tt = E.forwardRef(({ className: t, inset: e, ...r }, n) => /* @__PURE__ */ i(
205
204
  D.Item,
206
205
  {
@@ -214,7 +213,7 @@ const tt = E.forwardRef(({ className: t, inset: e, ...r }, n) => /* @__PURE__ */
214
213
  }
215
214
  ));
216
215
  tt.displayName = D.Item.displayName;
217
- const kn = E.forwardRef(({ className: t, children: e, checked: r, ...n }, a) => /* @__PURE__ */ u(
216
+ const Tn = E.forwardRef(({ className: t, children: e, checked: r, ...n }, a) => /* @__PURE__ */ u(
218
217
  D.CheckboxItem,
219
218
  {
220
219
  ref: a,
@@ -225,13 +224,13 @@ const kn = E.forwardRef(({ className: t, children: e, checked: r, ...n }, a) =>
225
224
  checked: r,
226
225
  ...n,
227
226
  children: [
228
- /* @__PURE__ */ i("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__ */ i(D.ItemIndicator, { children: /* @__PURE__ */ i(Zi, { className: "richtext-h-4 richtext-w-4" }) }) }),
227
+ /* @__PURE__ */ i("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__ */ i(D.ItemIndicator, { children: /* @__PURE__ */ i(Ki, { className: "richtext-h-4 richtext-w-4" }) }) }),
229
228
  e
230
229
  ]
231
230
  }
232
231
  ));
233
- kn.displayName = D.CheckboxItem.displayName;
234
- const Sn = E.forwardRef(({ className: t, children: e, ...r }, n) => /* @__PURE__ */ u(
232
+ Tn.displayName = D.CheckboxItem.displayName;
233
+ const kn = E.forwardRef(({ className: t, children: e, ...r }, n) => /* @__PURE__ */ u(
235
234
  D.RadioItem,
236
235
  {
237
236
  ref: n,
@@ -241,13 +240,13 @@ const Sn = E.forwardRef(({ className: t, children: e, ...r }, n) => /* @__PURE__
241
240
  ),
242
241
  ...r,
243
242
  children: [
244
- /* @__PURE__ */ i("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__ */ i(D.ItemIndicator, { children: /* @__PURE__ */ i(Xi, { className: "richtext-h-2 richtext-w-2 richtext-fill-current" }) }) }),
243
+ /* @__PURE__ */ i("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__ */ i(D.ItemIndicator, { children: /* @__PURE__ */ i(Zi, { className: "richtext-h-2 richtext-w-2 richtext-fill-current" }) }) }),
245
244
  e
246
245
  ]
247
246
  }
248
247
  ));
249
- Sn.displayName = D.RadioItem.displayName;
250
- const An = E.forwardRef(({ className: t, inset: e, ...r }, n) => /* @__PURE__ */ i(
248
+ kn.displayName = D.RadioItem.displayName;
249
+ const Sn = E.forwardRef(({ className: t, inset: e, ...r }, n) => /* @__PURE__ */ i(
251
250
  D.Label,
252
251
  {
253
252
  ref: n,
@@ -259,8 +258,8 @@ const An = E.forwardRef(({ className: t, inset: e, ...r }, n) => /* @__PURE__ */
259
258
  ...r
260
259
  }
261
260
  ));
262
- An.displayName = D.Label.displayName;
263
- const ii = E.forwardRef(({ className: t, ...e }, r) => /* @__PURE__ */ i(
261
+ Sn.displayName = D.Label.displayName;
262
+ const ei = E.forwardRef(({ className: t, ...e }, r) => /* @__PURE__ */ i(
264
263
  D.Separator,
265
264
  {
266
265
  ref: r,
@@ -268,8 +267,8 @@ const ii = E.forwardRef(({ className: t, ...e }, r) => /* @__PURE__ */ i(
268
267
  ...e
269
268
  }
270
269
  ));
271
- ii.displayName = D.Separator.displayName;
272
- function Mn({
270
+ ei.displayName = D.Separator.displayName;
271
+ function An({
273
272
  className: t,
274
273
  ...e
275
274
  }) {
@@ -281,7 +280,7 @@ function Mn({
281
280
  }
282
281
  );
283
282
  }
284
- Mn.displayName = "DropdownMenuShortcut";
283
+ An.displayName = "DropdownMenuShortcut";
285
284
  const J = E.forwardRef(
286
285
  ({ className: t, type: e, ...r }, n) => /* @__PURE__ */ i(
287
286
  "input",
@@ -297,17 +296,17 @@ const J = E.forwardRef(
297
296
  )
298
297
  );
299
298
  J.displayName = "Input";
300
- const Ln = Vt(
299
+ const Mn = $t(
301
300
  "richtext-text-sm richtext-font-medium richtext-leading-none peer-disabled:richtext-cursor-not-allowed peer-disabled:richtext-opacity-70"
302
301
  ), et = E.forwardRef(({ className: t, ...e }, r) => /* @__PURE__ */ i(
303
- Ye.Root,
302
+ qe.Root,
304
303
  {
305
304
  ref: r,
306
- className: L(Ln(), t),
305
+ className: L(Mn(), t),
307
306
  ...e
308
307
  }
309
308
  ));
310
- et.displayName = Ye.Root.displayName;
309
+ et.displayName = qe.Root.displayName;
311
310
  const mt = vt.Root, ft = vt.Trigger, ct = E.forwardRef(({ className: t, align: e = "center", sideOffset: r = 4, ...n }, a) => /* @__PURE__ */ i(vt.Portal, { children: /* @__PURE__ */ i(
312
311
  vt.Content,
313
312
  {
@@ -324,7 +323,7 @@ const mt = vt.Root, ft = vt.Trigger, ct = E.forwardRef(({ className: t, align: e
324
323
  ct.displayName = vt.Content.displayName;
325
324
  const Q = E.forwardRef(
326
325
  ({ className: t, orientation: e = "horizontal", decorative: r = !0, ...n }, a) => /* @__PURE__ */ i(
327
- De.Root,
326
+ Pe.Root,
328
327
  {
329
328
  ref: a,
330
329
  decorative: r,
@@ -338,9 +337,9 @@ const Q = E.forwardRef(
338
337
  }
339
338
  )
340
339
  );
341
- Q.displayName = De.Root.displayName;
342
- const ri = E.forwardRef(({ className: t, ...e }, r) => /* @__PURE__ */ i(
343
- Yt.Root,
340
+ Q.displayName = Pe.Root.displayName;
341
+ const ii = E.forwardRef(({ className: t, ...e }, r) => /* @__PURE__ */ i(
342
+ qt.Root,
344
343
  {
345
344
  className: L(
346
345
  "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",
@@ -349,7 +348,7 @@ const ri = E.forwardRef(({ className: t, ...e }, r) => /* @__PURE__ */ i(
349
348
  ...e,
350
349
  ref: r,
351
350
  children: /* @__PURE__ */ i(
352
- Yt.Thumb,
351
+ qt.Thumb,
353
352
  {
354
353
  className: L(
355
354
  "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"
@@ -358,8 +357,8 @@ const ri = E.forwardRef(({ className: t, ...e }, r) => /* @__PURE__ */ i(
358
357
  )
359
358
  }
360
359
  ));
361
- ri.displayName = Yt.Root.displayName;
362
- const In = X.Provider, ni = E.forwardRef(({ className: t, ...e }, r) => /* @__PURE__ */ i(
360
+ ii.displayName = qt.Root.displayName;
361
+ const Ln = X.Provider, ri = E.forwardRef(({ className: t, ...e }, r) => /* @__PURE__ */ i(
363
362
  X.Viewport,
364
363
  {
365
364
  ref: r,
@@ -370,8 +369,8 @@ const In = X.Provider, ni = E.forwardRef(({ className: t, ...e }, r) => /* @__PU
370
369
  ...e
371
370
  }
372
371
  ));
373
- ni.displayName = X.Viewport.displayName;
374
- const En = Vt(
372
+ ri.displayName = X.Viewport.displayName;
373
+ const In = $t(
375
374
  "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",
376
375
  {
377
376
  variants: {
@@ -384,16 +383,16 @@ const En = Vt(
384
383
  variant: "default"
385
384
  }
386
385
  }
387
- ), ci = E.forwardRef(({ className: t, variant: e, ...r }, n) => /* @__PURE__ */ i(
386
+ ), ni = E.forwardRef(({ className: t, variant: e, ...r }, n) => /* @__PURE__ */ i(
388
387
  X.Root,
389
388
  {
390
389
  ref: n,
391
- className: L(En({ variant: e }), t),
390
+ className: L(In({ variant: e }), t),
392
391
  ...r
393
392
  }
394
393
  ));
395
- ci.displayName = X.Root.displayName;
396
- const zn = E.forwardRef(({ className: t, ...e }, r) => /* @__PURE__ */ i(
394
+ ni.displayName = X.Root.displayName;
395
+ const En = E.forwardRef(({ className: t, ...e }, r) => /* @__PURE__ */ i(
397
396
  X.Action,
398
397
  {
399
398
  ref: r,
@@ -404,8 +403,8 @@ const zn = E.forwardRef(({ className: t, ...e }, r) => /* @__PURE__ */ i(
404
403
  ...e
405
404
  }
406
405
  ));
407
- zn.displayName = X.Action.displayName;
408
- const ai = E.forwardRef(({ className: t, ...e }, r) => /* @__PURE__ */ i(
406
+ En.displayName = X.Action.displayName;
407
+ const ci = E.forwardRef(({ className: t, ...e }, r) => /* @__PURE__ */ i(
409
408
  X.Close,
410
409
  {
411
410
  ref: r,
@@ -415,11 +414,11 @@ const ai = E.forwardRef(({ className: t, ...e }, r) => /* @__PURE__ */ i(
415
414
  ),
416
415
  "toast-close": "",
417
416
  ...e,
418
- children: /* @__PURE__ */ i(Fe, { className: "richtext-h-4 richtext-w-4" })
417
+ children: /* @__PURE__ */ i(je, { className: "richtext-h-4 richtext-w-4" })
419
418
  }
420
419
  ));
421
- ai.displayName = X.Close.displayName;
422
- const oi = E.forwardRef(({ className: t, ...e }, r) => /* @__PURE__ */ i(
420
+ ci.displayName = X.Close.displayName;
421
+ const ai = E.forwardRef(({ className: t, ...e }, r) => /* @__PURE__ */ i(
423
422
  X.Title,
424
423
  {
425
424
  ref: r,
@@ -427,8 +426,8 @@ const oi = E.forwardRef(({ className: t, ...e }, r) => /* @__PURE__ */ i(
427
426
  ...e
428
427
  }
429
428
  ));
430
- oi.displayName = X.Title.displayName;
431
- const si = E.forwardRef(({ className: t, ...e }, r) => /* @__PURE__ */ i(
429
+ ai.displayName = X.Title.displayName;
430
+ const oi = E.forwardRef(({ className: t, ...e }, r) => /* @__PURE__ */ i(
432
431
  X.Description,
433
432
  {
434
433
  ref: r,
@@ -436,8 +435,8 @@ const si = E.forwardRef(({ className: t, ...e }, r) => /* @__PURE__ */ i(
436
435
  ...e
437
436
  }
438
437
  ));
439
- si.displayName = X.Description.displayName;
440
- const Rn = Vt(
438
+ oi.displayName = X.Description.displayName;
439
+ const zn = $t(
441
440
  "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",
442
441
  {
443
442
  variants: {
@@ -456,16 +455,16 @@ const Rn = Vt(
456
455
  size: "default"
457
456
  }
458
457
  }
459
- ), li = E.forwardRef(({ className: t, variant: e, size: r, ...n }, a) => /* @__PURE__ */ i(
460
- qe.Root,
458
+ ), si = E.forwardRef(({ className: t, variant: e, size: r, ...n }, a) => /* @__PURE__ */ i(
459
+ Xe.Root,
461
460
  {
462
461
  ref: a,
463
- className: L(Rn({ variant: e, size: r, className: t })),
462
+ className: L(zn({ variant: e, size: r, className: t })),
464
463
  ...n
465
464
  }
466
465
  ));
467
- li.displayName = qe.Root.displayName;
468
- const On = yt.Provider, hi = yt.Root, di = yt.Trigger, oe = E.forwardRef(({ className: t, sideOffset: e = 4, ...r }, n) => /* @__PURE__ */ i(
466
+ si.displayName = Xe.Root.displayName;
467
+ const Rn = yt.Provider, li = yt.Root, hi = yt.Trigger, ae = E.forwardRef(({ className: t, sideOffset: e = 4, ...r }, n) => /* @__PURE__ */ i(
469
468
  yt.Content,
470
469
  {
471
470
  ref: n,
@@ -477,30 +476,30 @@ const On = yt.Provider, hi = yt.Root, di = yt.Trigger, oe = E.forwardRef(({ clas
477
476
  ...r
478
477
  }
479
478
  ));
480
- oe.displayName = yt.Content.displayName;
481
- const _n = 1, Hn = 1e6;
482
- let Kt = 0;
483
- function Pn() {
484
- return Kt = (Kt + 1) % Number.MAX_SAFE_INTEGER, Kt.toString();
485
- }
486
- const Zt = /* @__PURE__ */ new Map();
487
- function ye(t) {
488
- if (Zt.has(t))
479
+ ae.displayName = yt.Content.displayName;
480
+ const On = 1, _n = 1e6;
481
+ let Ut = 0;
482
+ function Hn() {
483
+ return Ut = (Ut + 1) % Number.MAX_SAFE_INTEGER, Ut.toString();
484
+ }
485
+ const Kt = /* @__PURE__ */ new Map();
486
+ function be(t) {
487
+ if (Kt.has(t))
489
488
  return;
490
489
  const e = setTimeout(() => {
491
- Zt.delete(t), pt({
490
+ Kt.delete(t), pt({
492
491
  type: "REMOVE_TOAST",
493
492
  toastId: t
494
493
  });
495
- }, Hn);
496
- Zt.set(t, e);
494
+ }, _n);
495
+ Kt.set(t, e);
497
496
  }
498
- function Dn(t, e) {
497
+ function Pn(t, e) {
499
498
  switch (e.type) {
500
499
  case "ADD_TOAST":
501
500
  return {
502
501
  ...t,
503
- toasts: [e.toast, ...t.toasts].slice(0, _n)
502
+ toasts: [e.toast, ...t.toasts].slice(0, On)
504
503
  };
505
504
  case "UPDATE_TOAST":
506
505
  return {
@@ -511,8 +510,8 @@ function Dn(t, e) {
511
510
  };
512
511
  case "DISMISS_TOAST": {
513
512
  const { toastId: r } = e;
514
- return r ? ye(r) : t.toasts.forEach((n) => {
515
- ye(n.id);
513
+ return r ? be(r) : t.toasts.forEach((n) => {
514
+ be(n.id);
516
515
  }), {
517
516
  ...t,
518
517
  toasts: t.toasts.map(
@@ -536,12 +535,12 @@ function Dn(t, e) {
536
535
  const Et = [];
537
536
  let zt = { toasts: [] };
538
537
  function pt(t) {
539
- zt = Dn(zt, t), Et.forEach((e) => {
538
+ zt = Pn(zt, t), Et.forEach((e) => {
540
539
  e(zt);
541
540
  });
542
541
  }
543
- function Bn({ ...t }) {
544
- const e = Pn(), r = (a) => pt({
542
+ function Dn({ ...t }) {
543
+ const e = Hn(), r = (a) => pt({
545
544
  type: "UPDATE_TOAST",
546
545
  toast: { ...a, id: e }
547
546
  }), n = () => pt({ type: "DISMISS_TOAST", toastId: e });
@@ -561,18 +560,18 @@ function Bn({ ...t }) {
561
560
  update: r
562
561
  };
563
562
  }
564
- function $n() {
563
+ function Bn() {
565
564
  const [t, e] = E.useState(zt);
566
565
  return E.useEffect(() => (Et.push(e), () => {
567
566
  const r = Et.indexOf(e);
568
567
  r > -1 && Et.splice(r, 1);
569
568
  }), [t]), {
570
569
  ...t,
571
- toast: Bn,
570
+ toast: Dn,
572
571
  dismiss: (r) => pt({ type: "DISMISS_TOAST", toastId: r })
573
572
  };
574
573
  }
575
- function Vn(t) {
574
+ function $n(t) {
576
575
  return /* @__PURE__ */ i("svg", { xmlns: "http://www.w3.org/2000/svg", width: "1em", height: "1em", viewBox: "0 0 24 24", ...t, children: /* @__PURE__ */ i(
577
576
  "path",
578
577
  {
@@ -581,7 +580,7 @@ function Vn(t) {
581
580
  }
582
581
  ) });
583
582
  }
584
- function Wn(t) {
583
+ function Vn(t) {
585
584
  return /* @__PURE__ */ i("svg", { xmlns: "http://www.w3.org/2000/svg", width: "1em", height: "1em", viewBox: "0 0 24 24", ...t, children: /* @__PURE__ */ i(
586
585
  "path",
587
586
  {
@@ -594,7 +593,7 @@ function Wn(t) {
594
593
  }
595
594
  ) });
596
595
  }
597
- function jn() {
596
+ function Wn() {
598
597
  return /* @__PURE__ */ i(
599
598
  "svg",
600
599
  {
@@ -621,7 +620,7 @@ function jn() {
621
620
  }
622
621
  );
623
622
  }
624
- function Fn() {
623
+ function jn() {
625
624
  return /* @__PURE__ */ i(
626
625
  "svg",
627
626
  {
@@ -648,7 +647,7 @@ function Fn() {
648
647
  }
649
648
  );
650
649
  }
651
- function Gn(t) {
650
+ function Fn(t) {
652
651
  return /* @__PURE__ */ i("svg", { xmlns: "http://www.w3.org/2000/svg", width: "1em", height: "1em", viewBox: "0 0 24 24", ...t, children: /* @__PURE__ */ i(
653
652
  "path",
654
653
  {
@@ -658,10 +657,10 @@ function Gn(t) {
658
657
  ) });
659
658
  }
660
659
  function G(t) {
661
- const e = ui[t.name];
660
+ const e = di[t.name];
662
661
  return e ? /* @__PURE__ */ i(e, { onClick: t == null ? void 0 : t.onClick, className: `richtext-w-4 richtext-h-4 ${(t == null ? void 0 : t.className) || ""}` }) : null;
663
662
  }
664
- function Un(t) {
663
+ function Gn(t) {
665
664
  return /* @__PURE__ */ i("svg", { xmlns: "http://www.w3.org/2000/svg", width: "1em", height: "1em", viewBox: "0 0 24 24", ...t, children: /* @__PURE__ */ i(
666
665
  "path",
667
666
  {
@@ -670,7 +669,7 @@ function Un(t) {
670
669
  }
671
670
  ) });
672
671
  }
673
- function Kn(t) {
672
+ function Un(t) {
674
673
  return /* @__PURE__ */ i(
675
674
  "svg",
676
675
  {
@@ -695,10 +694,10 @@ function Kn(t) {
695
694
  }
696
695
  );
697
696
  }
698
- function Zn(t) {
697
+ function Kn(t) {
699
698
  return /* @__PURE__ */ i("svg", { xmlns: "http://www.w3.org/2000/svg", width: "1em", height: "1em", viewBox: "0 0 24 24", ...t, children: /* @__PURE__ */ i("path", { fill: "currentColor", d: "M9 7v10h6v-2h-4V7z" }) });
700
699
  }
701
- function Xn(t) {
700
+ function Zn(t) {
702
701
  return /* @__PURE__ */ i("svg", { xmlns: "http://www.w3.org/2000/svg", width: "1em", height: "1em", viewBox: "0 0 24 24", ...t, children: /* @__PURE__ */ i(
703
702
  "path",
704
703
  {
@@ -707,7 +706,7 @@ function Xn(t) {
707
706
  }
708
707
  ) });
709
708
  }
710
- function qn(t) {
709
+ function Xn(t) {
711
710
  return /* @__PURE__ */ i("svg", { xmlns: "http://www.w3.org/2000/svg", width: "1em", height: "1em", viewBox: "0 0 24 24", ...t, children: /* @__PURE__ */ i(
712
711
  "path",
713
712
  {
@@ -716,7 +715,7 @@ function qn(t) {
716
715
  }
717
716
  ) });
718
717
  }
719
- function Yn() {
718
+ function qn() {
720
719
  return /* @__PURE__ */ i(
721
720
  "svg",
722
721
  {
@@ -737,13 +736,13 @@ function Yn() {
737
736
  }
738
737
  );
739
738
  }
740
- function Jn() {
739
+ function Yn() {
741
740
  return /* @__PURE__ */ u("svg", { xmlns: "http://www.w3.org/2000/svg", width: "1em", height: "1em", viewBox: "0 0 32 32", children: [
742
741
  /* @__PURE__ */ i("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" }),
743
742
  /* @__PURE__ */ i("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" })
744
743
  ] });
745
744
  }
746
- function Qn() {
745
+ function Jn() {
747
746
  return /* @__PURE__ */ u(
748
747
  "svg",
749
748
  {
@@ -771,31 +770,31 @@ function Qn() {
771
770
  }
772
771
  );
773
772
  }
774
- function tc() {
773
+ function Qn() {
775
774
  return /* @__PURE__ */ i("svg", { xmlns: "http://www.w3.org/2000/svg", width: "1em", height: "1em", viewBox: "0 0 24 24", children: /* @__PURE__ */ i("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" }) });
776
775
  }
777
- function ec() {
776
+ function tc() {
778
777
  return /* @__PURE__ */ i("svg", { xmlns: "http://www.w3.org/2000/svg", width: "1em", height: "1em", viewBox: "0 0 24 24", children: /* @__PURE__ */ i("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" }) });
779
778
  }
780
- function ic() {
779
+ function ec() {
781
780
  return /* @__PURE__ */ i("svg", { xmlns: "http://www.w3.org/2000/svg", width: "1em", height: "1em", viewBox: "0 0 24 24", children: /* @__PURE__ */ i("path", { fill: "currentColor", d: "M23.943 19.806a.2.2 0 0 0-.168-.034c-1.26-1.855-2.873-3.61-4.419-5.315l-.252-.284c-.001-.073-.067-.12-.134-.15l-.084-.084c-.05-.1-.169-.167-.286-.1c-.47.234-.907.585-1.327.919c-.554.434-1.109.87-1.63 1.354a5 5 0 0 0-.588.618c-.084.117-.017.217.084.267c-.37.368-.74.736-1.109 1.12a.2.2 0 0 0-.05.134c0 .05.033.1.067.117l.655.502v.016c.924.92 2.554 2.173 4.285 3.527c.251.201.52.402.773.602c.117.134.234.285.335.418c.05.066.169.084.236.033c.033.034.084.067.118.1a.24.24 0 0 0 .1.034a.15.15 0 0 0 .135-.066a.24.24 0 0 0 .033-.1c.017 0 .017.016.034.016a.2.2 0 0 0 .134-.05l3.058-3.327c.12-.116.014-.267 0-.267m-7.628-.134l-1.546-1.17l-.15-.1c-.035-.017-.068-.05-.102-.067l-.117-.1c.66-.66 1.33-1.308 2-1.956c-.488.484-1.463 1.906-1.261 2.373c.002 0 .018.042.067.084zm4.1 3.126l-1.277-.97a27 27 0 0 0-1.58-1.504c.69.518 1.277.97 1.361 1.053c.673.585.638.485 1.093.87l.554.4c-.074.103-.151.148-.151.151m.336.25l-.034-.016a1 1 0 0 0 .152-.117zM.588 3.476c.033.217.084.435.117.636c.201 1.103.403 2.106.772 2.858l.152.568c.05.217.134.485.219.552a67 67 0 0 0 3.578 2.942a.18.18 0 0 0 .219 0s0 .016.016.016a.15.15 0 0 0 .118.05a.2.2 0 0 0 .134-.05c1.798-1.989 3.142-3.627 4.1-4.998c.068-.066.084-.167.084-.25c.067-.067.118-.151.185-.201c.067-.067.067-.184 0-.235l-.017-.016c0-.033-.017-.084-.05-.1c-.42-.401-.722-.685-1.042-.986a94 94 0 0 1-2.352-2.273c-.017-.017-.034-.034-.067-.034c-.336-.117-1.025-.234-1.882-.385c-1.277-.216-3.008-.517-4.57-.986c0 0-.101 0-.118.017l-.05.05C.05.714.022.707 0 .718c.017.1.017.167.05.284c0 .033.068.301.068.334zm7.19 4.78l-.033.034a.036.036 0 0 1 .033-.034M6.553 2.238c.101.1.521.502.622.585c-.437-.2-1.529-.702-2.034-.869c.505.1 1.194.201 1.412.284M.79 1.403c.252.434.454 1.939.655 3.41c-.118-.469-.201-.936-.302-1.372C.992 2.673.84 1.988.638 1.386c.124 0 .152.021.152.017m-.286-.369c0-.016 0-.033-.017-.033c.085 0 .135.017.202.05c0 .006-.145-.017-.185-.017m23.17-.217c.017-.066-.336-.367-.219-.384c.253-.017.253-.401 0-.401c-.335.017-.688.1-1.008.15c-.587.117-1.192.234-1.78.367a80 80 0 0 0-3.949.937c-.403.117-.857.2-1.243.401c-.135.067-.118.2-.05.284c-.034.017-.051.017-.085.034c-.117.017-.218.034-.335.05c-.102.017-.152.1-.135.2c0 .017.017.05.017.067c-.706.936-1.496 1.923-2.353 2.976c-.84.969-1.73 1.989-2.62 3.042c-2.84 3.31-6.05 7.07-9.594 10.38a.16.16 0 0 0 0 .234c.016.016.033.033.05.033c-.05.05-.101.085-.152.134q-.05.05-.05.1a.4.4 0 0 0-.067.084c-.067.067-.067.184.017.234c.067.066.185.066.235-.017c.017-.017.017-.033.033-.033a.265.265 0 0 1 .37 0c.202.217.404.435.588.618l-.42-.35c-.067-.067-.184-.05-.234.016c-.068.066-.051.184.016.234l4.469 3.727c.034.034.067.034.118.034a.15.15 0 0 0 .117-.05l.101-.1c.017.016.05.016.067.016c.05 0 .084-.016.118-.05c6.049-6.05 10.922-10.614 16.5-14.693c.05-.033.067-.1.067-.15c.067 0 .118-.05.15-.117c1.026-3.125 1.228-5.9 1.295-7.27c0-.059.016-.038.016-.068c.017-.033.017-.05.017-.05a.98.98 0 0 0-.067-.619m-10.82 4.915c.268-.301.537-.619.806-.903c-1.73 2.273-4.603 5.767-8.67 9.929c2.773-3.059 5.562-6.218 7.864-9.026M5.14 23.466c-.016-.017-.016-.017 0-.017zm2.504-2.156c.135-.15.27-.284.42-.434c0 0 0 .016.017.016c-.224.198-.433.418-.437.418m.69-.668c.099-.1.14-.173.284-.318c.992-1.02 2.017-2.04 3.059-3.076l.016-.016c.252-.2.555-.418.824-.619a228 228 0 0 0-4.184 4.029M14.852 3.91c-.554.719-1.176 1.671-1.697 2.423c-1.646 2.374-6.94 8.174-7.057 8.274a1190 1190 0 0 1-4.839 4.597l-.1.1c-.085-.1-.085-.25.016-.334C8.652 11.966 13.19 6.133 15.021 3.576c-.05.116-.084.216-.168.334zm2.906 3.427c-.671-.386-.99-.987-.806-1.572l.05-.2a.8.8 0 0 1 .085-.167a1.9 1.9 0 0 1 .756-.703c.016 0 .033 0 .05-.016c-.017-.034-.017-.084-.017-.134c.017-.1.085-.167.202-.167c.202 0 .824.184 1.059.384c.067.05.134.117.202.184c.084.1.218.268.285.401c.034.017.067.184.118.268c.033.134.067.284.05.418c-.017.016 0 .116-.017.116a1.6 1.6 0 0 1-.218.619c-.03.03.006.012-.05.067a1.2 1.2 0 0 1-.32.334a1.49 1.49 0 0 1-1.26.234a2 2 0 0 0-.169-.066m4.37 1.403c0 .017-.017.05 0 .067c-.034 0-.05.017-.085.034a110 110 0 0 0-3.915 3.025c1.11-.986 2.218-1.989 3.378-2.975c.336-.301.571-.686.638-1.12l.168-1.003v-.033c.085-.201.404-.118.353.1c-.004-.001-.173.795-.537 1.905" }) });
782
781
  }
783
- function rc() {
782
+ function ic() {
784
783
  return /* @__PURE__ */ i("svg", { xmlns: "http://www.w3.org/2000/svg", width: "1em", height: "1em", viewBox: "0 0 24 24", children: /* @__PURE__ */ i("path", { fill: "none", stroke: "currentColor", strokeLinecap: "round", strokeLinejoin: "round", strokeWidth: "2", d: "M12 21v-4m0-4V9m0-4V3m-2 18h4M8 5v4h11l2-2l-2-2zm6 8v4H6l-2-2l2-2z" }) });
785
784
  }
786
- function nc() {
785
+ function rc() {
787
786
  return /* @__PURE__ */ i("svg", { xmlns: "http://www.w3.org/2000/svg", width: "1em", height: "1em", viewBox: "0 0 20 20", children: /* @__PURE__ */ i("path", { fill: "currentColor", d: "M6.5 3a.75.75 0 0 1 .697.471l3 7.5a.75.75 0 0 1-1.393.557L7.992 9.5H5.008l-.811 2.028a.75.75 0 0 1-1.393-.556l3-7.5A.75.75 0 0 1 6.5 3m0 2.77L5.608 8h1.784zm8.28-1.55a.75.75 0 1 0-1.06 1.06l.72.72h-3.69a.75.75 0 0 0 0 1.5h3.69l-.72.72a.75.75 0 0 0 1.06 1.06l2-2a.75.75 0 0 0 0-1.06zm0 7.5a.75.75 0 1 0-1.06 1.06l.72.72H3.75a.75.75 0 0 0 0 1.5h10.69l-.72.72a.75.75 0 1 0 1.06 1.06l2-2a.75.75 0 0 0 0-1.06z" }) });
788
787
  }
789
- function cc() {
788
+ function nc() {
790
789
  return /* @__PURE__ */ i("svg", { xmlns: "http://www.w3.org/2000/svg", width: "1em", height: "1em", viewBox: "0 0 20 20", children: /* @__PURE__ */ i("path", { fill: "currentColor", d: "M13.5 3a.75.75 0 0 0-.697.471l-3 7.5a.75.75 0 0 0 1.393.557l.812-2.028h2.984l.811 2.028a.75.75 0 0 0 1.393-.556l-3-7.5A.75.75 0 0 0 13.5 3m0 2.77L14.392 8h-1.784zM5.22 4.22a.75.75 0 0 1 1.06 1.06L5.56 6h3.69a.75.75 0 0 1 0 1.5H5.56l.72.72a.75.75 0 0 1-1.06 1.06l-2-2a.75.75 0 0 1 0-1.06zm0 7.5a.75.75 0 0 1 1.06 1.06l-.72.72h10.69a.75.75 0 0 1 0 1.5H5.56l.72.72a.75.75 0 1 1-1.06 1.06l-2-2a.75.75 0 0 1 0-1.06z" }) });
791
790
  }
792
- function ac() {
791
+ function cc() {
793
792
  return /* @__PURE__ */ i("svg", { xmlns: "http://www.w3.org/2000/svg", width: "1em", height: "1em", viewBox: "0 0 24 24", children: /* @__PURE__ */ u("g", { fill: "none", stroke: "currentColor", strokeLinecap: "round", strokeLinejoin: "round", strokeWidth: "1.5", color: "currentColor", children: [
794
793
  /* @__PURE__ */ i("path", { d: "M14.86 22h-4.312c-3.291 0-4.937 0-6.08-.798a4.2 4.2 0 0 1-.863-.805c-.855-1.066-.855-2.6-.855-5.67v-2.545c0-2.963 0-4.445.473-5.628c.761-1.903 2.37-3.403 4.41-4.113C8.9 2 10.49 2 13.667 2c1.816 0 2.723 0 3.448.252c1.166.406 2.085 1.263 2.52 2.35c.27.676.27 1.523.27 3.216V10" }),
795
794
  /* @__PURE__ */ i("path", { d: "M2.75 12c0-1.84 1.506-3.333 3.364-3.333c.672 0 1.464.116 2.117-.057a1.67 1.67 0 0 0 1.19-1.179c.174-.647.057-1.432.057-2.098C9.478 3.493 10.984 2 12.84 2m.002 16h2.523m-4.949-4.15c-.126-.8-.281-.801-1.61-.85h-1.01c-.557 0-1.009.448-1.009 1v3c0 .552.452 1 1.01 1h1.816c.39 0 .803-.313.803-.7v-1.1c0-.11-.113-.304-.224-.304H9.068M12.842 13h1.261m0 0h1.262m-1.262 0v4.875M21.251 13h-2.523c-.557 0-1.009.448-1.009 1v1.5m0 0V18m0-2.5h2.523" })
796
795
  ] }) });
797
796
  }
798
- function oc() {
797
+ function ac() {
799
798
  return /* @__PURE__ */ i("svg", { xmlns: "http://www.w3.org/2000/svg", width: "1em", height: "1em", viewBox: "0 0 48 48", children: /* @__PURE__ */ u("g", { fill: "none", stroke: "currentColor", strokeWidth: "4", children: [
800
799
  /* @__PURE__ */ i("circle", { cx: "10", cy: "24", r: "4" }),
801
800
  /* @__PURE__ */ i("circle", { cx: "38", cy: "10", r: "4" }),
@@ -804,110 +803,110 @@ function oc() {
804
803
  /* @__PURE__ */ i("path", { strokeLinecap: "round", strokeLinejoin: "round", d: "M34 38H22V10h12M14 24h20" })
805
804
  ] }) });
806
805
  }
807
- function sc() {
806
+ function oc() {
808
807
  return /* @__PURE__ */ i("svg", { xmlns: "http://www.w3.org/2000/svg", width: "1em", height: "1em", viewBox: "0 0 24 24", children: /* @__PURE__ */ i("path", { fill: "none", stroke: "currentColor", strokeLinecap: "round", strokeLinejoin: "round", strokeWidth: "1.5", d: "m3 21l7.548-7.548M21 3l-7.548 7.548m0 0L8 3H3l7.548 10.452m2.904-2.904L21 21h-5l-5.452-7.548", color: "currentColor" }) });
809
808
  }
810
- const ui = {
811
- Bold: on,
812
- LoaderCircle: an,
813
- Italic: cn,
814
- Underline: nn,
815
- Quote: rn,
816
- TextQuote: Wn,
817
- Strikethrough: en,
818
- Minus: tn,
819
- Eraser: Qr,
820
- PaintRoller: Jr,
821
- Redo2: Yr,
822
- Undo2: qr,
823
- AlignCenter: dn,
824
- AlignJustify: hn,
825
- AlignLeft: ln,
826
- AlignRight: sn,
827
- ChevronDown: Xr,
828
- Subscript: Zr,
829
- Superscript: Kr,
830
- Code: Ur,
831
- Code2: Gr,
832
- Type: Fr,
833
- IndentIncrease: jr,
834
- IndentDecrease: Wr,
835
- List: Vr,
836
- ListOrdered: $r,
837
- ListTodo: Br,
838
- Link: Dr,
839
- ImageUp: Pr,
840
- Video: Hr,
841
- Maximize: _r,
842
- Minimize: Or,
843
- Table: Rr,
844
- Sparkles: zr,
845
- Pencil: Ke,
846
- Unlink: Er,
847
- BetweenHorizonalEnd: Ir,
848
- BetweenHorizonalStart: Lr,
849
- BetweenVerticalStart: Mr,
850
- BetweenVerticalEnd: Ar,
851
- TableCellsMerge: Sr,
852
- TableCellsSplit: kr,
853
- Trash2: Ue,
854
- Trash: Tr,
855
- Replace: pe,
856
- ChevronsUpDown: Nr,
857
- LineHeight: Un,
858
- Word: Gn,
859
- Heading1: Cr,
860
- Heading2: yr,
861
- Heading3: br,
862
- Heading4: vr,
863
- Heading5: wr,
864
- Heading6: pr,
865
- Columns2: we,
866
- Columns3: gr,
867
- Columns4: fr,
868
- Plus: Ge,
869
- Grip: mr,
870
- Copy: xr,
871
- Clipboard: ur,
872
- PanelLeft: dr,
873
- PanelRight: hr,
874
- Columns: we,
875
- Iframe: lr,
876
- MenuDown: Kn,
877
- SizeS: qn,
878
- SizeM: Xn,
879
- SizeL: Zn,
880
- AspectRatio: Vn,
881
- Emoji: sr,
882
- DeleteColumn: jn,
883
- DeleteRow: Fn,
884
- SearchAndReplace: pe,
885
- EmojiIcon: or,
886
- KatexIcon: ar,
887
- ExportPdf: Jn,
888
- ExportWord: Qn,
889
- ImportWord: Yn,
890
- ColumnAddLeft: tc,
891
- ColumnAddRight: ec,
892
- BookMarked: cr,
893
- Excalidraw: ic,
894
- ZoomIn: nr,
895
- ZoomOut: rr,
896
- Settings: ir,
897
- Eye: er,
898
- TextDirection: rc,
899
- LeftToRight: nc,
900
- RightToLeft: cc,
901
- Attachment: tr,
902
- GifIcon: ac,
903
- ChevronUp: Qi,
904
- Crop: Ji,
905
- Mermaid: oc,
906
- Twitter: sc,
907
- FlipX: Yi,
908
- FlipY: qi
809
+ const di = {
810
+ Bold: an,
811
+ LoaderCircle: cn,
812
+ Italic: nn,
813
+ Underline: rn,
814
+ Quote: en,
815
+ TextQuote: Vn,
816
+ Strikethrough: tn,
817
+ Minus: Qr,
818
+ Eraser: Jr,
819
+ PaintRoller: Yr,
820
+ Redo2: qr,
821
+ Undo2: Xr,
822
+ AlignCenter: hn,
823
+ AlignJustify: ln,
824
+ AlignLeft: sn,
825
+ AlignRight: on,
826
+ ChevronDown: Zr,
827
+ Subscript: Kr,
828
+ Superscript: Ur,
829
+ Code: Gr,
830
+ Code2: Fr,
831
+ Type: jr,
832
+ IndentIncrease: Wr,
833
+ IndentDecrease: Vr,
834
+ List: $r,
835
+ ListOrdered: Br,
836
+ ListTodo: Dr,
837
+ Link: Pr,
838
+ ImageUp: Hr,
839
+ Video: _r,
840
+ Maximize: Or,
841
+ Minimize: Rr,
842
+ Table: zr,
843
+ Sparkles: Er,
844
+ Pencil: Ue,
845
+ Unlink: Ir,
846
+ BetweenHorizonalEnd: Lr,
847
+ BetweenHorizonalStart: Mr,
848
+ BetweenVerticalStart: Ar,
849
+ BetweenVerticalEnd: Sr,
850
+ TableCellsMerge: kr,
851
+ TableCellsSplit: Tr,
852
+ Trash2: Ge,
853
+ Trash: Nr,
854
+ Replace: ge,
855
+ ChevronsUpDown: Cr,
856
+ LineHeight: Gn,
857
+ Word: Fn,
858
+ Heading1: yr,
859
+ Heading2: br,
860
+ Heading3: vr,
861
+ Heading4: wr,
862
+ Heading5: pr,
863
+ Heading6: gr,
864
+ Columns2: pe,
865
+ Columns3: fr,
866
+ Columns4: mr,
867
+ Plus: Fe,
868
+ Grip: xr,
869
+ Copy: ur,
870
+ Clipboard: dr,
871
+ PanelLeft: hr,
872
+ PanelRight: lr,
873
+ Columns: pe,
874
+ Iframe: sr,
875
+ MenuDown: Un,
876
+ SizeS: Xn,
877
+ SizeM: Zn,
878
+ SizeL: Kn,
879
+ AspectRatio: $n,
880
+ Emoji: or,
881
+ DeleteColumn: Wn,
882
+ DeleteRow: jn,
883
+ SearchAndReplace: ge,
884
+ EmojiIcon: ar,
885
+ KatexIcon: cr,
886
+ ExportPdf: Yn,
887
+ ExportWord: Jn,
888
+ ImportWord: qn,
889
+ ColumnAddLeft: Qn,
890
+ ColumnAddRight: tc,
891
+ BookMarked: nr,
892
+ Excalidraw: ec,
893
+ ZoomIn: rr,
894
+ ZoomOut: ir,
895
+ Settings: er,
896
+ Eye: tr,
897
+ TextDirection: ic,
898
+ LeftToRight: rc,
899
+ RightToLeft: nc,
900
+ Attachment: Qi,
901
+ GifIcon: cc,
902
+ ChevronUp: Ji,
903
+ Crop: Yi,
904
+ Mermaid: ac,
905
+ Twitter: oc,
906
+ FlipX: qi,
907
+ FlipY: Xi
909
908
  };
910
- function lc({ fill: t }) {
909
+ function sc({ fill: t }) {
911
910
  return /* @__PURE__ */ i(
912
911
  "svg",
913
912
  {
@@ -959,7 +958,7 @@ function lc({ fill: t }) {
959
958
  }
960
959
  );
961
960
  }
962
- function hc(t) {
961
+ function lc(t) {
963
962
  const [e, r] = w(void 0);
964
963
  function n(o) {
965
964
  var s;
@@ -970,7 +969,7 @@ function hc(t) {
970
969
  (o = t.action) == null || o.call(t, e);
971
970
  }
972
971
  const c = C(
973
- Ve((o) => {
972
+ $e((o) => {
974
973
  r(o);
975
974
  }, 350),
976
975
  []
@@ -984,11 +983,11 @@ function hc(t) {
984
983
  action: a,
985
984
  tooltipOptions: t == null ? void 0 : t.tooltipOptions,
986
985
  shortcutKeys: t == null ? void 0 : t.shortcutKeys,
987
- children: /* @__PURE__ */ i("span", { className: "richtext-flex richtext-items-center richtext-justify-center richtext-text-sm", children: /* @__PURE__ */ i(lc, { fill: e }) })
986
+ children: /* @__PURE__ */ i("span", { className: "richtext-flex richtext-items-center richtext-justify-center richtext-text-sm", children: /* @__PURE__ */ i(sc, { fill: e }) })
988
987
  }
989
988
  ),
990
989
  /* @__PURE__ */ i(
991
- ua,
990
+ da,
992
991
  {
993
992
  selectedColor: e,
994
993
  setSelectedColor: c,
@@ -1000,7 +999,7 @@ function hc(t) {
1000
999
  )
1001
1000
  ] });
1002
1001
  }
1003
- function dc(t) {
1002
+ function hc(t) {
1004
1003
  const { t: e } = V(), [r, n] = w({
1005
1004
  text: "",
1006
1005
  link: ""
@@ -1059,7 +1058,7 @@ function dc(t) {
1059
1058
  /* @__PURE__ */ u("div", { className: "richtext-flex richtext-items-center richtext-space-x-2", children: [
1060
1059
  /* @__PURE__ */ i(et, { children: e("editor.link.dialog.openInNewTab") }),
1061
1060
  /* @__PURE__ */ i(
1062
- ri,
1061
+ ii,
1063
1062
  {
1064
1063
  checked: a,
1065
1064
  onCheckedChange: (s) => {
@@ -1080,10 +1079,10 @@ function dc(t) {
1080
1079
  }
1081
1080
  ) });
1082
1081
  }
1083
- function uc(t, e, r = null) {
1082
+ function dc(t, e, r = null) {
1084
1083
  return r ? t.createChecked({ index: e }, r) : t.createAndFill({ index: e });
1085
1084
  }
1086
- function xc(t) {
1085
+ function uc(t) {
1087
1086
  if (t.cached.columnsNodeTypes)
1088
1087
  return t.cached.columnsNodeTypes;
1089
1088
  const e = {
@@ -1092,20 +1091,20 @@ function xc(t) {
1092
1091
  };
1093
1092
  return t.cached.columnsNodeTypes = e, e;
1094
1093
  }
1095
- function mc(t, e, r = null) {
1096
- const n = xc(t), a = [];
1094
+ function xc(t, e, r = null) {
1095
+ const n = uc(t), a = [];
1097
1096
  for (let c = 0; c < e; c += 1) {
1098
- const o = uc(n.column, c, r);
1097
+ const o = dc(n.column, c, r);
1099
1098
  o && a.push(o);
1100
1099
  }
1101
1100
  return n.columns.createChecked({ cols: e }, a);
1102
1101
  }
1103
- function Xt({
1102
+ function Zt({
1104
1103
  state: t,
1105
1104
  dispatch: e,
1106
1105
  type: r
1107
1106
  }) {
1108
- const n = Rt((c) => c.type.name === $t.name)(t.selection), a = Rt((c) => c.type.name === xi.name)(t.selection);
1107
+ const n = Rt((c) => c.type.name === Bt.name)(t.selection), a = Rt((c) => c.type.name === ui.name)(t.selection);
1109
1108
  if (e && n && a) {
1110
1109
  const c = n.node, o = a.node.attrs.index, s = c.toJSON();
1111
1110
  let l = o;
@@ -1122,7 +1121,7 @@ function Xt({
1122
1121
  })), s.attrs.cols = s.content.length, s.content.forEach((m, f) => {
1123
1122
  m.attrs.index = f;
1124
1123
  });
1125
- const h = $i.fromJSON(t.schema, s);
1124
+ const h = Bi.fromJSON(t.schema, s);
1126
1125
  let d = n.pos;
1127
1126
  h.content.forEach((m, f, p) => {
1128
1127
  p < l && (d += m.nodeSize);
@@ -1134,8 +1133,8 @@ function Xt({
1134
1133
  }
1135
1134
  return !0;
1136
1135
  }
1137
- function Ce({ state: t, dispatch: e, type: r }) {
1138
- const n = Rt((c) => c.type.name === $t.name)(t.selection), a = Rt((c) => c.type.name === xi.name)(t.selection);
1136
+ function ye({ state: t, dispatch: e, type: r }) {
1137
+ const n = Rt((c) => c.type.name === Bt.name)(t.selection), a = Rt((c) => c.type.name === ui.name)(t.selection);
1139
1138
  if (e && n && a) {
1140
1139
  const c = n.node, o = a.node.attrs.index;
1141
1140
  let s = 0;
@@ -1149,14 +1148,14 @@ function Ce({ state: t, dispatch: e, type: r }) {
1149
1148
  }
1150
1149
  return !1;
1151
1150
  }
1152
- const fc = 200, $t = dt.create({
1151
+ const mc = 200, Bt = dt.create({
1153
1152
  name: "columns",
1154
1153
  group: "block",
1155
1154
  defining: !0,
1156
1155
  isolating: !0,
1157
1156
  allowGapCursor: !1,
1158
1157
  content: "column{1,}",
1159
- priority: fc,
1158
+ priority: mc,
1160
1159
  addOptions() {
1161
1160
  return {
1162
1161
  HTMLAttributes: {
@@ -1185,34 +1184,34 @@ const fc = 200, $t = dt.create({
1185
1184
  addCommands() {
1186
1185
  return {
1187
1186
  insertColumns: (t) => ({ tr: e, dispatch: r, editor: n }) => {
1188
- const a = mc(n.schema, t && t.cols || 3);
1187
+ const a = xc(n.schema, t && t.cols || 3);
1189
1188
  if (r) {
1190
1189
  const c = e.selection.anchor + 1;
1191
1190
  e.replaceSelectionWith(a).scrollIntoView().setSelection(bt.near(e.doc.resolve(c)));
1192
1191
  }
1193
1192
  return !0;
1194
1193
  },
1195
- addColBefore: () => ({ dispatch: t, state: e }) => Xt({ dispatch: t, state: e, type: "addBefore" }),
1196
- addColAfter: () => ({ dispatch: t, state: e }) => Xt({ dispatch: t, state: e, type: "addAfter" }),
1197
- deleteCol: () => ({ dispatch: t, state: e }) => Xt({ dispatch: t, state: e, type: "delete" })
1194
+ addColBefore: () => ({ dispatch: t, state: e }) => Zt({ dispatch: t, state: e, type: "addBefore" }),
1195
+ addColAfter: () => ({ dispatch: t, state: e }) => Zt({ dispatch: t, state: e, type: "addAfter" }),
1196
+ deleteCol: () => ({ dispatch: t, state: e }) => Zt({ dispatch: t, state: e, type: "delete" })
1198
1197
  };
1199
1198
  },
1200
1199
  addKeyboardShortcuts() {
1201
1200
  return {
1202
1201
  "Mod-Alt-G": () => this.editor.commands.insertColumns(),
1203
- Tab: () => Ce({
1202
+ Tab: () => ye({
1204
1203
  state: this.editor.state,
1205
1204
  dispatch: this.editor.view.dispatch,
1206
1205
  type: "after"
1207
1206
  }),
1208
- "Shift-Tab": () => Ce({
1207
+ "Shift-Tab": () => ye({
1209
1208
  state: this.editor.state,
1210
1209
  dispatch: this.editor.view.dispatch,
1211
1210
  type: "before"
1212
1211
  })
1213
1212
  };
1214
1213
  }
1215
- }), xi = dt.create({
1214
+ }), ui = dt.create({
1216
1215
  name: "column",
1217
1216
  content: "block+",
1218
1217
  isolating: !0,
@@ -1242,27 +1241,27 @@ const fc = 200, $t = dt.create({
1242
1241
  return ["div", it(this.options.HTMLAttributes, t), 0];
1243
1242
  }
1244
1243
  });
1245
- var te = /* @__PURE__ */ ((t) => (t[t.max = 7] = "max", t[t.min = 0] = "min", t[t.more = 1] = "more", t[t.less = -1] = "less", t))(te || {});
1246
- function gc(t, e, r) {
1244
+ var Qt = /* @__PURE__ */ ((t) => (t[t.max = 7] = "max", t[t.min = 0] = "min", t[t.more = 1] = "more", t[t.less = -1] = "less", t))(Qt || {});
1245
+ function fc(t, e, r) {
1247
1246
  return t < e ? e : t > r ? r : t;
1248
1247
  }
1249
- function pc(t, e, r, n) {
1248
+ function gc(t, e, r, n) {
1250
1249
  const { doc: a, selection: c } = t;
1251
- if (!a || !c || !(c instanceof bt || c instanceof Vi))
1250
+ if (!a || !c || !(c instanceof bt || c instanceof $i))
1252
1251
  return t;
1253
1252
  const { from: o, to: s } = c;
1254
1253
  return a.nodesBetween(o, s, (l, h) => {
1255
1254
  const d = l.type;
1256
- return r.includes(d.name) ? (t = ee(t, h, e), !1) : !Mi(l.type.name, n.extensionManager.extensions);
1255
+ return r.includes(d.name) ? (t = te(t, h, e), !1) : !Ai(l.type.name, n.extensionManager.extensions);
1257
1256
  }), t;
1258
1257
  }
1259
- function ee(t, e, r) {
1258
+ function te(t, e, r) {
1260
1259
  if (!t.doc)
1261
1260
  return t;
1262
1261
  const n = t.doc.nodeAt(e);
1263
1262
  if (!n)
1264
1263
  return t;
1265
- const o = gc((n.attrs.indent || 0) + r, 0, 7);
1264
+ const o = fc((n.attrs.indent || 0) + r, 0, 7);
1266
1265
  if (o === n.attrs.indent)
1267
1266
  return t;
1268
1267
  const s = {
@@ -1271,14 +1270,14 @@ function ee(t, e, r) {
1271
1270
  };
1272
1271
  return t.setNodeMarkup(e, n.type, s, n.marks);
1273
1272
  }
1274
- function mo({ delta: t, types: e }) {
1273
+ function uo({ delta: t, types: e }) {
1275
1274
  return ({ state: r, dispatch: n, editor: a }) => {
1276
1275
  const { selection: c } = r;
1277
1276
  let { tr: o } = r;
1278
- return o = o.setSelection(c), o = pc(o, t, e, a), o.docChanged ? (n && n(o), !0) : !1;
1277
+ return o = o.setSelection(c), o = gc(o, t, e, a), o.docChanged ? (n && n(o), !0) : !1;
1279
1278
  };
1280
1279
  }
1281
- const jt = q.Root, Ft = q.Trigger, wc = q.Portal, mi = E.forwardRef(({ className: t, ...e }, r) => /* @__PURE__ */ i(
1280
+ const Wt = q.Root, jt = q.Trigger, pc = q.Portal, xi = E.forwardRef(({ className: t, ...e }, r) => /* @__PURE__ */ i(
1282
1281
  q.Overlay,
1283
1282
  {
1284
1283
  ref: r,
@@ -1289,9 +1288,9 @@ const jt = q.Root, Ft = q.Trigger, wc = q.Portal, mi = E.forwardRef(({ className
1289
1288
  ...e
1290
1289
  }
1291
1290
  ));
1292
- mi.displayName = q.Overlay.displayName;
1293
- const Nt = E.forwardRef(({ className: t, children: e, ...r }, n) => /* @__PURE__ */ u(wc, { children: [
1294
- /* @__PURE__ */ i(mi, {}),
1291
+ xi.displayName = q.Overlay.displayName;
1292
+ const Nt = E.forwardRef(({ className: t, children: e, ...r }, n) => /* @__PURE__ */ u(pc, { children: [
1293
+ /* @__PURE__ */ i(xi, {}),
1295
1294
  /* @__PURE__ */ u(
1296
1295
  q.Content,
1297
1296
  {
@@ -1304,7 +1303,7 @@ const Nt = E.forwardRef(({ className: t, children: e, ...r }, n) => /* @__PURE__
1304
1303
  children: [
1305
1304
  e,
1306
1305
  /* @__PURE__ */ u(q.Close, { className: "richtext-absolute richtext-right-4 richtext-top-4 richtext-rounded-sm richtext-opacity-70 richtext-ring-offset-background richtext-transition-opacity hover:richtext-opacity-100 focus:richtext-outline-none focus:richtext-ring-2 focus:richtext-ring-ring focus:richtext-ring-offset-2 disabled:richtext-pointer-events-none data-[state=open]:richtext-bg-accent data-[state=open]:richtext-text-muted-foreground", children: [
1307
- /* @__PURE__ */ i(Fe, { className: "richtext-h-4 richtext-w-4" }),
1306
+ /* @__PURE__ */ i(je, { className: "richtext-h-4 richtext-w-4" }),
1308
1307
  /* @__PURE__ */ i("span", { className: "richtext-sr-only", children: "Close" })
1309
1308
  ] })
1310
1309
  ]
@@ -1312,7 +1311,7 @@ const Nt = E.forwardRef(({ className: t, children: e, ...r }, n) => /* @__PURE__
1312
1311
  )
1313
1312
  ] }));
1314
1313
  Nt.displayName = q.Content.displayName;
1315
- function fi({
1314
+ function mi({
1316
1315
  className: t,
1317
1316
  ...e
1318
1317
  }) {
@@ -1327,7 +1326,7 @@ function fi({
1327
1326
  }
1328
1327
  );
1329
1328
  }
1330
- fi.displayName = "DialogHeader";
1329
+ mi.displayName = "DialogHeader";
1331
1330
  function Tt({
1332
1331
  className: t,
1333
1332
  ...e
@@ -1356,7 +1355,7 @@ const kt = E.forwardRef(({ className: t, ...e }, r) => /* @__PURE__ */ i(
1356
1355
  }
1357
1356
  ));
1358
1357
  kt.displayName = q.Title.displayName;
1359
- const vc = E.forwardRef(({ className: t, ...e }, r) => /* @__PURE__ */ i(
1358
+ const wc = E.forwardRef(({ className: t, ...e }, r) => /* @__PURE__ */ i(
1360
1359
  q.Description,
1361
1360
  {
1362
1361
  ref: r,
@@ -1364,20 +1363,20 @@ const vc = E.forwardRef(({ className: t, ...e }, r) => /* @__PURE__ */ i(
1364
1363
  ...e
1365
1364
  }
1366
1365
  ));
1367
- vc.displayName = q.Description.displayName;
1368
- function fo(t) {
1366
+ wc.displayName = q.Description.displayName;
1367
+ function xo(t) {
1369
1368
  return t.replace(/^.*\/|\..+$/g, "");
1370
1369
  }
1371
- function go(t) {
1370
+ function mo(t) {
1372
1371
  return t.split(".").pop();
1373
1372
  }
1374
- function po(t) {
1373
+ function fo(t) {
1375
1374
  return t < 1024 ? `${t} Byte` : t < 1024 * 1024 ? `${(t / 1024).toFixed(2)} KB` : `${(t / 1024 / 1024).toFixed(2)} MB`;
1376
1375
  }
1377
- function wo(t) {
1376
+ function go(t) {
1378
1377
  return t ? t === "application/pdf" ? "pdf" : t.startsWith("application/") && [".document", "word"].some((e) => t.includes(e)) ? "word" : t.startsWith("application/") && ["presentation"].some((e) => t.includes(e)) ? "excel" : t.startsWith("application/") && ["sheet"].some((e) => t.includes(e)) ? "ppt" : t.startsWith("image") ? "image" : t.startsWith("audio") ? "audio" : t.startsWith("video") ? "video" : "file" : "file";
1379
1378
  }
1380
- function vo(t) {
1379
+ function po(t) {
1381
1380
  return new Promise((e) => {
1382
1381
  const r = new FileReader();
1383
1382
  r.addEventListener(
@@ -1392,7 +1391,7 @@ function vo(t) {
1392
1391
  ), r.readAsDataURL(t);
1393
1392
  });
1394
1393
  }
1395
- function gi(t, e) {
1394
+ function fi(t, e) {
1396
1395
  const r = t.split(","), n = r[0].match(/:(.*?);/)[1], a = atob(r[r.length - 1]);
1397
1396
  let c = a.length;
1398
1397
  const o = new Uint8Array(c);
@@ -1400,12 +1399,12 @@ function gi(t, e) {
1400
1399
  o[c] = a.charCodeAt(c);
1401
1400
  return new File([o], e, { type: n });
1402
1401
  }
1403
- const bc = "_wrap_5y04w_1", yc = "_innerWrap_5y04w_15", Ne = {
1404
- wrap: bc,
1405
- innerWrap: yc
1402
+ const vc = "_wrap_5y04w_1", bc = "_innerWrap_5y04w_15", Ce = {
1403
+ wrap: vc,
1404
+ innerWrap: bc
1406
1405
  };
1407
- function Cc({ editor: t, node: e, updateAttributes: r }) {
1408
- const n = gn(), { url: a, width: c, height: o } = e.attrs, [s, l] = w("");
1406
+ function yc({ editor: t, node: e, updateAttributes: r }) {
1407
+ const n = fn(), { url: a, width: c, height: o } = e.attrs, [s, l] = w("");
1409
1408
  function h() {
1410
1409
  s && t.chain().updateAttributes(ot.name, {
1411
1410
  url: s
@@ -1440,7 +1439,7 @@ function Cc({ editor: t, node: e, updateAttributes: r }) {
1440
1439
  )
1441
1440
  ] }),
1442
1441
  a && /* @__PURE__ */ i(
1443
- Je,
1442
+ Ye,
1444
1443
  {
1445
1444
  size: { width: Number.parseInt(c), height: Number.parseInt(o) },
1446
1445
  onResizeStop: (x, m, f, p) => {
@@ -1449,10 +1448,10 @@ function Cc({ editor: t, node: e, updateAttributes: r }) {
1449
1448
  height: Number.parseInt(o) + p.height
1450
1449
  });
1451
1450
  },
1452
- children: /* @__PURE__ */ i("div", { className: Pt(Ne.wrap, "render-wrapper"), children: /* @__PURE__ */ i(
1451
+ children: /* @__PURE__ */ i("div", { className: Pt(Ce.wrap, "render-wrapper"), children: /* @__PURE__ */ i(
1453
1452
  "div",
1454
1453
  {
1455
- className: Ne.innerWrap,
1454
+ className: Ce.innerWrap,
1456
1455
  style: { pointerEvents: n ? "none" : "auto" },
1457
1456
  children: /* @__PURE__ */ i(
1458
1457
  "iframe",
@@ -1467,7 +1466,7 @@ function Cc({ editor: t, node: e, updateAttributes: r }) {
1467
1466
  )
1468
1467
  ] });
1469
1468
  }
1470
- function Nc(t) {
1469
+ function Cc(t) {
1471
1470
  try {
1472
1471
  return JSON.stringify(t);
1473
1472
  } catch {
@@ -1500,14 +1499,14 @@ function ht(t, e = !1) {
1500
1499
  return c !== c ? a : c;
1501
1500
  };
1502
1501
  }
1503
- function Tc(t) {
1502
+ function Nc(t) {
1504
1503
  const { attrs: e } = t;
1505
1504
  return Object.keys(e).reduce((r, n) => {
1506
1505
  const a = e[n];
1507
1506
  if (a == null)
1508
1507
  return r;
1509
1508
  let c = "";
1510
- return typeof a == "object" ? c = Nc(a) : c = a, r[n] = c, r;
1509
+ return typeof a == "object" ? c = Cc(a) : c = a, r[n] = c, r;
1511
1510
  }, /* @__PURE__ */ Object.create(null));
1512
1511
  }
1513
1512
  const ot = dt.create({
@@ -1593,7 +1592,7 @@ const ot = dt.create({
1593
1592
  },
1594
1593
  addInputRules() {
1595
1594
  return [
1596
- ce({
1595
+ ne({
1597
1596
  find: /^\$iframe\$$/,
1598
1597
  type: this.type,
1599
1598
  getAttributes: () => ({ width: "100%" })
@@ -1601,7 +1600,7 @@ const ot = dt.create({
1601
1600
  ];
1602
1601
  },
1603
1602
  addNodeView() {
1604
- return xt(Cc);
1603
+ return xt(yc);
1605
1604
  }
1606
1605
  }), St = E.forwardRef(
1607
1606
  ({ className: t, ...e }, r) => /* @__PURE__ */ i(
@@ -1617,11 +1616,11 @@ const ot = dt.create({
1617
1616
  )
1618
1617
  );
1619
1618
  St.displayName = "Textarea";
1620
- function kc(t) {
1619
+ function Tc(t) {
1621
1620
  return t;
1622
1621
  }
1623
1622
  function At(t, e, r, n) {
1624
- const a = kc, [c, o] = w(a(r)), s = nt(c);
1623
+ const a = Tc, [c, o] = w(a(r)), s = nt(c);
1625
1624
  return I(() => {
1626
1625
  const l = () => {
1627
1626
  const h = { ...r, ...t.getAttributes(e) };
@@ -1629,14 +1628,14 @@ function At(t, e, r, n) {
1629
1628
  (h[x] === null || h[x] === void 0) && (h[x] = r ? r[x] : null);
1630
1629
  });
1631
1630
  const d = a(h);
1632
- We(s.current, d) || (o(d), s.current = d);
1631
+ Ve(s.current, d) || (o(d), s.current = d);
1633
1632
  };
1634
1633
  return t.on("selectionUpdate", l), t.on("transaction", l), () => {
1635
1634
  t.off("selectionUpdate", l), t.off("transaction", l);
1636
1635
  };
1637
1636
  }, [t, r, e, a]), c;
1638
1637
  }
1639
- function Sc({ editor: t, ...e }) {
1638
+ function kc({ editor: t, ...e }) {
1640
1639
  const { t: r } = V(), n = At(t, lt.name, {
1641
1640
  text: "",
1642
1641
  defaultShowPicker: !1
@@ -1648,7 +1647,7 @@ function Sc({ editor: t, ...e }) {
1648
1647
  }, [t, c]);
1649
1648
  const h = P(() => {
1650
1649
  try {
1651
- return ae.renderToString(`${o}`);
1650
+ return ce.renderToString(`${o}`);
1652
1651
  } catch {
1653
1652
  return o;
1654
1653
  }
@@ -1708,7 +1707,7 @@ function Sc({ editor: t, ...e }) {
1708
1707
  href: "https://katex.org/docs/supported",
1709
1708
  rel: "noreferrer noopener",
1710
1709
  target: "_blank",
1711
- children: /* @__PURE__ */ i(Ze, { size: 16 })
1710
+ children: /* @__PURE__ */ i(Ke, { size: 16 })
1712
1711
  }
1713
1712
  )
1714
1713
  ] })
@@ -1717,16 +1716,16 @@ function Sc({ editor: t, ...e }) {
1717
1716
  )
1718
1717
  ] });
1719
1718
  }
1720
- const pi = Be("light");
1721
- function Ac() {
1722
- return $e(pi);
1719
+ const gi = De("light");
1720
+ function Sc() {
1721
+ return Be(gi);
1723
1722
  }
1724
- const Mc = {
1723
+ const Ac = {
1725
1724
  setTheme: (t) => {
1726
- pi(t);
1725
+ gi(t);
1727
1726
  }
1728
1727
  };
1729
- function Lc(t, e = 1) {
1728
+ function Mc(t, e = 1) {
1730
1729
  let r = 0, n = 0, a = 0;
1731
1730
  if (t.startsWith("rgb")) {
1732
1731
  const c = t.replace(/\s/g, "").match(/rgb\((.*)\)$/)[1].split(",");
@@ -1738,13 +1737,13 @@ function Lc(t, e = 1) {
1738
1737
  return t;
1739
1738
  return e > 1 && e <= 100 && (e = e / 100), `rgba(${r},${n},${a},${e})`;
1740
1739
  }
1741
- function Ic({ node: t }) {
1742
- const e = Ac(), { text: r } = t.attrs, n = P(() => {
1740
+ function Lc({ node: t }) {
1741
+ const e = Sc(), { text: r } = t.attrs, n = P(() => {
1743
1742
  const o = "rgb(254, 242, 237)";
1744
- return e === "dark" ? Lc(o, 0.75) : o;
1743
+ return e === "dark" ? Mc(o, 0.75) : o;
1745
1744
  }, [e]), a = P(() => {
1746
1745
  try {
1747
- return ae.renderToString(`${r}`);
1746
+ return ce.renderToString(`${r}`);
1748
1747
  } catch {
1749
1748
  return r;
1750
1749
  }
@@ -1764,7 +1763,7 @@ function Ic({ node: t }) {
1764
1763
  }
1765
1764
  );
1766
1765
  }
1767
- function Ec(t) {
1766
+ function Ic(t) {
1768
1767
  return (e) => e.getAttribute(t);
1769
1768
  }
1770
1769
  const lt = dt.create({
@@ -1780,7 +1779,7 @@ const lt = dt.create({
1780
1779
  class: "katex"
1781
1780
  },
1782
1781
  button: ({ editor: t, t: e }) => ({
1783
- component: Sc,
1782
+ component: kc,
1784
1783
  componentProps: {
1785
1784
  editor: t,
1786
1785
  action: () => !0,
@@ -1796,7 +1795,7 @@ const lt = dt.create({
1796
1795
  return {
1797
1796
  text: {
1798
1797
  default: "",
1799
- parseHTML: Ec("text")
1798
+ parseHTML: Ic("text")
1800
1799
  },
1801
1800
  defaultShowPicker: {
1802
1801
  default: !1
@@ -1819,7 +1818,7 @@ const lt = dt.create({
1819
1818
  },
1820
1819
  addInputRules() {
1821
1820
  return [
1822
- ce({
1821
+ ne({
1823
1822
  find: /^\$katex\$$/,
1824
1823
  type: this.type,
1825
1824
  getAttributes: () => ({ defaultShowPicker: !0 })
@@ -1827,28 +1826,28 @@ const lt = dt.create({
1827
1826
  ];
1828
1827
  },
1829
1828
  addNodeView() {
1830
- return xt(Ic);
1829
+ return xt(Lc);
1831
1830
  }
1832
1831
  });
1833
- let qt;
1834
- function se() {
1832
+ let Xt;
1833
+ function oe() {
1835
1834
  try {
1836
- return qt || (qt = _i()), qt;
1835
+ return Xt || (Xt = Oi()), Xt;
1837
1836
  } catch {
1838
1837
  throw new Error("Error EventEmitter");
1839
1838
  }
1840
1839
  }
1841
- const ie = "OPEN_EXCALIDRAW_SETTING_MODAL";
1842
- function zc(t, e) {
1843
- se().on(t, e);
1840
+ const ee = "OPEN_EXCALIDRAW_SETTING_MODAL";
1841
+ function Ec(t, e) {
1842
+ oe().on(t, e);
1844
1843
  }
1845
- function Rc(t, e) {
1846
- se().off(t, e);
1844
+ function zc(t, e) {
1845
+ oe().off(t, e);
1847
1846
  }
1848
- function Oc(t) {
1849
- se().emit(ie, t);
1847
+ function Rc(t) {
1848
+ oe().emit(ee, t);
1850
1849
  }
1851
- const _c = ({ editor: t }) => {
1850
+ const Oc = ({ editor: t }) => {
1852
1851
  const [e, r] = w(null), [n, a] = w({}), [c, o] = w({ elements: [], appState: { isLoading: !1 }, files: null }), [s, l] = w(!1), [h, d] = w(!0), [x, m] = w(null), f = C(
1853
1852
  (k) => {
1854
1853
  k && import("@excalidraw/excalidraw").then((z) => {
@@ -1877,16 +1876,16 @@ const _c = ({ editor: t }) => {
1877
1876
  const k = (z) => {
1878
1877
  l(!0), z && o(z.data);
1879
1878
  };
1880
- return zc(ie, k), () => {
1881
- Rc(ie, k);
1879
+ return Ec(ee, k), () => {
1880
+ zc(ee, k);
1882
1881
  };
1883
1882
  }, [t, l]), /* @__PURE__ */ u(
1884
- jt,
1883
+ Wt,
1885
1884
  {
1886
1885
  onOpenChange: l,
1887
1886
  open: s,
1888
1887
  children: [
1889
- /* @__PURE__ */ i(Ft, { asChild: !0, children: /* @__PURE__ */ i(
1888
+ /* @__PURE__ */ i(jt, { asChild: !0, children: /* @__PURE__ */ i(
1890
1889
  v,
1891
1890
  {
1892
1891
  action: () => l(!0),
@@ -1928,13 +1927,13 @@ const _c = ({ editor: t }) => {
1928
1927
  ]
1929
1928
  }
1930
1929
  );
1931
- }, Hc = "_wrap_15k3c_1", Pc = "_renderWrap_15k3c_7", Dc = "_title_15k3c_14", Bc = "_handlerWrap_15k3c_30", gt = {
1932
- wrap: Hc,
1933
- renderWrap: Pc,
1934
- title: Dc,
1935
- handlerWrap: Bc
1936
- }, $c = 10, Vc = 200, Te = 15, ke = { width: "100%", height: "100%", maxWidth: "100%" };
1937
- function Wc({ editor: t, node: e, updateAttributes: r }) {
1930
+ }, _c = "_wrap_15k3c_1", Hc = "_renderWrap_15k3c_7", Pc = "_title_15k3c_14", Dc = "_handlerWrap_15k3c_30", gt = {
1931
+ wrap: _c,
1932
+ renderWrap: Hc,
1933
+ title: Pc,
1934
+ handlerWrap: Dc
1935
+ }, Bc = 10, $c = 200, Ne = 15, Te = { width: "100%", height: "100%", maxWidth: "100%" };
1936
+ function Vc({ editor: t, node: e, updateAttributes: r }) {
1938
1937
  const n = nt(null), a = t.isActive(st.name), { data: c, width: o, height: s } = e.attrs, [l, h] = w(null), [d, x] = w(!0), [m, f] = w(null), [p, b] = w(!1), [T, k] = w(100), z = C(
1939
1938
  (M) => {
1940
1939
  M && b(!0);
@@ -1942,7 +1941,7 @@ function Wc({ editor: t, node: e, updateAttributes: r }) {
1942
1941
  [b]
1943
1942
  ), $ = C((M) => () => {
1944
1943
  k(
1945
- (B) => ti(M === "minus" ? B - Te : B + Te, $c, Vc)
1944
+ (B) => Qe(M === "minus" ? B - Ne : B + Ne, Bc, $c)
1946
1945
  );
1947
1946
  }, []);
1948
1947
  I(() => {
@@ -1966,8 +1965,8 @@ function Wc({ editor: t, node: e, updateAttributes: r }) {
1966
1965
  const F = (M) => {
1967
1966
  r({ width: M.width, height: M.height });
1968
1967
  };
1969
- return /* @__PURE__ */ i(ut, { className: Pt(gt.wrap, a && gt.isActive), children: /* @__PURE__ */ i(Wi, { onChange: z, children: /* @__PURE__ */ i(
1970
- Je,
1968
+ return /* @__PURE__ */ i(ut, { className: Pt(gt.wrap, a && gt.isActive), children: /* @__PURE__ */ i(Vi, { onChange: z, children: /* @__PURE__ */ i(
1969
+ Ye,
1971
1970
  {
1972
1971
  size: { width: Number.parseInt(o), height: Number.parseInt(s) },
1973
1972
  onResizeStop: (M, B, W, N) => {
@@ -1980,9 +1979,9 @@ function Wc({ editor: t, node: e, updateAttributes: r }) {
1980
1979
  "div",
1981
1980
  {
1982
1981
  className: Pt(gt.renderWrap, "render-wrapper"),
1983
- style: { ...ke, overflow: "hidden" },
1982
+ style: { ...Te, overflow: "hidden" },
1984
1983
  children: [
1985
- m && /* @__PURE__ */ i("div", { style: ke, children: /* @__PURE__ */ i("p", { children: m.message || m }) }),
1984
+ m && /* @__PURE__ */ i("div", { style: Te, children: /* @__PURE__ */ i("p", { children: m.message || m }) }),
1986
1985
  d && /* @__PURE__ */ i("p", { children: "Loading..." }),
1987
1986
  !d && !m && p && /* @__PURE__ */ i(
1988
1987
  "div",
@@ -2026,7 +2025,7 @@ function Wc({ editor: t, node: e, updateAttributes: r }) {
2026
2025
  }
2027
2026
  ) }) });
2028
2027
  }
2029
- const jc = Oe.memo(Wc, (t, e) => !!We(t.node.attrs, e.node.attrs)), Se = { elements: [] }, st = dt.create({
2028
+ const Wc = Re.memo(Vc, (t, e) => !!Ve(t.node.attrs, e.node.attrs)), ke = { elements: [] }, st = dt.create({
2030
2029
  name: "excalidraw",
2031
2030
  group: "block",
2032
2031
  selectable: !0,
@@ -2050,7 +2049,7 @@ const jc = Oe.memo(Wc, (t, e) => !!We(t.node.attrs, e.node.attrs)), Se = { eleme
2050
2049
  parseHTML: ht("height")
2051
2050
  },
2052
2051
  data: {
2053
- default: Se,
2052
+ default: ke,
2054
2053
  parseHTML: ht("data", !0)
2055
2054
  }
2056
2055
  };
@@ -2063,7 +2062,7 @@ const jc = Oe.memo(Wc, (t, e) => !!We(t.node.attrs, e.node.attrs)), Se = { eleme
2063
2062
  class: "excalidraw"
2064
2063
  },
2065
2064
  button: ({ editor: e }) => ({
2066
- component: _c,
2065
+ component: Oc,
2067
2066
  componentProps: {
2068
2067
  editor: e
2069
2068
  }
@@ -2078,13 +2077,13 @@ const jc = Oe.memo(Wc, (t, e) => !!We(t.node.attrs, e.node.attrs)), Se = { eleme
2078
2077
  ];
2079
2078
  },
2080
2079
  renderHTML({ HTMLAttributes: t, node: e }) {
2081
- return ["div", it(this.options.HTMLAttributes, t, Tc(e))];
2080
+ return ["div", it(this.options.HTMLAttributes, t, Nc(e))];
2082
2081
  },
2083
2082
  addCommands() {
2084
2083
  return {
2085
2084
  setExcalidraw: (t) => ({ tr: e, commands: r, chain: n }) => {
2086
2085
  var a, c, o;
2087
- return t = t || {}, t.data = t.data || Se, ((o = (c = (a = e.selection) == null ? void 0 : a.node) == null ? void 0 : c.type) == null ? void 0 : o.name) == this.name ? r.updateAttributes(this.name, t) : n().insertContent({
2086
+ return t = t || {}, t.data = t.data || ke, ((o = (c = (a = e.selection) == null ? void 0 : a.node) == null ? void 0 : c.type) == null ? void 0 : o.name) == this.name ? r.updateAttributes(this.name, t) : n().insertContent({
2088
2087
  type: this.name,
2089
2088
  attrs: t
2090
2089
  }).run();
@@ -2092,11 +2091,11 @@ const jc = Oe.memo(Wc, (t, e) => !!We(t.node.attrs, e.node.attrs)), Se = { eleme
2092
2091
  };
2093
2092
  },
2094
2093
  addNodeView() {
2095
- return xt(jc);
2094
+ return xt(Wc);
2096
2095
  },
2097
2096
  addInputRules() {
2098
2097
  return [
2099
- ce({
2098
+ ne({
2100
2099
  find: /^\$excalidraw\$$/,
2101
2100
  type: this.type,
2102
2101
  getAttributes: () => ({ width: "100%" })
@@ -2104,7 +2103,7 @@ const jc = Oe.memo(Wc, (t, e) => !!We(t.node.attrs, e.node.attrs)), Se = { eleme
2104
2103
  ];
2105
2104
  }
2106
2105
  });
2107
- function Fc({ selectImage: t, giphyApiKey: e, children: r }) {
2106
+ function jc({ selectImage: t, giphyApiKey: e, children: r }) {
2108
2107
  const [n, a] = w([]), [c] = w(15), o = nt(null), s = (h, d = "search") => {
2109
2108
  if (!e)
2110
2109
  return;
@@ -2119,7 +2118,7 @@ function Fc({ selectImage: t, giphyApiKey: e, children: r }) {
2119
2118
  s("", "trend");
2120
2119
  }, []);
2121
2120
  const l = C(
2122
- Ve((h) => {
2121
+ $e((h) => {
2123
2122
  if (!h.target.value) {
2124
2123
  s("", "trend");
2125
2124
  return;
@@ -2165,9 +2164,9 @@ function Fc({ selectImage: t, giphyApiKey: e, children: r }) {
2165
2164
  )
2166
2165
  ] });
2167
2166
  }
2168
- function Gc({ editor: t, icon: e, giphyApiKey: r, ...n }) {
2167
+ function Fc({ editor: t, icon: e, giphyApiKey: r, ...n }) {
2169
2168
  return /* @__PURE__ */ i(
2170
- Fc,
2169
+ jc,
2171
2170
  {
2172
2171
  giphyApiKey: r,
2173
2172
  selectImage: (c) => {
@@ -2190,7 +2189,7 @@ const Lt = {
2190
2189
  BOTTOM_LEFT: "bl",
2191
2190
  BOTTOM_RIGHT: "br"
2192
2191
  };
2193
- function Uc(t) {
2192
+ function Gc(t) {
2194
2193
  var B, W;
2195
2194
  const [e, r] = w({
2196
2195
  width: Ot,
@@ -2211,7 +2210,7 @@ function Uc(t) {
2211
2210
  dir: ""
2212
2211
  }), { align: d } = (B = t == null ? void 0 : t.node) == null ? void 0 : B.attrs, x = P(() => {
2213
2212
  var R;
2214
- const { src: N, alt: H, width: y, height: g } = (R = t == null ? void 0 : t.node) == null ? void 0 : R.attrs, O = ge(y) ? `${y}px` : y, S = ge(g) ? `${g}px` : g;
2213
+ const { src: N, alt: H, width: y, height: g } = (R = t == null ? void 0 : t.node) == null ? void 0 : R.attrs, O = fe(y) ? `${y}px` : y, S = fe(g) ? `${g}px` : g;
2215
2214
  return {
2216
2215
  src: N || void 0,
2217
2216
  alt: H || void 0,
@@ -2251,21 +2250,19 @@ function Uc(t) {
2251
2250
  const y = n.width, g = n.height, O = y / g;
2252
2251
  let S = Number(t.node.attrs.width), R = Number(t.node.attrs.height);
2253
2252
  const A = e.width;
2254
- S && !R ? (S = S > A ? A : S, R = Math.round(S / O)) : R && !S ? (S = Math.round(R * O), S = S > A ? A : S) : !S && !R ? (S = y > A ? A : y, R = Math.round(S / O)) : S = S > A ? A : S, Bt(() => {
2255
- s(!0), h({
2256
- x: N.clientX,
2257
- y: N.clientY,
2258
- w: S,
2259
- h: R,
2260
- dir: H
2261
- });
2253
+ S && !R ? (S = S > A ? A : S, R = Math.round(S / O)) : R && !S ? (S = Math.round(R * O), S = S > A ? A : S) : !S && !R ? (S = y > A ? A : y, R = Math.round(S / O)) : S = S > A ? A : S, s(!0), h({
2254
+ x: N.clientX,
2255
+ y: N.clientY,
2256
+ w: S,
2257
+ h: R,
2258
+ dir: H
2262
2259
  });
2263
2260
  }
2264
2261
  const k = C(
2265
2262
  wt((N) => {
2266
2263
  if (N.preventDefault(), N.stopPropagation(), !o)
2267
2264
  return;
2268
- const { x: H, w: y, dir: g } = l, O = (N.clientX - H) * (/l/.test(g) ? -1 : 1), S = ji(y + O, Pe, e.width);
2265
+ const { x: H, w: y, dir: g } = l, O = (N.clientX - H) * (/l/.test(g) ? -1 : 1), S = Wi(y + O, He, e.width);
2269
2266
  t.updateAttributes({
2270
2267
  width: S,
2271
2268
  height: null
@@ -2274,15 +2271,13 @@ function Uc(t) {
2274
2271
  [o, l, e, t.updateAttributes]
2275
2272
  ), z = C(
2276
2273
  (N) => {
2277
- N.preventDefault(), N.stopPropagation(), o && (Bt(() => {
2278
- h({
2279
- x: 0,
2280
- y: 0,
2281
- w: 0,
2282
- h: 0,
2283
- dir: ""
2284
- }), s(!1);
2285
- }), p());
2274
+ N.preventDefault(), N.stopPropagation(), o && (h({
2275
+ x: 0,
2276
+ y: 0,
2277
+ w: 0,
2278
+ h: 0,
2279
+ dir: ""
2280
+ }), s(!1), p());
2286
2281
  },
2287
2282
  [o, p]
2288
2283
  ), $ = C(() => {
@@ -2335,7 +2330,7 @@ function Uc(t) {
2335
2330
  }
2336
2331
  );
2337
2332
  }
2338
- const wi = He.extend({
2333
+ const pi = _e.extend({
2339
2334
  name: "imageGif",
2340
2335
  addOptions() {
2341
2336
  var t;
@@ -2353,7 +2348,7 @@ const wi = He.extend({
2353
2348
  var c;
2354
2349
  const a = ((c = r == null ? void 0 : r.options) == null ? void 0 : c.GIPHY_API_KEY) || "";
2355
2350
  return {
2356
- component: Gc,
2351
+ component: Fc,
2357
2352
  componentProps: {
2358
2353
  editor: e,
2359
2354
  action: () => {
@@ -2392,7 +2387,7 @@ const wi = He.extend({
2392
2387
  };
2393
2388
  },
2394
2389
  addNodeView() {
2395
- return xt(Uc);
2390
+ return xt(Gc);
2396
2391
  },
2397
2392
  addCommands() {
2398
2393
  var t;
@@ -2446,12 +2441,12 @@ const wi = He.extend({
2446
2441
  ];
2447
2442
  }
2448
2443
  });
2449
- function vi(t = 8) {
2444
+ function wi(t = 8) {
2450
2445
  return Math.random().toString(36).substring(2, t + 2);
2451
2446
  }
2452
- const Ae = `graph TB
2453
- a-->b`, Kc = ({ editor: t, upload: e }) => {
2454
- const [r, n] = w(Ae), [a, c] = w(""), [o, s] = w(!1), l = nt(null), h = async (m) => {
2447
+ const Se = `graph TB
2448
+ a-->b`, Uc = ({ editor: t, upload: e }) => {
2449
+ const [r, n] = w(Se), [a, c] = w(""), [o, s] = w(!1), l = nt(null), h = async (m) => {
2455
2450
  try {
2456
2451
  const { svg: f } = await Dt.render("mermaid-svg", m);
2457
2452
  c(f);
@@ -2472,12 +2467,12 @@ a-->b`, Kc = ({ editor: t, upload: e }) => {
2472
2467
  }, [o]), I(() => {
2473
2468
  o && h(r);
2474
2469
  }, [r]), /* @__PURE__ */ u(
2475
- jt,
2470
+ Wt,
2476
2471
  {
2477
2472
  onOpenChange: s,
2478
2473
  open: o,
2479
2474
  children: [
2480
- /* @__PURE__ */ i(Ft, { asChild: !0, children: /* @__PURE__ */ i(
2475
+ /* @__PURE__ */ i(jt, { asChild: !0, children: /* @__PURE__ */ i(
2481
2476
  v,
2482
2477
  {
2483
2478
  action: () => s(!0),
@@ -2493,7 +2488,7 @@ a-->b`, Kc = ({ editor: t, upload: e }) => {
2493
2488
  {
2494
2489
  autoFocus: !0,
2495
2490
  className: "richtext-flex-1",
2496
- defaultValue: Ae,
2491
+ defaultValue: Se,
2497
2492
  onChange: (m) => n(m.target.value),
2498
2493
  placeholder: "Text",
2499
2494
  required: !0,
@@ -2520,10 +2515,10 @@ a-->b`, Kc = ({ editor: t, upload: e }) => {
2520
2515
  onClick: async () => {
2521
2516
  if (r !== "") {
2522
2517
  if (r) {
2523
- const m = l.current.querySelector("svg"), { width: f, height: p } = m.getBoundingClientRect(), b = `mermaid-${vi()}.svg`;
2524
- let T = je(m.outerHTML);
2518
+ const m = l.current.querySelector("svg"), { width: f, height: p } = m.getBoundingClientRect(), b = `mermaid-${wi()}.svg`;
2519
+ let T = We(m.outerHTML);
2525
2520
  if (e) {
2526
- const k = gi(T, b);
2521
+ const k = fi(T, b);
2527
2522
  T = await e(k);
2528
2523
  }
2529
2524
  t == null || t.chain().focus().setMermaid(
@@ -2554,7 +2549,7 @@ a-->b`, Kc = ({ editor: t, upload: e }) => {
2554
2549
  BOTTOM_LEFT: "bl",
2555
2550
  BOTTOM_RIGHT: "br"
2556
2551
  };
2557
- function Zc({ editor: t, node: e, updateAttributes: r, getPos: n, selected: a }) {
2552
+ function Kc({ editor: t, node: e, updateAttributes: r, getPos: n, selected: a }) {
2558
2553
  const [c, o] = w({
2559
2554
  width: Ot,
2560
2555
  height: Ot
@@ -2573,7 +2568,7 @@ function Zc({ editor: t, node: e, updateAttributes: r, getPos: n, selected: a })
2573
2568
  h: 0,
2574
2569
  dir: ""
2575
2570
  }), { align: p } = e == null ? void 0 : e.attrs, b = P(() => {
2576
- const { src: y, alt: g, width: O, height: S } = e == null ? void 0 : e.attrs, R = me(O) ? `${O}px` : O, A = me(S) ? `${S}px` : S;
2571
+ const { src: y, alt: g, width: O, height: S } = e == null ? void 0 : e.attrs, R = xe(O) ? `${O}px` : O, A = xe(S) ? `${S}px` : S;
2577
2572
  return {
2578
2573
  src: y || void 0,
2579
2574
  alt: g || void 0,
@@ -2612,21 +2607,19 @@ function Zc({ editor: t, node: e, updateAttributes: r, getPos: n, selected: a })
2612
2607
  const O = s.width, S = s.height, R = O / S;
2613
2608
  let A = Number(e.attrs.width), K = Number(e.attrs.height);
2614
2609
  const j = c.width;
2615
- A && !K ? (A = A > j ? j : A, K = Math.round(A / R)) : K && !A ? (A = Math.round(K * R), A = A > j ? j : A) : !A && !K ? (A = O > j ? j : O, K = Math.round(A / R)) : A = A > j ? j : A, Bt(() => {
2616
- x(!0), f({
2617
- x: y.clientX,
2618
- y: y.clientY,
2619
- w: A,
2620
- h: K,
2621
- dir: g
2622
- });
2610
+ A && !K ? (A = A > j ? j : A, K = Math.round(A / R)) : K && !A ? (A = Math.round(K * R), A = A > j ? j : A) : !A && !K ? (A = O > j ? j : O, K = Math.round(A / R)) : A = A > j ? j : A, x(!0), f({
2611
+ x: y.clientX,
2612
+ y: y.clientY,
2613
+ w: A,
2614
+ h: K,
2615
+ dir: g
2623
2616
  });
2624
2617
  }
2625
2618
  const M = C(
2626
2619
  wt((y) => {
2627
2620
  if (y.preventDefault(), y.stopPropagation(), !d)
2628
2621
  return;
2629
- const { x: g, w: O, dir: S } = m, R = (y.clientX - g) * (/l/.test(S) ? -1 : 1), A = ti(O + R, Pe, c.width);
2622
+ const { x: g, w: O, dir: S } = m, R = (y.clientX - g) * (/l/.test(S) ? -1 : 1), A = Qe(O + R, He, c.width);
2630
2623
  r({
2631
2624
  width: A,
2632
2625
  height: null
@@ -2635,15 +2628,13 @@ function Zc({ editor: t, node: e, updateAttributes: r, getPos: n, selected: a })
2635
2628
  [d, m, c, r]
2636
2629
  ), B = C(
2637
2630
  (y) => {
2638
- y.preventDefault(), y.stopPropagation(), d && (Bt(() => {
2639
- f({
2640
- x: 0,
2641
- y: 0,
2642
- w: 0,
2643
- h: 0,
2644
- dir: ""
2645
- }), x(!1);
2646
- }), z());
2631
+ y.preventDefault(), y.stopPropagation(), d && (f({
2632
+ x: 0,
2633
+ y: 0,
2634
+ w: 0,
2635
+ h: 0,
2636
+ dir: ""
2637
+ }), x(!1), z());
2647
2638
  },
2648
2639
  [d, z]
2649
2640
  ), W = C(() => {
@@ -2696,7 +2687,7 @@ function Zc({ editor: t, node: e, updateAttributes: r, getPos: n, selected: a })
2696
2687
  }
2697
2688
  );
2698
2689
  }
2699
- const Me = He.extend({
2690
+ const Ae = _e.extend({
2700
2691
  name: "mermaid",
2701
2692
  addOptions() {
2702
2693
  var t;
@@ -2715,7 +2706,7 @@ const Me = He.extend({
2715
2706
  button: ({ editor: e, t: r, extension: n }) => {
2716
2707
  var a;
2717
2708
  return {
2718
- component: Kc,
2709
+ component: Uc,
2719
2710
  componentProps: {
2720
2711
  action: () => !0,
2721
2712
  isActive: () => !1,
@@ -2763,7 +2754,7 @@ const Me = He.extend({
2763
2754
  };
2764
2755
  },
2765
2756
  addNodeView() {
2766
- return xt(Zc);
2757
+ return xt(Kc);
2767
2758
  },
2768
2759
  // @ts-ignore
2769
2760
  addCommands() {
@@ -2815,17 +2806,17 @@ const Me = He.extend({
2815
2806
  ];
2816
2807
  }
2817
2808
  });
2818
- function Xc({ node: t }) {
2809
+ function Zc({ node: t }) {
2819
2810
  var n;
2820
2811
  const e = ((n = t == null ? void 0 : t.attrs) == null ? void 0 : n.src) || "", r = e == null ? void 0 : e.split("/").pop();
2821
- return r ? /* @__PURE__ */ i(ut, { children: /* @__PURE__ */ i("div", { "data-twitter": "", children: /* @__PURE__ */ i(Fi, { id: r }) }) }) : null;
2812
+ return r ? /* @__PURE__ */ i(ut, { children: /* @__PURE__ */ i("div", { "data-twitter": "", children: /* @__PURE__ */ i(ji, { id: r }) }) }) : null;
2822
2813
  }
2823
- function bi(t) {
2814
+ function vi(t) {
2824
2815
  const { t: e } = V(), [r, n] = w("");
2825
2816
  I(() => {
2826
2817
  var c;
2827
2818
  if (t != null && t.editor) {
2828
- const { src: o } = (c = t.editor) == null ? void 0 : c.getAttributes(re.name);
2819
+ const { src: o } = (c = t.editor) == null ? void 0 : c.getAttributes(ie.name);
2829
2820
  o && n(o);
2830
2821
  }
2831
2822
  }, [t == null ? void 0 : t.editor]);
@@ -2862,7 +2853,7 @@ function bi(t) {
2862
2853
  }
2863
2854
  ) });
2864
2855
  }
2865
- function qc(t) {
2856
+ function Xc(t) {
2866
2857
  function e(r) {
2867
2858
  t.action && t.action(r);
2868
2859
  }
@@ -2876,14 +2867,14 @@ function qc(t) {
2876
2867
  children: /* @__PURE__ */ i(G, { name: t == null ? void 0 : t.icon })
2877
2868
  }
2878
2869
  ) }),
2879
- /* @__PURE__ */ i(ct, { hideWhenDetached: !0, className: "richtext-w-full", align: "start", side: "bottom", children: /* @__PURE__ */ i(bi, { editor: t.editor, onSetLink: e }) })
2870
+ /* @__PURE__ */ i(ct, { hideWhenDetached: !0, className: "richtext-w-full", align: "start", side: "bottom", children: /* @__PURE__ */ i(vi, { editor: t.editor, onSetLink: e }) })
2880
2871
  ] });
2881
2872
  }
2882
- const Yc = /(https?:\/\/)?(www\.)?x\.com\/(\w{1,15})(\/status\/(\d+))?(\/\S*)?/g, Jc = /^https?:\/\/(www\.)?x\.com\/(\w{1,15})(\/status\/(\d+))?(\/\S*)?$/;
2883
- function Le(t) {
2884
- return t.match(Jc);
2873
+ const qc = /(https?:\/\/)?(www\.)?x\.com\/(\w{1,15})(\/status\/(\d+))?(\/\S*)?/g, Yc = /^https?:\/\/(www\.)?x\.com\/(\w{1,15})(\/status\/(\d+))?(\/\S*)?$/;
2874
+ function Me(t) {
2875
+ return t.match(Yc);
2885
2876
  }
2886
- const re = dt.create({
2877
+ const ie = dt.create({
2887
2878
  name: "twitter",
2888
2879
  draggable: !0,
2889
2880
  selectable: !0,
@@ -2894,7 +2885,7 @@ const re = dt.create({
2894
2885
  inline: !1,
2895
2886
  origin: "",
2896
2887
  button: ({ editor: t, t: e }) => ({
2897
- component: qc,
2888
+ component: Xc,
2898
2889
  componentProps: {
2899
2890
  action: (r) => {
2900
2891
  t.commands.setTweet({ src: r });
@@ -2909,7 +2900,7 @@ const re = dt.create({
2909
2900
  };
2910
2901
  },
2911
2902
  addNodeView() {
2912
- return xt(Xc, { attrs: this.options.HTMLAttributes });
2903
+ return xt(Zc, { attrs: this.options.HTMLAttributes });
2913
2904
  },
2914
2905
  inline() {
2915
2906
  return this.options.inline;
@@ -2933,17 +2924,17 @@ const re = dt.create({
2933
2924
  },
2934
2925
  addCommands() {
2935
2926
  return {
2936
- setTweet: (t) => ({ commands: e }) => Le(t.src) ? e.insertContent({
2927
+ setTweet: (t) => ({ commands: e }) => Me(t.src) ? e.insertContent({
2937
2928
  type: this.name,
2938
2929
  attrs: t
2939
2930
  }) : !1,
2940
- updateTweet: (t) => ({ commands: e }) => Le(t.src) ? e.updateAttributes(this.name, { src: t.src }) : !1
2931
+ updateTweet: (t) => ({ commands: e }) => Me(t.src) ? e.updateAttributes(this.name, { src: t.src }) : !1
2941
2932
  };
2942
2933
  },
2943
2934
  addPasteRules() {
2944
2935
  return this.options.addPasteHandler ? [
2945
- Li({
2946
- find: Yc,
2936
+ Mi({
2937
+ find: qc,
2947
2938
  type: this.type,
2948
2939
  getAttributes: (t) => ({ src: t.input })
2949
2940
  })
@@ -2953,7 +2944,7 @@ const re = dt.create({
2953
2944
  return ["div", it({ "data-twitter": "" }, t)];
2954
2945
  }
2955
2946
  });
2956
- function Qc({ editor: t, ...e }) {
2947
+ function Jc({ editor: t, ...e }) {
2957
2948
  const r = At(t, lt.name, {
2958
2949
  text: "",
2959
2950
  defaultShowPicker: !1
@@ -2967,7 +2958,7 @@ function Qc({ editor: t, ...e }) {
2967
2958
  }, [s]);
2968
2959
  const m = P(() => {
2969
2960
  try {
2970
- return ae.renderToString(`${c}`);
2961
+ return ce.renderToString(`${c}`);
2971
2962
  } catch {
2972
2963
  return c;
2973
2964
  }
@@ -3008,16 +2999,16 @@ function Qc({ editor: t, ...e }) {
3008
2999
  f && /* @__PURE__ */ i("div", { className: "richtext-my-[10px] richtext-p-[10px] richtext-rounded-[6px] !richtext-border-[1px] richtext-whitespace-nowrap richtext-overflow-auto", children: f }),
3009
3000
  /* @__PURE__ */ u("div", { className: "richtext-flex richtext-items-center richtext-justify-between richtext-gap-[6px]", children: [
3010
3001
  /* @__PURE__ */ i(U, { onClick: x, className: "richtext-flex-1", children: "Submit" }),
3011
- /* @__PURE__ */ i("a", { href: "https://katex.org/docs/supported", target: "_blank", rel: "noreferrer noopener", children: /* @__PURE__ */ i(Ze, { size: 16 }) })
3002
+ /* @__PURE__ */ i("a", { href: "https://katex.org/docs/supported", target: "_blank", rel: "noreferrer noopener", children: /* @__PURE__ */ i(Ke, { size: 16 }) })
3012
3003
  ] })
3013
3004
  ] }) : /* @__PURE__ */ u("div", { className: "richtext-flex richtext-items-center richtext-justify-center richtext-gap-[6px]", children: [
3014
- /* @__PURE__ */ i(v, { tooltip: "Edit", action: () => l(!s), children: /* @__PURE__ */ i(Ke, { size: 16 }) }),
3015
- /* @__PURE__ */ i(v, { tooltip: "Delete", action: d, children: /* @__PURE__ */ i(Ue, { size: 16 }) })
3005
+ /* @__PURE__ */ i(v, { tooltip: "Edit", action: () => l(!s), children: /* @__PURE__ */ i(Ue, { size: 16 }) }),
3006
+ /* @__PURE__ */ i(v, { tooltip: "Delete", action: d, children: /* @__PURE__ */ i(Ge, { size: 16 }) })
3016
3007
  ] }) })
3017
3008
  }
3018
3009
  );
3019
3010
  }
3020
- const ta = { padding: "0 12px 12px" }, yi = ({ width: t, maxWidth: e, height: r, onOk: n, children: a }) => {
3011
+ const Qc = { padding: "0 12px 12px" }, bi = ({ width: t, maxWidth: e, height: r, onOk: n, children: a }) => {
3021
3012
  const { t: c } = V(), [o, s] = w({
3022
3013
  width: "",
3023
3014
  height: "",
@@ -3035,7 +3026,7 @@ const ta = { padding: "0 12px 12px" }, yi = ({ width: t, maxWidth: e, height: r,
3035
3026
  }
3036
3027
  return /* @__PURE__ */ u(mt, { modal: !0, children: [
3037
3028
  /* @__PURE__ */ i(ft, { asChild: !0, children: a }),
3038
- /* @__PURE__ */ i(ct, { children: /* @__PURE__ */ i("div", { style: ta, children: /* @__PURE__ */ u("form", { className: "richtext-flex richtext-flex-col richtext-gap-2", onSubmit: l, children: [
3029
+ /* @__PURE__ */ i(ct, { children: /* @__PURE__ */ i("div", { style: Qc, children: /* @__PURE__ */ u("form", { className: "richtext-flex richtext-flex-col richtext-gap-2", onSubmit: l, children: [
3039
3030
  /* @__PURE__ */ i(et, { className: "mb-[6px]", children: "Width" }),
3040
3031
  /* @__PURE__ */ i("div", { className: "richtext-flex richtext-w-full richtext-max-w-sm richtext-items-center richtext-gap-1.5", children: /* @__PURE__ */ i("div", { className: "richtext-relative richtext-items-center richtext-w-full richtext-max-w-sm", children: /* @__PURE__ */ i(
3041
3032
  J,
@@ -3070,7 +3061,7 @@ const ta = { padding: "0 12px 12px" }, yi = ({ width: t, maxWidth: e, height: r,
3070
3061
  ] }) }) })
3071
3062
  ] });
3072
3063
  }, rt = /* @__PURE__ */ new Map();
3073
- function ea(t) {
3064
+ function ta(t) {
3074
3065
  const e = t.options.element;
3075
3066
  rt.has("width") || rt.set("width", e.clientWidth), rt.has("width") && rt.get("width") <= 0 && rt.set("width", e.clientWidth);
3076
3067
  const r = { attributes: !0, childList: !0, subtree: !0 }, n = function() {
@@ -3080,8 +3071,8 @@ function ea(t) {
3080
3071
  a.disconnect();
3081
3072
  }), { width: rt.get("width") };
3082
3073
  }
3083
- function ia({ editor: t }) {
3084
- const { t: e } = V(), { width: r } = ea(t), n = At(t, st.name, {
3074
+ function ea({ editor: t }) {
3075
+ const { t: e } = V(), { width: r } = ta(t), n = At(t, st.name, {
3085
3076
  defaultShowPicker: !1,
3086
3077
  createUser: "",
3087
3078
  width: 0,
@@ -3092,7 +3083,7 @@ function ia({ editor: t }) {
3092
3083
  },
3093
3084
  [t]
3094
3085
  ), h = C(() => {
3095
- Oc(n);
3086
+ Rc(n);
3096
3087
  }, [t, n]), d = C(() => t.isActive(st.name), [t]), x = C(() => Ct(st.name, t), [t]);
3097
3088
  return I(() => {
3098
3089
  a && (h(), t.chain().updateAttributes(st.name, { defaultShowPicker: !1 }).focus().run());
@@ -3123,7 +3114,7 @@ function ia({ editor: t }) {
3123
3114
  tooltip: e("editor.edit")
3124
3115
  }
3125
3116
  ),
3126
- /* @__PURE__ */ i(yi, { width: o, maxWidth: r, height: s, onOk: l, children: /* @__PURE__ */ i(
3117
+ /* @__PURE__ */ i(bi, { width: o, maxWidth: r, height: s, onOk: l, children: /* @__PURE__ */ i(
3127
3118
  v,
3128
3119
  {
3129
3120
  icon: "Settings",
@@ -3142,7 +3133,7 @@ function ia({ editor: t }) {
3142
3133
  }
3143
3134
  );
3144
3135
  }
3145
- function ra({ editor: t }) {
3136
+ function ia({ editor: t }) {
3146
3137
  const { t: e } = V(), { width: r, height: n, url: a } = At(t, ot.name, {
3147
3138
  width: 0,
3148
3139
  height: 0,
@@ -3204,7 +3195,7 @@ function ra({ editor: t }) {
3204
3195
  tooltip: "Open Edit Link"
3205
3196
  }
3206
3197
  ),
3207
- /* @__PURE__ */ i(yi, { width: r, height: n, onOk: f, children: /* @__PURE__ */ i(
3198
+ /* @__PURE__ */ i(bi, { width: r, height: n, onOk: f, children: /* @__PURE__ */ i(
3208
3199
  v,
3209
3200
  {
3210
3201
  icon: "Settings",
@@ -3223,14 +3214,14 @@ function ra({ editor: t }) {
3223
3214
  }
3224
3215
  ),
3225
3216
  /* @__PURE__ */ u(
3226
- jt,
3217
+ Wt,
3227
3218
  {
3228
3219
  open: c,
3229
3220
  onOpenChange: o,
3230
3221
  children: [
3231
- /* @__PURE__ */ i(Ft, {}),
3222
+ /* @__PURE__ */ i(jt, {}),
3232
3223
  /* @__PURE__ */ u(Nt, { children: [
3233
- /* @__PURE__ */ i(fi, { children: /* @__PURE__ */ i(kt, { children: "Edit Link Iframe" }) }),
3224
+ /* @__PURE__ */ i(mi, { children: /* @__PURE__ */ i(kt, { children: "Edit Link Iframe" }) }),
3234
3225
  /* @__PURE__ */ i(
3235
3226
  J,
3236
3227
  {
@@ -3251,9 +3242,9 @@ function ra({ editor: t }) {
3251
3242
  )
3252
3243
  ] });
3253
3244
  }
3254
- const Ie = `graph TB
3255
- a-->b`, na = ({ editor: t, attrs: e, extension: r }) => {
3256
- const { alt: n, align: a } = e, [c, o] = w(decodeURIComponent(n ?? Ie)), [s, l] = w(""), [h, d] = w(!1), x = nt(null), m = r == null ? void 0 : r.options.upload, f = async (T) => {
3245
+ const Le = `graph TB
3246
+ a-->b`, ra = ({ editor: t, attrs: e, extension: r }) => {
3247
+ const { alt: n, align: a } = e, [c, o] = w(decodeURIComponent(n ?? Le)), [s, l] = w(""), [h, d] = w(!1), x = nt(null), m = r == null ? void 0 : r.options.upload, f = async (T) => {
3257
3248
  try {
3258
3249
  const { svg: k } = await Dt.render("mermaid-svg", T);
3259
3250
  l(k);
@@ -3274,12 +3265,12 @@ a-->b`, na = ({ editor: t, attrs: e, extension: r }) => {
3274
3265
  }, [h]), I(() => {
3275
3266
  h && f(c);
3276
3267
  }, [c]), /* @__PURE__ */ u(
3277
- jt,
3268
+ Wt,
3278
3269
  {
3279
3270
  onOpenChange: d,
3280
3271
  open: h,
3281
3272
  children: [
3282
- /* @__PURE__ */ i(Ft, { asChild: !0, children: /* @__PURE__ */ i(
3273
+ /* @__PURE__ */ i(jt, { asChild: !0, children: /* @__PURE__ */ i(
3283
3274
  v,
3284
3275
  {
3285
3276
  action: () => d(!0),
@@ -3295,7 +3286,7 @@ a-->b`, na = ({ editor: t, attrs: e, extension: r }) => {
3295
3286
  {
3296
3287
  autoFocus: !0,
3297
3288
  className: "richtext-flex-1",
3298
- defaultValue: Ie,
3289
+ defaultValue: Le,
3299
3290
  onChange: (T) => o(T.target.value),
3300
3291
  placeholder: "Text",
3301
3292
  required: !0,
@@ -3322,10 +3313,10 @@ a-->b`, na = ({ editor: t, attrs: e, extension: r }) => {
3322
3313
  onClick: async () => {
3323
3314
  if (c !== "") {
3324
3315
  if (c) {
3325
- const T = x.current.querySelector("svg"), { width: k, height: z } = T.getBoundingClientRect(), $ = `mermaid-${vi()}.svg`;
3326
- let F = je(T.outerHTML);
3316
+ const T = x.current.querySelector("svg"), { width: k, height: z } = T.getBoundingClientRect(), $ = `mermaid-${wi()}.svg`;
3317
+ let F = We(T.outerHTML);
3327
3318
  if (m) {
3328
- const M = gi(F, $);
3319
+ const M = fi(F, $);
3329
3320
  F = await m(M);
3330
3321
  }
3331
3322
  t == null || t.chain().focus().setMermaid(
@@ -3351,7 +3342,7 @@ a-->b`, na = ({ editor: t, attrs: e, extension: r }) => {
3351
3342
  }
3352
3343
  );
3353
3344
  };
3354
- function ca(t, e) {
3345
+ function na(t, e) {
3355
3346
  const [r, n] = w(void 0);
3356
3347
  return I(() => {
3357
3348
  const a = () => {
@@ -3363,16 +3354,16 @@ function ca(t, e) {
3363
3354
  };
3364
3355
  }, [t, e]), r;
3365
3356
  }
3366
- const aa = {
3357
+ const ca = {
3367
3358
  maxWidth: "auto",
3368
3359
  zIndex: 20,
3369
3360
  appendTo: "parent",
3370
3361
  moveTransition: "transform 0.1s ease-out"
3371
3362
  };
3372
- function oa({ item: t, disabled: e, editor: r }) {
3363
+ function aa({ item: t, disabled: e, editor: r }) {
3373
3364
  var a;
3374
3365
  const n = t.component;
3375
- return n ? /* @__PURE__ */ i(_e, { children: t.type === "divider" ? /* @__PURE__ */ i(
3366
+ return n ? /* @__PURE__ */ i(Oe, { children: t.type === "divider" ? /* @__PURE__ */ i(
3376
3367
  Q,
3377
3368
  {
3378
3369
  className: "!richtext-mx-1 !richtext-my-2 !richtext-h-[16px]",
@@ -3387,26 +3378,26 @@ function oa({ item: t, disabled: e, editor: r }) {
3387
3378
  }
3388
3379
  ) }) : /* @__PURE__ */ i(_, {});
3389
3380
  }
3390
- function sa(t) {
3381
+ function oa(t) {
3391
3382
  return t.type.name === "mermaid";
3392
3383
  }
3393
- function la(t) {
3394
- const { lang: e } = V(), r = At(t.editor, Me.name), n = ca(t.editor, Me.name), a = ({ editor: o }) => {
3384
+ function sa(t) {
3385
+ const { lang: e } = V(), r = At(t.editor, Ae.name), n = na(t.editor, Ae.name), a = ({ editor: o }) => {
3395
3386
  const { selection: s } = o.view.state, { $from: l, to: h } = s;
3396
3387
  let d = !1;
3397
3388
  return o.view.state.doc.nodesBetween(l.pos, h, (x) => {
3398
- if (sa(x))
3389
+ if (oa(x))
3399
3390
  return d = !0, !1;
3400
3391
  }), d;
3401
- }, c = P(() => t.disabled ? [] : Na(t.editor), [t.disabled, t.editor, e]);
3392
+ }, c = P(() => t.disabled ? [] : Ca(t.editor), [t.disabled, t.editor, e]);
3402
3393
  return /* @__PURE__ */ i(_, { children: /* @__PURE__ */ i(
3403
3394
  Y,
3404
3395
  {
3405
3396
  editor: t == null ? void 0 : t.editor,
3406
3397
  shouldShow: a,
3407
- tippyOptions: aa,
3398
+ tippyOptions: ca,
3408
3399
  children: c != null && c.length ? /* @__PURE__ */ i("div", { className: "richtext-pointer-events-auto richtext-w-auto richtext-select-none richtext-rounded-sm !richtext-border richtext-border-neutral-200 richtext-bg-background richtext-px-3 richtext-py-2 richtext-shadow-sm richtext-transition-all dark:richtext-border-neutral-800", children: /* @__PURE__ */ i("div", { className: "richtext-relative richtext-flex richtext-h-[26px] richtext-flex-nowrap richtext-items-center richtext-justify-start richtext-whitespace-nowrap", children: c == null ? void 0 : c.map((o, s) => o.type === "edit" && (r != null && r.src) ? /* @__PURE__ */ i(
3409
- na,
3400
+ ra,
3410
3401
  {
3411
3402
  attrs: r,
3412
3403
  editor: t.editor,
@@ -3414,7 +3405,7 @@ function la(t) {
3414
3405
  },
3415
3406
  `bubbleMenu-mermaid-${s}`
3416
3407
  ) : /* @__PURE__ */ i(
3417
- oa,
3408
+ aa,
3418
3409
  {
3419
3410
  disabled: t.disabled,
3420
3411
  editor: t.editor,
@@ -3425,10 +3416,10 @@ function la(t) {
3425
3416
  }
3426
3417
  ) });
3427
3418
  }
3428
- function ha({ editor: t, disabled: e }) {
3429
- const [r, n] = w(!1), { t: a } = V(), c = C(({ editor: l }) => l.isActive(re.name), []), o = (l) => {
3419
+ function la({ editor: t, disabled: e }) {
3420
+ const [r, n] = w(!1), { t: a } = V(), c = C(({ editor: l }) => l.isActive(ie.name), []), o = (l) => {
3430
3421
  t.commands.updateTweet({ src: l }), n(!1);
3431
- }, s = C(() => Ct(re.name, t), [t]);
3422
+ }, s = C(() => Ct(ie.name, t), [t]);
3432
3423
  return /* @__PURE__ */ i(_, { children: /* @__PURE__ */ i(
3433
3424
  Y,
3434
3425
  {
@@ -3446,7 +3437,7 @@ function ha({ editor: t, disabled: e }) {
3446
3437
  }
3447
3438
  },
3448
3439
  children: e ? /* @__PURE__ */ i(_, {}) : /* @__PURE__ */ i(_, { children: r ? /* @__PURE__ */ i(
3449
- bi,
3440
+ vi,
3450
3441
  {
3451
3442
  editor: t,
3452
3443
  onSetLink: o
@@ -3476,38 +3467,38 @@ function ha({ editor: t, disabled: e }) {
3476
3467
  }
3477
3468
  ) });
3478
3469
  }
3479
- function da({ editor: t, disabled: e, bubbleMenu: r }) {
3470
+ function ha({ editor: t, disabled: e, bubbleMenu: r }) {
3480
3471
  const n = t.extensionManager.extensions.map((c) => c.name), a = () => {
3481
3472
  var c, o, s, l, h, d, x, m, f, p, b, T, k;
3482
3473
  return [
3483
- n.includes("columns") && !((c = r == null ? void 0 : r.columnConfig) != null && c.hidden) ? /* @__PURE__ */ i(Ba, { editor: t }, "columns") : null,
3484
- n.includes("table") && !((o = r == null ? void 0 : r.tableConfig) != null && o.hidden) ? /* @__PURE__ */ i(Ia, { editor: t }, "table") : null,
3485
- n.includes("link") && !((s = r == null ? void 0 : r.linkConfig) != null && s.hidden) ? /* @__PURE__ */ i(za, { editor: t, disabled: e }, "link") : null,
3486
- n.includes("image") && !((l = r == null ? void 0 : r.imageConfig) != null && l.hidden) ? /* @__PURE__ */ i(Ha, { editor: t, disabled: e }, "image") : null,
3487
- n.includes(wi.name) && !((h = r == null ? void 0 : r.imageGifConfig) != null && h.hidden) ? /* @__PURE__ */ i(Pa, { editor: t, disabled: e }, "imageGif") : null,
3488
- n.includes("video") && !((d = r == null ? void 0 : r.videoConfig) != null && d.hidden) ? /* @__PURE__ */ i(Da, { editor: t, disabled: e }, "video") : null,
3489
- n.includes("katex") && !((x = r == null ? void 0 : r.katexConfig) != null && x.hidden) ? /* @__PURE__ */ i(Qc, { editor: t, disabled: e }, "katex") : null,
3490
- n.includes("excalidraw") && !((m = r == null ? void 0 : r.excalidrawConfig) != null && m.hidden) ? /* @__PURE__ */ i(ia, { editor: t, disabled: e }, "excalidraw") : null,
3491
- n.includes("mermaid") && !((f = r == null ? void 0 : r.mermaidConfig) != null && f.hidden) ? /* @__PURE__ */ i(la, { editor: t, disabled: e }, "mermaid") : null,
3492
- n.includes("iframe") && !((p = r == null ? void 0 : r.iframeConfig) != null && p.hidden) ? /* @__PURE__ */ i(ra, { editor: t, disabled: e }, "iframe") : null,
3493
- n.includes("twitter") && !((b = r == null ? void 0 : r.twitterConfig) != null && b.hidden) ? /* @__PURE__ */ i(ha, { editor: t, disabled: e }, "twitter") : null,
3494
- (T = r == null ? void 0 : r.floatingMenuConfig) != null && T.hidden ? null : /* @__PURE__ */ i(Sa, { editor: t, disabled: e }, "content"),
3495
- (k = r == null ? void 0 : r.textConfig) != null && k.hidden ? null : /* @__PURE__ */ i(La, { editor: t, disabled: e }, "text")
3474
+ n.includes("columns") && !((c = r == null ? void 0 : r.columnConfig) != null && c.hidden) ? /* @__PURE__ */ i(Da, { editor: t }, "columns") : null,
3475
+ n.includes("table") && !((o = r == null ? void 0 : r.tableConfig) != null && o.hidden) ? /* @__PURE__ */ i(La, { editor: t }, "table") : null,
3476
+ n.includes("link") && !((s = r == null ? void 0 : r.linkConfig) != null && s.hidden) ? /* @__PURE__ */ i(Ea, { editor: t, disabled: e }, "link") : null,
3477
+ n.includes("image") && !((l = r == null ? void 0 : r.imageConfig) != null && l.hidden) ? /* @__PURE__ */ i(_a, { editor: t, disabled: e }, "image") : null,
3478
+ n.includes(pi.name) && !((h = r == null ? void 0 : r.imageGifConfig) != null && h.hidden) ? /* @__PURE__ */ i(Ha, { editor: t, disabled: e }, "imageGif") : null,
3479
+ n.includes("video") && !((d = r == null ? void 0 : r.videoConfig) != null && d.hidden) ? /* @__PURE__ */ i(Pa, { editor: t, disabled: e }, "video") : null,
3480
+ n.includes("katex") && !((x = r == null ? void 0 : r.katexConfig) != null && x.hidden) ? /* @__PURE__ */ i(Jc, { editor: t, disabled: e }, "katex") : null,
3481
+ n.includes("excalidraw") && !((m = r == null ? void 0 : r.excalidrawConfig) != null && m.hidden) ? /* @__PURE__ */ i(ea, { editor: t, disabled: e }, "excalidraw") : null,
3482
+ n.includes("mermaid") && !((f = r == null ? void 0 : r.mermaidConfig) != null && f.hidden) ? /* @__PURE__ */ i(sa, { editor: t, disabled: e }, "mermaid") : null,
3483
+ n.includes("iframe") && !((p = r == null ? void 0 : r.iframeConfig) != null && p.hidden) ? /* @__PURE__ */ i(ia, { editor: t, disabled: e }, "iframe") : null,
3484
+ n.includes("twitter") && !((b = r == null ? void 0 : r.twitterConfig) != null && b.hidden) ? /* @__PURE__ */ i(la, { editor: t, disabled: e }, "twitter") : null,
3485
+ (T = r == null ? void 0 : r.floatingMenuConfig) != null && T.hidden ? null : /* @__PURE__ */ i(ka, { editor: t, disabled: e }, "content"),
3486
+ (k = r == null ? void 0 : r.textConfig) != null && k.hidden ? null : /* @__PURE__ */ i(Ma, { editor: t, disabled: e }, "text")
3496
3487
  ];
3497
3488
  };
3498
3489
  return r != null && r.render ? r.render({ editor: t, disabled: e || !1, bubbleMenu: r }, a()) : a().filter(Boolean);
3499
3490
  }
3500
- function Ee() {
3491
+ function Ie() {
3501
3492
  return /* @__PURE__ */ i("svg", { xmlns: "http://www.w3.org/2000/svg", width: "1em", height: "1em", viewBox: "0 0 24 24", children: /* @__PURE__ */ i("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" }) });
3502
3493
  }
3503
- function ua(t) {
3494
+ function da(t) {
3504
3495
  const { t: e } = V(), {
3505
3496
  highlight: r = !1,
3506
3497
  disabled: n = !1,
3507
3498
  selectedColor: a,
3508
3499
  setSelectedColor: c,
3509
3500
  onChange: o,
3510
- colors: s = Hi
3501
+ colors: s = _i
3511
3502
  } = t, l = P(() => {
3512
3503
  const f = s, p = [];
3513
3504
  for (let b = 0; b < f.length; b += 10)
@@ -3548,7 +3539,7 @@ function ua(t) {
3548
3539
  className: "rd-1 richtext-flex richtext-cursor-pointer richtext-items-center richtext-gap-[4px] richtext-p-1 hover:richtext-bg-accent",
3549
3540
  onClick: () => m(void 0),
3550
3541
  children: [
3551
- /* @__PURE__ */ i(Ee, {}),
3542
+ /* @__PURE__ */ i(Ie, {}),
3552
3543
  /* @__PURE__ */ i("span", { className: "richtext-ml-1 richtext-text-sm", children: e("editor.nofill") })
3553
3544
  ]
3554
3545
  }
@@ -3560,7 +3551,7 @@ function ua(t) {
3560
3551
  m(void 0);
3561
3552
  },
3562
3553
  children: [
3563
- /* @__PURE__ */ i(Ee, {}),
3554
+ /* @__PURE__ */ i(Ie, {}),
3564
3555
  /* @__PURE__ */ i("span", { className: "richtext-ml-1 richtext-text-sm", children: e("editor.default") })
3565
3556
  ]
3566
3557
  }
@@ -3641,13 +3632,13 @@ function ua(t) {
3641
3632
  `sub-color-recent-${p}`
3642
3633
  )) })
3643
3634
  ] }),
3644
- /* @__PURE__ */ i(xa, { setColor: m })
3635
+ /* @__PURE__ */ i(ua, { setColor: m })
3645
3636
  ] })
3646
3637
  }
3647
3638
  )
3648
3639
  ] });
3649
3640
  }
3650
- function xa({ setColor: t }) {
3641
+ function ua({ setColor: t }) {
3651
3642
  const [e, r] = w("#000000"), [n, a] = w(!1), { t: c } = V();
3652
3643
  return I(() => () => {
3653
3644
  a(!1);
@@ -3668,7 +3659,7 @@ function xa({ setColor: t }) {
3668
3659
  /* @__PURE__ */ u(ct, { children: [
3669
3660
  /* @__PURE__ */ u("div", { className: "richtext-flex richtext-flex-col richtext-items-center richtext-justify-center", children: [
3670
3661
  /* @__PURE__ */ i(
3671
- xn,
3662
+ un,
3672
3663
  {
3673
3664
  color: e,
3674
3665
  onChange: r
@@ -3694,13 +3685,13 @@ function xa({ setColor: t }) {
3694
3685
  onClick: (o) => {
3695
3686
  o.preventDefault(), t(e), a(!1);
3696
3687
  },
3697
- children: /* @__PURE__ */ i(Ge, { size: 16 })
3688
+ children: /* @__PURE__ */ i(Fe, { size: 16 })
3698
3689
  }
3699
3690
  )
3700
3691
  ] })
3701
3692
  ] });
3702
3693
  }
3703
- function ma({ editor: t, disabled: e, toolbar: r }) {
3694
+ function xa({ editor: t, disabled: e, toolbar: r }) {
3704
3695
  const { t: n, lang: a } = V(), c = P(() => {
3705
3696
  const h = [...t.extensionManager.extensions].sort((x, m) => {
3706
3697
  const f = x.options.sort ?? -1, p = m.options.sort ?? -1;
@@ -3714,7 +3705,7 @@ function ma({ editor: t, disabled: e, toolbar: r }) {
3714
3705
  spacer: p = !1,
3715
3706
  toolbar: b = !0
3716
3707
  } = x.options;
3717
- if (!m || !bn(m) || !b)
3708
+ if (!m || !vn(m) || !b)
3718
3709
  continue;
3719
3710
  const T = m({
3720
3711
  editor: t,
@@ -3768,7 +3759,7 @@ function ma({ editor: t, disabled: e, toolbar: r }) {
3768
3759
  });
3769
3760
  return r && (r != null && r.render) ? r.render({ editor: t, disabled: e || !1 }, c, s, o) : o(s);
3770
3761
  }
3771
- function fa(t) {
3762
+ function ma(t) {
3772
3763
  const e = ["size-small", "size-medium", "size-large"], r = [
3773
3764
  "SizeS",
3774
3765
  "SizeM",
@@ -3785,7 +3776,7 @@ function fa(t) {
3785
3776
  }
3786
3777
  }));
3787
3778
  }
3788
- function ga(t) {
3779
+ function fa(t) {
3789
3780
  const e = ["size-small", "size-medium", "size-large"], r = [
3790
3781
  "SizeS",
3791
3782
  "SizeM",
@@ -3802,7 +3793,7 @@ function ga(t) {
3802
3793
  }
3803
3794
  }));
3804
3795
  }
3805
- function pa(t) {
3796
+ function ga(t) {
3806
3797
  const e = ["left", "center", "right"], r = {
3807
3798
  left: "AlignLeft",
3808
3799
  center: "AlignCenter",
@@ -3823,7 +3814,7 @@ function pa(t) {
3823
3814
  }
3824
3815
  }));
3825
3816
  }
3826
- function wa(t) {
3817
+ function pa(t) {
3827
3818
  const e = ["left", "center", "right"], r = {
3828
3819
  left: "AlignLeft",
3829
3820
  center: "AlignCenter",
@@ -3844,7 +3835,7 @@ function wa(t) {
3844
3835
  }
3845
3836
  }));
3846
3837
  }
3847
- function va(t) {
3838
+ function wa(t) {
3848
3839
  const e = ["left", "center", "right"], r = {
3849
3840
  left: "AlignLeft",
3850
3841
  center: "AlignCenter",
@@ -3865,7 +3856,7 @@ function va(t) {
3865
3856
  }
3866
3857
  }));
3867
3858
  }
3868
- function ba(t) {
3859
+ function va(t) {
3869
3860
  const e = ["size-small", "size-medium", "size-large"], r = [
3870
3861
  "SizeS",
3871
3862
  "SizeM",
@@ -3877,12 +3868,12 @@ function ba(t) {
3877
3868
  componentProps: {
3878
3869
  tooltip: Z.t(`editor.${n.replace("-", ".")}.tooltip`),
3879
3870
  icon: r[a],
3880
- action: () => t.commands.updateVideo({ width: fe[n] }),
3881
- isActive: () => t.isActive("video", { width: fe[n] })
3871
+ action: () => t.commands.updateVideo({ width: me[n] }),
3872
+ isActive: () => t.isActive("video", { width: me[n] })
3882
3873
  }
3883
3874
  }));
3884
3875
  }
3885
- function ya(t) {
3876
+ function ba(t) {
3886
3877
  return [
3887
3878
  {
3888
3879
  type: "flipX",
@@ -3914,8 +3905,8 @@ function ya(t) {
3914
3905
  }
3915
3906
  }
3916
3907
  },
3917
- ...fa(t),
3918
- ...pa(t),
3908
+ ...ma(t),
3909
+ ...ga(t),
3919
3910
  {
3920
3911
  type: "remove",
3921
3912
  component: v,
@@ -3925,16 +3916,16 @@ function ya(t) {
3925
3916
  icon: "Trash2",
3926
3917
  action: () => {
3927
3918
  const { state: e, dispatch: r } = t.view;
3928
- Wt(e, r);
3919
+ Vt(e, r);
3929
3920
  }
3930
3921
  }
3931
3922
  }
3932
3923
  ];
3933
3924
  }
3934
- function Ca(t) {
3925
+ function ya(t) {
3935
3926
  return [
3936
- ...ga(t),
3937
- ...wa(t),
3927
+ ...fa(t),
3928
+ ...pa(t),
3938
3929
  {
3939
3930
  type: "remove",
3940
3931
  component: v,
@@ -3944,15 +3935,15 @@ function Ca(t) {
3944
3935
  icon: "Trash2",
3945
3936
  action: () => {
3946
3937
  const { state: e, dispatch: r } = t.view;
3947
- Wt(e, r);
3938
+ Vt(e, r);
3948
3939
  }
3949
3940
  }
3950
3941
  }
3951
3942
  ];
3952
3943
  }
3953
- function Na(t) {
3944
+ function Ca(t) {
3954
3945
  return [
3955
- ...va(t),
3946
+ ...wa(t),
3956
3947
  {
3957
3948
  type: "edit",
3958
3949
  component: v,
@@ -3972,15 +3963,15 @@ function Na(t) {
3972
3963
  icon: "Trash2",
3973
3964
  action: () => {
3974
3965
  const { state: e, dispatch: r } = t.view;
3975
- Wt(e, r);
3966
+ Vt(e, r);
3976
3967
  }
3977
3968
  }
3978
3969
  }
3979
3970
  ];
3980
3971
  }
3981
- function Ta(t) {
3972
+ function Na(t) {
3982
3973
  return [
3983
- ...ba(t),
3974
+ ...va(t),
3984
3975
  {
3985
3976
  type: "remove",
3986
3977
  component: v,
@@ -3990,14 +3981,14 @@ function Ta(t) {
3990
3981
  icon: "Trash2",
3991
3982
  action: () => {
3992
3983
  const { state: e, dispatch: r } = t.view;
3993
- Wt(e, r);
3984
+ Vt(e, r);
3994
3985
  }
3995
3986
  }
3996
3987
  }
3997
3988
  ];
3998
3989
  }
3999
- function ka(t, e) {
4000
- return Pi.reduce((r, n) => {
3990
+ function Ta(t, e) {
3991
+ return Hi.reduce((r, n) => {
4001
3992
  if (n === "divider" && r.length > 0)
4002
3993
  return [...r, {
4003
3994
  type: "divider",
@@ -4008,11 +3999,11 @@ function ka(t, e) {
4008
3999
  return a ? [...r, a.configure().options.button({ editor: t, t: e, extension: a })] : r;
4009
4000
  }, []);
4010
4001
  }
4011
- function Sa(t) {
4002
+ function ka(t) {
4012
4003
  var N, H, y;
4013
- const { pluginKey: e = Ii } = t, { t: r } = V(), [n, a] = w(null), [c, o] = w(-1), s = nt(null), l = nt(null), [h, d] = w(!1), x = t.editor.extensionManager.extensions.some((g) => g.name === "textAlign"), m = t.editor.extensionManager.extensions.some((g) => g.name === "indent"), f = t.editor.extensionManager.extensions.some((g) => g.name === "clear");
4004
+ const { pluginKey: e = Li } = t, { t: r } = V(), [n, a] = w(null), [c, o] = w(-1), s = nt(null), l = nt(null), [h, d] = w(!1), x = t.editor.extensionManager.extensions.some((g) => g.name === "textAlign"), m = t.editor.extensionManager.extensions.some((g) => g.name === "indent"), f = t.editor.extensionManager.extensions.some((g) => g.name === "clear");
4014
4005
  I(() => {
4015
- s.current && !t.editor.isDestroyed && (l.current = Ei({
4006
+ s.current && !t.editor.isDestroyed && (l.current = Ii({
4016
4007
  editor: t.editor,
4017
4008
  element: s.current,
4018
4009
  pluginKey: "ContentItemMenu",
@@ -4040,11 +4031,11 @@ function Sa(t) {
4040
4031
  t.editor.commands.setTextAlign(g);
4041
4032
  }
4042
4033
  function z() {
4043
- const g = ee(t.editor.state.tr, c, 1);
4034
+ const g = te(t.editor.state.tr, c, 1);
4044
4035
  g.setMeta("hideDragHandle", !0), t.editor.view.dispatch && t.editor.view.dispatch(g);
4045
4036
  }
4046
4037
  function $() {
4047
- const g = ee(t.editor.state.tr, c, -1);
4038
+ const g = te(t.editor.state.tr, c, -1);
4048
4039
  t.editor.view.dispatch && t.editor.view.dispatch(g);
4049
4040
  }
4050
4041
  function F() {
@@ -4095,10 +4086,10 @@ function Sa(t) {
4095
4086
  children: /* @__PURE__ */ i(G, { name: "Plus", className: "richtext-text-lg richtext-text-neutral-600 dark:richtext-text-neutral-200" })
4096
4087
  }
4097
4088
  ),
4098
- /* @__PURE__ */ u(Nn, { open: h, onOpenChange: W, children: [
4089
+ /* @__PURE__ */ u(Cn, { open: h, onOpenChange: W, children: [
4099
4090
  /* @__PURE__ */ u("div", { className: "richtext-relative richtext-flex richtext-flex-col", children: [
4100
- /* @__PURE__ */ u(hi, { children: [
4101
- /* @__PURE__ */ i(di, { asChild: !0, disabled: t == null ? void 0 : t.disabled, children: /* @__PURE__ */ i(
4091
+ /* @__PURE__ */ u(li, { children: [
4092
+ /* @__PURE__ */ i(hi, { asChild: !0, disabled: t == null ? void 0 : t.disabled, children: /* @__PURE__ */ i(
4102
4093
  U,
4103
4094
  {
4104
4095
  variant: "ghost",
@@ -4112,11 +4103,11 @@ function Sa(t) {
4112
4103
  children: /* @__PURE__ */ i(G, { name: "Grip", className: "richtext-text-sm dark:richtext-text-neutral-200 richtext-text-neutral-600" })
4113
4104
  }
4114
4105
  ) }),
4115
- /* @__PURE__ */ i(oe, { children: r("editor.draghandle.tooltip") })
4106
+ /* @__PURE__ */ i(ae, { children: r("editor.draghandle.tooltip") })
4116
4107
  ] }),
4117
- /* @__PURE__ */ i(Tn, { className: "richtext-absolute richtext-top-0 richtext-left-0 richtext-w-[28px] richtext-h-[28px] richtext-z-0" })
4108
+ /* @__PURE__ */ i(Nn, { className: "richtext-absolute richtext-top-0 richtext-left-0 richtext-w-[28px] richtext-h-[28px] richtext-z-0" })
4118
4109
  ] }),
4119
- /* @__PURE__ */ u(ei, { className: "richtext-w-48", align: "start", side: "bottom", sideOffset: 0, children: [
4110
+ /* @__PURE__ */ u(ti, { className: "richtext-w-48", align: "start", side: "bottom", sideOffset: 0, children: [
4120
4111
  /* @__PURE__ */ u(
4121
4112
  tt,
4122
4113
  {
@@ -4140,13 +4131,13 @@ function Sa(t) {
4140
4131
  /* @__PURE__ */ i(G, { name: "Copy" }),
4141
4132
  /* @__PURE__ */ i("span", { children: r("editor.copy") })
4142
4133
  ] }),
4143
- x || m ? /* @__PURE__ */ i(ii, {}) : null,
4144
- x ? /* @__PURE__ */ u(be, { children: [
4145
- /* @__PURE__ */ u(Jt, { className: "richtext-flex richtext-gap-3", children: [
4134
+ x || m ? /* @__PURE__ */ i(ei, {}) : null,
4135
+ x ? /* @__PURE__ */ u(ve, { children: [
4136
+ /* @__PURE__ */ u(Yt, { className: "richtext-flex richtext-gap-3", children: [
4146
4137
  /* @__PURE__ */ i(G, { name: "AlignCenter" }),
4147
4138
  /* @__PURE__ */ i("span", { children: r("editor.textalign.tooltip") })
4148
4139
  ] }),
4149
- /* @__PURE__ */ i(ve, { children: /* @__PURE__ */ u(Qt, { children: [
4140
+ /* @__PURE__ */ i(we, { children: /* @__PURE__ */ u(Jt, { children: [
4150
4141
  /* @__PURE__ */ u(tt, { className: "richtext-flex richtext-gap-3", onClick: () => k("left"), children: [
4151
4142
  /* @__PURE__ */ i(G, { name: "AlignLeft" }),
4152
4143
  /* @__PURE__ */ i("span", { children: r("editor.textalign.left.tooltip") })
@@ -4161,18 +4152,18 @@ function Sa(t) {
4161
4152
  ] })
4162
4153
  ] }) })
4163
4154
  ] }) : null,
4164
- m ? /* @__PURE__ */ u(be, { children: [
4165
- /* @__PURE__ */ u(Jt, { className: "richtext-flex richtext-gap-3", children: [
4155
+ m ? /* @__PURE__ */ u(ve, { children: [
4156
+ /* @__PURE__ */ u(Yt, { className: "richtext-flex richtext-gap-3", children: [
4166
4157
  /* @__PURE__ */ i(G, { name: "IndentIncrease" }),
4167
4158
  /* @__PURE__ */ i("span", { children: r("editor.indent") })
4168
4159
  ] }),
4169
- /* @__PURE__ */ i(ve, { children: /* @__PURE__ */ u(Qt, { children: [
4160
+ /* @__PURE__ */ i(we, { children: /* @__PURE__ */ u(Jt, { children: [
4170
4161
  /* @__PURE__ */ u(
4171
4162
  tt,
4172
4163
  {
4173
4164
  className: "richtext-flex richtext-gap-3",
4174
4165
  onClick: z,
4175
- disabled: ((H = n == null ? void 0 : n.attrs) == null ? void 0 : H.indent) >= te.max,
4166
+ disabled: ((H = n == null ? void 0 : n.attrs) == null ? void 0 : H.indent) >= Qt.max,
4176
4167
  children: [
4177
4168
  /* @__PURE__ */ i(G, { name: "IndentIncrease" }),
4178
4169
  /* @__PURE__ */ i("span", { children: r("editor.indent.tooltip") })
@@ -4184,7 +4175,7 @@ function Sa(t) {
4184
4175
  {
4185
4176
  className: "richtext-flex richtext-gap-3",
4186
4177
  onClick: $,
4187
- disabled: ((y = n == null ? void 0 : n.attrs) == null ? void 0 : y.indent) <= te.min,
4178
+ disabled: ((y = n == null ? void 0 : n.attrs) == null ? void 0 : y.indent) <= Qt.min,
4188
4179
  children: [
4189
4180
  /* @__PURE__ */ i(G, { name: "IndentDecrease" }),
4190
4181
  /* @__PURE__ */ i("span", { children: r("editor.outdent.tooltip") })
@@ -4199,13 +4190,13 @@ function Sa(t) {
4199
4190
  }
4200
4191
  );
4201
4192
  }
4202
- const Aa = {
4193
+ const Sa = {
4203
4194
  maxWidth: "auto",
4204
4195
  zIndex: 20,
4205
4196
  appendTo: "parent",
4206
4197
  moveTransition: "transform 0.1s ease-out"
4207
4198
  };
4208
- function Ma({ item: t, disabled: e, editor: r }) {
4199
+ function Aa({ item: t, disabled: e, editor: r }) {
4209
4200
  var a;
4210
4201
  const n = t.component;
4211
4202
  return n ? /* @__PURE__ */ i(
@@ -4217,17 +4208,17 @@ function Ma({ item: t, disabled: e, editor: r }) {
4217
4208
  }
4218
4209
  ) : /* @__PURE__ */ i(_, {});
4219
4210
  }
4220
- function La(t) {
4211
+ function Ma(t) {
4221
4212
  const { t: e, lang: r } = V(), n = ({ editor: c }) => {
4222
4213
  const { selection: o } = c.view.state, { $from: s, to: l } = o;
4223
4214
  return s.pos === l ? !1 : o instanceof bt;
4224
- }, a = P(() => t.disabled || !(t != null && t.editor) ? [] : ka(t.editor, e), [t.disabled, t.editor, r, e]);
4215
+ }, a = P(() => t.disabled || !(t != null && t.editor) ? [] : Ta(t.editor, e), [t.disabled, t.editor, r, e]);
4225
4216
  return /* @__PURE__ */ i(
4226
4217
  Y,
4227
4218
  {
4228
4219
  editor: t == null ? void 0 : t.editor,
4229
4220
  shouldShow: n,
4230
- tippyOptions: Aa,
4221
+ tippyOptions: Sa,
4231
4222
  children: a != null && a.length ? /* @__PURE__ */ i("div", { className: "richtext-pointer-events-auto richtext-w-auto richtext-select-none richtext-rounded-sm !richtext-border richtext-border-neutral-200 richtext-bg-background richtext-px-3 richtext-py-2 richtext-shadow-sm richtext-transition-all dark:richtext-border-neutral-800", children: /* @__PURE__ */ i("div", { className: "richtext-relative richtext-flex richtext-h-[26px] richtext-flex-nowrap richtext-items-center richtext-justify-start richtext-gap-[4px] richtext-whitespace-nowrap", children: a == null ? void 0 : a.map((c, o) => (c == null ? void 0 : c.type) === "divider" ? /* @__PURE__ */ i(
4232
4223
  Q,
4233
4224
  {
@@ -4236,7 +4227,7 @@ function La(t) {
4236
4227
  },
4237
4228
  `bubbleMenu-divider-${o}`
4238
4229
  ) : /* @__PURE__ */ i(
4239
- Ma,
4230
+ Aa,
4240
4231
  {
4241
4232
  disabled: t.disabled,
4242
4233
  editor: t.editor,
@@ -4247,9 +4238,9 @@ function La(t) {
4247
4238
  }
4248
4239
  );
4249
4240
  }
4250
- function Ia({ editor: t, disabled: e }) {
4241
+ function La({ editor: t, disabled: e }) {
4251
4242
  var b, T, k, z, $, F, M, B, W, N, H, y, g, O, S, R, A, K;
4252
- const r = ({ editor: j }) => zi(j.view.state, "table"), { t: n } = V();
4243
+ const r = ({ editor: j }) => Ei(j.view.state, "table"), { t: n } = V();
4253
4244
  function a() {
4254
4245
  t.chain().focus().addColumnBefore().run();
4255
4246
  }
@@ -4294,7 +4285,7 @@ function Ia({ editor: t, disabled: e }) {
4294
4285
  },
4295
4286
  maxWidth: "auto",
4296
4287
  getReferenceClientRect: () => {
4297
- var xe;
4288
+ var ue;
4298
4289
  const {
4299
4290
  view: j,
4300
4291
  state: {
@@ -4303,10 +4294,10 @@ function Ia({ editor: t, disabled: e }) {
4303
4294
  } = t, at = j.domAtPos(Mt).node;
4304
4295
  if (!at)
4305
4296
  return new DOMRect(-1e3, -1e3, 0, 0);
4306
- const ue = (xe = at == null ? void 0 : at.closest) == null ? void 0 : xe.call(at, ".tableWrapper");
4307
- return ue ? ue.getBoundingClientRect() : new DOMRect(-1e3, -1e3, 0, 0);
4297
+ const de = (ue = at == null ? void 0 : at.closest) == null ? void 0 : ue.call(at, ".tableWrapper");
4298
+ return de ? de.getBoundingClientRect() : new DOMRect(-1e3, -1e3, 0, 0);
4308
4299
  },
4309
- plugins: [un],
4300
+ plugins: [dn],
4310
4301
  sticky: "popper"
4311
4302
  },
4312
4303
  children: e ? /* @__PURE__ */ i(_, {}) : /* @__PURE__ */ u("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: [
@@ -4410,7 +4401,7 @@ function Ia({ editor: t, disabled: e }) {
4410
4401
  ),
4411
4402
  /* @__PURE__ */ i(Q, { orientation: "vertical", className: "!richtext-mx-1 !richtext-my-2 !richtext-h-[16px]" }),
4412
4403
  /* @__PURE__ */ i(
4413
- hc,
4404
+ lc,
4414
4405
  {
4415
4406
  editor: t,
4416
4407
  tooltip: n("editor.table.menu.setCellsBgColor"),
@@ -4436,7 +4427,7 @@ function Ia({ editor: t, disabled: e }) {
4436
4427
  }
4437
4428
  );
4438
4429
  }
4439
- function Ea(t) {
4430
+ function Ia(t) {
4440
4431
  const { t: e } = V();
4441
4432
  return /* @__PURE__ */ u("div", { className: "richtext-flex richtext-items-center richtext-gap-2 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: [
4442
4433
  /* @__PURE__ */ i(
@@ -4446,7 +4437,7 @@ function Ea(t) {
4446
4437
  target: "_blank",
4447
4438
  rel: "noopener noreferrer",
4448
4439
  className: "richtext-text-sm richtext-underline richtext-break-all",
4449
- children: Gi(t == null ? void 0 : t.link, {
4440
+ children: Fi(t == null ? void 0 : t.link, {
4450
4441
  length: 50,
4451
4442
  omission: "…"
4452
4443
  })
@@ -4479,7 +4470,7 @@ function Ea(t) {
4479
4470
  ] })
4480
4471
  ] });
4481
4472
  }
4482
- function za({ editor: t, disabled: e }) {
4473
+ function Ea({ editor: t, disabled: e }) {
4483
4474
  const [r, n] = w(!1), a = P(() => {
4484
4475
  const { href: l } = t.getAttributes("link");
4485
4476
  return l;
@@ -4516,8 +4507,8 @@ function za({ editor: t, disabled: e }) {
4516
4507
  n(!1);
4517
4508
  }
4518
4509
  },
4519
- children: e ? /* @__PURE__ */ i(_, {}) : /* @__PURE__ */ i(_, { children: r ? /* @__PURE__ */ i(dc, { onSetLink: o, editor: t }) : /* @__PURE__ */ i(
4520
- Ea,
4510
+ children: e ? /* @__PURE__ */ i(_, {}) : /* @__PURE__ */ i(_, { children: r ? /* @__PURE__ */ i(hc, { onSetLink: o, editor: t }) : /* @__PURE__ */ i(
4511
+ Ia,
4521
4512
  {
4522
4513
  editor: t,
4523
4514
  onClear: s,
@@ -4530,16 +4521,16 @@ function za({ editor: t, disabled: e }) {
4530
4521
  }
4531
4522
  ) });
4532
4523
  }
4533
- const le = {
4524
+ const se = {
4534
4525
  maxWidth: "auto",
4535
4526
  zIndex: 20,
4536
4527
  appendTo: "parent",
4537
4528
  moveTransition: "transform 0.1s ease-out"
4538
4529
  };
4539
- function he({ item: t, disabled: e, editor: r }) {
4530
+ function le({ item: t, disabled: e, editor: r }) {
4540
4531
  var a;
4541
4532
  const n = t.component;
4542
- return n ? /* @__PURE__ */ i(_e, { children: t.type === "divider" ? /* @__PURE__ */ i(
4533
+ return n ? /* @__PURE__ */ i(Oe, { children: t.type === "divider" ? /* @__PURE__ */ i(
4543
4534
  Q,
4544
4535
  {
4545
4536
  className: "!richtext-mx-1 !richtext-my-2 !richtext-h-[16px]",
@@ -4554,32 +4545,32 @@ function he({ item: t, disabled: e, editor: r }) {
4554
4545
  }
4555
4546
  ) }) : /* @__PURE__ */ i(_, {});
4556
4547
  }
4557
- function Ra(t) {
4548
+ function za(t) {
4558
4549
  return t.type.name === "image";
4559
4550
  }
4560
- function Oa(t) {
4561
- return t.type.name === wi.name;
4551
+ function Ra(t) {
4552
+ return t.type.name === pi.name;
4562
4553
  }
4563
- function _a(t) {
4554
+ function Oa(t) {
4564
4555
  return t.type.name === "video";
4565
4556
  }
4566
- function Ha(t) {
4557
+ function _a(t) {
4567
4558
  const { lang: e } = V(), r = ({ editor: a }) => {
4568
4559
  const { selection: c } = a.view.state, { $from: o, to: s } = c;
4569
4560
  let l = !1;
4570
4561
  return a.view.state.doc.nodesBetween(o.pos, s, (h) => {
4571
- if (Ra(h))
4562
+ if (za(h))
4572
4563
  return l = !0, !1;
4573
4564
  }), l;
4574
- }, n = P(() => t.disabled ? [] : ya(t.editor), [t.disabled, t.editor, e]);
4565
+ }, n = P(() => t.disabled ? [] : ba(t.editor), [t.disabled, t.editor, e]);
4575
4566
  return /* @__PURE__ */ i(_, { children: /* @__PURE__ */ i(
4576
4567
  Y,
4577
4568
  {
4578
4569
  editor: t == null ? void 0 : t.editor,
4579
4570
  shouldShow: r,
4580
- tippyOptions: le,
4571
+ tippyOptions: se,
4581
4572
  children: n != null && n.length ? /* @__PURE__ */ i("div", { className: "richtext-pointer-events-auto richtext-w-auto richtext-select-none richtext-rounded-sm !richtext-border richtext-border-neutral-200 richtext-bg-background richtext-px-3 richtext-py-2 richtext-shadow-sm richtext-transition-all dark:richtext-border-neutral-800", children: /* @__PURE__ */ i("div", { className: "richtext-relative richtext-flex richtext-h-[26px] richtext-flex-nowrap richtext-items-center richtext-justify-start richtext-whitespace-nowrap", children: n == null ? void 0 : n.map((a, c) => /* @__PURE__ */ i(
4582
- he,
4573
+ le,
4583
4574
  {
4584
4575
  disabled: t.disabled,
4585
4576
  editor: t.editor,
@@ -4590,23 +4581,23 @@ function Ha(t) {
4590
4581
  }
4591
4582
  ) });
4592
4583
  }
4593
- function Pa(t) {
4584
+ function Ha(t) {
4594
4585
  const { lang: e } = V(), r = ({ editor: a }) => {
4595
4586
  const { selection: c } = a.view.state, { $from: o, to: s } = c;
4596
4587
  let l = !1;
4597
4588
  return a.view.state.doc.nodesBetween(o.pos, s, (h) => {
4598
- if (Oa(h))
4589
+ if (Ra(h))
4599
4590
  return l = !0, !1;
4600
4591
  }), l;
4601
- }, n = P(() => t.disabled ? [] : Ca(t.editor), [t.disabled, t.editor, e]);
4592
+ }, n = P(() => t.disabled ? [] : ya(t.editor), [t.disabled, t.editor, e]);
4602
4593
  return /* @__PURE__ */ i(_, { children: /* @__PURE__ */ i(
4603
4594
  Y,
4604
4595
  {
4605
4596
  editor: t == null ? void 0 : t.editor,
4606
4597
  shouldShow: r,
4607
- tippyOptions: le,
4598
+ tippyOptions: se,
4608
4599
  children: n != null && n.length ? /* @__PURE__ */ i("div", { className: "richtext-pointer-events-auto richtext-w-auto richtext-select-none richtext-rounded-sm !richtext-border richtext-border-neutral-200 richtext-bg-background richtext-px-3 richtext-py-2 richtext-shadow-sm richtext-transition-all dark:richtext-border-neutral-800", children: /* @__PURE__ */ i("div", { className: "richtext-relative richtext-flex richtext-h-[26px] richtext-flex-nowrap richtext-items-center richtext-justify-start richtext-whitespace-nowrap", children: n == null ? void 0 : n.map((a, c) => /* @__PURE__ */ i(
4609
- he,
4600
+ le,
4610
4601
  {
4611
4602
  disabled: t.disabled,
4612
4603
  editor: t.editor,
@@ -4617,23 +4608,23 @@ function Pa(t) {
4617
4608
  }
4618
4609
  ) });
4619
4610
  }
4620
- function Da(t) {
4611
+ function Pa(t) {
4621
4612
  const { lang: e } = V(), r = ({ editor: a }) => {
4622
4613
  const { selection: c } = a.view.state, { $from: o, to: s } = c;
4623
4614
  let l = !1;
4624
4615
  return a.view.state.doc.nodesBetween(o.pos, s, (h) => {
4625
- if (_a(h))
4616
+ if (Oa(h))
4626
4617
  return l = !0, !1;
4627
4618
  }), l;
4628
- }, n = P(() => t.disabled ? [] : Ta(t.editor), [t.editor, t.disabled, e]);
4619
+ }, n = P(() => t.disabled ? [] : Na(t.editor), [t.editor, t.disabled, e]);
4629
4620
  return /* @__PURE__ */ i(_, { children: /* @__PURE__ */ i(
4630
4621
  Y,
4631
4622
  {
4632
4623
  editor: t == null ? void 0 : t.editor,
4633
4624
  shouldShow: r,
4634
- tippyOptions: le,
4625
+ tippyOptions: se,
4635
4626
  children: n != null && n.length ? /* @__PURE__ */ i("div", { className: "richtext-pointer-events-auto richtext-w-auto richtext-select-none richtext-rounded-sm !richtext-border richtext-border-neutral-200 richtext-bg-background richtext-px-3 richtext-py-2 richtext-shadow-sm richtext-transition-all dark:richtext-border-neutral-800", children: /* @__PURE__ */ i("div", { className: "richtext-relative richtext-flex richtext-h-[26px] richtext-flex-nowrap richtext-items-center richtext-justify-start richtext-whitespace-nowrap", children: n == null ? void 0 : n.map((a, c) => /* @__PURE__ */ i(
4636
- he,
4627
+ le,
4637
4628
  {
4638
4629
  disabled: t.disabled,
4639
4630
  editor: t.editor,
@@ -4644,8 +4635,8 @@ function Da(t) {
4644
4635
  }
4645
4636
  ) });
4646
4637
  }
4647
- function Ba({ editor: t }) {
4648
- const { t: e } = V(), r = C(() => t.isActive($t.name), [t]), n = C(() => Ct($t.name, t), [t]), a = C(() => t.chain().focus().addColBefore().run(), [t]), c = C(() => t.chain().focus().addColAfter().run(), [t]), o = C(() => t.chain().focus().deleteCol().run(), [t]);
4638
+ function Da({ editor: t }) {
4639
+ const { t: e } = V(), r = C(() => t.isActive(Bt.name), [t]), n = C(() => Ct(Bt.name, t), [t]), a = C(() => t.chain().focus().addColBefore().run(), [t]), c = C(() => t.chain().focus().addColAfter().run(), [t]), o = C(() => t.chain().focus().deleteCol().run(), [t]);
4649
4640
  return /* @__PURE__ */ i(
4650
4641
  Y,
4651
4642
  {
@@ -4700,7 +4691,7 @@ function Ba({ editor: t }) {
4700
4691
  }
4701
4692
  );
4702
4693
  }
4703
- function $a({ editor: t, extensions: e }) {
4694
+ function Ba({ editor: t, extensions: e }) {
4704
4695
  const { t: r } = V(), n = P(() => {
4705
4696
  var a, c, o;
4706
4697
  return (o = (c = (a = e == null ? void 0 : e.find((s) => s.name === "base-kit")) == null ? void 0 : a.options) == null ? void 0 : c.characterCount) == null ? void 0 : o.limit;
@@ -4717,28 +4708,28 @@ function $a({ editor: t, extensions: e }) {
4717
4708
  r("editor.characters")
4718
4709
  ] }) }) }) });
4719
4710
  }
4720
- function Va() {
4721
- const { toasts: t } = $n();
4722
- return /* @__PURE__ */ u(In, { children: [
4711
+ function $a() {
4712
+ const { toasts: t } = Bn();
4713
+ return /* @__PURE__ */ u(Ln, { children: [
4723
4714
  t.map(({ id: e, title: r, description: n, action: a, ...c }) => /* @__PURE__ */ u(
4724
- ci,
4715
+ ni,
4725
4716
  {
4726
4717
  ...c,
4727
4718
  children: [
4728
4719
  /* @__PURE__ */ u("div", { className: "richtext-grid richtext-gap-1", children: [
4729
- r && /* @__PURE__ */ i(oi, { children: r }),
4730
- n && /* @__PURE__ */ i(si, { children: n })
4720
+ r && /* @__PURE__ */ i(ai, { children: r }),
4721
+ n && /* @__PURE__ */ i(oi, { children: n })
4731
4722
  ] }),
4732
4723
  a,
4733
- /* @__PURE__ */ i(ai, {})
4724
+ /* @__PURE__ */ i(ci, {})
4734
4725
  ]
4735
4726
  },
4736
4727
  e
4737
4728
  )),
4738
- /* @__PURE__ */ i(ni, {})
4729
+ /* @__PURE__ */ i(ri, {})
4739
4730
  ] });
4740
4731
  }
4741
- const Wa = `
4732
+ const Va = `
4742
4733
  .reactjs-tiptap-editor, .richtext-dialog-content {
4743
4734
  button,
4744
4735
  input:where([type=button]),
@@ -4873,8 +4864,8 @@ video {
4873
4864
  height: auto
4874
4865
  }
4875
4866
  }
4876
- `, ze = "data-rc-order", Re = "data-rc-priority", ja = "rc-util-key", ne = /* @__PURE__ */ new Map();
4877
- function Fa(t, e) {
4867
+ `, Ee = "data-rc-order", ze = "data-rc-priority", Wa = "rc-util-key", re = /* @__PURE__ */ new Map();
4868
+ function ja(t, e) {
4878
4869
  if (!t)
4879
4870
  return !1;
4880
4871
  if (t.contains)
@@ -4887,30 +4878,30 @@ function Fa(t, e) {
4887
4878
  }
4888
4879
  return !1;
4889
4880
  }
4890
- function Ci({ mark: t } = {}) {
4891
- return t ? t.startsWith("data-") ? t : `data-${t}` : ja;
4881
+ function yi({ mark: t } = {}) {
4882
+ return t ? t.startsWith("data-") ? t : `data-${t}` : Wa;
4892
4883
  }
4893
- function de(t) {
4884
+ function he(t) {
4894
4885
  return t.attachTo ? t.attachTo : document.querySelector("head") || document.body;
4895
4886
  }
4896
- function Ga(t) {
4887
+ function Fa(t) {
4897
4888
  return t === "queue" ? "prependQueue" : t ? "prepend" : "append";
4898
4889
  }
4899
- function Ni(t) {
4900
- return [...(ne.get(t) || t).children].filter(
4890
+ function Ci(t) {
4891
+ return [...(re.get(t) || t).children].filter(
4901
4892
  (e) => e.tagName === "STYLE"
4902
4893
  );
4903
4894
  }
4904
- function Ti(t, e = {}) {
4905
- const { csp: r, prepend: n, priority: a = 0 } = e, c = Ga(n), o = c === "prependQueue", s = document.createElement("style");
4906
- s.setAttribute(ze, c), o && a && s.setAttribute(Re, `${a}`), r != null && r.nonce && (s.nonce = r == null ? void 0 : r.nonce), s.innerHTML = t;
4907
- const l = de(e), { firstChild: h } = l;
4895
+ function Ni(t, e = {}) {
4896
+ const { csp: r, prepend: n, priority: a = 0 } = e, c = Fa(n), o = c === "prependQueue", s = document.createElement("style");
4897
+ s.setAttribute(Ee, c), o && a && s.setAttribute(ze, `${a}`), r != null && r.nonce && (s.nonce = r == null ? void 0 : r.nonce), s.innerHTML = t;
4898
+ const l = he(e), { firstChild: h } = l;
4908
4899
  if (n) {
4909
4900
  if (o) {
4910
- const d = Ni(l).filter((x) => {
4911
- if (!["prepend", "prependQueue"].includes(x.getAttribute(ze)))
4901
+ const d = Ci(l).filter((x) => {
4902
+ if (!["prepend", "prependQueue"].includes(x.getAttribute(Ee)))
4912
4903
  return !1;
4913
- const m = Number(x.getAttribute(Re) || 0);
4904
+ const m = Number(x.getAttribute(ze) || 0);
4914
4905
  return a >= m;
4915
4906
  });
4916
4907
  if (d.length > 0)
@@ -4921,34 +4912,34 @@ function Ti(t, e = {}) {
4921
4912
  l.append(s);
4922
4913
  return s;
4923
4914
  }
4924
- function ki(t, e = {}) {
4925
- const r = de(e);
4926
- return Ni(r).find((n) => n.getAttribute(Ci(e)) === t);
4915
+ function Ti(t, e = {}) {
4916
+ const r = he(e);
4917
+ return Ci(r).find((n) => n.getAttribute(yi(e)) === t);
4927
4918
  }
4928
- function Ua(t, e = {}) {
4929
- const r = ki(t, e);
4919
+ function Ga(t, e = {}) {
4920
+ const r = Ti(t, e);
4930
4921
  r && r.remove();
4931
4922
  }
4932
- function Ka(t, e) {
4933
- const r = ne.get(t);
4934
- if (!r || !Fa(document, r)) {
4935
- const n = Ti("", e), { parentNode: a } = n;
4936
- ne.set(t, a), n.remove();
4923
+ function Ua(t, e) {
4924
+ const r = re.get(t);
4925
+ if (!r || !ja(document, r)) {
4926
+ const n = Ni("", e), { parentNode: a } = n;
4927
+ re.set(t, a), n.remove();
4937
4928
  }
4938
4929
  }
4939
- function Za(t, e, r = {}) {
4930
+ function Ka(t, e, r = {}) {
4940
4931
  var o, s, l;
4941
- const n = de(r);
4942
- Ka(n, r);
4943
- const a = ki(e, r);
4932
+ const n = he(r);
4933
+ Ua(n, r);
4934
+ const a = Ti(e, r);
4944
4935
  if (a)
4945
4936
  return (o = r.csp) != null && o.nonce && a.nonce !== ((s = r.csp) == null ? void 0 : s.nonce) && (a.nonce = (l = r.csp) == null ? void 0 : l.nonce), a.innerHTML !== t && (a.innerHTML = t), a;
4946
- const c = Ti(t, r);
4947
- return c.setAttribute(Ci(r), e), c;
4937
+ const c = Ni(t, r);
4938
+ return c.setAttribute(yi(r), e), c;
4948
4939
  }
4949
- function Xa(t, e) {
4940
+ function Za(t, e) {
4950
4941
  const { content: r, extensions: n, useEditorOptions: a = {} } = t, c = P(() => {
4951
- const d = Ui(n, n, "name");
4942
+ const d = Gi(n, n, "name");
4952
4943
  return [...n.map((m) => {
4953
4944
  const f = n.find((p) => p.name === m.name);
4954
4945
  return f ? m.configure(f.options) : m;
@@ -4957,7 +4948,7 @@ function Xa(t, e) {
4957
4948
  var m;
4958
4949
  const x = l(d, t.output);
4959
4950
  (m = t == null ? void 0 : t.onChangeContent) == null || m.call(t, x);
4960
- }, Di), s = Ri({
4951
+ }, Pi), s = zi({
4961
4952
  extensions: c,
4962
4953
  content: r,
4963
4954
  onUpdate: ({ editor: d }) => {
@@ -4965,14 +4956,14 @@ function Xa(t, e) {
4965
4956
  },
4966
4957
  ...a
4967
4958
  });
4968
- Ai(e, () => ({
4959
+ Si(e, () => ({
4969
4960
  editor: s
4970
4961
  })), I(() => {
4971
- document.documentElement.classList.toggle("dark", t.dark), Mc.setTheme(t.dark ? "dark" : "light");
4962
+ document.documentElement.classList.toggle("dark", t.dark), Ac.setTheme(t.dark ? "dark" : "light");
4972
4963
  }, [t.dark]), I(() => {
4973
- s == null || s.setEditable(!(t != null && t.disabled)), pn.setDisable(!(t != null && t.disabled));
4974
- }, [s, t == null ? void 0 : t.disabled]), I(() => ((t == null ? void 0 : t.resetCSS) !== !1 && Za(Wa, "react-tiptap-reset"), () => {
4975
- Ua("react-tiptap-reset");
4964
+ s == null || s.setEditable(!(t != null && t.disabled)), gn.setDisable(!(t != null && t.disabled));
4965
+ }, [s, t == null ? void 0 : t.disabled]), I(() => ((t == null ? void 0 : t.resetCSS) !== !1 && Ka(Va, "react-tiptap-reset"), () => {
4966
+ Ga("react-tiptap-reset");
4976
4967
  }), [t == null ? void 0 : t.resetCSS]);
4977
4968
  function l(d, x) {
4978
4969
  return t != null && t.removeDefaultWrapper ? x === "html" ? d.isEmpty ? "" : d.getHTML() : x === "json" ? d.isEmpty ? {} : d.getJSON() : x === "text" ? d.isEmpty ? "" : d.getText() : "" : x === "html" ? d.getHTML() : x === "json" ? d.getJSON() : x === "text" ? d.getText() : "";
@@ -4981,16 +4972,16 @@ function Xa(t, e) {
4981
4972
  var d;
4982
4973
  (d = s == null ? void 0 : s.destroy) == null || d.call(s);
4983
4974
  }, []);
4984
- const h = yn(s, "characterCount");
4975
+ const h = bn(s, "characterCount");
4985
4976
  return s ? /* @__PURE__ */ u("div", { className: "reactjs-tiptap-editor", children: [
4986
4977
  /* @__PURE__ */ i(
4987
- On,
4978
+ Rn,
4988
4979
  {
4989
4980
  delayDuration: 0,
4990
4981
  disableHoverableContent: !0,
4991
4982
  children: /* @__PURE__ */ i("div", { className: "richtext-overflow-hidden richtext-rounded-[0.5rem] richtext-bg-background richtext-shadow richtext-outline richtext-outline-1", children: /* @__PURE__ */ u("div", { className: "richtext-flex richtext-max-h-full richtext-w-full richtext-flex-col", children: [
4992
4983
  !(t != null && t.hideToolbar) && /* @__PURE__ */ i(
4993
- ma,
4984
+ xa,
4994
4985
  {
4995
4986
  disabled: !!(t != null && t.disabled),
4996
4987
  editor: s,
@@ -4998,21 +4989,21 @@ function Xa(t, e) {
4998
4989
  }
4999
4990
  ),
5000
4991
  /* @__PURE__ */ i(
5001
- Oi,
4992
+ Ri,
5002
4993
  {
5003
4994
  className: `richtext-relative ${(t == null ? void 0 : t.contentClass) || ""}`,
5004
4995
  editor: s
5005
4996
  }
5006
4997
  ),
5007
4998
  h && /* @__PURE__ */ i(
5008
- $a,
4999
+ Ba,
5009
5000
  {
5010
5001
  editor: s,
5011
5002
  extensions: n
5012
5003
  }
5013
5004
  ),
5014
5005
  !(t != null && t.hideBubble) && /* @__PURE__ */ i(
5015
- da,
5006
+ ha,
5016
5007
  {
5017
5008
  bubbleMenu: t == null ? void 0 : t.bubbleMenu,
5018
5009
  disabled: t == null ? void 0 : t.disabled,
@@ -5022,68 +5013,68 @@ function Xa(t, e) {
5022
5013
  ] }) })
5023
5014
  }
5024
5015
  ),
5025
- /* @__PURE__ */ i(Va, {})
5016
+ /* @__PURE__ */ i($a, {})
5026
5017
  ] }) : /* @__PURE__ */ i(_, {});
5027
5018
  }
5028
- const bo = Si(Xa);
5019
+ const wo = ki(Za);
5029
5020
  export {
5030
5021
  ot as $,
5031
5022
  v as A,
5032
5023
  U as B,
5033
- ua as C,
5034
- Nn as D,
5024
+ da as C,
5025
+ Cn as D,
5035
5026
  Tt as E,
5036
- gi as F,
5037
- vo as G,
5038
- hc as H,
5027
+ fi as F,
5028
+ po as G,
5029
+ lc as H,
5039
5030
  G as I,
5040
5031
  et as J,
5041
5032
  J as K,
5042
- dc as L,
5043
- $t as M,
5044
- uo as N,
5045
- $n as O,
5033
+ hc as L,
5034
+ Bt as M,
5035
+ lo as N,
5036
+ Bn as O,
5046
5037
  mt as P,
5047
- yn as Q,
5048
- bo as R,
5049
- ri as S,
5050
- hi as T,
5038
+ bn as Q,
5039
+ wo as R,
5040
+ ii as S,
5041
+ li as T,
5051
5042
  ht as U,
5052
- wo as V,
5053
- Qn as W,
5054
- Jn as X,
5055
- go as Y,
5056
- fo as Z,
5057
- po as _,
5058
- di as a,
5043
+ go as V,
5044
+ Jn as W,
5045
+ Yn as X,
5046
+ mo as Y,
5047
+ xo as Z,
5048
+ fo as _,
5049
+ hi as a,
5059
5050
  lt as a0,
5060
5051
  st as a1,
5061
- wi as a2,
5062
- Me as a3,
5063
- re as a4,
5064
- oe as b,
5065
- Tn as c,
5066
- ei as d,
5052
+ pi as a2,
5053
+ Ae as a3,
5054
+ ie as a4,
5055
+ ae as b,
5056
+ Nn as c,
5057
+ ti as d,
5067
5058
  tt as e,
5068
5059
  L as f,
5069
- fn as g,
5060
+ mn as g,
5070
5061
  Ct as h,
5071
- ui as i,
5072
- kn as j,
5073
- ii as k,
5074
- xo as l,
5075
- Mn as m,
5076
- mn as n,
5062
+ di as i,
5063
+ Tn as j,
5064
+ ei as k,
5065
+ ho as l,
5066
+ An as m,
5067
+ xn as n,
5077
5068
  ft as o,
5078
5069
  ct as p,
5079
- li as q,
5080
- xi as r,
5081
- Kn as s,
5082
- mo as t,
5083
- gn as u,
5084
- te as v,
5085
- jt as w,
5086
- Ft as x,
5070
+ si as q,
5071
+ ui as r,
5072
+ Un as s,
5073
+ uo as t,
5074
+ fn as u,
5075
+ Qt as v,
5076
+ Wt as w,
5077
+ jt as x,
5087
5078
  Nt as y,
5088
5079
  kt as z
5089
5080
  };