reactjs-tiptap-editor 1.0.17 → 1.0.18

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 (212) hide show
  1. package/lib/{ActionMenuButton-lsIBc9sU.js → ActionMenuButton-BOjCHFTA.js} +6 -6
  2. package/lib/ActionMenuButton-Df077oOH.cjs +1 -0
  3. package/lib/Attachment.cjs +2 -2
  4. package/lib/Attachment.js +40 -78
  5. package/lib/Blockquote.cjs +1 -1
  6. package/lib/Blockquote.js +2 -3
  7. package/lib/Bold.cjs +1 -1
  8. package/lib/Bold.js +2 -3
  9. package/lib/BulletList.cjs +1 -1
  10. package/lib/BulletList.js +2 -3
  11. package/lib/Callout.cjs +1 -1
  12. package/lib/Callout.js +105 -99
  13. package/lib/Clear.cjs +1 -1
  14. package/lib/Clear.js +2 -3
  15. package/lib/Code.cjs +1 -1
  16. package/lib/Code.js +2 -3
  17. package/lib/CodeBlock.cjs +38 -38
  18. package/lib/CodeBlock.js +1561 -1605
  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 +46 -63
  23. package/lib/Column.cjs +1 -1
  24. package/lib/Column.js +24 -10
  25. package/lib/Drawer-DwrlY_lY.cjs +1 -0
  26. package/lib/Drawer-DxOoRiGQ.js +1099 -0
  27. package/lib/Drawer.cjs +1 -1
  28. package/lib/Drawer.js +6 -5
  29. package/lib/Emoji.cjs +1 -1
  30. package/lib/Emoji.js +69 -93
  31. package/lib/Excalidraw.cjs +1 -1
  32. package/lib/Excalidraw.js +99 -110
  33. package/lib/ExportPdf.cjs +4 -4
  34. package/lib/ExportPdf.js +4 -13
  35. package/lib/ExportWord.cjs +1 -1
  36. package/lib/ExportWord.js +9 -7
  37. package/lib/FontFamily.cjs +1 -1
  38. package/lib/FontFamily.js +12 -34
  39. package/lib/FontSize.cjs +1 -1
  40. package/lib/FontSize.js +12 -27
  41. package/lib/Heading.cjs +1 -1
  42. package/lib/Heading.js +34 -47
  43. package/lib/Highlight.cjs +1 -1
  44. package/lib/Highlight.js +39 -52
  45. package/lib/History.cjs +1 -1
  46. package/lib/History.js +318 -313
  47. package/lib/HorizontalRule.cjs +1 -1
  48. package/lib/HorizontalRule.js +2 -3
  49. package/lib/{Iframe-CTajPyzs.js → Iframe-AhNV5WH5.js} +25 -34
  50. package/lib/Iframe-C6pBw-AF.cjs +1 -0
  51. package/lib/Iframe.cjs +1 -1
  52. package/lib/Iframe.js +5 -4
  53. package/lib/Image.cjs +1 -1
  54. package/lib/Image.js +5 -4
  55. package/lib/ImageGif.cjs +1 -1
  56. package/lib/ImageGif.js +63 -91
  57. package/lib/ImportWord.cjs +1 -1
  58. package/lib/ImportWord.js +7 -11
  59. package/lib/{Indent-BGEHlRx_.js → Indent-DZ5PcJA4.js} +3 -7
  60. package/lib/Indent-Do-X0AsY.cjs +1 -0
  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 -3
  65. package/lib/Katex-CIC9ygbL.cjs +4 -0
  66. package/lib/{Katex-tMh4bfBb.js → Katex-bIgoenn_.js} +241 -255
  67. package/lib/Katex.cjs +1 -1
  68. package/lib/Katex.js +5 -4
  69. package/lib/LineHeight.cjs +1 -1
  70. package/lib/LineHeight.js +13 -21
  71. package/lib/Link.cjs +1 -1
  72. package/lib/Link.js +2 -2
  73. package/lib/LinkEditBlock-B0ZaACZO.cjs +5 -0
  74. package/lib/{LinkEditBlock-CA5NhP-m.js → LinkEditBlock-D_cF9fnc.js} +320 -370
  75. package/lib/MarkdownPaste.cjs +58 -0
  76. package/lib/MarkdownPaste.js +1656 -0
  77. package/lib/Mention.cjs +1 -1
  78. package/lib/Mention.js +22 -17
  79. package/lib/Mermaid.cjs +2 -2
  80. package/lib/Mermaid.js +118 -142
  81. package/lib/MoreMark.cjs +1 -1
  82. package/lib/MoreMark.js +10 -18
  83. package/lib/OrderedList.cjs +1 -1
  84. package/lib/OrderedList.js +2 -3
  85. package/lib/SearchAndReplace.cjs +1 -1
  86. package/lib/SearchAndReplace.js +68 -133
  87. package/lib/SlashCommand.cjs +1 -1
  88. package/lib/SlashCommand.js +15 -14
  89. package/lib/{SlashCommandNodeView-CZoM3ZlS.cjs → SlashCommandNodeView-Ba03hlVZ.cjs} +1 -1
  90. package/lib/{SlashCommandNodeView-DLuqbX2o.js → SlashCommandNodeView-cg0x3NRF.js} +15 -17
  91. package/lib/Strike.cjs +1 -1
  92. package/lib/Strike.js +2 -3
  93. package/lib/{Table-BC4Lbqzn.js → Table-KqLiT5wG.js} +95 -133
  94. package/lib/Table-ddU2LSc6.cjs +9 -0
  95. package/lib/Table.cjs +1 -1
  96. package/lib/Table.js +1 -1
  97. package/lib/TaskList.cjs +1 -1
  98. package/lib/TaskList.js +2 -3
  99. package/lib/TextAlign.cjs +1 -1
  100. package/lib/TextAlign.js +51 -60
  101. package/lib/TextDirection.cjs +1 -1
  102. package/lib/TextDirection.js +47 -69
  103. package/lib/TextUnderline.cjs +1 -1
  104. package/lib/TextUnderline.js +2 -3
  105. package/lib/Twitter-BIiR78Jh.cjs +1 -0
  106. package/lib/{Twitter-D8Cbgl7g.js → Twitter-C1Lzqc7u.js} +567 -593
  107. package/lib/Twitter.cjs +1 -1
  108. package/lib/Twitter.js +4 -3
  109. package/lib/Video.cjs +1 -1
  110. package/lib/Video.js +3 -3
  111. package/lib/bubble.cjs +6 -4
  112. package/lib/bubble.js +3712 -3023
  113. package/lib/clsx-BWE7vnna.cjs +33 -0
  114. package/lib/clsx-eGVyq7ot.js +1062 -0
  115. package/lib/components/ActionButton.d.ts +2 -2
  116. package/lib/components/ActionMenuButton.d.ts +1 -1
  117. package/lib/components/Bubble/formatBubble.d.ts +5 -5
  118. package/lib/components/ui/checkbox.d.ts +1 -1
  119. package/lib/components/ui/dialog.d.ts +1 -1
  120. package/lib/components/ui/dropdown-menu.d.ts +1 -1
  121. package/lib/components/ui/emoji-picker.d.ts +1 -1
  122. package/lib/components/ui/label.d.ts +1 -1
  123. package/lib/components/ui/popover.d.ts +1 -1
  124. package/lib/components/ui/select.d.ts +1 -1
  125. package/lib/components/ui/separator.d.ts +1 -1
  126. package/lib/components/ui/switch.d.ts +1 -1
  127. package/lib/components/ui/tabs.d.ts +1 -1
  128. package/lib/components/ui/toast.d.ts +1 -1
  129. package/lib/components/ui/toggle.d.ts +1 -1
  130. package/lib/components/ui/tooltip.d.ts +1 -1
  131. package/lib/{delete-node-IyVmiRbI.js → delete-node-eQHsyyhR.js} +3 -1
  132. package/lib/{dropdown-menu-q6RL_fkA.js → dropdown-menu-CexIkt_V.js} +8 -8
  133. package/lib/{dropdown-menu-C_F7LEy5.cjs → dropdown-menu-oSKIntXM.cjs} +1 -1
  134. package/lib/extensions/Blockquote/Blockquote.d.ts +1 -1
  135. package/lib/extensions/Bold/Bold.d.ts +1 -1
  136. package/lib/extensions/Code/Code.d.ts +1 -1
  137. package/lib/extensions/CodeView/CodeView.d.ts +2 -2
  138. package/lib/extensions/Heading/Heading.d.ts +1 -1
  139. package/lib/extensions/Highlight/Highlight.d.ts +1 -1
  140. package/lib/extensions/HorizontalRule/HorizontalRule.d.ts +1 -1
  141. package/lib/extensions/ImportWord/ImportWord.d.ts +2 -2
  142. package/lib/extensions/Italic/Italic.d.ts +1 -1
  143. package/lib/extensions/Link/Link.d.ts +1 -1
  144. package/lib/extensions/MarkdownPaste/MarkdownPaste.d.ts +5 -0
  145. package/lib/extensions/MarkdownPaste/index.d.ts +1 -0
  146. package/lib/extensions/Mermaid/Mermaid.d.ts +1 -1
  147. package/lib/extensions/MoreMark/MoreMark.d.ts +1 -1
  148. package/lib/extensions/Strike/Strike.d.ts +1 -1
  149. package/lib/extensions/Table/Table.d.ts +1 -1
  150. package/lib/extensions/TextAlign/TextAlign.d.ts +1 -1
  151. package/lib/extensions/TextUnderline/TextUnderline.d.ts +1 -1
  152. package/lib/index-BUTn2LY6.cjs +1 -0
  153. package/lib/{index-C07N8gA1.js → index-BlXGgvT-.js} +21 -18
  154. package/lib/{index-DqruLhsu.js → index-BnW6t8z6.js} +23 -23
  155. package/lib/{index-BsFvo9PG.cjs → index-BqL4vAWE.cjs} +1 -1
  156. package/lib/index-BtxvYLJ1.cjs +12 -0
  157. package/lib/{index-Do_dsOGB.js → index-C6xmkxrQ.js} +232 -217
  158. package/lib/index-CJ9pyCM4.cjs +1 -0
  159. package/lib/{index-neeeY2o7.cjs → index-D0lc95kr.cjs} +3 -3
  160. package/lib/{index-RcSPeQHn.js → index-DHUN85fV.js} +571 -657
  161. package/lib/index-DUpSE1Gb.cjs +1 -0
  162. package/lib/index-D_8P0LE5.js +1362 -0
  163. package/lib/{index-BDYJ8Ph2.js → index-RIXs7STX.js} +1 -1
  164. package/lib/index-mfGK4pFo.js +6469 -0
  165. package/lib/index-zig3Dj7A.cjs +22 -0
  166. package/lib/index.cjs +1 -1
  167. package/lib/index.js +26 -34
  168. package/lib/locale-bundle.cjs +1 -1
  169. package/lib/locale-bundle.js +1 -1
  170. package/lib/plugins/image-upload.d.ts +1 -1
  171. package/lib/popover-BYSZ3zBi.js +24 -0
  172. package/lib/popover-BcHDZqBt.cjs +1 -0
  173. package/lib/{renderNodeView-BEkECnnY.js → renderNodeView-BrM5kUj_.js} +2 -2
  174. package/lib/{renderNodeView-DfLmGrgA.cjs → renderNodeView-D1zydtli.cjs} +1 -1
  175. package/lib/{select-CmV5uTXr.js → select-C5SHDLFj.js} +8 -5
  176. package/lib/{select-CYyIeImH.cjs → select-DHjzKkcu.cjs} +1 -1
  177. package/lib/{separator-BLp6xpSY.cjs → separator-BmixLrnJ.cjs} +1 -1
  178. package/lib/separator-CFKVxAea.js +293 -0
  179. package/lib/store/editor.d.ts +1 -1
  180. package/lib/store/store.d.ts +1 -1
  181. package/lib/style.css +1 -1
  182. package/lib/{textarea-Cn75Cm2n.cjs → textarea-CasDcv3u.cjs} +1 -1
  183. package/lib/{textarea-CkVKMPqK.js → textarea-DNLrJoRl.js} +1 -1
  184. package/lib/theme.js +1 -1
  185. package/lib/types.d.ts +3 -3
  186. package/lib/updatePosition-CBRjbQMH.js +16 -0
  187. package/lib/updatePosition-CfmY5Trk.cjs +1 -0
  188. package/lib/utils/columns.d.ts +1 -1
  189. package/lib/utils/pdf.d.ts +1 -1
  190. package/lib/utils/utils.d.ts +1 -1
  191. package/package.json +262 -247
  192. package/lib/ActionMenuButton-B_E2mbAW.cjs +0 -1
  193. package/lib/Drawer-DQ4CxBwG.js +0 -1373
  194. package/lib/Drawer-FUeUKshi.cjs +0 -1
  195. package/lib/Iframe-EVWXCqe4.cjs +0 -1
  196. package/lib/Indent-q9cEWAa_.cjs +0 -1
  197. package/lib/Katex-ClqcEnN_.cjs +0 -4
  198. package/lib/LinkEditBlock-DZXk4ln_.cjs +0 -5
  199. package/lib/Table-BmDopO43.cjs +0 -9
  200. package/lib/Twitter-BbMD3Ybp.cjs +0 -1
  201. package/lib/clsx-CXbNJWDD.cjs +0 -54
  202. package/lib/clsx-DaPvp9ji.js +0 -7391
  203. package/lib/index-BCzvbrf5.cjs +0 -12
  204. package/lib/index-BnVcq33n.cjs +0 -1
  205. package/lib/index-CjhjjJsN.cjs +0 -1
  206. package/lib/index-Cs6cp0Y6.cjs +0 -1
  207. package/lib/index-Qcl3BG94.js +0 -1351
  208. package/lib/popover-CtinPbiy.js +0 -24
  209. package/lib/popover-DIMT3pae.cjs +0 -1
  210. package/lib/separator-C7luvaG8.js +0 -327
  211. package/lib/updatePosition-Cjuj2E26.cjs +0 -1
  212. package/lib/updatePosition-DRmKQBGm.js +0 -16
@@ -1,17 +1,18 @@
1
1
  import { jsxs as C, jsx as n, Fragment as Y } from "react/jsx-runtime";
2
2
  import * as U from "react";
3
3
  import Q, { useState as L, useMemo as B, useCallback as ce, useEffect as ze, useRef as xe } from "react";
4
- import { Slot as st } from "@radix-ui/react-slot";
5
- import { y as jt, b as Pt, S as _t } from "./index-BG0kQamI.js";
4
+ import { y as Pt, b as jt, S as _t } from "./index-BG0kQamI.js";
6
5
  import "./theme.js";
7
6
  import * as F from "@radix-ui/react-dialog";
