@remarkablejames/editor 0.0.4 → 0.0.5

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