8
- import { NotebookPen as Ut, ExternalLink as Bt, X as lt, Loader2 as $t, WrapText as Ft, PencilRuler as Wt, FlipHorizontal as Gt, FlipVertical as Xt, CropIcon as Yt, ChevronUp as qt, Paperclip as Zt, Eye as Kt, Settings as Jt, ZoomOut as Qt, ZoomIn as er, BookMarked as tr, Sigma as rr, SmilePlusIcon as ir, Replace as Ye, SmilePlus as nr, Frame as or, Columns2 as qe, PanelRight as ar, PanelLeft as sr, Clipboard as lr, Copy as cr, GripVertical as dr, Plus as ur, Columns4 as hr, Columns3 as fr, Heading6 as mr, Heading5 as gr, Heading4 as pr, Heading3 as xr, Heading2 as br, Heading1 as vr, Pilcrow as wr, ChevronsUpDown as yr, Trash as Cr, Trash2 as kr, TableCellsSplit as Mr, TableCellsMerge as zr, BetweenVerticalEnd as Tr, BetweenVerticalStart as Ir, BetweenHorizonalStart as Sr, BetweenHorizonalEnd as Nr, Unlink as Ar, Pencil as Lr, Sparkles as Er, Table as Rr, Minimize as Vr, Maximize as Dr, Video as Hr, ImageUp as Or, Link as jr, ListTodo as Pr, ListOrdered as _r, List as Ur, IndentDecrease as Br, IndentIncrease as $r, Type as Fr, CodeXml as Wr, Code as Gr, Superscript as Xr, Subscript as Yr, ChevronDown as qr, Undo2 as Zr, Redo2 as Kr, PaintRoller as Jr, Eraser as Qr, Minus as ei, Strikethrough as ti, Quote as ri, Underline as ii, Italic as ni, LoaderCircle as oi, Bold as ai, Check as si } from "lucide-react";
9
- import { j as ct, N as dt, n as li, aa as ci, m as ut, h as di, a3 as ui, ab as hi, k as fi } from "./clsx-DaPvp9ji.js";
10
- import { I as Ze, i as Ke, j as mi, u as ne, V as gi } from "./index-C07N8gA1.js";
11
- import * as re from "@radix-ui/react-tabs";
7
+ import { NotebookPen as Ut, ExternalLink as Bt, X as st, Loader2 as $t, WrapText as Ft, PencilRuler as Wt, FlipHorizontal as Gt, FlipVertical as Xt, CropIcon as Yt, ChevronUp as qt, Paperclip as Zt, Eye as Kt, Settings as Jt, ZoomOut as Qt, ZoomIn as er, BookMarked as tr, Sigma as rr, SmilePlusIcon as ir, Replace as Ye, SmilePlus as nr, Frame as or, Columns2 as qe, PanelRight as ar, PanelLeft as sr, Clipboard as lr, Copy as cr, GripVertical as dr, Plus as ur, Columns4 as hr, Columns3 as fr, Heading6 as mr, Heading5 as gr, Heading4 as pr, Heading3 as xr, Heading2 as br, Heading1 as vr, Pilcrow as wr, ChevronsUpDown as yr, Trash as Cr, Trash2 as kr, TableCellsSplit as Mr, TableCellsMerge as zr, BetweenVerticalEnd as Tr, BetweenVerticalStart as Ir, BetweenHorizonalStart as Sr, BetweenHorizonalEnd as Nr, Unlink as Ar, Pencil as Lr, Sparkles as Er, Table as Rr, Minimize as Vr, Maximize as Dr, Video as Hr, ImageUp as Or, Link as Pr, ListTodo as jr, ListOrdered as _r, List as Ur, IndentDecrease as Br, IndentIncrease as $r, Type as Fr, CodeXml as Wr, Code as Gr, Superscript as Xr, Subscript as Yr, ChevronDown as qr, Undo2 as Zr, Redo2 as Kr, PaintRoller as Jr, Eraser as Qr, Minus as ei, Strikethrough as ti, Quote as ri, Underline as ii, Italic as ni, LoaderCircle as oi, Bold as ai, Check as si } from "lucide-react";
8
+ import { c as lt, N as li, u as ci, b as di, a as ui } from "./clsx-eGVyq7ot.js";
9
+ import { N as ct, n as hi, a6 as fi, m as dt } from "./index-mfGK4pFo.js";
10
+ import { I as Ze, i as Ke, j as mi, u as ne, V as gi } from "./index-BlXGgvT-.js";
11
+ import { Slot as ut } from "@radix-ui/react-slot";
12
+ import { TextAlignRightIcon as pi, TextAlignLeftIcon as xi, TextAlignJustifyIcon as bi, TextAlignCenterIcon as vi } from "@radix-ui/react-icons";
12
13
  import * as be from "@radix-ui/react-tooltip";
13
14
  import * as ht from "@radix-ui/react-toggle";
14
- import { TextAlignRightIcon as pi, TextAlignLeftIcon as xi, TextAlignJustifyIcon as bi, TextAlignCenterIcon as vi } from "@radix-ui/react-icons";
15
+ import * as re from "@radix-ui/react-tabs";
15
16
  import wi from "react-image-crop";
16
17
  import * as Oe from "@radix-ui/react-checkbox";
17
18
  import * as ft from "@radix-ui/react-label";
@@ -58,9 +59,9 @@ const _e = "-", yi = (e) => {
58
59
  validators: []
59
60
  };
60
61
  return zi(Object.entries(e.classGroups), r).forEach(([a, l]) => {
61
- je(l, i, a, t);
62
+ Pe(l, i, a, t);
62
63
  }), i;
63
- }, je = (e, t, r, i) => {
64
+ }, Pe = (e, t, r, i) => {
64
65
  e.forEach((o) => {
65
66
  if (typeof o == "string") {
66
67
  const a = o === "" ? t : Qe(t, o);
@@ -69,7 +70,7 @@ const _e = "-", yi = (e) => {
69
70
  }
70
71
  if (typeof o == "function") {
71
72
  if (Mi(o)) {
72
- je(o(i), t, r, i);
73
+ Pe(o(i), t, r, i);
73
74
  return;
74
75
  }
75
76
  t.validators.push({
@@ -79,7 +80,7 @@ const _e = "-", yi = (e) => {
79
80
  return;
80
81
  }
81
82
  Object.entries(o).forEach(([a, l]) => {
82
- je(l, Qe(t, a), r, i);
83
+ Pe(l, Qe(t, a), r, i);
83
84
  });
84
85
  });
85
86
  }, Qe = (e, t) => {
@@ -235,16 +236,16 @@ function Ri(e, ...t) {
235
236
  const V = (e) => {
236
237
  const t = (r) => r[e] || [];
237
238
  return t.isThemeGetter = !0, t;
238
- }, xt = /^\[(?:([a-z-]+):)?(.+)\]$/i, Vi = /^\d+\/\d+$/, Di = /* @__PURE__ */ new Set(["px", "full", "screen"]), Hi = /^(\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$/, ji = /^(rgba?|hsla?|hwb|(ok)?(lab|lch))\(.+\)$/, Pi = /^(inset_)?-?((\d+)?\.?(\d+)[a-z]+|0)_-?((\d+)?\.?(\d+)[a-z]+|0)/, _i = /^(url|image|image-set|cross-fade|element|(repeating-)?(linear|radial|conic)-gradient)\(.+\)$/, X = (e) => ie(e) || Di.has(e) || Vi.test(e), K = (e) => oe(e, "length", Yi), ie = (e) => !!e && !Number.isNaN(Number(e)), Le = (e) => oe(e, "number", ie), de = (e) => !!e && Number.isInteger(Number(e)), Ui = (e) => e.endsWith("%") && ie(e.slice(0, -1)), T = (e) => xt.test(e), J = (e) => Hi.test(e), Bi = /* @__PURE__ */ new Set(["length", "size", "percentage"]), $i = (e) => oe(e, Bi, bt), Fi = (e) => oe(e, "position", bt), Wi = /* @__PURE__ */ new Set(["image", "url"]), Gi = (e) => oe(e, Wi, Zi), Xi = (e) => oe(e, "", qi), ue = () => !0, oe = (e, t, r) => {
239
+ }, xt = /^\[(?:([a-z-]+):)?(.+)\]$/i, Vi = /^\d+\/\d+$/, Di = /* @__PURE__ */ new Set(["px", "full", "screen"]), Hi = /^(\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$/, Pi = /^(rgba?|hsla?|hwb|(ok)?(lab|lch)|color-mix)\(.+\)$/, ji = /^(inset_)?-?((\d+)?\.?(\d+)[a-z]+|0)_-?((\d+)?\.?(\d+)[a-z]+|0)/, _i = /^(url|image|image-set|cross-fade|element|(repeating-)?(linear|radial|conic)-gradient)\(.+\)$/, X = (e) => ie(e) || Di.has(e) || Vi.test(e), K = (e) => oe(e, "length", Yi), ie = (e) => !!e && !Number.isNaN(Number(e)), Le = (e) => oe(e, "number", ie), de = (e) => !!e && Number.isInteger(Number(e)), Ui = (e) => e.endsWith("%") && ie(e.slice(0, -1)), T = (e) => xt.test(e), J = (e) => Hi.test(e), Bi = /* @__PURE__ */ new Set(["length", "size", "percentage"]), $i = (e) => oe(e, Bi, bt), Fi = (e) => oe(e, "position", bt), Wi = /* @__PURE__ */ new Set(["image", "url"]), Gi = (e) => oe(e, Wi, Zi), Xi = (e) => oe(e, "", qi), ue = () => !0, oe = (e, t, r) => {
239
240
  const i = xt.exec(e);
240
241
  return i ? i[1] ? typeof t == "string" ? i[1] === t : t.has(i[1]) : r(i[2]) : !1;
241
242
  }, Yi = (e) => (
242
243
  // `colorFunctionRegex` check is necessary because color functions can have percentages in them which which would be incorrectly classified as lengths.
243
244
  // For example, `hsl(0 0% 0%)` would be classified as a length without this check.
244
245
  // I could also use lookbehind assertion in `lengthUnitRegex` but that isn't supported widely enough.
245
- Oi.test(e) && !ji.test(e)
246
- ), bt = () => !1, qi = (e) => Pi.test(e), Zi = (e) => _i.test(e), Ki = () => {
247
- const e = V("colors"), t = V("spacing"), r = V("blur"), i = V("brightness"), o = V("borderColor"), a = V("borderRadius"), l = V("borderSpacing"), s = V("borderWidth"), c = V("contrast"), d = V("grayscale"), g = V("hueRotate"), p = V("invert"), u = V("gap"), k = V("gradientColorStops"), b = V("gradientColorStopPositions"), z = V("inset"), f = V("margin"), x = V("opacity"), h = V("padding"), S = V("saturate"), m = V("scale"), D = V("sepia"), v = V("skew"), R = V("space"), N = V("translate"), j = () => ["auto", "contain", "none"], H = () => ["auto", "hidden", "clip", "visible", "scroll"], M = () => ["auto", T, t], w = () => [T, t], y = () => ["", X, K], I = () => ["auto", ie, T], E = () => ["bottom", "center", "left", "left-bottom", "left-top", "right", "right-bottom", "right-top", "top"], A = () => ["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"], O = () => ["start", "end", "center", "between", "around", "evenly", "stretch"], G = () => ["", "0", T], ye = () => ["auto", "avoid", "all", "avoid-page", "page", "left", "right", "column"], W = () => [ie, T];
246
+ Oi.test(e) && !Pi.test(e)
247
+ ), bt = () => !1, qi = (e) => ji.test(e), Zi = (e) => _i.test(e), Ki = () => {
248
+ const e = V("colors"), t = V("spacing"), r = V("blur"), i = V("brightness"), o = V("borderColor"), a = V("borderRadius"), l = V("borderSpacing"), s = V("borderWidth"), c = V("contrast"), d = V("grayscale"), g = V("hueRotate"), p = V("invert"), u = V("gap"), k = V("gradientColorStops"), b = V("gradientColorStopPositions"), z = V("inset"), f = V("margin"), x = V("opacity"), h = V("padding"), S = V("saturate"), m = V("scale"), D = V("sepia"), v = V("skew"), R = V("space"), N = V("translate"), P = () => ["auto", "contain", "none"], H = () => ["auto", "hidden", "clip", "visible", "scroll"], M = () => ["auto", T, t], w = () => [T, t], y = () => ["", X, K], I = () => ["auto", ie, T], E = () => ["bottom", "center", "left", "left-bottom", "left-top", "right", "right-bottom", "right-top", "top"], A = () => ["solid", "dashed", "dotted", "double", "none"], j = () => ["normal", "multiply", "screen", "overlay", "darken", "lighten", "color-dodge", "color-burn", "hard-light", "soft-light", "difference", "exclusion", "hue", "saturation", "color", "luminosity"], O = () => ["start", "end", "center", "between", "around", "evenly", "stretch"], G = () => ["", "0", T], ye = () => ["auto", "avoid", "all", "avoid-page", "page", "left", "right", "column"], W = () => [ie, T];
248
249
  return {
249
250
  cacheSize: 500,
250
251
  separator: ":",
@@ -395,21 +396,21 @@ const V = (e) => {
395
396
  * @see https://tailwindcss.com/docs/overscroll-behavior
396
397
  */
397
398
  overscroll: [{
398
- overscroll: j()
399
+ overscroll: P()
399
400
  }],
400
401
  /**
401
402
  * Overscroll Behavior X
402
403
  * @see https://tailwindcss.com/docs/overscroll-behavior
403
404
  */
404
405
  "overscroll-x": [{
405
- "overscroll-x": j()
406
+ "overscroll-x": P()
406
407
  }],
407
408
  /**
408
409
  * Overscroll Behavior Y
409
410
  * @see https://tailwindcss.com/docs/overscroll-behavior
410
411
  */
411
412
  "overscroll-y": [{
412
- "overscroll-y": j()
413
+ "overscroll-y": P()
413
414
  }],
414
415
  /**
415
416
  * Position
@@ -1638,14 +1639,14 @@ const V = (e) => {
1638
1639
  * @see https://tailwindcss.com/docs/mix-blend-mode
1639
1640
  */
1640
1641
  "mix-blend": [{
1641
- "mix-blend": [...P(), "plus-lighter", "plus-darker"]
1642
+ "mix-blend": [...j(), "plus-lighter", "plus-darker"]
1642
1643
  }],
1643
1644
  /**
1644
1645
  * Background Blend Mode
1645
1646
  * @see https://tailwindcss.com/docs/background-blend-mode
1646
1647
  */
1647
1648
  "bg-blend": [{
1648
- "bg-blend": P()
1649
+ "bg-blend": j()
1649
1650
  }],
1650
1651
  // Filters
1651
1652
  /**
@@ -2274,7 +2275,7 @@ const V = (e) => {
2274
2275
  };
2275
2276
  }, Ji = /* @__PURE__ */ Ri(Ki);
2276
2277
  function _(...e) {
2277
- return Ji(ct(e));
2278
+ return Ji(lt(e));
2278
2279
  }
2279
2280
  let Ee;
2280
2281
  function Re() {
@@ -2306,7 +2307,7 @@ const vt = Q.forwardRef(
2306
2307
  initialDisplayedColor: b = void 0,
2307
2308
  dataState: z = !1,
2308
2309
  ...f
2309
- } = e, x = wt[r], h = u ? st : yt, S = (m) => {
2310
+ } = e, x = wt[r], h = u ? ut : yt, S = (m) => {
2310
2311
  if (o) {
2311
2312
  m.preventDefault();
2312
2313
  return;
@@ -2317,7 +2318,7 @@ const vt = Q.forwardRef(
2317
2318
  /* @__PURE__ */ n(An, { asChild: !0, children: /* @__PURE__ */ C(
2318
2319
  h,
2319
2320
  {
2320
- className: _("richtext-w-[32px] richtext-h-[32px]", a),
2321
+ className: _("richtext-h-[32px] richtext-w-[32px]", a),
2321
2322
  "data-state": z ? "on" : "off",
2322
2323
  disabled: o,
2323
2324
  onClick: S,
@@ -2330,17 +2331,10 @@ const vt = Q.forwardRef(
2330
2331
  ]
2331
2332
  }
2332
2333
  ) }),
2333
- i && /* @__PURE__ */ n(
2334
- Ct,
2335
- {
2336
- ...c,
2337
- className: "richtext-tooltip",
2338
- children: /* @__PURE__ */ C("div", { className: "richtext-flex richtext-max-w-24 richtext-flex-col richtext-items-center richtext-text-center", children: [
2339
- /* @__PURE__ */ n("div", { children: i }),
2340
- !!(s != null && s.length) && /* @__PURE__ */ n("span", { children: en(s) })
2341
- ] })
2342
- }
2343
- )
2334
+ i && /* @__PURE__ */ n(Ct, { ...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: [
2335
+ /* @__PURE__ */ n("div", { children: i }),
2336
+ !!(s != null && s.length) && /* @__PURE__ */ n("span", { children: en(s) })
2337
+ ] }) })
2344
2338
  ] });
2345
2339
  }
2346
2340
  );
@@ -2374,7 +2368,7 @@ function nn() {
2374
2368
  xmlnsXlink: "http://www.w3.org/1999/xlink",
2375
2369
  "aria-hidden": "true",
2376
2370
  role: "img",
2377
- className: "richtext-w-4 richtext-h-4",
2371
+ className: "richtext-h-4 richtext-w-4",
2378
2372
  width: "1em",
2379
2373
  height: "1em",
2380
2374
  viewBox: "0 0 24 24",
@@ -2401,7 +2395,7 @@ function on() {
2401
2395
  xmlnsXlink: "http://www.w3.org/1999/xlink",
2402
2396
  "aria-hidden": "true",
2403
2397
  role: "img",
2404
- className: "richtext-w-4 richtext-h-4",
2398
+ className: "richtext-h-4 richtext-w-4",
2405
2399
  width: "1em",
2406
2400
  height: "1em",
2407
2401
  viewBox: "0 0 24 24",
@@ -2431,7 +2425,13 @@ function an(e) {
2431
2425
  }
2432
2426
  function fe(e) {
2433
2427
  const t = wt[e.name];
2434
- return t ? /* @__PURE__ */ n(t, { onClick: e == null ? void 0 : e.onClick, className: `richtext-w-4 richtext-h-4 ${(e == null ? void 0 : e.className) || ""}` }) : null;
2428
+ return t ? /* @__PURE__ */ n(
2429
+ t,
2430
+ {
2431
+ onClick: e == null ? void 0 : e.onClick,
2432
+ className: `richtext-h-4 richtext-w-4 ${(e == null ? void 0 : e.className) || ""}`
2433
+ }
2434
+ ) : null;
2435
2435
  }
2436
2436
  function sn(e) {
2437
2437
  return /* @__PURE__ */ n("svg", { xmlns: "http://www.w3.org/2000/svg", width: "1em", height: "1em", viewBox: "0 0 24 24", ...e, children: /* @__PURE__ */ n(
@@ -2498,21 +2498,69 @@ function hn() {
2498
2498
  ) });
2499
2499
  }
2500
2500
  function fn() {
2501
- return /* @__PURE__ */ n("svg", { xmlns: "http://www.w3.org/2000/svg", width: "1em", height: "1em", viewBox: "0 0 24 24", children: /* @__PURE__ */ n("path", { fill: "none", stroke: "currentColor", strokeLinecap: "round", strokeLinejoin: "round", strokeWidth: "2", d: "M14 4h4a1 1 0 0 1 1 1v14a1 1 0 0 1-1 1h-4a1 1 0 0 1-1-1V5a1 1 0 0 1 1-1m-9 8h4m-2-2v4" }) });
2501
+ return /* @__PURE__ */ n("svg", { xmlns: "http://www.w3.org/2000/svg", width: "1em", height: "1em", viewBox: "0 0 24 24", children: /* @__PURE__ */ n(
2502
+ "path",
2503
+ {
2504
+ fill: "none",
2505
+ stroke: "currentColor",
2506
+ strokeLinecap: "round",
2507
+ strokeLinejoin: "round",
2508
+ strokeWidth: "2",
2509
+ d: "M14 4h4a1 1 0 0 1 1 1v14a1 1 0 0 1-1 1h-4a1 1 0 0 1-1-1V5a1 1 0 0 1 1-1m-9 8h4m-2-2v4"
2510
+ }
2511
+ ) });
2502
2512
  }
2503
2513
  function mn() {
2504
- return /* @__PURE__ */ n("svg", { xmlns: "http://www.w3.org/2000/svg", width: "1em", height: "1em", viewBox: "0 0 24 24", children: /* @__PURE__ */ n("path", { fill: "none", stroke: "currentColor", strokeLinecap: "round", strokeLinejoin: "round", strokeWidth: "2", d: "M6 4h4a1 1 0 0 1 1 1v14a1 1 0 0 1-1 1H6a1 1 0 0 1-1-1V5a1 1 0 0 1 1-1m9 8h4m-2-2v4" }) });
2514
+ return /* @__PURE__ */ n("svg", { xmlns: "http://www.w3.org/2000/svg", width: "1em", height: "1em", viewBox: "0 0 24 24", children: /* @__PURE__ */ n(
2515
+ "path",
2516
+ {
2517
+ fill: "none",
2518
+ stroke: "currentColor",
2519
+ strokeLinecap: "round",
2520
+ strokeLinejoin: "round",
2521
+ strokeWidth: "2",
2522
+ d: "M6 4h4a1 1 0 0 1 1 1v14a1 1 0 0 1-1 1H6a1 1 0 0 1-1-1V5a1 1 0 0 1 1-1m9 8h4m-2-2v4"
2523
+ }
2524
+ ) });
2505
2525
  }
2506
2526
  function gn() {
2507
- return /* @__PURE__ */ n("svg", { xmlns: "http://www.w3.org/2000/svg", width: "1em", height: "1em", viewBox: "0 0 24 24", children: /* @__PURE__ */ n("path", { fill: "none", stroke: "currentColor", strokeLinecap: "round", strokeLinejoin: "round", strokeWidth: "2", d: "M12 21v-4m0-4V9m0-4V3m-2 18h4M8 5v4h11l2-2l-2-2zm6 8v4H6l-2-2l2-2z" }) });
2527
+ return /* @__PURE__ */ n("svg", { xmlns: "http://www.w3.org/2000/svg", width: "1em", height: "1em", viewBox: "0 0 24 24", children: /* @__PURE__ */ n(
2528
+ "path",
2529
+ {
2530
+ fill: "none",
2531
+ stroke: "currentColor",
2532
+ strokeLinecap: "round",
2533
+ strokeLinejoin: "round",
2534
+ strokeWidth: "2",
2535
+ d: "M12 21v-4m0-4V9m0-4V3m-2 18h4M8 5v4h11l2-2l-2-2zm6 8v4H6l-2-2l2-2z"
2536
+ }
2537
+ ) });
2508
2538
  }
2509
2539
  function pn() {
2510
- return /* @__PURE__ */ n("svg", { xmlns: "http://www.w3.org/2000/svg", width: "1em", height: "1em", viewBox: "0 0 24 24", children: /* @__PURE__ */ n("path", { fill: "currentColor", d: "M23.943 19.806a.2.2 0 0 0-.168-.034c-1.26-1.855-2.873-3.61-4.419-5.315l-.252-.284c-.001-.073-.067-.12-.134-.15l-.084-.084c-.05-.1-.169-.167-.286-.1c-.47.234-.907.585-1.327.919c-.554.434-1.109.87-1.63 1.354a5 5 0 0 0-.588.618c-.084.117-.017.217.084.267c-.37.368-.74.736-1.109 1.12a.2.2 0 0 0-.05.134c0 .05.033.1.067.117l.655.502v.016c.924.92 2.554 2.173 4.285 3.527c.251.201.52.402.773.602c.117.134.234.285.335.418c.05.066.169.084.236.033c.033.034.084.067.118.1a.24.24 0 0 0 .1.034a.15.15 0 0 0 .135-.066a.24.24 0 0 0 .033-.1c.017 0 .017.016.034.016a.2.2 0 0 0 .134-.05l3.058-3.327c.12-.116.014-.267 0-.267m-7.628-.134l-1.546-1.17l-.15-.1c-.035-.017-.068-.05-.102-.067l-.117-.1c.66-.66 1.33-1.308 2-1.956c-.488.484-1.463 1.906-1.261 2.373c.002 0 .018.042.067.084zm4.1 3.126l-1.277-.97a27 27 0 0 0-1.58-1.504c.69.518 1.277.97 1.361 1.053c.673.585.638.485 1.093.87l.554.4c-.074.103-.151.148-.151.151m.336.25l-.034-.016a1 1 0 0 0 .152-.117zM.588 3.476c.033.217.084.435.117.636c.201 1.103.403 2.106.772 2.858l.152.568c.05.217.134.485.219.552a67 67 0 0 0 3.578 2.942a.18.18 0 0 0 .219 0s0 .016.016.016a.15.15 0 0 0 .118.05a.2.2 0 0 0 .134-.05c1.798-1.989 3.142-3.627 4.1-4.998c.068-.066.084-.167.084-.25c.067-.067.118-.151.185-.201c.067-.067.067-.184 0-.235l-.017-.016c0-.033-.017-.084-.05-.1c-.42-.401-.722-.685-1.042-.986a94 94 0 0 1-2.352-2.273c-.017-.017-.034-.034-.067-.034c-.336-.117-1.025-.234-1.882-.385c-1.277-.216-3.008-.517-4.57-.986c0 0-.101 0-.118.017l-.05.05C.05.714.022.707 0 .718c.017.1.017.167.05.284c0 .033.068.301.068.334zm7.19 4.78l-.033.034a.036.036 0 0 1 .033-.034M6.553 2.238c.101.1.521.502.622.585c-.437-.2-1.529-.702-2.034-.869c.505.1 1.194.201 1.412.284M.79 1.403c.252.434.454 1.939.655 3.41c-.118-.469-.201-.936-.302-1.372C.992 2.673.84 1.988.638 1.386c.124 0 .152.021.152.017m-.286-.369c0-.016 0-.033-.017-.033c.085 0 .135.017.202.05c0 .006-.145-.017-.185-.017m23.17-.217c.017-.066-.336-.367-.219-.384c.253-.017.253-.401 0-.401c-.335.017-.688.1-1.008.15c-.587.117-1.192.234-1.78.367a80 80 0 0 0-3.949.937c-.403.117-.857.2-1.243.401c-.135.067-.118.2-.05.284c-.034.017-.051.017-.085.034c-.117.017-.218.034-.335.05c-.102.017-.152.1-.135.2c0 .017.017.05.017.067c-.706.936-1.496 1.923-2.353 2.976c-.84.969-1.73 1.989-2.62 3.042c-2.84 3.31-6.05 7.07-9.594 10.38a.16.16 0 0 0 0 .234c.016.016.033.033.05.033c-.05.05-.101.085-.152.134q-.05.05-.05.1a.4.4 0 0 0-.067.084c-.067.067-.067.184.017.234c.067.066.185.066.235-.017c.017-.017.017-.033.033-.033a.265.265 0 0 1 .37 0c.202.217.404.435.588.618l-.42-.35c-.067-.067-.184-.05-.234.016c-.068.066-.051.184.016.234l4.469 3.727c.034.034.067.034.118.034a.15.15 0 0 0 .117-.05l.101-.1c.017.016.05.016.067.016c.05 0 .084-.016.118-.05c6.049-6.05 10.922-10.614 16.5-14.693c.05-.033.067-.1.067-.15c.067 0 .118-.05.15-.117c1.026-3.125 1.228-5.9 1.295-7.27c0-.059.016-.038.016-.068c.017-.033.017-.05.017-.05a.98.98 0 0 0-.067-.619m-10.82 4.915c.268-.301.537-.619.806-.903c-1.73 2.273-4.603 5.767-8.67 9.929c2.773-3.059 5.562-6.218 7.864-9.026M5.14 23.466c-.016-.017-.016-.017 0-.017zm2.504-2.156c.135-.15.27-.284.42-.434c0 0 0 .016.017.016c-.224.198-.433.418-.437.418m.69-.668c.099-.1.14-.173.284-.318c.992-1.02 2.017-2.04 3.059-3.076l.016-.016c.252-.2.555-.418.824-.619a228 228 0 0 0-4.184 4.029M14.852 3.91c-.554.719-1.176 1.671-1.697 2.423c-1.646 2.374-6.94 8.174-7.057 8.274a1190 1190 0 0 1-4.839 4.597l-.1.1c-.085-.1-.085-.25.016-.334C8.652 11.966 13.19 6.133 15.021 3.576c-.05.116-.084.216-.168.334zm2.906 3.427c-.671-.386-.99-.987-.806-1.572l.05-.2a.8.8 0 0 1 .085-.167a1.9 1.9 0 0 1 .756-.703c.016 0 .033 0 .05-.016c-.017-.034-.017-.084-.017-.134c.017-.1.085-.167.202-.167c.202 0 .824.184 1.059.384c.067.05.134.117.202.184c.084.1.218.268.285.401c.034.017.067.184.118.268c.033.134.067.284.05.418c-.017.016 0 .116-.017.116a1.6 1.6 0 0 1-.218.619c-.03.03.006.012-.05.067a1.2 1.2 0 0 1-.32.334a1.49 1.49 0 0 1-1.26.234a2 2 0 0 0-.169-.066m4.37 1.403c0 .017-.017.05 0 .067c-.034 0-.05.017-.085.034a110 110 0 0 0-3.915 3.025c1.11-.986 2.218-1.989 3.378-2.975c.336-.301.571-.686.638-1.12l.168-1.003v-.033c.085-.201.404-.118.353.1c-.004-.001-.173.795-.537 1.905" }) });
2540
+ return /* @__PURE__ */ n("svg", { xmlns: "http://www.w3.org/2000/svg", width: "1em", height: "1em", viewBox: "0 0 24 24", children: /* @__PURE__ */ n(
2541
+ "path",
2542
+ {
2543
+ fill: "currentColor",
2544
+ d: "M23.943 19.806a.2.2 0 0 0-.168-.034c-1.26-1.855-2.873-3.61-4.419-5.315l-.252-.284c-.001-.073-.067-.12-.134-.15l-.084-.084c-.05-.1-.169-.167-.286-.1c-.47.234-.907.585-1.327.919c-.554.434-1.109.87-1.63 1.354a5 5 0 0 0-.588.618c-.084.117-.017.217.084.267c-.37.368-.74.736-1.109 1.12a.2.2 0 0 0-.05.134c0 .05.033.1.067.117l.655.502v.016c.924.92 2.554 2.173 4.285 3.527c.251.201.52.402.773.602c.117.134.234.285.335.418c.05.066.169.084.236.033c.033.034.084.067.118.1a.24.24 0 0 0 .1.034a.15.15 0 0 0 .135-.066a.24.24 0 0 0 .033-.1c.017 0 .017.016.034.016a.2.2 0 0 0 .134-.05l3.058-3.327c.12-.116.014-.267 0-.267m-7.628-.134l-1.546-1.17l-.15-.1c-.035-.017-.068-.05-.102-.067l-.117-.1c.66-.66 1.33-1.308 2-1.956c-.488.484-1.463 1.906-1.261 2.373c.002 0 .018.042.067.084zm4.1 3.126l-1.277-.97a27 27 0 0 0-1.58-1.504c.69.518 1.277.97 1.361 1.053c.673.585.638.485 1.093.87l.554.4c-.074.103-.151.148-.151.151m.336.25l-.034-.016a1 1 0 0 0 .152-.117zM.588 3.476c.033.217.084.435.117.636c.201 1.103.403 2.106.772 2.858l.152.568c.05.217.134.485.219.552a67 67 0 0 0 3.578 2.942a.18.18 0 0 0 .219 0s0 .016.016.016a.15.15 0 0 0 .118.05a.2.2 0 0 0 .134-.05c1.798-1.989 3.142-3.627 4.1-4.998c.068-.066.084-.167.084-.25c.067-.067.118-.151.185-.201c.067-.067.067-.184 0-.235l-.017-.016c0-.033-.017-.084-.05-.1c-.42-.401-.722-.685-1.042-.986a94 94 0 0 1-2.352-2.273c-.017-.017-.034-.034-.067-.034c-.336-.117-1.025-.234-1.882-.385c-1.277-.216-3.008-.517-4.57-.986c0 0-.101 0-.118.017l-.05.05C.05.714.022.707 0 .718c.017.1.017.167.05.284c0 .033.068.301.068.334zm7.19 4.78l-.033.034a.036.036 0 0 1 .033-.034M6.553 2.238c.101.1.521.502.622.585c-.437-.2-1.529-.702-2.034-.869c.505.1 1.194.201 1.412.284M.79 1.403c.252.434.454 1.939.655 3.41c-.118-.469-.201-.936-.302-1.372C.992 2.673.84 1.988.638 1.386c.124 0 .152.021.152.017m-.286-.369c0-.016 0-.033-.017-.033c.085 0 .135.017.202.05c0 .006-.145-.017-.185-.017m23.17-.217c.017-.066-.336-.367-.219-.384c.253-.017.253-.401 0-.401c-.335.017-.688.1-1.008.15c-.587.117-1.192.234-1.78.367a80 80 0 0 0-3.949.937c-.403.117-.857.2-1.243.401c-.135.067-.118.2-.05.284c-.034.017-.051.017-.085.034c-.117.017-.218.034-.335.05c-.102.017-.152.1-.135.2c0 .017.017.05.017.067c-.706.936-1.496 1.923-2.353 2.976c-.84.969-1.73 1.989-2.62 3.042c-2.84 3.31-6.05 7.07-9.594 10.38a.16.16 0 0 0 0 .234c.016.016.033.033.05.033c-.05.05-.101.085-.152.134q-.05.05-.05.1a.4.4 0 0 0-.067.084c-.067.067-.067.184.017.234c.067.066.185.066.235-.017c.017-.017.017-.033.033-.033a.265.265 0 0 1 .37 0c.202.217.404.435.588.618l-.42-.35c-.067-.067-.184-.05-.234.016c-.068.066-.051.184.016.234l4.469 3.727c.034.034.067.034.118.034a.15.15 0 0 0 .117-.05l.101-.1c.017.016.05.016.067.016c.05 0 .084-.016.118-.05c6.049-6.05 10.922-10.614 16.5-14.693c.05-.033.067-.1.067-.15c.067 0 .118-.05.15-.117c1.026-3.125 1.228-5.9 1.295-7.27c0-.059.016-.038.016-.068c.017-.033.017-.05.017-.05a.98.98 0 0 0-.067-.619m-10.82 4.915c.268-.301.537-.619.806-.903c-1.73 2.273-4.603 5.767-8.67 9.929c2.773-3.059 5.562-6.218 7.864-9.026M5.14 23.466c-.016-.017-.016-.017 0-.017zm2.504-2.156c.135-.15.27-.284.42-.434c0 0 0 .016.017.016c-.224.198-.433.418-.437.418m.69-.668c.099-.1.14-.173.284-.318c.992-1.02 2.017-2.04 3.059-3.076l.016-.016c.252-.2.555-.418.824-.619a228 228 0 0 0-4.184 4.029M14.852 3.91c-.554.719-1.176 1.671-1.697 2.423c-1.646 2.374-6.94 8.174-7.057 8.274a1190 1190 0 0 1-4.839 4.597l-.1.1c-.085-.1-.085-.25.016-.334C8.652 11.966 13.19 6.133 15.021 3.576c-.05.116-.084.216-.168.334zm2.906 3.427c-.671-.386-.99-.987-.806-1.572l.05-.2a.8.8 0 0 1 .085-.167a1.9 1.9 0 0 1 .756-.703c.016 0 .033 0 .05-.016c-.017-.034-.017-.084-.017-.134c.017-.1.085-.167.202-.167c.202 0 .824.184 1.059.384c.067.05.134.117.202.184c.084.1.218.268.285.401c.034.017.067.184.118.268c.033.134.067.284.05.418c-.017.016 0 .116-.017.116a1.6 1.6 0 0 1-.218.619c-.03.03.006.012-.05.067a1.2 1.2 0 0 1-.32.334a1.49 1.49 0 0 1-1.26.234a2 2 0 0 0-.169-.066m4.37 1.403c0 .017-.017.05 0 .067c-.034 0-.05.017-.085.034a110 110 0 0 0-3.915 3.025c1.11-.986 2.218-1.989 3.378-2.975c.336-.301.571-.686.638-1.12l.168-1.003v-.033c.085-.201.404-.118.353.1c-.004-.001-.173.795-.537 1.905"
2545
+ }
2546
+ ) });
2511
2547
  }
2512
2548
  function xn() {
2513
2549
  return /* @__PURE__ */ C("svg", { xmlns: "http://www.w3.org/2000/svg", width: "1em", height: "1em", viewBox: "0 0 32 32", children: [
2514
- /* @__PURE__ */ n("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" }),
2515
- /* @__PURE__ */ n("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" })
2550
+ /* @__PURE__ */ n(
2551
+ "path",
2552
+ {
2553
+ fill: "currentColor",
2554
+ 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"
2555
+ }
2556
+ ),
2557
+ /* @__PURE__ */ n(
2558
+ "path",
2559
+ {
2560
+ fill: "currentColor",
2561
+ 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"
2562
+ }
2563
+ )
2516
2564
  ] });
2517
2565
  }
2518
2566
  function bn() {
@@ -2544,50 +2592,38 @@ function bn() {
2544
2592
  );
2545
2593
  }
2546
2594
  function vn() {
2547
- return /* @__PURE__ */ n(
2548
- "svg",
2595
+ return /* @__PURE__ */ n("svg", { height: "1em", viewBox: "0 0 15 15", width: "1em", xmlns: "http://www.w3.org/2000/svg", children: /* @__PURE__ */ n(
2596
+ "path",
2549
2597
  {
2550
- height: "1em",
2551
- viewBox: "0 0 15 15",
2552
- width: "1em",
2553
- xmlns: "http://www.w3.org/2000/svg",
2554
- children: /* @__PURE__ */ n(
2555
- "path",
2556
- {
2557
- d: "M2.5 10.5H2v.5h.5zm2 0v.5H5v-.5zm9-7h.5v-.207l-.146-.147zm-3-3l.354-.354L10.707 0H10.5zM2 6v4.5h1V6zm.5 5h2v-1h-2zm2.5-.5v-2H4v2zM3 7h2V6H3zM2 5V1.5H1V5zm11-1.5V5h1V3.5zM2.5 1h8V0h-8zm7.646-.146l3 3l.708-.708l-3-3zM2 1.5a.5.5 0 0 1 .5-.5V0A1.5 1.5 0 0 0 1 1.5zM1 12v1.5h1V12zm1.5 3h10v-1h-10zM14 13.5V12h-1v1.5zM12.5 15a1.5 1.5 0 0 0 1.5-1.5h-1a.5.5 0 0 1-.5.5zM1 13.5A1.5 1.5 0 0 0 2.5 15v-1a.5.5 0 0 1-.5-.5zM6 7h3V6H6zm0 4h3v-1H6zm1-4.5v4h1v-4zm3.5.5H13V6h-2.5zM10 6v5h1V6zm.5 3H12V8h-1.5z",
2558
- fill: "currentColor"
2559
- }
2560
- )
2598
+ d: "M2.5 10.5H2v.5h.5zm2 0v.5H5v-.5zm9-7h.5v-.207l-.146-.147zm-3-3l.354-.354L10.707 0H10.5zM2 6v4.5h1V6zm.5 5h2v-1h-2zm2.5-.5v-2H4v2zM3 7h2V6H3zM2 5V1.5H1V5zm11-1.5V5h1V3.5zM2.5 1h8V0h-8zm7.646-.146l3 3l.708-.708l-3-3zM2 1.5a.5.5 0 0 1 .5-.5V0A1.5 1.5 0 0 0 1 1.5zM1 12v1.5h1V12zm1.5 3h10v-1h-10zM14 13.5V12h-1v1.5zM12.5 15a1.5 1.5 0 0 0 1.5-1.5h-1a.5.5 0 0 1-.5.5zM1 13.5A1.5 1.5 0 0 0 2.5 15v-1a.5.5 0 0 1-.5-.5zM6 7h3V6H6zm0 4h3v-1H6zm1-4.5v4h1v-4zm3.5.5H13V6h-2.5zM10 6v5h1V6zm.5 3H12V8h-1.5z",
2599
+ fill: "currentColor"
2561
2600
  }
2562
- );
2601
+ ) });
2563
2602
  }
2564
2603
  function wn() {
2565
- return /* @__PURE__ */ n(
2566
- "svg",
2604
+ return /* @__PURE__ */ n("svg", { height: "1em", viewBox: "0 0 24 24", width: "1em", xmlns: "http://www.w3.org/2000/svg", children: /* @__PURE__ */ C(
2605
+ "g",
2567
2606
  {
2568
- height: "1em",
2569
- viewBox: "0 0 24 24",
2570
- width: "1em",
2571
- xmlns: "http://www.w3.org/2000/svg",
2572
- children: /* @__PURE__ */ C(
2573
- "g",
2574
- {
2575
- fill: "none",
2576
- stroke: "currentColor",
2577
- strokeLinecap: "round",
2578
- strokeLinejoin: "round",
2579
- strokeWidth: "2",
2580
- children: [
2581
- /* @__PURE__ */ n("path", { d: "M14 3v4a1 1 0 0 0 1 1h4" }),
2582
- /* @__PURE__ */ n("path", { d: "M5 12V5a2 2 0 0 1 2-2h7l5 5v4M2 21v-6m3 0v6m-3-3h3m15-3v6h2m-9 0v-6l2 3l2-3v6m-9.5-6h3M9 15v6" })
2583
- ]
2584
- }
2585
- )
2607
+ fill: "none",
2608
+ stroke: "currentColor",
2609
+ strokeLinecap: "round",
2610
+ strokeLinejoin: "round",
2611
+ strokeWidth: "2",
2612
+ children: [
2613
+ /* @__PURE__ */ n("path", { d: "M14 3v4a1 1 0 0 0 1 1h4" }),
2614
+ /* @__PURE__ */ n("path", { d: "M5 12V5a2 2 0 0 1 2-2h7l5 5v4M2 21v-6m3 0v6m-3-3h3m15-3v6h2m-9 0v-6l2 3l2-3v6m-9.5-6h3M9 15v6" })
2615
+ ]
2586
2616
  }
2587
- );
2617
+ ) });
2588
2618
  }
2589
2619
  function yn() {
2590
- return /* @__PURE__ */ n("svg", { xmlns: "http://www.w3.org/2000/svg", width: "1em", height: "1em", viewBox: "0 0 20 20", children: /* @__PURE__ */ n("path", { fill: "currentColor", d: "M6.5 3a.75.75 0 0 1 .697.471l3 7.5a.75.75 0 0 1-1.393.557L7.992 9.5H5.008l-.811 2.028a.75.75 0 0 1-1.393-.556l3-7.5A.75.75 0 0 1 6.5 3m0 2.77L5.608 8h1.784zm8.28-1.55a.75.75 0 1 0-1.06 1.06l.72.72h-3.69a.75.75 0 0 0 0 1.5h3.69l-.72.72a.75.75 0 0 0 1.06 1.06l2-2a.75.75 0 0 0 0-1.06zm0 7.5a.75.75 0 1 0-1.06 1.06l.72.72H3.75a.75.75 0 0 0 0 1.5h10.69l-.72.72a.75.75 0 1 0 1.06 1.06l2-2a.75.75 0 0 0 0-1.06z" }) });
2620
+ return /* @__PURE__ */ n("svg", { xmlns: "http://www.w3.org/2000/svg", width: "1em", height: "1em", viewBox: "0 0 20 20", children: /* @__PURE__ */ n(
2621
+ "path",
2622
+ {
2623
+ fill: "currentColor",
2624
+ d: "M6.5 3a.75.75 0 0 1 .697.471l3 7.5a.75.75 0 0 1-1.393.557L7.992 9.5H5.008l-.811 2.028a.75.75 0 0 1-1.393-.556l3-7.5A.75.75 0 0 1 6.5 3m0 2.77L5.608 8h1.784zm8.28-1.55a.75.75 0 1 0-1.06 1.06l.72.72h-3.69a.75.75 0 0 0 0 1.5h3.69l-.72.72a.75.75 0 0 0 1.06 1.06l2-2a.75.75 0 0 0 0-1.06zm0 7.5a.75.75 0 1 0-1.06 1.06l.72.72H3.75a.75.75 0 0 0 0 1.5h10.69l-.72.72a.75.75 0 1 0 1.06 1.06l2-2a.75.75 0 0 0 0-1.06z"
2625
+ }
2626
+ ) });
2591
2627
  }
2592
2628
  function Cn() {
2593
2629
  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: [
@@ -2599,10 +2635,27 @@ function Cn() {
2599
2635
  ] }) });
2600
2636
  }
2601
2637
  function kn() {
2602
- return /* @__PURE__ */ n("svg", { xmlns: "http://www.w3.org/2000/svg", width: "1em", height: "1em", viewBox: "0 0 20 20", children: /* @__PURE__ */ n("path", { fill: "currentColor", d: "M13.5 3a.75.75 0 0 0-.697.471l-3 7.5a.75.75 0 0 0 1.393.557l.812-2.028h2.984l.811 2.028a.75.75 0 0 0 1.393-.556l-3-7.5A.75.75 0 0 0 13.5 3m0 2.77L14.392 8h-1.784zM5.22 4.22a.75.75 0 0 1 1.06 1.06L5.56 6h3.69a.75.75 0 0 1 0 1.5H5.56l.72.72a.75.75 0 0 1-1.06 1.06l-2-2a.75.75 0 0 1 0-1.06zm0 7.5a.75.75 0 0 1 1.06 1.06l-.72.72h10.69a.75.75 0 0 1 0 1.5H5.56l.72.72a.75.75 0 1 1-1.06 1.06l-2-2a.75.75 0 0 1 0-1.06z" }) });
2638
+ return /* @__PURE__ */ n("svg", { xmlns: "http://www.w3.org/2000/svg", width: "1em", height: "1em", viewBox: "0 0 20 20", children: /* @__PURE__ */ n(
2639
+ "path",
2640
+ {
2641
+ fill: "currentColor",
2642
+ d: "M13.5 3a.75.75 0 0 0-.697.471l-3 7.5a.75.75 0 0 0 1.393.557l.812-2.028h2.984l.811 2.028a.75.75 0 0 0 1.393-.556l-3-7.5A.75.75 0 0 0 13.5 3m0 2.77L14.392 8h-1.784zM5.22 4.22a.75.75 0 0 1 1.06 1.06L5.56 6h3.69a.75.75 0 0 1 0 1.5H5.56l.72.72a.75.75 0 0 1-1.06 1.06l-2-2a.75.75 0 0 1 0-1.06zm0 7.5a.75.75 0 0 1 1.06 1.06l-.72.72h10.69a.75.75 0 0 1 0 1.5H5.56l.72.72a.75.75 0 1 1-1.06 1.06l-2-2a.75.75 0 0 1 0-1.06z"
2643
+ }
2644
+ ) });
2603
2645
  }
2604
2646
  function Mn() {
2605
- return /* @__PURE__ */ n("svg", { xmlns: "http://www.w3.org/2000/svg", width: "1em", height: "1em", viewBox: "0 0 24 24", children: /* @__PURE__ */ n("path", { fill: "none", stroke: "currentColor", strokeLinecap: "round", strokeLinejoin: "round", strokeWidth: "1.5", d: "m3 21l7.548-7.548M21 3l-7.548 7.548m0 0L8 3H3l7.548 10.452m2.904-2.904L21 21h-5l-5.452-7.548", color: "currentColor" }) });
2647
+ return /* @__PURE__ */ n("svg", { xmlns: "http://www.w3.org/2000/svg", width: "1em", height: "1em", viewBox: "0 0 24 24", children: /* @__PURE__ */ n(
2648
+ "path",
2649
+ {
2650
+ fill: "none",
2651
+ stroke: "currentColor",
2652
+ strokeLinecap: "round",
2653
+ strokeLinejoin: "round",
2654
+ strokeWidth: "1.5",
2655
+ d: "m3 21l7.548-7.548M21 3l-7.548 7.548m0 0L8 3H3l7.548 10.452m2.904-2.904L21 21h-5l-5.452-7.548",
2656
+ color: "currentColor"
2657
+ }
2658
+ ) });
2606
2659
  }
2607
2660
  function zn() {
2608
2661
  return /* @__PURE__ */ n(
@@ -2652,8 +2705,8 @@ const wt = {
2652
2705
  IndentDecrease: Br,
2653
2706
  List: Ur,
2654
2707
  ListOrdered: _r,
2655
- ListTodo: Pr,
2656
- Link: jr,
2708
+ ListTodo: jr,
2709
+ Link: Pr,
2657
2710
  ImageUp: Or,
2658
2711
  Video: Hr,
2659
2712
  Maximize: Dr,
@@ -2729,11 +2782,11 @@ const wt = {
2729
2782
  PencilRuler: Wt,
2730
2783
  WrapText: Ft,
2731
2784
  Loader: $t,
2732
- X: lt,
2785
+ X: st,
2733
2786
  Html: wn,
2734
2787
  ExternalLink: Bt,
2735
2788
  Callout: Ut
2736
- }, et = (e) => typeof e == "boolean" ? `${e}` : e === 0 ? "0" : e, tt = ct, Ue = (e, t) => (r) => {
2789
+ }, et = (e) => typeof e == "boolean" ? `${e}` : e === 0 ? "0" : e, tt = lt, Ue = (e, t) => (r) => {
2737
2790
  var i;
2738
2791
  if ((t == null ? void 0 : t.variants) == null) return tt(e, r == null ? void 0 : r.class, r == null ? void 0 : r.className);
2739
2792
  const { variants: o, defaultVariants: a } = t, l = Object.keys(o).map((d) => {
@@ -2787,14 +2840,7 @@ const wt = {
2787
2840
  }
2788
2841
  }
2789
2842
  ), $ = U.forwardRef(
2790
- ({ className: e, variant: t, size: r, asChild: i = !1, ...o }, a) => /* @__PURE__ */ n(
2791
- i ? st : "button",
2792
- {
2793
- className: _(Tn({ variant: t, size: r, className: e })),
2794
- ref: a,
2795
- ...o
2796
- }
2797
- )
2843
+ ({ className: e, variant: t, size: r, asChild: i = !1, ...o }, a) => /* @__PURE__ */ n(i ? ut : "button", { className: _(Tn({ variant: t, size: r, className: e })), ref: a, ...o })
2798
2844
  );
2799
2845
  $.displayName = "Button";
2800
2846
  const te = U.forwardRef(
@@ -2804,7 +2850,7 @@ const te = U.forwardRef(
2804
2850
  ref: i,
2805
2851
  type: t,
2806
2852
  className: _(
2807
- "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-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 richtext-text-foreground",
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",
2808
2854
  e
2809
2855
  ),
2810
2856
  ...r
@@ -2814,14 +2860,7 @@ const te = U.forwardRef(
2814
2860
  te.displayName = "Input";
2815
2861
  const In = Ue(
2816
2862
  "richtext-text-sm richtext-font-medium richtext-leading-none richtext-text-foreground peer-disabled:richtext-cursor-not-allowed peer-disabled:richtext-opacity-70"
2817
- ), pe = U.forwardRef(({ className: e, ...t }, r) => /* @__PURE__ */ n(
2818
- ft.Root,
2819
- {
2820
- className: _(In(), e),
2821
- ref: r,
2822
- ...t
2823
- }
2824
- ));
2863
+ ), pe = U.forwardRef(({ className: e, ...t }, r) => /* @__PURE__ */ n(ft.Root, { className: _(In(), e), ref: r, ...t }));
2825
2864
  pe.displayName = ft.Root.displayName;
2826
2865
  const Ne = re.Root, ve = U.forwardRef(({ className: e, ...t }, r) => /* @__PURE__ */ n(
2827
2866
  re.List,
@@ -2887,14 +2926,14 @@ const Sn = Ue(
2887
2926
  }
2888
2927
  ));
2889
2928
  yt.displayName = ht.Root.displayName;
2890
- const $o = be.Provider, Nn = be.Root, An = be.Trigger, Ct = U.forwardRef(({ className: e, sideOffset: t = 4, ...r }, i) => /* @__PURE__ */ n(
2929
+ const Fo = be.Provider, Nn = be.Root, An = be.Trigger, Ct = U.forwardRef(({ className: e, sideOffset: t = 4, ...r }, i) => /* @__PURE__ */ n(
2891
2930
  be.Content,
2892
2931
  {
2893
2932
  "data-richtext-portal": !0,
2894
2933
  ref: i,
2895
2934
  sideOffset: t,
2896
2935
  className: _(
2897
- "richtext-z-50 richtext-overflow-hidden richtext-rounded-md 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 !richtext-border-none",
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",
2898
2937
  e
2899
2938
  ),
2900
2939
  ...r
@@ -2928,9 +2967,7 @@ function Vn(e, t) {
2928
2967
  case "UPDATE_TOAST":
2929
2968
  return {
2930
2969
  ...e,
2931
- toasts: e.toasts.map(
2932
- (r) => r.id === t.toast.id ? { ...r, ...t.toast } : r
2933
- )
2970
+ toasts: e.toasts.map((r) => r.id === t.toast.id ? { ...r, ...t.toast } : r)
2934
2971
  };
2935
2972
  case "DISMISS_TOAST": {
2936
2973
  const { toastId: r } = t;
@@ -3000,14 +3037,16 @@ const $e = U.forwardRef(({ className: e, ...t }, r) => /* @__PURE__ */ n(
3000
3037
  {
3001
3038
  ref: r,
3002
3039
  className: _(
3003
- "!richtext-peer !richtext-h-4 !richtext-w-4 !richtext-p-0 !richtext-shrink-0 !richtext-rounded-sm !richtext-border !richtext-border-primary !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",
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",
3004
3041
  e
3005
3042
  ),
3006
3043
  ...t,
3007
3044
  children: /* @__PURE__ */ n(
3008
3045
  Oe.Indicator,
3009
3046
  {
3010
- className: _("!richtext-flex !richtext-p-0 !richtext-items-center !richtext-justify-center !richtext-text-current"),
3047
+ className: _(
3048
+ "!richtext-flex !richtext-items-center !richtext-justify-center !richtext-p-0 !richtext-text-current"
3049
+ ),
3011
3050
  children: /* @__PURE__ */ n(si, { className: "!richtext-h-4 !richtext-w-4" })
3012
3051
  }
3013
3052
  )
@@ -3068,23 +3107,23 @@ function Mt(e, t) {
3068
3107
  t.map((i) => r.off(i, e));
3069
3108
  }), [r, t, e]);
3070
3109
  }
3071
- const Fo = Fe.emit;
3072
- function Wo({ children: e }) {
3110
+ const Wo = Fe.emit;
3111
+ function Go({ children: e }) {
3073
3112
  return /* @__PURE__ */ n(kt.Provider, { value: Fe, children: e });
3074
3113
  }
3075
- const we = F.Root, We = F.Trigger, jn = F.Portal, zt = U.forwardRef(({ className: e, ...t }, r) => /* @__PURE__ */ n(
3114
+ const we = F.Root, We = F.Trigger, Pn = F.Portal, zt = U.forwardRef(({ className: e, ...t }, r) => /* @__PURE__ */ n(
3076
3115
  F.Overlay,
3077
3116
  {
3078
3117
  ref: r,
3079
3118
  className: _(
3080
- "richtext-fixed richtext-inset-0 richtext-z-50 richtext-bg-black/80 richtext- 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",
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",
3081
3120
  e
3082
3121
  ),
3083
3122
  ...t
3084
3123
  }
3085
3124
  ));
3086
3125
  zt.displayName = F.Overlay.displayName;
3087
- const ae = U.forwardRef(({ className: e, children: t, ...r }, i) => /* @__PURE__ */ C(jn, { "data-richtext-portal": !0, children: [
3126
+ const ae = U.forwardRef(({ className: e, children: t, ...r }, i) => /* @__PURE__ */ C(Pn, { "data-richtext-portal": !0, children: [
3088
3127
  /* @__PURE__ */ n(zt, {}),
3089
3128
  /* @__PURE__ */ C(
3090
3129
  F.Content,
@@ -3092,25 +3131,22 @@ const ae = U.forwardRef(({ className: e, children: t, ...r }, i) => /* @__PURE__
3092
3131
  "data-richtext-portal": !0,
3093
3132
  ref: i,
3094
3133
  className: _(
3095
- "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-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 !richtext-border-border",
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",
3096
3135
  e
3097
3136
  ),
3098
3137
  ...r,
3099
3138
  children: [
3100
3139
  t,
3101
3140
  /* @__PURE__ */ C(F.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: [
3102
- /* @__PURE__ */ n(lt, { className: "richtext-size-4 richtext-text-accent-foreground" }),
3103
- /* @__PURE__ */ n("span", { className: "richtext-sr-only richtext-text-accent-foreground", children: "Close" })
3141
+ /* @__PURE__ */ n(st, { className: "richtext-size-4 richtext-text-accent-foreground" }),
3142
+ /* @__PURE__ */ n("span", { className: "richtext-sr-only richtext-text-accent-foreground", children: "Close" })
3104
3143
  ] })
3105
3144
  ]
3106
3145
  }
3107
3146
  )
3108
3147
  ] }));
3109
3148
  ae.displayName = F.Content.displayName;
3110
- function Pn({
3111
- className: e,
3112
- ...t
3113
- }) {
3149
+ function jn({ className: e, ...t }) {
3114
3150
  return /* @__PURE__ */ n(
3115
3151
  "div",
3116
3152
  {
@@ -3122,11 +3158,8 @@ function Pn({
3122
3158
  }
3123
3159
  );
3124
3160
  }
3125
- Pn.displayName = "DialogHeader";
3126
- function Tt({
3127
- className: e,
3128
- ...t
3129
- }) {
3161
+ jn.displayName = "DialogHeader";
3162
+ function Tt({ className: e, ...t }) {
3130
3163
  return /* @__PURE__ */ n(
3131
3164
  "div",
3132
3165
  {
@@ -3160,7 +3193,7 @@ const _n = U.forwardRef(({ className: e, ...t }, r) => /* @__PURE__ */ n(
3160
3193
  }
3161
3194
  ));
3162
3195
  _n.displayName = F.Description.displayName;
3163
- var Un = /(?:^|\s)(!\[(.+|:?)]\((\S+)(?:(?:\s+)["'](\S+)["'])?\))$/, Bn = dt.create({
3196
+ var Un = /(?:^|\s)(!\[(.+|:?)]\((\S+)(?:(?:\s+)["'](\S+)["'])?\))$/, Bn = ct.create({
3164
3197
  name: "image",
3165
3198
  addOptions() {
3166
3199
  return {
@@ -3204,7 +3237,7 @@ var Un = /(?:^|\s)(!\[(.+|:?)]\((\S+)(?:(?:\s+)["'](\S+)["'])?\))$/, Bn = dt.cre
3204
3237
  ];
3205
3238
  },
3206
3239
  renderHTML({ HTMLAttributes: e }) {
3207
- return ["img", ut(this.options.HTMLAttributes, e)];
3240
+ return ["img", dt(this.options.HTMLAttributes, e)];
3208
3241
  },
3209
3242
  parseMarkdown: (e, t) => t.createNode("image", {
3210
3243
  src: e.href,
@@ -3233,7 +3266,7 @@ var Un = /(?:^|\s)(!\[(.+|:?)]\((\S+)(?:(?:\s+)["'](\S+)["'])?\))$/, Bn = dt.cre
3233
3266
  break;
3234
3267
  }
3235
3268
  }), c.src = l.src;
3236
- const d = new ci({
3269
+ const d = new fi({
3237
3270
  element: c,
3238
3271
  editor: s,
3239
3272
  node: o,
@@ -3273,7 +3306,7 @@ var Un = /(?:^|\s)(!\[(.+|:?)]\((\S+)(?:(?:\s+)["'](\S+)["'])?\))$/, Bn = dt.cre
3273
3306
  },
3274
3307
  addInputRules() {
3275
3308
  return [
3276
- li({
3309
+ hi({
3277
3310
  find: Un,
3278
3311
  type: this.type,
3279
3312
  getAttributes: (e) => {
@@ -3361,8 +3394,8 @@ function po(e, t, r) {
3361
3394
  return d = v, s = setTimeout(x, t), g ? k(v) : l;
3362
3395
  }
3363
3396
  function z(v) {
3364
- var R = v - c, N = v - d, j = t - R;
3365
- return p ? go(j, a - N) : j;
3397
+ var R = v - c, N = v - d, P = t - R;
3398
+ return p ? go(P, a - N) : P;
3366
3399
  }
3367
3400
  function f(v) {
3368
3401
  var R = v - c, N = v - d;
@@ -3417,7 +3450,7 @@ const Ce = {
3417
3450
  BOTTOM_RIGHT: "br"
3418
3451
  };
3419
3452
  function vo(e) {
3420
- var N, j, H;
3453
+ var N, P, H;
3421
3454
  const [t, r] = L({
3422
3455
  width: Ze,
3423
3456
  height: Ze
@@ -3437,20 +3470,20 @@ function vo(e) {
3437
3470
  dir: ""
3438
3471
  }), { align: g, inline: p } = (N = e == null ? void 0 : e.node) == null ? void 0 : N.attrs, u = p && (g === "left" || g === "right"), k = B(() => {
3439
3472
  var Xe;
3440
- const { src: M, alt: w, width: y, height: I, flipX: E, flipY: A } = (Xe = e == null ? void 0 : e.node) == null ? void 0 : Xe.attrs, P = ot(y) ? `${y}px` : y, O = ot(I) ? `${I}px` : I, G = [];
3473
+ const { src: M, alt: w, width: y, height: I, flipX: E, flipY: A } = (Xe = e == null ? void 0 : e.node) == null ? void 0 : Xe.attrs, j = ot(y) ? `${y}px` : y, O = ot(I) ? `${I}px` : I, G = [];
3441
3474
  E && G.push("rotateX(180deg)"), A && G.push("rotateY(180deg)");
3442
3475
  const ye = G.join(" ");
3443
3476
  return {
3444
3477
  src: M || void 0,
3445
3478
  alt: w || void 0,
3446
3479
  style: {
3447
- width: P || void 0,
3480
+ width: j || void 0,
3448
3481
  height: O || void 0,
3449
3482
  transform: ye || "none",
3450
3483
  ...u ? { float: g } : {}
3451
3484
  }
3452
3485
  };
3453
- }, [(j = e == null ? void 0 : e.node) == null ? void 0 : j.attrs]), b = B(() => {
3486
+ }, [(P = e == null ? void 0 : e.node) == null ? void 0 : P.attrs]), b = B(() => {
3454
3487
  const {
3455
3488
  style: { width: M }
3456
3489
  } = k;
@@ -3479,13 +3512,13 @@ function vo(e) {
3479
3512
  function h(M, w) {
3480
3513
  M.preventDefault(), M.stopPropagation();
3481
3514
  const y = i.width, I = i.height, E = y / I;
3482
- let A = Number(e.node.attrs.width), P = Number(e.node.attrs.height);
3515
+ let A = Number(e.node.attrs.width), j = Number(e.node.attrs.height);
3483
3516
  const O = t.width;
3484
- A && !P ? (A = A > O ? O : A, P = Math.round(A / E)) : P && !A ? (A = Math.round(P * E), A = A > O ? O : A) : !A && !P ? (A = y > O ? O : y, P = Math.round(A / E)) : A = A > O ? O : A, s(!0), d({
3517
+ A && !j ? (A = A > O ? O : A, j = Math.round(A / E)) : j && !A ? (A = Math.round(j * E), A = A > O ? O : A) : !A && !j ? (A = y > O ? O : y, j = Math.round(A / E)) : A = A > O ? O : A, s(!0), d({
3485
3518
  x: M.clientX,
3486
3519
  y: M.clientY,
3487
3520
  w: A,
3488
- h: P,
3521
+ h: j,
3489
3522
  dir: w
3490
3523
  });
3491
3524
  }
@@ -3523,7 +3556,7 @@ function vo(e) {
3523
3556
  return ze(() => (R.observe(e.editor.view.dom), () => {
3524
3557
  R.disconnect();
3525
3558
  }), [e.editor.view.dom, R]), /* @__PURE__ */ n(
3526
- di,
3559
+ li,
3527
3560
  {
3528
3561
  as: p ? "span" : "div",
3529
3562
  className: "image-view",
@@ -3570,11 +3603,11 @@ function vo(e) {
3570
3603
  );
3571
3604
  }
3572
3605
  function wo(e) {
3573
- const { editor: t } = ui(), r = U.useMemo(
3606
+ const { editor: t } = ci(), r = U.useMemo(
3574
3607
  () => t,
3575
3608
  [e, t]
3576
3609
  );
3577
- return hi({
3610
+ return di({
3578
3611
  editor: r,
3579
3612
  selector(o) {
3580
3613
  return o.editor ? {
@@ -3592,15 +3625,15 @@ function wo(e) {
3592
3625
  function ee() {
3593
3626
  return wo().editor;
3594
3627
  }
3595
- const Lt = jt(!1);
3628
+ const Lt = Pt(!1);
3596
3629
  function Et() {
3597
- return Pt(Lt);
3630
+ return jt(Lt);
3598
3631
  }
3599
- function Go() {
3632
+ function Xo() {
3600
3633
  return _t(Lt);
3601
3634
  }
3602
3635
  const Rt = () => !1;
3603
- function Xo(e = Rt) {
3636
+ function Yo(e = Rt) {
3604
3637
  const t = Et(), [r, i] = L(() => {
3605
3638
  const s = e();
3606
3639
  return typeof s == "boolean" ? !s : s;
@@ -3648,25 +3681,26 @@ function Ae(e = Rt) {
3648
3681
  }
3649
3682
  function le(e) {
3650
3683
  const t = ee();
3651
- return B(() => t ? t.extensionManager.extensions.find((i) => i.name === e) : null, [t, e]);
3684
+ return B(() => t ? t.extensionManager.extensions.find(
3685
+ (i) => i.name === e
3686
+ ) : null, [t, e]);
3652
3687
  }
3653
- function Yo(e, t, r) {
3688
+ function qo(e, t, r) {
3654
3689
  return e < t ? t : e > r ? r : e;
3655
3690
  }
3656
3691
  const yo = (e) => typeof e == "number", Co = (e) => typeof e == "string", ko = (e) => typeof e == "function";
3657
3692
  function Mo(e, t = "px") {
3658
- if (!e)
3659
- return e;
3693
+ if (!e) return e;
3660
3694
  const r = yo(e) ? String(e) : e, i = Number.parseFloat(r), o = r.match(/[%a-z]+$/i), a = o ? o[0] : t;
3661
3695
  return Number.isNaN(i) ? e : i + a;
3662
3696
  }
3663
- function qo(e, t) {
3697
+ function Zo(e, t) {
3664
3698
  if (!e)
3665
3699
  return !1;
3666
3700
  const { extensions: r = [] } = (e == null ? void 0 : e.extensionManager) ?? {};
3667
3701
  return !!r.find((o) => o.name === t);
3668
3702
  }
3669
- function Zo(e) {
3703
+ function Ko(e) {
3670
3704
  return e.map((t) => Co(t) ? { value: t, name: t } : t);
3671
3705
  }
3672
3706
  function Vt(e) {
@@ -3674,9 +3708,7 @@ function Vt(e) {
3674
3708
  return B(() => {
3675
3709
  if (!t || !r || !i)
3676
3710
  return null;
3677
- const {
3678
- button: o
3679
- } = r.options;
3711
+ const { button: o } = r.options;
3680
3712
  return !o || !ko(o) ? null : o({
3681
3713
  editor: t,
3682
3714
  extension: r,
@@ -3713,11 +3745,15 @@ function Ge(e, t) {
3713
3745
  if (!zo(c, r)) {
3714
3746
  t.onError ? t.onError({
3715
3747
  type: "type",
3716
- message: o("editor.upload.fileTypeNotSupported", { fileName: c.name }),
3748
+ message: o("editor.upload.fileTypeNotSupported", {
3749
+ fileName: c.name
3750
+ }),
3717
3751
  file: c
3718
3752
  }) : a({
3719
3753
  variant: "default",
3720
- title: o("editor.upload.fileTypeNotSupported", { fileName: c.name })
3754
+ title: o("editor.upload.fileTypeNotSupported", {
3755
+ fileName: c.name
3756
+ })
3721
3757
  });
3722
3758
  return;
3723
3759
  }
@@ -3725,30 +3761,33 @@ function Ge(e, t) {
3725
3761
  const d = (i / 1024 / 1024).toFixed(2);
3726
3762
  t.onError ? t.onError({
3727
3763
  type: "size",
3728
- message: o("editor.upload.fileSizeTooBig", { fileName: c.name, size: d }),
3764
+ message: o("editor.upload.fileSizeTooBig", {
3765
+ fileName: c.name,
3766
+ size: d
3767
+ }),
3729
3768
  file: c
3730
3769
  }) : a({
3731
3770
  variant: "default",
3732
- title: o("editor.upload.fileSizeTooBig", { fileName: c.name, size: d })
3771
+ title: o("editor.upload.fileSizeTooBig", {
3772
+ fileName: c.name,
3773
+ size: d
3774
+ })
3733
3775
  });
3734
3776
  return;
3735
3777
  }
3736
3778
  l.push(c);
3737
3779
  }), l;
3738
3780
  }
3739
- function Ko() {
3740
- const { t: e } = ne(), { toast: t } = Be(), r = ee(), i = Vt(Se.name), {
3741
- icon: o,
3742
- tooltip: a
3743
- } = (i == null ? void 0 : i.componentProps) ?? {}, { editorDisabled: l } = Ae(), [s, c] = L(!1), [d, g] = L(!1), p = le(Se.name), [u, k] = L(""), [b, z] = L(""), f = xe(null), x = (p == null ? void 0 : p.options.defaultInline) || !1, [h, S] = L(x), m = B(() => p == null ? void 0 : p.options, [p]);
3781
+ function Jo() {
3782
+ const { t: e } = ne(), { toast: t } = Be(), r = ee(), i = Vt(Se.name), { icon: o, tooltip: a } = (i == null ? void 0 : i.componentProps) ?? {}, { editorDisabled: l } = Ae(), [s, c] = L(!1), [d, g] = L(!1), p = le(Se.name), [u, k] = L(""), [b, z] = L(""), f = xe(null), x = (p == null ? void 0 : p.options.defaultInline) || !1, [h, S] = L(x), m = B(() => p == null ? void 0 : p.options, [p]);
3744
3783
  async function D(N) {
3745
3784
  var M;
3746
- const j = (M = N == null ? void 0 : N.target) == null ? void 0 : M.files;
3747
- if (!r || r.isDestroyed || j.length === 0 || d) {
3785
+ const P = (M = N == null ? void 0 : N.target) == null ? void 0 : M.files;
3786
+ if (!r || r.isDestroyed || P.length === 0 || d) {
3748
3787
  N.target.value = "";
3749
3788
  return;
3750
3789
  }
3751
- const H = Ge(j, {
3790
+ const H = Ge(P, {
3752
3791
  acceptMimes: m == null ? void 0 : m.acceptMimes,
3753
3792
  maxSize: m == null ? void 0 : m.maxSize,
3754
3793
  t: e,
@@ -3791,135 +3830,108 @@ function Ko() {
3791
3830
  N.preventDefault(), N.stopPropagation(), r.chain().focus().setImageInline({ src: u, inline: h, alt: b }).run(), c(!1), S(x), k(""), z("");
3792
3831
  }
3793
3832
  function R(N) {
3794
- var j;
3795
- N.preventDefault(), (j = f.current) == null || j.click();
3833
+ var P;
3834
+ N.preventDefault(), (P = f.current) == null || P.click();
3796
3835
  }
3797
- return i ? /* @__PURE__ */ C(
3798
- we,
3799
- {
3800
- onOpenChange: c,
3801
- open: s,
3802
- children: [
3803
- /* @__PURE__ */ n(
3804
- We,
3805
- {
3806
- asChild: !0,
3807
- children: /* @__PURE__ */ n(
3808
- vt,
3809
- {
3810
- disabled: l,
3811
- icon: o,
3812
- tooltip: a,
3813
- action: () => {
3814
- l || c(!0);
3836
+ return i ? /* @__PURE__ */ C(we, { onOpenChange: c, open: s, children: [
3837
+ /* @__PURE__ */ n(We, { asChild: !0, children: /* @__PURE__ */ n(
3838
+ vt,
3839
+ {
3840
+ disabled: l,
3841
+ icon: o,
3842
+ tooltip: a,
3843
+ action: () => {
3844
+ l || c(!0);
3845
+ }
3846
+ }
3847
+ ) }),
3848
+ /* @__PURE__ */ C(ae, { children: [
3849
+ /* @__PURE__ */ n(se, { children: e("editor.image.dialog.title") }),
3850
+ /* @__PURE__ */ C(
3851
+ Ne,
3852
+ {
3853
+ activationMode: "manual",
3854
+ defaultValue: m.resourceImage === "both" || m.resourceImage === "upload" ? "upload" : "link",
3855
+ children: [
3856
+ m.resourceImage === "both" && /* @__PURE__ */ C(ve, { className: "richtext-grid richtext-w-full richtext-grid-cols-2", children: [
3857
+ /* @__PURE__ */ n(q, { value: "upload", children: e("editor.image.dialog.tab.upload") }),
3858
+ /* @__PURE__ */ n(q, { value: "link", children: e("editor.image.dialog.tab.url") })
3859
+ ] }),
3860
+ /* @__PURE__ */ C("div", { className: "richtext-my-[10px] richtext-flex richtext-items-center richtext-gap-[4px]", children: [
3861
+ /* @__PURE__ */ n(
3862
+ $e,
3863
+ {
3864
+ checked: h,
3865
+ onCheckedChange: (N) => {
3866
+ S(N);
3867
+ }
3815
3868
  }
3816
- }
3817
- )
3818
- }
3819
- ),
3820
- /* @__PURE__ */ C(ae, { children: [
3821
- /* @__PURE__ */ n(se, { children: e("editor.image.dialog.title") }),
3822
- /* @__PURE__ */ C(
3823
- Ne,
3824
- {
3825
- activationMode: "manual",
3826
- defaultValue: m.resourceImage === "both" || m.resourceImage === "upload" ? "upload" : "link",
3827
- children: [
3828
- m.resourceImage === "both" && /* @__PURE__ */ C(ve, { className: "richtext-grid richtext-w-full richtext-grid-cols-2", children: [
3829
- /* @__PURE__ */ n(q, { value: "upload", children: e("editor.image.dialog.tab.upload") }),
3830
- /* @__PURE__ */ n(q, { value: "link", children: e("editor.image.dialog.tab.url") })
3831
- ] }),
3832
- /* @__PURE__ */ C("div", { className: "richtext-my-[10px] richtext-flex richtext-items-center richtext-gap-[4px]", children: [
3833
- /* @__PURE__ */ n(
3834
- $e,
3835
- {
3836
- checked: h,
3837
- onCheckedChange: (N) => {
3838
- S(N);
3839
- }
3840
- }
3841
- ),
3842
- /* @__PURE__ */ n(pe, { children: e("editor.link.dialog.inline") })
3843
- ] }),
3844
- m.enableAlt && /* @__PURE__ */ C("div", { className: "richtext-my-[10px] ", children: [
3845
- /* @__PURE__ */ n(pe, { className: "mb-[6px]", children: e("editor.imageUpload.alt") }),
3846
- /* @__PURE__ */ n(
3847
- te,
3848
- {
3849
- onChange: (N) => z(N.target.value),
3850
- required: !0,
3851
- type: "text",
3852
- value: b
3853
- }
3854
- )
3855
- ] }),
3856
- /* @__PURE__ */ C(Z, { value: "upload", children: [
3857
- /* @__PURE__ */ C("div", { className: "richtext-flex richtext-items-center richtext-gap-[10px]", children: [
3858
- /* @__PURE__ */ n(
3859
- $,
3860
- {
3861
- className: "richtext-mt-1 richtext-w-full",
3862
- disabled: d,
3863
- onClick: R,
3864
- size: "sm",
3865
- children: d ? /* @__PURE__ */ C(Y, { children: [
3866
- e("editor.imageUpload.uploading"),
3867
- /* @__PURE__ */ n(
3868
- fe,
3869
- {
3870
- className: "richtext-ml-1 richtext-animate-spin",
3871
- name: "Loader"
3872
- }
3873
- )
3874
- ] }) : e("editor.image.dialog.tab.upload")
3875
- }
3876
- ),
3877
- /* @__PURE__ */ n(
3878
- Dt,
3879
- {
3880
- alt: b,
3881
- disabled: d,
3882
- editor: r,
3883
- imageInline: h,
3884
- onClose: () => {
3885
- z("");
3886
- }
3887
- }
3888
- )
3889
- ] }),
3890
- /* @__PURE__ */ n(
3891
- "input",
3892
- {
3893
- accept: m.acceptMimes.join(",") || "image/*",
3894
- multiple: m.multiple,
3895
- onChange: D,
3896
- ref: f,
3897
- style: { display: "none" },
3898
- type: "file"
3899
- }
3900
- )
3901
- ] }),
3902
- /* @__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: [
3903
- /* @__PURE__ */ n(
3904
- te,
3905
- {
3906
- autoFocus: !0,
3907
- onChange: (N) => k(N.target.value),
3908
- placeholder: e("editor.image.dialog.placeholder"),
3909
- required: !0,
3910
- type: "url",
3911
- value: u
3869
+ ),
3870
+ /* @__PURE__ */ n(pe, { children: e("editor.link.dialog.inline") })
3871
+ ] }),
3872
+ m.enableAlt && /* @__PURE__ */ C("div", { className: "richtext-my-[10px]", children: [
3873
+ /* @__PURE__ */ n(pe, { className: "mb-[6px]", children: e("editor.imageUpload.alt") }),
3874
+ /* @__PURE__ */ n(te, { onChange: (N) => z(N.target.value), required: !0, type: "text", value: b })
3875
+ ] }),
3876
+ /* @__PURE__ */ C(Z, { value: "upload", children: [
3877
+ /* @__PURE__ */ C("div", { className: "richtext-flex richtext-items-center richtext-gap-[10px]", children: [
3878
+ /* @__PURE__ */ n(
3879
+ $,
3880
+ {
3881
+ className: "richtext-mt-1 richtext-w-full",
3882
+ disabled: d,
3883
+ onClick: R,
3884
+ size: "sm",
3885
+ children: d ? /* @__PURE__ */ C(Y, { children: [
3886
+ e("editor.imageUpload.uploading"),
3887
+ /* @__PURE__ */ n(fe, { className: "richtext-ml-1 richtext-animate-spin", name: "Loader" })
3888
+ ] }) : e("editor.image.dialog.tab.upload")
3889
+ }
3890
+ ),
3891
+ /* @__PURE__ */ n(
3892
+ Dt,
3893
+ {
3894
+ alt: b,
3895
+ disabled: d,
3896
+ editor: r,
3897
+ imageInline: h,
3898
+ onClose: () => {
3899
+ z("");
3912
3900
  }
3913
- ),
3914
- /* @__PURE__ */ n($, { type: "submit", children: e("editor.image.dialog.button.apply") })
3915
- ] }) }) })
3916
- ]
3917
- }
3918
- )
3919
- ] })
3920
- ]
3921
- }
3922
- ) : /* @__PURE__ */ n(Y, {});
3901
+ }
3902
+ )
3903
+ ] }),
3904
+ /* @__PURE__ */ n(
3905
+ "input",
3906
+ {
3907
+ accept: m.acceptMimes.join(",") || "image/*",
3908
+ multiple: m.multiple,
3909
+ onChange: D,
3910
+ ref: f,
3911
+ style: { display: "none" },
3912
+ type: "file"
3913
+ }
3914
+ )
3915
+ ] }),
3916
+ /* @__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: [
3917
+ /* @__PURE__ */ n(
3918
+ te,
3919
+ {
3920
+ autoFocus: !0,
3921
+ onChange: (N) => k(N.target.value),
3922
+ placeholder: e("editor.image.dialog.placeholder"),
3923
+ required: !0,
3924
+ type: "url",
3925
+ value: u
3926
+ }
3927
+ ),
3928
+ /* @__PURE__ */ n($, { type: "submit", children: e("editor.image.dialog.button.apply") })
3929
+ ] }) }) })
3930
+ ]
3931
+ }
3932
+ )
3933
+ ] })
3934
+ ] }) : /* @__PURE__ */ n(Y, {});
3923
3935
  }
3924
3936
  const To = {
3925
3937
  acceptMimes: ["image/jpeg", "image/gif", "image/png", "image/jpg"],
@@ -4004,7 +4016,7 @@ const To = {
4004
4016
  };
4005
4017
  },
4006
4018
  addNodeView() {
4007
- return fi(vo);
4019
+ return ui(vo);
4008
4020
  },
4009
4021
  addCommands() {
4010
4022
  var e;
@@ -4031,7 +4043,7 @@ const To = {
4031
4043
  },
4032
4044
  [
4033
4045
  "img",
4034
- ut(
4046
+ dt(
4035
4047
  {
4036
4048
  height: "auto",
4037
4049
  style: g
@@ -4138,16 +4150,16 @@ const To = {
4138
4150
  // ];
4139
4151
  // },
4140
4152
  });
4141
- function Jo(e) {
4153
+ function Qo(e) {
4142
4154
  return e.replace(/^.*\/|\..+$/g, "");
4143
4155
  }
4144
- function Qo(e) {
4156
+ function ea(e) {
4145
4157
  return e.split(".").pop();
4146
4158
  }
4147
- function ea(e) {
4159
+ function ta(e) {
4148
4160
  return e < 1024 ? `${e} Byte` : e < 1024 * 1024 ? `${(e / 1024).toFixed(2)} KB` : `${(e / 1024 / 1024).toFixed(2)} MB`;
4149
4161
  }
4150
- function ta(e) {
4162
+ function ra(e) {
4151
4163
  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";
4152
4164
  }
4153
4165
  function Io(e) {
@@ -4186,19 +4198,19 @@ function Dt({ editor: e, imageInline: t, onClose: r, disabled: i, alt: o }) {
4186
4198
  }
4187
4199
  }
4188
4200
  function v(y, I) {
4189
- const E = document.createElement("canvas"), A = y.naturalWidth / y.width, P = y.naturalHeight / y.height;
4190
- E.width = I.width * A, E.height = I.height * P;
4201
+ const E = document.createElement("canvas"), A = y.naturalWidth / y.width, j = y.naturalHeight / y.height;
4202
+ E.width = I.width * A, E.height = I.height * j;
4191
4203
  const O = E.getContext("2d");
4192
4204
  return O && (O.imageSmoothingEnabled = !1, O.drawImage(
4193
4205
  y,
4194
4206
  I.x * A,
4195
- I.y * P,
4207
+ I.y * j,
4196
4208
  I.width * A,
4197
- I.height * P,
4209
+ I.height * j,
4198
4210
  0,
4199
4211
  0,
4200
4212
  I.width * A,
4201
- I.height * P
4213
+ I.height * j
4202
4214
  )), E.toDataURL("image/png", 1);
4203
4215
  }
4204
4216
  const R = Q.useCallback(async () => {
@@ -4218,12 +4230,20 @@ function Dt({ editor: e, imageInline: t, onClose: r, disabled: i, alt: o }) {
4218
4230
  g(!1);
4219
4231
  }
4220
4232
  }
4221
- }, [b, e, t, d, r, (M = x == null ? void 0 : x.file) == null ? void 0 : M.name, m]);
4233
+ }, [
4234
+ b,
4235
+ e,
4236
+ t,
4237
+ d,
4238
+ r,
4239
+ (M = x == null ? void 0 : x.file) == null ? void 0 : M.name,
4240
+ m
4241
+ ]);
4222
4242
  function N(y) {
4223
4243
  var I;
4224
4244
  y.preventDefault(), (I = f.current) == null || I.click();
4225
4245
  }
4226
- const j = async (y) => {
4246
+ const P = async (y) => {
4227
4247
  var O;
4228
4248
  const I = (O = y == null ? void 0 : y.target) == null ? void 0 : O.files;
4229
4249
  if (!e || e.isDestroyed || I.length === 0) {
@@ -4241,9 +4261,9 @@ function Dt({ editor: e, imageInline: t, onClose: r, disabled: i, alt: o }) {
4241
4261
  y.target.value = "";
4242
4262
  return;
4243
4263
  }
4244
- const A = E[0], P = await Io(A);
4264
+ const A = E[0], j = await Io(A);
4245
4265
  c(!0), h({
4246
- src: P.src,
4266
+ src: j.src,
4247
4267
  file: A
4248
4268
  });
4249
4269
  }, H = () => {
@@ -4278,14 +4298,7 @@ function Dt({ editor: e, imageInline: t, onClose: r, disabled: i, alt: o }) {
4278
4298
  crop: u,
4279
4299
  onChange: (y) => k(y),
4280
4300
  onComplete: (y) => D(y),
4281
- children: /* @__PURE__ */ n(
4282
- "img",
4283
- {
4284
- alt: "Crop me",
4285
- ref: p,
4286
- src: x.src
4287
- }
4288
- )
4301
+ children: /* @__PURE__ */ n("img", { alt: "Crop me", ref: p, src: x.src })
4289
4302
  }
4290
4303
  ) }),
4291
4304
  /* @__PURE__ */ C(Tt, { children: [
@@ -4301,43 +4314,17 @@ function Dt({ editor: e, imageInline: t, onClose: r, disabled: i, alt: o }) {
4301
4314
  },
4302
4315
  children: [
4303
4316
  a("editor.imageUpload.cancel"),
4304
- /* @__PURE__ */ n(
4305
- fe,
4306
- {
4307
- className: "richtext-ml-1",
4308
- name: "Trash2"
4309
- }
4310
- )
4317
+ /* @__PURE__ */ n(fe, { className: "richtext-ml-1", name: "Trash2" })
4311
4318
  ]
4312
4319
  }
4313
4320
  ),
4314
- /* @__PURE__ */ n(
4315
- $,
4316
- {
4317
- className: "richtext-w-fit",
4318
- disabled: d || !u,
4319
- onClick: R,
4320
- children: d ? /* @__PURE__ */ C(Y, { children: [
4321
- a("editor.imageUpload.uploading"),
4322
- /* @__PURE__ */ n(
4323
- fe,
4324
- {
4325
- className: "richtext-ml-1 richtext-animate-spin",
4326
- name: "Loader"
4327
- }
4328
- )
4329
- ] }) : /* @__PURE__ */ C(Y, { children: [
4330
- a("editor.imageUpload.crop"),
4331
- /* @__PURE__ */ n(
4332
- fe,
4333
- {
4334
- className: "richtext-ml-1",
4335
- name: "Crop"
4336
- }
4337
- )
4338
- ] })
4339
- }
4340
- )
4321
+ /* @__PURE__ */ n($, { className: "richtext-w-fit", disabled: d || !u, onClick: R, children: d ? /* @__PURE__ */ C(Y, { children: [
4322
+ a("editor.imageUpload.uploading"),
4323
+ /* @__PURE__ */ n(fe, { className: "richtext-ml-1 richtext-animate-spin", name: "Loader" })
4324
+ ] }) : /* @__PURE__ */ C(Y, { children: [
4325
+ a("editor.imageUpload.crop"),
4326
+ /* @__PURE__ */ n(fe, { className: "richtext-ml-1", name: "Crop" })
4327
+ ] }) })
4341
4328
  ] })
4342
4329
  ] })
4343
4330
  ]
@@ -4348,7 +4335,7 @@ function Dt({ editor: e, imageInline: t, onClose: r, disabled: i, alt: o }) {
4348
4335
  {
4349
4336
  accept: ((w = m == null ? void 0 : m.acceptMimes) == null ? void 0 : w.join(",")) || "image/*",
4350
4337
  multiple: !1,
4351
- onChange: j,
4338
+ onChange: P,
4352
4339
  ref: f,
4353
4340
  style: { display: "none" },
4354
4341
  type: "file"
@@ -4366,8 +4353,8 @@ function No() {
4366
4353
  Mt(a, [l]);
4367
4354
  const [s, c] = L(!1), d = le(Se.name), [g, p] = L(""), [u, k] = L(""), b = xe(null), z = (d == null ? void 0 : d.options.defaultInline) || !1, [f, x] = L(z), h = B(() => d == null ? void 0 : d.options, [d]);
4368
4355
  async function S(v) {
4369
- var j;
4370
- const R = (j = v == null ? void 0 : v.target) == null ? void 0 : j.files;
4356
+ var P;
4357
+ const R = (P = v == null ? void 0 : v.target) == null ? void 0 : P.files;
4371
4358
  if (!r || r.isDestroyed || R.length === 0 || s) {
4372
4359
  v.target.value = "";
4373
4360
  return;
@@ -4418,113 +4405,92 @@ function No() {
4418
4405
  var R;
4419
4406
  v.preventDefault(), (R = b.current) == null || R.click();
4420
4407
  }
4421
- return i ? /* @__PURE__ */ n(Y, {}) : /* @__PURE__ */ n(
4422
- we,
4423
- {
4424
- onOpenChange: a,
4425
- open: o,
4426
- children: /* @__PURE__ */ C(ae, { children: [
4427
- /* @__PURE__ */ n(se, { children: e("editor.image.dialog.title") }),
4428
- /* @__PURE__ */ C(
4429
- Ne,
4430
- {
4431
- activationMode: "manual",
4432
- defaultValue: h.resourceImage === "both" || h.resourceImage === "upload" ? "upload" : "link",
4433
- children: [
4434
- h.resourceImage === "both" && /* @__PURE__ */ C(ve, { className: "richtext-grid richtext-w-full richtext-grid-cols-2", children: [
4435
- /* @__PURE__ */ n(q, { value: "upload", children: e("editor.image.dialog.tab.upload") }),
4436
- /* @__PURE__ */ n(q, { value: "link", children: e("editor.image.dialog.tab.url") })
4437
- ] }),
4438
- /* @__PURE__ */ C("div", { className: "richtext-my-[10px] richtext-flex richtext-items-center richtext-gap-[4px]", children: [
4439
- /* @__PURE__ */ n(
4440
- $e,
4441
- {
4442
- checked: f,
4443
- onCheckedChange: (v) => {
4444
- x(v);
4445
- }
4446
- }
4447
- ),
4448
- /* @__PURE__ */ n(pe, { children: e("editor.link.dialog.inline") })
4449
- ] }),
4450
- h.enableAlt && /* @__PURE__ */ C("div", { className: "richtext-my-[10px] ", children: [
4451
- /* @__PURE__ */ n(pe, { className: "mb-[6px]", children: e("editor.imageUpload.alt") }),
4452
- /* @__PURE__ */ n(
4453
- te,
4454
- {
4455
- onChange: (v) => k(v.target.value),
4456
- required: !0,
4457
- type: "text",
4458
- value: u
4459
- }
4460
- )
4461
- ] }),
4462
- /* @__PURE__ */ C(Z, { value: "upload", children: [
4463
- /* @__PURE__ */ C("div", { className: "richtext-flex richtext-items-center richtext-gap-[10px]", children: [
4464
- /* @__PURE__ */ n(
4465
- $,
4466
- {
4467
- className: "richtext-mt-1 richtext-w-full",
4468
- disabled: s,
4469
- onClick: D,
4470
- size: "sm",
4471
- children: s ? /* @__PURE__ */ C(Y, { children: [
4472
- e("editor.imageUpload.uploading"),
4473
- /* @__PURE__ */ n(
4474
- fe,
4475
- {
4476
- className: "richtext-ml-1 richtext-animate-spin",
4477
- name: "Loader"
4478
- }
4479
- )
4480
- ] }) : e("editor.image.dialog.tab.upload")
4481
- }
4482
- ),
4483
- /* @__PURE__ */ n(
4484
- Dt,
4485
- {
4486
- alt: u,
4487
- disabled: s,
4488
- editor: r,
4489
- imageInline: f,
4490
- onClose: () => {
4491
- k("");
4492
- }
4493
- }
4494
- )
4495
- ] }),
4496
- /* @__PURE__ */ n(
4497
- "input",
4498
- {
4499
- accept: h.acceptMimes.join(",") || "image/*",
4500
- multiple: h.multiple,
4501
- onChange: S,
4502
- ref: b,
4503
- style: { display: "none" },
4504
- type: "file"
4505
- }
4506
- )
4507
- ] }),
4508
- /* @__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: [
4509
- /* @__PURE__ */ n(
4510
- te,
4511
- {
4512
- autoFocus: !0,
4513
- onChange: (v) => p(v.target.value),
4514
- placeholder: e("editor.image.dialog.placeholder"),
4515
- required: !0,
4516
- type: "url",
4517
- value: g
4408
+ return i ? /* @__PURE__ */ n(Y, {}) : /* @__PURE__ */ n(we, { onOpenChange: a, open: o, children: /* @__PURE__ */ C(ae, { children: [
4409
+ /* @__PURE__ */ n(se, { children: e("editor.image.dialog.title") }),
4410
+ /* @__PURE__ */ C(
4411
+ Ne,
4412
+ {
4413
+ activationMode: "manual",
4414
+ defaultValue: h.resourceImage === "both" || h.resourceImage === "upload" ? "upload" : "link",
4415
+ children: [
4416
+ h.resourceImage === "both" && /* @__PURE__ */ C(ve, { className: "richtext-grid richtext-w-full richtext-grid-cols-2", children: [
4417
+ /* @__PURE__ */ n(q, { value: "upload", children: e("editor.image.dialog.tab.upload") }),
4418
+ /* @__PURE__ */ n(q, { value: "link", children: e("editor.image.dialog.tab.url") })
4419
+ ] }),
4420
+ /* @__PURE__ */ C("div", { className: "richtext-my-[10px] richtext-flex richtext-items-center richtext-gap-[4px]", children: [
4421
+ /* @__PURE__ */ n(
4422
+ $e,
4423
+ {
4424
+ checked: f,
4425
+ onCheckedChange: (v) => {
4426
+ x(v);
4427
+ }
4428
+ }
4429
+ ),
4430
+ /* @__PURE__ */ n(pe, { children: e("editor.link.dialog.inline") })
4431
+ ] }),
4432
+ h.enableAlt && /* @__PURE__ */ C("div", { className: "richtext-my-[10px]", children: [
4433
+ /* @__PURE__ */ n(pe, { className: "mb-[6px]", children: e("editor.imageUpload.alt") }),
4434
+ /* @__PURE__ */ n(te, { onChange: (v) => k(v.target.value), required: !0, type: "text", value: u })
4435
+ ] }),
4436
+ /* @__PURE__ */ C(Z, { value: "upload", children: [
4437
+ /* @__PURE__ */ C("div", { className: "richtext-flex richtext-items-center richtext-gap-[10px]", children: [
4438
+ /* @__PURE__ */ n(
4439
+ $,
4440
+ {
4441
+ className: "richtext-mt-1 richtext-w-full",
4442
+ disabled: s,
4443
+ onClick: D,
4444
+ size: "sm",
4445
+ children: s ? /* @__PURE__ */ C(Y, { children: [
4446
+ e("editor.imageUpload.uploading"),
4447
+ /* @__PURE__ */ n(fe, { className: "richtext-ml-1 richtext-animate-spin", name: "Loader" })
4448
+ ] }) : e("editor.image.dialog.tab.upload")
4449
+ }
4450
+ ),
4451
+ /* @__PURE__ */ n(
4452
+ Dt,
4453
+ {
4454
+ alt: u,
4455
+ disabled: s,
4456
+ editor: r,
4457
+ imageInline: f,
4458
+ onClose: () => {
4459
+ k("");
4518
4460
  }
4519
- ),
4520
- /* @__PURE__ */ n($, { type: "submit", children: e("editor.image.dialog.button.apply") })
4521
- ] }) }) })
4522
- ]
4523
- }
4524
- )
4525
- ] })
4526
- }
4527
- );
4461
+ }
4462
+ )
4463
+ ] }),
4464
+ /* @__PURE__ */ n(
4465
+ "input",
4466
+ {
4467
+ accept: h.acceptMimes.join(",") || "image/*",
4468
+ multiple: h.multiple,
4469
+ onChange: S,
4470
+ ref: b,
4471
+ style: { display: "none" },
4472
+ type: "file"
4473
+ }
4474
+ )
4475
+ ] }),
4476
+ /* @__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: [
4477
+ /* @__PURE__ */ n(
4478
+ te,
4479
+ {
4480
+ autoFocus: !0,
4481
+ onChange: (v) => p(v.target.value),
4482
+ placeholder: e("editor.image.dialog.placeholder"),
4483
+ required: !0,
4484
+ type: "url",
4485
+ value: g
4486
+ }
4487
+ ),
4488
+ /* @__PURE__ */ n($, { type: "submit", children: e("editor.image.dialog.button.apply") })
4489
+ ] }) }) })
4490
+ ]
4491
+ }
4492
+ )
4493
+ ] }) });
4528
4494
  }
4529
4495
  function Ot(e, t) {
4530
4496
  let r;
@@ -4541,11 +4507,8 @@ function Ot(e, t) {
4541
4507
  return r.hostname.includes(i);
4542
4508
  });
4543
4509
  }
4544
- function ra() {
4545
- const { t: e } = ne(), t = ee(), r = Vt(Pe.name), {
4546
- icon: i,
4547
- tooltip: o
4548
- } = (r == null ? void 0 : r.componentProps) ?? {}, { editorDisabled: a } = Ae(), [l, s] = L(""), c = xe(null), [d, g] = L(""), [p, u] = L(!1), k = le(Pe.name), b = B(() => (k == null ? void 0 : k.options) ?? {}, [k]);
4510
+ function ia() {
4511
+ const { t: e } = ne(), t = ee(), r = Vt(je.name), { icon: i, tooltip: o } = (r == null ? void 0 : r.componentProps) ?? {}, { editorDisabled: a } = Ae(), [l, s] = L(""), c = xe(null), [d, g] = L(""), [p, u] = L(!1), k = le(je.name), b = B(() => (k == null ? void 0 : k.options) ?? {}, [k]);
4549
4512
  async function z(h) {
4550
4513
  var v;
4551
4514
  const S = (v = h == null ? void 0 : h.target) == null ? void 0 : v.files;
@@ -4568,96 +4531,74 @@ function ra() {
4568
4531
  var S;
4569
4532
  h.preventDefault(), (S = c.current) == null || S.click();
4570
4533
  }
4571
- return /* @__PURE__ */ C(
4572
- we,
4573
- {
4574
- onOpenChange: u,
4575
- open: p,
4576
- children: [
4577
- /* @__PURE__ */ n(We, { asChild: !0, children: /* @__PURE__ */ n(
4578
- vt,
4579
- {
4580
- disabled: a,
4581
- icon: i,
4582
- tooltip: o,
4583
- action: () => {
4584
- a || u(!0);
4585
- }
4586
- }
4587
- ) }),
4588
- /* @__PURE__ */ C(ae, { children: [
4589
- /* @__PURE__ */ n(se, { children: e("editor.video.dialog.title") }),
4590
- /* @__PURE__ */ C(
4591
- Ne,
4592
- {
4593
- activationMode: "manual",
4594
- defaultValue: (b == null ? void 0 : b.resourceVideo) === "both" || (b == null ? void 0 : b.resourceVideo) === "upload" ? "upload" : "link",
4595
- children: [
4596
- /* @__PURE__ */ C(ve, { className: "richtext-grid richtext-w-full richtext-grid-cols-2", children: [
4597
- ((b == null ? void 0 : b.resourceVideo) === "both" || (b == null ? void 0 : b.resourceVideo) === "upload") && /* @__PURE__ */ n(q, { value: "upload", children: e("editor.video.dialog.tab.upload") }),
4598
- ((b == null ? void 0 : b.resourceVideo) === "both" || (b == null ? void 0 : b.resourceVideo) === "link") && /* @__PURE__ */ n(q, { value: "link", children: e("editor.video.dialog.link") })
4599
- ] }),
4600
- /* @__PURE__ */ C(Z, { value: "upload", children: [
4601
- /* @__PURE__ */ n("div", { className: "richtext-flex richtext-items-center richtext-gap-[10px]", children: /* @__PURE__ */ n(
4602
- $,
4603
- {
4604
- className: "richtext-mt-1 richtext-w-full",
4605
- onClick: x,
4606
- size: "sm",
4607
- children: e("editor.video.dialog.tab.upload")
4608
- }
4609
- ) }),
4610
- /* @__PURE__ */ n(
4611
- "input",
4612
- {
4613
- accept: "video/*",
4614
- multiple: !0,
4615
- onChange: z,
4616
- ref: c,
4617
- type: "file",
4618
- style: {
4619
- display: "none"
4620
- }
4534
+ return /* @__PURE__ */ C(we, { onOpenChange: u, open: p, children: [
4535
+ /* @__PURE__ */ n(We, { asChild: !0, children: /* @__PURE__ */ n(
4536
+ vt,
4537
+ {
4538
+ disabled: a,
4539
+ icon: i,
4540
+ tooltip: o,
4541
+ action: () => {
4542
+ a || u(!0);
4543
+ }
4544
+ }
4545
+ ) }),
4546
+ /* @__PURE__ */ C(ae, { children: [
4547
+ /* @__PURE__ */ n(se, { children: e("editor.video.dialog.title") }),
4548
+ /* @__PURE__ */ C(
4549
+ Ne,
4550
+ {
4551
+ activationMode: "manual",
4552
+ defaultValue: (b == null ? void 0 : b.resourceVideo) === "both" || (b == null ? void 0 : b.resourceVideo) === "upload" ? "upload" : "link",
4553
+ children: [
4554
+ /* @__PURE__ */ C(ve, { className: "richtext-grid richtext-w-full richtext-grid-cols-2", children: [
4555
+ ((b == null ? void 0 : b.resourceVideo) === "both" || (b == null ? void 0 : b.resourceVideo) === "upload") && /* @__PURE__ */ n(q, { value: "upload", children: e("editor.video.dialog.tab.upload") }),
4556
+ ((b == null ? void 0 : b.resourceVideo) === "both" || (b == null ? void 0 : b.resourceVideo) === "link") && /* @__PURE__ */ n(q, { value: "link", children: e("editor.video.dialog.link") })
4557
+ ] }),
4558
+ /* @__PURE__ */ C(Z, { value: "upload", children: [
4559
+ /* @__PURE__ */ n("div", { className: "richtext-flex richtext-items-center richtext-gap-[10px]", children: /* @__PURE__ */ n($, { className: "richtext-mt-1 richtext-w-full", onClick: x, size: "sm", children: e("editor.video.dialog.tab.upload") }) }),
4560
+ /* @__PURE__ */ n(
4561
+ "input",
4562
+ {
4563
+ accept: "video/*",
4564
+ multiple: !0,
4565
+ onChange: z,
4566
+ ref: c,
4567
+ type: "file",
4568
+ style: {
4569
+ display: "none"
4570
+ }
4571
+ }
4572
+ )
4573
+ ] }),
4574
+ /* @__PURE__ */ C(Z, { value: "link", children: [
4575
+ /* @__PURE__ */ n("div", { children: /* @__PURE__ */ C("div", { className: "richtext-flex richtext-items-center richtext-gap-2", children: [
4576
+ /* @__PURE__ */ n(
4577
+ te,
4578
+ {
4579
+ autoFocus: !0,
4580
+ placeholder: e("editor.video.dialog.placeholder"),
4581
+ required: !0,
4582
+ type: "url",
4583
+ value: l,
4584
+ onBlur: (h) => {
4585
+ const S = h.target.value, m = b.videoProviders || ["."];
4586
+ S && !Ot(S, m) ? g("Invalid video URL") : g("");
4587
+ },
4588
+ onChange: (h) => {
4589
+ s(h.target.value);
4621
4590
  }
4622
- )
4623
- ] }),
4624
- /* @__PURE__ */ C(Z, { value: "link", children: [
4625
- /* @__PURE__ */ n("div", { children: /* @__PURE__ */ C("div", { className: "richtext-flex richtext-items-center richtext-gap-2", children: [
4626
- /* @__PURE__ */ n(
4627
- te,
4628
- {
4629
- autoFocus: !0,
4630
- placeholder: e("editor.video.dialog.placeholder"),
4631
- required: !0,
4632
- type: "url",
4633
- value: l,
4634
- onBlur: (h) => {
4635
- const S = h.target.value, m = b.videoProviders || ["."];
4636
- S && !Ot(S, m) ? g("Invalid video URL") : g("");
4637
- },
4638
- onChange: (h) => {
4639
- s(h.target.value);
4640
- }
4641
- }
4642
- ),
4643
- /* @__PURE__ */ n(
4644
- $,
4645
- {
4646
- onClick: f,
4647
- type: "button",
4648
- children: e("editor.video.dialog.button.apply")
4649
- }
4650
- )
4651
- ] }) }),
4652
- d && /* @__PURE__ */ n("div", { className: "richtext-my-[5px] richtext-text-red-500", children: d })
4653
- ] })
4654
- ]
4655
- }
4656
- )
4657
- ] })
4658
- ]
4659
- }
4660
- );
4591
+ }
4592
+ ),
4593
+ /* @__PURE__ */ n($, { onClick: f, type: "button", children: e("editor.video.dialog.button.apply") })
4594
+ ] }) }),
4595
+ d && /* @__PURE__ */ n("div", { className: "richtext-my-[5px] richtext-text-red-500", children: d })
4596
+ ] })
4597
+ ]
4598
+ }
4599
+ )
4600
+ ] })
4601
+ ] });
4661
4602
  }
4662
4603
  function Ao(e) {
4663
4604
  e = e.replace("https://youtu.be/", "https://www.youtube.com/watch?v=").replace("watch?v=", "embed/");
@@ -4670,7 +4611,7 @@ function Ao(e) {
4670
4611
  }
4671
4612
  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;
4672
4613
  }
4673
- const Pe = /* @__PURE__ */ dt.create({
4614
+ const je = /* @__PURE__ */ ct.create({
4674
4615
  name: "video",
4675
4616
  group: "block",
4676
4617
  atom: !0,
@@ -4750,12 +4691,7 @@ const Pe = /* @__PURE__ */ dt.create({
4750
4691
  ...e,
4751
4692
  width: "100%",
4752
4693
  height: "100%"
4753
- }, 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};` }, [
4754
- "div",
4755
- { style: o },
4756
- ["div", { style: a }],
4757
- ["iframe", i]
4758
- ]];
4694
+ }, 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]]];
4759
4695
  return ["div", {
4760
4696
  ...this.options.HTMLAttributes,
4761
4697
  class: "iframe-wrapper",
@@ -4773,7 +4709,7 @@ const Pe = /* @__PURE__ */ dt.create({
4773
4709
  }
4774
4710
  });
4775
4711
  function Lo() {
4776
- const { t: e } = ne(), t = ee(), { editorDisabled: r } = Ae(), [i, o] = L(""), a = xe(null), [l, s] = L(""), [c, d] = L(!1), g = le(Pe.name), p = Ht.UPLOAD_VIDEO(t.id);
4712
+ const { t: e } = ne(), t = ee(), { editorDisabled: r } = Ae(), [i, o] = L(""), a = xe(null), [l, s] = L(""), [c, d] = L(!1), g = le(je.name), p = Ht.UPLOAD_VIDEO(t.id);
4777
4713
  Mt(d, [p]);
4778
4714
  const u = B(() => (g == null ? void 0 : g.options) ?? {}, [g]);
4779
4715
  async function k(f) {
@@ -4798,83 +4734,61 @@ function Lo() {
4798
4734
  var x;
4799
4735
  f.preventDefault(), (x = a.current) == null || x.click();
4800
4736
  }
4801
- return r ? /* @__PURE__ */ n(Y, {}) : /* @__PURE__ */ n(
4802
- we,
4803
- {
4804
- onOpenChange: d,
4805
- open: c,
4806
- children: /* @__PURE__ */ C(ae, { children: [
4807
- /* @__PURE__ */ n(se, { children: e("editor.video.dialog.title") }),
4808
- /* @__PURE__ */ C(
4809
- Ne,
4810
- {
4811
- activationMode: "manual",
4812
- defaultValue: (u == null ? void 0 : u.resourceVideo) === "both" || (u == null ? void 0 : u.resourceVideo) === "upload" ? "upload" : "link",
4813
- children: [
4814
- /* @__PURE__ */ C(ve, { className: "richtext-grid richtext-w-full richtext-grid-cols-2", children: [
4815
- ((u == null ? void 0 : u.resourceVideo) === "both" || (u == null ? void 0 : u.resourceVideo) === "upload") && /* @__PURE__ */ n(q, { value: "upload", children: e("editor.video.dialog.tab.upload") }),
4816
- ((u == null ? void 0 : u.resourceVideo) === "both" || (u == null ? void 0 : u.resourceVideo) === "link") && /* @__PURE__ */ n(q, { value: "link", children: e("editor.video.dialog.link") })
4817
- ] }),
4818
- /* @__PURE__ */ C(Z, { value: "upload", children: [
4819
- /* @__PURE__ */ n("div", { className: "richtext-flex richtext-items-center richtext-gap-[10px]", children: /* @__PURE__ */ n(
4820
- $,
4821
- {
4822
- className: "richtext-mt-1 richtext-w-full",
4823
- onClick: z,
4824
- size: "sm",
4825
- children: e("editor.video.dialog.tab.upload")
4826
- }
4827
- ) }),
4828
- /* @__PURE__ */ n(
4829
- "input",
4830
- {
4831
- accept: "video/*",
4832
- multiple: !0,
4833
- onChange: k,
4834
- ref: a,
4835
- type: "file",
4836
- style: {
4837
- display: "none"
4838
- }
4737
+ return r ? /* @__PURE__ */ n(Y, {}) : /* @__PURE__ */ n(we, { onOpenChange: d, open: c, children: /* @__PURE__ */ C(ae, { children: [
4738
+ /* @__PURE__ */ n(se, { children: e("editor.video.dialog.title") }),
4739
+ /* @__PURE__ */ C(
4740
+ Ne,
4741
+ {
4742
+ activationMode: "manual",
4743
+ defaultValue: (u == null ? void 0 : u.resourceVideo) === "both" || (u == null ? void 0 : u.resourceVideo) === "upload" ? "upload" : "link",
4744
+ children: [
4745
+ /* @__PURE__ */ C(ve, { className: "richtext-grid richtext-w-full richtext-grid-cols-2", children: [
4746
+ ((u == null ? void 0 : u.resourceVideo) === "both" || (u == null ? void 0 : u.resourceVideo) === "upload") && /* @__PURE__ */ n(q, { value: "upload", children: e("editor.video.dialog.tab.upload") }),
4747
+ ((u == null ? void 0 : u.resourceVideo) === "both" || (u == null ? void 0 : u.resourceVideo) === "link") && /* @__PURE__ */ n(q, { value: "link", children: e("editor.video.dialog.link") })
4748
+ ] }),
4749
+ /* @__PURE__ */ C(Z, { value: "upload", children: [
4750
+ /* @__PURE__ */ n("div", { className: "richtext-flex richtext-items-center richtext-gap-[10px]", children: /* @__PURE__ */ n($, { className: "richtext-mt-1 richtext-w-full", onClick: z, size: "sm", children: e("editor.video.dialog.tab.upload") }) }),
4751
+ /* @__PURE__ */ n(
4752
+ "input",
4753
+ {
4754
+ accept: "video/*",
4755
+ multiple: !0,
4756
+ onChange: k,
4757
+ ref: a,
4758
+ type: "file",
4759
+ style: {
4760
+ display: "none"
4761
+ }
4762
+ }
4763
+ )
4764
+ ] }),
4765
+ /* @__PURE__ */ C(Z, { value: "link", children: [
4766
+ /* @__PURE__ */ n("div", { children: /* @__PURE__ */ C("div", { className: "richtext-flex richtext-items-center richtext-gap-2", children: [
4767
+ /* @__PURE__ */ n(
4768
+ te,
4769
+ {
4770
+ autoFocus: !0,
4771
+ placeholder: e("editor.video.dialog.placeholder"),
4772
+ required: !0,
4773
+ type: "url",
4774
+ value: i,
4775
+ onBlur: (f) => {
4776
+ const x = f.target.value, h = u.videoProviders || ["."];
4777
+ x && !Ot(x, h) ? s("Invalid video URL") : s("");
4778
+ },
4779
+ onChange: (f) => {
4780
+ o(f.target.value);
4839
4781
  }
4840
- )
4841
- ] }),
4842
- /* @__PURE__ */ C(Z, { value: "link", children: [
4843
- /* @__PURE__ */ n("div", { children: /* @__PURE__ */ C("div", { className: "richtext-flex richtext-items-center richtext-gap-2", children: [
4844
- /* @__PURE__ */ n(
4845
- te,
4846
- {
4847
- autoFocus: !0,
4848
- placeholder: e("editor.video.dialog.placeholder"),
4849
- required: !0,
4850
- type: "url",
4851
- value: i,
4852
- onBlur: (f) => {
4853
- const x = f.target.value, h = u.videoProviders || ["."];
4854
- x && !Ot(x, h) ? s("Invalid video URL") : s("");
4855
- },
4856
- onChange: (f) => {
4857
- o(f.target.value);
4858
- }
4859
- }
4860
- ),
4861
- /* @__PURE__ */ n(
4862
- $,
4863
- {
4864
- onClick: b,
4865
- type: "button",
4866
- children: e("editor.video.dialog.button.apply")
4867
- }
4868
- )
4869
- ] }) }),
4870
- l && /* @__PURE__ */ n("div", { className: "richtext-my-[5px] richtext-text-red-500", children: l })
4871
- ] })
4872
- ]
4873
- }
4874
- )
4875
- ] })
4876
- }
4877
- );
4782
+ }
4783
+ ),
4784
+ /* @__PURE__ */ n($, { onClick: b, type: "button", children: e("editor.video.dialog.button.apply") })
4785
+ ] }) }),
4786
+ l && /* @__PURE__ */ n("div", { className: "richtext-my-[5px] richtext-text-red-500", children: l })
4787
+ ] })
4788
+ ]
4789
+ }
4790
+ )
4791
+ ] }) });
4878
4792
  }
4879
4793
  function Eo() {
4880
4794
  return /* @__PURE__ */ C(Y, { children: [
@@ -4884,40 +4798,40 @@ function Eo() {
4884
4798
  }
4885
4799
  process.env.NODE_ENV !== "production" && (Eo.displayName = "SlashDialogTrigger");
4886
4800
  export {
4887
- ra as $,
4801
+ ia as $,
4888
4802
  vt as A,
4889
4803
  $ as B,
4890
4804
  $e as C,
4891
4805
  we as D,
4892
4806
  Ht as E,
4893
- Mt as F,
4894
- Et as G,
4807
+ Et as F,
4808
+ Mt as G,
4895
4809
  ot as H,
4896
4810
  fe as I,
4897
4811
  ho as J,
4898
4812
  po as K,
4899
4813
  pe as L,
4900
4814
  ln as M,
4901
- Go as N,
4902
- $o as O,
4903
- ta as P,
4815
+ Xo as N,
4816
+ Fo as O,
4817
+ ra as P,
4904
4818
  bn as Q,
4905
- Wo as R,
4819
+ Go as R,
4906
4820
  Eo as S,
4907
4821
  Nn as T,
4908
4822
  xn as U,
4909
- Qo as V,
4910
- Jo as W,
4911
- ea as X,
4912
- Pn as Y,
4913
- Pe as Z,
4914
- Ko as _,
4823
+ ea as V,
4824
+ Qo as W,
4825
+ ta as X,
4826
+ jn as Y,
4827
+ je as Z,
4828
+ Jo as _,
4915
4829
  An as a,
4916
4830
  Ct as b,
4917
4831
  _ as c,
4918
4832
  Ae as d,
4919
- Xo as e,
4920
- Zo as f,
4833
+ Yo as e,
4834
+ Ko as f,
4921
4835
  en as g,
4922
4836
  ee as h,
4923
4837
  wt as i,
@@ -4930,12 +4844,12 @@ export {
4930
4844
  Tt as p,
4931
4845
  le as q,
4932
4846
  Be as r,
4933
- qo as s,
4847
+ Zo as s,
4934
4848
  Se as t,
4935
4849
  Vt as u,
4936
- So as v,
4937
- at as w,
4938
- Yo as x,
4850
+ at as v,
4851
+ qo as w,
4852
+ So as x,
4939
4853
  $n as y,
4940
- Fo as z
4854
+ Wo as z
4941
4855
  };